From 3566fca8c55201aededbfffb4ece69be84f0bd48 Mon Sep 17 00:00:00 2001 From: Chris Denton Date: Tue, 7 Jan 2025 00:08:27 +0000 Subject: [PATCH 1/3] Fix provenance in direct32 sample (#3419) --- crates/samples/windows/direct3d12/src/main.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/crates/samples/windows/direct3d12/src/main.rs b/crates/samples/windows/direct3d12/src/main.rs index 11586f77f6..0dbb7aea79 100644 --- a/crates/samples/windows/direct3d12/src/main.rs +++ b/crates/samples/windows/direct3d12/src/main.rs @@ -5,8 +5,6 @@ use windows::{ Win32::UI::WindowsAndMessaging::*, }; -use std::mem::transmute; - trait DXSample { fn new(command_line: &SampleCommandLine) -> Result where @@ -151,7 +149,7 @@ extern "system" fn wndproc( match message { WM_CREATE => { unsafe { - let create_struct: &CREATESTRUCTA = transmute(lparam); + let create_struct: &CREATESTRUCTA = &*(lparam.0 as *const CREATESTRUCTA); SetWindowLongPtrA(window, GWLP_USERDATA, create_struct.lpCreateParams as _); } LRESULT::default() From b35dfd147003b610989031f3367f68df4d94b25c Mon Sep 17 00:00:00 2001 From: Rafael Rivera Date: Mon, 6 Jan 2025 19:32:43 -0500 Subject: [PATCH 2/3] Update web workflow to use external origin (#3420) --- .github/workflows/web.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml index 9c76e731e1..8c691762f6 100644 --- a/.github/workflows/web.yml +++ b/.github/workflows/web.yml @@ -71,6 +71,7 @@ jobs: git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" + git remote set-url origin https://github.com/${{ github.repository }} $status = git status --porcelain if ($status) { From 284f18906ad0d38ae3aec9b8f10a3801b7e77243 Mon Sep 17 00:00:00 2001 From: Kenny Kerr Date: Tue, 7 Jan 2025 07:07:38 -0600 Subject: [PATCH 3/3] Avoid `transmute` where possible (#3421) --- crates/libs/bindgen/src/types/cpp_method.rs | 4 +- .../Wdk/Devices/HumanInterfaceDevice/mod.rs | 2 +- .../windows/src/Windows/Wdk/Foundation/mod.rs | 2 +- .../src/Windows/Wdk/Graphics/Direct3D/mod.rs | 182 +- .../Windows/Wdk/NetworkManagement/Ndis/mod.rs | 94 +- .../WindowsFilteringPlatform/mod.rs | 250 +- .../Wdk/Storage/FileSystem/Minifilters/mod.rs | 416 ++-- .../src/Windows/Wdk/Storage/FileSystem/mod.rs | 944 ++++---- .../windows/src/Windows/Wdk/System/IO/mod.rs | 2 +- .../src/Windows/Wdk/System/Memory/mod.rs | 12 +- .../Windows/Wdk/System/OfflineRegistry/mod.rs | 44 +- .../src/Windows/Wdk/System/Registry/mod.rs | 94 +- .../Wdk/System/SystemInformation/mod.rs | 12 +- .../Windows/Wdk/System/SystemServices/mod.rs | 1241 +++++----- .../src/Windows/Wdk/System/Threading/mod.rs | 44 +- .../Win32/AI/MachineLearning/DirectML/mod.rs | 14 +- .../Win32/AI/MachineLearning/WinML/mod.rs | 4 +- .../src/Windows/Win32/Data/HtmlHelp/mod.rs | 80 +- .../Win32/Data/RightsManagement/mod.rs | 185 +- .../src/Windows/Win32/Data/Xml/MsXml/mod.rs | 28 +- .../src/Windows/Win32/Data/Xml/XmlLite/mod.rs | 26 +- .../src/Windows/Win32/Devices/AllJoyn/mod.rs | 292 +-- .../Win32/Devices/BiometricFramework/mod.rs | 62 +- .../Windows/Win32/Devices/Bluetooth/mod.rs | 72 +- .../Win32/Devices/Communication/mod.rs | 34 +- .../Windows/Win32/Devices/DeviceAccess/mod.rs | 4 +- .../DeviceAndDriverInstallation/mod.rs | 914 ++++--- .../Windows/Win32/Devices/DeviceQuery/mod.rs | 46 +- .../src/Windows/Win32/Devices/Display/mod.rs | 158 +- .../Win32/Devices/Enumeration/Pnp/mod.rs | 2 +- .../src/Windows/Win32/Devices/Fax/mod.rs | 138 +- .../Win32/Devices/FunctionDiscovery/mod.rs | 26 +- .../Windows/Win32/Devices/Geolocation/mod.rs | 2 +- .../Win32/Devices/HumanInterfaceDevice/mod.rs | 316 +-- .../Win32/Devices/ImageAcquisition/mod.rs | 64 +- .../Win32/Devices/PortableDevices/mod.rs | 42 +- .../src/Windows/Win32/Devices/Sensors/mod.rs | 40 +- .../Win32/Devices/SerialCommunication/mod.rs | 8 +- .../src/Windows/Win32/Devices/Tapi/mod.rs | 382 +-- .../src/Windows/Win32/Devices/Usb/mod.rs | 42 +- .../Win32/Devices/WebServicesOnDevices/mod.rs | 136 +- .../src/Windows/Win32/Foundation/mod.rs | 8 +- .../windows/src/Windows/Win32/Gaming/mod.rs | 52 +- .../src/Windows/Win32/Globalization/mod.rs | 1906 ++++++++------- .../Graphics/CompositionSwapchain/mod.rs | 2 +- .../src/Windows/Win32/Graphics/DXCore/mod.rs | 8 +- .../Windows/Win32/Graphics/Direct2D/mod.rs | 218 +- .../Win32/Graphics/Direct3D/Dxc/mod.rs | 26 +- .../Win32/Graphics/Direct3D/Fxc/mod.rs | 18 +- .../Windows/Win32/Graphics/Direct3D/mod.rs | 2 +- .../Windows/Win32/Graphics/Direct3D10/mod.rs | 256 +- .../Windows/Win32/Graphics/Direct3D11/mod.rs | 443 ++-- .../Win32/Graphics/Direct3D11on12/mod.rs | 6 +- .../Windows/Win32/Graphics/Direct3D12/mod.rs | 190 +- .../Windows/Win32/Graphics/Direct3D9/mod.rs | 172 +- .../Win32/Graphics/Direct3D9on12/mod.rs | 6 +- .../Win32/Graphics/DirectComposition/mod.rs | 10 +- .../Windows/Win32/Graphics/DirectDraw/mod.rs | 374 +-- .../Win32/Graphics/DirectManipulation/mod.rs | 12 +- .../Windows/Win32/Graphics/DirectWrite/mod.rs | 333 ++- .../src/Windows/Win32/Graphics/Dwm/mod.rs | 18 +- .../src/Windows/Win32/Graphics/Dxgi/mod.rs | 70 +- .../src/Windows/Win32/Graphics/Gdi/mod.rs | 332 +-- .../src/Windows/Win32/Graphics/GdiPlus/mod.rs | 1242 +++++----- .../src/Windows/Win32/Graphics/Imaging/mod.rs | 110 +- .../src/Windows/Win32/Graphics/OpenGL/mod.rs | 158 +- .../Graphics/Printing/PrintTicket/mod.rs | 12 +- .../Windows/Win32/Graphics/Printing/mod.rs | 302 +-- .../MobileDeviceManagementRegistration/mod.rs | 10 +- .../src/Windows/Win32/Media/Audio/Apo/mod.rs | 12 +- .../Win32/Media/Audio/DirectMusic/mod.rs | 80 +- .../Win32/Media/Audio/DirectSound/mod.rs | 70 +- .../Win32/Media/Audio/Endpoints/mod.rs | 12 +- .../Windows/Win32/Media/Audio/XAudio2/mod.rs | 42 +- .../src/Windows/Win32/Media/Audio/mod.rs | 278 +-- .../Windows/Win32/Media/DeviceManager/mod.rs | 170 +- .../Windows/Win32/Media/DirectShow/Tv/mod.rs | 236 +- .../src/Windows/Win32/Media/DirectShow/mod.rs | 869 ++++--- .../Windows/Win32/Media/DxMediaObjects/mod.rs | 26 +- .../Win32/Media/KernelStreaming/mod.rs | 46 +- .../Win32/Media/MediaFoundation/mod.rs | 632 ++--- .../Windows/Win32/Media/MediaPlayer/mod.rs | 306 +-- .../src/Windows/Win32/Media/Multimedia/mod.rs | 164 +- .../Win32/Media/PictureAcquisition/mod.rs | 20 +- .../src/Windows/Win32/Media/Speech/mod.rs | 228 +- .../Win32/Media/WindowsMediaFormat/mod.rs | 182 +- .../windows/src/Windows/Win32/Media/mod.rs | 4 +- .../Win32/NetworkManagement/Dhcp/mod.rs | 276 +-- .../Win32/NetworkManagement/Dns/mod.rs | 84 +- .../Win32/NetworkManagement/IpHelper/mod.rs | 274 +-- .../NetworkManagement/MobileBroadband/mod.rs | 6 +- .../Win32/NetworkManagement/Multicast/mod.rs | 12 +- .../Win32/NetworkManagement/NetBios/mod.rs | 2 +- .../NetworkManagement/NetManagement/mod.rs | 274 +-- .../Win32/NetworkManagement/NetShell/mod.rs | 4 +- .../NetworkDiagnosticsFramework/mod.rs | 54 +- .../Win32/NetworkManagement/P2P/mod.rs | 130 +- .../Win32/NetworkManagement/QoS/mod.rs | 38 +- .../Win32/NetworkManagement/Rras/mod.rs | 338 +-- .../Win32/NetworkManagement/Snmp/mod.rs | 102 +- .../Win32/NetworkManagement/WNet/mod.rs | 118 +- .../Win32/NetworkManagement/WebDav/mod.rs | 10 +- .../Win32/NetworkManagement/WiFi/mod.rs | 138 +- .../WindowsConnectNow/mod.rs | 4 +- .../WindowsConnectionManager/mod.rs | 12 +- .../WindowsFilteringPlatform/mod.rs | 322 +-- .../NetworkManagement/WindowsFirewall/mod.rs | 22 +- .../WindowsNetworkVirtualization/mod.rs | 2 +- .../Win32/Networking/ActiveDirectory/mod.rs | 300 +-- .../mod.rs | 44 +- .../Win32/Networking/Clustering/mod.rs | 390 +-- .../Win32/Networking/HttpServer/mod.rs | 79 +- .../src/Windows/Win32/Networking/Ldap/mod.rs | 418 ++-- .../Networking/NetworkListManager/mod.rs | 12 +- .../RemoteDifferentialCompression/mod.rs | 24 +- .../Windows/Win32/Networking/WebSocket/mod.rs | 16 +- .../Windows/Win32/Networking/WinHttp/mod.rs | 92 +- .../Windows/Win32/Networking/WinInet/mod.rs | 408 ++-- .../Windows/Win32/Networking/WinSock/mod.rs | 295 +-- .../Networking/WindowsWebServices/mod.rs | 368 +-- .../Windows/Win32/Security/AppLocker/mod.rs | 14 +- .../Authentication/Identity/Provider/mod.rs | 30 +- .../Security/Authentication/Identity/mod.rs | 346 ++- .../Win32/Security/Authorization/UI/mod.rs | 38 +- .../Win32/Security/Authorization/mod.rs | 176 +- .../Win32/Security/ConfigurationSnapin/mod.rs | 14 +- .../Windows/Win32/Security/Credentials/mod.rs | 162 +- .../Security/Cryptography/Catalog/mod.rs | 42 +- .../Security/Cryptography/Certificates/mod.rs | 204 +- .../Win32/Security/Cryptography/Sip/mod.rs | 24 +- .../Win32/Security/Cryptography/UI/mod.rs | 16 +- .../Win32/Security/Cryptography/mod.rs | 742 +++--- .../Win32/Security/DiagnosticDataQuery/mod.rs | 14 +- .../Win32/Security/DirectoryServices/mod.rs | 8 +- .../Win32/Security/EnterpriseData/mod.rs | 8 +- .../ExtensibleAuthenticationProtocol/mod.rs | 103 +- .../Windows/Win32/Security/Isolation/mod.rs | 2 +- .../Win32/Security/LicenseProtection/mod.rs | 2 +- .../src/Windows/Win32/Security/Tpm/mod.rs | 25 +- .../Windows/Win32/Security/WinTrust/mod.rs | 24 +- .../windows/src/Windows/Win32/Security/mod.rs | 283 +-- .../src/Windows/Win32/Storage/Cabinets/mod.rs | 8 +- .../Windows/Win32/Storage/CloudFilters/mod.rs | 47 +- .../Windows/Win32/Storage/Compression/mod.rs | 12 +- .../Win32/Storage/DataDeduplication/mod.rs | 18 +- .../Storage/DistributedFileSystem/mod.rs | 20 +- .../Win32/Storage/EnhancedStorage/mod.rs | 8 +- .../Windows/Win32/Storage/FileHistory/mod.rs | 4 +- .../Storage/FileServerResourceManager/mod.rs | 2 +- .../Windows/Win32/Storage/FileSystem/mod.rs | 534 ++--- .../src/Windows/Win32/Storage/Imapi/mod.rs | 50 +- .../Windows/Win32/Storage/IndexServer/mod.rs | 18 +- .../Storage/InstallableFileSystems/mod.rs | 30 +- .../Windows/Win32/Storage/IscsiDisc/mod.rs | 108 +- .../src/Windows/Win32/Storage/Jet/mod.rs | 318 ++- .../Windows/Win32/Storage/OfflineFiles/mod.rs | 66 +- .../Win32/Storage/Packaging/Appx/mod.rs | 94 +- .../Win32/Storage/Packaging/Opc/mod.rs | 14 +- .../Win32/Storage/ProjectedFileSystem/mod.rs | 20 +- .../src/Windows/Win32/Storage/Vhd/mod.rs | 34 +- .../Win32/Storage/VirtualDiskService/mod.rs | 110 +- .../src/Windows/Win32/Storage/Vss/mod.rs | 68 +- .../Windows/Win32/Storage/Xps/Printing/mod.rs | 4 +- .../src/Windows/Win32/Storage/Xps/mod.rs | 36 +- .../Windows/Win32/System/AddressBook/mod.rs | 286 +-- .../Windows/Win32/System/Antimalware/mod.rs | 10 +- .../mod.rs | 518 ++-- .../Win32/System/ApplicationVerifier/mod.rs | 2 +- .../Win32/System/AssessmentTool/mod.rs | 4 +- .../Windows/Win32/System/ClrHosting/mod.rs | 154 +- .../Windows/Win32/System/Com/CallObj/mod.rs | 20 +- .../Windows/Win32/System/Com/Events/mod.rs | 4 +- .../Windows/Win32/System/Com/Marshal/mod.rs | 110 +- .../Win32/System/Com/StructuredStorage/mod.rs | 108 +- .../src/Windows/Win32/System/Com/UI/mod.rs | 2 +- .../Windows/Win32/System/Com/Urlmon/mod.rs | 114 +- .../src/Windows/Win32/System/Com/mod.rs | 260 +- .../Win32/System/ComponentServices/mod.rs | 130 +- .../src/Windows/Win32/System/Console/mod.rs | 80 +- .../src/Windows/Win32/System/Contacts/mod.rs | 28 +- .../Win32/System/CorrelationVector/mod.rs | 6 +- .../Windows/Win32/System/DataExchange/mod.rs | 30 +- .../Win32/System/DeploymentServices/mod.rs | 76 +- .../Win32/System/DesktopSharing/mod.rs | 4 +- .../Win32/System/DeveloperLicensing/mod.rs | 4 +- .../System/Diagnostics/ClrProfiling/mod.rs | 108 +- .../Diagnostics/Debug/ActiveScript/mod.rs | 110 +- .../Diagnostics/Debug/Extensions/mod.rs | 2119 ++++++++--------- .../Win32/System/Diagnostics/Debug/mod.rs | 414 ++-- .../Win32/System/Diagnostics/Etw/mod.rs | 110 +- .../Diagnostics/ProcessSnapshotting/mod.rs | 10 +- .../Win32/System/Diagnostics/ToolHelp/mod.rs | 30 +- .../DistributedTransactionCoordinator/mod.rs | 82 +- .../Windows/Win32/System/Environment/mod.rs | 22 +- .../Win32/System/ErrorReporting/mod.rs | 20 +- .../Win32/System/EventCollector/mod.rs | 14 +- .../src/Windows/Win32/System/EventLog/mod.rs | 81 +- .../System/EventNotificationService/mod.rs | 6 +- .../Windows/Win32/System/GroupPolicy/mod.rs | 61 +- .../Win32/System/HostComputeNetwork/mod.rs | 68 +- .../Win32/System/HostComputeSystem/mod.rs | 34 +- .../Windows/Win32/System/Hypervisor/mod.rs | 144 +- .../src/Windows/Win32/System/IO/mod.rs | 16 +- .../src/Windows/Win32/System/Iis/mod.rs | 32 +- .../Windows/Win32/System/JobObjects/mod.rs | 10 +- .../src/Windows/Win32/System/Js/mod.rs | 138 +- .../src/Windows/Win32/System/Kernel/mod.rs | 8 +- .../Windows/Win32/System/LibraryLoader/mod.rs | 56 +- .../src/Windows/Win32/System/Mailslots/mod.rs | 6 +- .../src/Windows/Win32/System/Mapi/mod.rs | 2 +- .../Win32/System/Memory/NonVolatile/mod.rs | 6 +- .../src/Windows/Win32/System/Memory/mod.rs | 96 +- .../Win32/System/MessageQueuing/mod.rs | 36 +- .../src/Windows/Win32/System/Mmc/mod.rs | 38 +- .../src/Windows/Win32/System/Ole/mod.rs | 232 +- .../Win32/System/ParentalControls/mod.rs | 8 +- .../HardwareCounterProfiling/mod.rs | 6 +- .../Windows/Win32/System/Performance/mod.rs | 206 +- .../src/Windows/Win32/System/Pipes/mod.rs | 32 +- .../src/Windows/Win32/System/Power/mod.rs | 124 +- .../Windows/Win32/System/ProcessStatus/mod.rs | 68 +- .../System/RealTimeCommunications/mod.rs | 32 +- .../src/Windows/Win32/System/Recovery/mod.rs | 6 +- .../src/Windows/Win32/System/Registry/mod.rs | 146 +- .../Windows/Win32/System/RemoteDesktop/mod.rs | 176 +- .../Win32/System/RemoteManagement/mod.rs | 50 +- .../Win32/System/RestartManager/mod.rs | 16 +- .../src/Windows/Win32/System/Restore/mod.rs | 4 +- .../src/Windows/Win32/System/Rpc/mod.rs | 802 +++---- .../src/Windows/Win32/System/Search/mod.rs | 966 ++++---- .../Win32/System/SecurityCenter/mod.rs | 4 +- .../Windows/Win32/System/ServerBackup/mod.rs | 2 +- .../src/Windows/Win32/System/Services/mod.rs | 74 +- .../SettingsManagementInfrastructure/mod.rs | 6 +- .../Win32/System/SetupAndMigration/mod.rs | 4 +- .../src/Windows/Win32/System/Shutdown/mod.rs | 4 +- .../src/Windows/Win32/System/SideShow/mod.rs | 6 +- .../Win32/System/StationsAndDesktops/mod.rs | 30 +- .../Win32/System/SubsystemForLinux/mod.rs | 2 +- .../Win32/System/SystemInformation/mod.rs | 54 +- .../Windows/Win32/System/TaskScheduler/mod.rs | 110 +- .../src/Windows/Win32/System/Threading/mod.rs | 368 ++- .../src/Windows/Win32/System/Time/mod.rs | 26 +- .../Win32/System/TpmBaseServices/mod.rs | 18 +- .../Win32/System/TransactionServer/mod.rs | 6 +- .../src/Windows/Win32/System/Variant/mod.rs | 52 +- .../Win32/System/WinRT/Composition/mod.rs | 8 +- .../System/WinRT/Graphics/Direct2D/mod.rs | 2 +- .../System/WinRT/Graphics/Imaging/mod.rs | 2 +- .../src/Windows/Win32/System/WinRT/ML/mod.rs | 4 +- .../Windows/Win32/System/WinRT/Media/mod.rs | 2 +- .../Win32/System/WinRT/Metadata/mod.rs | 375 ++- .../src/Windows/Win32/System/WinRT/Pdf/mod.rs | 4 +- .../src/Windows/Win32/System/WinRT/mod.rs | 30 +- .../Win32/System/WindowsProgramming/mod.rs | 208 +- .../Windows/Win32/System/WindowsSync/mod.rs | 228 +- .../src/Windows/Win32/System/Wmi/mod.rs | 76 +- .../src/Windows/Win32/UI/Accessibility/mod.rs | 134 +- .../src/Windows/Win32/UI/Animation/mod.rs | 20 +- .../src/Windows/Win32/UI/ColorSystem/mod.rs | 134 +- .../Windows/Win32/UI/Controls/Dialogs/mod.rs | 40 +- .../Windows/Win32/UI/Controls/RichEdit/mod.rs | 116 +- .../src/Windows/Win32/UI/Controls/mod.rs | 188 +- .../windows/src/Windows/Win32/UI/HiDpi/mod.rs | 14 +- .../src/Windows/Win32/UI/Input/Ime/mod.rs | 214 +- .../src/Windows/Win32/UI/Input/Ink/mod.rs | 2 +- .../Win32/UI/Input/KeyboardAndMouse/mod.rs | 22 +- .../src/Windows/Win32/UI/Input/Pointer/mod.rs | 40 +- .../src/Windows/Win32/UI/Input/Touch/mod.rs | 6 +- .../Win32/UI/Input/XboxController/mod.rs | 10 +- .../windows/src/Windows/Win32/UI/Input/mod.rs | 16 +- .../Win32/UI/InteractionContext/mod.rs | 6 +- .../LegacyWindowsEnvironmentFeatures/mod.rs | 12 +- .../src/Windows/Win32/UI/Magnification/mod.rs | 20 +- .../src/Windows/Win32/UI/Ribbon/mod.rs | 8 +- .../Win32/UI/Shell/PropertiesSystem/mod.rs | 70 +- .../windows/src/Windows/Win32/UI/Shell/mod.rs | 888 +++---- .../src/Windows/Win32/UI/TabletPC/mod.rs | 86 +- .../src/Windows/Win32/UI/TextServices/mod.rs | 170 +- .../Win32/UI/WindowsAndMessaging/mod.rs | 282 +-- .../windows/src/Windows/Win32/UI/Wpf/mod.rs | 24 +- .../Windows/Win32/Web/InternetExplorer/mod.rs | 68 +- crates/tests/bindgen/src/bool_event.rs | 4 +- .../bindgen/src/fn_associated_enum_win.rs | 2 +- .../tests/bindgen/src/fn_return_void_win.rs | 2 +- .../bindgen/src/interface_array_return.rs | 2 +- .../bindgen/src/interface_cpp_return_udt.rs | 4 +- crates/tests/bindgen/src/ref_params.rs | 28 +- .../bindgen/src/struct_with_cpp_interface.rs | 6 +- 289 files changed, 18161 insertions(+), 19584 deletions(-) diff --git a/crates/libs/bindgen/src/types/cpp_method.rs b/crates/libs/bindgen/src/types/cpp_method.rs index 25ee38af52..04b6eb9c05 100644 --- a/crates/libs/bindgen/src/types/cpp_method.rs +++ b/crates/libs/bindgen/src/types/cpp_method.rs @@ -682,14 +682,14 @@ impl CppMethod { quote! { #name.param().abi(), } } ParamHint::Optional => { - quote! { core::mem::transmute(#name.unwrap_or(core::mem::zeroed())), } + quote! { #name.unwrap_or(core::mem::zeroed()) as _, } } ParamHint::Bool => { quote! { #name.into(), } } ParamHint::ValueType => { if flags.contains(ParamAttributes::Out) { - quote! { core::mem::transmute(#name), } + quote! { #name as _, } } else { quote! { #name, } } 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 d504fced2c..4ba31079c7 100644 --- a/crates/libs/windows/src/Windows/Wdk/Devices/HumanInterfaceDevice/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/Devices/HumanInterfaceDevice/mod.rs @@ -6,7 +6,7 @@ pub unsafe fn VhfAsyncOperationComplete(vhfoperationhandle: *const core::ffi::c_ #[inline] pub unsafe fn VhfCreate(vhfconfig: *const VHF_CONFIG, vhfhandle: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("vhfum.dll" "system" fn VhfCreate(vhfconfig : *const VHF_CONFIG, vhfhandle : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { VhfCreate(vhfconfig, core::mem::transmute(vhfhandle)) } + unsafe { VhfCreate(vhfconfig, vhfhandle as _) } } #[inline] pub unsafe fn VhfDelete(vhfhandle: *const core::ffi::c_void, wait: bool) { diff --git a/crates/libs/windows/src/Windows/Wdk/Foundation/mod.rs b/crates/libs/windows/src/Windows/Wdk/Foundation/mod.rs index 8e94d00f75..a3008eec9a 100644 --- a/crates/libs/windows/src/Windows/Wdk/Foundation/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/Foundation/mod.rs @@ -6,7 +6,7 @@ pub unsafe fn NtClose(handle: super::super::Win32::Foundation::HANDLE) -> super: #[inline] 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); - unsafe { NtQueryObject(core::mem::transmute(handle.unwrap_or(core::mem::zeroed())), objectinformationclass, core::mem::transmute(objectinformation.unwrap_or(core::mem::zeroed())), objectinformationlength, core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } + unsafe { NtQueryObject(handle.unwrap_or(core::mem::zeroed()) as _, objectinformationclass, objectinformation.unwrap_or(core::mem::zeroed()) as _, objectinformationlength, returnlength.unwrap_or(core::mem::zeroed()) as _) } } #[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 8309fc3345..c8149b8c16 100644 --- a/crates/libs/windows/src/Windows/Wdk/Graphics/Direct3D/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/Graphics/Direct3D/mod.rs @@ -1,12 +1,12 @@ #[inline] pub unsafe fn D3DKMTAcquireKeyedMutex(param0: *mut D3DKMT_ACQUIREKEYEDMUTEX) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTAcquireKeyedMutex(param0 : *mut D3DKMT_ACQUIREKEYEDMUTEX) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTAcquireKeyedMutex(core::mem::transmute(param0)) } + unsafe { D3DKMTAcquireKeyedMutex(param0 as _) } } #[inline] pub unsafe fn D3DKMTAcquireKeyedMutex2(param0: *mut D3DKMT_ACQUIREKEYEDMUTEX2) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTAcquireKeyedMutex2(param0 : *mut D3DKMT_ACQUIREKEYEDMUTEX2) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTAcquireKeyedMutex2(core::mem::transmute(param0)) } + unsafe { D3DKMTAcquireKeyedMutex2(param0 as _) } } #[inline] pub unsafe fn D3DKMTAdjustFullscreenGamma(param0: *const D3DKMT_ADJUSTFULLSCREENGAMMA) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -42,17 +42,17 @@ pub unsafe fn D3DKMTCheckMonitorPowerState(param0: *const D3DKMT_CHECKMONITORPOW #[inline] pub unsafe fn D3DKMTCheckMultiPlaneOverlaySupport(param0: *mut D3DKMT_CHECKMULTIPLANEOVERLAYSUPPORT) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTCheckMultiPlaneOverlaySupport(param0 : *mut D3DKMT_CHECKMULTIPLANEOVERLAYSUPPORT) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTCheckMultiPlaneOverlaySupport(core::mem::transmute(param0)) } + unsafe { D3DKMTCheckMultiPlaneOverlaySupport(param0 as _) } } #[inline] pub unsafe fn D3DKMTCheckMultiPlaneOverlaySupport2(param0: *mut D3DKMT_CHECKMULTIPLANEOVERLAYSUPPORT2) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTCheckMultiPlaneOverlaySupport2(param0 : *mut D3DKMT_CHECKMULTIPLANEOVERLAYSUPPORT2) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTCheckMultiPlaneOverlaySupport2(core::mem::transmute(param0)) } + unsafe { D3DKMTCheckMultiPlaneOverlaySupport2(param0 as _) } } #[inline] pub unsafe fn D3DKMTCheckMultiPlaneOverlaySupport3(param0: *mut D3DKMT_CHECKMULTIPLANEOVERLAYSUPPORT3) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTCheckMultiPlaneOverlaySupport3(param0 : *mut D3DKMT_CHECKMULTIPLANEOVERLAYSUPPORT3) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTCheckMultiPlaneOverlaySupport3(core::mem::transmute(param0)) } + unsafe { D3DKMTCheckMultiPlaneOverlaySupport3(param0 as _) } } #[inline] pub unsafe fn D3DKMTCheckOcclusion(param0: *const D3DKMT_CHECKOCCLUSION) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -82,17 +82,17 @@ pub unsafe fn D3DKMTConfigureSharedResource(param0: *const D3DKMT_CONFIGURESHARE #[inline] pub unsafe fn D3DKMTCreateAllocation(param0: *mut D3DKMT_CREATEALLOCATION) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTCreateAllocation(param0 : *mut D3DKMT_CREATEALLOCATION) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTCreateAllocation(core::mem::transmute(param0)) } + unsafe { D3DKMTCreateAllocation(param0 as _) } } #[inline] pub unsafe fn D3DKMTCreateAllocation2(param0: *mut D3DKMT_CREATEALLOCATION) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTCreateAllocation2(param0 : *mut D3DKMT_CREATEALLOCATION) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTCreateAllocation2(core::mem::transmute(param0)) } + unsafe { D3DKMTCreateAllocation2(param0 as _) } } #[inline] pub unsafe fn D3DKMTCreateContext(param0: *mut D3DKMT_CREATECONTEXT) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTCreateContext(param0 : *mut D3DKMT_CREATECONTEXT) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTCreateContext(core::mem::transmute(param0)) } + unsafe { D3DKMTCreateContext(param0 as _) } } #[inline] pub unsafe fn D3DKMTCreateContextVirtual(param0: *const D3DKMT_CREATECONTEXTVIRTUAL) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -103,32 +103,32 @@ pub unsafe fn D3DKMTCreateContextVirtual(param0: *const D3DKMT_CREATECONTEXTVIRT #[inline] pub unsafe fn D3DKMTCreateDCFromMemory(param0: *mut D3DKMT_CREATEDCFROMMEMORY) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTCreateDCFromMemory(param0 : *mut D3DKMT_CREATEDCFROMMEMORY) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTCreateDCFromMemory(core::mem::transmute(param0)) } + unsafe { D3DKMTCreateDCFromMemory(param0 as _) } } #[inline] pub unsafe fn D3DKMTCreateDevice(param0: *mut D3DKMT_CREATEDEVICE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTCreateDevice(param0 : *mut D3DKMT_CREATEDEVICE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTCreateDevice(core::mem::transmute(param0)) } + unsafe { D3DKMTCreateDevice(param0 as _) } } #[inline] pub unsafe fn D3DKMTCreateHwContext(param0: *mut D3DKMT_CREATEHWCONTEXT) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTCreateHwContext(param0 : *mut D3DKMT_CREATEHWCONTEXT) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTCreateHwContext(core::mem::transmute(param0)) } + unsafe { D3DKMTCreateHwContext(param0 as _) } } #[inline] pub unsafe fn D3DKMTCreateHwQueue(param0: *mut D3DKMT_CREATEHWQUEUE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTCreateHwQueue(param0 : *mut D3DKMT_CREATEHWQUEUE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTCreateHwQueue(core::mem::transmute(param0)) } + unsafe { D3DKMTCreateHwQueue(param0 as _) } } #[inline] pub unsafe fn D3DKMTCreateKeyedMutex(param0: *mut D3DKMT_CREATEKEYEDMUTEX) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTCreateKeyedMutex(param0 : *mut D3DKMT_CREATEKEYEDMUTEX) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTCreateKeyedMutex(core::mem::transmute(param0)) } + unsafe { D3DKMTCreateKeyedMutex(param0 as _) } } #[inline] pub unsafe fn D3DKMTCreateKeyedMutex2(param0: *mut D3DKMT_CREATEKEYEDMUTEX2) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTCreateKeyedMutex2(param0 : *mut D3DKMT_CREATEKEYEDMUTEX2) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTCreateKeyedMutex2(core::mem::transmute(param0)) } + unsafe { D3DKMTCreateKeyedMutex2(param0 as _) } } #[inline] pub unsafe fn D3DKMTCreateOutputDupl(param0: *const D3DKMT_CREATE_OUTPUTDUPL) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -138,27 +138,27 @@ pub unsafe fn D3DKMTCreateOutputDupl(param0: *const D3DKMT_CREATE_OUTPUTDUPL) -> #[inline] pub unsafe fn D3DKMTCreateOverlay(param0: *mut D3DKMT_CREATEOVERLAY) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTCreateOverlay(param0 : *mut D3DKMT_CREATEOVERLAY) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTCreateOverlay(core::mem::transmute(param0)) } + unsafe { D3DKMTCreateOverlay(param0 as _) } } #[inline] pub unsafe fn D3DKMTCreatePagingQueue(param0: *mut D3DKMT_CREATEPAGINGQUEUE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTCreatePagingQueue(param0 : *mut D3DKMT_CREATEPAGINGQUEUE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTCreatePagingQueue(core::mem::transmute(param0)) } + unsafe { D3DKMTCreatePagingQueue(param0 as _) } } #[inline] pub unsafe fn D3DKMTCreateProtectedSession(param0: *mut D3DKMT_CREATEPROTECTEDSESSION) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTCreateProtectedSession(param0 : *mut D3DKMT_CREATEPROTECTEDSESSION) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTCreateProtectedSession(core::mem::transmute(param0)) } + unsafe { D3DKMTCreateProtectedSession(param0 as _) } } #[inline] pub unsafe fn D3DKMTCreateSynchronizationObject(param0: *mut D3DKMT_CREATESYNCHRONIZATIONOBJECT) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTCreateSynchronizationObject(param0 : *mut D3DKMT_CREATESYNCHRONIZATIONOBJECT) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTCreateSynchronizationObject(core::mem::transmute(param0)) } + unsafe { D3DKMTCreateSynchronizationObject(param0 as _) } } #[inline] pub unsafe fn D3DKMTCreateSynchronizationObject2(param0: *mut D3DKMT_CREATESYNCHRONIZATIONOBJECT2) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTCreateSynchronizationObject2(param0 : *mut D3DKMT_CREATESYNCHRONIZATIONOBJECT2) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTCreateSynchronizationObject2(core::mem::transmute(param0)) } + unsafe { D3DKMTCreateSynchronizationObject2(param0 as _) } } #[inline] pub unsafe fn D3DKMTDestroyAllocation(param0: *const D3DKMT_DESTROYALLOCATION) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -214,12 +214,12 @@ pub unsafe fn D3DKMTDestroyOverlay(param0: *const D3DKMT_DESTROYOVERLAY) -> supe #[inline] pub unsafe fn D3DKMTDestroyPagingQueue(param0: *mut D3DDDI_DESTROYPAGINGQUEUE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTDestroyPagingQueue(param0 : *mut D3DDDI_DESTROYPAGINGQUEUE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTDestroyPagingQueue(core::mem::transmute(param0)) } + unsafe { D3DKMTDestroyPagingQueue(param0 as _) } } #[inline] pub unsafe fn D3DKMTDestroyProtectedSession(param0: *mut D3DKMT_DESTROYPROTECTEDSESSION) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTDestroyProtectedSession(param0 : *mut D3DKMT_DESTROYPROTECTEDSESSION) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTDestroyProtectedSession(core::mem::transmute(param0)) } + unsafe { D3DKMTDestroyProtectedSession(param0 as _) } } #[inline] pub unsafe fn D3DKMTDestroySynchronizationObject(param0: *const D3DKMT_DESTROYSYNCHRONIZATIONOBJECT) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -229,17 +229,17 @@ pub unsafe fn D3DKMTDestroySynchronizationObject(param0: *const D3DKMT_DESTROYSY #[inline] pub unsafe fn D3DKMTEnumAdapters(param0: *mut D3DKMT_ENUMADAPTERS) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTEnumAdapters(param0 : *mut D3DKMT_ENUMADAPTERS) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTEnumAdapters(core::mem::transmute(param0)) } + unsafe { D3DKMTEnumAdapters(param0 as _) } } #[inline] pub unsafe fn D3DKMTEnumAdapters2(param0: *mut D3DKMT_ENUMADAPTERS2) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTEnumAdapters2(param0 : *mut D3DKMT_ENUMADAPTERS2) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTEnumAdapters2(core::mem::transmute(param0)) } + unsafe { D3DKMTEnumAdapters2(param0 as _) } } #[inline] pub unsafe fn D3DKMTEnumAdapters3(param0: *mut D3DKMT_ENUMADAPTERS3) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("api-ms-win-dx-d3dkmt-l1-1-6.dll" "system" fn D3DKMTEnumAdapters3(param0 : *mut D3DKMT_ENUMADAPTERS3) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTEnumAdapters3(core::mem::transmute(param0)) } + unsafe { D3DKMTEnumAdapters3(param0 as _) } } #[inline] pub unsafe fn D3DKMTEscape(param0: *const D3DKMT_ESCAPE) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -249,7 +249,7 @@ pub unsafe fn D3DKMTEscape(param0: *const D3DKMT_ESCAPE) -> super::super::super: #[inline] pub unsafe fn D3DKMTEvict(param0: *mut D3DKMT_EVICT) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTEvict(param0 : *mut D3DKMT_EVICT) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTEvict(core::mem::transmute(param0)) } + unsafe { D3DKMTEvict(param0 as _) } } #[inline] pub unsafe fn D3DKMTFlipOverlay(param0: *const D3DKMT_FLIPOVERLAY) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -274,12 +274,12 @@ pub unsafe fn D3DKMTGetAllocationPriority(param0: *const D3DKMT_GETALLOCATIONPRI #[inline] pub unsafe fn D3DKMTGetContextInProcessSchedulingPriority(param0: *mut D3DKMT_GETCONTEXTINPROCESSSCHEDULINGPRIORITY) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTGetContextInProcessSchedulingPriority(param0 : *mut D3DKMT_GETCONTEXTINPROCESSSCHEDULINGPRIORITY) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTGetContextInProcessSchedulingPriority(core::mem::transmute(param0)) } + unsafe { D3DKMTGetContextInProcessSchedulingPriority(param0 as _) } } #[inline] pub unsafe fn D3DKMTGetContextSchedulingPriority(param0: *mut D3DKMT_GETCONTEXTSCHEDULINGPRIORITY) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTGetContextSchedulingPriority(param0 : *mut D3DKMT_GETCONTEXTSCHEDULINGPRIORITY) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTGetContextSchedulingPriority(core::mem::transmute(param0)) } + unsafe { D3DKMTGetContextSchedulingPriority(param0 as _) } } #[inline] pub unsafe fn D3DKMTGetDWMVerticalBlankEvent(param0: *const D3DKMT_GETVERTICALBLANKEVENT) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -289,77 +289,77 @@ pub unsafe fn D3DKMTGetDWMVerticalBlankEvent(param0: *const D3DKMT_GETVERTICALBL #[inline] pub unsafe fn D3DKMTGetDeviceState(param0: *mut D3DKMT_GETDEVICESTATE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTGetDeviceState(param0 : *mut D3DKMT_GETDEVICESTATE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTGetDeviceState(core::mem::transmute(param0)) } + unsafe { D3DKMTGetDeviceState(param0 as _) } } #[inline] pub unsafe fn D3DKMTGetDisplayModeList(param0: *mut D3DKMT_GETDISPLAYMODELIST) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTGetDisplayModeList(param0 : *mut D3DKMT_GETDISPLAYMODELIST) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTGetDisplayModeList(core::mem::transmute(param0)) } + unsafe { D3DKMTGetDisplayModeList(param0 as _) } } #[inline] pub unsafe fn D3DKMTGetMultiPlaneOverlayCaps(param0: *mut D3DKMT_GET_MULTIPLANE_OVERLAY_CAPS) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTGetMultiPlaneOverlayCaps(param0 : *mut D3DKMT_GET_MULTIPLANE_OVERLAY_CAPS) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTGetMultiPlaneOverlayCaps(core::mem::transmute(param0)) } + unsafe { D3DKMTGetMultiPlaneOverlayCaps(param0 as _) } } #[inline] pub unsafe fn D3DKMTGetMultisampleMethodList(param0: *mut D3DKMT_GETMULTISAMPLEMETHODLIST) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTGetMultisampleMethodList(param0 : *mut D3DKMT_GETMULTISAMPLEMETHODLIST) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTGetMultisampleMethodList(core::mem::transmute(param0)) } + unsafe { D3DKMTGetMultisampleMethodList(param0 as _) } } #[inline] pub unsafe fn D3DKMTGetOverlayState(param0: *mut D3DKMT_GETOVERLAYSTATE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTGetOverlayState(param0 : *mut D3DKMT_GETOVERLAYSTATE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTGetOverlayState(core::mem::transmute(param0)) } + unsafe { D3DKMTGetOverlayState(param0 as _) } } #[inline] pub unsafe fn D3DKMTGetPostCompositionCaps(param0: *mut D3DKMT_GET_POST_COMPOSITION_CAPS) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTGetPostCompositionCaps(param0 : *mut D3DKMT_GET_POST_COMPOSITION_CAPS) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTGetPostCompositionCaps(core::mem::transmute(param0)) } + unsafe { D3DKMTGetPostCompositionCaps(param0 as _) } } #[inline] pub unsafe fn D3DKMTGetPresentHistory(param0: *mut D3DKMT_GETPRESENTHISTORY) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTGetPresentHistory(param0 : *mut D3DKMT_GETPRESENTHISTORY) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTGetPresentHistory(core::mem::transmute(param0)) } + unsafe { D3DKMTGetPresentHistory(param0 as _) } } #[inline] pub unsafe fn D3DKMTGetPresentQueueEvent(hadapter: u32, param1: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTGetPresentQueueEvent(hadapter : u32, param1 : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTGetPresentQueueEvent(hadapter, core::mem::transmute(param1)) } + unsafe { D3DKMTGetPresentQueueEvent(hadapter, param1 as _) } } #[inline] pub unsafe fn D3DKMTGetProcessDeviceRemovalSupport(param0: *mut D3DKMT_GETPROCESSDEVICEREMOVALSUPPORT) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTGetProcessDeviceRemovalSupport(param0 : *mut D3DKMT_GETPROCESSDEVICEREMOVALSUPPORT) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTGetProcessDeviceRemovalSupport(core::mem::transmute(param0)) } + unsafe { D3DKMTGetProcessDeviceRemovalSupport(param0 as _) } } #[inline] 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); - unsafe { D3DKMTGetProcessSchedulingPriorityClass(param0, core::mem::transmute(param1)) } + unsafe { D3DKMTGetProcessSchedulingPriorityClass(param0, param1 as _) } } #[inline] pub unsafe fn D3DKMTGetResourcePresentPrivateDriverData(param0: *mut D3DDDI_GETRESOURCEPRESENTPRIVATEDRIVERDATA) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTGetResourcePresentPrivateDriverData(param0 : *mut D3DDDI_GETRESOURCEPRESENTPRIVATEDRIVERDATA) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTGetResourcePresentPrivateDriverData(core::mem::transmute(param0)) } + unsafe { D3DKMTGetResourcePresentPrivateDriverData(param0 as _) } } #[inline] pub unsafe fn D3DKMTGetRuntimeData(param0: *mut D3DKMT_GETRUNTIMEDATA) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTGetRuntimeData(param0 : *mut D3DKMT_GETRUNTIMEDATA) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTGetRuntimeData(core::mem::transmute(param0)) } + unsafe { D3DKMTGetRuntimeData(param0 as _) } } #[inline] pub unsafe fn D3DKMTGetScanLine(param0: *mut D3DKMT_GETSCANLINE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTGetScanLine(param0 : *mut D3DKMT_GETSCANLINE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTGetScanLine(core::mem::transmute(param0)) } + unsafe { D3DKMTGetScanLine(param0 as _) } } #[inline] pub unsafe fn D3DKMTGetSharedPrimaryHandle(param0: *mut D3DKMT_GETSHAREDPRIMARYHANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTGetSharedPrimaryHandle(param0 : *mut D3DKMT_GETSHAREDPRIMARYHANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTGetSharedPrimaryHandle(core::mem::transmute(param0)) } + unsafe { D3DKMTGetSharedPrimaryHandle(param0 as _) } } #[inline] pub unsafe fn D3DKMTGetSharedResourceAdapterLuid(param0: *mut D3DKMT_GETSHAREDRESOURCEADAPTERLUID) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTGetSharedResourceAdapterLuid(param0 : *mut D3DKMT_GETSHAREDRESOURCEADAPTERLUID) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTGetSharedResourceAdapterLuid(core::mem::transmute(param0)) } + unsafe { D3DKMTGetSharedResourceAdapterLuid(param0 as _) } } #[inline] pub unsafe fn D3DKMTInvalidateActiveVidPn(param0: *const D3DKMT_INVALIDATEACTIVEVIDPN) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -374,22 +374,22 @@ pub unsafe fn D3DKMTInvalidateCache(param0: *const D3DKMT_INVALIDATECACHE) -> su #[inline] pub unsafe fn D3DKMTLock(param0: *mut D3DKMT_LOCK) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTLock(param0 : *mut D3DKMT_LOCK) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTLock(core::mem::transmute(param0)) } + unsafe { D3DKMTLock(param0 as _) } } #[inline] pub unsafe fn D3DKMTLock2(param0: *mut D3DKMT_LOCK2) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTLock2(param0 : *mut D3DKMT_LOCK2) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTLock2(core::mem::transmute(param0)) } + unsafe { D3DKMTLock2(param0 as _) } } #[inline] pub unsafe fn D3DKMTMakeResident(param0: *mut D3DDDI_MAKERESIDENT) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTMakeResident(param0 : *mut D3DDDI_MAKERESIDENT) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTMakeResident(core::mem::transmute(param0)) } + unsafe { D3DKMTMakeResident(param0 as _) } } #[inline] pub unsafe fn D3DKMTMapGpuVirtualAddress(param0: *mut D3DDDI_MAPGPUVIRTUALADDRESS) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTMapGpuVirtualAddress(param0 : *mut D3DDDI_MAPGPUVIRTUALADDRESS) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTMapGpuVirtualAddress(core::mem::transmute(param0)) } + unsafe { D3DKMTMapGpuVirtualAddress(param0 as _) } } #[inline] pub unsafe fn D3DKMTMarkDeviceAsError(param0: *const D3DKMT_MARKDEVICEASERROR) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -404,100 +404,100 @@ pub unsafe fn D3DKMTOfferAllocations(param0: *const D3DKMT_OFFERALLOCATIONS) -> #[inline] pub unsafe fn D3DKMTOpenAdapterFromDeviceName(param0: *mut D3DKMT_OPENADAPTERFROMDEVICENAME) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTOpenAdapterFromDeviceName(param0 : *mut D3DKMT_OPENADAPTERFROMDEVICENAME) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTOpenAdapterFromDeviceName(core::mem::transmute(param0)) } + unsafe { D3DKMTOpenAdapterFromDeviceName(param0 as _) } } #[inline] pub unsafe fn D3DKMTOpenAdapterFromGdiDisplayName(param0: *mut D3DKMT_OPENADAPTERFROMGDIDISPLAYNAME) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTOpenAdapterFromGdiDisplayName(param0 : *mut D3DKMT_OPENADAPTERFROMGDIDISPLAYNAME) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTOpenAdapterFromGdiDisplayName(core::mem::transmute(param0)) } + unsafe { D3DKMTOpenAdapterFromGdiDisplayName(param0 as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn D3DKMTOpenAdapterFromHdc(param0: *mut D3DKMT_OPENADAPTERFROMHDC) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTOpenAdapterFromHdc(param0 : *mut D3DKMT_OPENADAPTERFROMHDC) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTOpenAdapterFromHdc(core::mem::transmute(param0)) } + unsafe { D3DKMTOpenAdapterFromHdc(param0 as _) } } #[inline] pub unsafe fn D3DKMTOpenAdapterFromLuid(param0: *mut D3DKMT_OPENADAPTERFROMLUID) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTOpenAdapterFromLuid(param0 : *mut D3DKMT_OPENADAPTERFROMLUID) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTOpenAdapterFromLuid(core::mem::transmute(param0)) } + unsafe { D3DKMTOpenAdapterFromLuid(param0 as _) } } #[inline] pub unsafe fn D3DKMTOpenKeyedMutex(param0: *mut D3DKMT_OPENKEYEDMUTEX) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTOpenKeyedMutex(param0 : *mut D3DKMT_OPENKEYEDMUTEX) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTOpenKeyedMutex(core::mem::transmute(param0)) } + unsafe { D3DKMTOpenKeyedMutex(param0 as _) } } #[inline] pub unsafe fn D3DKMTOpenKeyedMutex2(param0: *mut D3DKMT_OPENKEYEDMUTEX2) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTOpenKeyedMutex2(param0 : *mut D3DKMT_OPENKEYEDMUTEX2) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTOpenKeyedMutex2(core::mem::transmute(param0)) } + unsafe { D3DKMTOpenKeyedMutex2(param0 as _) } } #[inline] pub unsafe fn D3DKMTOpenKeyedMutexFromNtHandle(param0: *mut D3DKMT_OPENKEYEDMUTEXFROMNTHANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTOpenKeyedMutexFromNtHandle(param0 : *mut D3DKMT_OPENKEYEDMUTEXFROMNTHANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTOpenKeyedMutexFromNtHandle(core::mem::transmute(param0)) } + unsafe { D3DKMTOpenKeyedMutexFromNtHandle(param0 as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn D3DKMTOpenNtHandleFromName(param0: *mut D3DKMT_OPENNTHANDLEFROMNAME) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTOpenNtHandleFromName(param0 : *mut D3DKMT_OPENNTHANDLEFROMNAME) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTOpenNtHandleFromName(core::mem::transmute(param0)) } + unsafe { D3DKMTOpenNtHandleFromName(param0 as _) } } #[inline] pub unsafe fn D3DKMTOpenProtectedSessionFromNtHandle(param0: *mut D3DKMT_OPENPROTECTEDSESSIONFROMNTHANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTOpenProtectedSessionFromNtHandle(param0 : *mut D3DKMT_OPENPROTECTEDSESSIONFROMNTHANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTOpenProtectedSessionFromNtHandle(core::mem::transmute(param0)) } + unsafe { D3DKMTOpenProtectedSessionFromNtHandle(param0 as _) } } #[inline] pub unsafe fn D3DKMTOpenResource(param0: *mut D3DKMT_OPENRESOURCE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTOpenResource(param0 : *mut D3DKMT_OPENRESOURCE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTOpenResource(core::mem::transmute(param0)) } + unsafe { D3DKMTOpenResource(param0 as _) } } #[inline] pub unsafe fn D3DKMTOpenResource2(param0: *mut D3DKMT_OPENRESOURCE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTOpenResource2(param0 : *mut D3DKMT_OPENRESOURCE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTOpenResource2(core::mem::transmute(param0)) } + unsafe { D3DKMTOpenResource2(param0 as _) } } #[inline] pub unsafe fn D3DKMTOpenResourceFromNtHandle(param0: *mut D3DKMT_OPENRESOURCEFROMNTHANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTOpenResourceFromNtHandle(param0 : *mut D3DKMT_OPENRESOURCEFROMNTHANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTOpenResourceFromNtHandle(core::mem::transmute(param0)) } + unsafe { D3DKMTOpenResourceFromNtHandle(param0 as _) } } #[inline] pub unsafe fn D3DKMTOpenSyncObjectFromNtHandle(param0: *mut D3DKMT_OPENSYNCOBJECTFROMNTHANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTOpenSyncObjectFromNtHandle(param0 : *mut D3DKMT_OPENSYNCOBJECTFROMNTHANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTOpenSyncObjectFromNtHandle(core::mem::transmute(param0)) } + unsafe { D3DKMTOpenSyncObjectFromNtHandle(param0 as _) } } #[inline] pub unsafe fn D3DKMTOpenSyncObjectFromNtHandle2(param0: *mut D3DKMT_OPENSYNCOBJECTFROMNTHANDLE2) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTOpenSyncObjectFromNtHandle2(param0 : *mut D3DKMT_OPENSYNCOBJECTFROMNTHANDLE2) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTOpenSyncObjectFromNtHandle2(core::mem::transmute(param0)) } + unsafe { D3DKMTOpenSyncObjectFromNtHandle2(param0 as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn D3DKMTOpenSyncObjectNtHandleFromName(param0: *mut D3DKMT_OPENSYNCOBJECTNTHANDLEFROMNAME) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTOpenSyncObjectNtHandleFromName(param0 : *mut D3DKMT_OPENSYNCOBJECTNTHANDLEFROMNAME) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTOpenSyncObjectNtHandleFromName(core::mem::transmute(param0)) } + unsafe { D3DKMTOpenSyncObjectNtHandleFromName(param0 as _) } } #[inline] pub unsafe fn D3DKMTOpenSynchronizationObject(param0: *mut D3DKMT_OPENSYNCHRONIZATIONOBJECT) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTOpenSynchronizationObject(param0 : *mut D3DKMT_OPENSYNCHRONIZATIONOBJECT) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTOpenSynchronizationObject(core::mem::transmute(param0)) } + unsafe { D3DKMTOpenSynchronizationObject(param0 as _) } } #[inline] pub unsafe fn D3DKMTOutputDuplGetFrameInfo(param0: *mut D3DKMT_OUTPUTDUPL_GET_FRAMEINFO) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTOutputDuplGetFrameInfo(param0 : *mut D3DKMT_OUTPUTDUPL_GET_FRAMEINFO) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTOutputDuplGetFrameInfo(core::mem::transmute(param0)) } + unsafe { D3DKMTOutputDuplGetFrameInfo(param0 as _) } } #[inline] pub unsafe fn D3DKMTOutputDuplGetMetaData(param0: *mut D3DKMT_OUTPUTDUPL_METADATA) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTOutputDuplGetMetaData(param0 : *mut D3DKMT_OUTPUTDUPL_METADATA) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTOutputDuplGetMetaData(core::mem::transmute(param0)) } + unsafe { D3DKMTOutputDuplGetMetaData(param0 as _) } } #[inline] pub unsafe fn D3DKMTOutputDuplGetPointerShapeData(param0: *mut D3DKMT_OUTPUTDUPL_GET_POINTER_SHAPE_DATA) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTOutputDuplGetPointerShapeData(param0 : *mut D3DKMT_OUTPUTDUPL_GET_POINTER_SHAPE_DATA) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTOutputDuplGetPointerShapeData(core::mem::transmute(param0)) } + unsafe { D3DKMTOutputDuplGetPointerShapeData(param0 as _) } } #[inline] pub unsafe fn D3DKMTOutputDuplPresent(param0: *const D3DKMT_OUTPUTDUPLPRESENT) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -512,7 +512,7 @@ pub unsafe fn D3DKMTOutputDuplPresentToHwQueue(param0: *const D3DKMT_OUTPUTDUPLP #[inline] pub unsafe fn D3DKMTOutputDuplReleaseFrame(param0: *mut D3DKMT_OUTPUTDUPL_RELEASE_FRAME) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTOutputDuplReleaseFrame(param0 : *mut D3DKMT_OUTPUTDUPL_RELEASE_FRAME) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTOutputDuplReleaseFrame(core::mem::transmute(param0)) } + unsafe { D3DKMTOutputDuplReleaseFrame(param0 as _) } } #[inline] pub unsafe fn D3DKMTPollDisplayChildren(param0: *const D3DKMT_POLLDISPLAYCHILDREN) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -522,7 +522,7 @@ pub unsafe fn D3DKMTPollDisplayChildren(param0: *const D3DKMT_POLLDISPLAYCHILDRE #[inline] pub unsafe fn D3DKMTPresent(param0: *mut D3DKMT_PRESENT) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTPresent(param0 : *mut D3DKMT_PRESENT) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTPresent(core::mem::transmute(param0)) } + unsafe { D3DKMTPresent(param0 as _) } } #[inline] pub unsafe fn D3DKMTPresentMultiPlaneOverlay(param0: *const D3DKMT_PRESENT_MULTIPLANE_OVERLAY) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -547,7 +547,7 @@ pub unsafe fn D3DKMTPresentRedirected(param0: *const D3DKMT_PRESENT_REDIRECTED) #[inline] pub unsafe fn D3DKMTQueryAdapterInfo(param0: *mut D3DKMT_QUERYADAPTERINFO) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTQueryAdapterInfo(param0 : *mut D3DKMT_QUERYADAPTERINFO) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTQueryAdapterInfo(core::mem::transmute(param0)) } + unsafe { D3DKMTQueryAdapterInfo(param0 as _) } } #[inline] pub unsafe fn D3DKMTQueryAllocationResidency(param0: *const D3DKMT_QUERYALLOCATIONRESIDENCY) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -557,42 +557,42 @@ pub unsafe fn D3DKMTQueryAllocationResidency(param0: *const D3DKMT_QUERYALLOCATI #[inline] pub unsafe fn D3DKMTQueryClockCalibration(param0: *mut D3DKMT_QUERYCLOCKCALIBRATION) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTQueryClockCalibration(param0 : *mut D3DKMT_QUERYCLOCKCALIBRATION) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTQueryClockCalibration(core::mem::transmute(param0)) } + unsafe { D3DKMTQueryClockCalibration(param0 as _) } } #[inline] pub unsafe fn D3DKMTQueryFSEBlock(param0: *mut D3DKMT_QUERYFSEBLOCK) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTQueryFSEBlock(param0 : *mut D3DKMT_QUERYFSEBLOCK) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTQueryFSEBlock(core::mem::transmute(param0)) } + unsafe { D3DKMTQueryFSEBlock(param0 as _) } } #[inline] pub unsafe fn D3DKMTQueryProcessOfferInfo(param0: *mut D3DKMT_QUERYPROCESSOFFERINFO) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTQueryProcessOfferInfo(param0 : *mut D3DKMT_QUERYPROCESSOFFERINFO) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTQueryProcessOfferInfo(core::mem::transmute(param0)) } + unsafe { D3DKMTQueryProcessOfferInfo(param0 as _) } } #[inline] pub unsafe fn D3DKMTQueryProtectedSessionInfoFromNtHandle(param0: *mut D3DKMT_QUERYPROTECTEDSESSIONINFOFROMNTHANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTQueryProtectedSessionInfoFromNtHandle(param0 : *mut D3DKMT_QUERYPROTECTEDSESSIONINFOFROMNTHANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTQueryProtectedSessionInfoFromNtHandle(core::mem::transmute(param0)) } + unsafe { D3DKMTQueryProtectedSessionInfoFromNtHandle(param0 as _) } } #[inline] pub unsafe fn D3DKMTQueryProtectedSessionStatus(param0: *mut D3DKMT_QUERYPROTECTEDSESSIONSTATUS) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTQueryProtectedSessionStatus(param0 : *mut D3DKMT_QUERYPROTECTEDSESSIONSTATUS) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTQueryProtectedSessionStatus(core::mem::transmute(param0)) } + unsafe { D3DKMTQueryProtectedSessionStatus(param0 as _) } } #[inline] pub unsafe fn D3DKMTQueryRemoteVidPnSourceFromGdiDisplayName(param0: *mut D3DKMT_QUERYREMOTEVIDPNSOURCEFROMGDIDISPLAYNAME) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTQueryRemoteVidPnSourceFromGdiDisplayName(param0 : *mut D3DKMT_QUERYREMOTEVIDPNSOURCEFROMGDIDISPLAYNAME) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTQueryRemoteVidPnSourceFromGdiDisplayName(core::mem::transmute(param0)) } + unsafe { D3DKMTQueryRemoteVidPnSourceFromGdiDisplayName(param0 as _) } } #[inline] pub unsafe fn D3DKMTQueryResourceInfo(param0: *mut D3DKMT_QUERYRESOURCEINFO) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTQueryResourceInfo(param0 : *mut D3DKMT_QUERYRESOURCEINFO) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTQueryResourceInfo(core::mem::transmute(param0)) } + unsafe { D3DKMTQueryResourceInfo(param0 as _) } } #[inline] pub unsafe fn D3DKMTQueryResourceInfoFromNtHandle(param0: *mut D3DKMT_QUERYRESOURCEINFOFROMNTHANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTQueryResourceInfoFromNtHandle(param0 : *mut D3DKMT_QUERYRESOURCEINFOFROMNTHANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTQueryResourceInfoFromNtHandle(core::mem::transmute(param0)) } + unsafe { D3DKMTQueryResourceInfoFromNtHandle(param0 as _) } } #[inline] pub unsafe fn D3DKMTQueryStatistics(param0: *const D3DKMT_QUERYSTATISTICS) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -602,27 +602,27 @@ pub unsafe fn D3DKMTQueryStatistics(param0: *const D3DKMT_QUERYSTATISTICS) -> su #[inline] pub unsafe fn D3DKMTQueryVidPnExclusiveOwnership(param0: *mut D3DKMT_QUERYVIDPNEXCLUSIVEOWNERSHIP) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTQueryVidPnExclusiveOwnership(param0 : *mut D3DKMT_QUERYVIDPNEXCLUSIVEOWNERSHIP) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTQueryVidPnExclusiveOwnership(core::mem::transmute(param0)) } + unsafe { D3DKMTQueryVidPnExclusiveOwnership(param0 as _) } } #[inline] pub unsafe fn D3DKMTQueryVideoMemoryInfo(param0: *mut D3DKMT_QUERYVIDEOMEMORYINFO) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTQueryVideoMemoryInfo(param0 : *mut D3DKMT_QUERYVIDEOMEMORYINFO) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTQueryVideoMemoryInfo(core::mem::transmute(param0)) } + unsafe { D3DKMTQueryVideoMemoryInfo(param0 as _) } } #[inline] pub unsafe fn D3DKMTReclaimAllocations(param0: *mut D3DKMT_RECLAIMALLOCATIONS) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTReclaimAllocations(param0 : *mut D3DKMT_RECLAIMALLOCATIONS) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTReclaimAllocations(core::mem::transmute(param0)) } + unsafe { D3DKMTReclaimAllocations(param0 as _) } } #[inline] pub unsafe fn D3DKMTReclaimAllocations2(param0: *mut D3DKMT_RECLAIMALLOCATIONS2) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTReclaimAllocations2(param0 : *mut D3DKMT_RECLAIMALLOCATIONS2) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTReclaimAllocations2(core::mem::transmute(param0)) } + unsafe { D3DKMTReclaimAllocations2(param0 as _) } } #[inline] pub unsafe fn D3DKMTRegisterTrimNotification(param0: *mut D3DKMT_REGISTERTRIMNOTIFICATION) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTRegisterTrimNotification(param0 : *mut D3DKMT_REGISTERTRIMNOTIFICATION) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTRegisterTrimNotification(core::mem::transmute(param0)) } + unsafe { D3DKMTRegisterTrimNotification(param0 as _) } } #[inline] pub unsafe fn D3DKMTRegisterVailProcess(param0: *const windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -632,12 +632,12 @@ pub unsafe fn D3DKMTRegisterVailProcess(param0: *const windows_core::GUID) -> su #[inline] pub unsafe fn D3DKMTReleaseKeyedMutex(param0: *mut D3DKMT_RELEASEKEYEDMUTEX) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTReleaseKeyedMutex(param0 : *mut D3DKMT_RELEASEKEYEDMUTEX) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTReleaseKeyedMutex(core::mem::transmute(param0)) } + unsafe { D3DKMTReleaseKeyedMutex(param0 as _) } } #[inline] pub unsafe fn D3DKMTReleaseKeyedMutex2(param0: *mut D3DKMT_RELEASEKEYEDMUTEX2) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTReleaseKeyedMutex2(param0 : *mut D3DKMT_RELEASEKEYEDMUTEX2) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTReleaseKeyedMutex2(core::mem::transmute(param0)) } + unsafe { D3DKMTReleaseKeyedMutex2(param0 as _) } } #[inline] pub unsafe fn D3DKMTReleaseProcessVidPnSourceOwners(param0: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -647,12 +647,12 @@ pub unsafe fn D3DKMTReleaseProcessVidPnSourceOwners(param0: super::super::super: #[inline] pub unsafe fn D3DKMTRender(param0: *mut D3DKMT_RENDER) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTRender(param0 : *mut D3DKMT_RENDER) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTRender(core::mem::transmute(param0)) } + unsafe { D3DKMTRender(param0 as _) } } #[inline] pub unsafe fn D3DKMTReserveGpuVirtualAddress(param0: *mut D3DDDI_RESERVEGPUVIRTUALADDRESS) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTReserveGpuVirtualAddress(param0 : *mut D3DDDI_RESERVEGPUVIRTUALADDRESS) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTReserveGpuVirtualAddress(core::mem::transmute(param0)) } + unsafe { D3DKMTReserveGpuVirtualAddress(param0 as _) } } #[inline] pub unsafe fn D3DKMTSetAllocationPriority(param0: *const D3DKMT_SETALLOCATIONPRIORITY) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -672,7 +672,7 @@ pub unsafe fn D3DKMTSetContextSchedulingPriority(param0: *const D3DKMT_SETCONTEX #[inline] pub unsafe fn D3DKMTSetDisplayMode(param0: *mut D3DKMT_SETDISPLAYMODE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTSetDisplayMode(param0 : *mut D3DKMT_SETDISPLAYMODE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTSetDisplayMode(core::mem::transmute(param0)) } + unsafe { D3DKMTSetDisplayMode(param0 as _) } } #[inline] pub unsafe fn D3DKMTSetDisplayPrivateDriverFormat(param0: *const D3DKMT_SETDISPLAYPRIVATEDRIVERFORMAT) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -743,7 +743,7 @@ pub unsafe fn D3DKMTSetVidPnSourceOwner2(param0: *const D3DKMT_SETVIDPNSOURCEOWN #[inline] pub unsafe fn D3DKMTShareObjects(hobjects: &[u32], pobjectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, dwdesiredaccess: u32, phsharednthandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTShareObjects(cobjects : u32, hobjects : *const u32, pobjectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, dwdesiredaccess : u32, phsharednthandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTShareObjects(hobjects.len().try_into().unwrap(), core::mem::transmute(hobjects.as_ptr()), pobjectattributes, dwdesiredaccess, core::mem::transmute(phsharednthandle)) } + unsafe { D3DKMTShareObjects(hobjects.len().try_into().unwrap(), core::mem::transmute(hobjects.as_ptr()), pobjectattributes, dwdesiredaccess, phsharednthandle as _) } } #[inline] pub unsafe fn D3DKMTSharedPrimaryLockNotification(param0: *const D3DKMT_SHAREDPRIMARYLOCKNOTIFICATION) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -798,7 +798,7 @@ pub unsafe fn D3DKMTSubmitPresentBltToHwQueue(param0: *const D3DKMT_SUBMITPRESEN #[inline] pub unsafe fn D3DKMTSubmitPresentToHwQueue(param0: *mut D3DKMT_SUBMITPRESENTTOHWQUEUE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("api-ms-win-dx-d3dkmt-l1-1-4.dll" "system" fn D3DKMTSubmitPresentToHwQueue(param0 : *mut D3DKMT_SUBMITPRESENTTOHWQUEUE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTSubmitPresentToHwQueue(core::mem::transmute(param0)) } + unsafe { D3DKMTSubmitPresentToHwQueue(param0 as _) } } #[inline] pub unsafe fn D3DKMTSubmitSignalSyncObjectsToHwQueue(param0: *const D3DKMT_SUBMITSIGNALSYNCOBJECTSTOHWQUEUE) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -813,7 +813,7 @@ pub unsafe fn D3DKMTSubmitWaitForSyncObjectsToHwQueue(param0: *const D3DKMT_SUBM #[inline] pub unsafe fn D3DKMTTrimProcessCommitment(param0: *mut D3DKMT_TRIMPROCESSCOMMITMENT) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTTrimProcessCommitment(param0 : *mut D3DKMT_TRIMPROCESSCOMMITMENT) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTTrimProcessCommitment(core::mem::transmute(param0)) } + unsafe { D3DKMTTrimProcessCommitment(param0 as _) } } #[inline] pub unsafe fn D3DKMTUnlock(param0: *const D3DKMT_UNLOCK) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -828,12 +828,12 @@ pub unsafe fn D3DKMTUnlock2(param0: *const D3DKMT_UNLOCK2) -> super::super::supe #[inline] pub unsafe fn D3DKMTUnregisterTrimNotification(param0: *mut D3DKMT_UNREGISTERTRIMNOTIFICATION) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTUnregisterTrimNotification(param0 : *mut D3DKMT_UNREGISTERTRIMNOTIFICATION) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTUnregisterTrimNotification(core::mem::transmute(param0)) } + unsafe { D3DKMTUnregisterTrimNotification(param0 as _) } } #[inline] pub unsafe fn D3DKMTUpdateAllocationProperty(param0: *mut D3DDDI_UPDATEALLOCPROPERTY) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTUpdateAllocationProperty(param0 : *mut D3DDDI_UPDATEALLOCPROPERTY) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { D3DKMTUpdateAllocationProperty(core::mem::transmute(param0)) } + unsafe { D3DKMTUpdateAllocationProperty(param0 as _) } } #[inline] pub unsafe fn D3DKMTUpdateGpuVirtualAddress(param0: *const D3DKMT_UPDATEGPUVIRTUALADDRESS) -> 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 a45338904b..46dfd064df 100644 --- a/crates/libs/windows/src/Windows/Wdk/NetworkManagement/Ndis/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/NetworkManagement/Ndis/mod.rs @@ -1,12 +1,12 @@ #[inline] pub unsafe fn NdisAcquireReadWriteLock(lock: *mut NDIS_RW_LOCK, fwrite: bool, lockstate: *mut LOCK_STATE) { windows_targets::link!("ndis.sys" "system" fn NdisAcquireReadWriteLock(lock : *mut NDIS_RW_LOCK, fwrite : bool, lockstate : *mut LOCK_STATE)); - unsafe { NdisAcquireReadWriteLock(core::mem::transmute(lock), fwrite, core::mem::transmute(lockstate)) } + unsafe { NdisAcquireReadWriteLock(lock as _, fwrite, lockstate as _) } } #[inline] pub unsafe fn NdisAllocateMemoryWithTag(virtualaddress: *mut *mut core::ffi::c_void, length: u32, tag: u32) -> i32 { windows_targets::link!("ndis.sys" "system" fn NdisAllocateMemoryWithTag(virtualaddress : *mut *mut core::ffi::c_void, length : u32, tag : u32) -> i32); - unsafe { NdisAllocateMemoryWithTag(core::mem::transmute(virtualaddress), length, tag) } + unsafe { NdisAllocateMemoryWithTag(virtualaddress as _, length, tag) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_System_Kernel"))] #[inline] @@ -21,7 +21,7 @@ pub unsafe fn NdisCancelTimer(timer: *const NDIS_TIMER) -> bool { #[inline] pub unsafe fn NdisClAddParty(ndisvchandle: *const core::ffi::c_void, protocolpartycontext: *const core::ffi::c_void, callparameters: *mut CO_CALL_PARAMETERS, ndispartyhandle: *mut *mut core::ffi::c_void) -> i32 { windows_targets::link!("ndis.sys" "system" fn NdisClAddParty(ndisvchandle : *const core::ffi::c_void, protocolpartycontext : *const core::ffi::c_void, callparameters : *mut CO_CALL_PARAMETERS, ndispartyhandle : *mut *mut core::ffi::c_void) -> i32); - unsafe { NdisClAddParty(ndisvchandle, protocolpartycontext, core::mem::transmute(callparameters), core::mem::transmute(ndispartyhandle)) } + unsafe { NdisClAddParty(ndisvchandle, protocolpartycontext, callparameters as _, ndispartyhandle as _) } } #[inline] pub unsafe fn NdisClCloseAddressFamily(ndisafhandle: *const core::ffi::c_void) -> i32 { @@ -31,7 +31,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); - unsafe { NdisClCloseCall(ndisvchandle, core::mem::transmute(ndispartyhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), size) } + unsafe { NdisClCloseCall(ndisvchandle, ndispartyhandle.unwrap_or(core::mem::zeroed()) as _, buffer.unwrap_or(core::mem::zeroed()) as _, size) } } #[inline] pub unsafe fn NdisClDeregisterSap(ndissaphandle: *const core::ffi::c_void) -> i32 { @@ -41,12 +41,12 @@ pub unsafe fn NdisClDeregisterSap(ndissaphandle: *const core::ffi::c_void) -> i3 #[inline] pub unsafe fn NdisClDropParty(ndispartyhandle: *const core::ffi::c_void, buffer: Option<*const core::ffi::c_void>, size: 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); - unsafe { NdisClDropParty(ndispartyhandle, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(size.unwrap_or(core::mem::zeroed()))) } + unsafe { NdisClDropParty(ndispartyhandle, buffer.unwrap_or(core::mem::zeroed()) as _, size.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NdisClGetProtocolVcContextFromTapiCallId(tapicallid: super::super::super::Win32::Foundation::UNICODE_STRING, protocolvccontext: *mut *mut core::ffi::c_void) -> i32 { windows_targets::link!("ndis.sys" "system" fn NdisClGetProtocolVcContextFromTapiCallId(tapicallid : super::super::super::Win32::Foundation:: UNICODE_STRING, protocolvccontext : *mut *mut core::ffi::c_void) -> i32); - unsafe { NdisClGetProtocolVcContextFromTapiCallId(core::mem::transmute(tapicallid), core::mem::transmute(protocolvccontext)) } + unsafe { NdisClGetProtocolVcContextFromTapiCallId(core::mem::transmute(tapicallid), protocolvccontext as _) } } #[inline] pub unsafe fn NdisClIncomingCallComplete(status: i32, ndisvchandle: *const core::ffi::c_void, callparameters: *const CO_CALL_PARAMETERS) { @@ -56,7 +56,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); - unsafe { NdisClMakeCall(ndisvchandle, core::mem::transmute(callparameters), core::mem::transmute(protocolpartycontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(ndispartyhandle.unwrap_or(core::mem::zeroed()))) } + unsafe { NdisClMakeCall(ndisvchandle, callparameters as _, protocolpartycontext.unwrap_or(core::mem::zeroed()) as _, ndispartyhandle.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NdisClModifyCallQoS(ndisvchandle: *const core::ffi::c_void, callparameters: *const CO_CALL_PARAMETERS) -> i32 { @@ -66,7 +66,7 @@ pub unsafe fn NdisClModifyCallQoS(ndisvchandle: *const core::ffi::c_void, callpa #[inline] pub unsafe fn NdisClRegisterSap(ndisafhandle: *const core::ffi::c_void, protocolsapcontext: *const core::ffi::c_void, sap: *const CO_SAP, ndissaphandle: *mut *mut core::ffi::c_void) -> i32 { windows_targets::link!("ndis.sys" "system" fn NdisClRegisterSap(ndisafhandle : *const core::ffi::c_void, protocolsapcontext : *const core::ffi::c_void, sap : *const CO_SAP, ndissaphandle : *mut *mut core::ffi::c_void) -> i32); - unsafe { NdisClRegisterSap(ndisafhandle, protocolsapcontext, sap, core::mem::transmute(ndissaphandle)) } + unsafe { NdisClRegisterSap(ndisafhandle, protocolsapcontext, sap, ndissaphandle as _) } } #[inline] pub unsafe fn NdisCloseConfiguration(configurationhandle: *const core::ffi::c_void) { @@ -81,12 +81,12 @@ pub unsafe fn NdisCloseFile(filehandle: *const core::ffi::c_void) { #[inline] pub unsafe fn NdisCmActivateVc(ndisvchandle: *const core::ffi::c_void, callparameters: *mut CO_CALL_PARAMETERS) -> i32 { windows_targets::link!("ndis.sys" "system" fn NdisCmActivateVc(ndisvchandle : *const core::ffi::c_void, callparameters : *mut CO_CALL_PARAMETERS) -> i32); - unsafe { NdisCmActivateVc(ndisvchandle, core::mem::transmute(callparameters)) } + unsafe { NdisCmActivateVc(ndisvchandle, callparameters as _) } } #[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)); - unsafe { NdisCmAddPartyComplete(status, ndispartyhandle, core::mem::transmute(callmgrpartycontext.unwrap_or(core::mem::zeroed())), callparameters) } + unsafe { NdisCmAddPartyComplete(status, ndispartyhandle, callmgrpartycontext.unwrap_or(core::mem::zeroed()) as _, callparameters) } } #[inline] pub unsafe fn NdisCmCloseAddressFamilyComplete(status: i32, ndisafhandle: *const core::ffi::c_void) { @@ -96,7 +96,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)); - unsafe { NdisCmCloseCallComplete(status, ndisvchandle, core::mem::transmute(ndispartyhandle.unwrap_or(core::mem::zeroed()))) } + unsafe { NdisCmCloseCallComplete(status, ndisvchandle, ndispartyhandle.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NdisCmDeactivateVc(ndisvchandle: *const core::ffi::c_void) -> i32 { @@ -126,12 +126,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)); - unsafe { NdisCmDispatchIncomingCloseCall(closestatus, ndisvchandle, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), size) } + unsafe { NdisCmDispatchIncomingCloseCall(closestatus, ndisvchandle, buffer.unwrap_or(core::mem::zeroed()) as _, 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)); - unsafe { NdisCmDispatchIncomingDropParty(dropstatus, ndispartyhandle, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), size) } + unsafe { NdisCmDispatchIncomingDropParty(dropstatus, ndispartyhandle, buffer.unwrap_or(core::mem::zeroed()) as _, size) } } #[inline] pub unsafe fn NdisCmDropPartyComplete(status: i32, ndispartyhandle: *const core::ffi::c_void) { @@ -141,7 +141,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)); - unsafe { NdisCmMakeCallComplete(status, ndisvchandle, core::mem::transmute(ndispartyhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(callmgrpartycontext.unwrap_or(core::mem::zeroed())), callparameters) } + unsafe { NdisCmMakeCallComplete(status, ndisvchandle, ndispartyhandle.unwrap_or(core::mem::zeroed()) as _, callmgrpartycontext.unwrap_or(core::mem::zeroed()) as _, callparameters) } } #[inline] pub unsafe fn NdisCmModifyCallQoSComplete(status: i32, ndisvchandle: *const core::ffi::c_void, callparameters: *const CO_CALL_PARAMETERS) { @@ -161,12 +161,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); - unsafe { NdisCoAssignInstanceName(ndisvchandle, baseinstancename, core::mem::transmute(vcinstancename.unwrap_or(core::mem::zeroed()))) } + unsafe { NdisCoAssignInstanceName(ndisvchandle, baseinstancename, vcinstancename.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { NdisCoCreateVc(ndisbindinghandle, core::mem::transmute(ndisafhandle.unwrap_or(core::mem::zeroed())), protocolvccontext, core::mem::transmute(ndisvchandle)) } + unsafe { NdisCoCreateVc(ndisbindinghandle, ndisafhandle.unwrap_or(core::mem::zeroed()) as _, protocolvccontext, ndisvchandle as _) } } #[inline] pub unsafe fn NdisCoDeleteVc(ndisvchandle: *const core::ffi::c_void) -> i32 { @@ -176,19 +176,19 @@ pub unsafe fn NdisCoDeleteVc(ndisvchandle: *const core::ffi::c_void) -> i32 { #[inline] pub unsafe fn NdisCoGetTapiCallId(ndisvchandle: *const core::ffi::c_void, tapicallid: *mut VAR_STRING) -> i32 { windows_targets::link!("ndis.sys" "system" fn NdisCoGetTapiCallId(ndisvchandle : *const core::ffi::c_void, tapicallid : *mut VAR_STRING) -> i32); - unsafe { NdisCoGetTapiCallId(ndisvchandle, core::mem::transmute(tapicallid)) } + unsafe { NdisCoGetTapiCallId(ndisvchandle, tapicallid as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn NdisCompleteDmaTransfer(status: *mut i32, ndisdmahandle: *mut core::ffi::c_void, buffer: *mut super::super::Foundation::MDL, offset: u32, length: u32, writetodevice: bool) { windows_targets::link!("ndis.sys" "system" fn NdisCompleteDmaTransfer(status : *mut i32, ndisdmahandle : *mut core::ffi::c_void, buffer : *mut super::super::Foundation:: MDL, offset : u32, length : u32, writetodevice : bool)); - unsafe { NdisCompleteDmaTransfer(core::mem::transmute(status), core::mem::transmute(ndisdmahandle), core::mem::transmute(buffer), offset, length, writetodevice) } + unsafe { NdisCompleteDmaTransfer(status as _, ndisdmahandle as _, buffer as _, offset, length, writetodevice) } } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn NdisCopyBuffer(status: *mut i32, buffer: *mut *mut super::super::Foundation::MDL, poolhandle: *const core::ffi::c_void, memorydescriptor: *const core::ffi::c_void, offset: u32, length: u32) { windows_targets::link!("ndis.sys" "system" fn NdisCopyBuffer(status : *mut i32, buffer : *mut *mut super::super::Foundation:: MDL, poolhandle : *const core::ffi::c_void, memorydescriptor : *const core::ffi::c_void, offset : u32, length : u32)); - unsafe { NdisCopyBuffer(core::mem::transmute(status), core::mem::transmute(buffer), poolhandle, memorydescriptor, offset, length) } + unsafe { NdisCopyBuffer(status as _, buffer as _, poolhandle, memorydescriptor, offset, length) } } #[inline] pub unsafe fn NdisDeregisterTdiCallBack() { @@ -208,7 +208,7 @@ pub unsafe fn NdisGeneratePartialCancelId() -> u8 { #[inline] pub unsafe fn NdisGetCurrentProcessorCounts(pidlecount: *mut u32, pkernelanduser: *mut u32, pindex: *mut u32) { windows_targets::link!("ndis.sys" "system" fn NdisGetCurrentProcessorCounts(pidlecount : *mut u32, pkernelanduser : *mut u32, pindex : *mut u32)); - unsafe { NdisGetCurrentProcessorCounts(core::mem::transmute(pidlecount), core::mem::transmute(pkernelanduser), core::mem::transmute(pindex)) } + unsafe { NdisGetCurrentProcessorCounts(pidlecount as _, pkernelanduser as _, pindex as _) } } #[inline] pub unsafe fn NdisGetCurrentProcessorCpuUsage() -> u32 { @@ -257,34 +257,34 @@ 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); - unsafe { NdisIMInitializeDeviceInstanceEx(driverhandle, driverinstance, core::mem::transmute(devicecontext.unwrap_or(core::mem::zeroed()))) } + unsafe { NdisIMInitializeDeviceInstanceEx(driverhandle, driverinstance, devicecontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn NdisInitializeEvent(event: *mut NDIS_EVENT) { windows_targets::link!("ndis.sys" "system" fn NdisInitializeEvent(event : *mut NDIS_EVENT)); - unsafe { NdisInitializeEvent(core::mem::transmute(event)) } + unsafe { NdisInitializeEvent(event as _) } } #[inline] pub unsafe fn NdisInitializeReadWriteLock(lock: *mut NDIS_RW_LOCK) { windows_targets::link!("ndis.sys" "system" fn NdisInitializeReadWriteLock(lock : *mut NDIS_RW_LOCK)); - unsafe { NdisInitializeReadWriteLock(core::mem::transmute(lock)) } + unsafe { NdisInitializeReadWriteLock(lock as _) } } #[inline] pub unsafe fn NdisInitializeString(destination: *mut super::super::super::Win32::Foundation::UNICODE_STRING, source: *const u8) { windows_targets::link!("ndis.sys" "system" fn NdisInitializeString(destination : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, source : *const u8)); - unsafe { NdisInitializeString(core::mem::transmute(destination), source) } + unsafe { NdisInitializeString(destination as _, source) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_System_Kernel"))] #[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)); - unsafe { NdisInitializeTimer(core::mem::transmute(timer), timerfunction, core::mem::transmute(functioncontext.unwrap_or(core::mem::zeroed()))) } + unsafe { NdisInitializeTimer(timer as _, timerfunction, functioncontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NdisMAllocateSharedMemory(miniportadapterhandle: *const core::ffi::c_void, length: u32, cached: bool, virtualaddress: *mut *mut core::ffi::c_void, physicaladdress: *mut i64) { windows_targets::link!("ndis.sys" "system" fn NdisMAllocateSharedMemory(miniportadapterhandle : *const core::ffi::c_void, length : u32, cached : bool, virtualaddress : *mut *mut core::ffi::c_void, physicaladdress : *mut i64)); - unsafe { NdisMAllocateSharedMemory(miniportadapterhandle, length, cached, core::mem::transmute(virtualaddress), core::mem::transmute(physicaladdress)) } + unsafe { NdisMAllocateSharedMemory(miniportadapterhandle, length, cached, virtualaddress as _, physicaladdress as _) } } #[inline] pub unsafe fn NdisMAllocateSharedMemoryAsync(miniportadapterhandle: *const core::ffi::c_void, length: u32, cached: bool, context: *const core::ffi::c_void) -> i32 { @@ -314,7 +314,7 @@ pub unsafe fn NdisMCmActivateVc(ndisvchandle: *const core::ffi::c_void, callpara #[inline] pub unsafe fn NdisMCmCreateVc(miniportadapterhandle: *const core::ffi::c_void, ndisafhandle: *const core::ffi::c_void, miniportvccontext: *const core::ffi::c_void, ndisvchandle: *mut *mut core::ffi::c_void) -> i32 { windows_targets::link!("ndis.sys" "system" fn NdisMCmCreateVc(miniportadapterhandle : *const core::ffi::c_void, ndisafhandle : *const core::ffi::c_void, miniportvccontext : *const core::ffi::c_void, ndisvchandle : *mut *mut core::ffi::c_void) -> i32); - unsafe { NdisMCmCreateVc(miniportadapterhandle, ndisafhandle, miniportvccontext, core::mem::transmute(ndisvchandle)) } + unsafe { NdisMCmCreateVc(miniportadapterhandle, ndisafhandle, miniportvccontext, ndisvchandle as _) } } #[inline] pub unsafe fn NdisMCmDeactivateVc(ndisvchandle: *const core::ffi::c_void) -> i32 { @@ -329,7 +329,7 @@ pub unsafe fn NdisMCmDeleteVc(ndisvchandle: *const core::ffi::c_void) -> i32 { #[inline] pub unsafe fn NdisMCmRegisterAddressFamily(miniportadapterhandle: *mut core::ffi::c_void, addressfamily: *mut CO_ADDRESS_FAMILY, cmcharacteristics: *mut NDIS_CALL_MANAGER_CHARACTERISTICS, sizeofcmcharacteristics: u32) -> i32 { windows_targets::link!("ndis.sys" "system" fn NdisMCmRegisterAddressFamily(miniportadapterhandle : *mut core::ffi::c_void, addressfamily : *mut CO_ADDRESS_FAMILY, cmcharacteristics : *mut NDIS_CALL_MANAGER_CHARACTERISTICS, sizeofcmcharacteristics : u32) -> i32); - unsafe { NdisMCmRegisterAddressFamily(core::mem::transmute(miniportadapterhandle), core::mem::transmute(addressfamily), core::mem::transmute(cmcharacteristics), sizeofcmcharacteristics) } + unsafe { NdisMCmRegisterAddressFamily(miniportadapterhandle as _, addressfamily as _, cmcharacteristics as _, sizeofcmcharacteristics) } } #[inline] pub unsafe fn NdisMCoActivateVcComplete(status: i32, ndisvchandle: *const core::ffi::c_void, callparameters: *const CO_CALL_PARAMETERS) { @@ -344,7 +344,7 @@ pub unsafe fn NdisMCoDeactivateVcComplete(status: i32, ndisvchandle: *const core #[inline] pub unsafe fn NdisMCreateLog(miniportadapterhandle: *const core::ffi::c_void, size: u32, loghandle: *mut *mut core::ffi::c_void) -> i32 { windows_targets::link!("ndis.sys" "system" fn NdisMCreateLog(miniportadapterhandle : *const core::ffi::c_void, size : u32, loghandle : *mut *mut core::ffi::c_void) -> i32); - unsafe { NdisMCreateLog(miniportadapterhandle, size, core::mem::transmute(loghandle)) } + unsafe { NdisMCreateLog(miniportadapterhandle, size, loghandle as _) } } #[inline] pub unsafe fn NdisMDeregisterDmaChannel(miniportdmahandle: *const core::ffi::c_void) { @@ -370,7 +370,7 @@ pub unsafe fn NdisMFreeSharedMemory(miniportadapterhandle: *const core::ffi::c_v #[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)); - unsafe { NdisMGetDeviceProperty(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()))) } + unsafe { NdisMGetDeviceProperty(miniportadapterhandle, physicaldeviceobject.unwrap_or(core::mem::zeroed()) as _, functionaldeviceobject.unwrap_or(core::mem::zeroed()) as _, nextdeviceobject.unwrap_or(core::mem::zeroed()) as _, allocatedresources.unwrap_or(core::mem::zeroed()) as _, allocatedresourcestranslated.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NdisMGetDmaAlignment(miniportadapterhandle: *const core::ffi::c_void) -> u32 { @@ -386,12 +386,12 @@ pub unsafe fn NdisMInitializeTimer(timer: *const NDIS_MINIPORT_TIMER, miniportad #[inline] pub unsafe fn NdisMMapIoSpace(virtualaddress: *mut *mut core::ffi::c_void, miniportadapterhandle: *const core::ffi::c_void, physicaladdress: i64, length: u32) -> i32 { windows_targets::link!("ndis.sys" "system" fn NdisMMapIoSpace(virtualaddress : *mut *mut core::ffi::c_void, miniportadapterhandle : *const core::ffi::c_void, physicaladdress : i64, length : u32) -> i32); - unsafe { NdisMMapIoSpace(core::mem::transmute(virtualaddress), miniportadapterhandle, physicaladdress, length) } + unsafe { NdisMMapIoSpace(virtualaddress as _, miniportadapterhandle, physicaladdress, length) } } #[inline] pub unsafe fn NdisMQueryAdapterInstanceName(padapterinstancename: *mut super::super::super::Win32::Foundation::UNICODE_STRING, miniporthandle: *const core::ffi::c_void) -> i32 { windows_targets::link!("ndis.sys" "system" fn NdisMQueryAdapterInstanceName(padapterinstancename : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, miniporthandle : *const core::ffi::c_void) -> i32); - unsafe { NdisMQueryAdapterInstanceName(core::mem::transmute(padapterinstancename), miniporthandle) } + unsafe { NdisMQueryAdapterInstanceName(padapterinstancename as _, miniporthandle) } } #[inline] pub unsafe fn NdisMReadDmaCounter(miniportdmahandle: *const core::ffi::c_void) -> u32 { @@ -402,12 +402,12 @@ pub unsafe fn NdisMReadDmaCounter(miniportdmahandle: *const core::ffi::c_void) - #[inline] pub unsafe fn NdisMRegisterDmaChannel(miniportdmahandle: *mut *mut core::ffi::c_void, miniportadapterhandle: *const core::ffi::c_void, dmachannel: u32, dma32bitaddresses: bool, dmadescription: *const NDIS_DMA_DESCRIPTION, maximumlength: u32) -> i32 { windows_targets::link!("ndis.sys" "system" fn NdisMRegisterDmaChannel(miniportdmahandle : *mut *mut core::ffi::c_void, miniportadapterhandle : *const core::ffi::c_void, dmachannel : u32, dma32bitaddresses : bool, dmadescription : *const NDIS_DMA_DESCRIPTION, maximumlength : u32) -> i32); - unsafe { NdisMRegisterDmaChannel(core::mem::transmute(miniportdmahandle), miniportadapterhandle, dmachannel, dma32bitaddresses, dmadescription, maximumlength) } + unsafe { NdisMRegisterDmaChannel(miniportdmahandle as _, miniportadapterhandle, dmachannel, dma32bitaddresses, dmadescription, maximumlength) } } #[inline] pub unsafe fn NdisMRegisterIoPortRange(portoffset: *mut *mut core::ffi::c_void, miniportadapterhandle: *const core::ffi::c_void, initialport: u32, numberofports: u32) -> i32 { windows_targets::link!("ndis.sys" "system" fn NdisMRegisterIoPortRange(portoffset : *mut *mut core::ffi::c_void, miniportadapterhandle : *const core::ffi::c_void, initialport : u32, numberofports : u32) -> i32); - unsafe { NdisMRegisterIoPortRange(core::mem::transmute(portoffset), miniportadapterhandle, initialport, numberofports) } + unsafe { NdisMRegisterIoPortRange(portoffset as _, miniportadapterhandle, initialport, numberofports) } } #[inline] pub unsafe fn NdisMRemoveMiniport(miniporthandle: *const core::ffi::c_void) -> i32 { @@ -438,32 +438,32 @@ pub unsafe fn NdisMWriteLogData(loghandle: *const core::ffi::c_void, logbuffer: #[inline] pub unsafe fn NdisMapFile(status: *mut i32, mappedbuffer: *mut *mut core::ffi::c_void, filehandle: *const core::ffi::c_void) { windows_targets::link!("ndis.sys" "system" fn NdisMapFile(status : *mut i32, mappedbuffer : *mut *mut core::ffi::c_void, filehandle : *const core::ffi::c_void)); - unsafe { NdisMapFile(core::mem::transmute(status), core::mem::transmute(mappedbuffer), filehandle) } + unsafe { NdisMapFile(status as _, mappedbuffer as _, filehandle) } } #[inline] pub unsafe fn NdisOpenConfigurationKeyByIndex(status: *mut i32, configurationhandle: *const core::ffi::c_void, index: u32, keyname: *mut super::super::super::Win32::Foundation::UNICODE_STRING, keyhandle: *mut *mut core::ffi::c_void) { windows_targets::link!("ndis.sys" "system" fn NdisOpenConfigurationKeyByIndex(status : *mut i32, configurationhandle : *const core::ffi::c_void, index : u32, keyname : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, keyhandle : *mut *mut core::ffi::c_void)); - unsafe { NdisOpenConfigurationKeyByIndex(core::mem::transmute(status), configurationhandle, index, core::mem::transmute(keyname), core::mem::transmute(keyhandle)) } + unsafe { NdisOpenConfigurationKeyByIndex(status as _, configurationhandle, index, keyname as _, keyhandle as _) } } #[inline] pub unsafe fn NdisOpenConfigurationKeyByName(status: *mut i32, configurationhandle: *const core::ffi::c_void, subkeyname: *const super::super::super::Win32::Foundation::UNICODE_STRING, subkeyhandle: *mut *mut core::ffi::c_void) { windows_targets::link!("ndis.sys" "system" fn NdisOpenConfigurationKeyByName(status : *mut i32, configurationhandle : *const core::ffi::c_void, subkeyname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, subkeyhandle : *mut *mut core::ffi::c_void)); - unsafe { NdisOpenConfigurationKeyByName(core::mem::transmute(status), configurationhandle, subkeyname, core::mem::transmute(subkeyhandle)) } + unsafe { NdisOpenConfigurationKeyByName(status as _, configurationhandle, subkeyname, subkeyhandle as _) } } #[inline] pub unsafe fn NdisOpenFile(status: *mut i32, filehandle: *mut *mut core::ffi::c_void, filelength: *mut u32, filename: *const super::super::super::Win32::Foundation::UNICODE_STRING, highestacceptableaddress: i64) { windows_targets::link!("ndis.sys" "system" fn NdisOpenFile(status : *mut i32, filehandle : *mut *mut core::ffi::c_void, filelength : *mut u32, filename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, highestacceptableaddress : i64)); - unsafe { NdisOpenFile(core::mem::transmute(status), core::mem::transmute(filehandle), core::mem::transmute(filelength), filename, highestacceptableaddress) } + unsafe { NdisOpenFile(status as _, filehandle as _, filelength as _, filename, highestacceptableaddress) } } #[inline] pub unsafe fn NdisQueryAdapterInstanceName(padapterinstancename: *mut super::super::super::Win32::Foundation::UNICODE_STRING, ndisbindinghandle: *const core::ffi::c_void) -> i32 { windows_targets::link!("ndis.sys" "system" fn NdisQueryAdapterInstanceName(padapterinstancename : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, ndisbindinghandle : *const core::ffi::c_void) -> i32); - unsafe { NdisQueryAdapterInstanceName(core::mem::transmute(padapterinstancename), ndisbindinghandle) } + unsafe { NdisQueryAdapterInstanceName(padapterinstancename as _, ndisbindinghandle) } } #[inline] pub unsafe fn NdisQueryBindInstanceName(padapterinstancename: *mut super::super::super::Win32::Foundation::UNICODE_STRING, bindingcontext: *const core::ffi::c_void) -> i32 { windows_targets::link!("ndis.sys" "system" fn NdisQueryBindInstanceName(padapterinstancename : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, bindingcontext : *const core::ffi::c_void) -> i32); - unsafe { NdisQueryBindInstanceName(core::mem::transmute(padapterinstancename), bindingcontext) } + unsafe { NdisQueryBindInstanceName(padapterinstancename as _, bindingcontext) } } #[inline] pub unsafe fn NdisReEnumerateProtocolBindings(ndisprotocolhandle: *const core::ffi::c_void) { @@ -473,12 +473,12 @@ pub unsafe fn NdisReEnumerateProtocolBindings(ndisprotocolhandle: *const core::f #[inline] pub unsafe fn NdisReadConfiguration(status: *mut i32, parametervalue: *mut *mut NDIS_CONFIGURATION_PARAMETER, configurationhandle: *const core::ffi::c_void, keyword: *const super::super::super::Win32::Foundation::UNICODE_STRING, parametertype: NDIS_PARAMETER_TYPE) { windows_targets::link!("ndis.sys" "system" fn NdisReadConfiguration(status : *mut i32, parametervalue : *mut *mut NDIS_CONFIGURATION_PARAMETER, configurationhandle : *const core::ffi::c_void, keyword : *const super::super::super::Win32::Foundation:: UNICODE_STRING, parametertype : NDIS_PARAMETER_TYPE)); - unsafe { NdisReadConfiguration(core::mem::transmute(status), core::mem::transmute(parametervalue), configurationhandle, keyword, parametertype) } + unsafe { NdisReadConfiguration(status as _, parametervalue as _, configurationhandle, keyword, parametertype) } } #[inline] pub unsafe fn NdisReadNetworkAddress(status: *mut i32, networkaddress: *mut *mut core::ffi::c_void, networkaddresslength: *mut u32, configurationhandle: *const core::ffi::c_void) { windows_targets::link!("ndis.sys" "system" fn NdisReadNetworkAddress(status : *mut i32, networkaddress : *mut *mut core::ffi::c_void, networkaddresslength : *mut u32, configurationhandle : *const core::ffi::c_void)); - unsafe { NdisReadNetworkAddress(core::mem::transmute(status), core::mem::transmute(networkaddress), core::mem::transmute(networkaddresslength), configurationhandle) } + unsafe { NdisReadNetworkAddress(status as _, networkaddress as _, networkaddresslength as _, configurationhandle) } } #[inline] pub unsafe fn NdisRegisterTdiCallBack(registercallback: TDI_REGISTER_CALLBACK, pnphandler: TDI_PNP_HANDLER) { @@ -488,7 +488,7 @@ pub unsafe fn NdisRegisterTdiCallBack(registercallback: TDI_REGISTER_CALLBACK, p #[inline] pub unsafe fn NdisReleaseReadWriteLock(lock: *mut NDIS_RW_LOCK, lockstate: *const LOCK_STATE) { windows_targets::link!("ndis.sys" "system" fn NdisReleaseReadWriteLock(lock : *mut NDIS_RW_LOCK, lockstate : *const LOCK_STATE)); - unsafe { NdisReleaseReadWriteLock(core::mem::transmute(lock), lockstate) } + unsafe { NdisReleaseReadWriteLock(lock as _, lockstate) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -524,7 +524,7 @@ pub unsafe fn NdisSetTimerEx(ndistimer: *const NDIS_TIMER, millisecondstodelay: #[inline] pub unsafe fn NdisSetupDmaTransfer(status: *mut i32, ndisdmahandle: *mut core::ffi::c_void, buffer: *mut super::super::Foundation::MDL, offset: u32, length: u32, writetodevice: bool) { windows_targets::link!("ndis.sys" "system" fn NdisSetupDmaTransfer(status : *mut i32, ndisdmahandle : *mut core::ffi::c_void, buffer : *mut super::super::Foundation:: MDL, offset : u32, length : u32, writetodevice : bool)); - unsafe { NdisSetupDmaTransfer(core::mem::transmute(status), core::mem::transmute(ndisdmahandle), core::mem::transmute(buffer), offset, length, writetodevice) } + unsafe { NdisSetupDmaTransfer(status as _, ndisdmahandle as _, buffer as _, offset, length, writetodevice) } } #[inline] pub unsafe fn NdisSystemProcessorCount() -> i8 { @@ -539,7 +539,7 @@ pub unsafe fn NdisUnmapFile(filehandle: *const core::ffi::c_void) { #[inline] pub unsafe fn NdisUpdateSharedMemory(ndisadapterhandle: *mut core::ffi::c_void, length: u32, virtualaddress: *mut core::ffi::c_void, physicaladdress: i64) { windows_targets::link!("ndis.sys" "system" fn NdisUpdateSharedMemory(ndisadapterhandle : *mut core::ffi::c_void, length : u32, virtualaddress : *mut core::ffi::c_void, physicaladdress : i64)); - unsafe { NdisUpdateSharedMemory(core::mem::transmute(ndisadapterhandle), length, core::mem::transmute(virtualaddress), physicaladdress) } + unsafe { NdisUpdateSharedMemory(ndisadapterhandle as _, length, virtualaddress as _, physicaladdress) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -550,7 +550,7 @@ pub unsafe fn NdisWaitEvent(event: *const NDIS_EVENT, mstowait: u32) -> bool { #[inline] pub unsafe fn NdisWriteConfiguration(status: *mut i32, configurationhandle: *const core::ffi::c_void, keyword: *const super::super::super::Win32::Foundation::UNICODE_STRING, parametervalue: *const NDIS_CONFIGURATION_PARAMETER) { windows_targets::link!("ndis.sys" "system" fn NdisWriteConfiguration(status : *mut i32, configurationhandle : *const core::ffi::c_void, keyword : *const super::super::super::Win32::Foundation:: UNICODE_STRING, parametervalue : *const NDIS_CONFIGURATION_PARAMETER)); - unsafe { NdisWriteConfiguration(core::mem::transmute(status), configurationhandle, keyword, parametervalue) } + unsafe { NdisWriteConfiguration(status as _, configurationhandle, keyword, parametervalue) } } #[inline] pub unsafe fn NdisWriteErrorLogEntry(ndisadapterhandle: *const core::ffi::c_void, errorcode: u32, numberoferrorvalues: u32) { @@ -560,7 +560,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); - unsafe { NdisWriteEventLogEntry(loghandle, eventcode, uniqueeventvalue, numstrings, core::mem::transmute(stringslist.unwrap_or(core::mem::zeroed())), datasize, core::mem::transmute(data.unwrap_or(core::mem::zeroed()))) } + unsafe { NdisWriteEventLogEntry(loghandle, eventcode, uniqueeventvalue, numstrings, stringslist.unwrap_or(core::mem::zeroed()) as _, datasize, data.unwrap_or(core::mem::zeroed()) as _) } } 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 4ce1a1cc4b..85a03d515d 100644 --- a/crates/libs/windows/src/Windows/Wdk/NetworkManagement/WindowsFilteringPlatform/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/NetworkManagement/WindowsFilteringPlatform/mod.rs @@ -8,24 +8,24 @@ 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); - unsafe { FwpmBfeStateSubscribeChanges0(core::mem::transmute(deviceobject), callback, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(changehandle)) } + unsafe { FwpmBfeStateSubscribeChanges0(deviceobject as _, callback, context.unwrap_or(core::mem::zeroed()) as _, changehandle as _) } } #[inline] pub unsafe fn FwpmBfeStateUnsubscribeChanges0(changehandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpkclnt.sys" "system" fn FwpmBfeStateUnsubscribeChanges0(changehandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FwpmBfeStateUnsubscribeChanges0(core::mem::transmute(changehandle)) } + unsafe { FwpmBfeStateUnsubscribeChanges0(changehandle as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmCalloutAdd0(enginehandle, callout, core::mem::transmute(sd.unwrap_or(core::mem::zeroed())), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))) } + unsafe { FwpmCalloutAdd0(enginehandle, callout, sd.unwrap_or(core::mem::zeroed()) as _, id.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { FwpmCalloutCreateEnumHandle0(enginehandle, core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } + unsafe { FwpmCalloutCreateEnumHandle0(enginehandle, enumtemplate.unwrap_or(core::mem::zeroed()) as _, enumhandle as _) } } #[inline] pub unsafe fn FwpmCalloutDeleteById0(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u32) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -40,43 +40,43 @@ pub unsafe fn FwpmCalloutDeleteByKey0(enginehandle: super::super::super::Win32:: #[inline] 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); - unsafe { FwpmCalloutDestroyEnumHandle0(enginehandle, core::mem::transmute(enumhandle)) } + unsafe { FwpmCalloutDestroyEnumHandle0(enginehandle, enumhandle as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { FwpmCalloutEnum0(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmCalloutEnum0(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { FwpmCalloutGetById0(enginehandle, id, core::mem::transmute(callout)) } + unsafe { FwpmCalloutGetById0(enginehandle, id, callout as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { FwpmCalloutGetByKey0(enginehandle, key, core::mem::transmute(callout)) } + unsafe { FwpmCalloutGetByKey0(enginehandle, key, callout as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmCalloutGetSecurityInfoByKey0(enginehandle, core::mem::transmute(key.unwrap_or(core::mem::zeroed())), securityinfo, core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } + unsafe { FwpmCalloutGetSecurityInfoByKey0(enginehandle, key.unwrap_or(core::mem::zeroed()) as _, securityinfo, sidowner as _, sidgroup as _, dacl as _, sacl as _, securitydescriptor as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmCalloutSetSecurityInfoByKey0(enginehandle, core::mem::transmute(key.unwrap_or(core::mem::zeroed())), 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()))) } + unsafe { FwpmCalloutSetSecurityInfoByKey0(enginehandle, key.unwrap_or(core::mem::zeroed()) as _, securityinfo, sidowner.unwrap_or(core::mem::zeroed()) as _, sidgroup.unwrap_or(core::mem::zeroed()) as _, dacl.unwrap_or(core::mem::zeroed()) as _, sacl.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { FwpmConnectionCreateEnumHandle0(enginehandle, core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } + unsafe { FwpmConnectionCreateEnumHandle0(enginehandle, enumtemplate.unwrap_or(core::mem::zeroed()) as _, enumhandle as _) } } #[inline] pub unsafe fn FwpmConnectionDestroyEnumHandle0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -87,42 +87,42 @@ pub unsafe fn FwpmConnectionDestroyEnumHandle0(enginehandle: super::super::super #[inline] 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); - unsafe { FwpmConnectionEnum0(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmConnectionEnum0(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { FwpmConnectionGetById0(enginehandle, id, core::mem::transmute(connection)) } + unsafe { FwpmConnectionGetById0(enginehandle, id, connection as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmConnectionGetSecurityInfo0(enginehandle, securityinfo, core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } + unsafe { FwpmConnectionGetSecurityInfo0(enginehandle, securityinfo, sidowner as _, sidgroup as _, dacl as _, sacl as _, securitydescriptor as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmConnectionSetSecurityInfo0(enginehandle, 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()))) } + unsafe { FwpmConnectionSetSecurityInfo0(enginehandle, securityinfo, sidowner.unwrap_or(core::mem::zeroed()) as _, sidgroup.unwrap_or(core::mem::zeroed()) as _, dacl.unwrap_or(core::mem::zeroed()) as _, sacl.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FwpmEngineClose0(enginehandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmEngineClose0(enginehandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FwpmEngineClose0(core::mem::transmute(enginehandle)) } + unsafe { FwpmEngineClose0(enginehandle as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmEngineGetOption0(enginehandle, option, core::mem::transmute(value)) } + unsafe { FwpmEngineGetOption0(enginehandle, option, value as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmEngineGetSecurityInfo0(enginehandle, securityinfo, core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } + unsafe { FwpmEngineGetSecurityInfo0(enginehandle, securityinfo, sidowner as _, sidgroup as _, dacl as _, sacl as _, securitydescriptor as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security", feature = "Win32_System_Rpc"))] #[inline] @@ -131,7 +131,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmEngineOpen0(servername : windows_core::PCWSTR, authnservice : u32, authidentity : *const super::super::super::Win32::System::Rpc:: SEC_WINNT_AUTH_IDENTITY_W, session : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_SESSION0, enginehandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FwpmEngineOpen0(servername.param().abi(), authnservice, core::mem::transmute(authidentity.unwrap_or(core::mem::zeroed())), core::mem::transmute(session.unwrap_or(core::mem::zeroed())), core::mem::transmute(enginehandle)) } + unsafe { FwpmEngineOpen0(servername.param().abi(), authnservice, authidentity.unwrap_or(core::mem::zeroed()) as _, session.unwrap_or(core::mem::zeroed()) as _, enginehandle as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] @@ -143,19 +143,19 @@ pub unsafe fn FwpmEngineSetOption0(enginehandle: super::super::super::Win32::Fou #[inline] 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); - unsafe { FwpmEngineSetSecurityInfo0(enginehandle, 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()))) } + unsafe { FwpmEngineSetSecurityInfo0(enginehandle, securityinfo, sidowner.unwrap_or(core::mem::zeroed()) as _, sidgroup.unwrap_or(core::mem::zeroed()) as _, dacl.unwrap_or(core::mem::zeroed()) as _, sacl.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmFilterAdd0(enginehandle, filter, core::mem::transmute(sd.unwrap_or(core::mem::zeroed())), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))) } + unsafe { FwpmFilterAdd0(enginehandle, filter, sd.unwrap_or(core::mem::zeroed()) as _, id.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmFilterCreateEnumHandle0(enginehandle, core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } + unsafe { FwpmFilterCreateEnumHandle0(enginehandle, enumtemplate.unwrap_or(core::mem::zeroed()) as _, enumhandle as _) } } #[inline] pub unsafe fn FwpmFilterDeleteById0(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u64) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -170,66 +170,66 @@ pub unsafe fn FwpmFilterDeleteByKey0(enginehandle: super::super::super::Win32::F #[inline] 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); - unsafe { FwpmFilterDestroyEnumHandle0(enginehandle, core::mem::transmute(enumhandle)) } + unsafe { FwpmFilterDestroyEnumHandle0(enginehandle, enumhandle as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmFilterEnum0(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmFilterEnum0(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmFilterGetById0(enginehandle, id, core::mem::transmute(filter)) } + unsafe { FwpmFilterGetById0(enginehandle, id, filter as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmFilterGetByKey0(enginehandle, key, core::mem::transmute(filter)) } + unsafe { FwpmFilterGetByKey0(enginehandle, key, filter as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmFilterGetSecurityInfoByKey0(enginehandle, core::mem::transmute(key.unwrap_or(core::mem::zeroed())), securityinfo, core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } + unsafe { FwpmFilterGetSecurityInfoByKey0(enginehandle, key.unwrap_or(core::mem::zeroed()) as _, securityinfo, sidowner as _, sidgroup as _, dacl as _, sacl as _, securitydescriptor as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmFilterSetSecurityInfoByKey0(enginehandle, core::mem::transmute(key.unwrap_or(core::mem::zeroed())), 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()))) } + unsafe { FwpmFilterSetSecurityInfoByKey0(enginehandle, key.unwrap_or(core::mem::zeroed()) as _, securityinfo, sidowner.unwrap_or(core::mem::zeroed()) as _, sidgroup.unwrap_or(core::mem::zeroed()) as _, dacl.unwrap_or(core::mem::zeroed()) as _, sacl.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FwpmFreeMemory0(p: *mut *mut core::ffi::c_void) { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmFreeMemory0(p : *mut *mut core::ffi::c_void)); - unsafe { FwpmFreeMemory0(core::mem::transmute(p)) } + unsafe { FwpmFreeMemory0(p as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmIPsecTunnelAdd0(enginehandle, flags, core::mem::transmute(mainmodepolicy.unwrap_or(core::mem::zeroed())), tunnelpolicy, filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), core::mem::transmute(sd.unwrap_or(core::mem::zeroed()))) } + unsafe { FwpmIPsecTunnelAdd0(enginehandle, flags, mainmodepolicy.unwrap_or(core::mem::zeroed()) as _, tunnelpolicy, filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), sd.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmIPsecTunnelAdd1(enginehandle, flags, core::mem::transmute(mainmodepolicy.unwrap_or(core::mem::zeroed())), 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()))) } + unsafe { FwpmIPsecTunnelAdd1(enginehandle, flags, mainmodepolicy.unwrap_or(core::mem::zeroed()) as _, tunnelpolicy, filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), keymodkey.unwrap_or(core::mem::zeroed()) as _, sd.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmIPsecTunnelAdd2(enginehandle, flags, core::mem::transmute(mainmodepolicy.unwrap_or(core::mem::zeroed())), 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()))) } + unsafe { FwpmIPsecTunnelAdd2(enginehandle, flags, mainmodepolicy.unwrap_or(core::mem::zeroed()) as _, tunnelpolicy, filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), keymodkey.unwrap_or(core::mem::zeroed()) as _, sd.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmIPsecTunnelAdd3(enginehandle, flags, core::mem::transmute(mainmodepolicy.unwrap_or(core::mem::zeroed())), 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()))) } + unsafe { FwpmIPsecTunnelAdd3(enginehandle, flags, mainmodepolicy.unwrap_or(core::mem::zeroed()) as _, tunnelpolicy, filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), keymodkey.unwrap_or(core::mem::zeroed()) as _, sd.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FwpmIPsecTunnelDeleteByKey0(enginehandle: super::super::super::Win32::Foundation::HANDLE, key: *const windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -240,137 +240,137 @@ pub unsafe fn FwpmIPsecTunnelDeleteByKey0(enginehandle: super::super::super::Win #[inline] 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); - unsafe { FwpmLayerCreateEnumHandle0(enginehandle, core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } + unsafe { FwpmLayerCreateEnumHandle0(enginehandle, enumtemplate.unwrap_or(core::mem::zeroed()) as _, enumhandle as _) } } #[inline] 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); - unsafe { FwpmLayerDestroyEnumHandle0(enginehandle, core::mem::transmute(enumhandle)) } + unsafe { FwpmLayerDestroyEnumHandle0(enginehandle, enumhandle as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { FwpmLayerEnum0(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmLayerEnum0(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { FwpmLayerGetById0(enginehandle, id, core::mem::transmute(layer)) } + unsafe { FwpmLayerGetById0(enginehandle, id, layer as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { FwpmLayerGetByKey0(enginehandle, key, core::mem::transmute(layer)) } + unsafe { FwpmLayerGetByKey0(enginehandle, key, layer as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmLayerGetSecurityInfoByKey0(enginehandle, core::mem::transmute(key.unwrap_or(core::mem::zeroed())), securityinfo, core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } + unsafe { FwpmLayerGetSecurityInfoByKey0(enginehandle, key.unwrap_or(core::mem::zeroed()) as _, securityinfo, sidowner as _, sidgroup as _, dacl as _, sacl as _, securitydescriptor as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmLayerSetSecurityInfoByKey0(enginehandle, core::mem::transmute(key.unwrap_or(core::mem::zeroed())), 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()))) } + unsafe { FwpmLayerSetSecurityInfoByKey0(enginehandle, key.unwrap_or(core::mem::zeroed()) as _, securityinfo, sidowner.unwrap_or(core::mem::zeroed()) as _, sidgroup.unwrap_or(core::mem::zeroed()) as _, dacl.unwrap_or(core::mem::zeroed()) as _, sacl.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmNetEventCreateEnumHandle0(enginehandle, core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } + unsafe { FwpmNetEventCreateEnumHandle0(enginehandle, enumtemplate.unwrap_or(core::mem::zeroed()) as _, enumhandle as _) } } #[inline] 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); - unsafe { FwpmNetEventDestroyEnumHandle0(enginehandle, core::mem::transmute(enumhandle)) } + unsafe { FwpmNetEventDestroyEnumHandle0(enginehandle, enumhandle as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmNetEventEnum0(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmNetEventEnum0(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmNetEventEnum1(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmNetEventEnum1(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmNetEventEnum2(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmNetEventEnum2(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmNetEventEnum3(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmNetEventEnum3(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmNetEventEnum4(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmNetEventEnum4(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmNetEventEnum5(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmNetEventEnum5(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmNetEventsGetSecurityInfo0(enginehandle, securityinfo, core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } + unsafe { FwpmNetEventsGetSecurityInfo0(enginehandle, securityinfo, sidowner as _, sidgroup as _, dacl as _, sacl as _, securitydescriptor as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmNetEventsSetSecurityInfo0(enginehandle, 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()))) } + unsafe { FwpmNetEventsSetSecurityInfo0(enginehandle, securityinfo, sidowner.unwrap_or(core::mem::zeroed()) as _, sidgroup.unwrap_or(core::mem::zeroed()) as _, dacl.unwrap_or(core::mem::zeroed()) as _, sacl.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmProviderAdd0(enginehandle, provider, core::mem::transmute(sd.unwrap_or(core::mem::zeroed()))) } + unsafe { FwpmProviderAdd0(enginehandle, provider, sd.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmProviderContextAdd0(enginehandle, providercontext, core::mem::transmute(sd.unwrap_or(core::mem::zeroed())), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))) } + unsafe { FwpmProviderContextAdd0(enginehandle, providercontext, sd.unwrap_or(core::mem::zeroed()) as _, id.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmProviderContextAdd1(enginehandle, providercontext, core::mem::transmute(sd.unwrap_or(core::mem::zeroed())), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))) } + unsafe { FwpmProviderContextAdd1(enginehandle, providercontext, sd.unwrap_or(core::mem::zeroed()) as _, id.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmProviderContextAdd2(enginehandle, providercontext, core::mem::transmute(sd.unwrap_or(core::mem::zeroed())), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))) } + unsafe { FwpmProviderContextAdd2(enginehandle, providercontext, sd.unwrap_or(core::mem::zeroed()) as _, id.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmProviderContextAdd3(enginehandle, providercontext, core::mem::transmute(sd.unwrap_or(core::mem::zeroed())), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))) } + unsafe { FwpmProviderContextAdd3(enginehandle, providercontext, sd.unwrap_or(core::mem::zeroed()) as _, id.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { FwpmProviderContextCreateEnumHandle0(enginehandle, core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } + unsafe { FwpmProviderContextCreateEnumHandle0(enginehandle, enumtemplate.unwrap_or(core::mem::zeroed()) as _, enumhandle as _) } } #[inline] pub unsafe fn FwpmProviderContextDeleteById0(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u64) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -385,97 +385,97 @@ pub unsafe fn FwpmProviderContextDeleteByKey0(enginehandle: super::super::super: #[inline] 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); - unsafe { FwpmProviderContextDestroyEnumHandle0(enginehandle, core::mem::transmute(enumhandle)) } + unsafe { FwpmProviderContextDestroyEnumHandle0(enginehandle, enumhandle as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmProviderContextEnum0(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmProviderContextEnum0(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmProviderContextEnum1(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmProviderContextEnum1(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmProviderContextEnum2(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmProviderContextEnum2(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmProviderContextEnum3(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmProviderContextEnum3(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmProviderContextGetById0(enginehandle, id, core::mem::transmute(providercontext)) } + unsafe { FwpmProviderContextGetById0(enginehandle, id, providercontext as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmProviderContextGetById1(enginehandle, id, core::mem::transmute(providercontext)) } + unsafe { FwpmProviderContextGetById1(enginehandle, id, providercontext as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmProviderContextGetById2(enginehandle, id, core::mem::transmute(providercontext)) } + unsafe { FwpmProviderContextGetById2(enginehandle, id, providercontext as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmProviderContextGetById3(enginehandle, id, core::mem::transmute(providercontext)) } + unsafe { FwpmProviderContextGetById3(enginehandle, id, providercontext as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmProviderContextGetByKey0(enginehandle, key, core::mem::transmute(providercontext)) } + unsafe { FwpmProviderContextGetByKey0(enginehandle, key, providercontext as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmProviderContextGetByKey1(enginehandle, key, core::mem::transmute(providercontext)) } + unsafe { FwpmProviderContextGetByKey1(enginehandle, key, providercontext as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmProviderContextGetByKey2(enginehandle, key, core::mem::transmute(providercontext)) } + unsafe { FwpmProviderContextGetByKey2(enginehandle, key, providercontext as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmProviderContextGetByKey3(enginehandle, key, core::mem::transmute(providercontext)) } + unsafe { FwpmProviderContextGetByKey3(enginehandle, key, providercontext as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmProviderContextGetSecurityInfoByKey0(enginehandle, core::mem::transmute(key.unwrap_or(core::mem::zeroed())), securityinfo, core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } + unsafe { FwpmProviderContextGetSecurityInfoByKey0(enginehandle, key.unwrap_or(core::mem::zeroed()) as _, securityinfo, sidowner as _, sidgroup as _, dacl as _, sacl as _, securitydescriptor as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmProviderContextSetSecurityInfoByKey0(enginehandle, core::mem::transmute(key.unwrap_or(core::mem::zeroed())), 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()))) } + unsafe { FwpmProviderContextSetSecurityInfoByKey0(enginehandle, key.unwrap_or(core::mem::zeroed()) as _, securityinfo, sidowner.unwrap_or(core::mem::zeroed()) as _, sidgroup.unwrap_or(core::mem::zeroed()) as _, dacl.unwrap_or(core::mem::zeroed()) as _, sacl.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { FwpmProviderCreateEnumHandle0(enginehandle, core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } + unsafe { FwpmProviderCreateEnumHandle0(enginehandle, enumtemplate.unwrap_or(core::mem::zeroed()) as _, enumhandle as _) } } #[inline] pub unsafe fn FwpmProviderDeleteByKey0(enginehandle: super::super::super::Win32::Foundation::HANDLE, key: *const windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -485,60 +485,60 @@ pub unsafe fn FwpmProviderDeleteByKey0(enginehandle: super::super::super::Win32: #[inline] 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); - unsafe { FwpmProviderDestroyEnumHandle0(enginehandle, core::mem::transmute(enumhandle)) } + unsafe { FwpmProviderDestroyEnumHandle0(enginehandle, enumhandle as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { FwpmProviderEnum0(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmProviderEnum0(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { FwpmProviderGetByKey0(enginehandle, key, core::mem::transmute(provider)) } + unsafe { FwpmProviderGetByKey0(enginehandle, key, provider as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmProviderGetSecurityInfoByKey0(enginehandle, core::mem::transmute(key.unwrap_or(core::mem::zeroed())), securityinfo, core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } + unsafe { FwpmProviderGetSecurityInfoByKey0(enginehandle, key.unwrap_or(core::mem::zeroed()) as _, securityinfo, sidowner as _, sidgroup as _, dacl as _, sacl as _, securitydescriptor as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmProviderSetSecurityInfoByKey0(enginehandle, core::mem::transmute(key.unwrap_or(core::mem::zeroed())), 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()))) } + unsafe { FwpmProviderSetSecurityInfoByKey0(enginehandle, key.unwrap_or(core::mem::zeroed()) as _, securityinfo, sidowner.unwrap_or(core::mem::zeroed()) as _, sidgroup.unwrap_or(core::mem::zeroed()) as _, dacl.unwrap_or(core::mem::zeroed()) as _, sacl.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { FwpmSessionCreateEnumHandle0(enginehandle, core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } + unsafe { FwpmSessionCreateEnumHandle0(enginehandle, enumtemplate.unwrap_or(core::mem::zeroed()) as _, enumhandle as _) } } #[inline] 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); - unsafe { FwpmSessionDestroyEnumHandle0(enginehandle, core::mem::transmute(enumhandle)) } + unsafe { FwpmSessionDestroyEnumHandle0(enginehandle, enumhandle as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmSessionEnum0(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmSessionEnum0(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { FwpmSubLayerAdd0(enginehandle, sublayer, core::mem::transmute(sd.unwrap_or(core::mem::zeroed()))) } + unsafe { FwpmSubLayerAdd0(enginehandle, sublayer, sd.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { FwpmSubLayerCreateEnumHandle0(enginehandle, core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } + unsafe { FwpmSubLayerCreateEnumHandle0(enginehandle, enumtemplate.unwrap_or(core::mem::zeroed()) as _, enumhandle as _) } } #[inline] pub unsafe fn FwpmSubLayerDeleteByKey0(enginehandle: super::super::super::Win32::Foundation::HANDLE, key: *const windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -548,31 +548,31 @@ pub unsafe fn FwpmSubLayerDeleteByKey0(enginehandle: super::super::super::Win32: #[inline] 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); - unsafe { FwpmSubLayerDestroyEnumHandle0(enginehandle, core::mem::transmute(enumhandle)) } + unsafe { FwpmSubLayerDestroyEnumHandle0(enginehandle, enumhandle as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { FwpmSubLayerEnum0(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmSubLayerEnum0(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { FwpmSubLayerGetByKey0(enginehandle, key, core::mem::transmute(sublayer)) } + unsafe { FwpmSubLayerGetByKey0(enginehandle, key, sublayer as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmSubLayerGetSecurityInfoByKey0(enginehandle, core::mem::transmute(key.unwrap_or(core::mem::zeroed())), securityinfo, core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } + unsafe { FwpmSubLayerGetSecurityInfoByKey0(enginehandle, key.unwrap_or(core::mem::zeroed()) as _, securityinfo, sidowner as _, sidgroup as _, dacl as _, sacl as _, securitydescriptor as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmSubLayerSetSecurityInfoByKey0(enginehandle, core::mem::transmute(key.unwrap_or(core::mem::zeroed())), 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()))) } + unsafe { FwpmSubLayerSetSecurityInfoByKey0(enginehandle, key.unwrap_or(core::mem::zeroed()) as _, securityinfo, sidowner.unwrap_or(core::mem::zeroed()) as _, sidgroup.unwrap_or(core::mem::zeroed()) as _, dacl.unwrap_or(core::mem::zeroed()) as _, sacl.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FwpmTransactionAbort0(enginehandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -593,60 +593,60 @@ pub unsafe fn FwpmTransactionCommit0(enginehandle: super::super::super::Win32::F #[inline] 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); - unsafe { FwpmvSwitchEventsGetSecurityInfo0(enginehandle, securityinfo, core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } + unsafe { FwpmvSwitchEventsGetSecurityInfo0(enginehandle, securityinfo, sidowner as _, sidgroup as _, dacl as _, sacl as _, securitydescriptor as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmvSwitchEventsSetSecurityInfo0(enginehandle, 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()))) } + unsafe { FwpmvSwitchEventsSetSecurityInfo0(enginehandle, securityinfo, sidowner.unwrap_or(core::mem::zeroed()) as _, sidgroup.unwrap_or(core::mem::zeroed()) as _, dacl.unwrap_or(core::mem::zeroed()) as _, sacl.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { IPsecDospGetSecurityInfo0(enginehandle, securityinfo, core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } + unsafe { IPsecDospGetSecurityInfo0(enginehandle, securityinfo, sidowner as _, sidgroup as _, dacl as _, sacl as _, securitydescriptor as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { IPsecDospGetStatistics0(enginehandle, core::mem::transmute(idpstatistics)) } + unsafe { IPsecDospGetStatistics0(enginehandle, idpstatistics as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { IPsecDospSetSecurityInfo0(enginehandle, 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()))) } + unsafe { IPsecDospSetSecurityInfo0(enginehandle, securityinfo, sidowner.unwrap_or(core::mem::zeroed()) as _, sidgroup.unwrap_or(core::mem::zeroed()) as _, dacl.unwrap_or(core::mem::zeroed()) as _, sacl.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { IPsecDospStateCreateEnumHandle0(enginehandle, core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } + unsafe { IPsecDospStateCreateEnumHandle0(enginehandle, enumtemplate.unwrap_or(core::mem::zeroed()) as _, enumhandle as _) } } #[inline] 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); - unsafe { IPsecDospStateDestroyEnumHandle0(enginehandle, core::mem::transmute(enumhandle)) } + unsafe { IPsecDospStateDestroyEnumHandle0(enginehandle, enumhandle as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { IPsecDospStateEnum0(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentries)) } + unsafe { IPsecDospStateEnum0(enginehandle, enumhandle, numentriesrequested, entries as _, numentries as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { IPsecGetStatistics0(enginehandle, core::mem::transmute(ipsecstatistics)) } + unsafe { IPsecGetStatistics0(enginehandle, ipsecstatistics as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { IPsecGetStatistics1(enginehandle, core::mem::transmute(ipsecstatistics)) } + unsafe { IPsecGetStatistics1(enginehandle, ipsecstatistics as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] @@ -676,19 +676,19 @@ pub unsafe fn IPsecSaContextAddOutbound1(enginehandle: super::super::super::Win3 #[inline] 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); - unsafe { IPsecSaContextCreate0(enginehandle, outboundtraffic, core::mem::transmute(inboundfilterid.unwrap_or(core::mem::zeroed())), core::mem::transmute(id)) } + unsafe { IPsecSaContextCreate0(enginehandle, outboundtraffic, inboundfilterid.unwrap_or(core::mem::zeroed()) as _, id as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { IPsecSaContextCreate1(enginehandle, outboundtraffic, core::mem::transmute(virtualiftunnelinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(inboundfilterid.unwrap_or(core::mem::zeroed())), core::mem::transmute(id)) } + unsafe { IPsecSaContextCreate1(enginehandle, outboundtraffic, virtualiftunnelinfo.unwrap_or(core::mem::zeroed()) as _, inboundfilterid.unwrap_or(core::mem::zeroed()) as _, id as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { IPsecSaContextCreateEnumHandle0(enginehandle, core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } + unsafe { IPsecSaContextCreateEnumHandle0(enginehandle, enumtemplate.unwrap_or(core::mem::zeroed()) as _, enumhandle as _) } } #[inline] pub unsafe fn IPsecSaContextDeleteById0(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u64) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -698,19 +698,19 @@ pub unsafe fn IPsecSaContextDeleteById0(enginehandle: super::super::super::Win32 #[inline] 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); - unsafe { IPsecSaContextDestroyEnumHandle0(enginehandle, core::mem::transmute(enumhandle)) } + unsafe { IPsecSaContextDestroyEnumHandle0(enginehandle, enumhandle as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { IPsecSaContextEnum0(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { IPsecSaContextEnum0(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { IPsecSaContextEnum1(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { IPsecSaContextEnum1(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[inline] pub unsafe fn IPsecSaContextExpire0(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u64) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -721,25 +721,25 @@ pub unsafe fn IPsecSaContextExpire0(enginehandle: super::super::super::Win32::Fo #[inline] 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); - unsafe { IPsecSaContextGetById0(enginehandle, id, core::mem::transmute(sacontext)) } + unsafe { IPsecSaContextGetById0(enginehandle, id, sacontext as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { IPsecSaContextGetById1(enginehandle, id, core::mem::transmute(sacontext)) } + unsafe { IPsecSaContextGetById1(enginehandle, id, sacontext as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { IPsecSaContextGetSpi0(enginehandle, id, getspi, core::mem::transmute(inboundspi)) } + unsafe { IPsecSaContextGetSpi0(enginehandle, id, getspi, inboundspi as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { IPsecSaContextGetSpi1(enginehandle, id, getspi, core::mem::transmute(inboundspi)) } + unsafe { IPsecSaContextGetSpi1(enginehandle, id, getspi, inboundspi as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] @@ -757,66 +757,66 @@ pub unsafe fn IPsecSaContextUpdate0(enginehandle: super::super::super::Win32::Fo #[inline] 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); - unsafe { IPsecSaCreateEnumHandle0(enginehandle, core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } + unsafe { IPsecSaCreateEnumHandle0(enginehandle, enumtemplate.unwrap_or(core::mem::zeroed()) as _, enumhandle as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { IPsecSaDbGetSecurityInfo0(enginehandle, securityinfo, core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } + unsafe { IPsecSaDbGetSecurityInfo0(enginehandle, securityinfo, sidowner as _, sidgroup as _, dacl as _, sacl as _, securitydescriptor as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { IPsecSaDbSetSecurityInfo0(enginehandle, 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()))) } + unsafe { IPsecSaDbSetSecurityInfo0(enginehandle, securityinfo, sidowner.unwrap_or(core::mem::zeroed()) as _, sidgroup.unwrap_or(core::mem::zeroed()) as _, dacl.unwrap_or(core::mem::zeroed()) as _, sacl.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { IPsecSaDestroyEnumHandle0(enginehandle, core::mem::transmute(enumhandle)) } + unsafe { IPsecSaDestroyEnumHandle0(enginehandle, enumhandle as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { IPsecSaEnum0(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { IPsecSaEnum0(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { IPsecSaEnum1(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { IPsecSaEnum1(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { IkeextGetStatistics0(enginehandle, core::mem::transmute(ikeextstatistics)) } + unsafe { IkeextGetStatistics0(enginehandle, ikeextstatistics as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { IkeextGetStatistics1(enginehandle, core::mem::transmute(ikeextstatistics)) } + unsafe { IkeextGetStatistics1(enginehandle, ikeextstatistics as _) } } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] 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); - unsafe { IkeextSaCreateEnumHandle0(enginehandle, core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } + unsafe { IkeextSaCreateEnumHandle0(enginehandle, enumtemplate.unwrap_or(core::mem::zeroed()) as _, enumhandle as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { IkeextSaDbGetSecurityInfo0(enginehandle, securityinfo, core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } + unsafe { IkeextSaDbGetSecurityInfo0(enginehandle, securityinfo, sidowner as _, sidgroup as _, dacl as _, sacl as _, securitydescriptor as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { IkeextSaDbSetSecurityInfo0(enginehandle, 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()))) } + unsafe { IkeextSaDbSetSecurityInfo0(enginehandle, securityinfo, sidowner.unwrap_or(core::mem::zeroed()) as _, sidgroup.unwrap_or(core::mem::zeroed()) as _, dacl.unwrap_or(core::mem::zeroed()) as _, sacl.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn IkeextSaDeleteById0(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u64) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -826,43 +826,43 @@ pub unsafe fn IkeextSaDeleteById0(enginehandle: super::super::super::Win32::Foun #[inline] 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); - unsafe { IkeextSaDestroyEnumHandle0(enginehandle, core::mem::transmute(enumhandle)) } + unsafe { IkeextSaDestroyEnumHandle0(enginehandle, enumhandle as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { IkeextSaEnum0(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { IkeextSaEnum0(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { IkeextSaEnum1(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { IkeextSaEnum1(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { IkeextSaEnum2(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { IkeextSaEnum2(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { IkeextSaGetById0(enginehandle, id, core::mem::transmute(sa)) } + unsafe { IkeextSaGetById0(enginehandle, id, sa as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { IkeextSaGetById1(enginehandle, id, core::mem::transmute(salookupcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(sa)) } + unsafe { IkeextSaGetById1(enginehandle, id, salookupcontext.unwrap_or(core::mem::zeroed()) as _, sa as _) } } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] 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); - unsafe { IkeextSaGetById2(enginehandle, id, core::mem::transmute(salookupcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(sa)) } + unsafe { IkeextSaGetById2(enginehandle, id, salookupcontext.unwrap_or(core::mem::zeroed()) as _, sa as _) } } #[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 c246d92492..8312ce516b 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 @@ -6,34 +6,34 @@ pub unsafe fn FltAcknowledgeEcp(filter: PFLT_FILTER, ecpcontext: *const core::ff #[inline] pub unsafe fn FltAcquirePushLockExclusive(pushlock: *mut usize) { windows_targets::link!("fltmgr.sys" "system" fn FltAcquirePushLockExclusive(pushlock : *mut usize)); - unsafe { FltAcquirePushLockExclusive(core::mem::transmute(pushlock)) } + unsafe { FltAcquirePushLockExclusive(pushlock as _) } } #[inline] pub unsafe fn FltAcquirePushLockExclusiveEx(pushlock: *mut usize, flags: u32) { windows_targets::link!("fltmgr.sys" "system" fn FltAcquirePushLockExclusiveEx(pushlock : *mut usize, flags : u32)); - unsafe { FltAcquirePushLockExclusiveEx(core::mem::transmute(pushlock), flags) } + unsafe { FltAcquirePushLockExclusiveEx(pushlock as _, flags) } } #[inline] pub unsafe fn FltAcquirePushLockShared(pushlock: *mut usize) { windows_targets::link!("fltmgr.sys" "system" fn FltAcquirePushLockShared(pushlock : *mut usize)); - unsafe { FltAcquirePushLockShared(core::mem::transmute(pushlock)) } + unsafe { FltAcquirePushLockShared(pushlock as _) } } #[inline] pub unsafe fn FltAcquirePushLockSharedEx(pushlock: *mut usize, flags: u32) { windows_targets::link!("fltmgr.sys" "system" fn FltAcquirePushLockSharedEx(pushlock : *mut usize, flags : u32)); - unsafe { FltAcquirePushLockSharedEx(core::mem::transmute(pushlock), flags) } + unsafe { FltAcquirePushLockSharedEx(pushlock as _, flags) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn FltAcquireResourceExclusive(resource: *mut super::super::super::Foundation::ERESOURCE) { windows_targets::link!("fltmgr.sys" "system" fn FltAcquireResourceExclusive(resource : *mut super::super::super::Foundation:: ERESOURCE)); - unsafe { FltAcquireResourceExclusive(core::mem::transmute(resource)) } + unsafe { FltAcquireResourceExclusive(resource as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn FltAcquireResourceShared(resource: *mut super::super::super::Foundation::ERESOURCE) { windows_targets::link!("fltmgr.sys" "system" fn FltAcquireResourceShared(resource : *mut super::super::super::Foundation:: ERESOURCE)); - unsafe { FltAcquireResourceShared(core::mem::transmute(resource)) } + unsafe { FltAcquireResourceShared(resource as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -44,25 +44,25 @@ pub unsafe fn FltAddOpenReparseEntry(filter: PFLT_FILTER, data: *const FLT_CALLB #[inline] pub unsafe fn FltAdjustDeviceStackSizeForIoRedirection(sourceinstance: PFLT_INSTANCE, targetinstance: PFLT_INSTANCE, sourcedevicestacksizemodified: Option<*mut bool>) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltAdjustDeviceStackSizeForIoRedirection(sourceinstance : PFLT_INSTANCE, targetinstance : PFLT_INSTANCE, sourcedevicestacksizemodified : *mut bool) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FltAdjustDeviceStackSizeForIoRedirection(sourceinstance, targetinstance, core::mem::transmute(sourcedevicestacksizemodified.unwrap_or(core::mem::zeroed()))) } + unsafe { FltAdjustDeviceStackSizeForIoRedirection(sourceinstance, targetinstance, sourcedevicestacksizemodified.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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: 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); - unsafe { FltAllocateCallbackData(instance, core::mem::transmute(fileobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(retnewcallbackdata)) } + unsafe { FltAllocateCallbackData(instance, fileobject.unwrap_or(core::mem::zeroed()) as _, retnewcallbackdata as _) } } #[cfg(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: 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); - unsafe { FltAllocateCallbackDataEx(instance, core::mem::transmute(fileobject.unwrap_or(core::mem::zeroed())), flags, core::mem::transmute(retnewcallbackdata)) } + unsafe { FltAllocateCallbackDataEx(instance, fileobject.unwrap_or(core::mem::zeroed()) as _, flags, retnewcallbackdata as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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); - unsafe { FltAllocateContext(filter, contexttype, contextsize, pooltype, core::mem::transmute(returnedcontext)) } + unsafe { FltAllocateContext(filter, contexttype, contextsize, pooltype, returnedcontext as _) } } #[inline] pub unsafe fn FltAllocateDeferredIoWorkItem() -> PFLT_DEFERRED_IO_WORKITEM { @@ -72,24 +72,24 @@ pub unsafe fn FltAllocateDeferredIoWorkItem() -> PFLT_DEFERRED_IO_WORKITEM { #[inline] 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); - unsafe { FltAllocateExtraCreateParameter(filter, ecptype, sizeofcontext, flags, core::mem::transmute(cleanupcallback.unwrap_or(core::mem::zeroed())), pooltag, core::mem::transmute(ecpcontext)) } + unsafe { FltAllocateExtraCreateParameter(filter, ecptype, sizeofcontext, flags, cleanupcallback.unwrap_or(core::mem::zeroed()) as _, pooltag, ecpcontext as _) } } #[inline] 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); - unsafe { FltAllocateExtraCreateParameterFromLookasideList(filter, ecptype, sizeofcontext, flags, core::mem::transmute(cleanupcallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(lookasidelist), core::mem::transmute(ecpcontext)) } + unsafe { FltAllocateExtraCreateParameterFromLookasideList(filter, ecptype, sizeofcontext, flags, cleanupcallback.unwrap_or(core::mem::zeroed()) as _, lookasidelist as _, ecpcontext as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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); - unsafe { FltAllocateExtraCreateParameterList(filter, flags, core::mem::transmute(ecplist)) } + unsafe { FltAllocateExtraCreateParameterList(filter, flags, ecplist as _) } } #[cfg(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: 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); - unsafe { FltAllocateFileLock(core::mem::transmute(completelockcallbackdataroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(unlockroutine.unwrap_or(core::mem::zeroed()))) } + unsafe { FltAllocateFileLock(completelockcallbackdataroutine.unwrap_or(core::mem::zeroed()) as _, unlockroutine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FltAllocateGenericWorkItem() -> PFLT_GENERIC_WORKITEM { @@ -106,23 +106,23 @@ pub unsafe fn FltAllocatePoolAlignedWithTag(instance: PFLT_INSTANCE, pooltype: s #[inline] 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); - unsafe { FltApplyPriorityInfoThread(inputpriorityinfo, core::mem::transmute(outputpriorityinfo.unwrap_or(core::mem::zeroed())), thread) } + unsafe { FltApplyPriorityInfoThread(inputpriorityinfo, outputpriorityinfo.unwrap_or(core::mem::zeroed()) as _, thread) } } #[inline] 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); - unsafe { FltAttachVolume(filter, volume, core::mem::transmute(instancename.unwrap_or(core::mem::zeroed())), core::mem::transmute(retinstance.unwrap_or(core::mem::zeroed()))) } + unsafe { FltAttachVolume(filter, volume, instancename.unwrap_or(core::mem::zeroed()) as _, retinstance.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { FltAttachVolumeAtAltitude(filter, volume, altitude, core::mem::transmute(instancename.unwrap_or(core::mem::zeroed())), core::mem::transmute(retinstance.unwrap_or(core::mem::zeroed()))) } + unsafe { FltAttachVolumeAtAltitude(filter, volume, altitude, instancename.unwrap_or(core::mem::zeroed()) as _, retinstance.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn FltBuildDefaultSecurityDescriptor(securitydescriptor: *mut super::super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, desiredaccess: u32) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltBuildDefaultSecurityDescriptor(securitydescriptor : *mut super::super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, desiredaccess : u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FltBuildDefaultSecurityDescriptor(core::mem::transmute(securitydescriptor), desiredaccess) } + unsafe { FltBuildDefaultSecurityDescriptor(securitydescriptor as _, desiredaccess) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -140,54 +140,54 @@ pub unsafe fn FltCancelIo(callbackdata: *const FLT_CALLBACK_DATA) -> bool { #[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); - unsafe { FltCancellableWaitForMultipleObjects(objectarray.len().try_into().unwrap(), core::mem::transmute(objectarray.as_ptr()), waittype, core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), core::mem::transmute(waitblockarray.unwrap_or(core::mem::zeroed())), callbackdata) } + unsafe { FltCancellableWaitForMultipleObjects(objectarray.len().try_into().unwrap(), core::mem::transmute(objectarray.as_ptr()), waittype, timeout.unwrap_or(core::mem::zeroed()) as _, waitblockarray.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { FltCancellableWaitForSingleObject(object, core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackdata.unwrap_or(core::mem::zeroed()))) } + unsafe { FltCancellableWaitForSingleObject(object, timeout.unwrap_or(core::mem::zeroed()) as _, callbackdata.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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 FltCbdqDisable(cbdq: *mut FLT_CALLBACK_DATA_QUEUE) { windows_targets::link!("fltmgr.sys" "system" fn FltCbdqDisable(cbdq : *mut FLT_CALLBACK_DATA_QUEUE)); - unsafe { FltCbdqDisable(core::mem::transmute(cbdq)) } + unsafe { FltCbdqDisable(cbdq as _) } } #[cfg(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 FltCbdqEnable(cbdq: *mut FLT_CALLBACK_DATA_QUEUE) { windows_targets::link!("fltmgr.sys" "system" fn FltCbdqEnable(cbdq : *mut FLT_CALLBACK_DATA_QUEUE)); - unsafe { FltCbdqEnable(core::mem::transmute(cbdq)) } + unsafe { FltCbdqEnable(cbdq as _) } } #[cfg(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: 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); - unsafe { FltCbdqInitialize(instance, core::mem::transmute(cbdq), cbdqinsertio, cbdqremoveio, cbdqpeeknextio, cbdqacquire, cbdqrelease, cbdqcompletecanceledio) } + unsafe { FltCbdqInitialize(instance, cbdq as _, cbdqinsertio, cbdqremoveio, cbdqpeeknextio, cbdqacquire, cbdqrelease, 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); - unsafe { FltCbdqInsertIo(core::mem::transmute(cbdq), cbd, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(insertcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { FltCbdqInsertIo(cbdq as _, cbd, context.unwrap_or(core::mem::zeroed()) as _, insertcontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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 FltCbdqRemoveIo(cbdq: *mut FLT_CALLBACK_DATA_QUEUE, context: *const super::super::super::System::SystemServices::IO_CSQ_IRP_CONTEXT) -> *mut FLT_CALLBACK_DATA { windows_targets::link!("fltmgr.sys" "system" fn FltCbdqRemoveIo(cbdq : *mut FLT_CALLBACK_DATA_QUEUE, context : *const super::super::super::System::SystemServices:: IO_CSQ_IRP_CONTEXT) -> *mut FLT_CALLBACK_DATA); - unsafe { FltCbdqRemoveIo(core::mem::transmute(cbdq), context) } + unsafe { FltCbdqRemoveIo(cbdq as _, 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 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); - unsafe { FltCbdqRemoveNextIo(core::mem::transmute(cbdq), core::mem::transmute(peekcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { FltCbdqRemoveNextIo(cbdq as _, peekcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FltCheckAndGrowNameControl(namectrl: *mut FLT_NAME_CONTROL, newsize: u16) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltCheckAndGrowNameControl(namectrl : *mut FLT_NAME_CONTROL, newsize : u16) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FltCheckAndGrowNameControl(core::mem::transmute(namectrl), newsize) } + unsafe { FltCheckAndGrowNameControl(namectrl as _, newsize) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -205,19 +205,19 @@ pub unsafe fn FltCheckLockForWriteAccess(filelock: *const super::FILE_LOCK, call #[inline] pub unsafe fn FltCheckOplock(oplock: *const *const core::ffi::c_void, callbackdata: *const FLT_CALLBACK_DATA, context: Option<*const core::ffi::c_void>, waitcompletionroutine: 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); - unsafe { FltCheckOplock(oplock, 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()))) } + unsafe { FltCheckOplock(oplock, callbackdata, context.unwrap_or(core::mem::zeroed()) as _, waitcompletionroutine.unwrap_or(core::mem::zeroed()) as _, prepostcallbackdataroutine.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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: 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); - unsafe { FltCheckOplockEx(oplock, callbackdata, 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()))) } + unsafe { FltCheckOplockEx(oplock, callbackdata, flags, context.unwrap_or(core::mem::zeroed()) as _, waitcompletionroutine.unwrap_or(core::mem::zeroed()) as _, prepostcallbackdataroutine.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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 FltClearCallbackDataDirty(data: *mut FLT_CALLBACK_DATA) { windows_targets::link!("fltmgr.sys" "system" fn FltClearCallbackDataDirty(data : *mut FLT_CALLBACK_DATA)); - unsafe { FltClearCallbackDataDirty(core::mem::transmute(data)) } + unsafe { FltClearCallbackDataDirty(data as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -233,7 +233,7 @@ pub unsafe fn FltClose(filehandle: super::super::super::super::Win32::Foundation #[inline] 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)); - unsafe { FltCloseClientPort(filter, core::mem::transmute(clientport)) } + unsafe { FltCloseClientPort(filter, clientport as _) } } #[inline] pub unsafe fn FltCloseCommunicationPort(serverport: PFLT_PORT) { @@ -249,13 +249,13 @@ pub unsafe fn FltCloseSectionForDataScan(sectioncontext: PFLT_CONTEXT) -> super: #[inline] 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); - unsafe { FltCommitComplete(instance, transaction, core::mem::transmute(transactioncontext.unwrap_or(core::mem::zeroed()))) } + unsafe { FltCommitComplete(instance, transaction, transactioncontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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); - unsafe { FltCommitFinalizeComplete(instance, transaction, core::mem::transmute(transactioncontext.unwrap_or(core::mem::zeroed()))) } + unsafe { FltCommitFinalizeComplete(instance, transaction, transactioncontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FltCompareInstanceAltitudes(instance1: PFLT_INSTANCE, instance2: PFLT_INSTANCE) -> i32 { @@ -272,95 +272,55 @@ 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)); - unsafe { FltCompletePendedPreOperation(callbackdata, callbackstatus, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } + unsafe { FltCompletePendedPreOperation(callbackdata, callbackstatus, context.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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: 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); - unsafe { FltCopyOpenReparseList(filter, data, core::mem::transmute(ecplist)) } + unsafe { FltCopyOpenReparseList(filter, data, ecplist as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] 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); - unsafe { FltCreateCommunicationPort(filter, core::mem::transmute(serverport), objectattributes, core::mem::transmute(serverportcookie.unwrap_or(core::mem::zeroed())), connectnotifycallback, disconnectnotifycallback, core::mem::transmute(messagenotifycallback.unwrap_or(core::mem::zeroed())), maxconnections) } + unsafe { FltCreateCommunicationPort(filter, serverport as _, objectattributes, serverportcookie.unwrap_or(core::mem::zeroed()) as _, connectnotifycallback, disconnectnotifycallback, messagenotifycallback.unwrap_or(core::mem::zeroed()) as _, maxconnections) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", feature = "Win32_System_IO"))] #[inline] 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); - unsafe { FltCreateFile(filter, core::mem::transmute(instance.unwrap_or(core::mem::zeroed())), core::mem::transmute(filehandle), desiredaccess, objectattributes, core::mem::transmute(iostatusblock), core::mem::transmute(allocationsize.unwrap_or(core::mem::zeroed())), fileattributes, shareaccess, createdisposition, createoptions, core::mem::transmute(eabuffer.unwrap_or(core::mem::zeroed())), ealength, flags) } + unsafe { FltCreateFile(filter, instance.unwrap_or(core::mem::zeroed()) as _, filehandle as _, desiredaccess, objectattributes, iostatusblock as _, allocationsize.unwrap_or(core::mem::zeroed()) as _, fileattributes, shareaccess, createdisposition, createoptions, eabuffer.unwrap_or(core::mem::zeroed()) as _, ealength, flags) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] 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); - unsafe { FltCreateFileEx(filter, core::mem::transmute(instance.unwrap_or(core::mem::zeroed())), core::mem::transmute(filehandle), core::mem::transmute(fileobject.unwrap_or(core::mem::zeroed())), desiredaccess, objectattributes, core::mem::transmute(iostatusblock), core::mem::transmute(allocationsize.unwrap_or(core::mem::zeroed())), fileattributes, shareaccess, createdisposition, createoptions, core::mem::transmute(eabuffer.unwrap_or(core::mem::zeroed())), ealength, flags) } + unsafe { FltCreateFileEx(filter, instance.unwrap_or(core::mem::zeroed()) as _, filehandle as _, fileobject.unwrap_or(core::mem::zeroed()) as _, desiredaccess, objectattributes, iostatusblock as _, allocationsize.unwrap_or(core::mem::zeroed()) as _, fileattributes, shareaccess, createdisposition, createoptions, eabuffer.unwrap_or(core::mem::zeroed()) as _, ealength, flags) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] 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); - unsafe { - FltCreateFileEx2( - filter, - core::mem::transmute(instance.unwrap_or(core::mem::zeroed())), - core::mem::transmute(filehandle), - core::mem::transmute(fileobject.unwrap_or(core::mem::zeroed())), - desiredaccess, - objectattributes, - core::mem::transmute(iostatusblock), - core::mem::transmute(allocationsize.unwrap_or(core::mem::zeroed())), - fileattributes, - shareaccess, - createdisposition, - createoptions, - core::mem::transmute(eabuffer.unwrap_or(core::mem::zeroed())), - ealength, - flags, - core::mem::transmute(drivercontext.unwrap_or(core::mem::zeroed())), - ) - } + unsafe { FltCreateFileEx2(filter, instance.unwrap_or(core::mem::zeroed()) as _, filehandle as _, fileobject.unwrap_or(core::mem::zeroed()) as _, desiredaccess, objectattributes, iostatusblock as _, allocationsize.unwrap_or(core::mem::zeroed()) as _, fileattributes, shareaccess, createdisposition, createoptions, eabuffer.unwrap_or(core::mem::zeroed()) as _, ealength, flags, drivercontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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: 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); - unsafe { FltCreateMailslotFile(filter, core::mem::transmute(instance.unwrap_or(core::mem::zeroed())), core::mem::transmute(filehandle), core::mem::transmute(fileobject.unwrap_or(core::mem::zeroed())), desiredaccess, objectattributes, core::mem::transmute(iostatusblock), createoptions, mailslotquota, maximummessagesize, readtimeout, core::mem::transmute(drivercontext.unwrap_or(core::mem::zeroed()))) } + unsafe { FltCreateMailslotFile(filter, instance.unwrap_or(core::mem::zeroed()) as _, filehandle as _, fileobject.unwrap_or(core::mem::zeroed()) as _, desiredaccess, objectattributes, iostatusblock as _, createoptions, mailslotquota, maximummessagesize, readtimeout, drivercontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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: 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); - unsafe { - FltCreateNamedPipeFile( - filter, - core::mem::transmute(instance.unwrap_or(core::mem::zeroed())), - core::mem::transmute(filehandle), - core::mem::transmute(fileobject.unwrap_or(core::mem::zeroed())), - desiredaccess, - objectattributes, - core::mem::transmute(iostatusblock), - shareaccess, - createdisposition, - createoptions, - namedpipetype, - readmode, - completionmode, - maximuminstances, - inboundquota, - outboundquota, - core::mem::transmute(defaulttimeout.unwrap_or(core::mem::zeroed())), - core::mem::transmute(drivercontext.unwrap_or(core::mem::zeroed())), - ) - } + unsafe { FltCreateNamedPipeFile(filter, instance.unwrap_or(core::mem::zeroed()) as _, filehandle as _, fileobject.unwrap_or(core::mem::zeroed()) as _, desiredaccess, objectattributes, iostatusblock as _, shareaccess, createdisposition, createoptions, namedpipetype, readmode, completionmode, maximuminstances, inboundquota, outboundquota, defaulttimeout.unwrap_or(core::mem::zeroed()) as _, drivercontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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: 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); - unsafe { FltCreateSectionForDataScan(instance, fileobject, sectioncontext, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(maximumsize.unwrap_or(core::mem::zeroed())), sectionpageprotection, allocationattributes, flags, core::mem::transmute(sectionhandle), core::mem::transmute(sectionobject), core::mem::transmute(sectionfilesize.unwrap_or(core::mem::zeroed()))) } + unsafe { FltCreateSectionForDataScan(instance, fileobject, sectioncontext, desiredaccess, objectattributes.unwrap_or(core::mem::zeroed()) as _, maximumsize.unwrap_or(core::mem::zeroed()) as _, sectionpageprotection, allocationattributes, flags, sectionhandle as _, sectionobject as _, sectionfilesize.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FltCreateSystemVolumeInformationFolder(instance: PFLT_INSTANCE) -> super::super::super::super::Win32::Foundation::NTSTATUS { @@ -386,7 +346,7 @@ pub unsafe fn FltCurrentOplockH(oplock: *const *const core::ffi::c_void) -> bool #[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); - unsafe { FltDecodeParameters(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()))) } + unsafe { FltDecodeParameters(callbackdata, mdladdresspointer.unwrap_or(core::mem::zeroed()) as _, buffer.unwrap_or(core::mem::zeroed()) as _, length.unwrap_or(core::mem::zeroed()) as _, desiredaccess.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FltDeleteContext(context: PFLT_CONTEXT) { @@ -396,18 +356,18 @@ pub unsafe fn FltDeleteContext(context: PFLT_CONTEXT) { #[inline] 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)); - unsafe { FltDeleteExtraCreateParameterLookasideList(core::mem::transmute(filter.unwrap_or(core::mem::zeroed())), core::mem::transmute(lookaside), flags) } + unsafe { FltDeleteExtraCreateParameterLookasideList(filter.unwrap_or(core::mem::zeroed()) as _, lookaside as _, 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: 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); - unsafe { FltDeleteFileContext(instance, fileobject, core::mem::transmute(oldcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { FltDeleteFileContext(instance, fileobject, oldcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { FltDeleteInstanceContext(instance, core::mem::transmute(oldcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { FltDeleteInstanceContext(instance, oldcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FltDeletePushLock(pushlock: *const usize) { @@ -418,41 +378,41 @@ pub unsafe fn FltDeletePushLock(pushlock: *const usize) { #[inline] 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); - unsafe { FltDeleteStreamContext(instance, fileobject, core::mem::transmute(oldcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { FltDeleteStreamContext(instance, fileobject, oldcontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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: 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); - unsafe { FltDeleteStreamHandleContext(instance, fileobject, core::mem::transmute(oldcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { FltDeleteStreamHandleContext(instance, fileobject, oldcontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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); - unsafe { FltDeleteTransactionContext(instance, transaction, core::mem::transmute(oldcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { FltDeleteTransactionContext(instance, transaction, oldcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { FltDeleteVolumeContext(filter, volume, core::mem::transmute(oldcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { FltDeleteVolumeContext(filter, volume, oldcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { FltDetachVolume(filter, volume, core::mem::transmute(instancename.unwrap_or(core::mem::zeroed()))) } + unsafe { FltDetachVolume(filter, volume, instancename.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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: 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); - unsafe { FltDeviceIoControlFile(instance, fileobject, iocontrolcode, core::mem::transmute(inputbuffer.unwrap_or(core::mem::zeroed())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(core::mem::zeroed())), outputbufferlength, core::mem::transmute(lengthreturned.unwrap_or(core::mem::zeroed()))) } + unsafe { FltDeviceIoControlFile(instance, fileobject, iocontrolcode, inputbuffer.unwrap_or(core::mem::zeroed()) as _, inputbufferlength, outputbuffer.unwrap_or(core::mem::zeroed()) as _, outputbufferlength, lengthreturned.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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) -> bool { 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) -> bool); - unsafe { FltDoCompletionProcessingWhenSafe(data, fltobjects, core::mem::transmute(completioncontext.unwrap_or(core::mem::zeroed())), flags, safepostcallback, core::mem::transmute(retpostoperationstatus)) } + unsafe { FltDoCompletionProcessingWhenSafe(data, fltobjects, completioncontext.unwrap_or(core::mem::zeroed()) as _, flags, safepostcallback, retpostoperationstatus as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -464,58 +424,58 @@ pub unsafe fn FltEnlistInTransaction(instance: PFLT_INSTANCE, transaction: *cons #[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); - unsafe { FltEnumerateFilterInformation(index, informationclass, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(bytesreturned)) } + unsafe { FltEnumerateFilterInformation(index, informationclass, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, bytesreturned as _) } } #[inline] pub unsafe fn FltEnumerateFilters(filterlist: Option<&mut [PFLT_FILTER]>, numberfiltersreturned: *mut u32) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltEnumerateFilters(filterlist : *mut PFLT_FILTER, filterlistsize : u32, numberfiltersreturned : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FltEnumerateFilters(core::mem::transmute(filterlist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), filterlist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(numberfiltersreturned)) } + unsafe { FltEnumerateFilters(core::mem::transmute(filterlist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), filterlist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), numberfiltersreturned as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_Storage_InstallableFileSystems", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[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); - unsafe { FltEnumerateInstanceInformationByDeviceObject(deviceobject, index, informationclass, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(bytesreturned)) } + unsafe { FltEnumerateInstanceInformationByDeviceObject(deviceobject, index, informationclass, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, bytesreturned as _) } } #[cfg(feature = "Win32_Storage_InstallableFileSystems")] #[inline] 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); - unsafe { FltEnumerateInstanceInformationByFilter(filter, index, informationclass, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(bytesreturned)) } + unsafe { FltEnumerateInstanceInformationByFilter(filter, index, informationclass, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, bytesreturned as _) } } #[cfg(feature = "Win32_Storage_InstallableFileSystems")] #[inline] 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); - unsafe { FltEnumerateInstanceInformationByVolume(volume, index, informationclass, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(bytesreturned)) } + unsafe { FltEnumerateInstanceInformationByVolume(volume, index, informationclass, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, bytesreturned as _) } } #[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); - unsafe { FltEnumerateInstanceInformationByVolumeName(volumename, index, informationclass, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(bytesreturned)) } + unsafe { FltEnumerateInstanceInformationByVolumeName(volumename, index, informationclass, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, bytesreturned as _) } } #[inline] 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); - unsafe { 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)) } + unsafe { FltEnumerateInstances(volume.unwrap_or(core::mem::zeroed()) as _, filter.unwrap_or(core::mem::zeroed()) as _, 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()), numberinstancesreturned as _) } } #[cfg(feature = "Win32_Storage_InstallableFileSystems")] #[inline] 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); - unsafe { FltEnumerateVolumeInformation(filter, index, informationclass, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(bytesreturned)) } + unsafe { FltEnumerateVolumeInformation(filter, index, informationclass, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, bytesreturned as _) } } #[inline] 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); - unsafe { FltEnumerateVolumes(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)) } + unsafe { FltEnumerateVolumes(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()), numbervolumesreturned as _) } } #[cfg(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: 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) -> bool { 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) -> bool); - unsafe { FltFastIoMdlRead(initiatinginstance, fileobject, fileoffset, length, lockkey, core::mem::transmute(mdlchain), core::mem::transmute(iostatus)) } + unsafe { FltFastIoMdlRead(initiatinginstance, fileobject, fileoffset, length, lockkey, mdlchain as _, iostatus as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -533,13 +493,13 @@ pub unsafe fn FltFastIoMdlWriteComplete(initiatinginstance: PFLT_INSTANCE, fileo #[inline] 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) -> bool { 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) -> bool); - unsafe { FltFastIoPrepareMdlWrite(initiatinginstance, fileobject, fileoffset, length, lockkey, core::mem::transmute(mdlchain), core::mem::transmute(iostatus)) } + unsafe { FltFastIoPrepareMdlWrite(initiatinginstance, fileobject, fileoffset, length, lockkey, mdlchain as _, iostatus as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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); - unsafe { FltFindExtraCreateParameter(filter, ecplist, ecptype, core::mem::transmute(ecpcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(ecpcontextsize.unwrap_or(core::mem::zeroed()))) } + unsafe { FltFindExtraCreateParameter(filter, ecplist, ecptype, ecpcontext.unwrap_or(core::mem::zeroed()) as _, ecpcontextsize.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -551,7 +511,7 @@ pub unsafe fn FltFlushBuffers(instance: PFLT_INSTANCE, fileobject: *const super: #[inline] 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); - unsafe { FltFlushBuffers2(instance, fileobject, flushtype, core::mem::transmute(callbackdata.unwrap_or(core::mem::zeroed()))) } + unsafe { FltFlushBuffers2(instance, fileobject, flushtype, callbackdata.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -607,30 +567,30 @@ pub unsafe fn FltFreeSecurityDescriptor(securitydescriptor: super::super::super: #[inline] 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); - unsafe { FltFsControlFile(instance, fileobject, fscontrolcode, core::mem::transmute(inputbuffer.unwrap_or(core::mem::zeroed())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(core::mem::zeroed())), outputbufferlength, core::mem::transmute(lengthreturned.unwrap_or(core::mem::zeroed()))) } + unsafe { FltFsControlFile(instance, fileobject, fscontrolcode, inputbuffer.unwrap_or(core::mem::zeroed()) as _, inputbufferlength, outputbuffer.unwrap_or(core::mem::zeroed()) as _, outputbufferlength, lengthreturned.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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 FltGetActivityIdCallbackData(callbackdata: *const FLT_CALLBACK_DATA, guid: *mut windows_core::GUID) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltGetActivityIdCallbackData(callbackdata : *const FLT_CALLBACK_DATA, guid : *mut windows_core::GUID) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FltGetActivityIdCallbackData(callbackdata, core::mem::transmute(guid)) } + unsafe { FltGetActivityIdCallbackData(callbackdata, guid as _) } } #[inline] 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); - unsafe { FltGetBottomInstance(volume, core::mem::transmute(instance)) } + unsafe { FltGetBottomInstance(volume, instance as _) } } #[cfg(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 FltGetContexts(fltobjects: *const FLT_RELATED_OBJECTS, desiredcontexts: u16, contexts: *mut FLT_RELATED_CONTEXTS) { windows_targets::link!("fltmgr.sys" "system" fn FltGetContexts(fltobjects : *const FLT_RELATED_OBJECTS, desiredcontexts : u16, contexts : *mut FLT_RELATED_CONTEXTS)); - unsafe { FltGetContexts(fltobjects, desiredcontexts, core::mem::transmute(contexts)) } + unsafe { FltGetContexts(fltobjects, desiredcontexts, contexts as _) } } #[cfg(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 FltGetContextsEx(fltobjects: *const FLT_RELATED_OBJECTS, desiredcontexts: u16, contextssize: usize, contexts: *mut FLT_RELATED_CONTEXTS_EX) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltGetContextsEx(fltobjects : *const FLT_RELATED_OBJECTS, desiredcontexts : u16, contextssize : usize, contexts : *mut FLT_RELATED_CONTEXTS_EX) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FltGetContextsEx(fltobjects, desiredcontexts, contextssize, core::mem::transmute(contexts)) } + unsafe { FltGetContextsEx(fltobjects, desiredcontexts, contextssize, contexts as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -639,82 +599,82 @@ where 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); - unsafe { FltGetDestinationFileNameInformation(instance, fileobject, core::mem::transmute(rootdirectory.unwrap_or(core::mem::zeroed())), filename.param().abi(), filenamelength, nameoptions, core::mem::transmute(retfilenameinformation)) } + unsafe { FltGetDestinationFileNameInformation(instance, fileobject, rootdirectory.unwrap_or(core::mem::zeroed()) as _, filename.param().abi(), filenamelength, nameoptions, retfilenameinformation as _) } } #[cfg(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: 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); - unsafe { FltGetDeviceObject(volume, core::mem::transmute(deviceobject)) } + unsafe { FltGetDeviceObject(volume, deviceobject as _) } } #[cfg(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: 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); - unsafe { FltGetDiskDeviceObject(volume, core::mem::transmute(diskdeviceobject)) } + unsafe { FltGetDiskDeviceObject(volume, diskdeviceobject as _) } } #[cfg(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: 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); - unsafe { FltGetEcpListFromCallbackData(filter, callbackdata, core::mem::transmute(ecplist)) } + unsafe { FltGetEcpListFromCallbackData(filter, callbackdata, ecplist as _) } } #[cfg(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: 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); - unsafe { FltGetFileContext(instance, fileobject, core::mem::transmute(context)) } + unsafe { FltGetFileContext(instance, fileobject, context as _) } } #[cfg(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 FltGetFileNameInformation(callbackdata: *const FLT_CALLBACK_DATA, nameoptions: u32, filenameinformation: *mut *mut FLT_FILE_NAME_INFORMATION) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltGetFileNameInformation(callbackdata : *const FLT_CALLBACK_DATA, nameoptions : u32, filenameinformation : *mut *mut FLT_FILE_NAME_INFORMATION) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FltGetFileNameInformation(callbackdata, nameoptions, core::mem::transmute(filenameinformation)) } + unsafe { FltGetFileNameInformation(callbackdata, nameoptions, filenameinformation as _) } } #[cfg(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: 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); - unsafe { FltGetFileNameInformationUnsafe(fileobject, core::mem::transmute(instance.unwrap_or(core::mem::zeroed())), nameoptions, core::mem::transmute(filenameinformation)) } + unsafe { FltGetFileNameInformationUnsafe(fileobject, instance.unwrap_or(core::mem::zeroed()) as _, nameoptions, filenameinformation as _) } } #[cfg(feature = "Win32_Storage_InstallableFileSystems")] #[inline] pub unsafe fn FltGetFileSystemType(fltobject: *const core::ffi::c_void, filesystemtype: *mut super::super::super::super::Win32::Storage::InstallableFileSystems::FLT_FILESYSTEM_TYPE) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltGetFileSystemType(fltobject : *const core::ffi::c_void, filesystemtype : *mut super::super::super::super::Win32::Storage::InstallableFileSystems:: FLT_FILESYSTEM_TYPE) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FltGetFileSystemType(fltobject, core::mem::transmute(filesystemtype)) } + unsafe { FltGetFileSystemType(fltobject, filesystemtype as _) } } #[inline] 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); - unsafe { FltGetFilterFromInstance(instance, core::mem::transmute(retfilter)) } + unsafe { FltGetFilterFromInstance(instance, retfilter as _) } } #[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 { windows_targets::link!("fltmgr.sys" "system" fn FltGetFilterFromName(filtername : *const super::super::super::super::Win32::Foundation:: UNICODE_STRING, retfilter : *mut PFLT_FILTER) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FltGetFilterFromName(filtername, core::mem::transmute(retfilter)) } + unsafe { FltGetFilterFromName(filtername, retfilter as _) } } #[cfg(feature = "Win32_Storage_InstallableFileSystems")] #[inline] 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); - unsafe { FltGetFilterInformation(filter, informationclass, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(bytesreturned)) } + unsafe { FltGetFilterInformation(filter, informationclass, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, bytesreturned as _) } } #[cfg(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 FltGetFsZeroingOffset(data: *const FLT_CALLBACK_DATA, zeroingoffset: *mut u32) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltGetFsZeroingOffset(data : *const FLT_CALLBACK_DATA, zeroingoffset : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FltGetFsZeroingOffset(data, core::mem::transmute(zeroingoffset)) } + unsafe { FltGetFsZeroingOffset(data, zeroingoffset as _) } } #[inline] 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); - unsafe { FltGetInstanceContext(instance, core::mem::transmute(context)) } + unsafe { FltGetInstanceContext(instance, context as _) } } #[cfg(feature = "Win32_Storage_InstallableFileSystems")] #[inline] 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); - unsafe { FltGetInstanceInformation(instance, informationclass, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(bytesreturned)) } + unsafe { FltGetInstanceInformation(instance, informationclass, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, bytesreturned as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -754,7 +714,7 @@ pub unsafe fn FltGetIrpName(irpmajorcode: u8) -> windows_core::PSTR { #[inline] 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); - unsafe { FltGetLowerInstance(currentinstance, core::mem::transmute(lowerinstance)) } + unsafe { FltGetLowerInstance(currentinstance, lowerinstance as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -766,7 +726,7 @@ pub unsafe fn FltGetNewSystemBufferAddress(callbackdata: *const FLT_CALLBACK_DAT #[inline] 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); - unsafe { FltGetNextExtraCreateParameter(filter, 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()))) } + unsafe { FltGetNextExtraCreateParameter(filter, ecplist, currentecpcontext.unwrap_or(core::mem::zeroed()) as _, nextecptype.unwrap_or(core::mem::zeroed()) as _, nextecpcontext.unwrap_or(core::mem::zeroed()) as _, nextecpcontextsize.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -790,7 +750,7 @@ pub unsafe fn FltGetRequestorProcessIdEx(callbackdata: *const FLT_CALLBACK_DATA) #[inline] pub unsafe fn FltGetRequestorSessionId(callbackdata: *const FLT_CALLBACK_DATA, sessionid: *mut u32) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltGetRequestorSessionId(callbackdata : *const FLT_CALLBACK_DATA, sessionid : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FltGetRequestorSessionId(callbackdata, core::mem::transmute(sessionid)) } + unsafe { FltGetRequestorSessionId(callbackdata, sessionid as _) } } #[inline] pub unsafe fn FltGetRoutineAddress(fltmgrroutinename: P0) -> *mut core::ffi::c_void @@ -804,19 +764,19 @@ where #[inline] 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); - unsafe { FltGetSectionContext(instance, fileobject, core::mem::transmute(context)) } + unsafe { FltGetSectionContext(instance, fileobject, context as _) } } #[cfg(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: 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); - unsafe { FltGetStreamContext(instance, fileobject, core::mem::transmute(context)) } + unsafe { FltGetStreamContext(instance, fileobject, context as _) } } #[cfg(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: 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); - unsafe { FltGetStreamHandleContext(instance, fileobject, core::mem::transmute(context)) } + unsafe { FltGetStreamHandleContext(instance, fileobject, context as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -827,93 +787,93 @@ pub unsafe fn FltGetSwappedBufferMdlAddress(callbackdata: *const FLT_CALLBACK_DA #[inline] 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); - unsafe { FltGetTopInstance(volume, core::mem::transmute(instance)) } + unsafe { FltGetTopInstance(volume, instance as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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); - unsafe { FltGetTransactionContext(instance, transaction, core::mem::transmute(context)) } + unsafe { FltGetTransactionContext(instance, transaction, context as _) } } #[cfg(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 FltGetTunneledName(callbackdata: *const FLT_CALLBACK_DATA, filenameinformation: *const FLT_FILE_NAME_INFORMATION, rettunneledfilenameinformation: *mut *mut FLT_FILE_NAME_INFORMATION) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltGetTunneledName(callbackdata : *const FLT_CALLBACK_DATA, filenameinformation : *const FLT_FILE_NAME_INFORMATION, rettunneledfilenameinformation : *mut *mut FLT_FILE_NAME_INFORMATION) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FltGetTunneledName(callbackdata, filenameinformation, core::mem::transmute(rettunneledfilenameinformation)) } + unsafe { FltGetTunneledName(callbackdata, filenameinformation, rettunneledfilenameinformation as _) } } #[inline] 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); - unsafe { FltGetUpperInstance(currentinstance, core::mem::transmute(upperinstance)) } + unsafe { FltGetUpperInstance(currentinstance, upperinstance as _) } } #[inline] 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); - unsafe { FltGetVolumeContext(filter, volume, core::mem::transmute(context)) } + unsafe { FltGetVolumeContext(filter, volume, context as _) } } #[cfg(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: 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); - unsafe { FltGetVolumeFromDeviceObject(filter, deviceobject, core::mem::transmute(retvolume)) } + unsafe { FltGetVolumeFromDeviceObject(filter, deviceobject, retvolume as _) } } #[cfg(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: 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); - unsafe { FltGetVolumeFromFileObject(filter, fileobject, core::mem::transmute(retvolume)) } + unsafe { FltGetVolumeFromFileObject(filter, fileobject, retvolume as _) } } #[inline] 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); - unsafe { FltGetVolumeFromInstance(instance, core::mem::transmute(retvolume)) } + unsafe { FltGetVolumeFromInstance(instance, retvolume as _) } } #[inline] 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); - unsafe { FltGetVolumeFromName(filter, volumename, core::mem::transmute(retvolume)) } + unsafe { FltGetVolumeFromName(filter, volumename, retvolume as _) } } #[inline] 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); - unsafe { FltGetVolumeGuidName(volume, core::mem::transmute(volumeguidname.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersizeneeded.unwrap_or(core::mem::zeroed()))) } + unsafe { FltGetVolumeGuidName(volume, volumeguidname.unwrap_or(core::mem::zeroed()) as _, buffersizeneeded.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Storage_InstallableFileSystems")] #[inline] 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); - unsafe { FltGetVolumeInformation(volume, informationclass, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(bytesreturned)) } + unsafe { FltGetVolumeInformation(volume, informationclass, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, bytesreturned as _) } } #[inline] 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); - unsafe { FltGetVolumeInstanceFromName(core::mem::transmute(filter.unwrap_or(core::mem::zeroed())), volume, core::mem::transmute(instancename.unwrap_or(core::mem::zeroed())), core::mem::transmute(retinstance)) } + unsafe { FltGetVolumeInstanceFromName(filter.unwrap_or(core::mem::zeroed()) as _, volume, instancename.unwrap_or(core::mem::zeroed()) as _, retinstance as _) } } #[inline] 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); - unsafe { FltGetVolumeName(volume, core::mem::transmute(volumename.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersizeneeded.unwrap_or(core::mem::zeroed()))) } + unsafe { FltGetVolumeName(volume, volumename.unwrap_or(core::mem::zeroed()) as _, buffersizeneeded.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { FltGetVolumeProperties(volume, core::mem::transmute(volumeproperties.unwrap_or(core::mem::zeroed())), volumepropertieslength, core::mem::transmute(lengthreturned)) } + unsafe { FltGetVolumeProperties(volume, volumeproperties.unwrap_or(core::mem::zeroed()) as _, volumepropertieslength, lengthreturned as _) } } #[inline] 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)); - unsafe { FltInitExtraCreateParameterLookasideList(filter, core::mem::transmute(lookaside), flags, size, tag) } + unsafe { FltInitExtraCreateParameterLookasideList(filter, lookaside as _, flags, size, 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] pub unsafe fn FltInitializeFileLock(filelock: *mut super::FILE_LOCK) { windows_targets::link!("fltmgr.sys" "system" fn FltInitializeFileLock(filelock : *mut super:: FILE_LOCK)); - unsafe { FltInitializeFileLock(core::mem::transmute(filelock)) } + unsafe { FltInitializeFileLock(filelock as _) } } #[inline] pub unsafe fn FltInitializeOplock(oplock: *mut *mut core::ffi::c_void) { windows_targets::link!("fltmgr.sys" "system" fn FltInitializeOplock(oplock : *mut *mut core::ffi::c_void)); - unsafe { FltInitializeOplock(core::mem::transmute(oplock)) } + unsafe { FltInitializeOplock(oplock as _) } } #[inline] pub unsafe fn FltInitializePushLock() -> usize { @@ -928,13 +888,13 @@ pub unsafe fn FltInitializePushLock() -> usize { #[inline] 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); - unsafe { FltInsertExtraCreateParameter(filter, core::mem::transmute(ecplist), core::mem::transmute(ecpcontext)) } + unsafe { FltInsertExtraCreateParameter(filter, ecplist as _, ecpcontext as _) } } #[cfg(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>) -> bool { windows_targets::link!("fltmgr.sys" "system" fn FltIs32bitProcess(callbackdata : *const FLT_CALLBACK_DATA) -> bool); - unsafe { FltIs32bitProcess(core::mem::transmute(callbackdata.unwrap_or(core::mem::zeroed()))) } + unsafe { FltIs32bitProcess(callbackdata.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -946,7 +906,7 @@ pub unsafe fn FltIsCallbackDataDirty(data: *const FLT_CALLBACK_DATA) -> bool { #[inline] pub unsafe fn FltIsDirectory(fileobject: *const super::super::super::Foundation::FILE_OBJECT, instance: PFLT_INSTANCE, isdirectory: *mut bool) -> 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 bool) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FltIsDirectory(fileobject, instance, core::mem::transmute(isdirectory)) } + unsafe { FltIsDirectory(fileobject, instance, isdirectory as _) } } #[inline] pub unsafe fn FltIsEcpAcknowledged(filter: PFLT_FILTER, ecpcontext: *const core::ffi::c_void) -> bool { @@ -973,13 +933,13 @@ pub unsafe fn FltIsIoCanceled(callbackdata: *const FLT_CALLBACK_DATA) -> bool { #[inline] pub unsafe fn FltIsIoRedirectionAllowed(sourceinstance: PFLT_INSTANCE, targetinstance: PFLT_INSTANCE, redirectionallowed: *mut bool) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltIsIoRedirectionAllowed(sourceinstance : PFLT_INSTANCE, targetinstance : PFLT_INSTANCE, redirectionallowed : *mut bool) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FltIsIoRedirectionAllowed(sourceinstance, targetinstance, core::mem::transmute(redirectionallowed)) } + unsafe { FltIsIoRedirectionAllowed(sourceinstance, targetinstance, redirectionallowed as _) } } #[cfg(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: PFLT_INSTANCE, redirectionallowedthisio: *mut bool, redirectionallowedallio: Option<*mut bool>) -> 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 bool, redirectionallowedallio : *mut bool) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FltIsIoRedirectionAllowedForOperation(data, targetinstance, core::mem::transmute(redirectionallowedthisio), core::mem::transmute(redirectionallowedallio.unwrap_or(core::mem::zeroed()))) } + unsafe { FltIsIoRedirectionAllowedForOperation(data, targetinstance, redirectionallowedthisio as _, redirectionallowedallio.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -990,12 +950,12 @@ pub unsafe fn FltIsOperationSynchronous(callbackdata: *const FLT_CALLBACK_DATA) #[inline] pub unsafe fn FltIsVolumeSnapshot(fltobject: *const core::ffi::c_void, issnapshotvolume: *mut bool) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltIsVolumeSnapshot(fltobject : *const core::ffi::c_void, issnapshotvolume : *mut bool) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FltIsVolumeSnapshot(fltobject, core::mem::transmute(issnapshotvolume)) } + unsafe { FltIsVolumeSnapshot(fltobject, issnapshotvolume as _) } } #[inline] pub unsafe fn FltIsVolumeWritable(fltobject: *const core::ffi::c_void, iswritable: *mut bool) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltIsVolumeWritable(fltobject : *const core::ffi::c_void, iswritable : *mut bool) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FltIsVolumeWritable(fltobject, core::mem::transmute(iswritable)) } + unsafe { FltIsVolumeWritable(fltobject, iswritable as _) } } #[inline] pub unsafe fn FltLoadFilter(filtername: *const super::super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::super::Win32::Foundation::NTSTATUS { @@ -1012,41 +972,41 @@ pub unsafe fn FltLockUserBuffer(callbackdata: *const FLT_CALLBACK_DATA) -> super #[inline] 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: bool, ignorebuffer: bool, completionfilter: u32, notifycallbackdata: *const FLT_CALLBACK_DATA, traversecallback: Option, subjectcontext: Option<*const super::super::super::Foundation::SECURITY_SUBJECT_CONTEXT>, filtercallback: Option) { 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 : bool, ignorebuffer : bool, 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)); - unsafe { FltNotifyFilterChangeDirectory(notifysync, core::mem::transmute(notifylist), fscontext, fulldirectoryname, watchtree, ignorebuffer, completionfilter, 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()))) } + unsafe { FltNotifyFilterChangeDirectory(notifysync, notifylist as _, fscontext, fulldirectoryname, watchtree, ignorebuffer, completionfilter, notifycallbackdata, traversecallback.unwrap_or(core::mem::zeroed()) as _, subjectcontext.unwrap_or(core::mem::zeroed()) as _, filtercallback.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FltObjectDereference(fltobject: *mut core::ffi::c_void) { windows_targets::link!("fltmgr.sys" "system" fn FltObjectDereference(fltobject : *mut core::ffi::c_void)); - unsafe { FltObjectDereference(core::mem::transmute(fltobject)) } + unsafe { FltObjectDereference(fltobject as _) } } #[inline] pub unsafe fn FltObjectReference(fltobject: *mut core::ffi::c_void) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltObjectReference(fltobject : *mut core::ffi::c_void) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FltObjectReference(core::mem::transmute(fltobject)) } + unsafe { FltObjectReference(fltobject as _) } } #[cfg(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: 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); - unsafe { FltOpenVolume(instance, core::mem::transmute(volumehandle), core::mem::transmute(volumefileobject.unwrap_or(core::mem::zeroed()))) } + unsafe { FltOpenVolume(instance, volumehandle as _, volumefileobject.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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: 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); - unsafe { FltOplockBreakH(oplock, callbackdata, 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()))) } + unsafe { FltOplockBreakH(oplock, callbackdata, flags, context.unwrap_or(core::mem::zeroed()) as _, waitcompletionroutine.unwrap_or(core::mem::zeroed()) as _, prepostcallbackdataroutine.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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: 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); - unsafe { FltOplockBreakToNone(oplock, 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()))) } + unsafe { FltOplockBreakToNone(oplock, callbackdata, context.unwrap_or(core::mem::zeroed()) as _, waitcompletionroutine.unwrap_or(core::mem::zeroed()) as _, prepostcallbackdataroutine.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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: 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); - unsafe { FltOplockBreakToNoneEx(oplock, callbackdata, 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()))) } + unsafe { FltOplockBreakToNoneEx(oplock, callbackdata, flags, context.unwrap_or(core::mem::zeroed()) as _, waitcompletionroutine.unwrap_or(core::mem::zeroed()) as _, prepostcallbackdataroutine.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1075,41 +1035,41 @@ 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>) -> bool { windows_targets::link!("fltmgr.sys" "system" fn FltOplockKeysEqual(fo1 : *const super::super::super::Foundation:: FILE_OBJECT, fo2 : *const super::super::super::Foundation:: FILE_OBJECT) -> bool); - unsafe { FltOplockKeysEqual(core::mem::transmute(fo1.unwrap_or(core::mem::zeroed())), core::mem::transmute(fo2.unwrap_or(core::mem::zeroed()))) } + unsafe { FltOplockKeysEqual(fo1.unwrap_or(core::mem::zeroed()) as _, fo2.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { FltParseFileName(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()))) } + unsafe { FltParseFileName(filename, extension.unwrap_or(core::mem::zeroed()) as _, stream.unwrap_or(core::mem::zeroed()) as _, finalcomponent.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FltParseFileNameInformation(filenameinformation: *mut FLT_FILE_NAME_INFORMATION) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltParseFileNameInformation(filenameinformation : *mut FLT_FILE_NAME_INFORMATION) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FltParseFileNameInformation(core::mem::transmute(filenameinformation)) } + unsafe { FltParseFileNameInformation(filenameinformation as _) } } #[cfg(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 FltPerformAsynchronousIo(callbackdata: *mut FLT_CALLBACK_DATA, callbackroutine: PFLT_COMPLETED_ASYNC_IO_CALLBACK, callbackcontext: *const core::ffi::c_void) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltPerformAsynchronousIo(callbackdata : *mut FLT_CALLBACK_DATA, callbackroutine : PFLT_COMPLETED_ASYNC_IO_CALLBACK, callbackcontext : *const core::ffi::c_void) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FltPerformAsynchronousIo(core::mem::transmute(callbackdata), callbackroutine, callbackcontext) } + unsafe { FltPerformAsynchronousIo(callbackdata as _, callbackroutine, callbackcontext) } } #[cfg(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 FltPerformSynchronousIo(callbackdata: *mut FLT_CALLBACK_DATA) { windows_targets::link!("fltmgr.sys" "system" fn FltPerformSynchronousIo(callbackdata : *mut FLT_CALLBACK_DATA)); - unsafe { FltPerformSynchronousIo(core::mem::transmute(callbackdata)) } + unsafe { FltPerformSynchronousIo(callbackdata as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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); - unsafe { FltPrePrepareComplete(instance, transaction, core::mem::transmute(transactioncontext.unwrap_or(core::mem::zeroed()))) } + unsafe { FltPrePrepareComplete(instance, transaction, transactioncontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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); - unsafe { FltPrepareComplete(instance, transaction, core::mem::transmute(transactioncontext.unwrap_or(core::mem::zeroed()))) } + unsafe { FltPrepareComplete(instance, transaction, transactioncontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FltPrepareToReuseEcp(filter: PFLT_FILTER, ecpcontext: *const core::ffi::c_void) { @@ -1120,79 +1080,79 @@ pub unsafe fn FltPrepareToReuseEcp(filter: PFLT_FILTER, ecpcontext: *const core: #[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); - unsafe { FltProcessFileLock(filelock, callbackdata, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } + unsafe { FltProcessFileLock(filelock, callbackdata, context.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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 FltPropagateActivityIdToThread(callbackdata: *const FLT_CALLBACK_DATA, propagateid: *mut windows_core::GUID, originalid: *mut *mut windows_core::GUID) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltPropagateActivityIdToThread(callbackdata : *const FLT_CALLBACK_DATA, propagateid : *mut windows_core::GUID, originalid : *mut *mut windows_core::GUID) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FltPropagateActivityIdToThread(callbackdata, core::mem::transmute(propagateid), core::mem::transmute(originalid)) } + unsafe { FltPropagateActivityIdToThread(callbackdata, propagateid as _, originalid as _) } } #[cfg(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 FltPropagateIrpExtension(sourcedata: *const FLT_CALLBACK_DATA, targetdata: *mut FLT_CALLBACK_DATA, flags: u32) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltPropagateIrpExtension(sourcedata : *const FLT_CALLBACK_DATA, targetdata : *mut FLT_CALLBACK_DATA, flags : u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FltPropagateIrpExtension(sourcedata, core::mem::transmute(targetdata), flags) } + unsafe { FltPropagateIrpExtension(sourcedata, targetdata as _, 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 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); - unsafe { FltPurgeFileNameInformationCache(instance, core::mem::transmute(fileobject.unwrap_or(core::mem::zeroed()))) } + unsafe { FltPurgeFileNameInformationCache(instance, fileobject.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, fileinformation: *mut core::ffi::c_void, length: u32, fileinformationclass: super::FILE_INFORMATION_CLASS, returnsingleentry: bool, filename: Option<*const super::super::super::super::Win32::Foundation::UNICODE_STRING>, restartscan: bool, lengthreturned: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, filename : *const super::super::super::super::Win32::Foundation:: UNICODE_STRING, restartscan : bool, lengthreturned : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FltQueryDirectoryFile(instance, fileobject, core::mem::transmute(fileinformation), length, fileinformationclass, returnsingleentry, core::mem::transmute(filename.unwrap_or(core::mem::zeroed())), restartscan, core::mem::transmute(lengthreturned.unwrap_or(core::mem::zeroed()))) } + unsafe { FltQueryDirectoryFile(instance, fileobject, fileinformation as _, length, fileinformationclass, returnsingleentry, filename.unwrap_or(core::mem::zeroed()) as _, restartscan, lengthreturned.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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: 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); - unsafe { FltQueryDirectoryFileEx(instance, fileobject, core::mem::transmute(fileinformation), length, fileinformationclass, queryflags, core::mem::transmute(filename.unwrap_or(core::mem::zeroed())), core::mem::transmute(lengthreturned.unwrap_or(core::mem::zeroed()))) } + unsafe { FltQueryDirectoryFileEx(instance, fileobject, fileinformation as _, length, fileinformationclass, queryflags, filename.unwrap_or(core::mem::zeroed()) as _, lengthreturned.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, returnedeadata: *mut core::ffi::c_void, length: u32, returnsingleentry: bool, ealist: Option<*const core::ffi::c_void>, ealistlength: u32, eaindex: Option<*const u32>, restartscan: bool, lengthreturned: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, ealist : *const core::ffi::c_void, ealistlength : u32, eaindex : *const u32, restartscan : bool, lengthreturned : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FltQueryEaFile(instance, fileobject, core::mem::transmute(returnedeadata), length, returnsingleentry, core::mem::transmute(ealist.unwrap_or(core::mem::zeroed())), ealistlength, core::mem::transmute(eaindex.unwrap_or(core::mem::zeroed())), restartscan, core::mem::transmute(lengthreturned.unwrap_or(core::mem::zeroed()))) } + unsafe { FltQueryEaFile(instance, fileobject, returnedeadata as _, length, returnsingleentry, ealist.unwrap_or(core::mem::zeroed()) as _, ealistlength, eaindex.unwrap_or(core::mem::zeroed()) as _, restartscan, lengthreturned.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO"))] #[inline] 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); - unsafe { FltQueryInformationByName(filter, core::mem::transmute(instance.unwrap_or(core::mem::zeroed())), objectattributes, core::mem::transmute(iostatusblock), core::mem::transmute(fileinformation), length, fileinformationclass, core::mem::transmute(drivercontext.unwrap_or(core::mem::zeroed()))) } + unsafe { FltQueryInformationByName(filter, instance.unwrap_or(core::mem::zeroed()) as _, objectattributes, iostatusblock as _, fileinformation as _, length, fileinformationclass, drivercontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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: 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); - unsafe { FltQueryInformationFile(instance, fileobject, core::mem::transmute(fileinformation), length, fileinformationclass, core::mem::transmute(lengthreturned.unwrap_or(core::mem::zeroed()))) } + unsafe { FltQueryInformationFile(instance, fileobject, fileinformation as _, length, fileinformationclass, lengthreturned.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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: 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: bool, sidlist: Option<*const core::ffi::c_void>, sidlistlength: u32, startsid: Option<*const u32>, restartscan: bool, lengthreturned: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, sidlist : *const core::ffi::c_void, sidlistlength : u32, startsid : *const u32, restartscan : bool, lengthreturned : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FltQueryQuotaInformationFile(instance, fileobject, core::mem::transmute(iostatusblock), core::mem::transmute(buffer), length, returnsingleentry, core::mem::transmute(sidlist.unwrap_or(core::mem::zeroed())), sidlistlength, core::mem::transmute(startsid.unwrap_or(core::mem::zeroed())), restartscan, core::mem::transmute(lengthreturned.unwrap_or(core::mem::zeroed()))) } + unsafe { FltQueryQuotaInformationFile(instance, fileobject, iostatusblock as _, buffer as _, length, returnsingleentry, sidlist.unwrap_or(core::mem::zeroed()) as _, sidlistlength, startsid.unwrap_or(core::mem::zeroed()) as _, restartscan, lengthreturned.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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: 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); - unsafe { FltQuerySecurityObject(instance, fileobject, securityinformation, core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), length, core::mem::transmute(lengthneeded.unwrap_or(core::mem::zeroed()))) } + unsafe { FltQuerySecurityObject(instance, fileobject, securityinformation, securitydescriptor.unwrap_or(core::mem::zeroed()) as _, length, lengthneeded.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { FltQueryVolumeInformation(instance, core::mem::transmute(iosb), core::mem::transmute(fsinformation), length, fsinformationclass) } + unsafe { FltQueryVolumeInformation(instance, iosb as _, fsinformation as _, length, 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: 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); - unsafe { FltQueryVolumeInformationFile(instance, fileobject, core::mem::transmute(fsinformation), length, fsinformationclass, core::mem::transmute(lengthreturned.unwrap_or(core::mem::zeroed()))) } + unsafe { FltQueryVolumeInformationFile(instance, fileobject, fsinformation as _, length, fsinformationclass, lengthreturned.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1204,33 +1164,19 @@ pub unsafe fn FltQueueDeferredIoWorkItem(fltworkitem: PFLT_DEFERRED_IO_WORKITEM, #[inline] 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); - unsafe { FltQueueGenericWorkItem(fltworkitem, fltobject, workerroutine, queuetype, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } + unsafe { FltQueueGenericWorkItem(fltworkitem, fltobject, workerroutine, queuetype, context.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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: 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); - unsafe { FltReadFile(initiatinginstance, fileobject, core::mem::transmute(byteoffset.unwrap_or(core::mem::zeroed())), length, core::mem::transmute(buffer), 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()))) } + unsafe { FltReadFile(initiatinginstance, fileobject, byteoffset.unwrap_or(core::mem::zeroed()) as _, length, buffer as _, flags, bytesread.unwrap_or(core::mem::zeroed()) as _, callbackroutine.unwrap_or(core::mem::zeroed()) as _, callbackcontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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: 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); - unsafe { - FltReadFileEx( - initiatinginstance, - fileobject, - core::mem::transmute(byteoffset.unwrap_or(core::mem::zeroed())), - length, - core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), - 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())), - core::mem::transmute(key.unwrap_or(core::mem::zeroed())), - core::mem::transmute(mdl.unwrap_or(core::mem::zeroed())), - ) - } + unsafe { FltReadFileEx(initiatinginstance, fileobject, byteoffset.unwrap_or(core::mem::zeroed()) as _, length, buffer.unwrap_or(core::mem::zeroed()) as _, flags, bytesread.unwrap_or(core::mem::zeroed()) as _, callbackroutine.unwrap_or(core::mem::zeroed()) as _, callbackcontext.unwrap_or(core::mem::zeroed()) as _, key.unwrap_or(core::mem::zeroed()) as _, mdl.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FltReferenceContext(context: PFLT_CONTEXT) { @@ -1246,7 +1192,7 @@ pub unsafe fn FltReferenceFileNameInformation(filenameinformation: *const FLT_FI #[inline] pub unsafe fn FltRegisterFilter(driver: *const super::super::super::Foundation::DRIVER_OBJECT, registration: *const FLT_REGISTRATION, retfilter: *mut PFLT_FILTER) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltRegisterFilter(driver : *const super::super::super::Foundation:: DRIVER_OBJECT, registration : *const FLT_REGISTRATION, retfilter : *mut PFLT_FILTER) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FltRegisterFilter(driver, registration, core::mem::transmute(retfilter)) } + unsafe { FltRegisterFilter(driver, registration, retfilter as _) } } #[inline] pub unsafe fn FltRegisterForDataScan(instance: PFLT_INSTANCE) -> super::super::super::super::Win32::Foundation::NTSTATUS { @@ -1282,24 +1228,24 @@ pub unsafe fn FltReleaseFileNameInformation(filenameinformation: *const FLT_FILE #[inline] pub unsafe fn FltReleasePushLock(pushlock: *mut usize) { windows_targets::link!("fltmgr.sys" "system" fn FltReleasePushLock(pushlock : *mut usize)); - unsafe { FltReleasePushLock(core::mem::transmute(pushlock)) } + unsafe { FltReleasePushLock(pushlock as _) } } #[inline] pub unsafe fn FltReleasePushLockEx(pushlock: *mut usize, flags: u32) { windows_targets::link!("fltmgr.sys" "system" fn FltReleasePushLockEx(pushlock : *mut usize, flags : u32)); - unsafe { FltReleasePushLockEx(core::mem::transmute(pushlock), flags) } + unsafe { FltReleasePushLockEx(pushlock as _, flags) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn FltReleaseResource(resource: *mut super::super::super::Foundation::ERESOURCE) { windows_targets::link!("fltmgr.sys" "system" fn FltReleaseResource(resource : *mut super::super::super::Foundation:: ERESOURCE)); - unsafe { FltReleaseResource(core::mem::transmute(resource)) } + unsafe { FltReleaseResource(resource as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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); - unsafe { FltRemoveExtraCreateParameter(filter, core::mem::transmute(ecplist), ecptype, core::mem::transmute(ecpcontext), core::mem::transmute(ecpcontextsize.unwrap_or(core::mem::zeroed()))) } + unsafe { FltRemoveExtraCreateParameter(filter, ecplist as _, ecptype, ecpcontext as _, ecpcontextsize.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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,7 +1263,7 @@ pub unsafe fn FltRequestFileInfoOnCreateCompletion(filter: PFLT_FILTER, data: *c #[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); - unsafe { FltRequestOperationStatusCallback(data, callbackroutine, core::mem::transmute(requestercontext.unwrap_or(core::mem::zeroed()))) } + unsafe { FltRequestOperationStatusCallback(data, callbackroutine, requestercontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1329,54 +1275,54 @@ pub unsafe fn FltRetainSwappedBufferMdlAddress(callbackdata: *const FLT_CALLBACK #[inline] 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); - unsafe { FltRetrieveFileInfoOnCreateCompletion(filter, data, infoclass, core::mem::transmute(size)) } + unsafe { FltRetrieveFileInfoOnCreateCompletion(filter, data, infoclass, size as _) } } #[cfg(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: 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); - unsafe { FltRetrieveFileInfoOnCreateCompletionEx(filter, data, infoclass, core::mem::transmute(retinfosize), core::mem::transmute(retinfobuffer)) } + unsafe { FltRetrieveFileInfoOnCreateCompletionEx(filter, data, infoclass, retinfosize as _, retinfobuffer as _) } } #[cfg(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: 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); - unsafe { 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)) } + unsafe { FltRetrieveIoPriorityInfo(data.unwrap_or(core::mem::zeroed()) as _, fileobject.unwrap_or(core::mem::zeroed()) as _, thread.unwrap_or(core::mem::zeroed()) as _, priorityinfo as _) } } #[cfg(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 FltReuseCallbackData(callbackdata: *mut FLT_CALLBACK_DATA) { windows_targets::link!("fltmgr.sys" "system" fn FltReuseCallbackData(callbackdata : *mut FLT_CALLBACK_DATA)); - unsafe { FltReuseCallbackData(core::mem::transmute(callbackdata)) } + unsafe { FltReuseCallbackData(callbackdata as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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); - unsafe { FltRollbackComplete(instance, transaction, core::mem::transmute(transactioncontext.unwrap_or(core::mem::zeroed()))) } + unsafe { FltRollbackComplete(instance, transaction, transactioncontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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); - unsafe { FltRollbackEnlistment(instance, transaction, core::mem::transmute(transactioncontext.unwrap_or(core::mem::zeroed()))) } + unsafe { FltRollbackEnlistment(instance, transaction, transactioncontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { FltSendMessage(filter, clientport, senderbuffer, 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()))) } + unsafe { FltSendMessage(filter, clientport, senderbuffer, senderbufferlength, replybuffer.unwrap_or(core::mem::zeroed()) as _, replylength.unwrap_or(core::mem::zeroed()) as _, timeout.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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); - unsafe { FltSetActivityIdCallbackData(core::mem::transmute(callbackdata), core::mem::transmute(guid.unwrap_or(core::mem::zeroed()))) } + unsafe { FltSetActivityIdCallbackData(callbackdata as _, guid.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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 FltSetCallbackDataDirty(data: *mut FLT_CALLBACK_DATA) { windows_targets::link!("fltmgr.sys" "system" fn FltSetCallbackDataDirty(data : *mut FLT_CALLBACK_DATA)); - unsafe { FltSetCallbackDataDirty(core::mem::transmute(data)) } + unsafe { FltSetCallbackDataDirty(data as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1400,7 +1346,7 @@ pub unsafe fn FltSetEcpListIntoCallbackData(filter: PFLT_FILTER, callbackdata: * #[inline] 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); - unsafe { FltSetFileContext(instance, fileobject, operation, newcontext, core::mem::transmute(oldcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { FltSetFileContext(instance, fileobject, operation, newcontext, oldcontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1423,7 +1369,7 @@ pub unsafe fn FltSetInformationFile(instance: PFLT_INSTANCE, fileobject: *const #[inline] 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); - unsafe { FltSetInstanceContext(instance, operation, newcontext, core::mem::transmute(oldcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { FltSetInstanceContext(instance, operation, newcontext, oldcontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1459,30 +1405,30 @@ pub unsafe fn FltSetSecurityObject(instance: PFLT_INSTANCE, fileobject: *const s #[inline] 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); - unsafe { FltSetStreamContext(instance, fileobject, operation, newcontext, core::mem::transmute(oldcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { FltSetStreamContext(instance, fileobject, operation, newcontext, oldcontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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: 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); - unsafe { FltSetStreamHandleContext(instance, fileobject, operation, newcontext, core::mem::transmute(oldcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { FltSetStreamHandleContext(instance, fileobject, operation, newcontext, oldcontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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); - unsafe { FltSetTransactionContext(instance, transaction, operation, newcontext, core::mem::transmute(oldcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { FltSetTransactionContext(instance, transaction, operation, newcontext, oldcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { FltSetVolumeContext(volume, operation, newcontext, core::mem::transmute(oldcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { FltSetVolumeContext(volume, operation, newcontext, oldcontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { FltSetVolumeInformation(instance, core::mem::transmute(iosb), core::mem::transmute(fsinformation), length, fsinformationclass) } + unsafe { FltSetVolumeInformation(instance, iosb as _, fsinformation as _, length, fsinformationclass) } } #[inline] pub unsafe fn FltStartFiltering(filter: PFLT_FILTER) -> super::super::super::super::Win32::Foundation::NTSTATUS { @@ -1499,7 +1445,7 @@ pub unsafe fn FltSupportsFileContexts(fileobject: *const super::super::super::Fo #[inline] pub unsafe fn FltSupportsFileContextsEx(fileobject: *const super::super::super::Foundation::FILE_OBJECT, instance: Option) -> bool { windows_targets::link!("fltmgr.sys" "system" fn FltSupportsFileContextsEx(fileobject : *const super::super::super::Foundation:: FILE_OBJECT, instance : PFLT_INSTANCE) -> bool); - unsafe { FltSupportsFileContextsEx(fileobject, core::mem::transmute(instance.unwrap_or(core::mem::zeroed()))) } + unsafe { FltSupportsFileContextsEx(fileobject, instance.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1517,13 +1463,13 @@ pub unsafe fn FltSupportsStreamHandleContexts(fileobject: *const super::super::s #[inline] 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); - unsafe { FltTagFile(initiatinginstance, fileobject, filetag, core::mem::transmute(guid.unwrap_or(core::mem::zeroed())), databuffer, databufferlength) } + unsafe { FltTagFile(initiatinginstance, fileobject, filetag, guid.unwrap_or(core::mem::zeroed()) as _, databuffer, databufferlength) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] 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); - unsafe { FltTagFileEx(initiatinginstance, fileobject, filetag, core::mem::transmute(guid.unwrap_or(core::mem::zeroed())), databuffer, databufferlength, existingfiletag, core::mem::transmute(existingguid.unwrap_or(core::mem::zeroed())), flags) } + unsafe { FltTagFileEx(initiatinginstance, fileobject, filetag, guid.unwrap_or(core::mem::zeroed()) as _, databuffer, databufferlength, existingfiletag, existingguid.unwrap_or(core::mem::zeroed()) as _, 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] @@ -1550,7 +1496,7 @@ pub unsafe fn FltUnregisterFilter(filter: PFLT_FILTER) { #[inline] 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); - unsafe { FltUntagFile(initiatinginstance, fileobject, filetag, core::mem::transmute(guid.unwrap_or(core::mem::zeroed()))) } + unsafe { FltUntagFile(initiatinginstance, fileobject, filetag, guid.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1562,33 +1508,19 @@ pub unsafe fn FltVetoBypassIo(callbackdata: *const FLT_CALLBACK_DATA, fltobjects #[inline] 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); - unsafe { FltWriteFile(initiatinginstance, fileobject, core::mem::transmute(byteoffset.unwrap_or(core::mem::zeroed())), length, buffer, 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()))) } + unsafe { FltWriteFile(initiatinginstance, fileobject, byteoffset.unwrap_or(core::mem::zeroed()) as _, length, buffer, flags, byteswritten.unwrap_or(core::mem::zeroed()) as _, callbackroutine.unwrap_or(core::mem::zeroed()) as _, callbackcontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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: 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); - unsafe { - FltWriteFileEx( - initiatinginstance, - fileobject, - core::mem::transmute(byteoffset.unwrap_or(core::mem::zeroed())), - length, - core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), - 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())), - core::mem::transmute(key.unwrap_or(core::mem::zeroed())), - core::mem::transmute(mdl.unwrap_or(core::mem::zeroed())), - ) - } + unsafe { FltWriteFileEx(initiatinginstance, fileobject, byteoffset.unwrap_or(core::mem::zeroed()) as _, length, buffer.unwrap_or(core::mem::zeroed()) as _, flags, byteswritten.unwrap_or(core::mem::zeroed()) as _, callbackroutine.unwrap_or(core::mem::zeroed()) as _, callbackcontext.unwrap_or(core::mem::zeroed()) as _, key.unwrap_or(core::mem::zeroed()) as _, mdl.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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 FltpTraceRedirectedFileIo(originatingfileobject: *const super::super::super::Foundation::FILE_OBJECT, childcallbackdata: *mut FLT_CALLBACK_DATA) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltpTraceRedirectedFileIo(originatingfileobject : *const super::super::super::Foundation:: FILE_OBJECT, childcallbackdata : *mut FLT_CALLBACK_DATA) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FltpTraceRedirectedFileIo(originatingfileobject, core::mem::transmute(childcallbackdata)) } + unsafe { FltpTraceRedirectedFileIo(originatingfileobject, childcallbackdata as _) } } pub const FLTFL_CALLBACK_DATA_DIRTY: u32 = 2147483648u32; pub const FLTFL_CALLBACK_DATA_DRAINING_IO: u32 = 262144u32; 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 99b67a6e5e..aaef17591b 100644 --- a/crates/libs/windows/src/Windows/Wdk/Storage/FileSystem/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/Storage/FileSystem/mod.rs @@ -9,31 +9,31 @@ pub unsafe fn ApplyControlToken(phcontext: *const SecHandle, pinput: *const SecB #[inline] pub unsafe fn CcAsyncCopyRead(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, wait: bool, 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) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn CcAsyncCopyRead(fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : u32, wait : bool, 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) -> bool); - unsafe { CcAsyncCopyRead(fileobject, fileoffset, length, wait, core::mem::transmute(buffer), core::mem::transmute(iostatus), ioissuerthread, asyncreadcontext) } + unsafe { CcAsyncCopyRead(fileobject, fileoffset, length, wait, buffer as _, iostatus as _, ioissuerthread, 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] pub unsafe fn CcCanIWrite(fileobject: Option<*const super::super::Foundation::FILE_OBJECT>, bytestowrite: u32, wait: bool, retrying: u8) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn CcCanIWrite(fileobject : *const super::super::Foundation:: FILE_OBJECT, bytestowrite : u32, wait : bool, retrying : u8) -> bool); - unsafe { CcCanIWrite(core::mem::transmute(fileobject.unwrap_or(core::mem::zeroed())), bytestowrite, wait, retrying) } + unsafe { CcCanIWrite(fileobject.unwrap_or(core::mem::zeroed()) as _, bytestowrite, wait, 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: 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)); - unsafe { CcCoherencyFlushAndPurgeCache(sectionobjectpointer, core::mem::transmute(fileoffset.unwrap_or(core::mem::zeroed())), length, core::mem::transmute(iostatus), core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))) } + unsafe { CcCoherencyFlushAndPurgeCache(sectionobjectpointer, fileoffset.unwrap_or(core::mem::zeroed()) as _, length, iostatus as _, flags.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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 CcCopyRead(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, wait: bool, buffer: *mut core::ffi::c_void, iostatus: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn CcCopyRead(fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : u32, wait : bool, buffer : *mut core::ffi::c_void, iostatus : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK) -> bool); - unsafe { CcCopyRead(fileobject, fileoffset, length, wait, core::mem::transmute(buffer), core::mem::transmute(iostatus)) } + unsafe { CcCopyRead(fileobject, fileoffset, length, wait, buffer as _, iostatus as _) } } #[cfg(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: bool, buffer: *mut core::ffi::c_void, iostatus: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, ioissuerthread: super::super::Foundation::PETHREAD) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn CcCopyReadEx(fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : u32, wait : bool, buffer : *mut core::ffi::c_void, iostatus : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, ioissuerthread : super::super::Foundation:: PETHREAD) -> bool); - unsafe { CcCopyReadEx(fileobject, fileoffset, length, wait, core::mem::transmute(buffer), core::mem::transmute(iostatus), ioissuerthread) } + unsafe { CcCopyReadEx(fileobject, fileoffset, length, wait, buffer as _, iostatus as _, 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] @@ -51,7 +51,7 @@ pub unsafe fn CcCopyWriteEx(fileobject: *const super::super::Foundation::FILE_OB #[inline] pub unsafe fn CcCopyWriteWontFlush(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: Option<*const i64>, length: u32) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn CcCopyWriteWontFlush(fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : u32) -> bool); - unsafe { CcCopyWriteWontFlush(fileobject, core::mem::transmute(fileoffset.unwrap_or(core::mem::zeroed())), length) } + unsafe { CcCopyWriteWontFlush(fileobject, fileoffset.unwrap_or(core::mem::zeroed()) as _, 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] @@ -68,7 +68,7 @@ pub unsafe fn CcErrorCallbackRoutine(context: *const CC_ERROR_CALLBACK_CONTEXT) #[inline] pub unsafe fn CcFastCopyRead(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: u32, length: u32, pagecount: u32, buffer: *mut core::ffi::c_void, iostatus: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK) { windows_targets::link!("ntoskrnl.exe" "system" fn CcFastCopyRead(fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : u32, length : u32, pagecount : u32, buffer : *mut core::ffi::c_void, iostatus : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK)); - unsafe { CcFastCopyRead(fileobject, fileoffset, length, pagecount, core::mem::transmute(buffer), core::mem::transmute(iostatus)) } + unsafe { CcFastCopyRead(fileobject, fileoffset, length, pagecount, buffer as _, iostatus as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -80,7 +80,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)); - unsafe { CcFlushCache(sectionobjectpointer, core::mem::transmute(fileoffset.unwrap_or(core::mem::zeroed())), length, core::mem::transmute(iostatus.unwrap_or(core::mem::zeroed()))) } + unsafe { CcFlushCache(sectionobjectpointer, fileoffset.unwrap_or(core::mem::zeroed()) as _, length, iostatus.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -139,19 +139,19 @@ pub unsafe fn CcIsThereDirtyData(vpb: *const super::super::Foundation::VPB) -> b #[inline] pub unsafe fn CcIsThereDirtyDataEx(vpb: *const super::super::Foundation::VPB, numberofdirtypages: Option<*const u32>) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn CcIsThereDirtyDataEx(vpb : *const super::super::Foundation:: VPB, numberofdirtypages : *const u32) -> bool); - unsafe { CcIsThereDirtyDataEx(vpb, core::mem::transmute(numberofdirtypages.unwrap_or(core::mem::zeroed()))) } + unsafe { CcIsThereDirtyDataEx(vpb, numberofdirtypages.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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 CcMapData(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, flags: u32, bcb: *mut *mut core::ffi::c_void, buffer: *mut *mut core::ffi::c_void) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn CcMapData(fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : u32, flags : u32, bcb : *mut *mut core::ffi::c_void, buffer : *mut *mut core::ffi::c_void) -> bool); - unsafe { CcMapData(fileobject, fileoffset, length, flags, core::mem::transmute(bcb), core::mem::transmute(buffer)) } + unsafe { CcMapData(fileobject, fileoffset, length, flags, bcb as _, buffer as _) } } #[cfg(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 CcMdlRead(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, mdlchain: *mut *mut super::super::Foundation::MDL, iostatus: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK) { windows_targets::link!("ntoskrnl.exe" "system" fn CcMdlRead(fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : u32, mdlchain : *mut *mut super::super::Foundation:: MDL, iostatus : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK)); - unsafe { CcMdlRead(fileobject, fileoffset, length, core::mem::transmute(mdlchain), core::mem::transmute(iostatus)) } + unsafe { CcMdlRead(fileobject, fileoffset, length, mdlchain as _, iostatus as _) } } #[cfg(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,31 +175,31 @@ pub unsafe fn CcMdlWriteComplete(fileobject: *const super::super::Foundation::FI #[inline] pub unsafe fn CcPinMappedData(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, flags: u32, bcb: *mut *mut core::ffi::c_void) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn CcPinMappedData(fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : u32, flags : u32, bcb : *mut *mut core::ffi::c_void) -> bool); - unsafe { CcPinMappedData(fileobject, fileoffset, length, flags, core::mem::transmute(bcb)) } + unsafe { CcPinMappedData(fileobject, fileoffset, length, flags, bcb as _) } } #[cfg(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 CcPinRead(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, flags: u32, bcb: *mut *mut core::ffi::c_void, buffer: *mut *mut core::ffi::c_void) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn CcPinRead(fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : u32, flags : u32, bcb : *mut *mut core::ffi::c_void, buffer : *mut *mut core::ffi::c_void) -> bool); - unsafe { CcPinRead(fileobject, fileoffset, length, flags, core::mem::transmute(bcb), core::mem::transmute(buffer)) } + unsafe { CcPinRead(fileobject, fileoffset, length, flags, bcb as _, buffer as _) } } #[cfg(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 CcPrepareMdlWrite(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, mdlchain: *mut *mut super::super::Foundation::MDL, iostatus: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK) { windows_targets::link!("ntoskrnl.exe" "system" fn CcPrepareMdlWrite(fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : u32, mdlchain : *mut *mut super::super::Foundation:: MDL, iostatus : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK)); - unsafe { CcPrepareMdlWrite(fileobject, fileoffset, length, core::mem::transmute(mdlchain), core::mem::transmute(iostatus)) } + unsafe { CcPrepareMdlWrite(fileobject, fileoffset, length, mdlchain as _, iostatus as _) } } #[cfg(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 CcPreparePinWrite(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, zero: bool, flags: u32, bcb: *mut *mut core::ffi::c_void, buffer: *mut *mut core::ffi::c_void) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn CcPreparePinWrite(fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : u32, zero : bool, flags : u32, bcb : *mut *mut core::ffi::c_void, buffer : *mut *mut core::ffi::c_void) -> bool); - unsafe { CcPreparePinWrite(fileobject, fileoffset, length, zero, flags, core::mem::transmute(bcb), core::mem::transmute(buffer)) } + unsafe { CcPreparePinWrite(fileobject, fileoffset, length, zero, flags, bcb as _, buffer as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn CcPurgeCacheSection(sectionobjectpointer: *const super::super::Foundation::SECTION_OBJECT_POINTERS, fileoffset: Option<*const i64>, length: u32, flags: u32) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn CcPurgeCacheSection(sectionobjectpointer : *const super::super::Foundation:: SECTION_OBJECT_POINTERS, fileoffset : *const i64, length : u32, flags : u32) -> bool); - unsafe { CcPurgeCacheSection(sectionobjectpointer, core::mem::transmute(fileoffset.unwrap_or(core::mem::zeroed())), length, flags) } + unsafe { CcPurgeCacheSection(sectionobjectpointer, fileoffset.unwrap_or(core::mem::zeroed()) as _, length, flags) } } #[inline] pub unsafe fn CcRemapBcb(bcb: *const core::ffi::c_void) -> *mut core::ffi::c_void { @@ -249,7 +249,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)); - unsafe { CcSetDirtyPinnedData(bcbvoid, core::mem::transmute(lsn.unwrap_or(core::mem::zeroed()))) } + unsafe { CcSetDirtyPinnedData(bcbvoid, lsn.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -285,7 +285,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>) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn CcUninitializeCacheMap(fileobject : *const super::super::Foundation:: FILE_OBJECT, truncatesize : *const i64, uninitializeevent : *const CACHE_UNINITIALIZE_EVENT) -> bool); - unsafe { CcUninitializeCacheMap(fileobject, core::mem::transmute(truncatesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(uninitializeevent.unwrap_or(core::mem::zeroed()))) } + unsafe { CcUninitializeCacheMap(fileobject, truncatesize.unwrap_or(core::mem::zeroed()) as _, uninitializeevent.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CcUnpinData(bcb: *const core::ffi::c_void) { @@ -332,12 +332,12 @@ pub unsafe fn ExDisableResourceBoostLite(resource: *const super::super::Foundati #[inline] pub unsafe fn ExQueryPoolBlockSize(poolblock: *const core::ffi::c_void, quotacharged: *mut bool) -> usize { windows_targets::link!("ntoskrnl.exe" "system" fn ExQueryPoolBlockSize(poolblock : *const core::ffi::c_void, quotacharged : *mut bool) -> usize); - unsafe { ExQueryPoolBlockSize(poolblock, core::mem::transmute(quotacharged)) } + unsafe { ExQueryPoolBlockSize(poolblock, quotacharged as _) } } #[inline] pub unsafe fn ExportSecurityContext(phcontext: *const SecHandle, fflags: u32, ppackedcontext: *mut SecBuffer, ptoken: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("secur32.dll" "system" fn ExportSecurityContext(phcontext : *const SecHandle, fflags : u32, ppackedcontext : *mut SecBuffer, ptoken : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { ExportSecurityContext(phcontext, fflags, core::mem::transmute(ppackedcontext), core::mem::transmute(ptoken)).ok() } + unsafe { ExportSecurityContext(phcontext, fflags, ppackedcontext as _, ptoken as _).ok() } } #[inline] pub unsafe fn FsRtlAcknowledgeEcp(ecpcontext: *const core::ffi::c_void) { @@ -353,36 +353,36 @@ pub unsafe fn FsRtlAcquireFileExclusive(fileobject: *const super::super::Foundat #[inline] pub unsafe fn FsRtlAddBaseMcbEntry(mcb: *mut BASE_MCB, vbn: i64, lbn: i64, sectorcount: i64) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlAddBaseMcbEntry(mcb : *mut BASE_MCB, vbn : i64, lbn : i64, sectorcount : i64) -> bool); - unsafe { FsRtlAddBaseMcbEntry(core::mem::transmute(mcb), vbn, lbn, sectorcount) } + unsafe { FsRtlAddBaseMcbEntry(mcb as _, vbn, lbn, sectorcount) } } #[inline] pub unsafe fn FsRtlAddBaseMcbEntryEx(mcb: *mut BASE_MCB, vbn: i64, lbn: i64, sectorcount: i64) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlAddBaseMcbEntryEx(mcb : *mut BASE_MCB, vbn : i64, lbn : i64, sectorcount : i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FsRtlAddBaseMcbEntryEx(core::mem::transmute(mcb), vbn, lbn, sectorcount) } + unsafe { FsRtlAddBaseMcbEntryEx(mcb as _, vbn, lbn, sectorcount) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn FsRtlAddLargeMcbEntry(mcb: *mut LARGE_MCB, vbn: i64, lbn: i64, sectorcount: i64) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlAddLargeMcbEntry(mcb : *mut LARGE_MCB, vbn : i64, lbn : i64, sectorcount : i64) -> bool); - unsafe { FsRtlAddLargeMcbEntry(core::mem::transmute(mcb), vbn, lbn, sectorcount) } + unsafe { FsRtlAddLargeMcbEntry(mcb as _, vbn, lbn, sectorcount) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn FsRtlAddMcbEntry(mcb: *mut MCB, vbn: u32, lbn: u32, sectorcount: u32) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlAddMcbEntry(mcb : *mut MCB, vbn : u32, lbn : u32, sectorcount : u32) -> bool); - unsafe { FsRtlAddMcbEntry(core::mem::transmute(mcb), vbn, lbn, sectorcount) } + unsafe { FsRtlAddMcbEntry(mcb as _, vbn, lbn, sectorcount) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn FsRtlAddToTunnelCache(cache: *mut TUNNEL, directorykey: u64, shortname: *const super::super::super::Win32::Foundation::UNICODE_STRING, longname: *const super::super::super::Win32::Foundation::UNICODE_STRING, keybyshortname: bool, datalength: u32, data: *const core::ffi::c_void) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlAddToTunnelCache(cache : *mut TUNNEL, directorykey : u64, shortname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, longname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, keybyshortname : bool, datalength : u32, data : *const core::ffi::c_void)); - unsafe { FsRtlAddToTunnelCache(core::mem::transmute(cache), directorykey, shortname, longname, keybyshortname, datalength, data) } + unsafe { FsRtlAddToTunnelCache(cache as _, directorykey, shortname, longname, keybyshortname, datalength, data) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn FsRtlAddToTunnelCacheEx(cache: *mut TUNNEL, directorykey: u64, shortname: *const super::super::super::Win32::Foundation::UNICODE_STRING, longname: *const super::super::super::Win32::Foundation::UNICODE_STRING, flags: u32, datalength: u32, data: *const core::ffi::c_void) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlAddToTunnelCacheEx(cache : *mut TUNNEL, directorykey : u64, shortname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, longname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, flags : u32, datalength : u32, data : *const core::ffi::c_void)); - unsafe { FsRtlAddToTunnelCacheEx(core::mem::transmute(cache), directorykey, shortname, longname, flags, datalength, data) } + unsafe { FsRtlAddToTunnelCacheEx(cache as _, directorykey, shortname, longname, flags, datalength, data) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -393,24 +393,24 @@ pub unsafe fn FsRtlAllocateAePushLock(pooltype: super::super::Foundation::POOL_T #[inline] 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); - unsafe { FsRtlAllocateExtraCreateParameter(ecptype, sizeofcontext, flags, core::mem::transmute(cleanupcallback.unwrap_or(core::mem::zeroed())), pooltag, core::mem::transmute(ecpcontext)) } + unsafe { FsRtlAllocateExtraCreateParameter(ecptype, sizeofcontext, flags, cleanupcallback.unwrap_or(core::mem::zeroed()) as _, pooltag, ecpcontext as _) } } #[inline] 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); - unsafe { FsRtlAllocateExtraCreateParameterFromLookasideList(ecptype, sizeofcontext, flags, core::mem::transmute(cleanupcallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(lookasidelist), core::mem::transmute(ecpcontext)) } + unsafe { FsRtlAllocateExtraCreateParameterFromLookasideList(ecptype, sizeofcontext, flags, cleanupcallback.unwrap_or(core::mem::zeroed()) as _, lookasidelist as _, ecpcontext as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn FsRtlAllocateExtraCreateParameterList(flags: u32, ecplist: *mut *mut super::super::Foundation::ECP_LIST) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlAllocateExtraCreateParameterList(flags : u32, ecplist : *mut *mut super::super::Foundation:: ECP_LIST) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FsRtlAllocateExtraCreateParameterList(flags, core::mem::transmute(ecplist)) } + unsafe { FsRtlAllocateExtraCreateParameterList(flags, ecplist as _) } } #[cfg(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: 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); - unsafe { FsRtlAllocateFileLock(core::mem::transmute(completelockirproutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(unlockroutine.unwrap_or(core::mem::zeroed()))) } + unsafe { FsRtlAllocateFileLock(completelockirproutine.unwrap_or(core::mem::zeroed()) as _, unlockroutine.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -421,7 +421,7 @@ pub unsafe fn FsRtlAllocateResource() -> *mut super::super::Foundation::ERESOURC #[inline] pub unsafe fn FsRtlAreNamesEqual(constantnamea: *const super::super::super::Win32::Foundation::UNICODE_STRING, constantnameb: *const super::super::super::Win32::Foundation::UNICODE_STRING, ignorecase: bool, upcasetable: Option<*const u16>) -> bool { 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 : bool, upcasetable : *const u16) -> bool); - unsafe { FsRtlAreNamesEqual(constantnamea, constantnameb, ignorecase, core::mem::transmute(upcasetable.unwrap_or(core::mem::zeroed()))) } + unsafe { FsRtlAreNamesEqual(constantnamea, constantnameb, ignorecase, upcasetable.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -450,19 +450,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); - unsafe { FsRtlCancellableWaitForMultipleObjects(objectarray.len().try_into().unwrap(), core::mem::transmute(objectarray.as_ptr()), 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()))) } + unsafe { FsRtlCancellableWaitForMultipleObjects(objectarray.len().try_into().unwrap(), core::mem::transmute(objectarray.as_ptr()), waittype, timeout.unwrap_or(core::mem::zeroed()) as _, waitblockarray.unwrap_or(core::mem::zeroed()) as _, irp.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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); - unsafe { FsRtlCancellableWaitForSingleObject(object, core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), core::mem::transmute(irp.unwrap_or(core::mem::zeroed()))) } + unsafe { FsRtlCancellableWaitForSingleObject(object, timeout.unwrap_or(core::mem::zeroed()) as _, irp.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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); - unsafe { FsRtlChangeBackingFileObject(core::mem::transmute(currentfileobject.unwrap_or(core::mem::zeroed())), newfileobject, changebackingtype, flags) } + unsafe { FsRtlChangeBackingFileObject(currentfileobject.unwrap_or(core::mem::zeroed()) as _, newfileobject, changebackingtype, flags) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -486,43 +486,43 @@ pub unsafe fn FsRtlCheckLockForWriteAccess(filelock: *const FILE_LOCK, irp: *con #[inline] pub unsafe fn FsRtlCheckOplock(oplock: *const *const core::ffi::c_void, irp: *const super::super::Foundation::IRP, context: Option<*const core::ffi::c_void>, completionroutine: 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); - unsafe { FsRtlCheckOplock(oplock, 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()))) } + unsafe { FsRtlCheckOplock(oplock, irp, context.unwrap_or(core::mem::zeroed()) as _, completionroutine.unwrap_or(core::mem::zeroed()) as _, postirproutine.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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: 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); - unsafe { FsRtlCheckOplockEx(oplock, irp, 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()))) } + unsafe { FsRtlCheckOplockEx(oplock, irp, flags, context.unwrap_or(core::mem::zeroed()) as _, completionroutine.unwrap_or(core::mem::zeroed()) as _, postirproutine.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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: 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); - unsafe { FsRtlCheckOplockEx2(oplock, irp, flags, 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())), timeout, core::mem::transmute(notifycontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(notifyroutine.unwrap_or(core::mem::zeroed()))) } + unsafe { FsRtlCheckOplockEx2(oplock, irp, flags, flagsex2, completionroutinecontext.unwrap_or(core::mem::zeroed()) as _, completionroutine.unwrap_or(core::mem::zeroed()) as _, postirproutine.unwrap_or(core::mem::zeroed()) as _, timeout, notifycontext.unwrap_or(core::mem::zeroed()) as _, notifyroutine.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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: 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); - unsafe { FsRtlCheckUpperOplock(oplock, 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())), flags) } + unsafe { FsRtlCheckUpperOplock(oplock, newloweroplockstate, completionroutinecontext.unwrap_or(core::mem::zeroed()) as _, completionroutine.unwrap_or(core::mem::zeroed()) as _, prependroutine.unwrap_or(core::mem::zeroed()) as _, 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 FsRtlCopyRead(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, wait: bool, lockkey: u32, buffer: *mut core::ffi::c_void, iostatus: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, deviceobject: *const super::super::Foundation::DEVICE_OBJECT) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlCopyRead(fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : u32, wait : bool, lockkey : u32, buffer : *mut core::ffi::c_void, iostatus : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, deviceobject : *const super::super::Foundation:: DEVICE_OBJECT) -> bool); - unsafe { FsRtlCopyRead(fileobject, fileoffset, length, wait, lockkey, core::mem::transmute(buffer), core::mem::transmute(iostatus), deviceobject) } + unsafe { FsRtlCopyRead(fileobject, fileoffset, length, wait, lockkey, buffer as _, iostatus as _, 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 FsRtlCopyWrite(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, wait: bool, lockkey: u32, buffer: *const core::ffi::c_void, iostatus: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, deviceobject: *const super::super::Foundation::DEVICE_OBJECT) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlCopyWrite(fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : u32, wait : bool, lockkey : u32, buffer : *const core::ffi::c_void, iostatus : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, deviceobject : *const super::super::Foundation:: DEVICE_OBJECT) -> bool); - unsafe { FsRtlCopyWrite(fileobject, fileoffset, length, wait, lockkey, buffer, core::mem::transmute(iostatus), deviceobject) } + unsafe { FsRtlCopyWrite(fileobject, fileoffset, length, wait, lockkey, buffer, iostatus as _, 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 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); - unsafe { FsRtlCreateSectionForDataScan(core::mem::transmute(sectionhandle), core::mem::transmute(sectionobject), core::mem::transmute(sectionfilesize.unwrap_or(core::mem::zeroed())), fileobject, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(maximumsize.unwrap_or(core::mem::zeroed())), sectionpageprotection, allocationattributes, flags) } + unsafe { FsRtlCreateSectionForDataScan(sectionhandle as _, sectionobject as _, sectionfilesize.unwrap_or(core::mem::zeroed()) as _, fileobject, desiredaccess, objectattributes.unwrap_or(core::mem::zeroed()) as _, maximumsize.unwrap_or(core::mem::zeroed()) as _, sectionpageprotection, allocationattributes, flags) } } #[inline] pub unsafe fn FsRtlCurrentBatchOplock(oplock: *const *const core::ffi::c_void) -> bool { @@ -542,19 +542,19 @@ pub unsafe fn FsRtlCurrentOplockH(oplock: *const *const core::ffi::c_void) -> bo #[inline] pub unsafe fn FsRtlDeleteExtraCreateParameterLookasideList(lookaside: *mut core::ffi::c_void, flags: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlDeleteExtraCreateParameterLookasideList(lookaside : *mut core::ffi::c_void, flags : u32)); - unsafe { FsRtlDeleteExtraCreateParameterLookasideList(core::mem::transmute(lookaside), flags) } + unsafe { FsRtlDeleteExtraCreateParameterLookasideList(lookaside as _, flags) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn FsRtlDeleteKeyFromTunnelCache(cache: *mut TUNNEL, directorykey: u64) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlDeleteKeyFromTunnelCache(cache : *mut TUNNEL, directorykey : u64)); - unsafe { FsRtlDeleteKeyFromTunnelCache(core::mem::transmute(cache), directorykey) } + unsafe { FsRtlDeleteKeyFromTunnelCache(cache as _, directorykey) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn FsRtlDeleteTunnelCache(cache: *mut TUNNEL) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlDeleteTunnelCache(cache : *mut TUNNEL)); - unsafe { FsRtlDeleteTunnelCache(core::mem::transmute(cache)) } + unsafe { FsRtlDeleteTunnelCache(cache as _) } } #[inline] pub unsafe fn FsRtlDeregisterUncProvider(handle: super::super::super::Win32::Foundation::HANDLE) { @@ -571,12 +571,12 @@ pub unsafe fn FsRtlDismountComplete(deviceobject: *const super::super::Foundatio #[inline] pub unsafe fn FsRtlDissectDbcs(path: super::super::super::Win32::System::Kernel::STRING, firstname: *mut super::super::super::Win32::System::Kernel::STRING, remainingname: *mut super::super::super::Win32::System::Kernel::STRING) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlDissectDbcs(path : super::super::super::Win32::System::Kernel:: STRING, firstname : *mut super::super::super::Win32::System::Kernel:: STRING, remainingname : *mut super::super::super::Win32::System::Kernel:: STRING)); - unsafe { FsRtlDissectDbcs(core::mem::transmute(path), core::mem::transmute(firstname), core::mem::transmute(remainingname)) } + unsafe { FsRtlDissectDbcs(core::mem::transmute(path), firstname as _, remainingname as _) } } #[inline] pub unsafe fn FsRtlDissectName(path: super::super::super::Win32::Foundation::UNICODE_STRING, firstname: *mut super::super::super::Win32::Foundation::UNICODE_STRING, remainingname: *mut super::super::super::Win32::Foundation::UNICODE_STRING) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlDissectName(path : super::super::super::Win32::Foundation:: UNICODE_STRING, firstname : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, remainingname : *mut super::super::super::Win32::Foundation:: UNICODE_STRING)); - unsafe { FsRtlDissectName(core::mem::transmute(path), core::mem::transmute(firstname), core::mem::transmute(remainingname)) } + unsafe { FsRtlDissectName(core::mem::transmute(path), firstname as _, remainingname as _) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -605,42 +605,42 @@ pub unsafe fn FsRtlFastCheckLockForWrite(filelock: *const FILE_LOCK, startingbyt #[inline] 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); - unsafe { FsRtlFastUnlockAll(filelock, fileobject, processid, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } + unsafe { FsRtlFastUnlockAll(filelock, fileobject, processid, context.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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: 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); - unsafe { FsRtlFastUnlockAllByKey(filelock, fileobject, processid, key, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } + unsafe { FsRtlFastUnlockAllByKey(filelock, fileobject, processid, key, context.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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: super::super::Foundation::PEPROCESS, key: u32, context: Option<*const core::ffi::c_void>, alreadysynchronized: bool) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FsRtlFastUnlockSingle(filelock, fileobject, fileoffset, length, processid, key, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), alreadysynchronized) } + unsafe { FsRtlFastUnlockSingle(filelock, fileobject, fileoffset, length, processid, key, context.unwrap_or(core::mem::zeroed()) as _, alreadysynchronized) } } #[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); - unsafe { FsRtlFindExtraCreateParameter(ecplist, ecptype, core::mem::transmute(ecpcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(ecpcontextsize.unwrap_or(core::mem::zeroed()))) } + unsafe { FsRtlFindExtraCreateParameter(ecplist, ecptype, ecpcontext.unwrap_or(core::mem::zeroed()) as _, ecpcontextsize.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn FsRtlFindInTunnelCache(cache: *const TUNNEL, directorykey: u64, name: *const super::super::super::Win32::Foundation::UNICODE_STRING, shortname: *mut super::super::super::Win32::Foundation::UNICODE_STRING, longname: *mut super::super::super::Win32::Foundation::UNICODE_STRING, datalength: *mut u32, data: *mut core::ffi::c_void) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlFindInTunnelCache(cache : *const TUNNEL, directorykey : u64, name : *const super::super::super::Win32::Foundation:: UNICODE_STRING, shortname : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, longname : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, datalength : *mut u32, data : *mut core::ffi::c_void) -> bool); - unsafe { FsRtlFindInTunnelCache(cache, directorykey, name, core::mem::transmute(shortname), core::mem::transmute(longname), core::mem::transmute(datalength), core::mem::transmute(data)) } + unsafe { FsRtlFindInTunnelCache(cache, directorykey, name, shortname as _, longname as _, datalength as _, data as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn FsRtlFindInTunnelCacheEx(cache: *const TUNNEL, directorykey: u64, name: *const super::super::super::Win32::Foundation::UNICODE_STRING, shortname: *mut super::super::super::Win32::Foundation::UNICODE_STRING, longname: *mut super::super::super::Win32::Foundation::UNICODE_STRING, flags: u32, datalength: *mut u32, data: *mut core::ffi::c_void) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlFindInTunnelCacheEx(cache : *const TUNNEL, directorykey : u64, name : *const super::super::super::Win32::Foundation:: UNICODE_STRING, shortname : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, longname : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, flags : u32, datalength : *mut u32, data : *mut core::ffi::c_void) -> bool); - unsafe { FsRtlFindInTunnelCacheEx(cache, directorykey, name, core::mem::transmute(shortname), core::mem::transmute(longname), flags, core::mem::transmute(datalength), core::mem::transmute(data)) } + unsafe { FsRtlFindInTunnelCacheEx(cache, directorykey, name, shortname as _, longname as _, flags, datalength as _, data as _) } } #[inline] pub unsafe fn FsRtlFreeAePushLock(aepushlock: *mut core::ffi::c_void) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlFreeAePushLock(aepushlock : *mut core::ffi::c_void)); - unsafe { FsRtlFreeAePushLock(core::mem::transmute(aepushlock)) } + unsafe { FsRtlFreeAePushLock(aepushlock as _) } } #[inline] pub unsafe fn FsRtlFreeExtraCreateParameter(ecpcontext: *const core::ffi::c_void) { @@ -669,24 +669,24 @@ pub unsafe fn FsRtlGetCurrentProcessLoaderList() -> *mut super::super::super::Wi #[inline] pub unsafe fn FsRtlGetEcpListFromIrp(irp: *const super::super::Foundation::IRP, ecplist: *mut *mut super::super::Foundation::ECP_LIST) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlGetEcpListFromIrp(irp : *const super::super::Foundation:: IRP, ecplist : *mut *mut super::super::Foundation:: ECP_LIST) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FsRtlGetEcpListFromIrp(irp, core::mem::transmute(ecplist)) } + unsafe { FsRtlGetEcpListFromIrp(irp, ecplist as _) } } #[cfg(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 FsRtlGetFileSize(fileobject: *const super::super::Foundation::FILE_OBJECT, filesize: *mut i64) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlGetFileSize(fileobject : *const super::super::Foundation:: FILE_OBJECT, filesize : *mut i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FsRtlGetFileSize(fileobject, core::mem::transmute(filesize)) } + unsafe { FsRtlGetFileSize(fileobject, filesize as _) } } #[inline] pub unsafe fn FsRtlGetNextBaseMcbEntry(mcb: *const BASE_MCB, runindex: u32, vbn: *mut i64, lbn: *mut i64, sectorcount: *mut i64) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlGetNextBaseMcbEntry(mcb : *const BASE_MCB, runindex : u32, vbn : *mut i64, lbn : *mut i64, sectorcount : *mut i64) -> bool); - unsafe { FsRtlGetNextBaseMcbEntry(mcb, runindex, core::mem::transmute(vbn), core::mem::transmute(lbn), core::mem::transmute(sectorcount)) } + unsafe { FsRtlGetNextBaseMcbEntry(mcb, runindex, vbn as _, lbn as _, sectorcount as _) } } #[cfg(feature = "Wdk_Foundation")] #[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); - unsafe { FsRtlGetNextExtraCreateParameter(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()))) } + unsafe { FsRtlGetNextExtraCreateParameter(ecplist, currentecpcontext.unwrap_or(core::mem::zeroed()) as _, nextecptype.unwrap_or(core::mem::zeroed()) as _, nextecpcontext.unwrap_or(core::mem::zeroed()) as _, nextecpcontextsize.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -698,31 +698,31 @@ pub unsafe fn FsRtlGetNextFileLock(filelock: *const FILE_LOCK, restart: bool) -> #[inline] pub unsafe fn FsRtlGetNextLargeMcbEntry(mcb: *const LARGE_MCB, runindex: u32, vbn: *mut i64, lbn: *mut i64, sectorcount: *mut i64) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlGetNextLargeMcbEntry(mcb : *const LARGE_MCB, runindex : u32, vbn : *mut i64, lbn : *mut i64, sectorcount : *mut i64) -> bool); - unsafe { FsRtlGetNextLargeMcbEntry(mcb, runindex, core::mem::transmute(vbn), core::mem::transmute(lbn), core::mem::transmute(sectorcount)) } + unsafe { FsRtlGetNextLargeMcbEntry(mcb, runindex, vbn as _, lbn as _, sectorcount as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn FsRtlGetNextMcbEntry(mcb: *const MCB, runindex: u32, vbn: *mut u32, lbn: *mut u32, sectorcount: *mut u32) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlGetNextMcbEntry(mcb : *const MCB, runindex : u32, vbn : *mut u32, lbn : *mut u32, sectorcount : *mut u32) -> bool); - unsafe { FsRtlGetNextMcbEntry(mcb, runindex, core::mem::transmute(vbn), core::mem::transmute(lbn), core::mem::transmute(sectorcount)) } + unsafe { FsRtlGetNextMcbEntry(mcb, runindex, vbn as _, lbn as _, sectorcount as _) } } #[cfg(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 FsRtlGetSectorSizeInformation(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, sectorsizeinfo: *mut FILE_FS_SECTOR_SIZE_INFORMATION) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlGetSectorSizeInformation(deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, sectorsizeinfo : *mut FILE_FS_SECTOR_SIZE_INFORMATION) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FsRtlGetSectorSizeInformation(deviceobject, core::mem::transmute(sectorsizeinfo)) } + unsafe { FsRtlGetSectorSizeInformation(deviceobject, sectorsizeinfo as _) } } #[cfg(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 FsRtlGetSupportedFeatures(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, supportedfeatures: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlGetSupportedFeatures(deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, supportedfeatures : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FsRtlGetSupportedFeatures(deviceobject, core::mem::transmute(supportedfeatures)) } + unsafe { FsRtlGetSupportedFeatures(deviceobject, supportedfeatures as _) } } #[cfg(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 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); - unsafe { FsRtlGetVirtualDiskNestingLevel(deviceobject, core::mem::transmute(nestinglevel), core::mem::transmute(nestingflags.unwrap_or(core::mem::zeroed()))) } + unsafe { FsRtlGetVirtualDiskNestingLevel(deviceobject, nestinglevel as _, nestingflags.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FsRtlIncrementCcFastMdlReadWait() { @@ -752,66 +752,66 @@ pub unsafe fn FsRtlIncrementCcFastReadWait() { #[inline] pub unsafe fn FsRtlInitExtraCreateParameterLookasideList(lookaside: *mut core::ffi::c_void, flags: u32, size: usize, tag: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlInitExtraCreateParameterLookasideList(lookaside : *mut core::ffi::c_void, flags : u32, size : usize, tag : u32)); - unsafe { FsRtlInitExtraCreateParameterLookasideList(core::mem::transmute(lookaside), flags, size, tag) } + unsafe { FsRtlInitExtraCreateParameterLookasideList(lookaside as _, flags, size, tag) } } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn FsRtlInitializeBaseMcb(mcb: *mut BASE_MCB, pooltype: super::super::Foundation::POOL_TYPE) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlInitializeBaseMcb(mcb : *mut BASE_MCB, pooltype : super::super::Foundation:: POOL_TYPE)); - unsafe { FsRtlInitializeBaseMcb(core::mem::transmute(mcb), pooltype) } + unsafe { FsRtlInitializeBaseMcb(mcb as _, pooltype) } } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn FsRtlInitializeBaseMcbEx(mcb: *mut BASE_MCB, pooltype: super::super::Foundation::POOL_TYPE, flags: u16) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlInitializeBaseMcbEx(mcb : *mut BASE_MCB, pooltype : super::super::Foundation:: POOL_TYPE, flags : u16) -> bool); - unsafe { FsRtlInitializeBaseMcbEx(core::mem::transmute(mcb), pooltype, flags) } + unsafe { FsRtlInitializeBaseMcbEx(mcb as _, pooltype, flags) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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)); - unsafe { FsRtlInitializeExtraCreateParameter(core::mem::transmute(ecp), ecpflags, core::mem::transmute(cleanupcallback.unwrap_or(core::mem::zeroed())), totalsize, ecptype, core::mem::transmute(listallocatedfrom.unwrap_or(core::mem::zeroed()))) } + unsafe { FsRtlInitializeExtraCreateParameter(ecp as _, ecpflags, cleanupcallback.unwrap_or(core::mem::zeroed()) as _, totalsize, ecptype, listallocatedfrom.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn FsRtlInitializeExtraCreateParameterList(ecplist: *mut super::super::Foundation::ECP_LIST) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlInitializeExtraCreateParameterList(ecplist : *mut super::super::Foundation:: ECP_LIST) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FsRtlInitializeExtraCreateParameterList(core::mem::transmute(ecplist)) } + unsafe { FsRtlInitializeExtraCreateParameterList(ecplist as _) } } #[cfg(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: Option, unlockroutine: Option) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlInitializeFileLock(filelock : *mut FILE_LOCK, completelockirproutine : PCOMPLETE_LOCK_IRP_ROUTINE, unlockroutine : PUNLOCK_ROUTINE)); - unsafe { FsRtlInitializeFileLock(core::mem::transmute(filelock), core::mem::transmute(completelockirproutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(unlockroutine.unwrap_or(core::mem::zeroed()))) } + unsafe { FsRtlInitializeFileLock(filelock as _, completelockirproutine.unwrap_or(core::mem::zeroed()) as _, unlockroutine.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn FsRtlInitializeLargeMcb(mcb: *mut LARGE_MCB, pooltype: super::super::Foundation::POOL_TYPE) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlInitializeLargeMcb(mcb : *mut LARGE_MCB, pooltype : super::super::Foundation:: POOL_TYPE)); - unsafe { FsRtlInitializeLargeMcb(core::mem::transmute(mcb), pooltype) } + unsafe { FsRtlInitializeLargeMcb(mcb as _, pooltype) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn FsRtlInitializeMcb(mcb: *mut MCB, pooltype: super::super::Foundation::POOL_TYPE) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlInitializeMcb(mcb : *mut MCB, pooltype : super::super::Foundation:: POOL_TYPE)); - unsafe { FsRtlInitializeMcb(core::mem::transmute(mcb), pooltype) } + unsafe { FsRtlInitializeMcb(mcb as _, pooltype) } } #[inline] pub unsafe fn FsRtlInitializeOplock(oplock: *mut *mut core::ffi::c_void) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlInitializeOplock(oplock : *mut *mut core::ffi::c_void)); - unsafe { FsRtlInitializeOplock(core::mem::transmute(oplock)) } + unsafe { FsRtlInitializeOplock(oplock as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn FsRtlInitializeTunnelCache(cache: *mut TUNNEL) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlInitializeTunnelCache(cache : *mut TUNNEL)); - unsafe { FsRtlInitializeTunnelCache(core::mem::transmute(cache)) } + unsafe { FsRtlInitializeTunnelCache(cache as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn FsRtlInsertExtraCreateParameter(ecplist: *mut super::super::Foundation::ECP_LIST, ecpcontext: *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlInsertExtraCreateParameter(ecplist : *mut super::super::Foundation:: ECP_LIST, ecpcontext : *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FsRtlInsertExtraCreateParameter(core::mem::transmute(ecplist), core::mem::transmute(ecpcontext)) } + unsafe { FsRtlInsertExtraCreateParameter(ecplist as _, ecpcontext as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -923,13 +923,13 @@ 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); - unsafe { FsRtlIssueDeviceIoControl(deviceobject, ioctl, flags, core::mem::transmute(inputbuffer.unwrap_or(core::mem::zeroed())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(core::mem::zeroed())), outputbufferlength, core::mem::transmute(iosbinformation.unwrap_or(core::mem::zeroed()))) } + unsafe { FsRtlIssueDeviceIoControl(deviceobject, ioctl, flags, inputbuffer.unwrap_or(core::mem::zeroed()) as _, inputbufferlength, outputbuffer.unwrap_or(core::mem::zeroed()) as _, outputbufferlength, iosbinformation.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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 FsRtlKernelFsControlFile(fileobject: *const super::super::Foundation::FILE_OBJECT, fscontrolcode: u32, inputbuffer: *const core::ffi::c_void, inputbufferlength: u32, outputbuffer: *mut core::ffi::c_void, outputbufferlength: u32, retoutputbuffersize: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlKernelFsControlFile(fileobject : *const super::super::Foundation:: FILE_OBJECT, fscontrolcode : u32, inputbuffer : *const core::ffi::c_void, inputbufferlength : u32, outputbuffer : *mut core::ffi::c_void, outputbufferlength : u32, retoutputbuffersize : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FsRtlKernelFsControlFile(fileobject, fscontrolcode, inputbuffer, inputbufferlength, core::mem::transmute(outputbuffer), outputbufferlength, core::mem::transmute(retoutputbuffersize)) } + unsafe { FsRtlKernelFsControlFile(fileobject, fscontrolcode, inputbuffer, inputbufferlength, outputbuffer as _, outputbufferlength, retoutputbuffersize as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -940,100 +940,100 @@ pub unsafe fn FsRtlLogCcFlushError(filename: *const super::super::super::Win32:: #[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>) -> bool { 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) -> bool); - unsafe { FsRtlLookupBaseMcbEntry(mcb, 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()))) } + unsafe { FsRtlLookupBaseMcbEntry(mcb, vbn, lbn.unwrap_or(core::mem::zeroed()) as _, sectorcountfromlbn.unwrap_or(core::mem::zeroed()) as _, startinglbn.unwrap_or(core::mem::zeroed()) as _, sectorcountfromstartinglbn.unwrap_or(core::mem::zeroed()) as _, index.unwrap_or(core::mem::zeroed()) as _) } } #[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>) -> bool { 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) -> bool); - unsafe { FsRtlLookupLargeMcbEntry(mcb, 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()))) } + unsafe { FsRtlLookupLargeMcbEntry(mcb, vbn, lbn.unwrap_or(core::mem::zeroed()) as _, sectorcountfromlbn.unwrap_or(core::mem::zeroed()) as _, startinglbn.unwrap_or(core::mem::zeroed()) as _, sectorcountfromstartinglbn.unwrap_or(core::mem::zeroed()) as _, index.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FsRtlLookupLastBaseMcbEntry(mcb: *const BASE_MCB, vbn: *mut i64, lbn: *mut i64) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlLookupLastBaseMcbEntry(mcb : *const BASE_MCB, vbn : *mut i64, lbn : *mut i64) -> bool); - unsafe { FsRtlLookupLastBaseMcbEntry(mcb, core::mem::transmute(vbn), core::mem::transmute(lbn)) } + unsafe { FsRtlLookupLastBaseMcbEntry(mcb, vbn as _, lbn as _) } } #[inline] pub unsafe fn FsRtlLookupLastBaseMcbEntryAndIndex(opaquemcb: *const BASE_MCB, largevbn: *mut i64, largelbn: *mut i64, index: *mut u32) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlLookupLastBaseMcbEntryAndIndex(opaquemcb : *const BASE_MCB, largevbn : *mut i64, largelbn : *mut i64, index : *mut u32) -> bool); - unsafe { FsRtlLookupLastBaseMcbEntryAndIndex(opaquemcb, core::mem::transmute(largevbn), core::mem::transmute(largelbn), core::mem::transmute(index)) } + unsafe { FsRtlLookupLastBaseMcbEntryAndIndex(opaquemcb, largevbn as _, largelbn as _, index as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn FsRtlLookupLastLargeMcbEntry(mcb: *const LARGE_MCB, vbn: *mut i64, lbn: *mut i64) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlLookupLastLargeMcbEntry(mcb : *const LARGE_MCB, vbn : *mut i64, lbn : *mut i64) -> bool); - unsafe { FsRtlLookupLastLargeMcbEntry(mcb, core::mem::transmute(vbn), core::mem::transmute(lbn)) } + unsafe { FsRtlLookupLastLargeMcbEntry(mcb, vbn as _, lbn as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn FsRtlLookupLastLargeMcbEntryAndIndex(opaquemcb: *const LARGE_MCB, largevbn: *mut i64, largelbn: *mut i64, index: *mut u32) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlLookupLastLargeMcbEntryAndIndex(opaquemcb : *const LARGE_MCB, largevbn : *mut i64, largelbn : *mut i64, index : *mut u32) -> bool); - unsafe { FsRtlLookupLastLargeMcbEntryAndIndex(opaquemcb, core::mem::transmute(largevbn), core::mem::transmute(largelbn), core::mem::transmute(index)) } + unsafe { FsRtlLookupLastLargeMcbEntryAndIndex(opaquemcb, largevbn as _, largelbn as _, index as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn FsRtlLookupLastMcbEntry(mcb: *const MCB, vbn: *mut u32, lbn: *mut u32) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlLookupLastMcbEntry(mcb : *const MCB, vbn : *mut u32, lbn : *mut u32) -> bool); - unsafe { FsRtlLookupLastMcbEntry(mcb, core::mem::transmute(vbn), core::mem::transmute(lbn)) } + unsafe { FsRtlLookupLastMcbEntry(mcb, vbn as _, lbn as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn FsRtlLookupMcbEntry(mcb: *const MCB, vbn: u32, lbn: *mut u32, sectorcount: Option<*mut u32>, index: *mut u32) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlLookupMcbEntry(mcb : *const MCB, vbn : u32, lbn : *mut u32, sectorcount : *mut u32, index : *mut u32) -> bool); - unsafe { FsRtlLookupMcbEntry(mcb, vbn, core::mem::transmute(lbn), core::mem::transmute(sectorcount.unwrap_or(core::mem::zeroed())), core::mem::transmute(index)) } + unsafe { FsRtlLookupMcbEntry(mcb, vbn, lbn as _, sectorcount.unwrap_or(core::mem::zeroed()) as _, index as _) } } #[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); - unsafe { FsRtlLookupPerFileContext(perfilecontextpointer, core::mem::transmute(ownerid.unwrap_or(core::mem::zeroed())), core::mem::transmute(instanceid.unwrap_or(core::mem::zeroed()))) } + unsafe { FsRtlLookupPerFileContext(perfilecontextpointer, ownerid.unwrap_or(core::mem::zeroed()) as _, instanceid.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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); - unsafe { FsRtlLookupPerFileObjectContext(fileobject, core::mem::transmute(ownerid.unwrap_or(core::mem::zeroed())), core::mem::transmute(instanceid.unwrap_or(core::mem::zeroed()))) } + unsafe { FsRtlLookupPerFileObjectContext(fileobject, ownerid.unwrap_or(core::mem::zeroed()) as _, instanceid.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { FsRtlLookupPerStreamContextInternal(streamcontext, core::mem::transmute(ownerid.unwrap_or(core::mem::zeroed())), core::mem::transmute(instanceid.unwrap_or(core::mem::zeroed()))) } + unsafe { FsRtlLookupPerStreamContextInternal(streamcontext, ownerid.unwrap_or(core::mem::zeroed()) as _, instanceid.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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>) -> bool { 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) -> bool); - unsafe { FsRtlMdlReadCompleteDev(fileobject, mdlchain, core::mem::transmute(deviceobject.unwrap_or(core::mem::zeroed()))) } + unsafe { FsRtlMdlReadCompleteDev(fileobject, mdlchain, deviceobject.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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>) -> bool { 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) -> bool); - unsafe { FsRtlMdlReadDev(fileobject, fileoffset, length, lockkey, core::mem::transmute(mdlchain), core::mem::transmute(iostatus), core::mem::transmute(deviceobject.unwrap_or(core::mem::zeroed()))) } + unsafe { FsRtlMdlReadDev(fileobject, fileoffset, length, lockkey, mdlchain as _, iostatus as _, deviceobject.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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 FsRtlMdlReadEx(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) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlMdlReadEx(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) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FsRtlMdlReadEx(fileobject, fileoffset, length, lockkey, core::mem::transmute(mdlchain), core::mem::transmute(iostatus)) } + unsafe { FsRtlMdlReadEx(fileobject, fileoffset, length, lockkey, mdlchain as _, iostatus as _) } } #[cfg(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 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>) -> bool { 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) -> bool); - unsafe { FsRtlMdlWriteCompleteDev(fileobject, fileoffset, mdlchain, core::mem::transmute(deviceobject.unwrap_or(core::mem::zeroed()))) } + unsafe { FsRtlMdlWriteCompleteDev(fileobject, fileoffset, mdlchain, deviceobject.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FsRtlMupGetProviderIdFromName(pprovidername: *const super::super::super::Win32::Foundation::UNICODE_STRING, pproviderid: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlMupGetProviderIdFromName(pprovidername : *const super::super::super::Win32::Foundation:: UNICODE_STRING, pproviderid : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FsRtlMupGetProviderIdFromName(pprovidername, core::mem::transmute(pproviderid)) } + unsafe { FsRtlMupGetProviderIdFromName(pprovidername, pproviderid as _) } } #[cfg(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 FsRtlMupGetProviderInfoFromFileObject(pfileobject: *const super::super::Foundation::FILE_OBJECT, level: u32, pbuffer: *mut core::ffi::c_void, pbuffersize: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlMupGetProviderInfoFromFileObject(pfileobject : *const super::super::Foundation:: FILE_OBJECT, level : u32, pbuffer : *mut core::ffi::c_void, pbuffersize : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FsRtlMupGetProviderInfoFromFileObject(pfileobject, level, core::mem::transmute(pbuffer), core::mem::transmute(pbuffersize)) } + unsafe { FsRtlMupGetProviderInfoFromFileObject(pfileobject, level, pbuffer as _, pbuffersize as _) } } #[inline] pub unsafe fn FsRtlNormalizeNtstatus(exception: super::super::super::Win32::Foundation::NTSTATUS, genericexception: super::super::super::Win32::Foundation::NTSTATUS) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -1056,25 +1056,25 @@ pub unsafe fn FsRtlNotifyCleanupAll(notifysync: super::super::Foundation::PNOTIF #[inline] 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: bool, ignorebuffer: bool, completionfilter: u32, notifyirp: Option<*const super::super::Foundation::IRP>, traversecallback: Option, subjectcontext: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>, filtercallback: Option) { 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 : bool, ignorebuffer : bool, 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)); - unsafe { FsRtlNotifyFilterChangeDirectory(notifysync, notifylist, fscontext, fulldirectoryname, watchtree, ignorebuffer, 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()))) } + unsafe { FsRtlNotifyFilterChangeDirectory(notifysync, notifylist, fscontext, fulldirectoryname, watchtree, ignorebuffer, completionfilter, notifyirp.unwrap_or(core::mem::zeroed()) as _, traversecallback.unwrap_or(core::mem::zeroed()) as _, subjectcontext.unwrap_or(core::mem::zeroed()) as _, filtercallback.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] 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)); - unsafe { FsRtlNotifyFilterReportChange(notifysync, notifylist, fulltargetname, targetnameoffset, core::mem::transmute(streamname.unwrap_or(core::mem::zeroed())), core::mem::transmute(normalizedparentname.unwrap_or(core::mem::zeroed())), filtermatch, action, core::mem::transmute(targetcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(filtercontext.unwrap_or(core::mem::zeroed()))) } + unsafe { FsRtlNotifyFilterReportChange(notifysync, notifylist, fulltargetname, targetnameoffset, streamname.unwrap_or(core::mem::zeroed()) as _, normalizedparentname.unwrap_or(core::mem::zeroed()) as _, filtermatch, action, targetcontext.unwrap_or(core::mem::zeroed()) as _, filtercontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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: 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: bool, ignorebuffer: bool, completionfilter: u32, notifyirp: Option<*const super::super::Foundation::IRP>, traversecallback: Option, subjectcontext: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>) { 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 : bool, ignorebuffer : bool, completionfilter : u32, notifyirp : *const super::super::Foundation:: IRP, traversecallback : PCHECK_FOR_TRAVERSE_ACCESS, subjectcontext : *const super::super::Foundation:: SECURITY_SUBJECT_CONTEXT)); - unsafe { FsRtlNotifyFullChangeDirectory(notifysync, notifylist, fscontext, core::mem::transmute(fulldirectoryname), watchtree, ignorebuffer, 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()))) } + unsafe { FsRtlNotifyFullChangeDirectory(notifysync, notifylist, fscontext, fulldirectoryname as _, watchtree, ignorebuffer, completionfilter, notifyirp.unwrap_or(core::mem::zeroed()) as _, traversecallback.unwrap_or(core::mem::zeroed()) as _, subjectcontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] 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)); - unsafe { FsRtlNotifyFullReportChange(notifysync, notifylist, fulltargetname, targetnameoffset, core::mem::transmute(streamname.unwrap_or(core::mem::zeroed())), core::mem::transmute(normalizedparentname.unwrap_or(core::mem::zeroed())), filtermatch, action, core::mem::transmute(targetcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { FsRtlNotifyFullReportChange(notifysync, notifylist, fulltargetname, targetnameoffset, streamname.unwrap_or(core::mem::zeroed()) as _, normalizedparentname.unwrap_or(core::mem::zeroed()) as _, filtermatch, action, targetcontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -1090,7 +1090,7 @@ pub unsafe fn FsRtlNotifyInitializeSync() -> super::super::Foundation::PNOTIFY_S #[inline] pub unsafe fn FsRtlNotifyUninitializeSync(notifysync: *mut super::super::Foundation::PNOTIFY_SYNC) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlNotifyUninitializeSync(notifysync : *mut super::super::Foundation:: PNOTIFY_SYNC)); - unsafe { FsRtlNotifyUninitializeSync(core::mem::transmute(notifysync)) } + unsafe { FsRtlNotifyUninitializeSync(notifysync as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1125,25 +1125,25 @@ pub unsafe fn FsRtlNumberOfRunsInMcb(mcb: *const MCB) -> u32 { #[inline] pub unsafe fn FsRtlOplockBreakH(oplock: *const *const core::ffi::c_void, irp: *const super::super::Foundation::IRP, flags: u32, context: Option<*const core::ffi::c_void>, completionroutine: 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); - unsafe { FsRtlOplockBreakH(oplock, irp, 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()))) } + unsafe { FsRtlOplockBreakH(oplock, irp, flags, context.unwrap_or(core::mem::zeroed()) as _, completionroutine.unwrap_or(core::mem::zeroed()) as _, postirproutine.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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: 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); - unsafe { FsRtlOplockBreakH2(oplock, irp, 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()))) } + unsafe { FsRtlOplockBreakH2(oplock, irp, flags, context.unwrap_or(core::mem::zeroed()) as _, completionroutine.unwrap_or(core::mem::zeroed()) as _, postirproutine.unwrap_or(core::mem::zeroed()) as _, grantedaccess.unwrap_or(core::mem::zeroed()) as _, shareaccess.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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: 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); - unsafe { FsRtlOplockBreakToNone(core::mem::transmute(oplock), core::mem::transmute(irpsp.unwrap_or(core::mem::zeroed())), 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()))) } + unsafe { FsRtlOplockBreakToNone(oplock as _, irpsp.unwrap_or(core::mem::zeroed()) as _, irp, context.unwrap_or(core::mem::zeroed()) as _, completionroutine.unwrap_or(core::mem::zeroed()) as _, postirproutine.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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: 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); - unsafe { FsRtlOplockBreakToNoneEx(core::mem::transmute(oplock), irp, 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()))) } + unsafe { FsRtlOplockBreakToNoneEx(oplock as _, irp, flags, context.unwrap_or(core::mem::zeroed()) as _, completionroutine.unwrap_or(core::mem::zeroed()) as _, postirproutine.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1178,7 +1178,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>) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlOplockKeysEqual(fo1 : *const super::super::Foundation:: FILE_OBJECT, fo2 : *const super::super::Foundation:: FILE_OBJECT) -> bool); - unsafe { FsRtlOplockKeysEqual(core::mem::transmute(fo1.unwrap_or(core::mem::zeroed())), core::mem::transmute(fo2.unwrap_or(core::mem::zeroed()))) } + unsafe { FsRtlOplockKeysEqual(fo1.unwrap_or(core::mem::zeroed()) as _, fo2.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -1196,13 +1196,13 @@ pub unsafe fn FsRtlPostStackOverflow(context: *const core::ffi::c_void, event: * #[inline] pub unsafe fn FsRtlPrepareMdlWriteDev(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) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlPrepareMdlWriteDev(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) -> bool); - unsafe { FsRtlPrepareMdlWriteDev(fileobject, fileoffset, length, lockkey, core::mem::transmute(mdlchain), core::mem::transmute(iostatus), deviceobject) } + unsafe { FsRtlPrepareMdlWriteDev(fileobject, fileoffset, length, lockkey, mdlchain as _, iostatus as _, 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 FsRtlPrepareMdlWriteEx(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) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlPrepareMdlWriteEx(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) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FsRtlPrepareMdlWriteEx(fileobject, fileoffset, length, lockkey, core::mem::transmute(mdlchain), core::mem::transmute(iostatus)) } + unsafe { FsRtlPrepareMdlWriteEx(fileobject, fileoffset, length, lockkey, mdlchain as _, iostatus as _) } } #[inline] pub unsafe fn FsRtlPrepareToReuseEcp(ecpcontext: *const core::ffi::c_void) { @@ -1213,31 +1213,31 @@ pub unsafe fn FsRtlPrepareToReuseEcp(ecpcontext: *const core::ffi::c_void) { #[inline] 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: bool, exclusivelock: bool, 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: bool) -> bool { 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 : bool, exclusivelock : bool, iosb : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, irp : *const super::super::Foundation:: IRP, context : *const core::ffi::c_void, alreadysynchronized : bool) -> bool); - unsafe { FsRtlPrivateLock(filelock, fileobject, fileoffset, length, processid, key, failimmediately, exclusivelock, core::mem::transmute(iosb), core::mem::transmute(irp.unwrap_or(core::mem::zeroed())), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), alreadysynchronized) } + unsafe { FsRtlPrivateLock(filelock, fileobject, fileoffset, length, processid, key, failimmediately, exclusivelock, iosb as _, irp.unwrap_or(core::mem::zeroed()) as _, context.unwrap_or(core::mem::zeroed()) as _, alreadysynchronized) } } #[cfg(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); - unsafe { FsRtlProcessFileLock(filelock, irp, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } + unsafe { FsRtlProcessFileLock(filelock, irp, context.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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 FsRtlQueryCachedVdl(fileobject: *const super::super::Foundation::FILE_OBJECT, vdl: *mut i64) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlQueryCachedVdl(fileobject : *const super::super::Foundation:: FILE_OBJECT, vdl : *mut i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FsRtlQueryCachedVdl(fileobject, core::mem::transmute(vdl)) } + unsafe { FsRtlQueryCachedVdl(fileobject, vdl as _) } } #[cfg(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 FsRtlQueryInformationFile(fileobject: *const super::super::Foundation::FILE_OBJECT, fileinformation: *mut core::ffi::c_void, length: u32, fileinformationclass: FILE_INFORMATION_CLASS, retfileinformationsize: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlQueryInformationFile(fileobject : *const super::super::Foundation:: FILE_OBJECT, fileinformation : *mut core::ffi::c_void, length : u32, fileinformationclass : FILE_INFORMATION_CLASS, retfileinformationsize : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FsRtlQueryInformationFile(fileobject, core::mem::transmute(fileinformation), length, fileinformationclass, core::mem::transmute(retfileinformationsize)) } + unsafe { FsRtlQueryInformationFile(fileobject, fileinformation as _, length, fileinformationclass, retfileinformationsize as _) } } #[cfg(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 FsRtlQueryKernelEaFile(fileobject: *const super::super::Foundation::FILE_OBJECT, returnedeadata: *mut core::ffi::c_void, length: u32, returnsingleentry: bool, ealist: Option<*const core::ffi::c_void>, ealistlength: u32, eaindex: Option<*const u32>, restartscan: bool, lengthreturned: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlQueryKernelEaFile(fileobject : *const super::super::Foundation:: FILE_OBJECT, returnedeadata : *mut core::ffi::c_void, length : u32, returnsingleentry : bool, ealist : *const core::ffi::c_void, ealistlength : u32, eaindex : *const u32, restartscan : bool, lengthreturned : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FsRtlQueryKernelEaFile(fileobject, core::mem::transmute(returnedeadata), length, returnsingleentry, core::mem::transmute(ealist.unwrap_or(core::mem::zeroed())), ealistlength, core::mem::transmute(eaindex.unwrap_or(core::mem::zeroed())), restartscan, core::mem::transmute(lengthreturned.unwrap_or(core::mem::zeroed()))) } + unsafe { FsRtlQueryKernelEaFile(fileobject, returnedeadata as _, length, returnsingleentry, ealist.unwrap_or(core::mem::zeroed()) as _, ealistlength, eaindex.unwrap_or(core::mem::zeroed()) as _, restartscan, lengthreturned.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FsRtlQueryMaximumVirtualDiskNestingLevel() -> u32 { @@ -1253,19 +1253,19 @@ pub unsafe fn FsRtlRegisterFileSystemFilterCallbacks(filterdriverobject: *const #[inline] pub unsafe fn FsRtlRegisterUncProvider(muphandle: *mut super::super::super::Win32::Foundation::HANDLE, redirectordevicename: *const super::super::super::Win32::Foundation::UNICODE_STRING, mailslotssupported: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlRegisterUncProvider(muphandle : *mut super::super::super::Win32::Foundation:: HANDLE, redirectordevicename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, mailslotssupported : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FsRtlRegisterUncProvider(core::mem::transmute(muphandle), redirectordevicename, mailslotssupported) } + unsafe { FsRtlRegisterUncProvider(muphandle as _, redirectordevicename, mailslotssupported) } } #[cfg(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 FsRtlRegisterUncProviderEx(muphandle: *mut super::super::super::Win32::Foundation::HANDLE, redirdevname: *const super::super::super::Win32::Foundation::UNICODE_STRING, deviceobject: *const super::super::Foundation::DEVICE_OBJECT, flags: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlRegisterUncProviderEx(muphandle : *mut super::super::super::Win32::Foundation:: HANDLE, redirdevname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, flags : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FsRtlRegisterUncProviderEx(core::mem::transmute(muphandle), redirdevname, deviceobject, flags) } + unsafe { FsRtlRegisterUncProviderEx(muphandle as _, redirdevname, deviceobject, 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 FsRtlRegisterUncProviderEx2(redirdevname: *const super::super::super::Win32::Foundation::UNICODE_STRING, deviceobject: *const super::super::Foundation::DEVICE_OBJECT, registration: *const FSRTL_UNC_PROVIDER_REGISTRATION, muphandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlRegisterUncProviderEx2(redirdevname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, registration : *const FSRTL_UNC_PROVIDER_REGISTRATION, muphandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FsRtlRegisterUncProviderEx2(redirdevname, deviceobject, registration, core::mem::transmute(muphandle)) } + unsafe { FsRtlRegisterUncProviderEx2(redirdevname, deviceobject, registration, muphandle as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1276,48 +1276,48 @@ pub unsafe fn FsRtlReleaseFile(fileobject: *const super::super::Foundation::FILE #[inline] pub unsafe fn FsRtlRemoveBaseMcbEntry(mcb: *mut BASE_MCB, vbn: i64, sectorcount: i64) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlRemoveBaseMcbEntry(mcb : *mut BASE_MCB, vbn : i64, sectorcount : i64) -> bool); - unsafe { FsRtlRemoveBaseMcbEntry(core::mem::transmute(mcb), vbn, sectorcount) } + unsafe { FsRtlRemoveBaseMcbEntry(mcb as _, vbn, sectorcount) } } #[inline] pub unsafe fn FsRtlRemoveDotsFromPath(originalstring: windows_core::PWSTR, pathlength: u16, newlength: *mut u16) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlRemoveDotsFromPath(originalstring : windows_core::PWSTR, pathlength : u16, newlength : *mut u16) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FsRtlRemoveDotsFromPath(core::mem::transmute(originalstring), pathlength, core::mem::transmute(newlength)) } + unsafe { FsRtlRemoveDotsFromPath(core::mem::transmute(originalstring), pathlength, newlength as _) } } #[cfg(feature = "Wdk_Foundation")] #[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); - unsafe { FsRtlRemoveExtraCreateParameter(core::mem::transmute(ecplist), ecptype, core::mem::transmute(ecpcontext), core::mem::transmute(ecpcontextsize.unwrap_or(core::mem::zeroed()))) } + unsafe { FsRtlRemoveExtraCreateParameter(ecplist as _, ecptype, ecpcontext as _, ecpcontextsize.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn FsRtlRemoveLargeMcbEntry(mcb: *mut LARGE_MCB, vbn: i64, sectorcount: i64) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlRemoveLargeMcbEntry(mcb : *mut LARGE_MCB, vbn : i64, sectorcount : i64)); - unsafe { FsRtlRemoveLargeMcbEntry(core::mem::transmute(mcb), vbn, sectorcount) } + unsafe { FsRtlRemoveLargeMcbEntry(mcb as _, vbn, sectorcount) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn FsRtlRemoveMcbEntry(mcb: *mut MCB, vbn: u32, sectorcount: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlRemoveMcbEntry(mcb : *mut MCB, vbn : u32, sectorcount : u32)); - unsafe { FsRtlRemoveMcbEntry(core::mem::transmute(mcb), vbn, sectorcount) } + unsafe { FsRtlRemoveMcbEntry(mcb as _, vbn, sectorcount) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[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); - unsafe { FsRtlRemovePerFileContext(perfilecontextpointer, core::mem::transmute(ownerid.unwrap_or(core::mem::zeroed())), core::mem::transmute(instanceid.unwrap_or(core::mem::zeroed()))) } + unsafe { FsRtlRemovePerFileContext(perfilecontextpointer, ownerid.unwrap_or(core::mem::zeroed()) as _, instanceid.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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); - unsafe { FsRtlRemovePerFileObjectContext(fileobject, core::mem::transmute(ownerid.unwrap_or(core::mem::zeroed())), core::mem::transmute(instanceid.unwrap_or(core::mem::zeroed()))) } + unsafe { FsRtlRemovePerFileObjectContext(fileobject, ownerid.unwrap_or(core::mem::zeroed()) as _, instanceid.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { FsRtlRemovePerStreamContext(streamcontext, core::mem::transmute(ownerid.unwrap_or(core::mem::zeroed())), core::mem::transmute(instanceid.unwrap_or(core::mem::zeroed()))) } + unsafe { FsRtlRemovePerStreamContext(streamcontext, ownerid.unwrap_or(core::mem::zeroed()) as _, instanceid.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FsRtlResetBaseMcb() -> BASE_MCB { @@ -1332,7 +1332,7 @@ pub unsafe fn FsRtlResetBaseMcb() -> BASE_MCB { #[inline] pub unsafe fn FsRtlResetLargeMcb(mcb: *mut LARGE_MCB, selfsynchronized: bool) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlResetLargeMcb(mcb : *mut LARGE_MCB, selfsynchronized : bool)); - unsafe { FsRtlResetLargeMcb(core::mem::transmute(mcb), selfsynchronized) } + unsafe { FsRtlResetLargeMcb(mcb as _, selfsynchronized) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1344,7 +1344,7 @@ pub unsafe fn FsRtlSetDriverBacking(driverobj: *const super::super::Foundation:: #[inline] pub unsafe fn FsRtlSetEcpListIntoIrp(irp: *mut super::super::Foundation::IRP, ecplist: *const super::super::Foundation::ECP_LIST) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlSetEcpListIntoIrp(irp : *mut super::super::Foundation:: IRP, ecplist : *const super::super::Foundation:: ECP_LIST) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FsRtlSetEcpListIntoIrp(core::mem::transmute(irp), ecplist) } + unsafe { FsRtlSetEcpListIntoIrp(irp as _, 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] @@ -1355,13 +1355,13 @@ pub unsafe fn FsRtlSetKernelEaFile(fileobject: *const super::super::Foundation:: #[inline] pub unsafe fn FsRtlSplitBaseMcb(mcb: *mut BASE_MCB, vbn: i64, amount: i64) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlSplitBaseMcb(mcb : *mut BASE_MCB, vbn : i64, amount : i64) -> bool); - unsafe { FsRtlSplitBaseMcb(core::mem::transmute(mcb), vbn, amount) } + unsafe { FsRtlSplitBaseMcb(mcb as _, vbn, amount) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn FsRtlSplitLargeMcb(mcb: *mut LARGE_MCB, vbn: i64, amount: i64) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlSplitLargeMcb(mcb : *mut LARGE_MCB, vbn : i64, amount : i64) -> bool); - unsafe { FsRtlSplitLargeMcb(core::mem::transmute(mcb), vbn, amount) } + unsafe { FsRtlSplitLargeMcb(mcb as _, vbn, amount) } } #[inline] pub unsafe fn FsRtlTeardownPerFileContexts(perfilecontextpointer: *const *const core::ffi::c_void) { @@ -1377,19 +1377,19 @@ pub unsafe fn FsRtlTeardownPerStreamContexts(advancedheader: *const FSRTL_ADVANC #[inline] pub unsafe fn FsRtlTruncateBaseMcb(mcb: *mut BASE_MCB, vbn: i64) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlTruncateBaseMcb(mcb : *mut BASE_MCB, vbn : i64)); - unsafe { FsRtlTruncateBaseMcb(core::mem::transmute(mcb), vbn) } + unsafe { FsRtlTruncateBaseMcb(mcb as _, vbn) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn FsRtlTruncateLargeMcb(mcb: *mut LARGE_MCB, vbn: i64) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlTruncateLargeMcb(mcb : *mut LARGE_MCB, vbn : i64)); - unsafe { FsRtlTruncateLargeMcb(core::mem::transmute(mcb), vbn) } + unsafe { FsRtlTruncateLargeMcb(mcb as _, vbn) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn FsRtlTruncateMcb(mcb: *mut MCB, vbn: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlTruncateMcb(mcb : *mut MCB, vbn : u32)); - unsafe { FsRtlTruncateMcb(core::mem::transmute(mcb), vbn) } + unsafe { FsRtlTruncateMcb(mcb as _, vbn) } } #[inline] pub unsafe fn FsRtlUninitializeBaseMcb(mcb: *const BASE_MCB) { @@ -1400,24 +1400,24 @@ pub unsafe fn FsRtlUninitializeBaseMcb(mcb: *const BASE_MCB) { #[inline] pub unsafe fn FsRtlUninitializeFileLock(filelock: *mut FILE_LOCK) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlUninitializeFileLock(filelock : *mut FILE_LOCK)); - unsafe { FsRtlUninitializeFileLock(core::mem::transmute(filelock)) } + unsafe { FsRtlUninitializeFileLock(filelock as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn FsRtlUninitializeLargeMcb(mcb: *mut LARGE_MCB) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlUninitializeLargeMcb(mcb : *mut LARGE_MCB)); - unsafe { FsRtlUninitializeLargeMcb(core::mem::transmute(mcb)) } + unsafe { FsRtlUninitializeLargeMcb(mcb as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn FsRtlUninitializeMcb(mcb: *mut MCB) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlUninitializeMcb(mcb : *mut MCB)); - unsafe { FsRtlUninitializeMcb(core::mem::transmute(mcb)) } + unsafe { FsRtlUninitializeMcb(mcb as _) } } #[inline] pub unsafe fn FsRtlUninitializeOplock(oplock: *mut *mut core::ffi::c_void) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlUninitializeOplock(oplock : *mut *mut core::ffi::c_void)); - unsafe { FsRtlUninitializeOplock(core::mem::transmute(oplock)) } + unsafe { FsRtlUninitializeOplock(oplock as _) } } #[inline] pub unsafe fn FsRtlUpdateDiskCounters(bytesread: u64, byteswritten: u64) { @@ -1439,13 +1439,13 @@ pub unsafe fn FsRtlValidateReparsePointBuffer(bufferlength: u32, reparsebuffer: #[inline] pub unsafe fn FsRtlVolumeDeviceToCorrelationId(volumedeviceobject: *const super::super::Foundation::DEVICE_OBJECT, guid: *mut windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlVolumeDeviceToCorrelationId(volumedeviceobject : *const super::super::Foundation:: DEVICE_OBJECT, guid : *mut windows_core::GUID) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { FsRtlVolumeDeviceToCorrelationId(volumedeviceobject, core::mem::transmute(guid)) } + unsafe { FsRtlVolumeDeviceToCorrelationId(volumedeviceobject, guid as _) } } #[cfg(feature = "Win32_Security_Authentication_Identity")] #[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); - unsafe { GetSecurityUserInfo(core::mem::transmute(logonid.unwrap_or(core::mem::zeroed())), flags, core::mem::transmute(userinformation)) } + unsafe { GetSecurityUserInfo(logonid.unwrap_or(core::mem::zeroed()) as _, flags, userinformation as _) } } #[inline] pub unsafe fn IoAcquireVpbSpinLock() -> u8 { @@ -1460,22 +1460,22 @@ pub unsafe fn IoAcquireVpbSpinLock() -> u8 { #[inline] 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); - unsafe { IoApplyPriorityInfoThread(inputpriorityinfo, core::mem::transmute(outputpriorityinfo.unwrap_or(core::mem::zeroed())), thread) } + unsafe { IoApplyPriorityInfoThread(inputpriorityinfo, outputpriorityinfo.unwrap_or(core::mem::zeroed()) as _, thread) } } #[inline] pub unsafe fn IoCheckDesiredAccess(desiredaccess: *mut u32, grantedaccess: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoCheckDesiredAccess(desiredaccess : *mut u32, grantedaccess : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoCheckDesiredAccess(core::mem::transmute(desiredaccess), grantedaccess) } + unsafe { IoCheckDesiredAccess(desiredaccess as _, grantedaccess) } } #[inline] pub unsafe fn IoCheckEaBufferValidity(eabuffer: *const FILE_FULL_EA_INFORMATION, ealength: u32, erroroffset: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoCheckEaBufferValidity(eabuffer : *const FILE_FULL_EA_INFORMATION, ealength : u32, erroroffset : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoCheckEaBufferValidity(eabuffer, ealength, core::mem::transmute(erroroffset)) } + unsafe { IoCheckEaBufferValidity(eabuffer, ealength, erroroffset as _) } } #[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); - unsafe { IoCheckFunctionAccess(grantedaccess, majorfunction, minorfunction, iocontrolcode, core::mem::transmute(arg1.unwrap_or(core::mem::zeroed())), core::mem::transmute(arg2.unwrap_or(core::mem::zeroed()))) } + unsafe { IoCheckFunctionAccess(grantedaccess, majorfunction, minorfunction, iocontrolcode, arg1.unwrap_or(core::mem::zeroed()) as _, arg2.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn IoCheckQuerySetFileInformation(fileinformationclass: FILE_INFORMATION_CLASS, length: u32, setoperation: bool) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -1491,55 +1491,55 @@ pub unsafe fn IoCheckQuerySetVolumeInformation(fsinformationclass: FS_INFORMATIO #[inline] pub unsafe fn IoCheckQuotaBufferValidity(quotabuffer: *const FILE_QUOTA_INFORMATION, quotalength: u32, erroroffset: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoCheckQuotaBufferValidity(quotabuffer : *const FILE_QUOTA_INFORMATION, quotalength : u32, erroroffset : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoCheckQuotaBufferValidity(quotabuffer, quotalength, core::mem::transmute(erroroffset)) } + unsafe { IoCheckQuotaBufferValidity(quotabuffer, quotalength, erroroffset as _) } } #[cfg(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 IoClearFsTrackOffsetState(irp: *mut super::super::Foundation::IRP) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoClearFsTrackOffsetState(irp : *mut super::super::Foundation:: IRP) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoClearFsTrackOffsetState(core::mem::transmute(irp)) } + unsafe { IoClearFsTrackOffsetState(irp as _) } } #[cfg(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 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); - unsafe { IoCreateStreamFileObject(core::mem::transmute(fileobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(deviceobject.unwrap_or(core::mem::zeroed()))) } + unsafe { IoCreateStreamFileObject(fileobject.unwrap_or(core::mem::zeroed()) as _, deviceobject.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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); - unsafe { 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()))) } + unsafe { IoCreateStreamFileObjectEx(fileobject.unwrap_or(core::mem::zeroed()) as _, deviceobject.unwrap_or(core::mem::zeroed()) as _, filehandle.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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); - unsafe { IoCreateStreamFileObjectEx2(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()))) } + unsafe { IoCreateStreamFileObjectEx2(createoptions, fileobject.unwrap_or(core::mem::zeroed()) as _, deviceobject.unwrap_or(core::mem::zeroed()) as _, streamfileobject as _, filehandle.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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); - unsafe { IoCreateStreamFileObjectLite(core::mem::transmute(fileobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(deviceobject.unwrap_or(core::mem::zeroed()))) } + unsafe { IoCreateStreamFileObjectLite(fileobject.unwrap_or(core::mem::zeroed()) as _, deviceobject.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(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); - unsafe { IoEnumerateDeviceObjectList(driverobject, core::mem::transmute(deviceobjectlist.unwrap_or(core::mem::zeroed())), deviceobjectlistsize, core::mem::transmute(actualnumberdeviceobjects)) } + unsafe { IoEnumerateDeviceObjectList(driverobject, deviceobjectlist.unwrap_or(core::mem::zeroed()) as _, deviceobjectlistsize, actualnumberdeviceobjects as _) } } #[cfg(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); - unsafe { IoEnumerateRegisteredFiltersList(core::mem::transmute(driverobjectlist.unwrap_or(core::mem::zeroed())), driverobjectlistsize, core::mem::transmute(actualnumberdriverobjects)) } + unsafe { IoEnumerateRegisteredFiltersList(driverobjectlist.unwrap_or(core::mem::zeroed()) as _, driverobjectlistsize, actualnumberdriverobjects as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", feature = "Win32_System_IO"))] #[inline] pub unsafe fn IoFastQueryNetworkAttributes(objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, desiredaccess: u32, openoptions: u32, iostatus: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, buffer: *mut FILE_NETWORK_OPEN_INFORMATION) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn IoFastQueryNetworkAttributes(objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, desiredaccess : u32, openoptions : u32, iostatus : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, buffer : *mut FILE_NETWORK_OPEN_INFORMATION) -> bool); - unsafe { IoFastQueryNetworkAttributes(objectattributes, desiredaccess, openoptions, core::mem::transmute(iostatus), core::mem::transmute(buffer)) } + unsafe { IoFastQueryNetworkAttributes(objectattributes, desiredaccess, openoptions, iostatus as _, buffer as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1569,13 +1569,13 @@ pub unsafe fn IoGetDeviceToVerify(thread: super::super::Foundation::PETHREAD) -> #[inline] pub unsafe fn IoGetDiskDeviceObject(filesystemdeviceobject: *const super::super::Foundation::DEVICE_OBJECT, diskdeviceobject: *mut *mut super::super::Foundation::DEVICE_OBJECT) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoGetDiskDeviceObject(filesystemdeviceobject : *const super::super::Foundation:: DEVICE_OBJECT, diskdeviceobject : *mut *mut super::super::Foundation:: DEVICE_OBJECT) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoGetDiskDeviceObject(filesystemdeviceobject, core::mem::transmute(diskdeviceobject)) } + unsafe { IoGetDiskDeviceObject(filesystemdeviceobject, diskdeviceobject as _) } } #[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] pub unsafe fn IoGetFsTrackOffsetState(irp: *const super::super::Foundation::IRP, retfstrackoffsetblob: *mut *mut super::super::super::Win32::System::Ioctl::IO_IRP_EXT_TRACK_OFFSET_HEADER, rettrackedoffset: *mut i64) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoGetFsTrackOffsetState(irp : *const super::super::Foundation:: IRP, retfstrackoffsetblob : *mut *mut super::super::super::Win32::System::Ioctl:: IO_IRP_EXT_TRACK_OFFSET_HEADER, rettrackedoffset : *mut i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoGetFsTrackOffsetState(irp, core::mem::transmute(retfstrackoffsetblob), core::mem::transmute(rettrackedoffset)) } + unsafe { IoGetFsTrackOffsetState(irp, retfstrackoffsetblob as _, rettrackedoffset as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1611,7 +1611,7 @@ pub unsafe fn IoGetRequestorProcessId(irp: *const super::super::Foundation::IRP) #[inline] pub unsafe fn IoGetRequestorSessionId(irp: *const super::super::Foundation::IRP, psessionid: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoGetRequestorSessionId(irp : *const super::super::Foundation:: IRP, psessionid : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoGetRequestorSessionId(irp, core::mem::transmute(psessionid)) } + unsafe { IoGetRequestorSessionId(irp, psessionid as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1641,25 +1641,25 @@ pub unsafe fn IoIsValidNameGraftingBuffer(irp: *const super::super::Foundation:: #[inline] pub unsafe fn IoPageRead(fileobject: *const super::super::Foundation::FILE_OBJECT, memorydescriptorlist: *const super::super::Foundation::MDL, startingoffset: *const i64, event: *const super::super::Foundation::KEVENT, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoPageRead(fileobject : *const super::super::Foundation:: FILE_OBJECT, memorydescriptorlist : *const super::super::Foundation:: MDL, startingoffset : *const i64, event : *const super::super::Foundation:: KEVENT, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoPageRead(fileobject, memorydescriptorlist, startingoffset, event, core::mem::transmute(iostatusblock)) } + unsafe { IoPageRead(fileobject, memorydescriptorlist, startingoffset, event, iostatusblock as _) } } #[cfg(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 IoQueryFileDosDeviceName(fileobject: *const super::super::Foundation::FILE_OBJECT, objectnameinformation: *mut *mut super::super::Foundation::OBJECT_NAME_INFORMATION) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoQueryFileDosDeviceName(fileobject : *const super::super::Foundation:: FILE_OBJECT, objectnameinformation : *mut *mut super::super::Foundation:: OBJECT_NAME_INFORMATION) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoQueryFileDosDeviceName(fileobject, core::mem::transmute(objectnameinformation)) } + unsafe { IoQueryFileDosDeviceName(fileobject, objectnameinformation as _) } } #[cfg(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 IoQueryFileInformation(fileobject: *const super::super::Foundation::FILE_OBJECT, fileinformationclass: FILE_INFORMATION_CLASS, length: u32, fileinformation: *mut core::ffi::c_void, returnedlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoQueryFileInformation(fileobject : *const super::super::Foundation:: FILE_OBJECT, fileinformationclass : FILE_INFORMATION_CLASS, length : u32, fileinformation : *mut core::ffi::c_void, returnedlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoQueryFileInformation(fileobject, fileinformationclass, length, core::mem::transmute(fileinformation), core::mem::transmute(returnedlength)) } + unsafe { IoQueryFileInformation(fileobject, fileinformationclass, length, fileinformation as _, returnedlength as _) } } #[cfg(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 IoQueryVolumeInformation(fileobject: *const super::super::Foundation::FILE_OBJECT, fsinformationclass: FS_INFORMATION_CLASS, length: u32, fsinformation: *mut core::ffi::c_void, returnedlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoQueryVolumeInformation(fileobject : *const super::super::Foundation:: FILE_OBJECT, fsinformationclass : FS_INFORMATION_CLASS, length : u32, fsinformation : *mut core::ffi::c_void, returnedlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoQueryVolumeInformation(fileobject, fsinformationclass, length, core::mem::transmute(fsinformation), core::mem::transmute(returnedlength)) } + unsafe { IoQueryVolumeInformation(fileobject, fsinformationclass, length, fsinformation as _, returnedlength as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1709,19 +1709,19 @@ pub unsafe fn IoRequestDeviceRemovalForReset(physicaldeviceobject: *const super: #[inline] 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); - unsafe { 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)) } + unsafe { IoRetrievePriorityInfo(irp.unwrap_or(core::mem::zeroed()) as _, fileobject.unwrap_or(core::mem::zeroed()) as _, thread.unwrap_or(core::mem::zeroed()) as _, priorityinfo as _) } } #[cfg(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: 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)); - unsafe { IoSetDeviceToVerify(thread, core::mem::transmute(deviceobject.unwrap_or(core::mem::zeroed()))) } + unsafe { IoSetDeviceToVerify(thread, deviceobject.unwrap_or(core::mem::zeroed()) as _) } } #[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] pub unsafe fn IoSetFsTrackOffsetState(irp: *mut super::super::Foundation::IRP, fstrackoffsetblob: *const super::super::super::Win32::System::Ioctl::IO_IRP_EXT_TRACK_OFFSET_HEADER, trackedoffset: i64) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoSetFsTrackOffsetState(irp : *mut super::super::Foundation:: IRP, fstrackoffsetblob : *const super::super::super::Win32::System::Ioctl:: IO_IRP_EXT_TRACK_OFFSET_HEADER, trackedoffset : i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoSetFsTrackOffsetState(core::mem::transmute(irp), fstrackoffsetblob, trackedoffset) } + unsafe { IoSetFsTrackOffsetState(irp as _, fstrackoffsetblob, trackedoffset) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1733,7 +1733,7 @@ pub unsafe fn IoSetInformation(fileobject: *const super::super::Foundation::FILE #[inline] pub unsafe fn IoSynchronousPageWrite(fileobject: *const super::super::Foundation::FILE_OBJECT, memorydescriptorlist: *const super::super::Foundation::MDL, startingoffset: *const i64, event: *const super::super::Foundation::KEVENT, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoSynchronousPageWrite(fileobject : *const super::super::Foundation:: FILE_OBJECT, memorydescriptorlist : *const super::super::Foundation:: MDL, startingoffset : *const i64, event : *const super::super::Foundation:: KEVENT, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoSynchronousPageWrite(fileobject, memorydescriptorlist, startingoffset, event, core::mem::transmute(iostatusblock)) } + unsafe { IoSynchronousPageWrite(fileobject, memorydescriptorlist, startingoffset, event, iostatusblock as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -1768,7 +1768,7 @@ pub unsafe fn KeAcquireQueuedSpinLock(number: super::super::Foundation::KSPIN_LO #[inline] pub unsafe fn KeAcquireSpinLockRaiseToSynch(spinlock: *mut usize) -> u8 { windows_targets::link!("ntoskrnl.exe" "system" fn KeAcquireSpinLockRaiseToSynch(spinlock : *mut usize) -> u8); - unsafe { KeAcquireSpinLockRaiseToSynch(core::mem::transmute(spinlock)) } + unsafe { KeAcquireSpinLockRaiseToSynch(spinlock as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -1785,25 +1785,25 @@ pub unsafe fn KeDetachProcess() { #[inline] pub unsafe fn KeInitializeMutant(mutant: *mut super::super::Foundation::KMUTANT, initialowner: bool) { windows_targets::link!("ntoskrnl.exe" "system" fn KeInitializeMutant(mutant : *mut super::super::Foundation:: KMUTANT, initialowner : bool)); - unsafe { KeInitializeMutant(core::mem::transmute(mutant), initialowner) } + unsafe { KeInitializeMutant(mutant as _, initialowner) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeInitializeQueue(queue: *mut super::super::Foundation::KQUEUE, count: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn KeInitializeQueue(queue : *mut super::super::Foundation:: KQUEUE, count : u32)); - unsafe { KeInitializeQueue(core::mem::transmute(queue), count) } + unsafe { KeInitializeQueue(queue as _, count) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeInsertHeadQueue(queue: *mut super::super::Foundation::KQUEUE, entry: *mut super::super::super::Win32::System::Kernel::LIST_ENTRY) -> i32 { windows_targets::link!("ntoskrnl.exe" "system" fn KeInsertHeadQueue(queue : *mut super::super::Foundation:: KQUEUE, entry : *mut super::super::super::Win32::System::Kernel:: LIST_ENTRY) -> i32); - unsafe { KeInsertHeadQueue(core::mem::transmute(queue), core::mem::transmute(entry)) } + unsafe { KeInsertHeadQueue(queue as _, entry as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeInsertQueue(queue: *mut super::super::Foundation::KQUEUE, entry: *mut super::super::super::Win32::System::Kernel::LIST_ENTRY) -> i32 { windows_targets::link!("ntoskrnl.exe" "system" fn KeInsertQueue(queue : *mut super::super::Foundation:: KQUEUE, entry : *mut super::super::super::Win32::System::Kernel:: LIST_ENTRY) -> i32); - unsafe { KeInsertQueue(core::mem::transmute(queue), core::mem::transmute(entry)) } + unsafe { KeInsertQueue(queue as _, entry as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -1821,7 +1821,7 @@ pub unsafe fn KeReadStateQueue(queue: *const super::super::Foundation::KQUEUE) - #[inline] pub unsafe fn KeReleaseMutant(mutant: *mut super::super::Foundation::KMUTANT, increment: i32, abandoned: bool, wait: bool) -> i32 { windows_targets::link!("ntoskrnl.exe" "system" fn KeReleaseMutant(mutant : *mut super::super::Foundation:: KMUTANT, increment : i32, abandoned : bool, wait : bool) -> i32); - unsafe { KeReleaseMutant(core::mem::transmute(mutant), increment, abandoned, wait) } + unsafe { KeReleaseMutant(mutant as _, increment, abandoned, wait) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -1833,19 +1833,19 @@ 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); - unsafe { KeRemoveQueue(core::mem::transmute(queue), waitmode, core::mem::transmute(timeout.unwrap_or(core::mem::zeroed()))) } + unsafe { KeRemoveQueue(queue as _, waitmode, timeout.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeRemoveQueueEx(queue: *mut super::super::Foundation::KQUEUE, waitmode: i8, alertable: bool, timeout: Option<*const i64>, entryarray: &mut [*mut super::super::super::Win32::System::Kernel::LIST_ENTRY]) -> u32 { windows_targets::link!("ntoskrnl.exe" "system" fn KeRemoveQueueEx(queue : *mut super::super::Foundation:: KQUEUE, waitmode : i8, alertable : bool, timeout : *const i64, entryarray : *mut *mut super::super::super::Win32::System::Kernel:: LIST_ENTRY, count : u32) -> u32); - unsafe { KeRemoveQueueEx(core::mem::transmute(queue), waitmode, alertable, core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), core::mem::transmute(entryarray.as_ptr()), entryarray.len().try_into().unwrap()) } + unsafe { KeRemoveQueueEx(queue as _, waitmode, alertable, timeout.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(entryarray.as_ptr()), entryarray.len().try_into().unwrap()) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeRundownQueue(queue: *mut super::super::Foundation::KQUEUE) -> *mut super::super::super::Win32::System::Kernel::LIST_ENTRY { windows_targets::link!("ntoskrnl.exe" "system" fn KeRundownQueue(queue : *mut super::super::Foundation:: KQUEUE) -> *mut super::super::super::Win32::System::Kernel:: LIST_ENTRY); - unsafe { KeRundownQueue(core::mem::transmute(queue)) } + unsafe { KeRundownQueue(queue as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -1862,13 +1862,13 @@ pub unsafe fn KeSetKernelStackSwapEnable(enable: bool) -> bool { #[inline] 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)); - unsafe { KeStackAttachProcess(process, core::mem::transmute(apcstate)) } + unsafe { KeStackAttachProcess(process, apcstate as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn KeTryToAcquireQueuedSpinLock(number: super::super::Foundation::KSPIN_LOCK_QUEUE_NUMBER, oldirql: *mut u8) -> u32 { windows_targets::link!("ntoskrnl.exe" "system" fn KeTryToAcquireQueuedSpinLock(number : super::super::Foundation:: KSPIN_LOCK_QUEUE_NUMBER, oldirql : *mut u8) -> u32); - unsafe { KeTryToAcquireQueuedSpinLock(number, core::mem::transmute(oldirql)) } + unsafe { KeTryToAcquireQueuedSpinLock(number, oldirql as _) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -1890,7 +1890,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>) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn MmCanFileBeTruncated(sectionpointer : *const super::super::Foundation:: SECTION_OBJECT_POINTERS, newfilesize : *const i64) -> bool); - unsafe { MmCanFileBeTruncated(sectionpointer, core::mem::transmute(newfilesize.unwrap_or(core::mem::zeroed()))) } + unsafe { MmCanFileBeTruncated(sectionpointer, newfilesize.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -1925,7 +1925,7 @@ pub unsafe fn MmGetMaximumFileSectionSize() -> u64 { #[inline] pub unsafe fn MmIsFileSectionActive(fssectionpointer: *const super::super::Foundation::SECTION_OBJECT_POINTERS, flags: u32, sectionisactive: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn MmIsFileSectionActive(fssectionpointer : *const super::super::Foundation:: SECTION_OBJECT_POINTERS, flags : u32, sectionisactive : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { MmIsFileSectionActive(fssectionpointer, flags, core::mem::transmute(sectionisactive)) } + unsafe { MmIsFileSectionActive(fssectionpointer, flags, sectionisactive as _) } } #[inline] pub unsafe fn MmIsRecursiveIoFault() -> bool { @@ -1953,7 +1953,7 @@ pub unsafe fn MmSetAddressRangeModified(address: *const core::ffi::c_void, lengt #[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: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, desiredaccess: u32, genericmapping: *const super::super::super::Win32::Security::GENERIC_MAPPING, objectcreation: bool, grantedaccess: *mut u32, accessstatus: *mut i32, generateonclose: *mut bool) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, grantedaccess : *mut u32, accessstatus : *mut i32, generateonclose : *mut bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtAccessCheckAndAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), objecttypename, objectname, securitydescriptor, desiredaccess, genericmapping, objectcreation, core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(generateonclose)) } + unsafe { NtAccessCheckAndAuditAlarm(subsystemname, handleid.unwrap_or(core::mem::zeroed()) as _, objecttypename, objectname, securitydescriptor, desiredaccess, genericmapping, objectcreation, grantedaccess as _, accessstatus as _, generateonclose as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -1975,26 +1975,7 @@ pub unsafe fn NtAccessCheckByTypeAndAuditAlarm( generateonclose: *mut bool, ) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, grantedaccess : *mut u32, accessstatus : *mut i32, generateonclose : *mut bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { - NtAccessCheckByTypeAndAuditAlarm( - subsystemname, - core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), - objecttypename, - objectname, - securitydescriptor, - core::mem::transmute(principalselfsid.unwrap_or(core::mem::zeroed())), - desiredaccess, - audittype, - flags, - core::mem::transmute(objecttypelist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - objecttypelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - genericmapping, - objectcreation, - core::mem::transmute(grantedaccess), - core::mem::transmute(accessstatus), - core::mem::transmute(generateonclose), - ) - } + unsafe { NtAccessCheckByTypeAndAuditAlarm(subsystemname, handleid.unwrap_or(core::mem::zeroed()) as _, objecttypename, objectname, securitydescriptor, principalselfsid.unwrap_or(core::mem::zeroed()) as _, desiredaccess, audittype, flags, core::mem::transmute(objecttypelist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), objecttypelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), genericmapping, objectcreation, grantedaccess as _, accessstatus as _, generateonclose as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -2017,7 +1998,7 @@ pub unsafe fn NtAccessCheckByTypeResultListAndAuditAlarm( generateonclose: *mut bool, ) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, grantedaccess : *mut u32, accessstatus : *mut i32, generateonclose : *mut bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtAccessCheckByTypeResultListAndAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), objecttypename, objectname, securitydescriptor, core::mem::transmute(principalselfsid.unwrap_or(core::mem::zeroed())), desiredaccess, audittype, flags, core::mem::transmute(objecttypelist.unwrap_or(core::mem::zeroed())), objecttypelistlength, genericmapping, objectcreation, core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(generateonclose)) } + unsafe { NtAccessCheckByTypeResultListAndAuditAlarm(subsystemname, handleid.unwrap_or(core::mem::zeroed()) as _, objecttypename, objectname, securitydescriptor, principalselfsid.unwrap_or(core::mem::zeroed()) as _, desiredaccess, audittype, flags, objecttypelist.unwrap_or(core::mem::zeroed()) as _, objecttypelistlength, genericmapping, objectcreation, grantedaccess as _, accessstatus as _, generateonclose as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -2041,83 +2022,71 @@ pub unsafe fn NtAccessCheckByTypeResultListAndAuditAlarmByHandle( generateonclose: *mut bool, ) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, grantedaccess : *mut u32, accessstatus : *mut i32, generateonclose : *mut bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtAccessCheckByTypeResultListAndAuditAlarmByHandle(subsystemname, core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), clienttoken, objecttypename, objectname, securitydescriptor, core::mem::transmute(principalselfsid.unwrap_or(core::mem::zeroed())), desiredaccess, audittype, flags, core::mem::transmute(objecttypelist.unwrap_or(core::mem::zeroed())), objecttypelistlength, genericmapping, objectcreation, core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(generateonclose)) } + unsafe { NtAccessCheckByTypeResultListAndAuditAlarmByHandle(subsystemname, handleid.unwrap_or(core::mem::zeroed()) as _, clienttoken, objecttypename, objectname, securitydescriptor, principalselfsid.unwrap_or(core::mem::zeroed()) as _, desiredaccess, audittype, flags, objecttypelist.unwrap_or(core::mem::zeroed()) as _, objecttypelistlength, genericmapping, objectcreation, grantedaccess as _, accessstatus as _, generateonclose as _) } } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn NtAdjustGroupsToken(tokenhandle: super::super::super::Win32::Foundation::HANDLE, resettodefault: bool, 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 { windows_targets::link!("ntdll.dll" "system" fn NtAdjustGroupsToken(tokenhandle : super::super::super::Win32::Foundation:: HANDLE, resettodefault : bool, 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); - unsafe { NtAdjustGroupsToken(tokenhandle, resettodefault, core::mem::transmute(newstate.unwrap_or(core::mem::zeroed())), bufferlength, core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnlength)) } + unsafe { NtAdjustGroupsToken(tokenhandle, resettodefault, newstate.unwrap_or(core::mem::zeroed()) as _, bufferlength, previousstate.unwrap_or(core::mem::zeroed()) as _, returnlength as _) } } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn NtAdjustPrivilegesToken(tokenhandle: super::super::super::Win32::Foundation::HANDLE, disableallprivileges: bool, 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 { windows_targets::link!("ntdll.dll" "system" fn NtAdjustPrivilegesToken(tokenhandle : super::super::super::Win32::Foundation:: HANDLE, disableallprivileges : bool, 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); - unsafe { NtAdjustPrivilegesToken(tokenhandle, disableallprivileges, core::mem::transmute(newstate.unwrap_or(core::mem::zeroed())), bufferlength, core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } + unsafe { NtAdjustPrivilegesToken(tokenhandle, disableallprivileges, newstate.unwrap_or(core::mem::zeroed()) as _, bufferlength, previousstate.unwrap_or(core::mem::zeroed()) as _, returnlength.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { NtAllocateVirtualMemory(processhandle, core::mem::transmute(baseaddress), zerobits, core::mem::transmute(regionsize), allocationtype, protect) } + unsafe { NtAllocateVirtualMemory(processhandle, baseaddress as _, zerobits, regionsize as _, allocationtype, protect) } } #[cfg(feature = "Win32_System_Memory")] #[inline] 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); - unsafe { NtAllocateVirtualMemoryEx(processhandle, core::mem::transmute(baseaddress), core::mem::transmute(regionsize), allocationtype, pageprotection, core::mem::transmute(extendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } + unsafe { NtAllocateVirtualMemoryEx(processhandle, baseaddress as _, regionsize as _, allocationtype, pageprotection, core::mem::transmute(extendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { NtCancelIoFileEx(filehandle, core::mem::transmute(iorequesttocancel.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock)) } + unsafe { NtCancelIoFileEx(filehandle, iorequesttocancel.unwrap_or(core::mem::zeroed()) as _, iostatusblock as _) } } #[inline] pub unsafe fn NtCloseObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, generateonclose: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtCloseObjectAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, generateonclose : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtCloseObjectAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), generateonclose) } + unsafe { NtCloseObjectAuditAlarm(subsystemname, handleid.unwrap_or(core::mem::zeroed()) as _, generateonclose) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn NtCreateDirectoryObject(directoryhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtCreateDirectoryObject(directoryhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtCreateDirectoryObject(core::mem::transmute(directoryhandle), desiredaccess, objectattributes) } + unsafe { NtCreateDirectoryObject(directoryhandle as _, desiredaccess, objectattributes) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn NtCreateEvent(eventhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, eventtype: super::super::super::Win32::System::Kernel::EVENT_TYPE, initialstate: bool) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtCreateEvent(core::mem::transmute(eventhandle), desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), eventtype, initialstate) } + unsafe { NtCreateEvent(eventhandle as _, desiredaccess, objectattributes.unwrap_or(core::mem::zeroed()) as _, eventtype, initialstate) } } #[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); - unsafe { NtCreateFile(core::mem::transmute(filehandle), desiredaccess, objectattributes, core::mem::transmute(iostatusblock), core::mem::transmute(allocationsize.unwrap_or(core::mem::zeroed())), fileattributes, shareaccess, createdisposition, createoptions, core::mem::transmute(eabuffer.unwrap_or(core::mem::zeroed())), ealength) } + unsafe { NtCreateFile(filehandle as _, desiredaccess, objectattributes, iostatusblock as _, allocationsize.unwrap_or(core::mem::zeroed()) as _, fileattributes, shareaccess, createdisposition, createoptions, eabuffer.unwrap_or(core::mem::zeroed()) as _, 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: 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); - unsafe { NtCreateSection(core::mem::transmute(sectionhandle), desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(maximumsize.unwrap_or(core::mem::zeroed())), sectionpageprotection, allocationattributes, core::mem::transmute(filehandle.unwrap_or(core::mem::zeroed()))) } + unsafe { NtCreateSection(sectionhandle as _, desiredaccess, objectattributes.unwrap_or(core::mem::zeroed()) as _, maximumsize.unwrap_or(core::mem::zeroed()) as _, sectionpageprotection, allocationattributes, filehandle.unwrap_or(core::mem::zeroed()) as _) } } #[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: 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); - unsafe { - NtCreateSectionEx( - core::mem::transmute(sectionhandle), - desiredaccess, - core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), - core::mem::transmute(maximumsize.unwrap_or(core::mem::zeroed())), - sectionpageprotection, - allocationattributes, - 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()), - ) - } + unsafe { NtCreateSectionEx(sectionhandle as _, desiredaccess, objectattributes.unwrap_or(core::mem::zeroed()) as _, maximumsize.unwrap_or(core::mem::zeroed()) as _, sectionpageprotection, allocationattributes, filehandle.unwrap_or(core::mem::zeroed()) as _, 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(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -2128,53 +2097,53 @@ pub unsafe fn NtDeleteFile(objectattributes: *const super::super::Foundation::OB #[inline] pub unsafe fn NtDeleteObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, generateonclose: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtDeleteObjectAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, generateonclose : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtDeleteObjectAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), generateonclose) } + unsafe { NtDeleteObjectAuditAlarm(subsystemname, handleid.unwrap_or(core::mem::zeroed()) as _, generateonclose) } } #[inline] 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); - unsafe { NtDuplicateObject(sourceprocesshandle, sourcehandle, core::mem::transmute(targetprocesshandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(targethandle.unwrap_or(core::mem::zeroed())), desiredaccess, handleattributes, options) } + unsafe { NtDuplicateObject(sourceprocesshandle, sourcehandle, targetprocesshandle.unwrap_or(core::mem::zeroed()) as _, targethandle.unwrap_or(core::mem::zeroed()) as _, desiredaccess, handleattributes, options) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn NtDuplicateToken(existingtokenhandle: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, effectiveonly: bool, tokentype: super::super::super::Win32::Security::TOKEN_TYPE, newtokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, tokentype : super::super::super::Win32::Security:: TOKEN_TYPE, newtokenhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtDuplicateToken(existingtokenhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), effectiveonly, tokentype, core::mem::transmute(newtokenhandle)) } + unsafe { NtDuplicateToken(existingtokenhandle, desiredaccess, objectattributes.unwrap_or(core::mem::zeroed()) as _, effectiveonly, tokentype, newtokenhandle as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { NtFilterToken(existingtokenhandle, 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)) } + unsafe { NtFilterToken(existingtokenhandle, flags, sidstodisable.unwrap_or(core::mem::zeroed()) as _, privilegestodelete.unwrap_or(core::mem::zeroed()) as _, restrictedsids.unwrap_or(core::mem::zeroed()) as _, newtokenhandle as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { NtFlushBuffersFile(filehandle, core::mem::transmute(iostatusblock)) } + unsafe { NtFlushBuffersFile(filehandle, iostatusblock as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { NtFlushBuffersFileEx(filehandle, flags, parameters, parameterssize, core::mem::transmute(iostatusblock)) } + unsafe { NtFlushBuffersFileEx(filehandle, flags, parameters, parameterssize, iostatusblock as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { NtFlushVirtualMemory(processhandle, core::mem::transmute(baseaddress), core::mem::transmute(regionsize), core::mem::transmute(iostatus)) } + unsafe { NtFlushVirtualMemory(processhandle, baseaddress as _, regionsize as _, iostatus as _) } } #[inline] 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); - unsafe { NtFreeVirtualMemory(processhandle, core::mem::transmute(baseaddress), core::mem::transmute(regionsize), freetype) } + unsafe { NtFreeVirtualMemory(processhandle, baseaddress as _, regionsize as _, freetype) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { NtFsControlFile(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), fscontrolcode, core::mem::transmute(inputbuffer.unwrap_or(core::mem::zeroed())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(core::mem::zeroed())), outputbufferlength) } + unsafe { NtFsControlFile(filehandle, event.unwrap_or(core::mem::zeroed()) as _, apcroutine.unwrap_or(core::mem::zeroed()) as _, apccontext.unwrap_or(core::mem::zeroed()) as _, iostatusblock as _, fscontrolcode, inputbuffer.unwrap_or(core::mem::zeroed()) as _, inputbufferlength, outputbuffer.unwrap_or(core::mem::zeroed()) as _, outputbufferlength) } } #[inline] pub unsafe fn NtImpersonateAnonymousToken(threadhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -2185,69 +2154,69 @@ pub unsafe fn NtImpersonateAnonymousToken(threadhandle: super::super::super::Win #[inline] 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: bool, exclusivelock: bool) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, exclusivelock : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtLockFile(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), byteoffset, length, key, failimmediately, exclusivelock) } + unsafe { NtLockFile(filehandle, event.unwrap_or(core::mem::zeroed()) as _, apcroutine.unwrap_or(core::mem::zeroed()) as _, apccontext.unwrap_or(core::mem::zeroed()) as _, iostatusblock as _, byteoffset, length, key, failimmediately, exclusivelock) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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: bool, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, asynchronous: bool) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, buffer : *mut core::ffi::c_void, buffersize : u32, asynchronous : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtNotifyChangeKey(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), completionfilter, watchtree, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, asynchronous) } + unsafe { NtNotifyChangeKey(keyhandle, event.unwrap_or(core::mem::zeroed()) as _, apcroutine.unwrap_or(core::mem::zeroed()) as _, apccontext.unwrap_or(core::mem::zeroed()) as _, iostatusblock as _, completionfilter, watchtree, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, asynchronous) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn NtOpenDirectoryObject(directoryhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtOpenDirectoryObject(directoryhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtOpenDirectoryObject(core::mem::transmute(directoryhandle), desiredaccess, objectattributes) } + unsafe { NtOpenDirectoryObject(directoryhandle as _, desiredaccess, objectattributes) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", feature = "Win32_System_IO"))] #[inline] pub unsafe fn NtOpenFile(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, shareaccess: u32, openoptions: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtOpenFile(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, shareaccess : u32, openoptions : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtOpenFile(core::mem::transmute(filehandle), desiredaccess, objectattributes, core::mem::transmute(iostatusblock), shareaccess, openoptions) } + unsafe { NtOpenFile(filehandle as _, desiredaccess, objectattributes, iostatusblock as _, shareaccess, openoptions) } } #[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: Option, clienttoken: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, grantedaccess: u32, privileges: Option<*const super::super::super::Win32::Security::PRIVILEGE_SET>, objectcreation: bool, accessgranted: bool, generateonclose: *mut bool) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, accessgranted : bool, generateonclose : *mut bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtOpenObjectAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), objecttypename, objectname, core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), clienttoken, desiredaccess, grantedaccess, core::mem::transmute(privileges.unwrap_or(core::mem::zeroed())), objectcreation, accessgranted, core::mem::transmute(generateonclose)) } + unsafe { NtOpenObjectAuditAlarm(subsystemname, handleid.unwrap_or(core::mem::zeroed()) as _, objecttypename, objectname, securitydescriptor.unwrap_or(core::mem::zeroed()) as _, clienttoken, desiredaccess, grantedaccess, privileges.unwrap_or(core::mem::zeroed()) as _, objectcreation, accessgranted, generateonclose as _) } } #[inline] 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); - unsafe { NtOpenProcessToken(processhandle, desiredaccess, core::mem::transmute(tokenhandle)) } + unsafe { NtOpenProcessToken(processhandle, desiredaccess, tokenhandle as _) } } #[inline] 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); - unsafe { NtOpenProcessTokenEx(processhandle, desiredaccess, handleattributes, core::mem::transmute(tokenhandle)) } + unsafe { NtOpenProcessTokenEx(processhandle, desiredaccess, handleattributes, tokenhandle as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn NtOpenSymbolicLinkObject(linkhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtOpenSymbolicLinkObject(linkhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtOpenSymbolicLinkObject(core::mem::transmute(linkhandle), desiredaccess, objectattributes) } + unsafe { NtOpenSymbolicLinkObject(linkhandle as _, desiredaccess, objectattributes) } } #[inline] pub unsafe fn NtOpenThreadToken(threadhandle: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, openasself: bool, tokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtOpenThreadToken(threadhandle : super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, openasself : bool, tokenhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtOpenThreadToken(threadhandle, desiredaccess, openasself, core::mem::transmute(tokenhandle)) } + unsafe { NtOpenThreadToken(threadhandle, desiredaccess, openasself, tokenhandle as _) } } #[inline] pub unsafe fn NtOpenThreadTokenEx(threadhandle: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, openasself: bool, handleattributes: u32, tokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtOpenThreadTokenEx(threadhandle : super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, openasself : bool, handleattributes : u32, tokenhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtOpenThreadTokenEx(threadhandle, desiredaccess, openasself, handleattributes, core::mem::transmute(tokenhandle)) } + unsafe { NtOpenThreadTokenEx(threadhandle, desiredaccess, openasself, handleattributes, tokenhandle as _) } } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn NtPrivilegeCheck(clienttoken: super::super::super::Win32::Foundation::HANDLE, requiredprivileges: *mut super::super::super::Win32::Security::PRIVILEGE_SET, result: *mut bool) -> 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 bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtPrivilegeCheck(clienttoken, core::mem::transmute(requiredprivileges), core::mem::transmute(result)) } + unsafe { NtPrivilegeCheck(clienttoken, requiredprivileges as _, result as _) } } #[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: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, privileges: *const super::super::super::Win32::Security::PRIVILEGE_SET, accessgranted: bool) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtPrivilegeObjectAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), clienttoken, desiredaccess, privileges, accessgranted) } + unsafe { NtPrivilegeObjectAuditAlarm(subsystemname, handleid.unwrap_or(core::mem::zeroed()) as _, clienttoken, desiredaccess, privileges, accessgranted) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -2259,99 +2228,99 @@ pub unsafe fn NtPrivilegedServiceAuditAlarm(subsystemname: *const super::super:: #[inline] 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: bool, filename: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, restartscan: bool) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, filename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, restartscan : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtQueryDirectoryFile(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), length, fileinformationclass, returnsingleentry, core::mem::transmute(filename.unwrap_or(core::mem::zeroed())), restartscan) } + unsafe { NtQueryDirectoryFile(filehandle, event.unwrap_or(core::mem::zeroed()) as _, apcroutine.unwrap_or(core::mem::zeroed()) as _, apccontext.unwrap_or(core::mem::zeroed()) as _, iostatusblock as _, fileinformation as _, length, fileinformationclass, returnsingleentry, filename.unwrap_or(core::mem::zeroed()) as _, restartscan) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { NtQueryDirectoryFileEx(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), length, fileinformationclass, queryflags, core::mem::transmute(filename.unwrap_or(core::mem::zeroed()))) } + unsafe { NtQueryDirectoryFileEx(filehandle, event.unwrap_or(core::mem::zeroed()) as _, apcroutine.unwrap_or(core::mem::zeroed()) as _, apccontext.unwrap_or(core::mem::zeroed()) as _, iostatusblock as _, fileinformation as _, length, fileinformationclass, queryflags, filename.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NtQueryDirectoryObject(directoryhandle: super::super::super::Win32::Foundation::HANDLE, buffer: Option<*mut core::ffi::c_void>, length: u32, returnsingleentry: bool, restartscan: bool, context: *mut u32, returnlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtQueryDirectoryObject(directoryhandle : super::super::super::Win32::Foundation:: HANDLE, buffer : *mut core::ffi::c_void, length : u32, returnsingleentry : bool, restartscan : bool, context : *mut u32, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtQueryDirectoryObject(directoryhandle, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), length, returnsingleentry, restartscan, core::mem::transmute(context), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } + unsafe { NtQueryDirectoryObject(directoryhandle, buffer.unwrap_or(core::mem::zeroed()) as _, length, returnsingleentry, restartscan, context as _, returnlength.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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: bool, ealist: Option<*const core::ffi::c_void>, ealistlength: u32, eaindex: Option<*const u32>, restartscan: bool) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, ealist : *const core::ffi::c_void, ealistlength : u32, eaindex : *const u32, restartscan : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtQueryEaFile(filehandle, core::mem::transmute(iostatusblock), core::mem::transmute(buffer), length, returnsingleentry, core::mem::transmute(ealist.unwrap_or(core::mem::zeroed())), ealistlength, core::mem::transmute(eaindex.unwrap_or(core::mem::zeroed())), restartscan) } + unsafe { NtQueryEaFile(filehandle, iostatusblock as _, buffer as _, length, returnsingleentry, ealist.unwrap_or(core::mem::zeroed()) as _, ealistlength, eaindex.unwrap_or(core::mem::zeroed()) as _, restartscan) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn NtQueryFullAttributesFile(objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, fileinformation: *mut FILE_NETWORK_OPEN_INFORMATION) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtQueryFullAttributesFile(objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, fileinformation : *mut FILE_NETWORK_OPEN_INFORMATION) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtQueryFullAttributesFile(objectattributes, core::mem::transmute(fileinformation)) } + unsafe { NtQueryFullAttributesFile(objectattributes, fileinformation as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", feature = "Win32_System_IO"))] #[inline] pub unsafe fn NtQueryInformationByName(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: FILE_INFORMATION_CLASS) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtQueryInformationByName(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 : FILE_INFORMATION_CLASS) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtQueryInformationByName(objectattributes, core::mem::transmute(iostatusblock), core::mem::transmute(fileinformation), length, fileinformationclass) } + unsafe { NtQueryInformationByName(objectattributes, iostatusblock as _, fileinformation as _, length, fileinformationclass) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { NtQueryInformationFile(filehandle, core::mem::transmute(iostatusblock), core::mem::transmute(fileinformation), length, fileinformationclass) } + unsafe { NtQueryInformationFile(filehandle, iostatusblock as _, fileinformation as _, length, fileinformationclass) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { NtQueryInformationToken(tokenhandle, tokeninformationclass, core::mem::transmute(tokeninformation.unwrap_or(core::mem::zeroed())), tokeninformationlength, core::mem::transmute(returnlength)) } + unsafe { NtQueryInformationToken(tokenhandle, tokeninformationclass, tokeninformation.unwrap_or(core::mem::zeroed()) as _, tokeninformationlength, returnlength as _) } } #[cfg(all(feature = "Win32_Security", feature = "Win32_System_IO"))] #[inline] 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: bool, sidlist: Option<*const core::ffi::c_void>, sidlistlength: u32, startsid: Option, restartscan: bool) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, sidlist : *const core::ffi::c_void, sidlistlength : u32, startsid : super::super::super::Win32::Security:: PSID, restartscan : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtQueryQuotaInformationFile(filehandle, core::mem::transmute(iostatusblock), core::mem::transmute(buffer), length, returnsingleentry, core::mem::transmute(sidlist.unwrap_or(core::mem::zeroed())), sidlistlength, core::mem::transmute(startsid.unwrap_or(core::mem::zeroed())), restartscan) } + unsafe { NtQueryQuotaInformationFile(filehandle, iostatusblock as _, buffer as _, length, returnsingleentry, sidlist.unwrap_or(core::mem::zeroed()) as _, sidlistlength, startsid.unwrap_or(core::mem::zeroed()) as _, restartscan) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { NtQuerySecurityObject(handle, securityinformation, core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), length, core::mem::transmute(lengthneeded)) } + unsafe { NtQuerySecurityObject(handle, securityinformation, securitydescriptor.unwrap_or(core::mem::zeroed()) as _, length, lengthneeded as _) } } #[inline] 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); - unsafe { NtQuerySymbolicLinkObject(linkhandle, core::mem::transmute(linktarget), core::mem::transmute(returnedlength.unwrap_or(core::mem::zeroed()))) } + unsafe { NtQuerySymbolicLinkObject(linkhandle, linktarget as _, returnedlength.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { NtQueryVirtualMemory(processhandle, core::mem::transmute(baseaddress.unwrap_or(core::mem::zeroed())), memoryinformationclass, core::mem::transmute(memoryinformation), memoryinformationlength, core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } + unsafe { NtQueryVirtualMemory(processhandle, baseaddress.unwrap_or(core::mem::zeroed()) as _, memoryinformationclass, memoryinformation as _, memoryinformationlength, returnlength.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { NtQueryVolumeInformationFile(filehandle, core::mem::transmute(iostatusblock), core::mem::transmute(fsinformation), length, fsinformationclass) } + unsafe { NtQueryVolumeInformationFile(filehandle, iostatusblock as _, fsinformation as _, length, fsinformationclass) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { NtReadFile(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), length, core::mem::transmute(byteoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(key.unwrap_or(core::mem::zeroed()))) } + unsafe { NtReadFile(filehandle, event.unwrap_or(core::mem::zeroed()) as _, apcroutine.unwrap_or(core::mem::zeroed()) as _, apccontext.unwrap_or(core::mem::zeroed()) as _, iostatusblock as _, buffer as _, length, byteoffset.unwrap_or(core::mem::zeroed()) as _, key.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { NtSetEaFile(filehandle, core::mem::transmute(iostatusblock), buffer, length) } + unsafe { NtSetEaFile(filehandle, iostatusblock as _, buffer, length) } } #[inline] 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); - unsafe { NtSetEvent(eventhandle, core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed()))) } + unsafe { NtSetEvent(eventhandle, previousstate.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { NtSetInformationFile(filehandle, core::mem::transmute(iostatusblock), fileinformation, length, fileinformationclass) } + unsafe { NtSetInformationFile(filehandle, iostatusblock as _, fileinformation, length, fileinformationclass) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -2368,7 +2337,7 @@ pub unsafe fn NtSetInformationVirtualMemory(processhandle: super::super::super:: #[inline] 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); - unsafe { NtSetQuotaInformationFile(filehandle, core::mem::transmute(iostatusblock), buffer, length) } + unsafe { NtSetQuotaInformationFile(filehandle, iostatusblock as _, buffer, length) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -2380,25 +2349,25 @@ pub unsafe fn NtSetSecurityObject(handle: super::super::super::Win32::Foundation #[inline] 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); - unsafe { NtSetVolumeInformationFile(filehandle, core::mem::transmute(iostatusblock), fsinformation, length, fsinformationclass) } + unsafe { NtSetVolumeInformationFile(filehandle, iostatusblock as _, fsinformation, length, fsinformationclass) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { NtUnlockFile(filehandle, core::mem::transmute(iostatusblock), byteoffset, length, key) } + unsafe { NtUnlockFile(filehandle, iostatusblock as _, byteoffset, length, key) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { NtWriteFile(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), buffer, length, core::mem::transmute(byteoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(key.unwrap_or(core::mem::zeroed()))) } + unsafe { NtWriteFile(filehandle, event.unwrap_or(core::mem::zeroed()) as _, apcroutine.unwrap_or(core::mem::zeroed()) as _, apccontext.unwrap_or(core::mem::zeroed()) as _, iostatusblock as _, buffer, length, byteoffset.unwrap_or(core::mem::zeroed()) as _, key.unwrap_or(core::mem::zeroed()) as _) } } #[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: 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); - unsafe { ObInsertObject(object, core::mem::transmute(passedaccessstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(desiredaccess.unwrap_or(core::mem::zeroed())), objectpointerbias, core::mem::transmute(newobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(handle.unwrap_or(core::mem::zeroed()))) } + unsafe { ObInsertObject(object, passedaccessstate.unwrap_or(core::mem::zeroed()) as _, desiredaccess.unwrap_or(core::mem::zeroed()) as _, objectpointerbias, newobject.unwrap_or(core::mem::zeroed()) as _, handle.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ObIsKernelHandle(handle: super::super::super::Win32::Foundation::HANDLE) -> bool { @@ -2414,24 +2383,24 @@ pub unsafe fn ObMakeTemporaryObject(object: *const core::ffi::c_void) { #[inline] 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); - unsafe { ObOpenObjectByPointer(object, handleattributes, core::mem::transmute(passedaccessstate.unwrap_or(core::mem::zeroed())), desiredaccess, core::mem::transmute(objecttype.unwrap_or(core::mem::zeroed())), accessmode, core::mem::transmute(handle)) } + unsafe { ObOpenObjectByPointer(object, handleattributes, passedaccessstate.unwrap_or(core::mem::zeroed()) as _, desiredaccess, objecttype.unwrap_or(core::mem::zeroed()) as _, accessmode, handle as _) } } #[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: 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); - unsafe { ObOpenObjectByPointerWithTag(object, handleattributes, core::mem::transmute(passedaccessstate.unwrap_or(core::mem::zeroed())), desiredaccess, core::mem::transmute(objecttype.unwrap_or(core::mem::zeroed())), accessmode, tag, core::mem::transmute(handle)) } + unsafe { ObOpenObjectByPointerWithTag(object, handleattributes, passedaccessstate.unwrap_or(core::mem::zeroed()) as _, desiredaccess, objecttype.unwrap_or(core::mem::zeroed()) as _, accessmode, tag, handle as _) } } #[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); - unsafe { ObQueryNameString(object, core::mem::transmute(objectnameinfo.unwrap_or(core::mem::zeroed())), length, core::mem::transmute(returnlength)) } + unsafe { ObQueryNameString(object, objectnameinfo.unwrap_or(core::mem::zeroed()) as _, length, returnlength as _) } } #[inline] pub unsafe fn ObQueryObjectAuditingByHandle(handle: super::super::super::Win32::Foundation::HANDLE, generateonclose: *mut bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn ObQueryObjectAuditingByHandle(handle : super::super::super::Win32::Foundation:: HANDLE, generateonclose : *mut bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ObQueryObjectAuditingByHandle(handle, core::mem::transmute(generateonclose)) } + unsafe { ObQueryObjectAuditingByHandle(handle, generateonclose as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -2453,7 +2422,7 @@ pub unsafe fn PfxInitialize() -> PREFIX_TABLE { #[inline] pub unsafe fn PfxInsertPrefix(prefixtable: *const PREFIX_TABLE, prefix: *const super::super::super::Win32::System::Kernel::STRING, prefixtableentry: *mut PREFIX_TABLE_ENTRY) -> bool { windows_targets::link!("ntdll.dll" "system" fn PfxInsertPrefix(prefixtable : *const PREFIX_TABLE, prefix : *const super::super::super::Win32::System::Kernel:: STRING, prefixtableentry : *mut PREFIX_TABLE_ENTRY) -> bool); - unsafe { PfxInsertPrefix(prefixtable, prefix, core::mem::transmute(prefixtableentry)) } + unsafe { PfxInsertPrefix(prefixtable, prefix, prefixtableentry as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -2465,13 +2434,13 @@ pub unsafe fn PfxRemovePrefix(prefixtable: *const PREFIX_TABLE, prefixtableentry #[inline] pub unsafe fn PoQueueShutdownWorkItem(workitem: *mut super::super::Foundation::WORK_QUEUE_ITEM) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PoQueueShutdownWorkItem(workitem : *mut super::super::Foundation:: WORK_QUEUE_ITEM) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { PoQueueShutdownWorkItem(core::mem::transmute(workitem)) } + unsafe { PoQueueShutdownWorkItem(workitem as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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); - unsafe { PsAssignImpersonationToken(thread, core::mem::transmute(token.unwrap_or(core::mem::zeroed()))) } + unsafe { PsAssignImpersonationToken(thread, token.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -2499,7 +2468,7 @@ pub unsafe fn PsDereferencePrimaryToken(primarytoken: *const core::ffi::c_void) #[inline] pub unsafe fn PsDisableImpersonation(thread: super::super::Foundation::PETHREAD, impersonationstate: *mut super::super::super::Win32::Security::SE_IMPERSONATION_STATE) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn PsDisableImpersonation(thread : super::super::Foundation:: PETHREAD, impersonationstate : *mut super::super::super::Win32::Security:: SE_IMPERSONATION_STATE) -> bool); - unsafe { PsDisableImpersonation(thread, core::mem::transmute(impersonationstate)) } + unsafe { PsDisableImpersonation(thread, impersonationstate as _) } } #[inline] pub unsafe fn PsGetProcessExitTime() -> i64 { @@ -2516,7 +2485,7 @@ pub unsafe fn PsGetThreadProcess(thread: super::super::Foundation::PETHREAD) -> #[inline] pub unsafe fn PsImpersonateClient(thread: super::super::Foundation::PETHREAD, token: Option<*const core::ffi::c_void>, copyonopen: bool, effectiveonly: bool, impersonationlevel: super::super::super::Win32::Security::SECURITY_IMPERSONATION_LEVEL) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PsImpersonateClient(thread : super::super::Foundation:: PETHREAD, token : *const core::ffi::c_void, copyonopen : bool, effectiveonly : bool, impersonationlevel : super::super::super::Win32::Security:: SECURITY_IMPERSONATION_LEVEL) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { PsImpersonateClient(thread, core::mem::transmute(token.unwrap_or(core::mem::zeroed())), copyonopen, effectiveonly, impersonationlevel) } + unsafe { PsImpersonateClient(thread, token.unwrap_or(core::mem::zeroed()) as _, copyonopen, effectiveonly, impersonationlevel) } } #[inline] pub unsafe fn PsIsDiskCountersEnabled() -> bool { @@ -2539,19 +2508,19 @@ pub unsafe fn PsIsThreadTerminating(thread: super::super::Foundation::PETHREAD) #[inline] 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); - unsafe { PsLookupProcessByProcessId(processid, core::mem::transmute(process)) } + unsafe { PsLookupProcessByProcessId(processid, process as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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); - unsafe { PsLookupThreadByThreadId(threadid, core::mem::transmute(thread)) } + unsafe { PsLookupThreadByThreadId(threadid, thread as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn PsReferenceImpersonationToken(thread: super::super::Foundation::PETHREAD, copyonopen: *mut bool, effectiveonly: *mut bool, 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 bool, effectiveonly : *mut bool, impersonationlevel : *mut super::super::super::Win32::Security:: SECURITY_IMPERSONATION_LEVEL) -> *mut core::ffi::c_void); - unsafe { PsReferenceImpersonationToken(thread, core::mem::transmute(copyonopen), core::mem::transmute(effectiveonly), core::mem::transmute(impersonationlevel)) } + unsafe { PsReferenceImpersonationToken(thread, copyonopen as _, effectiveonly as _, impersonationlevel as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -2585,54 +2554,54 @@ pub unsafe fn PsUpdateDiskCounters(process: super::super::Foundation::PEPROCESS, #[inline] pub unsafe fn QuerySecurityContextToken(phcontext: *const SecHandle, token: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("secur32.dll" "system" fn QuerySecurityContextToken(phcontext : *const SecHandle, token : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { QuerySecurityContextToken(phcontext, core::mem::transmute(token)).ok() } + unsafe { QuerySecurityContextToken(phcontext, token as _).ok() } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { RtlAbsoluteToSelfRelativeSD(absolutesecuritydescriptor, core::mem::transmute(selfrelativesecuritydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength)) } + unsafe { RtlAbsoluteToSelfRelativeSD(absolutesecuritydescriptor, selfrelativesecuritydescriptor.unwrap_or(core::mem::zeroed()) as _, bufferlength as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { RtlAddAccessAllowedAce(core::mem::transmute(acl), acerevision, accessmask, sid) } + unsafe { RtlAddAccessAllowedAce(acl as _, acerevision, accessmask, 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: 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); - unsafe { RtlAddAccessAllowedAceEx(core::mem::transmute(acl), acerevision, aceflags, accessmask, sid) } + unsafe { RtlAddAccessAllowedAceEx(acl as _, acerevision, aceflags, accessmask, sid) } } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn RtlAddAce(acl: *mut super::super::super::Win32::Security::ACL, acerevision: u32, startingaceindex: u32, acelist: *const core::ffi::c_void, acelistlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlAddAce(acl : *mut super::super::super::Win32::Security:: ACL, acerevision : u32, startingaceindex : u32, acelist : *const core::ffi::c_void, acelistlength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlAddAce(core::mem::transmute(acl), acerevision, startingaceindex, acelist, acelistlength) } + unsafe { RtlAddAce(acl as _, acerevision, startingaceindex, acelist, acelistlength) } } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn RtlAllocateAndInitializeSid(identifierauthority: *const super::super::super::Win32::Security::SID_IDENTIFIER_AUTHORITY, subauthoritycount: u8, subauthority0: u32, subauthority1: u32, subauthority2: u32, subauthority3: u32, subauthority4: u32, subauthority5: u32, subauthority6: u32, subauthority7: u32, sid: *mut super::super::super::Win32::Security::PSID) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlAllocateAndInitializeSid(identifierauthority : *const super::super::super::Win32::Security:: SID_IDENTIFIER_AUTHORITY, subauthoritycount : u8, subauthority0 : u32, subauthority1 : u32, subauthority2 : u32, subauthority3 : u32, subauthority4 : u32, subauthority5 : u32, subauthority6 : u32, subauthority7 : u32, sid : *mut super::super::super::Win32::Security:: PSID) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlAllocateAndInitializeSid(identifierauthority, subauthoritycount, subauthority0, subauthority1, subauthority2, subauthority3, subauthority4, subauthority5, subauthority6, subauthority7, core::mem::transmute(sid)) } + unsafe { RtlAllocateAndInitializeSid(identifierauthority, subauthoritycount, subauthority0, subauthority1, subauthority2, subauthority3, subauthority4, subauthority5, subauthority6, subauthority7, sid as _) } } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn RtlAllocateAndInitializeSidEx(identifierauthority: *const super::super::super::Win32::Security::SID_IDENTIFIER_AUTHORITY, subauthorities: &[u32], sid: *mut super::super::super::Win32::Security::PSID) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlAllocateAndInitializeSidEx(identifierauthority : *const super::super::super::Win32::Security:: SID_IDENTIFIER_AUTHORITY, subauthoritycount : u8, subauthorities : *const u32, sid : *mut super::super::super::Win32::Security:: PSID) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlAllocateAndInitializeSidEx(identifierauthority, subauthorities.len().try_into().unwrap(), core::mem::transmute(subauthorities.as_ptr()), core::mem::transmute(sid)) } + unsafe { RtlAllocateAndInitializeSidEx(identifierauthority, subauthorities.len().try_into().unwrap(), core::mem::transmute(subauthorities.as_ptr()), sid as _) } } #[inline] 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); - unsafe { RtlAllocateHeap(heaphandle, core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), size) } + unsafe { RtlAllocateHeap(heaphandle, flags.unwrap_or(core::mem::zeroed()) as _, size) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn RtlAppendStringToString(destination: *mut super::super::super::Win32::System::Kernel::STRING, source: *const super::super::super::Win32::System::Kernel::STRING) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlAppendStringToString(destination : *mut super::super::super::Win32::System::Kernel:: STRING, source : *const super::super::super::Win32::System::Kernel:: STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlAppendStringToString(core::mem::transmute(destination), source) } + unsafe { RtlAppendStringToString(destination as _, source) } } #[inline] pub unsafe fn RtlCompareAltitudes(altitude1: *const super::super::super::Win32::Foundation::UNICODE_STRING, altitude2: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> i32 { @@ -2647,40 +2616,40 @@ pub unsafe fn RtlCompareMemoryUlong(source: *const core::ffi::c_void, length: us #[inline] pub unsafe fn RtlCompressBuffer(compressionformatandengine: u16, uncompressedbuffer: &[u8], compressedbuffer: &mut [u8], uncompressedchunksize: u32, finalcompressedsize: *mut u32, workspace: *const core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlCompressBuffer(compressionformatandengine : u16, uncompressedbuffer : *const u8, uncompressedbuffersize : u32, compressedbuffer : *mut u8, compressedbuffersize : u32, uncompressedchunksize : u32, finalcompressedsize : *mut u32, workspace : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlCompressBuffer(compressionformatandengine, core::mem::transmute(uncompressedbuffer.as_ptr()), uncompressedbuffer.len().try_into().unwrap(), core::mem::transmute(compressedbuffer.as_ptr()), compressedbuffer.len().try_into().unwrap(), uncompressedchunksize, core::mem::transmute(finalcompressedsize), workspace) } + unsafe { RtlCompressBuffer(compressionformatandengine, core::mem::transmute(uncompressedbuffer.as_ptr()), uncompressedbuffer.len().try_into().unwrap(), core::mem::transmute(compressedbuffer.as_ptr()), compressedbuffer.len().try_into().unwrap(), uncompressedchunksize, finalcompressedsize as _, workspace) } } #[inline] pub unsafe fn RtlCompressChunks(uncompressedbuffer: &[u8], compressedbuffer: &mut [u8], compresseddatainfo: *mut COMPRESSED_DATA_INFO, compresseddatainfolength: u32, workspace: *const core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn RtlCompressChunks(uncompressedbuffer : *const u8, uncompressedbuffersize : u32, compressedbuffer : *mut u8, compressedbuffersize : u32, compresseddatainfo : *mut COMPRESSED_DATA_INFO, compresseddatainfolength : u32, workspace : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlCompressChunks(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(compresseddatainfo), compresseddatainfolength, workspace) } + unsafe { RtlCompressChunks(core::mem::transmute(uncompressedbuffer.as_ptr()), uncompressedbuffer.len().try_into().unwrap(), core::mem::transmute(compressedbuffer.as_ptr()), compressedbuffer.len().try_into().unwrap(), compresseddatainfo as _, compresseddatainfolength, workspace) } } #[inline] pub unsafe fn RtlCopyLuid(destinationluid: *mut super::super::super::Win32::Foundation::LUID, sourceluid: *const super::super::super::Win32::Foundation::LUID) { windows_targets::link!("ntdll.dll" "system" fn RtlCopyLuid(destinationluid : *mut super::super::super::Win32::Foundation:: LUID, sourceluid : *const super::super::super::Win32::Foundation:: LUID)); - unsafe { RtlCopyLuid(core::mem::transmute(destinationluid), sourceluid) } + unsafe { RtlCopyLuid(destinationluid as _, sourceluid) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { RtlCopySid(destinationsidlength, core::mem::transmute(destinationsid), sourcesid) } + unsafe { RtlCopySid(destinationsidlength, destinationsid as _, sourcesid) } } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn RtlCreateAcl(acl: *mut super::super::super::Win32::Security::ACL, acllength: u32, aclrevision: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlCreateAcl(acl : *mut super::super::super::Win32::Security:: ACL, acllength : u32, aclrevision : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlCreateAcl(core::mem::transmute(acl), acllength, aclrevision) } + unsafe { RtlCreateAcl(acl as _, acllength, aclrevision) } } #[inline] 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); - unsafe { RtlCreateHeap(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()))) } + unsafe { RtlCreateHeap(flags, heapbase.unwrap_or(core::mem::zeroed()) as _, reservesize.unwrap_or(core::mem::zeroed()) as _, commitsize.unwrap_or(core::mem::zeroed()) as _, lock.unwrap_or(core::mem::zeroed()) as _, parameters.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { RtlCreateServiceSid(servicename, core::mem::transmute(servicesid.unwrap_or(core::mem::zeroed())), core::mem::transmute(servicesidlength)) } + unsafe { RtlCreateServiceSid(servicename, servicesid.unwrap_or(core::mem::zeroed()) as _, servicesidlength as _) } } #[inline] pub unsafe fn RtlCreateSystemVolumeInformationFolder(volumerootpath: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -2693,33 +2662,33 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlCreateUnicodeString(destinationstring : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, sourcestring : windows_core::PCWSTR) -> bool); - unsafe { RtlCreateUnicodeString(core::mem::transmute(destinationstring), sourcestring.param().abi()) } + unsafe { RtlCreateUnicodeString(destinationstring as _, sourcestring.param().abi()) } } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn RtlCreateVirtualAccountSid(name: *const super::super::super::Win32::Foundation::UNICODE_STRING, basesubauthority: u32, sid: super::super::super::Win32::Security::PSID, sidlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlCreateVirtualAccountSid(name : *const super::super::super::Win32::Foundation:: UNICODE_STRING, basesubauthority : u32, sid : super::super::super::Win32::Security:: PSID, sidlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlCreateVirtualAccountSid(name, basesubauthority, core::mem::transmute(sid), core::mem::transmute(sidlength)) } + unsafe { RtlCreateVirtualAccountSid(name, basesubauthority, sid as _, sidlength as _) } } #[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); - unsafe { RtlCustomCPToUnicodeN(customcp, core::mem::transmute(unicodestring), maxbytesinunicodestring, core::mem::transmute(bytesinunicodestring.unwrap_or(core::mem::zeroed())), core::mem::transmute(customcpstring.as_ptr()), customcpstring.len().try_into().unwrap()) } + unsafe { RtlCustomCPToUnicodeN(customcp, core::mem::transmute(unicodestring), maxbytesinunicodestring, bytesinunicodestring.unwrap_or(core::mem::zeroed()) as _, 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 { windows_targets::link!("ntdll.dll" "system" fn RtlDecompressBuffer(compressionformat : u16, uncompressedbuffer : *mut u8, uncompressedbuffersize : u32, compressedbuffer : *const u8, compressedbuffersize : u32, finaluncompressedsize : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlDecompressBuffer(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)) } + unsafe { RtlDecompressBuffer(compressionformat, core::mem::transmute(uncompressedbuffer.as_ptr()), uncompressedbuffer.len().try_into().unwrap(), core::mem::transmute(compressedbuffer.as_ptr()), compressedbuffer.len().try_into().unwrap(), finaluncompressedsize as _) } } #[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); - unsafe { RtlDecompressBufferEx(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()))) } + unsafe { RtlDecompressBufferEx(compressionformat, core::mem::transmute(uncompressedbuffer.as_ptr()), uncompressedbuffer.len().try_into().unwrap(), core::mem::transmute(compressedbuffer.as_ptr()), compressedbuffer.len().try_into().unwrap(), finaluncompressedsize as _, workspace.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { RtlDecompressBufferEx2(compressionformat, core::mem::transmute(uncompressedbuffer.as_ptr()), uncompressedbuffer.len().try_into().unwrap(), core::mem::transmute(compressedbuffer.as_ptr()), compressedbuffer.len().try_into().unwrap(), uncompressedchunksize, core::mem::transmute(finaluncompressedsize), core::mem::transmute(workspace.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlDecompressBufferEx2(compressionformat, core::mem::transmute(uncompressedbuffer.as_ptr()), uncompressedbuffer.len().try_into().unwrap(), core::mem::transmute(compressedbuffer.as_ptr()), compressedbuffer.len().try_into().unwrap(), uncompressedchunksize, finaluncompressedsize as _, workspace.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RtlDecompressChunks(uncompressedbuffer: &mut [u8], compressedbuffer: &[u8], compressedtail: &[u8], compresseddatainfo: *const COMPRESSED_DATA_INFO) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -2729,23 +2698,23 @@ pub unsafe fn RtlDecompressChunks(uncompressedbuffer: &mut [u8], compressedbuffe #[inline] pub unsafe fn RtlDecompressFragment(compressionformat: u16, uncompressedfragment: &mut [u8], compressedbuffer: &[u8], fragmentoffset: u32, finaluncompressedsize: *mut u32, workspace: *const core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlDecompressFragment(compressionformat : u16, uncompressedfragment : *mut u8, uncompressedfragmentsize : u32, compressedbuffer : *const u8, compressedbuffersize : u32, fragmentoffset : u32, finaluncompressedsize : *mut u32, workspace : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlDecompressFragment(compressionformat, core::mem::transmute(uncompressedfragment.as_ptr()), uncompressedfragment.len().try_into().unwrap(), core::mem::transmute(compressedbuffer.as_ptr()), compressedbuffer.len().try_into().unwrap(), fragmentoffset, core::mem::transmute(finaluncompressedsize), workspace) } + unsafe { RtlDecompressFragment(compressionformat, core::mem::transmute(uncompressedfragment.as_ptr()), uncompressedfragment.len().try_into().unwrap(), core::mem::transmute(compressedbuffer.as_ptr()), compressedbuffer.len().try_into().unwrap(), fragmentoffset, finaluncompressedsize as _, workspace) } } #[inline] pub unsafe fn RtlDecompressFragmentEx(compressionformat: u16, uncompressedfragment: &mut [u8], compressedbuffer: &[u8], fragmentoffset: u32, uncompressedchunksize: u32, finaluncompressedsize: *mut u32, workspace: *const core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn RtlDecompressFragmentEx(compressionformat : u16, uncompressedfragment : *mut u8, uncompressedfragmentsize : u32, compressedbuffer : *const u8, compressedbuffersize : u32, fragmentoffset : u32, uncompressedchunksize : u32, finaluncompressedsize : *mut u32, workspace : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlDecompressFragmentEx(compressionformat, core::mem::transmute(uncompressedfragment.as_ptr()), uncompressedfragment.len().try_into().unwrap(), core::mem::transmute(compressedbuffer.as_ptr()), compressedbuffer.len().try_into().unwrap(), fragmentoffset, uncompressedchunksize, core::mem::transmute(finaluncompressedsize), workspace) } + unsafe { RtlDecompressFragmentEx(compressionformat, core::mem::transmute(uncompressedfragment.as_ptr()), uncompressedfragment.len().try_into().unwrap(), core::mem::transmute(compressedbuffer.as_ptr()), compressedbuffer.len().try_into().unwrap(), fragmentoffset, uncompressedchunksize, finaluncompressedsize as _, workspace) } } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn RtlDeleteAce(acl: *mut super::super::super::Win32::Security::ACL, aceindex: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlDeleteAce(acl : *mut super::super::super::Win32::Security:: ACL, aceindex : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlDeleteAce(core::mem::transmute(acl), aceindex) } + unsafe { RtlDeleteAce(acl as _, aceindex) } } #[inline] pub unsafe fn RtlDescribeChunk(compressionformat: u16, compressedbuffer: *mut *mut u8, endofcompressedbufferplus1: *const u8, chunkbuffer: *mut *mut u8, chunksize: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn RtlDescribeChunk(compressionformat : u16, compressedbuffer : *mut *mut u8, endofcompressedbufferplus1 : *const u8, chunkbuffer : *mut *mut u8, chunksize : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlDescribeChunk(compressionformat, core::mem::transmute(compressedbuffer), endofcompressedbufferplus1, core::mem::transmute(chunkbuffer), core::mem::transmute(chunksize)) } + unsafe { RtlDescribeChunk(compressionformat, compressedbuffer as _, endofcompressedbufferplus1, chunkbuffer as _, chunksize as _) } } #[inline] pub unsafe fn RtlDestroyHeap(heaphandle: *const core::ffi::c_void) -> *mut core::ffi::c_void { @@ -2758,17 +2727,17 @@ 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); - unsafe { 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()))) } + unsafe { RtlDosPathNameToNtPathName_U_WithStatus(dosfilename.param().abi(), ntfilename as _, filepart.unwrap_or(core::mem::zeroed()) as _, reserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RtlDowncaseUnicodeString(destinationstring: *mut super::super::super::Win32::Foundation::UNICODE_STRING, sourcestring: *const super::super::super::Win32::Foundation::UNICODE_STRING, allocatedestinationstring: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlDowncaseUnicodeString(destinationstring : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, sourcestring : *const super::super::super::Win32::Foundation:: UNICODE_STRING, allocatedestinationstring : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlDowncaseUnicodeString(core::mem::transmute(destinationstring), sourcestring, allocatedestinationstring) } + unsafe { RtlDowncaseUnicodeString(destinationstring as _, sourcestring, allocatedestinationstring) } } #[inline] pub unsafe fn RtlDuplicateUnicodeString(flags: u32, stringin: *const super::super::super::Win32::Foundation::UNICODE_STRING, stringout: *mut super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlDuplicateUnicodeString(flags : u32, stringin : *const super::super::super::Win32::Foundation:: UNICODE_STRING, stringout : *mut super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlDuplicateUnicodeString(flags, stringin, core::mem::transmute(stringout)) } + unsafe { RtlDuplicateUnicodeString(flags, stringin, stringout as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -2791,7 +2760,7 @@ pub unsafe fn RtlFindUnicodePrefix(prefixtable: *const UNICODE_PREFIX_TABLE, ful #[inline] 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); - unsafe { RtlFreeHeap(heaphandle, core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(baseaddress.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlFreeHeap(heaphandle, flags.unwrap_or(core::mem::zeroed()) as _, baseaddress.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -2802,42 +2771,42 @@ pub unsafe fn RtlFreeSid(sid: super::super::super::Win32::Security::PSID) -> *mu #[inline] pub unsafe fn RtlGenerate8dot3Name(name: *const super::super::super::Win32::Foundation::UNICODE_STRING, allowextendedcharacters: bool, context: *mut GENERATE_NAME_CONTEXT, name8dot3: *mut super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlGenerate8dot3Name(name : *const super::super::super::Win32::Foundation:: UNICODE_STRING, allowextendedcharacters : bool, context : *mut GENERATE_NAME_CONTEXT, name8dot3 : *mut super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlGenerate8dot3Name(name, allowextendedcharacters, core::mem::transmute(context), core::mem::transmute(name8dot3)) } + unsafe { RtlGenerate8dot3Name(name, allowextendedcharacters, context as _, name8dot3 as _) } } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn RtlGetAce(acl: *const super::super::super::Win32::Security::ACL, aceindex: u32, ace: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlGetAce(acl : *const super::super::super::Win32::Security:: ACL, aceindex : u32, ace : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlGetAce(acl, aceindex, core::mem::transmute(ace)) } + unsafe { RtlGetAce(acl, aceindex, ace as _) } } #[inline] pub unsafe fn RtlGetCompressionWorkSpaceSize(compressionformatandengine: u16, compressbufferworkspacesize: *mut u32, compressfragmentworkspacesize: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlGetCompressionWorkSpaceSize(compressionformatandengine : u16, compressbufferworkspacesize : *mut u32, compressfragmentworkspacesize : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlGetCompressionWorkSpaceSize(compressionformatandengine, core::mem::transmute(compressbufferworkspacesize), core::mem::transmute(compressfragmentworkspacesize)) } + unsafe { RtlGetCompressionWorkSpaceSize(compressionformatandengine, compressbufferworkspacesize as _, compressfragmentworkspacesize as _) } } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn RtlGetDaclSecurityDescriptor(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, daclpresent: *mut bool, dacl: *mut *mut super::super::super::Win32::Security::ACL, dacldefaulted: *mut bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlGetDaclSecurityDescriptor(securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, daclpresent : *mut bool, dacl : *mut *mut super::super::super::Win32::Security:: ACL, dacldefaulted : *mut bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlGetDaclSecurityDescriptor(securitydescriptor, core::mem::transmute(daclpresent), core::mem::transmute(dacl), core::mem::transmute(dacldefaulted)) } + unsafe { RtlGetDaclSecurityDescriptor(securitydescriptor, daclpresent as _, dacl as _, dacldefaulted as _) } } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn RtlGetGroupSecurityDescriptor(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, group: *mut super::super::super::Win32::Security::PSID, groupdefaulted: *mut bool) -> 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 bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlGetGroupSecurityDescriptor(securitydescriptor, core::mem::transmute(group), core::mem::transmute(groupdefaulted)) } + unsafe { RtlGetGroupSecurityDescriptor(securitydescriptor, group as _, groupdefaulted as _) } } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn RtlGetOwnerSecurityDescriptor(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, owner: *mut super::super::super::Win32::Security::PSID, ownerdefaulted: *mut bool) -> 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 bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlGetOwnerSecurityDescriptor(securitydescriptor, core::mem::transmute(owner), core::mem::transmute(ownerdefaulted)) } + unsafe { RtlGetOwnerSecurityDescriptor(securitydescriptor, owner as _, ownerdefaulted as _) } } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn RtlGetSaclSecurityDescriptor(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, saclpresent: *mut bool, sacl: *mut *mut super::super::super::Win32::Security::ACL, sacldefaulted: *mut bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlGetSaclSecurityDescriptor(securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, saclpresent : *mut bool, sacl : *mut *mut super::super::super::Win32::Security:: ACL, sacldefaulted : *mut bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlGetSaclSecurityDescriptor(securitydescriptor, core::mem::transmute(saclpresent), core::mem::transmute(sacl), core::mem::transmute(sacldefaulted)) } + unsafe { RtlGetSaclSecurityDescriptor(securitydescriptor, saclpresent as _, sacl as _, sacldefaulted as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -2851,7 +2820,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlIdnToAscii(flags : u32, sourcestring : windows_core::PCWSTR, sourcestringlength : i32, destinationstring : windows_core::PWSTR, destinationstringlength : *mut i32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlIdnToAscii(flags, sourcestring.param().abi(), sourcestringlength, core::mem::transmute(destinationstring), core::mem::transmute(destinationstringlength)) } + unsafe { RtlIdnToAscii(flags, sourcestring.param().abi(), sourcestringlength, core::mem::transmute(destinationstring), destinationstringlength as _) } } #[inline] pub unsafe fn RtlIdnToNameprepUnicode(flags: u32, sourcestring: P1, sourcestringlength: i32, destinationstring: windows_core::PWSTR, destinationstringlength: *mut i32) -> super::super::super::Win32::Foundation::NTSTATUS @@ -2859,7 +2828,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlIdnToNameprepUnicode(flags : u32, sourcestring : windows_core::PCWSTR, sourcestringlength : i32, destinationstring : windows_core::PWSTR, destinationstringlength : *mut i32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlIdnToNameprepUnicode(flags, sourcestring.param().abi(), sourcestringlength, core::mem::transmute(destinationstring), core::mem::transmute(destinationstringlength)) } + unsafe { RtlIdnToNameprepUnicode(flags, sourcestring.param().abi(), sourcestringlength, core::mem::transmute(destinationstring), destinationstringlength as _) } } #[inline] pub unsafe fn RtlIdnToUnicode(flags: u32, sourcestring: P1, sourcestringlength: i32, destinationstring: windows_core::PWSTR, destinationstringlength: *mut i32) -> super::super::super::Win32::Foundation::NTSTATUS @@ -2867,12 +2836,12 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlIdnToUnicode(flags : u32, sourcestring : windows_core::PCWSTR, sourcestringlength : i32, destinationstring : windows_core::PWSTR, destinationstringlength : *mut i32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlIdnToUnicode(flags, sourcestring.param().abi(), sourcestringlength, core::mem::transmute(destinationstring), core::mem::transmute(destinationstringlength)) } + unsafe { RtlIdnToUnicode(flags, sourcestring.param().abi(), sourcestringlength, core::mem::transmute(destinationstring), destinationstringlength as _) } } #[inline] pub unsafe fn RtlInitCodePageTable(tablebase: Option<&[u16; 2]>, codepagetable: *mut CPTABLEINFO) { windows_targets::link!("ntdll.dll" "system" fn RtlInitCodePageTable(tablebase : *const u16, codepagetable : *mut CPTABLEINFO)); - unsafe { RtlInitCodePageTable(core::mem::transmute(tablebase.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(codepagetable)) } + unsafe { RtlInitCodePageTable(core::mem::transmute(tablebase.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), codepagetable as _) } } #[inline] pub unsafe fn RtlInitUnicodeStringEx(destinationstring: *mut super::super::super::Win32::Foundation::UNICODE_STRING, sourcestring: P1) -> super::super::super::Win32::Foundation::NTSTATUS @@ -2880,19 +2849,19 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlInitUnicodeStringEx(destinationstring : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, sourcestring : windows_core::PCWSTR) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlInitUnicodeStringEx(core::mem::transmute(destinationstring), sourcestring.param().abi()) } + unsafe { RtlInitUnicodeStringEx(destinationstring as _, sourcestring.param().abi()) } } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn RtlInitializeSid(sid: super::super::super::Win32::Security::PSID, identifierauthority: *const super::super::super::Win32::Security::SID_IDENTIFIER_AUTHORITY, subauthoritycount: u8) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlInitializeSid(sid : super::super::super::Win32::Security:: PSID, identifierauthority : *const super::super::super::Win32::Security:: SID_IDENTIFIER_AUTHORITY, subauthoritycount : u8) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlInitializeSid(core::mem::transmute(sid), identifierauthority, subauthoritycount) } + unsafe { RtlInitializeSid(sid as _, identifierauthority, subauthoritycount) } } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn RtlInitializeSidEx(sid: super::super::super::Win32::Security::PSID, identifierauthority: *const super::super::super::Win32::Security::SID_IDENTIFIER_AUTHORITY, subauthoritycount: u8) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "cdecl" fn RtlInitializeSidEx(sid : super::super::super::Win32::Security:: PSID, identifierauthority : *const super::super::super::Win32::Security:: SID_IDENTIFIER_AUTHORITY, subauthoritycount : u8) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlInitializeSidEx(core::mem::transmute(sid), identifierauthority, subauthoritycount) } + unsafe { RtlInitializeSidEx(sid as _, identifierauthority, subauthoritycount) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -2908,7 +2877,7 @@ pub unsafe fn RtlInitializeUnicodePrefix() -> UNICODE_PREFIX_TABLE { #[inline] pub unsafe fn RtlInsertUnicodePrefix(prefixtable: *const UNICODE_PREFIX_TABLE, prefix: *const super::super::super::Win32::Foundation::UNICODE_STRING, prefixtableentry: *mut UNICODE_PREFIX_TABLE_ENTRY) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn RtlInsertUnicodePrefix(prefixtable : *const UNICODE_PREFIX_TABLE, prefix : *const super::super::super::Win32::Foundation:: UNICODE_STRING, prefixtableentry : *mut UNICODE_PREFIX_TABLE_ENTRY) -> bool); - unsafe { RtlInsertUnicodePrefix(prefixtable, prefix, core::mem::transmute(prefixtableentry)) } + unsafe { RtlInsertUnicodePrefix(prefixtable, prefix, prefixtableentry as _) } } #[inline] pub unsafe fn RtlIsCloudFilesPlaceholder(fileattributes: u32, reparsetag: u32) -> bool { @@ -2934,7 +2903,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlIsNormalizedString(normform : u32, sourcestring : windows_core::PCWSTR, sourcestringlength : i32, normalized : *mut bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlIsNormalizedString(normform, sourcestring.param().abi(), sourcestringlength, core::mem::transmute(normalized)) } + unsafe { RtlIsNormalizedString(normform, sourcestring.param().abi(), sourcestringlength, normalized as _) } } #[inline] pub unsafe fn RtlIsPartialPlaceholder(fileattributes: u32, reparsetag: u32) -> bool { @@ -2944,18 +2913,18 @@ pub unsafe fn RtlIsPartialPlaceholder(fileattributes: u32, reparsetag: u32) -> b #[inline] pub unsafe fn RtlIsPartialPlaceholderFileHandle(filehandle: super::super::super::Win32::Foundation::HANDLE, ispartialplaceholder: *mut bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlIsPartialPlaceholderFileHandle(filehandle : super::super::super::Win32::Foundation:: HANDLE, ispartialplaceholder : *mut bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlIsPartialPlaceholderFileHandle(filehandle, core::mem::transmute(ispartialplaceholder)) } + unsafe { RtlIsPartialPlaceholderFileHandle(filehandle, ispartialplaceholder as _) } } #[inline] pub unsafe fn RtlIsPartialPlaceholderFileInfo(infobuffer: *const core::ffi::c_void, infoclass: FILE_INFORMATION_CLASS, ispartialplaceholder: *mut bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlIsPartialPlaceholderFileInfo(infobuffer : *const core::ffi::c_void, infoclass : FILE_INFORMATION_CLASS, ispartialplaceholder : *mut bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlIsPartialPlaceholderFileInfo(infobuffer, infoclass, core::mem::transmute(ispartialplaceholder)) } + unsafe { RtlIsPartialPlaceholderFileInfo(infobuffer, infoclass, ispartialplaceholder as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn RtlIsSandboxedToken(context: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>, previousmode: i8) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn RtlIsSandboxedToken(context : *const super::super::Foundation:: SECURITY_SUBJECT_CONTEXT, previousmode : i8) -> bool); - unsafe { RtlIsSandboxedToken(core::mem::transmute(context.unwrap_or(core::mem::zeroed())), previousmode) } + unsafe { RtlIsSandboxedToken(context.unwrap_or(core::mem::zeroed()) as _, previousmode) } } #[inline] pub unsafe fn RtlIsValidOemCharacter(char: windows_core::PWSTR) -> bool { @@ -2976,12 +2945,12 @@ pub unsafe fn RtlLengthSid(sid: super::super::super::Win32::Security::PSID) -> u #[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); - unsafe { RtlMultiByteToUnicodeN(core::mem::transmute(unicodestring), maxbytesinunicodestring, core::mem::transmute(bytesinunicodestring.unwrap_or(core::mem::zeroed())), core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap()) } + unsafe { RtlMultiByteToUnicodeN(core::mem::transmute(unicodestring), maxbytesinunicodestring, bytesinunicodestring.unwrap_or(core::mem::zeroed()) as _, 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 { windows_targets::link!("ntdll.dll" "system" fn RtlMultiByteToUnicodeSize(bytesinunicodestring : *mut u32, multibytestring : windows_core::PCSTR, bytesinmultibytestring : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlMultiByteToUnicodeSize(core::mem::transmute(bytesinunicodestring), core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap()) } + unsafe { RtlMultiByteToUnicodeSize(bytesinunicodestring as _, core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap()) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -2995,7 +2964,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlNormalizeString(normform : u32, sourcestring : windows_core::PCWSTR, sourcestringlength : i32, destinationstring : windows_core::PWSTR, destinationstringlength : *mut i32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlNormalizeString(normform, sourcestring.param().abi(), sourcestringlength, core::mem::transmute(destinationstring), core::mem::transmute(destinationstringlength)) } + unsafe { RtlNormalizeString(normform, sourcestring.param().abi(), sourcestringlength, core::mem::transmute(destinationstring), destinationstringlength as _) } } #[inline] pub unsafe fn RtlNtStatusToDosErrorNoTeb(status: super::super::super::Win32::Foundation::NTSTATUS) -> u32 { @@ -3006,18 +2975,18 @@ pub unsafe fn RtlNtStatusToDosErrorNoTeb(status: super::super::super::Win32::Fou #[inline] pub unsafe fn RtlOemStringToCountedUnicodeString(destinationstring: *mut super::super::super::Win32::Foundation::UNICODE_STRING, sourcestring: *const super::super::super::Win32::System::Kernel::STRING, allocatedestinationstring: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn RtlOemStringToCountedUnicodeString(destinationstring : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, sourcestring : *const super::super::super::Win32::System::Kernel:: STRING, allocatedestinationstring : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlOemStringToCountedUnicodeString(core::mem::transmute(destinationstring), sourcestring, allocatedestinationstring) } + unsafe { RtlOemStringToCountedUnicodeString(destinationstring as _, sourcestring, allocatedestinationstring) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn RtlOemStringToUnicodeString(destinationstring: *mut super::super::super::Win32::Foundation::UNICODE_STRING, sourcestring: *const super::super::super::Win32::System::Kernel::STRING, allocatedestinationstring: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlOemStringToUnicodeString(destinationstring : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, sourcestring : *const super::super::super::Win32::System::Kernel:: STRING, allocatedestinationstring : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlOemStringToUnicodeString(core::mem::transmute(destinationstring), sourcestring, allocatedestinationstring) } + unsafe { RtlOemStringToUnicodeString(destinationstring as _, sourcestring, allocatedestinationstring) } } #[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); - unsafe { RtlOemToUnicodeN(core::mem::transmute(unicodestring), maxbytesinunicodestring, core::mem::transmute(bytesinunicodestring.unwrap_or(core::mem::zeroed())), core::mem::transmute(oemstring.as_ptr()), oemstring.len().try_into().unwrap()) } + unsafe { RtlOemToUnicodeN(core::mem::transmute(unicodestring), maxbytesinunicodestring, bytesinunicodestring.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(oemstring.as_ptr()), oemstring.len().try_into().unwrap()) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -3028,12 +2997,12 @@ pub unsafe fn RtlPrefixString(string1: *const super::super::super::Win32::System #[inline] 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 bool>) -> 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 bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlQueryPackageIdentity(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()))) } + unsafe { RtlQueryPackageIdentity(tokenobject, core::mem::transmute(packagefullname), packagesize as _, appid.unwrap_or(core::mem::zeroed()) as _, appidsize.unwrap_or(core::mem::zeroed()) as _, packaged.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { RtlQueryPackageIdentityEx(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()))) } + unsafe { RtlQueryPackageIdentityEx(tokenobject, core::mem::transmute(packagefullname), packagesize as _, appid.unwrap_or(core::mem::zeroed()) as _, appidsize.unwrap_or(core::mem::zeroed()) as _, dynamicid.unwrap_or(core::mem::zeroed()) as _, flags.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RtlQueryProcessPlaceholderCompatibilityMode() -> i8 { @@ -3048,12 +3017,12 @@ pub unsafe fn RtlQueryThreadPlaceholderCompatibilityMode() -> i8 { #[inline] pub unsafe fn RtlRandom(seed: *mut u32) -> u32 { windows_targets::link!("ntdll.dll" "system" fn RtlRandom(seed : *mut u32) -> u32); - unsafe { RtlRandom(core::mem::transmute(seed)) } + unsafe { RtlRandom(seed as _) } } #[inline] pub unsafe fn RtlRandomEx(seed: *mut u32) -> u32 { windows_targets::link!("ntdll.dll" "system" fn RtlRandomEx(seed : *mut u32) -> u32); - unsafe { RtlRandomEx(core::mem::transmute(seed)) } + unsafe { RtlRandomEx(seed as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -3065,12 +3034,12 @@ pub unsafe fn RtlRemoveUnicodePrefix(prefixtable: *const UNICODE_PREFIX_TABLE, p #[inline] 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); - unsafe { RtlReplaceSidInSd(core::mem::transmute(securitydescriptor), oldsid, newsid, core::mem::transmute(numchanges)) } + unsafe { RtlReplaceSidInSd(securitydescriptor as _, oldsid, newsid, numchanges as _) } } #[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 { windows_targets::link!("ntoskrnl.exe" "system" fn RtlReserveChunk(compressionformat : u16, compressedbuffer : *mut *mut u8, endofcompressedbufferplus1 : *const u8, chunkbuffer : *mut *mut u8, chunksize : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlReserveChunk(compressionformat, core::mem::transmute(compressedbuffer), endofcompressedbufferplus1, core::mem::transmute(chunkbuffer), chunksize) } + unsafe { RtlReserveChunk(compressionformat, compressedbuffer as _, endofcompressedbufferplus1, chunkbuffer as _, chunksize) } } #[inline] pub unsafe fn RtlSecondsSince1970ToTime(elapsedseconds: u32) -> i64 { @@ -3094,33 +3063,19 @@ pub unsafe fn RtlSecondsSince1980ToTime(elapsedseconds: u32) -> i64 { #[inline] 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); - unsafe { - RtlSelfRelativeToAbsoluteSD( - 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), - ) - } + unsafe { RtlSelfRelativeToAbsoluteSD(selfrelativesecuritydescriptor, absolutesecuritydescriptor.unwrap_or(core::mem::zeroed()) as _, absolutesecuritydescriptorsize as _, dacl.unwrap_or(core::mem::zeroed()) as _, daclsize as _, sacl.unwrap_or(core::mem::zeroed()) as _, saclsize as _, owner.unwrap_or(core::mem::zeroed()) as _, ownersize as _, primarygroup.unwrap_or(core::mem::zeroed()) as _, primarygroupsize as _) } } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn RtlSetGroupSecurityDescriptor(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, group: Option, groupdefaulted: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlSetGroupSecurityDescriptor(securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, group : super::super::super::Win32::Security:: PSID, groupdefaulted : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlSetGroupSecurityDescriptor(core::mem::transmute(securitydescriptor), core::mem::transmute(group.unwrap_or(core::mem::zeroed())), groupdefaulted) } + unsafe { RtlSetGroupSecurityDescriptor(securitydescriptor as _, group.unwrap_or(core::mem::zeroed()) as _, groupdefaulted) } } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn RtlSetOwnerSecurityDescriptor(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, owner: Option, ownerdefaulted: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlSetOwnerSecurityDescriptor(securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, owner : super::super::super::Win32::Security:: PSID, ownerdefaulted : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlSetOwnerSecurityDescriptor(core::mem::transmute(securitydescriptor), core::mem::transmute(owner.unwrap_or(core::mem::zeroed())), ownerdefaulted) } + unsafe { RtlSetOwnerSecurityDescriptor(securitydescriptor as _, owner.unwrap_or(core::mem::zeroed()) as _, ownerdefaulted) } } #[inline] pub unsafe fn RtlSetProcessPlaceholderCompatibilityMode(mode: i8) -> i8 { @@ -3147,13 +3102,13 @@ pub unsafe fn RtlSubAuthoritySid(sid: super::super::super::Win32::Security::PSID #[inline] pub unsafe fn RtlTimeToSecondsSince1980(time: *const i64, elapsedseconds: *mut u32) -> bool { windows_targets::link!("ntdll.dll" "system" fn RtlTimeToSecondsSince1980(time : *const i64, elapsedseconds : *mut u32) -> bool); - unsafe { RtlTimeToSecondsSince1980(time, core::mem::transmute(elapsedseconds)) } + unsafe { RtlTimeToSecondsSince1980(time, elapsedseconds as _) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn RtlUnicodeStringToCountedOemString(destinationstring: *mut super::super::super::Win32::System::Kernel::STRING, sourcestring: *const super::super::super::Win32::Foundation::UNICODE_STRING, allocatedestinationstring: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlUnicodeStringToCountedOemString(destinationstring : *mut super::super::super::Win32::System::Kernel:: STRING, sourcestring : *const super::super::super::Win32::Foundation:: UNICODE_STRING, allocatedestinationstring : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlUnicodeStringToCountedOemString(core::mem::transmute(destinationstring), sourcestring, allocatedestinationstring) } + unsafe { RtlUnicodeStringToCountedOemString(destinationstring as _, sourcestring, allocatedestinationstring) } } #[inline] pub unsafe fn RtlUnicodeToCustomCPN(customcp: *const CPTABLEINFO, customcpstring: &mut [u8], bytesincustomcpstring: Option<*mut u32>, unicodestring: P4, bytesinunicodestring: u32) -> super::super::super::Win32::Foundation::NTSTATUS @@ -3161,29 +3116,29 @@ 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); - unsafe { RtlUnicodeToCustomCPN(customcp, core::mem::transmute(customcpstring.as_ptr()), customcpstring.len().try_into().unwrap(), core::mem::transmute(bytesincustomcpstring.unwrap_or(core::mem::zeroed())), unicodestring.param().abi(), bytesinunicodestring) } + unsafe { RtlUnicodeToCustomCPN(customcp, core::mem::transmute(customcpstring.as_ptr()), customcpstring.len().try_into().unwrap(), bytesincustomcpstring.unwrap_or(core::mem::zeroed()) as _, unicodestring.param().abi(), bytesinunicodestring) } } #[inline] pub unsafe fn RtlUnicodeToMultiByteN(multibytestring: &mut [u8], bytesinmultibytestring: Option<*mut u32>, unicodestring: *const u16, bytesinunicodestring: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlUnicodeToMultiByteN(multibytestring : windows_core::PSTR, maxbytesinmultibytestring : u32, bytesinmultibytestring : *mut u32, unicodestring : *const u16, bytesinunicodestring : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlUnicodeToMultiByteN(core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap(), core::mem::transmute(bytesinmultibytestring.unwrap_or(core::mem::zeroed())), unicodestring, bytesinunicodestring) } + unsafe { RtlUnicodeToMultiByteN(core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap(), bytesinmultibytestring.unwrap_or(core::mem::zeroed()) as _, unicodestring, bytesinunicodestring) } } #[inline] pub unsafe fn RtlUnicodeToOemN(oemstring: &mut [u8], bytesinoemstring: Option<*mut u32>, unicodestring: *const u16, bytesinunicodestring: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlUnicodeToOemN(oemstring : windows_core::PSTR, maxbytesinoemstring : u32, bytesinoemstring : *mut u32, unicodestring : *const u16, bytesinunicodestring : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlUnicodeToOemN(core::mem::transmute(oemstring.as_ptr()), oemstring.len().try_into().unwrap(), core::mem::transmute(bytesinoemstring.unwrap_or(core::mem::zeroed())), unicodestring, bytesinunicodestring) } + unsafe { RtlUnicodeToOemN(core::mem::transmute(oemstring.as_ptr()), oemstring.len().try_into().unwrap(), bytesinoemstring.unwrap_or(core::mem::zeroed()) as _, unicodestring, bytesinunicodestring) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn RtlUpcaseUnicodeStringToCountedOemString(destinationstring: *mut super::super::super::Win32::System::Kernel::STRING, sourcestring: *const super::super::super::Win32::Foundation::UNICODE_STRING, allocatedestinationstring: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlUpcaseUnicodeStringToCountedOemString(destinationstring : *mut super::super::super::Win32::System::Kernel:: STRING, sourcestring : *const super::super::super::Win32::Foundation:: UNICODE_STRING, allocatedestinationstring : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlUpcaseUnicodeStringToCountedOemString(core::mem::transmute(destinationstring), sourcestring, allocatedestinationstring) } + unsafe { RtlUpcaseUnicodeStringToCountedOemString(destinationstring as _, sourcestring, allocatedestinationstring) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn RtlUpcaseUnicodeStringToOemString(destinationstring: *mut super::super::super::Win32::System::Kernel::STRING, sourcestring: *const super::super::super::Win32::Foundation::UNICODE_STRING, allocatedestinationstring: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlUpcaseUnicodeStringToOemString(destinationstring : *mut super::super::super::Win32::System::Kernel:: STRING, sourcestring : *const super::super::super::Win32::Foundation:: UNICODE_STRING, allocatedestinationstring : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlUpcaseUnicodeStringToOemString(core::mem::transmute(destinationstring), sourcestring, allocatedestinationstring) } + unsafe { RtlUpcaseUnicodeStringToOemString(destinationstring as _, sourcestring, allocatedestinationstring) } } #[inline] pub unsafe fn RtlUpcaseUnicodeToCustomCPN(customcp: *const CPTABLEINFO, customcpstring: &mut [u8], bytesincustomcpstring: Option<*mut u32>, unicodestring: P4, bytesinunicodestring: u32) -> super::super::super::Win32::Foundation::NTSTATUS @@ -3191,17 +3146,17 @@ 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); - unsafe { RtlUpcaseUnicodeToCustomCPN(customcp, core::mem::transmute(customcpstring.as_ptr()), customcpstring.len().try_into().unwrap(), core::mem::transmute(bytesincustomcpstring.unwrap_or(core::mem::zeroed())), unicodestring.param().abi(), bytesinunicodestring) } + unsafe { RtlUpcaseUnicodeToCustomCPN(customcp, core::mem::transmute(customcpstring.as_ptr()), customcpstring.len().try_into().unwrap(), bytesincustomcpstring.unwrap_or(core::mem::zeroed()) as _, unicodestring.param().abi(), bytesinunicodestring) } } #[inline] pub unsafe fn RtlUpcaseUnicodeToMultiByteN(multibytestring: &mut [u8], bytesinmultibytestring: Option<*mut u32>, unicodestring: *const u16, bytesinunicodestring: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlUpcaseUnicodeToMultiByteN(multibytestring : windows_core::PSTR, maxbytesinmultibytestring : u32, bytesinmultibytestring : *mut u32, unicodestring : *const u16, bytesinunicodestring : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlUpcaseUnicodeToMultiByteN(core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap(), core::mem::transmute(bytesinmultibytestring.unwrap_or(core::mem::zeroed())), unicodestring, bytesinunicodestring) } + unsafe { RtlUpcaseUnicodeToMultiByteN(core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap(), bytesinmultibytestring.unwrap_or(core::mem::zeroed()) as _, unicodestring, bytesinunicodestring) } } #[inline] pub unsafe fn RtlUpcaseUnicodeToOemN(oemstring: &mut [u8], bytesinoemstring: Option<*mut u32>, unicodestring: *const u16, bytesinunicodestring: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlUpcaseUnicodeToOemN(oemstring : windows_core::PSTR, maxbytesinoemstring : u32, bytesinoemstring : *mut u32, unicodestring : *const u16, bytesinunicodestring : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlUpcaseUnicodeToOemN(core::mem::transmute(oemstring.as_ptr()), oemstring.len().try_into().unwrap(), core::mem::transmute(bytesinoemstring.unwrap_or(core::mem::zeroed())), unicodestring, bytesinunicodestring) } + unsafe { RtlUpcaseUnicodeToOemN(core::mem::transmute(oemstring.as_ptr()), oemstring.len().try_into().unwrap(), bytesinoemstring.unwrap_or(core::mem::zeroed()) as _, unicodestring, bytesinunicodestring) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -3212,7 +3167,7 @@ pub unsafe fn RtlValidSid(sid: super::super::super::Win32::Security::PSID) -> bo #[inline] 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); - unsafe { RtlValidateUnicodeString(core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), string) } + unsafe { RtlValidateUnicodeString(flags.unwrap_or(core::mem::zeroed()) as _, string) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -3229,37 +3184,37 @@ pub unsafe fn RtlxUnicodeStringToOemSize(unicodestring: *const super::super::sup #[inline] 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) -> bool { 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) -> bool); - unsafe { SeAccessCheckFromState(securitydescriptor, primarytokeninformation, core::mem::transmute(clienttokeninformation.unwrap_or(core::mem::zeroed())), desiredaccess, previouslygrantedaccess, core::mem::transmute(privileges.unwrap_or(core::mem::zeroed())), genericmapping, accessmode, core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus)) } + unsafe { SeAccessCheckFromState(securitydescriptor, primarytokeninformation, clienttokeninformation.unwrap_or(core::mem::zeroed()) as _, desiredaccess, previouslygrantedaccess, privileges.unwrap_or(core::mem::zeroed()) as _, genericmapping, accessmode, grantedaccess as _, accessstatus as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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) -> bool { 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) -> bool); - unsafe { SeAccessCheckFromStateEx(securitydescriptor, primarytoken, core::mem::transmute(clienttoken.unwrap_or(core::mem::zeroed())), desiredaccess, previouslygrantedaccess, core::mem::transmute(privileges.unwrap_or(core::mem::zeroed())), genericmapping, accessmode, core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus)) } + unsafe { SeAccessCheckFromStateEx(securitydescriptor, primarytoken, clienttoken.unwrap_or(core::mem::zeroed()) as _, desiredaccess, previouslygrantedaccess, privileges.unwrap_or(core::mem::zeroed()) as _, genericmapping, accessmode, grantedaccess as _, accessstatus as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security"))] #[inline] 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)); - unsafe { SeAdjustAccessStateForAccessConstraints(objecttype, securitydescriptor, core::mem::transmute(accessstate)) } + unsafe { SeAdjustAccessStateForAccessConstraints(objecttype, securitydescriptor, accessstate as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security"))] #[inline] 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)); - unsafe { SeAdjustAccessStateForTrustLabel(objecttype, securitydescriptor, core::mem::transmute(accessstate)) } + unsafe { SeAdjustAccessStateForTrustLabel(objecttype, securitydescriptor, accessstate as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] 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 bool) -> 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 bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { SeAdjustObjectSecurity(objectname, originaldescriptor, proposeddescriptor, subjectsecuritycontext, core::mem::transmute(adjusteddescriptor), core::mem::transmute(applyadjusteddescriptor)) } + unsafe { SeAdjustObjectSecurity(objectname, originaldescriptor, proposeddescriptor, subjectsecuritycontext, adjusteddescriptor as _, applyadjusteddescriptor as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security"))] #[inline] pub unsafe fn SeAppendPrivileges(accessstate: *mut super::super::Foundation::ACCESS_STATE, privileges: *const super::super::super::Win32::Security::PRIVILEGE_SET) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn SeAppendPrivileges(accessstate : *mut super::super::Foundation:: ACCESS_STATE, privileges : *const super::super::super::Win32::Security:: PRIVILEGE_SET) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { SeAppendPrivileges(core::mem::transmute(accessstate), privileges) } + unsafe { SeAppendPrivileges(accessstate as _, privileges) } } #[inline] pub unsafe fn SeAuditFipsCryptoSelftests(bsuccess: bool, selftestcode: u32) { @@ -3274,7 +3229,7 @@ pub unsafe fn SeAuditHardLinkCreation(filename: *const super::super::super::Win3 #[inline] pub unsafe fn SeAuditHardLinkCreationWithTransaction(filename: *const super::super::super::Win32::Foundation::UNICODE_STRING, linkname: *const super::super::super::Win32::Foundation::UNICODE_STRING, bsuccess: bool, transactionid: Option<*const windows_core::GUID>) { 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 : bool, transactionid : *const windows_core::GUID)); - unsafe { SeAuditHardLinkCreationWithTransaction(filename, linkname, bsuccess, core::mem::transmute(transactionid.unwrap_or(core::mem::zeroed()))) } + unsafe { SeAuditHardLinkCreationWithTransaction(filename, linkname, bsuccess, transactionid.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SeAuditTransactionStateChange(transactionid: *const windows_core::GUID, resourcemanagerid: *const windows_core::GUID, newtransactionstate: u32) { @@ -3285,13 +3240,13 @@ pub unsafe fn SeAuditTransactionStateChange(transactionid: *const windows_core:: #[inline] pub unsafe fn SeAuditingAnyFileEventsWithContext(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, subjectsecuritycontext: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn SeAuditingAnyFileEventsWithContext(securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, subjectsecuritycontext : *const super::super::Foundation:: SECURITY_SUBJECT_CONTEXT) -> bool); - unsafe { SeAuditingAnyFileEventsWithContext(securitydescriptor, core::mem::transmute(subjectsecuritycontext.unwrap_or(core::mem::zeroed()))) } + unsafe { SeAuditingAnyFileEventsWithContext(securitydescriptor, subjectsecuritycontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn SeAuditingAnyFileEventsWithContextEx(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, subjectsecuritycontext: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>, stagingenabled: Option<*mut bool>) -> bool { 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 bool) -> bool); - unsafe { SeAuditingAnyFileEventsWithContextEx(securitydescriptor, core::mem::transmute(subjectsecuritycontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(stagingenabled.unwrap_or(core::mem::zeroed()))) } + unsafe { SeAuditingAnyFileEventsWithContextEx(securitydescriptor, subjectsecuritycontext.unwrap_or(core::mem::zeroed()) as _, stagingenabled.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -3303,13 +3258,13 @@ pub unsafe fn SeAuditingFileEvents(accessgranted: bool, securitydescriptor: supe #[inline] pub unsafe fn SeAuditingFileEventsWithContext(accessgranted: bool, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, subjectsecuritycontext: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn SeAuditingFileEventsWithContext(accessgranted : bool, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, subjectsecuritycontext : *const super::super::Foundation:: SECURITY_SUBJECT_CONTEXT) -> bool); - unsafe { SeAuditingFileEventsWithContext(accessgranted, securitydescriptor, core::mem::transmute(subjectsecuritycontext.unwrap_or(core::mem::zeroed()))) } + unsafe { SeAuditingFileEventsWithContext(accessgranted, securitydescriptor, subjectsecuritycontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn SeAuditingFileEventsWithContextEx(accessgranted: bool, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, subjectsecuritycontext: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>, stagingenabled: Option<*mut bool>) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn SeAuditingFileEventsWithContextEx(accessgranted : bool, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, subjectsecuritycontext : *const super::super::Foundation:: SECURITY_SUBJECT_CONTEXT, stagingenabled : *mut bool) -> bool); - unsafe { SeAuditingFileEventsWithContextEx(accessgranted, securitydescriptor, core::mem::transmute(subjectsecuritycontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(stagingenabled.unwrap_or(core::mem::zeroed()))) } + unsafe { SeAuditingFileEventsWithContextEx(accessgranted, securitydescriptor, subjectsecuritycontext.unwrap_or(core::mem::zeroed()) as _, stagingenabled.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -3327,7 +3282,7 @@ pub unsafe fn SeAuditingHardLinkEvents(accessgranted: bool, securitydescriptor: #[inline] pub unsafe fn SeAuditingHardLinkEventsWithContext(accessgranted: bool, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, subjectsecuritycontext: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn SeAuditingHardLinkEventsWithContext(accessgranted : bool, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, subjectsecuritycontext : *const super::super::Foundation:: SECURITY_SUBJECT_CONTEXT) -> bool); - unsafe { SeAuditingHardLinkEventsWithContext(accessgranted, securitydescriptor, core::mem::transmute(subjectsecuritycontext.unwrap_or(core::mem::zeroed()))) } + unsafe { SeAuditingHardLinkEventsWithContext(accessgranted, securitydescriptor, subjectsecuritycontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -3335,7 +3290,7 @@ pub unsafe fn SeCaptureSubjectContextEx(thread: Option super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, clientcontext : *mut SECURITY_CLIENT_CONTEXT) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { SeCreateClientSecurity(clientthread, clientsecurityqos, remotesession, core::mem::transmute(clientcontext)) } + unsafe { SeCreateClientSecurity(clientthread, clientsecurityqos, remotesession, clientcontext as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn SeCreateClientSecurityFromSubjectContext(subjectcontext: *const super::super::Foundation::SECURITY_SUBJECT_CONTEXT, clientsecurityqos: *const super::super::super::Win32::Security::SECURITY_QUALITY_OF_SERVICE, serverisremote: bool, clientcontext: *mut SECURITY_CLIENT_CONTEXT) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn SeCreateClientSecurityFromSubjectContext(subjectcontext : *const super::super::Foundation:: SECURITY_SUBJECT_CONTEXT, clientsecurityqos : *const super::super::super::Win32::Security:: SECURITY_QUALITY_OF_SERVICE, serverisremote : bool, clientcontext : *mut SECURITY_CLIENT_CONTEXT) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { SeCreateClientSecurityFromSubjectContext(subjectcontext, clientsecurityqos, serverisremote, core::mem::transmute(clientcontext)) } + unsafe { SeCreateClientSecurityFromSubjectContext(subjectcontext, clientsecurityqos, serverisremote, clientcontext as _) } } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn SeDeleteClientSecurity(clientcontext: *mut SECURITY_CLIENT_CONTEXT) { windows_targets::link!("ntoskrnl.exe" "system" fn SeDeleteClientSecurity(clientcontext : *mut SECURITY_CLIENT_CONTEXT)); - unsafe { SeDeleteClientSecurity(core::mem::transmute(clientcontext)) } + unsafe { SeDeleteClientSecurity(clientcontext as _) } } #[inline] pub unsafe fn SeDeleteObjectAuditAlarm(object: *const core::ffi::c_void, handle: super::super::super::Win32::Foundation::HANDLE) { @@ -3375,19 +3330,19 @@ pub unsafe fn SeDeleteObjectAuditAlarm(object: *const core::ffi::c_void, handle: #[inline] 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)); - unsafe { SeDeleteObjectAuditAlarmWithTransaction(object, handle, core::mem::transmute(transactionid.unwrap_or(core::mem::zeroed()))) } + unsafe { SeDeleteObjectAuditAlarmWithTransaction(object, handle, transactionid.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn SeExamineSacl(sacl: *const super::super::super::Win32::Security::ACL, resourcesacl: *const super::super::super::Win32::Security::ACL, token: *const core::ffi::c_void, desiredaccess: u32, accessgranted: bool, generateaudit: *mut bool, generatealarm: *mut bool) { windows_targets::link!("ntoskrnl.exe" "system" fn SeExamineSacl(sacl : *const super::super::super::Win32::Security:: ACL, resourcesacl : *const super::super::super::Win32::Security:: ACL, token : *const core::ffi::c_void, desiredaccess : u32, accessgranted : bool, generateaudit : *mut bool, generatealarm : *mut bool)); - unsafe { SeExamineSacl(sacl, resourcesacl, token, desiredaccess, accessgranted, core::mem::transmute(generateaudit), core::mem::transmute(generatealarm)) } + unsafe { SeExamineSacl(sacl, resourcesacl, token, desiredaccess, accessgranted, generateaudit as _, generatealarm as _) } } #[cfg(feature = "Win32_Security")] #[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); - unsafe { SeFilterToken(existingtoken, 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)) } + unsafe { SeFilterToken(existingtoken, flags, sidstodisable.unwrap_or(core::mem::zeroed()) as _, privilegestodelete.unwrap_or(core::mem::zeroed()) as _, restrictedsids.unwrap_or(core::mem::zeroed()) as _, filteredtoken as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -3399,19 +3354,19 @@ pub unsafe fn SeFreePrivileges(privileges: *const super::super::super::Win32::Se #[inline] 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)); - unsafe { SeImpersonateClient(clientcontext, core::mem::transmute(serverthread.unwrap_or(core::mem::zeroed()))) } + unsafe { SeImpersonateClient(clientcontext, serverthread.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] 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); - unsafe { SeImpersonateClientEx(clientcontext, core::mem::transmute(serverthread.unwrap_or(core::mem::zeroed()))) } + unsafe { SeImpersonateClientEx(clientcontext, serverthread.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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); - unsafe { SeLocateProcessImageName(process, core::mem::transmute(pimagefilename)) } + unsafe { SeLocateProcessImageName(process, pimagefilename as _) } } #[inline] pub unsafe fn SeMarkLogonSessionForTerminationNotification(logonid: *const super::super::super::Win32::Foundation::LUID) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -3430,7 +3385,7 @@ pub unsafe fn SeOpenObjectAuditAlarm(objecttypename: *const super::super::super: 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 : bool, accessgranted : bool, accessmode : i8, generateonclose : *mut bool)); unsafe { let mut result__ = core::mem::zeroed(); - SeOpenObjectAuditAlarm(objecttypename, core::mem::transmute(object.unwrap_or(core::mem::zeroed())), core::mem::transmute(absoluteobjectname.unwrap_or(core::mem::zeroed())), securitydescriptor, accessstate, objectcreated, accessgranted, accessmode, &mut result__); + SeOpenObjectAuditAlarm(objecttypename, object.unwrap_or(core::mem::zeroed()) as _, absoluteobjectname.unwrap_or(core::mem::zeroed()) as _, securitydescriptor, accessstate, objectcreated, accessgranted, accessmode, &mut result__); result__ } } @@ -3440,7 +3395,7 @@ pub unsafe fn SeOpenObjectAuditAlarmWithTransaction(objecttypename: *const super 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 : bool, accessgranted : bool, accessmode : i8, transactionid : *const windows_core::GUID, generateonclose : *mut bool)); unsafe { let mut result__ = core::mem::zeroed(); - SeOpenObjectAuditAlarmWithTransaction(objecttypename, core::mem::transmute(object.unwrap_or(core::mem::zeroed())), core::mem::transmute(absoluteobjectname.unwrap_or(core::mem::zeroed())), securitydescriptor, accessstate, objectcreated, accessgranted, accessmode, core::mem::transmute(transactionid.unwrap_or(core::mem::zeroed())), &mut result__); + SeOpenObjectAuditAlarmWithTransaction(objecttypename, object.unwrap_or(core::mem::zeroed()) as _, absoluteobjectname.unwrap_or(core::mem::zeroed()) as _, securitydescriptor, accessstate, objectcreated, accessgranted, accessmode, transactionid.unwrap_or(core::mem::zeroed()) as _, &mut result__); result__ } } @@ -3450,7 +3405,7 @@ pub unsafe fn SeOpenObjectForDeleteAuditAlarm(objecttypename: *const super::supe 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 : bool, accessgranted : bool, accessmode : i8, generateonclose : *mut bool)); unsafe { let mut result__ = core::mem::zeroed(); - SeOpenObjectForDeleteAuditAlarm(objecttypename, core::mem::transmute(object.unwrap_or(core::mem::zeroed())), core::mem::transmute(absoluteobjectname.unwrap_or(core::mem::zeroed())), securitydescriptor, accessstate, objectcreated, accessgranted, accessmode, &mut result__); + SeOpenObjectForDeleteAuditAlarm(objecttypename, object.unwrap_or(core::mem::zeroed()) as _, absoluteobjectname.unwrap_or(core::mem::zeroed()) as _, securitydescriptor, accessstate, objectcreated, accessgranted, accessmode, &mut result__); result__ } } @@ -3460,7 +3415,7 @@ pub unsafe fn SeOpenObjectForDeleteAuditAlarmWithTransaction(objecttypename: *co 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 : bool, accessgranted : bool, accessmode : i8, transactionid : *const windows_core::GUID, generateonclose : *mut bool)); unsafe { let mut result__ = core::mem::zeroed(); - SeOpenObjectForDeleteAuditAlarmWithTransaction(objecttypename, core::mem::transmute(object.unwrap_or(core::mem::zeroed())), core::mem::transmute(absoluteobjectname.unwrap_or(core::mem::zeroed())), securitydescriptor, accessstate, objectcreated, accessgranted, accessmode, core::mem::transmute(transactionid.unwrap_or(core::mem::zeroed())), &mut result__); + SeOpenObjectForDeleteAuditAlarmWithTransaction(objecttypename, object.unwrap_or(core::mem::zeroed()) as _, absoluteobjectname.unwrap_or(core::mem::zeroed()) as _, securitydescriptor, accessstate, objectcreated, accessgranted, accessmode, transactionid.unwrap_or(core::mem::zeroed()) as _, &mut result__); result__ } } @@ -3468,40 +3423,40 @@ pub unsafe fn SeOpenObjectForDeleteAuditAlarmWithTransaction(objecttypename: *co #[inline] pub unsafe fn SePrivilegeCheck(requiredprivileges: *mut super::super::super::Win32::Security::PRIVILEGE_SET, subjectsecuritycontext: *const super::super::Foundation::SECURITY_SUBJECT_CONTEXT, accessmode: i8) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn SePrivilegeCheck(requiredprivileges : *mut super::super::super::Win32::Security:: PRIVILEGE_SET, subjectsecuritycontext : *const super::super::Foundation:: SECURITY_SUBJECT_CONTEXT, accessmode : i8) -> bool); - unsafe { SePrivilegeCheck(core::mem::transmute(requiredprivileges), subjectsecuritycontext, accessmode) } + unsafe { SePrivilegeCheck(requiredprivileges as _, subjectsecuritycontext, accessmode) } } #[inline] pub unsafe fn SeQueryAuthenticationIdToken(token: *const core::ffi::c_void, authenticationid: *mut super::super::super::Win32::Foundation::LUID) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn SeQueryAuthenticationIdToken(token : *const core::ffi::c_void, authenticationid : *mut super::super::super::Win32::Foundation:: LUID) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { SeQueryAuthenticationIdToken(token, core::mem::transmute(authenticationid)) } + unsafe { SeQueryAuthenticationIdToken(token, authenticationid as _) } } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn SeQueryInformationToken(token: *const core::ffi::c_void, tokeninformationclass: super::super::super::Win32::Security::TOKEN_INFORMATION_CLASS, tokeninformation: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn SeQueryInformationToken(token : *const core::ffi::c_void, tokeninformationclass : super::super::super::Win32::Security:: TOKEN_INFORMATION_CLASS, tokeninformation : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { SeQueryInformationToken(token, tokeninformationclass, core::mem::transmute(tokeninformation)) } + unsafe { SeQueryInformationToken(token, tokeninformationclass, tokeninformation as _) } } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn SeQuerySecurityDescriptorInfo(securityinformation: *const u32, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, length: *mut u32, objectssecuritydescriptor: *mut super::super::super::Win32::Security::PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn SeQuerySecurityDescriptorInfo(securityinformation : *const u32, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, length : *mut u32, objectssecuritydescriptor : *mut super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { SeQuerySecurityDescriptorInfo(securityinformation, core::mem::transmute(securitydescriptor), core::mem::transmute(length), core::mem::transmute(objectssecuritydescriptor)) } + unsafe { SeQuerySecurityDescriptorInfo(securityinformation, securitydescriptor as _, length as _, objectssecuritydescriptor as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn SeQueryServerSiloToken(token: *const core::ffi::c_void, pserversilo: *mut super::super::Foundation::PESILO) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn SeQueryServerSiloToken(token : *const core::ffi::c_void, pserversilo : *mut super::super::Foundation:: PESILO) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { SeQueryServerSiloToken(token, core::mem::transmute(pserversilo)) } + unsafe { SeQueryServerSiloToken(token, pserversilo as _) } } #[inline] pub unsafe fn SeQuerySessionIdToken(token: *const core::ffi::c_void, sessionid: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn SeQuerySessionIdToken(token : *const core::ffi::c_void, sessionid : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { SeQuerySessionIdToken(token, core::mem::transmute(sessionid)) } + unsafe { SeQuerySessionIdToken(token, sessionid as _) } } #[inline] pub unsafe fn SeQuerySessionIdTokenEx(token: *const core::ffi::c_void, sessionid: *mut u32, isservicesession: *mut bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn SeQuerySessionIdTokenEx(token : *const core::ffi::c_void, sessionid : *mut u32, isservicesession : *mut bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { SeQuerySessionIdTokenEx(token, core::mem::transmute(sessionid), core::mem::transmute(isservicesession)) } + unsafe { SeQuerySessionIdTokenEx(token, sessionid as _, isservicesession as _) } } #[inline] pub unsafe fn SeRegisterLogonSessionTerminatedRoutine(callbackroutine: PSE_LOGON_SESSION_TERMINATED_ROUTINE) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -3517,25 +3472,25 @@ pub unsafe fn SeRegisterLogonSessionTerminatedRoutineEx(callbackroutine: PSE_LOG #[inline] 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); - unsafe { SeReportSecurityEventWithSubCategory(flags, sourcename, core::mem::transmute(usersid.unwrap_or(core::mem::zeroed())), auditparameters, auditsubcategoryid) } + unsafe { SeReportSecurityEventWithSubCategory(flags, sourcename, usersid.unwrap_or(core::mem::zeroed()) as _, auditparameters, auditsubcategoryid) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security"))] #[inline] pub unsafe fn SeSetAccessStateGenericMapping(accessstate: *mut super::super::Foundation::ACCESS_STATE, genericmapping: *const super::super::super::Win32::Security::GENERIC_MAPPING) { windows_targets::link!("ntoskrnl.exe" "system" fn SeSetAccessStateGenericMapping(accessstate : *mut super::super::Foundation:: ACCESS_STATE, genericmapping : *const super::super::super::Win32::Security:: GENERIC_MAPPING)); - unsafe { SeSetAccessStateGenericMapping(core::mem::transmute(accessstate), genericmapping) } + unsafe { SeSetAccessStateGenericMapping(accessstate as _, genericmapping) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] 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); - unsafe { SeSetSecurityDescriptorInfo(core::mem::transmute(object.unwrap_or(core::mem::zeroed())), securityinformation, modificationdescriptor, core::mem::transmute(objectssecuritydescriptor), pooltype, genericmapping) } + unsafe { SeSetSecurityDescriptorInfo(object.unwrap_or(core::mem::zeroed()) as _, securityinformation, modificationdescriptor, objectssecuritydescriptor as _, pooltype, 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: 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); - unsafe { SeSetSecurityDescriptorInfoEx(core::mem::transmute(object.unwrap_or(core::mem::zeroed())), securityinformation, modificationdescriptor, core::mem::transmute(objectssecuritydescriptor), autoinheritflags, pooltype, genericmapping) } + unsafe { SeSetSecurityDescriptorInfoEx(object.unwrap_or(core::mem::zeroed()) as _, securityinformation, modificationdescriptor, objectssecuritydescriptor as _, autoinheritflags, pooltype, genericmapping) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security"))] #[inline] @@ -3547,7 +3502,7 @@ pub unsafe fn SeShouldCheckForAccessRightsFromParent(objecttype: *const core::ff #[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); - unsafe { SeTokenFromAccessInformation(core::mem::transmute(accessinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(token.unwrap_or(core::mem::zeroed())), length, core::mem::transmute(requiredlength)) } + unsafe { SeTokenFromAccessInformation(accessinformation.unwrap_or(core::mem::zeroed()) as _, token.unwrap_or(core::mem::zeroed()) as _, length, requiredlength as _) } } #[inline] pub unsafe fn SeTokenIsAdmin(token: *const core::ffi::c_void) -> bool { @@ -3584,34 +3539,34 @@ 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); - unsafe { SecLookupAccountName(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()))) } + unsafe { SecLookupAccountName(name, sidsize as _, sid as _, nameuse as _, domainsize as _, referenceddomain.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { SecLookupAccountSid(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)) } + unsafe { SecLookupAccountSid(sid, namesize as _, namebuffer as _, domainsize as _, domainbuffer.unwrap_or(core::mem::zeroed()) as _, nameuse as _) } } #[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); - unsafe { SecLookupWellKnownSid(sidtype, core::mem::transmute(sid), sidbuffersize, core::mem::transmute(sidsize.unwrap_or(core::mem::zeroed()))) } + unsafe { SecLookupWellKnownSid(sidtype, sid as _, sidbuffersize, sidsize.unwrap_or(core::mem::zeroed()) as _) } } #[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: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ksecdd.sys" "system" 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 : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { SecMakeSPN(core::mem::transmute(serviceclass), core::mem::transmute(servicename), core::mem::transmute(instancename), instanceport, core::mem::transmute(referrer), core::mem::transmute(spn), core::mem::transmute(length), allocate) } + unsafe { SecMakeSPN(serviceclass as _, servicename as _, instancename as _, instanceport, referrer as _, spn as _, length as _, allocate) } } #[inline] pub unsafe fn SecMakeSPNEx(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, targetinfo: *mut super::super::super::Win32::Foundation::UNICODE_STRING, spn: *mut super::super::super::Win32::Foundation::UNICODE_STRING, length: *mut u32, allocate: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ksecdd.sys" "system" fn SecMakeSPNEx(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, targetinfo : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, spn : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, length : *mut u32, allocate : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { SecMakeSPNEx(core::mem::transmute(serviceclass), core::mem::transmute(servicename), core::mem::transmute(instancename), instanceport, core::mem::transmute(referrer), core::mem::transmute(targetinfo), core::mem::transmute(spn), core::mem::transmute(length), allocate) } + unsafe { SecMakeSPNEx(serviceclass as _, servicename as _, instancename as _, instanceport, referrer as _, targetinfo as _, spn as _, length as _, allocate) } } #[inline] pub unsafe fn SecMakeSPNEx2(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, intargetinfo: *mut super::super::super::Win32::Foundation::UNICODE_STRING, spn: *mut super::super::super::Win32::Foundation::UNICODE_STRING, totalsize: *mut u32, allocate: bool, istargetinfomarshaled: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ksecdd.sys" "system" fn SecMakeSPNEx2(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, intargetinfo : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, spn : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, totalsize : *mut u32, allocate : bool, istargetinfomarshaled : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { SecMakeSPNEx2(core::mem::transmute(serviceclass), core::mem::transmute(servicename), core::mem::transmute(instancename), instanceport, core::mem::transmute(referrer), core::mem::transmute(intargetinfo), core::mem::transmute(spn), core::mem::transmute(totalsize), allocate, istargetinfomarshaled) } + unsafe { SecMakeSPNEx2(serviceclass as _, servicename as _, instancename as _, instanceport, referrer as _, intargetinfo as _, spn as _, totalsize as _, allocate, istargetinfomarshaled) } } #[inline] pub unsafe fn SetContextAttributesW(phcontext: *const SecHandle, ulattribute: u32, pbuffer: *const core::ffi::c_void, cbbuffer: u32) -> windows_core::Result<()> { @@ -3622,7 +3577,7 @@ pub unsafe fn SetContextAttributesW(phcontext: *const SecHandle, ulattribute: u3 #[inline] pub unsafe fn SspiAcceptSecurityContextAsync(asynccontext: *mut super::super::Foundation::SspiAsyncContext, phcredential: Option<*const SecHandle>, phcontext: Option<*const SecHandle>, pinput: Option<*const SecBufferDesc>, fcontextreq: u32, targetdatarep: u32, phnewcontext: Option<*const SecHandle>, poutput: Option<*const SecBufferDesc>, pfcontextattr: *const u32, ptsexpiry: Option<*const i64>) -> windows_core::Result<()> { windows_targets::link!("ksecdd.sys" "system" fn SspiAcceptSecurityContextAsync(asynccontext : *mut super::super::Foundation:: SspiAsyncContext, phcredential : *const SecHandle, phcontext : *const SecHandle, pinput : *const SecBufferDesc, fcontextreq : u32, targetdatarep : u32, phnewcontext : *const SecHandle, poutput : *const SecBufferDesc, pfcontextattr : *const u32, ptsexpiry : *const i64) -> windows_core::HRESULT); - unsafe { SspiAcceptSecurityContextAsync(core::mem::transmute(asynccontext), 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())), fcontextreq, targetdatarep, core::mem::transmute(phnewcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(poutput.unwrap_or(core::mem::zeroed())), pfcontextattr, core::mem::transmute(ptsexpiry.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SspiAcceptSecurityContextAsync(asynccontext as _, phcredential.unwrap_or(core::mem::zeroed()) as _, phcontext.unwrap_or(core::mem::zeroed()) as _, pinput.unwrap_or(core::mem::zeroed()) as _, fcontextreq, targetdatarep, phnewcontext.unwrap_or(core::mem::zeroed()) as _, poutput.unwrap_or(core::mem::zeroed()) as _, pfcontextattr, ptsexpiry.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security_Authentication_Identity"))] #[inline] @@ -3632,13 +3587,13 @@ where 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); - unsafe { SspiAcquireCredentialsHandleAsyncA(core::mem::transmute(asynccontext), pszprincipal.param().abi(), pszpackage.param().abi(), 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())), phcredential, core::mem::transmute(ptsexpiry.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SspiAcquireCredentialsHandleAsyncA(asynccontext as _, pszprincipal.param().abi(), pszpackage.param().abi(), fcredentialuse, pvlogonid.unwrap_or(core::mem::zeroed()) as _, pauthdata.unwrap_or(core::mem::zeroed()) as _, pgetkeyfn.unwrap_or(core::mem::zeroed()) as _, pvgetkeyargument.unwrap_or(core::mem::zeroed()) as _, phcredential, ptsexpiry.unwrap_or(core::mem::zeroed()) as _).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: 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); - unsafe { SspiAcquireCredentialsHandleAsyncW(core::mem::transmute(asynccontext), core::mem::transmute(pszprincipal.unwrap_or(core::mem::zeroed())), pszpackage, 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())), phcredential, core::mem::transmute(ptsexpiry.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SspiAcquireCredentialsHandleAsyncW(asynccontext as _, pszprincipal.unwrap_or(core::mem::zeroed()) as _, pszpackage, fcredentialuse, pvlogonid.unwrap_or(core::mem::zeroed()) as _, pauthdata.unwrap_or(core::mem::zeroed()) as _, pgetkeyfn.unwrap_or(core::mem::zeroed()) as _, pvgetkeyargument.unwrap_or(core::mem::zeroed()) as _, phcredential, ptsexpiry.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -3650,19 +3605,19 @@ pub unsafe fn SspiCreateAsyncContext() -> *mut super::super::Foundation::SspiAsy #[inline] pub unsafe fn SspiDeleteSecurityContextAsync(asynccontext: *mut super::super::Foundation::SspiAsyncContext, phcontext: *const SecHandle) -> windows_core::Result<()> { windows_targets::link!("ksecdd.sys" "system" fn SspiDeleteSecurityContextAsync(asynccontext : *mut super::super::Foundation:: SspiAsyncContext, phcontext : *const SecHandle) -> windows_core::HRESULT); - unsafe { SspiDeleteSecurityContextAsync(core::mem::transmute(asynccontext), phcontext).ok() } + unsafe { SspiDeleteSecurityContextAsync(asynccontext as _, phcontext).ok() } } #[cfg(feature = "Wdk_Foundation")] #[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)); - unsafe { SspiFreeAsyncContext(core::mem::transmute(handle.unwrap_or(core::mem::zeroed()))) } + unsafe { SspiFreeAsyncContext(handle.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn SspiFreeCredentialsHandleAsync(asynccontext: *mut super::super::Foundation::SspiAsyncContext, phcredential: *const SecHandle) -> windows_core::Result<()> { windows_targets::link!("ksecdd.sys" "system" fn SspiFreeCredentialsHandleAsync(asynccontext : *mut super::super::Foundation:: SspiAsyncContext, phcredential : *const SecHandle) -> windows_core::HRESULT); - unsafe { SspiFreeCredentialsHandleAsync(core::mem::transmute(asynccontext), phcredential).ok() } + unsafe { SspiFreeCredentialsHandleAsync(asynccontext as _, phcredential).ok() } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -3677,59 +3632,25 @@ where P3: windows_core::Param, { windows_targets::link!("ksecdd.sys" "system" fn SspiInitializeSecurityContextAsyncA(asynccontext : *mut super::super::Foundation:: SspiAsyncContext, phcredential : *const SecHandle, phcontext : *const SecHandle, psztargetname : windows_core::PCSTR, fcontextreq : u32, reserved1 : u32, targetdatarep : u32, pinput : *const SecBufferDesc, reserved2 : u32, phnewcontext : *const SecHandle, poutput : *const SecBufferDesc, pfcontextattr : *const u32, ptsexpiry : *const i64) -> windows_core::HRESULT); - unsafe { - SspiInitializeSecurityContextAsyncA( - core::mem::transmute(asynccontext), - core::mem::transmute(phcredential.unwrap_or(core::mem::zeroed())), - core::mem::transmute(phcontext.unwrap_or(core::mem::zeroed())), - psztargetname.param().abi(), - fcontextreq, - reserved1, - targetdatarep, - core::mem::transmute(pinput.unwrap_or(core::mem::zeroed())), - reserved2, - core::mem::transmute(phnewcontext.unwrap_or(core::mem::zeroed())), - core::mem::transmute(poutput.unwrap_or(core::mem::zeroed())), - pfcontextattr, - core::mem::transmute(ptsexpiry.unwrap_or(core::mem::zeroed())), - ) - .ok() - } + unsafe { SspiInitializeSecurityContextAsyncA(asynccontext as _, phcredential.unwrap_or(core::mem::zeroed()) as _, phcontext.unwrap_or(core::mem::zeroed()) as _, psztargetname.param().abi(), fcontextreq, reserved1, targetdatarep, pinput.unwrap_or(core::mem::zeroed()) as _, reserved2, phnewcontext.unwrap_or(core::mem::zeroed()) as _, poutput.unwrap_or(core::mem::zeroed()) as _, pfcontextattr, ptsexpiry.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn SspiInitializeSecurityContextAsyncW(asynccontext: *mut super::super::Foundation::SspiAsyncContext, phcredential: Option<*const SecHandle>, phcontext: Option<*const SecHandle>, psztargetname: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, fcontextreq: u32, reserved1: u32, targetdatarep: u32, pinput: Option<*const SecBufferDesc>, reserved2: u32, phnewcontext: Option<*const SecHandle>, poutput: Option<*const SecBufferDesc>, pfcontextattr: *const u32, ptsexpiry: Option<*const i64>) -> windows_core::Result<()> { windows_targets::link!("ksecdd.sys" "system" fn 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); - unsafe { - SspiInitializeSecurityContextAsyncW( - core::mem::transmute(asynccontext), - 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())), - fcontextreq, - reserved1, - targetdatarep, - core::mem::transmute(pinput.unwrap_or(core::mem::zeroed())), - reserved2, - core::mem::transmute(phnewcontext.unwrap_or(core::mem::zeroed())), - core::mem::transmute(poutput.unwrap_or(core::mem::zeroed())), - pfcontextattr, - core::mem::transmute(ptsexpiry.unwrap_or(core::mem::zeroed())), - ) - .ok() - } + unsafe { SspiInitializeSecurityContextAsyncW(asynccontext as _, phcredential.unwrap_or(core::mem::zeroed()) as _, phcontext.unwrap_or(core::mem::zeroed()) as _, psztargetname.unwrap_or(core::mem::zeroed()) as _, fcontextreq, reserved1, targetdatarep, pinput.unwrap_or(core::mem::zeroed()) as _, reserved2, phnewcontext.unwrap_or(core::mem::zeroed()) as _, poutput.unwrap_or(core::mem::zeroed()) as _, pfcontextattr, ptsexpiry.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn SspiReinitAsyncContext(handle: *mut super::super::Foundation::SspiAsyncContext) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ksecdd.sys" "system" fn SspiReinitAsyncContext(handle : *mut super::super::Foundation:: SspiAsyncContext) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { SspiReinitAsyncContext(core::mem::transmute(handle)) } + unsafe { SspiReinitAsyncContext(handle as _) } } #[cfg(feature = "Wdk_Foundation")] #[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); - unsafe { SspiSetAsyncNotifyCallback(context, callback, core::mem::transmute(callbackdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SspiSetAsyncNotifyCallback(context, callback, callbackdata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn VerifySignature(phcontext: *const SecHandle, pmessage: *const SecBufferDesc, messageseqno: u32) -> windows_core::Result { @@ -3743,7 +3664,7 @@ pub unsafe fn VerifySignature(phcontext: *const SecHandle, pmessage: *const SecB #[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: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, desiredaccess: u32, genericmapping: *const super::super::super::Win32::Security::GENERIC_MAPPING, objectcreation: bool, grantedaccess: *mut u32, accessstatus: *mut i32, generateonclose: *mut bool) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, grantedaccess : *mut u32, accessstatus : *mut i32, generateonclose : *mut bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwAccessCheckAndAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), objecttypename, objectname, securitydescriptor, desiredaccess, genericmapping, objectcreation, core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(generateonclose)) } + unsafe { ZwAccessCheckAndAuditAlarm(subsystemname, handleid.unwrap_or(core::mem::zeroed()) as _, objecttypename, objectname, securitydescriptor, desiredaccess, genericmapping, objectcreation, grantedaccess as _, accessstatus as _, generateonclose as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -3765,26 +3686,7 @@ pub unsafe fn ZwAccessCheckByTypeAndAuditAlarm( generateonclose: *mut bool, ) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, grantedaccess : *mut u32, accessstatus : *mut i32, generateonclose : *mut bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { - ZwAccessCheckByTypeAndAuditAlarm( - subsystemname, - core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), - objecttypename, - objectname, - securitydescriptor, - core::mem::transmute(principalselfsid.unwrap_or(core::mem::zeroed())), - desiredaccess, - audittype, - flags, - core::mem::transmute(objecttypelist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - objecttypelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - genericmapping, - objectcreation, - core::mem::transmute(grantedaccess), - core::mem::transmute(accessstatus), - core::mem::transmute(generateonclose), - ) - } + unsafe { ZwAccessCheckByTypeAndAuditAlarm(subsystemname, handleid.unwrap_or(core::mem::zeroed()) as _, objecttypename, objectname, securitydescriptor, principalselfsid.unwrap_or(core::mem::zeroed()) as _, desiredaccess, audittype, flags, core::mem::transmute(objecttypelist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), objecttypelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), genericmapping, objectcreation, grantedaccess as _, accessstatus as _, generateonclose as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -3807,7 +3709,7 @@ pub unsafe fn ZwAccessCheckByTypeResultListAndAuditAlarm( generateonclose: *mut bool, ) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, grantedaccess : *mut u32, accessstatus : *mut i32, generateonclose : *mut bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwAccessCheckByTypeResultListAndAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), objecttypename, objectname, securitydescriptor, core::mem::transmute(principalselfsid.unwrap_or(core::mem::zeroed())), desiredaccess, audittype, flags, core::mem::transmute(objecttypelist.unwrap_or(core::mem::zeroed())), objecttypelistlength, genericmapping, objectcreation, core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(generateonclose)) } + unsafe { ZwAccessCheckByTypeResultListAndAuditAlarm(subsystemname, handleid.unwrap_or(core::mem::zeroed()) as _, objecttypename, objectname, securitydescriptor, principalselfsid.unwrap_or(core::mem::zeroed()) as _, desiredaccess, audittype, flags, objecttypelist.unwrap_or(core::mem::zeroed()) as _, objecttypelistlength, genericmapping, objectcreation, grantedaccess as _, accessstatus as _, generateonclose as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -3831,71 +3733,59 @@ pub unsafe fn ZwAccessCheckByTypeResultListAndAuditAlarmByHandle( generateonclose: *mut bool, ) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, grantedaccess : *mut u32, accessstatus : *mut i32, generateonclose : *mut bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwAccessCheckByTypeResultListAndAuditAlarmByHandle(subsystemname, core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), clienttoken, objecttypename, objectname, securitydescriptor, core::mem::transmute(principalselfsid.unwrap_or(core::mem::zeroed())), desiredaccess, audittype, flags, core::mem::transmute(objecttypelist.unwrap_or(core::mem::zeroed())), objecttypelistlength, genericmapping, objectcreation, core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(generateonclose)) } + unsafe { ZwAccessCheckByTypeResultListAndAuditAlarmByHandle(subsystemname, handleid.unwrap_or(core::mem::zeroed()) as _, clienttoken, objecttypename, objectname, securitydescriptor, principalselfsid.unwrap_or(core::mem::zeroed()) as _, desiredaccess, audittype, flags, objecttypelist.unwrap_or(core::mem::zeroed()) as _, objecttypelistlength, genericmapping, objectcreation, grantedaccess as _, accessstatus as _, generateonclose as _) } } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn ZwAdjustGroupsToken(tokenhandle: super::super::super::Win32::Foundation::HANDLE, resettodefault: bool, 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 { windows_targets::link!("ntdll.dll" "system" fn ZwAdjustGroupsToken(tokenhandle : super::super::super::Win32::Foundation:: HANDLE, resettodefault : bool, 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); - unsafe { ZwAdjustGroupsToken(tokenhandle, resettodefault, core::mem::transmute(newstate.unwrap_or(core::mem::zeroed())), bufferlength, core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnlength)) } + unsafe { ZwAdjustGroupsToken(tokenhandle, resettodefault, newstate.unwrap_or(core::mem::zeroed()) as _, bufferlength, previousstate.unwrap_or(core::mem::zeroed()) as _, returnlength as _) } } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn ZwAdjustPrivilegesToken(tokenhandle: super::super::super::Win32::Foundation::HANDLE, disableallprivileges: bool, 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 { windows_targets::link!("ntdll.dll" "system" fn ZwAdjustPrivilegesToken(tokenhandle : super::super::super::Win32::Foundation:: HANDLE, disableallprivileges : bool, 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); - unsafe { ZwAdjustPrivilegesToken(tokenhandle, disableallprivileges, core::mem::transmute(newstate.unwrap_or(core::mem::zeroed())), bufferlength, core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwAdjustPrivilegesToken(tokenhandle, disableallprivileges, newstate.unwrap_or(core::mem::zeroed()) as _, bufferlength, previousstate.unwrap_or(core::mem::zeroed()) as _, returnlength.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { ZwAllocateVirtualMemory(processhandle, core::mem::transmute(baseaddress), zerobits, core::mem::transmute(regionsize), allocationtype, protect) } + unsafe { ZwAllocateVirtualMemory(processhandle, baseaddress as _, zerobits, regionsize as _, allocationtype, protect) } } #[cfg(feature = "Win32_System_Memory")] #[inline] 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); - unsafe { ZwAllocateVirtualMemoryEx(processhandle, core::mem::transmute(baseaddress), core::mem::transmute(regionsize), allocationtype, pageprotection, core::mem::transmute(extendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } + unsafe { ZwAllocateVirtualMemoryEx(processhandle, baseaddress as _, regionsize as _, allocationtype, pageprotection, core::mem::transmute(extendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { ZwCancelIoFileEx(filehandle, core::mem::transmute(iorequesttocancel.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock)) } + unsafe { ZwCancelIoFileEx(filehandle, iorequesttocancel.unwrap_or(core::mem::zeroed()) as _, iostatusblock as _) } } #[inline] pub unsafe fn ZwCloseObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, generateonclose: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwCloseObjectAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, generateonclose : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwCloseObjectAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), generateonclose) } + unsafe { ZwCloseObjectAuditAlarm(subsystemname, handleid.unwrap_or(core::mem::zeroed()) as _, generateonclose) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn ZwCreateDirectoryObject(directoryhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwCreateDirectoryObject(directoryhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwCreateDirectoryObject(core::mem::transmute(directoryhandle), desiredaccess, objectattributes) } + unsafe { ZwCreateDirectoryObject(directoryhandle as _, desiredaccess, objectattributes) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn ZwCreateEvent(eventhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, eventtype: super::super::super::Win32::System::Kernel::EVENT_TYPE, initialstate: bool) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwCreateEvent(core::mem::transmute(eventhandle), desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), eventtype, initialstate) } + unsafe { ZwCreateEvent(eventhandle as _, desiredaccess, objectattributes.unwrap_or(core::mem::zeroed()) as _, eventtype, initialstate) } } #[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: 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); - unsafe { - ZwCreateSectionEx( - core::mem::transmute(sectionhandle), - desiredaccess, - core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), - core::mem::transmute(maximumsize.unwrap_or(core::mem::zeroed())), - sectionpageprotection, - allocationattributes, - 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()), - ) - } + unsafe { ZwCreateSectionEx(sectionhandle as _, desiredaccess, objectattributes.unwrap_or(core::mem::zeroed()) as _, maximumsize.unwrap_or(core::mem::zeroed()) as _, sectionpageprotection, allocationattributes, filehandle.unwrap_or(core::mem::zeroed()) as _, 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(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -3906,53 +3796,53 @@ pub unsafe fn ZwDeleteFile(objectattributes: *const super::super::Foundation::OB #[inline] pub unsafe fn ZwDeleteObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, generateonclose: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwDeleteObjectAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, generateonclose : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwDeleteObjectAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), generateonclose) } + unsafe { ZwDeleteObjectAuditAlarm(subsystemname, handleid.unwrap_or(core::mem::zeroed()) as _, generateonclose) } } #[inline] 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); - unsafe { ZwDuplicateObject(sourceprocesshandle, sourcehandle, core::mem::transmute(targetprocesshandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(targethandle.unwrap_or(core::mem::zeroed())), desiredaccess, handleattributes, options) } + unsafe { ZwDuplicateObject(sourceprocesshandle, sourcehandle, targetprocesshandle.unwrap_or(core::mem::zeroed()) as _, targethandle.unwrap_or(core::mem::zeroed()) as _, desiredaccess, handleattributes, options) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn ZwDuplicateToken(existingtokenhandle: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, effectiveonly: bool, tokentype: super::super::super::Win32::Security::TOKEN_TYPE, newtokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, tokentype : super::super::super::Win32::Security:: TOKEN_TYPE, newtokenhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwDuplicateToken(existingtokenhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), effectiveonly, tokentype, core::mem::transmute(newtokenhandle)) } + unsafe { ZwDuplicateToken(existingtokenhandle, desiredaccess, objectattributes.unwrap_or(core::mem::zeroed()) as _, effectiveonly, tokentype, newtokenhandle as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { ZwFilterToken(existingtokenhandle, 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)) } + unsafe { ZwFilterToken(existingtokenhandle, flags, sidstodisable.unwrap_or(core::mem::zeroed()) as _, privilegestodelete.unwrap_or(core::mem::zeroed()) as _, restrictedsids.unwrap_or(core::mem::zeroed()) as _, newtokenhandle as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { ZwFlushBuffersFile(filehandle, core::mem::transmute(iostatusblock)) } + unsafe { ZwFlushBuffersFile(filehandle, iostatusblock as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { ZwFlushBuffersFileEx(filehandle, flags, parameters, parameterssize, core::mem::transmute(iostatusblock)) } + unsafe { ZwFlushBuffersFileEx(filehandle, flags, parameters, parameterssize, iostatusblock as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { ZwFlushVirtualMemory(processhandle, core::mem::transmute(baseaddress), core::mem::transmute(regionsize), core::mem::transmute(iostatus)) } + unsafe { ZwFlushVirtualMemory(processhandle, baseaddress as _, regionsize as _, iostatus as _) } } #[inline] 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); - unsafe { ZwFreeVirtualMemory(processhandle, core::mem::transmute(baseaddress), core::mem::transmute(regionsize), freetype) } + unsafe { ZwFreeVirtualMemory(processhandle, baseaddress as _, regionsize as _, freetype) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { ZwFsControlFile(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), fscontrolcode, core::mem::transmute(inputbuffer.unwrap_or(core::mem::zeroed())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(core::mem::zeroed())), outputbufferlength) } + unsafe { ZwFsControlFile(filehandle, event.unwrap_or(core::mem::zeroed()) as _, apcroutine.unwrap_or(core::mem::zeroed()) as _, apccontext.unwrap_or(core::mem::zeroed()) as _, iostatusblock as _, fscontrolcode, inputbuffer.unwrap_or(core::mem::zeroed()) as _, inputbufferlength, outputbuffer.unwrap_or(core::mem::zeroed()) as _, outputbufferlength) } } #[inline] pub unsafe fn ZwImpersonateAnonymousToken(threadhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -3963,57 +3853,57 @@ pub unsafe fn ZwImpersonateAnonymousToken(threadhandle: super::super::super::Win #[inline] 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: bool, exclusivelock: bool) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, exclusivelock : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwLockFile(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), byteoffset, length, key, failimmediately, exclusivelock) } + unsafe { ZwLockFile(filehandle, event.unwrap_or(core::mem::zeroed()) as _, apcroutine.unwrap_or(core::mem::zeroed()) as _, apccontext.unwrap_or(core::mem::zeroed()) as _, iostatusblock as _, byteoffset, length, key, failimmediately, exclusivelock) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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: bool, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, asynchronous: bool) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, buffer : *mut core::ffi::c_void, buffersize : u32, asynchronous : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwNotifyChangeKey(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), completionfilter, watchtree, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, asynchronous) } + unsafe { ZwNotifyChangeKey(keyhandle, event.unwrap_or(core::mem::zeroed()) as _, apcroutine.unwrap_or(core::mem::zeroed()) as _, apccontext.unwrap_or(core::mem::zeroed()) as _, iostatusblock as _, completionfilter, watchtree, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, asynchronous) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn ZwOpenDirectoryObject(directoryhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwOpenDirectoryObject(directoryhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwOpenDirectoryObject(core::mem::transmute(directoryhandle), desiredaccess, objectattributes) } + unsafe { ZwOpenDirectoryObject(directoryhandle as _, desiredaccess, objectattributes) } } #[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: Option, clienttoken: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, grantedaccess: u32, privileges: Option<*const super::super::super::Win32::Security::PRIVILEGE_SET>, objectcreation: bool, accessgranted: bool, generateonclose: *mut bool) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, accessgranted : bool, generateonclose : *mut bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwOpenObjectAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), objecttypename, objectname, core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), clienttoken, desiredaccess, grantedaccess, core::mem::transmute(privileges.unwrap_or(core::mem::zeroed())), objectcreation, accessgranted, core::mem::transmute(generateonclose)) } + unsafe { ZwOpenObjectAuditAlarm(subsystemname, handleid.unwrap_or(core::mem::zeroed()) as _, objecttypename, objectname, securitydescriptor.unwrap_or(core::mem::zeroed()) as _, clienttoken, desiredaccess, grantedaccess, privileges.unwrap_or(core::mem::zeroed()) as _, objectcreation, accessgranted, generateonclose as _) } } #[inline] 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); - unsafe { ZwOpenProcessToken(processhandle, desiredaccess, core::mem::transmute(tokenhandle)) } + unsafe { ZwOpenProcessToken(processhandle, desiredaccess, tokenhandle as _) } } #[inline] 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); - unsafe { ZwOpenProcessTokenEx(processhandle, desiredaccess, handleattributes, core::mem::transmute(tokenhandle)) } + unsafe { ZwOpenProcessTokenEx(processhandle, desiredaccess, handleattributes, tokenhandle as _) } } #[inline] pub unsafe fn ZwOpenThreadToken(threadhandle: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, openasself: bool, tokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwOpenThreadToken(threadhandle : super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, openasself : bool, tokenhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwOpenThreadToken(threadhandle, desiredaccess, openasself, core::mem::transmute(tokenhandle)) } + unsafe { ZwOpenThreadToken(threadhandle, desiredaccess, openasself, tokenhandle as _) } } #[inline] pub unsafe fn ZwOpenThreadTokenEx(threadhandle: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, openasself: bool, handleattributes: u32, tokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwOpenThreadTokenEx(threadhandle : super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, openasself : bool, handleattributes : u32, tokenhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwOpenThreadTokenEx(threadhandle, desiredaccess, openasself, handleattributes, core::mem::transmute(tokenhandle)) } + unsafe { ZwOpenThreadTokenEx(threadhandle, desiredaccess, openasself, handleattributes, tokenhandle as _) } } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn ZwPrivilegeCheck(clienttoken: super::super::super::Win32::Foundation::HANDLE, requiredprivileges: *mut super::super::super::Win32::Security::PRIVILEGE_SET, result: *mut bool) -> 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 bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwPrivilegeCheck(clienttoken, core::mem::transmute(requiredprivileges), core::mem::transmute(result)) } + unsafe { ZwPrivilegeCheck(clienttoken, requiredprivileges as _, result as _) } } #[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: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, privileges: *const super::super::super::Win32::Security::PRIVILEGE_SET, accessgranted: bool) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwPrivilegeObjectAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), clienttoken, desiredaccess, privileges, accessgranted) } + unsafe { ZwPrivilegeObjectAuditAlarm(subsystemname, handleid.unwrap_or(core::mem::zeroed()) as _, clienttoken, desiredaccess, privileges, accessgranted) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -4025,76 +3915,76 @@ pub unsafe fn ZwPrivilegedServiceAuditAlarm(subsystemname: *const super::super:: #[inline] 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: bool, filename: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, restartscan: bool) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, filename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, restartscan : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwQueryDirectoryFile(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), length, fileinformationclass, returnsingleentry, core::mem::transmute(filename.unwrap_or(core::mem::zeroed())), restartscan) } + unsafe { ZwQueryDirectoryFile(filehandle, event.unwrap_or(core::mem::zeroed()) as _, apcroutine.unwrap_or(core::mem::zeroed()) as _, apccontext.unwrap_or(core::mem::zeroed()) as _, iostatusblock as _, fileinformation as _, length, fileinformationclass, returnsingleentry, filename.unwrap_or(core::mem::zeroed()) as _, restartscan) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { ZwQueryDirectoryFileEx(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), length, fileinformationclass, queryflags, core::mem::transmute(filename.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwQueryDirectoryFileEx(filehandle, event.unwrap_or(core::mem::zeroed()) as _, apcroutine.unwrap_or(core::mem::zeroed()) as _, apccontext.unwrap_or(core::mem::zeroed()) as _, iostatusblock as _, fileinformation as _, length, fileinformationclass, queryflags, filename.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ZwQueryDirectoryObject(directoryhandle: super::super::super::Win32::Foundation::HANDLE, buffer: Option<*mut core::ffi::c_void>, length: u32, returnsingleentry: bool, restartscan: bool, context: *mut u32, returnlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwQueryDirectoryObject(directoryhandle : super::super::super::Win32::Foundation:: HANDLE, buffer : *mut core::ffi::c_void, length : u32, returnsingleentry : bool, restartscan : bool, context : *mut u32, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwQueryDirectoryObject(directoryhandle, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), length, returnsingleentry, restartscan, core::mem::transmute(context), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwQueryDirectoryObject(directoryhandle, buffer.unwrap_or(core::mem::zeroed()) as _, length, returnsingleentry, restartscan, context as _, returnlength.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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: bool, ealist: Option<*const core::ffi::c_void>, ealistlength: u32, eaindex: Option<*const u32>, restartscan: bool) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, ealist : *const core::ffi::c_void, ealistlength : u32, eaindex : *const u32, restartscan : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwQueryEaFile(filehandle, core::mem::transmute(iostatusblock), core::mem::transmute(buffer), length, returnsingleentry, core::mem::transmute(ealist.unwrap_or(core::mem::zeroed())), ealistlength, core::mem::transmute(eaindex.unwrap_or(core::mem::zeroed())), restartscan) } + unsafe { ZwQueryEaFile(filehandle, iostatusblock as _, buffer as _, length, returnsingleentry, ealist.unwrap_or(core::mem::zeroed()) as _, ealistlength, eaindex.unwrap_or(core::mem::zeroed()) as _, restartscan) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn ZwQueryFullAttributesFile(objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, fileinformation: *mut FILE_NETWORK_OPEN_INFORMATION) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwQueryFullAttributesFile(objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, fileinformation : *mut FILE_NETWORK_OPEN_INFORMATION) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwQueryFullAttributesFile(objectattributes, core::mem::transmute(fileinformation)) } + unsafe { ZwQueryFullAttributesFile(objectattributes, fileinformation as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { ZwQueryInformationToken(tokenhandle, tokeninformationclass, core::mem::transmute(tokeninformation.unwrap_or(core::mem::zeroed())), tokeninformationlength, core::mem::transmute(returnlength)) } + unsafe { ZwQueryInformationToken(tokenhandle, tokeninformationclass, tokeninformation.unwrap_or(core::mem::zeroed()) as _, tokeninformationlength, returnlength as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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); - unsafe { ZwQueryObject(core::mem::transmute(handle.unwrap_or(core::mem::zeroed())), objectinformationclass, core::mem::transmute(objectinformation.unwrap_or(core::mem::zeroed())), objectinformationlength, core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwQueryObject(handle.unwrap_or(core::mem::zeroed()) as _, objectinformationclass, objectinformation.unwrap_or(core::mem::zeroed()) as _, objectinformationlength, returnlength.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Win32_Security", feature = "Win32_System_IO"))] #[inline] 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: bool, sidlist: Option<*const core::ffi::c_void>, sidlistlength: u32, startsid: Option, restartscan: bool) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, sidlist : *const core::ffi::c_void, sidlistlength : u32, startsid : super::super::super::Win32::Security:: PSID, restartscan : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwQueryQuotaInformationFile(filehandle, core::mem::transmute(iostatusblock), core::mem::transmute(buffer), length, returnsingleentry, core::mem::transmute(sidlist.unwrap_or(core::mem::zeroed())), sidlistlength, core::mem::transmute(startsid.unwrap_or(core::mem::zeroed())), restartscan) } + unsafe { ZwQueryQuotaInformationFile(filehandle, iostatusblock as _, buffer as _, length, returnsingleentry, sidlist.unwrap_or(core::mem::zeroed()) as _, sidlistlength, startsid.unwrap_or(core::mem::zeroed()) as _, restartscan) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { ZwQuerySecurityObject(handle, securityinformation, core::mem::transmute(securitydescriptor), length, core::mem::transmute(lengthneeded)) } + unsafe { ZwQuerySecurityObject(handle, securityinformation, securitydescriptor as _, length, lengthneeded as _) } } #[inline] 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); - unsafe { ZwQueryVirtualMemory(processhandle, core::mem::transmute(baseaddress.unwrap_or(core::mem::zeroed())), memoryinformationclass, core::mem::transmute(memoryinformation), memoryinformationlength, core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwQueryVirtualMemory(processhandle, baseaddress.unwrap_or(core::mem::zeroed()) as _, memoryinformationclass, memoryinformation as _, memoryinformationlength, returnlength.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { ZwQueryVolumeInformationFile(filehandle, core::mem::transmute(iostatusblock), core::mem::transmute(fsinformation), length, fsinformationclass) } + unsafe { ZwQueryVolumeInformationFile(filehandle, iostatusblock as _, fsinformation as _, length, fsinformationclass) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { ZwSetEaFile(filehandle, core::mem::transmute(iostatusblock), buffer, length) } + unsafe { ZwSetEaFile(filehandle, iostatusblock as _, buffer, length) } } #[inline] 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); - unsafe { ZwSetEvent(eventhandle, core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwSetEvent(eventhandle, previousstate.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -4111,7 +4001,7 @@ pub unsafe fn ZwSetInformationVirtualMemory(processhandle: super::super::super:: #[inline] 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); - unsafe { ZwSetQuotaInformationFile(filehandle, core::mem::transmute(iostatusblock), buffer, length) } + unsafe { ZwSetQuotaInformationFile(filehandle, iostatusblock as _, buffer, length) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -4123,13 +4013,13 @@ pub unsafe fn ZwSetSecurityObject(handle: super::super::super::Win32::Foundation #[inline] 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); - unsafe { ZwSetVolumeInformationFile(filehandle, core::mem::transmute(iostatusblock), fsinformation, length, fsinformationclass) } + unsafe { ZwSetVolumeInformationFile(filehandle, iostatusblock as _, fsinformation, length, fsinformationclass) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { ZwUnlockFile(filehandle, core::mem::transmute(iostatusblock), byteoffset, length, key) } + unsafe { ZwUnlockFile(filehandle, iostatusblock as _, byteoffset, length, 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 3fb8444d0d..7ab5d6baa5 100644 --- a/crates/libs/windows/src/Windows/Wdk/System/IO/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/System/IO/mod.rs @@ -2,5 +2,5 @@ #[inline] 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); - unsafe { NtDeviceIoControlFile(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), iocontrolcode, core::mem::transmute(inputbuffer.unwrap_or(core::mem::zeroed())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(core::mem::zeroed())), outputbufferlength) } + unsafe { NtDeviceIoControlFile(filehandle, event.unwrap_or(core::mem::zeroed()) as _, apcroutine.unwrap_or(core::mem::zeroed()) as _, apccontext.unwrap_or(core::mem::zeroed()) as _, iostatusblock as _, iocontrolcode, inputbuffer.unwrap_or(core::mem::zeroed()) as _, inputbufferlength, outputbuffer.unwrap_or(core::mem::zeroed()) as _, 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 93261226c0..b99ae5cf07 100644 --- a/crates/libs/windows/src/Windows/Wdk/System/Memory/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/System/Memory/mod.rs @@ -1,34 +1,34 @@ #[inline] 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); - unsafe { NtMapViewOfSection(sectionhandle, processhandle, core::mem::transmute(baseaddress), zerobits, commitsize, core::mem::transmute(sectionoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(viewsize), inheritdisposition, allocationtype, win32protect) } + unsafe { NtMapViewOfSection(sectionhandle, processhandle, baseaddress as _, zerobits, commitsize, sectionoffset.unwrap_or(core::mem::zeroed()) as _, viewsize as _, inheritdisposition, allocationtype, win32protect) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn NtOpenSection(sectionhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtOpenSection(sectionhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtOpenSection(core::mem::transmute(sectionhandle), desiredaccess, objectattributes) } + unsafe { NtOpenSection(sectionhandle as _, desiredaccess, objectattributes) } } #[inline] 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); - unsafe { NtUnmapViewOfSection(processhandle, core::mem::transmute(baseaddress.unwrap_or(core::mem::zeroed()))) } + unsafe { NtUnmapViewOfSection(processhandle, baseaddress.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { ZwMapViewOfSection(sectionhandle, processhandle, core::mem::transmute(baseaddress), zerobits, commitsize, core::mem::transmute(sectionoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(viewsize), inheritdisposition, allocationtype, win32protect) } + unsafe { ZwMapViewOfSection(sectionhandle, processhandle, baseaddress as _, zerobits, commitsize, sectionoffset.unwrap_or(core::mem::zeroed()) as _, viewsize as _, inheritdisposition, allocationtype, win32protect) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn ZwOpenSection(sectionhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwOpenSection(sectionhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwOpenSection(core::mem::transmute(sectionhandle), desiredaccess, objectattributes) } + unsafe { ZwOpenSection(sectionhandle as _, desiredaccess, objectattributes) } } #[inline] 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); - unsafe { ZwUnmapViewOfSection(processhandle, core::mem::transmute(baseaddress.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwUnmapViewOfSection(processhandle, baseaddress.unwrap_or(core::mem::zeroed()) as _) } } #[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 16e8da4bef..5444f2c41a 100644 --- a/crates/libs/windows/src/Windows/Wdk/System/OfflineRegistry/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/System/OfflineRegistry/mod.rs @@ -11,7 +11,7 @@ pub unsafe fn ORCloseKey(keyhandle: ORHKEY) -> super::super::super::Win32::Found #[inline] pub unsafe fn ORCreateHive(horkey: *mut ORHKEY) -> super::super::super::Win32::Foundation::WIN32_ERROR { windows_targets::link!("offreg.dll" "system" fn ORCreateHive(horkey : *mut ORHKEY) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - unsafe { ORCreateHive(core::mem::transmute(horkey)) } + unsafe { ORCreateHive(horkey as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -21,7 +21,7 @@ where P2: 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); - unsafe { ORCreateKey(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()))) } + unsafe { ORCreateKey(keyhandle, lpsubkey.param().abi(), lpclass.param().abi(), dwoptions.unwrap_or(core::mem::zeroed()) as _, psecuritydescriptor.unwrap_or(core::mem::zeroed()) as _, phkresult as _, pdwdisposition.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ORDeleteKey(handle: ORHKEY, lpsubkey: P1) -> super::super::super::Win32::Foundation::WIN32_ERROR @@ -42,18 +42,18 @@ where #[inline] 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); - unsafe { OREnumKey(handle, 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()))) } + unsafe { OREnumKey(handle, dwindex, core::mem::transmute(lpname), lpcname as _, lpclass.unwrap_or(core::mem::zeroed()) as _, lpcclass.unwrap_or(core::mem::zeroed()) as _, lpftlastwritetime.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { OREnumValue(handle, 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()))) } + unsafe { OREnumValue(handle, dwindex, core::mem::transmute(lpvaluename), lpcvaluename as _, lptype.unwrap_or(core::mem::zeroed()) as _, lpdata.unwrap_or(core::mem::zeroed()) as _, lpcbdata.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { ORGetKeySecurity(handle, securityinformation, core::mem::transmute(psecuritydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbsecuritydescriptor)) } + unsafe { ORGetKeySecurity(handle, securityinformation, psecuritydescriptor.unwrap_or(core::mem::zeroed()) as _, lpcbsecuritydescriptor as _) } } #[inline] 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 @@ -62,22 +62,22 @@ where P2: windows_core::Param, { windows_targets::link!("offreg.dll" "system" fn ORGetValue(handle : ORHKEY, lpsubkey : windows_core::PCWSTR, lpvalue : windows_core::PCWSTR, pdwtype : *mut u32, pvdata : *mut core::ffi::c_void, pcbdata : *mut u32) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - unsafe { ORGetValue(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()))) } + unsafe { ORGetValue(handle, lpsubkey.param().abi(), lpvalue.param().abi(), pdwtype.unwrap_or(core::mem::zeroed()) as _, pvdata.unwrap_or(core::mem::zeroed()) as _, pcbdata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ORGetVersion(pdwmajorversion: *mut u32, pdwminorversion: *mut u32) -> super::super::super::Win32::Foundation::WIN32_ERROR { windows_targets::link!("offreg.dll" "system" fn ORGetVersion(pdwmajorversion : *mut u32, pdwminorversion : *mut u32) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - unsafe { ORGetVersion(core::mem::transmute(pdwmajorversion), core::mem::transmute(pdwminorversion)) } + unsafe { ORGetVersion(pdwmajorversion as _, pdwminorversion as _) } } #[inline] 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); - unsafe { ORGetVirtualFlags(handle, core::mem::transmute(pdwflags)) } + unsafe { ORGetVirtualFlags(handle, pdwflags as _) } } #[inline] pub unsafe fn ORMergeHives(hivehandles: &[ORHKEY], phkresult: *mut ORHKEY) -> super::super::super::Win32::Foundation::WIN32_ERROR { windows_targets::link!("offreg.dll" "system" fn ORMergeHives(hivehandles : *const ORHKEY, hivecount : u32, phkresult : *mut ORHKEY) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - unsafe { ORMergeHives(core::mem::transmute(hivehandles.as_ptr()), hivehandles.len().try_into().unwrap(), core::mem::transmute(phkresult)) } + unsafe { ORMergeHives(core::mem::transmute(hivehandles.as_ptr()), hivehandles.len().try_into().unwrap(), phkresult as _) } } #[inline] pub unsafe fn OROpenHive(filepath: P0, horkey: *mut ORHKEY) -> super::super::super::Win32::Foundation::WIN32_ERROR @@ -85,12 +85,12 @@ where P0: windows_core::Param, { windows_targets::link!("offreg.dll" "system" fn OROpenHive(filepath : windows_core::PCWSTR, horkey : *mut ORHKEY) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - unsafe { OROpenHive(filepath.param().abi(), core::mem::transmute(horkey)) } + unsafe { OROpenHive(filepath.param().abi(), horkey as _) } } #[inline] 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); - unsafe { OROpenHiveByHandle(filehandle, core::mem::transmute(horkey)) } + unsafe { OROpenHiveByHandle(filehandle, horkey as _) } } #[inline] pub unsafe fn OROpenKey(handle: ORHKEY, lpsubkey: P1, phkresult: *mut ORHKEY) -> super::super::super::Win32::Foundation::WIN32_ERROR @@ -98,7 +98,7 @@ where 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); - unsafe { OROpenKey(handle, lpsubkey.param().abi(), core::mem::transmute(phkresult)) } + unsafe { OROpenKey(handle, lpsubkey.param().abi(), phkresult as _) } } #[inline] 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 { @@ -106,16 +106,16 @@ pub unsafe fn ORQueryInfoKey(handle: ORHKEY, lpclass: 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); - unsafe { NtCreateKey(core::mem::transmute(keyhandle), desiredaccess, objectattributes, core::mem::transmute(titleindex.unwrap_or(core::mem::zeroed())), core::mem::transmute(class.unwrap_or(core::mem::zeroed())), createoptions, core::mem::transmute(disposition.unwrap_or(core::mem::zeroed()))) } + unsafe { NtCreateKey(keyhandle as _, desiredaccess, objectattributes, titleindex.unwrap_or(core::mem::zeroed()) as _, class.unwrap_or(core::mem::zeroed()) as _, createoptions, disposition.unwrap_or(core::mem::zeroed()) as _) } } #[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: 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); - unsafe { NtCreateKeyTransacted(core::mem::transmute(keyhandle), desiredaccess, objectattributes, core::mem::transmute(titleindex.unwrap_or(core::mem::zeroed())), core::mem::transmute(class.unwrap_or(core::mem::zeroed())), createoptions, transactionhandle, core::mem::transmute(disposition.unwrap_or(core::mem::zeroed()))) } + unsafe { NtCreateKeyTransacted(keyhandle as _, desiredaccess, objectattributes, titleindex.unwrap_or(core::mem::zeroed()) as _, class.unwrap_or(core::mem::zeroed()) as _, createoptions, transactionhandle, disposition.unwrap_or(core::mem::zeroed()) as _) } } #[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: 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); - unsafe { NtCreateRegistryTransaction(core::mem::transmute(transactionhandle), desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(createoptions.unwrap_or(core::mem::zeroed()))) } + unsafe { NtCreateRegistryTransaction(transactionhandle as _, desiredaccess, objectattributes.unwrap_or(core::mem::zeroed()) as _, createoptions.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NtDeleteKey(keyhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -34,12 +34,12 @@ pub unsafe fn NtDeleteValueKey(keyhandle: super::super::super::Win32::Foundation #[inline] 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); - unsafe { NtEnumerateKey(keyhandle, index, keyinformationclass, core::mem::transmute(keyinformation.unwrap_or(core::mem::zeroed())), length, core::mem::transmute(resultlength)) } + unsafe { NtEnumerateKey(keyhandle, index, keyinformationclass, keyinformation.unwrap_or(core::mem::zeroed()) as _, length, resultlength as _) } } #[inline] 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); - unsafe { NtEnumerateValueKey(keyhandle, index, keyvalueinformationclass, core::mem::transmute(keyvalueinformation.unwrap_or(core::mem::zeroed())), length, core::mem::transmute(resultlength)) } + unsafe { NtEnumerateValueKey(keyhandle, index, keyvalueinformationclass, keyvalueinformation.unwrap_or(core::mem::zeroed()) as _, length, resultlength as _) } } #[inline] pub unsafe fn NtFlushKey(keyhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -50,67 +50,52 @@ pub unsafe fn NtFlushKey(keyhandle: super::super::super::Win32::Foundation::HAND #[inline] 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: bool, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, asynchronous: bool) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, buffer : *mut core::ffi::c_void, buffersize : u32, asynchronous : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { - NtNotifyChangeMultipleKeys( - 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())), - 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), - completionfilter, - watchtree, - core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), - buffersize, - asynchronous, - ) - } + unsafe { NtNotifyChangeMultipleKeys(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.unwrap_or(core::mem::zeroed()) as _, apcroutine.unwrap_or(core::mem::zeroed()) as _, apccontext.unwrap_or(core::mem::zeroed()) as _, iostatusblock as _, completionfilter, watchtree, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, asynchronous) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn NtOpenKey(keyhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtOpenKey(keyhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtOpenKey(core::mem::transmute(keyhandle), desiredaccess, objectattributes) } + unsafe { NtOpenKey(keyhandle as _, desiredaccess, objectattributes) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn NtOpenKeyEx(keyhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, openoptions: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtOpenKeyEx(keyhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, openoptions : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtOpenKeyEx(core::mem::transmute(keyhandle), desiredaccess, objectattributes, openoptions) } + unsafe { NtOpenKeyEx(keyhandle as _, desiredaccess, objectattributes, openoptions) } } #[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: 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); - unsafe { NtOpenKeyTransacted(core::mem::transmute(keyhandle), desiredaccess, objectattributes, transactionhandle) } + unsafe { NtOpenKeyTransacted(keyhandle as _, desiredaccess, objectattributes, 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: 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); - unsafe { NtOpenKeyTransactedEx(core::mem::transmute(keyhandle), desiredaccess, objectattributes, openoptions, transactionhandle) } + unsafe { NtOpenKeyTransactedEx(keyhandle as _, desiredaccess, objectattributes, openoptions, transactionhandle) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn NtOpenRegistryTransaction(transactionhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtOpenRegistryTransaction(transactionhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtOpenRegistryTransaction(core::mem::transmute(transactionhandle), desiredaccess, objectattributes) } + unsafe { NtOpenRegistryTransaction(transactionhandle as _, desiredaccess, objectattributes) } } #[inline] 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); - unsafe { NtQueryKey(keyhandle, keyinformationclass, core::mem::transmute(keyinformation.unwrap_or(core::mem::zeroed())), length, core::mem::transmute(resultlength)) } + unsafe { NtQueryKey(keyhandle, keyinformationclass, keyinformation.unwrap_or(core::mem::zeroed()) as _, length, resultlength as _) } } #[inline] 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); - unsafe { NtQueryMultipleValueKey(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()))) } + unsafe { NtQueryMultipleValueKey(keyhandle, core::mem::transmute(valueentries.as_ptr()), valueentries.len().try_into().unwrap(), valuebuffer as _, bufferlength as _, requiredbufferlength.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { NtQueryValueKey(keyhandle, valuename, keyvalueinformationclass, core::mem::transmute(keyvalueinformation.unwrap_or(core::mem::zeroed())), length, core::mem::transmute(resultlength)) } + unsafe { NtQueryValueKey(keyhandle, valuename, keyvalueinformationclass, keyvalueinformation.unwrap_or(core::mem::zeroed()) as _, length, resultlength as _) } } #[inline] 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 { @@ -120,7 +105,7 @@ pub unsafe fn NtRenameKey(keyhandle: super::super::super::Win32::Foundation::HAN #[inline] 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); - unsafe { NtRestoreKey(keyhandle, core::mem::transmute(filehandle.unwrap_or(core::mem::zeroed())), flags) } + unsafe { NtRestoreKey(keyhandle, filehandle.unwrap_or(core::mem::zeroed()) as _, flags) } } #[inline] pub unsafe fn NtRollbackRegistryTransaction(transactionhandle: super::super::super::Win32::Foundation::HANDLE, flags: u32) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -145,7 +130,7 @@ pub unsafe fn NtSetInformationKey(keyhandle: super::super::super::Win32::Foundat #[inline] 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); - unsafe { NtSetValueKey(keyhandle, valuename, core::mem::transmute(titleindex.unwrap_or(core::mem::zeroed())), r#type, core::mem::transmute(data.unwrap_or(core::mem::zeroed())), datasize) } + unsafe { NtSetValueKey(keyhandle, valuename, titleindex.unwrap_or(core::mem::zeroed()) as _, r#type, data.unwrap_or(core::mem::zeroed()) as _, datasize) } } #[inline] pub unsafe fn ZwCommitRegistryTransaction(transactionhandle: super::super::super::Win32::Foundation::HANDLE, flags: u32) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -156,19 +141,19 @@ pub unsafe fn ZwCommitRegistryTransaction(transactionhandle: super::super::super #[inline] 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); - unsafe { ZwCreateKey(core::mem::transmute(keyhandle), desiredaccess, objectattributes, core::mem::transmute(titleindex.unwrap_or(core::mem::zeroed())), core::mem::transmute(class.unwrap_or(core::mem::zeroed())), createoptions, core::mem::transmute(disposition.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwCreateKey(keyhandle as _, desiredaccess, objectattributes, titleindex.unwrap_or(core::mem::zeroed()) as _, class.unwrap_or(core::mem::zeroed()) as _, createoptions, disposition.unwrap_or(core::mem::zeroed()) as _) } } #[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: 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); - unsafe { ZwCreateKeyTransacted(core::mem::transmute(keyhandle), desiredaccess, objectattributes, core::mem::transmute(titleindex.unwrap_or(core::mem::zeroed())), core::mem::transmute(class.unwrap_or(core::mem::zeroed())), createoptions, transactionhandle, core::mem::transmute(disposition.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwCreateKeyTransacted(keyhandle as _, desiredaccess, objectattributes, titleindex.unwrap_or(core::mem::zeroed()) as _, class.unwrap_or(core::mem::zeroed()) as _, createoptions, transactionhandle, disposition.unwrap_or(core::mem::zeroed()) as _) } } #[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: 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); - unsafe { ZwCreateRegistryTransaction(core::mem::transmute(transactionhandle), desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(createoptions.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwCreateRegistryTransaction(transactionhandle as _, desiredaccess, objectattributes.unwrap_or(core::mem::zeroed()) as _, createoptions.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ZwDeleteKey(keyhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -183,12 +168,12 @@ pub unsafe fn ZwDeleteValueKey(keyhandle: super::super::super::Win32::Foundation #[inline] 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); - unsafe { ZwEnumerateKey(keyhandle, index, keyinformationclass, core::mem::transmute(keyinformation.unwrap_or(core::mem::zeroed())), length, core::mem::transmute(resultlength)) } + unsafe { ZwEnumerateKey(keyhandle, index, keyinformationclass, keyinformation.unwrap_or(core::mem::zeroed()) as _, length, resultlength as _) } } #[inline] 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); - unsafe { ZwEnumerateValueKey(keyhandle, index, keyvalueinformationclass, core::mem::transmute(keyvalueinformation.unwrap_or(core::mem::zeroed())), length, core::mem::transmute(resultlength)) } + unsafe { ZwEnumerateValueKey(keyhandle, index, keyvalueinformationclass, keyvalueinformation.unwrap_or(core::mem::zeroed()) as _, length, resultlength as _) } } #[inline] pub unsafe fn ZwFlushKey(keyhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -199,67 +184,52 @@ pub unsafe fn ZwFlushKey(keyhandle: super::super::super::Win32::Foundation::HAND #[inline] 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: bool, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, asynchronous: bool) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, buffer : *mut core::ffi::c_void, buffersize : u32, asynchronous : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { - ZwNotifyChangeMultipleKeys( - 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())), - 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), - completionfilter, - watchtree, - core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), - buffersize, - asynchronous, - ) - } + unsafe { ZwNotifyChangeMultipleKeys(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.unwrap_or(core::mem::zeroed()) as _, apcroutine.unwrap_or(core::mem::zeroed()) as _, apccontext.unwrap_or(core::mem::zeroed()) as _, iostatusblock as _, completionfilter, watchtree, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, asynchronous) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn ZwOpenKey(keyhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwOpenKey(keyhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwOpenKey(core::mem::transmute(keyhandle), desiredaccess, objectattributes) } + unsafe { ZwOpenKey(keyhandle as _, desiredaccess, objectattributes) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn ZwOpenKeyEx(keyhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, openoptions: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwOpenKeyEx(keyhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, openoptions : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwOpenKeyEx(core::mem::transmute(keyhandle), desiredaccess, objectattributes, openoptions) } + unsafe { ZwOpenKeyEx(keyhandle as _, desiredaccess, objectattributes, openoptions) } } #[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: 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); - unsafe { ZwOpenKeyTransacted(core::mem::transmute(keyhandle), desiredaccess, objectattributes, transactionhandle) } + unsafe { ZwOpenKeyTransacted(keyhandle as _, desiredaccess, objectattributes, 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: 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); - unsafe { ZwOpenKeyTransactedEx(core::mem::transmute(keyhandle), desiredaccess, objectattributes, openoptions, transactionhandle) } + unsafe { ZwOpenKeyTransactedEx(keyhandle as _, desiredaccess, objectattributes, openoptions, transactionhandle) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn ZwOpenRegistryTransaction(transactionhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwOpenRegistryTransaction(transactionhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwOpenRegistryTransaction(core::mem::transmute(transactionhandle), desiredaccess, objectattributes) } + unsafe { ZwOpenRegistryTransaction(transactionhandle as _, desiredaccess, objectattributes) } } #[inline] 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); - unsafe { ZwQueryKey(keyhandle, keyinformationclass, core::mem::transmute(keyinformation.unwrap_or(core::mem::zeroed())), length, core::mem::transmute(resultlength)) } + unsafe { ZwQueryKey(keyhandle, keyinformationclass, keyinformation.unwrap_or(core::mem::zeroed()) as _, length, resultlength as _) } } #[inline] 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); - unsafe { ZwQueryMultipleValueKey(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()))) } + unsafe { ZwQueryMultipleValueKey(keyhandle, core::mem::transmute(valueentries.as_ptr()), valueentries.len().try_into().unwrap(), valuebuffer as _, bufferlength as _, requiredbufferlength.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { ZwQueryValueKey(keyhandle, valuename, keyvalueinformationclass, core::mem::transmute(keyvalueinformation.unwrap_or(core::mem::zeroed())), length, core::mem::transmute(resultlength)) } + unsafe { ZwQueryValueKey(keyhandle, valuename, keyvalueinformationclass, keyvalueinformation.unwrap_or(core::mem::zeroed()) as _, length, resultlength as _) } } #[inline] 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 { @@ -269,7 +239,7 @@ pub unsafe fn ZwRenameKey(keyhandle: super::super::super::Win32::Foundation::HAN #[inline] 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); - unsafe { ZwRestoreKey(keyhandle, core::mem::transmute(filehandle.unwrap_or(core::mem::zeroed())), flags) } + unsafe { ZwRestoreKey(keyhandle, filehandle.unwrap_or(core::mem::zeroed()) as _, flags) } } #[inline] pub unsafe fn ZwRollbackRegistryTransaction(transactionhandle: super::super::super::Win32::Foundation::HANDLE, flags: u32) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -294,7 +264,7 @@ pub unsafe fn ZwSetInformationKey(keyhandle: super::super::super::Win32::Foundat #[inline] 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); - unsafe { ZwSetValueKey(keyhandle, valuename, core::mem::transmute(titleindex.unwrap_or(core::mem::zeroed())), r#type, core::mem::transmute(data.unwrap_or(core::mem::zeroed())), datasize) } + unsafe { ZwSetValueKey(keyhandle, valuename, titleindex.unwrap_or(core::mem::zeroed()) as _, r#type, data.unwrap_or(core::mem::zeroed()) as _, datasize) } } #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] diff --git a/crates/libs/windows/src/Windows/Wdk/System/SystemInformation/mod.rs b/crates/libs/windows/src/Windows/Wdk/System/SystemInformation/mod.rs index 55b79be934..654ea49d95 100644 --- a/crates/libs/windows/src/Windows/Wdk/System/SystemInformation/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/System/SystemInformation/mod.rs @@ -1,32 +1,32 @@ #[inline] pub unsafe fn NtQuerySystemInformation(systeminformationclass: SYSTEM_INFORMATION_CLASS, systeminformation: *mut core::ffi::c_void, systeminformationlength: u32, returnlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtQuerySystemInformation(systeminformationclass : SYSTEM_INFORMATION_CLASS, systeminformation : *mut core::ffi::c_void, systeminformationlength : u32, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtQuerySystemInformation(systeminformationclass, core::mem::transmute(systeminformation), systeminformationlength, core::mem::transmute(returnlength)) } + unsafe { NtQuerySystemInformation(systeminformationclass, systeminformation as _, systeminformationlength, returnlength as _) } } #[inline] pub unsafe fn NtQuerySystemTime(systemtime: *mut i64) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtQuerySystemTime(systemtime : *mut i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtQuerySystemTime(core::mem::transmute(systemtime)) } + unsafe { NtQuerySystemTime(systemtime as _) } } #[inline] pub unsafe fn NtQueryTimerResolution(maximumtime: *mut u32, minimumtime: *mut u32, currenttime: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtQueryTimerResolution(maximumtime : *mut u32, minimumtime : *mut u32, currenttime : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtQueryTimerResolution(core::mem::transmute(maximumtime), core::mem::transmute(minimumtime), core::mem::transmute(currenttime)) } + unsafe { NtQueryTimerResolution(maximumtime as _, minimumtime as _, currenttime as _) } } #[inline] pub unsafe fn ZwQuerySystemInformation(systeminformationclass: SYSTEM_INFORMATION_CLASS, systeminformation: *mut core::ffi::c_void, systeminformationlength: u32, returnlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwQuerySystemInformation(systeminformationclass : SYSTEM_INFORMATION_CLASS, systeminformation : *mut core::ffi::c_void, systeminformationlength : u32, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwQuerySystemInformation(systeminformationclass, core::mem::transmute(systeminformation), systeminformationlength, core::mem::transmute(returnlength)) } + unsafe { ZwQuerySystemInformation(systeminformationclass, systeminformation as _, systeminformationlength, returnlength as _) } } #[inline] pub unsafe fn ZwQuerySystemTime(systemtime: *mut i64) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwQuerySystemTime(systemtime : *mut i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwQuerySystemTime(core::mem::transmute(systemtime)) } + unsafe { ZwQuerySystemTime(systemtime as _) } } #[inline] pub unsafe fn ZwQueryTimerResolution(maximumtime: *mut u32, minimumtime: *mut u32, currenttime: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwQueryTimerResolution(maximumtime : *mut u32, minimumtime : *mut u32, currenttime : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwQueryTimerResolution(core::mem::transmute(maximumtime), core::mem::transmute(minimumtime), core::mem::transmute(currenttime)) } + unsafe { ZwQueryTimerResolution(maximumtime as _, minimumtime as _, currenttime as _) } } #[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 c5f231da2a..86a3903b49 100644 --- a/crates/libs/windows/src/Windows/Wdk/System/SystemServices/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/System/SystemServices/mod.rs @@ -8,18 +8,18 @@ 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); - unsafe { ClfsAddLogContainerSet(plfolog, rguszcontainerpath.len().try_into().unwrap(), core::mem::transmute(pcbcontainer.unwrap_or(core::mem::zeroed())), core::mem::transmute(rguszcontainerpath.as_ptr())) } + unsafe { ClfsAddLogContainerSet(plfolog, rguszcontainerpath.len().try_into().unwrap(), pcbcontainer.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(rguszcontainerpath.as_ptr())) } } #[cfg(feature = "Win32_Storage_FileSystem")] #[inline] pub unsafe fn ClfsAdvanceLogBase(pvmarshalcontext: *mut core::ffi::c_void, plsnbase: *const super::super::super::Win32::Storage::FileSystem::CLS_LSN, fflags: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("clfs.sys" "system" fn ClfsAdvanceLogBase(pvmarshalcontext : *mut core::ffi::c_void, plsnbase : *const super::super::super::Win32::Storage::FileSystem:: CLS_LSN, fflags : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ClfsAdvanceLogBase(core::mem::transmute(pvmarshalcontext), plsnbase, fflags) } + unsafe { ClfsAdvanceLogBase(pvmarshalcontext as _, plsnbase, fflags) } } #[inline] pub unsafe fn ClfsAlignReservedLog(pvmarshalcontext: *const core::ffi::c_void, rgcbreservation: &[i64], pcbalignreservation: *mut i64) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("clfs.sys" "system" fn ClfsAlignReservedLog(pvmarshalcontext : *const core::ffi::c_void, crecords : u32, rgcbreservation : *const i64, pcbalignreservation : *mut i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ClfsAlignReservedLog(pvmarshalcontext, rgcbreservation.len().try_into().unwrap(), core::mem::transmute(rgcbreservation.as_ptr()), core::mem::transmute(pcbalignreservation)) } + unsafe { ClfsAlignReservedLog(pvmarshalcontext, rgcbreservation.len().try_into().unwrap(), core::mem::transmute(rgcbreservation.as_ptr()), pcbalignreservation as _) } } #[inline] pub unsafe fn ClfsAllocReservedLog(pvmarshalcontext: *const core::ffi::c_void, pcbadjustment: &[i64]) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -42,25 +42,25 @@ pub unsafe fn ClfsCloseLogFileObject(plfolog: *const super::super::Foundation::F #[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: 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); - unsafe { ClfsCreateLogFile(core::mem::transmute(pplfolog), puszlogfilename, fdesiredaccess, dwsharemode, core::mem::transmute(psdlogfile.unwrap_or(core::mem::zeroed())), fcreatedisposition, fcreateoptions, fflagsandattributes, flogoptionflag, core::mem::transmute(pvcontext.unwrap_or(core::mem::zeroed())), cbcontext) } + unsafe { ClfsCreateLogFile(pplfolog as _, puszlogfilename, fdesiredaccess, dwsharemode, psdlogfile.unwrap_or(core::mem::zeroed()) as _, fcreatedisposition, fcreateoptions, fflagsandattributes, flogoptionflag, pvcontext.unwrap_or(core::mem::zeroed()) as _, 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: 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); - unsafe { ClfsCreateMarshallingArea(plfolog, epooltype, core::mem::transmute(pfnallocbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfnfreebuffer.unwrap_or(core::mem::zeroed())), cbmarshallingbuffer, cmaxwritebuffers, cmaxreadbuffers, core::mem::transmute(ppvmarshalcontext)) } + unsafe { ClfsCreateMarshallingArea(plfolog, epooltype, pfnallocbuffer.unwrap_or(core::mem::zeroed()) as _, pfnfreebuffer.unwrap_or(core::mem::zeroed()) as _, cbmarshallingbuffer, cmaxwritebuffers, cmaxreadbuffers, ppvmarshalcontext as _) } } #[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: 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); - unsafe { ClfsCreateMarshallingAreaEx(plfolog, epooltype, core::mem::transmute(pfnallocbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfnfreebuffer.unwrap_or(core::mem::zeroed())), cbmarshallingbuffer, cmaxwritebuffers, cmaxreadbuffers, calignmentsize, fflags, core::mem::transmute(ppvmarshalcontext)) } + unsafe { ClfsCreateMarshallingAreaEx(plfolog, epooltype, pfnallocbuffer.unwrap_or(core::mem::zeroed()) as _, pfnfreebuffer.unwrap_or(core::mem::zeroed()) as _, cbmarshallingbuffer, cmaxwritebuffers, cmaxreadbuffers, calignmentsize, fflags, ppvmarshalcontext as _) } } #[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 ClfsCreateScanContext(plfolog: *const super::super::Foundation::FILE_OBJECT, cfromcontainer: u32, ccontainers: u32, escanmode: u8, pcxscan: *mut super::super::super::Win32::Storage::FileSystem::CLS_SCAN_CONTEXT) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("clfs.sys" "system" fn ClfsCreateScanContext(plfolog : *const super::super::Foundation:: FILE_OBJECT, cfromcontainer : u32, ccontainers : u32, escanmode : u8, pcxscan : *mut super::super::super::Win32::Storage::FileSystem:: CLS_SCAN_CONTEXT) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ClfsCreateScanContext(plfolog, cfromcontainer, ccontainers, escanmode, core::mem::transmute(pcxscan)) } + unsafe { ClfsCreateScanContext(plfolog, cfromcontainer, ccontainers, escanmode, pcxscan as _) } } #[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] @@ -71,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); - unsafe { ClfsDeleteLogFile(puszlogfilename, core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), flogoptionflag, core::mem::transmute(pvcontext.unwrap_or(core::mem::zeroed())), cbcontext) } + unsafe { ClfsDeleteLogFile(puszlogfilename, pvreserved.unwrap_or(core::mem::zeroed()) as _, flogoptionflag, pvcontext.unwrap_or(core::mem::zeroed()) as _, cbcontext) } } #[inline] pub unsafe fn ClfsDeleteMarshallingArea(pvmarshalcontext: *const core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -98,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); - unsafe { ClfsFlushToLsn(pvmarshalcontext, plsnflush, core::mem::transmute(plsnlastflushed.unwrap_or(core::mem::zeroed()))) } + unsafe { ClfsFlushToLsn(pvmarshalcontext, plsnflush, plsnlastflushed.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ClfsFreeReservedLog(pvmarshalcontext: *const core::ffi::c_void, pcbadjustment: &[i64]) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -109,19 +109,19 @@ 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); - unsafe { ClfsGetContainerName(plfolog, cidlogicalcontainer, core::mem::transmute(puszcontainername), core::mem::transmute(pcactuallencontainername.unwrap_or(core::mem::zeroed()))) } + unsafe { ClfsGetContainerName(plfolog, cidlogicalcontainer, puszcontainername as _, pcactuallencontainername.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { ClfsGetIoStatistics(plfolog, core::mem::transmute(pvstatsbuffer), cbstatsbuffer, estatsclass, core::mem::transmute(pcbstatswritten.unwrap_or(core::mem::zeroed()))) } + unsafe { ClfsGetIoStatistics(plfolog, pvstatsbuffer as _, cbstatsbuffer, estatsclass, pcbstatswritten.unwrap_or(core::mem::zeroed()) as _) } } #[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 ClfsGetLogFileInformation(plfolog: *const super::super::Foundation::FILE_OBJECT, pinfobuffer: *mut super::super::super::Win32::Storage::FileSystem::CLS_INFORMATION, pcbinfobuffer: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("clfs.sys" "system" fn ClfsGetLogFileInformation(plfolog : *const super::super::Foundation:: FILE_OBJECT, pinfobuffer : *mut super::super::super::Win32::Storage::FileSystem:: CLS_INFORMATION, pcbinfobuffer : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ClfsGetLogFileInformation(plfolog, core::mem::transmute(pinfobuffer), core::mem::transmute(pcbinfobuffer)) } + unsafe { ClfsGetLogFileInformation(plfolog, pinfobuffer as _, pcbinfobuffer as _) } } #[inline] pub unsafe fn ClfsInitialize() -> super::super::super::Win32::Foundation::NTSTATUS { @@ -156,7 +156,7 @@ pub unsafe fn ClfsLsnCreate(cidcontainer: u32, offblock: u32, crecord: u32) -> s #[inline] pub unsafe fn ClfsLsnDifference(plsnstart: *const super::super::super::Win32::Storage::FileSystem::CLS_LSN, plsnfinish: *const super::super::super::Win32::Storage::FileSystem::CLS_LSN, cbcontainer: u32, cbmaxblock: u32, pcbdifference: *mut i64) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("clfs.sys" "system" fn ClfsLsnDifference(plsnstart : *const super::super::super::Win32::Storage::FileSystem:: CLS_LSN, plsnfinish : *const super::super::super::Win32::Storage::FileSystem:: CLS_LSN, cbcontainer : u32, cbmaxblock : u32, pcbdifference : *mut i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ClfsLsnDifference(plsnstart, plsnfinish, cbcontainer, cbmaxblock, core::mem::transmute(pcbdifference)) } + unsafe { ClfsLsnDifference(plsnstart, plsnfinish, cbcontainer, cbmaxblock, pcbdifference as _) } } #[cfg(feature = "Win32_Storage_FileSystem")] #[inline] @@ -214,13 +214,13 @@ pub unsafe fn ClfsMgmtInstallPolicy(logfile: *const super::super::Foundation::FI #[inline] pub unsafe fn ClfsMgmtQueryPolicy(logfile: *const super::super::Foundation::FILE_OBJECT, policytype: super::super::super::Win32::Storage::FileSystem::CLFS_MGMT_POLICY_TYPE, policy: *mut super::super::super::Win32::Storage::FileSystem::CLFS_MGMT_POLICY, policylength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("clfs.sys" "system" fn ClfsMgmtQueryPolicy(logfile : *const super::super::Foundation:: FILE_OBJECT, policytype : super::super::super::Win32::Storage::FileSystem:: CLFS_MGMT_POLICY_TYPE, policy : *mut super::super::super::Win32::Storage::FileSystem:: CLFS_MGMT_POLICY, policylength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ClfsMgmtQueryPolicy(logfile, policytype, core::mem::transmute(policy), core::mem::transmute(policylength)) } + unsafe { ClfsMgmtQueryPolicy(logfile, policytype, policy as _, policylength as _) } } #[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 ClfsMgmtRegisterManagedClient(logfile: *const super::super::Foundation::FILE_OBJECT, registrationdata: *const CLFS_MGMT_CLIENT_REGISTRATION, clientcookie: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("clfs.sys" "system" fn ClfsMgmtRegisterManagedClient(logfile : *const super::super::Foundation:: FILE_OBJECT, registrationdata : *const CLFS_MGMT_CLIENT_REGISTRATION, clientcookie : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ClfsMgmtRegisterManagedClient(logfile, registrationdata, core::mem::transmute(clientcookie)) } + unsafe { ClfsMgmtRegisterManagedClient(logfile, registrationdata, clientcookie as _) } } #[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] @@ -232,13 +232,13 @@ pub unsafe fn ClfsMgmtRemovePolicy(logfile: *const super::super::Foundation::FIL #[inline] pub unsafe fn ClfsMgmtSetLogFileSize(logfile: *const super::super::Foundation::FILE_OBJECT, newsizeincontainers: *const u64, resultingsizeincontainers: Option<*mut u64>, completionroutine: 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); - unsafe { ClfsMgmtSetLogFileSize(logfile, 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()))) } + unsafe { ClfsMgmtSetLogFileSize(logfile, newsizeincontainers, resultingsizeincontainers.unwrap_or(core::mem::zeroed()) as _, completionroutine.unwrap_or(core::mem::zeroed()) as _, completionroutinedata.unwrap_or(core::mem::zeroed()) as _) } } #[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: 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); - unsafe { ClfsMgmtSetLogFileSizeAsClient(logfile, core::mem::transmute(clientcookie.unwrap_or(core::mem::zeroed())), 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()))) } + unsafe { ClfsMgmtSetLogFileSizeAsClient(logfile, clientcookie.unwrap_or(core::mem::zeroed()) as _, newsizeincontainers, resultingsizeincontainers.unwrap_or(core::mem::zeroed()) as _, completionroutine.unwrap_or(core::mem::zeroed()) as _, completionroutinedata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ClfsMgmtTailAdvanceFailure(client: *const core::ffi::c_void, reason: super::super::super::Win32::Foundation::NTSTATUS) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -249,31 +249,31 @@ pub unsafe fn ClfsMgmtTailAdvanceFailure(client: *const core::ffi::c_void, reaso #[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: 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); - unsafe { ClfsQueryLogFileInformation(plfolog, 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)) } + unsafe { ClfsQueryLogFileInformation(plfolog, einformationclass, pinfoinputbuffer.unwrap_or(core::mem::zeroed()) as _, cbinfoinputbuffer.unwrap_or(core::mem::zeroed()) as _, pinfobuffer as _, pcbinfobuffer as _) } } #[cfg(feature = "Win32_Storage_FileSystem")] #[inline] pub unsafe fn ClfsReadLogRecord(pvmarshalcontext: *const core::ffi::c_void, plsnfirst: *mut super::super::super::Win32::Storage::FileSystem::CLS_LSN, pecontextmode: super::super::super::Win32::Storage::FileSystem::CLFS_CONTEXT_MODE, ppvreadbuffer: *mut *mut core::ffi::c_void, pcbreadbuffer: *mut u32, perecordtype: *mut u8, plsnundonext: *mut super::super::super::Win32::Storage::FileSystem::CLS_LSN, plsnprevious: *mut super::super::super::Win32::Storage::FileSystem::CLS_LSN, ppvreadcontext: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("clfs.sys" "system" fn ClfsReadLogRecord(pvmarshalcontext : *const core::ffi::c_void, plsnfirst : *mut super::super::super::Win32::Storage::FileSystem:: CLS_LSN, pecontextmode : super::super::super::Win32::Storage::FileSystem:: CLFS_CONTEXT_MODE, ppvreadbuffer : *mut *mut core::ffi::c_void, pcbreadbuffer : *mut u32, perecordtype : *mut u8, plsnundonext : *mut super::super::super::Win32::Storage::FileSystem:: CLS_LSN, plsnprevious : *mut super::super::super::Win32::Storage::FileSystem:: CLS_LSN, ppvreadcontext : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ClfsReadLogRecord(pvmarshalcontext, core::mem::transmute(plsnfirst), pecontextmode, core::mem::transmute(ppvreadbuffer), core::mem::transmute(pcbreadbuffer), core::mem::transmute(perecordtype), core::mem::transmute(plsnundonext), core::mem::transmute(plsnprevious), core::mem::transmute(ppvreadcontext)) } + unsafe { ClfsReadLogRecord(pvmarshalcontext, plsnfirst as _, pecontextmode, ppvreadbuffer as _, pcbreadbuffer as _, perecordtype as _, plsnundonext as _, plsnprevious as _, ppvreadcontext as _) } } #[cfg(feature = "Win32_Storage_FileSystem")] #[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); - unsafe { 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)) } + unsafe { ClfsReadNextLogRecord(pvreadcontext as _, ppvbuffer as _, pcbbuffer as _, perecordtype as _, plsnuser.unwrap_or(core::mem::zeroed()) as _, plsnundonext as _, plsnprevious as _, plsnrecord as _) } } #[cfg(feature = "Win32_Storage_FileSystem")] #[inline] pub unsafe fn ClfsReadPreviousRestartArea(pvreadcontext: *const core::ffi::c_void, ppvrestartbuffer: *mut *mut core::ffi::c_void, pcbrestartbuffer: *mut u32, plsnrestart: *mut super::super::super::Win32::Storage::FileSystem::CLS_LSN) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("clfs.sys" "system" fn ClfsReadPreviousRestartArea(pvreadcontext : *const core::ffi::c_void, ppvrestartbuffer : *mut *mut core::ffi::c_void, pcbrestartbuffer : *mut u32, plsnrestart : *mut super::super::super::Win32::Storage::FileSystem:: CLS_LSN) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ClfsReadPreviousRestartArea(pvreadcontext, core::mem::transmute(ppvrestartbuffer), core::mem::transmute(pcbrestartbuffer), core::mem::transmute(plsnrestart)) } + unsafe { ClfsReadPreviousRestartArea(pvreadcontext, ppvrestartbuffer as _, pcbrestartbuffer as _, plsnrestart as _) } } #[cfg(feature = "Win32_Storage_FileSystem")] #[inline] pub unsafe fn ClfsReadRestartArea(pvmarshalcontext: *mut core::ffi::c_void, ppvrestartbuffer: *mut *mut core::ffi::c_void, pcbrestartbuffer: *mut u32, plsn: *mut super::super::super::Win32::Storage::FileSystem::CLS_LSN, ppvreadcontext: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("clfs.sys" "system" fn ClfsReadRestartArea(pvmarshalcontext : *mut core::ffi::c_void, ppvrestartbuffer : *mut *mut core::ffi::c_void, pcbrestartbuffer : *mut u32, plsn : *mut super::super::super::Win32::Storage::FileSystem:: CLS_LSN, ppvreadcontext : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ClfsReadRestartArea(core::mem::transmute(pvmarshalcontext), core::mem::transmute(ppvrestartbuffer), core::mem::transmute(pcbrestartbuffer), core::mem::transmute(plsn), core::mem::transmute(ppvreadcontext)) } + unsafe { ClfsReadRestartArea(pvmarshalcontext as _, ppvrestartbuffer as _, pcbrestartbuffer as _, plsn as _, ppvreadcontext as _) } } #[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] @@ -296,12 +296,12 @@ pub unsafe fn ClfsReserveAndAppendLog(pvmarshalcontext: *const core::ffi::c_void pvmarshalcontext, core::mem::transmute(rgwriteentries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), rgwriteentries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(plsnundonext.unwrap_or(core::mem::zeroed())), - core::mem::transmute(plsnprevious.unwrap_or(core::mem::zeroed())), + plsnundonext.unwrap_or(core::mem::zeroed()) as _, + plsnprevious.unwrap_or(core::mem::zeroed()) as _, rgcbreservation.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgcbreservation.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fflags, - core::mem::transmute(plsn.unwrap_or(core::mem::zeroed())), + plsn.unwrap_or(core::mem::zeroed()) as _, ) } } @@ -315,12 +315,12 @@ pub unsafe fn ClfsReserveAndAppendLogAligned(pvmarshalcontext: *const core::ffi: core::mem::transmute(rgwriteentries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), rgwriteentries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), cbentryalignment, - core::mem::transmute(plsnundonext.unwrap_or(core::mem::zeroed())), - core::mem::transmute(plsnprevious.unwrap_or(core::mem::zeroed())), + plsnundonext.unwrap_or(core::mem::zeroed()) as _, + plsnprevious.unwrap_or(core::mem::zeroed()) as _, rgcbreservation.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgcbreservation.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fflags, - core::mem::transmute(plsn.unwrap_or(core::mem::zeroed())), + plsn.unwrap_or(core::mem::zeroed()) as _, ) } } @@ -328,7 +328,7 @@ pub unsafe fn ClfsReserveAndAppendLogAligned(pvmarshalcontext: *const core::ffi: #[inline] pub unsafe fn ClfsScanLogContainers(pcxscan: *mut super::super::super::Win32::Storage::FileSystem::CLS_SCAN_CONTEXT, escanmode: u8) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("clfs.sys" "system" fn ClfsScanLogContainers(pcxscan : *mut super::super::super::Win32::Storage::FileSystem:: CLS_SCAN_CONTEXT, escanmode : u8) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ClfsScanLogContainers(core::mem::transmute(pcxscan), escanmode) } + unsafe { ClfsScanLogContainers(pcxscan as _, escanmode) } } #[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] @@ -357,17 +357,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); - unsafe { ClfsWriteRestartArea(core::mem::transmute(pvmarshalcontext), pvrestartbuffer, cbrestartbuffer, core::mem::transmute(plsnbase.unwrap_or(core::mem::zeroed())), fflags, core::mem::transmute(pcbwritten.unwrap_or(core::mem::zeroed())), core::mem::transmute(plsnnext.unwrap_or(core::mem::zeroed()))) } + unsafe { ClfsWriteRestartArea(pvmarshalcontext as _, pvrestartbuffer, cbrestartbuffer, plsnbase.unwrap_or(core::mem::zeroed()) as _, fflags, pcbwritten.unwrap_or(core::mem::zeroed()) as _, plsnnext.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CmCallbackGetKeyObjectID(cookie, object, core::mem::transmute(objectid.unwrap_or(core::mem::zeroed())), core::mem::transmute(objectname.unwrap_or(core::mem::zeroed()))) } + unsafe { CmCallbackGetKeyObjectID(cookie, object, objectid.unwrap_or(core::mem::zeroed()) as _, objectname.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CmCallbackGetKeyObjectIDEx(cookie, object, core::mem::transmute(objectid.unwrap_or(core::mem::zeroed())), core::mem::transmute(objectname.unwrap_or(core::mem::zeroed())), flags) } + unsafe { CmCallbackGetKeyObjectIDEx(cookie, object, objectid.unwrap_or(core::mem::zeroed()) as _, objectname.unwrap_or(core::mem::zeroed()) as _, flags) } } #[inline] pub unsafe fn CmCallbackReleaseKeyObjectIDEx(objectname: *const super::super::super::Win32::Foundation::UNICODE_STRING) { @@ -382,22 +382,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)); - unsafe { CmGetCallbackVersion(core::mem::transmute(major.unwrap_or(core::mem::zeroed())), core::mem::transmute(minor.unwrap_or(core::mem::zeroed()))) } + unsafe { CmGetCallbackVersion(major.unwrap_or(core::mem::zeroed()) as _, minor.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CmRegisterCallback(function, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(cookie)) } + unsafe { CmRegisterCallback(function, context.unwrap_or(core::mem::zeroed()) as _, cookie as _) } } #[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); - unsafe { CmRegisterCallbackEx(function, altitude, driver, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(cookie), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } + unsafe { CmRegisterCallbackEx(function, altitude, driver, context.unwrap_or(core::mem::zeroed()) as _, cookie as _, reserved.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CmSetCallbackObjectContext(core::mem::transmute(object), cookie, newcontext, core::mem::transmute(oldcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { CmSetCallbackObjectContext(object as _, cookie, newcontext, oldcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CmUnRegisterCallback(cookie: i64) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -460,7 +460,7 @@ pub unsafe fn DbgSetDebugPrintCallback(debugprintcallback: PDEBUG_PRINT_CALLBACK #[inline] pub unsafe fn EtwActivityIdControl(controlcode: u32, activityid: *mut windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn EtwActivityIdControl(controlcode : u32, activityid : *mut windows_core::GUID) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { EtwActivityIdControl(controlcode, core::mem::transmute(activityid)) } + unsafe { EtwActivityIdControl(controlcode, activityid as _) } } #[cfg(feature = "Win32_System_Diagnostics_Etw")] #[inline] @@ -478,13 +478,13 @@ pub unsafe fn EtwProviderEnabled(reghandle: super::super::super::Win32::System:: #[inline] 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); - unsafe { EtwRegister(providerid, core::mem::transmute(enablecallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(reghandle)) } + unsafe { EtwRegister(providerid, enablecallback.unwrap_or(core::mem::zeroed()) as _, callbackcontext.unwrap_or(core::mem::zeroed()) as _, reghandle as _) } } #[cfg(feature = "Win32_System_Diagnostics_Etw")] #[inline] 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); - unsafe { EtwSetInformation(reghandle, informationclass, core::mem::transmute(eventinformation.unwrap_or(core::mem::zeroed())), informationlength) } + unsafe { EtwSetInformation(reghandle, informationclass, eventinformation.unwrap_or(core::mem::zeroed()) as _, informationlength) } } #[cfg(feature = "Win32_System_Diagnostics_Etw")] #[inline] @@ -496,13 +496,13 @@ pub unsafe fn EtwUnregister(reghandle: super::super::super::Win32::System::Diagn #[inline] 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); - unsafe { EtwWrite(reghandle, 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()))) } + unsafe { EtwWrite(reghandle, eventdescriptor, activityid.unwrap_or(core::mem::zeroed()) as _, 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: 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); - unsafe { EtwWriteEx(reghandle, eventdescriptor, filter, 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()))) } + unsafe { EtwWriteEx(reghandle, eventdescriptor, filter, flags, activityid.unwrap_or(core::mem::zeroed()) as _, relatedactivityid.unwrap_or(core::mem::zeroed()) as _, 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] @@ -511,52 +511,52 @@ where 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); - unsafe { EtwWriteString(reghandle, level, keyword, core::mem::transmute(activityid.unwrap_or(core::mem::zeroed())), string.param().abi()) } + unsafe { EtwWriteString(reghandle, level, keyword, activityid.unwrap_or(core::mem::zeroed()) as _, string.param().abi()) } } #[cfg(feature = "Win32_System_Diagnostics_Etw")] #[inline] 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); - unsafe { EtwWriteTransfer(reghandle, 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()))) } + unsafe { EtwWriteTransfer(reghandle, eventdescriptor, activityid.unwrap_or(core::mem::zeroed()) as _, relatedactivityid.unwrap_or(core::mem::zeroed()) as _, 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] pub unsafe fn ExAcquireFastMutex(fastmutex: *mut super::super::Foundation::FAST_MUTEX) { windows_targets::link!("ntoskrnl.exe" "system" fn ExAcquireFastMutex(fastmutex : *mut super::super::Foundation:: FAST_MUTEX)); - unsafe { ExAcquireFastMutex(core::mem::transmute(fastmutex)) } + unsafe { ExAcquireFastMutex(fastmutex as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn ExAcquireFastMutexUnsafe(fastmutex: *mut super::super::Foundation::FAST_MUTEX) { windows_targets::link!("ntoskrnl.exe" "system" fn ExAcquireFastMutexUnsafe(fastmutex : *mut super::super::Foundation:: FAST_MUTEX)); - unsafe { ExAcquireFastMutexUnsafe(core::mem::transmute(fastmutex)) } + unsafe { ExAcquireFastMutexUnsafe(fastmutex as _) } } #[inline] pub unsafe fn ExAcquirePushLockExclusiveEx(pushlock: *mut usize, flags: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn ExAcquirePushLockExclusiveEx(pushlock : *mut usize, flags : u32)); - unsafe { ExAcquirePushLockExclusiveEx(core::mem::transmute(pushlock), flags) } + unsafe { ExAcquirePushLockExclusiveEx(pushlock as _, flags) } } #[inline] pub unsafe fn ExAcquirePushLockSharedEx(pushlock: *mut usize, flags: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn ExAcquirePushLockSharedEx(pushlock : *mut usize, flags : u32)); - unsafe { ExAcquirePushLockSharedEx(core::mem::transmute(pushlock), flags) } + unsafe { ExAcquirePushLockSharedEx(pushlock as _, flags) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn ExAcquireResourceExclusiveLite(resource: *mut super::super::Foundation::ERESOURCE, wait: bool) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn ExAcquireResourceExclusiveLite(resource : *mut super::super::Foundation:: ERESOURCE, wait : bool) -> bool); - unsafe { ExAcquireResourceExclusiveLite(core::mem::transmute(resource), wait) } + unsafe { ExAcquireResourceExclusiveLite(resource as _, wait) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn ExAcquireResourceSharedLite(resource: *mut super::super::Foundation::ERESOURCE, wait: bool) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn ExAcquireResourceSharedLite(resource : *mut super::super::Foundation:: ERESOURCE, wait : bool) -> bool); - unsafe { ExAcquireResourceSharedLite(core::mem::transmute(resource), wait) } + unsafe { ExAcquireResourceSharedLite(resource as _, wait) } } #[inline] pub unsafe fn ExAcquireRundownProtection(runref: *mut EX_RUNDOWN_REF) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn ExAcquireRundownProtection(runref : *mut EX_RUNDOWN_REF) -> bool); - unsafe { ExAcquireRundownProtection(core::mem::transmute(runref)) } + unsafe { ExAcquireRundownProtection(runref as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -573,39 +573,39 @@ pub unsafe fn ExAcquireRundownProtectionCacheAwareEx(runrefcacheaware: super::su #[inline] pub unsafe fn ExAcquireRundownProtectionEx(runref: *mut EX_RUNDOWN_REF, count: u32) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn ExAcquireRundownProtectionEx(runref : *mut EX_RUNDOWN_REF, count : u32) -> bool); - unsafe { ExAcquireRundownProtectionEx(core::mem::transmute(runref), count) } + unsafe { ExAcquireRundownProtectionEx(runref as _, count) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn ExAcquireSharedStarveExclusive(resource: *mut super::super::Foundation::ERESOURCE, wait: bool) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn ExAcquireSharedStarveExclusive(resource : *mut super::super::Foundation:: ERESOURCE, wait : bool) -> bool); - unsafe { ExAcquireSharedStarveExclusive(core::mem::transmute(resource), wait) } + unsafe { ExAcquireSharedStarveExclusive(resource as _, wait) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn ExAcquireSharedWaitForExclusive(resource: *mut super::super::Foundation::ERESOURCE, wait: bool) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn ExAcquireSharedWaitForExclusive(resource : *mut super::super::Foundation:: ERESOURCE, wait : bool) -> bool); - unsafe { ExAcquireSharedWaitForExclusive(core::mem::transmute(resource), wait) } + unsafe { ExAcquireSharedWaitForExclusive(resource as _, wait) } } #[inline] pub unsafe fn ExAcquireSpinLockExclusive(spinlock: *mut i32) -> u8 { windows_targets::link!("ntoskrnl.exe" "system" fn ExAcquireSpinLockExclusive(spinlock : *mut i32) -> u8); - unsafe { ExAcquireSpinLockExclusive(core::mem::transmute(spinlock)) } + unsafe { ExAcquireSpinLockExclusive(spinlock as _) } } #[inline] pub unsafe fn ExAcquireSpinLockExclusiveAtDpcLevel(spinlock: *mut i32) { windows_targets::link!("ntoskrnl.exe" "system" fn ExAcquireSpinLockExclusiveAtDpcLevel(spinlock : *mut i32)); - unsafe { ExAcquireSpinLockExclusiveAtDpcLevel(core::mem::transmute(spinlock)) } + unsafe { ExAcquireSpinLockExclusiveAtDpcLevel(spinlock as _) } } #[inline] pub unsafe fn ExAcquireSpinLockShared(spinlock: *mut i32) -> u8 { windows_targets::link!("ntoskrnl.exe" "system" fn ExAcquireSpinLockShared(spinlock : *mut i32) -> u8); - unsafe { ExAcquireSpinLockShared(core::mem::transmute(spinlock)) } + unsafe { ExAcquireSpinLockShared(spinlock as _) } } #[inline] pub unsafe fn ExAcquireSpinLockSharedAtDpcLevel(spinlock: *mut i32) { windows_targets::link!("ntoskrnl.exe" "system" fn ExAcquireSpinLockSharedAtDpcLevel(spinlock : *mut i32)); - unsafe { ExAcquireSpinLockSharedAtDpcLevel(core::mem::transmute(spinlock)) } + unsafe { ExAcquireSpinLockSharedAtDpcLevel(spinlock as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -657,13 +657,13 @@ pub unsafe fn ExAllocatePoolWithTagPriority(pooltype: super::super::Foundation:: #[inline] 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); - unsafe { ExAllocateTimer(core::mem::transmute(callback.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed())), attributes) } + unsafe { ExAllocateTimer(callback.unwrap_or(core::mem::zeroed()) as _, callbackcontext.unwrap_or(core::mem::zeroed()) as _, attributes) } } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn ExCancelTimer(timer: super::super::Foundation::PEX_TIMER, parameters: Option<*const core::ffi::c_void>) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn ExCancelTimer(timer : super::super::Foundation:: PEX_TIMER, parameters : *const core::ffi::c_void) -> bool); - unsafe { ExCancelTimer(timer, core::mem::transmute(parameters.unwrap_or(core::mem::zeroed()))) } + unsafe { ExCancelTimer(timer, parameters.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -675,30 +675,30 @@ pub unsafe fn ExCleanupRundownProtectionCacheAware(runrefcacheaware: super::supe #[inline] pub unsafe fn ExConvertExclusiveToSharedLite(resource: *mut super::super::Foundation::ERESOURCE) { windows_targets::link!("ntoskrnl.exe" "system" fn ExConvertExclusiveToSharedLite(resource : *mut super::super::Foundation:: ERESOURCE)); - unsafe { ExConvertExclusiveToSharedLite(core::mem::transmute(resource)) } + unsafe { ExConvertExclusiveToSharedLite(resource as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn ExCreateCallback(callbackobject: *mut super::super::Foundation::PCALLBACK_OBJECT, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, create: bool, allowmultiplecallbacks: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn ExCreateCallback(callbackobject : *mut super::super::Foundation:: PCALLBACK_OBJECT, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, create : bool, allowmultiplecallbacks : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ExCreateCallback(core::mem::transmute(callbackobject), objectattributes, create, allowmultiplecallbacks) } + unsafe { ExCreateCallback(callbackobject as _, objectattributes, create, allowmultiplecallbacks) } } #[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); - unsafe { ExCreatePool(flags, tag, core::mem::transmute(params.unwrap_or(core::mem::zeroed())), core::mem::transmute(poolhandle)) } + unsafe { ExCreatePool(flags, tag, params.unwrap_or(core::mem::zeroed()) as _, poolhandle as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn ExDeleteResourceLite(resource: *mut super::super::Foundation::ERESOURCE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn ExDeleteResourceLite(resource : *mut super::super::Foundation:: ERESOURCE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ExDeleteResourceLite(core::mem::transmute(resource)) } + unsafe { ExDeleteResourceLite(resource as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn ExDeleteTimer(timer: super::super::Foundation::PEX_TIMER, cancel: bool, wait: bool, parameters: Option<*const EXT_DELETE_PARAMETERS>) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn ExDeleteTimer(timer : super::super::Foundation:: PEX_TIMER, cancel : bool, wait : bool, parameters : *const EXT_DELETE_PARAMETERS) -> bool); - unsafe { ExDeleteTimer(timer, cancel, wait, core::mem::transmute(parameters.unwrap_or(core::mem::zeroed()))) } + unsafe { ExDeleteTimer(timer, cancel, wait, parameters.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ExDestroyPool(poolhandle: super::super::super::Win32::Foundation::HANDLE) { @@ -709,30 +709,30 @@ pub unsafe fn ExDestroyPool(poolhandle: super::super::super::Win32::Foundation:: #[inline] pub unsafe fn ExEnterCriticalRegionAndAcquireResourceExclusive(resource: *mut super::super::Foundation::ERESOURCE) -> *mut core::ffi::c_void { windows_targets::link!("ntoskrnl.exe" "system" fn ExEnterCriticalRegionAndAcquireResourceExclusive(resource : *mut super::super::Foundation:: ERESOURCE) -> *mut core::ffi::c_void); - unsafe { ExEnterCriticalRegionAndAcquireResourceExclusive(core::mem::transmute(resource)) } + unsafe { ExEnterCriticalRegionAndAcquireResourceExclusive(resource as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn ExEnterCriticalRegionAndAcquireResourceShared(resource: *mut super::super::Foundation::ERESOURCE) -> *mut core::ffi::c_void { windows_targets::link!("ntoskrnl.exe" "system" fn ExEnterCriticalRegionAndAcquireResourceShared(resource : *mut super::super::Foundation:: ERESOURCE) -> *mut core::ffi::c_void); - unsafe { ExEnterCriticalRegionAndAcquireResourceShared(core::mem::transmute(resource)) } + unsafe { ExEnterCriticalRegionAndAcquireResourceShared(resource as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn ExEnterCriticalRegionAndAcquireSharedWaitForExclusive(resource: *mut super::super::Foundation::ERESOURCE) -> *mut core::ffi::c_void { windows_targets::link!("ntoskrnl.exe" "system" fn ExEnterCriticalRegionAndAcquireSharedWaitForExclusive(resource : *mut super::super::Foundation:: ERESOURCE) -> *mut core::ffi::c_void); - unsafe { ExEnterCriticalRegionAndAcquireSharedWaitForExclusive(core::mem::transmute(resource)) } + unsafe { ExEnterCriticalRegionAndAcquireSharedWaitForExclusive(resource as _) } } #[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); - unsafe { ExEnumerateSystemFirmwareTables(firmwaretableprovidersignature, core::mem::transmute(firmwaretablebuffer.unwrap_or(core::mem::zeroed())), bufferlength, core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } + unsafe { ExEnumerateSystemFirmwareTables(firmwaretableprovidersignature, firmwaretablebuffer.unwrap_or(core::mem::zeroed()) as _, bufferlength, returnlength.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn ExExtendZone(zone: *mut ZONE_HEADER, segment: *mut core::ffi::c_void, segmentsize: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn ExExtendZone(zone : *mut ZONE_HEADER, segment : *mut core::ffi::c_void, segmentsize : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ExExtendZone(core::mem::transmute(zone), core::mem::transmute(segment), segmentsize) } + unsafe { ExExtendZone(zone as _, segment as _, segmentsize) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -743,17 +743,17 @@ pub unsafe fn ExFreeCacheAwareRundownProtection(runrefcacheaware: super::super:: #[inline] pub unsafe fn ExFreePool(p: *mut core::ffi::c_void) { windows_targets::link!("ntoskrnl.exe" "system" fn ExFreePool(p : *mut core::ffi::c_void)); - unsafe { ExFreePool(core::mem::transmute(p)) } + unsafe { ExFreePool(p as _) } } #[inline] pub unsafe fn ExFreePool2(p: *mut core::ffi::c_void, tag: u32, extendedparameters: Option<&[POOL_EXTENDED_PARAMETER]>) { windows_targets::link!("ntoskrnl.exe" "system" fn ExFreePool2(p : *mut core::ffi::c_void, tag : u32, extendedparameters : *const POOL_EXTENDED_PARAMETER, extendedparameterscount : u32)); - unsafe { ExFreePool2(core::mem::transmute(p), tag, 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())) } + unsafe { ExFreePool2(p as _, tag, 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 ExFreePoolWithTag(p: *mut core::ffi::c_void, tag: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn ExFreePoolWithTag(p : *mut core::ffi::c_void, tag : u32)); - unsafe { ExFreePoolWithTag(core::mem::transmute(p), tag) } + unsafe { ExFreePoolWithTag(p as _, tag) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -764,7 +764,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); - unsafe { ExGetFirmwareEnvironmentVariable(variablename, vendorguid, core::mem::transmute(value.unwrap_or(core::mem::zeroed())), core::mem::transmute(valuelength), core::mem::transmute(attributes.unwrap_or(core::mem::zeroed()))) } + unsafe { ExGetFirmwareEnvironmentVariable(variablename, vendorguid, value.unwrap_or(core::mem::zeroed()) as _, valuelength as _, attributes.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_SystemInformation")] #[inline] @@ -786,7 +786,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); - unsafe { ExGetSystemFirmwareTable(firmwaretableprovidersignature, firmwaretableid, core::mem::transmute(firmwaretablebuffer.unwrap_or(core::mem::zeroed())), bufferlength, core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } + unsafe { ExGetSystemFirmwareTable(firmwaretableprovidersignature, firmwaretableid, firmwaretablebuffer.unwrap_or(core::mem::zeroed()) as _, bufferlength, returnlength.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ExInitializePushLock() -> usize { @@ -801,7 +801,7 @@ pub unsafe fn ExInitializePushLock() -> usize { #[inline] pub unsafe fn ExInitializeResourceLite(resource: *mut super::super::Foundation::ERESOURCE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn ExInitializeResourceLite(resource : *mut super::super::Foundation:: ERESOURCE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ExInitializeResourceLite(core::mem::transmute(resource)) } + unsafe { ExInitializeResourceLite(resource as _) } } #[inline] pub unsafe fn ExInitializeRundownProtection() -> EX_RUNDOWN_REF { @@ -828,18 +828,18 @@ pub unsafe fn ExInitializeRundownProtectionCacheAwareEx(runrefcacheaware: super: #[inline] pub unsafe fn ExInitializeZone(zone: *mut ZONE_HEADER, blocksize: u32, initialsegment: *mut core::ffi::c_void, initialsegmentsize: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn ExInitializeZone(zone : *mut ZONE_HEADER, blocksize : u32, initialsegment : *mut core::ffi::c_void, initialsegmentsize : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ExInitializeZone(core::mem::transmute(zone), blocksize, core::mem::transmute(initialsegment), initialsegmentsize) } + unsafe { ExInitializeZone(zone as _, blocksize, initialsegment as _, initialsegmentsize) } } #[inline] pub unsafe fn ExInterlockedAddLargeInteger(addend: *mut i64, increment: i64, lock: *mut usize) -> i64 { windows_targets::link!("ntoskrnl.exe" "system" fn ExInterlockedAddLargeInteger(addend : *mut i64, increment : i64, lock : *mut usize) -> i64); - unsafe { ExInterlockedAddLargeInteger(core::mem::transmute(addend), increment, core::mem::transmute(lock)) } + unsafe { ExInterlockedAddLargeInteger(addend as _, increment, lock as _) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn ExInterlockedExtendZone(zone: *mut ZONE_HEADER, segment: *mut core::ffi::c_void, segmentsize: u32, lock: *mut usize) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn ExInterlockedExtendZone(zone : *mut ZONE_HEADER, segment : *mut core::ffi::c_void, segmentsize : u32, lock : *mut usize) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ExInterlockedExtendZone(core::mem::transmute(zone), core::mem::transmute(segment), segmentsize, core::mem::transmute(lock)) } + unsafe { ExInterlockedExtendZone(zone as _, segment as _, segmentsize, lock as _) } } #[inline] pub unsafe fn ExIsManufacturingModeEnabled() -> bool { @@ -880,18 +880,18 @@ 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)); - unsafe { ExNotifyCallback(callbackobject, core::mem::transmute(argument1.unwrap_or(core::mem::zeroed())), core::mem::transmute(argument2.unwrap_or(core::mem::zeroed()))) } + unsafe { ExNotifyCallback(callbackobject, argument1.unwrap_or(core::mem::zeroed()) as _, argument2.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ExQueryTimerResolution(maximumtime: *mut u32, minimumtime: *mut u32, currenttime: *mut u32) { windows_targets::link!("ntoskrnl.exe" "system" fn ExQueryTimerResolution(maximumtime : *mut u32, minimumtime : *mut u32, currenttime : *mut u32)); - unsafe { ExQueryTimerResolution(core::mem::transmute(maximumtime), core::mem::transmute(minimumtime), core::mem::transmute(currenttime)) } + unsafe { ExQueryTimerResolution(maximumtime as _, minimumtime as _, currenttime as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn ExQueueWorkItem(workitem: *mut super::super::Foundation::WORK_QUEUE_ITEM, queuetype: WORK_QUEUE_TYPE) { windows_targets::link!("ntoskrnl.exe" "system" fn ExQueueWorkItem(workitem : *mut super::super::Foundation:: WORK_QUEUE_ITEM, queuetype : WORK_QUEUE_TYPE)); - unsafe { ExQueueWorkItem(core::mem::transmute(workitem), queuetype) } + unsafe { ExQueueWorkItem(workitem as _, queuetype) } } #[inline] pub unsafe fn ExRaiseAccessViolation() { @@ -911,7 +911,7 @@ pub unsafe fn ExRaiseStatus(status: super::super::super::Win32::Foundation::NTST #[inline] pub unsafe fn ExReInitializeRundownProtection(runref: *mut EX_RUNDOWN_REF) { windows_targets::link!("ntoskrnl.exe" "system" fn ExReInitializeRundownProtection(runref : *mut EX_RUNDOWN_REF)); - unsafe { ExReInitializeRundownProtection(core::mem::transmute(runref)) } + unsafe { ExReInitializeRundownProtection(runref as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -923,58 +923,58 @@ pub unsafe fn ExReInitializeRundownProtectionCacheAware(runrefcacheaware: super: #[inline] 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); - unsafe { ExRegisterCallback(callbackobject, callbackfunction, core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { ExRegisterCallback(callbackobject, callbackfunction, callbackcontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn ExReinitializeResourceLite(resource: *mut super::super::Foundation::ERESOURCE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn ExReinitializeResourceLite(resource : *mut super::super::Foundation:: ERESOURCE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ExReinitializeResourceLite(core::mem::transmute(resource)) } + unsafe { ExReinitializeResourceLite(resource as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn ExReleaseFastMutex(fastmutex: *mut super::super::Foundation::FAST_MUTEX) { windows_targets::link!("ntoskrnl.exe" "system" fn ExReleaseFastMutex(fastmutex : *mut super::super::Foundation:: FAST_MUTEX)); - unsafe { ExReleaseFastMutex(core::mem::transmute(fastmutex)) } + unsafe { ExReleaseFastMutex(fastmutex as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn ExReleaseFastMutexUnsafe(fastmutex: *mut super::super::Foundation::FAST_MUTEX) { windows_targets::link!("ntoskrnl.exe" "system" fn ExReleaseFastMutexUnsafe(fastmutex : *mut super::super::Foundation:: FAST_MUTEX)); - unsafe { ExReleaseFastMutexUnsafe(core::mem::transmute(fastmutex)) } + unsafe { ExReleaseFastMutexUnsafe(fastmutex as _) } } #[inline] pub unsafe fn ExReleasePushLockExclusiveEx(pushlock: *mut usize, flags: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn ExReleasePushLockExclusiveEx(pushlock : *mut usize, flags : u32)); - unsafe { ExReleasePushLockExclusiveEx(core::mem::transmute(pushlock), flags) } + unsafe { ExReleasePushLockExclusiveEx(pushlock as _, flags) } } #[inline] pub unsafe fn ExReleasePushLockSharedEx(pushlock: *mut usize, flags: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn ExReleasePushLockSharedEx(pushlock : *mut usize, flags : u32)); - unsafe { ExReleasePushLockSharedEx(core::mem::transmute(pushlock), flags) } + unsafe { ExReleasePushLockSharedEx(pushlock as _, flags) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn ExReleaseResourceAndLeaveCriticalRegion(resource: *mut super::super::Foundation::ERESOURCE) { windows_targets::link!("ntoskrnl.exe" "system" fn ExReleaseResourceAndLeaveCriticalRegion(resource : *mut super::super::Foundation:: ERESOURCE)); - unsafe { ExReleaseResourceAndLeaveCriticalRegion(core::mem::transmute(resource)) } + unsafe { ExReleaseResourceAndLeaveCriticalRegion(resource as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn ExReleaseResourceForThreadLite(resource: *mut super::super::Foundation::ERESOURCE, resourcethreadid: usize) { windows_targets::link!("ntoskrnl.exe" "system" fn ExReleaseResourceForThreadLite(resource : *mut super::super::Foundation:: ERESOURCE, resourcethreadid : usize)); - unsafe { ExReleaseResourceForThreadLite(core::mem::transmute(resource), resourcethreadid) } + unsafe { ExReleaseResourceForThreadLite(resource as _, resourcethreadid) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn ExReleaseResourceLite(resource: *mut super::super::Foundation::ERESOURCE) { windows_targets::link!("ntoskrnl.exe" "system" fn ExReleaseResourceLite(resource : *mut super::super::Foundation:: ERESOURCE)); - unsafe { ExReleaseResourceLite(core::mem::transmute(resource)) } + unsafe { ExReleaseResourceLite(resource as _) } } #[inline] pub unsafe fn ExReleaseRundownProtection(runref: *mut EX_RUNDOWN_REF) { windows_targets::link!("ntoskrnl.exe" "system" fn ExReleaseRundownProtection(runref : *mut EX_RUNDOWN_REF)); - unsafe { ExReleaseRundownProtection(core::mem::transmute(runref)) } + unsafe { ExReleaseRundownProtection(runref as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -991,27 +991,27 @@ pub unsafe fn ExReleaseRundownProtectionCacheAwareEx(runref: super::super::Found #[inline] pub unsafe fn ExReleaseRundownProtectionEx(runref: *mut EX_RUNDOWN_REF, count: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn ExReleaseRundownProtectionEx(runref : *mut EX_RUNDOWN_REF, count : u32)); - unsafe { ExReleaseRundownProtectionEx(core::mem::transmute(runref), count) } + unsafe { ExReleaseRundownProtectionEx(runref as _, count) } } #[inline] pub unsafe fn ExReleaseSpinLockExclusive(spinlock: *mut i32, oldirql: u8) { windows_targets::link!("ntoskrnl.exe" "system" fn ExReleaseSpinLockExclusive(spinlock : *mut i32, oldirql : u8)); - unsafe { ExReleaseSpinLockExclusive(core::mem::transmute(spinlock), oldirql) } + unsafe { ExReleaseSpinLockExclusive(spinlock as _, oldirql) } } #[inline] pub unsafe fn ExReleaseSpinLockExclusiveFromDpcLevel(spinlock: *mut i32) { windows_targets::link!("ntoskrnl.exe" "system" fn ExReleaseSpinLockExclusiveFromDpcLevel(spinlock : *mut i32)); - unsafe { ExReleaseSpinLockExclusiveFromDpcLevel(core::mem::transmute(spinlock)) } + unsafe { ExReleaseSpinLockExclusiveFromDpcLevel(spinlock as _) } } #[inline] pub unsafe fn ExReleaseSpinLockShared(spinlock: *mut i32, oldirql: u8) { windows_targets::link!("ntoskrnl.exe" "system" fn ExReleaseSpinLockShared(spinlock : *mut i32, oldirql : u8)); - unsafe { ExReleaseSpinLockShared(core::mem::transmute(spinlock), oldirql) } + unsafe { ExReleaseSpinLockShared(spinlock as _, oldirql) } } #[inline] pub unsafe fn ExReleaseSpinLockSharedFromDpcLevel(spinlock: *mut i32) { windows_targets::link!("ntoskrnl.exe" "system" fn ExReleaseSpinLockSharedFromDpcLevel(spinlock : *mut i32)); - unsafe { ExReleaseSpinLockSharedFromDpcLevel(core::mem::transmute(spinlock)) } + unsafe { ExReleaseSpinLockSharedFromDpcLevel(spinlock as _) } } #[inline] pub unsafe fn ExRundownCompleted() -> EX_RUNDOWN_REF { @@ -1041,25 +1041,25 @@ pub unsafe fn ExSecurePoolValidate(securepoolhandle: super::super::super::Win32: #[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); - unsafe { ExSetFirmwareEnvironmentVariable(variablename, vendorguid, core::mem::transmute(value.unwrap_or(core::mem::zeroed())), valuelength, attributes) } + unsafe { ExSetFirmwareEnvironmentVariable(variablename, vendorguid, value.unwrap_or(core::mem::zeroed()) as _, valuelength, attributes) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn ExSetResourceOwnerPointer(resource: *mut super::super::Foundation::ERESOURCE, ownerpointer: *const core::ffi::c_void) { windows_targets::link!("ntoskrnl.exe" "system" fn ExSetResourceOwnerPointer(resource : *mut super::super::Foundation:: ERESOURCE, ownerpointer : *const core::ffi::c_void)); - unsafe { ExSetResourceOwnerPointer(core::mem::transmute(resource), ownerpointer) } + unsafe { ExSetResourceOwnerPointer(resource as _, ownerpointer) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn ExSetResourceOwnerPointerEx(resource: *mut super::super::Foundation::ERESOURCE, ownerpointer: *const core::ffi::c_void, flags: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn ExSetResourceOwnerPointerEx(resource : *mut super::super::Foundation:: ERESOURCE, ownerpointer : *const core::ffi::c_void, flags : u32)); - unsafe { ExSetResourceOwnerPointerEx(core::mem::transmute(resource), ownerpointer, flags) } + unsafe { ExSetResourceOwnerPointerEx(resource as _, ownerpointer, flags) } } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn ExSetTimer(timer: super::super::Foundation::PEX_TIMER, duetime: i64, period: i64, parameters: Option<*const _EXT_SET_PARAMETERS_V0>) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn ExSetTimer(timer : super::super::Foundation:: PEX_TIMER, duetime : i64, period : i64, parameters : *const _EXT_SET_PARAMETERS_V0) -> bool); - unsafe { ExSetTimer(timer, duetime, period, core::mem::transmute(parameters.unwrap_or(core::mem::zeroed()))) } + unsafe { ExSetTimer(timer, duetime, period, parameters.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ExSetTimerResolution(desiredtime: u32, setresolution: bool) -> u32 { @@ -1083,33 +1083,33 @@ pub unsafe fn ExSystemTimeToLocalTime(systemtime: *const i64) -> i64 { #[inline] pub unsafe fn ExTryAcquireSpinLockExclusiveAtDpcLevel(spinlock: *mut i32) -> u32 { windows_targets::link!("ntoskrnl.exe" "system" fn ExTryAcquireSpinLockExclusiveAtDpcLevel(spinlock : *mut i32) -> u32); - unsafe { ExTryAcquireSpinLockExclusiveAtDpcLevel(core::mem::transmute(spinlock)) } + unsafe { ExTryAcquireSpinLockExclusiveAtDpcLevel(spinlock as _) } } #[inline] pub unsafe fn ExTryAcquireSpinLockSharedAtDpcLevel(spinlock: *mut i32) -> u32 { windows_targets::link!("ntoskrnl.exe" "system" fn ExTryAcquireSpinLockSharedAtDpcLevel(spinlock : *mut i32) -> u32); - unsafe { ExTryAcquireSpinLockSharedAtDpcLevel(core::mem::transmute(spinlock)) } + unsafe { ExTryAcquireSpinLockSharedAtDpcLevel(spinlock as _) } } #[inline] pub unsafe fn ExTryConvertSharedSpinLockExclusive(spinlock: *mut i32) -> u32 { windows_targets::link!("ntoskrnl.exe" "system" fn ExTryConvertSharedSpinLockExclusive(spinlock : *mut i32) -> u32); - unsafe { ExTryConvertSharedSpinLockExclusive(core::mem::transmute(spinlock)) } + unsafe { ExTryConvertSharedSpinLockExclusive(spinlock as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn ExTryToAcquireFastMutex(fastmutex: *mut super::super::Foundation::FAST_MUTEX) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn ExTryToAcquireFastMutex(fastmutex : *mut super::super::Foundation:: FAST_MUTEX) -> bool); - unsafe { ExTryToAcquireFastMutex(core::mem::transmute(fastmutex)) } + unsafe { ExTryToAcquireFastMutex(fastmutex as _) } } #[inline] pub unsafe fn ExUnregisterCallback(callbackregistration: *mut core::ffi::c_void) { windows_targets::link!("ntoskrnl.exe" "system" fn ExUnregisterCallback(callbackregistration : *mut core::ffi::c_void)); - unsafe { ExUnregisterCallback(core::mem::transmute(callbackregistration)) } + unsafe { ExUnregisterCallback(callbackregistration as _) } } #[inline] pub unsafe fn ExUuidCreate(uuid: *mut windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn ExUuidCreate(uuid : *mut windows_core::GUID) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ExUuidCreate(core::mem::transmute(uuid)) } + unsafe { ExUuidCreate(uuid as _) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -1120,7 +1120,7 @@ pub unsafe fn ExVerifySuite(suitetype: super::super::super::Win32::System::Kerne #[inline] pub unsafe fn ExWaitForRundownProtectionRelease(runref: *mut EX_RUNDOWN_REF) { windows_targets::link!("ntoskrnl.exe" "system" fn ExWaitForRundownProtectionRelease(runref : *mut EX_RUNDOWN_REF)); - unsafe { ExWaitForRundownProtectionRelease(core::mem::transmute(runref)) } + unsafe { ExWaitForRundownProtectionRelease(runref as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -1148,25 +1148,25 @@ pub unsafe fn HalAllocateAdapterChannel(adapterobject: *const super::super::supe #[inline] pub unsafe fn HalAllocateCommonBuffer(adapterobject: *const super::super::super::Win32::Storage::IscsiDisc::_ADAPTER_OBJECT, length: u32, logicaladdress: *mut i64, cacheenabled: bool) -> *mut core::ffi::c_void { windows_targets::link!("hal.dll" "system" fn HalAllocateCommonBuffer(adapterobject : *const super::super::super::Win32::Storage::IscsiDisc:: _ADAPTER_OBJECT, length : u32, logicaladdress : *mut i64, cacheenabled : bool) -> *mut core::ffi::c_void); - unsafe { HalAllocateCommonBuffer(adapterobject, length, core::mem::transmute(logicaladdress), cacheenabled) } + unsafe { HalAllocateCommonBuffer(adapterobject, length, logicaladdress as _, cacheenabled) } } #[cfg(feature = "Win32_Storage_IscsiDisc")] #[inline] pub unsafe fn HalAllocateCrashDumpRegisters(adapterobject: *const super::super::super::Win32::Storage::IscsiDisc::_ADAPTER_OBJECT, numberofmapregisters: *mut u32) -> *mut core::ffi::c_void { windows_targets::link!("hal.dll" "system" fn HalAllocateCrashDumpRegisters(adapterobject : *const super::super::super::Win32::Storage::IscsiDisc:: _ADAPTER_OBJECT, numberofmapregisters : *mut u32) -> *mut core::ffi::c_void); - unsafe { HalAllocateCrashDumpRegisters(adapterobject, core::mem::transmute(numberofmapregisters)) } + unsafe { HalAllocateCrashDumpRegisters(adapterobject, numberofmapregisters as _) } } #[cfg(feature = "Win32_System_SystemInformation")] #[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); - unsafe { 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)) } + unsafe { 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()), resourcelist.unwrap_or(core::mem::zeroed()) as _, countersethandle as _) } } #[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 HalAssignSlotResources(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, bustype: INTERFACE_TYPE, busnumber: u32, slotnumber: u32, allocatedresources: *mut *mut CM_RESOURCE_LIST) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("hal.dll" "system" fn HalAssignSlotResources(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, bustype : INTERFACE_TYPE, busnumber : u32, slotnumber : u32, allocatedresources : *mut *mut CM_RESOURCE_LIST) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { HalAssignSlotResources(registrypath, driverclassname, driverobject, deviceobject, bustype, busnumber, slotnumber, core::mem::transmute(allocatedresources)) } + unsafe { HalAssignSlotResources(registrypath, driverclassname, driverobject, deviceobject, bustype, busnumber, slotnumber, allocatedresources as _) } } #[cfg(feature = "Win32_System_Diagnostics_Debug")] #[inline] @@ -1178,7 +1178,7 @@ pub unsafe fn HalBugCheckSystem(errorsource: *const super::super::super::Win32:: #[inline] pub unsafe fn HalDmaAllocateCrashDumpRegistersEx(adapter: *const super::super::super::Win32::Storage::IscsiDisc::_ADAPTER_OBJECT, numberofmapregisters: u32, r#type: HAL_DMA_CRASH_DUMP_REGISTER_TYPE, mapregisterbase: *mut *mut core::ffi::c_void, mapregistersavailable: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("hal.dll" "system" fn HalDmaAllocateCrashDumpRegistersEx(adapter : *const super::super::super::Win32::Storage::IscsiDisc:: _ADAPTER_OBJECT, numberofmapregisters : u32, r#type : HAL_DMA_CRASH_DUMP_REGISTER_TYPE, mapregisterbase : *mut *mut core::ffi::c_void, mapregistersavailable : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { HalDmaAllocateCrashDumpRegistersEx(adapter, numberofmapregisters, r#type, core::mem::transmute(mapregisterbase), core::mem::transmute(mapregistersavailable)) } + unsafe { HalDmaAllocateCrashDumpRegistersEx(adapter, numberofmapregisters, r#type, mapregisterbase as _, mapregistersavailable as _) } } #[cfg(feature = "Win32_Storage_IscsiDisc")] #[inline] @@ -1190,7 +1190,7 @@ pub unsafe fn HalDmaFreeCrashDumpRegistersEx(adapter: *const super::super::super #[inline] pub unsafe fn HalExamineMBR(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, sectorsize: u32, mbrtypeidentifier: u32, buffer: *mut *mut core::ffi::c_void) { windows_targets::link!("ntoskrnl.exe" "system" fn HalExamineMBR(deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, sectorsize : u32, mbrtypeidentifier : u32, buffer : *mut *mut core::ffi::c_void)); - unsafe { HalExamineMBR(deviceobject, sectorsize, mbrtypeidentifier, core::mem::transmute(buffer)) } + unsafe { HalExamineMBR(deviceobject, sectorsize, mbrtypeidentifier, buffer as _) } } #[cfg(feature = "Win32_Storage_IscsiDisc")] #[inline] @@ -1207,22 +1207,22 @@ pub unsafe fn HalFreeHardwareCounters(countersethandle: super::super::super::Win #[inline] pub unsafe fn HalGetAdapter(devicedescription: *const DEVICE_DESCRIPTION, numberofmapregisters: *mut u32) -> *mut super::super::super::Win32::Storage::IscsiDisc::_ADAPTER_OBJECT { windows_targets::link!("hal.dll" "system" fn HalGetAdapter(devicedescription : *const DEVICE_DESCRIPTION, numberofmapregisters : *mut u32) -> *mut super::super::super::Win32::Storage::IscsiDisc:: _ADAPTER_OBJECT); - unsafe { HalGetAdapter(devicedescription, core::mem::transmute(numberofmapregisters)) } + unsafe { HalGetAdapter(devicedescription, numberofmapregisters as _) } } #[inline] pub unsafe fn HalGetBusData(busdatatype: BUS_DATA_TYPE, busnumber: u32, slotnumber: u32, buffer: *mut core::ffi::c_void, length: u32) -> u32 { windows_targets::link!("hal.dll" "system" fn HalGetBusData(busdatatype : BUS_DATA_TYPE, busnumber : u32, slotnumber : u32, buffer : *mut core::ffi::c_void, length : u32) -> u32); - unsafe { HalGetBusData(busdatatype, busnumber, slotnumber, core::mem::transmute(buffer), length) } + unsafe { HalGetBusData(busdatatype, busnumber, slotnumber, buffer as _, length) } } #[inline] pub unsafe fn HalGetBusDataByOffset(busdatatype: BUS_DATA_TYPE, busnumber: u32, slotnumber: u32, buffer: *mut core::ffi::c_void, offset: u32, length: u32) -> u32 { windows_targets::link!("hal.dll" "system" fn HalGetBusDataByOffset(busdatatype : BUS_DATA_TYPE, busnumber : u32, slotnumber : u32, buffer : *mut core::ffi::c_void, offset : u32, length : u32) -> u32); - unsafe { HalGetBusDataByOffset(busdatatype, busnumber, slotnumber, core::mem::transmute(buffer), offset, length) } + unsafe { HalGetBusDataByOffset(busdatatype, busnumber, slotnumber, buffer as _, offset, length) } } #[inline] pub unsafe fn HalGetInterruptVector(interfacetype: INTERFACE_TYPE, busnumber: u32, businterruptlevel: u32, businterruptvector: u32, irql: *mut u8, affinity: *mut usize) -> u32 { windows_targets::link!("hal.dll" "system" fn HalGetInterruptVector(interfacetype : INTERFACE_TYPE, busnumber : u32, businterruptlevel : u32, businterruptvector : u32, irql : *mut u8, affinity : *mut usize) -> u32); - unsafe { HalGetInterruptVector(interfacetype, busnumber, businterruptlevel, businterruptvector, core::mem::transmute(irql), core::mem::transmute(affinity)) } + unsafe { HalGetInterruptVector(interfacetype, busnumber, businterruptlevel, businterruptvector, irql as _, affinity as _) } } #[inline] pub unsafe fn HalMakeBeep(frequency: u32) -> bool { @@ -1248,7 +1248,7 @@ pub unsafe fn HalSetBusDataByOffset(busdatatype: BUS_DATA_TYPE, busnumber: u32, #[inline] pub unsafe fn HalTranslateBusAddress(interfacetype: INTERFACE_TYPE, busnumber: u32, busaddress: i64, addressspace: *mut u32, translatedaddress: *mut i64) -> bool { windows_targets::link!("hal.dll" "system" fn HalTranslateBusAddress(interfacetype : INTERFACE_TYPE, busnumber : u32, busaddress : i64, addressspace : *mut u32, translatedaddress : *mut i64) -> bool); - unsafe { HalTranslateBusAddress(interfacetype, busnumber, busaddress, core::mem::transmute(addressspace), core::mem::transmute(translatedaddress)) } + unsafe { HalTranslateBusAddress(interfacetype, busnumber, busaddress, addressspace as _, translatedaddress as _) } } #[inline] pub unsafe fn HvlRegisterWheaErrorNotification(callback: PHVL_WHEA_ERROR_NOTIFICATION) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -1273,13 +1273,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); - unsafe { IoAcquireKsrPersistentMemory(driverobject, core::mem::transmute(physicaldeviceobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer), core::mem::transmute(size)) } + unsafe { IoAcquireKsrPersistentMemory(driverobject, physicaldeviceobject.unwrap_or(core::mem::zeroed()) as _, buffer as _, size as _) } } #[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); - unsafe { IoAcquireKsrPersistentMemoryEx(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)) } + unsafe { IoAcquireKsrPersistentMemoryEx(driverobject, physicaldeviceobject.unwrap_or(core::mem::zeroed()) as _, physicaldeviceid.unwrap_or(core::mem::zeroed()) as _, datatag.unwrap_or(core::mem::zeroed()) as _, dataversion.unwrap_or(core::mem::zeroed()) as _, buffer as _, size as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -1288,7 +1288,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); - unsafe { IoAcquireRemoveLockEx(core::mem::transmute(removelock), core::mem::transmute(tag.unwrap_or(core::mem::zeroed())), file.param().abi(), line, remlocksize) } + unsafe { IoAcquireRemoveLockEx(removelock as _, tag.unwrap_or(core::mem::zeroed()) as _, file.param().abi(), line, remlocksize) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_Storage_IscsiDisc", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1300,13 +1300,13 @@ 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)); - unsafe { IoAllocateController(controllerobject, deviceobject, executionroutine, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } + unsafe { IoAllocateController(controllerobject, deviceobject, executionroutine, context.unwrap_or(core::mem::zeroed()) as _) } } #[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 IoAllocateDriverObjectExtension(driverobject: *const super::super::Foundation::DRIVER_OBJECT, clientidentificationaddress: *const core::ffi::c_void, driverobjectextensionsize: u32, driverobjectextension: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoAllocateDriverObjectExtension(driverobject : *const super::super::Foundation:: DRIVER_OBJECT, clientidentificationaddress : *const core::ffi::c_void, driverobjectextensionsize : u32, driverobjectextension : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoAllocateDriverObjectExtension(driverobject, clientidentificationaddress, driverobjectextensionsize, core::mem::transmute(driverobjectextension)) } + unsafe { IoAllocateDriverObjectExtension(driverobject, clientidentificationaddress, driverobjectextensionsize, driverobjectextension as _) } } #[inline] pub unsafe fn IoAllocateErrorLogEntry(ioobject: *const core::ffi::c_void, entrysize: u8) -> *mut core::ffi::c_void { @@ -1329,13 +1329,13 @@ pub unsafe fn IoAllocateIrpEx(deviceobject: *const super::super::Foundation::DEV #[inline] pub unsafe fn IoAllocateMdl(virtualaddress: Option<*const core::ffi::c_void>, length: u32, secondarybuffer: bool, chargequota: bool, irp: Option<*mut super::super::Foundation::IRP>) -> *mut super::super::Foundation::MDL { windows_targets::link!("ntoskrnl.exe" "system" fn IoAllocateMdl(virtualaddress : *const core::ffi::c_void, length : u32, secondarybuffer : bool, chargequota : bool, irp : *mut super::super::Foundation:: IRP) -> *mut super::super::Foundation:: MDL); - unsafe { IoAllocateMdl(core::mem::transmute(virtualaddress.unwrap_or(core::mem::zeroed())), length, secondarybuffer, chargequota, core::mem::transmute(irp.unwrap_or(core::mem::zeroed()))) } + unsafe { IoAllocateMdl(virtualaddress.unwrap_or(core::mem::zeroed()) as _, length, secondarybuffer, chargequota, irp.unwrap_or(core::mem::zeroed()) as _) } } #[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 IoAllocateSfioStreamIdentifier(fileobject: *const super::super::Foundation::FILE_OBJECT, length: u32, signature: *const core::ffi::c_void, streamidentifier: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoAllocateSfioStreamIdentifier(fileobject : *const super::super::Foundation:: FILE_OBJECT, length : u32, signature : *const core::ffi::c_void, streamidentifier : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoAllocateSfioStreamIdentifier(fileobject, length, signature, core::mem::transmute(streamidentifier)) } + unsafe { IoAllocateSfioStreamIdentifier(fileobject, length, signature, streamidentifier as _) } } #[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] @@ -1347,13 +1347,13 @@ 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); - unsafe { IoAssignResources(registrypath, core::mem::transmute(driverclassname.unwrap_or(core::mem::zeroed())), driverobject, core::mem::transmute(deviceobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(requestedresources.unwrap_or(core::mem::zeroed())), core::mem::transmute(allocatedresources)) } + unsafe { IoAssignResources(registrypath, driverclassname.unwrap_or(core::mem::zeroed()) as _, driverobject, deviceobject.unwrap_or(core::mem::zeroed()) as _, requestedresources.unwrap_or(core::mem::zeroed()) as _, allocatedresources as _) } } #[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 IoAttachDevice(sourcedevice: *const super::super::Foundation::DEVICE_OBJECT, targetdevice: *const super::super::super::Win32::Foundation::UNICODE_STRING, attacheddevice: *mut *mut super::super::Foundation::DEVICE_OBJECT) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoAttachDevice(sourcedevice : *const super::super::Foundation:: DEVICE_OBJECT, targetdevice : *const super::super::super::Win32::Foundation:: UNICODE_STRING, attacheddevice : *mut *mut super::super::Foundation:: DEVICE_OBJECT) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoAttachDevice(sourcedevice, targetdevice, core::mem::transmute(attacheddevice)) } + unsafe { IoAttachDevice(sourcedevice, targetdevice, attacheddevice as _) } } #[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] @@ -1371,31 +1371,31 @@ pub unsafe fn IoAttachDeviceToDeviceStack(sourcedevice: *const super::super::Fou #[inline] pub unsafe fn IoAttachDeviceToDeviceStackSafe(sourcedevice: *const super::super::Foundation::DEVICE_OBJECT, targetdevice: *const super::super::Foundation::DEVICE_OBJECT, attachedtodeviceobject: *mut *mut super::super::Foundation::DEVICE_OBJECT) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoAttachDeviceToDeviceStackSafe(sourcedevice : *const super::super::Foundation:: DEVICE_OBJECT, targetdevice : *const super::super::Foundation:: DEVICE_OBJECT, attachedtodeviceobject : *mut *mut super::super::Foundation:: DEVICE_OBJECT) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoAttachDeviceToDeviceStackSafe(sourcedevice, targetdevice, core::mem::transmute(attachedtodeviceobject)) } + unsafe { IoAttachDeviceToDeviceStackSafe(sourcedevice, targetdevice, attachedtodeviceobject as _) } } #[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: 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); - unsafe { IoBuildAsynchronousFsdRequest(majorfunction, 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()))) } + unsafe { IoBuildAsynchronousFsdRequest(majorfunction, deviceobject, buffer.unwrap_or(core::mem::zeroed()) as _, length.unwrap_or(core::mem::zeroed()) as _, startingoffset.unwrap_or(core::mem::zeroed()) as _, iostatusblock.unwrap_or(core::mem::zeroed()) as _) } } #[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 IoBuildDeviceIoControlRequest(iocontrolcode: u32, deviceobject: *const super::super::Foundation::DEVICE_OBJECT, inputbuffer: Option<*const core::ffi::c_void>, inputbufferlength: u32, outputbuffer: Option<*mut core::ffi::c_void>, outputbufferlength: u32, internaldeviceiocontrol: bool, event: Option<*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 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 : bool, event : *const super::super::Foundation:: KEVENT, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK) -> *mut super::super::Foundation:: IRP); - unsafe { IoBuildDeviceIoControlRequest(iocontrolcode, deviceobject, core::mem::transmute(inputbuffer.unwrap_or(core::mem::zeroed())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(core::mem::zeroed())), outputbufferlength, internaldeviceiocontrol, core::mem::transmute(event.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock)) } + unsafe { IoBuildDeviceIoControlRequest(iocontrolcode, deviceobject, inputbuffer.unwrap_or(core::mem::zeroed()) as _, inputbufferlength, outputbuffer.unwrap_or(core::mem::zeroed()) as _, outputbufferlength, internaldeviceiocontrol, event.unwrap_or(core::mem::zeroed()) as _, iostatusblock as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn IoBuildPartialMdl(sourcemdl: *const super::super::Foundation::MDL, targetmdl: *mut super::super::Foundation::MDL, virtualaddress: *mut core::ffi::c_void, length: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn IoBuildPartialMdl(sourcemdl : *const super::super::Foundation:: MDL, targetmdl : *mut super::super::Foundation:: MDL, virtualaddress : *mut core::ffi::c_void, length : u32)); - unsafe { IoBuildPartialMdl(sourcemdl, core::mem::transmute(targetmdl), core::mem::transmute(virtualaddress), length) } + unsafe { IoBuildPartialMdl(sourcemdl, targetmdl as _, virtualaddress as _, length) } } #[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 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); - unsafe { IoBuildSynchronousFsdRequest(majorfunction, deviceobject, core::mem::transmute(buffer), length, core::mem::transmute(startingoffset.unwrap_or(core::mem::zeroed())), event, core::mem::transmute(iostatusblock)) } + unsafe { IoBuildSynchronousFsdRequest(majorfunction, deviceobject, buffer as _, length, startingoffset.unwrap_or(core::mem::zeroed()) as _, event, iostatusblock as _) } } #[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] @@ -1413,25 +1413,25 @@ pub unsafe fn IoCancelIrp(irp: *const super::super::Foundation::IRP) -> bool { #[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); - unsafe { IoCheckLinkShareAccess(desiredaccess, 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())), ioshareaccessflags) } + unsafe { IoCheckLinkShareAccess(desiredaccess, desiredshareaccess, fileobject.unwrap_or(core::mem::zeroed()) as _, shareaccess.unwrap_or(core::mem::zeroed()) as _, linkshareaccess.unwrap_or(core::mem::zeroed()) as _, 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 IoCheckShareAccess(desiredaccess: u32, desiredshareaccess: u32, fileobject: *mut super::super::Foundation::FILE_OBJECT, shareaccess: *mut SHARE_ACCESS, update: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoCheckShareAccess(desiredaccess : u32, desiredshareaccess : u32, fileobject : *mut super::super::Foundation:: FILE_OBJECT, shareaccess : *mut SHARE_ACCESS, update : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoCheckShareAccess(desiredaccess, desiredshareaccess, core::mem::transmute(fileobject), core::mem::transmute(shareaccess), update) } + unsafe { IoCheckShareAccess(desiredaccess, desiredshareaccess, fileobject as _, shareaccess as _, update) } } #[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 IoCheckShareAccessEx(desiredaccess: u32, desiredshareaccess: u32, fileobject: *mut super::super::Foundation::FILE_OBJECT, shareaccess: *mut SHARE_ACCESS, update: bool, writepermission: Option<*const bool>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoCheckShareAccessEx(desiredaccess : u32, desiredshareaccess : u32, fileobject : *mut super::super::Foundation:: FILE_OBJECT, shareaccess : *mut SHARE_ACCESS, update : bool, writepermission : *const bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoCheckShareAccessEx(desiredaccess, desiredshareaccess, core::mem::transmute(fileobject), core::mem::transmute(shareaccess), update, core::mem::transmute(writepermission.unwrap_or(core::mem::zeroed()))) } + unsafe { IoCheckShareAccessEx(desiredaccess, desiredshareaccess, fileobject as _, shareaccess as _, update, writepermission.unwrap_or(core::mem::zeroed()) as _) } } #[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 IoCleanupIrp(irp: *mut super::super::Foundation::IRP) { windows_targets::link!("ntoskrnl.exe" "system" fn IoCleanupIrp(irp : *mut super::super::Foundation:: IRP)); - unsafe { IoCleanupIrp(core::mem::transmute(irp)) } + unsafe { IoCleanupIrp(irp as _) } } #[inline] pub unsafe fn IoClearActivityIdThread(originalid: *const windows_core::GUID) { @@ -1442,19 +1442,19 @@ pub unsafe fn IoClearActivityIdThread(originalid: *const windows_core::GUID) { #[inline] pub unsafe fn IoClearIrpExtraCreateParameter(irp: *mut super::super::Foundation::IRP) { windows_targets::link!("ntoskrnl.exe" "system" fn IoClearIrpExtraCreateParameter(irp : *mut super::super::Foundation:: IRP)); - unsafe { IoClearIrpExtraCreateParameter(core::mem::transmute(irp)) } + unsafe { IoClearIrpExtraCreateParameter(irp as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn IoConnectInterrupt(interruptobject: *mut super::super::Foundation::PKINTERRUPT, serviceroutine: PKSERVICE_ROUTINE, servicecontext: Option<*const core::ffi::c_void>, spinlock: Option<*const usize>, vector: u32, irql: u8, synchronizeirql: u8, interruptmode: KINTERRUPT_MODE, sharevector: bool, processorenablemask: usize, floatingsave: bool) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, processorenablemask : usize, floatingsave : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoConnectInterrupt(core::mem::transmute(interruptobject), serviceroutine, core::mem::transmute(servicecontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(spinlock.unwrap_or(core::mem::zeroed())), vector, irql, synchronizeirql, interruptmode, sharevector, processorenablemask, floatingsave) } + unsafe { IoConnectInterrupt(interruptobject as _, serviceroutine, servicecontext.unwrap_or(core::mem::zeroed()) as _, spinlock.unwrap_or(core::mem::zeroed()) as _, vector, irql, synchronizeirql, interruptmode, sharevector, processorenablemask, floatingsave) } } #[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 IoConnectInterruptEx(parameters: *mut IO_CONNECT_INTERRUPT_PARAMETERS) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoConnectInterruptEx(parameters : *mut IO_CONNECT_INTERRUPT_PARAMETERS) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoConnectInterruptEx(core::mem::transmute(parameters)) } + unsafe { IoConnectInterruptEx(parameters as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -1466,37 +1466,37 @@ pub unsafe fn IoCreateController(size: u32) -> *mut CONTROLLER_OBJECT { #[inline] pub unsafe fn IoCreateDevice(driverobject: *const super::super::Foundation::DRIVER_OBJECT, deviceextensionsize: u32, devicename: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, devicetype: u32, devicecharacteristics: u32, exclusive: bool, deviceobject: *mut *mut super::super::Foundation::DEVICE_OBJECT) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, deviceobject : *mut *mut super::super::Foundation:: DEVICE_OBJECT) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoCreateDevice(driverobject, deviceextensionsize, core::mem::transmute(devicename.unwrap_or(core::mem::zeroed())), devicetype, devicecharacteristics, exclusive, core::mem::transmute(deviceobject)) } + unsafe { IoCreateDevice(driverobject, deviceextensionsize, devicename.unwrap_or(core::mem::zeroed()) as _, devicetype, devicecharacteristics, exclusive, deviceobject as _) } } #[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); - unsafe { IoCreateDisk(deviceobject, core::mem::transmute(disk.unwrap_or(core::mem::zeroed()))) } + unsafe { IoCreateDisk(deviceobject, disk.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", feature = "Win32_System_IO"))] #[inline] pub unsafe fn IoCreateFile(filehandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, allocationsize: Option<*const i64>, fileattributes: u32, shareaccess: u32, disposition: u32, createoptions: u32, eabuffer: Option<*const core::ffi::c_void>, ealength: u32, createfiletype: CREATE_FILE_TYPE, internalparameters: Option<*const core::ffi::c_void>, options: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoCreateFile(filehandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, allocationsize : *const i64, fileattributes : u32, shareaccess : u32, disposition : u32, createoptions : u32, eabuffer : *const core::ffi::c_void, ealength : u32, createfiletype : CREATE_FILE_TYPE, internalparameters : *const core::ffi::c_void, options : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoCreateFile(core::mem::transmute(filehandle), desiredaccess, objectattributes, core::mem::transmute(iostatusblock), core::mem::transmute(allocationsize.unwrap_or(core::mem::zeroed())), fileattributes, shareaccess, disposition, createoptions, core::mem::transmute(eabuffer.unwrap_or(core::mem::zeroed())), ealength, createfiletype, core::mem::transmute(internalparameters.unwrap_or(core::mem::zeroed())), options) } + unsafe { IoCreateFile(filehandle as _, desiredaccess, objectattributes, iostatusblock as _, allocationsize.unwrap_or(core::mem::zeroed()) as _, fileattributes, shareaccess, disposition, createoptions, eabuffer.unwrap_or(core::mem::zeroed()) as _, ealength, createfiletype, internalparameters.unwrap_or(core::mem::zeroed()) as _, options) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", feature = "Win32_System_IO"))] #[inline] pub unsafe fn IoCreateFileEx(filehandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, allocationsize: Option<*const i64>, fileattributes: u32, shareaccess: u32, disposition: u32, createoptions: u32, eabuffer: Option<*const core::ffi::c_void>, ealength: u32, createfiletype: CREATE_FILE_TYPE, internalparameters: Option<*const core::ffi::c_void>, options: u32, drivercontext: Option<*const IO_DRIVER_CREATE_CONTEXT>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoCreateFileEx(filehandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, allocationsize : *const i64, fileattributes : u32, shareaccess : u32, disposition : u32, createoptions : u32, eabuffer : *const core::ffi::c_void, ealength : u32, createfiletype : CREATE_FILE_TYPE, internalparameters : *const core::ffi::c_void, options : u32, drivercontext : *const IO_DRIVER_CREATE_CONTEXT) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoCreateFileEx(core::mem::transmute(filehandle), desiredaccess, objectattributes, core::mem::transmute(iostatusblock), core::mem::transmute(allocationsize.unwrap_or(core::mem::zeroed())), fileattributes, shareaccess, disposition, createoptions, core::mem::transmute(eabuffer.unwrap_or(core::mem::zeroed())), ealength, createfiletype, core::mem::transmute(internalparameters.unwrap_or(core::mem::zeroed())), options, core::mem::transmute(drivercontext.unwrap_or(core::mem::zeroed()))) } + unsafe { IoCreateFileEx(filehandle as _, desiredaccess, objectattributes, iostatusblock as _, allocationsize.unwrap_or(core::mem::zeroed()) as _, fileattributes, shareaccess, disposition, createoptions, eabuffer.unwrap_or(core::mem::zeroed()) as _, ealength, createfiletype, internalparameters.unwrap_or(core::mem::zeroed()) as _, options, drivercontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", feature = "Win32_System_IO"))] #[inline] pub unsafe fn IoCreateFileSpecifyDeviceObjectHint(filehandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, allocationsize: Option<*const i64>, fileattributes: u32, shareaccess: u32, disposition: u32, createoptions: u32, eabuffer: Option<*const core::ffi::c_void>, ealength: u32, createfiletype: CREATE_FILE_TYPE, internalparameters: Option<*const core::ffi::c_void>, options: u32, deviceobject: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoCreateFileSpecifyDeviceObjectHint(filehandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, allocationsize : *const i64, fileattributes : u32, shareaccess : u32, disposition : u32, createoptions : u32, eabuffer : *const core::ffi::c_void, ealength : u32, createfiletype : CREATE_FILE_TYPE, internalparameters : *const core::ffi::c_void, options : u32, deviceobject : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoCreateFileSpecifyDeviceObjectHint(core::mem::transmute(filehandle), desiredaccess, objectattributes, core::mem::transmute(iostatusblock), core::mem::transmute(allocationsize.unwrap_or(core::mem::zeroed())), fileattributes, shareaccess, disposition, createoptions, core::mem::transmute(eabuffer.unwrap_or(core::mem::zeroed())), ealength, createfiletype, core::mem::transmute(internalparameters.unwrap_or(core::mem::zeroed())), options, core::mem::transmute(deviceobject.unwrap_or(core::mem::zeroed()))) } + unsafe { IoCreateFileSpecifyDeviceObjectHint(filehandle as _, desiredaccess, objectattributes, iostatusblock as _, allocationsize.unwrap_or(core::mem::zeroed()) as _, fileattributes, shareaccess, disposition, createoptions, eabuffer.unwrap_or(core::mem::zeroed()) as _, ealength, createfiletype, internalparameters.unwrap_or(core::mem::zeroed()) as _, options, deviceobject.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn IoCreateNotificationEvent(eventname: *const super::super::super::Win32::Foundation::UNICODE_STRING, eventhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> *mut super::super::Foundation::KEVENT { windows_targets::link!("ntoskrnl.exe" "system" fn IoCreateNotificationEvent(eventname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, eventhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> *mut super::super::Foundation:: KEVENT); - unsafe { IoCreateNotificationEvent(eventname, core::mem::transmute(eventhandle)) } + unsafe { IoCreateNotificationEvent(eventname, eventhandle as _) } } #[inline] pub unsafe fn IoCreateSymbolicLink(symboliclinkname: *const super::super::super::Win32::Foundation::UNICODE_STRING, devicename: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -1507,13 +1507,13 @@ pub unsafe fn IoCreateSymbolicLink(symboliclinkname: *const super::super::super: #[inline] pub unsafe fn IoCreateSynchronizationEvent(eventname: *const super::super::super::Win32::Foundation::UNICODE_STRING, eventhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> *mut super::super::Foundation::KEVENT { windows_targets::link!("ntoskrnl.exe" "system" fn IoCreateSynchronizationEvent(eventname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, eventhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> *mut super::super::Foundation:: KEVENT); - unsafe { IoCreateSynchronizationEvent(eventname, core::mem::transmute(eventhandle)) } + unsafe { IoCreateSynchronizationEvent(eventname, eventhandle as _) } } #[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: 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); - unsafe { IoCreateSystemThread(core::mem::transmute(ioobject), core::mem::transmute(threadhandle), 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())), startroutine, core::mem::transmute(startcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { IoCreateSystemThread(ioobject as _, threadhandle as _, desiredaccess, objectattributes.unwrap_or(core::mem::zeroed()) as _, processhandle.unwrap_or(core::mem::zeroed()) as _, clientid.unwrap_or(core::mem::zeroed()) as _, startroutine, startcontext.unwrap_or(core::mem::zeroed()) as _) } } #[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 { @@ -1524,43 +1524,43 @@ pub unsafe fn IoCreateUnprotectedSymbolicLink(symboliclinkname: *const super::su #[inline] pub unsafe fn IoCsqInitialize(csq: *mut IO_CSQ, csqinsertirp: PIO_CSQ_INSERT_IRP, csqremoveirp: PIO_CSQ_REMOVE_IRP, csqpeeknextirp: PIO_CSQ_PEEK_NEXT_IRP, csqacquirelock: PIO_CSQ_ACQUIRE_LOCK, csqreleaselock: PIO_CSQ_RELEASE_LOCK, csqcompletecanceledirp: PIO_CSQ_COMPLETE_CANCELED_IRP) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoCsqInitialize(csq : *mut IO_CSQ, csqinsertirp : PIO_CSQ_INSERT_IRP, csqremoveirp : PIO_CSQ_REMOVE_IRP, csqpeeknextirp : PIO_CSQ_PEEK_NEXT_IRP, csqacquirelock : PIO_CSQ_ACQUIRE_LOCK, csqreleaselock : PIO_CSQ_RELEASE_LOCK, csqcompletecanceledirp : PIO_CSQ_COMPLETE_CANCELED_IRP) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoCsqInitialize(core::mem::transmute(csq), csqinsertirp, csqremoveirp, csqpeeknextirp, csqacquirelock, csqreleaselock, csqcompletecanceledirp) } + unsafe { IoCsqInitialize(csq as _, csqinsertirp, csqremoveirp, csqpeeknextirp, csqacquirelock, csqreleaselock, csqcompletecanceledirp) } } #[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 IoCsqInitializeEx(csq: *mut IO_CSQ, csqinsertirp: PIO_CSQ_INSERT_IRP_EX, csqremoveirp: PIO_CSQ_REMOVE_IRP, csqpeeknextirp: PIO_CSQ_PEEK_NEXT_IRP, csqacquirelock: PIO_CSQ_ACQUIRE_LOCK, csqreleaselock: PIO_CSQ_RELEASE_LOCK, csqcompletecanceledirp: PIO_CSQ_COMPLETE_CANCELED_IRP) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoCsqInitializeEx(csq : *mut IO_CSQ, csqinsertirp : PIO_CSQ_INSERT_IRP_EX, csqremoveirp : PIO_CSQ_REMOVE_IRP, csqpeeknextirp : PIO_CSQ_PEEK_NEXT_IRP, csqacquirelock : PIO_CSQ_ACQUIRE_LOCK, csqreleaselock : PIO_CSQ_RELEASE_LOCK, csqcompletecanceledirp : PIO_CSQ_COMPLETE_CANCELED_IRP) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoCsqInitializeEx(core::mem::transmute(csq), csqinsertirp, csqremoveirp, csqpeeknextirp, csqacquirelock, csqreleaselock, csqcompletecanceledirp) } + unsafe { IoCsqInitializeEx(csq as _, csqinsertirp, csqremoveirp, csqpeeknextirp, csqacquirelock, csqreleaselock, csqcompletecanceledirp) } } #[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 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)); - unsafe { IoCsqInsertIrp(core::mem::transmute(csq), core::mem::transmute(irp), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } + unsafe { IoCsqInsertIrp(csq as _, irp as _, context.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { 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()))) } + unsafe { IoCsqInsertIrpEx(csq as _, irp as _, context.unwrap_or(core::mem::zeroed()) as _, insertcontext.unwrap_or(core::mem::zeroed()) as _) } } #[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 IoCsqRemoveIrp(csq: *mut IO_CSQ, context: *mut IO_CSQ_IRP_CONTEXT) -> *mut super::super::Foundation::IRP { windows_targets::link!("ntoskrnl.exe" "system" fn IoCsqRemoveIrp(csq : *mut IO_CSQ, context : *mut IO_CSQ_IRP_CONTEXT) -> *mut super::super::Foundation:: IRP); - unsafe { IoCsqRemoveIrp(core::mem::transmute(csq), core::mem::transmute(context)) } + unsafe { IoCsqRemoveIrp(csq as _, context as _) } } #[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 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); - unsafe { IoCsqRemoveNextIrp(core::mem::transmute(csq), core::mem::transmute(peekcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { IoCsqRemoveNextIrp(csq as _, peekcontext.unwrap_or(core::mem::zeroed()) as _) } } #[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: 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); - unsafe { IoDecrementKeepAliveCount(core::mem::transmute(fileobject), process) } + unsafe { IoDecrementKeepAliveCount(fileobject as _, process) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -1583,7 +1583,7 @@ pub unsafe fn IoDeleteSymbolicLink(symboliclinkname: *const super::super::super: #[inline] pub unsafe fn IoDetachDevice(targetdevice: *mut super::super::Foundation::DEVICE_OBJECT) { windows_targets::link!("ntoskrnl.exe" "system" fn IoDetachDevice(targetdevice : *mut super::super::Foundation:: DEVICE_OBJECT)); - unsafe { IoDetachDevice(core::mem::transmute(targetdevice)) } + unsafe { IoDetachDevice(targetdevice as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -1601,7 +1601,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); - unsafe { IoEnumerateKsrPersistentMemoryEx(driverobject, core::mem::transmute(physicaldeviceobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(physicaldeviceid.unwrap_or(core::mem::zeroed())), callback, callbackcontext) } + unsafe { IoEnumerateKsrPersistentMemoryEx(driverobject, physicaldeviceobject.unwrap_or(core::mem::zeroed()) as _, physicaldeviceid.unwrap_or(core::mem::zeroed()) as _, callback, callbackcontext) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Storage_IscsiDisc"))] #[inline] @@ -1653,7 +1653,7 @@ pub unsafe fn IoFreeMapRegisters(adapterobject: *const super::super::super::Win3 #[inline] pub unsafe fn IoFreeMdl(mdl: *mut super::super::Foundation::MDL) { windows_targets::link!("ntoskrnl.exe" "system" fn IoFreeMdl(mdl : *mut super::super::Foundation:: MDL)); - unsafe { IoFreeMdl(core::mem::transmute(mdl)) } + unsafe { IoFreeMdl(mdl as _) } } #[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] @@ -1671,7 +1671,7 @@ pub unsafe fn IoFreeWorkItem(ioworkitem: super::super::Foundation::PIO_WORKITEM) #[inline] pub unsafe fn IoGetActivityIdIrp(irp: *const super::super::Foundation::IRP, guid: *mut windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoGetActivityIdIrp(irp : *const super::super::Foundation:: IRP, guid : *mut windows_core::GUID) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoGetActivityIdIrp(irp, core::mem::transmute(guid)) } + unsafe { IoGetActivityIdIrp(irp, guid as _) } } #[inline] pub unsafe fn IoGetActivityIdThread() -> *mut windows_core::GUID { @@ -1682,7 +1682,7 @@ pub unsafe fn IoGetActivityIdThread() -> *mut windows_core::GUID { #[inline] 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); - unsafe { IoGetAffinityInterrupt(interruptobject, core::mem::transmute(groupaffinity)) } + unsafe { IoGetAffinityInterrupt(interruptobject, groupaffinity as _) } } #[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] @@ -1693,12 +1693,12 @@ pub unsafe fn IoGetAttachedDeviceReference(deviceobject: *const super::super::Fo #[inline] pub unsafe fn IoGetBootDiskInformation(bootdiskinformation: *mut BOOTDISK_INFORMATION, size: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoGetBootDiskInformation(bootdiskinformation : *mut BOOTDISK_INFORMATION, size : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoGetBootDiskInformation(core::mem::transmute(bootdiskinformation), size) } + unsafe { IoGetBootDiskInformation(bootdiskinformation as _, size) } } #[inline] pub unsafe fn IoGetBootDiskInformationLite(bootdiskinformation: *mut *mut BOOTDISK_INFORMATION_LITE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoGetBootDiskInformationLite(bootdiskinformation : *mut *mut BOOTDISK_INFORMATION_LITE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoGetBootDiskInformationLite(core::mem::transmute(bootdiskinformation)) } + unsafe { IoGetBootDiskInformationLite(bootdiskinformation as _) } } #[inline] pub unsafe fn IoGetConfigurationInformation() -> *mut CONFIGURATION_INFORMATION { @@ -1708,7 +1708,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); - unsafe { IoGetContainerInformation(informationclass, core::mem::transmute(containerobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), bufferlength) } + unsafe { IoGetContainerInformation(informationclass, containerobject.unwrap_or(core::mem::zeroed()) as _, buffer.unwrap_or(core::mem::zeroed()) as _, bufferlength) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -1720,60 +1720,60 @@ pub unsafe fn IoGetCurrentProcess() -> super::super::Foundation::PEPROCESS { #[inline] pub unsafe fn IoGetDeviceDirectory(physicaldeviceobject: *const super::super::Foundation::DEVICE_OBJECT, directorytype: DEVICE_DIRECTORY_TYPE, flags: u32, reserved: *const core::ffi::c_void, devicedirectoryhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoGetDeviceDirectory(physicaldeviceobject : *const super::super::Foundation:: DEVICE_OBJECT, directorytype : DEVICE_DIRECTORY_TYPE, flags : u32, reserved : *const core::ffi::c_void, devicedirectoryhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoGetDeviceDirectory(physicaldeviceobject, directorytype, flags, reserved, core::mem::transmute(devicedirectoryhandle)) } + unsafe { IoGetDeviceDirectory(physicaldeviceobject, directorytype, flags, reserved, devicedirectoryhandle as _) } } #[inline] pub unsafe fn IoGetDeviceInterfaceAlias(symboliclinkname: *const super::super::super::Win32::Foundation::UNICODE_STRING, aliasinterfaceclassguid: *const windows_core::GUID, aliassymboliclinkname: *mut super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoGetDeviceInterfaceAlias(symboliclinkname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, aliasinterfaceclassguid : *const windows_core::GUID, aliassymboliclinkname : *mut super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoGetDeviceInterfaceAlias(symboliclinkname, aliasinterfaceclassguid, core::mem::transmute(aliassymboliclinkname)) } + unsafe { IoGetDeviceInterfaceAlias(symboliclinkname, aliasinterfaceclassguid, aliassymboliclinkname as _) } } #[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: 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); - unsafe { IoGetDeviceInterfacePropertyData(symboliclinkname, propertykey, lcid, core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), size, core::mem::transmute(data), core::mem::transmute(requiredsize), core::mem::transmute(r#type)) } + unsafe { IoGetDeviceInterfacePropertyData(symboliclinkname, propertykey, lcid, flags.unwrap_or(core::mem::zeroed()) as _, size, data as _, requiredsize as _, r#type as _) } } #[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); - unsafe { IoGetDeviceInterfaces(interfaceclassguid, core::mem::transmute(physicaldeviceobject.unwrap_or(core::mem::zeroed())), flags, core::mem::transmute(symboliclinklist)) } + unsafe { IoGetDeviceInterfaces(interfaceclassguid, physicaldeviceobject.unwrap_or(core::mem::zeroed()) as _, flags, symboliclinklist as _) } } #[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 IoGetDeviceNumaNode(pdo: *const super::super::Foundation::DEVICE_OBJECT, nodenumber: *mut u16) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoGetDeviceNumaNode(pdo : *const super::super::Foundation:: DEVICE_OBJECT, nodenumber : *mut u16) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoGetDeviceNumaNode(pdo, core::mem::transmute(nodenumber)) } + unsafe { IoGetDeviceNumaNode(pdo, nodenumber as _) } } #[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 IoGetDeviceObjectPointer(objectname: *const super::super::super::Win32::Foundation::UNICODE_STRING, desiredaccess: u32, fileobject: *mut *mut super::super::Foundation::FILE_OBJECT, deviceobject: *mut *mut super::super::Foundation::DEVICE_OBJECT) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoGetDeviceObjectPointer(objectname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, desiredaccess : u32, fileobject : *mut *mut super::super::Foundation:: FILE_OBJECT, deviceobject : *mut *mut super::super::Foundation:: DEVICE_OBJECT) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoGetDeviceObjectPointer(objectname, desiredaccess, core::mem::transmute(fileobject), core::mem::transmute(deviceobject)) } + unsafe { IoGetDeviceObjectPointer(objectname, desiredaccess, fileobject as _, deviceobject as _) } } #[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 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); - unsafe { IoGetDeviceProperty(deviceobject, deviceproperty, bufferlength, core::mem::transmute(propertybuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(resultlength)) } + unsafe { IoGetDeviceProperty(deviceobject, deviceproperty, bufferlength, propertybuffer.unwrap_or(core::mem::zeroed()) as _, resultlength as _) } } #[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: 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); - unsafe { IoGetDevicePropertyData(pdo, propertykey, lcid, core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), size, core::mem::transmute(data), core::mem::transmute(requiredsize), core::mem::transmute(r#type)) } + unsafe { IoGetDevicePropertyData(pdo, propertykey, lcid, flags.unwrap_or(core::mem::zeroed()) as _, size, data as _, requiredsize as _, r#type as _) } } #[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); - unsafe { IoGetDmaAdapter(core::mem::transmute(physicaldeviceobject.unwrap_or(core::mem::zeroed())), devicedescription, core::mem::transmute(numberofmapregisters)) } + unsafe { IoGetDmaAdapter(physicaldeviceobject.unwrap_or(core::mem::zeroed()) as _, devicedescription, numberofmapregisters as _) } } #[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 IoGetDriverDirectory(driverobject: *const super::super::Foundation::DRIVER_OBJECT, directorytype: DRIVER_DIRECTORY_TYPE, flags: u32, driverdirectoryhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoGetDriverDirectory(driverobject : *const super::super::Foundation:: DRIVER_OBJECT, directorytype : DRIVER_DIRECTORY_TYPE, flags : u32, driverdirectoryhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoGetDriverDirectory(driverobject, directorytype, flags, core::mem::transmute(driverdirectoryhandle)) } + unsafe { IoGetDriverDirectory(driverobject, directorytype, flags, driverdirectoryhandle as _) } } #[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] @@ -1791,7 +1791,7 @@ pub unsafe fn IoGetFileObjectGenericMapping() -> *mut super::super::super::Win32 #[inline] pub unsafe fn IoGetFsZeroingOffset(irp: *const super::super::Foundation::IRP, zeroingoffset: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoGetFsZeroingOffset(irp : *const super::super::Foundation:: IRP, zeroingoffset : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoGetFsZeroingOffset(irp, core::mem::transmute(zeroingoffset)) } + unsafe { IoGetFsZeroingOffset(irp, zeroingoffset as _) } } #[inline] pub unsafe fn IoGetInitialStack() -> *mut core::ffi::c_void { @@ -1808,7 +1808,7 @@ pub unsafe fn IoGetInitiatorProcess(fileobject: *const super::super::Foundation: #[inline] pub unsafe fn IoGetIoAttributionHandle(irp: *const super::super::Foundation::IRP, ioattributionhandle: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoGetIoAttributionHandle(irp : *const super::super::Foundation:: IRP, ioattributionhandle : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoGetIoAttributionHandle(irp, core::mem::transmute(ioattributionhandle)) } + unsafe { IoGetIoAttributionHandle(irp, ioattributionhandle as _) } } #[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] @@ -1819,18 +1819,18 @@ pub unsafe fn IoGetIoPriorityHint(irp: *const super::super::Foundation::IRP) -> #[inline] pub unsafe fn IoGetIommuInterface(version: u32, interfaceout: *mut DMA_IOMMU_INTERFACE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoGetIommuInterface(version : u32, interfaceout : *mut DMA_IOMMU_INTERFACE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoGetIommuInterface(version, core::mem::transmute(interfaceout)) } + unsafe { IoGetIommuInterface(version, interfaceout as _) } } #[inline] pub unsafe fn IoGetIommuInterfaceEx(version: u32, flags: u64, interfaceout: *mut DMA_IOMMU_INTERFACE_EX) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoGetIommuInterfaceEx(version : u32, flags : u64, interfaceout : *mut DMA_IOMMU_INTERFACE_EX) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoGetIommuInterfaceEx(version, flags, core::mem::transmute(interfaceout)) } + unsafe { IoGetIommuInterfaceEx(version, flags, interfaceout as _) } } #[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 IoGetIrpExtraCreateParameter(irp: *const super::super::Foundation::IRP, extracreateparameter: *mut *mut isize) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoGetIrpExtraCreateParameter(irp : *const super::super::Foundation:: IRP, extracreateparameter : *mut *mut isize) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoGetIrpExtraCreateParameter(irp, core::mem::transmute(extracreateparameter)) } + unsafe { IoGetIrpExtraCreateParameter(irp, extracreateparameter as _) } } #[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] @@ -1865,7 +1865,7 @@ pub unsafe fn IoGetSiloParameters(fileobject: *const super::super::Foundation::F #[inline] pub unsafe fn IoGetStackLimits(lowlimit: *mut usize, highlimit: *mut usize) { windows_targets::link!("ntoskrnl.exe" "system" fn IoGetStackLimits(lowlimit : *mut usize, highlimit : *mut usize)); - unsafe { IoGetStackLimits(core::mem::transmute(lowlimit), core::mem::transmute(highlimit)) } + unsafe { IoGetStackLimits(lowlimit as _, highlimit as _) } } #[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] @@ -1883,31 +1883,31 @@ pub unsafe fn IoGetTransactionParameterBlock(fileobject: *const super::super::Fo #[inline] 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); - unsafe { IoIncrementKeepAliveCount(core::mem::transmute(fileobject), process) } + unsafe { IoIncrementKeepAliveCount(fileobject as _, 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] pub unsafe fn IoInitializeIrp(irp: *mut super::super::Foundation::IRP, packetsize: u16, stacksize: i8) { windows_targets::link!("ntoskrnl.exe" "system" fn IoInitializeIrp(irp : *mut super::super::Foundation:: IRP, packetsize : u16, stacksize : i8)); - unsafe { IoInitializeIrp(core::mem::transmute(irp), packetsize, stacksize) } + unsafe { IoInitializeIrp(irp as _, packetsize, stacksize) } } #[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 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)); - unsafe { IoInitializeIrpEx(core::mem::transmute(irp), core::mem::transmute(deviceobject.unwrap_or(core::mem::zeroed())), packetsize, stacksize) } + unsafe { IoInitializeIrpEx(irp as _, deviceobject.unwrap_or(core::mem::zeroed()) as _, packetsize, stacksize) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn IoInitializeRemoveLockEx(lock: *mut IO_REMOVE_LOCK, allocatetag: u32, maxlockedminutes: u32, highwatermark: u32, remlocksize: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn IoInitializeRemoveLockEx(lock : *mut IO_REMOVE_LOCK, allocatetag : u32, maxlockedminutes : u32, highwatermark : u32, remlocksize : u32)); - unsafe { IoInitializeRemoveLockEx(core::mem::transmute(lock), allocatetag, maxlockedminutes, highwatermark, remlocksize) } + unsafe { IoInitializeRemoveLockEx(lock as _, allocatetag, maxlockedminutes, highwatermark, 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 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); - unsafe { IoInitializeTimer(deviceobject, timerroutine, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } + unsafe { IoInitializeTimer(deviceobject, timerroutine, context.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -1931,7 +1931,7 @@ pub unsafe fn IoInvalidateDeviceState(physicaldeviceobject: *const super::super: #[inline] pub unsafe fn IoIs32bitProcess(irp: Option<*const super::super::Foundation::IRP>) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn IoIs32bitProcess(irp : *const super::super::Foundation:: IRP) -> bool); - unsafe { IoIs32bitProcess(core::mem::transmute(irp.unwrap_or(core::mem::zeroed()))) } + unsafe { IoIs32bitProcess(irp.unwrap_or(core::mem::zeroed()) as _) } } #[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] @@ -1977,145 +1977,134 @@ pub unsafe fn IoMakeAssociatedIrpEx(irp: *const super::super::Foundation::IRP, d #[inline] pub unsafe fn IoMapTransfer(adapterobject: *const super::super::super::Win32::Storage::IscsiDisc::_ADAPTER_OBJECT, mdl: *const super::super::Foundation::MDL, mapregisterbase: *const core::ffi::c_void, currentva: *const core::ffi::c_void, length: *mut u32, writetodevice: bool) -> i64 { windows_targets::link!("hal.dll" "system" fn IoMapTransfer(adapterobject : *const super::super::super::Win32::Storage::IscsiDisc:: _ADAPTER_OBJECT, mdl : *const super::super::Foundation:: MDL, mapregisterbase : *const core::ffi::c_void, currentva : *const core::ffi::c_void, length : *mut u32, writetodevice : bool) -> i64); - unsafe { IoMapTransfer(adapterobject, mdl, mapregisterbase, currentva, core::mem::transmute(length), writetodevice) } + unsafe { IoMapTransfer(adapterobject, mdl, mapregisterbase, currentva, length as _, writetodevice) } } #[inline] pub unsafe fn IoOpenDeviceInterfaceRegistryKey(symboliclinkname: *const super::super::super::Win32::Foundation::UNICODE_STRING, desiredaccess: u32, deviceinterfaceregkey: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoOpenDeviceInterfaceRegistryKey(symboliclinkname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, desiredaccess : u32, deviceinterfaceregkey : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoOpenDeviceInterfaceRegistryKey(symboliclinkname, desiredaccess, core::mem::transmute(deviceinterfaceregkey)) } + unsafe { IoOpenDeviceInterfaceRegistryKey(symboliclinkname, desiredaccess, deviceinterfaceregkey as _) } } #[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 IoOpenDeviceRegistryKey(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, devinstkeytype: u32, desiredaccess: u32, deviceregkey: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoOpenDeviceRegistryKey(deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, devinstkeytype : u32, desiredaccess : u32, deviceregkey : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoOpenDeviceRegistryKey(deviceobject, devinstkeytype, desiredaccess, core::mem::transmute(deviceregkey)) } + unsafe { IoOpenDeviceRegistryKey(deviceobject, devinstkeytype, desiredaccess, deviceregkey as _) } } #[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 IoOpenDriverRegistryKey(driverobject: *const super::super::Foundation::DRIVER_OBJECT, regkeytype: DRIVER_REGKEY_TYPE, desiredaccess: u32, flags: u32, driverregkey: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoOpenDriverRegistryKey(driverobject : *const super::super::Foundation:: DRIVER_OBJECT, regkeytype : DRIVER_REGKEY_TYPE, desiredaccess : u32, flags : u32, driverregkey : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoOpenDriverRegistryKey(driverobject, regkeytype, desiredaccess, flags, core::mem::transmute(driverregkey)) } + unsafe { IoOpenDriverRegistryKey(driverobject, regkeytype, desiredaccess, flags, driverregkey as _) } } #[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 IoPropagateActivityIdToThread(irp: *const super::super::Foundation::IRP, propagatedid: *mut windows_core::GUID, originalid: *mut *mut windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoPropagateActivityIdToThread(irp : *const super::super::Foundation:: IRP, propagatedid : *mut windows_core::GUID, originalid : *mut *mut windows_core::GUID) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoPropagateActivityIdToThread(irp, core::mem::transmute(propagatedid), core::mem::transmute(originalid)) } + unsafe { IoPropagateActivityIdToThread(irp, propagatedid as _, originalid as _) } } #[inline] pub unsafe fn IoQueryDeviceDescription(bustype: Option<*const INTERFACE_TYPE>, busnumber: Option<*const u32>, controllertype: Option<*const CONFIGURATION_TYPE>, controllernumber: Option<*const u32>, peripheraltype: Option<*const CONFIGURATION_TYPE>, peripheralnumber: Option<*const u32>, calloutroutine: PIO_QUERY_DEVICE_ROUTINE, context: Option<*mut core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoQueryDeviceDescription(bustype : *const INTERFACE_TYPE, busnumber : *const u32, controllertype : *const CONFIGURATION_TYPE, controllernumber : *const u32, peripheraltype : *const CONFIGURATION_TYPE, peripheralnumber : *const u32, calloutroutine : PIO_QUERY_DEVICE_ROUTINE, context : *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { - IoQueryDeviceDescription( - 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())), - calloutroutine, - core::mem::transmute(context.unwrap_or(core::mem::zeroed())), - ) - } + unsafe { IoQueryDeviceDescription(bustype.unwrap_or(core::mem::zeroed()) as _, busnumber.unwrap_or(core::mem::zeroed()) as _, controllertype.unwrap_or(core::mem::zeroed()) as _, controllernumber.unwrap_or(core::mem::zeroed()) as _, peripheraltype.unwrap_or(core::mem::zeroed()) as _, peripheralnumber.unwrap_or(core::mem::zeroed()) as _, calloutroutine, context.unwrap_or(core::mem::zeroed()) as _) } } #[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 IoQueryFullDriverPath(driverobject: *const super::super::Foundation::DRIVER_OBJECT, fullpath: *mut super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoQueryFullDriverPath(driverobject : *const super::super::Foundation:: DRIVER_OBJECT, fullpath : *mut super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoQueryFullDriverPath(driverobject, core::mem::transmute(fullpath)) } + unsafe { IoQueryFullDriverPath(driverobject, fullpath as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO"))] #[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); - unsafe { IoQueryInformationByName(objectattributes, core::mem::transmute(iostatusblock), core::mem::transmute(fileinformation), length, fileinformationclass, options, core::mem::transmute(drivercontext.unwrap_or(core::mem::zeroed()))) } + unsafe { IoQueryInformationByName(objectattributes, iostatusblock as _, fileinformation as _, length, fileinformationclass, options, drivercontext.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { IoQueryKsrPersistentMemorySize(driverobject, core::mem::transmute(physicaldeviceobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize)) } + unsafe { IoQueryKsrPersistentMemorySize(driverobject, physicaldeviceobject.unwrap_or(core::mem::zeroed()) as _, buffersize as _) } } #[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); - unsafe { IoQueryKsrPersistentMemorySizeEx(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)) } + unsafe { IoQueryKsrPersistentMemorySizeEx(driverobject, physicaldeviceobject.unwrap_or(core::mem::zeroed()) as _, physicaldeviceid.unwrap_or(core::mem::zeroed()) as _, datatag.unwrap_or(core::mem::zeroed()) as _, dataversion.unwrap_or(core::mem::zeroed()) as _, buffersize as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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)); - unsafe { IoQueueWorkItem(ioworkitem, workerroutine, queuetype, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } + unsafe { IoQueueWorkItem(ioworkitem, workerroutine, queuetype, context.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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)); - unsafe { IoQueueWorkItemEx(ioworkitem, workerroutine, queuetype, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } + unsafe { IoQueueWorkItemEx(ioworkitem, workerroutine, queuetype, context.unwrap_or(core::mem::zeroed()) as _) } } #[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)); - unsafe { IoRaiseHardError(irp, core::mem::transmute(vpb.unwrap_or(core::mem::zeroed())), realdeviceobject) } + unsafe { IoRaiseHardError(irp, vpb.unwrap_or(core::mem::zeroed()) as _, realdeviceobject) } } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn IoRaiseInformationalHardError(errorstatus: super::super::super::Win32::Foundation::NTSTATUS, string: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, thread: Option) -> bool { 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) -> bool); - unsafe { IoRaiseInformationalHardError(errorstatus, core::mem::transmute(string.unwrap_or(core::mem::zeroed())), core::mem::transmute(thread.unwrap_or(core::mem::zeroed()))) } + unsafe { IoRaiseInformationalHardError(errorstatus, string.unwrap_or(core::mem::zeroed()) as _, thread.unwrap_or(core::mem::zeroed()) as _) } } #[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 IoReadDiskSignature(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, bytespersector: u32, signature: *mut DISK_SIGNATURE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoReadDiskSignature(deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, bytespersector : u32, signature : *mut DISK_SIGNATURE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoReadDiskSignature(deviceobject, bytespersector, core::mem::transmute(signature)) } + unsafe { IoReadDiskSignature(deviceobject, bytespersector, signature as _) } } #[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 IoReadPartitionTable(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, sectorsize: u32, returnrecognizedpartitions: bool, partitionbuffer: *mut *mut super::super::super::Win32::System::Ioctl::DRIVE_LAYOUT_INFORMATION) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoReadPartitionTable(deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, sectorsize : u32, returnrecognizedpartitions : bool, partitionbuffer : *mut *mut super::super::super::Win32::System::Ioctl:: DRIVE_LAYOUT_INFORMATION) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoReadPartitionTable(deviceobject, sectorsize, returnrecognizedpartitions, core::mem::transmute(partitionbuffer)) } + unsafe { IoReadPartitionTable(deviceobject, sectorsize, returnrecognizedpartitions, partitionbuffer as _) } } #[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 IoReadPartitionTableEx(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, drivelayout: *mut *mut super::super::super::Win32::System::Ioctl::DRIVE_LAYOUT_INFORMATION_EX) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoReadPartitionTableEx(deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, drivelayout : *mut *mut super::super::super::Win32::System::Ioctl:: DRIVE_LAYOUT_INFORMATION_EX) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoReadPartitionTableEx(deviceobject, core::mem::transmute(drivelayout)) } + unsafe { IoReadPartitionTableEx(deviceobject, drivelayout as _) } } #[inline] pub unsafe fn IoRecordIoAttribution(opaquehandle: *mut core::ffi::c_void, attributioninformation: *const IO_ATTRIBUTION_INFORMATION) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoRecordIoAttribution(opaquehandle : *mut core::ffi::c_void, attributioninformation : *const IO_ATTRIBUTION_INFORMATION) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoRecordIoAttribution(core::mem::transmute(opaquehandle), attributioninformation) } + unsafe { IoRecordIoAttribution(opaquehandle as _, attributioninformation) } } #[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); - unsafe { IoRegisterBootDriverCallback(callbackfunction, core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { IoRegisterBootDriverCallback(callbackfunction, callbackcontext.unwrap_or(core::mem::zeroed()) as _) } } #[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)); - unsafe { IoRegisterBootDriverReinitialization(driverobject, driverreinitializationroutine, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } + unsafe { IoRegisterBootDriverReinitialization(driverobject, driverreinitializationroutine, context.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { IoRegisterContainerNotification(notificationclass, callbackfunction, core::mem::transmute(notificationinformation.unwrap_or(core::mem::zeroed())), notificationinformationlength, core::mem::transmute(callbackregistration)) } + unsafe { IoRegisterContainerNotification(notificationclass, callbackfunction, notificationinformation.unwrap_or(core::mem::zeroed()) as _, notificationinformationlength, callbackregistration as _) } } #[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); - unsafe { IoRegisterDeviceInterface(physicaldeviceobject, interfaceclassguid, core::mem::transmute(referencestring.unwrap_or(core::mem::zeroed())), core::mem::transmute(symboliclinkname)) } + unsafe { IoRegisterDeviceInterface(physicaldeviceobject, interfaceclassguid, referencestring.unwrap_or(core::mem::zeroed()) as _, symboliclinkname as _) } } #[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)); - unsafe { IoRegisterDriverReinitialization(driverobject, driverreinitializationroutine, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } + unsafe { IoRegisterDriverReinitialization(driverobject, driverreinitializationroutine, context.unwrap_or(core::mem::zeroed()) as _) } } #[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] @@ -2127,7 +2116,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); - unsafe { IoRegisterPlugPlayNotification(eventcategory, eventcategoryflags, core::mem::transmute(eventcategorydata.unwrap_or(core::mem::zeroed())), driverobject, callbackroutine, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(notificationentry)) } + unsafe { IoRegisterPlugPlayNotification(eventcategory, eventcategoryflags, eventcategorydata.unwrap_or(core::mem::zeroed()) as _, driverobject, callbackroutine, context.unwrap_or(core::mem::zeroed()) as _, notificationentry as _) } } #[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] @@ -2144,31 +2133,31 @@ 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)); - unsafe { IoReleaseRemoveLockAndWaitEx(core::mem::transmute(removelock), core::mem::transmute(tag.unwrap_or(core::mem::zeroed())), remlocksize) } + unsafe { IoReleaseRemoveLockAndWaitEx(removelock as _, tag.unwrap_or(core::mem::zeroed()) as _, 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)); - unsafe { IoReleaseRemoveLockEx(core::mem::transmute(removelock), core::mem::transmute(tag.unwrap_or(core::mem::zeroed())), remlocksize) } + unsafe { IoReleaseRemoveLockEx(removelock as _, tag.unwrap_or(core::mem::zeroed()) as _, 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)); - unsafe { IoRemoveLinkShareAccess(fileobject, core::mem::transmute(shareaccess), core::mem::transmute(linkshareaccess.unwrap_or(core::mem::zeroed()))) } + unsafe { IoRemoveLinkShareAccess(fileobject, shareaccess as _, linkshareaccess.unwrap_or(core::mem::zeroed()) as _) } } #[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)); - unsafe { IoRemoveLinkShareAccessEx(fileobject, core::mem::transmute(shareaccess), core::mem::transmute(linkshareaccess.unwrap_or(core::mem::zeroed())), ioshareaccessflags) } + unsafe { IoRemoveLinkShareAccessEx(fileobject, shareaccess as _, linkshareaccess.unwrap_or(core::mem::zeroed()) as _, 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 IoRemoveShareAccess(fileobject: *const super::super::Foundation::FILE_OBJECT, shareaccess: *mut SHARE_ACCESS) { windows_targets::link!("ntoskrnl.exe" "system" fn IoRemoveShareAccess(fileobject : *const super::super::Foundation:: FILE_OBJECT, shareaccess : *mut SHARE_ACCESS)); - unsafe { IoRemoveShareAccess(fileobject, core::mem::transmute(shareaccess)) } + unsafe { IoRemoveShareAccess(fileobject, shareaccess as _) } } #[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] @@ -2180,7 +2169,7 @@ pub unsafe fn IoReplacePartitionUnit(targetpdo: *const super::super::Foundation: #[inline] pub unsafe fn IoReportDetectedDevice(driverobject: *const super::super::Foundation::DRIVER_OBJECT, legacybustype: INTERFACE_TYPE, busnumber: u32, slotnumber: u32, resourcelist: Option<*const CM_RESOURCE_LIST>, resourcerequirements: Option<*const IO_RESOURCE_REQUIREMENTS_LIST>, resourceassigned: bool, deviceobject: *mut *mut super::super::Foundation::DEVICE_OBJECT) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, deviceobject : *mut *mut super::super::Foundation:: DEVICE_OBJECT) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoReportDetectedDevice(driverobject, legacybustype, busnumber, slotnumber, core::mem::transmute(resourcelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(resourcerequirements.unwrap_or(core::mem::zeroed())), resourceassigned, core::mem::transmute(deviceobject)) } + unsafe { IoReportDetectedDevice(driverobject, legacybustype, busnumber, slotnumber, resourcelist.unwrap_or(core::mem::zeroed()) as _, resourcerequirements.unwrap_or(core::mem::zeroed()) as _, resourceassigned, deviceobject as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -2198,13 +2187,13 @@ pub unsafe fn IoReportInterruptInactive(parameters: *const IO_REPORT_INTERRUPT_A #[inline] pub unsafe fn IoReportResourceForDetection(driverobject: *const super::super::Foundation::DRIVER_OBJECT, driverlist: Option<*const CM_RESOURCE_LIST>, driverlistsize: Option, deviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>, devicelist: Option<*const CM_RESOURCE_LIST>, devicelistsize: Option, conflictdetected: *mut bool) -> 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 bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoReportResourceForDetection(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)) } + unsafe { IoReportResourceForDetection(driverobject, driverlist.unwrap_or(core::mem::zeroed()) as _, driverlistsize.unwrap_or(core::mem::zeroed()) as _, deviceobject.unwrap_or(core::mem::zeroed()) as _, devicelist.unwrap_or(core::mem::zeroed()) as _, devicelistsize.unwrap_or(core::mem::zeroed()) as _, conflictdetected as _) } } #[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: Option, deviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>, devicelist: Option<*const CM_RESOURCE_LIST>, devicelistsize: Option, overrideconflict: bool, conflictdetected: *mut bool) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, conflictdetected : *mut bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoReportResourceUsage(core::mem::transmute(driverclassname.unwrap_or(core::mem::zeroed())), 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, core::mem::transmute(conflictdetected)) } + unsafe { IoReportResourceUsage(driverclassname.unwrap_or(core::mem::zeroed()) as _, driverobject, driverlist.unwrap_or(core::mem::zeroed()) as _, driverlistsize.unwrap_or(core::mem::zeroed()) as _, deviceobject.unwrap_or(core::mem::zeroed()) as _, devicelist.unwrap_or(core::mem::zeroed()) as _, devicelistsize.unwrap_or(core::mem::zeroed()) as _, overrideconflict, conflictdetected as _) } } #[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] @@ -2222,7 +2211,7 @@ pub unsafe fn IoReportTargetDeviceChange(physicaldeviceobject: *const super::sup #[inline] pub unsafe fn IoReportTargetDeviceChangeAsynchronous(physicaldeviceobject: *const super::super::Foundation::DEVICE_OBJECT, notificationstructure: *const core::ffi::c_void, callback: 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); - unsafe { IoReportTargetDeviceChangeAsynchronous(physicaldeviceobject, notificationstructure, core::mem::transmute(callback.unwrap_or(core::mem::zeroed())), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } + unsafe { IoReportTargetDeviceChangeAsynchronous(physicaldeviceobject, notificationstructure, callback.unwrap_or(core::mem::zeroed()) as _, context.unwrap_or(core::mem::zeroed()) as _) } } #[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] @@ -2234,31 +2223,31 @@ pub unsafe fn IoRequestDeviceEject(physicaldeviceobject: *const super::super::Fo #[inline] 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); - unsafe { IoRequestDeviceEjectEx(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()))) } + unsafe { IoRequestDeviceEjectEx(physicaldeviceobject, callback.unwrap_or(core::mem::zeroed()) as _, context.unwrap_or(core::mem::zeroed()) as _, driverobject.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { IoReserveKsrPersistentMemory(driverobject, core::mem::transmute(physicaldeviceobject.unwrap_or(core::mem::zeroed())), size, flags, core::mem::transmute(datahandle)) } + unsafe { IoReserveKsrPersistentMemory(driverobject, physicaldeviceobject.unwrap_or(core::mem::zeroed()) as _, size, flags, datahandle as _) } } #[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); - unsafe { IoReserveKsrPersistentMemoryEx(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())), dataversion, size, flags, core::mem::transmute(datahandle)) } + unsafe { IoReserveKsrPersistentMemoryEx(driverobject, physicaldeviceobject.unwrap_or(core::mem::zeroed()) as _, physicaldeviceid.unwrap_or(core::mem::zeroed()) as _, datatag.unwrap_or(core::mem::zeroed()) as _, dataversion, size, flags, datahandle as _) } } #[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: 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)); - unsafe { IoReuseIrp(core::mem::transmute(irp), iostatus) } + unsafe { IoReuseIrp(irp as _, 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); - unsafe { IoSetActivityIdIrp(core::mem::transmute(irp), core::mem::transmute(guid.unwrap_or(core::mem::zeroed()))) } + unsafe { IoSetActivityIdIrp(irp as _, guid.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn IoSetActivityIdThread(activityid: *const windows_core::GUID) -> *mut windows_core::GUID { @@ -2269,12 +2258,12 @@ pub unsafe fn IoSetActivityIdThread(activityid: *const windows_core::GUID) -> *m #[inline] pub unsafe fn IoSetCompletionRoutineEx(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, irp: *const super::super::Foundation::IRP, completionroutine: super::super::Foundation::PIO_COMPLETION_ROUTINE, context: Option<*const core::ffi::c_void>, invokeonsuccess: bool, invokeonerror: bool, invokeoncancel: bool) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, invokeonerror : bool, invokeoncancel : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoSetCompletionRoutineEx(deviceobject, irp, completionroutine, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), invokeonsuccess, invokeonerror, invokeoncancel) } + unsafe { IoSetCompletionRoutineEx(deviceobject, irp, completionroutine, context.unwrap_or(core::mem::zeroed()) as _, invokeonsuccess, invokeonerror, invokeoncancel) } } #[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); - unsafe { IoSetDeviceInterfacePropertyData(symboliclinkname, propertykey, lcid, flags, r#type, size, core::mem::transmute(data.unwrap_or(core::mem::zeroed()))) } + unsafe { IoSetDeviceInterfacePropertyData(symboliclinkname, propertykey, lcid, flags, r#type, size, data.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn IoSetDeviceInterfaceState(symboliclinkname: *const super::super::super::Win32::Foundation::UNICODE_STRING, enable: bool) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -2285,7 +2274,7 @@ pub unsafe fn IoSetDeviceInterfaceState(symboliclinkname: *const super::super::s #[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); - unsafe { IoSetDevicePropertyData(pdo, propertykey, lcid, flags, r#type, size, core::mem::transmute(data.unwrap_or(core::mem::zeroed()))) } + unsafe { IoSetDevicePropertyData(pdo, propertykey, lcid, flags, r#type, size, data.unwrap_or(core::mem::zeroed()) as _) } } #[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] @@ -2303,13 +2292,13 @@ pub unsafe fn IoSetFileOrigin(fileobject: *const super::super::Foundation::FILE_ #[inline] pub unsafe fn IoSetFsZeroingOffset(irp: *mut super::super::Foundation::IRP, zeroingoffset: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoSetFsZeroingOffset(irp : *mut super::super::Foundation:: IRP, zeroingoffset : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoSetFsZeroingOffset(core::mem::transmute(irp), zeroingoffset) } + unsafe { IoSetFsZeroingOffset(irp as _, zeroingoffset) } } #[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 IoSetFsZeroingOffsetRequired(irp: *mut super::super::Foundation::IRP) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoSetFsZeroingOffsetRequired(irp : *mut super::super::Foundation:: IRP) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoSetFsZeroingOffsetRequired(core::mem::transmute(irp)) } + unsafe { IoSetFsZeroingOffsetRequired(irp as _) } } #[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] @@ -2321,7 +2310,7 @@ pub unsafe fn IoSetHardErrorOrVerifyDevice(irp: *const super::super::Foundation: #[inline] pub unsafe fn IoSetIoAttributionIrp(irp: *mut super::super::Foundation::IRP, attributionsource: *const core::ffi::c_void, flags: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoSetIoAttributionIrp(irp : *mut super::super::Foundation:: IRP, attributionsource : *const core::ffi::c_void, flags : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoSetIoAttributionIrp(core::mem::transmute(irp), attributionsource, flags) } + unsafe { IoSetIoAttributionIrp(irp as _, attributionsource, 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] @@ -2333,19 +2322,19 @@ pub unsafe fn IoSetIoPriorityHint(irp: *const super::super::Foundation::IRP, pri #[inline] pub unsafe fn IoSetIrpExtraCreateParameter(irp: *mut super::super::Foundation::IRP, extracreateparameter: *const isize) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoSetIrpExtraCreateParameter(irp : *mut super::super::Foundation:: IRP, extracreateparameter : *const isize) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoSetIrpExtraCreateParameter(core::mem::transmute(irp), extracreateparameter) } + unsafe { IoSetIrpExtraCreateParameter(irp as _, extracreateparameter) } } #[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 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)); - unsafe { IoSetLinkShareAccess(desiredaccess, desiredshareaccess, core::mem::transmute(fileobject), core::mem::transmute(shareaccess), core::mem::transmute(linkshareaccess.unwrap_or(core::mem::zeroed())), ioshareaccessflags) } + unsafe { IoSetLinkShareAccess(desiredaccess, desiredshareaccess, fileobject as _, shareaccess as _, linkshareaccess.unwrap_or(core::mem::zeroed()) as _, 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: 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)); - unsafe { IoSetMasterIrpStatus(core::mem::transmute(masterirp), status) } + unsafe { IoSetMasterIrpStatus(masterirp as _, 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] @@ -2363,13 +2352,13 @@ pub unsafe fn IoSetPartitionInformationEx(deviceobject: *const super::super::Fou #[inline] pub unsafe fn IoSetShareAccess(desiredaccess: u32, desiredshareaccess: u32, fileobject: *mut super::super::Foundation::FILE_OBJECT, shareaccess: *mut SHARE_ACCESS) { windows_targets::link!("ntoskrnl.exe" "system" fn IoSetShareAccess(desiredaccess : u32, desiredshareaccess : u32, fileobject : *mut super::super::Foundation:: FILE_OBJECT, shareaccess : *mut SHARE_ACCESS)); - unsafe { IoSetShareAccess(desiredaccess, desiredshareaccess, core::mem::transmute(fileobject), core::mem::transmute(shareaccess)) } + unsafe { IoSetShareAccess(desiredaccess, desiredshareaccess, fileobject as _, shareaccess as _) } } #[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 IoSetShareAccessEx(desiredaccess: u32, desiredshareaccess: u32, fileobject: *mut super::super::Foundation::FILE_OBJECT, shareaccess: *mut SHARE_ACCESS, writepermission: Option<*const bool>) { 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 bool)); - unsafe { IoSetShareAccessEx(desiredaccess, desiredshareaccess, core::mem::transmute(fileobject), core::mem::transmute(shareaccess), core::mem::transmute(writepermission.unwrap_or(core::mem::zeroed()))) } + unsafe { IoSetShareAccessEx(desiredaccess, desiredshareaccess, fileobject as _, shareaccess as _, writepermission.unwrap_or(core::mem::zeroed()) as _) } } #[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] @@ -2391,13 +2380,13 @@ pub unsafe fn IoSetThreadHardErrorMode(enableharderrors: bool) -> bool { #[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)); - unsafe { IoSetTopLevelIrp(core::mem::transmute(irp.unwrap_or(core::mem::zeroed()))) } + unsafe { IoSetTopLevelIrp(irp.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { IoSizeOfIrpEx(core::mem::transmute(deviceobject.unwrap_or(core::mem::zeroed())), stacksize) } + unsafe { IoSizeOfIrpEx(deviceobject.unwrap_or(core::mem::zeroed()) as _, stacksize) } } #[inline] pub unsafe fn IoSizeofWorkItem() -> u32 { @@ -2420,7 +2409,7 @@ pub unsafe fn IoStartNextPacketByKey(deviceobject: *const super::super::Foundati #[inline] 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)); - unsafe { IoStartPacket(deviceobject, irp, core::mem::transmute(key.unwrap_or(core::mem::zeroed())), core::mem::transmute(cancelfunction.unwrap_or(core::mem::zeroed()))) } + unsafe { IoStartPacket(deviceobject, irp, key.unwrap_or(core::mem::zeroed()) as _, cancelfunction.unwrap_or(core::mem::zeroed()) as _) } } #[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] @@ -2448,13 +2437,13 @@ pub unsafe fn IoTransferActivityId(activityid: *const windows_core::GUID, relate #[inline] pub unsafe fn IoTranslateBusAddress(interfacetype: INTERFACE_TYPE, busnumber: u32, busaddress: i64, addressspace: *mut u32, translatedaddress: *mut i64) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn IoTranslateBusAddress(interfacetype : INTERFACE_TYPE, busnumber : u32, busaddress : i64, addressspace : *mut u32, translatedaddress : *mut i64) -> bool); - unsafe { IoTranslateBusAddress(interfacetype, busnumber, busaddress, core::mem::transmute(addressspace), core::mem::transmute(translatedaddress)) } + unsafe { IoTranslateBusAddress(interfacetype, busnumber, busaddress, addressspace as _, translatedaddress as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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>) -> bool { 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) -> bool); - unsafe { IoTryQueueWorkItem(ioworkitem, workerroutine, queuetype, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } + unsafe { IoTryQueueWorkItem(ioworkitem, workerroutine, queuetype, context.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -2492,19 +2481,19 @@ 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)); - unsafe { IoUpdateLinkShareAccess(fileobject, core::mem::transmute(shareaccess), core::mem::transmute(linkshareaccess.unwrap_or(core::mem::zeroed()))) } + unsafe { IoUpdateLinkShareAccess(fileobject, shareaccess as _, linkshareaccess.unwrap_or(core::mem::zeroed()) as _) } } #[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)); - unsafe { IoUpdateLinkShareAccessEx(fileobject, core::mem::transmute(shareaccess), core::mem::transmute(linkshareaccess.unwrap_or(core::mem::zeroed())), ioshareaccessflags) } + unsafe { IoUpdateLinkShareAccessEx(fileobject, shareaccess as _, linkshareaccess.unwrap_or(core::mem::zeroed()) as _, 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 IoUpdateShareAccess(fileobject: *const super::super::Foundation::FILE_OBJECT, shareaccess: *mut SHARE_ACCESS) { windows_targets::link!("ntoskrnl.exe" "system" fn IoUpdateShareAccess(fileobject : *const super::super::Foundation:: FILE_OBJECT, shareaccess : *mut SHARE_ACCESS)); - unsafe { IoUpdateShareAccess(fileobject, core::mem::transmute(shareaccess)) } + unsafe { IoUpdateShareAccess(fileobject, shareaccess as _) } } #[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] @@ -2521,73 +2510,73 @@ pub unsafe fn IoVerifyPartitionTable(deviceobject: *const super::super::Foundati #[inline] pub unsafe fn IoVolumeDeviceNameToGuid(volumedevicename: *const super::super::super::Win32::Foundation::UNICODE_STRING, guid: *mut windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoVolumeDeviceNameToGuid(volumedevicename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, guid : *mut windows_core::GUID) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoVolumeDeviceNameToGuid(volumedevicename, core::mem::transmute(guid)) } + unsafe { IoVolumeDeviceNameToGuid(volumedevicename, guid as _) } } #[inline] pub unsafe fn IoVolumeDeviceNameToGuidPath(volumedevicename: *const super::super::super::Win32::Foundation::UNICODE_STRING, guidpath: *mut super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoVolumeDeviceNameToGuidPath(volumedevicename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, guidpath : *mut super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoVolumeDeviceNameToGuidPath(volumedevicename, core::mem::transmute(guidpath)) } + unsafe { IoVolumeDeviceNameToGuidPath(volumedevicename, guidpath as _) } } #[inline] pub unsafe fn IoVolumeDeviceToDosName(volumedeviceobject: *const core::ffi::c_void, dosname: *mut super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoVolumeDeviceToDosName(volumedeviceobject : *const core::ffi::c_void, dosname : *mut super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoVolumeDeviceToDosName(volumedeviceobject, core::mem::transmute(dosname)) } + unsafe { IoVolumeDeviceToDosName(volumedeviceobject, dosname as _) } } #[inline] pub unsafe fn IoVolumeDeviceToGuid(volumedeviceobject: *const core::ffi::c_void, guid: *mut windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoVolumeDeviceToGuid(volumedeviceobject : *const core::ffi::c_void, guid : *mut windows_core::GUID) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoVolumeDeviceToGuid(volumedeviceobject, core::mem::transmute(guid)) } + unsafe { IoVolumeDeviceToGuid(volumedeviceobject, guid as _) } } #[inline] pub unsafe fn IoVolumeDeviceToGuidPath(volumedeviceobject: *const core::ffi::c_void, guidpath: *mut super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoVolumeDeviceToGuidPath(volumedeviceobject : *const core::ffi::c_void, guidpath : *mut super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoVolumeDeviceToGuidPath(volumedeviceobject, core::mem::transmute(guidpath)) } + unsafe { IoVolumeDeviceToGuidPath(volumedeviceobject, guidpath as _) } } #[inline] pub unsafe fn IoWMIAllocateInstanceIds(guid: *const windows_core::GUID, instancecount: u32, firstinstanceid: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoWMIAllocateInstanceIds(guid : *const windows_core::GUID, instancecount : u32, firstinstanceid : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoWMIAllocateInstanceIds(guid, instancecount, core::mem::transmute(firstinstanceid)) } + unsafe { IoWMIAllocateInstanceIds(guid, instancecount, firstinstanceid as _) } } #[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 IoWMIDeviceObjectToInstanceName(datablockobject: *const core::ffi::c_void, deviceobject: *const super::super::Foundation::DEVICE_OBJECT, instancename: *mut super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoWMIDeviceObjectToInstanceName(datablockobject : *const core::ffi::c_void, deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, instancename : *mut super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoWMIDeviceObjectToInstanceName(datablockobject, deviceobject, core::mem::transmute(instancename)) } + unsafe { IoWMIDeviceObjectToInstanceName(datablockobject, deviceobject, instancename as _) } } #[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); - unsafe { IoWMIExecuteMethod(datablockobject, instancename, methodid, inbuffersize, core::mem::transmute(outbuffersize), core::mem::transmute(inoutbuffer.unwrap_or(core::mem::zeroed()))) } + unsafe { IoWMIExecuteMethod(datablockobject, instancename, methodid, inbuffersize, outbuffersize as _, inoutbuffer.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { IoWMIHandleToInstanceName(datablockobject, filehandle, core::mem::transmute(instancename)) } + unsafe { IoWMIHandleToInstanceName(datablockobject, filehandle, instancename as _) } } #[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 { windows_targets::link!("ntoskrnl.exe" "system" fn IoWMIOpenBlock(guid : *const windows_core::GUID, desiredaccess : u32, datablockobject : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoWMIOpenBlock(guid, desiredaccess, core::mem::transmute(datablockobject)) } + unsafe { IoWMIOpenBlock(guid, desiredaccess, datablockobject as _) } } #[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); - unsafe { IoWMIQueryAllData(datablockobject, core::mem::transmute(inoutbuffersize), core::mem::transmute(outbuffer.unwrap_or(core::mem::zeroed()))) } + unsafe { IoWMIQueryAllData(datablockobject, inoutbuffersize as _, outbuffer.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { 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()))) } + unsafe { IoWMIQueryAllDataMultiple(core::mem::transmute(datablockobjectlist.as_ptr()), datablockobjectlist.len().try_into().unwrap(), inoutbuffersize as _, outbuffer.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { IoWMIQuerySingleInstance(datablockobject, instancename, core::mem::transmute(inoutbuffersize), core::mem::transmute(outbuffer.unwrap_or(core::mem::zeroed()))) } + unsafe { IoWMIQuerySingleInstance(datablockobject, instancename, inoutbuffersize as _, outbuffer.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { IoWMIQuerySingleInstanceMultiple(datablockobjectlist, instancenames, objectcount, core::mem::transmute(inoutbuffersize), core::mem::transmute(outbuffer.unwrap_or(core::mem::zeroed()))) } + unsafe { IoWMIQuerySingleInstanceMultiple(datablockobjectlist, instancenames, objectcount, inoutbuffersize as _, outbuffer.unwrap_or(core::mem::zeroed()) as _) } } #[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] @@ -2598,7 +2587,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); - unsafe { IoWMISetNotificationCallback(core::mem::transmute(object), callback, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } + unsafe { IoWMISetNotificationCallback(object as _, callback, context.unwrap_or(core::mem::zeroed()) as _) } } #[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 { @@ -2614,12 +2603,12 @@ pub unsafe fn IoWMISetSingleItem(datablockobject: *const core::ffi::c_void, inst #[inline] pub unsafe fn IoWMISuggestInstanceName(physicaldeviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>, symboliclinkname: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, combinenames: bool, suggestedinstancename: *mut super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, suggestedinstancename : *mut super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoWMISuggestInstanceName(core::mem::transmute(physicaldeviceobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(symboliclinkname.unwrap_or(core::mem::zeroed())), combinenames, core::mem::transmute(suggestedinstancename)) } + unsafe { IoWMISuggestInstanceName(physicaldeviceobject.unwrap_or(core::mem::zeroed()) as _, symboliclinkname.unwrap_or(core::mem::zeroed()) as _, combinenames, suggestedinstancename as _) } } #[inline] pub unsafe fn IoWMIWriteEvent(wnodeeventitem: *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoWMIWriteEvent(wnodeeventitem : *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IoWMIWriteEvent(core::mem::transmute(wnodeeventitem)) } + unsafe { IoWMIWriteEvent(wnodeeventitem as _) } } #[inline] pub unsafe fn IoWithinStackLimits(regionstart: usize, regionsize: usize) -> u32 { @@ -2652,7 +2641,7 @@ pub unsafe fn IoWritePartitionTableEx(deviceobject: *const super::super::Foundat #[inline] pub unsafe fn IofCallDriver(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, irp: *mut super::super::Foundation::IRP) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IofCallDriver(deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, irp : *mut super::super::Foundation:: IRP) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { IofCallDriver(deviceobject, core::mem::transmute(irp)) } + unsafe { IofCallDriver(deviceobject, irp as _) } } #[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] @@ -2663,7 +2652,7 @@ pub unsafe fn IofCompleteRequest(irp: *const super::super::Foundation::IRP, prio #[inline] pub unsafe fn KdChangeOption(option: KD_OPTION, inbufferbytes: u32, inbuffer: *const core::ffi::c_void, outbufferbytes: u32, outbuffer: *mut core::ffi::c_void, outbufferneeded: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn KdChangeOption(option : KD_OPTION, inbufferbytes : u32, inbuffer : *const core::ffi::c_void, outbufferbytes : u32, outbuffer : *mut core::ffi::c_void, outbufferneeded : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { KdChangeOption(option, inbufferbytes, inbuffer, outbufferbytes, core::mem::transmute(outbuffer), core::mem::transmute(outbufferneeded)) } + unsafe { KdChangeOption(option, inbufferbytes, inbuffer, outbufferbytes, outbuffer as _, outbufferneeded as _) } } #[inline] pub unsafe fn KdDisableDebugger() -> super::super::super::Win32::Foundation::NTSTATUS { @@ -2684,28 +2673,28 @@ pub unsafe fn KdRefreshDebuggerNotPresent() -> bool { #[inline] pub unsafe fn KeAcquireGuardedMutex(mutex: *mut super::super::Foundation::FAST_MUTEX) { windows_targets::link!("ntoskrnl.exe" "system" fn KeAcquireGuardedMutex(mutex : *mut super::super::Foundation:: FAST_MUTEX)); - unsafe { KeAcquireGuardedMutex(core::mem::transmute(mutex)) } + unsafe { KeAcquireGuardedMutex(mutex as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeAcquireGuardedMutexUnsafe(fastmutex: *mut super::super::Foundation::FAST_MUTEX) { windows_targets::link!("ntoskrnl.exe" "system" fn KeAcquireGuardedMutexUnsafe(fastmutex : *mut super::super::Foundation:: FAST_MUTEX)); - unsafe { KeAcquireGuardedMutexUnsafe(core::mem::transmute(fastmutex)) } + unsafe { KeAcquireGuardedMutexUnsafe(fastmutex as _) } } #[inline] pub unsafe fn KeAcquireInStackQueuedSpinLock(spinlock: *mut usize, lockhandle: *mut KLOCK_QUEUE_HANDLE) { windows_targets::link!("ntoskrnl.exe" "system" fn KeAcquireInStackQueuedSpinLock(spinlock : *mut usize, lockhandle : *mut KLOCK_QUEUE_HANDLE)); - unsafe { KeAcquireInStackQueuedSpinLock(core::mem::transmute(spinlock), core::mem::transmute(lockhandle)) } + unsafe { KeAcquireInStackQueuedSpinLock(spinlock as _, lockhandle as _) } } #[inline] pub unsafe fn KeAcquireInStackQueuedSpinLockAtDpcLevel(spinlock: *mut usize, lockhandle: *mut KLOCK_QUEUE_HANDLE) { windows_targets::link!("ntoskrnl.exe" "system" fn KeAcquireInStackQueuedSpinLockAtDpcLevel(spinlock : *mut usize, lockhandle : *mut KLOCK_QUEUE_HANDLE)); - unsafe { KeAcquireInStackQueuedSpinLockAtDpcLevel(core::mem::transmute(spinlock), core::mem::transmute(lockhandle)) } + unsafe { KeAcquireInStackQueuedSpinLockAtDpcLevel(spinlock as _, lockhandle as _) } } #[inline] pub unsafe fn KeAcquireInStackQueuedSpinLockForDpc(spinlock: *mut usize, lockhandle: *mut KLOCK_QUEUE_HANDLE) { windows_targets::link!("ntoskrnl.exe" "system" fn KeAcquireInStackQueuedSpinLockForDpc(spinlock : *mut usize, lockhandle : *mut KLOCK_QUEUE_HANDLE)); - unsafe { KeAcquireInStackQueuedSpinLockForDpc(core::mem::transmute(spinlock), core::mem::transmute(lockhandle)) } + unsafe { KeAcquireInStackQueuedSpinLockForDpc(spinlock as _, lockhandle as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -2716,13 +2705,13 @@ pub unsafe fn KeAcquireInterruptSpinLock(interrupt: super::super::Foundation::PK #[inline] pub unsafe fn KeAcquireSpinLockForDpc(spinlock: *mut usize) -> u8 { windows_targets::link!("ntoskrnl.exe" "system" fn KeAcquireSpinLockForDpc(spinlock : *mut usize) -> u8); - unsafe { KeAcquireSpinLockForDpc(core::mem::transmute(spinlock)) } + unsafe { KeAcquireSpinLockForDpc(spinlock as _) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn KeAddTriageDumpDataBlock(ktriagedumpdataarray: *mut KTRIAGE_DUMP_DATA_ARRAY, address: *const core::ffi::c_void, size: usize) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn KeAddTriageDumpDataBlock(ktriagedumpdataarray : *mut KTRIAGE_DUMP_DATA_ARRAY, address : *const core::ffi::c_void, size : usize) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { KeAddTriageDumpDataBlock(core::mem::transmute(ktriagedumpdataarray), address, size) } + unsafe { KeAddTriageDumpDataBlock(ktriagedumpdataarray as _, address, size) } } #[inline] pub unsafe fn KeAreAllApcsDisabled() -> bool { @@ -2750,23 +2739,23 @@ pub unsafe fn KeBugCheckEx(bugcheckcode: super::super::super::Win32::System::Dia #[inline] pub unsafe fn KeCancelTimer(param0: *mut KTIMER) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn KeCancelTimer(param0 : *mut KTIMER) -> bool); - unsafe { KeCancelTimer(core::mem::transmute(param0)) } + unsafe { KeCancelTimer(param0 as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeClearEvent(event: *mut super::super::Foundation::KEVENT) { windows_targets::link!("ntoskrnl.exe" "system" fn KeClearEvent(event : *mut super::super::Foundation:: KEVENT)); - unsafe { KeClearEvent(core::mem::transmute(event)) } + unsafe { KeClearEvent(event as _) } } #[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); - unsafe { KeConvertAuxiliaryCounterToPerformanceCounter(auxiliarycountervalue, core::mem::transmute(performancecountervalue), core::mem::transmute(conversionerror.unwrap_or(core::mem::zeroed()))) } + unsafe { KeConvertAuxiliaryCounterToPerformanceCounter(auxiliarycountervalue, performancecountervalue as _, conversionerror.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { KeConvertPerformanceCounterToAuxiliaryCounter(performancecountervalue, core::mem::transmute(auxiliarycountervalue), core::mem::transmute(conversionerror.unwrap_or(core::mem::zeroed()))) } + unsafe { KeConvertPerformanceCounterToAuxiliaryCounter(performancecountervalue, auxiliarycountervalue as _, conversionerror.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn KeDelayExecutionThread(waitmode: i8, alertable: bool, interval: *const i64) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -2782,13 +2771,13 @@ pub unsafe fn KeDeregisterBoundCallback(handle: *const core::ffi::c_void) -> sup #[inline] pub unsafe fn KeDeregisterBugCheckCallback(callbackrecord: *mut KBUGCHECK_CALLBACK_RECORD) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn KeDeregisterBugCheckCallback(callbackrecord : *mut KBUGCHECK_CALLBACK_RECORD) -> bool); - unsafe { KeDeregisterBugCheckCallback(core::mem::transmute(callbackrecord)) } + unsafe { KeDeregisterBugCheckCallback(callbackrecord as _) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn KeDeregisterBugCheckReasonCallback(callbackrecord: *mut KBUGCHECK_REASON_CALLBACK_RECORD) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn KeDeregisterBugCheckReasonCallback(callbackrecord : *mut KBUGCHECK_REASON_CALLBACK_RECORD) -> bool); - unsafe { KeDeregisterBugCheckReasonCallback(core::mem::transmute(callbackrecord)) } + unsafe { KeDeregisterBugCheckReasonCallback(callbackrecord as _) } } #[inline] pub unsafe fn KeDeregisterNmiCallback(handle: *const core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -2813,12 +2802,12 @@ 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); - unsafe { KeExpandKernelStackAndCallout(callout, core::mem::transmute(parameter.unwrap_or(core::mem::zeroed())), size) } + unsafe { KeExpandKernelStackAndCallout(callout, parameter.unwrap_or(core::mem::zeroed()) as _, size) } } #[inline] pub unsafe fn KeExpandKernelStackAndCalloutEx(callout: PEXPAND_STACK_CALLOUT, parameter: Option<*const core::ffi::c_void>, size: usize, wait: bool, context: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn KeExpandKernelStackAndCalloutEx(callout : PEXPAND_STACK_CALLOUT, parameter : *const core::ffi::c_void, size : usize, wait : bool, context : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { KeExpandKernelStackAndCalloutEx(callout, core::mem::transmute(parameter.unwrap_or(core::mem::zeroed())), size, wait, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } + unsafe { KeExpandKernelStackAndCalloutEx(callout, parameter.unwrap_or(core::mem::zeroed()) as _, size, wait, context.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -2850,7 +2839,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); - unsafe { KeGetCurrentProcessorNumberEx(core::mem::transmute(procnumber.unwrap_or(core::mem::zeroed()))) } + unsafe { KeGetCurrentProcessorNumberEx(procnumber.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -2862,7 +2851,7 @@ pub unsafe fn KeGetProcessorIndexFromNumber(procnumber: *const super::super::sup #[inline] pub unsafe fn KeGetProcessorNumberFromIndex(procindex: u32, procnumber: *mut super::super::super::Win32::System::Kernel::PROCESSOR_NUMBER) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn KeGetProcessorNumberFromIndex(procindex : u32, procnumber : *mut super::super::super::Win32::System::Kernel:: PROCESSOR_NUMBER) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { KeGetProcessorNumberFromIndex(procindex, core::mem::transmute(procnumber)) } + unsafe { KeGetProcessorNumberFromIndex(procindex, procnumber as _) } } #[inline] pub unsafe fn KeGetRecommendedSharedDataAlignment() -> u32 { @@ -2872,43 +2861,43 @@ 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); - unsafe { KeInitializeCrashDumpHeader(dumptype, flags, core::mem::transmute(buffer), buffersize, core::mem::transmute(bufferneeded.unwrap_or(core::mem::zeroed()))) } + unsafe { KeInitializeCrashDumpHeader(dumptype, flags, buffer as _, buffersize, bufferneeded.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeInitializeDeviceQueue(devicequeue: *mut super::super::Foundation::KDEVICE_QUEUE) { windows_targets::link!("ntoskrnl.exe" "system" fn KeInitializeDeviceQueue(devicequeue : *mut super::super::Foundation:: KDEVICE_QUEUE)); - unsafe { KeInitializeDeviceQueue(core::mem::transmute(devicequeue)) } + unsafe { KeInitializeDeviceQueue(devicequeue as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[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)); - unsafe { KeInitializeDpc(core::mem::transmute(dpc), deferredroutine, core::mem::transmute(deferredcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { KeInitializeDpc(dpc as _, deferredroutine, deferredcontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeInitializeEvent(event: *mut super::super::Foundation::KEVENT, r#type: super::super::super::Win32::System::Kernel::EVENT_TYPE, state: bool) { windows_targets::link!("ntoskrnl.exe" "system" fn KeInitializeEvent(event : *mut super::super::Foundation:: KEVENT, r#type : super::super::super::Win32::System::Kernel:: EVENT_TYPE, state : bool)); - unsafe { KeInitializeEvent(core::mem::transmute(event), r#type, state) } + unsafe { KeInitializeEvent(event as _, r#type, state) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeInitializeGuardedMutex(mutex: *mut super::super::Foundation::FAST_MUTEX) { windows_targets::link!("ntoskrnl.exe" "system" fn KeInitializeGuardedMutex(mutex : *mut super::super::Foundation:: FAST_MUTEX)); - unsafe { KeInitializeGuardedMutex(core::mem::transmute(mutex)) } + unsafe { KeInitializeGuardedMutex(mutex as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeInitializeMutex(mutex: *mut super::super::Foundation::KMUTANT, level: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn KeInitializeMutex(mutex : *mut super::super::Foundation:: KMUTANT, level : u32)); - unsafe { KeInitializeMutex(core::mem::transmute(mutex), level) } + unsafe { KeInitializeMutex(mutex as _, level) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeInitializeSemaphore(semaphore: *mut KSEMAPHORE, count: i32, limit: i32) { windows_targets::link!("ntoskrnl.exe" "system" fn KeInitializeSemaphore(semaphore : *mut KSEMAPHORE, count : i32, limit : i32)); - unsafe { KeInitializeSemaphore(core::mem::transmute(semaphore), count, limit) } + unsafe { KeInitializeSemaphore(semaphore as _, count, limit) } } #[inline] pub unsafe fn KeInitializeSpinLock() -> usize { @@ -2923,43 +2912,43 @@ 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)); - unsafe { KeInitializeThreadedDpc(core::mem::transmute(dpc), deferredroutine, core::mem::transmute(deferredcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { KeInitializeThreadedDpc(dpc as _, deferredroutine, deferredcontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeInitializeTimer(timer: *mut KTIMER) { windows_targets::link!("ntoskrnl.exe" "system" fn KeInitializeTimer(timer : *mut KTIMER)); - unsafe { KeInitializeTimer(core::mem::transmute(timer)) } + unsafe { KeInitializeTimer(timer as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeInitializeTimerEx(timer: *mut KTIMER, r#type: super::super::super::Win32::System::Kernel::TIMER_TYPE) { windows_targets::link!("ntoskrnl.exe" "system" fn KeInitializeTimerEx(timer : *mut KTIMER, r#type : super::super::super::Win32::System::Kernel:: TIMER_TYPE)); - unsafe { KeInitializeTimerEx(core::mem::transmute(timer), r#type) } + unsafe { KeInitializeTimerEx(timer as _, r#type) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn KeInitializeTriageDumpDataArray(ktriagedumpdataarray: *mut KTRIAGE_DUMP_DATA_ARRAY, size: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn KeInitializeTriageDumpDataArray(ktriagedumpdataarray : *mut KTRIAGE_DUMP_DATA_ARRAY, size : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { KeInitializeTriageDumpDataArray(core::mem::transmute(ktriagedumpdataarray), size) } + unsafe { KeInitializeTriageDumpDataArray(ktriagedumpdataarray as _, size) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeInsertByKeyDeviceQueue(devicequeue: *mut super::super::Foundation::KDEVICE_QUEUE, devicequeueentry: *mut KDEVICE_QUEUE_ENTRY, sortkey: u32) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn KeInsertByKeyDeviceQueue(devicequeue : *mut super::super::Foundation:: KDEVICE_QUEUE, devicequeueentry : *mut KDEVICE_QUEUE_ENTRY, sortkey : u32) -> bool); - unsafe { KeInsertByKeyDeviceQueue(core::mem::transmute(devicequeue), core::mem::transmute(devicequeueentry), sortkey) } + unsafe { KeInsertByKeyDeviceQueue(devicequeue as _, devicequeueentry as _, sortkey) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeInsertDeviceQueue(devicequeue: *mut super::super::Foundation::KDEVICE_QUEUE, devicequeueentry: *mut KDEVICE_QUEUE_ENTRY) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn KeInsertDeviceQueue(devicequeue : *mut super::super::Foundation:: KDEVICE_QUEUE, devicequeueentry : *mut KDEVICE_QUEUE_ENTRY) -> bool); - unsafe { KeInsertDeviceQueue(core::mem::transmute(devicequeue), core::mem::transmute(devicequeueentry)) } + unsafe { KeInsertDeviceQueue(devicequeue as _, devicequeueentry as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[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>) -> bool { 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) -> bool); - unsafe { KeInsertQueueDpc(core::mem::transmute(dpc), core::mem::transmute(systemargument1.unwrap_or(core::mem::zeroed())), core::mem::transmute(systemargument2.unwrap_or(core::mem::zeroed()))) } + unsafe { KeInsertQueueDpc(dpc as _, systemargument1.unwrap_or(core::mem::zeroed()) as _, systemargument2.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn KeInvalidateAllCaches() -> bool { @@ -2995,7 +2984,7 @@ pub unsafe fn KeLeaveGuardedRegion() { #[inline] pub unsafe fn KePulseEvent(event: *mut super::super::Foundation::KEVENT, increment: i32, wait: bool) -> i32 { windows_targets::link!("ntoskrnl.exe" "system" fn KePulseEvent(event : *mut super::super::Foundation:: KEVENT, increment : i32, wait : bool) -> i32); - unsafe { KePulseEvent(core::mem::transmute(event), increment, wait) } + unsafe { KePulseEvent(event as _, increment, wait) } } #[inline] pub unsafe fn KeQueryActiveGroupCount() -> u16 { @@ -3005,7 +2994,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); - unsafe { KeQueryActiveProcessorCount(core::mem::transmute(activeprocessors.unwrap_or(core::mem::zeroed()))) } + unsafe { KeQueryActiveProcessorCount(activeprocessors.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn KeQueryActiveProcessorCountEx(groupnumber: u16) -> u32 { @@ -3020,12 +3009,12 @@ 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); - unsafe { KeQueryAuxiliaryCounterFrequency(core::mem::transmute(auxiliarycounterfrequency.unwrap_or(core::mem::zeroed()))) } + unsafe { KeQueryAuxiliaryCounterFrequency(auxiliarycounterfrequency.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn KeQueryDpcWatchdogInformation(watchdoginformation: *mut KDPC_WATCHDOG_INFORMATION) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn KeQueryDpcWatchdogInformation(watchdoginformation : *mut KDPC_WATCHDOG_INFORMATION) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { KeQueryDpcWatchdogInformation(core::mem::transmute(watchdoginformation)) } + unsafe { KeQueryDpcWatchdogInformation(watchdoginformation as _) } } #[inline] pub unsafe fn KeQueryGroupAffinity(groupnumber: u16) -> usize { @@ -3035,7 +3024,7 @@ pub unsafe fn KeQueryGroupAffinity(groupnumber: u16) -> usize { #[inline] pub unsafe fn KeQueryHardwareCounterConfiguration(counterarray: &mut [HARDWARE_COUNTER], count: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn KeQueryHardwareCounterConfiguration(counterarray : *mut HARDWARE_COUNTER, maximumcount : u32, count : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { KeQueryHardwareCounterConfiguration(core::mem::transmute(counterarray.as_ptr()), counterarray.len().try_into().unwrap(), core::mem::transmute(count)) } + unsafe { KeQueryHardwareCounterConfiguration(core::mem::transmute(counterarray.as_ptr()), counterarray.len().try_into().unwrap(), count as _) } } #[inline] pub unsafe fn KeQueryHighestNodeNumber() -> u16 { @@ -3045,13 +3034,13 @@ pub unsafe fn KeQueryHighestNodeNumber() -> u16 { #[inline] pub unsafe fn KeQueryInterruptTimePrecise(qpctimestamp: *mut u64) -> u64 { windows_targets::link!("ntoskrnl.exe" "system" fn KeQueryInterruptTimePrecise(qpctimestamp : *mut u64) -> u64); - unsafe { KeQueryInterruptTimePrecise(core::mem::transmute(qpctimestamp)) } + unsafe { KeQueryInterruptTimePrecise(qpctimestamp as _) } } #[cfg(all(feature = "Win32_System_Kernel", feature = "Win32_System_SystemInformation"))] #[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); - unsafe { KeQueryLogicalProcessorRelationship(core::mem::transmute(processornumber.unwrap_or(core::mem::zeroed())), relationshiptype, core::mem::transmute(information.unwrap_or(core::mem::zeroed())), core::mem::transmute(length)) } + unsafe { KeQueryLogicalProcessorRelationship(processornumber.unwrap_or(core::mem::zeroed()) as _, relationshiptype, information.unwrap_or(core::mem::zeroed()) as _, length as _) } } #[inline] pub unsafe fn KeQueryMaximumGroupCount() -> u16 { @@ -3072,13 +3061,13 @@ 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)); - unsafe { KeQueryNodeActiveAffinity(nodenumber, core::mem::transmute(affinity.unwrap_or(core::mem::zeroed())), core::mem::transmute(count.unwrap_or(core::mem::zeroed()))) } + unsafe { KeQueryNodeActiveAffinity(nodenumber, affinity.unwrap_or(core::mem::zeroed()) as _, count.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_SystemInformation")] #[inline] pub unsafe fn KeQueryNodeActiveAffinity2(nodenumber: u16, groupaffinities: Option<&mut [super::super::super::Win32::System::SystemInformation::GROUP_AFFINITY]>, groupaffinitiesrequired: *mut u16) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn KeQueryNodeActiveAffinity2(nodenumber : u16, groupaffinities : *mut super::super::super::Win32::System::SystemInformation:: GROUP_AFFINITY, groupaffinitiescount : u16, groupaffinitiesrequired : *mut u16) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { KeQueryNodeActiveAffinity2(nodenumber, core::mem::transmute(groupaffinities.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), groupaffinities.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(groupaffinitiesrequired)) } + unsafe { KeQueryNodeActiveAffinity2(nodenumber, core::mem::transmute(groupaffinities.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), groupaffinities.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), groupaffinitiesrequired as _) } } #[inline] pub unsafe fn KeQueryNodeActiveProcessorCount(nodenumber: u16) -> u32 { @@ -3093,7 +3082,7 @@ pub unsafe fn KeQueryNodeMaximumProcessorCount(nodenumber: u16) -> u16 { #[inline] pub unsafe fn KeQueryPerformanceCounter(performancefrequency: Option<*mut i64>) -> i64 { windows_targets::link!("hal.dll" "system" fn KeQueryPerformanceCounter(performancefrequency : *mut i64) -> i64); - unsafe { KeQueryPerformanceCounter(core::mem::transmute(performancefrequency.unwrap_or(core::mem::zeroed()))) } + unsafe { KeQueryPerformanceCounter(performancefrequency.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -3105,7 +3094,7 @@ pub unsafe fn KeQueryPriorityThread(thread: super::super::Foundation::PKTHREAD) #[inline] 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); - unsafe { KeQueryRuntimeThread(thread, core::mem::transmute(usertime)) } + unsafe { KeQueryRuntimeThread(thread, usertime as _) } } #[inline] pub unsafe fn KeQuerySystemTimePrecise() -> i64 { @@ -3125,7 +3114,7 @@ pub unsafe fn KeQueryTimeIncrement() -> u32 { #[inline] 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); - unsafe { KeQueryTotalCycleTimeThread(thread, core::mem::transmute(cycletimestamp)) } + unsafe { KeQueryTotalCycleTimeThread(thread, cycletimestamp as _) } } #[inline] pub unsafe fn KeQueryUnbiasedInterruptTime() -> u64 { @@ -3135,7 +3124,7 @@ pub unsafe fn KeQueryUnbiasedInterruptTime() -> u64 { #[inline] pub unsafe fn KeQueryUnbiasedInterruptTimePrecise(qpctimestamp: *mut u64) -> u64 { windows_targets::link!("ntoskrnl.exe" "system" fn KeQueryUnbiasedInterruptTimePrecise(qpctimestamp : *mut u64) -> u64); - unsafe { KeQueryUnbiasedInterruptTimePrecise(core::mem::transmute(qpctimestamp)) } + unsafe { KeQueryUnbiasedInterruptTimePrecise(qpctimestamp as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -3170,35 +3159,35 @@ 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) -> bool { 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) -> bool); - unsafe { KeRegisterBugCheckCallback(core::mem::transmute(callbackrecord), callbackroutine, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), length, component) } + unsafe { KeRegisterBugCheckCallback(callbackrecord as _, callbackroutine, buffer.unwrap_or(core::mem::zeroed()) as _, length, component) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn KeRegisterBugCheckReasonCallback(callbackrecord: *mut KBUGCHECK_REASON_CALLBACK_RECORD, callbackroutine: PKBUGCHECK_REASON_CALLBACK_ROUTINE, reason: KBUGCHECK_CALLBACK_REASON, component: *const u8) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn KeRegisterBugCheckReasonCallback(callbackrecord : *mut KBUGCHECK_REASON_CALLBACK_RECORD, callbackroutine : PKBUGCHECK_REASON_CALLBACK_ROUTINE, reason : KBUGCHECK_CALLBACK_REASON, component : *const u8) -> bool); - unsafe { KeRegisterBugCheckReasonCallback(core::mem::transmute(callbackrecord), callbackroutine, reason, component) } + unsafe { KeRegisterBugCheckReasonCallback(callbackrecord as _, callbackroutine, reason, component) } } #[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); - unsafe { KeRegisterNmiCallback(callbackroutine, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } + unsafe { KeRegisterNmiCallback(callbackroutine, context.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { KeRegisterProcessorChangeCallback(callbackfunction, core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed())), flags) } + unsafe { KeRegisterProcessorChangeCallback(callbackfunction, callbackcontext.unwrap_or(core::mem::zeroed()) as _, flags) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeReleaseGuardedMutex(mutex: *mut super::super::Foundation::FAST_MUTEX) { windows_targets::link!("ntoskrnl.exe" "system" fn KeReleaseGuardedMutex(mutex : *mut super::super::Foundation:: FAST_MUTEX)); - unsafe { KeReleaseGuardedMutex(core::mem::transmute(mutex)) } + unsafe { KeReleaseGuardedMutex(mutex as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeReleaseGuardedMutexUnsafe(fastmutex: *mut super::super::Foundation::FAST_MUTEX) { windows_targets::link!("ntoskrnl.exe" "system" fn KeReleaseGuardedMutexUnsafe(fastmutex : *mut super::super::Foundation:: FAST_MUTEX)); - unsafe { KeReleaseGuardedMutexUnsafe(core::mem::transmute(fastmutex)) } + unsafe { KeReleaseGuardedMutexUnsafe(fastmutex as _) } } #[inline] pub unsafe fn KeReleaseInStackQueuedSpinLock(lockhandle: *const KLOCK_QUEUE_HANDLE) { @@ -3225,60 +3214,60 @@ pub unsafe fn KeReleaseInterruptSpinLock(interrupt: super::super::Foundation::PK #[inline] pub unsafe fn KeReleaseMutex(mutex: *mut super::super::Foundation::KMUTANT, wait: bool) -> i32 { windows_targets::link!("ntoskrnl.exe" "system" fn KeReleaseMutex(mutex : *mut super::super::Foundation:: KMUTANT, wait : bool) -> i32); - unsafe { KeReleaseMutex(core::mem::transmute(mutex), wait) } + unsafe { KeReleaseMutex(mutex as _, wait) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeReleaseSemaphore(semaphore: *mut KSEMAPHORE, increment: i32, adjustment: i32, wait: bool) -> i32 { windows_targets::link!("ntoskrnl.exe" "system" fn KeReleaseSemaphore(semaphore : *mut KSEMAPHORE, increment : i32, adjustment : i32, wait : bool) -> i32); - unsafe { KeReleaseSemaphore(core::mem::transmute(semaphore), increment, adjustment, wait) } + unsafe { KeReleaseSemaphore(semaphore as _, increment, adjustment, wait) } } #[inline] pub unsafe fn KeReleaseSpinLockForDpc(spinlock: *mut usize, oldirql: u8) { windows_targets::link!("ntoskrnl.exe" "system" fn KeReleaseSpinLockForDpc(spinlock : *mut usize, oldirql : u8)); - unsafe { KeReleaseSpinLockForDpc(core::mem::transmute(spinlock), oldirql) } + unsafe { KeReleaseSpinLockForDpc(spinlock as _, oldirql) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeRemoveByKeyDeviceQueue(devicequeue: *mut super::super::Foundation::KDEVICE_QUEUE, sortkey: u32) -> *mut KDEVICE_QUEUE_ENTRY { windows_targets::link!("ntoskrnl.exe" "system" fn KeRemoveByKeyDeviceQueue(devicequeue : *mut super::super::Foundation:: KDEVICE_QUEUE, sortkey : u32) -> *mut KDEVICE_QUEUE_ENTRY); - unsafe { KeRemoveByKeyDeviceQueue(core::mem::transmute(devicequeue), sortkey) } + unsafe { KeRemoveByKeyDeviceQueue(devicequeue as _, sortkey) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeRemoveByKeyDeviceQueueIfBusy(devicequeue: *mut super::super::Foundation::KDEVICE_QUEUE, sortkey: u32) -> *mut KDEVICE_QUEUE_ENTRY { windows_targets::link!("ntoskrnl.exe" "system" fn KeRemoveByKeyDeviceQueueIfBusy(devicequeue : *mut super::super::Foundation:: KDEVICE_QUEUE, sortkey : u32) -> *mut KDEVICE_QUEUE_ENTRY); - unsafe { KeRemoveByKeyDeviceQueueIfBusy(core::mem::transmute(devicequeue), sortkey) } + unsafe { KeRemoveByKeyDeviceQueueIfBusy(devicequeue as _, sortkey) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeRemoveDeviceQueue(devicequeue: *mut super::super::Foundation::KDEVICE_QUEUE) -> *mut KDEVICE_QUEUE_ENTRY { windows_targets::link!("ntoskrnl.exe" "system" fn KeRemoveDeviceQueue(devicequeue : *mut super::super::Foundation:: KDEVICE_QUEUE) -> *mut KDEVICE_QUEUE_ENTRY); - unsafe { KeRemoveDeviceQueue(core::mem::transmute(devicequeue)) } + unsafe { KeRemoveDeviceQueue(devicequeue as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeRemoveEntryDeviceQueue(devicequeue: *mut super::super::Foundation::KDEVICE_QUEUE, devicequeueentry: *mut KDEVICE_QUEUE_ENTRY) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn KeRemoveEntryDeviceQueue(devicequeue : *mut super::super::Foundation:: KDEVICE_QUEUE, devicequeueentry : *mut KDEVICE_QUEUE_ENTRY) -> bool); - unsafe { KeRemoveEntryDeviceQueue(core::mem::transmute(devicequeue), core::mem::transmute(devicequeueentry)) } + unsafe { KeRemoveEntryDeviceQueue(devicequeue as _, devicequeueentry as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeRemoveQueueDpc(dpc: *mut super::super::Foundation::KDPC) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn KeRemoveQueueDpc(dpc : *mut super::super::Foundation:: KDPC) -> bool); - unsafe { KeRemoveQueueDpc(core::mem::transmute(dpc)) } + unsafe { KeRemoveQueueDpc(dpc as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeRemoveQueueDpcEx(dpc: *mut super::super::Foundation::KDPC, waitifactive: bool) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn KeRemoveQueueDpcEx(dpc : *mut super::super::Foundation:: KDPC, waitifactive : bool) -> bool); - unsafe { KeRemoveQueueDpcEx(core::mem::transmute(dpc), waitifactive) } + unsafe { KeRemoveQueueDpcEx(dpc as _, waitifactive) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeResetEvent(event: *mut super::super::Foundation::KEVENT) -> i32 { windows_targets::link!("ntoskrnl.exe" "system" fn KeResetEvent(event : *mut super::super::Foundation:: KEVENT) -> i32); - unsafe { KeResetEvent(core::mem::transmute(event)) } + unsafe { KeResetEvent(event as _) } } #[cfg(feature = "Win32_System_Diagnostics_Debug")] #[inline] @@ -3306,7 +3295,7 @@ pub unsafe fn KeRevertToUserGroupAffinityThread(previousaffinity: *const super:: #[inline] pub unsafe fn KeSaveExtendedProcessorState(mask: u64, xstatesave: *mut XSTATE_SAVE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn KeSaveExtendedProcessorState(mask : u64, xstatesave : *mut XSTATE_SAVE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { KeSaveExtendedProcessorState(mask, core::mem::transmute(xstatesave)) } + unsafe { KeSaveExtendedProcessorState(mask, xstatesave as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -3318,13 +3307,13 @@ pub unsafe fn KeSetBasePriorityThread(thread: super::super::Foundation::PKTHREAD #[inline] pub unsafe fn KeSetCoalescableTimer(timer: *mut KTIMER, duetime: i64, period: u32, tolerabledelay: u32, dpc: Option<*const super::super::Foundation::KDPC>) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn KeSetCoalescableTimer(timer : *mut KTIMER, duetime : i64, period : u32, tolerabledelay : u32, dpc : *const super::super::Foundation:: KDPC) -> bool); - unsafe { KeSetCoalescableTimer(core::mem::transmute(timer), duetime, period, tolerabledelay, core::mem::transmute(dpc.unwrap_or(core::mem::zeroed()))) } + unsafe { KeSetCoalescableTimer(timer as _, duetime, period, tolerabledelay, dpc.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeSetEvent(event: *mut super::super::Foundation::KEVENT, increment: i32, wait: bool) -> i32 { windows_targets::link!("ntoskrnl.exe" "system" fn KeSetEvent(event : *mut super::super::Foundation:: KEVENT, increment : i32, wait : bool) -> i32); - unsafe { KeSetEvent(core::mem::transmute(event), increment, wait) } + unsafe { KeSetEvent(event as _, increment, wait) } } #[inline] pub unsafe fn KeSetHardwareCounterConfiguration(counterarray: &[HARDWARE_COUNTER]) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -3335,7 +3324,7 @@ pub unsafe fn KeSetHardwareCounterConfiguration(counterarray: &[HARDWARE_COUNTER #[inline] pub unsafe fn KeSetImportanceDpc(dpc: *mut super::super::Foundation::KDPC, importance: KDPC_IMPORTANCE) { windows_targets::link!("ntoskrnl.exe" "system" fn KeSetImportanceDpc(dpc : *mut super::super::Foundation:: KDPC, importance : KDPC_IMPORTANCE)); - unsafe { KeSetImportanceDpc(core::mem::transmute(dpc), importance) } + unsafe { KeSetImportanceDpc(dpc as _, importance) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -3357,31 +3346,31 @@ 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)); - unsafe { KeSetSystemGroupAffinityThread(affinity, core::mem::transmute(previousaffinity.unwrap_or(core::mem::zeroed()))) } + unsafe { KeSetSystemGroupAffinityThread(affinity, previousaffinity.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeSetTargetProcessorDpc(dpc: *mut super::super::Foundation::KDPC, number: i8) { windows_targets::link!("ntoskrnl.exe" "system" fn KeSetTargetProcessorDpc(dpc : *mut super::super::Foundation:: KDPC, number : i8)); - unsafe { KeSetTargetProcessorDpc(core::mem::transmute(dpc), number) } + unsafe { KeSetTargetProcessorDpc(dpc as _, number) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeSetTargetProcessorDpcEx(dpc: *mut super::super::Foundation::KDPC, procnumber: *const super::super::super::Win32::System::Kernel::PROCESSOR_NUMBER) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn KeSetTargetProcessorDpcEx(dpc : *mut super::super::Foundation:: KDPC, procnumber : *const super::super::super::Win32::System::Kernel:: PROCESSOR_NUMBER) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { KeSetTargetProcessorDpcEx(core::mem::transmute(dpc), procnumber) } + unsafe { KeSetTargetProcessorDpcEx(dpc as _, procnumber) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeSetTimer(timer: *mut KTIMER, duetime: i64, dpc: Option<*const super::super::Foundation::KDPC>) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn KeSetTimer(timer : *mut KTIMER, duetime : i64, dpc : *const super::super::Foundation:: KDPC) -> bool); - unsafe { KeSetTimer(core::mem::transmute(timer), duetime, core::mem::transmute(dpc.unwrap_or(core::mem::zeroed()))) } + unsafe { KeSetTimer(timer as _, duetime, dpc.unwrap_or(core::mem::zeroed()) as _) } } #[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>) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn KeSetTimerEx(timer : *mut KTIMER, duetime : i64, period : i32, dpc : *const super::super::Foundation:: KDPC) -> bool); - unsafe { KeSetTimerEx(core::mem::transmute(timer), duetime, period, core::mem::transmute(dpc.unwrap_or(core::mem::zeroed()))) } + unsafe { KeSetTimerEx(timer as _, duetime, period, dpc.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn KeShouldYieldProcessor() -> u32 { @@ -3397,7 +3386,7 @@ pub unsafe fn KeStallExecutionProcessor(microseconds: u32) { #[inline] pub unsafe fn KeSynchronizeExecution(interrupt: super::super::Foundation::PKINTERRUPT, synchronizeroutine: PKSYNCHRONIZE_ROUTINE, synchronizecontext: Option<*const core::ffi::c_void>) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn KeSynchronizeExecution(interrupt : super::super::Foundation:: PKINTERRUPT, synchronizeroutine : PKSYNCHRONIZE_ROUTINE, synchronizecontext : *const core::ffi::c_void) -> bool); - unsafe { KeSynchronizeExecution(interrupt, synchronizeroutine, core::mem::transmute(synchronizecontext.unwrap_or(core::mem::zeroed()))) } + unsafe { KeSynchronizeExecution(interrupt, synchronizeroutine, synchronizecontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn KeTestSpinLock(spinlock: *const usize) -> bool { @@ -3408,23 +3397,23 @@ pub unsafe fn KeTestSpinLock(spinlock: *const usize) -> bool { #[inline] pub unsafe fn KeTryToAcquireGuardedMutex(mutex: *mut super::super::Foundation::FAST_MUTEX) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn KeTryToAcquireGuardedMutex(mutex : *mut super::super::Foundation:: FAST_MUTEX) -> bool); - unsafe { KeTryToAcquireGuardedMutex(core::mem::transmute(mutex)) } + unsafe { KeTryToAcquireGuardedMutex(mutex as _) } } #[inline] pub unsafe fn KeTryToAcquireSpinLockAtDpcLevel(spinlock: *mut usize) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn KeTryToAcquireSpinLockAtDpcLevel(spinlock : *mut usize) -> bool); - unsafe { KeTryToAcquireSpinLockAtDpcLevel(core::mem::transmute(spinlock)) } + unsafe { KeTryToAcquireSpinLockAtDpcLevel(spinlock as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeWaitForMultipleObjects(object: &[*const core::ffi::c_void], waittype: super::super::super::Win32::System::Kernel::WAIT_TYPE, waitreason: KWAIT_REASON, waitmode: i8, alertable: bool, timeout: Option<*const i64>, waitblockarray: Option<*mut super::super::Foundation::KWAIT_BLOCK>) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, timeout : *const i64, waitblockarray : *mut super::super::Foundation:: KWAIT_BLOCK) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { KeWaitForMultipleObjects(object.len().try_into().unwrap(), core::mem::transmute(object.as_ptr()), waittype, waitreason, waitmode, alertable, core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), core::mem::transmute(waitblockarray.unwrap_or(core::mem::zeroed()))) } + unsafe { KeWaitForMultipleObjects(object.len().try_into().unwrap(), core::mem::transmute(object.as_ptr()), waittype, waitreason, waitmode, alertable, timeout.unwrap_or(core::mem::zeroed()) as _, waitblockarray.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn KeWaitForSingleObject(object: *const core::ffi::c_void, waitreason: KWAIT_REASON, waitmode: i8, alertable: bool, timeout: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn KeWaitForSingleObject(object : *const core::ffi::c_void, waitreason : KWAIT_REASON, waitmode : i8, alertable : bool, timeout : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { KeWaitForSingleObject(object, waitreason, waitmode, alertable, core::mem::transmute(timeout.unwrap_or(core::mem::zeroed()))) } + unsafe { KeWaitForSingleObject(object, waitreason, waitmode, alertable, timeout.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn KfRaiseIrql(newirql: u8) -> u8 { @@ -3434,7 +3423,7 @@ pub unsafe fn KfRaiseIrql(newirql: u8) -> u8 { #[inline] pub unsafe fn MmAddPhysicalMemory(startaddress: *const i64, numberofbytes: *mut i64) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn MmAddPhysicalMemory(startaddress : *const i64, numberofbytes : *mut i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { MmAddPhysicalMemory(startaddress, core::mem::transmute(numberofbytes)) } + unsafe { MmAddPhysicalMemory(startaddress, numberofbytes as _) } } #[inline] pub unsafe fn MmAddVerifierSpecialThunks(entryroutine: usize, thunkbuffer: *const core::ffi::c_void, thunkbuffersize: u32) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -3450,7 +3439,7 @@ pub unsafe fn MmAddVerifierThunks(thunkbuffer: *const core::ffi::c_void, thunkbu #[inline] pub unsafe fn MmAdvanceMdl(mdl: *mut super::super::Foundation::MDL, numberofbytes: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn MmAdvanceMdl(mdl : *mut super::super::Foundation:: MDL, numberofbytes : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { MmAdvanceMdl(core::mem::transmute(mdl), numberofbytes) } + unsafe { MmAdvanceMdl(mdl as _, numberofbytes) } } #[inline] pub unsafe fn MmAllocateContiguousMemory(numberofbytes: usize, highestacceptableaddress: i64) -> *mut core::ffi::c_void { @@ -3460,22 +3449,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); - unsafe { MmAllocateContiguousMemoryEx(numberofbytes, lowestacceptableaddress, highestacceptableaddress, boundaryaddressmultiple, preferrednode, protect, core::mem::transmute(partitionobject.unwrap_or(core::mem::zeroed())), tag, flags, core::mem::transmute(baseaddress)) } + unsafe { MmAllocateContiguousMemoryEx(numberofbytes, lowestacceptableaddress, highestacceptableaddress, boundaryaddressmultiple, preferrednode, protect, partitionobject.unwrap_or(core::mem::zeroed()) as _, tag, flags, baseaddress as _) } } #[inline] 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); - unsafe { MmAllocateContiguousMemorySpecifyCache(numberofbytes, lowestacceptableaddress, highestacceptableaddress, core::mem::transmute(boundaryaddressmultiple.unwrap_or(core::mem::zeroed())), cachetype) } + unsafe { MmAllocateContiguousMemorySpecifyCache(numberofbytes, lowestacceptableaddress, highestacceptableaddress, boundaryaddressmultiple.unwrap_or(core::mem::zeroed()) as _, cachetype) } } #[inline] 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); - unsafe { MmAllocateContiguousMemorySpecifyCacheNode(numberofbytes, lowestacceptableaddress, highestacceptableaddress, core::mem::transmute(boundaryaddressmultiple.unwrap_or(core::mem::zeroed())), cachetype, preferrednode) } + unsafe { MmAllocateContiguousMemorySpecifyCacheNode(numberofbytes, lowestacceptableaddress, highestacceptableaddress, boundaryaddressmultiple.unwrap_or(core::mem::zeroed()) as _, cachetype, preferrednode) } } #[inline] 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); - unsafe { MmAllocateContiguousNodeMemory(numberofbytes, lowestacceptableaddress, highestacceptableaddress, core::mem::transmute(boundaryaddressmultiple.unwrap_or(core::mem::zeroed())), protect, preferrednode) } + unsafe { MmAllocateContiguousNodeMemory(numberofbytes, lowestacceptableaddress, highestacceptableaddress, boundaryaddressmultiple.unwrap_or(core::mem::zeroed()) as _, protect, preferrednode) } } #[inline] pub unsafe fn MmAllocateMappingAddress(numberofbytes: usize, pooltag: u32) -> *mut core::ffi::c_void { @@ -3491,7 +3480,7 @@ pub unsafe fn MmAllocateMappingAddressEx(numberofbytes: usize, pooltag: u32, fla #[inline] pub unsafe fn MmAllocateMdlForIoSpace(physicaladdresslist: &[MM_PHYSICAL_ADDRESS_LIST], newmdl: *mut *mut super::super::Foundation::MDL) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn MmAllocateMdlForIoSpace(physicaladdresslist : *const MM_PHYSICAL_ADDRESS_LIST, numberofentries : usize, newmdl : *mut *mut super::super::Foundation:: MDL) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { MmAllocateMdlForIoSpace(core::mem::transmute(physicaladdresslist.as_ptr()), physicaladdresslist.len().try_into().unwrap(), core::mem::transmute(newmdl)) } + unsafe { MmAllocateMdlForIoSpace(core::mem::transmute(physicaladdresslist.as_ptr()), physicaladdresslist.len().try_into().unwrap(), newmdl as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -3520,7 +3509,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); - unsafe { MmAllocatePartitionNodePagesForMdlEx(lowaddress, highaddress, skipbytes, totalbytes, cachetype, idealnode, flags, core::mem::transmute(partitionobject.unwrap_or(core::mem::zeroed()))) } + unsafe { MmAllocatePartitionNodePagesForMdlEx(lowaddress, highaddress, skipbytes, totalbytes, cachetype, idealnode, flags, partitionobject.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -3532,18 +3521,18 @@ pub unsafe fn MmAreMdlPagesCached(memorydescriptorlist: *const super::super::Fou #[inline] pub unsafe fn MmBuildMdlForNonPagedPool(memorydescriptorlist: *mut super::super::Foundation::MDL) { windows_targets::link!("ntoskrnl.exe" "system" fn MmBuildMdlForNonPagedPool(memorydescriptorlist : *mut super::super::Foundation:: MDL)); - unsafe { MmBuildMdlForNonPagedPool(core::mem::transmute(memorydescriptorlist)) } + unsafe { MmBuildMdlForNonPagedPool(memorydescriptorlist as _) } } #[inline] pub unsafe fn MmCopyMemory(targetaddress: *const core::ffi::c_void, sourceaddress: MM_COPY_ADDRESS, numberofbytes: usize, flags: u32, numberofbytestransferred: *mut usize) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn MmCopyMemory(targetaddress : *const core::ffi::c_void, sourceaddress : MM_COPY_ADDRESS, numberofbytes : usize, flags : u32, numberofbytestransferred : *mut usize) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { MmCopyMemory(targetaddress, core::mem::transmute(sourceaddress), numberofbytes, flags, core::mem::transmute(numberofbytestransferred)) } + unsafe { MmCopyMemory(targetaddress, core::mem::transmute(sourceaddress), numberofbytes, flags, numberofbytestransferred as _) } } #[cfg(feature = "Wdk_Foundation")] #[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); - unsafe { MmCreateMdl(core::mem::transmute(memorydescriptorlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed())), length) } + unsafe { MmCreateMdl(memorydescriptorlist.unwrap_or(core::mem::zeroed()) as _, base.unwrap_or(core::mem::zeroed()) as _, length) } } #[inline] pub unsafe fn MmCreateMirror() -> super::super::super::Win32::Foundation::NTSTATUS { @@ -3574,23 +3563,23 @@ pub unsafe fn MmFreeNonCachedMemory(baseaddress: *const core::ffi::c_void, numbe #[inline] pub unsafe fn MmFreePagesFromMdl(memorydescriptorlist: *mut super::super::Foundation::MDL) { windows_targets::link!("ntoskrnl.exe" "system" fn MmFreePagesFromMdl(memorydescriptorlist : *mut super::super::Foundation:: MDL)); - unsafe { MmFreePagesFromMdl(core::mem::transmute(memorydescriptorlist)) } + unsafe { MmFreePagesFromMdl(memorydescriptorlist as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn MmFreePagesFromMdlEx(memorydescriptorlist: *mut super::super::Foundation::MDL, flags: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn MmFreePagesFromMdlEx(memorydescriptorlist : *mut super::super::Foundation:: MDL, flags : u32)); - unsafe { MmFreePagesFromMdlEx(core::mem::transmute(memorydescriptorlist), flags) } + unsafe { MmFreePagesFromMdlEx(memorydescriptorlist as _, flags) } } #[inline] pub unsafe fn MmGetCacheAttribute(physicaladdress: i64, cachetype: *mut MEMORY_CACHING_TYPE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn MmGetCacheAttribute(physicaladdress : i64, cachetype : *mut MEMORY_CACHING_TYPE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { MmGetCacheAttribute(physicaladdress, core::mem::transmute(cachetype)) } + unsafe { MmGetCacheAttribute(physicaladdress, cachetype as _) } } #[inline] pub unsafe fn MmGetCacheAttributeEx(physicaladdress: i64, flags: u32, cachetype: *mut MEMORY_CACHING_TYPE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn MmGetCacheAttributeEx(physicaladdress : i64, flags : u32, cachetype : *mut MEMORY_CACHING_TYPE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { MmGetCacheAttributeEx(physicaladdress, flags, core::mem::transmute(cachetype)) } + unsafe { MmGetCacheAttributeEx(physicaladdress, flags, cachetype as _) } } #[inline] pub unsafe fn MmGetPhysicalAddress(baseaddress: *const core::ffi::c_void) -> i64 { @@ -3605,12 +3594,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); - unsafe { MmGetPhysicalMemoryRangesEx(core::mem::transmute(partitionobject.unwrap_or(core::mem::zeroed()))) } + unsafe { MmGetPhysicalMemoryRangesEx(partitionobject.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { MmGetPhysicalMemoryRangesEx2(core::mem::transmute(partitionobject.unwrap_or(core::mem::zeroed())), flags) } + unsafe { MmGetPhysicalMemoryRangesEx2(partitionobject.unwrap_or(core::mem::zeroed()) as _, flags) } } #[inline] pub unsafe fn MmGetSystemRoutineAddress(systemroutinename: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> *mut core::ffi::c_void { @@ -3662,7 +3651,7 @@ pub unsafe fn MmIsThisAnNtAsSystem() -> bool { #[inline] pub unsafe fn MmIsVerifierEnabled(verifierflags: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn MmIsVerifierEnabled(verifierflags : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { MmIsVerifierEnabled(core::mem::transmute(verifierflags)) } + unsafe { MmIsVerifierEnabled(verifierflags as _) } } #[inline] pub unsafe fn MmLockPagableDataSection(addresswithinsection: *const core::ffi::c_void) -> *mut core::ffi::c_void { @@ -3688,31 +3677,31 @@ pub unsafe fn MmMapIoSpaceEx(physicaladdress: i64, numberofbytes: usize, protect #[inline] pub unsafe fn MmMapLockedPages(memorydescriptorlist: *mut super::super::Foundation::MDL, accessmode: i8) -> *mut core::ffi::c_void { windows_targets::link!("ntoskrnl.exe" "system" fn MmMapLockedPages(memorydescriptorlist : *mut super::super::Foundation:: MDL, accessmode : i8) -> *mut core::ffi::c_void); - unsafe { MmMapLockedPages(core::mem::transmute(memorydescriptorlist), accessmode) } + unsafe { MmMapLockedPages(memorydescriptorlist as _, accessmode) } } #[cfg(feature = "Wdk_Foundation")] #[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); - unsafe { MmMapLockedPagesSpecifyCache(core::mem::transmute(memorydescriptorlist), accessmode, cachetype, core::mem::transmute(requestedaddress.unwrap_or(core::mem::zeroed())), bugcheckonfailure, priority) } + unsafe { MmMapLockedPagesSpecifyCache(memorydescriptorlist as _, accessmode, cachetype, requestedaddress.unwrap_or(core::mem::zeroed()) as _, bugcheckonfailure, priority) } } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn MmMapLockedPagesWithReservedMapping(mappingaddress: *const core::ffi::c_void, pooltag: u32, memorydescriptorlist: *mut super::super::Foundation::MDL, cachetype: MEMORY_CACHING_TYPE) -> *mut core::ffi::c_void { windows_targets::link!("ntoskrnl.exe" "system" fn MmMapLockedPagesWithReservedMapping(mappingaddress : *const core::ffi::c_void, pooltag : u32, memorydescriptorlist : *mut super::super::Foundation:: MDL, cachetype : MEMORY_CACHING_TYPE) -> *mut core::ffi::c_void); - unsafe { MmMapLockedPagesWithReservedMapping(mappingaddress, pooltag, core::mem::transmute(memorydescriptorlist), cachetype) } + unsafe { MmMapLockedPagesWithReservedMapping(mappingaddress, pooltag, memorydescriptorlist as _, cachetype) } } #[cfg(feature = "Wdk_Foundation")] #[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); - unsafe { MmMapMdl(core::mem::transmute(memorydescriptorlist), protection, driverroutine, core::mem::transmute(drivercontext.unwrap_or(core::mem::zeroed()))) } + unsafe { MmMapMdl(memorydescriptorlist as _, protection, driverroutine, drivercontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn MmMapMemoryDumpMdlEx(va: *const core::ffi::c_void, pagetotal: u32, memorydumpmdl: *mut super::super::Foundation::MDL, flags: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn MmMapMemoryDumpMdlEx(va : *const core::ffi::c_void, pagetotal : u32, memorydumpmdl : *mut super::super::Foundation:: MDL, flags : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { MmMapMemoryDumpMdlEx(va, pagetotal, core::mem::transmute(memorydumpmdl), flags) } + unsafe { MmMapMemoryDumpMdlEx(va, pagetotal, memorydumpmdl as _, flags) } } #[inline] pub unsafe fn MmMapUserAddressesToPage(baseaddress: *const core::ffi::c_void, numberofbytes: usize, pageaddress: *const core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -3727,28 +3716,28 @@ pub unsafe fn MmMapVideoDisplay(physicaladdress: i64, numberofbytes: usize, cach #[inline] pub unsafe fn MmMapViewInSessionSpace(section: *const core::ffi::c_void, mappedbase: *mut *mut core::ffi::c_void, viewsize: *mut usize) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn MmMapViewInSessionSpace(section : *const core::ffi::c_void, mappedbase : *mut *mut core::ffi::c_void, viewsize : *mut usize) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { MmMapViewInSessionSpace(section, core::mem::transmute(mappedbase), core::mem::transmute(viewsize)) } + unsafe { MmMapViewInSessionSpace(section, mappedbase as _, viewsize as _) } } #[inline] pub unsafe fn MmMapViewInSessionSpaceEx(section: *const core::ffi::c_void, mappedbase: *mut *mut core::ffi::c_void, viewsize: *mut usize, sectionoffset: *mut i64, flags: usize) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn MmMapViewInSessionSpaceEx(section : *const core::ffi::c_void, mappedbase : *mut *mut core::ffi::c_void, viewsize : *mut usize, sectionoffset : *mut i64, flags : usize) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { MmMapViewInSessionSpaceEx(section, core::mem::transmute(mappedbase), core::mem::transmute(viewsize), core::mem::transmute(sectionoffset), flags) } + unsafe { MmMapViewInSessionSpaceEx(section, mappedbase as _, viewsize as _, sectionoffset as _, flags) } } #[inline] pub unsafe fn MmMapViewInSystemSpace(section: *const core::ffi::c_void, mappedbase: *mut *mut core::ffi::c_void, viewsize: *mut usize) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn MmMapViewInSystemSpace(section : *const core::ffi::c_void, mappedbase : *mut *mut core::ffi::c_void, viewsize : *mut usize) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { MmMapViewInSystemSpace(section, core::mem::transmute(mappedbase), core::mem::transmute(viewsize)) } + unsafe { MmMapViewInSystemSpace(section, mappedbase as _, viewsize as _) } } #[inline] pub unsafe fn MmMapViewInSystemSpaceEx(section: *const core::ffi::c_void, mappedbase: *mut *mut core::ffi::c_void, viewsize: *mut usize, sectionoffset: *mut i64, flags: usize) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn MmMapViewInSystemSpaceEx(section : *const core::ffi::c_void, mappedbase : *mut *mut core::ffi::c_void, viewsize : *mut usize, sectionoffset : *mut i64, flags : usize) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { MmMapViewInSystemSpaceEx(section, core::mem::transmute(mappedbase), core::mem::transmute(viewsize), core::mem::transmute(sectionoffset), flags) } + unsafe { MmMapViewInSystemSpaceEx(section, mappedbase as _, viewsize as _, sectionoffset as _, flags) } } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn MmMdlPageContentsState(memorydescriptorlist: *mut super::super::Foundation::MDL, state: MM_MDL_PAGE_CONTENTS_STATE) -> MM_MDL_PAGE_CONTENTS_STATE { windows_targets::link!("ntoskrnl.exe" "system" fn MmMdlPageContentsState(memorydescriptorlist : *mut super::super::Foundation:: MDL, state : MM_MDL_PAGE_CONTENTS_STATE) -> MM_MDL_PAGE_CONTENTS_STATE); - unsafe { MmMdlPageContentsState(core::mem::transmute(memorydescriptorlist), state) } + unsafe { MmMdlPageContentsState(memorydescriptorlist as _, state) } } #[inline] pub unsafe fn MmPageEntireDriver(addresswithinsection: *const core::ffi::c_void) -> *mut core::ffi::c_void { @@ -3759,19 +3748,19 @@ pub unsafe fn MmPageEntireDriver(addresswithinsection: *const core::ffi::c_void) #[inline] pub unsafe fn MmProbeAndLockPages(memorydescriptorlist: *mut super::super::Foundation::MDL, accessmode: i8, operation: LOCK_OPERATION) { windows_targets::link!("ntoskrnl.exe" "system" fn MmProbeAndLockPages(memorydescriptorlist : *mut super::super::Foundation:: MDL, accessmode : i8, operation : LOCK_OPERATION)); - unsafe { MmProbeAndLockPages(core::mem::transmute(memorydescriptorlist), accessmode, operation) } + unsafe { MmProbeAndLockPages(memorydescriptorlist as _, accessmode, operation) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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)); - unsafe { MmProbeAndLockProcessPages(core::mem::transmute(memorydescriptorlist), process, accessmode, operation) } + unsafe { MmProbeAndLockProcessPages(memorydescriptorlist as _, process, accessmode, operation) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Storage_FileSystem"))] #[inline] pub unsafe fn MmProbeAndLockSelectedPages(memorydescriptorlist: *mut super::super::Foundation::MDL, segmentarray: *const super::super::super::Win32::Storage::FileSystem::FILE_SEGMENT_ELEMENT, accessmode: i8, operation: LOCK_OPERATION) { windows_targets::link!("ntoskrnl.exe" "system" fn MmProbeAndLockSelectedPages(memorydescriptorlist : *mut super::super::Foundation:: MDL, segmentarray : *const super::super::super::Win32::Storage::FileSystem:: FILE_SEGMENT_ELEMENT, accessmode : i8, operation : LOCK_OPERATION)); - unsafe { MmProbeAndLockSelectedPages(core::mem::transmute(memorydescriptorlist), segmentarray, accessmode, operation) } + unsafe { MmProbeAndLockSelectedPages(memorydescriptorlist as _, segmentarray, accessmode, operation) } } #[inline] pub unsafe fn MmProtectDriverSection(addresswithinsection: *const core::ffi::c_void, size: usize, flags: u32) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -3792,7 +3781,7 @@ pub unsafe fn MmQuerySystemSize() -> MM_SYSTEMSIZE { #[inline] pub unsafe fn MmRemovePhysicalMemory(startaddress: *const i64, numberofbytes: *mut i64) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn MmRemovePhysicalMemory(startaddress : *const i64, numberofbytes : *mut i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { MmRemovePhysicalMemory(startaddress, core::mem::transmute(numberofbytes)) } + unsafe { MmRemovePhysicalMemory(startaddress, numberofbytes as _) } } #[inline] pub unsafe fn MmResetDriverPaging(addresswithinsection: *const core::ffi::c_void) { @@ -3803,7 +3792,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); - unsafe { MmRotatePhysicalView(virtualaddress, core::mem::transmute(numberofbytes), core::mem::transmute(newmdl.unwrap_or(core::mem::zeroed())), direction, copyfunction, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } + unsafe { MmRotatePhysicalView(virtualaddress, numberofbytes as _, newmdl.unwrap_or(core::mem::zeroed()) as _, direction, copyfunction, context.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MmSecureVirtualMemory(address: *const core::ffi::c_void, size: usize, probemode: u32) -> super::super::super::Win32::Foundation::HANDLE { @@ -3823,7 +3812,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); - unsafe { MmSizeOfMdl(core::mem::transmute(base.unwrap_or(core::mem::zeroed())), length) } + unsafe { MmSizeOfMdl(base.unwrap_or(core::mem::zeroed()) as _, length) } } #[inline] pub unsafe fn MmUnlockPagableImageSection(imagesectionhandle: *const core::ffi::c_void) { @@ -3834,7 +3823,7 @@ pub unsafe fn MmUnlockPagableImageSection(imagesectionhandle: *const core::ffi:: #[inline] pub unsafe fn MmUnlockPages(memorydescriptorlist: *mut super::super::Foundation::MDL) { windows_targets::link!("ntoskrnl.exe" "system" fn MmUnlockPages(memorydescriptorlist : *mut super::super::Foundation:: MDL)); - unsafe { MmUnlockPages(core::mem::transmute(memorydescriptorlist)) } + unsafe { MmUnlockPages(memorydescriptorlist as _) } } #[inline] pub unsafe fn MmUnmapIoSpace(baseaddress: *const core::ffi::c_void, numberofbytes: usize) { @@ -3845,13 +3834,13 @@ pub unsafe fn MmUnmapIoSpace(baseaddress: *const core::ffi::c_void, numberofbyte #[inline] pub unsafe fn MmUnmapLockedPages(baseaddress: *const core::ffi::c_void, memorydescriptorlist: *mut super::super::Foundation::MDL) { windows_targets::link!("ntoskrnl.exe" "system" fn MmUnmapLockedPages(baseaddress : *const core::ffi::c_void, memorydescriptorlist : *mut super::super::Foundation:: MDL)); - unsafe { MmUnmapLockedPages(baseaddress, core::mem::transmute(memorydescriptorlist)) } + unsafe { MmUnmapLockedPages(baseaddress, memorydescriptorlist as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn MmUnmapReservedMapping(baseaddress: *const core::ffi::c_void, pooltag: u32, memorydescriptorlist: *mut super::super::Foundation::MDL) { windows_targets::link!("ntoskrnl.exe" "system" fn MmUnmapReservedMapping(baseaddress : *const core::ffi::c_void, pooltag : u32, memorydescriptorlist : *mut super::super::Foundation:: MDL)); - unsafe { MmUnmapReservedMapping(baseaddress, pooltag, core::mem::transmute(memorydescriptorlist)) } + unsafe { MmUnmapReservedMapping(baseaddress, pooltag, memorydescriptorlist as _) } } #[inline] pub unsafe fn MmUnmapVideoDisplay(baseaddress: *const core::ffi::c_void, numberofbytes: usize) { @@ -3876,17 +3865,17 @@ pub unsafe fn MmUnsecureVirtualMemory(securehandle: super::super::super::Win32:: #[inline] pub unsafe fn NtAllocateLocallyUniqueId(luid: *mut super::super::super::Win32::Foundation::LUID) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtAllocateLocallyUniqueId(luid : *mut super::super::super::Win32::Foundation:: LUID) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtAllocateLocallyUniqueId(core::mem::transmute(luid)) } + unsafe { NtAllocateLocallyUniqueId(luid as _) } } #[inline] 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); - unsafe { NtCommitComplete(enlistmenthandle, core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } + unsafe { NtCommitComplete(enlistmenthandle, tmvirtualclock.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { NtCommitEnlistment(enlistmenthandle, core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } + unsafe { NtCommitEnlistment(enlistmenthandle, tmvirtualclock.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NtCommitTransaction(transactionhandle: super::super::super::Win32::Foundation::HANDLE, wait: bool) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -3897,38 +3886,25 @@ pub unsafe fn NtCommitTransaction(transactionhandle: super::super::super::Win32: #[inline] 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); - unsafe { NtCreateEnlistment(core::mem::transmute(enlistmenthandle), desiredaccess, resourcemanagerhandle, transactionhandle, core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(createoptions.unwrap_or(core::mem::zeroed())), notificationmask, core::mem::transmute(enlistmentkey.unwrap_or(core::mem::zeroed()))) } + unsafe { NtCreateEnlistment(enlistmenthandle as _, desiredaccess, resourcemanagerhandle, transactionhandle, objectattributes.unwrap_or(core::mem::zeroed()) as _, createoptions.unwrap_or(core::mem::zeroed()) as _, notificationmask, enlistmentkey.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] 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); - unsafe { NtCreateResourceManager(core::mem::transmute(resourcemanagerhandle), desiredaccess, tmhandle, 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()))) } + unsafe { NtCreateResourceManager(resourcemanagerhandle as _, desiredaccess, tmhandle, rmguid, objectattributes.unwrap_or(core::mem::zeroed()) as _, createoptions.unwrap_or(core::mem::zeroed()) as _, description.unwrap_or(core::mem::zeroed()) as _) } } #[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: 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); - unsafe { - NtCreateTransaction( - core::mem::transmute(transactionhandle), - 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())), - ) - } + unsafe { NtCreateTransaction(transactionhandle as _, desiredaccess, objectattributes.unwrap_or(core::mem::zeroed()) as _, uow.unwrap_or(core::mem::zeroed()) as _, tmhandle.unwrap_or(core::mem::zeroed()) as _, createoptions.unwrap_or(core::mem::zeroed()) as _, isolationlevel.unwrap_or(core::mem::zeroed()) as _, isolationflags.unwrap_or(core::mem::zeroed()) as _, timeout.unwrap_or(core::mem::zeroed()) as _, description.unwrap_or(core::mem::zeroed()) as _) } } #[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: 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); - unsafe { NtCreateTransactionManager(core::mem::transmute(tmhandle), 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()))) } + unsafe { NtCreateTransactionManager(tmhandle as _, desiredaccess, objectattributes.unwrap_or(core::mem::zeroed()) as _, logfilename.unwrap_or(core::mem::zeroed()) as _, createoptions.unwrap_or(core::mem::zeroed()) as _, commitstrength.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NtDisplayString(string: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -3939,13 +3915,13 @@ pub unsafe fn NtDisplayString(string: *const super::super::super::Win32::Foundat #[inline] 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); - unsafe { NtEnumerateTransactionObject(core::mem::transmute(rootobjecthandle.unwrap_or(core::mem::zeroed())), querytype, core::mem::transmute(objectcursor), objectcursorlength, core::mem::transmute(returnlength)) } + unsafe { NtEnumerateTransactionObject(rootobjecthandle.unwrap_or(core::mem::zeroed()) as _, querytype, objectcursor as _, objectcursorlength, returnlength as _) } } #[cfg(feature = "Win32_Storage_FileSystem")] #[inline] 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); - unsafe { NtGetNotificationResourceManager(resourcemanagerhandle, core::mem::transmute(transactionnotification), notificationlength, core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed())), asynchronous, core::mem::transmute(asynchronouscontext.unwrap_or(core::mem::zeroed()))) } + unsafe { NtGetNotificationResourceManager(resourcemanagerhandle, transactionnotification as _, notificationlength, timeout.unwrap_or(core::mem::zeroed()) as _, returnlength.unwrap_or(core::mem::zeroed()) as _, asynchronous, asynchronouscontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NtLoadDriver(driverservicename: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -3960,57 +3936,57 @@ pub unsafe fn NtMakeTemporaryObject(handle: super::super::super::Win32::Foundati #[inline] 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); - unsafe { NtManagePartition(targethandle, core::mem::transmute(sourcehandle.unwrap_or(core::mem::zeroed())), partitioninformationclass, core::mem::transmute(partitioninformation), partitioninformationlength) } + unsafe { NtManagePartition(targethandle, sourcehandle.unwrap_or(core::mem::zeroed()) as _, partitioninformationclass, partitioninformation as _, 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: 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); - unsafe { NtOpenEnlistment(core::mem::transmute(enlistmenthandle), desiredaccess, resourcemanagerhandle, enlistmentguid, core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed()))) } + unsafe { NtOpenEnlistment(enlistmenthandle as _, desiredaccess, resourcemanagerhandle, enlistmentguid, objectattributes.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] 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); - unsafe { NtOpenResourceManager(core::mem::transmute(resourcemanagerhandle), desiredaccess, tmhandle, core::mem::transmute(resourcemanagerguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed()))) } + unsafe { NtOpenResourceManager(resourcemanagerhandle as _, desiredaccess, tmhandle, resourcemanagerguid.unwrap_or(core::mem::zeroed()) as _, objectattributes.unwrap_or(core::mem::zeroed()) as _) } } #[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: 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); - unsafe { NtOpenTransaction(core::mem::transmute(transactionhandle), desiredaccess, objectattributes, uow, core::mem::transmute(tmhandle.unwrap_or(core::mem::zeroed()))) } + unsafe { NtOpenTransaction(transactionhandle as _, desiredaccess, objectattributes, uow, tmhandle.unwrap_or(core::mem::zeroed()) as _) } } #[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: 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); - unsafe { NtOpenTransactionManager(core::mem::transmute(tmhandle), 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()))) } + unsafe { NtOpenTransactionManager(tmhandle as _, desiredaccess, objectattributes.unwrap_or(core::mem::zeroed()) as _, logfilename.unwrap_or(core::mem::zeroed()) as _, tmidentity.unwrap_or(core::mem::zeroed()) as _, openoptions.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { NtPowerInformation(informationlevel, core::mem::transmute(inputbuffer.unwrap_or(core::mem::zeroed())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(core::mem::zeroed())), outputbufferlength) } + unsafe { NtPowerInformation(informationlevel, inputbuffer.unwrap_or(core::mem::zeroed()) as _, inputbufferlength, outputbuffer.unwrap_or(core::mem::zeroed()) as _, outputbufferlength) } } #[inline] 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); - unsafe { NtPrePrepareComplete(enlistmenthandle, core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } + unsafe { NtPrePrepareComplete(enlistmenthandle, tmvirtualclock.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { NtPrePrepareEnlistment(enlistmenthandle, core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } + unsafe { NtPrePrepareEnlistment(enlistmenthandle, tmvirtualclock.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { NtPrepareComplete(enlistmenthandle, core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } + unsafe { NtPrepareComplete(enlistmenthandle, tmvirtualclock.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { NtPrepareEnlistment(enlistmenthandle, core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } + unsafe { NtPrepareEnlistment(enlistmenthandle, tmvirtualclock.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 { @@ -4026,35 +4002,35 @@ pub unsafe fn NtPropagationFailed(resourcemanagerhandle: super::super::super::Wi #[inline] 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); - unsafe { NtQueryInformationEnlistment(enlistmenthandle, enlistmentinformationclass, core::mem::transmute(enlistmentinformation), enlistmentinformationlength, core::mem::transmute(returnlength)) } + unsafe { NtQueryInformationEnlistment(enlistmenthandle, enlistmentinformationclass, enlistmentinformation as _, enlistmentinformationlength, returnlength as _) } } #[cfg(feature = "Win32_System_SystemServices")] #[inline] 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); - unsafe { NtQueryInformationResourceManager(resourcemanagerhandle, resourcemanagerinformationclass, core::mem::transmute(resourcemanagerinformation), resourcemanagerinformationlength, core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } + unsafe { NtQueryInformationResourceManager(resourcemanagerhandle, resourcemanagerinformationclass, resourcemanagerinformation as _, resourcemanagerinformationlength, returnlength.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_SystemServices")] #[inline] 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); - unsafe { NtQueryInformationTransaction(transactionhandle, transactioninformationclass, core::mem::transmute(transactioninformation), transactioninformationlength, core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } + unsafe { NtQueryInformationTransaction(transactionhandle, transactioninformationclass, transactioninformation as _, transactioninformationlength, returnlength.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_SystemServices")] #[inline] 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); - unsafe { NtQueryInformationTransactionManager(transactionmanagerhandle, transactionmanagerinformationclass, core::mem::transmute(transactionmanagerinformation), transactionmanagerinformationlength, core::mem::transmute(returnlength)) } + unsafe { NtQueryInformationTransactionManager(transactionmanagerhandle, transactionmanagerinformationclass, transactionmanagerinformation as _, transactionmanagerinformationlength, returnlength as _) } } #[inline] 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); - unsafe { NtReadOnlyEnlistment(enlistmenthandle, core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } + unsafe { NtReadOnlyEnlistment(enlistmenthandle, tmvirtualclock.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { NtRecoverEnlistment(enlistmenthandle, core::mem::transmute(enlistmentkey.unwrap_or(core::mem::zeroed()))) } + unsafe { NtRecoverEnlistment(enlistmenthandle, enlistmentkey.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NtRecoverResourceManager(resourcemanagerhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -4069,7 +4045,7 @@ pub unsafe fn NtRecoverTransactionManager(transactionmanagerhandle: super::super #[inline] 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); - unsafe { NtRegisterProtocolAddressInformation(resourcemanager, protocolid, protocolinformationsize, protocolinformation, core::mem::transmute(createoptions.unwrap_or(core::mem::zeroed()))) } + unsafe { NtRegisterProtocolAddressInformation(resourcemanager, protocolid, protocolinformationsize, protocolinformation, createoptions.unwrap_or(core::mem::zeroed()) as _) } } #[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 { @@ -4079,12 +4055,12 @@ pub unsafe fn NtRenameTransactionManager(logfilename: *const super::super::super #[inline] 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); - unsafe { NtRollbackComplete(enlistmenthandle, core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } + unsafe { NtRollbackComplete(enlistmenthandle, tmvirtualclock.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { NtRollbackEnlistment(enlistmenthandle, core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } + unsafe { NtRollbackEnlistment(enlistmenthandle, tmvirtualclock.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NtRollbackTransaction(transactionhandle: super::super::super::Win32::Foundation::HANDLE, wait: bool) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -4094,13 +4070,13 @@ pub unsafe fn NtRollbackTransaction(transactionhandle: super::super::super::Win3 #[inline] 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); - unsafe { NtRollforwardTransactionManager(transactionmanagerhandle, core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } + unsafe { NtRollforwardTransactionManager(transactionmanagerhandle, tmvirtualclock.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_SystemServices")] #[inline] 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); - unsafe { NtSetInformationEnlistment(core::mem::transmute(enlistmenthandle.unwrap_or(core::mem::zeroed())), enlistmentinformationclass, enlistmentinformation, enlistmentinformationlength) } + unsafe { NtSetInformationEnlistment(enlistmenthandle.unwrap_or(core::mem::zeroed()) as _, enlistmentinformationclass, enlistmentinformation, enlistmentinformationlength) } } #[cfg(feature = "Win32_System_SystemServices")] #[inline] @@ -4118,12 +4094,12 @@ pub unsafe fn NtSetInformationTransaction(transactionhandle: super::super::super #[inline] 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); - unsafe { NtSetInformationTransactionManager(core::mem::transmute(tmhandle.unwrap_or(core::mem::zeroed())), transactionmanagerinformationclass, transactionmanagerinformation, transactionmanagerinformationlength) } + unsafe { NtSetInformationTransactionManager(tmhandle.unwrap_or(core::mem::zeroed()) as _, transactionmanagerinformationclass, transactionmanagerinformation, transactionmanagerinformationlength) } } #[inline] 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); - unsafe { NtSinglePhaseReject(enlistmenthandle, core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } + unsafe { NtSinglePhaseReject(enlistmenthandle, tmvirtualclock.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NtUnloadDriver(driverservicename: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -4154,31 +4130,31 @@ pub unsafe fn ObGetFilterVersion() -> u16 { #[inline] pub unsafe fn ObGetObjectSecurity(object: *const core::ffi::c_void, securitydescriptor: *mut super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, memoryallocated: *mut bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn ObGetObjectSecurity(object : *const core::ffi::c_void, securitydescriptor : *mut super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, memoryallocated : *mut bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ObGetObjectSecurity(object, core::mem::transmute(securitydescriptor), core::mem::transmute(memoryallocated)) } + unsafe { ObGetObjectSecurity(object, securitydescriptor as _, memoryallocated as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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); - unsafe { ObReferenceObjectByHandle(handle, desiredaccess, core::mem::transmute(objecttype.unwrap_or(core::mem::zeroed())), accessmode, core::mem::transmute(object), core::mem::transmute(handleinformation.unwrap_or(core::mem::zeroed()))) } + unsafe { ObReferenceObjectByHandle(handle, desiredaccess, objecttype.unwrap_or(core::mem::zeroed()) as _, accessmode, object as _, handleinformation.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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); - unsafe { ObReferenceObjectByHandleWithTag(handle, desiredaccess, core::mem::transmute(objecttype.unwrap_or(core::mem::zeroed())), accessmode, tag, core::mem::transmute(object), core::mem::transmute(handleinformation.unwrap_or(core::mem::zeroed()))) } + unsafe { ObReferenceObjectByHandleWithTag(handle, desiredaccess, objecttype.unwrap_or(core::mem::zeroed()) as _, accessmode, tag, object as _, handleinformation.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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); - unsafe { ObReferenceObjectByPointer(object, desiredaccess, core::mem::transmute(objecttype.unwrap_or(core::mem::zeroed())), accessmode) } + unsafe { ObReferenceObjectByPointer(object, desiredaccess, objecttype.unwrap_or(core::mem::zeroed()) as _, accessmode) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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); - unsafe { ObReferenceObjectByPointerWithTag(object, desiredaccess, core::mem::transmute(objecttype.unwrap_or(core::mem::zeroed())), accessmode, tag) } + unsafe { ObReferenceObjectByPointerWithTag(object, desiredaccess, objecttype.unwrap_or(core::mem::zeroed()) as _, accessmode, tag) } } #[inline] pub unsafe fn ObReferenceObjectSafe(object: *const core::ffi::c_void) -> bool { @@ -4194,7 +4170,7 @@ pub unsafe fn ObReferenceObjectSafeWithTag(object: *const core::ffi::c_void, tag #[inline] pub unsafe fn ObRegisterCallbacks(callbackregistration: *const OB_CALLBACK_REGISTRATION, registrationhandle: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn ObRegisterCallbacks(callbackregistration : *const OB_CALLBACK_REGISTRATION, registrationhandle : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ObRegisterCallbacks(callbackregistration, core::mem::transmute(registrationhandle)) } + unsafe { ObRegisterCallbacks(callbackregistration, registrationhandle as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -4243,13 +4219,13 @@ pub unsafe fn PcwCloseInstance(instance: super::super::Foundation::PPCW_INSTANCE #[inline] 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); - unsafe { PcwCreateInstance(core::mem::transmute(instance), registration, name, data.len().try_into().unwrap(), core::mem::transmute(data.as_ptr())) } + unsafe { PcwCreateInstance(instance as _, registration, name, data.len().try_into().unwrap(), core::mem::transmute(data.as_ptr())) } } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn PcwRegister(registration: *mut super::super::Foundation::PPCW_REGISTRATION, info: *const PCW_REGISTRATION_INFORMATION) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PcwRegister(registration : *mut super::super::Foundation:: PPCW_REGISTRATION, info : *const PCW_REGISTRATION_INFORMATION) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { PcwRegister(core::mem::transmute(registration), info) } + unsafe { PcwRegister(registration as _, info) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4261,40 +4237,40 @@ pub unsafe fn PcwUnregister(registration: super::super::Foundation::PPCW_REGISTR #[inline] pub unsafe fn PoCallDriver(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, irp: *mut super::super::Foundation::IRP) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PoCallDriver(deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, irp : *mut super::super::Foundation:: IRP) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { PoCallDriver(deviceobject, core::mem::transmute(irp)) } + unsafe { PoCallDriver(deviceobject, irp as _) } } #[cfg(feature = "Win32_System_Power")] #[inline] pub unsafe fn PoClearPowerRequest(powerrequest: *mut core::ffi::c_void, r#type: super::super::super::Win32::System::Power::POWER_REQUEST_TYPE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PoClearPowerRequest(powerrequest : *mut core::ffi::c_void, r#type : super::super::super::Win32::System::Power:: POWER_REQUEST_TYPE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { PoClearPowerRequest(core::mem::transmute(powerrequest), r#type) } + unsafe { PoClearPowerRequest(powerrequest as _, 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 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); - unsafe { PoCreatePowerRequest(core::mem::transmute(powerrequest), deviceobject, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } + unsafe { PoCreatePowerRequest(powerrequest as _, deviceobject, context.unwrap_or(core::mem::zeroed()) as _) } } #[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 PoCreateThermalRequest(thermalrequest: *mut *mut core::ffi::c_void, targetdeviceobject: *const super::super::Foundation::DEVICE_OBJECT, policydeviceobject: *const super::super::Foundation::DEVICE_OBJECT, context: *const COUNTED_REASON_CONTEXT, flags: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PoCreateThermalRequest(thermalrequest : *mut *mut core::ffi::c_void, targetdeviceobject : *const super::super::Foundation:: DEVICE_OBJECT, policydeviceobject : *const super::super::Foundation:: DEVICE_OBJECT, context : *const COUNTED_REASON_CONTEXT, flags : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { PoCreateThermalRequest(core::mem::transmute(thermalrequest), targetdeviceobject, policydeviceobject, context, flags) } + unsafe { PoCreateThermalRequest(thermalrequest as _, targetdeviceobject, policydeviceobject, context, flags) } } #[inline] pub unsafe fn PoDeletePowerRequest(powerrequest: *mut core::ffi::c_void) { windows_targets::link!("ntoskrnl.exe" "system" fn PoDeletePowerRequest(powerrequest : *mut core::ffi::c_void)); - unsafe { PoDeletePowerRequest(core::mem::transmute(powerrequest)) } + unsafe { PoDeletePowerRequest(powerrequest as _) } } #[inline] pub unsafe fn PoDeleteThermalRequest(thermalrequest: *mut core::ffi::c_void) { windows_targets::link!("ntoskrnl.exe" "system" fn PoDeleteThermalRequest(thermalrequest : *mut core::ffi::c_void)); - unsafe { PoDeleteThermalRequest(core::mem::transmute(thermalrequest)) } + unsafe { PoDeleteThermalRequest(thermalrequest as _) } } #[inline] pub unsafe fn PoEndDeviceBusy(idlepointer: *mut u32) { windows_targets::link!("ntoskrnl.exe" "system" fn PoEndDeviceBusy(idlepointer : *mut u32)); - unsafe { PoEndDeviceBusy(core::mem::transmute(idlepointer)) } + unsafe { PoEndDeviceBusy(idlepointer as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4354,25 +4330,25 @@ pub unsafe fn PoFxNotifySurprisePowerOn(pdo: *const super::super::Foundation::DE #[inline] 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); - unsafe { PoFxPowerControl(handle, powercontrolcode, core::mem::transmute(inbuffer.unwrap_or(core::mem::zeroed())), inbuffersize, core::mem::transmute(outbuffer.unwrap_or(core::mem::zeroed())), outbuffersize, core::mem::transmute(bytesreturned.unwrap_or(core::mem::zeroed()))) } + unsafe { PoFxPowerControl(handle, powercontrolcode, inbuffer.unwrap_or(core::mem::zeroed()) as _, inbuffersize, outbuffer.unwrap_or(core::mem::zeroed()) as _, outbuffersize, bytesreturned.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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); - unsafe { PoFxPowerOnCrashdumpDevice(handle, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } + unsafe { PoFxPowerOnCrashdumpDevice(handle, context.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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); - unsafe { PoFxQueryCurrentComponentPerfState(handle, flags, component, setindex, core::mem::transmute(currentperf)) } + unsafe { PoFxQueryCurrentComponentPerfState(handle, flags, component, setindex, currentperf as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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); - unsafe { PoFxRegisterComponentPerfStates(handle, component, flags, componentperfstatecallback, inputstateinfo, core::mem::transmute(outputstateinfo)) } + unsafe { PoFxRegisterComponentPerfStates(handle, component, flags, componentperfstatecallback, inputstateinfo, outputstateinfo as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4384,13 +4360,13 @@ pub unsafe fn PoFxRegisterCrashdumpDevice(handle: super::super::Foundation::POHA #[inline] pub unsafe fn PoFxRegisterDevice(pdo: *const super::super::Foundation::DEVICE_OBJECT, device: *const PO_FX_DEVICE_V1, handle: *mut super::super::Foundation::POHANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PoFxRegisterDevice(pdo : *const super::super::Foundation:: DEVICE_OBJECT, device : *const PO_FX_DEVICE_V1, handle : *mut super::super::Foundation:: POHANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { PoFxRegisterDevice(pdo, device, core::mem::transmute(handle)) } + unsafe { PoFxRegisterDevice(pdo, device, handle as _) } } #[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: super::super::Foundation::POHANDLE, callback: PPO_FX_DRIPS_WATCHDOG_CALLBACK, includechilddevices: bool, matchingdriverobject: Option<*const super::super::Foundation::DRIVER_OBJECT>) { windows_targets::link!("ntoskrnl.exe" "system" fn PoFxRegisterDripsWatchdogCallback(handle : super::super::Foundation:: POHANDLE, callback : PPO_FX_DRIPS_WATCHDOG_CALLBACK, includechilddevices : bool, matchingdriverobject : *const super::super::Foundation:: DRIVER_OBJECT)); - unsafe { PoFxRegisterDripsWatchdogCallback(handle, callback, includechilddevices, core::mem::transmute(matchingdriverobject.unwrap_or(core::mem::zeroed()))) } + unsafe { PoFxRegisterDripsWatchdogCallback(handle, callback, includechilddevices, matchingdriverobject.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4455,7 +4431,7 @@ pub unsafe fn PoGetThermalRequestSupport(thermalrequest: *const core::ffi::c_voi #[inline] pub unsafe fn PoQueryWatchdogTime(pdo: *const super::super::Foundation::DEVICE_OBJECT, secondsremaining: *mut u32) -> bool { windows_targets::link!("ntoskrnl.exe" "system" fn PoQueryWatchdogTime(pdo : *const super::super::Foundation:: DEVICE_OBJECT, secondsremaining : *mut u32) -> bool); - unsafe { PoQueryWatchdogTime(pdo, core::mem::transmute(secondsremaining)) } + unsafe { PoQueryWatchdogTime(pdo, secondsremaining as _) } } #[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] @@ -4467,34 +4443,34 @@ 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); - unsafe { PoRegisterPowerSettingCallback(core::mem::transmute(deviceobject.unwrap_or(core::mem::zeroed())), settingguid, callback, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(handle.unwrap_or(core::mem::zeroed()))) } + unsafe { PoRegisterPowerSettingCallback(deviceobject.unwrap_or(core::mem::zeroed()) as _, settingguid, callback, context.unwrap_or(core::mem::zeroed()) as _, handle.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { PoRegisterSystemState(core::mem::transmute(statehandle.unwrap_or(core::mem::zeroed())), flags) } + unsafe { PoRegisterSystemState(statehandle.unwrap_or(core::mem::zeroed()) as _, 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: 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); - unsafe { PoRequestPowerIrp(deviceobject, 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()))) } + unsafe { PoRequestPowerIrp(deviceobject, minorfunction, core::mem::transmute(powerstate), completionfunction.unwrap_or(core::mem::zeroed()) as _, context.unwrap_or(core::mem::zeroed()) as _, irp.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn PoSetDeviceBusyEx(idlepointer: *mut u32) { windows_targets::link!("ntoskrnl.exe" "system" fn PoSetDeviceBusyEx(idlepointer : *mut u32)); - unsafe { PoSetDeviceBusyEx(core::mem::transmute(idlepointer)) } + unsafe { PoSetDeviceBusyEx(idlepointer as _) } } #[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)); - unsafe { PoSetHiberRange(core::mem::transmute(memorymap.unwrap_or(core::mem::zeroed())), flags, address, length, tag) } + unsafe { PoSetHiberRange(memorymap.unwrap_or(core::mem::zeroed()) as _, flags, address, length, tag) } } #[cfg(feature = "Win32_System_Power")] #[inline] pub unsafe fn PoSetPowerRequest(powerrequest: *mut core::ffi::c_void, r#type: super::super::super::Win32::System::Power::POWER_REQUEST_TYPE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PoSetPowerRequest(powerrequest : *mut core::ffi::c_void, r#type : super::super::super::Win32::System::Power:: POWER_REQUEST_TYPE) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { PoSetPowerRequest(core::mem::transmute(powerrequest), r#type) } + unsafe { PoSetPowerRequest(powerrequest as _, 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] @@ -4511,7 +4487,7 @@ pub unsafe fn PoSetSystemState(flags: u32) { #[inline] pub unsafe fn PoSetSystemWake(irp: *mut super::super::Foundation::IRP) { windows_targets::link!("ntoskrnl.exe" "system" fn PoSetSystemWake(irp : *mut super::super::Foundation:: IRP)); - unsafe { PoSetSystemWake(core::mem::transmute(irp)) } + unsafe { PoSetSystemWake(irp as _) } } #[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] @@ -4522,33 +4498,33 @@ pub unsafe fn PoSetSystemWakeDevice(deviceobject: *const super::super::Foundatio #[inline] pub unsafe fn PoSetThermalActiveCooling(thermalrequest: *mut core::ffi::c_void, engaged: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PoSetThermalActiveCooling(thermalrequest : *mut core::ffi::c_void, engaged : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { PoSetThermalActiveCooling(core::mem::transmute(thermalrequest), engaged) } + unsafe { PoSetThermalActiveCooling(thermalrequest as _, engaged) } } #[inline] pub unsafe fn PoSetThermalPassiveCooling(thermalrequest: *mut core::ffi::c_void, throttle: u8) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PoSetThermalPassiveCooling(thermalrequest : *mut core::ffi::c_void, throttle : u8) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { PoSetThermalPassiveCooling(core::mem::transmute(thermalrequest), throttle) } + unsafe { PoSetThermalPassiveCooling(thermalrequest as _, throttle) } } #[inline] pub unsafe fn PoStartDeviceBusy(idlepointer: *mut u32) { windows_targets::link!("ntoskrnl.exe" "system" fn PoStartDeviceBusy(idlepointer : *mut u32)); - unsafe { PoStartDeviceBusy(core::mem::transmute(idlepointer)) } + unsafe { PoStartDeviceBusy(idlepointer as _) } } #[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 PoStartNextPowerIrp(irp: *mut super::super::Foundation::IRP) { windows_targets::link!("ntoskrnl.exe" "system" fn PoStartNextPowerIrp(irp : *mut super::super::Foundation:: IRP)); - unsafe { PoStartNextPowerIrp(core::mem::transmute(irp)) } + unsafe { PoStartNextPowerIrp(irp as _) } } #[inline] pub unsafe fn PoUnregisterPowerSettingCallback(handle: *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PoUnregisterPowerSettingCallback(handle : *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { PoUnregisterPowerSettingCallback(core::mem::transmute(handle)) } + unsafe { PoUnregisterPowerSettingCallback(handle as _) } } #[inline] pub unsafe fn PoUnregisterSystemState(statehandle: *mut core::ffi::c_void) { windows_targets::link!("ntoskrnl.exe" "system" fn PoUnregisterSystemState(statehandle : *mut core::ffi::c_void)); - unsafe { PoUnregisterSystemState(core::mem::transmute(statehandle)) } + unsafe { PoUnregisterSystemState(statehandle as _) } } #[inline] pub unsafe fn ProbeForRead(address: *const core::ffi::c_void, length: usize, alignment: u32) { @@ -4558,7 +4534,7 @@ pub unsafe fn ProbeForRead(address: *const core::ffi::c_void, length: usize, ali #[inline] pub unsafe fn ProbeForWrite(address: *mut core::ffi::c_void, length: usize, alignment: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn ProbeForWrite(address : *mut core::ffi::c_void, length : usize, alignment : u32)); - unsafe { ProbeForWrite(core::mem::transmute(address), length, alignment) } + unsafe { ProbeForWrite(address as _, length, alignment) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4569,13 +4545,13 @@ pub unsafe fn PsAcquireSiloHardReference(silo: super::super::Foundation::PESILO) #[inline] pub unsafe fn PsAllocSiloContextSlot(reserved: usize, returnedcontextslot: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PsAllocSiloContextSlot(reserved : usize, returnedcontextslot : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { PsAllocSiloContextSlot(reserved, core::mem::transmute(returnedcontextslot)) } + unsafe { PsAllocSiloContextSlot(reserved, returnedcontextslot as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn PsAllocateAffinityToken(affinitytoken: *mut super::super::Foundation::PAFFINITY_TOKEN) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PsAllocateAffinityToken(affinitytoken : *mut super::super::Foundation:: PAFFINITY_TOKEN) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { PsAllocateAffinityToken(core::mem::transmute(affinitytoken)) } + unsafe { PsAllocateAffinityToken(affinitytoken as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4587,13 +4563,13 @@ pub unsafe fn PsAttachSiloToCurrentThread(silo: super::super::Foundation::PESILO #[inline] 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); - unsafe { PsCreateSiloContext(silo, size, pooltype, core::mem::transmute(contextcleanupcallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnedsilocontext)) } + unsafe { PsCreateSiloContext(silo, size, pooltype, contextcleanupcallback.unwrap_or(core::mem::zeroed()) as _, returnedsilocontext as _) } } #[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: 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); - unsafe { PsCreateSystemThread(core::mem::transmute(threadhandle), 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())), startroutine, core::mem::transmute(startcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { PsCreateSystemThread(threadhandle as _, desiredaccess, objectattributes.unwrap_or(core::mem::zeroed()) as _, processhandle.unwrap_or(core::mem::zeroed()) as _, clientid.unwrap_or(core::mem::zeroed()) as _, startroutine, startcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn PsDereferenceSiloContext(silocontext: *const core::ffi::c_void) { @@ -4665,25 +4641,25 @@ pub unsafe fn PsGetHostSilo() -> super::super::Foundation::PESILO { #[inline] 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); - unsafe { PsGetJobServerSilo(core::mem::transmute(job.unwrap_or(core::mem::zeroed())), core::mem::transmute(serversilo)) } + unsafe { PsGetJobServerSilo(job.unwrap_or(core::mem::zeroed()) as _, serversilo as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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); - unsafe { PsGetJobSilo(job, core::mem::transmute(silo)) } + unsafe { PsGetJobSilo(job, silo as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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); - unsafe { PsGetParentSilo(core::mem::transmute(job.unwrap_or(core::mem::zeroed()))) } + unsafe { PsGetParentSilo(job.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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); - unsafe { PsGetPermanentSiloContext(silo, contextslot, core::mem::transmute(returnedsilocontext)) } + unsafe { PsGetPermanentSiloContext(silo, contextslot, returnedsilocontext as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4725,7 +4701,7 @@ pub unsafe fn PsGetSiloContainerId(silo: super::super::Foundation::PESILO) -> *m #[inline] 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); - unsafe { PsGetSiloContext(silo, contextslot, core::mem::transmute(returnedsilocontext)) } + unsafe { PsGetSiloContext(silo, contextslot, returnedsilocontext as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4772,7 +4748,7 @@ pub unsafe fn PsGetThreadServerSilo(thread: super::super::Foundation::PETHREAD) #[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>) -> bool { 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) -> bool); - unsafe { 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()))) } + unsafe { PsGetVersion(majorversion.unwrap_or(core::mem::zeroed()) as _, minorversion.unwrap_or(core::mem::zeroed()) as _, buildnumber.unwrap_or(core::mem::zeroed()) as _, csdversion.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4812,7 +4788,7 @@ pub unsafe fn PsMakeSiloContextPermanent(silo: super::super::Foundation::PESILO, #[inline] 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); - unsafe { PsQueryTotalCycleTimeProcess(process, core::mem::transmute(cycletimestamp)) } + unsafe { PsQueryTotalCycleTimeProcess(process, cycletimestamp as _) } } #[inline] pub unsafe fn PsReferenceSiloContext(silocontext: *const core::ffi::c_void) { @@ -4823,7 +4799,7 @@ pub unsafe fn PsReferenceSiloContext(silocontext: *const core::ffi::c_void) { #[inline] pub unsafe fn PsRegisterSiloMonitor(registration: *const SILO_MONITOR_REGISTRATION, returnedmonitor: *mut super::super::Foundation::PSILO_MONITOR) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PsRegisterSiloMonitor(registration : *const SILO_MONITOR_REGISTRATION, returnedmonitor : *mut super::super::Foundation:: PSILO_MONITOR) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { PsRegisterSiloMonitor(registration, core::mem::transmute(returnedmonitor)) } + unsafe { PsRegisterSiloMonitor(registration, returnedmonitor as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4845,13 +4821,13 @@ pub unsafe fn PsRemoveLoadImageNotifyRoutine(notifyroutine: PLOAD_IMAGE_NOTIFY_R #[inline] 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); - unsafe { PsRemoveSiloContext(silo, contextslot, core::mem::transmute(removedsilocontext.unwrap_or(core::mem::zeroed()))) } + unsafe { PsRemoveSiloContext(silo, contextslot, removedsilocontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] 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); - unsafe { PsReplaceSiloContext(silo, contextslot, newsilocontext, core::mem::transmute(oldsilocontext.unwrap_or(core::mem::zeroed()))) } + unsafe { PsReplaceSiloContext(silo, contextslot, newsilocontext, oldsilocontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4932,7 +4908,7 @@ pub unsafe fn PsUnregisterSiloMonitor(monitor: super::super::Foundation::PSILO_M #[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 { windows_targets::link!("ntoskrnl.exe" "system" fn PsWrapApcWow64Thread(apccontext : *mut *mut core::ffi::c_void, apcroutine : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { PsWrapApcWow64Thread(core::mem::transmute(apccontext), core::mem::transmute(apcroutine)) } + unsafe { PsWrapApcWow64Thread(apccontext as _, apcroutine as _) } } #[inline] pub unsafe fn PshedAllocateMemory(size: u32) -> *mut core::ffi::c_void { @@ -4953,7 +4929,7 @@ pub unsafe fn PshedIsSystemWheaEnabled() -> bool { #[inline] pub unsafe fn PshedRegisterPlugin(packet: *mut WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V2) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("pshed.dll" "system" fn PshedRegisterPlugin(packet : *mut WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V2) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { PshedRegisterPlugin(core::mem::transmute(packet)) } + unsafe { PshedRegisterPlugin(packet as _) } } #[cfg(feature = "Win32_System_Diagnostics_Debug")] #[inline] @@ -4969,7 +4945,7 @@ pub unsafe fn PshedUnregisterPlugin(pluginhandle: *const core::ffi::c_void) { #[inline] pub unsafe fn RtlAppendUnicodeStringToString(destination: *mut super::super::super::Win32::Foundation::UNICODE_STRING, source: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlAppendUnicodeStringToString(destination : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, source : *const super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlAppendUnicodeStringToString(core::mem::transmute(destination), source) } + unsafe { RtlAppendUnicodeStringToString(destination as _, source) } } #[inline] pub unsafe fn RtlAppendUnicodeToString(destination: *mut super::super::super::Win32::Foundation::UNICODE_STRING, source: P1) -> super::super::super::Win32::Foundation::NTSTATUS @@ -4977,7 +4953,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlAppendUnicodeToString(destination : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, source : windows_core::PCWSTR) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlAppendUnicodeToString(core::mem::transmute(destination), source.param().abi()) } + unsafe { RtlAppendUnicodeToString(destination as _, source.param().abi()) } } #[inline] pub unsafe fn RtlAreBitsClear(bitmapheader: *const RTL_BITMAP, startingindex: u32, length: u32) -> bool { @@ -5023,7 +4999,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); - unsafe { RtlCmDecodeMemIoResource(descriptor, core::mem::transmute(start.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlCmDecodeMemIoResource(descriptor, start.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RtlCmEncodeMemIoResource(descriptor: *const CM_PARTIAL_RESOURCE_DESCRIPTOR, r#type: u8, length: u64, start: u64) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -5060,22 +5036,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)); - unsafe { RtlCopyString(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlCopyString(destinationstring as _, sourcestring.unwrap_or(core::mem::zeroed()) as _) } } #[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)); - unsafe { RtlCopyUnicodeString(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlCopyUnicodeString(destinationstring as _, sourcestring.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RtlCreateHashTable(hashtable: *mut *mut RTL_DYNAMIC_HASH_TABLE, shift: u32, flags: Option) -> bool { windows_targets::link!("ntdll.dll" "system" fn RtlCreateHashTable(hashtable : *mut *mut RTL_DYNAMIC_HASH_TABLE, shift : u32, flags : u32) -> bool); - unsafe { RtlCreateHashTable(core::mem::transmute(hashtable), shift, core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlCreateHashTable(hashtable as _, shift, flags.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RtlCreateHashTableEx(hashtable: *mut *mut RTL_DYNAMIC_HASH_TABLE, initialsize: u32, shift: u32, flags: Option) -> bool { windows_targets::link!("ntdll.dll" "system" fn RtlCreateHashTableEx(hashtable : *mut *mut RTL_DYNAMIC_HASH_TABLE, initialsize : u32, shift : u32, flags : u32) -> bool); - unsafe { RtlCreateHashTableEx(core::mem::transmute(hashtable), initialsize, shift, core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlCreateHashTableEx(hashtable as _, initialsize, shift, flags.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RtlCreateRegistryKey(relativeto: u32, path: P1) -> super::super::super::Win32::Foundation::NTSTATUS @@ -5089,7 +5065,7 @@ where #[inline] pub unsafe fn RtlCreateSecurityDescriptor(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, revision: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlCreateSecurityDescriptor(securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, revision : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlCreateSecurityDescriptor(core::mem::transmute(securitydescriptor), revision) } + unsafe { RtlCreateSecurityDescriptor(securitydescriptor as _, revision) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -5122,7 +5098,7 @@ pub unsafe fn RtlDeleteHashTable(hashtable: *const RTL_DYNAMIC_HASH_TABLE) { #[inline] pub unsafe fn RtlDeleteNoSplay(links: *const super::super::Foundation::RTL_SPLAY_LINKS, root: *mut *mut super::super::Foundation::RTL_SPLAY_LINKS) { windows_targets::link!("ntdll.dll" "system" fn RtlDeleteNoSplay(links : *const super::super::Foundation:: RTL_SPLAY_LINKS, root : *mut *mut super::super::Foundation:: RTL_SPLAY_LINKS)); - unsafe { RtlDeleteNoSplay(links, core::mem::transmute(root)) } + unsafe { RtlDeleteNoSplay(links, root as _) } } #[inline] pub unsafe fn RtlDeleteRegistryValue(relativeto: u32, path: P1, valuename: P2) -> super::super::super::Win32::Foundation::NTSTATUS @@ -5142,25 +5118,25 @@ pub unsafe fn RtlDowncaseUnicodeChar(sourcecharacter: u16) -> u16 { #[inline] pub unsafe fn RtlEndEnumerationHashTable(hashtable: *const RTL_DYNAMIC_HASH_TABLE, enumerator: *mut RTL_DYNAMIC_HASH_TABLE_ENUMERATOR) { windows_targets::link!("ntdll.dll" "system" fn RtlEndEnumerationHashTable(hashtable : *const RTL_DYNAMIC_HASH_TABLE, enumerator : *mut RTL_DYNAMIC_HASH_TABLE_ENUMERATOR)); - unsafe { RtlEndEnumerationHashTable(hashtable, core::mem::transmute(enumerator)) } + unsafe { RtlEndEnumerationHashTable(hashtable, enumerator as _) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn RtlEndStrongEnumerationHashTable(hashtable: *const RTL_DYNAMIC_HASH_TABLE, enumerator: *mut RTL_DYNAMIC_HASH_TABLE_ENUMERATOR) { windows_targets::link!("ntdll.dll" "system" fn RtlEndStrongEnumerationHashTable(hashtable : *const RTL_DYNAMIC_HASH_TABLE, enumerator : *mut RTL_DYNAMIC_HASH_TABLE_ENUMERATOR)); - unsafe { RtlEndStrongEnumerationHashTable(hashtable, core::mem::transmute(enumerator)) } + unsafe { RtlEndStrongEnumerationHashTable(hashtable, enumerator as _) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn RtlEndWeakEnumerationHashTable(hashtable: *const RTL_DYNAMIC_HASH_TABLE, enumerator: *mut RTL_DYNAMIC_HASH_TABLE_ENUMERATOR) { windows_targets::link!("ntdll.dll" "system" fn RtlEndWeakEnumerationHashTable(hashtable : *const RTL_DYNAMIC_HASH_TABLE, enumerator : *mut RTL_DYNAMIC_HASH_TABLE_ENUMERATOR)); - unsafe { RtlEndWeakEnumerationHashTable(hashtable, core::mem::transmute(enumerator)) } + unsafe { RtlEndWeakEnumerationHashTable(hashtable, enumerator as _) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn RtlEnumerateEntryHashTable(hashtable: *const RTL_DYNAMIC_HASH_TABLE, enumerator: *mut RTL_DYNAMIC_HASH_TABLE_ENUMERATOR) -> *mut RTL_DYNAMIC_HASH_TABLE_ENTRY { windows_targets::link!("ntdll.dll" "system" fn RtlEnumerateEntryHashTable(hashtable : *const RTL_DYNAMIC_HASH_TABLE, enumerator : *mut RTL_DYNAMIC_HASH_TABLE_ENUMERATOR) -> *mut RTL_DYNAMIC_HASH_TABLE_ENTRY); - unsafe { RtlEnumerateEntryHashTable(hashtable, core::mem::transmute(enumerator)) } + unsafe { RtlEnumerateEntryHashTable(hashtable, enumerator as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -5176,18 +5152,18 @@ pub unsafe fn RtlEnumerateGenericTableAvl(table: *const RTL_AVL_TABLE, restart: #[inline] 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); - unsafe { RtlEnumerateGenericTableLikeADirectory(table, core::mem::transmute(matchfunction.unwrap_or(core::mem::zeroed())), core::mem::transmute(matchdata.unwrap_or(core::mem::zeroed())), nextflag, core::mem::transmute(restartkey), core::mem::transmute(deletecount), buffer) } + unsafe { RtlEnumerateGenericTableLikeADirectory(table, matchfunction.unwrap_or(core::mem::zeroed()) as _, matchdata.unwrap_or(core::mem::zeroed()) as _, nextflag, restartkey as _, deletecount as _, buffer) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn RtlEnumerateGenericTableWithoutSplaying(table: *const RTL_GENERIC_TABLE, restartkey: *mut *mut core::ffi::c_void) -> *mut core::ffi::c_void { windows_targets::link!("ntdll.dll" "system" fn RtlEnumerateGenericTableWithoutSplaying(table : *const RTL_GENERIC_TABLE, restartkey : *mut *mut core::ffi::c_void) -> *mut core::ffi::c_void); - unsafe { RtlEnumerateGenericTableWithoutSplaying(table, core::mem::transmute(restartkey)) } + unsafe { RtlEnumerateGenericTableWithoutSplaying(table, restartkey as _) } } #[inline] pub unsafe fn RtlEnumerateGenericTableWithoutSplayingAvl(table: *const RTL_AVL_TABLE, restartkey: *mut *mut core::ffi::c_void) -> *mut core::ffi::c_void { windows_targets::link!("ntdll.dll" "system" fn RtlEnumerateGenericTableWithoutSplayingAvl(table : *const RTL_AVL_TABLE, restartkey : *mut *mut core::ffi::c_void) -> *mut core::ffi::c_void); - unsafe { RtlEnumerateGenericTableWithoutSplayingAvl(table, core::mem::transmute(restartkey)) } + unsafe { RtlEnumerateGenericTableWithoutSplayingAvl(table, restartkey as _) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -5228,17 +5204,17 @@ pub unsafe fn RtlFindClearRuns(bitmapheader: *const RTL_BITMAP, runarray: &mut [ #[inline] pub unsafe fn RtlFindClosestEncodableLength(sourcelength: u64, targetlength: *mut u64) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlFindClosestEncodableLength(sourcelength : u64, targetlength : *mut u64) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlFindClosestEncodableLength(sourcelength, core::mem::transmute(targetlength)) } + unsafe { RtlFindClosestEncodableLength(sourcelength, targetlength as _) } } #[inline] pub unsafe fn RtlFindFirstRunClear(bitmapheader: *const RTL_BITMAP, startingindex: *mut u32) -> u32 { windows_targets::link!("ntoskrnl.exe" "system" fn RtlFindFirstRunClear(bitmapheader : *const RTL_BITMAP, startingindex : *mut u32) -> u32); - unsafe { RtlFindFirstRunClear(bitmapheader, core::mem::transmute(startingindex)) } + unsafe { RtlFindFirstRunClear(bitmapheader, startingindex as _) } } #[inline] pub unsafe fn RtlFindLastBackwardRunClear(bitmapheader: *const RTL_BITMAP, fromindex: u32, startingrunindex: *mut u32) -> u32 { windows_targets::link!("ntdll.dll" "system" fn RtlFindLastBackwardRunClear(bitmapheader : *const RTL_BITMAP, fromindex : u32, startingrunindex : *mut u32) -> u32); - unsafe { RtlFindLastBackwardRunClear(bitmapheader, fromindex, core::mem::transmute(startingrunindex)) } + unsafe { RtlFindLastBackwardRunClear(bitmapheader, fromindex, startingrunindex as _) } } #[inline] pub unsafe fn RtlFindLeastSignificantBit(set: u64) -> i8 { @@ -5248,7 +5224,7 @@ pub unsafe fn RtlFindLeastSignificantBit(set: u64) -> i8 { #[inline] pub unsafe fn RtlFindLongestRunClear(bitmapheader: *const RTL_BITMAP, startingindex: *mut u32) -> u32 { windows_targets::link!("ntdll.dll" "system" fn RtlFindLongestRunClear(bitmapheader : *const RTL_BITMAP, startingindex : *mut u32) -> u32); - unsafe { RtlFindLongestRunClear(bitmapheader, core::mem::transmute(startingindex)) } + unsafe { RtlFindLongestRunClear(bitmapheader, startingindex as _) } } #[inline] pub unsafe fn RtlFindMostSignificantBit(set: u64) -> i8 { @@ -5258,7 +5234,7 @@ pub unsafe fn RtlFindMostSignificantBit(set: u64) -> i8 { #[inline] pub unsafe fn RtlFindNextForwardRunClear(bitmapheader: *const RTL_BITMAP, fromindex: u32, startingrunindex: *mut u32) -> u32 { windows_targets::link!("ntdll.dll" "system" fn RtlFindNextForwardRunClear(bitmapheader : *const RTL_BITMAP, fromindex : u32, startingrunindex : *mut u32) -> u32); - unsafe { RtlFindNextForwardRunClear(bitmapheader, fromindex, core::mem::transmute(startingrunindex)) } + unsafe { RtlFindNextForwardRunClear(bitmapheader, fromindex, startingrunindex as _) } } #[inline] pub unsafe fn RtlFindSetBits(bitmapheader: *const RTL_BITMAP, numbertofind: u32, hintindex: u32) -> u32 { @@ -5274,17 +5250,17 @@ 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)); - unsafe { RtlFreeUTF8String(core::mem::transmute(utf8string.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlFreeUTF8String(utf8string.unwrap_or(core::mem::zeroed()) as _) } } #[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 { windows_targets::link!("ntdll.dll" "system" fn RtlGUIDFromString(guidstring : *const super::super::super::Win32::Foundation:: UNICODE_STRING, guid : *mut windows_core::GUID) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlGUIDFromString(guidstring, core::mem::transmute(guid)) } + unsafe { RtlGUIDFromString(guidstring, guid as _) } } #[inline] pub unsafe fn RtlGenerateClass5Guid(namespaceguid: *const windows_core::GUID, buffer: *const core::ffi::c_void, buffersize: u32, guid: *mut windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn RtlGenerateClass5Guid(namespaceguid : *const windows_core::GUID, buffer : *const core::ffi::c_void, buffersize : u32, guid : *mut windows_core::GUID) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlGenerateClass5Guid(namespaceguid, buffer, buffersize, core::mem::transmute(guid)) } + unsafe { RtlGenerateClass5Guid(namespaceguid, buffer, buffersize, guid as _) } } #[inline] pub unsafe fn RtlGetActiveConsoleId() -> u32 { @@ -5294,7 +5270,7 @@ pub unsafe fn RtlGetActiveConsoleId() -> u32 { #[inline] pub unsafe fn RtlGetCallersAddress(callersaddress: *mut *mut core::ffi::c_void, callerscaller: *mut *mut core::ffi::c_void) { windows_targets::link!("ntdll.dll" "system" fn RtlGetCallersAddress(callersaddress : *mut *mut core::ffi::c_void, callerscaller : *mut *mut core::ffi::c_void)); - unsafe { RtlGetCallersAddress(core::mem::transmute(callersaddress), core::mem::transmute(callerscaller)) } + unsafe { RtlGetCallersAddress(callersaddress as _, callerscaller as _) } } #[inline] pub unsafe fn RtlGetConsoleSessionForegroundProcessId() -> u64 { @@ -5327,7 +5303,7 @@ pub unsafe fn RtlGetNextEntryHashTable(hashtable: *const RTL_DYNAMIC_HASH_TABLE, #[inline] pub unsafe fn RtlGetNtProductType(ntproducttype: *mut super::super::super::Win32::System::Kernel::NT_PRODUCT_TYPE) -> bool { windows_targets::link!("ntdll.dll" "system" fn RtlGetNtProductType(ntproducttype : *mut super::super::super::Win32::System::Kernel:: NT_PRODUCT_TYPE) -> bool); - unsafe { RtlGetNtProductType(core::mem::transmute(ntproducttype)) } + unsafe { RtlGetNtProductType(ntproducttype as _) } } #[inline] pub unsafe fn RtlGetNtSystemRoot() -> windows_core::PCWSTR { @@ -5342,7 +5318,7 @@ where P2: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlGetPersistedStateLocation(sourceid : windows_core::PCWSTR, customvalue : windows_core::PCWSTR, defaultpath : windows_core::PCWSTR, statelocationtype : STATE_LOCATION_TYPE, targetpath : windows_core::PWSTR, bufferlengthin : u32, bufferlengthout : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlGetPersistedStateLocation(sourceid.param().abi(), customvalue.param().abi(), defaultpath.param().abi(), statelocationtype, core::mem::transmute(targetpath.unwrap_or(core::mem::zeroed())), bufferlengthin, core::mem::transmute(bufferlengthout.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlGetPersistedStateLocation(sourceid.param().abi(), customvalue.param().abi(), defaultpath.param().abi(), statelocationtype, targetpath.unwrap_or(core::mem::zeroed()) as _, bufferlengthin, bufferlengthout.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RtlGetSuiteMask() -> u32 { @@ -5353,101 +5329,101 @@ pub unsafe fn RtlGetSuiteMask() -> u32 { #[inline] pub unsafe fn RtlGetVersion(lpversioninformation: *mut super::super::super::Win32::System::SystemInformation::OSVERSIONINFOW) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlGetVersion(lpversioninformation : *mut super::super::super::Win32::System::SystemInformation:: OSVERSIONINFOW) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlGetVersion(core::mem::transmute(lpversioninformation)) } + unsafe { RtlGetVersion(lpversioninformation as _) } } #[inline] pub unsafe fn RtlHashUnicodeString(string: *const super::super::super::Win32::Foundation::UNICODE_STRING, caseinsensitive: bool, hashalgorithm: u32, hashvalue: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlHashUnicodeString(string : *const super::super::super::Win32::Foundation:: UNICODE_STRING, caseinsensitive : bool, hashalgorithm : u32, hashvalue : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlHashUnicodeString(string, caseinsensitive, hashalgorithm, core::mem::transmute(hashvalue)) } + unsafe { RtlHashUnicodeString(string, caseinsensitive, hashalgorithm, hashvalue as _) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn RtlInitEnumerationHashTable(hashtable: *const RTL_DYNAMIC_HASH_TABLE, enumerator: *mut RTL_DYNAMIC_HASH_TABLE_ENUMERATOR) -> bool { windows_targets::link!("ntdll.dll" "system" fn RtlInitEnumerationHashTable(hashtable : *const RTL_DYNAMIC_HASH_TABLE, enumerator : *mut RTL_DYNAMIC_HASH_TABLE_ENUMERATOR) -> bool); - unsafe { RtlInitEnumerationHashTable(hashtable, core::mem::transmute(enumerator)) } + unsafe { RtlInitEnumerationHashTable(hashtable, enumerator as _) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn RtlInitStrongEnumerationHashTable(hashtable: *const RTL_DYNAMIC_HASH_TABLE, enumerator: *mut RTL_DYNAMIC_HASH_TABLE_ENUMERATOR) -> bool { windows_targets::link!("ntdll.dll" "system" fn RtlInitStrongEnumerationHashTable(hashtable : *const RTL_DYNAMIC_HASH_TABLE, enumerator : *mut RTL_DYNAMIC_HASH_TABLE_ENUMERATOR) -> bool); - unsafe { RtlInitStrongEnumerationHashTable(hashtable, core::mem::transmute(enumerator)) } + unsafe { RtlInitStrongEnumerationHashTable(hashtable, enumerator as _) } } #[cfg(feature = "Win32_System_Kernel")] #[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)); - unsafe { RtlInitUTF8String(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlInitUTF8String(destinationstring as _, sourcestring.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { RtlInitUTF8StringEx(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlInitUTF8StringEx(destinationstring as _, sourcestring.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn RtlInitWeakEnumerationHashTable(hashtable: *const RTL_DYNAMIC_HASH_TABLE, enumerator: *mut RTL_DYNAMIC_HASH_TABLE_ENUMERATOR) -> bool { windows_targets::link!("ntdll.dll" "system" fn RtlInitWeakEnumerationHashTable(hashtable : *const RTL_DYNAMIC_HASH_TABLE, enumerator : *mut RTL_DYNAMIC_HASH_TABLE_ENUMERATOR) -> bool); - unsafe { RtlInitWeakEnumerationHashTable(hashtable, core::mem::transmute(enumerator)) } + unsafe { RtlInitWeakEnumerationHashTable(hashtable, enumerator as _) } } #[inline] 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)); - unsafe { RtlInitializeBitMap(core::mem::transmute(bitmapheader), core::mem::transmute(bitmapbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(sizeofbitmap.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlInitializeBitMap(bitmapheader as _, bitmapbuffer.unwrap_or(core::mem::zeroed()) as _, sizeofbitmap.unwrap_or(core::mem::zeroed()) as _) } } #[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)); - unsafe { RtlInitializeGenericTable(core::mem::transmute(table), compareroutine, allocateroutine, freeroutine, core::mem::transmute(tablecontext.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlInitializeGenericTable(table as _, compareroutine, allocateroutine, freeroutine, tablecontext.unwrap_or(core::mem::zeroed()) as _) } } #[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)); - unsafe { RtlInitializeGenericTableAvl(core::mem::transmute(table), compareroutine, allocateroutine, freeroutine, core::mem::transmute(tablecontext.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlInitializeGenericTableAvl(table as _, compareroutine, allocateroutine, freeroutine, tablecontext.unwrap_or(core::mem::zeroed()) as _) } } #[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 bool>) -> *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 bool) -> *mut core::ffi::c_void); - unsafe { RtlInsertElementGenericTable(table, buffer, buffersize, core::mem::transmute(newelement.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlInsertElementGenericTable(table, buffer, buffersize, newelement.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RtlInsertElementGenericTableAvl(table: *const RTL_AVL_TABLE, buffer: *const core::ffi::c_void, buffersize: u32, newelement: Option<*mut bool>) -> *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 bool) -> *mut core::ffi::c_void); - unsafe { RtlInsertElementGenericTableAvl(table, buffer, buffersize, core::mem::transmute(newelement.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlInsertElementGenericTableAvl(table, buffer, buffersize, newelement.unwrap_or(core::mem::zeroed()) as _) } } #[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 bool>, 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 bool, nodeorparent : *const core::ffi::c_void, searchresult : TABLE_SEARCH_RESULT) -> *mut core::ffi::c_void); - unsafe { RtlInsertElementGenericTableFull(table, buffer, buffersize, core::mem::transmute(newelement.unwrap_or(core::mem::zeroed())), nodeorparent, searchresult) } + unsafe { RtlInsertElementGenericTableFull(table, buffer, buffersize, newelement.unwrap_or(core::mem::zeroed()) as _, nodeorparent, searchresult) } } #[inline] pub unsafe fn RtlInsertElementGenericTableFullAvl(table: *const RTL_AVL_TABLE, buffer: *const core::ffi::c_void, buffersize: u32, newelement: Option<*mut bool>, 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 bool, nodeorparent : *const core::ffi::c_void, searchresult : TABLE_SEARCH_RESULT) -> *mut core::ffi::c_void); - unsafe { RtlInsertElementGenericTableFullAvl(table, buffer, buffersize, core::mem::transmute(newelement.unwrap_or(core::mem::zeroed())), nodeorparent, searchresult) } + unsafe { RtlInsertElementGenericTableFullAvl(table, buffer, buffersize, newelement.unwrap_or(core::mem::zeroed()) as _, nodeorparent, searchresult) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn RtlInsertEntryHashTable(hashtable: *const RTL_DYNAMIC_HASH_TABLE, entry: *const RTL_DYNAMIC_HASH_TABLE_ENTRY, signature: usize, context: Option<*mut RTL_DYNAMIC_HASH_TABLE_CONTEXT>) -> bool { 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) -> bool); - unsafe { RtlInsertEntryHashTable(hashtable, entry, signature, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlInsertEntryHashTable(hashtable, entry, signature, context.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { RtlInt64ToUnicodeString(value, core::mem::transmute(base.unwrap_or(core::mem::zeroed())), core::mem::transmute(string)) } + unsafe { RtlInt64ToUnicodeString(value, base.unwrap_or(core::mem::zeroed()) as _, string as _) } } #[inline] 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); - unsafe { RtlIntegerToUnicodeString(value, core::mem::transmute(base.unwrap_or(core::mem::zeroed())), core::mem::transmute(string)) } + unsafe { RtlIntegerToUnicodeString(value, base.unwrap_or(core::mem::zeroed()) as _, string as _) } } #[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); - unsafe { RtlIoDecodeMemIoResource(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()))) } + unsafe { RtlIoDecodeMemIoResource(descriptor, alignment.unwrap_or(core::mem::zeroed()) as _, minimumaddress.unwrap_or(core::mem::zeroed()) as _, maximumaddress.unwrap_or(core::mem::zeroed()) as _) } } #[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 { @@ -5501,7 +5477,7 @@ pub unsafe fn RtlIsStateSeparationEnabled() -> bool { #[inline] pub unsafe fn RtlIsUntrustedObject(handle: Option, object: Option<*const core::ffi::c_void>, untrustedobject: *mut bool) -> 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 bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlIsUntrustedObject(core::mem::transmute(handle.unwrap_or(core::mem::zeroed())), core::mem::transmute(object.unwrap_or(core::mem::zeroed())), core::mem::transmute(untrustedobject)) } + unsafe { RtlIsUntrustedObject(handle.unwrap_or(core::mem::zeroed()) as _, object.unwrap_or(core::mem::zeroed()) as _, untrustedobject as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -5524,35 +5500,35 @@ pub unsafe fn RtlLookupElementGenericTableAvl(table: *const RTL_AVL_TABLE, buffe #[inline] pub unsafe fn RtlLookupElementGenericTableFull(table: *const RTL_GENERIC_TABLE, buffer: *const core::ffi::c_void, nodeorparent: *mut *mut core::ffi::c_void, searchresult: *mut TABLE_SEARCH_RESULT) -> *mut core::ffi::c_void { windows_targets::link!("ntdll.dll" "system" fn RtlLookupElementGenericTableFull(table : *const RTL_GENERIC_TABLE, buffer : *const core::ffi::c_void, nodeorparent : *mut *mut core::ffi::c_void, searchresult : *mut TABLE_SEARCH_RESULT) -> *mut core::ffi::c_void); - unsafe { RtlLookupElementGenericTableFull(table, buffer, core::mem::transmute(nodeorparent), core::mem::transmute(searchresult)) } + unsafe { RtlLookupElementGenericTableFull(table, buffer, nodeorparent as _, searchresult as _) } } #[inline] pub unsafe fn RtlLookupElementGenericTableFullAvl(table: *const RTL_AVL_TABLE, buffer: *const core::ffi::c_void, nodeorparent: *mut *mut core::ffi::c_void, searchresult: *mut TABLE_SEARCH_RESULT) -> *mut core::ffi::c_void { windows_targets::link!("ntdll.dll" "system" fn RtlLookupElementGenericTableFullAvl(table : *const RTL_AVL_TABLE, buffer : *const core::ffi::c_void, nodeorparent : *mut *mut core::ffi::c_void, searchresult : *mut TABLE_SEARCH_RESULT) -> *mut core::ffi::c_void); - unsafe { RtlLookupElementGenericTableFullAvl(table, buffer, core::mem::transmute(nodeorparent), core::mem::transmute(searchresult)) } + unsafe { RtlLookupElementGenericTableFullAvl(table, buffer, nodeorparent as _, searchresult as _) } } #[cfg(feature = "Win32_System_Kernel")] #[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); - unsafe { RtlLookupEntryHashTable(hashtable, signature, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlLookupEntryHashTable(hashtable, signature, context.unwrap_or(core::mem::zeroed()) as _) } } #[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 { windows_targets::link!("ntdll.dll" "system" 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); - unsafe { RtlLookupFirstMatchingElementGenericTableAvl(table, buffer, core::mem::transmute(restartkey)) } + unsafe { RtlLookupFirstMatchingElementGenericTableAvl(table, buffer, restartkey as _) } } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn RtlMapGenericMask(accessmask: *mut u32, genericmapping: *const super::super::super::Win32::Security::GENERIC_MAPPING) { windows_targets::link!("ntdll.dll" "system" fn RtlMapGenericMask(accessmask : *mut u32, genericmapping : *const super::super::super::Win32::Security:: GENERIC_MAPPING)); - unsafe { RtlMapGenericMask(core::mem::transmute(accessmask), genericmapping) } + unsafe { RtlMapGenericMask(accessmask as _, genericmapping) } } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn RtlNormalizeSecurityDescriptor(securitydescriptor: *mut super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, securitydescriptorlength: u32, newsecuritydescriptor: Option<*mut super::super::super::Win32::Security::PSECURITY_DESCRIPTOR>, newsecuritydescriptorlength: Option<*mut u32>, checkonly: bool) -> bool { 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 : bool) -> bool); - unsafe { RtlNormalizeSecurityDescriptor(core::mem::transmute(securitydescriptor), securitydescriptorlength, core::mem::transmute(newsecuritydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(newsecuritydescriptorlength.unwrap_or(core::mem::zeroed())), checkonly) } + unsafe { RtlNormalizeSecurityDescriptor(securitydescriptor as _, securitydescriptorlength, newsecuritydescriptor.unwrap_or(core::mem::zeroed()) as _, newsecuritydescriptorlength.unwrap_or(core::mem::zeroed()) as _, checkonly) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -5603,7 +5579,7 @@ pub unsafe fn RtlPrefixUnicodeString(string1: *const super::super::super::Win32: #[inline] 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); - unsafe { RtlQueryRegistryValueWithFallback(core::mem::transmute(primaryhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(fallbackhandle.unwrap_or(core::mem::zeroed())), valuename, valuelength, core::mem::transmute(valuetype.unwrap_or(core::mem::zeroed())), core::mem::transmute(valuedata), core::mem::transmute(resultlength)) } + unsafe { RtlQueryRegistryValueWithFallback(primaryhandle.unwrap_or(core::mem::zeroed()) as _, fallbackhandle.unwrap_or(core::mem::zeroed()) as _, valuename, valuelength, valuetype.unwrap_or(core::mem::zeroed()) as _, valuedata as _, resultlength as _) } } #[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 @@ -5611,12 +5587,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); - unsafe { RtlQueryRegistryValues(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()))) } + unsafe { RtlQueryRegistryValues(relativeto, path.param().abi(), querytable as _, context.unwrap_or(core::mem::zeroed()) as _, environment.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { RtlQueryValidationRunlevel(core::mem::transmute(componentname.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlQueryValidationRunlevel(componentname.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -5634,25 +5610,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>) -> bool { 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) -> bool); - unsafe { RtlRemoveEntryHashTable(hashtable, entry, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlRemoveEntryHashTable(hashtable, entry, context.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { RtlRunOnceBeginInitialize(core::mem::transmute(runonce), flags, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlRunOnceBeginInitialize(runonce as _, flags, context.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { RtlRunOnceComplete(core::mem::transmute(runonce), flags, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlRunOnceComplete(runonce as _, flags, context.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { RtlRunOnceExecuteOnce(core::mem::transmute(runonce), initfn, core::mem::transmute(parameter.unwrap_or(core::mem::zeroed())), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlRunOnceExecuteOnce(runonce as _, initfn, parameter.unwrap_or(core::mem::zeroed()) as _, context.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Threading")] #[inline] @@ -5683,7 +5659,7 @@ pub unsafe fn RtlSetBits(bitmapheader: *const RTL_BITMAP, startingindex: u32, nu #[inline] pub unsafe fn RtlSetDaclSecurityDescriptor(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, daclpresent: bool, dacl: Option<*const super::super::super::Win32::Security::ACL>, dacldefaulted: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlSetDaclSecurityDescriptor(securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, daclpresent : bool, dacl : *const super::super::super::Win32::Security:: ACL, dacldefaulted : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlSetDaclSecurityDescriptor(core::mem::transmute(securitydescriptor), daclpresent, core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), dacldefaulted) } + unsafe { RtlSetDaclSecurityDescriptor(securitydescriptor as _, daclpresent, dacl.unwrap_or(core::mem::zeroed()) as _, dacldefaulted) } } #[cfg(feature = "Win32_System_SystemInformation")] #[inline] @@ -5695,18 +5671,18 @@ pub unsafe fn RtlSetSystemGlobalData(dataid: super::super::super::Win32::System: #[inline] pub unsafe fn RtlSplay(links: *mut super::super::Foundation::RTL_SPLAY_LINKS) -> *mut super::super::Foundation::RTL_SPLAY_LINKS { windows_targets::link!("ntdll.dll" "system" fn RtlSplay(links : *mut super::super::Foundation:: RTL_SPLAY_LINKS) -> *mut super::super::Foundation:: RTL_SPLAY_LINKS); - unsafe { RtlSplay(core::mem::transmute(links)) } + unsafe { RtlSplay(links as _) } } #[inline] pub unsafe fn RtlStringFromGUID(guid: *const windows_core::GUID, guidstring: *mut super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlStringFromGUID(guid : *const windows_core::GUID, guidstring : *mut super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlStringFromGUID(guid, core::mem::transmute(guidstring)) } + unsafe { RtlStringFromGUID(guid, guidstring as _) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn RtlStronglyEnumerateEntryHashTable(hashtable: *const RTL_DYNAMIC_HASH_TABLE, enumerator: *mut RTL_DYNAMIC_HASH_TABLE_ENUMERATOR) -> *mut RTL_DYNAMIC_HASH_TABLE_ENTRY { windows_targets::link!("ntdll.dll" "system" fn RtlStronglyEnumerateEntryHashTable(hashtable : *const RTL_DYNAMIC_HASH_TABLE, enumerator : *mut RTL_DYNAMIC_HASH_TABLE_ENUMERATOR) -> *mut RTL_DYNAMIC_HASH_TABLE_ENTRY); - unsafe { RtlStronglyEnumerateEntryHashTable(hashtable, core::mem::transmute(enumerator)) } + unsafe { RtlStronglyEnumerateEntryHashTable(hashtable, enumerator as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -5733,7 +5709,7 @@ pub unsafe fn RtlTestBit(bitmapheader: *const RTL_BITMAP, bitnumber: u32) -> boo #[inline] pub unsafe fn RtlTimeFieldsToTime(timefields: *const TIME_FIELDS, time: *mut i64) -> bool { windows_targets::link!("ntdll.dll" "system" fn RtlTimeFieldsToTime(timefields : *const TIME_FIELDS, time : *mut i64) -> bool); - unsafe { RtlTimeFieldsToTime(timefields, core::mem::transmute(time)) } + unsafe { RtlTimeFieldsToTime(timefields, time as _) } } #[inline] pub unsafe fn RtlTimeToTimeFields(time: *const i64) -> TIME_FIELDS { @@ -5748,33 +5724,33 @@ pub unsafe fn RtlTimeToTimeFields(time: *const i64) -> TIME_FIELDS { #[inline] pub unsafe fn RtlUTF8StringToUnicodeString(destinationstring: *mut super::super::super::Win32::Foundation::UNICODE_STRING, sourcestring: *const super::super::super::Win32::System::Kernel::STRING, allocatedestinationstring: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlUTF8StringToUnicodeString(destinationstring : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, sourcestring : *const super::super::super::Win32::System::Kernel:: STRING, allocatedestinationstring : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlUTF8StringToUnicodeString(core::mem::transmute(destinationstring), sourcestring, allocatedestinationstring) } + unsafe { RtlUTF8StringToUnicodeString(destinationstring as _, sourcestring, allocatedestinationstring) } } #[inline] pub unsafe fn RtlUTF8ToUnicodeN(unicodestringdestination: windows_core::PWSTR, unicodestringmaxbytecount: u32, unicodestringactualbytecount: *mut u32, utf8stringsource: &[u8]) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlUTF8ToUnicodeN(unicodestringdestination : windows_core::PWSTR, unicodestringmaxbytecount : u32, unicodestringactualbytecount : *mut u32, utf8stringsource : windows_core::PCSTR, utf8stringbytecount : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlUTF8ToUnicodeN(core::mem::transmute(unicodestringdestination), unicodestringmaxbytecount, core::mem::transmute(unicodestringactualbytecount), core::mem::transmute(utf8stringsource.as_ptr()), utf8stringsource.len().try_into().unwrap()) } + unsafe { RtlUTF8ToUnicodeN(core::mem::transmute(unicodestringdestination), unicodestringmaxbytecount, unicodestringactualbytecount as _, 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: 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); - unsafe { RtlUnicodeStringToInt64(string, core::mem::transmute(base.unwrap_or(core::mem::zeroed())), core::mem::transmute(number), core::mem::transmute(endpointer.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlUnicodeStringToInt64(string, base.unwrap_or(core::mem::zeroed()) as _, number as _, endpointer.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { RtlUnicodeStringToInteger(string, core::mem::transmute(base.unwrap_or(core::mem::zeroed())), core::mem::transmute(value)) } + unsafe { RtlUnicodeStringToInteger(string, base.unwrap_or(core::mem::zeroed()) as _, value as _) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn RtlUnicodeStringToUTF8String(destinationstring: *mut super::super::super::Win32::System::Kernel::STRING, sourcestring: *const super::super::super::Win32::Foundation::UNICODE_STRING, allocatedestinationstring: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlUnicodeStringToUTF8String(destinationstring : *mut super::super::super::Win32::System::Kernel:: STRING, sourcestring : *const super::super::super::Win32::Foundation:: UNICODE_STRING, allocatedestinationstring : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlUnicodeStringToUTF8String(core::mem::transmute(destinationstring), sourcestring, allocatedestinationstring) } + unsafe { RtlUnicodeStringToUTF8String(destinationstring as _, sourcestring, allocatedestinationstring) } } #[inline] pub unsafe fn RtlUnicodeToUTF8N(utf8stringdestination: &mut [u8], utf8stringactualbytecount: *mut u32, unicodestringsource: *const u16, unicodestringbytecount: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlUnicodeToUTF8N(utf8stringdestination : windows_core::PSTR, utf8stringmaxbytecount : u32, utf8stringactualbytecount : *mut u32, unicodestringsource : *const u16, unicodestringbytecount : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlUnicodeToUTF8N(core::mem::transmute(utf8stringdestination.as_ptr()), utf8stringdestination.len().try_into().unwrap(), core::mem::transmute(utf8stringactualbytecount), unicodestringsource, unicodestringbytecount) } + unsafe { RtlUnicodeToUTF8N(core::mem::transmute(utf8stringdestination.as_ptr()), utf8stringdestination.len().try_into().unwrap(), utf8stringactualbytecount as _, unicodestringsource, unicodestringbytecount) } } #[inline] pub unsafe fn RtlUpcaseUnicodeChar(sourcecharacter: u16) -> u16 { @@ -5784,7 +5760,7 @@ pub unsafe fn RtlUpcaseUnicodeChar(sourcecharacter: u16) -> u16 { #[inline] pub unsafe fn RtlUpcaseUnicodeString(destinationstring: *mut super::super::super::Win32::Foundation::UNICODE_STRING, sourcestring: *const super::super::super::Win32::Foundation::UNICODE_STRING, allocatedestinationstring: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlUpcaseUnicodeString(destinationstring : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, sourcestring : *const super::super::super::Win32::Foundation:: UNICODE_STRING, allocatedestinationstring : bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlUpcaseUnicodeString(core::mem::transmute(destinationstring), sourcestring, allocatedestinationstring) } + unsafe { RtlUpcaseUnicodeString(destinationstring as _, sourcestring, allocatedestinationstring) } } #[inline] pub unsafe fn RtlUpperChar(character: i8) -> i8 { @@ -5795,7 +5771,7 @@ pub unsafe fn RtlUpperChar(character: i8) -> i8 { #[inline] pub unsafe fn RtlUpperString(destinationstring: *mut super::super::super::Win32::System::Kernel::STRING, sourcestring: *const super::super::super::Win32::System::Kernel::STRING) { windows_targets::link!("ntdll.dll" "system" fn RtlUpperString(destinationstring : *mut super::super::super::Win32::System::Kernel:: STRING, sourcestring : *const super::super::super::Win32::System::Kernel:: STRING)); - unsafe { RtlUpperString(core::mem::transmute(destinationstring), sourcestring) } + unsafe { RtlUpperString(destinationstring as _, sourcestring) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -5818,18 +5794,18 @@ pub unsafe fn RtlVerifyVersionInfo(versioninfo: *const super::super::super::Win3 #[inline] pub unsafe fn RtlVolumeDeviceToDosName(volumedeviceobject: *const core::ffi::c_void, dosname: *mut super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn RtlVolumeDeviceToDosName(volumedeviceobject : *const core::ffi::c_void, dosname : *mut super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { RtlVolumeDeviceToDosName(volumedeviceobject, core::mem::transmute(dosname)) } + unsafe { RtlVolumeDeviceToDosName(volumedeviceobject, dosname as _) } } #[inline] pub unsafe fn RtlWalkFrameChain(callers: *mut *mut core::ffi::c_void, count: u32, flags: u32) -> u32 { windows_targets::link!("ntdll.dll" "system" fn RtlWalkFrameChain(callers : *mut *mut core::ffi::c_void, count : u32, flags : u32) -> u32); - unsafe { RtlWalkFrameChain(core::mem::transmute(callers), count, flags) } + unsafe { RtlWalkFrameChain(callers as _, count, flags) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn RtlWeaklyEnumerateEntryHashTable(hashtable: *const RTL_DYNAMIC_HASH_TABLE, enumerator: *mut RTL_DYNAMIC_HASH_TABLE_ENUMERATOR) -> *mut RTL_DYNAMIC_HASH_TABLE_ENTRY { windows_targets::link!("ntdll.dll" "system" fn RtlWeaklyEnumerateEntryHashTable(hashtable : *const RTL_DYNAMIC_HASH_TABLE, enumerator : *mut RTL_DYNAMIC_HASH_TABLE_ENUMERATOR) -> *mut RTL_DYNAMIC_HASH_TABLE_ENTRY); - unsafe { RtlWeaklyEnumerateEntryHashTable(hashtable, core::mem::transmute(enumerator)) } + unsafe { RtlWeaklyEnumerateEntryHashTable(hashtable, enumerator as _) } } #[inline] pub unsafe fn RtlWriteRegistryValue(relativeto: u32, path: P1, valuename: P2, valuetype: u32, valuedata: Option<*const core::ffi::c_void>, valuelength: u32) -> super::super::super::Win32::Foundation::NTSTATUS @@ -5838,7 +5814,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); - unsafe { RtlWriteRegistryValue(relativeto, path.param().abi(), valuename.param().abi(), valuetype, core::mem::transmute(valuedata.unwrap_or(core::mem::zeroed())), valuelength) } + unsafe { RtlWriteRegistryValue(relativeto, path.param().abi(), valuename.param().abi(), valuetype, valuedata.unwrap_or(core::mem::zeroed()) as _, valuelength) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -5855,19 +5831,19 @@ pub unsafe fn RtlxUnicodeStringToAnsiSize(unicodestring: *const super::super::su #[inline] pub unsafe fn SeAccessCheck(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, subjectsecuritycontext: *const super::super::Foundation::SECURITY_SUBJECT_CONTEXT, subjectcontextlocked: bool, 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) -> bool { 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 : bool, 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) -> bool); - unsafe { SeAccessCheck(securitydescriptor, subjectsecuritycontext, subjectcontextlocked, desiredaccess, previouslygrantedaccess, core::mem::transmute(privileges.unwrap_or(core::mem::zeroed())), genericmapping, accessmode, core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus)) } + unsafe { SeAccessCheck(securitydescriptor, subjectsecuritycontext, subjectcontextlocked, desiredaccess, previouslygrantedaccess, privileges.unwrap_or(core::mem::zeroed()) as _, genericmapping, accessmode, grantedaccess as _, accessstatus as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn SeAssignSecurity(parentdescriptor: Option, explicitdescriptor: Option, newdescriptor: *mut super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, isdirectoryobject: bool, 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 { 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 : bool, 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); - unsafe { SeAssignSecurity(core::mem::transmute(parentdescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(explicitdescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(newdescriptor), isdirectoryobject, subjectcontext, genericmapping, pooltype) } + unsafe { SeAssignSecurity(parentdescriptor.unwrap_or(core::mem::zeroed()) as _, explicitdescriptor.unwrap_or(core::mem::zeroed()) as _, newdescriptor as _, isdirectoryobject, subjectcontext, genericmapping, pooltype) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn SeAssignSecurityEx(parentdescriptor: Option, explicitdescriptor: Option, newdescriptor: *mut super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, objecttype: Option<*const windows_core::GUID>, isdirectoryobject: bool, 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 { 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 : bool, 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); - unsafe { 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, autoinheritflags, subjectcontext, genericmapping, pooltype) } + unsafe { SeAssignSecurityEx(parentdescriptor.unwrap_or(core::mem::zeroed()) as _, explicitdescriptor.unwrap_or(core::mem::zeroed()) as _, newdescriptor as _, objecttype.unwrap_or(core::mem::zeroed()) as _, isdirectoryobject, autoinheritflags, subjectcontext, genericmapping, pooltype) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -5883,18 +5859,18 @@ pub unsafe fn SeCaptureSubjectContext() -> super::super::Foundation::SECURITY_SU #[inline] 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); - unsafe { SeComputeAutoInheritByObjectType(objecttype, core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(parentsecuritydescriptor.unwrap_or(core::mem::zeroed()))) } + unsafe { SeComputeAutoInheritByObjectType(objecttype, securitydescriptor.unwrap_or(core::mem::zeroed()) as _, parentsecuritydescriptor.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn SeDeassignSecurity(securitydescriptor: *mut super::super::super::Win32::Security::PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn SeDeassignSecurity(securitydescriptor : *mut super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { SeDeassignSecurity(core::mem::transmute(securitydescriptor)) } + unsafe { SeDeassignSecurity(securitydescriptor as _) } } #[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); - unsafe { SeEtwWriteKMCveEvent(cveid, core::mem::transmute(additionaldetails.unwrap_or(core::mem::zeroed()))) } + unsafe { SeEtwWriteKMCveEvent(cveid, additionaldetails.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -5905,25 +5881,25 @@ 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); - unsafe { SeRegisterImageVerificationCallback(imagetype, callbacktype, callbackfunction, core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(token.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackhandle)) } + unsafe { SeRegisterImageVerificationCallback(imagetype, callbacktype, callbackfunction, callbackcontext.unwrap_or(core::mem::zeroed()) as _, token.unwrap_or(core::mem::zeroed()) as _, callbackhandle as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn SeReleaseSubjectContext(subjectcontext: *mut super::super::Foundation::SECURITY_SUBJECT_CONTEXT) { windows_targets::link!("ntoskrnl.exe" "system" fn SeReleaseSubjectContext(subjectcontext : *mut super::super::Foundation:: SECURITY_SUBJECT_CONTEXT)); - unsafe { SeReleaseSubjectContext(core::mem::transmute(subjectcontext)) } + unsafe { SeReleaseSubjectContext(subjectcontext as _) } } #[cfg(feature = "Win32_Security_Authentication_Identity")] #[inline] 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); - unsafe { SeReportSecurityEvent(flags, sourcename, core::mem::transmute(usersid.unwrap_or(core::mem::zeroed())), auditparameters) } + unsafe { SeReportSecurityEvent(flags, sourcename, usersid.unwrap_or(core::mem::zeroed()) as _, auditparameters) } } #[cfg(feature = "Win32_Security_Authentication_Identity")] #[inline] pub unsafe fn SeSetAuditParameter(auditparameters: *mut super::super::super::Win32::Security::Authentication::Identity::SE_ADT_PARAMETER_ARRAY, r#type: super::super::super::Win32::Security::Authentication::Identity::SE_ADT_PARAMETER_TYPE, index: u32, data: *const core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn SeSetAuditParameter(auditparameters : *mut super::super::super::Win32::Security::Authentication::Identity:: SE_ADT_PARAMETER_ARRAY, r#type : super::super::super::Win32::Security::Authentication::Identity:: SE_ADT_PARAMETER_TYPE, index : u32, data : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { SeSetAuditParameter(core::mem::transmute(auditparameters), r#type, index, data) } + unsafe { SeSetAuditParameter(auditparameters as _, r#type, index, data) } } #[inline] pub unsafe fn SeSinglePrivilegeCheck(privilegevalue: super::super::super::Win32::Foundation::LUID, previousmode: i8) -> bool { @@ -5951,7 +5927,7 @@ pub unsafe fn SeValidSecurityDescriptor(length: u32, securitydescriptor: super:: #[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); - unsafe { TmCommitComplete(enlistment, core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } + unsafe { TmCommitComplete(enlistment, tmvirtualclock.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -5969,19 +5945,19 @@ pub unsafe fn TmCommitTransaction(transaction: *const super::super::Foundation:: #[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: 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); - unsafe { TmCreateEnlistment(core::mem::transmute(enlistmenthandle), previousmode, desiredaccess, objectattributes, resourcemanager, transaction, core::mem::transmute(createoptions.unwrap_or(core::mem::zeroed())), notificationmask, core::mem::transmute(enlistmentkey.unwrap_or(core::mem::zeroed()))) } + unsafe { TmCreateEnlistment(enlistmenthandle as _, previousmode, desiredaccess, objectattributes, resourcemanager, transaction, createoptions.unwrap_or(core::mem::zeroed()) as _, notificationmask, enlistmentkey.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn TmDereferenceEnlistmentKey(enlistment: *const super::super::Foundation::KENLISTMENT, lastreference: Option<*mut bool>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn TmDereferenceEnlistmentKey(enlistment : *const super::super::Foundation:: KENLISTMENT, lastreference : *mut bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { TmDereferenceEnlistmentKey(enlistment, core::mem::transmute(lastreference.unwrap_or(core::mem::zeroed()))) } + unsafe { TmDereferenceEnlistmentKey(enlistment, lastreference.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { TmEnableCallbacks(resourcemanager, callbackroutine, core::mem::transmute(rmkey.unwrap_or(core::mem::zeroed()))) } + unsafe { TmEnableCallbacks(resourcemanager, callbackroutine, rmkey.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -5996,7 +5972,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); - unsafe { TmInitializeTransactionManager(transactionmanager, core::mem::transmute(logfilename.unwrap_or(core::mem::zeroed())), core::mem::transmute(tmid.unwrap_or(core::mem::zeroed())), createoptions) } + unsafe { TmInitializeTransactionManager(transactionmanager, logfilename.unwrap_or(core::mem::zeroed()) as _, tmid.unwrap_or(core::mem::zeroed()) as _, createoptions) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -6020,7 +5996,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); - unsafe { TmPrepareComplete(enlistment, core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } + unsafe { TmPrepareComplete(enlistment, tmvirtualclock.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -6044,7 +6020,7 @@ pub unsafe fn TmPropagationFailed(resourcemanager: *const super::super::Foundati #[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); - unsafe { TmReadOnlyEnlistment(enlistment, core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } + unsafe { TmReadOnlyEnlistment(enlistment, tmvirtualclock.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -6068,7 +6044,7 @@ pub unsafe fn TmRecoverTransactionManager(tm: *const super::super::Foundation::K #[inline] pub unsafe fn TmReferenceEnlistmentKey(enlistment: *const super::super::Foundation::KENLISTMENT, key: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn TmReferenceEnlistmentKey(enlistment : *const super::super::Foundation:: KENLISTMENT, key : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { TmReferenceEnlistmentKey(enlistment, core::mem::transmute(key)) } + unsafe { TmReferenceEnlistmentKey(enlistment, key as _) } } #[inline] pub unsafe fn TmRenameTransactionManager(logfilename: *const super::super::super::Win32::Foundation::UNICODE_STRING, existingtransactionmanagerguid: *const windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -6085,13 +6061,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); - unsafe { TmRollbackComplete(enlistment, core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } + unsafe { TmRollbackComplete(enlistment, tmvirtualclock.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { TmRollbackEnlistment(enlistment, core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } + unsafe { TmRollbackEnlistment(enlistment, tmvirtualclock.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -6109,7 +6085,7 @@ pub unsafe fn TmSinglePhaseReject(enlistment: *const super::super::Foundation::K #[inline] 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); - unsafe { VslCreateSecureSection(core::mem::transmute(handle), targetprocess, mdl, devicepageprotection, attributes) } + unsafe { VslCreateSecureSection(handle as _, targetprocess, mdl, devicepageprotection, attributes) } } #[inline] pub unsafe fn VslDeleteSecureSection(globalhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -6120,25 +6096,25 @@ pub unsafe fn VslDeleteSecureSection(globalhandle: super::super::super::Win32::F #[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); - unsafe { WheaAddErrorSource(errorsource, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } + unsafe { WheaAddErrorSource(errorsource, context.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { WheaAddErrorSourceDeviceDriver(core::mem::transmute(context.unwrap_or(core::mem::zeroed())), configuration, numberpreallocatederrorreports) } + unsafe { WheaAddErrorSourceDeviceDriver(context.unwrap_or(core::mem::zeroed()) as _, configuration, numberpreallocatederrorreports) } } #[cfg(feature = "Win32_System_Diagnostics_Debug")] #[inline] pub unsafe fn WheaAddErrorSourceDeviceDriverV1(context: Option<*mut core::ffi::c_void>, configuration: *const super::super::super::Win32::System::Diagnostics::Debug::WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER, numbufferstopreallocate: u32, maxdatalength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn WheaAddErrorSourceDeviceDriverV1(context : *mut core::ffi::c_void, configuration : *const super::super::super::Win32::System::Diagnostics::Debug:: WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER, numbufferstopreallocate : u32, maxdatalength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { WheaAddErrorSourceDeviceDriverV1(core::mem::transmute(context.unwrap_or(core::mem::zeroed())), configuration, numbufferstopreallocate, maxdatalength) } + unsafe { WheaAddErrorSourceDeviceDriverV1(context.unwrap_or(core::mem::zeroed()) as _, configuration, numbufferstopreallocate, maxdatalength) } } #[cfg(feature = "Win32_System_Diagnostics_Debug")] #[inline] pub unsafe fn WheaAddHwErrorReportSectionDeviceDriver(errorhandle: *const core::ffi::c_void, sectiondatalength: u32, bufferset: *mut super::super::super::Win32::System::Diagnostics::Debug::WHEA_DRIVER_BUFFER_SET) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn WheaAddHwErrorReportSectionDeviceDriver(errorhandle : *const core::ffi::c_void, sectiondatalength : u32, bufferset : *mut super::super::super::Win32::System::Diagnostics::Debug:: WHEA_DRIVER_BUFFER_SET) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { WheaAddHwErrorReportSectionDeviceDriver(errorhandle, sectiondatalength, core::mem::transmute(bufferset)) } + unsafe { WheaAddHwErrorReportSectionDeviceDriver(errorhandle, sectiondatalength, bufferset as _) } } #[cfg(feature = "Win32_System_Diagnostics_Debug")] #[inline] @@ -6198,7 +6174,7 @@ pub unsafe fn WheaHwErrorReportSubmitDeviceDriver(errorhandle: *const core::ffi: #[inline] pub unsafe fn WheaInitializeRecordHeader(header: *mut WHEA_ERROR_RECORD_HEADER) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn WheaInitializeRecordHeader(header : *mut WHEA_ERROR_RECORD_HEADER) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { WheaInitializeRecordHeader(core::mem::transmute(header)) } + unsafe { WheaInitializeRecordHeader(header as _) } } #[inline] pub unsafe fn WheaIsCriticalState() -> bool { @@ -6213,7 +6189,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); - unsafe { WheaRegisterInUsePageOfflineNotification(callback, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } + unsafe { WheaRegisterInUsePageOfflineNotification(callback, context.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn WheaRemoveErrorSource(errorsourceid: u32) { @@ -6229,7 +6205,7 @@ pub unsafe fn WheaRemoveErrorSourceDeviceDriver(errorsourceid: u32) -> super::su #[inline] pub unsafe fn WheaReportHwError(errorpacket: *mut WHEA_ERROR_PACKET_V2) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn WheaReportHwError(errorpacket : *mut WHEA_ERROR_PACKET_V2) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { WheaReportHwError(core::mem::transmute(errorpacket)) } + unsafe { WheaReportHwError(errorpacket as _) } } #[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] @@ -6254,12 +6230,12 @@ 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); - unsafe { WmiQueryTraceInformation(traceinformationclass, core::mem::transmute(traceinformation), traceinformationlength, core::mem::transmute(requiredlength.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } + unsafe { WmiQueryTraceInformation(traceinformationclass, traceinformation as _, traceinformationlength, requiredlength.unwrap_or(core::mem::zeroed()) as _, buffer.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ZwAllocateLocallyUniqueId(luid: *mut super::super::super::Win32::Foundation::LUID) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwAllocateLocallyUniqueId(luid : *mut super::super::super::Win32::Foundation:: LUID) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwAllocateLocallyUniqueId(core::mem::transmute(luid)) } + unsafe { ZwAllocateLocallyUniqueId(luid as _) } } #[inline] pub unsafe fn ZwClose(handle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -6269,12 +6245,12 @@ pub unsafe fn ZwClose(handle: super::super::super::Win32::Foundation::HANDLE) -> #[inline] 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); - unsafe { ZwCommitComplete(enlistmenthandle, core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwCommitComplete(enlistmenthandle, tmvirtualclock.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { ZwCommitEnlistment(enlistmenthandle, core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwCommitEnlistment(enlistmenthandle, tmvirtualclock.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ZwCommitTransaction(transactionhandle: super::super::super::Win32::Foundation::HANDLE, wait: bool) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -6285,56 +6261,43 @@ pub unsafe fn ZwCommitTransaction(transactionhandle: super::super::super::Win32: #[inline] 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); - unsafe { ZwCreateEnlistment(core::mem::transmute(enlistmenthandle), desiredaccess, resourcemanagerhandle, transactionhandle, core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(createoptions.unwrap_or(core::mem::zeroed())), notificationmask, core::mem::transmute(enlistmentkey.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwCreateEnlistment(enlistmenthandle as _, desiredaccess, resourcemanagerhandle, transactionhandle, objectattributes.unwrap_or(core::mem::zeroed()) as _, createoptions.unwrap_or(core::mem::zeroed()) as _, notificationmask, enlistmentkey.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { ZwCreateFile(core::mem::transmute(filehandle), desiredaccess, objectattributes, core::mem::transmute(iostatusblock), core::mem::transmute(allocationsize.unwrap_or(core::mem::zeroed())), fileattributes, shareaccess, createdisposition, createoptions, core::mem::transmute(eabuffer.unwrap_or(core::mem::zeroed())), ealength) } + unsafe { ZwCreateFile(filehandle as _, desiredaccess, objectattributes, iostatusblock as _, allocationsize.unwrap_or(core::mem::zeroed()) as _, fileattributes, shareaccess, createdisposition, createoptions, eabuffer.unwrap_or(core::mem::zeroed()) as _, 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: 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); - unsafe { ZwCreateResourceManager(core::mem::transmute(resourcemanagerhandle), desiredaccess, 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()))) } + unsafe { ZwCreateResourceManager(resourcemanagerhandle as _, desiredaccess, tmhandle, resourcemanagerguid.unwrap_or(core::mem::zeroed()) as _, objectattributes.unwrap_or(core::mem::zeroed()) as _, createoptions.unwrap_or(core::mem::zeroed()) as _, description.unwrap_or(core::mem::zeroed()) as _) } } #[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: 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); - unsafe { ZwCreateSection(core::mem::transmute(sectionhandle), desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(maximumsize.unwrap_or(core::mem::zeroed())), sectionpageprotection, allocationattributes, core::mem::transmute(filehandle.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwCreateSection(sectionhandle as _, desiredaccess, objectattributes.unwrap_or(core::mem::zeroed()) as _, maximumsize.unwrap_or(core::mem::zeroed()) as _, sectionpageprotection, allocationattributes, filehandle.unwrap_or(core::mem::zeroed()) as _) } } #[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: 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); - unsafe { - ZwCreateTransaction( - core::mem::transmute(transactionhandle), - 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())), - ) - } + unsafe { ZwCreateTransaction(transactionhandle as _, desiredaccess, objectattributes.unwrap_or(core::mem::zeroed()) as _, uow.unwrap_or(core::mem::zeroed()) as _, tmhandle.unwrap_or(core::mem::zeroed()) as _, createoptions.unwrap_or(core::mem::zeroed()) as _, isolationlevel.unwrap_or(core::mem::zeroed()) as _, isolationflags.unwrap_or(core::mem::zeroed()) as _, timeout.unwrap_or(core::mem::zeroed()) as _, description.unwrap_or(core::mem::zeroed()) as _) } } #[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: 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); - unsafe { ZwCreateTransactionManager(core::mem::transmute(tmhandle), 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()))) } + unsafe { ZwCreateTransactionManager(tmhandle as _, desiredaccess, objectattributes.unwrap_or(core::mem::zeroed()) as _, logfilename.unwrap_or(core::mem::zeroed()) as _, createoptions.unwrap_or(core::mem::zeroed()) as _, commitstrength.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { ZwDeviceIoControlFile(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), iocontrolcode, core::mem::transmute(inputbuffer.unwrap_or(core::mem::zeroed())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(core::mem::zeroed())), outputbufferlength) } + unsafe { ZwDeviceIoControlFile(filehandle, event.unwrap_or(core::mem::zeroed()) as _, apcroutine.unwrap_or(core::mem::zeroed()) as _, apccontext.unwrap_or(core::mem::zeroed()) as _, iostatusblock as _, iocontrolcode, inputbuffer.unwrap_or(core::mem::zeroed()) as _, inputbufferlength, outputbuffer.unwrap_or(core::mem::zeroed()) as _, outputbufferlength) } } #[inline] pub unsafe fn ZwDisplayString(string: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -6345,13 +6308,13 @@ pub unsafe fn ZwDisplayString(string: *const super::super::super::Win32::Foundat #[inline] 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); - unsafe { ZwEnumerateTransactionObject(core::mem::transmute(rootobjecthandle.unwrap_or(core::mem::zeroed())), querytype, core::mem::transmute(objectcursor), objectcursorlength, core::mem::transmute(returnlength)) } + unsafe { ZwEnumerateTransactionObject(rootobjecthandle.unwrap_or(core::mem::zeroed()) as _, querytype, objectcursor as _, objectcursorlength, returnlength as _) } } #[cfg(feature = "Win32_Storage_FileSystem")] #[inline] 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); - unsafe { ZwGetNotificationResourceManager(resourcemanagerhandle, core::mem::transmute(transactionnotification), notificationlength, timeout, core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed())), asynchronous, core::mem::transmute(asynchronouscontext.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwGetNotificationResourceManager(resourcemanagerhandle, transactionnotification as _, notificationlength, timeout, returnlength.unwrap_or(core::mem::zeroed()) as _, asynchronous, asynchronouscontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ZwLoadDriver(driverservicename: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -6366,69 +6329,69 @@ pub unsafe fn ZwMakeTemporaryObject(handle: super::super::super::Win32::Foundati #[inline] 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); - unsafe { ZwManagePartition(targethandle, core::mem::transmute(sourcehandle.unwrap_or(core::mem::zeroed())), partitioninformationclass, core::mem::transmute(partitioninformation), partitioninformationlength) } + unsafe { ZwManagePartition(targethandle, sourcehandle.unwrap_or(core::mem::zeroed()) as _, partitioninformationclass, partitioninformation as _, 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: 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); - unsafe { ZwOpenEnlistment(core::mem::transmute(enlistmenthandle), desiredaccess, rmhandle, enlistmentguid, core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwOpenEnlistment(enlistmenthandle as _, desiredaccess, rmhandle, enlistmentguid, objectattributes.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", feature = "Win32_System_IO"))] #[inline] pub unsafe fn ZwOpenFile(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, shareaccess: u32, openoptions: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwOpenFile(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, shareaccess : u32, openoptions : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwOpenFile(core::mem::transmute(filehandle), desiredaccess, objectattributes, core::mem::transmute(iostatusblock), shareaccess, openoptions) } + unsafe { ZwOpenFile(filehandle as _, desiredaccess, objectattributes, iostatusblock as _, shareaccess, openoptions) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] 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); - unsafe { ZwOpenResourceManager(core::mem::transmute(resourcemanagerhandle), desiredaccess, tmhandle, resourcemanagerguid, core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwOpenResourceManager(resourcemanagerhandle as _, desiredaccess, tmhandle, resourcemanagerguid, objectattributes.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn ZwOpenSymbolicLinkObject(linkhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwOpenSymbolicLinkObject(linkhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwOpenSymbolicLinkObject(core::mem::transmute(linkhandle), desiredaccess, objectattributes) } + unsafe { ZwOpenSymbolicLinkObject(linkhandle as _, desiredaccess, objectattributes) } } #[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: 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); - unsafe { ZwOpenTransaction(core::mem::transmute(transactionhandle), desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), uow, core::mem::transmute(tmhandle.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwOpenTransaction(transactionhandle as _, desiredaccess, objectattributes.unwrap_or(core::mem::zeroed()) as _, uow, tmhandle.unwrap_or(core::mem::zeroed()) as _) } } #[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: 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); - unsafe { ZwOpenTransactionManager(core::mem::transmute(tmhandle), 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()))) } + unsafe { ZwOpenTransactionManager(tmhandle as _, desiredaccess, objectattributes.unwrap_or(core::mem::zeroed()) as _, logfilename.unwrap_or(core::mem::zeroed()) as _, tmidentity.unwrap_or(core::mem::zeroed()) as _, openoptions.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { ZwPowerInformation(informationlevel, core::mem::transmute(inputbuffer.unwrap_or(core::mem::zeroed())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(core::mem::zeroed())), outputbufferlength) } + unsafe { ZwPowerInformation(informationlevel, inputbuffer.unwrap_or(core::mem::zeroed()) as _, inputbufferlength, outputbuffer.unwrap_or(core::mem::zeroed()) as _, outputbufferlength) } } #[inline] 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); - unsafe { ZwPrePrepareComplete(enlistmenthandle, core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwPrePrepareComplete(enlistmenthandle, tmvirtualclock.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { ZwPrePrepareEnlistment(enlistmenthandle, core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwPrePrepareEnlistment(enlistmenthandle, tmvirtualclock.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { ZwPrepareComplete(enlistmenthandle, core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwPrepareComplete(enlistmenthandle, tmvirtualclock.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { ZwPrepareEnlistment(enlistmenthandle, core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwPrepareEnlistment(enlistmenthandle, tmvirtualclock.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 { @@ -6444,58 +6407,58 @@ pub unsafe fn ZwPropagationFailed(resourcemanagerhandle: super::super::super::Wi #[inline] pub unsafe fn ZwQueryInformationByName(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) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwQueryInformationByName(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) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwQueryInformationByName(objectattributes, core::mem::transmute(iostatusblock), core::mem::transmute(fileinformation), length, fileinformationclass) } + unsafe { ZwQueryInformationByName(objectattributes, iostatusblock as _, fileinformation as _, length, fileinformationclass) } } #[cfg(feature = "Win32_System_SystemServices")] #[inline] 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); - unsafe { ZwQueryInformationEnlistment(enlistmenthandle, enlistmentinformationclass, core::mem::transmute(enlistmentinformation), enlistmentinformationlength, core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwQueryInformationEnlistment(enlistmenthandle, enlistmentinformationclass, enlistmentinformation as _, enlistmentinformationlength, returnlength.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Storage_FileSystem", feature = "Win32_System_IO"))] #[inline] 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); - unsafe { ZwQueryInformationFile(filehandle, core::mem::transmute(iostatusblock), core::mem::transmute(fileinformation), length, fileinformationclass) } + unsafe { ZwQueryInformationFile(filehandle, iostatusblock as _, fileinformation as _, length, fileinformationclass) } } #[cfg(feature = "Win32_System_SystemServices")] #[inline] 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); - unsafe { ZwQueryInformationResourceManager(resourcemanagerhandle, resourcemanagerinformationclass, core::mem::transmute(resourcemanagerinformation), resourcemanagerinformationlength, core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwQueryInformationResourceManager(resourcemanagerhandle, resourcemanagerinformationclass, resourcemanagerinformation as _, resourcemanagerinformationlength, returnlength.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_SystemServices")] #[inline] 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); - unsafe { ZwQueryInformationTransaction(transactionhandle, transactioninformationclass, core::mem::transmute(transactioninformation), transactioninformationlength, core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwQueryInformationTransaction(transactionhandle, transactioninformationclass, transactioninformation as _, transactioninformationlength, returnlength.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_SystemServices")] #[inline] 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); - unsafe { ZwQueryInformationTransactionManager(transactionmanagerhandle, transactionmanagerinformationclass, core::mem::transmute(transactionmanagerinformation), transactionmanagerinformationlength, core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwQueryInformationTransactionManager(transactionmanagerhandle, transactionmanagerinformationclass, transactionmanagerinformation as _, transactionmanagerinformationlength, returnlength.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { ZwQuerySymbolicLinkObject(linkhandle, core::mem::transmute(linktarget), core::mem::transmute(returnedlength.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwQuerySymbolicLinkObject(linkhandle, linktarget as _, returnedlength.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { ZwReadFile(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), length, core::mem::transmute(byteoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(key.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwReadFile(filehandle, event.unwrap_or(core::mem::zeroed()) as _, apcroutine.unwrap_or(core::mem::zeroed()) as _, apccontext.unwrap_or(core::mem::zeroed()) as _, iostatusblock as _, buffer as _, length, byteoffset.unwrap_or(core::mem::zeroed()) as _, key.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { ZwReadOnlyEnlistment(enlistmenthandle, core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwReadOnlyEnlistment(enlistmenthandle, tmvirtualclock.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { ZwRecoverEnlistment(enlistmenthandle, core::mem::transmute(enlistmentkey.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwRecoverEnlistment(enlistmenthandle, enlistmentkey.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ZwRecoverResourceManager(resourcemanagerhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -6510,7 +6473,7 @@ pub unsafe fn ZwRecoverTransactionManager(transactionmanagerhandle: super::super #[inline] 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); - unsafe { ZwRegisterProtocolAddressInformation(resourcemanager, protocolid, protocolinformationsize, protocolinformation, core::mem::transmute(createoptions.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwRegisterProtocolAddressInformation(resourcemanager, protocolid, protocolinformationsize, protocolinformation, createoptions.unwrap_or(core::mem::zeroed()) as _) } } #[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 { @@ -6520,12 +6483,12 @@ pub unsafe fn ZwRenameTransactionManager(logfilename: *const super::super::super #[inline] 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); - unsafe { ZwRollbackComplete(enlistmenthandle, core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwRollbackComplete(enlistmenthandle, tmvirtualclock.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { ZwRollbackEnlistment(enlistmenthandle, core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwRollbackEnlistment(enlistmenthandle, tmvirtualclock.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ZwRollbackTransaction(transactionhandle: super::super::super::Win32::Foundation::HANDLE, wait: bool) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -6535,7 +6498,7 @@ pub unsafe fn ZwRollbackTransaction(transactionhandle: super::super::super::Win3 #[inline] 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); - unsafe { ZwRollforwardTransactionManager(transactionmanagerhandle, core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwRollforwardTransactionManager(transactionmanagerhandle, tmvirtualclock.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_SystemServices")] #[inline] @@ -6547,7 +6510,7 @@ pub unsafe fn ZwSetInformationEnlistment(enlistmenthandle: super::super::super:: #[inline] 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); - unsafe { ZwSetInformationFile(filehandle, core::mem::transmute(iostatusblock), fileinformation, length, fileinformationclass) } + unsafe { ZwSetInformationFile(filehandle, iostatusblock as _, fileinformation, length, fileinformationclass) } } #[cfg(feature = "Win32_System_SystemServices")] #[inline] @@ -6570,7 +6533,7 @@ pub unsafe fn ZwSetInformationTransactionManager(tmhandle: super::super::super:: #[inline] 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); - unsafe { ZwSinglePhaseReject(enlistmenthandle, core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwSinglePhaseReject(enlistmenthandle, tmvirtualclock.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ZwUnloadDriver(driverservicename: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -6581,7 +6544,7 @@ pub unsafe fn ZwUnloadDriver(driverservicename: *const super::super::super::Win3 #[inline] 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); - unsafe { ZwWriteFile(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), buffer, length, core::mem::transmute(byteoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(key.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwWriteFile(filehandle, event.unwrap_or(core::mem::zeroed()) as _, apcroutine.unwrap_or(core::mem::zeroed()) as _, apccontext.unwrap_or(core::mem::zeroed()) as _, iostatusblock as _, buffer, length, byteoffset.unwrap_or(core::mem::zeroed()) as _, key.unwrap_or(core::mem::zeroed()) as _) } } #[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 25058d9772..2b554db887 100644 --- a/crates/libs/windows/src/Windows/Wdk/System/Threading/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/System/Threading/mod.rs @@ -1,41 +1,41 @@ #[inline] pub unsafe fn NtCancelTimer(timerhandle: super::super::super::Win32::Foundation::HANDLE, currentstate: Option<*mut bool>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtCancelTimer(timerhandle : super::super::super::Win32::Foundation:: HANDLE, currentstate : *mut bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtCancelTimer(timerhandle, core::mem::transmute(currentstate.unwrap_or(core::mem::zeroed()))) } + unsafe { NtCancelTimer(timerhandle, currentstate.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { NtCreateTimer(core::mem::transmute(timerhandle), desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), timertype) } + unsafe { NtCreateTimer(timerhandle as _, desiredaccess, objectattributes.unwrap_or(core::mem::zeroed()) as _, timertype) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn NtOpenEvent(eventhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtOpenEvent(eventhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtOpenEvent(core::mem::transmute(eventhandle), desiredaccess, objectattributes) } + unsafe { NtOpenEvent(eventhandle as _, desiredaccess, objectattributes) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", feature = "Win32_System_WindowsProgramming"))] #[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); - unsafe { NtOpenProcess(core::mem::transmute(processhandle), desiredaccess, objectattributes, core::mem::transmute(clientid.unwrap_or(core::mem::zeroed()))) } + unsafe { NtOpenProcess(processhandle as _, desiredaccess, objectattributes, clientid.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn NtOpenTimer(timerhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtOpenTimer(timerhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtOpenTimer(core::mem::transmute(timerhandle), desiredaccess, objectattributes) } + unsafe { NtOpenTimer(timerhandle as _, desiredaccess, objectattributes) } } #[inline] 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); - unsafe { NtQueryInformationProcess(processhandle, processinformationclass, core::mem::transmute(processinformation), processinformationlength, core::mem::transmute(returnlength)) } + unsafe { NtQueryInformationProcess(processhandle, processinformationclass, processinformation as _, processinformationlength, returnlength as _) } } #[inline] 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); - unsafe { NtQueryInformationThread(threadhandle, threadinformationclass, core::mem::transmute(threadinformation), threadinformationlength, core::mem::transmute(returnlength)) } + unsafe { NtQueryInformationThread(threadhandle, threadinformationclass, threadinformation as _, threadinformationlength, returnlength as _) } } #[inline] 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 { @@ -46,61 +46,61 @@ pub unsafe fn NtSetInformationThread(threadhandle: super::super::super::Win32::F #[inline] pub unsafe fn NtSetTimer(timerhandle: super::super::super::Win32::Foundation::HANDLE, duetime: *const i64, timerapcroutine: Option, timercontext: Option<*const core::ffi::c_void>, resumetimer: bool, period: Option, previousstate: Option<*mut bool>) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, period : i32, previousstate : *mut bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtSetTimer(timerhandle, duetime, core::mem::transmute(timerapcroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(timercontext.unwrap_or(core::mem::zeroed())), resumetimer, core::mem::transmute(period.unwrap_or(core::mem::zeroed())), core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed()))) } + unsafe { NtSetTimer(timerhandle, duetime, timerapcroutine.unwrap_or(core::mem::zeroed()) as _, timercontext.unwrap_or(core::mem::zeroed()) as _, resumetimer, period.unwrap_or(core::mem::zeroed()) as _, previousstate.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { NtSetTimerEx(timerhandle, timersetinformationclass, core::mem::transmute(timersetinformation.unwrap_or(core::mem::zeroed())), timersetinformationlength) } + unsafe { NtSetTimerEx(timerhandle, timersetinformationclass, timersetinformation.unwrap_or(core::mem::zeroed()) as _, timersetinformationlength) } } #[inline] 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); - unsafe { NtTerminateProcess(core::mem::transmute(processhandle.unwrap_or(core::mem::zeroed())), exitstatus) } + unsafe { NtTerminateProcess(processhandle.unwrap_or(core::mem::zeroed()) as _, exitstatus) } } #[inline] pub unsafe fn NtWaitForSingleObject(handle: super::super::super::Win32::Foundation::HANDLE, alertable: bool, timeout: *mut i64) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtWaitForSingleObject(handle : super::super::super::Win32::Foundation:: HANDLE, alertable : bool, timeout : *mut i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { NtWaitForSingleObject(handle, alertable, core::mem::transmute(timeout)) } + unsafe { NtWaitForSingleObject(handle, alertable, timeout as _) } } #[inline] pub unsafe fn ZwCancelTimer(timerhandle: super::super::super::Win32::Foundation::HANDLE, currentstate: Option<*mut bool>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwCancelTimer(timerhandle : super::super::super::Win32::Foundation:: HANDLE, currentstate : *mut bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwCancelTimer(timerhandle, core::mem::transmute(currentstate.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwCancelTimer(timerhandle, currentstate.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { ZwCreateTimer(core::mem::transmute(timerhandle), desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), timertype) } + unsafe { ZwCreateTimer(timerhandle as _, desiredaccess, objectattributes.unwrap_or(core::mem::zeroed()) as _, timertype) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn ZwOpenEvent(eventhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwOpenEvent(eventhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwOpenEvent(core::mem::transmute(eventhandle), desiredaccess, objectattributes) } + unsafe { ZwOpenEvent(eventhandle as _, desiredaccess, objectattributes) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", feature = "Win32_System_WindowsProgramming"))] #[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); - unsafe { ZwOpenProcess(core::mem::transmute(processhandle), desiredaccess, objectattributes, core::mem::transmute(clientid.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwOpenProcess(processhandle as _, desiredaccess, objectattributes, clientid.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn ZwOpenTimer(timerhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwOpenTimer(timerhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwOpenTimer(core::mem::transmute(timerhandle), desiredaccess, objectattributes) } + unsafe { ZwOpenTimer(timerhandle as _, desiredaccess, objectattributes) } } #[inline] 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); - unsafe { ZwQueryInformationProcess(processhandle, processinformationclass, core::mem::transmute(processinformation), processinformationlength, core::mem::transmute(returnlength)) } + unsafe { ZwQueryInformationProcess(processhandle, processinformationclass, processinformation as _, processinformationlength, returnlength as _) } } #[inline] 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); - unsafe { ZwQueryInformationThread(threadhandle, threadinformationclass, core::mem::transmute(threadinformation), threadinformationlength, core::mem::transmute(returnlength)) } + unsafe { ZwQueryInformationThread(threadhandle, threadinformationclass, threadinformation as _, threadinformationlength, returnlength as _) } } #[inline] 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 { @@ -111,22 +111,22 @@ pub unsafe fn ZwSetInformationThread(threadhandle: super::super::super::Win32::F #[inline] pub unsafe fn ZwSetTimer(timerhandle: super::super::super::Win32::Foundation::HANDLE, duetime: *const i64, timerapcroutine: Option, timercontext: Option<*const core::ffi::c_void>, resumetimer: bool, period: Option, previousstate: Option<*mut bool>) -> super::super::super::Win32::Foundation::NTSTATUS { 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 : bool, period : i32, previousstate : *mut bool) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwSetTimer(timerhandle, duetime, core::mem::transmute(timerapcroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(timercontext.unwrap_or(core::mem::zeroed())), resumetimer, core::mem::transmute(period.unwrap_or(core::mem::zeroed())), core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwSetTimer(timerhandle, duetime, timerapcroutine.unwrap_or(core::mem::zeroed()) as _, timercontext.unwrap_or(core::mem::zeroed()) as _, resumetimer, period.unwrap_or(core::mem::zeroed()) as _, previousstate.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { ZwSetTimerEx(timerhandle, timersetinformationclass, core::mem::transmute(timersetinformation.unwrap_or(core::mem::zeroed())), timersetinformationlength) } + unsafe { ZwSetTimerEx(timerhandle, timersetinformationclass, timersetinformation.unwrap_or(core::mem::zeroed()) as _, timersetinformationlength) } } #[inline] 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); - unsafe { ZwTerminateProcess(core::mem::transmute(processhandle.unwrap_or(core::mem::zeroed())), exitstatus) } + unsafe { ZwTerminateProcess(processhandle.unwrap_or(core::mem::zeroed()) as _, exitstatus) } } #[inline] pub unsafe fn ZwWaitForSingleObject(handle: super::super::super::Win32::Foundation::HANDLE, alertable: bool, timeout: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwWaitForSingleObject(handle : super::super::super::Win32::Foundation:: HANDLE, alertable : bool, timeout : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - unsafe { ZwWaitForSingleObject(handle, alertable, core::mem::transmute(timeout.unwrap_or(core::mem::zeroed()))) } + unsafe { ZwWaitForSingleObject(handle, alertable, timeout.unwrap_or(core::mem::zeroed()) as _) } } 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 5c0d111f23..1cf412b802 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 @@ -2754,14 +2754,14 @@ impl IDMLBindingTable { unsafe { (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>) { - unsafe { (windows_core::Interface::vtable(self).BindTemporaryResource)(windows_core::Interface::as_raw(self), core::mem::transmute(binding.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).BindTemporaryResource)(windows_core::Interface::as_raw(self), binding.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn BindPersistentResource(&self, binding: Option<*const DML_BINDING_DESC>) { - unsafe { (windows_core::Interface::vtable(self).BindPersistentResource)(windows_core::Interface::as_raw(self), core::mem::transmute(binding.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).BindPersistentResource)(windows_core::Interface::as_raw(self), binding.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn Reset(&self, desc: Option<*const DML_BINDING_TABLE_DESC>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self), core::mem::transmute(desc.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self), desc.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -2942,7 +2942,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<()> { - unsafe { (windows_core::Interface::vtable(self).CheckFeatureSupport)(windows_core::Interface::as_raw(self), feature, featurequerydatasize, core::mem::transmute(featurequerydata.unwrap_or(core::mem::zeroed())), featuresupportdatasize, core::mem::transmute(featuresupportdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).CheckFeatureSupport)(windows_core::Interface::as_raw(self), feature, featurequerydatasize, featurequerydata.unwrap_or(core::mem::zeroed()) as _, featuresupportdatasize, featuresupportdata as _).ok() } } pub unsafe fn CreateOperator(&self, desc: *const DML_OPERATOR_DESC, result__: *mut Option) -> windows_core::Result<()> where @@ -2977,7 +2977,7 @@ impl IDMLDevice { T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - unsafe { (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__)) } + unsafe { (windows_core::Interface::vtable(self).CreateBindingTable)(windows_core::Interface::as_raw(self), desc.unwrap_or(core::mem::zeroed()) as _, &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn Evict(&self, ppobjects: &[Option]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Evict)(windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), core::mem::transmute(ppobjects.as_ptr())).ok() } @@ -3235,10 +3235,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<()> { - unsafe { (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), guid, core::mem::transmute(datasize), core::mem::transmute(data.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), guid, datasize as _, data.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetPrivateData(&self, guid: *const windows_core::GUID, datasize: u32, data: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), guid, datasize, core::mem::transmute(data.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), guid, datasize, data.unwrap_or(core::mem::zeroed()) as _).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/AI/MachineLearning/WinML/mod.rs b/crates/libs/windows/src/Windows/Win32/AI/MachineLearning/WinML/mod.rs index 2b2309cf63..c13c89b84b 100644 --- a/crates/libs/windows/src/Windows/Win32/AI/MachineLearning/WinML/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/AI/MachineLearning/WinML/mod.rs @@ -30,7 +30,7 @@ impl IMLOperatorAttributes { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetAttribute)(windows_core::Interface::as_raw(self), name.param().abi(), r#type, elementcount, elementbytesize, core::mem::transmute(value)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAttribute)(windows_core::Interface::as_raw(self), name.param().abi(), r#type, elementcount, elementbytesize, value as _).ok() } } pub unsafe fn GetStringAttributeElementLength(&self, name: P0, elementindex: u32) -> windows_core::Result where @@ -1141,7 +1141,7 @@ impl IWinMLModel { } } pub unsafe fn EnumerateMetadata(&self, index: u32, pkey: *mut windows_core::PCWSTR, pvalue: *mut windows_core::PCWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumerateMetadata)(windows_core::Interface::as_raw(self), index, core::mem::transmute(pkey), core::mem::transmute(pvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumerateMetadata)(windows_core::Interface::as_raw(self), index, pkey as _, pvalue as _).ok() } } pub unsafe fn EnumerateModelInputs(&self, index: u32) -> windows_core::Result<*mut WINML_VARIABLE_DESC> { unsafe { 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 b9d29a90db..80c33e5168 100644 --- a/crates/libs/windows/src/Windows/Win32/Data/HtmlHelp/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Data/HtmlHelp/mod.rs @@ -4,7 +4,7 @@ where 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); - unsafe { HtmlHelpA(core::mem::transmute(hwndcaller.unwrap_or(core::mem::zeroed())), pszfile.param().abi(), ucommand.0 as _, dwdata) } + unsafe { HtmlHelpA(hwndcaller.unwrap_or(core::mem::zeroed()) as _, pszfile.param().abi(), ucommand.0 as _, dwdata) } } #[inline] pub unsafe fn HtmlHelpW(hwndcaller: Option, pszfile: P1, ucommand: HTML_HELP_COMMAND, dwdata: usize) -> super::super::Foundation::HWND @@ -12,7 +12,7 @@ where 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); - unsafe { HtmlHelpW(core::mem::transmute(hwndcaller.unwrap_or(core::mem::zeroed())), pszfile.param().abi(), ucommand.0 as _, dwdata) } + unsafe { HtmlHelpW(hwndcaller.unwrap_or(core::mem::zeroed()) as _, pszfile.param().abi(), ucommand.0 as _, 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); @@ -504,16 +504,16 @@ impl IITDatabase { unsafe { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn CreateObject(&self, rclsid: *const windows_core::GUID, pdwobjinstance: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateObject)(windows_core::Interface::as_raw(self), rclsid, core::mem::transmute(pdwobjinstance)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateObject)(windows_core::Interface::as_raw(self), rclsid, pdwobjinstance as _).ok() } } pub unsafe fn GetObject(&self, dwobjinstance: u32, riid: *const windows_core::GUID, ppvobj: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetObject)(windows_core::Interface::as_raw(self), dwobjinstance, riid, core::mem::transmute(ppvobj)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetObject)(windows_core::Interface::as_raw(self), dwobjinstance, riid, ppvobj as _).ok() } } pub unsafe fn GetObjectPersistence(&self, lpwszobject: P0, dwobjinstance: u32, ppvpersistence: *mut *mut core::ffi::c_void, fstream: bool) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetObjectPersistence)(windows_core::Interface::as_raw(self), lpwszobject.param().abi(), dwobjinstance, core::mem::transmute(ppvpersistence), fstream.into()).ok() } + unsafe { (windows_core::Interface::vtable(self).GetObjectPersistence)(windows_core::Interface::as_raw(self), lpwszobject.param().abi(), dwobjinstance, ppvpersistence as _, fstream.into()).ok() } } } #[repr(C)] @@ -598,16 +598,16 @@ impl IITPropList { unsafe { (windows_core::Interface::vtable(self).Set)(windows_core::Interface::as_raw(self), propid, lpszwstring.param().abi(), dwoperation).ok() } } pub unsafe fn Set2(&self, propid: u32, lpvdata: *mut core::ffi::c_void, cbdata: u32, dwoperation: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Set2)(windows_core::Interface::as_raw(self), propid, core::mem::transmute(lpvdata), cbdata, dwoperation).ok() } + unsafe { (windows_core::Interface::vtable(self).Set2)(windows_core::Interface::as_raw(self), propid, lpvdata as _, cbdata, dwoperation).ok() } } pub unsafe fn Set3(&self, propid: u32, dwdata: u32, dwoperation: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Set3)(windows_core::Interface::as_raw(self), propid, dwdata, dwoperation).ok() } } pub unsafe fn Add(&self, prop: *mut CProperty) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Add)(windows_core::Interface::as_raw(self), core::mem::transmute(prop)).ok() } + unsafe { (windows_core::Interface::vtable(self).Add)(windows_core::Interface::as_raw(self), prop as _).ok() } } pub unsafe fn Get(&self, propid: u32, property: *mut CProperty) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Get)(windows_core::Interface::as_raw(self), propid, core::mem::transmute(property)).ok() } + unsafe { (windows_core::Interface::vtable(self).Get)(windows_core::Interface::as_raw(self), propid, property as _).ok() } } pub unsafe fn Clear(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Clear)(windows_core::Interface::as_raw(self)).ok() } @@ -619,38 +619,38 @@ impl IITPropList { unsafe { (windows_core::Interface::vtable(self).SetPersist2)(windows_core::Interface::as_raw(self), propid, fpersist.into()).ok() } } pub unsafe fn GetFirst(&self, property: *mut CProperty) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFirst)(windows_core::Interface::as_raw(self), core::mem::transmute(property)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFirst)(windows_core::Interface::as_raw(self), property as _).ok() } } pub unsafe fn GetNext(&self, property: *mut CProperty) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNext)(windows_core::Interface::as_raw(self), core::mem::transmute(property)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNext)(windows_core::Interface::as_raw(self), property as _).ok() } } pub unsafe fn GetPropCount(&self, cprop: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPropCount)(windows_core::Interface::as_raw(self), core::mem::transmute(cprop)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropCount)(windows_core::Interface::as_raw(self), cprop as _).ok() } } pub unsafe fn SaveHeader(&self, lpvdata: *mut core::ffi::c_void, dwhdrsize: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SaveHeader)(windows_core::Interface::as_raw(self), core::mem::transmute(lpvdata), dwhdrsize).ok() } + unsafe { (windows_core::Interface::vtable(self).SaveHeader)(windows_core::Interface::as_raw(self), lpvdata as _, dwhdrsize).ok() } } pub unsafe fn SaveData(&self, lpvheader: *mut core::ffi::c_void, dwhdrsize: u32, lpvdata: *mut core::ffi::c_void, dwbufsize: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SaveData)(windows_core::Interface::as_raw(self), core::mem::transmute(lpvheader), dwhdrsize, core::mem::transmute(lpvdata), dwbufsize).ok() } + unsafe { (windows_core::Interface::vtable(self).SaveData)(windows_core::Interface::as_raw(self), lpvheader as _, dwhdrsize, lpvdata as _, dwbufsize).ok() } } pub unsafe fn GetHeaderSize(&self, dwhdrsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetHeaderSize)(windows_core::Interface::as_raw(self), core::mem::transmute(dwhdrsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetHeaderSize)(windows_core::Interface::as_raw(self), dwhdrsize as _).ok() } } pub unsafe fn GetDataSize(&self, lpvheader: *mut core::ffi::c_void, dwhdrsize: u32, dwdatasize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDataSize)(windows_core::Interface::as_raw(self), core::mem::transmute(lpvheader), dwhdrsize, core::mem::transmute(dwdatasize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDataSize)(windows_core::Interface::as_raw(self), lpvheader as _, dwhdrsize, dwdatasize as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn SaveDataToStream(&self, lpvheader: *mut core::ffi::c_void, dwhdrsize: u32, pstream: P2) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SaveDataToStream)(windows_core::Interface::as_raw(self), core::mem::transmute(lpvheader), dwhdrsize, pstream.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).SaveDataToStream)(windows_core::Interface::as_raw(self), lpvheader as _, dwhdrsize, pstream.param().abi()).ok() } } pub unsafe fn LoadFromMem(&self, lpvdata: *mut core::ffi::c_void, dwbufsize: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).LoadFromMem)(windows_core::Interface::as_raw(self), core::mem::transmute(lpvdata), dwbufsize).ok() } + unsafe { (windows_core::Interface::vtable(self).LoadFromMem)(windows_core::Interface::as_raw(self), lpvdata as _, dwbufsize).ok() } } pub unsafe fn SaveToMem(&self, lpvdata: *mut core::ffi::c_void, dwbufsize: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SaveToMem)(windows_core::Interface::as_raw(self), core::mem::transmute(lpvdata), dwbufsize).ok() } + unsafe { (windows_core::Interface::vtable(self).SaveToMem)(windows_core::Interface::as_raw(self), lpvdata as _, dwbufsize).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -846,7 +846,7 @@ impl IITResultSet { unsafe { (windows_core::Interface::vtable(self).SetColumnPriority)(windows_core::Interface::as_raw(self), lcolumnindex, columnpriority).ok() } } pub unsafe fn SetColumnHeap(&self, lcolumnindex: i32, lpvheap: *mut core::ffi::c_void, pfncolheapfree: PFNCOLHEAPFREE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetColumnHeap)(windows_core::Interface::as_raw(self), lcolumnindex, core::mem::transmute(lpvheap), pfncolheapfree).ok() } + unsafe { (windows_core::Interface::vtable(self).SetColumnHeap)(windows_core::Interface::as_raw(self), lcolumnindex, lpvheap as _, pfncolheapfree).ok() } } pub unsafe fn SetKeyProp(&self, propid: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetKeyProp)(windows_core::Interface::as_raw(self), propid).ok() } @@ -861,16 +861,16 @@ impl IITResultSet { unsafe { (windows_core::Interface::vtable(self).Add2)(windows_core::Interface::as_raw(self), propid, lpszwdefault.param().abi(), priority).ok() } } pub unsafe fn Add3(&self, propid: u32, lpvdefaultdata: *mut core::ffi::c_void, cbdata: u32, priority: PRIORITY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Add3)(windows_core::Interface::as_raw(self), propid, core::mem::transmute(lpvdefaultdata), cbdata, priority).ok() } + unsafe { (windows_core::Interface::vtable(self).Add3)(windows_core::Interface::as_raw(self), propid, lpvdefaultdata as _, cbdata, priority).ok() } } pub unsafe fn Add4(&self, lpvhdr: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Add4)(windows_core::Interface::as_raw(self), core::mem::transmute(lpvhdr)).ok() } + unsafe { (windows_core::Interface::vtable(self).Add4)(windows_core::Interface::as_raw(self), lpvhdr as _).ok() } } pub unsafe fn Append(&self, lpvhdr: *mut core::ffi::c_void, lpvdata: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Append)(windows_core::Interface::as_raw(self), core::mem::transmute(lpvhdr), core::mem::transmute(lpvdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).Append)(windows_core::Interface::as_raw(self), lpvhdr as _, lpvdata as _).ok() } } pub unsafe fn Set(&self, lrowindex: i32, lcolumnindex: i32, lpvdata: *mut core::ffi::c_void, cbdata: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Set)(windows_core::Interface::as_raw(self), lrowindex, lcolumnindex, core::mem::transmute(lpvdata), cbdata).ok() } + unsafe { (windows_core::Interface::vtable(self).Set)(windows_core::Interface::as_raw(self), lrowindex, lcolumnindex, lpvdata as _, cbdata).ok() } } pub unsafe fn Set2(&self, lrowindex: i32, lcolumnindex: i32, lpwstr: P2) -> windows_core::Result<()> where @@ -882,7 +882,7 @@ impl IITResultSet { unsafe { (windows_core::Interface::vtable(self).Set3)(windows_core::Interface::as_raw(self), lrowindex, lcolumnindex, dwdata).ok() } } pub unsafe fn Set4(&self, lrowindex: i32, lpvhdr: *mut core::ffi::c_void, lpvdata: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Set4)(windows_core::Interface::as_raw(self), lrowindex, core::mem::transmute(lpvhdr), core::mem::transmute(lpvdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).Set4)(windows_core::Interface::as_raw(self), lrowindex, lpvhdr as _, lpvdata as _).ok() } } pub unsafe fn Copy(&self, prscopy: P0) -> windows_core::Result<()> where @@ -894,31 +894,31 @@ impl IITResultSet { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).AppendRows)(windows_core::Interface::as_raw(self), pressrc.param().abi(), lrowsrcfirst, csrcrows, core::mem::transmute(lrowfirstdest)).ok() } + unsafe { (windows_core::Interface::vtable(self).AppendRows)(windows_core::Interface::as_raw(self), pressrc.param().abi(), lrowsrcfirst, csrcrows, lrowfirstdest as _).ok() } } pub unsafe fn Get(&self, lrowindex: i32, lcolumnindex: i32, prop: *mut CProperty) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Get)(windows_core::Interface::as_raw(self), lrowindex, lcolumnindex, core::mem::transmute(prop)).ok() } + unsafe { (windows_core::Interface::vtable(self).Get)(windows_core::Interface::as_raw(self), lrowindex, lcolumnindex, prop as _).ok() } } pub unsafe fn GetKeyProp(&self, keypropid: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetKeyProp)(windows_core::Interface::as_raw(self), core::mem::transmute(keypropid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetKeyProp)(windows_core::Interface::as_raw(self), keypropid as _).ok() } } pub unsafe fn GetColumnPriority(&self, lcolumnindex: i32, columnpriority: *mut PRIORITY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetColumnPriority)(windows_core::Interface::as_raw(self), lcolumnindex, core::mem::transmute(columnpriority)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetColumnPriority)(windows_core::Interface::as_raw(self), lcolumnindex, columnpriority as _).ok() } } pub unsafe fn GetRowCount(&self, lnumberofrows: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRowCount)(windows_core::Interface::as_raw(self), core::mem::transmute(lnumberofrows)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRowCount)(windows_core::Interface::as_raw(self), lnumberofrows as _).ok() } } pub unsafe fn GetColumnCount(&self, lnumberofcolumns: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetColumnCount)(windows_core::Interface::as_raw(self), core::mem::transmute(lnumberofcolumns)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetColumnCount)(windows_core::Interface::as_raw(self), lnumberofcolumns as _).ok() } } pub unsafe fn GetColumn(&self, lcolumnindex: i32, propid: *mut u32, dwtype: *mut u32, lpvdefaultvalue: *mut *mut core::ffi::c_void, cbsize: *mut u32, columnpriority: *mut PRIORITY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetColumn)(windows_core::Interface::as_raw(self), lcolumnindex, core::mem::transmute(propid), core::mem::transmute(dwtype), core::mem::transmute(lpvdefaultvalue), core::mem::transmute(cbsize), core::mem::transmute(columnpriority)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetColumn)(windows_core::Interface::as_raw(self), lcolumnindex, propid as _, dwtype as _, lpvdefaultvalue as _, cbsize as _, columnpriority as _).ok() } } pub unsafe fn GetColumn2(&self, lcolumnindex: i32, propid: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetColumn2)(windows_core::Interface::as_raw(self), lcolumnindex, core::mem::transmute(propid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetColumn2)(windows_core::Interface::as_raw(self), lcolumnindex, propid as _).ok() } } pub unsafe fn GetColumnFromPropID(&self, propid: u32, lcolumnindex: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetColumnFromPropID)(windows_core::Interface::as_raw(self), propid, core::mem::transmute(lcolumnindex)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetColumnFromPropID)(windows_core::Interface::as_raw(self), propid, lcolumnindex as _).ok() } } pub unsafe fn Clear(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Clear)(windows_core::Interface::as_raw(self)).ok() } @@ -939,10 +939,10 @@ impl IITResultSet { unsafe { (windows_core::Interface::vtable(self).Pause)(windows_core::Interface::as_raw(self), fpause.into()).ok() } } pub unsafe fn GetRowStatus(&self, lrowfirst: i32, crows: i32, lprowstatus: *mut ROWSTATUS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRowStatus)(windows_core::Interface::as_raw(self), lrowfirst, crows, core::mem::transmute(lprowstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRowStatus)(windows_core::Interface::as_raw(self), lrowfirst, crows, lprowstatus as _).ok() } } pub unsafe fn GetColumnStatus(&self, lpcolstatus: *mut COLUMNSTATUS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetColumnStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(lpcolstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetColumnStatus)(windows_core::Interface::as_raw(self), lpcolstatus as _).ok() } } } #[repr(C)] @@ -1288,13 +1288,13 @@ impl IStemmerConfig { unsafe { (windows_core::Interface::vtable(self).SetLocaleInfo)(windows_core::Interface::as_raw(self), dwcodepageid, lcid).ok() } } pub unsafe fn GetLocaleInfo(&self, pdwcodepageid: *mut u32, plcid: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLocaleInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwcodepageid), core::mem::transmute(plcid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLocaleInfo)(windows_core::Interface::as_raw(self), pdwcodepageid as _, plcid as _).ok() } } pub unsafe fn SetControlInfo(&self, grfstemflags: u32, dwreserved: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetControlInfo)(windows_core::Interface::as_raw(self), grfstemflags, dwreserved).ok() } } pub unsafe fn GetControlInfo(&self, pgrfstemflags: *mut u32, pdwreserved: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetControlInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pgrfstemflags), core::mem::transmute(pdwreserved)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetControlInfo)(windows_core::Interface::as_raw(self), pgrfstemflags as _, pdwreserved as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn LoadExternalStemmerData(&self, pstream: P0, dwextdatatype: u32) -> windows_core::Result<()> @@ -1384,19 +1384,19 @@ impl IWordBreakerConfig { unsafe { (windows_core::Interface::vtable(self).SetLocaleInfo)(windows_core::Interface::as_raw(self), dwcodepageid, lcid).ok() } } pub unsafe fn GetLocaleInfo(&self, pdwcodepageid: *mut u32, plcid: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLocaleInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwcodepageid), core::mem::transmute(plcid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLocaleInfo)(windows_core::Interface::as_raw(self), pdwcodepageid as _, plcid as _).ok() } } pub unsafe fn SetBreakWordType(&self, dwbreakwordtype: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetBreakWordType)(windows_core::Interface::as_raw(self), dwbreakwordtype).ok() } } pub unsafe fn GetBreakWordType(&self, pdwbreakwordtype: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBreakWordType)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwbreakwordtype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBreakWordType)(windows_core::Interface::as_raw(self), pdwbreakwordtype as _).ok() } } pub unsafe fn SetControlInfo(&self, grfbreakflags: u32, dwreserved: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetControlInfo)(windows_core::Interface::as_raw(self), grfbreakflags, dwreserved).ok() } } pub unsafe fn GetControlInfo(&self, pgrfbreakflags: *mut u32, pdwreserved: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetControlInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pgrfbreakflags), core::mem::transmute(pdwreserved)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetControlInfo)(windows_core::Interface::as_raw(self), pgrfbreakflags as _, pdwreserved as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn LoadExternalBreakerData(&self, pstream: P0, dwextdatatype: u32) -> windows_core::Result<()> 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 ace30634f8..da19d995d8 100644 --- a/crates/libs/windows/src/Windows/Win32/Data/RightsManagement/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Data/RightsManagement/mod.rs @@ -5,7 +5,7 @@ where P2: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMAcquireAdvisories(hlicensestorage : u32, wszlicense : windows_core::PCWSTR, wszurl : windows_core::PCWSTR, pvcontext : *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { DRMAcquireAdvisories(hlicensestorage, wszlicense.param().abi(), wszurl.param().abi(), core::mem::transmute(pvcontext)).ok() } + unsafe { DRMAcquireAdvisories(hlicensestorage, wszlicense.param().abi(), wszurl.param().abi(), pvcontext as _).ok() } } #[inline] pub unsafe fn DRMAcquireIssuanceLicenseTemplate(hclient: u32, uflags: u32, pvreserved: *mut core::ffi::c_void, pwsztemplateids: Option<&[windows_core::PCWSTR]>, wszurl: P5, pvcontext: *mut core::ffi::c_void) -> windows_core::Result<()> @@ -13,7 +13,7 @@ where P5: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMAcquireIssuanceLicenseTemplate(hclient : u32, uflags : u32, pvreserved : *mut core::ffi::c_void, ctemplates : u32, pwsztemplateids : *const windows_core::PCWSTR, wszurl : windows_core::PCWSTR, pvcontext : *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { DRMAcquireIssuanceLicenseTemplate(hclient, uflags, core::mem::transmute(pvreserved), pwsztemplateids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pwsztemplateids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), wszurl.param().abi(), core::mem::transmute(pvcontext)).ok() } + unsafe { DRMAcquireIssuanceLicenseTemplate(hclient, uflags, pvreserved as _, pwsztemplateids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pwsztemplateids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), wszurl.param().abi(), pvcontext as _).ok() } } #[inline] pub unsafe fn DRMAcquireLicense(hsession: u32, uflags: u32, wszgroupidentitycredential: P2, wszrequestedrights: P3, wszcustomdata: P4, wszurl: P5, pvcontext: *mut core::ffi::c_void) -> windows_core::Result<()> @@ -24,12 +24,12 @@ where P5: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMAcquireLicense(hsession : u32, uflags : u32, wszgroupidentitycredential : windows_core::PCWSTR, wszrequestedrights : windows_core::PCWSTR, wszcustomdata : windows_core::PCWSTR, wszurl : windows_core::PCWSTR, pvcontext : *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { DRMAcquireLicense(hsession, uflags, wszgroupidentitycredential.param().abi(), wszrequestedrights.param().abi(), wszcustomdata.param().abi(), wszurl.param().abi(), core::mem::transmute(pvcontext)).ok() } + unsafe { DRMAcquireLicense(hsession, uflags, wszgroupidentitycredential.param().abi(), wszrequestedrights.param().abi(), wszcustomdata.param().abi(), wszurl.param().abi(), pvcontext as _).ok() } } #[inline] 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); - unsafe { DRMActivate(hclient, uflags, ulangid, core::mem::transmute(pactservinfo), core::mem::transmute(pvcontext), hparentwnd).ok() } + unsafe { DRMActivate(hclient, uflags, ulangid, pactservinfo as _, pvcontext as _, hparentwnd).ok() } } #[inline] pub unsafe fn DRMAddLicense(hlicensestorage: u32, uflags: u32, wszlicense: P2) -> windows_core::Result<()> @@ -50,7 +50,7 @@ where P1: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMAttest(henablingprincipal : u32, wszdata : windows_core::PCWSTR, etype : DRMATTESTTYPE, pcattestedblob : *mut u32, wszattestedblob : windows_core::PWSTR) -> windows_core::HRESULT); - unsafe { DRMAttest(henablingprincipal, wszdata.param().abi(), etype, core::mem::transmute(pcattestedblob), core::mem::transmute(wszattestedblob)).ok() } + unsafe { DRMAttest(henablingprincipal, wszdata.param().abi(), etype, pcattestedblob as _, core::mem::transmute(wszattestedblob)).ok() } } #[inline] pub unsafe fn DRMCheckSecurity(henv: u32, clevel: u32) -> windows_core::Result<()> { @@ -90,7 +90,7 @@ pub unsafe fn DRMCloseSession(hsession: u32) -> windows_core::Result<()> { #[inline] 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); - unsafe { 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() } + unsafe { DRMConstructCertificateChain(rgwszcertificates.len().try_into().unwrap(), core::mem::transmute(rgwszcertificates.as_ptr()), pcchain as _, wszchain.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn DRMCreateBoundLicense(henv: u32, pparams: *mut DRMBOUNDLICENSEPARAMS, wszlicensechain: P2, phboundlicense: *mut u32, pherrorlog: *mut u32) -> windows_core::Result<()> @@ -98,7 +98,7 @@ where P2: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMCreateBoundLicense(henv : u32, pparams : *mut DRMBOUNDLICENSEPARAMS, wszlicensechain : windows_core::PCWSTR, phboundlicense : *mut u32, pherrorlog : *mut u32) -> windows_core::HRESULT); - unsafe { DRMCreateBoundLicense(henv, core::mem::transmute(pparams), wszlicensechain.param().abi(), core::mem::transmute(phboundlicense), core::mem::transmute(pherrorlog)).ok() } + unsafe { DRMCreateBoundLicense(henv, pparams as _, wszlicensechain.param().abi(), phboundlicense as _, pherrorlog as _).ok() } } #[inline] pub unsafe fn DRMCreateClientSession(pfncallback: DRMCALLBACK, ucallbackversion: u32, wszgroupidprovidertype: P2, wszgroupid: P3, phclient: *mut u32) -> windows_core::Result<()> @@ -107,7 +107,7 @@ where P3: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMCreateClientSession(pfncallback : DRMCALLBACK, ucallbackversion : u32, wszgroupidprovidertype : windows_core::PCWSTR, wszgroupid : windows_core::PCWSTR, phclient : *mut u32) -> windows_core::HRESULT); - unsafe { DRMCreateClientSession(pfncallback, ucallbackversion, wszgroupidprovidertype.param().abi(), wszgroupid.param().abi(), core::mem::transmute(phclient)).ok() } + unsafe { DRMCreateClientSession(pfncallback, ucallbackversion, wszgroupidprovidertype.param().abi(), wszgroupid.param().abi(), phclient as _).ok() } } #[inline] pub unsafe fn DRMCreateEnablingBitsDecryptor(hboundlicense: u32, wszright: P1, hauxlib: u32, wszauxplug: P3, phdecryptor: *mut u32) -> windows_core::Result<()> @@ -116,7 +116,7 @@ where P3: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMCreateEnablingBitsDecryptor(hboundlicense : u32, wszright : windows_core::PCWSTR, hauxlib : u32, wszauxplug : windows_core::PCWSTR, phdecryptor : *mut u32) -> windows_core::HRESULT); - unsafe { DRMCreateEnablingBitsDecryptor(hboundlicense, wszright.param().abi(), hauxlib, wszauxplug.param().abi(), core::mem::transmute(phdecryptor)).ok() } + unsafe { DRMCreateEnablingBitsDecryptor(hboundlicense, wszright.param().abi(), hauxlib, wszauxplug.param().abi(), phdecryptor as _).ok() } } #[inline] pub unsafe fn DRMCreateEnablingBitsEncryptor(hboundlicense: u32, wszright: P1, hauxlib: u32, wszauxplug: P3, phencryptor: *mut u32) -> windows_core::Result<()> @@ -125,7 +125,7 @@ where P3: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMCreateEnablingBitsEncryptor(hboundlicense : u32, wszright : windows_core::PCWSTR, hauxlib : u32, wszauxplug : windows_core::PCWSTR, phencryptor : *mut u32) -> windows_core::HRESULT); - unsafe { DRMCreateEnablingBitsEncryptor(hboundlicense, wszright.param().abi(), hauxlib, wszauxplug.param().abi(), core::mem::transmute(phencryptor)).ok() } + unsafe { DRMCreateEnablingBitsEncryptor(hboundlicense, wszright.param().abi(), hauxlib, wszauxplug.param().abi(), phencryptor as _).ok() } } #[inline] pub unsafe fn DRMCreateEnablingPrincipal(henv: u32, hlibrary: u32, wszobject: P2, pidprincipal: *mut DRMID, wszcredentials: P4, phenablingprincipal: *mut u32) -> windows_core::Result<()> @@ -134,7 +134,7 @@ where P4: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMCreateEnablingPrincipal(henv : u32, hlibrary : u32, wszobject : windows_core::PCWSTR, pidprincipal : *mut DRMID, wszcredentials : windows_core::PCWSTR, phenablingprincipal : *mut u32) -> windows_core::HRESULT); - unsafe { DRMCreateEnablingPrincipal(henv, hlibrary, wszobject.param().abi(), core::mem::transmute(pidprincipal), wszcredentials.param().abi(), core::mem::transmute(phenablingprincipal)).ok() } + unsafe { DRMCreateEnablingPrincipal(henv, hlibrary, wszobject.param().abi(), pidprincipal as _, wszcredentials.param().abi(), phenablingprincipal as _).ok() } } #[inline] pub unsafe fn DRMCreateIssuanceLicense(psttimefrom: *mut super::super::Foundation::SYSTEMTIME, psttimeuntil: *mut super::super::Foundation::SYSTEMTIME, wszreferralinfoname: P2, wszreferralinfourl: P3, howner: u32, wszissuancelicense: P5, hboundlicense: u32, phissuancelicense: *mut u32) -> windows_core::Result<()> @@ -144,7 +144,7 @@ where P5: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMCreateIssuanceLicense(psttimefrom : *mut super::super::Foundation:: SYSTEMTIME, psttimeuntil : *mut super::super::Foundation:: SYSTEMTIME, wszreferralinfoname : windows_core::PCWSTR, wszreferralinfourl : windows_core::PCWSTR, howner : u32, wszissuancelicense : windows_core::PCWSTR, hboundlicense : u32, phissuancelicense : *mut u32) -> windows_core::HRESULT); - unsafe { DRMCreateIssuanceLicense(core::mem::transmute(psttimefrom), core::mem::transmute(psttimeuntil), wszreferralinfoname.param().abi(), wszreferralinfourl.param().abi(), howner, wszissuancelicense.param().abi(), hboundlicense, core::mem::transmute(phissuancelicense)).ok() } + unsafe { DRMCreateIssuanceLicense(psttimefrom as _, psttimeuntil as _, wszreferralinfoname.param().abi(), wszreferralinfourl.param().abi(), howner, wszissuancelicense.param().abi(), hboundlicense, phissuancelicense as _).ok() } } #[inline] pub unsafe fn DRMCreateLicenseStorageSession(henv: u32, hdefaultlibrary: u32, hclient: u32, uflags: u32, wszissuancelicense: P4, phlicensestorage: *mut u32) -> windows_core::Result<()> @@ -152,7 +152,7 @@ where P4: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMCreateLicenseStorageSession(henv : u32, hdefaultlibrary : u32, hclient : u32, uflags : u32, wszissuancelicense : windows_core::PCWSTR, phlicensestorage : *mut u32) -> windows_core::HRESULT); - unsafe { DRMCreateLicenseStorageSession(henv, hdefaultlibrary, hclient, uflags, wszissuancelicense.param().abi(), core::mem::transmute(phlicensestorage)).ok() } + unsafe { DRMCreateLicenseStorageSession(henv, hdefaultlibrary, hclient, uflags, wszissuancelicense.param().abi(), phlicensestorage as _).ok() } } #[inline] pub unsafe fn DRMCreateRight(wszrightname: P0, pstfrom: *mut super::super::Foundation::SYSTEMTIME, pstuntil: *mut super::super::Foundation::SYSTEMTIME, cextendedinfo: u32, pwszextendedinfoname: Option<*const windows_core::PCWSTR>, pwszextendedinfovalue: Option<*const windows_core::PCWSTR>, phright: *mut u32) -> windows_core::Result<()> @@ -160,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); - unsafe { DRMCreateRight(wszrightname.param().abi(), core::mem::transmute(pstfrom), core::mem::transmute(pstuntil), cextendedinfo, core::mem::transmute(pwszextendedinfoname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pwszextendedinfovalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(phright)).ok() } + unsafe { DRMCreateRight(wszrightname.param().abi(), pstfrom as _, pstuntil as _, cextendedinfo, pwszextendedinfoname.unwrap_or(core::mem::zeroed()) as _, pwszextendedinfovalue.unwrap_or(core::mem::zeroed()) as _, phright as _).ok() } } #[inline] pub unsafe fn DRMCreateUser(wszusername: P0, wszuserid: P1, wszuseridtype: P2, phuser: *mut u32) -> windows_core::Result<()> @@ -170,7 +170,7 @@ where P2: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMCreateUser(wszusername : windows_core::PCWSTR, wszuserid : windows_core::PCWSTR, wszuseridtype : windows_core::PCWSTR, phuser : *mut u32) -> windows_core::HRESULT); - unsafe { DRMCreateUser(wszusername.param().abi(), wszuserid.param().abi(), wszuseridtype.param().abi(), core::mem::transmute(phuser)).ok() } + unsafe { DRMCreateUser(wszusername.param().abi(), wszuserid.param().abi(), wszuseridtype.param().abi(), phuser as _).ok() } } #[inline] pub unsafe fn DRMDecode(wszalgid: P0, wszencodedstring: P1, pudecodeddatalen: *mut u32, pbdecodeddata: *mut u8) -> windows_core::Result<()> @@ -179,7 +179,7 @@ where P1: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMDecode(wszalgid : windows_core::PCWSTR, wszencodedstring : windows_core::PCWSTR, pudecodeddatalen : *mut u32, pbdecodeddata : *mut u8) -> windows_core::HRESULT); - unsafe { DRMDecode(wszalgid.param().abi(), wszencodedstring.param().abi(), core::mem::transmute(pudecodeddatalen), core::mem::transmute(pbdecodeddata)).ok() } + unsafe { DRMDecode(wszalgid.param().abi(), wszencodedstring.param().abi(), pudecodeddatalen as _, pbdecodeddata as _).ok() } } #[inline] pub unsafe fn DRMDeconstructCertificateChain(wszchain: P0, iwhich: u32, pccert: *mut u32, wszcert: Option) -> windows_core::Result<()> @@ -187,12 +187,12 @@ 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); - unsafe { DRMDeconstructCertificateChain(wszchain.param().abi(), iwhich, core::mem::transmute(pccert), core::mem::transmute(wszcert.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DRMDeconstructCertificateChain(wszchain.param().abi(), iwhich, pccert as _, wszcert.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn DRMDecrypt(hcryptoprovider: u32, iposition: u32, cnuminbytes: u32, pbindata: *mut u8, pcnumoutbytes: *mut u32, pboutdata: *mut u8) -> windows_core::Result<()> { windows_targets::link!("msdrm.dll" "system" fn DRMDecrypt(hcryptoprovider : u32, iposition : u32, cnuminbytes : u32, pbindata : *mut u8, pcnumoutbytes : *mut u32, pboutdata : *mut u8) -> windows_core::HRESULT); - unsafe { DRMDecrypt(hcryptoprovider, iposition, cnuminbytes, core::mem::transmute(pbindata), core::mem::transmute(pcnumoutbytes), core::mem::transmute(pboutdata)).ok() } + unsafe { DRMDecrypt(hcryptoprovider, iposition, cnuminbytes, pbindata as _, pcnumoutbytes as _, pboutdata as _).ok() } } #[inline] pub unsafe fn DRMDeleteLicense(hsession: u32, wszlicenseid: P1) -> windows_core::Result<()> @@ -205,22 +205,22 @@ where #[inline] pub unsafe fn DRMDuplicateEnvironmentHandle(htocopy: u32, phcopy: *mut u32) -> windows_core::Result<()> { windows_targets::link!("msdrm.dll" "system" fn DRMDuplicateEnvironmentHandle(htocopy : u32, phcopy : *mut u32) -> windows_core::HRESULT); - unsafe { DRMDuplicateEnvironmentHandle(htocopy, core::mem::transmute(phcopy)).ok() } + unsafe { DRMDuplicateEnvironmentHandle(htocopy, phcopy as _).ok() } } #[inline] pub unsafe fn DRMDuplicateHandle(htocopy: u32, phcopy: *mut u32) -> windows_core::Result<()> { windows_targets::link!("msdrm.dll" "system" fn DRMDuplicateHandle(htocopy : u32, phcopy : *mut u32) -> windows_core::HRESULT); - unsafe { DRMDuplicateHandle(htocopy, core::mem::transmute(phcopy)).ok() } + unsafe { DRMDuplicateHandle(htocopy, phcopy as _).ok() } } #[inline] pub unsafe fn DRMDuplicatePubHandle(hpubin: u32, phpubout: *mut u32) -> windows_core::Result<()> { windows_targets::link!("msdrm.dll" "system" fn DRMDuplicatePubHandle(hpubin : u32, phpubout : *mut u32) -> windows_core::HRESULT); - unsafe { DRMDuplicatePubHandle(hpubin, core::mem::transmute(phpubout)).ok() } + unsafe { DRMDuplicatePubHandle(hpubin, phpubout as _).ok() } } #[inline] pub unsafe fn DRMDuplicateSession(hsessionin: u32, phsessionout: *mut u32) -> windows_core::Result<()> { windows_targets::link!("msdrm.dll" "system" fn DRMDuplicateSession(hsessionin : u32, phsessionout : *mut u32) -> windows_core::HRESULT); - unsafe { DRMDuplicateSession(hsessionin, core::mem::transmute(phsessionout)).ok() } + unsafe { DRMDuplicateSession(hsessionin, phsessionout as _).ok() } } #[inline] pub unsafe fn DRMEncode(wszalgid: P0, udatalen: u32, pbdecodeddata: *mut u8, puencodedstringlen: *mut u32, wszencodedstring: Option) -> windows_core::Result<()> @@ -228,22 +228,22 @@ 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); - unsafe { DRMEncode(wszalgid.param().abi(), udatalen, core::mem::transmute(pbdecodeddata), core::mem::transmute(puencodedstringlen), core::mem::transmute(wszencodedstring.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DRMEncode(wszalgid.param().abi(), udatalen, pbdecodeddata as _, puencodedstringlen as _, wszencodedstring.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn DRMEncrypt(hcryptoprovider: u32, iposition: u32, cnuminbytes: u32, pbindata: *mut u8, pcnumoutbytes: *mut u32, pboutdata: *mut u8) -> windows_core::Result<()> { windows_targets::link!("msdrm.dll" "system" fn DRMEncrypt(hcryptoprovider : u32, iposition : u32, cnuminbytes : u32, pbindata : *mut u8, pcnumoutbytes : *mut u32, pboutdata : *mut u8) -> windows_core::HRESULT); - unsafe { DRMEncrypt(hcryptoprovider, iposition, cnuminbytes, core::mem::transmute(pbindata), core::mem::transmute(pcnumoutbytes), core::mem::transmute(pboutdata)).ok() } + unsafe { DRMEncrypt(hcryptoprovider, iposition, cnuminbytes, pbindata as _, pcnumoutbytes as _, pboutdata as _).ok() } } #[inline] 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); - unsafe { DRMEnumerateLicense(hsession, uflags, uindex, core::mem::transmute(pfsharedflag), core::mem::transmute(pucertificatedatalen), core::mem::transmute(wszcertificatedata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DRMEnumerateLicense(hsession, uflags, uindex, pfsharedflag as _, pucertificatedatalen as _, wszcertificatedata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { DRMGetApplicationSpecificData(hissuancelicense, 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() } + unsafe { DRMGetApplicationSpecificData(hissuancelicense, uindex, punamelength as _, wszname.unwrap_or(core::mem::zeroed()) as _, puvaluelength as _, wszvalue.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn DRMGetBoundLicenseAttribute(hqueryroot: u32, wszattribute: P1, iwhich: u32, peencoding: *mut DRMENCODINGTYPE, pcbuffer: *mut u32, pbbuffer: *mut u8) -> windows_core::Result<()> @@ -251,7 +251,7 @@ where P1: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMGetBoundLicenseAttribute(hqueryroot : u32, wszattribute : windows_core::PCWSTR, iwhich : u32, peencoding : *mut DRMENCODINGTYPE, pcbuffer : *mut u32, pbbuffer : *mut u8) -> windows_core::HRESULT); - unsafe { DRMGetBoundLicenseAttribute(hqueryroot, wszattribute.param().abi(), iwhich, core::mem::transmute(peencoding), core::mem::transmute(pcbuffer), core::mem::transmute(pbbuffer)).ok() } + unsafe { DRMGetBoundLicenseAttribute(hqueryroot, wszattribute.param().abi(), iwhich, peencoding as _, pcbuffer as _, pbbuffer as _).ok() } } #[inline] pub unsafe fn DRMGetBoundLicenseAttributeCount(hqueryroot: u32, wszattribute: P1, pcattributes: *mut u32) -> windows_core::Result<()> @@ -259,7 +259,7 @@ where P1: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMGetBoundLicenseAttributeCount(hqueryroot : u32, wszattribute : windows_core::PCWSTR, pcattributes : *mut u32) -> windows_core::HRESULT); - unsafe { DRMGetBoundLicenseAttributeCount(hqueryroot, wszattribute.param().abi(), core::mem::transmute(pcattributes)).ok() } + unsafe { DRMGetBoundLicenseAttributeCount(hqueryroot, wszattribute.param().abi(), pcattributes as _).ok() } } #[inline] pub unsafe fn DRMGetBoundLicenseObject(hqueryroot: u32, wszsubobjecttype: P1, iwhich: u32, phsubobject: *mut u32) -> windows_core::Result<()> @@ -267,7 +267,7 @@ where P1: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMGetBoundLicenseObject(hqueryroot : u32, wszsubobjecttype : windows_core::PCWSTR, iwhich : u32, phsubobject : *mut u32) -> windows_core::HRESULT); - unsafe { DRMGetBoundLicenseObject(hqueryroot, wszsubobjecttype.param().abi(), iwhich, core::mem::transmute(phsubobject)).ok() } + unsafe { DRMGetBoundLicenseObject(hqueryroot, wszsubobjecttype.param().abi(), iwhich, phsubobject as _).ok() } } #[inline] pub unsafe fn DRMGetBoundLicenseObjectCount(hqueryroot: u32, wszsubobjecttype: P1, pcsubobjects: *mut u32) -> windows_core::Result<()> @@ -275,7 +275,7 @@ where P1: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMGetBoundLicenseObjectCount(hqueryroot : u32, wszsubobjecttype : windows_core::PCWSTR, pcsubobjects : *mut u32) -> windows_core::HRESULT); - unsafe { DRMGetBoundLicenseObjectCount(hqueryroot, wszsubobjecttype.param().abi(), core::mem::transmute(pcsubobjects)).ok() } + unsafe { DRMGetBoundLicenseObjectCount(hqueryroot, wszsubobjecttype.param().abi(), pcsubobjects as _).ok() } } #[inline] pub unsafe fn DRMGetCertificateChainCount(wszchain: P0, pccertcount: *mut u32) -> windows_core::Result<()> @@ -283,12 +283,12 @@ where P0: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMGetCertificateChainCount(wszchain : windows_core::PCWSTR, pccertcount : *mut u32) -> windows_core::HRESULT); - unsafe { DRMGetCertificateChainCount(wszchain.param().abi(), core::mem::transmute(pccertcount)).ok() } + unsafe { DRMGetCertificateChainCount(wszchain.param().abi(), pccertcount as _).ok() } } #[inline] pub unsafe fn DRMGetClientVersion(pdrmclientversioninfo: *mut DRM_CLIENT_VERSION_INFO) -> windows_core::Result<()> { windows_targets::link!("msdrm.dll" "system" fn DRMGetClientVersion(pdrmclientversioninfo : *mut DRM_CLIENT_VERSION_INFO) -> windows_core::HRESULT); - unsafe { DRMGetClientVersion(core::mem::transmute(pdrmclientversioninfo)).ok() } + unsafe { DRMGetClientVersion(pdrmclientversioninfo as _).ok() } } #[inline] pub unsafe fn DRMGetEnvironmentInfo(handle: u32, wszattribute: P1, peencoding: *mut DRMENCODINGTYPE, pcbuffer: *mut u32, pbbuffer: *mut u8) -> windows_core::Result<()> @@ -296,7 +296,7 @@ where P1: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMGetEnvironmentInfo(handle : u32, wszattribute : windows_core::PCWSTR, peencoding : *mut DRMENCODINGTYPE, pcbuffer : *mut u32, pbbuffer : *mut u8) -> windows_core::HRESULT); - unsafe { DRMGetEnvironmentInfo(handle, wszattribute.param().abi(), core::mem::transmute(peencoding), core::mem::transmute(pcbuffer), core::mem::transmute(pbbuffer)).ok() } + unsafe { DRMGetEnvironmentInfo(handle, wszattribute.param().abi(), peencoding as _, pcbuffer as _, pbbuffer as _).ok() } } #[inline] pub unsafe fn DRMGetInfo(handle: u32, wszattribute: P1, peencoding: *const DRMENCODINGTYPE, pcbuffer: *mut u32, pbbuffer: *mut u8) -> windows_core::Result<()> @@ -304,54 +304,37 @@ where P1: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMGetInfo(handle : u32, wszattribute : windows_core::PCWSTR, peencoding : *const DRMENCODINGTYPE, pcbuffer : *mut u32, pbbuffer : *mut u8) -> windows_core::HRESULT); - unsafe { DRMGetInfo(handle, wszattribute.param().abi(), peencoding, core::mem::transmute(pcbuffer), core::mem::transmute(pbbuffer)).ok() } + unsafe { DRMGetInfo(handle, wszattribute.param().abi(), peencoding, pcbuffer as _, pbbuffer as _).ok() } } #[inline] pub unsafe fn DRMGetIntervalTime(hissuancelicense: u32, pcdays: *mut u32) -> windows_core::Result<()> { windows_targets::link!("msdrm.dll" "system" fn DRMGetIntervalTime(hissuancelicense : u32, pcdays : *mut u32) -> windows_core::HRESULT); - unsafe { DRMGetIntervalTime(hissuancelicense, core::mem::transmute(pcdays)).ok() } + unsafe { DRMGetIntervalTime(hissuancelicense, pcdays as _).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: 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); - unsafe { DRMGetIssuanceLicenseInfo(hissuancelicense, core::mem::transmute(psttimefrom), core::mem::transmute(psttimeuntil), 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() } + unsafe { DRMGetIssuanceLicenseInfo(hissuancelicense, psttimefrom as _, psttimeuntil as _, uflags, pudistributionpointnamelength as _, wszdistributionpointname.unwrap_or(core::mem::zeroed()) as _, pudistributionpointurllength as _, wszdistributionpointurl.unwrap_or(core::mem::zeroed()) as _, phowner as _, pfofficial as _).ok() } } #[inline] 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); - unsafe { DRMGetIssuanceLicenseTemplate(hissuancelicense, core::mem::transmute(puissuancelicensetemplatelength), core::mem::transmute(wszissuancelicensetemplate.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DRMGetIssuanceLicenseTemplate(hissuancelicense, puissuancelicensetemplatelength as _, wszissuancelicensetemplate.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { - DRMGetMetaData( - hissuancelicense, - core::mem::transmute(pucontentidlength), - core::mem::transmute(wszcontentid.unwrap_or(core::mem::zeroed())), - core::mem::transmute(pucontentidtypelength), - core::mem::transmute(wszcontentidtype.unwrap_or(core::mem::zeroed())), - core::mem::transmute(puskuidlength), - core::mem::transmute(wszskuid.unwrap_or(core::mem::zeroed())), - core::mem::transmute(puskuidtypelength), - core::mem::transmute(wszskuidtype.unwrap_or(core::mem::zeroed())), - core::mem::transmute(pucontenttypelength), - core::mem::transmute(wszcontenttype.unwrap_or(core::mem::zeroed())), - core::mem::transmute(pucontentnamelength), - core::mem::transmute(wszcontentname.unwrap_or(core::mem::zeroed())), - ) - .ok() - } + unsafe { DRMGetMetaData(hissuancelicense, pucontentidlength as _, wszcontentid.unwrap_or(core::mem::zeroed()) as _, pucontentidtypelength as _, wszcontentidtype.unwrap_or(core::mem::zeroed()) as _, puskuidlength as _, wszskuid.unwrap_or(core::mem::zeroed()) as _, puskuidtypelength as _, wszskuidtype.unwrap_or(core::mem::zeroed()) as _, pucontenttypelength as _, wszcontenttype.unwrap_or(core::mem::zeroed()) as _, pucontentnamelength as _, wszcontentname.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { DRMGetNameAndDescription(hissuancelicense, 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() } + unsafe { DRMGetNameAndDescription(hissuancelicense, uindex, pulcid as _, punamelength as _, wszname.unwrap_or(core::mem::zeroed()) as _, pudescriptionlength as _, wszdescription.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { DRMGetOwnerLicense(hissuancelicense, core::mem::transmute(puownerlicenselength), core::mem::transmute(wszownerlicense.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DRMGetOwnerLicense(hissuancelicense, puownerlicenselength as _, wszownerlicense.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn DRMGetProcAddress(hlibrary: u32, wszprocname: P1, ppfnprocaddress: *mut super::super::Foundation::FARPROC) -> windows_core::Result<()> @@ -359,43 +342,27 @@ where P1: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMGetProcAddress(hlibrary : u32, wszprocname : windows_core::PCWSTR, ppfnprocaddress : *mut super::super::Foundation:: FARPROC) -> windows_core::HRESULT); - unsafe { DRMGetProcAddress(hlibrary, wszprocname.param().abi(), core::mem::transmute(ppfnprocaddress)).ok() } + unsafe { DRMGetProcAddress(hlibrary, wszprocname.param().abi(), ppfnprocaddress as _).ok() } } #[inline] 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); - unsafe { - DRMGetRevocationPoint( - 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() - } + unsafe { DRMGetRevocationPoint(hissuancelicense, puidlength as _, wszid.unwrap_or(core::mem::zeroed()) as _, puidtypelength as _, wszidtype.unwrap_or(core::mem::zeroed()) as _, puurllength as _, wszrl.unwrap_or(core::mem::zeroed()) as _, pstfrequency as _, punamelength as _, wszname.unwrap_or(core::mem::zeroed()) as _, pupublickeylength as _, wszpublickey.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { DRMGetRightExtendedInfo(hright, 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() } + unsafe { DRMGetRightExtendedInfo(hright, uindex, puextendedinfonamelength as _, wszextendedinfoname.unwrap_or(core::mem::zeroed()) as _, puextendedinfovaluelength as _, wszextendedinfovalue.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { DRMGetRightInfo(hright, core::mem::transmute(purightnamelength), core::mem::transmute(wszrightname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pstfrom), core::mem::transmute(pstuntil)).ok() } + unsafe { DRMGetRightInfo(hright, purightnamelength as _, wszrightname.unwrap_or(core::mem::zeroed()) as _, pstfrom as _, pstuntil as _).ok() } } #[inline] 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); - unsafe { DRMGetSecurityProvider(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() } + unsafe { DRMGetSecurityProvider(uflags, putypelen as _, wsztype.unwrap_or(core::mem::zeroed()) as _, pupathlen as _, wszpath.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn DRMGetServiceLocation(hclient: u32, uservicetype: u32, uservicelocation: u32, wszissuancelicense: P3, puserviceurllength: *mut u32, wszserviceurl: Option) -> windows_core::Result<()> @@ -403,7 +370,7 @@ 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); - unsafe { DRMGetServiceLocation(hclient, uservicetype, uservicelocation, wszissuancelicense.param().abi(), core::mem::transmute(puserviceurllength), core::mem::transmute(wszserviceurl.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DRMGetServiceLocation(hclient, uservicetype, uservicelocation, wszissuancelicense.param().abi(), puserviceurllength as _, wszserviceurl.unwrap_or(core::mem::zeroed()) as _).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 +380,7 @@ where P8: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMGetSignedIssuanceLicense(henv : u32, hissuancelicense : u32, uflags : u32, pbsymkey : *mut u8, cbsymkey : u32, wszsymkeytype : windows_core::PCWSTR, wszclientlicensorcertificate : windows_core::PCWSTR, pfncallback : DRMCALLBACK, wszurl : windows_core::PCWSTR, pvcontext : *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { DRMGetSignedIssuanceLicense(henv, hissuancelicense, uflags, core::mem::transmute(pbsymkey), cbsymkey, wszsymkeytype.param().abi(), wszclientlicensorcertificate.param().abi(), pfncallback, wszurl.param().abi(), core::mem::transmute(pvcontext)).ok() } + unsafe { DRMGetSignedIssuanceLicense(henv, hissuancelicense, uflags, pbsymkey as _, cbsymkey, wszsymkeytype.param().abi(), wszclientlicensorcertificate.param().abi(), pfncallback, wszurl.param().abi(), pvcontext as _).ok() } } #[inline] pub unsafe fn DRMGetSignedIssuanceLicenseEx(henv: u32, hissuancelicense: u32, uflags: u32, pbsymkey: Option<&[u8]>, wszsymkeytype: P5, pvreserved: Option<*const core::ffi::c_void>, henablingprincipal: u32, hboundlicenseclc: u32, pfncallback: DRMCALLBACK, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()> @@ -421,12 +388,12 @@ where P5: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMGetSignedIssuanceLicenseEx(henv : u32, hissuancelicense : u32, uflags : u32, pbsymkey : *const u8, cbsymkey : u32, wszsymkeytype : windows_core::PCWSTR, pvreserved : *const core::ffi::c_void, henablingprincipal : u32, hboundlicenseclc : u32, pfncallback : DRMCALLBACK, pvcontext : *const core::ffi::c_void) -> windows_core::HRESULT); - unsafe { DRMGetSignedIssuanceLicenseEx(henv, hissuancelicense, uflags, core::mem::transmute(pbsymkey.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbsymkey.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), wszsymkeytype.param().abi(), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), henablingprincipal, hboundlicenseclc, pfncallback, pvcontext).ok() } + unsafe { DRMGetSignedIssuanceLicenseEx(henv, hissuancelicense, uflags, core::mem::transmute(pbsymkey.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbsymkey.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), wszsymkeytype.param().abi(), pvreserved.unwrap_or(core::mem::zeroed()) as _, henablingprincipal, hboundlicenseclc, pfncallback, pvcontext).ok() } } #[inline] pub unsafe fn DRMGetTime(henv: u32, etimeridtype: DRMTIMETYPE, potimeobject: *mut super::super::Foundation::SYSTEMTIME) -> windows_core::Result<()> { windows_targets::link!("msdrm.dll" "system" fn DRMGetTime(henv : u32, etimeridtype : DRMTIMETYPE, potimeobject : *mut super::super::Foundation:: SYSTEMTIME) -> windows_core::HRESULT); - unsafe { DRMGetTime(henv, etimeridtype, core::mem::transmute(potimeobject)).ok() } + unsafe { DRMGetTime(henv, etimeridtype, potimeobject as _).ok() } } #[inline] pub unsafe fn DRMGetUnboundLicenseAttribute(hqueryroot: u32, wszattributetype: P1, iwhich: u32, peencoding: *mut DRMENCODINGTYPE, pcbuffer: *mut u32, pbbuffer: *mut u8) -> windows_core::Result<()> @@ -434,7 +401,7 @@ where P1: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMGetUnboundLicenseAttribute(hqueryroot : u32, wszattributetype : windows_core::PCWSTR, iwhich : u32, peencoding : *mut DRMENCODINGTYPE, pcbuffer : *mut u32, pbbuffer : *mut u8) -> windows_core::HRESULT); - unsafe { DRMGetUnboundLicenseAttribute(hqueryroot, wszattributetype.param().abi(), iwhich, core::mem::transmute(peencoding), core::mem::transmute(pcbuffer), core::mem::transmute(pbbuffer)).ok() } + unsafe { DRMGetUnboundLicenseAttribute(hqueryroot, wszattributetype.param().abi(), iwhich, peencoding as _, pcbuffer as _, pbbuffer as _).ok() } } #[inline] pub unsafe fn DRMGetUnboundLicenseAttributeCount(hqueryroot: u32, wszattributetype: P1, pcattributes: *mut u32) -> windows_core::Result<()> @@ -442,7 +409,7 @@ where P1: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMGetUnboundLicenseAttributeCount(hqueryroot : u32, wszattributetype : windows_core::PCWSTR, pcattributes : *mut u32) -> windows_core::HRESULT); - unsafe { DRMGetUnboundLicenseAttributeCount(hqueryroot, wszattributetype.param().abi(), core::mem::transmute(pcattributes)).ok() } + unsafe { DRMGetUnboundLicenseAttributeCount(hqueryroot, wszattributetype.param().abi(), pcattributes as _).ok() } } #[inline] pub unsafe fn DRMGetUnboundLicenseObject(hqueryroot: u32, wszsubobjecttype: P1, iindex: u32, phsubquery: *mut u32) -> windows_core::Result<()> @@ -450,7 +417,7 @@ where P1: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMGetUnboundLicenseObject(hqueryroot : u32, wszsubobjecttype : windows_core::PCWSTR, iindex : u32, phsubquery : *mut u32) -> windows_core::HRESULT); - unsafe { DRMGetUnboundLicenseObject(hqueryroot, wszsubobjecttype.param().abi(), iindex, core::mem::transmute(phsubquery)).ok() } + unsafe { DRMGetUnboundLicenseObject(hqueryroot, wszsubobjecttype.param().abi(), iindex, phsubquery as _).ok() } } #[inline] pub unsafe fn DRMGetUnboundLicenseObjectCount(hqueryroot: u32, wszsubobjecttype: P1, pcsubobjects: *mut u32) -> windows_core::Result<()> @@ -458,47 +425,27 @@ where P1: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMGetUnboundLicenseObjectCount(hqueryroot : u32, wszsubobjecttype : windows_core::PCWSTR, pcsubobjects : *mut u32) -> windows_core::HRESULT); - unsafe { DRMGetUnboundLicenseObjectCount(hqueryroot, wszsubobjecttype.param().abi(), core::mem::transmute(pcsubobjects)).ok() } + unsafe { DRMGetUnboundLicenseObjectCount(hqueryroot, wszsubobjecttype.param().abi(), pcsubobjects as _).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: 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); - unsafe { - DRMGetUsagePolicy( - hissuancelicense, - uindex, - core::mem::transmute(peusagepolicytype), - core::mem::transmute(pfexclusion), - core::mem::transmute(punamelength), - core::mem::transmute(wszname.unwrap_or(core::mem::zeroed())), - core::mem::transmute(puminversionlength), - core::mem::transmute(wszminversion.unwrap_or(core::mem::zeroed())), - core::mem::transmute(pumaxversionlength), - core::mem::transmute(wszmaxversion.unwrap_or(core::mem::zeroed())), - core::mem::transmute(pupublickeylength), - core::mem::transmute(wszpublickey.unwrap_or(core::mem::zeroed())), - core::mem::transmute(pudigestalgorithmlength), - core::mem::transmute(wszdigestalgorithm.unwrap_or(core::mem::zeroed())), - core::mem::transmute(pcbdigest), - core::mem::transmute(pbdigest), - ) - .ok() - } + unsafe { DRMGetUsagePolicy(hissuancelicense, uindex, peusagepolicytype as _, pfexclusion as _, punamelength as _, wszname.unwrap_or(core::mem::zeroed()) as _, puminversionlength as _, wszminversion.unwrap_or(core::mem::zeroed()) as _, pumaxversionlength as _, wszmaxversion.unwrap_or(core::mem::zeroed()) as _, pupublickeylength as _, wszpublickey.unwrap_or(core::mem::zeroed()) as _, pudigestalgorithmlength as _, wszdigestalgorithm.unwrap_or(core::mem::zeroed()) as _, pcbdigest as _, pbdigest as _).ok() } } #[inline] 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); - unsafe { DRMGetUserInfo(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() } + unsafe { DRMGetUserInfo(huser, puusernamelength as _, wszusername.unwrap_or(core::mem::zeroed()) as _, puuseridlength as _, wszuserid.unwrap_or(core::mem::zeroed()) as _, puuseridtypelength as _, wszuseridtype.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn DRMGetUserRights(hissuancelicense: u32, huser: u32, uindex: u32, phright: *mut u32) -> windows_core::Result<()> { windows_targets::link!("msdrm.dll" "system" fn DRMGetUserRights(hissuancelicense : u32, huser : u32, uindex : u32, phright : *mut u32) -> windows_core::HRESULT); - unsafe { DRMGetUserRights(hissuancelicense, huser, uindex, core::mem::transmute(phright)).ok() } + unsafe { DRMGetUserRights(hissuancelicense, huser, uindex, phright as _).ok() } } #[inline] pub unsafe fn DRMGetUsers(hissuancelicense: u32, uindex: u32, phuser: *mut u32) -> windows_core::Result<()> { windows_targets::link!("msdrm.dll" "system" fn DRMGetUsers(hissuancelicense : u32, uindex : u32, phuser : *mut u32) -> windows_core::HRESULT); - unsafe { DRMGetUsers(hissuancelicense, uindex, core::mem::transmute(phuser)).ok() } + unsafe { DRMGetUsers(hissuancelicense, uindex, phuser as _).ok() } } #[inline] pub unsafe fn DRMInitEnvironment(esecurityprovidertype: DRMSECURITYPROVIDERTYPE, especification: DRMSPECTYPE, wszsecurityprovider: P2, wszmanifestcredentials: P3, wszmachinecredentials: P4, phenv: *mut u32, phdefaultlibrary: *mut u32) -> windows_core::Result<()> @@ -508,17 +455,17 @@ where P4: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMInitEnvironment(esecurityprovidertype : DRMSECURITYPROVIDERTYPE, especification : DRMSPECTYPE, wszsecurityprovider : windows_core::PCWSTR, wszmanifestcredentials : windows_core::PCWSTR, wszmachinecredentials : windows_core::PCWSTR, phenv : *mut u32, phdefaultlibrary : *mut u32) -> windows_core::HRESULT); - unsafe { DRMInitEnvironment(esecurityprovidertype, especification, wszsecurityprovider.param().abi(), wszmanifestcredentials.param().abi(), wszmachinecredentials.param().abi(), core::mem::transmute(phenv), core::mem::transmute(phdefaultlibrary)).ok() } + unsafe { DRMInitEnvironment(esecurityprovidertype, especification, wszsecurityprovider.param().abi(), wszmanifestcredentials.param().abi(), wszmachinecredentials.param().abi(), phenv as _, phdefaultlibrary as _).ok() } } #[inline] pub unsafe fn DRMIsActivated(hclient: u32, uflags: u32, pactservinfo: *mut DRM_ACTSERV_INFO) -> windows_core::Result<()> { windows_targets::link!("msdrm.dll" "system" fn DRMIsActivated(hclient : u32, uflags : u32, pactservinfo : *mut DRM_ACTSERV_INFO) -> windows_core::HRESULT); - unsafe { DRMIsActivated(hclient, uflags, core::mem::transmute(pactservinfo)).ok() } + unsafe { DRMIsActivated(hclient, uflags, pactservinfo as _).ok() } } #[inline] 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); - unsafe { DRMIsWindowProtected(hwnd, core::mem::transmute(pfprotected)).ok() } + unsafe { DRMIsWindowProtected(hwnd, pfprotected as _).ok() } } #[inline] pub unsafe fn DRMLoadLibrary(henv: u32, especification: DRMSPECTYPE, wszlibraryprovider: P2, wszcredentials: P3, phlibrary: *mut u32) -> windows_core::Result<()> @@ -527,7 +474,7 @@ where P3: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMLoadLibrary(henv : u32, especification : DRMSPECTYPE, wszlibraryprovider : windows_core::PCWSTR, wszcredentials : windows_core::PCWSTR, phlibrary : *mut u32) -> windows_core::HRESULT); - unsafe { DRMLoadLibrary(henv, especification, wszlibraryprovider.param().abi(), wszcredentials.param().abi(), core::mem::transmute(phlibrary)).ok() } + unsafe { DRMLoadLibrary(henv, especification, wszlibraryprovider.param().abi(), wszcredentials.param().abi(), phlibrary as _).ok() } } #[inline] pub unsafe fn DRMParseUnboundLicense(wszcertificate: P0, phqueryroot: *mut u32) -> windows_core::Result<()> @@ -535,7 +482,7 @@ where P0: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMParseUnboundLicense(wszcertificate : windows_core::PCWSTR, phqueryroot : *mut u32) -> windows_core::HRESULT); - unsafe { DRMParseUnboundLicense(wszcertificate.param().abi(), core::mem::transmute(phqueryroot)).ok() } + unsafe { DRMParseUnboundLicense(wszcertificate.param().abi(), phqueryroot as _).ok() } } #[inline] pub unsafe fn DRMRegisterContent(fregister: bool) -> windows_core::Result<()> { @@ -572,7 +519,7 @@ where #[inline] pub unsafe fn DRMSetGlobalOptions(eglobaloptions: DRMGLOBALOPTIONS, pvdata: *mut core::ffi::c_void, dwlen: u32) -> windows_core::Result<()> { windows_targets::link!("msdrm.dll" "system" fn DRMSetGlobalOptions(eglobaloptions : DRMGLOBALOPTIONS, pvdata : *mut core::ffi::c_void, dwlen : u32) -> windows_core::HRESULT); - unsafe { DRMSetGlobalOptions(eglobaloptions, core::mem::transmute(pvdata), dwlen).ok() } + unsafe { DRMSetGlobalOptions(eglobaloptions, pvdata as _, dwlen).ok() } } #[inline] pub unsafe fn DRMSetIntervalTime(hissuancelicense: u32, cdays: u32) -> windows_core::Result<()> { @@ -611,7 +558,7 @@ where P7: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMSetRevocationPoint(hissuancelicense : u32, fdelete : super::super::Foundation:: BOOL, wszid : windows_core::PCWSTR, wszidtype : windows_core::PCWSTR, wszurl : windows_core::PCWSTR, pstfrequency : *mut super::super::Foundation:: SYSTEMTIME, wszname : windows_core::PCWSTR, wszpublickey : windows_core::PCWSTR) -> windows_core::HRESULT); - unsafe { DRMSetRevocationPoint(hissuancelicense, fdelete.into(), wszid.param().abi(), wszidtype.param().abi(), wszurl.param().abi(), core::mem::transmute(pstfrequency), wszname.param().abi(), wszpublickey.param().abi()).ok() } + unsafe { DRMSetRevocationPoint(hissuancelicense, fdelete.into(), wszid.param().abi(), wszidtype.param().abi(), wszurl.param().abi(), pstfrequency as _, wszname.param().abi(), wszpublickey.param().abi()).ok() } } #[inline] pub unsafe fn DRMSetUsagePolicy(hissuancelicense: u32, eusagepolicytype: DRM_USAGEPOLICY_TYPE, fdelete: bool, fexclusion: bool, wszname: P4, wszminversion: P5, wszmaxversion: P6, wszpublickey: P7, wszdigestalgorithm: P8, pbdigest: *mut u8, cbdigest: u32) -> windows_core::Result<()> @@ -623,7 +570,7 @@ where P8: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMSetUsagePolicy(hissuancelicense : u32, eusagepolicytype : DRM_USAGEPOLICY_TYPE, fdelete : super::super::Foundation:: BOOL, fexclusion : super::super::Foundation:: BOOL, wszname : windows_core::PCWSTR, wszminversion : windows_core::PCWSTR, wszmaxversion : windows_core::PCWSTR, wszpublickey : windows_core::PCWSTR, wszdigestalgorithm : windows_core::PCWSTR, pbdigest : *mut u8, cbdigest : u32) -> windows_core::HRESULT); - unsafe { DRMSetUsagePolicy(hissuancelicense, eusagepolicytype, fdelete.into(), fexclusion.into(), wszname.param().abi(), wszminversion.param().abi(), wszmaxversion.param().abi(), wszpublickey.param().abi(), wszdigestalgorithm.param().abi(), core::mem::transmute(pbdigest), cbdigest).ok() } + unsafe { DRMSetUsagePolicy(hissuancelicense, eusagepolicytype, fdelete.into(), fexclusion.into(), wszname.param().abi(), wszminversion.param().abi(), wszmaxversion.param().abi(), wszpublickey.param().abi(), wszdigestalgorithm.param().abi(), pbdigest as _, cbdigest).ok() } } #[inline] 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<()> @@ -631,7 +578,7 @@ 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); - unsafe { 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() } + unsafe { DRMVerify(wszdata.param().abi(), pcattesteddata as _, wszattesteddata.unwrap_or(core::mem::zeroed()) as _, petype as _, pcprincipal as _, wszprincipal.unwrap_or(core::mem::zeroed()) as _, pcmanifest as _, wszmanifest.unwrap_or(core::mem::zeroed()) as _).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 a4aba64e20..3a005dab13 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 @@ -767,13 +767,13 @@ impl IMXNamespaceManager { unsafe { (windows_core::Interface::vtable(self).declarePrefix)(windows_core::Interface::as_raw(self), prefix.param().abi(), namespaceuri.param().abi()).ok() } } pub unsafe fn getDeclaredPrefix(&self, nindex: i32, pwchprefix: windows_core::PWSTR, pcchprefix: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getDeclaredPrefix)(windows_core::Interface::as_raw(self), nindex, core::mem::transmute(pwchprefix), core::mem::transmute(pcchprefix)).ok() } + unsafe { (windows_core::Interface::vtable(self).getDeclaredPrefix)(windows_core::Interface::as_raw(self), nindex, core::mem::transmute(pwchprefix), pcchprefix as _).ok() } } pub unsafe fn getPrefix(&self, pwsznamespaceuri: P0, nindex: i32, pwchprefix: windows_core::PWSTR, pcchprefix: *mut i32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).getPrefix)(windows_core::Interface::as_raw(self), pwsznamespaceuri.param().abi(), nindex, core::mem::transmute(pwchprefix), core::mem::transmute(pcchprefix)).ok() } + unsafe { (windows_core::Interface::vtable(self).getPrefix)(windows_core::Interface::as_raw(self), pwsznamespaceuri.param().abi(), nindex, core::mem::transmute(pwchprefix), pcchprefix as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn getURI(&self, pwchprefix: P0, pcontextnode: P1, pwchuri: windows_core::PWSTR, pcchuri: *mut i32) -> windows_core::Result<()> @@ -781,7 +781,7 @@ impl IMXNamespaceManager { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).getURI)(windows_core::Interface::as_raw(self), pwchprefix.param().abi(), pcontextnode.param().abi(), core::mem::transmute(pwchuri), core::mem::transmute(pcchuri)).ok() } + unsafe { (windows_core::Interface::vtable(self).getURI)(windows_core::Interface::as_raw(self), pwchprefix.param().abi(), pcontextnode.param().abi(), core::mem::transmute(pwchuri), pcchuri as _).ok() } } } #[repr(C)] @@ -1704,16 +1704,16 @@ impl ISAXAttributes { } } pub unsafe fn getURI(&self, nindex: i32, ppwchuri: *mut *mut u16, pcchuri: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getURI)(windows_core::Interface::as_raw(self), nindex, core::mem::transmute(ppwchuri), core::mem::transmute(pcchuri)).ok() } + unsafe { (windows_core::Interface::vtable(self).getURI)(windows_core::Interface::as_raw(self), nindex, ppwchuri as _, pcchuri as _).ok() } } pub unsafe fn getLocalName(&self, nindex: i32, ppwchlocalname: *mut *mut u16, pcchlocalname: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getLocalName)(windows_core::Interface::as_raw(self), nindex, core::mem::transmute(ppwchlocalname), core::mem::transmute(pcchlocalname)).ok() } + unsafe { (windows_core::Interface::vtable(self).getLocalName)(windows_core::Interface::as_raw(self), nindex, ppwchlocalname as _, pcchlocalname as _).ok() } } pub unsafe fn getQName(&self, nindex: i32, ppwchqname: *mut *mut u16, pcchqname: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getQName)(windows_core::Interface::as_raw(self), nindex, core::mem::transmute(ppwchqname), core::mem::transmute(pcchqname)).ok() } + unsafe { (windows_core::Interface::vtable(self).getQName)(windows_core::Interface::as_raw(self), nindex, ppwchqname as _, pcchqname as _).ok() } } pub unsafe fn getName(&self, nindex: i32, ppwchuri: *mut *mut u16, pcchuri: *mut i32, ppwchlocalname: *mut *mut u16, pcchlocalname: *mut i32, ppwchqname: *mut *mut u16, pcchqname: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getName)(windows_core::Interface::as_raw(self), nindex, core::mem::transmute(ppwchuri), core::mem::transmute(pcchuri), core::mem::transmute(ppwchlocalname), core::mem::transmute(pcchlocalname), core::mem::transmute(ppwchqname), core::mem::transmute(pcchqname)).ok() } + unsafe { (windows_core::Interface::vtable(self).getName)(windows_core::Interface::as_raw(self), nindex, ppwchuri as _, pcchuri as _, ppwchlocalname as _, pcchlocalname as _, ppwchqname as _, pcchqname as _).ok() } } pub unsafe fn getIndexFromName(&self, pwchuri: P0, cchuri: i32, pwchlocalname: P2, cchlocalname: i32) -> windows_core::Result where @@ -1735,36 +1735,36 @@ impl ISAXAttributes { } } pub unsafe fn getType(&self, nindex: i32, ppwchtype: *mut *mut u16, pcchtype: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getType)(windows_core::Interface::as_raw(self), nindex, core::mem::transmute(ppwchtype), core::mem::transmute(pcchtype)).ok() } + unsafe { (windows_core::Interface::vtable(self).getType)(windows_core::Interface::as_raw(self), nindex, ppwchtype as _, pcchtype as _).ok() } } pub unsafe fn getTypeFromName(&self, pwchuri: P0, cchuri: i32, pwchlocalname: P2, cchlocalname: i32, ppwchtype: *mut *mut u16, pcchtype: *mut i32) -> windows_core::Result<()> where P0: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).getTypeFromName)(windows_core::Interface::as_raw(self), pwchuri.param().abi(), cchuri, pwchlocalname.param().abi(), cchlocalname, core::mem::transmute(ppwchtype), core::mem::transmute(pcchtype)).ok() } + unsafe { (windows_core::Interface::vtable(self).getTypeFromName)(windows_core::Interface::as_raw(self), pwchuri.param().abi(), cchuri, pwchlocalname.param().abi(), cchlocalname, ppwchtype as _, pcchtype as _).ok() } } pub unsafe fn getTypeFromQName(&self, pwchqname: P0, cchqname: i32, ppwchtype: *mut *mut u16, pcchtype: *mut i32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).getTypeFromQName)(windows_core::Interface::as_raw(self), pwchqname.param().abi(), cchqname, core::mem::transmute(ppwchtype), core::mem::transmute(pcchtype)).ok() } + unsafe { (windows_core::Interface::vtable(self).getTypeFromQName)(windows_core::Interface::as_raw(self), pwchqname.param().abi(), cchqname, ppwchtype as _, pcchtype as _).ok() } } pub unsafe fn getValue(&self, nindex: i32, ppwchvalue: *mut *mut u16, pcchvalue: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getValue)(windows_core::Interface::as_raw(self), nindex, core::mem::transmute(ppwchvalue), core::mem::transmute(pcchvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).getValue)(windows_core::Interface::as_raw(self), nindex, ppwchvalue as _, pcchvalue as _).ok() } } pub unsafe fn getValueFromName(&self, pwchuri: P0, cchuri: i32, pwchlocalname: P2, cchlocalname: i32, ppwchvalue: *mut *mut u16, pcchvalue: *mut i32) -> windows_core::Result<()> where P0: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).getValueFromName)(windows_core::Interface::as_raw(self), pwchuri.param().abi(), cchuri, pwchlocalname.param().abi(), cchlocalname, core::mem::transmute(ppwchvalue), core::mem::transmute(pcchvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).getValueFromName)(windows_core::Interface::as_raw(self), pwchuri.param().abi(), cchuri, pwchlocalname.param().abi(), cchlocalname, ppwchvalue as _, pcchvalue as _).ok() } } pub unsafe fn getValueFromQName(&self, pwchqname: P0, cchqname: i32, ppwchvalue: *mut *mut u16, pcchvalue: *mut i32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).getValueFromQName)(windows_core::Interface::as_raw(self), pwchqname.param().abi(), cchqname, core::mem::transmute(ppwchvalue), core::mem::transmute(pcchvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).getValueFromQName)(windows_core::Interface::as_raw(self), pwchqname.param().abi(), cchqname, ppwchvalue as _, pcchvalue as _).ok() } } } #[repr(C)] @@ -12897,7 +12897,7 @@ impl IXMLHTTPRequest2 { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetCookie)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), pwszname.param().abi(), dwflags, core::mem::transmute(pccookies), core::mem::transmute(ppcookies)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCookie)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), pwszname.param().abi(), dwflags, pccookies as _, ppcookies as _).ok() } } pub unsafe fn GetResponseHeader(&self, pwszheader: P0) -> windows_core::Result<*mut u16> where 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 ec244ffbd3..38452d810a 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 @@ -5,7 +5,7 @@ where P2: windows_core::Param, { windows_targets::link!("xmllite.dll" "system" fn CreateXmlReader(riid : *const windows_core::GUID, ppvobject : *mut *mut core::ffi::c_void, pmalloc : * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { CreateXmlReader(riid, core::mem::transmute(ppvobject), pmalloc.param().abi()).ok() } + unsafe { CreateXmlReader(riid, ppvobject as _, pmalloc.param().abi()).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -43,7 +43,7 @@ where P2: windows_core::Param, { windows_targets::link!("xmllite.dll" "system" fn CreateXmlWriter(riid : *const windows_core::GUID, ppvobject : *mut *mut core::ffi::c_void, pmalloc : * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { CreateXmlWriter(riid, core::mem::transmute(ppvobject), pmalloc.param().abi()).ok() } + unsafe { CreateXmlWriter(riid, ppvobject as _, pmalloc.param().abi()).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -93,10 +93,10 @@ impl IXmlReader { } } pub unsafe fn SetProperty(&self, nproperty: u32, pvalue: Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetProperty)(windows_core::Interface::as_raw(self), nproperty, core::mem::transmute(pvalue.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetProperty)(windows_core::Interface::as_raw(self), nproperty, pvalue.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Read(&self, pnodetype: Option<*mut XmlNodeType>) -> windows_core::HRESULT { - unsafe { (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), core::mem::transmute(pnodetype.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), pnodetype.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn GetNodeType(&self) -> windows_core::Result { unsafe { @@ -121,25 +121,25 @@ impl IXmlReader { unsafe { (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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetQualifiedName)(windows_core::Interface::as_raw(self), ppwszqualifiedname as _, pcwchqualifiedname.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetNamespaceUri(&self, ppwsznamespaceuri: *mut windows_core::PCWSTR, pcwchnamespaceuri: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetNamespaceUri)(windows_core::Interface::as_raw(self), ppwsznamespaceuri as _, pcwchnamespaceuri.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetLocalName(&self, ppwszlocalname: *mut windows_core::PCWSTR, pcwchlocalname: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetLocalName)(windows_core::Interface::as_raw(self), ppwszlocalname as _, pcwchlocalname.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetPrefix(&self, ppwszprefix: *mut windows_core::PCWSTR, pcwchprefix: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetPrefix)(windows_core::Interface::as_raw(self), ppwszprefix as _, pcwchprefix.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetValue(&self, ppwszvalue: *mut windows_core::PCWSTR, pcwchvalue: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetValue)(windows_core::Interface::as_raw(self), ppwszvalue as _, pcwchvalue.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReadValueChunk(&self, pwchbuffer: &mut [u16], pcwchread: *mut u32) -> windows_core::HRESULT { - unsafe { (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)) } + unsafe { (windows_core::Interface::vtable(self).ReadValueChunk)(windows_core::Interface::as_raw(self), core::mem::transmute(pwchbuffer.as_ptr()), pwchbuffer.len().try_into().unwrap(), pcwchread as _) } } pub unsafe fn GetBaseUri(&self, ppwszbaseuri: *mut windows_core::PCWSTR, pcwchbaseuri: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetBaseUri)(windows_core::Interface::as_raw(self), ppwszbaseuri as _, pcwchbaseuri.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn IsDefault(&self) -> super::super::super::Foundation::BOOL { unsafe { (windows_core::Interface::vtable(self).IsDefault)(windows_core::Interface::as_raw(self)) } @@ -495,7 +495,7 @@ impl IXmlWriter { } } pub unsafe fn SetProperty(&self, nproperty: u32, pvalue: Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetProperty)(windows_core::Interface::as_raw(self), nproperty, core::mem::transmute(pvalue.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetProperty)(windows_core::Interface::as_raw(self), nproperty, pvalue.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn WriteAttributes(&self, preader: P0, fwritedefaultattributes: bool) -> windows_core::Result<()> where @@ -940,7 +940,7 @@ impl IXmlWriterLite { } } pub unsafe fn SetProperty(&self, nproperty: u32, pvalue: Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetProperty)(windows_core::Interface::as_raw(self), nproperty, core::mem::transmute(pvalue.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetProperty)(windows_core::Interface::as_raw(self), nproperty, pvalue.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn WriteAttributes(&self, preader: P0, fwritedefaultattributes: bool) -> 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 8af4cad971..03b705b044 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/AllJoyn/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/AllJoyn/mod.rs @@ -21,12 +21,12 @@ 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); - unsafe { AllJoynCreateBus(outbuffersize, inbuffersize, core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed()))) } + unsafe { AllJoynCreateBus(outbuffersize, inbuffersize, lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { AllJoynEnumEvents(connectedbushandle, core::mem::transmute(eventtoreset.unwrap_or(core::mem::zeroed())), core::mem::transmute(eventtypes)).ok() } + unsafe { AllJoynEnumEvents(connectedbushandle, eventtoreset.unwrap_or(core::mem::zeroed()) as _, eventtypes as _).ok() } } #[inline] pub unsafe fn AllJoynEventSelect(connectedbushandle: super::super::Foundation::HANDLE, eventhandle: super::super::Foundation::HANDLE, eventtypes: u32) -> windows_core::Result<()> { @@ -36,12 +36,12 @@ pub unsafe fn AllJoynEventSelect(connectedbushandle: super::super::Foundation::H #[inline] 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); - unsafe { AllJoynReceiveFromBus(connectedbushandle, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), bytestoread, core::mem::transmute(bytestransferred.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved)).ok() } + unsafe { AllJoynReceiveFromBus(connectedbushandle, buffer.unwrap_or(core::mem::zeroed()) as _, bytestoread, bytestransferred.unwrap_or(core::mem::zeroed()) as _, reserved as _).ok() } } #[inline] 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); - unsafe { AllJoynSendToBus(connectedbushandle, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), bytestowrite, core::mem::transmute(bytestransferred.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved)).ok() } + unsafe { AllJoynSendToBus(connectedbushandle, buffer.unwrap_or(core::mem::zeroed()) as _, bytestowrite, bytestransferred.unwrap_or(core::mem::zeroed()) as _, reserved as _).ok() } } #[inline] pub unsafe fn QCC_StatusText(status: QStatus) -> windows_core::PCSTR { @@ -101,7 +101,7 @@ where #[inline] 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); - unsafe { alljoyn_aboutdata_getajsoftwareversion(data, core::mem::transmute(ajsoftwareversion)) } + unsafe { alljoyn_aboutdata_getajsoftwareversion(data, ajsoftwareversion as _) } } #[inline] pub unsafe fn alljoyn_aboutdata_getannouncedaboutdata(data: alljoyn_aboutdata, msgarg: alljoyn_msgarg) -> QStatus { @@ -111,7 +111,7 @@ pub unsafe fn alljoyn_aboutdata_getannouncedaboutdata(data: alljoyn_aboutdata, m #[inline] 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); - unsafe { alljoyn_aboutdata_getappid(data, core::mem::transmute(appid), core::mem::transmute(num)) } + unsafe { alljoyn_aboutdata_getappid(data, appid as _, num as _) } } #[inline] pub unsafe fn alljoyn_aboutdata_getappname(data: alljoyn_aboutdata, appname: *mut *mut i8, language: P2) -> QStatus @@ -119,17 +119,17 @@ where 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); - unsafe { alljoyn_aboutdata_getappname(data, core::mem::transmute(appname), language.param().abi()) } + unsafe { alljoyn_aboutdata_getappname(data, appname as _, language.param().abi()) } } #[inline] 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); - unsafe { alljoyn_aboutdata_getdateofmanufacture(data, core::mem::transmute(dateofmanufacture)) } + unsafe { alljoyn_aboutdata_getdateofmanufacture(data, dateofmanufacture as _) } } #[inline] 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); - unsafe { alljoyn_aboutdata_getdefaultlanguage(data, core::mem::transmute(defaultlanguage)) } + unsafe { alljoyn_aboutdata_getdefaultlanguage(data, defaultlanguage as _) } } #[inline] pub unsafe fn alljoyn_aboutdata_getdescription(data: alljoyn_aboutdata, description: *mut *mut i8, language: P2) -> QStatus @@ -137,12 +137,12 @@ where 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); - unsafe { alljoyn_aboutdata_getdescription(data, core::mem::transmute(description), language.param().abi()) } + unsafe { alljoyn_aboutdata_getdescription(data, description as _, language.param().abi()) } } #[inline] 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); - unsafe { alljoyn_aboutdata_getdeviceid(data, core::mem::transmute(deviceid)) } + unsafe { alljoyn_aboutdata_getdeviceid(data, deviceid as _) } } #[inline] pub unsafe fn alljoyn_aboutdata_getdevicename(data: alljoyn_aboutdata, devicename: *mut *mut i8, language: P2) -> QStatus @@ -150,7 +150,7 @@ where 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); - unsafe { alljoyn_aboutdata_getdevicename(data, core::mem::transmute(devicename), language.param().abi()) } + unsafe { alljoyn_aboutdata_getdevicename(data, devicename as _, language.param().abi()) } } #[inline] pub unsafe fn alljoyn_aboutdata_getfield(data: alljoyn_aboutdata, name: P1, value: *mut alljoyn_msgarg, language: P3) -> QStatus @@ -159,7 +159,7 @@ where 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); - unsafe { alljoyn_aboutdata_getfield(data, name.param().abi(), core::mem::transmute(value), language.param().abi()) } + unsafe { alljoyn_aboutdata_getfield(data, name.param().abi(), value as _, language.param().abi()) } } #[inline] pub unsafe fn alljoyn_aboutdata_getfields(data: alljoyn_aboutdata, fields: *const *const i8, num_fields: usize) -> usize { @@ -177,7 +177,7 @@ where #[inline] 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); - unsafe { alljoyn_aboutdata_gethardwareversion(data, core::mem::transmute(hardwareversion)) } + unsafe { alljoyn_aboutdata_gethardwareversion(data, hardwareversion as _) } } #[inline] pub unsafe fn alljoyn_aboutdata_getmanufacturer(data: alljoyn_aboutdata, manufacturer: *mut *mut i8, language: P2) -> QStatus @@ -185,17 +185,17 @@ where 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); - unsafe { alljoyn_aboutdata_getmanufacturer(data, core::mem::transmute(manufacturer), language.param().abi()) } + unsafe { alljoyn_aboutdata_getmanufacturer(data, manufacturer as _, language.param().abi()) } } #[inline] 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); - unsafe { alljoyn_aboutdata_getmodelnumber(data, core::mem::transmute(modelnumber)) } + unsafe { alljoyn_aboutdata_getmodelnumber(data, modelnumber as _) } } #[inline] 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); - unsafe { alljoyn_aboutdata_getsoftwareversion(data, core::mem::transmute(softwareversion)) } + unsafe { alljoyn_aboutdata_getsoftwareversion(data, softwareversion as _) } } #[inline] pub unsafe fn alljoyn_aboutdata_getsupportedlanguages(data: alljoyn_aboutdata, languagetags: *const *const i8, num: usize) -> usize { @@ -205,7 +205,7 @@ pub unsafe fn alljoyn_aboutdata_getsupportedlanguages(data: alljoyn_aboutdata, l #[inline] 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); - unsafe { alljoyn_aboutdata_getsupporturl(data, core::mem::transmute(supporturl)) } + unsafe { alljoyn_aboutdata_getsupporturl(data, supporturl as _) } } #[inline] pub unsafe fn alljoyn_aboutdata_isfieldannounced(data: alljoyn_aboutdata, fieldname: P1) -> u8 @@ -389,7 +389,7 @@ pub unsafe fn alljoyn_abouticon_destroy(icon: alljoyn_abouticon) { #[inline] 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)); - unsafe { alljoyn_abouticon_getcontent(icon, data, core::mem::transmute(size)) } + unsafe { alljoyn_abouticon_getcontent(icon, data, size as _) } } #[inline] pub unsafe fn alljoyn_abouticon_geturl(icon: alljoyn_abouticon, r#type: *const *const i8, url: *const *const i8) { @@ -402,7 +402,7 @@ where 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); - unsafe { alljoyn_abouticon_setcontent(icon, r#type.param().abi(), core::mem::transmute(data), csize, ownsdata) } + unsafe { alljoyn_abouticon_setcontent(icon, r#type.param().abi(), data as _, csize, ownsdata) } } #[inline] pub unsafe fn alljoyn_abouticon_setcontent_frommsgarg(icon: alljoyn_abouticon, arg: alljoyn_msgarg) -> QStatus { @@ -449,7 +449,7 @@ pub unsafe fn alljoyn_abouticonproxy_geticon(proxy: alljoyn_abouticonproxy, icon #[inline] 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); - unsafe { alljoyn_abouticonproxy_getversion(proxy, core::mem::transmute(version)) } + unsafe { alljoyn_abouticonproxy_getversion(proxy, version as _) } } #[inline] pub unsafe fn alljoyn_aboutlistener_create(callback: *const alljoyn_aboutlistener_callback, context: *const core::ffi::c_void) -> alljoyn_aboutlistener { @@ -591,12 +591,12 @@ pub unsafe fn alljoyn_aboutproxy_getobjectdescription(proxy: alljoyn_aboutproxy, #[inline] 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); - unsafe { alljoyn_aboutproxy_getversion(proxy, core::mem::transmute(version)) } + unsafe { alljoyn_aboutproxy_getversion(proxy, version as _) } } #[inline] pub unsafe fn alljoyn_applicationstatelistener_create(callbacks: *const alljoyn_applicationstatelistener_callbacks, context: *mut core::ffi::c_void) -> alljoyn_applicationstatelistener { windows_targets::link!("msajapi.dll" "system" fn alljoyn_applicationstatelistener_create(callbacks : *const alljoyn_applicationstatelistener_callbacks, context : *mut core::ffi::c_void) -> alljoyn_applicationstatelistener); - unsafe { alljoyn_applicationstatelistener_create(callbacks, core::mem::transmute(context)) } + unsafe { alljoyn_applicationstatelistener_create(callbacks, context as _) } } #[inline] pub unsafe fn alljoyn_applicationstatelistener_destroy(listener: alljoyn_applicationstatelistener) { @@ -616,7 +616,7 @@ pub unsafe fn alljoyn_authlistener_destroy(listener: alljoyn_authlistener) { #[inline] 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); - unsafe { alljoyn_authlistener_requestcredentialsresponse(listener, core::mem::transmute(authcontext), accept, credentials) } + unsafe { alljoyn_authlistener_requestcredentialsresponse(listener, authcontext as _, accept, credentials) } } #[inline] pub unsafe fn alljoyn_authlistener_setsharedsecret(listener: alljoyn_authlistener, sharedsecret: *const u8, sharedsecretsize: usize) -> QStatus { @@ -626,7 +626,7 @@ pub unsafe fn alljoyn_authlistener_setsharedsecret(listener: alljoyn_authlistene #[inline] 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); - unsafe { alljoyn_authlistener_verifycredentialsresponse(listener, core::mem::transmute(authcontext), accept) } + unsafe { alljoyn_authlistener_verifycredentialsresponse(listener, authcontext as _, accept) } } #[inline] pub unsafe fn alljoyn_authlistenerasync_create(callbacks: *const alljoyn_authlistenerasync_callbacks, context: *const core::ffi::c_void) -> alljoyn_authlistener { @@ -729,7 +729,7 @@ where #[inline] 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); - unsafe { alljoyn_busattachment_bindsessionport(bus, core::mem::transmute(sessionport), opts, listener) } + unsafe { alljoyn_busattachment_bindsessionport(bus, sessionport as _, opts, listener) } } #[inline] pub unsafe fn alljoyn_busattachment_canceladvertisename(bus: alljoyn_busattachment, name: P1, transports: u16) -> QStatus @@ -811,7 +811,7 @@ where 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); - unsafe { alljoyn_busattachment_createinterface(bus, name.param().abi(), core::mem::transmute(iface)) } + unsafe { alljoyn_busattachment_createinterface(bus, name.param().abi(), iface as _) } } #[inline] pub unsafe fn alljoyn_busattachment_createinterface_secure(bus: alljoyn_busattachment, name: P1, iface: *mut alljoyn_interfacedescription, secpolicy: alljoyn_interfacedescription_securitypolicy) -> QStatus @@ -819,7 +819,7 @@ where 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); - unsafe { alljoyn_busattachment_createinterface_secure(bus, name.param().abi(), core::mem::transmute(iface), secpolicy) } + unsafe { alljoyn_busattachment_createinterface_secure(bus, name.param().abi(), iface as _, secpolicy) } } #[inline] pub unsafe fn alljoyn_busattachment_createinterfacesfromxml(bus: alljoyn_busattachment, xml: P1) -> QStatus @@ -943,7 +943,7 @@ where 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); - unsafe { alljoyn_busattachment_getkeyexpiration(bus, guid.param().abi(), core::mem::transmute(timeout)) } + unsafe { alljoyn_busattachment_getkeyexpiration(bus, guid.param().abi(), timeout as _) } } #[inline] pub unsafe fn alljoyn_busattachment_getpeerguid(bus: alljoyn_busattachment, name: P1, guid: P2, guidsz: *mut usize) -> QStatus @@ -952,7 +952,7 @@ where 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); - unsafe { alljoyn_busattachment_getpeerguid(bus, name.param().abi(), guid.param().abi(), core::mem::transmute(guidsz)) } + unsafe { alljoyn_busattachment_getpeerguid(bus, name.param().abi(), guid.param().abi(), guidsz as _) } } #[inline] pub unsafe fn alljoyn_busattachment_getpermissionconfigurator(bus: alljoyn_busattachment) -> alljoyn_permissionconfigurator { @@ -1000,7 +1000,7 @@ where P1: 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); - unsafe { alljoyn_busattachment_joinsession(bus, sessionhost.param().abi(), sessionport, listener, core::mem::transmute(sessionid), opts) } + unsafe { alljoyn_busattachment_joinsession(bus, sessionhost.param().abi(), sessionport, listener, sessionid as _, opts) } } #[inline] 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 @@ -1008,7 +1008,7 @@ where P1: 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); - unsafe { alljoyn_busattachment_joinsessionasync(bus, sessionhost.param().abi(), sessionport, listener, opts, callback, core::mem::transmute(context)) } + unsafe { alljoyn_busattachment_joinsessionasync(bus, sessionhost.param().abi(), sessionport, listener, opts, callback, context as _) } } #[inline] pub unsafe fn alljoyn_busattachment_leavesession(bus: alljoyn_busattachment, sessionid: u32) -> QStatus { @@ -1021,7 +1021,7 @@ where 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); - unsafe { alljoyn_busattachment_namehasowner(bus, name.param().abi(), core::mem::transmute(hasowner)) } + unsafe { alljoyn_busattachment_namehasowner(bus, name.param().abi(), hasowner as _) } } #[inline] pub unsafe fn alljoyn_busattachment_ping(bus: alljoyn_busattachment, name: P1, timeout: u32) -> QStatus @@ -1149,12 +1149,12 @@ where #[inline] 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); - unsafe { alljoyn_busattachment_setlinktimeout(bus, sessionid, core::mem::transmute(linktimeout)) } + unsafe { alljoyn_busattachment_setlinktimeout(bus, sessionid, linktimeout as _) } } #[inline] 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); - unsafe { alljoyn_busattachment_setlinktimeoutasync(bus, sessionid, linktimeout, callback, core::mem::transmute(context)) } + unsafe { alljoyn_busattachment_setlinktimeoutasync(bus, sessionid, linktimeout, callback, context as _) } } #[inline] pub unsafe fn alljoyn_busattachment_setsessionlistener(bus: alljoyn_busattachment, sessionid: u32, listener: alljoyn_sessionlistener) -> QStatus { @@ -1258,7 +1258,7 @@ pub unsafe fn alljoyn_busobject_addinterface_announced(bus: alljoyn_busobject, i #[inline] 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); - unsafe { alljoyn_busobject_addmethodhandler(bus, core::mem::transmute(member), handler, core::mem::transmute(context)) } + unsafe { alljoyn_busobject_addmethodhandler(bus, core::mem::transmute(member), handler, context as _) } } #[inline] pub unsafe fn alljoyn_busobject_addmethodhandlers(bus: alljoyn_busobject, entries: *const alljoyn_busobject_methodentry, numentries: usize) -> QStatus { @@ -1580,7 +1580,7 @@ where 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); - unsafe { alljoyn_interfacedescription_getannotation(iface, name.param().abi(), value.param().abi(), core::mem::transmute(value_size)) } + unsafe { alljoyn_interfacedescription_getannotation(iface, name.param().abi(), value.param().abi(), value_size as _) } } #[inline] pub unsafe fn alljoyn_interfacedescription_getannotationatindex(iface: alljoyn_interfacedescription, index: usize, name: P2, name_size: *mut usize, value: P4, value_size: *mut usize) @@ -1589,7 +1589,7 @@ where 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)); - unsafe { alljoyn_interfacedescription_getannotationatindex(iface, index, name.param().abi(), core::mem::transmute(name_size), value.param().abi(), core::mem::transmute(value_size)) } + unsafe { alljoyn_interfacedescription_getannotationatindex(iface, index, name.param().abi(), name_size as _, value.param().abi(), value_size as _) } } #[inline] pub unsafe fn alljoyn_interfacedescription_getannotationscount(iface: alljoyn_interfacedescription) -> usize { @@ -1640,7 +1640,7 @@ where 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); - unsafe { alljoyn_interfacedescription_getmember(iface, name.param().abi(), core::mem::transmute(member)) } + unsafe { alljoyn_interfacedescription_getmember(iface, name.param().abi(), member as _) } } #[inline] pub unsafe fn alljoyn_interfacedescription_getmemberannotation(iface: alljoyn_interfacedescription, member: P1, name: P2, value: P3, value_size: *mut usize) -> i32 @@ -1650,7 +1650,7 @@ where 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); - unsafe { alljoyn_interfacedescription_getmemberannotation(iface, member.param().abi(), name.param().abi(), value.param().abi(), core::mem::transmute(value_size)) } + unsafe { alljoyn_interfacedescription_getmemberannotation(iface, member.param().abi(), name.param().abi(), value.param().abi(), value_size as _) } } #[inline] pub unsafe fn alljoyn_interfacedescription_getmemberargannotation(iface: alljoyn_interfacedescription, member: P1, argname: P2, name: P3, value: P4, value_size: *mut usize) -> i32 @@ -1661,7 +1661,7 @@ where 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); - unsafe { alljoyn_interfacedescription_getmemberargannotation(iface, member.param().abi(), argname.param().abi(), name.param().abi(), value.param().abi(), core::mem::transmute(value_size)) } + unsafe { alljoyn_interfacedescription_getmemberargannotation(iface, member.param().abi(), argname.param().abi(), name.param().abi(), value.param().abi(), value_size as _) } } #[inline] pub unsafe fn alljoyn_interfacedescription_getmemberdescriptionforlanguage(iface: alljoyn_interfacedescription, member: P1, description: P2, maxlanguagelength: usize, languagetag: P4) -> usize @@ -1676,7 +1676,7 @@ where #[inline] 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); - unsafe { alljoyn_interfacedescription_getmembers(iface, core::mem::transmute(members), nummembers) } + unsafe { alljoyn_interfacedescription_getmembers(iface, members as _, nummembers) } } #[inline] pub unsafe fn alljoyn_interfacedescription_getmethod(iface: alljoyn_interfacedescription, name: P1, member: *mut alljoyn_interfacedescription_member) -> i32 @@ -1684,7 +1684,7 @@ where 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); - unsafe { alljoyn_interfacedescription_getmethod(iface, name.param().abi(), core::mem::transmute(member)) } + unsafe { alljoyn_interfacedescription_getmethod(iface, name.param().abi(), member as _) } } #[inline] pub unsafe fn alljoyn_interfacedescription_getname(iface: alljoyn_interfacedescription) -> windows_core::PCSTR { @@ -1694,7 +1694,7 @@ pub unsafe fn alljoyn_interfacedescription_getname(iface: alljoyn_interfacedescr #[inline] 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); - unsafe { alljoyn_interfacedescription_getproperties(iface, core::mem::transmute(props), numprops) } + unsafe { alljoyn_interfacedescription_getproperties(iface, props as _, numprops) } } #[inline] pub unsafe fn alljoyn_interfacedescription_getproperty(iface: alljoyn_interfacedescription, name: P1, property: *mut alljoyn_interfacedescription_property) -> i32 @@ -1702,7 +1702,7 @@ where 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); - unsafe { alljoyn_interfacedescription_getproperty(iface, name.param().abi(), core::mem::transmute(property)) } + unsafe { alljoyn_interfacedescription_getproperty(iface, name.param().abi(), property as _) } } #[inline] pub unsafe fn alljoyn_interfacedescription_getpropertyannotation(iface: alljoyn_interfacedescription, property: P1, name: P2, value: P3, str_size: *mut usize) -> i32 @@ -1712,7 +1712,7 @@ where 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); - unsafe { alljoyn_interfacedescription_getpropertyannotation(iface, property.param().abi(), name.param().abi(), value.param().abi(), core::mem::transmute(str_size)) } + unsafe { alljoyn_interfacedescription_getpropertyannotation(iface, property.param().abi(), name.param().abi(), value.param().abi(), str_size as _) } } #[inline] pub unsafe fn alljoyn_interfacedescription_getpropertydescriptionforlanguage(iface: alljoyn_interfacedescription, property: P1, description: P2, maxlanguagelength: usize, languagetag: P4) -> usize @@ -1735,7 +1735,7 @@ where 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); - unsafe { alljoyn_interfacedescription_getsignal(iface, name.param().abi(), core::mem::transmute(member)) } + unsafe { alljoyn_interfacedescription_getsignal(iface, name.param().abi(), member as _) } } #[inline] pub unsafe fn alljoyn_interfacedescription_hasdescription(iface: alljoyn_interfacedescription) -> i32 { @@ -1790,7 +1790,7 @@ where P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_member_getannotation(member : alljoyn_interfacedescription_member, name : windows_core::PCSTR, value : windows_core::PCSTR, value_size : *mut usize) -> i32); - unsafe { alljoyn_interfacedescription_member_getannotation(core::mem::transmute(member), name.param().abi(), value.param().abi(), core::mem::transmute(value_size)) } + unsafe { alljoyn_interfacedescription_member_getannotation(core::mem::transmute(member), name.param().abi(), value.param().abi(), value_size as _) } } #[inline] pub unsafe fn alljoyn_interfacedescription_member_getannotationatindex(member: alljoyn_interfacedescription_member, index: usize, name: P2, name_size: *mut usize, value: P4, value_size: *mut usize) @@ -1799,7 +1799,7 @@ where P4: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_member_getannotationatindex(member : alljoyn_interfacedescription_member, index : usize, name : windows_core::PCSTR, name_size : *mut usize, value : windows_core::PCSTR, value_size : *mut usize)); - unsafe { alljoyn_interfacedescription_member_getannotationatindex(core::mem::transmute(member), index, name.param().abi(), core::mem::transmute(name_size), value.param().abi(), core::mem::transmute(value_size)) } + unsafe { alljoyn_interfacedescription_member_getannotationatindex(core::mem::transmute(member), index, name.param().abi(), name_size as _, value.param().abi(), value_size as _) } } #[inline] pub unsafe fn alljoyn_interfacedescription_member_getannotationscount(member: alljoyn_interfacedescription_member) -> usize { @@ -1814,7 +1814,7 @@ where P3: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_member_getargannotation(member : alljoyn_interfacedescription_member, argname : windows_core::PCSTR, name : windows_core::PCSTR, value : windows_core::PCSTR, value_size : *mut usize) -> i32); - unsafe { alljoyn_interfacedescription_member_getargannotation(core::mem::transmute(member), argname.param().abi(), name.param().abi(), value.param().abi(), core::mem::transmute(value_size)) } + unsafe { alljoyn_interfacedescription_member_getargannotation(core::mem::transmute(member), argname.param().abi(), name.param().abi(), value.param().abi(), value_size as _) } } #[inline] pub unsafe fn alljoyn_interfacedescription_member_getargannotationatindex(member: alljoyn_interfacedescription_member, argname: P1, index: usize, name: P3, name_size: *mut usize, value: P5, value_size: *mut usize) @@ -1824,7 +1824,7 @@ where P5: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_member_getargannotationatindex(member : alljoyn_interfacedescription_member, argname : windows_core::PCSTR, index : usize, name : windows_core::PCSTR, name_size : *mut usize, value : windows_core::PCSTR, value_size : *mut usize)); - unsafe { alljoyn_interfacedescription_member_getargannotationatindex(core::mem::transmute(member), argname.param().abi(), index, name.param().abi(), core::mem::transmute(name_size), value.param().abi(), core::mem::transmute(value_size)) } + unsafe { alljoyn_interfacedescription_member_getargannotationatindex(core::mem::transmute(member), argname.param().abi(), index, name.param().abi(), name_size as _, value.param().abi(), value_size as _) } } #[inline] pub unsafe fn alljoyn_interfacedescription_member_getargannotationscount(member: alljoyn_interfacedescription_member, argname: P1) -> usize @@ -1846,7 +1846,7 @@ where P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_property_getannotation(property : alljoyn_interfacedescription_property, name : windows_core::PCSTR, value : windows_core::PCSTR, value_size : *mut usize) -> i32); - unsafe { alljoyn_interfacedescription_property_getannotation(core::mem::transmute(property), name.param().abi(), value.param().abi(), core::mem::transmute(value_size)) } + unsafe { alljoyn_interfacedescription_property_getannotation(core::mem::transmute(property), name.param().abi(), value.param().abi(), value_size as _) } } #[inline] pub unsafe fn alljoyn_interfacedescription_property_getannotationatindex(property: alljoyn_interfacedescription_property, index: usize, name: P2, name_size: *mut usize, value: P4, value_size: *mut usize) @@ -1855,7 +1855,7 @@ where P4: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_property_getannotationatindex(property : alljoyn_interfacedescription_property, index : usize, name : windows_core::PCSTR, name_size : *mut usize, value : windows_core::PCSTR, value_size : *mut usize)); - unsafe { alljoyn_interfacedescription_property_getannotationatindex(core::mem::transmute(property), index, name.param().abi(), core::mem::transmute(name_size), value.param().abi(), core::mem::transmute(value_size)) } + unsafe { alljoyn_interfacedescription_property_getannotationatindex(core::mem::transmute(property), index, name.param().abi(), name_size as _, value.param().abi(), value_size as _) } } #[inline] pub unsafe fn alljoyn_interfacedescription_property_getannotationscount(property: alljoyn_interfacedescription_property) -> usize { @@ -1967,7 +1967,7 @@ where 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); - unsafe { alljoyn_keystorelistener_getkeys(listener, keystore, sink.param().abi(), core::mem::transmute(sink_sz)) } + unsafe { alljoyn_keystorelistener_getkeys(listener, keystore, sink.param().abi(), sink_sz as _) } } #[inline] pub unsafe fn alljoyn_keystorelistener_putkeys(listener: alljoyn_keystorelistener, keystore: alljoyn_keystore, source: P2, password: P3) -> QStatus @@ -1981,7 +1981,7 @@ where #[inline] pub unsafe fn alljoyn_keystorelistener_with_synchronization_create(callbacks: *const alljoyn_keystorelistener_with_synchronization_callbacks, context: *mut core::ffi::c_void) -> alljoyn_keystorelistener { windows_targets::link!("msajapi.dll" "system" fn alljoyn_keystorelistener_with_synchronization_create(callbacks : *const alljoyn_keystorelistener_with_synchronization_callbacks, context : *mut core::ffi::c_void) -> alljoyn_keystorelistener); - unsafe { alljoyn_keystorelistener_with_synchronization_create(callbacks, core::mem::transmute(context)) } + unsafe { alljoyn_keystorelistener_with_synchronization_create(callbacks, context as _) } } #[inline] pub unsafe fn alljoyn_message_create(bus: alljoyn_busattachment) -> alljoyn_message { @@ -2014,7 +2014,7 @@ pub unsafe fn alljoyn_message_getarg(msg: alljoyn_message, argn: usize) -> alljo #[inline] 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)); - unsafe { alljoyn_message_getargs(msg, core::mem::transmute(numargs), core::mem::transmute(args)) } + unsafe { alljoyn_message_getargs(msg, numargs as _, args as _) } } #[inline] pub unsafe fn alljoyn_message_getauthmechanism(msg: alljoyn_message) -> windows_core::PCSTR { @@ -2042,7 +2042,7 @@ where 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); - unsafe { alljoyn_message_geterrorname(msg, errormessage.param().abi(), core::mem::transmute(errormessage_size)) } + unsafe { alljoyn_message_geterrorname(msg, errormessage.param().abi(), errormessage_size as _) } } #[inline] pub unsafe fn alljoyn_message_getflags(msg: alljoyn_message) -> u8 { @@ -2112,7 +2112,7 @@ pub unsafe fn alljoyn_message_isencrypted(msg: alljoyn_message) -> i32 { #[inline] 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); - unsafe { alljoyn_message_isexpired(msg, core::mem::transmute(tillexpirems)) } + unsafe { alljoyn_message_isexpired(msg, tillexpirems as _) } } #[inline] pub unsafe fn alljoyn_message_isglobalbroadcast(msg: alljoyn_message) -> i32 { @@ -2174,7 +2174,7 @@ where 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); - unsafe { alljoyn_msgarg_array_set(args, core::mem::transmute(numargs), signature.param().abi()) } + unsafe { alljoyn_msgarg_array_set(args, numargs as _, signature.param().abi()) } } #[inline] pub unsafe fn alljoyn_msgarg_array_set_offset(args: alljoyn_msgarg, argoffset: usize, numargs: *mut usize, signature: P3) -> QStatus @@ -2182,7 +2182,7 @@ where 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); - unsafe { alljoyn_msgarg_array_set_offset(args, argoffset, core::mem::transmute(numargs), signature.param().abi()) } + unsafe { alljoyn_msgarg_array_set_offset(args, argoffset, numargs as _, signature.param().abi()) } } #[inline] pub unsafe fn alljoyn_msgarg_array_signature(values: alljoyn_msgarg, numvalues: usize, str: P2, buf: usize) -> usize @@ -2249,7 +2249,7 @@ where #[inline] 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)); - unsafe { alljoyn_msgarg_get_array_element(arg, index, core::mem::transmute(element)) } + unsafe { alljoyn_msgarg_get_array_element(arg, index, element as _) } } #[inline] pub unsafe fn alljoyn_msgarg_get_array_elementsignature(arg: alljoyn_msgarg, index: usize) -> windows_core::PCSTR { @@ -2264,107 +2264,107 @@ pub unsafe fn alljoyn_msgarg_get_array_numberofelements(arg: alljoyn_msgarg) -> #[inline] 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); - unsafe { alljoyn_msgarg_get_bool(arg, core::mem::transmute(b)) } + unsafe { alljoyn_msgarg_get_bool(arg, b as _) } } #[inline] 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); - unsafe { alljoyn_msgarg_get_bool_array(arg, core::mem::transmute(length), core::mem::transmute(ab)) } + unsafe { alljoyn_msgarg_get_bool_array(arg, length as _, ab as _) } } #[inline] 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); - unsafe { alljoyn_msgarg_get_double(arg, core::mem::transmute(d)) } + unsafe { alljoyn_msgarg_get_double(arg, d as _) } } #[inline] 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); - unsafe { alljoyn_msgarg_get_double_array(arg, core::mem::transmute(length), core::mem::transmute(ad)) } + unsafe { alljoyn_msgarg_get_double_array(arg, length as _, ad as _) } } #[inline] 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); - unsafe { alljoyn_msgarg_get_int16(arg, core::mem::transmute(n)) } + unsafe { alljoyn_msgarg_get_int16(arg, n as _) } } #[inline] 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); - unsafe { alljoyn_msgarg_get_int16_array(arg, core::mem::transmute(length), core::mem::transmute(an)) } + unsafe { alljoyn_msgarg_get_int16_array(arg, length as _, an as _) } } #[inline] 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); - unsafe { alljoyn_msgarg_get_int32(arg, core::mem::transmute(i)) } + unsafe { alljoyn_msgarg_get_int32(arg, i as _) } } #[inline] 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); - unsafe { alljoyn_msgarg_get_int32_array(arg, core::mem::transmute(length), core::mem::transmute(ai)) } + unsafe { alljoyn_msgarg_get_int32_array(arg, length as _, ai as _) } } #[inline] 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); - unsafe { alljoyn_msgarg_get_int64(arg, core::mem::transmute(x)) } + unsafe { alljoyn_msgarg_get_int64(arg, x as _) } } #[inline] 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); - unsafe { alljoyn_msgarg_get_int64_array(arg, core::mem::transmute(length), core::mem::transmute(ax)) } + unsafe { alljoyn_msgarg_get_int64_array(arg, length as _, ax as _) } } #[inline] 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); - unsafe { alljoyn_msgarg_get_objectpath(arg, core::mem::transmute(o)) } + unsafe { alljoyn_msgarg_get_objectpath(arg, o as _) } } #[inline] 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); - unsafe { alljoyn_msgarg_get_signature(arg, core::mem::transmute(g)) } + unsafe { alljoyn_msgarg_get_signature(arg, g as _) } } #[inline] 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); - unsafe { alljoyn_msgarg_get_string(arg, core::mem::transmute(s)) } + unsafe { alljoyn_msgarg_get_string(arg, s as _) } } #[inline] 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); - unsafe { alljoyn_msgarg_get_uint16(arg, core::mem::transmute(q)) } + unsafe { alljoyn_msgarg_get_uint16(arg, q as _) } } #[inline] 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); - unsafe { alljoyn_msgarg_get_uint16_array(arg, core::mem::transmute(length), core::mem::transmute(aq)) } + unsafe { alljoyn_msgarg_get_uint16_array(arg, length as _, aq as _) } } #[inline] 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); - unsafe { alljoyn_msgarg_get_uint32(arg, core::mem::transmute(u)) } + unsafe { alljoyn_msgarg_get_uint32(arg, u as _) } } #[inline] 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); - unsafe { alljoyn_msgarg_get_uint32_array(arg, core::mem::transmute(length), core::mem::transmute(au)) } + unsafe { alljoyn_msgarg_get_uint32_array(arg, length as _, au as _) } } #[inline] 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); - unsafe { alljoyn_msgarg_get_uint64(arg, core::mem::transmute(t)) } + unsafe { alljoyn_msgarg_get_uint64(arg, t as _) } } #[inline] 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); - unsafe { alljoyn_msgarg_get_uint64_array(arg, core::mem::transmute(length), core::mem::transmute(at)) } + unsafe { alljoyn_msgarg_get_uint64_array(arg, length as _, at as _) } } #[inline] 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); - unsafe { alljoyn_msgarg_get_uint8(arg, core::mem::transmute(y)) } + unsafe { alljoyn_msgarg_get_uint8(arg, y as _) } } #[inline] 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); - unsafe { alljoyn_msgarg_get_uint8_array(arg, core::mem::transmute(length), core::mem::transmute(ay)) } + unsafe { alljoyn_msgarg_get_uint8_array(arg, length as _, ay as _) } } #[inline] pub unsafe fn alljoyn_msgarg_get_variant(arg: alljoyn_msgarg, v: alljoyn_msgarg) -> QStatus { @@ -2377,7 +2377,7 @@ where 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); - unsafe { alljoyn_msgarg_get_variant_array(arg, signature.param().abi(), core::mem::transmute(length), core::mem::transmute(av)) } + unsafe { alljoyn_msgarg_get_variant_array(arg, signature.param().abi(), length as _, av as _) } } #[inline] pub unsafe fn alljoyn_msgarg_getdictelement(arg: alljoyn_msgarg, elemsig: P1) -> QStatus @@ -2444,7 +2444,7 @@ pub unsafe fn alljoyn_msgarg_set_bool(arg: alljoyn_msgarg, b: i32) -> QStatus { #[inline] 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); - unsafe { alljoyn_msgarg_set_bool_array(arg, length, core::mem::transmute(ab)) } + unsafe { alljoyn_msgarg_set_bool_array(arg, length, ab as _) } } #[inline] pub unsafe fn alljoyn_msgarg_set_double(arg: alljoyn_msgarg, d: f64) -> QStatus { @@ -2454,7 +2454,7 @@ pub unsafe fn alljoyn_msgarg_set_double(arg: alljoyn_msgarg, d: f64) -> QStatus #[inline] 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); - unsafe { alljoyn_msgarg_set_double_array(arg, length, core::mem::transmute(ad)) } + unsafe { alljoyn_msgarg_set_double_array(arg, length, ad as _) } } #[inline] pub unsafe fn alljoyn_msgarg_set_int16(arg: alljoyn_msgarg, n: i16) -> QStatus { @@ -2464,7 +2464,7 @@ pub unsafe fn alljoyn_msgarg_set_int16(arg: alljoyn_msgarg, n: i16) -> QStatus { #[inline] 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); - unsafe { alljoyn_msgarg_set_int16_array(arg, length, core::mem::transmute(an)) } + unsafe { alljoyn_msgarg_set_int16_array(arg, length, an as _) } } #[inline] pub unsafe fn alljoyn_msgarg_set_int32(arg: alljoyn_msgarg, i: i32) -> QStatus { @@ -2474,7 +2474,7 @@ pub unsafe fn alljoyn_msgarg_set_int32(arg: alljoyn_msgarg, i: i32) -> QStatus { #[inline] 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); - unsafe { alljoyn_msgarg_set_int32_array(arg, length, core::mem::transmute(ai)) } + unsafe { alljoyn_msgarg_set_int32_array(arg, length, ai as _) } } #[inline] pub unsafe fn alljoyn_msgarg_set_int64(arg: alljoyn_msgarg, x: i64) -> QStatus { @@ -2484,7 +2484,7 @@ pub unsafe fn alljoyn_msgarg_set_int64(arg: alljoyn_msgarg, x: i64) -> QStatus { #[inline] 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); - unsafe { alljoyn_msgarg_set_int64_array(arg, length, core::mem::transmute(ax)) } + unsafe { alljoyn_msgarg_set_int64_array(arg, length, ax as _) } } #[inline] pub unsafe fn alljoyn_msgarg_set_objectpath(arg: alljoyn_msgarg, o: P1) -> QStatus @@ -2533,7 +2533,7 @@ pub unsafe fn alljoyn_msgarg_set_uint16(arg: alljoyn_msgarg, q: u16) -> QStatus #[inline] 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); - unsafe { alljoyn_msgarg_set_uint16_array(arg, length, core::mem::transmute(aq)) } + unsafe { alljoyn_msgarg_set_uint16_array(arg, length, aq as _) } } #[inline] pub unsafe fn alljoyn_msgarg_set_uint32(arg: alljoyn_msgarg, u: u32) -> QStatus { @@ -2543,7 +2543,7 @@ pub unsafe fn alljoyn_msgarg_set_uint32(arg: alljoyn_msgarg, u: u32) -> QStatus #[inline] 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); - unsafe { alljoyn_msgarg_set_uint32_array(arg, length, core::mem::transmute(au)) } + unsafe { alljoyn_msgarg_set_uint32_array(arg, length, au as _) } } #[inline] pub unsafe fn alljoyn_msgarg_set_uint64(arg: alljoyn_msgarg, t: u64) -> QStatus { @@ -2553,7 +2553,7 @@ pub unsafe fn alljoyn_msgarg_set_uint64(arg: alljoyn_msgarg, t: u64) -> QStatus #[inline] 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); - unsafe { alljoyn_msgarg_set_uint64_array(arg, length, core::mem::transmute(at)) } + unsafe { alljoyn_msgarg_set_uint64_array(arg, length, at as _) } } #[inline] pub unsafe fn alljoyn_msgarg_set_uint8(arg: alljoyn_msgarg, y: u8) -> QStatus { @@ -2563,7 +2563,7 @@ pub unsafe fn alljoyn_msgarg_set_uint8(arg: alljoyn_msgarg, y: u8) -> QStatus { #[inline] 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); - unsafe { alljoyn_msgarg_set_uint8_array(arg, length, core::mem::transmute(ay)) } + unsafe { alljoyn_msgarg_set_uint8_array(arg, length, ay as _) } } #[inline] pub unsafe fn alljoyn_msgarg_setdictentry(arg: alljoyn_msgarg, key: alljoyn_msgarg, value: alljoyn_msgarg) -> QStatus { @@ -2672,22 +2672,22 @@ pub unsafe fn alljoyn_permissionconfigurationlistener_destroy(listener: alljoyn_ #[inline] pub unsafe fn alljoyn_permissionconfigurator_certificatechain_destroy(certificatechain: *mut i8) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_certificatechain_destroy(certificatechain : *mut i8)); - unsafe { alljoyn_permissionconfigurator_certificatechain_destroy(core::mem::transmute(certificatechain)) } + unsafe { alljoyn_permissionconfigurator_certificatechain_destroy(certificatechain as _) } } #[inline] pub unsafe fn alljoyn_permissionconfigurator_certificateid_cleanup(certificateid: *mut alljoyn_certificateid) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_certificateid_cleanup(certificateid : *mut alljoyn_certificateid)); - unsafe { alljoyn_permissionconfigurator_certificateid_cleanup(core::mem::transmute(certificateid)) } + unsafe { alljoyn_permissionconfigurator_certificateid_cleanup(certificateid as _) } } #[inline] pub unsafe fn alljoyn_permissionconfigurator_certificateidarray_cleanup(certificateidarray: *mut alljoyn_certificateidarray) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_certificateidarray_cleanup(certificateidarray : *mut alljoyn_certificateidarray)); - unsafe { alljoyn_permissionconfigurator_certificateidarray_cleanup(core::mem::transmute(certificateidarray)) } + unsafe { alljoyn_permissionconfigurator_certificateidarray_cleanup(certificateidarray as _) } } #[inline] 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); - unsafe { alljoyn_permissionconfigurator_claim(configurator, core::mem::transmute(cakey), core::mem::transmute(identitycertificatechain), groupid, groupsize, core::mem::transmute(groupauthority), core::mem::transmute(manifestsxmls), manifestscount) } + unsafe { alljoyn_permissionconfigurator_claim(configurator, cakey as _, identitycertificatechain as _, groupid, groupsize, groupauthority as _, manifestsxmls as _, manifestscount) } } #[inline] pub unsafe fn alljoyn_permissionconfigurator_endmanagement(configurator: alljoyn_permissionconfigurator) -> QStatus { @@ -2697,17 +2697,17 @@ pub unsafe fn alljoyn_permissionconfigurator_endmanagement(configurator: alljoyn #[inline] 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); - unsafe { alljoyn_permissionconfigurator_getapplicationstate(configurator, core::mem::transmute(state)) } + unsafe { alljoyn_permissionconfigurator_getapplicationstate(configurator, state as _) } } #[inline] 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); - unsafe { alljoyn_permissionconfigurator_getclaimcapabilities(configurator, core::mem::transmute(claimcapabilities)) } + unsafe { alljoyn_permissionconfigurator_getclaimcapabilities(configurator, claimcapabilities as _) } } #[inline] 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); - unsafe { alljoyn_permissionconfigurator_getclaimcapabilitiesadditionalinfo(configurator, core::mem::transmute(additionalinfo)) } + unsafe { alljoyn_permissionconfigurator_getclaimcapabilitiesadditionalinfo(configurator, additionalinfo as _) } } #[inline] pub unsafe fn alljoyn_permissionconfigurator_getdefaultclaimcapabilities() -> u16 { @@ -2717,77 +2717,77 @@ pub unsafe fn alljoyn_permissionconfigurator_getdefaultclaimcapabilities() -> u1 #[inline] 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); - unsafe { alljoyn_permissionconfigurator_getdefaultpolicy(configurator, core::mem::transmute(policyxml)) } + unsafe { alljoyn_permissionconfigurator_getdefaultpolicy(configurator, policyxml as _) } } #[inline] 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); - unsafe { alljoyn_permissionconfigurator_getidentity(configurator, core::mem::transmute(identitycertificatechain)) } + unsafe { alljoyn_permissionconfigurator_getidentity(configurator, identitycertificatechain as _) } } #[inline] 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); - unsafe { alljoyn_permissionconfigurator_getidentitycertificateid(configurator, core::mem::transmute(certificateid)) } + unsafe { alljoyn_permissionconfigurator_getidentitycertificateid(configurator, certificateid as _) } } #[inline] 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); - unsafe { alljoyn_permissionconfigurator_getmanifests(configurator, core::mem::transmute(manifestarray)) } + unsafe { alljoyn_permissionconfigurator_getmanifests(configurator, manifestarray as _) } } #[inline] 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); - unsafe { alljoyn_permissionconfigurator_getmanifesttemplate(configurator, core::mem::transmute(manifesttemplatexml)) } + unsafe { alljoyn_permissionconfigurator_getmanifesttemplate(configurator, manifesttemplatexml as _) } } #[inline] 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); - unsafe { alljoyn_permissionconfigurator_getmembershipsummaries(configurator, core::mem::transmute(certificateids)) } + unsafe { alljoyn_permissionconfigurator_getmembershipsummaries(configurator, certificateids as _) } } #[inline] 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); - unsafe { alljoyn_permissionconfigurator_getpolicy(configurator, core::mem::transmute(policyxml)) } + unsafe { alljoyn_permissionconfigurator_getpolicy(configurator, policyxml as _) } } #[inline] 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); - unsafe { alljoyn_permissionconfigurator_getpublickey(configurator, core::mem::transmute(publickey)) } + unsafe { alljoyn_permissionconfigurator_getpublickey(configurator, publickey as _) } } #[inline] 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); - unsafe { alljoyn_permissionconfigurator_installmanifests(configurator, core::mem::transmute(manifestsxmls), manifestscount, append) } + unsafe { alljoyn_permissionconfigurator_installmanifests(configurator, manifestsxmls as _, manifestscount, append) } } #[inline] 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); - unsafe { alljoyn_permissionconfigurator_installmembership(configurator, core::mem::transmute(membershipcertificatechain)) } + unsafe { alljoyn_permissionconfigurator_installmembership(configurator, membershipcertificatechain as _) } } #[inline] pub unsafe fn alljoyn_permissionconfigurator_manifestarray_cleanup(manifestarray: *mut alljoyn_manifestarray) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_manifestarray_cleanup(manifestarray : *mut alljoyn_manifestarray)); - unsafe { alljoyn_permissionconfigurator_manifestarray_cleanup(core::mem::transmute(manifestarray)) } + unsafe { alljoyn_permissionconfigurator_manifestarray_cleanup(manifestarray as _) } } #[inline] pub unsafe fn alljoyn_permissionconfigurator_manifesttemplate_destroy(manifesttemplatexml: *mut i8) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_manifesttemplate_destroy(manifesttemplatexml : *mut i8)); - unsafe { alljoyn_permissionconfigurator_manifesttemplate_destroy(core::mem::transmute(manifesttemplatexml)) } + unsafe { alljoyn_permissionconfigurator_manifesttemplate_destroy(manifesttemplatexml as _) } } #[inline] pub unsafe fn alljoyn_permissionconfigurator_policy_destroy(policyxml: *mut i8) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_policy_destroy(policyxml : *mut i8)); - unsafe { alljoyn_permissionconfigurator_policy_destroy(core::mem::transmute(policyxml)) } + unsafe { alljoyn_permissionconfigurator_policy_destroy(policyxml as _) } } #[inline] pub unsafe fn alljoyn_permissionconfigurator_publickey_destroy(publickey: *mut i8) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_publickey_destroy(publickey : *mut i8)); - unsafe { alljoyn_permissionconfigurator_publickey_destroy(core::mem::transmute(publickey)) } + unsafe { alljoyn_permissionconfigurator_publickey_destroy(publickey as _) } } #[inline] 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); - unsafe { alljoyn_permissionconfigurator_removemembership(configurator, serial, seriallen, core::mem::transmute(issuerpublickey), issueraki, issuerakilen) } + unsafe { alljoyn_permissionconfigurator_removemembership(configurator, serial, seriallen, issuerpublickey as _, issueraki, issuerakilen) } } #[inline] pub unsafe fn alljoyn_permissionconfigurator_reset(configurator: alljoyn_permissionconfigurator) -> QStatus { @@ -2817,7 +2817,7 @@ pub unsafe fn alljoyn_permissionconfigurator_setclaimcapabilitiesadditionalinfo( #[inline] 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); - unsafe { alljoyn_permissionconfigurator_setmanifesttemplatefromxml(configurator, core::mem::transmute(manifesttemplatexml)) } + unsafe { alljoyn_permissionconfigurator_setmanifesttemplatefromxml(configurator, manifesttemplatexml as _) } } #[inline] pub unsafe fn alljoyn_permissionconfigurator_startmanagement(configurator: alljoyn_permissionconfigurator) -> QStatus { @@ -2827,12 +2827,12 @@ pub unsafe fn alljoyn_permissionconfigurator_startmanagement(configurator: alljo #[inline] 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); - unsafe { alljoyn_permissionconfigurator_updateidentity(configurator, core::mem::transmute(identitycertificatechain), core::mem::transmute(manifestsxmls), manifestscount) } + unsafe { alljoyn_permissionconfigurator_updateidentity(configurator, identitycertificatechain as _, manifestsxmls as _, manifestscount) } } #[inline] 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); - unsafe { alljoyn_permissionconfigurator_updatepolicy(configurator, core::mem::transmute(policyxml)) } + unsafe { alljoyn_permissionconfigurator_updatepolicy(configurator, policyxml as _) } } #[inline] pub unsafe fn alljoyn_pinglistener_create(callback: *const alljoyn_pinglistener_callback, context: *const core::ffi::c_void) -> alljoyn_pinglistener { @@ -2909,7 +2909,7 @@ where 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); - unsafe { alljoyn_proxybusobject_getallpropertiesasync(proxyobj, iface.param().abi(), callback, timeout, core::mem::transmute(context)) } + unsafe { alljoyn_proxybusobject_getallpropertiesasync(proxyobj, iface.param().abi(), callback, timeout, context as _) } } #[inline] pub unsafe fn alljoyn_proxybusobject_getchild(proxyobj: alljoyn_proxybusobject, path: P1) -> alljoyn_proxybusobject @@ -2922,7 +2922,7 @@ where #[inline] 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); - unsafe { alljoyn_proxybusobject_getchildren(proxyobj, core::mem::transmute(children), numchildren) } + unsafe { alljoyn_proxybusobject_getchildren(proxyobj, children as _, numchildren) } } #[inline] pub unsafe fn alljoyn_proxybusobject_getinterface(proxyobj: alljoyn_proxybusobject, iface: P1) -> alljoyn_interfacedescription @@ -2958,7 +2958,7 @@ where 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); - unsafe { alljoyn_proxybusobject_getpropertyasync(proxyobj, iface.param().abi(), property.param().abi(), callback, timeout, core::mem::transmute(context)) } + unsafe { alljoyn_proxybusobject_getpropertyasync(proxyobj, iface.param().abi(), property.param().abi(), callback, timeout, context as _) } } #[inline] pub unsafe fn alljoyn_proxybusobject_getservicename(proxyobj: alljoyn_proxybusobject) -> windows_core::PCSTR { @@ -2991,7 +2991,7 @@ pub unsafe fn alljoyn_proxybusobject_introspectremoteobject(proxyobj: alljoyn_pr #[inline] 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); - unsafe { alljoyn_proxybusobject_introspectremoteobjectasync(proxyobj, callback, core::mem::transmute(context)) } + unsafe { alljoyn_proxybusobject_introspectremoteobjectasync(proxyobj, callback, context as _) } } #[inline] pub unsafe fn alljoyn_proxybusobject_issecure(proxyobj: alljoyn_proxybusobject) -> i32 { @@ -3038,12 +3038,12 @@ where P2: 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); - unsafe { alljoyn_proxybusobject_methodcallasync(proxyobj, ifacename.param().abi(), methodname.param().abi(), replyfunc, args, numargs, core::mem::transmute(context), timeout, flags) } + unsafe { alljoyn_proxybusobject_methodcallasync(proxyobj, ifacename.param().abi(), methodname.param().abi(), replyfunc, args, numargs, context as _, timeout, flags) } } #[inline] 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); - unsafe { alljoyn_proxybusobject_methodcallasync_member(proxyobj, core::mem::transmute(method), replyfunc, args, numargs, core::mem::transmute(context), timeout, flags) } + unsafe { alljoyn_proxybusobject_methodcallasync_member(proxyobj, core::mem::transmute(method), replyfunc, args, numargs, context as _, timeout, flags) } } #[inline] pub unsafe fn alljoyn_proxybusobject_parsexml(proxyobj: alljoyn_proxybusobject, xml: P1, identifier: P2) -> QStatus @@ -3080,7 +3080,7 @@ where 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); - unsafe { alljoyn_proxybusobject_registerpropertieschangedlistener(proxyobj, iface.param().abi(), properties, numproperties, callback, core::mem::transmute(context)) } + unsafe { alljoyn_proxybusobject_registerpropertieschangedlistener(proxyobj, iface.param().abi(), properties, numproperties, callback, context as _) } } #[inline] pub unsafe fn alljoyn_proxybusobject_removechild(proxyobj: alljoyn_proxybusobject, path: P1) -> QStatus @@ -3116,7 +3116,7 @@ where P2: 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); - unsafe { alljoyn_proxybusobject_setpropertyasync(proxyobj, iface.param().abi(), property.param().abi(), value, callback, timeout, core::mem::transmute(context)) } + unsafe { alljoyn_proxybusobject_setpropertyasync(proxyobj, iface.param().abi(), property.param().abi(), value, callback, timeout, context as _) } } #[inline] pub unsafe fn alljoyn_proxybusobject_unregisterpropertieschangedlistener(proxyobj: alljoyn_proxybusobject, iface: P1, callback: alljoyn_proxybusobject_listener_propertieschanged_ptr) -> QStatus @@ -3134,7 +3134,7 @@ pub unsafe fn alljoyn_routerinit() -> QStatus { #[inline] pub unsafe fn alljoyn_routerinitwithconfig(configxml: *mut i8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_routerinitwithconfig(configxml : *mut i8) -> QStatus); - unsafe { alljoyn_routerinitwithconfig(core::mem::transmute(configxml)) } + unsafe { alljoyn_routerinitwithconfig(configxml as _) } } #[inline] pub unsafe fn alljoyn_routershutdown() -> QStatus { @@ -3144,17 +3144,17 @@ pub unsafe fn alljoyn_routershutdown() -> QStatus { #[inline] 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); - unsafe { alljoyn_securityapplicationproxy_claim(proxy, core::mem::transmute(cakey), core::mem::transmute(identitycertificatechain), groupid, groupsize, core::mem::transmute(groupauthority), core::mem::transmute(manifestsxmls), manifestscount) } + unsafe { alljoyn_securityapplicationproxy_claim(proxy, cakey as _, identitycertificatechain as _, groupid, groupsize, groupauthority as _, manifestsxmls as _, manifestscount) } } #[inline] pub unsafe fn alljoyn_securityapplicationproxy_computemanifestdigest(unsignedmanifestxml: *mut i8, identitycertificatepem: *mut i8, digest: *mut *mut u8, digestsize: *mut usize) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_securityapplicationproxy_computemanifestdigest(unsignedmanifestxml : *mut i8, identitycertificatepem : *mut i8, digest : *mut *mut u8, digestsize : *mut usize) -> QStatus); - unsafe { alljoyn_securityapplicationproxy_computemanifestdigest(core::mem::transmute(unsignedmanifestxml), core::mem::transmute(identitycertificatepem), core::mem::transmute(digest), core::mem::transmute(digestsize)) } + unsafe { alljoyn_securityapplicationproxy_computemanifestdigest(unsignedmanifestxml as _, identitycertificatepem as _, digest as _, digestsize as _) } } #[inline] 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); - unsafe { alljoyn_securityapplicationproxy_create(bus, core::mem::transmute(appbusname), sessionid) } + unsafe { alljoyn_securityapplicationproxy_create(bus, appbusname as _, sessionid) } } #[inline] pub unsafe fn alljoyn_securityapplicationproxy_destroy(proxy: alljoyn_securityapplicationproxy) { @@ -3164,12 +3164,12 @@ pub unsafe fn alljoyn_securityapplicationproxy_destroy(proxy: alljoyn_securityap #[inline] pub unsafe fn alljoyn_securityapplicationproxy_digest_destroy(digest: *mut u8) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_securityapplicationproxy_digest_destroy(digest : *mut u8)); - unsafe { alljoyn_securityapplicationproxy_digest_destroy(core::mem::transmute(digest)) } + unsafe { alljoyn_securityapplicationproxy_digest_destroy(digest as _) } } #[inline] pub unsafe fn alljoyn_securityapplicationproxy_eccpublickey_destroy(eccpublickey: *mut i8) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_securityapplicationproxy_eccpublickey_destroy(eccpublickey : *mut i8)); - unsafe { alljoyn_securityapplicationproxy_eccpublickey_destroy(core::mem::transmute(eccpublickey)) } + unsafe { alljoyn_securityapplicationproxy_eccpublickey_destroy(eccpublickey as _) } } #[inline] pub unsafe fn alljoyn_securityapplicationproxy_endmanagement(proxy: alljoyn_securityapplicationproxy) -> QStatus { @@ -3179,32 +3179,32 @@ pub unsafe fn alljoyn_securityapplicationproxy_endmanagement(proxy: alljoyn_secu #[inline] 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); - unsafe { alljoyn_securityapplicationproxy_getapplicationstate(proxy, core::mem::transmute(applicationstate)) } + unsafe { alljoyn_securityapplicationproxy_getapplicationstate(proxy, applicationstate as _) } } #[inline] 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); - unsafe { alljoyn_securityapplicationproxy_getclaimcapabilities(proxy, core::mem::transmute(capabilities)) } + unsafe { alljoyn_securityapplicationproxy_getclaimcapabilities(proxy, capabilities as _) } } #[inline] 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); - unsafe { alljoyn_securityapplicationproxy_getclaimcapabilitiesadditionalinfo(proxy, core::mem::transmute(additionalinfo)) } + unsafe { alljoyn_securityapplicationproxy_getclaimcapabilitiesadditionalinfo(proxy, additionalinfo as _) } } #[inline] 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); - unsafe { alljoyn_securityapplicationproxy_getdefaultpolicy(proxy, core::mem::transmute(policyxml)) } + unsafe { alljoyn_securityapplicationproxy_getdefaultpolicy(proxy, policyxml as _) } } #[inline] 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); - unsafe { alljoyn_securityapplicationproxy_geteccpublickey(proxy, core::mem::transmute(eccpublickey)) } + unsafe { alljoyn_securityapplicationproxy_geteccpublickey(proxy, eccpublickey as _) } } #[inline] 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); - unsafe { alljoyn_securityapplicationproxy_getmanifesttemplate(proxy, core::mem::transmute(manifesttemplatexml)) } + unsafe { alljoyn_securityapplicationproxy_getmanifesttemplate(proxy, manifesttemplatexml as _) } } #[inline] pub unsafe fn alljoyn_securityapplicationproxy_getpermissionmanagementsessionport() -> u16 { @@ -3214,27 +3214,27 @@ pub unsafe fn alljoyn_securityapplicationproxy_getpermissionmanagementsessionpor #[inline] 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); - unsafe { alljoyn_securityapplicationproxy_getpolicy(proxy, core::mem::transmute(policyxml)) } + unsafe { alljoyn_securityapplicationproxy_getpolicy(proxy, policyxml as _) } } #[inline] 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); - unsafe { alljoyn_securityapplicationproxy_installmembership(proxy, core::mem::transmute(membershipcertificatechain)) } + unsafe { alljoyn_securityapplicationproxy_installmembership(proxy, membershipcertificatechain as _) } } #[inline] pub unsafe fn alljoyn_securityapplicationproxy_manifest_destroy(signedmanifestxml: *mut i8) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_securityapplicationproxy_manifest_destroy(signedmanifestxml : *mut i8)); - unsafe { alljoyn_securityapplicationproxy_manifest_destroy(core::mem::transmute(signedmanifestxml)) } + unsafe { alljoyn_securityapplicationproxy_manifest_destroy(signedmanifestxml as _) } } #[inline] pub unsafe fn alljoyn_securityapplicationproxy_manifesttemplate_destroy(manifesttemplatexml: *mut i8) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_securityapplicationproxy_manifesttemplate_destroy(manifesttemplatexml : *mut i8)); - unsafe { alljoyn_securityapplicationproxy_manifesttemplate_destroy(core::mem::transmute(manifesttemplatexml)) } + unsafe { alljoyn_securityapplicationproxy_manifesttemplate_destroy(manifesttemplatexml as _) } } #[inline] pub unsafe fn alljoyn_securityapplicationproxy_policy_destroy(policyxml: *mut i8) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_securityapplicationproxy_policy_destroy(policyxml : *mut i8)); - unsafe { alljoyn_securityapplicationproxy_policy_destroy(core::mem::transmute(policyxml)) } + unsafe { alljoyn_securityapplicationproxy_policy_destroy(policyxml as _) } } #[inline] pub unsafe fn alljoyn_securityapplicationproxy_reset(proxy: alljoyn_securityapplicationproxy) -> QStatus { @@ -3249,12 +3249,12 @@ pub unsafe fn alljoyn_securityapplicationproxy_resetpolicy(proxy: alljoyn_securi #[inline] pub unsafe fn alljoyn_securityapplicationproxy_setmanifestsignature(unsignedmanifestxml: *mut i8, identitycertificatepem: *mut i8, signature: *const u8, signaturesize: usize, signedmanifestxml: *mut *mut i8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_securityapplicationproxy_setmanifestsignature(unsignedmanifestxml : *mut i8, identitycertificatepem : *mut i8, signature : *const u8, signaturesize : usize, signedmanifestxml : *mut *mut i8) -> QStatus); - unsafe { alljoyn_securityapplicationproxy_setmanifestsignature(core::mem::transmute(unsignedmanifestxml), core::mem::transmute(identitycertificatepem), signature, signaturesize, core::mem::transmute(signedmanifestxml)) } + unsafe { alljoyn_securityapplicationproxy_setmanifestsignature(unsignedmanifestxml as _, identitycertificatepem as _, signature, signaturesize, signedmanifestxml as _) } } #[inline] pub unsafe fn alljoyn_securityapplicationproxy_signmanifest(unsignedmanifestxml: *mut i8, identitycertificatepem: *mut i8, signingprivatekeypem: *mut i8, signedmanifestxml: *mut *mut i8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_securityapplicationproxy_signmanifest(unsignedmanifestxml : *mut i8, identitycertificatepem : *mut i8, signingprivatekeypem : *mut i8, signedmanifestxml : *mut *mut i8) -> QStatus); - unsafe { alljoyn_securityapplicationproxy_signmanifest(core::mem::transmute(unsignedmanifestxml), core::mem::transmute(identitycertificatepem), core::mem::transmute(signingprivatekeypem), core::mem::transmute(signedmanifestxml)) } + unsafe { alljoyn_securityapplicationproxy_signmanifest(unsignedmanifestxml as _, identitycertificatepem as _, signingprivatekeypem as _, signedmanifestxml as _) } } #[inline] pub unsafe fn alljoyn_securityapplicationproxy_startmanagement(proxy: alljoyn_securityapplicationproxy) -> QStatus { @@ -3264,12 +3264,12 @@ pub unsafe fn alljoyn_securityapplicationproxy_startmanagement(proxy: alljoyn_se #[inline] 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); - unsafe { alljoyn_securityapplicationproxy_updateidentity(proxy, core::mem::transmute(identitycertificatechain), core::mem::transmute(manifestsxmls), manifestscount) } + unsafe { alljoyn_securityapplicationproxy_updateidentity(proxy, identitycertificatechain as _, manifestsxmls as _, manifestscount) } } #[inline] 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); - unsafe { alljoyn_securityapplicationproxy_updatepolicy(proxy, core::mem::transmute(policyxml)) } + unsafe { alljoyn_securityapplicationproxy_updatepolicy(proxy, policyxml as _) } } #[inline] pub unsafe fn alljoyn_sessionlistener_create(callbacks: *const alljoyn_sessionlistener_callbacks, context: *const core::ffi::c_void) -> alljoyn_sessionlistener { 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 658d1a4cc0..841f17d60d 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/BiometricFramework/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/BiometricFramework/mod.rs @@ -26,7 +26,7 @@ pub unsafe fn WinBioAsyncMonitorFrameworkChanges(frameworkhandle: u32, changetyp #[inline] pub unsafe fn WinBioAsyncOpenFramework(notificationmethod: WINBIO_ASYNC_NOTIFICATION_METHOD, targetwindow: Option, messagecode: Option, callbackroutine: Option, userdata: Option<*const core::ffi::c_void>, asynchronousopen: bool, frameworkhandle: Option<*mut u32>) -> windows_core::Result<()> { 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); - unsafe { WinBioAsyncOpenFramework(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.into(), core::mem::transmute(frameworkhandle.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WinBioAsyncOpenFramework(notificationmethod, targetwindow.unwrap_or(core::mem::zeroed()) as _, messagecode.unwrap_or(core::mem::zeroed()) as _, callbackroutine.unwrap_or(core::mem::zeroed()) as _, userdata.unwrap_or(core::mem::zeroed()) as _, asynchronousopen.into(), frameworkhandle.unwrap_or(core::mem::zeroed()) as _).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: Option, messagecode: Option, callbackroutine: Option, userdata: Option<*const core::ffi::c_void>, asynchronousopen: bool, sessionhandle: Option<*mut u32>) -> windows_core::Result<()> { @@ -38,14 +38,14 @@ pub unsafe fn WinBioAsyncOpenSession(factor: u32, pooltype: WINBIO_POOL, flags: 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())), + databaseid.unwrap_or(core::mem::zeroed()) as _, 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())), + targetwindow.unwrap_or(core::mem::zeroed()) as _, + messagecode.unwrap_or(core::mem::zeroed()) as _, + callbackroutine.unwrap_or(core::mem::zeroed()) as _, + userdata.unwrap_or(core::mem::zeroed()) as _, asynchronousopen.into(), - core::mem::transmute(sessionhandle.unwrap_or(core::mem::zeroed())), + sessionhandle.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -58,12 +58,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); - unsafe { WinBioCaptureSample(sessionhandle, purpose, 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() } + unsafe { WinBioCaptureSample(sessionhandle, purpose, flags, unitid.unwrap_or(core::mem::zeroed()) as _, sample as _, samplesize.unwrap_or(core::mem::zeroed()) as _, rejectdetail.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WinBioCaptureSampleWithCallback(sessionhandle, purpose, flags, capturecallback, core::mem::transmute(capturecallbackcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WinBioCaptureSampleWithCallback(sessionhandle, purpose, flags, capturecallback, capturecallbackcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WinBioCloseFramework(frameworkhandle: u32) -> windows_core::Result<()> { @@ -78,12 +78,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); - unsafe { WinBioControlUnit(sessionhandle, unitid, component, controlcode, core::mem::transmute(sendbuffer.as_ptr()), sendbuffer.len().try_into().unwrap(), core::mem::transmute(receivebuffer.as_ptr()), receivebuffer.len().try_into().unwrap(), core::mem::transmute(receivedatasize), core::mem::transmute(operationstatus.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WinBioControlUnit(sessionhandle, unitid, component, controlcode, core::mem::transmute(sendbuffer.as_ptr()), sendbuffer.len().try_into().unwrap(), core::mem::transmute(receivebuffer.as_ptr()), receivebuffer.len().try_into().unwrap(), receivedatasize as _, operationstatus.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WinBioControlUnitPrivileged(sessionhandle, unitid, component, controlcode, core::mem::transmute(sendbuffer.as_ptr()), sendbuffer.len().try_into().unwrap(), core::mem::transmute(receivebuffer.as_ptr()), receivebuffer.len().try_into().unwrap(), core::mem::transmute(receivedatasize), core::mem::transmute(operationstatus.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WinBioControlUnitPrivileged(sessionhandle, unitid, component, controlcode, core::mem::transmute(sendbuffer.as_ptr()), sendbuffer.len().try_into().unwrap(), core::mem::transmute(receivebuffer.as_ptr()), receivebuffer.len().try_into().unwrap(), receivedatasize as _, operationstatus.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WinBioDeleteTemplate(sessionhandle: u32, unitid: u32, identity: *const WINBIO_IDENTITY, subfactor: u8) -> windows_core::Result<()> { @@ -98,17 +98,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); - unsafe { WinBioEnrollCapture(sessionhandle, core::mem::transmute(rejectdetail.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WinBioEnrollCapture(sessionhandle, rejectdetail.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WinBioEnrollCaptureWithCallback(sessionhandle, enrollcallback, core::mem::transmute(enrollcallbackcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WinBioEnrollCaptureWithCallback(sessionhandle, enrollcallback, enrollcallbackcontext.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WinBioEnrollCommit(sessionhandle, core::mem::transmute(identity.unwrap_or(core::mem::zeroed())), core::mem::transmute(isnewtemplate.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WinBioEnrollCommit(sessionhandle, identity.unwrap_or(core::mem::zeroed()) as _, isnewtemplate.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WinBioEnrollDiscard(sessionhandle: u32) -> windows_core::Result<()> { @@ -123,22 +123,22 @@ pub unsafe fn WinBioEnrollSelect(sessionhandle: u32, selectorvalue: u64) -> wind #[inline] pub unsafe fn WinBioEnumBiometricUnits(factor: u32, unitschemaarray: *mut *mut WINBIO_UNIT_SCHEMA, unitcount: *mut usize) -> windows_core::Result<()> { windows_targets::link!("winbio.dll" "system" fn WinBioEnumBiometricUnits(factor : u32, unitschemaarray : *mut *mut WINBIO_UNIT_SCHEMA, unitcount : *mut usize) -> windows_core::HRESULT); - unsafe { WinBioEnumBiometricUnits(factor, core::mem::transmute(unitschemaarray), core::mem::transmute(unitcount)).ok() } + unsafe { WinBioEnumBiometricUnits(factor, unitschemaarray as _, unitcount as _).ok() } } #[inline] pub unsafe fn WinBioEnumDatabases(factor: u32, storageschemaarray: *mut *mut WINBIO_STORAGE_SCHEMA, storagecount: *mut usize) -> windows_core::Result<()> { windows_targets::link!("winbio.dll" "system" fn WinBioEnumDatabases(factor : u32, storageschemaarray : *mut *mut WINBIO_STORAGE_SCHEMA, storagecount : *mut usize) -> windows_core::HRESULT); - unsafe { WinBioEnumDatabases(factor, core::mem::transmute(storageschemaarray), core::mem::transmute(storagecount)).ok() } + unsafe { WinBioEnumDatabases(factor, storageschemaarray as _, storagecount as _).ok() } } #[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); - unsafe { WinBioEnumEnrollments(sessionhandle, unitid, identity, core::mem::transmute(subfactorarray), core::mem::transmute(subfactorcount.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WinBioEnumEnrollments(sessionhandle, unitid, identity, subfactorarray as _, subfactorcount.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WinBioEnumServiceProviders(factor: u32, bspschemaarray: *mut *mut WINBIO_BSP_SCHEMA, bspcount: *mut usize) -> windows_core::Result<()> { windows_targets::link!("winbio.dll" "system" fn WinBioEnumServiceProviders(factor : u32, bspschemaarray : *mut *mut WINBIO_BSP_SCHEMA, bspcount : *mut usize) -> windows_core::HRESULT); - unsafe { WinBioEnumServiceProviders(factor, core::mem::transmute(bspschemaarray), core::mem::transmute(bspcount)).ok() } + unsafe { WinBioEnumServiceProviders(factor, bspschemaarray as _, bspcount as _).ok() } } #[inline] pub unsafe fn WinBioFree(address: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -156,12 +156,12 @@ pub unsafe fn WinBioGetCredentialState(identity: WINBIO_IDENTITY, r#type: WINBIO #[inline] pub unsafe fn WinBioGetDomainLogonSetting(value: *mut u8, source: *mut WINBIO_SETTING_SOURCE) { windows_targets::link!("winbio.dll" "system" fn WinBioGetDomainLogonSetting(value : *mut u8, source : *mut WINBIO_SETTING_SOURCE)); - unsafe { WinBioGetDomainLogonSetting(core::mem::transmute(value), core::mem::transmute(source)) } + unsafe { WinBioGetDomainLogonSetting(value as _, source as _) } } #[inline] pub unsafe fn WinBioGetEnabledSetting(value: *mut u8, source: *mut WINBIO_SETTING_SOURCE) { windows_targets::link!("winbio.dll" "system" fn WinBioGetEnabledSetting(value : *mut u8, source : *mut WINBIO_SETTING_SOURCE)); - unsafe { WinBioGetEnabledSetting(core::mem::transmute(value), core::mem::transmute(source)) } + unsafe { WinBioGetEnabledSetting(value as _, source as _) } } #[inline] pub unsafe fn WinBioGetEnrolledFactors(accountowner: *const WINBIO_IDENTITY) -> windows_core::Result { @@ -174,22 +174,22 @@ pub unsafe fn WinBioGetEnrolledFactors(accountowner: *const WINBIO_IDENTITY) -> #[inline] pub unsafe fn WinBioGetLogonSetting(value: *mut u8, source: *mut WINBIO_SETTING_SOURCE) { windows_targets::link!("winbio.dll" "system" fn WinBioGetLogonSetting(value : *mut u8, source : *mut WINBIO_SETTING_SOURCE)); - unsafe { WinBioGetLogonSetting(core::mem::transmute(value), core::mem::transmute(source)) } + unsafe { WinBioGetLogonSetting(value as _, source as _) } } #[inline] 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); - unsafe { WinBioGetProperty(sessionhandle, propertytype, 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() } + unsafe { WinBioGetProperty(sessionhandle, propertytype, propertyid, unitid.unwrap_or(core::mem::zeroed()) as _, identity.unwrap_or(core::mem::zeroed()) as _, subfactor.unwrap_or(core::mem::zeroed()) as _, propertybuffer as _, propertybuffersize.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WinBioIdentify(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() } + unsafe { WinBioIdentify(sessionhandle, unitid.unwrap_or(core::mem::zeroed()) as _, identity.unwrap_or(core::mem::zeroed()) as _, subfactor.unwrap_or(core::mem::zeroed()) as _, rejectdetail.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WinBioIdentifyWithCallback(sessionhandle, identifycallback, core::mem::transmute(identifycallbackcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WinBioIdentifyWithCallback(sessionhandle, identifycallback, identifycallbackcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WinBioImproveBegin(sessionhandle: u32, unitid: u32) -> windows_core::Result<()> { @@ -204,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); - unsafe { WinBioLocateSensor(sessionhandle, core::mem::transmute(unitid.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WinBioLocateSensor(sessionhandle, unitid.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WinBioLocateSensorWithCallback(sessionhandle, locatecallback, core::mem::transmute(locatecallbackcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WinBioLocateSensorWithCallback(sessionhandle, locatecallback, locatecallbackcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WinBioLockUnit(sessionhandle: u32, unitid: u32) -> windows_core::Result<()> { @@ -231,13 +231,13 @@ pub unsafe fn WinBioOpenSession(factor: u32, pooltype: WINBIO_POOL, flags: u32, 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); unsafe { let mut result__ = core::mem::zeroed(); - WinBioOpenSession(factor, pooltype, flags, core::mem::transmute(unitarray.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), unitarray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(databaseid.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + WinBioOpenSession(factor, pooltype, flags, core::mem::transmute(unitarray.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), unitarray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), databaseid.unwrap_or(core::mem::zeroed()) as _, &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); - unsafe { WinBioRegisterEventMonitor(sessionhandle, eventmask, eventcallback, core::mem::transmute(eventcallbackcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WinBioRegisterEventMonitor(sessionhandle, eventmask, eventcallback, eventcallbackcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WinBioReleaseFocus() -> windows_core::Result<()> { @@ -267,7 +267,7 @@ pub unsafe fn WinBioSetCredential(r#type: WINBIO_CREDENTIAL_TYPE, credential: &[ #[inline] pub unsafe fn WinBioSetProperty(sessionhandle: u32, propertytype: u32, propertyid: u32, unitid: 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); - unsafe { WinBioSetProperty(sessionhandle, propertytype, 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())), propertybuffer, propertybuffersize).ok() } + unsafe { WinBioSetProperty(sessionhandle, propertytype, propertyid, unitid.unwrap_or(core::mem::zeroed()) as _, identity.unwrap_or(core::mem::zeroed()) as _, subfactor.unwrap_or(core::mem::zeroed()) as _, propertybuffer, propertybuffersize).ok() } } #[inline] pub unsafe fn WinBioUnlockUnit(sessionhandle: u32, unitid: u32) -> windows_core::Result<()> { @@ -282,12 +282,12 @@ pub unsafe fn WinBioUnregisterEventMonitor(sessionhandle: u32) -> windows_core:: #[inline] pub unsafe fn WinBioVerify(sessionhandle: u32, identity: *const WINBIO_IDENTITY, subfactor: u8, unitid: Option<*mut u32>, r#match: Option<*mut u8>, rejectdetail: Option<*mut u32>) -> windows_core::Result<()> { windows_targets::link!("winbio.dll" "system" fn WinBioVerify(sessionhandle : u32, identity : *const WINBIO_IDENTITY, subfactor : u8, unitid : *mut u32, r#match : *mut u8, rejectdetail : *mut u32) -> windows_core::HRESULT); - unsafe { WinBioVerify(sessionhandle, identity, 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() } + unsafe { WinBioVerify(sessionhandle, identity, subfactor, unitid.unwrap_or(core::mem::zeroed()) as _, r#match.unwrap_or(core::mem::zeroed()) as _, rejectdetail.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WinBioVerifyWithCallback(sessionhandle, identity, subfactor, verifycallback, core::mem::transmute(verifycallbackcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WinBioVerifyWithCallback(sessionhandle, identity, subfactor, verifycallback, verifycallbackcontext.unwrap_or(core::mem::zeroed()) as _).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 e088686e7d..d0df989df1 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Bluetooth/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Bluetooth/mod.rs @@ -1,37 +1,37 @@ #[inline] 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); - unsafe { 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())) } + unsafe { BluetoothAuthenticateDevice(hwndparent.unwrap_or(core::mem::zeroed()) as _, hradio.unwrap_or(core::mem::zeroed()) as _, pbtbi as _, 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: 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); - unsafe { 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())), authenticationrequirement) } + unsafe { BluetoothAuthenticateDeviceEx(hwndparentin.unwrap_or(core::mem::zeroed()) as _, hradioin.unwrap_or(core::mem::zeroed()) as _, pbtdiinout as _, pbtoobdata.unwrap_or(core::mem::zeroed()) as _, authenticationrequirement) } } #[inline] 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); - unsafe { 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())) } + unsafe { BluetoothAuthenticateMultipleDevices(hwndparent.unwrap_or(core::mem::zeroed()) as _, hradio.unwrap_or(core::mem::zeroed()) as _, rgbtdi.len().try_into().unwrap(), core::mem::transmute(rgbtdi.as_ptr())) } } #[inline] 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); - unsafe { BluetoothDisplayDeviceProperties(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbtdi)).ok() } + unsafe { BluetoothDisplayDeviceProperties(hwndparent.unwrap_or(core::mem::zeroed()) as _, pbtdi as _).ok() } } #[inline] pub unsafe fn BluetoothEnableDiscovery(hradio: Option, fenabled: bool) -> super::super::Foundation::BOOL { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothEnableDiscovery(hradio : super::super::Foundation:: HANDLE, fenabled : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - unsafe { BluetoothEnableDiscovery(core::mem::transmute(hradio.unwrap_or(core::mem::zeroed())), fenabled.into()) } + unsafe { BluetoothEnableDiscovery(hradio.unwrap_or(core::mem::zeroed()) as _, fenabled.into()) } } #[inline] pub unsafe fn BluetoothEnableIncomingConnections(hradio: Option, fenabled: bool) -> super::super::Foundation::BOOL { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothEnableIncomingConnections(hradio : super::super::Foundation:: HANDLE, fenabled : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - unsafe { BluetoothEnableIncomingConnections(core::mem::transmute(hradio.unwrap_or(core::mem::zeroed())), fenabled.into()) } + unsafe { BluetoothEnableIncomingConnections(hradio.unwrap_or(core::mem::zeroed()) as _, fenabled.into()) } } #[inline] 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); - unsafe { BluetoothEnumerateInstalledServices(core::mem::transmute(hradio.unwrap_or(core::mem::zeroed())), pbtdi, core::mem::transmute(pcserviceinout), core::mem::transmute(pguidservices.unwrap_or(core::mem::zeroed()))) } + unsafe { BluetoothEnumerateInstalledServices(hradio.unwrap_or(core::mem::zeroed()) as _, pbtdi, pcserviceinout as _, pguidservices.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn BluetoothFindDeviceClose(hfind: HBLUETOOTH_DEVICE_FIND) -> windows_core::Result<()> { @@ -41,24 +41,24 @@ pub unsafe fn BluetoothFindDeviceClose(hfind: HBLUETOOTH_DEVICE_FIND) -> windows #[inline] pub unsafe fn BluetoothFindFirstDevice(pbtsp: *const BLUETOOTH_DEVICE_SEARCH_PARAMS, pbtdi: *mut BLUETOOTH_DEVICE_INFO) -> windows_core::Result { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothFindFirstDevice(pbtsp : *const BLUETOOTH_DEVICE_SEARCH_PARAMS, pbtdi : *mut BLUETOOTH_DEVICE_INFO) -> HBLUETOOTH_DEVICE_FIND); - let result__ = unsafe { BluetoothFindFirstDevice(pbtsp, core::mem::transmute(pbtdi)) }; + let result__ = unsafe { BluetoothFindFirstDevice(pbtsp, pbtdi as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] pub unsafe fn BluetoothFindFirstRadio(pbtfrp: *const BLUETOOTH_FIND_RADIO_PARAMS, phradio: *mut super::super::Foundation::HANDLE) -> windows_core::Result { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothFindFirstRadio(pbtfrp : *const BLUETOOTH_FIND_RADIO_PARAMS, phradio : *mut super::super::Foundation:: HANDLE) -> HBLUETOOTH_RADIO_FIND); - let result__ = unsafe { BluetoothFindFirstRadio(pbtfrp, core::mem::transmute(phradio)) }; + let result__ = unsafe { BluetoothFindFirstRadio(pbtfrp, phradio as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] 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); - unsafe { BluetoothFindNextDevice(hfind, core::mem::transmute(pbtdi)).ok() } + unsafe { BluetoothFindNextDevice(hfind, pbtdi as _).ok() } } #[inline] 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); - unsafe { BluetoothFindNextRadio(hfind, core::mem::transmute(phradio)).ok() } + unsafe { BluetoothFindNextRadio(hfind, phradio as _).ok() } } #[inline] pub unsafe fn BluetoothFindRadioClose(hfind: HBLUETOOTH_RADIO_FIND) -> windows_core::Result<()> { @@ -73,7 +73,7 @@ pub unsafe fn BluetoothGATTAbortReliableWrite(hdevice: super::super::Foundation: #[inline] 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); - unsafe { BluetoothGATTBeginReliableWrite(hdevice, core::mem::transmute(reliablewritecontext), flags).ok() } + unsafe { BluetoothGATTBeginReliableWrite(hdevice, reliablewritecontext as _, flags).ok() } } #[inline] pub unsafe fn BluetoothGATTEndReliableWrite(hdevice: super::super::Foundation::HANDLE, reliablewritecontext: u64, flags: u32) -> windows_core::Result<()> { @@ -83,42 +83,42 @@ pub unsafe fn BluetoothGATTEndReliableWrite(hdevice: super::super::Foundation::H #[inline] 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); - unsafe { BluetoothGATTGetCharacteristicValue(hdevice, characteristic, characteristicvaluedatasize, core::mem::transmute(characteristicvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(characteristicvaluesizerequired.unwrap_or(core::mem::zeroed())), flags).ok() } + unsafe { BluetoothGATTGetCharacteristicValue(hdevice, characteristic, characteristicvaluedatasize, characteristicvalue.unwrap_or(core::mem::zeroed()) as _, characteristicvaluesizerequired.unwrap_or(core::mem::zeroed()) as _, flags).ok() } } #[inline] 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); - unsafe { BluetoothGATTGetCharacteristics(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), flags).ok() } + unsafe { BluetoothGATTGetCharacteristics(hdevice, service.unwrap_or(core::mem::zeroed()) as _, characteristicsbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(characteristicsbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), characteristicsbufferactual as _, flags).ok() } } #[inline] 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); - unsafe { BluetoothGATTGetDescriptorValue(hdevice, descriptor, descriptorvaluedatasize, core::mem::transmute(descriptorvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(descriptorvaluesizerequired.unwrap_or(core::mem::zeroed())), flags).ok() } + unsafe { BluetoothGATTGetDescriptorValue(hdevice, descriptor, descriptorvaluedatasize, descriptorvalue.unwrap_or(core::mem::zeroed()) as _, descriptorvaluesizerequired.unwrap_or(core::mem::zeroed()) as _, flags).ok() } } #[inline] 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); - unsafe { BluetoothGATTGetDescriptors(hdevice, 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), flags).ok() } + unsafe { BluetoothGATTGetDescriptors(hdevice, 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())), descriptorsbufferactual as _, flags).ok() } } #[inline] 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); - unsafe { BluetoothGATTGetIncludedServices(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), flags).ok() } + unsafe { BluetoothGATTGetIncludedServices(hdevice, parentservice.unwrap_or(core::mem::zeroed()) as _, includedservicesbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(includedservicesbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), includedservicesbufferactual as _, flags).ok() } } #[inline] 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); - unsafe { BluetoothGATTGetServices(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), flags).ok() } + unsafe { BluetoothGATTGetServices(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())), servicesbufferactual as _, flags).ok() } } #[inline] 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); - unsafe { BluetoothGATTRegisterEvent(hservice, eventtype, eventparameterin, callback, core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(peventhandle), flags).ok() } + unsafe { BluetoothGATTRegisterEvent(hservice, eventtype, eventparameterin, callback, callbackcontext.unwrap_or(core::mem::zeroed()) as _, peventhandle as _, flags).ok() } } #[inline] 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); - unsafe { BluetoothGATTSetCharacteristicValue(hdevice, characteristic, characteristicvalue, core::mem::transmute(reliablewritecontext.unwrap_or(core::mem::zeroed())), flags).ok() } + unsafe { BluetoothGATTSetCharacteristicValue(hdevice, characteristic, characteristicvalue, reliablewritecontext.unwrap_or(core::mem::zeroed()) as _, flags).ok() } } #[inline] 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<()> { @@ -133,22 +133,22 @@ pub unsafe fn BluetoothGATTUnregisterEvent(eventhandle: isize, flags: u32) -> wi #[inline] 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); - unsafe { BluetoothGetDeviceInfo(core::mem::transmute(hradio.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbtdi)) } + unsafe { BluetoothGetDeviceInfo(hradio.unwrap_or(core::mem::zeroed()) as _, pbtdi as _) } } #[inline] 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); - unsafe { BluetoothGetRadioInfo(hradio, core::mem::transmute(pradioinfo)) } + unsafe { BluetoothGetRadioInfo(hradio, pradioinfo as _) } } #[inline] 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); - unsafe { BluetoothIsConnectable(core::mem::transmute(hradio.unwrap_or(core::mem::zeroed()))) } + unsafe { BluetoothIsConnectable(hradio.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { BluetoothIsDiscoverable(core::mem::transmute(hradio.unwrap_or(core::mem::zeroed()))) } + unsafe { BluetoothIsDiscoverable(hradio.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn BluetoothIsVersionAvailable(majorversion: u8, minorversion: u8) -> super::super::Foundation::BOOL { @@ -158,12 +158,12 @@ pub unsafe fn BluetoothIsVersionAvailable(majorversion: u8, minorversion: u8) -> #[inline] 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); - unsafe { 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()))) } + unsafe { BluetoothRegisterForAuthentication(pbtdi.unwrap_or(core::mem::zeroed()) as _, phreghandle as _, pfncallback.unwrap_or(core::mem::zeroed()) as _, pvparam.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { 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()))) } + unsafe { BluetoothRegisterForAuthenticationEx(pbtdiin.unwrap_or(core::mem::zeroed()) as _, phreghandleout as _, pfncallbackin.unwrap_or(core::mem::zeroed()) as _, pvparam.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn BluetoothRemoveDevice(paddress: *const BLUETOOTH_ADDRESS) -> u32 { @@ -178,32 +178,32 @@ pub unsafe fn BluetoothSdpEnumAttributes(psdpstream: &[u8], pfncallback: PFN_BLU #[inline] pub unsafe fn BluetoothSdpGetAttributeValue(precordstream: &[u8], usattributeid: u16, pattributedata: *mut SDP_ELEMENT_DATA) -> u32 { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothSdpGetAttributeValue(precordstream : *const u8, cbrecordlength : u32, usattributeid : u16, pattributedata : *mut SDP_ELEMENT_DATA) -> u32); - unsafe { BluetoothSdpGetAttributeValue(core::mem::transmute(precordstream.as_ptr()), precordstream.len().try_into().unwrap(), usattributeid, core::mem::transmute(pattributedata)) } + unsafe { BluetoothSdpGetAttributeValue(core::mem::transmute(precordstream.as_ptr()), precordstream.len().try_into().unwrap(), usattributeid, pattributedata as _) } } #[inline] pub unsafe fn BluetoothSdpGetContainerElementData(pcontainerstream: &[u8], pelement: *mut isize, pdata: *mut SDP_ELEMENT_DATA) -> u32 { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothSdpGetContainerElementData(pcontainerstream : *const u8, cbcontainerlength : u32, pelement : *mut isize, pdata : *mut SDP_ELEMENT_DATA) -> u32); - unsafe { BluetoothSdpGetContainerElementData(core::mem::transmute(pcontainerstream.as_ptr()), pcontainerstream.len().try_into().unwrap(), core::mem::transmute(pelement), core::mem::transmute(pdata)) } + unsafe { BluetoothSdpGetContainerElementData(core::mem::transmute(pcontainerstream.as_ptr()), pcontainerstream.len().try_into().unwrap(), pelement as _, pdata as _) } } #[inline] pub unsafe fn BluetoothSdpGetElementData(psdpstream: &[u8], pdata: *mut SDP_ELEMENT_DATA) -> u32 { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothSdpGetElementData(psdpstream : *const u8, cbsdpstreamlength : u32, pdata : *mut SDP_ELEMENT_DATA) -> u32); - unsafe { BluetoothSdpGetElementData(core::mem::transmute(psdpstream.as_ptr()), psdpstream.len().try_into().unwrap(), core::mem::transmute(pdata)) } + unsafe { BluetoothSdpGetElementData(core::mem::transmute(psdpstream.as_ptr()), psdpstream.len().try_into().unwrap(), pdata as _) } } #[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); - unsafe { BluetoothSdpGetString(core::mem::transmute(precordstream.as_ptr()), precordstream.len().try_into().unwrap(), core::mem::transmute(pstringdata.unwrap_or(core::mem::zeroed())), usstringoffset, core::mem::transmute(pszstring), core::mem::transmute(pcchstringlength)) } + unsafe { BluetoothSdpGetString(core::mem::transmute(precordstream.as_ptr()), precordstream.len().try_into().unwrap(), pstringdata.unwrap_or(core::mem::zeroed()) as _, usstringoffset, core::mem::transmute(pszstring), pcchstringlength as _) } } #[inline] pub unsafe fn BluetoothSelectDevices(pbtsdp: *mut BLUETOOTH_SELECT_DEVICE_PARAMS) -> windows_core::Result<()> { windows_targets::link!("bthprops.cpl" "system" fn BluetoothSelectDevices(pbtsdp : *mut BLUETOOTH_SELECT_DEVICE_PARAMS) -> super::super::Foundation:: BOOL); - unsafe { BluetoothSelectDevices(core::mem::transmute(pbtsdp)).ok() } + unsafe { BluetoothSelectDevices(pbtsdp as _).ok() } } #[inline] pub unsafe fn BluetoothSelectDevicesFree(pbtsdp: *mut BLUETOOTH_SELECT_DEVICE_PARAMS) -> super::super::Foundation::BOOL { windows_targets::link!("bthprops.cpl" "system" fn BluetoothSelectDevicesFree(pbtsdp : *mut BLUETOOTH_SELECT_DEVICE_PARAMS) -> super::super::Foundation:: BOOL); - unsafe { BluetoothSelectDevicesFree(core::mem::transmute(pbtsdp)) } + unsafe { BluetoothSelectDevicesFree(pbtsdp as _) } } #[inline] pub unsafe fn BluetoothSendAuthenticationResponse(hradio: Option, pbtdi: *const BLUETOOTH_DEVICE_INFO, pszpasskey: P2) -> u32 @@ -211,22 +211,22 @@ where 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); - unsafe { BluetoothSendAuthenticationResponse(core::mem::transmute(hradio.unwrap_or(core::mem::zeroed())), pbtdi, pszpasskey.param().abi()) } + unsafe { BluetoothSendAuthenticationResponse(hradio.unwrap_or(core::mem::zeroed()) as _, pbtdi, pszpasskey.param().abi()) } } #[inline] 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); - unsafe { BluetoothSendAuthenticationResponseEx(core::mem::transmute(hradioin.unwrap_or(core::mem::zeroed())), pauthresponse) } + unsafe { BluetoothSendAuthenticationResponseEx(hradioin.unwrap_or(core::mem::zeroed()) as _, pauthresponse) } } #[inline] 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); - unsafe { BluetoothSetLocalServiceInfo(core::mem::transmute(hradioin.unwrap_or(core::mem::zeroed())), pclassguid, ulinstance, pserviceinfoin) } + unsafe { BluetoothSetLocalServiceInfo(hradioin.unwrap_or(core::mem::zeroed()) as _, pclassguid, ulinstance, pserviceinfoin) } } #[inline] 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); - unsafe { BluetoothSetServiceState(core::mem::transmute(hradio.unwrap_or(core::mem::zeroed())), pbtdi, pguidservice, dwserviceflags) } + unsafe { BluetoothSetServiceState(hradio.unwrap_or(core::mem::zeroed()) as _, pbtdi, pguidservice, 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 443c7a169d..2b83b1a03c 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Communication/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Communication/mod.rs @@ -4,7 +4,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn BuildCommDCBA(lpdef : windows_core::PCSTR, lpdcb : *mut DCB) -> super::super::Foundation:: BOOL); - unsafe { BuildCommDCBA(lpdef.param().abi(), core::mem::transmute(lpdcb)).ok() } + unsafe { BuildCommDCBA(lpdef.param().abi(), lpdcb as _).ok() } } #[inline] pub unsafe fn BuildCommDCBAndTimeoutsA(lpdef: P0, lpdcb: *mut DCB, lpcommtimeouts: *mut COMMTIMEOUTS) -> windows_core::Result<()> @@ -12,7 +12,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn BuildCommDCBAndTimeoutsA(lpdef : windows_core::PCSTR, lpdcb : *mut DCB, lpcommtimeouts : *mut COMMTIMEOUTS) -> super::super::Foundation:: BOOL); - unsafe { BuildCommDCBAndTimeoutsA(lpdef.param().abi(), core::mem::transmute(lpdcb), core::mem::transmute(lpcommtimeouts)).ok() } + unsafe { BuildCommDCBAndTimeoutsA(lpdef.param().abi(), lpdcb as _, lpcommtimeouts as _).ok() } } #[inline] pub unsafe fn BuildCommDCBAndTimeoutsW(lpdef: P0, lpdcb: *mut DCB, lpcommtimeouts: *mut COMMTIMEOUTS) -> windows_core::Result<()> @@ -20,7 +20,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn BuildCommDCBAndTimeoutsW(lpdef : windows_core::PCWSTR, lpdcb : *mut DCB, lpcommtimeouts : *mut COMMTIMEOUTS) -> super::super::Foundation:: BOOL); - unsafe { BuildCommDCBAndTimeoutsW(lpdef.param().abi(), core::mem::transmute(lpdcb), core::mem::transmute(lpcommtimeouts)).ok() } + unsafe { BuildCommDCBAndTimeoutsW(lpdef.param().abi(), lpdcb as _, lpcommtimeouts as _).ok() } } #[inline] pub unsafe fn BuildCommDCBW(lpdef: P0, lpdcb: *mut DCB) -> windows_core::Result<()> @@ -28,7 +28,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn BuildCommDCBW(lpdef : windows_core::PCWSTR, lpdcb : *mut DCB) -> super::super::Foundation:: BOOL); - unsafe { BuildCommDCBW(lpdef.param().abi(), core::mem::transmute(lpdcb)).ok() } + unsafe { BuildCommDCBW(lpdef.param().abi(), lpdcb as _).ok() } } #[inline] pub unsafe fn ClearCommBreak(hfile: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -38,7 +38,7 @@ pub unsafe fn ClearCommBreak(hfile: super::super::Foundation::HANDLE) -> windows #[inline] 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); - unsafe { ClearCommError(hfile, core::mem::transmute(lperrors.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpstat.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ClearCommError(hfile, lperrors.unwrap_or(core::mem::zeroed()) as _, lpstat.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CommConfigDialogA(lpszname: P0, hwnd: Option, lpcc: *mut COMMCONFIG) -> windows_core::Result<()> @@ -46,7 +46,7 @@ where P0: 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); - unsafe { CommConfigDialogA(lpszname.param().abi(), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcc)).ok() } + unsafe { CommConfigDialogA(lpszname.param().abi(), hwnd.unwrap_or(core::mem::zeroed()) as _, lpcc as _).ok() } } #[inline] pub unsafe fn CommConfigDialogW(lpszname: P0, hwnd: Option, lpcc: *mut COMMCONFIG) -> windows_core::Result<()> @@ -54,7 +54,7 @@ where P0: 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); - unsafe { CommConfigDialogW(lpszname.param().abi(), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcc)).ok() } + unsafe { CommConfigDialogW(lpszname.param().abi(), hwnd.unwrap_or(core::mem::zeroed()) as _, lpcc as _).ok() } } #[inline] pub unsafe fn EscapeCommFunction(hfile: super::super::Foundation::HANDLE, dwfunc: ESCAPE_COMM_FUNCTION) -> windows_core::Result<()> { @@ -64,37 +64,37 @@ pub unsafe fn EscapeCommFunction(hfile: super::super::Foundation::HANDLE, dwfunc #[inline] 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); - unsafe { GetCommConfig(hcommdev, core::mem::transmute(lpcc.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwsize)).ok() } + unsafe { GetCommConfig(hcommdev, lpcc.unwrap_or(core::mem::zeroed()) as _, lpdwsize as _).ok() } } #[inline] 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); - unsafe { GetCommMask(hfile, core::mem::transmute(lpevtmask)).ok() } + unsafe { GetCommMask(hfile, lpevtmask as _).ok() } } #[inline] 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); - unsafe { GetCommModemStatus(hfile, core::mem::transmute(lpmodemstat)).ok() } + unsafe { GetCommModemStatus(hfile, lpmodemstat as _).ok() } } #[inline] pub unsafe fn GetCommPorts(lpportnumbers: &mut [u32], puportnumbersfound: *mut u32) -> u32 { windows_targets::link!("api-ms-win-core-comm-l1-1-2.dll" "system" fn GetCommPorts(lpportnumbers : *mut u32, uportnumberscount : u32, puportnumbersfound : *mut u32) -> u32); - unsafe { GetCommPorts(core::mem::transmute(lpportnumbers.as_ptr()), lpportnumbers.len().try_into().unwrap(), core::mem::transmute(puportnumbersfound)) } + unsafe { GetCommPorts(core::mem::transmute(lpportnumbers.as_ptr()), lpportnumbers.len().try_into().unwrap(), puportnumbersfound as _) } } #[inline] 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); - unsafe { GetCommProperties(hfile, core::mem::transmute(lpcommprop)).ok() } + unsafe { GetCommProperties(hfile, lpcommprop as _).ok() } } #[inline] 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); - unsafe { GetCommState(hfile, core::mem::transmute(lpdcb)).ok() } + unsafe { GetCommState(hfile, lpdcb as _).ok() } } #[inline] 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); - unsafe { GetCommTimeouts(hfile, core::mem::transmute(lpcommtimeouts)).ok() } + unsafe { GetCommTimeouts(hfile, lpcommtimeouts as _).ok() } } #[inline] pub unsafe fn GetDefaultCommConfigA(lpszname: P0, lpcc: *mut COMMCONFIG, lpdwsize: *mut u32) -> windows_core::Result<()> @@ -102,7 +102,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetDefaultCommConfigA(lpszname : windows_core::PCSTR, lpcc : *mut COMMCONFIG, lpdwsize : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetDefaultCommConfigA(lpszname.param().abi(), core::mem::transmute(lpcc), core::mem::transmute(lpdwsize)).ok() } + unsafe { GetDefaultCommConfigA(lpszname.param().abi(), lpcc as _, lpdwsize as _).ok() } } #[inline] pub unsafe fn GetDefaultCommConfigW(lpszname: P0, lpcc: *mut COMMCONFIG, lpdwsize: *mut u32) -> windows_core::Result<()> @@ -110,7 +110,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetDefaultCommConfigW(lpszname : windows_core::PCWSTR, lpcc : *mut COMMCONFIG, lpdwsize : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetDefaultCommConfigW(lpszname.param().abi(), core::mem::transmute(lpcc), core::mem::transmute(lpdwsize)).ok() } + unsafe { GetDefaultCommConfigW(lpszname.param().abi(), lpcc as _, lpdwsize as _).ok() } } #[inline] pub unsafe fn OpenCommPort(uportnumber: u32, dwdesiredaccess: u32, dwflagsandattributes: u32) -> super::super::Foundation::HANDLE { @@ -177,7 +177,7 @@ pub unsafe fn TransmitCommChar(hfile: super::super::Foundation::HANDLE, cchar: i #[inline] 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); - unsafe { WaitCommEvent(hfile, core::mem::transmute(lpevtmask), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WaitCommEvent(hfile, lpevtmask as _, lpoverlapped.unwrap_or(core::mem::zeroed()) as _).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 b531d57205..83776bbe91 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/DeviceAccess/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/DeviceAccess/mod.rs @@ -131,7 +131,7 @@ windows_core::imp::define_interface!(IDeviceIoControl, IDeviceIoControl_Vtbl, 0x windows_core::imp::interface_hierarchy!(IDeviceIoControl, windows_core::IUnknown); impl IDeviceIoControl { pub unsafe fn DeviceIoControlSync(&self, iocontrolcode: u32, inputbuffer: Option<&[u8]>, outputbuffer: Option<&mut [u8]>, bytesreturned: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DeviceIoControlSync)(windows_core::Interface::as_raw(self), iocontrolcode, core::mem::transmute(inputbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), inputbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), 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()), core::mem::transmute(bytesreturned)).ok() } + unsafe { (windows_core::Interface::vtable(self).DeviceIoControlSync)(windows_core::Interface::as_raw(self), iocontrolcode, core::mem::transmute(inputbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), inputbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), 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()), bytesreturned as _).ok() } } pub unsafe fn DeviceIoControlAsync(&self, iocontrolcode: u32, inputbuffer: Option<&[u8]>, outputbuffer: Option<&mut [u8]>, requestcompletioncallback: P5, cancelcontext: Option<*mut usize>) -> windows_core::Result<()> where @@ -146,7 +146,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::mem::zeroed())), + cancelcontext.unwrap_or(core::mem::zeroed()) as _, ) .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 7fe958a7ea..b82de7e84f 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/DeviceAndDriverInstallation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/DeviceAndDriverInstallation/mod.rs @@ -7,13 +7,13 @@ pub unsafe fn CMP_WaitNoPendingInstallEvents(dwtimeout: u32) -> u32 { #[inline] pub unsafe fn CM_Add_Empty_Log_Conf(plclogconf: *mut usize, dndevinst: u32, priority: super::super::Data::HtmlHelp::PRIORITY, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Add_Empty_Log_Conf(plclogconf : *mut usize, dndevinst : u32, priority : super::super::Data::HtmlHelp:: PRIORITY, ulflags : u32) -> CONFIGRET); - unsafe { CM_Add_Empty_Log_Conf(core::mem::transmute(plclogconf), dndevinst, priority, ulflags) } + unsafe { CM_Add_Empty_Log_Conf(plclogconf as _, dndevinst, priority, ulflags) } } #[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: 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); - unsafe { CM_Add_Empty_Log_Conf_Ex(core::mem::transmute(plclogconf), dndevinst, priority, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Add_Empty_Log_Conf_Ex(plclogconf as _, dndevinst, priority, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Add_IDA(dndevinst: u32, pszid: P1, ulflags: u32) -> CONFIGRET @@ -37,7 +37,7 @@ 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); - unsafe { CM_Add_ID_ExA(dndevinst, pszid.param().abi(), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Add_ID_ExA(dndevinst, pszid.param().abi(), ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Add_ID_ExW(dndevinst: u32, pszid: P1, ulflags: u32, hmachine: Option) -> CONFIGRET @@ -45,7 +45,7 @@ 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); - unsafe { CM_Add_ID_ExW(dndevinst, pszid.param().abi(), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Add_ID_ExW(dndevinst, pszid.param().abi(), ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CM_Add_Res_Des(core::mem::transmute(prdresdes.unwrap_or(core::mem::zeroed())), lclogconf, resourceid, resourcedata, resourcelen, ulflags) } + unsafe { CM_Add_Res_Des(prdresdes.unwrap_or(core::mem::zeroed()) as _, lclogconf, resourceid, resourcedata, resourcelen, ulflags) } } #[inline] pub unsafe fn CM_Add_Res_Des_Ex(prdresdes: Option<*mut usize>, lclogconf: usize, resourceid: u32, resourcedata: *const core::ffi::c_void, resourcelen: u32, ulflags: u32, hmachine: 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); - unsafe { CM_Add_Res_Des_Ex(core::mem::transmute(prdresdes.unwrap_or(core::mem::zeroed())), lclogconf, resourceid, resourcedata, resourcelen, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Add_Res_Des_Ex(prdresdes.unwrap_or(core::mem::zeroed()) as _, lclogconf, resourceid, resourcedata, resourcelen, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Connect_MachineA(uncservername: P0, phmachine: *mut isize) -> CONFIGRET @@ -68,7 +68,7 @@ where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Connect_MachineA(uncservername : windows_core::PCSTR, phmachine : *mut isize) -> CONFIGRET); - unsafe { CM_Connect_MachineA(uncservername.param().abi(), core::mem::transmute(phmachine)) } + unsafe { CM_Connect_MachineA(uncservername.param().abi(), phmachine as _) } } #[inline] pub unsafe fn CM_Connect_MachineW(uncservername: P0, phmachine: *mut isize) -> CONFIGRET @@ -76,7 +76,7 @@ where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Connect_MachineW(uncservername : windows_core::PCWSTR, phmachine : *mut isize) -> CONFIGRET); - unsafe { CM_Connect_MachineW(uncservername.param().abi(), core::mem::transmute(phmachine)) } + unsafe { CM_Connect_MachineW(uncservername.param().abi(), phmachine as _) } } #[inline] pub unsafe fn CM_Create_DevNodeA(pdndevinst: *mut u32, pdeviceid: P1, dnparent: u32, ulflags: u32) -> CONFIGRET @@ -84,7 +84,7 @@ where P1: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Create_DevNodeA(pdndevinst : *mut u32, pdeviceid : windows_core::PCSTR, dnparent : u32, ulflags : u32) -> CONFIGRET); - unsafe { CM_Create_DevNodeA(core::mem::transmute(pdndevinst), pdeviceid.param().abi(), dnparent, ulflags) } + unsafe { CM_Create_DevNodeA(pdndevinst as _, pdeviceid.param().abi(), dnparent, ulflags) } } #[inline] pub unsafe fn CM_Create_DevNodeW(pdndevinst: *mut u32, pdeviceid: P1, dnparent: u32, ulflags: u32) -> CONFIGRET @@ -92,7 +92,7 @@ where P1: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Create_DevNodeW(pdndevinst : *mut u32, pdeviceid : windows_core::PCWSTR, dnparent : u32, ulflags : u32) -> CONFIGRET); - unsafe { CM_Create_DevNodeW(core::mem::transmute(pdndevinst), pdeviceid.param().abi(), dnparent, ulflags) } + unsafe { CM_Create_DevNodeW(pdndevinst as _, pdeviceid.param().abi(), dnparent, ulflags) } } #[inline] pub unsafe fn CM_Create_DevNode_ExA(pdndevinst: *mut u32, pdeviceid: P1, dnparent: u32, ulflags: u32, hmachine: Option) -> CONFIGRET @@ -100,7 +100,7 @@ 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); - unsafe { CM_Create_DevNode_ExA(core::mem::transmute(pdndevinst), pdeviceid.param().abi(), dnparent, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Create_DevNode_ExA(pdndevinst as _, pdeviceid.param().abi(), dnparent, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Create_DevNode_ExW(pdndevinst: *mut u32, pdeviceid: P1, dnparent: u32, ulflags: u32, hmachine: Option) -> CONFIGRET @@ -108,12 +108,12 @@ 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); - unsafe { CM_Create_DevNode_ExW(core::mem::transmute(pdndevinst), pdeviceid.param().abi(), dnparent, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Create_DevNode_ExW(pdndevinst as _, pdeviceid.param().abi(), dnparent, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Create_Range_List(prlh: *mut usize, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Create_Range_List(prlh : *mut usize, ulflags : u32) -> CONFIGRET); - unsafe { CM_Create_Range_List(core::mem::transmute(prlh), ulflags) } + unsafe { CM_Create_Range_List(prlh as _, ulflags) } } #[inline] pub unsafe fn CM_Delete_Class_Key(classguid: *const windows_core::GUID, ulflags: u32) -> CONFIGRET { @@ -123,7 +123,7 @@ pub unsafe fn CM_Delete_Class_Key(classguid: *const windows_core::GUID, ulflags: #[inline] 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); - unsafe { CM_Delete_Class_Key_Ex(classguid, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Delete_Class_Key_Ex(classguid, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Delete_DevNode_Key(dndevnode: u32, ulhardwareprofile: u32, ulflags: u32) -> CONFIGRET { @@ -133,7 +133,7 @@ pub unsafe fn CM_Delete_DevNode_Key(dndevnode: u32, ulhardwareprofile: u32, ulfl #[inline] 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); - unsafe { CM_Delete_DevNode_Key_Ex(dndevnode, ulhardwareprofile, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Delete_DevNode_Key_Ex(dndevnode, ulhardwareprofile, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Delete_Device_Interface_KeyA(pszdeviceinterface: P0, ulflags: u32) -> CONFIGRET @@ -157,7 +157,7 @@ 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); - unsafe { CM_Delete_Device_Interface_Key_ExA(pszdeviceinterface.param().abi(), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Delete_Device_Interface_Key_ExA(pszdeviceinterface.param().abi(), ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Delete_Device_Interface_Key_ExW(pszdeviceinterface: P0, ulflags: u32, hmachine: Option) -> CONFIGRET @@ -165,7 +165,7 @@ 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); - unsafe { CM_Delete_Device_Interface_Key_ExW(pszdeviceinterface.param().abi(), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Delete_Device_Interface_Key_ExW(pszdeviceinterface.param().abi(), ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Delete_Range(ullstartvalue: u64, ullendvalue: u64, rlh: usize, ulflags: u32) -> CONFIGRET { @@ -175,12 +175,12 @@ pub unsafe fn CM_Delete_Range(ullstartvalue: u64, ullendvalue: u64, rlh: usize, #[inline] pub unsafe fn CM_Detect_Resource_Conflict(dndevinst: u32, resourceid: u32, resourcedata: *const core::ffi::c_void, resourcelen: u32, pbconflictdetected: *mut super::super::Foundation::BOOL, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Detect_Resource_Conflict(dndevinst : u32, resourceid : u32, resourcedata : *const core::ffi::c_void, resourcelen : u32, pbconflictdetected : *mut super::super::Foundation:: BOOL, ulflags : u32) -> CONFIGRET); - unsafe { CM_Detect_Resource_Conflict(dndevinst, resourceid, resourcedata, resourcelen, core::mem::transmute(pbconflictdetected), ulflags) } + unsafe { CM_Detect_Resource_Conflict(dndevinst, resourceid, resourcedata, resourcelen, pbconflictdetected as _, 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: 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); - unsafe { CM_Detect_Resource_Conflict_Ex(dndevinst, resourceid, resourcedata, resourcelen, core::mem::transmute(pbconflictdetected), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Detect_Resource_Conflict_Ex(dndevinst, resourceid, resourcedata, resourcelen, pbconflictdetected as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Disable_DevNode(dndevinst: u32, ulflags: u32) -> CONFIGRET { @@ -190,12 +190,12 @@ pub unsafe fn CM_Disable_DevNode(dndevinst: u32, ulflags: u32) -> CONFIGRET { #[inline] 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); - unsafe { CM_Disable_DevNode_Ex(dndevinst, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Disable_DevNode_Ex(dndevinst, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Disconnect_Machine(hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Disconnect_Machine(hmachine : isize) -> CONFIGRET); - unsafe { CM_Disconnect_Machine(core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Disconnect_Machine(hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Dup_Range_List(rlhold: usize, rlhnew: usize, ulflags: u32) -> CONFIGRET { @@ -210,47 +210,47 @@ pub unsafe fn CM_Enable_DevNode(dndevinst: u32, ulflags: u32) -> CONFIGRET { #[inline] 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); - unsafe { CM_Enable_DevNode_Ex(dndevinst, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Enable_DevNode_Ex(dndevinst, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Enumerate_Classes(ulclassindex: u32, classguid: *mut windows_core::GUID, ulflags: CM_ENUMERATE_FLAGS) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Enumerate_Classes(ulclassindex : u32, classguid : *mut windows_core::GUID, ulflags : CM_ENUMERATE_FLAGS) -> CONFIGRET); - unsafe { CM_Enumerate_Classes(ulclassindex, core::mem::transmute(classguid), ulflags) } + unsafe { CM_Enumerate_Classes(ulclassindex, classguid as _, ulflags) } } #[inline] 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); - unsafe { CM_Enumerate_Classes_Ex(ulclassindex, core::mem::transmute(classguid), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Enumerate_Classes_Ex(ulclassindex, classguid as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Enumerate_EnumeratorsA(ulenumindex: u32, buffer: windows_core::PSTR, pullength: *mut u32, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Enumerate_EnumeratorsA(ulenumindex : u32, buffer : windows_core::PSTR, pullength : *mut u32, ulflags : u32) -> CONFIGRET); - unsafe { CM_Enumerate_EnumeratorsA(ulenumindex, core::mem::transmute(buffer), core::mem::transmute(pullength), ulflags) } + unsafe { CM_Enumerate_EnumeratorsA(ulenumindex, core::mem::transmute(buffer), pullength as _, ulflags) } } #[inline] pub unsafe fn CM_Enumerate_EnumeratorsW(ulenumindex: u32, buffer: windows_core::PWSTR, pullength: *mut u32, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Enumerate_EnumeratorsW(ulenumindex : u32, buffer : windows_core::PWSTR, pullength : *mut u32, ulflags : u32) -> CONFIGRET); - unsafe { CM_Enumerate_EnumeratorsW(ulenumindex, core::mem::transmute(buffer), core::mem::transmute(pullength), ulflags) } + unsafe { CM_Enumerate_EnumeratorsW(ulenumindex, core::mem::transmute(buffer), pullength as _, ulflags) } } #[inline] 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); - unsafe { CM_Enumerate_Enumerators_ExA(ulenumindex, core::mem::transmute(buffer), core::mem::transmute(pullength), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Enumerate_Enumerators_ExA(ulenumindex, core::mem::transmute(buffer), pullength as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { CM_Enumerate_Enumerators_ExW(ulenumindex, core::mem::transmute(buffer), core::mem::transmute(pullength), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Enumerate_Enumerators_ExW(ulenumindex, core::mem::transmute(buffer), pullength as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Find_Range(pullstart: *mut u64, ullstart: u64, ullength: u32, ullalignment: u64, ullend: u64, rlh: usize, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Find_Range(pullstart : *mut u64, ullstart : u64, ullength : u32, ullalignment : u64, ullend : u64, rlh : usize, ulflags : u32) -> CONFIGRET); - unsafe { CM_Find_Range(core::mem::transmute(pullstart), ullstart, ullength, ullalignment, ullend, rlh, ulflags) } + unsafe { CM_Find_Range(pullstart as _, ullstart, ullength, ullalignment, ullend, rlh, ulflags) } } #[inline] pub unsafe fn CM_First_Range(rlh: usize, pullstart: *mut u64, pullend: *mut u64, preelement: *mut usize, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_First_Range(rlh : usize, pullstart : *mut u64, pullend : *mut u64, preelement : *mut usize, ulflags : u32) -> CONFIGRET); - unsafe { CM_First_Range(rlh, core::mem::transmute(pullstart), core::mem::transmute(pullend), core::mem::transmute(preelement), ulflags) } + unsafe { CM_First_Range(rlh, pullstart as _, pullend as _, preelement as _, ulflags) } } #[inline] pub unsafe fn CM_Free_Log_Conf(lclogconftobefreed: usize, ulflags: u32) -> CONFIGRET { @@ -260,7 +260,7 @@ pub unsafe fn CM_Free_Log_Conf(lclogconftobefreed: usize, ulflags: u32) -> CONFI #[inline] 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); - unsafe { CM_Free_Log_Conf_Ex(lclogconftobefreed, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Free_Log_Conf_Ex(lclogconftobefreed, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CM_Free_Res_Des(core::mem::transmute(prdresdes.unwrap_or(core::mem::zeroed())), rdresdes, ulflags) } + unsafe { CM_Free_Res_Des(prdresdes.unwrap_or(core::mem::zeroed()) as _, rdresdes, ulflags) } } #[inline] 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); - unsafe { CM_Free_Res_Des_Ex(core::mem::transmute(prdresdes.unwrap_or(core::mem::zeroed())), rdresdes, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Free_Res_Des_Ex(prdresdes.unwrap_or(core::mem::zeroed()) as _, rdresdes, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Free_Res_Des_Handle(rdresdes: usize) -> CONFIGRET { @@ -295,94 +295,94 @@ pub unsafe fn CM_Free_Resource_Conflict_Handle(clconflictlist: usize) -> CONFIGR #[inline] pub unsafe fn CM_Get_Child(pdndevinst: *mut u32, dndevinst: u32, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Child(pdndevinst : *mut u32, dndevinst : u32, ulflags : u32) -> CONFIGRET); - unsafe { CM_Get_Child(core::mem::transmute(pdndevinst), dndevinst, ulflags) } + unsafe { CM_Get_Child(pdndevinst as _, dndevinst, ulflags) } } #[inline] 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); - unsafe { CM_Get_Child_Ex(core::mem::transmute(pdndevinst), dndevinst, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Child_Ex(pdndevinst as _, dndevinst, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { CM_Get_Class_Key_NameA(classguid, core::mem::transmute(pszkeyname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), ulflags) } + unsafe { CM_Get_Class_Key_NameA(classguid, pszkeyname.unwrap_or(core::mem::zeroed()) as _, pullength as _, ulflags) } } #[inline] 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); - unsafe { CM_Get_Class_Key_NameW(classguid, core::mem::transmute(pszkeyname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), ulflags) } + unsafe { CM_Get_Class_Key_NameW(classguid, pszkeyname.unwrap_or(core::mem::zeroed()) as _, pullength as _, ulflags) } } #[inline] 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); - unsafe { CM_Get_Class_Key_Name_ExA(classguid, core::mem::transmute(pszkeyname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Class_Key_Name_ExA(classguid, pszkeyname.unwrap_or(core::mem::zeroed()) as _, pullength as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { CM_Get_Class_Key_Name_ExW(classguid, core::mem::transmute(pszkeyname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Class_Key_Name_ExW(classguid, pszkeyname.unwrap_or(core::mem::zeroed()) as _, pullength as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { CM_Get_Class_NameA(classguid, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), ulflags) } + unsafe { CM_Get_Class_NameA(classguid, buffer.unwrap_or(core::mem::zeroed()) as _, pullength as _, ulflags) } } #[inline] 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); - unsafe { CM_Get_Class_NameW(classguid, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), ulflags) } + unsafe { CM_Get_Class_NameW(classguid, buffer.unwrap_or(core::mem::zeroed()) as _, pullength as _, ulflags) } } #[inline] 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); - unsafe { CM_Get_Class_Name_ExA(classguid, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Class_Name_ExA(classguid, buffer.unwrap_or(core::mem::zeroed()) as _, pullength as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { CM_Get_Class_Name_ExW(classguid, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Class_Name_ExW(classguid, buffer.unwrap_or(core::mem::zeroed()) as _, pullength as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CM_Get_Class_PropertyW(classguid, propertykey, core::mem::transmute(propertytype), core::mem::transmute(propertybuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertybuffersize), ulflags) } + unsafe { CM_Get_Class_PropertyW(classguid, propertykey, propertytype as _, propertybuffer.unwrap_or(core::mem::zeroed()) as _, propertybuffersize as _, 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: 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); - unsafe { CM_Get_Class_Property_ExW(classguid, propertykey, core::mem::transmute(propertytype), core::mem::transmute(propertybuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertybuffersize), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Class_Property_ExW(classguid, propertykey, propertytype as _, propertybuffer.unwrap_or(core::mem::zeroed()) as _, propertybuffersize as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CM_Get_Class_Property_Keys(classguid, core::mem::transmute(propertykeyarray.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertykeycount), ulflags) } + unsafe { CM_Get_Class_Property_Keys(classguid, propertykeyarray.unwrap_or(core::mem::zeroed()) as _, propertykeycount as _, 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: 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); - unsafe { CM_Get_Class_Property_Keys_Ex(classguid, core::mem::transmute(propertykeyarray.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertykeycount), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Class_Property_Keys_Ex(classguid, propertykeyarray.unwrap_or(core::mem::zeroed()) as _, propertykeycount as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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: 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); - unsafe { CM_Get_Class_Registry_PropertyA(classguid, ulproperty, core::mem::transmute(pulregdatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Class_Registry_PropertyA(classguid, ulproperty, pulregdatatype.unwrap_or(core::mem::zeroed()) as _, buffer.unwrap_or(core::mem::zeroed()) as _, pullength as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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: 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); - unsafe { CM_Get_Class_Registry_PropertyW(classguid, ulproperty, core::mem::transmute(pulregdatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Class_Registry_PropertyW(classguid, ulproperty, pulregdatatype.unwrap_or(core::mem::zeroed()) as _, buffer.unwrap_or(core::mem::zeroed()) as _, pullength as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Get_Depth(puldepth: *mut u32, dndevinst: u32, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Depth(puldepth : *mut u32, dndevinst : u32, ulflags : u32) -> CONFIGRET); - unsafe { CM_Get_Depth(core::mem::transmute(puldepth), dndevinst, ulflags) } + unsafe { CM_Get_Depth(puldepth as _, dndevinst, ulflags) } } #[inline] 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); - unsafe { CM_Get_Depth_Ex(core::mem::transmute(puldepth), dndevinst, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Depth_Ex(puldepth as _, dndevinst, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CM_Get_DevNode_Custom_PropertyA(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), ulflags) } + unsafe { CM_Get_DevNode_Custom_PropertyA(dndevinst, pszcustompropertyname.param().abi(), pulregdatatype.unwrap_or(core::mem::zeroed()) as _, buffer.unwrap_or(core::mem::zeroed()) as _, pullength as _, 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,7 +398,7 @@ 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); - unsafe { CM_Get_DevNode_Custom_PropertyW(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), ulflags) } + unsafe { CM_Get_DevNode_Custom_PropertyW(dndevinst, pszcustompropertyname.param().abi(), pulregdatatype.unwrap_or(core::mem::zeroed()) as _, buffer.unwrap_or(core::mem::zeroed()) as _, pullength as _, 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: Option) -> CONFIGRET @@ -406,7 +406,7 @@ 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); - unsafe { CM_Get_DevNode_Custom_Property_ExA(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), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_DevNode_Custom_Property_ExA(dndevinst, pszcustompropertyname.param().abi(), pulregdatatype.unwrap_or(core::mem::zeroed()) as _, buffer.unwrap_or(core::mem::zeroed()) as _, pullength as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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: Option) -> CONFIGRET @@ -414,59 +414,59 @@ 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); - unsafe { CM_Get_DevNode_Custom_Property_ExW(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), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_DevNode_Custom_Property_ExW(dndevinst, pszcustompropertyname.param().abi(), pulregdatatype.unwrap_or(core::mem::zeroed()) as _, buffer.unwrap_or(core::mem::zeroed()) as _, pullength as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CM_Get_DevNode_PropertyW(dndevinst, propertykey, core::mem::transmute(propertytype), core::mem::transmute(propertybuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertybuffersize), ulflags) } + unsafe { CM_Get_DevNode_PropertyW(dndevinst, propertykey, propertytype as _, propertybuffer.unwrap_or(core::mem::zeroed()) as _, propertybuffersize as _, 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: 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); - unsafe { CM_Get_DevNode_Property_ExW(dndevinst, propertykey, core::mem::transmute(propertytype), core::mem::transmute(propertybuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertybuffersize), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_DevNode_Property_ExW(dndevinst, propertykey, propertytype as _, propertybuffer.unwrap_or(core::mem::zeroed()) as _, propertybuffersize as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CM_Get_DevNode_Property_Keys(dndevinst, core::mem::transmute(propertykeyarray.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertykeycount), ulflags) } + unsafe { CM_Get_DevNode_Property_Keys(dndevinst, propertykeyarray.unwrap_or(core::mem::zeroed()) as _, propertykeycount as _, 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: 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); - unsafe { CM_Get_DevNode_Property_Keys_Ex(dndevinst, core::mem::transmute(propertykeyarray.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertykeycount), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_DevNode_Property_Keys_Ex(dndevinst, propertykeyarray.unwrap_or(core::mem::zeroed()) as _, propertykeycount as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CM_Get_DevNode_Registry_PropertyA(dndevinst, ulproperty, core::mem::transmute(pulregdatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), ulflags) } + unsafe { CM_Get_DevNode_Registry_PropertyA(dndevinst, ulproperty, pulregdatatype.unwrap_or(core::mem::zeroed()) as _, buffer.unwrap_or(core::mem::zeroed()) as _, pullength as _, 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); - unsafe { CM_Get_DevNode_Registry_PropertyW(dndevinst, ulproperty, core::mem::transmute(pulregdatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), ulflags) } + unsafe { CM_Get_DevNode_Registry_PropertyW(dndevinst, ulproperty, pulregdatatype.unwrap_or(core::mem::zeroed()) as _, buffer.unwrap_or(core::mem::zeroed()) as _, pullength as _, 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: 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); - unsafe { CM_Get_DevNode_Registry_Property_ExA(dndevinst, ulproperty, core::mem::transmute(pulregdatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_DevNode_Registry_Property_ExA(dndevinst, ulproperty, pulregdatatype.unwrap_or(core::mem::zeroed()) as _, buffer.unwrap_or(core::mem::zeroed()) as _, pullength as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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: 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); - unsafe { CM_Get_DevNode_Registry_Property_ExW(dndevinst, ulproperty, core::mem::transmute(pulregdatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_DevNode_Registry_Property_ExW(dndevinst, ulproperty, pulregdatatype.unwrap_or(core::mem::zeroed()) as _, buffer.unwrap_or(core::mem::zeroed()) as _, pullength as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Get_DevNode_Status(pulstatus: *mut CM_DEVNODE_STATUS_FLAGS, pulproblemnumber: *mut CM_PROB, dndevinst: u32, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_DevNode_Status(pulstatus : *mut CM_DEVNODE_STATUS_FLAGS, pulproblemnumber : *mut CM_PROB, dndevinst : u32, ulflags : u32) -> CONFIGRET); - unsafe { CM_Get_DevNode_Status(core::mem::transmute(pulstatus), core::mem::transmute(pulproblemnumber), dndevinst, ulflags) } + unsafe { CM_Get_DevNode_Status(pulstatus as _, pulproblemnumber as _, dndevinst, 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: 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); - unsafe { CM_Get_DevNode_Status_Ex(core::mem::transmute(pulstatus), core::mem::transmute(pulproblemnumber), dndevinst, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_DevNode_Status_Ex(pulstatus as _, pulproblemnumber as _, dndevinst, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Get_Device_IDA(dndevinst: u32, buffer: &mut [u8], ulflags: u32) -> CONFIGRET { @@ -481,12 +481,12 @@ pub unsafe fn CM_Get_Device_IDW(dndevinst: u32, buffer: &mut [u16], ulflags: u32 #[inline] 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); - unsafe { CM_Get_Device_ID_ExA(dndevinst, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Device_ID_ExA(dndevinst, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { CM_Get_Device_ID_ExW(dndevinst, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Device_ID_ExW(dndevinst, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Get_Device_ID_ListA(pszfilter: P0, buffer: &mut [u8], ulflags: u32) -> CONFIGRET @@ -510,7 +510,7 @@ 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); - unsafe { CM_Get_Device_ID_List_ExA(pszfilter.param().abi(), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Device_ID_List_ExA(pszfilter.param().abi(), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Get_Device_ID_List_ExW(pszfilter: P0, buffer: &mut [u16], ulflags: u32, hmachine: Option) -> CONFIGRET @@ -518,7 +518,7 @@ 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); - unsafe { CM_Get_Device_ID_List_ExW(pszfilter.param().abi(), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Device_ID_List_ExW(pszfilter.param().abi(), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Get_Device_ID_List_SizeA(pullen: *mut u32, pszfilter: P1, ulflags: u32) -> CONFIGRET @@ -526,7 +526,7 @@ where P1: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_ID_List_SizeA(pullen : *mut u32, pszfilter : windows_core::PCSTR, ulflags : u32) -> CONFIGRET); - unsafe { CM_Get_Device_ID_List_SizeA(core::mem::transmute(pullen), pszfilter.param().abi(), ulflags) } + unsafe { CM_Get_Device_ID_List_SizeA(pullen as _, pszfilter.param().abi(), ulflags) } } #[inline] pub unsafe fn CM_Get_Device_ID_List_SizeW(pullen: *mut u32, pszfilter: P1, ulflags: u32) -> CONFIGRET @@ -534,7 +534,7 @@ where P1: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_ID_List_SizeW(pullen : *mut u32, pszfilter : windows_core::PCWSTR, ulflags : u32) -> CONFIGRET); - unsafe { CM_Get_Device_ID_List_SizeW(core::mem::transmute(pullen), pszfilter.param().abi(), ulflags) } + unsafe { CM_Get_Device_ID_List_SizeW(pullen as _, pszfilter.param().abi(), ulflags) } } #[inline] pub unsafe fn CM_Get_Device_ID_List_Size_ExA(pullen: *mut u32, pszfilter: P1, ulflags: u32, hmachine: Option) -> CONFIGRET @@ -542,7 +542,7 @@ 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); - unsafe { CM_Get_Device_ID_List_Size_ExA(core::mem::transmute(pullen), pszfilter.param().abi(), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Device_ID_List_Size_ExA(pullen as _, pszfilter.param().abi(), ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Get_Device_ID_List_Size_ExW(pullen: *mut u32, pszfilter: P1, ulflags: u32, hmachine: Option) -> CONFIGRET @@ -550,17 +550,17 @@ 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); - unsafe { CM_Get_Device_ID_List_Size_ExW(core::mem::transmute(pullen), pszfilter.param().abi(), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Device_ID_List_Size_ExW(pullen as _, pszfilter.param().abi(), ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Get_Device_ID_Size(pullen: *mut u32, dndevinst: u32, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_ID_Size(pullen : *mut u32, dndevinst : u32, ulflags : u32) -> CONFIGRET); - unsafe { CM_Get_Device_ID_Size(core::mem::transmute(pullen), dndevinst, ulflags) } + unsafe { CM_Get_Device_ID_Size(pullen as _, dndevinst, ulflags) } } #[inline] 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); - unsafe { CM_Get_Device_ID_Size_Ex(core::mem::transmute(pullen), dndevinst, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Device_ID_Size_Ex(pullen as _, dndevinst, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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 @@ -568,7 +568,7 @@ where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_Interface_AliasA(pszdeviceinterface : windows_core::PCSTR, aliasinterfaceguid : *const windows_core::GUID, pszaliasdeviceinterface : windows_core::PSTR, pullength : *mut u32, ulflags : u32) -> CONFIGRET); - unsafe { CM_Get_Device_Interface_AliasA(pszdeviceinterface.param().abi(), aliasinterfaceguid, core::mem::transmute(pszaliasdeviceinterface), core::mem::transmute(pullength), ulflags) } + unsafe { CM_Get_Device_Interface_AliasA(pszdeviceinterface.param().abi(), aliasinterfaceguid, core::mem::transmute(pszaliasdeviceinterface), pullength as _, ulflags) } } #[inline] pub unsafe fn CM_Get_Device_Interface_AliasW(pszdeviceinterface: P0, aliasinterfaceguid: *const windows_core::GUID, pszaliasdeviceinterface: windows_core::PWSTR, pullength: *mut u32, ulflags: u32) -> CONFIGRET @@ -576,7 +576,7 @@ where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_Interface_AliasW(pszdeviceinterface : windows_core::PCWSTR, aliasinterfaceguid : *const windows_core::GUID, pszaliasdeviceinterface : windows_core::PWSTR, pullength : *mut u32, ulflags : u32) -> CONFIGRET); - unsafe { CM_Get_Device_Interface_AliasW(pszdeviceinterface.param().abi(), aliasinterfaceguid, core::mem::transmute(pszaliasdeviceinterface), core::mem::transmute(pullength), ulflags) } + unsafe { CM_Get_Device_Interface_AliasW(pszdeviceinterface.param().abi(), aliasinterfaceguid, core::mem::transmute(pszaliasdeviceinterface), pullength as _, 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: Option) -> CONFIGRET @@ -584,7 +584,7 @@ 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); - unsafe { CM_Get_Device_Interface_Alias_ExA(pszdeviceinterface.param().abi(), aliasinterfaceguid, core::mem::transmute(pszaliasdeviceinterface), core::mem::transmute(pullength), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Device_Interface_Alias_ExA(pszdeviceinterface.param().abi(), aliasinterfaceguid, core::mem::transmute(pszaliasdeviceinterface), pullength as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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: Option) -> CONFIGRET @@ -592,7 +592,7 @@ 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); - unsafe { CM_Get_Device_Interface_Alias_ExW(pszdeviceinterface.param().abi(), aliasinterfaceguid, core::mem::transmute(pszaliasdeviceinterface), core::mem::transmute(pullength), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Device_Interface_Alias_ExW(pszdeviceinterface.param().abi(), aliasinterfaceguid, core::mem::transmute(pszaliasdeviceinterface), pullength as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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 @@ -616,7 +616,7 @@ 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); - unsafe { CM_Get_Device_Interface_List_ExA(interfaceclassguid, pdeviceid.param().abi(), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Device_Interface_List_ExA(interfaceclassguid, pdeviceid.param().abi(), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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: Option) -> CONFIGRET @@ -624,7 +624,7 @@ 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); - unsafe { CM_Get_Device_Interface_List_ExW(interfaceclassguid, pdeviceid.param().abi(), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Device_Interface_List_ExW(interfaceclassguid, pdeviceid.param().abi(), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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 @@ -632,7 +632,7 @@ where P2: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_Interface_List_SizeA(pullen : *mut u32, interfaceclassguid : *const windows_core::GUID, pdeviceid : windows_core::PCSTR, ulflags : CM_GET_DEVICE_INTERFACE_LIST_FLAGS) -> CONFIGRET); - unsafe { CM_Get_Device_Interface_List_SizeA(core::mem::transmute(pullen), interfaceclassguid, pdeviceid.param().abi(), ulflags) } + unsafe { CM_Get_Device_Interface_List_SizeA(pullen as _, interfaceclassguid, pdeviceid.param().abi(), ulflags) } } #[inline] pub unsafe fn CM_Get_Device_Interface_List_SizeW(pullen: *mut u32, interfaceclassguid: *const windows_core::GUID, pdeviceid: P2, ulflags: CM_GET_DEVICE_INTERFACE_LIST_FLAGS) -> CONFIGRET @@ -640,7 +640,7 @@ where P2: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_Interface_List_SizeW(pullen : *mut u32, interfaceclassguid : *const windows_core::GUID, pdeviceid : windows_core::PCWSTR, ulflags : CM_GET_DEVICE_INTERFACE_LIST_FLAGS) -> CONFIGRET); - unsafe { CM_Get_Device_Interface_List_SizeW(core::mem::transmute(pullen), interfaceclassguid, pdeviceid.param().abi(), ulflags) } + unsafe { CM_Get_Device_Interface_List_SizeW(pullen as _, interfaceclassguid, pdeviceid.param().abi(), 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: Option) -> CONFIGRET @@ -648,7 +648,7 @@ 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); - unsafe { CM_Get_Device_Interface_List_Size_ExA(core::mem::transmute(pullen), interfaceclassguid, pdeviceid.param().abi(), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Device_Interface_List_Size_ExA(pullen as _, interfaceclassguid, pdeviceid.param().abi(), ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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: Option) -> CONFIGRET @@ -656,7 +656,7 @@ 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); - unsafe { CM_Get_Device_Interface_List_Size_ExW(core::mem::transmute(pullen), interfaceclassguid, pdeviceid.param().abi(), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Device_Interface_List_Size_ExW(pullen as _, interfaceclassguid, pdeviceid.param().abi(), ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -665,7 +665,7 @@ where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_Interface_PropertyW(pszdeviceinterface : windows_core::PCWSTR, propertykey : *const super::super::Foundation:: DEVPROPKEY, propertytype : *mut super::Properties:: DEVPROPTYPE, propertybuffer : *mut u8, propertybuffersize : *mut u32, ulflags : u32) -> CONFIGRET); - unsafe { CM_Get_Device_Interface_PropertyW(pszdeviceinterface.param().abi(), propertykey, core::mem::transmute(propertytype), core::mem::transmute(propertybuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertybuffersize), ulflags) } + unsafe { CM_Get_Device_Interface_PropertyW(pszdeviceinterface.param().abi(), propertykey, propertytype as _, propertybuffer.unwrap_or(core::mem::zeroed()) as _, propertybuffersize as _, ulflags) } } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -674,7 +674,7 @@ where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_Interface_Property_ExW(pszdeviceinterface : windows_core::PCWSTR, propertykey : *const super::super::Foundation:: DEVPROPKEY, propertytype : *mut super::Properties:: DEVPROPTYPE, propertybuffer : *mut u8, propertybuffersize : *mut u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - unsafe { CM_Get_Device_Interface_Property_ExW(pszdeviceinterface.param().abi(), propertykey, core::mem::transmute(propertytype), core::mem::transmute(propertybuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertybuffersize), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Device_Interface_Property_ExW(pszdeviceinterface.param().abi(), propertykey, propertytype as _, propertybuffer.unwrap_or(core::mem::zeroed()) as _, propertybuffersize as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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,7 +682,7 @@ where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_Interface_Property_KeysW(pszdeviceinterface : windows_core::PCWSTR, propertykeyarray : *mut super::super::Foundation:: DEVPROPKEY, propertykeycount : *mut u32, ulflags : u32) -> CONFIGRET); - unsafe { CM_Get_Device_Interface_Property_KeysW(pszdeviceinterface.param().abi(), core::mem::transmute(propertykeyarray.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertykeycount), ulflags) } + unsafe { CM_Get_Device_Interface_Property_KeysW(pszdeviceinterface.param().abi(), propertykeyarray.unwrap_or(core::mem::zeroed()) as _, propertykeycount as _, 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: Option) -> CONFIGRET @@ -690,27 +690,27 @@ 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); - unsafe { CM_Get_Device_Interface_Property_Keys_ExW(pszdeviceinterface.param().abi(), core::mem::transmute(propertykeyarray.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertykeycount), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Device_Interface_Property_Keys_ExW(pszdeviceinterface.param().abi(), propertykeyarray.unwrap_or(core::mem::zeroed()) as _, propertykeycount as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CM_Get_First_Log_Conf(core::mem::transmute(plclogconf.unwrap_or(core::mem::zeroed())), dndevinst, ulflags) } + unsafe { CM_Get_First_Log_Conf(plclogconf.unwrap_or(core::mem::zeroed()) as _, dndevinst, ulflags) } } #[inline] 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); - unsafe { CM_Get_First_Log_Conf_Ex(core::mem::transmute(plclogconf.unwrap_or(core::mem::zeroed())), dndevinst, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_First_Log_Conf_Ex(plclogconf.unwrap_or(core::mem::zeroed()) as _, dndevinst, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Get_Global_State(pulstate: *mut u32, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Global_State(pulstate : *mut u32, ulflags : u32) -> CONFIGRET); - unsafe { CM_Get_Global_State(core::mem::transmute(pulstate), ulflags) } + unsafe { CM_Get_Global_State(pulstate as _, ulflags) } } #[inline] 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); - unsafe { CM_Get_Global_State_Ex(core::mem::transmute(pulstate), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Global_State_Ex(pulstate as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Get_HW_Prof_FlagsA(pdeviceid: P0, ulhardwareprofile: u32, pulvalue: *mut u32, ulflags: u32) -> CONFIGRET @@ -718,7 +718,7 @@ where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_HW_Prof_FlagsA(pdeviceid : windows_core::PCSTR, ulhardwareprofile : u32, pulvalue : *mut u32, ulflags : u32) -> CONFIGRET); - unsafe { CM_Get_HW_Prof_FlagsA(pdeviceid.param().abi(), ulhardwareprofile, core::mem::transmute(pulvalue), ulflags) } + unsafe { CM_Get_HW_Prof_FlagsA(pdeviceid.param().abi(), ulhardwareprofile, pulvalue as _, ulflags) } } #[inline] pub unsafe fn CM_Get_HW_Prof_FlagsW(pdeviceid: P0, ulhardwareprofile: u32, pulvalue: *mut u32, ulflags: u32) -> CONFIGRET @@ -726,7 +726,7 @@ where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_HW_Prof_FlagsW(pdeviceid : windows_core::PCWSTR, ulhardwareprofile : u32, pulvalue : *mut u32, ulflags : u32) -> CONFIGRET); - unsafe { CM_Get_HW_Prof_FlagsW(pdeviceid.param().abi(), ulhardwareprofile, core::mem::transmute(pulvalue), ulflags) } + unsafe { CM_Get_HW_Prof_FlagsW(pdeviceid.param().abi(), ulhardwareprofile, pulvalue as _, ulflags) } } #[inline] pub unsafe fn CM_Get_HW_Prof_Flags_ExA(pdeviceid: P0, ulhardwareprofile: u32, pulvalue: *mut u32, ulflags: u32, hmachine: Option) -> CONFIGRET @@ -734,7 +734,7 @@ 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); - unsafe { CM_Get_HW_Prof_Flags_ExA(pdeviceid.param().abi(), ulhardwareprofile, core::mem::transmute(pulvalue), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_HW_Prof_Flags_ExA(pdeviceid.param().abi(), ulhardwareprofile, pulvalue as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Get_HW_Prof_Flags_ExW(pdeviceid: P0, ulhardwareprofile: u32, pulvalue: *mut u32, ulflags: u32, hmachine: Option) -> CONFIGRET @@ -742,112 +742,112 @@ 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); - unsafe { CM_Get_HW_Prof_Flags_ExW(pdeviceid.param().abi(), ulhardwareprofile, core::mem::transmute(pulvalue), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_HW_Prof_Flags_ExW(pdeviceid.param().abi(), ulhardwareprofile, pulvalue as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Get_Hardware_Profile_InfoA(ulindex: u32, phwprofileinfo: *mut HWPROFILEINFO_A, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Hardware_Profile_InfoA(ulindex : u32, phwprofileinfo : *mut HWPROFILEINFO_A, ulflags : u32) -> CONFIGRET); - unsafe { CM_Get_Hardware_Profile_InfoA(ulindex, core::mem::transmute(phwprofileinfo), ulflags) } + unsafe { CM_Get_Hardware_Profile_InfoA(ulindex, phwprofileinfo as _, ulflags) } } #[inline] pub unsafe fn CM_Get_Hardware_Profile_InfoW(ulindex: u32, phwprofileinfo: *mut HWPROFILEINFO_W, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Hardware_Profile_InfoW(ulindex : u32, phwprofileinfo : *mut HWPROFILEINFO_W, ulflags : u32) -> CONFIGRET); - unsafe { CM_Get_Hardware_Profile_InfoW(ulindex, core::mem::transmute(phwprofileinfo), ulflags) } + unsafe { CM_Get_Hardware_Profile_InfoW(ulindex, phwprofileinfo as _, ulflags) } } #[inline] 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); - unsafe { CM_Get_Hardware_Profile_Info_ExA(ulindex, core::mem::transmute(phwprofileinfo), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Hardware_Profile_Info_ExA(ulindex, phwprofileinfo as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { CM_Get_Hardware_Profile_Info_ExW(ulindex, core::mem::transmute(phwprofileinfo), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Hardware_Profile_Info_ExW(ulindex, phwprofileinfo as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Get_Log_Conf_Priority(lclogconf: usize, ppriority: *mut u32, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Log_Conf_Priority(lclogconf : usize, ppriority : *mut u32, ulflags : u32) -> CONFIGRET); - unsafe { CM_Get_Log_Conf_Priority(lclogconf, core::mem::transmute(ppriority), ulflags) } + unsafe { CM_Get_Log_Conf_Priority(lclogconf, ppriority as _, ulflags) } } #[inline] 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); - unsafe { CM_Get_Log_Conf_Priority_Ex(lclogconf, core::mem::transmute(ppriority), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Log_Conf_Priority_Ex(lclogconf, ppriority as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { CM_Get_Next_Log_Conf(core::mem::transmute(plclogconf.unwrap_or(core::mem::zeroed())), lclogconf, core::mem::transmute(ulflags.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Next_Log_Conf(plclogconf.unwrap_or(core::mem::zeroed()) as _, lclogconf, ulflags.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { CM_Get_Next_Log_Conf_Ex(core::mem::transmute(plclogconf.unwrap_or(core::mem::zeroed())), lclogconf, core::mem::transmute(ulflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Next_Log_Conf_Ex(plclogconf.unwrap_or(core::mem::zeroed()) as _, lclogconf, ulflags.unwrap_or(core::mem::zeroed()) as _, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CM_Get_Next_Res_Des(core::mem::transmute(prdresdes), rdresdes, forresource, core::mem::transmute(presourceid.unwrap_or(core::mem::zeroed())), ulflags) } + unsafe { CM_Get_Next_Res_Des(prdresdes as _, rdresdes, forresource, presourceid.unwrap_or(core::mem::zeroed()) as _, 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: 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); - unsafe { CM_Get_Next_Res_Des_Ex(core::mem::transmute(prdresdes), rdresdes, forresource, core::mem::transmute(presourceid.unwrap_or(core::mem::zeroed())), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Next_Res_Des_Ex(prdresdes as _, rdresdes, forresource, presourceid.unwrap_or(core::mem::zeroed()) as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Get_Parent(pdndevinst: *mut u32, dndevinst: u32, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Parent(pdndevinst : *mut u32, dndevinst : u32, ulflags : u32) -> CONFIGRET); - unsafe { CM_Get_Parent(core::mem::transmute(pdndevinst), dndevinst, ulflags) } + unsafe { CM_Get_Parent(pdndevinst as _, dndevinst, ulflags) } } #[inline] 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); - unsafe { CM_Get_Parent_Ex(core::mem::transmute(pdndevinst), dndevinst, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Parent_Ex(pdndevinst as _, dndevinst, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Get_Res_Des_Data(rdresdes: usize, buffer: *mut core::ffi::c_void, bufferlen: u32, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Res_Des_Data(rdresdes : usize, buffer : *mut core::ffi::c_void, bufferlen : u32, ulflags : u32) -> CONFIGRET); - unsafe { CM_Get_Res_Des_Data(rdresdes, core::mem::transmute(buffer), bufferlen, ulflags) } + unsafe { CM_Get_Res_Des_Data(rdresdes, buffer as _, bufferlen, ulflags) } } #[inline] 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); - unsafe { CM_Get_Res_Des_Data_Ex(rdresdes, core::mem::transmute(buffer), bufferlen, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Res_Des_Data_Ex(rdresdes, buffer as _, bufferlen, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Get_Res_Des_Data_Size(pulsize: *mut u32, rdresdes: usize, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Res_Des_Data_Size(pulsize : *mut u32, rdresdes : usize, ulflags : u32) -> CONFIGRET); - unsafe { CM_Get_Res_Des_Data_Size(core::mem::transmute(pulsize), rdresdes, ulflags) } + unsafe { CM_Get_Res_Des_Data_Size(pulsize as _, rdresdes, ulflags) } } #[inline] 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); - unsafe { CM_Get_Res_Des_Data_Size_Ex(core::mem::transmute(pulsize), rdresdes, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Res_Des_Data_Size_Ex(pulsize as _, rdresdes, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Get_Resource_Conflict_Count(clconflictlist: usize, pulcount: *mut u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Resource_Conflict_Count(clconflictlist : usize, pulcount : *mut u32) -> CONFIGRET); - unsafe { CM_Get_Resource_Conflict_Count(clconflictlist, core::mem::transmute(pulcount)) } + unsafe { CM_Get_Resource_Conflict_Count(clconflictlist, pulcount as _) } } #[inline] pub unsafe fn CM_Get_Resource_Conflict_DetailsA(clconflictlist: usize, ulindex: u32, pconflictdetails: *mut CONFLICT_DETAILS_A) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Resource_Conflict_DetailsA(clconflictlist : usize, ulindex : u32, pconflictdetails : *mut CONFLICT_DETAILS_A) -> CONFIGRET); - unsafe { CM_Get_Resource_Conflict_DetailsA(clconflictlist, ulindex, core::mem::transmute(pconflictdetails)) } + unsafe { CM_Get_Resource_Conflict_DetailsA(clconflictlist, ulindex, pconflictdetails as _) } } #[inline] pub unsafe fn CM_Get_Resource_Conflict_DetailsW(clconflictlist: usize, ulindex: u32, pconflictdetails: *mut CONFLICT_DETAILS_W) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Resource_Conflict_DetailsW(clconflictlist : usize, ulindex : u32, pconflictdetails : *mut CONFLICT_DETAILS_W) -> CONFIGRET); - unsafe { CM_Get_Resource_Conflict_DetailsW(clconflictlist, ulindex, core::mem::transmute(pconflictdetails)) } + unsafe { CM_Get_Resource_Conflict_DetailsW(clconflictlist, ulindex, pconflictdetails as _) } } #[inline] pub unsafe fn CM_Get_Sibling(pdndevinst: *mut u32, dndevinst: u32, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Sibling(pdndevinst : *mut u32, dndevinst : u32, ulflags : u32) -> CONFIGRET); - unsafe { CM_Get_Sibling(core::mem::transmute(pdndevinst), dndevinst, ulflags) } + unsafe { CM_Get_Sibling(pdndevinst as _, dndevinst, ulflags) } } #[inline] 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); - unsafe { CM_Get_Sibling_Ex(core::mem::transmute(pdndevinst), dndevinst, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Sibling_Ex(pdndevinst as _, dndevinst, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Get_Version() -> u16 { @@ -857,7 +857,7 @@ pub unsafe fn CM_Get_Version() -> u16 { #[inline] pub unsafe fn CM_Get_Version_Ex(hmachine: Option) -> u16 { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Version_Ex(hmachine : isize) -> u16); - unsafe { CM_Get_Version_Ex(core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Get_Version_Ex(hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Intersect_Range_List(rlhold1: usize, rlhold2: usize, rlhnew: usize, ulflags: u32) -> CONFIGRET { @@ -872,12 +872,12 @@ pub unsafe fn CM_Invert_Range_List(rlhold: usize, rlhnew: usize, ullmaxvalue: u6 #[inline] pub unsafe fn CM_Is_Dock_Station_Present(pbpresent: *mut super::super::Foundation::BOOL) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Is_Dock_Station_Present(pbpresent : *mut super::super::Foundation:: BOOL) -> CONFIGRET); - unsafe { CM_Is_Dock_Station_Present(core::mem::transmute(pbpresent)) } + unsafe { CM_Is_Dock_Station_Present(pbpresent as _) } } #[inline] 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); - unsafe { CM_Is_Dock_Station_Present_Ex(core::mem::transmute(pbpresent), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Is_Dock_Station_Present_Ex(pbpresent as _, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Is_Version_Available(wversion: u16) -> super::super::Foundation::BOOL { @@ -887,7 +887,7 @@ pub unsafe fn CM_Is_Version_Available(wversion: u16) -> super::super::Foundation #[inline] 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); - unsafe { CM_Is_Version_Available_Ex(wversion, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Is_Version_Available_Ex(wversion, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Locate_DevNodeA(pdndevinst: *mut u32, pdeviceid: P1, ulflags: CM_LOCATE_DEVNODE_FLAGS) -> CONFIGRET @@ -895,7 +895,7 @@ where P1: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Locate_DevNodeA(pdndevinst : *mut u32, pdeviceid : windows_core::PCSTR, ulflags : CM_LOCATE_DEVNODE_FLAGS) -> CONFIGRET); - unsafe { CM_Locate_DevNodeA(core::mem::transmute(pdndevinst), pdeviceid.param().abi(), ulflags) } + unsafe { CM_Locate_DevNodeA(pdndevinst as _, pdeviceid.param().abi(), ulflags) } } #[inline] pub unsafe fn CM_Locate_DevNodeW(pdndevinst: *mut u32, pdeviceid: P1, ulflags: CM_LOCATE_DEVNODE_FLAGS) -> CONFIGRET @@ -903,7 +903,7 @@ where P1: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Locate_DevNodeW(pdndevinst : *mut u32, pdeviceid : windows_core::PCWSTR, ulflags : CM_LOCATE_DEVNODE_FLAGS) -> CONFIGRET); - unsafe { CM_Locate_DevNodeW(core::mem::transmute(pdndevinst), pdeviceid.param().abi(), ulflags) } + unsafe { CM_Locate_DevNodeW(pdndevinst as _, pdeviceid.param().abi(), ulflags) } } #[inline] pub unsafe fn CM_Locate_DevNode_ExA(pdndevinst: *mut u32, pdeviceid: P1, ulflags: u32, hmachine: Option) -> CONFIGRET @@ -911,7 +911,7 @@ 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); - unsafe { CM_Locate_DevNode_ExA(core::mem::transmute(pdndevinst), pdeviceid.param().abi(), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Locate_DevNode_ExA(pdndevinst as _, pdeviceid.param().abi(), ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Locate_DevNode_ExW(pdndevinst: *mut u32, pdeviceid: P1, ulflags: u32, hmachine: Option) -> CONFIGRET @@ -919,7 +919,7 @@ 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); - unsafe { CM_Locate_DevNode_ExW(core::mem::transmute(pdndevinst), pdeviceid.param().abi(), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Locate_DevNode_ExW(pdndevinst as _, pdeviceid.param().abi(), ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_MapCrToWin32Err(cmreturncode: CONFIGRET, defaulterr: u32) -> u32 { @@ -934,12 +934,12 @@ pub unsafe fn CM_Merge_Range_List(rlhold1: usize, rlhold2: usize, rlhnew: usize, #[inline] pub unsafe fn CM_Modify_Res_Des(prdresdes: *mut usize, rdresdes: usize, resourceid: u32, resourcedata: *const core::ffi::c_void, resourcelen: u32, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Modify_Res_Des(prdresdes : *mut usize, rdresdes : usize, resourceid : u32, resourcedata : *const core::ffi::c_void, resourcelen : u32, ulflags : u32) -> CONFIGRET); - unsafe { CM_Modify_Res_Des(core::mem::transmute(prdresdes), rdresdes, resourceid, resourcedata, resourcelen, ulflags) } + unsafe { CM_Modify_Res_Des(prdresdes as _, rdresdes, resourceid, resourcedata, resourcelen, 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: 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); - unsafe { CM_Modify_Res_Des_Ex(core::mem::transmute(prdresdes), rdresdes, resourceid, resourcedata, resourcelen, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Modify_Res_Des_Ex(prdresdes as _, rdresdes, resourceid, resourcedata, resourcelen, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Move_DevNode(dnfromdevinst: u32, dntodevinst: u32, ulflags: u32) -> CONFIGRET { @@ -949,12 +949,12 @@ pub unsafe fn CM_Move_DevNode(dnfromdevinst: u32, dntodevinst: u32, ulflags: u32 #[inline] 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); - unsafe { CM_Move_DevNode_Ex(dnfromdevinst, dntodevinst, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Move_DevNode_Ex(dnfromdevinst, dntodevinst, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Next_Range(preelement: *mut usize, pullstart: *mut u64, pullend: *mut u64, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Next_Range(preelement : *mut usize, pullstart : *mut u64, pullend : *mut u64, ulflags : u32) -> CONFIGRET); - unsafe { CM_Next_Range(core::mem::transmute(preelement), core::mem::transmute(pullstart), core::mem::transmute(pullend), ulflags) } + unsafe { CM_Next_Range(preelement as _, pullstart as _, pullend as _, ulflags) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -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); - unsafe { CM_Open_Class_KeyA(core::mem::transmute(classguid.unwrap_or(core::mem::zeroed())), pszclassname.param().abi(), samdesired, disposition, core::mem::transmute(phkclass), ulflags) } + unsafe { CM_Open_Class_KeyA(classguid.unwrap_or(core::mem::zeroed()) as _, pszclassname.param().abi(), samdesired, disposition, phkclass as _, ulflags) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -972,7 +972,7 @@ 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); - unsafe { CM_Open_Class_KeyW(core::mem::transmute(classguid.unwrap_or(core::mem::zeroed())), pszclassname.param().abi(), samdesired, disposition, core::mem::transmute(phkclass), ulflags) } + unsafe { CM_Open_Class_KeyW(classguid.unwrap_or(core::mem::zeroed()) as _, pszclassname.param().abi(), samdesired, disposition, phkclass as _, ulflags) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -981,7 +981,7 @@ 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); - unsafe { CM_Open_Class_Key_ExA(core::mem::transmute(classguid.unwrap_or(core::mem::zeroed())), pszclassname.param().abi(), samdesired, disposition, core::mem::transmute(phkclass), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Open_Class_Key_ExA(classguid.unwrap_or(core::mem::zeroed()) as _, pszclassname.param().abi(), samdesired, disposition, phkclass as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -990,19 +990,19 @@ 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); - unsafe { CM_Open_Class_Key_ExW(core::mem::transmute(classguid.unwrap_or(core::mem::zeroed())), pszclassname.param().abi(), samdesired, disposition, core::mem::transmute(phkclass), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Open_Class_Key_ExW(classguid.unwrap_or(core::mem::zeroed()) as _, pszclassname.param().abi(), samdesired, disposition, phkclass as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] pub unsafe fn CM_Open_DevNode_Key(dndevnode: u32, samdesired: u32, ulhardwareprofile: u32, disposition: u32, phkdevice: *mut super::super::System::Registry::HKEY, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Open_DevNode_Key(dndevnode : u32, samdesired : u32, ulhardwareprofile : u32, disposition : u32, phkdevice : *mut super::super::System::Registry:: HKEY, ulflags : u32) -> CONFIGRET); - unsafe { CM_Open_DevNode_Key(dndevnode, samdesired, ulhardwareprofile, disposition, core::mem::transmute(phkdevice), ulflags) } + unsafe { CM_Open_DevNode_Key(dndevnode, samdesired, ulhardwareprofile, disposition, phkdevice as _, ulflags) } } #[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: 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); - unsafe { CM_Open_DevNode_Key_Ex(dndevnode, samdesired, ulhardwareprofile, disposition, core::mem::transmute(phkdevice), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Open_DevNode_Key_Ex(dndevnode, samdesired, ulhardwareprofile, disposition, phkdevice as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -1011,7 +1011,7 @@ where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Open_Device_Interface_KeyA(pszdeviceinterface : windows_core::PCSTR, samdesired : u32, disposition : u32, phkdeviceinterface : *mut super::super::System::Registry:: HKEY, ulflags : u32) -> CONFIGRET); - unsafe { CM_Open_Device_Interface_KeyA(pszdeviceinterface.param().abi(), samdesired, disposition, core::mem::transmute(phkdeviceinterface), ulflags) } + unsafe { CM_Open_Device_Interface_KeyA(pszdeviceinterface.param().abi(), samdesired, disposition, phkdeviceinterface as _, ulflags) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -1020,7 +1020,7 @@ where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Open_Device_Interface_KeyW(pszdeviceinterface : windows_core::PCWSTR, samdesired : u32, disposition : u32, phkdeviceinterface : *mut super::super::System::Registry:: HKEY, ulflags : u32) -> CONFIGRET); - unsafe { CM_Open_Device_Interface_KeyW(pszdeviceinterface.param().abi(), samdesired, disposition, core::mem::transmute(phkdeviceinterface), ulflags) } + unsafe { CM_Open_Device_Interface_KeyW(pszdeviceinterface.param().abi(), samdesired, disposition, phkdeviceinterface as _, ulflags) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -1029,7 +1029,7 @@ 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); - unsafe { CM_Open_Device_Interface_Key_ExA(pszdeviceinterface.param().abi(), samdesired, disposition, core::mem::transmute(phkdeviceinterface), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Open_Device_Interface_Key_ExA(pszdeviceinterface.param().abi(), samdesired, disposition, phkdeviceinterface as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -1038,47 +1038,47 @@ 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); - unsafe { CM_Open_Device_Interface_Key_ExW(pszdeviceinterface.param().abi(), samdesired, disposition, core::mem::transmute(phkdeviceinterface), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Open_Device_Interface_Key_ExW(pszdeviceinterface.param().abi(), samdesired, disposition, phkdeviceinterface as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CM_Query_And_Remove_SubTreeA(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()), ulflags) } + unsafe { CM_Query_And_Remove_SubTreeA(dnancestor, pvetotype.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pszvetoname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags) } } #[inline] pub unsafe fn CM_Query_And_Remove_SubTreeW(dnancestor: u32, pvetotype: Option<*mut PNP_VETO_TYPE>, pszvetoname: Option<&mut [u16]>, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Query_And_Remove_SubTreeW(dnancestor : u32, pvetotype : *mut PNP_VETO_TYPE, pszvetoname : windows_core::PWSTR, ulnamelength : u32, ulflags : u32) -> CONFIGRET); - unsafe { CM_Query_And_Remove_SubTreeW(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()), ulflags) } + unsafe { CM_Query_And_Remove_SubTreeW(dnancestor, pvetotype.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pszvetoname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags) } } #[inline] pub unsafe fn CM_Query_And_Remove_SubTree_ExA(dnancestor: u32, pvetotype: Option<*mut PNP_VETO_TYPE>, pszvetoname: Option<&mut [u8]>, ulflags: u32, hmachine: 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); - unsafe { CM_Query_And_Remove_SubTree_ExA(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()), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Query_And_Remove_SubTree_ExA(dnancestor, pvetotype.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pszvetoname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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: 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); - unsafe { CM_Query_And_Remove_SubTree_ExW(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()), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Query_And_Remove_SubTree_ExW(dnancestor, pvetotype.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pszvetoname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Query_Arbitrator_Free_Data(pdata: *mut core::ffi::c_void, datalen: u32, dndevinst: u32, resourceid: u32, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Query_Arbitrator_Free_Data(pdata : *mut core::ffi::c_void, datalen : u32, dndevinst : u32, resourceid : u32, ulflags : u32) -> CONFIGRET); - unsafe { CM_Query_Arbitrator_Free_Data(core::mem::transmute(pdata), datalen, dndevinst, resourceid, ulflags) } + unsafe { CM_Query_Arbitrator_Free_Data(pdata as _, datalen, dndevinst, resourceid, 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: 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); - unsafe { CM_Query_Arbitrator_Free_Data_Ex(core::mem::transmute(pdata), datalen, dndevinst, resourceid, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Query_Arbitrator_Free_Data_Ex(pdata as _, datalen, dndevinst, resourceid, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Query_Arbitrator_Free_Size(pulsize: *mut u32, dndevinst: u32, resourceid: u32, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Query_Arbitrator_Free_Size(pulsize : *mut u32, dndevinst : u32, resourceid : u32, ulflags : u32) -> CONFIGRET); - unsafe { CM_Query_Arbitrator_Free_Size(core::mem::transmute(pulsize), dndevinst, resourceid, ulflags) } + unsafe { CM_Query_Arbitrator_Free_Size(pulsize as _, dndevinst, resourceid, ulflags) } } #[inline] 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); - unsafe { CM_Query_Arbitrator_Free_Size_Ex(core::mem::transmute(pulsize), dndevinst, resourceid, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Query_Arbitrator_Free_Size_Ex(pulsize as _, dndevinst, resourceid, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Query_Remove_SubTree(dnancestor: u32, ulflags: u32) -> CONFIGRET { @@ -1088,12 +1088,12 @@ pub unsafe fn CM_Query_Remove_SubTree(dnancestor: u32, ulflags: u32) -> CONFIGRE #[inline] 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); - unsafe { CM_Query_Remove_SubTree_Ex(dnancestor, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Query_Remove_SubTree_Ex(dnancestor, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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: 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); - unsafe { CM_Query_Resource_Conflict_List(core::mem::transmute(pclconflictlist), dndevinst, resourceid, resourcedata, resourcelen, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Query_Resource_Conflict_List(pclconflictlist as _, dndevinst, resourceid, resourcedata, resourcelen, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Reenumerate_DevNode(dndevinst: u32, ulflags: CM_REENUMERATE_FLAGS) -> CONFIGRET { @@ -1103,7 +1103,7 @@ pub unsafe fn CM_Reenumerate_DevNode(dndevinst: u32, ulflags: CM_REENUMERATE_FLA #[inline] 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); - unsafe { CM_Reenumerate_DevNode_Ex(dndevinst, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Reenumerate_DevNode_Ex(dndevinst, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Register_Device_Driver(dndevinst: u32, ulflags: u32) -> CONFIGRET { @@ -1113,7 +1113,7 @@ pub unsafe fn CM_Register_Device_Driver(dndevinst: u32, ulflags: u32) -> CONFIGR #[inline] 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); - unsafe { CM_Register_Device_Driver_Ex(dndevinst, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Register_Device_Driver_Ex(dndevinst, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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 @@ -1121,7 +1121,7 @@ where P2: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Register_Device_InterfaceA(dndevinst : u32, interfaceclassguid : *const windows_core::GUID, pszreference : windows_core::PCSTR, pszdeviceinterface : windows_core::PSTR, pullength : *mut u32, ulflags : u32) -> CONFIGRET); - unsafe { CM_Register_Device_InterfaceA(dndevinst, interfaceclassguid, pszreference.param().abi(), core::mem::transmute(pszdeviceinterface), core::mem::transmute(pullength), ulflags) } + unsafe { CM_Register_Device_InterfaceA(dndevinst, interfaceclassguid, pszreference.param().abi(), core::mem::transmute(pszdeviceinterface), pullength as _, ulflags) } } #[inline] pub unsafe fn CM_Register_Device_InterfaceW(dndevinst: u32, interfaceclassguid: *const windows_core::GUID, pszreference: P2, pszdeviceinterface: windows_core::PWSTR, pullength: *mut u32, ulflags: u32) -> CONFIGRET @@ -1129,7 +1129,7 @@ where P2: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Register_Device_InterfaceW(dndevinst : u32, interfaceclassguid : *const windows_core::GUID, pszreference : windows_core::PCWSTR, pszdeviceinterface : windows_core::PWSTR, pullength : *mut u32, ulflags : u32) -> CONFIGRET); - unsafe { CM_Register_Device_InterfaceW(dndevinst, interfaceclassguid, pszreference.param().abi(), core::mem::transmute(pszdeviceinterface), core::mem::transmute(pullength), ulflags) } + unsafe { CM_Register_Device_InterfaceW(dndevinst, interfaceclassguid, pszreference.param().abi(), core::mem::transmute(pszdeviceinterface), pullength as _, 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: Option) -> CONFIGRET @@ -1137,7 +1137,7 @@ 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); - unsafe { CM_Register_Device_Interface_ExA(dndevinst, interfaceclassguid, pszreference.param().abi(), core::mem::transmute(pszdeviceinterface), core::mem::transmute(pullength), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Register_Device_Interface_ExA(dndevinst, interfaceclassguid, pszreference.param().abi(), core::mem::transmute(pszdeviceinterface), pullength as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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: Option) -> CONFIGRET @@ -1145,12 +1145,12 @@ 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); - unsafe { CM_Register_Device_Interface_ExW(dndevinst, interfaceclassguid, pszreference.param().abi(), core::mem::transmute(pszdeviceinterface), core::mem::transmute(pullength), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Register_Device_Interface_ExW(dndevinst, interfaceclassguid, pszreference.param().abi(), core::mem::transmute(pszdeviceinterface), pullength as _, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CM_Register_Notification(pfilter, core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed())), pcallback, core::mem::transmute(pnotifycontext)) } + unsafe { CM_Register_Notification(pfilter, pcontext.unwrap_or(core::mem::zeroed()) as _, pcallback, pnotifycontext as _) } } #[inline] pub unsafe fn CM_Remove_SubTree(dnancestor: u32, ulflags: u32) -> CONFIGRET { @@ -1160,27 +1160,27 @@ pub unsafe fn CM_Remove_SubTree(dnancestor: u32, ulflags: u32) -> CONFIGRET { #[inline] 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); - unsafe { CM_Remove_SubTree_Ex(dnancestor, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Remove_SubTree_Ex(dnancestor, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CM_Request_Device_EjectA(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()), ulflags) } + unsafe { CM_Request_Device_EjectA(dndevinst, pvetotype.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pszvetoname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags) } } #[inline] pub unsafe fn CM_Request_Device_EjectW(dndevinst: u32, pvetotype: Option<*mut PNP_VETO_TYPE>, pszvetoname: Option<&mut [u16]>, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Request_Device_EjectW(dndevinst : u32, pvetotype : *mut PNP_VETO_TYPE, pszvetoname : windows_core::PWSTR, ulnamelength : u32, ulflags : u32) -> CONFIGRET); - unsafe { CM_Request_Device_EjectW(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()), ulflags) } + unsafe { CM_Request_Device_EjectW(dndevinst, pvetotype.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pszvetoname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags) } } #[inline] pub unsafe fn CM_Request_Device_Eject_ExA(dndevinst: u32, pvetotype: Option<*mut PNP_VETO_TYPE>, pszvetoname: Option<&mut [u8]>, ulflags: u32, hmachine: 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); - unsafe { CM_Request_Device_Eject_ExA(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()), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Request_Device_Eject_ExA(dndevinst, pvetotype.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pszvetoname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { CM_Request_Device_Eject_ExW(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()), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Request_Device_Eject_ExW(dndevinst, pvetotype.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pszvetoname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Request_Eject_PC() -> CONFIGRET { @@ -1190,7 +1190,7 @@ pub unsafe fn CM_Request_Eject_PC() -> CONFIGRET { #[inline] 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); - unsafe { CM_Request_Eject_PC_Ex(core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Request_Eject_PC_Ex(hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Run_Detection(ulflags: u32) -> CONFIGRET { @@ -1200,7 +1200,7 @@ pub unsafe fn CM_Run_Detection(ulflags: u32) -> CONFIGRET { #[inline] 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); - unsafe { CM_Run_Detection_Ex(ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Run_Detection_Ex(ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -1212,17 +1212,17 @@ pub unsafe fn CM_Set_Class_PropertyW(classguid: *const windows_core::GUID, prope #[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: 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); - unsafe { CM_Set_Class_Property_ExW(classguid, propertykey, propertytype, core::mem::transmute(propertybuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Set_Class_Property_ExW(classguid, propertykey, propertytype, core::mem::transmute(propertybuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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: 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); - unsafe { CM_Set_Class_Registry_PropertyA(classguid, ulproperty, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), ullength, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Set_Class_Registry_PropertyA(classguid, ulproperty, buffer.unwrap_or(core::mem::zeroed()) as _, ullength, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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: 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); - unsafe { CM_Set_Class_Registry_PropertyW(classguid, ulproperty, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), ullength, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Set_Class_Registry_PropertyW(classguid, ulproperty, buffer.unwrap_or(core::mem::zeroed()) as _, ullength, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Set_DevNode_Problem(dndevinst: u32, ulproblem: u32, ulflags: u32) -> CONFIGRET { @@ -1232,7 +1232,7 @@ pub unsafe fn CM_Set_DevNode_Problem(dndevinst: u32, ulproblem: u32, ulflags: u3 #[inline] 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); - unsafe { CM_Set_DevNode_Problem_Ex(dndevinst, ulproblem, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Set_DevNode_Problem_Ex(dndevinst, ulproblem, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -1244,27 +1244,27 @@ pub unsafe fn CM_Set_DevNode_PropertyW(dndevinst: u32, propertykey: *const super #[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: 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); - unsafe { CM_Set_DevNode_Property_ExW(dndevinst, propertykey, propertytype, core::mem::transmute(propertybuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Set_DevNode_Property_ExW(dndevinst, propertykey, propertytype, core::mem::transmute(propertybuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CM_Set_DevNode_Registry_PropertyA(dndevinst, ulproperty, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), ullength, ulflags) } + unsafe { CM_Set_DevNode_Registry_PropertyA(dndevinst, ulproperty, buffer.unwrap_or(core::mem::zeroed()) as _, ullength, ulflags) } } #[inline] pub unsafe fn CM_Set_DevNode_Registry_PropertyW(dndevinst: u32, ulproperty: u32, buffer: Option<*const core::ffi::c_void>, ullength: u32, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Set_DevNode_Registry_PropertyW(dndevinst : u32, ulproperty : u32, buffer : *const core::ffi::c_void, ullength : u32, ulflags : u32) -> CONFIGRET); - unsafe { CM_Set_DevNode_Registry_PropertyW(dndevinst, ulproperty, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), ullength, ulflags) } + unsafe { CM_Set_DevNode_Registry_PropertyW(dndevinst, ulproperty, buffer.unwrap_or(core::mem::zeroed()) as _, ullength, ulflags) } } #[inline] pub unsafe fn CM_Set_DevNode_Registry_Property_ExA(dndevinst: u32, ulproperty: u32, buffer: Option<*const core::ffi::c_void>, ullength: u32, ulflags: u32, hmachine: 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); - unsafe { CM_Set_DevNode_Registry_Property_ExA(dndevinst, ulproperty, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), ullength, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Set_DevNode_Registry_Property_ExA(dndevinst, ulproperty, buffer.unwrap_or(core::mem::zeroed()) as _, ullength, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[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: 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); - unsafe { CM_Set_DevNode_Registry_Property_ExW(dndevinst, ulproperty, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), ullength, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Set_DevNode_Registry_Property_ExW(dndevinst, ulproperty, buffer.unwrap_or(core::mem::zeroed()) as _, ullength, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -1282,7 +1282,7 @@ 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); - unsafe { CM_Set_Device_Interface_Property_ExW(pszdeviceinterface.param().abi(), propertykey, propertytype, core::mem::transmute(propertybuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Set_Device_Interface_Property_ExW(pszdeviceinterface.param().abi(), propertykey, propertytype, core::mem::transmute(propertybuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Set_HW_Prof(ulhardwareprofile: u32, ulflags: u32) -> CONFIGRET { @@ -1292,7 +1292,7 @@ pub unsafe fn CM_Set_HW_Prof(ulhardwareprofile: u32, ulflags: u32) -> CONFIGRET #[inline] 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); - unsafe { CM_Set_HW_Prof_Ex(ulhardwareprofile, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Set_HW_Prof_Ex(ulhardwareprofile, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Set_HW_Prof_FlagsA(pdeviceid: P0, ulconfig: u32, ulvalue: u32, ulflags: u32) -> CONFIGRET @@ -1316,7 +1316,7 @@ 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); - unsafe { CM_Set_HW_Prof_Flags_ExA(pdeviceid.param().abi(), ulconfig, ulvalue, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Set_HW_Prof_Flags_ExA(pdeviceid.param().abi(), ulconfig, ulvalue, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Set_HW_Prof_Flags_ExW(pdeviceid: P0, ulconfig: u32, ulvalue: u32, ulflags: u32, hmachine: Option) -> CONFIGRET @@ -1324,7 +1324,7 @@ 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); - unsafe { CM_Set_HW_Prof_Flags_ExW(pdeviceid.param().abi(), ulconfig, ulvalue, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Set_HW_Prof_Flags_ExW(pdeviceid.param().abi(), ulconfig, ulvalue, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Setup_DevNode(dndevinst: u32, ulflags: u32) -> CONFIGRET { @@ -1334,7 +1334,7 @@ pub unsafe fn CM_Setup_DevNode(dndevinst: u32, ulflags: u32) -> CONFIGRET { #[inline] 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); - unsafe { CM_Setup_DevNode_Ex(dndevinst, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Setup_DevNode_Ex(dndevinst, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Test_Range_Available(ullstartvalue: u64, ullendvalue: u64, rlh: usize, ulflags: u32) -> CONFIGRET { @@ -1349,7 +1349,7 @@ pub unsafe fn CM_Uninstall_DevNode(dndevinst: u32, ulflags: u32) -> CONFIGRET { #[inline] 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); - unsafe { CM_Uninstall_DevNode_Ex(dndevinst, ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Uninstall_DevNode_Ex(dndevinst, ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Unregister_Device_InterfaceA(pszdeviceinterface: P0, ulflags: u32) -> CONFIGRET @@ -1373,7 +1373,7 @@ 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); - unsafe { CM_Unregister_Device_Interface_ExA(pszdeviceinterface.param().abi(), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Unregister_Device_Interface_ExA(pszdeviceinterface.param().abi(), ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Unregister_Device_Interface_ExW(pszdeviceinterface: P0, ulflags: u32, hmachine: Option) -> CONFIGRET @@ -1381,7 +1381,7 @@ 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); - unsafe { CM_Unregister_Device_Interface_ExW(pszdeviceinterface.param().abi(), ulflags, core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } + unsafe { CM_Unregister_Device_Interface_ExW(pszdeviceinterface.param().abi(), ulflags, hmachine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CM_Unregister_Notification(notifycontext: HCMNOTIFICATION) -> CONFIGRET { @@ -1391,7 +1391,7 @@ pub unsafe fn CM_Unregister_Notification(notifycontext: HCMNOTIFICATION) -> CONF #[inline] 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); - unsafe { DiInstallDevice(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), deviceinfoset, deviceinfodata, core::mem::transmute(driverinfodata.unwrap_or(core::mem::zeroed())), flags, core::mem::transmute(needreboot.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DiInstallDevice(hwndparent.unwrap_or(core::mem::zeroed()) as _, deviceinfoset, deviceinfodata, driverinfodata.unwrap_or(core::mem::zeroed()) as _, flags, needreboot.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn DiInstallDriverA(hwndparent: Option, infpath: P1, flags: DIINSTALLDRIVER_FLAGS, needreboot: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> @@ -1399,7 +1399,7 @@ where P1: windows_core::Param, { windows_targets::link!("newdev.dll" "system" fn DiInstallDriverA(hwndparent : super::super::Foundation:: HWND, infpath : windows_core::PCSTR, flags : DIINSTALLDRIVER_FLAGS, needreboot : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - unsafe { DiInstallDriverA(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), infpath.param().abi(), flags, core::mem::transmute(needreboot.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DiInstallDriverA(hwndparent.unwrap_or(core::mem::zeroed()) as _, infpath.param().abi(), flags, needreboot.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn DiInstallDriverW(hwndparent: Option, infpath: P1, flags: DIINSTALLDRIVER_FLAGS, needreboot: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> @@ -1407,17 +1407,17 @@ where P1: windows_core::Param, { windows_targets::link!("newdev.dll" "system" fn DiInstallDriverW(hwndparent : super::super::Foundation:: HWND, infpath : windows_core::PCWSTR, flags : DIINSTALLDRIVER_FLAGS, needreboot : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - unsafe { DiInstallDriverW(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), infpath.param().abi(), flags, core::mem::transmute(needreboot.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DiInstallDriverW(hwndparent.unwrap_or(core::mem::zeroed()) as _, infpath.param().abi(), flags, needreboot.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { DiRollbackDriver(deviceinfoset, deviceinfodata, core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), flags, core::mem::transmute(needreboot.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DiRollbackDriver(deviceinfoset, deviceinfodata, hwndparent.unwrap_or(core::mem::zeroed()) as _, flags, needreboot.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { DiShowUpdateDevice(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), deviceinfoset, deviceinfodata, flags, core::mem::transmute(needreboot.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DiShowUpdateDevice(hwndparent.unwrap_or(core::mem::zeroed()) as _, deviceinfoset, deviceinfodata, flags, needreboot.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn DiShowUpdateDriver(hwndparent: Option, filepath: P1, flags: u32, needreboot: Option<*mut super::super::Foundation::BOOL>) -> super::super::Foundation::BOOL @@ -1425,12 +1425,12 @@ where P1: windows_core::Param, { windows_targets::link!("newdev.dll" "system" fn DiShowUpdateDriver(hwndparent : super::super::Foundation:: HWND, filepath : windows_core::PCWSTR, flags : u32, needreboot : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - unsafe { DiShowUpdateDriver(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), filepath.param().abi(), flags, core::mem::transmute(needreboot.unwrap_or(core::mem::zeroed()))) } + unsafe { DiShowUpdateDriver(hwndparent.unwrap_or(core::mem::zeroed()) as _, filepath.param().abi(), flags, needreboot.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { DiUninstallDevice(hwndparent, deviceinfoset, deviceinfodata, flags, core::mem::transmute(needreboot.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DiUninstallDevice(hwndparent, deviceinfoset, deviceinfodata, flags, needreboot.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn DiUninstallDriverA(hwndparent: Option, infpath: P1, flags: DIUNINSTALLDRIVER_FLAGS, needreboot: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> @@ -1438,7 +1438,7 @@ where P1: windows_core::Param, { windows_targets::link!("newdev.dll" "system" fn DiUninstallDriverA(hwndparent : super::super::Foundation:: HWND, infpath : windows_core::PCSTR, flags : DIUNINSTALLDRIVER_FLAGS, needreboot : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - unsafe { DiUninstallDriverA(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), infpath.param().abi(), flags, core::mem::transmute(needreboot.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DiUninstallDriverA(hwndparent.unwrap_or(core::mem::zeroed()) as _, infpath.param().abi(), flags, needreboot.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn DiUninstallDriverW(hwndparent: Option, infpath: P1, flags: DIUNINSTALLDRIVER_FLAGS, needreboot: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> @@ -1446,7 +1446,7 @@ where P1: windows_core::Param, { windows_targets::link!("newdev.dll" "system" fn DiUninstallDriverW(hwndparent : super::super::Foundation:: HWND, infpath : windows_core::PCWSTR, flags : DIUNINSTALLDRIVER_FLAGS, needreboot : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - unsafe { DiUninstallDriverW(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), infpath.param().abi(), flags, core::mem::transmute(needreboot.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DiUninstallDriverW(hwndparent.unwrap_or(core::mem::zeroed()) as _, infpath.param().abi(), flags, needreboot.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn InstallHinfSectionA(window: super::super::Foundation::HWND, modulehandle: super::super::Foundation::HINSTANCE, commandline: P2, showcommand: i32) @@ -1470,7 +1470,7 @@ 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); - unsafe { SetupAddInstallSectionToDiskSpaceListA(diskspace, 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() } + unsafe { SetupAddInstallSectionToDiskSpaceListA(diskspace, infhandle, layoutinfhandle.unwrap_or(core::mem::zeroed()) as _, sectionname.param().abi(), reserved1.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _).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: Option) -> windows_core::Result<()> @@ -1478,7 +1478,7 @@ 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); - unsafe { SetupAddInstallSectionToDiskSpaceListW(diskspace, 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() } + unsafe { SetupAddInstallSectionToDiskSpaceListW(diskspace, infhandle, layoutinfhandle.unwrap_or(core::mem::zeroed()) as _, sectionname.param().abi(), reserved1.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _).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: Option) -> windows_core::Result<()> @@ -1486,7 +1486,7 @@ 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); - unsafe { SetupAddSectionToDiskSpaceListA(diskspace, infhandle, core::mem::transmute(listinfhandle.unwrap_or(core::mem::zeroed())), sectionname.param().abi(), operation, core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupAddSectionToDiskSpaceListA(diskspace, infhandle, listinfhandle.unwrap_or(core::mem::zeroed()) as _, sectionname.param().abi(), operation, reserved1.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _).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: Option) -> windows_core::Result<()> @@ -1494,7 +1494,7 @@ 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); - unsafe { SetupAddSectionToDiskSpaceListW(diskspace, infhandle, core::mem::transmute(listinfhandle.unwrap_or(core::mem::zeroed())), sectionname.param().abi(), operation, core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupAddSectionToDiskSpaceListW(diskspace, infhandle, listinfhandle.unwrap_or(core::mem::zeroed()) as _, sectionname.param().abi(), operation, reserved1.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _).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: Option) -> windows_core::Result<()> @@ -1502,7 +1502,7 @@ 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); - unsafe { SetupAddToDiskSpaceListA(diskspace, targetfilespec.param().abi(), filesize, operation, core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupAddToDiskSpaceListA(diskspace, targetfilespec.param().abi(), filesize, operation, reserved1.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _).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: Option) -> windows_core::Result<()> @@ -1510,7 +1510,7 @@ 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); - unsafe { SetupAddToDiskSpaceListW(diskspace, targetfilespec.param().abi(), filesize, operation, core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupAddToDiskSpaceListW(diskspace, targetfilespec.param().abi(), filesize, operation, reserved1.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupAddToSourceListA(flags: u32, source: P1) -> windows_core::Result<()> @@ -1534,7 +1534,7 @@ 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); - unsafe { SetupAdjustDiskSpaceListA(diskspace, driveroot.param().abi(), amount, core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupAdjustDiskSpaceListA(diskspace, driveroot.param().abi(), amount, reserved1.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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<()> @@ -1542,7 +1542,7 @@ 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); - unsafe { SetupAdjustDiskSpaceListW(diskspace, driveroot.param().abi(), amount, core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupAdjustDiskSpaceListW(diskspace, driveroot.param().abi(), amount, reserved1.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupBackupErrorA(hwndparent: super::super::Foundation::HWND, dialogtitle: P1, sourcefile: P2, targetfile: P3, win32errorcode: u32, style: u32) -> u32 @@ -1587,12 +1587,12 @@ pub unsafe fn SetupCloseLog() { #[inline] 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); - unsafe { SetupCommitFileQueueA(core::mem::transmute(owner.unwrap_or(core::mem::zeroed())), queuehandle, msghandler, context).ok() } + unsafe { SetupCommitFileQueueA(owner.unwrap_or(core::mem::zeroed()) as _, queuehandle, msghandler, context).ok() } } #[inline] 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); - unsafe { SetupCommitFileQueueW(core::mem::transmute(owner.unwrap_or(core::mem::zeroed())), queuehandle, msghandler, context).ok() } + unsafe { SetupCommitFileQueueW(owner.unwrap_or(core::mem::zeroed()) as _, queuehandle, msghandler, context).ok() } } #[inline] pub unsafe fn SetupConfigureWmiFromInfSectionA(infhandle: *const core::ffi::c_void, sectionname: P1, flags: u32) -> super::super::Foundation::BOOL @@ -1620,7 +1620,7 @@ where P5: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupCopyErrorA(hwndparent : super::super::Foundation:: HWND, dialogtitle : windows_core::PCSTR, diskname : windows_core::PCSTR, pathtosource : windows_core::PCSTR, sourcefile : windows_core::PCSTR, targetpathfile : windows_core::PCSTR, win32errorcode : u32, style : u32, pathbuffer : windows_core::PSTR, pathbuffersize : u32, pathrequiredsize : *mut u32) -> u32); - unsafe { SetupCopyErrorA(hwndparent, dialogtitle.param().abi(), diskname.param().abi(), pathtosource.param().abi(), sourcefile.param().abi(), targetpathfile.param().abi(), win32errorcode, style, core::mem::transmute(pathbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pathbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathrequiredsize.unwrap_or(core::mem::zeroed()))) } + unsafe { SetupCopyErrorA(hwndparent, dialogtitle.param().abi(), diskname.param().abi(), pathtosource.param().abi(), sourcefile.param().abi(), targetpathfile.param().abi(), win32errorcode, style, core::mem::transmute(pathbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pathbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pathrequiredsize.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -1632,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); - unsafe { SetupCopyErrorW(hwndparent, dialogtitle.param().abi(), diskname.param().abi(), pathtosource.param().abi(), sourcefile.param().abi(), targetpathfile.param().abi(), win32errorcode, style, core::mem::transmute(pathbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pathbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathrequiredsize.unwrap_or(core::mem::zeroed()))) } + unsafe { SetupCopyErrorW(hwndparent, dialogtitle.param().abi(), diskname.param().abi(), pathtosource.param().abi(), sourcefile.param().abi(), targetpathfile.param().abi(), win32errorcode, style, core::mem::transmute(pathbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pathbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pathrequiredsize.unwrap_or(core::mem::zeroed()) as _) } } #[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<()> @@ -1641,7 +1641,7 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupCopyOEMInfA(sourceinffilename : windows_core::PCSTR, oemsourcemedialocation : windows_core::PCSTR, oemsourcemediatype : OEM_SOURCE_MEDIA_TYPE, copystyle : SP_COPY_STYLE, destinationinffilename : windows_core::PSTR, destinationinffilenamesize : u32, requiredsize : *mut u32, destinationinffilenamecomponent : *mut windows_core::PSTR) -> super::super::Foundation:: BOOL); - unsafe { SetupCopyOEMInfA(sourceinffilename.param().abi(), oemsourcemedialocation.param().abi(), oemsourcemediatype, copystyle, core::mem::transmute(destinationinffilename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), destinationinffilename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(destinationinffilenamecomponent.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupCopyOEMInfA(sourceinffilename.param().abi(), oemsourcemedialocation.param().abi(), oemsourcemediatype, copystyle, core::mem::transmute(destinationinffilename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), destinationinffilename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredsize.unwrap_or(core::mem::zeroed()) as _, destinationinffilenamecomponent.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupCopyOEMInfW(sourceinffilename: P0, oemsourcemedialocation: P1, oemsourcemediatype: OEM_SOURCE_MEDIA_TYPE, copystyle: SP_COPY_STYLE, destinationinffilename: Option<&mut [u16]>, requiredsize: Option<*mut u32>, destinationinffilenamecomponent: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -1650,17 +1650,17 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupCopyOEMInfW(sourceinffilename : windows_core::PCWSTR, oemsourcemedialocation : windows_core::PCWSTR, oemsourcemediatype : OEM_SOURCE_MEDIA_TYPE, copystyle : SP_COPY_STYLE, destinationinffilename : windows_core::PWSTR, destinationinffilenamesize : u32, requiredsize : *mut u32, destinationinffilenamecomponent : *mut windows_core::PWSTR) -> super::super::Foundation:: BOOL); - unsafe { SetupCopyOEMInfW(sourceinffilename.param().abi(), oemsourcemedialocation.param().abi(), oemsourcemediatype, copystyle, core::mem::transmute(destinationinffilename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), destinationinffilename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(destinationinffilenamecomponent.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupCopyOEMInfW(sourceinffilename.param().abi(), oemsourcemedialocation.param().abi(), oemsourcemediatype, copystyle, core::mem::transmute(destinationinffilename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), destinationinffilename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredsize.unwrap_or(core::mem::zeroed()) as _, destinationinffilenamecomponent.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SetupCreateDiskSpaceListA(core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed())), flags) } + unsafe { SetupCreateDiskSpaceListA(reserved1.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _, flags) } } #[inline] 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); - unsafe { SetupCreateDiskSpaceListW(core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed())), flags) } + unsafe { SetupCreateDiskSpaceListW(reserved1.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _, flags) } } #[inline] pub unsafe fn SetupDecompressOrCopyFileA(sourcefilename: P0, targetfilename: P1, compressiontype: Option<*const FILE_COMPRESSION_TYPE>) -> u32 @@ -1669,7 +1669,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); - unsafe { SetupDecompressOrCopyFileA(sourcefilename.param().abi(), targetfilename.param().abi(), core::mem::transmute(compressiontype.unwrap_or(core::mem::zeroed()))) } + unsafe { SetupDecompressOrCopyFileA(sourcefilename.param().abi(), targetfilename.param().abi(), compressiontype.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SetupDecompressOrCopyFileW(sourcefilename: P0, targetfilename: P1, compressiontype: Option<*const FILE_COMPRESSION_TYPE>) -> u32 @@ -1678,7 +1678,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); - unsafe { SetupDecompressOrCopyFileW(sourcefilename.param().abi(), targetfilename.param().abi(), core::mem::transmute(compressiontype.unwrap_or(core::mem::zeroed()))) } + unsafe { SetupDecompressOrCopyFileW(sourcefilename.param().abi(), targetfilename.param().abi(), compressiontype.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SetupDefaultQueueCallbackA(context: *const core::ffi::c_void, notification: u32, param1: usize, param2: usize) -> u32 { @@ -1711,17 +1711,17 @@ where #[inline] pub unsafe fn SetupDestroyDiskSpaceList(diskspace: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDestroyDiskSpaceList(diskspace : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { SetupDestroyDiskSpaceList(core::mem::transmute(diskspace)).ok() } + unsafe { SetupDestroyDiskSpaceList(diskspace as _).ok() } } #[inline] 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); - unsafe { SetupDiAskForOEMDisk(deviceinfoset, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiAskForOEMDisk(deviceinfoset, deviceinfodata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupDiBuildClassInfoList(flags: u32, classguidlist: Option<&mut [windows_core::GUID]>, requiredsize: *mut u32) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiBuildClassInfoList(flags : u32, classguidlist : *mut windows_core::GUID, classguidlistsize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { SetupDiBuildClassInfoList(flags, core::mem::transmute(classguidlist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), classguidlist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredsize)).ok() } + unsafe { SetupDiBuildClassInfoList(flags, core::mem::transmute(classguidlist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), classguidlist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredsize as _).ok() } } #[inline] pub unsafe fn SetupDiBuildClassInfoListExA(flags: u32, classguidlist: Option<&mut [windows_core::GUID]>, requiredsize: *mut u32, machinename: P4, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1729,7 +1729,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); - unsafe { SetupDiBuildClassInfoListExA(flags, core::mem::transmute(classguidlist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), classguidlist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredsize), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiBuildClassInfoListExA(flags, core::mem::transmute(classguidlist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), classguidlist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredsize as _, machinename.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -1737,17 +1737,17 @@ 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); - unsafe { SetupDiBuildClassInfoListExW(flags, core::mem::transmute(classguidlist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), classguidlist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredsize), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiBuildClassInfoListExW(flags, core::mem::transmute(classguidlist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), classguidlist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredsize as _, machinename.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SetupDiBuildDriverInfoList(deviceinfoset, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), drivertype).ok() } + unsafe { SetupDiBuildDriverInfoList(deviceinfoset, deviceinfodata.unwrap_or(core::mem::zeroed()) as _, drivertype).ok() } } #[inline] 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); - unsafe { SetupDiCallClassInstaller(installfunction, deviceinfoset, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiCallClassInstaller(installfunction, deviceinfoset, deviceinfodata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupDiCancelDriverInfoSearch(deviceinfoset: HDEVINFO) -> windows_core::Result<()> { @@ -1757,7 +1757,7 @@ pub unsafe fn SetupDiCancelDriverInfoSearch(deviceinfoset: HDEVINFO) -> windows_ #[inline] 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); - unsafe { SetupDiChangeState(deviceinfoset, core::mem::transmute(deviceinfodata)).ok() } + unsafe { SetupDiChangeState(deviceinfoset, deviceinfodata as _).ok() } } #[inline] pub unsafe fn SetupDiClassGuidsFromNameA(classname: P0, classguidlist: &mut [windows_core::GUID], requiredsize: *mut u32) -> windows_core::Result<()> @@ -1765,7 +1765,7 @@ where P0: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiClassGuidsFromNameA(classname : windows_core::PCSTR, classguidlist : *mut windows_core::GUID, classguidlistsize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { SetupDiClassGuidsFromNameA(classname.param().abi(), core::mem::transmute(classguidlist.as_ptr()), classguidlist.len().try_into().unwrap(), core::mem::transmute(requiredsize)).ok() } + unsafe { SetupDiClassGuidsFromNameA(classname.param().abi(), core::mem::transmute(classguidlist.as_ptr()), classguidlist.len().try_into().unwrap(), requiredsize as _).ok() } } #[inline] pub unsafe fn SetupDiClassGuidsFromNameExA(classname: P0, classguidlist: &mut [windows_core::GUID], requiredsize: *mut u32, machinename: P4, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1774,7 +1774,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); - unsafe { 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() } + unsafe { SetupDiClassGuidsFromNameExA(classname.param().abi(), core::mem::transmute(classguidlist.as_ptr()), classguidlist.len().try_into().unwrap(), requiredsize as _, machinename.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -1783,7 +1783,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); - unsafe { 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() } + unsafe { SetupDiClassGuidsFromNameExW(classname.param().abi(), core::mem::transmute(classguidlist.as_ptr()), classguidlist.len().try_into().unwrap(), requiredsize as _, machinename.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupDiClassGuidsFromNameW(classname: P0, classguidlist: &mut [windows_core::GUID], requiredsize: *mut u32) -> windows_core::Result<()> @@ -1791,12 +1791,12 @@ where P0: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiClassGuidsFromNameW(classname : windows_core::PCWSTR, classguidlist : *mut windows_core::GUID, classguidlistsize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { SetupDiClassGuidsFromNameW(classname.param().abi(), core::mem::transmute(classguidlist.as_ptr()), classguidlist.len().try_into().unwrap(), core::mem::transmute(requiredsize)).ok() } + unsafe { SetupDiClassGuidsFromNameW(classname.param().abi(), core::mem::transmute(classguidlist.as_ptr()), classguidlist.len().try_into().unwrap(), requiredsize as _).ok() } } #[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); - unsafe { SetupDiClassNameFromGuidA(classguid, core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiClassNameFromGuidA(classguid, core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), requiredsize.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -1804,7 +1804,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); - unsafe { SetupDiClassNameFromGuidExA(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() } + unsafe { SetupDiClassNameFromGuidExA(classguid, core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), requiredsize.unwrap_or(core::mem::zeroed()) as _, machinename.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -1812,12 +1812,12 @@ 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); - unsafe { SetupDiClassNameFromGuidExW(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() } + unsafe { SetupDiClassNameFromGuidExW(classguid, core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), requiredsize.unwrap_or(core::mem::zeroed()) as _, machinename.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { SetupDiClassNameFromGuidW(classguid, core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiClassNameFromGuidW(classguid, core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), requiredsize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -1826,7 +1826,7 @@ where 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__ = unsafe { SetupDiCreateDevRegKeyA(deviceinfoset, deviceinfodata, scope, hwprofile, keytype, core::mem::transmute(infhandle.unwrap_or(core::mem::zeroed())), infsectionname.param().abi()) }; + let result__ = unsafe { SetupDiCreateDevRegKeyA(deviceinfoset, deviceinfodata, scope, hwprofile, keytype, infhandle.unwrap_or(core::mem::zeroed()) as _, infsectionname.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_System_Registry")] @@ -1836,7 +1836,7 @@ where 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__ = unsafe { SetupDiCreateDevRegKeyW(deviceinfoset, deviceinfodata, scope, hwprofile, keytype, core::mem::transmute(infhandle.unwrap_or(core::mem::zeroed())), infsectionname.param().abi()) }; + let result__ = unsafe { SetupDiCreateDevRegKeyW(deviceinfoset, deviceinfodata, scope, hwprofile, keytype, infhandle.unwrap_or(core::mem::zeroed()) as _, infsectionname.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1846,12 +1846,12 @@ where P3: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiCreateDeviceInfoA(deviceinfoset : HDEVINFO, devicename : windows_core::PCSTR, classguid : *const windows_core::GUID, devicedescription : windows_core::PCSTR, hwndparent : super::super::Foundation:: HWND, creationflags : SETUP_DI_DEVICE_CREATION_FLAGS, deviceinfodata : *mut SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - unsafe { SetupDiCreateDeviceInfoA(deviceinfoset, devicename.param().abi(), classguid, devicedescription.param().abi(), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), creationflags, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiCreateDeviceInfoA(deviceinfoset, devicename.param().abi(), classguid, devicedescription.param().abi(), hwndparent.unwrap_or(core::mem::zeroed()) as _, creationflags, deviceinfodata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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__ = unsafe { SetupDiCreateDeviceInfoList(core::mem::transmute(classguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { SetupDiCreateDeviceInfoList(classguid.unwrap_or(core::mem::zeroed()) as _, hwndparent.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1860,7 +1860,7 @@ where 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__ = unsafe { 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()))) }; + let result__ = unsafe { SetupDiCreateDeviceInfoListExA(classguid.unwrap_or(core::mem::zeroed()) as _, hwndparent.unwrap_or(core::mem::zeroed()) as _, machinename.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1869,7 +1869,7 @@ where 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__ = unsafe { 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()))) }; + let result__ = unsafe { SetupDiCreateDeviceInfoListExW(classguid.unwrap_or(core::mem::zeroed()) as _, hwndparent.unwrap_or(core::mem::zeroed()) as _, machinename.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1879,7 +1879,7 @@ where P3: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiCreateDeviceInfoW(deviceinfoset : HDEVINFO, devicename : windows_core::PCWSTR, classguid : *const windows_core::GUID, devicedescription : windows_core::PCWSTR, hwndparent : super::super::Foundation:: HWND, creationflags : SETUP_DI_DEVICE_CREATION_FLAGS, deviceinfodata : *mut SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - unsafe { SetupDiCreateDeviceInfoW(deviceinfoset, devicename.param().abi(), classguid, devicedescription.param().abi(), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), creationflags, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiCreateDeviceInfoW(deviceinfoset, devicename.param().abi(), classguid, devicedescription.param().abi(), hwndparent.unwrap_or(core::mem::zeroed()) as _, creationflags, deviceinfodata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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<()> @@ -1887,7 +1887,7 @@ where 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); - unsafe { SetupDiCreateDeviceInterfaceA(deviceinfoset, deviceinfodata, interfaceclassguid, referencestring.param().abi(), creationflags, core::mem::transmute(deviceinterfacedata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiCreateDeviceInterfaceA(deviceinfoset, deviceinfodata, interfaceclassguid, referencestring.param().abi(), creationflags, deviceinterfacedata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -1896,7 +1896,7 @@ where 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__ = unsafe { SetupDiCreateDeviceInterfaceRegKeyA(deviceinfoset, deviceinterfacedata, core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), samdesired, core::mem::transmute(infhandle.unwrap_or(core::mem::zeroed())), infsectionname.param().abi()) }; + let result__ = unsafe { SetupDiCreateDeviceInterfaceRegKeyA(deviceinfoset, deviceinterfacedata, reserved.unwrap_or(core::mem::zeroed()) as _, samdesired, infhandle.unwrap_or(core::mem::zeroed()) as _, infsectionname.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_System_Registry")] @@ -1906,7 +1906,7 @@ where 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__ = unsafe { SetupDiCreateDeviceInterfaceRegKeyW(deviceinfoset, deviceinterfacedata, core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), samdesired, core::mem::transmute(infhandle.unwrap_or(core::mem::zeroed())), infsectionname.param().abi()) }; + let result__ = unsafe { SetupDiCreateDeviceInterfaceRegKeyW(deviceinfoset, deviceinterfacedata, reserved.unwrap_or(core::mem::zeroed()) as _, samdesired, infhandle.unwrap_or(core::mem::zeroed()) as _, infsectionname.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1915,7 +1915,7 @@ where 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); - unsafe { SetupDiCreateDeviceInterfaceW(deviceinfoset, deviceinfodata, interfaceclassguid, referencestring.param().abi(), creationflags, core::mem::transmute(deviceinterfacedata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiCreateDeviceInterfaceW(deviceinfoset, deviceinfodata, interfaceclassguid, referencestring.param().abi(), creationflags, deviceinterfacedata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupDiDeleteDevRegKey(deviceinfoset: HDEVINFO, deviceinfodata: *const SP_DEVINFO_DATA, scope: u32, hwprofile: u32, keytype: u32) -> windows_core::Result<()> { @@ -1935,7 +1935,7 @@ pub unsafe fn SetupDiDeleteDeviceInterfaceData(deviceinfoset: HDEVINFO, devicein #[inline] 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); - unsafe { SetupDiDeleteDeviceInterfaceRegKey(deviceinfoset, deviceinterfacedata, core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiDeleteDeviceInterfaceRegKey(deviceinfoset, deviceinterfacedata, reserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_UI_Controls")] #[inline] @@ -1951,7 +1951,7 @@ pub unsafe fn SetupDiDestroyDeviceInfoList(deviceinfoset: HDEVINFO) -> windows_c #[inline] 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); - unsafe { SetupDiDestroyDriverInfoList(deviceinfoset, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), drivertype).ok() } + unsafe { SetupDiDestroyDriverInfoList(deviceinfoset, deviceinfodata.unwrap_or(core::mem::zeroed()) as _, drivertype).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1962,34 +1962,34 @@ pub unsafe fn SetupDiDrawMiniIcon(hdc: super::super::Graphics::Gdi::HDC, rc: sup #[inline] 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); - unsafe { SetupDiEnumDeviceInfo(deviceinfoset, memberindex, core::mem::transmute(deviceinfodata)).ok() } + unsafe { SetupDiEnumDeviceInfo(deviceinfoset, memberindex, deviceinfodata as _).ok() } } #[inline] 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); - unsafe { SetupDiEnumDeviceInterfaces(deviceinfoset, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), interfaceclassguid, memberindex, core::mem::transmute(deviceinterfacedata)).ok() } + unsafe { SetupDiEnumDeviceInterfaces(deviceinfoset, deviceinfodata.unwrap_or(core::mem::zeroed()) as _, interfaceclassguid, memberindex, deviceinterfacedata as _).ok() } } #[inline] 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); - unsafe { SetupDiEnumDriverInfoA(deviceinfoset, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), drivertype, memberindex, core::mem::transmute(driverinfodata)).ok() } + unsafe { SetupDiEnumDriverInfoA(deviceinfoset, deviceinfodata.unwrap_or(core::mem::zeroed()) as _, drivertype, memberindex, driverinfodata as _).ok() } } #[inline] 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); - unsafe { SetupDiEnumDriverInfoW(deviceinfoset, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), drivertype, memberindex, core::mem::transmute(driverinfodata)).ok() } + unsafe { SetupDiEnumDriverInfoW(deviceinfoset, deviceinfodata.unwrap_or(core::mem::zeroed()) as _, drivertype, memberindex, driverinfodata as _).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); - unsafe { SetupDiGetActualModelsSectionA(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() } + unsafe { SetupDiGetActualModelsSectionA(context, alternateplatforminfo.unwrap_or(core::mem::zeroed()) as _, 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()), requiredsize.unwrap_or(core::mem::zeroed()) as _, reserved.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { SetupDiGetActualModelsSectionW(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() } + unsafe { SetupDiGetActualModelsSectionW(context, alternateplatforminfo.unwrap_or(core::mem::zeroed()) as _, 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()), requiredsize.unwrap_or(core::mem::zeroed()) as _, reserved.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -1997,7 +1997,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); - unsafe { SetupDiGetActualSectionToInstallA(infhandle, infsectionname.param().abi(), core::mem::transmute(infsectionwithext.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), infsectionwithext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(extension.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiGetActualSectionToInstallA(infhandle, infsectionname.param().abi(), core::mem::transmute(infsectionwithext.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), infsectionwithext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredsize.unwrap_or(core::mem::zeroed()) as _, extension.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(all(feature = "Win32_System_Diagnostics_Debug", feature = "Win32_System_SystemInformation"))] #[inline] @@ -2006,19 +2006,7 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiGetActualSectionToInstallExA(infhandle : *const core::ffi::c_void, infsectionname : windows_core::PCSTR, alternateplatforminfo : *const SP_ALTPLATFORM_INFO_V2, infsectionwithext : windows_core::PSTR, infsectionwithextsize : u32, requiredsize : *mut u32, extension : *mut windows_core::PSTR, reserved : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { - SetupDiGetActualSectionToInstallExA( - infhandle, - infsectionname.param().abi(), - 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(extension.unwrap_or(core::mem::zeroed())), - core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), - ) - .ok() - } + unsafe { SetupDiGetActualSectionToInstallExA(infhandle, infsectionname.param().abi(), alternateplatforminfo.unwrap_or(core::mem::zeroed()) as _, 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()), requiredsize.unwrap_or(core::mem::zeroed()) as _, extension.unwrap_or(core::mem::zeroed()) as _, reserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(all(feature = "Win32_System_Diagnostics_Debug", feature = "Win32_System_SystemInformation"))] #[inline] @@ -2027,19 +2015,7 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiGetActualSectionToInstallExW(infhandle : *const core::ffi::c_void, infsectionname : windows_core::PCWSTR, alternateplatforminfo : *const SP_ALTPLATFORM_INFO_V2, infsectionwithext : windows_core::PWSTR, infsectionwithextsize : u32, requiredsize : *mut u32, extension : *mut windows_core::PWSTR, reserved : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { - SetupDiGetActualSectionToInstallExW( - infhandle, - infsectionname.param().abi(), - 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(extension.unwrap_or(core::mem::zeroed())), - core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), - ) - .ok() - } + unsafe { SetupDiGetActualSectionToInstallExW(infhandle, infsectionname.param().abi(), alternateplatforminfo.unwrap_or(core::mem::zeroed()) as _, 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()), requiredsize.unwrap_or(core::mem::zeroed()) as _, extension.unwrap_or(core::mem::zeroed()) as _, reserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupDiGetActualSectionToInstallW(infhandle: *const core::ffi::c_void, infsectionname: P1, infsectionwithext: Option<&mut [u16]>, requiredsize: Option<*mut u32>, extension: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -2047,17 +2023,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); - unsafe { SetupDiGetActualSectionToInstallW(infhandle, infsectionname.param().abi(), core::mem::transmute(infsectionwithext.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), infsectionwithext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(extension.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiGetActualSectionToInstallW(infhandle, infsectionname.param().abi(), core::mem::transmute(infsectionwithext.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), infsectionwithext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredsize.unwrap_or(core::mem::zeroed()) as _, extension.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { SetupDiGetClassBitmapIndex(core::mem::transmute(classguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(miniiconindex)).ok() } + unsafe { SetupDiGetClassBitmapIndex(classguid.unwrap_or(core::mem::zeroed()) as _, miniiconindex as _).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); - unsafe { SetupDiGetClassDescriptionA(classguid, core::mem::transmute(classdescription.as_ptr()), classdescription.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiGetClassDescriptionA(classguid, core::mem::transmute(classdescription.as_ptr()), classdescription.len().try_into().unwrap(), requiredsize.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -2065,7 +2041,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); - unsafe { SetupDiGetClassDescriptionExA(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() } + unsafe { SetupDiGetClassDescriptionExA(classguid, core::mem::transmute(classdescription.as_ptr()), classdescription.len().try_into().unwrap(), requiredsize.unwrap_or(core::mem::zeroed()) as _, machinename.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -2073,24 +2049,24 @@ 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); - unsafe { SetupDiGetClassDescriptionExW(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() } + unsafe { SetupDiGetClassDescriptionExW(classguid, core::mem::transmute(classdescription.as_ptr()), classdescription.len().try_into().unwrap(), requiredsize.unwrap_or(core::mem::zeroed()) as _, machinename.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { SetupDiGetClassDescriptionW(classguid, core::mem::transmute(classdescription.as_ptr()), classdescription.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiGetClassDescriptionW(classguid, core::mem::transmute(classdescription.as_ptr()), classdescription.len().try_into().unwrap(), requiredsize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] 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); - unsafe { SetupDiGetClassDevPropertySheetsA(deviceinfoset, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), propertysheetheader, propertysheetheaderpagelistsize, core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed())), propertysheettype).ok() } + unsafe { SetupDiGetClassDevPropertySheetsA(deviceinfoset, deviceinfodata.unwrap_or(core::mem::zeroed()) as _, propertysheetheader, propertysheetheaderpagelistsize, requiredsize.unwrap_or(core::mem::zeroed()) as _, propertysheettype).ok() } } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] 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); - unsafe { SetupDiGetClassDevPropertySheetsW(deviceinfoset, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), propertysheetheader, propertysheetheaderpagelistsize, core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed())), propertysheettype).ok() } + unsafe { SetupDiGetClassDevPropertySheetsW(deviceinfoset, deviceinfodata.unwrap_or(core::mem::zeroed()) as _, propertysheetheader, propertysheetheaderpagelistsize, requiredsize.unwrap_or(core::mem::zeroed()) as _, propertysheettype).ok() } } #[inline] pub unsafe fn SetupDiGetClassDevsA(classguid: Option<*const windows_core::GUID>, enumerator: P1, hwndparent: Option, flags: SETUP_DI_GET_CLASS_DEVS_FLAGS) -> windows_core::Result @@ -2098,7 +2074,7 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassDevsA(classguid : *const windows_core::GUID, enumerator : windows_core::PCSTR, hwndparent : super::super::Foundation:: HWND, flags : SETUP_DI_GET_CLASS_DEVS_FLAGS) -> HDEVINFO); - let result__ = unsafe { SetupDiGetClassDevsA(core::mem::transmute(classguid.unwrap_or(core::mem::zeroed())), enumerator.param().abi(), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), flags) }; + let result__ = unsafe { SetupDiGetClassDevsA(classguid.unwrap_or(core::mem::zeroed()) as _, enumerator.param().abi(), hwndparent.unwrap_or(core::mem::zeroed()) as _, flags) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -2108,7 +2084,7 @@ where 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__ = unsafe { SetupDiGetClassDevsExA(core::mem::transmute(classguid.unwrap_or(core::mem::zeroed())), enumerator.param().abi(), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), flags, core::mem::transmute(deviceinfoset.unwrap_or(core::mem::zeroed())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { SetupDiGetClassDevsExA(classguid.unwrap_or(core::mem::zeroed()) as _, enumerator.param().abi(), hwndparent.unwrap_or(core::mem::zeroed()) as _, flags, deviceinfoset.unwrap_or(core::mem::zeroed()) as _, machinename.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -2118,7 +2094,7 @@ where 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__ = unsafe { SetupDiGetClassDevsExW(core::mem::transmute(classguid.unwrap_or(core::mem::zeroed())), enumerator.param().abi(), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), flags, core::mem::transmute(deviceinfoset.unwrap_or(core::mem::zeroed())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { SetupDiGetClassDevsExW(classguid.unwrap_or(core::mem::zeroed()) as _, enumerator.param().abi(), hwndparent.unwrap_or(core::mem::zeroed()) as _, flags, deviceinfoset.unwrap_or(core::mem::zeroed()) as _, machinename.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -2127,20 +2103,20 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassDevsW(classguid : *const windows_core::GUID, enumerator : windows_core::PCWSTR, hwndparent : super::super::Foundation:: HWND, flags : SETUP_DI_GET_CLASS_DEVS_FLAGS) -> HDEVINFO); - let result__ = unsafe { SetupDiGetClassDevsW(core::mem::transmute(classguid.unwrap_or(core::mem::zeroed())), enumerator.param().abi(), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), flags) }; + let result__ = unsafe { SetupDiGetClassDevsW(classguid.unwrap_or(core::mem::zeroed()) as _, enumerator.param().abi(), hwndparent.unwrap_or(core::mem::zeroed()) as _, flags) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_UI_Controls")] #[inline] pub unsafe fn SetupDiGetClassImageIndex(classimagelistdata: *const SP_CLASSIMAGELIST_DATA, classguid: *const windows_core::GUID, imageindex: *mut i32) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassImageIndex(classimagelistdata : *const SP_CLASSIMAGELIST_DATA, classguid : *const windows_core::GUID, imageindex : *mut i32) -> super::super::Foundation:: BOOL); - unsafe { SetupDiGetClassImageIndex(classimagelistdata, classguid, core::mem::transmute(imageindex)).ok() } + unsafe { SetupDiGetClassImageIndex(classimagelistdata, classguid, imageindex as _).ok() } } #[cfg(feature = "Win32_UI_Controls")] #[inline] pub unsafe fn SetupDiGetClassImageList(classimagelistdata: *mut SP_CLASSIMAGELIST_DATA) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassImageList(classimagelistdata : *mut SP_CLASSIMAGELIST_DATA) -> super::super::Foundation:: BOOL); - unsafe { SetupDiGetClassImageList(core::mem::transmute(classimagelistdata)).ok() } + unsafe { SetupDiGetClassImageList(classimagelistdata as _).ok() } } #[cfg(feature = "Win32_UI_Controls")] #[inline] @@ -2149,7 +2125,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); - unsafe { SetupDiGetClassImageListExA(core::mem::transmute(classimagelistdata), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiGetClassImageListExA(classimagelistdata as _, machinename.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_UI_Controls")] #[inline] @@ -2158,17 +2134,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); - unsafe { SetupDiGetClassImageListExW(core::mem::transmute(classimagelistdata), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiGetClassImageListExW(classimagelistdata as _, machinename.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SetupDiGetClassInstallParamsA(deviceinfoset, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(classinstallparams.unwrap_or(core::mem::zeroed())), classinstallparamssize, core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiGetClassInstallParamsA(deviceinfoset, deviceinfodata.unwrap_or(core::mem::zeroed()) as _, classinstallparams.unwrap_or(core::mem::zeroed()) as _, classinstallparamssize, requiredsize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SetupDiGetClassInstallParamsW(deviceinfoset, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(classinstallparams.unwrap_or(core::mem::zeroed())), classinstallparamssize, core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiGetClassInstallParamsW(deviceinfoset, deviceinfodata.unwrap_or(core::mem::zeroed()) as _, classinstallparams.unwrap_or(core::mem::zeroed()) as _, classinstallparamssize, requiredsize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -2177,12 +2153,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); - unsafe { SetupDiGetClassPropertyExW(classguid, 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())), flags, machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiGetClassPropertyExW(classguid, propertykey, propertytype as _, 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()), requiredsize.unwrap_or(core::mem::zeroed()) as _, flags, machinename.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { SetupDiGetClassPropertyKeys(classguid, core::mem::transmute(propertykeyarray.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), propertykeyarray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredpropertykeycount.unwrap_or(core::mem::zeroed())), flags).ok() } + unsafe { SetupDiGetClassPropertyKeys(classguid, core::mem::transmute(propertykeyarray.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), propertykeyarray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredpropertykeycount.unwrap_or(core::mem::zeroed()) as _, 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<()> @@ -2190,13 +2166,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); - unsafe { SetupDiGetClassPropertyKeysExW(classguid, core::mem::transmute(propertykeyarray.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), propertykeyarray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredpropertykeycount.unwrap_or(core::mem::zeroed())), flags, machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiGetClassPropertyKeysExW(classguid, core::mem::transmute(propertykeyarray.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), propertykeyarray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredpropertykeycount.unwrap_or(core::mem::zeroed()) as _, flags, machinename.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { SetupDiGetClassPropertyW(classguid, 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())), flags).ok() } + unsafe { SetupDiGetClassPropertyW(classguid, propertykey, propertytype as _, 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()), requiredsize.unwrap_or(core::mem::zeroed()) as _, 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<()> @@ -2204,7 +2180,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); - unsafe { SetupDiGetClassRegistryPropertyA(classguid, 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() } + unsafe { SetupDiGetClassRegistryPropertyA(classguid, property, propertyregdatatype.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(propertybuffer.as_ptr()), propertybuffer.len().try_into().unwrap(), requiredsize.unwrap_or(core::mem::zeroed()) as _, machinename.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -2212,7 +2188,7 @@ 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); - unsafe { SetupDiGetClassRegistryPropertyW(classguid, 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() } + unsafe { SetupDiGetClassRegistryPropertyW(classguid, property, propertyregdatatype.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(propertybuffer.as_ptr()), propertybuffer.len().try_into().unwrap(), requiredsize.unwrap_or(core::mem::zeroed()) as _, machinename.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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<()> @@ -2220,7 +2196,7 @@ where 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); - unsafe { SetupDiGetCustomDevicePropertyA(deviceinfoset, deviceinfodata, custompropertyname.param().abi(), 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() } + unsafe { SetupDiGetCustomDevicePropertyA(deviceinfoset, deviceinfodata, custompropertyname.param().abi(), flags, propertyregdatatype.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(propertybuffer.as_ptr()), propertybuffer.len().try_into().unwrap(), requiredsize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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<()> @@ -2228,114 +2204,114 @@ where 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); - unsafe { SetupDiGetCustomDevicePropertyW(deviceinfoset, deviceinfodata, custompropertyname.param().abi(), 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() } + unsafe { SetupDiGetCustomDevicePropertyW(deviceinfoset, deviceinfodata, custompropertyname.param().abi(), flags, propertyregdatatype.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(propertybuffer.as_ptr()), propertybuffer.len().try_into().unwrap(), requiredsize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SetupDiGetDeviceInfoListClass(deviceinfoset, core::mem::transmute(classguid)).ok() } + unsafe { SetupDiGetDeviceInfoListClass(deviceinfoset, classguid as _).ok() } } #[inline] 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); - unsafe { SetupDiGetDeviceInfoListDetailA(deviceinfoset, core::mem::transmute(deviceinfosetdetaildata)).ok() } + unsafe { SetupDiGetDeviceInfoListDetailA(deviceinfoset, deviceinfosetdetaildata as _).ok() } } #[inline] 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); - unsafe { SetupDiGetDeviceInfoListDetailW(deviceinfoset, core::mem::transmute(deviceinfosetdetaildata)).ok() } + unsafe { SetupDiGetDeviceInfoListDetailW(deviceinfoset, deviceinfosetdetaildata as _).ok() } } #[inline] 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); - unsafe { SetupDiGetDeviceInstallParamsA(deviceinfoset, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(deviceinstallparams)).ok() } + unsafe { SetupDiGetDeviceInstallParamsA(deviceinfoset, deviceinfodata.unwrap_or(core::mem::zeroed()) as _, deviceinstallparams as _).ok() } } #[inline] 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); - unsafe { SetupDiGetDeviceInstallParamsW(deviceinfoset, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(deviceinstallparams)).ok() } + unsafe { SetupDiGetDeviceInstallParamsW(deviceinfoset, deviceinfodata.unwrap_or(core::mem::zeroed()) as _, deviceinstallparams as _).ok() } } #[inline] 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); - unsafe { SetupDiGetDeviceInstanceIdA(deviceinfoset, 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() } + unsafe { SetupDiGetDeviceInstanceIdA(deviceinfoset, 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()), requiredsize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SetupDiGetDeviceInstanceIdW(deviceinfoset, 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() } + unsafe { SetupDiGetDeviceInstanceIdW(deviceinfoset, 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()), requiredsize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SetupDiGetDeviceInterfaceAlias(deviceinfoset, deviceinterfacedata, aliasinterfaceclassguid, core::mem::transmute(aliasdeviceinterfacedata)).ok() } + unsafe { SetupDiGetDeviceInterfaceAlias(deviceinfoset, deviceinterfacedata, aliasinterfaceclassguid, aliasdeviceinterfacedata as _).ok() } } #[inline] 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); - unsafe { SetupDiGetDeviceInterfaceDetailA(deviceinfoset, deviceinterfacedata, core::mem::transmute(deviceinterfacedetaildata.unwrap_or(core::mem::zeroed())), deviceinterfacedetaildatasize, core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiGetDeviceInterfaceDetailA(deviceinfoset, deviceinterfacedata, deviceinterfacedetaildata.unwrap_or(core::mem::zeroed()) as _, deviceinterfacedetaildatasize, requiredsize.unwrap_or(core::mem::zeroed()) as _, deviceinfodata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SetupDiGetDeviceInterfaceDetailW(deviceinfoset, deviceinterfacedata, core::mem::transmute(deviceinterfacedetaildata.unwrap_or(core::mem::zeroed())), deviceinterfacedetaildatasize, core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiGetDeviceInterfaceDetailW(deviceinfoset, deviceinterfacedata, deviceinterfacedetaildata.unwrap_or(core::mem::zeroed()) as _, deviceinterfacedetaildatasize, requiredsize.unwrap_or(core::mem::zeroed()) as _, deviceinfodata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SetupDiGetDeviceInterfacePropertyKeys(deviceinfoset, 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())), flags).ok() } + unsafe { SetupDiGetDeviceInterfacePropertyKeys(deviceinfoset, 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()), requiredpropertykeycount.unwrap_or(core::mem::zeroed()) as _, flags).ok() } } #[cfg(feature = "Win32_Devices_Properties")] #[inline] 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); - unsafe { SetupDiGetDeviceInterfacePropertyW(deviceinfoset, deviceinterfacedata, 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())), flags).ok() } + unsafe { SetupDiGetDeviceInterfacePropertyW(deviceinfoset, deviceinterfacedata, propertykey, propertytype as _, 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()), requiredsize.unwrap_or(core::mem::zeroed()) as _, flags).ok() } } #[inline] 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); - unsafe { SetupDiGetDevicePropertyKeys(deviceinfoset, 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())), flags).ok() } + unsafe { SetupDiGetDevicePropertyKeys(deviceinfoset, 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()), requiredpropertykeycount.unwrap_or(core::mem::zeroed()) as _, flags).ok() } } #[cfg(feature = "Win32_Devices_Properties")] #[inline] 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); - unsafe { SetupDiGetDevicePropertyW(deviceinfoset, deviceinfodata, 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())), flags).ok() } + unsafe { SetupDiGetDevicePropertyW(deviceinfoset, deviceinfodata, propertykey, propertytype as _, 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()), requiredsize.unwrap_or(core::mem::zeroed()) as _, flags).ok() } } #[inline] 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); - unsafe { SetupDiGetDeviceRegistryPropertyA(deviceinfoset, deviceinfodata, 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() } + unsafe { SetupDiGetDeviceRegistryPropertyA(deviceinfoset, deviceinfodata, property, propertyregdatatype.unwrap_or(core::mem::zeroed()) as _, 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()), requiredsize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SetupDiGetDeviceRegistryPropertyW(deviceinfoset, deviceinfodata, 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() } + unsafe { SetupDiGetDeviceRegistryPropertyW(deviceinfoset, deviceinfodata, property, propertyregdatatype.unwrap_or(core::mem::zeroed()) as _, 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()), requiredsize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SetupDiGetDriverInfoDetailA(deviceinfoset, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), driverinfodata, core::mem::transmute(driverinfodetaildata.unwrap_or(core::mem::zeroed())), driverinfodetaildatasize, core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiGetDriverInfoDetailA(deviceinfoset, deviceinfodata.unwrap_or(core::mem::zeroed()) as _, driverinfodata, driverinfodetaildata.unwrap_or(core::mem::zeroed()) as _, driverinfodetaildatasize, requiredsize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SetupDiGetDriverInfoDetailW(deviceinfoset, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), driverinfodata, core::mem::transmute(driverinfodetaildata.unwrap_or(core::mem::zeroed())), driverinfodetaildatasize, core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiGetDriverInfoDetailW(deviceinfoset, deviceinfodata.unwrap_or(core::mem::zeroed()) as _, driverinfodata, driverinfodetaildata.unwrap_or(core::mem::zeroed()) as _, driverinfodetaildatasize, requiredsize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SetupDiGetDriverInstallParamsA(deviceinfoset, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), driverinfodata, core::mem::transmute(driverinstallparams)).ok() } + unsafe { SetupDiGetDriverInstallParamsA(deviceinfoset, deviceinfodata.unwrap_or(core::mem::zeroed()) as _, driverinfodata, driverinstallparams as _).ok() } } #[inline] 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); - unsafe { SetupDiGetDriverInstallParamsW(deviceinfoset, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), driverinfodata, core::mem::transmute(driverinstallparams)).ok() } + unsafe { SetupDiGetDriverInstallParamsW(deviceinfoset, deviceinfodata.unwrap_or(core::mem::zeroed()) as _, driverinfodata, driverinstallparams as _).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); - unsafe { SetupDiGetHwProfileFriendlyNameA(hwprofile, core::mem::transmute(friendlyname.as_ptr()), friendlyname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiGetHwProfileFriendlyNameA(hwprofile, core::mem::transmute(friendlyname.as_ptr()), friendlyname.len().try_into().unwrap(), requiredsize.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -2343,7 +2319,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); - unsafe { SetupDiGetHwProfileFriendlyNameExA(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() } + unsafe { SetupDiGetHwProfileFriendlyNameExA(hwprofile, core::mem::transmute(friendlyname.as_ptr()), friendlyname.len().try_into().unwrap(), requiredsize.unwrap_or(core::mem::zeroed()) as _, machinename.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -2351,17 +2327,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); - unsafe { SetupDiGetHwProfileFriendlyNameExW(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() } + unsafe { SetupDiGetHwProfileFriendlyNameExW(hwprofile, core::mem::transmute(friendlyname.as_ptr()), friendlyname.len().try_into().unwrap(), requiredsize.unwrap_or(core::mem::zeroed()) as _, machinename.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { SetupDiGetHwProfileFriendlyNameW(hwprofile, core::mem::transmute(friendlyname.as_ptr()), friendlyname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiGetHwProfileFriendlyNameW(hwprofile, core::mem::transmute(friendlyname.as_ptr()), friendlyname.len().try_into().unwrap(), requiredsize.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { 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() } + unsafe { SetupDiGetHwProfileList(core::mem::transmute(hwprofilelist.as_ptr()), hwprofilelist.len().try_into().unwrap(), requiredsize as _, currentlyactiveindex.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -2369,7 +2345,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); - unsafe { 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() } + unsafe { SetupDiGetHwProfileListExA(core::mem::transmute(hwprofilelist.as_ptr()), hwprofilelist.len().try_into().unwrap(), requiredsize as _, currentlyactiveindex.unwrap_or(core::mem::zeroed()) as _, machinename.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -2377,7 +2353,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); - unsafe { 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() } + unsafe { SetupDiGetHwProfileListExW(core::mem::transmute(hwprofilelist.as_ptr()), hwprofilelist.len().try_into().unwrap(), requiredsize as _, currentlyactiveindex.unwrap_or(core::mem::zeroed()) as _, machinename.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupDiGetINFClassA(infname: P0, classguid: *mut windows_core::GUID, classname: &mut [u8], requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -2385,7 +2361,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); - unsafe { 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() } + unsafe { SetupDiGetINFClassA(infname.param().abi(), classguid as _, core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), requiredsize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupDiGetINFClassW(infname: P0, classguid: *mut windows_core::GUID, classname: &mut [u16], requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -2393,28 +2369,28 @@ 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); - unsafe { 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() } + unsafe { SetupDiGetINFClassW(infname.param().abi(), classguid as _, core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), requiredsize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SetupDiGetSelectedDevice(deviceinfoset, core::mem::transmute(deviceinfodata)).ok() } + unsafe { SetupDiGetSelectedDevice(deviceinfoset, deviceinfodata as _).ok() } } #[inline] 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); - unsafe { SetupDiGetSelectedDriverA(deviceinfoset, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(driverinfodata)).ok() } + unsafe { SetupDiGetSelectedDriverA(deviceinfoset, deviceinfodata.unwrap_or(core::mem::zeroed()) as _, driverinfodata as _).ok() } } #[inline] 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); - unsafe { SetupDiGetSelectedDriverW(deviceinfoset, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(driverinfodata)).ok() } + unsafe { SetupDiGetSelectedDriverW(deviceinfoset, deviceinfodata.unwrap_or(core::mem::zeroed()) as _, driverinfodata as _).ok() } } #[cfg(feature = "Win32_UI_Controls")] #[inline] 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); - unsafe { SetupDiGetWizardPage(deviceinfoset, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), installwizarddata, pagetype, flags) } + unsafe { SetupDiGetWizardPage(deviceinfoset, deviceinfodata.unwrap_or(core::mem::zeroed()) as _, installwizarddata, pagetype, flags) } } #[inline] pub unsafe fn SetupDiInstallClassA(hwndparent: Option, inffilename: P1, flags: u32, filequeue: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2422,7 +2398,7 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiInstallClassA(hwndparent : super::super::Foundation:: HWND, inffilename : windows_core::PCSTR, flags : u32, filequeue : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { SetupDiInstallClassA(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), inffilename.param().abi(), flags, core::mem::transmute(filequeue.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiInstallClassA(hwndparent.unwrap_or(core::mem::zeroed()) as _, inffilename.param().abi(), flags, filequeue.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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<()> @@ -2430,7 +2406,7 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiInstallClassExA(hwndparent : super::super::Foundation:: HWND, inffilename : windows_core::PCSTR, flags : u32, filequeue : *const core::ffi::c_void, interfaceclassguid : *const windows_core::GUID, reserved1 : *const core::ffi::c_void, reserved2 : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { SetupDiInstallClassExA(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), inffilename.param().abi(), 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() } + unsafe { SetupDiInstallClassExA(hwndparent.unwrap_or(core::mem::zeroed()) as _, inffilename.param().abi(), flags, filequeue.unwrap_or(core::mem::zeroed()) as _, interfaceclassguid.unwrap_or(core::mem::zeroed()) as _, reserved1.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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<()> @@ -2438,7 +2414,7 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiInstallClassExW(hwndparent : super::super::Foundation:: HWND, inffilename : windows_core::PCWSTR, flags : u32, filequeue : *const core::ffi::c_void, interfaceclassguid : *const windows_core::GUID, reserved1 : *const core::ffi::c_void, reserved2 : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { SetupDiInstallClassExW(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), inffilename.param().abi(), 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() } + unsafe { SetupDiInstallClassExW(hwndparent.unwrap_or(core::mem::zeroed()) as _, inffilename.param().abi(), flags, filequeue.unwrap_or(core::mem::zeroed()) as _, interfaceclassguid.unwrap_or(core::mem::zeroed()) as _, reserved1.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupDiInstallClassW(hwndparent: Option, inffilename: P1, flags: u32, filequeue: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2446,12 +2422,12 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiInstallClassW(hwndparent : super::super::Foundation:: HWND, inffilename : windows_core::PCWSTR, flags : u32, filequeue : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { SetupDiInstallClassW(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), inffilename.param().abi(), flags, core::mem::transmute(filequeue.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiInstallClassW(hwndparent.unwrap_or(core::mem::zeroed()) as _, inffilename.param().abi(), flags, filequeue.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SetupDiInstallDevice(deviceinfoset, core::mem::transmute(deviceinfodata)).ok() } + unsafe { SetupDiInstallDevice(deviceinfoset, deviceinfodata as _).ok() } } #[inline] pub unsafe fn SetupDiInstallDeviceInterfaces(deviceinfoset: HDEVINFO, deviceinfodata: *const SP_DEVINFO_DATA) -> windows_core::Result<()> { @@ -2467,19 +2443,19 @@ pub unsafe fn SetupDiInstallDriverFiles(deviceinfoset: HDEVINFO, deviceinfodata: #[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); - unsafe { SetupDiLoadClassIcon(classguid, core::mem::transmute(largeicon.unwrap_or(core::mem::zeroed())), core::mem::transmute(miniiconindex.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiLoadClassIcon(classguid, largeicon.unwrap_or(core::mem::zeroed()) as _, miniiconindex.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] 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); - unsafe { SetupDiLoadDeviceIcon(deviceinfoset, deviceinfodata, cxicon, cyicon, flags, core::mem::transmute(hicon)).ok() } + unsafe { SetupDiLoadDeviceIcon(deviceinfoset, deviceinfodata, cxicon, cyicon, flags, hicon as _).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__ = unsafe { SetupDiOpenClassRegKey(core::mem::transmute(classguid.unwrap_or(core::mem::zeroed())), samdesired) }; + let result__ = unsafe { SetupDiOpenClassRegKey(classguid.unwrap_or(core::mem::zeroed()) as _, samdesired) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_System_Registry")] @@ -2489,7 +2465,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__ = unsafe { SetupDiOpenClassRegKeyExA(core::mem::transmute(classguid.unwrap_or(core::mem::zeroed())), samdesired, flags, machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { SetupDiOpenClassRegKeyExA(classguid.unwrap_or(core::mem::zeroed()) as _, samdesired, flags, machinename.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_System_Registry")] @@ -2499,7 +2475,7 @@ 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__ = unsafe { SetupDiOpenClassRegKeyExW(core::mem::transmute(classguid.unwrap_or(core::mem::zeroed())), samdesired, flags, machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { SetupDiOpenClassRegKeyExW(classguid.unwrap_or(core::mem::zeroed()) as _, samdesired, flags, machinename.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_System_Registry")] @@ -2515,7 +2491,7 @@ where P1: 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); - unsafe { SetupDiOpenDeviceInfoA(deviceinfoset, deviceinstanceid.param().abi(), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), openflags, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiOpenDeviceInfoA(deviceinfoset, deviceinstanceid.param().abi(), hwndparent.unwrap_or(core::mem::zeroed()) as _, openflags, deviceinfodata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupDiOpenDeviceInfoW(deviceinfoset: HDEVINFO, deviceinstanceid: P1, hwndparent: Option, openflags: u32, deviceinfodata: Option<*mut SP_DEVINFO_DATA>) -> windows_core::Result<()> @@ -2523,7 +2499,7 @@ where P1: 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); - unsafe { SetupDiOpenDeviceInfoW(deviceinfoset, deviceinstanceid.param().abi(), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), openflags, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiOpenDeviceInfoW(deviceinfoset, deviceinstanceid.param().abi(), hwndparent.unwrap_or(core::mem::zeroed()) as _, openflags, deviceinfodata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupDiOpenDeviceInterfaceA(deviceinfoset: HDEVINFO, devicepath: P1, openflags: u32, deviceinterfacedata: Option<*mut SP_DEVICE_INTERFACE_DATA>) -> windows_core::Result<()> @@ -2531,13 +2507,13 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiOpenDeviceInterfaceA(deviceinfoset : HDEVINFO, devicepath : windows_core::PCSTR, openflags : u32, deviceinterfacedata : *mut SP_DEVICE_INTERFACE_DATA) -> super::super::Foundation:: BOOL); - unsafe { SetupDiOpenDeviceInterfaceA(deviceinfoset, devicepath.param().abi(), openflags, core::mem::transmute(deviceinterfacedata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiOpenDeviceInterfaceA(deviceinfoset, devicepath.param().abi(), openflags, deviceinterfacedata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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__ = unsafe { SetupDiOpenDeviceInterfaceRegKey(deviceinfoset, deviceinterfacedata, core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), samdesired) }; + let result__ = unsafe { SetupDiOpenDeviceInterfaceRegKey(deviceinfoset, deviceinterfacedata, reserved.unwrap_or(core::mem::zeroed()) as _, samdesired) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -2546,7 +2522,7 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiOpenDeviceInterfaceW(deviceinfoset : HDEVINFO, devicepath : windows_core::PCWSTR, openflags : u32, deviceinterfacedata : *mut SP_DEVICE_INTERFACE_DATA) -> super::super::Foundation:: BOOL); - unsafe { SetupDiOpenDeviceInterfaceW(deviceinfoset, devicepath.param().abi(), openflags, core::mem::transmute(deviceinterfacedata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiOpenDeviceInterfaceW(deviceinfoset, devicepath.param().abi(), openflags, deviceinterfacedata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupDiRegisterCoDeviceInstallers(deviceinfoset: HDEVINFO, deviceinfodata: *const SP_DEVINFO_DATA) -> windows_core::Result<()> { @@ -2556,47 +2532,47 @@ pub unsafe fn SetupDiRegisterCoDeviceInstallers(deviceinfoset: HDEVINFO, devicei #[inline] 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); - unsafe { SetupDiRegisterDeviceInfo(deviceinfoset, core::mem::transmute(deviceinfodata), 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() } + unsafe { SetupDiRegisterDeviceInfo(deviceinfoset, deviceinfodata as _, flags, compareproc.unwrap_or(core::mem::zeroed()) as _, comparecontext.unwrap_or(core::mem::zeroed()) as _, dupdeviceinfodata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SetupDiRemoveDevice(deviceinfoset, core::mem::transmute(deviceinfodata)) } + unsafe { SetupDiRemoveDevice(deviceinfoset, deviceinfodata as _) } } #[inline] 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); - unsafe { SetupDiRemoveDeviceInterface(deviceinfoset, core::mem::transmute(deviceinterfacedata)).ok() } + unsafe { SetupDiRemoveDeviceInterface(deviceinfoset, deviceinterfacedata as _).ok() } } #[inline] 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); - unsafe { SetupDiRestartDevices(deviceinfoset, core::mem::transmute(deviceinfodata)).ok() } + unsafe { SetupDiRestartDevices(deviceinfoset, deviceinfodata as _).ok() } } #[inline] 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); - unsafe { SetupDiSelectBestCompatDrv(deviceinfoset, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiSelectBestCompatDrv(deviceinfoset, deviceinfodata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SetupDiSelectDevice(deviceinfoset, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiSelectDevice(deviceinfoset, deviceinfodata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SetupDiSelectOEMDrv(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), deviceinfoset, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiSelectOEMDrv(hwndparent.unwrap_or(core::mem::zeroed()) as _, deviceinfoset, deviceinfodata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SetupDiSetClassInstallParamsA(deviceinfoset, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(classinstallparams.unwrap_or(core::mem::zeroed())), classinstallparamssize).ok() } + unsafe { SetupDiSetClassInstallParamsA(deviceinfoset, deviceinfodata.unwrap_or(core::mem::zeroed()) as _, classinstallparams.unwrap_or(core::mem::zeroed()) as _, classinstallparamssize).ok() } } #[inline] 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); - unsafe { SetupDiSetClassInstallParamsW(deviceinfoset, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(classinstallparams.unwrap_or(core::mem::zeroed())), classinstallparamssize).ok() } + unsafe { SetupDiSetClassInstallParamsW(deviceinfoset, deviceinfodata.unwrap_or(core::mem::zeroed()) as _, classinstallparams.unwrap_or(core::mem::zeroed()) as _, classinstallparamssize).ok() } } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -2605,7 +2581,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); - unsafe { SetupDiSetClassPropertyExW(classguid, propertykey, propertytype, core::mem::transmute(propertybuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags, machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiSetClassPropertyExW(classguid, propertykey, propertytype, core::mem::transmute(propertybuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags, machinename.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -2619,7 +2595,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); - unsafe { SetupDiSetClassRegistryPropertyA(classguid, property, core::mem::transmute(propertybuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiSetClassRegistryPropertyA(classguid, property, core::mem::transmute(propertybuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), machinename.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -2627,22 +2603,22 @@ 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); - unsafe { SetupDiSetClassRegistryPropertyW(classguid, property, core::mem::transmute(propertybuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiSetClassRegistryPropertyW(classguid, property, core::mem::transmute(propertybuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), machinename.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SetupDiSetDeviceInstallParamsA(deviceinfoset, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), deviceinstallparams).ok() } + unsafe { SetupDiSetDeviceInstallParamsA(deviceinfoset, deviceinfodata.unwrap_or(core::mem::zeroed()) as _, deviceinstallparams).ok() } } #[inline] 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); - unsafe { SetupDiSetDeviceInstallParamsW(deviceinfoset, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), deviceinstallparams).ok() } + unsafe { SetupDiSetDeviceInstallParamsW(deviceinfoset, deviceinfodata.unwrap_or(core::mem::zeroed()) as _, deviceinstallparams).ok() } } #[inline] 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); - unsafe { SetupDiSetDeviceInterfaceDefault(deviceinfoset, core::mem::transmute(deviceinterfacedata), flags, core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiSetDeviceInterfaceDefault(deviceinfoset, deviceinterfacedata as _, flags, reserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -2659,22 +2635,22 @@ pub unsafe fn SetupDiSetDevicePropertyW(deviceinfoset: HDEVINFO, deviceinfodata: #[inline] 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); - unsafe { SetupDiSetDeviceRegistryPropertyA(deviceinfoset, core::mem::transmute(deviceinfodata), property, core::mem::transmute(propertybuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } + unsafe { SetupDiSetDeviceRegistryPropertyA(deviceinfoset, deviceinfodata as _, 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: 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); - unsafe { SetupDiSetDeviceRegistryPropertyW(deviceinfoset, core::mem::transmute(deviceinfodata), property, core::mem::transmute(propertybuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } + unsafe { SetupDiSetDeviceRegistryPropertyW(deviceinfoset, deviceinfodata as _, 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: 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); - unsafe { SetupDiSetDriverInstallParamsA(deviceinfoset, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), driverinfodata, driverinstallparams).ok() } + unsafe { SetupDiSetDriverInstallParamsA(deviceinfoset, deviceinfodata.unwrap_or(core::mem::zeroed()) as _, driverinfodata, driverinstallparams).ok() } } #[inline] 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); - unsafe { SetupDiSetDriverInstallParamsW(deviceinfoset, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), driverinfodata, driverinstallparams).ok() } + unsafe { SetupDiSetDriverInstallParamsW(deviceinfoset, deviceinfodata.unwrap_or(core::mem::zeroed()) as _, driverinfodata, driverinstallparams).ok() } } #[inline] pub unsafe fn SetupDiSetSelectedDevice(deviceinfoset: HDEVINFO, deviceinfodata: *const SP_DEVINFO_DATA) -> windows_core::Result<()> { @@ -2684,37 +2660,37 @@ pub unsafe fn SetupDiSetSelectedDevice(deviceinfoset: HDEVINFO, deviceinfodata: #[inline] 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); - unsafe { SetupDiSetSelectedDriverA(deviceinfoset, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(driverinfodata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiSetSelectedDriverA(deviceinfoset, deviceinfodata.unwrap_or(core::mem::zeroed()) as _, driverinfodata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SetupDiSetSelectedDriverW(deviceinfoset, core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(driverinfodata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupDiSetSelectedDriverW(deviceinfoset, deviceinfodata.unwrap_or(core::mem::zeroed()) as _, driverinfodata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SetupDiUnremoveDevice(deviceinfoset, core::mem::transmute(deviceinfodata)).ok() } + unsafe { SetupDiUnremoveDevice(deviceinfoset, deviceinfodata as _).ok() } } #[inline] 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); - unsafe { SetupDuplicateDiskSpaceListA(diskspace, core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed())), flags) } + unsafe { SetupDuplicateDiskSpaceListA(diskspace, reserved1.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _, flags) } } #[inline] 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); - unsafe { SetupDuplicateDiskSpaceListW(diskspace, core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed())), flags) } + unsafe { SetupDuplicateDiskSpaceListW(diskspace, reserved1.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { SetupEnumInfSectionsA(infhandle, index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(sizeneeded.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupEnumInfSectionsA(infhandle, index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), sizeneeded.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { SetupEnumInfSectionsW(infhandle, index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(sizeneeded.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupEnumInfSectionsW(infhandle, index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), sizeneeded.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupFindFirstLineA(infhandle: *const core::ffi::c_void, section: P1, key: P2, context: *mut INFCONTEXT) -> windows_core::Result<()> @@ -2723,7 +2699,7 @@ where P2: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupFindFirstLineA(infhandle : *const core::ffi::c_void, section : windows_core::PCSTR, key : windows_core::PCSTR, context : *mut INFCONTEXT) -> super::super::Foundation:: BOOL); - unsafe { SetupFindFirstLineA(infhandle, section.param().abi(), key.param().abi(), core::mem::transmute(context)).ok() } + unsafe { SetupFindFirstLineA(infhandle, section.param().abi(), key.param().abi(), context as _).ok() } } #[inline] pub unsafe fn SetupFindFirstLineW(infhandle: *const core::ffi::c_void, section: P1, key: P2, context: *mut INFCONTEXT) -> windows_core::Result<()> @@ -2732,12 +2708,12 @@ where P2: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupFindFirstLineW(infhandle : *const core::ffi::c_void, section : windows_core::PCWSTR, key : windows_core::PCWSTR, context : *mut INFCONTEXT) -> super::super::Foundation:: BOOL); - unsafe { SetupFindFirstLineW(infhandle, section.param().abi(), key.param().abi(), core::mem::transmute(context)).ok() } + unsafe { SetupFindFirstLineW(infhandle, section.param().abi(), key.param().abi(), context as _).ok() } } #[inline] pub unsafe fn SetupFindNextLine(contextin: *const INFCONTEXT, contextout: *mut INFCONTEXT) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupFindNextLine(contextin : *const INFCONTEXT, contextout : *mut INFCONTEXT) -> super::super::Foundation:: BOOL); - unsafe { SetupFindNextLine(contextin, core::mem::transmute(contextout)).ok() } + unsafe { SetupFindNextLine(contextin, contextout as _).ok() } } #[inline] pub unsafe fn SetupFindNextMatchLineA(contextin: *const INFCONTEXT, key: P1, contextout: *mut INFCONTEXT) -> windows_core::Result<()> @@ -2745,7 +2721,7 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupFindNextMatchLineA(contextin : *const INFCONTEXT, key : windows_core::PCSTR, contextout : *mut INFCONTEXT) -> super::super::Foundation:: BOOL); - unsafe { SetupFindNextMatchLineA(contextin, key.param().abi(), core::mem::transmute(contextout)).ok() } + unsafe { SetupFindNextMatchLineA(contextin, key.param().abi(), contextout as _).ok() } } #[inline] pub unsafe fn SetupFindNextMatchLineW(contextin: *const INFCONTEXT, key: P1, contextout: *mut INFCONTEXT) -> windows_core::Result<()> @@ -2753,7 +2729,7 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupFindNextMatchLineW(contextin : *const INFCONTEXT, key : windows_core::PCWSTR, contextout : *mut INFCONTEXT) -> super::super::Foundation:: BOOL); - unsafe { SetupFindNextMatchLineW(contextin, key.param().abi(), core::mem::transmute(contextout)).ok() } + unsafe { SetupFindNextMatchLineW(contextin, key.param().abi(), contextout as _).ok() } } #[inline] pub unsafe fn SetupFreeSourceListA(list: &mut [*mut windows_core::PCSTR]) -> windows_core::Result<()> { @@ -2768,17 +2744,17 @@ pub unsafe fn SetupFreeSourceListW(list: &mut [*mut windows_core::PCWSTR]) -> wi #[inline] pub unsafe fn SetupGetBackupInformationA(queuehandle: *const core::ffi::c_void, backupparams: *mut SP_BACKUP_QUEUE_PARAMS_V2_A) -> super::super::Foundation::BOOL { windows_targets::link!("setupapi.dll" "system" fn SetupGetBackupInformationA(queuehandle : *const core::ffi::c_void, backupparams : *mut SP_BACKUP_QUEUE_PARAMS_V2_A) -> super::super::Foundation:: BOOL); - unsafe { SetupGetBackupInformationA(queuehandle, core::mem::transmute(backupparams)) } + unsafe { SetupGetBackupInformationA(queuehandle, backupparams as _) } } #[inline] pub unsafe fn SetupGetBackupInformationW(queuehandle: *const core::ffi::c_void, backupparams: *mut SP_BACKUP_QUEUE_PARAMS_V2_W) -> super::super::Foundation::BOOL { windows_targets::link!("setupapi.dll" "system" fn SetupGetBackupInformationW(queuehandle : *const core::ffi::c_void, backupparams : *mut SP_BACKUP_QUEUE_PARAMS_V2_W) -> super::super::Foundation:: BOOL); - unsafe { SetupGetBackupInformationW(queuehandle, core::mem::transmute(backupparams)) } + unsafe { SetupGetBackupInformationW(queuehandle, backupparams as _) } } #[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); - unsafe { SetupGetBinaryField(context, fieldindex, core::mem::transmute(returnbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupGetBinaryField(context, fieldindex, core::mem::transmute(returnbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredsize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupGetFieldCount(context: *const INFCONTEXT) -> u32 { @@ -2791,7 +2767,7 @@ where P0: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupGetFileCompressionInfoA(sourcefilename : windows_core::PCSTR, actualsourcefilename : *mut windows_core::PSTR, sourcefilesize : *mut u32, targetfilesize : *mut u32, compressiontype : *mut FILE_COMPRESSION_TYPE) -> u32); - unsafe { SetupGetFileCompressionInfoA(sourcefilename.param().abi(), core::mem::transmute(actualsourcefilename), core::mem::transmute(sourcefilesize), core::mem::transmute(targetfilesize), core::mem::transmute(compressiontype)) } + unsafe { SetupGetFileCompressionInfoA(sourcefilename.param().abi(), actualsourcefilename as _, sourcefilesize as _, targetfilesize as _, compressiontype as _) } } #[inline] pub unsafe fn SetupGetFileCompressionInfoExA(sourcefilename: P0, actualsourcefilenamebuffer: Option<&[u8]>, requiredbufferlen: Option<*mut u32>, sourcefilesize: *mut u32, targetfilesize: *mut u32, compressiontype: *mut FILE_COMPRESSION_TYPE) -> windows_core::Result<()> @@ -2799,7 +2775,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); - unsafe { 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() } + unsafe { 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()), requiredbufferlen.unwrap_or(core::mem::zeroed()) as _, sourcefilesize as _, targetfilesize as _, compressiontype as _).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<()> @@ -2807,7 +2783,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); - unsafe { 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() } + unsafe { 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()), requiredbufferlen.unwrap_or(core::mem::zeroed()) as _, sourcefilesize as _, targetfilesize as _, compressiontype as _).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 @@ -2815,17 +2791,17 @@ where P0: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupGetFileCompressionInfoW(sourcefilename : windows_core::PCWSTR, actualsourcefilename : *mut windows_core::PWSTR, sourcefilesize : *mut u32, targetfilesize : *mut u32, compressiontype : *mut FILE_COMPRESSION_TYPE) -> u32); - unsafe { SetupGetFileCompressionInfoW(sourcefilename.param().abi(), core::mem::transmute(actualsourcefilename), core::mem::transmute(sourcefilesize), core::mem::transmute(targetfilesize), core::mem::transmute(compressiontype)) } + unsafe { SetupGetFileCompressionInfoW(sourcefilename.param().abi(), actualsourcefilename as _, sourcefilesize as _, targetfilesize as _, compressiontype as _) } } #[inline] pub unsafe fn SetupGetFileQueueCount(filequeue: *const core::ffi::c_void, subqueuefileop: u32, numoperations: *mut u32) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupGetFileQueueCount(filequeue : *const core::ffi::c_void, subqueuefileop : u32, numoperations : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { SetupGetFileQueueCount(filequeue, subqueuefileop, core::mem::transmute(numoperations)).ok() } + unsafe { SetupGetFileQueueCount(filequeue, subqueuefileop, numoperations as _).ok() } } #[inline] pub unsafe fn SetupGetFileQueueFlags(filequeue: *const core::ffi::c_void, flags: *mut u32) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupGetFileQueueFlags(filequeue : *const core::ffi::c_void, flags : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { SetupGetFileQueueFlags(filequeue, core::mem::transmute(flags)).ok() } + unsafe { SetupGetFileQueueFlags(filequeue, flags as _).ok() } } #[cfg(all(feature = "Win32_System_Diagnostics_Debug", feature = "Win32_System_SystemInformation"))] #[inline] @@ -2835,7 +2811,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); - unsafe { 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() } + unsafe { SetupGetInfDriverStoreLocationA(filename.param().abi(), alternateplatforminfo.unwrap_or(core::mem::zeroed()) as _, localename.param().abi(), core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len().try_into().unwrap(), requiredsize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(all(feature = "Win32_System_Diagnostics_Debug", feature = "Win32_System_SystemInformation"))] #[inline] @@ -2845,7 +2821,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); - unsafe { 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() } + unsafe { SetupGetInfDriverStoreLocationW(filename.param().abi(), alternateplatforminfo.unwrap_or(core::mem::zeroed()) as _, localename.param().abi(), core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len().try_into().unwrap(), requiredsize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupGetInfFileListA(directorypath: P0, infstyle: INF_STYLE, returnbuffer: Option<&mut [u8]>, requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -2853,7 +2829,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); - unsafe { SetupGetInfFileListA(directorypath.param().abi(), infstyle, core::mem::transmute(returnbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupGetInfFileListA(directorypath.param().abi(), infstyle, core::mem::transmute(returnbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredsize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupGetInfFileListW(directorypath: P0, infstyle: INF_STYLE, returnbuffer: &mut [u16], requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -2861,17 +2837,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); - unsafe { SetupGetInfFileListW(directorypath.param().abi(), infstyle, core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupGetInfFileListW(directorypath.param().abi(), infstyle, core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len().try_into().unwrap(), requiredsize.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { SetupGetInfInformationA(infspec, searchcontrol, core::mem::transmute(returnbuffer.unwrap_or(core::mem::zeroed())), returnbuffersize, core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupGetInfInformationA(infspec, searchcontrol, returnbuffer.unwrap_or(core::mem::zeroed()) as _, returnbuffersize, requiredsize.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { SetupGetInfInformationW(infspec, searchcontrol, core::mem::transmute(returnbuffer.unwrap_or(core::mem::zeroed())), returnbuffersize, core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupGetInfInformationW(infspec, searchcontrol, returnbuffer.unwrap_or(core::mem::zeroed()) as _, returnbuffersize, requiredsize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupGetInfPublishedNameA(driverstorelocation: P0, returnbuffer: &mut [u8], requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -2879,7 +2855,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); - unsafe { 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() } + unsafe { SetupGetInfPublishedNameA(driverstorelocation.param().abi(), core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len().try_into().unwrap(), requiredsize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupGetInfPublishedNameW(driverstorelocation: P0, returnbuffer: &mut [u16], requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -2887,12 +2863,12 @@ 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); - unsafe { 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() } + unsafe { SetupGetInfPublishedNameW(driverstorelocation.param().abi(), core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len().try_into().unwrap(), requiredsize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupGetIntField(context: *const INFCONTEXT, fieldindex: u32, integervalue: *mut i32) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupGetIntField(context : *const INFCONTEXT, fieldindex : u32, integervalue : *mut i32) -> super::super::Foundation:: BOOL); - unsafe { SetupGetIntField(context, fieldindex, core::mem::transmute(integervalue)).ok() } + unsafe { SetupGetIntField(context, fieldindex, integervalue as _).ok() } } #[inline] pub unsafe fn SetupGetLineByIndexA(infhandle: *const core::ffi::c_void, section: P1, index: u32, context: *mut INFCONTEXT) -> windows_core::Result<()> @@ -2900,7 +2876,7 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupGetLineByIndexA(infhandle : *const core::ffi::c_void, section : windows_core::PCSTR, index : u32, context : *mut INFCONTEXT) -> super::super::Foundation:: BOOL); - unsafe { SetupGetLineByIndexA(infhandle, section.param().abi(), index, core::mem::transmute(context)).ok() } + unsafe { SetupGetLineByIndexA(infhandle, section.param().abi(), index, context as _).ok() } } #[inline] pub unsafe fn SetupGetLineByIndexW(infhandle: *const core::ffi::c_void, section: P1, index: u32, context: *mut INFCONTEXT) -> windows_core::Result<()> @@ -2908,7 +2884,7 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupGetLineByIndexW(infhandle : *const core::ffi::c_void, section : windows_core::PCWSTR, index : u32, context : *mut INFCONTEXT) -> super::super::Foundation:: BOOL); - unsafe { SetupGetLineByIndexW(infhandle, section.param().abi(), index, core::mem::transmute(context)).ok() } + unsafe { SetupGetLineByIndexW(infhandle, section.param().abi(), index, context as _).ok() } } #[inline] pub unsafe fn SetupGetLineCountA(infhandle: *const core::ffi::c_void, section: P1) -> i32 @@ -2933,7 +2909,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); - unsafe { 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() } + unsafe { SetupGetLineTextA(context.unwrap_or(core::mem::zeroed()) as _, infhandle.unwrap_or(core::mem::zeroed()) as _, 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()), requiredsize.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -2942,17 +2918,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); - unsafe { 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() } + unsafe { SetupGetLineTextW(context.unwrap_or(core::mem::zeroed()) as _, infhandle.unwrap_or(core::mem::zeroed()) as _, 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()), requiredsize.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { SetupGetMultiSzFieldA(context, fieldindex, core::mem::transmute(returnbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupGetMultiSzFieldA(context, fieldindex, core::mem::transmute(returnbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredsize.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { SetupGetMultiSzFieldW(context, fieldindex, core::mem::transmute(returnbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupGetMultiSzFieldW(context, fieldindex, core::mem::transmute(returnbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredsize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupGetNonInteractiveMode() -> super::super::Foundation::BOOL { @@ -2965,7 +2941,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); - unsafe { SetupGetSourceFileLocationA(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() } + unsafe { SetupGetSourceFileLocationA(infhandle, infcontext.unwrap_or(core::mem::zeroed()) as _, filename.param().abi(), sourceid as _, 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()), requiredsize.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -2973,7 +2949,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); - unsafe { SetupGetSourceFileLocationW(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() } + unsafe { SetupGetSourceFileLocationW(infhandle, infcontext.unwrap_or(core::mem::zeroed()) as _, filename.param().abi(), sourceid as _, 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()), requiredsize.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -2982,7 +2958,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); - unsafe { SetupGetSourceFileSizeA(infhandle, core::mem::transmute(infcontext.unwrap_or(core::mem::zeroed())), filename.param().abi(), section.param().abi(), core::mem::transmute(filesize), roundingfactor).ok() } + unsafe { SetupGetSourceFileSizeA(infhandle, infcontext.unwrap_or(core::mem::zeroed()) as _, filename.param().abi(), section.param().abi(), filesize as _, 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<()> @@ -2991,27 +2967,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); - unsafe { SetupGetSourceFileSizeW(infhandle, core::mem::transmute(infcontext.unwrap_or(core::mem::zeroed())), filename.param().abi(), section.param().abi(), core::mem::transmute(filesize), roundingfactor).ok() } + unsafe { SetupGetSourceFileSizeW(infhandle, infcontext.unwrap_or(core::mem::zeroed()) as _, filename.param().abi(), section.param().abi(), filesize as _, 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); - unsafe { SetupGetSourceInfoA(infhandle, sourceid, infodesired, core::mem::transmute(returnbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupGetSourceInfoA(infhandle, sourceid, infodesired, core::mem::transmute(returnbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredsize.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { SetupGetSourceInfoW(infhandle, sourceid, infodesired, core::mem::transmute(returnbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupGetSourceInfoW(infhandle, sourceid, infodesired, core::mem::transmute(returnbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredsize.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { SetupGetStringFieldA(context, fieldindex, core::mem::transmute(returnbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupGetStringFieldA(context, fieldindex, core::mem::transmute(returnbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredsize.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { SetupGetStringFieldW(context, fieldindex, core::mem::transmute(returnbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupGetStringFieldW(context, fieldindex, core::mem::transmute(returnbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredsize.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -3019,7 +2995,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); - unsafe { SetupGetTargetPathA(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() } + unsafe { SetupGetTargetPathA(infhandle, infcontext.unwrap_or(core::mem::zeroed()) as _, 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()), requiredsize.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -3027,7 +3003,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); - unsafe { SetupGetTargetPathW(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() } + unsafe { SetupGetTargetPathW(infhandle, infcontext.unwrap_or(core::mem::zeroed()) as _, 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()), requiredsize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupGetThreadLogToken() -> u64 { @@ -3037,12 +3013,12 @@ pub unsafe fn SetupGetThreadLogToken() -> u64 { #[inline] 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); - unsafe { SetupInitDefaultQueueCallback(core::mem::transmute(ownerwindow.unwrap_or(core::mem::zeroed()))) } + unsafe { SetupInitDefaultQueueCallback(ownerwindow.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { SetupInitDefaultQueueCallbackEx(core::mem::transmute(ownerwindow.unwrap_or(core::mem::zeroed())), core::mem::transmute(alternateprogresswindow.unwrap_or(core::mem::zeroed())), progressmessage, core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))) } + unsafe { SetupInitDefaultQueueCallbackEx(ownerwindow.unwrap_or(core::mem::zeroed()) as _, alternateprogresswindow.unwrap_or(core::mem::zeroed()) as _, progressmessage, reserved1.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SetupInitializeFileLogA(logfilename: P0, flags: u32) -> *mut core::ffi::c_void @@ -3068,7 +3044,7 @@ where 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); - unsafe { 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(), copystyle, core::mem::transmute(copymsghandler.unwrap_or(core::mem::zeroed())), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupInstallFileA(infhandle.unwrap_or(core::mem::zeroed()) as _, infcontext.unwrap_or(core::mem::zeroed()) as _, sourcefile.param().abi(), sourcepathroot.param().abi(), destinationname.param().abi(), copystyle, copymsghandler.unwrap_or(core::mem::zeroed()) as _, context.unwrap_or(core::mem::zeroed()) as _).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: Option, context: Option<*const core::ffi::c_void>, filewasinuse: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> @@ -3078,7 +3054,7 @@ where 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); - unsafe { 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(), copystyle, core::mem::transmute(copymsghandler.unwrap_or(core::mem::zeroed())), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(filewasinuse)).ok() } + unsafe { SetupInstallFileExA(infhandle.unwrap_or(core::mem::zeroed()) as _, infcontext.unwrap_or(core::mem::zeroed()) as _, sourcefile.param().abi(), sourcepathroot.param().abi(), destinationname.param().abi(), copystyle, copymsghandler.unwrap_or(core::mem::zeroed()) as _, context.unwrap_or(core::mem::zeroed()) as _, filewasinuse as _).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: Option, context: Option<*const core::ffi::c_void>, filewasinuse: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> @@ -3088,7 +3064,7 @@ where 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); - unsafe { 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(), copystyle, core::mem::transmute(copymsghandler.unwrap_or(core::mem::zeroed())), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(filewasinuse)).ok() } + unsafe { SetupInstallFileExW(infhandle.unwrap_or(core::mem::zeroed()) as _, infcontext.unwrap_or(core::mem::zeroed()) as _, sourcefile.param().abi(), sourcepathroot.param().abi(), destinationname.param().abi(), copystyle, copymsghandler.unwrap_or(core::mem::zeroed()) as _, context.unwrap_or(core::mem::zeroed()) as _, filewasinuse as _).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: Option, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -3098,7 +3074,7 @@ where 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); - unsafe { 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(), copystyle, core::mem::transmute(copymsghandler.unwrap_or(core::mem::zeroed())), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupInstallFileW(infhandle.unwrap_or(core::mem::zeroed()) as _, infcontext.unwrap_or(core::mem::zeroed()) as _, sourcefile.param().abi(), sourcepathroot.param().abi(), destinationname.param().abi(), copystyle, copymsghandler.unwrap_or(core::mem::zeroed()) as _, context.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -3107,7 +3083,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); - unsafe { SetupInstallFilesFromInfSectionA(infhandle, core::mem::transmute(layoutinfhandle.unwrap_or(core::mem::zeroed())), filequeue, sectionname.param().abi(), sourcerootpath.param().abi(), copyflags).ok() } + unsafe { SetupInstallFilesFromInfSectionA(infhandle, layoutinfhandle.unwrap_or(core::mem::zeroed()) as _, filequeue, sectionname.param().abi(), sourcerootpath.param().abi(), copyflags).ok() } } #[inline] pub unsafe fn SetupInstallFilesFromInfSectionW(infhandle: *const core::ffi::c_void, layoutinfhandle: Option<*const core::ffi::c_void>, filequeue: *const core::ffi::c_void, sectionname: P3, sourcerootpath: P4, copyflags: u32) -> windows_core::Result<()> @@ -3116,7 +3092,7 @@ 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); - unsafe { SetupInstallFilesFromInfSectionW(infhandle, core::mem::transmute(layoutinfhandle.unwrap_or(core::mem::zeroed())), filequeue, sectionname.param().abi(), sourcerootpath.param().abi(), copyflags).ok() } + unsafe { SetupInstallFilesFromInfSectionW(infhandle, layoutinfhandle.unwrap_or(core::mem::zeroed()) as _, filequeue, sectionname.param().abi(), sourcerootpath.param().abi(), copyflags).ok() } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -3126,7 +3102,7 @@ where P5: 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); - unsafe { SetupInstallFromInfSectionA(core::mem::transmute(owner.unwrap_or(core::mem::zeroed())), infhandle, sectionname.param().abi(), flags, core::mem::transmute(relativekeyroot.unwrap_or(core::mem::zeroed())), sourcerootpath.param().abi(), 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() } + unsafe { SetupInstallFromInfSectionA(owner.unwrap_or(core::mem::zeroed()) as _, infhandle, sectionname.param().abi(), flags, relativekeyroot.unwrap_or(core::mem::zeroed()) as _, sourcerootpath.param().abi(), copyflags, msghandler.unwrap_or(core::mem::zeroed()) as _, context.unwrap_or(core::mem::zeroed()) as _, deviceinfoset.unwrap_or(core::mem::zeroed()) as _, deviceinfodata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -3136,7 +3112,7 @@ where P5: 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); - unsafe { SetupInstallFromInfSectionW(core::mem::transmute(owner.unwrap_or(core::mem::zeroed())), infhandle, sectionname.param().abi(), flags, core::mem::transmute(relativekeyroot.unwrap_or(core::mem::zeroed())), sourcerootpath.param().abi(), 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() } + unsafe { SetupInstallFromInfSectionW(owner.unwrap_or(core::mem::zeroed()) as _, infhandle, sectionname.param().abi(), flags, relativekeyroot.unwrap_or(core::mem::zeroed()) as _, sourcerootpath.param().abi(), copyflags, msghandler.unwrap_or(core::mem::zeroed()) as _, context.unwrap_or(core::mem::zeroed()) as _, deviceinfoset.unwrap_or(core::mem::zeroed()) as _, deviceinfodata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupInstallServicesFromInfSectionA(infhandle: *const core::ffi::c_void, sectionname: P1, flags: SPSVCINST_FLAGS) -> windows_core::Result<()> @@ -3152,7 +3128,7 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupInstallServicesFromInfSectionExA(infhandle : *const core::ffi::c_void, sectionname : windows_core::PCSTR, flags : SPSVCINST_FLAGS, deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, reserved1 : *const core::ffi::c_void, reserved2 : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { SetupInstallServicesFromInfSectionExA(infhandle, sectionname.param().abi(), 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() } + unsafe { SetupInstallServicesFromInfSectionExA(infhandle, sectionname.param().abi(), flags, deviceinfoset.unwrap_or(core::mem::zeroed()) as _, deviceinfodata.unwrap_or(core::mem::zeroed()) as _, reserved1.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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<()> @@ -3160,7 +3136,7 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupInstallServicesFromInfSectionExW(infhandle : *const core::ffi::c_void, sectionname : windows_core::PCWSTR, flags : SPSVCINST_FLAGS, deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, reserved1 : *const core::ffi::c_void, reserved2 : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { SetupInstallServicesFromInfSectionExW(infhandle, sectionname.param().abi(), 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() } + unsafe { SetupInstallServicesFromInfSectionExW(infhandle, sectionname.param().abi(), flags, deviceinfoset.unwrap_or(core::mem::zeroed()) as _, deviceinfodata.unwrap_or(core::mem::zeroed()) as _, reserved1.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupInstallServicesFromInfSectionW(infhandle: *const core::ffi::c_void, sectionname: P1, flags: SPSVCINST_FLAGS) -> windows_core::Result<()> @@ -3176,7 +3152,7 @@ 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); - unsafe { SetupIterateCabinetA(cabinetfile.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), msghandler, context).ok() } + unsafe { SetupIterateCabinetA(cabinetfile.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _, msghandler, context).ok() } } #[inline] pub unsafe fn SetupIterateCabinetW(cabinetfile: P0, reserved: Option, msghandler: PSP_FILE_CALLBACK_W, context: *const core::ffi::c_void) -> windows_core::Result<()> @@ -3184,7 +3160,7 @@ 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); - unsafe { SetupIterateCabinetW(cabinetfile.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), msghandler, context).ok() } + unsafe { SetupIterateCabinetW(cabinetfile.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _, msghandler, context).ok() } } #[inline] pub unsafe fn SetupLogErrorA(messagestring: P0, severity: u32) -> windows_core::Result<()> @@ -3234,7 +3210,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); - unsafe { SetupOpenAppendInfFileA(filename.param().abi(), infhandle, core::mem::transmute(errorline.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupOpenAppendInfFileA(filename.param().abi(), infhandle, errorline.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupOpenAppendInfFileW(filename: P0, infhandle: *const core::ffi::c_void, errorline: Option<*mut u32>) -> windows_core::Result<()> @@ -3242,7 +3218,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); - unsafe { SetupOpenAppendInfFileW(filename.param().abi(), infhandle, core::mem::transmute(errorline.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupOpenAppendInfFileW(filename.param().abi(), infhandle, errorline.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupOpenFileQueue() -> *mut core::ffi::c_void { @@ -3256,7 +3232,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); - unsafe { SetupOpenInfFileA(filename.param().abi(), infclass.param().abi(), infstyle, core::mem::transmute(errorline.unwrap_or(core::mem::zeroed()))) } + unsafe { SetupOpenInfFileA(filename.param().abi(), infclass.param().abi(), infstyle, errorline.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SetupOpenInfFileW(filename: P0, infclass: P1, infstyle: INF_STYLE, errorline: Option<*mut u32>) -> *mut core::ffi::c_void @@ -3265,7 +3241,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); - unsafe { SetupOpenInfFileW(filename.param().abi(), infclass.param().abi(), infstyle, core::mem::transmute(errorline.unwrap_or(core::mem::zeroed()))) } + unsafe { SetupOpenInfFileW(filename.param().abi(), infclass.param().abi(), infstyle, errorline.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SetupOpenLog(erase: bool) -> windows_core::Result<()> { @@ -3303,7 +3279,7 @@ where P5: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupPromptForDiskA(hwndparent : super::super::Foundation:: HWND, dialogtitle : windows_core::PCSTR, diskname : windows_core::PCSTR, pathtosource : windows_core::PCSTR, filesought : windows_core::PCSTR, tagfile : windows_core::PCSTR, diskpromptstyle : u32, pathbuffer : windows_core::PSTR, pathbuffersize : u32, pathrequiredsize : *mut u32) -> u32); - unsafe { SetupPromptForDiskA(hwndparent, dialogtitle.param().abi(), diskname.param().abi(), pathtosource.param().abi(), filesought.param().abi(), tagfile.param().abi(), diskpromptstyle, core::mem::transmute(pathbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pathbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathrequiredsize.unwrap_or(core::mem::zeroed()))) } + unsafe { SetupPromptForDiskA(hwndparent, dialogtitle.param().abi(), diskname.param().abi(), pathtosource.param().abi(), filesought.param().abi(), tagfile.param().abi(), diskpromptstyle, core::mem::transmute(pathbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pathbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pathrequiredsize.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -3315,22 +3291,22 @@ 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); - unsafe { SetupPromptForDiskW(hwndparent, dialogtitle.param().abi(), diskname.param().abi(), pathtosource.param().abi(), filesought.param().abi(), tagfile.param().abi(), diskpromptstyle, core::mem::transmute(pathbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pathbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathrequiredsize.unwrap_or(core::mem::zeroed()))) } + unsafe { SetupPromptForDiskW(hwndparent, dialogtitle.param().abi(), diskname.param().abi(), pathtosource.param().abi(), filesought.param().abi(), tagfile.param().abi(), diskpromptstyle, core::mem::transmute(pathbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pathbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pathrequiredsize.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SetupPromptReboot(filequeue: Option<*const core::ffi::c_void>, owner: Option, scanonly: bool) -> i32 { 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); - unsafe { SetupPromptReboot(core::mem::transmute(filequeue.unwrap_or(core::mem::zeroed())), core::mem::transmute(owner.unwrap_or(core::mem::zeroed())), scanonly.into()) } + unsafe { SetupPromptReboot(filequeue.unwrap_or(core::mem::zeroed()) as _, owner.unwrap_or(core::mem::zeroed()) as _, scanonly.into()) } } #[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); - unsafe { SetupQueryDrivesInDiskSpaceListA(diskspace, core::mem::transmute(returnbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupQueryDrivesInDiskSpaceListA(diskspace, core::mem::transmute(returnbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredsize.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { SetupQueryDrivesInDiskSpaceListW(diskspace, core::mem::transmute(returnbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupQueryDrivesInDiskSpaceListW(diskspace, core::mem::transmute(returnbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredsize.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -3339,7 +3315,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); - unsafe { SetupQueryFileLogA(fileloghandle, logsectionname.param().abi(), targetfilename.param().abi(), desiredinfo, core::mem::transmute(dataout.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), dataout.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupQueryFileLogA(fileloghandle, logsectionname.param().abi(), targetfilename.param().abi(), desiredinfo, core::mem::transmute(dataout.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), dataout.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredsize.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -3348,29 +3324,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); - unsafe { SetupQueryFileLogW(fileloghandle, logsectionname.param().abi(), targetfilename.param().abi(), desiredinfo, core::mem::transmute(dataout.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), dataout.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupQueryFileLogW(fileloghandle, logsectionname.param().abi(), targetfilename.param().abi(), desiredinfo, core::mem::transmute(dataout.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), dataout.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredsize.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { SetupQueryInfFileInformationA(infinformation, infindex, core::mem::transmute(returnbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupQueryInfFileInformationA(infinformation, infindex, core::mem::transmute(returnbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredsize.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { SetupQueryInfFileInformationW(infinformation, infindex, core::mem::transmute(returnbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupQueryInfFileInformationW(infinformation, infindex, core::mem::transmute(returnbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredsize.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { SetupQueryInfOriginalFileInformationA(infinformation, infindex, core::mem::transmute(alternateplatforminfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(originalfileinfo)).ok() } + unsafe { SetupQueryInfOriginalFileInformationA(infinformation, infindex, alternateplatforminfo.unwrap_or(core::mem::zeroed()) as _, originalfileinfo as _).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); - unsafe { SetupQueryInfOriginalFileInformationW(infinformation, infindex, core::mem::transmute(alternateplatforminfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(originalfileinfo)).ok() } + unsafe { SetupQueryInfOriginalFileInformationW(infinformation, infindex, alternateplatforminfo.unwrap_or(core::mem::zeroed()) as _, originalfileinfo as _).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<()> @@ -3378,7 +3354,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); - unsafe { SetupQueryInfVersionInformationA(infinformation, infindex, key.param().abi(), core::mem::transmute(returnbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupQueryInfVersionInformationA(infinformation, infindex, key.param().abi(), core::mem::transmute(returnbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredsize.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -3386,17 +3362,17 @@ 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); - unsafe { SetupQueryInfVersionInformationW(infinformation, infindex, key.param().abi(), core::mem::transmute(returnbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupQueryInfVersionInformationW(infinformation, infindex, key.param().abi(), core::mem::transmute(returnbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredsize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupQuerySourceListA(flags: u32, list: *mut *mut windows_core::PCSTR, count: *mut u32) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupQuerySourceListA(flags : u32, list : *mut *mut windows_core::PCSTR, count : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { SetupQuerySourceListA(flags, core::mem::transmute(list), core::mem::transmute(count)).ok() } + unsafe { SetupQuerySourceListA(flags, list as _, count as _).ok() } } #[inline] pub unsafe fn SetupQuerySourceListW(flags: u32, list: *mut *mut windows_core::PCWSTR, count: *mut u32) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupQuerySourceListW(flags : u32, list : *mut *mut windows_core::PCWSTR, count : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { SetupQuerySourceListW(flags, core::mem::transmute(list), core::mem::transmute(count)).ok() } + unsafe { SetupQuerySourceListW(flags, list as _, count as _).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: Option) -> windows_core::Result<()> @@ -3404,7 +3380,7 @@ 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); - unsafe { SetupQuerySpaceRequiredOnDriveA(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() } + unsafe { SetupQuerySpaceRequiredOnDriveA(diskspace, drivespec.param().abi(), spacerequired as _, reserved1.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _).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: Option) -> windows_core::Result<()> @@ -3412,7 +3388,7 @@ 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); - unsafe { SetupQuerySpaceRequiredOnDriveW(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() } + unsafe { SetupQuerySpaceRequiredOnDriveW(diskspace, drivespec.param().abi(), spacerequired as _, reserved1.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -3445,7 +3421,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); - unsafe { SetupQueueCopySectionA(queuehandle, sourcerootpath.param().abi(), infhandle, core::mem::transmute(listinfhandle.unwrap_or(core::mem::zeroed())), section.param().abi(), copystyle).ok() } + unsafe { SetupQueueCopySectionA(queuehandle, sourcerootpath.param().abi(), infhandle, listinfhandle.unwrap_or(core::mem::zeroed()) as _, section.param().abi(), 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<()> @@ -3454,7 +3430,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); - unsafe { SetupQueueCopySectionW(queuehandle, sourcerootpath.param().abi(), infhandle, core::mem::transmute(listinfhandle.unwrap_or(core::mem::zeroed())), section.param().abi(), copystyle).ok() } + unsafe { SetupQueueCopySectionW(queuehandle, sourcerootpath.param().abi(), infhandle, listinfhandle.unwrap_or(core::mem::zeroed()) as _, section.param().abi(), 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<()> @@ -3505,7 +3481,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); - unsafe { SetupQueueDeleteSectionA(queuehandle, infhandle, core::mem::transmute(listinfhandle.unwrap_or(core::mem::zeroed())), section.param().abi()).ok() } + unsafe { SetupQueueDeleteSectionA(queuehandle, infhandle, listinfhandle.unwrap_or(core::mem::zeroed()) as _, 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<()> @@ -3513,7 +3489,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); - unsafe { SetupQueueDeleteSectionW(queuehandle, infhandle, core::mem::transmute(listinfhandle.unwrap_or(core::mem::zeroed())), section.param().abi()).ok() } + unsafe { SetupQueueDeleteSectionW(queuehandle, infhandle, listinfhandle.unwrap_or(core::mem::zeroed()) as _, section.param().abi()).ok() } } #[inline] pub unsafe fn SetupQueueDeleteW(queuehandle: *const core::ffi::c_void, pathpart1: P1, pathpart2: P2) -> windows_core::Result<()> @@ -3541,7 +3517,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); - unsafe { SetupQueueRenameSectionA(queuehandle, infhandle, core::mem::transmute(listinfhandle.unwrap_or(core::mem::zeroed())), section.param().abi()).ok() } + unsafe { SetupQueueRenameSectionA(queuehandle, infhandle, listinfhandle.unwrap_or(core::mem::zeroed()) as _, 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<()> @@ -3549,7 +3525,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); - unsafe { SetupQueueRenameSectionW(queuehandle, infhandle, core::mem::transmute(listinfhandle.unwrap_or(core::mem::zeroed())), section.param().abi()).ok() } + unsafe { SetupQueueRenameSectionW(queuehandle, infhandle, listinfhandle.unwrap_or(core::mem::zeroed()) as _, 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<()> @@ -3586,7 +3562,7 @@ 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); - unsafe { SetupRemoveFromDiskSpaceListA(diskspace, targetfilespec.param().abi(), operation, core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupRemoveFromDiskSpaceListA(diskspace, targetfilespec.param().abi(), operation, reserved1.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _).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: Option) -> windows_core::Result<()> @@ -3594,7 +3570,7 @@ 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); - unsafe { SetupRemoveFromDiskSpaceListW(diskspace, targetfilespec.param().abi(), operation, core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupRemoveFromDiskSpaceListW(diskspace, targetfilespec.param().abi(), operation, reserved1.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupRemoveFromSourceListA(flags: u32, source: P1) -> windows_core::Result<()> @@ -3618,7 +3594,7 @@ 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); - unsafe { SetupRemoveInstallSectionFromDiskSpaceListA(diskspace, 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() } + unsafe { SetupRemoveInstallSectionFromDiskSpaceListA(diskspace, infhandle, layoutinfhandle.unwrap_or(core::mem::zeroed()) as _, sectionname.param().abi(), reserved1.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _).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: Option) -> windows_core::Result<()> @@ -3626,7 +3602,7 @@ 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); - unsafe { SetupRemoveInstallSectionFromDiskSpaceListW(diskspace, 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() } + unsafe { SetupRemoveInstallSectionFromDiskSpaceListW(diskspace, infhandle, layoutinfhandle.unwrap_or(core::mem::zeroed()) as _, sectionname.param().abi(), reserved1.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _).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: Option) -> windows_core::Result<()> @@ -3634,7 +3610,7 @@ 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); - unsafe { SetupRemoveSectionFromDiskSpaceListA(diskspace, infhandle, core::mem::transmute(listinfhandle.unwrap_or(core::mem::zeroed())), sectionname.param().abi(), operation, core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupRemoveSectionFromDiskSpaceListA(diskspace, infhandle, listinfhandle.unwrap_or(core::mem::zeroed()) as _, sectionname.param().abi(), operation, reserved1.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _).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: Option) -> windows_core::Result<()> @@ -3642,7 +3618,7 @@ 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); - unsafe { SetupRemoveSectionFromDiskSpaceListW(diskspace, infhandle, core::mem::transmute(listinfhandle.unwrap_or(core::mem::zeroed())), sectionname.param().abi(), operation, core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupRemoveSectionFromDiskSpaceListW(diskspace, infhandle, listinfhandle.unwrap_or(core::mem::zeroed()) as _, sectionname.param().abi(), operation, reserved1.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupRenameErrorA(hwndparent: super::super::Foundation::HWND, dialogtitle: P1, sourcefile: P2, targetfile: P3, win32errorcode: u32, style: u32) -> u32 @@ -3667,12 +3643,12 @@ where #[inline] 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); - unsafe { SetupScanFileQueueA(filequeue, 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() } + unsafe { SetupScanFileQueueA(filequeue, flags, window.unwrap_or(core::mem::zeroed()) as _, callbackroutine.unwrap_or(core::mem::zeroed()) as _, callbackcontext.unwrap_or(core::mem::zeroed()) as _, result as _).ok() } } #[inline] 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); - unsafe { SetupScanFileQueueW(filequeue, 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() } + unsafe { SetupScanFileQueueW(filequeue, flags, window.unwrap_or(core::mem::zeroed()) as _, callbackroutine.unwrap_or(core::mem::zeroed()) as _, callbackcontext.unwrap_or(core::mem::zeroed()) as _, result as _).ok() } } #[inline] pub unsafe fn SetupSetDirectoryIdA(infhandle: *const core::ffi::c_void, id: u32, directory: P2) -> windows_core::Result<()> @@ -3688,7 +3664,7 @@ 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); - unsafe { SetupSetDirectoryIdExA(infhandle, id, directory.param().abi(), flags, core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupSetDirectoryIdExA(infhandle, id, directory.param().abi(), flags, reserved1.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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<()> @@ -3696,7 +3672,7 @@ 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); - unsafe { SetupSetDirectoryIdExW(infhandle, id, directory.param().abi(), flags, core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupSetDirectoryIdExW(infhandle, id, directory.param().abi(), flags, reserved1.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupSetDirectoryIdW(infhandle: *const core::ffi::c_void, id: u32, directory: P2) -> windows_core::Result<()> @@ -3713,7 +3689,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); - unsafe { SetupSetFileQueueAlternatePlatformA(queuehandle, core::mem::transmute(alternateplatforminfo.unwrap_or(core::mem::zeroed())), alternatedefaultcatalogfile.param().abi()).ok() } + unsafe { SetupSetFileQueueAlternatePlatformA(queuehandle, alternateplatforminfo.unwrap_or(core::mem::zeroed()) as _, alternatedefaultcatalogfile.param().abi()).ok() } } #[cfg(all(feature = "Win32_System_Diagnostics_Debug", feature = "Win32_System_SystemInformation"))] #[inline] @@ -3722,7 +3698,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); - unsafe { SetupSetFileQueueAlternatePlatformW(queuehandle, core::mem::transmute(alternateplatforminfo.unwrap_or(core::mem::zeroed())), alternatedefaultcatalogfile.param().abi()).ok() } + unsafe { SetupSetFileQueueAlternatePlatformW(queuehandle, alternateplatforminfo.unwrap_or(core::mem::zeroed()) as _, alternatedefaultcatalogfile.param().abi()).ok() } } #[inline] pub unsafe fn SetupSetFileQueueFlags(filequeue: *const core::ffi::c_void, flagmask: u32, flags: u32) -> windows_core::Result<()> { @@ -3778,7 +3754,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); - unsafe { SetupUninstallNewlyCopiedInfs(filequeue, flags, core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetupUninstallNewlyCopiedInfs(filequeue, flags, reserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetupUninstallOEMInfA(inffilename: P0, flags: u32, reserved: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL @@ -3786,7 +3762,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); - unsafe { SetupUninstallOEMInfA(inffilename.param().abi(), flags, core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } + unsafe { SetupUninstallOEMInfA(inffilename.param().abi(), flags, reserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SetupUninstallOEMInfW(inffilename: P0, flags: u32, reserved: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL @@ -3794,7 +3770,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); - unsafe { SetupUninstallOEMInfW(inffilename.param().abi(), flags, core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } + unsafe { SetupUninstallOEMInfW(inffilename.param().abi(), flags, reserved.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Win32_System_Diagnostics_Debug", feature = "Win32_System_SystemInformation"))] #[inline] @@ -3803,7 +3779,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); - unsafe { SetupVerifyInfFileA(infname.param().abi(), core::mem::transmute(altplatforminfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(infsignerinfo)) } + unsafe { SetupVerifyInfFileA(infname.param().abi(), altplatforminfo.unwrap_or(core::mem::zeroed()) as _, infsignerinfo as _) } } #[cfg(all(feature = "Win32_System_Diagnostics_Debug", feature = "Win32_System_SystemInformation"))] #[inline] @@ -3812,7 +3788,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); - unsafe { SetupVerifyInfFileW(infname.param().abi(), core::mem::transmute(altplatforminfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(infsignerinfo)) } + unsafe { SetupVerifyInfFileW(infname.param().abi(), altplatforminfo.unwrap_or(core::mem::zeroed()) as _, infsignerinfo as _) } } #[inline] pub unsafe fn SetupWriteTextLog(logtoken: u64, category: u32, flags: u32, messagestr: P3) @@ -3842,7 +3818,7 @@ where P2: windows_core::Param, { windows_targets::link!("newdev.dll" "system" fn UpdateDriverForPlugAndPlayDevicesA(hwndparent : super::super::Foundation:: HWND, hardwareid : windows_core::PCSTR, fullinfpath : windows_core::PCSTR, installflags : UPDATEDRIVERFORPLUGANDPLAYDEVICES_FLAGS, brebootrequired : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - unsafe { UpdateDriverForPlugAndPlayDevicesA(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), hardwareid.param().abi(), fullinfpath.param().abi(), installflags, core::mem::transmute(brebootrequired.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { UpdateDriverForPlugAndPlayDevicesA(hwndparent.unwrap_or(core::mem::zeroed()) as _, hardwareid.param().abi(), fullinfpath.param().abi(), installflags, brebootrequired.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn UpdateDriverForPlugAndPlayDevicesW(hwndparent: Option, hardwareid: P1, fullinfpath: P2, installflags: UPDATEDRIVERFORPLUGANDPLAYDEVICES_FLAGS, brebootrequired: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> @@ -3851,7 +3827,7 @@ where P2: windows_core::Param, { windows_targets::link!("newdev.dll" "system" fn UpdateDriverForPlugAndPlayDevicesW(hwndparent : super::super::Foundation:: HWND, hardwareid : windows_core::PCWSTR, fullinfpath : windows_core::PCWSTR, installflags : UPDATEDRIVERFORPLUGANDPLAYDEVICES_FLAGS, brebootrequired : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - unsafe { UpdateDriverForPlugAndPlayDevicesW(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), hardwareid.param().abi(), fullinfpath.param().abi(), installflags, core::mem::transmute(brebootrequired.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { UpdateDriverForPlugAndPlayDevicesW(hwndparent.unwrap_or(core::mem::zeroed()) as _, hardwareid.param().abi(), fullinfpath.param().abi(), installflags, brebootrequired.unwrap_or(core::mem::zeroed()) as _).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 e2f6932f77..a1e709262a 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/DeviceQuery/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/DeviceQuery/mod.rs @@ -9,7 +9,7 @@ pub unsafe fn DevCreateObjectQuery(objecttype: DEV_OBJECT_TYPE, queryflags: u32, windows_targets::link!("api-ms-win-devices-query-l1-1-0.dll" "system" fn DevCreateObjectQuery(objecttype : DEV_OBJECT_TYPE, queryflags : u32, crequestedproperties : u32, prequestedproperties : *const super::Properties:: DEVPROPCOMPKEY, cfilterexpressioncount : u32, pfilter : *const DEVPROP_FILTER_EXPRESSION, pcallback : PDEV_QUERY_RESULT_CALLBACK, pcontext : *const core::ffi::c_void, phdevquery : *mut HDEVQUERY) -> windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - DevCreateObjectQuery(objecttype, queryflags, prequestedproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prequestedproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pfilter.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pfilter.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcallback, core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + DevCreateObjectQuery(objecttype, queryflags, prequestedproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prequestedproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pfilter.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pfilter.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcallback, pcontext.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[cfg(feature = "Win32_Devices_Properties")] @@ -28,7 +28,7 @@ pub unsafe fn DevCreateObjectQueryEx(objecttype: DEV_OBJECT_TYPE, queryflags: u3 pextendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pextendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcallback, - core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed())), + pcontext.unwrap_or(core::mem::zeroed()) as _, &mut result__, ) .map(|| core::mem::transmute(result__)) @@ -43,19 +43,7 @@ where windows_targets::link!("api-ms-win-devices-query-l1-1-0.dll" "system" fn DevCreateObjectQueryFromId(objecttype : DEV_OBJECT_TYPE, pszobjectid : windows_core::PCWSTR, queryflags : u32, crequestedproperties : u32, prequestedproperties : *const super::Properties:: DEVPROPCOMPKEY, cfilterexpressioncount : u32, pfilter : *const DEVPROP_FILTER_EXPRESSION, pcallback : PDEV_QUERY_RESULT_CALLBACK, pcontext : *const core::ffi::c_void, phdevquery : *mut HDEVQUERY) -> windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - DevCreateObjectQueryFromId( - objecttype, - pszobjectid.param().abi(), - queryflags, - prequestedproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(prequestedproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - pfilter.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(pfilter.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - pcallback, - core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed())), - &mut result__, - ) - .map(|| core::mem::transmute(result__)) + DevCreateObjectQueryFromId(objecttype, pszobjectid.param().abi(), queryflags, prequestedproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prequestedproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pfilter.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pfilter.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcallback, pcontext.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[cfg(feature = "Win32_Devices_Properties")] @@ -78,7 +66,7 @@ where pextendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pextendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcallback, - core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed())), + pcontext.unwrap_or(core::mem::zeroed()) as _, &mut result__, ) .map(|| core::mem::transmute(result__)) @@ -93,19 +81,7 @@ where windows_targets::link!("api-ms-win-devices-query-l1-1-0.dll" "system" fn DevCreateObjectQueryFromIds(objecttype : DEV_OBJECT_TYPE, pszzobjectids : windows_core::PCWSTR, queryflags : u32, crequestedproperties : u32, prequestedproperties : *const super::Properties:: DEVPROPCOMPKEY, cfilterexpressioncount : u32, pfilter : *const DEVPROP_FILTER_EXPRESSION, pcallback : PDEV_QUERY_RESULT_CALLBACK, pcontext : *const core::ffi::c_void, phdevquery : *mut HDEVQUERY) -> windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - DevCreateObjectQueryFromIds( - objecttype, - pszzobjectids.param().abi(), - queryflags, - prequestedproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(prequestedproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - pfilter.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(pfilter.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - pcallback, - core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed())), - &mut result__, - ) - .map(|| core::mem::transmute(result__)) + DevCreateObjectQueryFromIds(objecttype, pszzobjectids.param().abi(), queryflags, prequestedproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prequestedproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pfilter.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pfilter.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcallback, pcontext.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[cfg(feature = "Win32_Devices_Properties")] @@ -128,7 +104,7 @@ where pextendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pextendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcallback, - core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed())), + pcontext.unwrap_or(core::mem::zeroed()) as _, &mut result__, ) .map(|| core::mem::transmute(result__)) @@ -162,7 +138,7 @@ where P1: windows_core::Param, { windows_targets::link!("api-ms-win-devices-query-l1-1-0.dll" "system" fn DevGetObjectProperties(objecttype : DEV_OBJECT_TYPE, pszobjectid : windows_core::PCWSTR, queryflags : u32, crequestedproperties : u32, prequestedproperties : *const super::Properties:: DEVPROPCOMPKEY, pcpropertycount : *mut u32, ppproperties : *mut *mut super::Properties:: DEVPROPERTY) -> windows_core::HRESULT); - unsafe { DevGetObjectProperties(objecttype, pszobjectid.param().abi(), queryflags, prequestedproperties.len().try_into().unwrap(), core::mem::transmute(prequestedproperties.as_ptr()), core::mem::transmute(pcpropertycount), core::mem::transmute(ppproperties)).ok() } + unsafe { DevGetObjectProperties(objecttype, pszobjectid.param().abi(), queryflags, prequestedproperties.len().try_into().unwrap(), core::mem::transmute(prequestedproperties.as_ptr()), pcpropertycount as _, ppproperties as _).ok() } } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -171,13 +147,13 @@ where P1: windows_core::Param, { windows_targets::link!("api-ms-win-devices-query-l1-1-1.dll" "system" fn DevGetObjectPropertiesEx(objecttype : DEV_OBJECT_TYPE, pszobjectid : windows_core::PCWSTR, queryflags : u32, crequestedproperties : u32, prequestedproperties : *const super::Properties:: DEVPROPCOMPKEY, cextendedparametercount : u32, pextendedparameters : *const DEV_QUERY_PARAMETER, pcpropertycount : *mut u32, ppproperties : *mut *mut super::Properties:: DEVPROPERTY) -> windows_core::HRESULT); - unsafe { DevGetObjectPropertiesEx(objecttype, pszobjectid.param().abi(), queryflags, prequestedproperties.len().try_into().unwrap(), core::mem::transmute(prequestedproperties.as_ptr()), 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(pcpropertycount), core::mem::transmute(ppproperties)).ok() } + unsafe { DevGetObjectPropertiesEx(objecttype, pszobjectid.param().abi(), queryflags, prequestedproperties.len().try_into().unwrap(), core::mem::transmute(prequestedproperties.as_ptr()), 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())), pcpropertycount as _, ppproperties as _).ok() } } #[cfg(feature = "Win32_Devices_Properties")] #[inline] pub unsafe fn DevGetObjects(objecttype: DEV_OBJECT_TYPE, queryflags: u32, prequestedproperties: Option<&[super::Properties::DEVPROPCOMPKEY]>, pfilter: Option<&[DEVPROP_FILTER_EXPRESSION]>, pcobjectcount: *mut u32, ppobjects: *mut *mut DEV_OBJECT) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-devices-query-l1-1-0.dll" "system" fn DevGetObjects(objecttype : DEV_OBJECT_TYPE, queryflags : u32, crequestedproperties : u32, prequestedproperties : *const super::Properties:: DEVPROPCOMPKEY, cfilterexpressioncount : u32, pfilter : *const DEVPROP_FILTER_EXPRESSION, pcobjectcount : *mut u32, ppobjects : *mut *mut DEV_OBJECT) -> windows_core::HRESULT); - unsafe { DevGetObjects(objecttype, queryflags, prequestedproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prequestedproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pfilter.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pfilter.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pcobjectcount), core::mem::transmute(ppobjects)).ok() } + unsafe { DevGetObjects(objecttype, queryflags, prequestedproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prequestedproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pfilter.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pfilter.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcobjectcount as _, ppobjects as _).ok() } } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -193,8 +169,8 @@ pub unsafe fn DevGetObjectsEx(objecttype: DEV_OBJECT_TYPE, queryflags: u32, preq core::mem::transmute(pfilter.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), 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(pcobjectcount), - core::mem::transmute(ppobjects), + pcobjectcount as _, + ppobjects as _, ) .ok() } 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 cbb3185e37..8360ab99f6 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Display/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Display/mod.rs @@ -1,37 +1,37 @@ #[inline] pub unsafe fn BRUSHOBJ_hGetColorTransform(pbo: *mut BRUSHOBJ) -> super::super::Foundation::HANDLE { windows_targets::link!("gdi32.dll" "system" fn BRUSHOBJ_hGetColorTransform(pbo : *mut BRUSHOBJ) -> super::super::Foundation:: HANDLE); - unsafe { BRUSHOBJ_hGetColorTransform(core::mem::transmute(pbo)) } + unsafe { BRUSHOBJ_hGetColorTransform(pbo as _) } } #[inline] pub unsafe fn BRUSHOBJ_pvAllocRbrush(pbo: *mut BRUSHOBJ, cj: u32) -> *mut core::ffi::c_void { windows_targets::link!("gdi32.dll" "system" fn BRUSHOBJ_pvAllocRbrush(pbo : *mut BRUSHOBJ, cj : u32) -> *mut core::ffi::c_void); - unsafe { BRUSHOBJ_pvAllocRbrush(core::mem::transmute(pbo), cj) } + unsafe { BRUSHOBJ_pvAllocRbrush(pbo as _, cj) } } #[inline] pub unsafe fn BRUSHOBJ_pvGetRbrush(pbo: *mut BRUSHOBJ) -> *mut core::ffi::c_void { windows_targets::link!("gdi32.dll" "system" fn BRUSHOBJ_pvGetRbrush(pbo : *mut BRUSHOBJ) -> *mut core::ffi::c_void); - unsafe { BRUSHOBJ_pvGetRbrush(core::mem::transmute(pbo)) } + unsafe { BRUSHOBJ_pvGetRbrush(pbo as _) } } #[inline] pub unsafe fn BRUSHOBJ_ulGetBrushColor(pbo: *mut BRUSHOBJ) -> u32 { windows_targets::link!("gdi32.dll" "system" fn BRUSHOBJ_ulGetBrushColor(pbo : *mut BRUSHOBJ) -> u32); - unsafe { BRUSHOBJ_ulGetBrushColor(core::mem::transmute(pbo)) } + unsafe { BRUSHOBJ_ulGetBrushColor(pbo as _) } } #[inline] pub unsafe fn CLIPOBJ_bEnum(pco: *mut CLIPOBJ, cj: u32, pul: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn CLIPOBJ_bEnum(pco : *mut CLIPOBJ, cj : u32, pul : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { CLIPOBJ_bEnum(core::mem::transmute(pco), cj, core::mem::transmute(pul)) } + unsafe { CLIPOBJ_bEnum(pco as _, cj, pul as _) } } #[inline] pub unsafe fn CLIPOBJ_cEnumStart(pco: *mut CLIPOBJ, ball: bool, itype: u32, idirection: u32, climit: u32) -> u32 { windows_targets::link!("gdi32.dll" "system" fn CLIPOBJ_cEnumStart(pco : *mut CLIPOBJ, ball : super::super::Foundation:: BOOL, itype : u32, idirection : u32, climit : u32) -> u32); - unsafe { CLIPOBJ_cEnumStart(core::mem::transmute(pco), ball.into(), itype, idirection, climit) } + unsafe { CLIPOBJ_cEnumStart(pco as _, ball.into(), itype, idirection, climit) } } #[inline] pub unsafe fn CLIPOBJ_ppoGetPath(pco: *mut CLIPOBJ) -> *mut PATHOBJ { windows_targets::link!("gdi32.dll" "system" fn CLIPOBJ_ppoGetPath(pco : *mut CLIPOBJ) -> *mut PATHOBJ); - unsafe { CLIPOBJ_ppoGetPath(core::mem::transmute(pco)) } + unsafe { CLIPOBJ_ppoGetPath(pco as _) } } #[inline] pub unsafe fn CapabilitiesRequestAndCapabilitiesReply(hmonitor: super::super::Foundation::HANDLE, pszasciicapabilitiesstring: &mut [u8]) -> i32 { @@ -56,7 +56,7 @@ pub unsafe fn DestroyPhysicalMonitors(pphysicalmonitorarray: &[PHYSICAL_MONITOR] #[inline] pub unsafe fn DisplayConfigGetDeviceInfo(requestpacket: *mut DISPLAYCONFIG_DEVICE_INFO_HEADER) -> i32 { windows_targets::link!("user32.dll" "system" fn DisplayConfigGetDeviceInfo(requestpacket : *mut DISPLAYCONFIG_DEVICE_INFO_HEADER) -> i32); - unsafe { DisplayConfigGetDeviceInfo(core::mem::transmute(requestpacket)) } + unsafe { DisplayConfigGetDeviceInfo(requestpacket as _) } } #[inline] pub unsafe fn DisplayConfigSetDeviceInfo(setpacket: *const DISPLAYCONFIG_DEVICE_INFO_HEADER) -> i32 { @@ -72,7 +72,7 @@ pub unsafe fn EngAcquireSemaphore(hsem: HSEMAPHORE) { #[inline] pub unsafe fn EngAlphaBlend(psodest: *mut SURFOBJ, psosrc: *mut SURFOBJ, pco: *mut CLIPOBJ, pxlo: *mut XLATEOBJ, prcldest: *mut super::super::Foundation::RECTL, prclsrc: *mut super::super::Foundation::RECTL, pblendobj: *mut BLENDOBJ) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn EngAlphaBlend(psodest : *mut SURFOBJ, psosrc : *mut SURFOBJ, pco : *mut CLIPOBJ, pxlo : *mut XLATEOBJ, prcldest : *mut super::super::Foundation:: RECTL, prclsrc : *mut super::super::Foundation:: RECTL, pblendobj : *mut BLENDOBJ) -> super::super::Foundation:: BOOL); - unsafe { 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)) } + unsafe { EngAlphaBlend(psodest as _, psosrc as _, pco as _, pxlo as _, prcldest as _, prclsrc as _, pblendobj as _) } } #[inline] pub unsafe fn EngAssociateSurface(hsurf: HSURF, hdev: HDEV, flhooks: u32) -> super::super::Foundation::BOOL { @@ -87,7 +87,7 @@ pub unsafe fn EngBitBlt(psotrg: *const SURFOBJ, psosrc: *const SURFOBJ, psomask: #[inline] pub unsafe fn EngCheckAbort(pso: *mut SURFOBJ) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn EngCheckAbort(pso : *mut SURFOBJ) -> super::super::Foundation:: BOOL); - unsafe { EngCheckAbort(core::mem::transmute(pso)) } + unsafe { EngCheckAbort(pso as _) } } #[inline] pub unsafe fn EngComputeGlyphSet(ncodepage: i32, nfirstchar: i32, cchars: i32) -> *mut FD_GLYPHSET { @@ -97,13 +97,13 @@ pub unsafe fn EngComputeGlyphSet(ncodepage: i32, nfirstchar: i32, cchars: i32) - #[inline] pub unsafe fn EngCopyBits(psodest: *mut SURFOBJ, psosrc: *mut SURFOBJ, pco: *mut CLIPOBJ, pxlo: *mut XLATEOBJ, prcldest: *mut super::super::Foundation::RECTL, pptlsrc: *mut super::super::Foundation::POINTL) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn EngCopyBits(psodest : *mut SURFOBJ, psosrc : *mut SURFOBJ, pco : *mut CLIPOBJ, pxlo : *mut XLATEOBJ, prcldest : *mut super::super::Foundation:: RECTL, pptlsrc : *mut super::super::Foundation:: POINTL) -> super::super::Foundation:: BOOL); - unsafe { EngCopyBits(core::mem::transmute(psodest), core::mem::transmute(psosrc), core::mem::transmute(pco), core::mem::transmute(pxlo), core::mem::transmute(prcldest), core::mem::transmute(pptlsrc)) } + unsafe { EngCopyBits(psodest as _, psosrc as _, pco as _, pxlo as _, prcldest as _, pptlsrc as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn EngCreateBitmap(sizl: super::super::Foundation::SIZE, lwidth: i32, iformat: u32, fl: u32, pvbits: *mut core::ffi::c_void) -> super::super::Graphics::Gdi::HBITMAP { windows_targets::link!("gdi32.dll" "system" fn EngCreateBitmap(sizl : super::super::Foundation:: SIZE, lwidth : i32, iformat : u32, fl : u32, pvbits : *mut core::ffi::c_void) -> super::super::Graphics::Gdi:: HBITMAP); - unsafe { EngCreateBitmap(core::mem::transmute(sizl), lwidth, iformat, fl, core::mem::transmute(pvbits)) } + unsafe { EngCreateBitmap(core::mem::transmute(sizl), lwidth, iformat, fl, pvbits as _) } } #[inline] pub unsafe fn EngCreateClip() -> *mut CLIPOBJ { @@ -125,7 +125,7 @@ pub unsafe fn EngCreateDeviceSurface(dhsurf: DHSURF, sizl: super::super::Foundat #[inline] pub unsafe fn EngCreatePalette(imode: u32, ccolors: u32, pulcolors: *mut u32, flred: u32, flgreen: u32, flblue: u32) -> super::super::Graphics::Gdi::HPALETTE { windows_targets::link!("gdi32.dll" "system" fn EngCreatePalette(imode : u32, ccolors : u32, pulcolors : *mut u32, flred : u32, flgreen : u32, flblue : u32) -> super::super::Graphics::Gdi:: HPALETTE); - unsafe { EngCreatePalette(imode, ccolors, core::mem::transmute(pulcolors), flred, flgreen, flblue) } + unsafe { EngCreatePalette(imode, ccolors, pulcolors as _, flred, flgreen, flblue) } } #[inline] pub unsafe fn EngCreateSemaphore() -> HSEMAPHORE { @@ -135,7 +135,7 @@ pub unsafe fn EngCreateSemaphore() -> HSEMAPHORE { #[inline] pub unsafe fn EngDeleteClip(pco: Option<*const CLIPOBJ>) { windows_targets::link!("gdi32.dll" "system" fn EngDeleteClip(pco : *const CLIPOBJ)); - unsafe { EngDeleteClip(core::mem::transmute(pco.unwrap_or(core::mem::zeroed()))) } + unsafe { EngDeleteClip(pco.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -146,7 +146,7 @@ pub unsafe fn EngDeletePalette(hpal: super::super::Graphics::Gdi::HPALETTE) -> s #[inline] pub unsafe fn EngDeletePath(ppo: *mut PATHOBJ) { windows_targets::link!("gdi32.dll" "system" fn EngDeletePath(ppo : *mut PATHOBJ)); - unsafe { EngDeletePath(core::mem::transmute(ppo)) } + unsafe { EngDeletePath(ppo as _) } } #[inline] pub unsafe fn EngDeleteSemaphore(hsem: HSEMAPHORE) { @@ -161,17 +161,17 @@ pub unsafe fn EngDeleteSurface(hsurf: HSURF) -> super::super::Foundation::BOOL { #[inline] pub unsafe fn EngEraseSurface(pso: *mut SURFOBJ, prcl: *mut super::super::Foundation::RECTL, icolor: u32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn EngEraseSurface(pso : *mut SURFOBJ, prcl : *mut super::super::Foundation:: RECTL, icolor : u32) -> super::super::Foundation:: BOOL); - unsafe { EngEraseSurface(core::mem::transmute(pso), core::mem::transmute(prcl), icolor) } + unsafe { EngEraseSurface(pso as _, prcl as _, icolor) } } #[inline] pub unsafe fn EngFillPath(pso: *mut SURFOBJ, ppo: *mut PATHOBJ, pco: *mut CLIPOBJ, pbo: *mut BRUSHOBJ, pptlbrushorg: *mut super::super::Foundation::POINTL, mix: u32, floptions: u32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn EngFillPath(pso : *mut SURFOBJ, ppo : *mut PATHOBJ, pco : *mut CLIPOBJ, pbo : *mut BRUSHOBJ, pptlbrushorg : *mut super::super::Foundation:: POINTL, mix : u32, floptions : u32) -> super::super::Foundation:: BOOL); - unsafe { EngFillPath(core::mem::transmute(pso), core::mem::transmute(ppo), core::mem::transmute(pco), core::mem::transmute(pbo), core::mem::transmute(pptlbrushorg), mix, floptions) } + unsafe { EngFillPath(pso as _, ppo as _, pco as _, pbo as _, pptlbrushorg as _, mix, floptions) } } #[inline] 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); - unsafe { EngFindResource(h, iname, itype, core::mem::transmute(pulsize)) } + unsafe { EngFindResource(h, iname, itype, pulsize as _) } } #[inline] pub unsafe fn EngFreeModule(h: super::super::Foundation::HANDLE) { @@ -181,7 +181,7 @@ pub unsafe fn EngFreeModule(h: super::super::Foundation::HANDLE) { #[inline] pub unsafe fn EngGetCurrentCodePage(oemcodepage: *mut u16, ansicodepage: *mut u16) { windows_targets::link!("gdi32.dll" "system" fn EngGetCurrentCodePage(oemcodepage : *mut u16, ansicodepage : *mut u16)); - unsafe { EngGetCurrentCodePage(core::mem::transmute(oemcodepage), core::mem::transmute(ansicodepage)) } + unsafe { EngGetCurrentCodePage(oemcodepage as _, ansicodepage as _) } } #[inline] pub unsafe fn EngGetDriverName(hdev: HDEV) -> windows_core::PWSTR { @@ -197,12 +197,12 @@ pub unsafe fn EngGetPrinterDataFileName(hdev: HDEV) -> windows_core::PWSTR { #[inline] pub unsafe fn EngGradientFill(psodest: *mut SURFOBJ, pco: *mut CLIPOBJ, pxlo: *mut XLATEOBJ, pvertex: *mut super::super::Graphics::Gdi::TRIVERTEX, nvertex: u32, pmesh: *mut core::ffi::c_void, nmesh: u32, prclextents: *mut super::super::Foundation::RECTL, pptlditherorg: *mut super::super::Foundation::POINTL, ulmode: u32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn EngGradientFill(psodest : *mut SURFOBJ, pco : *mut CLIPOBJ, pxlo : *mut XLATEOBJ, pvertex : *mut super::super::Graphics::Gdi:: TRIVERTEX, nvertex : u32, pmesh : *mut core::ffi::c_void, nmesh : u32, prclextents : *mut super::super::Foundation:: RECTL, pptlditherorg : *mut super::super::Foundation:: POINTL, ulmode : u32) -> super::super::Foundation:: BOOL); - unsafe { EngGradientFill(core::mem::transmute(psodest), core::mem::transmute(pco), core::mem::transmute(pxlo), core::mem::transmute(pvertex), nvertex, core::mem::transmute(pmesh), nmesh, core::mem::transmute(prclextents), core::mem::transmute(pptlditherorg), ulmode) } + unsafe { EngGradientFill(psodest as _, pco as _, pxlo as _, pvertex as _, nvertex, pmesh as _, nmesh, prclextents as _, pptlditherorg as _, ulmode) } } #[inline] pub unsafe fn EngLineTo(pso: *mut SURFOBJ, pco: *mut CLIPOBJ, pbo: *mut BRUSHOBJ, x1: i32, y1: i32, x2: i32, y2: i32, prclbounds: *mut super::super::Foundation::RECTL, mix: u32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn EngLineTo(pso : *mut SURFOBJ, pco : *mut CLIPOBJ, pbo : *mut BRUSHOBJ, x1 : i32, y1 : i32, x2 : i32, y2 : i32, prclbounds : *mut super::super::Foundation:: RECTL, mix : u32) -> super::super::Foundation:: BOOL); - unsafe { EngLineTo(core::mem::transmute(pso), core::mem::transmute(pco), core::mem::transmute(pbo), x1, y1, x2, y2, core::mem::transmute(prclbounds), mix) } + unsafe { EngLineTo(pso as _, pco as _, pbo as _, x1, y1, x2, y2, prclbounds as _, mix) } } #[inline] pub unsafe fn EngLoadModule(pwsz: P0) -> super::super::Foundation::HANDLE @@ -225,29 +225,29 @@ pub unsafe fn EngMarkBandingSurface(hsurf: HSURF) -> super::super::Foundation::B #[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)); - unsafe { EngMultiByteToUnicodeN(core::mem::transmute(unicodestring), maxbytesinunicodestring, core::mem::transmute(bytesinunicodestring.unwrap_or(core::mem::zeroed())), core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap()) } + unsafe { EngMultiByteToUnicodeN(core::mem::transmute(unicodestring), maxbytesinunicodestring, bytesinunicodestring.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap()) } } #[inline] 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); - unsafe { EngMultiByteToWideChar(codepage, core::mem::transmute(widecharstring.unwrap_or(core::mem::zeroed())), 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())) } + unsafe { EngMultiByteToWideChar(codepage, widecharstring.unwrap_or(core::mem::zeroed()) as _, 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 { windows_targets::link!("gdi32.dll" "system" fn EngPaint(pso : *mut SURFOBJ, pco : *mut CLIPOBJ, pbo : *mut BRUSHOBJ, pptlbrushorg : *mut super::super::Foundation:: POINTL, mix : u32) -> super::super::Foundation:: BOOL); - unsafe { EngPaint(core::mem::transmute(pso), core::mem::transmute(pco), core::mem::transmute(pbo), core::mem::transmute(pptlbrushorg), mix) } + unsafe { EngPaint(pso as _, pco as _, pbo as _, pptlbrushorg as _, mix) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn EngPlgBlt(psotrg: *mut SURFOBJ, psosrc: *mut SURFOBJ, psomsk: *mut SURFOBJ, pco: *mut CLIPOBJ, pxlo: *mut XLATEOBJ, pca: *mut super::super::Graphics::Gdi::COLORADJUSTMENT, pptlbrushorg: *mut super::super::Foundation::POINTL, pptfx: *mut POINTFIX, prcl: *mut super::super::Foundation::RECTL, pptl: *mut super::super::Foundation::POINTL, imode: u32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn EngPlgBlt(psotrg : *mut SURFOBJ, psosrc : *mut SURFOBJ, psomsk : *mut SURFOBJ, pco : *mut CLIPOBJ, pxlo : *mut XLATEOBJ, pca : *mut super::super::Graphics::Gdi:: COLORADJUSTMENT, pptlbrushorg : *mut super::super::Foundation:: POINTL, pptfx : *mut POINTFIX, prcl : *mut super::super::Foundation:: RECTL, pptl : *mut super::super::Foundation:: POINTL, imode : u32) -> super::super::Foundation:: BOOL); - unsafe { EngPlgBlt(core::mem::transmute(psotrg), core::mem::transmute(psosrc), core::mem::transmute(psomsk), core::mem::transmute(pco), core::mem::transmute(pxlo), core::mem::transmute(pca), core::mem::transmute(pptlbrushorg), core::mem::transmute(pptfx), core::mem::transmute(prcl), core::mem::transmute(pptl), imode) } + unsafe { EngPlgBlt(psotrg as _, psosrc as _, psomsk as _, pco as _, pxlo as _, pca as _, pptlbrushorg as _, pptfx as _, prcl as _, pptl as _, imode) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { EngQueryEMFInfo(hdev, core::mem::transmute(pemfinfo)) } + unsafe { EngQueryEMFInfo(hdev, pemfinfo as _) } } #[inline] pub unsafe fn EngQueryLocalTime() -> ENG_TIME_FIELDS { @@ -267,33 +267,33 @@ pub unsafe fn EngReleaseSemaphore(hsem: HSEMAPHORE) { #[inline] pub unsafe fn EngStretchBlt(psodest: *mut SURFOBJ, psosrc: *mut SURFOBJ, psomask: *mut SURFOBJ, pco: *mut CLIPOBJ, pxlo: *mut XLATEOBJ, pca: *mut super::super::Graphics::Gdi::COLORADJUSTMENT, pptlhtorg: *mut super::super::Foundation::POINTL, prcldest: *mut super::super::Foundation::RECTL, prclsrc: *mut super::super::Foundation::RECTL, pptlmask: *mut super::super::Foundation::POINTL, imode: u32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn EngStretchBlt(psodest : *mut SURFOBJ, psosrc : *mut SURFOBJ, psomask : *mut SURFOBJ, pco : *mut CLIPOBJ, pxlo : *mut XLATEOBJ, pca : *mut super::super::Graphics::Gdi:: COLORADJUSTMENT, pptlhtorg : *mut super::super::Foundation:: POINTL, prcldest : *mut super::super::Foundation:: RECTL, prclsrc : *mut super::super::Foundation:: RECTL, pptlmask : *mut super::super::Foundation:: POINTL, imode : u32) -> super::super::Foundation:: BOOL); - unsafe { EngStretchBlt(core::mem::transmute(psodest), core::mem::transmute(psosrc), core::mem::transmute(psomask), core::mem::transmute(pco), core::mem::transmute(pxlo), core::mem::transmute(pca), core::mem::transmute(pptlhtorg), core::mem::transmute(prcldest), core::mem::transmute(prclsrc), core::mem::transmute(pptlmask), imode) } + unsafe { EngStretchBlt(psodest as _, psosrc as _, psomask as _, pco as _, pxlo as _, pca as _, pptlhtorg as _, prcldest as _, prclsrc as _, pptlmask as _, imode) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn EngStretchBltROP(psodest: *mut SURFOBJ, psosrc: *mut SURFOBJ, psomask: *mut SURFOBJ, pco: *mut CLIPOBJ, pxlo: *mut XLATEOBJ, pca: *mut super::super::Graphics::Gdi::COLORADJUSTMENT, pptlhtorg: *mut super::super::Foundation::POINTL, prcldest: *mut super::super::Foundation::RECTL, prclsrc: *mut super::super::Foundation::RECTL, pptlmask: *mut super::super::Foundation::POINTL, imode: u32, pbo: *mut BRUSHOBJ, rop4: u32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn EngStretchBltROP(psodest : *mut SURFOBJ, psosrc : *mut SURFOBJ, psomask : *mut SURFOBJ, pco : *mut CLIPOBJ, pxlo : *mut XLATEOBJ, pca : *mut super::super::Graphics::Gdi:: COLORADJUSTMENT, pptlhtorg : *mut super::super::Foundation:: POINTL, prcldest : *mut super::super::Foundation:: RECTL, prclsrc : *mut super::super::Foundation:: RECTL, pptlmask : *mut super::super::Foundation:: POINTL, imode : u32, pbo : *mut BRUSHOBJ, rop4 : u32) -> super::super::Foundation:: BOOL); - unsafe { EngStretchBltROP(core::mem::transmute(psodest), core::mem::transmute(psosrc), core::mem::transmute(psomask), core::mem::transmute(pco), core::mem::transmute(pxlo), core::mem::transmute(pca), core::mem::transmute(pptlhtorg), core::mem::transmute(prcldest), core::mem::transmute(prclsrc), core::mem::transmute(pptlmask), imode, core::mem::transmute(pbo), rop4) } + unsafe { EngStretchBltROP(psodest as _, psosrc as _, psomask as _, pco as _, pxlo as _, pca as _, pptlhtorg as _, prcldest as _, prclsrc as _, pptlmask as _, imode, pbo as _, rop4) } } #[inline] pub unsafe fn EngStrokeAndFillPath(pso: *mut SURFOBJ, ppo: *mut PATHOBJ, pco: *mut CLIPOBJ, pxo: *mut XFORMOBJ, pbostroke: *mut BRUSHOBJ, plineattrs: *mut LINEATTRS, pbofill: *mut BRUSHOBJ, pptlbrushorg: *mut super::super::Foundation::POINTL, mixfill: u32, floptions: u32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn EngStrokeAndFillPath(pso : *mut SURFOBJ, ppo : *mut PATHOBJ, pco : *mut CLIPOBJ, pxo : *mut XFORMOBJ, pbostroke : *mut BRUSHOBJ, plineattrs : *mut LINEATTRS, pbofill : *mut BRUSHOBJ, pptlbrushorg : *mut super::super::Foundation:: POINTL, mixfill : u32, floptions : u32) -> super::super::Foundation:: BOOL); - unsafe { EngStrokeAndFillPath(core::mem::transmute(pso), core::mem::transmute(ppo), core::mem::transmute(pco), core::mem::transmute(pxo), core::mem::transmute(pbostroke), core::mem::transmute(plineattrs), core::mem::transmute(pbofill), core::mem::transmute(pptlbrushorg), mixfill, floptions) } + unsafe { EngStrokeAndFillPath(pso as _, ppo as _, pco as _, pxo as _, pbostroke as _, plineattrs as _, pbofill as _, pptlbrushorg as _, mixfill, floptions) } } #[inline] pub unsafe fn EngStrokePath(pso: *mut SURFOBJ, ppo: *mut PATHOBJ, pco: *mut CLIPOBJ, pxo: *mut XFORMOBJ, pbo: *mut BRUSHOBJ, pptlbrushorg: *mut super::super::Foundation::POINTL, plineattrs: *mut LINEATTRS, mix: u32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn EngStrokePath(pso : *mut SURFOBJ, ppo : *mut PATHOBJ, pco : *mut CLIPOBJ, pxo : *mut XFORMOBJ, pbo : *mut BRUSHOBJ, pptlbrushorg : *mut super::super::Foundation:: POINTL, plineattrs : *mut LINEATTRS, mix : u32) -> super::super::Foundation:: BOOL); - unsafe { EngStrokePath(core::mem::transmute(pso), core::mem::transmute(ppo), core::mem::transmute(pco), core::mem::transmute(pxo), core::mem::transmute(pbo), core::mem::transmute(pptlbrushorg), core::mem::transmute(plineattrs), mix) } + unsafe { EngStrokePath(pso as _, ppo as _, pco as _, pxo as _, pbo as _, pptlbrushorg as _, plineattrs as _, mix) } } #[inline] pub unsafe fn EngTextOut(pso: *mut SURFOBJ, pstro: *mut STROBJ, pfo: *mut FONTOBJ, pco: *mut CLIPOBJ, prclextra: *mut super::super::Foundation::RECTL, prclopaque: *mut super::super::Foundation::RECTL, pbofore: *mut BRUSHOBJ, pboopaque: *mut BRUSHOBJ, pptlorg: *mut super::super::Foundation::POINTL, mix: u32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn EngTextOut(pso : *mut SURFOBJ, pstro : *mut STROBJ, pfo : *mut FONTOBJ, pco : *mut CLIPOBJ, prclextra : *mut super::super::Foundation:: RECTL, prclopaque : *mut super::super::Foundation:: RECTL, pbofore : *mut BRUSHOBJ, pboopaque : *mut BRUSHOBJ, pptlorg : *mut super::super::Foundation:: POINTL, mix : u32) -> super::super::Foundation:: BOOL); - unsafe { EngTextOut(core::mem::transmute(pso), core::mem::transmute(pstro), core::mem::transmute(pfo), core::mem::transmute(pco), core::mem::transmute(prclextra), core::mem::transmute(prclopaque), core::mem::transmute(pbofore), core::mem::transmute(pboopaque), core::mem::transmute(pptlorg), mix) } + unsafe { EngTextOut(pso as _, pstro as _, pfo as _, pco as _, prclextra as _, prclopaque as _, pbofore as _, pboopaque as _, pptlorg as _, mix) } } #[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); - unsafe { EngTransparentBlt(psodst, psosrc, core::mem::transmute(pco.unwrap_or(core::mem::zeroed())), core::mem::transmute(pxlo.unwrap_or(core::mem::zeroed())), prcldst, prclsrc, transcolor, bcalledfrombitblt) } + unsafe { EngTransparentBlt(psodst, psosrc, pco.unwrap_or(core::mem::zeroed()) as _, pxlo.unwrap_or(core::mem::zeroed()) as _, prcldst, prclsrc, transcolor, bcalledfrombitblt) } } #[inline] pub unsafe fn EngUnicodeToMultiByteN(multibytestring: &mut [u8], bytesinmultibytestring: Option<*mut u32>, unicodestring: P3, bytesinunicodestring: u32) @@ -301,12 +301,12 @@ 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)); - unsafe { EngUnicodeToMultiByteN(core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap(), core::mem::transmute(bytesinmultibytestring.unwrap_or(core::mem::zeroed())), unicodestring.param().abi(), bytesinunicodestring) } + unsafe { EngUnicodeToMultiByteN(core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap(), bytesinmultibytestring.unwrap_or(core::mem::zeroed()) as _, unicodestring.param().abi(), bytesinunicodestring) } } #[inline] pub unsafe fn EngUnlockSurface(pso: *mut SURFOBJ) { windows_targets::link!("gdi32.dll" "system" fn EngUnlockSurface(pso : *mut SURFOBJ)); - unsafe { EngUnlockSurface(core::mem::transmute(pso)) } + unsafe { EngUnlockSurface(pso as _) } } #[inline] pub unsafe fn EngWideCharToMultiByte(codepage: u32, widecharstring: P1, bytesinwidecharstring: i32, multibytestring: Option<&mut [u8]>) -> i32 @@ -319,22 +319,22 @@ where #[inline] pub unsafe fn FONTOBJ_cGetAllGlyphHandles(pfo: *mut FONTOBJ, phg: *mut u32) -> u32 { windows_targets::link!("gdi32.dll" "system" fn FONTOBJ_cGetAllGlyphHandles(pfo : *mut FONTOBJ, phg : *mut u32) -> u32); - unsafe { FONTOBJ_cGetAllGlyphHandles(core::mem::transmute(pfo), core::mem::transmute(phg)) } + unsafe { FONTOBJ_cGetAllGlyphHandles(pfo as _, phg as _) } } #[inline] pub unsafe fn FONTOBJ_cGetGlyphs(pfo: *mut FONTOBJ, imode: u32, cglyph: u32, phg: *mut u32, ppvglyph: *mut *mut core::ffi::c_void) -> u32 { windows_targets::link!("gdi32.dll" "system" fn FONTOBJ_cGetGlyphs(pfo : *mut FONTOBJ, imode : u32, cglyph : u32, phg : *mut u32, ppvglyph : *mut *mut core::ffi::c_void) -> u32); - unsafe { FONTOBJ_cGetGlyphs(core::mem::transmute(pfo), imode, cglyph, core::mem::transmute(phg), core::mem::transmute(ppvglyph)) } + unsafe { FONTOBJ_cGetGlyphs(pfo as _, imode, cglyph, phg as _, ppvglyph as _) } } #[inline] pub unsafe fn FONTOBJ_pQueryGlyphAttrs(pfo: *mut FONTOBJ, imode: u32) -> *mut FD_GLYPHATTR { windows_targets::link!("gdi32.dll" "system" fn FONTOBJ_pQueryGlyphAttrs(pfo : *mut FONTOBJ, imode : u32) -> *mut FD_GLYPHATTR); - unsafe { FONTOBJ_pQueryGlyphAttrs(core::mem::transmute(pfo), imode) } + unsafe { FONTOBJ_pQueryGlyphAttrs(pfo as _, imode) } } #[inline] pub unsafe fn FONTOBJ_pfdg(pfo: *mut FONTOBJ) -> *mut FD_GLYPHSET { windows_targets::link!("gdi32.dll" "system" fn FONTOBJ_pfdg(pfo : *mut FONTOBJ) -> *mut FD_GLYPHSET); - unsafe { FONTOBJ_pfdg(core::mem::transmute(pfo)) } + unsafe { FONTOBJ_pfdg(pfo as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -345,7 +345,7 @@ pub unsafe fn FONTOBJ_pifi(pfo: *const FONTOBJ) -> *mut IFIMETRICS { #[inline] pub unsafe fn FONTOBJ_pvTrueTypeFontFile(pfo: *mut FONTOBJ, pcjfile: *mut u32) -> *mut core::ffi::c_void { windows_targets::link!("gdi32.dll" "system" fn FONTOBJ_pvTrueTypeFontFile(pfo : *mut FONTOBJ, pcjfile : *mut u32) -> *mut core::ffi::c_void); - unsafe { FONTOBJ_pvTrueTypeFontFile(core::mem::transmute(pfo), core::mem::transmute(pcjfile)) } + unsafe { FONTOBJ_pvTrueTypeFontFile(pfo as _, pcjfile as _) } } #[inline] pub unsafe fn FONTOBJ_pxoGetXform(pfo: *const FONTOBJ) -> *mut XFORMOBJ { @@ -355,78 +355,78 @@ pub unsafe fn FONTOBJ_pxoGetXform(pfo: *const FONTOBJ) -> *mut XFORMOBJ { #[inline] pub unsafe fn FONTOBJ_vGetInfo(pfo: *mut FONTOBJ, cjsize: u32, pfi: *mut FONTINFO) { windows_targets::link!("gdi32.dll" "system" fn FONTOBJ_vGetInfo(pfo : *mut FONTOBJ, cjsize : u32, pfi : *mut FONTINFO)); - unsafe { FONTOBJ_vGetInfo(core::mem::transmute(pfo), cjsize, core::mem::transmute(pfi)) } + unsafe { FONTOBJ_vGetInfo(pfo as _, cjsize, pfi as _) } } #[inline] pub unsafe fn GetAutoRotationState(pstate: *mut AR_STATE) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn GetAutoRotationState(pstate : *mut AR_STATE) -> super::super::Foundation:: BOOL); - unsafe { GetAutoRotationState(core::mem::transmute(pstate)) } + unsafe { GetAutoRotationState(pstate as _) } } #[inline] 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); - unsafe { GetCapabilitiesStringLength(hmonitor, core::mem::transmute(pdwcapabilitiesstringlengthincharacters)) } + unsafe { GetCapabilitiesStringLength(hmonitor, pdwcapabilitiesstringlengthincharacters as _) } } #[inline] pub unsafe fn GetDisplayAutoRotationPreferences(porientation: *mut ORIENTATION_PREFERENCE) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn GetDisplayAutoRotationPreferences(porientation : *mut ORIENTATION_PREFERENCE) -> super::super::Foundation:: BOOL); - unsafe { GetDisplayAutoRotationPreferences(core::mem::transmute(porientation)) } + unsafe { GetDisplayAutoRotationPreferences(porientation as _) } } #[inline] pub unsafe fn GetDisplayConfigBufferSizes(flags: QUERY_DISPLAY_CONFIG_FLAGS, numpatharrayelements: *mut u32, nummodeinfoarrayelements: *mut u32) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("user32.dll" "system" fn GetDisplayConfigBufferSizes(flags : QUERY_DISPLAY_CONFIG_FLAGS, numpatharrayelements : *mut u32, nummodeinfoarrayelements : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetDisplayConfigBufferSizes(flags, core::mem::transmute(numpatharrayelements), core::mem::transmute(nummodeinfoarrayelements)) } + unsafe { GetDisplayConfigBufferSizes(flags, numpatharrayelements as _, nummodeinfoarrayelements as _) } } #[inline] 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); - unsafe { GetMonitorBrightness(hmonitor, core::mem::transmute(pdwminimumbrightness), core::mem::transmute(pdwcurrentbrightness), core::mem::transmute(pdwmaximumbrightness)) } + unsafe { GetMonitorBrightness(hmonitor, pdwminimumbrightness as _, pdwcurrentbrightness as _, pdwmaximumbrightness as _) } } #[inline] 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); - unsafe { GetMonitorCapabilities(hmonitor, core::mem::transmute(pdwmonitorcapabilities), core::mem::transmute(pdwsupportedcolortemperatures)) } + unsafe { GetMonitorCapabilities(hmonitor, pdwmonitorcapabilities as _, pdwsupportedcolortemperatures as _) } } #[inline] 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); - unsafe { GetMonitorColorTemperature(hmonitor, core::mem::transmute(pctcurrentcolortemperature)) } + unsafe { GetMonitorColorTemperature(hmonitor, pctcurrentcolortemperature as _) } } #[inline] 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); - unsafe { GetMonitorContrast(hmonitor, core::mem::transmute(pdwminimumcontrast), core::mem::transmute(pdwcurrentcontrast), core::mem::transmute(pdwmaximumcontrast)) } + unsafe { GetMonitorContrast(hmonitor, pdwminimumcontrast as _, pdwcurrentcontrast as _, pdwmaximumcontrast as _) } } #[inline] 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); - unsafe { GetMonitorDisplayAreaPosition(hmonitor, ptpositiontype, core::mem::transmute(pdwminimumposition), core::mem::transmute(pdwcurrentposition), core::mem::transmute(pdwmaximumposition)) } + unsafe { GetMonitorDisplayAreaPosition(hmonitor, ptpositiontype, pdwminimumposition as _, pdwcurrentposition as _, pdwmaximumposition as _) } } #[inline] 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); - unsafe { GetMonitorDisplayAreaSize(hmonitor, stsizetype, core::mem::transmute(pdwminimumwidthorheight), core::mem::transmute(pdwcurrentwidthorheight), core::mem::transmute(pdwmaximumwidthorheight)) } + unsafe { GetMonitorDisplayAreaSize(hmonitor, stsizetype, pdwminimumwidthorheight as _, pdwcurrentwidthorheight as _, pdwmaximumwidthorheight as _) } } #[inline] 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); - unsafe { GetMonitorRedGreenOrBlueDrive(hmonitor, dtdrivetype, core::mem::transmute(pdwminimumdrive), core::mem::transmute(pdwcurrentdrive), core::mem::transmute(pdwmaximumdrive)) } + unsafe { GetMonitorRedGreenOrBlueDrive(hmonitor, dtdrivetype, pdwminimumdrive as _, pdwcurrentdrive as _, pdwmaximumdrive as _) } } #[inline] 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); - unsafe { GetMonitorRedGreenOrBlueGain(hmonitor, gtgaintype, core::mem::transmute(pdwminimumgain), core::mem::transmute(pdwcurrentgain), core::mem::transmute(pdwmaximumgain)) } + unsafe { GetMonitorRedGreenOrBlueGain(hmonitor, gtgaintype, pdwminimumgain as _, pdwcurrentgain as _, pdwmaximumgain as _) } } #[inline] 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); - unsafe { GetMonitorTechnologyType(hmonitor, core::mem::transmute(pdtydisplaytechnologytype)) } + unsafe { GetMonitorTechnologyType(hmonitor, pdtydisplaytechnologytype as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { GetNumberOfPhysicalMonitorsFromHMONITOR(hmonitor, core::mem::transmute(pdwnumberofphysicalmonitors)).ok() } + unsafe { GetNumberOfPhysicalMonitorsFromHMONITOR(hmonitor, pdwnumberofphysicalmonitors as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D9")] #[inline] @@ -458,54 +458,54 @@ where #[inline] 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); - unsafe { GetTimingReport(hmonitor, core::mem::transmute(pmtrmonitortimingreport)) } + unsafe { GetTimingReport(hmonitor, pmtrmonitortimingreport as _) } } #[inline] 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); - unsafe { GetVCPFeatureAndVCPFeatureReply(hmonitor, bvcpcode, core::mem::transmute(pvct.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwcurrentvalue), core::mem::transmute(pdwmaximumvalue.unwrap_or(core::mem::zeroed()))) } + unsafe { GetVCPFeatureAndVCPFeatureReply(hmonitor, bvcpcode, pvct.unwrap_or(core::mem::zeroed()) as _, pdwcurrentvalue as _, pdwmaximumvalue.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { HT_Get8BPPFormatPalette(core::mem::transmute(ppaletteentry.unwrap_or(core::mem::zeroed())), redgamma, greengamma, bluegamma) } + unsafe { HT_Get8BPPFormatPalette(ppaletteentry.unwrap_or(core::mem::zeroed()) as _, redgamma, greengamma, bluegamma) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn HT_Get8BPPMaskPalette(ppaletteentry: Option<*mut super::super::Graphics::Gdi::PALETTEENTRY>, use8bppmaskpal: bool, cmymask: u8, redgamma: u16, greengamma: u16, bluegamma: u16) -> i32 { 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); - unsafe { HT_Get8BPPMaskPalette(core::mem::transmute(ppaletteentry.unwrap_or(core::mem::zeroed())), use8bppmaskpal.into(), cmymask, redgamma, greengamma, bluegamma) } + unsafe { HT_Get8BPPMaskPalette(ppaletteentry.unwrap_or(core::mem::zeroed()) as _, use8bppmaskpal.into(), cmymask, redgamma, greengamma, bluegamma) } } #[inline] pub unsafe fn PATHOBJ_bEnum(ppo: *mut PATHOBJ, ppd: *mut PATHDATA) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn PATHOBJ_bEnum(ppo : *mut PATHOBJ, ppd : *mut PATHDATA) -> super::super::Foundation:: BOOL); - unsafe { PATHOBJ_bEnum(core::mem::transmute(ppo), core::mem::transmute(ppd)) } + unsafe { PATHOBJ_bEnum(ppo as _, ppd as _) } } #[inline] pub unsafe fn PATHOBJ_bEnumClipLines(ppo: *mut PATHOBJ, cb: u32, pcl: *mut CLIPLINE) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn PATHOBJ_bEnumClipLines(ppo : *mut PATHOBJ, cb : u32, pcl : *mut CLIPLINE) -> super::super::Foundation:: BOOL); - unsafe { PATHOBJ_bEnumClipLines(core::mem::transmute(ppo), cb, core::mem::transmute(pcl)) } + unsafe { PATHOBJ_bEnumClipLines(ppo as _, cb, pcl as _) } } #[inline] pub unsafe fn PATHOBJ_vEnumStart(ppo: *mut PATHOBJ) { windows_targets::link!("gdi32.dll" "system" fn PATHOBJ_vEnumStart(ppo : *mut PATHOBJ)); - unsafe { PATHOBJ_vEnumStart(core::mem::transmute(ppo)) } + unsafe { PATHOBJ_vEnumStart(ppo as _) } } #[inline] pub unsafe fn PATHOBJ_vEnumStartClipLines(ppo: *mut PATHOBJ, pco: *mut CLIPOBJ, pso: *mut SURFOBJ, pla: *mut LINEATTRS) { windows_targets::link!("gdi32.dll" "system" fn PATHOBJ_vEnumStartClipLines(ppo : *mut PATHOBJ, pco : *mut CLIPOBJ, pso : *mut SURFOBJ, pla : *mut LINEATTRS)); - unsafe { PATHOBJ_vEnumStartClipLines(core::mem::transmute(ppo), core::mem::transmute(pco), core::mem::transmute(pso), core::mem::transmute(pla)) } + unsafe { PATHOBJ_vEnumStartClipLines(ppo as _, pco as _, pso as _, pla as _) } } #[inline] pub unsafe fn PATHOBJ_vGetBounds(ppo: *mut PATHOBJ, prectfx: *mut RECTFX) { windows_targets::link!("gdi32.dll" "system" fn PATHOBJ_vGetBounds(ppo : *mut PATHOBJ, prectfx : *mut RECTFX)); - unsafe { PATHOBJ_vGetBounds(core::mem::transmute(ppo), core::mem::transmute(prectfx)) } + unsafe { PATHOBJ_vGetBounds(ppo as _, prectfx as _) } } #[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); - unsafe { QueryDisplayConfig(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()))) } + unsafe { QueryDisplayConfig(flags, numpatharrayelements as _, patharray as _, nummodeinfoarrayelements as _, modeinfoarray as _, currenttopologyid.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RestoreMonitorFactoryColorDefaults(hmonitor: super::super::Foundation::HANDLE) -> i32 { @@ -520,27 +520,27 @@ pub unsafe fn RestoreMonitorFactoryDefaults(hmonitor: super::super::Foundation:: #[inline] pub unsafe fn STROBJ_bEnum(pstro: *mut STROBJ, pc: *mut u32, ppgpos: *mut *mut GLYPHPOS) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn STROBJ_bEnum(pstro : *mut STROBJ, pc : *mut u32, ppgpos : *mut *mut GLYPHPOS) -> super::super::Foundation:: BOOL); - unsafe { STROBJ_bEnum(core::mem::transmute(pstro), core::mem::transmute(pc), core::mem::transmute(ppgpos)) } + unsafe { STROBJ_bEnum(pstro as _, pc as _, ppgpos as _) } } #[inline] pub unsafe fn STROBJ_bEnumPositionsOnly(pstro: *mut STROBJ, pc: *mut u32, ppgpos: *mut *mut GLYPHPOS) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn STROBJ_bEnumPositionsOnly(pstro : *mut STROBJ, pc : *mut u32, ppgpos : *mut *mut GLYPHPOS) -> super::super::Foundation:: BOOL); - unsafe { STROBJ_bEnumPositionsOnly(core::mem::transmute(pstro), core::mem::transmute(pc), core::mem::transmute(ppgpos)) } + unsafe { STROBJ_bEnumPositionsOnly(pstro as _, pc as _, ppgpos as _) } } #[inline] pub unsafe fn STROBJ_bGetAdvanceWidths(pso: *mut STROBJ, ifirst: u32, c: u32, pptqd: *mut POINTQF) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn STROBJ_bGetAdvanceWidths(pso : *mut STROBJ, ifirst : u32, c : u32, pptqd : *mut POINTQF) -> super::super::Foundation:: BOOL); - unsafe { STROBJ_bGetAdvanceWidths(core::mem::transmute(pso), ifirst, c, core::mem::transmute(pptqd)) } + unsafe { STROBJ_bGetAdvanceWidths(pso as _, ifirst, c, pptqd as _) } } #[inline] pub unsafe fn STROBJ_dwGetCodePage(pstro: *mut STROBJ) -> u32 { windows_targets::link!("gdi32.dll" "system" fn STROBJ_dwGetCodePage(pstro : *mut STROBJ) -> u32); - unsafe { STROBJ_dwGetCodePage(core::mem::transmute(pstro)) } + unsafe { STROBJ_dwGetCodePage(pstro as _) } } #[inline] pub unsafe fn STROBJ_vEnumStart(pstro: *mut STROBJ) { windows_targets::link!("gdi32.dll" "system" fn STROBJ_vEnumStart(pstro : *mut STROBJ)); - unsafe { STROBJ_vEnumStart(core::mem::transmute(pstro)) } + unsafe { STROBJ_vEnumStart(pstro as _) } } #[inline] pub unsafe fn SaveCurrentMonitorSettings(hmonitor: super::super::Foundation::HANDLE) -> i32 { @@ -605,32 +605,32 @@ pub unsafe fn SetVCPFeature(hmonitor: super::super::Foundation::HANDLE, bvcpcode #[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 { windows_targets::link!("gdi32.dll" "system" 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); - unsafe { XFORMOBJ_bApplyXform(core::mem::transmute(pxo), imode, cpoints, core::mem::transmute(pvin), core::mem::transmute(pvout)) } + unsafe { XFORMOBJ_bApplyXform(pxo as _, imode, cpoints, pvin as _, pvout as _) } } #[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); - unsafe { XFORMOBJ_iGetXform(pxo, core::mem::transmute(pxform.unwrap_or(core::mem::zeroed()))) } + unsafe { XFORMOBJ_iGetXform(pxo, pxform.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn XLATEOBJ_cGetPalette(pxlo: *mut XLATEOBJ, ipal: u32, cpal: u32, ppal: *mut u32) -> u32 { windows_targets::link!("gdi32.dll" "system" fn XLATEOBJ_cGetPalette(pxlo : *mut XLATEOBJ, ipal : u32, cpal : u32, ppal : *mut u32) -> u32); - unsafe { XLATEOBJ_cGetPalette(core::mem::transmute(pxlo), ipal, cpal, core::mem::transmute(ppal)) } + unsafe { XLATEOBJ_cGetPalette(pxlo as _, ipal, cpal, ppal as _) } } #[inline] pub unsafe fn XLATEOBJ_hGetColorTransform(pxlo: *mut XLATEOBJ) -> super::super::Foundation::HANDLE { windows_targets::link!("gdi32.dll" "system" fn XLATEOBJ_hGetColorTransform(pxlo : *mut XLATEOBJ) -> super::super::Foundation:: HANDLE); - unsafe { XLATEOBJ_hGetColorTransform(core::mem::transmute(pxlo)) } + unsafe { XLATEOBJ_hGetColorTransform(pxlo as _) } } #[inline] pub unsafe fn XLATEOBJ_iXlate(pxlo: *mut XLATEOBJ, icolor: u32) -> u32 { windows_targets::link!("gdi32.dll" "system" fn XLATEOBJ_iXlate(pxlo : *mut XLATEOBJ, icolor : u32) -> u32); - unsafe { XLATEOBJ_iXlate(core::mem::transmute(pxlo), icolor) } + unsafe { XLATEOBJ_iXlate(pxlo as _, icolor) } } #[inline] pub unsafe fn XLATEOBJ_piVector(pxlo: *mut XLATEOBJ) -> *mut u32 { windows_targets::link!("gdi32.dll" "system" fn XLATEOBJ_piVector(pxlo : *mut XLATEOBJ) -> *mut u32); - unsafe { XLATEOBJ_piVector(core::mem::transmute(pxlo)) } + unsafe { XLATEOBJ_piVector(pxlo as _) } } pub const AR_DISABLED: AR_STATE = AR_STATE(1i32); pub const AR_DOCKED: AR_STATE = AR_STATE(64i32); @@ -2909,13 +2909,13 @@ impl ICloneViewHelper { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetConnectedIDs)(windows_core::Interface::as_raw(self), wszadaptorname.param().abi(), core::mem::transmute(pulcount), core::mem::transmute(pulid), ulflags).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConnectedIDs)(windows_core::Interface::as_raw(self), wszadaptorname.param().abi(), pulcount as _, pulid as _, ulflags).ok() } } pub unsafe fn GetActiveTopology(&self, wszadaptorname: P0, ulsourceid: u32, pulcount: *mut u32, pultargetid: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetActiveTopology)(windows_core::Interface::as_raw(self), wszadaptorname.param().abi(), ulsourceid, core::mem::transmute(pulcount), core::mem::transmute(pultargetid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetActiveTopology)(windows_core::Interface::as_raw(self), wszadaptorname.param().abi(), ulsourceid, pulcount as _, pultargetid as _).ok() } } pub unsafe fn SetActiveTopology(&self, wszadaptorname: P0, ulsourceid: u32, ulcount: u32, pultargetid: *const u32) -> windows_core::Result<()> where @@ -3337,13 +3337,13 @@ impl IViewHelper { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetConnectedIDs)(windows_core::Interface::as_raw(self), wszadaptorname.param().abi(), core::mem::transmute(pulcount), core::mem::transmute(pulid), ulflags).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConnectedIDs)(windows_core::Interface::as_raw(self), wszadaptorname.param().abi(), pulcount as _, pulid as _, ulflags).ok() } } pub unsafe fn GetActiveTopology(&self, wszadaptorname: P0, ulsourceid: u32, pulcount: *mut u32, pultargetid: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetActiveTopology)(windows_core::Interface::as_raw(self), wszadaptorname.param().abi(), ulsourceid, core::mem::transmute(pulcount), core::mem::transmute(pultargetid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetActiveTopology)(windows_core::Interface::as_raw(self), wszadaptorname.param().abi(), ulsourceid, pulcount as _, pultargetid as _).ok() } } pub unsafe fn SetActiveTopology(&self, wszadaptorname: P0, ulsourceid: u32, ulcount: u32, pultargetid: *const u32) -> windows_core::Result<()> where 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 14eafa7fe6..899e7918a6 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 @@ -13,7 +13,7 @@ where windows_targets::link!("cfgmgr32.dll" "system" fn SwDeviceCreate(pszenumeratorname : windows_core::PCWSTR, pszparentdeviceinstance : windows_core::PCWSTR, pcreateinfo : *const SW_DEVICE_CREATE_INFO, cpropertycount : u32, pproperties : *const super::super::Properties:: DEVPROPERTY, pcallback : SW_DEVICE_CREATE_CALLBACK, pcontext : *const core::ffi::c_void, phswdevice : *mut HSWDEVICE) -> windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - SwDeviceCreate(pszenumeratorname.param().abi(), pszparentdeviceinstance.param().abi(), pcreateinfo, pproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcallback, core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + SwDeviceCreate(pszenumeratorname.param().abi(), pszparentdeviceinstance.param().abi(), pcreateinfo, pproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcallback, pcontext.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] 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 314816d106..e45205c81d 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Fax/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Fax/mod.rs @@ -21,12 +21,12 @@ pub unsafe fn FaxClose(faxhandle: super::super::Foundation::HANDLE) -> super::su #[inline] pub unsafe fn FaxCompleteJobParamsA(jobparams: *mut *mut FAX_JOB_PARAMA, coverpageinfo: *mut *mut FAX_COVERPAGE_INFOA) -> super::super::Foundation::BOOL { windows_targets::link!("winfax.dll" "system" fn FaxCompleteJobParamsA(jobparams : *mut *mut FAX_JOB_PARAMA, coverpageinfo : *mut *mut FAX_COVERPAGE_INFOA) -> super::super::Foundation:: BOOL); - unsafe { FaxCompleteJobParamsA(core::mem::transmute(jobparams), core::mem::transmute(coverpageinfo)) } + unsafe { FaxCompleteJobParamsA(jobparams as _, coverpageinfo as _) } } #[inline] pub unsafe fn FaxCompleteJobParamsW(jobparams: *mut *mut FAX_JOB_PARAMW, coverpageinfo: *mut *mut FAX_COVERPAGE_INFOW) -> super::super::Foundation::BOOL { windows_targets::link!("winfax.dll" "system" fn FaxCompleteJobParamsW(jobparams : *mut *mut FAX_JOB_PARAMW, coverpageinfo : *mut *mut FAX_COVERPAGE_INFOW) -> super::super::Foundation:: BOOL); - unsafe { FaxCompleteJobParamsW(core::mem::transmute(jobparams), core::mem::transmute(coverpageinfo)) } + unsafe { FaxCompleteJobParamsW(jobparams as _, coverpageinfo as _) } } #[inline] pub unsafe fn FaxConnectFaxServerA(machinename: P0, faxhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> @@ -34,7 +34,7 @@ where P0: windows_core::Param, { windows_targets::link!("winfax.dll" "system" fn FaxConnectFaxServerA(machinename : windows_core::PCSTR, faxhandle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - unsafe { FaxConnectFaxServerA(machinename.param().abi(), core::mem::transmute(faxhandle)).ok() } + unsafe { FaxConnectFaxServerA(machinename.param().abi(), faxhandle as _).ok() } } #[inline] pub unsafe fn FaxConnectFaxServerW(machinename: P0, faxhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> @@ -42,7 +42,7 @@ where P0: windows_core::Param, { windows_targets::link!("winfax.dll" "system" fn FaxConnectFaxServerW(machinename : windows_core::PCWSTR, faxhandle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - unsafe { FaxConnectFaxServerW(machinename.param().abi(), core::mem::transmute(faxhandle)).ok() } + unsafe { FaxConnectFaxServerW(machinename.param().abi(), faxhandle as _).ok() } } #[inline] pub unsafe fn FaxEnableRoutingMethodA(faxporthandle: super::super::Foundation::HANDLE, routingguid: P1, enabled: bool) -> windows_core::Result<()> @@ -63,102 +63,102 @@ where #[inline] 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); - unsafe { FaxEnumGlobalRoutingInfoA(faxhandle, core::mem::transmute(routinginfo), core::mem::transmute(methodsreturned)).ok() } + unsafe { FaxEnumGlobalRoutingInfoA(faxhandle, routinginfo as _, methodsreturned as _).ok() } } #[inline] 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); - unsafe { FaxEnumGlobalRoutingInfoW(faxhandle, core::mem::transmute(routinginfo), core::mem::transmute(methodsreturned)).ok() } + unsafe { FaxEnumGlobalRoutingInfoW(faxhandle, routinginfo as _, methodsreturned as _).ok() } } #[inline] 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); - unsafe { FaxEnumJobsA(faxhandle, core::mem::transmute(jobentry), core::mem::transmute(jobsreturned)).ok() } + unsafe { FaxEnumJobsA(faxhandle, jobentry as _, jobsreturned as _).ok() } } #[inline] 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); - unsafe { FaxEnumJobsW(faxhandle, core::mem::transmute(jobentry), core::mem::transmute(jobsreturned)).ok() } + unsafe { FaxEnumJobsW(faxhandle, jobentry as _, jobsreturned as _).ok() } } #[inline] 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); - unsafe { FaxEnumPortsA(faxhandle, core::mem::transmute(portinfo), core::mem::transmute(portsreturned)).ok() } + unsafe { FaxEnumPortsA(faxhandle, portinfo as _, portsreturned as _).ok() } } #[inline] 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); - unsafe { FaxEnumPortsW(faxhandle, core::mem::transmute(portinfo), core::mem::transmute(portsreturned)).ok() } + unsafe { FaxEnumPortsW(faxhandle, portinfo as _, portsreturned as _).ok() } } #[inline] 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); - unsafe { FaxEnumRoutingMethodsA(faxporthandle, core::mem::transmute(routingmethod), core::mem::transmute(methodsreturned)).ok() } + unsafe { FaxEnumRoutingMethodsA(faxporthandle, routingmethod as _, methodsreturned as _).ok() } } #[inline] 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); - unsafe { FaxEnumRoutingMethodsW(faxporthandle, core::mem::transmute(routingmethod), core::mem::transmute(methodsreturned)).ok() } + unsafe { FaxEnumRoutingMethodsW(faxporthandle, routingmethod as _, methodsreturned as _).ok() } } #[inline] pub unsafe fn FaxFreeBuffer(buffer: *mut core::ffi::c_void) { windows_targets::link!("winfax.dll" "system" fn FaxFreeBuffer(buffer : *mut core::ffi::c_void)); - unsafe { FaxFreeBuffer(core::mem::transmute(buffer)) } + unsafe { FaxFreeBuffer(buffer as _) } } #[inline] 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); - unsafe { FaxGetConfigurationA(faxhandle, core::mem::transmute(faxconfig)).ok() } + unsafe { FaxGetConfigurationA(faxhandle, faxconfig as _).ok() } } #[inline] 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); - unsafe { FaxGetConfigurationW(faxhandle, core::mem::transmute(faxconfig)).ok() } + unsafe { FaxGetConfigurationW(faxhandle, faxconfig as _).ok() } } #[inline] 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); - unsafe { FaxGetDeviceStatusA(faxporthandle, core::mem::transmute(devicestatus)).ok() } + unsafe { FaxGetDeviceStatusA(faxporthandle, devicestatus as _).ok() } } #[inline] 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); - unsafe { FaxGetDeviceStatusW(faxporthandle, core::mem::transmute(devicestatus)).ok() } + unsafe { FaxGetDeviceStatusW(faxporthandle, devicestatus as _).ok() } } #[inline] 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); - unsafe { FaxGetJobA(faxhandle, jobid, core::mem::transmute(jobentry)).ok() } + unsafe { FaxGetJobA(faxhandle, jobid, jobentry as _).ok() } } #[inline] 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); - unsafe { FaxGetJobW(faxhandle, jobid, core::mem::transmute(jobentry)).ok() } + unsafe { FaxGetJobW(faxhandle, jobid, jobentry as _).ok() } } #[inline] 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); - unsafe { FaxGetLoggingCategoriesA(faxhandle, core::mem::transmute(categories), core::mem::transmute(numbercategories)).ok() } + unsafe { FaxGetLoggingCategoriesA(faxhandle, categories as _, numbercategories as _).ok() } } #[inline] 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); - unsafe { FaxGetLoggingCategoriesW(faxhandle, core::mem::transmute(categories), core::mem::transmute(numbercategories)).ok() } + unsafe { FaxGetLoggingCategoriesW(faxhandle, categories as _, numbercategories as _).ok() } } #[inline] 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); - unsafe { FaxGetPageData(faxhandle, jobid, core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(imagewidth), core::mem::transmute(imageheight)) } + unsafe { FaxGetPageData(faxhandle, jobid, buffer as _, buffersize as _, imagewidth as _, imageheight as _) } } #[inline] 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); - unsafe { FaxGetPortA(faxporthandle, core::mem::transmute(portinfo)).ok() } + unsafe { FaxGetPortA(faxporthandle, portinfo as _).ok() } } #[inline] 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); - unsafe { FaxGetPortW(faxporthandle, core::mem::transmute(portinfo)).ok() } + unsafe { FaxGetPortW(faxporthandle, portinfo as _).ok() } } #[inline] pub unsafe fn FaxGetRoutingInfoA(faxporthandle: super::super::Foundation::HANDLE, routingguid: P1, routinginfobuffer: *mut *mut u8, routinginfobuffersize: *mut u32) -> windows_core::Result<()> @@ -166,7 +166,7 @@ where 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); - unsafe { FaxGetRoutingInfoA(faxporthandle, routingguid.param().abi(), core::mem::transmute(routinginfobuffer), core::mem::transmute(routinginfobuffersize)).ok() } + unsafe { FaxGetRoutingInfoA(faxporthandle, routingguid.param().abi(), routinginfobuffer as _, routinginfobuffersize as _).ok() } } #[inline] pub unsafe fn FaxGetRoutingInfoW(faxporthandle: super::super::Foundation::HANDLE, routingguid: P1, routinginfobuffer: *mut *mut u8, routinginfobuffersize: *mut u32) -> windows_core::Result<()> @@ -174,7 +174,7 @@ where 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); - unsafe { FaxGetRoutingInfoW(faxporthandle, routingguid.param().abi(), core::mem::transmute(routinginfobuffer), core::mem::transmute(routinginfobuffersize)).ok() } + unsafe { FaxGetRoutingInfoW(faxporthandle, routingguid.param().abi(), routinginfobuffer as _, routinginfobuffersize as _).ok() } } #[inline] 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 { @@ -184,7 +184,7 @@ pub unsafe fn FaxInitializeEventQueue(faxhandle: super::super::Foundation::HANDL #[inline] 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); - unsafe { FaxOpenPort(faxhandle, deviceid, flags, core::mem::transmute(faxporthandle)) } + unsafe { FaxOpenPort(faxhandle, deviceid, flags, faxporthandle as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -225,7 +225,7 @@ where 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); - unsafe { FaxSendDocumentA(faxhandle, filename.param().abi(), jobparams, coverpageinfo, core::mem::transmute(faxjobid)).ok() } + unsafe { FaxSendDocumentA(faxhandle, filename.param().abi(), jobparams, coverpageinfo, faxjobid as _).ok() } } #[inline] 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<()> @@ -233,7 +233,7 @@ where 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); - unsafe { FaxSendDocumentForBroadcastA(faxhandle, filename.param().abi(), core::mem::transmute(faxjobid), faxrecipientcallback, context).ok() } + unsafe { FaxSendDocumentForBroadcastA(faxhandle, filename.param().abi(), faxjobid as _, faxrecipientcallback, context).ok() } } #[inline] 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<()> @@ -241,7 +241,7 @@ where 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); - unsafe { FaxSendDocumentForBroadcastW(faxhandle, filename.param().abi(), core::mem::transmute(faxjobid), faxrecipientcallback, context).ok() } + unsafe { FaxSendDocumentForBroadcastW(faxhandle, filename.param().abi(), faxjobid as _, faxrecipientcallback, context).ok() } } #[inline] 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<()> @@ -249,7 +249,7 @@ where 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); - unsafe { FaxSendDocumentW(faxhandle, filename.param().abi(), jobparams, coverpageinfo, core::mem::transmute(faxjobid)).ok() } + unsafe { FaxSendDocumentW(faxhandle, filename.param().abi(), jobparams, coverpageinfo, faxjobid as _).ok() } } #[inline] pub unsafe fn FaxSetConfigurationA(faxhandle: super::super::Foundation::HANDLE, faxconfig: *const FAX_CONFIGURATIONA) -> windows_core::Result<()> { @@ -324,7 +324,7 @@ where P0: windows_core::Param, { windows_targets::link!("winfax.dll" "system" fn FaxStartPrintJobA(printername : windows_core::PCSTR, printinfo : *const FAX_PRINT_INFOA, faxjobid : *mut u32, faxcontextinfo : *mut FAX_CONTEXT_INFOA) -> super::super::Foundation:: BOOL); - unsafe { FaxStartPrintJobA(printername.param().abi(), printinfo, core::mem::transmute(faxjobid), core::mem::transmute(faxcontextinfo)).ok() } + unsafe { FaxStartPrintJobA(printername.param().abi(), printinfo, faxjobid as _, faxcontextinfo as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -333,7 +333,7 @@ where P0: windows_core::Param, { windows_targets::link!("winfax.dll" "system" fn FaxStartPrintJobW(printername : windows_core::PCWSTR, printinfo : *const FAX_PRINT_INFOW, faxjobid : *mut u32, faxcontextinfo : *mut FAX_CONTEXT_INFOW) -> super::super::Foundation:: BOOL); - unsafe { FaxStartPrintJobW(printername.param().abi(), printinfo, core::mem::transmute(faxjobid), core::mem::transmute(faxcontextinfo)).ok() } + unsafe { FaxStartPrintJobW(printername.param().abi(), printinfo, faxjobid as _, faxcontextinfo as _).ok() } } #[inline] pub unsafe fn FaxUnregisterServiceProviderW(deviceprovider: P0) -> super::super::Foundation::BOOL @@ -5120,14 +5120,14 @@ impl IFaxDocument2 { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn Submit2(&self, bstrfaxservername: &windows_core::BSTR, pvfaxoutgoingjobids: *mut super::super::System::Variant::VARIANT, plerrorbodyfile: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Submit2)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrfaxservername), core::mem::transmute(pvfaxoutgoingjobids), core::mem::transmute(plerrorbodyfile)).ok() } + unsafe { (windows_core::Interface::vtable(self).Submit2)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrfaxservername), core::mem::transmute(pvfaxoutgoingjobids), plerrorbodyfile as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn ConnectedSubmit2(&self, pfaxserver: P0, pvfaxoutgoingjobids: *mut super::super::System::Variant::VARIANT, plerrorbodyfile: *mut i32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ConnectedSubmit2)(windows_core::Interface::as_raw(self), pfaxserver.param().abi(), core::mem::transmute(pvfaxoutgoingjobids), core::mem::transmute(plerrorbodyfile)).ok() } + unsafe { (windows_core::Interface::vtable(self).ConnectedSubmit2)(windows_core::Interface::as_raw(self), pfaxserver.param().abi(), core::mem::transmute(pvfaxoutgoingjobids), plerrorbodyfile as _).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -14011,19 +14011,19 @@ impl IStiDevice { unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), hinst, pwszdevicename.param().abi(), dwversion, dwmode).ok() } } pub unsafe fn GetCapabilities(&self, pdevcaps: *mut STI_DEV_CAPS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCapabilities)(windows_core::Interface::as_raw(self), core::mem::transmute(pdevcaps)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCapabilities)(windows_core::Interface::as_raw(self), pdevcaps as _).ok() } } pub unsafe fn GetStatus(&self, pdevstatus: *mut STI_DEVICE_STATUS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pdevstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), pdevstatus as _).ok() } } pub unsafe fn DeviceReset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DeviceReset)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn Diagnostic(&self, pbuffer: *mut STI_DIAG) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Diagnostic)(windows_core::Interface::as_raw(self), core::mem::transmute(pbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).Diagnostic)(windows_core::Interface::as_raw(self), pbuffer as _).ok() } } pub unsafe fn Escape(&self, escapefunction: u32, lpindata: *const core::ffi::c_void, cbindatasize: u32, poutdata: *mut core::ffi::c_void, dwoutdatasize: u32, pdwactualdata: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Escape)(windows_core::Interface::as_raw(self), escapefunction, lpindata, cbindatasize, core::mem::transmute(poutdata), dwoutdatasize, core::mem::transmute(pdwactualdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).Escape)(windows_core::Interface::as_raw(self), escapefunction, lpindata, cbindatasize, poutdata as _, dwoutdatasize, pdwactualdata as _).ok() } } pub unsafe fn GetLastError(&self) -> windows_core::Result { unsafe { @@ -14039,31 +14039,31 @@ 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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).RawReadData)(windows_core::Interface::as_raw(self), lpbuffer as _, lpdwnumberofbytes as _, lpoverlapped.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).RawWriteData)(windows_core::Interface::as_raw(self), lpbuffer, nnumberofbytes, core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).RawWriteData)(windows_core::Interface::as_raw(self), lpbuffer, nnumberofbytes, lpoverlapped.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).RawReadCommand)(windows_core::Interface::as_raw(self), lpbuffer as _, lpdwnumberofbytes as _, lpoverlapped.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).RawWriteCommand)(windows_core::Interface::as_raw(self), lpbuffer, nnumberofbytes, core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).RawWriteCommand)(windows_core::Interface::as_raw(self), lpbuffer, nnumberofbytes, lpoverlapped.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Subscribe(&self, lpsubsribe: *mut STISUBSCRIBE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Subscribe)(windows_core::Interface::as_raw(self), core::mem::transmute(lpsubsribe)).ok() } + unsafe { (windows_core::Interface::vtable(self).Subscribe)(windows_core::Interface::as_raw(self), lpsubsribe as _).ok() } } pub unsafe fn GetLastNotificationData(&self, lpnotify: *mut STINOTIFY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLastNotificationData)(windows_core::Interface::as_raw(self), core::mem::transmute(lpnotify)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLastNotificationData)(windows_core::Interface::as_raw(self), lpnotify as _).ok() } } pub unsafe fn UnSubscribe(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UnSubscribe)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetLastErrorInfo(&self, plasterrorinfo: *mut _ERROR_INFOW) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLastErrorInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(plasterrorinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLastErrorInfo)(windows_core::Interface::as_raw(self), plasterrorinfo as _).ok() } } } #[repr(C)] @@ -14268,34 +14268,34 @@ impl IStiDeviceControl { } #[cfg(feature = "Win32_System_IO")] pub unsafe fn RawReadData(&self, lpbuffer: *mut core::ffi::c_void, lpdwnumberofbytes: *mut u32, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RawReadData)(windows_core::Interface::as_raw(self), core::mem::transmute(lpbuffer), core::mem::transmute(lpdwnumberofbytes), core::mem::transmute(lpoverlapped)).ok() } + unsafe { (windows_core::Interface::vtable(self).RawReadData)(windows_core::Interface::as_raw(self), lpbuffer as _, lpdwnumberofbytes as _, lpoverlapped as _).ok() } } #[cfg(feature = "Win32_System_IO")] pub unsafe fn RawWriteData(&self, lpbuffer: *mut core::ffi::c_void, nnumberofbytes: u32, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RawWriteData)(windows_core::Interface::as_raw(self), core::mem::transmute(lpbuffer), nnumberofbytes, core::mem::transmute(lpoverlapped)).ok() } + unsafe { (windows_core::Interface::vtable(self).RawWriteData)(windows_core::Interface::as_raw(self), lpbuffer as _, nnumberofbytes, lpoverlapped as _).ok() } } #[cfg(feature = "Win32_System_IO")] pub unsafe fn RawReadCommand(&self, lpbuffer: *mut core::ffi::c_void, lpdwnumberofbytes: *mut u32, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RawReadCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(lpbuffer), core::mem::transmute(lpdwnumberofbytes), core::mem::transmute(lpoverlapped)).ok() } + unsafe { (windows_core::Interface::vtable(self).RawReadCommand)(windows_core::Interface::as_raw(self), lpbuffer as _, lpdwnumberofbytes as _, lpoverlapped as _).ok() } } #[cfg(feature = "Win32_System_IO")] pub unsafe fn RawWriteCommand(&self, lpbuffer: *mut core::ffi::c_void, nnumberofbytes: u32, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RawWriteCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(lpbuffer), nnumberofbytes, core::mem::transmute(lpoverlapped)).ok() } + unsafe { (windows_core::Interface::vtable(self).RawWriteCommand)(windows_core::Interface::as_raw(self), lpbuffer as _, nnumberofbytes, lpoverlapped as _).ok() } } pub unsafe fn RawDeviceControl(&self, escapefunction: u32, lpindata: *mut core::ffi::c_void, cbindatasize: u32, poutdata: *mut core::ffi::c_void, dwoutdatasize: u32, pdwactualdata: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RawDeviceControl)(windows_core::Interface::as_raw(self), escapefunction, core::mem::transmute(lpindata), cbindatasize, core::mem::transmute(poutdata), dwoutdatasize, core::mem::transmute(pdwactualdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).RawDeviceControl)(windows_core::Interface::as_raw(self), escapefunction, lpindata as _, cbindatasize, poutdata as _, dwoutdatasize, pdwactualdata as _).ok() } } pub unsafe fn GetLastError(&self, lpdwlasterror: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLastError)(windows_core::Interface::as_raw(self), core::mem::transmute(lpdwlasterror)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLastError)(windows_core::Interface::as_raw(self), lpdwlasterror as _).ok() } } pub unsafe fn GetMyDevicePortName(&self, lpszdevicepath: &mut [u16]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetMyDevicePortName)(windows_core::Interface::as_raw(self), core::mem::transmute(lpszdevicepath.as_ptr()), lpszdevicepath.len().try_into().unwrap()).ok() } } pub unsafe fn GetMyDeviceHandle(&self, lph: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMyDeviceHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(lph)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMyDeviceHandle)(windows_core::Interface::as_raw(self), lph as _).ok() } } pub unsafe fn GetMyDeviceOpenMode(&self, pdwopenmode: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMyDeviceOpenMode)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwopenmode)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMyDeviceOpenMode)(windows_core::Interface::as_raw(self), pdwopenmode as _).ok() } } pub unsafe fn WriteToErrorLog(&self, dwmessagetype: u32, pszmessage: P1, dwerrorcode: u32) -> windows_core::Result<()> where @@ -14452,16 +14452,16 @@ impl IStiUSD { } } pub unsafe fn GetStatus(&self, pdevstatus: *mut STI_DEVICE_STATUS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pdevstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), pdevstatus as _).ok() } } pub unsafe fn DeviceReset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DeviceReset)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn Diagnostic(&self, pbuffer: *mut STI_DIAG) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Diagnostic)(windows_core::Interface::as_raw(self), core::mem::transmute(pbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).Diagnostic)(windows_core::Interface::as_raw(self), pbuffer as _).ok() } } pub unsafe fn Escape(&self, escapefunction: u32, lpindata: *const core::ffi::c_void, cbindatasize: u32, poutdata: *mut core::ffi::c_void, cboutdatasize: u32, pdwactualdata: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Escape)(windows_core::Interface::as_raw(self), escapefunction, lpindata, cbindatasize, core::mem::transmute(poutdata), cboutdatasize, core::mem::transmute(pdwactualdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).Escape)(windows_core::Interface::as_raw(self), escapefunction, lpindata, cbindatasize, poutdata as _, cboutdatasize, pdwactualdata as _).ok() } } pub unsafe fn GetLastError(&self) -> windows_core::Result { unsafe { @@ -14477,28 +14477,28 @@ 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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).RawReadData)(windows_core::Interface::as_raw(self), lpbuffer as _, lpdwnumberofbytes as _, lpoverlapped.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).RawWriteData)(windows_core::Interface::as_raw(self), lpbuffer, nnumberofbytes, core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).RawWriteData)(windows_core::Interface::as_raw(self), lpbuffer, nnumberofbytes, lpoverlapped.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).RawReadCommand)(windows_core::Interface::as_raw(self), lpbuffer as _, lpdwnumberofbytes as _, lpoverlapped.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).RawWriteCommand)(windows_core::Interface::as_raw(self), lpbuffer, nnumberofbytes, core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).RawWriteCommand)(windows_core::Interface::as_raw(self), lpbuffer, nnumberofbytes, lpoverlapped.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetNotificationHandle(&self, hevent: Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetNotificationHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(hevent.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetNotificationHandle)(windows_core::Interface::as_raw(self), hevent.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetNotificationData(&self, lpnotify: *mut STINOTIFY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNotificationData)(windows_core::Interface::as_raw(self), core::mem::transmute(lpnotify)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNotificationData)(windows_core::Interface::as_raw(self), lpnotify as _).ok() } } pub unsafe fn GetLastErrorInfo(&self, plasterrorinfo: *mut _ERROR_INFOW) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLastErrorInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(plasterrorinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLastErrorInfo)(windows_core::Interface::as_raw(self), plasterrorinfo as _).ok() } } } #[repr(C)] @@ -14699,13 +14699,13 @@ impl IStillImageW { unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), hinst, dwversion).ok() } } pub unsafe fn GetDeviceList(&self, dwtype: u32, dwflags: u32, pdwitemsreturned: *mut u32, ppbuffer: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeviceList)(windows_core::Interface::as_raw(self), dwtype, dwflags, core::mem::transmute(pdwitemsreturned), core::mem::transmute(ppbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceList)(windows_core::Interface::as_raw(self), dwtype, dwflags, pdwitemsreturned as _, ppbuffer as _).ok() } } pub unsafe fn GetDeviceInfo(&self, pwszdevicename: P0, ppbuffer: *mut *mut core::ffi::c_void) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetDeviceInfo)(windows_core::Interface::as_raw(self), pwszdevicename.param().abi(), core::mem::transmute(ppbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceInfo)(windows_core::Interface::as_raw(self), pwszdevicename.param().abi(), ppbuffer as _).ok() } } pub unsafe fn CreateDevice(&self, pwszdevicename: P0, dwmode: u32, pdevice: *mut Option, punkouter: P3) -> windows_core::Result<()> where @@ -14719,7 +14719,7 @@ impl IStillImageW { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetDeviceValue)(windows_core::Interface::as_raw(self), pwszdevicename.param().abi(), pvaluename.param().abi(), core::mem::transmute(ptype), core::mem::transmute(pdata), core::mem::transmute(cbdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceValue)(windows_core::Interface::as_raw(self), pwszdevicename.param().abi(), pvaluename.param().abi(), ptype as _, pdata as _, cbdata as _).ok() } } pub unsafe fn SetDeviceValue(&self, pwszdevicename: P0, pvaluename: P1, r#type: u32, pdata: &[u8]) -> windows_core::Result<()> where @@ -14729,7 +14729,7 @@ impl IStillImageW { unsafe { (windows_core::Interface::vtable(self).SetDeviceValue)(windows_core::Interface::as_raw(self), pwszdevicename.param().abi(), pvaluename.param().abi(), r#type, core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap()).ok() } } pub unsafe fn GetSTILaunchInformation(&self, pwszdevicename: &mut [u16; 128], pdweventcode: Option<*mut u32>, pwszeventname: &mut [u16; 128]) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetSTILaunchInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszdevicename.as_ptr()), pdweventcode.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pwszeventname.as_ptr())).ok() } } pub unsafe fn RegisterLaunchApplication(&self, pwszappname: P0, pwszcommandline: P1) -> windows_core::Result<()> where @@ -14773,7 +14773,7 @@ impl IStillImageW { unsafe { (windows_core::Interface::vtable(self).LaunchApplicationForDevice)(windows_core::Interface::as_raw(self), pwszdevicename.param().abi(), pwszappname.param().abi(), pstinotify).ok() } } pub unsafe fn SetupDeviceParameters(&self, param0: *mut STI_DEVICE_INFORMATIONW) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetupDeviceParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetupDeviceParameters)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn WriteToErrorLog(&self, dwmessagetype: u32, pszmessage: P1) -> windows_core::Result<()> where diff --git a/crates/libs/windows/src/Windows/Win32/Devices/FunctionDiscovery/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/FunctionDiscovery/mod.rs index dee2942666..de541ba038 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/FunctionDiscovery/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/FunctionDiscovery/mod.rs @@ -108,7 +108,7 @@ impl IFunctionDiscovery { { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateInstanceCollectionQuery)(windows_core::Interface::as_raw(self), pszcategory.param().abi(), pszsubcategory.param().abi(), fincludeallsubcategories.into(), pifunctiondiscoverynotification.param().abi(), core::mem::transmute(pfdqcquerycontext), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateInstanceCollectionQuery)(windows_core::Interface::as_raw(self), pszcategory.param().abi(), pszsubcategory.param().abi(), fincludeallsubcategories.into(), pifunctiondiscoverynotification.param().abi(), pfdqcquerycontext as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn CreateInstanceQuery(&self, pszfunctioninstanceidentity: P0, pifunctiondiscoverynotification: P1, pfdqcquerycontext: *mut u64) -> windows_core::Result @@ -118,7 +118,7 @@ impl IFunctionDiscovery { { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateInstanceQuery)(windows_core::Interface::as_raw(self), pszfunctioninstanceidentity.param().abi(), pifunctiondiscoverynotification.param().abi(), core::mem::transmute(pfdqcquerycontext), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateInstanceQuery)(windows_core::Interface::as_raw(self), pszfunctioninstanceidentity.param().abi(), pifunctiondiscoverynotification.param().abi(), pfdqcquerycontext as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_System_Com")] @@ -628,10 +628,10 @@ windows_core::imp::define_interface!(IFunctionDiscoveryProviderQuery, IFunctionD windows_core::imp::interface_hierarchy!(IFunctionDiscoveryProviderQuery, windows_core::IUnknown); impl IFunctionDiscoveryProviderQuery { pub unsafe fn IsInstanceQuery(&self, pisinstancequery: *mut super::super::Foundation::BOOL, ppszconstraintvalue: *mut *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsInstanceQuery)(windows_core::Interface::as_raw(self), core::mem::transmute(pisinstancequery), core::mem::transmute(ppszconstraintvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsInstanceQuery)(windows_core::Interface::as_raw(self), pisinstancequery as _, ppszconstraintvalue as _).ok() } } pub unsafe fn IsSubcategoryQuery(&self, pissubcategoryquery: *mut super::super::Foundation::BOOL, ppszconstraintvalue: *mut *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsSubcategoryQuery)(windows_core::Interface::as_raw(self), core::mem::transmute(pissubcategoryquery), core::mem::transmute(ppszconstraintvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsSubcategoryQuery)(windows_core::Interface::as_raw(self), pissubcategoryquery as _, ppszconstraintvalue as _).ok() } } pub unsafe fn GetQueryConstraints(&self) -> windows_core::Result { unsafe { @@ -786,7 +786,7 @@ impl IFunctionInstance { } } pub unsafe fn GetCategory(&self, ppszcomemcategory: *mut *mut u16, ppszcomemsubcategory: *mut *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCategory)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszcomemcategory), core::mem::transmute(ppszcomemsubcategory)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCategory)(windows_core::Interface::as_raw(self), ppszcomemcategory as _, ppszcomemsubcategory as _).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -883,7 +883,7 @@ impl IFunctionInstanceCollection { { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).Get)(windows_core::Interface::as_raw(self), pszinstanceidentity.param().abi(), core::mem::transmute(pdwindex), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).Get)(windows_core::Interface::as_raw(self), pszinstanceidentity.param().abi(), pdwindex as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_System_Com")] @@ -1307,7 +1307,7 @@ impl IPropertyStoreCollection { { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).Get)(windows_core::Interface::as_raw(self), pszinstanceidentity.param().abi(), core::mem::transmute(pdwindex), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).Get)(windows_core::Interface::as_raw(self), pszinstanceidentity.param().abi(), pdwindex as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] @@ -1475,7 +1475,7 @@ impl IProviderProperties { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetAt)(windows_core::Interface::as_raw(self), pifunctioninstance.param().abi(), iproviderinstancecontext, dwindex, core::mem::transmute(pkey)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAt)(windows_core::Interface::as_raw(self), pifunctioninstance.param().abi(), iproviderinstancecontext, dwindex, pkey as _).ok() } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn GetValue(&self, pifunctioninstance: P0, iproviderinstancecontext: isize, key: *const super::super::Foundation::PROPERTYKEY) -> windows_core::Result @@ -1586,15 +1586,15 @@ impl IProviderPropertyConstraintCollection { } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn Get(&self, key: *const super::super::Foundation::PROPERTYKEY, ppropvar: *mut super::super::System::Com::StructuredStorage::PROPVARIANT, pdwpropertyconstraint: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Get)(windows_core::Interface::as_raw(self), key, core::mem::transmute(ppropvar), core::mem::transmute(pdwpropertyconstraint)).ok() } + unsafe { (windows_core::Interface::vtable(self).Get)(windows_core::Interface::as_raw(self), key, core::mem::transmute(ppropvar), pdwpropertyconstraint as _).ok() } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn Item(&self, dwindex: u32, pkey: *mut super::super::Foundation::PROPERTYKEY, ppropvar: *mut super::super::System::Com::StructuredStorage::PROPVARIANT, pdwpropertyconstraint: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Item)(windows_core::Interface::as_raw(self), dwindex, core::mem::transmute(pkey), core::mem::transmute(ppropvar), core::mem::transmute(pdwpropertyconstraint)).ok() } + unsafe { (windows_core::Interface::vtable(self).Item)(windows_core::Interface::as_raw(self), dwindex, pkey as _, core::mem::transmute(ppropvar), pdwpropertyconstraint as _).ok() } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn Next(&self, pkey: *mut super::super::Foundation::PROPERTYKEY, ppropvar: *mut super::super::System::Com::StructuredStorage::PROPVARIANT, pdwpropertyconstraint: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), core::mem::transmute(pkey), core::mem::transmute(ppropvar), core::mem::transmute(pdwpropertyconstraint)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pkey as _, core::mem::transmute(ppropvar), pdwpropertyconstraint as _).ok() } } pub unsafe fn Skip(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self)).ok() } @@ -1780,10 +1780,10 @@ impl IProviderQueryConstraintCollection { } } pub unsafe fn Item(&self, dwindex: u32, ppszconstraintname: *mut *mut u16, ppszconstraintvalue: *mut *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Item)(windows_core::Interface::as_raw(self), dwindex, core::mem::transmute(ppszconstraintname), core::mem::transmute(ppszconstraintvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).Item)(windows_core::Interface::as_raw(self), dwindex, ppszconstraintname as _, ppszconstraintvalue as _).ok() } } pub unsafe fn Next(&self, ppszconstraintname: *mut *mut u16, ppszconstraintvalue: *mut *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszconstraintname), core::mem::transmute(ppszconstraintvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppszconstraintname as _, ppszconstraintvalue as _).ok() } } pub unsafe fn Skip(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self)).ok() } 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 010716a442..5591d95724 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Geolocation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Geolocation/mod.rs @@ -1903,7 +1903,7 @@ impl ILocation { unsafe { (windows_core::Interface::vtable(self).SetDesiredAccuracy)(windows_core::Interface::as_raw(self), reporttype, desiredaccuracy).ok() } } pub unsafe fn RequestPermissions(&self, hparent: Option, preporttypes: &[windows_core::GUID], fmodal: bool) -> windows_core::Result<()> { - unsafe { (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.into()).ok() } + unsafe { (windows_core::Interface::vtable(self).RequestPermissions)(windows_core::Interface::as_raw(self), hparent.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(preporttypes.as_ptr()), preporttypes.len().try_into().unwrap(), fmodal.into()).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 f9d1d3425e..05821fb6a6 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/HumanInterfaceDevice/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/HumanInterfaceDevice/mod.rs @@ -4,7 +4,7 @@ where 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); - unsafe { DirectInput8Create(hinst, dwversion, riidltf, core::mem::transmute(ppvout), punkouter.param().abi()).ok() } + unsafe { DirectInput8Create(hinst, dwversion, riidltf, ppvout as _, punkouter.param().abi()).ok() } } #[inline] pub unsafe fn HidD_FlushQueue(hiddeviceobject: super::super::Foundation::HANDLE) -> bool { @@ -19,17 +19,17 @@ pub unsafe fn HidD_FreePreparsedData(preparseddata: PHIDP_PREPARSED_DATA) -> boo #[inline] pub unsafe fn HidD_GetAttributes(hiddeviceobject: super::super::Foundation::HANDLE, attributes: *mut HIDD_ATTRIBUTES) -> bool { windows_targets::link!("hid.dll" "system" fn HidD_GetAttributes(hiddeviceobject : super::super::Foundation:: HANDLE, attributes : *mut HIDD_ATTRIBUTES) -> bool); - unsafe { HidD_GetAttributes(hiddeviceobject, core::mem::transmute(attributes)) } + unsafe { HidD_GetAttributes(hiddeviceobject, attributes as _) } } #[inline] pub unsafe fn HidD_GetConfiguration(hiddeviceobject: super::super::Foundation::HANDLE, configuration: *mut HIDD_CONFIGURATION, configurationlength: u32) -> bool { windows_targets::link!("hid.dll" "system" fn HidD_GetConfiguration(hiddeviceobject : super::super::Foundation:: HANDLE, configuration : *mut HIDD_CONFIGURATION, configurationlength : u32) -> bool); - unsafe { HidD_GetConfiguration(hiddeviceobject, core::mem::transmute(configuration), configurationlength) } + unsafe { HidD_GetConfiguration(hiddeviceobject, configuration as _, configurationlength) } } #[inline] pub unsafe fn HidD_GetFeature(hiddeviceobject: super::super::Foundation::HANDLE, reportbuffer: *mut core::ffi::c_void, reportbufferlength: u32) -> bool { windows_targets::link!("hid.dll" "system" fn HidD_GetFeature(hiddeviceobject : super::super::Foundation:: HANDLE, reportbuffer : *mut core::ffi::c_void, reportbufferlength : u32) -> bool); - unsafe { HidD_GetFeature(hiddeviceobject, core::mem::transmute(reportbuffer), reportbufferlength) } + unsafe { HidD_GetFeature(hiddeviceobject, reportbuffer as _, reportbufferlength) } } #[inline] pub unsafe fn HidD_GetHidGuid() -> windows_core::GUID { @@ -43,47 +43,47 @@ pub unsafe fn HidD_GetHidGuid() -> windows_core::GUID { #[inline] pub unsafe fn HidD_GetIndexedString(hiddeviceobject: super::super::Foundation::HANDLE, stringindex: u32, buffer: *mut core::ffi::c_void, bufferlength: u32) -> bool { windows_targets::link!("hid.dll" "system" fn HidD_GetIndexedString(hiddeviceobject : super::super::Foundation:: HANDLE, stringindex : u32, buffer : *mut core::ffi::c_void, bufferlength : u32) -> bool); - unsafe { HidD_GetIndexedString(hiddeviceobject, stringindex, core::mem::transmute(buffer), bufferlength) } + unsafe { HidD_GetIndexedString(hiddeviceobject, stringindex, buffer as _, bufferlength) } } #[inline] pub unsafe fn HidD_GetInputReport(hiddeviceobject: super::super::Foundation::HANDLE, reportbuffer: *mut core::ffi::c_void, reportbufferlength: u32) -> bool { windows_targets::link!("hid.dll" "system" fn HidD_GetInputReport(hiddeviceobject : super::super::Foundation:: HANDLE, reportbuffer : *mut core::ffi::c_void, reportbufferlength : u32) -> bool); - unsafe { HidD_GetInputReport(hiddeviceobject, core::mem::transmute(reportbuffer), reportbufferlength) } + unsafe { HidD_GetInputReport(hiddeviceobject, reportbuffer as _, reportbufferlength) } } #[inline] pub unsafe fn HidD_GetManufacturerString(hiddeviceobject: super::super::Foundation::HANDLE, buffer: *mut core::ffi::c_void, bufferlength: u32) -> bool { windows_targets::link!("hid.dll" "system" fn HidD_GetManufacturerString(hiddeviceobject : super::super::Foundation:: HANDLE, buffer : *mut core::ffi::c_void, bufferlength : u32) -> bool); - unsafe { HidD_GetManufacturerString(hiddeviceobject, core::mem::transmute(buffer), bufferlength) } + unsafe { HidD_GetManufacturerString(hiddeviceobject, buffer as _, bufferlength) } } #[inline] pub unsafe fn HidD_GetMsGenreDescriptor(hiddeviceobject: super::super::Foundation::HANDLE, buffer: *mut core::ffi::c_void, bufferlength: u32) -> bool { windows_targets::link!("hid.dll" "system" fn HidD_GetMsGenreDescriptor(hiddeviceobject : super::super::Foundation:: HANDLE, buffer : *mut core::ffi::c_void, bufferlength : u32) -> bool); - unsafe { HidD_GetMsGenreDescriptor(hiddeviceobject, core::mem::transmute(buffer), bufferlength) } + unsafe { HidD_GetMsGenreDescriptor(hiddeviceobject, buffer as _, bufferlength) } } #[inline] pub unsafe fn HidD_GetNumInputBuffers(hiddeviceobject: super::super::Foundation::HANDLE, numberbuffers: *mut u32) -> bool { windows_targets::link!("hid.dll" "system" fn HidD_GetNumInputBuffers(hiddeviceobject : super::super::Foundation:: HANDLE, numberbuffers : *mut u32) -> bool); - unsafe { HidD_GetNumInputBuffers(hiddeviceobject, core::mem::transmute(numberbuffers)) } + unsafe { HidD_GetNumInputBuffers(hiddeviceobject, numberbuffers as _) } } #[inline] pub unsafe fn HidD_GetPhysicalDescriptor(hiddeviceobject: super::super::Foundation::HANDLE, buffer: *mut core::ffi::c_void, bufferlength: u32) -> bool { windows_targets::link!("hid.dll" "system" fn HidD_GetPhysicalDescriptor(hiddeviceobject : super::super::Foundation:: HANDLE, buffer : *mut core::ffi::c_void, bufferlength : u32) -> bool); - unsafe { HidD_GetPhysicalDescriptor(hiddeviceobject, core::mem::transmute(buffer), bufferlength) } + unsafe { HidD_GetPhysicalDescriptor(hiddeviceobject, buffer as _, bufferlength) } } #[inline] pub unsafe fn HidD_GetPreparsedData(hiddeviceobject: super::super::Foundation::HANDLE, preparseddata: *mut PHIDP_PREPARSED_DATA) -> bool { windows_targets::link!("hid.dll" "system" fn HidD_GetPreparsedData(hiddeviceobject : super::super::Foundation:: HANDLE, preparseddata : *mut PHIDP_PREPARSED_DATA) -> bool); - unsafe { HidD_GetPreparsedData(hiddeviceobject, core::mem::transmute(preparseddata)) } + unsafe { HidD_GetPreparsedData(hiddeviceobject, preparseddata as _) } } #[inline] pub unsafe fn HidD_GetProductString(hiddeviceobject: super::super::Foundation::HANDLE, buffer: *mut core::ffi::c_void, bufferlength: u32) -> bool { windows_targets::link!("hid.dll" "system" fn HidD_GetProductString(hiddeviceobject : super::super::Foundation:: HANDLE, buffer : *mut core::ffi::c_void, bufferlength : u32) -> bool); - unsafe { HidD_GetProductString(hiddeviceobject, core::mem::transmute(buffer), bufferlength) } + unsafe { HidD_GetProductString(hiddeviceobject, buffer as _, bufferlength) } } #[inline] pub unsafe fn HidD_GetSerialNumberString(hiddeviceobject: super::super::Foundation::HANDLE, buffer: *mut core::ffi::c_void, bufferlength: u32) -> bool { windows_targets::link!("hid.dll" "system" fn HidD_GetSerialNumberString(hiddeviceobject : super::super::Foundation:: HANDLE, buffer : *mut core::ffi::c_void, bufferlength : u32) -> bool); - unsafe { HidD_GetSerialNumberString(hiddeviceobject, core::mem::transmute(buffer), bufferlength) } + unsafe { HidD_GetSerialNumberString(hiddeviceobject, buffer as _, bufferlength) } } #[inline] pub unsafe fn HidD_SetConfiguration(hiddeviceobject: super::super::Foundation::HANDLE, configuration: *const HIDD_CONFIGURATION, configurationlength: u32) -> bool { @@ -108,72 +108,72 @@ pub unsafe fn HidD_SetOutputReport(hiddeviceobject: super::super::Foundation::HA #[inline] 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); - unsafe { HidP_GetButtonArray(reporttype, usagepage, core::mem::transmute(linkcollection.unwrap_or(core::mem::zeroed())), usage, core::mem::transmute(buttondata), core::mem::transmute(buttondatalength), preparseddata, core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } + unsafe { HidP_GetButtonArray(reporttype, usagepage, linkcollection.unwrap_or(core::mem::zeroed()) as _, usage, buttondata as _, buttondatalength as _, 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: 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); - unsafe { HidP_GetButtonCaps(reporttype, core::mem::transmute(buttoncaps), core::mem::transmute(buttoncapslength), preparseddata) } + unsafe { HidP_GetButtonCaps(reporttype, buttoncaps as _, buttoncapslength as _, preparseddata) } } #[inline] 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); - unsafe { HidP_GetCaps(preparseddata, core::mem::transmute(capabilities)) } + unsafe { HidP_GetCaps(preparseddata, capabilities as _) } } #[inline] 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); - unsafe { HidP_GetData(reporttype, core::mem::transmute(datalist), core::mem::transmute(datalength), preparseddata, core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } + unsafe { HidP_GetData(reporttype, datalist as _, datalength as _, 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: 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); - unsafe { HidP_GetExtendedAttributes(reporttype, dataindex, preparseddata, core::mem::transmute(attributes), core::mem::transmute(lengthattributes)) } + unsafe { HidP_GetExtendedAttributes(reporttype, dataindex, preparseddata, attributes as _, lengthattributes as _) } } #[inline] 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); - unsafe { HidP_GetLinkCollectionNodes(core::mem::transmute(linkcollectionnodes), core::mem::transmute(linkcollectionnodeslength), preparseddata) } + unsafe { HidP_GetLinkCollectionNodes(linkcollectionnodes as _, linkcollectionnodeslength as _, preparseddata) } } #[inline] 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); - unsafe { HidP_GetScaledUsageValue(reporttype, usagepage, core::mem::transmute(linkcollection.unwrap_or(core::mem::zeroed())), usage, core::mem::transmute(usagevalue), preparseddata, core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } + unsafe { HidP_GetScaledUsageValue(reporttype, usagepage, linkcollection.unwrap_or(core::mem::zeroed()) as _, usage, usagevalue as _, preparseddata, core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } } #[inline] 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); - unsafe { HidP_GetSpecificButtonCaps(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), preparseddata) } + unsafe { HidP_GetSpecificButtonCaps(reporttype, usagepage.unwrap_or(core::mem::zeroed()) as _, linkcollection.unwrap_or(core::mem::zeroed()) as _, usage.unwrap_or(core::mem::zeroed()) as _, buttoncaps as _, buttoncapslength as _, preparseddata) } } #[inline] 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); - unsafe { HidP_GetSpecificValueCaps(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), preparseddata) } + unsafe { HidP_GetSpecificValueCaps(reporttype, usagepage.unwrap_or(core::mem::zeroed()) as _, linkcollection.unwrap_or(core::mem::zeroed()) as _, usage.unwrap_or(core::mem::zeroed()) as _, valuecaps as _, valuecapslength as _, preparseddata) } } #[inline] 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); - unsafe { HidP_GetUsageValue(reporttype, usagepage, core::mem::transmute(linkcollection.unwrap_or(core::mem::zeroed())), usage, core::mem::transmute(usagevalue), preparseddata, core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } + unsafe { HidP_GetUsageValue(reporttype, usagepage, linkcollection.unwrap_or(core::mem::zeroed()) as _, usage, usagevalue as _, 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: 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); - unsafe { HidP_GetUsageValueArray(reporttype, usagepage, core::mem::transmute(linkcollection.unwrap_or(core::mem::zeroed())), usage, core::mem::transmute(usagevalue.as_ptr()), usagevalue.len().try_into().unwrap(), preparseddata, core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } + unsafe { HidP_GetUsageValueArray(reporttype, usagepage, linkcollection.unwrap_or(core::mem::zeroed()) as _, usage, core::mem::transmute(usagevalue.as_ptr()), usagevalue.len().try_into().unwrap(), 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: 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); - unsafe { HidP_GetUsages(reporttype, usagepage, core::mem::transmute(linkcollection.unwrap_or(core::mem::zeroed())), core::mem::transmute(usagelist), core::mem::transmute(usagelength), preparseddata, core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } + unsafe { HidP_GetUsages(reporttype, usagepage, linkcollection.unwrap_or(core::mem::zeroed()) as _, usagelist as _, usagelength as _, preparseddata, core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } } #[inline] 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); - unsafe { HidP_GetUsagesEx(reporttype, core::mem::transmute(linkcollection.unwrap_or(core::mem::zeroed())), core::mem::transmute(buttonlist), core::mem::transmute(usagelength), preparseddata, core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } + unsafe { HidP_GetUsagesEx(reporttype, linkcollection.unwrap_or(core::mem::zeroed()) as _, buttonlist as _, usagelength as _, 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: 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); - unsafe { HidP_GetValueCaps(reporttype, core::mem::transmute(valuecaps), core::mem::transmute(valuecapslength), preparseddata) } + unsafe { HidP_GetValueCaps(reporttype, valuecaps as _, valuecapslength as _, preparseddata) } } #[inline] pub unsafe fn HidP_InitializeReportForID(reporttype: HIDP_REPORT_TYPE, reportid: u8, preparseddata: PHIDP_PREPARSED_DATA, report: &mut [u8]) -> super::super::Foundation::NTSTATUS { @@ -188,52 +188,52 @@ pub unsafe fn HidP_MaxDataListLength(reporttype: HIDP_REPORT_TYPE, preparseddata #[inline] 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); - unsafe { HidP_MaxUsageListLength(reporttype, core::mem::transmute(usagepage.unwrap_or(core::mem::zeroed())), preparseddata) } + unsafe { HidP_MaxUsageListLength(reporttype, usagepage.unwrap_or(core::mem::zeroed()) as _, preparseddata) } } #[inline] 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); - unsafe { HidP_SetButtonArray(reporttype, usagepage, core::mem::transmute(linkcollection.unwrap_or(core::mem::zeroed())), usage, core::mem::transmute(buttondata.as_ptr()), buttondata.len().try_into().unwrap(), preparseddata, core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } + unsafe { HidP_SetButtonArray(reporttype, usagepage, linkcollection.unwrap_or(core::mem::zeroed()) as _, usage, core::mem::transmute(buttondata.as_ptr()), buttondata.len().try_into().unwrap(), 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: 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); - unsafe { HidP_SetData(reporttype, core::mem::transmute(datalist), core::mem::transmute(datalength), preparseddata, core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } + unsafe { HidP_SetData(reporttype, datalist as _, datalength as _, 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: 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); - unsafe { HidP_SetScaledUsageValue(reporttype, usagepage, core::mem::transmute(linkcollection.unwrap_or(core::mem::zeroed())), usage, usagevalue, preparseddata, core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } + unsafe { HidP_SetScaledUsageValue(reporttype, usagepage, linkcollection.unwrap_or(core::mem::zeroed()) as _, usage, usagevalue, 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: 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); - unsafe { HidP_SetUsageValue(reporttype, usagepage, core::mem::transmute(linkcollection.unwrap_or(core::mem::zeroed())), usage, usagevalue, preparseddata, core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } + unsafe { HidP_SetUsageValue(reporttype, usagepage, linkcollection.unwrap_or(core::mem::zeroed()) as _, usage, usagevalue, 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: 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); - unsafe { HidP_SetUsageValueArray(reporttype, usagepage, core::mem::transmute(linkcollection.unwrap_or(core::mem::zeroed())), usage, core::mem::transmute(usagevalue.as_ptr()), usagevalue.len().try_into().unwrap(), preparseddata, core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } + unsafe { HidP_SetUsageValueArray(reporttype, usagepage, linkcollection.unwrap_or(core::mem::zeroed()) as _, usage, core::mem::transmute(usagevalue.as_ptr()), usagevalue.len().try_into().unwrap(), 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: 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); - unsafe { HidP_SetUsages(reporttype, usagepage, core::mem::transmute(linkcollection.unwrap_or(core::mem::zeroed())), core::mem::transmute(usagelist), core::mem::transmute(usagelength), preparseddata, core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } + unsafe { HidP_SetUsages(reporttype, usagepage, linkcollection.unwrap_or(core::mem::zeroed()) as _, usagelist as _, usagelength as _, 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); - unsafe { HidP_TranslateUsagesToI8042ScanCodes(core::mem::transmute(changedusagelist.as_ptr()), changedusagelist.len().try_into().unwrap(), keyaction, core::mem::transmute(modifierstate), insertcodesprocedure, core::mem::transmute(insertcodescontext.unwrap_or(core::mem::zeroed()))) } + unsafe { HidP_TranslateUsagesToI8042ScanCodes(core::mem::transmute(changedusagelist.as_ptr()), changedusagelist.len().try_into().unwrap(), keyaction, modifierstate as _, insertcodesprocedure, insertcodescontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { HidP_UnsetUsages(reporttype, usagepage, core::mem::transmute(linkcollection.unwrap_or(core::mem::zeroed())), core::mem::transmute(usagelist), core::mem::transmute(usagelength), preparseddata, core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } + unsafe { HidP_UnsetUsages(reporttype, usagepage, linkcollection.unwrap_or(core::mem::zeroed()) as _, usagelist as _, usagelength as _, 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 { windows_targets::link!("hid.dll" "system" fn HidP_UsageListDifference(previoususagelist : *const u16, currentusagelist : *const u16, breakusagelist : *mut u16, makeusagelist : *mut u16, usagelistlength : u32) -> super::super::Foundation:: NTSTATUS); - unsafe { HidP_UsageListDifference(previoususagelist, currentusagelist, core::mem::transmute(breakusagelist), core::mem::transmute(makeusagelist), usagelistlength) } + unsafe { HidP_UsageListDifference(previoususagelist, currentusagelist, breakusagelist as _, makeusagelist as _, usagelistlength) } } #[inline] pub unsafe fn joyConfigChanged(dwflags: u32) -> u32 { @@ -4001,7 +4001,7 @@ impl IDirectInput2A { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindDevice)(windows_core::Interface::as_raw(self), param0, param1.param().abi(), core::mem::transmute(param2)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindDevice)(windows_core::Interface::as_raw(self), param0, param1.param().abi(), param2 as _).ok() } } } #[repr(C)] @@ -4040,7 +4040,7 @@ impl IDirectInput2W { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindDevice)(windows_core::Interface::as_raw(self), param0, param1.param().abi(), core::mem::transmute(param2)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindDevice)(windows_core::Interface::as_raw(self), param0, param1.param().abi(), param2 as _).ok() } } } #[repr(C)] @@ -4079,7 +4079,7 @@ impl IDirectInput7A { where P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateDeviceEx)(windows_core::Interface::as_raw(self), param0, param1, core::mem::transmute(param2), param3.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateDeviceEx)(windows_core::Interface::as_raw(self), param0, param1, param2 as _, param3.param().abi()).ok() } } } #[repr(C)] @@ -4118,7 +4118,7 @@ impl IDirectInput7W { where P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateDeviceEx)(windows_core::Interface::as_raw(self), param0, param1, core::mem::transmute(param2), param3.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateDeviceEx)(windows_core::Interface::as_raw(self), param0, param1, param2 as _, param3.param().abi()).ok() } } } #[repr(C)] @@ -4154,7 +4154,7 @@ impl IDirectInput8A { unsafe { (windows_core::Interface::vtable(self).CreateDevice)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), param2.param().abi()).ok() } } pub unsafe fn EnumDevices(&self, param0: u32, param1: LPDIENUMDEVICESCALLBACKA, param2: *mut core::ffi::c_void, param3: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumDevices)(windows_core::Interface::as_raw(self), param0, param1, core::mem::transmute(param2), param3).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumDevices)(windows_core::Interface::as_raw(self), param0, param1, param2 as _, param3).ok() } } pub unsafe fn GetDeviceStatus(&self, param0: *const windows_core::GUID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetDeviceStatus)(windows_core::Interface::as_raw(self), param0).ok() } @@ -4169,16 +4169,16 @@ impl IDirectInput8A { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindDevice)(windows_core::Interface::as_raw(self), param0, param1.param().abi(), core::mem::transmute(param2)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindDevice)(windows_core::Interface::as_raw(self), param0, param1.param().abi(), param2 as _).ok() } } pub unsafe fn EnumDevicesBySemantics(&self, param0: P0, param1: *mut DIACTIONFORMATA, param2: LPDIENUMDEVICESBYSEMANTICSCBA, param3: *mut core::ffi::c_void, param4: u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EnumDevicesBySemantics)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1), param2, core::mem::transmute(param3), param4).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumDevicesBySemantics)(windows_core::Interface::as_raw(self), param0.param().abi(), param1 as _, param2, param3 as _, param4).ok() } } pub unsafe fn ConfigureDevices(&self, param0: LPDICONFIGUREDEVICESCALLBACK, param1: *mut DICONFIGUREDEVICESPARAMSA, param2: u32, param3: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ConfigureDevices)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), param2, core::mem::transmute(param3)).ok() } + unsafe { (windows_core::Interface::vtable(self).ConfigureDevices)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), param2, param3 as _).ok() } } } #[repr(C)] @@ -4280,7 +4280,7 @@ impl IDirectInput8W { unsafe { (windows_core::Interface::vtable(self).CreateDevice)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), param2.param().abi()).ok() } } pub unsafe fn EnumDevices(&self, param0: u32, param1: LPDIENUMDEVICESCALLBACKW, param2: *mut core::ffi::c_void, param3: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumDevices)(windows_core::Interface::as_raw(self), param0, param1, core::mem::transmute(param2), param3).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumDevices)(windows_core::Interface::as_raw(self), param0, param1, param2 as _, param3).ok() } } pub unsafe fn GetDeviceStatus(&self, param0: *const windows_core::GUID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetDeviceStatus)(windows_core::Interface::as_raw(self), param0).ok() } @@ -4295,16 +4295,16 @@ impl IDirectInput8W { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindDevice)(windows_core::Interface::as_raw(self), param0, param1.param().abi(), core::mem::transmute(param2)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindDevice)(windows_core::Interface::as_raw(self), param0, param1.param().abi(), param2 as _).ok() } } pub unsafe fn EnumDevicesBySemantics(&self, param0: P0, param1: *mut DIACTIONFORMATW, param2: LPDIENUMDEVICESBYSEMANTICSCBW, param3: *mut core::ffi::c_void, param4: u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EnumDevicesBySemantics)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1), param2, core::mem::transmute(param3), param4).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumDevicesBySemantics)(windows_core::Interface::as_raw(self), param0.param().abi(), param1 as _, param2, param3 as _, param4).ok() } } pub unsafe fn ConfigureDevices(&self, param0: LPDICONFIGUREDEVICESCALLBACK, param1: *mut DICONFIGUREDEVICESPARAMSW, param2: u32, param3: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ConfigureDevices)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), param2, core::mem::transmute(param3)).ok() } + unsafe { (windows_core::Interface::vtable(self).ConfigureDevices)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), param2, param3 as _).ok() } } } #[repr(C)] @@ -4406,7 +4406,7 @@ impl IDirectInputA { unsafe { (windows_core::Interface::vtable(self).CreateDevice)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), param2.param().abi()).ok() } } pub unsafe fn EnumDevices(&self, param0: u32, param1: LPDIENUMDEVICESCALLBACKA, param2: *mut core::ffi::c_void, param3: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumDevices)(windows_core::Interface::as_raw(self), param0, param1, core::mem::transmute(param2), param3).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumDevices)(windows_core::Interface::as_raw(self), param0, param1, param2 as _, param3).ok() } } pub unsafe fn GetDeviceStatus(&self, param0: *const windows_core::GUID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetDeviceStatus)(windows_core::Interface::as_raw(self), param0).ok() } @@ -4493,31 +4493,31 @@ impl IDirectInputDevice2A { where P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateEffect)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), core::mem::transmute(param2), param3.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateEffect)(windows_core::Interface::as_raw(self), param0, param1 as _, core::mem::transmute(param2), param3.param().abi()).ok() } } pub unsafe fn EnumEffects(&self, param0: LPDIENUMEFFECTSCALLBACKA, param1: *mut core::ffi::c_void, param2: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumEffects)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), param2).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumEffects)(windows_core::Interface::as_raw(self), param0, param1 as _, param2).ok() } } pub unsafe fn GetEffectInfo(&self, param0: *mut DIEFFECTINFOA, param1: *const windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEffectInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEffectInfo)(windows_core::Interface::as_raw(self), param0 as _, param1).ok() } } pub unsafe fn GetForceFeedbackState(&self, param0: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetForceFeedbackState)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetForceFeedbackState)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn SendForceFeedbackCommand(&self, param0: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SendForceFeedbackCommand)(windows_core::Interface::as_raw(self), param0).ok() } } pub unsafe fn EnumCreatedEffectObjects(&self, param0: LPDIENUMCREATEDEFFECTOBJECTSCALLBACK, param1: *mut core::ffi::c_void, param2: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumCreatedEffectObjects)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), param2).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumCreatedEffectObjects)(windows_core::Interface::as_raw(self), param0, param1 as _, param2).ok() } } pub unsafe fn Escape(&self, param0: *mut DIEFFESCAPE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Escape)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).Escape)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn Poll(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Poll)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn SendDeviceData(&self, param0: u32, param1: *mut DIDEVICEOBJECTDATA, param2: *mut u32, param3: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SendDeviceData)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), core::mem::transmute(param2), param3).ok() } + unsafe { (windows_core::Interface::vtable(self).SendDeviceData)(windows_core::Interface::as_raw(self), param0, param1 as _, param2 as _, param3).ok() } } } #[repr(C)] @@ -4631,31 +4631,31 @@ impl IDirectInputDevice2W { where P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateEffect)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), core::mem::transmute(param2), param3.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateEffect)(windows_core::Interface::as_raw(self), param0, param1 as _, core::mem::transmute(param2), param3.param().abi()).ok() } } pub unsafe fn EnumEffects(&self, param0: LPDIENUMEFFECTSCALLBACKW, param1: *mut core::ffi::c_void, param2: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumEffects)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), param2).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumEffects)(windows_core::Interface::as_raw(self), param0, param1 as _, param2).ok() } } pub unsafe fn GetEffectInfo(&self, param0: *mut DIEFFECTINFOW, param1: *const windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEffectInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEffectInfo)(windows_core::Interface::as_raw(self), param0 as _, param1).ok() } } pub unsafe fn GetForceFeedbackState(&self, param0: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetForceFeedbackState)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetForceFeedbackState)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn SendForceFeedbackCommand(&self, param0: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SendForceFeedbackCommand)(windows_core::Interface::as_raw(self), param0).ok() } } pub unsafe fn EnumCreatedEffectObjects(&self, param0: LPDIENUMCREATEDEFFECTOBJECTSCALLBACK, param1: *mut core::ffi::c_void, param2: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumCreatedEffectObjects)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), param2).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumCreatedEffectObjects)(windows_core::Interface::as_raw(self), param0, param1 as _, param2).ok() } } pub unsafe fn Escape(&self, param0: *mut DIEFFESCAPE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Escape)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).Escape)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn Poll(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Poll)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn SendDeviceData(&self, param0: u32, param1: *mut DIDEVICEOBJECTDATA, param2: *mut u32, param3: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SendDeviceData)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), core::mem::transmute(param2), param3).ok() } + unsafe { (windows_core::Interface::vtable(self).SendDeviceData)(windows_core::Interface::as_raw(self), param0, param1 as _, param2 as _, param3).ok() } } } #[repr(C)] @@ -4769,13 +4769,13 @@ impl IDirectInputDevice7A { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EnumEffectsInFile)(windows_core::Interface::as_raw(self), param0.param().abi(), param1, core::mem::transmute(param2), param3).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumEffectsInFile)(windows_core::Interface::as_raw(self), param0.param().abi(), param1, param2 as _, param3).ok() } } pub unsafe fn WriteEffectToFile(&self, param0: P0, param1: u32, param2: *mut DIFILEEFFECT, param3: u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).WriteEffectToFile)(windows_core::Interface::as_raw(self), param0.param().abi(), param1, core::mem::transmute(param2), param3).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteEffectToFile)(windows_core::Interface::as_raw(self), param0.param().abi(), param1, param2 as _, param3).ok() } } } #[repr(C)] @@ -4826,13 +4826,13 @@ impl IDirectInputDevice7W { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EnumEffectsInFile)(windows_core::Interface::as_raw(self), param0.param().abi(), param1, core::mem::transmute(param2), param3).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumEffectsInFile)(windows_core::Interface::as_raw(self), param0.param().abi(), param1, param2 as _, param3).ok() } } pub unsafe fn WriteEffectToFile(&self, param0: P0, param1: u32, param2: *mut DIFILEEFFECT, param3: u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).WriteEffectToFile)(windows_core::Interface::as_raw(self), param0.param().abi(), param1, core::mem::transmute(param2), param3).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteEffectToFile)(windows_core::Interface::as_raw(self), param0.param().abi(), param1, param2 as _, param3).ok() } } } #[repr(C)] @@ -4874,16 +4874,16 @@ windows_core::imp::define_interface!(IDirectInputDevice8A, IDirectInputDevice8A_ windows_core::imp::interface_hierarchy!(IDirectInputDevice8A, windows_core::IUnknown); impl IDirectInputDevice8A { pub unsafe fn GetCapabilities(&self, param0: *mut DIDEVCAPS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCapabilities)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCapabilities)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn EnumObjects(&self, param0: LPDIENUMDEVICEOBJECTSCALLBACKA, param1: *mut core::ffi::c_void, param2: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumObjects)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), param2).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumObjects)(windows_core::Interface::as_raw(self), param0, param1 as _, param2).ok() } } pub unsafe fn GetProperty(&self, param0: *const windows_core::GUID, param1: *mut DIPROPHEADER) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), param0, param1 as _).ok() } } pub unsafe fn SetProperty(&self, param0: *const windows_core::GUID, param1: *mut DIPROPHEADER) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetProperty)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetProperty)(windows_core::Interface::as_raw(self), param0, param1 as _).ok() } } pub unsafe fn Acquire(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Acquire)(windows_core::Interface::as_raw(self)).ok() } @@ -4892,13 +4892,13 @@ impl IDirectInputDevice8A { unsafe { (windows_core::Interface::vtable(self).Unacquire)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetDeviceState(&self, param0: u32, param1: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeviceState)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceState)(windows_core::Interface::as_raw(self), param0, param1 as _).ok() } } pub unsafe fn GetDeviceData(&self, param0: u32, param1: *mut DIDEVICEOBJECTDATA, param2: *mut u32, param3: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeviceData)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), core::mem::transmute(param2), param3).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceData)(windows_core::Interface::as_raw(self), param0, param1 as _, param2 as _, param3).ok() } } pub unsafe fn SetDataFormat(&self, param0: *mut DIDATAFORMAT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetDataFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetDataFormat)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn SetEventNotification(&self, param0: super::super::Foundation::HANDLE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetEventNotification)(windows_core::Interface::as_raw(self), param0).ok() } @@ -4907,10 +4907,10 @@ impl IDirectInputDevice8A { unsafe { (windows_core::Interface::vtable(self).SetCooperativeLevel)(windows_core::Interface::as_raw(self), param0, param1).ok() } } pub unsafe fn GetObjectInfo(&self, param0: *mut DIDEVICEOBJECTINSTANCEA, param1: u32, param2: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetObjectInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1, param2).ok() } + unsafe { (windows_core::Interface::vtable(self).GetObjectInfo)(windows_core::Interface::as_raw(self), param0 as _, param1, param2).ok() } } pub unsafe fn GetDeviceInfo(&self, param0: *mut DIDEVICEINSTANCEA) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeviceInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceInfo)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn RunControlPanel(&self, param0: super::super::Foundation::HWND, param1: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RunControlPanel)(windows_core::Interface::as_raw(self), param0, param1).ok() } @@ -4922,58 +4922,58 @@ impl IDirectInputDevice8A { where P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateEffect)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), core::mem::transmute(param2), param3.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateEffect)(windows_core::Interface::as_raw(self), param0, param1 as _, core::mem::transmute(param2), param3.param().abi()).ok() } } pub unsafe fn EnumEffects(&self, param0: LPDIENUMEFFECTSCALLBACKA, param1: *mut core::ffi::c_void, param2: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumEffects)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), param2).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumEffects)(windows_core::Interface::as_raw(self), param0, param1 as _, param2).ok() } } pub unsafe fn GetEffectInfo(&self, param0: *mut DIEFFECTINFOA, param1: *const windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEffectInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEffectInfo)(windows_core::Interface::as_raw(self), param0 as _, param1).ok() } } pub unsafe fn GetForceFeedbackState(&self, param0: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetForceFeedbackState)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetForceFeedbackState)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn SendForceFeedbackCommand(&self, param0: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SendForceFeedbackCommand)(windows_core::Interface::as_raw(self), param0).ok() } } pub unsafe fn EnumCreatedEffectObjects(&self, param0: LPDIENUMCREATEDEFFECTOBJECTSCALLBACK, param1: *mut core::ffi::c_void, param2: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumCreatedEffectObjects)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), param2).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumCreatedEffectObjects)(windows_core::Interface::as_raw(self), param0, param1 as _, param2).ok() } } pub unsafe fn Escape(&self, param0: *mut DIEFFESCAPE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Escape)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).Escape)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn Poll(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Poll)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn SendDeviceData(&self, param0: u32, param1: *mut DIDEVICEOBJECTDATA, param2: *mut u32, param3: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SendDeviceData)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), core::mem::transmute(param2), param3).ok() } + unsafe { (windows_core::Interface::vtable(self).SendDeviceData)(windows_core::Interface::as_raw(self), param0, param1 as _, param2 as _, param3).ok() } } pub unsafe fn EnumEffectsInFile(&self, param0: P0, param1: LPDIENUMEFFECTSINFILECALLBACK, param2: *mut core::ffi::c_void, param3: u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EnumEffectsInFile)(windows_core::Interface::as_raw(self), param0.param().abi(), param1, core::mem::transmute(param2), param3).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumEffectsInFile)(windows_core::Interface::as_raw(self), param0.param().abi(), param1, param2 as _, param3).ok() } } pub unsafe fn WriteEffectToFile(&self, param0: P0, param1: u32, param2: *mut DIFILEEFFECT, param3: u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).WriteEffectToFile)(windows_core::Interface::as_raw(self), param0.param().abi(), param1, core::mem::transmute(param2), param3).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteEffectToFile)(windows_core::Interface::as_raw(self), param0.param().abi(), param1, param2 as _, param3).ok() } } pub unsafe fn BuildActionMap(&self, param0: *mut DIACTIONFORMATA, param1: P1, param2: u32) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).BuildActionMap)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1.param().abi(), param2).ok() } + unsafe { (windows_core::Interface::vtable(self).BuildActionMap)(windows_core::Interface::as_raw(self), param0 as _, param1.param().abi(), param2).ok() } } pub unsafe fn SetActionMap(&self, param0: *mut DIACTIONFORMATA, param1: P1, param2: u32) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SetActionMap)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1.param().abi(), param2).ok() } + unsafe { (windows_core::Interface::vtable(self).SetActionMap)(windows_core::Interface::as_raw(self), param0 as _, param1.param().abi(), param2).ok() } } pub unsafe fn GetImageInfo(&self, param0: *mut DIDEVICEIMAGEINFOHEADERA) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetImageInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetImageInfo)(windows_core::Interface::as_raw(self), param0 as _).ok() } } } #[repr(C)] @@ -5258,16 +5258,16 @@ windows_core::imp::define_interface!(IDirectInputDevice8W, IDirectInputDevice8W_ windows_core::imp::interface_hierarchy!(IDirectInputDevice8W, windows_core::IUnknown); impl IDirectInputDevice8W { pub unsafe fn GetCapabilities(&self, param0: *mut DIDEVCAPS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCapabilities)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCapabilities)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn EnumObjects(&self, param0: LPDIENUMDEVICEOBJECTSCALLBACKW, param1: *mut core::ffi::c_void, param2: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumObjects)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), param2).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumObjects)(windows_core::Interface::as_raw(self), param0, param1 as _, param2).ok() } } pub unsafe fn GetProperty(&self, param0: *const windows_core::GUID, param1: *mut DIPROPHEADER) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), param0, param1 as _).ok() } } pub unsafe fn SetProperty(&self, param0: *const windows_core::GUID, param1: *mut DIPROPHEADER) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetProperty)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetProperty)(windows_core::Interface::as_raw(self), param0, param1 as _).ok() } } pub unsafe fn Acquire(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Acquire)(windows_core::Interface::as_raw(self)).ok() } @@ -5276,13 +5276,13 @@ impl IDirectInputDevice8W { unsafe { (windows_core::Interface::vtable(self).Unacquire)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetDeviceState(&self, param0: u32, param1: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeviceState)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceState)(windows_core::Interface::as_raw(self), param0, param1 as _).ok() } } pub unsafe fn GetDeviceData(&self, param0: u32, param1: *mut DIDEVICEOBJECTDATA, param2: *mut u32, param3: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeviceData)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), core::mem::transmute(param2), param3).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceData)(windows_core::Interface::as_raw(self), param0, param1 as _, param2 as _, param3).ok() } } pub unsafe fn SetDataFormat(&self, param0: *mut DIDATAFORMAT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetDataFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetDataFormat)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn SetEventNotification(&self, param0: super::super::Foundation::HANDLE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetEventNotification)(windows_core::Interface::as_raw(self), param0).ok() } @@ -5291,10 +5291,10 @@ impl IDirectInputDevice8W { unsafe { (windows_core::Interface::vtable(self).SetCooperativeLevel)(windows_core::Interface::as_raw(self), param0, param1).ok() } } pub unsafe fn GetObjectInfo(&self, param0: *mut DIDEVICEOBJECTINSTANCEW, param1: u32, param2: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetObjectInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1, param2).ok() } + unsafe { (windows_core::Interface::vtable(self).GetObjectInfo)(windows_core::Interface::as_raw(self), param0 as _, param1, param2).ok() } } pub unsafe fn GetDeviceInfo(&self, param0: *mut DIDEVICEINSTANCEW) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeviceInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceInfo)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn RunControlPanel(&self, param0: super::super::Foundation::HWND, param1: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RunControlPanel)(windows_core::Interface::as_raw(self), param0, param1).ok() } @@ -5306,58 +5306,58 @@ impl IDirectInputDevice8W { where P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateEffect)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), core::mem::transmute(param2), param3.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateEffect)(windows_core::Interface::as_raw(self), param0, param1 as _, core::mem::transmute(param2), param3.param().abi()).ok() } } pub unsafe fn EnumEffects(&self, param0: LPDIENUMEFFECTSCALLBACKW, param1: *mut core::ffi::c_void, param2: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumEffects)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), param2).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumEffects)(windows_core::Interface::as_raw(self), param0, param1 as _, param2).ok() } } pub unsafe fn GetEffectInfo(&self, param0: *mut DIEFFECTINFOW, param1: *const windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEffectInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEffectInfo)(windows_core::Interface::as_raw(self), param0 as _, param1).ok() } } pub unsafe fn GetForceFeedbackState(&self, param0: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetForceFeedbackState)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetForceFeedbackState)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn SendForceFeedbackCommand(&self, param0: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SendForceFeedbackCommand)(windows_core::Interface::as_raw(self), param0).ok() } } pub unsafe fn EnumCreatedEffectObjects(&self, param0: LPDIENUMCREATEDEFFECTOBJECTSCALLBACK, param1: *mut core::ffi::c_void, param2: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumCreatedEffectObjects)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), param2).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumCreatedEffectObjects)(windows_core::Interface::as_raw(self), param0, param1 as _, param2).ok() } } pub unsafe fn Escape(&self, param0: *mut DIEFFESCAPE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Escape)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).Escape)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn Poll(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Poll)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn SendDeviceData(&self, param0: u32, param1: *mut DIDEVICEOBJECTDATA, param2: *mut u32, param3: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SendDeviceData)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), core::mem::transmute(param2), param3).ok() } + unsafe { (windows_core::Interface::vtable(self).SendDeviceData)(windows_core::Interface::as_raw(self), param0, param1 as _, param2 as _, param3).ok() } } pub unsafe fn EnumEffectsInFile(&self, param0: P0, param1: LPDIENUMEFFECTSINFILECALLBACK, param2: *mut core::ffi::c_void, param3: u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EnumEffectsInFile)(windows_core::Interface::as_raw(self), param0.param().abi(), param1, core::mem::transmute(param2), param3).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumEffectsInFile)(windows_core::Interface::as_raw(self), param0.param().abi(), param1, param2 as _, param3).ok() } } pub unsafe fn WriteEffectToFile(&self, param0: P0, param1: u32, param2: *mut DIFILEEFFECT, param3: u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).WriteEffectToFile)(windows_core::Interface::as_raw(self), param0.param().abi(), param1, core::mem::transmute(param2), param3).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteEffectToFile)(windows_core::Interface::as_raw(self), param0.param().abi(), param1, param2 as _, param3).ok() } } pub unsafe fn BuildActionMap(&self, param0: *mut DIACTIONFORMATW, param1: P1, param2: u32) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).BuildActionMap)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1.param().abi(), param2).ok() } + unsafe { (windows_core::Interface::vtable(self).BuildActionMap)(windows_core::Interface::as_raw(self), param0 as _, param1.param().abi(), param2).ok() } } pub unsafe fn SetActionMap(&self, param0: *mut DIACTIONFORMATW, param1: P1, param2: u32) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SetActionMap)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1.param().abi(), param2).ok() } + unsafe { (windows_core::Interface::vtable(self).SetActionMap)(windows_core::Interface::as_raw(self), param0 as _, param1.param().abi(), param2).ok() } } pub unsafe fn GetImageInfo(&self, param0: *mut DIDEVICEIMAGEINFOHEADERW) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetImageInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetImageInfo)(windows_core::Interface::as_raw(self), param0 as _).ok() } } } #[repr(C)] @@ -5642,16 +5642,16 @@ windows_core::imp::define_interface!(IDirectInputDeviceA, IDirectInputDeviceA_Vt windows_core::imp::interface_hierarchy!(IDirectInputDeviceA, windows_core::IUnknown); impl IDirectInputDeviceA { pub unsafe fn GetCapabilities(&self, param0: *mut DIDEVCAPS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCapabilities)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCapabilities)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn EnumObjects(&self, param0: LPDIENUMDEVICEOBJECTSCALLBACKA, param1: *mut core::ffi::c_void, param2: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumObjects)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), param2).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumObjects)(windows_core::Interface::as_raw(self), param0, param1 as _, param2).ok() } } pub unsafe fn GetProperty(&self, param0: *const windows_core::GUID, param1: *mut DIPROPHEADER) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), param0, param1 as _).ok() } } pub unsafe fn SetProperty(&self, param0: *const windows_core::GUID, param1: *mut DIPROPHEADER) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetProperty)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetProperty)(windows_core::Interface::as_raw(self), param0, param1 as _).ok() } } pub unsafe fn Acquire(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Acquire)(windows_core::Interface::as_raw(self)).ok() } @@ -5660,13 +5660,13 @@ impl IDirectInputDeviceA { unsafe { (windows_core::Interface::vtable(self).Unacquire)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetDeviceState(&self, param0: u32, param1: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeviceState)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceState)(windows_core::Interface::as_raw(self), param0, param1 as _).ok() } } pub unsafe fn GetDeviceData(&self, param0: u32, param1: *mut DIDEVICEOBJECTDATA, param2: *mut u32, param3: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeviceData)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), core::mem::transmute(param2), param3).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceData)(windows_core::Interface::as_raw(self), param0, param1 as _, param2 as _, param3).ok() } } pub unsafe fn SetDataFormat(&self, param0: *mut DIDATAFORMAT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetDataFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetDataFormat)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn SetEventNotification(&self, param0: super::super::Foundation::HANDLE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetEventNotification)(windows_core::Interface::as_raw(self), param0).ok() } @@ -5675,10 +5675,10 @@ impl IDirectInputDeviceA { unsafe { (windows_core::Interface::vtable(self).SetCooperativeLevel)(windows_core::Interface::as_raw(self), param0, param1).ok() } } pub unsafe fn GetObjectInfo(&self, param0: *mut DIDEVICEOBJECTINSTANCEA, param1: u32, param2: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetObjectInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1, param2).ok() } + unsafe { (windows_core::Interface::vtable(self).GetObjectInfo)(windows_core::Interface::as_raw(self), param0 as _, param1, param2).ok() } } pub unsafe fn GetDeviceInfo(&self, param0: *mut DIDEVICEINSTANCEA) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeviceInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceInfo)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn RunControlPanel(&self, param0: super::super::Foundation::HWND, param1: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RunControlPanel)(windows_core::Interface::as_raw(self), param0, param1).ok() } @@ -5843,16 +5843,16 @@ windows_core::imp::define_interface!(IDirectInputDeviceW, IDirectInputDeviceW_Vt windows_core::imp::interface_hierarchy!(IDirectInputDeviceW, windows_core::IUnknown); impl IDirectInputDeviceW { pub unsafe fn GetCapabilities(&self, param0: *mut DIDEVCAPS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCapabilities)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCapabilities)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn EnumObjects(&self, param0: LPDIENUMDEVICEOBJECTSCALLBACKW, param1: *mut core::ffi::c_void, param2: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumObjects)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), param2).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumObjects)(windows_core::Interface::as_raw(self), param0, param1 as _, param2).ok() } } pub unsafe fn GetProperty(&self, param0: *const windows_core::GUID, param1: *mut DIPROPHEADER) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), param0, param1 as _).ok() } } pub unsafe fn SetProperty(&self, param0: *const windows_core::GUID, param1: *mut DIPROPHEADER) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetProperty)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetProperty)(windows_core::Interface::as_raw(self), param0, param1 as _).ok() } } pub unsafe fn Acquire(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Acquire)(windows_core::Interface::as_raw(self)).ok() } @@ -5861,13 +5861,13 @@ impl IDirectInputDeviceW { unsafe { (windows_core::Interface::vtable(self).Unacquire)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetDeviceState(&self, param0: u32, param1: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeviceState)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceState)(windows_core::Interface::as_raw(self), param0, param1 as _).ok() } } pub unsafe fn GetDeviceData(&self, param0: u32, param1: *mut DIDEVICEOBJECTDATA, param2: *mut u32, param3: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeviceData)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), core::mem::transmute(param2), param3).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceData)(windows_core::Interface::as_raw(self), param0, param1 as _, param2 as _, param3).ok() } } pub unsafe fn SetDataFormat(&self, param0: *mut DIDATAFORMAT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetDataFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetDataFormat)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn SetEventNotification(&self, param0: super::super::Foundation::HANDLE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetEventNotification)(windows_core::Interface::as_raw(self), param0).ok() } @@ -5876,10 +5876,10 @@ impl IDirectInputDeviceW { unsafe { (windows_core::Interface::vtable(self).SetCooperativeLevel)(windows_core::Interface::as_raw(self), param0, param1).ok() } } pub unsafe fn GetObjectInfo(&self, param0: *mut DIDEVICEOBJECTINSTANCEW, param1: u32, param2: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetObjectInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1, param2).ok() } + unsafe { (windows_core::Interface::vtable(self).GetObjectInfo)(windows_core::Interface::as_raw(self), param0 as _, param1, param2).ok() } } pub unsafe fn GetDeviceInfo(&self, param0: *mut DIDEVICEINSTANCEW) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeviceInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceInfo)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn RunControlPanel(&self, param0: super::super::Foundation::HWND, param1: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RunControlPanel)(windows_core::Interface::as_raw(self), param0, param1).ok() } @@ -6047,13 +6047,13 @@ impl IDirectInputEffect { unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), param0, param1, param2).ok() } } pub unsafe fn GetEffectGuid(&self, param0: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEffectGuid)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEffectGuid)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetParameters(&self, param0: *mut DIEFFECT, param1: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1).ok() } + unsafe { (windows_core::Interface::vtable(self).GetParameters)(windows_core::Interface::as_raw(self), param0 as _, param1).ok() } } pub unsafe fn SetParameters(&self, param0: *mut DIEFFECT, param1: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1).ok() } + unsafe { (windows_core::Interface::vtable(self).SetParameters)(windows_core::Interface::as_raw(self), param0 as _, param1).ok() } } pub unsafe fn Start(&self, param0: u32, param1: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Start)(windows_core::Interface::as_raw(self), param0, param1).ok() } @@ -6062,7 +6062,7 @@ impl IDirectInputEffect { unsafe { (windows_core::Interface::vtable(self).Stop)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetEffectStatus(&self, param0: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEffectStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEffectStatus)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn Download(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Download)(windows_core::Interface::as_raw(self)).ok() } @@ -6071,7 +6071,7 @@ impl IDirectInputEffect { unsafe { (windows_core::Interface::vtable(self).Unload)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn Escape(&self, param0: *mut DIEFFESCAPE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Escape)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).Escape)(windows_core::Interface::as_raw(self), param0 as _).ok() } } } #[repr(C)] @@ -6185,13 +6185,13 @@ windows_core::imp::define_interface!(IDirectInputEffectDriver, IDirectInputEffec windows_core::imp::interface_hierarchy!(IDirectInputEffectDriver, windows_core::IUnknown); impl IDirectInputEffectDriver { pub unsafe fn DeviceID(&self, param0: u32, param1: u32, param2: u32, param3: u32, param4: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DeviceID)(windows_core::Interface::as_raw(self), param0, param1, param2, param3, core::mem::transmute(param4)).ok() } + unsafe { (windows_core::Interface::vtable(self).DeviceID)(windows_core::Interface::as_raw(self), param0, param1, param2, param3, param4 as _).ok() } } pub unsafe fn GetVersions(&self, param0: *mut DIDRIVERVERSIONS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVersions)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVersions)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn Escape(&self, param0: u32, param1: u32, param2: *mut DIEFFESCAPE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Escape)(windows_core::Interface::as_raw(self), param0, param1, core::mem::transmute(param2)).ok() } + unsafe { (windows_core::Interface::vtable(self).Escape)(windows_core::Interface::as_raw(self), param0, param1, param2 as _).ok() } } pub unsafe fn SetGain(&self, param0: u32, param1: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetGain)(windows_core::Interface::as_raw(self), param0, param1).ok() } @@ -6200,10 +6200,10 @@ impl IDirectInputEffectDriver { unsafe { (windows_core::Interface::vtable(self).SendForceFeedbackCommand)(windows_core::Interface::as_raw(self), param0, param1).ok() } } pub unsafe fn GetForceFeedbackState(&self, param0: u32, param1: *mut DIDEVICESTATE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetForceFeedbackState)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetForceFeedbackState)(windows_core::Interface::as_raw(self), param0, param1 as _).ok() } } pub unsafe fn DownloadEffect(&self, param0: u32, param1: u32, param2: *mut u32, param3: *mut DIEFFECT, param4: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DownloadEffect)(windows_core::Interface::as_raw(self), param0, param1, core::mem::transmute(param2), core::mem::transmute(param3), param4).ok() } + unsafe { (windows_core::Interface::vtable(self).DownloadEffect)(windows_core::Interface::as_raw(self), param0, param1, param2 as _, param3 as _, param4).ok() } } pub unsafe fn DestroyEffect(&self, param0: u32, param1: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DestroyEffect)(windows_core::Interface::as_raw(self), param0, param1).ok() } @@ -6215,7 +6215,7 @@ impl IDirectInputEffectDriver { unsafe { (windows_core::Interface::vtable(self).StopEffect)(windows_core::Interface::as_raw(self), param0, param1).ok() } } pub unsafe fn GetEffectStatus(&self, param0: u32, param1: u32, param2: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEffectStatus)(windows_core::Interface::as_raw(self), param0, param1, core::mem::transmute(param2)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEffectStatus)(windows_core::Interface::as_raw(self), param0, param1, param2 as _).ok() } } } #[repr(C)] @@ -6350,19 +6350,19 @@ impl IDirectInputJoyConfig { unsafe { (windows_core::Interface::vtable(self).SendNotify)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn EnumTypes(&self, param0: LPDIJOYTYPECALLBACK, param1: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumTypes)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumTypes)(windows_core::Interface::as_raw(self), param0, param1 as _).ok() } } pub unsafe fn GetTypeInfo(&self, param0: P0, param1: *mut DIJOYTYPEINFO, param2: u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetTypeInfo)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1), param2).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTypeInfo)(windows_core::Interface::as_raw(self), param0.param().abi(), param1 as _, param2).ok() } } pub unsafe fn SetTypeInfo(&self, param0: P0, param1: *mut DIJOYTYPEINFO, param2: u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SetTypeInfo)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1), param2).ok() } + unsafe { (windows_core::Interface::vtable(self).SetTypeInfo)(windows_core::Interface::as_raw(self), param0.param().abi(), param1 as _, param2).ok() } } pub unsafe fn DeleteType(&self, param0: P0) -> windows_core::Result<()> where @@ -6371,19 +6371,19 @@ impl IDirectInputJoyConfig { unsafe { (windows_core::Interface::vtable(self).DeleteType)(windows_core::Interface::as_raw(self), param0.param().abi()).ok() } } pub unsafe fn GetConfig(&self, param0: u32, param1: *mut DIJOYCONFIG, param2: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetConfig)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), param2).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConfig)(windows_core::Interface::as_raw(self), param0, param1 as _, param2).ok() } } pub unsafe fn SetConfig(&self, param0: u32, param1: *mut DIJOYCONFIG, param2: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetConfig)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), param2).ok() } + unsafe { (windows_core::Interface::vtable(self).SetConfig)(windows_core::Interface::as_raw(self), param0, param1 as _, param2).ok() } } pub unsafe fn DeleteConfig(&self, param0: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DeleteConfig)(windows_core::Interface::as_raw(self), param0).ok() } } pub unsafe fn GetUserValues(&self, param0: *mut DIJOYUSERVALUES, param1: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetUserValues)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUserValues)(windows_core::Interface::as_raw(self), param0 as _, param1).ok() } } pub unsafe fn SetUserValues(&self, param0: *mut DIJOYUSERVALUES, param1: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetUserValues)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1).ok() } + unsafe { (windows_core::Interface::vtable(self).SetUserValues)(windows_core::Interface::as_raw(self), param0 as _, param1).ok() } } pub unsafe fn AddNewHardware(&self, param0: super::super::Foundation::HWND, param1: *const windows_core::GUID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).AddNewHardware)(windows_core::Interface::as_raw(self), param0, param1).ok() } @@ -6393,11 +6393,11 @@ impl IDirectInputJoyConfig { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).OpenTypeKey)(windows_core::Interface::as_raw(self), param0.param().abi(), param1, core::mem::transmute(param2)).ok() } + unsafe { (windows_core::Interface::vtable(self).OpenTypeKey)(windows_core::Interface::as_raw(self), param0.param().abi(), param1, param2 as _).ok() } } #[cfg(feature = "Win32_System_Registry")] pub unsafe fn OpenConfigKey(&self, param0: u32, param1: u32, param2: *mut super::super::System::Registry::HKEY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OpenConfigKey)(windows_core::Interface::as_raw(self), param0, param1, core::mem::transmute(param2)).ok() } + unsafe { (windows_core::Interface::vtable(self).OpenConfigKey)(windows_core::Interface::as_raw(self), param0, param1, param2 as _).ok() } } } #[repr(C)] @@ -6586,20 +6586,20 @@ impl IDirectInputJoyConfig8 { unsafe { (windows_core::Interface::vtable(self).SendNotify)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn EnumTypes(&self, param0: LPDIJOYTYPECALLBACK, param1: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumTypes)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumTypes)(windows_core::Interface::as_raw(self), param0, param1 as _).ok() } } pub unsafe fn GetTypeInfo(&self, param0: P0, param1: *mut DIJOYTYPEINFO, param2: u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetTypeInfo)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1), param2).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTypeInfo)(windows_core::Interface::as_raw(self), param0.param().abi(), param1 as _, param2).ok() } } pub unsafe fn SetTypeInfo(&self, param0: P0, param1: *mut DIJOYTYPEINFO, param2: u32, param3: P3) -> windows_core::Result<()> where P0: windows_core::Param, P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SetTypeInfo)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1), param2, param3.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).SetTypeInfo)(windows_core::Interface::as_raw(self), param0.param().abi(), param1 as _, param2, param3.param().abi()).ok() } } pub unsafe fn DeleteType(&self, param0: P0) -> windows_core::Result<()> where @@ -6608,19 +6608,19 @@ impl IDirectInputJoyConfig8 { unsafe { (windows_core::Interface::vtable(self).DeleteType)(windows_core::Interface::as_raw(self), param0.param().abi()).ok() } } pub unsafe fn GetConfig(&self, param0: u32, param1: *mut DIJOYCONFIG, param2: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetConfig)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), param2).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConfig)(windows_core::Interface::as_raw(self), param0, param1 as _, param2).ok() } } pub unsafe fn SetConfig(&self, param0: u32, param1: *mut DIJOYCONFIG, param2: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetConfig)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), param2).ok() } + unsafe { (windows_core::Interface::vtable(self).SetConfig)(windows_core::Interface::as_raw(self), param0, param1 as _, param2).ok() } } pub unsafe fn DeleteConfig(&self, param0: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DeleteConfig)(windows_core::Interface::as_raw(self), param0).ok() } } pub unsafe fn GetUserValues(&self, param0: *mut DIJOYUSERVALUES, param1: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetUserValues)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUserValues)(windows_core::Interface::as_raw(self), param0 as _, param1).ok() } } pub unsafe fn SetUserValues(&self, param0: *mut DIJOYUSERVALUES, param1: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetUserValues)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1).ok() } + unsafe { (windows_core::Interface::vtable(self).SetUserValues)(windows_core::Interface::as_raw(self), param0 as _, param1).ok() } } pub unsafe fn AddNewHardware(&self, param0: super::super::Foundation::HWND, param1: *const windows_core::GUID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).AddNewHardware)(windows_core::Interface::as_raw(self), param0, param1).ok() } @@ -6630,11 +6630,11 @@ impl IDirectInputJoyConfig8 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).OpenTypeKey)(windows_core::Interface::as_raw(self), param0.param().abi(), param1, core::mem::transmute(param2)).ok() } + unsafe { (windows_core::Interface::vtable(self).OpenTypeKey)(windows_core::Interface::as_raw(self), param0.param().abi(), param1, param2 as _).ok() } } #[cfg(feature = "Win32_System_Registry")] pub unsafe fn OpenAppStatusKey(&self, param0: *mut super::super::System::Registry::HKEY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OpenAppStatusKey)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).OpenAppStatusKey)(windows_core::Interface::as_raw(self), param0 as _).ok() } } } #[repr(C)] @@ -6817,7 +6817,7 @@ impl IDirectInputW { unsafe { (windows_core::Interface::vtable(self).CreateDevice)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), param2.param().abi()).ok() } } pub unsafe fn EnumDevices(&self, param0: u32, param1: LPDIENUMDEVICESCALLBACKW, param2: *mut core::ffi::c_void, param3: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumDevices)(windows_core::Interface::as_raw(self), param0, param1, core::mem::transmute(param2), param3).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumDevices)(windows_core::Interface::as_raw(self), param0, param1, param2 as _, param3).ok() } } pub unsafe fn GetDeviceStatus(&self, param0: *const windows_core::GUID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetDeviceStatus)(windows_core::Interface::as_raw(self), param0).ok() } 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 57746b344f..18e784245b 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/ImageAcquisition/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/ImageAcquisition/mod.rs @@ -154,7 +154,7 @@ windows_core::imp::define_interface!(IEnumWIA_DEV_CAPS, IEnumWIA_DEV_CAPS_Vtbl, windows_core::imp::interface_hierarchy!(IEnumWIA_DEV_CAPS, windows_core::IUnknown); impl IEnumWIA_DEV_CAPS { pub unsafe fn Next(&self, celt: u32, rgelt: *mut WIA_DEV_CAP, pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(rgelt), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(rgelt), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -253,7 +253,7 @@ windows_core::imp::define_interface!(IEnumWIA_DEV_INFO, IEnumWIA_DEV_INFO_Vtbl, windows_core::imp::interface_hierarchy!(IEnumWIA_DEV_INFO, windows_core::IUnknown); impl IEnumWIA_DEV_INFO { pub unsafe fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(rgelt), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(rgelt), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -352,7 +352,7 @@ windows_core::imp::define_interface!(IEnumWIA_FORMAT_INFO, IEnumWIA_FORMAT_INFO_ windows_core::imp::interface_hierarchy!(IEnumWIA_FORMAT_INFO, windows_core::IUnknown); impl IEnumWIA_FORMAT_INFO { pub unsafe fn Next(&self, celt: u32, rgelt: *mut WIA_FORMAT_INFO, pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(rgelt), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, rgelt as _, pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -451,7 +451,7 @@ windows_core::imp::define_interface!(IEnumWiaItem, IEnumWiaItem_Vtbl, 0x5e8383fc windows_core::imp::interface_hierarchy!(IEnumWiaItem, windows_core::IUnknown); impl IEnumWiaItem { pub unsafe fn Next(&self, celt: u32, ppiwiaitem: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppiwiaitem), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppiwiaitem), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -550,7 +550,7 @@ windows_core::imp::define_interface!(IEnumWiaItem2, IEnumWiaItem2_Vtbl, 0x59970a windows_core::imp::interface_hierarchy!(IEnumWiaItem2, windows_core::IUnknown); impl IEnumWiaItem2 { pub unsafe fn Next(&self, celt: u32, ppiwiaitem2: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppiwiaitem2), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppiwiaitem2), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -719,7 +719,7 @@ windows_core::imp::define_interface!(IWiaDataCallback, IWiaDataCallback_Vtbl, 0x windows_core::imp::interface_hierarchy!(IWiaDataCallback, windows_core::IUnknown); impl IWiaDataCallback { pub unsafe fn BandedDataCallback(&self, lmessage: i32, lstatus: i32, lpercentcomplete: i32, loffset: i32, llength: i32, lreserved: i32, lreslength: i32, pbbuffer: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).BandedDataCallback)(windows_core::Interface::as_raw(self), lmessage, lstatus, lpercentcomplete, loffset, llength, lreserved, lreslength, core::mem::transmute(pbbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).BandedDataCallback)(windows_core::Interface::as_raw(self), lmessage, lstatus, lpercentcomplete, loffset, llength, lreserved, lreslength, pbbuffer as _).ok() } } } #[repr(C)] @@ -759,10 +759,10 @@ impl IWiaDataTransfer { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).idtGetBandedData)(windows_core::Interface::as_raw(self), core::mem::transmute(pwiadatatransinfo), piwiadatacallback.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).idtGetBandedData)(windows_core::Interface::as_raw(self), pwiadatatransinfo as _, piwiadatacallback.param().abi()).ok() } } pub unsafe fn idtQueryGetData(&self, pfe: Option<*const WIA_FORMAT_INFO>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).idtQueryGetData)(windows_core::Interface::as_raw(self), core::mem::transmute(pfe.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).idtQueryGetData)(windows_core::Interface::as_raw(self), pfe.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn idtEnumWIA_FORMAT_INFO(&self) -> windows_core::Result { unsafe { @@ -771,7 +771,7 @@ impl IWiaDataTransfer { } } pub unsafe fn idtGetExtendedTransferInfo(&self, pextendedtransferinfo: *mut WIA_EXTENDED_TRANSFER_INFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).idtGetExtendedTransferInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pextendedtransferinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).idtGetExtendedTransferInfo)(windows_core::Interface::as_raw(self), pextendedtransferinfo as _).ok() } } } #[repr(C)] @@ -873,7 +873,7 @@ impl IWiaDevMgr { where P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetImageDlg)(windows_core::Interface::as_raw(self), hwndparent, ldevicetype, lflags, lintent, pitemroot.param().abi(), core::mem::transmute_copy(bstrfilename), core::mem::transmute(pguidformat)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetImageDlg)(windows_core::Interface::as_raw(self), hwndparent, ldevicetype, lflags, lintent, pitemroot.param().abi(), core::mem::transmute_copy(bstrfilename), pguidformat as _).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<()> { unsafe { (windows_core::Interface::vtable(self).RegisterEventCallbackProgram)(windows_core::Interface::as_raw(self), lflags, core::mem::transmute_copy(bstrdeviceid), peventguid, core::mem::transmute_copy(bstrcommandline), core::mem::transmute_copy(bstrname), core::mem::transmute_copy(bstrdescription), core::mem::transmute_copy(bstricon)).ok() } @@ -1047,7 +1047,7 @@ impl IWiaDevMgr2 { unsafe { (windows_core::Interface::vtable(self).RegisterEventCallbackCLSID)(windows_core::Interface::as_raw(self), lflags, core::mem::transmute_copy(bstrdeviceid), peventguid, 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: 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetImageDlg)(windows_core::Interface::as_raw(self), lflags, core::mem::transmute_copy(bstrdeviceid), hwndparent, core::mem::transmute_copy(bstrfoldername), core::mem::transmute_copy(bstrfilename), core::mem::transmute(plnumfiles), core::mem::transmute(ppbstrfilepaths), core::mem::transmute(ppitem)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetImageDlg)(windows_core::Interface::as_raw(self), lflags, core::mem::transmute_copy(bstrdeviceid), hwndparent, core::mem::transmute_copy(bstrfoldername), core::mem::transmute_copy(bstrfilename), plnumfiles as _, ppbstrfilepaths as _, core::mem::transmute(ppitem)).ok() } } } #[repr(C)] @@ -1491,7 +1491,7 @@ windows_core::imp::define_interface!(IWiaEventCallback, IWiaEventCallback_Vtbl, windows_core::imp::interface_hierarchy!(IWiaEventCallback, windows_core::IUnknown); impl IWiaEventCallback { pub unsafe fn ImageEventCallback(&self, peventguid: *const windows_core::GUID, bstreventdescription: &windows_core::BSTR, bstrdeviceid: &windows_core::BSTR, bstrdevicedescription: &windows_core::BSTR, dwdevicetype: u32, bstrfullitemname: &windows_core::BSTR, puleventtype: *mut u32, ulreserved: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ImageEventCallback)(windows_core::Interface::as_raw(self), peventguid, core::mem::transmute_copy(bstreventdescription), core::mem::transmute_copy(bstrdeviceid), core::mem::transmute_copy(bstrdevicedescription), dwdevicetype, core::mem::transmute_copy(bstrfullitemname), core::mem::transmute(puleventtype), ulreserved).ok() } + unsafe { (windows_core::Interface::vtable(self).ImageEventCallback)(windows_core::Interface::as_raw(self), peventguid, core::mem::transmute_copy(bstreventdescription), core::mem::transmute_copy(bstrdeviceid), core::mem::transmute_copy(bstrdevicedescription), dwdevicetype, core::mem::transmute_copy(bstrfullitemname), puleventtype as _, ulreserved).ok() } } } #[repr(C)] @@ -1647,7 +1647,7 @@ impl IWiaItem { } } pub unsafe fn DeviceDlg(&self, hwndparent: super::super::Foundation::HWND, lflags: i32, lintent: i32, plitemcount: *mut i32, ppiwiaitem: *mut *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DeviceDlg)(windows_core::Interface::as_raw(self), hwndparent, lflags, lintent, core::mem::transmute(plitemcount), core::mem::transmute(ppiwiaitem)).ok() } + unsafe { (windows_core::Interface::vtable(self).DeviceDlg)(windows_core::Interface::as_raw(self), hwndparent, lflags, lintent, plitemcount as _, ppiwiaitem as _).ok() } } pub unsafe fn DeviceCommand(&self, lflags: i32, pcmdguid: *const windows_core::GUID, piwiaitem: *mut Option) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DeviceCommand)(windows_core::Interface::as_raw(self), lflags, pcmdguid, core::mem::transmute(piwiaitem)).ok() } @@ -1913,7 +1913,7 @@ impl IWiaItem2 { pub unsafe fn EnumChildItems(&self, pcategoryguid: Option<*const windows_core::GUID>) -> windows_core::Result { unsafe { 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::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).EnumChildItems)(windows_core::Interface::as_raw(self), pcategoryguid.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn FindItemByName(&self, lflags: i32, bstrfullitemname: &windows_core::BSTR) -> windows_core::Result { @@ -1935,7 +1935,7 @@ impl IWiaItem2 { } } 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<()> { - unsafe { (windows_core::Interface::vtable(self).DeviceDlg)(windows_core::Interface::as_raw(self), lflags, 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() } + unsafe { (windows_core::Interface::vtable(self).DeviceDlg)(windows_core::Interface::as_raw(self), lflags, hwndparent, core::mem::transmute_copy(bstrfoldername), core::mem::transmute_copy(bstrfilename), plnumfiles as _, ppbstrfilepaths as _, ppitem.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn DeviceCommand(&self, lflags: i32, pcmdguid: *const windows_core::GUID, ppiwiaitem2: *mut Option) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DeviceCommand)(windows_core::Interface::as_raw(self), lflags, pcmdguid, core::mem::transmute(ppiwiaitem2)).ok() } @@ -1947,10 +1947,10 @@ impl IWiaItem2 { } } pub unsafe fn CheckExtension(&self, lflags: i32, bstrname: &windows_core::BSTR, riidextensioninterface: *const windows_core::GUID, pbextensionexists: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CheckExtension)(windows_core::Interface::as_raw(self), lflags, core::mem::transmute_copy(bstrname), riidextensioninterface, core::mem::transmute(pbextensionexists)).ok() } + unsafe { (windows_core::Interface::vtable(self).CheckExtension)(windows_core::Interface::as_raw(self), lflags, core::mem::transmute_copy(bstrname), riidextensioninterface, pbextensionexists as _).ok() } } pub unsafe fn GetExtension(&self, lflags: i32, bstrname: &windows_core::BSTR, riidextensioninterface: *const windows_core::GUID, ppout: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetExtension)(windows_core::Interface::as_raw(self), lflags, core::mem::transmute_copy(bstrname), riidextensioninterface, core::mem::transmute(ppout)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetExtension)(windows_core::Interface::as_raw(self), lflags, core::mem::transmute_copy(bstrname), riidextensioninterface, ppout as _).ok() } } pub unsafe fn GetParentItem(&self) -> windows_core::Result { unsafe { @@ -2211,7 +2211,7 @@ impl IWiaItemExtras { } } pub unsafe fn Escape(&self, dwescapecode: u32, lpindata: &[u8], poutdata: &mut [u8], pdwactualdatasize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Escape)(windows_core::Interface::as_raw(self), dwescapecode, core::mem::transmute(lpindata.as_ptr()), lpindata.len().try_into().unwrap(), core::mem::transmute(poutdata.as_ptr()), poutdata.len().try_into().unwrap(), core::mem::transmute(pdwactualdatasize)).ok() } + unsafe { (windows_core::Interface::vtable(self).Escape)(windows_core::Interface::as_raw(self), dwescapecode, core::mem::transmute(lpindata.as_ptr()), lpindata.len().try_into().unwrap(), core::mem::transmute(poutdata.as_ptr()), poutdata.len().try_into().unwrap(), pdwactualdatasize as _).ok() } } pub unsafe fn CancelPendingIO(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).CancelPendingIO)(windows_core::Interface::as_raw(self)).ok() } @@ -2413,10 +2413,10 @@ impl IWiaMiniDrv { P4: windows_core::Param, P5: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).drvInitializeWia)(windows_core::Interface::as_raw(self), __midl__iwiaminidrv0000, __midl__iwiaminidrv0001, core::mem::transmute_copy(__midl__iwiaminidrv0002), core::mem::transmute_copy(__midl__iwiaminidrv0003), __midl__iwiaminidrv0004.param().abi(), __midl__iwiaminidrv0005.param().abi(), core::mem::transmute(__midl__iwiaminidrv0006), core::mem::transmute(__midl__iwiaminidrv0007), core::mem::transmute(__midl__iwiaminidrv0008)).ok() } + unsafe { (windows_core::Interface::vtable(self).drvInitializeWia)(windows_core::Interface::as_raw(self), __midl__iwiaminidrv0000, __midl__iwiaminidrv0001, core::mem::transmute_copy(__midl__iwiaminidrv0002), core::mem::transmute_copy(__midl__iwiaminidrv0003), __midl__iwiaminidrv0004.param().abi(), __midl__iwiaminidrv0005.param().abi(), core::mem::transmute(__midl__iwiaminidrv0006), core::mem::transmute(__midl__iwiaminidrv0007), __midl__iwiaminidrv0008 as _).ok() } } pub unsafe fn drvAcquireItemData(&self, __midl__iwiaminidrv0009: *const u8, __midl__iwiaminidrv0010: i32, __midl__iwiaminidrv0011: *mut MINIDRV_TRANSFER_CONTEXT, __midl__iwiaminidrv0012: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).drvAcquireItemData)(windows_core::Interface::as_raw(self), __midl__iwiaminidrv0009, __midl__iwiaminidrv0010, core::mem::transmute(__midl__iwiaminidrv0011), core::mem::transmute(__midl__iwiaminidrv0012)).ok() } + unsafe { (windows_core::Interface::vtable(self).drvAcquireItemData)(windows_core::Interface::as_raw(self), __midl__iwiaminidrv0009, __midl__iwiaminidrv0010, core::mem::transmute(__midl__iwiaminidrv0011), __midl__iwiaminidrv0012 as _).ok() } } pub unsafe fn drvInitItemProperties(&self, __midl__iwiaminidrv0013: *const u8, __midl__iwiaminidrv0014: i32) -> windows_core::Result { unsafe { @@ -2460,13 +2460,13 @@ impl IWiaMiniDrv { unsafe { (windows_core::Interface::vtable(self).drvAnalyzeItem)(windows_core::Interface::as_raw(self), __midl__iwiaminidrv0036, __midl__iwiaminidrv0037, __midl__iwiaminidrv0038).ok() } } pub unsafe fn drvGetDeviceErrorStr(&self, __midl__iwiaminidrv0039: i32, __midl__iwiaminidrv0040: i32, __midl__iwiaminidrv0041: *mut windows_core::PWSTR, __midl__iwiaminidrv0042: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).drvGetDeviceErrorStr)(windows_core::Interface::as_raw(self), __midl__iwiaminidrv0039, __midl__iwiaminidrv0040, core::mem::transmute(__midl__iwiaminidrv0041), core::mem::transmute(__midl__iwiaminidrv0042)).ok() } + unsafe { (windows_core::Interface::vtable(self).drvGetDeviceErrorStr)(windows_core::Interface::as_raw(self), __midl__iwiaminidrv0039, __midl__iwiaminidrv0040, __midl__iwiaminidrv0041 as _, __midl__iwiaminidrv0042 as _).ok() } } pub unsafe fn drvDeviceCommand(&self, __midl__iwiaminidrv0043: *const u8, __midl__iwiaminidrv0044: i32, __midl__iwiaminidrv0045: *const windows_core::GUID, __midl__iwiaminidrv0046: *mut Option, __midl__iwiaminidrv0047: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).drvDeviceCommand)(windows_core::Interface::as_raw(self), __midl__iwiaminidrv0043, __midl__iwiaminidrv0044, __midl__iwiaminidrv0045, core::mem::transmute(__midl__iwiaminidrv0046), core::mem::transmute(__midl__iwiaminidrv0047)).ok() } + unsafe { (windows_core::Interface::vtable(self).drvDeviceCommand)(windows_core::Interface::as_raw(self), __midl__iwiaminidrv0043, __midl__iwiaminidrv0044, __midl__iwiaminidrv0045, core::mem::transmute(__midl__iwiaminidrv0046), __midl__iwiaminidrv0047 as _).ok() } } pub unsafe fn drvGetCapabilities(&self, __midl__iwiaminidrv0048: *const u8, __midl__iwiaminidrv0049: i32, __midl__iwiaminidrv0050: *mut i32, __midl__iwiaminidrv0051: *mut *mut WIA_DEV_CAP_DRV, __midl__iwiaminidrv0052: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).drvGetCapabilities)(windows_core::Interface::as_raw(self), __midl__iwiaminidrv0048, __midl__iwiaminidrv0049, core::mem::transmute(__midl__iwiaminidrv0050), core::mem::transmute(__midl__iwiaminidrv0051), core::mem::transmute(__midl__iwiaminidrv0052)).ok() } + unsafe { (windows_core::Interface::vtable(self).drvGetCapabilities)(windows_core::Interface::as_raw(self), __midl__iwiaminidrv0048, __midl__iwiaminidrv0049, __midl__iwiaminidrv0050 as _, __midl__iwiaminidrv0051 as _, __midl__iwiaminidrv0052 as _).ok() } } pub unsafe fn drvDeleteItem(&self, __midl__iwiaminidrv0053: *const u8, __midl__iwiaminidrv0054: i32) -> windows_core::Result { unsafe { @@ -2481,7 +2481,7 @@ impl IWiaMiniDrv { } } pub unsafe fn drvGetWiaFormatInfo(&self, __midl__iwiaminidrv0059: *const u8, __midl__iwiaminidrv0060: i32, __midl__iwiaminidrv0061: *mut i32, __midl__iwiaminidrv0062: *mut *mut WIA_FORMAT_INFO, __midl__iwiaminidrv0063: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).drvGetWiaFormatInfo)(windows_core::Interface::as_raw(self), __midl__iwiaminidrv0059, __midl__iwiaminidrv0060, core::mem::transmute(__midl__iwiaminidrv0061), core::mem::transmute(__midl__iwiaminidrv0062), core::mem::transmute(__midl__iwiaminidrv0063)).ok() } + unsafe { (windows_core::Interface::vtable(self).drvGetWiaFormatInfo)(windows_core::Interface::as_raw(self), __midl__iwiaminidrv0059, __midl__iwiaminidrv0060, __midl__iwiaminidrv0061 as _, __midl__iwiaminidrv0062 as _, __midl__iwiaminidrv0063 as _).ok() } } pub unsafe fn drvNotifyPnpEvent(&self, peventguid: *const windows_core::GUID, bstrdeviceid: &windows_core::BSTR, ulreserved: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).drvNotifyPnpEvent)(windows_core::Interface::as_raw(self), peventguid, core::mem::transmute_copy(bstrdeviceid), ulreserved).ok() } @@ -2931,7 +2931,7 @@ impl IWiaPropertyStorage { unsafe { (windows_core::Interface::vtable(self).DeleteMultiple)(windows_core::Interface::as_raw(self), rgpspec.len().try_into().unwrap(), core::mem::transmute(rgpspec.as_ptr())).ok() } } pub unsafe fn ReadPropertyNames(&self, cpropid: u32, rgpropid: *const u32, rglpwstrname: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadPropertyNames)(windows_core::Interface::as_raw(self), cpropid, rgpropid, core::mem::transmute(rglpwstrname)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadPropertyNames)(windows_core::Interface::as_raw(self), cpropid, rgpropid, rglpwstrname as _).ok() } } pub unsafe fn WritePropertyNames(&self, cpropid: u32, rgpropid: *const u32, rglpwstrname: *const windows_core::PCWSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).WritePropertyNames)(windows_core::Interface::as_raw(self), cpropid, rgpropid, rglpwstrname).ok() } @@ -2960,11 +2960,11 @@ impl IWiaPropertyStorage { } #[cfg(feature = "Win32_System_Com_StructuredStorage")] pub unsafe fn Stat(&self, pstatpsstg: *mut super::super::System::Com::StructuredStorage::STATPROPSETSTG) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Stat)(windows_core::Interface::as_raw(self), core::mem::transmute(pstatpsstg)).ok() } + unsafe { (windows_core::Interface::vtable(self).Stat)(windows_core::Interface::as_raw(self), pstatpsstg as _).ok() } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn GetPropertyAttributes(&self, cpspec: u32, rgpspec: *const super::super::System::Com::StructuredStorage::PROPSPEC, rgflags: *mut u32, rgpropvar: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPropertyAttributes)(windows_core::Interface::as_raw(self), cpspec, rgpspec, core::mem::transmute(rgflags), core::mem::transmute(rgpropvar)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropertyAttributes)(windows_core::Interface::as_raw(self), cpspec, rgpspec, rgflags as _, core::mem::transmute(rgpropvar)).ok() } } pub unsafe fn GetCount(&self) -> windows_core::Result { unsafe { @@ -2974,14 +2974,14 @@ impl IWiaPropertyStorage { } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetPropertyStream(&self, pcompatibilityid: *mut windows_core::GUID, ppistream: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPropertyStream)(windows_core::Interface::as_raw(self), core::mem::transmute(pcompatibilityid), core::mem::transmute(ppistream)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropertyStream)(windows_core::Interface::as_raw(self), pcompatibilityid as _, core::mem::transmute(ppistream)).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn SetPropertyStream(&self, pcompatibilityid: *mut windows_core::GUID, pistream: P1) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SetPropertyStream)(windows_core::Interface::as_raw(self), core::mem::transmute(pcompatibilityid), pistream.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).SetPropertyStream)(windows_core::Interface::as_raw(self), pcompatibilityid as _, pistream.param().abi()).ok() } } } #[repr(C)] @@ -3386,11 +3386,11 @@ impl IWiaUIExtension { } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn GetDeviceIcon(&self, bstrdeviceid: &windows_core::BSTR, phicon: *mut super::super::UI::WindowsAndMessaging::HICON, nsize: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeviceIcon)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrdeviceid), core::mem::transmute(phicon), nsize).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceIcon)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrdeviceid), phicon as _, nsize).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetDeviceBitmapLogo(&self, bstrdeviceid: &windows_core::BSTR, phbitmap: *mut super::super::Graphics::Gdi::HBITMAP, nmaxwidth: u32, nmaxheight: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeviceBitmapLogo)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrdeviceid), core::mem::transmute(phbitmap), nmaxwidth, nmaxheight).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceBitmapLogo)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrdeviceid), phbitmap as _, nmaxwidth, nmaxheight).ok() } } } #[repr(C)] @@ -3454,7 +3454,7 @@ impl IWiaUIExtension2 { } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn GetDeviceIcon(&self, bstrdeviceid: &windows_core::BSTR, phicon: *mut super::super::UI::WindowsAndMessaging::HICON, nsize: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeviceIcon)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrdeviceid), core::mem::transmute(phicon), nsize).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceIcon)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrdeviceid), phicon as _, nsize).ok() } } } #[repr(C)] 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 9c4f01587b..0f584021d9 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/PortableDevices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/PortableDevices/mod.rs @@ -128,7 +128,7 @@ windows_core::imp::define_interface!(IEnumPortableDeviceConnectors, IEnumPortabl windows_core::imp::interface_hierarchy!(IEnumPortableDeviceConnectors, windows_core::IUnknown); impl IEnumPortableDeviceConnectors { pub unsafe fn Next(&self, pconnectors: &mut [Option], pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pconnectors.len().try_into().unwrap(), core::mem::transmute(pconnectors.as_ptr()), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pconnectors.len().try_into().unwrap(), core::mem::transmute(pconnectors.as_ptr()), pcfetched as _).ok() } } pub unsafe fn Skip(&self, cconnectors: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), cconnectors).ok() } @@ -206,7 +206,7 @@ windows_core::imp::define_interface!(IEnumPortableDeviceObjectIDs, IEnumPortable windows_core::imp::interface_hierarchy!(IEnumPortableDeviceObjectIDs, windows_core::IUnknown); impl IEnumPortableDeviceObjectIDs { pub unsafe fn Next(&self, pobjids: &mut [windows_core::PWSTR], pcfetched: *mut u32) -> windows_core::HRESULT { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pobjids.len().try_into().unwrap(), core::mem::transmute(pobjids.as_ptr()), core::mem::transmute(pcfetched)) } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pobjids.len().try_into().unwrap(), core::mem::transmute(pobjids.as_ptr()), pcfetched as _) } } pub unsafe fn Skip(&self, cobjects: u32) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), cobjects) } @@ -862,7 +862,7 @@ impl IPortableDeviceConnector { } #[cfg(feature = "Win32_Devices_Properties")] pub unsafe fn GetProperty(&self, ppropertykey: *const super::super::Foundation::DEVPROPKEY, ppropertytype: *mut super::Properties::DEVPROPTYPE, ppdata: *mut *mut u8, pcbdata: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), ppropertykey, core::mem::transmute(ppropertytype), core::mem::transmute(ppdata), core::mem::transmute(pcbdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), ppropertykey, ppropertytype as _, ppdata as _, pcbdata as _).ok() } } #[cfg(feature = "Win32_Devices_Properties")] pub unsafe fn SetProperty(&self, ppropertykey: *const super::super::Foundation::DEVPROPKEY, propertytype: super::Properties::DEVPROPTYPE, pdata: &[u8]) -> windows_core::Result<()> { @@ -990,14 +990,14 @@ impl IPortableDeviceContent { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateObjectWithPropertiesOnly)(windows_core::Interface::as_raw(self), pvalues.param().abi(), core::mem::transmute(ppszobjectid)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateObjectWithPropertiesOnly)(windows_core::Interface::as_raw(self), pvalues.param().abi(), ppszobjectid as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn CreateObjectWithPropertiesAndData(&self, pvalues: P0, ppdata: *mut Option, pdwoptimalwritebuffersize: *mut u32, ppszcookie: *mut windows_core::PWSTR) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateObjectWithPropertiesAndData)(windows_core::Interface::as_raw(self), pvalues.param().abi(), core::mem::transmute(ppdata), core::mem::transmute(pdwoptimalwritebuffersize), core::mem::transmute(ppszcookie)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateObjectWithPropertiesAndData)(windows_core::Interface::as_raw(self), pvalues.param().abi(), core::mem::transmute(ppdata), pdwoptimalwritebuffersize as _, ppszcookie as _).ok() } } pub unsafe fn Delete(&self, dwoptions: u32, pobjectids: P1, ppresults: *mut Option) -> windows_core::Result<()> where @@ -1184,7 +1184,7 @@ impl IPortableDeviceContent2 { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).UpdateObjectWithPropertiesAndData)(windows_core::Interface::as_raw(self), pszobjectid.param().abi(), pproperties.param().abi(), core::mem::transmute(ppdata), core::mem::transmute(pdwoptimalwritebuffersize)).ok() } + unsafe { (windows_core::Interface::vtable(self).UpdateObjectWithPropertiesAndData)(windows_core::Interface::as_raw(self), pszobjectid.param().abi(), pproperties.param().abi(), core::mem::transmute(ppdata), pdwoptimalwritebuffersize as _).ok() } } } #[repr(C)] @@ -1454,7 +1454,7 @@ windows_core::imp::define_interface!(IPortableDeviceManager, IPortableDeviceMana windows_core::imp::interface_hierarchy!(IPortableDeviceManager, windows_core::IUnknown); impl IPortableDeviceManager { pub unsafe fn GetDevices(&self, ppnpdeviceids: *mut windows_core::PWSTR, pcpnpdeviceids: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDevices)(windows_core::Interface::as_raw(self), core::mem::transmute(ppnpdeviceids), core::mem::transmute(pcpnpdeviceids)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDevices)(windows_core::Interface::as_raw(self), ppnpdeviceids as _, pcpnpdeviceids as _).ok() } } pub unsafe fn RefreshDeviceList(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RefreshDeviceList)(windows_core::Interface::as_raw(self)).ok() } @@ -1463,29 +1463,29 @@ impl IPortableDeviceManager { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetDeviceFriendlyName)(windows_core::Interface::as_raw(self), pszpnpdeviceid.param().abi(), core::mem::transmute(pdevicefriendlyname), core::mem::transmute(pcchdevicefriendlyname)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceFriendlyName)(windows_core::Interface::as_raw(self), pszpnpdeviceid.param().abi(), core::mem::transmute(pdevicefriendlyname), pcchdevicefriendlyname as _).ok() } } pub unsafe fn GetDeviceDescription(&self, pszpnpdeviceid: P0, pdevicedescription: windows_core::PWSTR, pcchdevicedescription: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetDeviceDescription)(windows_core::Interface::as_raw(self), pszpnpdeviceid.param().abi(), core::mem::transmute(pdevicedescription), core::mem::transmute(pcchdevicedescription)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceDescription)(windows_core::Interface::as_raw(self), pszpnpdeviceid.param().abi(), core::mem::transmute(pdevicedescription), pcchdevicedescription as _).ok() } } pub unsafe fn GetDeviceManufacturer(&self, pszpnpdeviceid: P0, pdevicemanufacturer: windows_core::PWSTR, pcchdevicemanufacturer: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetDeviceManufacturer)(windows_core::Interface::as_raw(self), pszpnpdeviceid.param().abi(), core::mem::transmute(pdevicemanufacturer), core::mem::transmute(pcchdevicemanufacturer)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceManufacturer)(windows_core::Interface::as_raw(self), pszpnpdeviceid.param().abi(), core::mem::transmute(pdevicemanufacturer), pcchdevicemanufacturer as _).ok() } } pub unsafe fn GetDeviceProperty(&self, pszpnpdeviceid: P0, pszdevicepropertyname: P1, pdata: *mut u8, pcbdata: *mut u32, pdwtype: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetDeviceProperty)(windows_core::Interface::as_raw(self), pszpnpdeviceid.param().abi(), pszdevicepropertyname.param().abi(), core::mem::transmute(pdata), core::mem::transmute(pcbdata), core::mem::transmute(pdwtype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceProperty)(windows_core::Interface::as_raw(self), pszpnpdeviceid.param().abi(), pszdevicepropertyname.param().abi(), pdata as _, pcbdata as _, pdwtype as _).ok() } } pub unsafe fn GetPrivateDevices(&self, ppnpdeviceids: *mut windows_core::PWSTR, pcpnpdeviceids: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPrivateDevices)(windows_core::Interface::as_raw(self), core::mem::transmute(ppnpdeviceids), core::mem::transmute(pcpnpdeviceids)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPrivateDevices)(windows_core::Interface::as_raw(self), ppnpdeviceids as _, pcpnpdeviceids as _).ok() } } } #[repr(C)] @@ -2048,7 +2048,7 @@ impl IPortableDeviceResources { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetStream)(windows_core::Interface::as_raw(self), pszobjectid.param().abi(), key, dwmode, core::mem::transmute(pdwoptimalbuffersize), core::mem::transmute(ppstream)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStream)(windows_core::Interface::as_raw(self), pszobjectid.param().abi(), key, dwmode, pdwoptimalbuffersize as _, core::mem::transmute(ppstream)).ok() } } pub unsafe fn Delete(&self, pszobjectid: P0, pkeys: P1) -> windows_core::Result<()> where @@ -2065,7 +2065,7 @@ impl IPortableDeviceResources { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateResource)(windows_core::Interface::as_raw(self), presourceattributes.param().abi(), core::mem::transmute(ppdata), core::mem::transmute(pdwoptimalwritebuffersize), core::mem::transmute(ppszcookie)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateResource)(windows_core::Interface::as_raw(self), presourceattributes.param().abi(), core::mem::transmute(ppdata), pdwoptimalwritebuffersize as _, ppszcookie as _).ok() } } } #[repr(C)] @@ -2795,7 +2795,7 @@ impl IPortableDeviceServiceManager { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetDeviceServices)(windows_core::Interface::as_raw(self), pszpnpdeviceid.param().abi(), guidservicecategory, core::mem::transmute(pservices), core::mem::transmute(pcservices)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceServices)(windows_core::Interface::as_raw(self), pszpnpdeviceid.param().abi(), guidservicecategory, pservices as _, pcservices as _).ok() } } pub unsafe fn GetDeviceForService(&self, pszpnpserviceid: P0) -> windows_core::Result where @@ -2982,7 +2982,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<()> { - unsafe { (windows_core::Interface::vtable(self).SeekInUnits)(windows_core::Interface::as_raw(self), dlibmove, units, dworigin, core::mem::transmute(plibnewposition.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SeekInUnits)(windows_core::Interface::as_raw(self), dlibmove, units, dworigin, plibnewposition.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Cancel(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Cancel)(windows_core::Interface::as_raw(self)).ok() } @@ -3027,7 +3027,7 @@ impl IPortableDeviceValues { } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn GetAt(&self, index: u32, pkey: *mut super::super::Foundation::PROPERTYKEY, pvalue: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAt)(windows_core::Interface::as_raw(self), index, core::mem::transmute(pkey), core::mem::transmute(pvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAt)(windows_core::Interface::as_raw(self), index, pkey as _, core::mem::transmute(pvalue)).ok() } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn SetValue(&self, key: *const super::super::Foundation::PROPERTYKEY, pvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()> { @@ -3110,7 +3110,7 @@ impl IPortableDeviceValues { unsafe { (windows_core::Interface::vtable(self).SetKeyValue)(windows_core::Interface::as_raw(self), key, value).ok() } } pub unsafe fn GetKeyValue(&self, key: *const super::super::Foundation::PROPERTYKEY, pvalue: *mut super::super::Foundation::PROPERTYKEY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetKeyValue)(windows_core::Interface::as_raw(self), key, core::mem::transmute(pvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetKeyValue)(windows_core::Interface::as_raw(self), key, pvalue as _).ok() } } pub unsafe fn SetBoolValue(&self, key: *const super::super::Foundation::PROPERTYKEY, value: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetBoolValue)(windows_core::Interface::as_raw(self), key, value.into()).ok() } @@ -3146,7 +3146,7 @@ impl IPortableDeviceValues { unsafe { (windows_core::Interface::vtable(self).SetBufferValue)(windows_core::Interface::as_raw(self), key, core::mem::transmute(pvalue.as_ptr()), pvalue.len().try_into().unwrap()).ok() } } pub unsafe fn GetBufferValue(&self, key: *const super::super::Foundation::PROPERTYKEY, ppvalue: *mut *mut u8, pcbvalue: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBufferValue)(windows_core::Interface::as_raw(self), key, core::mem::transmute(ppvalue), core::mem::transmute(pcbvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBufferValue)(windows_core::Interface::as_raw(self), key, ppvalue as _, pcbvalue as _).ok() } } pub unsafe fn SetIPortableDeviceValuesValue(&self, key: *const super::super::Foundation::PROPERTYKEY, pvalue: P1) -> windows_core::Result<()> where @@ -4080,13 +4080,13 @@ impl IWpdSerializer { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).WriteIPortableDeviceValuesToBuffer)(windows_core::Interface::as_raw(self), pbuffer.len().try_into().unwrap(), presults.param().abi(), core::mem::transmute(pbuffer.as_ptr()), core::mem::transmute(pdwbyteswritten)).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteIPortableDeviceValuesToBuffer)(windows_core::Interface::as_raw(self), pbuffer.len().try_into().unwrap(), presults.param().abi(), core::mem::transmute(pbuffer.as_ptr()), pdwbyteswritten as _).ok() } } pub unsafe fn GetBufferFromIPortableDeviceValues(&self, psource: P0, ppbuffer: *mut *mut u8, pdwbuffersize: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetBufferFromIPortableDeviceValues)(windows_core::Interface::as_raw(self), psource.param().abi(), core::mem::transmute(ppbuffer), core::mem::transmute(pdwbuffersize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBufferFromIPortableDeviceValues)(windows_core::Interface::as_raw(self), psource.param().abi(), ppbuffer as _, pdwbuffersize as _).ok() } } pub unsafe fn GetSerializedSize(&self, psource: P0) -> windows_core::Result where 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 99aea5659a..e24c4cce9a 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Sensors/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Sensors/mod.rs @@ -2,7 +2,7 @@ #[inline] pub unsafe fn CollectionsListAllocateBufferAndSerialize(sourcecollection: *const SENSOR_COLLECTION_LIST, ptargetbuffersizeinbytes: *mut u32, ptargetbuffer: *mut *mut u8) -> super::super::Foundation::NTSTATUS { windows_targets::link!("sensorsutilsv2.dll" "system" fn CollectionsListAllocateBufferAndSerialize(sourcecollection : *const SENSOR_COLLECTION_LIST, ptargetbuffersizeinbytes : *mut u32, ptargetbuffer : *mut *mut u8) -> super::super::Foundation:: NTSTATUS); - unsafe { CollectionsListAllocateBufferAndSerialize(core::mem::transmute(sourcecollection), core::mem::transmute(ptargetbuffersizeinbytes), core::mem::transmute(ptargetbuffer)) } + unsafe { CollectionsListAllocateBufferAndSerialize(core::mem::transmute(sourcecollection), ptargetbuffersizeinbytes as _, ptargetbuffer as _) } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] @@ -72,7 +72,7 @@ pub unsafe fn EvaluateActivityThresholds(newsample: *const SENSOR_COLLECTION_LIS #[inline] pub unsafe fn GetPerformanceTime(timems: *mut u32) -> super::super::Foundation::NTSTATUS { windows_targets::link!("sensorsutilsv2.dll" "system" fn GetPerformanceTime(timems : *mut u32) -> super::super::Foundation:: NTSTATUS); - unsafe { GetPerformanceTime(core::mem::transmute(timems)) } + unsafe { GetPerformanceTime(timems as _) } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] @@ -124,61 +124,61 @@ pub unsafe fn IsSensorSubscribed(subscriptionlist: *const SENSOR_COLLECTION_LIST #[inline] pub unsafe fn PropKeyFindKeyGetBool(plist: *const SENSOR_COLLECTION_LIST, pkey: *const super::super::Foundation::PROPERTYKEY, pretvalue: *mut super::super::Foundation::BOOL) -> super::super::Foundation::NTSTATUS { windows_targets::link!("sensorsutilsv2.dll" "system" fn PropKeyFindKeyGetBool(plist : *const SENSOR_COLLECTION_LIST, pkey : *const super::super::Foundation:: PROPERTYKEY, pretvalue : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: NTSTATUS); - unsafe { PropKeyFindKeyGetBool(core::mem::transmute(plist), pkey, core::mem::transmute(pretvalue)) } + unsafe { PropKeyFindKeyGetBool(core::mem::transmute(plist), pkey, pretvalue as _) } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] pub unsafe fn PropKeyFindKeyGetDouble(plist: *const SENSOR_COLLECTION_LIST, pkey: *const super::super::Foundation::PROPERTYKEY, pretvalue: *mut f64) -> super::super::Foundation::NTSTATUS { windows_targets::link!("sensorsutilsv2.dll" "system" fn PropKeyFindKeyGetDouble(plist : *const SENSOR_COLLECTION_LIST, pkey : *const super::super::Foundation:: PROPERTYKEY, pretvalue : *mut f64) -> super::super::Foundation:: NTSTATUS); - unsafe { PropKeyFindKeyGetDouble(core::mem::transmute(plist), pkey, core::mem::transmute(pretvalue)) } + unsafe { PropKeyFindKeyGetDouble(core::mem::transmute(plist), pkey, pretvalue as _) } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] pub unsafe fn PropKeyFindKeyGetFileTime(plist: *const SENSOR_COLLECTION_LIST, pkey: *const super::super::Foundation::PROPERTYKEY, pretvalue: *mut super::super::Foundation::FILETIME) -> super::super::Foundation::NTSTATUS { windows_targets::link!("sensorsutilsv2.dll" "system" fn PropKeyFindKeyGetFileTime(plist : *const SENSOR_COLLECTION_LIST, pkey : *const super::super::Foundation:: PROPERTYKEY, pretvalue : *mut super::super::Foundation:: FILETIME) -> super::super::Foundation:: NTSTATUS); - unsafe { PropKeyFindKeyGetFileTime(core::mem::transmute(plist), pkey, core::mem::transmute(pretvalue)) } + unsafe { PropKeyFindKeyGetFileTime(core::mem::transmute(plist), pkey, pretvalue as _) } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] pub unsafe fn PropKeyFindKeyGetFloat(plist: *const SENSOR_COLLECTION_LIST, pkey: *const super::super::Foundation::PROPERTYKEY, pretvalue: *mut f32) -> super::super::Foundation::NTSTATUS { windows_targets::link!("sensorsutilsv2.dll" "system" fn PropKeyFindKeyGetFloat(plist : *const SENSOR_COLLECTION_LIST, pkey : *const super::super::Foundation:: PROPERTYKEY, pretvalue : *mut f32) -> super::super::Foundation:: NTSTATUS); - unsafe { PropKeyFindKeyGetFloat(core::mem::transmute(plist), pkey, core::mem::transmute(pretvalue)) } + unsafe { PropKeyFindKeyGetFloat(core::mem::transmute(plist), pkey, pretvalue as _) } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] pub unsafe fn PropKeyFindKeyGetGuid(plist: *const SENSOR_COLLECTION_LIST, pkey: *const super::super::Foundation::PROPERTYKEY, pretvalue: *mut windows_core::GUID) -> super::super::Foundation::NTSTATUS { windows_targets::link!("sensorsutilsv2.dll" "system" fn PropKeyFindKeyGetGuid(plist : *const SENSOR_COLLECTION_LIST, pkey : *const super::super::Foundation:: PROPERTYKEY, pretvalue : *mut windows_core::GUID) -> super::super::Foundation:: NTSTATUS); - unsafe { PropKeyFindKeyGetGuid(core::mem::transmute(plist), pkey, core::mem::transmute(pretvalue)) } + unsafe { PropKeyFindKeyGetGuid(core::mem::transmute(plist), pkey, pretvalue as _) } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] pub unsafe fn PropKeyFindKeyGetInt32(plist: *const SENSOR_COLLECTION_LIST, pkey: *const super::super::Foundation::PROPERTYKEY, pretvalue: *mut i32) -> super::super::Foundation::NTSTATUS { windows_targets::link!("sensorsutilsv2.dll" "system" fn PropKeyFindKeyGetInt32(plist : *const SENSOR_COLLECTION_LIST, pkey : *const super::super::Foundation:: PROPERTYKEY, pretvalue : *mut i32) -> super::super::Foundation:: NTSTATUS); - unsafe { PropKeyFindKeyGetInt32(core::mem::transmute(plist), pkey, core::mem::transmute(pretvalue)) } + unsafe { PropKeyFindKeyGetInt32(core::mem::transmute(plist), pkey, pretvalue as _) } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] pub unsafe fn PropKeyFindKeyGetInt64(plist: *const SENSOR_COLLECTION_LIST, pkey: *const super::super::Foundation::PROPERTYKEY, pretvalue: *mut i64) -> super::super::Foundation::NTSTATUS { windows_targets::link!("sensorsutilsv2.dll" "system" fn PropKeyFindKeyGetInt64(plist : *const SENSOR_COLLECTION_LIST, pkey : *const super::super::Foundation:: PROPERTYKEY, pretvalue : *mut i64) -> super::super::Foundation:: NTSTATUS); - unsafe { PropKeyFindKeyGetInt64(core::mem::transmute(plist), pkey, core::mem::transmute(pretvalue)) } + unsafe { PropKeyFindKeyGetInt64(core::mem::transmute(plist), pkey, pretvalue as _) } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] pub unsafe fn PropKeyFindKeyGetNthInt64(plist: *const SENSOR_COLLECTION_LIST, pkey: *const super::super::Foundation::PROPERTYKEY, occurrence: u32, pretvalue: *mut i64) -> super::super::Foundation::NTSTATUS { windows_targets::link!("sensorsutilsv2.dll" "system" fn PropKeyFindKeyGetNthInt64(plist : *const SENSOR_COLLECTION_LIST, pkey : *const super::super::Foundation:: PROPERTYKEY, occurrence : u32, pretvalue : *mut i64) -> super::super::Foundation:: NTSTATUS); - unsafe { PropKeyFindKeyGetNthInt64(core::mem::transmute(plist), pkey, occurrence, core::mem::transmute(pretvalue)) } + unsafe { PropKeyFindKeyGetNthInt64(core::mem::transmute(plist), pkey, occurrence, pretvalue as _) } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] pub unsafe fn PropKeyFindKeyGetNthUlong(plist: *const SENSOR_COLLECTION_LIST, pkey: *const super::super::Foundation::PROPERTYKEY, occurrence: u32, pretvalue: *mut u32) -> super::super::Foundation::NTSTATUS { windows_targets::link!("sensorsutilsv2.dll" "system" fn PropKeyFindKeyGetNthUlong(plist : *const SENSOR_COLLECTION_LIST, pkey : *const super::super::Foundation:: PROPERTYKEY, occurrence : u32, pretvalue : *mut u32) -> super::super::Foundation:: NTSTATUS); - unsafe { PropKeyFindKeyGetNthUlong(core::mem::transmute(plist), pkey, occurrence, core::mem::transmute(pretvalue)) } + unsafe { PropKeyFindKeyGetNthUlong(core::mem::transmute(plist), pkey, occurrence, pretvalue as _) } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] pub unsafe fn PropKeyFindKeyGetNthUshort(plist: *const SENSOR_COLLECTION_LIST, pkey: *const super::super::Foundation::PROPERTYKEY, occurrence: u32, pretvalue: *mut u16) -> super::super::Foundation::NTSTATUS { windows_targets::link!("sensorsutilsv2.dll" "system" fn PropKeyFindKeyGetNthUshort(plist : *const SENSOR_COLLECTION_LIST, pkey : *const super::super::Foundation:: PROPERTYKEY, occurrence : u32, pretvalue : *mut u16) -> super::super::Foundation:: NTSTATUS); - unsafe { PropKeyFindKeyGetNthUshort(core::mem::transmute(plist), pkey, occurrence, core::mem::transmute(pretvalue)) } + unsafe { PropKeyFindKeyGetNthUshort(core::mem::transmute(plist), pkey, occurrence, pretvalue as _) } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] @@ -190,13 +190,13 @@ pub unsafe fn PropKeyFindKeyGetPropVariant(plist: *const SENSOR_COLLECTION_LIST, #[inline] pub unsafe fn PropKeyFindKeyGetUlong(plist: *const SENSOR_COLLECTION_LIST, pkey: *const super::super::Foundation::PROPERTYKEY, pretvalue: *mut u32) -> super::super::Foundation::NTSTATUS { windows_targets::link!("sensorsutilsv2.dll" "system" fn PropKeyFindKeyGetUlong(plist : *const SENSOR_COLLECTION_LIST, pkey : *const super::super::Foundation:: PROPERTYKEY, pretvalue : *mut u32) -> super::super::Foundation:: NTSTATUS); - unsafe { PropKeyFindKeyGetUlong(core::mem::transmute(plist), pkey, core::mem::transmute(pretvalue)) } + unsafe { PropKeyFindKeyGetUlong(core::mem::transmute(plist), pkey, pretvalue as _) } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] pub unsafe fn PropKeyFindKeyGetUshort(plist: *const SENSOR_COLLECTION_LIST, pkey: *const super::super::Foundation::PROPERTYKEY, pretvalue: *mut u16) -> super::super::Foundation::NTSTATUS { windows_targets::link!("sensorsutilsv2.dll" "system" fn PropKeyFindKeyGetUshort(plist : *const SENSOR_COLLECTION_LIST, pkey : *const super::super::Foundation:: PROPERTYKEY, pretvalue : *mut u16) -> super::super::Foundation:: NTSTATUS); - unsafe { PropKeyFindKeyGetUshort(core::mem::transmute(plist), pkey, core::mem::transmute(pretvalue)) } + unsafe { PropKeyFindKeyGetUshort(core::mem::transmute(plist), pkey, pretvalue as _) } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] @@ -208,12 +208,12 @@ pub unsafe fn PropKeyFindKeySetPropVariant(plist: *mut SENSOR_COLLECTION_LIST, p #[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); - unsafe { 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()))) } + unsafe { PropVariantGetInformation(core::mem::transmute(propvariantvalue), propvariantoffset.unwrap_or(core::mem::zeroed()) as _, propvariantsize.unwrap_or(core::mem::zeroed()) as _, propvariantpointer.unwrap_or(core::mem::zeroed()) as _, remappedtype.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn PropertiesListCopy(target: *mut SENSOR_PROPERTY_LIST, source: *const SENSOR_PROPERTY_LIST) -> super::super::Foundation::NTSTATUS { windows_targets::link!("sensorsutilsv2.dll" "system" fn PropertiesListCopy(target : *mut SENSOR_PROPERTY_LIST, source : *const SENSOR_PROPERTY_LIST) -> super::super::Foundation:: NTSTATUS); - unsafe { PropertiesListCopy(core::mem::transmute(target), source) } + unsafe { PropertiesListCopy(target as _, source) } } #[inline] pub unsafe fn PropertiesListGetFillableCount(buffersizebytes: u32) -> u32 { @@ -224,17 +224,17 @@ 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); - unsafe { SensorCollectionGetAt(index, core::mem::transmute(psensorslist), core::mem::transmute(pkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvalue.unwrap_or(core::mem::zeroed()))) } + unsafe { SensorCollectionGetAt(index, core::mem::transmute(psensorslist), pkey.unwrap_or(core::mem::zeroed()) as _, pvalue.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SerializationBufferAllocate(sizeinbytes: u32, pbuffer: *mut *mut u8) -> super::super::Foundation::NTSTATUS { windows_targets::link!("sensorsutilsv2.dll" "system" fn SerializationBufferAllocate(sizeinbytes : u32, pbuffer : *mut *mut u8) -> super::super::Foundation:: NTSTATUS); - unsafe { SerializationBufferAllocate(sizeinbytes, core::mem::transmute(pbuffer)) } + unsafe { SerializationBufferAllocate(sizeinbytes, pbuffer as _) } } #[inline] pub unsafe fn SerializationBufferFree(buffer: Option<*const u8>) { windows_targets::link!("sensorsutilsv2.dll" "system" fn SerializationBufferFree(buffer : *const u8)); - unsafe { SerializationBufferFree(core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } + unsafe { SerializationBufferFree(buffer.unwrap_or(core::mem::zeroed()) as _) } } #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] @@ -455,7 +455,7 @@ impl ISensor { } } pub unsafe fn GetEventInterest(&self, ppvalues: *mut *mut windows_core::GUID, pcount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEventInterest)(windows_core::Interface::as_raw(self), core::mem::transmute(ppvalues), core::mem::transmute(pcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventInterest)(windows_core::Interface::as_raw(self), ppvalues as _, pcount as _).ok() } } pub unsafe fn SetEventInterest(&self, pvalues: Option<&[windows_core::GUID]>) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetEventInterest)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalues.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pvalues.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } 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 2e341919f8..bcdf918b79 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/SerialCommunication/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/SerialCommunication/mod.rs @@ -1,12 +1,12 @@ #[inline] pub unsafe fn ComDBClaimNextFreePort(hcomdb: HCOMDB, comnumber: *mut u32) -> i32 { windows_targets::link!("msports.dll" "system" fn ComDBClaimNextFreePort(hcomdb : HCOMDB, comnumber : *mut u32) -> i32); - unsafe { ComDBClaimNextFreePort(hcomdb, core::mem::transmute(comnumber)) } + unsafe { ComDBClaimNextFreePort(hcomdb, comnumber as _) } } #[inline] pub unsafe fn ComDBClaimPort(hcomdb: HCOMDB, comnumber: u32, forceclaim: bool, forced: Option<*mut super::super::Foundation::BOOL>) -> i32 { windows_targets::link!("msports.dll" "system" fn ComDBClaimPort(hcomdb : HCOMDB, comnumber : u32, forceclaim : super::super::Foundation:: BOOL, forced : *mut super::super::Foundation:: BOOL) -> i32); - unsafe { ComDBClaimPort(hcomdb, comnumber, forceclaim.into(), core::mem::transmute(forced.unwrap_or(core::mem::zeroed()))) } + unsafe { ComDBClaimPort(hcomdb, comnumber, forceclaim.into(), forced.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ComDBClose(hcomdb: HCOMDB) -> i32 { @@ -16,12 +16,12 @@ pub unsafe fn ComDBClose(hcomdb: HCOMDB) -> i32 { #[inline] 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); - unsafe { ComDBGetCurrentPortUsage(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()), reporttype, core::mem::transmute(maxportsreported.unwrap_or(core::mem::zeroed()))) } + unsafe { ComDBGetCurrentPortUsage(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()), reporttype, maxportsreported.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ComDBOpen(phcomdb: *mut HCOMDB) -> i32 { windows_targets::link!("msports.dll" "system" fn ComDBOpen(phcomdb : *mut HCOMDB) -> i32); - unsafe { ComDBOpen(core::mem::transmute(phcomdb)) } + unsafe { ComDBOpen(phcomdb as _) } } #[inline] pub unsafe fn ComDBReleasePort(hcomdb: HCOMDB, comnumber: u32) -> i32 { diff --git a/crates/libs/windows/src/Windows/Win32/Devices/Tapi/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/Tapi/mod.rs index b60e35469e..ec4be9c621 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Tapi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Tapi/mod.rs @@ -5,7 +5,7 @@ where P0: windows_core::Param, { windows_targets::link!("mapi32.dll" "system" fn GetTnefStreamCodepage(lpstream : * mut core::ffi::c_void, lpulcodepage : *mut u32, lpulsubcodepage : *mut u32) -> windows_core::HRESULT); - unsafe { GetTnefStreamCodepage(lpstream.param().abi(), core::mem::transmute(lpulcodepage), core::mem::transmute(lpulsubcodepage)).ok() } + unsafe { GetTnefStreamCodepage(lpstream.param().abi(), lpulcodepage as _, lpulsubcodepage as _).ok() } } #[cfg(all(feature = "Win32_System_AddressBook", feature = "Win32_System_Com"))] #[inline] @@ -15,7 +15,7 @@ where P4: windows_core::Param, { windows_targets::link!("mapi32.dll" "system" fn OpenTnefStream(lpvsupport : *mut core::ffi::c_void, lpstream : * mut core::ffi::c_void, lpszstreamname : *const i8, ulflags : u32, lpmessage : * mut core::ffi::c_void, wkeyval : u16, lpptnef : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { OpenTnefStream(core::mem::transmute(lpvsupport), lpstream.param().abi(), lpszstreamname, ulflags, lpmessage.param().abi(), wkeyval, core::mem::transmute(lpptnef)).ok() } + unsafe { OpenTnefStream(lpvsupport as _, lpstream.param().abi(), lpszstreamname, ulflags, lpmessage.param().abi(), wkeyval, core::mem::transmute(lpptnef)).ok() } } #[cfg(all(feature = "Win32_System_AddressBook", feature = "Win32_System_Com"))] #[inline] @@ -26,7 +26,7 @@ where P6: windows_core::Param, { windows_targets::link!("mapi32.dll" "system" fn OpenTnefStreamEx(lpvsupport : *mut core::ffi::c_void, lpstream : * mut core::ffi::c_void, lpszstreamname : *const i8, ulflags : u32, lpmessage : * mut core::ffi::c_void, wkeyval : u16, lpadressbook : * mut core::ffi::c_void, lpptnef : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { OpenTnefStreamEx(core::mem::transmute(lpvsupport), lpstream.param().abi(), lpszstreamname, ulflags, lpmessage.param().abi(), wkeyval, lpadressbook.param().abi(), core::mem::transmute(lpptnef)).ok() } + unsafe { OpenTnefStreamEx(lpvsupport as _, lpstream.param().abi(), lpszstreamname, ulflags, lpmessage.param().abi(), wkeyval, lpadressbook.param().abi(), core::mem::transmute(lpptnef)).ok() } } #[inline] pub unsafe fn lineAccept(hcall: u32, lpsuseruserinfo: P1, dwsize: u32) -> i32 @@ -42,7 +42,7 @@ where P0: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineAddProvider(lpszproviderfilename : windows_core::PCSTR, hwndowner : super::super::Foundation:: HWND, lpdwpermanentproviderid : *mut u32) -> i32); - unsafe { lineAddProvider(lpszproviderfilename.param().abi(), hwndowner, core::mem::transmute(lpdwpermanentproviderid)) } + unsafe { lineAddProvider(lpszproviderfilename.param().abi(), hwndowner, lpdwpermanentproviderid as _) } } #[inline] pub unsafe fn lineAddProviderA(lpszproviderfilename: P0, hwndowner: super::super::Foundation::HWND, lpdwpermanentproviderid: *mut u32) -> i32 @@ -50,7 +50,7 @@ where P0: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineAddProviderA(lpszproviderfilename : windows_core::PCSTR, hwndowner : super::super::Foundation:: HWND, lpdwpermanentproviderid : *mut u32) -> i32); - unsafe { lineAddProviderA(lpszproviderfilename.param().abi(), hwndowner, core::mem::transmute(lpdwpermanentproviderid)) } + unsafe { lineAddProviderA(lpszproviderfilename.param().abi(), hwndowner, lpdwpermanentproviderid as _) } } #[inline] pub unsafe fn lineAddProviderW(lpszproviderfilename: P0, hwndowner: super::super::Foundation::HWND, lpdwpermanentproviderid: *mut u32) -> i32 @@ -58,7 +58,7 @@ where P0: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineAddProviderW(lpszproviderfilename : windows_core::PCWSTR, hwndowner : super::super::Foundation:: HWND, lpdwpermanentproviderid : *mut u32) -> i32); - unsafe { lineAddProviderW(lpszproviderfilename.param().abi(), hwndowner, core::mem::transmute(lpdwpermanentproviderid)) } + unsafe { lineAddProviderW(lpszproviderfilename.param().abi(), hwndowner, lpdwpermanentproviderid as _) } } #[inline] pub unsafe fn lineAddToConference(hconfcall: u32, hconsultcall: u32) -> i32 { @@ -68,7 +68,7 @@ pub unsafe fn lineAddToConference(hconfcall: u32, hconsultcall: u32) -> i32 { #[inline] pub unsafe fn lineAgentSpecific(hline: u32, dwaddressid: u32, dwagentextensionidindex: u32, lpparams: *mut core::ffi::c_void, dwsize: u32) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineAgentSpecific(hline : u32, dwaddressid : u32, dwagentextensionidindex : u32, lpparams : *mut core::ffi::c_void, dwsize : u32) -> i32); - unsafe { lineAgentSpecific(hline, dwaddressid, dwagentextensionidindex, core::mem::transmute(lpparams), dwsize) } + unsafe { lineAgentSpecific(hline, dwaddressid, dwagentextensionidindex, lpparams as _, dwsize) } } #[inline] pub unsafe fn lineAnswer(hcall: u32, lpsuseruserinfo: P1, dwsize: u32) -> i32 @@ -110,12 +110,12 @@ pub unsafe fn lineClose(hline: u32) -> i32 { #[inline] pub unsafe fn lineCompleteCall(hcall: u32, lpdwcompletionid: *mut u32, dwcompletionmode: u32, dwmessageid: u32) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineCompleteCall(hcall : u32, lpdwcompletionid : *mut u32, dwcompletionmode : u32, dwmessageid : u32) -> i32); - unsafe { lineCompleteCall(hcall, core::mem::transmute(lpdwcompletionid), dwcompletionmode, dwmessageid) } + unsafe { lineCompleteCall(hcall, lpdwcompletionid as _, dwcompletionmode, dwmessageid) } } #[inline] pub unsafe fn lineCompleteTransfer(hcall: u32, hconsultcall: u32, lphconfcall: *mut u32, dwtransfermode: u32) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineCompleteTransfer(hcall : u32, hconsultcall : u32, lphconfcall : *mut u32, dwtransfermode : u32) -> i32); - unsafe { lineCompleteTransfer(hcall, hconsultcall, core::mem::transmute(lphconfcall), dwtransfermode) } + unsafe { lineCompleteTransfer(hcall, hconsultcall, lphconfcall as _, dwtransfermode) } } #[inline] pub unsafe fn lineConfigDialog(dwdeviceid: u32, hwndowner: super::super::Foundation::HWND, lpszdeviceclass: P2) -> i32 @@ -139,7 +139,7 @@ where 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); - unsafe { lineConfigDialogEdit(dwdeviceid, hwndowner, lpszdeviceclass.param().abi(), lpdeviceconfigin, dwsize, core::mem::transmute(lpdeviceconfigout)) } + unsafe { lineConfigDialogEdit(dwdeviceid, hwndowner, lpszdeviceclass.param().abi(), lpdeviceconfigin, dwsize, lpdeviceconfigout as _) } } #[inline] 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 @@ -147,7 +147,7 @@ where 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); - unsafe { lineConfigDialogEditA(dwdeviceid, hwndowner, lpszdeviceclass.param().abi(), lpdeviceconfigin, dwsize, core::mem::transmute(lpdeviceconfigout)) } + unsafe { lineConfigDialogEditA(dwdeviceid, hwndowner, lpszdeviceclass.param().abi(), lpdeviceconfigin, dwsize, lpdeviceconfigout as _) } } #[inline] 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 @@ -155,7 +155,7 @@ where 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); - unsafe { lineConfigDialogEditW(dwdeviceid, hwndowner, lpszdeviceclass.param().abi(), lpdeviceconfigin, dwsize, core::mem::transmute(lpdeviceconfigout)) } + unsafe { lineConfigDialogEditW(dwdeviceid, hwndowner, lpszdeviceclass.param().abi(), lpdeviceconfigin, dwsize, lpdeviceconfigout as _) } } #[inline] pub unsafe fn lineConfigDialogW(dwdeviceid: u32, hwndowner: super::super::Foundation::HWND, lpszdeviceclass: P2) -> i32 @@ -177,7 +177,7 @@ where P2: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineCreateAgentA(hline : u32, lpszagentid : windows_core::PCSTR, lpszagentpin : windows_core::PCSTR, lphagent : *mut u32) -> i32); - unsafe { lineCreateAgentA(hline, lpszagentid.param().abi(), lpszagentpin.param().abi(), core::mem::transmute(lphagent)) } + unsafe { lineCreateAgentA(hline, lpszagentid.param().abi(), lpszagentpin.param().abi(), lphagent as _) } } #[inline] pub unsafe fn lineCreateAgentSessionA(hline: u32, hagent: u32, lpszagentpin: P2, dwworkingaddressid: u32, lpgroupid: *mut windows_core::GUID, lphagentsession: *mut u32) -> i32 @@ -185,7 +185,7 @@ where P2: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineCreateAgentSessionA(hline : u32, hagent : u32, lpszagentpin : windows_core::PCSTR, dwworkingaddressid : u32, lpgroupid : *mut windows_core::GUID, lphagentsession : *mut u32) -> i32); - unsafe { lineCreateAgentSessionA(hline, hagent, lpszagentpin.param().abi(), dwworkingaddressid, core::mem::transmute(lpgroupid), core::mem::transmute(lphagentsession)) } + unsafe { lineCreateAgentSessionA(hline, hagent, lpszagentpin.param().abi(), dwworkingaddressid, lpgroupid as _, lphagentsession as _) } } #[inline] pub unsafe fn lineCreateAgentSessionW(hline: u32, hagent: u32, lpszagentpin: P2, dwworkingaddressid: u32, lpgroupid: *mut windows_core::GUID, lphagentsession: *mut u32) -> i32 @@ -193,7 +193,7 @@ where P2: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineCreateAgentSessionW(hline : u32, hagent : u32, lpszagentpin : windows_core::PCWSTR, dwworkingaddressid : u32, lpgroupid : *mut windows_core::GUID, lphagentsession : *mut u32) -> i32); - unsafe { lineCreateAgentSessionW(hline, hagent, lpszagentpin.param().abi(), dwworkingaddressid, core::mem::transmute(lpgroupid), core::mem::transmute(lphagentsession)) } + unsafe { lineCreateAgentSessionW(hline, hagent, lpszagentpin.param().abi(), dwworkingaddressid, lpgroupid as _, lphagentsession as _) } } #[inline] pub unsafe fn lineCreateAgentW(hline: u32, lpszagentid: P1, lpszagentpin: P2, lphagent: *mut u32) -> i32 @@ -202,7 +202,7 @@ where P2: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineCreateAgentW(hline : u32, lpszagentid : windows_core::PCWSTR, lpszagentpin : windows_core::PCWSTR, lphagent : *mut u32) -> i32); - unsafe { lineCreateAgentW(hline, lpszagentid.param().abi(), lpszagentpin.param().abi(), core::mem::transmute(lphagent)) } + unsafe { lineCreateAgentW(hline, lpszagentid.param().abi(), lpszagentpin.param().abi(), lphagent as _) } } #[inline] pub unsafe fn lineDeallocateCall(hcall: u32) -> i32 { @@ -212,12 +212,12 @@ pub unsafe fn lineDeallocateCall(hcall: u32) -> i32 { #[inline] pub unsafe fn lineDevSpecific(hline: u32, dwaddressid: u32, hcall: u32, lpparams: *mut core::ffi::c_void, dwsize: u32) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineDevSpecific(hline : u32, dwaddressid : u32, hcall : u32, lpparams : *mut core::ffi::c_void, dwsize : u32) -> i32); - unsafe { lineDevSpecific(hline, dwaddressid, hcall, core::mem::transmute(lpparams), dwsize) } + unsafe { lineDevSpecific(hline, dwaddressid, hcall, lpparams as _, dwsize) } } #[inline] pub unsafe fn lineDevSpecificFeature(hline: u32, dwfeature: u32, lpparams: *mut core::ffi::c_void, dwsize: u32) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineDevSpecificFeature(hline : u32, dwfeature : u32, lpparams : *mut core::ffi::c_void, dwsize : u32) -> i32); - unsafe { lineDevSpecificFeature(hline, dwfeature, core::mem::transmute(lpparams), dwsize) } + unsafe { lineDevSpecificFeature(hline, dwfeature, lpparams as _, dwsize) } } #[inline] pub unsafe fn lineDial(hcall: u32, lpszdestaddress: P1, dwcountrycode: u32) -> i32 @@ -254,17 +254,17 @@ where #[inline] pub unsafe fn lineForward(hline: u32, balladdresses: u32, dwaddressid: u32, lpforwardlist: *const LINEFORWARDLIST, dwnumringsnoanswer: u32, lphconsultcall: *mut u32, lpcallparams: *const LINECALLPARAMS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineForward(hline : u32, balladdresses : u32, dwaddressid : u32, lpforwardlist : *const LINEFORWARDLIST, dwnumringsnoanswer : u32, lphconsultcall : *mut u32, lpcallparams : *const LINECALLPARAMS) -> i32); - unsafe { lineForward(hline, balladdresses, dwaddressid, lpforwardlist, dwnumringsnoanswer, core::mem::transmute(lphconsultcall), lpcallparams) } + unsafe { lineForward(hline, balladdresses, dwaddressid, lpforwardlist, dwnumringsnoanswer, lphconsultcall as _, lpcallparams) } } #[inline] pub unsafe fn lineForwardA(hline: u32, balladdresses: u32, dwaddressid: u32, lpforwardlist: *const LINEFORWARDLIST, dwnumringsnoanswer: u32, lphconsultcall: *mut u32, lpcallparams: *const LINECALLPARAMS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineForwardA(hline : u32, balladdresses : u32, dwaddressid : u32, lpforwardlist : *const LINEFORWARDLIST, dwnumringsnoanswer : u32, lphconsultcall : *mut u32, lpcallparams : *const LINECALLPARAMS) -> i32); - unsafe { lineForwardA(hline, balladdresses, dwaddressid, lpforwardlist, dwnumringsnoanswer, core::mem::transmute(lphconsultcall), lpcallparams) } + unsafe { lineForwardA(hline, balladdresses, dwaddressid, lpforwardlist, dwnumringsnoanswer, lphconsultcall as _, lpcallparams) } } #[inline] pub unsafe fn lineForwardW(hline: u32, balladdresses: u32, dwaddressid: u32, lpforwardlist: *const LINEFORWARDLIST, dwnumringsnoanswer: u32, lphconsultcall: *mut u32, lpcallparams: *const LINECALLPARAMS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineForwardW(hline : u32, balladdresses : u32, dwaddressid : u32, lpforwardlist : *const LINEFORWARDLIST, dwnumringsnoanswer : u32, lphconsultcall : *mut u32, lpcallparams : *const LINECALLPARAMS) -> i32); - unsafe { lineForwardW(hline, balladdresses, dwaddressid, lpforwardlist, dwnumringsnoanswer, core::mem::transmute(lphconsultcall), lpcallparams) } + unsafe { lineForwardW(hline, balladdresses, dwaddressid, lpforwardlist, dwnumringsnoanswer, lphconsultcall as _, lpcallparams) } } #[inline] pub unsafe fn lineGatherDigits(hcall: u32, dwdigitmodes: u32, lpsdigits: Option<&mut [u8]>, lpszterminationdigits: P4, dwfirstdigittimeout: u32, dwinterdigittimeout: u32) -> i32 @@ -322,17 +322,17 @@ pub unsafe fn lineGenerateTone(hcall: u32, dwtonemode: u32, dwduration: u32, dwn #[inline] pub unsafe fn lineGetAddressCaps(hlineapp: u32, dwdeviceid: u32, dwaddressid: u32, dwapiversion: u32, dwextversion: u32, lpaddresscaps: *mut LINEADDRESSCAPS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetAddressCaps(hlineapp : u32, dwdeviceid : u32, dwaddressid : u32, dwapiversion : u32, dwextversion : u32, lpaddresscaps : *mut LINEADDRESSCAPS) -> i32); - unsafe { lineGetAddressCaps(hlineapp, dwdeviceid, dwaddressid, dwapiversion, dwextversion, core::mem::transmute(lpaddresscaps)) } + unsafe { lineGetAddressCaps(hlineapp, dwdeviceid, dwaddressid, dwapiversion, dwextversion, lpaddresscaps as _) } } #[inline] pub unsafe fn lineGetAddressCapsA(hlineapp: u32, dwdeviceid: u32, dwaddressid: u32, dwapiversion: u32, dwextversion: u32, lpaddresscaps: *mut LINEADDRESSCAPS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetAddressCapsA(hlineapp : u32, dwdeviceid : u32, dwaddressid : u32, dwapiversion : u32, dwextversion : u32, lpaddresscaps : *mut LINEADDRESSCAPS) -> i32); - unsafe { lineGetAddressCapsA(hlineapp, dwdeviceid, dwaddressid, dwapiversion, dwextversion, core::mem::transmute(lpaddresscaps)) } + unsafe { lineGetAddressCapsA(hlineapp, dwdeviceid, dwaddressid, dwapiversion, dwextversion, lpaddresscaps as _) } } #[inline] pub unsafe fn lineGetAddressCapsW(hlineapp: u32, dwdeviceid: u32, dwaddressid: u32, dwapiversion: u32, dwextversion: u32, lpaddresscaps: *mut LINEADDRESSCAPS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetAddressCapsW(hlineapp : u32, dwdeviceid : u32, dwaddressid : u32, dwapiversion : u32, dwextversion : u32, lpaddresscaps : *mut LINEADDRESSCAPS) -> i32); - unsafe { lineGetAddressCapsW(hlineapp, dwdeviceid, dwaddressid, dwapiversion, dwextversion, core::mem::transmute(lpaddresscaps)) } + unsafe { lineGetAddressCapsW(hlineapp, dwdeviceid, dwaddressid, dwapiversion, dwextversion, lpaddresscaps as _) } } #[inline] pub unsafe fn lineGetAddressID(hline: u32, lpdwaddressid: *mut u32, dwaddressmode: u32, lpsaddress: P3, dwsize: u32) -> i32 @@ -340,7 +340,7 @@ where P3: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineGetAddressID(hline : u32, lpdwaddressid : *mut u32, dwaddressmode : u32, lpsaddress : windows_core::PCSTR, dwsize : u32) -> i32); - unsafe { lineGetAddressID(hline, core::mem::transmute(lpdwaddressid), dwaddressmode, lpsaddress.param().abi(), dwsize) } + unsafe { lineGetAddressID(hline, lpdwaddressid as _, dwaddressmode, lpsaddress.param().abi(), dwsize) } } #[inline] pub unsafe fn lineGetAddressIDA(hline: u32, lpdwaddressid: *mut u32, dwaddressmode: u32, lpsaddress: P3, dwsize: u32) -> i32 @@ -348,7 +348,7 @@ where P3: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineGetAddressIDA(hline : u32, lpdwaddressid : *mut u32, dwaddressmode : u32, lpsaddress : windows_core::PCSTR, dwsize : u32) -> i32); - unsafe { lineGetAddressIDA(hline, core::mem::transmute(lpdwaddressid), dwaddressmode, lpsaddress.param().abi(), dwsize) } + unsafe { lineGetAddressIDA(hline, lpdwaddressid as _, dwaddressmode, lpsaddress.param().abi(), dwsize) } } #[inline] pub unsafe fn lineGetAddressIDW(hline: u32, lpdwaddressid: *mut u32, dwaddressmode: u32, lpsaddress: P3, dwsize: u32) -> i32 @@ -356,79 +356,79 @@ where P3: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineGetAddressIDW(hline : u32, lpdwaddressid : *mut u32, dwaddressmode : u32, lpsaddress : windows_core::PCWSTR, dwsize : u32) -> i32); - unsafe { lineGetAddressIDW(hline, core::mem::transmute(lpdwaddressid), dwaddressmode, lpsaddress.param().abi(), dwsize) } + unsafe { lineGetAddressIDW(hline, lpdwaddressid as _, dwaddressmode, lpsaddress.param().abi(), dwsize) } } #[inline] pub unsafe fn lineGetAddressStatus(hline: u32, dwaddressid: u32, lpaddressstatus: *mut LINEADDRESSSTATUS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetAddressStatus(hline : u32, dwaddressid : u32, lpaddressstatus : *mut LINEADDRESSSTATUS) -> i32); - unsafe { lineGetAddressStatus(hline, dwaddressid, core::mem::transmute(lpaddressstatus)) } + unsafe { lineGetAddressStatus(hline, dwaddressid, lpaddressstatus as _) } } #[inline] pub unsafe fn lineGetAddressStatusA(hline: u32, dwaddressid: u32, lpaddressstatus: *mut LINEADDRESSSTATUS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetAddressStatusA(hline : u32, dwaddressid : u32, lpaddressstatus : *mut LINEADDRESSSTATUS) -> i32); - unsafe { lineGetAddressStatusA(hline, dwaddressid, core::mem::transmute(lpaddressstatus)) } + unsafe { lineGetAddressStatusA(hline, dwaddressid, lpaddressstatus as _) } } #[inline] pub unsafe fn lineGetAddressStatusW(hline: u32, dwaddressid: u32, lpaddressstatus: *mut LINEADDRESSSTATUS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetAddressStatusW(hline : u32, dwaddressid : u32, lpaddressstatus : *mut LINEADDRESSSTATUS) -> i32); - unsafe { lineGetAddressStatusW(hline, dwaddressid, core::mem::transmute(lpaddressstatus)) } + unsafe { lineGetAddressStatusW(hline, dwaddressid, lpaddressstatus as _) } } #[inline] pub unsafe fn lineGetAgentActivityListA(hline: u32, dwaddressid: u32, lpagentactivitylist: *mut LINEAGENTACTIVITYLIST) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetAgentActivityListA(hline : u32, dwaddressid : u32, lpagentactivitylist : *mut LINEAGENTACTIVITYLIST) -> i32); - unsafe { lineGetAgentActivityListA(hline, dwaddressid, core::mem::transmute(lpagentactivitylist)) } + unsafe { lineGetAgentActivityListA(hline, dwaddressid, lpagentactivitylist as _) } } #[inline] pub unsafe fn lineGetAgentActivityListW(hline: u32, dwaddressid: u32, lpagentactivitylist: *mut LINEAGENTACTIVITYLIST) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetAgentActivityListW(hline : u32, dwaddressid : u32, lpagentactivitylist : *mut LINEAGENTACTIVITYLIST) -> i32); - unsafe { lineGetAgentActivityListW(hline, dwaddressid, core::mem::transmute(lpagentactivitylist)) } + unsafe { lineGetAgentActivityListW(hline, dwaddressid, lpagentactivitylist as _) } } #[inline] pub unsafe fn lineGetAgentCapsA(hlineapp: u32, dwdeviceid: u32, dwaddressid: u32, dwappapiversion: u32, lpagentcaps: *mut LINEAGENTCAPS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetAgentCapsA(hlineapp : u32, dwdeviceid : u32, dwaddressid : u32, dwappapiversion : u32, lpagentcaps : *mut LINEAGENTCAPS) -> i32); - unsafe { lineGetAgentCapsA(hlineapp, dwdeviceid, dwaddressid, dwappapiversion, core::mem::transmute(lpagentcaps)) } + unsafe { lineGetAgentCapsA(hlineapp, dwdeviceid, dwaddressid, dwappapiversion, lpagentcaps as _) } } #[inline] pub unsafe fn lineGetAgentCapsW(hlineapp: u32, dwdeviceid: u32, dwaddressid: u32, dwappapiversion: u32, lpagentcaps: *mut LINEAGENTCAPS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetAgentCapsW(hlineapp : u32, dwdeviceid : u32, dwaddressid : u32, dwappapiversion : u32, lpagentcaps : *mut LINEAGENTCAPS) -> i32); - unsafe { lineGetAgentCapsW(hlineapp, dwdeviceid, dwaddressid, dwappapiversion, core::mem::transmute(lpagentcaps)) } + unsafe { lineGetAgentCapsW(hlineapp, dwdeviceid, dwaddressid, dwappapiversion, lpagentcaps as _) } } #[inline] pub unsafe fn lineGetAgentGroupListA(hline: u32, dwaddressid: u32, lpagentgrouplist: *mut LINEAGENTGROUPLIST) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetAgentGroupListA(hline : u32, dwaddressid : u32, lpagentgrouplist : *mut LINEAGENTGROUPLIST) -> i32); - unsafe { lineGetAgentGroupListA(hline, dwaddressid, core::mem::transmute(lpagentgrouplist)) } + unsafe { lineGetAgentGroupListA(hline, dwaddressid, lpagentgrouplist as _) } } #[inline] pub unsafe fn lineGetAgentGroupListW(hline: u32, dwaddressid: u32, lpagentgrouplist: *mut LINEAGENTGROUPLIST) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetAgentGroupListW(hline : u32, dwaddressid : u32, lpagentgrouplist : *mut LINEAGENTGROUPLIST) -> i32); - unsafe { lineGetAgentGroupListW(hline, dwaddressid, core::mem::transmute(lpagentgrouplist)) } + unsafe { lineGetAgentGroupListW(hline, dwaddressid, lpagentgrouplist as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn lineGetAgentInfo(hline: u32, hagent: u32, lpagentinfo: *mut LINEAGENTINFO) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetAgentInfo(hline : u32, hagent : u32, lpagentinfo : *mut LINEAGENTINFO) -> i32); - unsafe { lineGetAgentInfo(hline, hagent, core::mem::transmute(lpagentinfo)) } + unsafe { lineGetAgentInfo(hline, hagent, lpagentinfo as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn lineGetAgentSessionInfo(hline: u32, hagentsession: u32, lpagentsessioninfo: *mut LINEAGENTSESSIONINFO) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetAgentSessionInfo(hline : u32, hagentsession : u32, lpagentsessioninfo : *mut LINEAGENTSESSIONINFO) -> i32); - unsafe { lineGetAgentSessionInfo(hline, hagentsession, core::mem::transmute(lpagentsessioninfo)) } + unsafe { lineGetAgentSessionInfo(hline, hagentsession, lpagentsessioninfo as _) } } #[inline] pub unsafe fn lineGetAgentSessionList(hline: u32, hagent: u32, lpagentsessionlist: *mut LINEAGENTSESSIONLIST) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetAgentSessionList(hline : u32, hagent : u32, lpagentsessionlist : *mut LINEAGENTSESSIONLIST) -> i32); - unsafe { lineGetAgentSessionList(hline, hagent, core::mem::transmute(lpagentsessionlist)) } + unsafe { lineGetAgentSessionList(hline, hagent, lpagentsessionlist as _) } } #[inline] pub unsafe fn lineGetAgentStatusA(hline: u32, dwaddressid: u32, lpagentstatus: *mut LINEAGENTSTATUS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetAgentStatusA(hline : u32, dwaddressid : u32, lpagentstatus : *mut LINEAGENTSTATUS) -> i32); - unsafe { lineGetAgentStatusA(hline, dwaddressid, core::mem::transmute(lpagentstatus)) } + unsafe { lineGetAgentStatusA(hline, dwaddressid, lpagentstatus as _) } } #[inline] pub unsafe fn lineGetAgentStatusW(hline: u32, dwaddressid: u32, lpagentstatus: *mut LINEAGENTSTATUS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetAgentStatusW(hline : u32, dwaddressid : u32, lpagentstatus : *mut LINEAGENTSTATUS) -> i32); - unsafe { lineGetAgentStatusW(hline, dwaddressid, core::mem::transmute(lpagentstatus)) } + unsafe { lineGetAgentStatusW(hline, dwaddressid, lpagentstatus as _) } } #[inline] pub unsafe fn lineGetAppPriority(lpszappfilename: P0, dwmediamode: u32, lpextensionid: *mut LINEEXTENSIONID, dwrequestmode: u32, lpextensionname: *mut VARSTRING, lpdwpriority: *mut u32) -> i32 @@ -436,7 +436,7 @@ where P0: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineGetAppPriority(lpszappfilename : windows_core::PCSTR, dwmediamode : u32, lpextensionid : *mut LINEEXTENSIONID, dwrequestmode : u32, lpextensionname : *mut VARSTRING, lpdwpriority : *mut u32) -> i32); - unsafe { lineGetAppPriority(lpszappfilename.param().abi(), dwmediamode, core::mem::transmute(lpextensionid), dwrequestmode, core::mem::transmute(lpextensionname), core::mem::transmute(lpdwpriority)) } + unsafe { lineGetAppPriority(lpszappfilename.param().abi(), dwmediamode, lpextensionid as _, dwrequestmode, lpextensionname as _, lpdwpriority as _) } } #[inline] pub unsafe fn lineGetAppPriorityA(lpszappfilename: P0, dwmediamode: u32, lpextensionid: *mut LINEEXTENSIONID, dwrequestmode: u32, lpextensionname: *mut VARSTRING, lpdwpriority: *mut u32) -> i32 @@ -444,7 +444,7 @@ where P0: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineGetAppPriorityA(lpszappfilename : windows_core::PCSTR, dwmediamode : u32, lpextensionid : *mut LINEEXTENSIONID, dwrequestmode : u32, lpextensionname : *mut VARSTRING, lpdwpriority : *mut u32) -> i32); - unsafe { lineGetAppPriorityA(lpszappfilename.param().abi(), dwmediamode, core::mem::transmute(lpextensionid), dwrequestmode, core::mem::transmute(lpextensionname), core::mem::transmute(lpdwpriority)) } + unsafe { lineGetAppPriorityA(lpszappfilename.param().abi(), dwmediamode, lpextensionid as _, dwrequestmode, lpextensionname as _, lpdwpriority as _) } } #[inline] pub unsafe fn lineGetAppPriorityW(lpszappfilename: P0, dwmediamode: u32, lpextensionid: *mut LINEEXTENSIONID, dwrequestmode: u32, lpextensionname: *mut VARSTRING, lpdwpriority: *mut u32) -> i32 @@ -452,62 +452,62 @@ where P0: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineGetAppPriorityW(lpszappfilename : windows_core::PCWSTR, dwmediamode : u32, lpextensionid : *mut LINEEXTENSIONID, dwrequestmode : u32, lpextensionname : *mut VARSTRING, lpdwpriority : *mut u32) -> i32); - unsafe { lineGetAppPriorityW(lpszappfilename.param().abi(), dwmediamode, core::mem::transmute(lpextensionid), dwrequestmode, core::mem::transmute(lpextensionname), core::mem::transmute(lpdwpriority)) } + unsafe { lineGetAppPriorityW(lpszappfilename.param().abi(), dwmediamode, lpextensionid as _, dwrequestmode, lpextensionname as _, lpdwpriority as _) } } #[inline] pub unsafe fn lineGetCallInfo(hcall: u32, lpcallinfo: *mut LINECALLINFO) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetCallInfo(hcall : u32, lpcallinfo : *mut LINECALLINFO) -> i32); - unsafe { lineGetCallInfo(hcall, core::mem::transmute(lpcallinfo)) } + unsafe { lineGetCallInfo(hcall, lpcallinfo as _) } } #[inline] pub unsafe fn lineGetCallInfoA(hcall: u32, lpcallinfo: *mut LINECALLINFO) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetCallInfoA(hcall : u32, lpcallinfo : *mut LINECALLINFO) -> i32); - unsafe { lineGetCallInfoA(hcall, core::mem::transmute(lpcallinfo)) } + unsafe { lineGetCallInfoA(hcall, lpcallinfo as _) } } #[inline] pub unsafe fn lineGetCallInfoW(hcall: u32, lpcallinfo: *mut LINECALLINFO) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetCallInfoW(hcall : u32, lpcallinfo : *mut LINECALLINFO) -> i32); - unsafe { lineGetCallInfoW(hcall, core::mem::transmute(lpcallinfo)) } + unsafe { lineGetCallInfoW(hcall, lpcallinfo as _) } } #[inline] pub unsafe fn lineGetCallStatus(hcall: u32, lpcallstatus: *mut LINECALLSTATUS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetCallStatus(hcall : u32, lpcallstatus : *mut LINECALLSTATUS) -> i32); - unsafe { lineGetCallStatus(hcall, core::mem::transmute(lpcallstatus)) } + unsafe { lineGetCallStatus(hcall, lpcallstatus as _) } } #[inline] pub unsafe fn lineGetConfRelatedCalls(hcall: u32, lpcalllist: *mut LINECALLLIST) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetConfRelatedCalls(hcall : u32, lpcalllist : *mut LINECALLLIST) -> i32); - unsafe { lineGetConfRelatedCalls(hcall, core::mem::transmute(lpcalllist)) } + unsafe { lineGetConfRelatedCalls(hcall, lpcalllist as _) } } #[inline] pub unsafe fn lineGetCountry(dwcountryid: u32, dwapiversion: u32, lplinecountrylist: *mut LINECOUNTRYLIST) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetCountry(dwcountryid : u32, dwapiversion : u32, lplinecountrylist : *mut LINECOUNTRYLIST) -> i32); - unsafe { lineGetCountry(dwcountryid, dwapiversion, core::mem::transmute(lplinecountrylist)) } + unsafe { lineGetCountry(dwcountryid, dwapiversion, lplinecountrylist as _) } } #[inline] pub unsafe fn lineGetCountryA(dwcountryid: u32, dwapiversion: u32, lplinecountrylist: *mut LINECOUNTRYLIST) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetCountryA(dwcountryid : u32, dwapiversion : u32, lplinecountrylist : *mut LINECOUNTRYLIST) -> i32); - unsafe { lineGetCountryA(dwcountryid, dwapiversion, core::mem::transmute(lplinecountrylist)) } + unsafe { lineGetCountryA(dwcountryid, dwapiversion, lplinecountrylist as _) } } #[inline] pub unsafe fn lineGetCountryW(dwcountryid: u32, dwapiversion: u32, lplinecountrylist: *mut LINECOUNTRYLIST) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetCountryW(dwcountryid : u32, dwapiversion : u32, lplinecountrylist : *mut LINECOUNTRYLIST) -> i32); - unsafe { lineGetCountryW(dwcountryid, dwapiversion, core::mem::transmute(lplinecountrylist)) } + unsafe { lineGetCountryW(dwcountryid, dwapiversion, lplinecountrylist as _) } } #[inline] pub unsafe fn lineGetDevCaps(hlineapp: u32, dwdeviceid: u32, dwapiversion: u32, dwextversion: u32, lplinedevcaps: *mut LINEDEVCAPS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetDevCaps(hlineapp : u32, dwdeviceid : u32, dwapiversion : u32, dwextversion : u32, lplinedevcaps : *mut LINEDEVCAPS) -> i32); - unsafe { lineGetDevCaps(hlineapp, dwdeviceid, dwapiversion, dwextversion, core::mem::transmute(lplinedevcaps)) } + unsafe { lineGetDevCaps(hlineapp, dwdeviceid, dwapiversion, dwextversion, lplinedevcaps as _) } } #[inline] pub unsafe fn lineGetDevCapsA(hlineapp: u32, dwdeviceid: u32, dwapiversion: u32, dwextversion: u32, lplinedevcaps: *mut LINEDEVCAPS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetDevCapsA(hlineapp : u32, dwdeviceid : u32, dwapiversion : u32, dwextversion : u32, lplinedevcaps : *mut LINEDEVCAPS) -> i32); - unsafe { lineGetDevCapsA(hlineapp, dwdeviceid, dwapiversion, dwextversion, core::mem::transmute(lplinedevcaps)) } + unsafe { lineGetDevCapsA(hlineapp, dwdeviceid, dwapiversion, dwextversion, lplinedevcaps as _) } } #[inline] pub unsafe fn lineGetDevCapsW(hlineapp: u32, dwdeviceid: u32, dwapiversion: u32, dwextversion: u32, lplinedevcaps: *mut LINEDEVCAPS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetDevCapsW(hlineapp : u32, dwdeviceid : u32, dwapiversion : u32, dwextversion : u32, lplinedevcaps : *mut LINEDEVCAPS) -> i32); - unsafe { lineGetDevCapsW(hlineapp, dwdeviceid, dwapiversion, dwextversion, core::mem::transmute(lplinedevcaps)) } + unsafe { lineGetDevCapsW(hlineapp, dwdeviceid, dwapiversion, dwextversion, lplinedevcaps as _) } } #[inline] pub unsafe fn lineGetDevConfig(dwdeviceid: u32, lpdeviceconfig: *mut VARSTRING, lpszdeviceclass: P2) -> i32 @@ -515,7 +515,7 @@ where P2: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineGetDevConfig(dwdeviceid : u32, lpdeviceconfig : *mut VARSTRING, lpszdeviceclass : windows_core::PCSTR) -> i32); - unsafe { lineGetDevConfig(dwdeviceid, core::mem::transmute(lpdeviceconfig), lpszdeviceclass.param().abi()) } + unsafe { lineGetDevConfig(dwdeviceid, lpdeviceconfig as _, lpszdeviceclass.param().abi()) } } #[inline] pub unsafe fn lineGetDevConfigA(dwdeviceid: u32, lpdeviceconfig: *mut VARSTRING, lpszdeviceclass: P2) -> i32 @@ -523,7 +523,7 @@ where P2: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineGetDevConfigA(dwdeviceid : u32, lpdeviceconfig : *mut VARSTRING, lpszdeviceclass : windows_core::PCSTR) -> i32); - unsafe { lineGetDevConfigA(dwdeviceid, core::mem::transmute(lpdeviceconfig), lpszdeviceclass.param().abi()) } + unsafe { lineGetDevConfigA(dwdeviceid, lpdeviceconfig as _, lpszdeviceclass.param().abi()) } } #[inline] pub unsafe fn lineGetDevConfigW(dwdeviceid: u32, lpdeviceconfig: *mut VARSTRING, lpszdeviceclass: P2) -> i32 @@ -531,17 +531,17 @@ where P2: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineGetDevConfigW(dwdeviceid : u32, lpdeviceconfig : *mut VARSTRING, lpszdeviceclass : windows_core::PCWSTR) -> i32); - unsafe { lineGetDevConfigW(dwdeviceid, core::mem::transmute(lpdeviceconfig), lpszdeviceclass.param().abi()) } + unsafe { lineGetDevConfigW(dwdeviceid, lpdeviceconfig as _, lpszdeviceclass.param().abi()) } } #[inline] pub unsafe fn lineGetGroupListA(hline: u32, lpgrouplist: *mut LINEAGENTGROUPLIST) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetGroupListA(hline : u32, lpgrouplist : *mut LINEAGENTGROUPLIST) -> i32); - unsafe { lineGetGroupListA(hline, core::mem::transmute(lpgrouplist)) } + unsafe { lineGetGroupListA(hline, lpgrouplist as _) } } #[inline] pub unsafe fn lineGetGroupListW(hline: u32, lpgrouplist: *mut LINEAGENTGROUPLIST) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetGroupListW(hline : u32, lpgrouplist : *mut LINEAGENTGROUPLIST) -> i32); - unsafe { lineGetGroupListW(hline, core::mem::transmute(lpgrouplist)) } + unsafe { lineGetGroupListW(hline, lpgrouplist as _) } } #[inline] pub unsafe fn lineGetID(hline: u32, dwaddressid: u32, hcall: u32, dwselect: u32, lpdeviceid: *mut VARSTRING, lpszdeviceclass: P5) -> i32 @@ -549,7 +549,7 @@ where P5: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineGetID(hline : u32, dwaddressid : u32, hcall : u32, dwselect : u32, lpdeviceid : *mut VARSTRING, lpszdeviceclass : windows_core::PCSTR) -> i32); - unsafe { lineGetID(hline, dwaddressid, hcall, dwselect, core::mem::transmute(lpdeviceid), lpszdeviceclass.param().abi()) } + unsafe { lineGetID(hline, dwaddressid, hcall, dwselect, lpdeviceid as _, lpszdeviceclass.param().abi()) } } #[inline] pub unsafe fn lineGetIDA(hline: u32, dwaddressid: u32, hcall: u32, dwselect: u32, lpdeviceid: *mut VARSTRING, lpszdeviceclass: P5) -> i32 @@ -557,7 +557,7 @@ where P5: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineGetIDA(hline : u32, dwaddressid : u32, hcall : u32, dwselect : u32, lpdeviceid : *mut VARSTRING, lpszdeviceclass : windows_core::PCSTR) -> i32); - unsafe { lineGetIDA(hline, dwaddressid, hcall, dwselect, core::mem::transmute(lpdeviceid), lpszdeviceclass.param().abi()) } + unsafe { lineGetIDA(hline, dwaddressid, hcall, dwselect, lpdeviceid as _, lpszdeviceclass.param().abi()) } } #[inline] pub unsafe fn lineGetIDW(hline: u32, dwaddressid: u32, hcall: u32, dwselect: u32, lpdeviceid: *mut VARSTRING, lpszdeviceclass: P5) -> i32 @@ -565,7 +565,7 @@ where P5: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineGetIDW(hline : u32, dwaddressid : u32, hcall : u32, dwselect : u32, lpdeviceid : *mut VARSTRING, lpszdeviceclass : windows_core::PCWSTR) -> i32); - unsafe { lineGetIDW(hline, dwaddressid, hcall, dwselect, core::mem::transmute(lpdeviceid), lpszdeviceclass.param().abi()) } + unsafe { lineGetIDW(hline, dwaddressid, hcall, dwselect, lpdeviceid as _, lpszdeviceclass.param().abi()) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -574,7 +574,7 @@ where P1: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineGetIcon(dwdeviceid : u32, lpszdeviceclass : windows_core::PCSTR, lphicon : *mut super::super::UI::WindowsAndMessaging:: HICON) -> i32); - unsafe { lineGetIcon(dwdeviceid, lpszdeviceclass.param().abi(), core::mem::transmute(lphicon)) } + unsafe { lineGetIcon(dwdeviceid, lpszdeviceclass.param().abi(), lphicon as _) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -583,7 +583,7 @@ where P1: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineGetIconA(dwdeviceid : u32, lpszdeviceclass : windows_core::PCSTR, lphicon : *mut super::super::UI::WindowsAndMessaging:: HICON) -> i32); - unsafe { lineGetIconA(dwdeviceid, lpszdeviceclass.param().abi(), core::mem::transmute(lphicon)) } + unsafe { lineGetIconA(dwdeviceid, lpszdeviceclass.param().abi(), lphicon as _) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -592,107 +592,107 @@ where P1: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineGetIconW(dwdeviceid : u32, lpszdeviceclass : windows_core::PCWSTR, lphicon : *mut super::super::UI::WindowsAndMessaging:: HICON) -> i32); - unsafe { lineGetIconW(dwdeviceid, lpszdeviceclass.param().abi(), core::mem::transmute(lphicon)) } + unsafe { lineGetIconW(dwdeviceid, lpszdeviceclass.param().abi(), lphicon as _) } } #[inline] pub unsafe fn lineGetLineDevStatus(hline: u32, lplinedevstatus: *mut LINEDEVSTATUS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetLineDevStatus(hline : u32, lplinedevstatus : *mut LINEDEVSTATUS) -> i32); - unsafe { lineGetLineDevStatus(hline, core::mem::transmute(lplinedevstatus)) } + unsafe { lineGetLineDevStatus(hline, lplinedevstatus as _) } } #[inline] pub unsafe fn lineGetLineDevStatusA(hline: u32, lplinedevstatus: *mut LINEDEVSTATUS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetLineDevStatusA(hline : u32, lplinedevstatus : *mut LINEDEVSTATUS) -> i32); - unsafe { lineGetLineDevStatusA(hline, core::mem::transmute(lplinedevstatus)) } + unsafe { lineGetLineDevStatusA(hline, lplinedevstatus as _) } } #[inline] pub unsafe fn lineGetLineDevStatusW(hline: u32, lplinedevstatus: *mut LINEDEVSTATUS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetLineDevStatusW(hline : u32, lplinedevstatus : *mut LINEDEVSTATUS) -> i32); - unsafe { lineGetLineDevStatusW(hline, core::mem::transmute(lplinedevstatus)) } + unsafe { lineGetLineDevStatusW(hline, lplinedevstatus as _) } } #[inline] pub unsafe fn lineGetMessage(hlineapp: u32, lpmessage: *mut LINEMESSAGE, dwtimeout: u32) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetMessage(hlineapp : u32, lpmessage : *mut LINEMESSAGE, dwtimeout : u32) -> i32); - unsafe { lineGetMessage(hlineapp, core::mem::transmute(lpmessage), dwtimeout) } + unsafe { lineGetMessage(hlineapp, lpmessage as _, dwtimeout) } } #[inline] pub unsafe fn lineGetNewCalls(hline: u32, dwaddressid: u32, dwselect: u32, lpcalllist: *mut LINECALLLIST) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetNewCalls(hline : u32, dwaddressid : u32, dwselect : u32, lpcalllist : *mut LINECALLLIST) -> i32); - unsafe { lineGetNewCalls(hline, dwaddressid, dwselect, core::mem::transmute(lpcalllist)) } + unsafe { lineGetNewCalls(hline, dwaddressid, dwselect, lpcalllist as _) } } #[inline] pub unsafe fn lineGetNumRings(hline: u32, dwaddressid: u32, lpdwnumrings: *mut u32) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetNumRings(hline : u32, dwaddressid : u32, lpdwnumrings : *mut u32) -> i32); - unsafe { lineGetNumRings(hline, dwaddressid, core::mem::transmute(lpdwnumrings)) } + unsafe { lineGetNumRings(hline, dwaddressid, lpdwnumrings as _) } } #[inline] pub unsafe fn lineGetProviderList(dwapiversion: u32, lpproviderlist: *mut LINEPROVIDERLIST) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetProviderList(dwapiversion : u32, lpproviderlist : *mut LINEPROVIDERLIST) -> i32); - unsafe { lineGetProviderList(dwapiversion, core::mem::transmute(lpproviderlist)) } + unsafe { lineGetProviderList(dwapiversion, lpproviderlist as _) } } #[inline] pub unsafe fn lineGetProviderListA(dwapiversion: u32, lpproviderlist: *mut LINEPROVIDERLIST) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetProviderListA(dwapiversion : u32, lpproviderlist : *mut LINEPROVIDERLIST) -> i32); - unsafe { lineGetProviderListA(dwapiversion, core::mem::transmute(lpproviderlist)) } + unsafe { lineGetProviderListA(dwapiversion, lpproviderlist as _) } } #[inline] pub unsafe fn lineGetProviderListW(dwapiversion: u32, lpproviderlist: *mut LINEPROVIDERLIST) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetProviderListW(dwapiversion : u32, lpproviderlist : *mut LINEPROVIDERLIST) -> i32); - unsafe { lineGetProviderListW(dwapiversion, core::mem::transmute(lpproviderlist)) } + unsafe { lineGetProviderListW(dwapiversion, lpproviderlist as _) } } #[inline] pub unsafe fn lineGetProxyStatus(hlineapp: u32, dwdeviceid: u32, dwappapiversion: u32, lplineproxyreqestlist: *mut LINEPROXYREQUESTLIST) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetProxyStatus(hlineapp : u32, dwdeviceid : u32, dwappapiversion : u32, lplineproxyreqestlist : *mut LINEPROXYREQUESTLIST) -> i32); - unsafe { lineGetProxyStatus(hlineapp, dwdeviceid, dwappapiversion, core::mem::transmute(lplineproxyreqestlist)) } + unsafe { lineGetProxyStatus(hlineapp, dwdeviceid, dwappapiversion, lplineproxyreqestlist as _) } } #[inline] pub unsafe fn lineGetQueueInfo(hline: u32, dwqueueid: u32, lplinequeueinfo: *mut LINEQUEUEINFO) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetQueueInfo(hline : u32, dwqueueid : u32, lplinequeueinfo : *mut LINEQUEUEINFO) -> i32); - unsafe { lineGetQueueInfo(hline, dwqueueid, core::mem::transmute(lplinequeueinfo)) } + unsafe { lineGetQueueInfo(hline, dwqueueid, lplinequeueinfo as _) } } #[inline] pub unsafe fn lineGetQueueListA(hline: u32, lpgroupid: *mut windows_core::GUID, lpqueuelist: *mut LINEQUEUELIST) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetQueueListA(hline : u32, lpgroupid : *mut windows_core::GUID, lpqueuelist : *mut LINEQUEUELIST) -> i32); - unsafe { lineGetQueueListA(hline, core::mem::transmute(lpgroupid), core::mem::transmute(lpqueuelist)) } + unsafe { lineGetQueueListA(hline, lpgroupid as _, lpqueuelist as _) } } #[inline] pub unsafe fn lineGetQueueListW(hline: u32, lpgroupid: *mut windows_core::GUID, lpqueuelist: *mut LINEQUEUELIST) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetQueueListW(hline : u32, lpgroupid : *mut windows_core::GUID, lpqueuelist : *mut LINEQUEUELIST) -> i32); - unsafe { lineGetQueueListW(hline, core::mem::transmute(lpgroupid), core::mem::transmute(lpqueuelist)) } + unsafe { lineGetQueueListW(hline, lpgroupid as _, lpqueuelist as _) } } #[inline] pub unsafe fn lineGetRequest(hlineapp: u32, dwrequestmode: u32, lprequestbuffer: *mut core::ffi::c_void) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetRequest(hlineapp : u32, dwrequestmode : u32, lprequestbuffer : *mut core::ffi::c_void) -> i32); - unsafe { lineGetRequest(hlineapp, dwrequestmode, core::mem::transmute(lprequestbuffer)) } + unsafe { lineGetRequest(hlineapp, dwrequestmode, lprequestbuffer as _) } } #[inline] pub unsafe fn lineGetRequestA(hlineapp: u32, dwrequestmode: u32, lprequestbuffer: *mut core::ffi::c_void) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetRequestA(hlineapp : u32, dwrequestmode : u32, lprequestbuffer : *mut core::ffi::c_void) -> i32); - unsafe { lineGetRequestA(hlineapp, dwrequestmode, core::mem::transmute(lprequestbuffer)) } + unsafe { lineGetRequestA(hlineapp, dwrequestmode, lprequestbuffer as _) } } #[inline] pub unsafe fn lineGetRequestW(hlineapp: u32, dwrequestmode: u32, lprequestbuffer: *mut core::ffi::c_void) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetRequestW(hlineapp : u32, dwrequestmode : u32, lprequestbuffer : *mut core::ffi::c_void) -> i32); - unsafe { lineGetRequestW(hlineapp, dwrequestmode, core::mem::transmute(lprequestbuffer)) } + unsafe { lineGetRequestW(hlineapp, dwrequestmode, lprequestbuffer as _) } } #[inline] pub unsafe fn lineGetStatusMessages(hline: u32, lpdwlinestates: *mut u32, lpdwaddressstates: *mut u32) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetStatusMessages(hline : u32, lpdwlinestates : *mut u32, lpdwaddressstates : *mut u32) -> i32); - unsafe { lineGetStatusMessages(hline, core::mem::transmute(lpdwlinestates), core::mem::transmute(lpdwaddressstates)) } + unsafe { lineGetStatusMessages(hline, lpdwlinestates as _, lpdwaddressstates as _) } } #[inline] pub unsafe fn lineGetTranslateCaps(hlineapp: u32, dwapiversion: u32, lptranslatecaps: *mut LINETRANSLATECAPS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetTranslateCaps(hlineapp : u32, dwapiversion : u32, lptranslatecaps : *mut LINETRANSLATECAPS) -> i32); - unsafe { lineGetTranslateCaps(hlineapp, dwapiversion, core::mem::transmute(lptranslatecaps)) } + unsafe { lineGetTranslateCaps(hlineapp, dwapiversion, lptranslatecaps as _) } } #[inline] pub unsafe fn lineGetTranslateCapsA(hlineapp: u32, dwapiversion: u32, lptranslatecaps: *mut LINETRANSLATECAPS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetTranslateCapsA(hlineapp : u32, dwapiversion : u32, lptranslatecaps : *mut LINETRANSLATECAPS) -> i32); - unsafe { lineGetTranslateCapsA(hlineapp, dwapiversion, core::mem::transmute(lptranslatecaps)) } + unsafe { lineGetTranslateCapsA(hlineapp, dwapiversion, lptranslatecaps as _) } } #[inline] pub unsafe fn lineGetTranslateCapsW(hlineapp: u32, dwapiversion: u32, lptranslatecaps: *mut LINETRANSLATECAPS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineGetTranslateCapsW(hlineapp : u32, dwapiversion : u32, lptranslatecaps : *mut LINETRANSLATECAPS) -> i32); - unsafe { lineGetTranslateCapsW(hlineapp, dwapiversion, core::mem::transmute(lptranslatecaps)) } + unsafe { lineGetTranslateCapsW(hlineapp, dwapiversion, lptranslatecaps as _) } } #[inline] pub unsafe fn lineHandoff(hcall: u32, lpszfilename: P1, dwmediamode: u32) -> i32 @@ -729,7 +729,7 @@ where 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); - unsafe { lineInitialize(core::mem::transmute(lphlineapp), hinstance, lpfncallback, lpszappname.param().abi(), core::mem::transmute(lpdwnumdevs)) } + unsafe { lineInitialize(lphlineapp as _, hinstance, lpfncallback, lpszappname.param().abi(), lpdwnumdevs as _) } } #[inline] 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 @@ -737,7 +737,7 @@ where 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); - unsafe { lineInitializeExA(core::mem::transmute(lphlineapp), hinstance, lpfncallback, lpszfriendlyappname.param().abi(), core::mem::transmute(lpdwnumdevs), core::mem::transmute(lpdwapiversion), core::mem::transmute(lplineinitializeexparams)) } + unsafe { lineInitializeExA(lphlineapp as _, hinstance, lpfncallback, lpszfriendlyappname.param().abi(), lpdwnumdevs as _, lpdwapiversion as _, lplineinitializeexparams as _) } } #[inline] 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 @@ -745,7 +745,7 @@ where 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); - unsafe { lineInitializeExW(core::mem::transmute(lphlineapp), hinstance, lpfncallback, lpszfriendlyappname.param().abi(), core::mem::transmute(lpdwnumdevs), core::mem::transmute(lpdwapiversion), core::mem::transmute(lplineinitializeexparams)) } + unsafe { lineInitializeExW(lphlineapp as _, hinstance, lpfncallback, lpszfriendlyappname.param().abi(), lpdwnumdevs as _, lpdwapiversion as _, lplineinitializeexparams as _) } } #[inline] pub unsafe fn lineMakeCall(hline: u32, lphcall: *mut u32, lpszdestaddress: P2, dwcountrycode: u32, lpcallparams: *const LINECALLPARAMS) -> i32 @@ -753,7 +753,7 @@ where P2: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineMakeCall(hline : u32, lphcall : *mut u32, lpszdestaddress : windows_core::PCSTR, dwcountrycode : u32, lpcallparams : *const LINECALLPARAMS) -> i32); - unsafe { lineMakeCall(hline, core::mem::transmute(lphcall), lpszdestaddress.param().abi(), dwcountrycode, lpcallparams) } + unsafe { lineMakeCall(hline, lphcall as _, lpszdestaddress.param().abi(), dwcountrycode, lpcallparams) } } #[inline] pub unsafe fn lineMakeCallA(hline: u32, lphcall: *mut u32, lpszdestaddress: P2, dwcountrycode: u32, lpcallparams: *const LINECALLPARAMS) -> i32 @@ -761,7 +761,7 @@ where P2: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineMakeCallA(hline : u32, lphcall : *mut u32, lpszdestaddress : windows_core::PCSTR, dwcountrycode : u32, lpcallparams : *const LINECALLPARAMS) -> i32); - unsafe { lineMakeCallA(hline, core::mem::transmute(lphcall), lpszdestaddress.param().abi(), dwcountrycode, lpcallparams) } + unsafe { lineMakeCallA(hline, lphcall as _, lpszdestaddress.param().abi(), dwcountrycode, lpcallparams) } } #[inline] pub unsafe fn lineMakeCallW(hline: u32, lphcall: *mut u32, lpszdestaddress: P2, dwcountrycode: u32, lpcallparams: *const LINECALLPARAMS) -> i32 @@ -769,7 +769,7 @@ where P2: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineMakeCallW(hline : u32, lphcall : *mut u32, lpszdestaddress : windows_core::PCWSTR, dwcountrycode : u32, lpcallparams : *const LINECALLPARAMS) -> i32); - unsafe { lineMakeCallW(hline, core::mem::transmute(lphcall), lpszdestaddress.param().abi(), dwcountrycode, lpcallparams) } + unsafe { lineMakeCallW(hline, lphcall as _, lpszdestaddress.param().abi(), dwcountrycode, lpcallparams) } } #[inline] pub unsafe fn lineMonitorDigits(hcall: u32, dwdigitmodes: u32) -> i32 { @@ -789,27 +789,27 @@ pub unsafe fn lineMonitorTones(hcall: u32, lptonelist: *const LINEMONITORTONE, d #[inline] pub unsafe fn lineNegotiateAPIVersion(hlineapp: u32, dwdeviceid: u32, dwapilowversion: u32, dwapihighversion: u32, lpdwapiversion: *mut u32, lpextensionid: *mut LINEEXTENSIONID) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineNegotiateAPIVersion(hlineapp : u32, dwdeviceid : u32, dwapilowversion : u32, dwapihighversion : u32, lpdwapiversion : *mut u32, lpextensionid : *mut LINEEXTENSIONID) -> i32); - unsafe { lineNegotiateAPIVersion(hlineapp, dwdeviceid, dwapilowversion, dwapihighversion, core::mem::transmute(lpdwapiversion), core::mem::transmute(lpextensionid)) } + unsafe { lineNegotiateAPIVersion(hlineapp, dwdeviceid, dwapilowversion, dwapihighversion, lpdwapiversion as _, lpextensionid as _) } } #[inline] pub unsafe fn lineNegotiateExtVersion(hlineapp: u32, dwdeviceid: u32, dwapiversion: u32, dwextlowversion: u32, dwexthighversion: u32, lpdwextversion: *mut u32) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineNegotiateExtVersion(hlineapp : u32, dwdeviceid : u32, dwapiversion : u32, dwextlowversion : u32, dwexthighversion : u32, lpdwextversion : *mut u32) -> i32); - unsafe { lineNegotiateExtVersion(hlineapp, dwdeviceid, dwapiversion, dwextlowversion, dwexthighversion, core::mem::transmute(lpdwextversion)) } + unsafe { lineNegotiateExtVersion(hlineapp, dwdeviceid, dwapiversion, dwextlowversion, dwexthighversion, lpdwextversion as _) } } #[inline] pub unsafe fn lineOpen(hlineapp: u32, dwdeviceid: u32, lphline: *mut u32, dwapiversion: u32, dwextversion: u32, dwcallbackinstance: usize, dwprivileges: u32, dwmediamodes: u32, lpcallparams: *const LINECALLPARAMS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineOpen(hlineapp : u32, dwdeviceid : u32, lphline : *mut u32, dwapiversion : u32, dwextversion : u32, dwcallbackinstance : usize, dwprivileges : u32, dwmediamodes : u32, lpcallparams : *const LINECALLPARAMS) -> i32); - unsafe { lineOpen(hlineapp, dwdeviceid, core::mem::transmute(lphline), dwapiversion, dwextversion, dwcallbackinstance, dwprivileges, dwmediamodes, lpcallparams) } + unsafe { lineOpen(hlineapp, dwdeviceid, lphline as _, dwapiversion, dwextversion, dwcallbackinstance, dwprivileges, dwmediamodes, lpcallparams) } } #[inline] pub unsafe fn lineOpenA(hlineapp: u32, dwdeviceid: u32, lphline: *mut u32, dwapiversion: u32, dwextversion: u32, dwcallbackinstance: usize, dwprivileges: u32, dwmediamodes: u32, lpcallparams: *const LINECALLPARAMS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineOpenA(hlineapp : u32, dwdeviceid : u32, lphline : *mut u32, dwapiversion : u32, dwextversion : u32, dwcallbackinstance : usize, dwprivileges : u32, dwmediamodes : u32, lpcallparams : *const LINECALLPARAMS) -> i32); - unsafe { lineOpenA(hlineapp, dwdeviceid, core::mem::transmute(lphline), dwapiversion, dwextversion, dwcallbackinstance, dwprivileges, dwmediamodes, lpcallparams) } + unsafe { lineOpenA(hlineapp, dwdeviceid, lphline as _, dwapiversion, dwextversion, dwcallbackinstance, dwprivileges, dwmediamodes, lpcallparams) } } #[inline] pub unsafe fn lineOpenW(hlineapp: u32, dwdeviceid: u32, lphline: *mut u32, dwapiversion: u32, dwextversion: u32, dwcallbackinstance: usize, dwprivileges: u32, dwmediamodes: u32, lpcallparams: *const LINECALLPARAMS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineOpenW(hlineapp : u32, dwdeviceid : u32, lphline : *mut u32, dwapiversion : u32, dwextversion : u32, dwcallbackinstance : usize, dwprivileges : u32, dwmediamodes : u32, lpcallparams : *const LINECALLPARAMS) -> i32); - unsafe { lineOpenW(hlineapp, dwdeviceid, core::mem::transmute(lphline), dwapiversion, dwextversion, dwcallbackinstance, dwprivileges, dwmediamodes, lpcallparams) } + unsafe { lineOpenW(hlineapp, dwdeviceid, lphline as _, dwapiversion, dwextversion, dwcallbackinstance, dwprivileges, dwmediamodes, lpcallparams) } } #[inline] pub unsafe fn linePark(hcall: u32, dwparkmode: u32, lpszdiraddress: P2, lpnondiraddress: *mut VARSTRING) -> i32 @@ -817,7 +817,7 @@ where P2: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn linePark(hcall : u32, dwparkmode : u32, lpszdiraddress : windows_core::PCSTR, lpnondiraddress : *mut VARSTRING) -> i32); - unsafe { linePark(hcall, dwparkmode, lpszdiraddress.param().abi(), core::mem::transmute(lpnondiraddress)) } + unsafe { linePark(hcall, dwparkmode, lpszdiraddress.param().abi(), lpnondiraddress as _) } } #[inline] pub unsafe fn lineParkA(hcall: u32, dwparkmode: u32, lpszdiraddress: P2, lpnondiraddress: *mut VARSTRING) -> i32 @@ -825,7 +825,7 @@ where P2: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineParkA(hcall : u32, dwparkmode : u32, lpszdiraddress : windows_core::PCSTR, lpnondiraddress : *mut VARSTRING) -> i32); - unsafe { lineParkA(hcall, dwparkmode, lpszdiraddress.param().abi(), core::mem::transmute(lpnondiraddress)) } + unsafe { lineParkA(hcall, dwparkmode, lpszdiraddress.param().abi(), lpnondiraddress as _) } } #[inline] pub unsafe fn lineParkW(hcall: u32, dwparkmode: u32, lpszdiraddress: P2, lpnondiraddress: *mut VARSTRING) -> i32 @@ -833,7 +833,7 @@ where P2: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineParkW(hcall : u32, dwparkmode : u32, lpszdiraddress : windows_core::PCWSTR, lpnondiraddress : *mut VARSTRING) -> i32); - unsafe { lineParkW(hcall, dwparkmode, lpszdiraddress.param().abi(), core::mem::transmute(lpnondiraddress)) } + unsafe { lineParkW(hcall, dwparkmode, lpszdiraddress.param().abi(), lpnondiraddress as _) } } #[inline] pub unsafe fn linePickup(hline: u32, dwaddressid: u32, lphcall: *mut u32, lpszdestaddress: P3, lpszgroupid: P4) -> i32 @@ -842,7 +842,7 @@ where P4: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn linePickup(hline : u32, dwaddressid : u32, lphcall : *mut u32, lpszdestaddress : windows_core::PCSTR, lpszgroupid : windows_core::PCSTR) -> i32); - unsafe { linePickup(hline, dwaddressid, core::mem::transmute(lphcall), lpszdestaddress.param().abi(), lpszgroupid.param().abi()) } + unsafe { linePickup(hline, dwaddressid, lphcall as _, lpszdestaddress.param().abi(), lpszgroupid.param().abi()) } } #[inline] pub unsafe fn linePickupA(hline: u32, dwaddressid: u32, lphcall: *mut u32, lpszdestaddress: P3, lpszgroupid: P4) -> i32 @@ -851,7 +851,7 @@ where P4: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn linePickupA(hline : u32, dwaddressid : u32, lphcall : *mut u32, lpszdestaddress : windows_core::PCSTR, lpszgroupid : windows_core::PCSTR) -> i32); - unsafe { linePickupA(hline, dwaddressid, core::mem::transmute(lphcall), lpszdestaddress.param().abi(), lpszgroupid.param().abi()) } + unsafe { linePickupA(hline, dwaddressid, lphcall as _, lpszdestaddress.param().abi(), lpszgroupid.param().abi()) } } #[inline] pub unsafe fn linePickupW(hline: u32, dwaddressid: u32, lphcall: *mut u32, lpszdestaddress: P3, lpszgroupid: P4) -> i32 @@ -860,22 +860,22 @@ where P4: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn linePickupW(hline : u32, dwaddressid : u32, lphcall : *mut u32, lpszdestaddress : windows_core::PCWSTR, lpszgroupid : windows_core::PCWSTR) -> i32); - unsafe { linePickupW(hline, dwaddressid, core::mem::transmute(lphcall), lpszdestaddress.param().abi(), lpszgroupid.param().abi()) } + unsafe { linePickupW(hline, dwaddressid, lphcall as _, lpszdestaddress.param().abi(), lpszgroupid.param().abi()) } } #[inline] pub unsafe fn linePrepareAddToConference(hconfcall: u32, lphconsultcall: *mut u32, lpcallparams: *const LINECALLPARAMS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn linePrepareAddToConference(hconfcall : u32, lphconsultcall : *mut u32, lpcallparams : *const LINECALLPARAMS) -> i32); - unsafe { linePrepareAddToConference(hconfcall, core::mem::transmute(lphconsultcall), lpcallparams) } + unsafe { linePrepareAddToConference(hconfcall, lphconsultcall as _, lpcallparams) } } #[inline] pub unsafe fn linePrepareAddToConferenceA(hconfcall: u32, lphconsultcall: *mut u32, lpcallparams: *const LINECALLPARAMS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn linePrepareAddToConferenceA(hconfcall : u32, lphconsultcall : *mut u32, lpcallparams : *const LINECALLPARAMS) -> i32); - unsafe { linePrepareAddToConferenceA(hconfcall, core::mem::transmute(lphconsultcall), lpcallparams) } + unsafe { linePrepareAddToConferenceA(hconfcall, lphconsultcall as _, lpcallparams) } } #[inline] pub unsafe fn linePrepareAddToConferenceW(hconfcall: u32, lphconsultcall: *mut u32, lpcallparams: *const LINECALLPARAMS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn linePrepareAddToConferenceW(hconfcall : u32, lphconsultcall : *mut u32, lpcallparams : *const LINECALLPARAMS) -> i32); - unsafe { linePrepareAddToConferenceW(hconfcall, core::mem::transmute(lphconsultcall), lpcallparams) } + unsafe { linePrepareAddToConferenceW(hconfcall, lphconsultcall as _, lpcallparams) } } #[inline] pub unsafe fn lineProxyMessage(hline: u32, hcall: u32, dwmsg: u32, dwparam1: u32, dwparam2: u32, dwparam3: u32) -> i32 { @@ -886,7 +886,7 @@ pub unsafe fn lineProxyMessage(hline: u32, hcall: u32, dwmsg: u32, dwparam1: u32 #[inline] pub unsafe fn lineProxyResponse(hline: u32, lpproxyrequest: *mut LINEPROXYREQUEST, dwresult: u32) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineProxyResponse(hline : u32, lpproxyrequest : *mut LINEPROXYREQUEST, dwresult : u32) -> i32); - unsafe { lineProxyResponse(hline, core::mem::transmute(lpproxyrequest), dwresult) } + unsafe { lineProxyResponse(hline, lpproxyrequest as _, dwresult) } } #[inline] pub unsafe fn lineRedirect(hcall: u32, lpszdestaddress: P1, dwcountrycode: u32) -> i32 @@ -953,7 +953,7 @@ pub unsafe fn lineSetAgentActivity(hline: u32, dwaddressid: u32, dwactivityid: u #[inline] pub unsafe fn lineSetAgentGroup(hline: u32, dwaddressid: u32, lpagentgrouplist: *mut LINEAGENTGROUPLIST) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineSetAgentGroup(hline : u32, dwaddressid : u32, lpagentgrouplist : *mut LINEAGENTGROUPLIST) -> i32); - unsafe { lineSetAgentGroup(hline, dwaddressid, core::mem::transmute(lpagentgrouplist)) } + unsafe { lineSetAgentGroup(hline, dwaddressid, lpagentgrouplist as _) } } #[inline] pub unsafe fn lineSetAgentMeasurementPeriod(hline: u32, hagent: u32, dwmeasurementperiod: u32) -> i32 { @@ -982,7 +982,7 @@ where P4: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineSetAppPriority(lpszappfilename : windows_core::PCSTR, dwmediamode : u32, lpextensionid : *mut LINEEXTENSIONID, dwrequestmode : u32, lpszextensionname : windows_core::PCSTR, dwpriority : u32) -> i32); - unsafe { lineSetAppPriority(lpszappfilename.param().abi(), dwmediamode, core::mem::transmute(lpextensionid), dwrequestmode, lpszextensionname.param().abi(), dwpriority) } + unsafe { lineSetAppPriority(lpszappfilename.param().abi(), dwmediamode, lpextensionid as _, dwrequestmode, lpszextensionname.param().abi(), dwpriority) } } #[inline] pub unsafe fn lineSetAppPriorityA(lpszappfilename: P0, dwmediamode: u32, lpextensionid: *mut LINEEXTENSIONID, dwrequestmode: u32, lpszextensionname: P4, dwpriority: u32) -> i32 @@ -991,7 +991,7 @@ where P4: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineSetAppPriorityA(lpszappfilename : windows_core::PCSTR, dwmediamode : u32, lpextensionid : *mut LINEEXTENSIONID, dwrequestmode : u32, lpszextensionname : windows_core::PCSTR, dwpriority : u32) -> i32); - unsafe { lineSetAppPriorityA(lpszappfilename.param().abi(), dwmediamode, core::mem::transmute(lpextensionid), dwrequestmode, lpszextensionname.param().abi(), dwpriority) } + unsafe { lineSetAppPriorityA(lpszappfilename.param().abi(), dwmediamode, lpextensionid as _, dwrequestmode, lpszextensionname.param().abi(), dwpriority) } } #[inline] pub unsafe fn lineSetAppPriorityW(lpszappfilename: P0, dwmediamode: u32, lpextensionid: *mut LINEEXTENSIONID, dwrequestmode: u32, lpszextensionname: P4, dwpriority: u32) -> i32 @@ -1000,7 +1000,7 @@ where P4: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineSetAppPriorityW(lpszappfilename : windows_core::PCWSTR, dwmediamode : u32, lpextensionid : *mut LINEEXTENSIONID, dwrequestmode : u32, lpszextensionname : windows_core::PCWSTR, dwpriority : u32) -> i32); - unsafe { lineSetAppPriorityW(lpszappfilename.param().abi(), dwmediamode, core::mem::transmute(lpextensionid), dwrequestmode, lpszextensionname.param().abi(), dwpriority) } + unsafe { lineSetAppPriorityW(lpszappfilename.param().abi(), dwmediamode, lpextensionid as _, dwrequestmode, lpszextensionname.param().abi(), dwpriority) } } #[inline] pub unsafe fn lineSetAppSpecific(hcall: u32, dwappspecific: u32) -> i32 { @@ -1010,7 +1010,7 @@ pub unsafe fn lineSetAppSpecific(hcall: u32, dwappspecific: u32) -> i32 { #[inline] pub unsafe fn lineSetCallData(hcall: u32, lpcalldata: *mut core::ffi::c_void, dwsize: u32) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineSetCallData(hcall : u32, lpcalldata : *mut core::ffi::c_void, dwsize : u32) -> i32); - unsafe { lineSetCallData(hcall, core::mem::transmute(lpcalldata), dwsize) } + unsafe { lineSetCallData(hcall, lpcalldata as _, dwsize) } } #[inline] pub unsafe fn lineSetCallParams(hcall: u32, dwbearermode: u32, dwminrate: u32, dwmaxrate: u32, lpdialparams: *const LINEDIALPARAMS) -> i32 { @@ -1025,7 +1025,7 @@ pub unsafe fn lineSetCallPrivilege(hcall: u32, dwcallprivilege: u32) -> i32 { #[inline] pub unsafe fn lineSetCallQualityOfService(hcall: u32, lpsendingflowspec: *mut core::ffi::c_void, dwsendingflowspecsize: u32, lpreceivingflowspec: *mut core::ffi::c_void, dwreceivingflowspecsize: u32) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineSetCallQualityOfService(hcall : u32, lpsendingflowspec : *mut core::ffi::c_void, dwsendingflowspecsize : u32, lpreceivingflowspec : *mut core::ffi::c_void, dwreceivingflowspecsize : u32) -> i32); - unsafe { lineSetCallQualityOfService(hcall, core::mem::transmute(lpsendingflowspec), dwsendingflowspecsize, core::mem::transmute(lpreceivingflowspec), dwreceivingflowspecsize) } + unsafe { lineSetCallQualityOfService(hcall, lpsendingflowspec as _, dwsendingflowspecsize, lpreceivingflowspec as _, dwreceivingflowspecsize) } } #[inline] pub unsafe fn lineSetCallTreatment(hcall: u32, dwtreatment: u32) -> i32 { @@ -1123,32 +1123,32 @@ where #[inline] pub unsafe fn lineSetupConference(hcall: u32, hline: u32, lphconfcall: *mut u32, lphconsultcall: *mut u32, dwnumparties: u32, lpcallparams: *const LINECALLPARAMS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineSetupConference(hcall : u32, hline : u32, lphconfcall : *mut u32, lphconsultcall : *mut u32, dwnumparties : u32, lpcallparams : *const LINECALLPARAMS) -> i32); - unsafe { lineSetupConference(hcall, hline, core::mem::transmute(lphconfcall), core::mem::transmute(lphconsultcall), dwnumparties, lpcallparams) } + unsafe { lineSetupConference(hcall, hline, lphconfcall as _, lphconsultcall as _, dwnumparties, lpcallparams) } } #[inline] pub unsafe fn lineSetupConferenceA(hcall: u32, hline: u32, lphconfcall: *mut u32, lphconsultcall: *mut u32, dwnumparties: u32, lpcallparams: *const LINECALLPARAMS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineSetupConferenceA(hcall : u32, hline : u32, lphconfcall : *mut u32, lphconsultcall : *mut u32, dwnumparties : u32, lpcallparams : *const LINECALLPARAMS) -> i32); - unsafe { lineSetupConferenceA(hcall, hline, core::mem::transmute(lphconfcall), core::mem::transmute(lphconsultcall), dwnumparties, lpcallparams) } + unsafe { lineSetupConferenceA(hcall, hline, lphconfcall as _, lphconsultcall as _, dwnumparties, lpcallparams) } } #[inline] pub unsafe fn lineSetupConferenceW(hcall: u32, hline: u32, lphconfcall: *mut u32, lphconsultcall: *mut u32, dwnumparties: u32, lpcallparams: *const LINECALLPARAMS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineSetupConferenceW(hcall : u32, hline : u32, lphconfcall : *mut u32, lphconsultcall : *mut u32, dwnumparties : u32, lpcallparams : *const LINECALLPARAMS) -> i32); - unsafe { lineSetupConferenceW(hcall, hline, core::mem::transmute(lphconfcall), core::mem::transmute(lphconsultcall), dwnumparties, lpcallparams) } + unsafe { lineSetupConferenceW(hcall, hline, lphconfcall as _, lphconsultcall as _, dwnumparties, lpcallparams) } } #[inline] pub unsafe fn lineSetupTransfer(hcall: u32, lphconsultcall: *mut u32, lpcallparams: *const LINECALLPARAMS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineSetupTransfer(hcall : u32, lphconsultcall : *mut u32, lpcallparams : *const LINECALLPARAMS) -> i32); - unsafe { lineSetupTransfer(hcall, core::mem::transmute(lphconsultcall), lpcallparams) } + unsafe { lineSetupTransfer(hcall, lphconsultcall as _, lpcallparams) } } #[inline] pub unsafe fn lineSetupTransferA(hcall: u32, lphconsultcall: *mut u32, lpcallparams: *const LINECALLPARAMS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineSetupTransferA(hcall : u32, lphconsultcall : *mut u32, lpcallparams : *const LINECALLPARAMS) -> i32); - unsafe { lineSetupTransferA(hcall, core::mem::transmute(lphconsultcall), lpcallparams) } + unsafe { lineSetupTransferA(hcall, lphconsultcall as _, lpcallparams) } } #[inline] pub unsafe fn lineSetupTransferW(hcall: u32, lphconsultcall: *mut u32, lpcallparams: *const LINECALLPARAMS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineSetupTransferW(hcall : u32, lphconsultcall : *mut u32, lpcallparams : *const LINECALLPARAMS) -> i32); - unsafe { lineSetupTransferW(hcall, core::mem::transmute(lphconsultcall), lpcallparams) } + unsafe { lineSetupTransferW(hcall, lphconsultcall as _, lpcallparams) } } #[inline] pub unsafe fn lineShutdown(hlineapp: u32) -> i32 { @@ -1166,7 +1166,7 @@ where P3: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineTranslateAddress(hlineapp : u32, dwdeviceid : u32, dwapiversion : u32, lpszaddressin : windows_core::PCSTR, dwcard : u32, dwtranslateoptions : u32, lptranslateoutput : *mut LINETRANSLATEOUTPUT) -> i32); - unsafe { lineTranslateAddress(hlineapp, dwdeviceid, dwapiversion, lpszaddressin.param().abi(), dwcard, dwtranslateoptions, core::mem::transmute(lptranslateoutput)) } + unsafe { lineTranslateAddress(hlineapp, dwdeviceid, dwapiversion, lpszaddressin.param().abi(), dwcard, dwtranslateoptions, lptranslateoutput as _) } } #[inline] pub unsafe fn lineTranslateAddressA(hlineapp: u32, dwdeviceid: u32, dwapiversion: u32, lpszaddressin: P3, dwcard: u32, dwtranslateoptions: u32, lptranslateoutput: *mut LINETRANSLATEOUTPUT) -> i32 @@ -1174,7 +1174,7 @@ where P3: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineTranslateAddressA(hlineapp : u32, dwdeviceid : u32, dwapiversion : u32, lpszaddressin : windows_core::PCSTR, dwcard : u32, dwtranslateoptions : u32, lptranslateoutput : *mut LINETRANSLATEOUTPUT) -> i32); - unsafe { lineTranslateAddressA(hlineapp, dwdeviceid, dwapiversion, lpszaddressin.param().abi(), dwcard, dwtranslateoptions, core::mem::transmute(lptranslateoutput)) } + unsafe { lineTranslateAddressA(hlineapp, dwdeviceid, dwapiversion, lpszaddressin.param().abi(), dwcard, dwtranslateoptions, lptranslateoutput as _) } } #[inline] pub unsafe fn lineTranslateAddressW(hlineapp: u32, dwdeviceid: u32, dwapiversion: u32, lpszaddressin: P3, dwcard: u32, dwtranslateoptions: u32, lptranslateoutput: *mut LINETRANSLATEOUTPUT) -> i32 @@ -1182,7 +1182,7 @@ where P3: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineTranslateAddressW(hlineapp : u32, dwdeviceid : u32, dwapiversion : u32, lpszaddressin : windows_core::PCWSTR, dwcard : u32, dwtranslateoptions : u32, lptranslateoutput : *mut LINETRANSLATEOUTPUT) -> i32); - unsafe { lineTranslateAddressW(hlineapp, dwdeviceid, dwapiversion, lpszaddressin.param().abi(), dwcard, dwtranslateoptions, core::mem::transmute(lptranslateoutput)) } + unsafe { lineTranslateAddressW(hlineapp, dwdeviceid, dwapiversion, lpszaddressin.param().abi(), dwcard, dwtranslateoptions, lptranslateoutput as _) } } #[inline] pub unsafe fn lineTranslateDialog(hlineapp: u32, dwdeviceid: u32, dwapiversion: u32, hwndowner: super::super::Foundation::HWND, lpszaddressin: P4) -> i32 @@ -1224,7 +1224,7 @@ where P3: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineUnpark(hline : u32, dwaddressid : u32, lphcall : *mut u32, lpszdestaddress : windows_core::PCSTR) -> i32); - unsafe { lineUnpark(hline, dwaddressid, core::mem::transmute(lphcall), lpszdestaddress.param().abi()) } + unsafe { lineUnpark(hline, dwaddressid, lphcall as _, lpszdestaddress.param().abi()) } } #[inline] pub unsafe fn lineUnparkA(hline: u32, dwaddressid: u32, lphcall: *mut u32, lpszdestaddress: P3) -> i32 @@ -1232,7 +1232,7 @@ where P3: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineUnparkA(hline : u32, dwaddressid : u32, lphcall : *mut u32, lpszdestaddress : windows_core::PCSTR) -> i32); - unsafe { lineUnparkA(hline, dwaddressid, core::mem::transmute(lphcall), lpszdestaddress.param().abi()) } + unsafe { lineUnparkA(hline, dwaddressid, lphcall as _, lpszdestaddress.param().abi()) } } #[inline] pub unsafe fn lineUnparkW(hline: u32, dwaddressid: u32, lphcall: *mut u32, lpszdestaddress: P3) -> i32 @@ -1240,7 +1240,7 @@ where P3: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineUnparkW(hline : u32, dwaddressid : u32, lphcall : *mut u32, lpszdestaddress : windows_core::PCWSTR) -> i32); - unsafe { lineUnparkW(hline, dwaddressid, core::mem::transmute(lphcall), lpszdestaddress.param().abi()) } + unsafe { lineUnparkW(hline, dwaddressid, lphcall as _, lpszdestaddress.param().abi()) } } #[inline] pub unsafe fn phoneClose(hphone: u32) -> i32 { @@ -1274,57 +1274,57 @@ where #[inline] pub unsafe fn phoneDevSpecific(hphone: u32, lpparams: *mut core::ffi::c_void, dwsize: u32) -> i32 { windows_targets::link!("tapi32.dll" "system" fn phoneDevSpecific(hphone : u32, lpparams : *mut core::ffi::c_void, dwsize : u32) -> i32); - unsafe { phoneDevSpecific(hphone, core::mem::transmute(lpparams), dwsize) } + unsafe { phoneDevSpecific(hphone, lpparams as _, dwsize) } } #[inline] pub unsafe fn phoneGetButtonInfo(hphone: u32, dwbuttonlampid: u32, lpbuttoninfo: *mut PHONEBUTTONINFO) -> i32 { windows_targets::link!("tapi32.dll" "system" fn phoneGetButtonInfo(hphone : u32, dwbuttonlampid : u32, lpbuttoninfo : *mut PHONEBUTTONINFO) -> i32); - unsafe { phoneGetButtonInfo(hphone, dwbuttonlampid, core::mem::transmute(lpbuttoninfo)) } + unsafe { phoneGetButtonInfo(hphone, dwbuttonlampid, lpbuttoninfo as _) } } #[inline] pub unsafe fn phoneGetButtonInfoA(hphone: u32, dwbuttonlampid: u32, lpbuttoninfo: *mut PHONEBUTTONINFO) -> i32 { windows_targets::link!("tapi32.dll" "system" fn phoneGetButtonInfoA(hphone : u32, dwbuttonlampid : u32, lpbuttoninfo : *mut PHONEBUTTONINFO) -> i32); - unsafe { phoneGetButtonInfoA(hphone, dwbuttonlampid, core::mem::transmute(lpbuttoninfo)) } + unsafe { phoneGetButtonInfoA(hphone, dwbuttonlampid, lpbuttoninfo as _) } } #[inline] pub unsafe fn phoneGetButtonInfoW(hphone: u32, dwbuttonlampid: u32, lpbuttoninfo: *mut PHONEBUTTONINFO) -> i32 { windows_targets::link!("tapi32.dll" "system" fn phoneGetButtonInfoW(hphone : u32, dwbuttonlampid : u32, lpbuttoninfo : *mut PHONEBUTTONINFO) -> i32); - unsafe { phoneGetButtonInfoW(hphone, dwbuttonlampid, core::mem::transmute(lpbuttoninfo)) } + unsafe { phoneGetButtonInfoW(hphone, dwbuttonlampid, lpbuttoninfo as _) } } #[inline] pub unsafe fn phoneGetData(hphone: u32, dwdataid: u32, lpdata: *mut core::ffi::c_void, dwsize: u32) -> i32 { windows_targets::link!("tapi32.dll" "system" fn phoneGetData(hphone : u32, dwdataid : u32, lpdata : *mut core::ffi::c_void, dwsize : u32) -> i32); - unsafe { phoneGetData(hphone, dwdataid, core::mem::transmute(lpdata), dwsize) } + unsafe { phoneGetData(hphone, dwdataid, lpdata as _, dwsize) } } #[inline] pub unsafe fn phoneGetDevCaps(hphoneapp: u32, dwdeviceid: u32, dwapiversion: u32, dwextversion: u32, lpphonecaps: *mut PHONECAPS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn phoneGetDevCaps(hphoneapp : u32, dwdeviceid : u32, dwapiversion : u32, dwextversion : u32, lpphonecaps : *mut PHONECAPS) -> i32); - unsafe { phoneGetDevCaps(hphoneapp, dwdeviceid, dwapiversion, dwextversion, core::mem::transmute(lpphonecaps)) } + unsafe { phoneGetDevCaps(hphoneapp, dwdeviceid, dwapiversion, dwextversion, lpphonecaps as _) } } #[inline] pub unsafe fn phoneGetDevCapsA(hphoneapp: u32, dwdeviceid: u32, dwapiversion: u32, dwextversion: u32, lpphonecaps: *mut PHONECAPS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn phoneGetDevCapsA(hphoneapp : u32, dwdeviceid : u32, dwapiversion : u32, dwextversion : u32, lpphonecaps : *mut PHONECAPS) -> i32); - unsafe { phoneGetDevCapsA(hphoneapp, dwdeviceid, dwapiversion, dwextversion, core::mem::transmute(lpphonecaps)) } + unsafe { phoneGetDevCapsA(hphoneapp, dwdeviceid, dwapiversion, dwextversion, lpphonecaps as _) } } #[inline] pub unsafe fn phoneGetDevCapsW(hphoneapp: u32, dwdeviceid: u32, dwapiversion: u32, dwextversion: u32, lpphonecaps: *mut PHONECAPS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn phoneGetDevCapsW(hphoneapp : u32, dwdeviceid : u32, dwapiversion : u32, dwextversion : u32, lpphonecaps : *mut PHONECAPS) -> i32); - unsafe { phoneGetDevCapsW(hphoneapp, dwdeviceid, dwapiversion, dwextversion, core::mem::transmute(lpphonecaps)) } + unsafe { phoneGetDevCapsW(hphoneapp, dwdeviceid, dwapiversion, dwextversion, lpphonecaps as _) } } #[inline] pub unsafe fn phoneGetDisplay(hphone: u32, lpdisplay: *mut VARSTRING) -> i32 { windows_targets::link!("tapi32.dll" "system" fn phoneGetDisplay(hphone : u32, lpdisplay : *mut VARSTRING) -> i32); - unsafe { phoneGetDisplay(hphone, core::mem::transmute(lpdisplay)) } + unsafe { phoneGetDisplay(hphone, lpdisplay as _) } } #[inline] pub unsafe fn phoneGetGain(hphone: u32, dwhookswitchdev: u32, lpdwgain: *mut u32) -> i32 { windows_targets::link!("tapi32.dll" "system" fn phoneGetGain(hphone : u32, dwhookswitchdev : u32, lpdwgain : *mut u32) -> i32); - unsafe { phoneGetGain(hphone, dwhookswitchdev, core::mem::transmute(lpdwgain)) } + unsafe { phoneGetGain(hphone, dwhookswitchdev, lpdwgain as _) } } #[inline] pub unsafe fn phoneGetHookSwitch(hphone: u32, lpdwhookswitchdevs: *mut u32) -> i32 { windows_targets::link!("tapi32.dll" "system" fn phoneGetHookSwitch(hphone : u32, lpdwhookswitchdevs : *mut u32) -> i32); - unsafe { phoneGetHookSwitch(hphone, core::mem::transmute(lpdwhookswitchdevs)) } + unsafe { phoneGetHookSwitch(hphone, lpdwhookswitchdevs as _) } } #[inline] pub unsafe fn phoneGetID(hphone: u32, lpdeviceid: *mut VARSTRING, lpszdeviceclass: P2) -> i32 @@ -1332,7 +1332,7 @@ where P2: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn phoneGetID(hphone : u32, lpdeviceid : *mut VARSTRING, lpszdeviceclass : windows_core::PCSTR) -> i32); - unsafe { phoneGetID(hphone, core::mem::transmute(lpdeviceid), lpszdeviceclass.param().abi()) } + unsafe { phoneGetID(hphone, lpdeviceid as _, lpszdeviceclass.param().abi()) } } #[inline] pub unsafe fn phoneGetIDA(hphone: u32, lpdeviceid: *mut VARSTRING, lpszdeviceclass: P2) -> i32 @@ -1340,7 +1340,7 @@ where P2: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn phoneGetIDA(hphone : u32, lpdeviceid : *mut VARSTRING, lpszdeviceclass : windows_core::PCSTR) -> i32); - unsafe { phoneGetIDA(hphone, core::mem::transmute(lpdeviceid), lpszdeviceclass.param().abi()) } + unsafe { phoneGetIDA(hphone, lpdeviceid as _, lpszdeviceclass.param().abi()) } } #[inline] pub unsafe fn phoneGetIDW(hphone: u32, lpdeviceid: *mut VARSTRING, lpszdeviceclass: P2) -> i32 @@ -1348,7 +1348,7 @@ where P2: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn phoneGetIDW(hphone : u32, lpdeviceid : *mut VARSTRING, lpszdeviceclass : windows_core::PCWSTR) -> i32); - unsafe { phoneGetIDW(hphone, core::mem::transmute(lpdeviceid), lpszdeviceclass.param().abi()) } + unsafe { phoneGetIDW(hphone, lpdeviceid as _, lpszdeviceclass.param().abi()) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -1357,7 +1357,7 @@ where P1: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn phoneGetIcon(dwdeviceid : u32, lpszdeviceclass : windows_core::PCSTR, lphicon : *mut super::super::UI::WindowsAndMessaging:: HICON) -> i32); - unsafe { phoneGetIcon(dwdeviceid, lpszdeviceclass.param().abi(), core::mem::transmute(lphicon)) } + unsafe { phoneGetIcon(dwdeviceid, lpszdeviceclass.param().abi(), lphicon as _) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -1366,7 +1366,7 @@ where P1: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn phoneGetIconA(dwdeviceid : u32, lpszdeviceclass : windows_core::PCSTR, lphicon : *mut super::super::UI::WindowsAndMessaging:: HICON) -> i32); - unsafe { phoneGetIconA(dwdeviceid, lpszdeviceclass.param().abi(), core::mem::transmute(lphicon)) } + unsafe { phoneGetIconA(dwdeviceid, lpszdeviceclass.param().abi(), lphicon as _) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -1375,47 +1375,47 @@ where P1: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn phoneGetIconW(dwdeviceid : u32, lpszdeviceclass : windows_core::PCWSTR, lphicon : *mut super::super::UI::WindowsAndMessaging:: HICON) -> i32); - unsafe { phoneGetIconW(dwdeviceid, lpszdeviceclass.param().abi(), core::mem::transmute(lphicon)) } + unsafe { phoneGetIconW(dwdeviceid, lpszdeviceclass.param().abi(), lphicon as _) } } #[inline] pub unsafe fn phoneGetLamp(hphone: u32, dwbuttonlampid: u32, lpdwlampmode: *mut u32) -> i32 { windows_targets::link!("tapi32.dll" "system" fn phoneGetLamp(hphone : u32, dwbuttonlampid : u32, lpdwlampmode : *mut u32) -> i32); - unsafe { phoneGetLamp(hphone, dwbuttonlampid, core::mem::transmute(lpdwlampmode)) } + unsafe { phoneGetLamp(hphone, dwbuttonlampid, lpdwlampmode as _) } } #[inline] pub unsafe fn phoneGetMessage(hphoneapp: u32, lpmessage: *mut PHONEMESSAGE, dwtimeout: u32) -> i32 { windows_targets::link!("tapi32.dll" "system" fn phoneGetMessage(hphoneapp : u32, lpmessage : *mut PHONEMESSAGE, dwtimeout : u32) -> i32); - unsafe { phoneGetMessage(hphoneapp, core::mem::transmute(lpmessage), dwtimeout) } + unsafe { phoneGetMessage(hphoneapp, lpmessage as _, dwtimeout) } } #[inline] pub unsafe fn phoneGetRing(hphone: u32, lpdwringmode: *mut u32, lpdwvolume: *mut u32) -> i32 { windows_targets::link!("tapi32.dll" "system" fn phoneGetRing(hphone : u32, lpdwringmode : *mut u32, lpdwvolume : *mut u32) -> i32); - unsafe { phoneGetRing(hphone, core::mem::transmute(lpdwringmode), core::mem::transmute(lpdwvolume)) } + unsafe { phoneGetRing(hphone, lpdwringmode as _, lpdwvolume as _) } } #[inline] pub unsafe fn phoneGetStatus(hphone: u32, lpphonestatus: *mut PHONESTATUS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn phoneGetStatus(hphone : u32, lpphonestatus : *mut PHONESTATUS) -> i32); - unsafe { phoneGetStatus(hphone, core::mem::transmute(lpphonestatus)) } + unsafe { phoneGetStatus(hphone, lpphonestatus as _) } } #[inline] pub unsafe fn phoneGetStatusA(hphone: u32, lpphonestatus: *mut PHONESTATUS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn phoneGetStatusA(hphone : u32, lpphonestatus : *mut PHONESTATUS) -> i32); - unsafe { phoneGetStatusA(hphone, core::mem::transmute(lpphonestatus)) } + unsafe { phoneGetStatusA(hphone, lpphonestatus as _) } } #[inline] pub unsafe fn phoneGetStatusMessages(hphone: u32, lpdwphonestates: *mut u32, lpdwbuttonmodes: *mut u32, lpdwbuttonstates: *mut u32) -> i32 { windows_targets::link!("tapi32.dll" "system" fn phoneGetStatusMessages(hphone : u32, lpdwphonestates : *mut u32, lpdwbuttonmodes : *mut u32, lpdwbuttonstates : *mut u32) -> i32); - unsafe { phoneGetStatusMessages(hphone, core::mem::transmute(lpdwphonestates), core::mem::transmute(lpdwbuttonmodes), core::mem::transmute(lpdwbuttonstates)) } + unsafe { phoneGetStatusMessages(hphone, lpdwphonestates as _, lpdwbuttonmodes as _, lpdwbuttonstates as _) } } #[inline] pub unsafe fn phoneGetStatusW(hphone: u32, lpphonestatus: *mut PHONESTATUS) -> i32 { windows_targets::link!("tapi32.dll" "system" fn phoneGetStatusW(hphone : u32, lpphonestatus : *mut PHONESTATUS) -> i32); - unsafe { phoneGetStatusW(hphone, core::mem::transmute(lpphonestatus)) } + unsafe { phoneGetStatusW(hphone, lpphonestatus as _) } } #[inline] pub unsafe fn phoneGetVolume(hphone: u32, dwhookswitchdev: u32, lpdwvolume: *mut u32) -> i32 { windows_targets::link!("tapi32.dll" "system" fn phoneGetVolume(hphone : u32, dwhookswitchdev : u32, lpdwvolume : *mut u32) -> i32); - unsafe { phoneGetVolume(hphone, dwhookswitchdev, core::mem::transmute(lpdwvolume)) } + unsafe { phoneGetVolume(hphone, dwhookswitchdev, lpdwvolume as _) } } #[inline] pub unsafe fn phoneInitialize(lphphoneapp: *mut u32, hinstance: super::super::Foundation::HINSTANCE, lpfncallback: PHONECALLBACK, lpszappname: P3, lpdwnumdevs: *mut u32) -> i32 @@ -1423,7 +1423,7 @@ where 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); - unsafe { phoneInitialize(core::mem::transmute(lphphoneapp), hinstance, lpfncallback, lpszappname.param().abi(), core::mem::transmute(lpdwnumdevs)) } + unsafe { phoneInitialize(lphphoneapp as _, hinstance, lpfncallback, lpszappname.param().abi(), lpdwnumdevs as _) } } #[inline] 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 @@ -1431,7 +1431,7 @@ where 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); - unsafe { phoneInitializeExA(core::mem::transmute(lphphoneapp), hinstance, lpfncallback, lpszfriendlyappname.param().abi(), core::mem::transmute(lpdwnumdevs), core::mem::transmute(lpdwapiversion), core::mem::transmute(lpphoneinitializeexparams)) } + unsafe { phoneInitializeExA(lphphoneapp as _, hinstance, lpfncallback, lpszfriendlyappname.param().abi(), lpdwnumdevs as _, lpdwapiversion as _, lpphoneinitializeexparams as _) } } #[inline] 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 @@ -1439,22 +1439,22 @@ where 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); - unsafe { phoneInitializeExW(core::mem::transmute(lphphoneapp), hinstance, lpfncallback, lpszfriendlyappname.param().abi(), core::mem::transmute(lpdwnumdevs), core::mem::transmute(lpdwapiversion), core::mem::transmute(lpphoneinitializeexparams)) } + unsafe { phoneInitializeExW(lphphoneapp as _, hinstance, lpfncallback, lpszfriendlyappname.param().abi(), lpdwnumdevs as _, lpdwapiversion as _, lpphoneinitializeexparams as _) } } #[inline] pub unsafe fn phoneNegotiateAPIVersion(hphoneapp: u32, dwdeviceid: u32, dwapilowversion: u32, dwapihighversion: u32, lpdwapiversion: *mut u32, lpextensionid: *mut PHONEEXTENSIONID) -> i32 { windows_targets::link!("tapi32.dll" "system" fn phoneNegotiateAPIVersion(hphoneapp : u32, dwdeviceid : u32, dwapilowversion : u32, dwapihighversion : u32, lpdwapiversion : *mut u32, lpextensionid : *mut PHONEEXTENSIONID) -> i32); - unsafe { phoneNegotiateAPIVersion(hphoneapp, dwdeviceid, dwapilowversion, dwapihighversion, core::mem::transmute(lpdwapiversion), core::mem::transmute(lpextensionid)) } + unsafe { phoneNegotiateAPIVersion(hphoneapp, dwdeviceid, dwapilowversion, dwapihighversion, lpdwapiversion as _, lpextensionid as _) } } #[inline] pub unsafe fn phoneNegotiateExtVersion(hphoneapp: u32, dwdeviceid: u32, dwapiversion: u32, dwextlowversion: u32, dwexthighversion: u32, lpdwextversion: *mut u32) -> i32 { windows_targets::link!("tapi32.dll" "system" fn phoneNegotiateExtVersion(hphoneapp : u32, dwdeviceid : u32, dwapiversion : u32, dwextlowversion : u32, dwexthighversion : u32, lpdwextversion : *mut u32) -> i32); - unsafe { phoneNegotiateExtVersion(hphoneapp, dwdeviceid, dwapiversion, dwextlowversion, dwexthighversion, core::mem::transmute(lpdwextversion)) } + unsafe { phoneNegotiateExtVersion(hphoneapp, dwdeviceid, dwapiversion, dwextlowversion, dwexthighversion, lpdwextversion as _) } } #[inline] pub unsafe fn phoneOpen(hphoneapp: u32, dwdeviceid: u32, lphphone: *mut u32, dwapiversion: u32, dwextversion: u32, dwcallbackinstance: usize, dwprivilege: u32) -> i32 { windows_targets::link!("tapi32.dll" "system" fn phoneOpen(hphoneapp : u32, dwdeviceid : u32, lphphone : *mut u32, dwapiversion : u32, dwextversion : u32, dwcallbackinstance : usize, dwprivilege : u32) -> i32); - unsafe { phoneOpen(hphoneapp, dwdeviceid, core::mem::transmute(lphphone), dwapiversion, dwextversion, dwcallbackinstance, dwprivilege) } + unsafe { phoneOpen(hphoneapp, dwdeviceid, lphphone as _, dwapiversion, dwextversion, dwcallbackinstance, dwprivilege) } } #[inline] pub unsafe fn phoneSetButtonInfo(hphone: u32, dwbuttonlampid: u32, lpbuttoninfo: *const PHONEBUTTONINFO) -> i32 { @@ -2120,7 +2120,7 @@ windows_core::imp::interface_hierarchy!(IEnumACDGroup, windows_core::IUnknown); impl IEnumACDGroup { #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), pceltfetched as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -2205,7 +2205,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -2290,7 +2290,7 @@ windows_core::imp::interface_hierarchy!(IEnumAgent, windows_core::IUnknown); impl IEnumAgent { #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), pceltfetched as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -2375,7 +2375,7 @@ windows_core::imp::interface_hierarchy!(IEnumAgentHandler, windows_core::IUnknow impl IEnumAgentHandler { #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), pceltfetched as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -2460,7 +2460,7 @@ windows_core::imp::interface_hierarchy!(IEnumAgentSession, windows_core::IUnknow impl IEnumAgentSession { #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), pceltfetched as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -2544,7 +2544,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppstrings.len().try_into().unwrap(), core::mem::transmute(ppstrings.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -2623,7 +2623,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<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), core::mem::transmute(pceltfetched.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -2708,7 +2708,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -2793,7 +2793,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<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), core::mem::transmute(pceltfetched.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -2877,7 +2877,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), pcfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -2956,7 +2956,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), pcfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -3041,7 +3041,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pval.len().try_into().unwrap(), core::mem::transmute(pval.as_ptr()), pcfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -3126,7 +3126,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<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), core::mem::transmute(pceltfetched.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -3211,7 +3211,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<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppscopes), core::mem::transmute(pceltfetched.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppscopes), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -3296,7 +3296,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -3381,7 +3381,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -3466,7 +3466,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -3551,7 +3551,7 @@ windows_core::imp::interface_hierarchy!(IEnumQueue, windows_core::IUnknown); impl IEnumQueue { #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), pceltfetched as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -3636,7 +3636,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<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), core::mem::transmute(pceltfetched.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -3721,7 +3721,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<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), core::mem::transmute(pceltfetched.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -3806,7 +3806,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<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), core::mem::transmute(pceltfetched.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -3890,7 +3890,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pelements.len().try_into().unwrap(), core::mem::transmute(pelements.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -8837,7 +8837,7 @@ impl ITCallInfo { unsafe { (windows_core::Interface::vtable(self).put_CallInfoBuffer)(windows_core::Interface::as_raw(self), callinfobuffer, core::mem::transmute_copy(pcallinfobuffer)).ok() } } pub unsafe fn GetCallInfoBuffer(&self, callinfobuffer: CALLINFO_BUFFER, pdwsize: *mut u32, ppcallinfobuffer: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCallInfoBuffer)(windows_core::Interface::as_raw(self), callinfobuffer, core::mem::transmute(pdwsize), core::mem::transmute(ppcallinfobuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCallInfoBuffer)(windows_core::Interface::as_raw(self), callinfobuffer, pdwsize as _, ppcallinfobuffer as _).ok() } } pub unsafe fn SetCallInfoBuffer(&self, callinfobuffer: CALLINFO_BUFFER, pcallinfobuffer: &[u8]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetCallInfoBuffer)(windows_core::Interface::as_raw(self), callinfobuffer, pcallinfobuffer.len().try_into().unwrap(), core::mem::transmute(pcallinfobuffer.as_ptr())).ok() } @@ -11952,7 +11952,7 @@ impl ITForwardInformation2 { unsafe { (windows_core::Interface::vtable(self).SetForwardType2)(windows_core::Interface::as_raw(self), forwardtype, core::mem::transmute_copy(pdestaddress), destaddresstype, core::mem::transmute_copy(pcalleraddress), calleraddresstype).ok() } } pub unsafe fn GetForwardType2(&self, forwardtype: i32, ppdestinationaddress: *mut windows_core::BSTR, pdestaddresstype: *mut i32, ppcalleraddress: *mut windows_core::BSTR, pcalleraddresstype: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetForwardType2)(windows_core::Interface::as_raw(self), forwardtype, core::mem::transmute(ppdestinationaddress), core::mem::transmute(pdestaddresstype), core::mem::transmute(ppcalleraddress), core::mem::transmute(pcalleraddresstype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetForwardType2)(windows_core::Interface::as_raw(self), forwardtype, core::mem::transmute(ppdestinationaddress), pdestaddresstype as _, core::mem::transmute(ppcalleraddress), pcalleraddresstype as _).ok() } } pub unsafe fn get_ForwardTypeDestinationAddressType(&self, forwardtype: i32) -> windows_core::Result { unsafe { @@ -12108,10 +12108,10 @@ windows_core::imp::define_interface!(ITLegacyAddressMediaControl, ITLegacyAddres windows_core::imp::interface_hierarchy!(ITLegacyAddressMediaControl, windows_core::IUnknown); impl ITLegacyAddressMediaControl { pub unsafe fn GetID(&self, pdeviceclass: &windows_core::BSTR, pdwsize: *mut u32, ppdeviceid: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetID)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(pdeviceclass), core::mem::transmute(pdwsize), core::mem::transmute(ppdeviceid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetID)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(pdeviceclass), pdwsize as _, ppdeviceid as _).ok() } } pub unsafe fn GetDevConfig(&self, pdeviceclass: &windows_core::BSTR, pdwsize: *mut u32, ppdeviceconfig: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDevConfig)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(pdeviceclass), core::mem::transmute(pdwsize), core::mem::transmute(ppdeviceconfig)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDevConfig)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(pdeviceclass), pdwsize as _, ppdeviceconfig as _).ok() } } pub unsafe fn SetDevConfig(&self, pdeviceclass: &windows_core::BSTR, pdeviceconfig: &[u8]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetDevConfig)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(pdeviceclass), pdeviceconfig.len().try_into().unwrap(), core::mem::transmute(pdeviceconfig.as_ptr())).ok() } @@ -12174,7 +12174,7 @@ impl ITLegacyAddressMediaControl2 { unsafe { (windows_core::Interface::vtable(self).ConfigDialog)(windows_core::Interface::as_raw(self), hwndowner, core::mem::transmute_copy(pdeviceclass)).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<()> { - unsafe { (windows_core::Interface::vtable(self).ConfigDialogEdit)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).ConfigDialogEdit)(windows_core::Interface::as_raw(self), hwndowner, core::mem::transmute_copy(pdeviceclass), pdeviceconfigin.len().try_into().unwrap(), core::mem::transmute(pdeviceconfigin.as_ptr()), pdwsizeout as _, ppdeviceconfigout as _).ok() } } } #[repr(C)] @@ -12232,7 +12232,7 @@ impl ITLegacyCallMediaControl { unsafe { (windows_core::Interface::vtable(self).GenerateDigits)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(pdigits), digitmode).ok() } } pub unsafe fn GetID(&self, pdeviceclass: &windows_core::BSTR, pdwsize: *mut u32, ppdeviceid: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetID)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(pdeviceclass), core::mem::transmute(pdwsize), core::mem::transmute(ppdeviceid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetID)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(pdeviceclass), pdwsize as _, ppdeviceid as _).ok() } } pub unsafe fn SetMediaType(&self, lmediatype: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetMediaType)(windows_core::Interface::as_raw(self), lmediatype).ok() } @@ -12849,7 +12849,7 @@ impl ITMSPAddress { unsafe { (windows_core::Interface::vtable(self).ReceiveTSPData)(windows_core::Interface::as_raw(self), pmspcall.param().abi(), core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap()).ok() } } pub unsafe fn GetEvent(&self, pdwsize: *mut u32, peventbuffer: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwsize), core::mem::transmute(peventbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEvent)(windows_core::Interface::as_raw(self), pdwsize as _, peventbuffer as _).ok() } } } #[repr(C)] @@ -13531,7 +13531,7 @@ impl ITPhone { } } pub unsafe fn GetPhoneCapsBuffer(&self, pcbcaps: PHONECAPS_BUFFER, pdwsize: *mut u32, ppphonecapsbuffer: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPhoneCapsBuffer)(windows_core::Interface::as_raw(self), pcbcaps, core::mem::transmute(pdwsize), core::mem::transmute(ppphonecapsbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPhoneCapsBuffer)(windows_core::Interface::as_raw(self), pcbcaps, pdwsize as _, ppphonecapsbuffer as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn get_PhoneCapsBuffer(&self, pcbcaps: PHONECAPS_BUFFER) -> windows_core::Result { @@ -18059,14 +18059,14 @@ windows_core::imp::interface_hierarchy!(ITnef, windows_core::IUnknown); impl ITnef { #[cfg(feature = "Win32_System_AddressBook")] pub unsafe fn AddProps(&self, ulflags: u32, ulelemid: u32, lpvdata: *mut core::ffi::c_void, lpproplist: *mut super::super::System::AddressBook::SPropTagArray) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AddProps)(windows_core::Interface::as_raw(self), ulflags, ulelemid, core::mem::transmute(lpvdata), core::mem::transmute(lpproplist)).ok() } + unsafe { (windows_core::Interface::vtable(self).AddProps)(windows_core::Interface::as_raw(self), ulflags, ulelemid, lpvdata as _, lpproplist as _).ok() } } #[cfg(feature = "Win32_System_AddressBook")] pub unsafe fn ExtractProps(&self, ulflags: u32, lpproplist: *mut super::super::System::AddressBook::SPropTagArray, lpproblems: *mut *mut STnefProblemArray) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ExtractProps)(windows_core::Interface::as_raw(self), ulflags, core::mem::transmute(lpproplist), core::mem::transmute(lpproblems)).ok() } + unsafe { (windows_core::Interface::vtable(self).ExtractProps)(windows_core::Interface::as_raw(self), ulflags, lpproplist as _, lpproblems as _).ok() } } pub unsafe fn Finish(&self, ulflags: u32, lpkey: *mut u16, lpproblems: *mut *mut STnefProblemArray) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Finish)(windows_core::Interface::as_raw(self), ulflags, core::mem::transmute(lpkey), core::mem::transmute(lpproblems)).ok() } + unsafe { (windows_core::Interface::vtable(self).Finish)(windows_core::Interface::as_raw(self), ulflags, lpkey as _, lpproblems as _).ok() } } #[cfg(all(feature = "Win32_System_AddressBook", feature = "Win32_System_Com"))] pub unsafe fn OpenTaggedBody(&self, lpmessage: P0, ulflags: u32) -> windows_core::Result @@ -18080,7 +18080,7 @@ impl ITnef { } #[cfg(all(feature = "Win32_System_AddressBook", feature = "Win32_System_Com"))] pub unsafe fn SetProps(&self, ulflags: u32, ulelemid: u32, cvalues: u32, lpprops: *mut super::super::System::AddressBook::SPropValue) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetProps)(windows_core::Interface::as_raw(self), ulflags, ulelemid, cvalues, core::mem::transmute(lpprops)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetProps)(windows_core::Interface::as_raw(self), ulflags, ulelemid, cvalues, lpprops as _).ok() } } #[cfg(feature = "Win32_System_AddressBook")] pub unsafe fn EncodeRecips(&self, ulflags: u32, lprecipienttable: P1) -> windows_core::Result<()> @@ -18091,7 +18091,7 @@ impl ITnef { } #[cfg(all(feature = "Win32_System_AddressBook", feature = "Win32_System_Com"))] pub unsafe fn FinishComponent(&self, ulflags: u32, ulcomponentid: u32, lpcustomproplist: *mut super::super::System::AddressBook::SPropTagArray, lpcustomprops: *mut super::super::System::AddressBook::SPropValue, lpproplist: *mut super::super::System::AddressBook::SPropTagArray, lpproblems: *mut *mut STnefProblemArray) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).FinishComponent)(windows_core::Interface::as_raw(self), ulflags, ulcomponentid, core::mem::transmute(lpcustomproplist), core::mem::transmute(lpcustomprops), core::mem::transmute(lpproplist), core::mem::transmute(lpproblems)).ok() } + unsafe { (windows_core::Interface::vtable(self).FinishComponent)(windows_core::Interface::as_raw(self), ulflags, ulcomponentid, lpcustomproplist as _, lpcustomprops as _, lpproplist as _, lpproblems as _).ok() } } } #[repr(C)] 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 51ff5723da..b29a095049 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Usb/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Usb/mod.rs @@ -7,7 +7,7 @@ pub unsafe fn WinUsb_AbortPipe(interfacehandle: WINUSB_INTERFACE_HANDLE, pipeid: #[inline] 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); - unsafe { WinUsb_ControlTransfer(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() } + unsafe { WinUsb_ControlTransfer(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()), lengthtransferred.unwrap_or(core::mem::zeroed()) as _, overlapped.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WinUsb_FlushPipe(interfacehandle: WINUSB_INTERFACE_HANDLE, pipeid: u8) -> windows_core::Result<()> { @@ -22,22 +22,22 @@ pub unsafe fn WinUsb_Free(interfacehandle: WINUSB_INTERFACE_HANDLE) -> super::su #[inline] pub unsafe fn WinUsb_GetAdjustedFrameNumber(currentframenumber: *mut u32, timestamp: i64) -> windows_core::Result<()> { windows_targets::link!("winusb.dll" "system" fn WinUsb_GetAdjustedFrameNumber(currentframenumber : *mut u32, timestamp : i64) -> super::super::Foundation:: BOOL); - unsafe { WinUsb_GetAdjustedFrameNumber(core::mem::transmute(currentframenumber), timestamp).ok() } + unsafe { WinUsb_GetAdjustedFrameNumber(currentframenumber as _, timestamp).ok() } } #[inline] 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); - unsafe { WinUsb_GetAssociatedInterface(interfacehandle, associatedinterfaceindex, core::mem::transmute(associatedinterfacehandle)).ok() } + unsafe { WinUsb_GetAssociatedInterface(interfacehandle, associatedinterfaceindex, associatedinterfacehandle as _).ok() } } #[inline] 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); - unsafe { WinUsb_GetCurrentAlternateSetting(interfacehandle, core::mem::transmute(settingnumber)).ok() } + unsafe { WinUsb_GetCurrentAlternateSetting(interfacehandle, settingnumber as _).ok() } } #[inline] 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); - unsafe { WinUsb_GetCurrentFrameNumber(interfacehandle, core::mem::transmute(currentframenumber), core::mem::transmute(timestamp)).ok() } + unsafe { WinUsb_GetCurrentFrameNumber(interfacehandle, currentframenumber as _, timestamp as _).ok() } } #[inline] pub unsafe fn WinUsb_GetCurrentFrameNumberAndQpc(interfacehandle: WINUSB_INTERFACE_HANDLE, frameqpcinfo: *const USB_FRAME_NUMBER_AND_QPC_FOR_TIME_SYNC_INFORMATION) -> windows_core::Result<()> { @@ -47,28 +47,28 @@ pub unsafe fn WinUsb_GetCurrentFrameNumberAndQpc(interfacehandle: WINUSB_INTERFA #[inline] 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); - unsafe { WinUsb_GetDescriptor(interfacehandle, descriptortype, index, languageid, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lengthtransferred)).ok() } + unsafe { WinUsb_GetDescriptor(interfacehandle, descriptortype, index, languageid, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lengthtransferred as _).ok() } } #[cfg(feature = "Win32_System_IO")] #[inline] pub unsafe fn WinUsb_GetOverlappedResult(interfacehandle: WINUSB_INTERFACE_HANDLE, lpoverlapped: *const super::super::System::IO::OVERLAPPED, lpnumberofbytestransferred: *mut u32, bwait: bool) -> windows_core::Result<()> { 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); - unsafe { WinUsb_GetOverlappedResult(interfacehandle, lpoverlapped, core::mem::transmute(lpnumberofbytestransferred), bwait.into()).ok() } + unsafe { WinUsb_GetOverlappedResult(interfacehandle, lpoverlapped, lpnumberofbytestransferred as _, bwait.into()).ok() } } #[inline] 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); - unsafe { WinUsb_GetPipePolicy(interfacehandle, pipeid, policytype, core::mem::transmute(valuelength), core::mem::transmute(value)).ok() } + unsafe { WinUsb_GetPipePolicy(interfacehandle, pipeid, policytype, valuelength as _, value as _).ok() } } #[inline] 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); - unsafe { WinUsb_GetPowerPolicy(interfacehandle, policytype, core::mem::transmute(valuelength), core::mem::transmute(value)).ok() } + unsafe { WinUsb_GetPowerPolicy(interfacehandle, policytype, valuelength as _, value as _).ok() } } #[inline] 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); - unsafe { WinUsb_Initialize(devicehandle, core::mem::transmute(interfacehandle)).ok() } + unsafe { WinUsb_Initialize(devicehandle, interfacehandle as _).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 { @@ -83,45 +83,45 @@ pub unsafe fn WinUsb_ParseDescriptors(descriptorbuffer: *const core::ffi::c_void #[inline] 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); - unsafe { WinUsb_QueryDeviceInformation(interfacehandle, informationtype, core::mem::transmute(bufferlength), core::mem::transmute(buffer)).ok() } + unsafe { WinUsb_QueryDeviceInformation(interfacehandle, informationtype, bufferlength as _, buffer as _).ok() } } #[inline] 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); - unsafe { WinUsb_QueryInterfaceSettings(interfacehandle, alternateinterfacenumber, core::mem::transmute(usbaltinterfacedescriptor)).ok() } + unsafe { WinUsb_QueryInterfaceSettings(interfacehandle, alternateinterfacenumber, usbaltinterfacedescriptor as _).ok() } } #[inline] 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); - unsafe { WinUsb_QueryPipe(interfacehandle, alternateinterfacenumber, pipeindex, core::mem::transmute(pipeinformation)).ok() } + unsafe { WinUsb_QueryPipe(interfacehandle, alternateinterfacenumber, pipeindex, pipeinformation as _).ok() } } #[inline] 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); - unsafe { WinUsb_QueryPipeEx(interfacehandle, alternatesettingnumber, pipeindex, core::mem::transmute(pipeinformationex)).ok() } + unsafe { WinUsb_QueryPipeEx(interfacehandle, alternatesettingnumber, pipeindex, pipeinformationex as _).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); - unsafe { WinUsb_ReadIsochPipe(bufferhandle, offset, 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() } + unsafe { WinUsb_ReadIsochPipe(bufferhandle, offset, length, framenumber as _, isopacketdescriptors.len().try_into().unwrap(), core::mem::transmute(isopacketdescriptors.as_ptr()), overlapped.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_IO")] #[inline] pub unsafe fn WinUsb_ReadIsochPipeAsap(bufferhandle: *const core::ffi::c_void, offset: u32, length: u32, continuestream: bool, 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_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); - unsafe { WinUsb_ReadIsochPipeAsap(bufferhandle, offset, length, continuestream.into(), isopacketdescriptors.len().try_into().unwrap(), core::mem::transmute(isopacketdescriptors.as_ptr()), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WinUsb_ReadIsochPipeAsap(bufferhandle, offset, length, continuestream.into(), isopacketdescriptors.len().try_into().unwrap(), core::mem::transmute(isopacketdescriptors.as_ptr()), overlapped.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { WinUsb_ReadPipe(interfacehandle, 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() } + unsafe { WinUsb_ReadPipe(interfacehandle, 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()), lengthtransferred.unwrap_or(core::mem::zeroed()) as _, overlapped.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { WinUsb_RegisterIsochBuffer(interfacehandle, pipeid, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(isochbufferhandle)).ok() } + unsafe { WinUsb_RegisterIsochBuffer(interfacehandle, pipeid, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), isochbufferhandle as _).ok() } } #[inline] pub unsafe fn WinUsb_ResetPipe(interfacehandle: WINUSB_INTERFACE_HANDLE, pipeid: u8) -> windows_core::Result<()> { @@ -162,19 +162,19 @@ 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); - unsafe { WinUsb_WriteIsochPipe(bufferhandle, offset, length, core::mem::transmute(framenumber), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WinUsb_WriteIsochPipe(bufferhandle, offset, length, framenumber as _, overlapped.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_IO")] #[inline] pub unsafe fn WinUsb_WriteIsochPipeAsap(bufferhandle: *const core::ffi::c_void, offset: u32, length: u32, continuestream: bool, overlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> { 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); - unsafe { WinUsb_WriteIsochPipeAsap(bufferhandle, offset, length, continuestream.into(), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WinUsb_WriteIsochPipeAsap(bufferhandle, offset, length, continuestream.into(), overlapped.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { WinUsb_WritePipe(interfacehandle, 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() } + unsafe { WinUsb_WritePipe(interfacehandle, pipeid, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), lengthtransferred.unwrap_or(core::mem::zeroed()) as _, overlapped.unwrap_or(core::mem::zeroed()) as _).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 c9a8d219a7..86b538e734 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/WebServicesOnDevices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/WebServicesOnDevices/mod.rs @@ -1,12 +1,12 @@ #[inline] pub unsafe fn WSDAllocateLinkedMemory(pparent: *mut core::ffi::c_void, cbsize: usize) -> *mut core::ffi::c_void { windows_targets::link!("wsdapi.dll" "system" fn WSDAllocateLinkedMemory(pparent : *mut core::ffi::c_void, cbsize : usize) -> *mut core::ffi::c_void); - unsafe { WSDAllocateLinkedMemory(core::mem::transmute(pparent), cbsize) } + unsafe { WSDAllocateLinkedMemory(pparent as _, cbsize) } } #[inline] pub unsafe fn WSDAttachLinkedMemory(pparent: *mut core::ffi::c_void, pchild: *mut core::ffi::c_void) { windows_targets::link!("wsdapi.dll" "system" fn WSDAttachLinkedMemory(pparent : *mut core::ffi::c_void, pchild : *mut core::ffi::c_void)); - unsafe { WSDAttachLinkedMemory(core::mem::transmute(pparent), core::mem::transmute(pchild)) } + unsafe { WSDAttachLinkedMemory(pparent as _, pchild as _) } } #[inline] pub unsafe fn WSDCreateDeviceHost(pszlocalid: P0, pcontext: P1) -> windows_core::Result @@ -171,12 +171,12 @@ pub unsafe fn WSDCreateUdpMessageParameters() -> windows_core::Result(pszcode: P0, pszsubcode: P1, pszreason: P2, pszdetail: P3, pcontext: P4) -> windows_core::Result<*mut WSD_SOAP_FAULT> @@ -201,13 +201,13 @@ 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); unsafe { let mut result__ = core::mem::zeroed(); - WSDGenerateFaultEx(pcode, core::mem::transmute(psubcode.unwrap_or(core::mem::zeroed())), preasons, pszdetail.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + WSDGenerateFaultEx(pcode, psubcode.unwrap_or(core::mem::zeroed()) as _, 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<()> { windows_targets::link!("wsdapi.dll" "system" fn WSDGetConfigurationOption(dwoption : u32, pvoid : *mut core::ffi::c_void, cboutbuffer : u32) -> windows_core::HRESULT); - unsafe { WSDGetConfigurationOption(dwoption, core::mem::transmute(pvoid), cboutbuffer).ok() } + unsafe { WSDGetConfigurationOption(dwoption, pvoid as _, cboutbuffer).ok() } } #[inline] pub unsafe fn WSDSetConfigurationOption(dwoption: u32, pvoid: *const core::ffi::c_void, cbinbuffer: u32) -> windows_core::Result<()> { @@ -217,22 +217,22 @@ 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); - unsafe { 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() } + unsafe { WSDUriDecode(core::mem::transmute(source.as_ptr()), source.len().try_into().unwrap(), destout as _, cchdestout.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { 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() } + unsafe { WSDUriEncode(core::mem::transmute(source.as_ptr()), source.len().try_into().unwrap(), destout as _, cchdestout.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WSDXMLAddChild(pparent: *mut WSDXML_ELEMENT, pchild: *mut WSDXML_ELEMENT) -> windows_core::Result<()> { windows_targets::link!("wsdapi.dll" "system" fn WSDXMLAddChild(pparent : *mut WSDXML_ELEMENT, pchild : *mut WSDXML_ELEMENT) -> windows_core::HRESULT); - unsafe { WSDXMLAddChild(core::mem::transmute(pparent), core::mem::transmute(pchild)).ok() } + unsafe { WSDXMLAddChild(pparent as _, pchild as _).ok() } } #[inline] pub unsafe fn WSDXMLAddSibling(pfirst: *mut WSDXML_ELEMENT, psecond: *mut WSDXML_ELEMENT) -> windows_core::Result<()> { windows_targets::link!("wsdapi.dll" "system" fn WSDXMLAddSibling(pfirst : *mut WSDXML_ELEMENT, psecond : *mut WSDXML_ELEMENT) -> windows_core::HRESULT); - unsafe { WSDXMLAddSibling(core::mem::transmute(pfirst), core::mem::transmute(psecond)).ok() } + unsafe { WSDXMLAddSibling(pfirst as _, psecond as _).ok() } } #[inline] pub unsafe fn WSDXMLBuildAnyForSingleElement(pelementname: *mut WSDXML_NAME, psztext: P1, ppany: *mut *mut WSDXML_ELEMENT) -> windows_core::Result<()> @@ -240,12 +240,12 @@ where P1: windows_core::Param, { windows_targets::link!("wsdapi.dll" "system" fn WSDXMLBuildAnyForSingleElement(pelementname : *mut WSDXML_NAME, psztext : windows_core::PCWSTR, ppany : *mut *mut WSDXML_ELEMENT) -> windows_core::HRESULT); - unsafe { WSDXMLBuildAnyForSingleElement(core::mem::transmute(pelementname), psztext.param().abi(), core::mem::transmute(ppany)).ok() } + unsafe { WSDXMLBuildAnyForSingleElement(pelementname as _, psztext.param().abi(), ppany as _).ok() } } #[inline] pub unsafe fn WSDXMLCleanupElement(pany: *mut WSDXML_ELEMENT) -> windows_core::Result<()> { windows_targets::link!("wsdapi.dll" "system" fn WSDXMLCleanupElement(pany : *mut WSDXML_ELEMENT) -> windows_core::HRESULT); - unsafe { WSDXMLCleanupElement(core::mem::transmute(pany)).ok() } + unsafe { WSDXMLCleanupElement(pany as _).ok() } } #[inline] pub unsafe fn WSDXMLCreateContext() -> windows_core::Result { @@ -274,7 +274,7 @@ where P1: windows_core::Param, { windows_targets::link!("wsdapi.dll" "system" fn WSDXMLGetValueFromAny(psznamespace : windows_core::PCWSTR, pszname : windows_core::PCWSTR, pany : *mut WSDXML_ELEMENT, ppszvalue : *mut windows_core::PCWSTR) -> windows_core::HRESULT); - unsafe { WSDXMLGetValueFromAny(psznamespace.param().abi(), pszname.param().abi(), core::mem::transmute(pany), core::mem::transmute(ppszvalue)).ok() } + unsafe { WSDXMLGetValueFromAny(psznamespace.param().abi(), pszname.param().abi(), pany as _, ppszvalue as _).ok() } } #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] @@ -531,7 +531,7 @@ impl IWSDDeviceHost { unsafe { (windows_core::Interface::vtable(self).RegisterPortType)(windows_core::Interface::as_raw(self), pporttype).ok() } } pub unsafe fn SetMetadata(&self, pthismodelmetadata: *const WSD_THIS_MODEL_METADATA, pthisdevicemetadata: *const WSD_THIS_DEVICE_METADATA, phostmetadata: Option<*const WSD_HOST_METADATA>, pcustommetadata: Option<*const WSD_METADATA_SECTION_LIST>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetMetadata)(windows_core::Interface::as_raw(self), pthismodelmetadata, pthisdevicemetadata, core::mem::transmute(phostmetadata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcustommetadata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetMetadata)(windows_core::Interface::as_raw(self), pthismodelmetadata, pthisdevicemetadata, phostmetadata.unwrap_or(core::mem::zeroed()) as _, pcustommetadata.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn RegisterService(&self, pszserviceid: P0, pservice: P1) -> windows_core::Result<()> where @@ -552,7 +552,7 @@ impl IWSDDeviceHost { P1: windows_core::Param, P5: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).AddDynamicService)(windows_core::Interface::as_raw(self), pszserviceid.param().abi(), pszendpointaddress.param().abi(), pporttype.unwrap_or(core::mem::zeroed()) as _, pportname.unwrap_or(core::mem::zeroed()) as _, pany.unwrap_or(core::mem::zeroed()) as _, pservice.param().abi()).ok() } } pub unsafe fn RemoveDynamicService(&self, pszserviceid: P0) -> windows_core::Result<()> where @@ -570,7 +570,7 @@ impl IWSDDeviceHost { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SignalEvent)(windows_core::Interface::as_raw(self), pszserviceid.param().abi(), core::mem::transmute(pbody.unwrap_or(core::mem::zeroed())), poperation).ok() } + unsafe { (windows_core::Interface::vtable(self).SignalEvent)(windows_core::Interface::as_raw(self), pszserviceid.param().abi(), pbody.unwrap_or(core::mem::zeroed()) as _, poperation).ok() } } } #[repr(C)] @@ -973,7 +973,7 @@ impl IWSDEndpointProxy { unsafe { (windows_core::Interface::vtable(self).SendOneWayRequest)(windows_core::Interface::as_raw(self), pbody, poperation).ok() } } pub unsafe fn SendTwoWayRequest(&self, pbody: *const core::ffi::c_void, poperation: *const WSD_OPERATION, presponsecontext: Option<*const WSD_SYNCHRONOUS_RESPONSE_CONTEXT>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SendTwoWayRequest)(windows_core::Interface::as_raw(self), pbody, poperation, core::mem::transmute(presponsecontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SendTwoWayRequest)(windows_core::Interface::as_raw(self), pbody, poperation, presponsecontext.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SendTwoWayRequestAsync(&self, pbody: *const core::ffi::c_void, poperation: *const WSD_OPERATION, pasyncstate: P2, pcallback: P3) -> windows_core::Result where @@ -1514,7 +1514,7 @@ impl core::ops::Deref for IWSDInboundAttachment { windows_core::imp::interface_hierarchy!(IWSDInboundAttachment, windows_core::IUnknown, IWSDAttachment); impl IWSDInboundAttachment { pub unsafe fn Read(&self, pbuffer: &mut [u8], pdwnumberofbytesread: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), core::mem::transmute(pdwnumberofbytesread)).ok() } + unsafe { (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), pdwnumberofbytesread as _).ok() } } pub unsafe fn Close(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() } @@ -1920,13 +1920,13 @@ impl IWSDServiceMessaging { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SendResponse)(windows_core::Interface::as_raw(self), core::mem::transmute(pbody.unwrap_or(core::mem::zeroed())), poperation, pmessageparameters.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).SendResponse)(windows_core::Interface::as_raw(self), pbody.unwrap_or(core::mem::zeroed()) as _, 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, { - unsafe { (windows_core::Interface::vtable(self).FaultRequest)(windows_core::Interface::as_raw(self), prequestheader, pmessageparameters.param().abi(), core::mem::transmute(pfault.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).FaultRequest)(windows_core::Interface::as_raw(self), prequestheader, pmessageparameters.param().abi(), pfault.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -1998,7 +1998,7 @@ impl IWSDServiceProxy { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SubscribeToOperation)(windows_core::Interface::as_raw(self), poperation, punknown.param().abi(), pany, core::mem::transmute(ppany.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SubscribeToOperation)(windows_core::Interface::as_raw(self), poperation, punknown.param().abi(), pany, ppany.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn UnsubscribeToOperation(&self, poperation: *const WSD_OPERATION) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UnsubscribeToOperation)(windows_core::Interface::as_raw(self), poperation).ok() } @@ -2133,7 +2133,7 @@ impl IWSDServiceProxyEventing { where P2: windows_core::Param, { - unsafe { (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() } + unsafe { (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(), pexpires.unwrap_or(core::mem::zeroed()) as _, pany.unwrap_or(core::mem::zeroed()) as _, ppexpires.unwrap_or(core::mem::zeroed()) as _, ppany.unwrap_or(core::mem::zeroed()) as _).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 @@ -2143,14 +2143,14 @@ impl IWSDServiceProxyEventing { { unsafe { 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::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__)) + (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(), pexpires.unwrap_or(core::mem::zeroed()) as _, pany.unwrap_or(core::mem::zeroed()) as _, 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, { - unsafe { (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() } + unsafe { (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(), ppexpires.unwrap_or(core::mem::zeroed()) as _, ppany.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn UnsubscribeToMultipleOperations(&self, poperations: &[WSD_OPERATION], pany: *const WSDXML_ELEMENT) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UnsubscribeToMultipleOperations)(windows_core::Interface::as_raw(self), core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), pany).ok() } @@ -2162,7 +2162,7 @@ impl IWSDServiceProxyEventing { { unsafe { 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::mem::zeroed())), 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(), pany.unwrap_or(core::mem::zeroed()) as _, 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<()> @@ -2172,7 +2172,7 @@ impl IWSDServiceProxyEventing { unsafe { (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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).RenewMultipleOperations)(windows_core::Interface::as_raw(self), core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), pexpires.unwrap_or(core::mem::zeroed()) as _, pany.unwrap_or(core::mem::zeroed()) as _, ppexpires.unwrap_or(core::mem::zeroed()) as _, ppany.unwrap_or(core::mem::zeroed()) as _).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 @@ -2181,17 +2181,17 @@ impl IWSDServiceProxyEventing { { unsafe { 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::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__)) + (windows_core::Interface::vtable(self).BeginRenewMultipleOperations)(windows_core::Interface::as_raw(self), core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), pexpires.unwrap_or(core::mem::zeroed()) as _, pany.unwrap_or(core::mem::zeroed()) as _, 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, { - unsafe { (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() } + unsafe { (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(), ppexpires.unwrap_or(core::mem::zeroed()) as _, ppany.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetStatusForMultipleOperations)(windows_core::Interface::as_raw(self), core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), pany.unwrap_or(core::mem::zeroed()) as _, ppexpires.unwrap_or(core::mem::zeroed()) as _, ppany.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn BeginGetStatusForMultipleOperations(&self, poperations: &[WSD_OPERATION], pany: Option<*const WSDXML_ELEMENT>, pasyncstate: P3, pasynccallback: P4) -> windows_core::Result where @@ -2200,14 +2200,14 @@ impl IWSDServiceProxyEventing { { unsafe { 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::mem::zeroed())), 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(), pany.unwrap_or(core::mem::zeroed()) as _, 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, { - unsafe { (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() } + unsafe { (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(), ppexpires.unwrap_or(core::mem::zeroed()) as _, ppany.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -2375,13 +2375,13 @@ impl IWSDSignatureProperty { } } pub unsafe fn GetKeyInfo(&self, pbkeyinfo: Option<*mut u8>, pdwkeyinfosize: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetKeyInfo)(windows_core::Interface::as_raw(self), pbkeyinfo.unwrap_or(core::mem::zeroed()) as _, pdwkeyinfosize as _).ok() } } pub unsafe fn GetSignature(&self, pbsignature: Option<*mut u8>, pdwsignaturesize: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetSignature)(windows_core::Interface::as_raw(self), pbsignature.unwrap_or(core::mem::zeroed()) as _, pdwsignaturesize as _).ok() } } pub unsafe fn GetSignedInfoHash(&self, pbsignedinfohash: Option<*mut u8>, pdwhashsize: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetSignedInfoHash)(windows_core::Interface::as_raw(self), pbsignedinfohash.unwrap_or(core::mem::zeroed()) as _, pdwhashsize as _).ok() } } } #[repr(C)] @@ -2590,7 +2590,7 @@ impl IWSDUdpAddress { } #[cfg(feature = "Win32_Networking_WinSock")] pub unsafe fn GetSockaddr(&self, psockaddr: *mut super::super::Networking::WinSock::SOCKADDR_STORAGE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSockaddr)(windows_core::Interface::as_raw(self), core::mem::transmute(psockaddr)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSockaddr)(windows_core::Interface::as_raw(self), psockaddr as _).ok() } } pub unsafe fn SetExclusive(&self, fexclusive: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetExclusive)(windows_core::Interface::as_raw(self), fexclusive.into()).ok() } @@ -2773,7 +2773,7 @@ impl IWSDUdpMessageParameters { unsafe { (windows_core::Interface::vtable(self).SetRetransmitParams)(windows_core::Interface::as_raw(self), pparams).ok() } } pub unsafe fn GetRetransmitParams(&self, pparams: *mut WSDUdpRetransmitParams) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRetransmitParams)(windows_core::Interface::as_raw(self), core::mem::transmute(pparams)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRetransmitParams)(windows_core::Interface::as_raw(self), pparams as _).ok() } } } #[repr(C)] @@ -2819,14 +2819,14 @@ impl IWSDXMLContext { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).AddNamespace)(windows_core::Interface::as_raw(self), pszuri.param().abi(), pszsuggestedprefix.param().abi(), ppnamespace.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).AddNameToNamespace)(windows_core::Interface::as_raw(self), pszuri.param().abi(), pszname.param().abi(), ppname.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetNamespaces(&self, pnamespaces: &[*const WSDXML_NAMESPACE], blayernumber: u8) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetNamespaces)(windows_core::Interface::as_raw(self), core::mem::transmute(pnamespaces.as_ptr()), pnamespaces.len().try_into().unwrap(), blayernumber).ok() } @@ -2922,7 +2922,7 @@ impl IWSDiscoveredService { } } pub unsafe fn GetExtendedDiscoXML(&self, ppheaderany: *mut *mut WSDXML_ELEMENT, ppbodyany: *mut *mut WSDXML_ELEMENT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetExtendedDiscoXML)(windows_core::Interface::as_raw(self), core::mem::transmute(ppheaderany), core::mem::transmute(ppbodyany)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetExtendedDiscoXML)(windows_core::Interface::as_raw(self), ppheaderany as _, ppbodyany as _).ok() } } pub unsafe fn GetProbeResolveTag(&self) -> windows_core::Result { unsafe { @@ -3165,7 +3165,7 @@ impl IWSDiscoveryProvider { P2: windows_core::Param, P3: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).SearchByType)(windows_core::Interface::as_raw(self), ptypeslist.unwrap_or(core::mem::zeroed()) as _, pscopeslist.unwrap_or(core::mem::zeroed()) as _, pszmatchby.param().abi(), psztag.param().abi()).ok() } } pub unsafe fn GetXMLContext(&self) -> windows_core::Result { unsafe { @@ -3364,14 +3364,14 @@ impl IWSDiscoveryPublisher { P0: windows_core::Param, P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Publish)(windows_core::Interface::as_raw(self), pszid.param().abi(), ullmetadataversion, ullinstanceid, ullmessagenumber, pszsessionid.param().abi(), core::mem::transmute(ptypeslist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pscopeslist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pxaddrslist.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Publish)(windows_core::Interface::as_raw(self), pszid.param().abi(), ullmetadataversion, ullinstanceid, ullmessagenumber, pszsessionid.param().abi(), ptypeslist.unwrap_or(core::mem::zeroed()) as _, pscopeslist.unwrap_or(core::mem::zeroed()) as _, pxaddrslist.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).UnPublish)(windows_core::Interface::as_raw(self), pszid.param().abi(), ullinstanceid, ullmessagenumber, pszsessionid.param().abi(), core::mem::transmute(pany.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).UnPublish)(windows_core::Interface::as_raw(self), pszid.param().abi(), ullinstanceid, ullmessagenumber, pszsessionid.param().abi(), pany.unwrap_or(core::mem::zeroed()) as _).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 @@ -3379,7 +3379,7 @@ impl IWSDiscoveryPublisher { P2: windows_core::Param, P6: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).MatchProbe)(windows_core::Interface::as_raw(self), pprobemessage, pmessageparameters.param().abi(), pszid.param().abi(), ullmetadataversion, ullinstanceid, ullmessagenumber, pszsessionid.param().abi(), core::mem::transmute(ptypeslist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pscopeslist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pxaddrslist.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).MatchProbe)(windows_core::Interface::as_raw(self), pprobemessage, pmessageparameters.param().abi(), pszid.param().abi(), ullmetadataversion, ullinstanceid, ullmessagenumber, pszsessionid.param().abi(), ptypeslist.unwrap_or(core::mem::zeroed()) as _, pscopeslist.unwrap_or(core::mem::zeroed()) as _, pxaddrslist.unwrap_or(core::mem::zeroed()) as _).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 @@ -3387,7 +3387,7 @@ impl IWSDiscoveryPublisher { P2: windows_core::Param, P6: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).MatchResolve)(windows_core::Interface::as_raw(self), presolvemessage, pmessageparameters.param().abi(), pszid.param().abi(), ullmetadataversion, ullinstanceid, ullmessagenumber, pszsessionid.param().abi(), core::mem::transmute(ptypeslist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pscopeslist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pxaddrslist.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).MatchResolve)(windows_core::Interface::as_raw(self), presolvemessage, pmessageparameters.param().abi(), pszid.param().abi(), ullmetadataversion, ullinstanceid, ullmessagenumber, pszsessionid.param().abi(), ptypeslist.unwrap_or(core::mem::zeroed()) as _, pscopeslist.unwrap_or(core::mem::zeroed()) as _, pxaddrslist.unwrap_or(core::mem::zeroed()) as _).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 @@ -3402,14 +3402,14 @@ impl IWSDiscoveryPublisher { ullinstanceid, 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())), - 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())), + ptypeslist.unwrap_or(core::mem::zeroed()) as _, + pscopeslist.unwrap_or(core::mem::zeroed()) as _, + pxaddrslist.unwrap_or(core::mem::zeroed()) as _, + pheaderany.unwrap_or(core::mem::zeroed()) as _, + preferenceparameterany.unwrap_or(core::mem::zeroed()) as _, + ppolicyany.unwrap_or(core::mem::zeroed()) as _, + pendpointreferenceany.unwrap_or(core::mem::zeroed()) as _, + pany.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -3430,14 +3430,14 @@ impl IWSDiscoveryPublisher { ullinstanceid, 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())), - 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())), + ptypeslist.unwrap_or(core::mem::zeroed()) as _, + pscopeslist.unwrap_or(core::mem::zeroed()) as _, + pxaddrslist.unwrap_or(core::mem::zeroed()) as _, + pheaderany.unwrap_or(core::mem::zeroed()) as _, + preferenceparameterany.unwrap_or(core::mem::zeroed()) as _, + ppolicyany.unwrap_or(core::mem::zeroed()) as _, + pendpointreferenceany.unwrap_or(core::mem::zeroed()) as _, + pany.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -3458,14 +3458,14 @@ impl IWSDiscoveryPublisher { ullinstanceid, 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())), - 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())), + ptypeslist.unwrap_or(core::mem::zeroed()) as _, + pscopeslist.unwrap_or(core::mem::zeroed()) as _, + pxaddrslist.unwrap_or(core::mem::zeroed()) as _, + pheaderany.unwrap_or(core::mem::zeroed()) as _, + preferenceparameterany.unwrap_or(core::mem::zeroed()) as _, + ppolicyany.unwrap_or(core::mem::zeroed()) as _, + pendpointreferenceany.unwrap_or(core::mem::zeroed()) as _, + pany.unwrap_or(core::mem::zeroed()) as _, ) .ok() } diff --git a/crates/libs/windows/src/Windows/Win32/Foundation/mod.rs b/crates/libs/windows/src/Windows/Win32/Foundation/mod.rs index 058a220232..abeb2695f3 100644 --- a/crates/libs/windows/src/Windows/Win32/Foundation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Foundation/mod.rs @@ -11,7 +11,7 @@ pub unsafe fn CompareObjectHandles(hfirstobjecthandle: HANDLE, hsecondobjecthand #[inline] pub unsafe fn DuplicateHandle(hsourceprocesshandle: HANDLE, hsourcehandle: HANDLE, htargetprocesshandle: HANDLE, lptargethandle: *mut HANDLE, dwdesiredaccess: u32, binherithandle: bool, dwoptions: DUPLICATE_HANDLE_OPTIONS) -> windows_core::Result<()> { 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); - unsafe { DuplicateHandle(hsourceprocesshandle, hsourcehandle, htargetprocesshandle, core::mem::transmute(lptargethandle), dwdesiredaccess, binherithandle.into(), dwoptions).ok() } + unsafe { DuplicateHandle(hsourceprocesshandle, hsourcehandle, htargetprocesshandle, lptargethandle as _, dwdesiredaccess, binherithandle.into(), dwoptions).ok() } } #[inline] pub unsafe fn FreeLibrary(hlibmodule: HMODULE) -> windows_core::Result<()> { @@ -21,7 +21,7 @@ pub unsafe fn FreeLibrary(hlibmodule: HMODULE) -> windows_core::Result<()> { #[inline] 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); - unsafe { GetHandleInformation(hobject, core::mem::transmute(lpdwflags)).ok() } + unsafe { GetHandleInformation(hobject, lpdwflags as _).ok() } } #[inline] pub unsafe fn GetLastError() -> WIN32_ERROR { @@ -31,13 +31,13 @@ pub unsafe fn GetLastError() -> WIN32_ERROR { #[inline] pub unsafe fn GlobalFree(hmem: Option) -> windows_core::Result { windows_targets::link!("kernel32.dll" "system" fn GlobalFree(hmem : HGLOBAL) -> HGLOBAL); - let result__ = unsafe { GlobalFree(core::mem::transmute(hmem.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { GlobalFree(hmem.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] pub unsafe fn LocalFree(hmem: Option) -> HLOCAL { windows_targets::link!("kernel32.dll" "system" fn LocalFree(hmem : HLOCAL) -> HLOCAL); - unsafe { LocalFree(core::mem::transmute(hmem.unwrap_or(core::mem::zeroed()))) } + unsafe { LocalFree(hmem.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RtlNtStatusToDosError(status: NTSTATUS) -> u32 { diff --git a/crates/libs/windows/src/Windows/Win32/Gaming/mod.rs b/crates/libs/windows/src/Windows/Win32/Gaming/mod.rs index 820b2125bc..880fe33707 100644 --- a/crates/libs/windows/src/Windows/Win32/Gaming/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Gaming/mod.rs @@ -20,7 +20,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); - unsafe { CheckGamingPrivilegeWithUI(privilegeid, core::mem::transmute_copy(scope), core::mem::transmute_copy(policy), core::mem::transmute_copy(friendlymessage), completionroutine, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CheckGamingPrivilegeWithUI(privilegeid, core::mem::transmute_copy(scope), core::mem::transmute_copy(policy), core::mem::transmute_copy(friendlymessage), completionroutine, context.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -28,7 +28,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); - unsafe { CheckGamingPrivilegeWithUIForUser(user.param().abi(), privilegeid, core::mem::transmute_copy(scope), core::mem::transmute_copy(policy), core::mem::transmute_copy(friendlymessage), completionroutine, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CheckGamingPrivilegeWithUIForUser(user.param().abi(), privilegeid, core::mem::transmute_copy(scope), core::mem::transmute_copy(policy), core::mem::transmute_copy(friendlymessage), completionroutine, context.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn GetExpandedResourceExclusiveCpuCount() -> windows_core::Result { @@ -67,7 +67,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); - unsafe { ShowChangeFriendRelationshipUI(core::mem::transmute_copy(targetuserxuid), completionroutine, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ShowChangeFriendRelationshipUI(core::mem::transmute_copy(targetuserxuid), completionroutine, context.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn ShowChangeFriendRelationshipUIForUser(user: P0, targetuserxuid: &windows_core::HSTRING, completionroutine: GameUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -75,12 +75,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); - unsafe { ShowChangeFriendRelationshipUIForUser(user.param().abi(), core::mem::transmute_copy(targetuserxuid), completionroutine, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ShowChangeFriendRelationshipUIForUser(user.param().abi(), core::mem::transmute_copy(targetuserxuid), completionroutine, context.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { ShowCustomizeUserProfileUI(completionroutine, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ShowCustomizeUserProfileUI(completionroutine, context.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn ShowCustomizeUserProfileUIForUser(user: P0, completionroutine: GameUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -88,12 +88,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); - unsafe { ShowCustomizeUserProfileUIForUser(user.param().abi(), completionroutine, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ShowCustomizeUserProfileUIForUser(user.param().abi(), completionroutine, context.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { ShowFindFriendsUI(completionroutine, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ShowFindFriendsUI(completionroutine, context.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn ShowFindFriendsUIForUser(user: P0, completionroutine: GameUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -101,12 +101,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); - unsafe { ShowFindFriendsUIForUser(user.param().abi(), completionroutine, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ShowFindFriendsUIForUser(user.param().abi(), completionroutine, context.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { ShowGameInfoUI(titleid, completionroutine, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ShowGameInfoUI(titleid, completionroutine, context.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn ShowGameInfoUIForUser(user: P0, titleid: u32, completionroutine: GameUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -114,12 +114,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); - unsafe { ShowGameInfoUIForUser(user.param().abi(), titleid, completionroutine, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ShowGameInfoUIForUser(user.param().abi(), titleid, completionroutine, context.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { ShowGameInviteUI(core::mem::transmute_copy(serviceconfigurationid), core::mem::transmute_copy(sessiontemplatename), core::mem::transmute_copy(sessionid), core::mem::transmute_copy(invitationdisplaytext), completionroutine, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ShowGameInviteUI(core::mem::transmute_copy(serviceconfigurationid), core::mem::transmute_copy(sessiontemplatename), core::mem::transmute_copy(sessionid), core::mem::transmute_copy(invitationdisplaytext), completionroutine, context.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -127,12 +127,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); - unsafe { ShowGameInviteUIForUser(user.param().abi(), core::mem::transmute_copy(serviceconfigurationid), core::mem::transmute_copy(sessiontemplatename), core::mem::transmute_copy(sessionid), core::mem::transmute_copy(invitationdisplaytext), completionroutine, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ShowGameInviteUIForUser(user.param().abi(), core::mem::transmute_copy(serviceconfigurationid), core::mem::transmute_copy(sessiontemplatename), core::mem::transmute_copy(sessionid), core::mem::transmute_copy(invitationdisplaytext), completionroutine, context.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { ShowGameInviteUIWithContext(core::mem::transmute_copy(serviceconfigurationid), core::mem::transmute_copy(sessiontemplatename), core::mem::transmute_copy(sessionid), core::mem::transmute_copy(invitationdisplaytext), core::mem::transmute_copy(customactivationcontext), completionroutine, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ShowGameInviteUIWithContext(core::mem::transmute_copy(serviceconfigurationid), core::mem::transmute_copy(sessiontemplatename), core::mem::transmute_copy(sessionid), core::mem::transmute_copy(invitationdisplaytext), core::mem::transmute_copy(customactivationcontext), completionroutine, context.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -140,12 +140,12 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-gaming-tcui-l1-1-3.dll" "system" fn ShowGameInviteUIWithContextForUser(user : * mut core::ffi::c_void, serviceconfigurationid : * 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); - unsafe { ShowGameInviteUIWithContextForUser(user.param().abi(), core::mem::transmute_copy(serviceconfigurationid), core::mem::transmute_copy(sessiontemplatename), core::mem::transmute_copy(sessionid), core::mem::transmute_copy(invitationdisplaytext), core::mem::transmute_copy(customactivationcontext), completionroutine, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ShowGameInviteUIWithContextForUser(user.param().abi(), core::mem::transmute_copy(serviceconfigurationid), core::mem::transmute_copy(sessiontemplatename), core::mem::transmute_copy(sessionid), core::mem::transmute_copy(invitationdisplaytext), core::mem::transmute_copy(customactivationcontext), completionroutine, context.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { ShowPlayerPickerUI(core::mem::transmute_copy(promptdisplaytext), core::mem::transmute(xuids.as_ptr()), xuids.len().try_into().unwrap(), core::mem::transmute(preselectedxuids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), preselectedxuids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), minselectioncount, maxselectioncount, completionroutine, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ShowPlayerPickerUI(core::mem::transmute_copy(promptdisplaytext), core::mem::transmute(xuids.as_ptr()), xuids.len().try_into().unwrap(), core::mem::transmute(preselectedxuids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), preselectedxuids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), minselectioncount, maxselectioncount, completionroutine, context.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -153,12 +153,12 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-gaming-tcui-l1-1-2.dll" "system" fn ShowPlayerPickerUIForUser(user : * mut core::ffi::c_void, promptdisplaytext : * 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); - unsafe { ShowPlayerPickerUIForUser(user.param().abi(), core::mem::transmute_copy(promptdisplaytext), core::mem::transmute(xuids.as_ptr()), xuids.len().try_into().unwrap(), core::mem::transmute(preselectedxuids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), preselectedxuids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), minselectioncount, maxselectioncount, completionroutine, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ShowPlayerPickerUIForUser(user.param().abi(), core::mem::transmute_copy(promptdisplaytext), core::mem::transmute(xuids.as_ptr()), xuids.len().try_into().unwrap(), core::mem::transmute(preselectedxuids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), preselectedxuids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), minselectioncount, maxselectioncount, completionroutine, context.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { ShowProfileCardUI(core::mem::transmute_copy(targetuserxuid), completionroutine, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ShowProfileCardUI(core::mem::transmute_copy(targetuserxuid), completionroutine, context.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn ShowProfileCardUIForUser(user: P0, targetuserxuid: &windows_core::HSTRING, completionroutine: GameUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -166,12 +166,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); - unsafe { ShowProfileCardUIForUser(user.param().abi(), core::mem::transmute_copy(targetuserxuid), completionroutine, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ShowProfileCardUIForUser(user.param().abi(), core::mem::transmute_copy(targetuserxuid), completionroutine, context.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { ShowTitleAchievementsUI(titleid, completionroutine, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ShowTitleAchievementsUI(titleid, completionroutine, context.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn ShowTitleAchievementsUIForUser(user: P0, titleid: u32, completionroutine: GameUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -179,12 +179,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); - unsafe { ShowTitleAchievementsUIForUser(user.param().abi(), titleid, completionroutine, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ShowTitleAchievementsUIForUser(user.param().abi(), titleid, completionroutine, context.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { ShowUserSettingsUI(completionroutine, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ShowUserSettingsUI(completionroutine, context.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn ShowUserSettingsUIForUser(user: P0, completionroutine: GameUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -192,7 +192,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); - unsafe { ShowUserSettingsUIForUser(user.param().abi(), completionroutine, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ShowUserSettingsUIForUser(user.param().abi(), completionroutine, context.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn TryCancelPendingGameUI() -> super::Foundation::BOOL { @@ -251,7 +251,7 @@ windows_core::imp::define_interface!(IGameExplorer, IGameExplorer_Vtbl, 0xe7b2fb windows_core::imp::interface_hierarchy!(IGameExplorer, windows_core::IUnknown); impl IGameExplorer { pub unsafe fn AddGame(&self, bstrgdfbinarypath: &windows_core::BSTR, bstrgameinstalldirectory: &windows_core::BSTR, installscope: GAME_INSTALL_SCOPE, pguidinstanceid: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AddGame)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrgdfbinarypath), core::mem::transmute_copy(bstrgameinstalldirectory), installscope, core::mem::transmute(pguidinstanceid)).ok() } + unsafe { (windows_core::Interface::vtable(self).AddGame)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrgdfbinarypath), core::mem::transmute_copy(bstrgameinstalldirectory), installscope, pguidinstanceid as _).ok() } } pub unsafe fn RemoveGame(&self, guidinstanceid: windows_core::GUID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RemoveGame)(windows_core::Interface::as_raw(self), core::mem::transmute(guidinstanceid)).ok() } @@ -447,7 +447,7 @@ impl IGameStatistics { } } pub unsafe fn GetStatistic(&self, categoryindex: u16, statindex: u16, pname: Option<*mut windows_core::PWSTR>, pvalue: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStatistic)(windows_core::Interface::as_raw(self), categoryindex, statindex, core::mem::transmute(pname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvalue.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStatistic)(windows_core::Interface::as_raw(self), categoryindex, statindex, pname.unwrap_or(core::mem::zeroed()) as _, pvalue.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetStatistic(&self, categoryindex: u16, statindex: u16, name: P2, value: P3) -> windows_core::Result<()> where @@ -643,7 +643,7 @@ impl IGameStatisticsMgr { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetGameStatistics)(windows_core::Interface::as_raw(self), gdfbinarypath.param().abi(), opentype, core::mem::transmute(popenresult), core::mem::transmute(ppistats)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGameStatistics)(windows_core::Interface::as_raw(self), gdfbinarypath.param().abi(), opentype, popenresult as _, core::mem::transmute(ppistats)).ok() } } pub unsafe fn RemoveGameStatistics(&self, gdfbinarypath: P0) -> windows_core::Result<()> where @@ -698,7 +698,7 @@ impl IXblIdpAuthManager { unsafe { (windows_core::Interface::vtable(self).SetGamerAccount)(windows_core::Interface::as_raw(self), msaaccountid.param().abi(), xuid.param().abi()).ok() } } pub unsafe fn GetGamerAccount(&self, msaaccountid: *mut windows_core::PWSTR, xuid: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGamerAccount)(windows_core::Interface::as_raw(self), core::mem::transmute(msaaccountid), core::mem::transmute(xuid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGamerAccount)(windows_core::Interface::as_raw(self), msaaccountid as _, xuid as _).ok() } } pub unsafe fn SetAppViewInitialized(&self, appsid: P0, msaaccountid: P1) -> windows_core::Result<()> where diff --git a/crates/libs/windows/src/Windows/Win32/Globalization/mod.rs b/crates/libs/windows/src/Windows/Win32/Globalization/mod.rs index 3b983c120b..c5fd3980fb 100644 --- a/crates/libs/windows/src/Windows/Win32/Globalization/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Globalization/mod.rs @@ -1,7 +1,7 @@ #[inline] pub unsafe fn AdjustCalendarDate(lpcaldatetime: *mut CALDATETIME, calunit: CALDATETIME_DATEUNIT, amount: i32) -> super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn AdjustCalendarDate(lpcaldatetime : *mut CALDATETIME, calunit : CALDATETIME_DATEUNIT, amount : i32) -> super::Foundation:: BOOL); - unsafe { AdjustCalendarDate(core::mem::transmute(lpcaldatetime), calunit, amount) } + unsafe { AdjustCalendarDate(lpcaldatetime as _, calunit, amount) } } #[inline] pub unsafe fn CompareStringA(locale: u32, dwcmpflags: u32, lpstring1: &[i8], lpstring2: &[i8]) -> COMPARESTRING_RESULT { @@ -14,7 +14,7 @@ where P0: 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); - unsafe { CompareStringEx(lplocalename.param().abi(), dwcmpflags, core::mem::transmute(lpstring1.as_ptr()), lpstring1.len().try_into().unwrap(), core::mem::transmute(lpstring2.as_ptr()), lpstring2.len().try_into().unwrap(), core::mem::transmute(lpversioninformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(lparam.unwrap_or(core::mem::zeroed()))) } + unsafe { CompareStringEx(lplocalename.param().abi(), dwcmpflags, core::mem::transmute(lpstring1.as_ptr()), lpstring1.len().try_into().unwrap(), core::mem::transmute(lpstring2.as_ptr()), lpstring2.len().try_into().unwrap(), lpversioninformation.unwrap_or(core::mem::zeroed()) as _, lpreserved.unwrap_or(core::mem::zeroed()) as _, lparam.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CompareStringOrdinal(lpstring1: &[u16], lpstring2: &[u16], bignorecase: bool) -> COMPARESTRING_RESULT { @@ -29,7 +29,7 @@ pub unsafe fn CompareStringW(locale: u32, dwcmpflags: u32, lpstring1: &[u16], lp #[inline] pub unsafe fn ConvertCalDateTimeToSystemTime(lpcaldatetime: *const CALDATETIME, lpsystime: *mut super::Foundation::SYSTEMTIME) -> super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn ConvertCalDateTimeToSystemTime(lpcaldatetime : *const CALDATETIME, lpsystime : *mut super::Foundation:: SYSTEMTIME) -> super::Foundation:: BOOL); - unsafe { ConvertCalDateTimeToSystemTime(lpcaldatetime, core::mem::transmute(lpsystime)) } + unsafe { ConvertCalDateTimeToSystemTime(lpcaldatetime, lpsystime as _) } } #[inline] pub unsafe fn ConvertDefaultLocale(locale: u32) -> u32 { @@ -39,7 +39,7 @@ pub unsafe fn ConvertDefaultLocale(locale: u32) -> u32 { #[inline] pub unsafe fn ConvertSystemTimeToCalDateTime(lpsystime: *const super::Foundation::SYSTEMTIME, calid: u32, lpcaldatetime: *mut CALDATETIME) -> super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn ConvertSystemTimeToCalDateTime(lpsystime : *const super::Foundation:: SYSTEMTIME, calid : u32, lpcaldatetime : *mut CALDATETIME) -> super::Foundation:: BOOL); - unsafe { ConvertSystemTimeToCalDateTime(lpsystime, calid, core::mem::transmute(lpcaldatetime)) } + unsafe { ConvertSystemTimeToCalDateTime(lpsystime, calid, lpcaldatetime as _) } } #[inline] pub unsafe fn EnumCalendarInfoA(lpcalinfoenumproc: CALINFO_ENUMPROCA, locale: u32, calendar: u32, caltype: u32) -> windows_core::Result<()> { @@ -146,7 +146,7 @@ pub unsafe fn EnumSystemLocalesA(lplocaleenumproc: LOCALE_ENUMPROCA, dwflags: u3 #[inline] 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); - unsafe { EnumSystemLocalesEx(lplocaleenumprocex, dwflags, lparam, core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { EnumSystemLocalesEx(lplocaleenumprocex, dwflags, lparam, lpreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn EnumSystemLocalesW(lplocaleenumproc: LOCALE_ENUMPROCW, dwflags: u32) -> windows_core::Result<()> { @@ -184,7 +184,7 @@ pub unsafe fn EnumUILanguagesW(lpuilanguageenumproc: UILANGUAGE_ENUMPROCW, dwfla #[inline] pub unsafe fn FindNLSString(locale: u32, dwfindnlsstringflags: u32, lpstringsource: &[u16], lpstringvalue: &[u16], pcchfound: Option<*mut i32>) -> i32 { windows_targets::link!("kernel32.dll" "system" fn FindNLSString(locale : u32, dwfindnlsstringflags : u32, lpstringsource : windows_core::PCWSTR, cchsource : i32, lpstringvalue : windows_core::PCWSTR, cchvalue : i32, pcchfound : *mut i32) -> i32); - unsafe { FindNLSString(locale, dwfindnlsstringflags, core::mem::transmute(lpstringsource.as_ptr()), lpstringsource.len().try_into().unwrap(), core::mem::transmute(lpstringvalue.as_ptr()), lpstringvalue.len().try_into().unwrap(), core::mem::transmute(pcchfound.unwrap_or(core::mem::zeroed()))) } + unsafe { FindNLSString(locale, dwfindnlsstringflags, core::mem::transmute(lpstringsource.as_ptr()), lpstringsource.len().try_into().unwrap(), core::mem::transmute(lpstringvalue.as_ptr()), lpstringvalue.len().try_into().unwrap(), pcchfound.unwrap_or(core::mem::zeroed()) as _) } } #[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: super::Foundation::LPARAM) -> i32 @@ -192,7 +192,7 @@ where P0: 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); - unsafe { FindNLSStringEx(lplocalename.param().abi(), dwfindnlsstringflags, core::mem::transmute(lpstringsource.as_ptr()), lpstringsource.len().try_into().unwrap(), core::mem::transmute(lpstringvalue.as_ptr()), lpstringvalue.len().try_into().unwrap(), core::mem::transmute(pcchfound.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpversioninformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed())), sorthandle) } + unsafe { FindNLSStringEx(lplocalename.param().abi(), dwfindnlsstringflags, core::mem::transmute(lpstringsource.as_ptr()), lpstringsource.len().try_into().unwrap(), core::mem::transmute(lpstringvalue.as_ptr()), lpstringvalue.len().try_into().unwrap(), pcchfound.unwrap_or(core::mem::zeroed()) as _, lpversioninformation.unwrap_or(core::mem::zeroed()) as _, lpreserved.unwrap_or(core::mem::zeroed()) as _, sorthandle) } } #[inline] pub unsafe fn FindStringOrdinal(dwfindstringordinalflags: u32, lpstringsource: &[u16], lpstringvalue: &[u16], bignorecase: bool) -> i32 { @@ -217,17 +217,17 @@ pub unsafe fn GetACP() -> u32 { #[inline] pub unsafe fn GetCPInfo(codepage: u32, lpcpinfo: *mut CPINFO) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetCPInfo(codepage : u32, lpcpinfo : *mut CPINFO) -> super::Foundation:: BOOL); - unsafe { GetCPInfo(codepage, core::mem::transmute(lpcpinfo)).ok() } + unsafe { GetCPInfo(codepage, lpcpinfo as _).ok() } } #[inline] pub unsafe fn GetCPInfoExA(codepage: u32, dwflags: u32, lpcpinfoex: *mut CPINFOEXA) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetCPInfoExA(codepage : u32, dwflags : u32, lpcpinfoex : *mut CPINFOEXA) -> super::Foundation:: BOOL); - unsafe { GetCPInfoExA(codepage, dwflags, core::mem::transmute(lpcpinfoex)).ok() } + unsafe { GetCPInfoExA(codepage, dwflags, lpcpinfoex as _).ok() } } #[inline] pub unsafe fn GetCPInfoExW(codepage: u32, dwflags: u32, lpcpinfoex: *mut CPINFOEXW) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetCPInfoExW(codepage : u32, dwflags : u32, lpcpinfoex : *mut CPINFOEXW) -> super::Foundation:: BOOL); - unsafe { GetCPInfoExW(codepage, dwflags, core::mem::transmute(lpcpinfoex)).ok() } + unsafe { GetCPInfoExW(codepage, dwflags, lpcpinfoex as _).ok() } } #[inline] pub unsafe fn GetCalendarDateFormatEx(lpszlocale: P0, dwflags: u32, lpcaldatetime: *const CALDATETIME, lpformat: P3, lpdatestr: windows_core::PWSTR, cchdate: i32) -> super::Foundation::BOOL @@ -241,7 +241,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); - unsafe { GetCalendarInfoA(locale, calendar, caltype, core::mem::transmute(lpcaldata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpcaldata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpvalue.unwrap_or(core::mem::zeroed()))) } + unsafe { GetCalendarInfoA(locale, calendar, caltype, core::mem::transmute(lpcaldata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpcaldata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpvalue.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GetCalendarInfoEx(lplocalename: P0, calendar: u32, lpreserved: P2, caltype: u32, lpcaldata: Option<&mut [u16]>, lpvalue: Option<*mut u32>) -> i32 @@ -250,17 +250,17 @@ 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); - unsafe { GetCalendarInfoEx(lplocalename.param().abi(), calendar, lpreserved.param().abi(), caltype, core::mem::transmute(lpcaldata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpcaldata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpvalue.unwrap_or(core::mem::zeroed()))) } + unsafe { GetCalendarInfoEx(lplocalename.param().abi(), calendar, lpreserved.param().abi(), caltype, core::mem::transmute(lpcaldata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpcaldata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpvalue.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { GetCalendarInfoW(locale, calendar, caltype, core::mem::transmute(lpcaldata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpcaldata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpvalue.unwrap_or(core::mem::zeroed()))) } + unsafe { GetCalendarInfoW(locale, calendar, caltype, core::mem::transmute(lpcaldata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpcaldata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpvalue.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GetCalendarSupportedDateRange(calendar: u32, lpcalmindatetime: *mut CALDATETIME, lpcalmaxdatetime: *mut CALDATETIME) -> super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn GetCalendarSupportedDateRange(calendar : u32, lpcalmindatetime : *mut CALDATETIME, lpcalmaxdatetime : *mut CALDATETIME) -> super::Foundation:: BOOL); - unsafe { GetCalendarSupportedDateRange(calendar, core::mem::transmute(lpcalmindatetime), core::mem::transmute(lpcalmaxdatetime)) } + unsafe { GetCalendarSupportedDateRange(calendar, lpcalmindatetime as _, lpcalmaxdatetime as _) } } #[inline] pub unsafe fn GetCurrencyFormatA(locale: u32, dwflags: u32, lpvalue: P2, lpformat: Option<*const CURRENCYFMTA>, lpcurrencystr: Option<&mut [u8]>) -> i32 @@ -268,7 +268,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); - unsafe { GetCurrencyFormatA(locale, 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())) } + unsafe { GetCurrencyFormatA(locale, dwflags, lpvalue.param().abi(), lpformat.unwrap_or(core::mem::zeroed()) as _, 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 @@ -277,7 +277,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); - unsafe { GetCurrencyFormatEx(lplocalename.param().abi(), 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())) } + unsafe { GetCurrencyFormatEx(lplocalename.param().abi(), dwflags, lpvalue.param().abi(), lpformat.unwrap_or(core::mem::zeroed()) as _, 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 @@ -285,7 +285,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); - unsafe { GetCurrencyFormatW(locale, 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())) } + unsafe { GetCurrencyFormatW(locale, dwflags, lpvalue.param().abi(), lpformat.unwrap_or(core::mem::zeroed()) as _, 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 @@ -293,7 +293,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); - unsafe { GetDateFormatA(locale, 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())) } + unsafe { GetDateFormatA(locale, dwflags, lpdate.unwrap_or(core::mem::zeroed()) as _, 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 @@ -303,7 +303,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); - unsafe { GetDateFormatEx(lplocalename.param().abi(), 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()) } + unsafe { GetDateFormatEx(lplocalename.param().abi(), dwflags, lpdate.unwrap_or(core::mem::zeroed()) as _, 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 @@ -311,7 +311,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); - unsafe { GetDateFormatW(locale, 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())) } + unsafe { GetDateFormatW(locale, dwflags, lpdate.unwrap_or(core::mem::zeroed()) as _, 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 @@ -331,7 +331,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); - unsafe { GetDurationFormat(locale, dwflags, core::mem::transmute(lpduration.unwrap_or(core::mem::zeroed())), 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())) } + unsafe { GetDurationFormat(locale, dwflags, lpduration.unwrap_or(core::mem::zeroed()) as _, 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 @@ -340,7 +340,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); - unsafe { GetDurationFormatEx(lplocalename.param().abi(), dwflags, core::mem::transmute(lpduration.unwrap_or(core::mem::zeroed())), 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())) } + unsafe { GetDurationFormatEx(lplocalename.param().abi(), dwflags, lpduration.unwrap_or(core::mem::zeroed()) as _, 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<()> @@ -348,7 +348,7 @@ 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); - unsafe { GetFileMUIInfo(dwflags, pcwszfilepath.param().abi(), core::mem::transmute(pfilemuiinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbfilemuiinfo)).ok() } + unsafe { GetFileMUIInfo(dwflags, pcwszfilepath.param().abi(), pfilemuiinfo.unwrap_or(core::mem::zeroed()) as _, pcbfilemuiinfo as _).ok() } } #[inline] pub unsafe fn GetFileMUIPath(dwflags: u32, pcwszfilepath: P1, pwszlanguage: Option, pcchlanguage: *mut u32, pwszfilemuipath: Option, pcchfilemuipath: *mut u32, pululenumerator: *mut u64) -> windows_core::Result<()> @@ -356,7 +356,7 @@ 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); - unsafe { GetFileMUIPath(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() } + unsafe { GetFileMUIPath(dwflags, pcwszfilepath.param().abi(), pwszlanguage.unwrap_or(core::mem::zeroed()) as _, pcchlanguage as _, pwszfilemuipath.unwrap_or(core::mem::zeroed()) as _, pcchfilemuipath as _, pululenumerator as _).ok() } } #[inline] pub unsafe fn GetGeoInfoA(location: i32, geotype: SYSGEOTYPE, lpgeodata: Option<&mut [u8]>, langid: u16) -> i32 { @@ -397,7 +397,7 @@ pub unsafe fn GetLocaleInfoW(locale: u32, lctype: u32, lplcdata: Option<&mut [u1 #[inline] pub unsafe fn GetNLSVersion(function: u32, locale: u32, lpversioninformation: *mut NLSVERSIONINFO) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetNLSVersion(function : u32, locale : u32, lpversioninformation : *mut NLSVERSIONINFO) -> super::Foundation:: BOOL); - unsafe { GetNLSVersion(function, locale, core::mem::transmute(lpversioninformation)).ok() } + unsafe { GetNLSVersion(function, locale, lpversioninformation as _).ok() } } #[inline] pub unsafe fn GetNLSVersionEx(function: u32, lplocalename: P1, lpversioninformation: *mut NLSVERSIONINFOEX) -> windows_core::Result<()> @@ -405,7 +405,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetNLSVersionEx(function : u32, lplocalename : windows_core::PCWSTR, lpversioninformation : *mut NLSVERSIONINFOEX) -> super::Foundation:: BOOL); - unsafe { GetNLSVersionEx(function, lplocalename.param().abi(), core::mem::transmute(lpversioninformation)).ok() } + unsafe { GetNLSVersionEx(function, lplocalename.param().abi(), lpversioninformation as _).ok() } } #[inline] pub unsafe fn GetNumberFormatA(locale: u32, dwflags: u32, lpvalue: P2, lpformat: Option<*const NUMBERFMTA>, lpnumberstr: Option<&mut [u8]>) -> i32 @@ -413,7 +413,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); - unsafe { GetNumberFormatA(locale, 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())) } + unsafe { GetNumberFormatA(locale, dwflags, lpvalue.param().abi(), lpformat.unwrap_or(core::mem::zeroed()) as _, 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 @@ -422,7 +422,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); - unsafe { GetNumberFormatEx(lplocalename.param().abi(), 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())) } + unsafe { GetNumberFormatEx(lplocalename.param().abi(), dwflags, lpvalue.param().abi(), lpformat.unwrap_or(core::mem::zeroed()) as _, 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 @@ -430,7 +430,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); - unsafe { GetNumberFormatW(locale, 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())) } + unsafe { GetNumberFormatW(locale, dwflags, lpvalue.param().abi(), lpformat.unwrap_or(core::mem::zeroed()) as _, 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 { @@ -440,7 +440,7 @@ pub unsafe fn GetOEMCP() -> u32 { #[inline] 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); - unsafe { GetProcessPreferredUILanguages(dwflags, core::mem::transmute(pulnumlanguages), core::mem::transmute(pwszlanguagesbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchlanguagesbuffer)).ok() } + unsafe { GetProcessPreferredUILanguages(dwflags, pulnumlanguages as _, pwszlanguagesbuffer.unwrap_or(core::mem::zeroed()) as _, pcchlanguagesbuffer as _).ok() } } #[inline] pub unsafe fn GetStringScripts(dwflags: u32, lpstring: P1, cchstring: i32, lpscripts: Option<&mut [u16]>) -> i32 @@ -453,7 +453,7 @@ where #[inline] pub unsafe fn GetStringTypeA(locale: u32, dwinfotype: u32, lpsrcstr: &[u8], lpchartype: *mut u16) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetStringTypeA(locale : u32, dwinfotype : u32, lpsrcstr : windows_core::PCSTR, cchsrc : i32, lpchartype : *mut u16) -> super::Foundation:: BOOL); - unsafe { GetStringTypeA(locale, dwinfotype, core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len().try_into().unwrap(), core::mem::transmute(lpchartype)).ok() } + unsafe { GetStringTypeA(locale, dwinfotype, core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len().try_into().unwrap(), lpchartype as _).ok() } } #[inline] pub unsafe fn GetStringTypeExA(locale: u32, dwinfotype: u32, lpsrcstr: P2, cchsrc: i32, lpchartype: *mut u16) -> super::Foundation::BOOL @@ -461,7 +461,7 @@ where P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetStringTypeExA(locale : u32, dwinfotype : u32, lpsrcstr : windows_core::PCSTR, cchsrc : i32, lpchartype : *mut u16) -> super::Foundation:: BOOL); - unsafe { GetStringTypeExA(locale, dwinfotype, lpsrcstr.param().abi(), cchsrc, core::mem::transmute(lpchartype)) } + unsafe { GetStringTypeExA(locale, dwinfotype, lpsrcstr.param().abi(), cchsrc, lpchartype as _) } } #[inline] pub unsafe fn GetStringTypeExW(locale: u32, dwinfotype: u32, lpsrcstr: P2, cchsrc: i32, lpchartype: *mut u16) -> windows_core::Result<()> @@ -469,12 +469,12 @@ where P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetStringTypeExW(locale : u32, dwinfotype : u32, lpsrcstr : windows_core::PCWSTR, cchsrc : i32, lpchartype : *mut u16) -> super::Foundation:: BOOL); - unsafe { GetStringTypeExW(locale, dwinfotype, lpsrcstr.param().abi(), cchsrc, core::mem::transmute(lpchartype)).ok() } + unsafe { GetStringTypeExW(locale, dwinfotype, lpsrcstr.param().abi(), cchsrc, lpchartype as _).ok() } } #[inline] pub unsafe fn GetStringTypeW(dwinfotype: u32, lpsrcstr: &[u16], lpchartype: *mut u16) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetStringTypeW(dwinfotype : u32, lpsrcstr : windows_core::PCWSTR, cchsrc : i32, lpchartype : *mut u16) -> super::Foundation:: BOOL); - unsafe { GetStringTypeW(dwinfotype, core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len().try_into().unwrap(), core::mem::transmute(lpchartype)).ok() } + unsafe { GetStringTypeW(dwinfotype, core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len().try_into().unwrap(), lpchartype as _).ok() } } #[inline] pub unsafe fn GetSystemDefaultLCID() -> u32 { @@ -499,7 +499,7 @@ pub unsafe fn GetSystemDefaultUILanguage() -> u16 { #[inline] 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); - unsafe { GetSystemPreferredUILanguages(dwflags, core::mem::transmute(pulnumlanguages), core::mem::transmute(pwszlanguagesbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchlanguagesbuffer)).ok() } + unsafe { GetSystemPreferredUILanguages(dwflags, pulnumlanguages as _, pwszlanguagesbuffer.unwrap_or(core::mem::zeroed()) as _, pcchlanguagesbuffer as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -511,7 +511,7 @@ pub unsafe fn GetTextCharset(hdc: super::Graphics::Gdi::HDC) -> i32 { #[inline] 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); - unsafe { GetTextCharsetInfo(hdc, core::mem::transmute(lpsig.unwrap_or(core::mem::zeroed())), dwflags) } + unsafe { GetTextCharsetInfo(hdc, lpsig.unwrap_or(core::mem::zeroed()) as _, dwflags) } } #[inline] pub unsafe fn GetThreadLocale() -> u32 { @@ -521,7 +521,7 @@ pub unsafe fn GetThreadLocale() -> u32 { #[inline] 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); - unsafe { GetThreadPreferredUILanguages(dwflags, core::mem::transmute(pulnumlanguages), core::mem::transmute(pwszlanguagesbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchlanguagesbuffer)).ok() } + unsafe { GetThreadPreferredUILanguages(dwflags, pulnumlanguages as _, pwszlanguagesbuffer.unwrap_or(core::mem::zeroed()) as _, pcchlanguagesbuffer as _).ok() } } #[inline] pub unsafe fn GetThreadUILanguage() -> u16 { @@ -534,7 +534,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); - unsafe { GetTimeFormatA(locale, 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())) } + unsafe { GetTimeFormatA(locale, dwflags, lptime.unwrap_or(core::mem::zeroed()) as _, 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 @@ -543,7 +543,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); - unsafe { GetTimeFormatEx(lplocalename.param().abi(), 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())) } + unsafe { GetTimeFormatEx(lplocalename.param().abi(), dwflags, lptime.unwrap_or(core::mem::zeroed()) as _, 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 @@ -551,7 +551,7 @@ 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); - unsafe { GetTimeFormatW(locale, 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())) } + unsafe { GetTimeFormatW(locale, dwflags, lptime.unwrap_or(core::mem::zeroed()) as _, 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: Option, pcchfallbacklanguages: Option<*mut u32>, pattributes: *mut u32) -> windows_core::Result<()> @@ -559,7 +559,7 @@ 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); - unsafe { GetUILanguageInfo(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() } + unsafe { GetUILanguageInfo(dwflags, pwmszlanguage.param().abi(), pwszfallbacklanguages.unwrap_or(core::mem::zeroed()) as _, pcchfallbacklanguages.unwrap_or(core::mem::zeroed()) as _, pattributes as _).ok() } } #[inline] pub unsafe fn GetUserDefaultGeoName(geoname: &mut [u16]) -> i32 { @@ -594,7 +594,7 @@ pub unsafe fn GetUserGeoID(geoclass: SYSGEOCLASS) -> i32 { #[inline] 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); - unsafe { GetUserPreferredUILanguages(dwflags, core::mem::transmute(pulnumlanguages), core::mem::transmute(pwszlanguagesbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchlanguagesbuffer)).ok() } + unsafe { GetUserPreferredUILanguages(dwflags, pulnumlanguages as _, pwszlanguagesbuffer.unwrap_or(core::mem::zeroed()) as _, pcchlanguagesbuffer as _).ok() } } #[inline] pub unsafe fn IdnToAscii(dwflags: u32, lpunicodecharstr: &[u16], lpasciicharstr: Option<&mut [u16]>) -> i32 { @@ -639,7 +639,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); - unsafe { IsTextUnicode(lpv, isize, core::mem::transmute(lpiresult.unwrap_or(core::mem::zeroed()))) } + unsafe { IsTextUnicode(lpv, isize, lpiresult.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn IsValidCodePage(codepage: u32) -> super::Foundation::BOOL { @@ -688,7 +688,7 @@ pub unsafe fn LCIDToLocaleName(locale: u32, lpname: Option<&mut [u16]>, dwflags: #[inline] 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); - unsafe { LCMapStringA(locale, dwmapflags, core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len().try_into().unwrap(), core::mem::transmute(lpdeststr.unwrap_or(core::mem::zeroed())), cchdest) } + unsafe { LCMapStringA(locale, dwmapflags, core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len().try_into().unwrap(), lpdeststr.unwrap_or(core::mem::zeroed()) as _, 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: super::Foundation::LPARAM) -> i32 @@ -696,12 +696,12 @@ where P0: 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); - unsafe { LCMapStringEx(lplocalename.param().abi(), dwmapflags, core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len().try_into().unwrap(), core::mem::transmute(lpdeststr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpdeststr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpversioninformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed())), sorthandle) } + unsafe { LCMapStringEx(lplocalename.param().abi(), dwmapflags, core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len().try_into().unwrap(), core::mem::transmute(lpdeststr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpdeststr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpversioninformation.unwrap_or(core::mem::zeroed()) as _, lpreserved.unwrap_or(core::mem::zeroed()) as _, sorthandle) } } #[inline] 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); - unsafe { LCMapStringW(locale, dwmapflags, core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len().try_into().unwrap(), core::mem::transmute(lpdeststr.unwrap_or(core::mem::zeroed())), cchdest) } + unsafe { LCMapStringW(locale, dwmapflags, core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len().try_into().unwrap(), lpdeststr.unwrap_or(core::mem::zeroed()) as _, cchdest) } } #[inline] pub unsafe fn LocaleNameToLCID(lpname: P0, dwflags: u32) -> u32 @@ -717,7 +717,7 @@ where P2: windows_core::Param, { windows_targets::link!("elscore.dll" "system" fn MappingDoAction(pbag : *mut MAPPING_PROPERTY_BAG, dwrangeindex : u32, pszactionid : windows_core::PCWSTR) -> windows_core::HRESULT); - unsafe { MappingDoAction(core::mem::transmute(pbag), dwrangeindex, pszactionid.param().abi()).ok() } + unsafe { MappingDoAction(pbag as _, dwrangeindex, pszactionid.param().abi()).ok() } } #[inline] pub unsafe fn MappingFreePropertyBag(pbag: *const MAPPING_PROPERTY_BAG) -> windows_core::Result<()> { @@ -732,12 +732,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); - unsafe { MappingGetServices(core::mem::transmute(poptions.unwrap_or(core::mem::zeroed())), core::mem::transmute(prgservices), core::mem::transmute(pdwservicescount)).ok() } + unsafe { MappingGetServices(poptions.unwrap_or(core::mem::zeroed()) as _, prgservices as _, pdwservicescount as _).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); - unsafe { MappingRecognizeText(pserviceinfo, core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap(), dwindex, core::mem::transmute(poptions.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbag)).ok() } + unsafe { MappingRecognizeText(pserviceinfo, core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap(), dwindex, poptions.unwrap_or(core::mem::zeroed()) as _, pbag as _).ok() } } #[inline] pub unsafe fn MultiByteToWideChar(codepage: u32, dwflags: MULTI_BYTE_TO_WIDE_CHAR_FLAGS, lpmultibytestr: &[u8], lpwidecharstr: Option<&mut [u16]>) -> i32 { @@ -756,7 +756,7 @@ where 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); - unsafe { NotifyUILanguageChange(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()))) } + unsafe { NotifyUILanguageChange(dwflags, pcwstrnewlanguage.param().abi(), pcwstrpreviouslanguage.param().abi(), dwreserved.unwrap_or(core::mem::zeroed()) as _, pdwstatusrtrn.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ResolveLocaleName(lpnametoresolve: P0, lplocalename: Option<&mut [u16]>) -> i32 @@ -774,13 +774,13 @@ pub unsafe fn RestoreThreadPreferredUILanguages(snapshot: HSAVEDUILANGUAGES) { #[inline] pub unsafe fn ScriptApplyDigitSubstitution(psds: *const SCRIPT_DIGITSUBSTITUTE, psc: *mut SCRIPT_CONTROL, pss: *mut SCRIPT_STATE) -> windows_core::Result<()> { windows_targets::link!("usp10.dll" "system" fn ScriptApplyDigitSubstitution(psds : *const SCRIPT_DIGITSUBSTITUTE, psc : *mut SCRIPT_CONTROL, pss : *mut SCRIPT_STATE) -> windows_core::HRESULT); - unsafe { ScriptApplyDigitSubstitution(psds, core::mem::transmute(psc), core::mem::transmute(pss)).ok() } + unsafe { ScriptApplyDigitSubstitution(psds, psc as _, pss as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[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); - unsafe { ScriptApplyLogicalWidth(pidx, cchars, cglyphs, pwlogclust, psva, piadvance, psa, core::mem::transmute(pabc.unwrap_or(core::mem::zeroed())), core::mem::transmute(pijustify)).ok() } + unsafe { ScriptApplyLogicalWidth(pidx, cchars, cglyphs, pwlogclust, psva, piadvance, psa, pabc.unwrap_or(core::mem::zeroed()) as _, pijustify as _).ok() } } #[inline] pub unsafe fn ScriptBreak(pwcchars: P0, cchars: i32, psa: *const SCRIPT_ANALYSIS, psla: *mut SCRIPT_LOGATTR) -> windows_core::Result<()> @@ -788,23 +788,23 @@ where P0: windows_core::Param, { windows_targets::link!("usp10.dll" "system" fn ScriptBreak(pwcchars : windows_core::PCWSTR, cchars : i32, psa : *const SCRIPT_ANALYSIS, psla : *mut SCRIPT_LOGATTR) -> windows_core::HRESULT); - unsafe { ScriptBreak(pwcchars.param().abi(), cchars, psa, core::mem::transmute(psla)).ok() } + unsafe { ScriptBreak(pwcchars.param().abi(), cchars, psa, psla as _).ok() } } #[inline] pub unsafe fn ScriptCPtoX(icp: i32, ftrailing: bool, cglyphs: i32, pwlogclust: &[u16], psva: *const SCRIPT_VISATTR, piadvance: *const i32, psa: *const SCRIPT_ANALYSIS, pix: *mut i32) -> windows_core::Result<()> { windows_targets::link!("usp10.dll" "system" fn ScriptCPtoX(icp : i32, ftrailing : super::Foundation:: BOOL, cchars : i32, cglyphs : i32, pwlogclust : *const u16, psva : *const SCRIPT_VISATTR, piadvance : *const i32, psa : *const SCRIPT_ANALYSIS, pix : *mut i32) -> windows_core::HRESULT); - unsafe { ScriptCPtoX(icp, ftrailing.into(), pwlogclust.len().try_into().unwrap(), cglyphs, core::mem::transmute(pwlogclust.as_ptr()), psva, piadvance, psa, core::mem::transmute(pix)).ok() } + unsafe { ScriptCPtoX(icp, ftrailing.into(), pwlogclust.len().try_into().unwrap(), cglyphs, core::mem::transmute(pwlogclust.as_ptr()), psva, piadvance, psa, pix as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { ScriptCacheGetHeight(hdc, core::mem::transmute(psc), core::mem::transmute(tmheight)).ok() } + unsafe { ScriptCacheGetHeight(hdc, psc as _, tmheight as _).ok() } } #[inline] pub unsafe fn ScriptFreeCache(psc: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("usp10.dll" "system" fn ScriptFreeCache(psc : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { ScriptFreeCache(core::mem::transmute(psc)).ok() } + unsafe { ScriptFreeCache(psc as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -813,43 +813,43 @@ where 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); - unsafe { ScriptGetCMap(hdc, core::mem::transmute(psc), pwcinchars.param().abi(), cchars, dwflags, core::mem::transmute(pwoutglyphs)).ok() } + unsafe { ScriptGetCMap(hdc, psc as _, pwcinchars.param().abi(), cchars, dwflags, pwoutglyphs as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { ScriptGetFontAlternateGlyphs(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(psc), core::mem::transmute(psa.unwrap_or(core::mem::zeroed())), tagscript, taglangsys, tagfeature, wglyphid, palternateglyphs.len().try_into().unwrap(), core::mem::transmute(palternateglyphs.as_ptr()), core::mem::transmute(pcalternates)).ok() } + unsafe { ScriptGetFontAlternateGlyphs(hdc.unwrap_or(core::mem::zeroed()) as _, psc as _, psa.unwrap_or(core::mem::zeroed()) as _, tagscript, taglangsys, tagfeature, wglyphid, palternateglyphs.len().try_into().unwrap(), core::mem::transmute(palternateglyphs.as_ptr()), pcalternates as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { ScriptGetFontFeatureTags(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(psc), core::mem::transmute(psa.unwrap_or(core::mem::zeroed())), tagscript, taglangsys, pfeaturetags.len().try_into().unwrap(), core::mem::transmute(pfeaturetags.as_ptr()), core::mem::transmute(pctags)).ok() } + unsafe { ScriptGetFontFeatureTags(hdc.unwrap_or(core::mem::zeroed()) as _, psc as _, psa.unwrap_or(core::mem::zeroed()) as _, tagscript, taglangsys, pfeaturetags.len().try_into().unwrap(), core::mem::transmute(pfeaturetags.as_ptr()), pctags as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { ScriptGetFontLanguageTags(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(psc), core::mem::transmute(psa.unwrap_or(core::mem::zeroed())), tagscript, plangsystags.len().try_into().unwrap(), core::mem::transmute(plangsystags.as_ptr()), core::mem::transmute(pctags)).ok() } + unsafe { ScriptGetFontLanguageTags(hdc.unwrap_or(core::mem::zeroed()) as _, psc as _, psa.unwrap_or(core::mem::zeroed()) as _, tagscript, plangsystags.len().try_into().unwrap(), core::mem::transmute(plangsystags.as_ptr()), pctags as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { ScriptGetFontProperties(hdc, core::mem::transmute(psc), core::mem::transmute(sfp)).ok() } + unsafe { ScriptGetFontProperties(hdc, psc as _, sfp as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { 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() } + unsafe { ScriptGetFontScriptTags(hdc.unwrap_or(core::mem::zeroed()) as _, psc as _, psa.unwrap_or(core::mem::zeroed()) as _, pscripttags.len().try_into().unwrap(), core::mem::transmute(pscripttags.as_ptr()), pctags as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { ScriptGetGlyphABCWidth(hdc, core::mem::transmute(psc), wglyph, core::mem::transmute(pabc)).ok() } + unsafe { ScriptGetGlyphABCWidth(hdc, psc as _, wglyph, pabc as _).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<()> { @@ -859,7 +859,7 @@ pub unsafe fn ScriptGetLogicalWidths(psa: *const SCRIPT_ANALYSIS, cchars: i32, c #[inline] pub unsafe fn ScriptGetProperties(ppsp: *mut *mut *mut SCRIPT_PROPERTIES, pinumscripts: *mut i32) -> windows_core::Result<()> { windows_targets::link!("usp10.dll" "system" fn ScriptGetProperties(ppsp : *mut *mut *mut SCRIPT_PROPERTIES, pinumscripts : *mut i32) -> windows_core::HRESULT); - unsafe { ScriptGetProperties(core::mem::transmute(ppsp), core::mem::transmute(pinumscripts)).ok() } + unsafe { ScriptGetProperties(ppsp as _, pinumscripts as _).ok() } } #[inline] pub unsafe fn ScriptIsComplex(pwcinchars: &[u16], dwflags: SCRIPT_IS_COMPLEX_FLAGS) -> windows_core::HRESULT { @@ -869,28 +869,28 @@ 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); - unsafe { 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() } + unsafe { ScriptItemize(core::mem::transmute(pwcinchars.as_ptr()), pwcinchars.len().try_into().unwrap(), pitems.len().try_into().unwrap(), pscontrol.unwrap_or(core::mem::zeroed()) as _, psstate.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pitems.as_ptr()), pcitems as _).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); - unsafe { ScriptItemizeOpenType(core::mem::transmute(pwcinchars.as_ptr()), pwcinchars.len().try_into().unwrap(), 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() } + unsafe { ScriptItemizeOpenType(core::mem::transmute(pwcinchars.as_ptr()), pwcinchars.len().try_into().unwrap(), cmaxitems, pscontrol.unwrap_or(core::mem::zeroed()) as _, psstate.unwrap_or(core::mem::zeroed()) as _, pitems as _, pscripttags as _, pcitems as _).ok() } } #[inline] pub unsafe fn ScriptJustify(psva: *const SCRIPT_VISATTR, piadvance: *const i32, cglyphs: i32, idx: i32, iminkashida: i32, pijustify: *mut i32) -> windows_core::Result<()> { windows_targets::link!("usp10.dll" "system" fn ScriptJustify(psva : *const SCRIPT_VISATTR, piadvance : *const i32, cglyphs : i32, idx : i32, iminkashida : i32, pijustify : *mut i32) -> windows_core::HRESULT); - unsafe { ScriptJustify(psva, piadvance, cglyphs, idx, iminkashida, core::mem::transmute(pijustify)).ok() } + unsafe { ScriptJustify(psva, piadvance, cglyphs, idx, iminkashida, pijustify as _).ok() } } #[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); - unsafe { ScriptLayout(cruns, pblevel, core::mem::transmute(pivisualtological.unwrap_or(core::mem::zeroed())), core::mem::transmute(pilogicaltovisual.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ScriptLayout(cruns, pblevel, pivisualtological.unwrap_or(core::mem::zeroed()) as _, pilogicaltovisual.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { ScriptPlace(hdc, core::mem::transmute(psc), pwglyphs, cglyphs, psva, core::mem::transmute(psa), core::mem::transmute(piadvance), core::mem::transmute(pgoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(pabc)).ok() } + unsafe { ScriptPlace(hdc, psc as _, pwglyphs, cglyphs, psva, psa as _, piadvance as _, pgoffset.unwrap_or(core::mem::zeroed()) as _, pabc as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -899,35 +899,13 @@ where 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); - unsafe { - ScriptPlaceOpenType( - core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), - core::mem::transmute(psc), - core::mem::transmute(psa), - tagscript, - taglangsys, - core::mem::transmute(rcrangechars.unwrap_or(core::mem::zeroed())), - core::mem::transmute(rprangeproperties.unwrap_or(core::mem::zeroed())), - cranges, - pwcchars.param().abi(), - pwlogclust, - pcharprops, - cchars, - pwglyphs, - pglyphprops, - cglyphs, - core::mem::transmute(piadvance), - core::mem::transmute(pgoffset), - core::mem::transmute(pabc.unwrap_or(core::mem::zeroed())), - ) - .ok() - } + unsafe { ScriptPlaceOpenType(hdc.unwrap_or(core::mem::zeroed()) as _, psc as _, psa as _, tagscript, taglangsys, rcrangechars.unwrap_or(core::mem::zeroed()) as _, rprangeproperties.unwrap_or(core::mem::zeroed()) as _, cranges, pwcchars.param().abi(), pwlogclust, pcharprops, cchars, pwglyphs, pglyphprops, cglyphs, piadvance as _, pgoffset as _, pabc.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { ScriptPositionSingleGlyph(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(psc), core::mem::transmute(psa.unwrap_or(core::mem::zeroed())), tagscript, taglangsys, tagfeature, lparameter, wglyphid, iadvance, core::mem::transmute(goffset), core::mem::transmute(pioutadvance), core::mem::transmute(poutgoffset)).ok() } + unsafe { ScriptPositionSingleGlyph(hdc.unwrap_or(core::mem::zeroed()) as _, psc as _, psa.unwrap_or(core::mem::zeroed()) as _, tagscript, taglangsys, tagfeature, lparameter, wglyphid, iadvance, core::mem::transmute(goffset), pioutadvance as _, poutgoffset as _).ok() } } #[inline] pub unsafe fn ScriptRecordDigitSubstitution(locale: u32) -> windows_core::Result { @@ -944,7 +922,7 @@ where 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); - unsafe { ScriptShape(hdc, core::mem::transmute(psc), pwcchars.param().abi(), cchars, cmaxglyphs, core::mem::transmute(psa), core::mem::transmute(pwoutglyphs), core::mem::transmute(pwlogclust), core::mem::transmute(psva), core::mem::transmute(pcglyphs)).ok() } + unsafe { ScriptShape(hdc, psc as _, pwcchars.param().abi(), cchars, cmaxglyphs, psa as _, pwoutglyphs as _, pwlogclust as _, psva as _, pcglyphs as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -953,33 +931,13 @@ where 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); - unsafe { - ScriptShapeOpenType( - core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), - core::mem::transmute(psc), - core::mem::transmute(psa), - tagscript, - taglangsys, - core::mem::transmute(rcrangechars.unwrap_or(core::mem::zeroed())), - core::mem::transmute(rprangeproperties.unwrap_or(core::mem::zeroed())), - cranges, - pwcchars.param().abi(), - cchars, - cmaxglyphs, - core::mem::transmute(pwlogclust), - core::mem::transmute(pcharprops), - core::mem::transmute(pwoutglyphs), - core::mem::transmute(poutglyphprops), - core::mem::transmute(pcglyphs), - ) - .ok() - } + unsafe { ScriptShapeOpenType(hdc.unwrap_or(core::mem::zeroed()) as _, psc as _, psa as _, tagscript, taglangsys, rcrangechars.unwrap_or(core::mem::zeroed()) as _, rprangeproperties.unwrap_or(core::mem::zeroed()) as _, cranges, pwcchars.param().abi(), cchars, cmaxglyphs, pwlogclust as _, pcharprops as _, pwoutglyphs as _, poutglyphprops as _, pcglyphs as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { ScriptStringAnalyse(hdc, pstring, cstring, cglyphs, icharset, dwflags, ireqwidth, 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())), pbinclass, core::mem::transmute(pssa)).ok() } + unsafe { ScriptStringAnalyse(hdc, pstring, cstring, cglyphs, icharset, dwflags, ireqwidth, pscontrol.unwrap_or(core::mem::zeroed()) as _, psstate.unwrap_or(core::mem::zeroed()) as _, pidx.unwrap_or(core::mem::zeroed()) as _, ptabdef.unwrap_or(core::mem::zeroed()) as _, pbinclass, pssa as _).ok() } } #[inline] pub unsafe fn ScriptStringCPtoX(ssa: *const core::ffi::c_void, icp: i32, ftrailing: bool) -> windows_core::Result { @@ -992,23 +950,23 @@ pub unsafe fn ScriptStringCPtoX(ssa: *const core::ffi::c_void, icp: i32, ftraili #[inline] pub unsafe fn ScriptStringFree(pssa: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("usp10.dll" "system" fn ScriptStringFree(pssa : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { ScriptStringFree(core::mem::transmute(pssa)).ok() } + unsafe { ScriptStringFree(pssa as _).ok() } } #[inline] pub unsafe fn ScriptStringGetLogicalWidths(ssa: *const core::ffi::c_void, pidx: *mut i32) -> windows_core::Result<()> { windows_targets::link!("usp10.dll" "system" fn ScriptStringGetLogicalWidths(ssa : *const core::ffi::c_void, pidx : *mut i32) -> windows_core::HRESULT); - unsafe { ScriptStringGetLogicalWidths(ssa, core::mem::transmute(pidx)).ok() } + unsafe { ScriptStringGetLogicalWidths(ssa, pidx as _).ok() } } #[inline] pub unsafe fn ScriptStringGetOrder(ssa: *const core::ffi::c_void, puorder: *mut u32) -> windows_core::Result<()> { windows_targets::link!("usp10.dll" "system" fn ScriptStringGetOrder(ssa : *const core::ffi::c_void, puorder : *mut u32) -> windows_core::HRESULT); - unsafe { ScriptStringGetOrder(ssa, core::mem::transmute(puorder)).ok() } + unsafe { ScriptStringGetOrder(ssa, puorder as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn ScriptStringOut(ssa: *const core::ffi::c_void, ix: i32, iy: i32, uoptions: super::Graphics::Gdi::ETO_OPTIONS, prc: Option<*const super::Foundation::RECT>, iminsel: i32, imaxsel: i32, fdisabled: bool) -> windows_core::Result<()> { 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); - unsafe { ScriptStringOut(ssa, ix, iy, uoptions, core::mem::transmute(prc.unwrap_or(core::mem::zeroed())), iminsel, imaxsel, fdisabled.into()).ok() } + unsafe { ScriptStringOut(ssa, ix, iy, uoptions, prc.unwrap_or(core::mem::zeroed()) as _, iminsel, imaxsel, fdisabled.into()).ok() } } #[inline] pub unsafe fn ScriptStringValidate(ssa: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -1018,7 +976,7 @@ pub unsafe fn ScriptStringValidate(ssa: *const core::ffi::c_void) -> windows_cor #[inline] pub unsafe fn ScriptStringXtoCP(ssa: *const core::ffi::c_void, ix: i32, pich: *mut i32, pitrailing: *mut i32) -> windows_core::Result<()> { windows_targets::link!("usp10.dll" "system" fn ScriptStringXtoCP(ssa : *const core::ffi::c_void, ix : i32, pich : *mut i32, pitrailing : *mut i32) -> windows_core::HRESULT); - unsafe { ScriptStringXtoCP(ssa, ix, core::mem::transmute(pich), core::mem::transmute(pitrailing)).ok() } + unsafe { ScriptStringXtoCP(ssa, ix, pich as _, pitrailing as _).ok() } } #[inline] pub unsafe fn ScriptString_pLogAttr(ssa: *const core::ffi::c_void) -> *mut SCRIPT_LOGATTR { @@ -1039,7 +997,7 @@ pub unsafe fn ScriptString_pcOutChars(ssa: *const core::ffi::c_void) -> *mut i32 #[inline] 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); - unsafe { ScriptSubstituteSingleGlyph(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(psc), core::mem::transmute(psa.unwrap_or(core::mem::zeroed())), tagscript, taglangsys, tagfeature, lparameter, wglyphid, core::mem::transmute(pwoutglyphid)).ok() } + unsafe { ScriptSubstituteSingleGlyph(hdc.unwrap_or(core::mem::zeroed()) as _, psc as _, psa.unwrap_or(core::mem::zeroed()) as _, tagscript, taglangsys, tagfeature, lparameter, wglyphid, pwoutglyphid as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1048,12 +1006,12 @@ where 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); - unsafe { ScriptTextOut(hdc, core::mem::transmute(psc), x, y, fuoptions, core::mem::transmute(lprc.unwrap_or(core::mem::zeroed())), psa, pwcreserved.param().abi(), core::mem::transmute(ireserved.unwrap_or(core::mem::zeroed())), pwglyphs, cglyphs, piadvance, core::mem::transmute(pijustify.unwrap_or(core::mem::zeroed())), pgoffset).ok() } + unsafe { ScriptTextOut(hdc, psc as _, x, y, fuoptions, lprc.unwrap_or(core::mem::zeroed()) as _, psa, pwcreserved.param().abi(), ireserved.unwrap_or(core::mem::zeroed()) as _, pwglyphs, cglyphs, piadvance, pijustify.unwrap_or(core::mem::zeroed()) as _, 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<()> { windows_targets::link!("usp10.dll" "system" fn ScriptXtoCP(ix : i32, cchars : i32, cglyphs : i32, pwlogclust : *const u16, psva : *const SCRIPT_VISATTR, piadvance : *const i32, psa : *const SCRIPT_ANALYSIS, picp : *mut i32, pitrailing : *mut i32) -> windows_core::HRESULT); - unsafe { ScriptXtoCP(ix, pwlogclust.len().try_into().unwrap(), cglyphs, core::mem::transmute(pwlogclust.as_ptr()), psva, piadvance, psa, core::mem::transmute(picp), core::mem::transmute(pitrailing)).ok() } + unsafe { ScriptXtoCP(ix, pwlogclust.len().try_into().unwrap(), cglyphs, core::mem::transmute(pwlogclust.as_ptr()), psva, piadvance, psa, picp as _, pitrailing as _).ok() } } #[inline] pub unsafe fn SetCalendarInfoA(locale: u32, calendar: u32, caltype: u32, lpcaldata: P3) -> windows_core::Result<()> @@ -1093,7 +1051,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); - unsafe { SetProcessPreferredUILanguages(dwflags, pwszlanguagesbuffer.param().abi(), core::mem::transmute(pulnumlanguages.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetProcessPreferredUILanguages(dwflags, pwszlanguagesbuffer.param().abi(), pulnumlanguages.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetThreadLocale(locale: u32) -> super::Foundation::BOOL { @@ -1106,7 +1064,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); - unsafe { SetThreadPreferredUILanguages(dwflags, pwszlanguagesbuffer.param().abi(), core::mem::transmute(pulnumlanguages.unwrap_or(core::mem::zeroed()))) } + unsafe { SetThreadPreferredUILanguages(dwflags, pwszlanguagesbuffer.param().abi(), pulnumlanguages.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SetThreadPreferredUILanguages2(flags: u32, languages: P1, numlanguagesset: Option<*mut u32>, snapshot: Option<*mut HSAVEDUILANGUAGES>) -> super::Foundation::BOOL @@ -1114,7 +1072,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); - unsafe { SetThreadPreferredUILanguages2(flags, languages.param().abi(), core::mem::transmute(numlanguagesset.unwrap_or(core::mem::zeroed())), core::mem::transmute(snapshot.unwrap_or(core::mem::zeroed()))) } + unsafe { SetThreadPreferredUILanguages2(flags, languages.param().abi(), numlanguagesset.unwrap_or(core::mem::zeroed()) as _, snapshot.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SetThreadUILanguage(langid: u16) -> u16 { @@ -1137,27 +1095,27 @@ where #[inline] pub unsafe fn TranslateCharsetInfo(lpsrc: *mut u32, lpcs: *mut CHARSETINFO, dwflags: TRANSLATE_CHARSET_INFO_FLAGS) -> windows_core::Result<()> { windows_targets::link!("gdi32.dll" "system" fn TranslateCharsetInfo(lpsrc : *mut u32, lpcs : *mut CHARSETINFO, dwflags : TRANSLATE_CHARSET_INFO_FLAGS) -> super::Foundation:: BOOL); - unsafe { TranslateCharsetInfo(core::mem::transmute(lpsrc), core::mem::transmute(lpcs), dwflags).ok() } + unsafe { TranslateCharsetInfo(lpsrc as _, lpcs as _, dwflags).ok() } } #[inline] pub unsafe fn UCNV_FROM_U_CALLBACK_ESCAPE(context: *const core::ffi::c_void, fromuargs: *mut UConverterFromUnicodeArgs, codeunits: *const u16, length: i32, codepoint: i32, reason: UConverterCallbackReason, err: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn UCNV_FROM_U_CALLBACK_ESCAPE(context : *const core::ffi::c_void, fromuargs : *mut UConverterFromUnicodeArgs, codeunits : *const u16, length : i32, codepoint : i32, reason : UConverterCallbackReason, err : *mut UErrorCode)); - unsafe { UCNV_FROM_U_CALLBACK_ESCAPE(context, core::mem::transmute(fromuargs), codeunits, length, codepoint, reason, core::mem::transmute(err)) } + unsafe { UCNV_FROM_U_CALLBACK_ESCAPE(context, fromuargs as _, codeunits, length, codepoint, reason, err as _) } } #[inline] pub unsafe fn UCNV_FROM_U_CALLBACK_SKIP(context: *const core::ffi::c_void, fromuargs: *mut UConverterFromUnicodeArgs, codeunits: *const u16, length: i32, codepoint: i32, reason: UConverterCallbackReason, err: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn UCNV_FROM_U_CALLBACK_SKIP(context : *const core::ffi::c_void, fromuargs : *mut UConverterFromUnicodeArgs, codeunits : *const u16, length : i32, codepoint : i32, reason : UConverterCallbackReason, err : *mut UErrorCode)); - unsafe { UCNV_FROM_U_CALLBACK_SKIP(context, core::mem::transmute(fromuargs), codeunits, length, codepoint, reason, core::mem::transmute(err)) } + unsafe { UCNV_FROM_U_CALLBACK_SKIP(context, fromuargs as _, codeunits, length, codepoint, reason, err as _) } } #[inline] pub unsafe fn UCNV_FROM_U_CALLBACK_STOP(context: *const core::ffi::c_void, fromuargs: *mut UConverterFromUnicodeArgs, codeunits: *const u16, length: i32, codepoint: i32, reason: UConverterCallbackReason, err: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn UCNV_FROM_U_CALLBACK_STOP(context : *const core::ffi::c_void, fromuargs : *mut UConverterFromUnicodeArgs, codeunits : *const u16, length : i32, codepoint : i32, reason : UConverterCallbackReason, err : *mut UErrorCode)); - unsafe { UCNV_FROM_U_CALLBACK_STOP(context, core::mem::transmute(fromuargs), codeunits, length, codepoint, reason, core::mem::transmute(err)) } + unsafe { UCNV_FROM_U_CALLBACK_STOP(context, fromuargs as _, codeunits, length, codepoint, reason, err as _) } } #[inline] pub unsafe fn UCNV_FROM_U_CALLBACK_SUBSTITUTE(context: *const core::ffi::c_void, fromuargs: *mut UConverterFromUnicodeArgs, codeunits: *const u16, length: i32, codepoint: i32, reason: UConverterCallbackReason, err: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn UCNV_FROM_U_CALLBACK_SUBSTITUTE(context : *const core::ffi::c_void, fromuargs : *mut UConverterFromUnicodeArgs, codeunits : *const u16, length : i32, codepoint : i32, reason : UConverterCallbackReason, err : *mut UErrorCode)); - unsafe { UCNV_FROM_U_CALLBACK_SUBSTITUTE(context, core::mem::transmute(fromuargs), codeunits, length, codepoint, reason, core::mem::transmute(err)) } + unsafe { UCNV_FROM_U_CALLBACK_SUBSTITUTE(context, fromuargs as _, codeunits, length, codepoint, reason, err as _) } } #[inline] pub unsafe fn UCNV_TO_U_CALLBACK_ESCAPE(context: *const core::ffi::c_void, touargs: *mut UConverterToUnicodeArgs, codeunits: P2, length: i32, reason: UConverterCallbackReason, err: *mut UErrorCode) @@ -1165,7 +1123,7 @@ where P2: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn UCNV_TO_U_CALLBACK_ESCAPE(context : *const core::ffi::c_void, touargs : *mut UConverterToUnicodeArgs, codeunits : windows_core::PCSTR, length : i32, reason : UConverterCallbackReason, err : *mut UErrorCode)); - unsafe { UCNV_TO_U_CALLBACK_ESCAPE(context, core::mem::transmute(touargs), codeunits.param().abi(), length, reason, core::mem::transmute(err)) } + unsafe { UCNV_TO_U_CALLBACK_ESCAPE(context, touargs as _, codeunits.param().abi(), length, reason, err as _) } } #[inline] pub unsafe fn UCNV_TO_U_CALLBACK_SKIP(context: *const core::ffi::c_void, touargs: *mut UConverterToUnicodeArgs, codeunits: P2, length: i32, reason: UConverterCallbackReason, err: *mut UErrorCode) @@ -1173,7 +1131,7 @@ where P2: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn UCNV_TO_U_CALLBACK_SKIP(context : *const core::ffi::c_void, touargs : *mut UConverterToUnicodeArgs, codeunits : windows_core::PCSTR, length : i32, reason : UConverterCallbackReason, err : *mut UErrorCode)); - unsafe { UCNV_TO_U_CALLBACK_SKIP(context, core::mem::transmute(touargs), codeunits.param().abi(), length, reason, core::mem::transmute(err)) } + unsafe { UCNV_TO_U_CALLBACK_SKIP(context, touargs as _, codeunits.param().abi(), length, reason, err as _) } } #[inline] pub unsafe fn UCNV_TO_U_CALLBACK_STOP(context: *const core::ffi::c_void, touargs: *mut UConverterToUnicodeArgs, codeunits: P2, length: i32, reason: UConverterCallbackReason, err: *mut UErrorCode) @@ -1181,7 +1139,7 @@ where P2: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn UCNV_TO_U_CALLBACK_STOP(context : *const core::ffi::c_void, touargs : *mut UConverterToUnicodeArgs, codeunits : windows_core::PCSTR, length : i32, reason : UConverterCallbackReason, err : *mut UErrorCode)); - unsafe { UCNV_TO_U_CALLBACK_STOP(context, core::mem::transmute(touargs), codeunits.param().abi(), length, reason, core::mem::transmute(err)) } + unsafe { UCNV_TO_U_CALLBACK_STOP(context, touargs as _, codeunits.param().abi(), length, reason, err as _) } } #[inline] pub unsafe fn UCNV_TO_U_CALLBACK_SUBSTITUTE(context: *const core::ffi::c_void, touargs: *mut UConverterToUnicodeArgs, codeunits: P2, length: i32, reason: UConverterCallbackReason, err: *mut UErrorCode) @@ -1189,12 +1147,12 @@ where P2: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn UCNV_TO_U_CALLBACK_SUBSTITUTE(context : *const core::ffi::c_void, touargs : *mut UConverterToUnicodeArgs, codeunits : windows_core::PCSTR, length : i32, reason : UConverterCallbackReason, err : *mut UErrorCode)); - unsafe { UCNV_TO_U_CALLBACK_SUBSTITUTE(context, core::mem::transmute(touargs), codeunits.param().abi(), length, reason, core::mem::transmute(err)) } + unsafe { UCNV_TO_U_CALLBACK_SUBSTITUTE(context, touargs as _, codeunits.param().abi(), length, reason, err as _) } } #[inline] pub unsafe fn UpdateCalendarDayOfWeek(lpcaldatetime: *mut CALDATETIME) -> super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn UpdateCalendarDayOfWeek(lpcaldatetime : *mut CALDATETIME) -> super::Foundation:: BOOL); - unsafe { UpdateCalendarDayOfWeek(core::mem::transmute(lpcaldatetime)) } + unsafe { UpdateCalendarDayOfWeek(lpcaldatetime as _) } } #[inline] pub unsafe fn VerifyScripts(dwflags: u32, lplocalescripts: P1, cchlocalescripts: i32, lptestscripts: P3, cchtestscripts: i32) -> windows_core::Result<()> @@ -1211,7 +1169,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); - unsafe { WideCharToMultiByte(codepage, dwflags, core::mem::transmute(lpwidecharstr.as_ptr()), lpwidecharstr.len().try_into().unwrap(), core::mem::transmute(lpmultibytestr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpmultibytestr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpdefaultchar.param().abi(), core::mem::transmute(lpuseddefaultchar.unwrap_or(core::mem::zeroed()))) } + unsafe { WideCharToMultiByte(codepage, dwflags, core::mem::transmute(lpwidecharstr.as_ptr()), lpwidecharstr.len().try_into().unwrap(), core::mem::transmute(lpmultibytestr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpmultibytestr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpdefaultchar.param().abi(), lpuseddefaultchar.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn lstrcatA(lpstring1: windows_core::PSTR, lpstring2: P1) -> windows_core::PSTR @@ -1340,12 +1298,12 @@ where #[inline] pub unsafe fn u_catclose(catd: *mut UResourceBundle) { windows_targets::link!("icuuc.dll" "cdecl" fn u_catclose(catd : *mut UResourceBundle)); - unsafe { u_catclose(core::mem::transmute(catd)) } + unsafe { u_catclose(catd as _) } } #[inline] pub unsafe fn u_catgets(catd: *mut UResourceBundle, set_num: i32, msg_num: i32, s: *const u16, len: *mut i32, ec: *mut UErrorCode) -> *mut u16 { windows_targets::link!("icuuc.dll" "cdecl" fn u_catgets(catd : *mut UResourceBundle, set_num : i32, msg_num : i32, s : *const u16, len : *mut i32, ec : *mut UErrorCode) -> *mut u16); - unsafe { u_catgets(core::mem::transmute(catd), set_num, msg_num, s, core::mem::transmute(len), core::mem::transmute(ec)) } + unsafe { u_catgets(catd as _, set_num, msg_num, s, len as _, ec as _) } } #[inline] pub unsafe fn u_catopen(name: P0, locale: P1, ec: *mut UErrorCode) -> *mut UResourceBundle @@ -1354,12 +1312,12 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn u_catopen(name : windows_core::PCSTR, locale : windows_core::PCSTR, ec : *mut UErrorCode) -> *mut UResourceBundle); - unsafe { u_catopen(name.param().abi(), locale.param().abi(), core::mem::transmute(ec)) } + unsafe { u_catopen(name.param().abi(), locale.param().abi(), ec as _) } } #[inline] pub unsafe fn u_charAge(c: i32, versionarray: *mut u8) { windows_targets::link!("icuuc.dll" "cdecl" fn u_charAge(c : i32, versionarray : *mut u8)); - unsafe { u_charAge(c, core::mem::transmute(versionarray)) } + unsafe { u_charAge(c, versionarray as _) } } #[inline] pub unsafe fn u_charDigitValue(c: i32) -> i32 { @@ -1377,7 +1335,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn u_charFromName(namechoice : UCharNameChoice, name : windows_core::PCSTR, perrorcode : *mut UErrorCode) -> i32); - unsafe { u_charFromName(namechoice, name.param().abi(), core::mem::transmute(perrorcode)) } + unsafe { u_charFromName(namechoice, name.param().abi(), perrorcode as _) } } #[inline] pub unsafe fn u_charMirror(c: i32) -> i32 { @@ -1390,7 +1348,7 @@ where P2: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn u_charName(code : i32, namechoice : UCharNameChoice, buffer : windows_core::PCSTR, bufferlength : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { u_charName(code, namechoice, buffer.param().abi(), bufferlength, core::mem::transmute(perrorcode)) } + unsafe { u_charName(code, namechoice, buffer.param().abi(), bufferlength, perrorcode as _) } } #[inline] pub unsafe fn u_charType(c: i32) -> i8 { @@ -1403,7 +1361,7 @@ where P0: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn u_charsToUChars(cs : windows_core::PCSTR, us : *mut u16, length : i32)); - unsafe { u_charsToUChars(cs.param().abi(), core::mem::transmute(us), length) } + unsafe { u_charsToUChars(cs.param().abi(), us as _, length) } } #[inline] pub unsafe fn u_cleanup() { @@ -1423,12 +1381,12 @@ pub unsafe fn u_digit(ch: i32, radix: i8) -> i32 { #[inline] pub unsafe fn u_enumCharNames(start: i32, limit: i32, r#fn: *mut UEnumCharNamesFn, context: *mut core::ffi::c_void, namechoice: UCharNameChoice, perrorcode: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn u_enumCharNames(start : i32, limit : i32, r#fn : *mut UEnumCharNamesFn, context : *mut core::ffi::c_void, namechoice : UCharNameChoice, perrorcode : *mut UErrorCode)); - unsafe { u_enumCharNames(start, limit, core::mem::transmute(r#fn), core::mem::transmute(context), namechoice, core::mem::transmute(perrorcode)) } + unsafe { u_enumCharNames(start, limit, r#fn as _, context as _, namechoice, perrorcode as _) } } #[inline] pub unsafe fn u_enumCharTypes(enumrange: *mut UCharEnumTypeRange, context: *const core::ffi::c_void) { windows_targets::link!("icuuc.dll" "cdecl" fn u_enumCharTypes(enumrange : *mut UCharEnumTypeRange, context : *const core::ffi::c_void)); - unsafe { u_enumCharTypes(core::mem::transmute(enumrange), context) } + unsafe { u_enumCharTypes(enumrange as _, context) } } #[inline] pub unsafe fn u_errorName(code: UErrorCode) -> windows_core::PCSTR { @@ -1451,7 +1409,7 @@ where P0: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn u_formatMessage(locale : windows_core::PCSTR, pattern : *const u16, patternlength : i32, result : *mut u16, resultlength : i32, status : *mut UErrorCode) -> i32); - unsafe { u_formatMessage(locale.param().abi(), pattern, patternlength, core::mem::transmute(result), resultlength, core::mem::transmute(status)) } + unsafe { u_formatMessage(locale.param().abi(), pattern, patternlength, result as _, resultlength, status as _) } } #[inline] pub unsafe fn u_formatMessageWithError(locale: P0, pattern: *const u16, patternlength: i32, result: *mut u16, resultlength: i32, parseerror: *mut UParseError, status: *mut UErrorCode) -> i32 @@ -1459,7 +1417,7 @@ where P0: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn u_formatMessageWithError(locale : windows_core::PCSTR, pattern : *const u16, patternlength : i32, result : *mut u16, resultlength : i32, parseerror : *mut UParseError, status : *mut UErrorCode) -> i32); - unsafe { u_formatMessageWithError(locale.param().abi(), pattern, patternlength, core::mem::transmute(result), resultlength, core::mem::transmute(parseerror), core::mem::transmute(status)) } + unsafe { u_formatMessageWithError(locale.param().abi(), pattern, patternlength, result as _, resultlength, parseerror as _, status as _) } } #[inline] pub unsafe fn u_getBidiPairedBracket(c: i32) -> i32 { @@ -1469,7 +1427,7 @@ pub unsafe fn u_getBidiPairedBracket(c: i32) -> i32 { #[inline] pub unsafe fn u_getBinaryPropertySet(property: UProperty, perrorcode: *mut UErrorCode) -> *mut USet { windows_targets::link!("icu.dll" "cdecl" fn u_getBinaryPropertySet(property : UProperty, perrorcode : *mut UErrorCode) -> *mut USet); - unsafe { u_getBinaryPropertySet(property, core::mem::transmute(perrorcode)) } + unsafe { u_getBinaryPropertySet(property, perrorcode as _) } } #[inline] pub unsafe fn u_getCombiningClass(c: i32) -> u8 { @@ -1479,17 +1437,17 @@ pub unsafe fn u_getCombiningClass(c: i32) -> u8 { #[inline] pub unsafe fn u_getDataVersion(dataversionfillin: *mut u8, status: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn u_getDataVersion(dataversionfillin : *mut u8, status : *mut UErrorCode)); - unsafe { u_getDataVersion(core::mem::transmute(dataversionfillin), core::mem::transmute(status)) } + unsafe { u_getDataVersion(dataversionfillin as _, status as _) } } #[inline] pub unsafe fn u_getFC_NFKC_Closure(c: i32, dest: *mut u16, destcapacity: i32, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn u_getFC_NFKC_Closure(c : i32, dest : *mut u16, destcapacity : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { u_getFC_NFKC_Closure(c, core::mem::transmute(dest), destcapacity, core::mem::transmute(perrorcode)) } + unsafe { u_getFC_NFKC_Closure(c, dest as _, destcapacity, perrorcode as _) } } #[inline] pub unsafe fn u_getIntPropertyMap(property: UProperty, perrorcode: *mut UErrorCode) -> *mut UCPMap { windows_targets::link!("icu.dll" "cdecl" fn u_getIntPropertyMap(property : UProperty, perrorcode : *mut UErrorCode) -> *mut UCPMap); - unsafe { u_getIntPropertyMap(property, core::mem::transmute(perrorcode)) } + unsafe { u_getIntPropertyMap(property, perrorcode as _) } } #[inline] pub unsafe fn u_getIntPropertyMaxValue(which: UProperty) -> i32 { @@ -1540,12 +1498,12 @@ pub unsafe fn u_getPropertyValueName(property: UProperty, value: i32, namechoice #[inline] pub unsafe fn u_getUnicodeVersion(versionarray: *mut u8) { windows_targets::link!("icuuc.dll" "cdecl" fn u_getUnicodeVersion(versionarray : *mut u8)); - unsafe { u_getUnicodeVersion(core::mem::transmute(versionarray)) } + unsafe { u_getUnicodeVersion(versionarray as _) } } #[inline] pub unsafe fn u_getVersion(versionarray: *mut u8) { windows_targets::link!("icuuc.dll" "cdecl" fn u_getVersion(versionarray : *mut u8)); - unsafe { u_getVersion(core::mem::transmute(versionarray)) } + unsafe { u_getVersion(versionarray as _) } } #[inline] pub unsafe fn u_hasBinaryProperty(c: i32, which: UProperty) -> i8 { @@ -1555,7 +1513,7 @@ pub unsafe fn u_hasBinaryProperty(c: i32, which: UProperty) -> i8 { #[inline] pub unsafe fn u_init(status: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn u_init(status : *mut UErrorCode)); - unsafe { u_init(core::mem::transmute(status)) } + unsafe { u_init(status as _) } } #[inline] pub unsafe fn u_isIDIgnorable(c: i32) -> i8 { @@ -1725,12 +1683,12 @@ pub unsafe fn u_memcmpCodePointOrder(s1: *const u16, s2: *const u16, count: i32) #[inline] pub unsafe fn u_memcpy(dest: *mut u16, src: *const u16, count: i32) -> *mut u16 { windows_targets::link!("icuuc.dll" "cdecl" fn u_memcpy(dest : *mut u16, src : *const u16, count : i32) -> *mut u16); - unsafe { u_memcpy(core::mem::transmute(dest), src, count) } + unsafe { u_memcpy(dest as _, src, count) } } #[inline] pub unsafe fn u_memmove(dest: *mut u16, src: *const u16, count: i32) -> *mut u16 { windows_targets::link!("icuuc.dll" "cdecl" fn u_memmove(dest : *mut u16, src : *const u16, count : i32) -> *mut u16); - unsafe { u_memmove(core::mem::transmute(dest), src, count) } + unsafe { u_memmove(dest as _, src, count) } } #[inline] pub unsafe fn u_memrchr(s: *const u16, c: u16, count: i32) -> *mut u16 { @@ -1745,7 +1703,7 @@ pub unsafe fn u_memrchr32(s: *const u16, c: i32, count: i32) -> *mut u16 { #[inline] pub unsafe fn u_memset(dest: *mut u16, c: u16, count: i32) -> *mut u16 { windows_targets::link!("icuuc.dll" "cdecl" fn u_memset(dest : *mut u16, c : u16, count : i32) -> *mut u16); - unsafe { u_memset(core::mem::transmute(dest), c, count) } + unsafe { u_memset(dest as _, c, count) } } #[inline] pub unsafe fn u_parseMessage(locale: P0, pattern: *const u16, patternlength: i32, source: *const u16, sourcelength: i32, status: *mut UErrorCode) @@ -1753,7 +1711,7 @@ where P0: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn u_parseMessage(locale : windows_core::PCSTR, pattern : *const u16, patternlength : i32, source : *const u16, sourcelength : i32, status : *mut UErrorCode)); - unsafe { u_parseMessage(locale.param().abi(), pattern, patternlength, source, sourcelength, core::mem::transmute(status)) } + unsafe { u_parseMessage(locale.param().abi(), pattern, patternlength, source, sourcelength, status as _) } } #[inline] pub unsafe fn u_parseMessageWithError(locale: P0, pattern: *const u16, patternlength: i32, source: *const u16, sourcelength: i32, parseerror: *mut UParseError, status: *mut UErrorCode) @@ -1761,22 +1719,22 @@ where P0: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn u_parseMessageWithError(locale : windows_core::PCSTR, pattern : *const u16, patternlength : i32, source : *const u16, sourcelength : i32, parseerror : *mut UParseError, status : *mut UErrorCode)); - unsafe { u_parseMessageWithError(locale.param().abi(), pattern, patternlength, source, sourcelength, core::mem::transmute(parseerror), core::mem::transmute(status)) } + unsafe { u_parseMessageWithError(locale.param().abi(), pattern, patternlength, source, sourcelength, parseerror as _, status as _) } } #[inline] pub unsafe fn u_setMemoryFunctions(context: *const core::ffi::c_void, a: *mut UMemAllocFn, r: *mut UMemReallocFn, f: *mut UMemFreeFn, status: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn u_setMemoryFunctions(context : *const core::ffi::c_void, a : *mut UMemAllocFn, r : *mut UMemReallocFn, f : *mut UMemFreeFn, status : *mut UErrorCode)); - unsafe { u_setMemoryFunctions(context, core::mem::transmute(a), core::mem::transmute(r), core::mem::transmute(f), core::mem::transmute(status)) } + unsafe { u_setMemoryFunctions(context, a as _, r as _, f as _, status as _) } } #[inline] pub unsafe fn u_shapeArabic(source: *const u16, sourcelength: i32, dest: *mut u16, destsize: i32, options: u32, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn u_shapeArabic(source : *const u16, sourcelength : i32, dest : *mut u16, destsize : i32, options : u32, perrorcode : *mut UErrorCode) -> i32); - unsafe { u_shapeArabic(source, sourcelength, core::mem::transmute(dest), destsize, options, core::mem::transmute(perrorcode)) } + unsafe { u_shapeArabic(source, sourcelength, dest as _, destsize, options, perrorcode as _) } } #[inline] pub unsafe fn u_strCaseCompare(s1: *const u16, length1: i32, s2: *const u16, length2: i32, options: u32, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn u_strCaseCompare(s1 : *const u16, length1 : i32, s2 : *const u16, length2 : i32, options : u32, perrorcode : *mut UErrorCode) -> i32); - unsafe { u_strCaseCompare(s1, length1, s2, length2, options, core::mem::transmute(perrorcode)) } + unsafe { u_strCaseCompare(s1, length1, s2, length2, options, perrorcode as _) } } #[inline] pub unsafe fn u_strCompare(s1: *const u16, length1: i32, s2: *const u16, length2: i32, codepointorder: i8) -> i32 { @@ -1786,7 +1744,7 @@ pub unsafe fn u_strCompare(s1: *const u16, length1: i32, s2: *const u16, length2 #[inline] pub unsafe fn u_strCompareIter(iter1: *mut UCharIterator, iter2: *mut UCharIterator, codepointorder: i8) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn u_strCompareIter(iter1 : *mut UCharIterator, iter2 : *mut UCharIterator, codepointorder : i8) -> i32); - unsafe { u_strCompareIter(core::mem::transmute(iter1), core::mem::transmute(iter2), codepointorder) } + unsafe { u_strCompareIter(iter1 as _, iter2 as _, codepointorder) } } #[inline] pub unsafe fn u_strFindFirst(s: *const u16, length: i32, substring: *const u16, sublength: i32) -> *mut u16 { @@ -1801,7 +1759,7 @@ pub unsafe fn u_strFindLast(s: *const u16, length: i32, substring: *const u16, s #[inline] pub unsafe fn u_strFoldCase(dest: *mut u16, destcapacity: i32, src: *const u16, srclength: i32, options: u32, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn u_strFoldCase(dest : *mut u16, destcapacity : i32, src : *const u16, srclength : i32, options : u32, perrorcode : *mut UErrorCode) -> i32); - unsafe { u_strFoldCase(core::mem::transmute(dest), destcapacity, src, srclength, options, core::mem::transmute(perrorcode)) } + unsafe { u_strFoldCase(dest as _, destcapacity, src, srclength, options, perrorcode as _) } } #[inline] pub unsafe fn u_strFromJavaModifiedUTF8WithSub(dest: *mut u16, destcapacity: i32, pdestlength: *mut i32, src: P3, srclength: i32, subchar: i32, pnumsubstitutions: *mut i32, perrorcode: *mut UErrorCode) -> *mut u16 @@ -1809,17 +1767,17 @@ where P3: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn u_strFromJavaModifiedUTF8WithSub(dest : *mut u16, destcapacity : i32, pdestlength : *mut i32, src : windows_core::PCSTR, srclength : i32, subchar : i32, pnumsubstitutions : *mut i32, perrorcode : *mut UErrorCode) -> *mut u16); - unsafe { u_strFromJavaModifiedUTF8WithSub(core::mem::transmute(dest), destcapacity, core::mem::transmute(pdestlength), src.param().abi(), srclength, subchar, core::mem::transmute(pnumsubstitutions), core::mem::transmute(perrorcode)) } + unsafe { u_strFromJavaModifiedUTF8WithSub(dest as _, destcapacity, pdestlength as _, src.param().abi(), srclength, subchar, pnumsubstitutions as _, perrorcode as _) } } #[inline] pub unsafe fn u_strFromUTF32(dest: *mut u16, destcapacity: i32, pdestlength: *mut i32, src: *const i32, srclength: i32, perrorcode: *mut UErrorCode) -> *mut u16 { windows_targets::link!("icuuc.dll" "cdecl" fn u_strFromUTF32(dest : *mut u16, destcapacity : i32, pdestlength : *mut i32, src : *const i32, srclength : i32, perrorcode : *mut UErrorCode) -> *mut u16); - unsafe { u_strFromUTF32(core::mem::transmute(dest), destcapacity, core::mem::transmute(pdestlength), src, srclength, core::mem::transmute(perrorcode)) } + unsafe { u_strFromUTF32(dest as _, destcapacity, pdestlength as _, src, srclength, perrorcode as _) } } #[inline] pub unsafe fn u_strFromUTF32WithSub(dest: *mut u16, destcapacity: i32, pdestlength: *mut i32, src: *const i32, srclength: i32, subchar: i32, pnumsubstitutions: *mut i32, perrorcode: *mut UErrorCode) -> *mut u16 { windows_targets::link!("icuuc.dll" "cdecl" fn u_strFromUTF32WithSub(dest : *mut u16, destcapacity : i32, pdestlength : *mut i32, src : *const i32, srclength : i32, subchar : i32, pnumsubstitutions : *mut i32, perrorcode : *mut UErrorCode) -> *mut u16); - unsafe { u_strFromUTF32WithSub(core::mem::transmute(dest), destcapacity, core::mem::transmute(pdestlength), src, srclength, subchar, core::mem::transmute(pnumsubstitutions), core::mem::transmute(perrorcode)) } + unsafe { u_strFromUTF32WithSub(dest as _, destcapacity, pdestlength as _, src, srclength, subchar, pnumsubstitutions as _, perrorcode as _) } } #[inline] pub unsafe fn u_strFromUTF8(dest: *mut u16, destcapacity: i32, pdestlength: *mut i32, src: P3, srclength: i32, perrorcode: *mut UErrorCode) -> *mut u16 @@ -1827,7 +1785,7 @@ where P3: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn u_strFromUTF8(dest : *mut u16, destcapacity : i32, pdestlength : *mut i32, src : windows_core::PCSTR, srclength : i32, perrorcode : *mut UErrorCode) -> *mut u16); - unsafe { u_strFromUTF8(core::mem::transmute(dest), destcapacity, core::mem::transmute(pdestlength), src.param().abi(), srclength, core::mem::transmute(perrorcode)) } + unsafe { u_strFromUTF8(dest as _, destcapacity, pdestlength as _, src.param().abi(), srclength, perrorcode as _) } } #[inline] pub unsafe fn u_strFromUTF8Lenient(dest: *mut u16, destcapacity: i32, pdestlength: *mut i32, src: P3, srclength: i32, perrorcode: *mut UErrorCode) -> *mut u16 @@ -1835,7 +1793,7 @@ where P3: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn u_strFromUTF8Lenient(dest : *mut u16, destcapacity : i32, pdestlength : *mut i32, src : windows_core::PCSTR, srclength : i32, perrorcode : *mut UErrorCode) -> *mut u16); - unsafe { u_strFromUTF8Lenient(core::mem::transmute(dest), destcapacity, core::mem::transmute(pdestlength), src.param().abi(), srclength, core::mem::transmute(perrorcode)) } + unsafe { u_strFromUTF8Lenient(dest as _, destcapacity, pdestlength as _, src.param().abi(), srclength, perrorcode as _) } } #[inline] pub unsafe fn u_strFromUTF8WithSub(dest: *mut u16, destcapacity: i32, pdestlength: *mut i32, src: P3, srclength: i32, subchar: i32, pnumsubstitutions: *mut i32, perrorcode: *mut UErrorCode) -> *mut u16 @@ -1843,7 +1801,7 @@ where P3: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn u_strFromUTF8WithSub(dest : *mut u16, destcapacity : i32, pdestlength : *mut i32, src : windows_core::PCSTR, srclength : i32, subchar : i32, pnumsubstitutions : *mut i32, perrorcode : *mut UErrorCode) -> *mut u16); - unsafe { u_strFromUTF8WithSub(core::mem::transmute(dest), destcapacity, core::mem::transmute(pdestlength), src.param().abi(), srclength, subchar, core::mem::transmute(pnumsubstitutions), core::mem::transmute(perrorcode)) } + unsafe { u_strFromUTF8WithSub(dest as _, destcapacity, pdestlength as _, src.param().abi(), srclength, subchar, pnumsubstitutions as _, perrorcode as _) } } #[inline] pub unsafe fn u_strFromWCS(dest: *mut u16, destcapacity: i32, pdestlength: *mut i32, src: P3, srclength: i32, perrorcode: *mut UErrorCode) -> *mut u16 @@ -1851,7 +1809,7 @@ where P3: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn u_strFromWCS(dest : *mut u16, destcapacity : i32, pdestlength : *mut i32, src : windows_core::PCWSTR, srclength : i32, perrorcode : *mut UErrorCode) -> *mut u16); - unsafe { u_strFromWCS(core::mem::transmute(dest), destcapacity, core::mem::transmute(pdestlength), src.param().abi(), srclength, core::mem::transmute(perrorcode)) } + unsafe { u_strFromWCS(dest as _, destcapacity, pdestlength as _, src.param().abi(), srclength, perrorcode as _) } } #[inline] pub unsafe fn u_strHasMoreChar32Than(s: *const u16, length: i32, number: i32) -> i8 { @@ -1864,7 +1822,7 @@ where P0: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn u_strToJavaModifiedUTF8(dest : windows_core::PCSTR, destcapacity : i32, pdestlength : *mut i32, src : *const u16, srclength : i32, perrorcode : *mut UErrorCode) -> windows_core::PSTR); - unsafe { u_strToJavaModifiedUTF8(dest.param().abi(), destcapacity, core::mem::transmute(pdestlength), src, srclength, core::mem::transmute(perrorcode)) } + unsafe { u_strToJavaModifiedUTF8(dest.param().abi(), destcapacity, pdestlength as _, src, srclength, perrorcode as _) } } #[inline] pub unsafe fn u_strToLower(dest: *mut u16, destcapacity: i32, src: *const u16, srclength: i32, locale: P4, perrorcode: *mut UErrorCode) -> i32 @@ -1872,7 +1830,7 @@ where P4: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn u_strToLower(dest : *mut u16, destcapacity : i32, src : *const u16, srclength : i32, locale : windows_core::PCSTR, perrorcode : *mut UErrorCode) -> i32); - unsafe { u_strToLower(core::mem::transmute(dest), destcapacity, src, srclength, locale.param().abi(), core::mem::transmute(perrorcode)) } + unsafe { u_strToLower(dest as _, destcapacity, src, srclength, locale.param().abi(), perrorcode as _) } } #[inline] pub unsafe fn u_strToTitle(dest: *mut u16, destcapacity: i32, src: *const u16, srclength: i32, titleiter: *mut UBreakIterator, locale: P5, perrorcode: *mut UErrorCode) -> i32 @@ -1880,17 +1838,17 @@ where P5: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn u_strToTitle(dest : *mut u16, destcapacity : i32, src : *const u16, srclength : i32, titleiter : *mut UBreakIterator, locale : windows_core::PCSTR, perrorcode : *mut UErrorCode) -> i32); - unsafe { u_strToTitle(core::mem::transmute(dest), destcapacity, src, srclength, core::mem::transmute(titleiter), locale.param().abi(), core::mem::transmute(perrorcode)) } + unsafe { u_strToTitle(dest as _, destcapacity, src, srclength, titleiter as _, locale.param().abi(), perrorcode as _) } } #[inline] pub unsafe fn u_strToUTF32(dest: *mut i32, destcapacity: i32, pdestlength: *mut i32, src: *const u16, srclength: i32, perrorcode: *mut UErrorCode) -> *mut i32 { windows_targets::link!("icuuc.dll" "cdecl" fn u_strToUTF32(dest : *mut i32, destcapacity : i32, pdestlength : *mut i32, src : *const u16, srclength : i32, perrorcode : *mut UErrorCode) -> *mut i32); - unsafe { u_strToUTF32(core::mem::transmute(dest), destcapacity, core::mem::transmute(pdestlength), src, srclength, core::mem::transmute(perrorcode)) } + unsafe { u_strToUTF32(dest as _, destcapacity, pdestlength as _, src, srclength, perrorcode as _) } } #[inline] pub unsafe fn u_strToUTF32WithSub(dest: *mut i32, destcapacity: i32, pdestlength: *mut i32, src: *const u16, srclength: i32, subchar: i32, pnumsubstitutions: *mut i32, perrorcode: *mut UErrorCode) -> *mut i32 { windows_targets::link!("icuuc.dll" "cdecl" fn u_strToUTF32WithSub(dest : *mut i32, destcapacity : i32, pdestlength : *mut i32, src : *const u16, srclength : i32, subchar : i32, pnumsubstitutions : *mut i32, perrorcode : *mut UErrorCode) -> *mut i32); - unsafe { u_strToUTF32WithSub(core::mem::transmute(dest), destcapacity, core::mem::transmute(pdestlength), src, srclength, subchar, core::mem::transmute(pnumsubstitutions), core::mem::transmute(perrorcode)) } + unsafe { u_strToUTF32WithSub(dest as _, destcapacity, pdestlength as _, src, srclength, subchar, pnumsubstitutions as _, perrorcode as _) } } #[inline] pub unsafe fn u_strToUTF8(dest: P0, destcapacity: i32, pdestlength: *mut i32, src: *const u16, srclength: i32, perrorcode: *mut UErrorCode) -> windows_core::PSTR @@ -1898,7 +1856,7 @@ where P0: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn u_strToUTF8(dest : windows_core::PCSTR, destcapacity : i32, pdestlength : *mut i32, src : *const u16, srclength : i32, perrorcode : *mut UErrorCode) -> windows_core::PSTR); - unsafe { u_strToUTF8(dest.param().abi(), destcapacity, core::mem::transmute(pdestlength), src, srclength, core::mem::transmute(perrorcode)) } + unsafe { u_strToUTF8(dest.param().abi(), destcapacity, pdestlength as _, src, srclength, perrorcode as _) } } #[inline] pub unsafe fn u_strToUTF8WithSub(dest: P0, destcapacity: i32, pdestlength: *mut i32, src: *const u16, srclength: i32, subchar: i32, pnumsubstitutions: *mut i32, perrorcode: *mut UErrorCode) -> windows_core::PSTR @@ -1906,7 +1864,7 @@ where P0: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn u_strToUTF8WithSub(dest : windows_core::PCSTR, destcapacity : i32, pdestlength : *mut i32, src : *const u16, srclength : i32, subchar : i32, pnumsubstitutions : *mut i32, perrorcode : *mut UErrorCode) -> windows_core::PSTR); - unsafe { u_strToUTF8WithSub(dest.param().abi(), destcapacity, core::mem::transmute(pdestlength), src, srclength, subchar, core::mem::transmute(pnumsubstitutions), core::mem::transmute(perrorcode)) } + unsafe { u_strToUTF8WithSub(dest.param().abi(), destcapacity, pdestlength as _, src, srclength, subchar, pnumsubstitutions as _, perrorcode as _) } } #[inline] pub unsafe fn u_strToUpper(dest: *mut u16, destcapacity: i32, src: *const u16, srclength: i32, locale: P4, perrorcode: *mut UErrorCode) -> i32 @@ -1914,7 +1872,7 @@ where P4: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn u_strToUpper(dest : *mut u16, destcapacity : i32, src : *const u16, srclength : i32, locale : windows_core::PCSTR, perrorcode : *mut UErrorCode) -> i32); - unsafe { u_strToUpper(core::mem::transmute(dest), destcapacity, src, srclength, locale.param().abi(), core::mem::transmute(perrorcode)) } + unsafe { u_strToUpper(dest as _, destcapacity, src, srclength, locale.param().abi(), perrorcode as _) } } #[inline] pub unsafe fn u_strToWCS(dest: P0, destcapacity: i32, pdestlength: *mut i32, src: *const u16, srclength: i32, perrorcode: *mut UErrorCode) -> windows_core::PWSTR @@ -1922,7 +1880,7 @@ where P0: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn u_strToWCS(dest : windows_core::PCWSTR, destcapacity : i32, pdestlength : *mut i32, src : *const u16, srclength : i32, perrorcode : *mut UErrorCode) -> windows_core::PWSTR); - unsafe { u_strToWCS(dest.param().abi(), destcapacity, core::mem::transmute(pdestlength), src, srclength, core::mem::transmute(perrorcode)) } + unsafe { u_strToWCS(dest.param().abi(), destcapacity, pdestlength as _, src, srclength, perrorcode as _) } } #[inline] pub unsafe fn u_strcasecmp(s1: *const u16, s2: *const u16, options: u32) -> i32 { @@ -1932,7 +1890,7 @@ pub unsafe fn u_strcasecmp(s1: *const u16, s2: *const u16, options: u32) -> i32 #[inline] pub unsafe fn u_strcat(dst: *mut u16, src: *const u16) -> *mut u16 { windows_targets::link!("icuuc.dll" "cdecl" fn u_strcat(dst : *mut u16, src : *const u16) -> *mut u16); - unsafe { u_strcat(core::mem::transmute(dst), src) } + unsafe { u_strcat(dst as _, src) } } #[inline] pub unsafe fn u_strchr(s: *const u16, c: u16) -> *mut u16 { @@ -1957,7 +1915,7 @@ pub unsafe fn u_strcmpCodePointOrder(s1: *const u16, s2: *const u16) -> i32 { #[inline] pub unsafe fn u_strcpy(dst: *mut u16, src: *const u16) -> *mut u16 { windows_targets::link!("icuuc.dll" "cdecl" fn u_strcpy(dst : *mut u16, src : *const u16) -> *mut u16); - unsafe { u_strcpy(core::mem::transmute(dst), src) } + unsafe { u_strcpy(dst as _, src) } } #[inline] pub unsafe fn u_strcspn(string: *const u16, matchset: *const u16) -> i32 { @@ -1977,7 +1935,7 @@ pub unsafe fn u_strncasecmp(s1: *const u16, s2: *const u16, n: i32, options: u32 #[inline] pub unsafe fn u_strncat(dst: *mut u16, src: *const u16, n: i32) -> *mut u16 { windows_targets::link!("icuuc.dll" "cdecl" fn u_strncat(dst : *mut u16, src : *const u16, n : i32) -> *mut u16); - unsafe { u_strncat(core::mem::transmute(dst), src, n) } + unsafe { u_strncat(dst as _, src, n) } } #[inline] pub unsafe fn u_strncmp(ucs1: *const u16, ucs2: *const u16, n: i32) -> i32 { @@ -1992,7 +1950,7 @@ pub unsafe fn u_strncmpCodePointOrder(s1: *const u16, s2: *const u16, n: i32) -> #[inline] pub unsafe fn u_strncpy(dst: *mut u16, src: *const u16, n: i32) -> *mut u16 { windows_targets::link!("icuuc.dll" "cdecl" fn u_strncpy(dst : *mut u16, src : *const u16, n : i32) -> *mut u16); - unsafe { u_strncpy(core::mem::transmute(dst), src, n) } + unsafe { u_strncpy(dst as _, src, n) } } #[inline] pub unsafe fn u_strpbrk(string: *const u16, matchset: *const u16) -> *mut u16 { @@ -2027,7 +1985,7 @@ pub unsafe fn u_strstr(s: *const u16, substring: *const u16) -> *mut u16 { #[inline] pub unsafe fn u_strtok_r(src: *mut u16, delim: *const u16, savestate: *mut *mut u16) -> *mut u16 { windows_targets::link!("icuuc.dll" "cdecl" fn u_strtok_r(src : *mut u16, delim : *const u16, savestate : *mut *mut u16) -> *mut u16); - unsafe { u_strtok_r(core::mem::transmute(src), delim, core::mem::transmute(savestate)) } + unsafe { u_strtok_r(src as _, delim, savestate as _) } } #[inline] pub unsafe fn u_tolower(c: i32) -> i32 { @@ -2050,7 +2008,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn u_uastrcpy(dst : *mut u16, src : windows_core::PCSTR) -> *mut u16); - unsafe { u_uastrcpy(core::mem::transmute(dst), src.param().abi()) } + unsafe { u_uastrcpy(dst as _, src.param().abi()) } } #[inline] pub unsafe fn u_uastrncpy(dst: *mut u16, src: P1, n: i32) -> *mut u16 @@ -2058,7 +2016,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn u_uastrncpy(dst : *mut u16, src : windows_core::PCSTR, n : i32) -> *mut u16); - unsafe { u_uastrncpy(core::mem::transmute(dst), src.param().abi(), n) } + unsafe { u_uastrncpy(dst as _, src.param().abi(), n) } } #[inline] pub unsafe fn u_unescape(src: P0, dest: *mut u16, destcapacity: i32) -> i32 @@ -2066,12 +2024,12 @@ where P0: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn u_unescape(src : windows_core::PCSTR, dest : *mut u16, destcapacity : i32) -> i32); - unsafe { u_unescape(src.param().abi(), core::mem::transmute(dest), destcapacity) } + unsafe { u_unescape(src.param().abi(), dest as _, destcapacity) } } #[inline] pub unsafe fn u_unescapeAt(charat: UNESCAPE_CHAR_AT, offset: *mut i32, length: i32, context: *mut core::ffi::c_void) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn u_unescapeAt(charat : UNESCAPE_CHAR_AT, offset : *mut i32, length : i32, context : *mut core::ffi::c_void) -> i32); - unsafe { u_unescapeAt(charat, core::mem::transmute(offset), length, core::mem::transmute(context)) } + unsafe { u_unescapeAt(charat, offset as _, length, context as _) } } #[inline] pub unsafe fn u_versionFromString(versionarray: *mut u8, versionstring: P1) @@ -2079,12 +2037,12 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn u_versionFromString(versionarray : *mut u8, versionstring : windows_core::PCSTR)); - unsafe { u_versionFromString(core::mem::transmute(versionarray), versionstring.param().abi()) } + unsafe { u_versionFromString(versionarray as _, versionstring.param().abi()) } } #[inline] pub unsafe fn u_versionFromUString(versionarray: *mut u8, versionstring: *const u16) { windows_targets::link!("icuuc.dll" "cdecl" fn u_versionFromUString(versionarray : *mut u8, versionstring : *const u16)); - unsafe { u_versionFromUString(core::mem::transmute(versionarray), versionstring) } + unsafe { u_versionFromUString(versionarray as _, versionstring) } } #[inline] pub unsafe fn u_versionToString(versionarray: *const u8, versionstring: P1) @@ -2100,7 +2058,7 @@ where P0: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn u_vformatMessage(locale : windows_core::PCSTR, pattern : *const u16, patternlength : i32, result : *mut u16, resultlength : i32, ap : *mut i8, status : *mut UErrorCode) -> i32); - unsafe { u_vformatMessage(locale.param().abi(), pattern, patternlength, core::mem::transmute(result), resultlength, core::mem::transmute(ap), core::mem::transmute(status)) } + unsafe { u_vformatMessage(locale.param().abi(), pattern, patternlength, result as _, resultlength, ap as _, status as _) } } #[inline] pub unsafe fn u_vformatMessageWithError(locale: P0, pattern: *const u16, patternlength: i32, result: *mut u16, resultlength: i32, parseerror: *mut UParseError, ap: *mut i8, status: *mut UErrorCode) -> i32 @@ -2108,7 +2066,7 @@ where P0: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn u_vformatMessageWithError(locale : windows_core::PCSTR, pattern : *const u16, patternlength : i32, result : *mut u16, resultlength : i32, parseerror : *mut UParseError, ap : *mut i8, status : *mut UErrorCode) -> i32); - unsafe { u_vformatMessageWithError(locale.param().abi(), pattern, patternlength, core::mem::transmute(result), resultlength, core::mem::transmute(parseerror), core::mem::transmute(ap), core::mem::transmute(status)) } + unsafe { u_vformatMessageWithError(locale.param().abi(), pattern, patternlength, result as _, resultlength, parseerror as _, ap as _, status as _) } } #[inline] pub unsafe fn u_vparseMessage(locale: P0, pattern: *const u16, patternlength: i32, source: *const u16, sourcelength: i32, ap: *mut i8, status: *mut UErrorCode) @@ -2116,7 +2074,7 @@ where P0: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn u_vparseMessage(locale : windows_core::PCSTR, pattern : *const u16, patternlength : i32, source : *const u16, sourcelength : i32, ap : *mut i8, status : *mut UErrorCode)); - unsafe { u_vparseMessage(locale.param().abi(), pattern, patternlength, source, sourcelength, core::mem::transmute(ap), core::mem::transmute(status)) } + unsafe { u_vparseMessage(locale.param().abi(), pattern, patternlength, source, sourcelength, ap as _, status as _) } } #[inline] pub unsafe fn u_vparseMessageWithError(locale: P0, pattern: *const u16, patternlength: i32, source: *const u16, sourcelength: i32, ap: *mut i8, parseerror: *mut UParseError, status: *mut UErrorCode) @@ -2124,22 +2082,22 @@ where P0: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn u_vparseMessageWithError(locale : windows_core::PCSTR, pattern : *const u16, patternlength : i32, source : *const u16, sourcelength : i32, ap : *mut i8, parseerror : *mut UParseError, status : *mut UErrorCode)); - unsafe { u_vparseMessageWithError(locale.param().abi(), pattern, patternlength, source, sourcelength, core::mem::transmute(ap), core::mem::transmute(parseerror), core::mem::transmute(status)) } + unsafe { u_vparseMessageWithError(locale.param().abi(), pattern, patternlength, source, sourcelength, ap as _, parseerror as _, status as _) } } #[inline] pub unsafe fn ubidi_close(pbidi: *mut UBiDi) { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_close(pbidi : *mut UBiDi)); - unsafe { ubidi_close(core::mem::transmute(pbidi)) } + unsafe { ubidi_close(pbidi as _) } } #[inline] pub unsafe fn ubidi_countParagraphs(pbidi: *mut UBiDi) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_countParagraphs(pbidi : *mut UBiDi) -> i32); - unsafe { ubidi_countParagraphs(core::mem::transmute(pbidi)) } + unsafe { ubidi_countParagraphs(pbidi as _) } } #[inline] pub unsafe fn ubidi_countRuns(pbidi: *mut UBiDi, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_countRuns(pbidi : *mut UBiDi, perrorcode : *mut UErrorCode) -> i32); - unsafe { ubidi_countRuns(core::mem::transmute(pbidi), core::mem::transmute(perrorcode)) } + unsafe { ubidi_countRuns(pbidi as _, perrorcode as _) } } #[inline] pub unsafe fn ubidi_getBaseDirection(text: *const u16, length: i32) -> UBiDiDirection { @@ -2149,12 +2107,12 @@ pub unsafe fn ubidi_getBaseDirection(text: *const u16, length: i32) -> UBiDiDire #[inline] pub unsafe fn ubidi_getClassCallback(pbidi: *mut UBiDi, r#fn: *mut UBiDiClassCallback, context: *const *const core::ffi::c_void) { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_getClassCallback(pbidi : *mut UBiDi, r#fn : *mut UBiDiClassCallback, context : *const *const core::ffi::c_void)); - unsafe { ubidi_getClassCallback(core::mem::transmute(pbidi), core::mem::transmute(r#fn), context) } + unsafe { ubidi_getClassCallback(pbidi as _, r#fn as _, context) } } #[inline] pub unsafe fn ubidi_getCustomizedClass(pbidi: *mut UBiDi, c: i32) -> UCharDirection { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_getCustomizedClass(pbidi : *mut UBiDi, c : i32) -> UCharDirection); - unsafe { ubidi_getCustomizedClass(core::mem::transmute(pbidi), c) } + unsafe { ubidi_getCustomizedClass(pbidi as _, c) } } #[inline] pub unsafe fn ubidi_getDirection(pbidi: *const UBiDi) -> UBiDiDirection { @@ -2174,22 +2132,22 @@ pub unsafe fn ubidi_getLevelAt(pbidi: *const UBiDi, charindex: i32) -> u8 { #[inline] pub unsafe fn ubidi_getLevels(pbidi: *mut UBiDi, perrorcode: *mut UErrorCode) -> *mut u8 { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_getLevels(pbidi : *mut UBiDi, perrorcode : *mut UErrorCode) -> *mut u8); - unsafe { ubidi_getLevels(core::mem::transmute(pbidi), core::mem::transmute(perrorcode)) } + unsafe { ubidi_getLevels(pbidi as _, perrorcode as _) } } #[inline] pub unsafe fn ubidi_getLogicalIndex(pbidi: *mut UBiDi, visualindex: i32, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_getLogicalIndex(pbidi : *mut UBiDi, visualindex : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { ubidi_getLogicalIndex(core::mem::transmute(pbidi), visualindex, core::mem::transmute(perrorcode)) } + unsafe { ubidi_getLogicalIndex(pbidi as _, visualindex, perrorcode as _) } } #[inline] pub unsafe fn ubidi_getLogicalMap(pbidi: *mut UBiDi, indexmap: *mut i32, perrorcode: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_getLogicalMap(pbidi : *mut UBiDi, indexmap : *mut i32, perrorcode : *mut UErrorCode)); - unsafe { ubidi_getLogicalMap(core::mem::transmute(pbidi), core::mem::transmute(indexmap), core::mem::transmute(perrorcode)) } + unsafe { ubidi_getLogicalMap(pbidi as _, indexmap as _, perrorcode as _) } } #[inline] pub unsafe fn ubidi_getLogicalRun(pbidi: *const UBiDi, logicalposition: i32, plogicallimit: *mut i32, plevel: *mut u8) { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_getLogicalRun(pbidi : *const UBiDi, logicalposition : i32, plogicallimit : *mut i32, plevel : *mut u8)); - unsafe { ubidi_getLogicalRun(pbidi, logicalposition, core::mem::transmute(plogicallimit), core::mem::transmute(plevel)) } + unsafe { ubidi_getLogicalRun(pbidi, logicalposition, plogicallimit as _, plevel as _) } } #[inline] pub unsafe fn ubidi_getParaLevel(pbidi: *const UBiDi) -> u8 { @@ -2199,12 +2157,12 @@ pub unsafe fn ubidi_getParaLevel(pbidi: *const UBiDi) -> u8 { #[inline] pub unsafe fn ubidi_getParagraph(pbidi: *const UBiDi, charindex: i32, pparastart: *mut i32, pparalimit: *mut i32, pparalevel: *mut u8, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_getParagraph(pbidi : *const UBiDi, charindex : i32, pparastart : *mut i32, pparalimit : *mut i32, pparalevel : *mut u8, perrorcode : *mut UErrorCode) -> i32); - unsafe { ubidi_getParagraph(pbidi, charindex, core::mem::transmute(pparastart), core::mem::transmute(pparalimit), core::mem::transmute(pparalevel), core::mem::transmute(perrorcode)) } + unsafe { ubidi_getParagraph(pbidi, charindex, pparastart as _, pparalimit as _, pparalevel as _, perrorcode as _) } } #[inline] pub unsafe fn ubidi_getParagraphByIndex(pbidi: *const UBiDi, paraindex: i32, pparastart: *mut i32, pparalimit: *mut i32, pparalevel: *mut u8, perrorcode: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_getParagraphByIndex(pbidi : *const UBiDi, paraindex : i32, pparastart : *mut i32, pparalimit : *mut i32, pparalevel : *mut u8, perrorcode : *mut UErrorCode)); - unsafe { ubidi_getParagraphByIndex(pbidi, paraindex, core::mem::transmute(pparastart), core::mem::transmute(pparalimit), core::mem::transmute(pparalevel), core::mem::transmute(perrorcode)) } + unsafe { ubidi_getParagraphByIndex(pbidi, paraindex, pparastart as _, pparalimit as _, pparalevel as _, perrorcode as _) } } #[inline] pub unsafe fn ubidi_getProcessedLength(pbidi: *const UBiDi) -> i32 { @@ -2214,12 +2172,12 @@ pub unsafe fn ubidi_getProcessedLength(pbidi: *const UBiDi) -> i32 { #[inline] pub unsafe fn ubidi_getReorderingMode(pbidi: *mut UBiDi) -> UBiDiReorderingMode { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_getReorderingMode(pbidi : *mut UBiDi) -> UBiDiReorderingMode); - unsafe { ubidi_getReorderingMode(core::mem::transmute(pbidi)) } + unsafe { ubidi_getReorderingMode(pbidi as _) } } #[inline] pub unsafe fn ubidi_getReorderingOptions(pbidi: *mut UBiDi) -> u32 { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_getReorderingOptions(pbidi : *mut UBiDi) -> u32); - unsafe { ubidi_getReorderingOptions(core::mem::transmute(pbidi)) } + unsafe { ubidi_getReorderingOptions(pbidi as _) } } #[inline] pub unsafe fn ubidi_getResultLength(pbidi: *const UBiDi) -> i32 { @@ -2234,32 +2192,32 @@ pub unsafe fn ubidi_getText(pbidi: *const UBiDi) -> *mut u16 { #[inline] pub unsafe fn ubidi_getVisualIndex(pbidi: *mut UBiDi, logicalindex: i32, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_getVisualIndex(pbidi : *mut UBiDi, logicalindex : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { ubidi_getVisualIndex(core::mem::transmute(pbidi), logicalindex, core::mem::transmute(perrorcode)) } + unsafe { ubidi_getVisualIndex(pbidi as _, logicalindex, perrorcode as _) } } #[inline] pub unsafe fn ubidi_getVisualMap(pbidi: *mut UBiDi, indexmap: *mut i32, perrorcode: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_getVisualMap(pbidi : *mut UBiDi, indexmap : *mut i32, perrorcode : *mut UErrorCode)); - unsafe { ubidi_getVisualMap(core::mem::transmute(pbidi), core::mem::transmute(indexmap), core::mem::transmute(perrorcode)) } + unsafe { ubidi_getVisualMap(pbidi as _, indexmap as _, perrorcode as _) } } #[inline] pub unsafe fn ubidi_getVisualRun(pbidi: *mut UBiDi, runindex: i32, plogicalstart: *mut i32, plength: *mut i32) -> UBiDiDirection { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_getVisualRun(pbidi : *mut UBiDi, runindex : i32, plogicalstart : *mut i32, plength : *mut i32) -> UBiDiDirection); - unsafe { ubidi_getVisualRun(core::mem::transmute(pbidi), runindex, core::mem::transmute(plogicalstart), core::mem::transmute(plength)) } + unsafe { ubidi_getVisualRun(pbidi as _, runindex, plogicalstart as _, plength as _) } } #[inline] pub unsafe fn ubidi_invertMap(srcmap: *const i32, destmap: *mut i32, length: i32) { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_invertMap(srcmap : *const i32, destmap : *mut i32, length : i32)); - unsafe { ubidi_invertMap(srcmap, core::mem::transmute(destmap), length) } + unsafe { ubidi_invertMap(srcmap, destmap as _, length) } } #[inline] pub unsafe fn ubidi_isInverse(pbidi: *mut UBiDi) -> i8 { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_isInverse(pbidi : *mut UBiDi) -> i8); - unsafe { ubidi_isInverse(core::mem::transmute(pbidi)) } + unsafe { ubidi_isInverse(pbidi as _) } } #[inline] pub unsafe fn ubidi_isOrderParagraphsLTR(pbidi: *mut UBiDi) -> i8 { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_isOrderParagraphsLTR(pbidi : *mut UBiDi) -> i8); - unsafe { ubidi_isOrderParagraphsLTR(core::mem::transmute(pbidi)) } + unsafe { ubidi_isOrderParagraphsLTR(pbidi as _) } } #[inline] pub unsafe fn ubidi_open() -> *mut UBiDi { @@ -2269,82 +2227,82 @@ pub unsafe fn ubidi_open() -> *mut UBiDi { #[inline] pub unsafe fn ubidi_openSized(maxlength: i32, maxruncount: i32, perrorcode: *mut UErrorCode) -> *mut UBiDi { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_openSized(maxlength : i32, maxruncount : i32, perrorcode : *mut UErrorCode) -> *mut UBiDi); - unsafe { ubidi_openSized(maxlength, maxruncount, core::mem::transmute(perrorcode)) } + unsafe { ubidi_openSized(maxlength, maxruncount, perrorcode as _) } } #[inline] pub unsafe fn ubidi_orderParagraphsLTR(pbidi: *mut UBiDi, orderparagraphsltr: i8) { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_orderParagraphsLTR(pbidi : *mut UBiDi, orderparagraphsltr : i8)); - unsafe { ubidi_orderParagraphsLTR(core::mem::transmute(pbidi), orderparagraphsltr) } + unsafe { ubidi_orderParagraphsLTR(pbidi as _, orderparagraphsltr) } } #[inline] pub unsafe fn ubidi_reorderLogical(levels: *const u8, length: i32, indexmap: *mut i32) { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_reorderLogical(levels : *const u8, length : i32, indexmap : *mut i32)); - unsafe { ubidi_reorderLogical(levels, length, core::mem::transmute(indexmap)) } + unsafe { ubidi_reorderLogical(levels, length, indexmap as _) } } #[inline] pub unsafe fn ubidi_reorderVisual(levels: *const u8, length: i32, indexmap: *mut i32) { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_reorderVisual(levels : *const u8, length : i32, indexmap : *mut i32)); - unsafe { ubidi_reorderVisual(levels, length, core::mem::transmute(indexmap)) } + unsafe { ubidi_reorderVisual(levels, length, indexmap as _) } } #[inline] pub unsafe fn ubidi_setClassCallback(pbidi: *mut UBiDi, newfn: UBiDiClassCallback, newcontext: *const core::ffi::c_void, oldfn: *mut UBiDiClassCallback, oldcontext: *const *const core::ffi::c_void, perrorcode: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_setClassCallback(pbidi : *mut UBiDi, newfn : UBiDiClassCallback, newcontext : *const core::ffi::c_void, oldfn : *mut UBiDiClassCallback, oldcontext : *const *const core::ffi::c_void, perrorcode : *mut UErrorCode)); - unsafe { ubidi_setClassCallback(core::mem::transmute(pbidi), newfn, newcontext, core::mem::transmute(oldfn), oldcontext, core::mem::transmute(perrorcode)) } + unsafe { ubidi_setClassCallback(pbidi as _, newfn, newcontext, oldfn as _, oldcontext, perrorcode as _) } } #[inline] pub unsafe fn ubidi_setContext(pbidi: *mut UBiDi, prologue: *const u16, prolength: i32, epilogue: *const u16, epilength: i32, perrorcode: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_setContext(pbidi : *mut UBiDi, prologue : *const u16, prolength : i32, epilogue : *const u16, epilength : i32, perrorcode : *mut UErrorCode)); - unsafe { ubidi_setContext(core::mem::transmute(pbidi), prologue, prolength, epilogue, epilength, core::mem::transmute(perrorcode)) } + unsafe { ubidi_setContext(pbidi as _, prologue, prolength, epilogue, epilength, perrorcode as _) } } #[inline] pub unsafe fn ubidi_setInverse(pbidi: *mut UBiDi, isinverse: i8) { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_setInverse(pbidi : *mut UBiDi, isinverse : i8)); - unsafe { ubidi_setInverse(core::mem::transmute(pbidi), isinverse) } + unsafe { ubidi_setInverse(pbidi as _, isinverse) } } #[inline] pub unsafe fn ubidi_setLine(pparabidi: *const UBiDi, start: i32, limit: i32, plinebidi: *mut UBiDi, perrorcode: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_setLine(pparabidi : *const UBiDi, start : i32, limit : i32, plinebidi : *mut UBiDi, perrorcode : *mut UErrorCode)); - unsafe { ubidi_setLine(pparabidi, start, limit, core::mem::transmute(plinebidi), core::mem::transmute(perrorcode)) } + unsafe { ubidi_setLine(pparabidi, start, limit, plinebidi as _, perrorcode as _) } } #[inline] pub unsafe fn ubidi_setPara(pbidi: *mut UBiDi, text: *const u16, length: i32, paralevel: u8, embeddinglevels: *mut u8, perrorcode: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_setPara(pbidi : *mut UBiDi, text : *const u16, length : i32, paralevel : u8, embeddinglevels : *mut u8, perrorcode : *mut UErrorCode)); - unsafe { ubidi_setPara(core::mem::transmute(pbidi), text, length, paralevel, core::mem::transmute(embeddinglevels), core::mem::transmute(perrorcode)) } + unsafe { ubidi_setPara(pbidi as _, text, length, paralevel, embeddinglevels as _, perrorcode as _) } } #[inline] pub unsafe fn ubidi_setReorderingMode(pbidi: *mut UBiDi, reorderingmode: UBiDiReorderingMode) { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_setReorderingMode(pbidi : *mut UBiDi, reorderingmode : UBiDiReorderingMode)); - unsafe { ubidi_setReorderingMode(core::mem::transmute(pbidi), reorderingmode) } + unsafe { ubidi_setReorderingMode(pbidi as _, reorderingmode) } } #[inline] pub unsafe fn ubidi_setReorderingOptions(pbidi: *mut UBiDi, reorderingoptions: u32) { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_setReorderingOptions(pbidi : *mut UBiDi, reorderingoptions : u32)); - unsafe { ubidi_setReorderingOptions(core::mem::transmute(pbidi), reorderingoptions) } + unsafe { ubidi_setReorderingOptions(pbidi as _, reorderingoptions) } } #[inline] pub unsafe fn ubidi_writeReordered(pbidi: *mut UBiDi, dest: *mut u16, destsize: i32, options: u16, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_writeReordered(pbidi : *mut UBiDi, dest : *mut u16, destsize : i32, options : u16, perrorcode : *mut UErrorCode) -> i32); - unsafe { ubidi_writeReordered(core::mem::transmute(pbidi), core::mem::transmute(dest), destsize, options, core::mem::transmute(perrorcode)) } + unsafe { ubidi_writeReordered(pbidi as _, dest as _, destsize, options, perrorcode as _) } } #[inline] pub unsafe fn ubidi_writeReverse(src: *const u16, srclength: i32, dest: *mut u16, destsize: i32, options: u16, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn ubidi_writeReverse(src : *const u16, srclength : i32, dest : *mut u16, destsize : i32, options : u16, perrorcode : *mut UErrorCode) -> i32); - unsafe { ubidi_writeReverse(src, srclength, core::mem::transmute(dest), destsize, options, core::mem::transmute(perrorcode)) } + unsafe { ubidi_writeReverse(src, srclength, dest as _, destsize, options, perrorcode as _) } } #[inline] pub unsafe fn ubiditransform_close(pbiditransform: *mut UBiDiTransform) { windows_targets::link!("icuuc.dll" "cdecl" fn ubiditransform_close(pbiditransform : *mut UBiDiTransform)); - unsafe { ubiditransform_close(core::mem::transmute(pbiditransform)) } + unsafe { ubiditransform_close(pbiditransform as _) } } #[inline] pub unsafe fn ubiditransform_open(perrorcode: *mut UErrorCode) -> *mut UBiDiTransform { windows_targets::link!("icuuc.dll" "cdecl" fn ubiditransform_open(perrorcode : *mut UErrorCode) -> *mut UBiDiTransform); - unsafe { ubiditransform_open(core::mem::transmute(perrorcode)) } + unsafe { ubiditransform_open(perrorcode as _) } } #[inline] pub unsafe fn ubiditransform_transform(pbiditransform: *mut UBiDiTransform, src: *const u16, srclength: i32, dest: *mut u16, destsize: i32, inparalevel: u8, inorder: UBiDiOrder, outparalevel: u8, outorder: UBiDiOrder, domirroring: UBiDiMirroring, shapingoptions: u32, perrorcode: *mut UErrorCode) -> u32 { windows_targets::link!("icuuc.dll" "cdecl" fn ubiditransform_transform(pbiditransform : *mut UBiDiTransform, src : *const u16, srclength : i32, dest : *mut u16, destsize : i32, inparalevel : u8, inorder : UBiDiOrder, outparalevel : u8, outorder : UBiDiOrder, domirroring : UBiDiMirroring, shapingoptions : u32, perrorcode : *mut UErrorCode) -> u32); - unsafe { ubiditransform_transform(core::mem::transmute(pbiditransform), src, srclength, core::mem::transmute(dest), destsize, inparalevel, inorder, outparalevel, outorder, domirroring, shapingoptions, core::mem::transmute(perrorcode)) } + unsafe { ubiditransform_transform(pbiditransform as _, src, srclength, dest as _, destsize, inparalevel, inorder, outparalevel, outorder, domirroring, shapingoptions, perrorcode as _) } } #[inline] pub unsafe fn ublock_getCode(c: i32) -> UBlockCode { @@ -2354,7 +2312,7 @@ pub unsafe fn ublock_getCode(c: i32) -> UBlockCode { #[inline] pub unsafe fn ubrk_close(bi: *mut UBreakIterator) { windows_targets::link!("icuuc.dll" "cdecl" fn ubrk_close(bi : *mut UBreakIterator)); - unsafe { ubrk_close(core::mem::transmute(bi)) } + unsafe { ubrk_close(bi as _) } } #[inline] pub unsafe fn ubrk_countAvailable() -> i32 { @@ -2369,12 +2327,12 @@ pub unsafe fn ubrk_current(bi: *const UBreakIterator) -> i32 { #[inline] pub unsafe fn ubrk_first(bi: *mut UBreakIterator) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn ubrk_first(bi : *mut UBreakIterator) -> i32); - unsafe { ubrk_first(core::mem::transmute(bi)) } + unsafe { ubrk_first(bi as _) } } #[inline] pub unsafe fn ubrk_following(bi: *mut UBreakIterator, offset: i32) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn ubrk_following(bi : *mut UBreakIterator, offset : i32) -> i32); - unsafe { ubrk_following(core::mem::transmute(bi), offset) } + unsafe { ubrk_following(bi as _, offset) } } #[inline] pub unsafe fn ubrk_getAvailable(index: i32) -> windows_core::PCSTR { @@ -2384,37 +2342,37 @@ pub unsafe fn ubrk_getAvailable(index: i32) -> windows_core::PCSTR { #[inline] pub unsafe fn ubrk_getBinaryRules(bi: *mut UBreakIterator, binaryrules: *mut u8, rulescapacity: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn ubrk_getBinaryRules(bi : *mut UBreakIterator, binaryrules : *mut u8, rulescapacity : i32, status : *mut UErrorCode) -> i32); - unsafe { ubrk_getBinaryRules(core::mem::transmute(bi), core::mem::transmute(binaryrules), rulescapacity, core::mem::transmute(status)) } + unsafe { ubrk_getBinaryRules(bi as _, binaryrules as _, rulescapacity, status as _) } } #[inline] pub unsafe fn ubrk_getLocaleByType(bi: *const UBreakIterator, r#type: ULocDataLocaleType, status: *mut UErrorCode) -> windows_core::PCSTR { windows_targets::link!("icuuc.dll" "cdecl" fn ubrk_getLocaleByType(bi : *const UBreakIterator, r#type : ULocDataLocaleType, status : *mut UErrorCode) -> windows_core::PCSTR); - unsafe { ubrk_getLocaleByType(bi, r#type, core::mem::transmute(status)) } + unsafe { ubrk_getLocaleByType(bi, r#type, status as _) } } #[inline] pub unsafe fn ubrk_getRuleStatus(bi: *mut UBreakIterator) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn ubrk_getRuleStatus(bi : *mut UBreakIterator) -> i32); - unsafe { ubrk_getRuleStatus(core::mem::transmute(bi)) } + unsafe { ubrk_getRuleStatus(bi as _) } } #[inline] pub unsafe fn ubrk_getRuleStatusVec(bi: *mut UBreakIterator, fillinvec: *mut i32, capacity: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn ubrk_getRuleStatusVec(bi : *mut UBreakIterator, fillinvec : *mut i32, capacity : i32, status : *mut UErrorCode) -> i32); - unsafe { ubrk_getRuleStatusVec(core::mem::transmute(bi), core::mem::transmute(fillinvec), capacity, core::mem::transmute(status)) } + unsafe { ubrk_getRuleStatusVec(bi as _, fillinvec as _, capacity, status as _) } } #[inline] pub unsafe fn ubrk_isBoundary(bi: *mut UBreakIterator, offset: i32) -> i8 { windows_targets::link!("icuuc.dll" "cdecl" fn ubrk_isBoundary(bi : *mut UBreakIterator, offset : i32) -> i8); - unsafe { ubrk_isBoundary(core::mem::transmute(bi), offset) } + unsafe { ubrk_isBoundary(bi as _, offset) } } #[inline] pub unsafe fn ubrk_last(bi: *mut UBreakIterator) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn ubrk_last(bi : *mut UBreakIterator) -> i32); - unsafe { ubrk_last(core::mem::transmute(bi)) } + unsafe { ubrk_last(bi as _) } } #[inline] pub unsafe fn ubrk_next(bi: *mut UBreakIterator) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn ubrk_next(bi : *mut UBreakIterator) -> i32); - unsafe { ubrk_next(core::mem::transmute(bi)) } + unsafe { ubrk_next(bi as _) } } #[inline] pub unsafe fn ubrk_open(r#type: UBreakIteratorType, locale: P1, text: *const u16, textlength: i32, status: *mut UErrorCode) -> *mut UBreakIterator @@ -2422,72 +2380,72 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ubrk_open(r#type : UBreakIteratorType, locale : windows_core::PCSTR, text : *const u16, textlength : i32, status : *mut UErrorCode) -> *mut UBreakIterator); - unsafe { ubrk_open(r#type, locale.param().abi(), text, textlength, core::mem::transmute(status)) } + unsafe { ubrk_open(r#type, locale.param().abi(), text, textlength, status as _) } } #[inline] pub unsafe fn ubrk_openBinaryRules(binaryrules: *const u8, ruleslength: i32, text: *const u16, textlength: i32, status: *mut UErrorCode) -> *mut UBreakIterator { windows_targets::link!("icuuc.dll" "cdecl" fn ubrk_openBinaryRules(binaryrules : *const u8, ruleslength : i32, text : *const u16, textlength : i32, status : *mut UErrorCode) -> *mut UBreakIterator); - unsafe { ubrk_openBinaryRules(binaryrules, ruleslength, text, textlength, core::mem::transmute(status)) } + unsafe { ubrk_openBinaryRules(binaryrules, ruleslength, text, textlength, status as _) } } #[inline] pub unsafe fn ubrk_openRules(rules: *const u16, ruleslength: i32, text: *const u16, textlength: i32, parseerr: *mut UParseError, status: *mut UErrorCode) -> *mut UBreakIterator { windows_targets::link!("icuuc.dll" "cdecl" fn ubrk_openRules(rules : *const u16, ruleslength : i32, text : *const u16, textlength : i32, parseerr : *mut UParseError, status : *mut UErrorCode) -> *mut UBreakIterator); - unsafe { ubrk_openRules(rules, ruleslength, text, textlength, core::mem::transmute(parseerr), core::mem::transmute(status)) } + unsafe { ubrk_openRules(rules, ruleslength, text, textlength, parseerr as _, status as _) } } #[inline] pub unsafe fn ubrk_preceding(bi: *mut UBreakIterator, offset: i32) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn ubrk_preceding(bi : *mut UBreakIterator, offset : i32) -> i32); - unsafe { ubrk_preceding(core::mem::transmute(bi), offset) } + unsafe { ubrk_preceding(bi as _, offset) } } #[inline] pub unsafe fn ubrk_previous(bi: *mut UBreakIterator) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn ubrk_previous(bi : *mut UBreakIterator) -> i32); - unsafe { ubrk_previous(core::mem::transmute(bi)) } + unsafe { ubrk_previous(bi as _) } } #[inline] pub unsafe fn ubrk_refreshUText(bi: *mut UBreakIterator, text: *mut UText, status: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn ubrk_refreshUText(bi : *mut UBreakIterator, text : *mut UText, status : *mut UErrorCode)); - unsafe { ubrk_refreshUText(core::mem::transmute(bi), core::mem::transmute(text), core::mem::transmute(status)) } + unsafe { ubrk_refreshUText(bi as _, text as _, status as _) } } #[inline] pub unsafe fn ubrk_safeClone(bi: *const UBreakIterator, stackbuffer: *mut core::ffi::c_void, pbuffersize: *mut i32, status: *mut UErrorCode) -> *mut UBreakIterator { windows_targets::link!("icuuc.dll" "cdecl" fn ubrk_safeClone(bi : *const UBreakIterator, stackbuffer : *mut core::ffi::c_void, pbuffersize : *mut i32, status : *mut UErrorCode) -> *mut UBreakIterator); - unsafe { ubrk_safeClone(bi, core::mem::transmute(stackbuffer), core::mem::transmute(pbuffersize), core::mem::transmute(status)) } + unsafe { ubrk_safeClone(bi, stackbuffer as _, pbuffersize as _, status as _) } } #[inline] pub unsafe fn ubrk_setText(bi: *mut UBreakIterator, text: *const u16, textlength: i32, status: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn ubrk_setText(bi : *mut UBreakIterator, text : *const u16, textlength : i32, status : *mut UErrorCode)); - unsafe { ubrk_setText(core::mem::transmute(bi), text, textlength, core::mem::transmute(status)) } + unsafe { ubrk_setText(bi as _, text, textlength, status as _) } } #[inline] pub unsafe fn ubrk_setUText(bi: *mut UBreakIterator, text: *mut UText, status: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn ubrk_setUText(bi : *mut UBreakIterator, text : *mut UText, status : *mut UErrorCode)); - unsafe { ubrk_setUText(core::mem::transmute(bi), core::mem::transmute(text), core::mem::transmute(status)) } + unsafe { ubrk_setUText(bi as _, text as _, status as _) } } #[inline] pub unsafe fn ucal_add(cal: *mut *mut core::ffi::c_void, field: UCalendarDateFields, amount: i32, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn ucal_add(cal : *mut *mut core::ffi::c_void, field : UCalendarDateFields, amount : i32, status : *mut UErrorCode)); - unsafe { ucal_add(core::mem::transmute(cal), field, amount, core::mem::transmute(status)) } + unsafe { ucal_add(cal as _, field, amount, status as _) } } #[inline] pub unsafe fn ucal_clear(calendar: *mut *mut core::ffi::c_void) { windows_targets::link!("icuin.dll" "cdecl" fn ucal_clear(calendar : *mut *mut core::ffi::c_void)); - unsafe { ucal_clear(core::mem::transmute(calendar)) } + unsafe { ucal_clear(calendar as _) } } #[inline] pub unsafe fn ucal_clearField(cal: *mut *mut core::ffi::c_void, field: UCalendarDateFields) { windows_targets::link!("icuin.dll" "cdecl" fn ucal_clearField(cal : *mut *mut core::ffi::c_void, field : UCalendarDateFields)); - unsafe { ucal_clearField(core::mem::transmute(cal), field) } + unsafe { ucal_clearField(cal as _, field) } } #[inline] pub unsafe fn ucal_clone(cal: *const *const core::ffi::c_void, status: *mut UErrorCode) -> *mut *mut core::ffi::c_void { windows_targets::link!("icuin.dll" "cdecl" fn ucal_clone(cal : *const *const core::ffi::c_void, status : *mut UErrorCode) -> *mut *mut core::ffi::c_void); - unsafe { ucal_clone(cal, core::mem::transmute(status)) } + unsafe { ucal_clone(cal, status as _) } } #[inline] pub unsafe fn ucal_close(cal: *mut *mut core::ffi::c_void) { windows_targets::link!("icuin.dll" "cdecl" fn ucal_close(cal : *mut *mut core::ffi::c_void)); - unsafe { ucal_close(core::mem::transmute(cal)) } + unsafe { ucal_close(cal as _) } } #[inline] pub unsafe fn ucal_countAvailable() -> i32 { @@ -2502,7 +2460,7 @@ pub unsafe fn ucal_equivalentTo(cal1: *const *const core::ffi::c_void, cal2: *co #[inline] pub unsafe fn ucal_get(cal: *const *const core::ffi::c_void, field: UCalendarDateFields, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn ucal_get(cal : *const *const core::ffi::c_void, field : UCalendarDateFields, status : *mut UErrorCode) -> i32); - unsafe { ucal_get(cal, field, core::mem::transmute(status)) } + unsafe { ucal_get(cal, field, status as _) } } #[inline] pub unsafe fn ucal_getAttribute(cal: *const *const core::ffi::c_void, attr: UCalendarAttribute) -> i32 { @@ -2517,37 +2475,37 @@ pub unsafe fn ucal_getAvailable(localeindex: i32) -> windows_core::PCSTR { #[inline] pub unsafe fn ucal_getCanonicalTimeZoneID(id: *const u16, len: i32, result: *mut u16, resultcapacity: i32, issystemid: *mut i8, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn ucal_getCanonicalTimeZoneID(id : *const u16, len : i32, result : *mut u16, resultcapacity : i32, issystemid : *mut i8, status : *mut UErrorCode) -> i32); - unsafe { ucal_getCanonicalTimeZoneID(id, len, core::mem::transmute(result), resultcapacity, core::mem::transmute(issystemid), core::mem::transmute(status)) } + unsafe { ucal_getCanonicalTimeZoneID(id, len, result as _, resultcapacity, issystemid as _, status as _) } } #[inline] pub unsafe fn ucal_getDSTSavings(zoneid: *const u16, ec: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn ucal_getDSTSavings(zoneid : *const u16, ec : *mut UErrorCode) -> i32); - unsafe { ucal_getDSTSavings(zoneid, core::mem::transmute(ec)) } + unsafe { ucal_getDSTSavings(zoneid, ec as _) } } #[inline] pub unsafe fn ucal_getDayOfWeekType(cal: *const *const core::ffi::c_void, dayofweek: UCalendarDaysOfWeek, status: *mut UErrorCode) -> UCalendarWeekdayType { windows_targets::link!("icuin.dll" "cdecl" fn ucal_getDayOfWeekType(cal : *const *const core::ffi::c_void, dayofweek : UCalendarDaysOfWeek, status : *mut UErrorCode) -> UCalendarWeekdayType); - unsafe { ucal_getDayOfWeekType(cal, dayofweek, core::mem::transmute(status)) } + unsafe { ucal_getDayOfWeekType(cal, dayofweek, status as _) } } #[inline] pub unsafe fn ucal_getDefaultTimeZone(result: *mut u16, resultcapacity: i32, ec: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn ucal_getDefaultTimeZone(result : *mut u16, resultcapacity : i32, ec : *mut UErrorCode) -> i32); - unsafe { ucal_getDefaultTimeZone(core::mem::transmute(result), resultcapacity, core::mem::transmute(ec)) } + unsafe { ucal_getDefaultTimeZone(result as _, resultcapacity, ec as _) } } #[inline] pub unsafe fn ucal_getFieldDifference(cal: *mut *mut core::ffi::c_void, target: f64, field: UCalendarDateFields, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn ucal_getFieldDifference(cal : *mut *mut core::ffi::c_void, target : f64, field : UCalendarDateFields, status : *mut UErrorCode) -> i32); - unsafe { ucal_getFieldDifference(core::mem::transmute(cal), target, field, core::mem::transmute(status)) } + unsafe { ucal_getFieldDifference(cal as _, target, field, status as _) } } #[inline] pub unsafe fn ucal_getGregorianChange(cal: *const *const core::ffi::c_void, perrorcode: *mut UErrorCode) -> f64 { windows_targets::link!("icuin.dll" "cdecl" fn ucal_getGregorianChange(cal : *const *const core::ffi::c_void, perrorcode : *mut UErrorCode) -> f64); - unsafe { ucal_getGregorianChange(cal, core::mem::transmute(perrorcode)) } + unsafe { ucal_getGregorianChange(cal, perrorcode as _) } } #[inline] pub unsafe fn ucal_getHostTimeZone(result: *mut u16, resultcapacity: i32, ec: *mut UErrorCode) -> i32 { windows_targets::link!("icu.dll" "cdecl" fn ucal_getHostTimeZone(result : *mut u16, resultcapacity : i32, ec : *mut UErrorCode) -> i32); - unsafe { ucal_getHostTimeZone(core::mem::transmute(result), resultcapacity, core::mem::transmute(ec)) } + unsafe { ucal_getHostTimeZone(result as _, resultcapacity, ec as _) } } #[inline] pub unsafe fn ucal_getKeywordValuesForLocale(key: P0, locale: P1, commonlyused: i8, status: *mut UErrorCode) -> *mut UEnumeration @@ -2556,22 +2514,22 @@ where P1: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn ucal_getKeywordValuesForLocale(key : windows_core::PCSTR, locale : windows_core::PCSTR, commonlyused : i8, status : *mut UErrorCode) -> *mut UEnumeration); - unsafe { ucal_getKeywordValuesForLocale(key.param().abi(), locale.param().abi(), commonlyused, core::mem::transmute(status)) } + unsafe { ucal_getKeywordValuesForLocale(key.param().abi(), locale.param().abi(), commonlyused, status as _) } } #[inline] pub unsafe fn ucal_getLimit(cal: *const *const core::ffi::c_void, field: UCalendarDateFields, r#type: UCalendarLimitType, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn ucal_getLimit(cal : *const *const core::ffi::c_void, field : UCalendarDateFields, r#type : UCalendarLimitType, status : *mut UErrorCode) -> i32); - unsafe { ucal_getLimit(cal, field, r#type, core::mem::transmute(status)) } + unsafe { ucal_getLimit(cal, field, r#type, status as _) } } #[inline] pub unsafe fn ucal_getLocaleByType(cal: *const *const core::ffi::c_void, r#type: ULocDataLocaleType, status: *mut UErrorCode) -> windows_core::PCSTR { windows_targets::link!("icuin.dll" "cdecl" fn ucal_getLocaleByType(cal : *const *const core::ffi::c_void, r#type : ULocDataLocaleType, status : *mut UErrorCode) -> windows_core::PCSTR); - unsafe { ucal_getLocaleByType(cal, r#type, core::mem::transmute(status)) } + unsafe { ucal_getLocaleByType(cal, r#type, status as _) } } #[inline] pub unsafe fn ucal_getMillis(cal: *const *const core::ffi::c_void, status: *mut UErrorCode) -> f64 { windows_targets::link!("icuin.dll" "cdecl" fn ucal_getMillis(cal : *const *const core::ffi::c_void, status : *mut UErrorCode) -> f64); - unsafe { ucal_getMillis(cal, core::mem::transmute(status)) } + unsafe { ucal_getMillis(cal, status as _) } } #[inline] pub unsafe fn ucal_getNow() -> f64 { @@ -2581,7 +2539,7 @@ pub unsafe fn ucal_getNow() -> f64 { #[inline] pub unsafe fn ucal_getTZDataVersion(status: *mut UErrorCode) -> windows_core::PCSTR { windows_targets::link!("icuin.dll" "cdecl" fn ucal_getTZDataVersion(status : *mut UErrorCode) -> windows_core::PCSTR); - unsafe { ucal_getTZDataVersion(core::mem::transmute(status)) } + unsafe { ucal_getTZDataVersion(status as _) } } #[inline] pub unsafe fn ucal_getTimeZoneDisplayName(cal: *const *const core::ffi::c_void, r#type: UCalendarDisplayNameType, locale: P2, result: *mut u16, resultlength: i32, status: *mut UErrorCode) -> i32 @@ -2589,12 +2547,12 @@ where P2: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn ucal_getTimeZoneDisplayName(cal : *const *const core::ffi::c_void, r#type : UCalendarDisplayNameType, locale : windows_core::PCSTR, result : *mut u16, resultlength : i32, status : *mut UErrorCode) -> i32); - unsafe { ucal_getTimeZoneDisplayName(cal, r#type, locale.param().abi(), core::mem::transmute(result), resultlength, core::mem::transmute(status)) } + unsafe { ucal_getTimeZoneDisplayName(cal, r#type, locale.param().abi(), result as _, resultlength, status as _) } } #[inline] pub unsafe fn ucal_getTimeZoneID(cal: *const *const core::ffi::c_void, result: *mut u16, resultlength: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn ucal_getTimeZoneID(cal : *const *const core::ffi::c_void, result : *mut u16, resultlength : i32, status : *mut UErrorCode) -> i32); - unsafe { ucal_getTimeZoneID(cal, core::mem::transmute(result), resultlength, core::mem::transmute(status)) } + unsafe { ucal_getTimeZoneID(cal, result as _, resultlength, status as _) } } #[inline] pub unsafe fn ucal_getTimeZoneIDForWindowsID(winid: *const u16, len: i32, region: P2, id: *mut u16, idcapacity: i32, status: *mut UErrorCode) -> i32 @@ -2602,32 +2560,32 @@ where P2: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn ucal_getTimeZoneIDForWindowsID(winid : *const u16, len : i32, region : windows_core::PCSTR, id : *mut u16, idcapacity : i32, status : *mut UErrorCode) -> i32); - unsafe { ucal_getTimeZoneIDForWindowsID(winid, len, region.param().abi(), core::mem::transmute(id), idcapacity, core::mem::transmute(status)) } + unsafe { ucal_getTimeZoneIDForWindowsID(winid, len, region.param().abi(), id as _, idcapacity, status as _) } } #[inline] pub unsafe fn ucal_getTimeZoneTransitionDate(cal: *const *const core::ffi::c_void, r#type: UTimeZoneTransitionType, transition: *mut f64, status: *mut UErrorCode) -> i8 { windows_targets::link!("icuin.dll" "cdecl" fn ucal_getTimeZoneTransitionDate(cal : *const *const core::ffi::c_void, r#type : UTimeZoneTransitionType, transition : *mut f64, status : *mut UErrorCode) -> i8); - unsafe { ucal_getTimeZoneTransitionDate(cal, r#type, core::mem::transmute(transition), core::mem::transmute(status)) } + unsafe { ucal_getTimeZoneTransitionDate(cal, r#type, transition as _, status as _) } } #[inline] pub unsafe fn ucal_getType(cal: *const *const core::ffi::c_void, status: *mut UErrorCode) -> windows_core::PCSTR { windows_targets::link!("icuin.dll" "cdecl" fn ucal_getType(cal : *const *const core::ffi::c_void, status : *mut UErrorCode) -> windows_core::PCSTR); - unsafe { ucal_getType(cal, core::mem::transmute(status)) } + unsafe { ucal_getType(cal, status as _) } } #[inline] pub unsafe fn ucal_getWeekendTransition(cal: *const *const core::ffi::c_void, dayofweek: UCalendarDaysOfWeek, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn ucal_getWeekendTransition(cal : *const *const core::ffi::c_void, dayofweek : UCalendarDaysOfWeek, status : *mut UErrorCode) -> i32); - unsafe { ucal_getWeekendTransition(cal, dayofweek, core::mem::transmute(status)) } + unsafe { ucal_getWeekendTransition(cal, dayofweek, status as _) } } #[inline] pub unsafe fn ucal_getWindowsTimeZoneID(id: *const u16, len: i32, winid: *mut u16, winidcapacity: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn ucal_getWindowsTimeZoneID(id : *const u16, len : i32, winid : *mut u16, winidcapacity : i32, status : *mut UErrorCode) -> i32); - unsafe { ucal_getWindowsTimeZoneID(id, len, core::mem::transmute(winid), winidcapacity, core::mem::transmute(status)) } + unsafe { ucal_getWindowsTimeZoneID(id, len, winid as _, winidcapacity, status as _) } } #[inline] pub unsafe fn ucal_inDaylightTime(cal: *const *const core::ffi::c_void, status: *mut UErrorCode) -> i8 { windows_targets::link!("icuin.dll" "cdecl" fn ucal_inDaylightTime(cal : *const *const core::ffi::c_void, status : *mut UErrorCode) -> i8); - unsafe { ucal_inDaylightTime(cal, core::mem::transmute(status)) } + unsafe { ucal_inDaylightTime(cal, status as _) } } #[inline] pub unsafe fn ucal_isSet(cal: *const *const core::ffi::c_void, field: UCalendarDateFields) -> i8 { @@ -2637,7 +2595,7 @@ pub unsafe fn ucal_isSet(cal: *const *const core::ffi::c_void, field: UCalendarD #[inline] pub unsafe fn ucal_isWeekend(cal: *const *const core::ffi::c_void, date: f64, status: *mut UErrorCode) -> i8 { windows_targets::link!("icuin.dll" "cdecl" fn ucal_isWeekend(cal : *const *const core::ffi::c_void, date : f64, status : *mut UErrorCode) -> i8); - unsafe { ucal_isWeekend(cal, date, core::mem::transmute(status)) } + unsafe { ucal_isWeekend(cal, date, status as _) } } #[inline] pub unsafe fn ucal_open(zoneid: *const u16, len: i32, locale: P2, r#type: UCalendarType, status: *mut UErrorCode) -> *mut *mut core::ffi::c_void @@ -2645,7 +2603,7 @@ where P2: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn ucal_open(zoneid : *const u16, len : i32, locale : windows_core::PCSTR, r#type : UCalendarType, status : *mut UErrorCode) -> *mut *mut core::ffi::c_void); - unsafe { ucal_open(zoneid, len, locale.param().abi(), r#type, core::mem::transmute(status)) } + unsafe { ucal_open(zoneid, len, locale.param().abi(), r#type, status as _) } } #[inline] pub unsafe fn ucal_openCountryTimeZones(country: P0, ec: *mut UErrorCode) -> *mut UEnumeration @@ -2653,7 +2611,7 @@ where P0: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn ucal_openCountryTimeZones(country : windows_core::PCSTR, ec : *mut UErrorCode) -> *mut UEnumeration); - unsafe { ucal_openCountryTimeZones(country.param().abi(), core::mem::transmute(ec)) } + unsafe { ucal_openCountryTimeZones(country.param().abi(), ec as _) } } #[inline] pub unsafe fn ucal_openTimeZoneIDEnumeration(zonetype: USystemTimeZoneType, region: P1, rawoffset: *const i32, ec: *mut UErrorCode) -> *mut UEnumeration @@ -2661,62 +2619,62 @@ where P1: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn ucal_openTimeZoneIDEnumeration(zonetype : USystemTimeZoneType, region : windows_core::PCSTR, rawoffset : *const i32, ec : *mut UErrorCode) -> *mut UEnumeration); - unsafe { ucal_openTimeZoneIDEnumeration(zonetype, region.param().abi(), rawoffset, core::mem::transmute(ec)) } + unsafe { ucal_openTimeZoneIDEnumeration(zonetype, region.param().abi(), rawoffset, ec as _) } } #[inline] pub unsafe fn ucal_openTimeZones(ec: *mut UErrorCode) -> *mut UEnumeration { windows_targets::link!("icuin.dll" "cdecl" fn ucal_openTimeZones(ec : *mut UErrorCode) -> *mut UEnumeration); - unsafe { ucal_openTimeZones(core::mem::transmute(ec)) } + unsafe { ucal_openTimeZones(ec as _) } } #[inline] pub unsafe fn ucal_roll(cal: *mut *mut core::ffi::c_void, field: UCalendarDateFields, amount: i32, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn ucal_roll(cal : *mut *mut core::ffi::c_void, field : UCalendarDateFields, amount : i32, status : *mut UErrorCode)); - unsafe { ucal_roll(core::mem::transmute(cal), field, amount, core::mem::transmute(status)) } + unsafe { ucal_roll(cal as _, field, amount, status as _) } } #[inline] pub unsafe fn ucal_set(cal: *mut *mut core::ffi::c_void, field: UCalendarDateFields, value: i32) { windows_targets::link!("icuin.dll" "cdecl" fn ucal_set(cal : *mut *mut core::ffi::c_void, field : UCalendarDateFields, value : i32)); - unsafe { ucal_set(core::mem::transmute(cal), field, value) } + unsafe { ucal_set(cal as _, field, value) } } #[inline] pub unsafe fn ucal_setAttribute(cal: *mut *mut core::ffi::c_void, attr: UCalendarAttribute, newvalue: i32) { windows_targets::link!("icuin.dll" "cdecl" fn ucal_setAttribute(cal : *mut *mut core::ffi::c_void, attr : UCalendarAttribute, newvalue : i32)); - unsafe { ucal_setAttribute(core::mem::transmute(cal), attr, newvalue) } + unsafe { ucal_setAttribute(cal as _, attr, newvalue) } } #[inline] pub unsafe fn ucal_setDate(cal: *mut *mut core::ffi::c_void, year: i32, month: i32, date: i32, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn ucal_setDate(cal : *mut *mut core::ffi::c_void, year : i32, month : i32, date : i32, status : *mut UErrorCode)); - unsafe { ucal_setDate(core::mem::transmute(cal), year, month, date, core::mem::transmute(status)) } + unsafe { ucal_setDate(cal as _, year, month, date, status as _) } } #[inline] pub unsafe fn ucal_setDateTime(cal: *mut *mut core::ffi::c_void, year: i32, month: i32, date: i32, hour: i32, minute: i32, second: i32, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn ucal_setDateTime(cal : *mut *mut core::ffi::c_void, year : i32, month : i32, date : i32, hour : i32, minute : i32, second : i32, status : *mut UErrorCode)); - unsafe { ucal_setDateTime(core::mem::transmute(cal), year, month, date, hour, minute, second, core::mem::transmute(status)) } + unsafe { ucal_setDateTime(cal as _, year, month, date, hour, minute, second, status as _) } } #[inline] pub unsafe fn ucal_setDefaultTimeZone(zoneid: *const u16, ec: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn ucal_setDefaultTimeZone(zoneid : *const u16, ec : *mut UErrorCode)); - unsafe { ucal_setDefaultTimeZone(zoneid, core::mem::transmute(ec)) } + unsafe { ucal_setDefaultTimeZone(zoneid, ec as _) } } #[inline] pub unsafe fn ucal_setGregorianChange(cal: *mut *mut core::ffi::c_void, date: f64, perrorcode: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn ucal_setGregorianChange(cal : *mut *mut core::ffi::c_void, date : f64, perrorcode : *mut UErrorCode)); - unsafe { ucal_setGregorianChange(core::mem::transmute(cal), date, core::mem::transmute(perrorcode)) } + unsafe { ucal_setGregorianChange(cal as _, date, perrorcode as _) } } #[inline] pub unsafe fn ucal_setMillis(cal: *mut *mut core::ffi::c_void, datetime: f64, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn ucal_setMillis(cal : *mut *mut core::ffi::c_void, datetime : f64, status : *mut UErrorCode)); - unsafe { ucal_setMillis(core::mem::transmute(cal), datetime, core::mem::transmute(status)) } + unsafe { ucal_setMillis(cal as _, datetime, status as _) } } #[inline] pub unsafe fn ucal_setTimeZone(cal: *mut *mut core::ffi::c_void, zoneid: *const u16, len: i32, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn ucal_setTimeZone(cal : *mut *mut core::ffi::c_void, zoneid : *const u16, len : i32, status : *mut UErrorCode)); - unsafe { ucal_setTimeZone(core::mem::transmute(cal), zoneid, len, core::mem::transmute(status)) } + unsafe { ucal_setTimeZone(cal as _, zoneid, len, status as _) } } #[inline] pub unsafe fn ucasemap_close(csm: *mut UCaseMap) { windows_targets::link!("icuuc.dll" "cdecl" fn ucasemap_close(csm : *mut UCaseMap)); - unsafe { ucasemap_close(core::mem::transmute(csm)) } + unsafe { ucasemap_close(csm as _) } } #[inline] pub unsafe fn ucasemap_getBreakIterator(csm: *const UCaseMap) -> *mut UBreakIterator { @@ -2739,12 +2697,12 @@ where P0: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucasemap_open(locale : windows_core::PCSTR, options : u32, perrorcode : *mut UErrorCode) -> *mut UCaseMap); - unsafe { ucasemap_open(locale.param().abi(), options, core::mem::transmute(perrorcode)) } + unsafe { ucasemap_open(locale.param().abi(), options, perrorcode as _) } } #[inline] pub unsafe fn ucasemap_setBreakIterator(csm: *mut UCaseMap, itertoadopt: *mut UBreakIterator, perrorcode: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn ucasemap_setBreakIterator(csm : *mut UCaseMap, itertoadopt : *mut UBreakIterator, perrorcode : *mut UErrorCode)); - unsafe { ucasemap_setBreakIterator(core::mem::transmute(csm), core::mem::transmute(itertoadopt), core::mem::transmute(perrorcode)) } + unsafe { ucasemap_setBreakIterator(csm as _, itertoadopt as _, perrorcode as _) } } #[inline] pub unsafe fn ucasemap_setLocale(csm: *mut UCaseMap, locale: P1, perrorcode: *mut UErrorCode) @@ -2752,17 +2710,17 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucasemap_setLocale(csm : *mut UCaseMap, locale : windows_core::PCSTR, perrorcode : *mut UErrorCode)); - unsafe { ucasemap_setLocale(core::mem::transmute(csm), locale.param().abi(), core::mem::transmute(perrorcode)) } + unsafe { ucasemap_setLocale(csm as _, locale.param().abi(), perrorcode as _) } } #[inline] pub unsafe fn ucasemap_setOptions(csm: *mut UCaseMap, options: u32, perrorcode: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn ucasemap_setOptions(csm : *mut UCaseMap, options : u32, perrorcode : *mut UErrorCode)); - unsafe { ucasemap_setOptions(core::mem::transmute(csm), options, core::mem::transmute(perrorcode)) } + unsafe { ucasemap_setOptions(csm as _, options, perrorcode as _) } } #[inline] pub unsafe fn ucasemap_toTitle(csm: *mut UCaseMap, dest: *mut u16, destcapacity: i32, src: *const u16, srclength: i32, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn ucasemap_toTitle(csm : *mut UCaseMap, dest : *mut u16, destcapacity : i32, src : *const u16, srclength : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { ucasemap_toTitle(core::mem::transmute(csm), core::mem::transmute(dest), destcapacity, src, srclength, core::mem::transmute(perrorcode)) } + unsafe { ucasemap_toTitle(csm as _, dest as _, destcapacity, src, srclength, perrorcode as _) } } #[inline] pub unsafe fn ucasemap_utf8FoldCase(csm: *const UCaseMap, dest: P1, destcapacity: i32, src: P3, srclength: i32, perrorcode: *mut UErrorCode) -> i32 @@ -2771,7 +2729,7 @@ where P3: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucasemap_utf8FoldCase(csm : *const UCaseMap, dest : windows_core::PCSTR, destcapacity : i32, src : windows_core::PCSTR, srclength : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { ucasemap_utf8FoldCase(csm, dest.param().abi(), destcapacity, src.param().abi(), srclength, core::mem::transmute(perrorcode)) } + unsafe { ucasemap_utf8FoldCase(csm, dest.param().abi(), destcapacity, src.param().abi(), srclength, perrorcode as _) } } #[inline] pub unsafe fn ucasemap_utf8ToLower(csm: *const UCaseMap, dest: P1, destcapacity: i32, src: P3, srclength: i32, perrorcode: *mut UErrorCode) -> i32 @@ -2780,7 +2738,7 @@ where P3: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucasemap_utf8ToLower(csm : *const UCaseMap, dest : windows_core::PCSTR, destcapacity : i32, src : windows_core::PCSTR, srclength : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { ucasemap_utf8ToLower(csm, dest.param().abi(), destcapacity, src.param().abi(), srclength, core::mem::transmute(perrorcode)) } + unsafe { ucasemap_utf8ToLower(csm, dest.param().abi(), destcapacity, src.param().abi(), srclength, perrorcode as _) } } #[inline] pub unsafe fn ucasemap_utf8ToTitle(csm: *mut UCaseMap, dest: P1, destcapacity: i32, src: P3, srclength: i32, perrorcode: *mut UErrorCode) -> i32 @@ -2789,7 +2747,7 @@ where P3: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucasemap_utf8ToTitle(csm : *mut UCaseMap, dest : windows_core::PCSTR, destcapacity : i32, src : windows_core::PCSTR, srclength : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { ucasemap_utf8ToTitle(core::mem::transmute(csm), dest.param().abi(), destcapacity, src.param().abi(), srclength, core::mem::transmute(perrorcode)) } + unsafe { ucasemap_utf8ToTitle(csm as _, dest.param().abi(), destcapacity, src.param().abi(), srclength, perrorcode as _) } } #[inline] pub unsafe fn ucasemap_utf8ToUpper(csm: *const UCaseMap, dest: P1, destcapacity: i32, src: P3, srclength: i32, perrorcode: *mut UErrorCode) -> i32 @@ -2798,67 +2756,67 @@ where P3: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucasemap_utf8ToUpper(csm : *const UCaseMap, dest : windows_core::PCSTR, destcapacity : i32, src : windows_core::PCSTR, srclength : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { ucasemap_utf8ToUpper(csm, dest.param().abi(), destcapacity, src.param().abi(), srclength, core::mem::transmute(perrorcode)) } + unsafe { ucasemap_utf8ToUpper(csm, dest.param().abi(), destcapacity, src.param().abi(), srclength, perrorcode as _) } } #[inline] pub unsafe fn ucfpos_close(ucfpos: *mut UConstrainedFieldPosition) { windows_targets::link!("icu.dll" "cdecl" fn ucfpos_close(ucfpos : *mut UConstrainedFieldPosition)); - unsafe { ucfpos_close(core::mem::transmute(ucfpos)) } + unsafe { ucfpos_close(ucfpos as _) } } #[inline] pub unsafe fn ucfpos_constrainCategory(ucfpos: *mut UConstrainedFieldPosition, category: i32, ec: *mut UErrorCode) { windows_targets::link!("icu.dll" "cdecl" fn ucfpos_constrainCategory(ucfpos : *mut UConstrainedFieldPosition, category : i32, ec : *mut UErrorCode)); - unsafe { ucfpos_constrainCategory(core::mem::transmute(ucfpos), category, core::mem::transmute(ec)) } + unsafe { ucfpos_constrainCategory(ucfpos as _, category, ec as _) } } #[inline] pub unsafe fn ucfpos_constrainField(ucfpos: *mut UConstrainedFieldPosition, category: i32, field: i32, ec: *mut UErrorCode) { windows_targets::link!("icu.dll" "cdecl" fn ucfpos_constrainField(ucfpos : *mut UConstrainedFieldPosition, category : i32, field : i32, ec : *mut UErrorCode)); - unsafe { ucfpos_constrainField(core::mem::transmute(ucfpos), category, field, core::mem::transmute(ec)) } + unsafe { ucfpos_constrainField(ucfpos as _, category, field, ec as _) } } #[inline] pub unsafe fn ucfpos_getCategory(ucfpos: *const UConstrainedFieldPosition, ec: *mut UErrorCode) -> i32 { windows_targets::link!("icu.dll" "cdecl" fn ucfpos_getCategory(ucfpos : *const UConstrainedFieldPosition, ec : *mut UErrorCode) -> i32); - unsafe { ucfpos_getCategory(ucfpos, core::mem::transmute(ec)) } + unsafe { ucfpos_getCategory(ucfpos, ec as _) } } #[inline] pub unsafe fn ucfpos_getField(ucfpos: *const UConstrainedFieldPosition, ec: *mut UErrorCode) -> i32 { windows_targets::link!("icu.dll" "cdecl" fn ucfpos_getField(ucfpos : *const UConstrainedFieldPosition, ec : *mut UErrorCode) -> i32); - unsafe { ucfpos_getField(ucfpos, core::mem::transmute(ec)) } + unsafe { ucfpos_getField(ucfpos, ec as _) } } #[inline] pub unsafe fn ucfpos_getIndexes(ucfpos: *const UConstrainedFieldPosition, pstart: *mut i32, plimit: *mut i32, ec: *mut UErrorCode) { windows_targets::link!("icu.dll" "cdecl" fn ucfpos_getIndexes(ucfpos : *const UConstrainedFieldPosition, pstart : *mut i32, plimit : *mut i32, ec : *mut UErrorCode)); - unsafe { ucfpos_getIndexes(ucfpos, core::mem::transmute(pstart), core::mem::transmute(plimit), core::mem::transmute(ec)) } + unsafe { ucfpos_getIndexes(ucfpos, pstart as _, plimit as _, ec as _) } } #[inline] pub unsafe fn ucfpos_getInt64IterationContext(ucfpos: *const UConstrainedFieldPosition, ec: *mut UErrorCode) -> i64 { windows_targets::link!("icu.dll" "cdecl" fn ucfpos_getInt64IterationContext(ucfpos : *const UConstrainedFieldPosition, ec : *mut UErrorCode) -> i64); - unsafe { ucfpos_getInt64IterationContext(ucfpos, core::mem::transmute(ec)) } + unsafe { ucfpos_getInt64IterationContext(ucfpos, ec as _) } } #[inline] pub unsafe fn ucfpos_matchesField(ucfpos: *const UConstrainedFieldPosition, category: i32, field: i32, ec: *mut UErrorCode) -> i8 { windows_targets::link!("icu.dll" "cdecl" fn ucfpos_matchesField(ucfpos : *const UConstrainedFieldPosition, category : i32, field : i32, ec : *mut UErrorCode) -> i8); - unsafe { ucfpos_matchesField(ucfpos, category, field, core::mem::transmute(ec)) } + unsafe { ucfpos_matchesField(ucfpos, category, field, ec as _) } } #[inline] pub unsafe fn ucfpos_open(ec: *mut UErrorCode) -> *mut UConstrainedFieldPosition { windows_targets::link!("icu.dll" "cdecl" fn ucfpos_open(ec : *mut UErrorCode) -> *mut UConstrainedFieldPosition); - unsafe { ucfpos_open(core::mem::transmute(ec)) } + unsafe { ucfpos_open(ec as _) } } #[inline] pub unsafe fn ucfpos_reset(ucfpos: *mut UConstrainedFieldPosition, ec: *mut UErrorCode) { windows_targets::link!("icu.dll" "cdecl" fn ucfpos_reset(ucfpos : *mut UConstrainedFieldPosition, ec : *mut UErrorCode)); - unsafe { ucfpos_reset(core::mem::transmute(ucfpos), core::mem::transmute(ec)) } + unsafe { ucfpos_reset(ucfpos as _, ec as _) } } #[inline] pub unsafe fn ucfpos_setInt64IterationContext(ucfpos: *mut UConstrainedFieldPosition, context: i64, ec: *mut UErrorCode) { windows_targets::link!("icu.dll" "cdecl" fn ucfpos_setInt64IterationContext(ucfpos : *mut UConstrainedFieldPosition, context : i64, ec : *mut UErrorCode)); - unsafe { ucfpos_setInt64IterationContext(core::mem::transmute(ucfpos), context, core::mem::transmute(ec)) } + unsafe { ucfpos_setInt64IterationContext(ucfpos as _, context, ec as _) } } #[inline] pub unsafe fn ucfpos_setState(ucfpos: *mut UConstrainedFieldPosition, category: i32, field: i32, start: i32, limit: i32, ec: *mut UErrorCode) { windows_targets::link!("icu.dll" "cdecl" fn ucfpos_setState(ucfpos : *mut UConstrainedFieldPosition, category : i32, field : i32, start : i32, limit : i32, ec : *mut UErrorCode)); - unsafe { ucfpos_setState(core::mem::transmute(ucfpos), category, field, start, limit, core::mem::transmute(ec)) } + unsafe { ucfpos_setState(ucfpos as _, category, field, start, limit, ec as _) } } #[inline] pub unsafe fn ucnv_cbFromUWriteBytes(args: *mut UConverterFromUnicodeArgs, source: P1, length: i32, offsetindex: i32, err: *mut UErrorCode) @@ -2866,32 +2824,32 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_cbFromUWriteBytes(args : *mut UConverterFromUnicodeArgs, source : windows_core::PCSTR, length : i32, offsetindex : i32, err : *mut UErrorCode)); - unsafe { ucnv_cbFromUWriteBytes(core::mem::transmute(args), source.param().abi(), length, offsetindex, core::mem::transmute(err)) } + unsafe { ucnv_cbFromUWriteBytes(args as _, source.param().abi(), length, offsetindex, err as _) } } #[inline] pub unsafe fn ucnv_cbFromUWriteSub(args: *mut UConverterFromUnicodeArgs, offsetindex: i32, err: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_cbFromUWriteSub(args : *mut UConverterFromUnicodeArgs, offsetindex : i32, err : *mut UErrorCode)); - unsafe { ucnv_cbFromUWriteSub(core::mem::transmute(args), offsetindex, core::mem::transmute(err)) } + unsafe { ucnv_cbFromUWriteSub(args as _, offsetindex, err as _) } } #[inline] pub unsafe fn ucnv_cbFromUWriteUChars(args: *mut UConverterFromUnicodeArgs, source: *const *const u16, sourcelimit: *const u16, offsetindex: i32, err: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_cbFromUWriteUChars(args : *mut UConverterFromUnicodeArgs, source : *const *const u16, sourcelimit : *const u16, offsetindex : i32, err : *mut UErrorCode)); - unsafe { ucnv_cbFromUWriteUChars(core::mem::transmute(args), source, sourcelimit, offsetindex, core::mem::transmute(err)) } + unsafe { ucnv_cbFromUWriteUChars(args as _, source, sourcelimit, offsetindex, err as _) } } #[inline] pub unsafe fn ucnv_cbToUWriteSub(args: *mut UConverterToUnicodeArgs, offsetindex: i32, err: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_cbToUWriteSub(args : *mut UConverterToUnicodeArgs, offsetindex : i32, err : *mut UErrorCode)); - unsafe { ucnv_cbToUWriteSub(core::mem::transmute(args), offsetindex, core::mem::transmute(err)) } + unsafe { ucnv_cbToUWriteSub(args as _, offsetindex, err as _) } } #[inline] pub unsafe fn ucnv_cbToUWriteUChars(args: *mut UConverterToUnicodeArgs, source: *const u16, length: i32, offsetindex: i32, err: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_cbToUWriteUChars(args : *mut UConverterToUnicodeArgs, source : *const u16, length : i32, offsetindex : i32, err : *mut UErrorCode)); - unsafe { ucnv_cbToUWriteUChars(core::mem::transmute(args), source, length, offsetindex, core::mem::transmute(err)) } + unsafe { ucnv_cbToUWriteUChars(args as _, source, length, offsetindex, err as _) } } #[inline] pub unsafe fn ucnv_close(converter: *mut UConverter) { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_close(converter : *mut UConverter)); - unsafe { ucnv_close(core::mem::transmute(converter)) } + unsafe { ucnv_close(converter as _) } } #[inline] pub unsafe fn ucnv_compareNames(name1: P0, name2: P1) -> i32 @@ -2911,7 +2869,7 @@ where P4: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_convert(toconvertername : windows_core::PCSTR, fromconvertername : windows_core::PCSTR, target : windows_core::PCSTR, targetcapacity : i32, source : windows_core::PCSTR, sourcelength : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { ucnv_convert(toconvertername.param().abi(), fromconvertername.param().abi(), target.param().abi(), targetcapacity, source.param().abi(), sourcelength, core::mem::transmute(perrorcode)) } + unsafe { ucnv_convert(toconvertername.param().abi(), fromconvertername.param().abi(), target.param().abi(), targetcapacity, source.param().abi(), sourcelength, perrorcode as _) } } #[inline] pub unsafe fn ucnv_convertEx(targetcnv: *mut UConverter, sourcecnv: *mut UConverter, target: *mut *mut i8, targetlimit: P3, source: *const *const i8, sourcelimit: P5, pivotstart: *mut u16, pivotsource: *mut *mut u16, pivottarget: *mut *mut u16, pivotlimit: *const u16, reset: i8, flush: i8, perrorcode: *mut UErrorCode) @@ -2920,7 +2878,7 @@ where P5: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_convertEx(targetcnv : *mut UConverter, sourcecnv : *mut UConverter, target : *mut *mut i8, targetlimit : windows_core::PCSTR, source : *const *const i8, sourcelimit : windows_core::PCSTR, pivotstart : *mut u16, pivotsource : *mut *mut u16, pivottarget : *mut *mut u16, pivotlimit : *const u16, reset : i8, flush : i8, perrorcode : *mut UErrorCode)); - unsafe { ucnv_convertEx(core::mem::transmute(targetcnv), core::mem::transmute(sourcecnv), core::mem::transmute(target), targetlimit.param().abi(), source, sourcelimit.param().abi(), core::mem::transmute(pivotstart), core::mem::transmute(pivotsource), core::mem::transmute(pivottarget), pivotlimit, reset, flush, core::mem::transmute(perrorcode)) } + unsafe { ucnv_convertEx(targetcnv as _, sourcecnv as _, target as _, targetlimit.param().abi(), source, sourcelimit.param().abi(), pivotstart as _, pivotsource as _, pivottarget as _, pivotlimit, reset, flush, perrorcode as _) } } #[inline] pub unsafe fn ucnv_countAliases(alias: P0, perrorcode: *mut UErrorCode) -> u16 @@ -2928,7 +2886,7 @@ where P0: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_countAliases(alias : windows_core::PCSTR, perrorcode : *mut UErrorCode) -> u16); - unsafe { ucnv_countAliases(alias.param().abi(), core::mem::transmute(perrorcode)) } + unsafe { ucnv_countAliases(alias.param().abi(), perrorcode as _) } } #[inline] pub unsafe fn ucnv_countAvailable() -> i32 { @@ -2946,12 +2904,12 @@ where P0: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_detectUnicodeSignature(source : windows_core::PCSTR, sourcelength : i32, signaturelength : *mut i32, perrorcode : *mut UErrorCode) -> windows_core::PCSTR); - unsafe { ucnv_detectUnicodeSignature(source.param().abi(), sourcelength, core::mem::transmute(signaturelength), core::mem::transmute(perrorcode)) } + unsafe { ucnv_detectUnicodeSignature(source.param().abi(), sourcelength, signaturelength as _, perrorcode as _) } } #[inline] pub unsafe fn ucnv_fixFileSeparator(cnv: *const UConverter, source: *mut u16, sourcelen: i32) { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_fixFileSeparator(cnv : *const UConverter, source : *mut u16, sourcelen : i32)); - unsafe { ucnv_fixFileSeparator(cnv, core::mem::transmute(source), sourcelen) } + unsafe { ucnv_fixFileSeparator(cnv, source as _, sourcelen) } } #[inline] pub unsafe fn ucnv_flushCache() -> i32 { @@ -2965,7 +2923,7 @@ where P4: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_fromAlgorithmic(cnv : *mut UConverter, algorithmictype : UConverterType, target : windows_core::PCSTR, targetcapacity : i32, source : windows_core::PCSTR, sourcelength : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { ucnv_fromAlgorithmic(core::mem::transmute(cnv), algorithmictype, target.param().abi(), targetcapacity, source.param().abi(), sourcelength, core::mem::transmute(perrorcode)) } + unsafe { ucnv_fromAlgorithmic(cnv as _, algorithmictype, target.param().abi(), targetcapacity, source.param().abi(), sourcelength, perrorcode as _) } } #[inline] pub unsafe fn ucnv_fromUChars(cnv: *mut UConverter, dest: P1, destcapacity: i32, src: *const u16, srclength: i32, perrorcode: *mut UErrorCode) -> i32 @@ -2973,12 +2931,12 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_fromUChars(cnv : *mut UConverter, dest : windows_core::PCSTR, destcapacity : i32, src : *const u16, srclength : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { ucnv_fromUChars(core::mem::transmute(cnv), dest.param().abi(), destcapacity, src, srclength, core::mem::transmute(perrorcode)) } + unsafe { ucnv_fromUChars(cnv as _, dest.param().abi(), destcapacity, src, srclength, perrorcode as _) } } #[inline] pub unsafe fn ucnv_fromUCountPending(cnv: *const UConverter, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_fromUCountPending(cnv : *const UConverter, status : *mut UErrorCode) -> i32); - unsafe { ucnv_fromUCountPending(cnv, core::mem::transmute(status)) } + unsafe { ucnv_fromUCountPending(cnv, status as _) } } #[inline] pub unsafe fn ucnv_fromUnicode(converter: *mut UConverter, target: *mut *mut i8, targetlimit: P2, source: *const *const u16, sourcelimit: *const u16, offsets: *mut i32, flush: i8, err: *mut UErrorCode) @@ -2986,7 +2944,7 @@ where P2: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_fromUnicode(converter : *mut UConverter, target : *mut *mut i8, targetlimit : windows_core::PCSTR, source : *const *const u16, sourcelimit : *const u16, offsets : *mut i32, flush : i8, err : *mut UErrorCode)); - unsafe { ucnv_fromUnicode(core::mem::transmute(converter), core::mem::transmute(target), targetlimit.param().abi(), source, sourcelimit, core::mem::transmute(offsets), flush, core::mem::transmute(err)) } + unsafe { ucnv_fromUnicode(converter as _, target as _, targetlimit.param().abi(), source, sourcelimit, offsets as _, flush, err as _) } } #[inline] pub unsafe fn ucnv_getAlias(alias: P0, n: u16, perrorcode: *mut UErrorCode) -> windows_core::PCSTR @@ -2994,7 +2952,7 @@ where P0: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_getAlias(alias : windows_core::PCSTR, n : u16, perrorcode : *mut UErrorCode) -> windows_core::PCSTR); - unsafe { ucnv_getAlias(alias.param().abi(), n, core::mem::transmute(perrorcode)) } + unsafe { ucnv_getAlias(alias.param().abi(), n, perrorcode as _) } } #[inline] pub unsafe fn ucnv_getAliases(alias: P0, aliases: *const *const i8, perrorcode: *mut UErrorCode) @@ -3002,7 +2960,7 @@ where P0: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_getAliases(alias : windows_core::PCSTR, aliases : *const *const i8, perrorcode : *mut UErrorCode)); - unsafe { ucnv_getAliases(alias.param().abi(), aliases, core::mem::transmute(perrorcode)) } + unsafe { ucnv_getAliases(alias.param().abi(), aliases, perrorcode as _) } } #[inline] pub unsafe fn ucnv_getAvailableName(n: i32) -> windows_core::PCSTR { @@ -3012,7 +2970,7 @@ pub unsafe fn ucnv_getAvailableName(n: i32) -> windows_core::PCSTR { #[inline] pub unsafe fn ucnv_getCCSID(converter: *const UConverter, err: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_getCCSID(converter : *const UConverter, err : *mut UErrorCode) -> i32); - unsafe { ucnv_getCCSID(converter, core::mem::transmute(err)) } + unsafe { ucnv_getCCSID(converter, err as _) } } #[inline] pub unsafe fn ucnv_getCanonicalName(alias: P0, standard: P1, perrorcode: *mut UErrorCode) -> windows_core::PCSTR @@ -3021,7 +2979,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_getCanonicalName(alias : windows_core::PCSTR, standard : windows_core::PCSTR, perrorcode : *mut UErrorCode) -> windows_core::PCSTR); - unsafe { ucnv_getCanonicalName(alias.param().abi(), standard.param().abi(), core::mem::transmute(perrorcode)) } + unsafe { ucnv_getCanonicalName(alias.param().abi(), standard.param().abi(), perrorcode as _) } } #[inline] pub unsafe fn ucnv_getDefaultName() -> windows_core::PCSTR { @@ -3034,12 +2992,12 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_getDisplayName(converter : *const UConverter, displaylocale : windows_core::PCSTR, displayname : *mut u16, displaynamecapacity : i32, err : *mut UErrorCode) -> i32); - unsafe { ucnv_getDisplayName(converter, displaylocale.param().abi(), core::mem::transmute(displayname), displaynamecapacity, core::mem::transmute(err)) } + unsafe { ucnv_getDisplayName(converter, displaylocale.param().abi(), displayname as _, displaynamecapacity, err as _) } } #[inline] pub unsafe fn ucnv_getFromUCallBack(converter: *const UConverter, action: *mut UConverterFromUCallback, context: *const *const core::ffi::c_void) { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_getFromUCallBack(converter : *const UConverter, action : *mut UConverterFromUCallback, context : *const *const core::ffi::c_void)); - unsafe { ucnv_getFromUCallBack(converter, core::mem::transmute(action), context) } + unsafe { ucnv_getFromUCallBack(converter, action as _, context) } } #[inline] pub unsafe fn ucnv_getInvalidChars(converter: *const UConverter, errbytes: P1, len: *mut i8, err: *mut UErrorCode) @@ -3047,12 +3005,12 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_getInvalidChars(converter : *const UConverter, errbytes : windows_core::PCSTR, len : *mut i8, err : *mut UErrorCode)); - unsafe { ucnv_getInvalidChars(converter, errbytes.param().abi(), core::mem::transmute(len), core::mem::transmute(err)) } + unsafe { ucnv_getInvalidChars(converter, errbytes.param().abi(), len as _, err as _) } } #[inline] pub unsafe fn ucnv_getInvalidUChars(converter: *const UConverter, erruchars: *mut u16, len: *mut i8, err: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_getInvalidUChars(converter : *const UConverter, erruchars : *mut u16, len : *mut i8, err : *mut UErrorCode)); - unsafe { ucnv_getInvalidUChars(converter, core::mem::transmute(erruchars), core::mem::transmute(len), core::mem::transmute(err)) } + unsafe { ucnv_getInvalidUChars(converter, erruchars as _, len as _, err as _) } } #[inline] pub unsafe fn ucnv_getMaxCharSize(converter: *const UConverter) -> i8 { @@ -3067,7 +3025,7 @@ pub unsafe fn ucnv_getMinCharSize(converter: *const UConverter) -> i8 { #[inline] pub unsafe fn ucnv_getName(converter: *const UConverter, err: *mut UErrorCode) -> windows_core::PCSTR { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_getName(converter : *const UConverter, err : *mut UErrorCode) -> windows_core::PCSTR); - unsafe { ucnv_getName(converter, core::mem::transmute(err)) } + unsafe { ucnv_getName(converter, err as _) } } #[inline] pub unsafe fn ucnv_getNextUChar(converter: *mut UConverter, source: *const *const i8, sourcelimit: P2, err: *mut UErrorCode) -> i32 @@ -3075,17 +3033,17 @@ where P2: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_getNextUChar(converter : *mut UConverter, source : *const *const i8, sourcelimit : windows_core::PCSTR, err : *mut UErrorCode) -> i32); - unsafe { ucnv_getNextUChar(core::mem::transmute(converter), source, sourcelimit.param().abi(), core::mem::transmute(err)) } + unsafe { ucnv_getNextUChar(converter as _, source, sourcelimit.param().abi(), err as _) } } #[inline] pub unsafe fn ucnv_getPlatform(converter: *const UConverter, err: *mut UErrorCode) -> UConverterPlatform { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_getPlatform(converter : *const UConverter, err : *mut UErrorCode) -> UConverterPlatform); - unsafe { ucnv_getPlatform(converter, core::mem::transmute(err)) } + unsafe { ucnv_getPlatform(converter, err as _) } } #[inline] pub unsafe fn ucnv_getStandard(n: u16, perrorcode: *mut UErrorCode) -> windows_core::PCSTR { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_getStandard(n : u16, perrorcode : *mut UErrorCode) -> windows_core::PCSTR); - unsafe { ucnv_getStandard(n, core::mem::transmute(perrorcode)) } + unsafe { ucnv_getStandard(n, perrorcode as _) } } #[inline] pub unsafe fn ucnv_getStandardName(name: P0, standard: P1, perrorcode: *mut UErrorCode) -> windows_core::PCSTR @@ -3094,12 +3052,12 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_getStandardName(name : windows_core::PCSTR, standard : windows_core::PCSTR, perrorcode : *mut UErrorCode) -> windows_core::PCSTR); - unsafe { ucnv_getStandardName(name.param().abi(), standard.param().abi(), core::mem::transmute(perrorcode)) } + unsafe { ucnv_getStandardName(name.param().abi(), standard.param().abi(), perrorcode as _) } } #[inline] pub unsafe fn ucnv_getStarters(converter: *const UConverter, starters: *mut i8, err: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_getStarters(converter : *const UConverter, starters : *mut i8, err : *mut UErrorCode)); - unsafe { ucnv_getStarters(converter, core::mem::transmute(starters), core::mem::transmute(err)) } + unsafe { ucnv_getStarters(converter, starters as _, err as _) } } #[inline] pub unsafe fn ucnv_getSubstChars(converter: *const UConverter, subchars: P1, len: *mut i8, err: *mut UErrorCode) @@ -3107,12 +3065,12 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_getSubstChars(converter : *const UConverter, subchars : windows_core::PCSTR, len : *mut i8, err : *mut UErrorCode)); - unsafe { ucnv_getSubstChars(converter, subchars.param().abi(), core::mem::transmute(len), core::mem::transmute(err)) } + unsafe { ucnv_getSubstChars(converter, subchars.param().abi(), len as _, err as _) } } #[inline] pub unsafe fn ucnv_getToUCallBack(converter: *const UConverter, action: *mut UConverterToUCallback, context: *const *const core::ffi::c_void) { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_getToUCallBack(converter : *const UConverter, action : *mut UConverterToUCallback, context : *const *const core::ffi::c_void)); - unsafe { ucnv_getToUCallBack(converter, core::mem::transmute(action), context) } + unsafe { ucnv_getToUCallBack(converter, action as _, context) } } #[inline] pub unsafe fn ucnv_getType(converter: *const UConverter) -> UConverterType { @@ -3122,7 +3080,7 @@ pub unsafe fn ucnv_getType(converter: *const UConverter) -> UConverterType { #[inline] pub unsafe fn ucnv_getUnicodeSet(cnv: *const UConverter, setfillin: *mut USet, whichset: UConverterUnicodeSet, perrorcode: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_getUnicodeSet(cnv : *const UConverter, setfillin : *mut USet, whichset : UConverterUnicodeSet, perrorcode : *mut UErrorCode)); - unsafe { ucnv_getUnicodeSet(cnv, core::mem::transmute(setfillin), whichset, core::mem::transmute(perrorcode)) } + unsafe { ucnv_getUnicodeSet(cnv, setfillin as _, whichset, perrorcode as _) } } #[inline] pub unsafe fn ucnv_isAmbiguous(cnv: *const UConverter) -> i8 { @@ -3132,7 +3090,7 @@ pub unsafe fn ucnv_isAmbiguous(cnv: *const UConverter) -> i8 { #[inline] pub unsafe fn ucnv_isFixedWidth(cnv: *mut UConverter, status: *mut UErrorCode) -> i8 { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_isFixedWidth(cnv : *mut UConverter, status : *mut UErrorCode) -> i8); - unsafe { ucnv_isFixedWidth(core::mem::transmute(cnv), core::mem::transmute(status)) } + unsafe { ucnv_isFixedWidth(cnv as _, status as _) } } #[inline] pub unsafe fn ucnv_open(convertername: P0, err: *mut UErrorCode) -> *mut UConverter @@ -3140,17 +3098,17 @@ where P0: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_open(convertername : windows_core::PCSTR, err : *mut UErrorCode) -> *mut UConverter); - unsafe { ucnv_open(convertername.param().abi(), core::mem::transmute(err)) } + unsafe { ucnv_open(convertername.param().abi(), err as _) } } #[inline] pub unsafe fn ucnv_openAllNames(perrorcode: *mut UErrorCode) -> *mut UEnumeration { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_openAllNames(perrorcode : *mut UErrorCode) -> *mut UEnumeration); - unsafe { ucnv_openAllNames(core::mem::transmute(perrorcode)) } + unsafe { ucnv_openAllNames(perrorcode as _) } } #[inline] pub unsafe fn ucnv_openCCSID(codepage: i32, platform: UConverterPlatform, err: *mut UErrorCode) -> *mut UConverter { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_openCCSID(codepage : i32, platform : UConverterPlatform, err : *mut UErrorCode) -> *mut UConverter); - unsafe { ucnv_openCCSID(codepage, platform, core::mem::transmute(err)) } + unsafe { ucnv_openCCSID(codepage, platform, err as _) } } #[inline] pub unsafe fn ucnv_openPackage(packagename: P0, convertername: P1, err: *mut UErrorCode) -> *mut UConverter @@ -3159,7 +3117,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_openPackage(packagename : windows_core::PCSTR, convertername : windows_core::PCSTR, err : *mut UErrorCode) -> *mut UConverter); - unsafe { ucnv_openPackage(packagename.param().abi(), convertername.param().abi(), core::mem::transmute(err)) } + unsafe { ucnv_openPackage(packagename.param().abi(), convertername.param().abi(), err as _) } } #[inline] pub unsafe fn ucnv_openStandardNames(convname: P0, standard: P1, perrorcode: *mut UErrorCode) -> *mut UEnumeration @@ -3168,32 +3126,32 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_openStandardNames(convname : windows_core::PCSTR, standard : windows_core::PCSTR, perrorcode : *mut UErrorCode) -> *mut UEnumeration); - unsafe { ucnv_openStandardNames(convname.param().abi(), standard.param().abi(), core::mem::transmute(perrorcode)) } + unsafe { ucnv_openStandardNames(convname.param().abi(), standard.param().abi(), perrorcode as _) } } #[inline] pub unsafe fn ucnv_openU(name: *const u16, err: *mut UErrorCode) -> *mut UConverter { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_openU(name : *const u16, err : *mut UErrorCode) -> *mut UConverter); - unsafe { ucnv_openU(name, core::mem::transmute(err)) } + unsafe { ucnv_openU(name, err as _) } } #[inline] pub unsafe fn ucnv_reset(converter: *mut UConverter) { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_reset(converter : *mut UConverter)); - unsafe { ucnv_reset(core::mem::transmute(converter)) } + unsafe { ucnv_reset(converter as _) } } #[inline] pub unsafe fn ucnv_resetFromUnicode(converter: *mut UConverter) { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_resetFromUnicode(converter : *mut UConverter)); - unsafe { ucnv_resetFromUnicode(core::mem::transmute(converter)) } + unsafe { ucnv_resetFromUnicode(converter as _) } } #[inline] pub unsafe fn ucnv_resetToUnicode(converter: *mut UConverter) { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_resetToUnicode(converter : *mut UConverter)); - unsafe { ucnv_resetToUnicode(core::mem::transmute(converter)) } + unsafe { ucnv_resetToUnicode(converter as _) } } #[inline] pub unsafe fn ucnv_safeClone(cnv: *const UConverter, stackbuffer: *mut core::ffi::c_void, pbuffersize: *mut i32, status: *mut UErrorCode) -> *mut UConverter { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_safeClone(cnv : *const UConverter, stackbuffer : *mut core::ffi::c_void, pbuffersize : *mut i32, status : *mut UErrorCode) -> *mut UConverter); - unsafe { ucnv_safeClone(cnv, core::mem::transmute(stackbuffer), core::mem::transmute(pbuffersize), core::mem::transmute(status)) } + unsafe { ucnv_safeClone(cnv, stackbuffer as _, pbuffersize as _, status as _) } } #[inline] pub unsafe fn ucnv_setDefaultName(name: P0) @@ -3206,12 +3164,12 @@ where #[inline] pub unsafe fn ucnv_setFallback(cnv: *mut UConverter, usesfallback: i8) { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_setFallback(cnv : *mut UConverter, usesfallback : i8)); - unsafe { ucnv_setFallback(core::mem::transmute(cnv), usesfallback) } + unsafe { ucnv_setFallback(cnv as _, usesfallback) } } #[inline] pub unsafe fn ucnv_setFromUCallBack(converter: *mut UConverter, newaction: UConverterFromUCallback, newcontext: *const core::ffi::c_void, oldaction: *mut UConverterFromUCallback, oldcontext: *const *const core::ffi::c_void, err: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_setFromUCallBack(converter : *mut UConverter, newaction : UConverterFromUCallback, newcontext : *const core::ffi::c_void, oldaction : *mut UConverterFromUCallback, oldcontext : *const *const core::ffi::c_void, err : *mut UErrorCode)); - unsafe { ucnv_setFromUCallBack(core::mem::transmute(converter), newaction, newcontext, core::mem::transmute(oldaction), oldcontext, core::mem::transmute(err)) } + unsafe { ucnv_setFromUCallBack(converter as _, newaction, newcontext, oldaction as _, oldcontext, err as _) } } #[inline] pub unsafe fn ucnv_setSubstChars(converter: *mut UConverter, subchars: P1, len: i8, err: *mut UErrorCode) @@ -3219,17 +3177,17 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_setSubstChars(converter : *mut UConverter, subchars : windows_core::PCSTR, len : i8, err : *mut UErrorCode)); - unsafe { ucnv_setSubstChars(core::mem::transmute(converter), subchars.param().abi(), len, core::mem::transmute(err)) } + unsafe { ucnv_setSubstChars(converter as _, subchars.param().abi(), len, err as _) } } #[inline] pub unsafe fn ucnv_setSubstString(cnv: *mut UConverter, s: *const u16, length: i32, err: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_setSubstString(cnv : *mut UConverter, s : *const u16, length : i32, err : *mut UErrorCode)); - unsafe { ucnv_setSubstString(core::mem::transmute(cnv), s, length, core::mem::transmute(err)) } + unsafe { ucnv_setSubstString(cnv as _, s, length, err as _) } } #[inline] pub unsafe fn ucnv_setToUCallBack(converter: *mut UConverter, newaction: UConverterToUCallback, newcontext: *const core::ffi::c_void, oldaction: *mut UConverterToUCallback, oldcontext: *const *const core::ffi::c_void, err: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_setToUCallBack(converter : *mut UConverter, newaction : UConverterToUCallback, newcontext : *const core::ffi::c_void, oldaction : *mut UConverterToUCallback, oldcontext : *const *const core::ffi::c_void, err : *mut UErrorCode)); - unsafe { ucnv_setToUCallBack(core::mem::transmute(converter), newaction, newcontext, core::mem::transmute(oldaction), oldcontext, core::mem::transmute(err)) } + unsafe { ucnv_setToUCallBack(converter as _, newaction, newcontext, oldaction as _, oldcontext, err as _) } } #[inline] pub unsafe fn ucnv_toAlgorithmic(algorithmictype: UConverterType, cnv: *mut UConverter, target: P2, targetcapacity: i32, source: P4, sourcelength: i32, perrorcode: *mut UErrorCode) -> i32 @@ -3238,7 +3196,7 @@ where P4: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_toAlgorithmic(algorithmictype : UConverterType, cnv : *mut UConverter, target : windows_core::PCSTR, targetcapacity : i32, source : windows_core::PCSTR, sourcelength : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { ucnv_toAlgorithmic(algorithmictype, core::mem::transmute(cnv), target.param().abi(), targetcapacity, source.param().abi(), sourcelength, core::mem::transmute(perrorcode)) } + unsafe { ucnv_toAlgorithmic(algorithmictype, cnv as _, target.param().abi(), targetcapacity, source.param().abi(), sourcelength, perrorcode as _) } } #[inline] pub unsafe fn ucnv_toUChars(cnv: *mut UConverter, dest: *mut u16, destcapacity: i32, src: P3, srclength: i32, perrorcode: *mut UErrorCode) -> i32 @@ -3246,12 +3204,12 @@ where P3: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_toUChars(cnv : *mut UConverter, dest : *mut u16, destcapacity : i32, src : windows_core::PCSTR, srclength : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { ucnv_toUChars(core::mem::transmute(cnv), core::mem::transmute(dest), destcapacity, src.param().abi(), srclength, core::mem::transmute(perrorcode)) } + unsafe { ucnv_toUChars(cnv as _, dest as _, destcapacity, src.param().abi(), srclength, perrorcode as _) } } #[inline] pub unsafe fn ucnv_toUCountPending(cnv: *const UConverter, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_toUCountPending(cnv : *const UConverter, status : *mut UErrorCode) -> i32); - unsafe { ucnv_toUCountPending(cnv, core::mem::transmute(status)) } + unsafe { ucnv_toUCountPending(cnv, status as _) } } #[inline] pub unsafe fn ucnv_toUnicode(converter: *mut UConverter, target: *mut *mut u16, targetlimit: *const u16, source: *const *const i8, sourcelimit: P4, offsets: *mut i32, flush: i8, err: *mut UErrorCode) @@ -3259,7 +3217,7 @@ where P4: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucnv_toUnicode(converter : *mut UConverter, target : *mut *mut u16, targetlimit : *const u16, source : *const *const i8, sourcelimit : windows_core::PCSTR, offsets : *mut i32, flush : i8, err : *mut UErrorCode)); - unsafe { ucnv_toUnicode(core::mem::transmute(converter), core::mem::transmute(target), targetlimit, source, sourcelimit.param().abi(), core::mem::transmute(offsets), flush, core::mem::transmute(err)) } + unsafe { ucnv_toUnicode(converter as _, target as _, targetlimit, source, sourcelimit.param().abi(), offsets as _, flush, err as _) } } #[inline] pub unsafe fn ucnv_usesFallback(cnv: *const UConverter) -> i8 { @@ -3269,22 +3227,22 @@ pub unsafe fn ucnv_usesFallback(cnv: *const UConverter) -> i8 { #[inline] pub unsafe fn ucnvsel_close(sel: *mut UConverterSelector) { windows_targets::link!("icuuc.dll" "cdecl" fn ucnvsel_close(sel : *mut UConverterSelector)); - unsafe { ucnvsel_close(core::mem::transmute(sel)) } + unsafe { ucnvsel_close(sel as _) } } #[inline] pub unsafe fn ucnvsel_open(converterlist: *const *const i8, converterlistsize: i32, excludedcodepoints: *const USet, whichset: UConverterUnicodeSet, status: *mut UErrorCode) -> *mut UConverterSelector { windows_targets::link!("icuuc.dll" "cdecl" fn ucnvsel_open(converterlist : *const *const i8, converterlistsize : i32, excludedcodepoints : *const USet, whichset : UConverterUnicodeSet, status : *mut UErrorCode) -> *mut UConverterSelector); - unsafe { ucnvsel_open(converterlist, converterlistsize, excludedcodepoints, whichset, core::mem::transmute(status)) } + unsafe { ucnvsel_open(converterlist, converterlistsize, excludedcodepoints, whichset, status as _) } } #[inline] pub unsafe fn ucnvsel_openFromSerialized(buffer: *const core::ffi::c_void, length: i32, status: *mut UErrorCode) -> *mut UConverterSelector { windows_targets::link!("icuuc.dll" "cdecl" fn ucnvsel_openFromSerialized(buffer : *const core::ffi::c_void, length : i32, status : *mut UErrorCode) -> *mut UConverterSelector); - unsafe { ucnvsel_openFromSerialized(buffer, length, core::mem::transmute(status)) } + unsafe { ucnvsel_openFromSerialized(buffer, length, status as _) } } #[inline] pub unsafe fn ucnvsel_selectForString(sel: *const UConverterSelector, s: *const u16, length: i32, status: *mut UErrorCode) -> *mut UEnumeration { windows_targets::link!("icuuc.dll" "cdecl" fn ucnvsel_selectForString(sel : *const UConverterSelector, s : *const u16, length : i32, status : *mut UErrorCode) -> *mut UEnumeration); - unsafe { ucnvsel_selectForString(sel, s, length, core::mem::transmute(status)) } + unsafe { ucnvsel_selectForString(sel, s, length, status as _) } } #[inline] pub unsafe fn ucnvsel_selectForUTF8(sel: *const UConverterSelector, s: P1, length: i32, status: *mut UErrorCode) -> *mut UEnumeration @@ -3292,27 +3250,27 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucnvsel_selectForUTF8(sel : *const UConverterSelector, s : windows_core::PCSTR, length : i32, status : *mut UErrorCode) -> *mut UEnumeration); - unsafe { ucnvsel_selectForUTF8(sel, s.param().abi(), length, core::mem::transmute(status)) } + unsafe { ucnvsel_selectForUTF8(sel, s.param().abi(), length, status as _) } } #[inline] pub unsafe fn ucnvsel_serialize(sel: *const UConverterSelector, buffer: *mut core::ffi::c_void, buffercapacity: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn ucnvsel_serialize(sel : *const UConverterSelector, buffer : *mut core::ffi::c_void, buffercapacity : i32, status : *mut UErrorCode) -> i32); - unsafe { ucnvsel_serialize(sel, core::mem::transmute(buffer), buffercapacity, core::mem::transmute(status)) } + unsafe { ucnvsel_serialize(sel, buffer as _, buffercapacity, status as _) } } #[inline] pub unsafe fn ucol_cloneBinary(coll: *const UCollator, buffer: *mut u8, capacity: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn ucol_cloneBinary(coll : *const UCollator, buffer : *mut u8, capacity : i32, status : *mut UErrorCode) -> i32); - unsafe { ucol_cloneBinary(coll, core::mem::transmute(buffer), capacity, core::mem::transmute(status)) } + unsafe { ucol_cloneBinary(coll, buffer as _, capacity, status as _) } } #[inline] pub unsafe fn ucol_close(coll: *mut UCollator) { windows_targets::link!("icuin.dll" "cdecl" fn ucol_close(coll : *mut UCollator)); - unsafe { ucol_close(core::mem::transmute(coll)) } + unsafe { ucol_close(coll as _) } } #[inline] pub unsafe fn ucol_closeElements(elems: *mut UCollationElements) { windows_targets::link!("icuin.dll" "cdecl" fn ucol_closeElements(elems : *mut UCollationElements)); - unsafe { ucol_closeElements(core::mem::transmute(elems)) } + unsafe { ucol_closeElements(elems as _) } } #[inline] pub unsafe fn ucol_countAvailable() -> i32 { @@ -3327,7 +3285,7 @@ pub unsafe fn ucol_equal(coll: *const UCollator, source: *const u16, sourcelengt #[inline] pub unsafe fn ucol_getAttribute(coll: *const UCollator, attr: UColAttribute, status: *mut UErrorCode) -> UColAttributeValue { windows_targets::link!("icuin.dll" "cdecl" fn ucol_getAttribute(coll : *const UCollator, attr : UColAttribute, status : *mut UErrorCode) -> UColAttributeValue); - unsafe { ucol_getAttribute(coll, attr, core::mem::transmute(status)) } + unsafe { ucol_getAttribute(coll, attr, status as _) } } #[inline] pub unsafe fn ucol_getAvailable(localeindex: i32) -> windows_core::PCSTR { @@ -3337,12 +3295,12 @@ pub unsafe fn ucol_getAvailable(localeindex: i32) -> windows_core::PCSTR { #[inline] pub unsafe fn ucol_getBound(source: *const u8, sourcelength: i32, boundtype: UColBoundMode, nooflevels: u32, result: *mut u8, resultlength: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn ucol_getBound(source : *const u8, sourcelength : i32, boundtype : UColBoundMode, nooflevels : u32, result : *mut u8, resultlength : i32, status : *mut UErrorCode) -> i32); - unsafe { ucol_getBound(source, sourcelength, boundtype, nooflevels, core::mem::transmute(result), resultlength, core::mem::transmute(status)) } + unsafe { ucol_getBound(source, sourcelength, boundtype, nooflevels, result as _, resultlength, status as _) } } #[inline] pub unsafe fn ucol_getContractionsAndExpansions(coll: *const UCollator, contractions: *mut USet, expansions: *mut USet, addprefixes: i8, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn ucol_getContractionsAndExpansions(coll : *const UCollator, contractions : *mut USet, expansions : *mut USet, addprefixes : i8, status : *mut UErrorCode)); - unsafe { ucol_getContractionsAndExpansions(coll, core::mem::transmute(contractions), core::mem::transmute(expansions), addprefixes, core::mem::transmute(status)) } + unsafe { ucol_getContractionsAndExpansions(coll, contractions as _, expansions as _, addprefixes, status as _) } } #[inline] pub unsafe fn ucol_getDisplayName(objloc: P0, disploc: P1, result: *mut u16, resultlength: i32, status: *mut UErrorCode) -> i32 @@ -3351,12 +3309,12 @@ where P1: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn ucol_getDisplayName(objloc : windows_core::PCSTR, disploc : windows_core::PCSTR, result : *mut u16, resultlength : i32, status : *mut UErrorCode) -> i32); - unsafe { ucol_getDisplayName(objloc.param().abi(), disploc.param().abi(), core::mem::transmute(result), resultlength, core::mem::transmute(status)) } + unsafe { ucol_getDisplayName(objloc.param().abi(), disploc.param().abi(), result as _, resultlength, status as _) } } #[inline] pub unsafe fn ucol_getEquivalentReorderCodes(reordercode: i32, dest: *mut i32, destcapacity: i32, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn ucol_getEquivalentReorderCodes(reordercode : i32, dest : *mut i32, destcapacity : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { ucol_getEquivalentReorderCodes(reordercode, core::mem::transmute(dest), destcapacity, core::mem::transmute(perrorcode)) } + unsafe { ucol_getEquivalentReorderCodes(reordercode, dest as _, destcapacity, perrorcode as _) } } #[inline] pub unsafe fn ucol_getFunctionalEquivalent(result: P0, resultcapacity: i32, keyword: P2, locale: P3, isavailable: *mut i8, status: *mut UErrorCode) -> i32 @@ -3366,7 +3324,7 @@ where P3: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn ucol_getFunctionalEquivalent(result : windows_core::PCSTR, resultcapacity : i32, keyword : windows_core::PCSTR, locale : windows_core::PCSTR, isavailable : *mut i8, status : *mut UErrorCode) -> i32); - unsafe { ucol_getFunctionalEquivalent(result.param().abi(), resultcapacity, keyword.param().abi(), locale.param().abi(), core::mem::transmute(isavailable), core::mem::transmute(status)) } + unsafe { ucol_getFunctionalEquivalent(result.param().abi(), resultcapacity, keyword.param().abi(), locale.param().abi(), isavailable as _, status as _) } } #[inline] pub unsafe fn ucol_getKeywordValues(keyword: P0, status: *mut UErrorCode) -> *mut UEnumeration @@ -3374,7 +3332,7 @@ where P0: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn ucol_getKeywordValues(keyword : windows_core::PCSTR, status : *mut UErrorCode) -> *mut UEnumeration); - unsafe { ucol_getKeywordValues(keyword.param().abi(), core::mem::transmute(status)) } + unsafe { ucol_getKeywordValues(keyword.param().abi(), status as _) } } #[inline] pub unsafe fn ucol_getKeywordValuesForLocale(key: P0, locale: P1, commonlyused: i8, status: *mut UErrorCode) -> *mut UEnumeration @@ -3383,17 +3341,17 @@ where P1: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn ucol_getKeywordValuesForLocale(key : windows_core::PCSTR, locale : windows_core::PCSTR, commonlyused : i8, status : *mut UErrorCode) -> *mut UEnumeration); - unsafe { ucol_getKeywordValuesForLocale(key.param().abi(), locale.param().abi(), commonlyused, core::mem::transmute(status)) } + unsafe { ucol_getKeywordValuesForLocale(key.param().abi(), locale.param().abi(), commonlyused, status as _) } } #[inline] pub unsafe fn ucol_getKeywords(status: *mut UErrorCode) -> *mut UEnumeration { windows_targets::link!("icuin.dll" "cdecl" fn ucol_getKeywords(status : *mut UErrorCode) -> *mut UEnumeration); - unsafe { ucol_getKeywords(core::mem::transmute(status)) } + unsafe { ucol_getKeywords(status as _) } } #[inline] pub unsafe fn ucol_getLocaleByType(coll: *const UCollator, r#type: ULocDataLocaleType, status: *mut UErrorCode) -> windows_core::PCSTR { windows_targets::link!("icuin.dll" "cdecl" fn ucol_getLocaleByType(coll : *const UCollator, r#type : ULocDataLocaleType, status : *mut UErrorCode) -> windows_core::PCSTR); - unsafe { ucol_getLocaleByType(coll, r#type, core::mem::transmute(status)) } + unsafe { ucol_getLocaleByType(coll, r#type, status as _) } } #[inline] pub unsafe fn ucol_getMaxExpansion(elems: *const UCollationElements, order: i32) -> i32 { @@ -3413,22 +3371,22 @@ pub unsafe fn ucol_getOffset(elems: *const UCollationElements) -> i32 { #[inline] pub unsafe fn ucol_getReorderCodes(coll: *const UCollator, dest: *mut i32, destcapacity: i32, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn ucol_getReorderCodes(coll : *const UCollator, dest : *mut i32, destcapacity : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { ucol_getReorderCodes(coll, core::mem::transmute(dest), destcapacity, core::mem::transmute(perrorcode)) } + unsafe { ucol_getReorderCodes(coll, dest as _, destcapacity, perrorcode as _) } } #[inline] pub unsafe fn ucol_getRules(coll: *const UCollator, length: *mut i32) -> *mut u16 { windows_targets::link!("icuin.dll" "cdecl" fn ucol_getRules(coll : *const UCollator, length : *mut i32) -> *mut u16); - unsafe { ucol_getRules(coll, core::mem::transmute(length)) } + unsafe { ucol_getRules(coll, length as _) } } #[inline] pub unsafe fn ucol_getRulesEx(coll: *const UCollator, delta: UColRuleOption, buffer: *mut u16, bufferlen: i32) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn ucol_getRulesEx(coll : *const UCollator, delta : UColRuleOption, buffer : *mut u16, bufferlen : i32) -> i32); - unsafe { ucol_getRulesEx(coll, delta, core::mem::transmute(buffer), bufferlen) } + unsafe { ucol_getRulesEx(coll, delta, buffer as _, bufferlen) } } #[inline] pub unsafe fn ucol_getSortKey(coll: *const UCollator, source: *const u16, sourcelength: i32, result: *mut u8, resultlength: i32) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn ucol_getSortKey(coll : *const UCollator, source : *const u16, sourcelength : i32, result : *mut u8, resultlength : i32) -> i32); - unsafe { ucol_getSortKey(coll, source, sourcelength, core::mem::transmute(result), resultlength) } + unsafe { ucol_getSortKey(coll, source, sourcelength, result as _, resultlength) } } #[inline] pub unsafe fn ucol_getStrength(coll: *const UCollator) -> UColAttributeValue { @@ -3438,22 +3396,22 @@ pub unsafe fn ucol_getStrength(coll: *const UCollator) -> UColAttributeValue { #[inline] pub unsafe fn ucol_getTailoredSet(coll: *const UCollator, status: *mut UErrorCode) -> *mut USet { windows_targets::link!("icuin.dll" "cdecl" fn ucol_getTailoredSet(coll : *const UCollator, status : *mut UErrorCode) -> *mut USet); - unsafe { ucol_getTailoredSet(coll, core::mem::transmute(status)) } + unsafe { ucol_getTailoredSet(coll, status as _) } } #[inline] pub unsafe fn ucol_getUCAVersion(coll: *const UCollator, info: *mut u8) { windows_targets::link!("icuin.dll" "cdecl" fn ucol_getUCAVersion(coll : *const UCollator, info : *mut u8)); - unsafe { ucol_getUCAVersion(coll, core::mem::transmute(info)) } + unsafe { ucol_getUCAVersion(coll, info as _) } } #[inline] pub unsafe fn ucol_getVariableTop(coll: *const UCollator, status: *mut UErrorCode) -> u32 { windows_targets::link!("icuin.dll" "cdecl" fn ucol_getVariableTop(coll : *const UCollator, status : *mut UErrorCode) -> u32); - unsafe { ucol_getVariableTop(coll, core::mem::transmute(status)) } + unsafe { ucol_getVariableTop(coll, status as _) } } #[inline] pub unsafe fn ucol_getVersion(coll: *const UCollator, info: *mut u8) { windows_targets::link!("icuin.dll" "cdecl" fn ucol_getVersion(coll : *const UCollator, info : *mut u8)); - unsafe { ucol_getVersion(coll, core::mem::transmute(info)) } + unsafe { ucol_getVersion(coll, info as _) } } #[inline] pub unsafe fn ucol_greater(coll: *const UCollator, source: *const u16, sourcelength: i32, target: *const u16, targetlength: i32) -> i8 { @@ -3473,17 +3431,17 @@ pub unsafe fn ucol_keyHashCode(key: *const u8, length: i32) -> i32 { #[inline] pub unsafe fn ucol_mergeSortkeys(src1: *const u8, src1length: i32, src2: *const u8, src2length: i32, dest: *mut u8, destcapacity: i32) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn ucol_mergeSortkeys(src1 : *const u8, src1length : i32, src2 : *const u8, src2length : i32, dest : *mut u8, destcapacity : i32) -> i32); - unsafe { ucol_mergeSortkeys(src1, src1length, src2, src2length, core::mem::transmute(dest), destcapacity) } + unsafe { ucol_mergeSortkeys(src1, src1length, src2, src2length, dest as _, destcapacity) } } #[inline] pub unsafe fn ucol_next(elems: *mut UCollationElements, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn ucol_next(elems : *mut UCollationElements, status : *mut UErrorCode) -> i32); - unsafe { ucol_next(core::mem::transmute(elems), core::mem::transmute(status)) } + unsafe { ucol_next(elems as _, status as _) } } #[inline] pub unsafe fn ucol_nextSortKeyPart(coll: *const UCollator, iter: *mut UCharIterator, state: *mut u32, dest: *mut u8, count: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn ucol_nextSortKeyPart(coll : *const UCollator, iter : *mut UCharIterator, state : *mut u32, dest : *mut u8, count : i32, status : *mut UErrorCode) -> i32); - unsafe { ucol_nextSortKeyPart(coll, core::mem::transmute(iter), core::mem::transmute(state), core::mem::transmute(dest), count, core::mem::transmute(status)) } + unsafe { ucol_nextSortKeyPart(coll, iter as _, state as _, dest as _, count, status as _) } } #[inline] pub unsafe fn ucol_open(loc: P0, status: *mut UErrorCode) -> *mut UCollator @@ -3491,32 +3449,32 @@ where P0: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn ucol_open(loc : windows_core::PCSTR, status : *mut UErrorCode) -> *mut UCollator); - unsafe { ucol_open(loc.param().abi(), core::mem::transmute(status)) } + unsafe { ucol_open(loc.param().abi(), status as _) } } #[inline] pub unsafe fn ucol_openAvailableLocales(status: *mut UErrorCode) -> *mut UEnumeration { windows_targets::link!("icuin.dll" "cdecl" fn ucol_openAvailableLocales(status : *mut UErrorCode) -> *mut UEnumeration); - unsafe { ucol_openAvailableLocales(core::mem::transmute(status)) } + unsafe { ucol_openAvailableLocales(status as _) } } #[inline] pub unsafe fn ucol_openBinary(bin: *const u8, length: i32, base: *const UCollator, status: *mut UErrorCode) -> *mut UCollator { windows_targets::link!("icuin.dll" "cdecl" fn ucol_openBinary(bin : *const u8, length : i32, base : *const UCollator, status : *mut UErrorCode) -> *mut UCollator); - unsafe { ucol_openBinary(bin, length, base, core::mem::transmute(status)) } + unsafe { ucol_openBinary(bin, length, base, status as _) } } #[inline] pub unsafe fn ucol_openElements(coll: *const UCollator, text: *const u16, textlength: i32, status: *mut UErrorCode) -> *mut UCollationElements { windows_targets::link!("icuin.dll" "cdecl" fn ucol_openElements(coll : *const UCollator, text : *const u16, textlength : i32, status : *mut UErrorCode) -> *mut UCollationElements); - unsafe { ucol_openElements(coll, text, textlength, core::mem::transmute(status)) } + unsafe { ucol_openElements(coll, text, textlength, status as _) } } #[inline] pub unsafe fn ucol_openRules(rules: *const u16, ruleslength: i32, normalizationmode: UColAttributeValue, strength: UColAttributeValue, parseerror: *mut UParseError, status: *mut UErrorCode) -> *mut UCollator { windows_targets::link!("icuin.dll" "cdecl" fn ucol_openRules(rules : *const u16, ruleslength : i32, normalizationmode : UColAttributeValue, strength : UColAttributeValue, parseerror : *mut UParseError, status : *mut UErrorCode) -> *mut UCollator); - unsafe { ucol_openRules(rules, ruleslength, normalizationmode, strength, core::mem::transmute(parseerror), core::mem::transmute(status)) } + unsafe { ucol_openRules(rules, ruleslength, normalizationmode, strength, parseerror as _, status as _) } } #[inline] pub unsafe fn ucol_previous(elems: *mut UCollationElements, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn ucol_previous(elems : *mut UCollationElements, status : *mut UErrorCode) -> i32); - unsafe { ucol_previous(core::mem::transmute(elems), core::mem::transmute(status)) } + unsafe { ucol_previous(elems as _, status as _) } } #[inline] pub unsafe fn ucol_primaryOrder(order: i32) -> i32 { @@ -3526,12 +3484,12 @@ pub unsafe fn ucol_primaryOrder(order: i32) -> i32 { #[inline] pub unsafe fn ucol_reset(elems: *mut UCollationElements) { windows_targets::link!("icuin.dll" "cdecl" fn ucol_reset(elems : *mut UCollationElements)); - unsafe { ucol_reset(core::mem::transmute(elems)) } + unsafe { ucol_reset(elems as _) } } #[inline] pub unsafe fn ucol_safeClone(coll: *const UCollator, stackbuffer: *mut core::ffi::c_void, pbuffersize: *mut i32, status: *mut UErrorCode) -> *mut UCollator { windows_targets::link!("icuin.dll" "cdecl" fn ucol_safeClone(coll : *const UCollator, stackbuffer : *mut core::ffi::c_void, pbuffersize : *mut i32, status : *mut UErrorCode) -> *mut UCollator); - unsafe { ucol_safeClone(coll, core::mem::transmute(stackbuffer), core::mem::transmute(pbuffersize), core::mem::transmute(status)) } + unsafe { ucol_safeClone(coll, stackbuffer as _, pbuffersize as _, status as _) } } #[inline] pub unsafe fn ucol_secondaryOrder(order: i32) -> i32 { @@ -3541,32 +3499,32 @@ pub unsafe fn ucol_secondaryOrder(order: i32) -> i32 { #[inline] pub unsafe fn ucol_setAttribute(coll: *mut UCollator, attr: UColAttribute, value: UColAttributeValue, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn ucol_setAttribute(coll : *mut UCollator, attr : UColAttribute, value : UColAttributeValue, status : *mut UErrorCode)); - unsafe { ucol_setAttribute(core::mem::transmute(coll), attr, value, core::mem::transmute(status)) } + unsafe { ucol_setAttribute(coll as _, attr, value, status as _) } } #[inline] pub unsafe fn ucol_setMaxVariable(coll: *mut UCollator, group: UColReorderCode, perrorcode: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn ucol_setMaxVariable(coll : *mut UCollator, group : UColReorderCode, perrorcode : *mut UErrorCode)); - unsafe { ucol_setMaxVariable(core::mem::transmute(coll), group, core::mem::transmute(perrorcode)) } + unsafe { ucol_setMaxVariable(coll as _, group, perrorcode as _) } } #[inline] pub unsafe fn ucol_setOffset(elems: *mut UCollationElements, offset: i32, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn ucol_setOffset(elems : *mut UCollationElements, offset : i32, status : *mut UErrorCode)); - unsafe { ucol_setOffset(core::mem::transmute(elems), offset, core::mem::transmute(status)) } + unsafe { ucol_setOffset(elems as _, offset, status as _) } } #[inline] pub unsafe fn ucol_setReorderCodes(coll: *mut UCollator, reordercodes: *const i32, reordercodeslength: i32, perrorcode: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn ucol_setReorderCodes(coll : *mut UCollator, reordercodes : *const i32, reordercodeslength : i32, perrorcode : *mut UErrorCode)); - unsafe { ucol_setReorderCodes(core::mem::transmute(coll), reordercodes, reordercodeslength, core::mem::transmute(perrorcode)) } + unsafe { ucol_setReorderCodes(coll as _, reordercodes, reordercodeslength, perrorcode as _) } } #[inline] pub unsafe fn ucol_setStrength(coll: *mut UCollator, strength: UColAttributeValue) { windows_targets::link!("icuin.dll" "cdecl" fn ucol_setStrength(coll : *mut UCollator, strength : UColAttributeValue)); - unsafe { ucol_setStrength(core::mem::transmute(coll), strength) } + unsafe { ucol_setStrength(coll as _, strength) } } #[inline] pub unsafe fn ucol_setText(elems: *mut UCollationElements, text: *const u16, textlength: i32, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn ucol_setText(elems : *mut UCollationElements, text : *const u16, textlength : i32, status : *mut UErrorCode)); - unsafe { ucol_setText(core::mem::transmute(elems), text, textlength, core::mem::transmute(status)) } + unsafe { ucol_setText(elems as _, text, textlength, status as _) } } #[inline] pub unsafe fn ucol_strcoll(coll: *const UCollator, source: *const u16, sourcelength: i32, target: *const u16, targetlength: i32) -> UCollationResult { @@ -3576,7 +3534,7 @@ pub unsafe fn ucol_strcoll(coll: *const UCollator, source: *const u16, sourcelen #[inline] pub unsafe fn ucol_strcollIter(coll: *const UCollator, siter: *mut UCharIterator, titer: *mut UCharIterator, status: *mut UErrorCode) -> UCollationResult { windows_targets::link!("icuin.dll" "cdecl" fn ucol_strcollIter(coll : *const UCollator, siter : *mut UCharIterator, titer : *mut UCharIterator, status : *mut UErrorCode) -> UCollationResult); - unsafe { ucol_strcollIter(coll, core::mem::transmute(siter), core::mem::transmute(titer), core::mem::transmute(status)) } + unsafe { ucol_strcollIter(coll, siter as _, titer as _, status as _) } } #[inline] pub unsafe fn ucol_strcollUTF8(coll: *const UCollator, source: P1, sourcelength: i32, target: P3, targetlength: i32, status: *mut UErrorCode) -> UCollationResult @@ -3585,7 +3543,7 @@ where P3: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn ucol_strcollUTF8(coll : *const UCollator, source : windows_core::PCSTR, sourcelength : i32, target : windows_core::PCSTR, targetlength : i32, status : *mut UErrorCode) -> UCollationResult); - unsafe { ucol_strcollUTF8(coll, source.param().abi(), sourcelength, target.param().abi(), targetlength, core::mem::transmute(status)) } + unsafe { ucol_strcollUTF8(coll, source.param().abi(), sourcelength, target.param().abi(), targetlength, status as _) } } #[inline] pub unsafe fn ucol_tertiaryOrder(order: i32) -> i32 { @@ -3600,12 +3558,12 @@ pub unsafe fn ucpmap_get(map: *const UCPMap, c: i32) -> u32 { #[inline] pub unsafe fn ucpmap_getRange(map: *const UCPMap, start: i32, option: UCPMapRangeOption, surrogatevalue: u32, filter: *mut UCPMapValueFilter, context: *const core::ffi::c_void, pvalue: *mut u32) -> i32 { windows_targets::link!("icu.dll" "cdecl" fn ucpmap_getRange(map : *const UCPMap, start : i32, option : UCPMapRangeOption, surrogatevalue : u32, filter : *mut UCPMapValueFilter, context : *const core::ffi::c_void, pvalue : *mut u32) -> i32); - unsafe { ucpmap_getRange(map, start, option, surrogatevalue, core::mem::transmute(filter), context, core::mem::transmute(pvalue)) } + unsafe { ucpmap_getRange(map, start, option, surrogatevalue, filter as _, context, pvalue as _) } } #[inline] pub unsafe fn ucptrie_close(trie: *mut UCPTrie) { windows_targets::link!("icu.dll" "cdecl" fn ucptrie_close(trie : *mut UCPTrie)); - unsafe { ucptrie_close(core::mem::transmute(trie)) } + unsafe { ucptrie_close(trie as _) } } #[inline] pub unsafe fn ucptrie_get(trie: *const UCPTrie, c: i32) -> u32 { @@ -3615,7 +3573,7 @@ pub unsafe fn ucptrie_get(trie: *const UCPTrie, c: i32) -> u32 { #[inline] pub unsafe fn ucptrie_getRange(trie: *const UCPTrie, start: i32, option: UCPMapRangeOption, surrogatevalue: u32, filter: *mut UCPMapValueFilter, context: *const core::ffi::c_void, pvalue: *mut u32) -> i32 { windows_targets::link!("icu.dll" "cdecl" fn ucptrie_getRange(trie : *const UCPTrie, start : i32, option : UCPMapRangeOption, surrogatevalue : u32, filter : *mut UCPMapValueFilter, context : *const core::ffi::c_void, pvalue : *mut u32) -> i32); - unsafe { ucptrie_getRange(trie, start, option, surrogatevalue, core::mem::transmute(filter), context, core::mem::transmute(pvalue)) } + unsafe { ucptrie_getRange(trie, start, option, surrogatevalue, filter as _, context, pvalue as _) } } #[inline] pub unsafe fn ucptrie_getType(trie: *const UCPTrie) -> UCPTrieType { @@ -3645,57 +3603,57 @@ pub unsafe fn ucptrie_internalU8PrevIndex(trie: *const UCPTrie, c: i32, start: * #[inline] pub unsafe fn ucptrie_openFromBinary(r#type: UCPTrieType, valuewidth: UCPTrieValueWidth, data: *const core::ffi::c_void, length: i32, pactuallength: *mut i32, perrorcode: *mut UErrorCode) -> *mut UCPTrie { windows_targets::link!("icu.dll" "cdecl" fn ucptrie_openFromBinary(r#type : UCPTrieType, valuewidth : UCPTrieValueWidth, data : *const core::ffi::c_void, length : i32, pactuallength : *mut i32, perrorcode : *mut UErrorCode) -> *mut UCPTrie); - unsafe { ucptrie_openFromBinary(r#type, valuewidth, data, length, core::mem::transmute(pactuallength), core::mem::transmute(perrorcode)) } + unsafe { ucptrie_openFromBinary(r#type, valuewidth, data, length, pactuallength as _, perrorcode as _) } } #[inline] pub unsafe fn ucptrie_toBinary(trie: *const UCPTrie, data: *mut core::ffi::c_void, capacity: i32, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icu.dll" "cdecl" fn ucptrie_toBinary(trie : *const UCPTrie, data : *mut core::ffi::c_void, capacity : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { ucptrie_toBinary(trie, core::mem::transmute(data), capacity, core::mem::transmute(perrorcode)) } + unsafe { ucptrie_toBinary(trie, data as _, capacity, perrorcode as _) } } #[inline] pub unsafe fn ucsdet_close(ucsd: *mut UCharsetDetector) { windows_targets::link!("icuin.dll" "cdecl" fn ucsdet_close(ucsd : *mut UCharsetDetector)); - unsafe { ucsdet_close(core::mem::transmute(ucsd)) } + unsafe { ucsdet_close(ucsd as _) } } #[inline] pub unsafe fn ucsdet_detect(ucsd: *mut UCharsetDetector, status: *mut UErrorCode) -> *mut UCharsetMatch { windows_targets::link!("icuin.dll" "cdecl" fn ucsdet_detect(ucsd : *mut UCharsetDetector, status : *mut UErrorCode) -> *mut UCharsetMatch); - unsafe { ucsdet_detect(core::mem::transmute(ucsd), core::mem::transmute(status)) } + unsafe { ucsdet_detect(ucsd as _, status as _) } } #[inline] pub unsafe fn ucsdet_detectAll(ucsd: *mut UCharsetDetector, matchesfound: *mut i32, status: *mut UErrorCode) -> *mut *mut UCharsetMatch { windows_targets::link!("icuin.dll" "cdecl" fn ucsdet_detectAll(ucsd : *mut UCharsetDetector, matchesfound : *mut i32, status : *mut UErrorCode) -> *mut *mut UCharsetMatch); - unsafe { ucsdet_detectAll(core::mem::transmute(ucsd), core::mem::transmute(matchesfound), core::mem::transmute(status)) } + unsafe { ucsdet_detectAll(ucsd as _, matchesfound as _, status as _) } } #[inline] pub unsafe fn ucsdet_enableInputFilter(ucsd: *mut UCharsetDetector, filter: i8) -> i8 { windows_targets::link!("icuin.dll" "cdecl" fn ucsdet_enableInputFilter(ucsd : *mut UCharsetDetector, filter : i8) -> i8); - unsafe { ucsdet_enableInputFilter(core::mem::transmute(ucsd), filter) } + unsafe { ucsdet_enableInputFilter(ucsd as _, filter) } } #[inline] pub unsafe fn ucsdet_getAllDetectableCharsets(ucsd: *const UCharsetDetector, status: *mut UErrorCode) -> *mut UEnumeration { windows_targets::link!("icuin.dll" "cdecl" fn ucsdet_getAllDetectableCharsets(ucsd : *const UCharsetDetector, status : *mut UErrorCode) -> *mut UEnumeration); - unsafe { ucsdet_getAllDetectableCharsets(ucsd, core::mem::transmute(status)) } + unsafe { ucsdet_getAllDetectableCharsets(ucsd, status as _) } } #[inline] pub unsafe fn ucsdet_getConfidence(ucsm: *const UCharsetMatch, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn ucsdet_getConfidence(ucsm : *const UCharsetMatch, status : *mut UErrorCode) -> i32); - unsafe { ucsdet_getConfidence(ucsm, core::mem::transmute(status)) } + unsafe { ucsdet_getConfidence(ucsm, status as _) } } #[inline] pub unsafe fn ucsdet_getLanguage(ucsm: *const UCharsetMatch, status: *mut UErrorCode) -> windows_core::PCSTR { windows_targets::link!("icuin.dll" "cdecl" fn ucsdet_getLanguage(ucsm : *const UCharsetMatch, status : *mut UErrorCode) -> windows_core::PCSTR); - unsafe { ucsdet_getLanguage(ucsm, core::mem::transmute(status)) } + unsafe { ucsdet_getLanguage(ucsm, status as _) } } #[inline] pub unsafe fn ucsdet_getName(ucsm: *const UCharsetMatch, status: *mut UErrorCode) -> windows_core::PCSTR { windows_targets::link!("icuin.dll" "cdecl" fn ucsdet_getName(ucsm : *const UCharsetMatch, status : *mut UErrorCode) -> windows_core::PCSTR); - unsafe { ucsdet_getName(ucsm, core::mem::transmute(status)) } + unsafe { ucsdet_getName(ucsm, status as _) } } #[inline] pub unsafe fn ucsdet_getUChars(ucsm: *const UCharsetMatch, buf: *mut u16, cap: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn ucsdet_getUChars(ucsm : *const UCharsetMatch, buf : *mut u16, cap : i32, status : *mut UErrorCode) -> i32); - unsafe { ucsdet_getUChars(ucsm, core::mem::transmute(buf), cap, core::mem::transmute(status)) } + unsafe { ucsdet_getUChars(ucsm, buf as _, cap, status as _) } } #[inline] pub unsafe fn ucsdet_isInputFilterEnabled(ucsd: *const UCharsetDetector) -> i8 { @@ -3705,7 +3663,7 @@ pub unsafe fn ucsdet_isInputFilterEnabled(ucsd: *const UCharsetDetector) -> i8 { #[inline] pub unsafe fn ucsdet_open(status: *mut UErrorCode) -> *mut UCharsetDetector { windows_targets::link!("icuin.dll" "cdecl" fn ucsdet_open(status : *mut UErrorCode) -> *mut UCharsetDetector); - unsafe { ucsdet_open(core::mem::transmute(status)) } + unsafe { ucsdet_open(status as _) } } #[inline] pub unsafe fn ucsdet_setDeclaredEncoding(ucsd: *mut UCharsetDetector, encoding: P1, length: i32, status: *mut UErrorCode) @@ -3713,7 +3671,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn ucsdet_setDeclaredEncoding(ucsd : *mut UCharsetDetector, encoding : windows_core::PCSTR, length : i32, status : *mut UErrorCode)); - unsafe { ucsdet_setDeclaredEncoding(core::mem::transmute(ucsd), encoding.param().abi(), length, core::mem::transmute(status)) } + unsafe { ucsdet_setDeclaredEncoding(ucsd as _, encoding.param().abi(), length, status as _) } } #[inline] pub unsafe fn ucsdet_setText(ucsd: *mut UCharsetDetector, textin: P1, len: i32, status: *mut UErrorCode) @@ -3721,7 +3679,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn ucsdet_setText(ucsd : *mut UCharsetDetector, textin : windows_core::PCSTR, len : i32, status : *mut UErrorCode)); - unsafe { ucsdet_setText(core::mem::transmute(ucsd), textin.param().abi(), len, core::mem::transmute(status)) } + unsafe { ucsdet_setText(ucsd as _, textin.param().abi(), len, status as _) } } #[inline] pub unsafe fn ucurr_countCurrencies(locale: P0, date: f64, ec: *mut UErrorCode) -> i32 @@ -3729,7 +3687,7 @@ where P0: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucurr_countCurrencies(locale : windows_core::PCSTR, date : f64, ec : *mut UErrorCode) -> i32); - unsafe { ucurr_countCurrencies(locale.param().abi(), date, core::mem::transmute(ec)) } + unsafe { ucurr_countCurrencies(locale.param().abi(), date, ec as _) } } #[inline] pub unsafe fn ucurr_forLocale(locale: P0, buff: *mut u16, buffcapacity: i32, ec: *mut UErrorCode) -> i32 @@ -3737,7 +3695,7 @@ where P0: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucurr_forLocale(locale : windows_core::PCSTR, buff : *mut u16, buffcapacity : i32, ec : *mut UErrorCode) -> i32); - unsafe { ucurr_forLocale(locale.param().abi(), core::mem::transmute(buff), buffcapacity, core::mem::transmute(ec)) } + unsafe { ucurr_forLocale(locale.param().abi(), buff as _, buffcapacity, ec as _) } } #[inline] pub unsafe fn ucurr_forLocaleAndDate(locale: P0, date: f64, index: i32, buff: *mut u16, buffcapacity: i32, ec: *mut UErrorCode) -> i32 @@ -3745,17 +3703,17 @@ where P0: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucurr_forLocaleAndDate(locale : windows_core::PCSTR, date : f64, index : i32, buff : *mut u16, buffcapacity : i32, ec : *mut UErrorCode) -> i32); - unsafe { ucurr_forLocaleAndDate(locale.param().abi(), date, index, core::mem::transmute(buff), buffcapacity, core::mem::transmute(ec)) } + unsafe { ucurr_forLocaleAndDate(locale.param().abi(), date, index, buff as _, buffcapacity, ec as _) } } #[inline] pub unsafe fn ucurr_getDefaultFractionDigits(currency: *const u16, ec: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn ucurr_getDefaultFractionDigits(currency : *const u16, ec : *mut UErrorCode) -> i32); - unsafe { ucurr_getDefaultFractionDigits(currency, core::mem::transmute(ec)) } + unsafe { ucurr_getDefaultFractionDigits(currency, ec as _) } } #[inline] pub unsafe fn ucurr_getDefaultFractionDigitsForUsage(currency: *const u16, usage: UCurrencyUsage, ec: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn ucurr_getDefaultFractionDigitsForUsage(currency : *const u16, usage : UCurrencyUsage, ec : *mut UErrorCode) -> i32); - unsafe { ucurr_getDefaultFractionDigitsForUsage(currency, usage, core::mem::transmute(ec)) } + unsafe { ucurr_getDefaultFractionDigitsForUsage(currency, usage, ec as _) } } #[inline] pub unsafe fn ucurr_getKeywordValuesForLocale(key: P0, locale: P1, commonlyused: i8, status: *mut UErrorCode) -> *mut UEnumeration @@ -3764,7 +3722,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucurr_getKeywordValuesForLocale(key : windows_core::PCSTR, locale : windows_core::PCSTR, commonlyused : i8, status : *mut UErrorCode) -> *mut UEnumeration); - unsafe { ucurr_getKeywordValuesForLocale(key.param().abi(), locale.param().abi(), commonlyused, core::mem::transmute(status)) } + unsafe { ucurr_getKeywordValuesForLocale(key.param().abi(), locale.param().abi(), commonlyused, status as _) } } #[inline] pub unsafe fn ucurr_getName(currency: *const u16, locale: P1, namestyle: UCurrNameStyle, ischoiceformat: *mut i8, len: *mut i32, ec: *mut UErrorCode) -> *mut u16 @@ -3772,7 +3730,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucurr_getName(currency : *const u16, locale : windows_core::PCSTR, namestyle : UCurrNameStyle, ischoiceformat : *mut i8, len : *mut i32, ec : *mut UErrorCode) -> *mut u16); - unsafe { ucurr_getName(currency, locale.param().abi(), namestyle, core::mem::transmute(ischoiceformat), core::mem::transmute(len), core::mem::transmute(ec)) } + unsafe { ucurr_getName(currency, locale.param().abi(), namestyle, ischoiceformat as _, len as _, ec as _) } } #[inline] pub unsafe fn ucurr_getNumericCode(currency: *const u16) -> i32 { @@ -3786,27 +3744,27 @@ where P3: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucurr_getPluralName(currency : *const u16, locale : windows_core::PCSTR, ischoiceformat : *mut i8, pluralcount : windows_core::PCSTR, len : *mut i32, ec : *mut UErrorCode) -> *mut u16); - unsafe { ucurr_getPluralName(currency, locale.param().abi(), core::mem::transmute(ischoiceformat), pluralcount.param().abi(), core::mem::transmute(len), core::mem::transmute(ec)) } + unsafe { ucurr_getPluralName(currency, locale.param().abi(), ischoiceformat as _, pluralcount.param().abi(), len as _, ec as _) } } #[inline] pub unsafe fn ucurr_getRoundingIncrement(currency: *const u16, ec: *mut UErrorCode) -> f64 { windows_targets::link!("icuuc.dll" "cdecl" fn ucurr_getRoundingIncrement(currency : *const u16, ec : *mut UErrorCode) -> f64); - unsafe { ucurr_getRoundingIncrement(currency, core::mem::transmute(ec)) } + unsafe { ucurr_getRoundingIncrement(currency, ec as _) } } #[inline] pub unsafe fn ucurr_getRoundingIncrementForUsage(currency: *const u16, usage: UCurrencyUsage, ec: *mut UErrorCode) -> f64 { windows_targets::link!("icuuc.dll" "cdecl" fn ucurr_getRoundingIncrementForUsage(currency : *const u16, usage : UCurrencyUsage, ec : *mut UErrorCode) -> f64); - unsafe { ucurr_getRoundingIncrementForUsage(currency, usage, core::mem::transmute(ec)) } + unsafe { ucurr_getRoundingIncrementForUsage(currency, usage, ec as _) } } #[inline] pub unsafe fn ucurr_isAvailable(isocode: *const u16, from: f64, to: f64, errorcode: *mut UErrorCode) -> i8 { windows_targets::link!("icuuc.dll" "cdecl" fn ucurr_isAvailable(isocode : *const u16, from : f64, to : f64, errorcode : *mut UErrorCode) -> i8); - unsafe { ucurr_isAvailable(isocode, from, to, core::mem::transmute(errorcode)) } + unsafe { ucurr_isAvailable(isocode, from, to, errorcode as _) } } #[inline] pub unsafe fn ucurr_openISOCurrencies(currtype: u32, perrorcode: *mut UErrorCode) -> *mut UEnumeration { windows_targets::link!("icuuc.dll" "cdecl" fn ucurr_openISOCurrencies(currtype : u32, perrorcode : *mut UErrorCode) -> *mut UEnumeration); - unsafe { ucurr_openISOCurrencies(currtype, core::mem::transmute(perrorcode)) } + unsafe { ucurr_openISOCurrencies(currtype, perrorcode as _) } } #[inline] pub unsafe fn ucurr_register(isocode: *const u16, locale: P1, status: *mut UErrorCode) -> *mut core::ffi::c_void @@ -3814,37 +3772,37 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ucurr_register(isocode : *const u16, locale : windows_core::PCSTR, status : *mut UErrorCode) -> *mut core::ffi::c_void); - unsafe { ucurr_register(isocode, locale.param().abi(), core::mem::transmute(status)) } + unsafe { ucurr_register(isocode, locale.param().abi(), status as _) } } #[inline] pub unsafe fn ucurr_unregister(key: *mut core::ffi::c_void, status: *mut UErrorCode) -> i8 { windows_targets::link!("icuuc.dll" "cdecl" fn ucurr_unregister(key : *mut core::ffi::c_void, status : *mut UErrorCode) -> i8); - unsafe { ucurr_unregister(core::mem::transmute(key), core::mem::transmute(status)) } + unsafe { ucurr_unregister(key as _, status as _) } } #[inline] pub unsafe fn udat_adoptNumberFormat(fmt: *mut *mut core::ffi::c_void, numberformattoadopt: *mut *mut core::ffi::c_void) { windows_targets::link!("icuin.dll" "cdecl" fn udat_adoptNumberFormat(fmt : *mut *mut core::ffi::c_void, numberformattoadopt : *mut *mut core::ffi::c_void)); - unsafe { udat_adoptNumberFormat(core::mem::transmute(fmt), core::mem::transmute(numberformattoadopt)) } + unsafe { udat_adoptNumberFormat(fmt as _, numberformattoadopt as _) } } #[inline] pub unsafe fn udat_adoptNumberFormatForFields(fmt: *mut *mut core::ffi::c_void, fields: *const u16, numberformattoset: *mut *mut core::ffi::c_void, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn udat_adoptNumberFormatForFields(fmt : *mut *mut core::ffi::c_void, fields : *const u16, numberformattoset : *mut *mut core::ffi::c_void, status : *mut UErrorCode)); - unsafe { udat_adoptNumberFormatForFields(core::mem::transmute(fmt), fields, core::mem::transmute(numberformattoset), core::mem::transmute(status)) } + unsafe { udat_adoptNumberFormatForFields(fmt as _, fields, numberformattoset as _, status as _) } } #[inline] pub unsafe fn udat_applyPattern(format: *mut *mut core::ffi::c_void, localized: i8, pattern: *const u16, patternlength: i32) { windows_targets::link!("icuin.dll" "cdecl" fn udat_applyPattern(format : *mut *mut core::ffi::c_void, localized : i8, pattern : *const u16, patternlength : i32)); - unsafe { udat_applyPattern(core::mem::transmute(format), localized, pattern, patternlength) } + unsafe { udat_applyPattern(format as _, localized, pattern, patternlength) } } #[inline] pub unsafe fn udat_clone(fmt: *const *const core::ffi::c_void, status: *mut UErrorCode) -> *mut *mut core::ffi::c_void { windows_targets::link!("icuin.dll" "cdecl" fn udat_clone(fmt : *const *const core::ffi::c_void, status : *mut UErrorCode) -> *mut *mut core::ffi::c_void); - unsafe { udat_clone(fmt, core::mem::transmute(status)) } + unsafe { udat_clone(fmt, status as _) } } #[inline] pub unsafe fn udat_close(format: *mut *mut core::ffi::c_void) { windows_targets::link!("icuin.dll" "cdecl" fn udat_close(format : *mut *mut core::ffi::c_void)); - unsafe { udat_close(core::mem::transmute(format)) } + unsafe { udat_close(format as _) } } #[inline] pub unsafe fn udat_countAvailable() -> i32 { @@ -3859,27 +3817,27 @@ pub unsafe fn udat_countSymbols(fmt: *const *const core::ffi::c_void, r#type: UD #[inline] pub unsafe fn udat_format(format: *const *const core::ffi::c_void, datetoformat: f64, result: *mut u16, resultlength: i32, position: *mut UFieldPosition, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn udat_format(format : *const *const core::ffi::c_void, datetoformat : f64, result : *mut u16, resultlength : i32, position : *mut UFieldPosition, status : *mut UErrorCode) -> i32); - unsafe { udat_format(format, datetoformat, core::mem::transmute(result), resultlength, core::mem::transmute(position), core::mem::transmute(status)) } + unsafe { udat_format(format, datetoformat, result as _, resultlength, position as _, status as _) } } #[inline] pub unsafe fn udat_formatCalendar(format: *const *const core::ffi::c_void, calendar: *mut *mut core::ffi::c_void, result: *mut u16, capacity: i32, position: *mut UFieldPosition, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn udat_formatCalendar(format : *const *const core::ffi::c_void, calendar : *mut *mut core::ffi::c_void, result : *mut u16, capacity : i32, position : *mut UFieldPosition, status : *mut UErrorCode) -> i32); - unsafe { udat_formatCalendar(format, core::mem::transmute(calendar), core::mem::transmute(result), capacity, core::mem::transmute(position), core::mem::transmute(status)) } + unsafe { udat_formatCalendar(format, calendar as _, result as _, capacity, position as _, status as _) } } #[inline] pub unsafe fn udat_formatCalendarForFields(format: *const *const core::ffi::c_void, calendar: *mut *mut core::ffi::c_void, result: *mut u16, capacity: i32, fpositer: *mut UFieldPositionIterator, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn udat_formatCalendarForFields(format : *const *const core::ffi::c_void, calendar : *mut *mut core::ffi::c_void, result : *mut u16, capacity : i32, fpositer : *mut UFieldPositionIterator, status : *mut UErrorCode) -> i32); - unsafe { udat_formatCalendarForFields(format, core::mem::transmute(calendar), core::mem::transmute(result), capacity, core::mem::transmute(fpositer), core::mem::transmute(status)) } + unsafe { udat_formatCalendarForFields(format, calendar as _, result as _, capacity, fpositer as _, status as _) } } #[inline] pub unsafe fn udat_formatForFields(format: *const *const core::ffi::c_void, datetoformat: f64, result: *mut u16, resultlength: i32, fpositer: *mut UFieldPositionIterator, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn udat_formatForFields(format : *const *const core::ffi::c_void, datetoformat : f64, result : *mut u16, resultlength : i32, fpositer : *mut UFieldPositionIterator, status : *mut UErrorCode) -> i32); - unsafe { udat_formatForFields(format, datetoformat, core::mem::transmute(result), resultlength, core::mem::transmute(fpositer), core::mem::transmute(status)) } + unsafe { udat_formatForFields(format, datetoformat, result as _, resultlength, fpositer as _, status as _) } } #[inline] pub unsafe fn udat_get2DigitYearStart(fmt: *const *const core::ffi::c_void, status: *mut UErrorCode) -> f64 { windows_targets::link!("icuin.dll" "cdecl" fn udat_get2DigitYearStart(fmt : *const *const core::ffi::c_void, status : *mut UErrorCode) -> f64); - unsafe { udat_get2DigitYearStart(fmt, core::mem::transmute(status)) } + unsafe { udat_get2DigitYearStart(fmt, status as _) } } #[inline] pub unsafe fn udat_getAvailable(localeindex: i32) -> windows_core::PCSTR { @@ -3889,7 +3847,7 @@ pub unsafe fn udat_getAvailable(localeindex: i32) -> windows_core::PCSTR { #[inline] pub unsafe fn udat_getBooleanAttribute(fmt: *const *const core::ffi::c_void, attr: UDateFormatBooleanAttribute, status: *mut UErrorCode) -> i8 { windows_targets::link!("icuin.dll" "cdecl" fn udat_getBooleanAttribute(fmt : *const *const core::ffi::c_void, attr : UDateFormatBooleanAttribute, status : *mut UErrorCode) -> i8); - unsafe { udat_getBooleanAttribute(fmt, attr, core::mem::transmute(status)) } + unsafe { udat_getBooleanAttribute(fmt, attr, status as _) } } #[inline] pub unsafe fn udat_getCalendar(fmt: *const *const core::ffi::c_void) -> *mut *mut core::ffi::c_void { @@ -3899,12 +3857,12 @@ pub unsafe fn udat_getCalendar(fmt: *const *const core::ffi::c_void) -> *mut *mu #[inline] pub unsafe fn udat_getContext(fmt: *const *const core::ffi::c_void, r#type: UDisplayContextType, status: *mut UErrorCode) -> UDisplayContext { windows_targets::link!("icuin.dll" "cdecl" fn udat_getContext(fmt : *const *const core::ffi::c_void, r#type : UDisplayContextType, status : *mut UErrorCode) -> UDisplayContext); - unsafe { udat_getContext(fmt, r#type, core::mem::transmute(status)) } + unsafe { udat_getContext(fmt, r#type, status as _) } } #[inline] pub unsafe fn udat_getLocaleByType(fmt: *const *const core::ffi::c_void, r#type: ULocDataLocaleType, status: *mut UErrorCode) -> windows_core::PCSTR { windows_targets::link!("icuin.dll" "cdecl" fn udat_getLocaleByType(fmt : *const *const core::ffi::c_void, r#type : ULocDataLocaleType, status : *mut UErrorCode) -> windows_core::PCSTR); - unsafe { udat_getLocaleByType(fmt, r#type, core::mem::transmute(status)) } + unsafe { udat_getLocaleByType(fmt, r#type, status as _) } } #[inline] pub unsafe fn udat_getNumberFormat(fmt: *const *const core::ffi::c_void) -> *mut *mut core::ffi::c_void { @@ -3919,7 +3877,7 @@ pub unsafe fn udat_getNumberFormatForField(fmt: *const *const core::ffi::c_void, #[inline] pub unsafe fn udat_getSymbols(fmt: *const *const core::ffi::c_void, r#type: UDateFormatSymbolType, symbolindex: i32, result: *mut u16, resultlength: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn udat_getSymbols(fmt : *const *const core::ffi::c_void, r#type : UDateFormatSymbolType, symbolindex : i32, result : *mut u16, resultlength : i32, status : *mut UErrorCode) -> i32); - unsafe { udat_getSymbols(fmt, r#type, symbolindex, core::mem::transmute(result), resultlength, core::mem::transmute(status)) } + unsafe { udat_getSymbols(fmt, r#type, symbolindex, result as _, resultlength, status as _) } } #[inline] pub unsafe fn udat_isLenient(fmt: *const *const core::ffi::c_void) -> i8 { @@ -3932,52 +3890,52 @@ where P2: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn udat_open(timestyle : UDateFormatStyle, datestyle : UDateFormatStyle, locale : windows_core::PCSTR, tzid : *const u16, tzidlength : i32, pattern : *const u16, patternlength : i32, status : *mut UErrorCode) -> *mut *mut core::ffi::c_void); - unsafe { udat_open(timestyle, datestyle, locale.param().abi(), tzid, tzidlength, pattern, patternlength, core::mem::transmute(status)) } + unsafe { udat_open(timestyle, datestyle, locale.param().abi(), tzid, tzidlength, pattern, patternlength, status as _) } } #[inline] pub unsafe fn udat_parse(format: *const *const core::ffi::c_void, text: *const u16, textlength: i32, parsepos: *mut i32, status: *mut UErrorCode) -> f64 { windows_targets::link!("icuin.dll" "cdecl" fn udat_parse(format : *const *const core::ffi::c_void, text : *const u16, textlength : i32, parsepos : *mut i32, status : *mut UErrorCode) -> f64); - unsafe { udat_parse(format, text, textlength, core::mem::transmute(parsepos), core::mem::transmute(status)) } + unsafe { udat_parse(format, text, textlength, parsepos as _, status as _) } } #[inline] pub unsafe fn udat_parseCalendar(format: *const *const core::ffi::c_void, calendar: *mut *mut core::ffi::c_void, text: *const u16, textlength: i32, parsepos: *mut i32, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn udat_parseCalendar(format : *const *const core::ffi::c_void, calendar : *mut *mut core::ffi::c_void, text : *const u16, textlength : i32, parsepos : *mut i32, status : *mut UErrorCode)); - unsafe { udat_parseCalendar(format, core::mem::transmute(calendar), text, textlength, core::mem::transmute(parsepos), core::mem::transmute(status)) } + unsafe { udat_parseCalendar(format, calendar as _, text, textlength, parsepos as _, status as _) } } #[inline] pub unsafe fn udat_set2DigitYearStart(fmt: *mut *mut core::ffi::c_void, d: f64, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn udat_set2DigitYearStart(fmt : *mut *mut core::ffi::c_void, d : f64, status : *mut UErrorCode)); - unsafe { udat_set2DigitYearStart(core::mem::transmute(fmt), d, core::mem::transmute(status)) } + unsafe { udat_set2DigitYearStart(fmt as _, d, status as _) } } #[inline] pub unsafe fn udat_setBooleanAttribute(fmt: *mut *mut core::ffi::c_void, attr: UDateFormatBooleanAttribute, newvalue: i8, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn udat_setBooleanAttribute(fmt : *mut *mut core::ffi::c_void, attr : UDateFormatBooleanAttribute, newvalue : i8, status : *mut UErrorCode)); - unsafe { udat_setBooleanAttribute(core::mem::transmute(fmt), attr, newvalue, core::mem::transmute(status)) } + unsafe { udat_setBooleanAttribute(fmt as _, attr, newvalue, status as _) } } #[inline] pub unsafe fn udat_setCalendar(fmt: *mut *mut core::ffi::c_void, calendartoset: *const *const core::ffi::c_void) { windows_targets::link!("icuin.dll" "cdecl" fn udat_setCalendar(fmt : *mut *mut core::ffi::c_void, calendartoset : *const *const core::ffi::c_void)); - unsafe { udat_setCalendar(core::mem::transmute(fmt), calendartoset) } + unsafe { udat_setCalendar(fmt as _, calendartoset) } } #[inline] pub unsafe fn udat_setContext(fmt: *mut *mut core::ffi::c_void, value: UDisplayContext, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn udat_setContext(fmt : *mut *mut core::ffi::c_void, value : UDisplayContext, status : *mut UErrorCode)); - unsafe { udat_setContext(core::mem::transmute(fmt), value, core::mem::transmute(status)) } + unsafe { udat_setContext(fmt as _, value, status as _) } } #[inline] pub unsafe fn udat_setLenient(fmt: *mut *mut core::ffi::c_void, islenient: i8) { windows_targets::link!("icuin.dll" "cdecl" fn udat_setLenient(fmt : *mut *mut core::ffi::c_void, islenient : i8)); - unsafe { udat_setLenient(core::mem::transmute(fmt), islenient) } + unsafe { udat_setLenient(fmt as _, islenient) } } #[inline] pub unsafe fn udat_setNumberFormat(fmt: *mut *mut core::ffi::c_void, numberformattoset: *const *const core::ffi::c_void) { windows_targets::link!("icuin.dll" "cdecl" fn udat_setNumberFormat(fmt : *mut *mut core::ffi::c_void, numberformattoset : *const *const core::ffi::c_void)); - unsafe { udat_setNumberFormat(core::mem::transmute(fmt), numberformattoset) } + unsafe { udat_setNumberFormat(fmt as _, numberformattoset) } } #[inline] pub unsafe fn udat_setSymbols(format: *mut *mut core::ffi::c_void, r#type: UDateFormatSymbolType, symbolindex: i32, value: *mut u16, valuelength: i32, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn udat_setSymbols(format : *mut *mut core::ffi::c_void, r#type : UDateFormatSymbolType, symbolindex : i32, value : *mut u16, valuelength : i32, status : *mut UErrorCode)); - unsafe { udat_setSymbols(core::mem::transmute(format), r#type, symbolindex, core::mem::transmute(value), valuelength, core::mem::transmute(status)) } + unsafe { udat_setSymbols(format as _, r#type, symbolindex, value as _, valuelength, status as _) } } #[inline] pub unsafe fn udat_toCalendarDateField(field: UDateFormatField) -> UCalendarDateFields { @@ -3987,72 +3945,72 @@ pub unsafe fn udat_toCalendarDateField(field: UDateFormatField) -> UCalendarDate #[inline] pub unsafe fn udat_toPattern(fmt: *const *const core::ffi::c_void, localized: i8, result: *mut u16, resultlength: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn udat_toPattern(fmt : *const *const core::ffi::c_void, localized : i8, result : *mut u16, resultlength : i32, status : *mut UErrorCode) -> i32); - unsafe { udat_toPattern(fmt, localized, core::mem::transmute(result), resultlength, core::mem::transmute(status)) } + unsafe { udat_toPattern(fmt, localized, result as _, resultlength, status as _) } } #[inline] pub unsafe fn udatpg_addPattern(dtpg: *mut *mut core::ffi::c_void, pattern: *const u16, patternlength: i32, r#override: i8, conflictingpattern: *mut u16, capacity: i32, plength: *mut i32, perrorcode: *mut UErrorCode) -> UDateTimePatternConflict { windows_targets::link!("icuin.dll" "cdecl" fn udatpg_addPattern(dtpg : *mut *mut core::ffi::c_void, pattern : *const u16, patternlength : i32, r#override : i8, conflictingpattern : *mut u16, capacity : i32, plength : *mut i32, perrorcode : *mut UErrorCode) -> UDateTimePatternConflict); - unsafe { udatpg_addPattern(core::mem::transmute(dtpg), pattern, patternlength, r#override, core::mem::transmute(conflictingpattern), capacity, core::mem::transmute(plength), core::mem::transmute(perrorcode)) } + unsafe { udatpg_addPattern(dtpg as _, pattern, patternlength, r#override, conflictingpattern as _, capacity, plength as _, perrorcode as _) } } #[inline] pub unsafe fn udatpg_clone(dtpg: *const *const core::ffi::c_void, perrorcode: *mut UErrorCode) -> *mut *mut core::ffi::c_void { windows_targets::link!("icuin.dll" "cdecl" fn udatpg_clone(dtpg : *const *const core::ffi::c_void, perrorcode : *mut UErrorCode) -> *mut *mut core::ffi::c_void); - unsafe { udatpg_clone(dtpg, core::mem::transmute(perrorcode)) } + unsafe { udatpg_clone(dtpg, perrorcode as _) } } #[inline] pub unsafe fn udatpg_close(dtpg: *mut *mut core::ffi::c_void) { windows_targets::link!("icuin.dll" "cdecl" fn udatpg_close(dtpg : *mut *mut core::ffi::c_void)); - unsafe { udatpg_close(core::mem::transmute(dtpg)) } + unsafe { udatpg_close(dtpg as _) } } #[inline] pub unsafe fn udatpg_getAppendItemFormat(dtpg: *const *const core::ffi::c_void, field: UDateTimePatternField, plength: *mut i32) -> *mut u16 { windows_targets::link!("icuin.dll" "cdecl" fn udatpg_getAppendItemFormat(dtpg : *const *const core::ffi::c_void, field : UDateTimePatternField, plength : *mut i32) -> *mut u16); - unsafe { udatpg_getAppendItemFormat(dtpg, field, core::mem::transmute(plength)) } + unsafe { udatpg_getAppendItemFormat(dtpg, field, plength as _) } } #[inline] pub unsafe fn udatpg_getAppendItemName(dtpg: *const *const core::ffi::c_void, field: UDateTimePatternField, plength: *mut i32) -> *mut u16 { windows_targets::link!("icuin.dll" "cdecl" fn udatpg_getAppendItemName(dtpg : *const *const core::ffi::c_void, field : UDateTimePatternField, plength : *mut i32) -> *mut u16); - unsafe { udatpg_getAppendItemName(dtpg, field, core::mem::transmute(plength)) } + unsafe { udatpg_getAppendItemName(dtpg, field, plength as _) } } #[inline] pub unsafe fn udatpg_getBaseSkeleton(unuseddtpg: *mut *mut core::ffi::c_void, pattern: *const u16, length: i32, baseskeleton: *mut u16, capacity: i32, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn udatpg_getBaseSkeleton(unuseddtpg : *mut *mut core::ffi::c_void, pattern : *const u16, length : i32, baseskeleton : *mut u16, capacity : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { udatpg_getBaseSkeleton(core::mem::transmute(unuseddtpg), pattern, length, core::mem::transmute(baseskeleton), capacity, core::mem::transmute(perrorcode)) } + unsafe { udatpg_getBaseSkeleton(unuseddtpg as _, pattern, length, baseskeleton as _, capacity, perrorcode as _) } } #[inline] pub unsafe fn udatpg_getBestPattern(dtpg: *mut *mut core::ffi::c_void, skeleton: *const u16, length: i32, bestpattern: *mut u16, capacity: i32, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn udatpg_getBestPattern(dtpg : *mut *mut core::ffi::c_void, skeleton : *const u16, length : i32, bestpattern : *mut u16, capacity : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { udatpg_getBestPattern(core::mem::transmute(dtpg), skeleton, length, core::mem::transmute(bestpattern), capacity, core::mem::transmute(perrorcode)) } + unsafe { udatpg_getBestPattern(dtpg as _, skeleton, length, bestpattern as _, capacity, perrorcode as _) } } #[inline] pub unsafe fn udatpg_getBestPatternWithOptions(dtpg: *mut *mut core::ffi::c_void, skeleton: *const u16, length: i32, options: UDateTimePatternMatchOptions, bestpattern: *mut u16, capacity: i32, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn udatpg_getBestPatternWithOptions(dtpg : *mut *mut core::ffi::c_void, skeleton : *const u16, length : i32, options : UDateTimePatternMatchOptions, bestpattern : *mut u16, capacity : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { udatpg_getBestPatternWithOptions(core::mem::transmute(dtpg), skeleton, length, options, core::mem::transmute(bestpattern), capacity, core::mem::transmute(perrorcode)) } + unsafe { udatpg_getBestPatternWithOptions(dtpg as _, skeleton, length, options, bestpattern as _, capacity, perrorcode as _) } } #[inline] pub unsafe fn udatpg_getDateTimeFormat(dtpg: *const *const core::ffi::c_void, plength: *mut i32) -> *mut u16 { windows_targets::link!("icuin.dll" "cdecl" fn udatpg_getDateTimeFormat(dtpg : *const *const core::ffi::c_void, plength : *mut i32) -> *mut u16); - unsafe { udatpg_getDateTimeFormat(dtpg, core::mem::transmute(plength)) } + unsafe { udatpg_getDateTimeFormat(dtpg, plength as _) } } #[inline] pub unsafe fn udatpg_getDecimal(dtpg: *const *const core::ffi::c_void, plength: *mut i32) -> *mut u16 { windows_targets::link!("icuin.dll" "cdecl" fn udatpg_getDecimal(dtpg : *const *const core::ffi::c_void, plength : *mut i32) -> *mut u16); - unsafe { udatpg_getDecimal(dtpg, core::mem::transmute(plength)) } + unsafe { udatpg_getDecimal(dtpg, plength as _) } } #[inline] pub unsafe fn udatpg_getFieldDisplayName(dtpg: *const *const core::ffi::c_void, field: UDateTimePatternField, width: UDateTimePGDisplayWidth, fieldname: *mut u16, capacity: i32, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icu.dll" "cdecl" fn udatpg_getFieldDisplayName(dtpg : *const *const core::ffi::c_void, field : UDateTimePatternField, width : UDateTimePGDisplayWidth, fieldname : *mut u16, capacity : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { udatpg_getFieldDisplayName(dtpg, field, width, core::mem::transmute(fieldname), capacity, core::mem::transmute(perrorcode)) } + unsafe { udatpg_getFieldDisplayName(dtpg, field, width, fieldname as _, capacity, perrorcode as _) } } #[inline] pub unsafe fn udatpg_getPatternForSkeleton(dtpg: *const *const core::ffi::c_void, skeleton: *const u16, skeletonlength: i32, plength: *mut i32) -> *mut u16 { windows_targets::link!("icuin.dll" "cdecl" fn udatpg_getPatternForSkeleton(dtpg : *const *const core::ffi::c_void, skeleton : *const u16, skeletonlength : i32, plength : *mut i32) -> *mut u16); - unsafe { udatpg_getPatternForSkeleton(dtpg, skeleton, skeletonlength, core::mem::transmute(plength)) } + unsafe { udatpg_getPatternForSkeleton(dtpg, skeleton, skeletonlength, plength as _) } } #[inline] pub unsafe fn udatpg_getSkeleton(unuseddtpg: *mut *mut core::ffi::c_void, pattern: *const u16, length: i32, skeleton: *mut u16, capacity: i32, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn udatpg_getSkeleton(unuseddtpg : *mut *mut core::ffi::c_void, pattern : *const u16, length : i32, skeleton : *mut u16, capacity : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { udatpg_getSkeleton(core::mem::transmute(unuseddtpg), pattern, length, core::mem::transmute(skeleton), capacity, core::mem::transmute(perrorcode)) } + unsafe { udatpg_getSkeleton(unuseddtpg as _, pattern, length, skeleton as _, capacity, perrorcode as _) } } #[inline] pub unsafe fn udatpg_open(locale: P0, perrorcode: *mut UErrorCode) -> *mut *mut core::ffi::c_void @@ -4060,42 +4018,42 @@ where P0: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn udatpg_open(locale : windows_core::PCSTR, perrorcode : *mut UErrorCode) -> *mut *mut core::ffi::c_void); - unsafe { udatpg_open(locale.param().abi(), core::mem::transmute(perrorcode)) } + unsafe { udatpg_open(locale.param().abi(), perrorcode as _) } } #[inline] pub unsafe fn udatpg_openBaseSkeletons(dtpg: *const *const core::ffi::c_void, perrorcode: *mut UErrorCode) -> *mut UEnumeration { windows_targets::link!("icuin.dll" "cdecl" fn udatpg_openBaseSkeletons(dtpg : *const *const core::ffi::c_void, perrorcode : *mut UErrorCode) -> *mut UEnumeration); - unsafe { udatpg_openBaseSkeletons(dtpg, core::mem::transmute(perrorcode)) } + unsafe { udatpg_openBaseSkeletons(dtpg, perrorcode as _) } } #[inline] pub unsafe fn udatpg_openEmpty(perrorcode: *mut UErrorCode) -> *mut *mut core::ffi::c_void { windows_targets::link!("icuin.dll" "cdecl" fn udatpg_openEmpty(perrorcode : *mut UErrorCode) -> *mut *mut core::ffi::c_void); - unsafe { udatpg_openEmpty(core::mem::transmute(perrorcode)) } + unsafe { udatpg_openEmpty(perrorcode as _) } } #[inline] pub unsafe fn udatpg_openSkeletons(dtpg: *const *const core::ffi::c_void, perrorcode: *mut UErrorCode) -> *mut UEnumeration { windows_targets::link!("icuin.dll" "cdecl" fn udatpg_openSkeletons(dtpg : *const *const core::ffi::c_void, perrorcode : *mut UErrorCode) -> *mut UEnumeration); - unsafe { udatpg_openSkeletons(dtpg, core::mem::transmute(perrorcode)) } + unsafe { udatpg_openSkeletons(dtpg, perrorcode as _) } } #[inline] pub unsafe fn udatpg_replaceFieldTypes(dtpg: *mut *mut core::ffi::c_void, pattern: *const u16, patternlength: i32, skeleton: *const u16, skeletonlength: i32, dest: *mut u16, destcapacity: i32, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn udatpg_replaceFieldTypes(dtpg : *mut *mut core::ffi::c_void, pattern : *const u16, patternlength : i32, skeleton : *const u16, skeletonlength : i32, dest : *mut u16, destcapacity : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { udatpg_replaceFieldTypes(core::mem::transmute(dtpg), pattern, patternlength, skeleton, skeletonlength, core::mem::transmute(dest), destcapacity, core::mem::transmute(perrorcode)) } + unsafe { udatpg_replaceFieldTypes(dtpg as _, pattern, patternlength, skeleton, skeletonlength, dest as _, destcapacity, perrorcode as _) } } #[inline] pub unsafe fn udatpg_replaceFieldTypesWithOptions(dtpg: *mut *mut core::ffi::c_void, pattern: *const u16, patternlength: i32, skeleton: *const u16, skeletonlength: i32, options: UDateTimePatternMatchOptions, dest: *mut u16, destcapacity: i32, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn udatpg_replaceFieldTypesWithOptions(dtpg : *mut *mut core::ffi::c_void, pattern : *const u16, patternlength : i32, skeleton : *const u16, skeletonlength : i32, options : UDateTimePatternMatchOptions, dest : *mut u16, destcapacity : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { udatpg_replaceFieldTypesWithOptions(core::mem::transmute(dtpg), pattern, patternlength, skeleton, skeletonlength, options, core::mem::transmute(dest), destcapacity, core::mem::transmute(perrorcode)) } + unsafe { udatpg_replaceFieldTypesWithOptions(dtpg as _, pattern, patternlength, skeleton, skeletonlength, options, dest as _, destcapacity, perrorcode as _) } } #[inline] pub unsafe fn udatpg_setAppendItemFormat(dtpg: *mut *mut core::ffi::c_void, field: UDateTimePatternField, value: *const u16, length: i32) { windows_targets::link!("icuin.dll" "cdecl" fn udatpg_setAppendItemFormat(dtpg : *mut *mut core::ffi::c_void, field : UDateTimePatternField, value : *const u16, length : i32)); - unsafe { udatpg_setAppendItemFormat(core::mem::transmute(dtpg), field, value, length) } + unsafe { udatpg_setAppendItemFormat(dtpg as _, field, value, length) } } #[inline] pub unsafe fn udatpg_setAppendItemName(dtpg: *mut *mut core::ffi::c_void, field: UDateTimePatternField, value: *const u16, length: i32) { windows_targets::link!("icuin.dll" "cdecl" fn udatpg_setAppendItemName(dtpg : *mut *mut core::ffi::c_void, field : UDateTimePatternField, value : *const u16, length : i32)); - unsafe { udatpg_setAppendItemName(core::mem::transmute(dtpg), field, value, length) } + unsafe { udatpg_setAppendItemName(dtpg as _, field, value, length) } } #[inline] pub unsafe fn udatpg_setDateTimeFormat(dtpg: *const *const core::ffi::c_void, dtformat: *const u16, length: i32) { @@ -4105,22 +4063,22 @@ pub unsafe fn udatpg_setDateTimeFormat(dtpg: *const *const core::ffi::c_void, dt #[inline] pub unsafe fn udatpg_setDecimal(dtpg: *mut *mut core::ffi::c_void, decimal: *const u16, length: i32) { windows_targets::link!("icuin.dll" "cdecl" fn udatpg_setDecimal(dtpg : *mut *mut core::ffi::c_void, decimal : *const u16, length : i32)); - unsafe { udatpg_setDecimal(core::mem::transmute(dtpg), decimal, length) } + unsafe { udatpg_setDecimal(dtpg as _, decimal, length) } } #[inline] pub unsafe fn udtitvfmt_close(formatter: *mut UDateIntervalFormat) { windows_targets::link!("icuin.dll" "cdecl" fn udtitvfmt_close(formatter : *mut UDateIntervalFormat)); - unsafe { udtitvfmt_close(core::mem::transmute(formatter)) } + unsafe { udtitvfmt_close(formatter as _) } } #[inline] pub unsafe fn udtitvfmt_closeResult(uresult: *mut UFormattedDateInterval) { windows_targets::link!("icu.dll" "cdecl" fn udtitvfmt_closeResult(uresult : *mut UFormattedDateInterval)); - unsafe { udtitvfmt_closeResult(core::mem::transmute(uresult)) } + unsafe { udtitvfmt_closeResult(uresult as _) } } #[inline] pub unsafe fn udtitvfmt_format(formatter: *const UDateIntervalFormat, fromdate: f64, todate: f64, result: *mut u16, resultcapacity: i32, position: *mut UFieldPosition, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn udtitvfmt_format(formatter : *const UDateIntervalFormat, fromdate : f64, todate : f64, result : *mut u16, resultcapacity : i32, position : *mut UFieldPosition, status : *mut UErrorCode) -> i32); - unsafe { udtitvfmt_format(formatter, fromdate, todate, core::mem::transmute(result), resultcapacity, core::mem::transmute(position), core::mem::transmute(status)) } + unsafe { udtitvfmt_format(formatter, fromdate, todate, result as _, resultcapacity, position as _, status as _) } } #[inline] pub unsafe fn udtitvfmt_open(locale: P0, skeleton: *const u16, skeletonlength: i32, tzid: *const u16, tzidlength: i32, status: *mut UErrorCode) -> *mut UDateIntervalFormat @@ -4128,122 +4086,122 @@ where P0: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn udtitvfmt_open(locale : windows_core::PCSTR, skeleton : *const u16, skeletonlength : i32, tzid : *const u16, tzidlength : i32, status : *mut UErrorCode) -> *mut UDateIntervalFormat); - unsafe { udtitvfmt_open(locale.param().abi(), skeleton, skeletonlength, tzid, tzidlength, core::mem::transmute(status)) } + unsafe { udtitvfmt_open(locale.param().abi(), skeleton, skeletonlength, tzid, tzidlength, status as _) } } #[inline] pub unsafe fn udtitvfmt_openResult(ec: *mut UErrorCode) -> *mut UFormattedDateInterval { windows_targets::link!("icu.dll" "cdecl" fn udtitvfmt_openResult(ec : *mut UErrorCode) -> *mut UFormattedDateInterval); - unsafe { udtitvfmt_openResult(core::mem::transmute(ec)) } + unsafe { udtitvfmt_openResult(ec as _) } } #[inline] pub unsafe fn udtitvfmt_resultAsValue(uresult: *const UFormattedDateInterval, ec: *mut UErrorCode) -> *mut UFormattedValue { windows_targets::link!("icu.dll" "cdecl" fn udtitvfmt_resultAsValue(uresult : *const UFormattedDateInterval, ec : *mut UErrorCode) -> *mut UFormattedValue); - unsafe { udtitvfmt_resultAsValue(uresult, core::mem::transmute(ec)) } + unsafe { udtitvfmt_resultAsValue(uresult, ec as _) } } #[inline] pub unsafe fn uenum_close(en: *mut UEnumeration) { windows_targets::link!("icuuc.dll" "cdecl" fn uenum_close(en : *mut UEnumeration)); - unsafe { uenum_close(core::mem::transmute(en)) } + unsafe { uenum_close(en as _) } } #[inline] pub unsafe fn uenum_count(en: *mut UEnumeration, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn uenum_count(en : *mut UEnumeration, status : *mut UErrorCode) -> i32); - unsafe { uenum_count(core::mem::transmute(en), core::mem::transmute(status)) } + unsafe { uenum_count(en as _, status as _) } } #[inline] pub unsafe fn uenum_next(en: *mut UEnumeration, resultlength: *mut i32, status: *mut UErrorCode) -> windows_core::PCSTR { windows_targets::link!("icuuc.dll" "cdecl" fn uenum_next(en : *mut UEnumeration, resultlength : *mut i32, status : *mut UErrorCode) -> windows_core::PCSTR); - unsafe { uenum_next(core::mem::transmute(en), core::mem::transmute(resultlength), core::mem::transmute(status)) } + unsafe { uenum_next(en as _, resultlength as _, status as _) } } #[inline] pub unsafe fn uenum_openCharStringsEnumeration(strings: *const *const i8, count: i32, ec: *mut UErrorCode) -> *mut UEnumeration { windows_targets::link!("icuuc.dll" "cdecl" fn uenum_openCharStringsEnumeration(strings : *const *const i8, count : i32, ec : *mut UErrorCode) -> *mut UEnumeration); - unsafe { uenum_openCharStringsEnumeration(strings, count, core::mem::transmute(ec)) } + unsafe { uenum_openCharStringsEnumeration(strings, count, ec as _) } } #[inline] pub unsafe fn uenum_openUCharStringsEnumeration(strings: *const *const u16, count: i32, ec: *mut UErrorCode) -> *mut UEnumeration { windows_targets::link!("icuuc.dll" "cdecl" fn uenum_openUCharStringsEnumeration(strings : *const *const u16, count : i32, ec : *mut UErrorCode) -> *mut UEnumeration); - unsafe { uenum_openUCharStringsEnumeration(strings, count, core::mem::transmute(ec)) } + unsafe { uenum_openUCharStringsEnumeration(strings, count, ec as _) } } #[inline] pub unsafe fn uenum_reset(en: *mut UEnumeration, status: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn uenum_reset(en : *mut UEnumeration, status : *mut UErrorCode)); - unsafe { uenum_reset(core::mem::transmute(en), core::mem::transmute(status)) } + unsafe { uenum_reset(en as _, status as _) } } #[inline] pub unsafe fn uenum_unext(en: *mut UEnumeration, resultlength: *mut i32, status: *mut UErrorCode) -> *mut u16 { windows_targets::link!("icuuc.dll" "cdecl" fn uenum_unext(en : *mut UEnumeration, resultlength : *mut i32, status : *mut UErrorCode) -> *mut u16); - unsafe { uenum_unext(core::mem::transmute(en), core::mem::transmute(resultlength), core::mem::transmute(status)) } + unsafe { uenum_unext(en as _, resultlength as _, status as _) } } #[inline] pub unsafe fn ufieldpositer_close(fpositer: *mut UFieldPositionIterator) { windows_targets::link!("icuin.dll" "cdecl" fn ufieldpositer_close(fpositer : *mut UFieldPositionIterator)); - unsafe { ufieldpositer_close(core::mem::transmute(fpositer)) } + unsafe { ufieldpositer_close(fpositer as _) } } #[inline] pub unsafe fn ufieldpositer_next(fpositer: *mut UFieldPositionIterator, beginindex: *mut i32, endindex: *mut i32) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn ufieldpositer_next(fpositer : *mut UFieldPositionIterator, beginindex : *mut i32, endindex : *mut i32) -> i32); - unsafe { ufieldpositer_next(core::mem::transmute(fpositer), core::mem::transmute(beginindex), core::mem::transmute(endindex)) } + unsafe { ufieldpositer_next(fpositer as _, beginindex as _, endindex as _) } } #[inline] pub unsafe fn ufieldpositer_open(status: *mut UErrorCode) -> *mut UFieldPositionIterator { windows_targets::link!("icuin.dll" "cdecl" fn ufieldpositer_open(status : *mut UErrorCode) -> *mut UFieldPositionIterator); - unsafe { ufieldpositer_open(core::mem::transmute(status)) } + unsafe { ufieldpositer_open(status as _) } } #[inline] pub unsafe fn ufmt_close(fmt: *mut *mut core::ffi::c_void) { windows_targets::link!("icuin.dll" "cdecl" fn ufmt_close(fmt : *mut *mut core::ffi::c_void)); - unsafe { ufmt_close(core::mem::transmute(fmt)) } + unsafe { ufmt_close(fmt as _) } } #[inline] pub unsafe fn ufmt_getArrayItemByIndex(fmt: *mut *mut core::ffi::c_void, n: i32, status: *mut UErrorCode) -> *mut *mut core::ffi::c_void { windows_targets::link!("icuin.dll" "cdecl" fn ufmt_getArrayItemByIndex(fmt : *mut *mut core::ffi::c_void, n : i32, status : *mut UErrorCode) -> *mut *mut core::ffi::c_void); - unsafe { ufmt_getArrayItemByIndex(core::mem::transmute(fmt), n, core::mem::transmute(status)) } + unsafe { ufmt_getArrayItemByIndex(fmt as _, n, status as _) } } #[inline] pub unsafe fn ufmt_getArrayLength(fmt: *const *const core::ffi::c_void, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn ufmt_getArrayLength(fmt : *const *const core::ffi::c_void, status : *mut UErrorCode) -> i32); - unsafe { ufmt_getArrayLength(fmt, core::mem::transmute(status)) } + unsafe { ufmt_getArrayLength(fmt, status as _) } } #[inline] pub unsafe fn ufmt_getDate(fmt: *const *const core::ffi::c_void, status: *mut UErrorCode) -> f64 { windows_targets::link!("icuin.dll" "cdecl" fn ufmt_getDate(fmt : *const *const core::ffi::c_void, status : *mut UErrorCode) -> f64); - unsafe { ufmt_getDate(fmt, core::mem::transmute(status)) } + unsafe { ufmt_getDate(fmt, status as _) } } #[inline] pub unsafe fn ufmt_getDecNumChars(fmt: *mut *mut core::ffi::c_void, len: *mut i32, status: *mut UErrorCode) -> windows_core::PCSTR { windows_targets::link!("icuin.dll" "cdecl" fn ufmt_getDecNumChars(fmt : *mut *mut core::ffi::c_void, len : *mut i32, status : *mut UErrorCode) -> windows_core::PCSTR); - unsafe { ufmt_getDecNumChars(core::mem::transmute(fmt), core::mem::transmute(len), core::mem::transmute(status)) } + unsafe { ufmt_getDecNumChars(fmt as _, len as _, status as _) } } #[inline] pub unsafe fn ufmt_getDouble(fmt: *mut *mut core::ffi::c_void, status: *mut UErrorCode) -> f64 { windows_targets::link!("icuin.dll" "cdecl" fn ufmt_getDouble(fmt : *mut *mut core::ffi::c_void, status : *mut UErrorCode) -> f64); - unsafe { ufmt_getDouble(core::mem::transmute(fmt), core::mem::transmute(status)) } + unsafe { ufmt_getDouble(fmt as _, status as _) } } #[inline] pub unsafe fn ufmt_getInt64(fmt: *mut *mut core::ffi::c_void, status: *mut UErrorCode) -> i64 { windows_targets::link!("icuin.dll" "cdecl" fn ufmt_getInt64(fmt : *mut *mut core::ffi::c_void, status : *mut UErrorCode) -> i64); - unsafe { ufmt_getInt64(core::mem::transmute(fmt), core::mem::transmute(status)) } + unsafe { ufmt_getInt64(fmt as _, status as _) } } #[inline] pub unsafe fn ufmt_getLong(fmt: *mut *mut core::ffi::c_void, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn ufmt_getLong(fmt : *mut *mut core::ffi::c_void, status : *mut UErrorCode) -> i32); - unsafe { ufmt_getLong(core::mem::transmute(fmt), core::mem::transmute(status)) } + unsafe { ufmt_getLong(fmt as _, status as _) } } #[inline] pub unsafe fn ufmt_getObject(fmt: *const *const core::ffi::c_void, status: *mut UErrorCode) -> *mut core::ffi::c_void { windows_targets::link!("icuin.dll" "cdecl" fn ufmt_getObject(fmt : *const *const core::ffi::c_void, status : *mut UErrorCode) -> *mut core::ffi::c_void); - unsafe { ufmt_getObject(fmt, core::mem::transmute(status)) } + unsafe { ufmt_getObject(fmt, status as _) } } #[inline] pub unsafe fn ufmt_getType(fmt: *const *const core::ffi::c_void, status: *mut UErrorCode) -> UFormattableType { windows_targets::link!("icuin.dll" "cdecl" fn ufmt_getType(fmt : *const *const core::ffi::c_void, status : *mut UErrorCode) -> UFormattableType); - unsafe { ufmt_getType(fmt, core::mem::transmute(status)) } + unsafe { ufmt_getType(fmt, status as _) } } #[inline] pub unsafe fn ufmt_getUChars(fmt: *mut *mut core::ffi::c_void, len: *mut i32, status: *mut UErrorCode) -> *mut u16 { windows_targets::link!("icuin.dll" "cdecl" fn ufmt_getUChars(fmt : *mut *mut core::ffi::c_void, len : *mut i32, status : *mut UErrorCode) -> *mut u16); - unsafe { ufmt_getUChars(core::mem::transmute(fmt), core::mem::transmute(len), core::mem::transmute(status)) } + unsafe { ufmt_getUChars(fmt as _, len as _, status as _) } } #[inline] pub unsafe fn ufmt_isNumeric(fmt: *const *const core::ffi::c_void) -> i8 { @@ -4253,17 +4211,17 @@ pub unsafe fn ufmt_isNumeric(fmt: *const *const core::ffi::c_void) -> i8 { #[inline] pub unsafe fn ufmt_open(status: *mut UErrorCode) -> *mut *mut core::ffi::c_void { windows_targets::link!("icuin.dll" "cdecl" fn ufmt_open(status : *mut UErrorCode) -> *mut *mut core::ffi::c_void); - unsafe { ufmt_open(core::mem::transmute(status)) } + unsafe { ufmt_open(status as _) } } #[inline] pub unsafe fn ufmtval_getString(ufmtval: *const UFormattedValue, plength: *mut i32, ec: *mut UErrorCode) -> *mut u16 { windows_targets::link!("icu.dll" "cdecl" fn ufmtval_getString(ufmtval : *const UFormattedValue, plength : *mut i32, ec : *mut UErrorCode) -> *mut u16); - unsafe { ufmtval_getString(ufmtval, core::mem::transmute(plength), core::mem::transmute(ec)) } + unsafe { ufmtval_getString(ufmtval, plength as _, ec as _) } } #[inline] pub unsafe fn ufmtval_nextPosition(ufmtval: *const UFormattedValue, ucfpos: *mut UConstrainedFieldPosition, ec: *mut UErrorCode) -> i8 { windows_targets::link!("icu.dll" "cdecl" fn ufmtval_nextPosition(ufmtval : *const UFormattedValue, ucfpos : *mut UConstrainedFieldPosition, ec : *mut UErrorCode) -> i8); - unsafe { ufmtval_nextPosition(ufmtval, core::mem::transmute(ucfpos), core::mem::transmute(ec)) } + unsafe { ufmtval_nextPosition(ufmtval, ucfpos as _, ec as _) } } #[inline] pub unsafe fn ugender_getInstance(locale: P0, status: *mut UErrorCode) -> *mut UGenderInfo @@ -4271,22 +4229,22 @@ where P0: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn ugender_getInstance(locale : windows_core::PCSTR, status : *mut UErrorCode) -> *mut UGenderInfo); - unsafe { ugender_getInstance(locale.param().abi(), core::mem::transmute(status)) } + unsafe { ugender_getInstance(locale.param().abi(), status as _) } } #[inline] pub unsafe fn ugender_getListGender(genderinfo: *const UGenderInfo, genders: *const UGender, size: i32, status: *mut UErrorCode) -> UGender { windows_targets::link!("icuin.dll" "cdecl" fn ugender_getListGender(genderinfo : *const UGenderInfo, genders : *const UGender, size : i32, status : *mut UErrorCode) -> UGender); - unsafe { ugender_getListGender(genderinfo, genders, size, core::mem::transmute(status)) } + unsafe { ugender_getListGender(genderinfo, genders, size, status as _) } } #[inline] pub unsafe fn uidna_close(idna: *mut UIDNA) { windows_targets::link!("icuuc.dll" "cdecl" fn uidna_close(idna : *mut UIDNA)); - unsafe { uidna_close(core::mem::transmute(idna)) } + unsafe { uidna_close(idna as _) } } #[inline] pub unsafe fn uidna_labelToASCII(idna: *const UIDNA, label: *const u16, length: i32, dest: *mut u16, capacity: i32, pinfo: *mut UIDNAInfo, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn uidna_labelToASCII(idna : *const UIDNA, label : *const u16, length : i32, dest : *mut u16, capacity : i32, pinfo : *mut UIDNAInfo, perrorcode : *mut UErrorCode) -> i32); - unsafe { uidna_labelToASCII(idna, label, length, core::mem::transmute(dest), capacity, core::mem::transmute(pinfo), core::mem::transmute(perrorcode)) } + unsafe { uidna_labelToASCII(idna, label, length, dest as _, capacity, pinfo as _, perrorcode as _) } } #[inline] pub unsafe fn uidna_labelToASCII_UTF8(idna: *const UIDNA, label: P1, length: i32, dest: P3, capacity: i32, pinfo: *mut UIDNAInfo, perrorcode: *mut UErrorCode) -> i32 @@ -4295,12 +4253,12 @@ where P3: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uidna_labelToASCII_UTF8(idna : *const UIDNA, label : windows_core::PCSTR, length : i32, dest : windows_core::PCSTR, capacity : i32, pinfo : *mut UIDNAInfo, perrorcode : *mut UErrorCode) -> i32); - unsafe { uidna_labelToASCII_UTF8(idna, label.param().abi(), length, dest.param().abi(), capacity, core::mem::transmute(pinfo), core::mem::transmute(perrorcode)) } + unsafe { uidna_labelToASCII_UTF8(idna, label.param().abi(), length, dest.param().abi(), capacity, pinfo as _, perrorcode as _) } } #[inline] pub unsafe fn uidna_labelToUnicode(idna: *const UIDNA, label: *const u16, length: i32, dest: *mut u16, capacity: i32, pinfo: *mut UIDNAInfo, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn uidna_labelToUnicode(idna : *const UIDNA, label : *const u16, length : i32, dest : *mut u16, capacity : i32, pinfo : *mut UIDNAInfo, perrorcode : *mut UErrorCode) -> i32); - unsafe { uidna_labelToUnicode(idna, label, length, core::mem::transmute(dest), capacity, core::mem::transmute(pinfo), core::mem::transmute(perrorcode)) } + unsafe { uidna_labelToUnicode(idna, label, length, dest as _, capacity, pinfo as _, perrorcode as _) } } #[inline] pub unsafe fn uidna_labelToUnicodeUTF8(idna: *const UIDNA, label: P1, length: i32, dest: P3, capacity: i32, pinfo: *mut UIDNAInfo, perrorcode: *mut UErrorCode) -> i32 @@ -4309,12 +4267,12 @@ where P3: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uidna_labelToUnicodeUTF8(idna : *const UIDNA, label : windows_core::PCSTR, length : i32, dest : windows_core::PCSTR, capacity : i32, pinfo : *mut UIDNAInfo, perrorcode : *mut UErrorCode) -> i32); - unsafe { uidna_labelToUnicodeUTF8(idna, label.param().abi(), length, dest.param().abi(), capacity, core::mem::transmute(pinfo), core::mem::transmute(perrorcode)) } + unsafe { uidna_labelToUnicodeUTF8(idna, label.param().abi(), length, dest.param().abi(), capacity, pinfo as _, perrorcode as _) } } #[inline] pub unsafe fn uidna_nameToASCII(idna: *const UIDNA, name: *const u16, length: i32, dest: *mut u16, capacity: i32, pinfo: *mut UIDNAInfo, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn uidna_nameToASCII(idna : *const UIDNA, name : *const u16, length : i32, dest : *mut u16, capacity : i32, pinfo : *mut UIDNAInfo, perrorcode : *mut UErrorCode) -> i32); - unsafe { uidna_nameToASCII(idna, name, length, core::mem::transmute(dest), capacity, core::mem::transmute(pinfo), core::mem::transmute(perrorcode)) } + unsafe { uidna_nameToASCII(idna, name, length, dest as _, capacity, pinfo as _, perrorcode as _) } } #[inline] pub unsafe fn uidna_nameToASCII_UTF8(idna: *const UIDNA, name: P1, length: i32, dest: P3, capacity: i32, pinfo: *mut UIDNAInfo, perrorcode: *mut UErrorCode) -> i32 @@ -4323,12 +4281,12 @@ where P3: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uidna_nameToASCII_UTF8(idna : *const UIDNA, name : windows_core::PCSTR, length : i32, dest : windows_core::PCSTR, capacity : i32, pinfo : *mut UIDNAInfo, perrorcode : *mut UErrorCode) -> i32); - unsafe { uidna_nameToASCII_UTF8(idna, name.param().abi(), length, dest.param().abi(), capacity, core::mem::transmute(pinfo), core::mem::transmute(perrorcode)) } + unsafe { uidna_nameToASCII_UTF8(idna, name.param().abi(), length, dest.param().abi(), capacity, pinfo as _, perrorcode as _) } } #[inline] pub unsafe fn uidna_nameToUnicode(idna: *const UIDNA, name: *const u16, length: i32, dest: *mut u16, capacity: i32, pinfo: *mut UIDNAInfo, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn uidna_nameToUnicode(idna : *const UIDNA, name : *const u16, length : i32, dest : *mut u16, capacity : i32, pinfo : *mut UIDNAInfo, perrorcode : *mut UErrorCode) -> i32); - unsafe { uidna_nameToUnicode(idna, name, length, core::mem::transmute(dest), capacity, core::mem::transmute(pinfo), core::mem::transmute(perrorcode)) } + unsafe { uidna_nameToUnicode(idna, name, length, dest as _, capacity, pinfo as _, perrorcode as _) } } #[inline] pub unsafe fn uidna_nameToUnicodeUTF8(idna: *const UIDNA, name: P1, length: i32, dest: P3, capacity: i32, pinfo: *mut UIDNAInfo, perrorcode: *mut UErrorCode) -> i32 @@ -4337,17 +4295,17 @@ where P3: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uidna_nameToUnicodeUTF8(idna : *const UIDNA, name : windows_core::PCSTR, length : i32, dest : windows_core::PCSTR, capacity : i32, pinfo : *mut UIDNAInfo, perrorcode : *mut UErrorCode) -> i32); - unsafe { uidna_nameToUnicodeUTF8(idna, name.param().abi(), length, dest.param().abi(), capacity, core::mem::transmute(pinfo), core::mem::transmute(perrorcode)) } + unsafe { uidna_nameToUnicodeUTF8(idna, name.param().abi(), length, dest.param().abi(), capacity, pinfo as _, perrorcode as _) } } #[inline] pub unsafe fn uidna_openUTS46(options: u32, perrorcode: *mut UErrorCode) -> *mut UIDNA { windows_targets::link!("icuuc.dll" "cdecl" fn uidna_openUTS46(options : u32, perrorcode : *mut UErrorCode) -> *mut UIDNA); - unsafe { uidna_openUTS46(options, core::mem::transmute(perrorcode)) } + unsafe { uidna_openUTS46(options, perrorcode as _) } } #[inline] pub unsafe fn uiter_current32(iter: *mut UCharIterator) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn uiter_current32(iter : *mut UCharIterator) -> i32); - unsafe { uiter_current32(core::mem::transmute(iter)) } + unsafe { uiter_current32(iter as _) } } #[inline] pub unsafe fn uiter_getState(iter: *const UCharIterator) -> u32 { @@ -4357,22 +4315,22 @@ pub unsafe fn uiter_getState(iter: *const UCharIterator) -> u32 { #[inline] pub unsafe fn uiter_next32(iter: *mut UCharIterator) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn uiter_next32(iter : *mut UCharIterator) -> i32); - unsafe { uiter_next32(core::mem::transmute(iter)) } + unsafe { uiter_next32(iter as _) } } #[inline] pub unsafe fn uiter_previous32(iter: *mut UCharIterator) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn uiter_previous32(iter : *mut UCharIterator) -> i32); - unsafe { uiter_previous32(core::mem::transmute(iter)) } + unsafe { uiter_previous32(iter as _) } } #[inline] pub unsafe fn uiter_setState(iter: *mut UCharIterator, state: u32, perrorcode: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn uiter_setState(iter : *mut UCharIterator, state : u32, perrorcode : *mut UErrorCode)); - unsafe { uiter_setState(core::mem::transmute(iter), state, core::mem::transmute(perrorcode)) } + unsafe { uiter_setState(iter as _, state, perrorcode as _) } } #[inline] pub unsafe fn uiter_setString(iter: *mut UCharIterator, s: *const u16, length: i32) { windows_targets::link!("icuuc.dll" "cdecl" fn uiter_setString(iter : *mut UCharIterator, s : *const u16, length : i32)); - unsafe { uiter_setString(core::mem::transmute(iter), s, length) } + unsafe { uiter_setString(iter as _, s, length) } } #[inline] pub unsafe fn uiter_setUTF16BE(iter: *mut UCharIterator, s: P1, length: i32) @@ -4380,7 +4338,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uiter_setUTF16BE(iter : *mut UCharIterator, s : windows_core::PCSTR, length : i32)); - unsafe { uiter_setUTF16BE(core::mem::transmute(iter), s.param().abi(), length) } + unsafe { uiter_setUTF16BE(iter as _, s.param().abi(), length) } } #[inline] pub unsafe fn uiter_setUTF8(iter: *mut UCharIterator, s: P1, length: i32) @@ -4388,17 +4346,17 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uiter_setUTF8(iter : *mut UCharIterator, s : windows_core::PCSTR, length : i32)); - unsafe { uiter_setUTF8(core::mem::transmute(iter), s.param().abi(), length) } + unsafe { uiter_setUTF8(iter as _, s.param().abi(), length) } } #[inline] pub unsafe fn uldn_close(ldn: *mut ULocaleDisplayNames) { windows_targets::link!("icuuc.dll" "cdecl" fn uldn_close(ldn : *mut ULocaleDisplayNames)); - unsafe { uldn_close(core::mem::transmute(ldn)) } + unsafe { uldn_close(ldn as _) } } #[inline] pub unsafe fn uldn_getContext(ldn: *const ULocaleDisplayNames, r#type: UDisplayContextType, perrorcode: *mut UErrorCode) -> UDisplayContext { windows_targets::link!("icuuc.dll" "cdecl" fn uldn_getContext(ldn : *const ULocaleDisplayNames, r#type : UDisplayContextType, perrorcode : *mut UErrorCode) -> UDisplayContext); - unsafe { uldn_getContext(ldn, r#type, core::mem::transmute(perrorcode)) } + unsafe { uldn_getContext(ldn, r#type, perrorcode as _) } } #[inline] pub unsafe fn uldn_getDialectHandling(ldn: *const ULocaleDisplayNames) -> UDialectHandling { @@ -4416,7 +4374,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uldn_keyDisplayName(ldn : *const ULocaleDisplayNames, key : windows_core::PCSTR, result : *mut u16, maxresultsize : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { uldn_keyDisplayName(ldn, key.param().abi(), core::mem::transmute(result), maxresultsize, core::mem::transmute(perrorcode)) } + unsafe { uldn_keyDisplayName(ldn, key.param().abi(), result as _, maxresultsize, perrorcode as _) } } #[inline] pub unsafe fn uldn_keyValueDisplayName(ldn: *const ULocaleDisplayNames, key: P1, value: P2, result: *mut u16, maxresultsize: i32, perrorcode: *mut UErrorCode) -> i32 @@ -4425,7 +4383,7 @@ where P2: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uldn_keyValueDisplayName(ldn : *const ULocaleDisplayNames, key : windows_core::PCSTR, value : windows_core::PCSTR, result : *mut u16, maxresultsize : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { uldn_keyValueDisplayName(ldn, key.param().abi(), value.param().abi(), core::mem::transmute(result), maxresultsize, core::mem::transmute(perrorcode)) } + unsafe { uldn_keyValueDisplayName(ldn, key.param().abi(), value.param().abi(), result as _, maxresultsize, perrorcode as _) } } #[inline] pub unsafe fn uldn_languageDisplayName(ldn: *const ULocaleDisplayNames, lang: P1, result: *mut u16, maxresultsize: i32, perrorcode: *mut UErrorCode) -> i32 @@ -4433,7 +4391,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uldn_languageDisplayName(ldn : *const ULocaleDisplayNames, lang : windows_core::PCSTR, result : *mut u16, maxresultsize : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { uldn_languageDisplayName(ldn, lang.param().abi(), core::mem::transmute(result), maxresultsize, core::mem::transmute(perrorcode)) } + unsafe { uldn_languageDisplayName(ldn, lang.param().abi(), result as _, maxresultsize, perrorcode as _) } } #[inline] pub unsafe fn uldn_localeDisplayName(ldn: *const ULocaleDisplayNames, locale: P1, result: *mut u16, maxresultsize: i32, perrorcode: *mut UErrorCode) -> i32 @@ -4441,7 +4399,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uldn_localeDisplayName(ldn : *const ULocaleDisplayNames, locale : windows_core::PCSTR, result : *mut u16, maxresultsize : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { uldn_localeDisplayName(ldn, locale.param().abi(), core::mem::transmute(result), maxresultsize, core::mem::transmute(perrorcode)) } + unsafe { uldn_localeDisplayName(ldn, locale.param().abi(), result as _, maxresultsize, perrorcode as _) } } #[inline] pub unsafe fn uldn_open(locale: P0, dialecthandling: UDialectHandling, perrorcode: *mut UErrorCode) -> *mut ULocaleDisplayNames @@ -4449,7 +4407,7 @@ where P0: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uldn_open(locale : windows_core::PCSTR, dialecthandling : UDialectHandling, perrorcode : *mut UErrorCode) -> *mut ULocaleDisplayNames); - unsafe { uldn_open(locale.param().abi(), dialecthandling, core::mem::transmute(perrorcode)) } + unsafe { uldn_open(locale.param().abi(), dialecthandling, perrorcode as _) } } #[inline] pub unsafe fn uldn_openForContext(locale: P0, contexts: *mut UDisplayContext, length: i32, perrorcode: *mut UErrorCode) -> *mut ULocaleDisplayNames @@ -4457,7 +4415,7 @@ where P0: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uldn_openForContext(locale : windows_core::PCSTR, contexts : *mut UDisplayContext, length : i32, perrorcode : *mut UErrorCode) -> *mut ULocaleDisplayNames); - unsafe { uldn_openForContext(locale.param().abi(), core::mem::transmute(contexts), length, core::mem::transmute(perrorcode)) } + unsafe { uldn_openForContext(locale.param().abi(), contexts as _, length, perrorcode as _) } } #[inline] pub unsafe fn uldn_regionDisplayName(ldn: *const ULocaleDisplayNames, region: P1, result: *mut u16, maxresultsize: i32, perrorcode: *mut UErrorCode) -> i32 @@ -4465,12 +4423,12 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uldn_regionDisplayName(ldn : *const ULocaleDisplayNames, region : windows_core::PCSTR, result : *mut u16, maxresultsize : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { uldn_regionDisplayName(ldn, region.param().abi(), core::mem::transmute(result), maxresultsize, core::mem::transmute(perrorcode)) } + unsafe { uldn_regionDisplayName(ldn, region.param().abi(), result as _, maxresultsize, perrorcode as _) } } #[inline] pub unsafe fn uldn_scriptCodeDisplayName(ldn: *const ULocaleDisplayNames, scriptcode: UScriptCode, result: *mut u16, maxresultsize: i32, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn uldn_scriptCodeDisplayName(ldn : *const ULocaleDisplayNames, scriptcode : UScriptCode, result : *mut u16, maxresultsize : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { uldn_scriptCodeDisplayName(ldn, scriptcode, core::mem::transmute(result), maxresultsize, core::mem::transmute(perrorcode)) } + unsafe { uldn_scriptCodeDisplayName(ldn, scriptcode, result as _, maxresultsize, perrorcode as _) } } #[inline] pub unsafe fn uldn_scriptDisplayName(ldn: *const ULocaleDisplayNames, script: P1, result: *mut u16, maxresultsize: i32, perrorcode: *mut UErrorCode) -> i32 @@ -4478,7 +4436,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uldn_scriptDisplayName(ldn : *const ULocaleDisplayNames, script : windows_core::PCSTR, result : *mut u16, maxresultsize : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { uldn_scriptDisplayName(ldn, script.param().abi(), core::mem::transmute(result), maxresultsize, core::mem::transmute(perrorcode)) } + unsafe { uldn_scriptDisplayName(ldn, script.param().abi(), result as _, maxresultsize, perrorcode as _) } } #[inline] pub unsafe fn uldn_variantDisplayName(ldn: *const ULocaleDisplayNames, variant: P1, result: *mut u16, maxresultsize: i32, perrorcode: *mut UErrorCode) -> i32 @@ -4486,27 +4444,27 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uldn_variantDisplayName(ldn : *const ULocaleDisplayNames, variant : windows_core::PCSTR, result : *mut u16, maxresultsize : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { uldn_variantDisplayName(ldn, variant.param().abi(), core::mem::transmute(result), maxresultsize, core::mem::transmute(perrorcode)) } + unsafe { uldn_variantDisplayName(ldn, variant.param().abi(), result as _, maxresultsize, perrorcode as _) } } #[inline] pub unsafe fn ulistfmt_close(listfmt: *mut UListFormatter) { windows_targets::link!("icuuc.dll" "cdecl" fn ulistfmt_close(listfmt : *mut UListFormatter)); - unsafe { ulistfmt_close(core::mem::transmute(listfmt)) } + unsafe { ulistfmt_close(listfmt as _) } } #[inline] pub unsafe fn ulistfmt_closeResult(uresult: *mut UFormattedList) { windows_targets::link!("icu.dll" "cdecl" fn ulistfmt_closeResult(uresult : *mut UFormattedList)); - unsafe { ulistfmt_closeResult(core::mem::transmute(uresult)) } + unsafe { ulistfmt_closeResult(uresult as _) } } #[inline] pub unsafe fn ulistfmt_format(listfmt: *const UListFormatter, strings: *const *const u16, stringlengths: *const i32, stringcount: i32, result: *mut u16, resultcapacity: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn ulistfmt_format(listfmt : *const UListFormatter, strings : *const *const u16, stringlengths : *const i32, stringcount : i32, result : *mut u16, resultcapacity : i32, status : *mut UErrorCode) -> i32); - unsafe { ulistfmt_format(listfmt, strings, stringlengths, stringcount, core::mem::transmute(result), resultcapacity, core::mem::transmute(status)) } + unsafe { ulistfmt_format(listfmt, strings, stringlengths, stringcount, result as _, resultcapacity, status as _) } } #[inline] pub unsafe fn ulistfmt_formatStringsToResult(listfmt: *const UListFormatter, strings: *const *const u16, stringlengths: *const i32, stringcount: i32, uresult: *mut UFormattedList, status: *mut UErrorCode) { windows_targets::link!("icu.dll" "cdecl" fn ulistfmt_formatStringsToResult(listfmt : *const UListFormatter, strings : *const *const u16, stringlengths : *const i32, stringcount : i32, uresult : *mut UFormattedList, status : *mut UErrorCode)); - unsafe { ulistfmt_formatStringsToResult(listfmt, strings, stringlengths, stringcount, core::mem::transmute(uresult), core::mem::transmute(status)) } + unsafe { ulistfmt_formatStringsToResult(listfmt, strings, stringlengths, stringcount, uresult as _, status as _) } } #[inline] pub unsafe fn ulistfmt_open(locale: P0, status: *mut UErrorCode) -> *mut UListFormatter @@ -4514,7 +4472,7 @@ where P0: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ulistfmt_open(locale : windows_core::PCSTR, status : *mut UErrorCode) -> *mut UListFormatter); - unsafe { ulistfmt_open(locale.param().abi(), core::mem::transmute(status)) } + unsafe { ulistfmt_open(locale.param().abi(), status as _) } } #[inline] pub unsafe fn ulistfmt_openForType(locale: P0, r#type: UListFormatterType, width: UListFormatterWidth, status: *mut UErrorCode) -> *mut UListFormatter @@ -4522,17 +4480,17 @@ where P0: windows_core::Param, { windows_targets::link!("icu.dll" "cdecl" fn ulistfmt_openForType(locale : windows_core::PCSTR, r#type : UListFormatterType, width : UListFormatterWidth, status : *mut UErrorCode) -> *mut UListFormatter); - unsafe { ulistfmt_openForType(locale.param().abi(), r#type, width, core::mem::transmute(status)) } + unsafe { ulistfmt_openForType(locale.param().abi(), r#type, width, status as _) } } #[inline] pub unsafe fn ulistfmt_openResult(ec: *mut UErrorCode) -> *mut UFormattedList { windows_targets::link!("icu.dll" "cdecl" fn ulistfmt_openResult(ec : *mut UErrorCode) -> *mut UFormattedList); - unsafe { ulistfmt_openResult(core::mem::transmute(ec)) } + unsafe { ulistfmt_openResult(ec as _) } } #[inline] pub unsafe fn ulistfmt_resultAsValue(uresult: *const UFormattedList, ec: *mut UErrorCode) -> *mut UFormattedValue { windows_targets::link!("icu.dll" "cdecl" fn ulistfmt_resultAsValue(uresult : *const UFormattedList, ec : *mut UErrorCode) -> *mut UFormattedValue); - unsafe { ulistfmt_resultAsValue(uresult, core::mem::transmute(ec)) } + unsafe { ulistfmt_resultAsValue(uresult, ec as _) } } #[inline] pub unsafe fn uloc_acceptLanguage(result: P0, resultavailable: i32, outresult: *mut UAcceptResult, acceptlist: *const *const i8, acceptlistcount: i32, availablelocales: *mut UEnumeration, status: *mut UErrorCode) -> i32 @@ -4540,7 +4498,7 @@ where P0: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uloc_acceptLanguage(result : windows_core::PCSTR, resultavailable : i32, outresult : *mut UAcceptResult, acceptlist : *const *const i8, acceptlistcount : i32, availablelocales : *mut UEnumeration, status : *mut UErrorCode) -> i32); - unsafe { uloc_acceptLanguage(result.param().abi(), resultavailable, core::mem::transmute(outresult), acceptlist, acceptlistcount, core::mem::transmute(availablelocales), core::mem::transmute(status)) } + unsafe { uloc_acceptLanguage(result.param().abi(), resultavailable, outresult as _, acceptlist, acceptlistcount, availablelocales as _, status as _) } } #[inline] pub unsafe fn uloc_acceptLanguageFromHTTP(result: P0, resultavailable: i32, outresult: *mut UAcceptResult, httpacceptlanguage: P3, availablelocales: *mut UEnumeration, status: *mut UErrorCode) -> i32 @@ -4549,7 +4507,7 @@ where P3: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uloc_acceptLanguageFromHTTP(result : windows_core::PCSTR, resultavailable : i32, outresult : *mut UAcceptResult, httpacceptlanguage : windows_core::PCSTR, availablelocales : *mut UEnumeration, status : *mut UErrorCode) -> i32); - unsafe { uloc_acceptLanguageFromHTTP(result.param().abi(), resultavailable, core::mem::transmute(outresult), httpacceptlanguage.param().abi(), core::mem::transmute(availablelocales), core::mem::transmute(status)) } + unsafe { uloc_acceptLanguageFromHTTP(result.param().abi(), resultavailable, outresult as _, httpacceptlanguage.param().abi(), availablelocales as _, status as _) } } #[inline] pub unsafe fn uloc_addLikelySubtags(localeid: P0, maximizedlocaleid: P1, maximizedlocaleidcapacity: i32, err: *mut UErrorCode) -> i32 @@ -4558,7 +4516,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uloc_addLikelySubtags(localeid : windows_core::PCSTR, maximizedlocaleid : windows_core::PCSTR, maximizedlocaleidcapacity : i32, err : *mut UErrorCode) -> i32); - unsafe { uloc_addLikelySubtags(localeid.param().abi(), maximizedlocaleid.param().abi(), maximizedlocaleidcapacity, core::mem::transmute(err)) } + unsafe { uloc_addLikelySubtags(localeid.param().abi(), maximizedlocaleid.param().abi(), maximizedlocaleidcapacity, err as _) } } #[inline] pub unsafe fn uloc_canonicalize(localeid: P0, name: P1, namecapacity: i32, err: *mut UErrorCode) -> i32 @@ -4567,7 +4525,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uloc_canonicalize(localeid : windows_core::PCSTR, name : windows_core::PCSTR, namecapacity : i32, err : *mut UErrorCode) -> i32); - unsafe { uloc_canonicalize(localeid.param().abi(), name.param().abi(), namecapacity, core::mem::transmute(err)) } + unsafe { uloc_canonicalize(localeid.param().abi(), name.param().abi(), namecapacity, err as _) } } #[inline] pub unsafe fn uloc_countAvailable() -> i32 { @@ -4581,7 +4539,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uloc_forLanguageTag(langtag : windows_core::PCSTR, localeid : windows_core::PCSTR, localeidcapacity : i32, parsedlength : *mut i32, err : *mut UErrorCode) -> i32); - unsafe { uloc_forLanguageTag(langtag.param().abi(), localeid.param().abi(), localeidcapacity, core::mem::transmute(parsedlength), core::mem::transmute(err)) } + unsafe { uloc_forLanguageTag(langtag.param().abi(), localeid.param().abi(), localeidcapacity, parsedlength as _, err as _) } } #[inline] pub unsafe fn uloc_getAvailable(n: i32) -> windows_core::PCSTR { @@ -4595,7 +4553,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uloc_getBaseName(localeid : windows_core::PCSTR, name : windows_core::PCSTR, namecapacity : i32, err : *mut UErrorCode) -> i32); - unsafe { uloc_getBaseName(localeid.param().abi(), name.param().abi(), namecapacity, core::mem::transmute(err)) } + unsafe { uloc_getBaseName(localeid.param().abi(), name.param().abi(), namecapacity, err as _) } } #[inline] pub unsafe fn uloc_getCharacterOrientation(localeid: P0, status: *mut UErrorCode) -> ULayoutType @@ -4603,7 +4561,7 @@ where P0: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uloc_getCharacterOrientation(localeid : windows_core::PCSTR, status : *mut UErrorCode) -> ULayoutType); - unsafe { uloc_getCharacterOrientation(localeid.param().abi(), core::mem::transmute(status)) } + unsafe { uloc_getCharacterOrientation(localeid.param().abi(), status as _) } } #[inline] pub unsafe fn uloc_getCountry(localeid: P0, country: P1, countrycapacity: i32, err: *mut UErrorCode) -> i32 @@ -4612,7 +4570,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uloc_getCountry(localeid : windows_core::PCSTR, country : windows_core::PCSTR, countrycapacity : i32, err : *mut UErrorCode) -> i32); - unsafe { uloc_getCountry(localeid.param().abi(), country.param().abi(), countrycapacity, core::mem::transmute(err)) } + unsafe { uloc_getCountry(localeid.param().abi(), country.param().abi(), countrycapacity, err as _) } } #[inline] pub unsafe fn uloc_getDefault() -> windows_core::PCSTR { @@ -4626,7 +4584,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uloc_getDisplayCountry(locale : windows_core::PCSTR, displaylocale : windows_core::PCSTR, country : *mut u16, countrycapacity : i32, status : *mut UErrorCode) -> i32); - unsafe { uloc_getDisplayCountry(locale.param().abi(), displaylocale.param().abi(), core::mem::transmute(country), countrycapacity, core::mem::transmute(status)) } + unsafe { uloc_getDisplayCountry(locale.param().abi(), displaylocale.param().abi(), country as _, countrycapacity, status as _) } } #[inline] pub unsafe fn uloc_getDisplayKeyword(keyword: P0, displaylocale: P1, dest: *mut u16, destcapacity: i32, status: *mut UErrorCode) -> i32 @@ -4635,7 +4593,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uloc_getDisplayKeyword(keyword : windows_core::PCSTR, displaylocale : windows_core::PCSTR, dest : *mut u16, destcapacity : i32, status : *mut UErrorCode) -> i32); - unsafe { uloc_getDisplayKeyword(keyword.param().abi(), displaylocale.param().abi(), core::mem::transmute(dest), destcapacity, core::mem::transmute(status)) } + unsafe { uloc_getDisplayKeyword(keyword.param().abi(), displaylocale.param().abi(), dest as _, destcapacity, status as _) } } #[inline] pub unsafe fn uloc_getDisplayKeywordValue(locale: P0, keyword: P1, displaylocale: P2, dest: *mut u16, destcapacity: i32, status: *mut UErrorCode) -> i32 @@ -4645,7 +4603,7 @@ where P2: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uloc_getDisplayKeywordValue(locale : windows_core::PCSTR, keyword : windows_core::PCSTR, displaylocale : windows_core::PCSTR, dest : *mut u16, destcapacity : i32, status : *mut UErrorCode) -> i32); - unsafe { uloc_getDisplayKeywordValue(locale.param().abi(), keyword.param().abi(), displaylocale.param().abi(), core::mem::transmute(dest), destcapacity, core::mem::transmute(status)) } + unsafe { uloc_getDisplayKeywordValue(locale.param().abi(), keyword.param().abi(), displaylocale.param().abi(), dest as _, destcapacity, status as _) } } #[inline] pub unsafe fn uloc_getDisplayLanguage(locale: P0, displaylocale: P1, language: *mut u16, languagecapacity: i32, status: *mut UErrorCode) -> i32 @@ -4654,7 +4612,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uloc_getDisplayLanguage(locale : windows_core::PCSTR, displaylocale : windows_core::PCSTR, language : *mut u16, languagecapacity : i32, status : *mut UErrorCode) -> i32); - unsafe { uloc_getDisplayLanguage(locale.param().abi(), displaylocale.param().abi(), core::mem::transmute(language), languagecapacity, core::mem::transmute(status)) } + unsafe { uloc_getDisplayLanguage(locale.param().abi(), displaylocale.param().abi(), language as _, languagecapacity, status as _) } } #[inline] pub unsafe fn uloc_getDisplayName(localeid: P0, inlocaleid: P1, result: *mut u16, maxresultsize: i32, err: *mut UErrorCode) -> i32 @@ -4663,7 +4621,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uloc_getDisplayName(localeid : windows_core::PCSTR, inlocaleid : windows_core::PCSTR, result : *mut u16, maxresultsize : i32, err : *mut UErrorCode) -> i32); - unsafe { uloc_getDisplayName(localeid.param().abi(), inlocaleid.param().abi(), core::mem::transmute(result), maxresultsize, core::mem::transmute(err)) } + unsafe { uloc_getDisplayName(localeid.param().abi(), inlocaleid.param().abi(), result as _, maxresultsize, err as _) } } #[inline] pub unsafe fn uloc_getDisplayScript(locale: P0, displaylocale: P1, script: *mut u16, scriptcapacity: i32, status: *mut UErrorCode) -> i32 @@ -4672,7 +4630,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uloc_getDisplayScript(locale : windows_core::PCSTR, displaylocale : windows_core::PCSTR, script : *mut u16, scriptcapacity : i32, status : *mut UErrorCode) -> i32); - unsafe { uloc_getDisplayScript(locale.param().abi(), displaylocale.param().abi(), core::mem::transmute(script), scriptcapacity, core::mem::transmute(status)) } + unsafe { uloc_getDisplayScript(locale.param().abi(), displaylocale.param().abi(), script as _, scriptcapacity, status as _) } } #[inline] pub unsafe fn uloc_getDisplayVariant(locale: P0, displaylocale: P1, variant: *mut u16, variantcapacity: i32, status: *mut UErrorCode) -> i32 @@ -4681,7 +4639,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uloc_getDisplayVariant(locale : windows_core::PCSTR, displaylocale : windows_core::PCSTR, variant : *mut u16, variantcapacity : i32, status : *mut UErrorCode) -> i32); - unsafe { uloc_getDisplayVariant(locale.param().abi(), displaylocale.param().abi(), core::mem::transmute(variant), variantcapacity, core::mem::transmute(status)) } + unsafe { uloc_getDisplayVariant(locale.param().abi(), displaylocale.param().abi(), variant as _, variantcapacity, status as _) } } #[inline] pub unsafe fn uloc_getISO3Country(localeid: P0) -> windows_core::PCSTR @@ -4717,7 +4675,7 @@ where P2: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uloc_getKeywordValue(localeid : windows_core::PCSTR, keywordname : windows_core::PCSTR, buffer : windows_core::PCSTR, buffercapacity : i32, status : *mut UErrorCode) -> i32); - unsafe { uloc_getKeywordValue(localeid.param().abi(), keywordname.param().abi(), buffer.param().abi(), buffercapacity, core::mem::transmute(status)) } + unsafe { uloc_getKeywordValue(localeid.param().abi(), keywordname.param().abi(), buffer.param().abi(), buffercapacity, status as _) } } #[inline] pub unsafe fn uloc_getLCID(localeid: P0) -> u32 @@ -4734,7 +4692,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uloc_getLanguage(localeid : windows_core::PCSTR, language : windows_core::PCSTR, languagecapacity : i32, err : *mut UErrorCode) -> i32); - unsafe { uloc_getLanguage(localeid.param().abi(), language.param().abi(), languagecapacity, core::mem::transmute(err)) } + unsafe { uloc_getLanguage(localeid.param().abi(), language.param().abi(), languagecapacity, err as _) } } #[inline] pub unsafe fn uloc_getLineOrientation(localeid: P0, status: *mut UErrorCode) -> ULayoutType @@ -4742,7 +4700,7 @@ where P0: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uloc_getLineOrientation(localeid : windows_core::PCSTR, status : *mut UErrorCode) -> ULayoutType); - unsafe { uloc_getLineOrientation(localeid.param().abi(), core::mem::transmute(status)) } + unsafe { uloc_getLineOrientation(localeid.param().abi(), status as _) } } #[inline] pub unsafe fn uloc_getLocaleForLCID(hostid: u32, locale: P1, localecapacity: i32, status: *mut UErrorCode) -> i32 @@ -4750,7 +4708,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uloc_getLocaleForLCID(hostid : u32, locale : windows_core::PCSTR, localecapacity : i32, status : *mut UErrorCode) -> i32); - unsafe { uloc_getLocaleForLCID(hostid, locale.param().abi(), localecapacity, core::mem::transmute(status)) } + unsafe { uloc_getLocaleForLCID(hostid, locale.param().abi(), localecapacity, status as _) } } #[inline] pub unsafe fn uloc_getName(localeid: P0, name: P1, namecapacity: i32, err: *mut UErrorCode) -> i32 @@ -4759,7 +4717,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uloc_getName(localeid : windows_core::PCSTR, name : windows_core::PCSTR, namecapacity : i32, err : *mut UErrorCode) -> i32); - unsafe { uloc_getName(localeid.param().abi(), name.param().abi(), namecapacity, core::mem::transmute(err)) } + unsafe { uloc_getName(localeid.param().abi(), name.param().abi(), namecapacity, err as _) } } #[inline] pub unsafe fn uloc_getParent(localeid: P0, parent: P1, parentcapacity: i32, err: *mut UErrorCode) -> i32 @@ -4768,7 +4726,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uloc_getParent(localeid : windows_core::PCSTR, parent : windows_core::PCSTR, parentcapacity : i32, err : *mut UErrorCode) -> i32); - unsafe { uloc_getParent(localeid.param().abi(), parent.param().abi(), parentcapacity, core::mem::transmute(err)) } + unsafe { uloc_getParent(localeid.param().abi(), parent.param().abi(), parentcapacity, err as _) } } #[inline] pub unsafe fn uloc_getScript(localeid: P0, script: P1, scriptcapacity: i32, err: *mut UErrorCode) -> i32 @@ -4777,7 +4735,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uloc_getScript(localeid : windows_core::PCSTR, script : windows_core::PCSTR, scriptcapacity : i32, err : *mut UErrorCode) -> i32); - unsafe { uloc_getScript(localeid.param().abi(), script.param().abi(), scriptcapacity, core::mem::transmute(err)) } + unsafe { uloc_getScript(localeid.param().abi(), script.param().abi(), scriptcapacity, err as _) } } #[inline] pub unsafe fn uloc_getVariant(localeid: P0, variant: P1, variantcapacity: i32, err: *mut UErrorCode) -> i32 @@ -4786,7 +4744,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uloc_getVariant(localeid : windows_core::PCSTR, variant : windows_core::PCSTR, variantcapacity : i32, err : *mut UErrorCode) -> i32); - unsafe { uloc_getVariant(localeid.param().abi(), variant.param().abi(), variantcapacity, core::mem::transmute(err)) } + unsafe { uloc_getVariant(localeid.param().abi(), variant.param().abi(), variantcapacity, err as _) } } #[inline] pub unsafe fn uloc_isRightToLeft(locale: P0) -> i8 @@ -4803,12 +4761,12 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uloc_minimizeSubtags(localeid : windows_core::PCSTR, minimizedlocaleid : windows_core::PCSTR, minimizedlocaleidcapacity : i32, err : *mut UErrorCode) -> i32); - unsafe { uloc_minimizeSubtags(localeid.param().abi(), minimizedlocaleid.param().abi(), minimizedlocaleidcapacity, core::mem::transmute(err)) } + unsafe { uloc_minimizeSubtags(localeid.param().abi(), minimizedlocaleid.param().abi(), minimizedlocaleidcapacity, err as _) } } #[inline] pub unsafe fn uloc_openAvailableByType(r#type: ULocAvailableType, status: *mut UErrorCode) -> *mut UEnumeration { windows_targets::link!("icu.dll" "cdecl" fn uloc_openAvailableByType(r#type : ULocAvailableType, status : *mut UErrorCode) -> *mut UEnumeration); - unsafe { uloc_openAvailableByType(r#type, core::mem::transmute(status)) } + unsafe { uloc_openAvailableByType(r#type, status as _) } } #[inline] pub unsafe fn uloc_openKeywords(localeid: P0, status: *mut UErrorCode) -> *mut UEnumeration @@ -4816,7 +4774,7 @@ where P0: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uloc_openKeywords(localeid : windows_core::PCSTR, status : *mut UErrorCode) -> *mut UEnumeration); - unsafe { uloc_openKeywords(localeid.param().abi(), core::mem::transmute(status)) } + unsafe { uloc_openKeywords(localeid.param().abi(), status as _) } } #[inline] pub unsafe fn uloc_setDefault(localeid: P0, status: *mut UErrorCode) @@ -4824,7 +4782,7 @@ where P0: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uloc_setDefault(localeid : windows_core::PCSTR, status : *mut UErrorCode)); - unsafe { uloc_setDefault(localeid.param().abi(), core::mem::transmute(status)) } + unsafe { uloc_setDefault(localeid.param().abi(), status as _) } } #[inline] pub unsafe fn uloc_setKeywordValue(keywordname: P0, keywordvalue: P1, buffer: P2, buffercapacity: i32, status: *mut UErrorCode) -> i32 @@ -4834,7 +4792,7 @@ where P2: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uloc_setKeywordValue(keywordname : windows_core::PCSTR, keywordvalue : windows_core::PCSTR, buffer : windows_core::PCSTR, buffercapacity : i32, status : *mut UErrorCode) -> i32); - unsafe { uloc_setKeywordValue(keywordname.param().abi(), keywordvalue.param().abi(), buffer.param().abi(), buffercapacity, core::mem::transmute(status)) } + unsafe { uloc_setKeywordValue(keywordname.param().abi(), keywordvalue.param().abi(), buffer.param().abi(), buffercapacity, status as _) } } #[inline] pub unsafe fn uloc_toLanguageTag(localeid: P0, langtag: P1, langtagcapacity: i32, strict: i8, err: *mut UErrorCode) -> i32 @@ -4843,7 +4801,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uloc_toLanguageTag(localeid : windows_core::PCSTR, langtag : windows_core::PCSTR, langtagcapacity : i32, strict : i8, err : *mut UErrorCode) -> i32); - unsafe { uloc_toLanguageTag(localeid.param().abi(), langtag.param().abi(), langtagcapacity, strict, core::mem::transmute(err)) } + unsafe { uloc_toLanguageTag(localeid.param().abi(), langtag.param().abi(), langtagcapacity, strict, err as _) } } #[inline] pub unsafe fn uloc_toLegacyKey(keyword: P0) -> windows_core::PCSTR @@ -4882,32 +4840,32 @@ where #[inline] pub unsafe fn ulocdata_close(uld: *mut ULocaleData) { windows_targets::link!("icuin.dll" "cdecl" fn ulocdata_close(uld : *mut ULocaleData)); - unsafe { ulocdata_close(core::mem::transmute(uld)) } + unsafe { ulocdata_close(uld as _) } } #[inline] pub unsafe fn ulocdata_getCLDRVersion(versionarray: *mut u8, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn ulocdata_getCLDRVersion(versionarray : *mut u8, status : *mut UErrorCode)); - unsafe { ulocdata_getCLDRVersion(core::mem::transmute(versionarray), core::mem::transmute(status)) } + unsafe { ulocdata_getCLDRVersion(versionarray as _, status as _) } } #[inline] pub unsafe fn ulocdata_getDelimiter(uld: *mut ULocaleData, r#type: ULocaleDataDelimiterType, result: *mut u16, resultlength: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn ulocdata_getDelimiter(uld : *mut ULocaleData, r#type : ULocaleDataDelimiterType, result : *mut u16, resultlength : i32, status : *mut UErrorCode) -> i32); - unsafe { ulocdata_getDelimiter(core::mem::transmute(uld), r#type, core::mem::transmute(result), resultlength, core::mem::transmute(status)) } + unsafe { ulocdata_getDelimiter(uld as _, r#type, result as _, resultlength, status as _) } } #[inline] pub unsafe fn ulocdata_getExemplarSet(uld: *mut ULocaleData, fillin: *mut USet, options: u32, extype: ULocaleDataExemplarSetType, status: *mut UErrorCode) -> *mut USet { windows_targets::link!("icuin.dll" "cdecl" fn ulocdata_getExemplarSet(uld : *mut ULocaleData, fillin : *mut USet, options : u32, extype : ULocaleDataExemplarSetType, status : *mut UErrorCode) -> *mut USet); - unsafe { ulocdata_getExemplarSet(core::mem::transmute(uld), core::mem::transmute(fillin), options, extype, core::mem::transmute(status)) } + unsafe { ulocdata_getExemplarSet(uld as _, fillin as _, options, extype, status as _) } } #[inline] pub unsafe fn ulocdata_getLocaleDisplayPattern(uld: *mut ULocaleData, pattern: *mut u16, patterncapacity: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn ulocdata_getLocaleDisplayPattern(uld : *mut ULocaleData, pattern : *mut u16, patterncapacity : i32, status : *mut UErrorCode) -> i32); - unsafe { ulocdata_getLocaleDisplayPattern(core::mem::transmute(uld), core::mem::transmute(pattern), patterncapacity, core::mem::transmute(status)) } + unsafe { ulocdata_getLocaleDisplayPattern(uld as _, pattern as _, patterncapacity, status as _) } } #[inline] pub unsafe fn ulocdata_getLocaleSeparator(uld: *mut ULocaleData, separator: *mut u16, separatorcapacity: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn ulocdata_getLocaleSeparator(uld : *mut ULocaleData, separator : *mut u16, separatorcapacity : i32, status : *mut UErrorCode) -> i32); - unsafe { ulocdata_getLocaleSeparator(core::mem::transmute(uld), core::mem::transmute(separator), separatorcapacity, core::mem::transmute(status)) } + unsafe { ulocdata_getLocaleSeparator(uld as _, separator as _, separatorcapacity, status as _) } } #[inline] pub unsafe fn ulocdata_getMeasurementSystem(localeid: P0, status: *mut UErrorCode) -> UMeasurementSystem @@ -4915,12 +4873,12 @@ where P0: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn ulocdata_getMeasurementSystem(localeid : windows_core::PCSTR, status : *mut UErrorCode) -> UMeasurementSystem); - unsafe { ulocdata_getMeasurementSystem(localeid.param().abi(), core::mem::transmute(status)) } + unsafe { ulocdata_getMeasurementSystem(localeid.param().abi(), status as _) } } #[inline] pub unsafe fn ulocdata_getNoSubstitute(uld: *mut ULocaleData) -> i8 { windows_targets::link!("icuin.dll" "cdecl" fn ulocdata_getNoSubstitute(uld : *mut ULocaleData) -> i8); - unsafe { ulocdata_getNoSubstitute(core::mem::transmute(uld)) } + unsafe { ulocdata_getNoSubstitute(uld as _) } } #[inline] pub unsafe fn ulocdata_getPaperSize(localeid: P0, height: *mut i32, width: *mut i32, status: *mut UErrorCode) @@ -4928,7 +4886,7 @@ where P0: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn ulocdata_getPaperSize(localeid : windows_core::PCSTR, height : *mut i32, width : *mut i32, status : *mut UErrorCode)); - unsafe { ulocdata_getPaperSize(localeid.param().abi(), core::mem::transmute(height), core::mem::transmute(width), core::mem::transmute(status)) } + unsafe { ulocdata_getPaperSize(localeid.param().abi(), height as _, width as _, status as _) } } #[inline] pub unsafe fn ulocdata_open(localeid: P0, status: *mut UErrorCode) -> *mut ULocaleData @@ -4936,37 +4894,37 @@ where P0: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn ulocdata_open(localeid : windows_core::PCSTR, status : *mut UErrorCode) -> *mut ULocaleData); - unsafe { ulocdata_open(localeid.param().abi(), core::mem::transmute(status)) } + unsafe { ulocdata_open(localeid.param().abi(), status as _) } } #[inline] pub unsafe fn ulocdata_setNoSubstitute(uld: *mut ULocaleData, setting: i8) { windows_targets::link!("icuin.dll" "cdecl" fn ulocdata_setNoSubstitute(uld : *mut ULocaleData, setting : i8)); - unsafe { ulocdata_setNoSubstitute(core::mem::transmute(uld), setting) } + unsafe { ulocdata_setNoSubstitute(uld as _, setting) } } #[inline] pub unsafe fn umsg_applyPattern(fmt: *mut *mut core::ffi::c_void, pattern: *const u16, patternlength: i32, parseerror: *mut UParseError, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn umsg_applyPattern(fmt : *mut *mut core::ffi::c_void, pattern : *const u16, patternlength : i32, parseerror : *mut UParseError, status : *mut UErrorCode)); - unsafe { umsg_applyPattern(core::mem::transmute(fmt), pattern, patternlength, core::mem::transmute(parseerror), core::mem::transmute(status)) } + unsafe { umsg_applyPattern(fmt as _, pattern, patternlength, parseerror as _, status as _) } } #[inline] pub unsafe fn umsg_autoQuoteApostrophe(pattern: *const u16, patternlength: i32, dest: *mut u16, destcapacity: i32, ec: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn umsg_autoQuoteApostrophe(pattern : *const u16, patternlength : i32, dest : *mut u16, destcapacity : i32, ec : *mut UErrorCode) -> i32); - unsafe { umsg_autoQuoteApostrophe(pattern, patternlength, core::mem::transmute(dest), destcapacity, core::mem::transmute(ec)) } + unsafe { umsg_autoQuoteApostrophe(pattern, patternlength, dest as _, destcapacity, ec as _) } } #[inline] pub unsafe fn umsg_clone(fmt: *const *const core::ffi::c_void, status: *mut UErrorCode) -> *mut core::ffi::c_void { windows_targets::link!("icuin.dll" "cdecl" fn umsg_clone(fmt : *const *const core::ffi::c_void, status : *mut UErrorCode) -> *mut core::ffi::c_void); - unsafe { umsg_clone(fmt, core::mem::transmute(status)) } + unsafe { umsg_clone(fmt, status as _) } } #[inline] pub unsafe fn umsg_close(format: *mut *mut core::ffi::c_void) { windows_targets::link!("icuin.dll" "cdecl" fn umsg_close(format : *mut *mut core::ffi::c_void)); - unsafe { umsg_close(core::mem::transmute(format)) } + unsafe { umsg_close(format as _) } } #[inline] pub unsafe fn umsg_format(fmt: *const *const core::ffi::c_void, result: *mut u16, resultlength: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn umsg_format(fmt : *const *const core::ffi::c_void, result : *mut u16, resultlength : i32, status : *mut UErrorCode) -> i32); - unsafe { umsg_format(fmt, core::mem::transmute(result), resultlength, core::mem::transmute(status)) } + unsafe { umsg_format(fmt, result as _, resultlength, status as _) } } #[inline] pub unsafe fn umsg_getLocale(fmt: *const *const core::ffi::c_void) -> windows_core::PCSTR { @@ -4979,12 +4937,12 @@ where P2: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn umsg_open(pattern : *const u16, patternlength : i32, locale : windows_core::PCSTR, parseerror : *mut UParseError, status : *mut UErrorCode) -> *mut *mut core::ffi::c_void); - unsafe { umsg_open(pattern, patternlength, locale.param().abi(), core::mem::transmute(parseerror), core::mem::transmute(status)) } + unsafe { umsg_open(pattern, patternlength, locale.param().abi(), parseerror as _, status as _) } } #[inline] pub unsafe fn umsg_parse(fmt: *const *const core::ffi::c_void, source: *const u16, sourcelength: i32, count: *mut i32, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn umsg_parse(fmt : *const *const core::ffi::c_void, source : *const u16, sourcelength : i32, count : *mut i32, status : *mut UErrorCode)); - unsafe { umsg_parse(fmt, source, sourcelength, core::mem::transmute(count), core::mem::transmute(status)) } + unsafe { umsg_parse(fmt, source, sourcelength, count as _, status as _) } } #[inline] pub unsafe fn umsg_setLocale(fmt: *mut *mut core::ffi::c_void, locale: P1) @@ -4992,47 +4950,47 @@ where P1: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn umsg_setLocale(fmt : *mut *mut core::ffi::c_void, locale : windows_core::PCSTR)); - unsafe { umsg_setLocale(core::mem::transmute(fmt), locale.param().abi()) } + unsafe { umsg_setLocale(fmt as _, locale.param().abi()) } } #[inline] pub unsafe fn umsg_toPattern(fmt: *const *const core::ffi::c_void, result: *mut u16, resultlength: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn umsg_toPattern(fmt : *const *const core::ffi::c_void, result : *mut u16, resultlength : i32, status : *mut UErrorCode) -> i32); - unsafe { umsg_toPattern(fmt, core::mem::transmute(result), resultlength, core::mem::transmute(status)) } + unsafe { umsg_toPattern(fmt, result as _, resultlength, status as _) } } #[inline] pub unsafe fn umsg_vformat(fmt: *const *const core::ffi::c_void, result: *mut u16, resultlength: i32, ap: *mut i8, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn umsg_vformat(fmt : *const *const core::ffi::c_void, result : *mut u16, resultlength : i32, ap : *mut i8, status : *mut UErrorCode) -> i32); - unsafe { umsg_vformat(fmt, core::mem::transmute(result), resultlength, core::mem::transmute(ap), core::mem::transmute(status)) } + unsafe { umsg_vformat(fmt, result as _, resultlength, ap as _, status as _) } } #[inline] pub unsafe fn umsg_vparse(fmt: *const *const core::ffi::c_void, source: *const u16, sourcelength: i32, count: *mut i32, ap: *mut i8, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn umsg_vparse(fmt : *const *const core::ffi::c_void, source : *const u16, sourcelength : i32, count : *mut i32, ap : *mut i8, status : *mut UErrorCode)); - unsafe { umsg_vparse(fmt, source, sourcelength, core::mem::transmute(count), core::mem::transmute(ap), core::mem::transmute(status)) } + unsafe { umsg_vparse(fmt, source, sourcelength, count as _, ap as _, status as _) } } #[inline] pub unsafe fn umutablecptrie_buildImmutable(trie: *mut UMutableCPTrie, r#type: UCPTrieType, valuewidth: UCPTrieValueWidth, perrorcode: *mut UErrorCode) -> *mut UCPTrie { windows_targets::link!("icu.dll" "cdecl" fn umutablecptrie_buildImmutable(trie : *mut UMutableCPTrie, r#type : UCPTrieType, valuewidth : UCPTrieValueWidth, perrorcode : *mut UErrorCode) -> *mut UCPTrie); - unsafe { umutablecptrie_buildImmutable(core::mem::transmute(trie), r#type, valuewidth, core::mem::transmute(perrorcode)) } + unsafe { umutablecptrie_buildImmutable(trie as _, r#type, valuewidth, perrorcode as _) } } #[inline] pub unsafe fn umutablecptrie_clone(other: *const UMutableCPTrie, perrorcode: *mut UErrorCode) -> *mut UMutableCPTrie { windows_targets::link!("icu.dll" "cdecl" fn umutablecptrie_clone(other : *const UMutableCPTrie, perrorcode : *mut UErrorCode) -> *mut UMutableCPTrie); - unsafe { umutablecptrie_clone(other, core::mem::transmute(perrorcode)) } + unsafe { umutablecptrie_clone(other, perrorcode as _) } } #[inline] pub unsafe fn umutablecptrie_close(trie: *mut UMutableCPTrie) { windows_targets::link!("icu.dll" "cdecl" fn umutablecptrie_close(trie : *mut UMutableCPTrie)); - unsafe { umutablecptrie_close(core::mem::transmute(trie)) } + unsafe { umutablecptrie_close(trie as _) } } #[inline] pub unsafe fn umutablecptrie_fromUCPMap(map: *const UCPMap, perrorcode: *mut UErrorCode) -> *mut UMutableCPTrie { windows_targets::link!("icu.dll" "cdecl" fn umutablecptrie_fromUCPMap(map : *const UCPMap, perrorcode : *mut UErrorCode) -> *mut UMutableCPTrie); - unsafe { umutablecptrie_fromUCPMap(map, core::mem::transmute(perrorcode)) } + unsafe { umutablecptrie_fromUCPMap(map, perrorcode as _) } } #[inline] pub unsafe fn umutablecptrie_fromUCPTrie(trie: *const UCPTrie, perrorcode: *mut UErrorCode) -> *mut UMutableCPTrie { windows_targets::link!("icu.dll" "cdecl" fn umutablecptrie_fromUCPTrie(trie : *const UCPTrie, perrorcode : *mut UErrorCode) -> *mut UMutableCPTrie); - unsafe { umutablecptrie_fromUCPTrie(trie, core::mem::transmute(perrorcode)) } + unsafe { umutablecptrie_fromUCPTrie(trie, perrorcode as _) } } #[inline] pub unsafe fn umutablecptrie_get(trie: *const UMutableCPTrie, c: i32) -> u32 { @@ -5042,32 +5000,32 @@ pub unsafe fn umutablecptrie_get(trie: *const UMutableCPTrie, c: i32) -> u32 { #[inline] pub unsafe fn umutablecptrie_getRange(trie: *const UMutableCPTrie, start: i32, option: UCPMapRangeOption, surrogatevalue: u32, filter: *mut UCPMapValueFilter, context: *const core::ffi::c_void, pvalue: *mut u32) -> i32 { windows_targets::link!("icu.dll" "cdecl" fn umutablecptrie_getRange(trie : *const UMutableCPTrie, start : i32, option : UCPMapRangeOption, surrogatevalue : u32, filter : *mut UCPMapValueFilter, context : *const core::ffi::c_void, pvalue : *mut u32) -> i32); - unsafe { umutablecptrie_getRange(trie, start, option, surrogatevalue, core::mem::transmute(filter), context, core::mem::transmute(pvalue)) } + unsafe { umutablecptrie_getRange(trie, start, option, surrogatevalue, filter as _, context, pvalue as _) } } #[inline] pub unsafe fn umutablecptrie_open(initialvalue: u32, errorvalue: u32, perrorcode: *mut UErrorCode) -> *mut UMutableCPTrie { windows_targets::link!("icu.dll" "cdecl" fn umutablecptrie_open(initialvalue : u32, errorvalue : u32, perrorcode : *mut UErrorCode) -> *mut UMutableCPTrie); - unsafe { umutablecptrie_open(initialvalue, errorvalue, core::mem::transmute(perrorcode)) } + unsafe { umutablecptrie_open(initialvalue, errorvalue, perrorcode as _) } } #[inline] pub unsafe fn umutablecptrie_set(trie: *mut UMutableCPTrie, c: i32, value: u32, perrorcode: *mut UErrorCode) { windows_targets::link!("icu.dll" "cdecl" fn umutablecptrie_set(trie : *mut UMutableCPTrie, c : i32, value : u32, perrorcode : *mut UErrorCode)); - unsafe { umutablecptrie_set(core::mem::transmute(trie), c, value, core::mem::transmute(perrorcode)) } + unsafe { umutablecptrie_set(trie as _, c, value, perrorcode as _) } } #[inline] pub unsafe fn umutablecptrie_setRange(trie: *mut UMutableCPTrie, start: i32, end: i32, value: u32, perrorcode: *mut UErrorCode) { windows_targets::link!("icu.dll" "cdecl" fn umutablecptrie_setRange(trie : *mut UMutableCPTrie, start : i32, end : i32, value : u32, perrorcode : *mut UErrorCode)); - unsafe { umutablecptrie_setRange(core::mem::transmute(trie), start, end, value, core::mem::transmute(perrorcode)) } + unsafe { umutablecptrie_setRange(trie as _, start, end, value, perrorcode as _) } } #[inline] pub unsafe fn unorm2_append(norm2: *const UNormalizer2, first: *mut u16, firstlength: i32, firstcapacity: i32, second: *const u16, secondlength: i32, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn unorm2_append(norm2 : *const UNormalizer2, first : *mut u16, firstlength : i32, firstcapacity : i32, second : *const u16, secondlength : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { unorm2_append(norm2, core::mem::transmute(first), firstlength, firstcapacity, second, secondlength, core::mem::transmute(perrorcode)) } + unsafe { unorm2_append(norm2, first as _, firstlength, firstcapacity, second, secondlength, perrorcode as _) } } #[inline] pub unsafe fn unorm2_close(norm2: *mut UNormalizer2) { windows_targets::link!("icuuc.dll" "cdecl" fn unorm2_close(norm2 : *mut UNormalizer2)); - unsafe { unorm2_close(core::mem::transmute(norm2)) } + unsafe { unorm2_close(norm2 as _) } } #[inline] pub unsafe fn unorm2_composePair(norm2: *const UNormalizer2, a: i32, b: i32) -> i32 { @@ -5082,7 +5040,7 @@ pub unsafe fn unorm2_getCombiningClass(norm2: *const UNormalizer2, c: i32) -> u8 #[inline] pub unsafe fn unorm2_getDecomposition(norm2: *const UNormalizer2, c: i32, decomposition: *mut u16, capacity: i32, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn unorm2_getDecomposition(norm2 : *const UNormalizer2, c : i32, decomposition : *mut u16, capacity : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { unorm2_getDecomposition(norm2, c, core::mem::transmute(decomposition), capacity, core::mem::transmute(perrorcode)) } + unsafe { unorm2_getDecomposition(norm2, c, decomposition as _, capacity, perrorcode as _) } } #[inline] pub unsafe fn unorm2_getInstance(packagename: P0, name: P1, mode: UNormalization2Mode, perrorcode: *mut UErrorCode) -> *mut UNormalizer2 @@ -5091,37 +5049,37 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn unorm2_getInstance(packagename : windows_core::PCSTR, name : windows_core::PCSTR, mode : UNormalization2Mode, perrorcode : *mut UErrorCode) -> *mut UNormalizer2); - unsafe { unorm2_getInstance(packagename.param().abi(), name.param().abi(), mode, core::mem::transmute(perrorcode)) } + unsafe { unorm2_getInstance(packagename.param().abi(), name.param().abi(), mode, perrorcode as _) } } #[inline] pub unsafe fn unorm2_getNFCInstance(perrorcode: *mut UErrorCode) -> *mut UNormalizer2 { windows_targets::link!("icuuc.dll" "cdecl" fn unorm2_getNFCInstance(perrorcode : *mut UErrorCode) -> *mut UNormalizer2); - unsafe { unorm2_getNFCInstance(core::mem::transmute(perrorcode)) } + unsafe { unorm2_getNFCInstance(perrorcode as _) } } #[inline] pub unsafe fn unorm2_getNFDInstance(perrorcode: *mut UErrorCode) -> *mut UNormalizer2 { windows_targets::link!("icuuc.dll" "cdecl" fn unorm2_getNFDInstance(perrorcode : *mut UErrorCode) -> *mut UNormalizer2); - unsafe { unorm2_getNFDInstance(core::mem::transmute(perrorcode)) } + unsafe { unorm2_getNFDInstance(perrorcode as _) } } #[inline] pub unsafe fn unorm2_getNFKCCasefoldInstance(perrorcode: *mut UErrorCode) -> *mut UNormalizer2 { windows_targets::link!("icuuc.dll" "cdecl" fn unorm2_getNFKCCasefoldInstance(perrorcode : *mut UErrorCode) -> *mut UNormalizer2); - unsafe { unorm2_getNFKCCasefoldInstance(core::mem::transmute(perrorcode)) } + unsafe { unorm2_getNFKCCasefoldInstance(perrorcode as _) } } #[inline] pub unsafe fn unorm2_getNFKCInstance(perrorcode: *mut UErrorCode) -> *mut UNormalizer2 { windows_targets::link!("icuuc.dll" "cdecl" fn unorm2_getNFKCInstance(perrorcode : *mut UErrorCode) -> *mut UNormalizer2); - unsafe { unorm2_getNFKCInstance(core::mem::transmute(perrorcode)) } + unsafe { unorm2_getNFKCInstance(perrorcode as _) } } #[inline] pub unsafe fn unorm2_getNFKDInstance(perrorcode: *mut UErrorCode) -> *mut UNormalizer2 { windows_targets::link!("icuuc.dll" "cdecl" fn unorm2_getNFKDInstance(perrorcode : *mut UErrorCode) -> *mut UNormalizer2); - unsafe { unorm2_getNFKDInstance(core::mem::transmute(perrorcode)) } + unsafe { unorm2_getNFKDInstance(perrorcode as _) } } #[inline] pub unsafe fn unorm2_getRawDecomposition(norm2: *const UNormalizer2, c: i32, decomposition: *mut u16, capacity: i32, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn unorm2_getRawDecomposition(norm2 : *const UNormalizer2, c : i32, decomposition : *mut u16, capacity : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { unorm2_getRawDecomposition(norm2, c, core::mem::transmute(decomposition), capacity, core::mem::transmute(perrorcode)) } + unsafe { unorm2_getRawDecomposition(norm2, c, decomposition as _, capacity, perrorcode as _) } } #[inline] pub unsafe fn unorm2_hasBoundaryAfter(norm2: *const UNormalizer2, c: i32) -> i8 { @@ -5141,52 +5099,52 @@ pub unsafe fn unorm2_isInert(norm2: *const UNormalizer2, c: i32) -> i8 { #[inline] pub unsafe fn unorm2_isNormalized(norm2: *const UNormalizer2, s: *const u16, length: i32, perrorcode: *mut UErrorCode) -> i8 { windows_targets::link!("icuuc.dll" "cdecl" fn unorm2_isNormalized(norm2 : *const UNormalizer2, s : *const u16, length : i32, perrorcode : *mut UErrorCode) -> i8); - unsafe { unorm2_isNormalized(norm2, s, length, core::mem::transmute(perrorcode)) } + unsafe { unorm2_isNormalized(norm2, s, length, perrorcode as _) } } #[inline] pub unsafe fn unorm2_normalize(norm2: *const UNormalizer2, src: *const u16, length: i32, dest: *mut u16, capacity: i32, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn unorm2_normalize(norm2 : *const UNormalizer2, src : *const u16, length : i32, dest : *mut u16, capacity : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { unorm2_normalize(norm2, src, length, core::mem::transmute(dest), capacity, core::mem::transmute(perrorcode)) } + unsafe { unorm2_normalize(norm2, src, length, dest as _, capacity, perrorcode as _) } } #[inline] pub unsafe fn unorm2_normalizeSecondAndAppend(norm2: *const UNormalizer2, first: *mut u16, firstlength: i32, firstcapacity: i32, second: *const u16, secondlength: i32, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn unorm2_normalizeSecondAndAppend(norm2 : *const UNormalizer2, first : *mut u16, firstlength : i32, firstcapacity : i32, second : *const u16, secondlength : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { unorm2_normalizeSecondAndAppend(norm2, core::mem::transmute(first), firstlength, firstcapacity, second, secondlength, core::mem::transmute(perrorcode)) } + unsafe { unorm2_normalizeSecondAndAppend(norm2, first as _, firstlength, firstcapacity, second, secondlength, perrorcode as _) } } #[inline] pub unsafe fn unorm2_openFiltered(norm2: *const UNormalizer2, filterset: *const USet, perrorcode: *mut UErrorCode) -> *mut UNormalizer2 { windows_targets::link!("icuuc.dll" "cdecl" fn unorm2_openFiltered(norm2 : *const UNormalizer2, filterset : *const USet, perrorcode : *mut UErrorCode) -> *mut UNormalizer2); - unsafe { unorm2_openFiltered(norm2, filterset, core::mem::transmute(perrorcode)) } + unsafe { unorm2_openFiltered(norm2, filterset, perrorcode as _) } } #[inline] pub unsafe fn unorm2_quickCheck(norm2: *const UNormalizer2, s: *const u16, length: i32, perrorcode: *mut UErrorCode) -> UNormalizationCheckResult { windows_targets::link!("icuuc.dll" "cdecl" fn unorm2_quickCheck(norm2 : *const UNormalizer2, s : *const u16, length : i32, perrorcode : *mut UErrorCode) -> UNormalizationCheckResult); - unsafe { unorm2_quickCheck(norm2, s, length, core::mem::transmute(perrorcode)) } + unsafe { unorm2_quickCheck(norm2, s, length, perrorcode as _) } } #[inline] pub unsafe fn unorm2_spanQuickCheckYes(norm2: *const UNormalizer2, s: *const u16, length: i32, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn unorm2_spanQuickCheckYes(norm2 : *const UNormalizer2, s : *const u16, length : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { unorm2_spanQuickCheckYes(norm2, s, length, core::mem::transmute(perrorcode)) } + unsafe { unorm2_spanQuickCheckYes(norm2, s, length, perrorcode as _) } } #[inline] pub unsafe fn unorm_compare(s1: *const u16, length1: i32, s2: *const u16, length2: i32, options: u32, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn unorm_compare(s1 : *const u16, length1 : i32, s2 : *const u16, length2 : i32, options : u32, perrorcode : *mut UErrorCode) -> i32); - unsafe { unorm_compare(s1, length1, s2, length2, options, core::mem::transmute(perrorcode)) } + unsafe { unorm_compare(s1, length1, s2, length2, options, perrorcode as _) } } #[inline] pub unsafe fn unum_applyPattern(format: *mut *mut core::ffi::c_void, localized: i8, pattern: *const u16, patternlength: i32, parseerror: *mut UParseError, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn unum_applyPattern(format : *mut *mut core::ffi::c_void, localized : i8, pattern : *const u16, patternlength : i32, parseerror : *mut UParseError, status : *mut UErrorCode)); - unsafe { unum_applyPattern(core::mem::transmute(format), localized, pattern, patternlength, core::mem::transmute(parseerror), core::mem::transmute(status)) } + unsafe { unum_applyPattern(format as _, localized, pattern, patternlength, parseerror as _, status as _) } } #[inline] pub unsafe fn unum_clone(fmt: *const *const core::ffi::c_void, status: *mut UErrorCode) -> *mut *mut core::ffi::c_void { windows_targets::link!("icuin.dll" "cdecl" fn unum_clone(fmt : *const *const core::ffi::c_void, status : *mut UErrorCode) -> *mut *mut core::ffi::c_void); - unsafe { unum_clone(fmt, core::mem::transmute(status)) } + unsafe { unum_clone(fmt, status as _) } } #[inline] pub unsafe fn unum_close(fmt: *mut *mut core::ffi::c_void) { windows_targets::link!("icuin.dll" "cdecl" fn unum_close(fmt : *mut *mut core::ffi::c_void)); - unsafe { unum_close(core::mem::transmute(fmt)) } + unsafe { unum_close(fmt as _) } } #[inline] pub unsafe fn unum_countAvailable() -> i32 { @@ -5196,7 +5154,7 @@ pub unsafe fn unum_countAvailable() -> i32 { #[inline] pub unsafe fn unum_format(fmt: *const *const core::ffi::c_void, number: i32, result: *mut u16, resultlength: i32, pos: *mut UFieldPosition, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn unum_format(fmt : *const *const core::ffi::c_void, number : i32, result : *mut u16, resultlength : i32, pos : *mut UFieldPosition, status : *mut UErrorCode) -> i32); - unsafe { unum_format(fmt, number, core::mem::transmute(result), resultlength, core::mem::transmute(pos), core::mem::transmute(status)) } + unsafe { unum_format(fmt, number, result as _, resultlength, pos as _, status as _) } } #[inline] pub unsafe fn unum_formatDecimal(fmt: *const *const core::ffi::c_void, number: P1, length: i32, result: *mut u16, resultlength: i32, pos: *mut UFieldPosition, status: *mut UErrorCode) -> i32 @@ -5204,32 +5162,32 @@ where P1: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn unum_formatDecimal(fmt : *const *const core::ffi::c_void, number : windows_core::PCSTR, length : i32, result : *mut u16, resultlength : i32, pos : *mut UFieldPosition, status : *mut UErrorCode) -> i32); - unsafe { unum_formatDecimal(fmt, number.param().abi(), length, core::mem::transmute(result), resultlength, core::mem::transmute(pos), core::mem::transmute(status)) } + unsafe { unum_formatDecimal(fmt, number.param().abi(), length, result as _, resultlength, pos as _, status as _) } } #[inline] pub unsafe fn unum_formatDouble(fmt: *const *const core::ffi::c_void, number: f64, result: *mut u16, resultlength: i32, pos: *mut UFieldPosition, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn unum_formatDouble(fmt : *const *const core::ffi::c_void, number : f64, result : *mut u16, resultlength : i32, pos : *mut UFieldPosition, status : *mut UErrorCode) -> i32); - unsafe { unum_formatDouble(fmt, number, core::mem::transmute(result), resultlength, core::mem::transmute(pos), core::mem::transmute(status)) } + unsafe { unum_formatDouble(fmt, number, result as _, resultlength, pos as _, status as _) } } #[inline] pub unsafe fn unum_formatDoubleCurrency(fmt: *const *const core::ffi::c_void, number: f64, currency: *mut u16, result: *mut u16, resultlength: i32, pos: *mut UFieldPosition, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn unum_formatDoubleCurrency(fmt : *const *const core::ffi::c_void, number : f64, currency : *mut u16, result : *mut u16, resultlength : i32, pos : *mut UFieldPosition, status : *mut UErrorCode) -> i32); - unsafe { unum_formatDoubleCurrency(fmt, number, core::mem::transmute(currency), core::mem::transmute(result), resultlength, core::mem::transmute(pos), core::mem::transmute(status)) } + unsafe { unum_formatDoubleCurrency(fmt, number, currency as _, result as _, resultlength, pos as _, status as _) } } #[inline] pub unsafe fn unum_formatDoubleForFields(format: *const *const core::ffi::c_void, number: f64, result: *mut u16, resultlength: i32, fpositer: *mut UFieldPositionIterator, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn unum_formatDoubleForFields(format : *const *const core::ffi::c_void, number : f64, result : *mut u16, resultlength : i32, fpositer : *mut UFieldPositionIterator, status : *mut UErrorCode) -> i32); - unsafe { unum_formatDoubleForFields(format, number, core::mem::transmute(result), resultlength, core::mem::transmute(fpositer), core::mem::transmute(status)) } + unsafe { unum_formatDoubleForFields(format, number, result as _, resultlength, fpositer as _, status as _) } } #[inline] pub unsafe fn unum_formatInt64(fmt: *const *const core::ffi::c_void, number: i64, result: *mut u16, resultlength: i32, pos: *mut UFieldPosition, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn unum_formatInt64(fmt : *const *const core::ffi::c_void, number : i64, result : *mut u16, resultlength : i32, pos : *mut UFieldPosition, status : *mut UErrorCode) -> i32); - unsafe { unum_formatInt64(fmt, number, core::mem::transmute(result), resultlength, core::mem::transmute(pos), core::mem::transmute(status)) } + unsafe { unum_formatInt64(fmt, number, result as _, resultlength, pos as _, status as _) } } #[inline] pub unsafe fn unum_formatUFormattable(fmt: *const *const core::ffi::c_void, number: *const *const core::ffi::c_void, result: *mut u16, resultlength: i32, pos: *mut UFieldPosition, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn unum_formatUFormattable(fmt : *const *const core::ffi::c_void, number : *const *const core::ffi::c_void, result : *mut u16, resultlength : i32, pos : *mut UFieldPosition, status : *mut UErrorCode) -> i32); - unsafe { unum_formatUFormattable(fmt, number, core::mem::transmute(result), resultlength, core::mem::transmute(pos), core::mem::transmute(status)) } + unsafe { unum_formatUFormattable(fmt, number, result as _, resultlength, pos as _, status as _) } } #[inline] pub unsafe fn unum_getAttribute(fmt: *const *const core::ffi::c_void, attr: UNumberFormatAttribute) -> i32 { @@ -5244,7 +5202,7 @@ pub unsafe fn unum_getAvailable(localeindex: i32) -> windows_core::PCSTR { #[inline] pub unsafe fn unum_getContext(fmt: *const *const core::ffi::c_void, r#type: UDisplayContextType, status: *mut UErrorCode) -> UDisplayContext { windows_targets::link!("icuin.dll" "cdecl" fn unum_getContext(fmt : *const *const core::ffi::c_void, r#type : UDisplayContextType, status : *mut UErrorCode) -> UDisplayContext); - unsafe { unum_getContext(fmt, r#type, core::mem::transmute(status)) } + unsafe { unum_getContext(fmt, r#type, status as _) } } #[inline] pub unsafe fn unum_getDoubleAttribute(fmt: *const *const core::ffi::c_void, attr: UNumberFormatAttribute) -> f64 { @@ -5254,17 +5212,17 @@ pub unsafe fn unum_getDoubleAttribute(fmt: *const *const core::ffi::c_void, attr #[inline] pub unsafe fn unum_getLocaleByType(fmt: *const *const core::ffi::c_void, r#type: ULocDataLocaleType, status: *mut UErrorCode) -> windows_core::PCSTR { windows_targets::link!("icuin.dll" "cdecl" fn unum_getLocaleByType(fmt : *const *const core::ffi::c_void, r#type : ULocDataLocaleType, status : *mut UErrorCode) -> windows_core::PCSTR); - unsafe { unum_getLocaleByType(fmt, r#type, core::mem::transmute(status)) } + unsafe { unum_getLocaleByType(fmt, r#type, status as _) } } #[inline] pub unsafe fn unum_getSymbol(fmt: *const *const core::ffi::c_void, symbol: UNumberFormatSymbol, buffer: *mut u16, size: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn unum_getSymbol(fmt : *const *const core::ffi::c_void, symbol : UNumberFormatSymbol, buffer : *mut u16, size : i32, status : *mut UErrorCode) -> i32); - unsafe { unum_getSymbol(fmt, symbol, core::mem::transmute(buffer), size, core::mem::transmute(status)) } + unsafe { unum_getSymbol(fmt, symbol, buffer as _, size, status as _) } } #[inline] pub unsafe fn unum_getTextAttribute(fmt: *const *const core::ffi::c_void, tag: UNumberFormatTextAttribute, result: *mut u16, resultlength: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn unum_getTextAttribute(fmt : *const *const core::ffi::c_void, tag : UNumberFormatTextAttribute, result : *mut u16, resultlength : i32, status : *mut UErrorCode) -> i32); - unsafe { unum_getTextAttribute(fmt, tag, core::mem::transmute(result), resultlength, core::mem::transmute(status)) } + unsafe { unum_getTextAttribute(fmt, tag, result as _, resultlength, status as _) } } #[inline] pub unsafe fn unum_open(style: UNumberFormatStyle, pattern: *const u16, patternlength: i32, locale: P3, parseerr: *mut UParseError, status: *mut UErrorCode) -> *mut *mut core::ffi::c_void @@ -5272,12 +5230,12 @@ where P3: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn unum_open(style : UNumberFormatStyle, pattern : *const u16, patternlength : i32, locale : windows_core::PCSTR, parseerr : *mut UParseError, status : *mut UErrorCode) -> *mut *mut core::ffi::c_void); - unsafe { unum_open(style, pattern, patternlength, locale.param().abi(), core::mem::transmute(parseerr), core::mem::transmute(status)) } + unsafe { unum_open(style, pattern, patternlength, locale.param().abi(), parseerr as _, status as _) } } #[inline] pub unsafe fn unum_parse(fmt: *const *const core::ffi::c_void, text: *const u16, textlength: i32, parsepos: *mut i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn unum_parse(fmt : *const *const core::ffi::c_void, text : *const u16, textlength : i32, parsepos : *mut i32, status : *mut UErrorCode) -> i32); - unsafe { unum_parse(fmt, text, textlength, core::mem::transmute(parsepos), core::mem::transmute(status)) } + unsafe { unum_parse(fmt, text, textlength, parsepos as _, status as _) } } #[inline] pub unsafe fn unum_parseDecimal(fmt: *const *const core::ffi::c_void, text: *const u16, textlength: i32, parsepos: *mut i32, outbuf: P4, outbuflength: i32, status: *mut UErrorCode) -> i32 @@ -5285,67 +5243,67 @@ where P4: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn unum_parseDecimal(fmt : *const *const core::ffi::c_void, text : *const u16, textlength : i32, parsepos : *mut i32, outbuf : windows_core::PCSTR, outbuflength : i32, status : *mut UErrorCode) -> i32); - unsafe { unum_parseDecimal(fmt, text, textlength, core::mem::transmute(parsepos), outbuf.param().abi(), outbuflength, core::mem::transmute(status)) } + unsafe { unum_parseDecimal(fmt, text, textlength, parsepos as _, outbuf.param().abi(), outbuflength, status as _) } } #[inline] pub unsafe fn unum_parseDouble(fmt: *const *const core::ffi::c_void, text: *const u16, textlength: i32, parsepos: *mut i32, status: *mut UErrorCode) -> f64 { windows_targets::link!("icuin.dll" "cdecl" fn unum_parseDouble(fmt : *const *const core::ffi::c_void, text : *const u16, textlength : i32, parsepos : *mut i32, status : *mut UErrorCode) -> f64); - unsafe { unum_parseDouble(fmt, text, textlength, core::mem::transmute(parsepos), core::mem::transmute(status)) } + unsafe { unum_parseDouble(fmt, text, textlength, parsepos as _, status as _) } } #[inline] pub unsafe fn unum_parseDoubleCurrency(fmt: *const *const core::ffi::c_void, text: *const u16, textlength: i32, parsepos: *mut i32, currency: *mut u16, status: *mut UErrorCode) -> f64 { windows_targets::link!("icuin.dll" "cdecl" fn unum_parseDoubleCurrency(fmt : *const *const core::ffi::c_void, text : *const u16, textlength : i32, parsepos : *mut i32, currency : *mut u16, status : *mut UErrorCode) -> f64); - unsafe { unum_parseDoubleCurrency(fmt, text, textlength, core::mem::transmute(parsepos), core::mem::transmute(currency), core::mem::transmute(status)) } + unsafe { unum_parseDoubleCurrency(fmt, text, textlength, parsepos as _, currency as _, status as _) } } #[inline] pub unsafe fn unum_parseInt64(fmt: *const *const core::ffi::c_void, text: *const u16, textlength: i32, parsepos: *mut i32, status: *mut UErrorCode) -> i64 { windows_targets::link!("icuin.dll" "cdecl" fn unum_parseInt64(fmt : *const *const core::ffi::c_void, text : *const u16, textlength : i32, parsepos : *mut i32, status : *mut UErrorCode) -> i64); - unsafe { unum_parseInt64(fmt, text, textlength, core::mem::transmute(parsepos), core::mem::transmute(status)) } + unsafe { unum_parseInt64(fmt, text, textlength, parsepos as _, status as _) } } #[inline] pub unsafe fn unum_parseToUFormattable(fmt: *const *const core::ffi::c_void, result: *mut *mut core::ffi::c_void, text: *const u16, textlength: i32, parsepos: *mut i32, status: *mut UErrorCode) -> *mut *mut core::ffi::c_void { windows_targets::link!("icuin.dll" "cdecl" fn unum_parseToUFormattable(fmt : *const *const core::ffi::c_void, result : *mut *mut core::ffi::c_void, text : *const u16, textlength : i32, parsepos : *mut i32, status : *mut UErrorCode) -> *mut *mut core::ffi::c_void); - unsafe { unum_parseToUFormattable(fmt, core::mem::transmute(result), text, textlength, core::mem::transmute(parsepos), core::mem::transmute(status)) } + unsafe { unum_parseToUFormattable(fmt, result as _, text, textlength, parsepos as _, status as _) } } #[inline] pub unsafe fn unum_setAttribute(fmt: *mut *mut core::ffi::c_void, attr: UNumberFormatAttribute, newvalue: i32) { windows_targets::link!("icuin.dll" "cdecl" fn unum_setAttribute(fmt : *mut *mut core::ffi::c_void, attr : UNumberFormatAttribute, newvalue : i32)); - unsafe { unum_setAttribute(core::mem::transmute(fmt), attr, newvalue) } + unsafe { unum_setAttribute(fmt as _, attr, newvalue) } } #[inline] pub unsafe fn unum_setContext(fmt: *mut *mut core::ffi::c_void, value: UDisplayContext, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn unum_setContext(fmt : *mut *mut core::ffi::c_void, value : UDisplayContext, status : *mut UErrorCode)); - unsafe { unum_setContext(core::mem::transmute(fmt), value, core::mem::transmute(status)) } + unsafe { unum_setContext(fmt as _, value, status as _) } } #[inline] pub unsafe fn unum_setDoubleAttribute(fmt: *mut *mut core::ffi::c_void, attr: UNumberFormatAttribute, newvalue: f64) { windows_targets::link!("icuin.dll" "cdecl" fn unum_setDoubleAttribute(fmt : *mut *mut core::ffi::c_void, attr : UNumberFormatAttribute, newvalue : f64)); - unsafe { unum_setDoubleAttribute(core::mem::transmute(fmt), attr, newvalue) } + unsafe { unum_setDoubleAttribute(fmt as _, attr, newvalue) } } #[inline] pub unsafe fn unum_setSymbol(fmt: *mut *mut core::ffi::c_void, symbol: UNumberFormatSymbol, value: *const u16, length: i32, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn unum_setSymbol(fmt : *mut *mut core::ffi::c_void, symbol : UNumberFormatSymbol, value : *const u16, length : i32, status : *mut UErrorCode)); - unsafe { unum_setSymbol(core::mem::transmute(fmt), symbol, value, length, core::mem::transmute(status)) } + unsafe { unum_setSymbol(fmt as _, symbol, value, length, status as _) } } #[inline] pub unsafe fn unum_setTextAttribute(fmt: *mut *mut core::ffi::c_void, tag: UNumberFormatTextAttribute, newvalue: *const u16, newvaluelength: i32, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn unum_setTextAttribute(fmt : *mut *mut core::ffi::c_void, tag : UNumberFormatTextAttribute, newvalue : *const u16, newvaluelength : i32, status : *mut UErrorCode)); - unsafe { unum_setTextAttribute(core::mem::transmute(fmt), tag, newvalue, newvaluelength, core::mem::transmute(status)) } + unsafe { unum_setTextAttribute(fmt as _, tag, newvalue, newvaluelength, status as _) } } #[inline] pub unsafe fn unum_toPattern(fmt: *const *const core::ffi::c_void, ispatternlocalized: i8, result: *mut u16, resultlength: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn unum_toPattern(fmt : *const *const core::ffi::c_void, ispatternlocalized : i8, result : *mut u16, resultlength : i32, status : *mut UErrorCode) -> i32); - unsafe { unum_toPattern(fmt, ispatternlocalized, core::mem::transmute(result), resultlength, core::mem::transmute(status)) } + unsafe { unum_toPattern(fmt, ispatternlocalized, result as _, resultlength, status as _) } } #[inline] pub unsafe fn unumf_close(uformatter: *mut UNumberFormatter) { windows_targets::link!("icu.dll" "cdecl" fn unumf_close(uformatter : *mut UNumberFormatter)); - unsafe { unumf_close(core::mem::transmute(uformatter)) } + unsafe { unumf_close(uformatter as _) } } #[inline] pub unsafe fn unumf_closeResult(uresult: *mut UFormattedNumber) { windows_targets::link!("icu.dll" "cdecl" fn unumf_closeResult(uresult : *mut UFormattedNumber)); - unsafe { unumf_closeResult(core::mem::transmute(uresult)) } + unsafe { unumf_closeResult(uresult as _) } } #[inline] pub unsafe fn unumf_formatDecimal(uformatter: *const UNumberFormatter, value: P1, valuelen: i32, uresult: *mut UFormattedNumber, ec: *mut UErrorCode) @@ -5353,17 +5311,17 @@ where P1: windows_core::Param, { windows_targets::link!("icu.dll" "cdecl" fn unumf_formatDecimal(uformatter : *const UNumberFormatter, value : windows_core::PCSTR, valuelen : i32, uresult : *mut UFormattedNumber, ec : *mut UErrorCode)); - unsafe { unumf_formatDecimal(uformatter, value.param().abi(), valuelen, core::mem::transmute(uresult), core::mem::transmute(ec)) } + unsafe { unumf_formatDecimal(uformatter, value.param().abi(), valuelen, uresult as _, ec as _) } } #[inline] pub unsafe fn unumf_formatDouble(uformatter: *const UNumberFormatter, value: f64, uresult: *mut UFormattedNumber, ec: *mut UErrorCode) { windows_targets::link!("icu.dll" "cdecl" fn unumf_formatDouble(uformatter : *const UNumberFormatter, value : f64, uresult : *mut UFormattedNumber, ec : *mut UErrorCode)); - unsafe { unumf_formatDouble(uformatter, value, core::mem::transmute(uresult), core::mem::transmute(ec)) } + unsafe { unumf_formatDouble(uformatter, value, uresult as _, ec as _) } } #[inline] pub unsafe fn unumf_formatInt(uformatter: *const UNumberFormatter, value: i64, uresult: *mut UFormattedNumber, ec: *mut UErrorCode) { windows_targets::link!("icu.dll" "cdecl" fn unumf_formatInt(uformatter : *const UNumberFormatter, value : i64, uresult : *mut UFormattedNumber, ec : *mut UErrorCode)); - unsafe { unumf_formatInt(uformatter, value, core::mem::transmute(uresult), core::mem::transmute(ec)) } + unsafe { unumf_formatInt(uformatter, value, uresult as _, ec as _) } } #[inline] pub unsafe fn unumf_openForSkeletonAndLocale(skeleton: *const u16, skeletonlen: i32, locale: P2, ec: *mut UErrorCode) -> *mut UNumberFormatter @@ -5371,7 +5329,7 @@ where P2: windows_core::Param, { windows_targets::link!("icu.dll" "cdecl" fn unumf_openForSkeletonAndLocale(skeleton : *const u16, skeletonlen : i32, locale : windows_core::PCSTR, ec : *mut UErrorCode) -> *mut UNumberFormatter); - unsafe { unumf_openForSkeletonAndLocale(skeleton, skeletonlen, locale.param().abi(), core::mem::transmute(ec)) } + unsafe { unumf_openForSkeletonAndLocale(skeleton, skeletonlen, locale.param().abi(), ec as _) } } #[inline] pub unsafe fn unumf_openForSkeletonAndLocaleWithError(skeleton: *const u16, skeletonlen: i32, locale: P2, perror: *mut UParseError, ec: *mut UErrorCode) -> *mut UNumberFormatter @@ -5379,42 +5337,42 @@ where P2: windows_core::Param, { windows_targets::link!("icu.dll" "cdecl" fn unumf_openForSkeletonAndLocaleWithError(skeleton : *const u16, skeletonlen : i32, locale : windows_core::PCSTR, perror : *mut UParseError, ec : *mut UErrorCode) -> *mut UNumberFormatter); - unsafe { unumf_openForSkeletonAndLocaleWithError(skeleton, skeletonlen, locale.param().abi(), core::mem::transmute(perror), core::mem::transmute(ec)) } + unsafe { unumf_openForSkeletonAndLocaleWithError(skeleton, skeletonlen, locale.param().abi(), perror as _, ec as _) } } #[inline] pub unsafe fn unumf_openResult(ec: *mut UErrorCode) -> *mut UFormattedNumber { windows_targets::link!("icu.dll" "cdecl" fn unumf_openResult(ec : *mut UErrorCode) -> *mut UFormattedNumber); - unsafe { unumf_openResult(core::mem::transmute(ec)) } + unsafe { unumf_openResult(ec as _) } } #[inline] pub unsafe fn unumf_resultAsValue(uresult: *const UFormattedNumber, ec: *mut UErrorCode) -> *mut UFormattedValue { windows_targets::link!("icu.dll" "cdecl" fn unumf_resultAsValue(uresult : *const UFormattedNumber, ec : *mut UErrorCode) -> *mut UFormattedValue); - unsafe { unumf_resultAsValue(uresult, core::mem::transmute(ec)) } + unsafe { unumf_resultAsValue(uresult, ec as _) } } #[inline] pub unsafe fn unumf_resultGetAllFieldPositions(uresult: *const UFormattedNumber, ufpositer: *mut UFieldPositionIterator, ec: *mut UErrorCode) { windows_targets::link!("icu.dll" "cdecl" fn unumf_resultGetAllFieldPositions(uresult : *const UFormattedNumber, ufpositer : *mut UFieldPositionIterator, ec : *mut UErrorCode)); - unsafe { unumf_resultGetAllFieldPositions(uresult, core::mem::transmute(ufpositer), core::mem::transmute(ec)) } + unsafe { unumf_resultGetAllFieldPositions(uresult, ufpositer as _, ec as _) } } #[inline] pub unsafe fn unumf_resultNextFieldPosition(uresult: *const UFormattedNumber, ufpos: *mut UFieldPosition, ec: *mut UErrorCode) -> i8 { windows_targets::link!("icu.dll" "cdecl" fn unumf_resultNextFieldPosition(uresult : *const UFormattedNumber, ufpos : *mut UFieldPosition, ec : *mut UErrorCode) -> i8); - unsafe { unumf_resultNextFieldPosition(uresult, core::mem::transmute(ufpos), core::mem::transmute(ec)) } + unsafe { unumf_resultNextFieldPosition(uresult, ufpos as _, ec as _) } } #[inline] pub unsafe fn unumf_resultToString(uresult: *const UFormattedNumber, buffer: *mut u16, buffercapacity: i32, ec: *mut UErrorCode) -> i32 { windows_targets::link!("icu.dll" "cdecl" fn unumf_resultToString(uresult : *const UFormattedNumber, buffer : *mut u16, buffercapacity : i32, ec : *mut UErrorCode) -> i32); - unsafe { unumf_resultToString(uresult, core::mem::transmute(buffer), buffercapacity, core::mem::transmute(ec)) } + unsafe { unumf_resultToString(uresult, buffer as _, buffercapacity, ec as _) } } #[inline] pub unsafe fn unumsys_close(unumsys: *mut UNumberingSystem) { windows_targets::link!("icuin.dll" "cdecl" fn unumsys_close(unumsys : *mut UNumberingSystem)); - unsafe { unumsys_close(core::mem::transmute(unumsys)) } + unsafe { unumsys_close(unumsys as _) } } #[inline] pub unsafe fn unumsys_getDescription(unumsys: *const UNumberingSystem, result: *mut u16, resultlength: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn unumsys_getDescription(unumsys : *const UNumberingSystem, result : *mut u16, resultlength : i32, status : *mut UErrorCode) -> i32); - unsafe { unumsys_getDescription(unumsys, core::mem::transmute(result), resultlength, core::mem::transmute(status)) } + unsafe { unumsys_getDescription(unumsys, result as _, resultlength, status as _) } } #[inline] pub unsafe fn unumsys_getName(unumsys: *const UNumberingSystem) -> windows_core::PCSTR { @@ -5437,12 +5395,12 @@ where P0: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn unumsys_open(locale : windows_core::PCSTR, status : *mut UErrorCode) -> *mut UNumberingSystem); - unsafe { unumsys_open(locale.param().abi(), core::mem::transmute(status)) } + unsafe { unumsys_open(locale.param().abi(), status as _) } } #[inline] pub unsafe fn unumsys_openAvailableNames(status: *mut UErrorCode) -> *mut UEnumeration { windows_targets::link!("icuin.dll" "cdecl" fn unumsys_openAvailableNames(status : *mut UErrorCode) -> *mut UEnumeration); - unsafe { unumsys_openAvailableNames(core::mem::transmute(status)) } + unsafe { unumsys_openAvailableNames(status as _) } } #[inline] pub unsafe fn unumsys_openByName(name: P0, status: *mut UErrorCode) -> *mut UNumberingSystem @@ -5450,17 +5408,17 @@ where P0: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn unumsys_openByName(name : windows_core::PCSTR, status : *mut UErrorCode) -> *mut UNumberingSystem); - unsafe { unumsys_openByName(name.param().abi(), core::mem::transmute(status)) } + unsafe { unumsys_openByName(name.param().abi(), status as _) } } #[inline] pub unsafe fn uplrules_close(uplrules: *mut UPluralRules) { windows_targets::link!("icuin.dll" "cdecl" fn uplrules_close(uplrules : *mut UPluralRules)); - unsafe { uplrules_close(core::mem::transmute(uplrules)) } + unsafe { uplrules_close(uplrules as _) } } #[inline] pub unsafe fn uplrules_getKeywords(uplrules: *const UPluralRules, status: *mut UErrorCode) -> *mut UEnumeration { windows_targets::link!("icuin.dll" "cdecl" fn uplrules_getKeywords(uplrules : *const UPluralRules, status : *mut UErrorCode) -> *mut UEnumeration); - unsafe { uplrules_getKeywords(uplrules, core::mem::transmute(status)) } + unsafe { uplrules_getKeywords(uplrules, status as _) } } #[inline] pub unsafe fn uplrules_open(locale: P0, status: *mut UErrorCode) -> *mut UPluralRules @@ -5468,7 +5426,7 @@ where P0: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn uplrules_open(locale : windows_core::PCSTR, status : *mut UErrorCode) -> *mut UPluralRules); - unsafe { uplrules_open(locale.param().abi(), core::mem::transmute(status)) } + unsafe { uplrules_open(locale.param().abi(), status as _) } } #[inline] pub unsafe fn uplrules_openForType(locale: P0, r#type: UPluralType, status: *mut UErrorCode) -> *mut UPluralRules @@ -5476,117 +5434,117 @@ where P0: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn uplrules_openForType(locale : windows_core::PCSTR, r#type : UPluralType, status : *mut UErrorCode) -> *mut UPluralRules); - unsafe { uplrules_openForType(locale.param().abi(), r#type, core::mem::transmute(status)) } + unsafe { uplrules_openForType(locale.param().abi(), r#type, status as _) } } #[inline] pub unsafe fn uplrules_select(uplrules: *const UPluralRules, number: f64, keyword: *mut u16, capacity: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn uplrules_select(uplrules : *const UPluralRules, number : f64, keyword : *mut u16, capacity : i32, status : *mut UErrorCode) -> i32); - unsafe { uplrules_select(uplrules, number, core::mem::transmute(keyword), capacity, core::mem::transmute(status)) } + unsafe { uplrules_select(uplrules, number, keyword as _, capacity, status as _) } } #[inline] pub unsafe fn uplrules_selectFormatted(uplrules: *const UPluralRules, number: *const UFormattedNumber, keyword: *mut u16, capacity: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icu.dll" "cdecl" fn uplrules_selectFormatted(uplrules : *const UPluralRules, number : *const UFormattedNumber, keyword : *mut u16, capacity : i32, status : *mut UErrorCode) -> i32); - unsafe { uplrules_selectFormatted(uplrules, number, core::mem::transmute(keyword), capacity, core::mem::transmute(status)) } + unsafe { uplrules_selectFormatted(uplrules, number, keyword as _, capacity, status as _) } } #[inline] pub unsafe fn uregex_appendReplacement(regexp: *mut URegularExpression, replacementtext: *const u16, replacementlength: i32, destbuf: *mut *mut u16, destcapacity: *mut i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_appendReplacement(regexp : *mut URegularExpression, replacementtext : *const u16, replacementlength : i32, destbuf : *mut *mut u16, destcapacity : *mut i32, status : *mut UErrorCode) -> i32); - unsafe { uregex_appendReplacement(core::mem::transmute(regexp), replacementtext, replacementlength, core::mem::transmute(destbuf), core::mem::transmute(destcapacity), core::mem::transmute(status)) } + unsafe { uregex_appendReplacement(regexp as _, replacementtext, replacementlength, destbuf as _, destcapacity as _, status as _) } } #[inline] pub unsafe fn uregex_appendReplacementUText(regexp: *mut URegularExpression, replacementtext: *mut UText, dest: *mut UText, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn uregex_appendReplacementUText(regexp : *mut URegularExpression, replacementtext : *mut UText, dest : *mut UText, status : *mut UErrorCode)); - unsafe { uregex_appendReplacementUText(core::mem::transmute(regexp), core::mem::transmute(replacementtext), core::mem::transmute(dest), core::mem::transmute(status)) } + unsafe { uregex_appendReplacementUText(regexp as _, replacementtext as _, dest as _, status as _) } } #[inline] pub unsafe fn uregex_appendTail(regexp: *mut URegularExpression, destbuf: *mut *mut u16, destcapacity: *mut i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_appendTail(regexp : *mut URegularExpression, destbuf : *mut *mut u16, destcapacity : *mut i32, status : *mut UErrorCode) -> i32); - unsafe { uregex_appendTail(core::mem::transmute(regexp), core::mem::transmute(destbuf), core::mem::transmute(destcapacity), core::mem::transmute(status)) } + unsafe { uregex_appendTail(regexp as _, destbuf as _, destcapacity as _, status as _) } } #[inline] pub unsafe fn uregex_appendTailUText(regexp: *mut URegularExpression, dest: *mut UText, status: *mut UErrorCode) -> *mut UText { windows_targets::link!("icuin.dll" "cdecl" fn uregex_appendTailUText(regexp : *mut URegularExpression, dest : *mut UText, status : *mut UErrorCode) -> *mut UText); - unsafe { uregex_appendTailUText(core::mem::transmute(regexp), core::mem::transmute(dest), core::mem::transmute(status)) } + unsafe { uregex_appendTailUText(regexp as _, dest as _, status as _) } } #[inline] pub unsafe fn uregex_clone(regexp: *const URegularExpression, status: *mut UErrorCode) -> *mut URegularExpression { windows_targets::link!("icuin.dll" "cdecl" fn uregex_clone(regexp : *const URegularExpression, status : *mut UErrorCode) -> *mut URegularExpression); - unsafe { uregex_clone(regexp, core::mem::transmute(status)) } + unsafe { uregex_clone(regexp, status as _) } } #[inline] pub unsafe fn uregex_close(regexp: *mut URegularExpression) { windows_targets::link!("icuin.dll" "cdecl" fn uregex_close(regexp : *mut URegularExpression)); - unsafe { uregex_close(core::mem::transmute(regexp)) } + unsafe { uregex_close(regexp as _) } } #[inline] pub unsafe fn uregex_end(regexp: *mut URegularExpression, groupnum: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_end(regexp : *mut URegularExpression, groupnum : i32, status : *mut UErrorCode) -> i32); - unsafe { uregex_end(core::mem::transmute(regexp), groupnum, core::mem::transmute(status)) } + unsafe { uregex_end(regexp as _, groupnum, status as _) } } #[inline] pub unsafe fn uregex_end64(regexp: *mut URegularExpression, groupnum: i32, status: *mut UErrorCode) -> i64 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_end64(regexp : *mut URegularExpression, groupnum : i32, status : *mut UErrorCode) -> i64); - unsafe { uregex_end64(core::mem::transmute(regexp), groupnum, core::mem::transmute(status)) } + unsafe { uregex_end64(regexp as _, groupnum, status as _) } } #[inline] pub unsafe fn uregex_find(regexp: *mut URegularExpression, startindex: i32, status: *mut UErrorCode) -> i8 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_find(regexp : *mut URegularExpression, startindex : i32, status : *mut UErrorCode) -> i8); - unsafe { uregex_find(core::mem::transmute(regexp), startindex, core::mem::transmute(status)) } + unsafe { uregex_find(regexp as _, startindex, status as _) } } #[inline] pub unsafe fn uregex_find64(regexp: *mut URegularExpression, startindex: i64, status: *mut UErrorCode) -> i8 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_find64(regexp : *mut URegularExpression, startindex : i64, status : *mut UErrorCode) -> i8); - unsafe { uregex_find64(core::mem::transmute(regexp), startindex, core::mem::transmute(status)) } + unsafe { uregex_find64(regexp as _, startindex, status as _) } } #[inline] pub unsafe fn uregex_findNext(regexp: *mut URegularExpression, status: *mut UErrorCode) -> i8 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_findNext(regexp : *mut URegularExpression, status : *mut UErrorCode) -> i8); - unsafe { uregex_findNext(core::mem::transmute(regexp), core::mem::transmute(status)) } + unsafe { uregex_findNext(regexp as _, status as _) } } #[inline] pub unsafe fn uregex_flags(regexp: *const URegularExpression, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_flags(regexp : *const URegularExpression, status : *mut UErrorCode) -> i32); - unsafe { uregex_flags(regexp, core::mem::transmute(status)) } + unsafe { uregex_flags(regexp, status as _) } } #[inline] pub unsafe fn uregex_getFindProgressCallback(regexp: *const URegularExpression, callback: *mut URegexFindProgressCallback, context: *const *const core::ffi::c_void, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn uregex_getFindProgressCallback(regexp : *const URegularExpression, callback : *mut URegexFindProgressCallback, context : *const *const core::ffi::c_void, status : *mut UErrorCode)); - unsafe { uregex_getFindProgressCallback(regexp, core::mem::transmute(callback), context, core::mem::transmute(status)) } + unsafe { uregex_getFindProgressCallback(regexp, callback as _, context, status as _) } } #[inline] pub unsafe fn uregex_getMatchCallback(regexp: *const URegularExpression, callback: *mut URegexMatchCallback, context: *const *const core::ffi::c_void, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn uregex_getMatchCallback(regexp : *const URegularExpression, callback : *mut URegexMatchCallback, context : *const *const core::ffi::c_void, status : *mut UErrorCode)); - unsafe { uregex_getMatchCallback(regexp, core::mem::transmute(callback), context, core::mem::transmute(status)) } + unsafe { uregex_getMatchCallback(regexp, callback as _, context, status as _) } } #[inline] pub unsafe fn uregex_getStackLimit(regexp: *const URegularExpression, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_getStackLimit(regexp : *const URegularExpression, status : *mut UErrorCode) -> i32); - unsafe { uregex_getStackLimit(regexp, core::mem::transmute(status)) } + unsafe { uregex_getStackLimit(regexp, status as _) } } #[inline] pub unsafe fn uregex_getText(regexp: *mut URegularExpression, textlength: *mut i32, status: *mut UErrorCode) -> *mut u16 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_getText(regexp : *mut URegularExpression, textlength : *mut i32, status : *mut UErrorCode) -> *mut u16); - unsafe { uregex_getText(core::mem::transmute(regexp), core::mem::transmute(textlength), core::mem::transmute(status)) } + unsafe { uregex_getText(regexp as _, textlength as _, status as _) } } #[inline] pub unsafe fn uregex_getTimeLimit(regexp: *const URegularExpression, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_getTimeLimit(regexp : *const URegularExpression, status : *mut UErrorCode) -> i32); - unsafe { uregex_getTimeLimit(regexp, core::mem::transmute(status)) } + unsafe { uregex_getTimeLimit(regexp, status as _) } } #[inline] pub unsafe fn uregex_getUText(regexp: *mut URegularExpression, dest: *mut UText, status: *mut UErrorCode) -> *mut UText { windows_targets::link!("icuin.dll" "cdecl" fn uregex_getUText(regexp : *mut URegularExpression, dest : *mut UText, status : *mut UErrorCode) -> *mut UText); - unsafe { uregex_getUText(core::mem::transmute(regexp), core::mem::transmute(dest), core::mem::transmute(status)) } + unsafe { uregex_getUText(regexp as _, dest as _, status as _) } } #[inline] pub unsafe fn uregex_group(regexp: *mut URegularExpression, groupnum: i32, dest: *mut u16, destcapacity: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_group(regexp : *mut URegularExpression, groupnum : i32, dest : *mut u16, destcapacity : i32, status : *mut UErrorCode) -> i32); - unsafe { uregex_group(core::mem::transmute(regexp), groupnum, core::mem::transmute(dest), destcapacity, core::mem::transmute(status)) } + unsafe { uregex_group(regexp as _, groupnum, dest as _, destcapacity, status as _) } } #[inline] pub unsafe fn uregex_groupCount(regexp: *mut URegularExpression, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_groupCount(regexp : *mut URegularExpression, status : *mut UErrorCode) -> i32); - unsafe { uregex_groupCount(core::mem::transmute(regexp), core::mem::transmute(status)) } + unsafe { uregex_groupCount(regexp as _, status as _) } } #[inline] pub unsafe fn uregex_groupNumberFromCName(regexp: *mut URegularExpression, groupname: P1, namelength: i32, status: *mut UErrorCode) -> i32 @@ -5594,57 +5552,57 @@ where P1: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn uregex_groupNumberFromCName(regexp : *mut URegularExpression, groupname : windows_core::PCSTR, namelength : i32, status : *mut UErrorCode) -> i32); - unsafe { uregex_groupNumberFromCName(core::mem::transmute(regexp), groupname.param().abi(), namelength, core::mem::transmute(status)) } + unsafe { uregex_groupNumberFromCName(regexp as _, groupname.param().abi(), namelength, status as _) } } #[inline] pub unsafe fn uregex_groupNumberFromName(regexp: *mut URegularExpression, groupname: *const u16, namelength: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_groupNumberFromName(regexp : *mut URegularExpression, groupname : *const u16, namelength : i32, status : *mut UErrorCode) -> i32); - unsafe { uregex_groupNumberFromName(core::mem::transmute(regexp), groupname, namelength, core::mem::transmute(status)) } + unsafe { uregex_groupNumberFromName(regexp as _, groupname, namelength, status as _) } } #[inline] pub unsafe fn uregex_groupUText(regexp: *mut URegularExpression, groupnum: i32, dest: *mut UText, grouplength: *mut i64, status: *mut UErrorCode) -> *mut UText { windows_targets::link!("icuin.dll" "cdecl" fn uregex_groupUText(regexp : *mut URegularExpression, groupnum : i32, dest : *mut UText, grouplength : *mut i64, status : *mut UErrorCode) -> *mut UText); - unsafe { uregex_groupUText(core::mem::transmute(regexp), groupnum, core::mem::transmute(dest), core::mem::transmute(grouplength), core::mem::transmute(status)) } + unsafe { uregex_groupUText(regexp as _, groupnum, dest as _, grouplength as _, status as _) } } #[inline] pub unsafe fn uregex_hasAnchoringBounds(regexp: *const URegularExpression, status: *mut UErrorCode) -> i8 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_hasAnchoringBounds(regexp : *const URegularExpression, status : *mut UErrorCode) -> i8); - unsafe { uregex_hasAnchoringBounds(regexp, core::mem::transmute(status)) } + unsafe { uregex_hasAnchoringBounds(regexp, status as _) } } #[inline] pub unsafe fn uregex_hasTransparentBounds(regexp: *const URegularExpression, status: *mut UErrorCode) -> i8 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_hasTransparentBounds(regexp : *const URegularExpression, status : *mut UErrorCode) -> i8); - unsafe { uregex_hasTransparentBounds(regexp, core::mem::transmute(status)) } + unsafe { uregex_hasTransparentBounds(regexp, status as _) } } #[inline] pub unsafe fn uregex_hitEnd(regexp: *const URegularExpression, status: *mut UErrorCode) -> i8 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_hitEnd(regexp : *const URegularExpression, status : *mut UErrorCode) -> i8); - unsafe { uregex_hitEnd(regexp, core::mem::transmute(status)) } + unsafe { uregex_hitEnd(regexp, status as _) } } #[inline] pub unsafe fn uregex_lookingAt(regexp: *mut URegularExpression, startindex: i32, status: *mut UErrorCode) -> i8 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_lookingAt(regexp : *mut URegularExpression, startindex : i32, status : *mut UErrorCode) -> i8); - unsafe { uregex_lookingAt(core::mem::transmute(regexp), startindex, core::mem::transmute(status)) } + unsafe { uregex_lookingAt(regexp as _, startindex, status as _) } } #[inline] pub unsafe fn uregex_lookingAt64(regexp: *mut URegularExpression, startindex: i64, status: *mut UErrorCode) -> i8 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_lookingAt64(regexp : *mut URegularExpression, startindex : i64, status : *mut UErrorCode) -> i8); - unsafe { uregex_lookingAt64(core::mem::transmute(regexp), startindex, core::mem::transmute(status)) } + unsafe { uregex_lookingAt64(regexp as _, startindex, status as _) } } #[inline] pub unsafe fn uregex_matches(regexp: *mut URegularExpression, startindex: i32, status: *mut UErrorCode) -> i8 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_matches(regexp : *mut URegularExpression, startindex : i32, status : *mut UErrorCode) -> i8); - unsafe { uregex_matches(core::mem::transmute(regexp), startindex, core::mem::transmute(status)) } + unsafe { uregex_matches(regexp as _, startindex, status as _) } } #[inline] pub unsafe fn uregex_matches64(regexp: *mut URegularExpression, startindex: i64, status: *mut UErrorCode) -> i8 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_matches64(regexp : *mut URegularExpression, startindex : i64, status : *mut UErrorCode) -> i8); - unsafe { uregex_matches64(core::mem::transmute(regexp), startindex, core::mem::transmute(status)) } + unsafe { uregex_matches64(regexp as _, startindex, status as _) } } #[inline] pub unsafe fn uregex_open(pattern: *const u16, patternlength: i32, flags: u32, pe: *mut UParseError, status: *mut UErrorCode) -> *mut URegularExpression { windows_targets::link!("icuin.dll" "cdecl" fn uregex_open(pattern : *const u16, patternlength : i32, flags : u32, pe : *mut UParseError, status : *mut UErrorCode) -> *mut URegularExpression); - unsafe { uregex_open(pattern, patternlength, flags, core::mem::transmute(pe), core::mem::transmute(status)) } + unsafe { uregex_open(pattern, patternlength, flags, pe as _, status as _) } } #[inline] pub unsafe fn uregex_openC(pattern: P0, flags: u32, pe: *mut UParseError, status: *mut UErrorCode) -> *mut URegularExpression @@ -5652,157 +5610,157 @@ where P0: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn uregex_openC(pattern : windows_core::PCSTR, flags : u32, pe : *mut UParseError, status : *mut UErrorCode) -> *mut URegularExpression); - unsafe { uregex_openC(pattern.param().abi(), flags, core::mem::transmute(pe), core::mem::transmute(status)) } + unsafe { uregex_openC(pattern.param().abi(), flags, pe as _, status as _) } } #[inline] pub unsafe fn uregex_openUText(pattern: *mut UText, flags: u32, pe: *mut UParseError, status: *mut UErrorCode) -> *mut URegularExpression { windows_targets::link!("icuin.dll" "cdecl" fn uregex_openUText(pattern : *mut UText, flags : u32, pe : *mut UParseError, status : *mut UErrorCode) -> *mut URegularExpression); - unsafe { uregex_openUText(core::mem::transmute(pattern), flags, core::mem::transmute(pe), core::mem::transmute(status)) } + unsafe { uregex_openUText(pattern as _, flags, pe as _, status as _) } } #[inline] pub unsafe fn uregex_pattern(regexp: *const URegularExpression, patlength: *mut i32, status: *mut UErrorCode) -> *mut u16 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_pattern(regexp : *const URegularExpression, patlength : *mut i32, status : *mut UErrorCode) -> *mut u16); - unsafe { uregex_pattern(regexp, core::mem::transmute(patlength), core::mem::transmute(status)) } + unsafe { uregex_pattern(regexp, patlength as _, status as _) } } #[inline] pub unsafe fn uregex_patternUText(regexp: *const URegularExpression, status: *mut UErrorCode) -> *mut UText { windows_targets::link!("icuin.dll" "cdecl" fn uregex_patternUText(regexp : *const URegularExpression, status : *mut UErrorCode) -> *mut UText); - unsafe { uregex_patternUText(regexp, core::mem::transmute(status)) } + unsafe { uregex_patternUText(regexp, status as _) } } #[inline] pub unsafe fn uregex_refreshUText(regexp: *mut URegularExpression, text: *mut UText, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn uregex_refreshUText(regexp : *mut URegularExpression, text : *mut UText, status : *mut UErrorCode)); - unsafe { uregex_refreshUText(core::mem::transmute(regexp), core::mem::transmute(text), core::mem::transmute(status)) } + unsafe { uregex_refreshUText(regexp as _, text as _, status as _) } } #[inline] pub unsafe fn uregex_regionEnd(regexp: *const URegularExpression, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_regionEnd(regexp : *const URegularExpression, status : *mut UErrorCode) -> i32); - unsafe { uregex_regionEnd(regexp, core::mem::transmute(status)) } + unsafe { uregex_regionEnd(regexp, status as _) } } #[inline] pub unsafe fn uregex_regionEnd64(regexp: *const URegularExpression, status: *mut UErrorCode) -> i64 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_regionEnd64(regexp : *const URegularExpression, status : *mut UErrorCode) -> i64); - unsafe { uregex_regionEnd64(regexp, core::mem::transmute(status)) } + unsafe { uregex_regionEnd64(regexp, status as _) } } #[inline] pub unsafe fn uregex_regionStart(regexp: *const URegularExpression, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_regionStart(regexp : *const URegularExpression, status : *mut UErrorCode) -> i32); - unsafe { uregex_regionStart(regexp, core::mem::transmute(status)) } + unsafe { uregex_regionStart(regexp, status as _) } } #[inline] pub unsafe fn uregex_regionStart64(regexp: *const URegularExpression, status: *mut UErrorCode) -> i64 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_regionStart64(regexp : *const URegularExpression, status : *mut UErrorCode) -> i64); - unsafe { uregex_regionStart64(regexp, core::mem::transmute(status)) } + unsafe { uregex_regionStart64(regexp, status as _) } } #[inline] pub unsafe fn uregex_replaceAll(regexp: *mut URegularExpression, replacementtext: *const u16, replacementlength: i32, destbuf: *mut u16, destcapacity: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_replaceAll(regexp : *mut URegularExpression, replacementtext : *const u16, replacementlength : i32, destbuf : *mut u16, destcapacity : i32, status : *mut UErrorCode) -> i32); - unsafe { uregex_replaceAll(core::mem::transmute(regexp), replacementtext, replacementlength, core::mem::transmute(destbuf), destcapacity, core::mem::transmute(status)) } + unsafe { uregex_replaceAll(regexp as _, replacementtext, replacementlength, destbuf as _, destcapacity, status as _) } } #[inline] pub unsafe fn uregex_replaceAllUText(regexp: *mut URegularExpression, replacement: *mut UText, dest: *mut UText, status: *mut UErrorCode) -> *mut UText { windows_targets::link!("icuin.dll" "cdecl" fn uregex_replaceAllUText(regexp : *mut URegularExpression, replacement : *mut UText, dest : *mut UText, status : *mut UErrorCode) -> *mut UText); - unsafe { uregex_replaceAllUText(core::mem::transmute(regexp), core::mem::transmute(replacement), core::mem::transmute(dest), core::mem::transmute(status)) } + unsafe { uregex_replaceAllUText(regexp as _, replacement as _, dest as _, status as _) } } #[inline] pub unsafe fn uregex_replaceFirst(regexp: *mut URegularExpression, replacementtext: *const u16, replacementlength: i32, destbuf: *mut u16, destcapacity: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_replaceFirst(regexp : *mut URegularExpression, replacementtext : *const u16, replacementlength : i32, destbuf : *mut u16, destcapacity : i32, status : *mut UErrorCode) -> i32); - unsafe { uregex_replaceFirst(core::mem::transmute(regexp), replacementtext, replacementlength, core::mem::transmute(destbuf), destcapacity, core::mem::transmute(status)) } + unsafe { uregex_replaceFirst(regexp as _, replacementtext, replacementlength, destbuf as _, destcapacity, status as _) } } #[inline] pub unsafe fn uregex_replaceFirstUText(regexp: *mut URegularExpression, replacement: *mut UText, dest: *mut UText, status: *mut UErrorCode) -> *mut UText { windows_targets::link!("icuin.dll" "cdecl" fn uregex_replaceFirstUText(regexp : *mut URegularExpression, replacement : *mut UText, dest : *mut UText, status : *mut UErrorCode) -> *mut UText); - unsafe { uregex_replaceFirstUText(core::mem::transmute(regexp), core::mem::transmute(replacement), core::mem::transmute(dest), core::mem::transmute(status)) } + unsafe { uregex_replaceFirstUText(regexp as _, replacement as _, dest as _, status as _) } } #[inline] pub unsafe fn uregex_requireEnd(regexp: *const URegularExpression, status: *mut UErrorCode) -> i8 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_requireEnd(regexp : *const URegularExpression, status : *mut UErrorCode) -> i8); - unsafe { uregex_requireEnd(regexp, core::mem::transmute(status)) } + unsafe { uregex_requireEnd(regexp, status as _) } } #[inline] pub unsafe fn uregex_reset(regexp: *mut URegularExpression, index: i32, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn uregex_reset(regexp : *mut URegularExpression, index : i32, status : *mut UErrorCode)); - unsafe { uregex_reset(core::mem::transmute(regexp), index, core::mem::transmute(status)) } + unsafe { uregex_reset(regexp as _, index, status as _) } } #[inline] pub unsafe fn uregex_reset64(regexp: *mut URegularExpression, index: i64, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn uregex_reset64(regexp : *mut URegularExpression, index : i64, status : *mut UErrorCode)); - unsafe { uregex_reset64(core::mem::transmute(regexp), index, core::mem::transmute(status)) } + unsafe { uregex_reset64(regexp as _, index, status as _) } } #[inline] pub unsafe fn uregex_setFindProgressCallback(regexp: *mut URegularExpression, callback: URegexFindProgressCallback, context: *const core::ffi::c_void, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn uregex_setFindProgressCallback(regexp : *mut URegularExpression, callback : URegexFindProgressCallback, context : *const core::ffi::c_void, status : *mut UErrorCode)); - unsafe { uregex_setFindProgressCallback(core::mem::transmute(regexp), callback, context, core::mem::transmute(status)) } + unsafe { uregex_setFindProgressCallback(regexp as _, callback, context, status as _) } } #[inline] pub unsafe fn uregex_setMatchCallback(regexp: *mut URegularExpression, callback: URegexMatchCallback, context: *const core::ffi::c_void, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn uregex_setMatchCallback(regexp : *mut URegularExpression, callback : URegexMatchCallback, context : *const core::ffi::c_void, status : *mut UErrorCode)); - unsafe { uregex_setMatchCallback(core::mem::transmute(regexp), callback, context, core::mem::transmute(status)) } + unsafe { uregex_setMatchCallback(regexp as _, callback, context, status as _) } } #[inline] pub unsafe fn uregex_setRegion(regexp: *mut URegularExpression, regionstart: i32, regionlimit: i32, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn uregex_setRegion(regexp : *mut URegularExpression, regionstart : i32, regionlimit : i32, status : *mut UErrorCode)); - unsafe { uregex_setRegion(core::mem::transmute(regexp), regionstart, regionlimit, core::mem::transmute(status)) } + unsafe { uregex_setRegion(regexp as _, regionstart, regionlimit, status as _) } } #[inline] pub unsafe fn uregex_setRegion64(regexp: *mut URegularExpression, regionstart: i64, regionlimit: i64, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn uregex_setRegion64(regexp : *mut URegularExpression, regionstart : i64, regionlimit : i64, status : *mut UErrorCode)); - unsafe { uregex_setRegion64(core::mem::transmute(regexp), regionstart, regionlimit, core::mem::transmute(status)) } + unsafe { uregex_setRegion64(regexp as _, regionstart, regionlimit, status as _) } } #[inline] pub unsafe fn uregex_setRegionAndStart(regexp: *mut URegularExpression, regionstart: i64, regionlimit: i64, startindex: i64, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn uregex_setRegionAndStart(regexp : *mut URegularExpression, regionstart : i64, regionlimit : i64, startindex : i64, status : *mut UErrorCode)); - unsafe { uregex_setRegionAndStart(core::mem::transmute(regexp), regionstart, regionlimit, startindex, core::mem::transmute(status)) } + unsafe { uregex_setRegionAndStart(regexp as _, regionstart, regionlimit, startindex, status as _) } } #[inline] pub unsafe fn uregex_setStackLimit(regexp: *mut URegularExpression, limit: i32, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn uregex_setStackLimit(regexp : *mut URegularExpression, limit : i32, status : *mut UErrorCode)); - unsafe { uregex_setStackLimit(core::mem::transmute(regexp), limit, core::mem::transmute(status)) } + unsafe { uregex_setStackLimit(regexp as _, limit, status as _) } } #[inline] pub unsafe fn uregex_setText(regexp: *mut URegularExpression, text: *const u16, textlength: i32, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn uregex_setText(regexp : *mut URegularExpression, text : *const u16, textlength : i32, status : *mut UErrorCode)); - unsafe { uregex_setText(core::mem::transmute(regexp), text, textlength, core::mem::transmute(status)) } + unsafe { uregex_setText(regexp as _, text, textlength, status as _) } } #[inline] pub unsafe fn uregex_setTimeLimit(regexp: *mut URegularExpression, limit: i32, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn uregex_setTimeLimit(regexp : *mut URegularExpression, limit : i32, status : *mut UErrorCode)); - unsafe { uregex_setTimeLimit(core::mem::transmute(regexp), limit, core::mem::transmute(status)) } + unsafe { uregex_setTimeLimit(regexp as _, limit, status as _) } } #[inline] pub unsafe fn uregex_setUText(regexp: *mut URegularExpression, text: *mut UText, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn uregex_setUText(regexp : *mut URegularExpression, text : *mut UText, status : *mut UErrorCode)); - unsafe { uregex_setUText(core::mem::transmute(regexp), core::mem::transmute(text), core::mem::transmute(status)) } + unsafe { uregex_setUText(regexp as _, text as _, status as _) } } #[inline] pub unsafe fn uregex_split(regexp: *mut URegularExpression, destbuf: *mut u16, destcapacity: i32, requiredcapacity: *mut i32, destfields: *mut *mut u16, destfieldscapacity: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_split(regexp : *mut URegularExpression, destbuf : *mut u16, destcapacity : i32, requiredcapacity : *mut i32, destfields : *mut *mut u16, destfieldscapacity : i32, status : *mut UErrorCode) -> i32); - unsafe { uregex_split(core::mem::transmute(regexp), core::mem::transmute(destbuf), destcapacity, core::mem::transmute(requiredcapacity), core::mem::transmute(destfields), destfieldscapacity, core::mem::transmute(status)) } + unsafe { uregex_split(regexp as _, destbuf as _, destcapacity, requiredcapacity as _, destfields as _, destfieldscapacity, status as _) } } #[inline] pub unsafe fn uregex_splitUText(regexp: *mut URegularExpression, destfields: *mut *mut UText, destfieldscapacity: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_splitUText(regexp : *mut URegularExpression, destfields : *mut *mut UText, destfieldscapacity : i32, status : *mut UErrorCode) -> i32); - unsafe { uregex_splitUText(core::mem::transmute(regexp), core::mem::transmute(destfields), destfieldscapacity, core::mem::transmute(status)) } + unsafe { uregex_splitUText(regexp as _, destfields as _, destfieldscapacity, status as _) } } #[inline] pub unsafe fn uregex_start(regexp: *mut URegularExpression, groupnum: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_start(regexp : *mut URegularExpression, groupnum : i32, status : *mut UErrorCode) -> i32); - unsafe { uregex_start(core::mem::transmute(regexp), groupnum, core::mem::transmute(status)) } + unsafe { uregex_start(regexp as _, groupnum, status as _) } } #[inline] pub unsafe fn uregex_start64(regexp: *mut URegularExpression, groupnum: i32, status: *mut UErrorCode) -> i64 { windows_targets::link!("icuin.dll" "cdecl" fn uregex_start64(regexp : *mut URegularExpression, groupnum : i32, status : *mut UErrorCode) -> i64); - unsafe { uregex_start64(core::mem::transmute(regexp), groupnum, core::mem::transmute(status)) } + unsafe { uregex_start64(regexp as _, groupnum, status as _) } } #[inline] pub unsafe fn uregex_useAnchoringBounds(regexp: *mut URegularExpression, b: i8, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn uregex_useAnchoringBounds(regexp : *mut URegularExpression, b : i8, status : *mut UErrorCode)); - unsafe { uregex_useAnchoringBounds(core::mem::transmute(regexp), b, core::mem::transmute(status)) } + unsafe { uregex_useAnchoringBounds(regexp as _, b, status as _) } } #[inline] pub unsafe fn uregex_useTransparentBounds(regexp: *mut URegularExpression, b: i8, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn uregex_useTransparentBounds(regexp : *mut URegularExpression, b : i8, status : *mut UErrorCode)); - unsafe { uregex_useTransparentBounds(core::mem::transmute(regexp), b, core::mem::transmute(status)) } + unsafe { uregex_useTransparentBounds(regexp as _, b, status as _) } } #[inline] pub unsafe fn uregion_areEqual(uregion: *const URegion, otherregion: *const URegion) -> i8 { @@ -5817,17 +5775,17 @@ pub unsafe fn uregion_contains(uregion: *const URegion, otherregion: *const UReg #[inline] pub unsafe fn uregion_getAvailable(r#type: URegionType, status: *mut UErrorCode) -> *mut UEnumeration { windows_targets::link!("icuin.dll" "cdecl" fn uregion_getAvailable(r#type : URegionType, status : *mut UErrorCode) -> *mut UEnumeration); - unsafe { uregion_getAvailable(r#type, core::mem::transmute(status)) } + unsafe { uregion_getAvailable(r#type, status as _) } } #[inline] pub unsafe fn uregion_getContainedRegions(uregion: *const URegion, status: *mut UErrorCode) -> *mut UEnumeration { windows_targets::link!("icuin.dll" "cdecl" fn uregion_getContainedRegions(uregion : *const URegion, status : *mut UErrorCode) -> *mut UEnumeration); - unsafe { uregion_getContainedRegions(uregion, core::mem::transmute(status)) } + unsafe { uregion_getContainedRegions(uregion, status as _) } } #[inline] pub unsafe fn uregion_getContainedRegionsOfType(uregion: *const URegion, r#type: URegionType, status: *mut UErrorCode) -> *mut UEnumeration { windows_targets::link!("icuin.dll" "cdecl" fn uregion_getContainedRegionsOfType(uregion : *const URegion, r#type : URegionType, status : *mut UErrorCode) -> *mut UEnumeration); - unsafe { uregion_getContainedRegionsOfType(uregion, r#type, core::mem::transmute(status)) } + unsafe { uregion_getContainedRegionsOfType(uregion, r#type, status as _) } } #[inline] pub unsafe fn uregion_getContainingRegion(uregion: *const URegion) -> *mut URegion { @@ -5847,7 +5805,7 @@ pub unsafe fn uregion_getNumericCode(uregion: *const URegion) -> i32 { #[inline] pub unsafe fn uregion_getPreferredValues(uregion: *const URegion, status: *mut UErrorCode) -> *mut UEnumeration { windows_targets::link!("icuin.dll" "cdecl" fn uregion_getPreferredValues(uregion : *const URegion, status : *mut UErrorCode) -> *mut UEnumeration); - unsafe { uregion_getPreferredValues(uregion, core::mem::transmute(status)) } + unsafe { uregion_getPreferredValues(uregion, status as _) } } #[inline] pub unsafe fn uregion_getRegionCode(uregion: *const URegion) -> windows_core::PCSTR { @@ -5860,12 +5818,12 @@ where P0: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn uregion_getRegionFromCode(regioncode : windows_core::PCSTR, status : *mut UErrorCode) -> *mut URegion); - unsafe { uregion_getRegionFromCode(regioncode.param().abi(), core::mem::transmute(status)) } + unsafe { uregion_getRegionFromCode(regioncode.param().abi(), status as _) } } #[inline] pub unsafe fn uregion_getRegionFromNumericCode(code: i32, status: *mut UErrorCode) -> *mut URegion { windows_targets::link!("icuin.dll" "cdecl" fn uregion_getRegionFromNumericCode(code : i32, status : *mut UErrorCode) -> *mut URegion); - unsafe { uregion_getRegionFromNumericCode(code, core::mem::transmute(status)) } + unsafe { uregion_getRegionFromNumericCode(code, status as _) } } #[inline] pub unsafe fn uregion_getType(uregion: *const URegion) -> URegionType { @@ -5875,37 +5833,37 @@ pub unsafe fn uregion_getType(uregion: *const URegion) -> URegionType { #[inline] pub unsafe fn ureldatefmt_close(reldatefmt: *mut URelativeDateTimeFormatter) { windows_targets::link!("icuin.dll" "cdecl" fn ureldatefmt_close(reldatefmt : *mut URelativeDateTimeFormatter)); - unsafe { ureldatefmt_close(core::mem::transmute(reldatefmt)) } + unsafe { ureldatefmt_close(reldatefmt as _) } } #[inline] pub unsafe fn ureldatefmt_closeResult(ufrdt: *mut UFormattedRelativeDateTime) { windows_targets::link!("icu.dll" "cdecl" fn ureldatefmt_closeResult(ufrdt : *mut UFormattedRelativeDateTime)); - unsafe { ureldatefmt_closeResult(core::mem::transmute(ufrdt)) } + unsafe { ureldatefmt_closeResult(ufrdt as _) } } #[inline] pub unsafe fn ureldatefmt_combineDateAndTime(reldatefmt: *const URelativeDateTimeFormatter, relativedatestring: *const u16, relativedatestringlen: i32, timestring: *const u16, timestringlen: i32, result: *mut u16, resultcapacity: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn ureldatefmt_combineDateAndTime(reldatefmt : *const URelativeDateTimeFormatter, relativedatestring : *const u16, relativedatestringlen : i32, timestring : *const u16, timestringlen : i32, result : *mut u16, resultcapacity : i32, status : *mut UErrorCode) -> i32); - unsafe { ureldatefmt_combineDateAndTime(reldatefmt, relativedatestring, relativedatestringlen, timestring, timestringlen, core::mem::transmute(result), resultcapacity, core::mem::transmute(status)) } + unsafe { ureldatefmt_combineDateAndTime(reldatefmt, relativedatestring, relativedatestringlen, timestring, timestringlen, result as _, resultcapacity, status as _) } } #[inline] pub unsafe fn ureldatefmt_format(reldatefmt: *const URelativeDateTimeFormatter, offset: f64, unit: URelativeDateTimeUnit, result: *mut u16, resultcapacity: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn ureldatefmt_format(reldatefmt : *const URelativeDateTimeFormatter, offset : f64, unit : URelativeDateTimeUnit, result : *mut u16, resultcapacity : i32, status : *mut UErrorCode) -> i32); - unsafe { ureldatefmt_format(reldatefmt, offset, unit, core::mem::transmute(result), resultcapacity, core::mem::transmute(status)) } + unsafe { ureldatefmt_format(reldatefmt, offset, unit, result as _, resultcapacity, status as _) } } #[inline] pub unsafe fn ureldatefmt_formatNumeric(reldatefmt: *const URelativeDateTimeFormatter, offset: f64, unit: URelativeDateTimeUnit, result: *mut u16, resultcapacity: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn ureldatefmt_formatNumeric(reldatefmt : *const URelativeDateTimeFormatter, offset : f64, unit : URelativeDateTimeUnit, result : *mut u16, resultcapacity : i32, status : *mut UErrorCode) -> i32); - unsafe { ureldatefmt_formatNumeric(reldatefmt, offset, unit, core::mem::transmute(result), resultcapacity, core::mem::transmute(status)) } + unsafe { ureldatefmt_formatNumeric(reldatefmt, offset, unit, result as _, resultcapacity, status as _) } } #[inline] pub unsafe fn ureldatefmt_formatNumericToResult(reldatefmt: *const URelativeDateTimeFormatter, offset: f64, unit: URelativeDateTimeUnit, result: *mut UFormattedRelativeDateTime, status: *mut UErrorCode) { windows_targets::link!("icu.dll" "cdecl" fn ureldatefmt_formatNumericToResult(reldatefmt : *const URelativeDateTimeFormatter, offset : f64, unit : URelativeDateTimeUnit, result : *mut UFormattedRelativeDateTime, status : *mut UErrorCode)); - unsafe { ureldatefmt_formatNumericToResult(reldatefmt, offset, unit, core::mem::transmute(result), core::mem::transmute(status)) } + unsafe { ureldatefmt_formatNumericToResult(reldatefmt, offset, unit, result as _, status as _) } } #[inline] pub unsafe fn ureldatefmt_formatToResult(reldatefmt: *const URelativeDateTimeFormatter, offset: f64, unit: URelativeDateTimeUnit, result: *mut UFormattedRelativeDateTime, status: *mut UErrorCode) { windows_targets::link!("icu.dll" "cdecl" fn ureldatefmt_formatToResult(reldatefmt : *const URelativeDateTimeFormatter, offset : f64, unit : URelativeDateTimeUnit, result : *mut UFormattedRelativeDateTime, status : *mut UErrorCode)); - unsafe { ureldatefmt_formatToResult(reldatefmt, offset, unit, core::mem::transmute(result), core::mem::transmute(status)) } + unsafe { ureldatefmt_formatToResult(reldatefmt, offset, unit, result as _, status as _) } } #[inline] pub unsafe fn ureldatefmt_open(locale: P0, nftoadopt: *mut *mut core::ffi::c_void, width: UDateRelativeDateTimeFormatterStyle, capitalizationcontext: UDisplayContext, status: *mut UErrorCode) -> *mut URelativeDateTimeFormatter @@ -5913,32 +5871,32 @@ where P0: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn ureldatefmt_open(locale : windows_core::PCSTR, nftoadopt : *mut *mut core::ffi::c_void, width : UDateRelativeDateTimeFormatterStyle, capitalizationcontext : UDisplayContext, status : *mut UErrorCode) -> *mut URelativeDateTimeFormatter); - unsafe { ureldatefmt_open(locale.param().abi(), core::mem::transmute(nftoadopt), width, capitalizationcontext, core::mem::transmute(status)) } + unsafe { ureldatefmt_open(locale.param().abi(), nftoadopt as _, width, capitalizationcontext, status as _) } } #[inline] pub unsafe fn ureldatefmt_openResult(ec: *mut UErrorCode) -> *mut UFormattedRelativeDateTime { windows_targets::link!("icu.dll" "cdecl" fn ureldatefmt_openResult(ec : *mut UErrorCode) -> *mut UFormattedRelativeDateTime); - unsafe { ureldatefmt_openResult(core::mem::transmute(ec)) } + unsafe { ureldatefmt_openResult(ec as _) } } #[inline] pub unsafe fn ureldatefmt_resultAsValue(ufrdt: *const UFormattedRelativeDateTime, ec: *mut UErrorCode) -> *mut UFormattedValue { windows_targets::link!("icu.dll" "cdecl" fn ureldatefmt_resultAsValue(ufrdt : *const UFormattedRelativeDateTime, ec : *mut UErrorCode) -> *mut UFormattedValue); - unsafe { ureldatefmt_resultAsValue(ufrdt, core::mem::transmute(ec)) } + unsafe { ureldatefmt_resultAsValue(ufrdt, ec as _) } } #[inline] pub unsafe fn ures_close(resourcebundle: *mut UResourceBundle) { windows_targets::link!("icuuc.dll" "cdecl" fn ures_close(resourcebundle : *mut UResourceBundle)); - unsafe { ures_close(core::mem::transmute(resourcebundle)) } + unsafe { ures_close(resourcebundle as _) } } #[inline] pub unsafe fn ures_getBinary(resourcebundle: *const UResourceBundle, len: *mut i32, status: *mut UErrorCode) -> *mut u8 { windows_targets::link!("icuuc.dll" "cdecl" fn ures_getBinary(resourcebundle : *const UResourceBundle, len : *mut i32, status : *mut UErrorCode) -> *mut u8); - unsafe { ures_getBinary(resourcebundle, core::mem::transmute(len), core::mem::transmute(status)) } + unsafe { ures_getBinary(resourcebundle, len as _, status as _) } } #[inline] pub unsafe fn ures_getByIndex(resourcebundle: *const UResourceBundle, indexr: i32, fillin: *mut UResourceBundle, status: *mut UErrorCode) -> *mut UResourceBundle { windows_targets::link!("icuuc.dll" "cdecl" fn ures_getByIndex(resourcebundle : *const UResourceBundle, indexr : i32, fillin : *mut UResourceBundle, status : *mut UErrorCode) -> *mut UResourceBundle); - unsafe { ures_getByIndex(resourcebundle, indexr, core::mem::transmute(fillin), core::mem::transmute(status)) } + unsafe { ures_getByIndex(resourcebundle, indexr, fillin as _, status as _) } } #[inline] pub unsafe fn ures_getByKey(resourcebundle: *const UResourceBundle, key: P1, fillin: *mut UResourceBundle, status: *mut UErrorCode) -> *mut UResourceBundle @@ -5946,17 +5904,17 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ures_getByKey(resourcebundle : *const UResourceBundle, key : windows_core::PCSTR, fillin : *mut UResourceBundle, status : *mut UErrorCode) -> *mut UResourceBundle); - unsafe { ures_getByKey(resourcebundle, key.param().abi(), core::mem::transmute(fillin), core::mem::transmute(status)) } + unsafe { ures_getByKey(resourcebundle, key.param().abi(), fillin as _, status as _) } } #[inline] pub unsafe fn ures_getInt(resourcebundle: *const UResourceBundle, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn ures_getInt(resourcebundle : *const UResourceBundle, status : *mut UErrorCode) -> i32); - unsafe { ures_getInt(resourcebundle, core::mem::transmute(status)) } + unsafe { ures_getInt(resourcebundle, status as _) } } #[inline] pub unsafe fn ures_getIntVector(resourcebundle: *const UResourceBundle, len: *mut i32, status: *mut UErrorCode) -> *mut i32 { windows_targets::link!("icuuc.dll" "cdecl" fn ures_getIntVector(resourcebundle : *const UResourceBundle, len : *mut i32, status : *mut UErrorCode) -> *mut i32); - unsafe { ures_getIntVector(resourcebundle, core::mem::transmute(len), core::mem::transmute(status)) } + unsafe { ures_getIntVector(resourcebundle, len as _, status as _) } } #[inline] pub unsafe fn ures_getKey(resourcebundle: *const UResourceBundle) -> windows_core::PCSTR { @@ -5966,17 +5924,17 @@ pub unsafe fn ures_getKey(resourcebundle: *const UResourceBundle) -> windows_cor #[inline] pub unsafe fn ures_getLocaleByType(resourcebundle: *const UResourceBundle, r#type: ULocDataLocaleType, status: *mut UErrorCode) -> windows_core::PCSTR { windows_targets::link!("icuuc.dll" "cdecl" fn ures_getLocaleByType(resourcebundle : *const UResourceBundle, r#type : ULocDataLocaleType, status : *mut UErrorCode) -> windows_core::PCSTR); - unsafe { ures_getLocaleByType(resourcebundle, r#type, core::mem::transmute(status)) } + unsafe { ures_getLocaleByType(resourcebundle, r#type, status as _) } } #[inline] pub unsafe fn ures_getNextResource(resourcebundle: *mut UResourceBundle, fillin: *mut UResourceBundle, status: *mut UErrorCode) -> *mut UResourceBundle { windows_targets::link!("icuuc.dll" "cdecl" fn ures_getNextResource(resourcebundle : *mut UResourceBundle, fillin : *mut UResourceBundle, status : *mut UErrorCode) -> *mut UResourceBundle); - unsafe { ures_getNextResource(core::mem::transmute(resourcebundle), core::mem::transmute(fillin), core::mem::transmute(status)) } + unsafe { ures_getNextResource(resourcebundle as _, fillin as _, status as _) } } #[inline] pub unsafe fn ures_getNextString(resourcebundle: *mut UResourceBundle, len: *mut i32, key: *const *const i8, status: *mut UErrorCode) -> *mut u16 { windows_targets::link!("icuuc.dll" "cdecl" fn ures_getNextString(resourcebundle : *mut UResourceBundle, len : *mut i32, key : *const *const i8, status : *mut UErrorCode) -> *mut u16); - unsafe { ures_getNextString(core::mem::transmute(resourcebundle), core::mem::transmute(len), key, core::mem::transmute(status)) } + unsafe { ures_getNextString(resourcebundle as _, len as _, key, status as _) } } #[inline] pub unsafe fn ures_getSize(resourcebundle: *const UResourceBundle) -> i32 { @@ -5986,12 +5944,12 @@ pub unsafe fn ures_getSize(resourcebundle: *const UResourceBundle) -> i32 { #[inline] pub unsafe fn ures_getString(resourcebundle: *const UResourceBundle, len: *mut i32, status: *mut UErrorCode) -> *mut u16 { windows_targets::link!("icuuc.dll" "cdecl" fn ures_getString(resourcebundle : *const UResourceBundle, len : *mut i32, status : *mut UErrorCode) -> *mut u16); - unsafe { ures_getString(resourcebundle, core::mem::transmute(len), core::mem::transmute(status)) } + unsafe { ures_getString(resourcebundle, len as _, status as _) } } #[inline] pub unsafe fn ures_getStringByIndex(resourcebundle: *const UResourceBundle, indexs: i32, len: *mut i32, status: *mut UErrorCode) -> *mut u16 { windows_targets::link!("icuuc.dll" "cdecl" fn ures_getStringByIndex(resourcebundle : *const UResourceBundle, indexs : i32, len : *mut i32, status : *mut UErrorCode) -> *mut u16); - unsafe { ures_getStringByIndex(resourcebundle, indexs, core::mem::transmute(len), core::mem::transmute(status)) } + unsafe { ures_getStringByIndex(resourcebundle, indexs, len as _, status as _) } } #[inline] pub unsafe fn ures_getStringByKey(resb: *const UResourceBundle, key: P1, len: *mut i32, status: *mut UErrorCode) -> *mut u16 @@ -5999,7 +5957,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ures_getStringByKey(resb : *const UResourceBundle, key : windows_core::PCSTR, len : *mut i32, status : *mut UErrorCode) -> *mut u16); - unsafe { ures_getStringByKey(resb, key.param().abi(), core::mem::transmute(len), core::mem::transmute(status)) } + unsafe { ures_getStringByKey(resb, key.param().abi(), len as _, status as _) } } #[inline] pub unsafe fn ures_getType(resourcebundle: *const UResourceBundle) -> UResType { @@ -6009,7 +5967,7 @@ pub unsafe fn ures_getType(resourcebundle: *const UResourceBundle) -> UResType { #[inline] pub unsafe fn ures_getUInt(resourcebundle: *const UResourceBundle, status: *mut UErrorCode) -> u32 { windows_targets::link!("icuuc.dll" "cdecl" fn ures_getUInt(resourcebundle : *const UResourceBundle, status : *mut UErrorCode) -> u32); - unsafe { ures_getUInt(resourcebundle, core::mem::transmute(status)) } + unsafe { ures_getUInt(resourcebundle, status as _) } } #[inline] pub unsafe fn ures_getUTF8String(resb: *const UResourceBundle, dest: P1, length: *mut i32, forcecopy: i8, status: *mut UErrorCode) -> windows_core::PCSTR @@ -6017,7 +5975,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ures_getUTF8String(resb : *const UResourceBundle, dest : windows_core::PCSTR, length : *mut i32, forcecopy : i8, status : *mut UErrorCode) -> windows_core::PCSTR); - unsafe { ures_getUTF8String(resb, dest.param().abi(), core::mem::transmute(length), forcecopy, core::mem::transmute(status)) } + unsafe { ures_getUTF8String(resb, dest.param().abi(), length as _, forcecopy, status as _) } } #[inline] pub unsafe fn ures_getUTF8StringByIndex(resb: *const UResourceBundle, stringindex: i32, dest: P2, plength: *mut i32, forcecopy: i8, status: *mut UErrorCode) -> windows_core::PCSTR @@ -6025,7 +5983,7 @@ where P2: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ures_getUTF8StringByIndex(resb : *const UResourceBundle, stringindex : i32, dest : windows_core::PCSTR, plength : *mut i32, forcecopy : i8, status : *mut UErrorCode) -> windows_core::PCSTR); - unsafe { ures_getUTF8StringByIndex(resb, stringindex, dest.param().abi(), core::mem::transmute(plength), forcecopy, core::mem::transmute(status)) } + unsafe { ures_getUTF8StringByIndex(resb, stringindex, dest.param().abi(), plength as _, forcecopy, status as _) } } #[inline] pub unsafe fn ures_getUTF8StringByKey(resb: *const UResourceBundle, key: P1, dest: P2, plength: *mut i32, forcecopy: i8, status: *mut UErrorCode) -> windows_core::PCSTR @@ -6034,12 +5992,12 @@ where P2: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ures_getUTF8StringByKey(resb : *const UResourceBundle, key : windows_core::PCSTR, dest : windows_core::PCSTR, plength : *mut i32, forcecopy : i8, status : *mut UErrorCode) -> windows_core::PCSTR); - unsafe { ures_getUTF8StringByKey(resb, key.param().abi(), dest.param().abi(), core::mem::transmute(plength), forcecopy, core::mem::transmute(status)) } + unsafe { ures_getUTF8StringByKey(resb, key.param().abi(), dest.param().abi(), plength as _, forcecopy, status as _) } } #[inline] pub unsafe fn ures_getVersion(resb: *const UResourceBundle, versioninfo: *mut u8) { windows_targets::link!("icuuc.dll" "cdecl" fn ures_getVersion(resb : *const UResourceBundle, versioninfo : *mut u8)); - unsafe { ures_getVersion(resb, core::mem::transmute(versioninfo)) } + unsafe { ures_getVersion(resb, versioninfo as _) } } #[inline] pub unsafe fn ures_hasNext(resourcebundle: *const UResourceBundle) -> i8 { @@ -6053,7 +6011,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ures_open(packagename : windows_core::PCSTR, locale : windows_core::PCSTR, status : *mut UErrorCode) -> *mut UResourceBundle); - unsafe { ures_open(packagename.param().abi(), locale.param().abi(), core::mem::transmute(status)) } + unsafe { ures_open(packagename.param().abi(), locale.param().abi(), status as _) } } #[inline] pub unsafe fn ures_openAvailableLocales(packagename: P0, status: *mut UErrorCode) -> *mut UEnumeration @@ -6061,7 +6019,7 @@ where P0: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ures_openAvailableLocales(packagename : windows_core::PCSTR, status : *mut UErrorCode) -> *mut UEnumeration); - unsafe { ures_openAvailableLocales(packagename.param().abi(), core::mem::transmute(status)) } + unsafe { ures_openAvailableLocales(packagename.param().abi(), status as _) } } #[inline] pub unsafe fn ures_openDirect(packagename: P0, locale: P1, status: *mut UErrorCode) -> *mut UResourceBundle @@ -6070,7 +6028,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ures_openDirect(packagename : windows_core::PCSTR, locale : windows_core::PCSTR, status : *mut UErrorCode) -> *mut UResourceBundle); - unsafe { ures_openDirect(packagename.param().abi(), locale.param().abi(), core::mem::transmute(status)) } + unsafe { ures_openDirect(packagename.param().abi(), locale.param().abi(), status as _) } } #[inline] pub unsafe fn ures_openU(packagename: *const u16, locale: P1, status: *mut UErrorCode) -> *mut UResourceBundle @@ -6078,12 +6036,12 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn ures_openU(packagename : *const u16, locale : windows_core::PCSTR, status : *mut UErrorCode) -> *mut UResourceBundle); - unsafe { ures_openU(packagename, locale.param().abi(), core::mem::transmute(status)) } + unsafe { ures_openU(packagename, locale.param().abi(), status as _) } } #[inline] pub unsafe fn ures_resetIterator(resourcebundle: *mut UResourceBundle) { windows_targets::link!("icuuc.dll" "cdecl" fn ures_resetIterator(resourcebundle : *mut UResourceBundle)); - unsafe { ures_resetIterator(core::mem::transmute(resourcebundle)) } + unsafe { ures_resetIterator(resourcebundle as _) } } #[inline] pub unsafe fn uscript_breaksBetweenLetters(script: UScriptCode) -> i8 { @@ -6096,7 +6054,7 @@ where P0: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn uscript_getCode(nameorabbrorlocale : windows_core::PCSTR, fillin : *mut UScriptCode, capacity : i32, err : *mut UErrorCode) -> i32); - unsafe { uscript_getCode(nameorabbrorlocale.param().abi(), core::mem::transmute(fillin), capacity, core::mem::transmute(err)) } + unsafe { uscript_getCode(nameorabbrorlocale.param().abi(), fillin as _, capacity, err as _) } } #[inline] pub unsafe fn uscript_getName(scriptcode: UScriptCode) -> windows_core::PCSTR { @@ -6106,17 +6064,17 @@ pub unsafe fn uscript_getName(scriptcode: UScriptCode) -> windows_core::PCSTR { #[inline] pub unsafe fn uscript_getSampleString(script: UScriptCode, dest: *mut u16, capacity: i32, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn uscript_getSampleString(script : UScriptCode, dest : *mut u16, capacity : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { uscript_getSampleString(script, core::mem::transmute(dest), capacity, core::mem::transmute(perrorcode)) } + unsafe { uscript_getSampleString(script, dest as _, capacity, perrorcode as _) } } #[inline] pub unsafe fn uscript_getScript(codepoint: i32, err: *mut UErrorCode) -> UScriptCode { windows_targets::link!("icuuc.dll" "cdecl" fn uscript_getScript(codepoint : i32, err : *mut UErrorCode) -> UScriptCode); - unsafe { uscript_getScript(codepoint, core::mem::transmute(err)) } + unsafe { uscript_getScript(codepoint, err as _) } } #[inline] pub unsafe fn uscript_getScriptExtensions(c: i32, scripts: *mut UScriptCode, capacity: i32, errorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn uscript_getScriptExtensions(c : i32, scripts : *mut UScriptCode, capacity : i32, errorcode : *mut UErrorCode) -> i32); - unsafe { uscript_getScriptExtensions(c, core::mem::transmute(scripts), capacity, core::mem::transmute(errorcode)) } + unsafe { uscript_getScriptExtensions(c, scripts as _, capacity, errorcode as _) } } #[inline] pub unsafe fn uscript_getShortName(scriptcode: UScriptCode) -> windows_core::PCSTR { @@ -6146,17 +6104,17 @@ pub unsafe fn uscript_isRightToLeft(script: UScriptCode) -> i8 { #[inline] pub unsafe fn usearch_close(searchiter: *mut UStringSearch) { windows_targets::link!("icuin.dll" "cdecl" fn usearch_close(searchiter : *mut UStringSearch)); - unsafe { usearch_close(core::mem::transmute(searchiter)) } + unsafe { usearch_close(searchiter as _) } } #[inline] pub unsafe fn usearch_first(strsrch: *mut UStringSearch, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn usearch_first(strsrch : *mut UStringSearch, status : *mut UErrorCode) -> i32); - unsafe { usearch_first(core::mem::transmute(strsrch), core::mem::transmute(status)) } + unsafe { usearch_first(strsrch as _, status as _) } } #[inline] pub unsafe fn usearch_following(strsrch: *mut UStringSearch, position: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn usearch_following(strsrch : *mut UStringSearch, position : i32, status : *mut UErrorCode) -> i32); - unsafe { usearch_following(core::mem::transmute(strsrch), position, core::mem::transmute(status)) } + unsafe { usearch_following(strsrch as _, position, status as _) } } #[inline] pub unsafe fn usearch_getAttribute(strsrch: *const UStringSearch, attribute: USearchAttribute) -> USearchAttributeValue { @@ -6186,7 +6144,7 @@ pub unsafe fn usearch_getMatchedStart(strsrch: *const UStringSearch) -> i32 { #[inline] pub unsafe fn usearch_getMatchedText(strsrch: *const UStringSearch, result: *mut u16, resultcapacity: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn usearch_getMatchedText(strsrch : *const UStringSearch, result : *mut u16, resultcapacity : i32, status : *mut UErrorCode) -> i32); - unsafe { usearch_getMatchedText(strsrch, core::mem::transmute(result), resultcapacity, core::mem::transmute(status)) } + unsafe { usearch_getMatchedText(strsrch, result as _, resultcapacity, status as _) } } #[inline] pub unsafe fn usearch_getOffset(strsrch: *const UStringSearch) -> i32 { @@ -6196,22 +6154,22 @@ pub unsafe fn usearch_getOffset(strsrch: *const UStringSearch) -> i32 { #[inline] pub unsafe fn usearch_getPattern(strsrch: *const UStringSearch, length: *mut i32) -> *mut u16 { windows_targets::link!("icuin.dll" "cdecl" fn usearch_getPattern(strsrch : *const UStringSearch, length : *mut i32) -> *mut u16); - unsafe { usearch_getPattern(strsrch, core::mem::transmute(length)) } + unsafe { usearch_getPattern(strsrch, length as _) } } #[inline] pub unsafe fn usearch_getText(strsrch: *const UStringSearch, length: *mut i32) -> *mut u16 { windows_targets::link!("icuin.dll" "cdecl" fn usearch_getText(strsrch : *const UStringSearch, length : *mut i32) -> *mut u16); - unsafe { usearch_getText(strsrch, core::mem::transmute(length)) } + unsafe { usearch_getText(strsrch, length as _) } } #[inline] pub unsafe fn usearch_last(strsrch: *mut UStringSearch, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn usearch_last(strsrch : *mut UStringSearch, status : *mut UErrorCode) -> i32); - unsafe { usearch_last(core::mem::transmute(strsrch), core::mem::transmute(status)) } + unsafe { usearch_last(strsrch as _, status as _) } } #[inline] pub unsafe fn usearch_next(strsrch: *mut UStringSearch, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn usearch_next(strsrch : *mut UStringSearch, status : *mut UErrorCode) -> i32); - unsafe { usearch_next(core::mem::transmute(strsrch), core::mem::transmute(status)) } + unsafe { usearch_next(strsrch as _, status as _) } } #[inline] pub unsafe fn usearch_open(pattern: *const u16, patternlength: i32, text: *const u16, textlength: i32, locale: P4, breakiter: *mut UBreakIterator, status: *mut UErrorCode) -> *mut UStringSearch @@ -6219,97 +6177,97 @@ where P4: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn usearch_open(pattern : *const u16, patternlength : i32, text : *const u16, textlength : i32, locale : windows_core::PCSTR, breakiter : *mut UBreakIterator, status : *mut UErrorCode) -> *mut UStringSearch); - unsafe { usearch_open(pattern, patternlength, text, textlength, locale.param().abi(), core::mem::transmute(breakiter), core::mem::transmute(status)) } + unsafe { usearch_open(pattern, patternlength, text, textlength, locale.param().abi(), breakiter as _, status as _) } } #[inline] pub unsafe fn usearch_openFromCollator(pattern: *const u16, patternlength: i32, text: *const u16, textlength: i32, collator: *const UCollator, breakiter: *mut UBreakIterator, status: *mut UErrorCode) -> *mut UStringSearch { windows_targets::link!("icuin.dll" "cdecl" fn usearch_openFromCollator(pattern : *const u16, patternlength : i32, text : *const u16, textlength : i32, collator : *const UCollator, breakiter : *mut UBreakIterator, status : *mut UErrorCode) -> *mut UStringSearch); - unsafe { usearch_openFromCollator(pattern, patternlength, text, textlength, collator, core::mem::transmute(breakiter), core::mem::transmute(status)) } + unsafe { usearch_openFromCollator(pattern, patternlength, text, textlength, collator, breakiter as _, status as _) } } #[inline] pub unsafe fn usearch_preceding(strsrch: *mut UStringSearch, position: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn usearch_preceding(strsrch : *mut UStringSearch, position : i32, status : *mut UErrorCode) -> i32); - unsafe { usearch_preceding(core::mem::transmute(strsrch), position, core::mem::transmute(status)) } + unsafe { usearch_preceding(strsrch as _, position, status as _) } } #[inline] pub unsafe fn usearch_previous(strsrch: *mut UStringSearch, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn usearch_previous(strsrch : *mut UStringSearch, status : *mut UErrorCode) -> i32); - unsafe { usearch_previous(core::mem::transmute(strsrch), core::mem::transmute(status)) } + unsafe { usearch_previous(strsrch as _, status as _) } } #[inline] pub unsafe fn usearch_reset(strsrch: *mut UStringSearch) { windows_targets::link!("icuin.dll" "cdecl" fn usearch_reset(strsrch : *mut UStringSearch)); - unsafe { usearch_reset(core::mem::transmute(strsrch)) } + unsafe { usearch_reset(strsrch as _) } } #[inline] pub unsafe fn usearch_setAttribute(strsrch: *mut UStringSearch, attribute: USearchAttribute, value: USearchAttributeValue, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn usearch_setAttribute(strsrch : *mut UStringSearch, attribute : USearchAttribute, value : USearchAttributeValue, status : *mut UErrorCode)); - unsafe { usearch_setAttribute(core::mem::transmute(strsrch), attribute, value, core::mem::transmute(status)) } + unsafe { usearch_setAttribute(strsrch as _, attribute, value, status as _) } } #[inline] pub unsafe fn usearch_setBreakIterator(strsrch: *mut UStringSearch, breakiter: *mut UBreakIterator, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn usearch_setBreakIterator(strsrch : *mut UStringSearch, breakiter : *mut UBreakIterator, status : *mut UErrorCode)); - unsafe { usearch_setBreakIterator(core::mem::transmute(strsrch), core::mem::transmute(breakiter), core::mem::transmute(status)) } + unsafe { usearch_setBreakIterator(strsrch as _, breakiter as _, status as _) } } #[inline] pub unsafe fn usearch_setCollator(strsrch: *mut UStringSearch, collator: *const UCollator, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn usearch_setCollator(strsrch : *mut UStringSearch, collator : *const UCollator, status : *mut UErrorCode)); - unsafe { usearch_setCollator(core::mem::transmute(strsrch), collator, core::mem::transmute(status)) } + unsafe { usearch_setCollator(strsrch as _, collator, status as _) } } #[inline] pub unsafe fn usearch_setOffset(strsrch: *mut UStringSearch, position: i32, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn usearch_setOffset(strsrch : *mut UStringSearch, position : i32, status : *mut UErrorCode)); - unsafe { usearch_setOffset(core::mem::transmute(strsrch), position, core::mem::transmute(status)) } + unsafe { usearch_setOffset(strsrch as _, position, status as _) } } #[inline] pub unsafe fn usearch_setPattern(strsrch: *mut UStringSearch, pattern: *const u16, patternlength: i32, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn usearch_setPattern(strsrch : *mut UStringSearch, pattern : *const u16, patternlength : i32, status : *mut UErrorCode)); - unsafe { usearch_setPattern(core::mem::transmute(strsrch), pattern, patternlength, core::mem::transmute(status)) } + unsafe { usearch_setPattern(strsrch as _, pattern, patternlength, status as _) } } #[inline] pub unsafe fn usearch_setText(strsrch: *mut UStringSearch, text: *const u16, textlength: i32, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn usearch_setText(strsrch : *mut UStringSearch, text : *const u16, textlength : i32, status : *mut UErrorCode)); - unsafe { usearch_setText(core::mem::transmute(strsrch), text, textlength, core::mem::transmute(status)) } + unsafe { usearch_setText(strsrch as _, text, textlength, status as _) } } #[inline] pub unsafe fn uset_add(set: *mut USet, c: i32) { windows_targets::link!("icuuc.dll" "cdecl" fn uset_add(set : *mut USet, c : i32)); - unsafe { uset_add(core::mem::transmute(set), c) } + unsafe { uset_add(set as _, c) } } #[inline] pub unsafe fn uset_addAll(set: *mut USet, additionalset: *const USet) { windows_targets::link!("icuuc.dll" "cdecl" fn uset_addAll(set : *mut USet, additionalset : *const USet)); - unsafe { uset_addAll(core::mem::transmute(set), additionalset) } + unsafe { uset_addAll(set as _, additionalset) } } #[inline] pub unsafe fn uset_addAllCodePoints(set: *mut USet, str: *const u16, strlen: i32) { windows_targets::link!("icuuc.dll" "cdecl" fn uset_addAllCodePoints(set : *mut USet, str : *const u16, strlen : i32)); - unsafe { uset_addAllCodePoints(core::mem::transmute(set), str, strlen) } + unsafe { uset_addAllCodePoints(set as _, str, strlen) } } #[inline] pub unsafe fn uset_addRange(set: *mut USet, start: i32, end: i32) { windows_targets::link!("icuuc.dll" "cdecl" fn uset_addRange(set : *mut USet, start : i32, end : i32)); - unsafe { uset_addRange(core::mem::transmute(set), start, end) } + unsafe { uset_addRange(set as _, start, end) } } #[inline] pub unsafe fn uset_addString(set: *mut USet, str: *const u16, strlen: i32) { windows_targets::link!("icuuc.dll" "cdecl" fn uset_addString(set : *mut USet, str : *const u16, strlen : i32)); - unsafe { uset_addString(core::mem::transmute(set), str, strlen) } + unsafe { uset_addString(set as _, str, strlen) } } #[inline] pub unsafe fn uset_applyIntPropertyValue(set: *mut USet, prop: UProperty, value: i32, ec: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn uset_applyIntPropertyValue(set : *mut USet, prop : UProperty, value : i32, ec : *mut UErrorCode)); - unsafe { uset_applyIntPropertyValue(core::mem::transmute(set), prop, value, core::mem::transmute(ec)) } + unsafe { uset_applyIntPropertyValue(set as _, prop, value, ec as _) } } #[inline] pub unsafe fn uset_applyPattern(set: *mut USet, pattern: *const u16, patternlength: i32, options: u32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn uset_applyPattern(set : *mut USet, pattern : *const u16, patternlength : i32, options : u32, status : *mut UErrorCode) -> i32); - unsafe { uset_applyPattern(core::mem::transmute(set), pattern, patternlength, options, core::mem::transmute(status)) } + unsafe { uset_applyPattern(set as _, pattern, patternlength, options, status as _) } } #[inline] pub unsafe fn uset_applyPropertyAlias(set: *mut USet, prop: *const u16, proplength: i32, value: *const u16, valuelength: i32, ec: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn uset_applyPropertyAlias(set : *mut USet, prop : *const u16, proplength : i32, value : *const u16, valuelength : i32, ec : *mut UErrorCode)); - unsafe { uset_applyPropertyAlias(core::mem::transmute(set), prop, proplength, value, valuelength, core::mem::transmute(ec)) } + unsafe { uset_applyPropertyAlias(set as _, prop, proplength, value, valuelength, ec as _) } } #[inline] pub unsafe fn uset_charAt(set: *const USet, charindex: i32) -> i32 { @@ -6319,7 +6277,7 @@ pub unsafe fn uset_charAt(set: *const USet, charindex: i32) -> i32 { #[inline] pub unsafe fn uset_clear(set: *mut USet) { windows_targets::link!("icuuc.dll" "cdecl" fn uset_clear(set : *mut USet)); - unsafe { uset_clear(core::mem::transmute(set)) } + unsafe { uset_clear(set as _) } } #[inline] pub unsafe fn uset_clone(set: *const USet) -> *mut USet { @@ -6334,27 +6292,27 @@ pub unsafe fn uset_cloneAsThawed(set: *const USet) -> *mut USet { #[inline] pub unsafe fn uset_close(set: *mut USet) { windows_targets::link!("icuuc.dll" "cdecl" fn uset_close(set : *mut USet)); - unsafe { uset_close(core::mem::transmute(set)) } + unsafe { uset_close(set as _) } } #[inline] pub unsafe fn uset_closeOver(set: *mut USet, attributes: i32) { windows_targets::link!("icuuc.dll" "cdecl" fn uset_closeOver(set : *mut USet, attributes : i32)); - unsafe { uset_closeOver(core::mem::transmute(set), attributes) } + unsafe { uset_closeOver(set as _, attributes) } } #[inline] pub unsafe fn uset_compact(set: *mut USet) { windows_targets::link!("icuuc.dll" "cdecl" fn uset_compact(set : *mut USet)); - unsafe { uset_compact(core::mem::transmute(set)) } + unsafe { uset_compact(set as _) } } #[inline] pub unsafe fn uset_complement(set: *mut USet) { windows_targets::link!("icuuc.dll" "cdecl" fn uset_complement(set : *mut USet)); - unsafe { uset_complement(core::mem::transmute(set)) } + unsafe { uset_complement(set as _) } } #[inline] pub unsafe fn uset_complementAll(set: *mut USet, complement: *const USet) { windows_targets::link!("icuuc.dll" "cdecl" fn uset_complementAll(set : *mut USet, complement : *const USet)); - unsafe { uset_complementAll(core::mem::transmute(set), complement) } + unsafe { uset_complementAll(set as _, complement) } } #[inline] pub unsafe fn uset_contains(set: *const USet, c: i32) -> i8 { @@ -6399,12 +6357,12 @@ pub unsafe fn uset_equals(set1: *const USet, set2: *const USet) -> i8 { #[inline] pub unsafe fn uset_freeze(set: *mut USet) { windows_targets::link!("icuuc.dll" "cdecl" fn uset_freeze(set : *mut USet)); - unsafe { uset_freeze(core::mem::transmute(set)) } + unsafe { uset_freeze(set as _) } } #[inline] pub unsafe fn uset_getItem(set: *const USet, itemindex: i32, start: *mut i32, end: *mut i32, str: *mut u16, strcapacity: i32, ec: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn uset_getItem(set : *const USet, itemindex : i32, start : *mut i32, end : *mut i32, str : *mut u16, strcapacity : i32, ec : *mut UErrorCode) -> i32); - unsafe { uset_getItem(set, itemindex, core::mem::transmute(start), core::mem::transmute(end), core::mem::transmute(str), strcapacity, core::mem::transmute(ec)) } + unsafe { uset_getItem(set, itemindex, start as _, end as _, str as _, strcapacity, ec as _) } } #[inline] pub unsafe fn uset_getItemCount(set: *const USet) -> i32 { @@ -6414,7 +6372,7 @@ pub unsafe fn uset_getItemCount(set: *const USet) -> i32 { #[inline] pub unsafe fn uset_getSerializedRange(set: *const USerializedSet, rangeindex: i32, pstart: *mut i32, pend: *mut i32) -> i8 { windows_targets::link!("icuuc.dll" "cdecl" fn uset_getSerializedRange(set : *const USerializedSet, rangeindex : i32, pstart : *mut i32, pend : *mut i32) -> i8); - unsafe { uset_getSerializedRange(set, rangeindex, core::mem::transmute(pstart), core::mem::transmute(pend)) } + unsafe { uset_getSerializedRange(set, rangeindex, pstart as _, pend as _) } } #[inline] pub unsafe fn uset_getSerializedRangeCount(set: *const USerializedSet) -> i32 { @@ -6424,7 +6382,7 @@ pub unsafe fn uset_getSerializedRangeCount(set: *const USerializedSet) -> i32 { #[inline] pub unsafe fn uset_getSerializedSet(fillset: *mut USerializedSet, src: *const u16, srclength: i32) -> i8 { windows_targets::link!("icuuc.dll" "cdecl" fn uset_getSerializedSet(fillset : *mut USerializedSet, src : *const u16, srclength : i32) -> i8); - unsafe { uset_getSerializedSet(core::mem::transmute(fillset), src, srclength) } + unsafe { uset_getSerializedSet(fillset as _, src, srclength) } } #[inline] pub unsafe fn uset_indexOf(set: *const USet, c: i32) -> i32 { @@ -6454,37 +6412,37 @@ pub unsafe fn uset_openEmpty() -> *mut USet { #[inline] pub unsafe fn uset_openPattern(pattern: *const u16, patternlength: i32, ec: *mut UErrorCode) -> *mut USet { windows_targets::link!("icuuc.dll" "cdecl" fn uset_openPattern(pattern : *const u16, patternlength : i32, ec : *mut UErrorCode) -> *mut USet); - unsafe { uset_openPattern(pattern, patternlength, core::mem::transmute(ec)) } + unsafe { uset_openPattern(pattern, patternlength, ec as _) } } #[inline] pub unsafe fn uset_openPatternOptions(pattern: *const u16, patternlength: i32, options: u32, ec: *mut UErrorCode) -> *mut USet { windows_targets::link!("icuuc.dll" "cdecl" fn uset_openPatternOptions(pattern : *const u16, patternlength : i32, options : u32, ec : *mut UErrorCode) -> *mut USet); - unsafe { uset_openPatternOptions(pattern, patternlength, options, core::mem::transmute(ec)) } + unsafe { uset_openPatternOptions(pattern, patternlength, options, ec as _) } } #[inline] pub unsafe fn uset_remove(set: *mut USet, c: i32) { windows_targets::link!("icuuc.dll" "cdecl" fn uset_remove(set : *mut USet, c : i32)); - unsafe { uset_remove(core::mem::transmute(set), c) } + unsafe { uset_remove(set as _, c) } } #[inline] pub unsafe fn uset_removeAll(set: *mut USet, removeset: *const USet) { windows_targets::link!("icuuc.dll" "cdecl" fn uset_removeAll(set : *mut USet, removeset : *const USet)); - unsafe { uset_removeAll(core::mem::transmute(set), removeset) } + unsafe { uset_removeAll(set as _, removeset) } } #[inline] pub unsafe fn uset_removeAllStrings(set: *mut USet) { windows_targets::link!("icuuc.dll" "cdecl" fn uset_removeAllStrings(set : *mut USet)); - unsafe { uset_removeAllStrings(core::mem::transmute(set)) } + unsafe { uset_removeAllStrings(set as _) } } #[inline] pub unsafe fn uset_removeRange(set: *mut USet, start: i32, end: i32) { windows_targets::link!("icuuc.dll" "cdecl" fn uset_removeRange(set : *mut USet, start : i32, end : i32)); - unsafe { uset_removeRange(core::mem::transmute(set), start, end) } + unsafe { uset_removeRange(set as _, start, end) } } #[inline] pub unsafe fn uset_removeString(set: *mut USet, str: *const u16, strlen: i32) { windows_targets::link!("icuuc.dll" "cdecl" fn uset_removeString(set : *mut USet, str : *const u16, strlen : i32)); - unsafe { uset_removeString(core::mem::transmute(set), str, strlen) } + unsafe { uset_removeString(set as _, str, strlen) } } #[inline] pub unsafe fn uset_resemblesPattern(pattern: *const u16, patternlength: i32, pos: i32) -> i8 { @@ -6494,17 +6452,17 @@ pub unsafe fn uset_resemblesPattern(pattern: *const u16, patternlength: i32, pos #[inline] pub unsafe fn uset_retain(set: *mut USet, start: i32, end: i32) { windows_targets::link!("icuuc.dll" "cdecl" fn uset_retain(set : *mut USet, start : i32, end : i32)); - unsafe { uset_retain(core::mem::transmute(set), start, end) } + unsafe { uset_retain(set as _, start, end) } } #[inline] pub unsafe fn uset_retainAll(set: *mut USet, retain: *const USet) { windows_targets::link!("icuuc.dll" "cdecl" fn uset_retainAll(set : *mut USet, retain : *const USet)); - unsafe { uset_retainAll(core::mem::transmute(set), retain) } + unsafe { uset_retainAll(set as _, retain) } } #[inline] pub unsafe fn uset_serialize(set: *const USet, dest: *mut u16, destcapacity: i32, perrorcode: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn uset_serialize(set : *const USet, dest : *mut u16, destcapacity : i32, perrorcode : *mut UErrorCode) -> i32); - unsafe { uset_serialize(set, core::mem::transmute(dest), destcapacity, core::mem::transmute(perrorcode)) } + unsafe { uset_serialize(set, dest as _, destcapacity, perrorcode as _) } } #[inline] pub unsafe fn uset_serializedContains(set: *const USerializedSet, c: i32) -> i8 { @@ -6514,12 +6472,12 @@ pub unsafe fn uset_serializedContains(set: *const USerializedSet, c: i32) -> i8 #[inline] pub unsafe fn uset_set(set: *mut USet, start: i32, end: i32) { windows_targets::link!("icuuc.dll" "cdecl" fn uset_set(set : *mut USet, start : i32, end : i32)); - unsafe { uset_set(core::mem::transmute(set), start, end) } + unsafe { uset_set(set as _, start, end) } } #[inline] pub unsafe fn uset_setSerializedToOne(fillset: *mut USerializedSet, c: i32) { windows_targets::link!("icuuc.dll" "cdecl" fn uset_setSerializedToOne(fillset : *mut USerializedSet, c : i32)); - unsafe { uset_setSerializedToOne(core::mem::transmute(fillset), c) } + unsafe { uset_setSerializedToOne(fillset as _, c) } } #[inline] pub unsafe fn uset_size(set: *const USet) -> i32 { @@ -6555,12 +6513,12 @@ where #[inline] pub unsafe fn uset_toPattern(set: *const USet, result: *mut u16, resultcapacity: i32, escapeunprintable: i8, ec: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn uset_toPattern(set : *const USet, result : *mut u16, resultcapacity : i32, escapeunprintable : i8, ec : *mut UErrorCode) -> i32); - unsafe { uset_toPattern(set, core::mem::transmute(result), resultcapacity, escapeunprintable, core::mem::transmute(ec)) } + unsafe { uset_toPattern(set, result as _, resultcapacity, escapeunprintable, ec as _) } } #[inline] pub unsafe fn uspoof_areConfusable(sc: *const USpoofChecker, id1: *const u16, length1: i32, id2: *const u16, length2: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn uspoof_areConfusable(sc : *const USpoofChecker, id1 : *const u16, length1 : i32, id2 : *const u16, length2 : i32, status : *mut UErrorCode) -> i32); - unsafe { uspoof_areConfusable(sc, id1, length1, id2, length2, core::mem::transmute(status)) } + unsafe { uspoof_areConfusable(sc, id1, length1, id2, length2, status as _) } } #[inline] pub unsafe fn uspoof_areConfusableUTF8(sc: *const USpoofChecker, id1: P1, length1: i32, id2: P3, length2: i32, status: *mut UErrorCode) -> i32 @@ -6569,17 +6527,17 @@ where P3: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn uspoof_areConfusableUTF8(sc : *const USpoofChecker, id1 : windows_core::PCSTR, length1 : i32, id2 : windows_core::PCSTR, length2 : i32, status : *mut UErrorCode) -> i32); - unsafe { uspoof_areConfusableUTF8(sc, id1.param().abi(), length1, id2.param().abi(), length2, core::mem::transmute(status)) } + unsafe { uspoof_areConfusableUTF8(sc, id1.param().abi(), length1, id2.param().abi(), length2, status as _) } } #[inline] pub unsafe fn uspoof_check(sc: *const USpoofChecker, id: *const u16, length: i32, position: *mut i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn uspoof_check(sc : *const USpoofChecker, id : *const u16, length : i32, position : *mut i32, status : *mut UErrorCode) -> i32); - unsafe { uspoof_check(sc, id, length, core::mem::transmute(position), core::mem::transmute(status)) } + unsafe { uspoof_check(sc, id, length, position as _, status as _) } } #[inline] pub unsafe fn uspoof_check2(sc: *const USpoofChecker, id: *const u16, length: i32, checkresult: *mut USpoofCheckResult, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn uspoof_check2(sc : *const USpoofChecker, id : *const u16, length : i32, checkresult : *mut USpoofCheckResult, status : *mut UErrorCode) -> i32); - unsafe { uspoof_check2(sc, id, length, core::mem::transmute(checkresult), core::mem::transmute(status)) } + unsafe { uspoof_check2(sc, id, length, checkresult as _, status as _) } } #[inline] pub unsafe fn uspoof_check2UTF8(sc: *const USpoofChecker, id: P1, length: i32, checkresult: *mut USpoofCheckResult, status: *mut UErrorCode) -> i32 @@ -6587,7 +6545,7 @@ where P1: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn uspoof_check2UTF8(sc : *const USpoofChecker, id : windows_core::PCSTR, length : i32, checkresult : *mut USpoofCheckResult, status : *mut UErrorCode) -> i32); - unsafe { uspoof_check2UTF8(sc, id.param().abi(), length, core::mem::transmute(checkresult), core::mem::transmute(status)) } + unsafe { uspoof_check2UTF8(sc, id.param().abi(), length, checkresult as _, status as _) } } #[inline] pub unsafe fn uspoof_checkUTF8(sc: *const USpoofChecker, id: P1, length: i32, position: *mut i32, status: *mut UErrorCode) -> i32 @@ -6595,62 +6553,62 @@ where P1: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn uspoof_checkUTF8(sc : *const USpoofChecker, id : windows_core::PCSTR, length : i32, position : *mut i32, status : *mut UErrorCode) -> i32); - unsafe { uspoof_checkUTF8(sc, id.param().abi(), length, core::mem::transmute(position), core::mem::transmute(status)) } + unsafe { uspoof_checkUTF8(sc, id.param().abi(), length, position as _, status as _) } } #[inline] pub unsafe fn uspoof_clone(sc: *const USpoofChecker, status: *mut UErrorCode) -> *mut USpoofChecker { windows_targets::link!("icuin.dll" "cdecl" fn uspoof_clone(sc : *const USpoofChecker, status : *mut UErrorCode) -> *mut USpoofChecker); - unsafe { uspoof_clone(sc, core::mem::transmute(status)) } + unsafe { uspoof_clone(sc, status as _) } } #[inline] pub unsafe fn uspoof_close(sc: *mut USpoofChecker) { windows_targets::link!("icuin.dll" "cdecl" fn uspoof_close(sc : *mut USpoofChecker)); - unsafe { uspoof_close(core::mem::transmute(sc)) } + unsafe { uspoof_close(sc as _) } } #[inline] pub unsafe fn uspoof_closeCheckResult(checkresult: *mut USpoofCheckResult) { windows_targets::link!("icuin.dll" "cdecl" fn uspoof_closeCheckResult(checkresult : *mut USpoofCheckResult)); - unsafe { uspoof_closeCheckResult(core::mem::transmute(checkresult)) } + unsafe { uspoof_closeCheckResult(checkresult as _) } } #[inline] pub unsafe fn uspoof_getAllowedChars(sc: *const USpoofChecker, status: *mut UErrorCode) -> *mut USet { windows_targets::link!("icuin.dll" "cdecl" fn uspoof_getAllowedChars(sc : *const USpoofChecker, status : *mut UErrorCode) -> *mut USet); - unsafe { uspoof_getAllowedChars(sc, core::mem::transmute(status)) } + unsafe { uspoof_getAllowedChars(sc, status as _) } } #[inline] pub unsafe fn uspoof_getAllowedLocales(sc: *mut USpoofChecker, status: *mut UErrorCode) -> windows_core::PCSTR { windows_targets::link!("icuin.dll" "cdecl" fn uspoof_getAllowedLocales(sc : *mut USpoofChecker, status : *mut UErrorCode) -> windows_core::PCSTR); - unsafe { uspoof_getAllowedLocales(core::mem::transmute(sc), core::mem::transmute(status)) } + unsafe { uspoof_getAllowedLocales(sc as _, status as _) } } #[inline] pub unsafe fn uspoof_getCheckResultChecks(checkresult: *const USpoofCheckResult, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn uspoof_getCheckResultChecks(checkresult : *const USpoofCheckResult, status : *mut UErrorCode) -> i32); - unsafe { uspoof_getCheckResultChecks(checkresult, core::mem::transmute(status)) } + unsafe { uspoof_getCheckResultChecks(checkresult, status as _) } } #[inline] pub unsafe fn uspoof_getCheckResultNumerics(checkresult: *const USpoofCheckResult, status: *mut UErrorCode) -> *mut USet { windows_targets::link!("icuin.dll" "cdecl" fn uspoof_getCheckResultNumerics(checkresult : *const USpoofCheckResult, status : *mut UErrorCode) -> *mut USet); - unsafe { uspoof_getCheckResultNumerics(checkresult, core::mem::transmute(status)) } + unsafe { uspoof_getCheckResultNumerics(checkresult, status as _) } } #[inline] pub unsafe fn uspoof_getCheckResultRestrictionLevel(checkresult: *const USpoofCheckResult, status: *mut UErrorCode) -> URestrictionLevel { windows_targets::link!("icuin.dll" "cdecl" fn uspoof_getCheckResultRestrictionLevel(checkresult : *const USpoofCheckResult, status : *mut UErrorCode) -> URestrictionLevel); - unsafe { uspoof_getCheckResultRestrictionLevel(checkresult, core::mem::transmute(status)) } + unsafe { uspoof_getCheckResultRestrictionLevel(checkresult, status as _) } } #[inline] pub unsafe fn uspoof_getChecks(sc: *const USpoofChecker, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn uspoof_getChecks(sc : *const USpoofChecker, status : *mut UErrorCode) -> i32); - unsafe { uspoof_getChecks(sc, core::mem::transmute(status)) } + unsafe { uspoof_getChecks(sc, status as _) } } #[inline] pub unsafe fn uspoof_getInclusionSet(status: *mut UErrorCode) -> *mut USet { windows_targets::link!("icuin.dll" "cdecl" fn uspoof_getInclusionSet(status : *mut UErrorCode) -> *mut USet); - unsafe { uspoof_getInclusionSet(core::mem::transmute(status)) } + unsafe { uspoof_getInclusionSet(status as _) } } #[inline] pub unsafe fn uspoof_getRecommendedSet(status: *mut UErrorCode) -> *mut USet { windows_targets::link!("icuin.dll" "cdecl" fn uspoof_getRecommendedSet(status : *mut UErrorCode) -> *mut USet); - unsafe { uspoof_getRecommendedSet(core::mem::transmute(status)) } + unsafe { uspoof_getRecommendedSet(status as _) } } #[inline] pub unsafe fn uspoof_getRestrictionLevel(sc: *const USpoofChecker) -> URestrictionLevel { @@ -6660,7 +6618,7 @@ pub unsafe fn uspoof_getRestrictionLevel(sc: *const USpoofChecker) -> URestricti #[inline] pub unsafe fn uspoof_getSkeleton(sc: *const USpoofChecker, r#type: u32, id: *const u16, length: i32, dest: *mut u16, destcapacity: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn uspoof_getSkeleton(sc : *const USpoofChecker, r#type : u32, id : *const u16, length : i32, dest : *mut u16, destcapacity : i32, status : *mut UErrorCode) -> i32); - unsafe { uspoof_getSkeleton(sc, r#type, id, length, core::mem::transmute(dest), destcapacity, core::mem::transmute(status)) } + unsafe { uspoof_getSkeleton(sc, r#type, id, length, dest as _, destcapacity, status as _) } } #[inline] pub unsafe fn uspoof_getSkeletonUTF8(sc: *const USpoofChecker, r#type: u32, id: P2, length: i32, dest: P4, destcapacity: i32, status: *mut UErrorCode) -> i32 @@ -6669,22 +6627,22 @@ where P4: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn uspoof_getSkeletonUTF8(sc : *const USpoofChecker, r#type : u32, id : windows_core::PCSTR, length : i32, dest : windows_core::PCSTR, destcapacity : i32, status : *mut UErrorCode) -> i32); - unsafe { uspoof_getSkeletonUTF8(sc, r#type, id.param().abi(), length, dest.param().abi(), destcapacity, core::mem::transmute(status)) } + unsafe { uspoof_getSkeletonUTF8(sc, r#type, id.param().abi(), length, dest.param().abi(), destcapacity, status as _) } } #[inline] pub unsafe fn uspoof_open(status: *mut UErrorCode) -> *mut USpoofChecker { windows_targets::link!("icuin.dll" "cdecl" fn uspoof_open(status : *mut UErrorCode) -> *mut USpoofChecker); - unsafe { uspoof_open(core::mem::transmute(status)) } + unsafe { uspoof_open(status as _) } } #[inline] pub unsafe fn uspoof_openCheckResult(status: *mut UErrorCode) -> *mut USpoofCheckResult { windows_targets::link!("icuin.dll" "cdecl" fn uspoof_openCheckResult(status : *mut UErrorCode) -> *mut USpoofCheckResult); - unsafe { uspoof_openCheckResult(core::mem::transmute(status)) } + unsafe { uspoof_openCheckResult(status as _) } } #[inline] pub unsafe fn uspoof_openFromSerialized(data: *const core::ffi::c_void, length: i32, pactuallength: *mut i32, perrorcode: *mut UErrorCode) -> *mut USpoofChecker { windows_targets::link!("icuin.dll" "cdecl" fn uspoof_openFromSerialized(data : *const core::ffi::c_void, length : i32, pactuallength : *mut i32, perrorcode : *mut UErrorCode) -> *mut USpoofChecker); - unsafe { uspoof_openFromSerialized(data, length, core::mem::transmute(pactuallength), core::mem::transmute(perrorcode)) } + unsafe { uspoof_openFromSerialized(data, length, pactuallength as _, perrorcode as _) } } #[inline] pub unsafe fn uspoof_openFromSource(confusables: P0, confusableslen: i32, confusableswholescript: P2, confusableswholescriptlen: i32, errtype: *mut i32, pe: *mut UParseError, status: *mut UErrorCode) -> *mut USpoofChecker @@ -6693,17 +6651,17 @@ where P2: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn uspoof_openFromSource(confusables : windows_core::PCSTR, confusableslen : i32, confusableswholescript : windows_core::PCSTR, confusableswholescriptlen : i32, errtype : *mut i32, pe : *mut UParseError, status : *mut UErrorCode) -> *mut USpoofChecker); - unsafe { uspoof_openFromSource(confusables.param().abi(), confusableslen, confusableswholescript.param().abi(), confusableswholescriptlen, core::mem::transmute(errtype), core::mem::transmute(pe), core::mem::transmute(status)) } + unsafe { uspoof_openFromSource(confusables.param().abi(), confusableslen, confusableswholescript.param().abi(), confusableswholescriptlen, errtype as _, pe as _, status as _) } } #[inline] pub unsafe fn uspoof_serialize(sc: *mut USpoofChecker, data: *mut core::ffi::c_void, capacity: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn uspoof_serialize(sc : *mut USpoofChecker, data : *mut core::ffi::c_void, capacity : i32, status : *mut UErrorCode) -> i32); - unsafe { uspoof_serialize(core::mem::transmute(sc), core::mem::transmute(data), capacity, core::mem::transmute(status)) } + unsafe { uspoof_serialize(sc as _, data as _, capacity, status as _) } } #[inline] pub unsafe fn uspoof_setAllowedChars(sc: *mut USpoofChecker, chars: *const USet, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn uspoof_setAllowedChars(sc : *mut USpoofChecker, chars : *const USet, status : *mut UErrorCode)); - unsafe { uspoof_setAllowedChars(core::mem::transmute(sc), chars, core::mem::transmute(status)) } + unsafe { uspoof_setAllowedChars(sc as _, chars, status as _) } } #[inline] pub unsafe fn uspoof_setAllowedLocales(sc: *mut USpoofChecker, localeslist: P1, status: *mut UErrorCode) @@ -6711,22 +6669,22 @@ where P1: windows_core::Param, { windows_targets::link!("icuin.dll" "cdecl" fn uspoof_setAllowedLocales(sc : *mut USpoofChecker, localeslist : windows_core::PCSTR, status : *mut UErrorCode)); - unsafe { uspoof_setAllowedLocales(core::mem::transmute(sc), localeslist.param().abi(), core::mem::transmute(status)) } + unsafe { uspoof_setAllowedLocales(sc as _, localeslist.param().abi(), status as _) } } #[inline] pub unsafe fn uspoof_setChecks(sc: *mut USpoofChecker, checks: i32, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn uspoof_setChecks(sc : *mut USpoofChecker, checks : i32, status : *mut UErrorCode)); - unsafe { uspoof_setChecks(core::mem::transmute(sc), checks, core::mem::transmute(status)) } + unsafe { uspoof_setChecks(sc as _, checks, status as _) } } #[inline] pub unsafe fn uspoof_setRestrictionLevel(sc: *mut USpoofChecker, restrictionlevel: URestrictionLevel) { windows_targets::link!("icuin.dll" "cdecl" fn uspoof_setRestrictionLevel(sc : *mut USpoofChecker, restrictionlevel : URestrictionLevel)); - unsafe { uspoof_setRestrictionLevel(core::mem::transmute(sc), restrictionlevel) } + unsafe { uspoof_setRestrictionLevel(sc as _, restrictionlevel) } } #[inline] pub unsafe fn usprep_close(profile: *mut UStringPrepProfile) { windows_targets::link!("icuuc.dll" "cdecl" fn usprep_close(profile : *mut UStringPrepProfile)); - unsafe { usprep_close(core::mem::transmute(profile)) } + unsafe { usprep_close(profile as _) } } #[inline] pub unsafe fn usprep_open(path: P0, filename: P1, status: *mut UErrorCode) -> *mut UStringPrepProfile @@ -6735,42 +6693,42 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn usprep_open(path : windows_core::PCSTR, filename : windows_core::PCSTR, status : *mut UErrorCode) -> *mut UStringPrepProfile); - unsafe { usprep_open(path.param().abi(), filename.param().abi(), core::mem::transmute(status)) } + unsafe { usprep_open(path.param().abi(), filename.param().abi(), status as _) } } #[inline] pub unsafe fn usprep_openByType(r#type: UStringPrepProfileType, status: *mut UErrorCode) -> *mut UStringPrepProfile { windows_targets::link!("icuuc.dll" "cdecl" fn usprep_openByType(r#type : UStringPrepProfileType, status : *mut UErrorCode) -> *mut UStringPrepProfile); - unsafe { usprep_openByType(r#type, core::mem::transmute(status)) } + unsafe { usprep_openByType(r#type, status as _) } } #[inline] pub unsafe fn usprep_prepare(prep: *const UStringPrepProfile, src: *const u16, srclength: i32, dest: *mut u16, destcapacity: i32, options: i32, parseerror: *mut UParseError, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn usprep_prepare(prep : *const UStringPrepProfile, src : *const u16, srclength : i32, dest : *mut u16, destcapacity : i32, options : i32, parseerror : *mut UParseError, status : *mut UErrorCode) -> i32); - unsafe { usprep_prepare(prep, src, srclength, core::mem::transmute(dest), destcapacity, options, core::mem::transmute(parseerror), core::mem::transmute(status)) } + unsafe { usprep_prepare(prep, src, srclength, dest as _, destcapacity, options, parseerror as _, status as _) } } #[inline] pub unsafe fn utext_char32At(ut: *mut UText, nativeindex: i64) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn utext_char32At(ut : *mut UText, nativeindex : i64) -> i32); - unsafe { utext_char32At(core::mem::transmute(ut), nativeindex) } + unsafe { utext_char32At(ut as _, nativeindex) } } #[inline] pub unsafe fn utext_clone(dest: *mut UText, src: *const UText, deep: i8, readonly: i8, status: *mut UErrorCode) -> *mut UText { windows_targets::link!("icuuc.dll" "cdecl" fn utext_clone(dest : *mut UText, src : *const UText, deep : i8, readonly : i8, status : *mut UErrorCode) -> *mut UText); - unsafe { utext_clone(core::mem::transmute(dest), src, deep, readonly, core::mem::transmute(status)) } + unsafe { utext_clone(dest as _, src, deep, readonly, status as _) } } #[inline] pub unsafe fn utext_close(ut: *mut UText) -> *mut UText { windows_targets::link!("icuuc.dll" "cdecl" fn utext_close(ut : *mut UText) -> *mut UText); - unsafe { utext_close(core::mem::transmute(ut)) } + unsafe { utext_close(ut as _) } } #[inline] pub unsafe fn utext_copy(ut: *mut UText, nativestart: i64, nativelimit: i64, destindex: i64, r#move: i8, status: *mut UErrorCode) { windows_targets::link!("icuuc.dll" "cdecl" fn utext_copy(ut : *mut UText, nativestart : i64, nativelimit : i64, destindex : i64, r#move : i8, status : *mut UErrorCode)); - unsafe { utext_copy(core::mem::transmute(ut), nativestart, nativelimit, destindex, r#move, core::mem::transmute(status)) } + unsafe { utext_copy(ut as _, nativestart, nativelimit, destindex, r#move, status as _) } } #[inline] pub unsafe fn utext_current32(ut: *mut UText) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn utext_current32(ut : *mut UText) -> i32); - unsafe { utext_current32(core::mem::transmute(ut)) } + unsafe { utext_current32(ut as _) } } #[inline] pub unsafe fn utext_equals(a: *const UText, b: *const UText) -> i8 { @@ -6780,12 +6738,12 @@ pub unsafe fn utext_equals(a: *const UText, b: *const UText) -> i8 { #[inline] pub unsafe fn utext_extract(ut: *mut UText, nativestart: i64, nativelimit: i64, dest: *mut u16, destcapacity: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn utext_extract(ut : *mut UText, nativestart : i64, nativelimit : i64, dest : *mut u16, destcapacity : i32, status : *mut UErrorCode) -> i32); - unsafe { utext_extract(core::mem::transmute(ut), nativestart, nativelimit, core::mem::transmute(dest), destcapacity, core::mem::transmute(status)) } + unsafe { utext_extract(ut as _, nativestart, nativelimit, dest as _, destcapacity, status as _) } } #[inline] pub unsafe fn utext_freeze(ut: *mut UText) { windows_targets::link!("icuuc.dll" "cdecl" fn utext_freeze(ut : *mut UText)); - unsafe { utext_freeze(core::mem::transmute(ut)) } + unsafe { utext_freeze(ut as _) } } #[inline] pub unsafe fn utext_getNativeIndex(ut: *const UText) -> i64 { @@ -6795,7 +6753,7 @@ pub unsafe fn utext_getNativeIndex(ut: *const UText) -> i64 { #[inline] pub unsafe fn utext_getPreviousNativeIndex(ut: *mut UText) -> i64 { windows_targets::link!("icuuc.dll" "cdecl" fn utext_getPreviousNativeIndex(ut : *mut UText) -> i64); - unsafe { utext_getPreviousNativeIndex(core::mem::transmute(ut)) } + unsafe { utext_getPreviousNativeIndex(ut as _) } } #[inline] pub unsafe fn utext_hasMetaData(ut: *const UText) -> i8 { @@ -6815,27 +6773,27 @@ pub unsafe fn utext_isWritable(ut: *const UText) -> i8 { #[inline] pub unsafe fn utext_moveIndex32(ut: *mut UText, delta: i32) -> i8 { windows_targets::link!("icuuc.dll" "cdecl" fn utext_moveIndex32(ut : *mut UText, delta : i32) -> i8); - unsafe { utext_moveIndex32(core::mem::transmute(ut), delta) } + unsafe { utext_moveIndex32(ut as _, delta) } } #[inline] pub unsafe fn utext_nativeLength(ut: *mut UText) -> i64 { windows_targets::link!("icuuc.dll" "cdecl" fn utext_nativeLength(ut : *mut UText) -> i64); - unsafe { utext_nativeLength(core::mem::transmute(ut)) } + unsafe { utext_nativeLength(ut as _) } } #[inline] pub unsafe fn utext_next32(ut: *mut UText) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn utext_next32(ut : *mut UText) -> i32); - unsafe { utext_next32(core::mem::transmute(ut)) } + unsafe { utext_next32(ut as _) } } #[inline] pub unsafe fn utext_next32From(ut: *mut UText, nativeindex: i64) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn utext_next32From(ut : *mut UText, nativeindex : i64) -> i32); - unsafe { utext_next32From(core::mem::transmute(ut), nativeindex) } + unsafe { utext_next32From(ut as _, nativeindex) } } #[inline] pub unsafe fn utext_openUChars(ut: *mut UText, s: *const u16, length: i64, status: *mut UErrorCode) -> *mut UText { windows_targets::link!("icuuc.dll" "cdecl" fn utext_openUChars(ut : *mut UText, s : *const u16, length : i64, status : *mut UErrorCode) -> *mut UText); - unsafe { utext_openUChars(core::mem::transmute(ut), s, length, core::mem::transmute(status)) } + unsafe { utext_openUChars(ut as _, s, length, status as _) } } #[inline] pub unsafe fn utext_openUTF8(ut: *mut UText, s: P1, length: i64, status: *mut UErrorCode) -> *mut UText @@ -6843,37 +6801,37 @@ where P1: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn utext_openUTF8(ut : *mut UText, s : windows_core::PCSTR, length : i64, status : *mut UErrorCode) -> *mut UText); - unsafe { utext_openUTF8(core::mem::transmute(ut), s.param().abi(), length, core::mem::transmute(status)) } + unsafe { utext_openUTF8(ut as _, s.param().abi(), length, status as _) } } #[inline] pub unsafe fn utext_previous32(ut: *mut UText) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn utext_previous32(ut : *mut UText) -> i32); - unsafe { utext_previous32(core::mem::transmute(ut)) } + unsafe { utext_previous32(ut as _) } } #[inline] pub unsafe fn utext_previous32From(ut: *mut UText, nativeindex: i64) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn utext_previous32From(ut : *mut UText, nativeindex : i64) -> i32); - unsafe { utext_previous32From(core::mem::transmute(ut), nativeindex) } + unsafe { utext_previous32From(ut as _, nativeindex) } } #[inline] pub unsafe fn utext_replace(ut: *mut UText, nativestart: i64, nativelimit: i64, replacementtext: *const u16, replacementlength: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn utext_replace(ut : *mut UText, nativestart : i64, nativelimit : i64, replacementtext : *const u16, replacementlength : i32, status : *mut UErrorCode) -> i32); - unsafe { utext_replace(core::mem::transmute(ut), nativestart, nativelimit, replacementtext, replacementlength, core::mem::transmute(status)) } + unsafe { utext_replace(ut as _, nativestart, nativelimit, replacementtext, replacementlength, status as _) } } #[inline] pub unsafe fn utext_setNativeIndex(ut: *mut UText, nativeindex: i64) { windows_targets::link!("icuuc.dll" "cdecl" fn utext_setNativeIndex(ut : *mut UText, nativeindex : i64)); - unsafe { utext_setNativeIndex(core::mem::transmute(ut), nativeindex) } + unsafe { utext_setNativeIndex(ut as _, nativeindex) } } #[inline] pub unsafe fn utext_setup(ut: *mut UText, extraspace: i32, status: *mut UErrorCode) -> *mut UText { windows_targets::link!("icuuc.dll" "cdecl" fn utext_setup(ut : *mut UText, extraspace : i32, status : *mut UErrorCode) -> *mut UText); - unsafe { utext_setup(core::mem::transmute(ut), extraspace, core::mem::transmute(status)) } + unsafe { utext_setup(ut as _, extraspace, status as _) } } #[inline] pub unsafe fn utf8_appendCharSafeBody(s: *mut u8, i: i32, length: i32, c: i32, piserror: *mut i8) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn utf8_appendCharSafeBody(s : *mut u8, i : i32, length : i32, c : i32, piserror : *mut i8) -> i32); - unsafe { utf8_appendCharSafeBody(core::mem::transmute(s), i, length, c, core::mem::transmute(piserror)) } + unsafe { utf8_appendCharSafeBody(s as _, i, length, c, piserror as _) } } #[inline] pub unsafe fn utf8_back1SafeBody(s: *const u8, start: i32, i: i32) -> i32 { @@ -6883,27 +6841,27 @@ pub unsafe fn utf8_back1SafeBody(s: *const u8, start: i32, i: i32) -> i32 { #[inline] pub unsafe fn utf8_nextCharSafeBody(s: *const u8, pi: *mut i32, length: i32, c: i32, strict: i8) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn utf8_nextCharSafeBody(s : *const u8, pi : *mut i32, length : i32, c : i32, strict : i8) -> i32); - unsafe { utf8_nextCharSafeBody(s, core::mem::transmute(pi), length, c, strict) } + unsafe { utf8_nextCharSafeBody(s, pi as _, length, c, strict) } } #[inline] pub unsafe fn utf8_prevCharSafeBody(s: *const u8, start: i32, pi: *mut i32, c: i32, strict: i8) -> i32 { windows_targets::link!("icuuc.dll" "cdecl" fn utf8_prevCharSafeBody(s : *const u8, start : i32, pi : *mut i32, c : i32, strict : i8) -> i32); - unsafe { utf8_prevCharSafeBody(s, start, core::mem::transmute(pi), c, strict) } + unsafe { utf8_prevCharSafeBody(s, start, pi as _, c, strict) } } #[inline] pub unsafe fn utmscale_fromInt64(othertime: i64, timescale: UDateTimeScale, status: *mut UErrorCode) -> i64 { windows_targets::link!("icuin.dll" "cdecl" fn utmscale_fromInt64(othertime : i64, timescale : UDateTimeScale, status : *mut UErrorCode) -> i64); - unsafe { utmscale_fromInt64(othertime, timescale, core::mem::transmute(status)) } + unsafe { utmscale_fromInt64(othertime, timescale, status as _) } } #[inline] pub unsafe fn utmscale_getTimeScaleValue(timescale: UDateTimeScale, value: UTimeScaleValue, status: *mut UErrorCode) -> i64 { windows_targets::link!("icuin.dll" "cdecl" fn utmscale_getTimeScaleValue(timescale : UDateTimeScale, value : UTimeScaleValue, status : *mut UErrorCode) -> i64); - unsafe { utmscale_getTimeScaleValue(timescale, value, core::mem::transmute(status)) } + unsafe { utmscale_getTimeScaleValue(timescale, value, status as _) } } #[inline] pub unsafe fn utmscale_toInt64(universaltime: i64, timescale: UDateTimeScale, status: *mut UErrorCode) -> i64 { windows_targets::link!("icuin.dll" "cdecl" fn utmscale_toInt64(universaltime : i64, timescale : UDateTimeScale, status : *mut UErrorCode) -> i64); - unsafe { utmscale_toInt64(universaltime, timescale, core::mem::transmute(status)) } + unsafe { utmscale_toInt64(universaltime, timescale, status as _) } } #[inline] pub unsafe fn utrace_format(outbuf: P0, capacity: i32, indent: i32, fmt: P3) -> i32 @@ -6922,7 +6880,7 @@ pub unsafe fn utrace_functionName(fnnumber: i32) -> windows_core::PCSTR { #[inline] pub unsafe fn utrace_getFunctions(context: *const *const core::ffi::c_void, e: *mut UTraceEntry, x: *mut UTraceExit, d: *mut UTraceData) { windows_targets::link!("icuuc.dll" "cdecl" fn utrace_getFunctions(context : *const *const core::ffi::c_void, e : *mut UTraceEntry, x : *mut UTraceExit, d : *mut UTraceData)); - unsafe { utrace_getFunctions(context, core::mem::transmute(e), core::mem::transmute(x), core::mem::transmute(d)) } + unsafe { utrace_getFunctions(context, e as _, x as _, d as _) } } #[inline] pub unsafe fn utrace_getLevel() -> i32 { @@ -6946,17 +6904,17 @@ where P3: windows_core::Param, { windows_targets::link!("icuuc.dll" "cdecl" fn utrace_vformat(outbuf : windows_core::PCSTR, capacity : i32, indent : i32, fmt : windows_core::PCSTR, args : *mut i8) -> i32); - unsafe { utrace_vformat(outbuf.param().abi(), capacity, indent, fmt.param().abi(), core::mem::transmute(args)) } + unsafe { utrace_vformat(outbuf.param().abi(), capacity, indent, fmt.param().abi(), args as _) } } #[inline] pub unsafe fn utrans_clone(trans: *const *const core::ffi::c_void, status: *mut UErrorCode) -> *mut *mut core::ffi::c_void { windows_targets::link!("icuin.dll" "cdecl" fn utrans_clone(trans : *const *const core::ffi::c_void, status : *mut UErrorCode) -> *mut *mut core::ffi::c_void); - unsafe { utrans_clone(trans, core::mem::transmute(status)) } + unsafe { utrans_clone(trans, status as _) } } #[inline] pub unsafe fn utrans_close(trans: *mut *mut core::ffi::c_void) { windows_targets::link!("icuin.dll" "cdecl" fn utrans_close(trans : *mut *mut core::ffi::c_void)); - unsafe { utrans_close(core::mem::transmute(trans)) } + unsafe { utrans_close(trans as _) } } #[inline] pub unsafe fn utrans_countAvailableIDs() -> i32 { @@ -6966,62 +6924,62 @@ pub unsafe fn utrans_countAvailableIDs() -> i32 { #[inline] pub unsafe fn utrans_getSourceSet(trans: *const *const core::ffi::c_void, ignorefilter: i8, fillin: *mut USet, status: *mut UErrorCode) -> *mut USet { windows_targets::link!("icuin.dll" "cdecl" fn utrans_getSourceSet(trans : *const *const core::ffi::c_void, ignorefilter : i8, fillin : *mut USet, status : *mut UErrorCode) -> *mut USet); - unsafe { utrans_getSourceSet(trans, ignorefilter, core::mem::transmute(fillin), core::mem::transmute(status)) } + unsafe { utrans_getSourceSet(trans, ignorefilter, fillin as _, status as _) } } #[inline] pub unsafe fn utrans_getUnicodeID(trans: *const *const core::ffi::c_void, resultlength: *mut i32) -> *mut u16 { windows_targets::link!("icuin.dll" "cdecl" fn utrans_getUnicodeID(trans : *const *const core::ffi::c_void, resultlength : *mut i32) -> *mut u16); - unsafe { utrans_getUnicodeID(trans, core::mem::transmute(resultlength)) } + unsafe { utrans_getUnicodeID(trans, resultlength as _) } } #[inline] pub unsafe fn utrans_openIDs(perrorcode: *mut UErrorCode) -> *mut UEnumeration { windows_targets::link!("icuin.dll" "cdecl" fn utrans_openIDs(perrorcode : *mut UErrorCode) -> *mut UEnumeration); - unsafe { utrans_openIDs(core::mem::transmute(perrorcode)) } + unsafe { utrans_openIDs(perrorcode as _) } } #[inline] pub unsafe fn utrans_openInverse(trans: *const *const core::ffi::c_void, status: *mut UErrorCode) -> *mut *mut core::ffi::c_void { windows_targets::link!("icuin.dll" "cdecl" fn utrans_openInverse(trans : *const *const core::ffi::c_void, status : *mut UErrorCode) -> *mut *mut core::ffi::c_void); - unsafe { utrans_openInverse(trans, core::mem::transmute(status)) } + unsafe { utrans_openInverse(trans, status as _) } } #[inline] pub unsafe fn utrans_openU(id: *const u16, idlength: i32, dir: UTransDirection, rules: *const u16, ruleslength: i32, parseerror: *mut UParseError, perrorcode: *mut UErrorCode) -> *mut *mut core::ffi::c_void { windows_targets::link!("icuin.dll" "cdecl" fn utrans_openU(id : *const u16, idlength : i32, dir : UTransDirection, rules : *const u16, ruleslength : i32, parseerror : *mut UParseError, perrorcode : *mut UErrorCode) -> *mut *mut core::ffi::c_void); - unsafe { utrans_openU(id, idlength, dir, rules, ruleslength, core::mem::transmute(parseerror), core::mem::transmute(perrorcode)) } + unsafe { utrans_openU(id, idlength, dir, rules, ruleslength, parseerror as _, perrorcode as _) } } #[inline] pub unsafe fn utrans_register(adoptedtrans: *mut *mut core::ffi::c_void, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn utrans_register(adoptedtrans : *mut *mut core::ffi::c_void, status : *mut UErrorCode)); - unsafe { utrans_register(core::mem::transmute(adoptedtrans), core::mem::transmute(status)) } + unsafe { utrans_register(adoptedtrans as _, status as _) } } #[inline] pub unsafe fn utrans_setFilter(trans: *mut *mut core::ffi::c_void, filterpattern: *const u16, filterpatternlen: i32, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn utrans_setFilter(trans : *mut *mut core::ffi::c_void, filterpattern : *const u16, filterpatternlen : i32, status : *mut UErrorCode)); - unsafe { utrans_setFilter(core::mem::transmute(trans), filterpattern, filterpatternlen, core::mem::transmute(status)) } + unsafe { utrans_setFilter(trans as _, filterpattern, filterpatternlen, status as _) } } #[inline] pub unsafe fn utrans_toRules(trans: *const *const core::ffi::c_void, escapeunprintable: i8, result: *mut u16, resultlength: i32, status: *mut UErrorCode) -> i32 { windows_targets::link!("icuin.dll" "cdecl" fn utrans_toRules(trans : *const *const core::ffi::c_void, escapeunprintable : i8, result : *mut u16, resultlength : i32, status : *mut UErrorCode) -> i32); - unsafe { utrans_toRules(trans, escapeunprintable, core::mem::transmute(result), resultlength, core::mem::transmute(status)) } + unsafe { utrans_toRules(trans, escapeunprintable, result as _, resultlength, status as _) } } #[inline] pub unsafe fn utrans_trans(trans: *const *const core::ffi::c_void, rep: *mut *mut core::ffi::c_void, repfunc: *const UReplaceableCallbacks, start: i32, limit: *mut i32, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn utrans_trans(trans : *const *const core::ffi::c_void, rep : *mut *mut core::ffi::c_void, repfunc : *const UReplaceableCallbacks, start : i32, limit : *mut i32, status : *mut UErrorCode)); - unsafe { utrans_trans(trans, core::mem::transmute(rep), repfunc, start, core::mem::transmute(limit), core::mem::transmute(status)) } + unsafe { utrans_trans(trans, rep as _, repfunc, start, limit as _, status as _) } } #[inline] pub unsafe fn utrans_transIncremental(trans: *const *const core::ffi::c_void, rep: *mut *mut core::ffi::c_void, repfunc: *const UReplaceableCallbacks, pos: *mut UTransPosition, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn utrans_transIncremental(trans : *const *const core::ffi::c_void, rep : *mut *mut core::ffi::c_void, repfunc : *const UReplaceableCallbacks, pos : *mut UTransPosition, status : *mut UErrorCode)); - unsafe { utrans_transIncremental(trans, core::mem::transmute(rep), repfunc, core::mem::transmute(pos), core::mem::transmute(status)) } + unsafe { utrans_transIncremental(trans, rep as _, repfunc, pos as _, status as _) } } #[inline] pub unsafe fn utrans_transIncrementalUChars(trans: *const *const core::ffi::c_void, text: *mut u16, textlength: *mut i32, textcapacity: i32, pos: *mut UTransPosition, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn utrans_transIncrementalUChars(trans : *const *const core::ffi::c_void, text : *mut u16, textlength : *mut i32, textcapacity : i32, pos : *mut UTransPosition, status : *mut UErrorCode)); - unsafe { utrans_transIncrementalUChars(trans, core::mem::transmute(text), core::mem::transmute(textlength), textcapacity, core::mem::transmute(pos), core::mem::transmute(status)) } + unsafe { utrans_transIncrementalUChars(trans, text as _, textlength as _, textcapacity, pos as _, status as _) } } #[inline] pub unsafe fn utrans_transUChars(trans: *const *const core::ffi::c_void, text: *mut u16, textlength: *mut i32, textcapacity: i32, start: i32, limit: *mut i32, status: *mut UErrorCode) { windows_targets::link!("icuin.dll" "cdecl" fn utrans_transUChars(trans : *const *const core::ffi::c_void, text : *mut u16, textlength : *mut i32, textcapacity : i32, start : i32, limit : *mut i32, status : *mut UErrorCode)); - unsafe { utrans_transUChars(trans, core::mem::transmute(text), core::mem::transmute(textlength), textcapacity, start, core::mem::transmute(limit), core::mem::transmute(status)) } + unsafe { utrans_transUChars(trans, text as _, textlength as _, textcapacity, start, limit as _, status as _) } } #[inline] pub unsafe fn utrans_unregisterID(id: *const u16, idlength: i32) { @@ -7692,10 +7650,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<()> { - unsafe { (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenum.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), ppenum.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Next(&self, celt: u32, rgelt: *mut MIMECPINFO, pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(rgelt), core::mem::transmute(pceltfetched.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, rgelt as _, pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -7761,10 +7719,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<()> { - unsafe { (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenum.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), ppenum.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Next(&self, celt: u32, rgelt: *mut RFC1766INFO, pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(rgelt), core::mem::transmute(pceltfetched.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, rgelt as _, pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -7830,10 +7788,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<()> { - unsafe { (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenum.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), ppenum.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Next(&self, celt: u32, rgelt: *mut SCRIPTINFO, pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(rgelt), core::mem::transmute(pceltfetched.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, rgelt as _, pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -7935,7 +7893,7 @@ impl IMLangCodePages { } } pub unsafe fn GetStrCodePages(&self, pszsrc: &[u16], dwprioritycodepages: u32, pdwcodepages: Option<*mut u32>, pcchcodepages: Option<*mut i32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStrCodePages)(windows_core::Interface::as_raw(self), core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), dwprioritycodepages, core::mem::transmute(pdwcodepages.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchcodepages.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStrCodePages)(windows_core::Interface::as_raw(self), core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), dwprioritycodepages, pdwcodepages.unwrap_or(core::mem::zeroed()) as _, pcchcodepages.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CodePageToCodePages(&self, ucodepage: u32) -> windows_core::Result { unsafe { @@ -8046,19 +8004,19 @@ impl IMLangConvertCharset { } } pub unsafe fn DoConversion(&self, psrcstr: *const u8, pcsrcsize: Option<*mut u32>, pdststr: *mut u8, pcdstsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DoConversion)(windows_core::Interface::as_raw(self), psrcstr, core::mem::transmute(pcsrcsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdststr), core::mem::transmute(pcdstsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).DoConversion)(windows_core::Interface::as_raw(self), psrcstr, pcsrcsize.unwrap_or(core::mem::zeroed()) as _, pdststr as _, pcdstsize.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).DoConversionToUnicode)(windows_core::Interface::as_raw(self), psrcstr.param().abi(), pcsrcsize.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pdststr), pcdstsize.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).DoConversionFromUnicode)(windows_core::Interface::as_raw(self), psrcstr.param().abi(), pcsrcsize.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pdststr), pcdstsize.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -8170,11 +8128,11 @@ windows_core::imp::interface_hierarchy!(IMLangFontLink, windows_core::IUnknown, impl IMLangFontLink { #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetFontCodePages(&self, hdc: super::Graphics::Gdi::HDC, hfont: super::Graphics::Gdi::HFONT, pdwcodepages: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFontCodePages)(windows_core::Interface::as_raw(self), hdc, hfont, core::mem::transmute(pdwcodepages.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFontCodePages)(windows_core::Interface::as_raw(self), hdc, hfont, pdwcodepages.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] 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<()> { - unsafe { (windows_core::Interface::vtable(self).MapFont)(windows_core::Interface::as_raw(self), hdc, dwcodepages, hsrcfont, core::mem::transmute(phdestfont.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).MapFont)(windows_core::Interface::as_raw(self), hdc, dwcodepages, hsrcfont, phdestfont.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn ReleaseFont(&self, hfont: super::Graphics::Gdi::HFONT) -> windows_core::Result<()> { @@ -8260,7 +8218,7 @@ windows_core::imp::interface_hierarchy!(IMLangFontLink2, windows_core::IUnknown, impl IMLangFontLink2 { #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetFontCodePages(&self, hdc: super::Graphics::Gdi::HDC, hfont: super::Graphics::Gdi::HFONT, pdwcodepages: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFontCodePages)(windows_core::Interface::as_raw(self), hdc, hfont, core::mem::transmute(pdwcodepages.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFontCodePages)(windows_core::Interface::as_raw(self), hdc, hfont, pdwcodepages.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn ReleaseFont(&self, hfont: super::Graphics::Gdi::HFONT) -> windows_core::Result<()> { @@ -8271,14 +8229,14 @@ impl IMLangFontLink2 { } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn MapFont(&self, hdc: super::Graphics::Gdi::HDC, dwcodepages: u32, chsrc: u16, pfont: Option<*mut super::Graphics::Gdi::HFONT>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).MapFont)(windows_core::Interface::as_raw(self), hdc, dwcodepages, chsrc, core::mem::transmute(pfont.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).MapFont)(windows_core::Interface::as_raw(self), hdc, dwcodepages, chsrc, pfont.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetFontUnicodeRanges(&self, hdc: super::Graphics::Gdi::HDC, puiranges: *const u32, puranges: Option<*mut UNICODERANGE>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFontUnicodeRanges)(windows_core::Interface::as_raw(self), hdc, puiranges, core::mem::transmute(puranges.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFontUnicodeRanges)(windows_core::Interface::as_raw(self), hdc, puiranges, puranges.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetScriptFontInfo(&self, sid: u8, dwflags: u32, puifonts: *mut u32, pscriptfont: Option<*mut SCRIPTFONTINFO>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetScriptFontInfo)(windows_core::Interface::as_raw(self), sid, dwflags, core::mem::transmute(puifonts), core::mem::transmute(pscriptfont.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScriptFontInfo)(windows_core::Interface::as_raw(self), sid, dwflags, puifonts as _, pscriptfont.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CodePageToScriptID(&self, uicodepage: u32) -> windows_core::Result { unsafe { @@ -8395,13 +8353,13 @@ impl IMLangLineBreakConsole { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).BreakLineML)(windows_core::Interface::as_raw(self), psrcmlstr.param().abi(), lsrcpos, lsrclen, cmincolumns, cmaxcolumns, core::mem::transmute(pllinelen.unwrap_or(core::mem::zeroed())), core::mem::transmute(plskiplen.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).BreakLineML)(windows_core::Interface::as_raw(self), psrcmlstr.param().abi(), lsrcpos, lsrclen, cmincolumns, cmaxcolumns, pllinelen.unwrap_or(core::mem::zeroed()) as _, plskiplen.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn BreakLineW(&self, locale: u32, pszsrc: &[u16], cmaxcolumns: i32, pcchline: Option<*mut i32>, pcchskip: Option<*mut i32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).BreakLineW)(windows_core::Interface::as_raw(self), locale, core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), cmaxcolumns, core::mem::transmute(pcchline.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchskip.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).BreakLineW)(windows_core::Interface::as_raw(self), locale, core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), cmaxcolumns, pcchline.unwrap_or(core::mem::zeroed()) as _, pcchskip.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).BreakLineA)(windows_core::Interface::as_raw(self), locale, ucodepage, core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), cmaxcolumns, core::mem::transmute(pcchline.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchskip.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).BreakLineA)(windows_core::Interface::as_raw(self), locale, ucodepage, core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), cmaxcolumns, pcchline.unwrap_or(core::mem::zeroed()) as _, pcchskip.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -8455,7 +8413,7 @@ impl IMLangString { unsafe { (windows_core::Interface::vtable(self).Sync)(windows_core::Interface::as_raw(self), fnoaccess.into()).ok() } } pub unsafe fn GetLength(&self, pllen: Option<*mut i32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLength)(windows_core::Interface::as_raw(self), core::mem::transmute(pllen.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLength)(windows_core::Interface::as_raw(self), pllen.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetMLStr(&self, ldestpos: i32, ldestlen: i32, psrcmlstr: P2, lsrcpos: i32, lsrclen: i32) -> windows_core::Result<()> where @@ -8467,7 +8425,7 @@ impl IMLangString { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetMLStr)(windows_core::Interface::as_raw(self), lsrcpos, lsrclen, punkouter.param().abi(), dwclscontext, piid, core::mem::transmute(ppdestmlstr), core::mem::transmute(pldestpos.unwrap_or(core::mem::zeroed())), core::mem::transmute(pldestlen.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMLStr)(windows_core::Interface::as_raw(self), lsrcpos, lsrclen, punkouter.param().abi(), dwclscontext, piid, core::mem::transmute(ppdestmlstr), pldestpos.unwrap_or(core::mem::zeroed()) as _, pldestlen.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -8533,31 +8491,31 @@ impl core::ops::Deref for IMLangStringAStr { windows_core::imp::interface_hierarchy!(IMLangStringAStr, windows_core::IUnknown, IMLangString); impl IMLangStringAStr { pub unsafe fn SetAStr(&self, ldestpos: i32, ldestlen: i32, ucodepage: u32, pszsrc: &[u8], pcchactual: Option<*mut i32>, plactuallen: Option<*mut i32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetAStr)(windows_core::Interface::as_raw(self), ldestpos, ldestlen, ucodepage, core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), core::mem::transmute(pcchactual.unwrap_or(core::mem::zeroed())), core::mem::transmute(plactuallen.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetAStr)(windows_core::Interface::as_raw(self), ldestpos, ldestlen, ucodepage, core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), pcchactual.unwrap_or(core::mem::zeroed()) as _, plactuallen.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).SetStrBufA)(windows_core::Interface::as_raw(self), ldestpos, ldestlen, ucodepage, psrcbuf.param().abi(), core::mem::transmute(pcchactual.unwrap_or(core::mem::zeroed())), core::mem::transmute(plactuallen.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetStrBufA)(windows_core::Interface::as_raw(self), ldestpos, ldestlen, ucodepage, psrcbuf.param().abi(), pcchactual.unwrap_or(core::mem::zeroed()) as _, plactuallen.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetAStr)(windows_core::Interface::as_raw(self), lsrcpos, lsrclen, ucodepagein, 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::mem::zeroed())), core::mem::transmute(plactuallen.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAStr)(windows_core::Interface::as_raw(self), lsrcpos, lsrclen, ucodepagein, pucodepageout.unwrap_or(core::mem::zeroed()) as _, 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()), pcchactual.unwrap_or(core::mem::zeroed()) as _, plactuallen.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetStrBufA(&self, lsrcpos: i32, lsrcmaxlen: i32, pudestcodepage: Option<*mut u32>, ppdestbuf: *mut Option, pldestlen: Option<*mut i32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStrBufA)(windows_core::Interface::as_raw(self), lsrcpos, lsrcmaxlen, core::mem::transmute(pudestcodepage.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdestbuf), core::mem::transmute(pldestlen.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStrBufA)(windows_core::Interface::as_raw(self), lsrcpos, lsrcmaxlen, pudestcodepage.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(ppdestbuf), pldestlen.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).LockAStr)(windows_core::Interface::as_raw(self), lsrcpos, lsrclen, lflags, ucodepagein, 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() } + unsafe { (windows_core::Interface::vtable(self).LockAStr)(windows_core::Interface::as_raw(self), lsrcpos, lsrclen, lflags, ucodepagein, cchrequest, pucodepageout.unwrap_or(core::mem::zeroed()) as _, ppszdest.unwrap_or(core::mem::zeroed()) as _, pcchdest.unwrap_or(core::mem::zeroed()) as _, pldestlen.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn UnlockAStr(&self, pszsrc: &[u8], pcchactual: Option<*mut i32>, plactuallen: Option<*mut i32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).UnlockAStr)(windows_core::Interface::as_raw(self), core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), pcchactual.unwrap_or(core::mem::zeroed()) as _, plactuallen.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetLocale(&self, ldestpos: i32, ldestlen: i32, locale: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetLocale)(windows_core::Interface::as_raw(self), ldestpos, ldestlen, locale).ok() } } pub unsafe fn GetLocale(&self, lsrcpos: i32, lsrcmaxlen: i32, plocale: Option<*mut u32>, pllocalepos: Option<*mut i32>, pllocalelen: Option<*mut i32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLocale)(windows_core::Interface::as_raw(self), lsrcpos, 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() } + unsafe { (windows_core::Interface::vtable(self).GetLocale)(windows_core::Interface::as_raw(self), lsrcpos, lsrcmaxlen, plocale.unwrap_or(core::mem::zeroed()) as _, pllocalepos.unwrap_or(core::mem::zeroed()) as _, pllocalelen.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -8653,10 +8611,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), plflags.unwrap_or(core::mem::zeroed()) as _, pcchbuf.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn LockBuf(&self, cchoffset: i32, cchmaxlock: i32, ppszbuf: *mut *mut i8, pcchbuf: Option<*mut i32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).LockBuf)(windows_core::Interface::as_raw(self), cchoffset, cchmaxlock, core::mem::transmute(ppszbuf), core::mem::transmute(pcchbuf.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).LockBuf)(windows_core::Interface::as_raw(self), cchoffset, cchmaxlock, ppszbuf as _, pcchbuf.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn UnlockBuf(&self, pszbuf: P0, cchoffset: i32, cchwrite: i32) -> windows_core::Result<()> where @@ -8665,7 +8623,7 @@ impl IMLangStringBufA { unsafe { (windows_core::Interface::vtable(self).UnlockBuf)(windows_core::Interface::as_raw(self), pszbuf.param().abi(), cchoffset, cchwrite).ok() } } pub unsafe fn Insert(&self, cchoffset: i32, cchmaxinsert: i32, pcchactual: Option<*mut i32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Insert)(windows_core::Interface::as_raw(self), cchoffset, cchmaxinsert, core::mem::transmute(pcchactual.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Insert)(windows_core::Interface::as_raw(self), cchoffset, cchmaxinsert, pcchactual.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Delete(&self, cchoffset: i32, cchdelete: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Delete)(windows_core::Interface::as_raw(self), cchoffset, cchdelete).ok() } @@ -8737,10 +8695,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), plflags.unwrap_or(core::mem::zeroed()) as _, pcchbuf.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn LockBuf(&self, cchoffset: i32, cchmaxlock: i32, ppszbuf: *mut *mut u16, pcchbuf: Option<*mut i32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).LockBuf)(windows_core::Interface::as_raw(self), cchoffset, cchmaxlock, core::mem::transmute(ppszbuf), core::mem::transmute(pcchbuf.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).LockBuf)(windows_core::Interface::as_raw(self), cchoffset, cchmaxlock, ppszbuf as _, pcchbuf.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn UnlockBuf(&self, pszbuf: P0, cchoffset: i32, cchwrite: i32) -> windows_core::Result<()> where @@ -8749,7 +8707,7 @@ impl IMLangStringBufW { unsafe { (windows_core::Interface::vtable(self).UnlockBuf)(windows_core::Interface::as_raw(self), pszbuf.param().abi(), cchoffset, cchwrite).ok() } } pub unsafe fn Insert(&self, cchoffset: i32, cchmaxinsert: i32, pcchactual: Option<*mut i32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Insert)(windows_core::Interface::as_raw(self), cchoffset, cchmaxinsert, core::mem::transmute(pcchactual.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Insert)(windows_core::Interface::as_raw(self), cchoffset, cchmaxinsert, pcchactual.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Delete(&self, cchoffset: i32, cchdelete: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Delete)(windows_core::Interface::as_raw(self), cchoffset, cchdelete).ok() } @@ -8827,31 +8785,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<()> { - unsafe { (windows_core::Interface::vtable(self).SetWStr)(windows_core::Interface::as_raw(self), ldestpos, ldestlen, core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), core::mem::transmute(pcchactual.unwrap_or(core::mem::zeroed())), core::mem::transmute(plactuallen.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetWStr)(windows_core::Interface::as_raw(self), ldestpos, ldestlen, core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), pcchactual.unwrap_or(core::mem::zeroed()) as _, plactuallen.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).SetStrBufW)(windows_core::Interface::as_raw(self), ldestpos, ldestlen, psrcbuf.param().abi(), core::mem::transmute(pcchactual.unwrap_or(core::mem::zeroed())), core::mem::transmute(plactuallen.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetStrBufW)(windows_core::Interface::as_raw(self), ldestpos, ldestlen, psrcbuf.param().abi(), pcchactual.unwrap_or(core::mem::zeroed()) as _, plactuallen.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetWStr)(windows_core::Interface::as_raw(self), lsrcpos, lsrclen, core::mem::transmute(pszdest.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszdest.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcchactual.unwrap_or(core::mem::zeroed())), core::mem::transmute(plactuallen.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWStr)(windows_core::Interface::as_raw(self), lsrcpos, lsrclen, core::mem::transmute(pszdest.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszdest.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcchactual.unwrap_or(core::mem::zeroed()) as _, plactuallen.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetStrBufW(&self, lsrcpos: i32, lsrcmaxlen: i32, ppdestbuf: *mut Option, pldestlen: Option<*mut i32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStrBufW)(windows_core::Interface::as_raw(self), lsrcpos, lsrcmaxlen, core::mem::transmute(ppdestbuf), core::mem::transmute(pldestlen.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStrBufW)(windows_core::Interface::as_raw(self), lsrcpos, lsrcmaxlen, core::mem::transmute(ppdestbuf), pldestlen.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).LockWStr)(windows_core::Interface::as_raw(self), lsrcpos, lsrclen, lflags, 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() } + unsafe { (windows_core::Interface::vtable(self).LockWStr)(windows_core::Interface::as_raw(self), lsrcpos, lsrclen, lflags, cchrequest, ppszdest.unwrap_or(core::mem::zeroed()) as _, pcchdest.unwrap_or(core::mem::zeroed()) as _, pldestlen.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn UnlockWStr(&self, pszsrc: &[u16], pcchactual: Option<*mut i32>, plactuallen: Option<*mut i32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).UnlockWStr)(windows_core::Interface::as_raw(self), core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), pcchactual.unwrap_or(core::mem::zeroed()) as _, plactuallen.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetLocale(&self, ldestpos: i32, ldestlen: i32, locale: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetLocale)(windows_core::Interface::as_raw(self), ldestpos, ldestlen, locale).ok() } } pub unsafe fn GetLocale(&self, lsrcpos: i32, lsrcmaxlen: i32, plocale: Option<*mut u32>, pllocalepos: Option<*mut i32>, pllocalelen: Option<*mut i32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLocale)(windows_core::Interface::as_raw(self), lsrcpos, 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() } + unsafe { (windows_core::Interface::vtable(self).GetLocale)(windows_core::Interface::as_raw(self), lsrcpos, lsrcmaxlen, plocale.unwrap_or(core::mem::zeroed()) as _, pllocalepos.unwrap_or(core::mem::zeroed()) as _, pllocalelen.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -8953,7 +8911,7 @@ impl IMultiLanguage { } } pub unsafe fn GetCodePageInfo(&self, uicodepage: u32, pcodepageinfo: *mut MIMECPINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCodePageInfo)(windows_core::Interface::as_raw(self), uicodepage, core::mem::transmute(pcodepageinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCodePageInfo)(windows_core::Interface::as_raw(self), uicodepage, pcodepageinfo as _).ok() } } pub unsafe fn GetFamilyCodePage(&self, uicodepage: u32) -> windows_core::Result { unsafe { @@ -8968,25 +8926,25 @@ impl IMultiLanguage { } } pub unsafe fn GetCharsetInfo(&self, charset: &windows_core::BSTR, pcharsetinfo: *mut MIMECSETINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCharsetInfo)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(charset), core::mem::transmute(pcharsetinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCharsetInfo)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(charset), pcharsetinfo as _).ok() } } pub unsafe fn IsConvertible(&self, dwsrcencoding: u32, dwdstencoding: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).IsConvertible)(windows_core::Interface::as_raw(self), dwsrcencoding, dwdstencoding).ok() } } pub unsafe fn ConvertString(&self, pdwmode: Option<*mut u32>, dwsrcencoding: u32, dwdstencoding: u32, psrcstr: Option<*const u8>, pcsrcsize: Option<*mut u32>, pdststr: Option<*mut u8>, pcdstsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ConvertString)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::mem::zeroed())), dwsrcencoding, 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() } + unsafe { (windows_core::Interface::vtable(self).ConvertString)(windows_core::Interface::as_raw(self), pdwmode.unwrap_or(core::mem::zeroed()) as _, dwsrcencoding, dwdstencoding, psrcstr.unwrap_or(core::mem::zeroed()) as _, pcsrcsize.unwrap_or(core::mem::zeroed()) as _, pdststr.unwrap_or(core::mem::zeroed()) as _, pcdstsize.unwrap_or(core::mem::zeroed()) as _).ok() } } 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, { - unsafe { (windows_core::Interface::vtable(self).ConvertStringToUnicode)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::mem::zeroed())), 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() } + unsafe { (windows_core::Interface::vtable(self).ConvertStringToUnicode)(windows_core::Interface::as_raw(self), pdwmode.unwrap_or(core::mem::zeroed()) as _, dwencoding, psrcstr.param().abi(), pcsrcsize.unwrap_or(core::mem::zeroed()) as _, pdststr.unwrap_or(core::mem::zeroed()) as _, pcdstsize.unwrap_or(core::mem::zeroed()) as _).ok() } } 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, { - unsafe { (windows_core::Interface::vtable(self).ConvertStringFromUnicode)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::mem::zeroed())), 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() } + unsafe { (windows_core::Interface::vtable(self).ConvertStringFromUnicode)(windows_core::Interface::as_raw(self), pdwmode.unwrap_or(core::mem::zeroed()) as _, dwencoding, psrcstr.param().abi(), pcsrcsize.unwrap_or(core::mem::zeroed()) as _, pdststr.unwrap_or(core::mem::zeroed()) as _, pcdstsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ConvertStringReset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ConvertStringReset)(windows_core::Interface::as_raw(self)).ok() } @@ -8998,7 +8956,7 @@ impl IMultiLanguage { } } pub unsafe fn GetLcidFromRfc1766(&self, plocale: *mut u32, bstrrfc1766: &windows_core::BSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLcidFromRfc1766)(windows_core::Interface::as_raw(self), core::mem::transmute(plocale), core::mem::transmute_copy(bstrrfc1766)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLcidFromRfc1766)(windows_core::Interface::as_raw(self), plocale as _, core::mem::transmute_copy(bstrrfc1766)).ok() } } pub unsafe fn EnumRfc1766(&self) -> windows_core::Result { unsafe { @@ -9007,7 +8965,7 @@ impl IMultiLanguage { } } pub unsafe fn GetRfc1766Info(&self, locale: u32, prfc1766info: *mut RFC1766INFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRfc1766Info)(windows_core::Interface::as_raw(self), locale, core::mem::transmute(prfc1766info)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRfc1766Info)(windows_core::Interface::as_raw(self), locale, prfc1766info as _).ok() } } pub unsafe fn CreateConvertCharset(&self, uisrccodepage: u32, uidstcodepage: u32, dwproperty: u32) -> windows_core::Result { unsafe { @@ -9214,7 +9172,7 @@ impl IMultiLanguage2 { } } pub unsafe fn GetCodePageInfo(&self, uicodepage: u32, langid: u16, pcodepageinfo: *mut MIMECPINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCodePageInfo)(windows_core::Interface::as_raw(self), uicodepage, langid, core::mem::transmute(pcodepageinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCodePageInfo)(windows_core::Interface::as_raw(self), uicodepage, langid, pcodepageinfo as _).ok() } } pub unsafe fn GetFamilyCodePage(&self, uicodepage: u32) -> windows_core::Result { unsafe { @@ -9229,25 +9187,25 @@ impl IMultiLanguage2 { } } pub unsafe fn GetCharsetInfo(&self, charset: &windows_core::BSTR, pcharsetinfo: *mut MIMECSETINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCharsetInfo)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(charset), core::mem::transmute(pcharsetinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCharsetInfo)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(charset), pcharsetinfo as _).ok() } } pub unsafe fn IsConvertible(&self, dwsrcencoding: u32, dwdstencoding: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).IsConvertible)(windows_core::Interface::as_raw(self), dwsrcencoding, dwdstencoding).ok() } } pub unsafe fn ConvertString(&self, pdwmode: Option<*mut u32>, dwsrcencoding: u32, dwdstencoding: u32, psrcstr: Option<*const u8>, pcsrcsize: Option<*mut u32>, pdststr: Option<*mut u8>, pcdstsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ConvertString)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::mem::zeroed())), dwsrcencoding, 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() } + unsafe { (windows_core::Interface::vtable(self).ConvertString)(windows_core::Interface::as_raw(self), pdwmode.unwrap_or(core::mem::zeroed()) as _, dwsrcencoding, dwdstencoding, psrcstr.unwrap_or(core::mem::zeroed()) as _, pcsrcsize.unwrap_or(core::mem::zeroed()) as _, pdststr.unwrap_or(core::mem::zeroed()) as _, pcdstsize.unwrap_or(core::mem::zeroed()) as _).ok() } } 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, { - unsafe { (windows_core::Interface::vtable(self).ConvertStringToUnicode)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::mem::zeroed())), 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() } + unsafe { (windows_core::Interface::vtable(self).ConvertStringToUnicode)(windows_core::Interface::as_raw(self), pdwmode.unwrap_or(core::mem::zeroed()) as _, dwencoding, psrcstr.param().abi(), pcsrcsize.unwrap_or(core::mem::zeroed()) as _, pdststr.unwrap_or(core::mem::zeroed()) as _, pcdstsize.unwrap_or(core::mem::zeroed()) as _).ok() } } 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, { - unsafe { (windows_core::Interface::vtable(self).ConvertStringFromUnicode)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::mem::zeroed())), 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() } + unsafe { (windows_core::Interface::vtable(self).ConvertStringFromUnicode)(windows_core::Interface::as_raw(self), pdwmode.unwrap_or(core::mem::zeroed()) as _, dwencoding, psrcstr.param().abi(), pcsrcsize.unwrap_or(core::mem::zeroed()) as _, pdststr.unwrap_or(core::mem::zeroed()) as _, pcdstsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ConvertStringReset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ConvertStringReset)(windows_core::Interface::as_raw(self)).ok() } @@ -9259,7 +9217,7 @@ impl IMultiLanguage2 { } } pub unsafe fn GetLcidFromRfc1766(&self, plocale: *mut u32, bstrrfc1766: &windows_core::BSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLcidFromRfc1766)(windows_core::Interface::as_raw(self), core::mem::transmute(plocale), core::mem::transmute_copy(bstrrfc1766)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLcidFromRfc1766)(windows_core::Interface::as_raw(self), plocale as _, core::mem::transmute_copy(bstrrfc1766)).ok() } } pub unsafe fn EnumRfc1766(&self, langid: u16) -> windows_core::Result { unsafe { @@ -9268,7 +9226,7 @@ impl IMultiLanguage2 { } } pub unsafe fn GetRfc1766Info(&self, locale: u32, langid: u16, prfc1766info: *mut RFC1766INFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRfc1766Info)(windows_core::Interface::as_raw(self), locale, langid, core::mem::transmute(prfc1766info)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRfc1766Info)(windows_core::Interface::as_raw(self), locale, langid, prfc1766info as _).ok() } } pub unsafe fn CreateConvertCharset(&self, uisrccodepage: u32, uidstcodepage: u32, dwproperty: u32) -> windows_core::Result { unsafe { @@ -9283,34 +9241,34 @@ impl IMultiLanguage2 { P5: windows_core::Param, P6: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ConvertStringInIStream)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::mem::zeroed())), dwflag, lpfallback.param().abi(), dwsrcencoding, dwdstencoding, pstmin.param().abi(), pstmout.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).ConvertStringInIStream)(windows_core::Interface::as_raw(self), pdwmode.unwrap_or(core::mem::zeroed()) as _, dwflag, lpfallback.param().abi(), dwsrcencoding, dwdstencoding, pstmin.param().abi(), pstmout.param().abi()).ok() } } pub unsafe fn ConvertStringToUnicodeEx(&self, pdwmode: Option<*mut u32>, dwencoding: u32, psrcstr: 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, { - unsafe { (windows_core::Interface::vtable(self).ConvertStringToUnicodeEx)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::mem::zeroed())), 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())), dwflag, lpfallback.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).ConvertStringToUnicodeEx)(windows_core::Interface::as_raw(self), pdwmode.unwrap_or(core::mem::zeroed()) as _, dwencoding, psrcstr.param().abi(), pcsrcsize.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pdststr), pcdstsize.unwrap_or(core::mem::zeroed()) as _, 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, { - unsafe { (windows_core::Interface::vtable(self).ConvertStringFromUnicodeEx)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::mem::zeroed())), 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())), dwflag, lpfallback.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).ConvertStringFromUnicodeEx)(windows_core::Interface::as_raw(self), pdwmode.unwrap_or(core::mem::zeroed()) as _, dwencoding, psrcstr.param().abi(), pcsrcsize.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pdststr), pcdstsize.unwrap_or(core::mem::zeroed()) as _, 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<()> where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DetectCodepageInIStream)(windows_core::Interface::as_raw(self), dwflag, dwprefwincodepage, pstmin.param().abi(), core::mem::transmute(lpencoding), core::mem::transmute(pnscores)).ok() } + unsafe { (windows_core::Interface::vtable(self).DetectCodepageInIStream)(windows_core::Interface::as_raw(self), dwflag, dwprefwincodepage, pstmin.param().abi(), lpencoding as _, pnscores as _).ok() } } pub unsafe fn DetectInputCodepage(&self, dwflag: u32, dwprefwincodepage: u32, psrcstr: P2, pcsrcsize: *mut i32, lpencoding: *mut DetectEncodingInfo, pnscores: *mut i32) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DetectInputCodepage)(windows_core::Interface::as_raw(self), dwflag, dwprefwincodepage, psrcstr.param().abi(), core::mem::transmute(pcsrcsize), core::mem::transmute(lpencoding), core::mem::transmute(pnscores)).ok() } + unsafe { (windows_core::Interface::vtable(self).DetectInputCodepage)(windows_core::Interface::as_raw(self), dwflag, dwprefwincodepage, psrcstr.param().abi(), pcsrcsize as _, lpencoding as _, pnscores as _).ok() } } pub unsafe fn ValidateCodePage(&self, uicodepage: u32, hwnd: super::Foundation::HWND) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ValidateCodePage)(windows_core::Interface::as_raw(self), uicodepage, hwnd).ok() } @@ -9670,7 +9628,7 @@ impl IMultiLanguage3 { where P7: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DetectOutboundCodePage)(windows_core::Interface::as_raw(self), dwflags, core::mem::transmute(lpwidecharstr.as_ptr()), lpwidecharstr.len().try_into().unwrap(), core::mem::transmute(puipreferredcodepages.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), puipreferredcodepages.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(puidetectedcodepages), core::mem::transmute(pndetectedcodepages), lpspecialchar.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).DetectOutboundCodePage)(windows_core::Interface::as_raw(self), dwflags, core::mem::transmute(lpwidecharstr.as_ptr()), lpwidecharstr.len().try_into().unwrap(), core::mem::transmute(puipreferredcodepages.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), puipreferredcodepages.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), puidetectedcodepages as _, pndetectedcodepages as _, lpspecialchar.param().abi()).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn DetectOutboundCodePageInIStream(&self, dwflags: u32, pstrin: P1, puipreferredcodepages: Option<&[u32]>, puidetectedcodepages: *mut u32, pndetectedcodepages: *mut u32, lpspecialchar: P6) -> windows_core::Result<()> @@ -9678,7 +9636,7 @@ impl IMultiLanguage3 { P1: windows_core::Param, P6: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DetectOutboundCodePageInIStream)(windows_core::Interface::as_raw(self), dwflags, pstrin.param().abi(), core::mem::transmute(puipreferredcodepages.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), puipreferredcodepages.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(puidetectedcodepages), core::mem::transmute(pndetectedcodepages), lpspecialchar.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).DetectOutboundCodePageInIStream)(windows_core::Interface::as_raw(self), dwflags, pstrin.param().abi(), core::mem::transmute(puipreferredcodepages.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), puipreferredcodepages.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), puidetectedcodepages as _, pndetectedcodepages as _, lpspecialchar.param().abi()).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 fda6eafe97..a4033d52f6 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/CompositionSwapchain/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/CompositionSwapchain/mod.rs @@ -50,7 +50,7 @@ impl ICompositionFramePresentStatistics { } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetDisplayInstanceArray(&self, displayinstancearraycount: *mut u32, displayinstancearray: *mut *mut CompositionFrameDisplayInstance) { - unsafe { (windows_core::Interface::vtable(self).GetDisplayInstanceArray)(windows_core::Interface::as_raw(self), core::mem::transmute(displayinstancearraycount), core::mem::transmute(displayinstancearray)) } + unsafe { (windows_core::Interface::vtable(self).GetDisplayInstanceArray)(windows_core::Interface::as_raw(self), displayinstancearraycount as _, displayinstancearray as _) } } } #[repr(C)] 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 3450aa33e9..020ac31d48 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/DXCore/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/DXCore/mod.rs @@ -105,7 +105,7 @@ impl IDXCoreAdapter { unsafe { (windows_core::Interface::vtable(self).IsPropertySupported)(windows_core::Interface::as_raw(self), property) } } pub unsafe fn GetProperty(&self, property: DXCoreAdapterProperty, buffersize: usize, propertydata: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), property, buffersize, core::mem::transmute(propertydata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), property, buffersize, propertydata as _).ok() } } pub unsafe fn GetPropertySize(&self, property: DXCoreAdapterProperty) -> windows_core::Result { unsafe { @@ -117,13 +117,13 @@ impl IDXCoreAdapter { unsafe { (windows_core::Interface::vtable(self).IsQueryStateSupported)(windows_core::Interface::as_raw(self), property) } } pub unsafe fn QueryState(&self, state: DXCoreAdapterState, inputstatedetailssize: usize, inputstatedetails: Option<*const core::ffi::c_void>, outputbuffersize: usize, outputbuffer: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryState)(windows_core::Interface::as_raw(self), state, inputstatedetailssize, core::mem::transmute(inputstatedetails.unwrap_or(core::mem::zeroed())), outputbuffersize, core::mem::transmute(outputbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryState)(windows_core::Interface::as_raw(self), state, inputstatedetailssize, inputstatedetails.unwrap_or(core::mem::zeroed()) as _, outputbuffersize, outputbuffer as _).ok() } } pub unsafe fn IsSetStateSupported(&self, property: DXCoreAdapterState) -> bool { unsafe { (windows_core::Interface::vtable(self).IsSetStateSupported)(windows_core::Interface::as_raw(self), property) } } pub unsafe fn SetState(&self, state: DXCoreAdapterState, inputstatedetailssize: usize, inputstatedetails: Option<*const core::ffi::c_void>, inputdatasize: usize, inputdata: *const core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetState)(windows_core::Interface::as_raw(self), state, inputstatedetailssize, core::mem::transmute(inputstatedetails.unwrap_or(core::mem::zeroed())), inputdatasize, inputdata).ok() } + unsafe { (windows_core::Interface::vtable(self).SetState)(windows_core::Interface::as_raw(self), state, inputstatedetailssize, inputstatedetails.unwrap_or(core::mem::zeroed()) as _, inputdatasize, inputdata).ok() } } pub unsafe fn GetFactory(&self) -> windows_core::Result where @@ -272,7 +272,7 @@ impl IDXCoreAdapterFactory { { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).RegisterEventNotification)(windows_core::Interface::as_raw(self), dxcoreobject.param().abi(), notificationtype, callbackfunction, core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed())), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).RegisterEventNotification)(windows_core::Interface::as_raw(self), dxcoreobject.param().abi(), notificationtype, callbackfunction, callbackcontext.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| result__) } } pub unsafe fn UnregisterEventNotification(&self, eventcookie: u32) -> windows_core::Result<()> { 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 d6bfea898c..278ed82c09 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct2D/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct2D/mod.rs @@ -21,7 +21,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); unsafe { let mut result__ = core::mem::zeroed(); - D2D1CreateDevice(dxgidevice.param().abi(), core::mem::transmute(creationproperties.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + D2D1CreateDevice(dxgidevice.param().abi(), creationproperties.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_Graphics_Dxgi")] @@ -33,7 +33,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); unsafe { let mut result__ = core::mem::zeroed(); - D2D1CreateDeviceContext(dxgisurface.param().abi(), core::mem::transmute(creationproperties.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + D2D1CreateDeviceContext(dxgisurface.param().abi(), creationproperties.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[inline] @@ -43,19 +43,19 @@ 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(); - unsafe { D2D1CreateFactory(factorytype, &T::IID, core::mem::transmute(pfactoryoptions.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } + unsafe { D2D1CreateFactory(factorytype, &T::IID, pfactoryoptions.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] #[inline] pub unsafe fn D2D1GetGradientMeshInteriorPointsFromCoonsPatch(ppoint0: *const Common::D2D_POINT_2F, ppoint1: *const Common::D2D_POINT_2F, ppoint2: *const Common::D2D_POINT_2F, ppoint3: *const Common::D2D_POINT_2F, ppoint4: *const Common::D2D_POINT_2F, ppoint5: *const Common::D2D_POINT_2F, ppoint6: *const Common::D2D_POINT_2F, ppoint7: *const Common::D2D_POINT_2F, ppoint8: *const Common::D2D_POINT_2F, ppoint9: *const Common::D2D_POINT_2F, ppoint10: *const Common::D2D_POINT_2F, ppoint11: *const Common::D2D_POINT_2F, ptensorpoint11: *mut Common::D2D_POINT_2F, ptensorpoint12: *mut Common::D2D_POINT_2F, ptensorpoint21: *mut Common::D2D_POINT_2F, ptensorpoint22: *mut Common::D2D_POINT_2F) { windows_targets::link!("d2d1.dll" "system" fn D2D1GetGradientMeshInteriorPointsFromCoonsPatch(ppoint0 : *const Common:: D2D_POINT_2F, ppoint1 : *const Common:: D2D_POINT_2F, ppoint2 : *const Common:: D2D_POINT_2F, ppoint3 : *const Common:: D2D_POINT_2F, ppoint4 : *const Common:: D2D_POINT_2F, ppoint5 : *const Common:: D2D_POINT_2F, ppoint6 : *const Common:: D2D_POINT_2F, ppoint7 : *const Common:: D2D_POINT_2F, ppoint8 : *const Common:: D2D_POINT_2F, ppoint9 : *const Common:: D2D_POINT_2F, ppoint10 : *const Common:: D2D_POINT_2F, ppoint11 : *const Common:: D2D_POINT_2F, ptensorpoint11 : *mut Common:: D2D_POINT_2F, ptensorpoint12 : *mut Common:: D2D_POINT_2F, ptensorpoint21 : *mut Common:: D2D_POINT_2F, ptensorpoint22 : *mut Common:: D2D_POINT_2F)); - unsafe { D2D1GetGradientMeshInteriorPointsFromCoonsPatch(ppoint0, ppoint1, ppoint2, ppoint3, ppoint4, ppoint5, ppoint6, ppoint7, ppoint8, ppoint9, ppoint10, ppoint11, core::mem::transmute(ptensorpoint11), core::mem::transmute(ptensorpoint12), core::mem::transmute(ptensorpoint21), core::mem::transmute(ptensorpoint22)) } + unsafe { D2D1GetGradientMeshInteriorPointsFromCoonsPatch(ppoint0, ppoint1, ppoint2, ppoint3, ppoint4, ppoint5, ppoint6, ppoint7, ppoint8, ppoint9, ppoint10, ppoint11, ptensorpoint11 as _, ptensorpoint12 as _, ptensorpoint21 as _, ptensorpoint22 as _) } } #[cfg(feature = "Foundation_Numerics")] #[inline] pub unsafe fn D2D1InvertMatrix(matrix: *mut super::super::super::Foundation::Numerics::Matrix3x2) -> super::super::Foundation::BOOL { windows_targets::link!("d2d1.dll" "system" fn D2D1InvertMatrix(matrix : *mut super::super::super::Foundation::Numerics:: Matrix3x2) -> super::super::Foundation:: BOOL); - unsafe { D2D1InvertMatrix(core::mem::transmute(matrix)) } + unsafe { D2D1InvertMatrix(matrix as _) } } #[cfg(feature = "Foundation_Numerics")] #[inline] @@ -67,18 +67,18 @@ pub unsafe fn D2D1IsMatrixInvertible(matrix: *const super::super::super::Foundat #[inline] pub unsafe fn D2D1MakeRotateMatrix(angle: f32, center: Common::D2D_POINT_2F, matrix: *mut super::super::super::Foundation::Numerics::Matrix3x2) { windows_targets::link!("d2d1.dll" "system" fn D2D1MakeRotateMatrix(angle : f32, center : Common:: D2D_POINT_2F, matrix : *mut super::super::super::Foundation::Numerics:: Matrix3x2)); - unsafe { D2D1MakeRotateMatrix(angle, core::mem::transmute(center), core::mem::transmute(matrix)) } + unsafe { D2D1MakeRotateMatrix(angle, core::mem::transmute(center), matrix as _) } } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] #[inline] pub unsafe fn D2D1MakeSkewMatrix(anglex: f32, angley: f32, center: Common::D2D_POINT_2F, matrix: *mut super::super::super::Foundation::Numerics::Matrix3x2) { windows_targets::link!("d2d1.dll" "system" fn D2D1MakeSkewMatrix(anglex : f32, angley : f32, center : Common:: D2D_POINT_2F, matrix : *mut super::super::super::Foundation::Numerics:: Matrix3x2)); - unsafe { D2D1MakeSkewMatrix(anglex, angley, core::mem::transmute(center), core::mem::transmute(matrix)) } + unsafe { D2D1MakeSkewMatrix(anglex, angley, core::mem::transmute(center), matrix as _) } } #[inline] pub unsafe fn D2D1SinCos(angle: f32, s: *mut f32, c: *mut f32) { windows_targets::link!("d2d1.dll" "system" fn D2D1SinCos(angle : f32, s : *mut f32, c : *mut f32)); - unsafe { D2D1SinCos(angle, core::mem::transmute(s), core::mem::transmute(c)) } + unsafe { D2D1SinCos(angle, s as _, c as _) } } #[inline] pub unsafe fn D2D1Tan(angle: f32) -> f32 { @@ -2633,25 +2633,25 @@ impl ID2D1Bitmap { } } pub unsafe fn GetDpi(&self, dpix: *mut f32, dpiy: *mut f32) { - unsafe { (windows_core::Interface::vtable(self).GetDpi)(windows_core::Interface::as_raw(self), core::mem::transmute(dpix), core::mem::transmute(dpiy)) } + unsafe { (windows_core::Interface::vtable(self).GetDpi)(windows_core::Interface::as_raw(self), dpix as _, dpiy as _) } } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CopyFromBitmap(&self, destpoint: Option<*const Common::D2D_POINT_2U>, bitmap: P1, srcrect: Option<*const Common::D2D_RECT_U>) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).CopyFromBitmap)(windows_core::Interface::as_raw(self), destpoint.unwrap_or(core::mem::zeroed()) as _, bitmap.param().abi(), srcrect.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).CopyFromRenderTarget)(windows_core::Interface::as_raw(self), destpoint.unwrap_or(core::mem::zeroed()) as _, rendertarget.param().abi(), srcrect.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).CopyFromMemory)(windows_core::Interface::as_raw(self), core::mem::transmute(dstrect.unwrap_or(core::mem::zeroed())), srcdata, pitch).ok() } + unsafe { (windows_core::Interface::vtable(self).CopyFromMemory)(windows_core::Interface::as_raw(self), dstrect.unwrap_or(core::mem::zeroed()) as _, srcdata, pitch).ok() } } } #[repr(C)] @@ -3139,7 +3139,7 @@ impl ID2D1BlendTransform { unsafe { (windows_core::Interface::vtable(self).SetDescription)(windows_core::Interface::as_raw(self), description) } } pub unsafe fn GetDescription(&self, description: *mut D2D1_BLEND_DESCRIPTION) { - unsafe { (windows_core::Interface::vtable(self).GetDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(description)) } + unsafe { (windows_core::Interface::vtable(self).GetDescription)(windows_core::Interface::as_raw(self), description as _) } } } #[repr(C)] @@ -3334,7 +3334,7 @@ impl ID2D1Brush { } #[cfg(feature = "Foundation_Numerics")] pub unsafe fn GetTransform(&self, transform: *mut super::super::super::Foundation::Numerics::Matrix3x2) { - unsafe { (windows_core::Interface::vtable(self).GetTransform)(windows_core::Interface::as_raw(self), core::mem::transmute(transform)) } + unsafe { (windows_core::Interface::vtable(self).GetTransform)(windows_core::Interface::as_raw(self), transform as _) } } } #[repr(C)] @@ -3486,7 +3486,7 @@ impl ID2D1ColorContext1 { } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn GetSimpleColorProfile(&self, simpleprofile: *mut D2D1_SIMPLE_COLOR_PROFILE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSimpleColorProfile)(windows_core::Interface::as_raw(self), core::mem::transmute(simpleprofile)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSimpleColorProfile)(windows_core::Interface::as_raw(self), simpleprofile as _).ok() } } } #[repr(C)] @@ -3635,14 +3635,14 @@ impl ID2D1CommandSink { } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn Clear(&self, color: Option<*const Common::D2D1_COLOR_F>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Clear)(windows_core::Interface::as_raw(self), core::mem::transmute(color.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Clear)(windows_core::Interface::as_raw(self), color.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (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(), measuringmode).ok() } + unsafe { (windows_core::Interface::vtable(self).DrawGlyphRun)(windows_core::Interface::as_raw(self), core::mem::transmute(baselineorigin), core::mem::transmute(glyphrun), glyphrundescription.unwrap_or(core::mem::zeroed()) as _, foregroundbrush.param().abi(), measuringmode).ok() } } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn DrawLine(&self, point0: Common::D2D_POINT_2F, point1: Common::D2D_POINT_2F, brush: P2, strokewidth: f32, strokestyle: P4) -> windows_core::Result<()> @@ -3673,21 +3673,21 @@ impl ID2D1CommandSink { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DrawBitmap)(windows_core::Interface::as_raw(self), bitmap.param().abi(), core::mem::transmute(destinationrectangle.unwrap_or(core::mem::zeroed())), opacity, interpolationmode, core::mem::transmute(sourcerectangle.unwrap_or(core::mem::zeroed())), core::mem::transmute(perspectivetransform.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).DrawBitmap)(windows_core::Interface::as_raw(self), bitmap.param().abi(), destinationrectangle.unwrap_or(core::mem::zeroed()) as _, opacity, interpolationmode, sourcerectangle.unwrap_or(core::mem::zeroed()) as _, perspectivetransform.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (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())), interpolationmode, compositemode).ok() } + unsafe { (windows_core::Interface::vtable(self).DrawImage)(windows_core::Interface::as_raw(self), image.param().abi(), targetoffset.unwrap_or(core::mem::zeroed()) as _, imagerectangle.unwrap_or(core::mem::zeroed()) as _, interpolationmode, compositemode).ok() } } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn DrawGdiMetafile(&self, gdimetafile: P0, targetoffset: Option<*const Common::D2D_POINT_2F>) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).DrawGdiMetafile)(windows_core::Interface::as_raw(self), gdimetafile.param().abi(), targetoffset.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn FillMesh(&self, mesh: P0, brush: P1) -> windows_core::Result<()> where @@ -3702,7 +3702,7 @@ impl ID2D1CommandSink { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).FillOpacityMask)(windows_core::Interface::as_raw(self), opacitymask.param().abi(), brush.param().abi(), destinationrectangle.unwrap_or(core::mem::zeroed()) as _, sourcerectangle.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn FillGeometry(&self, geometry: P0, brush: P1, opacitybrush: P2) -> windows_core::Result<()> where @@ -4096,7 +4096,7 @@ impl ID2D1CommandSink2 { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).DrawGdiMetafile)(windows_core::Interface::as_raw(self), gdimetafile.param().abi(), destinationrectangle.unwrap_or(core::mem::zeroed()) as _, sourcerectangle.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -4257,7 +4257,7 @@ impl ID2D1CommandSink5 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).BlendImage)(windows_core::Interface::as_raw(self), image.param().abi(), blendmode, core::mem::transmute(targetoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(imagerectangle.unwrap_or(core::mem::zeroed())), interpolationmode).ok() } + unsafe { (windows_core::Interface::vtable(self).BlendImage)(windows_core::Interface::as_raw(self), image.param().abi(), blendmode, targetoffset.unwrap_or(core::mem::zeroed()) as _, imagerectangle.unwrap_or(core::mem::zeroed()) as _, interpolationmode).ok() } } } #[repr(C)] @@ -4377,7 +4377,7 @@ impl ID2D1ComputeTransform { unsafe { (windows_core::Interface::vtable(self).SetComputeInfo)(windows_core::Interface::as_raw(self), computeinfo.param().abi()).ok() } } pub unsafe fn CalculateThreadgroups(&self, outputrect: *const super::super::Foundation::RECT, dimensionx: *mut u32, dimensiony: *mut u32, dimensionz: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CalculateThreadgroups)(windows_core::Interface::as_raw(self), outputrect, core::mem::transmute(dimensionx), core::mem::transmute(dimensiony), core::mem::transmute(dimensionz)).ok() } + unsafe { (windows_core::Interface::vtable(self).CalculateThreadgroups)(windows_core::Interface::as_raw(self), outputrect, dimensionx as _, dimensiony as _, dimensionz as _).ok() } } } #[repr(C)] @@ -4540,7 +4540,7 @@ impl ID2D1Device { { unsafe { 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::mem::zeroed())), &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(), printcontrolproperties.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn SetMaximumTextureMemory(&self, maximuminbytes: u64) { @@ -5111,7 +5111,7 @@ impl ID2D1DeviceContext { 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 { unsafe { 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::mem::zeroed())), 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), sourcedata.unwrap_or(core::mem::zeroed()) as _, 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"))] @@ -5121,7 +5121,7 @@ impl ID2D1DeviceContext { { unsafe { 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::mem::zeroed())), &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(), bitmapproperties.unwrap_or(core::mem::zeroed()) as _, &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 { @@ -5156,7 +5156,7 @@ impl ID2D1DeviceContext { { unsafe { 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::mem::zeroed())), &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(), bitmapproperties.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn CreateEffect(&self, effectid: *const windows_core::GUID) -> windows_core::Result { @@ -5179,7 +5179,7 @@ impl ID2D1DeviceContext { { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateImageBrush)(windows_core::Interface::as_raw(self), image.param().abi(), imagebrushproperties, core::mem::transmute(brushproperties.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateImageBrush)(windows_core::Interface::as_raw(self), image.param().abi(), imagebrushproperties, brushproperties.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Foundation_Numerics")] @@ -5189,7 +5189,7 @@ impl ID2D1DeviceContext { { unsafe { 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::mem::zeroed())), core::mem::transmute(brushproperties.unwrap_or(core::mem::zeroed())), &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(), bitmapbrushproperties.unwrap_or(core::mem::zeroed()) as _, brushproperties.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn CreateCommandList(&self) -> windows_core::Result { @@ -5281,28 +5281,28 @@ impl ID2D1DeviceContext { where P3: windows_core::Param, { - unsafe { (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(), measuringmode) } + unsafe { (windows_core::Interface::vtable(self).DrawGlyphRun)(windows_core::Interface::as_raw(self), core::mem::transmute(baselineorigin), core::mem::transmute(glyphrun), glyphrundescription.unwrap_or(core::mem::zeroed()) as _, foregroundbrush.param().abi(), measuringmode) } } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn DrawImage(&self, image: P0, targetoffset: Option<*const Common::D2D_POINT_2F>, imagerectangle: Option<*const Common::D2D_RECT_F>, interpolationmode: D2D1_INTERPOLATION_MODE, compositemode: Common::D2D1_COMPOSITE_MODE) where P0: windows_core::Param, { - unsafe { (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())), interpolationmode, compositemode) } + unsafe { (windows_core::Interface::vtable(self).DrawImage)(windows_core::Interface::as_raw(self), image.param().abi(), targetoffset.unwrap_or(core::mem::zeroed()) as _, imagerectangle.unwrap_or(core::mem::zeroed()) as _, interpolationmode, compositemode) } } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn DrawGdiMetafile(&self, gdimetafile: P0, targetoffset: Option<*const Common::D2D_POINT_2F>) where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DrawGdiMetafile)(windows_core::Interface::as_raw(self), gdimetafile.param().abi(), core::mem::transmute(targetoffset.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).DrawGdiMetafile)(windows_core::Interface::as_raw(self), gdimetafile.param().abi(), targetoffset.unwrap_or(core::mem::zeroed()) as _) } } #[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, { - unsafe { (windows_core::Interface::vtable(self).DrawBitmap)(windows_core::Interface::as_raw(self), bitmap.param().abi(), core::mem::transmute(destinationrectangle.unwrap_or(core::mem::zeroed())), opacity, interpolationmode, core::mem::transmute(sourcerectangle.unwrap_or(core::mem::zeroed())), core::mem::transmute(perspectivetransform.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).DrawBitmap)(windows_core::Interface::as_raw(self), bitmap.param().abi(), destinationrectangle.unwrap_or(core::mem::zeroed()) as _, opacity, interpolationmode, sourcerectangle.unwrap_or(core::mem::zeroed()) as _, perspectivetransform.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub unsafe fn PushLayer(&self, layerparameters: *const D2D1_LAYER_PARAMETERS1, layer: P1) @@ -5339,7 +5339,7 @@ impl ID2D1DeviceContext { where P0: windows_core::Param, { - unsafe { (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), inputcount).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEffectRequiredInputRectangles)(windows_core::Interface::as_raw(self), rendereffect.param().abi(), renderimagerectangle.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(inputdescriptions), requiredinputrects as _, 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>) @@ -5347,7 +5347,7 @@ impl ID2D1DeviceContext { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).FillOpacityMask)(windows_core::Interface::as_raw(self), opacitymask.param().abi(), brush.param().abi(), destinationrectangle.unwrap_or(core::mem::zeroed()) as _, sourcerectangle.unwrap_or(core::mem::zeroed()) as _) } } } #[repr(C)] @@ -5963,7 +5963,7 @@ impl ID2D1DeviceContext2 { pub unsafe fn CreateInkStyle(&self, inkstyleproperties: Option<*const D2D1_INK_STYLE_PROPERTIES>) -> windows_core::Result { unsafe { 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::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateInkStyle)(windows_core::Interface::as_raw(self), inkstyleproperties.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] @@ -6025,7 +6025,7 @@ impl ID2D1DeviceContext2 { where P0: windows_core::Param, { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).DrawGdiMetafile)(windows_core::Interface::as_raw(self), gdimetafile.param().abi(), destinationrectangle.unwrap_or(core::mem::zeroed()) as _, sourcerectangle.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn CreateTransformedImageSource(&self, imagesource: P0, properties: *const D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES) -> windows_core::Result where @@ -6347,7 +6347,7 @@ impl ID2D1DeviceContext4 { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetColorBitmapGlyphImage)(windows_core::Interface::as_raw(self), glyphimageformat, core::mem::transmute(glyphorigin), fontface.param().abi(), fontemsize, glyphindex, issideways.into(), core::mem::transmute(worldtransform.unwrap_or(core::mem::zeroed())), dpix, dpiy, core::mem::transmute(glyphtransform), core::mem::transmute(glyphimage)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetColorBitmapGlyphImage)(windows_core::Interface::as_raw(self), glyphimageformat, core::mem::transmute(glyphorigin), fontface.param().abi(), fontemsize, glyphindex, issideways.into(), worldtransform.unwrap_or(core::mem::zeroed()) as _, dpix, dpiy, glyphtransform as _, 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: bool, 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<()> @@ -6356,7 +6356,7 @@ impl ID2D1DeviceContext4 { P6: windows_core::Param, P7: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetSvgGlyphImage)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphorigin), fontface.param().abi(), fontemsize, glyphindex, issideways.into(), core::mem::transmute(worldtransform.unwrap_or(core::mem::zeroed())), defaultfillbrush.param().abi(), svgglyphstyle.param().abi(), colorpaletteindex, core::mem::transmute(glyphtransform), core::mem::transmute(glyphimage)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSvgGlyphImage)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphorigin), fontface.param().abi(), fontemsize, glyphindex, issideways.into(), worldtransform.unwrap_or(core::mem::zeroed()) as _, defaultfillbrush.param().abi(), svgglyphstyle.param().abi(), colorpaletteindex, glyphtransform as _, core::mem::transmute(glyphimage)).ok() } } } #[repr(C)] @@ -6611,7 +6611,7 @@ impl ID2D1DeviceContext6 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).BlendImage)(windows_core::Interface::as_raw(self), image.param().abi(), blendmode, core::mem::transmute(targetoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(imagerectangle.unwrap_or(core::mem::zeroed())), interpolationmode) } + unsafe { (windows_core::Interface::vtable(self).BlendImage)(windows_core::Interface::as_raw(self), image.param().abi(), blendmode, targetoffset.unwrap_or(core::mem::zeroed()) as _, imagerectangle.unwrap_or(core::mem::zeroed()) as _, interpolationmode) } } } #[repr(C)] @@ -6673,7 +6673,7 @@ impl ID2D1DeviceContext7 { P3: windows_core::Param, P4: windows_core::Param, { - unsafe { (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(), colorpaletteindex, measuringmode, bitmapsnapoption) } + unsafe { (windows_core::Interface::vtable(self).DrawGlyphRunWithColorSupport)(windows_core::Interface::as_raw(self), core::mem::transmute(baselineorigin), core::mem::transmute(glyphrun), glyphrundescription.unwrap_or(core::mem::zeroed()) as _, foregroundbrush.param().abi(), svgglyphstyle.param().abi(), colorpaletteindex, measuringmode, bitmapsnapoption) } } } #[repr(C)] @@ -6764,7 +6764,7 @@ impl ID2D1DrawInfo { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SetVertexProcessing)(windows_core::Interface::as_raw(self), vertexbuffer.param().abi(), 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() } + unsafe { (windows_core::Interface::vtable(self).SetVertexProcessing)(windows_core::Interface::as_raw(self), vertexbuffer.param().abi(), vertexoptions, blenddescription.unwrap_or(core::mem::zeroed()) as _, vertexrange.unwrap_or(core::mem::zeroed()) as _, vertexshader.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -6883,7 +6883,7 @@ windows_core::imp::interface_hierarchy!(ID2D1DrawingStateBlock, windows_core::IU impl ID2D1DrawingStateBlock { #[cfg(feature = "Foundation_Numerics")] pub unsafe fn GetDescription(&self, statedescription: *mut D2D1_DRAWING_STATE_DESCRIPTION) { - unsafe { (windows_core::Interface::vtable(self).GetDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(statedescription)) } + unsafe { (windows_core::Interface::vtable(self).GetDescription)(windows_core::Interface::as_raw(self), statedescription as _) } } #[cfg(feature = "Foundation_Numerics")] pub unsafe fn SetDescription(&self, statedescription: *const D2D1_DRAWING_STATE_DESCRIPTION) { @@ -6988,7 +6988,7 @@ windows_core::imp::interface_hierarchy!(ID2D1DrawingStateBlock1, windows_core::I impl ID2D1DrawingStateBlock1 { #[cfg(feature = "Foundation_Numerics")] pub unsafe fn GetDescription(&self, statedescription: *mut D2D1_DRAWING_STATE_DESCRIPTION1) { - unsafe { (windows_core::Interface::vtable(self).GetDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(statedescription)) } + unsafe { (windows_core::Interface::vtable(self).GetDescription)(windows_core::Interface::as_raw(self), statedescription as _) } } #[cfg(feature = "Foundation_Numerics")] pub unsafe fn SetDescription(&self, statedescription: *const D2D1_DRAWING_STATE_DESCRIPTION1) { @@ -7147,7 +7147,7 @@ windows_core::imp::define_interface!(ID2D1EffectContext, ID2D1EffectContext_Vtbl windows_core::imp::interface_hierarchy!(ID2D1EffectContext, windows_core::IUnknown); impl ID2D1EffectContext { pub unsafe fn GetDpi(&self, dpix: *mut f32, dpiy: *mut f32) { - unsafe { (windows_core::Interface::vtable(self).GetDpi)(windows_core::Interface::as_raw(self), core::mem::transmute(dpix), core::mem::transmute(dpiy)) } + unsafe { (windows_core::Interface::vtable(self).GetDpi)(windows_core::Interface::as_raw(self), dpix as _, dpiy as _) } } pub unsafe fn CreateEffect(&self, effectid: *const windows_core::GUID) -> windows_core::Result { unsafe { @@ -7210,7 +7210,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 { unsafe { 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::mem::zeroed())), 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__)) + (windows_core::Interface::vtable(self).CreateResourceTexture)(windows_core::Interface::as_raw(self), resourceid.unwrap_or(core::mem::zeroed()) as _, resourcetextureproperties, core::mem::transmute(data.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), strides.unwrap_or(core::mem::zeroed()) as _, 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 { @@ -7223,7 +7223,7 @@ impl ID2D1EffectContext { 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 { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateVertexBuffer)(windows_core::Interface::as_raw(self), vertexbufferproperties, core::mem::transmute(resourceid.unwrap_or(core::mem::zeroed())), core::mem::transmute(customvertexbufferproperties.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateVertexBuffer)(windows_core::Interface::as_raw(self), vertexbufferproperties, resourceid.unwrap_or(core::mem::zeroed()) as _, customvertexbufferproperties.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn FindVertexBuffer(&self, resourceid: *const windows_core::GUID) -> windows_core::Result { @@ -7258,7 +7258,7 @@ impl ID2D1EffectContext { } } pub unsafe fn CheckFeatureSupport(&self, feature: D2D1_FEATURE, featuresupportdata: *mut core::ffi::c_void, featuresupportdatasize: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CheckFeatureSupport)(windows_core::Interface::as_raw(self), feature, core::mem::transmute(featuresupportdata), featuresupportdatasize).ok() } + unsafe { (windows_core::Interface::vtable(self).CheckFeatureSupport)(windows_core::Interface::as_raw(self), feature, featuresupportdata as _, featuresupportdatasize).ok() } } pub unsafe fn IsBufferPrecisionSupported(&self, bufferprecision: D2D1_BUFFER_PRECISION) -> super::super::Foundation::BOOL { unsafe { (windows_core::Interface::vtable(self).IsBufferPrecisionSupported)(windows_core::Interface::as_raw(self), bufferprecision) } @@ -7830,7 +7830,7 @@ impl ID2D1Factory { unsafe { (windows_core::Interface::vtable(self).ReloadSystemMetrics)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetDesktopDpi(&self, dpix: *mut f32, dpiy: *mut f32) { - unsafe { (windows_core::Interface::vtable(self).GetDesktopDpi)(windows_core::Interface::as_raw(self), core::mem::transmute(dpix), core::mem::transmute(dpiy)) } + unsafe { (windows_core::Interface::vtable(self).GetDesktopDpi)(windows_core::Interface::as_raw(self), dpix as _, dpiy as _) } } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateRectangleGeometry(&self, rectangle: *const Common::D2D_RECT_F) -> windows_core::Result { @@ -7889,7 +7889,7 @@ impl ID2D1Factory { { unsafe { 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::mem::zeroed())), 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), drawingstatedescription.unwrap_or(core::mem::zeroed()) as _, 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"))] @@ -8217,7 +8217,7 @@ impl ID2D1Factory1 { { unsafe { 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::mem::zeroed())), 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), drawingstatedescription.unwrap_or(core::mem::zeroed()) as _, textrenderingparams.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_System_Com")] @@ -8247,7 +8247,7 @@ impl ID2D1Factory1 { unsafe { (windows_core::Interface::vtable(self).UnregisterEffect)(windows_core::Interface::as_raw(self), classid).ok() } } pub unsafe fn GetRegisteredEffects(&self, effects: Option<&mut [windows_core::GUID]>, effectsreturned: Option<*mut u32>, effectsregistered: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), effectsreturned.unwrap_or(core::mem::zeroed()) as _, effectsregistered.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetEffectProperties(&self, effectid: *const windows_core::GUID) -> windows_core::Result { unsafe { @@ -8842,7 +8842,7 @@ impl ID2D1GdiInteropRenderTarget { } } pub unsafe fn ReleaseDC(&self, update: Option<*const super::super::Foundation::RECT>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReleaseDC)(windows_core::Interface::as_raw(self), core::mem::transmute(update.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReleaseDC)(windows_core::Interface::as_raw(self), update.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -8972,7 +8972,7 @@ impl core::ops::Deref for ID2D1GdiMetafile1 { windows_core::imp::interface_hierarchy!(ID2D1GdiMetafile1, windows_core::IUnknown, ID2D1Resource, ID2D1GdiMetafile); impl ID2D1GdiMetafile1 { pub unsafe fn GetDpi(&self, dpix: *mut f32, dpiy: *mut f32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDpi)(windows_core::Interface::as_raw(self), core::mem::transmute(dpix), core::mem::transmute(dpiy)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDpi)(windows_core::Interface::as_raw(self), dpix as _, dpiy as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn GetSourceBounds(&self) -> windows_core::Result { @@ -9037,7 +9037,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<()> { - unsafe { (windows_core::Interface::vtable(self).ProcessRecord)(windows_core::Interface::as_raw(self), recordtype, core::mem::transmute(recorddata.unwrap_or(core::mem::zeroed())), recorddatasize).ok() } + unsafe { (windows_core::Interface::vtable(self).ProcessRecord)(windows_core::Interface::as_raw(self), recordtype, recorddata.unwrap_or(core::mem::zeroed()) as _, recorddatasize).ok() } } } #[repr(C)] @@ -9075,7 +9075,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<()> { - unsafe { (windows_core::Interface::vtable(self).ProcessRecord)(windows_core::Interface::as_raw(self), recordtype, core::mem::transmute(recorddata.unwrap_or(core::mem::zeroed())), recorddatasize, flags).ok() } + unsafe { (windows_core::Interface::vtable(self).ProcessRecord)(windows_core::Interface::as_raw(self), recordtype, recorddata.unwrap_or(core::mem::zeroed()) as _, recorddatasize, flags).ok() } } } #[repr(C)] @@ -9116,7 +9116,7 @@ impl ID2D1Geometry { pub unsafe fn GetBounds(&self, worldtransform: Option<*const super::super::super::Foundation::Numerics::Matrix3x2>) -> windows_core::Result { unsafe { 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::mem::zeroed())), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetBounds)(windows_core::Interface::as_raw(self), worldtransform.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| result__) } } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] @@ -9126,7 +9126,7 @@ impl ID2D1Geometry { { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetWidenedBounds)(windows_core::Interface::as_raw(self), strokewidth, strokestyle.param().abi(), core::mem::transmute(worldtransform.unwrap_or(core::mem::zeroed())), flatteningtolerance, &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetWidenedBounds)(windows_core::Interface::as_raw(self), strokewidth, strokestyle.param().abi(), worldtransform.unwrap_or(core::mem::zeroed()) as _, flatteningtolerance, &mut result__).map(|| result__) } } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] @@ -9136,14 +9136,14 @@ impl ID2D1Geometry { { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).StrokeContainsPoint)(windows_core::Interface::as_raw(self), core::mem::transmute(point), strokewidth, strokestyle.param().abi(), core::mem::transmute(worldtransform.unwrap_or(core::mem::zeroed())), flatteningtolerance, &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).StrokeContainsPoint)(windows_core::Interface::as_raw(self), core::mem::transmute(point), strokewidth, strokestyle.param().abi(), worldtransform.unwrap_or(core::mem::zeroed()) as _, 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 { unsafe { 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::mem::zeroed())), flatteningtolerance, &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).FillContainsPoint)(windows_core::Interface::as_raw(self), core::mem::transmute(point), worldtransform.unwrap_or(core::mem::zeroed()) as _, flatteningtolerance, &mut result__).map(|| result__) } } #[cfg(feature = "Foundation_Numerics")] @@ -9153,7 +9153,7 @@ impl ID2D1Geometry { { unsafe { 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::mem::zeroed())), flatteningtolerance, &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).CompareWithGeometry)(windows_core::Interface::as_raw(self), inputgeometry.param().abi(), inputgeometrytransform.unwrap_or(core::mem::zeroed()) as _, flatteningtolerance, &mut result__).map(|| result__) } } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] @@ -9161,14 +9161,14 @@ impl ID2D1Geometry { where P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Simplify)(windows_core::Interface::as_raw(self), simplificationoption, core::mem::transmute(worldtransform.unwrap_or(core::mem::zeroed())), flatteningtolerance, geometrysink.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).Simplify)(windows_core::Interface::as_raw(self), simplificationoption, worldtransform.unwrap_or(core::mem::zeroed()) as _, 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, { - unsafe { (windows_core::Interface::vtable(self).Tessellate)(windows_core::Interface::as_raw(self), core::mem::transmute(worldtransform.unwrap_or(core::mem::zeroed())), flatteningtolerance, tessellationsink.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).Tessellate)(windows_core::Interface::as_raw(self), worldtransform.unwrap_or(core::mem::zeroed()) as _, 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<()> @@ -9176,32 +9176,32 @@ impl ID2D1Geometry { P0: windows_core::Param, P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CombineWithGeometry)(windows_core::Interface::as_raw(self), inputgeometry.param().abi(), combinemode, core::mem::transmute(inputgeometrytransform.unwrap_or(core::mem::zeroed())), flatteningtolerance, geometrysink.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).CombineWithGeometry)(windows_core::Interface::as_raw(self), inputgeometry.param().abi(), combinemode, inputgeometrytransform.unwrap_or(core::mem::zeroed()) as _, 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, { - unsafe { (windows_core::Interface::vtable(self).Outline)(windows_core::Interface::as_raw(self), core::mem::transmute(worldtransform.unwrap_or(core::mem::zeroed())), flatteningtolerance, geometrysink.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).Outline)(windows_core::Interface::as_raw(self), worldtransform.unwrap_or(core::mem::zeroed()) as _, 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 { unsafe { 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::mem::zeroed())), flatteningtolerance, &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).ComputeArea)(windows_core::Interface::as_raw(self), worldtransform.unwrap_or(core::mem::zeroed()) as _, 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 { unsafe { 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::mem::zeroed())), flatteningtolerance, &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).ComputeLength)(windows_core::Interface::as_raw(self), worldtransform.unwrap_or(core::mem::zeroed()) as _, 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<()> { - unsafe { (windows_core::Interface::vtable(self).ComputePointAtLength)(windows_core::Interface::as_raw(self), length, core::mem::transmute(worldtransform.unwrap_or(core::mem::zeroed())), flatteningtolerance, core::mem::transmute(point.unwrap_or(core::mem::zeroed())), core::mem::transmute(unittangentvector.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ComputePointAtLength)(windows_core::Interface::as_raw(self), length, worldtransform.unwrap_or(core::mem::zeroed()) as _, flatteningtolerance, point.unwrap_or(core::mem::zeroed()) as _, unittangentvector.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -9209,7 +9209,7 @@ impl ID2D1Geometry { P1: windows_core::Param, P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Widen)(windows_core::Interface::as_raw(self), strokewidth, strokestyle.param().abi(), core::mem::transmute(worldtransform.unwrap_or(core::mem::zeroed())), flatteningtolerance, geometrysink.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).Widen)(windows_core::Interface::as_raw(self), strokewidth, strokestyle.param().abi(), worldtransform.unwrap_or(core::mem::zeroed()) as _, flatteningtolerance, geometrysink.param().abi()).ok() } } } #[repr(C)] @@ -10241,11 +10241,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<()> { - unsafe { (windows_core::Interface::vtable(self).EnsureCached)(windows_core::Interface::as_raw(self), core::mem::transmute(rectangletofill.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).EnsureCached)(windows_core::Interface::as_raw(self), rectangletofill.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn TrimCache(&self, rectangletopreserve: Option<*const Common::D2D_RECT_U>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TrimCache)(windows_core::Interface::as_raw(self), core::mem::transmute(rectangletopreserve.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).TrimCache)(windows_core::Interface::as_raw(self), rectangletopreserve.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Imaging")] pub unsafe fn GetSource(&self) -> windows_core::Result { @@ -10359,7 +10359,7 @@ impl ID2D1Ink { P0: windows_core::Param, P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).StreamAsGeometry)(windows_core::Interface::as_raw(self), inkstyle.param().abi(), core::mem::transmute(worldtransform.unwrap_or(core::mem::zeroed())), flatteningtolerance, geometrysink.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).StreamAsGeometry)(windows_core::Interface::as_raw(self), inkstyle.param().abi(), worldtransform.unwrap_or(core::mem::zeroed()) as _, 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 @@ -10368,7 +10368,7 @@ impl ID2D1Ink { { unsafe { 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::mem::zeroed())), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetBounds)(windows_core::Interface::as_raw(self), inkstyle.param().abi(), worldtransform.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| result__) } } } @@ -10513,7 +10513,7 @@ impl ID2D1InkStyle { } #[cfg(feature = "Foundation_Numerics")] pub unsafe fn GetNibTransform(&self, transform: *mut super::super::super::Foundation::Numerics::Matrix3x2) { - unsafe { (windows_core::Interface::vtable(self).GetNibTransform)(windows_core::Interface::as_raw(self), core::mem::transmute(transform)) } + unsafe { (windows_core::Interface::vtable(self).GetNibTransform)(windows_core::Interface::as_raw(self), transform as _) } } pub unsafe fn SetNibShape(&self, nibshape: D2D1_INK_NIB_SHAPE) { unsafe { (windows_core::Interface::vtable(self).SetNibShape)(windows_core::Interface::as_raw(self), nibshape) } @@ -11075,7 +11075,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<()> { - unsafe { (windows_core::Interface::vtable(self).ComputePointAndSegmentAtLength)(windows_core::Interface::as_raw(self), length, startsegment, core::mem::transmute(worldtransform.unwrap_or(core::mem::zeroed())), flatteningtolerance, core::mem::transmute(pointdescription)).ok() } + unsafe { (windows_core::Interface::vtable(self).ComputePointAndSegmentAtLength)(windows_core::Interface::as_raw(self), length, startsegment, worldtransform.unwrap_or(core::mem::zeroed()) as _, flatteningtolerance, pointdescription as _).ok() } } } #[repr(C)] @@ -11120,7 +11120,7 @@ impl ID2D1PrintControl { P0: windows_core::Param, P2: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).AddPage)(windows_core::Interface::as_raw(self), commandlist.param().abi(), core::mem::transmute(pagesize), pageprintticketstream.param().abi(), tag1.unwrap_or(core::mem::zeroed()) as _, tag2.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Close(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() } @@ -11645,7 +11645,7 @@ impl ID2D1RenderTarget { 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 { unsafe { 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::mem::zeroed())), pitch, bitmapproperties, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateBitmap)(windows_core::Interface::as_raw(self), core::mem::transmute(size), srcdata.unwrap_or(core::mem::zeroed()) as _, pitch, bitmapproperties, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging"))] @@ -11655,12 +11655,12 @@ impl ID2D1RenderTarget { { unsafe { 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::mem::zeroed())), &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(), bitmapproperties.unwrap_or(core::mem::zeroed()) as _, &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<()> { - unsafe { (windows_core::Interface::vtable(self).CreateSharedBitmap)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(data), core::mem::transmute(bitmapproperties.unwrap_or(core::mem::zeroed())), core::mem::transmute(bitmap)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateSharedBitmap)(windows_core::Interface::as_raw(self), riid, data as _, bitmapproperties.unwrap_or(core::mem::zeroed()) as _, 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 @@ -11669,14 +11669,14 @@ impl ID2D1RenderTarget { { unsafe { 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::mem::zeroed())), core::mem::transmute(brushproperties.unwrap_or(core::mem::zeroed())), &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(), bitmapbrushproperties.unwrap_or(core::mem::zeroed()) as _, brushproperties.unwrap_or(core::mem::zeroed()) as _, &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 { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateSolidColorBrush)(windows_core::Interface::as_raw(self), color, core::mem::transmute(brushproperties.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateSolidColorBrush)(windows_core::Interface::as_raw(self), color, brushproperties.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] @@ -11693,7 +11693,7 @@ impl ID2D1RenderTarget { { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateLinearGradientBrush)(windows_core::Interface::as_raw(self), lineargradientbrushproperties, core::mem::transmute(brushproperties.unwrap_or(core::mem::zeroed())), gradientstopcollection.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateLinearGradientBrush)(windows_core::Interface::as_raw(self), lineargradientbrushproperties, brushproperties.unwrap_or(core::mem::zeroed()) as _, gradientstopcollection.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] @@ -11703,21 +11703,21 @@ impl ID2D1RenderTarget { { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateRadialGradientBrush)(windows_core::Interface::as_raw(self), radialgradientbrushproperties, core::mem::transmute(brushproperties.unwrap_or(core::mem::zeroed())), gradientstopcollection.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateRadialGradientBrush)(windows_core::Interface::as_raw(self), radialgradientbrushproperties, brushproperties.unwrap_or(core::mem::zeroed()) as _, 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 { unsafe { 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::mem::zeroed())), core::mem::transmute(desiredpixelsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(desiredformat.unwrap_or(core::mem::zeroed())), options, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateCompatibleRenderTarget)(windows_core::Interface::as_raw(self), desiredsize.unwrap_or(core::mem::zeroed()) as _, desiredpixelsize.unwrap_or(core::mem::zeroed()) as _, desiredformat.unwrap_or(core::mem::zeroed()) as _, 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 { unsafe { 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::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateLayer)(windows_core::Interface::as_raw(self), size.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn CreateMesh(&self) -> windows_core::Result { @@ -11808,14 +11808,14 @@ impl ID2D1RenderTarget { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FillOpacityMask)(windows_core::Interface::as_raw(self), opacitymask.param().abi(), brush.param().abi(), content, core::mem::transmute(destinationrectangle.unwrap_or(core::mem::zeroed())), core::mem::transmute(sourcerectangle.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).FillOpacityMask)(windows_core::Interface::as_raw(self), opacitymask.param().abi(), brush.param().abi(), content, destinationrectangle.unwrap_or(core::mem::zeroed()) as _, sourcerectangle.unwrap_or(core::mem::zeroed()) as _) } } #[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, { - unsafe { (windows_core::Interface::vtable(self).DrawBitmap)(windows_core::Interface::as_raw(self), bitmap.param().abi(), core::mem::transmute(destinationrectangle.unwrap_or(core::mem::zeroed())), opacity, interpolationmode, core::mem::transmute(sourcerectangle.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).DrawBitmap)(windows_core::Interface::as_raw(self), bitmap.param().abi(), destinationrectangle.unwrap_or(core::mem::zeroed()) as _, opacity, interpolationmode, sourcerectangle.unwrap_or(core::mem::zeroed()) as _) } } #[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) @@ -11846,7 +11846,7 @@ impl ID2D1RenderTarget { } #[cfg(feature = "Foundation_Numerics")] pub unsafe fn GetTransform(&self, transform: *mut super::super::super::Foundation::Numerics::Matrix3x2) { - unsafe { (windows_core::Interface::vtable(self).GetTransform)(windows_core::Interface::as_raw(self), core::mem::transmute(transform)) } + unsafe { (windows_core::Interface::vtable(self).GetTransform)(windows_core::Interface::as_raw(self), transform as _) } } pub unsafe fn SetAntialiasMode(&self, antialiasmode: D2D1_ANTIALIAS_MODE) { unsafe { (windows_core::Interface::vtable(self).SetAntialiasMode)(windows_core::Interface::as_raw(self), antialiasmode) } @@ -11879,7 +11879,7 @@ impl ID2D1RenderTarget { unsafe { (windows_core::Interface::vtable(self).SetTags)(windows_core::Interface::as_raw(self), tag1, tag2) } } pub unsafe fn GetTags(&self, tag1: Option<*mut u64>, tag2: Option<*mut u64>) { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).GetTags)(windows_core::Interface::as_raw(self), tag1.unwrap_or(core::mem::zeroed()) as _, tag2.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub unsafe fn PushLayer(&self, layerparameters: *const D2D1_LAYER_PARAMETERS, layer: P1) @@ -11892,7 +11892,7 @@ impl ID2D1RenderTarget { unsafe { (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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Flush)(windows_core::Interface::as_raw(self), tag1.unwrap_or(core::mem::zeroed()) as _, tag2.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SaveDrawingState(&self, drawingstateblock: P0) where @@ -11915,13 +11915,13 @@ impl ID2D1RenderTarget { } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn Clear(&self, clearcolor: Option<*const Common::D2D1_COLOR_F>) { - unsafe { (windows_core::Interface::vtable(self).Clear)(windows_core::Interface::as_raw(self), core::mem::transmute(clearcolor.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).Clear)(windows_core::Interface::as_raw(self), clearcolor.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn BeginDraw(&self) { unsafe { (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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).EndDraw)(windows_core::Interface::as_raw(self), tag1.unwrap_or(core::mem::zeroed()) as _, tag2.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_Dxgi_Common"))] pub unsafe fn GetPixelFormat(&self) -> Common::D2D1_PIXEL_FORMAT { @@ -11935,7 +11935,7 @@ impl ID2D1RenderTarget { unsafe { (windows_core::Interface::vtable(self).SetDpi)(windows_core::Interface::as_raw(self), dpix, dpiy) } } pub unsafe fn GetDpi(&self, dpix: *mut f32, dpiy: *mut f32) { - unsafe { (windows_core::Interface::vtable(self).GetDpi)(windows_core::Interface::as_raw(self), core::mem::transmute(dpix), core::mem::transmute(dpiy)) } + unsafe { (windows_core::Interface::vtable(self).GetDpi)(windows_core::Interface::as_raw(self), dpix as _, dpiy as _) } } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn GetSize(&self) -> Common::D2D_SIZE_F { @@ -12661,7 +12661,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<()> { - unsafe { (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())), dimensions, core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap()).ok() } + unsafe { (windows_core::Interface::vtable(self).Update)(windows_core::Interface::as_raw(self), minimumextents.unwrap_or(core::mem::zeroed()) as _, maximimumextents.unwrap_or(core::mem::zeroed()) as _, strides.unwrap_or(core::mem::zeroed()) as _, dimensions, core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap()).ok() } } } #[repr(C)] @@ -12700,7 +12700,7 @@ windows_core::imp::interface_hierarchy!(ID2D1RoundedRectangleGeometry, windows_c impl ID2D1RoundedRectangleGeometry { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn GetRoundedRect(&self, roundedrect: *mut D2D1_ROUNDED_RECT) { - unsafe { (windows_core::Interface::vtable(self).GetRoundedRect)(windows_core::Interface::as_raw(self), core::mem::transmute(roundedrect)) } + unsafe { (windows_core::Interface::vtable(self).GetRoundedRect)(windows_core::Interface::as_raw(self), roundedrect as _) } } } #[repr(C)] @@ -12877,15 +12877,15 @@ windows_core::imp::interface_hierarchy!(ID2D1SpriteBatch, windows_core::IUnknown impl ID2D1SpriteBatch { #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub unsafe fn AddSprites(&self, spritecount: u32, destinationrectangles: *const Common::D2D_RECT_F, sourcerectangles: Option<*const Common::D2D_RECT_U>, colors: Option<*const Common::D2D1_COLOR_F>, transforms: Option<*const super::super::super::Foundation::Numerics::Matrix3x2>, destinationrectanglesstride: u32, sourcerectanglesstride: u32, colorsstride: u32, transformsstride: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AddSprites)(windows_core::Interface::as_raw(self), spritecount, destinationrectangles, 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())), destinationrectanglesstride, sourcerectanglesstride, colorsstride, transformsstride).ok() } + unsafe { (windows_core::Interface::vtable(self).AddSprites)(windows_core::Interface::as_raw(self), spritecount, destinationrectangles, sourcerectangles.unwrap_or(core::mem::zeroed()) as _, colors.unwrap_or(core::mem::zeroed()) as _, transforms.unwrap_or(core::mem::zeroed()) as _, destinationrectanglesstride, sourcerectanglesstride, colorsstride, transformsstride).ok() } } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub unsafe fn SetSprites(&self, startindex: u32, spritecount: u32, destinationrectangles: Option<*const Common::D2D_RECT_F>, sourcerectangles: Option<*const Common::D2D_RECT_U>, colors: Option<*const Common::D2D1_COLOR_F>, transforms: Option<*const super::super::super::Foundation::Numerics::Matrix3x2>, destinationrectanglesstride: u32, sourcerectanglesstride: u32, colorsstride: u32, transformsstride: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetSprites)(windows_core::Interface::as_raw(self), startindex, 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())), destinationrectanglesstride, sourcerectanglesstride, colorsstride, transformsstride).ok() } + unsafe { (windows_core::Interface::vtable(self).SetSprites)(windows_core::Interface::as_raw(self), startindex, spritecount, destinationrectangles.unwrap_or(core::mem::zeroed()) as _, sourcerectangles.unwrap_or(core::mem::zeroed()) as _, colors.unwrap_or(core::mem::zeroed()) as _, transforms.unwrap_or(core::mem::zeroed()) as _, destinationrectanglesstride, sourcerectanglesstride, colorsstride, transformsstride).ok() } } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub unsafe fn GetSprites(&self, startindex: u32, spritecount: u32, destinationrectangles: Option<*mut Common::D2D_RECT_F>, sourcerectangles: Option<*mut Common::D2D_RECT_U>, colors: Option<*mut Common::D2D1_COLOR_F>, transforms: Option<*mut super::super::super::Foundation::Numerics::Matrix3x2>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSprites)(windows_core::Interface::as_raw(self), startindex, 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() } + unsafe { (windows_core::Interface::vtable(self).GetSprites)(windows_core::Interface::as_raw(self), startindex, spritecount, destinationrectangles.unwrap_or(core::mem::zeroed()) as _, sourcerectangles.unwrap_or(core::mem::zeroed()) as _, colors.unwrap_or(core::mem::zeroed()) as _, transforms.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSpriteCount(&self) -> u32 { unsafe { (windows_core::Interface::vtable(self).GetSpriteCount)(windows_core::Interface::as_raw(self)) } @@ -13277,7 +13277,7 @@ impl ID2D1SvgDocument { { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreatePaint)(windows_core::Interface::as_raw(self), painttype, core::mem::transmute(color.unwrap_or(core::mem::zeroed())), id.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreatePaint)(windows_core::Interface::as_raw(self), painttype, color.unwrap_or(core::mem::zeroed()) as _, 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 { @@ -13583,16 +13583,16 @@ impl ID2D1SvgElement { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).IsAttributeSpecified)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(inherited.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).IsAttributeSpecified)(windows_core::Interface::as_raw(self), name.param().abi(), inherited.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn GetSpecifiedAttributeCount(&self) -> u32 { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).GetSpecifiedAttributeName)(windows_core::Interface::as_raw(self), index, core::mem::transmute(name.as_ptr()), name.len().try_into().unwrap(), core::mem::transmute(inherited.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSpecifiedAttributeName)(windows_core::Interface::as_raw(self), index, core::mem::transmute(name.as_ptr()), name.len().try_into().unwrap(), inherited.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSpecifiedAttributeNameLength(&self, index: u32, namelength: *mut u32, inherited: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSpecifiedAttributeNameLength)(windows_core::Interface::as_raw(self), index, core::mem::transmute(namelength), core::mem::transmute(inherited.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSpecifiedAttributeNameLength)(windows_core::Interface::as_raw(self), index, namelength as _, inherited.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn RemoveAttribute(&self, name: P0) -> windows_core::Result<()> where @@ -13641,7 +13641,7 @@ impl ID2D1SvgElement { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetAttributeValue2)(windows_core::Interface::as_raw(self), name.param().abi(), r#type, core::mem::transmute(value), valuesizeinbytes).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAttributeValue2)(windows_core::Interface::as_raw(self), name.param().abi(), r#type, value as _, valuesizeinbytes).ok() } } pub unsafe fn GetAttributeValue3(&self, name: P0, r#type: D2D1_SVG_ATTRIBUTE_STRING_TYPE, value: &mut [u16]) -> windows_core::Result<()> where @@ -14004,7 +14004,7 @@ impl ID2D1SvgGlyphStyle { unsafe { (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>) { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).GetStroke)(windows_core::Interface::as_raw(self), brush.unwrap_or(core::mem::zeroed()) as _, strokewidth.unwrap_or(core::mem::zeroed()) as _, 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()), dashoffset.unwrap_or(core::mem::zeroed()) as _) } } } #[repr(C)] @@ -14615,7 +14615,7 @@ impl ID2D1Transform { unsafe { (windows_core::Interface::vtable(self).MapOutputRectToInputRects)(windows_core::Interface::as_raw(self), outputrect, core::mem::transmute(inputrects.as_ptr()), inputrects.len().try_into().unwrap()).ok() } } pub unsafe fn MapInputRectsToOutputRect(&self, inputrects: *const super::super::Foundation::RECT, inputopaquesubrects: *const super::super::Foundation::RECT, inputrectcount: u32, outputrect: *mut super::super::Foundation::RECT, outputopaquesubrect: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).MapInputRectsToOutputRect)(windows_core::Interface::as_raw(self), inputrects, inputopaquesubrects, inputrectcount, core::mem::transmute(outputrect), core::mem::transmute(outputopaquesubrect)).ok() } + unsafe { (windows_core::Interface::vtable(self).MapInputRectsToOutputRect)(windows_core::Interface::as_raw(self), inputrects, inputopaquesubrects, inputrectcount, outputrect as _, outputopaquesubrect as _).ok() } } pub unsafe fn MapInvalidRect(&self, inputindex: u32, invalidinputrect: super::super::Foundation::RECT) -> windows_core::Result { unsafe { @@ -14876,7 +14876,7 @@ impl ID2D1TransformedGeometry { } #[cfg(feature = "Foundation_Numerics")] pub unsafe fn GetTransform(&self, transform: *mut super::super::super::Foundation::Numerics::Matrix3x2) { - unsafe { (windows_core::Interface::vtable(self).GetTransform)(windows_core::Interface::as_raw(self), core::mem::transmute(transform)) } + unsafe { (windows_core::Interface::vtable(self).GetTransform)(windows_core::Interface::as_raw(self), transform as _) } } } #[repr(C)] @@ -14941,7 +14941,7 @@ impl ID2D1TransformedImageSource { } } pub unsafe fn GetProperties(&self, properties: *mut D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES) { - unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(properties)) } + unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), properties as _) } } } #[repr(C)] @@ -14981,7 +14981,7 @@ windows_core::imp::define_interface!(ID2D1VertexBuffer, ID2D1VertexBuffer_Vtbl, windows_core::imp::interface_hierarchy!(ID2D1VertexBuffer, windows_core::IUnknown); impl ID2D1VertexBuffer { pub unsafe fn Map(&self, data: *mut *mut u8, buffersize: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Map)(windows_core::Interface::as_raw(self), core::mem::transmute(data), buffersize).ok() } + unsafe { (windows_core::Interface::vtable(self).Map)(windows_core::Interface::as_raw(self), data as _, buffersize).ok() } } pub unsafe fn Unmap(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Unmap)(windows_core::Interface::as_raw(self)).ok() } 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 0786a3f2af..e48746f7fe 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 @@ -225,7 +225,7 @@ impl core::ops::Deref for IDxcBlobEncoding { windows_core::imp::interface_hierarchy!(IDxcBlobEncoding, windows_core::IUnknown, IDxcBlob); impl IDxcBlobEncoding { pub unsafe fn GetEncoding(&self, pknown: *mut super::super::super::Foundation::BOOL, pcodepage: *mut DXC_CP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEncoding)(windows_core::Interface::as_raw(self), core::mem::transmute(pknown), core::mem::transmute(pcodepage)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEncoding)(windows_core::Interface::as_raw(self), pknown as _, pcodepage as _).ok() } } } #[repr(C)] @@ -482,8 +482,8 @@ impl IDxcCompiler2 { pdefines.len().try_into().unwrap(), pincludehandler.param().abi(), core::mem::transmute(ppresult), - core::mem::transmute(ppdebugblobname.unwrap_or(core::mem::zeroed())), - core::mem::transmute(ppdebugblob.unwrap_or(core::mem::zeroed())), + ppdebugblobname.unwrap_or(core::mem::zeroed()) as _, + ppdebugblob.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -765,7 +765,7 @@ impl IDxcContainerReflection { } } pub unsafe fn GetPartReflection(&self, idx: u32, iid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPartReflection)(windows_core::Interface::as_raw(self), idx, iid, core::mem::transmute(ppvobject)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPartReflection)(windows_core::Interface::as_raw(self), idx, iid, ppvobject as _).ok() } } } #[repr(C)] @@ -873,7 +873,7 @@ impl IDxcExtraOutputs { where T: windows_core::Interface, { - unsafe { (windows_core::Interface::vtable(self).GetOutput)(windows_core::Interface::as_raw(self), uindex, &T::IID, result__ as *mut _ as *mut _, core::mem::transmute(ppoutputtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppoutputname.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOutput)(windows_core::Interface::as_raw(self), uindex, &T::IID, result__ as *mut _ as *mut _, ppoutputtype.unwrap_or(core::mem::zeroed()) as _, ppoutputname.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -978,7 +978,7 @@ impl IDxcLibrary { { unsafe { 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::mem::zeroed())), &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(), codepage.unwrap_or(core::mem::zeroed()) as _, &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 { @@ -1376,7 +1376,7 @@ impl IDxcOptimizer { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (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), ppoutputtext.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -2171,7 +2171,7 @@ impl IDxcUtils { { unsafe { 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::mem::zeroed())), &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(), pcodepage.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_System_Com")] @@ -2209,10 +2209,10 @@ impl IDxcUtils { } } pub unsafe fn GetDxilContainerPart(&self, pshader: *const DxcBuffer, dxcpart: u32, pppartdata: *mut *mut core::ffi::c_void, ppartsizeinbytes: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDxilContainerPart)(windows_core::Interface::as_raw(self), pshader, dxcpart, core::mem::transmute(pppartdata), core::mem::transmute(ppartsizeinbytes)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDxilContainerPart)(windows_core::Interface::as_raw(self), pshader, dxcpart, pppartdata as _, ppartsizeinbytes as _).ok() } } pub unsafe fn CreateReflection(&self, pdata: *const DxcBuffer, iid: *const windows_core::GUID, ppvreflection: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateReflection)(windows_core::Interface::as_raw(self), pdata, iid, core::mem::transmute(ppvreflection)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateReflection)(windows_core::Interface::as_raw(self), pdata, iid, ppvreflection as _).ok() } } pub unsafe fn BuildArguments(&self, psourcename: P0, pentrypoint: P1, ptargetprofile: P2, parguments: Option<&[windows_core::PCWSTR]>, pdefines: &[DxcDefine]) -> windows_core::Result where @@ -2492,7 +2492,7 @@ impl IDxcValidator2 { { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).ValidateWithDebug)(windows_core::Interface::as_raw(self), pshader.param().abi(), flags, core::mem::transmute(poptdebugbitcode.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).ValidateWithDebug)(windows_core::Interface::as_raw(self), pshader.param().abi(), flags, poptdebugbitcode.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } } @@ -2529,7 +2529,7 @@ windows_core::imp::define_interface!(IDxcVersionInfo, IDxcVersionInfo_Vtbl, 0xb0 windows_core::imp::interface_hierarchy!(IDxcVersionInfo, windows_core::IUnknown); impl IDxcVersionInfo { pub unsafe fn GetVersion(&self, pmajor: *mut u32, pminor: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVersion)(windows_core::Interface::as_raw(self), core::mem::transmute(pmajor), core::mem::transmute(pminor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVersion)(windows_core::Interface::as_raw(self), pmajor as _, pminor as _).ok() } } pub unsafe fn GetFlags(&self) -> windows_core::Result { unsafe { @@ -2589,7 +2589,7 @@ impl core::ops::Deref for IDxcVersionInfo2 { windows_core::imp::interface_hierarchy!(IDxcVersionInfo2, windows_core::IUnknown, IDxcVersionInfo); impl IDxcVersionInfo2 { pub unsafe fn GetCommitInfo(&self, pcommitcount: *mut u32, pcommithash: *mut *mut i8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCommitInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pcommitcount), core::mem::transmute(pcommithash)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCommitInfo)(windows_core::Interface::as_raw(self), pcommitcount as _, pcommithash as _).ok() } } } #[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 1715691cfa..cc78a95e06 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); - unsafe { D3DCompile(psrcdata, srcdatasize, psourcename.param().abi(), core::mem::transmute(pdefines.unwrap_or(core::mem::zeroed())), pinclude.param().abi(), pentrypoint.param().abi(), ptarget.param().abi(), flags1, flags2, core::mem::transmute(ppcode), core::mem::transmute(pperrormsgs.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { D3DCompile(psrcdata, srcdatasize, psourcename.param().abi(), pdefines.unwrap_or(core::mem::zeroed()) as _, pinclude.param().abi(), pentrypoint.param().abi(), ptarget.param().abi(), flags1, flags2, core::mem::transmute(ppcode), pperrormsgs.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -18,7 +18,7 @@ where P6: windows_core::Param, { windows_targets::link!("d3dcompiler_47.dll" "system" fn D3DCompile2(psrcdata : *const core::ffi::c_void, srcdatasize : usize, psourcename : windows_core::PCSTR, pdefines : *const super:: D3D_SHADER_MACRO, pinclude : * mut core::ffi::c_void, pentrypoint : windows_core::PCSTR, ptarget : windows_core::PCSTR, flags1 : u32, flags2 : u32, secondarydataflags : u32, psecondarydata : *const core::ffi::c_void, secondarydatasize : usize, ppcode : *mut * mut core::ffi::c_void, pperrormsgs : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { D3DCompile2(psrcdata, srcdatasize, psourcename.param().abi(), core::mem::transmute(pdefines.unwrap_or(core::mem::zeroed())), pinclude.param().abi(), pentrypoint.param().abi(), ptarget.param().abi(), flags1, flags2, secondarydataflags, core::mem::transmute(psecondarydata.unwrap_or(core::mem::zeroed())), secondarydatasize, core::mem::transmute(ppcode), core::mem::transmute(pperrormsgs.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { D3DCompile2(psrcdata, srcdatasize, psourcename.param().abi(), pdefines.unwrap_or(core::mem::zeroed()) as _, pinclude.param().abi(), pentrypoint.param().abi(), ptarget.param().abi(), flags1, flags2, secondarydataflags, psecondarydata.unwrap_or(core::mem::zeroed()) as _, secondarydatasize, core::mem::transmute(ppcode), pperrormsgs.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn D3DCompileFromFile(pfilename: P0, pdefines: Option<*const super::D3D_SHADER_MACRO>, pinclude: P2, pentrypoint: P3, ptarget: P4, flags1: u32, flags2: u32, ppcode: *mut Option, pperrormsgs: Option<*mut Option>) -> windows_core::Result<()> @@ -29,7 +29,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); - unsafe { D3DCompileFromFile(pfilename.param().abi(), core::mem::transmute(pdefines.unwrap_or(core::mem::zeroed())), pinclude.param().abi(), pentrypoint.param().abi(), ptarget.param().abi(), flags1, flags2, core::mem::transmute(ppcode), core::mem::transmute(pperrormsgs.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { D3DCompileFromFile(pfilename.param().abi(), pdefines.unwrap_or(core::mem::zeroed()) as _, pinclude.param().abi(), pentrypoint.param().abi(), ptarget.param().abi(), flags1, flags2, core::mem::transmute(ppcode), pperrormsgs.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn D3DCompressShaders(pshaderdata: &[D3D_SHADER_DATA], uflags: u32) -> windows_core::Result { @@ -68,7 +68,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); - unsafe { D3DDecompressShaders(psrcdata, srcdatasize, unumshaders, ustartindex, core::mem::transmute(pindices.unwrap_or(core::mem::zeroed())), uflags, core::mem::transmute(ppshaders), core::mem::transmute(ptotalshaders.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { D3DDecompressShaders(psrcdata, srcdatasize, unumshaders, ustartindex, pindices.unwrap_or(core::mem::zeroed()) as _, uflags, core::mem::transmute(ppshaders), ptotalshaders.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn D3DDisassemble(psrcdata: *const core::ffi::c_void, srcdatasize: usize, flags: u32, szcomments: P3) -> windows_core::Result @@ -99,7 +99,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); - unsafe { D3DDisassembleRegion(psrcdata, srcdatasize, flags, szcomments.param().abi(), startbyteoffset, numinsts, core::mem::transmute(pfinishbyteoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdisassembly)).ok() } + unsafe { D3DDisassembleRegion(psrcdata, srcdatasize, flags, szcomments.param().abi(), startbyteoffset, numinsts, pfinishbyteoffset.unwrap_or(core::mem::zeroed()) as _, 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 { @@ -144,7 +144,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); - unsafe { D3DGetTraceInstructionOffsets(psrcdata, srcdatasize, flags, startinstindex, poffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(poffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(ptotalinsts.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { D3DGetTraceInstructionOffsets(psrcdata, srcdatasize, flags, startinstindex, poffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(poffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ptotalinsts.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D11")] #[inline] @@ -162,7 +162,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); - unsafe { D3DPreprocess(psrcdata, 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() } + unsafe { D3DPreprocess(psrcdata, srcdatasize, psourcename.param().abi(), pdefines.unwrap_or(core::mem::zeroed()) as _, pinclude.param().abi(), core::mem::transmute(ppcodetext), pperrormsgs.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn D3DReadFileToBlob(pfilename: P0) -> windows_core::Result @@ -178,12 +178,12 @@ where #[inline] pub unsafe fn D3DReflect(psrcdata: *const core::ffi::c_void, srcdatasize: usize, pinterface: *const windows_core::GUID, ppreflector: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("d3dcompiler_47.dll" "system" fn D3DReflect(psrcdata : *const core::ffi::c_void, srcdatasize : usize, pinterface : *const windows_core::GUID, ppreflector : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { D3DReflect(psrcdata, srcdatasize, pinterface, core::mem::transmute(ppreflector)).ok() } + unsafe { D3DReflect(psrcdata, srcdatasize, pinterface, ppreflector as _).ok() } } #[inline] pub unsafe fn D3DReflectLibrary(psrcdata: *const core::ffi::c_void, srcdatasize: usize, riid: *const windows_core::GUID, ppreflector: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("d3dcompiler_47.dll" "system" fn D3DReflectLibrary(psrcdata : *const core::ffi::c_void, srcdatasize : usize, riid : *const windows_core::GUID, ppreflector : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { D3DReflectLibrary(psrcdata, srcdatasize, riid, core::mem::transmute(ppreflector)).ok() } + unsafe { D3DReflectLibrary(psrcdata, srcdatasize, riid, ppreflector as _).ok() } } #[inline] pub unsafe fn D3DSetBlobPart(psrcdata: *const core::ffi::c_void, srcdatasize: usize, part: D3D_BLOB_PART, flags: u32, ppart: *const core::ffi::c_void, partsize: usize) -> windows_core::Result { diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D/mod.rs index 04032d72c5..d11c977e6d 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D/mod.rs @@ -860,7 +860,7 @@ impl ID3DInclude { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Open)(windows_core::Interface::as_raw(self), includetype, pfilename.param().abi(), pparentdata, core::mem::transmute(ppdata), core::mem::transmute(pbytes)).ok() } + unsafe { (windows_core::Interface::vtable(self).Open)(windows_core::Interface::as_raw(self), includetype, pfilename.param().abi(), pparentdata, ppdata as _, pbytes as _).ok() } } pub unsafe fn Close(&self, pdata: *const core::ffi::c_void) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self), pdata).ok() } 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 e52ff6f5e7..29a87d7634 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); - unsafe { D3D10CompileEffectFromMemory(pdata, datalength, psrcfilename.param().abi(), core::mem::transmute(pdefines.unwrap_or(core::mem::zeroed())), pinclude.param().abi(), hlslflags, fxflags, core::mem::transmute(ppcompiledeffect), core::mem::transmute(pperrors.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { D3D10CompileEffectFromMemory(pdata, datalength, psrcfilename.param().abi(), pdefines.unwrap_or(core::mem::zeroed()) as _, pinclude.param().abi(), hlslflags, fxflags, core::mem::transmute(ppcompiledeffect), pperrors.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { 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(), flags, core::mem::transmute(ppshader), core::mem::transmute(pperrormsgs.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { D3D10CompileShader(core::mem::transmute(psrcdata.as_ptr()), psrcdata.len().try_into().unwrap(), pfilename.param().abi(), pdefines.unwrap_or(core::mem::zeroed()) as _, pinclude.param().abi(), pfunctionname.param().abi(), pprofile.param().abi(), flags, core::mem::transmute(ppshader), pperrormsgs.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D")] #[inline] @@ -36,7 +36,7 @@ where P0: 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); - unsafe { D3D10CreateDevice(padapter.param().abi(), drivertype, software, flags, sdkversion, core::mem::transmute(ppdevice.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { D3D10CreateDevice(padapter.param().abi(), drivertype, software, flags, sdkversion, ppdevice.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Dxgi")] #[inline] @@ -45,7 +45,7 @@ where P0: 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); - unsafe { D3D10CreateDevice1(padapter.param().abi(), drivertype, software, flags, hardwarelevel, sdkversion, core::mem::transmute(ppdevice.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { D3D10CreateDevice1(padapter.param().abi(), drivertype, software, flags, hardwarelevel, sdkversion, ppdevice.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] #[inline] @@ -54,7 +54,7 @@ where P0: 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); - unsafe { D3D10CreateDeviceAndSwapChain(padapter.param().abi(), drivertype, software, flags, 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() } + unsafe { D3D10CreateDeviceAndSwapChain(padapter.param().abi(), drivertype, software, flags, sdkversion, pswapchaindesc.unwrap_or(core::mem::zeroed()) as _, ppswapchain.unwrap_or(core::mem::zeroed()) as _, ppdevice.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] #[inline] @@ -63,7 +63,7 @@ where P0: 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); - unsafe { D3D10CreateDeviceAndSwapChain1(padapter.param().abi(), drivertype, software, flags, hardwarelevel, 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() } + unsafe { D3D10CreateDeviceAndSwapChain1(padapter.param().abi(), drivertype, software, flags, hardwarelevel, sdkversion, pswapchaindesc.unwrap_or(core::mem::zeroed()) as _, ppswapchain.unwrap_or(core::mem::zeroed()) as _, ppdevice.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn D3D10CreateEffectFromMemory(pdata: *const core::ffi::c_void, datalength: usize, fxflags: u32, pdevice: P3, peffectpool: P4) -> windows_core::Result @@ -191,7 +191,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); - unsafe { 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() } + unsafe { D3D10PreprocessShader(core::mem::transmute(psrcdata.as_ptr()), psrcdata.len().try_into().unwrap(), pfilename.param().abi(), pdefines.unwrap_or(core::mem::zeroed()) as _, pinclude.param().abi(), core::mem::transmute(ppshadertext), pperrormsgs.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn D3D10ReflectShader(pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize) -> windows_core::Result { @@ -204,27 +204,27 @@ pub unsafe fn D3D10ReflectShader(pshaderbytecode: *const core::ffi::c_void, byte #[inline] pub unsafe fn D3D10StateBlockMaskDifference(pa: *const D3D10_STATE_BLOCK_MASK, pb: *const D3D10_STATE_BLOCK_MASK, presult: *mut D3D10_STATE_BLOCK_MASK) -> windows_core::Result<()> { windows_targets::link!("d3d10.dll" "system" fn D3D10StateBlockMaskDifference(pa : *const D3D10_STATE_BLOCK_MASK, pb : *const D3D10_STATE_BLOCK_MASK, presult : *mut D3D10_STATE_BLOCK_MASK) -> windows_core::HRESULT); - unsafe { D3D10StateBlockMaskDifference(pa, pb, core::mem::transmute(presult)).ok() } + unsafe { D3D10StateBlockMaskDifference(pa, pb, presult as _).ok() } } #[inline] pub unsafe fn D3D10StateBlockMaskDisableAll(pmask: *mut D3D10_STATE_BLOCK_MASK) -> windows_core::Result<()> { windows_targets::link!("d3d10.dll" "system" fn D3D10StateBlockMaskDisableAll(pmask : *mut D3D10_STATE_BLOCK_MASK) -> windows_core::HRESULT); - unsafe { D3D10StateBlockMaskDisableAll(core::mem::transmute(pmask)).ok() } + unsafe { D3D10StateBlockMaskDisableAll(pmask as _).ok() } } #[inline] pub unsafe fn D3D10StateBlockMaskDisableCapture(pmask: *mut D3D10_STATE_BLOCK_MASK, statetype: D3D10_DEVICE_STATE_TYPES, rangestart: u32, rangelength: u32) -> windows_core::Result<()> { windows_targets::link!("d3d10.dll" "system" fn D3D10StateBlockMaskDisableCapture(pmask : *mut D3D10_STATE_BLOCK_MASK, statetype : D3D10_DEVICE_STATE_TYPES, rangestart : u32, rangelength : u32) -> windows_core::HRESULT); - unsafe { D3D10StateBlockMaskDisableCapture(core::mem::transmute(pmask), statetype, rangestart, rangelength).ok() } + unsafe { D3D10StateBlockMaskDisableCapture(pmask as _, statetype, rangestart, rangelength).ok() } } #[inline] pub unsafe fn D3D10StateBlockMaskEnableAll(pmask: *mut D3D10_STATE_BLOCK_MASK) -> windows_core::Result<()> { windows_targets::link!("d3d10.dll" "system" fn D3D10StateBlockMaskEnableAll(pmask : *mut D3D10_STATE_BLOCK_MASK) -> windows_core::HRESULT); - unsafe { D3D10StateBlockMaskEnableAll(core::mem::transmute(pmask)).ok() } + unsafe { D3D10StateBlockMaskEnableAll(pmask as _).ok() } } #[inline] pub unsafe fn D3D10StateBlockMaskEnableCapture(pmask: *mut D3D10_STATE_BLOCK_MASK, statetype: D3D10_DEVICE_STATE_TYPES, rangestart: u32, rangelength: u32) -> windows_core::Result<()> { windows_targets::link!("d3d10.dll" "system" fn D3D10StateBlockMaskEnableCapture(pmask : *mut D3D10_STATE_BLOCK_MASK, statetype : D3D10_DEVICE_STATE_TYPES, rangestart : u32, rangelength : u32) -> windows_core::HRESULT); - unsafe { D3D10StateBlockMaskEnableCapture(core::mem::transmute(pmask), statetype, rangestart, rangelength).ok() } + unsafe { D3D10StateBlockMaskEnableCapture(pmask as _, statetype, rangestart, rangelength).ok() } } #[inline] pub unsafe fn D3D10StateBlockMaskGetSetting(pmask: *const D3D10_STATE_BLOCK_MASK, statetype: D3D10_DEVICE_STATE_TYPES, entry: u32) -> super::super::Foundation::BOOL { @@ -234,12 +234,12 @@ pub unsafe fn D3D10StateBlockMaskGetSetting(pmask: *const D3D10_STATE_BLOCK_MASK #[inline] pub unsafe fn D3D10StateBlockMaskIntersect(pa: *const D3D10_STATE_BLOCK_MASK, pb: *const D3D10_STATE_BLOCK_MASK, presult: *mut D3D10_STATE_BLOCK_MASK) -> windows_core::Result<()> { windows_targets::link!("d3d10.dll" "system" fn D3D10StateBlockMaskIntersect(pa : *const D3D10_STATE_BLOCK_MASK, pb : *const D3D10_STATE_BLOCK_MASK, presult : *mut D3D10_STATE_BLOCK_MASK) -> windows_core::HRESULT); - unsafe { D3D10StateBlockMaskIntersect(pa, pb, core::mem::transmute(presult)).ok() } + unsafe { D3D10StateBlockMaskIntersect(pa, pb, presult as _).ok() } } #[inline] pub unsafe fn D3D10StateBlockMaskUnion(pa: *const D3D10_STATE_BLOCK_MASK, pb: *const D3D10_STATE_BLOCK_MASK, presult: *mut D3D10_STATE_BLOCK_MASK) -> windows_core::Result<()> { windows_targets::link!("d3d10.dll" "system" fn D3D10StateBlockMaskUnion(pa : *const D3D10_STATE_BLOCK_MASK, pb : *const D3D10_STATE_BLOCK_MASK, presult : *mut D3D10_STATE_BLOCK_MASK) -> windows_core::HRESULT); - unsafe { D3D10StateBlockMaskUnion(pa, pb, core::mem::transmute(presult)).ok() } + unsafe { D3D10StateBlockMaskUnion(pa, pb, presult as _).ok() } } pub const D3D10_16BIT_INDEX_STRIP_CUT_VALUE: u32 = 65535u32; pub const D3D10_1_DEFAULT_SAMPLE_MASK: u32 = 4294967295u32; @@ -2746,7 +2746,7 @@ impl ID3D10Asynchronous { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), datasize, getdataflags).ok() } + unsafe { (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), pdata.unwrap_or(core::mem::zeroed()) as _, datasize, getdataflags).ok() } } pub unsafe fn GetDataSize(&self) -> u32 { unsafe { (windows_core::Interface::vtable(self).GetDataSize)(windows_core::Interface::as_raw(self)) } @@ -2817,7 +2817,7 @@ impl core::ops::Deref for ID3D10BlendState { windows_core::imp::interface_hierarchy!(ID3D10BlendState, windows_core::IUnknown, ID3D10DeviceChild); impl ID3D10BlendState { pub unsafe fn GetDesc(&self, pdesc: *mut D3D10_BLEND_DESC) { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _) } } } #[repr(C)] @@ -2855,7 +2855,7 @@ impl core::ops::Deref for ID3D10BlendState1 { windows_core::imp::interface_hierarchy!(ID3D10BlendState1, windows_core::IUnknown, ID3D10DeviceChild, ID3D10BlendState); impl ID3D10BlendState1 { pub unsafe fn GetDesc1(&self, pdesc: *mut D3D10_BLEND_DESC1) { - unsafe { (windows_core::Interface::vtable(self).GetDesc1)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc1)(windows_core::Interface::as_raw(self), pdesc as _) } } } #[repr(C)] @@ -2893,13 +2893,13 @@ impl core::ops::Deref for ID3D10Buffer { windows_core::imp::interface_hierarchy!(ID3D10Buffer, windows_core::IUnknown, ID3D10DeviceChild, ID3D10Resource); impl ID3D10Buffer { pub unsafe fn Map(&self, maptype: D3D10_MAP, mapflags: u32, ppdata: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Map)(windows_core::Interface::as_raw(self), maptype, mapflags, core::mem::transmute(ppdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).Map)(windows_core::Interface::as_raw(self), maptype, mapflags, ppdata as _).ok() } } pub unsafe fn Unmap(&self) { unsafe { (windows_core::Interface::vtable(self).Unmap)(windows_core::Interface::as_raw(self)) } } pub unsafe fn GetDesc(&self, pdesc: *mut D3D10_BUFFER_DESC) { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _) } } } #[repr(C)] @@ -3132,7 +3132,7 @@ impl core::ops::Deref for ID3D10DepthStencilState { windows_core::imp::interface_hierarchy!(ID3D10DepthStencilState, windows_core::IUnknown, ID3D10DeviceChild); impl ID3D10DepthStencilState { pub unsafe fn GetDesc(&self, pdesc: *mut D3D10_DEPTH_STENCIL_DESC) { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _) } } } #[repr(C)] @@ -3171,7 +3171,7 @@ windows_core::imp::interface_hierarchy!(ID3D10DepthStencilView, windows_core::IU impl ID3D10DepthStencilView { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetDesc(&self, pdesc: *mut D3D10_DEPTH_STENCIL_VIEW_DESC) { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _) } } } #[repr(C)] @@ -3247,7 +3247,7 @@ impl ID3D10Device { unsafe { (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>) { - unsafe { (windows_core::Interface::vtable(self).IASetVertexBuffers)(windows_core::Interface::as_raw(self), startslot, 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()))) } + unsafe { (windows_core::Interface::vtable(self).IASetVertexBuffers)(windows_core::Interface::as_raw(self), startslot, numbuffers, ppvertexbuffers.unwrap_or(core::mem::zeroed()) as _, pstrides.unwrap_or(core::mem::zeroed()) as _, poffsets.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn IASetIndexBuffer(&self, pindexbuffer: P0, format: super::Dxgi::Common::DXGI_FORMAT, offset: u32) @@ -3312,7 +3312,7 @@ impl ID3D10Device { unsafe { (windows_core::Interface::vtable(self).OMSetDepthStencilState)(windows_core::Interface::as_raw(self), pdepthstencilstate.param().abi(), stencilref) } } pub unsafe fn SOSetTargets(&self, numbuffers: u32, ppsotargets: Option<*const Option>, poffsets: Option<*const u32>) { - unsafe { (windows_core::Interface::vtable(self).SOSetTargets)(windows_core::Interface::as_raw(self), numbuffers, core::mem::transmute(ppsotargets.unwrap_or(core::mem::zeroed())), core::mem::transmute(poffsets.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).SOSetTargets)(windows_core::Interface::as_raw(self), numbuffers, ppsotargets.unwrap_or(core::mem::zeroed()) as _, poffsets.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn DrawAuto(&self) { unsafe { (windows_core::Interface::vtable(self).DrawAuto)(windows_core::Interface::as_raw(self)) } @@ -3334,7 +3334,7 @@ impl ID3D10Device { P0: windows_core::Param, P5: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CopySubresourceRegion)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, dstx, dsty, dstz, psrcresource.param().abi(), srcsubresource, core::mem::transmute(psrcbox.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).CopySubresourceRegion)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, dstx, dsty, dstz, psrcresource.param().abi(), srcsubresource, psrcbox.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn CopyResource(&self, pdstresource: P0, psrcresource: P1) where @@ -3347,7 +3347,7 @@ impl ID3D10Device { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).UpdateSubresource)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, core::mem::transmute(pdstbox.unwrap_or(core::mem::zeroed())), psrcdata, srcrowpitch, srcdepthpitch) } + unsafe { (windows_core::Interface::vtable(self).UpdateSubresource)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, pdstbox.unwrap_or(core::mem::zeroed()) as _, psrcdata, srcrowpitch, srcdepthpitch) } } pub unsafe fn ClearRenderTargetView(&self, prendertargetview: P0, colorrgba: &[f32; 4]) where @@ -3409,11 +3409,11 @@ impl ID3D10Device { } } pub unsafe fn IAGetVertexBuffers(&self, startslot: u32, numbuffers: u32, ppvertexbuffers: Option<*mut Option>, pstrides: Option<*mut u32>, poffsets: Option<*mut u32>) { - unsafe { (windows_core::Interface::vtable(self).IAGetVertexBuffers)(windows_core::Interface::as_raw(self), startslot, 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()))) } + unsafe { (windows_core::Interface::vtable(self).IAGetVertexBuffers)(windows_core::Interface::as_raw(self), startslot, numbuffers, ppvertexbuffers.unwrap_or(core::mem::zeroed()) as _, pstrides.unwrap_or(core::mem::zeroed()) as _, poffsets.unwrap_or(core::mem::zeroed()) as _) } } #[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>) { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).IAGetIndexBuffer)(windows_core::Interface::as_raw(self), pindexbuffer.unwrap_or(core::mem::zeroed()) as _, format.unwrap_or(core::mem::zeroed()) as _, offset.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn GSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: Option<&mut [Option]>) { unsafe { (windows_core::Interface::vtable(self).GSGetConstantBuffers)(windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppconstantbuffers.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } @@ -3440,7 +3440,7 @@ impl ID3D10Device { unsafe { (windows_core::Interface::vtable(self).VSGetSamplers)(windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppsamplers.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } } pub unsafe fn GetPredication(&self, pppredicate: Option<*mut Option>, ppredicatevalue: Option<*mut super::super::Foundation::BOOL>) { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).GetPredication)(windows_core::Interface::as_raw(self), pppredicate.unwrap_or(core::mem::zeroed()) as _, ppredicatevalue.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn GSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: Option<&mut [Option]>) { unsafe { (windows_core::Interface::vtable(self).GSGetShaderResources)(windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppshaderresourceviews.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } @@ -3449,16 +3449,16 @@ impl ID3D10Device { unsafe { (windows_core::Interface::vtable(self).GSGetSamplers)(windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppsamplers.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } } pub unsafe fn OMGetRenderTargets(&self, pprendertargetviews: Option<&mut [Option]>, ppdepthstencilview: Option<*mut Option>) { - unsafe { (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()))) } + unsafe { (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())), ppdepthstencilview.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn OMGetBlendState(&self, ppblendstate: Option<*mut Option>, blendfactor: Option<&mut [f32; 4]>, psamplemask: Option<*mut u32>) { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).OMGetBlendState)(windows_core::Interface::as_raw(self), ppblendstate.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(blendfactor.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), psamplemask.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn OMGetDepthStencilState(&self, ppdepthstencilstate: Option<*mut Option>, pstencilref: Option<*mut u32>) { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).OMGetDepthStencilState)(windows_core::Interface::as_raw(self), ppdepthstencilstate.unwrap_or(core::mem::zeroed()) as _, pstencilref.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn SOGetTargets(&self, numbuffers: u32, ppsotargets: Option<*mut Option>, poffsets: Option<*mut u32>) { - unsafe { (windows_core::Interface::vtable(self).SOGetTargets)(windows_core::Interface::as_raw(self), numbuffers, core::mem::transmute(ppsotargets.unwrap_or(core::mem::zeroed())), core::mem::transmute(poffsets.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).SOGetTargets)(windows_core::Interface::as_raw(self), numbuffers, ppsotargets.unwrap_or(core::mem::zeroed()) as _, poffsets.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn RSGetState(&self) -> windows_core::Result { unsafe { @@ -3468,10 +3468,10 @@ impl ID3D10Device { } } pub unsafe fn RSGetViewports(&self, numviewports: *mut u32, pviewports: Option<*mut D3D10_VIEWPORT>) { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).RSGetViewports)(windows_core::Interface::as_raw(self), numviewports as _, pviewports.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn RSGetScissorRects(&self, numrects: *mut u32, prects: Option<*mut super::super::Foundation::RECT>) { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).RSGetScissorRects)(windows_core::Interface::as_raw(self), numrects as _, prects.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn GetDeviceRemovedReason(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetDeviceRemovedReason)(windows_core::Interface::as_raw(self)).ok() } @@ -3483,10 +3483,10 @@ impl ID3D10Device { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), guid, core::mem::transmute(pdatasize), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), guid, pdatasize as _, pdata.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetPrivateData(&self, guid: *const windows_core::GUID, datasize: u32, pdata: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), guid, datasize, core::mem::transmute(pdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), guid, datasize, pdata.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, pdata: P1) -> windows_core::Result<()> where @@ -3501,27 +3501,27 @@ impl ID3D10Device { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).CreateBuffer)(windows_core::Interface::as_raw(self), pdesc, core::mem::transmute(pinitialdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppbuffer.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateBuffer)(windows_core::Interface::as_raw(self), pdesc, pinitialdata.unwrap_or(core::mem::zeroed()) as _, ppbuffer.unwrap_or(core::mem::zeroed()) as _).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 { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateTexture1D)(windows_core::Interface::as_raw(self), pdesc, core::mem::transmute(pinitialdata.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateTexture1D)(windows_core::Interface::as_raw(self), pdesc, pinitialdata.unwrap_or(core::mem::zeroed()) as _, &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 { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateTexture2D)(windows_core::Interface::as_raw(self), pdesc, core::mem::transmute(pinitialdata.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateTexture2D)(windows_core::Interface::as_raw(self), pdesc, pinitialdata.unwrap_or(core::mem::zeroed()) as _, &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 { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateTexture3D)(windows_core::Interface::as_raw(self), pdesc, core::mem::transmute(pinitialdata.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateTexture3D)(windows_core::Interface::as_raw(self), pdesc, pinitialdata.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] @@ -3529,58 +3529,58 @@ impl ID3D10Device { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).CreateShaderResourceView)(windows_core::Interface::as_raw(self), presource.param().abi(), pdesc.unwrap_or(core::mem::zeroed()) as _, ppsrview.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).CreateRenderTargetView)(windows_core::Interface::as_raw(self), presource.param().abi(), pdesc.unwrap_or(core::mem::zeroed()) as _, pprtview.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).CreateDepthStencilView)(windows_core::Interface::as_raw(self), presource.param().abi(), pdesc.unwrap_or(core::mem::zeroed()) as _, ppdepthstencilview.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (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() } + unsafe { (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(), ppinputlayout.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreateVertexShader(&self, pshaderbytecode: &[u8], ppvertexshader: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).CreateVertexShader)(windows_core::Interface::as_raw(self), core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), ppvertexshader.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreateGeometryShader(&self, pshaderbytecode: &[u8], ppgeometryshader: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).CreateGeometryShader)(windows_core::Interface::as_raw(self), core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), ppgeometryshader.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreateGeometryShaderWithStreamOutput(&self, pshaderbytecode: &[u8], psodeclaration: Option<&[D3D10_SO_DECLARATION_ENTRY]>, outputstreamstride: u32, ppgeometryshader: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateGeometryShaderWithStreamOutput)(windows_core::Interface::as_raw(self), core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), core::mem::transmute(psodeclaration.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), psodeclaration.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), outputstreamstride, core::mem::transmute(ppgeometryshader.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateGeometryShaderWithStreamOutput)(windows_core::Interface::as_raw(self), core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), core::mem::transmute(psodeclaration.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), psodeclaration.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), outputstreamstride, ppgeometryshader.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreatePixelShader(&self, pshaderbytecode: &[u8], pppixelshader: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).CreatePixelShader)(windows_core::Interface::as_raw(self), core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pppixelshader.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreateBlendState(&self, pblendstatedesc: *const D3D10_BLEND_DESC, ppblendstate: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateBlendState)(windows_core::Interface::as_raw(self), pblendstatedesc, core::mem::transmute(ppblendstate.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateBlendState)(windows_core::Interface::as_raw(self), pblendstatedesc, ppblendstate.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreateDepthStencilState(&self, pdepthstencildesc: *const D3D10_DEPTH_STENCIL_DESC, ppdepthstencilstate: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateDepthStencilState)(windows_core::Interface::as_raw(self), pdepthstencildesc, core::mem::transmute(ppdepthstencilstate.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateDepthStencilState)(windows_core::Interface::as_raw(self), pdepthstencildesc, ppdepthstencilstate.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreateRasterizerState(&self, prasterizerdesc: *const D3D10_RASTERIZER_DESC, pprasterizerstate: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateRasterizerState)(windows_core::Interface::as_raw(self), prasterizerdesc, core::mem::transmute(pprasterizerstate.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateRasterizerState)(windows_core::Interface::as_raw(self), prasterizerdesc, pprasterizerstate.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreateSamplerState(&self, psamplerdesc: *const D3D10_SAMPLER_DESC, ppsamplerstate: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateSamplerState)(windows_core::Interface::as_raw(self), psamplerdesc, core::mem::transmute(ppsamplerstate.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateSamplerState)(windows_core::Interface::as_raw(self), psamplerdesc, ppsamplerstate.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreateQuery(&self, pquerydesc: *const D3D10_QUERY_DESC, ppquery: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateQuery)(windows_core::Interface::as_raw(self), pquerydesc, core::mem::transmute(ppquery.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateQuery)(windows_core::Interface::as_raw(self), pquerydesc, ppquery.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreatePredicate(&self, ppredicatedesc: *const D3D10_QUERY_DESC, pppredicate: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreatePredicate)(windows_core::Interface::as_raw(self), ppredicatedesc, core::mem::transmute(pppredicate.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreatePredicate)(windows_core::Interface::as_raw(self), ppredicatedesc, pppredicate.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreateCounter(&self, pcounterdesc: *const D3D10_COUNTER_DESC, ppcounter: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateCounter)(windows_core::Interface::as_raw(self), pcounterdesc, core::mem::transmute(ppcounter.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateCounter)(windows_core::Interface::as_raw(self), pcounterdesc, ppcounter.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CheckFormatSupport(&self, format: super::Dxgi::Common::DXGI_FORMAT) -> windows_core::Result { @@ -3604,33 +3604,19 @@ impl ID3D10Device { } } 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<()> { - unsafe { - (windows_core::Interface::vtable(self).CheckCounter)( - windows_core::Interface::as_raw(self), - 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() - } + unsafe { (windows_core::Interface::vtable(self).CheckCounter)(windows_core::Interface::as_raw(self), pdesc, ptype as _, pactivecounters as _, szname.unwrap_or(core::mem::zeroed()) as _, pnamelength.unwrap_or(core::mem::zeroed()) as _, szunits.unwrap_or(core::mem::zeroed()) as _, punitslength.unwrap_or(core::mem::zeroed()) as _, szdescription.unwrap_or(core::mem::zeroed()) as _, pdescriptionlength.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetCreationFlags(&self) -> u32 { unsafe { (windows_core::Interface::vtable(self).GetCreationFlags)(windows_core::Interface::as_raw(self)) } } 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<()> { - unsafe { (windows_core::Interface::vtable(self).OpenSharedResource)(windows_core::Interface::as_raw(self), hresource, returnedinterface, core::mem::transmute(ppresource.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).OpenSharedResource)(windows_core::Interface::as_raw(self), hresource, returnedinterface, ppresource.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetTextFilterSize(&self, width: u32, height: u32) { unsafe { (windows_core::Interface::vtable(self).SetTextFilterSize)(windows_core::Interface::as_raw(self), width, height) } } pub unsafe fn GetTextFilterSize(&self, pwidth: Option<*mut u32>, pheight: Option<*mut u32>) { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).GetTextFilterSize)(windows_core::Interface::as_raw(self), pwidth.unwrap_or(core::mem::zeroed()) as _, pheight.unwrap_or(core::mem::zeroed()) as _) } } } #[repr(C)] @@ -4598,10 +4584,10 @@ impl ID3D10Device1 { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).CreateShaderResourceView1)(windows_core::Interface::as_raw(self), presource.param().abi(), pdesc.unwrap_or(core::mem::zeroed()) as _, ppsrview.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreateBlendState1(&self, pblendstatedesc: *const D3D10_BLEND_DESC1, ppblendstate: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateBlendState1)(windows_core::Interface::as_raw(self), pblendstatedesc, core::mem::transmute(ppblendstate.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateBlendState1)(windows_core::Interface::as_raw(self), pblendstatedesc, ppblendstate.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetFeatureLevel(&self) -> D3D10_FEATURE_LEVEL1 { unsafe { (windows_core::Interface::vtable(self).GetFeatureLevel)(windows_core::Interface::as_raw(self)) } @@ -4672,10 +4658,10 @@ impl ID3D10DeviceChild { } } pub unsafe fn GetPrivateData(&self, guid: *const windows_core::GUID, pdatasize: *mut u32, pdata: Option<*mut core::ffi::c_void>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), guid, core::mem::transmute(pdatasize), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), guid, pdatasize as _, pdata.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetPrivateData(&self, guid: *const windows_core::GUID, datasize: u32, pdata: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), guid, datasize, core::mem::transmute(pdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), guid, datasize, pdata.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, pdata: P1) -> windows_core::Result<()> where @@ -4755,7 +4741,7 @@ impl ID3D10Effect { } } pub unsafe fn GetDesc(&self, pdesc: *mut D3D10_EFFECT_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _).ok() } } pub unsafe fn GetConstantBufferByIndex(&self, index: u32) -> Option { unsafe { (windows_core::Interface::vtable(self).GetConstantBufferByIndex)(windows_core::Interface::as_raw(self), index) } @@ -4955,7 +4941,7 @@ impl ID3D10EffectBlendVariable { } } pub unsafe fn GetBackingStore(&self, index: u32, pblenddesc: *mut D3D10_BLEND_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBackingStore)(windows_core::Interface::as_raw(self), index, core::mem::transmute(pblenddesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBackingStore)(windows_core::Interface::as_raw(self), index, pblenddesc as _).ok() } } } #[repr(C)] @@ -5134,7 +5120,7 @@ impl ID3D10EffectDepthStencilVariable { } } pub unsafe fn GetBackingStore(&self, index: u32, pdepthstencildesc: *mut D3D10_DEPTH_STENCIL_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBackingStore)(windows_core::Interface::as_raw(self), index, core::mem::transmute(pdepthstencildesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBackingStore)(windows_core::Interface::as_raw(self), index, pdepthstencildesc as _).ok() } } } #[repr(C)] @@ -5299,28 +5285,28 @@ impl core::ops::Deref for ID3D10EffectMatrixVariable { windows_core::imp::interface_hierarchy!(ID3D10EffectMatrixVariable, ID3D10EffectVariable); impl ID3D10EffectMatrixVariable { pub unsafe fn SetMatrix(&self, pdata: *mut f32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetMatrix)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetMatrix)(windows_core::Interface::as_raw(self), pdata as _).ok() } } pub unsafe fn GetMatrix(&self, pdata: *mut f32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMatrix)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMatrix)(windows_core::Interface::as_raw(self), pdata as _).ok() } } pub unsafe fn SetMatrixArray(&self, pdata: *mut f32, offset: u32, count: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetMatrixArray)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata), offset, count).ok() } + unsafe { (windows_core::Interface::vtable(self).SetMatrixArray)(windows_core::Interface::as_raw(self), pdata as _, offset, count).ok() } } pub unsafe fn GetMatrixArray(&self, pdata: *mut f32, offset: u32, count: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMatrixArray)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata), offset, count).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMatrixArray)(windows_core::Interface::as_raw(self), pdata as _, offset, count).ok() } } pub unsafe fn SetMatrixTranspose(&self, pdata: *mut f32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetMatrixTranspose)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetMatrixTranspose)(windows_core::Interface::as_raw(self), pdata as _).ok() } } pub unsafe fn GetMatrixTranspose(&self, pdata: *mut f32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMatrixTranspose)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMatrixTranspose)(windows_core::Interface::as_raw(self), pdata as _).ok() } } pub unsafe fn SetMatrixTransposeArray(&self, pdata: *mut f32, offset: u32, count: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetMatrixTransposeArray)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata), offset, count).ok() } + unsafe { (windows_core::Interface::vtable(self).SetMatrixTransposeArray)(windows_core::Interface::as_raw(self), pdata as _, offset, count).ok() } } pub unsafe fn GetMatrixTransposeArray(&self, pdata: *mut f32, offset: u32, count: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMatrixTransposeArray)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata), offset, count).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMatrixTransposeArray)(windows_core::Interface::as_raw(self), pdata as _, offset, count).ok() } } } #[repr(C)] @@ -5435,7 +5421,7 @@ impl ID3D10EffectPass { unsafe { (windows_core::Interface::vtable(self).IsValid)(windows_core::Interface::as_raw(self)) } } pub unsafe fn GetDesc(&self, pdesc: *mut D3D10_PASS_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _).ok() } } pub unsafe fn GetVertexShaderDesc(&self, pdesc: *mut D3D10_PASS_SHADER_DESC) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetVertexShaderDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)).ok() } @@ -5459,7 +5445,7 @@ impl ID3D10EffectPass { unsafe { (windows_core::Interface::vtable(self).Apply)(windows_core::Interface::as_raw(self), flags).ok() } } pub unsafe fn ComputeStateBlockMask(&self, pstateblockmask: *mut D3D10_STATE_BLOCK_MASK) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ComputeStateBlockMask)(windows_core::Interface::as_raw(self), core::mem::transmute(pstateblockmask)).ok() } + unsafe { (windows_core::Interface::vtable(self).ComputeStateBlockMask)(windows_core::Interface::as_raw(self), pstateblockmask as _).ok() } } } #[repr(C)] @@ -5624,7 +5610,7 @@ impl ID3D10EffectRasterizerVariable { } } pub unsafe fn GetBackingStore(&self, index: u32, prasterizerdesc: *mut D3D10_RASTERIZER_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBackingStore)(windows_core::Interface::as_raw(self), index, core::mem::transmute(prasterizerdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBackingStore)(windows_core::Interface::as_raw(self), index, prasterizerdesc as _).ok() } } } #[repr(C)] @@ -5795,7 +5781,7 @@ impl ID3D10EffectSamplerVariable { } } pub unsafe fn GetBackingStore(&self, index: u32, psamplerdesc: *mut D3D10_SAMPLER_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBackingStore)(windows_core::Interface::as_raw(self), index, core::mem::transmute(psamplerdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBackingStore)(windows_core::Interface::as_raw(self), index, psamplerdesc as _).ok() } } } #[repr(C)] @@ -6175,7 +6161,7 @@ impl core::ops::Deref for ID3D10EffectShaderVariable { windows_core::imp::interface_hierarchy!(ID3D10EffectShaderVariable, ID3D10EffectVariable); impl ID3D10EffectShaderVariable { pub unsafe fn GetShaderDesc(&self, shaderindex: u32, pdesc: *mut D3D10_EFFECT_SHADER_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetShaderDesc)(windows_core::Interface::as_raw(self), shaderindex, core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetShaderDesc)(windows_core::Interface::as_raw(self), shaderindex, pdesc as _).ok() } } pub unsafe fn GetVertexShader(&self, shaderindex: u32) -> windows_core::Result { unsafe { @@ -6197,11 +6183,11 @@ impl ID3D10EffectShaderVariable { } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetInputSignatureElementDesc(&self, shaderindex: u32, element: u32, pdesc: *mut D3D10_SIGNATURE_PARAMETER_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInputSignatureElementDesc)(windows_core::Interface::as_raw(self), shaderindex, element, core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInputSignatureElementDesc)(windows_core::Interface::as_raw(self), shaderindex, element, pdesc as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetOutputSignatureElementDesc(&self, shaderindex: u32, element: u32, pdesc: *mut D3D10_SIGNATURE_PARAMETER_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOutputSignatureElementDesc)(windows_core::Interface::as_raw(self), shaderindex, element, core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOutputSignatureElementDesc)(windows_core::Interface::as_raw(self), shaderindex, element, pdesc as _).ok() } } } #[repr(C)] @@ -6394,7 +6380,7 @@ impl ID3D10EffectTechnique { unsafe { (windows_core::Interface::vtable(self).IsValid)(windows_core::Interface::as_raw(self)) } } pub unsafe fn GetDesc(&self, pdesc: *mut D3D10_TECHNIQUE_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _).ok() } } pub unsafe fn GetAnnotationByIndex(&self, index: u32) -> Option { unsafe { (windows_core::Interface::vtable(self).GetAnnotationByIndex)(windows_core::Interface::as_raw(self), index) } @@ -6415,7 +6401,7 @@ impl ID3D10EffectTechnique { unsafe { (windows_core::Interface::vtable(self).GetPassByName)(windows_core::Interface::as_raw(self), name.param().abi()) } } pub unsafe fn ComputeStateBlockMask(&self, pstateblockmask: *mut D3D10_STATE_BLOCK_MASK) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ComputeStateBlockMask)(windows_core::Interface::as_raw(self), core::mem::transmute(pstateblockmask)).ok() } + unsafe { (windows_core::Interface::vtable(self).ComputeStateBlockMask)(windows_core::Interface::as_raw(self), pstateblockmask as _).ok() } } } #[repr(C)] @@ -6519,7 +6505,7 @@ impl ID3D10EffectType { } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetDesc(&self, pdesc: *mut D3D10_EFFECT_TYPE_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _).ok() } } pub unsafe fn GetMemberTypeByIndex(&self, index: u32) -> Option { unsafe { (windows_core::Interface::vtable(self).GetMemberTypeByIndex)(windows_core::Interface::as_raw(self), index) } @@ -6656,7 +6642,7 @@ impl ID3D10EffectVariable { unsafe { (windows_core::Interface::vtable(self).GetType)(windows_core::Interface::as_raw(self)) } } pub unsafe fn GetDesc(&self, pdesc: *mut D3D10_EFFECT_VARIABLE_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _).ok() } } pub unsafe fn GetAnnotationByIndex(&self, index: u32) -> Option { unsafe { (windows_core::Interface::vtable(self).GetAnnotationByIndex)(windows_core::Interface::as_raw(self), index) } @@ -6731,7 +6717,7 @@ impl ID3D10EffectVariable { unsafe { (windows_core::Interface::vtable(self).SetRawValue)(windows_core::Interface::as_raw(self), pdata, offset, bytecount).ok() } } pub unsafe fn GetRawValue(&self, pdata: *mut core::ffi::c_void, offset: u32, bytecount: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRawValue)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata), offset, bytecount).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRawValue)(windows_core::Interface::as_raw(self), pdata as _, offset, bytecount).ok() } } } #[repr(C)] @@ -7018,40 +7004,40 @@ impl core::ops::Deref for ID3D10EffectVectorVariable { windows_core::imp::interface_hierarchy!(ID3D10EffectVectorVariable, ID3D10EffectVariable); impl ID3D10EffectVectorVariable { pub unsafe fn SetBoolVector(&self, pdata: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetBoolVector)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetBoolVector)(windows_core::Interface::as_raw(self), pdata as _).ok() } } pub unsafe fn SetIntVector(&self, pdata: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetIntVector)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetIntVector)(windows_core::Interface::as_raw(self), pdata as _).ok() } } pub unsafe fn SetFloatVector(&self, pdata: *mut f32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetFloatVector)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetFloatVector)(windows_core::Interface::as_raw(self), pdata as _).ok() } } pub unsafe fn GetBoolVector(&self, pdata: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBoolVector)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBoolVector)(windows_core::Interface::as_raw(self), pdata as _).ok() } } pub unsafe fn GetIntVector(&self, pdata: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIntVector)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIntVector)(windows_core::Interface::as_raw(self), pdata as _).ok() } } pub unsafe fn GetFloatVector(&self, pdata: *mut f32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFloatVector)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFloatVector)(windows_core::Interface::as_raw(self), pdata as _).ok() } } pub unsafe fn SetBoolVectorArray(&self, pdata: *mut super::super::Foundation::BOOL, offset: u32, count: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetBoolVectorArray)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata), offset, count).ok() } + unsafe { (windows_core::Interface::vtable(self).SetBoolVectorArray)(windows_core::Interface::as_raw(self), pdata as _, offset, count).ok() } } pub unsafe fn SetIntVectorArray(&self, pdata: *mut i32, offset: u32, count: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetIntVectorArray)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata), offset, count).ok() } + unsafe { (windows_core::Interface::vtable(self).SetIntVectorArray)(windows_core::Interface::as_raw(self), pdata as _, offset, count).ok() } } pub unsafe fn SetFloatVectorArray(&self, pdata: *mut f32, offset: u32, count: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetFloatVectorArray)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata), offset, count).ok() } + unsafe { (windows_core::Interface::vtable(self).SetFloatVectorArray)(windows_core::Interface::as_raw(self), pdata as _, offset, count).ok() } } pub unsafe fn GetBoolVectorArray(&self, pdata: *mut super::super::Foundation::BOOL, offset: u32, count: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBoolVectorArray)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata), offset, count).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBoolVectorArray)(windows_core::Interface::as_raw(self), pdata as _, offset, count).ok() } } pub unsafe fn GetIntVectorArray(&self, pdata: *mut i32, offset: u32, count: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIntVectorArray)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata), offset, count).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIntVectorArray)(windows_core::Interface::as_raw(self), pdata as _, offset, count).ok() } } pub unsafe fn GetFloatVectorArray(&self, pdata: *mut f32, offset: u32, count: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFloatVectorArray)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata), offset, count).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFloatVectorArray)(windows_core::Interface::as_raw(self), pdata as _, offset, count).ok() } } } #[repr(C)] @@ -7234,7 +7220,7 @@ impl ID3D10InfoQueue { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).GetMessage)(windows_core::Interface::as_raw(self), messageindex, core::mem::transmute(pmessage.unwrap_or(core::mem::zeroed())), core::mem::transmute(pmessagebytelength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMessage)(windows_core::Interface::as_raw(self), messageindex, pmessage.unwrap_or(core::mem::zeroed()) as _, pmessagebytelength as _).ok() } } pub unsafe fn GetNumMessagesAllowedByStorageFilter(&self) -> u64 { unsafe { (windows_core::Interface::vtable(self).GetNumMessagesAllowedByStorageFilter)(windows_core::Interface::as_raw(self)) } @@ -7258,7 +7244,7 @@ impl ID3D10InfoQueue { unsafe { (windows_core::Interface::vtable(self).AddStorageFilterEntries)(windows_core::Interface::as_raw(self), pfilter).ok() } } pub unsafe fn GetStorageFilter(&self, pfilter: Option<*mut D3D10_INFO_QUEUE_FILTER>, pfilterbytelength: *mut usize) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetStorageFilter)(windows_core::Interface::as_raw(self), pfilter.unwrap_or(core::mem::zeroed()) as _, pfilterbytelength as _).ok() } } pub unsafe fn ClearStorageFilter(&self) { unsafe { (windows_core::Interface::vtable(self).ClearStorageFilter)(windows_core::Interface::as_raw(self)) } @@ -7282,7 +7268,7 @@ impl ID3D10InfoQueue { unsafe { (windows_core::Interface::vtable(self).AddRetrievalFilterEntries)(windows_core::Interface::as_raw(self), pfilter).ok() } } pub unsafe fn GetRetrievalFilter(&self, pfilter: Option<*mut D3D10_INFO_QUEUE_FILTER>, pfilterbytelength: *mut usize) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetRetrievalFilter)(windows_core::Interface::as_raw(self), pfilter.unwrap_or(core::mem::zeroed()) as _, pfilterbytelength as _).ok() } } pub unsafe fn ClearRetrievalFilter(&self) { unsafe { (windows_core::Interface::vtable(self).ClearRetrievalFilter)(windows_core::Interface::as_raw(self)) } @@ -7868,7 +7854,7 @@ impl core::ops::Deref for ID3D10RasterizerState { windows_core::imp::interface_hierarchy!(ID3D10RasterizerState, windows_core::IUnknown, ID3D10DeviceChild); impl ID3D10RasterizerState { pub unsafe fn GetDesc(&self, pdesc: *mut D3D10_RASTERIZER_DESC) { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _) } } } #[repr(C)] @@ -7907,7 +7893,7 @@ windows_core::imp::interface_hierarchy!(ID3D10RenderTargetView, windows_core::IU impl ID3D10RenderTargetView { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetDesc(&self, pdesc: *mut D3D10_RENDER_TARGET_VIEW_DESC) { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _) } } } #[repr(C)] @@ -8022,7 +8008,7 @@ impl core::ops::Deref for ID3D10SamplerState { windows_core::imp::interface_hierarchy!(ID3D10SamplerState, windows_core::IUnknown, ID3D10DeviceChild); impl ID3D10SamplerState { pub unsafe fn GetDesc(&self, pdesc: *mut D3D10_SAMPLER_DESC) { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _) } } } #[repr(C)] @@ -8055,7 +8041,7 @@ windows_core::imp::interface_hierarchy!(ID3D10ShaderReflection, windows_core::IU impl ID3D10ShaderReflection { #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetDesc(&self, pdesc: *mut D3D10_SHADER_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _).ok() } } pub unsafe fn GetConstantBufferByIndex(&self, index: u32) -> Option { unsafe { (windows_core::Interface::vtable(self).GetConstantBufferByIndex)(windows_core::Interface::as_raw(self), index) } @@ -8068,15 +8054,15 @@ impl ID3D10ShaderReflection { } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetResourceBindingDesc(&self, resourceindex: u32, pdesc: *mut D3D10_SHADER_INPUT_BIND_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetResourceBindingDesc)(windows_core::Interface::as_raw(self), resourceindex, core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetResourceBindingDesc)(windows_core::Interface::as_raw(self), resourceindex, pdesc as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetInputParameterDesc(&self, parameterindex: u32, pdesc: *mut D3D10_SIGNATURE_PARAMETER_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInputParameterDesc)(windows_core::Interface::as_raw(self), parameterindex, core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInputParameterDesc)(windows_core::Interface::as_raw(self), parameterindex, pdesc as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetOutputParameterDesc(&self, parameterindex: u32, pdesc: *mut D3D10_SIGNATURE_PARAMETER_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOutputParameterDesc)(windows_core::Interface::as_raw(self), parameterindex, core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOutputParameterDesc)(windows_core::Interface::as_raw(self), parameterindex, pdesc as _).ok() } } } #[repr(C)] @@ -8174,7 +8160,7 @@ windows_core::imp::interface_hierarchy!(ID3D10ShaderReflection1, windows_core::I impl ID3D10ShaderReflection1 { #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetDesc(&self, pdesc: *mut D3D10_SHADER_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _).ok() } } pub unsafe fn GetConstantBufferByIndex(&self, index: u32) -> Option { unsafe { (windows_core::Interface::vtable(self).GetConstantBufferByIndex)(windows_core::Interface::as_raw(self), index) } @@ -8187,15 +8173,15 @@ impl ID3D10ShaderReflection1 { } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetResourceBindingDesc(&self, resourceindex: u32, pdesc: *mut D3D10_SHADER_INPUT_BIND_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetResourceBindingDesc)(windows_core::Interface::as_raw(self), resourceindex, core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetResourceBindingDesc)(windows_core::Interface::as_raw(self), resourceindex, pdesc as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetInputParameterDesc(&self, parameterindex: u32, pdesc: *mut D3D10_SIGNATURE_PARAMETER_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInputParameterDesc)(windows_core::Interface::as_raw(self), parameterindex, core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInputParameterDesc)(windows_core::Interface::as_raw(self), parameterindex, pdesc as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetOutputParameterDesc(&self, parameterindex: u32, pdesc: *mut D3D10_SIGNATURE_PARAMETER_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOutputParameterDesc)(windows_core::Interface::as_raw(self), parameterindex, core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOutputParameterDesc)(windows_core::Interface::as_raw(self), parameterindex, pdesc as _).ok() } } pub unsafe fn GetVariableByName(&self, name: P0) -> Option where @@ -8208,7 +8194,7 @@ impl ID3D10ShaderReflection1 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetResourceBindingDescByName)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetResourceBindingDescByName)(windows_core::Interface::as_raw(self), name.param().abi(), pdesc as _).ok() } } pub unsafe fn GetMovInstructionCount(&self) -> windows_core::Result { unsafe { @@ -8477,7 +8463,7 @@ windows_core::imp::define_interface!(ID3D10ShaderReflectionConstantBuffer, ID3D1 impl ID3D10ShaderReflectionConstantBuffer { #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetDesc(&self, pdesc: *mut D3D10_SHADER_BUFFER_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _).ok() } } pub unsafe fn GetVariableByIndex(&self, index: u32) -> Option { unsafe { (windows_core::Interface::vtable(self).GetVariableByIndex)(windows_core::Interface::as_raw(self), index) } @@ -8553,7 +8539,7 @@ windows_core::imp::define_interface!(ID3D10ShaderReflectionType, ID3D10ShaderRef impl ID3D10ShaderReflectionType { #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetDesc(&self, pdesc: *mut D3D10_SHADER_TYPE_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _).ok() } } pub unsafe fn GetMemberTypeByIndex(&self, index: u32) -> Option { unsafe { (windows_core::Interface::vtable(self).GetMemberTypeByIndex)(windows_core::Interface::as_raw(self), index) } @@ -8645,7 +8631,7 @@ unsafe impl Sync for ID3D10ShaderReflectionType {} windows_core::imp::define_interface!(ID3D10ShaderReflectionVariable, ID3D10ShaderReflectionVariable_Vtbl); impl ID3D10ShaderReflectionVariable { pub unsafe fn GetDesc(&self, pdesc: *mut D3D10_SHADER_VARIABLE_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _).ok() } } pub unsafe fn GetType(&self) -> Option { unsafe { (windows_core::Interface::vtable(self).GetType)(windows_core::Interface::as_raw(self)) } @@ -8703,7 +8689,7 @@ windows_core::imp::interface_hierarchy!(ID3D10ShaderResourceView, windows_core:: impl ID3D10ShaderResourceView { #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] pub unsafe fn GetDesc(&self, pdesc: *mut D3D10_SHADER_RESOURCE_VIEW_DESC) { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _) } } } #[repr(C)] @@ -8750,7 +8736,7 @@ windows_core::imp::interface_hierarchy!(ID3D10ShaderResourceView1, windows_core: impl ID3D10ShaderResourceView1 { #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] pub unsafe fn GetDesc1(&self, pdesc: *mut D3D10_SHADER_RESOURCE_VIEW_DESC1) { - unsafe { (windows_core::Interface::vtable(self).GetDesc1)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc1)(windows_core::Interface::as_raw(self), pdesc as _) } } } #[repr(C)] @@ -8923,14 +8909,14 @@ impl core::ops::Deref for ID3D10Texture1D { windows_core::imp::interface_hierarchy!(ID3D10Texture1D, windows_core::IUnknown, ID3D10DeviceChild, ID3D10Resource); impl ID3D10Texture1D { pub unsafe fn Map(&self, subresource: u32, maptype: D3D10_MAP, mapflags: u32, ppdata: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Map)(windows_core::Interface::as_raw(self), subresource, maptype, mapflags, core::mem::transmute(ppdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).Map)(windows_core::Interface::as_raw(self), subresource, maptype, mapflags, ppdata as _).ok() } } pub unsafe fn Unmap(&self, subresource: u32) { unsafe { (windows_core::Interface::vtable(self).Unmap)(windows_core::Interface::as_raw(self), subresource) } } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetDesc(&self, pdesc: *mut D3D10_TEXTURE1D_DESC) { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _) } } } #[repr(C)] @@ -9007,7 +8993,7 @@ impl ID3D10Texture2D { } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetDesc(&self, pdesc: *mut D3D10_TEXTURE2D_DESC) { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _) } } } #[repr(C)] @@ -9090,7 +9076,7 @@ impl ID3D10Texture3D { } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetDesc(&self, pdesc: *mut D3D10_TEXTURE3D_DESC) { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _) } } } #[repr(C)] 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 bef65c56a5..a00c8df9f6 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11/mod.rs @@ -5,7 +5,7 @@ where P0: 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); - unsafe { D3D11CreateDevice(padapter.param().abi(), drivertype, software, flags, core::mem::transmute(pfeaturelevels.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pfeaturelevels.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), sdkversion, core::mem::transmute(ppdevice.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfeaturelevel.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppimmediatecontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { D3D11CreateDevice(padapter.param().abi(), drivertype, software, flags, core::mem::transmute(pfeaturelevels.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pfeaturelevels.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), sdkversion, ppdevice.unwrap_or(core::mem::zeroed()) as _, pfeaturelevel.unwrap_or(core::mem::zeroed()) as _, ppimmediatecontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] #[inline] @@ -23,11 +23,11 @@ where core::mem::transmute(pfeaturelevels.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pfeaturelevels.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), sdkversion, - core::mem::transmute(pswapchaindesc.unwrap_or(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())), + pswapchaindesc.unwrap_or(core::mem::zeroed()) as _, + ppswapchain.unwrap_or(core::mem::zeroed()) as _, + ppdevice.unwrap_or(core::mem::zeroed()) as _, + pfeaturelevel.unwrap_or(core::mem::zeroed()) as _, + ppimmediatecontext.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -50,7 +50,7 @@ where P0: windows_core::Param, { windows_targets::link!("d3dcsx.dll" "system" fn D3DX11CreateFFT(pdevicecontext : * mut core::ffi::c_void, pdesc : *const D3DX11_FFT_DESC, flags : u32, pbufferinfo : *mut D3DX11_FFT_BUFFER_INFO, ppfft : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { D3DX11CreateFFT(pdevicecontext.param().abi(), pdesc, flags, core::mem::transmute(pbufferinfo), core::mem::transmute(ppfft)).ok() } + unsafe { D3DX11CreateFFT(pdevicecontext.param().abi(), pdesc, flags, pbufferinfo as _, core::mem::transmute(ppfft)).ok() } } #[inline] pub unsafe fn D3DX11CreateFFT1DComplex(pdevicecontext: P0, x: u32, flags: u32, pbufferinfo: *mut D3DX11_FFT_BUFFER_INFO, ppfft: *mut Option) -> windows_core::Result<()> @@ -58,7 +58,7 @@ where P0: windows_core::Param, { windows_targets::link!("d3dcsx.dll" "system" fn D3DX11CreateFFT1DComplex(pdevicecontext : * mut core::ffi::c_void, x : u32, flags : u32, pbufferinfo : *mut D3DX11_FFT_BUFFER_INFO, ppfft : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { D3DX11CreateFFT1DComplex(pdevicecontext.param().abi(), x, flags, core::mem::transmute(pbufferinfo), core::mem::transmute(ppfft)).ok() } + unsafe { D3DX11CreateFFT1DComplex(pdevicecontext.param().abi(), x, flags, pbufferinfo as _, core::mem::transmute(ppfft)).ok() } } #[inline] pub unsafe fn D3DX11CreateFFT1DReal(pdevicecontext: P0, x: u32, flags: u32, pbufferinfo: *mut D3DX11_FFT_BUFFER_INFO, ppfft: *mut Option) -> windows_core::Result<()> @@ -66,7 +66,7 @@ where P0: windows_core::Param, { windows_targets::link!("d3dcsx.dll" "system" fn D3DX11CreateFFT1DReal(pdevicecontext : * mut core::ffi::c_void, x : u32, flags : u32, pbufferinfo : *mut D3DX11_FFT_BUFFER_INFO, ppfft : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { D3DX11CreateFFT1DReal(pdevicecontext.param().abi(), x, flags, core::mem::transmute(pbufferinfo), core::mem::transmute(ppfft)).ok() } + unsafe { D3DX11CreateFFT1DReal(pdevicecontext.param().abi(), x, flags, pbufferinfo as _, core::mem::transmute(ppfft)).ok() } } #[inline] pub unsafe fn D3DX11CreateFFT2DComplex(pdevicecontext: P0, x: u32, y: u32, flags: u32, pbufferinfo: *mut D3DX11_FFT_BUFFER_INFO, ppfft: *mut Option) -> windows_core::Result<()> @@ -74,7 +74,7 @@ where P0: windows_core::Param, { windows_targets::link!("d3dcsx.dll" "system" fn D3DX11CreateFFT2DComplex(pdevicecontext : * mut core::ffi::c_void, x : u32, y : u32, flags : u32, pbufferinfo : *mut D3DX11_FFT_BUFFER_INFO, ppfft : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { D3DX11CreateFFT2DComplex(pdevicecontext.param().abi(), x, y, flags, core::mem::transmute(pbufferinfo), core::mem::transmute(ppfft)).ok() } + unsafe { D3DX11CreateFFT2DComplex(pdevicecontext.param().abi(), x, y, flags, pbufferinfo as _, core::mem::transmute(ppfft)).ok() } } #[inline] pub unsafe fn D3DX11CreateFFT2DReal(pdevicecontext: P0, x: u32, y: u32, flags: u32, pbufferinfo: *mut D3DX11_FFT_BUFFER_INFO, ppfft: *mut Option) -> windows_core::Result<()> @@ -82,7 +82,7 @@ where P0: windows_core::Param, { windows_targets::link!("d3dcsx.dll" "system" fn D3DX11CreateFFT2DReal(pdevicecontext : * mut core::ffi::c_void, x : u32, y : u32, flags : u32, pbufferinfo : *mut D3DX11_FFT_BUFFER_INFO, ppfft : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { D3DX11CreateFFT2DReal(pdevicecontext.param().abi(), x, y, flags, core::mem::transmute(pbufferinfo), core::mem::transmute(ppfft)).ok() } + unsafe { D3DX11CreateFFT2DReal(pdevicecontext.param().abi(), x, y, flags, pbufferinfo as _, core::mem::transmute(ppfft)).ok() } } #[inline] pub unsafe fn D3DX11CreateFFT3DComplex(pdevicecontext: P0, x: u32, y: u32, z: u32, flags: u32, pbufferinfo: *mut D3DX11_FFT_BUFFER_INFO, ppfft: *mut Option) -> windows_core::Result<()> @@ -90,7 +90,7 @@ where P0: windows_core::Param, { windows_targets::link!("d3dcsx.dll" "system" fn D3DX11CreateFFT3DComplex(pdevicecontext : * mut core::ffi::c_void, x : u32, y : u32, z : u32, flags : u32, pbufferinfo : *mut D3DX11_FFT_BUFFER_INFO, ppfft : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { D3DX11CreateFFT3DComplex(pdevicecontext.param().abi(), x, y, z, flags, core::mem::transmute(pbufferinfo), core::mem::transmute(ppfft)).ok() } + unsafe { D3DX11CreateFFT3DComplex(pdevicecontext.param().abi(), x, y, z, flags, pbufferinfo as _, core::mem::transmute(ppfft)).ok() } } #[inline] pub unsafe fn D3DX11CreateFFT3DReal(pdevicecontext: P0, x: u32, y: u32, z: u32, flags: u32, pbufferinfo: *mut D3DX11_FFT_BUFFER_INFO, ppfft: *mut Option) -> windows_core::Result<()> @@ -98,7 +98,7 @@ where P0: windows_core::Param, { windows_targets::link!("d3dcsx.dll" "system" fn D3DX11CreateFFT3DReal(pdevicecontext : * mut core::ffi::c_void, x : u32, y : u32, z : u32, flags : u32, pbufferinfo : *mut D3DX11_FFT_BUFFER_INFO, ppfft : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { D3DX11CreateFFT3DReal(pdevicecontext.param().abi(), x, y, z, flags, core::mem::transmute(pbufferinfo), core::mem::transmute(ppfft)).ok() } + unsafe { D3DX11CreateFFT3DReal(pdevicecontext.param().abi(), x, y, z, flags, pbufferinfo as _, core::mem::transmute(ppfft)).ok() } } #[inline] pub unsafe fn D3DX11CreateScan(pdevicecontext: P0, maxelementscansize: u32, maxscancount: u32) -> windows_core::Result @@ -6193,7 +6193,7 @@ impl core::ops::Deref for ID3D11BlendState { windows_core::imp::interface_hierarchy!(ID3D11BlendState, windows_core::IUnknown, ID3D11DeviceChild); impl ID3D11BlendState { pub unsafe fn GetDesc(&self, pdesc: *mut D3D11_BLEND_DESC) { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _) } } } #[repr(C)] @@ -6231,7 +6231,7 @@ impl core::ops::Deref for ID3D11BlendState1 { windows_core::imp::interface_hierarchy!(ID3D11BlendState1, windows_core::IUnknown, ID3D11DeviceChild, ID3D11BlendState); impl ID3D11BlendState1 { pub unsafe fn GetDesc1(&self, pdesc: *mut D3D11_BLEND_DESC1) { - unsafe { (windows_core::Interface::vtable(self).GetDesc1)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc1)(windows_core::Interface::as_raw(self), pdesc as _) } } } #[repr(C)] @@ -6269,7 +6269,7 @@ impl core::ops::Deref for ID3D11Buffer { windows_core::imp::interface_hierarchy!(ID3D11Buffer, windows_core::IUnknown, ID3D11DeviceChild, ID3D11Resource); impl ID3D11Buffer { pub unsafe fn GetDesc(&self, pdesc: *mut D3D11_BUFFER_DESC) { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _) } } } #[repr(C)] @@ -6314,13 +6314,13 @@ impl ID3D11ClassInstance { } } pub unsafe fn GetDesc(&self, pdesc: *mut D3D11_CLASS_INSTANCE_DESC) { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _) } } pub unsafe fn GetInstanceName(&self, pinstancename: Option, pbufferlength: *mut usize) { - unsafe { (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)) } + unsafe { (windows_core::Interface::vtable(self).GetInstanceName)(windows_core::Interface::as_raw(self), pinstancename.unwrap_or(core::mem::zeroed()) as _, pbufferlength as _) } } pub unsafe fn GetTypeName(&self, ptypename: Option, pbufferlength: *mut usize) { - unsafe { (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)) } + unsafe { (windows_core::Interface::vtable(self).GetTypeName)(windows_core::Interface::as_raw(self), ptypename.unwrap_or(core::mem::zeroed()) as _, pbufferlength as _) } } } #[repr(C)] @@ -6841,7 +6841,7 @@ impl core::ops::Deref for ID3D11DepthStencilState { windows_core::imp::interface_hierarchy!(ID3D11DepthStencilState, windows_core::IUnknown, ID3D11DeviceChild); impl ID3D11DepthStencilState { pub unsafe fn GetDesc(&self, pdesc: *mut D3D11_DEPTH_STENCIL_DESC) { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _) } } } #[repr(C)] @@ -6880,7 +6880,7 @@ windows_core::imp::interface_hierarchy!(ID3D11DepthStencilView, windows_core::IU impl ID3D11DepthStencilView { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetDesc(&self, pdesc: *mut D3D11_DEPTH_STENCIL_VIEW_DESC) { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _) } } } #[repr(C)] @@ -6920,63 +6920,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<()> { - unsafe { (windows_core::Interface::vtable(self).CreateBuffer)(windows_core::Interface::as_raw(self), pdesc, core::mem::transmute(pinitialdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppbuffer.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateBuffer)(windows_core::Interface::as_raw(self), pdesc, pinitialdata.unwrap_or(core::mem::zeroed()) as _, ppbuffer.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).CreateTexture1D)(windows_core::Interface::as_raw(self), pdesc, core::mem::transmute(pinitialdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pptexture1d.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateTexture1D)(windows_core::Interface::as_raw(self), pdesc, pinitialdata.unwrap_or(core::mem::zeroed()) as _, pptexture1d.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).CreateTexture2D)(windows_core::Interface::as_raw(self), pdesc, core::mem::transmute(pinitialdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pptexture2d.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateTexture2D)(windows_core::Interface::as_raw(self), pdesc, pinitialdata.unwrap_or(core::mem::zeroed()) as _, pptexture2d.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).CreateTexture3D)(windows_core::Interface::as_raw(self), pdesc, core::mem::transmute(pinitialdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pptexture3d.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateTexture3D)(windows_core::Interface::as_raw(self), pdesc, pinitialdata.unwrap_or(core::mem::zeroed()) as _, pptexture3d.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).CreateShaderResourceView)(windows_core::Interface::as_raw(self), presource.param().abi(), pdesc.unwrap_or(core::mem::zeroed()) as _, ppsrview.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).CreateUnorderedAccessView)(windows_core::Interface::as_raw(self), presource.param().abi(), pdesc.unwrap_or(core::mem::zeroed()) as _, ppuaview.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).CreateRenderTargetView)(windows_core::Interface::as_raw(self), presource.param().abi(), pdesc.unwrap_or(core::mem::zeroed()) as _, pprtview.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).CreateDepthStencilView)(windows_core::Interface::as_raw(self), presource.param().abi(), pdesc.unwrap_or(core::mem::zeroed()) as _, ppdepthstencilview.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (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() } + unsafe { (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(), ppinputlayout.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreateVertexShader(&self, pshaderbytecode: &[u8], pclasslinkage: P2, ppvertexshader: Option<*mut Option>) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (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() } + unsafe { (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(), ppvertexshader.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreateGeometryShader(&self, pshaderbytecode: &[u8], pclasslinkage: P2, ppgeometryshader: Option<*mut Option>) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (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() } + unsafe { (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(), ppgeometryshader.unwrap_or(core::mem::zeroed()) as _).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 @@ -6993,7 +6993,7 @@ impl ID3D11Device { pbufferstrides.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), rasterizedstream, pclasslinkage.param().abi(), - core::mem::transmute(ppgeometryshader.unwrap_or(core::mem::zeroed())), + ppgeometryshader.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -7002,25 +7002,25 @@ impl ID3D11Device { where P2: windows_core::Param, { - unsafe { (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() } + unsafe { (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(), pppixelshader.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreateHullShader(&self, pshaderbytecode: &[u8], pclasslinkage: P2, pphullshader: Option<*mut Option>) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (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() } + unsafe { (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(), pphullshader.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreateDomainShader(&self, pshaderbytecode: &[u8], pclasslinkage: P2, ppdomainshader: Option<*mut Option>) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (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() } + unsafe { (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(), ppdomainshader.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreateComputeShader(&self, pshaderbytecode: &[u8], pclasslinkage: P2, ppcomputeshader: Option<*mut Option>) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (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() } + unsafe { (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(), ppcomputeshader.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreateClassLinkage(&self) -> windows_core::Result { unsafe { @@ -7029,28 +7029,28 @@ impl ID3D11Device { } } pub unsafe fn CreateBlendState(&self, pblendstatedesc: *const D3D11_BLEND_DESC, ppblendstate: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateBlendState)(windows_core::Interface::as_raw(self), pblendstatedesc, core::mem::transmute(ppblendstate.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateBlendState)(windows_core::Interface::as_raw(self), pblendstatedesc, ppblendstate.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreateDepthStencilState(&self, pdepthstencildesc: *const D3D11_DEPTH_STENCIL_DESC, ppdepthstencilstate: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateDepthStencilState)(windows_core::Interface::as_raw(self), pdepthstencildesc, core::mem::transmute(ppdepthstencilstate.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateDepthStencilState)(windows_core::Interface::as_raw(self), pdepthstencildesc, ppdepthstencilstate.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreateRasterizerState(&self, prasterizerdesc: *const D3D11_RASTERIZER_DESC, pprasterizerstate: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateRasterizerState)(windows_core::Interface::as_raw(self), prasterizerdesc, core::mem::transmute(pprasterizerstate.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateRasterizerState)(windows_core::Interface::as_raw(self), prasterizerdesc, pprasterizerstate.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreateSamplerState(&self, psamplerdesc: *const D3D11_SAMPLER_DESC, ppsamplerstate: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateSamplerState)(windows_core::Interface::as_raw(self), psamplerdesc, core::mem::transmute(ppsamplerstate.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateSamplerState)(windows_core::Interface::as_raw(self), psamplerdesc, ppsamplerstate.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreateQuery(&self, pquerydesc: *const D3D11_QUERY_DESC, ppquery: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateQuery)(windows_core::Interface::as_raw(self), pquerydesc, core::mem::transmute(ppquery.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateQuery)(windows_core::Interface::as_raw(self), pquerydesc, ppquery.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreatePredicate(&self, ppredicatedesc: *const D3D11_QUERY_DESC, pppredicate: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreatePredicate)(windows_core::Interface::as_raw(self), ppredicatedesc, core::mem::transmute(pppredicate.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreatePredicate)(windows_core::Interface::as_raw(self), ppredicatedesc, pppredicate.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreateCounter(&self, pcounterdesc: *const D3D11_COUNTER_DESC, ppcounter: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateCounter)(windows_core::Interface::as_raw(self), pcounterdesc, core::mem::transmute(ppcounter.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateCounter)(windows_core::Interface::as_raw(self), pcounterdesc, ppcounter.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreateDeferredContext(&self, contextflags: u32, ppdeferredcontext: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateDeferredContext)(windows_core::Interface::as_raw(self), contextflags, core::mem::transmute(ppdeferredcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateDeferredContext)(windows_core::Interface::as_raw(self), contextflags, ppdeferredcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OpenSharedResource(&self, hresource: super::super::Foundation::HANDLE, result__: *mut Option) -> windows_core::Result<()> where @@ -7080,30 +7080,16 @@ impl ID3D11Device { } } 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<()> { - unsafe { - (windows_core::Interface::vtable(self).CheckCounter)( - windows_core::Interface::as_raw(self), - 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() - } + unsafe { (windows_core::Interface::vtable(self).CheckCounter)(windows_core::Interface::as_raw(self), pdesc, ptype as _, pactivecounters as _, szname.unwrap_or(core::mem::zeroed()) as _, pnamelength.unwrap_or(core::mem::zeroed()) as _, szunits.unwrap_or(core::mem::zeroed()) as _, punitslength.unwrap_or(core::mem::zeroed()) as _, szdescription.unwrap_or(core::mem::zeroed()) as _, pdescriptionlength.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CheckFeatureSupport(&self, feature: D3D11_FEATURE, pfeaturesupportdata: *mut core::ffi::c_void, featuresupportdatasize: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CheckFeatureSupport)(windows_core::Interface::as_raw(self), feature, core::mem::transmute(pfeaturesupportdata), featuresupportdatasize).ok() } + unsafe { (windows_core::Interface::vtable(self).CheckFeatureSupport)(windows_core::Interface::as_raw(self), feature, pfeaturesupportdata as _, 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), guid, core::mem::transmute(pdatasize), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), guid, pdatasize as _, pdata.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetPrivateData(&self, guid: *const windows_core::GUID, datasize: u32, pdata: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), guid, datasize, core::mem::transmute(pdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), guid, datasize, pdata.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, pdata: P1) -> windows_core::Result<()> where @@ -7587,17 +7573,17 @@ impl ID3D11Device1 { } } pub unsafe fn CreateDeferredContext1(&self, contextflags: u32, ppdeferredcontext: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateDeferredContext1)(windows_core::Interface::as_raw(self), contextflags, core::mem::transmute(ppdeferredcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateDeferredContext1)(windows_core::Interface::as_raw(self), contextflags, ppdeferredcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreateBlendState1(&self, pblendstatedesc: *const D3D11_BLEND_DESC1, ppblendstate: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateBlendState1)(windows_core::Interface::as_raw(self), pblendstatedesc, core::mem::transmute(ppblendstate.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateBlendState1)(windows_core::Interface::as_raw(self), pblendstatedesc, ppblendstate.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreateRasterizerState1(&self, prasterizerdesc: *const D3D11_RASTERIZER_DESC1, pprasterizerstate: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateRasterizerState1)(windows_core::Interface::as_raw(self), prasterizerdesc, core::mem::transmute(pprasterizerstate.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateRasterizerState1)(windows_core::Interface::as_raw(self), prasterizerdesc, pprasterizerstate.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).CreateDeviceContextState)(windows_core::Interface::as_raw(self), flags, core::mem::transmute(pfeaturelevels.as_ptr()), pfeaturelevels.len().try_into().unwrap(), sdkversion, emulatedinterface, core::mem::transmute(pchosenfeaturelevel.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppcontextstate.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateDeviceContextState)(windows_core::Interface::as_raw(self), flags, core::mem::transmute(pfeaturelevels.as_ptr()), pfeaturelevels.len().try_into().unwrap(), sdkversion, emulatedinterface, pchosenfeaturelevel.unwrap_or(core::mem::zeroed()) as _, ppcontextstate.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OpenSharedResource1(&self, hresource: super::super::Foundation::HANDLE) -> windows_core::Result where @@ -7722,13 +7708,13 @@ impl ID3D11Device2 { } } pub unsafe fn CreateDeferredContext2(&self, contextflags: u32, ppdeferredcontext: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateDeferredContext2)(windows_core::Interface::as_raw(self), contextflags, core::mem::transmute(ppdeferredcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateDeferredContext2)(windows_core::Interface::as_raw(self), contextflags, ppdeferredcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetResourceTiling(&self, ptiledresource: P0, pnumtilesforentireresource: Option<*mut u32>, ppackedmipdesc: Option<*mut D3D11_PACKED_MIP_DESC>, pstandardtileshapefornonpackedmips: Option<*mut D3D11_TILE_SHAPE>, pnumsubresourcetilings: Option<*mut u32>, firstsubresourcetilingtoget: u32, psubresourcetilingsfornonpackedmips: *mut D3D11_SUBRESOURCE_TILING) where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetResourceTiling)(windows_core::Interface::as_raw(self), ptiledresource.param().abi(), 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())), firstsubresourcetilingtoget, core::mem::transmute(psubresourcetilingsfornonpackedmips)) } + unsafe { (windows_core::Interface::vtable(self).GetResourceTiling)(windows_core::Interface::as_raw(self), ptiledresource.param().abi(), pnumtilesforentireresource.unwrap_or(core::mem::zeroed()) as _, ppackedmipdesc.unwrap_or(core::mem::zeroed()) as _, pstandardtileshapefornonpackedmips.unwrap_or(core::mem::zeroed()) as _, pnumsubresourcetilings.unwrap_or(core::mem::zeroed()) as _, firstsubresourcetilingtoget, psubresourcetilingsfornonpackedmips as _) } } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CheckMultisampleQualityLevels1(&self, format: super::Dxgi::Common::DXGI_FORMAT, samplecount: u32, flags: u32) -> windows_core::Result { @@ -7818,38 +7804,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<()> { - unsafe { (windows_core::Interface::vtable(self).CreateTexture2D1)(windows_core::Interface::as_raw(self), pdesc1, core::mem::transmute(pinitialdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pptexture2d.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateTexture2D1)(windows_core::Interface::as_raw(self), pdesc1, pinitialdata.unwrap_or(core::mem::zeroed()) as _, pptexture2d.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).CreateTexture3D1)(windows_core::Interface::as_raw(self), pdesc1, core::mem::transmute(pinitialdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pptexture3d.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateTexture3D1)(windows_core::Interface::as_raw(self), pdesc1, pinitialdata.unwrap_or(core::mem::zeroed()) as _, pptexture3d.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreateRasterizerState2(&self, prasterizerdesc: *const D3D11_RASTERIZER_DESC2, pprasterizerstate: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateRasterizerState2)(windows_core::Interface::as_raw(self), prasterizerdesc, core::mem::transmute(pprasterizerstate.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateRasterizerState2)(windows_core::Interface::as_raw(self), prasterizerdesc, pprasterizerstate.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).CreateShaderResourceView1)(windows_core::Interface::as_raw(self), presource.param().abi(), pdesc1.unwrap_or(core::mem::zeroed()) as _, ppsrview1.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).CreateUnorderedAccessView1)(windows_core::Interface::as_raw(self), presource.param().abi(), pdesc1.unwrap_or(core::mem::zeroed()) as _, ppuaview1.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).CreateRenderTargetView1)(windows_core::Interface::as_raw(self), presource.param().abi(), pdesc1.unwrap_or(core::mem::zeroed()) as _, pprtview1.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreateQuery1(&self, pquerydesc1: *const D3D11_QUERY_DESC1, ppquery1: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateQuery1)(windows_core::Interface::as_raw(self), pquerydesc1, core::mem::transmute(ppquery1.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateQuery1)(windows_core::Interface::as_raw(self), pquerydesc1, ppquery1.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetImmediateContext3(&self) -> windows_core::Result { unsafe { @@ -7859,19 +7845,19 @@ impl ID3D11Device3 { } } pub unsafe fn CreateDeferredContext3(&self, contextflags: u32, ppdeferredcontext: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateDeferredContext3)(windows_core::Interface::as_raw(self), contextflags, core::mem::transmute(ppdeferredcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateDeferredContext3)(windows_core::Interface::as_raw(self), contextflags, ppdeferredcontext.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).WriteToSubresource)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, core::mem::transmute(pdstbox.unwrap_or(core::mem::zeroed())), psrcdata, srcrowpitch, srcdepthpitch) } + unsafe { (windows_core::Interface::vtable(self).WriteToSubresource)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, pdstbox.unwrap_or(core::mem::zeroed()) as _, psrcdata, srcrowpitch, 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, { - unsafe { (windows_core::Interface::vtable(self).ReadFromSubresource)(windows_core::Interface::as_raw(self), core::mem::transmute(pdstdata), dstrowpitch, dstdepthpitch, psrcresource.param().abi(), srcsubresource, core::mem::transmute(psrcbox.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).ReadFromSubresource)(windows_core::Interface::as_raw(self), pdstdata as _, dstrowpitch, dstdepthpitch, psrcresource.param().abi(), srcsubresource, psrcbox.unwrap_or(core::mem::zeroed()) as _) } } } #[repr(C)] @@ -8154,10 +8140,10 @@ impl ID3D11DeviceChild { } } pub unsafe fn GetPrivateData(&self, guid: *const windows_core::GUID, pdatasize: *mut u32, pdata: Option<*mut core::ffi::c_void>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), guid, core::mem::transmute(pdatasize), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), guid, pdatasize as _, pdata.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetPrivateData(&self, guid: *const windows_core::GUID, datasize: u32, pdata: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), guid, datasize, core::mem::transmute(pdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), guid, datasize, pdata.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, pdata: P1) -> windows_core::Result<()> where @@ -8261,7 +8247,7 @@ impl ID3D11DeviceContext { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Map)(windows_core::Interface::as_raw(self), presource.param().abi(), subresource, maptype, mapflags, core::mem::transmute(pmappedresource.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Map)(windows_core::Interface::as_raw(self), presource.param().abi(), subresource, maptype, mapflags, pmappedresource.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Unmap(&self, presource: P0, subresource: u32) where @@ -8279,7 +8265,7 @@ impl ID3D11DeviceContext { unsafe { (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>) { - unsafe { (windows_core::Interface::vtable(self).IASetVertexBuffers)(windows_core::Interface::as_raw(self), startslot, 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()))) } + unsafe { (windows_core::Interface::vtable(self).IASetVertexBuffers)(windows_core::Interface::as_raw(self), startslot, numbuffers, ppvertexbuffers.unwrap_or(core::mem::zeroed()) as _, pstrides.unwrap_or(core::mem::zeroed()) as _, poffsets.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn IASetIndexBuffer(&self, pindexbuffer: P0, format: super::Dxgi::Common::DXGI_FORMAT, offset: u32) @@ -8329,7 +8315,7 @@ impl ID3D11DeviceContext { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), pasync.param().abi(), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), datasize, getdataflags).ok() } + unsafe { (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), pasync.param().abi(), pdata.unwrap_or(core::mem::zeroed()) as _, datasize, getdataflags).ok() } } pub unsafe fn SetPredication(&self, ppredicate: P0, predicatevalue: bool) where @@ -8353,7 +8339,7 @@ impl ID3D11DeviceContext { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).OMSetRenderTargetsAndUnorderedAccessViews)(windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pprendertargetviews.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdepthstencilview.param().abi(), uavstartslot, numuavs, core::mem::transmute(ppunorderedaccessviews.unwrap_or(core::mem::zeroed())), core::mem::transmute(puavinitialcounts.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).OMSetRenderTargetsAndUnorderedAccessViews)(windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pprendertargetviews.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdepthstencilview.param().abi(), uavstartslot, numuavs, ppunorderedaccessviews.unwrap_or(core::mem::zeroed()) as _, puavinitialcounts.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn OMSetBlendState(&self, pblendstate: P0, blendfactor: Option<&[f32; 4]>, samplemask: u32) where @@ -8368,7 +8354,7 @@ impl ID3D11DeviceContext { unsafe { (windows_core::Interface::vtable(self).OMSetDepthStencilState)(windows_core::Interface::as_raw(self), pdepthstencilstate.param().abi(), stencilref) } } pub unsafe fn SOSetTargets(&self, numbuffers: u32, ppsotargets: Option<*const Option>, poffsets: Option<*const u32>) { - unsafe { (windows_core::Interface::vtable(self).SOSetTargets)(windows_core::Interface::as_raw(self), numbuffers, core::mem::transmute(ppsotargets.unwrap_or(core::mem::zeroed())), core::mem::transmute(poffsets.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).SOSetTargets)(windows_core::Interface::as_raw(self), numbuffers, ppsotargets.unwrap_or(core::mem::zeroed()) as _, poffsets.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn DrawAuto(&self) { unsafe { (windows_core::Interface::vtable(self).DrawAuto)(windows_core::Interface::as_raw(self)) } @@ -8411,7 +8397,7 @@ impl ID3D11DeviceContext { P0: windows_core::Param, P5: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CopySubresourceRegion)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, dstx, dsty, dstz, psrcresource.param().abi(), srcsubresource, core::mem::transmute(psrcbox.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).CopySubresourceRegion)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, dstx, dsty, dstz, psrcresource.param().abi(), srcsubresource, psrcbox.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn CopyResource(&self, pdstresource: P0, psrcresource: P1) where @@ -8424,7 +8410,7 @@ impl ID3D11DeviceContext { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).UpdateSubresource)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, core::mem::transmute(pdstbox.unwrap_or(core::mem::zeroed())), psrcdata, srcrowpitch, srcdepthpitch) } + unsafe { (windows_core::Interface::vtable(self).UpdateSubresource)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, pdstbox.unwrap_or(core::mem::zeroed()) as _, psrcdata, srcrowpitch, srcdepthpitch) } } pub unsafe fn CopyStructureCount(&self, pdstbuffer: P0, dstalignedbyteoffset: u32, psrcview: P2) where @@ -8523,7 +8509,7 @@ impl ID3D11DeviceContext { unsafe { (windows_core::Interface::vtable(self).CSSetShaderResources)(windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppshaderresourceviews.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } } pub unsafe fn CSSetUnorderedAccessViews(&self, startslot: u32, numuavs: u32, ppunorderedaccessviews: Option<*const Option>, puavinitialcounts: Option<*const u32>) { - unsafe { (windows_core::Interface::vtable(self).CSSetUnorderedAccessViews)(windows_core::Interface::as_raw(self), startslot, numuavs, core::mem::transmute(ppunorderedaccessviews.unwrap_or(core::mem::zeroed())), core::mem::transmute(puavinitialcounts.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).CSSetUnorderedAccessViews)(windows_core::Interface::as_raw(self), startslot, numuavs, ppunorderedaccessviews.unwrap_or(core::mem::zeroed()) as _, puavinitialcounts.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn CSSetShader(&self, pcomputeshader: P0, ppclassinstances: Option<&[Option]>) where @@ -8544,13 +8530,13 @@ impl ID3D11DeviceContext { unsafe { (windows_core::Interface::vtable(self).PSGetShaderResources)(windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppshaderresourceviews.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } } pub unsafe fn PSGetShader(&self, pppixelshader: *mut Option, ppclassinstances: Option<*mut Option>, pnumclassinstances: Option<*mut u32>) { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).PSGetShader)(windows_core::Interface::as_raw(self), core::mem::transmute(pppixelshader), ppclassinstances.unwrap_or(core::mem::zeroed()) as _, pnumclassinstances.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn PSGetSamplers(&self, startslot: u32, ppsamplers: Option<&mut [Option]>) { unsafe { (windows_core::Interface::vtable(self).PSGetSamplers)(windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppsamplers.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } } pub unsafe fn VSGetShader(&self, ppvertexshader: *mut Option, ppclassinstances: Option<*mut Option>, pnumclassinstances: Option<*mut u32>) { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).VSGetShader)(windows_core::Interface::as_raw(self), core::mem::transmute(ppvertexshader), ppclassinstances.unwrap_or(core::mem::zeroed()) as _, pnumclassinstances.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn PSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: Option<&mut [Option]>) { unsafe { (windows_core::Interface::vtable(self).PSGetConstantBuffers)(windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppconstantbuffers.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } @@ -8563,17 +8549,17 @@ impl ID3D11DeviceContext { } } pub unsafe fn IAGetVertexBuffers(&self, startslot: u32, numbuffers: u32, ppvertexbuffers: Option<*mut Option>, pstrides: Option<*mut u32>, poffsets: Option<*mut u32>) { - unsafe { (windows_core::Interface::vtable(self).IAGetVertexBuffers)(windows_core::Interface::as_raw(self), startslot, 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()))) } + unsafe { (windows_core::Interface::vtable(self).IAGetVertexBuffers)(windows_core::Interface::as_raw(self), startslot, numbuffers, ppvertexbuffers.unwrap_or(core::mem::zeroed()) as _, pstrides.unwrap_or(core::mem::zeroed()) as _, poffsets.unwrap_or(core::mem::zeroed()) as _) } } #[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>) { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).IAGetIndexBuffer)(windows_core::Interface::as_raw(self), pindexbuffer.unwrap_or(core::mem::zeroed()) as _, format.unwrap_or(core::mem::zeroed()) as _, offset.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn GSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: Option<&mut [Option]>) { unsafe { (windows_core::Interface::vtable(self).GSGetConstantBuffers)(windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppconstantbuffers.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } } pub unsafe fn GSGetShader(&self, ppgeometryshader: *mut Option, ppclassinstances: Option<*mut Option>, pnumclassinstances: Option<*mut u32>) { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).GSGetShader)(windows_core::Interface::as_raw(self), core::mem::transmute(ppgeometryshader), ppclassinstances.unwrap_or(core::mem::zeroed()) as _, pnumclassinstances.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn IAGetPrimitiveTopology(&self) -> super::Direct3D::D3D_PRIMITIVE_TOPOLOGY { @@ -8590,7 +8576,7 @@ impl ID3D11DeviceContext { unsafe { (windows_core::Interface::vtable(self).VSGetSamplers)(windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppsamplers.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } } pub unsafe fn GetPredication(&self, pppredicate: Option<*mut Option>, ppredicatevalue: Option<*mut super::super::Foundation::BOOL>) { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).GetPredication)(windows_core::Interface::as_raw(self), pppredicate.unwrap_or(core::mem::zeroed()) as _, ppredicatevalue.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn GSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: Option<&mut [Option]>) { unsafe { (windows_core::Interface::vtable(self).GSGetShaderResources)(windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppshaderresourceviews.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } @@ -8599,7 +8585,7 @@ impl ID3D11DeviceContext { unsafe { (windows_core::Interface::vtable(self).GSGetSamplers)(windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppsamplers.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } } pub unsafe fn OMGetRenderTargets(&self, pprendertargetviews: Option<&mut [Option]>, ppdepthstencilview: Option<*mut Option>) { - unsafe { (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()))) } + unsafe { (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())), ppdepthstencilview.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn OMGetRenderTargetsAndUnorderedAccessViews(&self, pprendertargetviews: Option<&mut [Option]>, ppdepthstencilview: Option<*mut Option>, uavstartslot: u32, ppunorderedaccessviews: Option<&mut [Option]>) { unsafe { @@ -8607,7 +8593,7 @@ impl ID3D11DeviceContext { 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())), + ppdepthstencilview.unwrap_or(core::mem::zeroed()) as _, 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())), @@ -8615,10 +8601,10 @@ impl ID3D11DeviceContext { } } pub unsafe fn OMGetBlendState(&self, ppblendstate: Option<*mut Option>, blendfactor: Option<&mut [f32; 4]>, psamplemask: Option<*mut u32>) { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).OMGetBlendState)(windows_core::Interface::as_raw(self), ppblendstate.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(blendfactor.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), psamplemask.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn OMGetDepthStencilState(&self, ppdepthstencilstate: Option<*mut Option>, pstencilref: Option<*mut u32>) { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).OMGetDepthStencilState)(windows_core::Interface::as_raw(self), ppdepthstencilstate.unwrap_or(core::mem::zeroed()) as _, pstencilref.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn SOGetTargets(&self, ppsotargets: Option<&mut [Option]>) { unsafe { (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()))) } @@ -8631,16 +8617,16 @@ impl ID3D11DeviceContext { } } pub unsafe fn RSGetViewports(&self, pnumviewports: *mut u32, pviewports: Option<*mut D3D11_VIEWPORT>) { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).RSGetViewports)(windows_core::Interface::as_raw(self), pnumviewports as _, pviewports.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn RSGetScissorRects(&self, pnumrects: *mut u32, prects: Option<*mut super::super::Foundation::RECT>) { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).RSGetScissorRects)(windows_core::Interface::as_raw(self), pnumrects as _, prects.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn HSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: Option<&mut [Option]>) { unsafe { (windows_core::Interface::vtable(self).HSGetShaderResources)(windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppshaderresourceviews.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } } pub unsafe fn HSGetShader(&self, pphullshader: *mut Option, ppclassinstances: Option<*mut Option>, pnumclassinstances: Option<*mut u32>) { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).HSGetShader)(windows_core::Interface::as_raw(self), core::mem::transmute(pphullshader), ppclassinstances.unwrap_or(core::mem::zeroed()) as _, pnumclassinstances.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn HSGetSamplers(&self, startslot: u32, ppsamplers: Option<&mut [Option]>) { unsafe { (windows_core::Interface::vtable(self).HSGetSamplers)(windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppsamplers.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } @@ -8652,7 +8638,7 @@ impl ID3D11DeviceContext { unsafe { (windows_core::Interface::vtable(self).DSGetShaderResources)(windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppshaderresourceviews.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } } pub unsafe fn DSGetShader(&self, ppdomainshader: *mut Option, ppclassinstances: Option<*mut Option>, pnumclassinstances: Option<*mut u32>) { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).DSGetShader)(windows_core::Interface::as_raw(self), core::mem::transmute(ppdomainshader), ppclassinstances.unwrap_or(core::mem::zeroed()) as _, pnumclassinstances.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn DSGetSamplers(&self, startslot: u32, ppsamplers: Option<&mut [Option]>) { unsafe { (windows_core::Interface::vtable(self).DSGetSamplers)(windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppsamplers.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } @@ -8667,7 +8653,7 @@ impl ID3D11DeviceContext { unsafe { (windows_core::Interface::vtable(self).CSGetUnorderedAccessViews)(windows_core::Interface::as_raw(self), startslot, ppunorderedaccessviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppunorderedaccessviews.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } } pub unsafe fn CSGetShader(&self, ppcomputeshader: *mut Option, ppclassinstances: Option<*mut Option>, pnumclassinstances: Option<*mut u32>) { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).CSGetShader)(windows_core::Interface::as_raw(self), core::mem::transmute(ppcomputeshader), ppclassinstances.unwrap_or(core::mem::zeroed()) as _, pnumclassinstances.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn CSGetSamplers(&self, startslot: u32, ppsamplers: Option<&mut [Option]>) { unsafe { (windows_core::Interface::vtable(self).CSGetSamplers)(windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppsamplers.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } @@ -8688,7 +8674,7 @@ impl ID3D11DeviceContext { unsafe { (windows_core::Interface::vtable(self).GetContextFlags)(windows_core::Interface::as_raw(self)) } } pub unsafe fn FinishCommandList(&self, restoredeferredcontextstate: bool, ppcommandlist: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).FinishCommandList)(windows_core::Interface::as_raw(self), restoredeferredcontextstate.into(), core::mem::transmute(ppcommandlist.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).FinishCommandList)(windows_core::Interface::as_raw(self), restoredeferredcontextstate.into(), ppcommandlist.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -9716,13 +9702,13 @@ impl ID3D11DeviceContext1 { P0: windows_core::Param, P5: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CopySubresourceRegion1)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, dstx, dsty, dstz, psrcresource.param().abi(), srcsubresource, core::mem::transmute(psrcbox.unwrap_or(core::mem::zeroed())), copyflags) } + unsafe { (windows_core::Interface::vtable(self).CopySubresourceRegion1)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, dstx, dsty, dstz, psrcresource.param().abi(), srcsubresource, psrcbox.unwrap_or(core::mem::zeroed()) as _, 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, { - unsafe { (windows_core::Interface::vtable(self).UpdateSubresource1)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, core::mem::transmute(pdstbox.unwrap_or(core::mem::zeroed())), psrcdata, srcrowpitch, srcdepthpitch, copyflags) } + unsafe { (windows_core::Interface::vtable(self).UpdateSubresource1)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, pdstbox.unwrap_or(core::mem::zeroed()) as _, psrcdata, srcrowpitch, srcdepthpitch, copyflags) } } pub unsafe fn DiscardResource(&self, presource: P0) where @@ -9737,46 +9723,46 @@ impl ID3D11DeviceContext1 { unsafe { (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>) { - unsafe { (windows_core::Interface::vtable(self).VSSetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, 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()))) } + unsafe { (windows_core::Interface::vtable(self).VSSetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, ppconstantbuffers.unwrap_or(core::mem::zeroed()) as _, pfirstconstant.unwrap_or(core::mem::zeroed()) as _, pnumconstants.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn HSSetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: Option<*const Option>, pfirstconstant: Option<*const u32>, pnumconstants: Option<*const u32>) { - unsafe { (windows_core::Interface::vtable(self).HSSetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, 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()))) } + unsafe { (windows_core::Interface::vtable(self).HSSetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, ppconstantbuffers.unwrap_or(core::mem::zeroed()) as _, pfirstconstant.unwrap_or(core::mem::zeroed()) as _, pnumconstants.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn DSSetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: Option<*const Option>, pfirstconstant: Option<*const u32>, pnumconstants: Option<*const u32>) { - unsafe { (windows_core::Interface::vtable(self).DSSetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, 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()))) } + unsafe { (windows_core::Interface::vtable(self).DSSetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, ppconstantbuffers.unwrap_or(core::mem::zeroed()) as _, pfirstconstant.unwrap_or(core::mem::zeroed()) as _, pnumconstants.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn GSSetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: Option<*const Option>, pfirstconstant: Option<*const u32>, pnumconstants: Option<*const u32>) { - unsafe { (windows_core::Interface::vtable(self).GSSetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, 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()))) } + unsafe { (windows_core::Interface::vtable(self).GSSetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, ppconstantbuffers.unwrap_or(core::mem::zeroed()) as _, pfirstconstant.unwrap_or(core::mem::zeroed()) as _, pnumconstants.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn PSSetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: Option<*const Option>, pfirstconstant: Option<*const u32>, pnumconstants: Option<*const u32>) { - unsafe { (windows_core::Interface::vtable(self).PSSetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, 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()))) } + unsafe { (windows_core::Interface::vtable(self).PSSetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, ppconstantbuffers.unwrap_or(core::mem::zeroed()) as _, pfirstconstant.unwrap_or(core::mem::zeroed()) as _, pnumconstants.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn CSSetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: Option<*const Option>, pfirstconstant: Option<*const u32>, pnumconstants: Option<*const u32>) { - unsafe { (windows_core::Interface::vtable(self).CSSetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, 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()))) } + unsafe { (windows_core::Interface::vtable(self).CSSetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, ppconstantbuffers.unwrap_or(core::mem::zeroed()) as _, pfirstconstant.unwrap_or(core::mem::zeroed()) as _, pnumconstants.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn VSGetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: Option<*mut Option>, pfirstconstant: Option<*mut u32>, pnumconstants: Option<*mut u32>) { - unsafe { (windows_core::Interface::vtable(self).VSGetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, 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()))) } + unsafe { (windows_core::Interface::vtable(self).VSGetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, ppconstantbuffers.unwrap_or(core::mem::zeroed()) as _, pfirstconstant.unwrap_or(core::mem::zeroed()) as _, pnumconstants.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn HSGetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: Option<*mut Option>, pfirstconstant: Option<*mut u32>, pnumconstants: Option<*mut u32>) { - unsafe { (windows_core::Interface::vtable(self).HSGetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, 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()))) } + unsafe { (windows_core::Interface::vtable(self).HSGetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, ppconstantbuffers.unwrap_or(core::mem::zeroed()) as _, pfirstconstant.unwrap_or(core::mem::zeroed()) as _, pnumconstants.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn DSGetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: Option<*mut Option>, pfirstconstant: Option<*mut u32>, pnumconstants: Option<*mut u32>) { - unsafe { (windows_core::Interface::vtable(self).DSGetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, 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()))) } + unsafe { (windows_core::Interface::vtable(self).DSGetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, ppconstantbuffers.unwrap_or(core::mem::zeroed()) as _, pfirstconstant.unwrap_or(core::mem::zeroed()) as _, pnumconstants.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn GSGetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: Option<*mut Option>, pfirstconstant: Option<*mut u32>, pnumconstants: Option<*mut u32>) { - unsafe { (windows_core::Interface::vtable(self).GSGetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, 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()))) } + unsafe { (windows_core::Interface::vtable(self).GSGetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, ppconstantbuffers.unwrap_or(core::mem::zeroed()) as _, pfirstconstant.unwrap_or(core::mem::zeroed()) as _, pnumconstants.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn PSGetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: Option<*mut Option>, pfirstconstant: Option<*mut u32>, pnumconstants: Option<*mut u32>) { - unsafe { (windows_core::Interface::vtable(self).PSGetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, 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()))) } + unsafe { (windows_core::Interface::vtable(self).PSGetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, ppconstantbuffers.unwrap_or(core::mem::zeroed()) as _, pfirstconstant.unwrap_or(core::mem::zeroed()) as _, pnumconstants.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn CSGetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: Option<*mut Option>, pfirstconstant: Option<*mut u32>, pnumconstants: Option<*mut u32>) { - unsafe { (windows_core::Interface::vtable(self).CSGetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, 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()))) } + unsafe { (windows_core::Interface::vtable(self).CSGetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, ppconstantbuffers.unwrap_or(core::mem::zeroed()) as _, pfirstconstant.unwrap_or(core::mem::zeroed()) as _, pnumconstants.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn SwapDeviceContextState(&self, pstate: P0, pppreviousstate: Option<*mut Option>) where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SwapDeviceContextState)(windows_core::Interface::as_raw(self), pstate.param().abi(), core::mem::transmute(pppreviousstate.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).SwapDeviceContextState)(windows_core::Interface::as_raw(self), pstate.param().abi(), pppreviousstate.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn ClearView(&self, pview: P0, color: &[f32; 4], prect: Option<&[super::super::Foundation::RECT]>) where @@ -10000,22 +9986,7 @@ impl ID3D11DeviceContext2 { P0: windows_core::Param, P4: windows_core::Param, { - unsafe { - (windows_core::Interface::vtable(self).UpdateTileMappings)( - windows_core::Interface::as_raw(self), - ptiledresource.param().abi(), - numtiledresourceregions, - core::mem::transmute(ptiledresourceregionstartcoordinates.unwrap_or(core::mem::zeroed())), - core::mem::transmute(ptiledresourceregionsizes.unwrap_or(core::mem::zeroed())), - ptilepool.param().abi(), - numranges, - 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())), - flags, - ) - .ok() - } + unsafe { (windows_core::Interface::vtable(self).UpdateTileMappings)(windows_core::Interface::as_raw(self), ptiledresource.param().abi(), numtiledresourceregions, ptiledresourceregionstartcoordinates.unwrap_or(core::mem::zeroed()) as _, ptiledresourceregionsizes.unwrap_or(core::mem::zeroed()) as _, ptilepool.param().abi(), numranges, prangeflags.unwrap_or(core::mem::zeroed()) as _, ptilepoolstartoffsets.unwrap_or(core::mem::zeroed()) as _, prangetilecounts.unwrap_or(core::mem::zeroed()) as _, flags).ok() } } pub unsafe fn CopyTileMappings(&self, pdesttiledresource: P0, pdestregionstartcoordinate: *const D3D11_TILED_RESOURCE_COORDINATE, psourcetiledresource: P2, psourceregionstartcoordinate: *const D3D11_TILED_RESOURCE_COORDINATE, ptileregionsize: *const D3D11_TILE_REGION_SIZE, flags: u32) -> windows_core::Result<()> where @@ -10193,7 +10164,7 @@ 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: Option) { - unsafe { (windows_core::Interface::vtable(self).Flush1)(windows_core::Interface::as_raw(self), contexttype, core::mem::transmute(hevent.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).Flush1)(windows_core::Interface::as_raw(self), contexttype, hevent.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn SetHardwareProtectionState(&self, hwprotectionenable: bool) { unsafe { (windows_core::Interface::vtable(self).SetHardwareProtectionState)(windows_core::Interface::as_raw(self), hwprotectionenable.into()) } @@ -10357,7 +10328,7 @@ impl ID3D11Fence { { unsafe { 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::mem::zeroed())), dwaccess, lpname.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).CreateSharedHandle)(windows_core::Interface::as_raw(self), pattributes.unwrap_or(core::mem::zeroed()) as _, dwaccess, lpname.param().abi(), &mut result__).map(|| result__) } } pub unsafe fn GetCompletedValue(&self) -> u64 { @@ -10432,7 +10403,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).CreateModuleInstance)(windows_core::Interface::as_raw(self), core::mem::transmute(ppmoduleinstance), pperrorbuffer.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn SetInputSignature(&self, pinputparameters: &[D3D11_PARAMETER_DESC]) -> windows_core::Result { @@ -10477,7 +10448,7 @@ impl ID3D11FunctionLinkingGraph { } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetLastError(&self, pperrorbuffer: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLastError)(windows_core::Interface::as_raw(self), core::mem::transmute(pperrorbuffer.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLastError)(windows_core::Interface::as_raw(self), pperrorbuffer.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GenerateHlsl(&self, uflags: u32) -> windows_core::Result { @@ -10626,7 +10597,7 @@ windows_core::imp::define_interface!(ID3D11FunctionParameterReflection, ID3D11Fu impl ID3D11FunctionParameterReflection { #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetDesc(&self, pdesc: *mut D3D11_PARAMETER_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _).ok() } } } #[repr(C)] @@ -10675,7 +10646,7 @@ windows_core::imp::define_interface!(ID3D11FunctionReflection, ID3D11FunctionRef impl ID3D11FunctionReflection { #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetDesc(&self, pdesc: *mut D3D11_FUNCTION_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _).ok() } } pub unsafe fn GetConstantBufferByIndex(&self, bufferindex: u32) -> Option { unsafe { (windows_core::Interface::vtable(self).GetConstantBufferByIndex)(windows_core::Interface::as_raw(self), bufferindex) } @@ -10688,7 +10659,7 @@ impl ID3D11FunctionReflection { } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetResourceBindingDesc(&self, resourceindex: u32, pdesc: *mut D3D11_SHADER_INPUT_BIND_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetResourceBindingDesc)(windows_core::Interface::as_raw(self), resourceindex, core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetResourceBindingDesc)(windows_core::Interface::as_raw(self), resourceindex, pdesc as _).ok() } } pub unsafe fn GetVariableByName(&self, name: P0) -> Option where @@ -10701,7 +10672,7 @@ impl ID3D11FunctionReflection { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetResourceBindingDescByName)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetResourceBindingDescByName)(windows_core::Interface::as_raw(self), name.param().abi(), pdesc as _).ok() } } pub unsafe fn GetFunctionParameter(&self, parameterindex: i32) -> Option { unsafe { (windows_core::Interface::vtable(self).GetFunctionParameter)(windows_core::Interface::as_raw(self), parameterindex) } @@ -10875,7 +10846,7 @@ impl ID3D11InfoQueue { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).GetMessage)(windows_core::Interface::as_raw(self), messageindex, core::mem::transmute(pmessage.unwrap_or(core::mem::zeroed())), core::mem::transmute(pmessagebytelength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMessage)(windows_core::Interface::as_raw(self), messageindex, pmessage.unwrap_or(core::mem::zeroed()) as _, pmessagebytelength as _).ok() } } pub unsafe fn GetNumMessagesAllowedByStorageFilter(&self) -> u64 { unsafe { (windows_core::Interface::vtable(self).GetNumMessagesAllowedByStorageFilter)(windows_core::Interface::as_raw(self)) } @@ -10899,7 +10870,7 @@ impl ID3D11InfoQueue { unsafe { (windows_core::Interface::vtable(self).AddStorageFilterEntries)(windows_core::Interface::as_raw(self), pfilter).ok() } } pub unsafe fn GetStorageFilter(&self, pfilter: Option<*mut D3D11_INFO_QUEUE_FILTER>, pfilterbytelength: *mut usize) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetStorageFilter)(windows_core::Interface::as_raw(self), pfilter.unwrap_or(core::mem::zeroed()) as _, pfilterbytelength as _).ok() } } pub unsafe fn ClearStorageFilter(&self) { unsafe { (windows_core::Interface::vtable(self).ClearStorageFilter)(windows_core::Interface::as_raw(self)) } @@ -10923,7 +10894,7 @@ impl ID3D11InfoQueue { unsafe { (windows_core::Interface::vtable(self).AddRetrievalFilterEntries)(windows_core::Interface::as_raw(self), pfilter).ok() } } pub unsafe fn GetRetrievalFilter(&self, pfilter: Option<*mut D3D11_INFO_QUEUE_FILTER>, pfilterbytelength: *mut usize) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetRetrievalFilter)(windows_core::Interface::as_raw(self), pfilter.unwrap_or(core::mem::zeroed()) as _, pfilterbytelength as _).ok() } } pub unsafe fn ClearRetrievalFilter(&self) { unsafe { (windows_core::Interface::vtable(self).ClearRetrievalFilter)(windows_core::Interface::as_raw(self)) } @@ -11404,7 +11375,7 @@ impl ID3D11Linker { P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Link)(windows_core::Interface::as_raw(self), pentry.param().abi(), pentryname.param().abi(), ptargetname.param().abi(), uflags, core::mem::transmute(ppshaderblob), core::mem::transmute(pperrorbuffer.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Link)(windows_core::Interface::as_raw(self), pentry.param().abi(), pentryname.param().abi(), ptargetname.param().abi(), uflags, core::mem::transmute(ppshaderblob), pperrorbuffer.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn UseLibrary(&self, plibrarymi: P0) -> windows_core::Result<()> where @@ -11903,7 +11874,7 @@ impl core::ops::Deref for ID3D11RasterizerState { windows_core::imp::interface_hierarchy!(ID3D11RasterizerState, windows_core::IUnknown, ID3D11DeviceChild); impl ID3D11RasterizerState { pub unsafe fn GetDesc(&self, pdesc: *mut D3D11_RASTERIZER_DESC) { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _) } } } #[repr(C)] @@ -11941,7 +11912,7 @@ impl core::ops::Deref for ID3D11RasterizerState1 { windows_core::imp::interface_hierarchy!(ID3D11RasterizerState1, windows_core::IUnknown, ID3D11DeviceChild, ID3D11RasterizerState); impl ID3D11RasterizerState1 { pub unsafe fn GetDesc1(&self, pdesc: *mut D3D11_RASTERIZER_DESC1) { - unsafe { (windows_core::Interface::vtable(self).GetDesc1)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc1)(windows_core::Interface::as_raw(self), pdesc as _) } } } #[repr(C)] @@ -11979,7 +11950,7 @@ impl core::ops::Deref for ID3D11RasterizerState2 { windows_core::imp::interface_hierarchy!(ID3D11RasterizerState2, windows_core::IUnknown, ID3D11DeviceChild, ID3D11RasterizerState, ID3D11RasterizerState1); impl ID3D11RasterizerState2 { pub unsafe fn GetDesc2(&self, pdesc: *mut D3D11_RASTERIZER_DESC2) { - unsafe { (windows_core::Interface::vtable(self).GetDesc2)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc2)(windows_core::Interface::as_raw(self), pdesc as _) } } } #[repr(C)] @@ -12082,7 +12053,7 @@ windows_core::imp::interface_hierarchy!(ID3D11RenderTargetView, windows_core::IU impl ID3D11RenderTargetView { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetDesc(&self, pdesc: *mut D3D11_RENDER_TARGET_VIEW_DESC) { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _) } } } #[repr(C)] @@ -12129,7 +12100,7 @@ windows_core::imp::interface_hierarchy!(ID3D11RenderTargetView1, windows_core::I impl ID3D11RenderTargetView1 { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetDesc1(&self, pdesc1: *mut D3D11_RENDER_TARGET_VIEW_DESC1) { - unsafe { (windows_core::Interface::vtable(self).GetDesc1)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc1)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc1)(windows_core::Interface::as_raw(self), pdesc1 as _) } } } #[repr(C)] @@ -12244,7 +12215,7 @@ impl core::ops::Deref for ID3D11SamplerState { windows_core::imp::interface_hierarchy!(ID3D11SamplerState, windows_core::IUnknown, ID3D11DeviceChild); impl ID3D11SamplerState { pub unsafe fn GetDesc(&self, pdesc: *mut D3D11_SAMPLER_DESC) { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _) } } } #[repr(C)] @@ -12277,7 +12248,7 @@ windows_core::imp::interface_hierarchy!(ID3D11ShaderReflection, windows_core::IU impl ID3D11ShaderReflection { #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetDesc(&self, pdesc: *mut D3D11_SHADER_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _).ok() } } pub unsafe fn GetConstantBufferByIndex(&self, index: u32) -> Option { unsafe { (windows_core::Interface::vtable(self).GetConstantBufferByIndex)(windows_core::Interface::as_raw(self), index) } @@ -12290,19 +12261,19 @@ impl ID3D11ShaderReflection { } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetResourceBindingDesc(&self, resourceindex: u32, pdesc: *mut D3D11_SHADER_INPUT_BIND_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetResourceBindingDesc)(windows_core::Interface::as_raw(self), resourceindex, core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetResourceBindingDesc)(windows_core::Interface::as_raw(self), resourceindex, pdesc as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetInputParameterDesc(&self, parameterindex: u32, pdesc: *mut D3D11_SIGNATURE_PARAMETER_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInputParameterDesc)(windows_core::Interface::as_raw(self), parameterindex, core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInputParameterDesc)(windows_core::Interface::as_raw(self), parameterindex, pdesc as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetOutputParameterDesc(&self, parameterindex: u32, pdesc: *mut D3D11_SIGNATURE_PARAMETER_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOutputParameterDesc)(windows_core::Interface::as_raw(self), parameterindex, core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOutputParameterDesc)(windows_core::Interface::as_raw(self), parameterindex, pdesc as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetPatchConstantParameterDesc(&self, parameterindex: u32, pdesc: *mut D3D11_SIGNATURE_PARAMETER_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPatchConstantParameterDesc)(windows_core::Interface::as_raw(self), parameterindex, core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPatchConstantParameterDesc)(windows_core::Interface::as_raw(self), parameterindex, pdesc as _).ok() } } pub unsafe fn GetVariableByName(&self, name: P0) -> Option where @@ -12315,7 +12286,7 @@ impl ID3D11ShaderReflection { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetResourceBindingDescByName)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetResourceBindingDescByName)(windows_core::Interface::as_raw(self), name.param().abi(), pdesc as _).ok() } } pub unsafe fn GetMovInstructionCount(&self) -> u32 { unsafe { (windows_core::Interface::vtable(self).GetMovInstructionCount)(windows_core::Interface::as_raw(self)) } @@ -12347,7 +12318,7 @@ impl ID3D11ShaderReflection { } } pub unsafe fn GetThreadGroupSize(&self, psizex: Option<*mut u32>, psizey: Option<*mut u32>, psizez: Option<*mut u32>) -> u32 { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).GetThreadGroupSize)(windows_core::Interface::as_raw(self), psizex.unwrap_or(core::mem::zeroed()) as _, psizey.unwrap_or(core::mem::zeroed()) as _, psizez.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn GetRequiresFlags(&self) -> u64 { unsafe { (windows_core::Interface::vtable(self).GetRequiresFlags)(windows_core::Interface::as_raw(self)) } @@ -12582,7 +12553,7 @@ windows_core::imp::define_interface!(ID3D11ShaderReflectionConstantBuffer, ID3D1 impl ID3D11ShaderReflectionConstantBuffer { #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetDesc(&self, pdesc: *mut D3D11_SHADER_BUFFER_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _).ok() } } pub unsafe fn GetVariableByIndex(&self, index: u32) -> Option { unsafe { (windows_core::Interface::vtable(self).GetVariableByIndex)(windows_core::Interface::as_raw(self), index) } @@ -12658,7 +12629,7 @@ windows_core::imp::define_interface!(ID3D11ShaderReflectionType, ID3D11ShaderRef impl ID3D11ShaderReflectionType { #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetDesc(&self, pdesc: *mut D3D11_SHADER_TYPE_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _).ok() } } pub unsafe fn GetMemberTypeByIndex(&self, index: u32) -> Option { unsafe { (windows_core::Interface::vtable(self).GetMemberTypeByIndex)(windows_core::Interface::as_raw(self), index) } @@ -12850,7 +12821,7 @@ unsafe impl Sync for ID3D11ShaderReflectionType {} windows_core::imp::define_interface!(ID3D11ShaderReflectionVariable, ID3D11ShaderReflectionVariable_Vtbl); impl ID3D11ShaderReflectionVariable { pub unsafe fn GetDesc(&self, pdesc: *mut D3D11_SHADER_VARIABLE_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _).ok() } } pub unsafe fn GetType(&self) -> Option { unsafe { (windows_core::Interface::vtable(self).GetType)(windows_core::Interface::as_raw(self)) } @@ -12932,7 +12903,7 @@ windows_core::imp::interface_hierarchy!(ID3D11ShaderResourceView, windows_core:: impl ID3D11ShaderResourceView { #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] pub unsafe fn GetDesc(&self, pdesc: *mut D3D11_SHADER_RESOURCE_VIEW_DESC) { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _) } } } #[repr(C)] @@ -12979,7 +12950,7 @@ windows_core::imp::interface_hierarchy!(ID3D11ShaderResourceView1, windows_core: impl ID3D11ShaderResourceView1 { #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] pub unsafe fn GetDesc1(&self, pdesc1: *mut D3D11_SHADER_RESOURCE_VIEW_DESC1) { - unsafe { (windows_core::Interface::vtable(self).GetDesc1)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc1)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc1)(windows_core::Interface::as_raw(self), pdesc1 as _) } } } #[repr(C)] @@ -13019,28 +12990,28 @@ 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<()> { - unsafe { (windows_core::Interface::vtable(self).TraceReady)(windows_core::Interface::as_raw(self), core::mem::transmute(ptestcount.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).TraceReady)(windows_core::Interface::as_raw(self), ptestcount.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ResetTrace(&self) { unsafe { (windows_core::Interface::vtable(self).ResetTrace)(windows_core::Interface::as_raw(self)) } } pub unsafe fn GetTraceStats(&self, ptracestats: *mut D3D11_TRACE_STATS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTraceStats)(windows_core::Interface::as_raw(self), core::mem::transmute(ptracestats)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTraceStats)(windows_core::Interface::as_raw(self), ptracestats as _).ok() } } pub unsafe fn PSSelectStamp(&self, stampindex: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).PSSelectStamp)(windows_core::Interface::as_raw(self), stampindex).ok() } } pub unsafe fn GetInitialRegisterContents(&self, pregister: *const D3D11_TRACE_REGISTER, pvalue: *mut D3D11_TRACE_VALUE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInitialRegisterContents)(windows_core::Interface::as_raw(self), pregister, core::mem::transmute(pvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInitialRegisterContents)(windows_core::Interface::as_raw(self), pregister, pvalue as _).ok() } } pub unsafe fn GetStep(&self, stepindex: u32, ptracestep: *mut D3D11_TRACE_STEP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStep)(windows_core::Interface::as_raw(self), stepindex, core::mem::transmute(ptracestep)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStep)(windows_core::Interface::as_raw(self), stepindex, ptracestep as _).ok() } } pub unsafe fn GetWrittenRegister(&self, stepindex: u32, writtenregisterindex: u32, pregister: *mut D3D11_TRACE_REGISTER, pvalue: *mut D3D11_TRACE_VALUE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWrittenRegister)(windows_core::Interface::as_raw(self), stepindex, writtenregisterindex, core::mem::transmute(pregister), core::mem::transmute(pvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWrittenRegister)(windows_core::Interface::as_raw(self), stepindex, writtenregisterindex, pregister as _, pvalue as _).ok() } } pub unsafe fn GetReadRegister(&self, stepindex: u32, readregisterindex: u32, pregister: *mut D3D11_TRACE_REGISTER, pvalue: *mut D3D11_TRACE_VALUE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetReadRegister)(windows_core::Interface::as_raw(self), stepindex, readregisterindex, core::mem::transmute(pregister), core::mem::transmute(pvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetReadRegister)(windows_core::Interface::as_raw(self), stepindex, readregisterindex, pregister as _, pvalue as _).ok() } } } #[repr(C)] @@ -13236,7 +13207,7 @@ windows_core::imp::interface_hierarchy!(ID3D11Texture1D, windows_core::IUnknown, impl ID3D11Texture1D { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetDesc(&self, pdesc: *mut D3D11_TEXTURE1D_DESC) { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _) } } } #[repr(C)] @@ -13283,7 +13254,7 @@ windows_core::imp::interface_hierarchy!(ID3D11Texture2D, windows_core::IUnknown, impl ID3D11Texture2D { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetDesc(&self, pdesc: *mut D3D11_TEXTURE2D_DESC) { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _) } } } #[repr(C)] @@ -13330,7 +13301,7 @@ windows_core::imp::interface_hierarchy!(ID3D11Texture2D1, windows_core::IUnknown impl ID3D11Texture2D1 { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetDesc1(&self, pdesc: *mut D3D11_TEXTURE2D_DESC1) { - unsafe { (windows_core::Interface::vtable(self).GetDesc1)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc1)(windows_core::Interface::as_raw(self), pdesc as _) } } } #[repr(C)] @@ -13377,7 +13348,7 @@ windows_core::imp::interface_hierarchy!(ID3D11Texture3D, windows_core::IUnknown, impl ID3D11Texture3D { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetDesc(&self, pdesc: *mut D3D11_TEXTURE3D_DESC) { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _) } } } #[repr(C)] @@ -13424,7 +13395,7 @@ windows_core::imp::interface_hierarchy!(ID3D11Texture3D1, windows_core::IUnknown impl ID3D11Texture3D1 { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetDesc1(&self, pdesc: *mut D3D11_TEXTURE3D_DESC1) { - unsafe { (windows_core::Interface::vtable(self).GetDesc1)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc1)(windows_core::Interface::as_raw(self), pdesc as _) } } } #[repr(C)] @@ -13521,7 +13492,7 @@ windows_core::imp::interface_hierarchy!(ID3D11UnorderedAccessView, windows_core: impl ID3D11UnorderedAccessView { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetDesc(&self, pdesc: *mut D3D11_UNORDERED_ACCESS_VIEW_DESC) { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _) } } } #[repr(C)] @@ -13568,7 +13539,7 @@ windows_core::imp::interface_hierarchy!(ID3D11UnorderedAccessView1, windows_core impl ID3D11UnorderedAccessView1 { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetDesc1(&self, pdesc1: *mut D3D11_UNORDERED_ACCESS_VIEW_DESC1) { - unsafe { (windows_core::Interface::vtable(self).GetDesc1)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc1)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc1)(windows_core::Interface::as_raw(self), pdesc1 as _) } } } #[repr(C)] @@ -13641,7 +13612,7 @@ impl ID3D11VideoContext { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetDecoderBuffer)(windows_core::Interface::as_raw(self), pdecoder.param().abi(), r#type, core::mem::transmute(pbuffersize), core::mem::transmute(ppbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDecoderBuffer)(windows_core::Interface::as_raw(self), pdecoder.param().abi(), r#type, pbuffersize as _, ppbuffer as _).ok() } } pub unsafe fn ReleaseDecoderBuffer(&self, pdecoder: P0, r#type: D3D11_VIDEO_DECODER_BUFFER_TYPE) -> windows_core::Result<()> where @@ -13654,7 +13625,7 @@ impl ID3D11VideoContext { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DecoderBeginFrame)(windows_core::Interface::as_raw(self), pdecoder.param().abi(), pview.param().abi(), contentkeysize, core::mem::transmute(pcontentkey.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).DecoderBeginFrame)(windows_core::Interface::as_raw(self), pdecoder.param().abi(), pview.param().abi(), contentkeysize, pcontentkey.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn DecoderEndFrame(&self, pdecoder: P0) -> windows_core::Result<()> where @@ -13678,7 +13649,7 @@ impl ID3D11VideoContext { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).VideoProcessorSetOutputTargetRect)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), enable.into(), core::mem::transmute(prect.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).VideoProcessorSetOutputTargetRect)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), enable.into(), prect.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn VideoProcessorSetOutputBackgroundColor(&self, pvideoprocessor: P0, ycbcr: bool, pcolor: *const D3D11_VIDEO_COLOR) where @@ -13720,13 +13691,13 @@ impl ID3D11VideoContext { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetOutputTargetRect)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(enabled), core::mem::transmute(prect)) } + unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetOutputTargetRect)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), enabled as _, prect as _) } } pub unsafe fn VideoProcessorGetOutputBackgroundColor(&self, pvideoprocessor: P0, pycbcr: *mut super::super::Foundation::BOOL, pcolor: *mut D3D11_VIDEO_COLOR) where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetOutputBackgroundColor)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(pycbcr), core::mem::transmute(pcolor)) } + unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetOutputBackgroundColor)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), pycbcr as _, pcolor as _) } } pub unsafe fn VideoProcessorGetOutputColorSpace(&self, pvideoprocessor: P0) -> D3D11_VIDEO_PROCESSOR_COLOR_SPACE where @@ -13742,13 +13713,13 @@ impl ID3D11VideoContext { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetOutputAlphaFillMode)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(palphafillmode), core::mem::transmute(pstreamindex)) } + unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetOutputAlphaFillMode)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), palphafillmode as _, pstreamindex as _) } } pub unsafe fn VideoProcessorGetOutputConstriction(&self, pvideoprocessor: P0, penabled: *mut super::super::Foundation::BOOL, psize: *mut super::super::Foundation::SIZE) where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetOutputConstriction)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(penabled), core::mem::transmute(psize)) } + unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetOutputConstriction)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), penabled as _, psize as _) } } pub unsafe fn VideoProcessorGetOutputStereoMode(&self, pvideoprocessor: P0) -> super::super::Foundation::BOOL where @@ -13764,7 +13735,7 @@ impl ID3D11VideoContext { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetOutputExtension)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), pextensionguid, datasize, core::mem::transmute(pdata)) } + unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetOutputExtension)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), pextensionguid, datasize, pdata as _) } } pub unsafe fn VideoProcessorSetStreamFrameFormat(&self, pvideoprocessor: P0, streamindex: u32, frameformat: D3D11_VIDEO_FRAME_FORMAT) where @@ -13783,19 +13754,19 @@ impl ID3D11VideoContext { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).VideoProcessorSetStreamOutputRate)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, outputrate, repeatframe.into(), core::mem::transmute(pcustomrate.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).VideoProcessorSetStreamOutputRate)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, outputrate, repeatframe.into(), pcustomrate.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn VideoProcessorSetStreamSourceRect(&self, pvideoprocessor: P0, streamindex: u32, enable: bool, prect: Option<*const super::super::Foundation::RECT>) where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).VideoProcessorSetStreamSourceRect)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, enable.into(), core::mem::transmute(prect.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).VideoProcessorSetStreamSourceRect)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, enable.into(), prect.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn VideoProcessorSetStreamDestRect(&self, pvideoprocessor: P0, streamindex: u32, enable: bool, prect: Option<*const super::super::Foundation::RECT>) where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).VideoProcessorSetStreamDestRect)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, enable.into(), core::mem::transmute(prect.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).VideoProcessorSetStreamDestRect)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, enable.into(), prect.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn VideoProcessorSetStreamAlpha(&self, pvideoprocessor: P0, streamindex: u32, enable: bool, alpha: f32) where @@ -13814,7 +13785,7 @@ impl ID3D11VideoContext { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).VideoProcessorSetStreamPixelAspectRatio)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, enable.into(), core::mem::transmute(psourceaspectratio.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdestinationaspectratio.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).VideoProcessorSetStreamPixelAspectRatio)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, enable.into(), psourceaspectratio.unwrap_or(core::mem::zeroed()) as _, pdestinationaspectratio.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn VideoProcessorSetStreamLumaKey(&self, pvideoprocessor: P0, streamindex: u32, enable: bool, lower: f32, upper: f32) where @@ -13871,25 +13842,25 @@ impl ID3D11VideoContext { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetStreamOutputRate)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, core::mem::transmute(poutputrate), core::mem::transmute(prepeatframe), core::mem::transmute(pcustomrate)) } + unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetStreamOutputRate)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, poutputrate as _, prepeatframe as _, pcustomrate as _) } } pub unsafe fn VideoProcessorGetStreamSourceRect(&self, pvideoprocessor: P0, streamindex: u32, penabled: *mut super::super::Foundation::BOOL, prect: *mut super::super::Foundation::RECT) where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetStreamSourceRect)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, core::mem::transmute(penabled), core::mem::transmute(prect)) } + unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetStreamSourceRect)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, penabled as _, prect as _) } } pub unsafe fn VideoProcessorGetStreamDestRect(&self, pvideoprocessor: P0, streamindex: u32, penabled: *mut super::super::Foundation::BOOL, prect: *mut super::super::Foundation::RECT) where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetStreamDestRect)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, core::mem::transmute(penabled), core::mem::transmute(prect)) } + unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetStreamDestRect)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, penabled as _, prect as _) } } pub unsafe fn VideoProcessorGetStreamAlpha(&self, pvideoprocessor: P0, streamindex: u32, penabled: *mut super::super::Foundation::BOOL, palpha: *mut f32) where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetStreamAlpha)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, core::mem::transmute(penabled), core::mem::transmute(palpha)) } + unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetStreamAlpha)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, penabled as _, palpha as _) } } pub unsafe fn VideoProcessorGetStreamPalette(&self, pvideoprocessor: P0, streamindex: u32, pentries: &mut [u32]) where @@ -13902,19 +13873,19 @@ impl ID3D11VideoContext { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetStreamPixelAspectRatio)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, core::mem::transmute(penabled), core::mem::transmute(psourceaspectratio), core::mem::transmute(pdestinationaspectratio)) } + unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetStreamPixelAspectRatio)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, penabled as _, psourceaspectratio as _, pdestinationaspectratio as _) } } pub unsafe fn VideoProcessorGetStreamLumaKey(&self, pvideoprocessor: P0, streamindex: u32, penabled: *mut super::super::Foundation::BOOL, plower: *mut f32, pupper: *mut f32) where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetStreamLumaKey)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, core::mem::transmute(penabled), core::mem::transmute(plower), core::mem::transmute(pupper)) } + unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetStreamLumaKey)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, penabled as _, plower as _, pupper as _) } } pub unsafe fn VideoProcessorGetStreamStereoFormat(&self, pvideoprocessor: P0, streamindex: u32, penable: *mut super::super::Foundation::BOOL, pformat: *mut D3D11_VIDEO_PROCESSOR_STEREO_FORMAT, pleftviewframe0: *mut super::super::Foundation::BOOL, pbaseviewframe0: *mut super::super::Foundation::BOOL, pflipmode: *mut D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE, monooffset: *mut i32) where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetStreamStereoFormat)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, core::mem::transmute(penable), core::mem::transmute(pformat), core::mem::transmute(pleftviewframe0), core::mem::transmute(pbaseviewframe0), core::mem::transmute(pflipmode), core::mem::transmute(monooffset)) } + unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetStreamStereoFormat)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, penable as _, pformat as _, pleftviewframe0 as _, pbaseviewframe0 as _, pflipmode as _, monooffset as _) } } pub unsafe fn VideoProcessorGetStreamAutoProcessingMode(&self, pvideoprocessor: P0, streamindex: u32) -> super::super::Foundation::BOOL where @@ -13930,13 +13901,13 @@ impl ID3D11VideoContext { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetStreamFilter)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, filter, core::mem::transmute(penabled), core::mem::transmute(plevel)) } + unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetStreamFilter)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, filter, penabled as _, plevel as _) } } pub unsafe fn VideoProcessorGetStreamExtension(&self, pvideoprocessor: P0, streamindex: u32, pextensionguid: *const windows_core::GUID, datasize: u32, pdata: *mut core::ffi::c_void) -> i32 where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetStreamExtension)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, pextensionguid, datasize, core::mem::transmute(pdata)) } + unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetStreamExtension)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, pextensionguid, datasize, pdata as _) } } pub unsafe fn VideoProcessorBlt(&self, pvideoprocessor: P0, pview: P1, outputframe: u32, pstreams: &[D3D11_VIDEO_PROCESSOR_STREAM]) -> windows_core::Result<()> where @@ -13949,7 +13920,7 @@ impl ID3D11VideoContext { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).NegotiateCryptoSessionKeyExchange)(windows_core::Interface::as_raw(self), pcryptosession.param().abi(), datasize, core::mem::transmute(pdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).NegotiateCryptoSessionKeyExchange)(windows_core::Interface::as_raw(self), pcryptosession.param().abi(), datasize, pdata as _).ok() } } pub unsafe fn EncryptionBlt(&self, pcryptosession: P0, psrcsurface: P1, pdstsurface: P2, ivsize: u32, piv: Option<*mut core::ffi::c_void>) where @@ -13957,7 +13928,7 @@ impl ID3D11VideoContext { P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EncryptionBlt)(windows_core::Interface::as_raw(self), pcryptosession.param().abi(), psrcsurface.param().abi(), pdstsurface.param().abi(), ivsize, core::mem::transmute(piv.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).EncryptionBlt)(windows_core::Interface::as_raw(self), pcryptosession.param().abi(), psrcsurface.param().abi(), pdstsurface.param().abi(), ivsize, piv.unwrap_or(core::mem::zeroed()) as _) } } 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 @@ -13965,13 +13936,13 @@ impl ID3D11VideoContext { P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (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())), contentkeysize, core::mem::transmute(pcontentkey.unwrap_or(core::mem::zeroed())), ivsize, core::mem::transmute(piv.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).DecryptionBlt)(windows_core::Interface::as_raw(self), pcryptosession.param().abi(), psrcsurface.param().abi(), pdstsurface.param().abi(), pencryptedblockinfo.unwrap_or(core::mem::zeroed()) as _, contentkeysize, pcontentkey.unwrap_or(core::mem::zeroed()) as _, ivsize, piv.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn StartSessionKeyRefresh(&self, pcryptosession: P0, randomnumbersize: u32, prandomnumber: *mut core::ffi::c_void) where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).StartSessionKeyRefresh)(windows_core::Interface::as_raw(self), pcryptosession.param().abi(), randomnumbersize, core::mem::transmute(prandomnumber)) } + unsafe { (windows_core::Interface::vtable(self).StartSessionKeyRefresh)(windows_core::Interface::as_raw(self), pcryptosession.param().abi(), randomnumbersize, prandomnumber as _) } } pub unsafe fn FinishSessionKeyRefresh(&self, pcryptosession: P0) where @@ -13983,25 +13954,25 @@ impl ID3D11VideoContext { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetEncryptionBltKey)(windows_core::Interface::as_raw(self), pcryptosession.param().abi(), keysize, core::mem::transmute(preadbackkey)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEncryptionBltKey)(windows_core::Interface::as_raw(self), pcryptosession.param().abi(), keysize, preadbackkey as _).ok() } } pub unsafe fn NegotiateAuthenticatedChannelKeyExchange(&self, pchannel: P0, datasize: u32, pdata: *mut core::ffi::c_void) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).NegotiateAuthenticatedChannelKeyExchange)(windows_core::Interface::as_raw(self), pchannel.param().abi(), datasize, core::mem::transmute(pdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).NegotiateAuthenticatedChannelKeyExchange)(windows_core::Interface::as_raw(self), pchannel.param().abi(), datasize, pdata as _).ok() } } pub unsafe fn QueryAuthenticatedChannel(&self, pchannel: P0, inputsize: u32, pinput: *const core::ffi::c_void, outputsize: u32, poutput: *mut core::ffi::c_void) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).QueryAuthenticatedChannel)(windows_core::Interface::as_raw(self), pchannel.param().abi(), inputsize, pinput, outputsize, core::mem::transmute(poutput)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryAuthenticatedChannel)(windows_core::Interface::as_raw(self), pchannel.param().abi(), inputsize, pinput, outputsize, poutput as _).ok() } } pub unsafe fn ConfigureAuthenticatedChannel(&self, pchannel: P0, inputsize: u32, pinput: *const core::ffi::c_void, poutput: *mut D3D11_AUTHENTICATED_CONFIGURE_OUTPUT) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ConfigureAuthenticatedChannel)(windows_core::Interface::as_raw(self), pchannel.param().abi(), inputsize, pinput, core::mem::transmute(poutput)).ok() } + unsafe { (windows_core::Interface::vtable(self).ConfigureAuthenticatedChannel)(windows_core::Interface::as_raw(self), pchannel.param().abi(), inputsize, pinput, poutput as _).ok() } } pub unsafe fn VideoProcessorSetStreamRotation(&self, pvideoprocessor: P0, streamindex: u32, enable: bool, rotation: D3D11_VIDEO_PROCESSOR_ROTATION) where @@ -14013,7 +13984,7 @@ impl ID3D11VideoContext { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetStreamRotation)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, core::mem::transmute(penable), core::mem::transmute(protation)) } + unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetStreamRotation)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, penable as _, protation as _) } } } #[repr(C)] @@ -14683,7 +14654,7 @@ impl ID3D11VideoContext1 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetStreamMirror)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, core::mem::transmute(penable), core::mem::transmute(pfliphorizontal), core::mem::transmute(pflipvertical)) } + unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetStreamMirror)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, penable as _, pfliphorizontal as _, pflipvertical as _) } } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn VideoProcessorGetBehaviorHints(&self, pvideoprocessor: P0, outputwidth: u32, outputheight: u32, outputformat: super::Dxgi::Common::DXGI_FORMAT, pstreams: &[D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT]) -> windows_core::Result @@ -14899,28 +14870,28 @@ impl ID3D11VideoContext2 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).VideoProcessorSetOutputHDRMetaData)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), r#type, size, core::mem::transmute(phdrmetadata.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).VideoProcessorSetOutputHDRMetaData)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), r#type, size, phdrmetadata.unwrap_or(core::mem::zeroed()) as _) } } #[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, { - unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetOutputHDRMetaData)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(ptype), size, core::mem::transmute(pmetadata.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetOutputHDRMetaData)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), ptype as _, size, pmetadata.unwrap_or(core::mem::zeroed()) as _) } } #[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, { - unsafe { (windows_core::Interface::vtable(self).VideoProcessorSetStreamHDRMetaData)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, r#type, size, core::mem::transmute(phdrmetadata.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).VideoProcessorSetStreamHDRMetaData)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, r#type, size, phdrmetadata.unwrap_or(core::mem::zeroed()) as _) } } #[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, { - unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetStreamHDRMetaData)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, core::mem::transmute(ptype), size, core::mem::transmute(pmetadata.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).VideoProcessorGetStreamHDRMetaData)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, ptype as _, size, pmetadata.unwrap_or(core::mem::zeroed()) as _) } } } #[repr(C)] @@ -15009,7 +14980,7 @@ impl ID3D11VideoContext3 { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DecoderBeginFrame1)(windows_core::Interface::as_raw(self), pdecoder.param().abi(), pview.param().abi(), contentkeysize, core::mem::transmute(pcontentkey.unwrap_or(core::mem::zeroed())), numcomponenthistograms, core::mem::transmute(phistogramoffsets.unwrap_or(core::mem::zeroed())), core::mem::transmute(pphistogrambuffers.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).DecoderBeginFrame1)(windows_core::Interface::as_raw(self), pdecoder.param().abi(), pview.param().abi(), contentkeysize, pcontentkey.unwrap_or(core::mem::zeroed()) as _, numcomponenthistograms, phistogramoffsets.unwrap_or(core::mem::zeroed()) as _, pphistogrambuffers.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SubmitDecoderBuffers2(&self, pdecoder: P0, pbufferdesc: &[D3D11_VIDEO_DECODER_BUFFER_DESC2]) -> windows_core::Result<()> where @@ -15071,7 +15042,7 @@ windows_core::imp::interface_hierarchy!(ID3D11VideoDecoder, windows_core::IUnkno impl ID3D11VideoDecoder { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetCreationParameters(&self, pvideodesc: *mut D3D11_VIDEO_DECODER_DESC, pconfig: *mut D3D11_VIDEO_DECODER_CONFIG) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCreationParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(pvideodesc), core::mem::transmute(pconfig)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCreationParameters)(windows_core::Interface::as_raw(self), pvideodesc as _, pconfig as _).ok() } } pub unsafe fn GetDriverHandle(&self) -> windows_core::Result { unsafe { @@ -15141,7 +15112,7 @@ impl core::ops::Deref for ID3D11VideoDecoderOutputView { windows_core::imp::interface_hierarchy!(ID3D11VideoDecoderOutputView, windows_core::IUnknown, ID3D11DeviceChild, ID3D11View); impl ID3D11VideoDecoderOutputView { pub unsafe fn GetDesc(&self, pdesc: *mut D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC) { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _) } } } #[repr(C)] @@ -15197,28 +15168,28 @@ 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 { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateCryptoSession)(windows_core::Interface::as_raw(self), pcryptotype, core::mem::transmute(pdecoderprofile.unwrap_or(core::mem::zeroed())), pkeyexchangetype, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateCryptoSession)(windows_core::Interface::as_raw(self), pcryptotype, pdecoderprofile.unwrap_or(core::mem::zeroed()) as _, 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, { - unsafe { (windows_core::Interface::vtable(self).CreateVideoDecoderOutputView)(windows_core::Interface::as_raw(self), presource.param().abi(), pdesc, core::mem::transmute(ppvdovview.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateVideoDecoderOutputView)(windows_core::Interface::as_raw(self), presource.param().abi(), pdesc, ppvdovview.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).CreateVideoProcessorInputView)(windows_core::Interface::as_raw(self), presource.param().abi(), penum.param().abi(), pdesc, core::mem::transmute(ppvpiview.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateVideoProcessorInputView)(windows_core::Interface::as_raw(self), presource.param().abi(), penum.param().abi(), pdesc, ppvpiview.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).CreateVideoProcessorOutputView)(windows_core::Interface::as_raw(self), presource.param().abi(), penum.param().abi(), pdesc, core::mem::transmute(ppvpoview.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateVideoProcessorOutputView)(windows_core::Interface::as_raw(self), presource.param().abi(), penum.param().abi(), pdesc, ppvpoview.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateVideoProcessorEnumerator(&self, pdesc: *const D3D11_VIDEO_PROCESSOR_CONTENT_DESC) -> windows_core::Result { @@ -15252,19 +15223,19 @@ impl ID3D11VideoDevice { } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetVideoDecoderConfig(&self, pdesc: *const D3D11_VIDEO_DECODER_DESC, index: u32, pconfig: *mut D3D11_VIDEO_DECODER_CONFIG) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVideoDecoderConfig)(windows_core::Interface::as_raw(self), pdesc, index, core::mem::transmute(pconfig)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVideoDecoderConfig)(windows_core::Interface::as_raw(self), pdesc, index, pconfig as _).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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetContentProtectionCaps)(windows_core::Interface::as_raw(self), pcryptotype.unwrap_or(core::mem::zeroed()) as _, pdecoderprofile.unwrap_or(core::mem::zeroed()) as _, pcaps as _).ok() } } pub unsafe fn CheckCryptoKeyExchange(&self, pcryptotype: *const windows_core::GUID, pdecoderprofile: Option<*const windows_core::GUID>, index: u32) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CheckCryptoKeyExchange)(windows_core::Interface::as_raw(self), pcryptotype, core::mem::transmute(pdecoderprofile.unwrap_or(core::mem::zeroed())), index, &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).CheckCryptoKeyExchange)(windows_core::Interface::as_raw(self), pcryptotype, pdecoderprofile.unwrap_or(core::mem::zeroed()) as _, 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<()> { - unsafe { (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), guid, datasize, core::mem::transmute(pdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), guid, datasize, pdata.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, pdata: P1) -> windows_core::Result<()> where @@ -15529,18 +15500,18 @@ 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetCryptoSessionPrivateDataSize)(windows_core::Interface::as_raw(self), pcryptotype, core::mem::transmute(pdecoderprofile.unwrap_or(core::mem::zeroed())), pkeyexchangetype, core::mem::transmute(pprivateinputsize), core::mem::transmute(pprivateoutputsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCryptoSessionPrivateDataSize)(windows_core::Interface::as_raw(self), pcryptotype, pdecoderprofile.unwrap_or(core::mem::zeroed()) as _, pkeyexchangetype, pprivateinputsize as _, pprivateoutputsize as _).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 { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetVideoDecoderCaps)(windows_core::Interface::as_raw(self), pdecoderprofile, samplewidth, sampleheight, pframerate, bitrate, core::mem::transmute(pcryptotype.unwrap_or(core::mem::zeroed())), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetVideoDecoderCaps)(windows_core::Interface::as_raw(self), pdecoderprofile, samplewidth, sampleheight, pframerate, bitrate, pcryptotype.unwrap_or(core::mem::zeroed()) as _, &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<()> { - unsafe { (windows_core::Interface::vtable(self).CheckVideoDecoderDownsampling)(windows_core::Interface::as_raw(self), pinputdesc, inputcolorspace, pinputconfig, pframerate, poutputdesc, core::mem::transmute(psupported), core::mem::transmute(prealtimehint)).ok() } + unsafe { (windows_core::Interface::vtable(self).CheckVideoDecoderDownsampling)(windows_core::Interface::as_raw(self), pinputdesc, inputcolorspace, pinputconfig, pframerate, poutputdesc, psupported as _, prealtimehint as _).ok() } } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn RecommendVideoDecoderDownsampleParameters(&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) -> windows_core::Result { @@ -15641,13 +15612,13 @@ impl core::ops::Deref for ID3D11VideoDevice2 { windows_core::imp::interface_hierarchy!(ID3D11VideoDevice2, windows_core::IUnknown, ID3D11VideoDevice, ID3D11VideoDevice1); impl ID3D11VideoDevice2 { pub unsafe fn CheckFeatureSupport(&self, feature: D3D11_FEATURE_VIDEO, pfeaturesupportdata: *mut core::ffi::c_void, featuresupportdatasize: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CheckFeatureSupport)(windows_core::Interface::as_raw(self), feature, core::mem::transmute(pfeaturesupportdata), featuresupportdatasize).ok() } + unsafe { (windows_core::Interface::vtable(self).CheckFeatureSupport)(windows_core::Interface::as_raw(self), feature, pfeaturesupportdata as _, featuresupportdatasize).ok() } } pub unsafe fn NegotiateCryptoSessionKeyExchangeMT(&self, pcryptosession: P0, flags: D3D11_CRYPTO_SESSION_KEY_EXCHANGE_FLAGS, datasize: u32, pdata: *mut core::ffi::c_void) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).NegotiateCryptoSessionKeyExchangeMT)(windows_core::Interface::as_raw(self), pcryptosession.param().abi(), flags, datasize, core::mem::transmute(pdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).NegotiateCryptoSessionKeyExchangeMT)(windows_core::Interface::as_raw(self), pcryptosession.param().abi(), flags, datasize, pdata as _).ok() } } } #[repr(C)] @@ -15703,10 +15674,10 @@ windows_core::imp::interface_hierarchy!(ID3D11VideoProcessor, windows_core::IUnk impl ID3D11VideoProcessor { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetContentDesc(&self, pdesc: *mut D3D11_VIDEO_PROCESSOR_CONTENT_DESC) { - unsafe { (windows_core::Interface::vtable(self).GetContentDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } + unsafe { (windows_core::Interface::vtable(self).GetContentDesc)(windows_core::Interface::as_raw(self), pdesc as _) } } pub unsafe fn GetRateConversionCaps(&self, pcaps: *mut D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS) { - unsafe { (windows_core::Interface::vtable(self).GetRateConversionCaps)(windows_core::Interface::as_raw(self), core::mem::transmute(pcaps)) } + unsafe { (windows_core::Interface::vtable(self).GetRateConversionCaps)(windows_core::Interface::as_raw(self), pcaps as _) } } } #[repr(C)] @@ -15765,7 +15736,7 @@ windows_core::imp::interface_hierarchy!(ID3D11VideoProcessorEnumerator, windows_ impl ID3D11VideoProcessorEnumerator { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetVideoProcessorContentDesc(&self, pcontentdesc: *mut D3D11_VIDEO_PROCESSOR_CONTENT_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorContentDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pcontentdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorContentDesc)(windows_core::Interface::as_raw(self), pcontentdesc as _).ok() } } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CheckVideoProcessorFormat(&self, format: super::Dxgi::Common::DXGI_FORMAT) -> windows_core::Result { @@ -15775,14 +15746,14 @@ impl ID3D11VideoProcessorEnumerator { } } pub unsafe fn GetVideoProcessorCaps(&self, pcaps: *mut D3D11_VIDEO_PROCESSOR_CAPS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorCaps)(windows_core::Interface::as_raw(self), core::mem::transmute(pcaps)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorCaps)(windows_core::Interface::as_raw(self), pcaps as _).ok() } } pub unsafe fn GetVideoProcessorRateConversionCaps(&self, typeindex: u32, pcaps: *mut D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorRateConversionCaps)(windows_core::Interface::as_raw(self), typeindex, core::mem::transmute(pcaps)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorRateConversionCaps)(windows_core::Interface::as_raw(self), typeindex, pcaps as _).ok() } } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetVideoProcessorCustomRate(&self, typeindex: u32, customrateindex: u32, prate: *mut D3D11_VIDEO_PROCESSOR_CUSTOM_RATE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorCustomRate)(windows_core::Interface::as_raw(self), typeindex, customrateindex, core::mem::transmute(prate)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorCustomRate)(windows_core::Interface::as_raw(self), typeindex, customrateindex, prate as _).ok() } } pub unsafe fn GetVideoProcessorFilterRange(&self, filter: D3D11_VIDEO_PROCESSOR_FILTER) -> windows_core::Result { unsafe { 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 392bd350d7..f8ece7201e 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11on12/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11on12/mod.rs @@ -14,9 +14,9 @@ where core::mem::transmute(ppcommandqueues.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ppcommandqueues.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), nodemask, - core::mem::transmute(ppdevice.unwrap_or(core::mem::zeroed())), - core::mem::transmute(ppimmediatecontext.unwrap_or(core::mem::zeroed())), - core::mem::transmute(pchosenfeaturelevel.unwrap_or(core::mem::zeroed())), + ppdevice.unwrap_or(core::mem::zeroed()) as _, + ppimmediatecontext.unwrap_or(core::mem::zeroed()) as _, + pchosenfeaturelevel.unwrap_or(core::mem::zeroed()) as _, ) .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 5cebf87c27..46161e669e 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D12/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D12/mod.rs @@ -11,17 +11,17 @@ where #[inline] pub unsafe fn D3D12CreateRootSignatureDeserializer(psrcdata: *const core::ffi::c_void, srcdatasizeinbytes: usize, prootsignaturedeserializerinterface: *const windows_core::GUID, pprootsignaturedeserializer: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("d3d12.dll" "system" fn D3D12CreateRootSignatureDeserializer(psrcdata : *const core::ffi::c_void, srcdatasizeinbytes : usize, prootsignaturedeserializerinterface : *const windows_core::GUID, pprootsignaturedeserializer : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { D3D12CreateRootSignatureDeserializer(psrcdata, srcdatasizeinbytes, prootsignaturedeserializerinterface, core::mem::transmute(pprootsignaturedeserializer)).ok() } + unsafe { D3D12CreateRootSignatureDeserializer(psrcdata, srcdatasizeinbytes, prootsignaturedeserializerinterface, pprootsignaturedeserializer as _).ok() } } #[inline] pub unsafe fn D3D12CreateVersionedRootSignatureDeserializer(psrcdata: *const core::ffi::c_void, srcdatasizeinbytes: usize, prootsignaturedeserializerinterface: *const windows_core::GUID, pprootsignaturedeserializer: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("d3d12.dll" "system" fn D3D12CreateVersionedRootSignatureDeserializer(psrcdata : *const core::ffi::c_void, srcdatasizeinbytes : usize, prootsignaturedeserializerinterface : *const windows_core::GUID, pprootsignaturedeserializer : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { D3D12CreateVersionedRootSignatureDeserializer(psrcdata, srcdatasizeinbytes, prootsignaturedeserializerinterface, core::mem::transmute(pprootsignaturedeserializer)).ok() } + unsafe { D3D12CreateVersionedRootSignatureDeserializer(psrcdata, srcdatasizeinbytes, prootsignaturedeserializerinterface, pprootsignaturedeserializer as _).ok() } } #[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); - unsafe { D3D12EnableExperimentalFeatures(numfeatures, piids, core::mem::transmute(pconfigurationstructs.unwrap_or(core::mem::zeroed())), core::mem::transmute(pconfigurationstructsizes.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { D3D12EnableExperimentalFeatures(numfeatures, piids, pconfigurationstructs.unwrap_or(core::mem::zeroed()) as _, pconfigurationstructsizes.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { D3D12SerializeRootSignature(prootsignature, version, core::mem::transmute(ppblob), core::mem::transmute(pperrorblob.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { D3D12SerializeRootSignature(prootsignature, version, core::mem::transmute(ppblob), pperrorblob.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { D3D12SerializeVersionedRootSignature(prootsignature, core::mem::transmute(ppblob), core::mem::transmute(pperrorblob.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { D3D12SerializeVersionedRootSignature(prootsignature, core::mem::transmute(ppblob), pperrorblob.unwrap_or(core::mem::zeroed()) as _).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); @@ -9261,21 +9261,7 @@ impl ID3D12CommandQueue { P0: windows_core::Param, P4: windows_core::Param, { - unsafe { - (windows_core::Interface::vtable(self).UpdateTileMappings)( - windows_core::Interface::as_raw(self), - presource.param().abi(), - numresourceregions, - core::mem::transmute(presourceregionstartcoordinates.unwrap_or(core::mem::zeroed())), - core::mem::transmute(presourceregionsizes.unwrap_or(core::mem::zeroed())), - pheap.param().abi(), - numranges, - 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())), - flags, - ) - } + unsafe { (windows_core::Interface::vtable(self).UpdateTileMappings)(windows_core::Interface::as_raw(self), presource.param().abi(), numresourceregions, presourceregionstartcoordinates.unwrap_or(core::mem::zeroed()) as _, presourceregionsizes.unwrap_or(core::mem::zeroed()) as _, pheap.param().abi(), numranges, prangeflags.unwrap_or(core::mem::zeroed()) as _, pheaprangestartoffsets.unwrap_or(core::mem::zeroed()) as _, prangetilecounts.unwrap_or(core::mem::zeroed()) as _, flags) } } pub unsafe fn CopyTileMappings(&self, pdstresource: P0, pdstregionstartcoordinate: *const D3D12_TILED_RESOURCE_COORDINATE, psrcresource: P2, psrcregionstartcoordinate: *const D3D12_TILED_RESOURCE_COORDINATE, pregionsize: *const D3D12_TILE_REGION_SIZE, flags: D3D12_TILE_MAPPING_FLAGS) where @@ -9288,10 +9274,10 @@ impl ID3D12CommandQueue { unsafe { (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) { - unsafe { (windows_core::Interface::vtable(self).SetMarker)(windows_core::Interface::as_raw(self), metadata, core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), size) } + unsafe { (windows_core::Interface::vtable(self).SetMarker)(windows_core::Interface::as_raw(self), metadata, pdata.unwrap_or(core::mem::zeroed()) as _, size) } } pub unsafe fn BeginEvent(&self, metadata: u32, pdata: Option<*const core::ffi::c_void>, size: u32) { - unsafe { (windows_core::Interface::vtable(self).BeginEvent)(windows_core::Interface::as_raw(self), metadata, core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), size) } + unsafe { (windows_core::Interface::vtable(self).BeginEvent)(windows_core::Interface::as_raw(self), metadata, pdata.unwrap_or(core::mem::zeroed()) as _, size) } } pub unsafe fn EndEvent(&self) { unsafe { (windows_core::Interface::vtable(self).EndEvent)(windows_core::Interface::as_raw(self)) } @@ -9315,7 +9301,7 @@ impl ID3D12CommandQueue { } } pub unsafe fn GetClockCalibration(&self, pgputimestamp: *mut u64, pcputimestamp: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClockCalibration)(windows_core::Interface::as_raw(self), core::mem::transmute(pgputimestamp), core::mem::transmute(pcputimestamp)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClockCalibration)(windows_core::Interface::as_raw(self), pgputimestamp as _, pcputimestamp as _).ok() } } pub unsafe fn GetDesc(&self) -> D3D12_COMMAND_QUEUE_DESC { unsafe { @@ -9850,7 +9836,7 @@ impl ID3D12DebugCommandList1 { unsafe { (windows_core::Interface::vtable(self).SetDebugParameter)(windows_core::Interface::as_raw(self), r#type, pdata, datasize).ok() } } pub unsafe fn GetDebugParameter(&self, r#type: D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE, pdata: *mut core::ffi::c_void, datasize: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDebugParameter)(windows_core::Interface::as_raw(self), r#type, core::mem::transmute(pdata), datasize).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDebugParameter)(windows_core::Interface::as_raw(self), r#type, pdata as _, datasize).ok() } } } #[repr(C)] @@ -9912,7 +9898,7 @@ impl ID3D12DebugCommandList2 { unsafe { (windows_core::Interface::vtable(self).SetDebugParameter)(windows_core::Interface::as_raw(self), r#type, pdata, datasize).ok() } } pub unsafe fn GetDebugParameter(&self, r#type: D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE, pdata: *mut core::ffi::c_void, datasize: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDebugParameter)(windows_core::Interface::as_raw(self), r#type, core::mem::transmute(pdata), datasize).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDebugParameter)(windows_core::Interface::as_raw(self), r#type, pdata as _, datasize).ok() } } } #[repr(C)] @@ -10171,7 +10157,7 @@ impl ID3D12DebugDevice1 { unsafe { (windows_core::Interface::vtable(self).SetDebugParameter)(windows_core::Interface::as_raw(self), r#type, pdata, datasize).ok() } } pub unsafe fn GetDebugParameter(&self, r#type: D3D12_DEBUG_DEVICE_PARAMETER_TYPE, pdata: *mut core::ffi::c_void, datasize: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDebugParameter)(windows_core::Interface::as_raw(self), r#type, core::mem::transmute(pdata), datasize).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDebugParameter)(windows_core::Interface::as_raw(self), r#type, pdata as _, datasize).ok() } } pub unsafe fn ReportLiveDeviceObjects(&self, flags: D3D12_RLDO_FLAGS) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ReportLiveDeviceObjects)(windows_core::Interface::as_raw(self), flags).ok() } @@ -10236,7 +10222,7 @@ impl ID3D12DebugDevice2 { unsafe { (windows_core::Interface::vtable(self).SetDebugParameter)(windows_core::Interface::as_raw(self), r#type, pdata, datasize).ok() } } pub unsafe fn GetDebugParameter(&self, r#type: D3D12_DEBUG_DEVICE_PARAMETER_TYPE, pdata: *mut core::ffi::c_void, datasize: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDebugParameter)(windows_core::Interface::as_raw(self), r#type, core::mem::transmute(pdata), datasize).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDebugParameter)(windows_core::Interface::as_raw(self), r#type, pdata as _, datasize).ok() } } } #[repr(C)] @@ -10404,7 +10390,7 @@ impl ID3D12Device { unsafe { (windows_core::Interface::vtable(self).CreateCommandList)(windows_core::Interface::as_raw(self), nodemask, r#type, pcommandallocator.param().abi(), pinitialstate.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn CheckFeatureSupport(&self, feature: D3D12_FEATURE, pfeaturesupportdata: *mut core::ffi::c_void, featuresupportdatasize: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CheckFeatureSupport)(windows_core::Interface::as_raw(self), feature, core::mem::transmute(pfeaturesupportdata), featuresupportdatasize).ok() } + unsafe { (windows_core::Interface::vtable(self).CheckFeatureSupport)(windows_core::Interface::as_raw(self), feature, pfeaturesupportdata as _, featuresupportdatasize).ok() } } pub unsafe fn CreateDescriptorHeap(&self, pdescriptorheapdesc: *const D3D12_DESCRIPTOR_HEAP_DESC) -> windows_core::Result where @@ -10424,14 +10410,14 @@ impl ID3D12Device { unsafe { (windows_core::Interface::vtable(self).CreateRootSignature)(windows_core::Interface::as_raw(self), nodemask, core::mem::transmute(pblobwithrootsignature.as_ptr()), pblobwithrootsignature.len().try_into().unwrap(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn CreateConstantBufferView(&self, pdesc: Option<*const D3D12_CONSTANT_BUFFER_VIEW_DESC>, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) { - unsafe { (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)) } + unsafe { (windows_core::Interface::vtable(self).CreateConstantBufferView)(windows_core::Interface::as_raw(self), pdesc.unwrap_or(core::mem::zeroed()) as _, 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, { - unsafe { (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)) } + unsafe { (windows_core::Interface::vtable(self).CreateShaderResourceView)(windows_core::Interface::as_raw(self), presource.param().abi(), pdesc.unwrap_or(core::mem::zeroed()) as _, 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) @@ -10439,27 +10425,27 @@ impl ID3D12Device { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (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)) } + unsafe { (windows_core::Interface::vtable(self).CreateUnorderedAccessView)(windows_core::Interface::as_raw(self), presource.param().abi(), pcounterresource.param().abi(), pdesc.unwrap_or(core::mem::zeroed()) as _, 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, { - unsafe { (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)) } + unsafe { (windows_core::Interface::vtable(self).CreateRenderTargetView)(windows_core::Interface::as_raw(self), presource.param().abi(), pdesc.unwrap_or(core::mem::zeroed()) as _, 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, { - unsafe { (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)) } + unsafe { (windows_core::Interface::vtable(self).CreateDepthStencilView)(windows_core::Interface::as_raw(self), presource.param().abi(), pdesc.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(destdescriptor)) } } pub unsafe fn CreateSampler(&self, pdesc: *const D3D12_SAMPLER_DESC, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) { unsafe { (windows_core::Interface::vtable(self).CreateSampler)(windows_core::Interface::as_raw(self), pdesc, core::mem::transmute(destdescriptor)) } } pub unsafe fn CopyDescriptors(&self, numdestdescriptorranges: u32, pdestdescriptorrangestarts: *const D3D12_CPU_DESCRIPTOR_HANDLE, pdestdescriptorrangesizes: Option<*const u32>, numsrcdescriptorranges: u32, psrcdescriptorrangestarts: *const D3D12_CPU_DESCRIPTOR_HANDLE, psrcdescriptorrangesizes: Option<*const u32>, descriptorheapstype: D3D12_DESCRIPTOR_HEAP_TYPE) { - unsafe { (windows_core::Interface::vtable(self).CopyDescriptors)(windows_core::Interface::as_raw(self), numdestdescriptorranges, pdestdescriptorrangestarts, core::mem::transmute(pdestdescriptorrangesizes.unwrap_or(core::mem::zeroed())), numsrcdescriptorranges, psrcdescriptorrangestarts, core::mem::transmute(psrcdescriptorrangesizes.unwrap_or(core::mem::zeroed())), descriptorheapstype) } + unsafe { (windows_core::Interface::vtable(self).CopyDescriptors)(windows_core::Interface::as_raw(self), numdestdescriptorranges, pdestdescriptorrangestarts, pdestdescriptorrangesizes.unwrap_or(core::mem::zeroed()) as _, numsrcdescriptorranges, psrcdescriptorrangestarts, psrcdescriptorrangesizes.unwrap_or(core::mem::zeroed()) as _, descriptorheapstype) } } pub unsafe fn CopyDescriptorsSimple(&self, numdescriptors: u32, destdescriptorrangestart: D3D12_CPU_DESCRIPTOR_HANDLE, srcdescriptorrangestart: D3D12_CPU_DESCRIPTOR_HANDLE, descriptorheapstype: D3D12_DESCRIPTOR_HEAP_TYPE) { unsafe { (windows_core::Interface::vtable(self).CopyDescriptorsSimple)(windows_core::Interface::as_raw(self), numdescriptors, core::mem::transmute(destdescriptorrangestart), core::mem::transmute(srcdescriptorrangestart), descriptorheapstype) } @@ -10484,7 +10470,7 @@ impl ID3D12Device { where T: windows_core::Interface, { - unsafe { (windows_core::Interface::vtable(self).CreateCommittedResource)(windows_core::Interface::as_raw(self), pheapproperties, heapflags, pdesc, initialresourcestate, core::mem::transmute(poptimizedclearvalue.unwrap_or(core::mem::zeroed())), &T::IID, result__ as *mut _ as *mut _).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateCommittedResource)(windows_core::Interface::as_raw(self), pheapproperties, heapflags, pdesc, initialresourcestate, poptimizedclearvalue.unwrap_or(core::mem::zeroed()) as _, &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 @@ -10498,14 +10484,14 @@ impl ID3D12Device { P0: windows_core::Param, T: windows_core::Interface, { - unsafe { (windows_core::Interface::vtable(self).CreatePlacedResource)(windows_core::Interface::as_raw(self), pheap.param().abi(), heapoffset, pdesc, initialstate, core::mem::transmute(poptimizedclearvalue.unwrap_or(core::mem::zeroed())), &T::IID, result__ as *mut _ as *mut _).ok() } + unsafe { (windows_core::Interface::vtable(self).CreatePlacedResource)(windows_core::Interface::as_raw(self), pheap.param().abi(), heapoffset, pdesc, initialstate, poptimizedclearvalue.unwrap_or(core::mem::zeroed()) as _, &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, { - unsafe { (windows_core::Interface::vtable(self).CreateReservedResource)(windows_core::Interface::as_raw(self), pdesc, initialstate, core::mem::transmute(poptimizedclearvalue.unwrap_or(core::mem::zeroed())), &T::IID, result__ as *mut _ as *mut _).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateReservedResource)(windows_core::Interface::as_raw(self), pdesc, initialstate, poptimizedclearvalue.unwrap_or(core::mem::zeroed()) as _, &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 @@ -10515,7 +10501,7 @@ impl ID3D12Device { { unsafe { 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::mem::zeroed())), access, name.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).CreateSharedHandle)(windows_core::Interface::as_raw(self), pobject.param().abi(), pattributes.unwrap_or(core::mem::zeroed()) as _, access, name.param().abi(), &mut result__).map(|| result__) } } pub unsafe fn OpenSharedHandle(&self, nthandle: super::super::Foundation::HANDLE, result__: *mut Option) -> windows_core::Result<()> @@ -10551,7 +10537,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>) { - unsafe { (windows_core::Interface::vtable(self).GetCopyableFootprints)(windows_core::Interface::as_raw(self), presourcedesc, firstsubresource, numsubresources, 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()))) } + unsafe { (windows_core::Interface::vtable(self).GetCopyableFootprints)(windows_core::Interface::as_raw(self), presourcedesc, firstsubresource, numsubresources, baseoffset, playouts.unwrap_or(core::mem::zeroed()) as _, pnumrows.unwrap_or(core::mem::zeroed()) as _, prowsizeinbytes.unwrap_or(core::mem::zeroed()) as _, ptotalbytes.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn CreateQueryHeap(&self, pdesc: *const D3D12_QUERY_HEAP_DESC, result__: *mut Option) -> windows_core::Result<()> where @@ -10573,7 +10559,7 @@ impl ID3D12Device { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetResourceTiling)(windows_core::Interface::as_raw(self), ptiledresource.param().abi(), 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())), firstsubresourcetilingtoget, core::mem::transmute(psubresourcetilingsfornonpackedmips)) } + unsafe { (windows_core::Interface::vtable(self).GetResourceTiling)(windows_core::Interface::as_raw(self), ptiledresource.param().abi(), pnumtilesforentireresource.unwrap_or(core::mem::zeroed()) as _, ppackedmipdesc.unwrap_or(core::mem::zeroed()) as _, pstandardtileshapefornonpackedmips.unwrap_or(core::mem::zeroed()) as _, pnumsubresourcetilings.unwrap_or(core::mem::zeroed()) as _, firstsubresourcetilingtoget, psubresourcetilingsfornonpackedmips as _) } } pub unsafe fn GetAdapterLuid(&self) -> super::super::Foundation::LUID { unsafe { @@ -11074,7 +11060,7 @@ impl ID3D12Device10 { P5: windows_core::Param, T: windows_core::Interface, { - unsafe { (windows_core::Interface::vtable(self).CreateCommittedResource3)(windows_core::Interface::as_raw(self), pheapproperties, heapflags, pdesc, 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() } + unsafe { (windows_core::Interface::vtable(self).CreateCommittedResource3)(windows_core::Interface::as_raw(self), pheapproperties, heapflags, pdesc, initiallayout, poptimizedclearvalue.unwrap_or(core::mem::zeroed()) as _, pprotectedsession.param().abi(), pcastableformats.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcastableformats.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), &T::IID, result__ as *mut _ as *mut _).ok() } } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreatePlacedResource2(&self, pheap: P0, heapoffset: u64, pdesc: *const D3D12_RESOURCE_DESC1, initiallayout: D3D12_BARRIER_LAYOUT, poptimizedclearvalue: Option<*const D3D12_CLEAR_VALUE>, pcastableformats: Option<&[super::Dxgi::Common::DXGI_FORMAT]>, result__: *mut Option) -> windows_core::Result<()> @@ -11082,7 +11068,7 @@ impl ID3D12Device10 { P0: windows_core::Param, T: windows_core::Interface, { - unsafe { (windows_core::Interface::vtable(self).CreatePlacedResource2)(windows_core::Interface::as_raw(self), pheap.param().abi(), heapoffset, pdesc, initiallayout, core::mem::transmute(poptimizedclearvalue.unwrap_or(core::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() } + unsafe { (windows_core::Interface::vtable(self).CreatePlacedResource2)(windows_core::Interface::as_raw(self), pheap.param().abi(), heapoffset, pdesc, initiallayout, poptimizedclearvalue.unwrap_or(core::mem::zeroed()) as _, 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<()> @@ -11090,7 +11076,7 @@ impl ID3D12Device10 { P3: windows_core::Param, T: windows_core::Interface, { - unsafe { (windows_core::Interface::vtable(self).CreateReservedResource2)(windows_core::Interface::as_raw(self), pdesc, 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() } + unsafe { (windows_core::Interface::vtable(self).CreateReservedResource2)(windows_core::Interface::as_raw(self), pdesc, initiallayout, poptimizedclearvalue.unwrap_or(core::mem::zeroed()) as _, 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)] @@ -11209,7 +11195,7 @@ impl ID3D12Device12 { 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 { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetResourceAllocationInfo3)(windows_core::Interface::as_raw(self), &mut result__, visiblemask, numresourcedescs, presourcedescs, core::mem::transmute(pnumcastableformats.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppcastableformats.unwrap_or(core::mem::zeroed())), core::mem::transmute(presourceallocationinfo1.unwrap_or(core::mem::zeroed()))); + (windows_core::Interface::vtable(self).GetResourceAllocationInfo3)(windows_core::Interface::as_raw(self), &mut result__, visiblemask, numresourcedescs, presourcedescs, pnumcastableformats.unwrap_or(core::mem::zeroed()) as _, ppcastableformats.unwrap_or(core::mem::zeroed()) as _, presourceallocationinfo1.unwrap_or(core::mem::zeroed()) as _); result__ } } @@ -11544,7 +11530,7 @@ impl ID3D12Device4 { P5: windows_core::Param, T: windows_core::Interface, { - unsafe { (windows_core::Interface::vtable(self).CreateCommittedResource1)(windows_core::Interface::as_raw(self), pheapproperties, heapflags, pdesc, initialresourcestate, core::mem::transmute(poptimizedclearvalue.unwrap_or(core::mem::zeroed())), pprotectedsession.param().abi(), &T::IID, result__ as *mut _ as *mut _).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateCommittedResource1)(windows_core::Interface::as_raw(self), pheapproperties, heapflags, pdesc, initialresourcestate, poptimizedclearvalue.unwrap_or(core::mem::zeroed()) as _, 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 @@ -11559,13 +11545,13 @@ impl ID3D12Device4 { P3: windows_core::Param, T: windows_core::Interface, { - unsafe { (windows_core::Interface::vtable(self).CreateReservedResource1)(windows_core::Interface::as_raw(self), pdesc, initialstate, core::mem::transmute(poptimizedclearvalue.unwrap_or(core::mem::zeroed())), pprotectedsession.param().abi(), &T::IID, result__ as *mut _ as *mut _).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateReservedResource1)(windows_core::Interface::as_raw(self), pdesc, initialstate, poptimizedclearvalue.unwrap_or(core::mem::zeroed()) as _, 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 { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetResourceAllocationInfo1)(windows_core::Interface::as_raw(self), &mut result__, visiblemask, numresourcedescs, presourcedescs, core::mem::transmute(presourceallocationinfo1.unwrap_or(core::mem::zeroed()))); + (windows_core::Interface::vtable(self).GetResourceAllocationInfo1)(windows_core::Interface::as_raw(self), &mut result__, visiblemask, numresourcedescs, presourcedescs, presourceallocationinfo1.unwrap_or(core::mem::zeroed()) as _); result__ } } @@ -11678,17 +11664,17 @@ impl ID3D12Device5 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).EnumerateMetaCommands)(windows_core::Interface::as_raw(self), pnummetacommands as _, pdescs.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).EnumerateMetaCommandParameters)(windows_core::Interface::as_raw(self), commandid, stage, core::mem::transmute(ptotalstructuresizeinbytes.unwrap_or(core::mem::zeroed())), core::mem::transmute(pparametercount), core::mem::transmute(pparameterdescs.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumerateMetaCommandParameters)(windows_core::Interface::as_raw(self), commandid, stage, ptotalstructuresizeinbytes.unwrap_or(core::mem::zeroed()) as _, pparametercount as _, pparameterdescs.unwrap_or(core::mem::zeroed()) as _).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(); - unsafe { (windows_core::Interface::vtable(self).CreateMetaCommand)(windows_core::Interface::as_raw(self), commandid, nodemask, core::mem::transmute(pcreationparametersdata.unwrap_or(core::mem::zeroed())), creationparametersdatasizeinbytes, &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } + unsafe { (windows_core::Interface::vtable(self).CreateMetaCommand)(windows_core::Interface::as_raw(self), commandid, nodemask, pcreationparametersdata.unwrap_or(core::mem::zeroed()) as _, 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 @@ -11699,7 +11685,7 @@ impl ID3D12Device5 { } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetRaytracingAccelerationStructurePrebuildInfo(&self, pdesc: *const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS, pinfo: *mut D3D12_RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO) { - unsafe { (windows_core::Interface::vtable(self).GetRaytracingAccelerationStructurePrebuildInfo)(windows_core::Interface::as_raw(self), pdesc, core::mem::transmute(pinfo)) } + unsafe { (windows_core::Interface::vtable(self).GetRaytracingAccelerationStructurePrebuildInfo)(windows_core::Interface::as_raw(self), pdesc, pinfo as _) } } pub unsafe fn CheckDriverMatchingIdentifier(&self, serializeddatatype: D3D12_SERIALIZED_DATA_TYPE, pidentifiertocheck: *const D3D12_SERIALIZED_DATA_DRIVER_MATCHING_IDENTIFIER) -> D3D12_DRIVER_MATCHING_IDENTIFIER_STATUS { unsafe { (windows_core::Interface::vtable(self).CheckDriverMatchingIdentifier)(windows_core::Interface::as_raw(self), serializeddatatype, pidentifiertocheck) } @@ -11814,7 +11800,7 @@ 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: Option, pbfurthermeasurementsdesired: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetBackgroundProcessingMode)(windows_core::Interface::as_raw(self), mode, measurementsaction, core::mem::transmute(heventtosignaluponcompletion.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbfurthermeasurementsdesired.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetBackgroundProcessingMode)(windows_core::Interface::as_raw(self), mode, measurementsaction, heventtosignaluponcompletion.unwrap_or(core::mem::zeroed()) as _, pbfurthermeasurementsdesired.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -11927,7 +11913,7 @@ impl ID3D12Device8 { 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 { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetResourceAllocationInfo2)(windows_core::Interface::as_raw(self), &mut result__, visiblemask, numresourcedescs, presourcedescs, core::mem::transmute(presourceallocationinfo1.unwrap_or(core::mem::zeroed()))); + (windows_core::Interface::vtable(self).GetResourceAllocationInfo2)(windows_core::Interface::as_raw(self), &mut result__, visiblemask, numresourcedescs, presourcedescs, presourceallocationinfo1.unwrap_or(core::mem::zeroed()) as _); result__ } } @@ -11937,7 +11923,7 @@ impl ID3D12Device8 { P5: windows_core::Param, T: windows_core::Interface, { - unsafe { (windows_core::Interface::vtable(self).CreateCommittedResource2)(windows_core::Interface::as_raw(self), pheapproperties, heapflags, pdesc, initialresourcestate, core::mem::transmute(poptimizedclearvalue.unwrap_or(core::mem::zeroed())), pprotectedsession.param().abi(), &T::IID, result__ as *mut _ as *mut _).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateCommittedResource2)(windows_core::Interface::as_raw(self), pheapproperties, heapflags, pdesc, initialresourcestate, poptimizedclearvalue.unwrap_or(core::mem::zeroed()) as _, 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<()> @@ -11945,7 +11931,7 @@ impl ID3D12Device8 { P0: windows_core::Param, T: windows_core::Interface, { - unsafe { (windows_core::Interface::vtable(self).CreatePlacedResource1)(windows_core::Interface::as_raw(self), pheap.param().abi(), heapoffset, pdesc, initialstate, core::mem::transmute(poptimizedclearvalue.unwrap_or(core::mem::zeroed())), &T::IID, result__ as *mut _ as *mut _).ok() } + unsafe { (windows_core::Interface::vtable(self).CreatePlacedResource1)(windows_core::Interface::as_raw(self), pheap.param().abi(), heapoffset, pdesc, initialstate, poptimizedclearvalue.unwrap_or(core::mem::zeroed()) as _, &T::IID, result__ as *mut _ as *mut _).ok() } } pub unsafe fn CreateSamplerFeedbackUnorderedAccessView(&self, ptargetedresource: P0, pfeedbackresource: P1, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) where @@ -11956,7 +11942,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>) { - unsafe { (windows_core::Interface::vtable(self).GetCopyableFootprints1)(windows_core::Interface::as_raw(self), presourcedesc, firstsubresource, numsubresources, 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()))) } + unsafe { (windows_core::Interface::vtable(self).GetCopyableFootprints1)(windows_core::Interface::as_raw(self), presourcedesc, firstsubresource, numsubresources, baseoffset, playouts.unwrap_or(core::mem::zeroed()) as _, pnumrows.unwrap_or(core::mem::zeroed()) as _, prowsizeinbytes.unwrap_or(core::mem::zeroed()) as _, ptotalbytes.unwrap_or(core::mem::zeroed()) as _) } } } #[repr(C)] @@ -12173,7 +12159,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<()> { - unsafe { (windows_core::Interface::vtable(self).SerializeVersionedRootSignature)(windows_core::Interface::as_raw(self), pdesc, core::mem::transmute(ppresult), core::mem::transmute(pperror.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SerializeVersionedRootSignature)(windows_core::Interface::as_raw(self), pdesc, core::mem::transmute(ppresult), pperror.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreateVersionedRootSignatureDeserializer(&self, pblob: *const core::ffi::c_void, size: usize) -> windows_core::Result where @@ -12320,7 +12306,7 @@ impl ID3D12DeviceFactory { unsafe { (windows_core::Interface::vtable(self).GetConfigurationInterface)(windows_core::Interface::as_raw(self), clsid, &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn EnableExperimentalFeatures(&self, numfeatures: u32, piids: *const windows_core::GUID, pconfigurationstructs: Option<*const core::ffi::c_void>, pconfigurationstructsizes: Option<*const u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnableExperimentalFeatures)(windows_core::Interface::as_raw(self), numfeatures, piids, core::mem::transmute(pconfigurationstructs.unwrap_or(core::mem::zeroed())), core::mem::transmute(pconfigurationstructsizes.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).EnableExperimentalFeatures)(windows_core::Interface::as_raw(self), numfeatures, piids, pconfigurationstructs.unwrap_or(core::mem::zeroed()) as _, pconfigurationstructsizes.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -12567,7 +12553,7 @@ impl core::ops::Deref for ID3D12DeviceRemovedExtendedData2 { windows_core::imp::interface_hierarchy!(ID3D12DeviceRemovedExtendedData2, windows_core::IUnknown, ID3D12DeviceRemovedExtendedData, ID3D12DeviceRemovedExtendedData1); impl ID3D12DeviceRemovedExtendedData2 { pub unsafe fn GetPageFaultAllocationOutput2(&self, poutput: *mut D3D12_DRED_PAGE_FAULT_OUTPUT2) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPageFaultAllocationOutput2)(windows_core::Interface::as_raw(self), core::mem::transmute(poutput)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPageFaultAllocationOutput2)(windows_core::Interface::as_raw(self), poutput as _).ok() } } pub unsafe fn GetDeviceState(&self) -> D3D12_DRED_DEVICE_STATE { unsafe { (windows_core::Interface::vtable(self).GetDeviceState)(windows_core::Interface::as_raw(self)) } @@ -12858,7 +12844,7 @@ windows_core::imp::define_interface!(ID3D12FunctionParameterReflection, ID3D12Fu impl ID3D12FunctionParameterReflection { #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetDesc(&self, pdesc: *mut D3D12_PARAMETER_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _).ok() } } } #[repr(C)] @@ -12907,7 +12893,7 @@ windows_core::imp::define_interface!(ID3D12FunctionReflection, ID3D12FunctionRef impl ID3D12FunctionReflection { #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetDesc(&self, pdesc: *mut D3D12_FUNCTION_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _).ok() } } pub unsafe fn GetConstantBufferByIndex(&self, bufferindex: u32) -> Option { unsafe { (windows_core::Interface::vtable(self).GetConstantBufferByIndex)(windows_core::Interface::as_raw(self), bufferindex) } @@ -12920,7 +12906,7 @@ impl ID3D12FunctionReflection { } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetResourceBindingDesc(&self, resourceindex: u32, pdesc: *mut D3D12_SHADER_INPUT_BIND_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetResourceBindingDesc)(windows_core::Interface::as_raw(self), resourceindex, core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetResourceBindingDesc)(windows_core::Interface::as_raw(self), resourceindex, pdesc as _).ok() } } pub unsafe fn GetVariableByName(&self, name: P0) -> Option where @@ -12933,7 +12919,7 @@ impl ID3D12FunctionReflection { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetResourceBindingDescByName)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetResourceBindingDescByName)(windows_core::Interface::as_raw(self), name.param().abi(), pdesc as _).ok() } } pub unsafe fn GetFunctionParameter(&self, parameterindex: i32) -> Option { unsafe { (windows_core::Interface::vtable(self).GetFunctionParameter)(windows_core::Interface::as_raw(self), parameterindex) } @@ -13056,7 +13042,7 @@ impl ID3D12GBVDiagnostics { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetGBVEntireSubresourceStatesData)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pdata), datasize).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGBVEntireSubresourceStatesData)(windows_core::Interface::as_raw(self), presource.param().abi(), pdata as _, datasize).ok() } } pub unsafe fn GetGBVSubresourceState(&self, presource: P0, subresource: u32) -> windows_core::Result where @@ -13081,7 +13067,7 @@ impl ID3D12GBVDiagnostics { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetGBVResourceInfo)(windows_core::Interface::as_raw(self), presource.param().abi(), presourcedesc.unwrap_or(core::mem::zeroed()) as _, presourcehash.unwrap_or(core::mem::zeroed()) as _, psubresourcestatesbyteoffset.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GBVReserved0(&self) { unsafe { (windows_core::Interface::vtable(self).GBVReserved0)(windows_core::Interface::as_raw(self)) } @@ -13226,7 +13212,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>) { - unsafe { (windows_core::Interface::vtable(self).CopyTextureRegion)(windows_core::Interface::as_raw(self), core::mem::transmute(pdst), dstx, dsty, dstz, core::mem::transmute(psrc), core::mem::transmute(psrcbox.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).CopyTextureRegion)(windows_core::Interface::as_raw(self), core::mem::transmute(pdst), dstx, dsty, dstz, core::mem::transmute(psrc), psrcbox.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn CopyResource(&self, pdstresource: P0, psrcresource: P1) where @@ -13334,7 +13320,7 @@ impl ID3D12GraphicsCommandList { } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn IASetIndexBuffer(&self, pview: Option<*const D3D12_INDEX_BUFFER_VIEW>) { - unsafe { (windows_core::Interface::vtable(self).IASetIndexBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(pview.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).IASetIndexBuffer)(windows_core::Interface::as_raw(self), pview.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn IASetVertexBuffers(&self, startslot: u32, pviews: Option<&[D3D12_VERTEX_BUFFER_VIEW]>) { unsafe { (windows_core::Interface::vtable(self).IASetVertexBuffers)(windows_core::Interface::as_raw(self), startslot, pviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pviews.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } @@ -13343,7 +13329,7 @@ impl ID3D12GraphicsCommandList { unsafe { (windows_core::Interface::vtable(self).SOSetTargets)(windows_core::Interface::as_raw(self), startslot, pviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pviews.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } } pub unsafe fn OMSetRenderTargets(&self, numrendertargetdescriptors: u32, prendertargetdescriptors: Option<*const D3D12_CPU_DESCRIPTOR_HANDLE>, rtssinglehandletodescriptorrange: bool, pdepthstencildescriptor: Option<*const D3D12_CPU_DESCRIPTOR_HANDLE>) { - unsafe { (windows_core::Interface::vtable(self).OMSetRenderTargets)(windows_core::Interface::as_raw(self), numrendertargetdescriptors, core::mem::transmute(prendertargetdescriptors.unwrap_or(core::mem::zeroed())), rtssinglehandletodescriptorrange.into(), core::mem::transmute(pdepthstencildescriptor.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).OMSetRenderTargets)(windows_core::Interface::as_raw(self), numrendertargetdescriptors, prendertargetdescriptors.unwrap_or(core::mem::zeroed()) as _, rtssinglehandletodescriptorrange.into(), pdepthstencildescriptor.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn ClearDepthStencilView(&self, depthstencilview: D3D12_CPU_DESCRIPTOR_HANDLE, clearflags: D3D12_CLEAR_FLAGS, depth: f32, stencil: u8, prects: Option<&[super::super::Foundation::RECT]>) { unsafe { (windows_core::Interface::vtable(self).ClearDepthStencilView)(windows_core::Interface::as_raw(self), core::mem::transmute(depthstencilview), clearflags, depth, 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()))) } @@ -13367,7 +13353,7 @@ impl ID3D12GraphicsCommandList { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DiscardResource)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pregion.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).DiscardResource)(windows_core::Interface::as_raw(self), presource.param().abi(), pregion.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn BeginQuery(&self, pqueryheap: P0, r#type: D3D12_QUERY_TYPE, index: u32) where @@ -13395,10 +13381,10 @@ impl ID3D12GraphicsCommandList { unsafe { (windows_core::Interface::vtable(self).SetPredication)(windows_core::Interface::as_raw(self), pbuffer.param().abi(), alignedbufferoffset, operation) } } pub unsafe fn SetMarker(&self, metadata: u32, pdata: Option<*const core::ffi::c_void>, size: u32) { - unsafe { (windows_core::Interface::vtable(self).SetMarker)(windows_core::Interface::as_raw(self), metadata, core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), size) } + unsafe { (windows_core::Interface::vtable(self).SetMarker)(windows_core::Interface::as_raw(self), metadata, pdata.unwrap_or(core::mem::zeroed()) as _, size) } } pub unsafe fn BeginEvent(&self, metadata: u32, pdata: Option<*const core::ffi::c_void>, size: u32) { - unsafe { (windows_core::Interface::vtable(self).BeginEvent)(windows_core::Interface::as_raw(self), metadata, core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), size) } + unsafe { (windows_core::Interface::vtable(self).BeginEvent)(windows_core::Interface::as_raw(self), metadata, pdata.unwrap_or(core::mem::zeroed()) as _, size) } } pub unsafe fn EndEvent(&self) { unsafe { (windows_core::Interface::vtable(self).EndEvent)(windows_core::Interface::as_raw(self)) } @@ -13942,7 +13928,7 @@ impl ID3D12GraphicsCommandList1 { P0: windows_core::Param, P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ResolveSubresourceRegion)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, dstx, dsty, psrcresource.param().abi(), srcsubresource, core::mem::transmute(psrcrect.unwrap_or(core::mem::zeroed())), format, resolvemode) } + unsafe { (windows_core::Interface::vtable(self).ResolveSubresourceRegion)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, dstx, dsty, psrcresource.param().abi(), srcsubresource, psrcrect.unwrap_or(core::mem::zeroed()) as _, format, resolvemode) } } pub unsafe fn SetViewInstanceMask(&self, mask: u32) { unsafe { (windows_core::Interface::vtable(self).SetViewInstanceMask)(windows_core::Interface::as_raw(self), mask) } @@ -14110,7 +14096,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>) { - unsafe { (windows_core::Interface::vtable(self).WriteBufferImmediate)(windows_core::Interface::as_raw(self), count, pparams, core::mem::transmute(pmodes.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).WriteBufferImmediate)(windows_core::Interface::as_raw(self), count, pparams, pmodes.unwrap_or(core::mem::zeroed()) as _) } } } #[repr(C)] @@ -14200,7 +14186,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) { - unsafe { (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())), flags) } + unsafe { (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())), pdepthstencil.unwrap_or(core::mem::zeroed()) as _, flags) } } pub unsafe fn EndRenderPass(&self) { unsafe { (windows_core::Interface::vtable(self).EndRenderPass)(windows_core::Interface::as_raw(self)) } @@ -14209,13 +14195,13 @@ impl ID3D12GraphicsCommandList4 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).InitializeMetaCommand)(windows_core::Interface::as_raw(self), pmetacommand.param().abi(), core::mem::transmute(pinitializationparametersdata.unwrap_or(core::mem::zeroed())), initializationparametersdatasizeinbytes) } + unsafe { (windows_core::Interface::vtable(self).InitializeMetaCommand)(windows_core::Interface::as_raw(self), pmetacommand.param().abi(), pinitializationparametersdata.unwrap_or(core::mem::zeroed()) as _, initializationparametersdatasizeinbytes) } } pub unsafe fn ExecuteMetaCommand(&self, pmetacommand: P0, pexecutionparametersdata: Option<*const core::ffi::c_void>, executionparametersdatasizeinbytes: usize) where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ExecuteMetaCommand)(windows_core::Interface::as_raw(self), pmetacommand.param().abi(), core::mem::transmute(pexecutionparametersdata.unwrap_or(core::mem::zeroed())), executionparametersdatasizeinbytes) } + unsafe { (windows_core::Interface::vtable(self).ExecuteMetaCommand)(windows_core::Interface::as_raw(self), pmetacommand.param().abi(), pexecutionparametersdata.unwrap_or(core::mem::zeroed()) as _, 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]>) { @@ -14358,7 +14344,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>) { - unsafe { (windows_core::Interface::vtable(self).RSSetShadingRate)(windows_core::Interface::as_raw(self), baseshadingrate, core::mem::transmute(combiners.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).RSSetShadingRate)(windows_core::Interface::as_raw(self), baseshadingrate, combiners.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn RSSetShadingRateImage(&self, shadingrateimage: P0) where @@ -14712,7 +14698,7 @@ impl ID3D12InfoQueue { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).GetMessage)(windows_core::Interface::as_raw(self), messageindex, core::mem::transmute(pmessage.unwrap_or(core::mem::zeroed())), core::mem::transmute(pmessagebytelength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMessage)(windows_core::Interface::as_raw(self), messageindex, pmessage.unwrap_or(core::mem::zeroed()) as _, pmessagebytelength as _).ok() } } pub unsafe fn GetNumMessagesAllowedByStorageFilter(&self) -> u64 { unsafe { (windows_core::Interface::vtable(self).GetNumMessagesAllowedByStorageFilter)(windows_core::Interface::as_raw(self)) } @@ -14736,7 +14722,7 @@ impl ID3D12InfoQueue { unsafe { (windows_core::Interface::vtable(self).AddStorageFilterEntries)(windows_core::Interface::as_raw(self), pfilter).ok() } } pub unsafe fn GetStorageFilter(&self, pfilter: Option<*mut D3D12_INFO_QUEUE_FILTER>, pfilterbytelength: *mut usize) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetStorageFilter)(windows_core::Interface::as_raw(self), pfilter.unwrap_or(core::mem::zeroed()) as _, pfilterbytelength as _).ok() } } pub unsafe fn ClearStorageFilter(&self) { unsafe { (windows_core::Interface::vtable(self).ClearStorageFilter)(windows_core::Interface::as_raw(self)) } @@ -14760,7 +14746,7 @@ impl ID3D12InfoQueue { unsafe { (windows_core::Interface::vtable(self).AddRetrievalFilterEntries)(windows_core::Interface::as_raw(self), pfilter).ok() } } pub unsafe fn GetRetrievalFilter(&self, pfilter: Option<*mut D3D12_INFO_QUEUE_FILTER>, pfilterbytelength: *mut usize) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetRetrievalFilter)(windows_core::Interface::as_raw(self), pfilter.unwrap_or(core::mem::zeroed()) as _, pfilterbytelength as _).ok() } } pub unsafe fn ClearRetrievalFilter(&self) { unsafe { (windows_core::Interface::vtable(self).ClearRetrievalFilter)(windows_core::Interface::as_raw(self)) } @@ -15161,7 +15147,7 @@ impl core::ops::Deref for ID3D12InfoQueue1 { windows_core::imp::interface_hierarchy!(ID3D12InfoQueue1, windows_core::IUnknown, ID3D12InfoQueue); impl ID3D12InfoQueue1 { pub unsafe fn RegisterMessageCallback(&self, callbackfunc: D3D12MessageFunc, callbackfilterflags: D3D12_MESSAGE_CALLBACK_FLAGS, pcontext: *mut core::ffi::c_void, pcallbackcookie: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RegisterMessageCallback)(windows_core::Interface::as_raw(self), callbackfunc, callbackfilterflags, core::mem::transmute(pcontext), core::mem::transmute(pcallbackcookie)).ok() } + unsafe { (windows_core::Interface::vtable(self).RegisterMessageCallback)(windows_core::Interface::as_raw(self), callbackfunc, callbackfilterflags, pcontext as _, pcallbackcookie as _).ok() } } pub unsafe fn UnregisterMessageCallback(&self, callbackcookie: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UnregisterMessageCallback)(windows_core::Interface::as_raw(self), callbackcookie).ok() } @@ -15337,7 +15323,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>) { - unsafe { (windows_core::Interface::vtable(self).TrackWrite)(windows_core::Interface::as_raw(self), subresource, core::mem::transmute(pwrittenrange.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).TrackWrite)(windows_core::Interface::as_raw(self), subresource, pwrittenrange.unwrap_or(core::mem::zeroed()) as _) } } } #[repr(C)] @@ -15407,10 +15393,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<()> { - unsafe { (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), guid, core::mem::transmute(pdatasize), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), guid, pdatasize as _, pdata.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetPrivateData(&self, guid: *const windows_core::GUID, datasize: u32, pdata: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), guid, datasize, core::mem::transmute(pdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), guid, datasize, pdata.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, pdata: P1) -> windows_core::Result<()> where @@ -15894,10 +15880,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<()> { - unsafe { (windows_core::Interface::vtable(self).Map)(windows_core::Interface::as_raw(self), subresource, core::mem::transmute(preadrange.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Map)(windows_core::Interface::as_raw(self), subresource, preadrange.unwrap_or(core::mem::zeroed()) as _, ppdata.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Unmap(&self, subresource: u32, pwrittenrange: Option<*const D3D12_RANGE>) { - unsafe { (windows_core::Interface::vtable(self).Unmap)(windows_core::Interface::as_raw(self), subresource, core::mem::transmute(pwrittenrange.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).Unmap)(windows_core::Interface::as_raw(self), subresource, pwrittenrange.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetDesc(&self) -> D3D12_RESOURCE_DESC { @@ -15911,13 +15897,13 @@ impl ID3D12Resource { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).WriteToSubresource)(windows_core::Interface::as_raw(self), dstsubresource, core::mem::transmute(pdstbox.unwrap_or(core::mem::zeroed())), psrcdata, srcrowpitch, srcdepthpitch).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteToSubresource)(windows_core::Interface::as_raw(self), dstsubresource, pdstbox.unwrap_or(core::mem::zeroed()) as _, psrcdata, srcrowpitch, srcdepthpitch).ok() } } pub unsafe fn ReadFromSubresource(&self, pdstdata: *mut core::ffi::c_void, dstrowpitch: u32, dstdepthpitch: u32, srcsubresource: u32, psrcbox: Option<*const D3D12_BOX>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadFromSubresource)(windows_core::Interface::as_raw(self), core::mem::transmute(pdstdata), dstrowpitch, dstdepthpitch, srcsubresource, core::mem::transmute(psrcbox.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadFromSubresource)(windows_core::Interface::as_raw(self), pdstdata as _, dstrowpitch, dstdepthpitch, srcsubresource, psrcbox.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetHeapProperties(&self, pheapproperties: Option<*mut D3D12_HEAP_PROPERTIES>, pheapflags: Option<*mut D3D12_HEAP_FLAGS>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetHeapProperties)(windows_core::Interface::as_raw(self), pheapproperties.unwrap_or(core::mem::zeroed()) as _, pheapflags.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -16266,7 +16252,7 @@ impl core::ops::Deref for ID3D12ShaderCacheSession { windows_core::imp::interface_hierarchy!(ID3D12ShaderCacheSession, windows_core::IUnknown, ID3D12Object, ID3D12DeviceChild); impl ID3D12ShaderCacheSession { pub unsafe fn FindValue(&self, pkey: *const core::ffi::c_void, keysize: u32, pvalue: *mut core::ffi::c_void, pvaluesize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).FindValue)(windows_core::Interface::as_raw(self), pkey, keysize, core::mem::transmute(pvalue), core::mem::transmute(pvaluesize)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindValue)(windows_core::Interface::as_raw(self), pkey, keysize, pvalue as _, pvaluesize as _).ok() } } pub unsafe fn StoreValue(&self, pkey: *const core::ffi::c_void, keysize: u32, pvalue: *const core::ffi::c_void, valuesize: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).StoreValue)(windows_core::Interface::as_raw(self), pkey, keysize, pvalue, valuesize).ok() } @@ -16342,7 +16328,7 @@ windows_core::imp::interface_hierarchy!(ID3D12ShaderReflection, windows_core::IU impl ID3D12ShaderReflection { #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetDesc(&self, pdesc: *mut D3D12_SHADER_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _).ok() } } pub unsafe fn GetConstantBufferByIndex(&self, index: u32) -> Option { unsafe { (windows_core::Interface::vtable(self).GetConstantBufferByIndex)(windows_core::Interface::as_raw(self), index) } @@ -16355,19 +16341,19 @@ impl ID3D12ShaderReflection { } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetResourceBindingDesc(&self, resourceindex: u32, pdesc: *mut D3D12_SHADER_INPUT_BIND_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetResourceBindingDesc)(windows_core::Interface::as_raw(self), resourceindex, core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetResourceBindingDesc)(windows_core::Interface::as_raw(self), resourceindex, pdesc as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetInputParameterDesc(&self, parameterindex: u32, pdesc: *mut D3D12_SIGNATURE_PARAMETER_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInputParameterDesc)(windows_core::Interface::as_raw(self), parameterindex, core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInputParameterDesc)(windows_core::Interface::as_raw(self), parameterindex, pdesc as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetOutputParameterDesc(&self, parameterindex: u32, pdesc: *mut D3D12_SIGNATURE_PARAMETER_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOutputParameterDesc)(windows_core::Interface::as_raw(self), parameterindex, core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOutputParameterDesc)(windows_core::Interface::as_raw(self), parameterindex, pdesc as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetPatchConstantParameterDesc(&self, parameterindex: u32, pdesc: *mut D3D12_SIGNATURE_PARAMETER_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPatchConstantParameterDesc)(windows_core::Interface::as_raw(self), parameterindex, core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPatchConstantParameterDesc)(windows_core::Interface::as_raw(self), parameterindex, pdesc as _).ok() } } pub unsafe fn GetVariableByName(&self, name: P0) -> Option where @@ -16380,7 +16366,7 @@ impl ID3D12ShaderReflection { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetResourceBindingDescByName)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetResourceBindingDescByName)(windows_core::Interface::as_raw(self), name.param().abi(), pdesc as _).ok() } } pub unsafe fn GetMovInstructionCount(&self) -> u32 { unsafe { (windows_core::Interface::vtable(self).GetMovInstructionCount)(windows_core::Interface::as_raw(self)) } @@ -16412,7 +16398,7 @@ impl ID3D12ShaderReflection { } } pub unsafe fn GetThreadGroupSize(&self, psizex: Option<*mut u32>, psizey: Option<*mut u32>, psizez: Option<*mut u32>) -> u32 { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).GetThreadGroupSize)(windows_core::Interface::as_raw(self), psizex.unwrap_or(core::mem::zeroed()) as _, psizey.unwrap_or(core::mem::zeroed()) as _, psizez.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn GetRequiresFlags(&self) -> u64 { unsafe { (windows_core::Interface::vtable(self).GetRequiresFlags)(windows_core::Interface::as_raw(self)) } @@ -16647,7 +16633,7 @@ windows_core::imp::define_interface!(ID3D12ShaderReflectionConstantBuffer, ID3D1 impl ID3D12ShaderReflectionConstantBuffer { #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetDesc(&self, pdesc: *mut D3D12_SHADER_BUFFER_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _).ok() } } pub unsafe fn GetVariableByIndex(&self, index: u32) -> Option { unsafe { (windows_core::Interface::vtable(self).GetVariableByIndex)(windows_core::Interface::as_raw(self), index) } @@ -16723,7 +16709,7 @@ windows_core::imp::define_interface!(ID3D12ShaderReflectionType, ID3D12ShaderRef impl ID3D12ShaderReflectionType { #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetDesc(&self, pdesc: *mut D3D12_SHADER_TYPE_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _).ok() } } pub unsafe fn GetMemberTypeByIndex(&self, index: u32) -> Option { unsafe { (windows_core::Interface::vtable(self).GetMemberTypeByIndex)(windows_core::Interface::as_raw(self), index) } @@ -16915,7 +16901,7 @@ unsafe impl Sync for ID3D12ShaderReflectionType {} windows_core::imp::define_interface!(ID3D12ShaderReflectionVariable, ID3D12ShaderReflectionVariable_Vtbl); impl ID3D12ShaderReflectionVariable { pub unsafe fn GetDesc(&self, pdesc: *mut D3D12_SHADER_VARIABLE_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _).ok() } } pub unsafe fn GetType(&self) -> Option { unsafe { (windows_core::Interface::vtable(self).GetType)(windows_core::Interface::as_raw(self)) } @@ -17231,7 +17217,7 @@ impl ID3D12SwapChainAssistant { T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - unsafe { (windows_core::Interface::vtable(self).GetCurrentResourceAndCommandQueue)(windows_core::Interface::as_raw(self), riidresource, core::mem::transmute(ppvresource), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } + unsafe { (windows_core::Interface::vtable(self).GetCurrentResourceAndCommandQueue)(windows_core::Interface::as_raw(self), riidresource, ppvresource as _, &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn InsertImplicitSync(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).InsertImplicitSync)(windows_core::Interface::as_raw(self)).ok() } @@ -17514,7 +17500,7 @@ impl ID3D12WorkGraphProperties { unsafe { (windows_core::Interface::vtable(self).GetEntrypointRecordSizeInBytes)(windows_core::Interface::as_raw(self), workgraphindex, entrypointindex) } } pub unsafe fn GetWorkGraphMemoryRequirements(&self, workgraphindex: u32, pworkgraphmemoryrequirements: *mut D3D12_WORK_GRAPH_MEMORY_REQUIREMENTS) { - unsafe { (windows_core::Interface::vtable(self).GetWorkGraphMemoryRequirements)(windows_core::Interface::as_raw(self), workgraphindex, core::mem::transmute(pworkgraphmemoryrequirements)) } + unsafe { (windows_core::Interface::vtable(self).GetWorkGraphMemoryRequirements)(windows_core::Interface::as_raw(self), workgraphindex, pworkgraphmemoryrequirements as _) } } pub unsafe fn GetEntrypointRecordAlignmentInBytes(&self, workgraphindex: u32, entrypointindex: u32) -> u32 { unsafe { (windows_core::Interface::vtable(self).GetEntrypointRecordAlignmentInBytes)(windows_core::Interface::as_raw(self), workgraphindex, entrypointindex) } 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 e6bcbb251b..84238bdc9f 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D9/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D9/mod.rs @@ -3874,22 +3874,22 @@ windows_core::imp::define_interface!(IDirect3D9, IDirect3D9_Vtbl, 0x81bdcbca_64d windows_core::imp::interface_hierarchy!(IDirect3D9, windows_core::IUnknown); impl IDirect3D9 { pub unsafe fn RegisterSoftwareDevice(&self, pinitializefunction: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RegisterSoftwareDevice)(windows_core::Interface::as_raw(self), core::mem::transmute(pinitializefunction)).ok() } + unsafe { (windows_core::Interface::vtable(self).RegisterSoftwareDevice)(windows_core::Interface::as_raw(self), pinitializefunction as _).ok() } } pub unsafe fn GetAdapterCount(&self) -> u32 { unsafe { (windows_core::Interface::vtable(self).GetAdapterCount)(windows_core::Interface::as_raw(self)) } } pub unsafe fn GetAdapterIdentifier(&self, adapter: u32, flags: u32, pidentifier: *mut D3DADAPTER_IDENTIFIER9) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAdapterIdentifier)(windows_core::Interface::as_raw(self), adapter, flags, core::mem::transmute(pidentifier)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAdapterIdentifier)(windows_core::Interface::as_raw(self), adapter, flags, pidentifier as _).ok() } } pub unsafe fn GetAdapterModeCount(&self, adapter: u32, format: D3DFORMAT) -> u32 { unsafe { (windows_core::Interface::vtable(self).GetAdapterModeCount)(windows_core::Interface::as_raw(self), adapter, format) } } pub unsafe fn EnumAdapterModes(&self, adapter: u32, format: D3DFORMAT, mode: u32, pmode: *mut D3DDISPLAYMODE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumAdapterModes)(windows_core::Interface::as_raw(self), adapter, format, mode, core::mem::transmute(pmode)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumAdapterModes)(windows_core::Interface::as_raw(self), adapter, format, mode, pmode as _).ok() } } pub unsafe fn GetAdapterDisplayMode(&self, adapter: u32, pmode: *mut D3DDISPLAYMODE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAdapterDisplayMode)(windows_core::Interface::as_raw(self), adapter, core::mem::transmute(pmode)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAdapterDisplayMode)(windows_core::Interface::as_raw(self), adapter, pmode as _).ok() } } pub unsafe fn CheckDeviceType(&self, adapter: u32, devtype: D3DDEVTYPE, adapterformat: D3DFORMAT, backbufferformat: D3DFORMAT, bwindowed: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).CheckDeviceType)(windows_core::Interface::as_raw(self), adapter, devtype, adapterformat, backbufferformat, bwindowed.into()).ok() } @@ -3898,7 +3898,7 @@ impl IDirect3D9 { unsafe { (windows_core::Interface::vtable(self).CheckDeviceFormat)(windows_core::Interface::as_raw(self), adapter, devicetype, adapterformat, usage, rtype, checkformat).ok() } } pub unsafe fn CheckDeviceMultiSampleType(&self, adapter: u32, devicetype: D3DDEVTYPE, surfaceformat: D3DFORMAT, windowed: bool, multisampletype: D3DMULTISAMPLE_TYPE, pqualitylevels: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CheckDeviceMultiSampleType)(windows_core::Interface::as_raw(self), adapter, devicetype, surfaceformat, windowed.into(), multisampletype, core::mem::transmute(pqualitylevels)).ok() } + unsafe { (windows_core::Interface::vtable(self).CheckDeviceMultiSampleType)(windows_core::Interface::as_raw(self), adapter, devicetype, surfaceformat, windowed.into(), multisampletype, pqualitylevels as _).ok() } } pub unsafe fn CheckDepthStencilMatch(&self, adapter: u32, devicetype: D3DDEVTYPE, adapterformat: D3DFORMAT, rendertargetformat: D3DFORMAT, depthstencilformat: D3DFORMAT) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).CheckDepthStencilMatch)(windows_core::Interface::as_raw(self), adapter, devicetype, adapterformat, rendertargetformat, depthstencilformat).ok() } @@ -3907,14 +3907,14 @@ impl IDirect3D9 { unsafe { (windows_core::Interface::vtable(self).CheckDeviceFormatConversion)(windows_core::Interface::as_raw(self), adapter, devicetype, sourceformat, targetformat).ok() } } pub unsafe fn GetDeviceCaps(&self, adapter: u32, devicetype: D3DDEVTYPE, pcaps: *mut D3DCAPS9) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeviceCaps)(windows_core::Interface::as_raw(self), adapter, devicetype, core::mem::transmute(pcaps)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceCaps)(windows_core::Interface::as_raw(self), adapter, devicetype, pcaps as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetAdapterMonitor(&self, adapter: u32) -> super::Gdi::HMONITOR { unsafe { (windows_core::Interface::vtable(self).GetAdapterMonitor)(windows_core::Interface::as_raw(self), adapter) } } 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<()> { - unsafe { (windows_core::Interface::vtable(self).CreateDevice)(windows_core::Interface::as_raw(self), adapter, devicetype, hfocuswindow, behaviorflags, core::mem::transmute(ppresentationparameters), core::mem::transmute(ppreturneddeviceinterface)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateDevice)(windows_core::Interface::as_raw(self), adapter, devicetype, hfocuswindow, behaviorflags, ppresentationparameters as _, core::mem::transmute(ppreturneddeviceinterface)).ok() } } } #[repr(C)] @@ -4079,16 +4079,16 @@ impl IDirect3D9Ex { unsafe { (windows_core::Interface::vtable(self).GetAdapterModeCountEx)(windows_core::Interface::as_raw(self), adapter, pfilter) } } pub unsafe fn EnumAdapterModesEx(&self, adapter: u32, pfilter: *const D3DDISPLAYMODEFILTER, mode: u32, pmode: *mut D3DDISPLAYMODEEX) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumAdapterModesEx)(windows_core::Interface::as_raw(self), adapter, pfilter, mode, core::mem::transmute(pmode)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumAdapterModesEx)(windows_core::Interface::as_raw(self), adapter, pfilter, mode, pmode as _).ok() } } pub unsafe fn GetAdapterDisplayModeEx(&self, adapter: u32, pmode: *mut D3DDISPLAYMODEEX, protation: *mut D3DDISPLAYROTATION) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAdapterDisplayModeEx)(windows_core::Interface::as_raw(self), adapter, core::mem::transmute(pmode), core::mem::transmute(protation)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAdapterDisplayModeEx)(windows_core::Interface::as_raw(self), adapter, pmode as _, protation as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).CreateDeviceEx)(windows_core::Interface::as_raw(self), adapter, devicetype, hfocuswindow, behaviorflags, core::mem::transmute(ppresentationparameters), core::mem::transmute(pfullscreendisplaymode), core::mem::transmute(ppreturneddeviceinterface)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateDeviceEx)(windows_core::Interface::as_raw(self), adapter, devicetype, hfocuswindow, behaviorflags, ppresentationparameters as _, pfullscreendisplaymode as _, core::mem::transmute(ppreturneddeviceinterface)).ok() } } pub unsafe fn GetAdapterLUID(&self, adapter: u32, pluid: *mut super::super::Foundation::LUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAdapterLUID)(windows_core::Interface::as_raw(self), adapter, core::mem::transmute(pluid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAdapterLUID)(windows_core::Interface::as_raw(self), adapter, pluid as _).ok() } } } #[repr(C)] @@ -4265,7 +4265,7 @@ impl core::ops::Deref for IDirect3DCubeTexture9 { windows_core::imp::interface_hierarchy!(IDirect3DCubeTexture9, windows_core::IUnknown, IDirect3DResource9, IDirect3DBaseTexture9); impl IDirect3DCubeTexture9 { pub unsafe fn GetLevelDesc(&self, level: u32, pdesc: *mut D3DSURFACE_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLevelDesc)(windows_core::Interface::as_raw(self), level, core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLevelDesc)(windows_core::Interface::as_raw(self), level, pdesc as _).ok() } } pub unsafe fn GetCubeMapSurface(&self, facetype: D3DCUBEMAP_FACES, level: u32) -> windows_core::Result { unsafe { @@ -4274,7 +4274,7 @@ impl IDirect3DCubeTexture9 { } } pub unsafe fn LockRect(&self, facetype: D3DCUBEMAP_FACES, level: u32, plockedrect: *mut D3DLOCKED_RECT, prect: *const super::super::Foundation::RECT, flags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).LockRect)(windows_core::Interface::as_raw(self), facetype, level, core::mem::transmute(plockedrect), prect, flags).ok() } + unsafe { (windows_core::Interface::vtable(self).LockRect)(windows_core::Interface::as_raw(self), facetype, level, plockedrect as _, prect, flags).ok() } } pub unsafe fn UnlockRect(&self, facetype: D3DCUBEMAP_FACES, level: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UnlockRect)(windows_core::Interface::as_raw(self), facetype, level).ok() } @@ -4370,13 +4370,13 @@ impl IDirect3DDevice9 { } } pub unsafe fn GetDeviceCaps(&self, pcaps: *mut D3DCAPS9) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeviceCaps)(windows_core::Interface::as_raw(self), core::mem::transmute(pcaps)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceCaps)(windows_core::Interface::as_raw(self), pcaps as _).ok() } } pub unsafe fn GetDisplayMode(&self, iswapchain: u32, pmode: *mut D3DDISPLAYMODE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDisplayMode)(windows_core::Interface::as_raw(self), iswapchain, core::mem::transmute(pmode)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDisplayMode)(windows_core::Interface::as_raw(self), iswapchain, pmode as _).ok() } } pub unsafe fn GetCreationParameters(&self, pparameters: *mut D3DDEVICE_CREATION_PARAMETERS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCreationParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(pparameters)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCreationParameters)(windows_core::Interface::as_raw(self), pparameters as _).ok() } } pub unsafe fn SetCursorProperties(&self, xhotspot: u32, yhotspot: u32, pcursorbitmap: P2) -> windows_core::Result<()> where @@ -4391,7 +4391,7 @@ impl IDirect3DDevice9 { unsafe { (windows_core::Interface::vtable(self).ShowCursor)(windows_core::Interface::as_raw(self), bshow.into()) } } pub unsafe fn CreateAdditionalSwapChain(&self, ppresentationparameters: *mut D3DPRESENT_PARAMETERS, pswapchain: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateAdditionalSwapChain)(windows_core::Interface::as_raw(self), core::mem::transmute(ppresentationparameters), core::mem::transmute(pswapchain)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateAdditionalSwapChain)(windows_core::Interface::as_raw(self), ppresentationparameters as _, core::mem::transmute(pswapchain)).ok() } } pub unsafe fn GetSwapChain(&self, iswapchain: u32) -> windows_core::Result { unsafe { @@ -4403,7 +4403,7 @@ impl IDirect3DDevice9 { unsafe { (windows_core::Interface::vtable(self).GetNumberOfSwapChains)(windows_core::Interface::as_raw(self)) } } pub unsafe fn Reset(&self, ppresentationparameters: *mut D3DPRESENT_PARAMETERS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self), core::mem::transmute(ppresentationparameters)).ok() } + unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self), ppresentationparameters as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] 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<()> { @@ -4416,7 +4416,7 @@ impl IDirect3DDevice9 { } } pub unsafe fn GetRasterStatus(&self, iswapchain: u32, prasterstatus: *mut D3DRASTER_STATUS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRasterStatus)(windows_core::Interface::as_raw(self), iswapchain, core::mem::transmute(prasterstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRasterStatus)(windows_core::Interface::as_raw(self), iswapchain, prasterstatus as _).ok() } } pub unsafe fn SetDialogBoxMode(&self, benabledialogs: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetDialogBoxMode)(windows_core::Interface::as_raw(self), benabledialogs.into()).ok() } @@ -4425,28 +4425,28 @@ impl IDirect3DDevice9 { unsafe { (windows_core::Interface::vtable(self).SetGammaRamp)(windows_core::Interface::as_raw(self), iswapchain, flags, pramp) } } pub unsafe fn GetGammaRamp(&self, iswapchain: u32, pramp: *mut D3DGAMMARAMP) { - unsafe { (windows_core::Interface::vtable(self).GetGammaRamp)(windows_core::Interface::as_raw(self), iswapchain, core::mem::transmute(pramp)) } + unsafe { (windows_core::Interface::vtable(self).GetGammaRamp)(windows_core::Interface::as_raw(self), iswapchain, pramp as _) } } pub unsafe fn CreateTexture(&self, width: u32, height: u32, levels: u32, usage: u32, format: D3DFORMAT, pool: D3DPOOL, pptexture: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateTexture)(windows_core::Interface::as_raw(self), width, height, levels, usage, format, pool, core::mem::transmute(pptexture), core::mem::transmute(psharedhandle)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateTexture)(windows_core::Interface::as_raw(self), width, height, levels, usage, format, pool, core::mem::transmute(pptexture), psharedhandle as _).ok() } } pub unsafe fn CreateVolumeTexture(&self, width: u32, height: u32, depth: u32, levels: u32, usage: u32, format: D3DFORMAT, pool: D3DPOOL, ppvolumetexture: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateVolumeTexture)(windows_core::Interface::as_raw(self), width, height, depth, levels, usage, format, pool, core::mem::transmute(ppvolumetexture), core::mem::transmute(psharedhandle)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateVolumeTexture)(windows_core::Interface::as_raw(self), width, height, depth, levels, usage, format, pool, core::mem::transmute(ppvolumetexture), psharedhandle as _).ok() } } pub unsafe fn CreateCubeTexture(&self, edgelength: u32, levels: u32, usage: u32, format: D3DFORMAT, pool: D3DPOOL, ppcubetexture: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateCubeTexture)(windows_core::Interface::as_raw(self), edgelength, levels, usage, format, pool, core::mem::transmute(ppcubetexture), core::mem::transmute(psharedhandle)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateCubeTexture)(windows_core::Interface::as_raw(self), edgelength, levels, usage, format, pool, core::mem::transmute(ppcubetexture), psharedhandle as _).ok() } } pub unsafe fn CreateVertexBuffer(&self, length: u32, usage: u32, fvf: u32, pool: D3DPOOL, ppvertexbuffer: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateVertexBuffer)(windows_core::Interface::as_raw(self), length, usage, fvf, pool, core::mem::transmute(ppvertexbuffer), core::mem::transmute(psharedhandle)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateVertexBuffer)(windows_core::Interface::as_raw(self), length, usage, fvf, pool, core::mem::transmute(ppvertexbuffer), psharedhandle as _).ok() } } pub unsafe fn CreateIndexBuffer(&self, length: u32, usage: u32, format: D3DFORMAT, pool: D3DPOOL, ppindexbuffer: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateIndexBuffer)(windows_core::Interface::as_raw(self), length, usage, format, pool, core::mem::transmute(ppindexbuffer), core::mem::transmute(psharedhandle)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateIndexBuffer)(windows_core::Interface::as_raw(self), length, usage, format, pool, core::mem::transmute(ppindexbuffer), psharedhandle as _).ok() } } pub unsafe fn CreateRenderTarget(&self, width: u32, height: u32, format: D3DFORMAT, multisample: D3DMULTISAMPLE_TYPE, multisamplequality: u32, lockable: bool, ppsurface: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateRenderTarget)(windows_core::Interface::as_raw(self), width, height, format, multisample, multisamplequality, lockable.into(), core::mem::transmute(ppsurface), core::mem::transmute(psharedhandle)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateRenderTarget)(windows_core::Interface::as_raw(self), width, height, format, multisample, multisamplequality, lockable.into(), core::mem::transmute(ppsurface), psharedhandle as _).ok() } } pub unsafe fn CreateDepthStencilSurface(&self, width: u32, height: u32, format: D3DFORMAT, multisample: D3DMULTISAMPLE_TYPE, multisamplequality: u32, discard: bool, ppsurface: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateDepthStencilSurface)(windows_core::Interface::as_raw(self), width, height, format, multisample, multisamplequality, discard.into(), core::mem::transmute(ppsurface), core::mem::transmute(psharedhandle)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateDepthStencilSurface)(windows_core::Interface::as_raw(self), width, height, format, multisample, multisamplequality, discard.into(), core::mem::transmute(ppsurface), psharedhandle as _).ok() } } pub unsafe fn UpdateSurface(&self, psourcesurface: P0, psourcerect: *const super::super::Foundation::RECT, pdestinationsurface: P2, pdestpoint: *const super::super::Foundation::POINT) -> windows_core::Result<()> where @@ -4489,7 +4489,7 @@ impl IDirect3DDevice9 { unsafe { (windows_core::Interface::vtable(self).ColorFill)(windows_core::Interface::as_raw(self), psurface.param().abi(), prect, color).ok() } } pub unsafe fn CreateOffscreenPlainSurface(&self, width: u32, height: u32, format: D3DFORMAT, pool: D3DPOOL, ppsurface: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateOffscreenPlainSurface)(windows_core::Interface::as_raw(self), width, height, format, pool, core::mem::transmute(ppsurface), core::mem::transmute(psharedhandle)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateOffscreenPlainSurface)(windows_core::Interface::as_raw(self), width, height, format, pool, core::mem::transmute(ppsurface), psharedhandle as _).ok() } } pub unsafe fn SetRenderTarget(&self, rendertargetindex: u32, prendertarget: P1) -> windows_core::Result<()> where @@ -4530,7 +4530,7 @@ impl IDirect3DDevice9 { } #[cfg(feature = "Foundation_Numerics")] pub unsafe fn GetTransform(&self, state: D3DTRANSFORMSTATETYPE, pmatrix: *mut super::super::super::Foundation::Numerics::Matrix4x4) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTransform)(windows_core::Interface::as_raw(self), state, core::mem::transmute(pmatrix)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTransform)(windows_core::Interface::as_raw(self), state, pmatrix as _).ok() } } #[cfg(feature = "Foundation_Numerics")] pub unsafe fn MultiplyTransform(&self, param0: D3DTRANSFORMSTATETYPE, param1: *const super::super::super::Foundation::Numerics::Matrix4x4) -> windows_core::Result<()> { @@ -4540,13 +4540,13 @@ impl IDirect3DDevice9 { unsafe { (windows_core::Interface::vtable(self).SetViewport)(windows_core::Interface::as_raw(self), pviewport).ok() } } pub unsafe fn GetViewport(&self, pviewport: *mut D3DVIEWPORT9) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetViewport)(windows_core::Interface::as_raw(self), core::mem::transmute(pviewport)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetViewport)(windows_core::Interface::as_raw(self), pviewport as _).ok() } } pub unsafe fn SetMaterial(&self, pmaterial: *const D3DMATERIAL9) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetMaterial)(windows_core::Interface::as_raw(self), pmaterial).ok() } } pub unsafe fn GetMaterial(&self, pmaterial: *mut D3DMATERIAL9) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMaterial)(windows_core::Interface::as_raw(self), core::mem::transmute(pmaterial)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMaterial)(windows_core::Interface::as_raw(self), pmaterial as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn SetLight(&self, index: u32, param1: *const D3DLIGHT9) -> windows_core::Result<()> { @@ -4554,25 +4554,25 @@ impl IDirect3DDevice9 { } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetLight(&self, index: u32, param1: *mut D3DLIGHT9) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLight)(windows_core::Interface::as_raw(self), index, core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLight)(windows_core::Interface::as_raw(self), index, param1 as _).ok() } } pub unsafe fn LightEnable(&self, index: u32, enable: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).LightEnable)(windows_core::Interface::as_raw(self), index, enable.into()).ok() } } pub unsafe fn GetLightEnable(&self, index: u32, penable: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLightEnable)(windows_core::Interface::as_raw(self), index, core::mem::transmute(penable)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLightEnable)(windows_core::Interface::as_raw(self), index, penable as _).ok() } } pub unsafe fn SetClipPlane(&self, index: u32, pplane: *const f32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetClipPlane)(windows_core::Interface::as_raw(self), index, pplane).ok() } } pub unsafe fn GetClipPlane(&self, index: u32, pplane: *mut f32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClipPlane)(windows_core::Interface::as_raw(self), index, core::mem::transmute(pplane)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClipPlane)(windows_core::Interface::as_raw(self), index, pplane as _).ok() } } pub unsafe fn SetRenderState(&self, state: D3DRENDERSTATETYPE, value: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetRenderState)(windows_core::Interface::as_raw(self), state, value).ok() } } pub unsafe fn GetRenderState(&self, state: D3DRENDERSTATETYPE, pvalue: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRenderState)(windows_core::Interface::as_raw(self), state, core::mem::transmute(pvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRenderState)(windows_core::Interface::as_raw(self), state, pvalue as _).ok() } } pub unsafe fn CreateStateBlock(&self, r#type: D3DSTATEBLOCKTYPE) -> windows_core::Result { unsafe { @@ -4593,7 +4593,7 @@ impl IDirect3DDevice9 { unsafe { (windows_core::Interface::vtable(self).SetClipStatus)(windows_core::Interface::as_raw(self), pclipstatus).ok() } } pub unsafe fn GetClipStatus(&self, pclipstatus: *mut D3DCLIPSTATUS9) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClipStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pclipstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClipStatus)(windows_core::Interface::as_raw(self), pclipstatus as _).ok() } } pub unsafe fn GetTexture(&self, stage: u32) -> windows_core::Result { unsafe { @@ -4608,19 +4608,19 @@ impl IDirect3DDevice9 { unsafe { (windows_core::Interface::vtable(self).SetTexture)(windows_core::Interface::as_raw(self), stage, ptexture.param().abi()).ok() } } pub unsafe fn GetTextureStageState(&self, stage: u32, r#type: D3DTEXTURESTAGESTATETYPE, pvalue: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTextureStageState)(windows_core::Interface::as_raw(self), stage, r#type, core::mem::transmute(pvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTextureStageState)(windows_core::Interface::as_raw(self), stage, r#type, pvalue as _).ok() } } pub unsafe fn SetTextureStageState(&self, stage: u32, r#type: D3DTEXTURESTAGESTATETYPE, value: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetTextureStageState)(windows_core::Interface::as_raw(self), stage, r#type, value).ok() } } pub unsafe fn GetSamplerState(&self, sampler: u32, r#type: D3DSAMPLERSTATETYPE, pvalue: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSamplerState)(windows_core::Interface::as_raw(self), sampler, r#type, core::mem::transmute(pvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSamplerState)(windows_core::Interface::as_raw(self), sampler, r#type, pvalue as _).ok() } } pub unsafe fn SetSamplerState(&self, sampler: u32, r#type: D3DSAMPLERSTATETYPE, value: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSamplerState)(windows_core::Interface::as_raw(self), sampler, r#type, value).ok() } } pub unsafe fn ValidateDevice(&self, pnumpasses: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ValidateDevice)(windows_core::Interface::as_raw(self), core::mem::transmute(pnumpasses)).ok() } + unsafe { (windows_core::Interface::vtable(self).ValidateDevice)(windows_core::Interface::as_raw(self), pnumpasses as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn SetPaletteEntries(&self, palettenumber: u32, pentries: *const super::Gdi::PALETTEENTRY) -> windows_core::Result<()> { @@ -4628,19 +4628,19 @@ impl IDirect3DDevice9 { } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetPaletteEntries(&self, palettenumber: u32, pentries: *mut super::Gdi::PALETTEENTRY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPaletteEntries)(windows_core::Interface::as_raw(self), palettenumber, core::mem::transmute(pentries)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPaletteEntries)(windows_core::Interface::as_raw(self), palettenumber, pentries as _).ok() } } pub unsafe fn SetCurrentTexturePalette(&self, palettenumber: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetCurrentTexturePalette)(windows_core::Interface::as_raw(self), palettenumber).ok() } } pub unsafe fn GetCurrentTexturePalette(&self, palettenumber: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrentTexturePalette)(windows_core::Interface::as_raw(self), core::mem::transmute(palettenumber)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentTexturePalette)(windows_core::Interface::as_raw(self), palettenumber as _).ok() } } pub unsafe fn SetScissorRect(&self, prect: *const super::super::Foundation::RECT) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetScissorRect)(windows_core::Interface::as_raw(self), prect).ok() } } pub unsafe fn GetScissorRect(&self, prect: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetScissorRect)(windows_core::Interface::as_raw(self), core::mem::transmute(prect)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScissorRect)(windows_core::Interface::as_raw(self), prect as _).ok() } } pub unsafe fn SetSoftwareVertexProcessing(&self, bsoftware: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSoftwareVertexProcessing)(windows_core::Interface::as_raw(self), bsoftware.into()).ok() } @@ -4695,7 +4695,7 @@ impl IDirect3DDevice9 { unsafe { (windows_core::Interface::vtable(self).SetFVF)(windows_core::Interface::as_raw(self), fvf).ok() } } pub unsafe fn GetFVF(&self, pfvf: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFVF)(windows_core::Interface::as_raw(self), core::mem::transmute(pfvf)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFVF)(windows_core::Interface::as_raw(self), pfvf as _).ok() } } pub unsafe fn CreateVertexShader(&self, pfunction: *const u32) -> windows_core::Result { unsafe { @@ -4719,19 +4719,19 @@ impl IDirect3DDevice9 { unsafe { (windows_core::Interface::vtable(self).SetVertexShaderConstantF)(windows_core::Interface::as_raw(self), startregister, pconstantdata, vector4fcount).ok() } } pub unsafe fn GetVertexShaderConstantF(&self, startregister: u32, pconstantdata: *mut f32, vector4fcount: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVertexShaderConstantF)(windows_core::Interface::as_raw(self), startregister, core::mem::transmute(pconstantdata), vector4fcount).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVertexShaderConstantF)(windows_core::Interface::as_raw(self), startregister, pconstantdata as _, vector4fcount).ok() } } pub unsafe fn SetVertexShaderConstantI(&self, startregister: u32, pconstantdata: *const i32, vector4icount: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetVertexShaderConstantI)(windows_core::Interface::as_raw(self), startregister, pconstantdata, vector4icount).ok() } } pub unsafe fn GetVertexShaderConstantI(&self, startregister: u32, pconstantdata: *mut i32, vector4icount: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVertexShaderConstantI)(windows_core::Interface::as_raw(self), startregister, core::mem::transmute(pconstantdata), vector4icount).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVertexShaderConstantI)(windows_core::Interface::as_raw(self), startregister, pconstantdata as _, vector4icount).ok() } } pub unsafe fn SetVertexShaderConstantB(&self, startregister: u32, pconstantdata: *const super::super::Foundation::BOOL, boolcount: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetVertexShaderConstantB)(windows_core::Interface::as_raw(self), startregister, pconstantdata, boolcount).ok() } } pub unsafe fn GetVertexShaderConstantB(&self, startregister: u32, pconstantdata: *mut super::super::Foundation::BOOL, boolcount: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVertexShaderConstantB)(windows_core::Interface::as_raw(self), startregister, core::mem::transmute(pconstantdata), boolcount).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVertexShaderConstantB)(windows_core::Interface::as_raw(self), startregister, pconstantdata as _, boolcount).ok() } } pub unsafe fn SetStreamSource(&self, streamnumber: u32, pstreamdata: P1, offsetinbytes: u32, stride: u32) -> windows_core::Result<()> where @@ -4740,13 +4740,13 @@ impl IDirect3DDevice9 { unsafe { (windows_core::Interface::vtable(self).SetStreamSource)(windows_core::Interface::as_raw(self), streamnumber, pstreamdata.param().abi(), offsetinbytes, stride).ok() } } pub unsafe fn GetStreamSource(&self, streamnumber: u32, ppstreamdata: *mut Option, poffsetinbytes: *mut u32, pstride: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStreamSource)(windows_core::Interface::as_raw(self), streamnumber, core::mem::transmute(ppstreamdata), core::mem::transmute(poffsetinbytes), core::mem::transmute(pstride)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStreamSource)(windows_core::Interface::as_raw(self), streamnumber, core::mem::transmute(ppstreamdata), poffsetinbytes as _, pstride as _).ok() } } pub unsafe fn SetStreamSourceFreq(&self, streamnumber: u32, setting: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetStreamSourceFreq)(windows_core::Interface::as_raw(self), streamnumber, setting).ok() } } pub unsafe fn GetStreamSourceFreq(&self, streamnumber: u32, psetting: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStreamSourceFreq)(windows_core::Interface::as_raw(self), streamnumber, core::mem::transmute(psetting)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStreamSourceFreq)(windows_core::Interface::as_raw(self), streamnumber, psetting as _).ok() } } pub unsafe fn SetIndices(&self, pindexdata: P0) -> windows_core::Result<()> where @@ -4782,19 +4782,19 @@ impl IDirect3DDevice9 { unsafe { (windows_core::Interface::vtable(self).SetPixelShaderConstantF)(windows_core::Interface::as_raw(self), startregister, pconstantdata, vector4fcount).ok() } } pub unsafe fn GetPixelShaderConstantF(&self, startregister: u32, pconstantdata: *mut f32, vector4fcount: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPixelShaderConstantF)(windows_core::Interface::as_raw(self), startregister, core::mem::transmute(pconstantdata), vector4fcount).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPixelShaderConstantF)(windows_core::Interface::as_raw(self), startregister, pconstantdata as _, vector4fcount).ok() } } pub unsafe fn SetPixelShaderConstantI(&self, startregister: u32, pconstantdata: *const i32, vector4icount: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetPixelShaderConstantI)(windows_core::Interface::as_raw(self), startregister, pconstantdata, vector4icount).ok() } } pub unsafe fn GetPixelShaderConstantI(&self, startregister: u32, pconstantdata: *mut i32, vector4icount: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPixelShaderConstantI)(windows_core::Interface::as_raw(self), startregister, core::mem::transmute(pconstantdata), vector4icount).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPixelShaderConstantI)(windows_core::Interface::as_raw(self), startregister, pconstantdata as _, vector4icount).ok() } } pub unsafe fn SetPixelShaderConstantB(&self, startregister: u32, pconstantdata: *const super::super::Foundation::BOOL, boolcount: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetPixelShaderConstantB)(windows_core::Interface::as_raw(self), startregister, pconstantdata, boolcount).ok() } } pub unsafe fn GetPixelShaderConstantB(&self, startregister: u32, pconstantdata: *mut super::super::Foundation::BOOL, boolcount: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPixelShaderConstantB)(windows_core::Interface::as_raw(self), startregister, core::mem::transmute(pconstantdata), boolcount).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPixelShaderConstantB)(windows_core::Interface::as_raw(self), startregister, pconstantdata as _, boolcount).ok() } } pub unsafe fn DrawRectPatch(&self, handle: u32, pnumsegs: *const f32, prectpatchinfo: *const D3DRECTPATCH_INFO) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DrawRectPatch)(windows_core::Interface::as_raw(self), handle, pnumsegs, prectpatchinfo).ok() } @@ -6006,7 +6006,7 @@ impl core::ops::Deref for IDirect3DDevice9Ex { windows_core::imp::interface_hierarchy!(IDirect3DDevice9Ex, windows_core::IUnknown, IDirect3DDevice9); impl IDirect3DDevice9Ex { pub unsafe fn SetConvolutionMonoKernel(&self, width: u32, height: u32, rows: *mut f32, columns: *mut f32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetConvolutionMonoKernel)(windows_core::Interface::as_raw(self), width, height, core::mem::transmute(rows), core::mem::transmute(columns)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetConvolutionMonoKernel)(windows_core::Interface::as_raw(self), width, height, rows as _, columns as _).ok() } } pub unsafe fn ComposeRects(&self, psrc: P0, pdst: P1, psrcrectdescs: P2, numrects: u32, pdstrectdescs: P4, operation: D3DCOMPOSERECTSOP, xoffset: i32, yoffset: i32) -> windows_core::Result<()> where @@ -6022,7 +6022,7 @@ impl IDirect3DDevice9Ex { unsafe { (windows_core::Interface::vtable(self).PresentEx)(windows_core::Interface::as_raw(self), psourcerect, pdestrect, hdestwindowoverride, pdirtyregion, dwflags).ok() } } pub unsafe fn GetGPUThreadPriority(&self, ppriority: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGPUThreadPriority)(windows_core::Interface::as_raw(self), core::mem::transmute(ppriority)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGPUThreadPriority)(windows_core::Interface::as_raw(self), ppriority as _).ok() } } pub unsafe fn SetGPUThreadPriority(&self, priority: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetGPUThreadPriority)(windows_core::Interface::as_raw(self), priority).ok() } @@ -6037,25 +6037,25 @@ impl IDirect3DDevice9Ex { unsafe { (windows_core::Interface::vtable(self).SetMaximumFrameLatency)(windows_core::Interface::as_raw(self), maxlatency).ok() } } pub unsafe fn GetMaximumFrameLatency(&self, pmaxlatency: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMaximumFrameLatency)(windows_core::Interface::as_raw(self), core::mem::transmute(pmaxlatency)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMaximumFrameLatency)(windows_core::Interface::as_raw(self), pmaxlatency as _).ok() } } pub unsafe fn CheckDeviceState(&self, hdestinationwindow: super::super::Foundation::HWND) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).CheckDeviceState)(windows_core::Interface::as_raw(self), hdestinationwindow).ok() } } pub unsafe fn CreateRenderTargetEx(&self, width: u32, height: u32, format: D3DFORMAT, multisample: D3DMULTISAMPLE_TYPE, multisamplequality: u32, lockable: bool, ppsurface: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE, usage: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateRenderTargetEx)(windows_core::Interface::as_raw(self), width, height, format, multisample, multisamplequality, lockable.into(), core::mem::transmute(ppsurface), core::mem::transmute(psharedhandle), usage).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateRenderTargetEx)(windows_core::Interface::as_raw(self), width, height, format, multisample, multisamplequality, lockable.into(), core::mem::transmute(ppsurface), psharedhandle as _, usage).ok() } } pub unsafe fn CreateOffscreenPlainSurfaceEx(&self, width: u32, height: u32, format: D3DFORMAT, pool: D3DPOOL, ppsurface: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE, usage: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateOffscreenPlainSurfaceEx)(windows_core::Interface::as_raw(self), width, height, format, pool, core::mem::transmute(ppsurface), core::mem::transmute(psharedhandle), usage).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateOffscreenPlainSurfaceEx)(windows_core::Interface::as_raw(self), width, height, format, pool, core::mem::transmute(ppsurface), psharedhandle as _, usage).ok() } } pub unsafe fn CreateDepthStencilSurfaceEx(&self, width: u32, height: u32, format: D3DFORMAT, multisample: D3DMULTISAMPLE_TYPE, multisamplequality: u32, discard: bool, ppsurface: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE, usage: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateDepthStencilSurfaceEx)(windows_core::Interface::as_raw(self), width, height, format, multisample, multisamplequality, discard.into(), core::mem::transmute(ppsurface), core::mem::transmute(psharedhandle), usage).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateDepthStencilSurfaceEx)(windows_core::Interface::as_raw(self), width, height, format, multisample, multisamplequality, discard.into(), core::mem::transmute(ppsurface), psharedhandle as _, usage).ok() } } pub unsafe fn ResetEx(&self, ppresentationparameters: *mut D3DPRESENT_PARAMETERS, pfullscreendisplaymode: *mut D3DDISPLAYMODEEX) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ResetEx)(windows_core::Interface::as_raw(self), core::mem::transmute(ppresentationparameters), core::mem::transmute(pfullscreendisplaymode)).ok() } + unsafe { (windows_core::Interface::vtable(self).ResetEx)(windows_core::Interface::as_raw(self), ppresentationparameters as _, pfullscreendisplaymode as _).ok() } } pub unsafe fn GetDisplayModeEx(&self, iswapchain: u32, pmode: *mut D3DDISPLAYMODEEX, protation: *mut D3DDISPLAYROTATION) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDisplayModeEx)(windows_core::Interface::as_raw(self), iswapchain, core::mem::transmute(pmode), core::mem::transmute(protation)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDisplayModeEx)(windows_core::Interface::as_raw(self), iswapchain, pmode as _, protation as _).ok() } } } #[repr(C)] @@ -6226,13 +6226,13 @@ impl core::ops::Deref for IDirect3DIndexBuffer9 { windows_core::imp::interface_hierarchy!(IDirect3DIndexBuffer9, windows_core::IUnknown, IDirect3DResource9); impl IDirect3DIndexBuffer9 { pub unsafe fn Lock(&self, offsettolock: u32, sizetolock: u32, ppbdata: *mut *mut core::ffi::c_void, flags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), offsettolock, sizetolock, core::mem::transmute(ppbdata), flags).ok() } + unsafe { (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), offsettolock, sizetolock, ppbdata as _, flags).ok() } } pub unsafe fn Unlock(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Unlock)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetDesc(&self, pdesc: *mut D3DINDEXBUFFER_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _).ok() } } } #[repr(C)] @@ -6289,7 +6289,7 @@ impl IDirect3DPixelShader9 { } } pub unsafe fn GetFunction(&self, param0: *mut core::ffi::c_void, psizeofdata: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFunction)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(psizeofdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFunction)(windows_core::Interface::as_raw(self), param0 as _, psizeofdata as _).ok() } } } #[repr(C)] @@ -6352,7 +6352,7 @@ impl IDirect3DQuery9 { unsafe { (windows_core::Interface::vtable(self).Issue)(windows_core::Interface::as_raw(self), dwissueflags).ok() } } pub unsafe fn GetData(&self, pdata: *mut core::ffi::c_void, dwsize: u32, dwgetdataflags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata), dwsize, dwgetdataflags).ok() } + unsafe { (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), pdata as _, dwsize, dwgetdataflags).ok() } } } #[repr(C)] @@ -6436,7 +6436,7 @@ impl IDirect3DResource9 { unsafe { (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), refguid, pdata, sizeofdata, flags).ok() } } pub unsafe fn GetPrivateData(&self, refguid: *const windows_core::GUID, pdata: *mut core::ffi::c_void, psizeofdata: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), refguid, core::mem::transmute(pdata), core::mem::transmute(psizeofdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), refguid, pdata as _, psizeofdata as _).ok() } } pub unsafe fn FreePrivateData(&self, refguid: *const windows_core::GUID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).FreePrivateData)(windows_core::Interface::as_raw(self), refguid).ok() } @@ -6625,20 +6625,20 @@ impl core::ops::Deref for IDirect3DSurface9 { windows_core::imp::interface_hierarchy!(IDirect3DSurface9, windows_core::IUnknown, IDirect3DResource9); impl IDirect3DSurface9 { pub unsafe fn GetContainer(&self, riid: *const windows_core::GUID, ppcontainer: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetContainer)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(ppcontainer)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetContainer)(windows_core::Interface::as_raw(self), riid, ppcontainer as _).ok() } } pub unsafe fn GetDesc(&self, pdesc: *mut D3DSURFACE_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _).ok() } } pub unsafe fn LockRect(&self, plockedrect: *mut D3DLOCKED_RECT, prect: *const super::super::Foundation::RECT, flags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).LockRect)(windows_core::Interface::as_raw(self), core::mem::transmute(plockedrect), prect, flags).ok() } + unsafe { (windows_core::Interface::vtable(self).LockRect)(windows_core::Interface::as_raw(self), plockedrect as _, prect, flags).ok() } } pub unsafe fn UnlockRect(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UnlockRect)(windows_core::Interface::as_raw(self)).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetDC(&self, phdc: *mut super::Gdi::HDC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDC)(windows_core::Interface::as_raw(self), core::mem::transmute(phdc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDC)(windows_core::Interface::as_raw(self), phdc as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn ReleaseDC(&self, hdc: super::Gdi::HDC) -> windows_core::Result<()> { @@ -6745,10 +6745,10 @@ impl IDirect3DSwapChain9 { } } pub unsafe fn GetRasterStatus(&self, prasterstatus: *mut D3DRASTER_STATUS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRasterStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(prasterstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRasterStatus)(windows_core::Interface::as_raw(self), prasterstatus as _).ok() } } pub unsafe fn GetDisplayMode(&self, pmode: *mut D3DDISPLAYMODE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDisplayMode)(windows_core::Interface::as_raw(self), core::mem::transmute(pmode)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDisplayMode)(windows_core::Interface::as_raw(self), pmode as _).ok() } } pub unsafe fn GetDevice(&self) -> windows_core::Result { unsafe { @@ -6757,7 +6757,7 @@ impl IDirect3DSwapChain9 { } } pub unsafe fn GetPresentParameters(&self, ppresentationparameters: *mut D3DPRESENT_PARAMETERS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPresentParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(ppresentationparameters)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPresentParameters)(windows_core::Interface::as_raw(self), ppresentationparameters as _).ok() } } } #[repr(C)] @@ -6868,13 +6868,13 @@ impl core::ops::Deref for IDirect3DSwapChain9Ex { windows_core::imp::interface_hierarchy!(IDirect3DSwapChain9Ex, windows_core::IUnknown, IDirect3DSwapChain9); impl IDirect3DSwapChain9Ex { pub unsafe fn GetLastPresentCount(&self, plastpresentcount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLastPresentCount)(windows_core::Interface::as_raw(self), core::mem::transmute(plastpresentcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLastPresentCount)(windows_core::Interface::as_raw(self), plastpresentcount as _).ok() } } pub unsafe fn GetPresentStats(&self, ppresentationstatistics: *mut D3DPRESENTSTATS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPresentStats)(windows_core::Interface::as_raw(self), core::mem::transmute(ppresentationstatistics)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPresentStats)(windows_core::Interface::as_raw(self), ppresentationstatistics as _).ok() } } pub unsafe fn GetDisplayModeEx(&self, pmode: *mut D3DDISPLAYMODEEX, protation: *mut D3DDISPLAYROTATION) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDisplayModeEx)(windows_core::Interface::as_raw(self), core::mem::transmute(pmode), core::mem::transmute(protation)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDisplayModeEx)(windows_core::Interface::as_raw(self), pmode as _, protation as _).ok() } } } #[repr(C)] @@ -6934,7 +6934,7 @@ impl core::ops::Deref for IDirect3DTexture9 { windows_core::imp::interface_hierarchy!(IDirect3DTexture9, windows_core::IUnknown, IDirect3DResource9, IDirect3DBaseTexture9); impl IDirect3DTexture9 { pub unsafe fn GetLevelDesc(&self, level: u32, pdesc: *mut D3DSURFACE_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLevelDesc)(windows_core::Interface::as_raw(self), level, core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLevelDesc)(windows_core::Interface::as_raw(self), level, pdesc as _).ok() } } pub unsafe fn GetSurfaceLevel(&self, level: u32) -> windows_core::Result { unsafe { @@ -6943,7 +6943,7 @@ impl IDirect3DTexture9 { } } pub unsafe fn LockRect(&self, level: u32, plockedrect: *mut D3DLOCKED_RECT, prect: *const super::super::Foundation::RECT, flags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).LockRect)(windows_core::Interface::as_raw(self), level, core::mem::transmute(plockedrect), prect, flags).ok() } + unsafe { (windows_core::Interface::vtable(self).LockRect)(windows_core::Interface::as_raw(self), level, plockedrect as _, prect, flags).ok() } } pub unsafe fn UnlockRect(&self, level: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UnlockRect)(windows_core::Interface::as_raw(self), level).ok() } @@ -7030,13 +7030,13 @@ impl core::ops::Deref for IDirect3DVertexBuffer9 { windows_core::imp::interface_hierarchy!(IDirect3DVertexBuffer9, windows_core::IUnknown, IDirect3DResource9); impl IDirect3DVertexBuffer9 { pub unsafe fn Lock(&self, offsettolock: u32, sizetolock: u32, ppbdata: *mut *mut core::ffi::c_void, flags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), offsettolock, sizetolock, core::mem::transmute(ppbdata), flags).ok() } + unsafe { (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), offsettolock, sizetolock, ppbdata as _, flags).ok() } } pub unsafe fn Unlock(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Unlock)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetDesc(&self, pdesc: *mut D3DVERTEXBUFFER_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _).ok() } } } #[repr(C)] @@ -7093,7 +7093,7 @@ impl IDirect3DVertexDeclaration9 { } } pub unsafe fn GetDeclaration(&self, pelement: *mut D3DVERTEXELEMENT9, pnumelements: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeclaration)(windows_core::Interface::as_raw(self), core::mem::transmute(pelement), core::mem::transmute(pnumelements)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeclaration)(windows_core::Interface::as_raw(self), pelement as _, pnumelements as _).ok() } } } #[repr(C)] @@ -7147,7 +7147,7 @@ impl IDirect3DVertexShader9 { } } pub unsafe fn GetFunction(&self, param0: *mut core::ffi::c_void, psizeofdata: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFunction)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(psizeofdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFunction)(windows_core::Interface::as_raw(self), param0 as _, psizeofdata as _).ok() } } } #[repr(C)] @@ -7204,19 +7204,19 @@ impl IDirect3DVolume9 { unsafe { (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), refguid, pdata, sizeofdata, flags).ok() } } pub unsafe fn GetPrivateData(&self, refguid: *const windows_core::GUID, pdata: *mut core::ffi::c_void, psizeofdata: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), refguid, core::mem::transmute(pdata), core::mem::transmute(psizeofdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), refguid, pdata as _, psizeofdata as _).ok() } } pub unsafe fn FreePrivateData(&self, refguid: *const windows_core::GUID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).FreePrivateData)(windows_core::Interface::as_raw(self), refguid).ok() } } pub unsafe fn GetContainer(&self, riid: *const windows_core::GUID, ppcontainer: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetContainer)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(ppcontainer)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetContainer)(windows_core::Interface::as_raw(self), riid, ppcontainer as _).ok() } } pub unsafe fn GetDesc(&self, pdesc: *mut D3DVOLUME_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), pdesc as _).ok() } } pub unsafe fn LockBox(&self, plockedvolume: *mut D3DLOCKED_BOX, pbox: *const D3DBOX, flags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).LockBox)(windows_core::Interface::as_raw(self), core::mem::transmute(plockedvolume), pbox, flags).ok() } + unsafe { (windows_core::Interface::vtable(self).LockBox)(windows_core::Interface::as_raw(self), plockedvolume as _, pbox, flags).ok() } } pub unsafe fn UnlockBox(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UnlockBox)(windows_core::Interface::as_raw(self)).ok() } @@ -7327,7 +7327,7 @@ impl core::ops::Deref for IDirect3DVolumeTexture9 { windows_core::imp::interface_hierarchy!(IDirect3DVolumeTexture9, windows_core::IUnknown, IDirect3DResource9, IDirect3DBaseTexture9); impl IDirect3DVolumeTexture9 { pub unsafe fn GetLevelDesc(&self, level: u32, pdesc: *mut D3DVOLUME_DESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLevelDesc)(windows_core::Interface::as_raw(self), level, core::mem::transmute(pdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLevelDesc)(windows_core::Interface::as_raw(self), level, pdesc as _).ok() } } pub unsafe fn GetVolumeLevel(&self, level: u32) -> windows_core::Result { unsafe { @@ -7336,7 +7336,7 @@ impl IDirect3DVolumeTexture9 { } } pub unsafe fn LockBox(&self, level: u32, plockedvolume: *mut D3DLOCKED_BOX, pbox: *const D3DBOX, flags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).LockBox)(windows_core::Interface::as_raw(self), level, core::mem::transmute(plockedvolume), pbox, flags).ok() } + unsafe { (windows_core::Interface::vtable(self).LockBox)(windows_core::Interface::as_raw(self), level, plockedvolume as _, pbox, flags).ok() } } pub unsafe fn UnlockBox(&self, level: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UnlockBox)(windows_core::Interface::as_raw(self), level).ok() } diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D9on12/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D9on12/mod.rs index f24684806f..36832911ab 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D9on12/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D9on12/mod.rs @@ -28,7 +28,7 @@ windows_core::imp::define_interface!(IDirect3DDevice9On12, IDirect3DDevice9On12_ windows_core::imp::interface_hierarchy!(IDirect3DDevice9On12, windows_core::IUnknown); impl IDirect3DDevice9On12 { pub unsafe fn GetD3D12Device(&self, riid: *const windows_core::GUID, ppvdevice: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetD3D12Device)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(ppvdevice)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetD3D12Device)(windows_core::Interface::as_raw(self), riid, ppvdevice as _).ok() } } #[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Direct3D9"))] pub unsafe fn UnwrapUnderlyingResource(&self, presource: P0, pcommandqueue: P1, riid: *const windows_core::GUID, ppvresource12: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -36,14 +36,14 @@ impl IDirect3DDevice9On12 { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).UnwrapUnderlyingResource)(windows_core::Interface::as_raw(self), presource.param().abi(), pcommandqueue.param().abi(), riid, core::mem::transmute(ppvresource12)).ok() } + unsafe { (windows_core::Interface::vtable(self).UnwrapUnderlyingResource)(windows_core::Interface::as_raw(self), presource.param().abi(), pcommandqueue.param().abi(), riid, ppvresource12 as _).ok() } } #[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Direct3D9"))] pub unsafe fn ReturnUnderlyingResource(&self, presource: P0, numsync: u32, psignalvalues: *mut u64, ppfences: *mut Option) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ReturnUnderlyingResource)(windows_core::Interface::as_raw(self), presource.param().abi(), numsync, core::mem::transmute(psignalvalues), core::mem::transmute(ppfences)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReturnUnderlyingResource)(windows_core::Interface::as_raw(self), presource.param().abi(), numsync, psignalvalues as _, core::mem::transmute(ppfences)).ok() } } } #[repr(C)] 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 b717f40bc2..2498a55579 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/DirectComposition/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/DirectComposition/mod.rs @@ -56,7 +56,7 @@ pub unsafe fn DCompositionCreateSurfaceHandle(desiredaccess: u32, securityattrib 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); unsafe { let mut result__ = core::mem::zeroed(); - DCompositionCreateSurfaceHandle(desiredaccess, core::mem::transmute(securityattributes.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + DCompositionCreateSurfaceHandle(desiredaccess, securityattributes.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -70,7 +70,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); - unsafe { DCompositionGetStatistics(frameid, core::mem::transmute(framestats), targetidcount, core::mem::transmute(targetids.unwrap_or(core::mem::zeroed())), core::mem::transmute(actualtargetidcount.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DCompositionGetStatistics(frameid, framestats as _, targetidcount, targetids.unwrap_or(core::mem::zeroed()) as _, actualtargetidcount.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn DCompositionGetTargetStatistics(frameid: u64, targetid: *const COMPOSITION_TARGET_ID) -> windows_core::Result { @@ -4718,7 +4718,7 @@ impl IDCompositionSurface { T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - unsafe { (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__)) } + unsafe { (windows_core::Interface::vtable(self).BeginDraw)(windows_core::Interface::as_raw(self), updaterect.unwrap_or(core::mem::zeroed()) as _, &T::IID, &mut result__, updateoffset as _).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn EndDraw(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).EndDraw)(windows_core::Interface::as_raw(self)).ok() } @@ -4730,7 +4730,7 @@ impl IDCompositionSurface { unsafe { (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<()> { - unsafe { (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())), offsetx, offsety).ok() } + unsafe { (windows_core::Interface::vtable(self).Scroll)(windows_core::Interface::as_raw(self), scrollrect.unwrap_or(core::mem::zeroed()) as _, cliprect.unwrap_or(core::mem::zeroed()) as _, offsetx, offsety).ok() } } } #[repr(C)] @@ -5165,7 +5165,7 @@ impl IDCompositionTexture { T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - unsafe { (windows_core::Interface::vtable(self).GetAvailableFence)(windows_core::Interface::as_raw(self), core::mem::transmute(fencevalue), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } + unsafe { (windows_core::Interface::vtable(self).GetAvailableFence)(windows_core::Interface::as_raw(self), fencevalue as _, &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } } #[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 1d407002ff..96b50abb33 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/DirectDraw/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/DirectDraw/mod.rs @@ -4,7 +4,7 @@ where P2: windows_core::Param, { windows_targets::link!("ddraw.dll" "system" fn DirectDrawCreate(lpguid : *mut windows_core::GUID, lplpdd : *mut * mut core::ffi::c_void, punkouter : * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { DirectDrawCreate(core::mem::transmute(lpguid), core::mem::transmute(lplpdd), punkouter.param().abi()).ok() } + unsafe { DirectDrawCreate(lpguid as _, core::mem::transmute(lplpdd), punkouter.param().abi()).ok() } } #[inline] pub unsafe fn DirectDrawCreateClipper(dwflags: u32, lplpddclipper: *mut Option, punkouter: P2) -> windows_core::Result<()> @@ -20,29 +20,29 @@ where P3: windows_core::Param, { windows_targets::link!("ddraw.dll" "system" fn DirectDrawCreateEx(lpguid : *mut windows_core::GUID, lplpdd : *mut *mut core::ffi::c_void, iid : *const windows_core::GUID, punkouter : * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { DirectDrawCreateEx(core::mem::transmute(lpguid), core::mem::transmute(lplpdd), iid, punkouter.param().abi()).ok() } + unsafe { DirectDrawCreateEx(lpguid as _, lplpdd as _, iid, punkouter.param().abi()).ok() } } #[inline] pub unsafe fn DirectDrawEnumerateA(lpcallback: LPDDENUMCALLBACKA, lpcontext: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("ddraw.dll" "system" fn DirectDrawEnumerateA(lpcallback : LPDDENUMCALLBACKA, lpcontext : *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { DirectDrawEnumerateA(lpcallback, core::mem::transmute(lpcontext)).ok() } + unsafe { DirectDrawEnumerateA(lpcallback, lpcontext as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn DirectDrawEnumerateExA(lpcallback: LPDDENUMCALLBACKEXA, lpcontext: *mut core::ffi::c_void, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("ddraw.dll" "system" fn DirectDrawEnumerateExA(lpcallback : LPDDENUMCALLBACKEXA, lpcontext : *mut core::ffi::c_void, dwflags : u32) -> windows_core::HRESULT); - unsafe { DirectDrawEnumerateExA(lpcallback, core::mem::transmute(lpcontext), dwflags).ok() } + unsafe { DirectDrawEnumerateExA(lpcallback, lpcontext as _, dwflags).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn DirectDrawEnumerateExW(lpcallback: LPDDENUMCALLBACKEXW, lpcontext: *mut core::ffi::c_void, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("ddraw.dll" "system" fn DirectDrawEnumerateExW(lpcallback : LPDDENUMCALLBACKEXW, lpcontext : *mut core::ffi::c_void, dwflags : u32) -> windows_core::HRESULT); - unsafe { DirectDrawEnumerateExW(lpcallback, core::mem::transmute(lpcontext), dwflags).ok() } + unsafe { DirectDrawEnumerateExW(lpcallback, lpcontext as _, dwflags).ok() } } #[inline] pub unsafe fn DirectDrawEnumerateW(lpcallback: LPDDENUMCALLBACKW, lpcontext: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("ddraw.dll" "system" fn DirectDrawEnumerateW(lpcallback : LPDDENUMCALLBACKW, lpcontext : *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { DirectDrawEnumerateW(lpcallback, core::mem::transmute(lpcontext)).ok() } + unsafe { DirectDrawEnumerateW(lpcallback, lpcontext as _).ok() } } #[repr(C)] #[cfg(feature = "Win32_Graphics_Gdi")] @@ -6077,16 +6077,16 @@ impl IDDVideoPortContainer { where P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateVideoPort)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), core::mem::transmute(param2), param3.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateVideoPort)(windows_core::Interface::as_raw(self), param0, param1 as _, core::mem::transmute(param2), param3.param().abi()).ok() } } pub unsafe fn EnumVideoPorts(&self, param0: u32, param1: *mut DDVIDEOPORTCAPS, param2: *mut core::ffi::c_void, param3: LPDDENUMVIDEOCALLBACK) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumVideoPorts)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), core::mem::transmute(param2), param3).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumVideoPorts)(windows_core::Interface::as_raw(self), param0, param1 as _, param2 as _, param3).ok() } } pub unsafe fn GetVideoPortConnectInfo(&self, param0: u32, pcinfo: *mut u32, param2: Option<*mut DDVIDEOPORTCONNECT>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVideoPortConnectInfo)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(pcinfo), core::mem::transmute(param2.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVideoPortConnectInfo)(windows_core::Interface::as_raw(self), param0, pcinfo as _, param2.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn QueryVideoPortStatus(&self, param0: u32, param1: *mut DDVIDEOPORTSTATUS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryVideoPortStatus)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryVideoPortStatus)(windows_core::Interface::as_raw(self), param0, param1 as _).ok() } } } #[repr(C)] @@ -6159,13 +6159,13 @@ impl IDirectDraw { where P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreatePalette)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), core::mem::transmute(param2), param3.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).CreatePalette)(windows_core::Interface::as_raw(self), param0, param1 as _, core::mem::transmute(param2), param3.param().abi()).ok() } } pub unsafe fn CreateSurface(&self, param0: *mut DDSURFACEDESC, param1: *mut Option, param2: P2) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateSurface)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), param2.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateSurface)(windows_core::Interface::as_raw(self), param0 as _, core::mem::transmute(param1), param2.param().abi()).ok() } } pub unsafe fn DuplicateSurface(&self, param0: P0) -> windows_core::Result where @@ -6177,22 +6177,22 @@ impl IDirectDraw { } } pub unsafe fn EnumDisplayModes(&self, param0: u32, param1: *mut DDSURFACEDESC, param2: *mut core::ffi::c_void, param3: LPDDENUMMODESCALLBACK) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumDisplayModes)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), core::mem::transmute(param2), param3).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumDisplayModes)(windows_core::Interface::as_raw(self), param0, param1 as _, param2 as _, param3).ok() } } pub unsafe fn EnumSurfaces(&self, param0: u32, param1: *mut DDSURFACEDESC, param2: *mut core::ffi::c_void, param3: LPDDENUMSURFACESCALLBACK) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumSurfaces)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), core::mem::transmute(param2), param3).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumSurfaces)(windows_core::Interface::as_raw(self), param0, param1 as _, param2 as _, param3).ok() } } pub unsafe fn FlipToGDISurface(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).FlipToGDISurface)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetCaps(&self, param0: *mut DDCAPS_DX7, param1: *mut DDCAPS_DX7) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), param0 as _, param1 as _).ok() } } pub unsafe fn GetDisplayMode(&self, param0: *mut DDSURFACEDESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDisplayMode)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDisplayMode)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetFourCCCodes(&self, param0: *mut u32, param1: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFourCCCodes)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFourCCCodes)(windows_core::Interface::as_raw(self), param0 as _, param1 as _).ok() } } pub unsafe fn GetGDISurface(&self) -> windows_core::Result { unsafe { @@ -6201,16 +6201,16 @@ impl IDirectDraw { } } pub unsafe fn GetMonitorFrequency(&self, param0: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMonitorFrequency)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMonitorFrequency)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetScanLine(&self, param0: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetScanLine)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScanLine)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetVerticalBlankStatus(&self, param0: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVerticalBlankStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVerticalBlankStatus)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn Initialize(&self, param0: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn RestoreDisplayMode(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RestoreDisplayMode)(windows_core::Interface::as_raw(self)).ok() } @@ -6457,13 +6457,13 @@ impl IDirectDraw2 { where P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreatePalette)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), core::mem::transmute(param2), param3.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).CreatePalette)(windows_core::Interface::as_raw(self), param0, param1 as _, core::mem::transmute(param2), param3.param().abi()).ok() } } pub unsafe fn CreateSurface(&self, param0: *mut DDSURFACEDESC, param1: *mut Option, param2: P2) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateSurface)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), param2.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateSurface)(windows_core::Interface::as_raw(self), param0 as _, core::mem::transmute(param1), param2.param().abi()).ok() } } pub unsafe fn DuplicateSurface(&self, param0: P0) -> windows_core::Result where @@ -6475,22 +6475,22 @@ impl IDirectDraw2 { } } pub unsafe fn EnumDisplayModes(&self, param0: u32, param1: *mut DDSURFACEDESC, param2: *mut core::ffi::c_void, param3: LPDDENUMMODESCALLBACK) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumDisplayModes)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), core::mem::transmute(param2), param3).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumDisplayModes)(windows_core::Interface::as_raw(self), param0, param1 as _, param2 as _, param3).ok() } } pub unsafe fn EnumSurfaces(&self, param0: u32, param1: *mut DDSURFACEDESC, param2: *mut core::ffi::c_void, param3: LPDDENUMSURFACESCALLBACK) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumSurfaces)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), core::mem::transmute(param2), param3).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumSurfaces)(windows_core::Interface::as_raw(self), param0, param1 as _, param2 as _, param3).ok() } } pub unsafe fn FlipToGDISurface(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).FlipToGDISurface)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetCaps(&self, param0: *mut DDCAPS_DX7, param1: *mut DDCAPS_DX7) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), param0 as _, param1 as _).ok() } } pub unsafe fn GetDisplayMode(&self, param0: *mut DDSURFACEDESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDisplayMode)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDisplayMode)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetFourCCCodes(&self, param0: *mut u32, param1: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFourCCCodes)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFourCCCodes)(windows_core::Interface::as_raw(self), param0 as _, param1 as _).ok() } } pub unsafe fn GetGDISurface(&self) -> windows_core::Result { unsafe { @@ -6499,16 +6499,16 @@ impl IDirectDraw2 { } } pub unsafe fn GetMonitorFrequency(&self, param0: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMonitorFrequency)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMonitorFrequency)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetScanLine(&self, param0: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetScanLine)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScanLine)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetVerticalBlankStatus(&self, param0: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVerticalBlankStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVerticalBlankStatus)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn Initialize(&self, param0: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn RestoreDisplayMode(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RestoreDisplayMode)(windows_core::Interface::as_raw(self)).ok() } @@ -6523,7 +6523,7 @@ impl IDirectDraw2 { unsafe { (windows_core::Interface::vtable(self).WaitForVerticalBlank)(windows_core::Interface::as_raw(self), param0, param1).ok() } } pub unsafe fn GetAvailableVidMem(&self, param0: *mut DDSCAPS, param1: *mut u32, param2: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetAvailableVidMem)(windows_core::Interface::as_raw(self), param0 as _, param1 as _, param2 as _).ok() } } } #[repr(C)] @@ -6767,13 +6767,13 @@ impl IDirectDraw4 { where P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreatePalette)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), core::mem::transmute(param2), param3.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).CreatePalette)(windows_core::Interface::as_raw(self), param0, param1 as _, core::mem::transmute(param2), param3.param().abi()).ok() } } pub unsafe fn CreateSurface(&self, param0: *mut DDSURFACEDESC2, param1: *mut Option, param2: P2) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateSurface)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), param2.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateSurface)(windows_core::Interface::as_raw(self), param0 as _, core::mem::transmute(param1), param2.param().abi()).ok() } } pub unsafe fn DuplicateSurface(&self, param0: P0) -> windows_core::Result where @@ -6785,22 +6785,22 @@ impl IDirectDraw4 { } } pub unsafe fn EnumDisplayModes(&self, param0: u32, param1: *mut DDSURFACEDESC2, param2: *mut core::ffi::c_void, param3: LPDDENUMMODESCALLBACK2) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumDisplayModes)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), core::mem::transmute(param2), param3).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumDisplayModes)(windows_core::Interface::as_raw(self), param0, param1 as _, param2 as _, param3).ok() } } pub unsafe fn EnumSurfaces(&self, param0: u32, param1: *mut DDSURFACEDESC2, param2: *mut core::ffi::c_void, param3: LPDDENUMSURFACESCALLBACK2) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumSurfaces)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), core::mem::transmute(param2), param3).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumSurfaces)(windows_core::Interface::as_raw(self), param0, param1 as _, param2 as _, param3).ok() } } pub unsafe fn FlipToGDISurface(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).FlipToGDISurface)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetCaps(&self, param0: *mut DDCAPS_DX7, param1: *mut DDCAPS_DX7) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), param0 as _, param1 as _).ok() } } pub unsafe fn GetDisplayMode(&self, param0: *mut DDSURFACEDESC2) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDisplayMode)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDisplayMode)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetFourCCCodes(&self, param0: *mut u32, param1: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFourCCCodes)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFourCCCodes)(windows_core::Interface::as_raw(self), param0 as _, param1 as _).ok() } } pub unsafe fn GetGDISurface(&self) -> windows_core::Result { unsafe { @@ -6809,16 +6809,16 @@ impl IDirectDraw4 { } } pub unsafe fn GetMonitorFrequency(&self, param0: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMonitorFrequency)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMonitorFrequency)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetScanLine(&self, param0: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetScanLine)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScanLine)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetVerticalBlankStatus(&self, param0: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVerticalBlankStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVerticalBlankStatus)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn Initialize(&self, param0: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn RestoreDisplayMode(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RestoreDisplayMode)(windows_core::Interface::as_raw(self)).ok() } @@ -6833,7 +6833,7 @@ impl IDirectDraw4 { unsafe { (windows_core::Interface::vtable(self).WaitForVerticalBlank)(windows_core::Interface::as_raw(self), param0, param1).ok() } } pub unsafe fn GetAvailableVidMem(&self, param0: *mut DDSCAPS2, param1: *mut u32, param2: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetAvailableVidMem)(windows_core::Interface::as_raw(self), param0 as _, param1 as _, param2 as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetSurfaceFromDC(&self, param0: super::Gdi::HDC) -> windows_core::Result { @@ -6849,7 +6849,7 @@ impl IDirectDraw4 { unsafe { (windows_core::Interface::vtable(self).TestCooperativeLevel)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetDeviceIdentifier(&self, param0: *mut DDDEVICEIDENTIFIER, param1: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeviceIdentifier)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceIdentifier)(windows_core::Interface::as_raw(self), param0 as _, param1).ok() } } } #[repr(C)] @@ -7138,13 +7138,13 @@ impl IDirectDraw7 { where P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreatePalette)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), core::mem::transmute(param2), param3.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).CreatePalette)(windows_core::Interface::as_raw(self), param0, param1 as _, core::mem::transmute(param2), param3.param().abi()).ok() } } pub unsafe fn CreateSurface(&self, param0: *mut DDSURFACEDESC2, param1: *mut Option, param2: P2) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateSurface)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), param2.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateSurface)(windows_core::Interface::as_raw(self), param0 as _, core::mem::transmute(param1), param2.param().abi()).ok() } } pub unsafe fn DuplicateSurface(&self, param0: P0) -> windows_core::Result where @@ -7156,22 +7156,22 @@ impl IDirectDraw7 { } } pub unsafe fn EnumDisplayModes(&self, param0: u32, param1: *mut DDSURFACEDESC2, param2: *mut core::ffi::c_void, param3: LPDDENUMMODESCALLBACK2) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumDisplayModes)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), core::mem::transmute(param2), param3).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumDisplayModes)(windows_core::Interface::as_raw(self), param0, param1 as _, param2 as _, param3).ok() } } pub unsafe fn EnumSurfaces(&self, param0: u32, param1: *mut DDSURFACEDESC2, param2: *mut core::ffi::c_void, param3: LPDDENUMSURFACESCALLBACK7) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumSurfaces)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), core::mem::transmute(param2), param3).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumSurfaces)(windows_core::Interface::as_raw(self), param0, param1 as _, param2 as _, param3).ok() } } pub unsafe fn FlipToGDISurface(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).FlipToGDISurface)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetCaps(&self, param0: *mut DDCAPS_DX7, param1: *mut DDCAPS_DX7) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), param0 as _, param1 as _).ok() } } pub unsafe fn GetDisplayMode(&self, param0: *mut DDSURFACEDESC2) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDisplayMode)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDisplayMode)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetFourCCCodes(&self, param0: *mut u32, param1: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFourCCCodes)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFourCCCodes)(windows_core::Interface::as_raw(self), param0 as _, param1 as _).ok() } } pub unsafe fn GetGDISurface(&self) -> windows_core::Result { unsafe { @@ -7180,16 +7180,16 @@ impl IDirectDraw7 { } } pub unsafe fn GetMonitorFrequency(&self, param0: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMonitorFrequency)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMonitorFrequency)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetScanLine(&self, param0: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetScanLine)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScanLine)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetVerticalBlankStatus(&self, param0: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVerticalBlankStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVerticalBlankStatus)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn Initialize(&self, param0: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn RestoreDisplayMode(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RestoreDisplayMode)(windows_core::Interface::as_raw(self)).ok() } @@ -7204,7 +7204,7 @@ impl IDirectDraw7 { unsafe { (windows_core::Interface::vtable(self).WaitForVerticalBlank)(windows_core::Interface::as_raw(self), param0, param1).ok() } } pub unsafe fn GetAvailableVidMem(&self, param0: *mut DDSCAPS2, param1: *mut u32, param2: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetAvailableVidMem)(windows_core::Interface::as_raw(self), param0 as _, param1 as _, param2 as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetSurfaceFromDC(&self, param0: super::Gdi::HDC) -> windows_core::Result { @@ -7220,13 +7220,13 @@ impl IDirectDraw7 { unsafe { (windows_core::Interface::vtable(self).TestCooperativeLevel)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetDeviceIdentifier(&self, param0: *mut DDDEVICEIDENTIFIER2, param1: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeviceIdentifier)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceIdentifier)(windows_core::Interface::as_raw(self), param0 as _, param1).ok() } } pub unsafe fn StartModeTest(&self, param0: *mut super::super::Foundation::SIZE, param1: u32, param2: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).StartModeTest)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1, param2).ok() } + unsafe { (windows_core::Interface::vtable(self).StartModeTest)(windows_core::Interface::as_raw(self), param0 as _, param1, param2).ok() } } pub unsafe fn EvaluateMode(&self, param0: u32, param1: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EvaluateMode)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).EvaluateMode)(windows_core::Interface::as_raw(self), param0, param1 as _).ok() } } } #[repr(C)] @@ -7521,10 +7521,10 @@ windows_core::imp::interface_hierarchy!(IDirectDrawClipper, windows_core::IUnkno impl IDirectDrawClipper { #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetClipList(&self, param0: *mut super::super::Foundation::RECT, param1: *mut super::Gdi::RGNDATA, param2: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClipList)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClipList)(windows_core::Interface::as_raw(self), param0 as _, param1 as _, param2 as _).ok() } } pub unsafe fn GetHWnd(&self, param0: *mut super::super::Foundation::HWND) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetHWnd)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetHWnd)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn Initialize(&self, param0: P0, param1: u32) -> windows_core::Result<()> where @@ -7533,11 +7533,11 @@ impl IDirectDrawClipper { unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), param0.param().abi(), param1).ok() } } pub unsafe fn IsClipListChanged(&self, param0: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsClipListChanged)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsClipListChanged)(windows_core::Interface::as_raw(self), param0 as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn SetClipList(&self, param0: *mut super::Gdi::RGNDATA, param1: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetClipList)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1).ok() } + unsafe { (windows_core::Interface::vtable(self).SetClipList)(windows_core::Interface::as_raw(self), param0 as _, param1).ok() } } pub unsafe fn SetHWnd(&self, param0: u32, param1: super::super::Foundation::HWND) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetHWnd)(windows_core::Interface::as_raw(self), param0, param1).ok() } @@ -7627,10 +7627,10 @@ windows_core::imp::define_interface!(IDirectDrawColorControl, IDirectDrawColorCo windows_core::imp::interface_hierarchy!(IDirectDrawColorControl, windows_core::IUnknown); impl IDirectDrawColorControl { pub unsafe fn GetColorControls(&self, param0: *mut DDCOLORCONTROL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetColorControls)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetColorControls)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn SetColorControls(&self, param0: *mut DDCOLORCONTROL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetColorControls)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetColorControls)(windows_core::Interface::as_raw(self), param0 as _).ok() } } } #[repr(C)] @@ -7672,10 +7672,10 @@ windows_core::imp::define_interface!(IDirectDrawGammaControl, IDirectDrawGammaCo windows_core::imp::interface_hierarchy!(IDirectDrawGammaControl, windows_core::IUnknown); impl IDirectDrawGammaControl { pub unsafe fn GetGammaRamp(&self, param0: u32, param1: *mut DDGAMMARAMP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGammaRamp)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGammaRamp)(windows_core::Interface::as_raw(self), param0, param1 as _).ok() } } pub unsafe fn SetGammaRamp(&self, param0: u32, param1: *mut DDGAMMARAMP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetGammaRamp)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetGammaRamp)(windows_core::Interface::as_raw(self), param0, param1 as _).ok() } } } #[repr(C)] @@ -7717,10 +7717,10 @@ windows_core::imp::define_interface!(IDirectDrawKernel, IDirectDrawKernel_Vtbl, windows_core::imp::interface_hierarchy!(IDirectDrawKernel, windows_core::IUnknown); impl IDirectDrawKernel { pub unsafe fn GetCaps(&self, param0: *mut DDKERNELCAPS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetKernelHandle(&self, param0: *mut usize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetKernelHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetKernelHandle)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn ReleaseKernelHandle(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ReleaseKernelHandle)(windows_core::Interface::as_raw(self)).ok() } @@ -7774,22 +7774,22 @@ windows_core::imp::define_interface!(IDirectDrawPalette, IDirectDrawPalette_Vtbl windows_core::imp::interface_hierarchy!(IDirectDrawPalette, windows_core::IUnknown); impl IDirectDrawPalette { pub unsafe fn GetCaps(&self, param0: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), param0 as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetEntries(&self, param0: u32, param1: u32, param2: u32, param3: *mut super::Gdi::PALETTEENTRY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEntries)(windows_core::Interface::as_raw(self), param0, param1, param2, core::mem::transmute(param3)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEntries)(windows_core::Interface::as_raw(self), param0, param1, param2, param3 as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn Initialize(&self, param0: P0, param1: u32, param2: *mut super::Gdi::PALETTEENTRY) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), param0.param().abi(), param1, core::mem::transmute(param2)).ok() } + unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), param0.param().abi(), param1, param2 as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn SetEntries(&self, param0: u32, param1: u32, param2: u32, param3: *mut super::Gdi::PALETTEENTRY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetEntries)(windows_core::Interface::as_raw(self), param0, param1, param2, core::mem::transmute(param3)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetEntries)(windows_core::Interface::as_raw(self), param0, param1, param2, param3 as _).ok() } } } #[repr(C)] @@ -7867,13 +7867,13 @@ impl IDirectDrawSurface { unsafe { (windows_core::Interface::vtable(self).AddAttachedSurface)(windows_core::Interface::as_raw(self), param0.param().abi()).ok() } } pub unsafe fn AddOverlayDirtyRect(&self, param0: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AddOverlayDirtyRect)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).AddOverlayDirtyRect)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn Blt(&self, param0: *mut super::super::Foundation::RECT, param1: P1, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDBLTFX) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Blt)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1.param().abi(), core::mem::transmute(param2), param3, core::mem::transmute(param4)).ok() } + unsafe { (windows_core::Interface::vtable(self).Blt)(windows_core::Interface::as_raw(self), param0 as _, param1.param().abi(), param2 as _, param3, core::mem::transmute(param4)).ok() } } pub unsafe fn BltBatch(&self, param0: *mut DDBLTBATCH, param1: u32, param2: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).BltBatch)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1, param2).ok() } @@ -7882,7 +7882,7 @@ impl IDirectDrawSurface { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).BltFast)(windows_core::Interface::as_raw(self), param0, param1, param2.param().abi(), core::mem::transmute(param3), param4).ok() } + unsafe { (windows_core::Interface::vtable(self).BltFast)(windows_core::Interface::as_raw(self), param0, param1, param2.param().abi(), param3 as _, param4).ok() } } pub unsafe fn DeleteAttachedSurface(&self, param0: u32, param1: P1) -> windows_core::Result<()> where @@ -7891,10 +7891,10 @@ impl IDirectDrawSurface { unsafe { (windows_core::Interface::vtable(self).DeleteAttachedSurface)(windows_core::Interface::as_raw(self), param0, param1.param().abi()).ok() } } pub unsafe fn EnumAttachedSurfaces(&self, param0: *mut core::ffi::c_void, param1: LPDDENUMSURFACESCALLBACK) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumAttachedSurfaces)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumAttachedSurfaces)(windows_core::Interface::as_raw(self), param0 as _, param1).ok() } } pub unsafe fn EnumOverlayZOrders(&self, param0: u32, param1: *mut core::ffi::c_void, param2: LPDDENUMSURFACESCALLBACK) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumOverlayZOrders)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), param2).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumOverlayZOrders)(windows_core::Interface::as_raw(self), param0, param1 as _, param2).ok() } } pub unsafe fn Flip(&self, param0: P0, param1: u32) -> windows_core::Result<()> where @@ -7903,13 +7903,13 @@ impl IDirectDrawSurface { unsafe { (windows_core::Interface::vtable(self).Flip)(windows_core::Interface::as_raw(self), param0.param().abi(), param1).ok() } } pub unsafe fn GetAttachedSurface(&self, param0: *mut DDSCAPS, param1: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAttachedSurface)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAttachedSurface)(windows_core::Interface::as_raw(self), param0 as _, core::mem::transmute(param1)).ok() } } pub unsafe fn GetBltStatus(&self, param0: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetBltStatus)(windows_core::Interface::as_raw(self), param0).ok() } } pub unsafe fn GetCaps(&self, param0: *mut DDSCAPS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetClipper(&self) -> windows_core::Result { unsafe { @@ -7918,17 +7918,17 @@ impl IDirectDrawSurface { } } pub unsafe fn GetColorKey(&self, param0: u32, param1: *mut DDCOLORKEY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetColorKey)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetColorKey)(windows_core::Interface::as_raw(self), param0, param1 as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetDC(&self, param0: *mut super::Gdi::HDC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDC)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDC)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetFlipStatus(&self, param0: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetFlipStatus)(windows_core::Interface::as_raw(self), param0).ok() } } pub unsafe fn GetOverlayPosition(&self, param0: *mut i32, param1: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOverlayPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOverlayPosition)(windows_core::Interface::as_raw(self), param0 as _, param1 as _).ok() } } pub unsafe fn GetPalette(&self) -> windows_core::Result { unsafe { @@ -7937,22 +7937,22 @@ impl IDirectDrawSurface { } } pub unsafe fn GetPixelFormat(&self, param0: *mut DDPIXELFORMAT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPixelFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPixelFormat)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetSurfaceDesc(&self, param0: *mut DDSURFACEDESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSurfaceDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSurfaceDesc)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn Initialize(&self, param0: P0, param1: *mut DDSURFACEDESC) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), param0.param().abi(), param1 as _).ok() } } pub unsafe fn IsLost(&self) -> windows_core::Result<()> { unsafe { (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: super::super::Foundation::HANDLE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), param2, param3).ok() } + unsafe { (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), param0 as _, param1 as _, param2, param3).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn ReleaseDC(&self, param0: super::Gdi::HDC) -> windows_core::Result<()> { @@ -7968,7 +7968,7 @@ impl IDirectDrawSurface { unsafe { (windows_core::Interface::vtable(self).SetClipper)(windows_core::Interface::as_raw(self), param0.param().abi()).ok() } } pub unsafe fn SetColorKey(&self, param0: u32, param1: *mut DDCOLORKEY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetColorKey)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetColorKey)(windows_core::Interface::as_raw(self), param0, param1 as _).ok() } } pub unsafe fn SetOverlayPosition(&self, param0: i32, param1: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetOverlayPosition)(windows_core::Interface::as_raw(self), param0, param1).ok() } @@ -7980,13 +7980,13 @@ impl IDirectDrawSurface { unsafe { (windows_core::Interface::vtable(self).SetPalette)(windows_core::Interface::as_raw(self), param0.param().abi()).ok() } } pub unsafe fn Unlock(&self, param0: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Unlock)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).Unlock)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn UpdateOverlay(&self, param0: *mut super::super::Foundation::RECT, param1: P1, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDOVERLAYFX) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).UpdateOverlay)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1.param().abi(), core::mem::transmute(param2), param3, core::mem::transmute(param4)).ok() } + unsafe { (windows_core::Interface::vtable(self).UpdateOverlay)(windows_core::Interface::as_raw(self), param0 as _, param1.param().abi(), param2 as _, param3, core::mem::transmute(param4)).ok() } } pub unsafe fn UpdateOverlayDisplay(&self, param0: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UpdateOverlayDisplay)(windows_core::Interface::as_raw(self), param0).ok() } @@ -8343,13 +8343,13 @@ impl IDirectDrawSurface2 { unsafe { (windows_core::Interface::vtable(self).AddAttachedSurface)(windows_core::Interface::as_raw(self), param0.param().abi()).ok() } } pub unsafe fn AddOverlayDirtyRect(&self, param0: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AddOverlayDirtyRect)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).AddOverlayDirtyRect)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn Blt(&self, param0: *mut super::super::Foundation::RECT, param1: P1, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDBLTFX) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Blt)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1.param().abi(), core::mem::transmute(param2), param3, core::mem::transmute(param4)).ok() } + unsafe { (windows_core::Interface::vtable(self).Blt)(windows_core::Interface::as_raw(self), param0 as _, param1.param().abi(), param2 as _, param3, core::mem::transmute(param4)).ok() } } pub unsafe fn BltBatch(&self, param0: *mut DDBLTBATCH, param1: u32, param2: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).BltBatch)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1, param2).ok() } @@ -8358,7 +8358,7 @@ impl IDirectDrawSurface2 { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).BltFast)(windows_core::Interface::as_raw(self), param0, param1, param2.param().abi(), core::mem::transmute(param3), param4).ok() } + unsafe { (windows_core::Interface::vtable(self).BltFast)(windows_core::Interface::as_raw(self), param0, param1, param2.param().abi(), param3 as _, param4).ok() } } pub unsafe fn DeleteAttachedSurface(&self, param0: u32, param1: P1) -> windows_core::Result<()> where @@ -8367,10 +8367,10 @@ impl IDirectDrawSurface2 { unsafe { (windows_core::Interface::vtable(self).DeleteAttachedSurface)(windows_core::Interface::as_raw(self), param0, param1.param().abi()).ok() } } pub unsafe fn EnumAttachedSurfaces(&self, param0: *mut core::ffi::c_void, param1: LPDDENUMSURFACESCALLBACK) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumAttachedSurfaces)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumAttachedSurfaces)(windows_core::Interface::as_raw(self), param0 as _, param1).ok() } } pub unsafe fn EnumOverlayZOrders(&self, param0: u32, param1: *mut core::ffi::c_void, param2: LPDDENUMSURFACESCALLBACK) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumOverlayZOrders)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), param2).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumOverlayZOrders)(windows_core::Interface::as_raw(self), param0, param1 as _, param2).ok() } } pub unsafe fn Flip(&self, param0: P0, param1: u32) -> windows_core::Result<()> where @@ -8379,13 +8379,13 @@ impl IDirectDrawSurface2 { unsafe { (windows_core::Interface::vtable(self).Flip)(windows_core::Interface::as_raw(self), param0.param().abi(), param1).ok() } } pub unsafe fn GetAttachedSurface(&self, param0: *mut DDSCAPS, param1: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAttachedSurface)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAttachedSurface)(windows_core::Interface::as_raw(self), param0 as _, core::mem::transmute(param1)).ok() } } pub unsafe fn GetBltStatus(&self, param0: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetBltStatus)(windows_core::Interface::as_raw(self), param0).ok() } } pub unsafe fn GetCaps(&self, param0: *mut DDSCAPS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetClipper(&self) -> windows_core::Result { unsafe { @@ -8394,17 +8394,17 @@ impl IDirectDrawSurface2 { } } pub unsafe fn GetColorKey(&self, param0: u32, param1: *mut DDCOLORKEY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetColorKey)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetColorKey)(windows_core::Interface::as_raw(self), param0, param1 as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetDC(&self, param0: *mut super::Gdi::HDC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDC)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDC)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetFlipStatus(&self, param0: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetFlipStatus)(windows_core::Interface::as_raw(self), param0).ok() } } pub unsafe fn GetOverlayPosition(&self, param0: *mut i32, param1: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOverlayPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOverlayPosition)(windows_core::Interface::as_raw(self), param0 as _, param1 as _).ok() } } pub unsafe fn GetPalette(&self) -> windows_core::Result { unsafe { @@ -8413,22 +8413,22 @@ impl IDirectDrawSurface2 { } } pub unsafe fn GetPixelFormat(&self, param0: *mut DDPIXELFORMAT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPixelFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPixelFormat)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetSurfaceDesc(&self, param0: *mut DDSURFACEDESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSurfaceDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSurfaceDesc)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn Initialize(&self, param0: P0, param1: *mut DDSURFACEDESC) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), param0.param().abi(), param1 as _).ok() } } pub unsafe fn IsLost(&self) -> windows_core::Result<()> { unsafe { (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: super::super::Foundation::HANDLE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), param2, param3).ok() } + unsafe { (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), param0 as _, param1 as _, param2, param3).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn ReleaseDC(&self, param0: super::Gdi::HDC) -> windows_core::Result<()> { @@ -8444,7 +8444,7 @@ impl IDirectDrawSurface2 { unsafe { (windows_core::Interface::vtable(self).SetClipper)(windows_core::Interface::as_raw(self), param0.param().abi()).ok() } } pub unsafe fn SetColorKey(&self, param0: u32, param1: *mut DDCOLORKEY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetColorKey)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetColorKey)(windows_core::Interface::as_raw(self), param0, param1 as _).ok() } } pub unsafe fn SetOverlayPosition(&self, param0: i32, param1: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetOverlayPosition)(windows_core::Interface::as_raw(self), param0, param1).ok() } @@ -8456,13 +8456,13 @@ impl IDirectDrawSurface2 { unsafe { (windows_core::Interface::vtable(self).SetPalette)(windows_core::Interface::as_raw(self), param0.param().abi()).ok() } } pub unsafe fn Unlock(&self, param0: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Unlock)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).Unlock)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn UpdateOverlay(&self, param0: *mut super::super::Foundation::RECT, param1: P1, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDOVERLAYFX) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).UpdateOverlay)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1.param().abi(), core::mem::transmute(param2), param3, core::mem::transmute(param4)).ok() } + unsafe { (windows_core::Interface::vtable(self).UpdateOverlay)(windows_core::Interface::as_raw(self), param0 as _, param1.param().abi(), param2 as _, param3, core::mem::transmute(param4)).ok() } } pub unsafe fn UpdateOverlayDisplay(&self, param0: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UpdateOverlayDisplay)(windows_core::Interface::as_raw(self), param0).ok() } @@ -8474,7 +8474,7 @@ impl IDirectDrawSurface2 { unsafe { (windows_core::Interface::vtable(self).UpdateOverlayZOrder)(windows_core::Interface::as_raw(self), param0, param1.param().abi()).ok() } } pub unsafe fn GetDDInterface(&self, param0: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDDInterface)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDDInterface)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn PageLock(&self, param0: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).PageLock)(windows_core::Interface::as_raw(self), param0).ok() } @@ -8855,13 +8855,13 @@ impl IDirectDrawSurface3 { unsafe { (windows_core::Interface::vtable(self).AddAttachedSurface)(windows_core::Interface::as_raw(self), param0.param().abi()).ok() } } pub unsafe fn AddOverlayDirtyRect(&self, param0: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AddOverlayDirtyRect)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).AddOverlayDirtyRect)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn Blt(&self, param0: *mut super::super::Foundation::RECT, param1: P1, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDBLTFX) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Blt)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1.param().abi(), core::mem::transmute(param2), param3, core::mem::transmute(param4)).ok() } + unsafe { (windows_core::Interface::vtable(self).Blt)(windows_core::Interface::as_raw(self), param0 as _, param1.param().abi(), param2 as _, param3, core::mem::transmute(param4)).ok() } } pub unsafe fn BltBatch(&self, param0: *mut DDBLTBATCH, param1: u32, param2: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).BltBatch)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1, param2).ok() } @@ -8870,7 +8870,7 @@ impl IDirectDrawSurface3 { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).BltFast)(windows_core::Interface::as_raw(self), param0, param1, param2.param().abi(), core::mem::transmute(param3), param4).ok() } + unsafe { (windows_core::Interface::vtable(self).BltFast)(windows_core::Interface::as_raw(self), param0, param1, param2.param().abi(), param3 as _, param4).ok() } } pub unsafe fn DeleteAttachedSurface(&self, param0: u32, param1: P1) -> windows_core::Result<()> where @@ -8879,10 +8879,10 @@ impl IDirectDrawSurface3 { unsafe { (windows_core::Interface::vtable(self).DeleteAttachedSurface)(windows_core::Interface::as_raw(self), param0, param1.param().abi()).ok() } } pub unsafe fn EnumAttachedSurfaces(&self, param0: *mut core::ffi::c_void, param1: LPDDENUMSURFACESCALLBACK) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumAttachedSurfaces)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumAttachedSurfaces)(windows_core::Interface::as_raw(self), param0 as _, param1).ok() } } pub unsafe fn EnumOverlayZOrders(&self, param0: u32, param1: *mut core::ffi::c_void, param2: LPDDENUMSURFACESCALLBACK) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumOverlayZOrders)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), param2).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumOverlayZOrders)(windows_core::Interface::as_raw(self), param0, param1 as _, param2).ok() } } pub unsafe fn Flip(&self, param0: P0, param1: u32) -> windows_core::Result<()> where @@ -8891,13 +8891,13 @@ impl IDirectDrawSurface3 { unsafe { (windows_core::Interface::vtable(self).Flip)(windows_core::Interface::as_raw(self), param0.param().abi(), param1).ok() } } pub unsafe fn GetAttachedSurface(&self, param0: *mut DDSCAPS, param1: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAttachedSurface)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAttachedSurface)(windows_core::Interface::as_raw(self), param0 as _, core::mem::transmute(param1)).ok() } } pub unsafe fn GetBltStatus(&self, param0: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetBltStatus)(windows_core::Interface::as_raw(self), param0).ok() } } pub unsafe fn GetCaps(&self, param0: *mut DDSCAPS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetClipper(&self) -> windows_core::Result { unsafe { @@ -8906,17 +8906,17 @@ impl IDirectDrawSurface3 { } } pub unsafe fn GetColorKey(&self, param0: u32, param1: *mut DDCOLORKEY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetColorKey)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetColorKey)(windows_core::Interface::as_raw(self), param0, param1 as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetDC(&self, param0: *mut super::Gdi::HDC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDC)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDC)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetFlipStatus(&self, param0: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetFlipStatus)(windows_core::Interface::as_raw(self), param0).ok() } } pub unsafe fn GetOverlayPosition(&self, param0: *mut i32, param1: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOverlayPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOverlayPosition)(windows_core::Interface::as_raw(self), param0 as _, param1 as _).ok() } } pub unsafe fn GetPalette(&self) -> windows_core::Result { unsafe { @@ -8925,22 +8925,22 @@ impl IDirectDrawSurface3 { } } pub unsafe fn GetPixelFormat(&self, param0: *mut DDPIXELFORMAT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPixelFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPixelFormat)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetSurfaceDesc(&self, param0: *mut DDSURFACEDESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSurfaceDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSurfaceDesc)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn Initialize(&self, param0: P0, param1: *mut DDSURFACEDESC) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), param0.param().abi(), param1 as _).ok() } } pub unsafe fn IsLost(&self) -> windows_core::Result<()> { unsafe { (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: super::super::Foundation::HANDLE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), param2, param3).ok() } + unsafe { (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), param0 as _, param1 as _, param2, param3).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn ReleaseDC(&self, param0: super::Gdi::HDC) -> windows_core::Result<()> { @@ -8956,7 +8956,7 @@ impl IDirectDrawSurface3 { unsafe { (windows_core::Interface::vtable(self).SetClipper)(windows_core::Interface::as_raw(self), param0.param().abi()).ok() } } pub unsafe fn SetColorKey(&self, param0: u32, param1: *mut DDCOLORKEY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetColorKey)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetColorKey)(windows_core::Interface::as_raw(self), param0, param1 as _).ok() } } pub unsafe fn SetOverlayPosition(&self, param0: i32, param1: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetOverlayPosition)(windows_core::Interface::as_raw(self), param0, param1).ok() } @@ -8968,13 +8968,13 @@ impl IDirectDrawSurface3 { unsafe { (windows_core::Interface::vtable(self).SetPalette)(windows_core::Interface::as_raw(self), param0.param().abi()).ok() } } pub unsafe fn Unlock(&self, param0: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Unlock)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).Unlock)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn UpdateOverlay(&self, param0: *mut super::super::Foundation::RECT, param1: P1, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDOVERLAYFX) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).UpdateOverlay)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1.param().abi(), core::mem::transmute(param2), param3, core::mem::transmute(param4)).ok() } + unsafe { (windows_core::Interface::vtable(self).UpdateOverlay)(windows_core::Interface::as_raw(self), param0 as _, param1.param().abi(), param2 as _, param3, core::mem::transmute(param4)).ok() } } pub unsafe fn UpdateOverlayDisplay(&self, param0: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UpdateOverlayDisplay)(windows_core::Interface::as_raw(self), param0).ok() } @@ -8986,7 +8986,7 @@ impl IDirectDrawSurface3 { unsafe { (windows_core::Interface::vtable(self).UpdateOverlayZOrder)(windows_core::Interface::as_raw(self), param0, param1.param().abi()).ok() } } pub unsafe fn GetDDInterface(&self, param0: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDDInterface)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDDInterface)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn PageLock(&self, param0: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).PageLock)(windows_core::Interface::as_raw(self), param0).ok() } @@ -8995,7 +8995,7 @@ impl IDirectDrawSurface3 { unsafe { (windows_core::Interface::vtable(self).PageUnlock)(windows_core::Interface::as_raw(self), param0).ok() } } pub unsafe fn SetSurfaceDesc(&self, param0: *mut DDSURFACEDESC, param1: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetSurfaceDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1).ok() } + unsafe { (windows_core::Interface::vtable(self).SetSurfaceDesc)(windows_core::Interface::as_raw(self), param0 as _, param1).ok() } } } #[repr(C)] @@ -9379,13 +9379,13 @@ impl IDirectDrawSurface4 { unsafe { (windows_core::Interface::vtable(self).AddAttachedSurface)(windows_core::Interface::as_raw(self), param0.param().abi()).ok() } } pub unsafe fn AddOverlayDirtyRect(&self, param0: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AddOverlayDirtyRect)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).AddOverlayDirtyRect)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn Blt(&self, param0: *mut super::super::Foundation::RECT, param1: P1, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDBLTFX) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Blt)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1.param().abi(), core::mem::transmute(param2), param3, core::mem::transmute(param4)).ok() } + unsafe { (windows_core::Interface::vtable(self).Blt)(windows_core::Interface::as_raw(self), param0 as _, param1.param().abi(), param2 as _, param3, core::mem::transmute(param4)).ok() } } pub unsafe fn BltBatch(&self, param0: *mut DDBLTBATCH, param1: u32, param2: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).BltBatch)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1, param2).ok() } @@ -9394,7 +9394,7 @@ impl IDirectDrawSurface4 { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).BltFast)(windows_core::Interface::as_raw(self), param0, param1, param2.param().abi(), core::mem::transmute(param3), param4).ok() } + unsafe { (windows_core::Interface::vtable(self).BltFast)(windows_core::Interface::as_raw(self), param0, param1, param2.param().abi(), param3 as _, param4).ok() } } pub unsafe fn DeleteAttachedSurface(&self, param0: u32, param1: P1) -> windows_core::Result<()> where @@ -9403,10 +9403,10 @@ impl IDirectDrawSurface4 { unsafe { (windows_core::Interface::vtable(self).DeleteAttachedSurface)(windows_core::Interface::as_raw(self), param0, param1.param().abi()).ok() } } pub unsafe fn EnumAttachedSurfaces(&self, param0: *mut core::ffi::c_void, param1: LPDDENUMSURFACESCALLBACK2) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumAttachedSurfaces)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumAttachedSurfaces)(windows_core::Interface::as_raw(self), param0 as _, param1).ok() } } pub unsafe fn EnumOverlayZOrders(&self, param0: u32, param1: *mut core::ffi::c_void, param2: LPDDENUMSURFACESCALLBACK2) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumOverlayZOrders)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), param2).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumOverlayZOrders)(windows_core::Interface::as_raw(self), param0, param1 as _, param2).ok() } } pub unsafe fn Flip(&self, param0: P0, param1: u32) -> windows_core::Result<()> where @@ -9415,13 +9415,13 @@ impl IDirectDrawSurface4 { unsafe { (windows_core::Interface::vtable(self).Flip)(windows_core::Interface::as_raw(self), param0.param().abi(), param1).ok() } } pub unsafe fn GetAttachedSurface(&self, param0: *mut DDSCAPS2, param1: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAttachedSurface)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAttachedSurface)(windows_core::Interface::as_raw(self), param0 as _, core::mem::transmute(param1)).ok() } } pub unsafe fn GetBltStatus(&self, param0: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetBltStatus)(windows_core::Interface::as_raw(self), param0).ok() } } pub unsafe fn GetCaps(&self, param0: *mut DDSCAPS2) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetClipper(&self) -> windows_core::Result { unsafe { @@ -9430,17 +9430,17 @@ impl IDirectDrawSurface4 { } } pub unsafe fn GetColorKey(&self, param0: u32, param1: *mut DDCOLORKEY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetColorKey)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetColorKey)(windows_core::Interface::as_raw(self), param0, param1 as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetDC(&self, param0: *mut super::Gdi::HDC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDC)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDC)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetFlipStatus(&self, param0: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetFlipStatus)(windows_core::Interface::as_raw(self), param0).ok() } } pub unsafe fn GetOverlayPosition(&self, param0: *mut i32, param1: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOverlayPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOverlayPosition)(windows_core::Interface::as_raw(self), param0 as _, param1 as _).ok() } } pub unsafe fn GetPalette(&self) -> windows_core::Result { unsafe { @@ -9449,22 +9449,22 @@ impl IDirectDrawSurface4 { } } pub unsafe fn GetPixelFormat(&self, param0: *mut DDPIXELFORMAT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPixelFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPixelFormat)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetSurfaceDesc(&self, param0: *mut DDSURFACEDESC2) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSurfaceDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSurfaceDesc)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn Initialize(&self, param0: P0, param1: *mut DDSURFACEDESC2) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), param0.param().abi(), param1 as _).ok() } } pub unsafe fn IsLost(&self) -> windows_core::Result<()> { unsafe { (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: super::super::Foundation::HANDLE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), param2, param3).ok() } + unsafe { (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), param0 as _, param1 as _, param2, param3).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn ReleaseDC(&self, param0: super::Gdi::HDC) -> windows_core::Result<()> { @@ -9480,7 +9480,7 @@ impl IDirectDrawSurface4 { unsafe { (windows_core::Interface::vtable(self).SetClipper)(windows_core::Interface::as_raw(self), param0.param().abi()).ok() } } pub unsafe fn SetColorKey(&self, param0: u32, param1: *mut DDCOLORKEY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetColorKey)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetColorKey)(windows_core::Interface::as_raw(self), param0, param1 as _).ok() } } pub unsafe fn SetOverlayPosition(&self, param0: i32, param1: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetOverlayPosition)(windows_core::Interface::as_raw(self), param0, param1).ok() } @@ -9492,13 +9492,13 @@ impl IDirectDrawSurface4 { unsafe { (windows_core::Interface::vtable(self).SetPalette)(windows_core::Interface::as_raw(self), param0.param().abi()).ok() } } pub unsafe fn Unlock(&self, param0: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Unlock)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).Unlock)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn UpdateOverlay(&self, param0: *mut super::super::Foundation::RECT, param1: P1, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDOVERLAYFX) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).UpdateOverlay)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1.param().abi(), core::mem::transmute(param2), param3, core::mem::transmute(param4)).ok() } + unsafe { (windows_core::Interface::vtable(self).UpdateOverlay)(windows_core::Interface::as_raw(self), param0 as _, param1.param().abi(), param2 as _, param3, core::mem::transmute(param4)).ok() } } pub unsafe fn UpdateOverlayDisplay(&self, param0: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UpdateOverlayDisplay)(windows_core::Interface::as_raw(self), param0).ok() } @@ -9510,7 +9510,7 @@ impl IDirectDrawSurface4 { unsafe { (windows_core::Interface::vtable(self).UpdateOverlayZOrder)(windows_core::Interface::as_raw(self), param0, param1.param().abi()).ok() } } pub unsafe fn GetDDInterface(&self, param0: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDDInterface)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDDInterface)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn PageLock(&self, param0: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).PageLock)(windows_core::Interface::as_raw(self), param0).ok() } @@ -9519,19 +9519,19 @@ impl IDirectDrawSurface4 { unsafe { (windows_core::Interface::vtable(self).PageUnlock)(windows_core::Interface::as_raw(self), param0).ok() } } pub unsafe fn SetSurfaceDesc(&self, param0: *mut DDSURFACEDESC2, param1: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetSurfaceDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1).ok() } + unsafe { (windows_core::Interface::vtable(self).SetSurfaceDesc)(windows_core::Interface::as_raw(self), param0 as _, param1).ok() } } pub unsafe fn SetPrivateData(&self, param0: *const windows_core::GUID, param1: *mut core::ffi::c_void, param2: u32, param3: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), param2, param3).ok() } + unsafe { (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), param0, param1 as _, param2, param3).ok() } } pub unsafe fn GetPrivateData(&self, param0: *const windows_core::GUID, param1: *mut core::ffi::c_void, param2: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), core::mem::transmute(param2)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), param0, param1 as _, param2 as _).ok() } } pub unsafe fn FreePrivateData(&self, param0: *const windows_core::GUID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).FreePrivateData)(windows_core::Interface::as_raw(self), param0).ok() } } pub unsafe fn GetUniquenessValue(&self, param0: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetUniquenessValue)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUniquenessValue)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn ChangeUniquenessValue(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ChangeUniquenessValue)(windows_core::Interface::as_raw(self)).ok() } @@ -9963,13 +9963,13 @@ impl IDirectDrawSurface7 { unsafe { (windows_core::Interface::vtable(self).AddAttachedSurface)(windows_core::Interface::as_raw(self), param0.param().abi()).ok() } } pub unsafe fn AddOverlayDirtyRect(&self, param0: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AddOverlayDirtyRect)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).AddOverlayDirtyRect)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn Blt(&self, param0: *mut super::super::Foundation::RECT, param1: P1, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDBLTFX) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Blt)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1.param().abi(), core::mem::transmute(param2), param3, core::mem::transmute(param4)).ok() } + unsafe { (windows_core::Interface::vtable(self).Blt)(windows_core::Interface::as_raw(self), param0 as _, param1.param().abi(), param2 as _, param3, core::mem::transmute(param4)).ok() } } pub unsafe fn BltBatch(&self, param0: *mut DDBLTBATCH, param1: u32, param2: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).BltBatch)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1, param2).ok() } @@ -9978,7 +9978,7 @@ impl IDirectDrawSurface7 { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).BltFast)(windows_core::Interface::as_raw(self), param0, param1, param2.param().abi(), core::mem::transmute(param3), param4).ok() } + unsafe { (windows_core::Interface::vtable(self).BltFast)(windows_core::Interface::as_raw(self), param0, param1, param2.param().abi(), param3 as _, param4).ok() } } pub unsafe fn DeleteAttachedSurface(&self, param0: u32, param1: P1) -> windows_core::Result<()> where @@ -9987,10 +9987,10 @@ impl IDirectDrawSurface7 { unsafe { (windows_core::Interface::vtable(self).DeleteAttachedSurface)(windows_core::Interface::as_raw(self), param0, param1.param().abi()).ok() } } pub unsafe fn EnumAttachedSurfaces(&self, param0: *mut core::ffi::c_void, param1: LPDDENUMSURFACESCALLBACK7) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumAttachedSurfaces)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumAttachedSurfaces)(windows_core::Interface::as_raw(self), param0 as _, param1).ok() } } pub unsafe fn EnumOverlayZOrders(&self, param0: u32, param1: *mut core::ffi::c_void, param2: LPDDENUMSURFACESCALLBACK7) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumOverlayZOrders)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), param2).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumOverlayZOrders)(windows_core::Interface::as_raw(self), param0, param1 as _, param2).ok() } } pub unsafe fn Flip(&self, param0: P0, param1: u32) -> windows_core::Result<()> where @@ -9999,13 +9999,13 @@ impl IDirectDrawSurface7 { unsafe { (windows_core::Interface::vtable(self).Flip)(windows_core::Interface::as_raw(self), param0.param().abi(), param1).ok() } } pub unsafe fn GetAttachedSurface(&self, param0: *mut DDSCAPS2, param1: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAttachedSurface)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAttachedSurface)(windows_core::Interface::as_raw(self), param0 as _, core::mem::transmute(param1)).ok() } } pub unsafe fn GetBltStatus(&self, param0: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetBltStatus)(windows_core::Interface::as_raw(self), param0).ok() } } pub unsafe fn GetCaps(&self, param0: *mut DDSCAPS2) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetClipper(&self) -> windows_core::Result { unsafe { @@ -10014,17 +10014,17 @@ impl IDirectDrawSurface7 { } } pub unsafe fn GetColorKey(&self, param0: u32, param1: *mut DDCOLORKEY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetColorKey)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetColorKey)(windows_core::Interface::as_raw(self), param0, param1 as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetDC(&self, param0: *mut super::Gdi::HDC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDC)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDC)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetFlipStatus(&self, param0: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetFlipStatus)(windows_core::Interface::as_raw(self), param0).ok() } } pub unsafe fn GetOverlayPosition(&self, param0: *mut i32, param1: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOverlayPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOverlayPosition)(windows_core::Interface::as_raw(self), param0 as _, param1 as _).ok() } } pub unsafe fn GetPalette(&self) -> windows_core::Result { unsafe { @@ -10033,22 +10033,22 @@ impl IDirectDrawSurface7 { } } pub unsafe fn GetPixelFormat(&self, param0: *mut DDPIXELFORMAT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPixelFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPixelFormat)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetSurfaceDesc(&self, param0: *mut DDSURFACEDESC2) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSurfaceDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSurfaceDesc)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn Initialize(&self, param0: P0, param1: *mut DDSURFACEDESC2) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), param0.param().abi(), param1 as _).ok() } } pub unsafe fn IsLost(&self) -> windows_core::Result<()> { unsafe { (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: super::super::Foundation::HANDLE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), param2, param3).ok() } + unsafe { (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), param0 as _, param1 as _, param2, param3).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn ReleaseDC(&self, param0: super::Gdi::HDC) -> windows_core::Result<()> { @@ -10064,7 +10064,7 @@ impl IDirectDrawSurface7 { unsafe { (windows_core::Interface::vtable(self).SetClipper)(windows_core::Interface::as_raw(self), param0.param().abi()).ok() } } pub unsafe fn SetColorKey(&self, param0: u32, param1: *mut DDCOLORKEY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetColorKey)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetColorKey)(windows_core::Interface::as_raw(self), param0, param1 as _).ok() } } pub unsafe fn SetOverlayPosition(&self, param0: i32, param1: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetOverlayPosition)(windows_core::Interface::as_raw(self), param0, param1).ok() } @@ -10076,13 +10076,13 @@ impl IDirectDrawSurface7 { unsafe { (windows_core::Interface::vtable(self).SetPalette)(windows_core::Interface::as_raw(self), param0.param().abi()).ok() } } pub unsafe fn Unlock(&self, param0: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Unlock)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).Unlock)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn UpdateOverlay(&self, param0: *mut super::super::Foundation::RECT, param1: P1, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDOVERLAYFX) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).UpdateOverlay)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1.param().abi(), core::mem::transmute(param2), param3, core::mem::transmute(param4)).ok() } + unsafe { (windows_core::Interface::vtable(self).UpdateOverlay)(windows_core::Interface::as_raw(self), param0 as _, param1.param().abi(), param2 as _, param3, core::mem::transmute(param4)).ok() } } pub unsafe fn UpdateOverlayDisplay(&self, param0: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UpdateOverlayDisplay)(windows_core::Interface::as_raw(self), param0).ok() } @@ -10094,7 +10094,7 @@ impl IDirectDrawSurface7 { unsafe { (windows_core::Interface::vtable(self).UpdateOverlayZOrder)(windows_core::Interface::as_raw(self), param0, param1.param().abi()).ok() } } pub unsafe fn GetDDInterface(&self, param0: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDDInterface)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDDInterface)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn PageLock(&self, param0: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).PageLock)(windows_core::Interface::as_raw(self), param0).ok() } @@ -10103,19 +10103,19 @@ impl IDirectDrawSurface7 { unsafe { (windows_core::Interface::vtable(self).PageUnlock)(windows_core::Interface::as_raw(self), param0).ok() } } pub unsafe fn SetSurfaceDesc(&self, param0: *mut DDSURFACEDESC2, param1: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetSurfaceDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1).ok() } + unsafe { (windows_core::Interface::vtable(self).SetSurfaceDesc)(windows_core::Interface::as_raw(self), param0 as _, param1).ok() } } pub unsafe fn SetPrivateData(&self, param0: *const windows_core::GUID, param1: *mut core::ffi::c_void, param2: u32, param3: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), param2, param3).ok() } + unsafe { (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), param0, param1 as _, param2, param3).ok() } } pub unsafe fn GetPrivateData(&self, param0: *const windows_core::GUID, param1: *mut core::ffi::c_void, param2: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), param0, core::mem::transmute(param1), core::mem::transmute(param2)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), param0, param1 as _, param2 as _).ok() } } pub unsafe fn FreePrivateData(&self, param0: *const windows_core::GUID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).FreePrivateData)(windows_core::Interface::as_raw(self), param0).ok() } } pub unsafe fn GetUniquenessValue(&self, param0: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetUniquenessValue)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUniquenessValue)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn ChangeUniquenessValue(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ChangeUniquenessValue)(windows_core::Interface::as_raw(self)).ok() } @@ -10124,13 +10124,13 @@ impl IDirectDrawSurface7 { unsafe { (windows_core::Interface::vtable(self).SetPriority)(windows_core::Interface::as_raw(self), param0).ok() } } pub unsafe fn GetPriority(&self, param0: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPriority)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPriority)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn SetLOD(&self, param0: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetLOD)(windows_core::Interface::as_raw(self), param0).ok() } } pub unsafe fn GetLOD(&self, param0: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLOD)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLOD)(windows_core::Interface::as_raw(self), param0 as _).ok() } } } #[repr(C)] @@ -10589,7 +10589,7 @@ windows_core::imp::define_interface!(IDirectDrawSurfaceKernel, IDirectDrawSurfac windows_core::imp::interface_hierarchy!(IDirectDrawSurfaceKernel, windows_core::IUnknown); impl IDirectDrawSurfaceKernel { pub unsafe fn GetKernelHandle(&self, param0: *mut usize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetKernelHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetKernelHandle)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn ReleaseKernelHandle(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ReleaseKernelHandle)(windows_core::Interface::as_raw(self)).ok() } @@ -10640,28 +10640,28 @@ impl IDirectDrawVideoPort { unsafe { (windows_core::Interface::vtable(self).Flip)(windows_core::Interface::as_raw(self), param0.param().abi(), param1).ok() } } pub unsafe fn GetBandwidthInfo(&self, param0: *mut DDPIXELFORMAT, param1: u32, param2: u32, param3: u32, param4: *mut DDVIDEOPORTBANDWIDTH) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBandwidthInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1, param2, param3, core::mem::transmute(param4)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBandwidthInfo)(windows_core::Interface::as_raw(self), param0 as _, param1, param2, param3, param4 as _).ok() } } pub unsafe fn GetColorControls(&self, param0: *mut DDCOLORCONTROL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetColorControls)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetColorControls)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetInputFormats(&self, lpnumformats: *mut u32, param1: Option<*mut DDPIXELFORMAT>, param2: u32) -> windows_core::Result<()> { - unsafe { (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())), param2).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInputFormats)(windows_core::Interface::as_raw(self), lpnumformats as _, param1.unwrap_or(core::mem::zeroed()) as _, param2).ok() } } pub unsafe fn GetOutputFormats(&self, param0: *mut DDPIXELFORMAT, lpnumformats: *mut u32, param2: Option<*mut DDPIXELFORMAT>, param3: u32) -> windows_core::Result<()> { - unsafe { (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())), param3).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOutputFormats)(windows_core::Interface::as_raw(self), param0 as _, lpnumformats as _, param2.unwrap_or(core::mem::zeroed()) as _, param3).ok() } } pub unsafe fn GetFieldPolarity(&self, param0: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFieldPolarity)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFieldPolarity)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetVideoLine(&self, param0: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVideoLine)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVideoLine)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn GetVideoSignalStatus(&self, param0: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVideoSignalStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVideoSignalStatus)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn SetColorControls(&self, param0: *mut DDCOLORCONTROL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetColorControls)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetColorControls)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn SetTargetSurface(&self, param0: P0, param1: u32) -> windows_core::Result<()> where @@ -10670,13 +10670,13 @@ impl IDirectDrawVideoPort { unsafe { (windows_core::Interface::vtable(self).SetTargetSurface)(windows_core::Interface::as_raw(self), param0.param().abi(), param1).ok() } } pub unsafe fn StartVideo(&self, param0: *mut DDVIDEOPORTINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).StartVideo)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).StartVideo)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn StopVideo(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).StopVideo)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn UpdateVideo(&self, param0: *mut DDVIDEOPORTINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).UpdateVideo)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).UpdateVideo)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn WaitForSync(&self, param0: u32, param1: u32, param2: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).WaitForSync)(windows_core::Interface::as_raw(self), param0, param1, param2).ok() } @@ -10829,7 +10829,7 @@ windows_core::imp::define_interface!(IDirectDrawVideoPortNotify, IDirectDrawVide windows_core::imp::interface_hierarchy!(IDirectDrawVideoPortNotify, windows_core::IUnknown); impl IDirectDrawVideoPortNotify { pub unsafe fn AcquireNotification(&self, param0: *mut super::super::Foundation::HANDLE, param1: *mut DDVIDEOPORTNOTIFY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AcquireNotification)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).AcquireNotification)(windows_core::Interface::as_raw(self), param0 as _, param1 as _).ok() } } pub unsafe fn ReleaseNotification(&self, param0: super::super::Foundation::HANDLE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ReleaseNotification)(windows_core::Interface::as_raw(self), param0).ok() } diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/DirectManipulation/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/DirectManipulation/mod.rs index a8d4afc442..b0c7d35428 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/DirectManipulation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/DirectManipulation/mod.rs @@ -610,7 +610,7 @@ impl IDirectManipulationContent { where T: windows_core::Interface, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetTag)(windows_core::Interface::as_raw(self), &T::IID, result__ as *mut _ as *mut _, id.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetTag(&self, object: P0, id: u32) -> windows_core::Result<()> where @@ -871,7 +871,7 @@ windows_core::imp::define_interface!(IDirectManipulationFrameInfoProvider, IDire windows_core::imp::interface_hierarchy!(IDirectManipulationFrameInfoProvider, windows_core::IUnknown); impl IDirectManipulationFrameInfoProvider { pub unsafe fn GetNextFrameInfo(&self, time: *mut u64, processtime: *mut u64, compositiontime: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNextFrameInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(time), core::mem::transmute(processtime), core::mem::transmute(compositiontime)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNextFrameInfo)(windows_core::Interface::as_raw(self), time as _, processtime as _, compositiontime as _).ok() } } } #[repr(C)] @@ -940,7 +940,7 @@ impl IDirectManipulationManager { unsafe { (windows_core::Interface::vtable(self).Deactivate)(windows_core::Interface::as_raw(self), window).ok() } } pub unsafe fn RegisterHitTestTarget(&self, window: super::super::Foundation::HWND, hittestwindow: Option, r#type: DIRECTMANIPULATION_HITTEST_TYPE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RegisterHitTestTarget)(windows_core::Interface::as_raw(self), window, core::mem::transmute(hittestwindow.unwrap_or(core::mem::zeroed())), r#type).ok() } + unsafe { (windows_core::Interface::vtable(self).RegisterHitTestTarget)(windows_core::Interface::as_raw(self), window, hittestwindow.unwrap_or(core::mem::zeroed()) as _, r#type).ok() } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn ProcessInput(&self, message: *const super::super::UI::WindowsAndMessaging::MSG) -> windows_core::Result { @@ -1179,7 +1179,7 @@ impl IDirectManipulationPrimaryContent { unsafe { (windows_core::Interface::vtable(self).GetInertiaEndTransform)(windows_core::Interface::as_raw(self), core::mem::transmute(matrix.as_ptr()), matrix.len().try_into().unwrap()).ok() } } pub unsafe fn GetCenterPoint(&self, centerx: *mut f32, centery: *mut f32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCenterPoint)(windows_core::Interface::as_raw(self), core::mem::transmute(centerx), core::mem::transmute(centery)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCenterPoint)(windows_core::Interface::as_raw(self), centerx as _, centery as _).ok() } } } #[repr(C)] @@ -1410,7 +1410,7 @@ impl IDirectManipulationViewport { where T: windows_core::Interface, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetTag)(windows_core::Interface::as_raw(self), &T::IID, result__ as *mut _ as *mut _, id.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetTag(&self, object: P0, id: u32) -> windows_core::Result<()> where @@ -1479,7 +1479,7 @@ impl IDirectManipulationViewport { { unsafe { let mut result__ = core::mem::zeroed(); - (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__) + (windows_core::Interface::vtable(self).AddEventHandler)(windows_core::Interface::as_raw(self), window.unwrap_or(core::mem::zeroed()) as _, eventhandler.param().abi(), &mut result__).map(|| result__) } } pub unsafe fn RemoveEventHandler(&self, cookie: u32) -> windows_core::Result<()> { 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 81540dc628..0ce0cae38a 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/DirectWrite/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/DirectWrite/mod.rs @@ -1894,7 +1894,7 @@ impl IDWriteBitmapRenderTarget { where P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DrawGlyphRun)(windows_core::Interface::as_raw(self), baselineoriginx, baselineoriginy, measuringmode, core::mem::transmute(glyphrun), renderingparams.param().abi(), textcolor, core::mem::transmute(blackboxrect.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).DrawGlyphRun)(windows_core::Interface::as_raw(self), baselineoriginx, baselineoriginy, measuringmode, core::mem::transmute(glyphrun), renderingparams.param().abi(), textcolor, blackboxrect.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetMemoryDC(&self) -> super::Gdi::HDC { @@ -1907,10 +1907,10 @@ impl IDWriteBitmapRenderTarget { unsafe { (windows_core::Interface::vtable(self).SetPixelsPerDip)(windows_core::Interface::as_raw(self), pixelsperdip).ok() } } pub unsafe fn GetCurrentTransform(&self, transform: *mut DWRITE_MATRIX) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrentTransform)(windows_core::Interface::as_raw(self), core::mem::transmute(transform)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentTransform)(windows_core::Interface::as_raw(self), transform as _).ok() } } pub unsafe fn SetCurrentTransform(&self, transform: Option<*const DWRITE_MATRIX>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetCurrentTransform)(windows_core::Interface::as_raw(self), core::mem::transmute(transform.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetCurrentTransform)(windows_core::Interface::as_raw(self), transform.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSize(&self) -> windows_core::Result { unsafe { @@ -2150,13 +2150,13 @@ impl IDWriteBitmapRenderTarget3 { unsafe { (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: super::super::Foundation::COLORREF, colorpaletteindex: u32, blackboxrect: Option<*mut super::super::Foundation::RECT>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DrawPaintGlyphRun)(windows_core::Interface::as_raw(self), baselineoriginx, baselineoriginy, measuringmode, core::mem::transmute(glyphrun), glyphimageformat, textcolor, colorpaletteindex, core::mem::transmute(blackboxrect.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).DrawPaintGlyphRun)(windows_core::Interface::as_raw(self), baselineoriginx, baselineoriginy, measuringmode, core::mem::transmute(glyphrun), glyphimageformat, textcolor, colorpaletteindex, blackboxrect.unwrap_or(core::mem::zeroed()) as _).ok() } } 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, { - unsafe { (windows_core::Interface::vtable(self).DrawGlyphRunWithColorSupport)(windows_core::Interface::as_raw(self), baselineoriginx, baselineoriginy, measuringmode, core::mem::transmute(glyphrun), renderingparams.param().abi(), textcolor, colorpaletteindex, core::mem::transmute(blackboxrect.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).DrawGlyphRunWithColorSupport)(windows_core::Interface::as_raw(self), baselineoriginx, baselineoriginy, measuringmode, core::mem::transmute(glyphrun), renderingparams.param().abi(), textcolor, colorpaletteindex, blackboxrect.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -2355,7 +2355,7 @@ impl IDWriteFactory { { unsafe { 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::mem::zeroed())), &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(), lastwritetime.unwrap_or(core::mem::zeroed()) as _, &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 @@ -2442,7 +2442,7 @@ impl IDWriteFactory { { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateGdiCompatibleTextLayout)(windows_core::Interface::as_raw(self), core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.param().abi(), layoutwidth, layoutheight, pixelsperdip, core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), usegdinatural.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateGdiCompatibleTextLayout)(windows_core::Interface::as_raw(self), core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.param().abi(), layoutwidth, layoutheight, pixelsperdip, transform.unwrap_or(core::mem::zeroed()) as _, usegdinatural.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn CreateEllipsisTrimmingSign(&self, textformat: P0) -> windows_core::Result @@ -2472,7 +2472,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 { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateGlyphRunAnalysis)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphrun), pixelsperdip, core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), renderingmode, measuringmode, baselineoriginx, baselineoriginy, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateGlyphRunAnalysis)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphrun), pixelsperdip, transform.unwrap_or(core::mem::zeroed()) as _, renderingmode, measuringmode, baselineoriginx, baselineoriginy, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } } @@ -2879,7 +2879,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 { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).TranslateColorGlyphRun)(windows_core::Interface::as_raw(self), baselineoriginx, baselineoriginy, core::mem::transmute(glyphrun), core::mem::transmute(glyphrundescription.unwrap_or(core::mem::zeroed())), measuringmode, core::mem::transmute(worldtodevicetransform.unwrap_or(core::mem::zeroed())), colorpaletteindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).TranslateColorGlyphRun)(windows_core::Interface::as_raw(self), baselineoriginx, baselineoriginy, core::mem::transmute(glyphrun), glyphrundescription.unwrap_or(core::mem::zeroed()) as _, measuringmode, worldtodevicetransform.unwrap_or(core::mem::zeroed()) as _, 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 { @@ -2891,7 +2891,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 { unsafe { 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::mem::zeroed())), renderingmode, measuringmode, gridfitmode, antialiasmode, baselineoriginx, baselineoriginy, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateGlyphRunAnalysis)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphrun), transform.unwrap_or(core::mem::zeroed()) as _, renderingmode, measuringmode, gridfitmode, antialiasmode, baselineoriginx, baselineoriginy, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } } @@ -3006,7 +3006,7 @@ 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 { unsafe { 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::mem::zeroed())), renderingmode, measuringmode, gridfitmode, antialiasmode, baselineoriginx, baselineoriginy, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateGlyphRunAnalysis)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphrun), transform.unwrap_or(core::mem::zeroed()) as _, renderingmode, measuringmode, gridfitmode, antialiasmode, baselineoriginx, baselineoriginy, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn CreateCustomRenderingParams(&self, gamma: f32, enhancedcontrast: f32, grayscaleenhancedcontrast: f32, cleartypelevel: f32, pixelgeometry: DWRITE_PIXEL_GEOMETRY, renderingmode: DWRITE_RENDERING_MODE1, gridfitmode: DWRITE_GRID_FIT_MODE) -> windows_core::Result { @@ -3030,7 +3030,7 @@ impl IDWriteFactory3 { { unsafe { 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::mem::zeroed())), faceindex, fontsimulations, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateFontFaceReference2)(windows_core::Interface::as_raw(self), filepath.param().abi(), lastwritetime.unwrap_or(core::mem::zeroed()) as _, faceindex, fontsimulations, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn GetSystemFontSet(&self) -> windows_core::Result { @@ -3230,7 +3230,7 @@ impl IDWriteFactory4 { 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 { unsafe { 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::mem::zeroed())), desiredglyphimageformats, measuringmode, core::mem::transmute(worldanddpitransform.unwrap_or(core::mem::zeroed())), 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), glyphrundescription.unwrap_or(core::mem::zeroed()) as _, desiredglyphimageformats, measuringmode, worldanddpitransform.unwrap_or(core::mem::zeroed()) as _, colorpaletteindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] @@ -3244,7 +3244,7 @@ impl IDWriteFactory4 { 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 { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).ComputeGlyphOrigins2)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphrun), measuringmode, core::mem::transmute(baselineorigin), core::mem::transmute(worldanddpitransform.unwrap_or(core::mem::zeroed())), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).ComputeGlyphOrigins2)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphrun), measuringmode, core::mem::transmute(baselineorigin), worldanddpitransform.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| result__) } } } @@ -3744,7 +3744,7 @@ impl IDWriteFactory8 { 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 { unsafe { 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::mem::zeroed())), desiredglyphimageformats, paintfeaturelevel, measuringmode, core::mem::transmute(worldanddpitransform.unwrap_or(core::mem::zeroed())), 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), glyphrundescription.unwrap_or(core::mem::zeroed()) as _, desiredglyphimageformats, paintfeaturelevel, measuringmode, worldanddpitransform.unwrap_or(core::mem::zeroed()) as _, colorpaletteindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } } @@ -3815,13 +3815,13 @@ impl IDWriteFont { } } pub unsafe fn GetInformationalStrings(&self, informationalstringid: DWRITE_INFORMATIONAL_STRING_ID, informationalstrings: *mut Option, exists: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInformationalStrings)(windows_core::Interface::as_raw(self), informationalstringid, core::mem::transmute(informationalstrings), core::mem::transmute(exists)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInformationalStrings)(windows_core::Interface::as_raw(self), informationalstringid, core::mem::transmute(informationalstrings), exists as _).ok() } } pub unsafe fn GetSimulations(&self) -> DWRITE_FONT_SIMULATIONS { unsafe { (windows_core::Interface::vtable(self).GetSimulations)(windows_core::Interface::as_raw(self)) } } pub unsafe fn GetMetrics(&self, fontmetrics: *mut DWRITE_FONT_METRICS) { - unsafe { (windows_core::Interface::vtable(self).GetMetrics)(windows_core::Interface::as_raw(self), core::mem::transmute(fontmetrics)) } + unsafe { (windows_core::Interface::vtable(self).GetMetrics)(windows_core::Interface::as_raw(self), fontmetrics as _) } } pub unsafe fn HasCharacter(&self, unicodevalue: u32) -> windows_core::Result { unsafe { @@ -3988,7 +3988,7 @@ impl core::ops::Deref for IDWriteFont1 { windows_core::imp::interface_hierarchy!(IDWriteFont1, windows_core::IUnknown, IDWriteFont); impl IDWriteFont1 { pub unsafe fn GetMetrics(&self, fontmetrics: *mut DWRITE_FONT_METRICS1) { - unsafe { (windows_core::Interface::vtable(self).GetMetrics)(windows_core::Interface::as_raw(self), core::mem::transmute(fontmetrics)) } + unsafe { (windows_core::Interface::vtable(self).GetMetrics)(windows_core::Interface::as_raw(self), fontmetrics as _) } } pub unsafe fn GetPanose(&self) -> DWRITE_PANOSE { unsafe { @@ -3998,7 +3998,7 @@ impl IDWriteFont1 { } } pub unsafe fn GetUnicodeRanges(&self, unicoderanges: Option<&mut [DWRITE_UNICODE_RANGE]>, actualrangecount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetUnicodeRanges)(windows_core::Interface::as_raw(self), unicoderanges.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(unicoderanges.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(actualrangecount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUnicodeRanges)(windows_core::Interface::as_raw(self), unicoderanges.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(unicoderanges.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), actualrangecount as _).ok() } } pub unsafe fn IsMonospacedFont(&self) -> super::super::Foundation::BOOL { unsafe { (windows_core::Interface::vtable(self).IsMonospacedFont)(windows_core::Interface::as_raw(self)) } @@ -4223,7 +4223,7 @@ impl IDWriteFontCollection { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindFamilyName)(windows_core::Interface::as_raw(self), familyname.param().abi(), core::mem::transmute(index), core::mem::transmute(exists)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindFamilyName)(windows_core::Interface::as_raw(self), familyname.param().abi(), index as _, exists as _).ok() } } pub unsafe fn GetFontFromFontFace(&self, fontface: P0) -> windows_core::Result where @@ -4715,7 +4715,7 @@ impl IDWriteFontFace { unsafe { (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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetFiles)(windows_core::Interface::as_raw(self), numberoffiles as _, fontfiles.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetIndex(&self) -> u32 { unsafe { (windows_core::Interface::vtable(self).GetIndex)(windows_core::Interface::as_raw(self)) } @@ -4727,19 +4727,19 @@ impl IDWriteFontFace { unsafe { (windows_core::Interface::vtable(self).IsSymbolFont)(windows_core::Interface::as_raw(self)) } } pub unsafe fn GetMetrics(&self, fontfacemetrics: *mut DWRITE_FONT_METRICS) { - unsafe { (windows_core::Interface::vtable(self).GetMetrics)(windows_core::Interface::as_raw(self), core::mem::transmute(fontfacemetrics)) } + unsafe { (windows_core::Interface::vtable(self).GetMetrics)(windows_core::Interface::as_raw(self), fontfacemetrics as _) } } pub unsafe fn GetGlyphCount(&self) -> u16 { unsafe { (windows_core::Interface::vtable(self).GetGlyphCount)(windows_core::Interface::as_raw(self)) } } pub unsafe fn GetDesignGlyphMetrics(&self, glyphindices: *const u16, glyphcount: u32, glyphmetrics: *mut DWRITE_GLYPH_METRICS, issideways: bool) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesignGlyphMetrics)(windows_core::Interface::as_raw(self), glyphindices, glyphcount, core::mem::transmute(glyphmetrics), issideways.into()).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesignGlyphMetrics)(windows_core::Interface::as_raw(self), glyphindices, glyphcount, glyphmetrics as _, issideways.into()).ok() } } pub unsafe fn GetGlyphIndices(&self, codepoints: *const u32, codepointcount: u32, glyphindices: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGlyphIndices)(windows_core::Interface::as_raw(self), codepoints, codepointcount, core::mem::transmute(glyphindices)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGlyphIndices)(windows_core::Interface::as_raw(self), codepoints, codepointcount, glyphindices as _).ok() } } pub unsafe fn TryGetFontTable(&self, opentypetabletag: u32, tabledata: *mut *mut core::ffi::c_void, tablesize: *mut u32, tablecontext: *mut *mut core::ffi::c_void, exists: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TryGetFontTable)(windows_core::Interface::as_raw(self), opentypetabletag, core::mem::transmute(tabledata), core::mem::transmute(tablesize), core::mem::transmute(tablecontext), core::mem::transmute(exists)).ok() } + unsafe { (windows_core::Interface::vtable(self).TryGetFontTable)(windows_core::Interface::as_raw(self), opentypetabletag, tabledata as _, tablesize as _, tablecontext as _, exists as _).ok() } } pub unsafe fn ReleaseFontTable(&self, tablecontext: *const core::ffi::c_void) { unsafe { (windows_core::Interface::vtable(self).ReleaseFontTable)(windows_core::Interface::as_raw(self), tablecontext) } @@ -4749,7 +4749,7 @@ impl IDWriteFontFace { where P7: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetGlyphRunOutline)(windows_core::Interface::as_raw(self), emsize, glyphindices, core::mem::transmute(glyphadvances.unwrap_or(core::mem::zeroed())), core::mem::transmute(glyphoffsets.unwrap_or(core::mem::zeroed())), glyphcount, issideways.into(), isrighttoleft.into(), geometrysink.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGlyphRunOutline)(windows_core::Interface::as_raw(self), emsize, glyphindices, glyphadvances.unwrap_or(core::mem::zeroed()) as _, glyphoffsets.unwrap_or(core::mem::zeroed()) as _, glyphcount, issideways.into(), isrighttoleft.into(), geometrysink.param().abi()).ok() } } pub unsafe fn GetRecommendedRenderingMode(&self, emsize: f32, pixelsperdip: f32, measuringmode: DWRITE_MEASURING_MODE, renderingparams: P3) -> windows_core::Result where @@ -4761,10 +4761,10 @@ impl IDWriteFontFace { } } pub unsafe fn GetGdiCompatibleMetrics(&self, emsize: f32, pixelsperdip: f32, transform: Option<*const DWRITE_MATRIX>, fontfacemetrics: *mut DWRITE_FONT_METRICS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGdiCompatibleMetrics)(windows_core::Interface::as_raw(self), emsize, pixelsperdip, core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), core::mem::transmute(fontfacemetrics)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGdiCompatibleMetrics)(windows_core::Interface::as_raw(self), emsize, pixelsperdip, transform.unwrap_or(core::mem::zeroed()) as _, fontfacemetrics as _).ok() } } pub unsafe fn GetGdiCompatibleGlyphMetrics(&self, emsize: f32, pixelsperdip: f32, transform: Option<*const DWRITE_MATRIX>, usegdinatural: bool, glyphindices: *const u16, glyphcount: u32, glyphmetrics: *mut DWRITE_GLYPH_METRICS, issideways: bool) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGdiCompatibleGlyphMetrics)(windows_core::Interface::as_raw(self), emsize, pixelsperdip, core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), usegdinatural.into(), glyphindices, glyphcount, core::mem::transmute(glyphmetrics), issideways.into()).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGdiCompatibleGlyphMetrics)(windows_core::Interface::as_raw(self), emsize, pixelsperdip, transform.unwrap_or(core::mem::zeroed()) as _, usegdinatural.into(), glyphindices, glyphcount, glyphmetrics as _, issideways.into()).ok() } } } #[repr(C)] @@ -4945,10 +4945,10 @@ impl core::ops::Deref for IDWriteFontFace1 { windows_core::imp::interface_hierarchy!(IDWriteFontFace1, windows_core::IUnknown, IDWriteFontFace); impl IDWriteFontFace1 { pub unsafe fn GetMetrics(&self, fontmetrics: *mut DWRITE_FONT_METRICS1) { - unsafe { (windows_core::Interface::vtable(self).GetMetrics)(windows_core::Interface::as_raw(self), core::mem::transmute(fontmetrics)) } + unsafe { (windows_core::Interface::vtable(self).GetMetrics)(windows_core::Interface::as_raw(self), fontmetrics as _) } } pub unsafe fn GetGdiCompatibleMetrics(&self, emsize: f32, pixelsperdip: f32, transform: Option<*const DWRITE_MATRIX>, fontmetrics: *mut DWRITE_FONT_METRICS1) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGdiCompatibleMetrics)(windows_core::Interface::as_raw(self), emsize, pixelsperdip, core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), core::mem::transmute(fontmetrics)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGdiCompatibleMetrics)(windows_core::Interface::as_raw(self), emsize, pixelsperdip, transform.unwrap_or(core::mem::zeroed()) as _, fontmetrics as _).ok() } } pub unsafe fn GetCaretMetrics(&self) -> DWRITE_CARET_METRICS { unsafe { @@ -4958,19 +4958,19 @@ impl IDWriteFontFace1 { } } pub unsafe fn GetUnicodeRanges(&self, unicoderanges: Option<&mut [DWRITE_UNICODE_RANGE]>, actualrangecount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetUnicodeRanges)(windows_core::Interface::as_raw(self), unicoderanges.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(unicoderanges.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(actualrangecount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUnicodeRanges)(windows_core::Interface::as_raw(self), unicoderanges.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(unicoderanges.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), actualrangecount as _).ok() } } pub unsafe fn IsMonospacedFont(&self) -> super::super::Foundation::BOOL { unsafe { (windows_core::Interface::vtable(self).IsMonospacedFont)(windows_core::Interface::as_raw(self)) } } pub unsafe fn GetDesignGlyphAdvances(&self, glyphcount: u32, glyphindices: *const u16, glyphadvances: *mut i32, issideways: bool) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesignGlyphAdvances)(windows_core::Interface::as_raw(self), glyphcount, glyphindices, core::mem::transmute(glyphadvances), issideways.into()).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesignGlyphAdvances)(windows_core::Interface::as_raw(self), glyphcount, glyphindices, glyphadvances as _, issideways.into()).ok() } } pub unsafe fn GetGdiCompatibleGlyphAdvances(&self, emsize: f32, pixelsperdip: f32, transform: Option<*const DWRITE_MATRIX>, usegdinatural: bool, issideways: bool, glyphcount: u32, glyphindices: *const u16, glyphadvances: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGdiCompatibleGlyphAdvances)(windows_core::Interface::as_raw(self), emsize, pixelsperdip, core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), usegdinatural.into(), issideways.into(), glyphcount, glyphindices, core::mem::transmute(glyphadvances)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGdiCompatibleGlyphAdvances)(windows_core::Interface::as_raw(self), emsize, pixelsperdip, transform.unwrap_or(core::mem::zeroed()) as _, usegdinatural.into(), issideways.into(), glyphcount, glyphindices, glyphadvances as _).ok() } } pub unsafe fn GetKerningPairAdjustments(&self, glyphcount: u32, glyphindices: *const u16, glyphadvanceadjustments: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetKerningPairAdjustments)(windows_core::Interface::as_raw(self), glyphcount, glyphindices, core::mem::transmute(glyphadvanceadjustments)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetKerningPairAdjustments)(windows_core::Interface::as_raw(self), glyphcount, glyphindices, glyphadvanceadjustments as _).ok() } } pub unsafe fn HasKerningPairs(&self) -> super::super::Foundation::BOOL { unsafe { (windows_core::Interface::vtable(self).HasKerningPairs)(windows_core::Interface::as_raw(self)) } @@ -4978,11 +4978,11 @@ impl IDWriteFontFace1 { pub unsafe fn GetRecommendedRenderingMode(&self, fontemsize: f32, dpix: f32, dpiy: f32, transform: Option<*const DWRITE_MATRIX>, issideways: bool, outlinethreshold: DWRITE_OUTLINE_THRESHOLD, measuringmode: DWRITE_MEASURING_MODE) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetRecommendedRenderingMode)(windows_core::Interface::as_raw(self), fontemsize, dpix, dpiy, core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), issideways.into(), outlinethreshold, measuringmode, &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetRecommendedRenderingMode)(windows_core::Interface::as_raw(self), fontemsize, dpix, dpiy, transform.unwrap_or(core::mem::zeroed()) as _, issideways.into(), outlinethreshold, measuringmode, &mut result__).map(|| result__) } } pub unsafe fn GetVerticalGlyphVariants(&self, glyphcount: u32, nominalglyphindices: *const u16, verticalglyphindices: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVerticalGlyphVariants)(windows_core::Interface::as_raw(self), glyphcount, nominalglyphindices, core::mem::transmute(verticalglyphindices)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVerticalGlyphVariants)(windows_core::Interface::as_raw(self), glyphcount, nominalglyphindices, verticalglyphindices as _).ok() } } pub unsafe fn HasVerticalGlyphVariants(&self) -> super::super::Foundation::BOOL { unsafe { (windows_core::Interface::vtable(self).HasVerticalGlyphVariants)(windows_core::Interface::as_raw(self)) } @@ -5151,7 +5151,7 @@ impl IDWriteFontFace2 { where P7: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetRecommendedRenderingMode)(windows_core::Interface::as_raw(self), fontemsize, dpix, dpiy, core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), issideways.into(), outlinethreshold, measuringmode, renderingparams.param().abi(), core::mem::transmute(renderingmode), core::mem::transmute(gridfitmode)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecommendedRenderingMode)(windows_core::Interface::as_raw(self), fontemsize, dpix, dpiy, transform.unwrap_or(core::mem::zeroed()) as _, issideways.into(), outlinethreshold, measuringmode, renderingparams.param().abi(), renderingmode as _, gridfitmode as _).ok() } } } #[repr(C)] @@ -5267,7 +5267,7 @@ impl IDWriteFontFace3 { } } pub unsafe fn GetInformationalStrings(&self, informationalstringid: DWRITE_INFORMATIONAL_STRING_ID, informationalstrings: *mut Option, exists: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInformationalStrings)(windows_core::Interface::as_raw(self), informationalstringid, core::mem::transmute(informationalstrings), core::mem::transmute(exists)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInformationalStrings)(windows_core::Interface::as_raw(self), informationalstringid, core::mem::transmute(informationalstrings), exists as _).ok() } } pub unsafe fn HasCharacter(&self, unicodevalue: u32) -> super::super::Foundation::BOOL { unsafe { (windows_core::Interface::vtable(self).HasCharacter)(windows_core::Interface::as_raw(self), unicodevalue) } @@ -5276,7 +5276,7 @@ impl IDWriteFontFace3 { where P7: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetRecommendedRenderingMode)(windows_core::Interface::as_raw(self), fontemsize, dpix, dpiy, core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), issideways.into(), outlinethreshold, measuringmode, renderingparams.param().abi(), core::mem::transmute(renderingmode), core::mem::transmute(gridfitmode)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecommendedRenderingMode)(windows_core::Interface::as_raw(self), fontemsize, dpix, dpiy, transform.unwrap_or(core::mem::zeroed()) as _, issideways.into(), outlinethreshold, measuringmode, renderingparams.param().abi(), renderingmode as _, gridfitmode as _).ok() } } pub unsafe fn IsCharacterLocal(&self, unicodevalue: u32) -> super::super::Foundation::BOOL { unsafe { (windows_core::Interface::vtable(self).IsCharacterLocal)(windows_core::Interface::as_raw(self), unicodevalue) } @@ -5497,10 +5497,10 @@ impl IDWriteFontFace4 { } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn GetGlyphImageData(&self, glyphid: u16, pixelsperem: u32, glyphimageformat: DWRITE_GLYPH_IMAGE_FORMATS, glyphdata: *mut DWRITE_GLYPH_IMAGE_DATA, glyphdatacontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGlyphImageData)(windows_core::Interface::as_raw(self), glyphid, pixelsperem, glyphimageformat, core::mem::transmute(glyphdata), core::mem::transmute(glyphdatacontext)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGlyphImageData)(windows_core::Interface::as_raw(self), glyphid, pixelsperem, glyphimageformat, glyphdata as _, glyphdatacontext as _).ok() } } pub unsafe fn ReleaseGlyphImageData(&self, glyphdatacontext: *mut core::ffi::c_void) { - unsafe { (windows_core::Interface::vtable(self).ReleaseGlyphImageData)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphdatacontext)) } + unsafe { (windows_core::Interface::vtable(self).ReleaseGlyphImageData)(windows_core::Interface::as_raw(self), glyphdatacontext as _) } } } #[repr(C)] @@ -6134,7 +6134,7 @@ impl IDWriteFontFallback { P3: windows_core::Param, P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).MapCharacters)(windows_core::Interface::as_raw(self), analysissource.param().abi(), textposition, textlength, basefontcollection.param().abi(), basefamilyname.param().abi(), baseweight, basestyle, basestretch, core::mem::transmute(mappedlength), core::mem::transmute(mappedfont), core::mem::transmute(scale)).ok() } + unsafe { (windows_core::Interface::vtable(self).MapCharacters)(windows_core::Interface::as_raw(self), analysissource.param().abi(), textposition, textlength, basefontcollection.param().abi(), basefamilyname.param().abi(), baseweight, basestyle, basestretch, mappedlength as _, core::mem::transmute(mappedfont), scale as _).ok() } } } #[repr(C)] @@ -6177,7 +6177,7 @@ impl IDWriteFontFallback1 { P3: windows_core::Param, P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).MapCharacters)(windows_core::Interface::as_raw(self), analysissource.param().abi(), textposition, textlength, basefontcollection.param().abi(), basefamilyname.param().abi(), core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap(), core::mem::transmute(mappedlength), core::mem::transmute(scale), core::mem::transmute(mappedfontface)).ok() } + unsafe { (windows_core::Interface::vtable(self).MapCharacters)(windows_core::Interface::as_raw(self), analysissource.param().abi(), textposition, textlength, basefontcollection.param().abi(), basefamilyname.param().abi(), core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap(), mappedlength as _, scale as _, core::mem::transmute(mappedfontface)).ok() } } } #[repr(C)] @@ -6531,7 +6531,7 @@ windows_core::imp::define_interface!(IDWriteFontFile, IDWriteFontFile_Vtbl, 0x73 windows_core::imp::interface_hierarchy!(IDWriteFontFile, windows_core::IUnknown); impl IDWriteFontFile { pub unsafe fn GetReferenceKey(&self, fontfilereferencekey: *mut *mut core::ffi::c_void, fontfilereferencekeysize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetReferenceKey)(windows_core::Interface::as_raw(self), core::mem::transmute(fontfilereferencekey), core::mem::transmute(fontfilereferencekeysize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetReferenceKey)(windows_core::Interface::as_raw(self), fontfilereferencekey as _, fontfilereferencekeysize as _).ok() } } pub unsafe fn GetLoader(&self) -> windows_core::Result { unsafe { @@ -6540,7 +6540,7 @@ impl IDWriteFontFile { } } 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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Analyze)(windows_core::Interface::as_raw(self), issupportedfonttype as _, fontfiletype as _, fontfacetype.unwrap_or(core::mem::zeroed()) as _, numberoffaces as _).ok() } } } #[repr(C)] @@ -6705,10 +6705,10 @@ windows_core::imp::define_interface!(IDWriteFontFileStream, IDWriteFontFileStrea windows_core::imp::interface_hierarchy!(IDWriteFontFileStream, windows_core::IUnknown); impl IDWriteFontFileStream { pub unsafe fn ReadFileFragment(&self, fragmentstart: *mut *mut core::ffi::c_void, fileoffset: u64, fragmentsize: u64, fragmentcontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadFileFragment)(windows_core::Interface::as_raw(self), core::mem::transmute(fragmentstart), fileoffset, fragmentsize, core::mem::transmute(fragmentcontext)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadFileFragment)(windows_core::Interface::as_raw(self), fragmentstart as _, fileoffset, fragmentsize, fragmentcontext as _).ok() } } pub unsafe fn ReleaseFileFragment(&self, fragmentcontext: *mut core::ffi::c_void) { - unsafe { (windows_core::Interface::vtable(self).ReleaseFileFragment)(windows_core::Interface::as_raw(self), core::mem::transmute(fragmentcontext)) } + unsafe { (windows_core::Interface::vtable(self).ReleaseFileFragment)(windows_core::Interface::as_raw(self), fragmentcontext as _) } } pub unsafe fn GetFileSize(&self) -> windows_core::Result { unsafe { @@ -7031,7 +7031,7 @@ impl IDWriteFontResource { unsafe { (windows_core::Interface::vtable(self).GetAxisValueNameCount)(windows_core::Interface::as_raw(self), axisindex) } } pub unsafe fn GetAxisValueNames(&self, axisindex: u32, axisvalueindex: u32, fontaxisrange: *mut DWRITE_FONT_AXIS_RANGE, names: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAxisValueNames)(windows_core::Interface::as_raw(self), axisindex, axisvalueindex, core::mem::transmute(fontaxisrange), core::mem::transmute(names)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAxisValueNames)(windows_core::Interface::as_raw(self), axisindex, axisvalueindex, fontaxisrange as _, core::mem::transmute(names)).ok() } } pub unsafe fn HasVariations(&self) -> super::super::Foundation::BOOL { unsafe { (windows_core::Interface::vtable(self).HasVariations)(windows_core::Interface::as_raw(self)) } @@ -7216,13 +7216,13 @@ impl IDWriteFontSet { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindFontFaceReference)(windows_core::Interface::as_raw(self), fontfacereference.param().abi(), core::mem::transmute(listindex), core::mem::transmute(exists)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindFontFaceReference)(windows_core::Interface::as_raw(self), fontfacereference.param().abi(), listindex as _, exists as _).ok() } } pub unsafe fn FindFontFace(&self, fontface: P0, listindex: *mut u32, exists: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindFontFace)(windows_core::Interface::as_raw(self), fontface.param().abi(), core::mem::transmute(listindex), core::mem::transmute(exists)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindFontFace)(windows_core::Interface::as_raw(self), fontface.param().abi(), listindex as _, exists as _).ok() } } pub unsafe fn GetPropertyValues(&self, propertyid: DWRITE_FONT_PROPERTY_ID) -> windows_core::Result { unsafe { @@ -7240,7 +7240,7 @@ impl IDWriteFontSet { } } pub unsafe fn GetPropertyValues3(&self, listindex: u32, propertyid: DWRITE_FONT_PROPERTY_ID, exists: *mut super::super::Foundation::BOOL, values: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPropertyValues3)(windows_core::Interface::as_raw(self), listindex, propertyid, core::mem::transmute(exists), core::mem::transmute(values)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropertyValues3)(windows_core::Interface::as_raw(self), listindex, propertyid, exists as _, core::mem::transmute(values)).ok() } } pub unsafe fn GetPropertyOccurrenceCount(&self, property: *const DWRITE_FONT_PROPERTY) -> windows_core::Result { unsafe { @@ -7421,7 +7421,7 @@ impl IDWriteFontSet1 { pub unsafe fn GetMatchingFonts(&self, fontproperty: Option<*const DWRITE_FONT_PROPERTY>, fontaxisvalues: &[DWRITE_FONT_AXIS_VALUE]) -> windows_core::Result { unsafe { 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::mem::zeroed())), 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), fontproperty.unwrap_or(core::mem::zeroed()) as _, 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 { @@ -7449,16 +7449,16 @@ impl IDWriteFontSet1 { } } pub unsafe fn GetFilteredFontIndices(&self, fontaxisranges: &[DWRITE_FONT_AXIS_RANGE], selectanyrange: bool, indices: &mut [u32], actualindexcount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFilteredFontIndices)(windows_core::Interface::as_raw(self), core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len().try_into().unwrap(), selectanyrange.into(), core::mem::transmute(indices.as_ptr()), indices.len().try_into().unwrap(), core::mem::transmute(actualindexcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFilteredFontIndices)(windows_core::Interface::as_raw(self), core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len().try_into().unwrap(), selectanyrange.into(), core::mem::transmute(indices.as_ptr()), indices.len().try_into().unwrap(), actualindexcount as _).ok() } } pub unsafe fn GetFilteredFontIndices2(&self, properties: &[DWRITE_FONT_PROPERTY], selectanyproperty: bool, indices: &mut [u32], actualindexcount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFilteredFontIndices2)(windows_core::Interface::as_raw(self), core::mem::transmute(properties.as_ptr()), properties.len().try_into().unwrap(), selectanyproperty.into(), core::mem::transmute(indices.as_ptr()), indices.len().try_into().unwrap(), core::mem::transmute(actualindexcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFilteredFontIndices2)(windows_core::Interface::as_raw(self), core::mem::transmute(properties.as_ptr()), properties.len().try_into().unwrap(), selectanyproperty.into(), core::mem::transmute(indices.as_ptr()), indices.len().try_into().unwrap(), actualindexcount as _).ok() } } pub unsafe fn GetFontAxisRanges(&self, listindex: u32, fontaxisranges: &mut [DWRITE_FONT_AXIS_RANGE], actualfontaxisrangecount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFontAxisRanges)(windows_core::Interface::as_raw(self), listindex, core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len().try_into().unwrap(), core::mem::transmute(actualfontaxisrangecount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFontAxisRanges)(windows_core::Interface::as_raw(self), listindex, core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len().try_into().unwrap(), actualfontaxisrangecount as _).ok() } } pub unsafe fn GetFontAxisRanges2(&self, fontaxisranges: &mut [DWRITE_FONT_AXIS_RANGE], actualfontaxisrangecount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFontAxisRanges2)(windows_core::Interface::as_raw(self), core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len().try_into().unwrap(), core::mem::transmute(actualfontaxisrangecount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFontAxisRanges2)(windows_core::Interface::as_raw(self), core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len().try_into().unwrap(), actualfontaxisrangecount as _).ok() } } pub unsafe fn GetFontFaceReference(&self, listindex: u32) -> windows_core::Result { unsafe { @@ -8038,14 +8038,14 @@ impl IDWriteGdiInterop { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ConvertFontToLOGFONT)(windows_core::Interface::as_raw(self), font.param().abi(), core::mem::transmute(logfont), core::mem::transmute(issystemfont)).ok() } + unsafe { (windows_core::Interface::vtable(self).ConvertFontToLOGFONT)(windows_core::Interface::as_raw(self), font.param().abi(), logfont as _, issystemfont as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn ConvertFontFaceToLOGFONT(&self, font: P0, logfont: *mut super::Gdi::LOGFONTW) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ConvertFontFaceToLOGFONT)(windows_core::Interface::as_raw(self), font.param().abi(), core::mem::transmute(logfont)).ok() } + unsafe { (windows_core::Interface::vtable(self).ConvertFontFaceToLOGFONT)(windows_core::Interface::as_raw(self), font.param().abi(), logfont as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn CreateFontFaceFromHdc(&self, hdc: super::Gdi::HDC) -> windows_core::Result { @@ -8058,7 +8058,7 @@ impl IDWriteGdiInterop { pub unsafe fn CreateBitmapRenderTarget(&self, hdc: Option, width: u32, height: u32) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateBitmapRenderTarget)(windows_core::Interface::as_raw(self), core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), width, height, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateBitmapRenderTarget)(windows_core::Interface::as_raw(self), hdc.unwrap_or(core::mem::zeroed()) as _, width, height, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } } @@ -8188,14 +8188,14 @@ impl IDWriteGdiInterop1 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetFontSignature)(windows_core::Interface::as_raw(self), fontface.param().abi(), core::mem::transmute(fontsignature)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFontSignature)(windows_core::Interface::as_raw(self), fontface.param().abi(), fontsignature as _).ok() } } #[cfg(feature = "Win32_Globalization")] pub unsafe fn GetFontSignature2(&self, font: P0, fontsignature: *mut super::super::Globalization::FONTSIGNATURE) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetFontSignature2)(windows_core::Interface::as_raw(self), font.param().abi(), core::mem::transmute(fontsignature)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFontSignature2)(windows_core::Interface::as_raw(self), font.param().abi(), fontsignature as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetMatchingFontsByLOGFONT(&self, logfont: *const super::Gdi::LOGFONTA, fontset: P1) -> windows_core::Result @@ -8308,7 +8308,7 @@ impl IDWriteGlyphRunAnalysis { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetAlphaBlendParams)(windows_core::Interface::as_raw(self), renderingparams.param().abi(), core::mem::transmute(blendgamma), core::mem::transmute(blendenhancedcontrast), core::mem::transmute(blendcleartypelevel)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAlphaBlendParams)(windows_core::Interface::as_raw(self), renderingparams.param().abi(), blendgamma as _, blendenhancedcontrast as _, blendcleartypelevel as _).ok() } } } #[repr(C)] @@ -8437,7 +8437,7 @@ impl IDWriteInlineObject { P1: windows_core::Param, P6: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Draw)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::mem::zeroed())), renderer.param().abi(), originx, originy, issideways.into(), isrighttoleft.into(), clientdrawingeffect.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).Draw)(windows_core::Interface::as_raw(self), clientdrawingcontext.unwrap_or(core::mem::zeroed()) as _, renderer.param().abi(), originx, originy, issideways.into(), isrighttoleft.into(), clientdrawingeffect.param().abi()).ok() } } pub unsafe fn GetMetrics(&self) -> windows_core::Result { unsafe { @@ -8452,7 +8452,7 @@ impl IDWriteInlineObject { } } pub unsafe fn GetBreakConditions(&self, breakconditionbefore: *mut DWRITE_BREAK_CONDITION, breakconditionafter: *mut DWRITE_BREAK_CONDITION) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBreakConditions)(windows_core::Interface::as_raw(self), core::mem::transmute(breakconditionbefore), core::mem::transmute(breakconditionafter)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBreakConditions)(windows_core::Interface::as_raw(self), breakconditionbefore as _, breakconditionafter as _).ok() } } } #[repr(C)] @@ -8615,7 +8615,7 @@ impl IDWriteLocalizedStrings { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindLocaleName)(windows_core::Interface::as_raw(self), localename.param().abi(), core::mem::transmute(index), core::mem::transmute(exists)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindLocaleName)(windows_core::Interface::as_raw(self), localename.param().abi(), index as _, exists as _).ok() } } pub unsafe fn GetLocaleNameLength(&self, index: u32) -> windows_core::Result { unsafe { @@ -8744,7 +8744,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<()> { - unsafe { (windows_core::Interface::vtable(self).SetCurrentGlyph)(windows_core::Interface::as_raw(self), glyphindex, core::mem::transmute(paintelement), structsize, core::mem::transmute(clipbox), core::mem::transmute(glyphattributes.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetCurrentGlyph)(windows_core::Interface::as_raw(self), glyphindex, paintelement as _, structsize, clipbox as _, glyphattributes.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetTextColor(&self, textcolor: *const DWRITE_COLOR_F) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetTextColor)(windows_core::Interface::as_raw(self), textcolor).ok() } @@ -8757,11 +8757,11 @@ impl IDWritePaintReader { } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn MoveToFirstChild(&self, paintelement: *mut DWRITE_PAINT_ELEMENT, structsize: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).MoveToFirstChild)(windows_core::Interface::as_raw(self), core::mem::transmute(paintelement), structsize).ok() } + unsafe { (windows_core::Interface::vtable(self).MoveToFirstChild)(windows_core::Interface::as_raw(self), paintelement as _, structsize).ok() } } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn MoveToNextSibling(&self, paintelement: *mut DWRITE_PAINT_ELEMENT, structsize: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).MoveToNextSibling)(windows_core::Interface::as_raw(self), core::mem::transmute(paintelement), structsize).ok() } + unsafe { (windows_core::Interface::vtable(self).MoveToNextSibling)(windows_core::Interface::as_raw(self), paintelement as _, structsize).ok() } } pub unsafe fn MoveToParent(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).MoveToParent)(windows_core::Interface::as_raw(self)).ok() } @@ -8897,16 +8897,16 @@ impl IDWritePixelSnapping { pub unsafe fn IsPixelSnappingDisabled(&self, clientdrawingcontext: Option<*const core::ffi::c_void>) -> windows_core::Result { unsafe { 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::mem::zeroed())), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).IsPixelSnappingDisabled)(windows_core::Interface::as_raw(self), clientdrawingcontext.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| result__) } } pub unsafe fn GetCurrentTransform(&self, clientdrawingcontext: Option<*const core::ffi::c_void>, transform: *mut DWRITE_MATRIX) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentTransform)(windows_core::Interface::as_raw(self), clientdrawingcontext.unwrap_or(core::mem::zeroed()) as _, transform as _).ok() } } pub unsafe fn GetPixelsPerDip(&self, clientdrawingcontext: Option<*const core::ffi::c_void>) -> windows_core::Result { unsafe { 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::mem::zeroed())), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetPixelsPerDip)(windows_core::Interface::as_raw(self), clientdrawingcontext.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| result__) } } } @@ -9081,7 +9081,7 @@ impl IDWriteRemoteFontFileStream { } } pub unsafe fn GetFileFragmentLocality(&self, fileoffset: u64, fragmentsize: u64, islocal: *mut super::super::Foundation::BOOL, partialsize: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFileFragmentLocality)(windows_core::Interface::as_raw(self), fileoffset, fragmentsize, core::mem::transmute(islocal), core::mem::transmute(partialsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFileFragmentLocality)(windows_core::Interface::as_raw(self), fileoffset, fragmentsize, islocal as _, partialsize as _).ok() } } pub unsafe fn GetLocality(&self) -> DWRITE_LOCALITY { unsafe { (windows_core::Interface::vtable(self).GetLocality)(windows_core::Interface::as_raw(self)) } @@ -9574,19 +9574,19 @@ windows_core::imp::define_interface!(IDWriteTextAnalysisSource, IDWriteTextAnaly windows_core::imp::interface_hierarchy!(IDWriteTextAnalysisSource, windows_core::IUnknown); impl IDWriteTextAnalysisSource { pub unsafe fn GetTextAtPosition(&self, textposition: u32, textstring: *mut *mut u16, textlength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTextAtPosition)(windows_core::Interface::as_raw(self), textposition, core::mem::transmute(textstring), core::mem::transmute(textlength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTextAtPosition)(windows_core::Interface::as_raw(self), textposition, textstring as _, textlength as _).ok() } } pub unsafe fn GetTextBeforePosition(&self, textposition: u32, textstring: *mut *mut u16, textlength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTextBeforePosition)(windows_core::Interface::as_raw(self), textposition, core::mem::transmute(textstring), core::mem::transmute(textlength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTextBeforePosition)(windows_core::Interface::as_raw(self), textposition, textstring as _, textlength as _).ok() } } pub unsafe fn GetParagraphReadingDirection(&self) -> DWRITE_READING_DIRECTION { unsafe { (windows_core::Interface::vtable(self).GetParagraphReadingDirection)(windows_core::Interface::as_raw(self)) } } pub unsafe fn GetLocaleName(&self, textposition: u32, textlength: *mut u32, localename: *mut *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLocaleName)(windows_core::Interface::as_raw(self), textposition, core::mem::transmute(textlength), core::mem::transmute(localename)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLocaleName)(windows_core::Interface::as_raw(self), textposition, textlength as _, localename as _).ok() } } pub unsafe fn GetNumberSubstitution(&self, textposition: u32, textlength: *mut u32, numbersubstitution: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNumberSubstitution)(windows_core::Interface::as_raw(self), textposition, core::mem::transmute(textlength), core::mem::transmute(numbersubstitution)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNumberSubstitution)(windows_core::Interface::as_raw(self), textposition, textlength as _, core::mem::transmute(numbersubstitution)).ok() } } } #[repr(C)] @@ -9663,7 +9663,7 @@ impl core::ops::Deref for IDWriteTextAnalysisSource1 { windows_core::imp::interface_hierarchy!(IDWriteTextAnalysisSource1, windows_core::IUnknown, IDWriteTextAnalysisSource); impl IDWriteTextAnalysisSource1 { pub unsafe fn GetVerticalGlyphOrientation(&self, textposition: u32, textlength: *mut u32, glyphorientation: *mut DWRITE_VERTICAL_GLYPH_ORIENTATION, bidilevel: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVerticalGlyphOrientation)(windows_core::Interface::as_raw(self), textposition, core::mem::transmute(textlength), core::mem::transmute(glyphorientation), core::mem::transmute(bidilevel)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVerticalGlyphOrientation)(windows_core::Interface::as_raw(self), textposition, textlength as _, glyphorientation as _, bidilevel as _).ok() } } } #[repr(C)] @@ -9729,29 +9729,7 @@ impl IDWriteTextAnalyzer { P6: windows_core::Param, P7: windows_core::Param, { - unsafe { - (windows_core::Interface::vtable(self).GetGlyphs)( - windows_core::Interface::as_raw(self), - textstring.param().abi(), - textlength, - fontface.param().abi(), - issideways.into(), - isrighttoleft.into(), - scriptanalysis, - localename.param().abi(), - numbersubstitution.param().abi(), - core::mem::transmute(features.unwrap_or(core::mem::zeroed())), - core::mem::transmute(featurerangelengths.unwrap_or(core::mem::zeroed())), - featureranges, - maxglyphcount, - core::mem::transmute(clustermap), - core::mem::transmute(textprops), - core::mem::transmute(glyphindices), - core::mem::transmute(glyphprops), - core::mem::transmute(actualglyphcount), - ) - .ok() - } + unsafe { (windows_core::Interface::vtable(self).GetGlyphs)(windows_core::Interface::as_raw(self), textstring.param().abi(), textlength, fontface.param().abi(), issideways.into(), isrighttoleft.into(), scriptanalysis, localename.param().abi(), numbersubstitution.param().abi(), features.unwrap_or(core::mem::zeroed()) as _, featurerangelengths.unwrap_or(core::mem::zeroed()) as _, featureranges, maxglyphcount, clustermap as _, textprops as _, glyphindices as _, glyphprops as _, actualglyphcount as _).ok() } } pub unsafe fn GetGlyphPlacements(&self, textstring: P0, clustermap: *const u16, textprops: *mut DWRITE_SHAPING_TEXT_PROPERTIES, textlength: u32, glyphindices: *const u16, glyphprops: *const DWRITE_SHAPING_GLYPH_PROPERTIES, glyphcount: u32, fontface: P7, fontemsize: f32, issideways: bool, isrighttoleft: bool, scriptanalysis: *const DWRITE_SCRIPT_ANALYSIS, localename: P12, features: Option<*const *const DWRITE_TYPOGRAPHIC_FEATURES>, featurerangelengths: Option<*const u32>, featureranges: u32, glyphadvances: *mut f32, glyphoffsets: *mut DWRITE_GLYPH_OFFSET) -> windows_core::Result<()> where @@ -9759,30 +9737,7 @@ impl IDWriteTextAnalyzer { P7: windows_core::Param, P12: windows_core::Param, { - unsafe { - (windows_core::Interface::vtable(self).GetGlyphPlacements)( - windows_core::Interface::as_raw(self), - textstring.param().abi(), - clustermap, - core::mem::transmute(textprops), - textlength, - glyphindices, - glyphprops, - glyphcount, - fontface.param().abi(), - fontemsize, - issideways.into(), - isrighttoleft.into(), - scriptanalysis, - localename.param().abi(), - core::mem::transmute(features.unwrap_or(core::mem::zeroed())), - core::mem::transmute(featurerangelengths.unwrap_or(core::mem::zeroed())), - featureranges, - core::mem::transmute(glyphadvances), - core::mem::transmute(glyphoffsets), - ) - .ok() - } + unsafe { (windows_core::Interface::vtable(self).GetGlyphPlacements)(windows_core::Interface::as_raw(self), textstring.param().abi(), clustermap, textprops as _, textlength, glyphindices, glyphprops, glyphcount, fontface.param().abi(), fontemsize, issideways.into(), isrighttoleft.into(), scriptanalysis, localename.param().abi(), features.unwrap_or(core::mem::zeroed()) as _, featurerangelengths.unwrap_or(core::mem::zeroed()) as _, featureranges, glyphadvances as _, glyphoffsets as _).ok() } } pub unsafe fn GetGdiCompatibleGlyphPlacements(&self, textstring: P0, clustermap: *const u16, textprops: *const DWRITE_SHAPING_TEXT_PROPERTIES, textlength: u32, glyphindices: *const u16, glyphprops: *const DWRITE_SHAPING_GLYPH_PROPERTIES, glyphcount: u32, fontface: P7, fontemsize: f32, pixelsperdip: f32, transform: Option<*const DWRITE_MATRIX>, usegdinatural: bool, issideways: bool, isrighttoleft: bool, scriptanalysis: *const DWRITE_SCRIPT_ANALYSIS, localename: P15, features: Option<*const *const DWRITE_TYPOGRAPHIC_FEATURES>, featurerangelengths: Option<*const u32>, featureranges: u32, glyphadvances: *mut f32, glyphoffsets: *mut DWRITE_GLYPH_OFFSET) -> windows_core::Result<()> where @@ -9803,17 +9758,17 @@ impl IDWriteTextAnalyzer { fontface.param().abi(), fontemsize, pixelsperdip, - core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), + transform.unwrap_or(core::mem::zeroed()) as _, usegdinatural.into(), issideways.into(), isrighttoleft.into(), scriptanalysis, localename.param().abi(), - core::mem::transmute(features.unwrap_or(core::mem::zeroed())), - core::mem::transmute(featurerangelengths.unwrap_or(core::mem::zeroed())), + features.unwrap_or(core::mem::zeroed()) as _, + featurerangelengths.unwrap_or(core::mem::zeroed()) as _, featureranges, - core::mem::transmute(glyphadvances), - core::mem::transmute(glyphoffsets), + glyphadvances as _, + glyphoffsets as _, ) .ok() } @@ -10022,14 +9977,14 @@ impl core::ops::Deref for IDWriteTextAnalyzer1 { windows_core::imp::interface_hierarchy!(IDWriteTextAnalyzer1, windows_core::IUnknown, IDWriteTextAnalyzer); impl IDWriteTextAnalyzer1 { pub unsafe fn ApplyCharacterSpacing(&self, leadingspacing: f32, trailingspacing: f32, minimumadvancewidth: f32, glyphcount: u32, clustermap: &[u16], glyphadvances: *const f32, glyphoffsets: *const DWRITE_GLYPH_OFFSET, glyphproperties: *const DWRITE_SHAPING_GLYPH_PROPERTIES, modifiedglyphadvances: *mut f32, modifiedglyphoffsets: *mut DWRITE_GLYPH_OFFSET) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ApplyCharacterSpacing)(windows_core::Interface::as_raw(self), leadingspacing, trailingspacing, minimumadvancewidth, clustermap.len().try_into().unwrap(), glyphcount, core::mem::transmute(clustermap.as_ptr()), glyphadvances, glyphoffsets, glyphproperties, core::mem::transmute(modifiedglyphadvances), core::mem::transmute(modifiedglyphoffsets)).ok() } + unsafe { (windows_core::Interface::vtable(self).ApplyCharacterSpacing)(windows_core::Interface::as_raw(self), leadingspacing, trailingspacing, minimumadvancewidth, clustermap.len().try_into().unwrap(), glyphcount, core::mem::transmute(clustermap.as_ptr()), glyphadvances, glyphoffsets, glyphproperties, modifiedglyphadvances as _, modifiedglyphoffsets as _).ok() } } pub unsafe fn GetBaseline(&self, fontface: P0, baseline: DWRITE_BASELINE, isvertical: bool, issimulationallowed: bool, scriptanalysis: DWRITE_SCRIPT_ANALYSIS, localename: P5, baselinecoordinate: *mut i32, exists: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> where P0: windows_core::Param, P5: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetBaseline)(windows_core::Interface::as_raw(self), fontface.param().abi(), baseline, isvertical.into(), issimulationallowed.into(), core::mem::transmute(scriptanalysis), localename.param().abi(), core::mem::transmute(baselinecoordinate), core::mem::transmute(exists)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBaseline)(windows_core::Interface::as_raw(self), fontface.param().abi(), baseline, isvertical.into(), issimulationallowed.into(), core::mem::transmute(scriptanalysis), localename.param().abi(), baselinecoordinate as _, exists as _).ok() } } pub unsafe fn AnalyzeVerticalGlyphOrientation(&self, analysissource: P0, textposition: u32, textlength: u32, analysissink: P3) -> windows_core::Result<()> where @@ -10039,55 +9994,33 @@ impl IDWriteTextAnalyzer1 { unsafe { (windows_core::Interface::vtable(self).AnalyzeVerticalGlyphOrientation)(windows_core::Interface::as_raw(self), analysissource.param().abi(), textposition, textlength, analysissink.param().abi()).ok() } } pub unsafe fn GetGlyphOrientationTransform(&self, glyphorientationangle: DWRITE_GLYPH_ORIENTATION_ANGLE, issideways: bool, transform: *mut DWRITE_MATRIX) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGlyphOrientationTransform)(windows_core::Interface::as_raw(self), glyphorientationangle, issideways.into(), core::mem::transmute(transform)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGlyphOrientationTransform)(windows_core::Interface::as_raw(self), glyphorientationangle, issideways.into(), transform as _).ok() } } pub unsafe fn GetScriptProperties(&self, scriptanalysis: DWRITE_SCRIPT_ANALYSIS, scriptproperties: *mut DWRITE_SCRIPT_PROPERTIES) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetScriptProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(scriptanalysis), core::mem::transmute(scriptproperties)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScriptProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(scriptanalysis), scriptproperties as _).ok() } } pub unsafe fn GetTextComplexity(&self, textstring: P0, textlength: u32, fontface: P2, istextsimple: *mut super::super::Foundation::BOOL, textlengthread: *mut u32, glyphindices: Option<*mut u16>) -> windows_core::Result<()> where P0: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetTextComplexity)(windows_core::Interface::as_raw(self), textstring.param().abi(), textlength, fontface.param().abi(), core::mem::transmute(istextsimple), core::mem::transmute(textlengthread), core::mem::transmute(glyphindices.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTextComplexity)(windows_core::Interface::as_raw(self), textstring.param().abi(), textlength, fontface.param().abi(), istextsimple as _, textlengthread as _, glyphindices.unwrap_or(core::mem::zeroed()) as _).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, justificationopportunities: *mut DWRITE_JUSTIFICATION_OPPORTUNITY) -> windows_core::Result<()> where P0: windows_core::Param, P5: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetJustificationOpportunities)(windows_core::Interface::as_raw(self), fontface.param().abi(), fontemsize, core::mem::transmute(scriptanalysis), textlength, glyphcount, textstring.param().abi(), clustermap, glyphproperties, core::mem::transmute(justificationopportunities)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetJustificationOpportunities)(windows_core::Interface::as_raw(self), fontface.param().abi(), fontemsize, core::mem::transmute(scriptanalysis), textlength, glyphcount, textstring.param().abi(), clustermap, glyphproperties, justificationopportunities as _).ok() } } pub unsafe fn JustifyGlyphAdvances(&self, linewidth: f32, glyphcount: u32, justificationopportunities: *const DWRITE_JUSTIFICATION_OPPORTUNITY, glyphadvances: *const f32, glyphoffsets: *const DWRITE_GLYPH_OFFSET, justifiedglyphadvances: *mut f32, justifiedglyphoffsets: Option<*mut DWRITE_GLYPH_OFFSET>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).JustifyGlyphAdvances)(windows_core::Interface::as_raw(self), linewidth, glyphcount, justificationopportunities, glyphadvances, glyphoffsets, core::mem::transmute(justifiedglyphadvances), core::mem::transmute(justifiedglyphoffsets.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).JustifyGlyphAdvances)(windows_core::Interface::as_raw(self), linewidth, glyphcount, justificationopportunities, glyphadvances, glyphoffsets, justifiedglyphadvances as _, justifiedglyphoffsets.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetJustifiedGlyphs(&self, fontface: P0, fontemsize: f32, scriptanalysis: DWRITE_SCRIPT_ANALYSIS, textlength: u32, glyphcount: u32, maxglyphcount: u32, clustermap: Option<*const u16>, glyphindices: *const u16, glyphadvances: *const f32, justifiedglyphadvances: *const f32, justifiedglyphoffsets: *const DWRITE_GLYPH_OFFSET, glyphproperties: *const DWRITE_SHAPING_GLYPH_PROPERTIES, actualglyphcount: *mut u32, modifiedclustermap: Option<*mut u16>, modifiedglyphindices: *mut u16, modifiedglyphadvances: *mut f32, modifiedglyphoffsets: *mut DWRITE_GLYPH_OFFSET) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { - (windows_core::Interface::vtable(self).GetJustifiedGlyphs)( - windows_core::Interface::as_raw(self), - fontface.param().abi(), - fontemsize, - core::mem::transmute(scriptanalysis), - textlength, - glyphcount, - maxglyphcount, - core::mem::transmute(clustermap.unwrap_or(core::mem::zeroed())), - glyphindices, - glyphadvances, - justifiedglyphadvances, - justifiedglyphoffsets, - glyphproperties, - core::mem::transmute(actualglyphcount), - core::mem::transmute(modifiedclustermap.unwrap_or(core::mem::zeroed())), - core::mem::transmute(modifiedglyphindices), - core::mem::transmute(modifiedglyphadvances), - core::mem::transmute(modifiedglyphoffsets), - ) - .ok() - } + unsafe { (windows_core::Interface::vtable(self).GetJustifiedGlyphs)(windows_core::Interface::as_raw(self), fontface.param().abi(), fontemsize, core::mem::transmute(scriptanalysis), textlength, glyphcount, maxglyphcount, clustermap.unwrap_or(core::mem::zeroed()) as _, glyphindices, glyphadvances, justifiedglyphadvances, justifiedglyphoffsets, glyphproperties, actualglyphcount as _, modifiedclustermap.unwrap_or(core::mem::zeroed()) as _, modifiedglyphindices as _, modifiedglyphadvances as _, modifiedglyphoffsets as _).ok() } } } #[repr(C)] @@ -10234,21 +10167,21 @@ impl core::ops::Deref for IDWriteTextAnalyzer2 { windows_core::imp::interface_hierarchy!(IDWriteTextAnalyzer2, windows_core::IUnknown, IDWriteTextAnalyzer, IDWriteTextAnalyzer1); impl IDWriteTextAnalyzer2 { pub unsafe fn GetGlyphOrientationTransform(&self, glyphorientationangle: DWRITE_GLYPH_ORIENTATION_ANGLE, issideways: bool, originx: f32, originy: f32, transform: *mut DWRITE_MATRIX) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGlyphOrientationTransform)(windows_core::Interface::as_raw(self), glyphorientationangle, issideways.into(), originx, originy, core::mem::transmute(transform)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGlyphOrientationTransform)(windows_core::Interface::as_raw(self), glyphorientationangle, issideways.into(), originx, originy, transform as _).ok() } } pub unsafe fn GetTypographicFeatures(&self, fontface: P0, scriptanalysis: DWRITE_SCRIPT_ANALYSIS, localename: P2, actualtagcount: *mut u32, tags: &mut [DWRITE_FONT_FEATURE_TAG]) -> windows_core::Result<()> where P0: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetTypographicFeatures)(windows_core::Interface::as_raw(self), fontface.param().abi(), core::mem::transmute(scriptanalysis), localename.param().abi(), tags.len().try_into().unwrap(), core::mem::transmute(actualtagcount), core::mem::transmute(tags.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTypographicFeatures)(windows_core::Interface::as_raw(self), fontface.param().abi(), core::mem::transmute(scriptanalysis), localename.param().abi(), tags.len().try_into().unwrap(), actualtagcount as _, core::mem::transmute(tags.as_ptr())).ok() } } pub unsafe fn CheckTypographicFeature(&self, fontface: P0, scriptanalysis: DWRITE_SCRIPT_ANALYSIS, localename: P2, featuretag: DWRITE_FONT_FEATURE_TAG, glyphcount: u32, glyphindices: *const u16, featureapplies: *mut u8) -> windows_core::Result<()> where P0: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CheckTypographicFeature)(windows_core::Interface::as_raw(self), fontface.param().abi(), core::mem::transmute(scriptanalysis), localename.param().abi(), featuretag, glyphcount, glyphindices, core::mem::transmute(featureapplies)).ok() } + unsafe { (windows_core::Interface::vtable(self).CheckTypographicFeature)(windows_core::Interface::as_raw(self), fontface.param().abi(), core::mem::transmute(scriptanalysis), localename.param().abi(), featuretag, glyphcount, glyphindices, featureapplies as _).ok() } } } #[repr(C)] @@ -10346,10 +10279,10 @@ impl IDWriteTextFormat { unsafe { (windows_core::Interface::vtable(self).GetIncrementalTabStop)(windows_core::Interface::as_raw(self)) } } pub unsafe fn GetTrimming(&self, trimmingoptions: *mut DWRITE_TRIMMING, trimmingsign: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTrimming)(windows_core::Interface::as_raw(self), core::mem::transmute(trimmingoptions), core::mem::transmute(trimmingsign)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTrimming)(windows_core::Interface::as_raw(self), trimmingoptions as _, core::mem::transmute(trimmingsign)).ok() } } pub unsafe fn GetLineSpacing(&self, linespacingmethod: *mut DWRITE_LINE_SPACING_METHOD, linespacing: *mut f32, baseline: *mut f32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLineSpacing)(windows_core::Interface::as_raw(self), core::mem::transmute(linespacingmethod), core::mem::transmute(linespacing), core::mem::transmute(baseline)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLineSpacing)(windows_core::Interface::as_raw(self), linespacingmethod as _, linespacing as _, baseline as _).ok() } } pub unsafe fn GetFontCollection(&self) -> windows_core::Result { unsafe { @@ -10782,7 +10715,7 @@ impl IDWriteTextFormat2 { unsafe { (windows_core::Interface::vtable(self).SetLineSpacing)(windows_core::Interface::as_raw(self), linespacingoptions).ok() } } pub unsafe fn GetLineSpacing(&self, linespacingoptions: *mut DWRITE_LINE_SPACING) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLineSpacing)(windows_core::Interface::as_raw(self), core::mem::transmute(linespacingoptions)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLineSpacing)(windows_core::Interface::as_raw(self), linespacingoptions as _).ok() } } } #[repr(C)] @@ -10987,58 +10920,58 @@ impl IDWriteTextLayout { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).GetFontCollection)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(fontcollection), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFontCollection)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(fontcollection), textrange.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetFontFamilyNameLength(&self, currentposition: u32, namelength: *mut u32, textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFontFamilyNameLength)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(namelength), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFontFamilyNameLength)(windows_core::Interface::as_raw(self), currentposition, namelength as _, textrange.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetFontFamilyName(&self, currentposition: u32, fontfamilyname: &mut [u16], textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFontFamilyName)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len().try_into().unwrap(), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFontFamilyName)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len().try_into().unwrap(), textrange.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetFontWeight(&self, currentposition: u32, fontweight: *mut DWRITE_FONT_WEIGHT, textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFontWeight)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(fontweight), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFontWeight)(windows_core::Interface::as_raw(self), currentposition, fontweight as _, textrange.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetFontStyle(&self, currentposition: u32, fontstyle: *mut DWRITE_FONT_STYLE, textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFontStyle)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(fontstyle), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFontStyle)(windows_core::Interface::as_raw(self), currentposition, fontstyle as _, textrange.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetFontStretch(&self, currentposition: u32, fontstretch: *mut DWRITE_FONT_STRETCH, textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFontStretch)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(fontstretch), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFontStretch)(windows_core::Interface::as_raw(self), currentposition, fontstretch as _, textrange.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetFontSize(&self, currentposition: u32, fontsize: *mut f32, textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFontSize)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(fontsize), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFontSize)(windows_core::Interface::as_raw(self), currentposition, fontsize as _, textrange.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetUnderline(&self, currentposition: u32, hasunderline: *mut super::super::Foundation::BOOL, textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetUnderline)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(hasunderline), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUnderline)(windows_core::Interface::as_raw(self), currentposition, hasunderline as _, textrange.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetStrikethrough(&self, currentposition: u32, hasstrikethrough: *mut super::super::Foundation::BOOL, textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStrikethrough)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(hasstrikethrough), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStrikethrough)(windows_core::Interface::as_raw(self), currentposition, hasstrikethrough as _, textrange.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetDrawingEffect(&self, currentposition: u32, drawingeffect: *mut Option, textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDrawingEffect)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(drawingeffect), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDrawingEffect)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(drawingeffect), textrange.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetInlineObject(&self, currentposition: u32, inlineobject: *mut Option, textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInlineObject)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(inlineobject), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInlineObject)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(inlineobject), textrange.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetTypography(&self, currentposition: u32, typography: *mut Option, textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTypography)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(typography), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTypography)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(typography), textrange.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetLocaleNameLength(&self, currentposition: u32, namelength: *mut u32, textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLocaleNameLength)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(namelength), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLocaleNameLength)(windows_core::Interface::as_raw(self), currentposition, namelength as _, textrange.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetLocaleName(&self, currentposition: u32, localename: &mut [u16], textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLocaleName)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(localename.as_ptr()), localename.len().try_into().unwrap(), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLocaleName)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(localename.as_ptr()), localename.len().try_into().unwrap(), textrange.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).Draw)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::mem::zeroed())), renderer.param().abi(), originx, originy).ok() } + unsafe { (windows_core::Interface::vtable(self).Draw)(windows_core::Interface::as_raw(self), clientdrawingcontext.unwrap_or(core::mem::zeroed()) as _, renderer.param().abi(), originx, originy).ok() } } pub unsafe fn GetLineMetrics(&self, linemetrics: Option<&mut [DWRITE_LINE_METRICS]>, actuallinecount: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetLineMetrics)(windows_core::Interface::as_raw(self), core::mem::transmute(linemetrics.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), linemetrics.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), actuallinecount as _).ok() } } pub unsafe fn GetMetrics(&self, textmetrics: *mut DWRITE_TEXT_METRICS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMetrics)(windows_core::Interface::as_raw(self), core::mem::transmute(textmetrics)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMetrics)(windows_core::Interface::as_raw(self), textmetrics as _).ok() } } pub unsafe fn GetOverhangMetrics(&self) -> windows_core::Result { unsafe { @@ -11047,7 +10980,7 @@ impl IDWriteTextLayout { } } pub unsafe fn GetClusterMetrics(&self, clustermetrics: Option<&mut [DWRITE_CLUSTER_METRICS]>, actualclustercount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClusterMetrics)(windows_core::Interface::as_raw(self), core::mem::transmute(clustermetrics.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), clustermetrics.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(actualclustercount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClusterMetrics)(windows_core::Interface::as_raw(self), core::mem::transmute(clustermetrics.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), clustermetrics.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), actualclustercount as _).ok() } } pub unsafe fn DetermineMinWidth(&self) -> windows_core::Result { unsafe { @@ -11056,13 +10989,13 @@ impl IDWriteTextLayout { } } pub unsafe fn HitTestPoint(&self, pointx: f32, pointy: f32, istrailinghit: *mut super::super::Foundation::BOOL, isinside: *mut super::super::Foundation::BOOL, hittestmetrics: *mut DWRITE_HIT_TEST_METRICS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).HitTestPoint)(windows_core::Interface::as_raw(self), pointx, pointy, core::mem::transmute(istrailinghit), core::mem::transmute(isinside), core::mem::transmute(hittestmetrics)).ok() } + unsafe { (windows_core::Interface::vtable(self).HitTestPoint)(windows_core::Interface::as_raw(self), pointx, pointy, istrailinghit as _, isinside as _, hittestmetrics as _).ok() } } pub unsafe fn HitTestTextPosition(&self, textposition: u32, istrailinghit: bool, pointx: *mut f32, pointy: *mut f32, hittestmetrics: *mut DWRITE_HIT_TEST_METRICS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).HitTestTextPosition)(windows_core::Interface::as_raw(self), textposition, istrailinghit.into(), core::mem::transmute(pointx), core::mem::transmute(pointy), core::mem::transmute(hittestmetrics)).ok() } + unsafe { (windows_core::Interface::vtable(self).HitTestTextPosition)(windows_core::Interface::as_raw(self), textposition, istrailinghit.into(), pointx as _, pointy as _, hittestmetrics as _).ok() } } pub unsafe fn HitTestTextRange(&self, textposition: u32, textlength: u32, originx: f32, originy: f32, hittestmetrics: Option<&mut [DWRITE_HIT_TEST_METRICS]>, actualhittestmetricscount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).HitTestTextRange)(windows_core::Interface::as_raw(self), textposition, textlength, originx, originy, core::mem::transmute(hittestmetrics.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), hittestmetrics.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(actualhittestmetricscount)).ok() } + unsafe { (windows_core::Interface::vtable(self).HitTestTextRange)(windows_core::Interface::as_raw(self), textposition, textlength, originx, originy, core::mem::transmute(hittestmetrics.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), hittestmetrics.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), actualhittestmetricscount as _).ok() } } } #[repr(C)] @@ -11460,13 +11393,13 @@ impl IDWriteTextLayout1 { unsafe { (windows_core::Interface::vtable(self).SetPairKerning)(windows_core::Interface::as_raw(self), ispairkerningenabled.into(), 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetPairKerning)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(ispairkerningenabled), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPairKerning)(windows_core::Interface::as_raw(self), currentposition, ispairkerningenabled as _, textrange.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetCharacterSpacing(&self, leadingspacing: f32, trailingspacing: f32, minimumadvancewidth: f32, textrange: DWRITE_TEXT_RANGE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetCharacterSpacing)(windows_core::Interface::as_raw(self), leadingspacing, trailingspacing, minimumadvancewidth, core::mem::transmute(textrange)).ok() } } pub unsafe fn GetCharacterSpacing(&self, currentposition: u32, leadingspacing: *mut f32, trailingspacing: *mut f32, minimumadvancewidth: *mut f32, textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCharacterSpacing)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(leadingspacing), core::mem::transmute(trailingspacing), core::mem::transmute(minimumadvancewidth), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCharacterSpacing)(windows_core::Interface::as_raw(self), currentposition, leadingspacing as _, trailingspacing as _, minimumadvancewidth as _, textrange.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -11534,7 +11467,7 @@ impl core::ops::Deref for IDWriteTextLayout2 { windows_core::imp::interface_hierarchy!(IDWriteTextLayout2, windows_core::IUnknown, IDWriteTextFormat, IDWriteTextLayout, IDWriteTextLayout1); impl IDWriteTextLayout2 { pub unsafe fn GetMetrics(&self, textmetrics: *mut DWRITE_TEXT_METRICS1) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMetrics)(windows_core::Interface::as_raw(self), core::mem::transmute(textmetrics)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMetrics)(windows_core::Interface::as_raw(self), textmetrics as _).ok() } } pub unsafe fn SetVerticalGlyphOrientation(&self, glyphorientation: DWRITE_VERTICAL_GLYPH_ORIENTATION) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetVerticalGlyphOrientation)(windows_core::Interface::as_raw(self), glyphorientation).ok() } @@ -11689,10 +11622,10 @@ impl IDWriteTextLayout3 { unsafe { (windows_core::Interface::vtable(self).SetLineSpacing)(windows_core::Interface::as_raw(self), linespacingoptions).ok() } } pub unsafe fn GetLineSpacing(&self, linespacingoptions: *mut DWRITE_LINE_SPACING) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLineSpacing)(windows_core::Interface::as_raw(self), core::mem::transmute(linespacingoptions)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLineSpacing)(windows_core::Interface::as_raw(self), linespacingoptions as _).ok() } } pub unsafe fn GetLineMetrics(&self, linemetrics: Option<&mut [DWRITE_LINE_METRICS1]>, actuallinecount: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetLineMetrics)(windows_core::Interface::as_raw(self), core::mem::transmute(linemetrics.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), linemetrics.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), actuallinecount as _).ok() } } } #[repr(C)] @@ -11766,7 +11699,7 @@ impl IDWriteTextLayout4 { unsafe { (windows_core::Interface::vtable(self).GetFontAxisValueCount)(windows_core::Interface::as_raw(self), currentposition) } } pub unsafe fn GetFontAxisValues(&self, currentposition: u32, fontaxisvalues: &mut [DWRITE_FONT_AXIS_VALUE], textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFontAxisValues)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap(), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFontAxisValues)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap(), textrange.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetAutomaticFontAxes(&self) -> DWRITE_AUTOMATIC_FONT_AXES { unsafe { (windows_core::Interface::vtable(self).GetAutomaticFontAxes)(windows_core::Interface::as_raw(self)) } @@ -11852,26 +11785,26 @@ impl IDWriteTextRenderer { where P6: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DrawGlyphRun)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::mem::zeroed())), baselineoriginx, baselineoriginy, measuringmode, core::mem::transmute(glyphrun), glyphrundescription, clientdrawingeffect.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).DrawGlyphRun)(windows_core::Interface::as_raw(self), clientdrawingcontext.unwrap_or(core::mem::zeroed()) as _, baselineoriginx, baselineoriginy, measuringmode, core::mem::transmute(glyphrun), glyphrundescription, clientdrawingeffect.param().abi()).ok() } } pub unsafe fn DrawUnderline(&self, clientdrawingcontext: Option<*const core::ffi::c_void>, baselineoriginx: f32, baselineoriginy: f32, underline: *const DWRITE_UNDERLINE, clientdrawingeffect: P4) -> windows_core::Result<()> where P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DrawUnderline)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::mem::zeroed())), baselineoriginx, baselineoriginy, underline, clientdrawingeffect.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).DrawUnderline)(windows_core::Interface::as_raw(self), clientdrawingcontext.unwrap_or(core::mem::zeroed()) as _, baselineoriginx, baselineoriginy, underline, clientdrawingeffect.param().abi()).ok() } } pub unsafe fn DrawStrikethrough(&self, clientdrawingcontext: Option<*const core::ffi::c_void>, baselineoriginx: f32, baselineoriginy: f32, strikethrough: *const DWRITE_STRIKETHROUGH, clientdrawingeffect: P4) -> windows_core::Result<()> where P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DrawStrikethrough)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::mem::zeroed())), baselineoriginx, baselineoriginy, strikethrough, clientdrawingeffect.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).DrawStrikethrough)(windows_core::Interface::as_raw(self), clientdrawingcontext.unwrap_or(core::mem::zeroed()) as _, baselineoriginx, baselineoriginy, strikethrough, clientdrawingeffect.param().abi()).ok() } } pub unsafe fn DrawInlineObject(&self, clientdrawingcontext: Option<*const core::ffi::c_void>, originx: f32, originy: f32, inlineobject: P3, issideways: bool, isrighttoleft: bool, clientdrawingeffect: P6) -> windows_core::Result<()> where P3: windows_core::Param, P6: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DrawInlineObject)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::mem::zeroed())), originx, originy, inlineobject.param().abi(), issideways.into(), isrighttoleft.into(), clientdrawingeffect.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).DrawInlineObject)(windows_core::Interface::as_raw(self), clientdrawingcontext.unwrap_or(core::mem::zeroed()) as _, originx, originy, inlineobject.param().abi(), issideways.into(), isrighttoleft.into(), clientdrawingeffect.param().abi()).ok() } } } #[repr(C)] @@ -11942,26 +11875,26 @@ impl IDWriteTextRenderer1 { where P7: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DrawGlyphRun)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::mem::zeroed())), baselineoriginx, baselineoriginy, orientationangle, measuringmode, core::mem::transmute(glyphrun), glyphrundescription, clientdrawingeffect.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).DrawGlyphRun)(windows_core::Interface::as_raw(self), clientdrawingcontext.unwrap_or(core::mem::zeroed()) as _, baselineoriginx, baselineoriginy, orientationangle, measuringmode, core::mem::transmute(glyphrun), glyphrundescription, clientdrawingeffect.param().abi()).ok() } } pub unsafe fn DrawUnderline(&self, clientdrawingcontext: Option<*const core::ffi::c_void>, baselineoriginx: f32, baselineoriginy: f32, orientationangle: DWRITE_GLYPH_ORIENTATION_ANGLE, underline: *const DWRITE_UNDERLINE, clientdrawingeffect: P5) -> windows_core::Result<()> where P5: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DrawUnderline)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::mem::zeroed())), baselineoriginx, baselineoriginy, orientationangle, underline, clientdrawingeffect.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).DrawUnderline)(windows_core::Interface::as_raw(self), clientdrawingcontext.unwrap_or(core::mem::zeroed()) as _, baselineoriginx, baselineoriginy, orientationangle, underline, clientdrawingeffect.param().abi()).ok() } } pub unsafe fn DrawStrikethrough(&self, clientdrawingcontext: Option<*const core::ffi::c_void>, baselineoriginx: f32, baselineoriginy: f32, orientationangle: DWRITE_GLYPH_ORIENTATION_ANGLE, strikethrough: *const DWRITE_STRIKETHROUGH, clientdrawingeffect: P5) -> windows_core::Result<()> where P5: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DrawStrikethrough)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::mem::zeroed())), baselineoriginx, baselineoriginy, orientationangle, strikethrough, clientdrawingeffect.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).DrawStrikethrough)(windows_core::Interface::as_raw(self), clientdrawingcontext.unwrap_or(core::mem::zeroed()) as _, baselineoriginx, baselineoriginy, orientationangle, strikethrough, clientdrawingeffect.param().abi()).ok() } } pub unsafe fn DrawInlineObject(&self, clientdrawingcontext: Option<*const core::ffi::c_void>, originx: f32, originy: f32, orientationangle: DWRITE_GLYPH_ORIENTATION_ANGLE, inlineobject: P4, issideways: bool, isrighttoleft: bool, clientdrawingeffect: P7) -> windows_core::Result<()> where P4: windows_core::Param, P7: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DrawInlineObject)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::mem::zeroed())), originx, originy, orientationangle, inlineobject.param().abi(), issideways.into(), isrighttoleft.into(), clientdrawingeffect.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).DrawInlineObject)(windows_core::Interface::as_raw(self), clientdrawingcontext.unwrap_or(core::mem::zeroed()) as _, originx, originy, orientationangle, inlineobject.param().abi(), issideways.into(), isrighttoleft.into(), 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 04450fad09..8a9abab61a 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Dwm/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Dwm/mod.rs @@ -6,7 +6,7 @@ pub unsafe fn DwmAttachMilContent(hwnd: super::super::Foundation::HWND) -> windo #[inline] 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); - unsafe { DwmDefWindowProc(hwnd, msg, wparam, lparam, core::mem::transmute(plresult)) } + unsafe { DwmDefWindowProc(hwnd, msg, wparam, lparam, plresult as _) } } #[inline] pub unsafe fn DwmDetachMilContent(hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { @@ -43,12 +43,12 @@ pub unsafe fn DwmFlush() -> windows_core::Result<()> { #[inline] pub unsafe fn DwmGetColorizationColor(pcrcolorization: *mut u32, pfopaqueblend: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("dwmapi.dll" "system" fn DwmGetColorizationColor(pcrcolorization : *mut u32, pfopaqueblend : *mut super::super::Foundation:: BOOL) -> windows_core::HRESULT); - unsafe { DwmGetColorizationColor(core::mem::transmute(pcrcolorization), core::mem::transmute(pfopaqueblend)).ok() } + unsafe { DwmGetColorizationColor(pcrcolorization as _, pfopaqueblend as _).ok() } } #[inline] 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); - unsafe { DwmGetCompositionTimingInfo(hwnd, core::mem::transmute(ptiminginfo)).ok() } + unsafe { DwmGetCompositionTimingInfo(hwnd, ptiminginfo as _).ok() } } #[inline] pub unsafe fn DwmGetGraphicsStreamClient(uindex: u32) -> windows_core::Result { @@ -61,25 +61,25 @@ pub unsafe fn DwmGetGraphicsStreamClient(uindex: u32) -> windows_core::Result windows_core::Result<()> { windows_targets::link!("dwmapi.dll" "system" fn DwmGetGraphicsStreamTransformHint(uindex : u32, ptransform : *mut MilMatrix3x2D) -> windows_core::HRESULT); - unsafe { DwmGetGraphicsStreamTransformHint(uindex, core::mem::transmute(ptransform)).ok() } + unsafe { DwmGetGraphicsStreamTransformHint(uindex, ptransform as _).ok() } } #[inline] pub unsafe fn DwmGetTransportAttributes(pfisremoting: *mut super::super::Foundation::BOOL, pfisconnected: *mut super::super::Foundation::BOOL, pdwgeneration: *mut u32) -> windows_core::Result<()> { windows_targets::link!("dwmapi.dll" "system" fn DwmGetTransportAttributes(pfisremoting : *mut super::super::Foundation:: BOOL, pfisconnected : *mut super::super::Foundation:: BOOL, pdwgeneration : *mut u32) -> windows_core::HRESULT); - unsafe { DwmGetTransportAttributes(core::mem::transmute(pfisremoting), core::mem::transmute(pfisconnected), core::mem::transmute(pdwgeneration)).ok() } + unsafe { DwmGetTransportAttributes(pfisremoting as _, pfisconnected as _, pdwgeneration as _).ok() } } #[inline] 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); unsafe { let mut result__ = core::mem::zeroed(); - DwmGetUnmetTabRequirements(core::mem::transmute(appwindow.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + DwmGetUnmetTabRequirements(appwindow.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] 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); - unsafe { DwmGetWindowAttribute(hwnd, dwattribute.0 as _, core::mem::transmute(pvattribute), cbattribute).ok() } + unsafe { DwmGetWindowAttribute(hwnd, dwattribute.0 as _, pvattribute as _, cbattribute).ok() } } #[inline] pub unsafe fn DwmInvalidateIconicBitmaps(hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { @@ -129,7 +129,7 @@ pub unsafe fn DwmSetDxFrameDuration(hwnd: super::super::Foundation::HWND, crefre #[inline] 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); - unsafe { DwmSetIconicLivePreviewBitmap(hwnd, hbmp, core::mem::transmute(pptclient.unwrap_or(core::mem::zeroed())), dwsitflags).ok() } + unsafe { DwmSetIconicLivePreviewBitmap(hwnd, hbmp, pptclient.unwrap_or(core::mem::zeroed()) as _, dwsitflags).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -140,7 +140,7 @@ pub unsafe fn DwmSetIconicThumbnail(hwnd: super::super::Foundation::HWND, hbmp: #[inline] 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); - unsafe { DwmSetPresentParameters(hwnd, core::mem::transmute(ppresentparams)).ok() } + unsafe { DwmSetPresentParameters(hwnd, ppresentparams as _).ok() } } #[inline] pub unsafe fn DwmSetWindowAttribute(hwnd: super::super::Foundation::HWND, dwattribute: DWMWINDOWATTRIBUTE, pvattribute: *const core::ffi::c_void, cbattribute: u32) -> 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 d8c542792d..b862f3d121 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Dxgi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Dxgi/mod.rs @@ -1925,7 +1925,7 @@ impl IDXGIAdapter3 { unsafe { (windows_core::Interface::vtable(self).UnregisterHardwareContentProtectionTeardownStatus)(windows_core::Interface::as_raw(self), dwcookie) } } pub unsafe fn QueryVideoMemoryInfo(&self, nodeindex: u32, memorysegmentgroup: DXGI_MEMORY_SEGMENT_GROUP, pvideomemoryinfo: *mut DXGI_QUERY_VIDEO_MEMORY_INFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryVideoMemoryInfo)(windows_core::Interface::as_raw(self), nodeindex, memorysegmentgroup, core::mem::transmute(pvideomemoryinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryVideoMemoryInfo)(windows_core::Interface::as_raw(self), nodeindex, memorysegmentgroup, pvideomemoryinfo as _).ok() } } pub unsafe fn SetVideoMemoryReservation(&self, nodeindex: u32, memorysegmentgroup: DXGI_MEMORY_SEGMENT_GROUP, reservation: u64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetVideoMemoryReservation)(windows_core::Interface::as_raw(self), nodeindex, memorysegmentgroup, reservation).ok() } @@ -2197,7 +2197,7 @@ impl IDXGIDecodeSwapChain { } } pub unsafe fn GetDestSize(&self, pwidth: *mut u32, pheight: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDestSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pwidth), core::mem::transmute(pheight)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDestSize)(windows_core::Interface::as_raw(self), pwidth as _, pheight as _).ok() } } pub unsafe fn SetColorSpace(&self, colorspace: DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetColorSpace)(windows_core::Interface::as_raw(self), colorspace).ok() } @@ -2335,10 +2335,10 @@ 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<()> { - unsafe { (windows_core::Interface::vtable(self).CreateSurface)(windows_core::Interface::as_raw(self), pdesc, ppsurface.len().try_into().unwrap(), usage, core::mem::transmute(psharedresource.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppsurface.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateSurface)(windows_core::Interface::as_raw(self), pdesc, ppsurface.len().try_into().unwrap(), usage, psharedresource.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(ppsurface.as_ptr())).ok() } } pub unsafe fn QueryResourceResidency(&self, ppresources: *const Option, presidencystatus: *mut DXGI_RESIDENCY, numresources: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryResourceResidency)(windows_core::Interface::as_raw(self), core::mem::transmute(ppresources), core::mem::transmute(presidencystatus), numresources).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryResourceResidency)(windows_core::Interface::as_raw(self), core::mem::transmute(ppresources), presidencystatus as _, numresources).ok() } } pub unsafe fn SetGPUThreadPriority(&self, priority: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetGPUThreadPriority)(windows_core::Interface::as_raw(self), priority).ok() } @@ -2514,7 +2514,7 @@ impl IDXGIDevice2 { unsafe { (windows_core::Interface::vtable(self).OfferResources)(windows_core::Interface::as_raw(self), ppresources.len().try_into().unwrap(), core::mem::transmute(ppresources.as_ptr()), priority).ok() } } pub unsafe fn ReclaimResources(&self, numresources: u32, ppresources: *const Option, pdiscarded: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReclaimResources)(windows_core::Interface::as_raw(self), numresources, core::mem::transmute(ppresources), core::mem::transmute(pdiscarded.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReclaimResources)(windows_core::Interface::as_raw(self), numresources, core::mem::transmute(ppresources), pdiscarded.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn EnqueueSetEvent(&self, hevent: super::super::Foundation::HANDLE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).EnqueueSetEvent)(windows_core::Interface::as_raw(self), hevent).ok() } @@ -2627,7 +2627,7 @@ impl IDXGIDevice4 { unsafe { (windows_core::Interface::vtable(self).OfferResources1)(windows_core::Interface::as_raw(self), ppresources.len().try_into().unwrap(), core::mem::transmute(ppresources.as_ptr()), priority, flags.0 as _).ok() } } pub unsafe fn ReclaimResources1(&self, numresources: u32, ppresources: *const Option, presults: *mut DXGI_RECLAIM_RESOURCE_RESULTS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReclaimResources1)(windows_core::Interface::as_raw(self), numresources, core::mem::transmute(ppresources), core::mem::transmute(presults)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReclaimResources1)(windows_core::Interface::as_raw(self), numresources, core::mem::transmute(ppresources), presults as _).ok() } } } #[repr(C)] @@ -2972,7 +2972,7 @@ impl IDXGIFactory2 { { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateSwapChainForHwnd)(windows_core::Interface::as_raw(self), pdevice.param().abi(), hwnd, pdesc, core::mem::transmute(pfullscreendesc.unwrap_or(core::mem::zeroed())), prestricttooutput.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateSwapChainForHwnd)(windows_core::Interface::as_raw(self), pdevice.param().abi(), hwnd, pdesc, pfullscreendesc.unwrap_or(core::mem::zeroed()) as _, prestricttooutput.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] @@ -3334,7 +3334,7 @@ impl core::ops::Deref for IDXGIFactory5 { windows_core::imp::interface_hierarchy!(IDXGIFactory5, windows_core::IUnknown, IDXGIObject, IDXGIFactory, IDXGIFactory1, IDXGIFactory2, IDXGIFactory3, IDXGIFactory4); impl IDXGIFactory5 { pub unsafe fn CheckFeatureSupport(&self, feature: DXGI_FEATURE, pfeaturesupportdata: *mut core::ffi::c_void, featuresupportdatasize: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CheckFeatureSupport)(windows_core::Interface::as_raw(self), feature, core::mem::transmute(pfeaturesupportdata), featuresupportdatasize).ok() } + unsafe { (windows_core::Interface::vtable(self).CheckFeatureSupport)(windows_core::Interface::as_raw(self), feature, pfeaturesupportdata as _, featuresupportdatasize).ok() } } } #[repr(C)] @@ -3492,7 +3492,7 @@ impl IDXGIFactoryMedia { { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateSwapChainForCompositionSurfaceHandle)(windows_core::Interface::as_raw(self), pdevice.param().abi(), core::mem::transmute(hsurface.unwrap_or(core::mem::zeroed())), 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(), hsurface.unwrap_or(core::mem::zeroed()) as _, pdesc, prestricttooutput.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn CreateDecodeSwapChainForCompositionSurfaceHandle(&self, pdevice: P0, hsurface: Option, pdesc: *const DXGI_DECODE_SWAP_CHAIN_DESC, pyuvdecodebuffers: P3, prestricttooutput: P4) -> windows_core::Result @@ -3503,7 +3503,7 @@ impl IDXGIFactoryMedia { { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateDecodeSwapChainForCompositionSurfaceHandle)(windows_core::Interface::as_raw(self), pdevice.param().abi(), core::mem::transmute(hsurface.unwrap_or(core::mem::zeroed())), 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(), hsurface.unwrap_or(core::mem::zeroed()) as _, pdesc, pyuvdecodebuffers.param().abi(), prestricttooutput.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } } @@ -3574,7 +3574,7 @@ impl IDXGIInfoQueue { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).GetMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(producer), messageindex, core::mem::transmute(pmessage.unwrap_or(core::mem::zeroed())), core::mem::transmute(pmessagebytelength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(producer), messageindex, pmessage.unwrap_or(core::mem::zeroed()) as _, pmessagebytelength as _).ok() } } pub unsafe fn GetNumStoredMessagesAllowedByRetrievalFilters(&self, producer: windows_core::GUID) -> u64 { unsafe { (windows_core::Interface::vtable(self).GetNumStoredMessagesAllowedByRetrievalFilters)(windows_core::Interface::as_raw(self), core::mem::transmute(producer)) } @@ -3598,7 +3598,7 @@ impl IDXGIInfoQueue { unsafe { (windows_core::Interface::vtable(self).AddStorageFilterEntries)(windows_core::Interface::as_raw(self), core::mem::transmute(producer), pfilter).ok() } } pub unsafe fn GetStorageFilter(&self, producer: windows_core::GUID, pfilter: Option<*mut DXGI_INFO_QUEUE_FILTER>, pfilterbytelength: *mut usize) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetStorageFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(producer), pfilter.unwrap_or(core::mem::zeroed()) as _, pfilterbytelength as _).ok() } } pub unsafe fn ClearStorageFilter(&self, producer: windows_core::GUID) { unsafe { (windows_core::Interface::vtable(self).ClearStorageFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(producer)) } @@ -3625,7 +3625,7 @@ impl IDXGIInfoQueue { unsafe { (windows_core::Interface::vtable(self).AddRetrievalFilterEntries)(windows_core::Interface::as_raw(self), core::mem::transmute(producer), pfilter).ok() } } pub unsafe fn GetRetrievalFilter(&self, producer: windows_core::GUID, pfilter: Option<*mut DXGI_INFO_QUEUE_FILTER>, pfilterbytelength: *mut usize) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetRetrievalFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(producer), pfilter.unwrap_or(core::mem::zeroed()) as _, pfilterbytelength as _).ok() } } pub unsafe fn ClearRetrievalFilter(&self, producer: windows_core::GUID) { unsafe { (windows_core::Interface::vtable(self).ClearRetrievalFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(producer)) } @@ -4103,7 +4103,7 @@ impl IDXGIObject { unsafe { (windows_core::Interface::vtable(self).SetPrivateDataInterface)(windows_core::Interface::as_raw(self), name, punknown.param().abi()).ok() } } pub unsafe fn GetPrivateData(&self, name: *const windows_core::GUID, pdatasize: *mut u32, pdata: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), name, core::mem::transmute(pdatasize), core::mem::transmute(pdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), name, pdatasize as _, pdata as _).ok() } } pub unsafe fn GetParent(&self) -> windows_core::Result where @@ -4186,14 +4186,14 @@ 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetDisplayModeList)(windows_core::Interface::as_raw(self), enumformat, flags, core::mem::transmute(pnummodes), core::mem::transmute(pdesc.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDisplayModeList)(windows_core::Interface::as_raw(self), enumformat, flags, pnummodes as _, pdesc.unwrap_or(core::mem::zeroed()) as _).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<()> where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindClosestMatchingMode)(windows_core::Interface::as_raw(self), pmodetomatch, core::mem::transmute(pclosestmatch), pconcerneddevice.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).FindClosestMatchingMode)(windows_core::Interface::as_raw(self), pmodetomatch, pclosestmatch as _, pconcerneddevice.param().abi()).ok() } } pub unsafe fn WaitForVBlank(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).WaitForVBlank)(windows_core::Interface::as_raw(self)).ok() } @@ -4209,7 +4209,7 @@ impl IDXGIOutput { } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetGammaControlCapabilities(&self, pgammacaps: *mut Common::DXGI_GAMMA_CONTROL_CAPABILITIES) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGammaControlCapabilities)(windows_core::Interface::as_raw(self), core::mem::transmute(pgammacaps)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGammaControlCapabilities)(windows_core::Interface::as_raw(self), pgammacaps as _).ok() } } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn SetGammaControl(&self, parray: *const Common::DXGI_GAMMA_CONTROL) -> windows_core::Result<()> { @@ -4217,7 +4217,7 @@ impl IDXGIOutput { } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetGammaControl(&self, parray: *mut Common::DXGI_GAMMA_CONTROL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGammaControl)(windows_core::Interface::as_raw(self), core::mem::transmute(parray)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGammaControl)(windows_core::Interface::as_raw(self), parray as _).ok() } } pub unsafe fn SetDisplaySurface(&self, pscanoutsurface: P0) -> windows_core::Result<()> where @@ -4232,7 +4232,7 @@ impl IDXGIOutput { unsafe { (windows_core::Interface::vtable(self).GetDisplaySurfaceData)(windows_core::Interface::as_raw(self), pdestination.param().abi()).ok() } } pub unsafe fn GetFrameStatistics(&self, pstats: *mut DXGI_FRAME_STATISTICS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFrameStatistics)(windows_core::Interface::as_raw(self), core::mem::transmute(pstats)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFrameStatistics)(windows_core::Interface::as_raw(self), pstats as _).ok() } } } #[repr(C)] @@ -4402,14 +4402,14 @@ 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetDisplayModeList1)(windows_core::Interface::as_raw(self), enumformat, flags, core::mem::transmute(pnummodes), core::mem::transmute(pdesc.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDisplayModeList1)(windows_core::Interface::as_raw(self), enumformat, flags, pnummodes as _, pdesc.unwrap_or(core::mem::zeroed()) as _).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<()> where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindClosestMatchingMode1)(windows_core::Interface::as_raw(self), pmodetomatch, core::mem::transmute(pclosestmatch), pconcerneddevice.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).FindClosestMatchingMode1)(windows_core::Interface::as_raw(self), pmodetomatch, pclosestmatch as _, pconcerneddevice.param().abi()).ok() } } pub unsafe fn GetDisplaySurfaceData1(&self, pdestination: P0) -> windows_core::Result<()> where @@ -4817,16 +4817,16 @@ impl IDXGIOutputDuplication { } } pub unsafe fn AcquireNextFrame(&self, timeoutinmilliseconds: u32, pframeinfo: *mut DXGI_OUTDUPL_FRAME_INFO, ppdesktopresource: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AcquireNextFrame)(windows_core::Interface::as_raw(self), timeoutinmilliseconds, core::mem::transmute(pframeinfo), core::mem::transmute(ppdesktopresource)).ok() } + unsafe { (windows_core::Interface::vtable(self).AcquireNextFrame)(windows_core::Interface::as_raw(self), timeoutinmilliseconds, pframeinfo as _, core::mem::transmute(ppdesktopresource)).ok() } } pub unsafe fn GetFrameDirtyRects(&self, dirtyrectsbuffersize: u32, pdirtyrectsbuffer: *mut super::super::Foundation::RECT, pdirtyrectsbuffersizerequired: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFrameDirtyRects)(windows_core::Interface::as_raw(self), dirtyrectsbuffersize, core::mem::transmute(pdirtyrectsbuffer), core::mem::transmute(pdirtyrectsbuffersizerequired)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFrameDirtyRects)(windows_core::Interface::as_raw(self), dirtyrectsbuffersize, pdirtyrectsbuffer as _, pdirtyrectsbuffersizerequired as _).ok() } } pub unsafe fn GetFrameMoveRects(&self, moverectsbuffersize: u32, pmoverectbuffer: *mut DXGI_OUTDUPL_MOVE_RECT, pmoverectsbuffersizerequired: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFrameMoveRects)(windows_core::Interface::as_raw(self), moverectsbuffersize, core::mem::transmute(pmoverectbuffer), core::mem::transmute(pmoverectsbuffersizerequired)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFrameMoveRects)(windows_core::Interface::as_raw(self), moverectsbuffersize, pmoverectbuffer as _, pmoverectsbuffersizerequired as _).ok() } } pub unsafe fn GetFramePointerShape(&self, pointershapebuffersize: u32, ppointershapebuffer: *mut core::ffi::c_void, ppointershapebuffersizerequired: *mut u32, ppointershapeinfo: *mut DXGI_OUTDUPL_POINTER_SHAPE_INFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFramePointerShape)(windows_core::Interface::as_raw(self), pointershapebuffersize, core::mem::transmute(ppointershapebuffer), core::mem::transmute(ppointershapebuffersizerequired), core::mem::transmute(ppointershapeinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFramePointerShape)(windows_core::Interface::as_raw(self), pointershapebuffersize, ppointershapebuffer as _, ppointershapebuffersizerequired as _, ppointershapeinfo as _).ok() } } pub unsafe fn MapDesktopSurface(&self) -> windows_core::Result { unsafe { @@ -5072,7 +5072,7 @@ impl IDXGIResource1 { { unsafe { 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::mem::zeroed())), dwaccess, lpname.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).CreateSharedHandle)(windows_core::Interface::as_raw(self), pattributes.unwrap_or(core::mem::zeroed()) as _, dwaccess, lpname.param().abi(), &mut result__).map(|| result__) } } } @@ -5150,7 +5150,7 @@ impl IDXGISurface { } } pub unsafe fn Map(&self, plockedrect: *mut DXGI_MAPPED_RECT, mapflags: DXGI_MAP_FLAGS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Map)(windows_core::Interface::as_raw(self), core::mem::transmute(plockedrect), mapflags).ok() } + unsafe { (windows_core::Interface::vtable(self).Map)(windows_core::Interface::as_raw(self), plockedrect as _, mapflags).ok() } } pub unsafe fn Unmap(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Unmap)(windows_core::Interface::as_raw(self)).ok() } @@ -5233,7 +5233,7 @@ impl IDXGISurface1 { } } pub unsafe fn ReleaseDC(&self, pdirtyrect: Option<*const super::super::Foundation::RECT>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReleaseDC)(windows_core::Interface::as_raw(self), core::mem::transmute(pdirtyrect.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReleaseDC)(windows_core::Interface::as_raw(self), pdirtyrect.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -5297,7 +5297,7 @@ impl IDXGISurface2 { T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - unsafe { (windows_core::Interface::vtable(self).GetResource)(windows_core::Interface::as_raw(self), &T::IID, &mut result__, core::mem::transmute(psubresourceindex)).and_then(|| windows_core::Type::from_abi(result__)) } + unsafe { (windows_core::Interface::vtable(self).GetResource)(windows_core::Interface::as_raw(self), &T::IID, &mut result__, psubresourceindex as _).and_then(|| windows_core::Type::from_abi(result__)) } } } #[repr(C)] @@ -5356,7 +5356,7 @@ impl IDXGISwapChain { unsafe { (windows_core::Interface::vtable(self).SetFullscreenState)(windows_core::Interface::as_raw(self), fullscreen.into(), ptarget.param().abi()).ok() } } pub unsafe fn GetFullscreenState(&self, pfullscreen: Option<*mut super::super::Foundation::BOOL>, pptarget: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetFullscreenState)(windows_core::Interface::as_raw(self), pfullscreen.unwrap_or(core::mem::zeroed()) as _, pptarget.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetDesc(&self) -> windows_core::Result { @@ -5380,7 +5380,7 @@ impl IDXGISwapChain { } } pub unsafe fn GetFrameStatistics(&self, pstats: *mut DXGI_FRAME_STATISTICS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFrameStatistics)(windows_core::Interface::as_raw(self), core::mem::transmute(pstats)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFrameStatistics)(windows_core::Interface::as_raw(self), pstats as _).ok() } } pub unsafe fn GetLastPresentCount(&self) -> windows_core::Result { unsafe { @@ -5783,7 +5783,7 @@ impl IDXGISwapChain2 { unsafe { (windows_core::Interface::vtable(self).SetSourceSize)(windows_core::Interface::as_raw(self), width, height).ok() } } pub unsafe fn GetSourceSize(&self, pwidth: *mut u32, pheight: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSourceSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pwidth), core::mem::transmute(pheight)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourceSize)(windows_core::Interface::as_raw(self), pwidth as _, pheight as _).ok() } } pub unsafe fn SetMaximumFrameLatency(&self, maxlatency: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetMaximumFrameLatency)(windows_core::Interface::as_raw(self), maxlatency).ok() } @@ -5801,7 +5801,7 @@ impl IDXGISwapChain2 { unsafe { (windows_core::Interface::vtable(self).SetMatrixTransform)(windows_core::Interface::as_raw(self), pmatrix).ok() } } pub unsafe fn GetMatrixTransform(&self, pmatrix: *mut DXGI_MATRIX_3X2_F) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMatrixTransform)(windows_core::Interface::as_raw(self), core::mem::transmute(pmatrix)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMatrixTransform)(windows_core::Interface::as_raw(self), pmatrix as _).ok() } } } #[repr(C)] @@ -6047,13 +6047,13 @@ windows_core::imp::define_interface!(IDXGISwapChainMedia, IDXGISwapChainMedia_Vt windows_core::imp::interface_hierarchy!(IDXGISwapChainMedia, windows_core::IUnknown); impl IDXGISwapChainMedia { pub unsafe fn GetFrameStatisticsMedia(&self, pstats: *mut DXGI_FRAME_STATISTICS_MEDIA) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFrameStatisticsMedia)(windows_core::Interface::as_raw(self), core::mem::transmute(pstats)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFrameStatisticsMedia)(windows_core::Interface::as_raw(self), pstats as _).ok() } } pub unsafe fn SetPresentDuration(&self, duration: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetPresentDuration)(windows_core::Interface::as_raw(self), duration).ok() } } pub unsafe fn CheckPresentDurationSupport(&self, desiredpresentduration: u32, pclosestsmallerpresentduration: *mut u32, pclosestlargerpresentduration: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CheckPresentDurationSupport)(windows_core::Interface::as_raw(self), desiredpresentduration, core::mem::transmute(pclosestsmallerpresentduration), core::mem::transmute(pclosestlargerpresentduration)).ok() } + unsafe { (windows_core::Interface::vtable(self).CheckPresentDurationSupport)(windows_core::Interface::as_raw(self), desiredpresentduration, pclosestsmallerpresentduration as _, pclosestlargerpresentduration as _).ok() } } } #[repr(C)] 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 34acb9ce83..a7e36fc970 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Gdi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Gdi/mod.rs @@ -6,7 +6,7 @@ pub unsafe fn AbortPath(hdc: HDC) -> super::super::Foundation::BOOL { #[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); - unsafe { AddFontMemResourceEx(pfileview, cjsize, core::mem::transmute(pvresrved.unwrap_or(core::mem::zeroed())), pnumfonts) } + unsafe { AddFontMemResourceEx(pfileview, cjsize, pvresrved.unwrap_or(core::mem::zeroed()) as _, pnumfonts) } } #[inline] pub unsafe fn AddFontResourceA(param0: P0) -> i32 @@ -22,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); - unsafe { AddFontResourceExA(name.param().abi(), fl, core::mem::transmute(res.unwrap_or(core::mem::zeroed()))) } + unsafe { AddFontResourceExA(name.param().abi(), fl, res.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn AddFontResourceExW(name: P0, fl: FONT_RESOURCE_CHARACTERISTICS, res: Option<*const core::ffi::c_void>) -> i32 @@ -30,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); - unsafe { AddFontResourceExW(name.param().abi(), fl, core::mem::transmute(res.unwrap_or(core::mem::zeroed()))) } + unsafe { AddFontResourceExW(name.param().abi(), fl, res.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn AddFontResourceW(param0: P0) -> i32 @@ -68,7 +68,7 @@ pub unsafe fn ArcTo(hdc: HDC, left: i32, top: i32, right: i32, bottom: i32, xr1: #[inline] 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); - unsafe { BeginPaint(hwnd, core::mem::transmute(lppaint)) } + unsafe { BeginPaint(hwnd, lppaint as _) } } #[inline] pub unsafe fn BeginPath(hdc: HDC) -> super::super::Foundation::BOOL { @@ -78,7 +78,7 @@ pub unsafe fn BeginPath(hdc: HDC) -> super::super::Foundation::BOOL { #[inline] 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); - unsafe { BitBlt(hdc, x, y, cx, cy, core::mem::transmute(hdcsrc.unwrap_or(core::mem::zeroed())), x1, y1, rop).ok() } + unsafe { BitBlt(hdc, x, y, cx, cy, hdcsrc.unwrap_or(core::mem::zeroed()) as _, x1, y1, rop).ok() } } #[inline] pub unsafe fn CancelDC(hdc: HDC) -> super::super::Foundation::BOOL { @@ -88,7 +88,7 @@ pub unsafe fn CancelDC(hdc: HDC) -> super::super::Foundation::BOOL { #[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); - unsafe { ChangeDisplaySettingsA(core::mem::transmute(lpdevmode.unwrap_or(core::mem::zeroed())), dwflags) } + unsafe { ChangeDisplaySettingsA(lpdevmode.unwrap_or(core::mem::zeroed()) as _, dwflags) } } #[inline] pub unsafe fn ChangeDisplaySettingsExA(lpszdevicename: P0, lpdevmode: Option<*const DEVMODEA>, hwnd: Option, dwflags: CDS_TYPE, lparam: Option<*const core::ffi::c_void>) -> DISP_CHANGE @@ -96,7 +96,7 @@ where P0: 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); - unsafe { ChangeDisplaySettingsExA(lpszdevicename.param().abi(), core::mem::transmute(lpdevmode.unwrap_or(core::mem::zeroed())), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(lparam.unwrap_or(core::mem::zeroed()))) } + unsafe { ChangeDisplaySettingsExA(lpszdevicename.param().abi(), lpdevmode.unwrap_or(core::mem::zeroed()) as _, hwnd.unwrap_or(core::mem::zeroed()) as _, dwflags, lparam.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ChangeDisplaySettingsExW(lpszdevicename: P0, lpdevmode: Option<*const DEVMODEW>, hwnd: Option, dwflags: CDS_TYPE, lparam: Option<*const core::ffi::c_void>) -> DISP_CHANGE @@ -104,12 +104,12 @@ where P0: 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); - unsafe { ChangeDisplaySettingsExW(lpszdevicename.param().abi(), core::mem::transmute(lpdevmode.unwrap_or(core::mem::zeroed())), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(lparam.unwrap_or(core::mem::zeroed()))) } + unsafe { ChangeDisplaySettingsExW(lpszdevicename.param().abi(), lpdevmode.unwrap_or(core::mem::zeroed()) as _, hwnd.unwrap_or(core::mem::zeroed()) as _, dwflags, lparam.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { ChangeDisplaySettingsW(core::mem::transmute(lpdevmode.unwrap_or(core::mem::zeroed())), dwflags) } + unsafe { ChangeDisplaySettingsW(lpdevmode.unwrap_or(core::mem::zeroed()) as _, dwflags) } } #[inline] 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 { @@ -119,7 +119,7 @@ pub unsafe fn Chord(hdc: HDC, x1: i32, y1: i32, x2: i32, y2: i32, x3: i32, y3: i #[inline] 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); - unsafe { ClientToScreen(hwnd, core::mem::transmute(lppoint)) } + unsafe { ClientToScreen(hwnd, lppoint as _) } } #[inline] pub unsafe fn CloseEnhMetaFile(hdc: HDC) -> HENHMETAFILE { @@ -139,12 +139,12 @@ pub unsafe fn CloseMetaFile(hdc: HDC) -> HMETAFILE { #[inline] 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); - unsafe { 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())), imode) } + unsafe { CombineRgn(hrgndst.unwrap_or(core::mem::zeroed()) as _, hrgnsrc1.unwrap_or(core::mem::zeroed()) as _, hrgnsrc2.unwrap_or(core::mem::zeroed()) as _, imode) } } #[inline] pub unsafe fn CombineTransform(lpxfout: *mut XFORM, lpxf1: *const XFORM, lpxf2: *const XFORM) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn CombineTransform(lpxfout : *mut XFORM, lpxf1 : *const XFORM, lpxf2 : *const XFORM) -> super::super::Foundation:: BOOL); - unsafe { CombineTransform(core::mem::transmute(lpxfout), lpxf1, lpxf2) } + unsafe { CombineTransform(lpxfout as _, lpxf1, lpxf2) } } #[inline] pub unsafe fn CopyEnhMetaFileA(henh: HENHMETAFILE, lpfilename: P1) -> HENHMETAFILE @@ -181,12 +181,12 @@ where #[inline] pub unsafe fn CopyRect(lprcdst: *mut super::super::Foundation::RECT, lprcsrc: *const super::super::Foundation::RECT) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn CopyRect(lprcdst : *mut super::super::Foundation:: RECT, lprcsrc : *const super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - unsafe { CopyRect(core::mem::transmute(lprcdst), lprcsrc) } + unsafe { CopyRect(lprcdst as _, lprcsrc) } } #[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); - unsafe { CreateBitmap(nwidth, nheight, nplanes, nbitcount, core::mem::transmute(lpbits.unwrap_or(core::mem::zeroed()))) } + unsafe { CreateBitmap(nwidth, nheight, nplanes, nbitcount, lpbits.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CreateBitmapIndirect(pbm: *const BITMAP) -> HBITMAP { @@ -206,7 +206,7 @@ pub unsafe fn CreateCompatibleBitmap(hdc: HDC, cx: i32, cy: i32) -> HBITMAP { #[inline] pub unsafe fn CreateCompatibleDC(hdc: Option) -> HDC { windows_targets::link!("gdi32.dll" "system" fn CreateCompatibleDC(hdc : HDC) -> HDC); - unsafe { CreateCompatibleDC(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed()))) } + unsafe { CreateCompatibleDC(hdc.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CreateDCA(pwszdriver: P0, pwszdevice: P1, pszport: P2, pdm: Option<*const DEVMODEA>) -> HDC @@ -216,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); - unsafe { CreateDCA(pwszdriver.param().abi(), pwszdevice.param().abi(), pszport.param().abi(), core::mem::transmute(pdm.unwrap_or(core::mem::zeroed()))) } + unsafe { CreateDCA(pwszdriver.param().abi(), pwszdevice.param().abi(), pszport.param().abi(), pdm.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CreateDCW(pwszdriver: P0, pwszdevice: P1, pszport: P2, pdm: Option<*const DEVMODEW>) -> HDC @@ -226,7 +226,7 @@ where P2: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn CreateDCW(pwszdriver : windows_core::PCWSTR, pwszdevice : windows_core::PCWSTR, pszport : windows_core::PCWSTR, pdm : *const DEVMODEW) -> HDC); - unsafe { CreateDCW(pwszdriver.param().abi(), pwszdevice.param().abi(), pszport.param().abi(), core::mem::transmute(pdm.unwrap_or(core::mem::zeroed()))) } + unsafe { CreateDCW(pwszdriver.param().abi(), pwszdevice.param().abi(), pszport.param().abi(), pdm.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CreateDIBPatternBrush(h: super::super::Foundation::HGLOBAL, iusage: DIB_USAGE) -> HBRUSH { @@ -241,13 +241,13 @@ pub unsafe fn CreateDIBPatternBrushPt(lppackeddib: *const core::ffi::c_void, ius #[inline] 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__ = unsafe { CreateDIBSection(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), pbmi, usage, core::mem::transmute(ppvbits), core::mem::transmute(hsection.unwrap_or(core::mem::zeroed())), offset) }; + let result__ = unsafe { CreateDIBSection(hdc.unwrap_or(core::mem::zeroed()) as _, pbmi, usage, ppvbits as _, hsection.unwrap_or(core::mem::zeroed()) as _, offset) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] 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); - unsafe { CreateDIBitmap(hdc, core::mem::transmute(pbmih.unwrap_or(core::mem::zeroed())), flinit, core::mem::transmute(pjbits.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbmi.unwrap_or(core::mem::zeroed())), iusage) } + unsafe { CreateDIBitmap(hdc, pbmih.unwrap_or(core::mem::zeroed()) as _, flinit, pjbits.unwrap_or(core::mem::zeroed()) as _, pbmi.unwrap_or(core::mem::zeroed()) as _, iusage) } } #[inline] pub unsafe fn CreateDiscardableBitmap(hdc: HDC, cx: i32, cy: i32) -> HBITMAP { @@ -271,7 +271,7 @@ where 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); - unsafe { 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()) } + unsafe { CreateEnhMetaFileA(hdc.unwrap_or(core::mem::zeroed()) as _, lpfilename.param().abi(), lprc.unwrap_or(core::mem::zeroed()) as _, lpdesc.param().abi()) } } #[inline] pub unsafe fn CreateEnhMetaFileW(hdc: Option, lpfilename: P1, lprc: Option<*const super::super::Foundation::RECT>, lpdesc: P3) -> HDC @@ -280,7 +280,7 @@ where 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); - unsafe { 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()) } + unsafe { CreateEnhMetaFileW(hdc.unwrap_or(core::mem::zeroed()) as _, lpfilename.param().abi(), lprc.unwrap_or(core::mem::zeroed()) as _, 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 @@ -313,7 +313,7 @@ pub unsafe fn CreateFontIndirectW(lplf: *const LOGFONTW) -> HFONT { #[inline] pub unsafe fn CreateFontPackage(puchsrcbuffer: *const u8, ulsrcbuffersize: u32, ppuchfontpackagebuffer: *mut *mut u8, pulfontpackagebuffersize: *mut u32, pulbyteswritten: *mut u32, usflag: u16, usttcindex: u16, ussubsetformat: u16, ussubsetlanguage: u16, ussubsetplatform: CREATE_FONT_PACKAGE_SUBSET_PLATFORM, ussubsetencoding: CREATE_FONT_PACKAGE_SUBSET_ENCODING, pussubsetkeeplist: *const u16, ussubsetlistcount: u16, lpfnallocate: CFP_ALLOCPROC, lpfnreallocate: CFP_REALLOCPROC, lpfnfree: CFP_FREEPROC, lpvreserved: *mut core::ffi::c_void) -> u32 { windows_targets::link!("fontsub.dll" "cdecl" fn CreateFontPackage(puchsrcbuffer : *const u8, ulsrcbuffersize : u32, ppuchfontpackagebuffer : *mut *mut u8, pulfontpackagebuffersize : *mut u32, pulbyteswritten : *mut u32, usflag : u16, usttcindex : u16, ussubsetformat : u16, ussubsetlanguage : u16, ussubsetplatform : CREATE_FONT_PACKAGE_SUBSET_PLATFORM, ussubsetencoding : CREATE_FONT_PACKAGE_SUBSET_ENCODING, pussubsetkeeplist : *const u16, ussubsetlistcount : u16, lpfnallocate : CFP_ALLOCPROC, lpfnreallocate : CFP_REALLOCPROC, lpfnfree : CFP_FREEPROC, lpvreserved : *mut core::ffi::c_void) -> u32); - unsafe { CreateFontPackage(puchsrcbuffer, ulsrcbuffersize, core::mem::transmute(ppuchfontpackagebuffer), core::mem::transmute(pulfontpackagebuffersize), core::mem::transmute(pulbyteswritten), usflag, usttcindex, ussubsetformat, ussubsetlanguage, ussubsetplatform, ussubsetencoding, pussubsetkeeplist, ussubsetlistcount, lpfnallocate, lpfnreallocate, lpfnfree, core::mem::transmute(lpvreserved)) } + unsafe { CreateFontPackage(puchsrcbuffer, ulsrcbuffersize, ppuchfontpackagebuffer as _, pulfontpackagebuffersize as _, pulbyteswritten as _, usflag, usttcindex, ussubsetformat, ussubsetlanguage, ussubsetplatform, ussubsetencoding, pussubsetkeeplist, ussubsetlistcount, lpfnallocate, lpfnreallocate, lpfnfree, lpvreserved as _) } } #[inline] pub unsafe fn CreateFontW(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 @@ -326,7 +326,7 @@ where #[inline] pub unsafe fn CreateHalftonePalette(hdc: Option) -> HPALETTE { windows_targets::link!("gdi32.dll" "system" fn CreateHalftonePalette(hdc : HDC) -> HPALETTE); - unsafe { CreateHalftonePalette(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed()))) } + unsafe { CreateHalftonePalette(hdc.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CreateHatchBrush(ihatch: HATCH_BRUSH_STYLE, color: super::super::Foundation::COLORREF) -> HBRUSH { @@ -341,7 +341,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); - unsafe { CreateICA(pszdriver.param().abi(), pszdevice.param().abi(), pszport.param().abi(), core::mem::transmute(pdm.unwrap_or(core::mem::zeroed()))) } + unsafe { CreateICA(pszdriver.param().abi(), pszdevice.param().abi(), pszport.param().abi(), pdm.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CreateICW(pszdriver: P0, pszdevice: P1, pszport: P2, pdm: Option<*const DEVMODEW>) -> HDC @@ -351,7 +351,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); - unsafe { CreateICW(pszdriver.param().abi(), pszdevice.param().abi(), pszport.param().abi(), core::mem::transmute(pdm.unwrap_or(core::mem::zeroed()))) } + unsafe { CreateICW(pszdriver.param().abi(), pszdevice.param().abi(), pszport.param().abi(), pdm.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CreateMetaFileA(pszfile: P0) -> HDC @@ -452,7 +452,7 @@ pub unsafe fn DeleteDC(hdc: HDC) -> super::super::Foundation::BOOL { #[inline] pub unsafe fn DeleteEnhMetaFile(hmf: Option) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn DeleteEnhMetaFile(hmf : HENHMETAFILE) -> super::super::Foundation:: BOOL); - unsafe { DeleteEnhMetaFile(core::mem::transmute(hmf.unwrap_or(core::mem::zeroed()))) } + unsafe { DeleteEnhMetaFile(hmf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn DeleteMetaFile(hmf: HMETAFILE) -> super::super::Foundation::BOOL { @@ -467,7 +467,7 @@ pub unsafe fn DeleteObject(ho: HGDIOBJ) -> super::super::Foundation::BOOL { #[inline] 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); - unsafe { DrawAnimatedRects(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), idani, lprcfrom, lprcto) } + unsafe { DrawAnimatedRects(hwnd.unwrap_or(core::mem::zeroed()) as _, idani, lprcfrom, lprcto) } } #[inline] 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 { @@ -477,7 +477,7 @@ pub unsafe fn DrawCaption(hwnd: super::super::Foundation::HWND, hdc: HDC, lprect #[inline] 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); - unsafe { DrawEdge(hdc, core::mem::transmute(qrc), edge, grfflags) } + unsafe { DrawEdge(hdc, qrc as _, edge, grfflags) } } #[inline] pub unsafe fn DrawEscape(hdc: HDC, iescape: i32, lpin: Option<&[u8]>) -> i32 { @@ -492,37 +492,37 @@ pub unsafe fn DrawFocusRect(hdc: HDC, lprc: *const super::super::Foundation::REC #[inline] 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); - unsafe { DrawFrameControl(param0, core::mem::transmute(param1), param2, param3) } + unsafe { DrawFrameControl(param0, param1 as _, param2, param3) } } #[inline] 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); - unsafe { DrawStateA(hdc, core::mem::transmute(hbrfore.unwrap_or(core::mem::zeroed())), core::mem::transmute(qfncallback.unwrap_or(core::mem::zeroed())), ldata, wdata, x, y, cx, cy, uflags) } + unsafe { DrawStateA(hdc, hbrfore.unwrap_or(core::mem::zeroed()) as _, qfncallback.unwrap_or(core::mem::zeroed()) as _, ldata, wdata, x, y, cx, cy, uflags) } } #[inline] 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); - unsafe { DrawStateW(hdc, core::mem::transmute(hbrfore.unwrap_or(core::mem::zeroed())), core::mem::transmute(qfncallback.unwrap_or(core::mem::zeroed())), ldata, wdata, x, y, cx, cy, uflags) } + unsafe { DrawStateW(hdc, hbrfore.unwrap_or(core::mem::zeroed()) as _, qfncallback.unwrap_or(core::mem::zeroed()) as _, ldata, wdata, x, y, cx, cy, uflags) } } #[inline] 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); - unsafe { DrawTextA(hdc, core::mem::transmute(lpchtext.as_ptr()), lpchtext.len().try_into().unwrap(), core::mem::transmute(lprc), format) } + unsafe { DrawTextA(hdc, core::mem::transmute(lpchtext.as_ptr()), lpchtext.len().try_into().unwrap(), lprc as _, format) } } #[inline] 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); - unsafe { DrawTextExA(hdc, core::mem::transmute(lpchtext.as_ptr()), lpchtext.len().try_into().unwrap(), core::mem::transmute(lprc), format, core::mem::transmute(lpdtp.unwrap_or(core::mem::zeroed()))) } + unsafe { DrawTextExA(hdc, core::mem::transmute(lpchtext.as_ptr()), lpchtext.len().try_into().unwrap(), lprc as _, format, lpdtp.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { DrawTextExW(hdc, core::mem::transmute(lpchtext.as_ptr()), lpchtext.len().try_into().unwrap(), core::mem::transmute(lprc), format, core::mem::transmute(lpdtp.unwrap_or(core::mem::zeroed()))) } + unsafe { DrawTextExW(hdc, core::mem::transmute(lpchtext.as_ptr()), lpchtext.len().try_into().unwrap(), lprc as _, format, lpdtp.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { DrawTextW(hdc, core::mem::transmute(lpchtext.as_ptr()), lpchtext.len().try_into().unwrap(), core::mem::transmute(lprc), format) } + unsafe { DrawTextW(hdc, core::mem::transmute(lpchtext.as_ptr()), lpchtext.len().try_into().unwrap(), lprc as _, format) } } #[inline] pub unsafe fn Ellipse(hdc: HDC, left: i32, top: i32, right: i32, bottom: i32) -> super::super::Foundation::BOOL { @@ -545,7 +545,7 @@ where P0: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn EnumDisplayDevicesA(lpdevice : windows_core::PCSTR, idevnum : u32, lpdisplaydevice : *mut DISPLAY_DEVICEA, dwflags : u32) -> super::super::Foundation:: BOOL); - unsafe { EnumDisplayDevicesA(lpdevice.param().abi(), idevnum, core::mem::transmute(lpdisplaydevice), dwflags) } + unsafe { EnumDisplayDevicesA(lpdevice.param().abi(), idevnum, lpdisplaydevice as _, dwflags) } } #[inline] pub unsafe fn EnumDisplayDevicesW(lpdevice: P0, idevnum: u32, lpdisplaydevice: *mut DISPLAY_DEVICEW, dwflags: u32) -> super::super::Foundation::BOOL @@ -553,12 +553,12 @@ where P0: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn EnumDisplayDevicesW(lpdevice : windows_core::PCWSTR, idevnum : u32, lpdisplaydevice : *mut DISPLAY_DEVICEW, dwflags : u32) -> super::super::Foundation:: BOOL); - unsafe { EnumDisplayDevicesW(lpdevice.param().abi(), idevnum, core::mem::transmute(lpdisplaydevice), dwflags) } + unsafe { EnumDisplayDevicesW(lpdevice.param().abi(), idevnum, lpdisplaydevice as _, dwflags) } } #[inline] 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); - unsafe { EnumDisplayMonitors(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(lprcclip.unwrap_or(core::mem::zeroed())), lpfnenum, dwdata) } + unsafe { EnumDisplayMonitors(hdc.unwrap_or(core::mem::zeroed()) as _, lprcclip.unwrap_or(core::mem::zeroed()) as _, lpfnenum, dwdata) } } #[inline] pub unsafe fn EnumDisplaySettingsA(lpszdevicename: P0, imodenum: ENUM_DISPLAY_SETTINGS_MODE, lpdevmode: *mut DEVMODEA) -> super::super::Foundation::BOOL @@ -566,7 +566,7 @@ where P0: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn EnumDisplaySettingsA(lpszdevicename : windows_core::PCSTR, imodenum : ENUM_DISPLAY_SETTINGS_MODE, lpdevmode : *mut DEVMODEA) -> super::super::Foundation:: BOOL); - unsafe { EnumDisplaySettingsA(lpszdevicename.param().abi(), imodenum, core::mem::transmute(lpdevmode)) } + unsafe { EnumDisplaySettingsA(lpszdevicename.param().abi(), imodenum, lpdevmode as _) } } #[inline] pub unsafe fn EnumDisplaySettingsExA(lpszdevicename: P0, imodenum: ENUM_DISPLAY_SETTINGS_MODE, lpdevmode: *mut DEVMODEA, dwflags: ENUM_DISPLAY_SETTINGS_FLAGS) -> super::super::Foundation::BOOL @@ -574,7 +574,7 @@ where P0: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn EnumDisplaySettingsExA(lpszdevicename : windows_core::PCSTR, imodenum : ENUM_DISPLAY_SETTINGS_MODE, lpdevmode : *mut DEVMODEA, dwflags : ENUM_DISPLAY_SETTINGS_FLAGS) -> super::super::Foundation:: BOOL); - unsafe { EnumDisplaySettingsExA(lpszdevicename.param().abi(), imodenum, core::mem::transmute(lpdevmode), dwflags) } + unsafe { EnumDisplaySettingsExA(lpszdevicename.param().abi(), imodenum, lpdevmode as _, dwflags) } } #[inline] pub unsafe fn EnumDisplaySettingsExW(lpszdevicename: P0, imodenum: ENUM_DISPLAY_SETTINGS_MODE, lpdevmode: *mut DEVMODEW, dwflags: ENUM_DISPLAY_SETTINGS_FLAGS) -> super::super::Foundation::BOOL @@ -582,7 +582,7 @@ where P0: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn EnumDisplaySettingsExW(lpszdevicename : windows_core::PCWSTR, imodenum : ENUM_DISPLAY_SETTINGS_MODE, lpdevmode : *mut DEVMODEW, dwflags : ENUM_DISPLAY_SETTINGS_FLAGS) -> super::super::Foundation:: BOOL); - unsafe { EnumDisplaySettingsExW(lpszdevicename.param().abi(), imodenum, core::mem::transmute(lpdevmode), dwflags) } + unsafe { EnumDisplaySettingsExW(lpszdevicename.param().abi(), imodenum, lpdevmode as _, dwflags) } } #[inline] pub unsafe fn EnumDisplaySettingsW(lpszdevicename: P0, imodenum: ENUM_DISPLAY_SETTINGS_MODE, lpdevmode: *mut DEVMODEW) -> super::super::Foundation::BOOL @@ -590,12 +590,12 @@ where P0: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn EnumDisplaySettingsW(lpszdevicename : windows_core::PCWSTR, imodenum : ENUM_DISPLAY_SETTINGS_MODE, lpdevmode : *mut DEVMODEW) -> super::super::Foundation:: BOOL); - unsafe { EnumDisplaySettingsW(lpszdevicename.param().abi(), imodenum, core::mem::transmute(lpdevmode)) } + unsafe { EnumDisplaySettingsW(lpszdevicename.param().abi(), imodenum, lpdevmode as _) } } #[inline] 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); - unsafe { EnumEnhMetaFile(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), hmf, proc, core::mem::transmute(param3.unwrap_or(core::mem::zeroed())), core::mem::transmute(lprect.unwrap_or(core::mem::zeroed()))) } + unsafe { EnumEnhMetaFile(hdc.unwrap_or(core::mem::zeroed()) as _, hmf, proc, param3.unwrap_or(core::mem::zeroed()) as _, lprect.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn EnumFontFamiliesA(hdc: HDC, lplogfont: P1, lpproc: FONTENUMPROCA, lparam: super::super::Foundation::LPARAM) -> i32 @@ -642,7 +642,7 @@ where #[inline] 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); - unsafe { EnumMetaFile(hdc, hmf, proc, core::mem::transmute(param3.unwrap_or(core::mem::zeroed()))) } + unsafe { EnumMetaFile(hdc, hmf, proc, param3.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn EnumObjects(hdc: HDC, ntype: OBJ_TYPE, lpfunc: GOBJENUMPROC, lparam: super::super::Foundation::LPARAM) -> i32 { @@ -677,7 +677,7 @@ pub unsafe fn ExtCreatePen(ipenstyle: PEN_STYLE, cwidth: u32, plbrush: *const LO #[inline] pub unsafe fn ExtCreateRegion(lpx: Option<*const XFORM>, ncount: u32, lpdata: *const RGNDATA) -> HRGN { windows_targets::link!("gdi32.dll" "system" fn ExtCreateRegion(lpx : *const XFORM, ncount : u32, lpdata : *const RGNDATA) -> HRGN); - unsafe { ExtCreateRegion(core::mem::transmute(lpx.unwrap_or(core::mem::zeroed())), ncount, lpdata) } + unsafe { ExtCreateRegion(lpx.unwrap_or(core::mem::zeroed()) as _, ncount, lpdata) } } #[inline] 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 { @@ -687,7 +687,7 @@ pub unsafe fn ExtFloodFill(hdc: HDC, x: i32, y: i32, color: super::super::Founda #[inline] 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); - unsafe { ExtSelectClipRgn(hdc, core::mem::transmute(hrgn.unwrap_or(core::mem::zeroed())), mode) } + unsafe { ExtSelectClipRgn(hdc, hrgn.unwrap_or(core::mem::zeroed()) as _, mode) } } #[inline] 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 @@ -695,7 +695,7 @@ where 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); - unsafe { ExtTextOutA(hdc, x, y, options, core::mem::transmute(lprect.unwrap_or(core::mem::zeroed())), lpstring.param().abi(), c, core::mem::transmute(lpdx.unwrap_or(core::mem::zeroed()))) } + unsafe { ExtTextOutA(hdc, x, y, options, lprect.unwrap_or(core::mem::zeroed()) as _, lpstring.param().abi(), c, lpdx.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -703,7 +703,7 @@ where 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); - unsafe { ExtTextOutW(hdc, x, y, options, core::mem::transmute(lprect.unwrap_or(core::mem::zeroed())), lpstring.param().abi(), c, core::mem::transmute(lpdx.unwrap_or(core::mem::zeroed()))) } + unsafe { ExtTextOutW(hdc, x, y, options, lprect.unwrap_or(core::mem::zeroed()) as _, lpstring.param().abi(), c, lpdx.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FillPath(hdc: HDC) -> super::super::Foundation::BOOL { @@ -723,7 +723,7 @@ pub unsafe fn FillRgn(hdc: HDC, hrgn: HRGN, hbr: HBRUSH) -> super::super::Founda #[inline] 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); - unsafe { FixBrushOrgEx(hdc, x, y, core::mem::transmute(ptl.unwrap_or(core::mem::zeroed()))) } + unsafe { FixBrushOrgEx(hdc, x, y, ptl.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FlattenPath(hdc: HDC) -> super::super::Foundation::BOOL { @@ -788,17 +788,17 @@ pub unsafe fn GetArcDirection(hdc: HDC) -> i32 { #[inline] 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); - unsafe { GetAspectRatioFilterEx(hdc, core::mem::transmute(lpsize)) } + unsafe { GetAspectRatioFilterEx(hdc, lpsize as _) } } #[inline] 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); - unsafe { GetBitmapBits(hbit, cb, core::mem::transmute(lpvbits)) } + unsafe { GetBitmapBits(hbit, cb, lpvbits as _) } } #[inline] 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); - unsafe { GetBitmapDimensionEx(hbit, core::mem::transmute(lpsize)) } + unsafe { GetBitmapDimensionEx(hbit, lpsize as _) } } #[inline] pub unsafe fn GetBkColor(hdc: HDC) -> super::super::Foundation::COLORREF { @@ -813,87 +813,87 @@ pub unsafe fn GetBkMode(hdc: HDC) -> i32 { #[inline] 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); - unsafe { GetBoundsRect(hdc, core::mem::transmute(lprect), flags) } + unsafe { GetBoundsRect(hdc, lprect as _, flags) } } #[inline] 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); - unsafe { GetBrushOrgEx(hdc, core::mem::transmute(lppt)) } + unsafe { GetBrushOrgEx(hdc, lppt as _) } } #[inline] 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); - unsafe { GetCharABCWidthsA(hdc, wfirst, wlast, core::mem::transmute(lpabc)) } + unsafe { GetCharABCWidthsA(hdc, wfirst, wlast, lpabc as _) } } #[inline] 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); - unsafe { GetCharABCWidthsFloatA(hdc, ifirst, ilast, core::mem::transmute(lpabc)) } + unsafe { GetCharABCWidthsFloatA(hdc, ifirst, ilast, lpabc as _) } } #[inline] 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); - unsafe { GetCharABCWidthsFloatW(hdc, ifirst, ilast, core::mem::transmute(lpabc)) } + unsafe { GetCharABCWidthsFloatW(hdc, ifirst, ilast, lpabc as _) } } #[inline] 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); - unsafe { GetCharABCWidthsI(hdc, gifirst, cgi, core::mem::transmute(pgi.unwrap_or(core::mem::zeroed())), core::mem::transmute(pabc)) } + unsafe { GetCharABCWidthsI(hdc, gifirst, cgi, pgi.unwrap_or(core::mem::zeroed()) as _, pabc as _) } } #[inline] 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); - unsafe { GetCharABCWidthsW(hdc, wfirst, wlast, core::mem::transmute(lpabc)) } + unsafe { GetCharABCWidthsW(hdc, wfirst, wlast, lpabc as _) } } #[inline] 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); - unsafe { GetCharWidth32A(hdc, ifirst, ilast, core::mem::transmute(lpbuffer)) } + unsafe { GetCharWidth32A(hdc, ifirst, ilast, lpbuffer as _) } } #[inline] 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); - unsafe { GetCharWidth32W(hdc, ifirst, ilast, core::mem::transmute(lpbuffer)) } + unsafe { GetCharWidth32W(hdc, ifirst, ilast, lpbuffer as _) } } #[inline] 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); - unsafe { GetCharWidthA(hdc, ifirst, ilast, core::mem::transmute(lpbuffer)) } + unsafe { GetCharWidthA(hdc, ifirst, ilast, lpbuffer as _) } } #[inline] 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); - unsafe { GetCharWidthFloatA(hdc, ifirst, ilast, core::mem::transmute(lpbuffer)) } + unsafe { GetCharWidthFloatA(hdc, ifirst, ilast, lpbuffer as _) } } #[inline] 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); - unsafe { GetCharWidthFloatW(hdc, ifirst, ilast, core::mem::transmute(lpbuffer)) } + unsafe { GetCharWidthFloatW(hdc, ifirst, ilast, lpbuffer as _) } } #[inline] 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); - unsafe { GetCharWidthI(hdc, gifirst, cgi, core::mem::transmute(pgi.unwrap_or(core::mem::zeroed())), core::mem::transmute(piwidths)) } + unsafe { GetCharWidthI(hdc, gifirst, cgi, pgi.unwrap_or(core::mem::zeroed()) as _, piwidths as _) } } #[inline] 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); - unsafe { GetCharWidthW(hdc, ifirst, ilast, core::mem::transmute(lpbuffer)) } + unsafe { GetCharWidthW(hdc, ifirst, ilast, lpbuffer as _) } } #[inline] 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); - unsafe { GetCharacterPlacementA(hdc, core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), nmexextent, core::mem::transmute(lpresults), dwflags) } + unsafe { GetCharacterPlacementA(hdc, core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), nmexextent, lpresults as _, dwflags) } } #[inline] 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); - unsafe { GetCharacterPlacementW(hdc, core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), nmexextent, core::mem::transmute(lpresults), dwflags) } + unsafe { GetCharacterPlacementW(hdc, core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), nmexextent, lpresults as _, dwflags) } } #[inline] 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); - unsafe { GetClipBox(hdc, core::mem::transmute(lprect)) } + unsafe { GetClipBox(hdc, lprect as _) } } #[inline] pub unsafe fn GetClipRgn(hdc: HDC, hrgn: HRGN) -> i32 { @@ -903,7 +903,7 @@ pub unsafe fn GetClipRgn(hdc: HDC, hrgn: HRGN) -> i32 { #[inline] 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); - unsafe { GetColorAdjustment(hdc, core::mem::transmute(lpca)) } + unsafe { GetColorAdjustment(hdc, lpca as _) } } #[inline] pub unsafe fn GetCurrentObject(hdc: HDC, r#type: OBJ_TYPE) -> HGDIOBJ { @@ -913,12 +913,12 @@ pub unsafe fn GetCurrentObject(hdc: HDC, r#type: OBJ_TYPE) -> HGDIOBJ { #[inline] 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); - unsafe { GetCurrentPositionEx(hdc, core::mem::transmute(lppt)) } + unsafe { GetCurrentPositionEx(hdc, lppt as _) } } #[inline] pub unsafe fn GetDC(hwnd: Option) -> HDC { windows_targets::link!("user32.dll" "system" fn GetDC(hwnd : super::super::Foundation:: HWND) -> HDC); - unsafe { GetDC(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed()))) } + unsafe { GetDC(hwnd.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GetDCBrushColor(hdc: HDC) -> super::super::Foundation::COLORREF { @@ -928,12 +928,12 @@ pub unsafe fn GetDCBrushColor(hdc: HDC) -> super::super::Foundation::COLORREF { #[inline] 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); - unsafe { GetDCEx(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(hrgnclip.unwrap_or(core::mem::zeroed())), flags) } + unsafe { GetDCEx(hwnd.unwrap_or(core::mem::zeroed()) as _, hrgnclip.unwrap_or(core::mem::zeroed()) as _, flags) } } #[inline] 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); - unsafe { GetDCOrgEx(hdc, core::mem::transmute(lppt)) } + unsafe { GetDCOrgEx(hdc, lppt as _) } } #[inline] pub unsafe fn GetDCPenColor(hdc: HDC) -> super::super::Foundation::COLORREF { @@ -948,12 +948,12 @@ pub unsafe fn GetDIBColorTable(hdc: HDC, istart: u32, prgbq: &mut [RGBQUAD]) -> #[inline] 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); - unsafe { GetDIBits(hdc, hbm, start, clines, core::mem::transmute(lpvbits.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpbmi), usage) } + unsafe { GetDIBits(hdc, hbm, start, clines, lpvbits.unwrap_or(core::mem::zeroed()) as _, lpbmi as _, usage) } } #[inline] 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); - unsafe { GetDeviceCaps(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), index.0 as _) } + unsafe { GetDeviceCaps(hdc.unwrap_or(core::mem::zeroed()) as _, index.0 as _) } } #[inline] pub unsafe fn GetEnhMetaFileA(lpname: P0) -> HENHMETAFILE @@ -981,7 +981,7 @@ pub unsafe fn GetEnhMetaFileDescriptionW(hemf: HENHMETAFILE, lpdescription: Opti #[inline] 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); - unsafe { GetEnhMetaFileHeader(hemf, nsize, core::mem::transmute(lpenhmetaheader.unwrap_or(core::mem::zeroed()))) } + unsafe { GetEnhMetaFileHeader(hemf, nsize, lpenhmetaheader.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GetEnhMetaFilePaletteEntries(hemf: HENHMETAFILE, lppaletteentries: Option<&mut [PALETTEENTRY]>) -> u32 { @@ -999,7 +999,7 @@ where #[inline] 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); - unsafe { GetFontData(hdc, dwtable, dwoffset, core::mem::transmute(pvbuffer.unwrap_or(core::mem::zeroed())), cjbuffer) } + unsafe { GetFontData(hdc, dwtable, dwoffset, pvbuffer.unwrap_or(core::mem::zeroed()) as _, cjbuffer) } } #[inline] pub unsafe fn GetFontLanguageInfo(hdc: HDC) -> u32 { @@ -1009,7 +1009,7 @@ pub unsafe fn GetFontLanguageInfo(hdc: HDC) -> u32 { #[inline] 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); - unsafe { GetFontUnicodeRanges(hdc, core::mem::transmute(lpgs.unwrap_or(core::mem::zeroed()))) } + unsafe { GetFontUnicodeRanges(hdc, lpgs.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GetGlyphIndicesA(hdc: HDC, lpstr: P1, c: i32, pgi: *mut u16, fl: u32) -> u32 @@ -1017,7 +1017,7 @@ where 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); - unsafe { GetGlyphIndicesA(hdc, lpstr.param().abi(), c, core::mem::transmute(pgi), fl) } + unsafe { GetGlyphIndicesA(hdc, lpstr.param().abi(), c, pgi as _, fl) } } #[inline] pub unsafe fn GetGlyphIndicesW(hdc: HDC, lpstr: P1, c: i32, pgi: *mut u16, fl: u32) -> u32 @@ -1025,17 +1025,17 @@ where 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); - unsafe { GetGlyphIndicesW(hdc, lpstr.param().abi(), c, core::mem::transmute(pgi), fl) } + unsafe { GetGlyphIndicesW(hdc, lpstr.param().abi(), c, pgi as _, fl) } } #[inline] 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); - unsafe { GetGlyphOutlineA(hdc, uchar, fuformat, core::mem::transmute(lpgm), cjbuffer, core::mem::transmute(pvbuffer.unwrap_or(core::mem::zeroed())), lpmat2) } + unsafe { GetGlyphOutlineA(hdc, uchar, fuformat, lpgm as _, cjbuffer, pvbuffer.unwrap_or(core::mem::zeroed()) as _, lpmat2) } } #[inline] 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); - unsafe { GetGlyphOutlineW(hdc, uchar, fuformat, core::mem::transmute(lpgm), cjbuffer, core::mem::transmute(pvbuffer.unwrap_or(core::mem::zeroed())), lpmat2) } + unsafe { GetGlyphOutlineW(hdc, uchar, fuformat, lpgm as _, cjbuffer, pvbuffer.unwrap_or(core::mem::zeroed()) as _, lpmat2) } } #[inline] pub unsafe fn GetGraphicsMode(hdc: HDC) -> i32 { @@ -1073,7 +1073,7 @@ where #[inline] 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); - unsafe { GetMetaFileBitsEx(hmf, cbbuffer, core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed()))) } + unsafe { GetMetaFileBitsEx(hmf, cbbuffer, lpdata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GetMetaFileW(lpname: P0) -> HMETAFILE @@ -1091,17 +1091,17 @@ pub unsafe fn GetMetaRgn(hdc: HDC, hrgn: HRGN) -> i32 { #[inline] 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); - unsafe { GetMiterLimit(hdc, core::mem::transmute(plimit)) } + unsafe { GetMiterLimit(hdc, plimit as _) } } #[inline] 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); - unsafe { GetMonitorInfoA(hmonitor, core::mem::transmute(lpmi)) } + unsafe { GetMonitorInfoA(hmonitor, lpmi as _) } } #[inline] 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); - unsafe { GetMonitorInfoW(hmonitor, core::mem::transmute(lpmi)) } + unsafe { GetMonitorInfoW(hmonitor, lpmi as _) } } #[inline] pub unsafe fn GetNearestColor(hdc: HDC, color: super::super::Foundation::COLORREF) -> super::super::Foundation::COLORREF { @@ -1116,7 +1116,7 @@ pub unsafe fn GetNearestPaletteIndex(h: HPALETTE, color: super::super::Foundatio #[inline] 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); - unsafe { GetObjectA(h, c, core::mem::transmute(pv.unwrap_or(core::mem::zeroed()))) } + unsafe { GetObjectA(h, c, pv.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GetObjectType(h: HGDIOBJ) -> u32 { @@ -1126,17 +1126,17 @@ pub unsafe fn GetObjectType(h: HGDIOBJ) -> u32 { #[inline] 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); - unsafe { GetObjectW(h, c, core::mem::transmute(pv.unwrap_or(core::mem::zeroed()))) } + unsafe { GetObjectW(h, c, pv.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { GetOutlineTextMetricsA(hdc, cjcopy, core::mem::transmute(potm.unwrap_or(core::mem::zeroed()))) } + unsafe { GetOutlineTextMetricsA(hdc, cjcopy, potm.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { GetOutlineTextMetricsW(hdc, cjcopy, core::mem::transmute(potm.unwrap_or(core::mem::zeroed()))) } + unsafe { GetOutlineTextMetricsW(hdc, cjcopy, potm.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GetPaletteEntries(hpal: HPALETTE, istart: u32, ppalentries: Option<&mut [PALETTEENTRY]>) -> u32 { @@ -1146,7 +1146,7 @@ pub unsafe fn GetPaletteEntries(hpal: HPALETTE, istart: u32, ppalentries: Option #[inline] 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); - unsafe { GetPath(hdc, core::mem::transmute(apt.unwrap_or(core::mem::zeroed())), core::mem::transmute(aj.unwrap_or(core::mem::zeroed())), cpt) } + unsafe { GetPath(hdc, apt.unwrap_or(core::mem::zeroed()) as _, aj.unwrap_or(core::mem::zeroed()) as _, cpt) } } #[inline] pub unsafe fn GetPixel(hdc: HDC, x: i32, y: i32) -> super::super::Foundation::COLORREF { @@ -1171,17 +1171,17 @@ pub unsafe fn GetRandomRgn(hdc: HDC, hrgn: HRGN, i: i32) -> i32 { #[inline] pub unsafe fn GetRasterizerCaps(lpraststat: *mut RASTERIZER_STATUS, cjbytes: u32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetRasterizerCaps(lpraststat : *mut RASTERIZER_STATUS, cjbytes : u32) -> super::super::Foundation:: BOOL); - unsafe { GetRasterizerCaps(core::mem::transmute(lpraststat), cjbytes) } + unsafe { GetRasterizerCaps(lpraststat as _, cjbytes) } } #[inline] 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); - unsafe { GetRegionData(hrgn, ncount, core::mem::transmute(lprgndata.unwrap_or(core::mem::zeroed()))) } + unsafe { GetRegionData(hrgn, ncount, lprgndata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { GetRgnBox(hrgn, core::mem::transmute(lprc)) } + unsafe { GetRgnBox(hrgn, lprc as _) } } #[inline] pub unsafe fn GetStockObject(i: GET_STOCK_OBJECT_FLAGS) -> HGDIOBJ { @@ -1244,12 +1244,12 @@ where P1: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn GetTextExtentExPointA(hdc : HDC, lpszstring : windows_core::PCSTR, cchstring : i32, nmaxextent : i32, lpnfit : *mut i32, lpndx : *mut i32, lpsize : *mut super::super::Foundation:: SIZE) -> super::super::Foundation:: BOOL); - unsafe { GetTextExtentExPointA(hdc, lpszstring.param().abi(), cchstring, nmaxextent, core::mem::transmute(lpnfit.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpndx.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpsize)) } + unsafe { GetTextExtentExPointA(hdc, lpszstring.param().abi(), cchstring, nmaxextent, lpnfit.unwrap_or(core::mem::zeroed()) as _, lpndx.unwrap_or(core::mem::zeroed()) as _, lpsize as _) } } #[inline] 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); - unsafe { GetTextExtentExPointI(hdc, lpwszstring, cwchstring, nmaxextent, core::mem::transmute(lpnfit.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpndx.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpsize)) } + unsafe { GetTextExtentExPointI(hdc, lpwszstring, cwchstring, nmaxextent, lpnfit.unwrap_or(core::mem::zeroed()) as _, lpndx.unwrap_or(core::mem::zeroed()) as _, lpsize as _) } } #[inline] 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 @@ -1257,32 +1257,32 @@ where P1: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn GetTextExtentExPointW(hdc : HDC, lpszstring : windows_core::PCWSTR, cchstring : i32, nmaxextent : i32, lpnfit : *mut i32, lpndx : *mut i32, lpsize : *mut super::super::Foundation:: SIZE) -> super::super::Foundation:: BOOL); - unsafe { GetTextExtentExPointW(hdc, lpszstring.param().abi(), cchstring, nmaxextent, core::mem::transmute(lpnfit.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpndx.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpsize)) } + unsafe { GetTextExtentExPointW(hdc, lpszstring.param().abi(), cchstring, nmaxextent, lpnfit.unwrap_or(core::mem::zeroed()) as _, lpndx.unwrap_or(core::mem::zeroed()) as _, lpsize as _) } } #[inline] 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); - unsafe { GetTextExtentPoint32A(hdc, core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), core::mem::transmute(psizl)) } + unsafe { GetTextExtentPoint32A(hdc, core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), psizl as _) } } #[inline] 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); - unsafe { GetTextExtentPoint32W(hdc, core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), core::mem::transmute(psizl)) } + unsafe { GetTextExtentPoint32W(hdc, core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), psizl as _) } } #[inline] 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); - unsafe { GetTextExtentPointA(hdc, core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), core::mem::transmute(lpsz)) } + unsafe { GetTextExtentPointA(hdc, core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), lpsz as _) } } #[inline] 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); - unsafe { GetTextExtentPointI(hdc, core::mem::transmute(pgiin.as_ptr()), pgiin.len().try_into().unwrap(), core::mem::transmute(psize)) } + unsafe { GetTextExtentPointI(hdc, core::mem::transmute(pgiin.as_ptr()), pgiin.len().try_into().unwrap(), psize as _) } } #[inline] 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); - unsafe { GetTextExtentPointW(hdc, core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), core::mem::transmute(lpsz)) } + unsafe { GetTextExtentPointW(hdc, core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), lpsz as _) } } #[inline] pub unsafe fn GetTextFaceA(hdc: HDC, lpname: Option<&mut [u8]>) -> i32 { @@ -1297,17 +1297,17 @@ pub unsafe fn GetTextFaceW(hdc: HDC, lpname: Option<&mut [u16]>) -> i32 { #[inline] 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); - unsafe { GetTextMetricsA(hdc, core::mem::transmute(lptm)) } + unsafe { GetTextMetricsA(hdc, lptm as _) } } #[inline] 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); - unsafe { GetTextMetricsW(hdc, core::mem::transmute(lptm)) } + unsafe { GetTextMetricsW(hdc, lptm as _) } } #[inline] pub unsafe fn GetUpdateRect(hwnd: super::super::Foundation::HWND, lprect: Option<*mut super::super::Foundation::RECT>, berase: bool) -> super::super::Foundation::BOOL { 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); - unsafe { GetUpdateRect(hwnd, core::mem::transmute(lprect.unwrap_or(core::mem::zeroed())), berase.into()) } + unsafe { GetUpdateRect(hwnd, lprect.unwrap_or(core::mem::zeroed()) as _, berase.into()) } } #[inline] pub unsafe fn GetUpdateRgn(hwnd: super::super::Foundation::HWND, hrgn: HRGN, berase: bool) -> GDI_REGION_TYPE { @@ -1317,12 +1317,12 @@ pub unsafe fn GetUpdateRgn(hwnd: super::super::Foundation::HWND, hrgn: HRGN, ber #[inline] 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); - unsafe { GetViewportExtEx(hdc, core::mem::transmute(lpsize)) } + unsafe { GetViewportExtEx(hdc, lpsize as _) } } #[inline] 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); - unsafe { GetViewportOrgEx(hdc, core::mem::transmute(lppoint)) } + unsafe { GetViewportOrgEx(hdc, lppoint as _) } } #[inline] pub unsafe fn GetWinMetaFileBits(hemf: HENHMETAFILE, pdata16: Option<&mut [u8]>, imapmode: i32, hdcref: HDC) -> u32 { @@ -1332,17 +1332,17 @@ pub unsafe fn GetWinMetaFileBits(hemf: HENHMETAFILE, pdata16: Option<&mut [u8]>, #[inline] pub unsafe fn GetWindowDC(hwnd: Option) -> HDC { windows_targets::link!("user32.dll" "system" fn GetWindowDC(hwnd : super::super::Foundation:: HWND) -> HDC); - unsafe { GetWindowDC(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed()))) } + unsafe { GetWindowDC(hwnd.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { GetWindowExtEx(hdc, core::mem::transmute(lpsize)) } + unsafe { GetWindowExtEx(hdc, lpsize as _) } } #[inline] 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); - unsafe { GetWindowOrgEx(hdc, core::mem::transmute(lppoint)) } + unsafe { GetWindowOrgEx(hdc, lppoint as _) } } #[inline] pub unsafe fn GetWindowRgn(hwnd: super::super::Foundation::HWND, hrgn: HRGN) -> GDI_REGION_TYPE { @@ -1352,12 +1352,12 @@ pub unsafe fn GetWindowRgn(hwnd: super::super::Foundation::HWND, hrgn: HRGN) -> #[inline] 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); - unsafe { GetWindowRgnBox(hwnd, core::mem::transmute(lprc)) } + unsafe { GetWindowRgnBox(hwnd, lprc as _) } } #[inline] 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); - unsafe { GetWorldTransform(hdc, core::mem::transmute(lpxf)) } + unsafe { GetWorldTransform(hdc, lpxf as _) } } #[inline] pub unsafe fn GradientFill(hdc: HDC, pvertex: &[TRIVERTEX], pmesh: *const core::ffi::c_void, nmesh: u32, ulmode: GRADIENT_FILL) -> super::super::Foundation::BOOL { @@ -1367,17 +1367,17 @@ pub unsafe fn GradientFill(hdc: HDC, pvertex: &[TRIVERTEX], pmesh: *const core:: #[inline] 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); - unsafe { GrayStringA(hdc, core::mem::transmute(hbrush.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpoutputfunc.unwrap_or(core::mem::zeroed())), lpdata, ncount, x, y, nwidth, nheight) } + unsafe { GrayStringA(hdc, hbrush.unwrap_or(core::mem::zeroed()) as _, lpoutputfunc.unwrap_or(core::mem::zeroed()) as _, lpdata, ncount, x, y, nwidth, nheight) } } #[inline] 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); - unsafe { GrayStringW(hdc, core::mem::transmute(hbrush.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpoutputfunc.unwrap_or(core::mem::zeroed())), lpdata, ncount, x, y, nwidth, nheight) } + unsafe { GrayStringW(hdc, hbrush.unwrap_or(core::mem::zeroed()) as _, lpoutputfunc.unwrap_or(core::mem::zeroed()) as _, lpdata, ncount, x, y, nwidth, nheight) } } #[inline] pub unsafe fn InflateRect(lprc: *mut super::super::Foundation::RECT, dx: i32, dy: i32) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn InflateRect(lprc : *mut super::super::Foundation:: RECT, dx : i32, dy : i32) -> super::super::Foundation:: BOOL); - unsafe { InflateRect(core::mem::transmute(lprc), dx, dy) } + unsafe { InflateRect(lprc as _, dx, dy) } } #[inline] pub unsafe fn IntersectClipRect(hdc: HDC, left: i32, top: i32, right: i32, bottom: i32) -> GDI_REGION_TYPE { @@ -1387,17 +1387,17 @@ pub unsafe fn IntersectClipRect(hdc: HDC, left: i32, top: i32, right: i32, botto #[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 { windows_targets::link!("user32.dll" "system" fn IntersectRect(lprcdst : *mut super::super::Foundation:: RECT, lprcsrc1 : *const super::super::Foundation:: RECT, lprcsrc2 : *const super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - unsafe { IntersectRect(core::mem::transmute(lprcdst), lprcsrc1, lprcsrc2) } + unsafe { IntersectRect(lprcdst as _, lprcsrc1, lprcsrc2) } } #[inline] pub unsafe fn InvalidateRect(hwnd: Option, lprect: Option<*const super::super::Foundation::RECT>, berase: bool) -> super::super::Foundation::BOOL { 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); - unsafe { InvalidateRect(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(lprect.unwrap_or(core::mem::zeroed())), berase.into()) } + unsafe { InvalidateRect(hwnd.unwrap_or(core::mem::zeroed()) as _, lprect.unwrap_or(core::mem::zeroed()) as _, berase.into()) } } #[inline] pub unsafe fn InvalidateRgn(hwnd: super::super::Foundation::HWND, hrgn: Option, berase: bool) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn InvalidateRgn(hwnd : super::super::Foundation:: HWND, hrgn : HRGN, berase : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - unsafe { InvalidateRgn(hwnd, core::mem::transmute(hrgn.unwrap_or(core::mem::zeroed())), berase.into()) } + unsafe { InvalidateRgn(hwnd, hrgn.unwrap_or(core::mem::zeroed()) as _, berase.into()) } } #[inline] pub unsafe fn InvertRect(hdc: HDC, lprc: *const super::super::Foundation::RECT) -> super::super::Foundation::BOOL { @@ -1422,7 +1422,7 @@ pub unsafe fn LPtoDP(hdc: HDC, lppt: &mut [super::super::Foundation::POINT]) -> #[inline] 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); - unsafe { LineDDA(xstart, ystart, xend, yend, lpproc, core::mem::transmute(data.unwrap_or(core::mem::zeroed()))) } + unsafe { LineDDA(xstart, ystart, xend, yend, lpproc, data.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn LineTo(hdc: HDC, x: i32, y: i32) -> super::super::Foundation::BOOL { @@ -1435,7 +1435,7 @@ where P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn LoadBitmapA(hinstance : super::super::Foundation:: HINSTANCE, lpbitmapname : windows_core::PCSTR) -> HBITMAP); - unsafe { LoadBitmapA(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lpbitmapname.param().abi()) } + unsafe { LoadBitmapA(hinstance.unwrap_or(core::mem::zeroed()) as _, lpbitmapname.param().abi()) } } #[inline] pub unsafe fn LoadBitmapW(hinstance: Option, lpbitmapname: P1) -> HBITMAP @@ -1443,17 +1443,17 @@ where P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn LoadBitmapW(hinstance : super::super::Foundation:: HINSTANCE, lpbitmapname : windows_core::PCWSTR) -> HBITMAP); - unsafe { LoadBitmapW(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lpbitmapname.param().abi()) } + unsafe { LoadBitmapW(hinstance.unwrap_or(core::mem::zeroed()) as _, lpbitmapname.param().abi()) } } #[inline] 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); - unsafe { LockWindowUpdate(core::mem::transmute(hwndlock.unwrap_or(core::mem::zeroed()))) } + unsafe { LockWindowUpdate(hwndlock.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { 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()) } + unsafe { MapWindowPoints(hwndfrom.unwrap_or(core::mem::zeroed()) as _, hwndto.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(lppoints.as_ptr()), lppoints.len().try_into().unwrap()) } } #[inline] 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 { @@ -1463,12 +1463,12 @@ pub unsafe fn MaskBlt(hdcdest: HDC, xdest: i32, ydest: i32, width: i32, height: #[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 { windows_targets::link!("fontsub.dll" "cdecl" 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); - unsafe { MergeFontPackage(puchmergefontbuffer, ulmergefontbuffersize, puchfontpackagebuffer, ulfontpackagebuffersize, core::mem::transmute(ppuchdestbuffer), core::mem::transmute(puldestbuffersize), core::mem::transmute(pulbyteswritten), usmode, lpfnallocate, lpfnreallocate, lpfnfree, core::mem::transmute(lpvreserved)) } + unsafe { MergeFontPackage(puchmergefontbuffer, ulmergefontbuffersize, puchfontpackagebuffer, ulfontpackagebuffersize, ppuchdestbuffer as _, puldestbuffersize as _, pulbyteswritten as _, usmode, lpfnallocate, lpfnreallocate, lpfnfree, lpvreserved as _) } } #[inline] 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); - unsafe { ModifyWorldTransform(hdc, core::mem::transmute(lpxf.unwrap_or(core::mem::zeroed())), mode) } + unsafe { ModifyWorldTransform(hdc, lpxf.unwrap_or(core::mem::zeroed()) as _, mode) } } #[inline] pub unsafe fn MonitorFromPoint(pt: super::super::Foundation::POINT, dwflags: MONITOR_FROM_FLAGS) -> HMONITOR { @@ -1488,7 +1488,7 @@ pub unsafe fn MonitorFromWindow(hwnd: super::super::Foundation::HWND, dwflags: M #[inline] 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); - unsafe { MoveToEx(hdc, x, y, core::mem::transmute(lppt.unwrap_or(core::mem::zeroed()))) } + unsafe { MoveToEx(hdc, x, y, lppt.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn OffsetClipRgn(hdc: HDC, x: i32, y: i32) -> GDI_REGION_TYPE { @@ -1498,7 +1498,7 @@ pub unsafe fn OffsetClipRgn(hdc: HDC, x: i32, y: i32) -> GDI_REGION_TYPE { #[inline] pub unsafe fn OffsetRect(lprc: *mut super::super::Foundation::RECT, dx: i32, dy: i32) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn OffsetRect(lprc : *mut super::super::Foundation:: RECT, dx : i32, dy : i32) -> super::super::Foundation:: BOOL); - unsafe { OffsetRect(core::mem::transmute(lprc), dx, dy) } + unsafe { OffsetRect(lprc as _, dx, dy) } } #[inline] pub unsafe fn OffsetRgn(hrgn: HRGN, x: i32, y: i32) -> GDI_REGION_TYPE { @@ -1508,12 +1508,12 @@ pub unsafe fn OffsetRgn(hrgn: HRGN, x: i32, y: i32) -> GDI_REGION_TYPE { #[inline] 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); - unsafe { OffsetViewportOrgEx(hdc, x, y, core::mem::transmute(lppt.unwrap_or(core::mem::zeroed()))) } + unsafe { OffsetViewportOrgEx(hdc, x, y, lppt.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { OffsetWindowOrgEx(hdc, x, y, core::mem::transmute(lppt.unwrap_or(core::mem::zeroed()))) } + unsafe { OffsetWindowOrgEx(hdc, x, y, lppt.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn PaintDesktop(hdc: HDC) -> super::super::Foundation::BOOL { @@ -1563,7 +1563,7 @@ pub unsafe fn PlayMetaFileRecord(hdc: HDC, lphandletable: &[HANDLETABLE], lpmr: #[inline] 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); - unsafe { PlgBlt(hdcdest, core::mem::transmute(lppoint.as_ptr()), hdcsrc, xsrc, ysrc, width, height, core::mem::transmute(hbmmask.unwrap_or(core::mem::zeroed())), xmask, ymask) } + unsafe { PlgBlt(hdcdest, core::mem::transmute(lppoint.as_ptr()), hdcsrc, xsrc, ysrc, width, height, hbmmask.unwrap_or(core::mem::zeroed()) as _, xmask, ymask) } } #[inline] pub unsafe fn PolyBezier(hdc: HDC, apt: &[super::super::Foundation::POINT]) -> super::super::Foundation::BOOL { @@ -1653,12 +1653,12 @@ pub unsafe fn Rectangle(hdc: HDC, left: i32, top: i32, right: i32, bottom: i32) #[inline] 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); - unsafe { 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())), flags) } + unsafe { RedrawWindow(hwnd.unwrap_or(core::mem::zeroed()) as _, lprcupdate.unwrap_or(core::mem::zeroed()) as _, hrgnupdate.unwrap_or(core::mem::zeroed()) as _, flags) } } #[inline] 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); - unsafe { ReleaseDC(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), hdc) } + unsafe { ReleaseDC(hwnd.unwrap_or(core::mem::zeroed()) as _, hdc) } } #[inline] pub unsafe fn RemoveFontMemResourceEx(h: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { @@ -1679,7 +1679,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); - unsafe { RemoveFontResourceExA(name.param().abi(), fl, core::mem::transmute(pdv.unwrap_or(core::mem::zeroed()))) } + unsafe { RemoveFontResourceExA(name.param().abi(), fl, pdv.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RemoveFontResourceExW(name: P0, fl: u32, pdv: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL @@ -1687,7 +1687,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); - unsafe { RemoveFontResourceExW(name.param().abi(), fl, core::mem::transmute(pdv.unwrap_or(core::mem::zeroed()))) } + unsafe { RemoveFontResourceExW(name.param().abi(), fl, pdv.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RemoveFontResourceW(lpfilename: P0) -> super::super::Foundation::BOOL @@ -1730,17 +1730,17 @@ pub unsafe fn SaveDC(hdc: HDC) -> i32 { #[inline] 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); - unsafe { ScaleViewportExtEx(hdc, xn, dx, yn, yd, core::mem::transmute(lpsz.unwrap_or(core::mem::zeroed()))) } + unsafe { ScaleViewportExtEx(hdc, xn, dx, yn, yd, lpsz.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { ScaleWindowExtEx(hdc, xn, xd, yn, yd, core::mem::transmute(lpsz.unwrap_or(core::mem::zeroed()))) } + unsafe { ScaleWindowExtEx(hdc, xn, xd, yn, yd, lpsz.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { ScreenToClient(hwnd, core::mem::transmute(lppoint)) } + unsafe { ScreenToClient(hwnd, lppoint as _) } } #[inline] pub unsafe fn SelectClipPath(hdc: HDC, mode: RGN_COMBINE_MODE) -> super::super::Foundation::BOOL { @@ -1750,7 +1750,7 @@ pub unsafe fn SelectClipPath(hdc: HDC, mode: RGN_COMBINE_MODE) -> super::super:: #[inline] 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); - unsafe { SelectClipRgn(hdc, core::mem::transmute(hrgn.unwrap_or(core::mem::zeroed()))) } + unsafe { SelectClipRgn(hdc, hrgn.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SelectObject(hdc: HDC, h: HGDIOBJ) -> HGDIOBJ { @@ -1775,7 +1775,7 @@ pub unsafe fn SetBitmapBits(hbm: HBITMAP, cb: u32, pvbits: *const core::ffi::c_v #[inline] 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); - unsafe { SetBitmapDimensionEx(hbm, w, h, core::mem::transmute(lpsz.unwrap_or(core::mem::zeroed()))) } + unsafe { SetBitmapDimensionEx(hbm, w, h, lpsz.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SetBkColor(hdc: HDC, color: super::super::Foundation::COLORREF) -> super::super::Foundation::COLORREF { @@ -1790,12 +1790,12 @@ pub unsafe fn SetBkMode(hdc: HDC, mode: BACKGROUND_MODE) -> i32 { #[inline] 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); - unsafe { SetBoundsRect(hdc, core::mem::transmute(lprect.unwrap_or(core::mem::zeroed())), flags) } + unsafe { SetBoundsRect(hdc, lprect.unwrap_or(core::mem::zeroed()) as _, flags) } } #[inline] 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); - unsafe { SetBrushOrgEx(hdc, x, y, core::mem::transmute(lppt.unwrap_or(core::mem::zeroed()))) } + unsafe { SetBrushOrgEx(hdc, x, y, lppt.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SetColorAdjustment(hdc: HDC, lpca: *const COLORADJUSTMENT) -> super::super::Foundation::BOOL { @@ -1820,7 +1820,7 @@ pub unsafe fn SetDIBColorTable(hdc: HDC, istart: u32, prgbq: &[RGBQUAD]) -> u32 #[inline] 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); - unsafe { SetDIBits(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), hbm, start, clines, lpbits, lpbmi, coloruse) } + unsafe { SetDIBits(hdc.unwrap_or(core::mem::zeroed()) as _, hbm, start, clines, lpbits, lpbmi, coloruse) } } #[inline] 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 { @@ -1865,7 +1865,7 @@ pub unsafe fn SetMetaRgn(hdc: HDC) -> GDI_REGION_TYPE { #[inline] 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); - unsafe { SetMiterLimit(hdc, limit, core::mem::transmute(old.unwrap_or(core::mem::zeroed()))) } + unsafe { SetMiterLimit(hdc, limit, old.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SetPaletteEntries(hpal: HPALETTE, istart: u32, ppalentries: &[PALETTEENTRY]) -> u32 { @@ -1895,12 +1895,12 @@ pub unsafe fn SetROP2(hdc: HDC, rop2: R2_MODE) -> i32 { #[inline] pub unsafe fn SetRect(lprc: *mut super::super::Foundation::RECT, xleft: i32, ytop: i32, xright: i32, ybottom: i32) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn SetRect(lprc : *mut super::super::Foundation:: RECT, xleft : i32, ytop : i32, xright : i32, ybottom : i32) -> super::super::Foundation:: BOOL); - unsafe { SetRect(core::mem::transmute(lprc), xleft, ytop, xright, ybottom) } + unsafe { SetRect(lprc as _, xleft, ytop, xright, ybottom) } } #[inline] pub unsafe fn SetRectEmpty(lprc: *mut super::super::Foundation::RECT) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn SetRectEmpty(lprc : *mut super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - unsafe { SetRectEmpty(core::mem::transmute(lprc)) } + unsafe { SetRectEmpty(lprc as _) } } #[inline] pub unsafe fn SetRectRgn(hrgn: HRGN, left: i32, top: i32, right: i32, bottom: i32) -> super::super::Foundation::BOOL { @@ -1945,27 +1945,27 @@ pub unsafe fn SetTextJustification(hdc: HDC, extra: i32, count: i32) -> super::s #[inline] 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); - unsafe { SetViewportExtEx(hdc, x, y, core::mem::transmute(lpsz.unwrap_or(core::mem::zeroed()))) } + unsafe { SetViewportExtEx(hdc, x, y, lpsz.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { SetViewportOrgEx(hdc, x, y, core::mem::transmute(lppt.unwrap_or(core::mem::zeroed()))) } + unsafe { SetViewportOrgEx(hdc, x, y, lppt.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { SetWindowExtEx(hdc, x, y, core::mem::transmute(lpsz.unwrap_or(core::mem::zeroed()))) } + unsafe { SetWindowExtEx(hdc, x, y, lpsz.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { SetWindowOrgEx(hdc, x, y, core::mem::transmute(lppt.unwrap_or(core::mem::zeroed()))) } + unsafe { SetWindowOrgEx(hdc, x, y, lppt.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SetWindowRgn(hwnd: super::super::Foundation::HWND, hrgn: Option, bredraw: bool) -> i32 { windows_targets::link!("user32.dll" "system" fn SetWindowRgn(hwnd : super::super::Foundation:: HWND, hrgn : HRGN, bredraw : super::super::Foundation:: BOOL) -> i32); - unsafe { SetWindowRgn(hwnd, core::mem::transmute(hrgn.unwrap_or(core::mem::zeroed())), bredraw.into()) } + unsafe { SetWindowRgn(hwnd, hrgn.unwrap_or(core::mem::zeroed()) as _, bredraw.into()) } } #[inline] pub unsafe fn SetWorldTransform(hdc: HDC, lpxf: *const XFORM) -> super::super::Foundation::BOOL { @@ -1975,12 +1975,12 @@ pub unsafe fn SetWorldTransform(hdc: HDC, lpxf: *const XFORM) -> super::super::F #[inline] 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); - unsafe { StretchBlt(hdcdest, xdest, ydest, wdest, hdest, core::mem::transmute(hdcsrc.unwrap_or(core::mem::zeroed())), xsrc, ysrc, wsrc, hsrc, rop) } + unsafe { StretchBlt(hdcdest, xdest, ydest, wdest, hdest, hdcsrc.unwrap_or(core::mem::zeroed()) as _, xsrc, ysrc, wsrc, hsrc, rop) } } #[inline] 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); - unsafe { StretchDIBits(hdc, xdest, ydest, destwidth, destheight, xsrc, ysrc, srcwidth, srcheight, core::mem::transmute(lpbits.unwrap_or(core::mem::zeroed())), lpbmi, iusage, rop) } + unsafe { StretchDIBits(hdc, xdest, ydest, destwidth, destheight, xsrc, ysrc, srcwidth, srcheight, lpbits.unwrap_or(core::mem::zeroed()) as _, lpbmi, iusage, rop) } } #[inline] pub unsafe fn StrokeAndFillPath(hdc: HDC) -> super::super::Foundation::BOOL { @@ -1995,7 +1995,7 @@ pub unsafe fn StrokePath(hdc: HDC) -> super::super::Foundation::BOOL { #[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 { windows_targets::link!("user32.dll" "system" fn SubtractRect(lprcdst : *mut super::super::Foundation:: RECT, lprcsrc1 : *const super::super::Foundation:: RECT, lprcsrc2 : *const super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - unsafe { SubtractRect(core::mem::transmute(lprcdst), lprcsrc1, lprcsrc2) } + unsafe { SubtractRect(lprcdst as _, lprcsrc1, lprcsrc2) } } #[inline] pub unsafe fn TTCharToUnicode(hdc: HDC, puccharcodes: &[u8], pusshortcodes: &mut [u16], ulflags: u32) -> i32 { @@ -2005,17 +2005,17 @@ pub unsafe fn TTCharToUnicode(hdc: HDC, puccharcodes: &[u8], pusshortcodes: &mut #[inline] 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); - unsafe { TTDeleteEmbeddedFont(hfontreference, ulflags, core::mem::transmute(pulstatus)) } + unsafe { TTDeleteEmbeddedFont(hfontreference, ulflags, pulstatus as _) } } #[inline] 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); - unsafe { TTEmbedFont(hdc, ulflags, ulcharset, core::mem::transmute(pulprivstatus), core::mem::transmute(pulstatus), lpfnwritetostream, lpvwritestream, core::mem::transmute(puscharcodeset.as_ptr()), puscharcodeset.len().try_into().unwrap(), uslanguage, core::mem::transmute(pttembedinfo.unwrap_or(core::mem::zeroed()))) } + unsafe { TTEmbedFont(hdc, ulflags, ulcharset, pulprivstatus as _, pulstatus as _, lpfnwritetostream, lpvwritestream, core::mem::transmute(puscharcodeset.as_ptr()), puscharcodeset.len().try_into().unwrap(), uslanguage, pttembedinfo.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { TTEmbedFontEx(hdc, ulflags, ulcharset, core::mem::transmute(pulprivstatus), core::mem::transmute(pulstatus), lpfnwritetostream, lpvwritestream, core::mem::transmute(pulcharcodeset.as_ptr()), pulcharcodeset.len().try_into().unwrap(), uslanguage, core::mem::transmute(pttembedinfo.unwrap_or(core::mem::zeroed()))) } + unsafe { TTEmbedFontEx(hdc, ulflags, ulcharset, pulprivstatus as _, pulstatus as _, lpfnwritetostream, lpvwritestream, core::mem::transmute(pulcharcodeset.as_ptr()), pulcharcodeset.len().try_into().unwrap(), uslanguage, pttembedinfo.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -2023,7 +2023,7 @@ where P1: windows_core::Param, { windows_targets::link!("t2embed.dll" "system" fn TTEmbedFontFromFileA(hdc : HDC, szfontfilename : windows_core::PCSTR, usttcindex : u16, ulflags : TTEMBED_FLAGS, ulcharset : EMBED_FONT_CHARSET, pulprivstatus : *mut EMBEDDED_FONT_PRIV_STATUS, pulstatus : *mut u32, lpfnwritetostream : WRITEEMBEDPROC, lpvwritestream : *const core::ffi::c_void, puscharcodeset : *const u16, uscharcodecount : u16, uslanguage : u16, pttembedinfo : *const TTEMBEDINFO) -> i32); - unsafe { TTEmbedFontFromFileA(hdc, szfontfilename.param().abi(), usttcindex, ulflags, ulcharset, core::mem::transmute(pulprivstatus), core::mem::transmute(pulstatus), lpfnwritetostream, lpvwritestream, core::mem::transmute(puscharcodeset.as_ptr()), puscharcodeset.len().try_into().unwrap(), uslanguage, core::mem::transmute(pttembedinfo.unwrap_or(core::mem::zeroed()))) } + unsafe { TTEmbedFontFromFileA(hdc, szfontfilename.param().abi(), usttcindex, ulflags, ulcharset, pulprivstatus as _, pulstatus as _, lpfnwritetostream, lpvwritestream, core::mem::transmute(puscharcodeset.as_ptr()), puscharcodeset.len().try_into().unwrap(), uslanguage, pttembedinfo.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn TTEnableEmbeddingForFacename(lpszfacename: P0, benable: bool) -> i32 @@ -2036,12 +2036,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); - unsafe { TTGetEmbeddedFontInfo(ulflags, core::mem::transmute(pulprivstatus), ulprivs, core::mem::transmute(pulstatus), lpfnreadfromstream, lpvreadstream, core::mem::transmute(pttloadinfo.unwrap_or(core::mem::zeroed()))) } + unsafe { TTGetEmbeddedFontInfo(ulflags, pulprivstatus as _, ulprivs, pulstatus as _, lpfnreadfromstream, lpvreadstream, pttloadinfo.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { TTGetEmbeddingType(hdc, core::mem::transmute(pulembedtype)) } + unsafe { TTGetEmbeddingType(hdc, pulembedtype as _) } } #[inline] pub unsafe fn TTGetNewFontName(phfontreference: *const super::super::Foundation::HANDLE, wzwinfamilyname: &mut [u16], szmacfamilyname: &mut [u8]) -> i32 { @@ -2051,7 +2051,7 @@ pub unsafe fn TTGetNewFontName(phfontreference: *const super::super::Foundation: #[inline] 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); - unsafe { TTIsEmbeddingEnabled(hdc, core::mem::transmute(pbenabled)) } + unsafe { TTIsEmbeddingEnabled(hdc, pbenabled as _) } } #[inline] pub unsafe fn TTIsEmbeddingEnabledForFacename(lpszfacename: P0, pbenabled: *mut super::super::Foundation::BOOL) -> i32 @@ -2059,7 +2059,7 @@ where P0: windows_core::Param, { windows_targets::link!("t2embed.dll" "system" fn TTIsEmbeddingEnabledForFacename(lpszfacename : windows_core::PCSTR, pbenabled : *mut super::super::Foundation:: BOOL) -> i32); - unsafe { TTIsEmbeddingEnabledForFacename(lpszfacename.param().abi(), core::mem::transmute(pbenabled)) } + unsafe { TTIsEmbeddingEnabledForFacename(lpszfacename.param().abi(), pbenabled as _) } } #[inline] pub unsafe 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: P7, szmacfamilyname: P8, pttloadinfo: Option<*const TTLOADINFO>) -> i32 @@ -2068,7 +2068,7 @@ 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); - unsafe { TTLoadEmbeddedFont(core::mem::transmute(phfontreference), ulflags, core::mem::transmute(pulprivstatus), ulprivs, core::mem::transmute(pulstatus), lpfnreadfromstream, lpvreadstream, szwinfamilyname.param().abi(), szmacfamilyname.param().abi(), core::mem::transmute(pttloadinfo.unwrap_or(core::mem::zeroed()))) } + unsafe { TTLoadEmbeddedFont(phfontreference as _, ulflags, pulprivstatus as _, ulprivs, pulstatus as _, lpfnreadfromstream, lpvreadstream, szwinfamilyname.param().abi(), szmacfamilyname.param().abi(), pttloadinfo.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn TTRunValidationTests(hdc: HDC, ptestparam: *const TTVALIDATIONTESTSPARAMS) -> i32 { @@ -2108,7 +2108,7 @@ pub unsafe fn TransparentBlt(hdcdest: HDC, xorigindest: i32, yorigindest: i32, w #[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 { windows_targets::link!("user32.dll" "system" fn UnionRect(lprcdst : *mut super::super::Foundation:: RECT, lprcsrc1 : *const super::super::Foundation:: RECT, lprcsrc2 : *const super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - unsafe { UnionRect(core::mem::transmute(lprcdst), lprcsrc1, lprcsrc2) } + unsafe { UnionRect(lprcdst as _, lprcsrc1, lprcsrc2) } } #[inline] pub unsafe fn UnrealizeObject(h: HGDIOBJ) -> super::super::Foundation::BOOL { @@ -2128,12 +2128,12 @@ pub unsafe fn UpdateWindow(hwnd: super::super::Foundation::HWND) -> super::super #[inline] 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); - unsafe { ValidateRect(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(lprect.unwrap_or(core::mem::zeroed()))) } + unsafe { ValidateRect(hwnd.unwrap_or(core::mem::zeroed()) as _, lprect.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { ValidateRgn(hwnd, core::mem::transmute(hrgn.unwrap_or(core::mem::zeroed()))) } + unsafe { ValidateRgn(hwnd, hrgn.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn WidenPath(hdc: HDC) -> super::super::Foundation::BOOL { 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 93a1293b08..7b2970c99e 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/GdiPlus/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/GdiPlus/mod.rs @@ -1,157 +1,157 @@ #[inline] pub unsafe fn GdipAddPathArc(path: *mut GpPath, x: f32, y: f32, width: f32, height: f32, startangle: f32, sweepangle: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathArc(path : *mut GpPath, x : f32, y : f32, width : f32, height : f32, startangle : f32, sweepangle : f32) -> Status); - unsafe { GdipAddPathArc(core::mem::transmute(path), x, y, width, height, startangle, sweepangle) } + unsafe { GdipAddPathArc(path as _, x, y, width, height, startangle, sweepangle) } } #[inline] pub unsafe fn GdipAddPathArcI(path: *mut GpPath, x: i32, y: i32, width: i32, height: i32, startangle: f32, sweepangle: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathArcI(path : *mut GpPath, x : i32, y : i32, width : i32, height : i32, startangle : f32, sweepangle : f32) -> Status); - unsafe { GdipAddPathArcI(core::mem::transmute(path), x, y, width, height, startangle, sweepangle) } + unsafe { GdipAddPathArcI(path as _, x, y, width, height, startangle, sweepangle) } } #[inline] pub unsafe fn GdipAddPathBezier(path: *mut GpPath, x1: f32, y1: f32, x2: f32, y2: f32, x3: f32, y3: f32, x4: f32, y4: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathBezier(path : *mut GpPath, x1 : f32, y1 : f32, x2 : f32, y2 : f32, x3 : f32, y3 : f32, x4 : f32, y4 : f32) -> Status); - unsafe { GdipAddPathBezier(core::mem::transmute(path), x1, y1, x2, y2, x3, y3, x4, y4) } + unsafe { GdipAddPathBezier(path as _, x1, y1, x2, y2, x3, y3, x4, y4) } } #[inline] pub unsafe fn GdipAddPathBezierI(path: *mut GpPath, x1: i32, y1: i32, x2: i32, y2: i32, x3: i32, y3: i32, x4: i32, y4: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathBezierI(path : *mut GpPath, x1 : i32, y1 : i32, x2 : i32, y2 : i32, x3 : i32, y3 : i32, x4 : i32, y4 : i32) -> Status); - unsafe { GdipAddPathBezierI(core::mem::transmute(path), x1, y1, x2, y2, x3, y3, x4, y4) } + unsafe { GdipAddPathBezierI(path as _, x1, y1, x2, y2, x3, y3, x4, y4) } } #[inline] pub unsafe fn GdipAddPathBeziers(path: *mut GpPath, points: *const PointF, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathBeziers(path : *mut GpPath, points : *const PointF, count : i32) -> Status); - unsafe { GdipAddPathBeziers(core::mem::transmute(path), points, count) } + unsafe { GdipAddPathBeziers(path as _, points, count) } } #[inline] pub unsafe fn GdipAddPathBeziersI(path: *mut GpPath, points: *const Point, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathBeziersI(path : *mut GpPath, points : *const Point, count : i32) -> Status); - unsafe { GdipAddPathBeziersI(core::mem::transmute(path), points, count) } + unsafe { GdipAddPathBeziersI(path as _, points, count) } } #[inline] pub unsafe fn GdipAddPathClosedCurve(path: *mut GpPath, points: *const PointF, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathClosedCurve(path : *mut GpPath, points : *const PointF, count : i32) -> Status); - unsafe { GdipAddPathClosedCurve(core::mem::transmute(path), points, count) } + unsafe { GdipAddPathClosedCurve(path as _, points, count) } } #[inline] pub unsafe fn GdipAddPathClosedCurve2(path: *mut GpPath, points: *const PointF, count: i32, tension: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathClosedCurve2(path : *mut GpPath, points : *const PointF, count : i32, tension : f32) -> Status); - unsafe { GdipAddPathClosedCurve2(core::mem::transmute(path), points, count, tension) } + unsafe { GdipAddPathClosedCurve2(path as _, points, count, tension) } } #[inline] pub unsafe fn GdipAddPathClosedCurve2I(path: *mut GpPath, points: *const Point, count: i32, tension: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathClosedCurve2I(path : *mut GpPath, points : *const Point, count : i32, tension : f32) -> Status); - unsafe { GdipAddPathClosedCurve2I(core::mem::transmute(path), points, count, tension) } + unsafe { GdipAddPathClosedCurve2I(path as _, points, count, tension) } } #[inline] pub unsafe fn GdipAddPathClosedCurveI(path: *mut GpPath, points: *const Point, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathClosedCurveI(path : *mut GpPath, points : *const Point, count : i32) -> Status); - unsafe { GdipAddPathClosedCurveI(core::mem::transmute(path), points, count) } + unsafe { GdipAddPathClosedCurveI(path as _, points, count) } } #[inline] pub unsafe fn GdipAddPathCurve(path: *mut GpPath, points: *const PointF, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathCurve(path : *mut GpPath, points : *const PointF, count : i32) -> Status); - unsafe { GdipAddPathCurve(core::mem::transmute(path), points, count) } + unsafe { GdipAddPathCurve(path as _, points, count) } } #[inline] pub unsafe fn GdipAddPathCurve2(path: *mut GpPath, points: *const PointF, count: i32, tension: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathCurve2(path : *mut GpPath, points : *const PointF, count : i32, tension : f32) -> Status); - unsafe { GdipAddPathCurve2(core::mem::transmute(path), points, count, tension) } + unsafe { GdipAddPathCurve2(path as _, points, count, tension) } } #[inline] pub unsafe fn GdipAddPathCurve2I(path: *mut GpPath, points: *const Point, count: i32, tension: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathCurve2I(path : *mut GpPath, points : *const Point, count : i32, tension : f32) -> Status); - unsafe { GdipAddPathCurve2I(core::mem::transmute(path), points, count, tension) } + unsafe { GdipAddPathCurve2I(path as _, points, count, tension) } } #[inline] pub unsafe fn GdipAddPathCurve3(path: *mut GpPath, points: *const PointF, count: i32, offset: i32, numberofsegments: i32, tension: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathCurve3(path : *mut GpPath, points : *const PointF, count : i32, offset : i32, numberofsegments : i32, tension : f32) -> Status); - unsafe { GdipAddPathCurve3(core::mem::transmute(path), points, count, offset, numberofsegments, tension) } + unsafe { GdipAddPathCurve3(path as _, points, count, offset, numberofsegments, tension) } } #[inline] pub unsafe fn GdipAddPathCurve3I(path: *mut GpPath, points: *const Point, count: i32, offset: i32, numberofsegments: i32, tension: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathCurve3I(path : *mut GpPath, points : *const Point, count : i32, offset : i32, numberofsegments : i32, tension : f32) -> Status); - unsafe { GdipAddPathCurve3I(core::mem::transmute(path), points, count, offset, numberofsegments, tension) } + unsafe { GdipAddPathCurve3I(path as _, points, count, offset, numberofsegments, tension) } } #[inline] pub unsafe fn GdipAddPathCurveI(path: *mut GpPath, points: *const Point, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathCurveI(path : *mut GpPath, points : *const Point, count : i32) -> Status); - unsafe { GdipAddPathCurveI(core::mem::transmute(path), points, count) } + unsafe { GdipAddPathCurveI(path as _, points, count) } } #[inline] pub unsafe fn GdipAddPathEllipse(path: *mut GpPath, x: f32, y: f32, width: f32, height: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathEllipse(path : *mut GpPath, x : f32, y : f32, width : f32, height : f32) -> Status); - unsafe { GdipAddPathEllipse(core::mem::transmute(path), x, y, width, height) } + unsafe { GdipAddPathEllipse(path as _, x, y, width, height) } } #[inline] pub unsafe fn GdipAddPathEllipseI(path: *mut GpPath, x: i32, y: i32, width: i32, height: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathEllipseI(path : *mut GpPath, x : i32, y : i32, width : i32, height : i32) -> Status); - unsafe { GdipAddPathEllipseI(core::mem::transmute(path), x, y, width, height) } + unsafe { GdipAddPathEllipseI(path as _, x, y, width, height) } } #[inline] pub unsafe fn GdipAddPathLine(path: *mut GpPath, x1: f32, y1: f32, x2: f32, y2: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathLine(path : *mut GpPath, x1 : f32, y1 : f32, x2 : f32, y2 : f32) -> Status); - unsafe { GdipAddPathLine(core::mem::transmute(path), x1, y1, x2, y2) } + unsafe { GdipAddPathLine(path as _, x1, y1, x2, y2) } } #[inline] pub unsafe fn GdipAddPathLine2(path: *mut GpPath, points: *const PointF, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathLine2(path : *mut GpPath, points : *const PointF, count : i32) -> Status); - unsafe { GdipAddPathLine2(core::mem::transmute(path), points, count) } + unsafe { GdipAddPathLine2(path as _, points, count) } } #[inline] pub unsafe fn GdipAddPathLine2I(path: *mut GpPath, points: *const Point, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathLine2I(path : *mut GpPath, points : *const Point, count : i32) -> Status); - unsafe { GdipAddPathLine2I(core::mem::transmute(path), points, count) } + unsafe { GdipAddPathLine2I(path as _, points, count) } } #[inline] pub unsafe fn GdipAddPathLineI(path: *mut GpPath, x1: i32, y1: i32, x2: i32, y2: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathLineI(path : *mut GpPath, x1 : i32, y1 : i32, x2 : i32, y2 : i32) -> Status); - unsafe { GdipAddPathLineI(core::mem::transmute(path), x1, y1, x2, y2) } + unsafe { GdipAddPathLineI(path as _, x1, y1, x2, y2) } } #[inline] pub unsafe fn GdipAddPathPath(path: *mut GpPath, addingpath: *const GpPath, connect: bool) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathPath(path : *mut GpPath, addingpath : *const GpPath, connect : super::super::Foundation:: BOOL) -> Status); - unsafe { GdipAddPathPath(core::mem::transmute(path), addingpath, connect.into()) } + unsafe { GdipAddPathPath(path as _, addingpath, connect.into()) } } #[inline] pub unsafe fn GdipAddPathPie(path: *mut GpPath, x: f32, y: f32, width: f32, height: f32, startangle: f32, sweepangle: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathPie(path : *mut GpPath, x : f32, y : f32, width : f32, height : f32, startangle : f32, sweepangle : f32) -> Status); - unsafe { GdipAddPathPie(core::mem::transmute(path), x, y, width, height, startangle, sweepangle) } + unsafe { GdipAddPathPie(path as _, x, y, width, height, startangle, sweepangle) } } #[inline] pub unsafe fn GdipAddPathPieI(path: *mut GpPath, x: i32, y: i32, width: i32, height: i32, startangle: f32, sweepangle: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathPieI(path : *mut GpPath, x : i32, y : i32, width : i32, height : i32, startangle : f32, sweepangle : f32) -> Status); - unsafe { GdipAddPathPieI(core::mem::transmute(path), x, y, width, height, startangle, sweepangle) } + unsafe { GdipAddPathPieI(path as _, x, y, width, height, startangle, sweepangle) } } #[inline] pub unsafe fn GdipAddPathPolygon(path: *mut GpPath, points: *const PointF, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathPolygon(path : *mut GpPath, points : *const PointF, count : i32) -> Status); - unsafe { GdipAddPathPolygon(core::mem::transmute(path), points, count) } + unsafe { GdipAddPathPolygon(path as _, points, count) } } #[inline] pub unsafe fn GdipAddPathPolygonI(path: *mut GpPath, points: *const Point, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathPolygonI(path : *mut GpPath, points : *const Point, count : i32) -> Status); - unsafe { GdipAddPathPolygonI(core::mem::transmute(path), points, count) } + unsafe { GdipAddPathPolygonI(path as _, points, count) } } #[inline] pub unsafe fn GdipAddPathRectangle(path: *mut GpPath, x: f32, y: f32, width: f32, height: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathRectangle(path : *mut GpPath, x : f32, y : f32, width : f32, height : f32) -> Status); - unsafe { GdipAddPathRectangle(core::mem::transmute(path), x, y, width, height) } + unsafe { GdipAddPathRectangle(path as _, x, y, width, height) } } #[inline] pub unsafe fn GdipAddPathRectangleI(path: *mut GpPath, x: i32, y: i32, width: i32, height: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathRectangleI(path : *mut GpPath, x : i32, y : i32, width : i32, height : i32) -> Status); - unsafe { GdipAddPathRectangleI(core::mem::transmute(path), x, y, width, height) } + unsafe { GdipAddPathRectangleI(path as _, x, y, width, height) } } #[inline] pub unsafe fn GdipAddPathRectangles(path: *mut GpPath, rects: *const RectF, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathRectangles(path : *mut GpPath, rects : *const RectF, count : i32) -> Status); - unsafe { GdipAddPathRectangles(core::mem::transmute(path), rects, count) } + unsafe { GdipAddPathRectangles(path as _, rects, count) } } #[inline] pub unsafe fn GdipAddPathRectanglesI(path: *mut GpPath, rects: *const Rect, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathRectanglesI(path : *mut GpPath, rects : *const Rect, count : i32) -> Status); - unsafe { GdipAddPathRectanglesI(core::mem::transmute(path), rects, count) } + unsafe { GdipAddPathRectanglesI(path as _, rects, count) } } #[inline] pub unsafe fn GdipAddPathString(path: *mut GpPath, string: P1, length: i32, family: *const GpFontFamily, style: i32, emsize: f32, layoutrect: *const RectF, format: *const GpStringFormat) -> Status @@ -159,7 +159,7 @@ where P1: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathString(path : *mut GpPath, string : windows_core::PCWSTR, length : i32, family : *const GpFontFamily, style : i32, emsize : f32, layoutrect : *const RectF, format : *const GpStringFormat) -> Status); - unsafe { GdipAddPathString(core::mem::transmute(path), string.param().abi(), length, family, style, emsize, layoutrect, format) } + unsafe { GdipAddPathString(path as _, string.param().abi(), length, family, style, emsize, layoutrect, format) } } #[inline] pub unsafe fn GdipAddPathStringI(path: *mut GpPath, string: P1, length: i32, family: *const GpFontFamily, style: i32, emsize: f32, layoutrect: *const Rect, format: *const GpStringFormat) -> Status @@ -167,7 +167,7 @@ where P1: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathStringI(path : *mut GpPath, string : windows_core::PCWSTR, length : i32, family : *const GpFontFamily, style : i32, emsize : f32, layoutrect : *const Rect, format : *const GpStringFormat) -> Status); - unsafe { GdipAddPathStringI(core::mem::transmute(path), string.param().abi(), length, family, style, emsize, layoutrect, format) } + unsafe { GdipAddPathStringI(path as _, string.param().abi(), length, family, style, emsize, layoutrect, format) } } #[inline] pub unsafe fn GdipAlloc(size: usize) -> *mut core::ffi::c_void { @@ -177,172 +177,172 @@ pub unsafe fn GdipAlloc(size: usize) -> *mut core::ffi::c_void { #[inline] pub unsafe fn GdipBeginContainer(graphics: *mut GpGraphics, dstrect: *const RectF, srcrect: *const RectF, unit: Unit, state: *mut u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipBeginContainer(graphics : *mut GpGraphics, dstrect : *const RectF, srcrect : *const RectF, unit : Unit, state : *mut u32) -> Status); - unsafe { GdipBeginContainer(core::mem::transmute(graphics), dstrect, srcrect, unit, core::mem::transmute(state)) } + unsafe { GdipBeginContainer(graphics as _, dstrect, srcrect, unit, state as _) } } #[inline] pub unsafe fn GdipBeginContainer2(graphics: *mut GpGraphics, state: *mut u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipBeginContainer2(graphics : *mut GpGraphics, state : *mut u32) -> Status); - unsafe { GdipBeginContainer2(core::mem::transmute(graphics), core::mem::transmute(state)) } + unsafe { GdipBeginContainer2(graphics as _, state as _) } } #[inline] pub unsafe fn GdipBeginContainerI(graphics: *mut GpGraphics, dstrect: *const Rect, srcrect: *const Rect, unit: Unit, state: *mut u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipBeginContainerI(graphics : *mut GpGraphics, dstrect : *const Rect, srcrect : *const Rect, unit : Unit, state : *mut u32) -> Status); - unsafe { GdipBeginContainerI(core::mem::transmute(graphics), dstrect, srcrect, unit, core::mem::transmute(state)) } + unsafe { GdipBeginContainerI(graphics as _, dstrect, srcrect, unit, state as _) } } #[inline] pub unsafe fn GdipBitmapApplyEffect(bitmap: *mut GpBitmap, effect: *mut CGpEffect, roi: *mut super::super::Foundation::RECT, useauxdata: bool, auxdata: *mut *mut core::ffi::c_void, auxdatasize: *mut i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipBitmapApplyEffect(bitmap : *mut GpBitmap, effect : *mut CGpEffect, roi : *mut super::super::Foundation:: RECT, useauxdata : super::super::Foundation:: BOOL, auxdata : *mut *mut core::ffi::c_void, auxdatasize : *mut i32) -> Status); - unsafe { GdipBitmapApplyEffect(core::mem::transmute(bitmap), core::mem::transmute(effect), core::mem::transmute(roi), useauxdata.into(), core::mem::transmute(auxdata), core::mem::transmute(auxdatasize)) } + unsafe { GdipBitmapApplyEffect(bitmap as _, effect as _, roi as _, useauxdata.into(), auxdata as _, auxdatasize as _) } } #[inline] pub unsafe fn GdipBitmapConvertFormat(pinputbitmap: *mut GpBitmap, format: i32, dithertype: DitherType, palettetype: PaletteType, palette: *mut ColorPalette, alphathresholdpercent: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipBitmapConvertFormat(pinputbitmap : *mut GpBitmap, format : i32, dithertype : DitherType, palettetype : PaletteType, palette : *mut ColorPalette, alphathresholdpercent : f32) -> Status); - unsafe { GdipBitmapConvertFormat(core::mem::transmute(pinputbitmap), format, dithertype, palettetype, core::mem::transmute(palette), alphathresholdpercent) } + unsafe { GdipBitmapConvertFormat(pinputbitmap as _, format, dithertype, palettetype, palette as _, alphathresholdpercent) } } #[inline] pub unsafe fn GdipBitmapCreateApplyEffect(inputbitmaps: *mut *mut GpBitmap, numinputs: i32, effect: *mut CGpEffect, roi: *mut super::super::Foundation::RECT, outputrect: *mut super::super::Foundation::RECT, outputbitmap: *mut *mut GpBitmap, useauxdata: bool, auxdata: *mut *mut core::ffi::c_void, auxdatasize: *mut i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipBitmapCreateApplyEffect(inputbitmaps : *mut *mut GpBitmap, numinputs : i32, effect : *mut CGpEffect, roi : *mut super::super::Foundation:: RECT, outputrect : *mut super::super::Foundation:: RECT, outputbitmap : *mut *mut GpBitmap, useauxdata : super::super::Foundation:: BOOL, auxdata : *mut *mut core::ffi::c_void, auxdatasize : *mut i32) -> Status); - unsafe { GdipBitmapCreateApplyEffect(core::mem::transmute(inputbitmaps), numinputs, core::mem::transmute(effect), core::mem::transmute(roi), core::mem::transmute(outputrect), core::mem::transmute(outputbitmap), useauxdata.into(), core::mem::transmute(auxdata), core::mem::transmute(auxdatasize)) } + unsafe { GdipBitmapCreateApplyEffect(inputbitmaps as _, numinputs, effect as _, roi as _, outputrect as _, outputbitmap as _, useauxdata.into(), auxdata as _, auxdatasize as _) } } #[inline] pub unsafe fn GdipBitmapGetHistogram(bitmap: *mut GpBitmap, format: HistogramFormat, numberofentries: u32, channel0: *mut u32, channel1: *mut u32, channel2: *mut u32, channel3: *mut u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipBitmapGetHistogram(bitmap : *mut GpBitmap, format : HistogramFormat, numberofentries : u32, channel0 : *mut u32, channel1 : *mut u32, channel2 : *mut u32, channel3 : *mut u32) -> Status); - unsafe { GdipBitmapGetHistogram(core::mem::transmute(bitmap), format, numberofentries, core::mem::transmute(channel0), core::mem::transmute(channel1), core::mem::transmute(channel2), core::mem::transmute(channel3)) } + unsafe { GdipBitmapGetHistogram(bitmap as _, format, numberofentries, channel0 as _, channel1 as _, channel2 as _, channel3 as _) } } #[inline] pub unsafe fn GdipBitmapGetHistogramSize(format: HistogramFormat, numberofentries: *mut u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipBitmapGetHistogramSize(format : HistogramFormat, numberofentries : *mut u32) -> Status); - unsafe { GdipBitmapGetHistogramSize(format, core::mem::transmute(numberofentries)) } + unsafe { GdipBitmapGetHistogramSize(format, numberofentries as _) } } #[inline] pub unsafe fn GdipBitmapGetPixel(bitmap: *mut GpBitmap, x: i32, y: i32, color: *mut u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipBitmapGetPixel(bitmap : *mut GpBitmap, x : i32, y : i32, color : *mut u32) -> Status); - unsafe { GdipBitmapGetPixel(core::mem::transmute(bitmap), x, y, core::mem::transmute(color)) } + unsafe { GdipBitmapGetPixel(bitmap as _, x, y, color as _) } } #[inline] pub unsafe fn GdipBitmapLockBits(bitmap: *mut GpBitmap, rect: *const Rect, flags: u32, format: i32, lockedbitmapdata: *mut BitmapData) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipBitmapLockBits(bitmap : *mut GpBitmap, rect : *const Rect, flags : u32, format : i32, lockedbitmapdata : *mut BitmapData) -> Status); - unsafe { GdipBitmapLockBits(core::mem::transmute(bitmap), rect, flags, format, core::mem::transmute(lockedbitmapdata)) } + unsafe { GdipBitmapLockBits(bitmap as _, rect, flags, format, lockedbitmapdata as _) } } #[inline] pub unsafe fn GdipBitmapSetPixel(bitmap: *mut GpBitmap, x: i32, y: i32, color: u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipBitmapSetPixel(bitmap : *mut GpBitmap, x : i32, y : i32, color : u32) -> Status); - unsafe { GdipBitmapSetPixel(core::mem::transmute(bitmap), x, y, color) } + unsafe { GdipBitmapSetPixel(bitmap as _, x, y, color) } } #[inline] pub unsafe fn GdipBitmapSetResolution(bitmap: *mut GpBitmap, xdpi: f32, ydpi: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipBitmapSetResolution(bitmap : *mut GpBitmap, xdpi : f32, ydpi : f32) -> Status); - unsafe { GdipBitmapSetResolution(core::mem::transmute(bitmap), xdpi, ydpi) } + unsafe { GdipBitmapSetResolution(bitmap as _, xdpi, ydpi) } } #[inline] pub unsafe fn GdipBitmapUnlockBits(bitmap: *mut GpBitmap, lockedbitmapdata: *mut BitmapData) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipBitmapUnlockBits(bitmap : *mut GpBitmap, lockedbitmapdata : *mut BitmapData) -> Status); - unsafe { GdipBitmapUnlockBits(core::mem::transmute(bitmap), core::mem::transmute(lockedbitmapdata)) } + unsafe { GdipBitmapUnlockBits(bitmap as _, lockedbitmapdata as _) } } #[inline] pub unsafe fn GdipClearPathMarkers(path: *mut GpPath) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipClearPathMarkers(path : *mut GpPath) -> Status); - unsafe { GdipClearPathMarkers(core::mem::transmute(path)) } + unsafe { GdipClearPathMarkers(path as _) } } #[inline] pub unsafe fn GdipCloneBitmapArea(x: f32, y: f32, width: f32, height: f32, format: i32, srcbitmap: *mut GpBitmap, dstbitmap: *mut *mut GpBitmap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCloneBitmapArea(x : f32, y : f32, width : f32, height : f32, format : i32, srcbitmap : *mut GpBitmap, dstbitmap : *mut *mut GpBitmap) -> Status); - unsafe { GdipCloneBitmapArea(x, y, width, height, format, core::mem::transmute(srcbitmap), core::mem::transmute(dstbitmap)) } + unsafe { GdipCloneBitmapArea(x, y, width, height, format, srcbitmap as _, dstbitmap as _) } } #[inline] pub unsafe fn GdipCloneBitmapAreaI(x: i32, y: i32, width: i32, height: i32, format: i32, srcbitmap: *mut GpBitmap, dstbitmap: *mut *mut GpBitmap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCloneBitmapAreaI(x : i32, y : i32, width : i32, height : i32, format : i32, srcbitmap : *mut GpBitmap, dstbitmap : *mut *mut GpBitmap) -> Status); - unsafe { GdipCloneBitmapAreaI(x, y, width, height, format, core::mem::transmute(srcbitmap), core::mem::transmute(dstbitmap)) } + unsafe { GdipCloneBitmapAreaI(x, y, width, height, format, srcbitmap as _, dstbitmap as _) } } #[inline] pub unsafe fn GdipCloneBrush(brush: *mut GpBrush, clonebrush: *mut *mut GpBrush) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCloneBrush(brush : *mut GpBrush, clonebrush : *mut *mut GpBrush) -> Status); - unsafe { GdipCloneBrush(core::mem::transmute(brush), core::mem::transmute(clonebrush)) } + unsafe { GdipCloneBrush(brush as _, clonebrush as _) } } #[inline] pub unsafe fn GdipCloneCustomLineCap(customcap: *mut GpCustomLineCap, clonedcap: *mut *mut GpCustomLineCap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCloneCustomLineCap(customcap : *mut GpCustomLineCap, clonedcap : *mut *mut GpCustomLineCap) -> Status); - unsafe { GdipCloneCustomLineCap(core::mem::transmute(customcap), core::mem::transmute(clonedcap)) } + unsafe { GdipCloneCustomLineCap(customcap as _, clonedcap as _) } } #[inline] pub unsafe fn GdipCloneFont(font: *mut GpFont, clonefont: *mut *mut GpFont) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCloneFont(font : *mut GpFont, clonefont : *mut *mut GpFont) -> Status); - unsafe { GdipCloneFont(core::mem::transmute(font), core::mem::transmute(clonefont)) } + unsafe { GdipCloneFont(font as _, clonefont as _) } } #[inline] pub unsafe fn GdipCloneFontFamily(fontfamily: *mut GpFontFamily, clonedfontfamily: *mut *mut GpFontFamily) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCloneFontFamily(fontfamily : *mut GpFontFamily, clonedfontfamily : *mut *mut GpFontFamily) -> Status); - unsafe { GdipCloneFontFamily(core::mem::transmute(fontfamily), core::mem::transmute(clonedfontfamily)) } + unsafe { GdipCloneFontFamily(fontfamily as _, clonedfontfamily as _) } } #[inline] pub unsafe fn GdipCloneImage(image: *mut GpImage, cloneimage: *mut *mut GpImage) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCloneImage(image : *mut GpImage, cloneimage : *mut *mut GpImage) -> Status); - unsafe { GdipCloneImage(core::mem::transmute(image), core::mem::transmute(cloneimage)) } + unsafe { GdipCloneImage(image as _, cloneimage as _) } } #[inline] pub unsafe fn GdipCloneImageAttributes(imageattr: *const GpImageAttributes, cloneimageattr: *mut *mut GpImageAttributes) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCloneImageAttributes(imageattr : *const GpImageAttributes, cloneimageattr : *mut *mut GpImageAttributes) -> Status); - unsafe { GdipCloneImageAttributes(imageattr, core::mem::transmute(cloneimageattr)) } + unsafe { GdipCloneImageAttributes(imageattr, cloneimageattr as _) } } #[inline] pub unsafe fn GdipCloneMatrix(matrix: *mut Matrix, clonematrix: *mut *mut Matrix) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCloneMatrix(matrix : *mut Matrix, clonematrix : *mut *mut Matrix) -> Status); - unsafe { GdipCloneMatrix(core::mem::transmute(matrix), core::mem::transmute(clonematrix)) } + unsafe { GdipCloneMatrix(matrix as _, clonematrix as _) } } #[inline] pub unsafe fn GdipClonePath(path: *mut GpPath, clonepath: *mut *mut GpPath) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipClonePath(path : *mut GpPath, clonepath : *mut *mut GpPath) -> Status); - unsafe { GdipClonePath(core::mem::transmute(path), core::mem::transmute(clonepath)) } + unsafe { GdipClonePath(path as _, clonepath as _) } } #[inline] pub unsafe fn GdipClonePen(pen: *mut GpPen, clonepen: *mut *mut GpPen) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipClonePen(pen : *mut GpPen, clonepen : *mut *mut GpPen) -> Status); - unsafe { GdipClonePen(core::mem::transmute(pen), core::mem::transmute(clonepen)) } + unsafe { GdipClonePen(pen as _, clonepen as _) } } #[inline] pub unsafe fn GdipCloneRegion(region: *mut GpRegion, cloneregion: *mut *mut GpRegion) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCloneRegion(region : *mut GpRegion, cloneregion : *mut *mut GpRegion) -> Status); - unsafe { GdipCloneRegion(core::mem::transmute(region), core::mem::transmute(cloneregion)) } + unsafe { GdipCloneRegion(region as _, cloneregion as _) } } #[inline] pub unsafe fn GdipCloneStringFormat(format: *const GpStringFormat, newformat: *mut *mut GpStringFormat) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCloneStringFormat(format : *const GpStringFormat, newformat : *mut *mut GpStringFormat) -> Status); - unsafe { GdipCloneStringFormat(format, core::mem::transmute(newformat)) } + unsafe { GdipCloneStringFormat(format, newformat as _) } } #[inline] pub unsafe fn GdipClosePathFigure(path: *mut GpPath) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipClosePathFigure(path : *mut GpPath) -> Status); - unsafe { GdipClosePathFigure(core::mem::transmute(path)) } + unsafe { GdipClosePathFigure(path as _) } } #[inline] pub unsafe fn GdipClosePathFigures(path: *mut GpPath) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipClosePathFigures(path : *mut GpPath) -> Status); - unsafe { GdipClosePathFigures(core::mem::transmute(path)) } + unsafe { GdipClosePathFigures(path as _) } } #[inline] pub unsafe fn GdipCombineRegionPath(region: *mut GpRegion, path: *mut GpPath, combinemode: CombineMode) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCombineRegionPath(region : *mut GpRegion, path : *mut GpPath, combinemode : CombineMode) -> Status); - unsafe { GdipCombineRegionPath(core::mem::transmute(region), core::mem::transmute(path), combinemode) } + unsafe { GdipCombineRegionPath(region as _, path as _, combinemode) } } #[inline] pub unsafe fn GdipCombineRegionRect(region: *mut GpRegion, rect: *const RectF, combinemode: CombineMode) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCombineRegionRect(region : *mut GpRegion, rect : *const RectF, combinemode : CombineMode) -> Status); - unsafe { GdipCombineRegionRect(core::mem::transmute(region), rect, combinemode) } + unsafe { GdipCombineRegionRect(region as _, rect, combinemode) } } #[inline] pub unsafe fn GdipCombineRegionRectI(region: *mut GpRegion, rect: *const Rect, combinemode: CombineMode) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCombineRegionRectI(region : *mut GpRegion, rect : *const Rect, combinemode : CombineMode) -> Status); - unsafe { GdipCombineRegionRectI(core::mem::transmute(region), rect, combinemode) } + unsafe { GdipCombineRegionRectI(region as _, rect, combinemode) } } #[inline] pub unsafe fn GdipCombineRegionRegion(region: *mut GpRegion, region2: *mut GpRegion, combinemode: CombineMode) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCombineRegionRegion(region : *mut GpRegion, region2 : *mut GpRegion, combinemode : CombineMode) -> Status); - unsafe { GdipCombineRegionRegion(core::mem::transmute(region), core::mem::transmute(region2), combinemode) } + unsafe { GdipCombineRegionRegion(region as _, region2 as _, combinemode) } } #[inline] pub unsafe fn GdipComment(graphics: *mut GpGraphics, sizedata: u32, data: *const u8) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipComment(graphics : *mut GpGraphics, sizedata : u32, data : *const u8) -> Status); - unsafe { GdipComment(core::mem::transmute(graphics), sizedata, data) } + unsafe { GdipComment(graphics as _, sizedata, data) } } #[inline] pub unsafe fn GdipConvertToEmfPlus(refgraphics: *const GpGraphics, metafile: *mut GpMetafile, conversionfailureflag: *mut i32, emftype: EmfType, description: P4, out_metafile: *mut *mut GpMetafile) -> Status @@ -350,7 +350,7 @@ where P4: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipConvertToEmfPlus(refgraphics : *const GpGraphics, metafile : *mut GpMetafile, conversionfailureflag : *mut i32, emftype : EmfType, description : windows_core::PCWSTR, out_metafile : *mut *mut GpMetafile) -> Status); - unsafe { GdipConvertToEmfPlus(refgraphics, core::mem::transmute(metafile), core::mem::transmute(conversionfailureflag), emftype, description.param().abi(), core::mem::transmute(out_metafile)) } + unsafe { GdipConvertToEmfPlus(refgraphics, metafile as _, conversionfailureflag as _, emftype, description.param().abi(), out_metafile as _) } } #[inline] pub unsafe fn GdipConvertToEmfPlusToFile(refgraphics: *const GpGraphics, metafile: *mut GpMetafile, conversionfailureflag: *mut i32, filename: P3, emftype: EmfType, description: P5, out_metafile: *mut *mut GpMetafile) -> Status @@ -359,7 +359,7 @@ where P5: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipConvertToEmfPlusToFile(refgraphics : *const GpGraphics, metafile : *mut GpMetafile, conversionfailureflag : *mut i32, filename : windows_core::PCWSTR, emftype : EmfType, description : windows_core::PCWSTR, out_metafile : *mut *mut GpMetafile) -> Status); - unsafe { GdipConvertToEmfPlusToFile(refgraphics, core::mem::transmute(metafile), core::mem::transmute(conversionfailureflag), filename.param().abi(), emftype, description.param().abi(), core::mem::transmute(out_metafile)) } + unsafe { GdipConvertToEmfPlusToFile(refgraphics, metafile as _, conversionfailureflag as _, filename.param().abi(), emftype, description.param().abi(), out_metafile as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -369,12 +369,12 @@ where P5: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipConvertToEmfPlusToStream(refgraphics : *const GpGraphics, metafile : *mut GpMetafile, conversionfailureflag : *mut i32, stream : * mut core::ffi::c_void, emftype : EmfType, description : windows_core::PCWSTR, out_metafile : *mut *mut GpMetafile) -> Status); - unsafe { GdipConvertToEmfPlusToStream(refgraphics, core::mem::transmute(metafile), core::mem::transmute(conversionfailureflag), stream.param().abi(), emftype, description.param().abi(), core::mem::transmute(out_metafile)) } + unsafe { GdipConvertToEmfPlusToStream(refgraphics, metafile as _, conversionfailureflag as _, stream.param().abi(), emftype, description.param().abi(), out_metafile as _) } } #[inline] pub unsafe fn GdipCreateAdjustableArrowCap(height: f32, width: f32, isfilled: bool, cap: *mut *mut GpAdjustableArrowCap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateAdjustableArrowCap(height : f32, width : f32, isfilled : super::super::Foundation:: BOOL, cap : *mut *mut GpAdjustableArrowCap) -> Status); - unsafe { GdipCreateAdjustableArrowCap(height, width, isfilled.into(), core::mem::transmute(cap)) } + unsafe { GdipCreateAdjustableArrowCap(height, width, isfilled.into(), cap as _) } } #[cfg(feature = "Win32_Graphics_DirectDraw")] #[inline] @@ -383,7 +383,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateBitmapFromDirectDrawSurface(surface : * mut core::ffi::c_void, bitmap : *mut *mut GpBitmap) -> Status); - unsafe { GdipCreateBitmapFromDirectDrawSurface(surface.param().abi(), core::mem::transmute(bitmap)) } + unsafe { GdipCreateBitmapFromDirectDrawSurface(surface.param().abi(), bitmap as _) } } #[inline] pub unsafe fn GdipCreateBitmapFromFile(filename: P0, bitmap: *mut *mut GpBitmap) -> Status @@ -391,7 +391,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateBitmapFromFile(filename : windows_core::PCWSTR, bitmap : *mut *mut GpBitmap) -> Status); - unsafe { GdipCreateBitmapFromFile(filename.param().abi(), core::mem::transmute(bitmap)) } + unsafe { GdipCreateBitmapFromFile(filename.param().abi(), bitmap as _) } } #[inline] pub unsafe fn GdipCreateBitmapFromFileICM(filename: P0, bitmap: *mut *mut GpBitmap) -> Status @@ -399,30 +399,30 @@ where P0: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateBitmapFromFileICM(filename : windows_core::PCWSTR, bitmap : *mut *mut GpBitmap) -> Status); - unsafe { GdipCreateBitmapFromFileICM(filename.param().abi(), core::mem::transmute(bitmap)) } + unsafe { GdipCreateBitmapFromFileICM(filename.param().abi(), bitmap as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn GdipCreateBitmapFromGdiDib(gdibitmapinfo: *const super::Gdi::BITMAPINFO, gdibitmapdata: *mut core::ffi::c_void, bitmap: *mut *mut GpBitmap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateBitmapFromGdiDib(gdibitmapinfo : *const super::Gdi:: BITMAPINFO, gdibitmapdata : *mut core::ffi::c_void, bitmap : *mut *mut GpBitmap) -> Status); - unsafe { GdipCreateBitmapFromGdiDib(gdibitmapinfo, core::mem::transmute(gdibitmapdata), core::mem::transmute(bitmap)) } + unsafe { GdipCreateBitmapFromGdiDib(gdibitmapinfo, gdibitmapdata as _, bitmap as _) } } #[inline] pub unsafe fn GdipCreateBitmapFromGraphics(width: i32, height: i32, target: *mut GpGraphics, bitmap: *mut *mut GpBitmap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateBitmapFromGraphics(width : i32, height : i32, target : *mut GpGraphics, bitmap : *mut *mut GpBitmap) -> Status); - unsafe { GdipCreateBitmapFromGraphics(width, height, core::mem::transmute(target), core::mem::transmute(bitmap)) } + unsafe { GdipCreateBitmapFromGraphics(width, height, target as _, bitmap as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { GdipCreateBitmapFromHBITMAP(hbm, hpal, core::mem::transmute(bitmap)) } + unsafe { GdipCreateBitmapFromHBITMAP(hbm, hpal, bitmap as _) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] 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); - unsafe { GdipCreateBitmapFromHICON(hicon, core::mem::transmute(bitmap)) } + unsafe { GdipCreateBitmapFromHICON(hicon, bitmap as _) } } #[inline] pub unsafe fn GdipCreateBitmapFromResource(hinstance: super::super::Foundation::HINSTANCE, lpbitmapname: P1, bitmap: *mut *mut GpBitmap) -> Status @@ -430,12 +430,12 @@ where 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); - unsafe { GdipCreateBitmapFromResource(hinstance, lpbitmapname.param().abi(), core::mem::transmute(bitmap)) } + unsafe { GdipCreateBitmapFromResource(hinstance, lpbitmapname.param().abi(), bitmap as _) } } #[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); - unsafe { GdipCreateBitmapFromScan0(width, height, stride, format, core::mem::transmute(scan0.unwrap_or(core::mem::zeroed())), core::mem::transmute(bitmap)) } + unsafe { GdipCreateBitmapFromScan0(width, height, stride, format, scan0.unwrap_or(core::mem::zeroed()) as _, bitmap as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -444,7 +444,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateBitmapFromStream(stream : * mut core::ffi::c_void, bitmap : *mut *mut GpBitmap) -> Status); - unsafe { GdipCreateBitmapFromStream(stream.param().abi(), core::mem::transmute(bitmap)) } + unsafe { GdipCreateBitmapFromStream(stream.param().abi(), bitmap as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -453,27 +453,27 @@ where P0: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateBitmapFromStreamICM(stream : * mut core::ffi::c_void, bitmap : *mut *mut GpBitmap) -> Status); - unsafe { GdipCreateBitmapFromStreamICM(stream.param().abi(), core::mem::transmute(bitmap)) } + unsafe { GdipCreateBitmapFromStreamICM(stream.param().abi(), bitmap as _) } } #[inline] pub unsafe fn GdipCreateCachedBitmap(bitmap: *mut GpBitmap, graphics: *mut GpGraphics, cachedbitmap: *mut *mut GpCachedBitmap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateCachedBitmap(bitmap : *mut GpBitmap, graphics : *mut GpGraphics, cachedbitmap : *mut *mut GpCachedBitmap) -> Status); - unsafe { GdipCreateCachedBitmap(core::mem::transmute(bitmap), core::mem::transmute(graphics), core::mem::transmute(cachedbitmap)) } + unsafe { GdipCreateCachedBitmap(bitmap as _, graphics as _, cachedbitmap as _) } } #[inline] pub unsafe fn GdipCreateCustomLineCap(fillpath: *mut GpPath, strokepath: *mut GpPath, basecap: LineCap, baseinset: f32, customcap: *mut *mut GpCustomLineCap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateCustomLineCap(fillpath : *mut GpPath, strokepath : *mut GpPath, basecap : LineCap, baseinset : f32, customcap : *mut *mut GpCustomLineCap) -> Status); - unsafe { GdipCreateCustomLineCap(core::mem::transmute(fillpath), core::mem::transmute(strokepath), basecap, baseinset, core::mem::transmute(customcap)) } + unsafe { GdipCreateCustomLineCap(fillpath as _, strokepath as _, basecap, baseinset, customcap as _) } } #[inline] pub unsafe fn GdipCreateEffect(guid: windows_core::GUID, effect: *mut *mut CGpEffect) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateEffect(guid : windows_core::GUID, effect : *mut *mut CGpEffect) -> Status); - unsafe { GdipCreateEffect(core::mem::transmute(guid), core::mem::transmute(effect)) } + unsafe { GdipCreateEffect(core::mem::transmute(guid), effect as _) } } #[inline] pub unsafe fn GdipCreateFont(fontfamily: *const GpFontFamily, emsize: f32, style: i32, unit: Unit, font: *mut *mut GpFont) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateFont(fontfamily : *const GpFontFamily, emsize : f32, style : i32, unit : Unit, font : *mut *mut GpFont) -> Status); - unsafe { GdipCreateFont(fontfamily, emsize, style, unit, core::mem::transmute(font)) } + unsafe { GdipCreateFont(fontfamily, emsize, style, unit, font as _) } } #[inline] pub unsafe fn GdipCreateFontFamilyFromName(name: P0, fontcollection: *mut GpFontCollection, fontfamily: *mut *mut GpFontFamily) -> Status @@ -481,59 +481,59 @@ where P0: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateFontFamilyFromName(name : windows_core::PCWSTR, fontcollection : *mut GpFontCollection, fontfamily : *mut *mut GpFontFamily) -> Status); - unsafe { GdipCreateFontFamilyFromName(name.param().abi(), core::mem::transmute(fontcollection), core::mem::transmute(fontfamily)) } + unsafe { GdipCreateFontFamilyFromName(name.param().abi(), fontcollection as _, fontfamily as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { GdipCreateFontFromDC(hdc, core::mem::transmute(font)) } + unsafe { GdipCreateFontFromDC(hdc, font as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { GdipCreateFontFromLogfontA(hdc, logfont, core::mem::transmute(font)) } + unsafe { GdipCreateFontFromLogfontA(hdc, logfont, font as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { GdipCreateFontFromLogfontW(hdc, logfont, core::mem::transmute(font)) } + unsafe { GdipCreateFontFromLogfontW(hdc, logfont, font as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { GdipCreateFromHDC(hdc, core::mem::transmute(graphics)) } + unsafe { GdipCreateFromHDC(hdc, graphics as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { GdipCreateFromHDC2(hdc, hdevice, core::mem::transmute(graphics)) } + unsafe { GdipCreateFromHDC2(hdc, hdevice, graphics as _) } } #[inline] 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); - unsafe { GdipCreateFromHWND(hwnd, core::mem::transmute(graphics)) } + unsafe { GdipCreateFromHWND(hwnd, graphics as _) } } #[inline] 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); - unsafe { GdipCreateFromHWNDICM(hwnd, core::mem::transmute(graphics)) } + unsafe { GdipCreateFromHWNDICM(hwnd, graphics as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn GdipCreateHBITMAPFromBitmap(bitmap: *mut GpBitmap, hbmreturn: *mut super::Gdi::HBITMAP, background: u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateHBITMAPFromBitmap(bitmap : *mut GpBitmap, hbmreturn : *mut super::Gdi:: HBITMAP, background : u32) -> Status); - unsafe { GdipCreateHBITMAPFromBitmap(core::mem::transmute(bitmap), core::mem::transmute(hbmreturn), background) } + unsafe { GdipCreateHBITMAPFromBitmap(bitmap as _, hbmreturn as _, background) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] pub unsafe fn GdipCreateHICONFromBitmap(bitmap: *mut GpBitmap, hbmreturn: *mut super::super::UI::WindowsAndMessaging::HICON) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateHICONFromBitmap(bitmap : *mut GpBitmap, hbmreturn : *mut super::super::UI::WindowsAndMessaging:: HICON) -> Status); - unsafe { GdipCreateHICONFromBitmap(core::mem::transmute(bitmap), core::mem::transmute(hbmreturn)) } + unsafe { GdipCreateHICONFromBitmap(bitmap as _, hbmreturn as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -544,68 +544,68 @@ pub unsafe fn GdipCreateHalftonePalette() -> super::Gdi::HPALETTE { #[inline] pub unsafe fn GdipCreateHatchBrush(hatchstyle: HatchStyle, forecol: u32, backcol: u32, brush: *mut *mut GpHatch) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateHatchBrush(hatchstyle : HatchStyle, forecol : u32, backcol : u32, brush : *mut *mut GpHatch) -> Status); - unsafe { GdipCreateHatchBrush(hatchstyle, forecol, backcol, core::mem::transmute(brush)) } + unsafe { GdipCreateHatchBrush(hatchstyle, forecol, backcol, brush as _) } } #[inline] pub unsafe fn GdipCreateImageAttributes(imageattr: *mut *mut GpImageAttributes) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateImageAttributes(imageattr : *mut *mut GpImageAttributes) -> Status); - unsafe { GdipCreateImageAttributes(core::mem::transmute(imageattr)) } + unsafe { GdipCreateImageAttributes(imageattr as _) } } #[inline] pub unsafe fn GdipCreateLineBrush(point1: *const PointF, point2: *const PointF, color1: u32, color2: u32, wrapmode: WrapMode, linegradient: *mut *mut GpLineGradient) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateLineBrush(point1 : *const PointF, point2 : *const PointF, color1 : u32, color2 : u32, wrapmode : WrapMode, linegradient : *mut *mut GpLineGradient) -> Status); - unsafe { GdipCreateLineBrush(point1, point2, color1, color2, wrapmode, core::mem::transmute(linegradient)) } + unsafe { GdipCreateLineBrush(point1, point2, color1, color2, wrapmode, linegradient as _) } } #[inline] pub unsafe fn GdipCreateLineBrushFromRect(rect: *const RectF, color1: u32, color2: u32, mode: LinearGradientMode, wrapmode: WrapMode, linegradient: *mut *mut GpLineGradient) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateLineBrushFromRect(rect : *const RectF, color1 : u32, color2 : u32, mode : LinearGradientMode, wrapmode : WrapMode, linegradient : *mut *mut GpLineGradient) -> Status); - unsafe { GdipCreateLineBrushFromRect(rect, color1, color2, mode, wrapmode, core::mem::transmute(linegradient)) } + unsafe { GdipCreateLineBrushFromRect(rect, color1, color2, mode, wrapmode, linegradient as _) } } #[inline] pub unsafe fn GdipCreateLineBrushFromRectI(rect: *const Rect, color1: u32, color2: u32, mode: LinearGradientMode, wrapmode: WrapMode, linegradient: *mut *mut GpLineGradient) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateLineBrushFromRectI(rect : *const Rect, color1 : u32, color2 : u32, mode : LinearGradientMode, wrapmode : WrapMode, linegradient : *mut *mut GpLineGradient) -> Status); - unsafe { GdipCreateLineBrushFromRectI(rect, color1, color2, mode, wrapmode, core::mem::transmute(linegradient)) } + unsafe { GdipCreateLineBrushFromRectI(rect, color1, color2, mode, wrapmode, linegradient as _) } } #[inline] pub unsafe fn GdipCreateLineBrushFromRectWithAngle(rect: *const RectF, color1: u32, color2: u32, angle: f32, isanglescalable: bool, wrapmode: WrapMode, linegradient: *mut *mut GpLineGradient) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateLineBrushFromRectWithAngle(rect : *const RectF, color1 : u32, color2 : u32, angle : f32, isanglescalable : super::super::Foundation:: BOOL, wrapmode : WrapMode, linegradient : *mut *mut GpLineGradient) -> Status); - unsafe { GdipCreateLineBrushFromRectWithAngle(rect, color1, color2, angle, isanglescalable.into(), wrapmode, core::mem::transmute(linegradient)) } + unsafe { GdipCreateLineBrushFromRectWithAngle(rect, color1, color2, angle, isanglescalable.into(), wrapmode, linegradient as _) } } #[inline] pub unsafe fn GdipCreateLineBrushFromRectWithAngleI(rect: *const Rect, color1: u32, color2: u32, angle: f32, isanglescalable: bool, wrapmode: WrapMode, linegradient: *mut *mut GpLineGradient) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateLineBrushFromRectWithAngleI(rect : *const Rect, color1 : u32, color2 : u32, angle : f32, isanglescalable : super::super::Foundation:: BOOL, wrapmode : WrapMode, linegradient : *mut *mut GpLineGradient) -> Status); - unsafe { GdipCreateLineBrushFromRectWithAngleI(rect, color1, color2, angle, isanglescalable.into(), wrapmode, core::mem::transmute(linegradient)) } + unsafe { GdipCreateLineBrushFromRectWithAngleI(rect, color1, color2, angle, isanglescalable.into(), wrapmode, linegradient as _) } } #[inline] pub unsafe fn GdipCreateLineBrushI(point1: *const Point, point2: *const Point, color1: u32, color2: u32, wrapmode: WrapMode, linegradient: *mut *mut GpLineGradient) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateLineBrushI(point1 : *const Point, point2 : *const Point, color1 : u32, color2 : u32, wrapmode : WrapMode, linegradient : *mut *mut GpLineGradient) -> Status); - unsafe { GdipCreateLineBrushI(point1, point2, color1, color2, wrapmode, core::mem::transmute(linegradient)) } + unsafe { GdipCreateLineBrushI(point1, point2, color1, color2, wrapmode, linegradient as _) } } #[inline] pub unsafe fn GdipCreateMatrix(matrix: *mut *mut Matrix) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateMatrix(matrix : *mut *mut Matrix) -> Status); - unsafe { GdipCreateMatrix(core::mem::transmute(matrix)) } + unsafe { GdipCreateMatrix(matrix as _) } } #[inline] pub unsafe fn GdipCreateMatrix2(m11: f32, m12: f32, m21: f32, m22: f32, dx: f32, dy: f32, matrix: *mut *mut Matrix) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateMatrix2(m11 : f32, m12 : f32, m21 : f32, m22 : f32, dx : f32, dy : f32, matrix : *mut *mut Matrix) -> Status); - unsafe { GdipCreateMatrix2(m11, m12, m21, m22, dx, dy, core::mem::transmute(matrix)) } + unsafe { GdipCreateMatrix2(m11, m12, m21, m22, dx, dy, matrix as _) } } #[inline] pub unsafe fn GdipCreateMatrix3(rect: *const RectF, dstplg: *const PointF, matrix: *mut *mut Matrix) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateMatrix3(rect : *const RectF, dstplg : *const PointF, matrix : *mut *mut Matrix) -> Status); - unsafe { GdipCreateMatrix3(rect, dstplg, core::mem::transmute(matrix)) } + unsafe { GdipCreateMatrix3(rect, dstplg, matrix as _) } } #[inline] pub unsafe fn GdipCreateMatrix3I(rect: *const Rect, dstplg: *const Point, matrix: *mut *mut Matrix) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateMatrix3I(rect : *const Rect, dstplg : *const Point, matrix : *mut *mut Matrix) -> Status); - unsafe { GdipCreateMatrix3I(rect, dstplg, core::mem::transmute(matrix)) } + unsafe { GdipCreateMatrix3I(rect, dstplg, matrix as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn GdipCreateMetafileFromEmf(hemf: super::Gdi::HENHMETAFILE, deleteemf: bool, metafile: *mut *mut GpMetafile) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateMetafileFromEmf(hemf : super::Gdi:: HENHMETAFILE, deleteemf : super::super::Foundation:: BOOL, metafile : *mut *mut GpMetafile) -> Status); - unsafe { GdipCreateMetafileFromEmf(hemf, deleteemf.into(), core::mem::transmute(metafile)) } + unsafe { GdipCreateMetafileFromEmf(hemf, deleteemf.into(), metafile as _) } } #[inline] pub unsafe fn GdipCreateMetafileFromFile(file: P0, metafile: *mut *mut GpMetafile) -> Status @@ -613,7 +613,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateMetafileFromFile(file : windows_core::PCWSTR, metafile : *mut *mut GpMetafile) -> Status); - unsafe { GdipCreateMetafileFromFile(file.param().abi(), core::mem::transmute(metafile)) } + unsafe { GdipCreateMetafileFromFile(file.param().abi(), metafile as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -622,13 +622,13 @@ where P0: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateMetafileFromStream(stream : * mut core::ffi::c_void, metafile : *mut *mut GpMetafile) -> Status); - unsafe { GdipCreateMetafileFromStream(stream.param().abi(), core::mem::transmute(metafile)) } + unsafe { GdipCreateMetafileFromStream(stream.param().abi(), metafile as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn GdipCreateMetafileFromWmf(hwmf: super::Gdi::HMETAFILE, deletewmf: bool, wmfplaceablefileheader: *const WmfPlaceableFileHeader, metafile: *mut *mut GpMetafile) -> Status { 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); - unsafe { GdipCreateMetafileFromWmf(hwmf, deletewmf.into(), wmfplaceablefileheader, core::mem::transmute(metafile)) } + unsafe { GdipCreateMetafileFromWmf(hwmf, deletewmf.into(), wmfplaceablefileheader, metafile as _) } } #[inline] pub unsafe fn GdipCreateMetafileFromWmfFile(file: P0, wmfplaceablefileheader: *const WmfPlaceableFileHeader, metafile: *mut *mut GpMetafile) -> Status @@ -636,88 +636,88 @@ where P0: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateMetafileFromWmfFile(file : windows_core::PCWSTR, wmfplaceablefileheader : *const WmfPlaceableFileHeader, metafile : *mut *mut GpMetafile) -> Status); - unsafe { GdipCreateMetafileFromWmfFile(file.param().abi(), wmfplaceablefileheader, core::mem::transmute(metafile)) } + unsafe { GdipCreateMetafileFromWmfFile(file.param().abi(), wmfplaceablefileheader, metafile as _) } } #[inline] pub unsafe fn GdipCreatePath(brushmode: FillMode, path: *mut *mut GpPath) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreatePath(brushmode : FillMode, path : *mut *mut GpPath) -> Status); - unsafe { GdipCreatePath(brushmode, core::mem::transmute(path)) } + unsafe { GdipCreatePath(brushmode, path as _) } } #[inline] pub unsafe fn GdipCreatePath2(param0: *const PointF, param1: *const u8, param2: i32, param3: FillMode, path: *mut *mut GpPath) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreatePath2(param0 : *const PointF, param1 : *const u8, param2 : i32, param3 : FillMode, path : *mut *mut GpPath) -> Status); - unsafe { GdipCreatePath2(param0, param1, param2, param3, core::mem::transmute(path)) } + unsafe { GdipCreatePath2(param0, param1, param2, param3, path as _) } } #[inline] pub unsafe fn GdipCreatePath2I(param0: *const Point, param1: *const u8, param2: i32, param3: FillMode, path: *mut *mut GpPath) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreatePath2I(param0 : *const Point, param1 : *const u8, param2 : i32, param3 : FillMode, path : *mut *mut GpPath) -> Status); - unsafe { GdipCreatePath2I(param0, param1, param2, param3, core::mem::transmute(path)) } + unsafe { GdipCreatePath2I(param0, param1, param2, param3, path as _) } } #[inline] pub unsafe fn GdipCreatePathGradient(points: *const PointF, count: i32, wrapmode: WrapMode, polygradient: *mut *mut GpPathGradient) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreatePathGradient(points : *const PointF, count : i32, wrapmode : WrapMode, polygradient : *mut *mut GpPathGradient) -> Status); - unsafe { GdipCreatePathGradient(points, count, wrapmode, core::mem::transmute(polygradient)) } + unsafe { GdipCreatePathGradient(points, count, wrapmode, polygradient as _) } } #[inline] pub unsafe fn GdipCreatePathGradientFromPath(path: *const GpPath, polygradient: *mut *mut GpPathGradient) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreatePathGradientFromPath(path : *const GpPath, polygradient : *mut *mut GpPathGradient) -> Status); - unsafe { GdipCreatePathGradientFromPath(path, core::mem::transmute(polygradient)) } + unsafe { GdipCreatePathGradientFromPath(path, polygradient as _) } } #[inline] pub unsafe fn GdipCreatePathGradientI(points: *const Point, count: i32, wrapmode: WrapMode, polygradient: *mut *mut GpPathGradient) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreatePathGradientI(points : *const Point, count : i32, wrapmode : WrapMode, polygradient : *mut *mut GpPathGradient) -> Status); - unsafe { GdipCreatePathGradientI(points, count, wrapmode, core::mem::transmute(polygradient)) } + unsafe { GdipCreatePathGradientI(points, count, wrapmode, polygradient as _) } } #[inline] pub unsafe fn GdipCreatePathIter(iterator: *mut *mut GpPathIterator, path: *mut GpPath) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreatePathIter(iterator : *mut *mut GpPathIterator, path : *mut GpPath) -> Status); - unsafe { GdipCreatePathIter(core::mem::transmute(iterator), core::mem::transmute(path)) } + unsafe { GdipCreatePathIter(iterator as _, path as _) } } #[inline] pub unsafe fn GdipCreatePen1(color: u32, width: f32, unit: Unit, pen: *mut *mut GpPen) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreatePen1(color : u32, width : f32, unit : Unit, pen : *mut *mut GpPen) -> Status); - unsafe { GdipCreatePen1(color, width, unit, core::mem::transmute(pen)) } + unsafe { GdipCreatePen1(color, width, unit, pen as _) } } #[inline] pub unsafe fn GdipCreatePen2(brush: *mut GpBrush, width: f32, unit: Unit, pen: *mut *mut GpPen) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreatePen2(brush : *mut GpBrush, width : f32, unit : Unit, pen : *mut *mut GpPen) -> Status); - unsafe { GdipCreatePen2(core::mem::transmute(brush), width, unit, core::mem::transmute(pen)) } + unsafe { GdipCreatePen2(brush as _, width, unit, pen as _) } } #[inline] pub unsafe fn GdipCreateRegion(region: *mut *mut GpRegion) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateRegion(region : *mut *mut GpRegion) -> Status); - unsafe { GdipCreateRegion(core::mem::transmute(region)) } + unsafe { GdipCreateRegion(region as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { GdipCreateRegionHrgn(hrgn, core::mem::transmute(region)) } + unsafe { GdipCreateRegionHrgn(hrgn, region as _) } } #[inline] pub unsafe fn GdipCreateRegionPath(path: *mut GpPath, region: *mut *mut GpRegion) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateRegionPath(path : *mut GpPath, region : *mut *mut GpRegion) -> Status); - unsafe { GdipCreateRegionPath(core::mem::transmute(path), core::mem::transmute(region)) } + unsafe { GdipCreateRegionPath(path as _, region as _) } } #[inline] pub unsafe fn GdipCreateRegionRect(rect: *const RectF, region: *mut *mut GpRegion) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateRegionRect(rect : *const RectF, region : *mut *mut GpRegion) -> Status); - unsafe { GdipCreateRegionRect(rect, core::mem::transmute(region)) } + unsafe { GdipCreateRegionRect(rect, region as _) } } #[inline] pub unsafe fn GdipCreateRegionRectI(rect: *const Rect, region: *mut *mut GpRegion) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateRegionRectI(rect : *const Rect, region : *mut *mut GpRegion) -> Status); - unsafe { GdipCreateRegionRectI(rect, core::mem::transmute(region)) } + unsafe { GdipCreateRegionRectI(rect, region as _) } } #[inline] pub unsafe fn GdipCreateRegionRgnData(regiondata: *const u8, size: i32, region: *mut *mut GpRegion) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateRegionRgnData(regiondata : *const u8, size : i32, region : *mut *mut GpRegion) -> Status); - unsafe { GdipCreateRegionRgnData(regiondata, size, core::mem::transmute(region)) } + unsafe { GdipCreateRegionRgnData(regiondata, size, region as _) } } #[inline] pub unsafe fn GdipCreateSolidFill(color: u32, brush: *mut *mut GpSolidFill) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateSolidFill(color : u32, brush : *mut *mut GpSolidFill) -> Status); - unsafe { GdipCreateSolidFill(color, core::mem::transmute(brush)) } + unsafe { GdipCreateSolidFill(color, brush as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -731,342 +731,342 @@ where #[inline] pub unsafe fn GdipCreateStringFormat(formatattributes: i32, language: u16, format: *mut *mut GpStringFormat) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateStringFormat(formatattributes : i32, language : u16, format : *mut *mut GpStringFormat) -> Status); - unsafe { GdipCreateStringFormat(formatattributes, language, core::mem::transmute(format)) } + unsafe { GdipCreateStringFormat(formatattributes, language, format as _) } } #[inline] pub unsafe fn GdipCreateTexture(image: *mut GpImage, wrapmode: WrapMode, texture: *mut *mut GpTexture) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateTexture(image : *mut GpImage, wrapmode : WrapMode, texture : *mut *mut GpTexture) -> Status); - unsafe { GdipCreateTexture(core::mem::transmute(image), wrapmode, core::mem::transmute(texture)) } + unsafe { GdipCreateTexture(image as _, wrapmode, texture as _) } } #[inline] pub unsafe fn GdipCreateTexture2(image: *mut GpImage, wrapmode: WrapMode, x: f32, y: f32, width: f32, height: f32, texture: *mut *mut GpTexture) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateTexture2(image : *mut GpImage, wrapmode : WrapMode, x : f32, y : f32, width : f32, height : f32, texture : *mut *mut GpTexture) -> Status); - unsafe { GdipCreateTexture2(core::mem::transmute(image), wrapmode, x, y, width, height, core::mem::transmute(texture)) } + unsafe { GdipCreateTexture2(image as _, wrapmode, x, y, width, height, texture as _) } } #[inline] pub unsafe fn GdipCreateTexture2I(image: *mut GpImage, wrapmode: WrapMode, x: i32, y: i32, width: i32, height: i32, texture: *mut *mut GpTexture) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateTexture2I(image : *mut GpImage, wrapmode : WrapMode, x : i32, y : i32, width : i32, height : i32, texture : *mut *mut GpTexture) -> Status); - unsafe { GdipCreateTexture2I(core::mem::transmute(image), wrapmode, x, y, width, height, core::mem::transmute(texture)) } + unsafe { GdipCreateTexture2I(image as _, wrapmode, x, y, width, height, texture as _) } } #[inline] pub unsafe fn GdipCreateTextureIA(image: *mut GpImage, imageattributes: *const GpImageAttributes, x: f32, y: f32, width: f32, height: f32, texture: *mut *mut GpTexture) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateTextureIA(image : *mut GpImage, imageattributes : *const GpImageAttributes, x : f32, y : f32, width : f32, height : f32, texture : *mut *mut GpTexture) -> Status); - unsafe { GdipCreateTextureIA(core::mem::transmute(image), imageattributes, x, y, width, height, core::mem::transmute(texture)) } + unsafe { GdipCreateTextureIA(image as _, imageattributes, x, y, width, height, texture as _) } } #[inline] pub unsafe fn GdipCreateTextureIAI(image: *mut GpImage, imageattributes: *const GpImageAttributes, x: i32, y: i32, width: i32, height: i32, texture: *mut *mut GpTexture) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateTextureIAI(image : *mut GpImage, imageattributes : *const GpImageAttributes, x : i32, y : i32, width : i32, height : i32, texture : *mut *mut GpTexture) -> Status); - unsafe { GdipCreateTextureIAI(core::mem::transmute(image), imageattributes, x, y, width, height, core::mem::transmute(texture)) } + unsafe { GdipCreateTextureIAI(image as _, imageattributes, x, y, width, height, texture as _) } } #[inline] pub unsafe fn GdipDeleteBrush(brush: *mut GpBrush) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDeleteBrush(brush : *mut GpBrush) -> Status); - unsafe { GdipDeleteBrush(core::mem::transmute(brush)) } + unsafe { GdipDeleteBrush(brush as _) } } #[inline] pub unsafe fn GdipDeleteCachedBitmap(cachedbitmap: *mut GpCachedBitmap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDeleteCachedBitmap(cachedbitmap : *mut GpCachedBitmap) -> Status); - unsafe { GdipDeleteCachedBitmap(core::mem::transmute(cachedbitmap)) } + unsafe { GdipDeleteCachedBitmap(cachedbitmap as _) } } #[inline] pub unsafe fn GdipDeleteCustomLineCap(customcap: *mut GpCustomLineCap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDeleteCustomLineCap(customcap : *mut GpCustomLineCap) -> Status); - unsafe { GdipDeleteCustomLineCap(core::mem::transmute(customcap)) } + unsafe { GdipDeleteCustomLineCap(customcap as _) } } #[inline] pub unsafe fn GdipDeleteEffect(effect: *mut CGpEffect) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDeleteEffect(effect : *mut CGpEffect) -> Status); - unsafe { GdipDeleteEffect(core::mem::transmute(effect)) } + unsafe { GdipDeleteEffect(effect as _) } } #[inline] pub unsafe fn GdipDeleteFont(font: *mut GpFont) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDeleteFont(font : *mut GpFont) -> Status); - unsafe { GdipDeleteFont(core::mem::transmute(font)) } + unsafe { GdipDeleteFont(font as _) } } #[inline] pub unsafe fn GdipDeleteFontFamily(fontfamily: *mut GpFontFamily) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDeleteFontFamily(fontfamily : *mut GpFontFamily) -> Status); - unsafe { GdipDeleteFontFamily(core::mem::transmute(fontfamily)) } + unsafe { GdipDeleteFontFamily(fontfamily as _) } } #[inline] pub unsafe fn GdipDeleteGraphics(graphics: *mut GpGraphics) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDeleteGraphics(graphics : *mut GpGraphics) -> Status); - unsafe { GdipDeleteGraphics(core::mem::transmute(graphics)) } + unsafe { GdipDeleteGraphics(graphics as _) } } #[inline] pub unsafe fn GdipDeleteMatrix(matrix: *mut Matrix) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDeleteMatrix(matrix : *mut Matrix) -> Status); - unsafe { GdipDeleteMatrix(core::mem::transmute(matrix)) } + unsafe { GdipDeleteMatrix(matrix as _) } } #[inline] pub unsafe fn GdipDeletePath(path: *mut GpPath) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDeletePath(path : *mut GpPath) -> Status); - unsafe { GdipDeletePath(core::mem::transmute(path)) } + unsafe { GdipDeletePath(path as _) } } #[inline] pub unsafe fn GdipDeletePathIter(iterator: *mut GpPathIterator) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDeletePathIter(iterator : *mut GpPathIterator) -> Status); - unsafe { GdipDeletePathIter(core::mem::transmute(iterator)) } + unsafe { GdipDeletePathIter(iterator as _) } } #[inline] pub unsafe fn GdipDeletePen(pen: *mut GpPen) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDeletePen(pen : *mut GpPen) -> Status); - unsafe { GdipDeletePen(core::mem::transmute(pen)) } + unsafe { GdipDeletePen(pen as _) } } #[inline] pub unsafe fn GdipDeletePrivateFontCollection(fontcollection: *mut *mut GpFontCollection) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDeletePrivateFontCollection(fontcollection : *mut *mut GpFontCollection) -> Status); - unsafe { GdipDeletePrivateFontCollection(core::mem::transmute(fontcollection)) } + unsafe { GdipDeletePrivateFontCollection(fontcollection as _) } } #[inline] pub unsafe fn GdipDeleteRegion(region: *mut GpRegion) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDeleteRegion(region : *mut GpRegion) -> Status); - unsafe { GdipDeleteRegion(core::mem::transmute(region)) } + unsafe { GdipDeleteRegion(region as _) } } #[inline] pub unsafe fn GdipDeleteStringFormat(format: *mut GpStringFormat) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDeleteStringFormat(format : *mut GpStringFormat) -> Status); - unsafe { GdipDeleteStringFormat(core::mem::transmute(format)) } + unsafe { GdipDeleteStringFormat(format as _) } } #[inline] pub unsafe fn GdipDisposeImage(image: *mut GpImage) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDisposeImage(image : *mut GpImage) -> Status); - unsafe { GdipDisposeImage(core::mem::transmute(image)) } + unsafe { GdipDisposeImage(image as _) } } #[inline] pub unsafe fn GdipDisposeImageAttributes(imageattr: *mut GpImageAttributes) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDisposeImageAttributes(imageattr : *mut GpImageAttributes) -> Status); - unsafe { GdipDisposeImageAttributes(core::mem::transmute(imageattr)) } + unsafe { GdipDisposeImageAttributes(imageattr as _) } } #[inline] pub unsafe fn GdipDrawArc(graphics: *mut GpGraphics, pen: *mut GpPen, x: f32, y: f32, width: f32, height: f32, startangle: f32, sweepangle: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawArc(graphics : *mut GpGraphics, pen : *mut GpPen, x : f32, y : f32, width : f32, height : f32, startangle : f32, sweepangle : f32) -> Status); - unsafe { GdipDrawArc(core::mem::transmute(graphics), core::mem::transmute(pen), x, y, width, height, startangle, sweepangle) } + unsafe { GdipDrawArc(graphics as _, pen as _, x, y, width, height, startangle, sweepangle) } } #[inline] pub unsafe fn GdipDrawArcI(graphics: *mut GpGraphics, pen: *mut GpPen, x: i32, y: i32, width: i32, height: i32, startangle: f32, sweepangle: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawArcI(graphics : *mut GpGraphics, pen : *mut GpPen, x : i32, y : i32, width : i32, height : i32, startangle : f32, sweepangle : f32) -> Status); - unsafe { GdipDrawArcI(core::mem::transmute(graphics), core::mem::transmute(pen), x, y, width, height, startangle, sweepangle) } + unsafe { GdipDrawArcI(graphics as _, pen as _, x, y, width, height, startangle, sweepangle) } } #[inline] pub unsafe fn GdipDrawBezier(graphics: *mut GpGraphics, pen: *mut GpPen, x1: f32, y1: f32, x2: f32, y2: f32, x3: f32, y3: f32, x4: f32, y4: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawBezier(graphics : *mut GpGraphics, pen : *mut GpPen, x1 : f32, y1 : f32, x2 : f32, y2 : f32, x3 : f32, y3 : f32, x4 : f32, y4 : f32) -> Status); - unsafe { GdipDrawBezier(core::mem::transmute(graphics), core::mem::transmute(pen), x1, y1, x2, y2, x3, y3, x4, y4) } + unsafe { GdipDrawBezier(graphics as _, pen as _, x1, y1, x2, y2, x3, y3, x4, y4) } } #[inline] pub unsafe fn GdipDrawBezierI(graphics: *mut GpGraphics, pen: *mut GpPen, x1: i32, y1: i32, x2: i32, y2: i32, x3: i32, y3: i32, x4: i32, y4: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawBezierI(graphics : *mut GpGraphics, pen : *mut GpPen, x1 : i32, y1 : i32, x2 : i32, y2 : i32, x3 : i32, y3 : i32, x4 : i32, y4 : i32) -> Status); - unsafe { GdipDrawBezierI(core::mem::transmute(graphics), core::mem::transmute(pen), x1, y1, x2, y2, x3, y3, x4, y4) } + unsafe { GdipDrawBezierI(graphics as _, pen as _, x1, y1, x2, y2, x3, y3, x4, y4) } } #[inline] pub unsafe fn GdipDrawBeziers(graphics: *mut GpGraphics, pen: *mut GpPen, points: *const PointF, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawBeziers(graphics : *mut GpGraphics, pen : *mut GpPen, points : *const PointF, count : i32) -> Status); - unsafe { GdipDrawBeziers(core::mem::transmute(graphics), core::mem::transmute(pen), points, count) } + unsafe { GdipDrawBeziers(graphics as _, pen as _, points, count) } } #[inline] pub unsafe fn GdipDrawBeziersI(graphics: *mut GpGraphics, pen: *mut GpPen, points: *const Point, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawBeziersI(graphics : *mut GpGraphics, pen : *mut GpPen, points : *const Point, count : i32) -> Status); - unsafe { GdipDrawBeziersI(core::mem::transmute(graphics), core::mem::transmute(pen), points, count) } + unsafe { GdipDrawBeziersI(graphics as _, pen as _, points, count) } } #[inline] pub unsafe fn GdipDrawCachedBitmap(graphics: *mut GpGraphics, cachedbitmap: *mut GpCachedBitmap, x: i32, y: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawCachedBitmap(graphics : *mut GpGraphics, cachedbitmap : *mut GpCachedBitmap, x : i32, y : i32) -> Status); - unsafe { GdipDrawCachedBitmap(core::mem::transmute(graphics), core::mem::transmute(cachedbitmap), x, y) } + unsafe { GdipDrawCachedBitmap(graphics as _, cachedbitmap as _, x, y) } } #[inline] pub unsafe fn GdipDrawClosedCurve(graphics: *mut GpGraphics, pen: *mut GpPen, points: *const PointF, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawClosedCurve(graphics : *mut GpGraphics, pen : *mut GpPen, points : *const PointF, count : i32) -> Status); - unsafe { GdipDrawClosedCurve(core::mem::transmute(graphics), core::mem::transmute(pen), points, count) } + unsafe { GdipDrawClosedCurve(graphics as _, pen as _, points, count) } } #[inline] pub unsafe fn GdipDrawClosedCurve2(graphics: *mut GpGraphics, pen: *mut GpPen, points: *const PointF, count: i32, tension: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawClosedCurve2(graphics : *mut GpGraphics, pen : *mut GpPen, points : *const PointF, count : i32, tension : f32) -> Status); - unsafe { GdipDrawClosedCurve2(core::mem::transmute(graphics), core::mem::transmute(pen), points, count, tension) } + unsafe { GdipDrawClosedCurve2(graphics as _, pen as _, points, count, tension) } } #[inline] pub unsafe fn GdipDrawClosedCurve2I(graphics: *mut GpGraphics, pen: *mut GpPen, points: *const Point, count: i32, tension: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawClosedCurve2I(graphics : *mut GpGraphics, pen : *mut GpPen, points : *const Point, count : i32, tension : f32) -> Status); - unsafe { GdipDrawClosedCurve2I(core::mem::transmute(graphics), core::mem::transmute(pen), points, count, tension) } + unsafe { GdipDrawClosedCurve2I(graphics as _, pen as _, points, count, tension) } } #[inline] pub unsafe fn GdipDrawClosedCurveI(graphics: *mut GpGraphics, pen: *mut GpPen, points: *const Point, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawClosedCurveI(graphics : *mut GpGraphics, pen : *mut GpPen, points : *const Point, count : i32) -> Status); - unsafe { GdipDrawClosedCurveI(core::mem::transmute(graphics), core::mem::transmute(pen), points, count) } + unsafe { GdipDrawClosedCurveI(graphics as _, pen as _, points, count) } } #[inline] pub unsafe fn GdipDrawCurve(graphics: *mut GpGraphics, pen: *mut GpPen, points: *const PointF, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawCurve(graphics : *mut GpGraphics, pen : *mut GpPen, points : *const PointF, count : i32) -> Status); - unsafe { GdipDrawCurve(core::mem::transmute(graphics), core::mem::transmute(pen), points, count) } + unsafe { GdipDrawCurve(graphics as _, pen as _, points, count) } } #[inline] pub unsafe fn GdipDrawCurve2(graphics: *mut GpGraphics, pen: *mut GpPen, points: *const PointF, count: i32, tension: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawCurve2(graphics : *mut GpGraphics, pen : *mut GpPen, points : *const PointF, count : i32, tension : f32) -> Status); - unsafe { GdipDrawCurve2(core::mem::transmute(graphics), core::mem::transmute(pen), points, count, tension) } + unsafe { GdipDrawCurve2(graphics as _, pen as _, points, count, tension) } } #[inline] pub unsafe fn GdipDrawCurve2I(graphics: *mut GpGraphics, pen: *mut GpPen, points: *const Point, count: i32, tension: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawCurve2I(graphics : *mut GpGraphics, pen : *mut GpPen, points : *const Point, count : i32, tension : f32) -> Status); - unsafe { GdipDrawCurve2I(core::mem::transmute(graphics), core::mem::transmute(pen), points, count, tension) } + unsafe { GdipDrawCurve2I(graphics as _, pen as _, points, count, tension) } } #[inline] pub unsafe fn GdipDrawCurve3(graphics: *mut GpGraphics, pen: *mut GpPen, points: *const PointF, count: i32, offset: i32, numberofsegments: i32, tension: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawCurve3(graphics : *mut GpGraphics, pen : *mut GpPen, points : *const PointF, count : i32, offset : i32, numberofsegments : i32, tension : f32) -> Status); - unsafe { GdipDrawCurve3(core::mem::transmute(graphics), core::mem::transmute(pen), points, count, offset, numberofsegments, tension) } + unsafe { GdipDrawCurve3(graphics as _, pen as _, points, count, offset, numberofsegments, tension) } } #[inline] pub unsafe fn GdipDrawCurve3I(graphics: *mut GpGraphics, pen: *mut GpPen, points: *const Point, count: i32, offset: i32, numberofsegments: i32, tension: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawCurve3I(graphics : *mut GpGraphics, pen : *mut GpPen, points : *const Point, count : i32, offset : i32, numberofsegments : i32, tension : f32) -> Status); - unsafe { GdipDrawCurve3I(core::mem::transmute(graphics), core::mem::transmute(pen), points, count, offset, numberofsegments, tension) } + unsafe { GdipDrawCurve3I(graphics as _, pen as _, points, count, offset, numberofsegments, tension) } } #[inline] pub unsafe fn GdipDrawCurveI(graphics: *mut GpGraphics, pen: *mut GpPen, points: *const Point, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawCurveI(graphics : *mut GpGraphics, pen : *mut GpPen, points : *const Point, count : i32) -> Status); - unsafe { GdipDrawCurveI(core::mem::transmute(graphics), core::mem::transmute(pen), points, count) } + unsafe { GdipDrawCurveI(graphics as _, pen as _, points, count) } } #[inline] pub unsafe fn GdipDrawDriverString(graphics: *mut GpGraphics, text: *const u16, length: i32, font: *const GpFont, brush: *const GpBrush, positions: *const PointF, flags: i32, matrix: *const Matrix) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawDriverString(graphics : *mut GpGraphics, text : *const u16, length : i32, font : *const GpFont, brush : *const GpBrush, positions : *const PointF, flags : i32, matrix : *const Matrix) -> Status); - unsafe { GdipDrawDriverString(core::mem::transmute(graphics), text, length, font, brush, positions, flags, matrix) } + unsafe { GdipDrawDriverString(graphics as _, text, length, font, brush, positions, flags, matrix) } } #[inline] pub unsafe fn GdipDrawEllipse(graphics: *mut GpGraphics, pen: *mut GpPen, x: f32, y: f32, width: f32, height: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawEllipse(graphics : *mut GpGraphics, pen : *mut GpPen, x : f32, y : f32, width : f32, height : f32) -> Status); - unsafe { GdipDrawEllipse(core::mem::transmute(graphics), core::mem::transmute(pen), x, y, width, height) } + unsafe { GdipDrawEllipse(graphics as _, pen as _, x, y, width, height) } } #[inline] pub unsafe fn GdipDrawEllipseI(graphics: *mut GpGraphics, pen: *mut GpPen, x: i32, y: i32, width: i32, height: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawEllipseI(graphics : *mut GpGraphics, pen : *mut GpPen, x : i32, y : i32, width : i32, height : i32) -> Status); - unsafe { GdipDrawEllipseI(core::mem::transmute(graphics), core::mem::transmute(pen), x, y, width, height) } + unsafe { GdipDrawEllipseI(graphics as _, pen as _, x, y, width, height) } } #[inline] pub unsafe fn GdipDrawImage(graphics: *mut GpGraphics, image: *mut GpImage, x: f32, y: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawImage(graphics : *mut GpGraphics, image : *mut GpImage, x : f32, y : f32) -> Status); - unsafe { GdipDrawImage(core::mem::transmute(graphics), core::mem::transmute(image), x, y) } + unsafe { GdipDrawImage(graphics as _, image as _, x, y) } } #[inline] pub unsafe fn GdipDrawImageFX(graphics: *mut GpGraphics, image: *mut GpImage, source: *mut RectF, xform: *mut Matrix, effect: *mut CGpEffect, imageattributes: *mut GpImageAttributes, srcunit: Unit) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawImageFX(graphics : *mut GpGraphics, image : *mut GpImage, source : *mut RectF, xform : *mut Matrix, effect : *mut CGpEffect, imageattributes : *mut GpImageAttributes, srcunit : Unit) -> Status); - unsafe { GdipDrawImageFX(core::mem::transmute(graphics), core::mem::transmute(image), core::mem::transmute(source), core::mem::transmute(xform), core::mem::transmute(effect), core::mem::transmute(imageattributes), srcunit) } + unsafe { GdipDrawImageFX(graphics as _, image as _, source as _, xform as _, effect as _, imageattributes as _, srcunit) } } #[inline] pub unsafe fn GdipDrawImageI(graphics: *mut GpGraphics, image: *mut GpImage, x: i32, y: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawImageI(graphics : *mut GpGraphics, image : *mut GpImage, x : i32, y : i32) -> Status); - unsafe { GdipDrawImageI(core::mem::transmute(graphics), core::mem::transmute(image), x, y) } + unsafe { GdipDrawImageI(graphics as _, image as _, x, y) } } #[inline] pub unsafe fn GdipDrawImagePointRect(graphics: *mut GpGraphics, image: *mut GpImage, x: f32, y: f32, srcx: f32, srcy: f32, srcwidth: f32, srcheight: f32, srcunit: Unit) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawImagePointRect(graphics : *mut GpGraphics, image : *mut GpImage, x : f32, y : f32, srcx : f32, srcy : f32, srcwidth : f32, srcheight : f32, srcunit : Unit) -> Status); - unsafe { GdipDrawImagePointRect(core::mem::transmute(graphics), core::mem::transmute(image), x, y, srcx, srcy, srcwidth, srcheight, srcunit) } + unsafe { GdipDrawImagePointRect(graphics as _, image as _, x, y, srcx, srcy, srcwidth, srcheight, srcunit) } } #[inline] pub unsafe fn GdipDrawImagePointRectI(graphics: *mut GpGraphics, image: *mut GpImage, x: i32, y: i32, srcx: i32, srcy: i32, srcwidth: i32, srcheight: i32, srcunit: Unit) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawImagePointRectI(graphics : *mut GpGraphics, image : *mut GpImage, x : i32, y : i32, srcx : i32, srcy : i32, srcwidth : i32, srcheight : i32, srcunit : Unit) -> Status); - unsafe { GdipDrawImagePointRectI(core::mem::transmute(graphics), core::mem::transmute(image), x, y, srcx, srcy, srcwidth, srcheight, srcunit) } + unsafe { GdipDrawImagePointRectI(graphics as _, image as _, x, y, srcx, srcy, srcwidth, srcheight, srcunit) } } #[inline] pub unsafe fn GdipDrawImagePoints(graphics: *mut GpGraphics, image: *mut GpImage, dstpoints: *const PointF, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawImagePoints(graphics : *mut GpGraphics, image : *mut GpImage, dstpoints : *const PointF, count : i32) -> Status); - unsafe { GdipDrawImagePoints(core::mem::transmute(graphics), core::mem::transmute(image), dstpoints, count) } + unsafe { GdipDrawImagePoints(graphics as _, image as _, dstpoints, count) } } #[inline] pub unsafe fn GdipDrawImagePointsI(graphics: *mut GpGraphics, image: *mut GpImage, dstpoints: *const Point, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawImagePointsI(graphics : *mut GpGraphics, image : *mut GpImage, dstpoints : *const Point, count : i32) -> Status); - unsafe { GdipDrawImagePointsI(core::mem::transmute(graphics), core::mem::transmute(image), dstpoints, count) } + unsafe { GdipDrawImagePointsI(graphics as _, image as _, dstpoints, count) } } #[inline] pub unsafe fn GdipDrawImagePointsRect(graphics: *mut GpGraphics, image: *mut GpImage, points: *const PointF, count: i32, srcx: f32, srcy: f32, srcwidth: f32, srcheight: f32, srcunit: Unit, imageattributes: *const GpImageAttributes, callback: isize, callbackdata: *mut core::ffi::c_void) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawImagePointsRect(graphics : *mut GpGraphics, image : *mut GpImage, points : *const PointF, count : i32, srcx : f32, srcy : f32, srcwidth : f32, srcheight : f32, srcunit : Unit, imageattributes : *const GpImageAttributes, callback : isize, callbackdata : *mut core::ffi::c_void) -> Status); - unsafe { GdipDrawImagePointsRect(core::mem::transmute(graphics), core::mem::transmute(image), points, count, srcx, srcy, srcwidth, srcheight, srcunit, imageattributes, callback, core::mem::transmute(callbackdata)) } + unsafe { GdipDrawImagePointsRect(graphics as _, image as _, points, count, srcx, srcy, srcwidth, srcheight, srcunit, imageattributes, callback, callbackdata as _) } } #[inline] pub unsafe fn GdipDrawImagePointsRectI(graphics: *mut GpGraphics, image: *mut GpImage, points: *const Point, count: i32, srcx: i32, srcy: i32, srcwidth: i32, srcheight: i32, srcunit: Unit, imageattributes: *const GpImageAttributes, callback: isize, callbackdata: *mut core::ffi::c_void) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawImagePointsRectI(graphics : *mut GpGraphics, image : *mut GpImage, points : *const Point, count : i32, srcx : i32, srcy : i32, srcwidth : i32, srcheight : i32, srcunit : Unit, imageattributes : *const GpImageAttributes, callback : isize, callbackdata : *mut core::ffi::c_void) -> Status); - unsafe { GdipDrawImagePointsRectI(core::mem::transmute(graphics), core::mem::transmute(image), points, count, srcx, srcy, srcwidth, srcheight, srcunit, imageattributes, callback, core::mem::transmute(callbackdata)) } + unsafe { GdipDrawImagePointsRectI(graphics as _, image as _, points, count, srcx, srcy, srcwidth, srcheight, srcunit, imageattributes, callback, callbackdata as _) } } #[inline] pub unsafe fn GdipDrawImageRect(graphics: *mut GpGraphics, image: *mut GpImage, x: f32, y: f32, width: f32, height: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawImageRect(graphics : *mut GpGraphics, image : *mut GpImage, x : f32, y : f32, width : f32, height : f32) -> Status); - unsafe { GdipDrawImageRect(core::mem::transmute(graphics), core::mem::transmute(image), x, y, width, height) } + unsafe { GdipDrawImageRect(graphics as _, image as _, x, y, width, height) } } #[inline] pub unsafe fn GdipDrawImageRectI(graphics: *mut GpGraphics, image: *mut GpImage, x: i32, y: i32, width: i32, height: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawImageRectI(graphics : *mut GpGraphics, image : *mut GpImage, x : i32, y : i32, width : i32, height : i32) -> Status); - unsafe { GdipDrawImageRectI(core::mem::transmute(graphics), core::mem::transmute(image), x, y, width, height) } + unsafe { GdipDrawImageRectI(graphics as _, image as _, x, y, width, height) } } #[inline] pub unsafe fn GdipDrawImageRectRect(graphics: *mut GpGraphics, image: *mut GpImage, dstx: f32, dsty: f32, dstwidth: f32, dstheight: f32, srcx: f32, srcy: f32, srcwidth: f32, srcheight: f32, srcunit: Unit, imageattributes: *const GpImageAttributes, callback: isize, callbackdata: *mut core::ffi::c_void) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawImageRectRect(graphics : *mut GpGraphics, image : *mut GpImage, dstx : f32, dsty : f32, dstwidth : f32, dstheight : f32, srcx : f32, srcy : f32, srcwidth : f32, srcheight : f32, srcunit : Unit, imageattributes : *const GpImageAttributes, callback : isize, callbackdata : *mut core::ffi::c_void) -> Status); - unsafe { GdipDrawImageRectRect(core::mem::transmute(graphics), core::mem::transmute(image), dstx, dsty, dstwidth, dstheight, srcx, srcy, srcwidth, srcheight, srcunit, imageattributes, callback, core::mem::transmute(callbackdata)) } + unsafe { GdipDrawImageRectRect(graphics as _, image as _, dstx, dsty, dstwidth, dstheight, srcx, srcy, srcwidth, srcheight, srcunit, imageattributes, callback, callbackdata as _) } } #[inline] pub unsafe fn GdipDrawImageRectRectI(graphics: *mut GpGraphics, image: *mut GpImage, dstx: i32, dsty: i32, dstwidth: i32, dstheight: i32, srcx: i32, srcy: i32, srcwidth: i32, srcheight: i32, srcunit: Unit, imageattributes: *const GpImageAttributes, callback: isize, callbackdata: *mut core::ffi::c_void) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawImageRectRectI(graphics : *mut GpGraphics, image : *mut GpImage, dstx : i32, dsty : i32, dstwidth : i32, dstheight : i32, srcx : i32, srcy : i32, srcwidth : i32, srcheight : i32, srcunit : Unit, imageattributes : *const GpImageAttributes, callback : isize, callbackdata : *mut core::ffi::c_void) -> Status); - unsafe { GdipDrawImageRectRectI(core::mem::transmute(graphics), core::mem::transmute(image), dstx, dsty, dstwidth, dstheight, srcx, srcy, srcwidth, srcheight, srcunit, imageattributes, callback, core::mem::transmute(callbackdata)) } + unsafe { GdipDrawImageRectRectI(graphics as _, image as _, dstx, dsty, dstwidth, dstheight, srcx, srcy, srcwidth, srcheight, srcunit, imageattributes, callback, callbackdata as _) } } #[inline] pub unsafe fn GdipDrawLine(graphics: *mut GpGraphics, pen: *mut GpPen, x1: f32, y1: f32, x2: f32, y2: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawLine(graphics : *mut GpGraphics, pen : *mut GpPen, x1 : f32, y1 : f32, x2 : f32, y2 : f32) -> Status); - unsafe { GdipDrawLine(core::mem::transmute(graphics), core::mem::transmute(pen), x1, y1, x2, y2) } + unsafe { GdipDrawLine(graphics as _, pen as _, x1, y1, x2, y2) } } #[inline] pub unsafe fn GdipDrawLineI(graphics: *mut GpGraphics, pen: *mut GpPen, x1: i32, y1: i32, x2: i32, y2: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawLineI(graphics : *mut GpGraphics, pen : *mut GpPen, x1 : i32, y1 : i32, x2 : i32, y2 : i32) -> Status); - unsafe { GdipDrawLineI(core::mem::transmute(graphics), core::mem::transmute(pen), x1, y1, x2, y2) } + unsafe { GdipDrawLineI(graphics as _, pen as _, x1, y1, x2, y2) } } #[inline] pub unsafe fn GdipDrawLines(graphics: *mut GpGraphics, pen: *mut GpPen, points: *const PointF, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawLines(graphics : *mut GpGraphics, pen : *mut GpPen, points : *const PointF, count : i32) -> Status); - unsafe { GdipDrawLines(core::mem::transmute(graphics), core::mem::transmute(pen), points, count) } + unsafe { GdipDrawLines(graphics as _, pen as _, points, count) } } #[inline] pub unsafe fn GdipDrawLinesI(graphics: *mut GpGraphics, pen: *mut GpPen, points: *const Point, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawLinesI(graphics : *mut GpGraphics, pen : *mut GpPen, points : *const Point, count : i32) -> Status); - unsafe { GdipDrawLinesI(core::mem::transmute(graphics), core::mem::transmute(pen), points, count) } + unsafe { GdipDrawLinesI(graphics as _, pen as _, points, count) } } #[inline] pub unsafe fn GdipDrawPath(graphics: *mut GpGraphics, pen: *mut GpPen, path: *mut GpPath) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawPath(graphics : *mut GpGraphics, pen : *mut GpPen, path : *mut GpPath) -> Status); - unsafe { GdipDrawPath(core::mem::transmute(graphics), core::mem::transmute(pen), core::mem::transmute(path)) } + unsafe { GdipDrawPath(graphics as _, pen as _, path as _) } } #[inline] pub unsafe fn GdipDrawPie(graphics: *mut GpGraphics, pen: *mut GpPen, x: f32, y: f32, width: f32, height: f32, startangle: f32, sweepangle: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawPie(graphics : *mut GpGraphics, pen : *mut GpPen, x : f32, y : f32, width : f32, height : f32, startangle : f32, sweepangle : f32) -> Status); - unsafe { GdipDrawPie(core::mem::transmute(graphics), core::mem::transmute(pen), x, y, width, height, startangle, sweepangle) } + unsafe { GdipDrawPie(graphics as _, pen as _, x, y, width, height, startangle, sweepangle) } } #[inline] pub unsafe fn GdipDrawPieI(graphics: *mut GpGraphics, pen: *mut GpPen, x: i32, y: i32, width: i32, height: i32, startangle: f32, sweepangle: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawPieI(graphics : *mut GpGraphics, pen : *mut GpPen, x : i32, y : i32, width : i32, height : i32, startangle : f32, sweepangle : f32) -> Status); - unsafe { GdipDrawPieI(core::mem::transmute(graphics), core::mem::transmute(pen), x, y, width, height, startangle, sweepangle) } + unsafe { GdipDrawPieI(graphics as _, pen as _, x, y, width, height, startangle, sweepangle) } } #[inline] pub unsafe fn GdipDrawPolygon(graphics: *mut GpGraphics, pen: *mut GpPen, points: *const PointF, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawPolygon(graphics : *mut GpGraphics, pen : *mut GpPen, points : *const PointF, count : i32) -> Status); - unsafe { GdipDrawPolygon(core::mem::transmute(graphics), core::mem::transmute(pen), points, count) } + unsafe { GdipDrawPolygon(graphics as _, pen as _, points, count) } } #[inline] pub unsafe fn GdipDrawPolygonI(graphics: *mut GpGraphics, pen: *mut GpPen, points: *const Point, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawPolygonI(graphics : *mut GpGraphics, pen : *mut GpPen, points : *const Point, count : i32) -> Status); - unsafe { GdipDrawPolygonI(core::mem::transmute(graphics), core::mem::transmute(pen), points, count) } + unsafe { GdipDrawPolygonI(graphics as _, pen as _, points, count) } } #[inline] pub unsafe fn GdipDrawRectangle(graphics: *mut GpGraphics, pen: *mut GpPen, x: f32, y: f32, width: f32, height: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawRectangle(graphics : *mut GpGraphics, pen : *mut GpPen, x : f32, y : f32, width : f32, height : f32) -> Status); - unsafe { GdipDrawRectangle(core::mem::transmute(graphics), core::mem::transmute(pen), x, y, width, height) } + unsafe { GdipDrawRectangle(graphics as _, pen as _, x, y, width, height) } } #[inline] pub unsafe fn GdipDrawRectangleI(graphics: *mut GpGraphics, pen: *mut GpPen, x: i32, y: i32, width: i32, height: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawRectangleI(graphics : *mut GpGraphics, pen : *mut GpPen, x : i32, y : i32, width : i32, height : i32) -> Status); - unsafe { GdipDrawRectangleI(core::mem::transmute(graphics), core::mem::transmute(pen), x, y, width, height) } + unsafe { GdipDrawRectangleI(graphics as _, pen as _, x, y, width, height) } } #[inline] pub unsafe fn GdipDrawRectangles(graphics: *mut GpGraphics, pen: *mut GpPen, rects: *const RectF, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawRectangles(graphics : *mut GpGraphics, pen : *mut GpPen, rects : *const RectF, count : i32) -> Status); - unsafe { GdipDrawRectangles(core::mem::transmute(graphics), core::mem::transmute(pen), rects, count) } + unsafe { GdipDrawRectangles(graphics as _, pen as _, rects, count) } } #[inline] pub unsafe fn GdipDrawRectanglesI(graphics: *mut GpGraphics, pen: *mut GpPen, rects: *const Rect, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawRectanglesI(graphics : *mut GpGraphics, pen : *mut GpPen, rects : *const Rect, count : i32) -> Status); - unsafe { GdipDrawRectanglesI(core::mem::transmute(graphics), core::mem::transmute(pen), rects, count) } + unsafe { GdipDrawRectanglesI(graphics as _, pen as _, rects, count) } } #[inline] pub unsafe fn GdipDrawString(graphics: *mut GpGraphics, string: P1, length: i32, font: *const GpFont, layoutrect: *const RectF, stringformat: *const GpStringFormat, brush: *const GpBrush) -> Status @@ -1074,7 +1074,7 @@ where P1: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipDrawString(graphics : *mut GpGraphics, string : windows_core::PCWSTR, length : i32, font : *const GpFont, layoutrect : *const RectF, stringformat : *const GpStringFormat, brush : *const GpBrush) -> Status); - unsafe { GdipDrawString(core::mem::transmute(graphics), string.param().abi(), length, font, layoutrect, stringformat, brush) } + unsafe { GdipDrawString(graphics as _, string.param().abi(), length, font, layoutrect, stringformat, brush) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1085,323 +1085,323 @@ pub unsafe fn GdipEmfToWmfBits(hemf: super::Gdi::HENHMETAFILE, pdata16: Option<& #[inline] pub unsafe fn GdipEndContainer(graphics: *mut GpGraphics, state: u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipEndContainer(graphics : *mut GpGraphics, state : u32) -> Status); - unsafe { GdipEndContainer(core::mem::transmute(graphics), state) } + unsafe { GdipEndContainer(graphics as _, state) } } #[inline] pub unsafe fn GdipEnumerateMetafileDestPoint(graphics: *mut GpGraphics, metafile: *const GpMetafile, destpoint: *const PointF, callback: isize, callbackdata: *mut core::ffi::c_void, imageattributes: *const GpImageAttributes) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipEnumerateMetafileDestPoint(graphics : *mut GpGraphics, metafile : *const GpMetafile, destpoint : *const PointF, callback : isize, callbackdata : *mut core::ffi::c_void, imageattributes : *const GpImageAttributes) -> Status); - unsafe { GdipEnumerateMetafileDestPoint(core::mem::transmute(graphics), metafile, destpoint, callback, core::mem::transmute(callbackdata), imageattributes) } + unsafe { GdipEnumerateMetafileDestPoint(graphics as _, metafile, destpoint, callback, callbackdata as _, imageattributes) } } #[inline] pub unsafe fn GdipEnumerateMetafileDestPointI(graphics: *mut GpGraphics, metafile: *const GpMetafile, destpoint: *const Point, callback: isize, callbackdata: *mut core::ffi::c_void, imageattributes: *const GpImageAttributes) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipEnumerateMetafileDestPointI(graphics : *mut GpGraphics, metafile : *const GpMetafile, destpoint : *const Point, callback : isize, callbackdata : *mut core::ffi::c_void, imageattributes : *const GpImageAttributes) -> Status); - unsafe { GdipEnumerateMetafileDestPointI(core::mem::transmute(graphics), metafile, destpoint, callback, core::mem::transmute(callbackdata), imageattributes) } + unsafe { GdipEnumerateMetafileDestPointI(graphics as _, metafile, destpoint, callback, callbackdata as _, imageattributes) } } #[inline] pub unsafe fn GdipEnumerateMetafileDestPoints(graphics: *mut GpGraphics, metafile: *const GpMetafile, destpoints: *const PointF, count: i32, callback: isize, callbackdata: *mut core::ffi::c_void, imageattributes: *const GpImageAttributes) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipEnumerateMetafileDestPoints(graphics : *mut GpGraphics, metafile : *const GpMetafile, destpoints : *const PointF, count : i32, callback : isize, callbackdata : *mut core::ffi::c_void, imageattributes : *const GpImageAttributes) -> Status); - unsafe { GdipEnumerateMetafileDestPoints(core::mem::transmute(graphics), metafile, destpoints, count, callback, core::mem::transmute(callbackdata), imageattributes) } + unsafe { GdipEnumerateMetafileDestPoints(graphics as _, metafile, destpoints, count, callback, callbackdata as _, imageattributes) } } #[inline] pub unsafe fn GdipEnumerateMetafileDestPointsI(graphics: *mut GpGraphics, metafile: *const GpMetafile, destpoints: *const Point, count: i32, callback: isize, callbackdata: *mut core::ffi::c_void, imageattributes: *const GpImageAttributes) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipEnumerateMetafileDestPointsI(graphics : *mut GpGraphics, metafile : *const GpMetafile, destpoints : *const Point, count : i32, callback : isize, callbackdata : *mut core::ffi::c_void, imageattributes : *const GpImageAttributes) -> Status); - unsafe { GdipEnumerateMetafileDestPointsI(core::mem::transmute(graphics), metafile, destpoints, count, callback, core::mem::transmute(callbackdata), imageattributes) } + unsafe { GdipEnumerateMetafileDestPointsI(graphics as _, metafile, destpoints, count, callback, callbackdata as _, imageattributes) } } #[inline] pub unsafe fn GdipEnumerateMetafileDestRect(graphics: *mut GpGraphics, metafile: *const GpMetafile, destrect: *const RectF, callback: isize, callbackdata: *mut core::ffi::c_void, imageattributes: *const GpImageAttributes) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipEnumerateMetafileDestRect(graphics : *mut GpGraphics, metafile : *const GpMetafile, destrect : *const RectF, callback : isize, callbackdata : *mut core::ffi::c_void, imageattributes : *const GpImageAttributes) -> Status); - unsafe { GdipEnumerateMetafileDestRect(core::mem::transmute(graphics), metafile, destrect, callback, core::mem::transmute(callbackdata), imageattributes) } + unsafe { GdipEnumerateMetafileDestRect(graphics as _, metafile, destrect, callback, callbackdata as _, imageattributes) } } #[inline] pub unsafe fn GdipEnumerateMetafileDestRectI(graphics: *mut GpGraphics, metafile: *const GpMetafile, destrect: *const Rect, callback: isize, callbackdata: *mut core::ffi::c_void, imageattributes: *const GpImageAttributes) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipEnumerateMetafileDestRectI(graphics : *mut GpGraphics, metafile : *const GpMetafile, destrect : *const Rect, callback : isize, callbackdata : *mut core::ffi::c_void, imageattributes : *const GpImageAttributes) -> Status); - unsafe { GdipEnumerateMetafileDestRectI(core::mem::transmute(graphics), metafile, destrect, callback, core::mem::transmute(callbackdata), imageattributes) } + unsafe { GdipEnumerateMetafileDestRectI(graphics as _, metafile, destrect, callback, callbackdata as _, imageattributes) } } #[inline] pub unsafe fn GdipEnumerateMetafileSrcRectDestPoint(graphics: *mut GpGraphics, metafile: *const GpMetafile, destpoint: *const PointF, srcrect: *const RectF, srcunit: Unit, callback: isize, callbackdata: *mut core::ffi::c_void, imageattributes: *const GpImageAttributes) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipEnumerateMetafileSrcRectDestPoint(graphics : *mut GpGraphics, metafile : *const GpMetafile, destpoint : *const PointF, srcrect : *const RectF, srcunit : Unit, callback : isize, callbackdata : *mut core::ffi::c_void, imageattributes : *const GpImageAttributes) -> Status); - unsafe { GdipEnumerateMetafileSrcRectDestPoint(core::mem::transmute(graphics), metafile, destpoint, srcrect, srcunit, callback, core::mem::transmute(callbackdata), imageattributes) } + unsafe { GdipEnumerateMetafileSrcRectDestPoint(graphics as _, metafile, destpoint, srcrect, srcunit, callback, callbackdata as _, imageattributes) } } #[inline] pub unsafe fn GdipEnumerateMetafileSrcRectDestPointI(graphics: *mut GpGraphics, metafile: *const GpMetafile, destpoint: *const Point, srcrect: *const Rect, srcunit: Unit, callback: isize, callbackdata: *mut core::ffi::c_void, imageattributes: *const GpImageAttributes) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipEnumerateMetafileSrcRectDestPointI(graphics : *mut GpGraphics, metafile : *const GpMetafile, destpoint : *const Point, srcrect : *const Rect, srcunit : Unit, callback : isize, callbackdata : *mut core::ffi::c_void, imageattributes : *const GpImageAttributes) -> Status); - unsafe { GdipEnumerateMetafileSrcRectDestPointI(core::mem::transmute(graphics), metafile, destpoint, srcrect, srcunit, callback, core::mem::transmute(callbackdata), imageattributes) } + unsafe { GdipEnumerateMetafileSrcRectDestPointI(graphics as _, metafile, destpoint, srcrect, srcunit, callback, callbackdata as _, imageattributes) } } #[inline] pub unsafe fn GdipEnumerateMetafileSrcRectDestPoints(graphics: *mut GpGraphics, metafile: *const GpMetafile, destpoints: *const PointF, count: i32, srcrect: *const RectF, srcunit: Unit, callback: isize, callbackdata: *mut core::ffi::c_void, imageattributes: *const GpImageAttributes) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipEnumerateMetafileSrcRectDestPoints(graphics : *mut GpGraphics, metafile : *const GpMetafile, destpoints : *const PointF, count : i32, srcrect : *const RectF, srcunit : Unit, callback : isize, callbackdata : *mut core::ffi::c_void, imageattributes : *const GpImageAttributes) -> Status); - unsafe { GdipEnumerateMetafileSrcRectDestPoints(core::mem::transmute(graphics), metafile, destpoints, count, srcrect, srcunit, callback, core::mem::transmute(callbackdata), imageattributes) } + unsafe { GdipEnumerateMetafileSrcRectDestPoints(graphics as _, metafile, destpoints, count, srcrect, srcunit, callback, callbackdata as _, imageattributes) } } #[inline] pub unsafe fn GdipEnumerateMetafileSrcRectDestPointsI(graphics: *mut GpGraphics, metafile: *const GpMetafile, destpoints: *const Point, count: i32, srcrect: *const Rect, srcunit: Unit, callback: isize, callbackdata: *mut core::ffi::c_void, imageattributes: *const GpImageAttributes) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipEnumerateMetafileSrcRectDestPointsI(graphics : *mut GpGraphics, metafile : *const GpMetafile, destpoints : *const Point, count : i32, srcrect : *const Rect, srcunit : Unit, callback : isize, callbackdata : *mut core::ffi::c_void, imageattributes : *const GpImageAttributes) -> Status); - unsafe { GdipEnumerateMetafileSrcRectDestPointsI(core::mem::transmute(graphics), metafile, destpoints, count, srcrect, srcunit, callback, core::mem::transmute(callbackdata), imageattributes) } + unsafe { GdipEnumerateMetafileSrcRectDestPointsI(graphics as _, metafile, destpoints, count, srcrect, srcunit, callback, callbackdata as _, imageattributes) } } #[inline] pub unsafe fn GdipEnumerateMetafileSrcRectDestRect(graphics: *mut GpGraphics, metafile: *const GpMetafile, destrect: *const RectF, srcrect: *const RectF, srcunit: Unit, callback: isize, callbackdata: *mut core::ffi::c_void, imageattributes: *const GpImageAttributes) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipEnumerateMetafileSrcRectDestRect(graphics : *mut GpGraphics, metafile : *const GpMetafile, destrect : *const RectF, srcrect : *const RectF, srcunit : Unit, callback : isize, callbackdata : *mut core::ffi::c_void, imageattributes : *const GpImageAttributes) -> Status); - unsafe { GdipEnumerateMetafileSrcRectDestRect(core::mem::transmute(graphics), metafile, destrect, srcrect, srcunit, callback, core::mem::transmute(callbackdata), imageattributes) } + unsafe { GdipEnumerateMetafileSrcRectDestRect(graphics as _, metafile, destrect, srcrect, srcunit, callback, callbackdata as _, imageattributes) } } #[inline] pub unsafe fn GdipEnumerateMetafileSrcRectDestRectI(graphics: *mut GpGraphics, metafile: *const GpMetafile, destrect: *const Rect, srcrect: *const Rect, srcunit: Unit, callback: isize, callbackdata: *mut core::ffi::c_void, imageattributes: *const GpImageAttributes) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipEnumerateMetafileSrcRectDestRectI(graphics : *mut GpGraphics, metafile : *const GpMetafile, destrect : *const Rect, srcrect : *const Rect, srcunit : Unit, callback : isize, callbackdata : *mut core::ffi::c_void, imageattributes : *const GpImageAttributes) -> Status); - unsafe { GdipEnumerateMetafileSrcRectDestRectI(core::mem::transmute(graphics), metafile, destrect, srcrect, srcunit, callback, core::mem::transmute(callbackdata), imageattributes) } + unsafe { GdipEnumerateMetafileSrcRectDestRectI(graphics as _, metafile, destrect, srcrect, srcunit, callback, callbackdata as _, imageattributes) } } #[inline] pub unsafe fn GdipFillClosedCurve(graphics: *mut GpGraphics, brush: *mut GpBrush, points: *const PointF, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipFillClosedCurve(graphics : *mut GpGraphics, brush : *mut GpBrush, points : *const PointF, count : i32) -> Status); - unsafe { GdipFillClosedCurve(core::mem::transmute(graphics), core::mem::transmute(brush), points, count) } + unsafe { GdipFillClosedCurve(graphics as _, brush as _, points, count) } } #[inline] pub unsafe fn GdipFillClosedCurve2(graphics: *mut GpGraphics, brush: *mut GpBrush, points: *const PointF, count: i32, tension: f32, fillmode: FillMode) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipFillClosedCurve2(graphics : *mut GpGraphics, brush : *mut GpBrush, points : *const PointF, count : i32, tension : f32, fillmode : FillMode) -> Status); - unsafe { GdipFillClosedCurve2(core::mem::transmute(graphics), core::mem::transmute(brush), points, count, tension, fillmode) } + unsafe { GdipFillClosedCurve2(graphics as _, brush as _, points, count, tension, fillmode) } } #[inline] pub unsafe fn GdipFillClosedCurve2I(graphics: *mut GpGraphics, brush: *mut GpBrush, points: *const Point, count: i32, tension: f32, fillmode: FillMode) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipFillClosedCurve2I(graphics : *mut GpGraphics, brush : *mut GpBrush, points : *const Point, count : i32, tension : f32, fillmode : FillMode) -> Status); - unsafe { GdipFillClosedCurve2I(core::mem::transmute(graphics), core::mem::transmute(brush), points, count, tension, fillmode) } + unsafe { GdipFillClosedCurve2I(graphics as _, brush as _, points, count, tension, fillmode) } } #[inline] pub unsafe fn GdipFillClosedCurveI(graphics: *mut GpGraphics, brush: *mut GpBrush, points: *const Point, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipFillClosedCurveI(graphics : *mut GpGraphics, brush : *mut GpBrush, points : *const Point, count : i32) -> Status); - unsafe { GdipFillClosedCurveI(core::mem::transmute(graphics), core::mem::transmute(brush), points, count) } + unsafe { GdipFillClosedCurveI(graphics as _, brush as _, points, count) } } #[inline] pub unsafe fn GdipFillEllipse(graphics: *mut GpGraphics, brush: *mut GpBrush, x: f32, y: f32, width: f32, height: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipFillEllipse(graphics : *mut GpGraphics, brush : *mut GpBrush, x : f32, y : f32, width : f32, height : f32) -> Status); - unsafe { GdipFillEllipse(core::mem::transmute(graphics), core::mem::transmute(brush), x, y, width, height) } + unsafe { GdipFillEllipse(graphics as _, brush as _, x, y, width, height) } } #[inline] pub unsafe fn GdipFillEllipseI(graphics: *mut GpGraphics, brush: *mut GpBrush, x: i32, y: i32, width: i32, height: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipFillEllipseI(graphics : *mut GpGraphics, brush : *mut GpBrush, x : i32, y : i32, width : i32, height : i32) -> Status); - unsafe { GdipFillEllipseI(core::mem::transmute(graphics), core::mem::transmute(brush), x, y, width, height) } + unsafe { GdipFillEllipseI(graphics as _, brush as _, x, y, width, height) } } #[inline] pub unsafe fn GdipFillPath(graphics: *mut GpGraphics, brush: *mut GpBrush, path: *mut GpPath) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipFillPath(graphics : *mut GpGraphics, brush : *mut GpBrush, path : *mut GpPath) -> Status); - unsafe { GdipFillPath(core::mem::transmute(graphics), core::mem::transmute(brush), core::mem::transmute(path)) } + unsafe { GdipFillPath(graphics as _, brush as _, path as _) } } #[inline] pub unsafe fn GdipFillPie(graphics: *mut GpGraphics, brush: *mut GpBrush, x: f32, y: f32, width: f32, height: f32, startangle: f32, sweepangle: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipFillPie(graphics : *mut GpGraphics, brush : *mut GpBrush, x : f32, y : f32, width : f32, height : f32, startangle : f32, sweepangle : f32) -> Status); - unsafe { GdipFillPie(core::mem::transmute(graphics), core::mem::transmute(brush), x, y, width, height, startangle, sweepangle) } + unsafe { GdipFillPie(graphics as _, brush as _, x, y, width, height, startangle, sweepangle) } } #[inline] pub unsafe fn GdipFillPieI(graphics: *mut GpGraphics, brush: *mut GpBrush, x: i32, y: i32, width: i32, height: i32, startangle: f32, sweepangle: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipFillPieI(graphics : *mut GpGraphics, brush : *mut GpBrush, x : i32, y : i32, width : i32, height : i32, startangle : f32, sweepangle : f32) -> Status); - unsafe { GdipFillPieI(core::mem::transmute(graphics), core::mem::transmute(brush), x, y, width, height, startangle, sweepangle) } + unsafe { GdipFillPieI(graphics as _, brush as _, x, y, width, height, startangle, sweepangle) } } #[inline] pub unsafe fn GdipFillPolygon(graphics: *mut GpGraphics, brush: *mut GpBrush, points: *const PointF, count: i32, fillmode: FillMode) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipFillPolygon(graphics : *mut GpGraphics, brush : *mut GpBrush, points : *const PointF, count : i32, fillmode : FillMode) -> Status); - unsafe { GdipFillPolygon(core::mem::transmute(graphics), core::mem::transmute(brush), points, count, fillmode) } + unsafe { GdipFillPolygon(graphics as _, brush as _, points, count, fillmode) } } #[inline] pub unsafe fn GdipFillPolygon2(graphics: *mut GpGraphics, brush: *mut GpBrush, points: *const PointF, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipFillPolygon2(graphics : *mut GpGraphics, brush : *mut GpBrush, points : *const PointF, count : i32) -> Status); - unsafe { GdipFillPolygon2(core::mem::transmute(graphics), core::mem::transmute(brush), points, count) } + unsafe { GdipFillPolygon2(graphics as _, brush as _, points, count) } } #[inline] pub unsafe fn GdipFillPolygon2I(graphics: *mut GpGraphics, brush: *mut GpBrush, points: *const Point, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipFillPolygon2I(graphics : *mut GpGraphics, brush : *mut GpBrush, points : *const Point, count : i32) -> Status); - unsafe { GdipFillPolygon2I(core::mem::transmute(graphics), core::mem::transmute(brush), points, count) } + unsafe { GdipFillPolygon2I(graphics as _, brush as _, points, count) } } #[inline] pub unsafe fn GdipFillPolygonI(graphics: *mut GpGraphics, brush: *mut GpBrush, points: *const Point, count: i32, fillmode: FillMode) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipFillPolygonI(graphics : *mut GpGraphics, brush : *mut GpBrush, points : *const Point, count : i32, fillmode : FillMode) -> Status); - unsafe { GdipFillPolygonI(core::mem::transmute(graphics), core::mem::transmute(brush), points, count, fillmode) } + unsafe { GdipFillPolygonI(graphics as _, brush as _, points, count, fillmode) } } #[inline] pub unsafe fn GdipFillRectangle(graphics: *mut GpGraphics, brush: *mut GpBrush, x: f32, y: f32, width: f32, height: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipFillRectangle(graphics : *mut GpGraphics, brush : *mut GpBrush, x : f32, y : f32, width : f32, height : f32) -> Status); - unsafe { GdipFillRectangle(core::mem::transmute(graphics), core::mem::transmute(brush), x, y, width, height) } + unsafe { GdipFillRectangle(graphics as _, brush as _, x, y, width, height) } } #[inline] pub unsafe fn GdipFillRectangleI(graphics: *mut GpGraphics, brush: *mut GpBrush, x: i32, y: i32, width: i32, height: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipFillRectangleI(graphics : *mut GpGraphics, brush : *mut GpBrush, x : i32, y : i32, width : i32, height : i32) -> Status); - unsafe { GdipFillRectangleI(core::mem::transmute(graphics), core::mem::transmute(brush), x, y, width, height) } + unsafe { GdipFillRectangleI(graphics as _, brush as _, x, y, width, height) } } #[inline] pub unsafe fn GdipFillRectangles(graphics: *mut GpGraphics, brush: *mut GpBrush, rects: *const RectF, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipFillRectangles(graphics : *mut GpGraphics, brush : *mut GpBrush, rects : *const RectF, count : i32) -> Status); - unsafe { GdipFillRectangles(core::mem::transmute(graphics), core::mem::transmute(brush), rects, count) } + unsafe { GdipFillRectangles(graphics as _, brush as _, rects, count) } } #[inline] pub unsafe fn GdipFillRectanglesI(graphics: *mut GpGraphics, brush: *mut GpBrush, rects: *const Rect, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipFillRectanglesI(graphics : *mut GpGraphics, brush : *mut GpBrush, rects : *const Rect, count : i32) -> Status); - unsafe { GdipFillRectanglesI(core::mem::transmute(graphics), core::mem::transmute(brush), rects, count) } + unsafe { GdipFillRectanglesI(graphics as _, brush as _, rects, count) } } #[inline] pub unsafe fn GdipFillRegion(graphics: *mut GpGraphics, brush: *mut GpBrush, region: *mut GpRegion) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipFillRegion(graphics : *mut GpGraphics, brush : *mut GpBrush, region : *mut GpRegion) -> Status); - unsafe { GdipFillRegion(core::mem::transmute(graphics), core::mem::transmute(brush), core::mem::transmute(region)) } + unsafe { GdipFillRegion(graphics as _, brush as _, region as _) } } #[inline] pub unsafe fn GdipFindFirstImageItem(image: *mut GpImage, item: *mut ImageItemData) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipFindFirstImageItem(image : *mut GpImage, item : *mut ImageItemData) -> Status); - unsafe { GdipFindFirstImageItem(core::mem::transmute(image), core::mem::transmute(item)) } + unsafe { GdipFindFirstImageItem(image as _, item as _) } } #[inline] pub unsafe fn GdipFindNextImageItem(image: *mut GpImage, item: *mut ImageItemData) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipFindNextImageItem(image : *mut GpImage, item : *mut ImageItemData) -> Status); - unsafe { GdipFindNextImageItem(core::mem::transmute(image), core::mem::transmute(item)) } + unsafe { GdipFindNextImageItem(image as _, item as _) } } #[inline] pub unsafe fn GdipFlattenPath(path: *mut GpPath, matrix: *mut Matrix, flatness: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipFlattenPath(path : *mut GpPath, matrix : *mut Matrix, flatness : f32) -> Status); - unsafe { GdipFlattenPath(core::mem::transmute(path), core::mem::transmute(matrix), flatness) } + unsafe { GdipFlattenPath(path as _, matrix as _, flatness) } } #[inline] pub unsafe fn GdipFlush(graphics: *mut GpGraphics, intention: FlushIntention) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipFlush(graphics : *mut GpGraphics, intention : FlushIntention) -> Status); - unsafe { GdipFlush(core::mem::transmute(graphics), intention) } + unsafe { GdipFlush(graphics as _, intention) } } #[inline] pub unsafe fn GdipFree(ptr: *mut core::ffi::c_void) { windows_targets::link!("gdiplus.dll" "system" fn GdipFree(ptr : *mut core::ffi::c_void)); - unsafe { GdipFree(core::mem::transmute(ptr)) } + unsafe { GdipFree(ptr as _) } } #[inline] pub unsafe fn GdipGetAdjustableArrowCapFillState(cap: *mut GpAdjustableArrowCap, fillstate: *mut super::super::Foundation::BOOL) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetAdjustableArrowCapFillState(cap : *mut GpAdjustableArrowCap, fillstate : *mut super::super::Foundation:: BOOL) -> Status); - unsafe { GdipGetAdjustableArrowCapFillState(core::mem::transmute(cap), core::mem::transmute(fillstate)) } + unsafe { GdipGetAdjustableArrowCapFillState(cap as _, fillstate as _) } } #[inline] pub unsafe fn GdipGetAdjustableArrowCapHeight(cap: *mut GpAdjustableArrowCap, height: *mut f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetAdjustableArrowCapHeight(cap : *mut GpAdjustableArrowCap, height : *mut f32) -> Status); - unsafe { GdipGetAdjustableArrowCapHeight(core::mem::transmute(cap), core::mem::transmute(height)) } + unsafe { GdipGetAdjustableArrowCapHeight(cap as _, height as _) } } #[inline] pub unsafe fn GdipGetAdjustableArrowCapMiddleInset(cap: *mut GpAdjustableArrowCap, middleinset: *mut f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetAdjustableArrowCapMiddleInset(cap : *mut GpAdjustableArrowCap, middleinset : *mut f32) -> Status); - unsafe { GdipGetAdjustableArrowCapMiddleInset(core::mem::transmute(cap), core::mem::transmute(middleinset)) } + unsafe { GdipGetAdjustableArrowCapMiddleInset(cap as _, middleinset as _) } } #[inline] pub unsafe fn GdipGetAdjustableArrowCapWidth(cap: *mut GpAdjustableArrowCap, width: *mut f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetAdjustableArrowCapWidth(cap : *mut GpAdjustableArrowCap, width : *mut f32) -> Status); - unsafe { GdipGetAdjustableArrowCapWidth(core::mem::transmute(cap), core::mem::transmute(width)) } + unsafe { GdipGetAdjustableArrowCapWidth(cap as _, width as _) } } #[inline] pub unsafe fn GdipGetAllPropertyItems(image: *mut GpImage, totalbuffersize: u32, numproperties: u32, allitems: *mut PropertyItem) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetAllPropertyItems(image : *mut GpImage, totalbuffersize : u32, numproperties : u32, allitems : *mut PropertyItem) -> Status); - unsafe { GdipGetAllPropertyItems(core::mem::transmute(image), totalbuffersize, numproperties, core::mem::transmute(allitems)) } + unsafe { GdipGetAllPropertyItems(image as _, totalbuffersize, numproperties, allitems as _) } } #[inline] pub unsafe fn GdipGetBrushType(brush: *mut GpBrush, r#type: *mut BrushType) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetBrushType(brush : *mut GpBrush, r#type : *mut BrushType) -> Status); - unsafe { GdipGetBrushType(core::mem::transmute(brush), core::mem::transmute(r#type)) } + unsafe { GdipGetBrushType(brush as _, r#type as _) } } #[inline] pub unsafe fn GdipGetCellAscent(family: *const GpFontFamily, style: i32, cellascent: *mut u16) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetCellAscent(family : *const GpFontFamily, style : i32, cellascent : *mut u16) -> Status); - unsafe { GdipGetCellAscent(family, style, core::mem::transmute(cellascent)) } + unsafe { GdipGetCellAscent(family, style, cellascent as _) } } #[inline] pub unsafe fn GdipGetCellDescent(family: *const GpFontFamily, style: i32, celldescent: *mut u16) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetCellDescent(family : *const GpFontFamily, style : i32, celldescent : *mut u16) -> Status); - unsafe { GdipGetCellDescent(family, style, core::mem::transmute(celldescent)) } + unsafe { GdipGetCellDescent(family, style, celldescent as _) } } #[inline] pub unsafe fn GdipGetClip(graphics: *mut GpGraphics, region: *mut GpRegion) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetClip(graphics : *mut GpGraphics, region : *mut GpRegion) -> Status); - unsafe { GdipGetClip(core::mem::transmute(graphics), core::mem::transmute(region)) } + unsafe { GdipGetClip(graphics as _, region as _) } } #[inline] pub unsafe fn GdipGetClipBounds(graphics: *mut GpGraphics, rect: *mut RectF) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetClipBounds(graphics : *mut GpGraphics, rect : *mut RectF) -> Status); - unsafe { GdipGetClipBounds(core::mem::transmute(graphics), core::mem::transmute(rect)) } + unsafe { GdipGetClipBounds(graphics as _, rect as _) } } #[inline] pub unsafe fn GdipGetClipBoundsI(graphics: *mut GpGraphics, rect: *mut Rect) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetClipBoundsI(graphics : *mut GpGraphics, rect : *mut Rect) -> Status); - unsafe { GdipGetClipBoundsI(core::mem::transmute(graphics), core::mem::transmute(rect)) } + unsafe { GdipGetClipBoundsI(graphics as _, rect as _) } } #[inline] pub unsafe fn GdipGetCompositingMode(graphics: *mut GpGraphics, compositingmode: *mut CompositingMode) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetCompositingMode(graphics : *mut GpGraphics, compositingmode : *mut CompositingMode) -> Status); - unsafe { GdipGetCompositingMode(core::mem::transmute(graphics), core::mem::transmute(compositingmode)) } + unsafe { GdipGetCompositingMode(graphics as _, compositingmode as _) } } #[inline] pub unsafe fn GdipGetCompositingQuality(graphics: *mut GpGraphics, compositingquality: *mut CompositingQuality) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetCompositingQuality(graphics : *mut GpGraphics, compositingquality : *mut CompositingQuality) -> Status); - unsafe { GdipGetCompositingQuality(core::mem::transmute(graphics), core::mem::transmute(compositingquality)) } + unsafe { GdipGetCompositingQuality(graphics as _, compositingquality as _) } } #[inline] pub unsafe fn GdipGetCustomLineCapBaseCap(customcap: *mut GpCustomLineCap, basecap: *mut LineCap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetCustomLineCapBaseCap(customcap : *mut GpCustomLineCap, basecap : *mut LineCap) -> Status); - unsafe { GdipGetCustomLineCapBaseCap(core::mem::transmute(customcap), core::mem::transmute(basecap)) } + unsafe { GdipGetCustomLineCapBaseCap(customcap as _, basecap as _) } } #[inline] pub unsafe fn GdipGetCustomLineCapBaseInset(customcap: *mut GpCustomLineCap, inset: *mut f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetCustomLineCapBaseInset(customcap : *mut GpCustomLineCap, inset : *mut f32) -> Status); - unsafe { GdipGetCustomLineCapBaseInset(core::mem::transmute(customcap), core::mem::transmute(inset)) } + unsafe { GdipGetCustomLineCapBaseInset(customcap as _, inset as _) } } #[inline] pub unsafe fn GdipGetCustomLineCapStrokeCaps(customcap: *mut GpCustomLineCap, startcap: *mut LineCap, endcap: *mut LineCap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetCustomLineCapStrokeCaps(customcap : *mut GpCustomLineCap, startcap : *mut LineCap, endcap : *mut LineCap) -> Status); - unsafe { GdipGetCustomLineCapStrokeCaps(core::mem::transmute(customcap), core::mem::transmute(startcap), core::mem::transmute(endcap)) } + unsafe { GdipGetCustomLineCapStrokeCaps(customcap as _, startcap as _, endcap as _) } } #[inline] pub unsafe fn GdipGetCustomLineCapStrokeJoin(customcap: *mut GpCustomLineCap, linejoin: *mut LineJoin) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetCustomLineCapStrokeJoin(customcap : *mut GpCustomLineCap, linejoin : *mut LineJoin) -> Status); - unsafe { GdipGetCustomLineCapStrokeJoin(core::mem::transmute(customcap), core::mem::transmute(linejoin)) } + unsafe { GdipGetCustomLineCapStrokeJoin(customcap as _, linejoin as _) } } #[inline] pub unsafe fn GdipGetCustomLineCapType(customcap: *mut GpCustomLineCap, captype: *mut CustomLineCapType) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetCustomLineCapType(customcap : *mut GpCustomLineCap, captype : *mut CustomLineCapType) -> Status); - unsafe { GdipGetCustomLineCapType(core::mem::transmute(customcap), core::mem::transmute(captype)) } + unsafe { GdipGetCustomLineCapType(customcap as _, captype as _) } } #[inline] pub unsafe fn GdipGetCustomLineCapWidthScale(customcap: *mut GpCustomLineCap, widthscale: *mut f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetCustomLineCapWidthScale(customcap : *mut GpCustomLineCap, widthscale : *mut f32) -> Status); - unsafe { GdipGetCustomLineCapWidthScale(core::mem::transmute(customcap), core::mem::transmute(widthscale)) } + unsafe { GdipGetCustomLineCapWidthScale(customcap as _, widthscale as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn GdipGetDC(graphics: *mut GpGraphics, hdc: *mut super::Gdi::HDC) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetDC(graphics : *mut GpGraphics, hdc : *mut super::Gdi:: HDC) -> Status); - unsafe { GdipGetDC(core::mem::transmute(graphics), core::mem::transmute(hdc)) } + unsafe { GdipGetDC(graphics as _, hdc as _) } } #[inline] pub unsafe fn GdipGetDpiX(graphics: *mut GpGraphics, dpi: *mut f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetDpiX(graphics : *mut GpGraphics, dpi : *mut f32) -> Status); - unsafe { GdipGetDpiX(core::mem::transmute(graphics), core::mem::transmute(dpi)) } + unsafe { GdipGetDpiX(graphics as _, dpi as _) } } #[inline] pub unsafe fn GdipGetDpiY(graphics: *mut GpGraphics, dpi: *mut f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetDpiY(graphics : *mut GpGraphics, dpi : *mut f32) -> Status); - unsafe { GdipGetDpiY(core::mem::transmute(graphics), core::mem::transmute(dpi)) } + unsafe { GdipGetDpiY(graphics as _, dpi as _) } } #[inline] pub unsafe fn GdipGetEffectParameterSize(effect: *mut CGpEffect, size: *mut u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetEffectParameterSize(effect : *mut CGpEffect, size : *mut u32) -> Status); - unsafe { GdipGetEffectParameterSize(core::mem::transmute(effect), core::mem::transmute(size)) } + unsafe { GdipGetEffectParameterSize(effect as _, size as _) } } #[inline] pub unsafe fn GdipGetEffectParameters(effect: *mut CGpEffect, size: *mut u32, params: *mut core::ffi::c_void) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetEffectParameters(effect : *mut CGpEffect, size : *mut u32, params : *mut core::ffi::c_void) -> Status); - unsafe { GdipGetEffectParameters(core::mem::transmute(effect), core::mem::transmute(size), core::mem::transmute(params)) } + unsafe { GdipGetEffectParameters(effect as _, size as _, params as _) } } #[inline] pub unsafe fn GdipGetEmHeight(family: *const GpFontFamily, style: i32, emheight: *mut u16) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetEmHeight(family : *const GpFontFamily, style : i32, emheight : *mut u16) -> Status); - unsafe { GdipGetEmHeight(family, style, core::mem::transmute(emheight)) } + unsafe { GdipGetEmHeight(family, style, emheight as _) } } #[inline] pub unsafe fn GdipGetEncoderParameterList(image: *mut GpImage, clsidencoder: *const windows_core::GUID, size: u32, buffer: *mut EncoderParameters) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetEncoderParameterList(image : *mut GpImage, clsidencoder : *const windows_core::GUID, size : u32, buffer : *mut EncoderParameters) -> Status); - unsafe { GdipGetEncoderParameterList(core::mem::transmute(image), clsidencoder, size, core::mem::transmute(buffer)) } + unsafe { GdipGetEncoderParameterList(image as _, clsidencoder, size, buffer as _) } } #[inline] pub unsafe fn GdipGetEncoderParameterListSize(image: *mut GpImage, clsidencoder: *const windows_core::GUID, size: *mut u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetEncoderParameterListSize(image : *mut GpImage, clsidencoder : *const windows_core::GUID, size : *mut u32) -> Status); - unsafe { GdipGetEncoderParameterListSize(core::mem::transmute(image), clsidencoder, core::mem::transmute(size)) } + unsafe { GdipGetEncoderParameterListSize(image as _, clsidencoder, size as _) } } #[inline] pub unsafe fn GdipGetFamily(font: *mut GpFont, family: *mut *mut GpFontFamily) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetFamily(font : *mut GpFont, family : *mut *mut GpFontFamily) -> Status); - unsafe { GdipGetFamily(core::mem::transmute(font), core::mem::transmute(family)) } + unsafe { GdipGetFamily(font as _, family as _) } } #[inline] pub unsafe fn GdipGetFamilyName(family: *const GpFontFamily, name: &mut [u16; 32], language: u16) -> Status { @@ -1411,261 +1411,261 @@ pub unsafe fn GdipGetFamilyName(family: *const GpFontFamily, name: &mut [u16; 32 #[inline] pub unsafe fn GdipGetFontCollectionFamilyCount(fontcollection: *mut GpFontCollection, numfound: *mut i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetFontCollectionFamilyCount(fontcollection : *mut GpFontCollection, numfound : *mut i32) -> Status); - unsafe { GdipGetFontCollectionFamilyCount(core::mem::transmute(fontcollection), core::mem::transmute(numfound)) } + unsafe { GdipGetFontCollectionFamilyCount(fontcollection as _, numfound as _) } } #[inline] pub unsafe fn GdipGetFontCollectionFamilyList(fontcollection: *const GpFontCollection, gpfamilies: &mut [*mut GpFontFamily], numfound: *mut i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetFontCollectionFamilyList(fontcollection : *const GpFontCollection, numsought : i32, gpfamilies : *mut *mut GpFontFamily, numfound : *mut i32) -> Status); - unsafe { GdipGetFontCollectionFamilyList(fontcollection, gpfamilies.len().try_into().unwrap(), core::mem::transmute(gpfamilies.as_ptr()), core::mem::transmute(numfound)) } + unsafe { GdipGetFontCollectionFamilyList(fontcollection, gpfamilies.len().try_into().unwrap(), core::mem::transmute(gpfamilies.as_ptr()), numfound as _) } } #[inline] pub unsafe fn GdipGetFontHeight(font: *const GpFont, graphics: *const GpGraphics, height: *mut f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetFontHeight(font : *const GpFont, graphics : *const GpGraphics, height : *mut f32) -> Status); - unsafe { GdipGetFontHeight(font, graphics, core::mem::transmute(height)) } + unsafe { GdipGetFontHeight(font, graphics, height as _) } } #[inline] pub unsafe fn GdipGetFontHeightGivenDPI(font: *const GpFont, dpi: f32, height: *mut f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetFontHeightGivenDPI(font : *const GpFont, dpi : f32, height : *mut f32) -> Status); - unsafe { GdipGetFontHeightGivenDPI(font, dpi, core::mem::transmute(height)) } + unsafe { GdipGetFontHeightGivenDPI(font, dpi, height as _) } } #[inline] pub unsafe fn GdipGetFontSize(font: *mut GpFont, size: *mut f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetFontSize(font : *mut GpFont, size : *mut f32) -> Status); - unsafe { GdipGetFontSize(core::mem::transmute(font), core::mem::transmute(size)) } + unsafe { GdipGetFontSize(font as _, size as _) } } #[inline] pub unsafe fn GdipGetFontStyle(font: *mut GpFont, style: *mut i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetFontStyle(font : *mut GpFont, style : *mut i32) -> Status); - unsafe { GdipGetFontStyle(core::mem::transmute(font), core::mem::transmute(style)) } + unsafe { GdipGetFontStyle(font as _, style as _) } } #[inline] pub unsafe fn GdipGetFontUnit(font: *mut GpFont, unit: *mut Unit) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetFontUnit(font : *mut GpFont, unit : *mut Unit) -> Status); - unsafe { GdipGetFontUnit(core::mem::transmute(font), core::mem::transmute(unit)) } + unsafe { GdipGetFontUnit(font as _, unit as _) } } #[inline] pub unsafe fn GdipGetGenericFontFamilyMonospace(nativefamily: *mut *mut GpFontFamily) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetGenericFontFamilyMonospace(nativefamily : *mut *mut GpFontFamily) -> Status); - unsafe { GdipGetGenericFontFamilyMonospace(core::mem::transmute(nativefamily)) } + unsafe { GdipGetGenericFontFamilyMonospace(nativefamily as _) } } #[inline] pub unsafe fn GdipGetGenericFontFamilySansSerif(nativefamily: *mut *mut GpFontFamily) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetGenericFontFamilySansSerif(nativefamily : *mut *mut GpFontFamily) -> Status); - unsafe { GdipGetGenericFontFamilySansSerif(core::mem::transmute(nativefamily)) } + unsafe { GdipGetGenericFontFamilySansSerif(nativefamily as _) } } #[inline] pub unsafe fn GdipGetGenericFontFamilySerif(nativefamily: *mut *mut GpFontFamily) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetGenericFontFamilySerif(nativefamily : *mut *mut GpFontFamily) -> Status); - unsafe { GdipGetGenericFontFamilySerif(core::mem::transmute(nativefamily)) } + unsafe { GdipGetGenericFontFamilySerif(nativefamily as _) } } #[inline] pub unsafe fn GdipGetHatchBackgroundColor(brush: *mut GpHatch, backcol: *mut u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetHatchBackgroundColor(brush : *mut GpHatch, backcol : *mut u32) -> Status); - unsafe { GdipGetHatchBackgroundColor(core::mem::transmute(brush), core::mem::transmute(backcol)) } + unsafe { GdipGetHatchBackgroundColor(brush as _, backcol as _) } } #[inline] pub unsafe fn GdipGetHatchForegroundColor(brush: *mut GpHatch, forecol: *mut u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetHatchForegroundColor(brush : *mut GpHatch, forecol : *mut u32) -> Status); - unsafe { GdipGetHatchForegroundColor(core::mem::transmute(brush), core::mem::transmute(forecol)) } + unsafe { GdipGetHatchForegroundColor(brush as _, forecol as _) } } #[inline] pub unsafe fn GdipGetHatchStyle(brush: *mut GpHatch, hatchstyle: *mut HatchStyle) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetHatchStyle(brush : *mut GpHatch, hatchstyle : *mut HatchStyle) -> Status); - unsafe { GdipGetHatchStyle(core::mem::transmute(brush), core::mem::transmute(hatchstyle)) } + unsafe { GdipGetHatchStyle(brush as _, hatchstyle as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn GdipGetHemfFromMetafile(metafile: *mut GpMetafile, hemf: *mut super::Gdi::HENHMETAFILE) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetHemfFromMetafile(metafile : *mut GpMetafile, hemf : *mut super::Gdi:: HENHMETAFILE) -> Status); - unsafe { GdipGetHemfFromMetafile(core::mem::transmute(metafile), core::mem::transmute(hemf)) } + unsafe { GdipGetHemfFromMetafile(metafile as _, hemf as _) } } #[inline] pub unsafe fn GdipGetImageAttributesAdjustedPalette(imageattr: *mut GpImageAttributes, colorpalette: *mut ColorPalette, coloradjusttype: ColorAdjustType) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetImageAttributesAdjustedPalette(imageattr : *mut GpImageAttributes, colorpalette : *mut ColorPalette, coloradjusttype : ColorAdjustType) -> Status); - unsafe { GdipGetImageAttributesAdjustedPalette(core::mem::transmute(imageattr), core::mem::transmute(colorpalette), coloradjusttype) } + unsafe { GdipGetImageAttributesAdjustedPalette(imageattr as _, colorpalette as _, coloradjusttype) } } #[inline] pub unsafe fn GdipGetImageBounds(image: *mut GpImage, srcrect: *mut RectF, srcunit: *mut Unit) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetImageBounds(image : *mut GpImage, srcrect : *mut RectF, srcunit : *mut Unit) -> Status); - unsafe { GdipGetImageBounds(core::mem::transmute(image), core::mem::transmute(srcrect), core::mem::transmute(srcunit)) } + unsafe { GdipGetImageBounds(image as _, srcrect as _, srcunit as _) } } #[inline] pub unsafe fn GdipGetImageDecoders(numdecoders: u32, size: u32, decoders: *mut ImageCodecInfo) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetImageDecoders(numdecoders : u32, size : u32, decoders : *mut ImageCodecInfo) -> Status); - unsafe { GdipGetImageDecoders(numdecoders, size, core::mem::transmute(decoders)) } + unsafe { GdipGetImageDecoders(numdecoders, size, decoders as _) } } #[inline] pub unsafe fn GdipGetImageDecodersSize(numdecoders: *mut u32, size: *mut u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetImageDecodersSize(numdecoders : *mut u32, size : *mut u32) -> Status); - unsafe { GdipGetImageDecodersSize(core::mem::transmute(numdecoders), core::mem::transmute(size)) } + unsafe { GdipGetImageDecodersSize(numdecoders as _, size as _) } } #[inline] pub unsafe fn GdipGetImageDimension(image: *mut GpImage, width: *mut f32, height: *mut f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetImageDimension(image : *mut GpImage, width : *mut f32, height : *mut f32) -> Status); - unsafe { GdipGetImageDimension(core::mem::transmute(image), core::mem::transmute(width), core::mem::transmute(height)) } + unsafe { GdipGetImageDimension(image as _, width as _, height as _) } } #[inline] pub unsafe fn GdipGetImageEncoders(numencoders: u32, size: u32, encoders: *mut ImageCodecInfo) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetImageEncoders(numencoders : u32, size : u32, encoders : *mut ImageCodecInfo) -> Status); - unsafe { GdipGetImageEncoders(numencoders, size, core::mem::transmute(encoders)) } + unsafe { GdipGetImageEncoders(numencoders, size, encoders as _) } } #[inline] pub unsafe fn GdipGetImageEncodersSize(numencoders: *mut u32, size: *mut u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetImageEncodersSize(numencoders : *mut u32, size : *mut u32) -> Status); - unsafe { GdipGetImageEncodersSize(core::mem::transmute(numencoders), core::mem::transmute(size)) } + unsafe { GdipGetImageEncodersSize(numencoders as _, size as _) } } #[inline] pub unsafe fn GdipGetImageFlags(image: *mut GpImage, flags: *mut u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetImageFlags(image : *mut GpImage, flags : *mut u32) -> Status); - unsafe { GdipGetImageFlags(core::mem::transmute(image), core::mem::transmute(flags)) } + unsafe { GdipGetImageFlags(image as _, flags as _) } } #[inline] pub unsafe fn GdipGetImageGraphicsContext(image: *mut GpImage, graphics: *mut *mut GpGraphics) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetImageGraphicsContext(image : *mut GpImage, graphics : *mut *mut GpGraphics) -> Status); - unsafe { GdipGetImageGraphicsContext(core::mem::transmute(image), core::mem::transmute(graphics)) } + unsafe { GdipGetImageGraphicsContext(image as _, graphics as _) } } #[inline] pub unsafe fn GdipGetImageHeight(image: *mut GpImage, height: *mut u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetImageHeight(image : *mut GpImage, height : *mut u32) -> Status); - unsafe { GdipGetImageHeight(core::mem::transmute(image), core::mem::transmute(height)) } + unsafe { GdipGetImageHeight(image as _, height as _) } } #[inline] pub unsafe fn GdipGetImageHorizontalResolution(image: *mut GpImage, resolution: *mut f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetImageHorizontalResolution(image : *mut GpImage, resolution : *mut f32) -> Status); - unsafe { GdipGetImageHorizontalResolution(core::mem::transmute(image), core::mem::transmute(resolution)) } + unsafe { GdipGetImageHorizontalResolution(image as _, resolution as _) } } #[inline] pub unsafe fn GdipGetImageItemData(image: *mut GpImage, item: *mut ImageItemData) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetImageItemData(image : *mut GpImage, item : *mut ImageItemData) -> Status); - unsafe { GdipGetImageItemData(core::mem::transmute(image), core::mem::transmute(item)) } + unsafe { GdipGetImageItemData(image as _, item as _) } } #[inline] pub unsafe fn GdipGetImagePalette(image: *mut GpImage, palette: *mut ColorPalette, size: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetImagePalette(image : *mut GpImage, palette : *mut ColorPalette, size : i32) -> Status); - unsafe { GdipGetImagePalette(core::mem::transmute(image), core::mem::transmute(palette), size) } + unsafe { GdipGetImagePalette(image as _, palette as _, size) } } #[inline] pub unsafe fn GdipGetImagePaletteSize(image: *mut GpImage, size: *mut i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetImagePaletteSize(image : *mut GpImage, size : *mut i32) -> Status); - unsafe { GdipGetImagePaletteSize(core::mem::transmute(image), core::mem::transmute(size)) } + unsafe { GdipGetImagePaletteSize(image as _, size as _) } } #[inline] pub unsafe fn GdipGetImagePixelFormat(image: *mut GpImage, format: *mut i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetImagePixelFormat(image : *mut GpImage, format : *mut i32) -> Status); - unsafe { GdipGetImagePixelFormat(core::mem::transmute(image), core::mem::transmute(format)) } + unsafe { GdipGetImagePixelFormat(image as _, format as _) } } #[inline] pub unsafe fn GdipGetImageRawFormat(image: *mut GpImage, format: *mut windows_core::GUID) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetImageRawFormat(image : *mut GpImage, format : *mut windows_core::GUID) -> Status); - unsafe { GdipGetImageRawFormat(core::mem::transmute(image), core::mem::transmute(format)) } + unsafe { GdipGetImageRawFormat(image as _, format as _) } } #[inline] pub unsafe fn GdipGetImageThumbnail(image: *mut GpImage, thumbwidth: u32, thumbheight: u32, thumbimage: *mut *mut GpImage, callback: isize, callbackdata: *mut core::ffi::c_void) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetImageThumbnail(image : *mut GpImage, thumbwidth : u32, thumbheight : u32, thumbimage : *mut *mut GpImage, callback : isize, callbackdata : *mut core::ffi::c_void) -> Status); - unsafe { GdipGetImageThumbnail(core::mem::transmute(image), thumbwidth, thumbheight, core::mem::transmute(thumbimage), callback, core::mem::transmute(callbackdata)) } + unsafe { GdipGetImageThumbnail(image as _, thumbwidth, thumbheight, thumbimage as _, callback, callbackdata as _) } } #[inline] pub unsafe fn GdipGetImageType(image: *mut GpImage, r#type: *mut ImageType) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetImageType(image : *mut GpImage, r#type : *mut ImageType) -> Status); - unsafe { GdipGetImageType(core::mem::transmute(image), core::mem::transmute(r#type)) } + unsafe { GdipGetImageType(image as _, r#type as _) } } #[inline] pub unsafe fn GdipGetImageVerticalResolution(image: *mut GpImage, resolution: *mut f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetImageVerticalResolution(image : *mut GpImage, resolution : *mut f32) -> Status); - unsafe { GdipGetImageVerticalResolution(core::mem::transmute(image), core::mem::transmute(resolution)) } + unsafe { GdipGetImageVerticalResolution(image as _, resolution as _) } } #[inline] pub unsafe fn GdipGetImageWidth(image: *mut GpImage, width: *mut u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetImageWidth(image : *mut GpImage, width : *mut u32) -> Status); - unsafe { GdipGetImageWidth(core::mem::transmute(image), core::mem::transmute(width)) } + unsafe { GdipGetImageWidth(image as _, width as _) } } #[inline] pub unsafe fn GdipGetInterpolationMode(graphics: *mut GpGraphics, interpolationmode: *mut InterpolationMode) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetInterpolationMode(graphics : *mut GpGraphics, interpolationmode : *mut InterpolationMode) -> Status); - unsafe { GdipGetInterpolationMode(core::mem::transmute(graphics), core::mem::transmute(interpolationmode)) } + unsafe { GdipGetInterpolationMode(graphics as _, interpolationmode as _) } } #[inline] pub unsafe fn GdipGetLineBlend(brush: *mut GpLineGradient, blend: *mut f32, positions: *mut f32, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetLineBlend(brush : *mut GpLineGradient, blend : *mut f32, positions : *mut f32, count : i32) -> Status); - unsafe { GdipGetLineBlend(core::mem::transmute(brush), core::mem::transmute(blend), core::mem::transmute(positions), count) } + unsafe { GdipGetLineBlend(brush as _, blend as _, positions as _, count) } } #[inline] pub unsafe fn GdipGetLineBlendCount(brush: *mut GpLineGradient, count: *mut i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetLineBlendCount(brush : *mut GpLineGradient, count : *mut i32) -> Status); - unsafe { GdipGetLineBlendCount(core::mem::transmute(brush), core::mem::transmute(count)) } + unsafe { GdipGetLineBlendCount(brush as _, count as _) } } #[inline] pub unsafe fn GdipGetLineColors(brush: *mut GpLineGradient, colors: *mut u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetLineColors(brush : *mut GpLineGradient, colors : *mut u32) -> Status); - unsafe { GdipGetLineColors(core::mem::transmute(brush), core::mem::transmute(colors)) } + unsafe { GdipGetLineColors(brush as _, colors as _) } } #[inline] pub unsafe fn GdipGetLineGammaCorrection(brush: *mut GpLineGradient, usegammacorrection: *mut super::super::Foundation::BOOL) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetLineGammaCorrection(brush : *mut GpLineGradient, usegammacorrection : *mut super::super::Foundation:: BOOL) -> Status); - unsafe { GdipGetLineGammaCorrection(core::mem::transmute(brush), core::mem::transmute(usegammacorrection)) } + unsafe { GdipGetLineGammaCorrection(brush as _, usegammacorrection as _) } } #[inline] pub unsafe fn GdipGetLinePresetBlend(brush: *mut GpLineGradient, blend: *mut u32, positions: *mut f32, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetLinePresetBlend(brush : *mut GpLineGradient, blend : *mut u32, positions : *mut f32, count : i32) -> Status); - unsafe { GdipGetLinePresetBlend(core::mem::transmute(brush), core::mem::transmute(blend), core::mem::transmute(positions), count) } + unsafe { GdipGetLinePresetBlend(brush as _, blend as _, positions as _, count) } } #[inline] pub unsafe fn GdipGetLinePresetBlendCount(brush: *mut GpLineGradient, count: *mut i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetLinePresetBlendCount(brush : *mut GpLineGradient, count : *mut i32) -> Status); - unsafe { GdipGetLinePresetBlendCount(core::mem::transmute(brush), core::mem::transmute(count)) } + unsafe { GdipGetLinePresetBlendCount(brush as _, count as _) } } #[inline] pub unsafe fn GdipGetLineRect(brush: *mut GpLineGradient, rect: *mut RectF) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetLineRect(brush : *mut GpLineGradient, rect : *mut RectF) -> Status); - unsafe { GdipGetLineRect(core::mem::transmute(brush), core::mem::transmute(rect)) } + unsafe { GdipGetLineRect(brush as _, rect as _) } } #[inline] pub unsafe fn GdipGetLineRectI(brush: *mut GpLineGradient, rect: *mut Rect) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetLineRectI(brush : *mut GpLineGradient, rect : *mut Rect) -> Status); - unsafe { GdipGetLineRectI(core::mem::transmute(brush), core::mem::transmute(rect)) } + unsafe { GdipGetLineRectI(brush as _, rect as _) } } #[inline] pub unsafe fn GdipGetLineSpacing(family: *const GpFontFamily, style: i32, linespacing: *mut u16) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetLineSpacing(family : *const GpFontFamily, style : i32, linespacing : *mut u16) -> Status); - unsafe { GdipGetLineSpacing(family, style, core::mem::transmute(linespacing)) } + unsafe { GdipGetLineSpacing(family, style, linespacing as _) } } #[inline] pub unsafe fn GdipGetLineTransform(brush: *mut GpLineGradient, matrix: *mut Matrix) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetLineTransform(brush : *mut GpLineGradient, matrix : *mut Matrix) -> Status); - unsafe { GdipGetLineTransform(core::mem::transmute(brush), core::mem::transmute(matrix)) } + unsafe { GdipGetLineTransform(brush as _, matrix as _) } } #[inline] pub unsafe fn GdipGetLineWrapMode(brush: *mut GpLineGradient, wrapmode: *mut WrapMode) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetLineWrapMode(brush : *mut GpLineGradient, wrapmode : *mut WrapMode) -> Status); - unsafe { GdipGetLineWrapMode(core::mem::transmute(brush), core::mem::transmute(wrapmode)) } + unsafe { GdipGetLineWrapMode(brush as _, wrapmode as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn GdipGetLogFontA(font: *mut GpFont, graphics: *mut GpGraphics, logfonta: *mut super::Gdi::LOGFONTA) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetLogFontA(font : *mut GpFont, graphics : *mut GpGraphics, logfonta : *mut super::Gdi:: LOGFONTA) -> Status); - unsafe { GdipGetLogFontA(core::mem::transmute(font), core::mem::transmute(graphics), core::mem::transmute(logfonta)) } + unsafe { GdipGetLogFontA(font as _, graphics as _, logfonta as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn GdipGetLogFontW(font: *mut GpFont, graphics: *mut GpGraphics, logfontw: *mut super::Gdi::LOGFONTW) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetLogFontW(font : *mut GpFont, graphics : *mut GpGraphics, logfontw : *mut super::Gdi:: LOGFONTW) -> Status); - unsafe { GdipGetLogFontW(core::mem::transmute(font), core::mem::transmute(graphics), core::mem::transmute(logfontw)) } + unsafe { GdipGetLogFontW(font as _, graphics as _, logfontw as _) } } #[inline] pub unsafe fn GdipGetMatrixElements(matrix: *const Matrix, matrixout: *mut f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetMatrixElements(matrix : *const Matrix, matrixout : *mut f32) -> Status); - unsafe { GdipGetMatrixElements(matrix, core::mem::transmute(matrixout)) } + unsafe { GdipGetMatrixElements(matrix, matrixout as _) } } #[inline] pub unsafe fn GdipGetMetafileDownLevelRasterizationLimit(metafile: *const GpMetafile, metafilerasterizationlimitdpi: *mut u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetMetafileDownLevelRasterizationLimit(metafile : *const GpMetafile, metafilerasterizationlimitdpi : *mut u32) -> Status); - unsafe { GdipGetMetafileDownLevelRasterizationLimit(metafile, core::mem::transmute(metafilerasterizationlimitdpi)) } + unsafe { GdipGetMetafileDownLevelRasterizationLimit(metafile, metafilerasterizationlimitdpi as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { GdipGetMetafileHeaderFromEmf(hemf, core::mem::transmute(header)) } + unsafe { GdipGetMetafileHeaderFromEmf(hemf, header as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1674,13 +1674,13 @@ where P0: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipGetMetafileHeaderFromFile(filename : windows_core::PCWSTR, header : *mut MetafileHeader) -> Status); - unsafe { GdipGetMetafileHeaderFromFile(filename.param().abi(), core::mem::transmute(header)) } + unsafe { GdipGetMetafileHeaderFromFile(filename.param().abi(), header as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn GdipGetMetafileHeaderFromMetafile(metafile: *mut GpMetafile, header: *mut MetafileHeader) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetMetafileHeaderFromMetafile(metafile : *mut GpMetafile, header : *mut MetafileHeader) -> Status); - unsafe { GdipGetMetafileHeaderFromMetafile(core::mem::transmute(metafile), core::mem::transmute(header)) } + unsafe { GdipGetMetafileHeaderFromMetafile(metafile as _, header as _) } } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] #[inline] @@ -1689,138 +1689,138 @@ where P0: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipGetMetafileHeaderFromStream(stream : * mut core::ffi::c_void, header : *mut MetafileHeader) -> Status); - unsafe { GdipGetMetafileHeaderFromStream(stream.param().abi(), core::mem::transmute(header)) } + unsafe { GdipGetMetafileHeaderFromStream(stream.param().abi(), header as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { GdipGetMetafileHeaderFromWmf(hwmf, wmfplaceablefileheader, core::mem::transmute(header)) } + unsafe { GdipGetMetafileHeaderFromWmf(hwmf, wmfplaceablefileheader, header as _) } } #[inline] pub unsafe fn GdipGetNearestColor(graphics: *mut GpGraphics, argb: *mut u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetNearestColor(graphics : *mut GpGraphics, argb : *mut u32) -> Status); - unsafe { GdipGetNearestColor(core::mem::transmute(graphics), core::mem::transmute(argb)) } + unsafe { GdipGetNearestColor(graphics as _, argb as _) } } #[inline] pub unsafe fn GdipGetPageScale(graphics: *mut GpGraphics, scale: *mut f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPageScale(graphics : *mut GpGraphics, scale : *mut f32) -> Status); - unsafe { GdipGetPageScale(core::mem::transmute(graphics), core::mem::transmute(scale)) } + unsafe { GdipGetPageScale(graphics as _, scale as _) } } #[inline] pub unsafe fn GdipGetPageUnit(graphics: *mut GpGraphics, unit: *mut Unit) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPageUnit(graphics : *mut GpGraphics, unit : *mut Unit) -> Status); - unsafe { GdipGetPageUnit(core::mem::transmute(graphics), core::mem::transmute(unit)) } + unsafe { GdipGetPageUnit(graphics as _, unit as _) } } #[inline] pub unsafe fn GdipGetPathData(path: *mut GpPath, pathdata: *mut PathData) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPathData(path : *mut GpPath, pathdata : *mut PathData) -> Status); - unsafe { GdipGetPathData(core::mem::transmute(path), core::mem::transmute(pathdata)) } + unsafe { GdipGetPathData(path as _, pathdata as _) } } #[inline] pub unsafe fn GdipGetPathFillMode(path: *mut GpPath, fillmode: *mut FillMode) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPathFillMode(path : *mut GpPath, fillmode : *mut FillMode) -> Status); - unsafe { GdipGetPathFillMode(core::mem::transmute(path), core::mem::transmute(fillmode)) } + unsafe { GdipGetPathFillMode(path as _, fillmode as _) } } #[inline] pub unsafe fn GdipGetPathGradientBlend(brush: *mut GpPathGradient, blend: *mut f32, positions: *mut f32, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPathGradientBlend(brush : *mut GpPathGradient, blend : *mut f32, positions : *mut f32, count : i32) -> Status); - unsafe { GdipGetPathGradientBlend(core::mem::transmute(brush), core::mem::transmute(blend), core::mem::transmute(positions), count) } + unsafe { GdipGetPathGradientBlend(brush as _, blend as _, positions as _, count) } } #[inline] pub unsafe fn GdipGetPathGradientBlendCount(brush: *mut GpPathGradient, count: *mut i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPathGradientBlendCount(brush : *mut GpPathGradient, count : *mut i32) -> Status); - unsafe { GdipGetPathGradientBlendCount(core::mem::transmute(brush), core::mem::transmute(count)) } + unsafe { GdipGetPathGradientBlendCount(brush as _, count as _) } } #[inline] pub unsafe fn GdipGetPathGradientCenterColor(brush: *mut GpPathGradient, colors: *mut u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPathGradientCenterColor(brush : *mut GpPathGradient, colors : *mut u32) -> Status); - unsafe { GdipGetPathGradientCenterColor(core::mem::transmute(brush), core::mem::transmute(colors)) } + unsafe { GdipGetPathGradientCenterColor(brush as _, colors as _) } } #[inline] pub unsafe fn GdipGetPathGradientCenterPoint(brush: *mut GpPathGradient, points: *mut PointF) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPathGradientCenterPoint(brush : *mut GpPathGradient, points : *mut PointF) -> Status); - unsafe { GdipGetPathGradientCenterPoint(core::mem::transmute(brush), core::mem::transmute(points)) } + unsafe { GdipGetPathGradientCenterPoint(brush as _, points as _) } } #[inline] pub unsafe fn GdipGetPathGradientCenterPointI(brush: *mut GpPathGradient, points: *mut Point) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPathGradientCenterPointI(brush : *mut GpPathGradient, points : *mut Point) -> Status); - unsafe { GdipGetPathGradientCenterPointI(core::mem::transmute(brush), core::mem::transmute(points)) } + unsafe { GdipGetPathGradientCenterPointI(brush as _, points as _) } } #[inline] pub unsafe fn GdipGetPathGradientFocusScales(brush: *mut GpPathGradient, xscale: *mut f32, yscale: *mut f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPathGradientFocusScales(brush : *mut GpPathGradient, xscale : *mut f32, yscale : *mut f32) -> Status); - unsafe { GdipGetPathGradientFocusScales(core::mem::transmute(brush), core::mem::transmute(xscale), core::mem::transmute(yscale)) } + unsafe { GdipGetPathGradientFocusScales(brush as _, xscale as _, yscale as _) } } #[inline] pub unsafe fn GdipGetPathGradientGammaCorrection(brush: *mut GpPathGradient, usegammacorrection: *mut super::super::Foundation::BOOL) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPathGradientGammaCorrection(brush : *mut GpPathGradient, usegammacorrection : *mut super::super::Foundation:: BOOL) -> Status); - unsafe { GdipGetPathGradientGammaCorrection(core::mem::transmute(brush), core::mem::transmute(usegammacorrection)) } + unsafe { GdipGetPathGradientGammaCorrection(brush as _, usegammacorrection as _) } } #[inline] pub unsafe fn GdipGetPathGradientPath(brush: *mut GpPathGradient, path: *mut GpPath) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPathGradientPath(brush : *mut GpPathGradient, path : *mut GpPath) -> Status); - unsafe { GdipGetPathGradientPath(core::mem::transmute(brush), core::mem::transmute(path)) } + unsafe { GdipGetPathGradientPath(brush as _, path as _) } } #[inline] pub unsafe fn GdipGetPathGradientPointCount(brush: *mut GpPathGradient, count: *mut i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPathGradientPointCount(brush : *mut GpPathGradient, count : *mut i32) -> Status); - unsafe { GdipGetPathGradientPointCount(core::mem::transmute(brush), core::mem::transmute(count)) } + unsafe { GdipGetPathGradientPointCount(brush as _, count as _) } } #[inline] pub unsafe fn GdipGetPathGradientPresetBlend(brush: *mut GpPathGradient, blend: *mut u32, positions: *mut f32, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPathGradientPresetBlend(brush : *mut GpPathGradient, blend : *mut u32, positions : *mut f32, count : i32) -> Status); - unsafe { GdipGetPathGradientPresetBlend(core::mem::transmute(brush), core::mem::transmute(blend), core::mem::transmute(positions), count) } + unsafe { GdipGetPathGradientPresetBlend(brush as _, blend as _, positions as _, count) } } #[inline] pub unsafe fn GdipGetPathGradientPresetBlendCount(brush: *mut GpPathGradient, count: *mut i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPathGradientPresetBlendCount(brush : *mut GpPathGradient, count : *mut i32) -> Status); - unsafe { GdipGetPathGradientPresetBlendCount(core::mem::transmute(brush), core::mem::transmute(count)) } + unsafe { GdipGetPathGradientPresetBlendCount(brush as _, count as _) } } #[inline] pub unsafe fn GdipGetPathGradientRect(brush: *mut GpPathGradient, rect: *mut RectF) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPathGradientRect(brush : *mut GpPathGradient, rect : *mut RectF) -> Status); - unsafe { GdipGetPathGradientRect(core::mem::transmute(brush), core::mem::transmute(rect)) } + unsafe { GdipGetPathGradientRect(brush as _, rect as _) } } #[inline] pub unsafe fn GdipGetPathGradientRectI(brush: *mut GpPathGradient, rect: *mut Rect) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPathGradientRectI(brush : *mut GpPathGradient, rect : *mut Rect) -> Status); - unsafe { GdipGetPathGradientRectI(core::mem::transmute(brush), core::mem::transmute(rect)) } + unsafe { GdipGetPathGradientRectI(brush as _, rect as _) } } #[inline] pub unsafe fn GdipGetPathGradientSurroundColorCount(brush: *mut GpPathGradient, count: *mut i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPathGradientSurroundColorCount(brush : *mut GpPathGradient, count : *mut i32) -> Status); - unsafe { GdipGetPathGradientSurroundColorCount(core::mem::transmute(brush), core::mem::transmute(count)) } + unsafe { GdipGetPathGradientSurroundColorCount(brush as _, count as _) } } #[inline] pub unsafe fn GdipGetPathGradientSurroundColorsWithCount(brush: *const GpPathGradient, color: *mut u32, count: *mut i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPathGradientSurroundColorsWithCount(brush : *const GpPathGradient, color : *mut u32, count : *mut i32) -> Status); - unsafe { GdipGetPathGradientSurroundColorsWithCount(brush, core::mem::transmute(color), core::mem::transmute(count)) } + unsafe { GdipGetPathGradientSurroundColorsWithCount(brush, color as _, count as _) } } #[inline] pub unsafe fn GdipGetPathGradientTransform(brush: *mut GpPathGradient, matrix: *mut Matrix) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPathGradientTransform(brush : *mut GpPathGradient, matrix : *mut Matrix) -> Status); - unsafe { GdipGetPathGradientTransform(core::mem::transmute(brush), core::mem::transmute(matrix)) } + unsafe { GdipGetPathGradientTransform(brush as _, matrix as _) } } #[inline] pub unsafe fn GdipGetPathGradientWrapMode(brush: *mut GpPathGradient, wrapmode: *mut WrapMode) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPathGradientWrapMode(brush : *mut GpPathGradient, wrapmode : *mut WrapMode) -> Status); - unsafe { GdipGetPathGradientWrapMode(core::mem::transmute(brush), core::mem::transmute(wrapmode)) } + unsafe { GdipGetPathGradientWrapMode(brush as _, wrapmode as _) } } #[inline] pub unsafe fn GdipGetPathLastPoint(path: *mut GpPath, lastpoint: *mut PointF) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPathLastPoint(path : *mut GpPath, lastpoint : *mut PointF) -> Status); - unsafe { GdipGetPathLastPoint(core::mem::transmute(path), core::mem::transmute(lastpoint)) } + unsafe { GdipGetPathLastPoint(path as _, lastpoint as _) } } #[inline] pub unsafe fn GdipGetPathPoints(param0: *mut GpPath, points: *mut PointF, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPathPoints(param0 : *mut GpPath, points : *mut PointF, count : i32) -> Status); - unsafe { GdipGetPathPoints(core::mem::transmute(param0), core::mem::transmute(points), count) } + unsafe { GdipGetPathPoints(param0 as _, points as _, count) } } #[inline] pub unsafe fn GdipGetPathPointsI(param0: *mut GpPath, points: *mut Point, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPathPointsI(param0 : *mut GpPath, points : *mut Point, count : i32) -> Status); - unsafe { GdipGetPathPointsI(core::mem::transmute(param0), core::mem::transmute(points), count) } + unsafe { GdipGetPathPointsI(param0 as _, points as _, count) } } #[inline] pub unsafe fn GdipGetPathTypes(path: *const GpPath, types: &mut [u8]) -> Status { @@ -1830,293 +1830,293 @@ pub unsafe fn GdipGetPathTypes(path: *const GpPath, types: &mut [u8]) -> Status #[inline] pub unsafe fn GdipGetPathWorldBounds(path: *mut GpPath, bounds: *mut RectF, matrix: *const Matrix, pen: *const GpPen) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPathWorldBounds(path : *mut GpPath, bounds : *mut RectF, matrix : *const Matrix, pen : *const GpPen) -> Status); - unsafe { GdipGetPathWorldBounds(core::mem::transmute(path), core::mem::transmute(bounds), matrix, pen) } + unsafe { GdipGetPathWorldBounds(path as _, bounds as _, matrix, pen) } } #[inline] pub unsafe fn GdipGetPathWorldBoundsI(path: *mut GpPath, bounds: *mut Rect, matrix: *const Matrix, pen: *const GpPen) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPathWorldBoundsI(path : *mut GpPath, bounds : *mut Rect, matrix : *const Matrix, pen : *const GpPen) -> Status); - unsafe { GdipGetPathWorldBoundsI(core::mem::transmute(path), core::mem::transmute(bounds), matrix, pen) } + unsafe { GdipGetPathWorldBoundsI(path as _, bounds as _, matrix, pen) } } #[inline] pub unsafe fn GdipGetPenBrushFill(pen: *mut GpPen, brush: *mut *mut GpBrush) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPenBrushFill(pen : *mut GpPen, brush : *mut *mut GpBrush) -> Status); - unsafe { GdipGetPenBrushFill(core::mem::transmute(pen), core::mem::transmute(brush)) } + unsafe { GdipGetPenBrushFill(pen as _, brush as _) } } #[inline] pub unsafe fn GdipGetPenColor(pen: *mut GpPen, argb: *mut u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPenColor(pen : *mut GpPen, argb : *mut u32) -> Status); - unsafe { GdipGetPenColor(core::mem::transmute(pen), core::mem::transmute(argb)) } + unsafe { GdipGetPenColor(pen as _, argb as _) } } #[inline] pub unsafe fn GdipGetPenCompoundArray(pen: *mut GpPen, dash: *mut f32, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPenCompoundArray(pen : *mut GpPen, dash : *mut f32, count : i32) -> Status); - unsafe { GdipGetPenCompoundArray(core::mem::transmute(pen), core::mem::transmute(dash), count) } + unsafe { GdipGetPenCompoundArray(pen as _, dash as _, count) } } #[inline] pub unsafe fn GdipGetPenCompoundCount(pen: *mut GpPen, count: *mut i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPenCompoundCount(pen : *mut GpPen, count : *mut i32) -> Status); - unsafe { GdipGetPenCompoundCount(core::mem::transmute(pen), core::mem::transmute(count)) } + unsafe { GdipGetPenCompoundCount(pen as _, count as _) } } #[inline] pub unsafe fn GdipGetPenCustomEndCap(pen: *mut GpPen, customcap: *mut *mut GpCustomLineCap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPenCustomEndCap(pen : *mut GpPen, customcap : *mut *mut GpCustomLineCap) -> Status); - unsafe { GdipGetPenCustomEndCap(core::mem::transmute(pen), core::mem::transmute(customcap)) } + unsafe { GdipGetPenCustomEndCap(pen as _, customcap as _) } } #[inline] pub unsafe fn GdipGetPenCustomStartCap(pen: *mut GpPen, customcap: *mut *mut GpCustomLineCap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPenCustomStartCap(pen : *mut GpPen, customcap : *mut *mut GpCustomLineCap) -> Status); - unsafe { GdipGetPenCustomStartCap(core::mem::transmute(pen), core::mem::transmute(customcap)) } + unsafe { GdipGetPenCustomStartCap(pen as _, customcap as _) } } #[inline] pub unsafe fn GdipGetPenDashArray(pen: *mut GpPen, dash: *mut f32, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPenDashArray(pen : *mut GpPen, dash : *mut f32, count : i32) -> Status); - unsafe { GdipGetPenDashArray(core::mem::transmute(pen), core::mem::transmute(dash), count) } + unsafe { GdipGetPenDashArray(pen as _, dash as _, count) } } #[inline] pub unsafe fn GdipGetPenDashCap197819(pen: *mut GpPen, dashcap: *mut DashCap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPenDashCap197819(pen : *mut GpPen, dashcap : *mut DashCap) -> Status); - unsafe { GdipGetPenDashCap197819(core::mem::transmute(pen), core::mem::transmute(dashcap)) } + unsafe { GdipGetPenDashCap197819(pen as _, dashcap as _) } } #[inline] pub unsafe fn GdipGetPenDashCount(pen: *mut GpPen, count: *mut i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPenDashCount(pen : *mut GpPen, count : *mut i32) -> Status); - unsafe { GdipGetPenDashCount(core::mem::transmute(pen), core::mem::transmute(count)) } + unsafe { GdipGetPenDashCount(pen as _, count as _) } } #[inline] pub unsafe fn GdipGetPenDashOffset(pen: *mut GpPen, offset: *mut f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPenDashOffset(pen : *mut GpPen, offset : *mut f32) -> Status); - unsafe { GdipGetPenDashOffset(core::mem::transmute(pen), core::mem::transmute(offset)) } + unsafe { GdipGetPenDashOffset(pen as _, offset as _) } } #[inline] pub unsafe fn GdipGetPenDashStyle(pen: *mut GpPen, dashstyle: *mut DashStyle) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPenDashStyle(pen : *mut GpPen, dashstyle : *mut DashStyle) -> Status); - unsafe { GdipGetPenDashStyle(core::mem::transmute(pen), core::mem::transmute(dashstyle)) } + unsafe { GdipGetPenDashStyle(pen as _, dashstyle as _) } } #[inline] pub unsafe fn GdipGetPenEndCap(pen: *mut GpPen, endcap: *mut LineCap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPenEndCap(pen : *mut GpPen, endcap : *mut LineCap) -> Status); - unsafe { GdipGetPenEndCap(core::mem::transmute(pen), core::mem::transmute(endcap)) } + unsafe { GdipGetPenEndCap(pen as _, endcap as _) } } #[inline] pub unsafe fn GdipGetPenFillType(pen: *mut GpPen, r#type: *mut PenType) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPenFillType(pen : *mut GpPen, r#type : *mut PenType) -> Status); - unsafe { GdipGetPenFillType(core::mem::transmute(pen), core::mem::transmute(r#type)) } + unsafe { GdipGetPenFillType(pen as _, r#type as _) } } #[inline] pub unsafe fn GdipGetPenLineJoin(pen: *mut GpPen, linejoin: *mut LineJoin) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPenLineJoin(pen : *mut GpPen, linejoin : *mut LineJoin) -> Status); - unsafe { GdipGetPenLineJoin(core::mem::transmute(pen), core::mem::transmute(linejoin)) } + unsafe { GdipGetPenLineJoin(pen as _, linejoin as _) } } #[inline] pub unsafe fn GdipGetPenMiterLimit(pen: *mut GpPen, miterlimit: *mut f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPenMiterLimit(pen : *mut GpPen, miterlimit : *mut f32) -> Status); - unsafe { GdipGetPenMiterLimit(core::mem::transmute(pen), core::mem::transmute(miterlimit)) } + unsafe { GdipGetPenMiterLimit(pen as _, miterlimit as _) } } #[inline] pub unsafe fn GdipGetPenMode(pen: *mut GpPen, penmode: *mut PenAlignment) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPenMode(pen : *mut GpPen, penmode : *mut PenAlignment) -> Status); - unsafe { GdipGetPenMode(core::mem::transmute(pen), core::mem::transmute(penmode)) } + unsafe { GdipGetPenMode(pen as _, penmode as _) } } #[inline] pub unsafe fn GdipGetPenStartCap(pen: *mut GpPen, startcap: *mut LineCap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPenStartCap(pen : *mut GpPen, startcap : *mut LineCap) -> Status); - unsafe { GdipGetPenStartCap(core::mem::transmute(pen), core::mem::transmute(startcap)) } + unsafe { GdipGetPenStartCap(pen as _, startcap as _) } } #[inline] pub unsafe fn GdipGetPenTransform(pen: *mut GpPen, matrix: *mut Matrix) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPenTransform(pen : *mut GpPen, matrix : *mut Matrix) -> Status); - unsafe { GdipGetPenTransform(core::mem::transmute(pen), core::mem::transmute(matrix)) } + unsafe { GdipGetPenTransform(pen as _, matrix as _) } } #[inline] pub unsafe fn GdipGetPenUnit(pen: *mut GpPen, unit: *mut Unit) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPenUnit(pen : *mut GpPen, unit : *mut Unit) -> Status); - unsafe { GdipGetPenUnit(core::mem::transmute(pen), core::mem::transmute(unit)) } + unsafe { GdipGetPenUnit(pen as _, unit as _) } } #[inline] pub unsafe fn GdipGetPenWidth(pen: *mut GpPen, width: *mut f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPenWidth(pen : *mut GpPen, width : *mut f32) -> Status); - unsafe { GdipGetPenWidth(core::mem::transmute(pen), core::mem::transmute(width)) } + unsafe { GdipGetPenWidth(pen as _, width as _) } } #[inline] pub unsafe fn GdipGetPixelOffsetMode(graphics: *mut GpGraphics, pixeloffsetmode: *mut PixelOffsetMode) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPixelOffsetMode(graphics : *mut GpGraphics, pixeloffsetmode : *mut PixelOffsetMode) -> Status); - unsafe { GdipGetPixelOffsetMode(core::mem::transmute(graphics), core::mem::transmute(pixeloffsetmode)) } + unsafe { GdipGetPixelOffsetMode(graphics as _, pixeloffsetmode as _) } } #[inline] pub unsafe fn GdipGetPointCount(path: *mut GpPath, count: *mut i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPointCount(path : *mut GpPath, count : *mut i32) -> Status); - unsafe { GdipGetPointCount(core::mem::transmute(path), core::mem::transmute(count)) } + unsafe { GdipGetPointCount(path as _, count as _) } } #[inline] pub unsafe fn GdipGetPropertyCount(image: *mut GpImage, numofproperty: *mut u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPropertyCount(image : *mut GpImage, numofproperty : *mut u32) -> Status); - unsafe { GdipGetPropertyCount(core::mem::transmute(image), core::mem::transmute(numofproperty)) } + unsafe { GdipGetPropertyCount(image as _, numofproperty as _) } } #[inline] pub unsafe fn GdipGetPropertyIdList(image: *mut GpImage, numofproperty: u32, list: *mut u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPropertyIdList(image : *mut GpImage, numofproperty : u32, list : *mut u32) -> Status); - unsafe { GdipGetPropertyIdList(core::mem::transmute(image), numofproperty, core::mem::transmute(list)) } + unsafe { GdipGetPropertyIdList(image as _, numofproperty, list as _) } } #[inline] pub unsafe fn GdipGetPropertyItem(image: *mut GpImage, propid: u32, propsize: u32, buffer: *mut PropertyItem) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPropertyItem(image : *mut GpImage, propid : u32, propsize : u32, buffer : *mut PropertyItem) -> Status); - unsafe { GdipGetPropertyItem(core::mem::transmute(image), propid, propsize, core::mem::transmute(buffer)) } + unsafe { GdipGetPropertyItem(image as _, propid, propsize, buffer as _) } } #[inline] pub unsafe fn GdipGetPropertyItemSize(image: *mut GpImage, propid: u32, size: *mut u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPropertyItemSize(image : *mut GpImage, propid : u32, size : *mut u32) -> Status); - unsafe { GdipGetPropertyItemSize(core::mem::transmute(image), propid, core::mem::transmute(size)) } + unsafe { GdipGetPropertyItemSize(image as _, propid, size as _) } } #[inline] pub unsafe fn GdipGetPropertySize(image: *mut GpImage, totalbuffersize: *mut u32, numproperties: *mut u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetPropertySize(image : *mut GpImage, totalbuffersize : *mut u32, numproperties : *mut u32) -> Status); - unsafe { GdipGetPropertySize(core::mem::transmute(image), core::mem::transmute(totalbuffersize), core::mem::transmute(numproperties)) } + unsafe { GdipGetPropertySize(image as _, totalbuffersize as _, numproperties as _) } } #[inline] pub unsafe fn GdipGetRegionBounds(region: *mut GpRegion, graphics: *mut GpGraphics, rect: *mut RectF) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetRegionBounds(region : *mut GpRegion, graphics : *mut GpGraphics, rect : *mut RectF) -> Status); - unsafe { GdipGetRegionBounds(core::mem::transmute(region), core::mem::transmute(graphics), core::mem::transmute(rect)) } + unsafe { GdipGetRegionBounds(region as _, graphics as _, rect as _) } } #[inline] pub unsafe fn GdipGetRegionBoundsI(region: *mut GpRegion, graphics: *mut GpGraphics, rect: *mut Rect) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetRegionBoundsI(region : *mut GpRegion, graphics : *mut GpGraphics, rect : *mut Rect) -> Status); - unsafe { GdipGetRegionBoundsI(core::mem::transmute(region), core::mem::transmute(graphics), core::mem::transmute(rect)) } + unsafe { GdipGetRegionBoundsI(region as _, graphics as _, rect as _) } } #[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); - unsafe { 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()))) } + unsafe { GdipGetRegionData(region as _, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), sizefilled.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GdipGetRegionDataSize(region: *mut GpRegion, buffersize: *mut u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetRegionDataSize(region : *mut GpRegion, buffersize : *mut u32) -> Status); - unsafe { GdipGetRegionDataSize(core::mem::transmute(region), core::mem::transmute(buffersize)) } + unsafe { GdipGetRegionDataSize(region as _, buffersize as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn GdipGetRegionHRgn(region: *mut GpRegion, graphics: *mut GpGraphics, hrgn: *mut super::Gdi::HRGN) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetRegionHRgn(region : *mut GpRegion, graphics : *mut GpGraphics, hrgn : *mut super::Gdi:: HRGN) -> Status); - unsafe { GdipGetRegionHRgn(core::mem::transmute(region), core::mem::transmute(graphics), core::mem::transmute(hrgn)) } + unsafe { GdipGetRegionHRgn(region as _, graphics as _, hrgn as _) } } #[inline] pub unsafe fn GdipGetRegionScans(region: *mut GpRegion, rects: *mut RectF, count: *mut i32, matrix: *mut Matrix) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetRegionScans(region : *mut GpRegion, rects : *mut RectF, count : *mut i32, matrix : *mut Matrix) -> Status); - unsafe { GdipGetRegionScans(core::mem::transmute(region), core::mem::transmute(rects), core::mem::transmute(count), core::mem::transmute(matrix)) } + unsafe { GdipGetRegionScans(region as _, rects as _, count as _, matrix as _) } } #[inline] pub unsafe fn GdipGetRegionScansCount(region: *mut GpRegion, count: *mut u32, matrix: *mut Matrix) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetRegionScansCount(region : *mut GpRegion, count : *mut u32, matrix : *mut Matrix) -> Status); - unsafe { GdipGetRegionScansCount(core::mem::transmute(region), core::mem::transmute(count), core::mem::transmute(matrix)) } + unsafe { GdipGetRegionScansCount(region as _, count as _, matrix as _) } } #[inline] pub unsafe fn GdipGetRegionScansI(region: *mut GpRegion, rects: *mut Rect, count: *mut i32, matrix: *mut Matrix) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetRegionScansI(region : *mut GpRegion, rects : *mut Rect, count : *mut i32, matrix : *mut Matrix) -> Status); - unsafe { GdipGetRegionScansI(core::mem::transmute(region), core::mem::transmute(rects), core::mem::transmute(count), core::mem::transmute(matrix)) } + unsafe { GdipGetRegionScansI(region as _, rects as _, count as _, matrix as _) } } #[inline] pub unsafe fn GdipGetRenderingOrigin(graphics: *mut GpGraphics, x: *mut i32, y: *mut i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetRenderingOrigin(graphics : *mut GpGraphics, x : *mut i32, y : *mut i32) -> Status); - unsafe { GdipGetRenderingOrigin(core::mem::transmute(graphics), core::mem::transmute(x), core::mem::transmute(y)) } + unsafe { GdipGetRenderingOrigin(graphics as _, x as _, y as _) } } #[inline] pub unsafe fn GdipGetSmoothingMode(graphics: *mut GpGraphics, smoothingmode: *mut SmoothingMode) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetSmoothingMode(graphics : *mut GpGraphics, smoothingmode : *mut SmoothingMode) -> Status); - unsafe { GdipGetSmoothingMode(core::mem::transmute(graphics), core::mem::transmute(smoothingmode)) } + unsafe { GdipGetSmoothingMode(graphics as _, smoothingmode as _) } } #[inline] pub unsafe fn GdipGetSolidFillColor(brush: *mut GpSolidFill, color: *mut u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetSolidFillColor(brush : *mut GpSolidFill, color : *mut u32) -> Status); - unsafe { GdipGetSolidFillColor(core::mem::transmute(brush), core::mem::transmute(color)) } + unsafe { GdipGetSolidFillColor(brush as _, color as _) } } #[inline] pub unsafe fn GdipGetStringFormatAlign(format: *const GpStringFormat, align: *mut StringAlignment) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetStringFormatAlign(format : *const GpStringFormat, align : *mut StringAlignment) -> Status); - unsafe { GdipGetStringFormatAlign(format, core::mem::transmute(align)) } + unsafe { GdipGetStringFormatAlign(format, align as _) } } #[inline] pub unsafe fn GdipGetStringFormatDigitSubstitution(format: *const GpStringFormat, language: *mut u16, substitute: *mut StringDigitSubstitute) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetStringFormatDigitSubstitution(format : *const GpStringFormat, language : *mut u16, substitute : *mut StringDigitSubstitute) -> Status); - unsafe { GdipGetStringFormatDigitSubstitution(format, core::mem::transmute(language), core::mem::transmute(substitute)) } + unsafe { GdipGetStringFormatDigitSubstitution(format, language as _, substitute as _) } } #[inline] pub unsafe fn GdipGetStringFormatFlags(format: *const GpStringFormat, flags: *mut i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetStringFormatFlags(format : *const GpStringFormat, flags : *mut i32) -> Status); - unsafe { GdipGetStringFormatFlags(format, core::mem::transmute(flags)) } + unsafe { GdipGetStringFormatFlags(format, flags as _) } } #[inline] pub unsafe fn GdipGetStringFormatHotkeyPrefix(format: *const GpStringFormat, hotkeyprefix: *mut i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetStringFormatHotkeyPrefix(format : *const GpStringFormat, hotkeyprefix : *mut i32) -> Status); - unsafe { GdipGetStringFormatHotkeyPrefix(format, core::mem::transmute(hotkeyprefix)) } + unsafe { GdipGetStringFormatHotkeyPrefix(format, hotkeyprefix as _) } } #[inline] pub unsafe fn GdipGetStringFormatLineAlign(format: *const GpStringFormat, align: *mut StringAlignment) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetStringFormatLineAlign(format : *const GpStringFormat, align : *mut StringAlignment) -> Status); - unsafe { GdipGetStringFormatLineAlign(format, core::mem::transmute(align)) } + unsafe { GdipGetStringFormatLineAlign(format, align as _) } } #[inline] pub unsafe fn GdipGetStringFormatMeasurableCharacterRangeCount(format: *const GpStringFormat, count: *mut i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetStringFormatMeasurableCharacterRangeCount(format : *const GpStringFormat, count : *mut i32) -> Status); - unsafe { GdipGetStringFormatMeasurableCharacterRangeCount(format, core::mem::transmute(count)) } + unsafe { GdipGetStringFormatMeasurableCharacterRangeCount(format, count as _) } } #[inline] pub unsafe fn GdipGetStringFormatTabStopCount(format: *const GpStringFormat, count: *mut i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetStringFormatTabStopCount(format : *const GpStringFormat, count : *mut i32) -> Status); - unsafe { GdipGetStringFormatTabStopCount(format, core::mem::transmute(count)) } + unsafe { GdipGetStringFormatTabStopCount(format, count as _) } } #[inline] pub unsafe fn GdipGetStringFormatTabStops(format: *const GpStringFormat, count: i32, firsttaboffset: *mut f32, tabstops: *mut f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetStringFormatTabStops(format : *const GpStringFormat, count : i32, firsttaboffset : *mut f32, tabstops : *mut f32) -> Status); - unsafe { GdipGetStringFormatTabStops(format, count, core::mem::transmute(firsttaboffset), core::mem::transmute(tabstops)) } + unsafe { GdipGetStringFormatTabStops(format, count, firsttaboffset as _, tabstops as _) } } #[inline] pub unsafe fn GdipGetStringFormatTrimming(format: *const GpStringFormat, trimming: *mut StringTrimming) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetStringFormatTrimming(format : *const GpStringFormat, trimming : *mut StringTrimming) -> Status); - unsafe { GdipGetStringFormatTrimming(format, core::mem::transmute(trimming)) } + unsafe { GdipGetStringFormatTrimming(format, trimming as _) } } #[inline] pub unsafe fn GdipGetTextContrast(graphics: *mut GpGraphics, contrast: *mut u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetTextContrast(graphics : *mut GpGraphics, contrast : *mut u32) -> Status); - unsafe { GdipGetTextContrast(core::mem::transmute(graphics), core::mem::transmute(contrast)) } + unsafe { GdipGetTextContrast(graphics as _, contrast as _) } } #[inline] pub unsafe fn GdipGetTextRenderingHint(graphics: *mut GpGraphics, mode: *mut TextRenderingHint) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetTextRenderingHint(graphics : *mut GpGraphics, mode : *mut TextRenderingHint) -> Status); - unsafe { GdipGetTextRenderingHint(core::mem::transmute(graphics), core::mem::transmute(mode)) } + unsafe { GdipGetTextRenderingHint(graphics as _, mode as _) } } #[inline] pub unsafe fn GdipGetTextureImage(brush: *mut GpTexture, image: *mut *mut GpImage) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetTextureImage(brush : *mut GpTexture, image : *mut *mut GpImage) -> Status); - unsafe { GdipGetTextureImage(core::mem::transmute(brush), core::mem::transmute(image)) } + unsafe { GdipGetTextureImage(brush as _, image as _) } } #[inline] pub unsafe fn GdipGetTextureTransform(brush: *mut GpTexture, matrix: *mut Matrix) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetTextureTransform(brush : *mut GpTexture, matrix : *mut Matrix) -> Status); - unsafe { GdipGetTextureTransform(core::mem::transmute(brush), core::mem::transmute(matrix)) } + unsafe { GdipGetTextureTransform(brush as _, matrix as _) } } #[inline] pub unsafe fn GdipGetTextureWrapMode(brush: *mut GpTexture, wrapmode: *mut WrapMode) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetTextureWrapMode(brush : *mut GpTexture, wrapmode : *mut WrapMode) -> Status); - unsafe { GdipGetTextureWrapMode(core::mem::transmute(brush), core::mem::transmute(wrapmode)) } + unsafe { GdipGetTextureWrapMode(brush as _, wrapmode as _) } } #[inline] pub unsafe fn GdipGetVisibleClipBounds(graphics: *mut GpGraphics, rect: *mut RectF) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetVisibleClipBounds(graphics : *mut GpGraphics, rect : *mut RectF) -> Status); - unsafe { GdipGetVisibleClipBounds(core::mem::transmute(graphics), core::mem::transmute(rect)) } + unsafe { GdipGetVisibleClipBounds(graphics as _, rect as _) } } #[inline] pub unsafe fn GdipGetVisibleClipBoundsI(graphics: *mut GpGraphics, rect: *mut Rect) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetVisibleClipBoundsI(graphics : *mut GpGraphics, rect : *mut Rect) -> Status); - unsafe { GdipGetVisibleClipBoundsI(core::mem::transmute(graphics), core::mem::transmute(rect)) } + unsafe { GdipGetVisibleClipBoundsI(graphics as _, rect as _) } } #[inline] pub unsafe fn GdipGetWorldTransform(graphics: *mut GpGraphics, matrix: *mut Matrix) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetWorldTransform(graphics : *mut GpGraphics, matrix : *mut Matrix) -> Status); - unsafe { GdipGetWorldTransform(core::mem::transmute(graphics), core::mem::transmute(matrix)) } + unsafe { GdipGetWorldTransform(graphics as _, matrix as _) } } #[inline] pub unsafe fn GdipGraphicsClear(graphics: *mut GpGraphics, color: u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGraphicsClear(graphics : *mut GpGraphics, color : u32) -> Status); - unsafe { GdipGraphicsClear(core::mem::transmute(graphics), color) } + unsafe { GdipGraphicsClear(graphics as _, color) } } #[inline] pub unsafe fn GdipGraphicsSetAbort(pgraphics: *mut GpGraphics, piabort: P1) -> Status @@ -2124,37 +2124,37 @@ where P1: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipGraphicsSetAbort(pgraphics : *mut GpGraphics, piabort : * mut core::ffi::c_void) -> Status); - unsafe { GdipGraphicsSetAbort(core::mem::transmute(pgraphics), piabort.param().abi()) } + unsafe { GdipGraphicsSetAbort(pgraphics as _, piabort.param().abi()) } } #[inline] pub unsafe fn GdipImageForceValidation(image: *mut GpImage) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipImageForceValidation(image : *mut GpImage) -> Status); - unsafe { GdipImageForceValidation(core::mem::transmute(image)) } + unsafe { GdipImageForceValidation(image as _) } } #[inline] pub unsafe fn GdipImageGetFrameCount(image: *mut GpImage, dimensionid: *const windows_core::GUID, count: *mut u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipImageGetFrameCount(image : *mut GpImage, dimensionid : *const windows_core::GUID, count : *mut u32) -> Status); - unsafe { GdipImageGetFrameCount(core::mem::transmute(image), dimensionid, core::mem::transmute(count)) } + unsafe { GdipImageGetFrameCount(image as _, dimensionid, count as _) } } #[inline] pub unsafe fn GdipImageGetFrameDimensionsCount(image: *mut GpImage, count: *mut u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipImageGetFrameDimensionsCount(image : *mut GpImage, count : *mut u32) -> Status); - unsafe { GdipImageGetFrameDimensionsCount(core::mem::transmute(image), core::mem::transmute(count)) } + unsafe { GdipImageGetFrameDimensionsCount(image as _, count as _) } } #[inline] pub unsafe fn GdipImageGetFrameDimensionsList(image: *mut GpImage, dimensionids: *mut windows_core::GUID, count: u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipImageGetFrameDimensionsList(image : *mut GpImage, dimensionids : *mut windows_core::GUID, count : u32) -> Status); - unsafe { GdipImageGetFrameDimensionsList(core::mem::transmute(image), core::mem::transmute(dimensionids), count) } + unsafe { GdipImageGetFrameDimensionsList(image as _, dimensionids as _, count) } } #[inline] pub unsafe fn GdipImageRotateFlip(image: *mut GpImage, rftype: RotateFlipType) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipImageRotateFlip(image : *mut GpImage, rftype : RotateFlipType) -> Status); - unsafe { GdipImageRotateFlip(core::mem::transmute(image), rftype) } + unsafe { GdipImageRotateFlip(image as _, rftype) } } #[inline] pub unsafe fn GdipImageSelectActiveFrame(image: *mut GpImage, dimensionid: *const windows_core::GUID, frameindex: u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipImageSelectActiveFrame(image : *mut GpImage, dimensionid : *const windows_core::GUID, frameindex : u32) -> Status); - unsafe { GdipImageSelectActiveFrame(core::mem::transmute(image), dimensionid, frameindex) } + unsafe { GdipImageSelectActiveFrame(image as _, dimensionid, frameindex) } } #[inline] pub unsafe fn GdipImageSetAbort(pimage: *mut GpImage, piabort: P1) -> Status @@ -2162,122 +2162,122 @@ where P1: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipImageSetAbort(pimage : *mut GpImage, piabort : * mut core::ffi::c_void) -> Status); - unsafe { GdipImageSetAbort(core::mem::transmute(pimage), piabort.param().abi()) } + unsafe { GdipImageSetAbort(pimage as _, piabort.param().abi()) } } #[inline] pub unsafe fn GdipInitializePalette(palette: *mut ColorPalette, palettetype: PaletteType, optimalcolors: i32, usetransparentcolor: bool, bitmap: *mut GpBitmap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipInitializePalette(palette : *mut ColorPalette, palettetype : PaletteType, optimalcolors : i32, usetransparentcolor : super::super::Foundation:: BOOL, bitmap : *mut GpBitmap) -> Status); - unsafe { GdipInitializePalette(core::mem::transmute(palette), palettetype, optimalcolors, usetransparentcolor.into(), core::mem::transmute(bitmap)) } + unsafe { GdipInitializePalette(palette as _, palettetype, optimalcolors, usetransparentcolor.into(), bitmap as _) } } #[inline] pub unsafe fn GdipInvertMatrix(matrix: *mut Matrix) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipInvertMatrix(matrix : *mut Matrix) -> Status); - unsafe { GdipInvertMatrix(core::mem::transmute(matrix)) } + unsafe { GdipInvertMatrix(matrix as _) } } #[inline] pub unsafe fn GdipIsClipEmpty(graphics: *mut GpGraphics, result: *mut super::super::Foundation::BOOL) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipIsClipEmpty(graphics : *mut GpGraphics, result : *mut super::super::Foundation:: BOOL) -> Status); - unsafe { GdipIsClipEmpty(core::mem::transmute(graphics), core::mem::transmute(result)) } + unsafe { GdipIsClipEmpty(graphics as _, result as _) } } #[inline] pub unsafe fn GdipIsEmptyRegion(region: *mut GpRegion, graphics: *mut GpGraphics, result: *mut super::super::Foundation::BOOL) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipIsEmptyRegion(region : *mut GpRegion, graphics : *mut GpGraphics, result : *mut super::super::Foundation:: BOOL) -> Status); - unsafe { GdipIsEmptyRegion(core::mem::transmute(region), core::mem::transmute(graphics), core::mem::transmute(result)) } + unsafe { GdipIsEmptyRegion(region as _, graphics as _, result as _) } } #[inline] pub unsafe fn GdipIsEqualRegion(region: *mut GpRegion, region2: *mut GpRegion, graphics: *mut GpGraphics, result: *mut super::super::Foundation::BOOL) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipIsEqualRegion(region : *mut GpRegion, region2 : *mut GpRegion, graphics : *mut GpGraphics, result : *mut super::super::Foundation:: BOOL) -> Status); - unsafe { GdipIsEqualRegion(core::mem::transmute(region), core::mem::transmute(region2), core::mem::transmute(graphics), core::mem::transmute(result)) } + unsafe { GdipIsEqualRegion(region as _, region2 as _, graphics as _, result as _) } } #[inline] pub unsafe fn GdipIsInfiniteRegion(region: *mut GpRegion, graphics: *mut GpGraphics, result: *mut super::super::Foundation::BOOL) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipIsInfiniteRegion(region : *mut GpRegion, graphics : *mut GpGraphics, result : *mut super::super::Foundation:: BOOL) -> Status); - unsafe { GdipIsInfiniteRegion(core::mem::transmute(region), core::mem::transmute(graphics), core::mem::transmute(result)) } + unsafe { GdipIsInfiniteRegion(region as _, graphics as _, result as _) } } #[inline] pub unsafe fn GdipIsMatrixEqual(matrix: *const Matrix, matrix2: *const Matrix, result: *mut super::super::Foundation::BOOL) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipIsMatrixEqual(matrix : *const Matrix, matrix2 : *const Matrix, result : *mut super::super::Foundation:: BOOL) -> Status); - unsafe { GdipIsMatrixEqual(matrix, matrix2, core::mem::transmute(result)) } + unsafe { GdipIsMatrixEqual(matrix, matrix2, result as _) } } #[inline] pub unsafe fn GdipIsMatrixIdentity(matrix: *const Matrix, result: *mut super::super::Foundation::BOOL) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipIsMatrixIdentity(matrix : *const Matrix, result : *mut super::super::Foundation:: BOOL) -> Status); - unsafe { GdipIsMatrixIdentity(matrix, core::mem::transmute(result)) } + unsafe { GdipIsMatrixIdentity(matrix, result as _) } } #[inline] pub unsafe fn GdipIsMatrixInvertible(matrix: *const Matrix, result: *mut super::super::Foundation::BOOL) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipIsMatrixInvertible(matrix : *const Matrix, result : *mut super::super::Foundation:: BOOL) -> Status); - unsafe { GdipIsMatrixInvertible(matrix, core::mem::transmute(result)) } + unsafe { GdipIsMatrixInvertible(matrix, result as _) } } #[inline] pub unsafe fn GdipIsOutlineVisiblePathPoint(path: *mut GpPath, x: f32, y: f32, pen: *mut GpPen, graphics: *mut GpGraphics, result: *mut super::super::Foundation::BOOL) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipIsOutlineVisiblePathPoint(path : *mut GpPath, x : f32, y : f32, pen : *mut GpPen, graphics : *mut GpGraphics, result : *mut super::super::Foundation:: BOOL) -> Status); - unsafe { GdipIsOutlineVisiblePathPoint(core::mem::transmute(path), x, y, core::mem::transmute(pen), core::mem::transmute(graphics), core::mem::transmute(result)) } + unsafe { GdipIsOutlineVisiblePathPoint(path as _, x, y, pen as _, graphics as _, result as _) } } #[inline] pub unsafe fn GdipIsOutlineVisiblePathPointI(path: *mut GpPath, x: i32, y: i32, pen: *mut GpPen, graphics: *mut GpGraphics, result: *mut super::super::Foundation::BOOL) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipIsOutlineVisiblePathPointI(path : *mut GpPath, x : i32, y : i32, pen : *mut GpPen, graphics : *mut GpGraphics, result : *mut super::super::Foundation:: BOOL) -> Status); - unsafe { GdipIsOutlineVisiblePathPointI(core::mem::transmute(path), x, y, core::mem::transmute(pen), core::mem::transmute(graphics), core::mem::transmute(result)) } + unsafe { GdipIsOutlineVisiblePathPointI(path as _, x, y, pen as _, graphics as _, result as _) } } #[inline] pub unsafe fn GdipIsStyleAvailable(family: *const GpFontFamily, style: i32, isstyleavailable: *mut super::super::Foundation::BOOL) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipIsStyleAvailable(family : *const GpFontFamily, style : i32, isstyleavailable : *mut super::super::Foundation:: BOOL) -> Status); - unsafe { GdipIsStyleAvailable(family, style, core::mem::transmute(isstyleavailable)) } + unsafe { GdipIsStyleAvailable(family, style, isstyleavailable as _) } } #[inline] pub unsafe fn GdipIsVisibleClipEmpty(graphics: *mut GpGraphics, result: *mut super::super::Foundation::BOOL) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipIsVisibleClipEmpty(graphics : *mut GpGraphics, result : *mut super::super::Foundation:: BOOL) -> Status); - unsafe { GdipIsVisibleClipEmpty(core::mem::transmute(graphics), core::mem::transmute(result)) } + unsafe { GdipIsVisibleClipEmpty(graphics as _, result as _) } } #[inline] pub unsafe fn GdipIsVisiblePathPoint(path: *mut GpPath, x: f32, y: f32, graphics: *mut GpGraphics, result: *mut super::super::Foundation::BOOL) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipIsVisiblePathPoint(path : *mut GpPath, x : f32, y : f32, graphics : *mut GpGraphics, result : *mut super::super::Foundation:: BOOL) -> Status); - unsafe { GdipIsVisiblePathPoint(core::mem::transmute(path), x, y, core::mem::transmute(graphics), core::mem::transmute(result)) } + unsafe { GdipIsVisiblePathPoint(path as _, x, y, graphics as _, result as _) } } #[inline] pub unsafe fn GdipIsVisiblePathPointI(path: *mut GpPath, x: i32, y: i32, graphics: *mut GpGraphics, result: *mut super::super::Foundation::BOOL) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipIsVisiblePathPointI(path : *mut GpPath, x : i32, y : i32, graphics : *mut GpGraphics, result : *mut super::super::Foundation:: BOOL) -> Status); - unsafe { GdipIsVisiblePathPointI(core::mem::transmute(path), x, y, core::mem::transmute(graphics), core::mem::transmute(result)) } + unsafe { GdipIsVisiblePathPointI(path as _, x, y, graphics as _, result as _) } } #[inline] pub unsafe fn GdipIsVisiblePoint(graphics: *mut GpGraphics, x: f32, y: f32, result: *mut super::super::Foundation::BOOL) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipIsVisiblePoint(graphics : *mut GpGraphics, x : f32, y : f32, result : *mut super::super::Foundation:: BOOL) -> Status); - unsafe { GdipIsVisiblePoint(core::mem::transmute(graphics), x, y, core::mem::transmute(result)) } + unsafe { GdipIsVisiblePoint(graphics as _, x, y, result as _) } } #[inline] pub unsafe fn GdipIsVisiblePointI(graphics: *mut GpGraphics, x: i32, y: i32, result: *mut super::super::Foundation::BOOL) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipIsVisiblePointI(graphics : *mut GpGraphics, x : i32, y : i32, result : *mut super::super::Foundation:: BOOL) -> Status); - unsafe { GdipIsVisiblePointI(core::mem::transmute(graphics), x, y, core::mem::transmute(result)) } + unsafe { GdipIsVisiblePointI(graphics as _, x, y, result as _) } } #[inline] pub unsafe fn GdipIsVisibleRect(graphics: *mut GpGraphics, x: f32, y: f32, width: f32, height: f32, result: *mut super::super::Foundation::BOOL) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipIsVisibleRect(graphics : *mut GpGraphics, x : f32, y : f32, width : f32, height : f32, result : *mut super::super::Foundation:: BOOL) -> Status); - unsafe { GdipIsVisibleRect(core::mem::transmute(graphics), x, y, width, height, core::mem::transmute(result)) } + unsafe { GdipIsVisibleRect(graphics as _, x, y, width, height, result as _) } } #[inline] pub unsafe fn GdipIsVisibleRectI(graphics: *mut GpGraphics, x: i32, y: i32, width: i32, height: i32, result: *mut super::super::Foundation::BOOL) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipIsVisibleRectI(graphics : *mut GpGraphics, x : i32, y : i32, width : i32, height : i32, result : *mut super::super::Foundation:: BOOL) -> Status); - unsafe { GdipIsVisibleRectI(core::mem::transmute(graphics), x, y, width, height, core::mem::transmute(result)) } + unsafe { GdipIsVisibleRectI(graphics as _, x, y, width, height, result as _) } } #[inline] pub unsafe fn GdipIsVisibleRegionPoint(region: *mut GpRegion, x: f32, y: f32, graphics: *mut GpGraphics, result: *mut super::super::Foundation::BOOL) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipIsVisibleRegionPoint(region : *mut GpRegion, x : f32, y : f32, graphics : *mut GpGraphics, result : *mut super::super::Foundation:: BOOL) -> Status); - unsafe { GdipIsVisibleRegionPoint(core::mem::transmute(region), x, y, core::mem::transmute(graphics), core::mem::transmute(result)) } + unsafe { GdipIsVisibleRegionPoint(region as _, x, y, graphics as _, result as _) } } #[inline] pub unsafe fn GdipIsVisibleRegionPointI(region: *mut GpRegion, x: i32, y: i32, graphics: *mut GpGraphics, result: *mut super::super::Foundation::BOOL) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipIsVisibleRegionPointI(region : *mut GpRegion, x : i32, y : i32, graphics : *mut GpGraphics, result : *mut super::super::Foundation:: BOOL) -> Status); - unsafe { GdipIsVisibleRegionPointI(core::mem::transmute(region), x, y, core::mem::transmute(graphics), core::mem::transmute(result)) } + unsafe { GdipIsVisibleRegionPointI(region as _, x, y, graphics as _, result as _) } } #[inline] pub unsafe fn GdipIsVisibleRegionRect(region: *mut GpRegion, x: f32, y: f32, width: f32, height: f32, graphics: *mut GpGraphics, result: *mut super::super::Foundation::BOOL) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipIsVisibleRegionRect(region : *mut GpRegion, x : f32, y : f32, width : f32, height : f32, graphics : *mut GpGraphics, result : *mut super::super::Foundation:: BOOL) -> Status); - unsafe { GdipIsVisibleRegionRect(core::mem::transmute(region), x, y, width, height, core::mem::transmute(graphics), core::mem::transmute(result)) } + unsafe { GdipIsVisibleRegionRect(region as _, x, y, width, height, graphics as _, result as _) } } #[inline] pub unsafe fn GdipIsVisibleRegionRectI(region: *mut GpRegion, x: i32, y: i32, width: i32, height: i32, graphics: *mut GpGraphics, result: *mut super::super::Foundation::BOOL) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipIsVisibleRegionRectI(region : *mut GpRegion, x : i32, y : i32, width : i32, height : i32, graphics : *mut GpGraphics, result : *mut super::super::Foundation:: BOOL) -> Status); - unsafe { GdipIsVisibleRegionRectI(core::mem::transmute(region), x, y, width, height, core::mem::transmute(graphics), core::mem::transmute(result)) } + unsafe { GdipIsVisibleRegionRectI(region as _, x, y, width, height, graphics as _, result as _) } } #[inline] pub unsafe fn GdipLoadImageFromFile(filename: P0, image: *mut *mut GpImage) -> Status @@ -2285,7 +2285,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipLoadImageFromFile(filename : windows_core::PCWSTR, image : *mut *mut GpImage) -> Status); - unsafe { GdipLoadImageFromFile(filename.param().abi(), core::mem::transmute(image)) } + unsafe { GdipLoadImageFromFile(filename.param().abi(), image as _) } } #[inline] pub unsafe fn GdipLoadImageFromFileICM(filename: P0, image: *mut *mut GpImage) -> Status @@ -2293,7 +2293,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipLoadImageFromFileICM(filename : windows_core::PCWSTR, image : *mut *mut GpImage) -> Status); - unsafe { GdipLoadImageFromFileICM(filename.param().abi(), core::mem::transmute(image)) } + unsafe { GdipLoadImageFromFileICM(filename.param().abi(), image as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -2302,7 +2302,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipLoadImageFromStream(stream : * mut core::ffi::c_void, image : *mut *mut GpImage) -> Status); - unsafe { GdipLoadImageFromStream(stream.param().abi(), core::mem::transmute(image)) } + unsafe { GdipLoadImageFromStream(stream.param().abi(), image as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -2311,7 +2311,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipLoadImageFromStreamICM(stream : * mut core::ffi::c_void, image : *mut *mut GpImage) -> Status); - unsafe { GdipLoadImageFromStreamICM(stream.param().abi(), core::mem::transmute(image)) } + unsafe { GdipLoadImageFromStreamICM(stream.param().abi(), image as _) } } #[inline] pub unsafe fn GdipMeasureCharacterRanges(graphics: *mut GpGraphics, string: P1, length: i32, font: *const GpFont, layoutrect: *const RectF, stringformat: *const GpStringFormat, regioncount: i32, regions: *mut *mut GpRegion) -> Status @@ -2319,12 +2319,12 @@ where P1: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipMeasureCharacterRanges(graphics : *mut GpGraphics, string : windows_core::PCWSTR, length : i32, font : *const GpFont, layoutrect : *const RectF, stringformat : *const GpStringFormat, regioncount : i32, regions : *mut *mut GpRegion) -> Status); - unsafe { GdipMeasureCharacterRanges(core::mem::transmute(graphics), string.param().abi(), length, font, layoutrect, stringformat, regioncount, core::mem::transmute(regions)) } + unsafe { GdipMeasureCharacterRanges(graphics as _, string.param().abi(), length, font, layoutrect, stringformat, regioncount, regions as _) } } #[inline] pub unsafe fn GdipMeasureDriverString(graphics: *mut GpGraphics, text: *const u16, length: i32, font: *const GpFont, positions: *const PointF, flags: i32, matrix: *const Matrix, boundingbox: *mut RectF) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipMeasureDriverString(graphics : *mut GpGraphics, text : *const u16, length : i32, font : *const GpFont, positions : *const PointF, flags : i32, matrix : *const Matrix, boundingbox : *mut RectF) -> Status); - unsafe { GdipMeasureDriverString(core::mem::transmute(graphics), text, length, font, positions, flags, matrix, core::mem::transmute(boundingbox)) } + unsafe { GdipMeasureDriverString(graphics as _, text, length, font, positions, flags, matrix, boundingbox as _) } } #[inline] pub unsafe fn GdipMeasureString(graphics: *mut GpGraphics, string: P1, length: i32, font: *const GpFont, layoutrect: *const RectF, stringformat: *const GpStringFormat, boundingbox: *mut RectF, codepointsfitted: *mut i32, linesfilled: *mut i32) -> Status @@ -2332,107 +2332,107 @@ where P1: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipMeasureString(graphics : *mut GpGraphics, string : windows_core::PCWSTR, length : i32, font : *const GpFont, layoutrect : *const RectF, stringformat : *const GpStringFormat, boundingbox : *mut RectF, codepointsfitted : *mut i32, linesfilled : *mut i32) -> Status); - unsafe { GdipMeasureString(core::mem::transmute(graphics), string.param().abi(), length, font, layoutrect, stringformat, core::mem::transmute(boundingbox), core::mem::transmute(codepointsfitted), core::mem::transmute(linesfilled)) } + unsafe { GdipMeasureString(graphics as _, string.param().abi(), length, font, layoutrect, stringformat, boundingbox as _, codepointsfitted as _, linesfilled as _) } } #[inline] pub unsafe fn GdipMultiplyLineTransform(brush: *mut GpLineGradient, matrix: *const Matrix, order: MatrixOrder) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipMultiplyLineTransform(brush : *mut GpLineGradient, matrix : *const Matrix, order : MatrixOrder) -> Status); - unsafe { GdipMultiplyLineTransform(core::mem::transmute(brush), matrix, order) } + unsafe { GdipMultiplyLineTransform(brush as _, matrix, order) } } #[inline] pub unsafe fn GdipMultiplyMatrix(matrix: *mut Matrix, matrix2: *mut Matrix, order: MatrixOrder) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipMultiplyMatrix(matrix : *mut Matrix, matrix2 : *mut Matrix, order : MatrixOrder) -> Status); - unsafe { GdipMultiplyMatrix(core::mem::transmute(matrix), core::mem::transmute(matrix2), order) } + unsafe { GdipMultiplyMatrix(matrix as _, matrix2 as _, order) } } #[inline] pub unsafe fn GdipMultiplyPathGradientTransform(brush: *mut GpPathGradient, matrix: *const Matrix, order: MatrixOrder) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipMultiplyPathGradientTransform(brush : *mut GpPathGradient, matrix : *const Matrix, order : MatrixOrder) -> Status); - unsafe { GdipMultiplyPathGradientTransform(core::mem::transmute(brush), matrix, order) } + unsafe { GdipMultiplyPathGradientTransform(brush as _, matrix, order) } } #[inline] pub unsafe fn GdipMultiplyPenTransform(pen: *mut GpPen, matrix: *const Matrix, order: MatrixOrder) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipMultiplyPenTransform(pen : *mut GpPen, matrix : *const Matrix, order : MatrixOrder) -> Status); - unsafe { GdipMultiplyPenTransform(core::mem::transmute(pen), matrix, order) } + unsafe { GdipMultiplyPenTransform(pen as _, matrix, order) } } #[inline] pub unsafe fn GdipMultiplyTextureTransform(brush: *mut GpTexture, matrix: *const Matrix, order: MatrixOrder) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipMultiplyTextureTransform(brush : *mut GpTexture, matrix : *const Matrix, order : MatrixOrder) -> Status); - unsafe { GdipMultiplyTextureTransform(core::mem::transmute(brush), matrix, order) } + unsafe { GdipMultiplyTextureTransform(brush as _, matrix, order) } } #[inline] pub unsafe fn GdipMultiplyWorldTransform(graphics: *mut GpGraphics, matrix: *const Matrix, order: MatrixOrder) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipMultiplyWorldTransform(graphics : *mut GpGraphics, matrix : *const Matrix, order : MatrixOrder) -> Status); - unsafe { GdipMultiplyWorldTransform(core::mem::transmute(graphics), matrix, order) } + unsafe { GdipMultiplyWorldTransform(graphics as _, matrix, order) } } #[inline] pub unsafe fn GdipNewInstalledFontCollection(fontcollection: *mut *mut GpFontCollection) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipNewInstalledFontCollection(fontcollection : *mut *mut GpFontCollection) -> Status); - unsafe { GdipNewInstalledFontCollection(core::mem::transmute(fontcollection)) } + unsafe { GdipNewInstalledFontCollection(fontcollection as _) } } #[inline] pub unsafe fn GdipNewPrivateFontCollection(fontcollection: *mut *mut GpFontCollection) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipNewPrivateFontCollection(fontcollection : *mut *mut GpFontCollection) -> Status); - unsafe { GdipNewPrivateFontCollection(core::mem::transmute(fontcollection)) } + unsafe { GdipNewPrivateFontCollection(fontcollection as _) } } #[inline] pub unsafe fn GdipPathIterCopyData(iterator: *mut GpPathIterator, resultcount: *mut i32, points: *mut PointF, types: *mut u8, startindex: i32, endindex: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipPathIterCopyData(iterator : *mut GpPathIterator, resultcount : *mut i32, points : *mut PointF, types : *mut u8, startindex : i32, endindex : i32) -> Status); - unsafe { GdipPathIterCopyData(core::mem::transmute(iterator), core::mem::transmute(resultcount), core::mem::transmute(points), core::mem::transmute(types), startindex, endindex) } + unsafe { GdipPathIterCopyData(iterator as _, resultcount as _, points as _, types as _, startindex, endindex) } } #[inline] pub unsafe fn GdipPathIterEnumerate(iterator: *mut GpPathIterator, resultcount: *mut i32, points: *mut PointF, types: *mut u8, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipPathIterEnumerate(iterator : *mut GpPathIterator, resultcount : *mut i32, points : *mut PointF, types : *mut u8, count : i32) -> Status); - unsafe { GdipPathIterEnumerate(core::mem::transmute(iterator), core::mem::transmute(resultcount), core::mem::transmute(points), core::mem::transmute(types), count) } + unsafe { GdipPathIterEnumerate(iterator as _, resultcount as _, points as _, types as _, count) } } #[inline] pub unsafe fn GdipPathIterGetCount(iterator: *mut GpPathIterator, count: *mut i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipPathIterGetCount(iterator : *mut GpPathIterator, count : *mut i32) -> Status); - unsafe { GdipPathIterGetCount(core::mem::transmute(iterator), core::mem::transmute(count)) } + unsafe { GdipPathIterGetCount(iterator as _, count as _) } } #[inline] pub unsafe fn GdipPathIterGetSubpathCount(iterator: *mut GpPathIterator, count: *mut i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipPathIterGetSubpathCount(iterator : *mut GpPathIterator, count : *mut i32) -> Status); - unsafe { GdipPathIterGetSubpathCount(core::mem::transmute(iterator), core::mem::transmute(count)) } + unsafe { GdipPathIterGetSubpathCount(iterator as _, count as _) } } #[inline] pub unsafe fn GdipPathIterHasCurve(iterator: *mut GpPathIterator, hascurve: *mut super::super::Foundation::BOOL) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipPathIterHasCurve(iterator : *mut GpPathIterator, hascurve : *mut super::super::Foundation:: BOOL) -> Status); - unsafe { GdipPathIterHasCurve(core::mem::transmute(iterator), core::mem::transmute(hascurve)) } + unsafe { GdipPathIterHasCurve(iterator as _, hascurve as _) } } #[inline] pub unsafe fn GdipPathIterIsValid(iterator: *mut GpPathIterator, valid: *mut super::super::Foundation::BOOL) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipPathIterIsValid(iterator : *mut GpPathIterator, valid : *mut super::super::Foundation:: BOOL) -> Status); - unsafe { GdipPathIterIsValid(core::mem::transmute(iterator), core::mem::transmute(valid)) } + unsafe { GdipPathIterIsValid(iterator as _, valid as _) } } #[inline] pub unsafe fn GdipPathIterNextMarker(iterator: *mut GpPathIterator, resultcount: *mut i32, startindex: *mut i32, endindex: *mut i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipPathIterNextMarker(iterator : *mut GpPathIterator, resultcount : *mut i32, startindex : *mut i32, endindex : *mut i32) -> Status); - unsafe { GdipPathIterNextMarker(core::mem::transmute(iterator), core::mem::transmute(resultcount), core::mem::transmute(startindex), core::mem::transmute(endindex)) } + unsafe { GdipPathIterNextMarker(iterator as _, resultcount as _, startindex as _, endindex as _) } } #[inline] pub unsafe fn GdipPathIterNextMarkerPath(iterator: *mut GpPathIterator, resultcount: *mut i32, path: *mut GpPath) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipPathIterNextMarkerPath(iterator : *mut GpPathIterator, resultcount : *mut i32, path : *mut GpPath) -> Status); - unsafe { GdipPathIterNextMarkerPath(core::mem::transmute(iterator), core::mem::transmute(resultcount), core::mem::transmute(path)) } + unsafe { GdipPathIterNextMarkerPath(iterator as _, resultcount as _, path as _) } } #[inline] pub unsafe fn GdipPathIterNextPathType(iterator: *mut GpPathIterator, resultcount: *mut i32, pathtype: *mut u8, startindex: *mut i32, endindex: *mut i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipPathIterNextPathType(iterator : *mut GpPathIterator, resultcount : *mut i32, pathtype : *mut u8, startindex : *mut i32, endindex : *mut i32) -> Status); - unsafe { GdipPathIterNextPathType(core::mem::transmute(iterator), core::mem::transmute(resultcount), core::mem::transmute(pathtype), core::mem::transmute(startindex), core::mem::transmute(endindex)) } + unsafe { GdipPathIterNextPathType(iterator as _, resultcount as _, pathtype as _, startindex as _, endindex as _) } } #[inline] pub unsafe fn GdipPathIterNextSubpath(iterator: *mut GpPathIterator, resultcount: *mut i32, startindex: *mut i32, endindex: *mut i32, isclosed: *mut super::super::Foundation::BOOL) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipPathIterNextSubpath(iterator : *mut GpPathIterator, resultcount : *mut i32, startindex : *mut i32, endindex : *mut i32, isclosed : *mut super::super::Foundation:: BOOL) -> Status); - unsafe { GdipPathIterNextSubpath(core::mem::transmute(iterator), core::mem::transmute(resultcount), core::mem::transmute(startindex), core::mem::transmute(endindex), core::mem::transmute(isclosed)) } + unsafe { GdipPathIterNextSubpath(iterator as _, resultcount as _, startindex as _, endindex as _, isclosed as _) } } #[inline] pub unsafe fn GdipPathIterNextSubpathPath(iterator: *mut GpPathIterator, resultcount: *mut i32, path: *mut GpPath, isclosed: *mut super::super::Foundation::BOOL) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipPathIterNextSubpathPath(iterator : *mut GpPathIterator, resultcount : *mut i32, path : *mut GpPath, isclosed : *mut super::super::Foundation:: BOOL) -> Status); - unsafe { GdipPathIterNextSubpathPath(core::mem::transmute(iterator), core::mem::transmute(resultcount), core::mem::transmute(path), core::mem::transmute(isclosed)) } + unsafe { GdipPathIterNextSubpathPath(iterator as _, resultcount as _, path as _, isclosed as _) } } #[inline] pub unsafe fn GdipPathIterRewind(iterator: *mut GpPathIterator) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipPathIterRewind(iterator : *mut GpPathIterator) -> Status); - unsafe { GdipPathIterRewind(core::mem::transmute(iterator)) } + unsafe { GdipPathIterRewind(iterator as _) } } #[inline] pub unsafe fn GdipPlayMetafileRecord(metafile: *const GpMetafile, recordtype: EmfPlusRecordType, flags: u32, datasize: u32, data: *const u8) -> Status { @@ -2445,12 +2445,12 @@ where P1: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipPrivateAddFontFile(fontcollection : *mut GpFontCollection, filename : windows_core::PCWSTR) -> Status); - unsafe { GdipPrivateAddFontFile(core::mem::transmute(fontcollection), filename.param().abi()) } + unsafe { GdipPrivateAddFontFile(fontcollection as _, filename.param().abi()) } } #[inline] pub unsafe fn GdipPrivateAddMemoryFont(fontcollection: *mut GpFontCollection, memory: *const core::ffi::c_void, length: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipPrivateAddMemoryFont(fontcollection : *mut GpFontCollection, memory : *const core::ffi::c_void, length : i32) -> Status); - unsafe { GdipPrivateAddMemoryFont(core::mem::transmute(fontcollection), memory, length) } + unsafe { GdipPrivateAddMemoryFont(fontcollection as _, memory, length) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -2459,7 +2459,7 @@ where 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); - unsafe { GdipRecordMetafile(referencehdc, r#type, framerect, frameunit, description.param().abi(), core::mem::transmute(metafile)) } + unsafe { GdipRecordMetafile(referencehdc, r#type, framerect, frameunit, description.param().abi(), metafile as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -2469,7 +2469,7 @@ where 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); - unsafe { GdipRecordMetafileFileName(filename.param().abi(), referencehdc, r#type, framerect, frameunit, description.param().abi(), core::mem::transmute(metafile)) } + unsafe { GdipRecordMetafileFileName(filename.param().abi(), referencehdc, r#type, framerect, frameunit, description.param().abi(), metafile as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -2479,7 +2479,7 @@ where 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); - unsafe { GdipRecordMetafileFileNameI(filename.param().abi(), referencehdc, r#type, framerect, frameunit, description.param().abi(), core::mem::transmute(metafile)) } + unsafe { GdipRecordMetafileFileNameI(filename.param().abi(), referencehdc, r#type, framerect, frameunit, description.param().abi(), metafile as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -2488,7 +2488,7 @@ where 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); - unsafe { GdipRecordMetafileI(referencehdc, r#type, framerect, frameunit, description.param().abi(), core::mem::transmute(metafile)) } + unsafe { GdipRecordMetafileI(referencehdc, r#type, framerect, frameunit, description.param().abi(), metafile as _) } } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] #[inline] @@ -2498,7 +2498,7 @@ where 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); - unsafe { GdipRecordMetafileStream(stream.param().abi(), referencehdc, r#type, framerect, frameunit, description.param().abi(), core::mem::transmute(metafile)) } + unsafe { GdipRecordMetafileStream(stream.param().abi(), referencehdc, r#type, framerect, frameunit, description.param().abi(), metafile as _) } } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] #[inline] @@ -2508,118 +2508,118 @@ where 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); - unsafe { GdipRecordMetafileStreamI(stream.param().abi(), referencehdc, r#type, framerect, frameunit, description.param().abi(), core::mem::transmute(metafile)) } + unsafe { GdipRecordMetafileStreamI(stream.param().abi(), referencehdc, r#type, framerect, frameunit, description.param().abi(), metafile as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { GdipReleaseDC(core::mem::transmute(graphics), hdc) } + unsafe { GdipReleaseDC(graphics as _, hdc) } } #[inline] pub unsafe fn GdipRemovePropertyItem(image: *mut GpImage, propid: u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipRemovePropertyItem(image : *mut GpImage, propid : u32) -> Status); - unsafe { GdipRemovePropertyItem(core::mem::transmute(image), propid) } + unsafe { GdipRemovePropertyItem(image as _, propid) } } #[inline] pub unsafe fn GdipResetClip(graphics: *mut GpGraphics) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipResetClip(graphics : *mut GpGraphics) -> Status); - unsafe { GdipResetClip(core::mem::transmute(graphics)) } + unsafe { GdipResetClip(graphics as _) } } #[inline] pub unsafe fn GdipResetImageAttributes(imageattr: *mut GpImageAttributes, r#type: ColorAdjustType) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipResetImageAttributes(imageattr : *mut GpImageAttributes, r#type : ColorAdjustType) -> Status); - unsafe { GdipResetImageAttributes(core::mem::transmute(imageattr), r#type) } + unsafe { GdipResetImageAttributes(imageattr as _, r#type) } } #[inline] pub unsafe fn GdipResetLineTransform(brush: *mut GpLineGradient) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipResetLineTransform(brush : *mut GpLineGradient) -> Status); - unsafe { GdipResetLineTransform(core::mem::transmute(brush)) } + unsafe { GdipResetLineTransform(brush as _) } } #[inline] pub unsafe fn GdipResetPageTransform(graphics: *mut GpGraphics) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipResetPageTransform(graphics : *mut GpGraphics) -> Status); - unsafe { GdipResetPageTransform(core::mem::transmute(graphics)) } + unsafe { GdipResetPageTransform(graphics as _) } } #[inline] pub unsafe fn GdipResetPath(path: *mut GpPath) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipResetPath(path : *mut GpPath) -> Status); - unsafe { GdipResetPath(core::mem::transmute(path)) } + unsafe { GdipResetPath(path as _) } } #[inline] pub unsafe fn GdipResetPathGradientTransform(brush: *mut GpPathGradient) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipResetPathGradientTransform(brush : *mut GpPathGradient) -> Status); - unsafe { GdipResetPathGradientTransform(core::mem::transmute(brush)) } + unsafe { GdipResetPathGradientTransform(brush as _) } } #[inline] pub unsafe fn GdipResetPenTransform(pen: *mut GpPen) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipResetPenTransform(pen : *mut GpPen) -> Status); - unsafe { GdipResetPenTransform(core::mem::transmute(pen)) } + unsafe { GdipResetPenTransform(pen as _) } } #[inline] pub unsafe fn GdipResetTextureTransform(brush: *mut GpTexture) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipResetTextureTransform(brush : *mut GpTexture) -> Status); - unsafe { GdipResetTextureTransform(core::mem::transmute(brush)) } + unsafe { GdipResetTextureTransform(brush as _) } } #[inline] pub unsafe fn GdipResetWorldTransform(graphics: *mut GpGraphics) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipResetWorldTransform(graphics : *mut GpGraphics) -> Status); - unsafe { GdipResetWorldTransform(core::mem::transmute(graphics)) } + unsafe { GdipResetWorldTransform(graphics as _) } } #[inline] pub unsafe fn GdipRestoreGraphics(graphics: *mut GpGraphics, state: u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipRestoreGraphics(graphics : *mut GpGraphics, state : u32) -> Status); - unsafe { GdipRestoreGraphics(core::mem::transmute(graphics), state) } + unsafe { GdipRestoreGraphics(graphics as _, state) } } #[inline] pub unsafe fn GdipReversePath(path: *mut GpPath) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipReversePath(path : *mut GpPath) -> Status); - unsafe { GdipReversePath(core::mem::transmute(path)) } + unsafe { GdipReversePath(path as _) } } #[inline] pub unsafe fn GdipRotateLineTransform(brush: *mut GpLineGradient, angle: f32, order: MatrixOrder) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipRotateLineTransform(brush : *mut GpLineGradient, angle : f32, order : MatrixOrder) -> Status); - unsafe { GdipRotateLineTransform(core::mem::transmute(brush), angle, order) } + unsafe { GdipRotateLineTransform(brush as _, angle, order) } } #[inline] pub unsafe fn GdipRotateMatrix(matrix: *mut Matrix, angle: f32, order: MatrixOrder) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipRotateMatrix(matrix : *mut Matrix, angle : f32, order : MatrixOrder) -> Status); - unsafe { GdipRotateMatrix(core::mem::transmute(matrix), angle, order) } + unsafe { GdipRotateMatrix(matrix as _, angle, order) } } #[inline] pub unsafe fn GdipRotatePathGradientTransform(brush: *mut GpPathGradient, angle: f32, order: MatrixOrder) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipRotatePathGradientTransform(brush : *mut GpPathGradient, angle : f32, order : MatrixOrder) -> Status); - unsafe { GdipRotatePathGradientTransform(core::mem::transmute(brush), angle, order) } + unsafe { GdipRotatePathGradientTransform(brush as _, angle, order) } } #[inline] pub unsafe fn GdipRotatePenTransform(pen: *mut GpPen, angle: f32, order: MatrixOrder) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipRotatePenTransform(pen : *mut GpPen, angle : f32, order : MatrixOrder) -> Status); - unsafe { GdipRotatePenTransform(core::mem::transmute(pen), angle, order) } + unsafe { GdipRotatePenTransform(pen as _, angle, order) } } #[inline] pub unsafe fn GdipRotateTextureTransform(brush: *mut GpTexture, angle: f32, order: MatrixOrder) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipRotateTextureTransform(brush : *mut GpTexture, angle : f32, order : MatrixOrder) -> Status); - unsafe { GdipRotateTextureTransform(core::mem::transmute(brush), angle, order) } + unsafe { GdipRotateTextureTransform(brush as _, angle, order) } } #[inline] pub unsafe fn GdipRotateWorldTransform(graphics: *mut GpGraphics, angle: f32, order: MatrixOrder) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipRotateWorldTransform(graphics : *mut GpGraphics, angle : f32, order : MatrixOrder) -> Status); - unsafe { GdipRotateWorldTransform(core::mem::transmute(graphics), angle, order) } + unsafe { GdipRotateWorldTransform(graphics as _, angle, order) } } #[inline] pub unsafe fn GdipSaveAdd(image: *mut GpImage, encoderparams: *const EncoderParameters) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSaveAdd(image : *mut GpImage, encoderparams : *const EncoderParameters) -> Status); - unsafe { GdipSaveAdd(core::mem::transmute(image), encoderparams) } + unsafe { GdipSaveAdd(image as _, encoderparams) } } #[inline] pub unsafe fn GdipSaveAddImage(image: *mut GpImage, newimage: *mut GpImage, encoderparams: *const EncoderParameters) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSaveAddImage(image : *mut GpImage, newimage : *mut GpImage, encoderparams : *const EncoderParameters) -> Status); - unsafe { GdipSaveAddImage(core::mem::transmute(image), core::mem::transmute(newimage), encoderparams) } + unsafe { GdipSaveAddImage(image as _, newimage as _, encoderparams) } } #[inline] pub unsafe fn GdipSaveGraphics(graphics: *mut GpGraphics, state: *mut u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSaveGraphics(graphics : *mut GpGraphics, state : *mut u32) -> Status); - unsafe { GdipSaveGraphics(core::mem::transmute(graphics), core::mem::transmute(state)) } + unsafe { GdipSaveGraphics(graphics as _, state as _) } } #[inline] pub unsafe fn GdipSaveImageToFile(image: *mut GpImage, filename: P1, clsidencoder: *const windows_core::GUID, encoderparams: *const EncoderParameters) -> Status @@ -2627,7 +2627,7 @@ where P1: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipSaveImageToFile(image : *mut GpImage, filename : windows_core::PCWSTR, clsidencoder : *const windows_core::GUID, encoderparams : *const EncoderParameters) -> Status); - unsafe { GdipSaveImageToFile(core::mem::transmute(image), filename.param().abi(), clsidencoder, encoderparams) } + unsafe { GdipSaveImageToFile(image as _, filename.param().abi(), clsidencoder, encoderparams) } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -2636,163 +2636,163 @@ where P1: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipSaveImageToStream(image : *mut GpImage, stream : * mut core::ffi::c_void, clsidencoder : *const windows_core::GUID, encoderparams : *const EncoderParameters) -> Status); - unsafe { GdipSaveImageToStream(core::mem::transmute(image), stream.param().abi(), clsidencoder, encoderparams) } + unsafe { GdipSaveImageToStream(image as _, stream.param().abi(), clsidencoder, encoderparams) } } #[inline] pub unsafe fn GdipScaleLineTransform(brush: *mut GpLineGradient, sx: f32, sy: f32, order: MatrixOrder) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipScaleLineTransform(brush : *mut GpLineGradient, sx : f32, sy : f32, order : MatrixOrder) -> Status); - unsafe { GdipScaleLineTransform(core::mem::transmute(brush), sx, sy, order) } + unsafe { GdipScaleLineTransform(brush as _, sx, sy, order) } } #[inline] pub unsafe fn GdipScaleMatrix(matrix: *mut Matrix, scalex: f32, scaley: f32, order: MatrixOrder) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipScaleMatrix(matrix : *mut Matrix, scalex : f32, scaley : f32, order : MatrixOrder) -> Status); - unsafe { GdipScaleMatrix(core::mem::transmute(matrix), scalex, scaley, order) } + unsafe { GdipScaleMatrix(matrix as _, scalex, scaley, order) } } #[inline] pub unsafe fn GdipScalePathGradientTransform(brush: *mut GpPathGradient, sx: f32, sy: f32, order: MatrixOrder) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipScalePathGradientTransform(brush : *mut GpPathGradient, sx : f32, sy : f32, order : MatrixOrder) -> Status); - unsafe { GdipScalePathGradientTransform(core::mem::transmute(brush), sx, sy, order) } + unsafe { GdipScalePathGradientTransform(brush as _, sx, sy, order) } } #[inline] pub unsafe fn GdipScalePenTransform(pen: *mut GpPen, sx: f32, sy: f32, order: MatrixOrder) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipScalePenTransform(pen : *mut GpPen, sx : f32, sy : f32, order : MatrixOrder) -> Status); - unsafe { GdipScalePenTransform(core::mem::transmute(pen), sx, sy, order) } + unsafe { GdipScalePenTransform(pen as _, sx, sy, order) } } #[inline] pub unsafe fn GdipScaleTextureTransform(brush: *mut GpTexture, sx: f32, sy: f32, order: MatrixOrder) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipScaleTextureTransform(brush : *mut GpTexture, sx : f32, sy : f32, order : MatrixOrder) -> Status); - unsafe { GdipScaleTextureTransform(core::mem::transmute(brush), sx, sy, order) } + unsafe { GdipScaleTextureTransform(brush as _, sx, sy, order) } } #[inline] pub unsafe fn GdipScaleWorldTransform(graphics: *mut GpGraphics, sx: f32, sy: f32, order: MatrixOrder) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipScaleWorldTransform(graphics : *mut GpGraphics, sx : f32, sy : f32, order : MatrixOrder) -> Status); - unsafe { GdipScaleWorldTransform(core::mem::transmute(graphics), sx, sy, order) } + unsafe { GdipScaleWorldTransform(graphics as _, sx, sy, order) } } #[inline] pub unsafe fn GdipSetAdjustableArrowCapFillState(cap: *mut GpAdjustableArrowCap, fillstate: bool) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetAdjustableArrowCapFillState(cap : *mut GpAdjustableArrowCap, fillstate : super::super::Foundation:: BOOL) -> Status); - unsafe { GdipSetAdjustableArrowCapFillState(core::mem::transmute(cap), fillstate.into()) } + unsafe { GdipSetAdjustableArrowCapFillState(cap as _, fillstate.into()) } } #[inline] pub unsafe fn GdipSetAdjustableArrowCapHeight(cap: *mut GpAdjustableArrowCap, height: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetAdjustableArrowCapHeight(cap : *mut GpAdjustableArrowCap, height : f32) -> Status); - unsafe { GdipSetAdjustableArrowCapHeight(core::mem::transmute(cap), height) } + unsafe { GdipSetAdjustableArrowCapHeight(cap as _, height) } } #[inline] pub unsafe fn GdipSetAdjustableArrowCapMiddleInset(cap: *mut GpAdjustableArrowCap, middleinset: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetAdjustableArrowCapMiddleInset(cap : *mut GpAdjustableArrowCap, middleinset : f32) -> Status); - unsafe { GdipSetAdjustableArrowCapMiddleInset(core::mem::transmute(cap), middleinset) } + unsafe { GdipSetAdjustableArrowCapMiddleInset(cap as _, middleinset) } } #[inline] pub unsafe fn GdipSetAdjustableArrowCapWidth(cap: *mut GpAdjustableArrowCap, width: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetAdjustableArrowCapWidth(cap : *mut GpAdjustableArrowCap, width : f32) -> Status); - unsafe { GdipSetAdjustableArrowCapWidth(core::mem::transmute(cap), width) } + unsafe { GdipSetAdjustableArrowCapWidth(cap as _, width) } } #[inline] pub unsafe fn GdipSetClipGraphics(graphics: *mut GpGraphics, srcgraphics: *mut GpGraphics, combinemode: CombineMode) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetClipGraphics(graphics : *mut GpGraphics, srcgraphics : *mut GpGraphics, combinemode : CombineMode) -> Status); - unsafe { GdipSetClipGraphics(core::mem::transmute(graphics), core::mem::transmute(srcgraphics), combinemode) } + unsafe { GdipSetClipGraphics(graphics as _, srcgraphics as _, combinemode) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { GdipSetClipHrgn(core::mem::transmute(graphics), hrgn, combinemode) } + unsafe { GdipSetClipHrgn(graphics as _, hrgn, combinemode) } } #[inline] pub unsafe fn GdipSetClipPath(graphics: *mut GpGraphics, path: *mut GpPath, combinemode: CombineMode) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetClipPath(graphics : *mut GpGraphics, path : *mut GpPath, combinemode : CombineMode) -> Status); - unsafe { GdipSetClipPath(core::mem::transmute(graphics), core::mem::transmute(path), combinemode) } + unsafe { GdipSetClipPath(graphics as _, path as _, combinemode) } } #[inline] pub unsafe fn GdipSetClipRect(graphics: *mut GpGraphics, x: f32, y: f32, width: f32, height: f32, combinemode: CombineMode) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetClipRect(graphics : *mut GpGraphics, x : f32, y : f32, width : f32, height : f32, combinemode : CombineMode) -> Status); - unsafe { GdipSetClipRect(core::mem::transmute(graphics), x, y, width, height, combinemode) } + unsafe { GdipSetClipRect(graphics as _, x, y, width, height, combinemode) } } #[inline] pub unsafe fn GdipSetClipRectI(graphics: *mut GpGraphics, x: i32, y: i32, width: i32, height: i32, combinemode: CombineMode) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetClipRectI(graphics : *mut GpGraphics, x : i32, y : i32, width : i32, height : i32, combinemode : CombineMode) -> Status); - unsafe { GdipSetClipRectI(core::mem::transmute(graphics), x, y, width, height, combinemode) } + unsafe { GdipSetClipRectI(graphics as _, x, y, width, height, combinemode) } } #[inline] pub unsafe fn GdipSetClipRegion(graphics: *mut GpGraphics, region: *mut GpRegion, combinemode: CombineMode) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetClipRegion(graphics : *mut GpGraphics, region : *mut GpRegion, combinemode : CombineMode) -> Status); - unsafe { GdipSetClipRegion(core::mem::transmute(graphics), core::mem::transmute(region), combinemode) } + unsafe { GdipSetClipRegion(graphics as _, region as _, combinemode) } } #[inline] pub unsafe fn GdipSetCompositingMode(graphics: *mut GpGraphics, compositingmode: CompositingMode) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetCompositingMode(graphics : *mut GpGraphics, compositingmode : CompositingMode) -> Status); - unsafe { GdipSetCompositingMode(core::mem::transmute(graphics), compositingmode) } + unsafe { GdipSetCompositingMode(graphics as _, compositingmode) } } #[inline] pub unsafe fn GdipSetCompositingQuality(graphics: *mut GpGraphics, compositingquality: CompositingQuality) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetCompositingQuality(graphics : *mut GpGraphics, compositingquality : CompositingQuality) -> Status); - unsafe { GdipSetCompositingQuality(core::mem::transmute(graphics), compositingquality) } + unsafe { GdipSetCompositingQuality(graphics as _, compositingquality) } } #[inline] pub unsafe fn GdipSetCustomLineCapBaseCap(customcap: *mut GpCustomLineCap, basecap: LineCap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetCustomLineCapBaseCap(customcap : *mut GpCustomLineCap, basecap : LineCap) -> Status); - unsafe { GdipSetCustomLineCapBaseCap(core::mem::transmute(customcap), basecap) } + unsafe { GdipSetCustomLineCapBaseCap(customcap as _, basecap) } } #[inline] pub unsafe fn GdipSetCustomLineCapBaseInset(customcap: *mut GpCustomLineCap, inset: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetCustomLineCapBaseInset(customcap : *mut GpCustomLineCap, inset : f32) -> Status); - unsafe { GdipSetCustomLineCapBaseInset(core::mem::transmute(customcap), inset) } + unsafe { GdipSetCustomLineCapBaseInset(customcap as _, inset) } } #[inline] pub unsafe fn GdipSetCustomLineCapStrokeCaps(customcap: *mut GpCustomLineCap, startcap: LineCap, endcap: LineCap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetCustomLineCapStrokeCaps(customcap : *mut GpCustomLineCap, startcap : LineCap, endcap : LineCap) -> Status); - unsafe { GdipSetCustomLineCapStrokeCaps(core::mem::transmute(customcap), startcap, endcap) } + unsafe { GdipSetCustomLineCapStrokeCaps(customcap as _, startcap, endcap) } } #[inline] pub unsafe fn GdipSetCustomLineCapStrokeJoin(customcap: *mut GpCustomLineCap, linejoin: LineJoin) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetCustomLineCapStrokeJoin(customcap : *mut GpCustomLineCap, linejoin : LineJoin) -> Status); - unsafe { GdipSetCustomLineCapStrokeJoin(core::mem::transmute(customcap), linejoin) } + unsafe { GdipSetCustomLineCapStrokeJoin(customcap as _, linejoin) } } #[inline] pub unsafe fn GdipSetCustomLineCapWidthScale(customcap: *mut GpCustomLineCap, widthscale: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetCustomLineCapWidthScale(customcap : *mut GpCustomLineCap, widthscale : f32) -> Status); - unsafe { GdipSetCustomLineCapWidthScale(core::mem::transmute(customcap), widthscale) } + unsafe { GdipSetCustomLineCapWidthScale(customcap as _, widthscale) } } #[inline] pub unsafe fn GdipSetEffectParameters(effect: *mut CGpEffect, params: *const core::ffi::c_void, size: u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetEffectParameters(effect : *mut CGpEffect, params : *const core::ffi::c_void, size : u32) -> Status); - unsafe { GdipSetEffectParameters(core::mem::transmute(effect), params, size) } + unsafe { GdipSetEffectParameters(effect as _, params, size) } } #[inline] pub unsafe fn GdipSetEmpty(region: *mut GpRegion) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetEmpty(region : *mut GpRegion) -> Status); - unsafe { GdipSetEmpty(core::mem::transmute(region)) } + unsafe { GdipSetEmpty(region as _) } } #[inline] pub unsafe fn GdipSetImageAttributesCachedBackground(imageattr: *mut GpImageAttributes, enableflag: bool) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetImageAttributesCachedBackground(imageattr : *mut GpImageAttributes, enableflag : super::super::Foundation:: BOOL) -> Status); - unsafe { GdipSetImageAttributesCachedBackground(core::mem::transmute(imageattr), enableflag.into()) } + unsafe { GdipSetImageAttributesCachedBackground(imageattr as _, enableflag.into()) } } #[inline] pub unsafe fn GdipSetImageAttributesColorKeys(imageattr: *mut GpImageAttributes, r#type: ColorAdjustType, enableflag: bool, colorlow: u32, colorhigh: u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetImageAttributesColorKeys(imageattr : *mut GpImageAttributes, r#type : ColorAdjustType, enableflag : super::super::Foundation:: BOOL, colorlow : u32, colorhigh : u32) -> Status); - unsafe { GdipSetImageAttributesColorKeys(core::mem::transmute(imageattr), r#type, enableflag.into(), colorlow, colorhigh) } + unsafe { GdipSetImageAttributesColorKeys(imageattr as _, r#type, enableflag.into(), colorlow, colorhigh) } } #[inline] pub unsafe fn GdipSetImageAttributesColorMatrix(imageattr: *mut GpImageAttributes, r#type: ColorAdjustType, enableflag: bool, colormatrix: *const ColorMatrix, graymatrix: *const ColorMatrix, flags: ColorMatrixFlags) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetImageAttributesColorMatrix(imageattr : *mut GpImageAttributes, r#type : ColorAdjustType, enableflag : super::super::Foundation:: BOOL, colormatrix : *const ColorMatrix, graymatrix : *const ColorMatrix, flags : ColorMatrixFlags) -> Status); - unsafe { GdipSetImageAttributesColorMatrix(core::mem::transmute(imageattr), r#type, enableflag.into(), colormatrix, graymatrix, flags) } + unsafe { GdipSetImageAttributesColorMatrix(imageattr as _, r#type, enableflag.into(), colormatrix, graymatrix, flags) } } #[inline] pub unsafe fn GdipSetImageAttributesGamma(imageattr: *mut GpImageAttributes, r#type: ColorAdjustType, enableflag: bool, gamma: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetImageAttributesGamma(imageattr : *mut GpImageAttributes, r#type : ColorAdjustType, enableflag : super::super::Foundation:: BOOL, gamma : f32) -> Status); - unsafe { GdipSetImageAttributesGamma(core::mem::transmute(imageattr), r#type, enableflag.into(), gamma) } + unsafe { GdipSetImageAttributesGamma(imageattr as _, r#type, enableflag.into(), gamma) } } #[inline] pub unsafe fn GdipSetImageAttributesNoOp(imageattr: *mut GpImageAttributes, r#type: ColorAdjustType, enableflag: bool) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetImageAttributesNoOp(imageattr : *mut GpImageAttributes, r#type : ColorAdjustType, enableflag : super::super::Foundation:: BOOL) -> Status); - unsafe { GdipSetImageAttributesNoOp(core::mem::transmute(imageattr), r#type, enableflag.into()) } + unsafe { GdipSetImageAttributesNoOp(imageattr as _, r#type, enableflag.into()) } } #[inline] pub unsafe fn GdipSetImageAttributesOutputChannel(imageattr: *mut GpImageAttributes, r#type: ColorAdjustType, enableflag: bool, channelflags: ColorChannelFlags) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetImageAttributesOutputChannel(imageattr : *mut GpImageAttributes, r#type : ColorAdjustType, enableflag : super::super::Foundation:: BOOL, channelflags : ColorChannelFlags) -> Status); - unsafe { GdipSetImageAttributesOutputChannel(core::mem::transmute(imageattr), r#type, enableflag.into(), channelflags) } + unsafe { GdipSetImageAttributesOutputChannel(imageattr as _, r#type, enableflag.into(), channelflags) } } #[inline] pub unsafe fn GdipSetImageAttributesOutputChannelColorProfile(imageattr: *mut GpImageAttributes, r#type: ColorAdjustType, enableflag: bool, colorprofilefilename: P3) -> Status @@ -2800,492 +2800,492 @@ where P3: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipSetImageAttributesOutputChannelColorProfile(imageattr : *mut GpImageAttributes, r#type : ColorAdjustType, enableflag : super::super::Foundation:: BOOL, colorprofilefilename : windows_core::PCWSTR) -> Status); - unsafe { GdipSetImageAttributesOutputChannelColorProfile(core::mem::transmute(imageattr), r#type, enableflag.into(), colorprofilefilename.param().abi()) } + unsafe { GdipSetImageAttributesOutputChannelColorProfile(imageattr as _, r#type, enableflag.into(), colorprofilefilename.param().abi()) } } #[inline] pub unsafe fn GdipSetImageAttributesRemapTable(imageattr: *mut GpImageAttributes, r#type: ColorAdjustType, enableflag: bool, mapsize: u32, map: *const ColorMap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetImageAttributesRemapTable(imageattr : *mut GpImageAttributes, r#type : ColorAdjustType, enableflag : super::super::Foundation:: BOOL, mapsize : u32, map : *const ColorMap) -> Status); - unsafe { GdipSetImageAttributesRemapTable(core::mem::transmute(imageattr), r#type, enableflag.into(), mapsize, map) } + unsafe { GdipSetImageAttributesRemapTable(imageattr as _, r#type, enableflag.into(), mapsize, map) } } #[inline] pub unsafe fn GdipSetImageAttributesThreshold(imageattr: *mut GpImageAttributes, r#type: ColorAdjustType, enableflag: bool, threshold: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetImageAttributesThreshold(imageattr : *mut GpImageAttributes, r#type : ColorAdjustType, enableflag : super::super::Foundation:: BOOL, threshold : f32) -> Status); - unsafe { GdipSetImageAttributesThreshold(core::mem::transmute(imageattr), r#type, enableflag.into(), threshold) } + unsafe { GdipSetImageAttributesThreshold(imageattr as _, r#type, enableflag.into(), threshold) } } #[inline] pub unsafe fn GdipSetImageAttributesToIdentity(imageattr: *mut GpImageAttributes, r#type: ColorAdjustType) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetImageAttributesToIdentity(imageattr : *mut GpImageAttributes, r#type : ColorAdjustType) -> Status); - unsafe { GdipSetImageAttributesToIdentity(core::mem::transmute(imageattr), r#type) } + unsafe { GdipSetImageAttributesToIdentity(imageattr as _, r#type) } } #[inline] pub unsafe fn GdipSetImageAttributesWrapMode(imageattr: *mut GpImageAttributes, wrap: WrapMode, argb: u32, clamp: bool) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetImageAttributesWrapMode(imageattr : *mut GpImageAttributes, wrap : WrapMode, argb : u32, clamp : super::super::Foundation:: BOOL) -> Status); - unsafe { GdipSetImageAttributesWrapMode(core::mem::transmute(imageattr), wrap, argb, clamp.into()) } + unsafe { GdipSetImageAttributesWrapMode(imageattr as _, wrap, argb, clamp.into()) } } #[inline] pub unsafe fn GdipSetImagePalette(image: *mut GpImage, palette: *const ColorPalette) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetImagePalette(image : *mut GpImage, palette : *const ColorPalette) -> Status); - unsafe { GdipSetImagePalette(core::mem::transmute(image), palette) } + unsafe { GdipSetImagePalette(image as _, palette) } } #[inline] pub unsafe fn GdipSetInfinite(region: *mut GpRegion) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetInfinite(region : *mut GpRegion) -> Status); - unsafe { GdipSetInfinite(core::mem::transmute(region)) } + unsafe { GdipSetInfinite(region as _) } } #[inline] pub unsafe fn GdipSetInterpolationMode(graphics: *mut GpGraphics, interpolationmode: InterpolationMode) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetInterpolationMode(graphics : *mut GpGraphics, interpolationmode : InterpolationMode) -> Status); - unsafe { GdipSetInterpolationMode(core::mem::transmute(graphics), interpolationmode) } + unsafe { GdipSetInterpolationMode(graphics as _, interpolationmode) } } #[inline] pub unsafe fn GdipSetLineBlend(brush: *mut GpLineGradient, blend: *const f32, positions: *const f32, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetLineBlend(brush : *mut GpLineGradient, blend : *const f32, positions : *const f32, count : i32) -> Status); - unsafe { GdipSetLineBlend(core::mem::transmute(brush), blend, positions, count) } + unsafe { GdipSetLineBlend(brush as _, blend, positions, count) } } #[inline] pub unsafe fn GdipSetLineColors(brush: *mut GpLineGradient, color1: u32, color2: u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetLineColors(brush : *mut GpLineGradient, color1 : u32, color2 : u32) -> Status); - unsafe { GdipSetLineColors(core::mem::transmute(brush), color1, color2) } + unsafe { GdipSetLineColors(brush as _, color1, color2) } } #[inline] pub unsafe fn GdipSetLineGammaCorrection(brush: *mut GpLineGradient, usegammacorrection: bool) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetLineGammaCorrection(brush : *mut GpLineGradient, usegammacorrection : super::super::Foundation:: BOOL) -> Status); - unsafe { GdipSetLineGammaCorrection(core::mem::transmute(brush), usegammacorrection.into()) } + unsafe { GdipSetLineGammaCorrection(brush as _, usegammacorrection.into()) } } #[inline] pub unsafe fn GdipSetLineLinearBlend(brush: *mut GpLineGradient, focus: f32, scale: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetLineLinearBlend(brush : *mut GpLineGradient, focus : f32, scale : f32) -> Status); - unsafe { GdipSetLineLinearBlend(core::mem::transmute(brush), focus, scale) } + unsafe { GdipSetLineLinearBlend(brush as _, focus, scale) } } #[inline] pub unsafe fn GdipSetLinePresetBlend(brush: *mut GpLineGradient, blend: *const u32, positions: *const f32, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetLinePresetBlend(brush : *mut GpLineGradient, blend : *const u32, positions : *const f32, count : i32) -> Status); - unsafe { GdipSetLinePresetBlend(core::mem::transmute(brush), blend, positions, count) } + unsafe { GdipSetLinePresetBlend(brush as _, blend, positions, count) } } #[inline] pub unsafe fn GdipSetLineSigmaBlend(brush: *mut GpLineGradient, focus: f32, scale: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetLineSigmaBlend(brush : *mut GpLineGradient, focus : f32, scale : f32) -> Status); - unsafe { GdipSetLineSigmaBlend(core::mem::transmute(brush), focus, scale) } + unsafe { GdipSetLineSigmaBlend(brush as _, focus, scale) } } #[inline] pub unsafe fn GdipSetLineTransform(brush: *mut GpLineGradient, matrix: *const Matrix) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetLineTransform(brush : *mut GpLineGradient, matrix : *const Matrix) -> Status); - unsafe { GdipSetLineTransform(core::mem::transmute(brush), matrix) } + unsafe { GdipSetLineTransform(brush as _, matrix) } } #[inline] pub unsafe fn GdipSetLineWrapMode(brush: *mut GpLineGradient, wrapmode: WrapMode) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetLineWrapMode(brush : *mut GpLineGradient, wrapmode : WrapMode) -> Status); - unsafe { GdipSetLineWrapMode(core::mem::transmute(brush), wrapmode) } + unsafe { GdipSetLineWrapMode(brush as _, wrapmode) } } #[inline] pub unsafe fn GdipSetMatrixElements(matrix: *mut Matrix, m11: f32, m12: f32, m21: f32, m22: f32, dx: f32, dy: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetMatrixElements(matrix : *mut Matrix, m11 : f32, m12 : f32, m21 : f32, m22 : f32, dx : f32, dy : f32) -> Status); - unsafe { GdipSetMatrixElements(core::mem::transmute(matrix), m11, m12, m21, m22, dx, dy) } + unsafe { GdipSetMatrixElements(matrix as _, m11, m12, m21, m22, dx, dy) } } #[inline] pub unsafe fn GdipSetMetafileDownLevelRasterizationLimit(metafile: *mut GpMetafile, metafilerasterizationlimitdpi: u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetMetafileDownLevelRasterizationLimit(metafile : *mut GpMetafile, metafilerasterizationlimitdpi : u32) -> Status); - unsafe { GdipSetMetafileDownLevelRasterizationLimit(core::mem::transmute(metafile), metafilerasterizationlimitdpi) } + unsafe { GdipSetMetafileDownLevelRasterizationLimit(metafile as _, metafilerasterizationlimitdpi) } } #[inline] pub unsafe fn GdipSetPageScale(graphics: *mut GpGraphics, scale: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPageScale(graphics : *mut GpGraphics, scale : f32) -> Status); - unsafe { GdipSetPageScale(core::mem::transmute(graphics), scale) } + unsafe { GdipSetPageScale(graphics as _, scale) } } #[inline] pub unsafe fn GdipSetPageUnit(graphics: *mut GpGraphics, unit: Unit) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPageUnit(graphics : *mut GpGraphics, unit : Unit) -> Status); - unsafe { GdipSetPageUnit(core::mem::transmute(graphics), unit) } + unsafe { GdipSetPageUnit(graphics as _, unit) } } #[inline] pub unsafe fn GdipSetPathFillMode(path: *mut GpPath, fillmode: FillMode) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPathFillMode(path : *mut GpPath, fillmode : FillMode) -> Status); - unsafe { GdipSetPathFillMode(core::mem::transmute(path), fillmode) } + unsafe { GdipSetPathFillMode(path as _, fillmode) } } #[inline] pub unsafe fn GdipSetPathGradientBlend(brush: *mut GpPathGradient, blend: *const f32, positions: *const f32, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPathGradientBlend(brush : *mut GpPathGradient, blend : *const f32, positions : *const f32, count : i32) -> Status); - unsafe { GdipSetPathGradientBlend(core::mem::transmute(brush), blend, positions, count) } + unsafe { GdipSetPathGradientBlend(brush as _, blend, positions, count) } } #[inline] pub unsafe fn GdipSetPathGradientCenterColor(brush: *mut GpPathGradient, colors: u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPathGradientCenterColor(brush : *mut GpPathGradient, colors : u32) -> Status); - unsafe { GdipSetPathGradientCenterColor(core::mem::transmute(brush), colors) } + unsafe { GdipSetPathGradientCenterColor(brush as _, colors) } } #[inline] pub unsafe fn GdipSetPathGradientCenterPoint(brush: *mut GpPathGradient, points: *const PointF) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPathGradientCenterPoint(brush : *mut GpPathGradient, points : *const PointF) -> Status); - unsafe { GdipSetPathGradientCenterPoint(core::mem::transmute(brush), points) } + unsafe { GdipSetPathGradientCenterPoint(brush as _, points) } } #[inline] pub unsafe fn GdipSetPathGradientCenterPointI(brush: *mut GpPathGradient, points: *const Point) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPathGradientCenterPointI(brush : *mut GpPathGradient, points : *const Point) -> Status); - unsafe { GdipSetPathGradientCenterPointI(core::mem::transmute(brush), points) } + unsafe { GdipSetPathGradientCenterPointI(brush as _, points) } } #[inline] pub unsafe fn GdipSetPathGradientFocusScales(brush: *mut GpPathGradient, xscale: f32, yscale: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPathGradientFocusScales(brush : *mut GpPathGradient, xscale : f32, yscale : f32) -> Status); - unsafe { GdipSetPathGradientFocusScales(core::mem::transmute(brush), xscale, yscale) } + unsafe { GdipSetPathGradientFocusScales(brush as _, xscale, yscale) } } #[inline] pub unsafe fn GdipSetPathGradientGammaCorrection(brush: *mut GpPathGradient, usegammacorrection: bool) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPathGradientGammaCorrection(brush : *mut GpPathGradient, usegammacorrection : super::super::Foundation:: BOOL) -> Status); - unsafe { GdipSetPathGradientGammaCorrection(core::mem::transmute(brush), usegammacorrection.into()) } + unsafe { GdipSetPathGradientGammaCorrection(brush as _, usegammacorrection.into()) } } #[inline] pub unsafe fn GdipSetPathGradientLinearBlend(brush: *mut GpPathGradient, focus: f32, scale: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPathGradientLinearBlend(brush : *mut GpPathGradient, focus : f32, scale : f32) -> Status); - unsafe { GdipSetPathGradientLinearBlend(core::mem::transmute(brush), focus, scale) } + unsafe { GdipSetPathGradientLinearBlend(brush as _, focus, scale) } } #[inline] pub unsafe fn GdipSetPathGradientPath(brush: *mut GpPathGradient, path: *const GpPath) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPathGradientPath(brush : *mut GpPathGradient, path : *const GpPath) -> Status); - unsafe { GdipSetPathGradientPath(core::mem::transmute(brush), path) } + unsafe { GdipSetPathGradientPath(brush as _, path) } } #[inline] pub unsafe fn GdipSetPathGradientPresetBlend(brush: *mut GpPathGradient, blend: *const u32, positions: *const f32, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPathGradientPresetBlend(brush : *mut GpPathGradient, blend : *const u32, positions : *const f32, count : i32) -> Status); - unsafe { GdipSetPathGradientPresetBlend(core::mem::transmute(brush), blend, positions, count) } + unsafe { GdipSetPathGradientPresetBlend(brush as _, blend, positions, count) } } #[inline] pub unsafe fn GdipSetPathGradientSigmaBlend(brush: *mut GpPathGradient, focus: f32, scale: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPathGradientSigmaBlend(brush : *mut GpPathGradient, focus : f32, scale : f32) -> Status); - unsafe { GdipSetPathGradientSigmaBlend(core::mem::transmute(brush), focus, scale) } + unsafe { GdipSetPathGradientSigmaBlend(brush as _, focus, scale) } } #[inline] pub unsafe fn GdipSetPathGradientSurroundColorsWithCount(brush: *mut GpPathGradient, color: *const u32, count: *mut i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPathGradientSurroundColorsWithCount(brush : *mut GpPathGradient, color : *const u32, count : *mut i32) -> Status); - unsafe { GdipSetPathGradientSurroundColorsWithCount(core::mem::transmute(brush), color, core::mem::transmute(count)) } + unsafe { GdipSetPathGradientSurroundColorsWithCount(brush as _, color, count as _) } } #[inline] pub unsafe fn GdipSetPathGradientTransform(brush: *mut GpPathGradient, matrix: *mut Matrix) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPathGradientTransform(brush : *mut GpPathGradient, matrix : *mut Matrix) -> Status); - unsafe { GdipSetPathGradientTransform(core::mem::transmute(brush), core::mem::transmute(matrix)) } + unsafe { GdipSetPathGradientTransform(brush as _, matrix as _) } } #[inline] pub unsafe fn GdipSetPathGradientWrapMode(brush: *mut GpPathGradient, wrapmode: WrapMode) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPathGradientWrapMode(brush : *mut GpPathGradient, wrapmode : WrapMode) -> Status); - unsafe { GdipSetPathGradientWrapMode(core::mem::transmute(brush), wrapmode) } + unsafe { GdipSetPathGradientWrapMode(brush as _, wrapmode) } } #[inline] pub unsafe fn GdipSetPathMarker(path: *mut GpPath) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPathMarker(path : *mut GpPath) -> Status); - unsafe { GdipSetPathMarker(core::mem::transmute(path)) } + unsafe { GdipSetPathMarker(path as _) } } #[inline] pub unsafe fn GdipSetPenBrushFill(pen: *mut GpPen, brush: *mut GpBrush) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPenBrushFill(pen : *mut GpPen, brush : *mut GpBrush) -> Status); - unsafe { GdipSetPenBrushFill(core::mem::transmute(pen), core::mem::transmute(brush)) } + unsafe { GdipSetPenBrushFill(pen as _, brush as _) } } #[inline] pub unsafe fn GdipSetPenColor(pen: *mut GpPen, argb: u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPenColor(pen : *mut GpPen, argb : u32) -> Status); - unsafe { GdipSetPenColor(core::mem::transmute(pen), argb) } + unsafe { GdipSetPenColor(pen as _, argb) } } #[inline] pub unsafe fn GdipSetPenCompoundArray(pen: *mut GpPen, dash: *const f32, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPenCompoundArray(pen : *mut GpPen, dash : *const f32, count : i32) -> Status); - unsafe { GdipSetPenCompoundArray(core::mem::transmute(pen), dash, count) } + unsafe { GdipSetPenCompoundArray(pen as _, dash, count) } } #[inline] pub unsafe fn GdipSetPenCustomEndCap(pen: *mut GpPen, customcap: *mut GpCustomLineCap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPenCustomEndCap(pen : *mut GpPen, customcap : *mut GpCustomLineCap) -> Status); - unsafe { GdipSetPenCustomEndCap(core::mem::transmute(pen), core::mem::transmute(customcap)) } + unsafe { GdipSetPenCustomEndCap(pen as _, customcap as _) } } #[inline] pub unsafe fn GdipSetPenCustomStartCap(pen: *mut GpPen, customcap: *mut GpCustomLineCap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPenCustomStartCap(pen : *mut GpPen, customcap : *mut GpCustomLineCap) -> Status); - unsafe { GdipSetPenCustomStartCap(core::mem::transmute(pen), core::mem::transmute(customcap)) } + unsafe { GdipSetPenCustomStartCap(pen as _, customcap as _) } } #[inline] pub unsafe fn GdipSetPenDashArray(pen: *mut GpPen, dash: *const f32, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPenDashArray(pen : *mut GpPen, dash : *const f32, count : i32) -> Status); - unsafe { GdipSetPenDashArray(core::mem::transmute(pen), dash, count) } + unsafe { GdipSetPenDashArray(pen as _, dash, count) } } #[inline] pub unsafe fn GdipSetPenDashCap197819(pen: *mut GpPen, dashcap: DashCap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPenDashCap197819(pen : *mut GpPen, dashcap : DashCap) -> Status); - unsafe { GdipSetPenDashCap197819(core::mem::transmute(pen), dashcap) } + unsafe { GdipSetPenDashCap197819(pen as _, dashcap) } } #[inline] pub unsafe fn GdipSetPenDashOffset(pen: *mut GpPen, offset: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPenDashOffset(pen : *mut GpPen, offset : f32) -> Status); - unsafe { GdipSetPenDashOffset(core::mem::transmute(pen), offset) } + unsafe { GdipSetPenDashOffset(pen as _, offset) } } #[inline] pub unsafe fn GdipSetPenDashStyle(pen: *mut GpPen, dashstyle: DashStyle) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPenDashStyle(pen : *mut GpPen, dashstyle : DashStyle) -> Status); - unsafe { GdipSetPenDashStyle(core::mem::transmute(pen), dashstyle) } + unsafe { GdipSetPenDashStyle(pen as _, dashstyle) } } #[inline] pub unsafe fn GdipSetPenEndCap(pen: *mut GpPen, endcap: LineCap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPenEndCap(pen : *mut GpPen, endcap : LineCap) -> Status); - unsafe { GdipSetPenEndCap(core::mem::transmute(pen), endcap) } + unsafe { GdipSetPenEndCap(pen as _, endcap) } } #[inline] pub unsafe fn GdipSetPenLineCap197819(pen: *mut GpPen, startcap: LineCap, endcap: LineCap, dashcap: DashCap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPenLineCap197819(pen : *mut GpPen, startcap : LineCap, endcap : LineCap, dashcap : DashCap) -> Status); - unsafe { GdipSetPenLineCap197819(core::mem::transmute(pen), startcap, endcap, dashcap) } + unsafe { GdipSetPenLineCap197819(pen as _, startcap, endcap, dashcap) } } #[inline] pub unsafe fn GdipSetPenLineJoin(pen: *mut GpPen, linejoin: LineJoin) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPenLineJoin(pen : *mut GpPen, linejoin : LineJoin) -> Status); - unsafe { GdipSetPenLineJoin(core::mem::transmute(pen), linejoin) } + unsafe { GdipSetPenLineJoin(pen as _, linejoin) } } #[inline] pub unsafe fn GdipSetPenMiterLimit(pen: *mut GpPen, miterlimit: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPenMiterLimit(pen : *mut GpPen, miterlimit : f32) -> Status); - unsafe { GdipSetPenMiterLimit(core::mem::transmute(pen), miterlimit) } + unsafe { GdipSetPenMiterLimit(pen as _, miterlimit) } } #[inline] pub unsafe fn GdipSetPenMode(pen: *mut GpPen, penmode: PenAlignment) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPenMode(pen : *mut GpPen, penmode : PenAlignment) -> Status); - unsafe { GdipSetPenMode(core::mem::transmute(pen), penmode) } + unsafe { GdipSetPenMode(pen as _, penmode) } } #[inline] pub unsafe fn GdipSetPenStartCap(pen: *mut GpPen, startcap: LineCap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPenStartCap(pen : *mut GpPen, startcap : LineCap) -> Status); - unsafe { GdipSetPenStartCap(core::mem::transmute(pen), startcap) } + unsafe { GdipSetPenStartCap(pen as _, startcap) } } #[inline] pub unsafe fn GdipSetPenTransform(pen: *mut GpPen, matrix: *mut Matrix) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPenTransform(pen : *mut GpPen, matrix : *mut Matrix) -> Status); - unsafe { GdipSetPenTransform(core::mem::transmute(pen), core::mem::transmute(matrix)) } + unsafe { GdipSetPenTransform(pen as _, matrix as _) } } #[inline] pub unsafe fn GdipSetPenUnit(pen: *mut GpPen, unit: Unit) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPenUnit(pen : *mut GpPen, unit : Unit) -> Status); - unsafe { GdipSetPenUnit(core::mem::transmute(pen), unit) } + unsafe { GdipSetPenUnit(pen as _, unit) } } #[inline] pub unsafe fn GdipSetPenWidth(pen: *mut GpPen, width: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPenWidth(pen : *mut GpPen, width : f32) -> Status); - unsafe { GdipSetPenWidth(core::mem::transmute(pen), width) } + unsafe { GdipSetPenWidth(pen as _, width) } } #[inline] pub unsafe fn GdipSetPixelOffsetMode(graphics: *mut GpGraphics, pixeloffsetmode: PixelOffsetMode) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPixelOffsetMode(graphics : *mut GpGraphics, pixeloffsetmode : PixelOffsetMode) -> Status); - unsafe { GdipSetPixelOffsetMode(core::mem::transmute(graphics), pixeloffsetmode) } + unsafe { GdipSetPixelOffsetMode(graphics as _, pixeloffsetmode) } } #[inline] pub unsafe fn GdipSetPropertyItem(image: *mut GpImage, item: *const PropertyItem) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPropertyItem(image : *mut GpImage, item : *const PropertyItem) -> Status); - unsafe { GdipSetPropertyItem(core::mem::transmute(image), item) } + unsafe { GdipSetPropertyItem(image as _, item) } } #[inline] pub unsafe fn GdipSetRenderingOrigin(graphics: *mut GpGraphics, x: i32, y: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetRenderingOrigin(graphics : *mut GpGraphics, x : i32, y : i32) -> Status); - unsafe { GdipSetRenderingOrigin(core::mem::transmute(graphics), x, y) } + unsafe { GdipSetRenderingOrigin(graphics as _, x, y) } } #[inline] pub unsafe fn GdipSetSmoothingMode(graphics: *mut GpGraphics, smoothingmode: SmoothingMode) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetSmoothingMode(graphics : *mut GpGraphics, smoothingmode : SmoothingMode) -> Status); - unsafe { GdipSetSmoothingMode(core::mem::transmute(graphics), smoothingmode) } + unsafe { GdipSetSmoothingMode(graphics as _, smoothingmode) } } #[inline] pub unsafe fn GdipSetSolidFillColor(brush: *mut GpSolidFill, color: u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetSolidFillColor(brush : *mut GpSolidFill, color : u32) -> Status); - unsafe { GdipSetSolidFillColor(core::mem::transmute(brush), color) } + unsafe { GdipSetSolidFillColor(brush as _, color) } } #[inline] pub unsafe fn GdipSetStringFormatAlign(format: *mut GpStringFormat, align: StringAlignment) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetStringFormatAlign(format : *mut GpStringFormat, align : StringAlignment) -> Status); - unsafe { GdipSetStringFormatAlign(core::mem::transmute(format), align) } + unsafe { GdipSetStringFormatAlign(format as _, align) } } #[inline] pub unsafe fn GdipSetStringFormatDigitSubstitution(format: *mut GpStringFormat, language: u16, substitute: StringDigitSubstitute) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetStringFormatDigitSubstitution(format : *mut GpStringFormat, language : u16, substitute : StringDigitSubstitute) -> Status); - unsafe { GdipSetStringFormatDigitSubstitution(core::mem::transmute(format), language, substitute) } + unsafe { GdipSetStringFormatDigitSubstitution(format as _, language, substitute) } } #[inline] pub unsafe fn GdipSetStringFormatFlags(format: *mut GpStringFormat, flags: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetStringFormatFlags(format : *mut GpStringFormat, flags : i32) -> Status); - unsafe { GdipSetStringFormatFlags(core::mem::transmute(format), flags) } + unsafe { GdipSetStringFormatFlags(format as _, flags) } } #[inline] pub unsafe fn GdipSetStringFormatHotkeyPrefix(format: *mut GpStringFormat, hotkeyprefix: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetStringFormatHotkeyPrefix(format : *mut GpStringFormat, hotkeyprefix : i32) -> Status); - unsafe { GdipSetStringFormatHotkeyPrefix(core::mem::transmute(format), hotkeyprefix) } + unsafe { GdipSetStringFormatHotkeyPrefix(format as _, hotkeyprefix) } } #[inline] pub unsafe fn GdipSetStringFormatLineAlign(format: *mut GpStringFormat, align: StringAlignment) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetStringFormatLineAlign(format : *mut GpStringFormat, align : StringAlignment) -> Status); - unsafe { GdipSetStringFormatLineAlign(core::mem::transmute(format), align) } + unsafe { GdipSetStringFormatLineAlign(format as _, align) } } #[inline] pub unsafe fn GdipSetStringFormatMeasurableCharacterRanges(format: *mut GpStringFormat, rangecount: i32, ranges: *const CharacterRange) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetStringFormatMeasurableCharacterRanges(format : *mut GpStringFormat, rangecount : i32, ranges : *const CharacterRange) -> Status); - unsafe { GdipSetStringFormatMeasurableCharacterRanges(core::mem::transmute(format), rangecount, ranges) } + unsafe { GdipSetStringFormatMeasurableCharacterRanges(format as _, rangecount, ranges) } } #[inline] pub unsafe fn GdipSetStringFormatTabStops(format: *mut GpStringFormat, firsttaboffset: f32, count: i32, tabstops: *const f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetStringFormatTabStops(format : *mut GpStringFormat, firsttaboffset : f32, count : i32, tabstops : *const f32) -> Status); - unsafe { GdipSetStringFormatTabStops(core::mem::transmute(format), firsttaboffset, count, tabstops) } + unsafe { GdipSetStringFormatTabStops(format as _, firsttaboffset, count, tabstops) } } #[inline] pub unsafe fn GdipSetStringFormatTrimming(format: *mut GpStringFormat, trimming: StringTrimming) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetStringFormatTrimming(format : *mut GpStringFormat, trimming : StringTrimming) -> Status); - unsafe { GdipSetStringFormatTrimming(core::mem::transmute(format), trimming) } + unsafe { GdipSetStringFormatTrimming(format as _, trimming) } } #[inline] pub unsafe fn GdipSetTextContrast(graphics: *mut GpGraphics, contrast: u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetTextContrast(graphics : *mut GpGraphics, contrast : u32) -> Status); - unsafe { GdipSetTextContrast(core::mem::transmute(graphics), contrast) } + unsafe { GdipSetTextContrast(graphics as _, contrast) } } #[inline] pub unsafe fn GdipSetTextRenderingHint(graphics: *mut GpGraphics, mode: TextRenderingHint) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetTextRenderingHint(graphics : *mut GpGraphics, mode : TextRenderingHint) -> Status); - unsafe { GdipSetTextRenderingHint(core::mem::transmute(graphics), mode) } + unsafe { GdipSetTextRenderingHint(graphics as _, mode) } } #[inline] pub unsafe fn GdipSetTextureTransform(brush: *mut GpTexture, matrix: *const Matrix) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetTextureTransform(brush : *mut GpTexture, matrix : *const Matrix) -> Status); - unsafe { GdipSetTextureTransform(core::mem::transmute(brush), matrix) } + unsafe { GdipSetTextureTransform(brush as _, matrix) } } #[inline] pub unsafe fn GdipSetTextureWrapMode(brush: *mut GpTexture, wrapmode: WrapMode) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetTextureWrapMode(brush : *mut GpTexture, wrapmode : WrapMode) -> Status); - unsafe { GdipSetTextureWrapMode(core::mem::transmute(brush), wrapmode) } + unsafe { GdipSetTextureWrapMode(brush as _, wrapmode) } } #[inline] pub unsafe fn GdipSetWorldTransform(graphics: *mut GpGraphics, matrix: *mut Matrix) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetWorldTransform(graphics : *mut GpGraphics, matrix : *mut Matrix) -> Status); - unsafe { GdipSetWorldTransform(core::mem::transmute(graphics), core::mem::transmute(matrix)) } + unsafe { GdipSetWorldTransform(graphics as _, matrix as _) } } #[inline] pub unsafe fn GdipShearMatrix(matrix: *mut Matrix, shearx: f32, sheary: f32, order: MatrixOrder) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipShearMatrix(matrix : *mut Matrix, shearx : f32, sheary : f32, order : MatrixOrder) -> Status); - unsafe { GdipShearMatrix(core::mem::transmute(matrix), shearx, sheary, order) } + unsafe { GdipShearMatrix(matrix as _, shearx, sheary, order) } } #[inline] pub unsafe fn GdipStartPathFigure(path: *mut GpPath) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipStartPathFigure(path : *mut GpPath) -> Status); - unsafe { GdipStartPathFigure(core::mem::transmute(path)) } + unsafe { GdipStartPathFigure(path as _) } } #[inline] pub unsafe fn GdipStringFormatGetGenericDefault(format: *mut *mut GpStringFormat) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipStringFormatGetGenericDefault(format : *mut *mut GpStringFormat) -> Status); - unsafe { GdipStringFormatGetGenericDefault(core::mem::transmute(format)) } + unsafe { GdipStringFormatGetGenericDefault(format as _) } } #[inline] pub unsafe fn GdipStringFormatGetGenericTypographic(format: *mut *mut GpStringFormat) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipStringFormatGetGenericTypographic(format : *mut *mut GpStringFormat) -> Status); - unsafe { GdipStringFormatGetGenericTypographic(core::mem::transmute(format)) } + unsafe { GdipStringFormatGetGenericTypographic(format as _) } } #[inline] pub unsafe fn GdipTestControl(control: GpTestControlEnum, param1: *mut core::ffi::c_void) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipTestControl(control : GpTestControlEnum, param1 : *mut core::ffi::c_void) -> Status); - unsafe { GdipTestControl(control, core::mem::transmute(param1)) } + unsafe { GdipTestControl(control, param1 as _) } } #[inline] pub unsafe fn GdipTransformMatrixPoints(matrix: *mut Matrix, pts: *mut PointF, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipTransformMatrixPoints(matrix : *mut Matrix, pts : *mut PointF, count : i32) -> Status); - unsafe { GdipTransformMatrixPoints(core::mem::transmute(matrix), core::mem::transmute(pts), count) } + unsafe { GdipTransformMatrixPoints(matrix as _, pts as _, count) } } #[inline] pub unsafe fn GdipTransformMatrixPointsI(matrix: *mut Matrix, pts: *mut Point, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipTransformMatrixPointsI(matrix : *mut Matrix, pts : *mut Point, count : i32) -> Status); - unsafe { GdipTransformMatrixPointsI(core::mem::transmute(matrix), core::mem::transmute(pts), count) } + unsafe { GdipTransformMatrixPointsI(matrix as _, pts as _, count) } } #[inline] pub unsafe fn GdipTransformPath(path: *mut GpPath, matrix: *mut Matrix) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipTransformPath(path : *mut GpPath, matrix : *mut Matrix) -> Status); - unsafe { GdipTransformPath(core::mem::transmute(path), core::mem::transmute(matrix)) } + unsafe { GdipTransformPath(path as _, matrix as _) } } #[inline] pub unsafe fn GdipTransformPoints(graphics: *mut GpGraphics, destspace: CoordinateSpace, srcspace: CoordinateSpace, points: *mut PointF, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipTransformPoints(graphics : *mut GpGraphics, destspace : CoordinateSpace, srcspace : CoordinateSpace, points : *mut PointF, count : i32) -> Status); - unsafe { GdipTransformPoints(core::mem::transmute(graphics), destspace, srcspace, core::mem::transmute(points), count) } + unsafe { GdipTransformPoints(graphics as _, destspace, srcspace, points as _, count) } } #[inline] pub unsafe fn GdipTransformPointsI(graphics: *mut GpGraphics, destspace: CoordinateSpace, srcspace: CoordinateSpace, points: *mut Point, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipTransformPointsI(graphics : *mut GpGraphics, destspace : CoordinateSpace, srcspace : CoordinateSpace, points : *mut Point, count : i32) -> Status); - unsafe { GdipTransformPointsI(core::mem::transmute(graphics), destspace, srcspace, core::mem::transmute(points), count) } + unsafe { GdipTransformPointsI(graphics as _, destspace, srcspace, points as _, count) } } #[inline] pub unsafe fn GdipTransformRegion(region: *mut GpRegion, matrix: *mut Matrix) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipTransformRegion(region : *mut GpRegion, matrix : *mut Matrix) -> Status); - unsafe { GdipTransformRegion(core::mem::transmute(region), core::mem::transmute(matrix)) } + unsafe { GdipTransformRegion(region as _, matrix as _) } } #[inline] pub unsafe fn GdipTranslateClip(graphics: *mut GpGraphics, dx: f32, dy: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipTranslateClip(graphics : *mut GpGraphics, dx : f32, dy : f32) -> Status); - unsafe { GdipTranslateClip(core::mem::transmute(graphics), dx, dy) } + unsafe { GdipTranslateClip(graphics as _, dx, dy) } } #[inline] pub unsafe fn GdipTranslateClipI(graphics: *mut GpGraphics, dx: i32, dy: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipTranslateClipI(graphics : *mut GpGraphics, dx : i32, dy : i32) -> Status); - unsafe { GdipTranslateClipI(core::mem::transmute(graphics), dx, dy) } + unsafe { GdipTranslateClipI(graphics as _, dx, dy) } } #[inline] pub unsafe fn GdipTranslateLineTransform(brush: *mut GpLineGradient, dx: f32, dy: f32, order: MatrixOrder) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipTranslateLineTransform(brush : *mut GpLineGradient, dx : f32, dy : f32, order : MatrixOrder) -> Status); - unsafe { GdipTranslateLineTransform(core::mem::transmute(brush), dx, dy, order) } + unsafe { GdipTranslateLineTransform(brush as _, dx, dy, order) } } #[inline] pub unsafe fn GdipTranslateMatrix(matrix: *mut Matrix, offsetx: f32, offsety: f32, order: MatrixOrder) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipTranslateMatrix(matrix : *mut Matrix, offsetx : f32, offsety : f32, order : MatrixOrder) -> Status); - unsafe { GdipTranslateMatrix(core::mem::transmute(matrix), offsetx, offsety, order) } + unsafe { GdipTranslateMatrix(matrix as _, offsetx, offsety, order) } } #[inline] pub unsafe fn GdipTranslatePathGradientTransform(brush: *mut GpPathGradient, dx: f32, dy: f32, order: MatrixOrder) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipTranslatePathGradientTransform(brush : *mut GpPathGradient, dx : f32, dy : f32, order : MatrixOrder) -> Status); - unsafe { GdipTranslatePathGradientTransform(core::mem::transmute(brush), dx, dy, order) } + unsafe { GdipTranslatePathGradientTransform(brush as _, dx, dy, order) } } #[inline] pub unsafe fn GdipTranslatePenTransform(pen: *mut GpPen, dx: f32, dy: f32, order: MatrixOrder) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipTranslatePenTransform(pen : *mut GpPen, dx : f32, dy : f32, order : MatrixOrder) -> Status); - unsafe { GdipTranslatePenTransform(core::mem::transmute(pen), dx, dy, order) } + unsafe { GdipTranslatePenTransform(pen as _, dx, dy, order) } } #[inline] pub unsafe fn GdipTranslateRegion(region: *mut GpRegion, dx: f32, dy: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipTranslateRegion(region : *mut GpRegion, dx : f32, dy : f32) -> Status); - unsafe { GdipTranslateRegion(core::mem::transmute(region), dx, dy) } + unsafe { GdipTranslateRegion(region as _, dx, dy) } } #[inline] pub unsafe fn GdipTranslateRegionI(region: *mut GpRegion, dx: i32, dy: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipTranslateRegionI(region : *mut GpRegion, dx : i32, dy : i32) -> Status); - unsafe { GdipTranslateRegionI(core::mem::transmute(region), dx, dy) } + unsafe { GdipTranslateRegionI(region as _, dx, dy) } } #[inline] pub unsafe fn GdipTranslateTextureTransform(brush: *mut GpTexture, dx: f32, dy: f32, order: MatrixOrder) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipTranslateTextureTransform(brush : *mut GpTexture, dx : f32, dy : f32, order : MatrixOrder) -> Status); - unsafe { GdipTranslateTextureTransform(core::mem::transmute(brush), dx, dy, order) } + unsafe { GdipTranslateTextureTransform(brush as _, dx, dy, order) } } #[inline] pub unsafe fn GdipTranslateWorldTransform(graphics: *mut GpGraphics, dx: f32, dy: f32, order: MatrixOrder) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipTranslateWorldTransform(graphics : *mut GpGraphics, dx : f32, dy : f32, order : MatrixOrder) -> Status); - unsafe { GdipTranslateWorldTransform(core::mem::transmute(graphics), dx, dy, order) } + unsafe { GdipTranslateWorldTransform(graphics as _, dx, dy, order) } } #[inline] pub unsafe fn GdipVectorTransformMatrixPoints(matrix: *mut Matrix, pts: *mut PointF, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipVectorTransformMatrixPoints(matrix : *mut Matrix, pts : *mut PointF, count : i32) -> Status); - unsafe { GdipVectorTransformMatrixPoints(core::mem::transmute(matrix), core::mem::transmute(pts), count) } + unsafe { GdipVectorTransformMatrixPoints(matrix as _, pts as _, count) } } #[inline] pub unsafe fn GdipVectorTransformMatrixPointsI(matrix: *mut Matrix, pts: *mut Point, count: i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipVectorTransformMatrixPointsI(matrix : *mut Matrix, pts : *mut Point, count : i32) -> Status); - unsafe { GdipVectorTransformMatrixPointsI(core::mem::transmute(matrix), core::mem::transmute(pts), count) } + unsafe { GdipVectorTransformMatrixPointsI(matrix as _, pts as _, count) } } #[inline] pub unsafe fn GdipWarpPath(path: *mut GpPath, matrix: *mut Matrix, points: *const PointF, count: i32, srcx: f32, srcy: f32, srcwidth: f32, srcheight: f32, warpmode: WarpMode, flatness: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipWarpPath(path : *mut GpPath, matrix : *mut Matrix, points : *const PointF, count : i32, srcx : f32, srcy : f32, srcwidth : f32, srcheight : f32, warpmode : WarpMode, flatness : f32) -> Status); - unsafe { GdipWarpPath(core::mem::transmute(path), core::mem::transmute(matrix), points, count, srcx, srcy, srcwidth, srcheight, warpmode, flatness) } + unsafe { GdipWarpPath(path as _, matrix as _, points, count, srcx, srcy, srcwidth, srcheight, warpmode, flatness) } } #[inline] pub unsafe fn GdipWidenPath(nativepath: *mut GpPath, pen: *mut GpPen, matrix: *mut Matrix, flatness: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipWidenPath(nativepath : *mut GpPath, pen : *mut GpPen, matrix : *mut Matrix, flatness : f32) -> Status); - unsafe { GdipWidenPath(core::mem::transmute(nativepath), core::mem::transmute(pen), core::mem::transmute(matrix), flatness) } + unsafe { GdipWidenPath(nativepath as _, pen as _, matrix as _, flatness) } } #[inline] pub unsafe fn GdipWindingModeOutline(path: *mut GpPath, matrix: *mut Matrix, flatness: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipWindingModeOutline(path : *mut GpPath, matrix : *mut Matrix, flatness : f32) -> Status); - unsafe { GdipWindingModeOutline(core::mem::transmute(path), core::mem::transmute(matrix), flatness) } + unsafe { GdipWindingModeOutline(path as _, matrix as _, flatness) } } #[inline] pub unsafe fn GdiplusNotificationHook(token: *mut usize) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdiplusNotificationHook(token : *mut usize) -> Status); - unsafe { GdiplusNotificationHook(core::mem::transmute(token)) } + unsafe { GdiplusNotificationHook(token as _) } } #[inline] pub unsafe fn GdiplusNotificationUnhook(token: usize) { @@ -3300,7 +3300,7 @@ pub unsafe fn GdiplusShutdown(token: usize) { #[inline] pub unsafe fn GdiplusStartup(token: *mut usize, input: *const GdiplusStartupInput, output: *mut GdiplusStartupOutput) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdiplusStartup(token : *mut usize, input : *const GdiplusStartupInput, output : *mut GdiplusStartupOutput) -> Status); - unsafe { GdiplusStartup(core::mem::transmute(token), input, core::mem::transmute(output)) } + unsafe { GdiplusStartup(token as _, input, output as _) } } pub const ALPHA_SHIFT: u32 = 24u32; pub const Aborted: Status = Status(9i32); @@ -4549,7 +4549,7 @@ windows_core::imp::define_interface!(IImageBytes, IImageBytes_Vtbl, 0x025d1823_6 windows_core::imp::interface_hierarchy!(IImageBytes, windows_core::IUnknown); impl IImageBytes { pub unsafe fn CountBytes(&self, pcb: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CountBytes)(windows_core::Interface::as_raw(self), core::mem::transmute(pcb)).ok() } + unsafe { (windows_core::Interface::vtable(self).CountBytes)(windows_core::Interface::as_raw(self), pcb as _).ok() } } pub unsafe fn LockBytes(&self, cb: u32, uloffset: u32, ppvbytes: *const *const core::ffi::c_void) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).LockBytes)(windows_core::Interface::as_raw(self), cb, uloffset, ppvbytes).ok() } 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 c137ddd79d..75ca3d60b4 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Imaging/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Imaging/mod.rs @@ -41,7 +41,7 @@ where #[inline] pub unsafe fn WICMapGuidToShortName(guid: *const windows_core::GUID, wzname: Option<&mut [u16]>, pcchactual: *mut u32) -> windows_core::Result<()> { windows_targets::link!("windowscodecs.dll" "system" fn WICMapGuidToShortName(guid : *const windows_core::GUID, cchname : u32, wzname : windows_core::PWSTR, pcchactual : *mut u32) -> windows_core::HRESULT); - unsafe { WICMapGuidToShortName(guid, wzname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(wzname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pcchactual)).ok() } + unsafe { WICMapGuidToShortName(guid, wzname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(wzname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcchactual as _).ok() } } #[inline] pub unsafe fn WICMapSchemaToName(guidmetadataformat: *const windows_core::GUID, pwzschema: P1, wzname: Option<&mut [u16]>, pcchactual: *mut u32) -> windows_core::Result<()> @@ -49,7 +49,7 @@ where P1: windows_core::Param, { windows_targets::link!("windowscodecs.dll" "system" fn WICMapSchemaToName(guidmetadataformat : *const windows_core::GUID, pwzschema : windows_core::PCWSTR, cchname : u32, wzname : windows_core::PWSTR, pcchactual : *mut u32) -> windows_core::HRESULT); - unsafe { WICMapSchemaToName(guidmetadataformat, pwzschema.param().abi(), wzname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(wzname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pcchactual)).ok() } + unsafe { WICMapSchemaToName(guidmetadataformat, pwzschema.param().abi(), wzname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(wzname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcchactual as _).ok() } } #[inline] pub unsafe fn WICMapShortNameToGuid(wzname: P0) -> windows_core::Result @@ -71,7 +71,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); unsafe { let mut result__ = core::mem::zeroed(); - WICMatchMetadataContent(guidcontainerformat, core::mem::transmute(pguidvendor.unwrap_or(core::mem::zeroed())), pistream.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + WICMatchMetadataContent(guidcontainerformat, pguidvendor.unwrap_or(core::mem::zeroed()) as _, pistream.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) } } #[cfg(feature = "Win32_System_Com")] @@ -480,22 +480,22 @@ impl IWICBitmapCodecInfo { } } pub unsafe fn GetPixelFormats(&self, pguidpixelformats: &mut [windows_core::GUID], pcactual: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPixelFormats)(windows_core::Interface::as_raw(self), pguidpixelformats.len().try_into().unwrap(), core::mem::transmute(pguidpixelformats.as_ptr()), core::mem::transmute(pcactual)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPixelFormats)(windows_core::Interface::as_raw(self), pguidpixelformats.len().try_into().unwrap(), core::mem::transmute(pguidpixelformats.as_ptr()), pcactual as _).ok() } } pub unsafe fn GetColorManagementVersion(&self, wzcolormanagementversion: &mut [u16], pcchactual: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetColorManagementVersion)(windows_core::Interface::as_raw(self), wzcolormanagementversion.len().try_into().unwrap(), core::mem::transmute(wzcolormanagementversion.as_ptr()), core::mem::transmute(pcchactual)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetColorManagementVersion)(windows_core::Interface::as_raw(self), wzcolormanagementversion.len().try_into().unwrap(), core::mem::transmute(wzcolormanagementversion.as_ptr()), pcchactual as _).ok() } } pub unsafe fn GetDeviceManufacturer(&self, wzdevicemanufacturer: &mut [u16], pcchactual: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeviceManufacturer)(windows_core::Interface::as_raw(self), wzdevicemanufacturer.len().try_into().unwrap(), core::mem::transmute(wzdevicemanufacturer.as_ptr()), core::mem::transmute(pcchactual)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceManufacturer)(windows_core::Interface::as_raw(self), wzdevicemanufacturer.len().try_into().unwrap(), core::mem::transmute(wzdevicemanufacturer.as_ptr()), pcchactual as _).ok() } } pub unsafe fn GetDeviceModels(&self, wzdevicemodels: &mut [u16], pcchactual: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeviceModels)(windows_core::Interface::as_raw(self), wzdevicemodels.len().try_into().unwrap(), core::mem::transmute(wzdevicemodels.as_ptr()), core::mem::transmute(pcchactual)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceModels)(windows_core::Interface::as_raw(self), wzdevicemodels.len().try_into().unwrap(), core::mem::transmute(wzdevicemodels.as_ptr()), pcchactual as _).ok() } } pub unsafe fn GetMimeTypes(&self, wzmimetypes: &mut [u16], pcchactual: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMimeTypes)(windows_core::Interface::as_raw(self), wzmimetypes.len().try_into().unwrap(), core::mem::transmute(wzmimetypes.as_ptr()), core::mem::transmute(pcchactual)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMimeTypes)(windows_core::Interface::as_raw(self), wzmimetypes.len().try_into().unwrap(), core::mem::transmute(wzmimetypes.as_ptr()), pcchactual as _).ok() } } pub unsafe fn GetFileExtensions(&self, wzfileextensions: &mut [u16], pcchactual: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFileExtensions)(windows_core::Interface::as_raw(self), wzfileextensions.len().try_into().unwrap(), core::mem::transmute(wzfileextensions.as_ptr()), core::mem::transmute(pcchactual)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFileExtensions)(windows_core::Interface::as_raw(self), wzfileextensions.len().try_into().unwrap(), core::mem::transmute(wzfileextensions.as_ptr()), pcchactual as _).ok() } } pub unsafe fn DoesSupportAnimation(&self) -> windows_core::Result { unsafe { @@ -696,7 +696,7 @@ windows_core::imp::define_interface!(IWICBitmapCodecProgressNotification, IWICBi windows_core::imp::interface_hierarchy!(IWICBitmapCodecProgressNotification, windows_core::IUnknown); impl IWICBitmapCodecProgressNotification { pub unsafe fn RegisterProgressNotification(&self, pfnprogressnotification: Option, pvdata: Option<*const core::ffi::c_void>, dwprogressflags: u32) -> windows_core::Result<()> { - unsafe { (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())), dwprogressflags).ok() } + unsafe { (windows_core::Interface::vtable(self).RegisterProgressNotification)(windows_core::Interface::as_raw(self), pfnprogressnotification.unwrap_or(core::mem::zeroed()) as _, pvdata.unwrap_or(core::mem::zeroed()) as _, dwprogressflags).ok() } } } #[repr(C)] @@ -773,7 +773,7 @@ impl IWICBitmapDecoder { } } pub unsafe fn GetColorContexts(&self, ppicolorcontexts: &mut [Option], pcactualcount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetColorContexts)(windows_core::Interface::as_raw(self), ppicolorcontexts.len().try_into().unwrap(), core::mem::transmute(ppicolorcontexts.as_ptr()), core::mem::transmute(pcactualcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetColorContexts)(windows_core::Interface::as_raw(self), ppicolorcontexts.len().try_into().unwrap(), core::mem::transmute(ppicolorcontexts.as_ptr()), pcactualcount as _).ok() } } pub unsafe fn GetThumbnail(&self) -> windows_core::Result { unsafe { @@ -977,7 +977,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<()> { - unsafe { (windows_core::Interface::vtable(self).GetPatterns)(windows_core::Interface::as_raw(self), cbsizepatterns, core::mem::transmute(ppatterns.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcpatterns.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbpatternsactual)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPatterns)(windows_core::Interface::as_raw(self), cbsizepatterns, ppatterns.unwrap_or(core::mem::zeroed()) as _, pcpatterns.unwrap_or(core::mem::zeroed()) as _, pcbpatternsactual as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn MatchesPattern(&self, pistream: P0) -> windows_core::Result @@ -1349,7 +1349,7 @@ impl IWICBitmapFrameDecode { } } pub unsafe fn GetColorContexts(&self, ppicolorcontexts: &mut [Option], pcactualcount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetColorContexts)(windows_core::Interface::as_raw(self), ppicolorcontexts.len().try_into().unwrap(), core::mem::transmute(ppicolorcontexts.as_ptr()), core::mem::transmute(pcactualcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetColorContexts)(windows_core::Interface::as_raw(self), ppicolorcontexts.len().try_into().unwrap(), core::mem::transmute(ppicolorcontexts.as_ptr()), pcactualcount as _).ok() } } pub unsafe fn GetThumbnail(&self) -> windows_core::Result { unsafe { @@ -1431,7 +1431,7 @@ impl IWICBitmapFrameEncode { unsafe { (windows_core::Interface::vtable(self).SetResolution)(windows_core::Interface::as_raw(self), dpix, dpiy).ok() } } pub unsafe fn SetPixelFormat(&self, ppixelformat: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetPixelFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(ppixelformat)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetPixelFormat)(windows_core::Interface::as_raw(self), ppixelformat as _).ok() } } pub unsafe fn SetColorContexts(&self, ppicolorcontext: &[Option]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetColorContexts)(windows_core::Interface::as_raw(self), ppicolorcontext.len().try_into().unwrap(), core::mem::transmute(ppicolorcontext.as_ptr())).ok() } @@ -1599,7 +1599,7 @@ windows_core::imp::define_interface!(IWICBitmapLock, IWICBitmapLock_Vtbl, 0x0000 windows_core::imp::interface_hierarchy!(IWICBitmapLock, windows_core::IUnknown); impl IWICBitmapLock { pub unsafe fn GetSize(&self, puiwidth: *mut u32, puiheight: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSize)(windows_core::Interface::as_raw(self), core::mem::transmute(puiwidth), core::mem::transmute(puiheight)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSize)(windows_core::Interface::as_raw(self), puiwidth as _, puiheight as _).ok() } } pub unsafe fn GetStride(&self) -> windows_core::Result { unsafe { @@ -1608,7 +1608,7 @@ impl IWICBitmapLock { } } pub unsafe fn GetDataPointer(&self, pcbbuffersize: *mut u32, ppbdata: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDataPointer)(windows_core::Interface::as_raw(self), core::mem::transmute(pcbbuffersize), core::mem::transmute(ppbdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDataPointer)(windows_core::Interface::as_raw(self), pcbbuffersize as _, ppbdata as _).ok() } } pub unsafe fn GetPixelFormat(&self) -> windows_core::Result { unsafe { @@ -1725,7 +1725,7 @@ windows_core::imp::define_interface!(IWICBitmapSource, IWICBitmapSource_Vtbl, 0x windows_core::imp::interface_hierarchy!(IWICBitmapSource, windows_core::IUnknown); impl IWICBitmapSource { pub unsafe fn GetSize(&self, puiwidth: *mut u32, puiheight: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSize)(windows_core::Interface::as_raw(self), core::mem::transmute(puiwidth), core::mem::transmute(puiheight)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSize)(windows_core::Interface::as_raw(self), puiwidth as _, puiheight as _).ok() } } pub unsafe fn GetPixelFormat(&self) -> windows_core::Result { unsafe { @@ -1734,7 +1734,7 @@ impl IWICBitmapSource { } } pub unsafe fn GetResolution(&self, pdpix: *mut f64, pdpiy: *mut f64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetResolution)(windows_core::Interface::as_raw(self), core::mem::transmute(pdpix), core::mem::transmute(pdpiy)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetResolution)(windows_core::Interface::as_raw(self), pdpix as _, pdpiy as _).ok() } } pub unsafe fn CopyPalette(&self, pipalette: P0) -> windows_core::Result<()> where @@ -1821,10 +1821,10 @@ impl IWICBitmapSourceTransform { unsafe { (windows_core::Interface::vtable(self).CopyPixels)(windows_core::Interface::as_raw(self), prc, uiwidth, uiheight, pguiddstformat, dsttransform, nstride, pbbuffer.len().try_into().unwrap(), core::mem::transmute(pbbuffer.as_ptr())).ok() } } pub unsafe fn GetClosestSize(&self, puiwidth: *mut u32, puiheight: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClosestSize)(windows_core::Interface::as_raw(self), core::mem::transmute(puiwidth), core::mem::transmute(puiheight)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClosestSize)(windows_core::Interface::as_raw(self), puiwidth as _, puiheight as _).ok() } } pub unsafe fn GetClosestPixelFormat(&self, pguiddstformat: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClosestPixelFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(pguiddstformat)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClosestPixelFormat)(windows_core::Interface::as_raw(self), pguiddstformat as _).ok() } } pub unsafe fn DoesSupportTransform(&self, dsttransform: WICBitmapTransformOptions) -> windows_core::Result { unsafe { @@ -1914,7 +1914,7 @@ impl IWICColorContext { } } pub unsafe fn GetProfileBytes(&self, pbbuffer: &mut [u8], pcbactual: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProfileBytes)(windows_core::Interface::as_raw(self), pbbuffer.len().try_into().unwrap(), core::mem::transmute(pbbuffer.as_ptr()), core::mem::transmute(pcbactual)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProfileBytes)(windows_core::Interface::as_raw(self), pbbuffer.len().try_into().unwrap(), core::mem::transmute(pbbuffer.as_ptr()), pcbactual as _).ok() } } pub unsafe fn GetExifColorSpace(&self) -> windows_core::Result { unsafe { @@ -2273,7 +2273,7 @@ impl IWICComponentInfo { } } pub unsafe fn GetAuthor(&self, wzauthor: &mut [u16], pcchactual: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAuthor)(windows_core::Interface::as_raw(self), wzauthor.len().try_into().unwrap(), core::mem::transmute(wzauthor.as_ptr()), core::mem::transmute(pcchactual)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAuthor)(windows_core::Interface::as_raw(self), wzauthor.len().try_into().unwrap(), core::mem::transmute(wzauthor.as_ptr()), pcchactual as _).ok() } } pub unsafe fn GetVendorGUID(&self) -> windows_core::Result { unsafe { @@ -2282,13 +2282,13 @@ impl IWICComponentInfo { } } pub unsafe fn GetVersion(&self, wzversion: &mut [u16], pcchactual: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVersion)(windows_core::Interface::as_raw(self), wzversion.len().try_into().unwrap(), core::mem::transmute(wzversion.as_ptr()), core::mem::transmute(pcchactual)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVersion)(windows_core::Interface::as_raw(self), wzversion.len().try_into().unwrap(), core::mem::transmute(wzversion.as_ptr()), pcchactual as _).ok() } } pub unsafe fn GetSpecVersion(&self, wzspecversion: &mut [u16], pcchactual: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSpecVersion)(windows_core::Interface::as_raw(self), wzspecversion.len().try_into().unwrap(), core::mem::transmute(wzspecversion.as_ptr()), core::mem::transmute(pcchactual)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSpecVersion)(windows_core::Interface::as_raw(self), wzspecversion.len().try_into().unwrap(), core::mem::transmute(wzspecversion.as_ptr()), pcchactual as _).ok() } } pub unsafe fn GetFriendlyName(&self, wzfriendlyname: &mut [u16], pcchactual: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFriendlyName)(windows_core::Interface::as_raw(self), wzfriendlyname.len().try_into().unwrap(), core::mem::transmute(wzfriendlyname.as_ptr()), core::mem::transmute(pcchactual)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFriendlyName)(windows_core::Interface::as_raw(self), wzfriendlyname.len().try_into().unwrap(), core::mem::transmute(wzfriendlyname.as_ptr()), pcchactual as _).ok() } } } #[repr(C)] @@ -2409,7 +2409,7 @@ windows_core::imp::interface_hierarchy!(IWICDdsDecoder, windows_core::IUnknown); impl IWICDdsDecoder { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetParameters(&self, pparameters: *mut WICDdsParameters) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(pparameters)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetParameters)(windows_core::Interface::as_raw(self), pparameters as _).ok() } } pub unsafe fn GetFrame(&self, arrayindex: u32, miplevel: u32, sliceindex: u32) -> windows_core::Result { unsafe { @@ -2474,10 +2474,10 @@ impl IWICDdsEncoder { } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetParameters(&self, pparameters: *mut WICDdsParameters) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(pparameters)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetParameters)(windows_core::Interface::as_raw(self), pparameters as _).ok() } } pub unsafe fn CreateNewFrame(&self, ppiframeencode: *mut Option, parrayindex: *mut u32, pmiplevel: *mut u32, psliceindex: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateNewFrame)(windows_core::Interface::as_raw(self), core::mem::transmute(ppiframeencode), core::mem::transmute(parrayindex), core::mem::transmute(pmiplevel), core::mem::transmute(psliceindex)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateNewFrame)(windows_core::Interface::as_raw(self), core::mem::transmute(ppiframeencode), parrayindex as _, pmiplevel as _, psliceindex as _).ok() } } } #[repr(C)] @@ -2537,7 +2537,7 @@ windows_core::imp::define_interface!(IWICDdsFrameDecode, IWICDdsFrameDecode_Vtbl windows_core::imp::interface_hierarchy!(IWICDdsFrameDecode, windows_core::IUnknown); impl IWICDdsFrameDecode { pub unsafe fn GetSizeInBlocks(&self, pwidthinblocks: *mut u32, pheightinblocks: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSizeInBlocks)(windows_core::Interface::as_raw(self), core::mem::transmute(pwidthinblocks), core::mem::transmute(pheightinblocks)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSizeInBlocks)(windows_core::Interface::as_raw(self), pwidthinblocks as _, pheightinblocks as _).ok() } } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetFormatInfo(&self) -> windows_core::Result { @@ -2616,7 +2616,7 @@ impl core::ops::Deref for IWICDevelopRaw { windows_core::imp::interface_hierarchy!(IWICDevelopRaw, windows_core::IUnknown, IWICBitmapSource, IWICBitmapFrameDecode); impl IWICDevelopRaw { pub unsafe fn QueryRawCapabilitiesInfo(&self, pinfo: *mut WICRawCapabilitiesInfo) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryRawCapabilitiesInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryRawCapabilitiesInfo)(windows_core::Interface::as_raw(self), pinfo as _).ok() } } pub unsafe fn LoadParameterSet(&self, parameterset: WICRawParameterSet) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).LoadParameterSet)(windows_core::Interface::as_raw(self), parameterset).ok() } @@ -2641,7 +2641,7 @@ impl IWICDevelopRaw { unsafe { (windows_core::Interface::vtable(self).SetWhitePointRGB)(windows_core::Interface::as_raw(self), red, green, blue).ok() } } pub unsafe fn GetWhitePointRGB(&self, pred: *mut u32, pgreen: *mut u32, pblue: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWhitePointRGB)(windows_core::Interface::as_raw(self), core::mem::transmute(pred), core::mem::transmute(pgreen), core::mem::transmute(pblue)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWhitePointRGB)(windows_core::Interface::as_raw(self), pred as _, pgreen as _, pblue as _).ok() } } pub unsafe fn SetNamedWhitePoint(&self, whitepoint: WICNamedWhitePoint) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetNamedWhitePoint)(windows_core::Interface::as_raw(self), whitepoint).ok() } @@ -2662,7 +2662,7 @@ impl IWICDevelopRaw { } } pub unsafe fn GetKelvinRangeInfo(&self, pminkelvintemp: *mut u32, pmaxkelvintemp: *mut u32, pkelvintempstepvalue: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetKelvinRangeInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pminkelvintemp), core::mem::transmute(pmaxkelvintemp), core::mem::transmute(pkelvintempstepvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetKelvinRangeInfo)(windows_core::Interface::as_raw(self), pminkelvintemp as _, pmaxkelvintemp as _, pkelvintempstepvalue as _).ok() } } pub unsafe fn SetContrast(&self, contrast: f64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetContrast)(windows_core::Interface::as_raw(self), contrast).ok() } @@ -2728,7 +2728,7 @@ impl IWICDevelopRaw { unsafe { (windows_core::Interface::vtable(self).SetToneCurve)(windows_core::Interface::as_raw(self), cbtonecurvesize, ptonecurve).ok() } } pub unsafe fn GetToneCurve(&self, cbtonecurvebuffersize: u32, ptonecurve: Option<*mut WICRawToneCurve>, pcbactualtonecurvebuffersize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetToneCurve)(windows_core::Interface::as_raw(self), cbtonecurvebuffersize, core::mem::transmute(ptonecurve.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbactualtonecurvebuffersize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetToneCurve)(windows_core::Interface::as_raw(self), cbtonecurvebuffersize, ptonecurve.unwrap_or(core::mem::zeroed()) as _, pcbactualtonecurvebuffersize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetRotation(&self, rotation: f64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetRotation)(windows_core::Interface::as_raw(self), rotation).ok() } @@ -3173,7 +3173,7 @@ windows_core::imp::interface_hierarchy!(IWICEnumMetadataItem, windows_core::IUnk impl IWICEnumMetadataItem { #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn Next(&self, celt: u32, rgeltschema: *mut super::super::System::Com::StructuredStorage::PROPVARIANT, rgeltid: *mut super::super::System::Com::StructuredStorage::PROPVARIANT, rgeltvalue: *mut super::super::System::Com::StructuredStorage::PROPVARIANT, pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(rgeltschema), core::mem::transmute(rgeltid), core::mem::transmute(rgeltvalue), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(rgeltschema), core::mem::transmute(rgeltid), core::mem::transmute(rgeltvalue), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -3377,7 +3377,7 @@ impl core::ops::Deref for IWICFormatConverterInfo { windows_core::imp::interface_hierarchy!(IWICFormatConverterInfo, windows_core::IUnknown, IWICComponentInfo); impl IWICFormatConverterInfo { pub unsafe fn GetPixelFormats(&self, ppixelformatguids: &mut [windows_core::GUID], pcactual: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPixelFormats)(windows_core::Interface::as_raw(self), ppixelformatguids.len().try_into().unwrap(), core::mem::transmute(ppixelformatguids.as_ptr()), core::mem::transmute(pcactual)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPixelFormats)(windows_core::Interface::as_raw(self), ppixelformatguids.len().try_into().unwrap(), core::mem::transmute(ppixelformatguids.as_ptr()), pcactual as _).ok() } } pub unsafe fn CreateInstance(&self) -> windows_core::Result { unsafe { @@ -3436,7 +3436,7 @@ impl IWICImagingFactory { { unsafe { 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::mem::zeroed())), dwdesiredaccess, metadataoptions, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateDecoderFromFilename)(windows_core::Interface::as_raw(self), wzfilename.param().abi(), pguidvendor.unwrap_or(core::mem::zeroed()) as _, dwdesiredaccess, metadataoptions, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_System_Com")] @@ -4034,27 +4034,27 @@ impl IWICJpegFrameDecode { } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetAcHuffmanTable(&self, scanindex: u32, tableindex: u32, pachuffmantable: *mut super::Dxgi::Common::DXGI_JPEG_AC_HUFFMAN_TABLE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAcHuffmanTable)(windows_core::Interface::as_raw(self), scanindex, tableindex, core::mem::transmute(pachuffmantable)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAcHuffmanTable)(windows_core::Interface::as_raw(self), scanindex, tableindex, pachuffmantable as _).ok() } } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetDcHuffmanTable(&self, scanindex: u32, tableindex: u32, pdchuffmantable: *mut super::Dxgi::Common::DXGI_JPEG_DC_HUFFMAN_TABLE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDcHuffmanTable)(windows_core::Interface::as_raw(self), scanindex, tableindex, core::mem::transmute(pdchuffmantable)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDcHuffmanTable)(windows_core::Interface::as_raw(self), scanindex, tableindex, pdchuffmantable as _).ok() } } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetQuantizationTable(&self, scanindex: u32, tableindex: u32, pquantizationtable: *mut super::Dxgi::Common::DXGI_JPEG_QUANTIZATION_TABLE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetQuantizationTable)(windows_core::Interface::as_raw(self), scanindex, tableindex, core::mem::transmute(pquantizationtable)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetQuantizationTable)(windows_core::Interface::as_raw(self), scanindex, tableindex, pquantizationtable as _).ok() } } pub unsafe fn GetFrameHeader(&self, pframeheader: *mut WICJpegFrameHeader) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFrameHeader)(windows_core::Interface::as_raw(self), core::mem::transmute(pframeheader)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFrameHeader)(windows_core::Interface::as_raw(self), pframeheader as _).ok() } } pub unsafe fn GetScanHeader(&self, scanindex: u32, pscanheader: *mut WICJpegScanHeader) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetScanHeader)(windows_core::Interface::as_raw(self), scanindex, core::mem::transmute(pscanheader)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScanHeader)(windows_core::Interface::as_raw(self), scanindex, pscanheader as _).ok() } } pub unsafe fn CopyScan(&self, scanindex: u32, scanoffset: u32, pbscandata: &mut [u8], pcbscandataactual: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CopyScan)(windows_core::Interface::as_raw(self), scanindex, scanoffset, pbscandata.len().try_into().unwrap(), core::mem::transmute(pbscandata.as_ptr()), core::mem::transmute(pcbscandataactual)).ok() } + unsafe { (windows_core::Interface::vtable(self).CopyScan)(windows_core::Interface::as_raw(self), scanindex, scanoffset, pbscandata.len().try_into().unwrap(), core::mem::transmute(pbscandata.as_ptr()), pcbscandataactual as _).ok() } } pub unsafe fn CopyMinimalStream(&self, streamoffset: u32, pbstreamdata: &mut [u8], pcbstreamdataactual: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CopyMinimalStream)(windows_core::Interface::as_raw(self), streamoffset, pbstreamdata.len().try_into().unwrap(), core::mem::transmute(pbstreamdata.as_ptr()), core::mem::transmute(pcbstreamdataactual)).ok() } + unsafe { (windows_core::Interface::vtable(self).CopyMinimalStream)(windows_core::Interface::as_raw(self), streamoffset, pbstreamdata.len().try_into().unwrap(), core::mem::transmute(pbstreamdata.as_ptr()), pcbstreamdataactual as _).ok() } } } #[repr(C)] @@ -4187,15 +4187,15 @@ windows_core::imp::interface_hierarchy!(IWICJpegFrameEncode, windows_core::IUnkn impl IWICJpegFrameEncode { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetAcHuffmanTable(&self, scanindex: u32, tableindex: u32, pachuffmantable: *mut super::Dxgi::Common::DXGI_JPEG_AC_HUFFMAN_TABLE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAcHuffmanTable)(windows_core::Interface::as_raw(self), scanindex, tableindex, core::mem::transmute(pachuffmantable)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAcHuffmanTable)(windows_core::Interface::as_raw(self), scanindex, tableindex, pachuffmantable as _).ok() } } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetDcHuffmanTable(&self, scanindex: u32, tableindex: u32, pdchuffmantable: *mut super::Dxgi::Common::DXGI_JPEG_DC_HUFFMAN_TABLE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDcHuffmanTable)(windows_core::Interface::as_raw(self), scanindex, tableindex, core::mem::transmute(pdchuffmantable)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDcHuffmanTable)(windows_core::Interface::as_raw(self), scanindex, tableindex, pdchuffmantable as _).ok() } } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetQuantizationTable(&self, scanindex: u32, tableindex: u32, pquantizationtable: *mut super::Dxgi::Common::DXGI_JPEG_QUANTIZATION_TABLE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetQuantizationTable)(windows_core::Interface::as_raw(self), scanindex, tableindex, core::mem::transmute(pquantizationtable)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetQuantizationTable)(windows_core::Interface::as_raw(self), scanindex, tableindex, pquantizationtable as _).ok() } } pub unsafe fn WriteScan(&self, pbscandata: &[u8]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).WriteScan)(windows_core::Interface::as_raw(self), pbscandata.len().try_into().unwrap(), core::mem::transmute(pbscandata.as_ptr())).ok() } @@ -4502,13 +4502,13 @@ impl IWICMetadataHandlerInfo { } } pub unsafe fn GetContainerFormats(&self, pguidcontainerformats: &mut [windows_core::GUID], pcchactual: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetContainerFormats)(windows_core::Interface::as_raw(self), pguidcontainerformats.len().try_into().unwrap(), core::mem::transmute(pguidcontainerformats.as_ptr()), core::mem::transmute(pcchactual)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetContainerFormats)(windows_core::Interface::as_raw(self), pguidcontainerformats.len().try_into().unwrap(), core::mem::transmute(pguidcontainerformats.as_ptr()), pcchactual as _).ok() } } pub unsafe fn GetDeviceManufacturer(&self, wzdevicemanufacturer: &mut [u16], pcchactual: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeviceManufacturer)(windows_core::Interface::as_raw(self), wzdevicemanufacturer.len().try_into().unwrap(), core::mem::transmute(wzdevicemanufacturer.as_ptr()), core::mem::transmute(pcchactual)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceManufacturer)(windows_core::Interface::as_raw(self), wzdevicemanufacturer.len().try_into().unwrap(), core::mem::transmute(wzdevicemanufacturer.as_ptr()), pcchactual as _).ok() } } pub unsafe fn GetDeviceModels(&self, wzdevicemodels: &mut [u16], pcchactual: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeviceModels)(windows_core::Interface::as_raw(self), wzdevicemodels.len().try_into().unwrap(), core::mem::transmute(wzdevicemodels.as_ptr()), core::mem::transmute(pcchactual)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceModels)(windows_core::Interface::as_raw(self), wzdevicemodels.len().try_into().unwrap(), core::mem::transmute(wzdevicemodels.as_ptr()), pcchactual as _).ok() } } pub unsafe fn DoesRequireFullStream(&self) -> windows_core::Result { unsafe { @@ -4643,7 +4643,7 @@ impl IWICMetadataQueryReader { } } pub unsafe fn GetLocation(&self, wznamespace: &mut [u16], pcchactuallength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLocation)(windows_core::Interface::as_raw(self), wznamespace.len().try_into().unwrap(), core::mem::transmute(wznamespace.as_ptr()), core::mem::transmute(pcchactuallength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLocation)(windows_core::Interface::as_raw(self), wznamespace.len().try_into().unwrap(), core::mem::transmute(wznamespace.as_ptr()), pcchactuallength as _).ok() } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn GetMetadataByName(&self, wzname: P0, pvarvalue: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()> @@ -4948,7 +4948,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<()> { - unsafe { (windows_core::Interface::vtable(self).GetPatterns)(windows_core::Interface::as_raw(self), guidcontainerformat, 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() } + unsafe { (windows_core::Interface::vtable(self).GetPatterns)(windows_core::Interface::as_raw(self), guidcontainerformat, cbsize, ppattern.unwrap_or(core::mem::zeroed()) as _, pccount.unwrap_or(core::mem::zeroed()) as _, pcbactual.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn MatchesPattern(&self, guidcontainerformat: *const windows_core::GUID, pistream: P1) -> windows_core::Result @@ -5129,7 +5129,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<()> { - unsafe { (windows_core::Interface::vtable(self).GetHeader)(windows_core::Interface::as_raw(self), guidcontainerformat, cbsize, core::mem::transmute(pheader.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbactual.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetHeader)(windows_core::Interface::as_raw(self), guidcontainerformat, cbsize, pheader.unwrap_or(core::mem::zeroed()) as _, pcbactual.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreateInstance(&self) -> windows_core::Result { unsafe { @@ -5213,7 +5213,7 @@ impl IWICPalette { } } pub unsafe fn GetColors(&self, pcolors: &mut [u32], pcactualcolors: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetColors)(windows_core::Interface::as_raw(self), pcolors.len().try_into().unwrap(), core::mem::transmute(pcolors.as_ptr()), core::mem::transmute(pcactualcolors)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetColors)(windows_core::Interface::as_raw(self), pcolors.len().try_into().unwrap(), core::mem::transmute(pcolors.as_ptr()), pcactualcolors as _).ok() } } pub unsafe fn IsBlackWhite(&self) -> windows_core::Result { unsafe { @@ -5478,7 +5478,7 @@ impl IWICPixelFormatInfo { } } pub unsafe fn GetChannelMask(&self, uichannelindex: u32, pbmaskbuffer: &mut [u8], pcbactual: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetChannelMask)(windows_core::Interface::as_raw(self), uichannelindex, pbmaskbuffer.len().try_into().unwrap(), core::mem::transmute(pbmaskbuffer.as_ptr()), core::mem::transmute(pcbactual)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetChannelMask)(windows_core::Interface::as_raw(self), uichannelindex, pbmaskbuffer.len().try_into().unwrap(), core::mem::transmute(pbmaskbuffer.as_ptr()), pcbactual as _).ok() } } } #[repr(C)] @@ -5685,7 +5685,7 @@ windows_core::imp::define_interface!(IWICPlanarBitmapSourceTransform, IWICPlanar windows_core::imp::interface_hierarchy!(IWICPlanarBitmapSourceTransform, windows_core::IUnknown); impl IWICPlanarBitmapSourceTransform { pub unsafe fn DoesSupportTransform(&self, puiwidth: *mut u32, puiheight: *mut u32, dsttransform: WICBitmapTransformOptions, dstplanaroptions: WICPlanarOptions, pguiddstformats: *const windows_core::GUID, pplanedescriptions: *mut WICBitmapPlaneDescription, cplanes: u32, pfissupported: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DoesSupportTransform)(windows_core::Interface::as_raw(self), core::mem::transmute(puiwidth), core::mem::transmute(puiheight), dsttransform, dstplanaroptions, pguiddstformats, core::mem::transmute(pplanedescriptions), cplanes, core::mem::transmute(pfissupported)).ok() } + unsafe { (windows_core::Interface::vtable(self).DoesSupportTransform)(windows_core::Interface::as_raw(self), puiwidth as _, puiheight as _, dsttransform, dstplanaroptions, pguiddstformats, pplanedescriptions as _, cplanes, pfissupported as _).ok() } } pub unsafe fn CopyPixels(&self, prcsource: *const WICRect, uiwidth: u32, uiheight: u32, dsttransform: WICBitmapTransformOptions, dstplanaroptions: WICPlanarOptions, pdstplanes: &[WICBitmapPlane]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).CopyPixels)(windows_core::Interface::as_raw(self), prcsource, uiwidth, uiheight, dsttransform, dstplanaroptions, core::mem::transmute(pdstplanes.as_ptr()), pdstplanes.len().try_into().unwrap()).ok() } 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 8229c41fb4..618f0fe11a 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/OpenGL/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/OpenGL/mod.rs @@ -8,13 +8,13 @@ pub unsafe fn ChoosePixelFormat(hdc: super::Gdi::HDC, ppfd: *const PIXELFORMATDE #[inline] 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); - unsafe { DescribePixelFormat(hdc, ipixelformat, nbytes, core::mem::transmute(ppfd.unwrap_or(core::mem::zeroed()))) } + unsafe { DescribePixelFormat(hdc, ipixelformat, nbytes, ppfd.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { GetEnhMetaFilePixelFormat(hemf, cbbuffer, core::mem::transmute(ppfd.unwrap_or(core::mem::zeroed()))) } + unsafe { GetEnhMetaFilePixelFormat(hemf, cbbuffer, ppfd.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -47,7 +47,7 @@ pub unsafe fn glAlphaFunc(func: u32, r#ref: f32) { #[inline] pub unsafe fn glAreTexturesResident(n: i32, textures: *const u32, residences: *mut u8) -> u8 { windows_targets::link!("opengl32.dll" "system" fn glAreTexturesResident(n : i32, textures : *const u32, residences : *mut u8) -> u8); - unsafe { glAreTexturesResident(n, textures, core::mem::transmute(residences)) } + unsafe { glAreTexturesResident(n, textures, residences as _) } } #[inline] pub unsafe fn glArrayElement(i: i32) { @@ -477,7 +477,7 @@ pub unsafe fn glEvalPoint2(i: i32, j: i32) { #[inline] pub unsafe fn glFeedbackBuffer(size: i32, r#type: u32, buffer: *mut f32) { windows_targets::link!("opengl32.dll" "system" fn glFeedbackBuffer(size : i32, r#type : u32, buffer : *mut f32)); - unsafe { glFeedbackBuffer(size, r#type, core::mem::transmute(buffer)) } + unsafe { glFeedbackBuffer(size, r#type, buffer as _) } } #[inline] pub unsafe fn glFinish() { @@ -527,22 +527,22 @@ pub unsafe fn glGenLists(range: i32) -> u32 { #[inline] pub unsafe fn glGenTextures(n: i32, textures: *mut u32) { windows_targets::link!("opengl32.dll" "system" fn glGenTextures(n : i32, textures : *mut u32)); - unsafe { glGenTextures(n, core::mem::transmute(textures)) } + unsafe { glGenTextures(n, textures as _) } } #[inline] pub unsafe fn glGetBooleanv(pname: u32, params: *mut u8) { windows_targets::link!("opengl32.dll" "system" fn glGetBooleanv(pname : u32, params : *mut u8)); - unsafe { glGetBooleanv(pname, core::mem::transmute(params)) } + unsafe { glGetBooleanv(pname, params as _) } } #[inline] pub unsafe fn glGetClipPlane(plane: u32, equation: *mut f64) { windows_targets::link!("opengl32.dll" "system" fn glGetClipPlane(plane : u32, equation : *mut f64)); - unsafe { glGetClipPlane(plane, core::mem::transmute(equation)) } + unsafe { glGetClipPlane(plane, equation as _) } } #[inline] pub unsafe fn glGetDoublev(pname: u32, params: *mut f64) { windows_targets::link!("opengl32.dll" "system" fn glGetDoublev(pname : u32, params : *mut f64)); - unsafe { glGetDoublev(pname, core::mem::transmute(params)) } + unsafe { glGetDoublev(pname, params as _) } } #[inline] pub unsafe fn glGetError() -> u32 { @@ -552,72 +552,72 @@ pub unsafe fn glGetError() -> u32 { #[inline] pub unsafe fn glGetFloatv(pname: u32, params: *mut f32) { windows_targets::link!("opengl32.dll" "system" fn glGetFloatv(pname : u32, params : *mut f32)); - unsafe { glGetFloatv(pname, core::mem::transmute(params)) } + unsafe { glGetFloatv(pname, params as _) } } #[inline] pub unsafe fn glGetIntegerv(pname: u32, params: *mut i32) { windows_targets::link!("opengl32.dll" "system" fn glGetIntegerv(pname : u32, params : *mut i32)); - unsafe { glGetIntegerv(pname, core::mem::transmute(params)) } + unsafe { glGetIntegerv(pname, params as _) } } #[inline] pub unsafe fn glGetLightfv(light: u32, pname: u32, params: *mut f32) { windows_targets::link!("opengl32.dll" "system" fn glGetLightfv(light : u32, pname : u32, params : *mut f32)); - unsafe { glGetLightfv(light, pname, core::mem::transmute(params)) } + unsafe { glGetLightfv(light, pname, params as _) } } #[inline] pub unsafe fn glGetLightiv(light: u32, pname: u32, params: *mut i32) { windows_targets::link!("opengl32.dll" "system" fn glGetLightiv(light : u32, pname : u32, params : *mut i32)); - unsafe { glGetLightiv(light, pname, core::mem::transmute(params)) } + unsafe { glGetLightiv(light, pname, params as _) } } #[inline] pub unsafe fn glGetMapdv(target: u32, query: u32, v: *mut f64) { windows_targets::link!("opengl32.dll" "system" fn glGetMapdv(target : u32, query : u32, v : *mut f64)); - unsafe { glGetMapdv(target, query, core::mem::transmute(v)) } + unsafe { glGetMapdv(target, query, v as _) } } #[inline] pub unsafe fn glGetMapfv(target: u32, query: u32, v: *mut f32) { windows_targets::link!("opengl32.dll" "system" fn glGetMapfv(target : u32, query : u32, v : *mut f32)); - unsafe { glGetMapfv(target, query, core::mem::transmute(v)) } + unsafe { glGetMapfv(target, query, v as _) } } #[inline] pub unsafe fn glGetMapiv(target: u32, query: u32, v: *mut i32) { windows_targets::link!("opengl32.dll" "system" fn glGetMapiv(target : u32, query : u32, v : *mut i32)); - unsafe { glGetMapiv(target, query, core::mem::transmute(v)) } + unsafe { glGetMapiv(target, query, v as _) } } #[inline] pub unsafe fn glGetMaterialfv(face: u32, pname: u32, params: *mut f32) { windows_targets::link!("opengl32.dll" "system" fn glGetMaterialfv(face : u32, pname : u32, params : *mut f32)); - unsafe { glGetMaterialfv(face, pname, core::mem::transmute(params)) } + unsafe { glGetMaterialfv(face, pname, params as _) } } #[inline] pub unsafe fn glGetMaterialiv(face: u32, pname: u32, params: *mut i32) { windows_targets::link!("opengl32.dll" "system" fn glGetMaterialiv(face : u32, pname : u32, params : *mut i32)); - unsafe { glGetMaterialiv(face, pname, core::mem::transmute(params)) } + unsafe { glGetMaterialiv(face, pname, params as _) } } #[inline] pub unsafe fn glGetPixelMapfv(map: u32, values: *mut f32) { windows_targets::link!("opengl32.dll" "system" fn glGetPixelMapfv(map : u32, values : *mut f32)); - unsafe { glGetPixelMapfv(map, core::mem::transmute(values)) } + unsafe { glGetPixelMapfv(map, values as _) } } #[inline] pub unsafe fn glGetPixelMapuiv(map: u32, values: *mut u32) { windows_targets::link!("opengl32.dll" "system" fn glGetPixelMapuiv(map : u32, values : *mut u32)); - unsafe { glGetPixelMapuiv(map, core::mem::transmute(values)) } + unsafe { glGetPixelMapuiv(map, values as _) } } #[inline] pub unsafe fn glGetPixelMapusv(map: u32, values: *mut u16) { windows_targets::link!("opengl32.dll" "system" fn glGetPixelMapusv(map : u32, values : *mut u16)); - unsafe { glGetPixelMapusv(map, core::mem::transmute(values)) } + unsafe { glGetPixelMapusv(map, values as _) } } #[inline] pub unsafe fn glGetPointerv(pname: u32, params: *mut *mut core::ffi::c_void) { windows_targets::link!("opengl32.dll" "system" fn glGetPointerv(pname : u32, params : *mut *mut core::ffi::c_void)); - unsafe { glGetPointerv(pname, core::mem::transmute(params)) } + unsafe { glGetPointerv(pname, params as _) } } #[inline] pub unsafe fn glGetPolygonStipple(mask: *mut u8) { windows_targets::link!("opengl32.dll" "system" fn glGetPolygonStipple(mask : *mut u8)); - unsafe { glGetPolygonStipple(core::mem::transmute(mask)) } + unsafe { glGetPolygonStipple(mask as _) } } #[inline] pub unsafe fn glGetString(name: u32) -> *mut u8 { @@ -627,52 +627,52 @@ pub unsafe fn glGetString(name: u32) -> *mut u8 { #[inline] pub unsafe fn glGetTexEnvfv(target: u32, pname: u32, params: *mut f32) { windows_targets::link!("opengl32.dll" "system" fn glGetTexEnvfv(target : u32, pname : u32, params : *mut f32)); - unsafe { glGetTexEnvfv(target, pname, core::mem::transmute(params)) } + unsafe { glGetTexEnvfv(target, pname, params as _) } } #[inline] pub unsafe fn glGetTexEnviv(target: u32, pname: u32, params: *mut i32) { windows_targets::link!("opengl32.dll" "system" fn glGetTexEnviv(target : u32, pname : u32, params : *mut i32)); - unsafe { glGetTexEnviv(target, pname, core::mem::transmute(params)) } + unsafe { glGetTexEnviv(target, pname, params as _) } } #[inline] pub unsafe fn glGetTexGendv(coord: u32, pname: u32, params: *mut f64) { windows_targets::link!("opengl32.dll" "system" fn glGetTexGendv(coord : u32, pname : u32, params : *mut f64)); - unsafe { glGetTexGendv(coord, pname, core::mem::transmute(params)) } + unsafe { glGetTexGendv(coord, pname, params as _) } } #[inline] pub unsafe fn glGetTexGenfv(coord: u32, pname: u32, params: *mut f32) { windows_targets::link!("opengl32.dll" "system" fn glGetTexGenfv(coord : u32, pname : u32, params : *mut f32)); - unsafe { glGetTexGenfv(coord, pname, core::mem::transmute(params)) } + unsafe { glGetTexGenfv(coord, pname, params as _) } } #[inline] pub unsafe fn glGetTexGeniv(coord: u32, pname: u32, params: *mut i32) { windows_targets::link!("opengl32.dll" "system" fn glGetTexGeniv(coord : u32, pname : u32, params : *mut i32)); - unsafe { glGetTexGeniv(coord, pname, core::mem::transmute(params)) } + unsafe { glGetTexGeniv(coord, pname, params as _) } } #[inline] pub unsafe fn glGetTexImage(target: u32, level: i32, format: u32, r#type: u32, pixels: *mut core::ffi::c_void) { windows_targets::link!("opengl32.dll" "system" fn glGetTexImage(target : u32, level : i32, format : u32, r#type : u32, pixels : *mut core::ffi::c_void)); - unsafe { glGetTexImage(target, level, format, r#type, core::mem::transmute(pixels)) } + unsafe { glGetTexImage(target, level, format, r#type, pixels as _) } } #[inline] pub unsafe fn glGetTexLevelParameterfv(target: u32, level: i32, pname: u32, params: *mut f32) { windows_targets::link!("opengl32.dll" "system" fn glGetTexLevelParameterfv(target : u32, level : i32, pname : u32, params : *mut f32)); - unsafe { glGetTexLevelParameterfv(target, level, pname, core::mem::transmute(params)) } + unsafe { glGetTexLevelParameterfv(target, level, pname, params as _) } } #[inline] pub unsafe fn glGetTexLevelParameteriv(target: u32, level: i32, pname: u32, params: *mut i32) { windows_targets::link!("opengl32.dll" "system" fn glGetTexLevelParameteriv(target : u32, level : i32, pname : u32, params : *mut i32)); - unsafe { glGetTexLevelParameteriv(target, level, pname, core::mem::transmute(params)) } + unsafe { glGetTexLevelParameteriv(target, level, pname, params as _) } } #[inline] pub unsafe fn glGetTexParameterfv(target: u32, pname: u32, params: *mut f32) { windows_targets::link!("opengl32.dll" "system" fn glGetTexParameterfv(target : u32, pname : u32, params : *mut f32)); - unsafe { glGetTexParameterfv(target, pname, core::mem::transmute(params)) } + unsafe { glGetTexParameterfv(target, pname, params as _) } } #[inline] pub unsafe fn glGetTexParameteriv(target: u32, pname: u32, params: *mut i32) { windows_targets::link!("opengl32.dll" "system" fn glGetTexParameteriv(target : u32, pname : u32, params : *mut i32)); - unsafe { glGetTexParameteriv(target, pname, core::mem::transmute(params)) } + unsafe { glGetTexParameteriv(target, pname, params as _) } } #[inline] pub unsafe fn glHint(target: u32, mode: u32) { @@ -1222,7 +1222,7 @@ pub unsafe fn glReadBuffer(mode: u32) { #[inline] pub unsafe fn glReadPixels(x: i32, y: i32, width: i32, height: i32, format: u32, r#type: u32, pixels: *mut core::ffi::c_void) { windows_targets::link!("opengl32.dll" "system" fn glReadPixels(x : i32, y : i32, width : i32, height : i32, format : u32, r#type : u32, pixels : *mut core::ffi::c_void)); - unsafe { glReadPixels(x, y, width, height, format, r#type, core::mem::transmute(pixels)) } + unsafe { glReadPixels(x, y, width, height, format, r#type, pixels as _) } } #[inline] pub unsafe fn glRectd(x1: f64, y1: f64, x2: f64, y2: f64) { @@ -1297,7 +1297,7 @@ pub unsafe fn glScissor(x: i32, y: i32, width: i32, height: i32) { #[inline] pub unsafe fn glSelectBuffer(size: i32, buffer: *mut u32) { windows_targets::link!("opengl32.dll" "system" fn glSelectBuffer(size : i32, buffer : *mut u32)); - unsafe { glSelectBuffer(size, core::mem::transmute(buffer)) } + unsafe { glSelectBuffer(size, buffer as _) } } #[inline] pub unsafe fn glShadeModel(mode: u32) { @@ -1717,22 +1717,22 @@ pub unsafe fn glViewport(x: i32, y: i32, width: i32, height: i32) { #[inline] pub unsafe fn gluBeginCurve(nobj: *mut GLUnurbs) { windows_targets::link!("glu32.dll" "system" fn gluBeginCurve(nobj : *mut GLUnurbs)); - unsafe { gluBeginCurve(core::mem::transmute(nobj)) } + unsafe { gluBeginCurve(nobj as _) } } #[inline] pub unsafe fn gluBeginPolygon(tess: *mut GLUtesselator) { windows_targets::link!("glu32.dll" "system" fn gluBeginPolygon(tess : *mut GLUtesselator)); - unsafe { gluBeginPolygon(core::mem::transmute(tess)) } + unsafe { gluBeginPolygon(tess as _) } } #[inline] pub unsafe fn gluBeginSurface(nobj: *mut GLUnurbs) { windows_targets::link!("glu32.dll" "system" fn gluBeginSurface(nobj : *mut GLUnurbs)); - unsafe { gluBeginSurface(core::mem::transmute(nobj)) } + unsafe { gluBeginSurface(nobj as _) } } #[inline] pub unsafe fn gluBeginTrim(nobj: *mut GLUnurbs) { windows_targets::link!("glu32.dll" "system" fn gluBeginTrim(nobj : *mut GLUnurbs)); - unsafe { gluBeginTrim(core::mem::transmute(nobj)) } + unsafe { gluBeginTrim(nobj as _) } } #[inline] pub unsafe fn gluBuild1DMipmaps(target: u32, components: i32, width: i32, format: u32, r#type: u32, data: *const core::ffi::c_void) -> i32 { @@ -1747,47 +1747,47 @@ pub unsafe fn gluBuild2DMipmaps(target: u32, components: i32, width: i32, height #[inline] pub unsafe fn gluCylinder(qobj: *mut GLUquadric, baseradius: f64, topradius: f64, height: f64, slices: i32, stacks: i32) { windows_targets::link!("glu32.dll" "system" fn gluCylinder(qobj : *mut GLUquadric, baseradius : f64, topradius : f64, height : f64, slices : i32, stacks : i32)); - unsafe { gluCylinder(core::mem::transmute(qobj), baseradius, topradius, height, slices, stacks) } + unsafe { gluCylinder(qobj as _, baseradius, topradius, height, slices, stacks) } } #[inline] pub unsafe fn gluDeleteNurbsRenderer(nobj: *mut GLUnurbs) { windows_targets::link!("glu32.dll" "system" fn gluDeleteNurbsRenderer(nobj : *mut GLUnurbs)); - unsafe { gluDeleteNurbsRenderer(core::mem::transmute(nobj)) } + unsafe { gluDeleteNurbsRenderer(nobj as _) } } #[inline] pub unsafe fn gluDeleteQuadric(state: *mut GLUquadric) { windows_targets::link!("glu32.dll" "system" fn gluDeleteQuadric(state : *mut GLUquadric)); - unsafe { gluDeleteQuadric(core::mem::transmute(state)) } + unsafe { gluDeleteQuadric(state as _) } } #[inline] pub unsafe fn gluDeleteTess(tess: *mut GLUtesselator) { windows_targets::link!("glu32.dll" "system" fn gluDeleteTess(tess : *mut GLUtesselator)); - unsafe { gluDeleteTess(core::mem::transmute(tess)) } + unsafe { gluDeleteTess(tess as _) } } #[inline] pub unsafe fn gluDisk(qobj: *mut GLUquadric, innerradius: f64, outerradius: f64, slices: i32, loops: i32) { windows_targets::link!("glu32.dll" "system" fn gluDisk(qobj : *mut GLUquadric, innerradius : f64, outerradius : f64, slices : i32, loops : i32)); - unsafe { gluDisk(core::mem::transmute(qobj), innerradius, outerradius, slices, loops) } + unsafe { gluDisk(qobj as _, innerradius, outerradius, slices, loops) } } #[inline] pub unsafe fn gluEndCurve(nobj: *mut GLUnurbs) { windows_targets::link!("glu32.dll" "system" fn gluEndCurve(nobj : *mut GLUnurbs)); - unsafe { gluEndCurve(core::mem::transmute(nobj)) } + unsafe { gluEndCurve(nobj as _) } } #[inline] pub unsafe fn gluEndPolygon(tess: *mut GLUtesselator) { windows_targets::link!("glu32.dll" "system" fn gluEndPolygon(tess : *mut GLUtesselator)); - unsafe { gluEndPolygon(core::mem::transmute(tess)) } + unsafe { gluEndPolygon(tess as _) } } #[inline] pub unsafe fn gluEndSurface(nobj: *mut GLUnurbs) { windows_targets::link!("glu32.dll" "system" fn gluEndSurface(nobj : *mut GLUnurbs)); - unsafe { gluEndSurface(core::mem::transmute(nobj)) } + unsafe { gluEndSurface(nobj as _) } } #[inline] pub unsafe fn gluEndTrim(nobj: *mut GLUnurbs) { windows_targets::link!("glu32.dll" "system" fn gluEndTrim(nobj : *mut GLUnurbs)); - unsafe { gluEndTrim(core::mem::transmute(nobj)) } + unsafe { gluEndTrim(nobj as _) } } #[inline] pub unsafe fn gluErrorString(errcode: u32) -> *mut u8 { @@ -1802,7 +1802,7 @@ pub unsafe fn gluErrorUnicodeStringEXT(errcode: u32) -> windows_core::PCWSTR { #[inline] pub unsafe fn gluGetNurbsProperty(nobj: *mut GLUnurbs, property: u32, value: *mut f32) { windows_targets::link!("glu32.dll" "system" fn gluGetNurbsProperty(nobj : *mut GLUnurbs, property : u32, value : *mut f32)); - unsafe { gluGetNurbsProperty(core::mem::transmute(nobj), property, core::mem::transmute(value)) } + unsafe { gluGetNurbsProperty(nobj as _, property, value as _) } } #[inline] pub unsafe fn gluGetString(name: u32) -> *mut u8 { @@ -1812,12 +1812,12 @@ pub unsafe fn gluGetString(name: u32) -> *mut u8 { #[inline] pub unsafe fn gluGetTessProperty(tess: *mut GLUtesselator, which: u32, value: *mut f64) { windows_targets::link!("glu32.dll" "system" fn gluGetTessProperty(tess : *mut GLUtesselator, which : u32, value : *mut f64)); - unsafe { gluGetTessProperty(core::mem::transmute(tess), which, core::mem::transmute(value)) } + unsafe { gluGetTessProperty(tess as _, which, value as _) } } #[inline] pub unsafe fn gluLoadSamplingMatrices(nobj: *mut GLUnurbs, modelmatrix: *const f32, projmatrix: *const f32, viewport: *const i32) { windows_targets::link!("glu32.dll" "system" fn gluLoadSamplingMatrices(nobj : *mut GLUnurbs, modelmatrix : *const f32, projmatrix : *const f32, viewport : *const i32)); - unsafe { gluLoadSamplingMatrices(core::mem::transmute(nobj), modelmatrix, projmatrix, viewport) } + unsafe { gluLoadSamplingMatrices(nobj as _, modelmatrix, projmatrix, viewport) } } #[inline] pub unsafe fn gluLookAt(eyex: f64, eyey: f64, eyez: f64, centerx: f64, centery: f64, centerz: f64, upx: f64, upy: f64, upz: f64) { @@ -1842,27 +1842,27 @@ pub unsafe fn gluNewTess() -> *mut GLUtesselator { #[inline] pub unsafe fn gluNextContour(tess: *mut GLUtesselator, r#type: u32) { windows_targets::link!("glu32.dll" "system" fn gluNextContour(tess : *mut GLUtesselator, r#type : u32)); - unsafe { gluNextContour(core::mem::transmute(tess), r#type) } + unsafe { gluNextContour(tess as _, r#type) } } #[inline] pub unsafe fn gluNurbsCallback(nobj: *mut GLUnurbs, which: u32, r#fn: isize) { windows_targets::link!("glu32.dll" "system" fn gluNurbsCallback(nobj : *mut GLUnurbs, which : u32, r#fn : isize)); - unsafe { gluNurbsCallback(core::mem::transmute(nobj), which, r#fn) } + unsafe { gluNurbsCallback(nobj as _, which, r#fn) } } #[inline] pub unsafe fn gluNurbsCurve(nobj: *mut GLUnurbs, nknots: i32, knot: *mut f32, stride: i32, ctlarray: *mut f32, order: i32, r#type: u32) { windows_targets::link!("glu32.dll" "system" fn gluNurbsCurve(nobj : *mut GLUnurbs, nknots : i32, knot : *mut f32, stride : i32, ctlarray : *mut f32, order : i32, r#type : u32)); - unsafe { gluNurbsCurve(core::mem::transmute(nobj), nknots, core::mem::transmute(knot), stride, core::mem::transmute(ctlarray), order, r#type) } + unsafe { gluNurbsCurve(nobj as _, nknots, knot as _, stride, ctlarray as _, order, r#type) } } #[inline] pub unsafe fn gluNurbsProperty(nobj: *mut GLUnurbs, property: u32, value: f32) { windows_targets::link!("glu32.dll" "system" fn gluNurbsProperty(nobj : *mut GLUnurbs, property : u32, value : f32)); - unsafe { gluNurbsProperty(core::mem::transmute(nobj), property, value) } + unsafe { gluNurbsProperty(nobj as _, property, value) } } #[inline] pub unsafe fn gluNurbsSurface(nobj: *mut GLUnurbs, sknot_count: i32, sknot: *mut f32, tknot_count: i32, tknot: *mut f32, s_stride: i32, t_stride: i32, ctlarray: *mut f32, sorder: i32, torder: i32, r#type: u32) { windows_targets::link!("glu32.dll" "system" fn gluNurbsSurface(nobj : *mut GLUnurbs, sknot_count : i32, sknot : *mut f32, tknot_count : i32, tknot : *mut f32, s_stride : i32, t_stride : i32, ctlarray : *mut f32, sorder : i32, torder : i32, r#type : u32)); - unsafe { gluNurbsSurface(core::mem::transmute(nobj), sknot_count, core::mem::transmute(sknot), tknot_count, core::mem::transmute(tknot), s_stride, t_stride, core::mem::transmute(ctlarray), sorder, torder, r#type) } + unsafe { gluNurbsSurface(nobj as _, sknot_count, sknot as _, tknot_count, tknot as _, s_stride, t_stride, ctlarray as _, sorder, torder, r#type) } } #[inline] pub unsafe fn gluOrtho2D(left: f64, right: f64, bottom: f64, top: f64) { @@ -1872,7 +1872,7 @@ pub unsafe fn gluOrtho2D(left: f64, right: f64, bottom: f64, top: f64) { #[inline] pub unsafe fn gluPartialDisk(qobj: *mut GLUquadric, innerradius: f64, outerradius: f64, slices: i32, loops: i32, startangle: f64, sweepangle: f64) { windows_targets::link!("glu32.dll" "system" fn gluPartialDisk(qobj : *mut GLUquadric, innerradius : f64, outerradius : f64, slices : i32, loops : i32, startangle : f64, sweepangle : f64)); - unsafe { gluPartialDisk(core::mem::transmute(qobj), innerradius, outerradius, slices, loops, startangle, sweepangle) } + unsafe { gluPartialDisk(qobj as _, innerradius, outerradius, slices, loops, startangle, sweepangle) } } #[inline] pub unsafe fn gluPerspective(fovy: f64, aspect: f64, znear: f64, zfar: f64) { @@ -1882,97 +1882,97 @@ pub unsafe fn gluPerspective(fovy: f64, aspect: f64, znear: f64, zfar: f64) { #[inline] pub unsafe fn gluPickMatrix(x: f64, y: f64, width: f64, height: f64, viewport: *mut i32) { windows_targets::link!("glu32.dll" "system" fn gluPickMatrix(x : f64, y : f64, width : f64, height : f64, viewport : *mut i32)); - unsafe { gluPickMatrix(x, y, width, height, core::mem::transmute(viewport)) } + unsafe { gluPickMatrix(x, y, width, height, viewport as _) } } #[inline] pub unsafe fn gluProject(objx: f64, objy: f64, objz: f64, modelmatrix: *const f64, projmatrix: *const f64, viewport: *const i32, winx: *mut f64, winy: *mut f64, winz: *mut f64) -> i32 { windows_targets::link!("glu32.dll" "system" fn gluProject(objx : f64, objy : f64, objz : f64, modelmatrix : *const f64, projmatrix : *const f64, viewport : *const i32, winx : *mut f64, winy : *mut f64, winz : *mut f64) -> i32); - unsafe { gluProject(objx, objy, objz, modelmatrix, projmatrix, viewport, core::mem::transmute(winx), core::mem::transmute(winy), core::mem::transmute(winz)) } + unsafe { gluProject(objx, objy, objz, modelmatrix, projmatrix, viewport, winx as _, winy as _, winz as _) } } #[inline] pub unsafe fn gluPwlCurve(nobj: *mut GLUnurbs, count: i32, array: *mut f32, stride: i32, r#type: u32) { windows_targets::link!("glu32.dll" "system" fn gluPwlCurve(nobj : *mut GLUnurbs, count : i32, array : *mut f32, stride : i32, r#type : u32)); - unsafe { gluPwlCurve(core::mem::transmute(nobj), count, core::mem::transmute(array), stride, r#type) } + unsafe { gluPwlCurve(nobj as _, count, array as _, stride, r#type) } } #[inline] pub unsafe fn gluQuadricCallback(qobj: *mut GLUquadric, which: u32, r#fn: isize) { windows_targets::link!("glu32.dll" "system" fn gluQuadricCallback(qobj : *mut GLUquadric, which : u32, r#fn : isize)); - unsafe { gluQuadricCallback(core::mem::transmute(qobj), which, r#fn) } + unsafe { gluQuadricCallback(qobj as _, which, r#fn) } } #[inline] pub unsafe fn gluQuadricDrawStyle(quadobject: *mut GLUquadric, drawstyle: u32) { windows_targets::link!("glu32.dll" "system" fn gluQuadricDrawStyle(quadobject : *mut GLUquadric, drawstyle : u32)); - unsafe { gluQuadricDrawStyle(core::mem::transmute(quadobject), drawstyle) } + unsafe { gluQuadricDrawStyle(quadobject as _, drawstyle) } } #[inline] pub unsafe fn gluQuadricNormals(quadobject: *mut GLUquadric, normals: u32) { windows_targets::link!("glu32.dll" "system" fn gluQuadricNormals(quadobject : *mut GLUquadric, normals : u32)); - unsafe { gluQuadricNormals(core::mem::transmute(quadobject), normals) } + unsafe { gluQuadricNormals(quadobject as _, normals) } } #[inline] pub unsafe fn gluQuadricOrientation(quadobject: *mut GLUquadric, orientation: u32) { windows_targets::link!("glu32.dll" "system" fn gluQuadricOrientation(quadobject : *mut GLUquadric, orientation : u32)); - unsafe { gluQuadricOrientation(core::mem::transmute(quadobject), orientation) } + unsafe { gluQuadricOrientation(quadobject as _, orientation) } } #[inline] pub unsafe fn gluQuadricTexture(quadobject: *mut GLUquadric, texturecoords: u8) { windows_targets::link!("glu32.dll" "system" fn gluQuadricTexture(quadobject : *mut GLUquadric, texturecoords : u8)); - unsafe { gluQuadricTexture(core::mem::transmute(quadobject), texturecoords) } + unsafe { gluQuadricTexture(quadobject as _, texturecoords) } } #[inline] pub unsafe fn gluScaleImage(format: u32, widthin: i32, heightin: i32, typein: u32, datain: *const core::ffi::c_void, widthout: i32, heightout: i32, typeout: u32, dataout: *mut core::ffi::c_void) -> i32 { windows_targets::link!("glu32.dll" "system" fn gluScaleImage(format : u32, widthin : i32, heightin : i32, typein : u32, datain : *const core::ffi::c_void, widthout : i32, heightout : i32, typeout : u32, dataout : *mut core::ffi::c_void) -> i32); - unsafe { gluScaleImage(format, widthin, heightin, typein, datain, widthout, heightout, typeout, core::mem::transmute(dataout)) } + unsafe { gluScaleImage(format, widthin, heightin, typein, datain, widthout, heightout, typeout, dataout as _) } } #[inline] pub unsafe fn gluSphere(qobj: *mut GLUquadric, radius: f64, slices: i32, stacks: i32) { windows_targets::link!("glu32.dll" "system" fn gluSphere(qobj : *mut GLUquadric, radius : f64, slices : i32, stacks : i32)); - unsafe { gluSphere(core::mem::transmute(qobj), radius, slices, stacks) } + unsafe { gluSphere(qobj as _, radius, slices, stacks) } } #[inline] pub unsafe fn gluTessBeginContour(tess: *mut GLUtesselator) { windows_targets::link!("glu32.dll" "system" fn gluTessBeginContour(tess : *mut GLUtesselator)); - unsafe { gluTessBeginContour(core::mem::transmute(tess)) } + unsafe { gluTessBeginContour(tess as _) } } #[inline] pub unsafe fn gluTessBeginPolygon(tess: *mut GLUtesselator, polygon_data: *mut core::ffi::c_void) { windows_targets::link!("glu32.dll" "system" fn gluTessBeginPolygon(tess : *mut GLUtesselator, polygon_data : *mut core::ffi::c_void)); - unsafe { gluTessBeginPolygon(core::mem::transmute(tess), core::mem::transmute(polygon_data)) } + unsafe { gluTessBeginPolygon(tess as _, polygon_data as _) } } #[inline] pub unsafe fn gluTessCallback(tess: *mut GLUtesselator, which: u32, r#fn: isize) { windows_targets::link!("glu32.dll" "system" fn gluTessCallback(tess : *mut GLUtesselator, which : u32, r#fn : isize)); - unsafe { gluTessCallback(core::mem::transmute(tess), which, r#fn) } + unsafe { gluTessCallback(tess as _, which, r#fn) } } #[inline] pub unsafe fn gluTessEndContour(tess: *mut GLUtesselator) { windows_targets::link!("glu32.dll" "system" fn gluTessEndContour(tess : *mut GLUtesselator)); - unsafe { gluTessEndContour(core::mem::transmute(tess)) } + unsafe { gluTessEndContour(tess as _) } } #[inline] pub unsafe fn gluTessEndPolygon(tess: *mut GLUtesselator) { windows_targets::link!("glu32.dll" "system" fn gluTessEndPolygon(tess : *mut GLUtesselator)); - unsafe { gluTessEndPolygon(core::mem::transmute(tess)) } + unsafe { gluTessEndPolygon(tess as _) } } #[inline] pub unsafe fn gluTessNormal(tess: *mut GLUtesselator, x: f64, y: f64, z: f64) { windows_targets::link!("glu32.dll" "system" fn gluTessNormal(tess : *mut GLUtesselator, x : f64, y : f64, z : f64)); - unsafe { gluTessNormal(core::mem::transmute(tess), x, y, z) } + unsafe { gluTessNormal(tess as _, x, y, z) } } #[inline] pub unsafe fn gluTessProperty(tess: *mut GLUtesselator, which: u32, value: f64) { windows_targets::link!("glu32.dll" "system" fn gluTessProperty(tess : *mut GLUtesselator, which : u32, value : f64)); - unsafe { gluTessProperty(core::mem::transmute(tess), which, value) } + unsafe { gluTessProperty(tess as _, which, value) } } #[inline] pub unsafe fn gluTessVertex(tess: *mut GLUtesselator, coords: *mut f64, data: *mut core::ffi::c_void) { windows_targets::link!("glu32.dll" "system" fn gluTessVertex(tess : *mut GLUtesselator, coords : *mut f64, data : *mut core::ffi::c_void)); - unsafe { gluTessVertex(core::mem::transmute(tess), core::mem::transmute(coords), core::mem::transmute(data)) } + unsafe { gluTessVertex(tess as _, coords as _, data as _) } } #[inline] pub unsafe fn gluUnProject(winx: f64, winy: f64, winz: f64, modelmatrix: *const f64, projmatrix: *const f64, viewport: *const i32, objx: *mut f64, objy: *mut f64, objz: *mut f64) -> i32 { windows_targets::link!("glu32.dll" "system" fn gluUnProject(winx : f64, winy : f64, winz : f64, modelmatrix : *const f64, projmatrix : *const f64, viewport : *const i32, objx : *mut f64, objy : *mut f64, objz : *mut f64) -> i32); - unsafe { gluUnProject(winx, winy, winz, modelmatrix, projmatrix, viewport, core::mem::transmute(objx), core::mem::transmute(objy), core::mem::transmute(objz)) } + unsafe { gluUnProject(winx, winy, winz, modelmatrix, projmatrix, viewport, objx as _, objy as _, objz as _) } } #[inline] pub unsafe fn wglCopyContext(param0: HGLRC, param1: HGLRC, param2: u32) -> windows_core::Result<()> { @@ -2002,7 +2002,7 @@ pub unsafe fn wglDeleteContext(param0: HGLRC) -> windows_core::Result<()> { #[inline] 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); - unsafe { wglDescribeLayerPlane(param0, param1, param2, param3, core::mem::transmute(param4)) } + unsafe { wglDescribeLayerPlane(param0, param1, param2, param3, param4 as _) } } #[inline] pub unsafe fn wglGetCurrentContext() -> HGLRC { @@ -2019,7 +2019,7 @@ pub unsafe fn wglGetCurrentDC() -> super::Gdi::HDC { #[inline] 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); - unsafe { wglGetLayerPaletteEntries(param0, param1, param2, param3, core::mem::transmute(param4)) } + unsafe { wglGetLayerPaletteEntries(param0, param1, param2, param3, param4 as _) } } #[inline] pub unsafe fn wglGetProcAddress(param0: P0) -> super::super::Foundation::PROC @@ -2074,13 +2074,13 @@ pub unsafe fn wglUseFontBitmapsW(param0: super::Gdi::HDC, param1: u32, param2: u #[inline] 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); - unsafe { wglUseFontOutlinesA(param0, param1, param2, param3, param4, param5, param6, core::mem::transmute(param7)).ok() } + unsafe { wglUseFontOutlinesA(param0, param1, param2, param3, param4, param5, param6, param7 as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { wglUseFontOutlinesW(param0, param1, param2, param3, param4, param5, param6, core::mem::transmute(param7)).ok() } + unsafe { wglUseFontOutlinesW(param0, param1, param2, param3, param4, param5, param6, param7 as _).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 363550100e..d8e9f318ca 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 @@ -19,7 +19,7 @@ where P1: windows_core::Param, { windows_targets::link!("prntvpt.dll" "system" fn PTConvertPrintTicketToDevMode(hprovider : HPTPROVIDER, pprintticket : * mut core::ffi::c_void, basedevmodetype : EDefaultDevmodeType, scope : EPrintTicketScope, pcbdevmode : *mut u32, ppdevmode : *mut *mut super::super::Gdi:: DEVMODEA, pbstrerrormessage : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PTConvertPrintTicketToDevMode(hprovider, pprintticket.param().abi(), basedevmodetype, scope, core::mem::transmute(pcbdevmode), core::mem::transmute(ppdevmode), core::mem::transmute(pbstrerrormessage.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { PTConvertPrintTicketToDevMode(hprovider, pprintticket.param().abi(), basedevmodetype, scope, pcbdevmode as _, ppdevmode as _, pbstrerrormessage.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -29,7 +29,7 @@ where P2: windows_core::Param, { windows_targets::link!("prntvpt.dll" "system" fn PTGetPrintCapabilities(hprovider : HPTPROVIDER, pprintticket : * mut core::ffi::c_void, pcapabilities : * mut core::ffi::c_void, pbstrerrormessage : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PTGetPrintCapabilities(hprovider, pprintticket.param().abi(), pcapabilities.param().abi(), core::mem::transmute(pbstrerrormessage.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { PTGetPrintCapabilities(hprovider, pprintticket.param().abi(), pcapabilities.param().abi(), pbstrerrormessage.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -39,7 +39,7 @@ where P2: windows_core::Param, { windows_targets::link!("prntvpt.dll" "system" fn PTGetPrintDeviceCapabilities(hprovider : HPTPROVIDER, pprintticket : * mut core::ffi::c_void, pdevicecapabilities : * mut core::ffi::c_void, pbstrerrormessage : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PTGetPrintDeviceCapabilities(hprovider, pprintticket.param().abi(), pdevicecapabilities.param().abi(), core::mem::transmute(pbstrerrormessage.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { PTGetPrintDeviceCapabilities(hprovider, pprintticket.param().abi(), pdevicecapabilities.param().abi(), pbstrerrormessage.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -50,7 +50,7 @@ where P3: windows_core::Param, { windows_targets::link!("prntvpt.dll" "system" fn PTGetPrintDeviceResources(hprovider : HPTPROVIDER, pszlocalename : windows_core::PCWSTR, pprintticket : * mut core::ffi::c_void, pdeviceresources : * mut core::ffi::c_void, pbstrerrormessage : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PTGetPrintDeviceResources(hprovider, pszlocalename.param().abi(), pprintticket.param().abi(), pdeviceresources.param().abi(), core::mem::transmute(pbstrerrormessage.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { PTGetPrintDeviceResources(hprovider, pszlocalename.param().abi(), pprintticket.param().abi(), pdeviceresources.param().abi(), pbstrerrormessage.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -61,7 +61,7 @@ where 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); - unsafe { PTMergeAndValidatePrintTicket(hprovider, pbaseticket.param().abi(), pdeltaticket.param().abi(), scope, presultticket.param().abi(), core::mem::transmute(pbstrerrormessage.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { PTMergeAndValidatePrintTicket(hprovider, pbaseticket.param().abi(), pdeltaticket.param().abi(), scope, presultticket.param().abi(), pbstrerrormessage.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn PTOpenProvider(pszprintername: P0, dwversion: u32) -> windows_core::Result @@ -80,7 +80,7 @@ where P0: windows_core::Param, { windows_targets::link!("prntvpt.dll" "system" fn PTOpenProviderEx(pszprintername : windows_core::PCWSTR, dwmaxversion : u32, dwprefversion : u32, phprovider : *mut HPTPROVIDER, pusedversion : *mut u32) -> windows_core::HRESULT); - unsafe { PTOpenProviderEx(pszprintername.param().abi(), dwmaxversion, dwprefversion, core::mem::transmute(phprovider), core::mem::transmute(pusedversion)).ok() } + unsafe { PTOpenProviderEx(pszprintername.param().abi(), dwmaxversion, dwprefversion, phprovider as _, pusedversion as _).ok() } } #[inline] pub unsafe fn PTQuerySchemaVersionSupport(pszprintername: P0) -> 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 ce41431119..74bdb00dda 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Printing/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Printing/mod.rs @@ -18,12 +18,12 @@ pub unsafe fn AddFormW(hprinter: PRINTER_HANDLE, level: u32, pform: *const u8) - #[inline] pub unsafe fn AddJobA(hprinter: PRINTER_HANDLE, level: u32, pdata: Option<&mut [u8]>, pcbneeded: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("winspool.drv" "system" fn AddJobA(hprinter : PRINTER_HANDLE, level : u32, pdata : *mut u8, cbbuf : u32, pcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { AddJobA(core::mem::transmute(hprinter), level, 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)) } + unsafe { AddJobA(core::mem::transmute(hprinter), level, core::mem::transmute(pdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _) } } #[inline] pub unsafe fn AddJobW(hprinter: PRINTER_HANDLE, level: u32, pdata: Option<&mut [u8]>, pcbneeded: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("winspool.drv" "system" fn AddJobW(hprinter : PRINTER_HANDLE, level : u32, pdata : *mut u8, cbbuf : u32, pcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { AddJobW(core::mem::transmute(hprinter), level, 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)) } + unsafe { AddJobW(core::mem::transmute(hprinter), level, core::mem::transmute(pdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _) } } #[inline] pub unsafe fn AddMonitorA(pname: P0, level: u32, pmonitors: Option<*const u8>) -> windows_core::Result<()> @@ -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); - unsafe { AddMonitorA(pname.param().abi(), level, core::mem::transmute(pmonitors.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { AddMonitorA(pname.param().abi(), level, pmonitors.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn AddMonitorW(pname: P0, level: u32, pmonitors: Option<*const u8>) -> windows_core::Result<()> @@ -39,7 +39,7 @@ where P0: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn AddMonitorW(pname : windows_core::PCWSTR, level : u32, pmonitors : *const u8) -> super::super::Foundation:: BOOL); - unsafe { AddMonitorW(pname.param().abi(), level, core::mem::transmute(pmonitors.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { AddMonitorW(pname.param().abi(), level, pmonitors.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn AddPortA(pname: P0, hwnd: super::super::Foundation::HWND, pmonitorname: P2) -> windows_core::Result<()> @@ -120,7 +120,7 @@ where 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); - unsafe { AddPrinterConnection2A(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pszname.param().abi(), dwlevel, pconnectioninfo) } + unsafe { AddPrinterConnection2A(hwnd.unwrap_or(core::mem::zeroed()) as _, pszname.param().abi(), dwlevel, pconnectioninfo) } } #[inline] pub unsafe fn AddPrinterConnection2W(hwnd: Option, pszname: P1, dwlevel: u32, pconnectioninfo: *const core::ffi::c_void) -> super::super::Foundation::BOOL @@ -128,7 +128,7 @@ where 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); - unsafe { AddPrinterConnection2W(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pszname.param().abi(), dwlevel, pconnectioninfo) } + unsafe { AddPrinterConnection2W(hwnd.unwrap_or(core::mem::zeroed()) as _, pszname.param().abi(), dwlevel, pconnectioninfo) } } #[inline] pub unsafe fn AddPrinterConnectionA(pname: P0) -> super::super::Foundation::BOOL @@ -194,7 +194,7 @@ where 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); - unsafe { AdvancedDocumentPropertiesA(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()))) } + unsafe { AdvancedDocumentPropertiesA(hwnd, core::mem::transmute(hprinter), pdevicename.param().abi(), pdevmodeoutput.unwrap_or(core::mem::zeroed()) as _, pdevmodeinput.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -203,12 +203,12 @@ where 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); - unsafe { AdvancedDocumentPropertiesW(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()))) } + unsafe { AdvancedDocumentPropertiesW(hwnd, core::mem::transmute(hprinter), pdevicename.param().abi(), pdevmodeoutput.unwrap_or(core::mem::zeroed()) as _, pdevmodeinput.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { AppendPrinterNotifyInfoData(pinfodest, core::mem::transmute(pdatasrc.unwrap_or(core::mem::zeroed())), fdwflags) } + unsafe { AppendPrinterNotifyInfoData(pinfodest, pdatasrc.unwrap_or(core::mem::zeroed()) as _, fdwflags) } } #[inline] pub unsafe fn CallRouterFindFirstPrinterChangeNotification(hprinterrpc: super::super::Foundation::HANDLE, fdwfilterflags: u32, fdwoptions: u32, hnotify: super::super::Foundation::HANDLE, pprinternotifyoptions: *const PRINTER_NOTIFY_OPTIONS) -> u32 { @@ -233,12 +233,12 @@ pub unsafe fn CommitSpoolData(hprinter: PRINTER_HANDLE, hspoolfile: super::super #[inline] 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); - unsafe { CommonPropertySheetUIA(hwndowner, pfnpropsheetui, lparam, core::mem::transmute(presult.unwrap_or(core::mem::zeroed()))) } + unsafe { CommonPropertySheetUIA(hwndowner, pfnpropsheetui, lparam, presult.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { CommonPropertySheetUIW(hwndowner, pfnpropsheetui, lparam, core::mem::transmute(presult.unwrap_or(core::mem::zeroed()))) } + unsafe { CommonPropertySheetUIW(hwndowner, pfnpropsheetui, lparam, presult.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ConfigurePortA(pname: P0, hwnd: super::super::Foundation::HWND, pportname: P2) -> super::super::Foundation::BOOL @@ -303,7 +303,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); - unsafe { CreatePrinterIC(core::mem::transmute(hprinter), core::mem::transmute(pdevmode.unwrap_or(core::mem::zeroed()))) } + unsafe { CreatePrinterIC(core::mem::transmute(hprinter), pdevmode.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn DeleteFormA(hprinter: PRINTER_HANDLE, pformname: P1) -> super::super::Foundation::BOOL @@ -547,13 +547,13 @@ where #[inline] pub unsafe fn DevQueryPrint(hprinter: PRINTER_HANDLE, pdevmode: *const super::Gdi::DEVMODEA, presid: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("winspool.drv" "system" fn DevQueryPrint(hprinter : PRINTER_HANDLE, pdevmode : *const super::Gdi:: DEVMODEA, presid : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { DevQueryPrint(core::mem::transmute(hprinter), pdevmode, core::mem::transmute(presid)) } + unsafe { DevQueryPrint(core::mem::transmute(hprinter), pdevmode, presid as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn DevQueryPrintEx(pdqpinfo: *mut DEVQUERYPRINT_INFO) -> super::super::Foundation::BOOL { windows_targets::link!("winspool.drv" "system" fn DevQueryPrintEx(pdqpinfo : *mut DEVQUERYPRINT_INFO) -> super::super::Foundation:: BOOL); - unsafe { DevQueryPrintEx(core::mem::transmute(pdqpinfo)) } + unsafe { DevQueryPrintEx(pdqpinfo as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -562,7 +562,7 @@ where 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); - unsafe { 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())), fmode) } + unsafe { DocumentPropertiesA(hwnd.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(hprinter), pdevicename.param().abi(), pdevmodeoutput.unwrap_or(core::mem::zeroed()) as _, pdevmodeinput.unwrap_or(core::mem::zeroed()) as _, fmode) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -571,7 +571,7 @@ where 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); - unsafe { 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())), fmode) } + unsafe { DocumentPropertiesW(hwnd.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(hprinter), pdevicename.param().abi(), pdevmodeoutput.unwrap_or(core::mem::zeroed()) as _, pdevmodeinput.unwrap_or(core::mem::zeroed()) as _, fmode) } } #[inline] pub unsafe fn EndDocPrinter(hprinter: PRINTER_HANDLE) -> super::super::Foundation::BOOL { @@ -586,27 +586,27 @@ pub unsafe fn EndPagePrinter(hprinter: PRINTER_HANDLE) -> super::super::Foundati #[inline] pub unsafe fn EnumFormsA(hprinter: PRINTER_HANDLE, level: u32, pform: Option<&mut [u8]>, pcbneeded: *mut u32, pcreturned: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("winspool.drv" "system" fn EnumFormsA(hprinter : PRINTER_HANDLE, level : u32, pform : *mut u8, cbbuf : u32, pcbneeded : *mut u32, pcreturned : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { EnumFormsA(core::mem::transmute(hprinter), level, core::mem::transmute(pform.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pform.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded), core::mem::transmute(pcreturned)) } + unsafe { EnumFormsA(core::mem::transmute(hprinter), level, core::mem::transmute(pform.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pform.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _, pcreturned as _) } } #[inline] pub unsafe fn EnumFormsW(hprinter: PRINTER_HANDLE, level: u32, pform: Option<&mut [u8]>, pcbneeded: *mut u32, pcreturned: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("winspool.drv" "system" fn EnumFormsW(hprinter : PRINTER_HANDLE, level : u32, pform : *mut u8, cbbuf : u32, pcbneeded : *mut u32, pcreturned : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { EnumFormsW(core::mem::transmute(hprinter), level, core::mem::transmute(pform.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pform.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded), core::mem::transmute(pcreturned)) } + unsafe { EnumFormsW(core::mem::transmute(hprinter), level, core::mem::transmute(pform.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pform.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _, pcreturned as _) } } #[inline] pub unsafe fn EnumJobNamedProperties(hprinter: PRINTER_HANDLE, jobid: u32, pcproperties: *mut u32, ppproperties: *mut *mut PrintNamedProperty) -> u32 { windows_targets::link!("winspool.drv" "system" fn EnumJobNamedProperties(hprinter : PRINTER_HANDLE, jobid : u32, pcproperties : *mut u32, ppproperties : *mut *mut PrintNamedProperty) -> u32); - unsafe { EnumJobNamedProperties(core::mem::transmute(hprinter), jobid, core::mem::transmute(pcproperties), core::mem::transmute(ppproperties)) } + unsafe { EnumJobNamedProperties(core::mem::transmute(hprinter), jobid, pcproperties as _, ppproperties as _) } } #[inline] pub unsafe fn EnumJobsA(hprinter: PRINTER_HANDLE, firstjob: u32, nojobs: u32, level: u32, pjob: Option<&mut [u8]>, pcbneeded: *mut u32, pcreturned: *mut u32) -> windows_core::Result<()> { windows_targets::link!("winspool.drv" "system" fn EnumJobsA(hprinter : PRINTER_HANDLE, firstjob : u32, nojobs : u32, level : u32, pjob : *mut u8, cbbuf : u32, pcbneeded : *mut u32, pcreturned : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { EnumJobsA(core::mem::transmute(hprinter), firstjob, nojobs, level, core::mem::transmute(pjob.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pjob.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded), core::mem::transmute(pcreturned)).ok() } + unsafe { EnumJobsA(core::mem::transmute(hprinter), firstjob, nojobs, level, core::mem::transmute(pjob.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pjob.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _, pcreturned as _).ok() } } #[inline] pub unsafe fn EnumJobsW(hprinter: PRINTER_HANDLE, firstjob: u32, nojobs: u32, level: u32, pjob: Option<&mut [u8]>, pcbneeded: *mut u32, pcreturned: *mut u32) -> windows_core::Result<()> { windows_targets::link!("winspool.drv" "system" fn EnumJobsW(hprinter : PRINTER_HANDLE, firstjob : u32, nojobs : u32, level : u32, pjob : *mut u8, cbbuf : u32, pcbneeded : *mut u32, pcreturned : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { EnumJobsW(core::mem::transmute(hprinter), firstjob, nojobs, level, core::mem::transmute(pjob.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pjob.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded), core::mem::transmute(pcreturned)).ok() } + unsafe { EnumJobsW(core::mem::transmute(hprinter), firstjob, nojobs, level, core::mem::transmute(pjob.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pjob.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _, pcreturned as _).ok() } } #[inline] pub unsafe fn EnumMonitorsA(pname: P0, level: u32, pmonitor: Option<&mut [u8]>, pcbneeded: *mut u32, pcreturned: *mut u32) -> super::super::Foundation::BOOL @@ -614,7 +614,7 @@ where P0: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn EnumMonitorsA(pname : windows_core::PCSTR, level : u32, pmonitor : *mut u8, cbbuf : u32, pcbneeded : *mut u32, pcreturned : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { EnumMonitorsA(pname.param().abi(), level, core::mem::transmute(pmonitor.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pmonitor.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded), core::mem::transmute(pcreturned)) } + unsafe { EnumMonitorsA(pname.param().abi(), level, core::mem::transmute(pmonitor.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pmonitor.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _, pcreturned as _) } } #[inline] pub unsafe fn EnumMonitorsW(pname: P0, level: u32, pmonitor: Option<&mut [u8]>, pcbneeded: *mut u32, pcreturned: *mut u32) -> super::super::Foundation::BOOL @@ -622,7 +622,7 @@ where P0: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn EnumMonitorsW(pname : windows_core::PCWSTR, level : u32, pmonitor : *mut u8, cbbuf : u32, pcbneeded : *mut u32, pcreturned : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { EnumMonitorsW(pname.param().abi(), level, core::mem::transmute(pmonitor.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pmonitor.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded), core::mem::transmute(pcreturned)) } + unsafe { EnumMonitorsW(pname.param().abi(), level, core::mem::transmute(pmonitor.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pmonitor.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _, pcreturned as _) } } #[inline] pub unsafe fn EnumPortsA(pname: P0, level: u32, pport: Option<&mut [u8]>, pcbneeded: *mut u32, pcreturned: *mut u32) -> super::super::Foundation::BOOL @@ -630,7 +630,7 @@ where P0: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn EnumPortsA(pname : windows_core::PCSTR, level : u32, pport : *mut u8, cbbuf : u32, pcbneeded : *mut u32, pcreturned : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { EnumPortsA(pname.param().abi(), level, core::mem::transmute(pport.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pport.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded), core::mem::transmute(pcreturned)) } + unsafe { EnumPortsA(pname.param().abi(), level, core::mem::transmute(pport.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pport.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _, pcreturned as _) } } #[inline] pub unsafe fn EnumPortsW(pname: P0, level: u32, pport: Option<&mut [u8]>, pcbneeded: *mut u32, pcreturned: *mut u32) -> super::super::Foundation::BOOL @@ -638,7 +638,7 @@ where P0: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn EnumPortsW(pname : windows_core::PCWSTR, level : u32, pport : *mut u8, cbbuf : u32, pcbneeded : *mut u32, pcreturned : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { EnumPortsW(pname.param().abi(), level, core::mem::transmute(pport.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pport.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded), core::mem::transmute(pcreturned)) } + unsafe { EnumPortsW(pname.param().abi(), level, core::mem::transmute(pport.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pport.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _, pcreturned as _) } } #[inline] pub unsafe fn EnumPrintProcessorDatatypesA(pname: P0, pprintprocessorname: P1, level: u32, pdatatypes: Option<&mut [u8]>, pcbneeded: *mut u32, pcreturned: *mut u32) -> super::super::Foundation::BOOL @@ -647,7 +647,7 @@ where P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn EnumPrintProcessorDatatypesA(pname : windows_core::PCSTR, pprintprocessorname : windows_core::PCSTR, level : u32, pdatatypes : *mut u8, cbbuf : u32, pcbneeded : *mut u32, pcreturned : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { EnumPrintProcessorDatatypesA(pname.param().abi(), pprintprocessorname.param().abi(), level, core::mem::transmute(pdatatypes.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdatatypes.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded), core::mem::transmute(pcreturned)) } + unsafe { EnumPrintProcessorDatatypesA(pname.param().abi(), pprintprocessorname.param().abi(), level, core::mem::transmute(pdatatypes.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdatatypes.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _, pcreturned as _) } } #[inline] pub unsafe fn EnumPrintProcessorDatatypesW(pname: P0, pprintprocessorname: P1, level: u32, pdatatypes: Option<&mut [u8]>, pcbneeded: *mut u32, pcreturned: *mut u32) -> super::super::Foundation::BOOL @@ -656,7 +656,7 @@ where P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn EnumPrintProcessorDatatypesW(pname : windows_core::PCWSTR, pprintprocessorname : windows_core::PCWSTR, level : u32, pdatatypes : *mut u8, cbbuf : u32, pcbneeded : *mut u32, pcreturned : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { EnumPrintProcessorDatatypesW(pname.param().abi(), pprintprocessorname.param().abi(), level, core::mem::transmute(pdatatypes.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdatatypes.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded), core::mem::transmute(pcreturned)) } + unsafe { EnumPrintProcessorDatatypesW(pname.param().abi(), pprintprocessorname.param().abi(), level, core::mem::transmute(pdatatypes.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdatatypes.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _, pcreturned as _) } } #[inline] pub unsafe fn EnumPrintProcessorsA(pname: P0, penvironment: P1, level: u32, pprintprocessorinfo: Option<&mut [u8]>, pcbneeded: *mut u32, pcreturned: *mut u32) -> super::super::Foundation::BOOL @@ -665,7 +665,7 @@ where P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn EnumPrintProcessorsA(pname : windows_core::PCSTR, penvironment : windows_core::PCSTR, level : u32, pprintprocessorinfo : *mut u8, cbbuf : u32, pcbneeded : *mut u32, pcreturned : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { EnumPrintProcessorsA(pname.param().abi(), penvironment.param().abi(), level, core::mem::transmute(pprintprocessorinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pprintprocessorinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded), core::mem::transmute(pcreturned)) } + unsafe { EnumPrintProcessorsA(pname.param().abi(), penvironment.param().abi(), level, core::mem::transmute(pprintprocessorinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pprintprocessorinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _, pcreturned as _) } } #[inline] pub unsafe fn EnumPrintProcessorsW(pname: P0, penvironment: P1, level: u32, pprintprocessorinfo: Option<&mut [u8]>, pcbneeded: *mut u32, pcreturned: *mut u32) -> super::super::Foundation::BOOL @@ -674,12 +674,12 @@ where P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn EnumPrintProcessorsW(pname : windows_core::PCWSTR, penvironment : windows_core::PCWSTR, level : u32, pprintprocessorinfo : *mut u8, cbbuf : u32, pcbneeded : *mut u32, pcreturned : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { EnumPrintProcessorsW(pname.param().abi(), penvironment.param().abi(), level, core::mem::transmute(pprintprocessorinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pprintprocessorinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded), core::mem::transmute(pcreturned)) } + unsafe { EnumPrintProcessorsW(pname.param().abi(), penvironment.param().abi(), level, core::mem::transmute(pprintprocessorinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pprintprocessorinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _, pcreturned as _) } } #[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); - unsafe { EnumPrinterDataA(core::mem::transmute(hprinter), 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()))) } + unsafe { EnumPrinterDataA(core::mem::transmute(hprinter), dwindex, core::mem::transmute(pvaluename.as_ptr()), pvaluename.len().try_into().unwrap(), pcbvaluename as _, ptype.unwrap_or(core::mem::zeroed()) as _, 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()), pcbdata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn EnumPrinterDataExA(hprinter: PRINTER_HANDLE, pkeyname: P1, penumvalues: Option<&mut [u8]>, pcbenumvalues: *mut u32, pnenumvalues: *mut u32) -> u32 @@ -687,7 +687,7 @@ where P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn EnumPrinterDataExA(hprinter : PRINTER_HANDLE, pkeyname : windows_core::PCSTR, penumvalues : *mut u8, cbenumvalues : u32, pcbenumvalues : *mut u32, pnenumvalues : *mut u32) -> u32); - unsafe { EnumPrinterDataExA(core::mem::transmute(hprinter), pkeyname.param().abi(), core::mem::transmute(penumvalues.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), penumvalues.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbenumvalues), core::mem::transmute(pnenumvalues)) } + unsafe { EnumPrinterDataExA(core::mem::transmute(hprinter), pkeyname.param().abi(), core::mem::transmute(penumvalues.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), penumvalues.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbenumvalues as _, pnenumvalues as _) } } #[inline] pub unsafe fn EnumPrinterDataExW(hprinter: PRINTER_HANDLE, pkeyname: P1, penumvalues: Option<&mut [u8]>, pcbenumvalues: *mut u32, pnenumvalues: *mut u32) -> u32 @@ -695,12 +695,12 @@ where P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn EnumPrinterDataExW(hprinter : PRINTER_HANDLE, pkeyname : windows_core::PCWSTR, penumvalues : *mut u8, cbenumvalues : u32, pcbenumvalues : *mut u32, pnenumvalues : *mut u32) -> u32); - unsafe { EnumPrinterDataExW(core::mem::transmute(hprinter), pkeyname.param().abi(), core::mem::transmute(penumvalues.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), penumvalues.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbenumvalues), core::mem::transmute(pnenumvalues)) } + unsafe { EnumPrinterDataExW(core::mem::transmute(hprinter), pkeyname.param().abi(), core::mem::transmute(penumvalues.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), penumvalues.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbenumvalues as _, pnenumvalues as _) } } #[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); - unsafe { EnumPrinterDataW(core::mem::transmute(hprinter), dwindex, core::mem::transmute(pvaluename), 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()))) } + unsafe { EnumPrinterDataW(core::mem::transmute(hprinter), dwindex, core::mem::transmute(pvaluename), cbvaluename, pcbvaluename as _, ptype.unwrap_or(core::mem::zeroed()) as _, 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()), pcbdata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn EnumPrinterDriversA(pname: P0, penvironment: P1, level: u32, pdriverinfo: Option<&mut [u8]>, pcbneeded: *mut u32, pcreturned: *mut u32) -> windows_core::Result<()> @@ -709,7 +709,7 @@ where P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn EnumPrinterDriversA(pname : windows_core::PCSTR, penvironment : windows_core::PCSTR, level : u32, pdriverinfo : *mut u8, cbbuf : u32, pcbneeded : *mut u32, pcreturned : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { EnumPrinterDriversA(pname.param().abi(), penvironment.param().abi(), level, core::mem::transmute(pdriverinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded), core::mem::transmute(pcreturned)).ok() } + unsafe { EnumPrinterDriversA(pname.param().abi(), penvironment.param().abi(), level, core::mem::transmute(pdriverinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _, pcreturned as _).ok() } } #[inline] pub unsafe fn EnumPrinterDriversW(pname: P0, penvironment: P1, level: u32, pdriverinfo: Option<&mut [u8]>, pcbneeded: *mut u32, pcreturned: *mut u32) -> windows_core::Result<()> @@ -718,7 +718,7 @@ where P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn EnumPrinterDriversW(pname : windows_core::PCWSTR, penvironment : windows_core::PCWSTR, level : u32, pdriverinfo : *mut u8, cbbuf : u32, pcbneeded : *mut u32, pcreturned : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { EnumPrinterDriversW(pname.param().abi(), penvironment.param().abi(), level, core::mem::transmute(pdriverinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded), core::mem::transmute(pcreturned)).ok() } + unsafe { EnumPrinterDriversW(pname.param().abi(), penvironment.param().abi(), level, core::mem::transmute(pdriverinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _, pcreturned as _).ok() } } #[inline] pub unsafe fn EnumPrinterKeyA(hprinter: PRINTER_HANDLE, pkeyname: P1, psubkey: Option<&mut [u8]>, pcbsubkey: *mut u32) -> u32 @@ -726,7 +726,7 @@ where P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn EnumPrinterKeyA(hprinter : PRINTER_HANDLE, pkeyname : windows_core::PCSTR, psubkey : windows_core::PSTR, cbsubkey : u32, pcbsubkey : *mut u32) -> u32); - unsafe { 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)) } + unsafe { 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()), pcbsubkey as _) } } #[inline] pub unsafe fn EnumPrinterKeyW(hprinter: PRINTER_HANDLE, pkeyname: P1, psubkey: Option, cbsubkey: u32, pcbsubkey: *mut u32) -> u32 @@ -734,7 +734,7 @@ 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); - unsafe { EnumPrinterKeyW(core::mem::transmute(hprinter), pkeyname.param().abi(), core::mem::transmute(psubkey.unwrap_or(core::mem::zeroed())), cbsubkey, core::mem::transmute(pcbsubkey)) } + unsafe { EnumPrinterKeyW(core::mem::transmute(hprinter), pkeyname.param().abi(), psubkey.unwrap_or(core::mem::zeroed()) as _, cbsubkey, pcbsubkey as _) } } #[inline] pub unsafe fn EnumPrintersA(flags: u32, name: P1, level: u32, pprinterenum: Option<&mut [u8]>, pcbneeded: *mut u32, pcreturned: *mut u32) -> windows_core::Result<()> @@ -742,7 +742,7 @@ where P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn EnumPrintersA(flags : u32, name : windows_core::PCSTR, level : u32, pprinterenum : *mut u8, cbbuf : u32, pcbneeded : *mut u32, pcreturned : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { EnumPrintersA(flags, name.param().abi(), level, core::mem::transmute(pprinterenum.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pprinterenum.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded), core::mem::transmute(pcreturned)).ok() } + unsafe { EnumPrintersA(flags, name.param().abi(), level, core::mem::transmute(pprinterenum.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pprinterenum.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _, pcreturned as _).ok() } } #[inline] pub unsafe fn EnumPrintersW(flags: u32, name: P1, level: u32, pprinterenum: Option<&mut [u8]>, pcbneeded: *mut u32, pcreturned: *mut u32) -> windows_core::Result<()> @@ -750,7 +750,7 @@ where P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn EnumPrintersW(flags : u32, name : windows_core::PCWSTR, level : u32, pprinterenum : *mut u8, cbbuf : u32, pcbneeded : *mut u32, pcreturned : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { EnumPrintersW(flags, name.param().abi(), level, core::mem::transmute(pprinterenum.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pprinterenum.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded), core::mem::transmute(pcreturned)).ok() } + unsafe { EnumPrintersW(flags, name.param().abi(), level, core::mem::transmute(pprinterenum.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pprinterenum.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _, pcreturned as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -761,7 +761,7 @@ where 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); - unsafe { 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(), fmode) } + unsafe { ExtDeviceMode(hwnd.unwrap_or(core::mem::zeroed()) as _, hinst.unwrap_or(core::mem::zeroed()) as _, pdevmodeoutput.unwrap_or(core::mem::zeroed()) as _, pdevicename.param().abi(), pport.param().abi(), pdevmodeinput.unwrap_or(core::mem::zeroed()) as _, pprofile.param().abi(), fmode) } } #[inline] pub unsafe fn FindClosePrinterChangeNotification(hchange: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { @@ -771,17 +771,17 @@ pub unsafe fn FindClosePrinterChangeNotification(hchange: super::super::Foundati #[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); - unsafe { FindFirstPrinterChangeNotification(core::mem::transmute(hprinter), fdwfilter, fdwoptions, core::mem::transmute(pprinternotifyoptions.unwrap_or(core::mem::zeroed()))) } + unsafe { FindFirstPrinterChangeNotification(core::mem::transmute(hprinter), fdwfilter, fdwoptions, pprinternotifyoptions.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { FindNextPrinterChangeNotification(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()))) } + unsafe { FindNextPrinterChangeNotification(hchange, pdwchange.unwrap_or(core::mem::zeroed()) as _, pvreserved.unwrap_or(core::mem::zeroed()) as _, ppprinternotifyinfo.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { FlushPrinter(core::mem::transmute(hprinter), core::mem::transmute(pbuf.unwrap_or(core::mem::zeroed())), cbbuf, core::mem::transmute(pcwritten), csleep) } + unsafe { FlushPrinter(core::mem::transmute(hprinter), pbuf.unwrap_or(core::mem::zeroed()) as _, cbbuf, pcwritten as _, csleep) } } #[inline] pub unsafe fn FreePrintNamedPropertyArray(ppproperties: Option<&mut [*mut PrintNamedProperty]>) { @@ -791,7 +791,7 @@ pub unsafe fn FreePrintNamedPropertyArray(ppproperties: Option<&mut [*mut PrintN #[inline] pub unsafe fn FreePrintPropertyValue(pvalue: *mut PrintPropertyValue) { windows_targets::link!("winspool.drv" "system" fn FreePrintPropertyValue(pvalue : *mut PrintPropertyValue)); - unsafe { FreePrintPropertyValue(core::mem::transmute(pvalue)) } + unsafe { FreePrintPropertyValue(pvalue as _) } } #[inline] pub unsafe fn FreePrinterNotifyInfo(pprinternotifyinfo: *const PRINTER_NOTIFY_INFO) -> super::super::Foundation::BOOL { @@ -823,7 +823,7 @@ pub unsafe fn GdiGetDC(spoolfilehandle: super::super::Foundation::HANDLE) -> sup #[inline] 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); - unsafe { GdiGetDevmodeForPage(spoolfilehandle, dwpagenumber, core::mem::transmute(pcurrdm), core::mem::transmute(plastdm)) } + unsafe { GdiGetDevmodeForPage(spoolfilehandle, dwpagenumber, pcurrdm as _, plastdm as _) } } #[inline] pub unsafe fn GdiGetPageCount(spoolfilehandle: super::super::Foundation::HANDLE) -> u32 { @@ -833,7 +833,7 @@ pub unsafe fn GdiGetPageCount(spoolfilehandle: super::super::Foundation::HANDLE) #[inline] 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); - unsafe { GdiGetPageHandle(spoolfilehandle, page, core::mem::transmute(pdwpagetype)) } + unsafe { GdiGetPageHandle(spoolfilehandle, page, pdwpagetype as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -843,24 +843,24 @@ where P2: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn GdiGetSpoolFileHandle(pwszprintername : windows_core::PCWSTR, pdevmode : *mut super::Gdi:: DEVMODEW, pwszdocname : windows_core::PCWSTR) -> super::super::Foundation:: HANDLE); - unsafe { GdiGetSpoolFileHandle(pwszprintername.param().abi(), core::mem::transmute(pdevmode), pwszdocname.param().abi()) } + unsafe { GdiGetSpoolFileHandle(pwszprintername.param().abi(), pdevmode as _, pwszdocname.param().abi()) } } #[inline] 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); - unsafe { GdiPlayPageEMF(spoolfilehandle, hemf, core::mem::transmute(prectdocument), core::mem::transmute(prectborder), core::mem::transmute(prectclip)) } + unsafe { GdiPlayPageEMF(spoolfilehandle, hemf, prectdocument as _, prectborder as _, prectclip as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { GdiResetDCEMF(spoolfilehandle, core::mem::transmute(pcurrdm)) } + unsafe { GdiResetDCEMF(spoolfilehandle, pcurrdm as _) } } #[cfg(feature = "Win32_Storage_Xps")] #[inline] 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); - unsafe { GdiStartDocEMF(spoolfilehandle, core::mem::transmute(pdocinfo)) } + unsafe { GdiStartDocEMF(spoolfilehandle, pdocinfo as _) } } #[inline] pub unsafe fn GdiStartPageEMF(spoolfilehandle: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { @@ -874,7 +874,7 @@ where P1: windows_core::Param, { windows_targets::link!("mscms.dll" "system" fn GenerateCopyFilePaths(pszprintername : windows_core::PCWSTR, pszdirectory : windows_core::PCWSTR, psplclientinfo : *const u8, dwlevel : u32, pszsourcedir : windows_core::PWSTR, pcchsourcedirsize : *mut u32, psztargetdir : windows_core::PWSTR, pcchtargetdirsize : *mut u32, dwflags : u32) -> u32); - unsafe { GenerateCopyFilePaths(pszprintername.param().abi(), pszdirectory.param().abi(), psplclientinfo, dwlevel, core::mem::transmute(pszsourcedir), core::mem::transmute(pcchsourcedirsize), core::mem::transmute(psztargetdir), core::mem::transmute(pcchtargetdirsize), dwflags) } + unsafe { GenerateCopyFilePaths(pszprintername.param().abi(), pszdirectory.param().abi(), psplclientinfo, dwlevel, core::mem::transmute(pszsourcedir), pcchsourcedirsize as _, core::mem::transmute(psztargetdir), pcchtargetdirsize as _, dwflags) } } #[inline] pub unsafe fn GetCPSUIUserData(hdlg: super::super::Foundation::HWND) -> usize { @@ -904,12 +904,12 @@ where #[inline] 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); - unsafe { GetDefaultPrinterA(core::mem::transmute(pszbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffer)) } + unsafe { GetDefaultPrinterA(pszbuffer.unwrap_or(core::mem::zeroed()) as _, pcchbuffer as _) } } #[inline] 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); - unsafe { GetDefaultPrinterW(core::mem::transmute(pszbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffer)) } + unsafe { GetDefaultPrinterW(pszbuffer.unwrap_or(core::mem::zeroed()) as _, pcchbuffer as _) } } #[inline] pub unsafe fn GetFormA(hprinter: PRINTER_HANDLE, pformname: P1, level: u32, pform: Option<&mut [u8]>, pcbneeded: *mut u32) -> super::super::Foundation::BOOL @@ -917,7 +917,7 @@ where P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn GetFormA(hprinter : PRINTER_HANDLE, pformname : windows_core::PCSTR, level : u32, pform : *mut u8, cbbuf : u32, pcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetFormA(core::mem::transmute(hprinter), pformname.param().abi(), level, core::mem::transmute(pform.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pform.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded)) } + unsafe { GetFormA(core::mem::transmute(hprinter), pformname.param().abi(), level, core::mem::transmute(pform.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pform.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _) } } #[inline] pub unsafe fn GetFormW(hprinter: PRINTER_HANDLE, pformname: P1, level: u32, pform: Option<&mut [u8]>, pcbneeded: *mut u32) -> super::super::Foundation::BOOL @@ -925,12 +925,12 @@ where P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn GetFormW(hprinter : PRINTER_HANDLE, pformname : windows_core::PCWSTR, level : u32, pform : *mut u8, cbbuf : u32, pcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetFormW(core::mem::transmute(hprinter), pformname.param().abi(), level, core::mem::transmute(pform.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pform.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded)) } + unsafe { GetFormW(core::mem::transmute(hprinter), pformname.param().abi(), level, core::mem::transmute(pform.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pform.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _) } } #[inline] pub unsafe fn GetJobA(hprinter: PRINTER_HANDLE, jobid: u32, level: u32, pjob: Option<&mut [u8]>, pcbneeded: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("winspool.drv" "system" fn GetJobA(hprinter : PRINTER_HANDLE, jobid : u32, level : u32, pjob : *mut u8, cbbuf : u32, pcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetJobA(core::mem::transmute(hprinter), jobid, level, core::mem::transmute(pjob.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pjob.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded)) } + unsafe { GetJobA(core::mem::transmute(hprinter), jobid, level, core::mem::transmute(pjob.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pjob.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -939,7 +939,7 @@ where P0: windows_core::Param, { windows_targets::link!("spoolss.dll" "system" fn GetJobAttributes(pprintername : windows_core::PCWSTR, pdevmode : *const super::Gdi:: DEVMODEW, pattributeinfo : *mut ATTRIBUTE_INFO_3) -> super::super::Foundation:: BOOL); - unsafe { GetJobAttributes(pprintername.param().abi(), pdevmode, core::mem::transmute(pattributeinfo)) } + unsafe { GetJobAttributes(pprintername.param().abi(), pdevmode, pattributeinfo as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -956,17 +956,17 @@ where P2: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn GetJobNamedPropertyValue(hprinter : PRINTER_HANDLE, jobid : u32, pszname : windows_core::PCWSTR, pvalue : *mut PrintPropertyValue) -> u32); - unsafe { GetJobNamedPropertyValue(core::mem::transmute(hprinter), jobid, pszname.param().abi(), core::mem::transmute(pvalue)) } + unsafe { GetJobNamedPropertyValue(core::mem::transmute(hprinter), jobid, pszname.param().abi(), pvalue as _) } } #[inline] pub unsafe fn GetJobW(hprinter: PRINTER_HANDLE, jobid: u32, level: u32, pjob: Option<&mut [u8]>, pcbneeded: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("winspool.drv" "system" fn GetJobW(hprinter : PRINTER_HANDLE, jobid : u32, level : u32, pjob : *mut u8, cbbuf : u32, pcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetJobW(core::mem::transmute(hprinter), jobid, level, core::mem::transmute(pjob.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pjob.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded)) } + unsafe { GetJobW(core::mem::transmute(hprinter), jobid, level, core::mem::transmute(pjob.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pjob.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _) } } #[inline] pub unsafe fn GetPrintExecutionData(pdata: *mut PRINT_EXECUTION_DATA) -> super::super::Foundation::BOOL { windows_targets::link!("winspool.drv" "system" fn GetPrintExecutionData(pdata : *mut PRINT_EXECUTION_DATA) -> super::super::Foundation:: BOOL); - unsafe { GetPrintExecutionData(core::mem::transmute(pdata)) } + unsafe { GetPrintExecutionData(pdata as _) } } #[inline] 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<()> @@ -974,7 +974,7 @@ where 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); - unsafe { GetPrintOutputInfo(hwnd, pszprinter.param().abi(), core::mem::transmute(phfile), core::mem::transmute(ppszoutputfile)).ok() } + unsafe { GetPrintOutputInfo(hwnd, pszprinter.param().abi(), phfile as _, ppszoutputfile as _).ok() } } #[inline] pub unsafe fn GetPrintProcessorDirectoryA(pname: P0, penvironment: P1, level: u32, pprintprocessorinfo: Option<&mut [u8]>, pcbneeded: *mut u32) -> super::super::Foundation::BOOL @@ -983,7 +983,7 @@ where P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn GetPrintProcessorDirectoryA(pname : windows_core::PCSTR, penvironment : windows_core::PCSTR, level : u32, pprintprocessorinfo : *mut u8, cbbuf : u32, pcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetPrintProcessorDirectoryA(pname.param().abi(), penvironment.param().abi(), level, core::mem::transmute(pprintprocessorinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pprintprocessorinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded)) } + unsafe { GetPrintProcessorDirectoryA(pname.param().abi(), penvironment.param().abi(), level, core::mem::transmute(pprintprocessorinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pprintprocessorinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _) } } #[inline] pub unsafe fn GetPrintProcessorDirectoryW(pname: P0, penvironment: P1, level: u32, pprintprocessorinfo: Option<&mut [u8]>, pcbneeded: *mut u32) -> super::super::Foundation::BOOL @@ -992,12 +992,12 @@ where P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn GetPrintProcessorDirectoryW(pname : windows_core::PCWSTR, penvironment : windows_core::PCWSTR, level : u32, pprintprocessorinfo : *mut u8, cbbuf : u32, pcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetPrintProcessorDirectoryW(pname.param().abi(), penvironment.param().abi(), level, core::mem::transmute(pprintprocessorinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pprintprocessorinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded)) } + unsafe { GetPrintProcessorDirectoryW(pname.param().abi(), penvironment.param().abi(), level, core::mem::transmute(pprintprocessorinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pprintprocessorinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _) } } #[inline] pub unsafe fn GetPrinterA(hprinter: PRINTER_HANDLE, level: u32, pprinter: Option<&mut [u8]>, pcbneeded: *mut u32) -> windows_core::Result<()> { windows_targets::link!("winspool.drv" "system" fn GetPrinterA(hprinter : PRINTER_HANDLE, level : u32, pprinter : *mut u8, cbbuf : u32, pcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetPrinterA(core::mem::transmute(hprinter), level, core::mem::transmute(pprinter.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pprinter.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded)).ok() } + unsafe { GetPrinterA(core::mem::transmute(hprinter), level, core::mem::transmute(pprinter.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pprinter.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _).ok() } } #[inline] pub unsafe fn GetPrinterDataA(hprinter: PRINTER_HANDLE, pvaluename: P1, ptype: Option<*mut u32>, pdata: Option<&mut [u8]>, pcbneeded: *mut u32) -> u32 @@ -1005,7 +1005,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); - unsafe { 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)) } + unsafe { GetPrinterDataA(core::mem::transmute(hprinter), pvaluename.param().abi(), ptype.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _) } } #[inline] pub unsafe fn GetPrinterDataExA(hprinter: PRINTER_HANDLE, pkeyname: P1, pvaluename: P2, ptype: Option<*mut u32>, pdata: Option<&mut [u8]>, pcbneeded: *mut u32) -> u32 @@ -1014,7 +1014,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); - unsafe { 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)) } + unsafe { GetPrinterDataExA(core::mem::transmute(hprinter), pkeyname.param().abi(), pvaluename.param().abi(), ptype.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _) } } #[inline] pub unsafe fn GetPrinterDataExW(hprinter: PRINTER_HANDLE, pkeyname: P1, pvaluename: P2, ptype: Option<*mut u32>, pdata: Option<&mut [u8]>, pcbneeded: *mut u32) -> u32 @@ -1023,7 +1023,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); - unsafe { 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)) } + unsafe { GetPrinterDataExW(core::mem::transmute(hprinter), pkeyname.param().abi(), pvaluename.param().abi(), ptype.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _) } } #[inline] pub unsafe fn GetPrinterDataW(hprinter: PRINTER_HANDLE, pvaluename: P1, ptype: Option<*mut u32>, pdata: Option<&mut [u8]>, pcbneeded: *mut u32) -> u32 @@ -1031,7 +1031,7 @@ 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); - unsafe { 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)) } + unsafe { GetPrinterDataW(core::mem::transmute(hprinter), pvaluename.param().abi(), ptype.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _) } } #[inline] pub unsafe fn GetPrinterDriver2A(hwnd: Option, hprinter: PRINTER_HANDLE, penvironment: P2, level: u32, pdriverinfo: Option<&mut [u8]>, pcbneeded: *mut u32) -> super::super::Foundation::BOOL @@ -1039,7 +1039,7 @@ where 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); - unsafe { GetPrinterDriver2A(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(hprinter), penvironment.param().abi(), level, core::mem::transmute(pdriverinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded)) } + unsafe { GetPrinterDriver2A(hwnd.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(hprinter), penvironment.param().abi(), level, core::mem::transmute(pdriverinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _) } } #[inline] pub unsafe fn GetPrinterDriver2W(hwnd: Option, hprinter: PRINTER_HANDLE, penvironment: P2, level: u32, pdriverinfo: Option<&mut [u8]>, pcbneeded: *mut u32) -> super::super::Foundation::BOOL @@ -1047,7 +1047,7 @@ where 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); - unsafe { GetPrinterDriver2W(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(hprinter), penvironment.param().abi(), level, core::mem::transmute(pdriverinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded)) } + unsafe { GetPrinterDriver2W(hwnd.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(hprinter), penvironment.param().abi(), level, core::mem::transmute(pdriverinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _) } } #[inline] pub unsafe fn GetPrinterDriverA(hprinter: PRINTER_HANDLE, penvironment: P1, level: u32, pdriverinfo: Option<&mut [u8]>, pcbneeded: *mut u32) -> super::super::Foundation::BOOL @@ -1055,7 +1055,7 @@ where P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn GetPrinterDriverA(hprinter : PRINTER_HANDLE, penvironment : windows_core::PCSTR, level : u32, pdriverinfo : *mut u8, cbbuf : u32, pcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetPrinterDriverA(core::mem::transmute(hprinter), penvironment.param().abi(), level, core::mem::transmute(pdriverinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded)) } + unsafe { GetPrinterDriverA(core::mem::transmute(hprinter), penvironment.param().abi(), level, core::mem::transmute(pdriverinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _) } } #[inline] pub unsafe fn GetPrinterDriverDirectoryA(pname: P0, penvironment: P1, level: u32, pdriverdirectory: Option<&mut [u8]>, pcbneeded: *mut u32) -> super::super::Foundation::BOOL @@ -1064,7 +1064,7 @@ where P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn GetPrinterDriverDirectoryA(pname : windows_core::PCSTR, penvironment : windows_core::PCSTR, level : u32, pdriverdirectory : *mut u8, cbbuf : u32, pcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetPrinterDriverDirectoryA(pname.param().abi(), penvironment.param().abi(), level, core::mem::transmute(pdriverdirectory.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdriverdirectory.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded)) } + unsafe { GetPrinterDriverDirectoryA(pname.param().abi(), penvironment.param().abi(), level, core::mem::transmute(pdriverdirectory.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdriverdirectory.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _) } } #[inline] pub unsafe fn GetPrinterDriverDirectoryW(pname: P0, penvironment: P1, level: u32, pdriverdirectory: Option<&mut [u8]>, pcbneeded: *mut u32) -> super::super::Foundation::BOOL @@ -1073,7 +1073,7 @@ where P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn GetPrinterDriverDirectoryW(pname : windows_core::PCWSTR, penvironment : windows_core::PCWSTR, level : u32, pdriverdirectory : *mut u8, cbbuf : u32, pcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetPrinterDriverDirectoryW(pname.param().abi(), penvironment.param().abi(), level, core::mem::transmute(pdriverdirectory.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdriverdirectory.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded)) } + unsafe { GetPrinterDriverDirectoryW(pname.param().abi(), penvironment.param().abi(), level, core::mem::transmute(pdriverdirectory.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdriverdirectory.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _) } } #[inline] pub unsafe fn GetPrinterDriverPackagePathA(pszserver: P0, pszenvironment: P1, pszlanguage: P2, pszpackageid: P3, pszdriverpackagecab: Option<&mut [u8]>, pcchrequiredsize: *mut u32) -> windows_core::Result<()> @@ -1084,7 +1084,7 @@ where P3: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn GetPrinterDriverPackagePathA(pszserver : windows_core::PCSTR, pszenvironment : windows_core::PCSTR, pszlanguage : windows_core::PCSTR, pszpackageid : windows_core::PCSTR, pszdriverpackagecab : windows_core::PSTR, cchdriverpackagecab : u32, pcchrequiredsize : *mut u32) -> windows_core::HRESULT); - unsafe { GetPrinterDriverPackagePathA(pszserver.param().abi(), pszenvironment.param().abi(), pszlanguage.param().abi(), pszpackageid.param().abi(), core::mem::transmute(pszdriverpackagecab.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszdriverpackagecab.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcchrequiredsize)).ok() } + unsafe { GetPrinterDriverPackagePathA(pszserver.param().abi(), pszenvironment.param().abi(), pszlanguage.param().abi(), pszpackageid.param().abi(), core::mem::transmute(pszdriverpackagecab.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszdriverpackagecab.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcchrequiredsize as _).ok() } } #[inline] pub unsafe fn GetPrinterDriverPackagePathW(pszserver: P0, pszenvironment: P1, pszlanguage: P2, pszpackageid: P3, pszdriverpackagecab: Option<&mut [u16]>, pcchrequiredsize: *mut u32) -> windows_core::Result<()> @@ -1095,7 +1095,7 @@ where P3: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn GetPrinterDriverPackagePathW(pszserver : windows_core::PCWSTR, pszenvironment : windows_core::PCWSTR, pszlanguage : windows_core::PCWSTR, pszpackageid : windows_core::PCWSTR, pszdriverpackagecab : windows_core::PWSTR, cchdriverpackagecab : u32, pcchrequiredsize : *mut u32) -> windows_core::HRESULT); - unsafe { GetPrinterDriverPackagePathW(pszserver.param().abi(), pszenvironment.param().abi(), pszlanguage.param().abi(), pszpackageid.param().abi(), core::mem::transmute(pszdriverpackagecab.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszdriverpackagecab.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcchrequiredsize)).ok() } + unsafe { GetPrinterDriverPackagePathW(pszserver.param().abi(), pszenvironment.param().abi(), pszlanguage.param().abi(), pszpackageid.param().abi(), core::mem::transmute(pszdriverpackagecab.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszdriverpackagecab.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcchrequiredsize as _).ok() } } #[inline] pub unsafe fn GetPrinterDriverW(hprinter: PRINTER_HANDLE, penvironment: P1, level: u32, pdriverinfo: Option<&mut [u8]>, pcbneeded: *mut u32) -> super::super::Foundation::BOOL @@ -1103,12 +1103,12 @@ where P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn GetPrinterDriverW(hprinter : PRINTER_HANDLE, penvironment : windows_core::PCWSTR, level : u32, pdriverinfo : *mut u8, cbbuf : u32, pcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetPrinterDriverW(core::mem::transmute(hprinter), penvironment.param().abi(), level, core::mem::transmute(pdriverinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded)) } + unsafe { GetPrinterDriverW(core::mem::transmute(hprinter), penvironment.param().abi(), level, core::mem::transmute(pdriverinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _) } } #[inline] pub unsafe fn GetPrinterW(hprinter: PRINTER_HANDLE, level: u32, pprinter: Option<&mut [u8]>, pcbneeded: *mut u32) -> windows_core::Result<()> { windows_targets::link!("winspool.drv" "system" fn GetPrinterW(hprinter : PRINTER_HANDLE, level : u32, pprinter : *mut u8, cbbuf : u32, pcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetPrinterW(core::mem::transmute(hprinter), level, core::mem::transmute(pprinter.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pprinter.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded)).ok() } + unsafe { GetPrinterW(core::mem::transmute(hprinter), level, core::mem::transmute(pprinter.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pprinter.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _).ok() } } #[inline] pub unsafe fn GetSpoolFileHandle(hprinter: PRINTER_HANDLE) -> windows_core::Result { @@ -1147,13 +1147,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); - unsafe { IsValidDevmodeA(core::mem::transmute(pdevmode.unwrap_or(core::mem::zeroed())), devmodesize) } + unsafe { IsValidDevmodeA(pdevmode.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { IsValidDevmodeW(core::mem::transmute(pdevmode.unwrap_or(core::mem::zeroed())), devmodesize) } + unsafe { IsValidDevmodeW(pdevmode.unwrap_or(core::mem::zeroed()) as _, devmodesize) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1162,7 +1162,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); - unsafe { 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() } + unsafe { OpenPrinter2A(pprintername.param().abi(), phprinter as _, pdefault.unwrap_or(core::mem::zeroed()) as _, poptions.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1171,7 +1171,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); - unsafe { 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() } + unsafe { OpenPrinter2W(pprintername.param().abi(), phprinter as _, pdefault.unwrap_or(core::mem::zeroed()) as _, poptions.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1180,7 +1180,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); - unsafe { OpenPrinterA(pprintername.param().abi(), core::mem::transmute(phprinter), core::mem::transmute(pdefault.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { OpenPrinterA(pprintername.param().abi(), phprinter as _, pdefault.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1189,12 +1189,12 @@ 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); - unsafe { OpenPrinterW(pprintername.param().abi(), core::mem::transmute(phprinter), core::mem::transmute(pdefault.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { OpenPrinterW(pprintername.param().abi(), phprinter as _, pdefault.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { PartialReplyPrinterChangeNotification(core::mem::transmute(hprinter), core::mem::transmute(pdatasrc.unwrap_or(core::mem::zeroed()))) } + unsafe { PartialReplyPrinterChangeNotification(core::mem::transmute(hprinter), pdatasrc.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn PlayGdiScriptOnPrinterIC(hprinteric: super::super::Foundation::HANDLE, pin: &[u8], pout: &mut [u8], ul: u32) -> super::super::Foundation::BOOL { @@ -1232,12 +1232,12 @@ pub unsafe fn ProvidorFindClosePrinterChangeNotification(hprinter: PRINTER_HANDL #[inline] 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); - unsafe { ProvidorFindFirstPrinterChangeNotification(core::mem::transmute(hprinter), fdwflags, fdwoptions, hnotify, core::mem::transmute(pprinternotifyoptions.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved1.unwrap_or(core::mem::zeroed()))) } + unsafe { ProvidorFindFirstPrinterChangeNotification(core::mem::transmute(hprinter), fdwflags, fdwoptions, hnotify, pprinternotifyoptions.unwrap_or(core::mem::zeroed()) as _, pvreserved1.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ReadPrinter(hprinter: PRINTER_HANDLE, pbuf: *mut core::ffi::c_void, cbbuf: u32, pnobytesread: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("winspool.drv" "system" fn ReadPrinter(hprinter : PRINTER_HANDLE, pbuf : *mut core::ffi::c_void, cbbuf : u32, pnobytesread : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { ReadPrinter(core::mem::transmute(hprinter), core::mem::transmute(pbuf), cbbuf, core::mem::transmute(pnobytesread)) } + unsafe { ReadPrinter(core::mem::transmute(hprinter), pbuf as _, cbbuf, pnobytesread as _) } } #[inline] pub unsafe fn RegisterForPrintAsyncNotifications(pszname: P0, pnotificationtype: *const windows_core::GUID, euserfilter: PrintAsyncNotifyUserFilter, econversationstyle: PrintAsyncNotifyConversationStyle, pcallback: P4) -> windows_core::Result @@ -1259,12 +1259,12 @@ pub unsafe fn RemovePrintDeviceObject(hdeviceobject: super::super::Foundation::H #[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); - unsafe { ReplyPrinterChangeNotification(core::mem::transmute(hprinter), fdwchangeflags, core::mem::transmute(pdwresult.unwrap_or(core::mem::zeroed())), core::mem::transmute(pprinternotifyinfo.unwrap_or(core::mem::zeroed()))) } + unsafe { ReplyPrinterChangeNotification(core::mem::transmute(hprinter), fdwchangeflags, pdwresult.unwrap_or(core::mem::zeroed()) as _, pprinternotifyinfo.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { ReplyPrinterChangeNotificationEx(hnotify, dwcolor, fdwflags, core::mem::transmute(pdwresult), pprinternotifyinfo) } + unsafe { ReplyPrinterChangeNotificationEx(hnotify, dwcolor, fdwflags, pdwresult as _, pprinternotifyinfo) } } #[inline] pub unsafe fn ReportJobProcessingProgress(printerhandle: super::super::Foundation::HANDLE, jobid: u32, joboperation: EPrintXPSJobOperation, jobprogress: EPrintXPSJobProgress) -> windows_core::Result<()> { @@ -1275,13 +1275,13 @@ pub unsafe fn ReportJobProcessingProgress(printerhandle: super::super::Foundatio #[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); - unsafe { ResetPrinterA(core::mem::transmute(hprinter), core::mem::transmute(pdefault.unwrap_or(core::mem::zeroed()))) } + unsafe { ResetPrinterA(core::mem::transmute(hprinter), pdefault.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { ResetPrinterW(core::mem::transmute(hprinter), core::mem::transmute(pdefault.unwrap_or(core::mem::zeroed()))) } + unsafe { ResetPrinterW(core::mem::transmute(hprinter), pdefault.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RevertToPrinterSelf() -> super::super::Foundation::HANDLE { @@ -1316,7 +1316,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); - unsafe { RouterFreePrinterNotifyInfo(core::mem::transmute(pinfo.unwrap_or(core::mem::zeroed()))) } + unsafe { RouterFreePrinterNotifyInfo(pinfo.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ScheduleJob(hprinter: PRINTER_HANDLE, jobid: u32) -> super::super::Foundation::BOOL { @@ -1363,7 +1363,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); - unsafe { SetJobA(core::mem::transmute(hprinter), jobid, level, core::mem::transmute(pjob.unwrap_or(core::mem::zeroed())), command) } + unsafe { SetJobA(core::mem::transmute(hprinter), jobid, level, pjob.unwrap_or(core::mem::zeroed()) as _, command) } } #[inline] pub unsafe fn SetJobNamedProperty(hprinter: PRINTER_HANDLE, jobid: u32, pproperty: *const PrintNamedProperty) -> u32 { @@ -1373,7 +1373,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); - unsafe { SetJobW(core::mem::transmute(hprinter), jobid, level, core::mem::transmute(pjob.unwrap_or(core::mem::zeroed())), command) } + unsafe { SetJobW(core::mem::transmute(hprinter), jobid, level, pjob.unwrap_or(core::mem::zeroed()) as _, command) } } #[inline] pub unsafe fn SetPortA(pname: P0, pportname: P1, dwlevel: u32, pportinfo: *const u8) -> windows_core::Result<()> @@ -1396,7 +1396,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); - unsafe { SetPrinterA(core::mem::transmute(hprinter), level, core::mem::transmute(pprinter.unwrap_or(core::mem::zeroed())), command).ok() } + unsafe { SetPrinterA(core::mem::transmute(hprinter), level, pprinter.unwrap_or(core::mem::zeroed()) as _, command).ok() } } #[inline] pub unsafe fn SetPrinterDataA(hprinter: PRINTER_HANDLE, pvaluename: P1, r#type: u32, pdata: &[u8]) -> u32 @@ -1435,17 +1435,17 @@ 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); - unsafe { SetPrinterW(core::mem::transmute(hprinter), level, core::mem::transmute(pprinter.unwrap_or(core::mem::zeroed())), command).ok() } + unsafe { SetPrinterW(core::mem::transmute(hprinter), level, pprinter.unwrap_or(core::mem::zeroed()) as _, command).ok() } } #[inline] pub unsafe fn SplIsSessionZero(hprinter: PRINTER_HANDLE, jobid: u32, pissessionzero: *mut super::super::Foundation::BOOL) -> u32 { windows_targets::link!("spoolss.dll" "system" fn SplIsSessionZero(hprinter : PRINTER_HANDLE, jobid : u32, pissessionzero : *mut super::super::Foundation:: BOOL) -> u32); - unsafe { SplIsSessionZero(core::mem::transmute(hprinter), jobid, core::mem::transmute(pissessionzero)) } + unsafe { SplIsSessionZero(core::mem::transmute(hprinter), jobid, pissessionzero as _) } } #[inline] pub unsafe fn SplPromptUIInUsersSession(hprinter: PRINTER_HANDLE, jobid: u32, puiparams: *const SHOWUIPARAMS, presponse: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("spoolss.dll" "system" fn SplPromptUIInUsersSession(hprinter : PRINTER_HANDLE, jobid : u32, puiparams : *const SHOWUIPARAMS, presponse : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { SplPromptUIInUsersSession(core::mem::transmute(hprinter), jobid, puiparams, core::mem::transmute(presponse)) } + unsafe { SplPromptUIInUsersSession(core::mem::transmute(hprinter), jobid, puiparams, presponse as _) } } #[inline] pub unsafe fn SpoolerCopyFileEvent(pszprintername: P0, pszkey: P1, dwcopyfileevent: u32) -> super::super::Foundation::BOOL @@ -1464,12 +1464,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); - unsafe { SpoolerFindFirstPrinterChangeNotification(core::mem::transmute(hprinter), fdwfilterflags, fdwoptions, pprinternotifyoptions, core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), pnotificationconfig, core::mem::transmute(phnotify.unwrap_or(core::mem::zeroed())), core::mem::transmute(phevent.unwrap_or(core::mem::zeroed()))) } + unsafe { SpoolerFindFirstPrinterChangeNotification(core::mem::transmute(hprinter), fdwfilterflags, fdwoptions, pprinternotifyoptions, pvreserved.unwrap_or(core::mem::zeroed()) as _, pnotificationconfig, phnotify.unwrap_or(core::mem::zeroed()) as _, phevent.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { 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()))) } + unsafe { SpoolerFindNextPrinterChangeNotification(core::mem::transmute(hprinter), pfdwchange as _, pprinternotifyoptions.unwrap_or(core::mem::zeroed()) as _, ppprinternotifyinfo.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SpoolerFreePrinterNotifyInfo(pinfo: *const PRINTER_NOTIFY_INFO) { @@ -1479,7 +1479,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); - unsafe { SpoolerRefreshPrinterChangeNotification(core::mem::transmute(hprinter), dwcolor, poptions, core::mem::transmute(ppinfo.unwrap_or(core::mem::zeroed()))) } + unsafe { SpoolerRefreshPrinterChangeNotification(core::mem::transmute(hprinter), dwcolor, poptions, ppinfo.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn StartDocPrinterA(hprinter: PRINTER_HANDLE, level: u32, pdocinfo: *const DOC_INFO_1A) -> u32 { @@ -1514,7 +1514,7 @@ where P2: 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); - unsafe { UploadPrinterDriverPackageA(pszserver.param().abi(), pszinfpath.param().abi(), pszenvironment.param().abi(), dwflags, hwnd, core::mem::transmute(pszdestinfpath), core::mem::transmute(pcchdestinfpath)).ok() } + unsafe { UploadPrinterDriverPackageA(pszserver.param().abi(), pszinfpath.param().abi(), pszenvironment.param().abi(), dwflags, hwnd, core::mem::transmute(pszdestinfpath), pcchdestinfpath as _).ok() } } #[inline] 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<()> @@ -1524,7 +1524,7 @@ where P2: 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); - unsafe { UploadPrinterDriverPackageW(pszserver.param().abi(), pszinfpath.param().abi(), pszenvironment.param().abi(), dwflags, hwnd, core::mem::transmute(pszdestinfpath), core::mem::transmute(pcchdestinfpath)).ok() } + unsafe { UploadPrinterDriverPackageW(pszserver.param().abi(), pszinfpath.param().abi(), pszenvironment.param().abi(), dwflags, hwnd, core::mem::transmute(pszdestinfpath), pcchdestinfpath as _).ok() } } #[inline] pub unsafe fn WaitForPrinterChange(hprinter: PRINTER_HANDLE, flags: u32) -> u32 { @@ -1534,7 +1534,7 @@ pub unsafe fn WaitForPrinterChange(hprinter: PRINTER_HANDLE, flags: u32) -> u32 #[inline] pub unsafe fn WritePrinter(hprinter: PRINTER_HANDLE, pbuf: *const core::ffi::c_void, cbbuf: u32, pcwritten: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("winspool.drv" "system" fn WritePrinter(hprinter : PRINTER_HANDLE, pbuf : *const core::ffi::c_void, cbbuf : u32, pcwritten : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { WritePrinter(core::mem::transmute(hprinter), pbuf, cbbuf, core::mem::transmute(pcwritten)) } + unsafe { WritePrinter(core::mem::transmute(hprinter), pbuf, cbbuf, pcwritten as _) } } #[inline] 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 @@ -1542,7 +1542,7 @@ where P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn XcvDataW(hxcv : super::super::Foundation:: HANDLE, pszdataname : windows_core::PCWSTR, pinputdata : *const u8, cbinputdata : u32, poutputdata : *mut u8, cboutputdata : u32, pcboutputneeded : *mut u32, pdwstatus : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { XcvDataW(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::mem::zeroed()))) } + unsafe { XcvDataW(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()), pcboutputneeded as _, pdwstatus.unwrap_or(core::mem::zeroed()) as _) } } #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] @@ -3464,7 +3464,7 @@ impl IBidiRequest { } } pub unsafe fn GetOutputData(&self, dwindex: u32, ppszschema: *mut windows_core::PWSTR, pdwtype: *mut u32, ppdata: *mut *mut u8, usize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOutputData)(windows_core::Interface::as_raw(self), dwindex, core::mem::transmute(ppszschema), core::mem::transmute(pdwtype), core::mem::transmute(ppdata), core::mem::transmute(usize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOutputData)(windows_core::Interface::as_raw(self), dwindex, ppszschema as _, pdwtype as _, ppdata as _, usize as _).ok() } } pub unsafe fn GetEnumCount(&self) -> windows_core::Result { unsafe { @@ -4655,10 +4655,10 @@ windows_core::imp::define_interface!(IInterFilterCommunicator, IInterFilterCommu windows_core::imp::interface_hierarchy!(IInterFilterCommunicator, windows_core::IUnknown); impl IInterFilterCommunicator { pub unsafe fn RequestReader(&self, ppireader: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RequestReader)(windows_core::Interface::as_raw(self), core::mem::transmute(ppireader)).ok() } + unsafe { (windows_core::Interface::vtable(self).RequestReader)(windows_core::Interface::as_raw(self), ppireader as _).ok() } } pub unsafe fn RequestWriter(&self, ppiwriter: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RequestWriter)(windows_core::Interface::as_raw(self), core::mem::transmute(ppiwriter)).ok() } + unsafe { (windows_core::Interface::vtable(self).RequestWriter)(windows_core::Interface::as_raw(self), ppiwriter as _).ok() } } } #[repr(C)] @@ -4901,7 +4901,7 @@ impl core::ops::Deref for IPartFont { windows_core::imp::interface_hierarchy!(IPartFont, windows_core::IUnknown, IPartBase); impl IPartFont { pub unsafe fn GetFontProperties(&self, pcontenttype: *mut windows_core::BSTR, pfontoptions: *mut EXpsFontOptions) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFontProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(pcontenttype), core::mem::transmute(pfontoptions)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFontProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(pcontenttype), pfontoptions as _).ok() } } pub unsafe fn SetFontContent(&self, pcontenttype: P0) -> windows_core::Result<()> where @@ -5430,7 +5430,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).AcquireData)(windows_core::Interface::as_raw(self), ppnotificationdata.unwrap_or(core::mem::zeroed()) as _, psize.unwrap_or(core::mem::zeroed()) as _, ppschema.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReleaseData(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ReleaseData)(windows_core::Interface::as_raw(self)).ok() } @@ -5634,7 +5634,7 @@ impl IPrintClassObjectFactory { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetPrintClassObject)(windows_core::Interface::as_raw(self), pszprintername.param().abi(), riid, core::mem::transmute(ppnewobject)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPrintClassObject)(windows_core::Interface::as_raw(self), pszprintername.param().abi(), riid, ppnewobject as _).ok() } } } #[repr(C)] @@ -5670,19 +5670,19 @@ impl IPrintCoreHelper { { unsafe { 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::mem::zeroed())), cbsize, pszfeaturerequested.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetOption)(windows_core::Interface::as_raw(self), pdevmode.unwrap_or(core::mem::zeroed()) as _, 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: bool, pfopairs: *const PRINT_FEATURE_OPTION, cpairs: u32, pcpairswritten: *mut u32, pdwresult: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(pdevmode), cbsize, bresolveconflicts.into(), pfopairs, cpairs, core::mem::transmute(pcpairswritten), core::mem::transmute(pdwresult)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetOptions)(windows_core::Interface::as_raw(self), pdevmode as _, cbsize, bresolveconflicts.into(), pfopairs, cpairs, pcpairswritten as _, pdwresult as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn EnumConstrainedOptions(&self, pdevmode: *const super::Gdi::DEVMODEA, cbsize: u32, pszfeaturekeyword: P2, pconstrainedoptionlist: *const *const *const windows_core::PCSTR, pdwnumoptions: *mut u32) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EnumConstrainedOptions)(windows_core::Interface::as_raw(self), pdevmode, cbsize, pszfeaturekeyword.param().abi(), pconstrainedoptionlist, core::mem::transmute(pdwnumoptions)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumConstrainedOptions)(windows_core::Interface::as_raw(self), pdevmode, cbsize, pszfeaturekeyword.param().abi(), pconstrainedoptionlist, pdwnumoptions as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn WhyConstrained(&self, pdevmode: Option<*const super::Gdi::DEVMODEA>, cbsize: u32, pszfeaturekeyword: P2, pszoptionkeyword: P3, ppfoconstraints: *mut *mut PRINT_FEATURE_OPTION, pdwnumoptions: *mut u32) -> windows_core::Result<()> @@ -5690,16 +5690,16 @@ impl IPrintCoreHelper { P2: windows_core::Param, P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).WhyConstrained)(windows_core::Interface::as_raw(self), core::mem::transmute(pdevmode.unwrap_or(core::mem::zeroed())), cbsize, pszfeaturekeyword.param().abi(), pszoptionkeyword.param().abi(), core::mem::transmute(ppfoconstraints), core::mem::transmute(pdwnumoptions)).ok() } + unsafe { (windows_core::Interface::vtable(self).WhyConstrained)(windows_core::Interface::as_raw(self), pdevmode.unwrap_or(core::mem::zeroed()) as _, cbsize, pszfeaturekeyword.param().abi(), pszoptionkeyword.param().abi(), ppfoconstraints as _, pdwnumoptions as _).ok() } } pub unsafe fn EnumFeatures(&self, pfeaturelist: *mut *mut *mut windows_core::PCSTR, pdwnumfeatures: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumFeatures)(windows_core::Interface::as_raw(self), core::mem::transmute(pfeaturelist), core::mem::transmute(pdwnumfeatures)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumFeatures)(windows_core::Interface::as_raw(self), pfeaturelist as _, pdwnumfeatures as _).ok() } } pub unsafe fn EnumOptions(&self, pszfeaturekeyword: P0, poptionlist: *mut *mut *mut windows_core::PCSTR, pdwnumoptions: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EnumOptions)(windows_core::Interface::as_raw(self), pszfeaturekeyword.param().abi(), core::mem::transmute(poptionlist), core::mem::transmute(pdwnumoptions)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumOptions)(windows_core::Interface::as_raw(self), pszfeaturekeyword.param().abi(), poptionlist as _, pdwnumoptions as _).ok() } } pub unsafe fn GetFontSubstitution(&self, psztruetypefontname: P0, ppszdevfontname: *const windows_core::PCWSTR) -> windows_core::Result<()> where @@ -5718,7 +5718,7 @@ impl IPrintCoreHelper { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateInstanceOfMSXMLObject)(windows_core::Interface::as_raw(self), rclsid, punkouter.param().abi(), dwclscontext, riid, core::mem::transmute(ppv)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateInstanceOfMSXMLObject)(windows_core::Interface::as_raw(self), rclsid, punkouter.param().abi(), dwclscontext, riid, ppv as _).ok() } } } #[repr(C)] @@ -5853,14 +5853,14 @@ impl IPrintCoreHelperPS { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetGlobalAttribute)(windows_core::Interface::as_raw(self), pszattribute.param().abi(), core::mem::transmute(pdwdatatype), core::mem::transmute(ppbdata), core::mem::transmute(pcbsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGlobalAttribute)(windows_core::Interface::as_raw(self), pszattribute.param().abi(), pdwdatatype as _, ppbdata as _, pcbsize as _).ok() } } pub unsafe fn GetFeatureAttribute(&self, pszfeaturekeyword: P0, pszattribute: P1, pdwdatatype: *mut u32, ppbdata: *mut *mut u8, pcbsize: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetFeatureAttribute)(windows_core::Interface::as_raw(self), pszfeaturekeyword.param().abi(), pszattribute.param().abi(), core::mem::transmute(pdwdatatype), core::mem::transmute(ppbdata), core::mem::transmute(pcbsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFeatureAttribute)(windows_core::Interface::as_raw(self), pszfeaturekeyword.param().abi(), pszattribute.param().abi(), pdwdatatype as _, ppbdata as _, pcbsize as _).ok() } } pub unsafe fn GetOptionAttribute(&self, pszfeaturekeyword: P0, pszoptionkeyword: P1, pszattribute: P2, pdwdatatype: *mut u32, ppbdata: *mut *mut u8, pcbsize: *mut u32) -> windows_core::Result<()> where @@ -5868,7 +5868,7 @@ impl IPrintCoreHelperPS { P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetOptionAttribute)(windows_core::Interface::as_raw(self), pszfeaturekeyword.param().abi(), pszoptionkeyword.param().abi(), pszattribute.param().abi(), core::mem::transmute(pdwdatatype), core::mem::transmute(ppbdata), core::mem::transmute(pcbsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOptionAttribute)(windows_core::Interface::as_raw(self), pszfeaturekeyword.param().abi(), pszoptionkeyword.param().abi(), pszattribute.param().abi(), pdwdatatype as _, ppbdata as _, pcbsize as _).ok() } } } #[repr(C)] @@ -5929,7 +5929,7 @@ windows_core::imp::interface_hierarchy!(IPrintCoreHelperUni, windows_core::IUnkn impl IPrintCoreHelperUni { #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] pub unsafe fn CreateGDLSnapshot(&self, pdevmode: *mut super::Gdi::DEVMODEA, cbsize: u32, dwflags: u32, ppsnapshotstream: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateGDLSnapshot)(windows_core::Interface::as_raw(self), core::mem::transmute(pdevmode), cbsize, dwflags, core::mem::transmute(ppsnapshotstream)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateGDLSnapshot)(windows_core::Interface::as_raw(self), pdevmode as _, cbsize, dwflags, core::mem::transmute(ppsnapshotstream)).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn CreateDefaultGDLSnapshot(&self, dwflags: u32) -> windows_core::Result { @@ -6003,7 +6003,7 @@ impl IPrintCoreHelperUni2 { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetNamedCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(pdevmode.unwrap_or(core::mem::zeroed())), cbsize, pszcommandname.param().abi(), core::mem::transmute(ppcommandbytes), core::mem::transmute(pcbcommandsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNamedCommand)(windows_core::Interface::as_raw(self), pdevmode.unwrap_or(core::mem::zeroed()) as _, cbsize, pszcommandname.param().abi(), ppcommandbytes as _, pcbcommandsize as _).ok() } } } #[repr(C)] @@ -6049,12 +6049,12 @@ impl IPrintCoreUI2 { (windows_core::Interface::vtable(self).GetOptions)( windows_core::Interface::as_raw(self), poemuiobj, - core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), + dwflags.unwrap_or(core::mem::zeroed()) as _, 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())), pmszfeatureoptionbuf.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(pcbneeded), + pcbneeded as _, ) .ok() } @@ -6069,27 +6069,27 @@ impl IPrintCoreUI2 { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EnumConstrainedOptions)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).EnumConstrainedOptions)(windows_core::Interface::as_raw(self), poemuiobj, dwflags.unwrap_or(core::mem::zeroed()) as _, 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()), pcbneeded as _).ok() } } 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, { - unsafe { (windows_core::Interface::vtable(self).WhyConstrained)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).WhyConstrained)(windows_core::Interface::as_raw(self), poemuiobj, dwflags.unwrap_or(core::mem::zeroed()) as _, 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()), pcbneeded as _).ok() } } 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, { - unsafe { (windows_core::Interface::vtable(self).GetGlobalAttribute)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).GetGlobalAttribute)(windows_core::Interface::as_raw(self), poemuiobj, dwflags.unwrap_or(core::mem::zeroed()) as _, pszattribute.param().abi(), pdwdatatype as _, core::mem::transmute(pbdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _).ok() } } 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, { - unsafe { (windows_core::Interface::vtable(self).GetFeatureAttribute)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).GetFeatureAttribute)(windows_core::Interface::as_raw(self), poemuiobj, dwflags.unwrap_or(core::mem::zeroed()) as _, pszfeaturekeyword.param().abi(), pszattribute.param().abi(), pdwdatatype as _, core::mem::transmute(pbdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _).ok() } } 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 @@ -6097,19 +6097,19 @@ impl IPrintCoreUI2 { P3: windows_core::Param, P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetOptionAttribute)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).GetOptionAttribute)(windows_core::Interface::as_raw(self), poemuiobj, dwflags.unwrap_or(core::mem::zeroed()) as _, pszfeaturekeyword.param().abi(), pszoptionkeyword.param().abi(), pszattribute.param().abi(), pdwdatatype as _, core::mem::transmute(pbdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded as _).ok() } } pub unsafe fn EnumFeatures(&self, poemuiobj: *const OEMUIOBJ, dwflags: Option, pmszfeaturelist: Option<&mut [u8]>, pcbneeded: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumFeatures)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).EnumFeatures)(windows_core::Interface::as_raw(self), poemuiobj, dwflags.unwrap_or(core::mem::zeroed()) as _, 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()), pcbneeded as _).ok() } } 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, { - unsafe { (windows_core::Interface::vtable(self).EnumOptions)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).EnumOptions)(windows_core::Interface::as_raw(self), poemuiobj, dwflags.unwrap_or(core::mem::zeroed()) as _, 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()), pcbneeded as _).ok() } } pub unsafe fn QuerySimulationSupport(&self, hprinter: super::super::Foundation::HANDLE, dwlevel: u32, pcaps: Option<&mut [u8]>, pcbneeded: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QuerySimulationSupport)(windows_core::Interface::as_raw(self), hprinter, 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() } + unsafe { (windows_core::Interface::vtable(self).QuerySimulationSupport)(windows_core::Interface::as_raw(self), hprinter, 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()), pcbneeded as _).ok() } } } #[repr(C)] @@ -6486,11 +6486,11 @@ windows_core::imp::define_interface!(IPrintOemCommon, IPrintOemCommon_Vtbl, 0x7f windows_core::imp::interface_hierarchy!(IPrintOemCommon, windows_core::IUnknown); impl IPrintOemCommon { pub unsafe fn GetInfo(&self, dwmode: u32, pbuffer: *mut core::ffi::c_void, cbsize: u32, pcbneeded: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInfo)(windows_core::Interface::as_raw(self), dwmode, core::mem::transmute(pbuffer), cbsize, core::mem::transmute(pcbneeded)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInfo)(windows_core::Interface::as_raw(self), dwmode, pbuffer as _, cbsize, pcbneeded as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn DevMode(&self, dwmode: u32, poemdmparam: *mut OEMDMPARAM) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DevMode)(windows_core::Interface::as_raw(self), dwmode, core::mem::transmute(poemdmparam)).ok() } + unsafe { (windows_core::Interface::vtable(self).DevMode)(windows_core::Interface::as_raw(self), dwmode, poemdmparam as _).ok() } } } #[repr(C)] @@ -6537,7 +6537,7 @@ impl IPrintOemDriverUI { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DrvGetDriverSetting)(windows_core::Interface::as_raw(self), core::mem::transmute(pci), feature.param().abi(), core::mem::transmute(poutput), cbsize, core::mem::transmute(pcbneeded), core::mem::transmute(pdwoptionsreturned)).ok() } + unsafe { (windows_core::Interface::vtable(self).DrvGetDriverSetting)(windows_core::Interface::as_raw(self), pci as _, feature.param().abi(), poutput as _, cbsize, pcbneeded as _, pdwoptionsreturned as _).ok() } } pub unsafe fn DrvUpgradeRegistrySetting(&self, hprinter: super::super::Foundation::HANDLE, pfeature: P1, poption: P2) -> windows_core::Result<()> where @@ -6547,7 +6547,7 @@ impl IPrintOemDriverUI { unsafe { (windows_core::Interface::vtable(self).DrvUpgradeRegistrySetting)(windows_core::Interface::as_raw(self), 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<()> { - unsafe { (windows_core::Interface::vtable(self).DrvUpdateUISetting)(windows_core::Interface::as_raw(self), core::mem::transmute(pci), core::mem::transmute(poptitem), dwpreviousselection, dwmode).ok() } + unsafe { (windows_core::Interface::vtable(self).DrvUpdateUISetting)(windows_core::Interface::as_raw(self), pci as _, poptitem as _, dwpreviousselection, dwmode).ok() } } } #[repr(C)] @@ -6614,7 +6614,7 @@ impl IPrintOemUI { unsafe { (windows_core::Interface::vtable(self).CommonUIProp)(windows_core::Interface::as_raw(self), dwmode, poemcuipparam).ok() } } pub unsafe fn DocumentPropertySheets(&self, ppsuiinfo: *mut PROPSHEETUI_INFO, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DocumentPropertySheets)(windows_core::Interface::as_raw(self), core::mem::transmute(ppsuiinfo), lparam).ok() } + unsafe { (windows_core::Interface::vtable(self).DocumentPropertySheets)(windows_core::Interface::as_raw(self), ppsuiinfo as _, lparam).ok() } } pub unsafe fn DevicePropertySheets(&self, ppsuiinfo: *const PROPSHEETUI_INFO, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DevicePropertySheets)(windows_core::Interface::as_raw(self), ppsuiinfo, lparam).ok() } @@ -6628,7 +6628,7 @@ impl IPrintOemUI { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DeviceCapabilitiesA)(windows_core::Interface::as_raw(self), core::mem::transmute(poemuiobj), hprinter, pdevicename.param().abi(), wcapability, core::mem::transmute(poutput), ppublicdm, poemdm, dwold, core::mem::transmute(dwresult)).ok() } + unsafe { (windows_core::Interface::vtable(self).DeviceCapabilitiesA)(windows_core::Interface::as_raw(self), poemuiobj as _, hprinter, pdevicename.param().abi(), wcapability, poutput as _, ppublicdm, poemdm, dwold, dwresult as _).ok() } } pub unsafe fn UpgradePrinter(&self, dwlevel: u32, pdriverupgradeinfo: *const u8) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UpgradePrinter)(windows_core::Interface::as_raw(self), dwlevel, pdriverupgradeinfo).ok() } @@ -6644,7 +6644,7 @@ impl IPrintOemUI { } #[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<()> { - unsafe { (windows_core::Interface::vtable(self).QueryColorProfile)(windows_core::Interface::as_raw(self), core::mem::transmute(hprinter), poemuiobj, ppublicdm, poemdm, ulquerymode, core::mem::transmute(pvprofiledata), core::mem::transmute(pcbprofiledata), core::mem::transmute(pflprofiledata)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryColorProfile)(windows_core::Interface::as_raw(self), core::mem::transmute(hprinter), poemuiobj, ppublicdm, poemdm, ulquerymode, pvprofiledata as _, pcbprofiledata as _, pflprofiledata as _).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<()> { unsafe { (windows_core::Interface::vtable(self).FontInstallerDlgProc)(windows_core::Interface::as_raw(self), hwnd, usmsg, wparam, lparam).ok() } @@ -6814,7 +6814,7 @@ impl IPrintOemUI2 { } #[cfg(feature = "Win32_Graphics_Gdi")] 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<()> { - unsafe { (windows_core::Interface::vtable(self).DocumentEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(hprinter), hdc, iesc, cbin, core::mem::transmute(pvin), cbout, core::mem::transmute(pvout), core::mem::transmute(piresult)).ok() } + unsafe { (windows_core::Interface::vtable(self).DocumentEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(hprinter), hdc, iesc, cbin, pvin as _, cbout, pvout as _, piresult as _).ok() } } } #[repr(C)] @@ -6875,15 +6875,15 @@ windows_core::imp::interface_hierarchy!(IPrintOemUIMXDC, windows_core::IUnknown) impl IPrintOemUIMXDC { #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn AdjustImageableArea(&self, hprinter: PRINTER_HANDLE, cbdevmode: u32, pdevmode: *const super::Gdi::DEVMODEA, cboemdm: u32, poemdm: *const core::ffi::c_void, prclimageablearea: *mut super::super::Foundation::RECTL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AdjustImageableArea)(windows_core::Interface::as_raw(self), core::mem::transmute(hprinter), cbdevmode, pdevmode, cboemdm, poemdm, core::mem::transmute(prclimageablearea)).ok() } + unsafe { (windows_core::Interface::vtable(self).AdjustImageableArea)(windows_core::Interface::as_raw(self), core::mem::transmute(hprinter), cbdevmode, pdevmode, cboemdm, poemdm, prclimageablearea as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn AdjustImageCompression(&self, hprinter: PRINTER_HANDLE, cbdevmode: u32, pdevmode: *const super::Gdi::DEVMODEA, cboemdm: u32, poemdm: *const core::ffi::c_void, pcompressionmode: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AdjustImageCompression)(windows_core::Interface::as_raw(self), core::mem::transmute(hprinter), cbdevmode, pdevmode, cboemdm, poemdm, core::mem::transmute(pcompressionmode)).ok() } + unsafe { (windows_core::Interface::vtable(self).AdjustImageCompression)(windows_core::Interface::as_raw(self), core::mem::transmute(hprinter), cbdevmode, pdevmode, cboemdm, poemdm, pcompressionmode as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn AdjustDPI(&self, hprinter: PRINTER_HANDLE, cbdevmode: u32, pdevmode: *const super::Gdi::DEVMODEA, cboemdm: u32, poemdm: *const core::ffi::c_void, pdpi: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AdjustDPI)(windows_core::Interface::as_raw(self), core::mem::transmute(hprinter), cbdevmode, pdevmode, cboemdm, poemdm, core::mem::transmute(pdpi)).ok() } + unsafe { (windows_core::Interface::vtable(self).AdjustDPI)(windows_core::Interface::as_raw(self), core::mem::transmute(hprinter), cbdevmode, pdevmode, cboemdm, poemdm, pdpi as _).ok() } } } #[repr(C)] @@ -7246,10 +7246,10 @@ 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<()> { - unsafe { (windows_core::Interface::vtable(self).Seek)(windows_core::Interface::as_raw(self), dlibmove, dworigin, core::mem::transmute(plibnewposition.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Seek)(windows_core::Interface::as_raw(self), dlibmove, dworigin, plibnewposition.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadBytes)(windows_core::Interface::as_raw(self), core::mem::transmute(pvbuffer), cbrequested, core::mem::transmute(pcbread), core::mem::transmute(pbendoffile)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadBytes)(windows_core::Interface::as_raw(self), pvbuffer as _, cbrequested, pcbread as _, pbendoffile as _).ok() } } } #[repr(C)] @@ -8898,10 +8898,10 @@ windows_core::imp::define_interface!(IPrintTicketProvider, IPrintTicketProvider_ windows_core::imp::interface_hierarchy!(IPrintTicketProvider, windows_core::IUnknown); impl IPrintTicketProvider { pub unsafe fn GetSupportedVersions(&self, hprinter: PRINTER_HANDLE, ppversions: *mut *mut i32, cversions: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSupportedVersions)(windows_core::Interface::as_raw(self), core::mem::transmute(hprinter), core::mem::transmute(ppversions), core::mem::transmute(cversions)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSupportedVersions)(windows_core::Interface::as_raw(self), core::mem::transmute(hprinter), ppversions as _, cversions as _).ok() } } pub unsafe fn BindPrinter(&self, hprinter: PRINTER_HANDLE, version: i32, poptions: *mut SHIMOPTS, pdevmodeflags: *mut u32, cnamespaces: *mut i32, ppnamespaces: *mut *mut windows_core::BSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).BindPrinter)(windows_core::Interface::as_raw(self), core::mem::transmute(hprinter), version, core::mem::transmute(poptions), core::mem::transmute(pdevmodeflags), core::mem::transmute(cnamespaces), core::mem::transmute(ppnamespaces)).ok() } + unsafe { (windows_core::Interface::vtable(self).BindPrinter)(windows_core::Interface::as_raw(self), core::mem::transmute(hprinter), version, poptions as _, pdevmodeflags as _, cnamespaces as _, ppnamespaces as _).ok() } } pub unsafe fn QueryDeviceNamespace(&self, pdefaultnamespace: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).QueryDeviceNamespace)(windows_core::Interface::as_raw(self), core::mem::transmute(pdefaultnamespace)).ok() } @@ -8911,14 +8911,14 @@ impl IPrintTicketProvider { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ConvertPrintTicketToDevMode)(windows_core::Interface::as_raw(self), pprintticket.param().abi(), cbdevmodein, core::mem::transmute(pdevmodein), core::mem::transmute(pcbdevmodeout), core::mem::transmute(ppdevmodeout)).ok() } + unsafe { (windows_core::Interface::vtable(self).ConvertPrintTicketToDevMode)(windows_core::Interface::as_raw(self), pprintticket.param().abi(), cbdevmodein, pdevmodein as _, pcbdevmodeout as _, ppdevmodeout as _).ok() } } #[cfg(all(feature = "Win32_Data_Xml_MsXml", feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] pub unsafe fn ConvertDevModeToPrintTicket(&self, cbdevmode: u32, pdevmode: *mut super::Gdi::DEVMODEA, pprintticket: P2) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ConvertDevModeToPrintTicket)(windows_core::Interface::as_raw(self), cbdevmode, core::mem::transmute(pdevmode), pprintticket.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).ConvertDevModeToPrintTicket)(windows_core::Interface::as_raw(self), cbdevmode, pdevmode as _, pprintticket.param().abi()).ok() } } #[cfg(all(feature = "Win32_Data_Xml_MsXml", feature = "Win32_System_Com"))] pub unsafe fn GetPrintCapabilities(&self, pprintticket: P0) -> windows_core::Result @@ -9914,7 +9914,7 @@ impl IPrinterPropertyBag { unsafe { (windows_core::Interface::vtable(self).SetString)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrname), core::mem::transmute_copy(bstrvalue)).ok() } } pub unsafe fn GetBytes(&self, bstrname: &windows_core::BSTR, pcbvalue: *mut u32, ppvalue: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBytes)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrname), core::mem::transmute(pcbvalue), core::mem::transmute(ppvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBytes)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrname), pcbvalue as _, ppvalue as _).ok() } } pub unsafe fn SetBytes(&self, bstrname: &windows_core::BSTR, pvalue: &[u8]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetBytes)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrname), pvalue.len().try_into().unwrap(), core::mem::transmute(pvalue.as_ptr())).ok() } @@ -11026,7 +11026,7 @@ impl IXpsDocumentConsumer { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetNewEmptyPart)(windows_core::Interface::as_raw(self), uri.param().abi(), riid, core::mem::transmute(ppnewobject), core::mem::transmute(ppwritestream)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNewEmptyPart)(windows_core::Interface::as_raw(self), uri.param().abi(), riid, ppnewobject as _, core::mem::transmute(ppwritestream)).ok() } } } #[repr(C)] 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 a55ecf0207..7f525a9da5 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); - unsafe { ApplyLocalManagementSyncML(syncmlrequest.param().abi(), core::mem::transmute(syncmlresult.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ApplyLocalManagementSyncML(syncmlrequest.param().abi(), syncmlresult.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn DiscoverManagementService(pszupn: P0) -> windows_core::Result<*mut MANAGEMENT_SERVICE_INFO> @@ -35,12 +35,12 @@ 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); - unsafe { GetDeviceManagementConfigInfo(providerid.param().abi(), core::mem::transmute(configstringbufferlength), core::mem::transmute(configstring.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { GetDeviceManagementConfigInfo(providerid.param().abi(), configstringbufferlength as _, configstring.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn GetDeviceRegistrationInfo(deviceinformationclass: REGISTRATION_INFORMATION_CLASS, ppdeviceregistrationinfo: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("mdmregistration.dll" "system" fn GetDeviceRegistrationInfo(deviceinformationclass : REGISTRATION_INFORMATION_CLASS, ppdeviceregistrationinfo : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { GetDeviceRegistrationInfo(deviceinformationclass, core::mem::transmute(ppdeviceregistrationinfo)).ok() } + unsafe { GetDeviceRegistrationInfo(deviceinformationclass, ppdeviceregistrationinfo as _).ok() } } #[inline] pub unsafe fn GetManagementAppHyperlink(pszhyperlink: &mut [u16]) -> windows_core::Result<()> { @@ -50,7 +50,7 @@ pub unsafe fn GetManagementAppHyperlink(pszhyperlink: &mut [u16]) -> windows_cor #[inline] pub unsafe fn IsDeviceRegisteredWithManagement(pfisdeviceregisteredwithmanagement: *mut super::super::Foundation::BOOL, pszupn: Option<&mut [u16]>) -> windows_core::Result<()> { windows_targets::link!("mdmregistration.dll" "system" fn IsDeviceRegisteredWithManagement(pfisdeviceregisteredwithmanagement : *mut super::super::Foundation:: BOOL, cchupn : u32, pszupn : windows_core::PWSTR) -> windows_core::HRESULT); - unsafe { IsDeviceRegisteredWithManagement(core::mem::transmute(pfisdeviceregisteredwithmanagement), pszupn.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pszupn.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() } + unsafe { IsDeviceRegisteredWithManagement(pfisdeviceregisteredwithmanagement as _, pszupn.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pszupn.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() } } #[inline] pub unsafe fn IsManagementRegistrationAllowed() -> windows_core::Result { @@ -71,7 +71,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); - unsafe { RegisterDeviceWithLocalManagement(core::mem::transmute(alreadyregistered.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { RegisterDeviceWithLocalManagement(alreadyregistered.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn RegisterDeviceWithManagement(pszupn: P0, ppszmdmserviceuri: P1, ppzsaccesstoken: P2) -> windows_core::Result<()> diff --git a/crates/libs/windows/src/Windows/Win32/Media/Audio/Apo/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/Audio/Apo/mod.rs index c9b3b2e34a..4fe8bb9318 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 @@ -603,7 +603,7 @@ impl IAudioMediaType { unsafe { (windows_core::Interface::vtable(self).GetAudioFormat)(windows_core::Interface::as_raw(self)) } } pub unsafe fn GetUncompressedAudioFormat(&self, puncompressedaudioformat: *mut UNCOMPRESSEDAUDIOFORMAT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetUncompressedAudioFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(puncompressedaudioformat)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUncompressedAudioFormat)(windows_core::Interface::as_raw(self), puncompressedaudioformat as _).ok() } } } #[repr(C)] @@ -911,7 +911,7 @@ windows_core::imp::define_interface!(IAudioProcessingObjectNotifications, IAudio windows_core::imp::interface_hierarchy!(IAudioProcessingObjectNotifications, windows_core::IUnknown); impl IAudioProcessingObjectNotifications { pub unsafe fn GetApoNotificationRegistrationInfo(&self, aponotifications: *mut *mut APO_NOTIFICATION_DESCRIPTOR, count: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetApoNotificationRegistrationInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(aponotifications), core::mem::transmute(count)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetApoNotificationRegistrationInfo)(windows_core::Interface::as_raw(self), aponotifications as _, count as _).ok() } } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn HandleNotification(&self, aponotification: *const APO_NOTIFICATION) { @@ -969,7 +969,7 @@ impl core::ops::Deref for IAudioProcessingObjectNotifications2 { windows_core::imp::interface_hierarchy!(IAudioProcessingObjectNotifications2, windows_core::IUnknown, IAudioProcessingObjectNotifications); impl IAudioProcessingObjectNotifications2 { pub unsafe fn GetApoNotificationRegistrationInfo2(&self, maxaponotificationtypesupported: APO_NOTIFICATION_TYPE, aponotifications: *mut *mut APO_NOTIFICATION_DESCRIPTOR, count: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetApoNotificationRegistrationInfo2)(windows_core::Interface::as_raw(self), maxaponotificationtypesupported, core::mem::transmute(aponotifications), core::mem::transmute(count)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetApoNotificationRegistrationInfo2)(windows_core::Interface::as_raw(self), maxaponotificationtypesupported, aponotifications as _, count as _).ok() } } } #[repr(C)] @@ -1005,7 +1005,7 @@ windows_core::imp::define_interface!(IAudioProcessingObjectRT, IAudioProcessingO windows_core::imp::interface_hierarchy!(IAudioProcessingObjectRT, windows_core::IUnknown); impl IAudioProcessingObjectRT { pub unsafe fn APOProcess(&self, u32numinputconnections: u32, ppinputconnections: *const *const APO_CONNECTION_PROPERTY, u32numoutputconnections: u32, ppoutputconnections: *mut *mut APO_CONNECTION_PROPERTY) { - unsafe { (windows_core::Interface::vtable(self).APOProcess)(windows_core::Interface::as_raw(self), u32numinputconnections, ppinputconnections, u32numoutputconnections, core::mem::transmute(ppoutputconnections)) } + unsafe { (windows_core::Interface::vtable(self).APOProcess)(windows_core::Interface::as_raw(self), u32numinputconnections, ppinputconnections, u32numoutputconnections, ppoutputconnections as _) } } pub unsafe fn CalcInputFrames(&self, u32outputframecount: u32) -> u32 { unsafe { (windows_core::Interface::vtable(self).CalcInputFrames)(windows_core::Interface::as_raw(self), u32outputframecount) } @@ -1186,7 +1186,7 @@ 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: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEffectsList)(windows_core::Interface::as_raw(self), core::mem::transmute(ppeffectsids), core::mem::transmute(pceffects), event).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEffectsList)(windows_core::Interface::as_raw(self), ppeffectsids as _, pceffects as _, event).ok() } } } #[repr(C)] @@ -1222,7 +1222,7 @@ 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: Option) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetControllableSystemEffectsList)(windows_core::Interface::as_raw(self), effects as _, numeffects as _, event.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetAudioSystemEffectState(&self, effectid: windows_core::GUID, state: AUDIO_SYSTEMEFFECT_STATE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetAudioSystemEffectState)(windows_core::Interface::as_raw(self), core::mem::transmute(effectid), 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 4b820f294d..89271f1220 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 @@ -839,25 +839,25 @@ windows_core::imp::define_interface!(IDirectMusic, IDirectMusic_Vtbl, 0x6536115a windows_core::imp::interface_hierarchy!(IDirectMusic, windows_core::IUnknown); impl IDirectMusic { pub unsafe fn EnumPort(&self, dwindex: u32, pportcaps: *mut DMUS_PORTCAPS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumPort)(windows_core::Interface::as_raw(self), dwindex, core::mem::transmute(pportcaps)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumPort)(windows_core::Interface::as_raw(self), dwindex, pportcaps as _).ok() } } pub unsafe fn CreateMusicBuffer(&self, pbufferdesc: *mut DMUS_BUFFERDESC, ppbuffer: *mut Option, punkouter: P2) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateMusicBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(pbufferdesc), core::mem::transmute(ppbuffer), punkouter.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateMusicBuffer)(windows_core::Interface::as_raw(self), pbufferdesc as _, core::mem::transmute(ppbuffer), punkouter.param().abi()).ok() } } pub unsafe fn CreatePort(&self, rclsidport: *const windows_core::GUID, pportparams: *mut DMUS_PORTPARAMS8, ppport: *mut Option, punkouter: P3) -> windows_core::Result<()> where P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreatePort)(windows_core::Interface::as_raw(self), rclsidport, core::mem::transmute(pportparams), core::mem::transmute(ppport), punkouter.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).CreatePort)(windows_core::Interface::as_raw(self), rclsidport, pportparams as _, core::mem::transmute(ppport), punkouter.param().abi()).ok() } } pub unsafe fn EnumMasterClock(&self, dwindex: u32, lpclockinfo: *mut DMUS_CLOCKINFO8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumMasterClock)(windows_core::Interface::as_raw(self), dwindex, core::mem::transmute(lpclockinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumMasterClock)(windows_core::Interface::as_raw(self), dwindex, lpclockinfo as _).ok() } } pub unsafe fn GetMasterClock(&self, pguidclock: *mut windows_core::GUID, ppreferenceclock: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMasterClock)(windows_core::Interface::as_raw(self), core::mem::transmute(pguidclock), core::mem::transmute(ppreferenceclock)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMasterClock)(windows_core::Interface::as_raw(self), pguidclock as _, core::mem::transmute(ppreferenceclock)).ok() } } pub unsafe fn SetMasterClock(&self, rguidclock: *const windows_core::GUID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetMasterClock)(windows_core::Interface::as_raw(self), rguidclock).ok() } @@ -866,7 +866,7 @@ impl IDirectMusic { unsafe { (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), fenable.into()).ok() } } pub unsafe fn GetDefaultPort(&self, pguidport: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDefaultPort)(windows_core::Interface::as_raw(self), core::mem::transmute(pguidport)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDefaultPort)(windows_core::Interface::as_raw(self), pguidport as _).ok() } } #[cfg(feature = "Win32_Media_Audio_DirectSound")] pub unsafe fn SetDirectSound(&self, pdirectsound: P0, hwnd: super::super::super::Foundation::HWND) -> windows_core::Result<()> @@ -1029,34 +1029,34 @@ impl IDirectMusicBuffer { unsafe { (windows_core::Interface::vtable(self).Flush)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn TotalTime(&self, prttime: *mut i64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TotalTime)(windows_core::Interface::as_raw(self), core::mem::transmute(prttime)).ok() } + unsafe { (windows_core::Interface::vtable(self).TotalTime)(windows_core::Interface::as_raw(self), prttime as _).ok() } } pub unsafe fn PackStructured(&self, rt: i64, dwchannelgroup: u32, dwchannelmessage: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).PackStructured)(windows_core::Interface::as_raw(self), rt, dwchannelgroup, dwchannelmessage).ok() } } pub unsafe fn PackUnstructured(&self, rt: i64, dwchannelgroup: u32, cb: u32, lpb: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).PackUnstructured)(windows_core::Interface::as_raw(self), rt, dwchannelgroup, cb, core::mem::transmute(lpb)).ok() } + unsafe { (windows_core::Interface::vtable(self).PackUnstructured)(windows_core::Interface::as_raw(self), rt, dwchannelgroup, cb, lpb as _).ok() } } pub unsafe fn ResetReadPtr(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ResetReadPtr)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetNextEvent(&self, prt: *mut i64, pdwchannelgroup: *mut u32, pdwlength: *mut u32, ppdata: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNextEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(prt), core::mem::transmute(pdwchannelgroup), core::mem::transmute(pdwlength), core::mem::transmute(ppdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNextEvent)(windows_core::Interface::as_raw(self), prt as _, pdwchannelgroup as _, pdwlength as _, ppdata as _).ok() } } pub unsafe fn GetRawBufferPtr(&self, ppdata: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRawBufferPtr)(windows_core::Interface::as_raw(self), core::mem::transmute(ppdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRawBufferPtr)(windows_core::Interface::as_raw(self), ppdata as _).ok() } } pub unsafe fn GetStartTime(&self, prt: *mut i64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStartTime)(windows_core::Interface::as_raw(self), core::mem::transmute(prt)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStartTime)(windows_core::Interface::as_raw(self), prt as _).ok() } } pub unsafe fn GetUsedBytes(&self, pcb: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetUsedBytes)(windows_core::Interface::as_raw(self), core::mem::transmute(pcb)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUsedBytes)(windows_core::Interface::as_raw(self), pcb as _).ok() } } pub unsafe fn GetMaxBytes(&self, pcb: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMaxBytes)(windows_core::Interface::as_raw(self), core::mem::transmute(pcb)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMaxBytes)(windows_core::Interface::as_raw(self), pcb as _).ok() } } pub unsafe fn GetBufferFormat(&self, pguidformat: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBufferFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(pguidformat)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBufferFormat)(windows_core::Interface::as_raw(self), pguidformat as _).ok() } } pub unsafe fn SetStartTime(&self, rt: i64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetStartTime)(windows_core::Interface::as_raw(self), rt).ok() } @@ -1212,7 +1212,7 @@ impl IDirectMusicCollection { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EnumInstrument)(windows_core::Interface::as_raw(self), dwindex, core::mem::transmute(pdwpatch), pwszname.param().abi(), dwnamelen).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumInstrument)(windows_core::Interface::as_raw(self), dwindex, pdwpatch as _, pwszname.param().abi(), dwnamelen).ok() } } } #[repr(C)] @@ -1260,7 +1260,7 @@ windows_core::imp::define_interface!(IDirectMusicDownload, IDirectMusicDownload_ windows_core::imp::interface_hierarchy!(IDirectMusicDownload, windows_core::IUnknown); impl IDirectMusicDownload { pub unsafe fn GetBuffer(&self, ppvbuffer: *mut *mut core::ffi::c_void, pdwsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(ppvbuffer), core::mem::transmute(pdwsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), ppvbuffer as _, pdwsize as _).ok() } } } #[repr(C)] @@ -1306,7 +1306,7 @@ windows_core::imp::define_interface!(IDirectMusicInstrument, IDirectMusicInstrum windows_core::imp::interface_hierarchy!(IDirectMusicInstrument, windows_core::IUnknown); impl IDirectMusicInstrument { pub unsafe fn GetPatch(&self, pdwpatch: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPatch)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwpatch)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPatch)(windows_core::Interface::as_raw(self), pdwpatch as _).ok() } } pub unsafe fn SetPatch(&self, dwpatch: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetPatch)(windows_core::Interface::as_raw(self), dwpatch).ok() } @@ -1365,7 +1365,7 @@ impl IDirectMusicPort { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DownloadInstrument)(windows_core::Interface::as_raw(self), pinstrument.param().abi(), core::mem::transmute(ppdownloadedinstrument), core::mem::transmute(pnoteranges), dwnumnoteranges).ok() } + unsafe { (windows_core::Interface::vtable(self).DownloadInstrument)(windows_core::Interface::as_raw(self), pinstrument.param().abi(), core::mem::transmute(ppdownloadedinstrument), pnoteranges as _, dwnumnoteranges).ok() } } pub unsafe fn UnloadInstrument(&self, pdownloadedinstrument: P0) -> windows_core::Result<()> where @@ -1380,23 +1380,23 @@ impl IDirectMusicPort { } } pub unsafe fn GetRunningStats(&self, pstats: *mut DMUS_SYNTHSTATS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRunningStats)(windows_core::Interface::as_raw(self), core::mem::transmute(pstats)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRunningStats)(windows_core::Interface::as_raw(self), pstats as _).ok() } } pub unsafe fn Compact(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Compact)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetCaps(&self, pportcaps: *mut DMUS_PORTCAPS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), core::mem::transmute(pportcaps)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), pportcaps as _).ok() } } #[cfg(feature = "Win32_System_IO")] pub unsafe fn DeviceIoControl(&self, dwiocontrolcode: u32, lpinbuffer: *mut core::ffi::c_void, ninbuffersize: u32, lpoutbuffer: *mut core::ffi::c_void, noutbuffersize: u32, lpbytesreturned: *mut u32, lpoverlapped: *mut super::super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DeviceIoControl)(windows_core::Interface::as_raw(self), dwiocontrolcode, core::mem::transmute(lpinbuffer), ninbuffersize, core::mem::transmute(lpoutbuffer), noutbuffersize, core::mem::transmute(lpbytesreturned), core::mem::transmute(lpoverlapped)).ok() } + unsafe { (windows_core::Interface::vtable(self).DeviceIoControl)(windows_core::Interface::as_raw(self), dwiocontrolcode, lpinbuffer as _, ninbuffersize, lpoutbuffer as _, noutbuffersize, lpbytesreturned as _, lpoverlapped as _).ok() } } pub unsafe fn SetNumChannelGroups(&self, dwchannelgroups: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetNumChannelGroups)(windows_core::Interface::as_raw(self), dwchannelgroups).ok() } } pub unsafe fn GetNumChannelGroups(&self, pdwchannelgroups: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNumChannelGroups)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwchannelgroups)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNumChannelGroups)(windows_core::Interface::as_raw(self), pdwchannelgroups as _).ok() } } pub unsafe fn Activate(&self, factive: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), factive.into()).ok() } @@ -1405,7 +1405,7 @@ impl IDirectMusicPort { unsafe { (windows_core::Interface::vtable(self).SetChannelPriority)(windows_core::Interface::as_raw(self), dwchannelgroup, dwchannel, dwpriority).ok() } } pub unsafe fn GetChannelPriority(&self, dwchannelgroup: u32, dwchannel: u32, pdwpriority: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetChannelPriority)(windows_core::Interface::as_raw(self), dwchannelgroup, dwchannel, core::mem::transmute(pdwpriority)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetChannelPriority)(windows_core::Interface::as_raw(self), dwchannelgroup, dwchannel, pdwpriority as _).ok() } } #[cfg(feature = "Win32_Media_Audio_DirectSound")] pub unsafe fn SetDirectSound(&self, pdirectsound: P0, pdirectsoundbuffer: P1) -> windows_core::Result<()> @@ -1416,7 +1416,7 @@ impl IDirectMusicPort { unsafe { (windows_core::Interface::vtable(self).SetDirectSound)(windows_core::Interface::as_raw(self), pdirectsound.param().abi(), pdirectsoundbuffer.param().abi()).ok() } } pub unsafe fn GetFormat(&self, pwaveformatex: *mut super::WAVEFORMATEX, pdwwaveformatexsize: *mut u32, pdwbuffersize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(pwaveformatex), core::mem::transmute(pdwwaveformatexsize), core::mem::transmute(pdwbuffersize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFormat)(windows_core::Interface::as_raw(self), pwaveformatex as _, pdwwaveformatexsize as _, pdwbuffersize as _).ok() } } } #[repr(C)] @@ -1620,10 +1620,10 @@ impl IDirectMusicPortDownload { } } pub unsafe fn GetDLId(&self, pdwstartdlid: *mut u32, dwcount: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDLId)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwstartdlid), dwcount).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDLId)(windows_core::Interface::as_raw(self), pdwstartdlid as _, dwcount).ok() } } pub unsafe fn GetAppend(&self, pdwappend: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAppend)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwappend)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAppend)(windows_core::Interface::as_raw(self), pdwappend as _).ok() } } pub unsafe fn Download(&self, pidmdownload: P0) -> windows_core::Result<()> where @@ -1725,7 +1725,7 @@ windows_core::imp::define_interface!(IDirectMusicSynth, IDirectMusicSynth_Vtbl, windows_core::imp::interface_hierarchy!(IDirectMusicSynth, windows_core::IUnknown); impl IDirectMusicSynth { pub unsafe fn Open(&self, pportparams: *mut DMUS_PORTPARAMS8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Open)(windows_core::Interface::as_raw(self), core::mem::transmute(pportparams)).ok() } + unsafe { (windows_core::Interface::vtable(self).Open)(windows_core::Interface::as_raw(self), pportparams as _).ok() } } pub unsafe fn Close(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() } @@ -1734,19 +1734,19 @@ impl IDirectMusicSynth { unsafe { (windows_core::Interface::vtable(self).SetNumChannelGroups)(windows_core::Interface::as_raw(self), dwgroups).ok() } } 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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Download)(windows_core::Interface::as_raw(self), phdownload as _, pvdata as _, pbfree as _).ok() } } pub unsafe fn Unload(&self, hdownload: super::super::super::Foundation::HANDLE, lpfreehandle: isize, huserdata: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Unload)(windows_core::Interface::as_raw(self), hdownload, lpfreehandle, huserdata).ok() } } pub unsafe fn PlayBuffer(&self, rt: i64, pbbuffer: *mut u8, cbbuffer: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).PlayBuffer)(windows_core::Interface::as_raw(self), rt, core::mem::transmute(pbbuffer), cbbuffer).ok() } + unsafe { (windows_core::Interface::vtable(self).PlayBuffer)(windows_core::Interface::as_raw(self), rt, pbbuffer as _, cbbuffer).ok() } } pub unsafe fn GetRunningStats(&self, pstats: *mut DMUS_SYNTHSTATS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRunningStats)(windows_core::Interface::as_raw(self), core::mem::transmute(pstats)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRunningStats)(windows_core::Interface::as_raw(self), pstats as _).ok() } } pub unsafe fn GetPortCaps(&self, pcaps: *mut DMUS_PORTCAPS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPortCaps)(windows_core::Interface::as_raw(self), core::mem::transmute(pcaps)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPortCaps)(windows_core::Interface::as_raw(self), pcaps as _).ok() } } pub unsafe fn SetMasterClock(&self, pclock: P0) -> windows_core::Result<()> where @@ -1770,19 +1770,19 @@ impl IDirectMusicSynth { unsafe { (windows_core::Interface::vtable(self).SetSynthSink)(windows_core::Interface::as_raw(self), psynthsink.param().abi()).ok() } } pub unsafe fn Render(&self, pbuffer: *mut i16, dwlength: u32, llposition: i64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Render)(windows_core::Interface::as_raw(self), core::mem::transmute(pbuffer), dwlength, llposition).ok() } + unsafe { (windows_core::Interface::vtable(self).Render)(windows_core::Interface::as_raw(self), pbuffer as _, dwlength, llposition).ok() } } pub unsafe fn SetChannelPriority(&self, dwchannelgroup: u32, dwchannel: u32, dwpriority: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetChannelPriority)(windows_core::Interface::as_raw(self), dwchannelgroup, dwchannel, dwpriority).ok() } } pub unsafe fn GetChannelPriority(&self, dwchannelgroup: u32, dwchannel: u32, pdwpriority: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetChannelPriority)(windows_core::Interface::as_raw(self), dwchannelgroup, dwchannel, core::mem::transmute(pdwpriority)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetChannelPriority)(windows_core::Interface::as_raw(self), dwchannelgroup, dwchannel, pdwpriority as _).ok() } } pub unsafe fn GetFormat(&self, pwaveformatex: *mut super::WAVEFORMATEX, pdwwaveformatexsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(pwaveformatex), core::mem::transmute(pdwwaveformatexsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFormat)(windows_core::Interface::as_raw(self), pwaveformatex as _, pdwwaveformatexsize as _).ok() } } pub unsafe fn GetAppend(&self, pdwappend: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAppend)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwappend)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAppend)(windows_core::Interface::as_raw(self), pdwappend as _).ok() } } } #[repr(C)] @@ -1977,13 +1977,13 @@ impl IDirectMusicSynth8 { unsafe { (windows_core::Interface::vtable(self).StopVoice)(windows_core::Interface::as_raw(self), rt, dwvoiceid).ok() } } pub unsafe fn GetVoiceState(&self, dwvoice: *mut u32, cbvoice: u32, dwvoicestate: *mut DMUS_VOICE_STATE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVoiceState)(windows_core::Interface::as_raw(self), core::mem::transmute(dwvoice), cbvoice, core::mem::transmute(dwvoicestate)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVoiceState)(windows_core::Interface::as_raw(self), dwvoice as _, cbvoice, dwvoicestate as _).ok() } } pub unsafe fn Refresh(&self, dwdownloadid: u32, dwflags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Refresh)(windows_core::Interface::as_raw(self), dwdownloadid, dwflags).ok() } } pub unsafe fn AssignChannelToBuses(&self, dwchannelgroup: u32, dwchannel: u32, pdwbuses: *mut u32, cbuses: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AssignChannelToBuses)(windows_core::Interface::as_raw(self), dwchannelgroup, dwchannel, core::mem::transmute(pdwbuses), cbuses).ok() } + unsafe { (windows_core::Interface::vtable(self).AssignChannelToBuses)(windows_core::Interface::as_raw(self), dwchannelgroup, dwchannel, pdwbuses as _, cbuses).ok() } } } #[repr(C)] @@ -2073,10 +2073,10 @@ impl IDirectMusicSynthSink { unsafe { (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), fenable.into()).ok() } } pub unsafe fn SampleToRefTime(&self, llsampletime: i64, prftime: *mut i64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SampleToRefTime)(windows_core::Interface::as_raw(self), llsampletime, core::mem::transmute(prftime)).ok() } + unsafe { (windows_core::Interface::vtable(self).SampleToRefTime)(windows_core::Interface::as_raw(self), llsampletime, prftime as _).ok() } } pub unsafe fn RefTimeToSample(&self, rftime: i64, pllsampletime: *mut i64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RefTimeToSample)(windows_core::Interface::as_raw(self), rftime, core::mem::transmute(pllsampletime)).ok() } + unsafe { (windows_core::Interface::vtable(self).RefTimeToSample)(windows_core::Interface::as_raw(self), rftime, pllsampletime as _).ok() } } #[cfg(feature = "Win32_Media_Audio_DirectSound")] pub unsafe fn SetDirectSound(&self, pdirectsound: P0, pdirectsoundbuffer: P1) -> windows_core::Result<()> @@ -2087,7 +2087,7 @@ impl IDirectMusicSynthSink { unsafe { (windows_core::Interface::vtable(self).SetDirectSound)(windows_core::Interface::as_raw(self), pdirectsound.param().abi(), pdirectsoundbuffer.param().abi()).ok() } } pub unsafe fn GetDesiredBufferSize(&self, pdwbuffersizeinsamples: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesiredBufferSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwbuffersizeinsamples)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesiredBufferSize)(windows_core::Interface::as_raw(self), pdwbuffersizeinsamples as _).ok() } } } #[repr(C)] 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 c09b67b3d1..908bb4ae20 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); - unsafe { DirectSoundCaptureCreate(core::mem::transmute(pcguiddevice.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdsc), punkouter.param().abi()).ok() } + unsafe { DirectSoundCaptureCreate(pcguiddevice.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { DirectSoundCaptureCreate8(core::mem::transmute(pcguiddevice.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdsc8), punkouter.param().abi()).ok() } + unsafe { DirectSoundCaptureCreate8(pcguiddevice.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { DirectSoundCaptureEnumerateA(pdsenumcallback, core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DirectSoundCaptureEnumerateA(pdsenumcallback, pcontext.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { DirectSoundCaptureEnumerateW(pdsenumcallback, core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DirectSoundCaptureEnumerateW(pdsenumcallback, pcontext.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { DirectSoundCreate(core::mem::transmute(pcguiddevice.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppds), punkouter.param().abi()).ok() } + unsafe { DirectSoundCreate(pcguiddevice.unwrap_or(core::mem::zeroed()) as _, 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,17 +38,17 @@ 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); - unsafe { DirectSoundCreate8(core::mem::transmute(pcguiddevice.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppds8), punkouter.param().abi()).ok() } + unsafe { DirectSoundCreate8(pcguiddevice.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { DirectSoundEnumerateA(pdsenumcallback, core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DirectSoundEnumerateA(pdsenumcallback, pcontext.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { DirectSoundEnumerateW(pdsenumcallback, core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DirectSoundEnumerateW(pdsenumcallback, pcontext.unwrap_or(core::mem::zeroed()) as _).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: super::super::super::Foundation::HWND, dwlevel: u32, ppdsfd: *mut Option, ppdscbuffer8: *mut Option, ppdsbuffer8: *mut Option, punkouter: P9) -> windows_core::Result<()> @@ -56,14 +56,14 @@ where 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); - unsafe { DirectSoundFullDuplexCreate(core::mem::transmute(pcguidcapturedevice.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcguidrenderdevice.unwrap_or(core::mem::zeroed())), pcdscbufferdesc, pcdsbufferdesc, hwnd, dwlevel, core::mem::transmute(ppdsfd), core::mem::transmute(ppdscbuffer8), core::mem::transmute(ppdsbuffer8), punkouter.param().abi()).ok() } + unsafe { DirectSoundFullDuplexCreate(pcguidcapturedevice.unwrap_or(core::mem::zeroed()) as _, pcguidrenderdevice.unwrap_or(core::mem::zeroed()) as _, pcdscbufferdesc, pcdsbufferdesc, hwnd, 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); unsafe { let mut result__ = core::mem::zeroed(); - GetDeviceID(core::mem::transmute(pguidsrc.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + GetDeviceID(pguidsrc.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } pub const CLSID_DirectSound: windows_core::GUID = windows_core::GUID::from_u128(0x47d4d946_62e8_11cf_93bc_444553540000); @@ -764,7 +764,7 @@ impl IDirectSound { unsafe { (windows_core::Interface::vtable(self).CreateSoundBuffer)(windows_core::Interface::as_raw(self), pcdsbufferdesc, core::mem::transmute(ppdsbuffer), punkouter.param().abi()).ok() } } pub unsafe fn GetCaps(&self, pdscaps: *mut DSCAPS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), core::mem::transmute(pdscaps)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), pdscaps as _).ok() } } pub unsafe fn DuplicateSoundBuffer(&self, pdsbufferoriginal: P0) -> windows_core::Result where @@ -791,7 +791,7 @@ impl IDirectSound { unsafe { (windows_core::Interface::vtable(self).SetSpeakerConfig)(windows_core::Interface::as_raw(self), dwspeakerconfig).ok() } } pub unsafe fn Initialize(&self, pcguiddevice: Option<*const windows_core::GUID>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(pcguiddevice.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), pcguiddevice.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -900,10 +900,10 @@ windows_core::imp::interface_hierarchy!(IDirectSound3DBuffer, windows_core::IUnk impl IDirectSound3DBuffer { #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetAllParameters(&self, pds3dbuffer: *mut DS3DBUFFER) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAllParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(pds3dbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAllParameters)(windows_core::Interface::as_raw(self), pds3dbuffer as _).ok() } } pub unsafe fn GetConeAngles(&self, pdwinsideconeangle: *mut u32, pdwoutsideconeangle: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetConeAngles)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwinsideconeangle), core::mem::transmute(pdwoutsideconeangle)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConeAngles)(windows_core::Interface::as_raw(self), pdwinsideconeangle as _, pdwoutsideconeangle as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetConeOrientation(&self) -> windows_core::Result { @@ -1223,7 +1223,7 @@ windows_core::imp::interface_hierarchy!(IDirectSound3DListener, windows_core::IU impl IDirectSound3DListener { #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetAllParameters(&self, plistener: *mut DS3DLISTENER) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAllParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(plistener)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAllParameters)(windows_core::Interface::as_raw(self), plistener as _).ok() } } pub unsafe fn GetDistanceFactor(&self) -> windows_core::Result { unsafe { @@ -1239,7 +1239,7 @@ impl IDirectSound3DListener { } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetOrientation(&self, pvorientfront: *mut super::super::super::Graphics::Direct3D::D3DVECTOR, pvorienttop: *mut super::super::super::Graphics::Direct3D::D3DVECTOR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOrientation)(windows_core::Interface::as_raw(self), core::mem::transmute(pvorientfront), core::mem::transmute(pvorienttop)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOrientation)(windows_core::Interface::as_raw(self), pvorientfront as _, pvorienttop as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetPosition(&self) -> windows_core::Result { @@ -1536,13 +1536,13 @@ windows_core::imp::define_interface!(IDirectSoundBuffer, IDirectSoundBuffer_Vtbl windows_core::imp::interface_hierarchy!(IDirectSoundBuffer, windows_core::IUnknown); impl IDirectSoundBuffer { pub unsafe fn GetCaps(&self, pdsbuffercaps: *mut DSBCAPS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), core::mem::transmute(pdsbuffercaps)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), pdsbuffercaps as _).ok() } } pub unsafe fn GetCurrentPosition(&self, pdwcurrentplaycursor: Option<*mut u32>, pdwcurrentwritecursor: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentPosition)(windows_core::Interface::as_raw(self), pdwcurrentplaycursor.unwrap_or(core::mem::zeroed()) as _, pdwcurrentwritecursor.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetFormat(&self, pwfxformat: Option<*mut super::WAVEFORMATEX>, dwsizeallocated: u32, pdwsizewritten: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(pwfxformat.unwrap_or(core::mem::zeroed())), dwsizeallocated, core::mem::transmute(pdwsizewritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFormat)(windows_core::Interface::as_raw(self), pwfxformat.unwrap_or(core::mem::zeroed()) as _, dwsizeallocated, pdwsizewritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetVolume(&self) -> windows_core::Result { unsafe { @@ -1575,7 +1575,7 @@ impl IDirectSoundBuffer { unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), pdirectsound.param().abi(), pcdsbufferdesc).ok() } } pub unsafe fn Lock(&self, dwoffset: u32, dwbytes: u32, ppvaudioptr1: *mut *mut core::ffi::c_void, pdwaudiobytes1: *mut u32, ppvaudioptr2: Option<*mut *mut core::ffi::c_void>, pdwaudiobytes2: Option<*mut u32>, dwflags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), dwoffset, 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())), dwflags).ok() } + unsafe { (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), dwoffset, dwbytes, ppvaudioptr1 as _, pdwaudiobytes1 as _, ppvaudioptr2.unwrap_or(core::mem::zeroed()) as _, pdwaudiobytes2.unwrap_or(core::mem::zeroed()) as _, dwflags).ok() } } pub unsafe fn Play(&self, dwreserved1: u32, dwpriority: u32, dwflags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Play)(windows_core::Interface::as_raw(self), dwreserved1, dwpriority, dwflags).ok() } @@ -1599,7 +1599,7 @@ impl IDirectSoundBuffer { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).Unlock)(windows_core::Interface::as_raw(self), pvaudioptr1, dwaudiobytes1, core::mem::transmute(pvaudioptr2.unwrap_or(core::mem::zeroed())), dwaudiobytes2).ok() } + unsafe { (windows_core::Interface::vtable(self).Unlock)(windows_core::Interface::as_raw(self), pvaudioptr1, dwaudiobytes1, pvaudioptr2.unwrap_or(core::mem::zeroed()) as _, dwaudiobytes2).ok() } } pub unsafe fn Restore(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Restore)(windows_core::Interface::as_raw(self)).ok() } @@ -1818,13 +1818,13 @@ 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<()> { - unsafe { (windows_core::Interface::vtable(self).SetFX)(windows_core::Interface::as_raw(self), dweffectscount, core::mem::transmute(pdsfxdesc.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwresultcodes.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetFX)(windows_core::Interface::as_raw(self), dweffectscount, pdsfxdesc.unwrap_or(core::mem::zeroed()) as _, pdwresultcodes.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn AcquireResources(&self, dwflags: u32, pdwresultcodes: &mut [u32]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).AcquireResources)(windows_core::Interface::as_raw(self), dwflags, pdwresultcodes.len().try_into().unwrap(), core::mem::transmute(pdwresultcodes.as_ptr())).ok() } } pub unsafe fn GetObjectInPath(&self, rguidobject: *const windows_core::GUID, dwindex: u32, rguidinterface: *const windows_core::GUID, ppobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetObjectInPath)(windows_core::Interface::as_raw(self), rguidobject, dwindex, rguidinterface, core::mem::transmute(ppobject)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetObjectInPath)(windows_core::Interface::as_raw(self), rguidobject, dwindex, rguidinterface, ppobject as _).ok() } } } #[repr(C)] @@ -1887,7 +1887,7 @@ impl IDirectSoundCapture { } } pub unsafe fn Initialize(&self, pcguiddevice: Option<*const windows_core::GUID>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(pcguiddevice.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), pcguiddevice.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -1950,10 +1950,10 @@ impl IDirectSoundCaptureBuffer { } } pub unsafe fn GetCurrentPosition(&self, pdwcaptureposition: Option<*mut u32>, pdwreadposition: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentPosition)(windows_core::Interface::as_raw(self), pdwcaptureposition.unwrap_or(core::mem::zeroed()) as _, pdwreadposition.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetFormat(&self, pwfxformat: Option<*mut super::WAVEFORMATEX>, dwsizeallocated: u32, pdwsizewritten: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(pwfxformat.unwrap_or(core::mem::zeroed())), dwsizeallocated, core::mem::transmute(pdwsizewritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFormat)(windows_core::Interface::as_raw(self), pwfxformat.unwrap_or(core::mem::zeroed()) as _, dwsizeallocated, pdwsizewritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetStatus(&self) -> windows_core::Result { unsafe { @@ -1968,7 +1968,7 @@ impl IDirectSoundCaptureBuffer { unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), pdirectsoundcapture.param().abi(), pcdscbufferdesc).ok() } } pub unsafe fn Lock(&self, dwoffset: u32, dwbytes: u32, ppvaudioptr1: *mut *mut core::ffi::c_void, pdwaudiobytes1: *mut u32, ppvaudioptr2: Option<*mut *mut core::ffi::c_void>, pdwaudiobytes2: Option<*mut u32>, dwflags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), dwoffset, 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())), dwflags).ok() } + unsafe { (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), dwoffset, dwbytes, ppvaudioptr1 as _, pdwaudiobytes1 as _, ppvaudioptr2.unwrap_or(core::mem::zeroed()) as _, pdwaudiobytes2.unwrap_or(core::mem::zeroed()) as _, dwflags).ok() } } pub unsafe fn Start(&self, dwflags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Start)(windows_core::Interface::as_raw(self), dwflags).ok() } @@ -1977,7 +1977,7 @@ impl IDirectSoundCaptureBuffer { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).Unlock)(windows_core::Interface::as_raw(self), pvaudioptr1, dwaudiobytes1, core::mem::transmute(pvaudioptr2.unwrap_or(core::mem::zeroed())), dwaudiobytes2).ok() } + unsafe { (windows_core::Interface::vtable(self).Unlock)(windows_core::Interface::as_raw(self), pvaudioptr1, dwaudiobytes1, pvaudioptr2.unwrap_or(core::mem::zeroed()) as _, dwaudiobytes2).ok() } } } #[repr(C)] @@ -2100,7 +2100,7 @@ impl core::ops::Deref for IDirectSoundCaptureBuffer8 { windows_core::imp::interface_hierarchy!(IDirectSoundCaptureBuffer8, windows_core::IUnknown, IDirectSoundCaptureBuffer); impl IDirectSoundCaptureBuffer8 { pub unsafe fn GetObjectInPath(&self, rguidobject: *const windows_core::GUID, dwindex: u32, rguidinterface: *const windows_core::GUID, ppobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetObjectInPath)(windows_core::Interface::as_raw(self), rguidobject, dwindex, rguidinterface, core::mem::transmute(ppobject)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetObjectInPath)(windows_core::Interface::as_raw(self), rguidobject, dwindex, rguidinterface, ppobject as _).ok() } } pub unsafe fn GetFXStatus(&self, pdwfxstatus: &mut [u32]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetFXStatus)(windows_core::Interface::as_raw(self), pdwfxstatus.len().try_into().unwrap(), core::mem::transmute(pdwfxstatus.as_ptr())).ok() } @@ -2301,7 +2301,7 @@ impl IDirectSoundFXChorus { unsafe { (windows_core::Interface::vtable(self).SetAllParameters)(windows_core::Interface::as_raw(self), pcdsfxchorus).ok() } } pub unsafe fn GetAllParameters(&self, pdsfxchorus: *mut DSFXChorus) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAllParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(pdsfxchorus)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAllParameters)(windows_core::Interface::as_raw(self), pdsfxchorus as _).ok() } } } #[repr(C)] @@ -2346,7 +2346,7 @@ impl IDirectSoundFXCompressor { unsafe { (windows_core::Interface::vtable(self).SetAllParameters)(windows_core::Interface::as_raw(self), pcdsfxcompressor).ok() } } pub unsafe fn GetAllParameters(&self, pdsfxcompressor: *mut DSFXCompressor) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAllParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(pdsfxcompressor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAllParameters)(windows_core::Interface::as_raw(self), pdsfxcompressor as _).ok() } } } #[repr(C)] @@ -2391,7 +2391,7 @@ impl IDirectSoundFXDistortion { unsafe { (windows_core::Interface::vtable(self).SetAllParameters)(windows_core::Interface::as_raw(self), pcdsfxdistortion).ok() } } pub unsafe fn GetAllParameters(&self, pdsfxdistortion: *mut DSFXDistortion) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAllParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(pdsfxdistortion)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAllParameters)(windows_core::Interface::as_raw(self), pdsfxdistortion as _).ok() } } } #[repr(C)] @@ -2436,7 +2436,7 @@ impl IDirectSoundFXEcho { unsafe { (windows_core::Interface::vtable(self).SetAllParameters)(windows_core::Interface::as_raw(self), pcdsfxecho).ok() } } pub unsafe fn GetAllParameters(&self, pdsfxecho: *mut DSFXEcho) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAllParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(pdsfxecho)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAllParameters)(windows_core::Interface::as_raw(self), pdsfxecho as _).ok() } } } #[repr(C)] @@ -2481,7 +2481,7 @@ impl IDirectSoundFXFlanger { unsafe { (windows_core::Interface::vtable(self).SetAllParameters)(windows_core::Interface::as_raw(self), pcdsfxflanger).ok() } } pub unsafe fn GetAllParameters(&self, pdsfxflanger: *mut DSFXFlanger) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAllParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(pdsfxflanger)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAllParameters)(windows_core::Interface::as_raw(self), pdsfxflanger as _).ok() } } } #[repr(C)] @@ -2580,7 +2580,7 @@ impl IDirectSoundFXI3DL2Reverb { unsafe { (windows_core::Interface::vtable(self).SetAllParameters)(windows_core::Interface::as_raw(self), pcdsfxi3dl2reverb).ok() } } pub unsafe fn GetAllParameters(&self, pdsfxi3dl2reverb: *mut DSFXI3DL2Reverb) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAllParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(pdsfxi3dl2reverb)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAllParameters)(windows_core::Interface::as_raw(self), pdsfxi3dl2reverb as _).ok() } } pub unsafe fn SetPreset(&self, dwpreset: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetPreset)(windows_core::Interface::as_raw(self), dwpreset).ok() } diff --git a/crates/libs/windows/src/Windows/Win32/Media/Audio/Endpoints/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/Audio/Endpoints/mod.rs index 58e3db84c5..ed2a2340f7 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/Audio/Endpoints/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/Audio/Endpoints/mod.rs @@ -363,7 +363,7 @@ impl IAudioEndpointVolume { } } pub unsafe fn GetVolumeStepInfo(&self, pnstep: *mut u32, pnstepcount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVolumeStepInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pnstep), core::mem::transmute(pnstepcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVolumeStepInfo)(windows_core::Interface::as_raw(self), pnstep as _, pnstepcount as _).ok() } } pub unsafe fn VolumeStepUp(&self, pguideventcontext: *const windows_core::GUID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).VolumeStepUp)(windows_core::Interface::as_raw(self), pguideventcontext).ok() } @@ -378,7 +378,7 @@ impl IAudioEndpointVolume { } } pub unsafe fn GetVolumeRange(&self, pflvolumemindb: *mut f32, pflvolumemaxdb: *mut f32, pflvolumeincrementdb: *mut f32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVolumeRange)(windows_core::Interface::as_raw(self), core::mem::transmute(pflvolumemindb), core::mem::transmute(pflvolumemaxdb), core::mem::transmute(pflvolumeincrementdb)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVolumeRange)(windows_core::Interface::as_raw(self), pflvolumemindb as _, pflvolumemaxdb as _, pflvolumeincrementdb as _).ok() } } } #[repr(C)] @@ -606,7 +606,7 @@ windows_core::imp::define_interface!(IAudioEndpointVolumeCallback, IAudioEndpoin windows_core::imp::interface_hierarchy!(IAudioEndpointVolumeCallback, windows_core::IUnknown); impl IAudioEndpointVolumeCallback { pub unsafe fn OnNotify(&self, pnotify: *mut super::AUDIO_VOLUME_NOTIFICATION_DATA) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OnNotify)(windows_core::Interface::as_raw(self), core::mem::transmute(pnotify)).ok() } + unsafe { (windows_core::Interface::vtable(self).OnNotify)(windows_core::Interface::as_raw(self), pnotify as _).ok() } } } #[repr(C)] @@ -642,7 +642,7 @@ impl core::ops::Deref for IAudioEndpointVolumeEx { windows_core::imp::interface_hierarchy!(IAudioEndpointVolumeEx, windows_core::IUnknown, IAudioEndpointVolume); impl IAudioEndpointVolumeEx { pub unsafe fn GetVolumeRangeChannel(&self, ichannel: u32, pflvolumemindb: *mut f32, pflvolumemaxdb: *mut f32, pflvolumeincrementdb: *mut f32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVolumeRangeChannel)(windows_core::Interface::as_raw(self), ichannel, core::mem::transmute(pflvolumemindb), core::mem::transmute(pflvolumemaxdb), core::mem::transmute(pflvolumeincrementdb)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVolumeRangeChannel)(windows_core::Interface::as_raw(self), ichannel, pflvolumemindb as _, pflvolumemaxdb as _, pflvolumeincrementdb as _).ok() } } } #[repr(C)] @@ -834,13 +834,13 @@ impl IHardwareAudioEngineBase { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetEngineFormat)(windows_core::Interface::as_raw(self), pdevice.param().abi(), _brequestdeviceformat.into(), core::mem::transmute(_ppwfxformat)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEngineFormat)(windows_core::Interface::as_raw(self), pdevice.param().abi(), _brequestdeviceformat.into(), _ppwfxformat as _).ok() } } pub unsafe fn SetEngineDeviceFormat(&self, pdevice: P0, _pwfxformat: *mut super::WAVEFORMATEX) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SetEngineDeviceFormat)(windows_core::Interface::as_raw(self), pdevice.param().abi(), core::mem::transmute(_pwfxformat)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetEngineDeviceFormat)(windows_core::Interface::as_raw(self), pdevice.param().abi(), _pwfxformat as _).ok() } } pub unsafe fn SetGfxState(&self, pdevice: P0, _benable: bool) -> windows_core::Result<()> where 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 8dee723897..ca005e8537 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 @@ -17,7 +17,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); - unsafe { CreateFX(clsid, core::mem::transmute(peffect), core::mem::transmute(pinitdat.unwrap_or(core::mem::zeroed())), initdatabytesize).ok() } + unsafe { CreateFX(clsid, core::mem::transmute(peffect), pinitdat.unwrap_or(core::mem::zeroed()) as _, initdatabytesize).ok() } } #[inline] pub unsafe fn CreateHrtfApo(init: *const HrtfApoInit) -> windows_core::Result { @@ -252,13 +252,13 @@ impl IXAPO { } } pub unsafe fn IsInputFormatSupported(&self, poutputformat: *const super::WAVEFORMATEX, prequestedinputformat: *const super::WAVEFORMATEX, ppsupportedinputformat: Option<*mut *mut super::WAVEFORMATEX>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsInputFormatSupported)(windows_core::Interface::as_raw(self), poutputformat, prequestedinputformat, core::mem::transmute(ppsupportedinputformat.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).IsInputFormatSupported)(windows_core::Interface::as_raw(self), poutputformat, prequestedinputformat, ppsupportedinputformat.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn IsOutputFormatSupported(&self, pinputformat: *const super::WAVEFORMATEX, prequestedoutputformat: *const super::WAVEFORMATEX, ppsupportedoutputformat: Option<*mut *mut super::WAVEFORMATEX>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsOutputFormatSupported)(windows_core::Interface::as_raw(self), pinputformat, prequestedoutputformat, core::mem::transmute(ppsupportedoutputformat.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).IsOutputFormatSupported)(windows_core::Interface::as_raw(self), pinputformat, prequestedoutputformat, ppsupportedoutputformat.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Initialize(&self, pdata: Option<*const core::ffi::c_void>, databytesize: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), databytesize).ok() } + unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), pdata.unwrap_or(core::mem::zeroed()) as _, databytesize).ok() } } pub unsafe fn Reset(&self) { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)) } @@ -468,7 +468,7 @@ impl IXAPOParameters { unsafe { (windows_core::Interface::vtable(self).SetParameters)(windows_core::Interface::as_raw(self), pparameters, parameterbytesize) } } pub unsafe fn GetParameters(&self, pparameters: *mut core::ffi::c_void, parameterbytesize: u32) { - unsafe { (windows_core::Interface::vtable(self).GetParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(pparameters), parameterbytesize) } + unsafe { (windows_core::Interface::vtable(self).GetParameters)(windows_core::Interface::as_raw(self), pparameters as _, parameterbytesize) } } } #[repr(C)] @@ -525,16 +525,16 @@ impl IXAudio2 { where P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateSourceVoice)(windows_core::Interface::as_raw(self), core::mem::transmute(ppsourcevoice), psourceformat, flags, maxfrequencyratio, pcallback.param().abi(), core::mem::transmute(psendlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(peffectchain.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateSourceVoice)(windows_core::Interface::as_raw(self), core::mem::transmute(ppsourcevoice), psourceformat, flags, maxfrequencyratio, pcallback.param().abi(), psendlist.unwrap_or(core::mem::zeroed()) as _, peffectchain.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).CreateSubmixVoice)(windows_core::Interface::as_raw(self), core::mem::transmute(ppsubmixvoice), inputchannels, inputsamplerate, flags, processingstage, core::mem::transmute(psendlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(peffectchain.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateSubmixVoice)(windows_core::Interface::as_raw(self), core::mem::transmute(ppsubmixvoice), inputchannels, inputsamplerate, flags, processingstage, psendlist.unwrap_or(core::mem::zeroed()) as _, peffectchain.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).CreateMasteringVoice)(windows_core::Interface::as_raw(self), core::mem::transmute(ppmasteringvoice), inputchannels, inputsamplerate, flags, szdeviceid.param().abi(), core::mem::transmute(peffectchain.unwrap_or(core::mem::zeroed())), streamcategory).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateMasteringVoice)(windows_core::Interface::as_raw(self), core::mem::transmute(ppmasteringvoice), inputchannels, inputsamplerate, flags, szdeviceid.param().abi(), peffectchain.unwrap_or(core::mem::zeroed()) as _, streamcategory).ok() } } pub unsafe fn StartEngine(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).StartEngine)(windows_core::Interface::as_raw(self)).ok() } @@ -546,10 +546,10 @@ impl IXAudio2 { unsafe { (windows_core::Interface::vtable(self).CommitChanges)(windows_core::Interface::as_raw(self), operationset).ok() } } pub unsafe fn GetPerformanceData(&self, pperfdata: *mut XAUDIO2_PERFORMANCE_DATA) { - unsafe { (windows_core::Interface::vtable(self).GetPerformanceData)(windows_core::Interface::as_raw(self), core::mem::transmute(pperfdata)) } + unsafe { (windows_core::Interface::vtable(self).GetPerformanceData)(windows_core::Interface::as_raw(self), pperfdata as _) } } pub unsafe fn SetDebugConfiguration(&self, pdebugconfiguration: Option<*const XAUDIO2_DEBUG_CONFIGURATION>, preserved: Option<*const core::ffi::c_void>) { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).SetDebugConfiguration)(windows_core::Interface::as_raw(self), pdebugconfiguration.unwrap_or(core::mem::zeroed()) as _, preserved.unwrap_or(core::mem::zeroed()) as _) } } } #[repr(C)] @@ -727,10 +727,10 @@ windows_core::imp::define_interface!(IXAudio2Extension, IXAudio2Extension_Vtbl, windows_core::imp::interface_hierarchy!(IXAudio2Extension, windows_core::IUnknown); impl IXAudio2Extension { pub unsafe fn GetProcessingQuantum(&self, quantumnumerator: *mut u32, quantumdenominator: *mut u32) { - unsafe { (windows_core::Interface::vtable(self).GetProcessingQuantum)(windows_core::Interface::as_raw(self), core::mem::transmute(quantumnumerator), core::mem::transmute(quantumdenominator)) } + unsafe { (windows_core::Interface::vtable(self).GetProcessingQuantum)(windows_core::Interface::as_raw(self), quantumnumerator as _, quantumdenominator as _) } } pub unsafe fn GetProcessor(&self, processor: *mut u32) { - unsafe { (windows_core::Interface::vtable(self).GetProcessor)(windows_core::Interface::as_raw(self), core::mem::transmute(processor)) } + unsafe { (windows_core::Interface::vtable(self).GetProcessor)(windows_core::Interface::as_raw(self), processor as _) } } } #[repr(C)] @@ -837,7 +837,7 @@ impl IXAudio2SourceVoice { unsafe { (windows_core::Interface::vtable(self).Stop)(windows_core::Interface::as_raw(self), flags, operationset).ok() } } pub unsafe fn SubmitSourceBuffer(&self, pbuffer: *const XAUDIO2_BUFFER, pbufferwma: Option<*const XAUDIO2_BUFFER_WMA>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SubmitSourceBuffer)(windows_core::Interface::as_raw(self), pbuffer, core::mem::transmute(pbufferwma.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SubmitSourceBuffer)(windows_core::Interface::as_raw(self), pbuffer, pbufferwma.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn FlushSourceBuffers(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).FlushSourceBuffers)(windows_core::Interface::as_raw(self)).ok() } @@ -849,7 +849,7 @@ impl IXAudio2SourceVoice { unsafe { (windows_core::Interface::vtable(self).ExitLoop)(windows_core::Interface::as_raw(self), operationset).ok() } } pub unsafe fn GetState(&self, pvoicestate: *mut XAUDIO2_VOICE_STATE, flags: u32) { - unsafe { (windows_core::Interface::vtable(self).GetState)(windows_core::Interface::as_raw(self), core::mem::transmute(pvoicestate), flags) } + unsafe { (windows_core::Interface::vtable(self).GetState)(windows_core::Interface::as_raw(self), pvoicestate as _, flags) } } pub unsafe fn SetFrequencyRatio(&self, ratio: f32, operationset: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetFrequencyRatio)(windows_core::Interface::as_raw(self), ratio, operationset).ok() } @@ -1028,10 +1028,10 @@ impl IXAudio2Voice { } } pub unsafe fn SetOutputVoices(&self, psendlist: Option<*const XAUDIO2_VOICE_SENDS>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetOutputVoices)(windows_core::Interface::as_raw(self), core::mem::transmute(psendlist.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetOutputVoices)(windows_core::Interface::as_raw(self), psendlist.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetEffectChain(&self, peffectchain: Option<*const XAUDIO2_EFFECT_CHAIN>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetEffectChain)(windows_core::Interface::as_raw(self), core::mem::transmute(peffectchain.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetEffectChain)(windows_core::Interface::as_raw(self), peffectchain.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn EnableEffect(&self, effectindex: u32, operationset: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).EnableEffect)(windows_core::Interface::as_raw(self), effectindex, operationset).ok() } @@ -1050,7 +1050,7 @@ impl IXAudio2Voice { unsafe { (windows_core::Interface::vtable(self).SetEffectParameters)(windows_core::Interface::as_raw(self), effectindex, pparameters, parametersbytesize, operationset).ok() } } pub unsafe fn GetEffectParameters(&self, effectindex: u32, pparameters: *mut core::ffi::c_void, parametersbytesize: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEffectParameters)(windows_core::Interface::as_raw(self), effectindex, core::mem::transmute(pparameters), parametersbytesize).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEffectParameters)(windows_core::Interface::as_raw(self), effectindex, pparameters as _, parametersbytesize).ok() } } pub unsafe fn SetFilterParameters(&self, pparameters: *const XAUDIO2_FILTER_PARAMETERS, operationset: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetFilterParameters)(windows_core::Interface::as_raw(self), pparameters, operationset).ok() } @@ -1338,16 +1338,16 @@ impl IXAudio2VoiceCallback { unsafe { (windows_core::Interface::vtable(self).OnStreamEnd)(windows_core::Interface::as_raw(self)) } } pub unsafe fn OnBufferStart(&self, pbuffercontext: *mut core::ffi::c_void) { - unsafe { (windows_core::Interface::vtable(self).OnBufferStart)(windows_core::Interface::as_raw(self), core::mem::transmute(pbuffercontext)) } + unsafe { (windows_core::Interface::vtable(self).OnBufferStart)(windows_core::Interface::as_raw(self), pbuffercontext as _) } } pub unsafe fn OnBufferEnd(&self, pbuffercontext: *mut core::ffi::c_void) { - unsafe { (windows_core::Interface::vtable(self).OnBufferEnd)(windows_core::Interface::as_raw(self), core::mem::transmute(pbuffercontext)) } + unsafe { (windows_core::Interface::vtable(self).OnBufferEnd)(windows_core::Interface::as_raw(self), pbuffercontext as _) } } pub unsafe fn OnLoopEnd(&self, pbuffercontext: *mut core::ffi::c_void) { - unsafe { (windows_core::Interface::vtable(self).OnLoopEnd)(windows_core::Interface::as_raw(self), core::mem::transmute(pbuffercontext)) } + unsafe { (windows_core::Interface::vtable(self).OnLoopEnd)(windows_core::Interface::as_raw(self), pbuffercontext as _) } } pub unsafe fn OnVoiceError(&self, pbuffercontext: *mut core::ffi::c_void, error: windows_core::HRESULT) { - unsafe { (windows_core::Interface::vtable(self).OnVoiceError)(windows_core::Interface::as_raw(self), core::mem::transmute(pbuffercontext), error) } + unsafe { (windows_core::Interface::vtable(self).OnVoiceError)(windows_core::Interface::as_raw(self), pbuffercontext as _, error) } } } #[repr(C)] 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 fb5e873a96..e84e137d5f 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/Audio/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/Audio/mod.rs @@ -18,7 +18,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); unsafe { let mut result__ = core::mem::zeroed(); - ActivateAudioInterfaceAsync(deviceinterfacepath.param().abi(), riid, core::mem::transmute(activationparams.unwrap_or(core::mem::zeroed())), completionhandler.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + ActivateAudioInterfaceAsync(deviceinterfacepath.param().abi(), riid, activationparams.unwrap_or(core::mem::zeroed()) as _, completionhandler.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[inline] @@ -27,7 +27,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); - unsafe { CoRegisterMessageFilter(lpmessagefilter.param().abi(), core::mem::transmute(lplpmessagefilter.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CoRegisterMessageFilter(lpmessagefilter.param().abi(), lplpmessagefilter.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CreateCaptureAudioStateMonitor() -> windows_core::Result { @@ -105,7 +105,7 @@ where P0: 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); - unsafe { PlaySoundA(pszsound.param().abi(), core::mem::transmute(hmod.unwrap_or(core::mem::zeroed())), fdwsound) } + unsafe { PlaySoundA(pszsound.param().abi(), hmod.unwrap_or(core::mem::zeroed()) as _, fdwsound) } } #[inline] pub unsafe fn PlaySoundW(pszsound: P0, hmod: Option, fdwsound: SND_FLAGS) -> super::super::Foundation::BOOL @@ -113,17 +113,17 @@ where P0: 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); - unsafe { PlaySoundW(pszsound.param().abi(), core::mem::transmute(hmod.unwrap_or(core::mem::zeroed())), fdwsound) } + unsafe { PlaySoundW(pszsound.param().abi(), hmod.unwrap_or(core::mem::zeroed()) as _, fdwsound) } } #[inline] 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); - unsafe { acmDriverAddA(core::mem::transmute(phadid), hinstmodule, lparam, dwpriority, fdwadd) } + unsafe { acmDriverAddA(phadid as _, hinstmodule, lparam, dwpriority, fdwadd) } } #[inline] 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); - unsafe { acmDriverAddW(core::mem::transmute(phadid), hinstmodule, lparam, dwpriority, fdwadd) } + unsafe { acmDriverAddW(phadid as _, hinstmodule, lparam, dwpriority, fdwadd) } } #[inline] pub unsafe fn acmDriverClose(had: HACMDRIVER, fdwclose: u32) -> u32 { @@ -134,13 +134,13 @@ pub unsafe fn acmDriverClose(had: HACMDRIVER, fdwclose: u32) -> u32 { #[inline] 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); - unsafe { acmDriverDetailsA(hadid, core::mem::transmute(padd), fdwdetails) } + unsafe { acmDriverDetailsA(hadid, padd as _, fdwdetails) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] 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); - unsafe { acmDriverDetailsW(hadid, core::mem::transmute(padd), fdwdetails) } + unsafe { acmDriverDetailsW(hadid, padd as _, fdwdetails) } } #[inline] pub unsafe fn acmDriverEnum(fncallback: ACMDRIVERENUMCB, dwinstance: usize, fdwenum: u32) -> u32 { @@ -150,7 +150,7 @@ pub unsafe fn acmDriverEnum(fncallback: ACMDRIVERENUMCB, dwinstance: usize, fdwe #[inline] 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); - unsafe { acmDriverID(hao, core::mem::transmute(phadid), fdwdriverid) } + unsafe { acmDriverID(hao, phadid as _, fdwdriverid) } } #[inline] pub unsafe fn acmDriverMessage(had: HACMDRIVER, umsg: u32, lparam1: super::super::Foundation::LPARAM, lparam2: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { @@ -160,7 +160,7 @@ pub unsafe fn acmDriverMessage(had: HACMDRIVER, umsg: u32, lparam1: super::super #[inline] 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); - unsafe { acmDriverOpen(core::mem::transmute(phad), hadid, fdwopen) } + unsafe { acmDriverOpen(phad as _, hadid, fdwopen) } } #[inline] pub unsafe fn acmDriverPriority(hadid: HACMDRIVERID, dwpriority: u32, fdwpriority: u32) -> u32 { @@ -175,107 +175,107 @@ pub unsafe fn acmDriverRemove(hadid: HACMDRIVERID, fdwremove: u32) -> u32 { #[inline] pub unsafe fn acmFilterChooseA(pafltrc: *mut ACMFILTERCHOOSEA) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmFilterChooseA(pafltrc : *mut ACMFILTERCHOOSEA) -> u32); - unsafe { acmFilterChooseA(core::mem::transmute(pafltrc)) } + unsafe { acmFilterChooseA(pafltrc as _) } } #[inline] pub unsafe fn acmFilterChooseW(pafltrc: *mut ACMFILTERCHOOSEW) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmFilterChooseW(pafltrc : *mut ACMFILTERCHOOSEW) -> u32); - unsafe { acmFilterChooseW(core::mem::transmute(pafltrc)) } + unsafe { acmFilterChooseW(pafltrc as _) } } #[inline] 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); - unsafe { acmFilterDetailsA(had, core::mem::transmute(pafd), fdwdetails) } + unsafe { acmFilterDetailsA(had, pafd as _, fdwdetails) } } #[inline] 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); - unsafe { acmFilterDetailsW(had, core::mem::transmute(pafd), fdwdetails) } + unsafe { acmFilterDetailsW(had, pafd as _, fdwdetails) } } #[inline] 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); - unsafe { acmFilterEnumA(had, core::mem::transmute(pafd), fncallback, dwinstance, fdwenum) } + unsafe { acmFilterEnumA(had, pafd as _, fncallback, dwinstance, fdwenum) } } #[inline] 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); - unsafe { acmFilterEnumW(had, core::mem::transmute(pafd), fncallback, dwinstance, fdwenum) } + unsafe { acmFilterEnumW(had, pafd as _, fncallback, dwinstance, fdwenum) } } #[inline] 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); - unsafe { acmFilterTagDetailsA(had, core::mem::transmute(paftd), fdwdetails) } + unsafe { acmFilterTagDetailsA(had, paftd as _, fdwdetails) } } #[inline] 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); - unsafe { acmFilterTagDetailsW(had, core::mem::transmute(paftd), fdwdetails) } + unsafe { acmFilterTagDetailsW(had, paftd as _, fdwdetails) } } #[inline] 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); - unsafe { acmFilterTagEnumA(had, core::mem::transmute(paftd), fncallback, dwinstance, fdwenum) } + unsafe { acmFilterTagEnumA(had, paftd as _, fncallback, dwinstance, fdwenum) } } #[inline] 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); - unsafe { acmFilterTagEnumW(had, core::mem::transmute(paftd), fncallback, dwinstance, fdwenum) } + unsafe { acmFilterTagEnumW(had, paftd as _, fncallback, dwinstance, fdwenum) } } #[inline] pub unsafe fn acmFormatChooseA(pafmtc: *mut ACMFORMATCHOOSEA) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmFormatChooseA(pafmtc : *mut ACMFORMATCHOOSEA) -> u32); - unsafe { acmFormatChooseA(core::mem::transmute(pafmtc)) } + unsafe { acmFormatChooseA(pafmtc as _) } } #[inline] pub unsafe fn acmFormatChooseW(pafmtc: *mut ACMFORMATCHOOSEW) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmFormatChooseW(pafmtc : *mut ACMFORMATCHOOSEW) -> u32); - unsafe { acmFormatChooseW(core::mem::transmute(pafmtc)) } + unsafe { acmFormatChooseW(pafmtc as _) } } #[inline] 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); - unsafe { acmFormatDetailsA(had, core::mem::transmute(pafd), fdwdetails) } + unsafe { acmFormatDetailsA(had, pafd as _, fdwdetails) } } #[inline] 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); - unsafe { acmFormatDetailsW(had, core::mem::transmute(pafd), fdwdetails) } + unsafe { acmFormatDetailsW(had, pafd as _, fdwdetails) } } #[inline] 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); - unsafe { acmFormatEnumA(had, core::mem::transmute(pafd), fncallback, dwinstance, fdwenum) } + unsafe { acmFormatEnumA(had, pafd as _, fncallback, dwinstance, fdwenum) } } #[inline] 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); - unsafe { acmFormatEnumW(had, core::mem::transmute(pafd), fncallback, dwinstance, fdwenum) } + unsafe { acmFormatEnumW(had, pafd as _, fncallback, dwinstance, fdwenum) } } #[inline] 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); - unsafe { acmFormatSuggest(had, core::mem::transmute(pwfxsrc), core::mem::transmute(pwfxdst), cbwfxdst, fdwsuggest) } + unsafe { acmFormatSuggest(had, pwfxsrc as _, pwfxdst as _, cbwfxdst, fdwsuggest) } } #[inline] 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); - unsafe { acmFormatTagDetailsA(had, core::mem::transmute(paftd), fdwdetails) } + unsafe { acmFormatTagDetailsA(had, paftd as _, fdwdetails) } } #[inline] 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); - unsafe { acmFormatTagDetailsW(had, core::mem::transmute(paftd), fdwdetails) } + unsafe { acmFormatTagDetailsW(had, paftd as _, fdwdetails) } } #[inline] 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); - unsafe { acmFormatTagEnumA(had, core::mem::transmute(paftd), fncallback, dwinstance, fdwenum) } + unsafe { acmFormatTagEnumA(had, paftd as _, fncallback, dwinstance, fdwenum) } } #[inline] 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); - unsafe { acmFormatTagEnumW(had, core::mem::transmute(paftd), fncallback, dwinstance, fdwenum) } + unsafe { acmFormatTagEnumW(had, paftd as _, fncallback, dwinstance, fdwenum) } } #[inline] pub unsafe fn acmGetVersion() -> u32 { @@ -285,7 +285,7 @@ pub unsafe fn acmGetVersion() -> u32 { #[inline] 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); - unsafe { acmMetrics(hao, umetric, core::mem::transmute(pmetric)) } + unsafe { acmMetrics(hao, umetric, pmetric as _) } } #[inline] pub unsafe fn acmStreamClose(has: HACMSTREAM, fdwclose: u32) -> u32 { @@ -295,7 +295,7 @@ pub unsafe fn acmStreamClose(has: HACMSTREAM, fdwclose: u32) -> u32 { #[inline] 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); - unsafe { acmStreamConvert(has, core::mem::transmute(pash), fdwconvert) } + unsafe { acmStreamConvert(has, pash as _, fdwconvert) } } #[inline] pub unsafe fn acmStreamMessage(has: HACMSTREAM, umsg: u32, lparam1: super::super::Foundation::LPARAM, lparam2: super::super::Foundation::LPARAM) -> u32 { @@ -305,12 +305,12 @@ pub unsafe fn acmStreamMessage(has: HACMSTREAM, umsg: u32, lparam1: super::super #[inline] 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); - unsafe { acmStreamOpen(core::mem::transmute(phas), had, core::mem::transmute(pwfxsrc), core::mem::transmute(pwfxdst), core::mem::transmute(pwfltr), dwcallback, dwinstance, fdwopen) } + unsafe { acmStreamOpen(phas as _, had, pwfxsrc as _, pwfxdst as _, pwfltr as _, dwcallback, dwinstance, fdwopen) } } #[inline] 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); - unsafe { acmStreamPrepareHeader(has, core::mem::transmute(pash), fdwprepare) } + unsafe { acmStreamPrepareHeader(has, pash as _, fdwprepare) } } #[inline] pub unsafe fn acmStreamReset(has: HACMSTREAM, fdwreset: u32) -> u32 { @@ -320,22 +320,22 @@ pub unsafe fn acmStreamReset(has: HACMSTREAM, fdwreset: u32) -> u32 { #[inline] 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); - unsafe { acmStreamSize(has, cbinput, core::mem::transmute(pdwoutputbytes), fdwsize) } + unsafe { acmStreamSize(has, cbinput, pdwoutputbytes as _, fdwsize) } } #[inline] 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); - unsafe { acmStreamUnprepareHeader(has, core::mem::transmute(pash), fdwunprepare) } + unsafe { acmStreamUnprepareHeader(has, pash as _, fdwunprepare) } } #[inline] pub unsafe fn auxGetDevCapsA(udeviceid: usize, pac: *mut AUXCAPSA, cbac: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn auxGetDevCapsA(udeviceid : usize, pac : *mut AUXCAPSA, cbac : u32) -> u32); - unsafe { auxGetDevCapsA(udeviceid, core::mem::transmute(pac), cbac) } + unsafe { auxGetDevCapsA(udeviceid, pac as _, cbac) } } #[inline] pub unsafe fn auxGetDevCapsW(udeviceid: usize, pac: *mut AUXCAPSW, cbac: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn auxGetDevCapsW(udeviceid : usize, pac : *mut AUXCAPSW, cbac : u32) -> u32); - unsafe { auxGetDevCapsW(udeviceid, core::mem::transmute(pac), cbac) } + unsafe { auxGetDevCapsW(udeviceid, pac as _, cbac) } } #[inline] pub unsafe fn auxGetNumDevs() -> u32 { @@ -345,12 +345,12 @@ pub unsafe fn auxGetNumDevs() -> u32 { #[inline] pub unsafe fn auxGetVolume(udeviceid: u32, pdwvolume: *mut u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn auxGetVolume(udeviceid : u32, pdwvolume : *mut u32) -> u32); - unsafe { auxGetVolume(udeviceid, core::mem::transmute(pdwvolume)) } + unsafe { auxGetVolume(udeviceid, pdwvolume as _) } } #[inline] 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); - unsafe { auxOutMessage(udeviceid, umsg, core::mem::transmute(dw1.unwrap_or(core::mem::zeroed())), core::mem::transmute(dw2.unwrap_or(core::mem::zeroed()))) } + unsafe { auxOutMessage(udeviceid, umsg, dw1.unwrap_or(core::mem::zeroed()) as _, dw2.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn auxSetVolume(udeviceid: u32, dwvolume: u32) -> u32 { @@ -360,17 +360,17 @@ pub unsafe fn auxSetVolume(udeviceid: u32, dwvolume: u32) -> u32 { #[inline] 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); - unsafe { midiConnect(hmi, hmo, core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } + unsafe { midiConnect(hmi, hmo, preserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { midiDisconnect(hmi, hmo, core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } + unsafe { midiDisconnect(hmi, hmo, preserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { midiInAddBuffer(hmi, core::mem::transmute(pmh), cbmh) } + unsafe { midiInAddBuffer(hmi, pmh as _, cbmh) } } #[inline] pub unsafe fn midiInClose(hmi: HMIDIIN) -> u32 { @@ -380,12 +380,12 @@ pub unsafe fn midiInClose(hmi: HMIDIIN) -> u32 { #[inline] pub unsafe fn midiInGetDevCapsA(udeviceid: usize, pmic: *mut MIDIINCAPSA, cbmic: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiInGetDevCapsA(udeviceid : usize, pmic : *mut MIDIINCAPSA, cbmic : u32) -> u32); - unsafe { midiInGetDevCapsA(udeviceid, core::mem::transmute(pmic), cbmic) } + unsafe { midiInGetDevCapsA(udeviceid, pmic as _, cbmic) } } #[inline] pub unsafe fn midiInGetDevCapsW(udeviceid: usize, pmic: *mut MIDIINCAPSW, cbmic: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiInGetDevCapsW(udeviceid : usize, pmic : *mut MIDIINCAPSW, cbmic : u32) -> u32); - unsafe { midiInGetDevCapsW(udeviceid, core::mem::transmute(pmic), cbmic) } + unsafe { midiInGetDevCapsW(udeviceid, pmic as _, cbmic) } } #[inline] pub unsafe fn midiInGetErrorTextA(mmrerror: u32, psztext: &mut [u8]) -> u32 { @@ -400,7 +400,7 @@ pub unsafe fn midiInGetErrorTextW(mmrerror: u32, psztext: &mut [u16]) -> u32 { #[inline] pub unsafe fn midiInGetID(hmi: HMIDIIN, pudeviceid: *mut u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiInGetID(hmi : HMIDIIN, pudeviceid : *mut u32) -> u32); - unsafe { midiInGetID(hmi, core::mem::transmute(pudeviceid)) } + unsafe { midiInGetID(hmi, pudeviceid as _) } } #[inline] pub unsafe fn midiInGetNumDevs() -> u32 { @@ -410,17 +410,17 @@ pub unsafe fn midiInGetNumDevs() -> u32 { #[inline] 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); - unsafe { midiInMessage(core::mem::transmute(hmi.unwrap_or(core::mem::zeroed())), umsg, core::mem::transmute(dw1.unwrap_or(core::mem::zeroed())), core::mem::transmute(dw2.unwrap_or(core::mem::zeroed()))) } + unsafe { midiInMessage(hmi.unwrap_or(core::mem::zeroed()) as _, umsg, dw1.unwrap_or(core::mem::zeroed()) as _, dw2.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { midiInOpen(core::mem::transmute(phmi), udeviceid, core::mem::transmute(dwcallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwinstance.unwrap_or(core::mem::zeroed())), fdwopen) } + unsafe { midiInOpen(phmi as _, udeviceid, dwcallback.unwrap_or(core::mem::zeroed()) as _, dwinstance.unwrap_or(core::mem::zeroed()) as _, fdwopen) } } #[inline] 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); - unsafe { midiInPrepareHeader(hmi, core::mem::transmute(pmh), cbmh) } + unsafe { midiInPrepareHeader(hmi, pmh as _, cbmh) } } #[inline] pub unsafe fn midiInReset(hmi: HMIDIIN) -> u32 { @@ -440,7 +440,7 @@ pub unsafe fn midiInStop(hmi: HMIDIIN) -> u32 { #[inline] 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); - unsafe { midiInUnprepareHeader(hmi, core::mem::transmute(pmh), cbmh) } + unsafe { midiInUnprepareHeader(hmi, pmh as _, cbmh) } } #[inline] pub unsafe fn midiOutCacheDrumPatches(hmo: HMIDIOUT, upatch: u32, pwkya: &[u16; 128], fucache: u32) -> u32 { @@ -460,12 +460,12 @@ pub unsafe fn midiOutClose(hmo: HMIDIOUT) -> u32 { #[inline] pub unsafe fn midiOutGetDevCapsA(udeviceid: usize, pmoc: *mut MIDIOUTCAPSA, cbmoc: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiOutGetDevCapsA(udeviceid : usize, pmoc : *mut MIDIOUTCAPSA, cbmoc : u32) -> u32); - unsafe { midiOutGetDevCapsA(udeviceid, core::mem::transmute(pmoc), cbmoc) } + unsafe { midiOutGetDevCapsA(udeviceid, pmoc as _, cbmoc) } } #[inline] pub unsafe fn midiOutGetDevCapsW(udeviceid: usize, pmoc: *mut MIDIOUTCAPSW, cbmoc: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiOutGetDevCapsW(udeviceid : usize, pmoc : *mut MIDIOUTCAPSW, cbmoc : u32) -> u32); - unsafe { midiOutGetDevCapsW(udeviceid, core::mem::transmute(pmoc), cbmoc) } + unsafe { midiOutGetDevCapsW(udeviceid, pmoc as _, cbmoc) } } #[inline] pub unsafe fn midiOutGetErrorTextA(mmrerror: u32, psztext: &mut [u8]) -> u32 { @@ -480,7 +480,7 @@ pub unsafe fn midiOutGetErrorTextW(mmrerror: u32, psztext: &mut [u16]) -> u32 { #[inline] pub unsafe fn midiOutGetID(hmo: HMIDIOUT, pudeviceid: *mut u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiOutGetID(hmo : HMIDIOUT, pudeviceid : *mut u32) -> u32); - unsafe { midiOutGetID(hmo, core::mem::transmute(pudeviceid)) } + unsafe { midiOutGetID(hmo, pudeviceid as _) } } #[inline] pub unsafe fn midiOutGetNumDevs() -> u32 { @@ -490,7 +490,7 @@ pub unsafe fn midiOutGetNumDevs() -> u32 { #[inline] pub unsafe fn midiOutGetVolume(hmo: Option, pdwvolume: *mut u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiOutGetVolume(hmo : HMIDIOUT, pdwvolume : *mut u32) -> u32); - unsafe { midiOutGetVolume(core::mem::transmute(hmo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwvolume)) } + unsafe { midiOutGetVolume(hmo.unwrap_or(core::mem::zeroed()) as _, pdwvolume as _) } } #[inline] pub unsafe fn midiOutLongMsg(hmo: HMIDIOUT, pmh: *const MIDIHDR, cbmh: u32) -> u32 { @@ -500,17 +500,17 @@ pub unsafe fn midiOutLongMsg(hmo: HMIDIOUT, pmh: *const MIDIHDR, cbmh: u32) -> u #[inline] 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); - unsafe { midiOutMessage(core::mem::transmute(hmo.unwrap_or(core::mem::zeroed())), umsg, core::mem::transmute(dw1.unwrap_or(core::mem::zeroed())), core::mem::transmute(dw2.unwrap_or(core::mem::zeroed()))) } + unsafe { midiOutMessage(hmo.unwrap_or(core::mem::zeroed()) as _, umsg, dw1.unwrap_or(core::mem::zeroed()) as _, dw2.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { midiOutOpen(core::mem::transmute(phmo), udeviceid, core::mem::transmute(dwcallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwinstance.unwrap_or(core::mem::zeroed())), fdwopen) } + unsafe { midiOutOpen(phmo as _, udeviceid, dwcallback.unwrap_or(core::mem::zeroed()) as _, dwinstance.unwrap_or(core::mem::zeroed()) as _, fdwopen) } } #[inline] 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); - unsafe { midiOutPrepareHeader(hmo, core::mem::transmute(pmh), cbmh) } + unsafe { midiOutPrepareHeader(hmo, pmh as _, cbmh) } } #[inline] pub unsafe fn midiOutReset(hmo: HMIDIOUT) -> u32 { @@ -520,7 +520,7 @@ pub unsafe fn midiOutReset(hmo: HMIDIOUT) -> u32 { #[inline] pub unsafe fn midiOutSetVolume(hmo: Option, dwvolume: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiOutSetVolume(hmo : HMIDIOUT, dwvolume : u32) -> u32); - unsafe { midiOutSetVolume(core::mem::transmute(hmo.unwrap_or(core::mem::zeroed())), dwvolume) } + unsafe { midiOutSetVolume(hmo.unwrap_or(core::mem::zeroed()) as _, dwvolume) } } #[inline] pub unsafe fn midiOutShortMsg(hmo: HMIDIOUT, dwmsg: u32) -> u32 { @@ -530,7 +530,7 @@ pub unsafe fn midiOutShortMsg(hmo: HMIDIOUT, dwmsg: u32) -> u32 { #[inline] 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); - unsafe { midiOutUnprepareHeader(hmo, core::mem::transmute(pmh), cbmh) } + unsafe { midiOutUnprepareHeader(hmo, pmh as _, cbmh) } } #[inline] pub unsafe fn midiStreamClose(hms: HMIDISTRM) -> u32 { @@ -540,12 +540,12 @@ pub unsafe fn midiStreamClose(hms: HMIDISTRM) -> u32 { #[inline] 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); - unsafe { 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())), fdwopen) } + unsafe { midiStreamOpen(phms as _, core::mem::transmute(pudeviceid.as_ptr()), pudeviceid.len().try_into().unwrap(), dwcallback.unwrap_or(core::mem::zeroed()) as _, dwinstance.unwrap_or(core::mem::zeroed()) as _, fdwopen) } } #[inline] 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); - unsafe { midiStreamOut(hms, core::mem::transmute(pmh), cbmh) } + unsafe { midiStreamOut(hms, pmh as _, cbmh) } } #[inline] pub unsafe fn midiStreamPause(hms: HMIDISTRM) -> u32 { @@ -555,12 +555,12 @@ pub unsafe fn midiStreamPause(hms: HMIDISTRM) -> u32 { #[inline] 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); - unsafe { midiStreamPosition(hms, core::mem::transmute(lpmmt), cbmmt) } + unsafe { midiStreamPosition(hms, lpmmt as _, cbmmt) } } #[inline] 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); - unsafe { midiStreamProperty(hms, core::mem::transmute(lppropdata), dwproperty) } + unsafe { midiStreamProperty(hms, lppropdata as _, dwproperty) } } #[inline] pub unsafe fn midiStreamRestart(hms: HMIDISTRM) -> u32 { @@ -580,47 +580,47 @@ pub unsafe fn mixerClose(hmx: HMIXER) -> u32 { #[inline] 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); - unsafe { mixerGetControlDetailsA(core::mem::transmute(hmxobj.unwrap_or(core::mem::zeroed())), core::mem::transmute(pmxcd), fdwdetails) } + unsafe { mixerGetControlDetailsA(hmxobj.unwrap_or(core::mem::zeroed()) as _, pmxcd as _, fdwdetails) } } #[inline] 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); - unsafe { mixerGetControlDetailsW(core::mem::transmute(hmxobj.unwrap_or(core::mem::zeroed())), core::mem::transmute(pmxcd), fdwdetails) } + unsafe { mixerGetControlDetailsW(hmxobj.unwrap_or(core::mem::zeroed()) as _, pmxcd as _, fdwdetails) } } #[inline] pub unsafe fn mixerGetDevCapsA(umxid: usize, pmxcaps: *mut MIXERCAPSA, cbmxcaps: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn mixerGetDevCapsA(umxid : usize, pmxcaps : *mut MIXERCAPSA, cbmxcaps : u32) -> u32); - unsafe { mixerGetDevCapsA(umxid, core::mem::transmute(pmxcaps), cbmxcaps) } + unsafe { mixerGetDevCapsA(umxid, pmxcaps as _, cbmxcaps) } } #[inline] pub unsafe fn mixerGetDevCapsW(umxid: usize, pmxcaps: *mut MIXERCAPSW, cbmxcaps: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn mixerGetDevCapsW(umxid : usize, pmxcaps : *mut MIXERCAPSW, cbmxcaps : u32) -> u32); - unsafe { mixerGetDevCapsW(umxid, core::mem::transmute(pmxcaps), cbmxcaps) } + unsafe { mixerGetDevCapsW(umxid, pmxcaps as _, cbmxcaps) } } #[inline] 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); - unsafe { mixerGetID(core::mem::transmute(hmxobj.unwrap_or(core::mem::zeroed())), core::mem::transmute(pumxid), fdwid) } + unsafe { mixerGetID(hmxobj.unwrap_or(core::mem::zeroed()) as _, pumxid as _, fdwid) } } #[inline] 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); - unsafe { mixerGetLineControlsA(core::mem::transmute(hmxobj.unwrap_or(core::mem::zeroed())), core::mem::transmute(pmxlc), fdwcontrols) } + unsafe { mixerGetLineControlsA(hmxobj.unwrap_or(core::mem::zeroed()) as _, pmxlc as _, fdwcontrols) } } #[inline] 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); - unsafe { mixerGetLineControlsW(core::mem::transmute(hmxobj.unwrap_or(core::mem::zeroed())), core::mem::transmute(pmxlc), fdwcontrols) } + unsafe { mixerGetLineControlsW(hmxobj.unwrap_or(core::mem::zeroed()) as _, pmxlc as _, fdwcontrols) } } #[inline] 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); - unsafe { mixerGetLineInfoA(core::mem::transmute(hmxobj.unwrap_or(core::mem::zeroed())), core::mem::transmute(pmxl), fdwinfo) } + unsafe { mixerGetLineInfoA(hmxobj.unwrap_or(core::mem::zeroed()) as _, pmxl as _, fdwinfo) } } #[inline] 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); - unsafe { mixerGetLineInfoW(core::mem::transmute(hmxobj.unwrap_or(core::mem::zeroed())), core::mem::transmute(pmxl), fdwinfo) } + unsafe { mixerGetLineInfoW(hmxobj.unwrap_or(core::mem::zeroed()) as _, pmxl as _, fdwinfo) } } #[inline] pub unsafe fn mixerGetNumDevs() -> u32 { @@ -630,17 +630,17 @@ pub unsafe fn mixerGetNumDevs() -> u32 { #[inline] 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); - unsafe { mixerMessage(core::mem::transmute(hmx.unwrap_or(core::mem::zeroed())), umsg, core::mem::transmute(dwparam1.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwparam2.unwrap_or(core::mem::zeroed()))) } + unsafe { mixerMessage(hmx.unwrap_or(core::mem::zeroed()) as _, umsg, dwparam1.unwrap_or(core::mem::zeroed()) as _, dwparam2.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { mixerOpen(core::mem::transmute(phmx.unwrap_or(core::mem::zeroed())), umxid, core::mem::transmute(dwcallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwinstance.unwrap_or(core::mem::zeroed())), fdwopen) } + unsafe { mixerOpen(phmx.unwrap_or(core::mem::zeroed()) as _, umxid, dwcallback.unwrap_or(core::mem::zeroed()) as _, dwinstance.unwrap_or(core::mem::zeroed()) as _, fdwopen) } } #[inline] 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); - unsafe { mixerSetControlDetails(core::mem::transmute(hmxobj.unwrap_or(core::mem::zeroed())), pmxcd, fdwdetails) } + unsafe { mixerSetControlDetails(hmxobj.unwrap_or(core::mem::zeroed()) as _, pmxcd, fdwdetails) } } #[inline] pub unsafe fn sndPlaySoundA(pszsound: P0, fusound: u32) -> super::super::Foundation::BOOL @@ -661,7 +661,7 @@ where #[inline] 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); - unsafe { waveInAddBuffer(hwi, core::mem::transmute(pwh), cbwh) } + unsafe { waveInAddBuffer(hwi, pwh as _, cbwh) } } #[inline] pub unsafe fn waveInClose(hwi: HWAVEIN) -> u32 { @@ -671,12 +671,12 @@ pub unsafe fn waveInClose(hwi: HWAVEIN) -> u32 { #[inline] pub unsafe fn waveInGetDevCapsA(udeviceid: usize, pwic: *mut WAVEINCAPSA, cbwic: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveInGetDevCapsA(udeviceid : usize, pwic : *mut WAVEINCAPSA, cbwic : u32) -> u32); - unsafe { waveInGetDevCapsA(udeviceid, core::mem::transmute(pwic), cbwic) } + unsafe { waveInGetDevCapsA(udeviceid, pwic as _, cbwic) } } #[inline] pub unsafe fn waveInGetDevCapsW(udeviceid: usize, pwic: *mut WAVEINCAPSW, cbwic: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveInGetDevCapsW(udeviceid : usize, pwic : *mut WAVEINCAPSW, cbwic : u32) -> u32); - unsafe { waveInGetDevCapsW(udeviceid, core::mem::transmute(pwic), cbwic) } + unsafe { waveInGetDevCapsW(udeviceid, pwic as _, cbwic) } } #[inline] pub unsafe fn waveInGetErrorTextA(mmrerror: u32, psztext: &mut [u8]) -> u32 { @@ -701,22 +701,22 @@ pub unsafe fn waveInGetNumDevs() -> u32 { #[inline] 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); - unsafe { waveInGetPosition(hwi, core::mem::transmute(pmmt), cbmmt) } + unsafe { waveInGetPosition(hwi, pmmt as _, cbmmt) } } #[inline] 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); - unsafe { waveInMessage(core::mem::transmute(hwi.unwrap_or(core::mem::zeroed())), umsg, core::mem::transmute(dw1.unwrap_or(core::mem::zeroed())), core::mem::transmute(dw2.unwrap_or(core::mem::zeroed()))) } + unsafe { waveInMessage(hwi.unwrap_or(core::mem::zeroed()) as _, umsg, dw1.unwrap_or(core::mem::zeroed()) as _, dw2.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { waveInOpen(core::mem::transmute(phwi.unwrap_or(core::mem::zeroed())), udeviceid, pwfx, core::mem::transmute(dwcallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwinstance.unwrap_or(core::mem::zeroed())), fdwopen) } + unsafe { waveInOpen(phwi.unwrap_or(core::mem::zeroed()) as _, udeviceid, pwfx, dwcallback.unwrap_or(core::mem::zeroed()) as _, dwinstance.unwrap_or(core::mem::zeroed()) as _, fdwopen) } } #[inline] 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); - unsafe { waveInPrepareHeader(hwi, core::mem::transmute(pwh), cbwh) } + unsafe { waveInPrepareHeader(hwi, pwh as _, cbwh) } } #[inline] pub unsafe fn waveInReset(hwi: HWAVEIN) -> u32 { @@ -736,7 +736,7 @@ pub unsafe fn waveInStop(hwi: HWAVEIN) -> u32 { #[inline] 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); - unsafe { waveInUnprepareHeader(hwi, core::mem::transmute(pwh), cbwh) } + unsafe { waveInUnprepareHeader(hwi, pwh as _, cbwh) } } #[inline] pub unsafe fn waveOutBreakLoop(hwo: HWAVEOUT) -> u32 { @@ -751,12 +751,12 @@ pub unsafe fn waveOutClose(hwo: HWAVEOUT) -> u32 { #[inline] pub unsafe fn waveOutGetDevCapsA(udeviceid: usize, pwoc: *mut WAVEOUTCAPSA, cbwoc: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveOutGetDevCapsA(udeviceid : usize, pwoc : *mut WAVEOUTCAPSA, cbwoc : u32) -> u32); - unsafe { waveOutGetDevCapsA(udeviceid, core::mem::transmute(pwoc), cbwoc) } + unsafe { waveOutGetDevCapsA(udeviceid, pwoc as _, cbwoc) } } #[inline] pub unsafe fn waveOutGetDevCapsW(udeviceid: usize, pwoc: *mut WAVEOUTCAPSW, cbwoc: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveOutGetDevCapsW(udeviceid : usize, pwoc : *mut WAVEOUTCAPSW, cbwoc : u32) -> u32); - unsafe { waveOutGetDevCapsW(udeviceid, core::mem::transmute(pwoc), cbwoc) } + unsafe { waveOutGetDevCapsW(udeviceid, pwoc as _, cbwoc) } } #[inline] pub unsafe fn waveOutGetErrorTextA(mmrerror: u32, psztext: &mut [u8]) -> u32 { @@ -771,7 +771,7 @@ pub unsafe fn waveOutGetErrorTextW(mmrerror: u32, psztext: &mut [u16]) -> u32 { #[inline] pub unsafe fn waveOutGetID(hwo: HWAVEOUT, pudeviceid: *mut u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveOutGetID(hwo : HWAVEOUT, pudeviceid : *mut u32) -> u32); - unsafe { waveOutGetID(hwo, core::mem::transmute(pudeviceid)) } + unsafe { waveOutGetID(hwo, pudeviceid as _) } } #[inline] pub unsafe fn waveOutGetNumDevs() -> u32 { @@ -781,32 +781,32 @@ pub unsafe fn waveOutGetNumDevs() -> u32 { #[inline] pub unsafe fn waveOutGetPitch(hwo: HWAVEOUT, pdwpitch: *mut u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveOutGetPitch(hwo : HWAVEOUT, pdwpitch : *mut u32) -> u32); - unsafe { waveOutGetPitch(hwo, core::mem::transmute(pdwpitch)) } + unsafe { waveOutGetPitch(hwo, pdwpitch as _) } } #[inline] pub unsafe fn waveOutGetPlaybackRate(hwo: HWAVEOUT, pdwrate: *mut u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveOutGetPlaybackRate(hwo : HWAVEOUT, pdwrate : *mut u32) -> u32); - unsafe { waveOutGetPlaybackRate(hwo, core::mem::transmute(pdwrate)) } + unsafe { waveOutGetPlaybackRate(hwo, pdwrate as _) } } #[inline] 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); - unsafe { waveOutGetPosition(hwo, core::mem::transmute(pmmt), cbmmt) } + unsafe { waveOutGetPosition(hwo, pmmt as _, cbmmt) } } #[inline] pub unsafe fn waveOutGetVolume(hwo: Option, pdwvolume: *mut u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveOutGetVolume(hwo : HWAVEOUT, pdwvolume : *mut u32) -> u32); - unsafe { waveOutGetVolume(core::mem::transmute(hwo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwvolume)) } + unsafe { waveOutGetVolume(hwo.unwrap_or(core::mem::zeroed()) as _, pdwvolume as _) } } #[inline] 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); - unsafe { waveOutMessage(core::mem::transmute(hwo.unwrap_or(core::mem::zeroed())), umsg, dw1, dw2) } + unsafe { waveOutMessage(hwo.unwrap_or(core::mem::zeroed()) as _, umsg, dw1, dw2) } } #[inline] 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); - unsafe { waveOutOpen(core::mem::transmute(phwo.unwrap_or(core::mem::zeroed())), udeviceid, pwfx, core::mem::transmute(dwcallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwinstance.unwrap_or(core::mem::zeroed())), fdwopen) } + unsafe { waveOutOpen(phwo.unwrap_or(core::mem::zeroed()) as _, udeviceid, pwfx, dwcallback.unwrap_or(core::mem::zeroed()) as _, dwinstance.unwrap_or(core::mem::zeroed()) as _, fdwopen) } } #[inline] pub unsafe fn waveOutPause(hwo: HWAVEOUT) -> u32 { @@ -816,7 +816,7 @@ pub unsafe fn waveOutPause(hwo: HWAVEOUT) -> u32 { #[inline] 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); - unsafe { waveOutPrepareHeader(hwo, core::mem::transmute(pwh), cbwh) } + unsafe { waveOutPrepareHeader(hwo, pwh as _, cbwh) } } #[inline] pub unsafe fn waveOutReset(hwo: HWAVEOUT) -> u32 { @@ -841,17 +841,17 @@ pub unsafe fn waveOutSetPlaybackRate(hwo: HWAVEOUT, dwrate: u32) -> u32 { #[inline] pub unsafe fn waveOutSetVolume(hwo: Option, dwvolume: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveOutSetVolume(hwo : HWAVEOUT, dwvolume : u32) -> u32); - unsafe { waveOutSetVolume(core::mem::transmute(hwo.unwrap_or(core::mem::zeroed())), dwvolume) } + unsafe { waveOutSetVolume(hwo.unwrap_or(core::mem::zeroed()) as _, dwvolume) } } #[inline] 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); - unsafe { waveOutUnprepareHeader(hwo, core::mem::transmute(pwh), cbwh) } + unsafe { waveOutUnprepareHeader(hwo, pwh as _, cbwh) } } #[inline] 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); - unsafe { waveOutWrite(hwo, core::mem::transmute(pwh), cbwh) } + unsafe { waveOutWrite(hwo, pwh as _, cbwh) } } pub const ACMDM_DRIVER_ABOUT: u32 = 24587u32; pub const ACMDM_DRIVER_DETAILS: u32 = 24586u32; @@ -2262,7 +2262,7 @@ windows_core::imp::define_interface!(IActivateAudioInterfaceAsyncOperation, IAct windows_core::imp::interface_hierarchy!(IActivateAudioInterfaceAsyncOperation, windows_core::IUnknown); impl IActivateAudioInterfaceAsyncOperation { pub unsafe fn GetActivateResult(&self, activateresult: *mut windows_core::HRESULT, activatedinterface: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetActivateResult)(windows_core::Interface::as_raw(self), core::mem::transmute(activateresult), core::mem::transmute(activatedinterface)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetActivateResult)(windows_core::Interface::as_raw(self), activateresult as _, core::mem::transmute(activatedinterface)).ok() } } } #[repr(C)] @@ -2409,7 +2409,7 @@ impl IAudioAutoGainControl { } } pub unsafe fn SetEnabled(&self, benable: bool, pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), benable.into(), core::mem::transmute(pguideventcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), benable.into(), pguideventcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -2479,7 +2479,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), ppdata as _, pnumframestoread as _, pdwflags as _, pu64deviceposition.unwrap_or(core::mem::zeroed()) as _, pu64qpcposition.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReleaseBuffer(&self, numframesread: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ReleaseBuffer)(windows_core::Interface::as_raw(self), numframesread).ok() } @@ -2545,7 +2545,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<()> { - unsafe { (windows_core::Interface::vtable(self).SetChannelConfig)(windows_core::Interface::as_raw(self), dwconfig, core::mem::transmute(pguideventcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetChannelConfig)(windows_core::Interface::as_raw(self), dwconfig, pguideventcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetChannelConfig(&self) -> windows_core::Result { unsafe { @@ -2599,7 +2599,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<()> { - unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), sharemode, streamflags, hnsbufferduration, hnsperiodicity, pformat, core::mem::transmute(audiosessionguid.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), sharemode, streamflags, hnsbufferduration, hnsperiodicity, pformat, audiosessionguid.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetBufferSize(&self) -> windows_core::Result { unsafe { @@ -2620,7 +2620,7 @@ impl IAudioClient { } } pub unsafe fn IsFormatSupported(&self, sharemode: AUDCLNT_SHAREMODE, pformat: *const WAVEFORMATEX, ppclosestmatch: Option<*mut *mut WAVEFORMATEX>) -> windows_core::HRESULT { - unsafe { (windows_core::Interface::vtable(self).IsFormatSupported)(windows_core::Interface::as_raw(self), sharemode, pformat, core::mem::transmute(ppclosestmatch.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).IsFormatSupported)(windows_core::Interface::as_raw(self), sharemode, pformat, ppclosestmatch.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn GetMixFormat(&self) -> windows_core::Result<*mut WAVEFORMATEX> { unsafe { @@ -2629,7 +2629,7 @@ impl IAudioClient { } } pub unsafe fn GetDevicePeriod(&self, phnsdefaultdeviceperiod: Option<*mut i64>, phnsminimumdeviceperiod: Option<*mut i64>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetDevicePeriod)(windows_core::Interface::as_raw(self), phnsdefaultdeviceperiod.unwrap_or(core::mem::zeroed()) as _, phnsminimumdeviceperiod.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Start(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Start)(windows_core::Interface::as_raw(self)).ok() } @@ -2819,7 +2819,7 @@ impl IAudioClient2 { unsafe { (windows_core::Interface::vtable(self).SetClientProperties)(windows_core::Interface::as_raw(self), pproperties).ok() } } pub unsafe fn GetBufferSizeLimits(&self, pformat: *const WAVEFORMATEX, beventdriven: bool, phnsminbufferduration: *mut i64, phnsmaxbufferduration: *mut i64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBufferSizeLimits)(windows_core::Interface::as_raw(self), pformat, beventdriven.into(), core::mem::transmute(phnsminbufferduration), core::mem::transmute(phnsmaxbufferduration)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBufferSizeLimits)(windows_core::Interface::as_raw(self), pformat, beventdriven.into(), phnsminbufferduration as _, phnsmaxbufferduration as _).ok() } } } #[repr(C)] @@ -2882,13 +2882,13 @@ impl core::ops::Deref for IAudioClient3 { windows_core::imp::interface_hierarchy!(IAudioClient3, windows_core::IUnknown, IAudioClient, IAudioClient2); impl IAudioClient3 { pub unsafe fn GetSharedModeEnginePeriod(&self, pformat: *const WAVEFORMATEX, pdefaultperiodinframes: *mut u32, pfundamentalperiodinframes: *mut u32, pminperiodinframes: *mut u32, pmaxperiodinframes: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSharedModeEnginePeriod)(windows_core::Interface::as_raw(self), pformat, core::mem::transmute(pdefaultperiodinframes), core::mem::transmute(pfundamentalperiodinframes), core::mem::transmute(pminperiodinframes), core::mem::transmute(pmaxperiodinframes)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSharedModeEnginePeriod)(windows_core::Interface::as_raw(self), pformat, pdefaultperiodinframes as _, pfundamentalperiodinframes as _, pminperiodinframes as _, pmaxperiodinframes as _).ok() } } pub unsafe fn GetCurrentSharedModeEnginePeriod(&self, ppformat: *mut *mut WAVEFORMATEX, pcurrentperiodinframes: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrentSharedModeEnginePeriod)(windows_core::Interface::as_raw(self), core::mem::transmute(ppformat), core::mem::transmute(pcurrentperiodinframes)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentSharedModeEnginePeriod)(windows_core::Interface::as_raw(self), ppformat as _, pcurrentperiodinframes as _).ok() } } pub unsafe fn InitializeSharedAudioStream(&self, streamflags: u32, periodinframes: u32, pformat: *const WAVEFORMATEX, audiosessionguid: Option<*const windows_core::GUID>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).InitializeSharedAudioStream)(windows_core::Interface::as_raw(self), streamflags, periodinframes, pformat, core::mem::transmute(audiosessionguid.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).InitializeSharedAudioStream)(windows_core::Interface::as_raw(self), streamflags, periodinframes, pformat, audiosessionguid.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -2978,7 +2978,7 @@ impl IAudioClock { } } pub unsafe fn GetPosition(&self, pu64position: *mut u64, pu64qpcposition: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetPosition)(windows_core::Interface::as_raw(self), pu64position as _, pu64qpcposition.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetCharacteristics(&self) -> windows_core::Result { unsafe { @@ -3047,7 +3047,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetDevicePosition)(windows_core::Interface::as_raw(self), deviceposition as _, qpcposition.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -3149,7 +3149,7 @@ impl IAudioEffectsManager { unsafe { (windows_core::Interface::vtable(self).UnregisterAudioEffectsChangedNotificationCallback)(windows_core::Interface::as_raw(self), client.param().abi()).ok() } } pub unsafe fn GetAudioEffects(&self, effects: *mut *mut AUDIO_EFFECT, numeffects: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAudioEffects)(windows_core::Interface::as_raw(self), core::mem::transmute(effects), core::mem::transmute(numeffects)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAudioEffects)(windows_core::Interface::as_raw(self), effects as _, numeffects as _).ok() } } pub unsafe fn SetAudioEffectState(&self, effectid: windows_core::GUID, state: AUDIO_EFFECT_STATE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetAudioEffectState)(windows_core::Interface::as_raw(self), core::mem::transmute(effectid), state).ok() } @@ -3277,7 +3277,7 @@ impl IAudioInputSelector { } } pub unsafe fn SetSelection(&self, nidselect: u32, pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetSelection)(windows_core::Interface::as_raw(self), nidselect, core::mem::transmute(pguideventcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetSelection)(windows_core::Interface::as_raw(self), nidselect, pguideventcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -3331,7 +3331,7 @@ impl IAudioLoudness { } } pub unsafe fn SetEnabled(&self, benable: bool, pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), benable.into(), core::mem::transmute(pguideventcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), benable.into(), pguideventcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -3401,7 +3401,7 @@ windows_core::imp::define_interface!(IAudioMute, IAudioMute_Vtbl, 0xdf45aeea_b74 windows_core::imp::interface_hierarchy!(IAudioMute, windows_core::IUnknown); impl IAudioMute { pub unsafe fn SetMute(&self, bmuted: bool, pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetMute)(windows_core::Interface::as_raw(self), bmuted.into(), core::mem::transmute(pguideventcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetMute)(windows_core::Interface::as_raw(self), bmuted.into(), pguideventcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetMute(&self) -> windows_core::Result { unsafe { @@ -3457,7 +3457,7 @@ impl IAudioOutputSelector { } } pub unsafe fn SetSelection(&self, nidselect: u32, pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetSelection)(windows_core::Interface::as_raw(self), nidselect, core::mem::transmute(pguideventcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetSelection)(windows_core::Interface::as_raw(self), nidselect, pguideventcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -4089,13 +4089,13 @@ impl IAudioSessionManager { pub unsafe fn GetAudioSessionControl(&self, audiosessionguid: Option<*const windows_core::GUID>, streamflags: u32) -> windows_core::Result { unsafe { 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::mem::zeroed())), streamflags, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetAudioSessionControl)(windows_core::Interface::as_raw(self), audiosessionguid.unwrap_or(core::mem::zeroed()) as _, 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 { unsafe { 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::mem::zeroed())), streamflags, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetSimpleAudioVolume)(windows_core::Interface::as_raw(self), audiosessionguid.unwrap_or(core::mem::zeroed()) as _, streamflags, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } } @@ -4294,7 +4294,7 @@ impl IAudioStateMonitor { pub unsafe fn RegisterCallback(&self, callback: PAudioStateMonitorCallback, context: Option<*const core::ffi::c_void>) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).RegisterCallback)(windows_core::Interface::as_raw(self), callback, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).RegisterCallback)(windows_core::Interface::as_raw(self), callback, context.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| result__) } } pub unsafe fn UnregisterCallback(&self, registration: i64) { @@ -5038,7 +5038,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<()> { - unsafe { (windows_core::Interface::vtable(self).OnNotify)(windows_core::Interface::as_raw(self), dwsenderprocessid, core::mem::transmute(pguideventcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).OnNotify)(windows_core::Interface::as_raw(self), dwsenderprocessid, pguideventcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -5133,13 +5133,13 @@ impl IDeviceSpecificProperty { } } pub unsafe fn GetValue(&self, pvvalue: *mut core::ffi::c_void, pcbvalue: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetValue)(windows_core::Interface::as_raw(self), core::mem::transmute(pvvalue), core::mem::transmute(pcbvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetValue)(windows_core::Interface::as_raw(self), pvvalue as _, pcbvalue as _).ok() } } pub unsafe fn SetValue(&self, pvvalue: *const core::ffi::c_void, cbvalue: u32, pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetValue)(windows_core::Interface::as_raw(self), pvvalue, cbvalue, core::mem::transmute(pguideventcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetValue)(windows_core::Interface::as_raw(self), pvvalue, cbvalue, pguideventcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Get4BRange(&self, plmin: *mut i32, plmax: *mut i32, plstepping: *mut i32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Get4BRange)(windows_core::Interface::as_raw(self), plmin as _, plmax as _, plstepping as _).ok() } } } #[repr(C)] @@ -5382,7 +5382,7 @@ impl IMMDevice { T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - unsafe { (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), &T::IID, dwclsctx, core::mem::transmute(pactivationparams.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } + unsafe { (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), &T::IID, dwclsctx, pactivationparams.unwrap_or(core::mem::zeroed()) as _, &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 { @@ -5492,7 +5492,7 @@ impl IMMDeviceActivator { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), iid, pdevice.param().abi(), core::mem::transmute(pactivationparams.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppinterface)).ok() } + unsafe { (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), iid, pdevice.param().abi(), pactivationparams.unwrap_or(core::mem::zeroed()) as _, ppinterface as _).ok() } } } #[repr(C)] @@ -5840,7 +5840,7 @@ windows_core::imp::interface_hierarchy!(IMessageFilter, windows_core::IUnknown); impl IMessageFilter { #[cfg(feature = "Win32_System_Com")] pub unsafe fn HandleInComingCall(&self, dwcalltype: u32, htaskcaller: super::HTASK, dwtickcount: u32, lpinterfaceinfo: Option<*const super::super::System::Com::INTERFACEINFO>) -> u32 { - unsafe { (windows_core::Interface::vtable(self).HandleInComingCall)(windows_core::Interface::as_raw(self), dwcalltype, htaskcaller, dwtickcount, core::mem::transmute(lpinterfaceinfo.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).HandleInComingCall)(windows_core::Interface::as_raw(self), dwcalltype, htaskcaller, dwtickcount, lpinterfaceinfo.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn RetryRejectedCall(&self, htaskcallee: super::HTASK, dwtickcount: u32, dwrejecttype: u32) -> u32 { unsafe { (windows_core::Interface::vtable(self).RetryRejectedCall)(windows_core::Interface::as_raw(self), htaskcallee, dwtickcount, dwrejecttype) } @@ -5963,7 +5963,7 @@ impl IPart { } } pub unsafe fn Activate(&self, dwclscontext: u32, refiid: *const windows_core::GUID, ppvobject: Option<*mut *mut core::ffi::c_void>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), dwclscontext, refiid, core::mem::transmute(ppvobject.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), dwclscontext, refiid, ppvobject.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn RegisterControlChangeCallback(&self, riid: *const windows_core::GUID, pnotify: P1) -> windows_core::Result<()> where @@ -6241,7 +6241,7 @@ impl IPerChannelDbLevel { } } pub unsafe fn GetLevelRange(&self, nchannel: u32, pfminleveldb: *mut f32, pfmaxleveldb: *mut f32, pfstepping: *mut f32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLevelRange)(windows_core::Interface::as_raw(self), nchannel, core::mem::transmute(pfminleveldb), core::mem::transmute(pfmaxleveldb), core::mem::transmute(pfstepping)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLevelRange)(windows_core::Interface::as_raw(self), nchannel, pfminleveldb as _, pfmaxleveldb as _, pfstepping as _).ok() } } pub unsafe fn GetLevel(&self, nchannel: u32) -> windows_core::Result { unsafe { @@ -6250,13 +6250,13 @@ impl IPerChannelDbLevel { } } pub unsafe fn SetLevel(&self, nchannel: u32, fleveldb: f32, pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetLevel)(windows_core::Interface::as_raw(self), nchannel, fleveldb, core::mem::transmute(pguideventcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetLevel)(windows_core::Interface::as_raw(self), nchannel, fleveldb, pguideventcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetLevelUniform(&self, fleveldb: f32, pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetLevelUniform)(windows_core::Interface::as_raw(self), fleveldb, core::mem::transmute(pguideventcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetLevelUniform)(windows_core::Interface::as_raw(self), fleveldb, pguideventcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetLevelAllChannels(&self, alevelsdb: &[f32], pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).SetLevelAllChannels)(windows_core::Interface::as_raw(self), core::mem::transmute(alevelsdb.as_ptr()), alevelsdb.len().try_into().unwrap(), pguideventcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -6433,7 +6433,7 @@ windows_core::imp::define_interface!(ISpatialAudioClient, ISpatialAudioClient_Vt windows_core::imp::interface_hierarchy!(ISpatialAudioClient, windows_core::IUnknown); impl ISpatialAudioClient { pub unsafe fn GetStaticObjectPosition(&self, r#type: AudioObjectType, x: *mut f32, y: *mut f32, z: *mut f32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStaticObjectPosition)(windows_core::Interface::as_raw(self), r#type, core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(z)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStaticObjectPosition)(windows_core::Interface::as_raw(self), r#type, x as _, y as _, z as _).ok() } } pub unsafe fn GetNativeStaticObjectTypeMask(&self) -> windows_core::Result { unsafe { @@ -6464,7 +6464,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<()> { - unsafe { (windows_core::Interface::vtable(self).IsSpatialAudioStreamAvailable)(windows_core::Interface::as_raw(self), streamuuid, core::mem::transmute(auxiliaryinfo.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).IsSpatialAudioStreamAvailable)(windows_core::Interface::as_raw(self), streamuuid, auxiliaryinfo.unwrap_or(core::mem::zeroed()) as _).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 @@ -6673,7 +6673,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<()> { - unsafe { (windows_core::Interface::vtable(self).ActivateSpatialAudioMetadataItems)(windows_core::Interface::as_raw(self), maxitemcount, framecount, core::mem::transmute(metadataitemsbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(metadataitems)).ok() } + unsafe { (windows_core::Interface::vtable(self).ActivateSpatialAudioMetadataItems)(windows_core::Interface::as_raw(self), maxitemcount, framecount, metadataitemsbuffer.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(metadataitems)).ok() } } pub unsafe fn GetSpatialAudioMetadataItemsBufferLength(&self, maxitemcount: u16) -> windows_core::Result { unsafe { @@ -7051,10 +7051,10 @@ impl ISpatialAudioMetadataReader { unsafe { (windows_core::Interface::vtable(self).Open)(windows_core::Interface::as_raw(self), metadataitems.param().abi()).ok() } } pub unsafe fn ReadNextItem(&self, commandcount: *mut u8, frameoffset: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadNextItem)(windows_core::Interface::as_raw(self), core::mem::transmute(commandcount), core::mem::transmute(frameoffset)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadNextItem)(windows_core::Interface::as_raw(self), commandcount as _, frameoffset as _).ok() } } pub unsafe fn ReadNextItemCommand(&self, commandid: *mut u8, valuebuffer: *mut core::ffi::c_void, maxvaluebufferlength: u32, valuebufferlength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadNextItemCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(commandid), core::mem::transmute(valuebuffer), maxvaluebufferlength, core::mem::transmute(valuebufferlength)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadNextItemCommand)(windows_core::Interface::as_raw(self), commandid as _, valuebuffer as _, maxvaluebufferlength, valuebufferlength as _).ok() } } pub unsafe fn Close(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() } @@ -7126,7 +7126,7 @@ impl ISpatialAudioMetadataWriter { unsafe { (windows_core::Interface::vtable(self).WriteNextItem)(windows_core::Interface::as_raw(self), frameoffset).ok() } } pub unsafe fn WriteNextItemCommand(&self, commandid: u8, valuebuffer: Option<*const core::ffi::c_void>, valuebufferlength: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).WriteNextItemCommand)(windows_core::Interface::as_raw(self), commandid, core::mem::transmute(valuebuffer.unwrap_or(core::mem::zeroed())), valuebufferlength).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteNextItemCommand)(windows_core::Interface::as_raw(self), commandid, valuebuffer.unwrap_or(core::mem::zeroed()) as _, valuebufferlength).ok() } } pub unsafe fn Close(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() } @@ -7240,7 +7240,7 @@ windows_core::imp::define_interface!(ISpatialAudioObjectBase, ISpatialAudioObjec windows_core::imp::interface_hierarchy!(ISpatialAudioObjectBase, windows_core::IUnknown); impl ISpatialAudioObjectBase { pub unsafe fn GetBuffer(&self, buffer: *mut *mut u8, bufferlength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer), core::mem::transmute(bufferlength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), buffer as _, bufferlength as _).ok() } } pub unsafe fn SetEndOfStream(&self, framecount: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetEndOfStream)(windows_core::Interface::as_raw(self), framecount).ok() } @@ -7432,7 +7432,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<()> { - unsafe { (windows_core::Interface::vtable(self).WriteNextMetadataCommand)(windows_core::Interface::as_raw(self), commandid, core::mem::transmute(valuebuffer.unwrap_or(core::mem::zeroed())), valuebufferlength).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteNextMetadataCommand)(windows_core::Interface::as_raw(self), commandid, valuebuffer.unwrap_or(core::mem::zeroed()) as _, valuebufferlength).ok() } } } #[repr(C)] @@ -7577,7 +7577,7 @@ impl ISpatialAudioObjectRenderStreamBase { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn BeginUpdatingAudioObjects(&self, availabledynamicobjectcount: *mut u32, framecountperbuffer: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).BeginUpdatingAudioObjects)(windows_core::Interface::as_raw(self), core::mem::transmute(availabledynamicobjectcount), core::mem::transmute(framecountperbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).BeginUpdatingAudioObjects)(windows_core::Interface::as_raw(self), availabledynamicobjectcount as _, framecountperbuffer as _).ok() } } pub unsafe fn EndUpdatingAudioObjects(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).EndUpdatingAudioObjects)(windows_core::Interface::as_raw(self)).ok() } 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 2e45d4c956..55b22b8b35 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/DeviceManager/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/DeviceManager/mod.rs @@ -8,10 +8,10 @@ windows_core::imp::define_interface!(IComponentAuthenticate, IComponentAuthentic windows_core::imp::interface_hierarchy!(IComponentAuthenticate, windows_core::IUnknown); impl IComponentAuthenticate { pub unsafe fn SACAuth(&self, dwprotocolid: u32, dwpass: u32, pbdatain: &[u8], ppbdataout: *mut *mut u8, pdwdataoutlen: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SACAuth)(windows_core::Interface::as_raw(self), dwprotocolid, dwpass, core::mem::transmute(pbdatain.as_ptr()), pbdatain.len().try_into().unwrap(), core::mem::transmute(ppbdataout), core::mem::transmute(pdwdataoutlen)).ok() } + unsafe { (windows_core::Interface::vtable(self).SACAuth)(windows_core::Interface::as_raw(self), dwprotocolid, dwpass, core::mem::transmute(pbdatain.as_ptr()), pbdatain.len().try_into().unwrap(), ppbdataout as _, pdwdataoutlen as _).ok() } } pub unsafe fn SACGetProtocols(&self, ppdwprotocols: *mut *mut u32, pdwprotocolcount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SACGetProtocols)(windows_core::Interface::as_raw(self), core::mem::transmute(ppdwprotocols), core::mem::transmute(pdwprotocolcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).SACGetProtocols)(windows_core::Interface::as_raw(self), ppdwprotocols as _, pdwprotocolcount as _).ok() } } } #[repr(C)] @@ -71,10 +71,10 @@ impl IMDSPDevice { } } pub unsafe fn GetSerialNumber(&self, pserialnumber: *mut WMDMID, abmac: &mut [u8; 8]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSerialNumber)(windows_core::Interface::as_raw(self), core::mem::transmute(pserialnumber), core::mem::transmute(abmac.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSerialNumber)(windows_core::Interface::as_raw(self), pserialnumber as _, core::mem::transmute(abmac.as_ptr())).ok() } } pub unsafe fn GetPowerSource(&self, pdwpowersource: *mut u32, pdwpercentremaining: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPowerSource)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwpowersource), core::mem::transmute(pdwpercentremaining)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPowerSource)(windows_core::Interface::as_raw(self), pdwpowersource as _, pdwpercentremaining as _).ok() } } pub unsafe fn GetStatus(&self) -> windows_core::Result { unsafe { @@ -96,10 +96,10 @@ impl IMDSPDevice { } #[cfg(feature = "Win32_Media_Audio")] pub unsafe fn GetFormatSupport(&self, pformatex: *mut *mut super::Audio::WAVEFORMATEX, pnformatcount: *mut u32, pppwszmimetype: *mut *mut windows_core::PWSTR, pnmimetypecount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFormatSupport)(windows_core::Interface::as_raw(self), core::mem::transmute(pformatex), core::mem::transmute(pnformatcount), core::mem::transmute(pppwszmimetype), core::mem::transmute(pnmimetypecount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFormatSupport)(windows_core::Interface::as_raw(self), pformatex as _, pnformatcount as _, pppwszmimetype as _, pnmimetypecount as _).ok() } } pub unsafe fn SendOpaqueCommand(&self, pcommand: *mut OPAQUECOMMAND) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SendOpaqueCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(pcommand)).ok() } + unsafe { (windows_core::Interface::vtable(self).SendOpaqueCommand)(windows_core::Interface::as_raw(self), pcommand as _).ok() } } } #[repr(C)] @@ -274,11 +274,11 @@ impl IMDSPDevice2 { } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Media_Audio", feature = "Win32_Media_MediaFoundation"))] pub unsafe fn GetFormatSupport2(&self, dwflags: u32, ppaudioformatex: *mut *mut super::Audio::WAVEFORMATEX, pnaudioformatcount: *mut u32, ppvideoformatex: *mut *mut super::MediaFoundation::VIDEOINFOHEADER, pnvideoformatcount: *mut u32, ppfiletype: *mut *mut WMFILECAPABILITIES, pnfiletypecount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFormatSupport2)(windows_core::Interface::as_raw(self), dwflags, core::mem::transmute(ppaudioformatex), core::mem::transmute(pnaudioformatcount), core::mem::transmute(ppvideoformatex), core::mem::transmute(pnvideoformatcount), core::mem::transmute(ppfiletype), core::mem::transmute(pnfiletypecount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFormatSupport2)(windows_core::Interface::as_raw(self), dwflags, ppaudioformatex as _, pnaudioformatcount as _, ppvideoformatex as _, pnvideoformatcount as _, ppfiletype as _, pnfiletypecount as _).ok() } } #[cfg(feature = "Win32_System_Ole")] pub unsafe fn GetSpecifyPropertyPages(&self, ppspecifyproppages: *mut Option, pppunknowns: *mut *mut Option, pcunks: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSpecifyPropertyPages)(windows_core::Interface::as_raw(self), core::mem::transmute(ppspecifyproppages), core::mem::transmute(pppunknowns), core::mem::transmute(pcunks)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSpecifyPropertyPages)(windows_core::Interface::as_raw(self), core::mem::transmute(ppspecifyproppages), pppunknowns as _, pcunks as _).ok() } } pub unsafe fn GetCanonicalName(&self, pwszpnpname: &mut [u16]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetCanonicalName)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszpnpname.as_ptr()), pwszpnpname.len().try_into().unwrap()).ok() } @@ -386,7 +386,7 @@ impl IMDSPDevice3 { } } pub unsafe fn DeviceIoControl(&self, dwiocontrolcode: u32, lpinbuffer: &[u8], lpoutbuffer: *mut u8, pnoutbuffersize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DeviceIoControl)(windows_core::Interface::as_raw(self), dwiocontrolcode, core::mem::transmute(lpinbuffer.as_ptr()), lpinbuffer.len().try_into().unwrap(), core::mem::transmute(lpoutbuffer), core::mem::transmute(pnoutbuffersize)).ok() } + unsafe { (windows_core::Interface::vtable(self).DeviceIoControl)(windows_core::Interface::as_raw(self), dwiocontrolcode, core::mem::transmute(lpinbuffer.as_ptr()), lpinbuffer.len().try_into().unwrap(), lpoutbuffer as _, pnoutbuffersize as _).ok() } } pub unsafe fn FindStorage(&self, findscope: WMDM_FIND_SCOPE, pwszuniqueid: P1) -> windows_core::Result where @@ -682,7 +682,7 @@ windows_core::imp::define_interface!(IMDSPEnumDevice, IMDSPEnumDevice_Vtbl, 0x1d windows_core::imp::interface_hierarchy!(IMDSPEnumDevice, windows_core::IUnknown); impl IMDSPEnumDevice { pub unsafe fn Next(&self, ppdevice: &mut [Option], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppdevice.len().try_into().unwrap(), core::mem::transmute(ppdevice.as_ptr()), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppdevice.len().try_into().unwrap(), core::mem::transmute(ppdevice.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result { unsafe { @@ -769,7 +769,7 @@ windows_core::imp::define_interface!(IMDSPEnumStorage, IMDSPEnumStorage_Vtbl, 0x windows_core::imp::interface_hierarchy!(IMDSPEnumStorage, windows_core::IUnknown); impl IMDSPEnumStorage { pub unsafe fn Next(&self, ppstorage: &mut [Option], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppstorage.len().try_into().unwrap(), core::mem::transmute(ppstorage.as_ptr()), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppstorage.len().try_into().unwrap(), core::mem::transmute(ppstorage.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result { unsafe { @@ -859,10 +859,10 @@ impl IMDSPObject { unsafe { (windows_core::Interface::vtable(self).Open)(windows_core::Interface::as_raw(self), fumode).ok() } } pub unsafe fn Read(&self, pdata: *mut u8, pdwsize: *mut u32, abmac: &mut [u8; 8]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata), core::mem::transmute(pdwsize), core::mem::transmute(abmac.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), pdata as _, pdwsize as _, core::mem::transmute(abmac.as_ptr())).ok() } } pub unsafe fn Write(&self, pdata: *const u8, pdwsize: *mut u32, abmac: &mut [u8; 8]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Write)(windows_core::Interface::as_raw(self), pdata, core::mem::transmute(pdwsize), core::mem::transmute(abmac.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).Write)(windows_core::Interface::as_raw(self), pdata, pdwsize as _, core::mem::transmute(abmac.as_ptr())).ok() } } pub unsafe fn Delete(&self, fumode: u32, pprogress: P1) -> windows_core::Result<()> where @@ -990,10 +990,10 @@ impl core::ops::Deref for IMDSPObject2 { windows_core::imp::interface_hierarchy!(IMDSPObject2, windows_core::IUnknown, IMDSPObject); impl IMDSPObject2 { pub unsafe fn ReadOnClearChannel(&self, pdata: *mut u8, pdwsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadOnClearChannel)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata), core::mem::transmute(pdwsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadOnClearChannel)(windows_core::Interface::as_raw(self), pdata as _, pdwsize as _).ok() } } pub unsafe fn WriteOnClearChannel(&self, pdata: *const u8, pdwsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).WriteOnClearChannel)(windows_core::Interface::as_raw(self), pdata, core::mem::transmute(pdwsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteOnClearChannel)(windows_core::Interface::as_raw(self), pdata, pdwsize as _).ok() } } } #[repr(C)] @@ -1185,7 +1185,7 @@ windows_core::imp::define_interface!(IMDSPRevoked, IMDSPRevoked_Vtbl, 0xa4e8f2d4 windows_core::imp::interface_hierarchy!(IMDSPRevoked, windows_core::IUnknown); impl IMDSPRevoked { pub unsafe fn GetRevocationURL(&self, ppwszrevocationurl: *mut windows_core::PWSTR, pdwbufferlen: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRevocationURL)(windows_core::Interface::as_raw(self), core::mem::transmute(ppwszrevocationurl), core::mem::transmute(pdwbufferlen)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRevocationURL)(windows_core::Interface::as_raw(self), ppwszrevocationurl as _, pdwbufferlen as _).ok() } } } #[repr(C)] @@ -1216,7 +1216,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<()> { - unsafe { (windows_core::Interface::vtable(self).SetAttributes)(windows_core::Interface::as_raw(self), dwattributes, core::mem::transmute(pformat.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetAttributes)(windows_core::Interface::as_raw(self), dwattributes, pformat.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetStorageGlobals(&self) -> windows_core::Result { unsafe { @@ -1226,7 +1226,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetAttributes)(windows_core::Interface::as_raw(self), pdwattributes as _, pformat.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetName(&self, pwszname: &mut [u16]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetName)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszname.as_ptr()), pwszname.len().try_into().unwrap()).ok() } @@ -1238,10 +1238,10 @@ impl IMDSPStorage { } } pub unsafe fn GetSize(&self, pdwsizelow: *mut u32, pdwsizehigh: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwsizelow), core::mem::transmute(pdwsizehigh)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSize)(windows_core::Interface::as_raw(self), pdwsizelow as _, pdwsizehigh as _).ok() } } pub unsafe fn GetRights(&self, pprights: *mut *mut WMDMRIGHTS, pnrightscount: *mut u32, abmac: &mut [u8; 8]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRights)(windows_core::Interface::as_raw(self), core::mem::transmute(pprights), core::mem::transmute(pnrightscount), core::mem::transmute(abmac.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRights)(windows_core::Interface::as_raw(self), pprights as _, pnrightscount as _, core::mem::transmute(abmac.as_ptr())).ok() } } #[cfg(feature = "Win32_Media_Audio")] pub unsafe fn CreateStorage(&self, dwattributes: u32, pformat: Option<*const super::Audio::WAVEFORMATEX>, pwszname: P2) -> windows_core::Result @@ -1250,7 +1250,7 @@ impl IMDSPStorage { { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateStorage)(windows_core::Interface::as_raw(self), dwattributes, core::mem::transmute(pformat.unwrap_or(core::mem::zeroed())), pwszname.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateStorage)(windows_core::Interface::as_raw(self), dwattributes, pformat.unwrap_or(core::mem::zeroed()) as _, pwszname.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn EnumStorage(&self) -> windows_core::Result { @@ -1260,7 +1260,7 @@ impl IMDSPStorage { } } pub unsafe fn SendOpaqueCommand(&self, pcommand: *mut OPAQUECOMMAND) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SendOpaqueCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(pcommand)).ok() } + unsafe { (windows_core::Interface::vtable(self).SendOpaqueCommand)(windows_core::Interface::as_raw(self), pcommand as _).ok() } } } #[repr(C)] @@ -1431,16 +1431,16 @@ impl IMDSPStorage2 { { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateStorage2)(windows_core::Interface::as_raw(self), dwattributes, dwattributesex, core::mem::transmute(paudioformat.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvideoformat.unwrap_or(core::mem::zeroed())), pwszname.param().abi(), qwfilesize, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateStorage2)(windows_core::Interface::as_raw(self), dwattributes, dwattributesex, paudioformat.unwrap_or(core::mem::zeroed()) as _, pvideoformat.unwrap_or(core::mem::zeroed()) as _, pwszname.param().abi(), qwfilesize, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Media_Audio", feature = "Win32_Media_MediaFoundation"))] pub unsafe fn SetAttributes2(&self, dwattributes: u32, dwattributesex: u32, paudioformat: Option<*const super::Audio::WAVEFORMATEX>, pvideoformat: Option<*const super::MediaFoundation::VIDEOINFOHEADER>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetAttributes2)(windows_core::Interface::as_raw(self), dwattributes, dwattributesex, core::mem::transmute(paudioformat.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvideoformat.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetAttributes2)(windows_core::Interface::as_raw(self), dwattributes, dwattributesex, paudioformat.unwrap_or(core::mem::zeroed()) as _, pvideoformat.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetAttributes2)(windows_core::Interface::as_raw(self), pdwattributes as _, pdwattributesex as _, paudioformat.unwrap_or(core::mem::zeroed()) as _, pvideoformat.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -1593,7 +1593,7 @@ impl IMDSPStorage4 { unsafe { (windows_core::Interface::vtable(self).SetReferences)(windows_core::Interface::as_raw(self), ppispstorage.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppispstorage.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() } } pub unsafe fn GetReferences(&self, pdwrefs: *mut u32, pppispstorage: *mut *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetReferences)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwrefs), core::mem::transmute(pppispstorage)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetReferences)(windows_core::Interface::as_raw(self), pdwrefs as _, pppispstorage as _).ok() } } pub unsafe fn CreateStorageWithMetadata(&self, dwattributes: u32, pwszname: P1, pmetadata: P2, qwfilesize: u64) -> windows_core::Result where @@ -1729,16 +1729,16 @@ impl IMDSPStorageGlobals { } } pub unsafe fn GetSerialNumber(&self, pserialnum: *mut WMDMID, abmac: &mut [u8; 8]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSerialNumber)(windows_core::Interface::as_raw(self), core::mem::transmute(pserialnum), core::mem::transmute(abmac.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSerialNumber)(windows_core::Interface::as_raw(self), pserialnum as _, core::mem::transmute(abmac.as_ptr())).ok() } } pub unsafe fn GetTotalSize(&self, pdwtotalsizelow: *mut u32, pdwtotalsizehigh: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTotalSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwtotalsizelow), core::mem::transmute(pdwtotalsizehigh)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTotalSize)(windows_core::Interface::as_raw(self), pdwtotalsizelow as _, pdwtotalsizehigh as _).ok() } } pub unsafe fn GetTotalFree(&self, pdwfreelow: *mut u32, pdwfreehigh: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTotalFree)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwfreelow), core::mem::transmute(pdwfreehigh)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTotalFree)(windows_core::Interface::as_raw(self), pdwfreelow as _, pdwfreehigh as _).ok() } } pub unsafe fn GetTotalBad(&self, pdwbadlow: *mut u32, pdwbadhigh: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTotalBad)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwbadlow), core::mem::transmute(pdwbadhigh)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTotalBad)(windows_core::Interface::as_raw(self), pdwbadlow as _, pdwbadhigh as _).ok() } } pub unsafe fn GetStatus(&self) -> windows_core::Result { unsafe { @@ -1963,7 +1963,7 @@ impl IMDServiceProvider2 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateDevice)(windows_core::Interface::as_raw(self), pwszdevicepath.param().abi(), core::mem::transmute(pdwcount), core::mem::transmute(pppdevicearray)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateDevice)(windows_core::Interface::as_raw(self), pwszdevicepath.param().abi(), pdwcount as _, pppdevicearray as _).ok() } } } #[repr(C)] @@ -2114,10 +2114,10 @@ windows_core::imp::define_interface!(ISCPSecureExchange, ISCPSecureExchange_Vtbl windows_core::imp::interface_hierarchy!(ISCPSecureExchange, windows_core::IUnknown); impl ISCPSecureExchange { pub unsafe fn TransferContainerData(&self, pdata: &[u8], pfureadyflags: *mut u32, abmac: &mut [u8; 8]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TransferContainerData)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap(), core::mem::transmute(pfureadyflags), core::mem::transmute(abmac.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).TransferContainerData)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap(), pfureadyflags as _, core::mem::transmute(abmac.as_ptr())).ok() } } pub unsafe fn ObjectData(&self, pdata: *mut u8, pdwsize: *mut u32, abmac: &mut [u8; 8]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ObjectData)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata), core::mem::transmute(pdwsize), core::mem::transmute(abmac.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).ObjectData)(windows_core::Interface::as_raw(self), pdata as _, pdwsize as _, core::mem::transmute(abmac.as_ptr())).ok() } } pub unsafe fn TransferComplete(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).TransferComplete)(windows_core::Interface::as_raw(self)).ok() } @@ -2180,7 +2180,7 @@ impl ISCPSecureExchange2 { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).TransferContainerData2)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap(), pprogresscallback.param().abi(), core::mem::transmute(pfureadyflags), core::mem::transmute(abmac.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).TransferContainerData2)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap(), pprogresscallback.param().abi(), pfureadyflags as _, core::mem::transmute(abmac.as_ptr())).ok() } } } #[repr(C)] @@ -2229,7 +2229,7 @@ impl ISCPSecureExchange3 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetObjectDataOnClearChannel)(windows_core::Interface::as_raw(self), pdevice.param().abi(), core::mem::transmute(pdata), core::mem::transmute(pdwsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetObjectDataOnClearChannel)(windows_core::Interface::as_raw(self), pdevice.param().abi(), pdata as _, pdwsize as _).ok() } } pub unsafe fn TransferCompleteForDevice(&self, pdevice: P0) -> windows_core::Result<()> where @@ -2292,7 +2292,7 @@ windows_core::imp::define_interface!(ISCPSecureQuery, ISCPSecureQuery_Vtbl, 0x1d windows_core::imp::interface_hierarchy!(ISCPSecureQuery, windows_core::IUnknown); impl ISCPSecureQuery { pub unsafe fn GetDataDemands(&self, pfuflags: *mut u32, pdwminrightsdata: *mut u32, pdwminexaminedata: *mut u32, pdwmindecidedata: *mut u32, abmac: &mut [u8; 8]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDataDemands)(windows_core::Interface::as_raw(self), core::mem::transmute(pfuflags), core::mem::transmute(pdwminrightsdata), core::mem::transmute(pdwminexaminedata), core::mem::transmute(pdwmindecidedata), core::mem::transmute(abmac.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDataDemands)(windows_core::Interface::as_raw(self), pfuflags as _, pdwminrightsdata as _, pdwminexaminedata as _, pdwmindecidedata as _, core::mem::transmute(abmac.as_ptr())).ok() } } pub unsafe fn ExamineData(&self, fuflags: u32, pwszextension: P1, pdata: &[u8], abmac: &mut [u8; 8]) -> windows_core::Result<()> where @@ -2310,7 +2310,7 @@ impl ISCPSecureQuery { where P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetRights)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap(), core::mem::transmute(pbspsessionkey.as_ptr()), pbspsessionkey.len().try_into().unwrap(), pstgglobals.param().abi(), core::mem::transmute(pprights), core::mem::transmute(pnrightscount), core::mem::transmute(abmac.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRights)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap(), core::mem::transmute(pbspsessionkey.as_ptr()), pbspsessionkey.len().try_into().unwrap(), pstgglobals.param().abi(), pprights as _, pnrightscount as _, core::mem::transmute(abmac.as_ptr())).ok() } } } #[repr(C)] @@ -2394,10 +2394,10 @@ impl ISCPSecureQuery2 { pappcertapp.len().try_into().unwrap(), core::mem::transmute(pappcertsp.as_ptr()), pappcertsp.len().try_into().unwrap(), - core::mem::transmute(pszrevocationurl), - core::mem::transmute(pdwrevocationurllen), - core::mem::transmute(pdwrevocationbitflag), - core::mem::transmute(pqwfilesize.unwrap_or(core::mem::zeroed())), + pszrevocationurl as _, + pdwrevocationurllen as _, + pdwrevocationbitflag as _, + pqwfilesize.unwrap_or(core::mem::zeroed()) as _, punknown.param().abi(), core::mem::transmute(ppexchange), core::mem::transmute(abmac.as_ptr()), @@ -2464,7 +2464,7 @@ impl ISCPSecureQuery3 { P4: windows_core::Param, P5: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetRightsOnClearChannel)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap(), core::mem::transmute(pbspsessionkey.as_ptr()), pbspsessionkey.len().try_into().unwrap(), pstgglobals.param().abi(), pprogresscallback.param().abi(), core::mem::transmute(pprights), core::mem::transmute(pnrightscount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRightsOnClearChannel)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap(), core::mem::transmute(pbspsessionkey.as_ptr()), pbspsessionkey.len().try_into().unwrap(), pstgglobals.param().abi(), pprogresscallback.param().abi(), pprights as _, pnrightscount as _).ok() } } pub unsafe fn MakeDecisionOnClearChannel(&self, fuflags: u32, pdata: &[u8], dwappsec: u32, pbspsessionkey: &[u8], pstorageglobals: P6, pprogresscallback: P7, pappcertapp: &[u8], pappcertsp: &[u8], pszrevocationurl: *mut windows_core::PWSTR, pdwrevocationurllen: *mut u32, pdwrevocationbitflag: *mut u32, pqwfilesize: Option<*mut u64>, punknown: P16, ppexchange: *mut Option) -> windows_core::Result<()> where @@ -2487,10 +2487,10 @@ impl ISCPSecureQuery3 { pappcertapp.len().try_into().unwrap(), core::mem::transmute(pappcertsp.as_ptr()), pappcertsp.len().try_into().unwrap(), - core::mem::transmute(pszrevocationurl), - core::mem::transmute(pdwrevocationurllen), - core::mem::transmute(pdwrevocationbitflag), - core::mem::transmute(pqwfilesize.unwrap_or(core::mem::zeroed())), + pszrevocationurl as _, + pdwrevocationurllen as _, + pdwrevocationbitflag as _, + pqwfilesize.unwrap_or(core::mem::zeroed()) as _, punknown.param().abi(), core::mem::transmute(ppexchange), ) @@ -2645,10 +2645,10 @@ impl IWMDMDevice { } } pub unsafe fn GetSerialNumber(&self, pserialnumber: *mut WMDMID, abmac: &mut [u8; 8]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSerialNumber)(windows_core::Interface::as_raw(self), core::mem::transmute(pserialnumber), core::mem::transmute(abmac.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSerialNumber)(windows_core::Interface::as_raw(self), pserialnumber as _, core::mem::transmute(abmac.as_ptr())).ok() } } pub unsafe fn GetPowerSource(&self, pdwpowersource: *mut u32, pdwpercentremaining: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPowerSource)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwpowersource), core::mem::transmute(pdwpercentremaining)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPowerSource)(windows_core::Interface::as_raw(self), pdwpowersource as _, pdwpercentremaining as _).ok() } } pub unsafe fn GetStatus(&self) -> windows_core::Result { unsafe { @@ -2670,10 +2670,10 @@ impl IWMDMDevice { } #[cfg(feature = "Win32_Media_Audio")] pub unsafe fn GetFormatSupport(&self, ppformatex: *mut *mut super::Audio::WAVEFORMATEX, pnformatcount: *mut u32, pppwszmimetype: *mut *mut windows_core::PWSTR, pnmimetypecount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFormatSupport)(windows_core::Interface::as_raw(self), core::mem::transmute(ppformatex), core::mem::transmute(pnformatcount), core::mem::transmute(pppwszmimetype), core::mem::transmute(pnmimetypecount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFormatSupport)(windows_core::Interface::as_raw(self), ppformatex as _, pnformatcount as _, pppwszmimetype as _, pnmimetypecount as _).ok() } } pub unsafe fn SendOpaqueCommand(&self, pcommand: *mut OPAQUECOMMAND) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SendOpaqueCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(pcommand)).ok() } + unsafe { (windows_core::Interface::vtable(self).SendOpaqueCommand)(windows_core::Interface::as_raw(self), pcommand as _).ok() } } } #[repr(C)] @@ -2848,11 +2848,11 @@ impl IWMDMDevice2 { } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Media_Audio", feature = "Win32_Media_MediaFoundation"))] pub unsafe fn GetFormatSupport2(&self, dwflags: u32, ppaudioformatex: *mut *mut super::Audio::WAVEFORMATEX, pnaudioformatcount: *mut u32, ppvideoformatex: *mut *mut super::MediaFoundation::VIDEOINFOHEADER, pnvideoformatcount: *mut u32, ppfiletype: *mut *mut WMFILECAPABILITIES, pnfiletypecount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFormatSupport2)(windows_core::Interface::as_raw(self), dwflags, core::mem::transmute(ppaudioformatex), core::mem::transmute(pnaudioformatcount), core::mem::transmute(ppvideoformatex), core::mem::transmute(pnvideoformatcount), core::mem::transmute(ppfiletype), core::mem::transmute(pnfiletypecount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFormatSupport2)(windows_core::Interface::as_raw(self), dwflags, ppaudioformatex as _, pnaudioformatcount as _, ppvideoformatex as _, pnvideoformatcount as _, ppfiletype as _, pnfiletypecount as _).ok() } } #[cfg(feature = "Win32_System_Ole")] pub unsafe fn GetSpecifyPropertyPages(&self, ppspecifyproppages: *mut Option, pppunknowns: *mut *mut Option, pcunks: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSpecifyPropertyPages)(windows_core::Interface::as_raw(self), core::mem::transmute(ppspecifyproppages), core::mem::transmute(pppunknowns), core::mem::transmute(pcunks)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSpecifyPropertyPages)(windows_core::Interface::as_raw(self), core::mem::transmute(ppspecifyproppages), pppunknowns as _, pcunks as _).ok() } } pub unsafe fn GetCanonicalName(&self, pwszpnpname: &mut [u16]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetCanonicalName)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszpnpname.as_ptr()), pwszpnpname.len().try_into().unwrap()).ok() } @@ -2960,7 +2960,7 @@ impl IWMDMDevice3 { } } pub unsafe fn DeviceIoControl(&self, dwiocontrolcode: u32, lpinbuffer: &[u8], lpoutbuffer: *mut u8, pnoutbuffersize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DeviceIoControl)(windows_core::Interface::as_raw(self), dwiocontrolcode, core::mem::transmute(lpinbuffer.as_ptr()), lpinbuffer.len().try_into().unwrap(), core::mem::transmute(lpoutbuffer), core::mem::transmute(pnoutbuffersize)).ok() } + unsafe { (windows_core::Interface::vtable(self).DeviceIoControl)(windows_core::Interface::as_raw(self), dwiocontrolcode, core::mem::transmute(lpinbuffer.as_ptr()), lpinbuffer.len().try_into().unwrap(), lpoutbuffer as _, pnoutbuffersize as _).ok() } } pub unsafe fn FindStorage(&self, findscope: WMDM_FIND_SCOPE, pwszuniqueid: P1) -> windows_core::Result where @@ -3255,7 +3255,7 @@ windows_core::imp::define_interface!(IWMDMEnumDevice, IWMDMEnumDevice_Vtbl, 0x1d windows_core::imp::interface_hierarchy!(IWMDMEnumDevice, windows_core::IUnknown); impl IWMDMEnumDevice { pub unsafe fn Next(&self, ppdevice: &mut [Option], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppdevice.len().try_into().unwrap(), core::mem::transmute(ppdevice.as_ptr()), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppdevice.len().try_into().unwrap(), core::mem::transmute(ppdevice.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result { unsafe { @@ -3342,7 +3342,7 @@ windows_core::imp::define_interface!(IWMDMEnumStorage, IWMDMEnumStorage_Vtbl, 0x windows_core::imp::interface_hierarchy!(IWMDMEnumStorage, windows_core::IUnknown); impl IWMDMEnumStorage { pub unsafe fn Next(&self, ppstorage: &mut [Option], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppstorage.len().try_into().unwrap(), core::mem::transmute(ppstorage.as_ptr()), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppstorage.len().try_into().unwrap(), core::mem::transmute(ppstorage.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result { unsafe { @@ -3464,7 +3464,7 @@ impl IWMDMLogger { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetSizeParams(&self, pdwmaxsize: *mut u32, pdwshrinktosize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSizeParams)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmaxsize), core::mem::transmute(pdwshrinktosize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSizeParams)(windows_core::Interface::as_raw(self), pdwmaxsize as _, pdwshrinktosize as _).ok() } } pub unsafe fn SetSizeParams(&self, dwmaxsize: u32, dwshrinktosize: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSizeParams)(windows_core::Interface::as_raw(self), dwmaxsize, dwshrinktosize).ok() } @@ -3587,10 +3587,10 @@ impl IWMDMMetaData { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).QueryByName)(windows_core::Interface::as_raw(self), pwsztagname.param().abi(), core::mem::transmute(ptype), core::mem::transmute(pvalue), core::mem::transmute(pcblength)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryByName)(windows_core::Interface::as_raw(self), pwsztagname.param().abi(), ptype as _, pvalue as _, pcblength as _).ok() } } pub unsafe fn QueryByIndex(&self, iindex: u32, ppwszname: *mut *mut u16, ptype: *mut WMDM_TAG_DATATYPE, ppvalue: *mut *mut u8, pcblength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryByIndex)(windows_core::Interface::as_raw(self), iindex, core::mem::transmute(ppwszname), core::mem::transmute(ptype), core::mem::transmute(ppvalue), core::mem::transmute(pcblength)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryByIndex)(windows_core::Interface::as_raw(self), iindex, ppwszname as _, ptype as _, ppvalue as _, pcblength as _).ok() } } pub unsafe fn GetItemCount(&self) -> windows_core::Result { unsafe { @@ -3858,20 +3858,20 @@ impl IWMDMOperation { } #[cfg(feature = "Win32_Media_Audio")] pub unsafe fn GetObjectAttributes(&self, pdwattributes: *mut u32, pformat: Option<*mut super::Audio::WAVEFORMATEX>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetObjectAttributes)(windows_core::Interface::as_raw(self), pdwattributes as _, pformat.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Media_Audio")] pub unsafe fn SetObjectAttributes(&self, dwattributes: u32, pformat: Option<*const super::Audio::WAVEFORMATEX>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetObjectAttributes)(windows_core::Interface::as_raw(self), dwattributes, core::mem::transmute(pformat.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetObjectAttributes)(windows_core::Interface::as_raw(self), dwattributes, pformat.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetObjectTotalSize(&self, pdwsize: *mut u32, pdwsizehigh: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetObjectTotalSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwsize), core::mem::transmute(pdwsizehigh)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetObjectTotalSize)(windows_core::Interface::as_raw(self), pdwsize as _, pdwsizehigh as _).ok() } } pub unsafe fn SetObjectTotalSize(&self, dwsize: u32, dwsizehigh: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetObjectTotalSize)(windows_core::Interface::as_raw(self), dwsize, dwsizehigh).ok() } } pub unsafe fn TransferObjectData(&self, pdata: *mut u8, pdwsize: *mut u32, abmac: &mut [u8; 8]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TransferObjectData)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata), core::mem::transmute(pdwsize), core::mem::transmute(abmac.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).TransferObjectData)(windows_core::Interface::as_raw(self), pdata as _, pdwsize as _, core::mem::transmute(abmac.as_ptr())).ok() } } pub unsafe fn End(&self, phcompletioncode: *const windows_core::HRESULT, pnewobject: P1) -> windows_core::Result<()> where @@ -4007,11 +4007,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<()> { - unsafe { (windows_core::Interface::vtable(self).SetObjectAttributes2)(windows_core::Interface::as_raw(self), dwattributes, dwattributesex, core::mem::transmute(pformat.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvideoformat.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetObjectAttributes2)(windows_core::Interface::as_raw(self), dwattributes, dwattributesex, pformat.unwrap_or(core::mem::zeroed()) as _, pvideoformat.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetObjectAttributes2)(windows_core::Interface::as_raw(self), pdwattributes as _, pdwattributesex as _, paudioformat.unwrap_or(core::mem::zeroed()) as _, pvideoformat.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -4068,7 +4068,7 @@ impl core::ops::Deref for IWMDMOperation3 { windows_core::imp::interface_hierarchy!(IWMDMOperation3, windows_core::IUnknown, IWMDMOperation); impl IWMDMOperation3 { pub unsafe fn TransferObjectDataOnClearChannel(&self, pdata: *mut u8, pdwsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TransferObjectDataOnClearChannel)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata), core::mem::transmute(pdwsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).TransferObjectDataOnClearChannel)(windows_core::Interface::as_raw(self), pdata as _, pdwsize as _).ok() } } } #[repr(C)] @@ -4200,13 +4200,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<()> { - unsafe { (windows_core::Interface::vtable(self).Begin3)(windows_core::Interface::as_raw(self), core::mem::transmute(eventid), dwestimatedticks, core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Begin3)(windows_core::Interface::as_raw(self), core::mem::transmute(eventid), dwestimatedticks, pcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Progress3(&self, eventid: windows_core::GUID, dwtranspiredticks: u32, pcontext: Option<*mut OPAQUECOMMAND>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Progress3)(windows_core::Interface::as_raw(self), core::mem::transmute(eventid), dwtranspiredticks, core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Progress3)(windows_core::Interface::as_raw(self), core::mem::transmute(eventid), dwtranspiredticks, pcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn End3(&self, eventid: windows_core::GUID, hrcompletioncode: windows_core::HRESULT, pcontext: Option<*mut OPAQUECOMMAND>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).End3)(windows_core::Interface::as_raw(self), core::mem::transmute(eventid), hrcompletioncode, core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).End3)(windows_core::Interface::as_raw(self), core::mem::transmute(eventid), hrcompletioncode, pcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -4257,7 +4257,7 @@ windows_core::imp::define_interface!(IWMDMRevoked, IWMDMRevoked_Vtbl, 0xebeccedb windows_core::imp::interface_hierarchy!(IWMDMRevoked, windows_core::IUnknown); impl IWMDMRevoked { pub unsafe fn GetRevocationURL(&self, ppwszrevocationurl: *mut windows_core::PWSTR, pdwbufferlen: *mut u32, pdwrevokedbitflag: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRevocationURL)(windows_core::Interface::as_raw(self), core::mem::transmute(ppwszrevocationurl), core::mem::transmute(pdwbufferlen), core::mem::transmute(pdwrevokedbitflag)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRevocationURL)(windows_core::Interface::as_raw(self), ppwszrevocationurl as _, pdwbufferlen as _, pdwrevokedbitflag as _).ok() } } } #[repr(C)] @@ -4288,7 +4288,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<()> { - unsafe { (windows_core::Interface::vtable(self).SetAttributes)(windows_core::Interface::as_raw(self), dwattributes, core::mem::transmute(pformat.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetAttributes)(windows_core::Interface::as_raw(self), dwattributes, pformat.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetStorageGlobals(&self) -> windows_core::Result { unsafe { @@ -4298,7 +4298,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetAttributes)(windows_core::Interface::as_raw(self), pdwattributes as _, pformat.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetName(&self, pwszname: &mut [u16]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetName)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszname.as_ptr()), pwszname.len().try_into().unwrap()).ok() } @@ -4310,10 +4310,10 @@ impl IWMDMStorage { } } pub unsafe fn GetSize(&self, pdwsizelow: *mut u32, pdwsizehigh: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwsizelow), core::mem::transmute(pdwsizehigh)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSize)(windows_core::Interface::as_raw(self), pdwsizelow as _, pdwsizehigh as _).ok() } } pub unsafe fn GetRights(&self, pprights: *mut *mut WMDMRIGHTS, pnrightscount: *mut u32, abmac: &mut [u8; 8]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRights)(windows_core::Interface::as_raw(self), core::mem::transmute(pprights), core::mem::transmute(pnrightscount), core::mem::transmute(abmac.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRights)(windows_core::Interface::as_raw(self), pprights as _, pnrightscount as _, core::mem::transmute(abmac.as_ptr())).ok() } } pub unsafe fn EnumStorage(&self) -> windows_core::Result { unsafe { @@ -4322,7 +4322,7 @@ impl IWMDMStorage { } } pub unsafe fn SendOpaqueCommand(&self, pcommand: *mut OPAQUECOMMAND) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SendOpaqueCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(pcommand)).ok() } + unsafe { (windows_core::Interface::vtable(self).SendOpaqueCommand)(windows_core::Interface::as_raw(self), pcommand as _).ok() } } } #[repr(C)] @@ -4470,11 +4470,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<()> { - unsafe { (windows_core::Interface::vtable(self).SetAttributes2)(windows_core::Interface::as_raw(self), dwattributes, dwattributesex, core::mem::transmute(pformat.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvideoformat.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetAttributes2)(windows_core::Interface::as_raw(self), dwattributes, dwattributesex, pformat.unwrap_or(core::mem::zeroed()) as _, pvideoformat.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetAttributes2)(windows_core::Interface::as_raw(self), pdwattributes as _, pdwattributesex as _, paudioformat.unwrap_or(core::mem::zeroed()) as _, pvideoformat.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -4564,7 +4564,7 @@ impl IWMDMStorage3 { } } pub unsafe fn SetEnumPreference(&self, pmode: *mut WMDM_STORAGE_ENUM_MODE, pviews: Option<&[WMDMMetadataView]>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetEnumPreference)(windows_core::Interface::as_raw(self), core::mem::transmute(pmode), 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()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetEnumPreference)(windows_core::Interface::as_raw(self), pmode as _, 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()))).ok() } } } #[repr(C)] @@ -4648,13 +4648,13 @@ impl IWMDMStorage4 { unsafe { (windows_core::Interface::vtable(self).SetReferences)(windows_core::Interface::as_raw(self), ppiwmdmstorage.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppiwmdmstorage.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() } } pub unsafe fn GetReferences(&self, pdwrefs: *mut u32, pppiwmdmstorage: *mut *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetReferences)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwrefs), core::mem::transmute(pppiwmdmstorage)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetReferences)(windows_core::Interface::as_raw(self), pdwrefs as _, pppiwmdmstorage as _).ok() } } pub unsafe fn GetRightsWithProgress(&self, piprogresscallback: P0, pprights: *mut *mut WMDMRIGHTS, pnrightscount: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetRightsWithProgress)(windows_core::Interface::as_raw(self), piprogresscallback.param().abi(), core::mem::transmute(pprights), core::mem::transmute(pnrightscount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRightsWithProgress)(windows_core::Interface::as_raw(self), piprogresscallback.param().abi(), pprights as _, pnrightscount as _).ok() } } pub unsafe fn GetSpecifiedMetadata(&self, ppwszpropnames: &[windows_core::PCWSTR]) -> windows_core::Result { unsafe { @@ -4898,7 +4898,7 @@ impl IWMDMStorageControl2 { P4: windows_core::Param, P5: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Insert2)(windows_core::Interface::as_raw(self), fumode, pwszfilesource.param().abi(), pwszfiledest.param().abi(), poperation.param().abi(), pprogress.param().abi(), punknown.param().abi(), core::mem::transmute(ppnewobject.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Insert2)(windows_core::Interface::as_raw(self), fumode, pwszfilesource.param().abi(), pwszfiledest.param().abi(), poperation.param().abi(), pprogress.param().abi(), punknown.param().abi(), ppnewobject.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -4942,7 +4942,7 @@ impl IWMDMStorageControl3 { P6: windows_core::Param, P7: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Insert3)(windows_core::Interface::as_raw(self), fumode, futype, pwszfilesource.param().abi(), pwszfiledest.param().abi(), poperation.param().abi(), pprogress.param().abi(), pmetadata.param().abi(), punknown.param().abi(), core::mem::transmute(ppnewobject.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Insert3)(windows_core::Interface::as_raw(self), fumode, futype, pwszfilesource.param().abi(), pwszfiledest.param().abi(), poperation.param().abi(), pprogress.param().abi(), pmetadata.param().abi(), punknown.param().abi(), ppnewobject.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -4978,16 +4978,16 @@ impl IWMDMStorageGlobals { } } pub unsafe fn GetSerialNumber(&self, pserialnum: *mut WMDMID, abmac: &mut [u8; 8]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSerialNumber)(windows_core::Interface::as_raw(self), core::mem::transmute(pserialnum), core::mem::transmute(abmac.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSerialNumber)(windows_core::Interface::as_raw(self), pserialnum as _, core::mem::transmute(abmac.as_ptr())).ok() } } pub unsafe fn GetTotalSize(&self, pdwtotalsizelow: *mut u32, pdwtotalsizehigh: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTotalSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwtotalsizelow), core::mem::transmute(pdwtotalsizehigh)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTotalSize)(windows_core::Interface::as_raw(self), pdwtotalsizelow as _, pdwtotalsizehigh as _).ok() } } pub unsafe fn GetTotalFree(&self, pdwfreelow: *mut u32, pdwfreehigh: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTotalFree)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwfreelow), core::mem::transmute(pdwfreehigh)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTotalFree)(windows_core::Interface::as_raw(self), pdwfreelow as _, pdwfreehigh as _).ok() } } pub unsafe fn GetTotalBad(&self, pdwbadlow: *mut u32, pdwbadhigh: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTotalBad)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwbadlow), core::mem::transmute(pdwbadhigh)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTotalBad)(windows_core::Interface::as_raw(self), pdwbadlow as _, pdwbadhigh as _).ok() } } pub unsafe fn GetStatus(&self) -> windows_core::Result { unsafe { 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 715ea7e3f5..4f8b7651e2 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 @@ -1395,7 +1395,7 @@ impl IATSC_EIT { } } pub unsafe fn GetRecordTitleText(&self, dwrecordindex: u32, pdwlength: *mut u32, pptext: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRecordTitleText)(windows_core::Interface::as_raw(self), dwrecordindex, core::mem::transmute(pdwlength), core::mem::transmute(pptext)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecordTitleText)(windows_core::Interface::as_raw(self), dwrecordindex, pdwlength as _, pptext as _).ok() } } pub unsafe fn GetRecordCountOfDescriptors(&self, dwrecordindex: u32) -> windows_core::Result { unsafe { @@ -1410,7 +1410,7 @@ impl IATSC_EIT { } } pub unsafe fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie), core::mem::transmute(ppdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, pdwcookie as _, core::mem::transmute(ppdescriptor)).ok() } } } #[repr(C)] @@ -1636,7 +1636,7 @@ impl IATSC_ETT { } } pub unsafe fn GetExtendedMessageText(&self, pdwlength: *mut u32, pptext: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetExtendedMessageText)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwlength), core::mem::transmute(pptext)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetExtendedMessageText)(windows_core::Interface::as_raw(self), pdwlength as _, pptext as _).ok() } } } #[repr(C)] @@ -1778,7 +1778,7 @@ impl IATSC_MGT { } } pub unsafe fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie), core::mem::transmute(ppdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, pdwcookie as _, core::mem::transmute(ppdescriptor)).ok() } } pub unsafe fn GetCountOfTableDescriptors(&self, pdwval: *const u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetCountOfTableDescriptors)(windows_core::Interface::as_raw(self), pdwval).ok() } @@ -1790,7 +1790,7 @@ impl IATSC_MGT { } } pub unsafe fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, core::mem::transmute(pdwcookie), core::mem::transmute(ppdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, pdwcookie as _, core::mem::transmute(ppdescriptor)).ok() } } } #[repr(C)] @@ -2028,7 +2028,7 @@ impl IATSC_STT { } } pub unsafe fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, core::mem::transmute(pdwcookie), core::mem::transmute(ppdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, pdwcookie as _, core::mem::transmute(ppdescriptor)).ok() } } } #[repr(C)] @@ -2293,7 +2293,7 @@ impl IATSC_VCT { } } pub unsafe fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie), core::mem::transmute(ppdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, pdwcookie as _, core::mem::transmute(ppdescriptor)).ok() } } pub unsafe fn GetCountOfTableDescriptors(&self, pdwval: *const u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetCountOfTableDescriptors)(windows_core::Interface::as_raw(self), pdwval).ok() } @@ -2305,7 +2305,7 @@ impl IATSC_VCT { } } pub unsafe fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, core::mem::transmute(pdwcookie), core::mem::transmute(ppdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, pdwcookie as _, core::mem::transmute(ppdescriptor)).ok() } } } #[repr(C)] @@ -3242,7 +3242,7 @@ impl IAtscContentAdvisoryDescriptor { } } pub unsafe fn GetRecordRatingDescriptionText(&self, bindex: u8, pblength: *mut u8, pptext: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRecordRatingDescriptionText)(windows_core::Interface::as_raw(self), bindex, core::mem::transmute(pblength), core::mem::transmute(pptext)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecordRatingDescriptionText)(windows_core::Interface::as_raw(self), bindex, pblength as _, pptext as _).ok() } } } #[repr(C)] @@ -3632,10 +3632,10 @@ impl IAttributeGet { } } pub unsafe fn GetAttribIndexed(&self, lindex: i32, pguidattribute: *mut windows_core::GUID, pbattribute: *mut u8, pdwattributelength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAttribIndexed)(windows_core::Interface::as_raw(self), lindex, core::mem::transmute(pguidattribute), core::mem::transmute(pbattribute), core::mem::transmute(pdwattributelength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAttribIndexed)(windows_core::Interface::as_raw(self), lindex, pguidattribute as _, pbattribute as _, pdwattributelength as _).ok() } } pub unsafe fn GetAttrib(&self, guidattribute: windows_core::GUID, pbattribute: *mut u8, pdwattributelength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAttrib)(windows_core::Interface::as_raw(self), core::mem::transmute(guidattribute), core::mem::transmute(pbattribute), core::mem::transmute(pdwattributelength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAttrib)(windows_core::Interface::as_raw(self), core::mem::transmute(guidattribute), pbattribute as _, pdwattributelength as _).ok() } } } #[repr(C)] @@ -4032,7 +4032,7 @@ impl IBDA_TIF_REGISTRATION { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).RegisterTIFEx)(windows_core::Interface::as_raw(self), ptifinputpin.param().abi(), core::mem::transmute(ppvregistrationcontext), core::mem::transmute(ppmpeg2datacontrol)).ok() } + unsafe { (windows_core::Interface::vtable(self).RegisterTIFEx)(windows_core::Interface::as_raw(self), ptifinputpin.param().abi(), ppvregistrationcontext as _, core::mem::transmute(ppmpeg2datacontrol)).ok() } } pub unsafe fn UnregisterTIF(&self, pvregistrationcontext: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UnregisterTIF)(windows_core::Interface::as_raw(self), pvregistrationcontext).ok() } @@ -4102,7 +4102,7 @@ impl ICAT { } } pub unsafe fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, core::mem::transmute(pdwcookie), core::mem::transmute(ppdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, pdwcookie as _, core::mem::transmute(ppdescriptor)).ok() } } pub unsafe fn RegisterForNextTable(&self, hnexttableavailable: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RegisterForNextTable)(windows_core::Interface::as_raw(self), hnexttableavailable).ok() } @@ -5649,7 +5649,7 @@ impl ICreatePropBagOnRegKey { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Create)(windows_core::Interface::as_raw(self), hkey, subkey.param().abi(), uloptions, samdesired, iid, core::mem::transmute(ppbag)).ok() } + unsafe { (windows_core::Interface::vtable(self).Create)(windows_core::Interface::as_raw(self), hkey, subkey.param().abi(), uloptions, samdesired, iid, ppbag as _).ok() } } } #[repr(C)] @@ -5691,7 +5691,7 @@ impl IDTFilter { } } pub unsafe fn GetCurrRating(&self, pensystem: *mut EnTvRat_System, penrating: *mut EnTvRat_GenericLevel, plbfenattr: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrRating)(windows_core::Interface::as_raw(self), core::mem::transmute(pensystem), core::mem::transmute(penrating), core::mem::transmute(plbfenattr)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrRating)(windows_core::Interface::as_raw(self), pensystem as _, penrating as _, plbfenattr as _).ok() } } pub unsafe fn get_BlockedRatingAttributes(&self, ensystem: EnTvRat_System, enlevel: EnTvRat_GenericLevel) -> windows_core::Result { unsafe { @@ -6068,7 +6068,7 @@ windows_core::imp::define_interface!(IDTFilterLicenseRenewal, IDTFilterLicenseRe windows_core::imp::interface_hierarchy!(IDTFilterLicenseRenewal, windows_core::IUnknown); impl IDTFilterLicenseRenewal { pub unsafe fn GetLicenseRenewalData(&self, ppwszfilename: *mut windows_core::PWSTR, ppwszexpiredkid: *mut windows_core::PWSTR, ppwsztunerid: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLicenseRenewalData)(windows_core::Interface::as_raw(self), core::mem::transmute(ppwszfilename), core::mem::transmute(ppwszexpiredkid), core::mem::transmute(ppwsztunerid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLicenseRenewalData)(windows_core::Interface::as_raw(self), ppwszfilename as _, ppwszexpiredkid as _, ppwsztunerid as _).ok() } } } #[repr(C)] @@ -7425,7 +7425,7 @@ impl IDVB_BAT { unsafe { (windows_core::Interface::vtable(self).GetTableDescriptorByIndex)(windows_core::Interface::as_raw(self), dwindex, core::mem::transmute(ppdescriptor)).ok() } } pub unsafe fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: Option<*mut u32>, ppdescriptor: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, pdwcookie.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(ppdescriptor)).ok() } } pub unsafe fn GetCountOfRecords(&self) -> windows_core::Result { unsafe { @@ -7458,7 +7458,7 @@ impl IDVB_BAT { } } pub unsafe fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: Option<*mut u32>, ppdescriptor: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, pdwcookie.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(ppdescriptor)).ok() } } pub unsafe fn RegisterForNextTable(&self, hnexttableavailable: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RegisterForNextTable)(windows_core::Interface::as_raw(self), hnexttableavailable).ok() } @@ -7843,7 +7843,7 @@ impl IDVB_EIT { } } pub unsafe fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: Option<*mut u32>, ppdescriptor: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, pdwcookie.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(ppdescriptor)).ok() } } pub unsafe fn RegisterForNextTable(&self, hnexttableavailable: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RegisterForNextTable)(windows_core::Interface::as_raw(self), hnexttableavailable).ok() } @@ -8179,7 +8179,7 @@ impl core::ops::Deref for IDVB_EIT2 { windows_core::imp::interface_hierarchy!(IDVB_EIT2, windows_core::IUnknown, IDVB_EIT); impl IDVB_EIT2 { pub unsafe fn GetSegmentInfo(&self, pbtid: *mut u8, pbsegment: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSegmentInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pbtid), core::mem::transmute(pbsegment)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSegmentInfo)(windows_core::Interface::as_raw(self), pbtid as _, pbsegment as _).ok() } } pub unsafe fn GetRecordSection(&self, dwrecordindex: u32) -> windows_core::Result { unsafe { @@ -8264,7 +8264,7 @@ impl IDVB_NIT { } } pub unsafe fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: Option<*mut u32>, ppdescriptor: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, pdwcookie.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(ppdescriptor)).ok() } } pub unsafe fn GetCountOfRecords(&self) -> windows_core::Result { unsafe { @@ -8297,7 +8297,7 @@ impl IDVB_NIT { } } pub unsafe fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: Option<*mut u32>, ppdescriptor: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, pdwcookie.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(ppdescriptor)).ok() } } pub unsafe fn RegisterForNextTable(&self, hnexttableavailable: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RegisterForNextTable)(windows_core::Interface::as_raw(self), hnexttableavailable).ok() } @@ -8796,7 +8796,7 @@ impl IDVB_SDT { } } pub unsafe fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: Option<*mut u32>, ppdescriptor: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, pdwcookie.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(ppdescriptor)).ok() } } pub unsafe fn RegisterForNextTable(&self, hnexttableavailable: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RegisterForNextTable)(windows_core::Interface::as_raw(self), hnexttableavailable).ok() } @@ -9106,7 +9106,7 @@ impl IDVB_SIT { } } pub unsafe fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: Option<*mut u32>, ppdescriptor: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, pdwcookie.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(ppdescriptor)).ok() } } pub unsafe fn GetCountOfRecords(&self) -> windows_core::Result { unsafe { @@ -9139,7 +9139,7 @@ impl IDVB_SIT { } } pub unsafe fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: Option<*mut u32>, ppdescriptor: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, pdwcookie.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(ppdescriptor)).ok() } } pub unsafe fn RegisterForNextTable(&self, hnexttableavailable: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RegisterForNextTable)(windows_core::Interface::as_raw(self), hnexttableavailable).ok() } @@ -9526,7 +9526,7 @@ impl IDVB_TOT { } } pub unsafe fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: Option<*mut u32>, ppdescriptor: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, pdwcookie.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(ppdescriptor)).ok() } } } #[repr(C)] @@ -10284,10 +10284,10 @@ impl IDvbContentDescriptor { } } pub unsafe fn GetRecordContentNibbles(&self, brecordindex: u8, pbvallevel1: *mut u8, pbvallevel2: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRecordContentNibbles)(windows_core::Interface::as_raw(self), brecordindex, core::mem::transmute(pbvallevel1), core::mem::transmute(pbvallevel2)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecordContentNibbles)(windows_core::Interface::as_raw(self), brecordindex, pbvallevel1 as _, pbvallevel2 as _).ok() } } pub unsafe fn GetRecordUserNibbles(&self, brecordindex: u8, pbval1: *mut u8, pbval2: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRecordUserNibbles)(windows_core::Interface::as_raw(self), brecordindex, core::mem::transmute(pbval1), core::mem::transmute(pbval2)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecordUserNibbles)(windows_core::Interface::as_raw(self), brecordindex, pbval1 as _, pbval2 as _).ok() } } } #[repr(C)] @@ -10392,7 +10392,7 @@ impl IDvbContentIdentifierDescriptor { } } pub unsafe fn GetRecordCrid(&self, brecordindex: u8, pbtype: *mut u8, pblocation: *mut u8, pblength: *mut u8, ppbbytes: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRecordCrid)(windows_core::Interface::as_raw(self), brecordindex, core::mem::transmute(pbtype), core::mem::transmute(pblocation), core::mem::transmute(pblength), core::mem::transmute(ppbbytes)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecordCrid)(windows_core::Interface::as_raw(self), brecordindex, pbtype as _, pblocation as _, pblength as _, ppbbytes as _).ok() } } } #[repr(C)] @@ -10500,7 +10500,7 @@ impl IDvbDataBroadcastDescriptor { } } pub unsafe fn GetSelectorBytes(&self, pblen: *mut u8, pbval: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSelectorBytes)(windows_core::Interface::as_raw(self), core::mem::transmute(pblen), core::mem::transmute(pbval)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSelectorBytes)(windows_core::Interface::as_raw(self), pblen as _, pbval as _).ok() } } pub unsafe fn GetLangID(&self) -> windows_core::Result { unsafe { @@ -10515,7 +10515,7 @@ impl IDvbDataBroadcastDescriptor { } } pub unsafe fn GetText(&self, pblen: *mut u8, pbval: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), core::mem::transmute(pblen), core::mem::transmute(pbval)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), pblen as _, pbval as _).ok() } } } #[repr(C)] @@ -10680,7 +10680,7 @@ impl IDvbDataBroadcastIDDescriptor { } } pub unsafe fn GetIDSelectorBytes(&self, pblen: *mut u8, pbval: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIDSelectorBytes)(windows_core::Interface::as_raw(self), core::mem::transmute(pblen), core::mem::transmute(pbval)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIDSelectorBytes)(windows_core::Interface::as_raw(self), pblen as _, pbval as _).ok() } } } #[repr(C)] @@ -10770,7 +10770,7 @@ impl IDvbDefaultAuthorityDescriptor { } } pub unsafe fn GetDefaultAuthority(&self, pblength: *mut u8, ppbbytes: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDefaultAuthority)(windows_core::Interface::as_raw(self), core::mem::transmute(pblength), core::mem::transmute(ppbbytes)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDefaultAuthority)(windows_core::Interface::as_raw(self), pblength as _, ppbbytes as _).ok() } } } #[repr(C)] @@ -10890,7 +10890,7 @@ impl IDvbExtendedEventDescriptor { } } pub unsafe fn GetRecordItemRawBytes(&self, brecordindex: u8, ppbrawitem: *mut *mut u8, pbitemlength: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRecordItemRawBytes)(windows_core::Interface::as_raw(self), brecordindex, core::mem::transmute(ppbrawitem), core::mem::transmute(pbitemlength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecordItemRawBytes)(windows_core::Interface::as_raw(self), brecordindex, ppbrawitem as _, pbitemlength as _).ok() } } } #[repr(C)] @@ -11245,7 +11245,7 @@ impl IDvbLinkageDescriptor { } } pub unsafe fn GetPrivateData(&self, pblen: *mut u8, pbdata: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), core::mem::transmute(pblen), core::mem::transmute(pbdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), pblen as _, pbdata as _).ok() } } } #[repr(C)] @@ -12013,7 +12013,7 @@ impl IDvbParentalRatingDescriptor { } } pub unsafe fn GetRecordRating(&self, brecordindex: u8, pszcountrycode: &mut [u8; 4], pbval: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRecordRating)(windows_core::Interface::as_raw(self), brecordindex, core::mem::transmute(pszcountrycode.as_ptr()), core::mem::transmute(pbval)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecordRating)(windows_core::Interface::as_raw(self), brecordindex, core::mem::transmute(pszcountrycode.as_ptr()), pbval as _).ok() } } } #[repr(C)] @@ -13053,7 +13053,7 @@ impl IDvbSiParser { pub unsafe fn GetPMT(&self, pid: u16, pwprogramnumber: Option<*const u16>) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetPMT)(windows_core::Interface::as_raw(self), pid, core::mem::transmute(pwprogramnumber.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetPMT)(windows_core::Interface::as_raw(self), pid, pwprogramnumber.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn GetTSDT(&self) -> windows_core::Result { @@ -13065,25 +13065,25 @@ impl IDvbSiParser { pub unsafe fn GetNIT(&self, tableid: u8, pwnetworkid: Option<*const u16>) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetNIT)(windows_core::Interface::as_raw(self), tableid, core::mem::transmute(pwnetworkid.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetNIT)(windows_core::Interface::as_raw(self), tableid, pwnetworkid.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn GetSDT(&self, tableid: u8, pwtransportstreamid: Option<*const u16>) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetSDT)(windows_core::Interface::as_raw(self), tableid, core::mem::transmute(pwtransportstreamid.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetSDT)(windows_core::Interface::as_raw(self), tableid, pwtransportstreamid.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn GetEIT(&self, tableid: u8, pwserviceid: Option<*const u16>) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetEIT)(windows_core::Interface::as_raw(self), tableid, core::mem::transmute(pwserviceid.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetEIT)(windows_core::Interface::as_raw(self), tableid, pwserviceid.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn GetBAT(&self, pwbouquetid: Option<*const u16>) -> windows_core::Result { unsafe { 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::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetBAT)(windows_core::Interface::as_raw(self), pwbouquetid.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn GetRST(&self, dwtimeout: u32) -> windows_core::Result { @@ -13371,7 +13371,7 @@ impl IDvbSiParser2 { pub unsafe fn GetEIT2(&self, tableid: u8, pwserviceid: Option<*const u16>, pbsegment: Option<*const u8>) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetEIT2)(windows_core::Interface::as_raw(self), tableid, core::mem::transmute(pwserviceid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbsegment.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetEIT2)(windows_core::Interface::as_raw(self), tableid, pwserviceid.unwrap_or(core::mem::zeroed()) as _, pbsegment.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } } @@ -15066,7 +15066,7 @@ impl IESOpenMmiEvent { pub unsafe fn GetDialogNumber(&self, pdialogrequest: *mut u32) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetDialogNumber)(windows_core::Interface::as_raw(self), core::mem::transmute(pdialogrequest), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetDialogNumber)(windows_core::Interface::as_raw(self), pdialogrequest as _, &mut result__).map(|| result__) } } pub unsafe fn GetDialogType(&self) -> windows_core::Result { @@ -15348,7 +15348,7 @@ impl IETFilter { } } pub unsafe fn GetCurrRating(&self, pensystem: *mut EnTvRat_System, penrating: *mut EnTvRat_GenericLevel, plbfenattr: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrRating)(windows_core::Interface::as_raw(self), core::mem::transmute(pensystem), core::mem::transmute(penrating), core::mem::transmute(plbfenattr)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrRating)(windows_core::Interface::as_raw(self), pensystem as _, penrating as _, plbfenattr as _).ok() } } pub unsafe fn GetCurrLicenseExpDate(&self, prottype: *const ProtType) -> windows_core::Result { unsafe { @@ -15525,7 +15525,7 @@ windows_core::imp::interface_hierarchy!(IEnumComponentTypes, windows_core::IUnkn impl IEnumComponentTypes { #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -15610,7 +15610,7 @@ windows_core::imp::interface_hierarchy!(IEnumComponents, windows_core::IUnknown) impl IEnumComponents { #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -15694,7 +15694,7 @@ windows_core::imp::define_interface!(IEnumGuideDataProperties, IEnumGuideDataPro windows_core::imp::interface_hierarchy!(IEnumGuideDataProperties, windows_core::IUnknown); impl IEnumGuideDataProperties { pub unsafe fn Next(&self, celt: u32, ppprop: *mut Option, pcelt: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppprop), core::mem::transmute(pcelt)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppprop), pcelt as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -15773,7 +15773,7 @@ windows_core::imp::interface_hierarchy!(IEnumMSVidGraphSegment, windows_core::IU impl IEnumMSVidGraphSegment { #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(rgelt), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(rgelt), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -15857,7 +15857,7 @@ windows_core::imp::define_interface!(IEnumStreamBufferRecordingAttrib, IEnumStre windows_core::imp::interface_hierarchy!(IEnumStreamBufferRecordingAttrib, windows_core::IUnknown); impl IEnumStreamBufferRecordingAttrib { pub unsafe fn Next(&self, pstreambufferattribute: &mut [STREAMBUFFER_ATTRIBUTE], pcreceived: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pstreambufferattribute.len().try_into().unwrap(), core::mem::transmute(pstreambufferattribute.as_ptr()), core::mem::transmute(pcreceived)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pstreambufferattribute.len().try_into().unwrap(), core::mem::transmute(pstreambufferattribute.as_ptr()), pcreceived as _).ok() } } pub unsafe fn Skip(&self, crecords: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), crecords).ok() } @@ -15936,7 +15936,7 @@ windows_core::imp::interface_hierarchy!(IEnumTuneRequests, windows_core::IUnknow impl IEnumTuneRequests { #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, celt: u32, ppprop: *mut Option, pcelt: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppprop), core::mem::transmute(pcelt)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppprop), pcelt as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -16021,7 +16021,7 @@ windows_core::imp::interface_hierarchy!(IEnumTuningSpaces, windows_core::IUnknow impl IEnumTuningSpaces { #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -16133,7 +16133,7 @@ impl IEvalRat { unsafe { (windows_core::Interface::vtable(self).SetBlockUnRated)(windows_core::Interface::as_raw(self), fblockunratedshows.into()).ok() } } pub unsafe fn MostRestrictiveRating(&self, ensystem1: EnTvRat_System, enenlevel1: EnTvRat_GenericLevel, lbfenattr1: i32, ensystem2: EnTvRat_System, enenlevel2: EnTvRat_GenericLevel, lbfenattr2: i32, pensystem: *mut EnTvRat_System, penenlevel: *mut EnTvRat_GenericLevel, plbfenattr: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).MostRestrictiveRating)(windows_core::Interface::as_raw(self), ensystem1, enenlevel1, lbfenattr1, ensystem2, enenlevel2, lbfenattr2, core::mem::transmute(pensystem), core::mem::transmute(penenlevel), core::mem::transmute(plbfenattr)).ok() } + unsafe { (windows_core::Interface::vtable(self).MostRestrictiveRating)(windows_core::Interface::as_raw(self), ensystem1, enenlevel1, lbfenattr1, ensystem2, enenlevel2, lbfenattr2, pensystem as _, penenlevel as _, plbfenattr as _).ok() } } pub unsafe fn TestRating(&self, enshowsystem: EnTvRat_System, enshowlevel: EnTvRat_GenericLevel, lbfenshowattributes: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).TestRating)(windows_core::Interface::as_raw(self), enshowsystem, enshowlevel, lbfenshowattributes).ok() } @@ -16927,7 +16927,7 @@ impl IISDB_BIT { } } pub unsafe fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: Option<*mut u32>, ppdescriptor: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, pdwcookie.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(ppdescriptor)).ok() } } pub unsafe fn GetCountOfRecords(&self) -> windows_core::Result { unsafe { @@ -16954,7 +16954,7 @@ impl IISDB_BIT { } } pub unsafe fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: Option<*mut u32>, ppdescriptor: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, pdwcookie.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(ppdescriptor)).ok() } } pub unsafe fn GetVersionHash(&self) -> windows_core::Result { unsafe { @@ -17210,7 +17210,7 @@ impl IISDB_CDT { } } pub unsafe fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: Option<*mut u32>, ppdescriptor: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, pdwcookie.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(ppdescriptor)).ok() } } pub unsafe fn GetSizeOfDataModule(&self) -> windows_core::Result { unsafe { @@ -17439,16 +17439,16 @@ impl IISDB_EMM { } } pub unsafe fn GetDataBytes(&self, pwbufferlength: *mut u16, pbbuffer: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDataBytes)(windows_core::Interface::as_raw(self), core::mem::transmute(pwbufferlength), core::mem::transmute(pbbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDataBytes)(windows_core::Interface::as_raw(self), pwbufferlength as _, pbbuffer as _).ok() } } pub unsafe fn GetSharedEmmMessage(&self, pwlength: *mut u16, ppbmessage: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSharedEmmMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(pwlength), core::mem::transmute(ppbmessage)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSharedEmmMessage)(windows_core::Interface::as_raw(self), pwlength as _, ppbmessage as _).ok() } } pub unsafe fn GetIndividualEmmMessage(&self, punknown: P0, pwlength: *mut u16, ppbmessage: *mut *mut u8) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetIndividualEmmMessage)(windows_core::Interface::as_raw(self), punknown.param().abi(), core::mem::transmute(pwlength), core::mem::transmute(ppbmessage)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIndividualEmmMessage)(windows_core::Interface::as_raw(self), punknown.param().abi(), pwlength as _, ppbmessage as _).ok() } } pub unsafe fn GetVersionHash(&self) -> windows_core::Result { unsafe { @@ -17614,7 +17614,7 @@ impl IISDB_LDT { } } pub unsafe fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: Option<*mut u32>, ppdescriptor: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, pdwcookie.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(ppdescriptor)).ok() } } pub unsafe fn GetVersionHash(&self) -> windows_core::Result { unsafe { @@ -17876,7 +17876,7 @@ impl IISDB_NBIT { } } pub unsafe fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: Option<*mut u32>, ppdescriptor: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, pdwcookie.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(ppdescriptor)).ok() } } pub unsafe fn GetVersionHash(&self) -> windows_core::Result { unsafe { @@ -18273,7 +18273,7 @@ impl IISDB_SDTT { } } pub unsafe fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: Option<*mut u32>, ppdescriptor: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, pdwcookie.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(ppdescriptor)).ok() } } pub unsafe fn GetVersionHash(&self) -> windows_core::Result { unsafe { @@ -19128,7 +19128,7 @@ impl IIsdbCADescriptor { } } pub unsafe fn GetPrivateDataBytes(&self, pbbufferlength: *mut u8, pbbuffer: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPrivateDataBytes)(windows_core::Interface::as_raw(self), core::mem::transmute(pbbufferlength), core::mem::transmute(pbbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPrivateDataBytes)(windows_core::Interface::as_raw(self), pbbufferlength as _, pbbuffer as _).ok() } } } #[repr(C)] @@ -19266,7 +19266,7 @@ impl IIsdbCAServiceDescriptor { } } pub unsafe fn GetServiceIds(&self, pbnumserviceids: *mut u8, pwserviceids: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetServiceIds)(windows_core::Interface::as_raw(self), core::mem::transmute(pbnumserviceids), core::mem::transmute(pwserviceids)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetServiceIds)(windows_core::Interface::as_raw(self), pbnumserviceids as _, pwserviceids as _).ok() } } } #[repr(C)] @@ -19860,7 +19860,7 @@ impl IIsdbDigitalCopyControlDescriptor { } } pub unsafe fn GetCopyControl(&self, pbdigitalrecordingcontroldata: *mut u8, pbcopycontroltype: *mut u8, pbapscontroldata: *mut u8, pbmaximumbitrate: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCopyControl)(windows_core::Interface::as_raw(self), core::mem::transmute(pbdigitalrecordingcontroldata), core::mem::transmute(pbcopycontroltype), core::mem::transmute(pbapscontroldata), core::mem::transmute(pbmaximumbitrate)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCopyControl)(windows_core::Interface::as_raw(self), pbdigitalrecordingcontroldata as _, pbcopycontroltype as _, pbapscontroldata as _, pbmaximumbitrate as _).ok() } } pub unsafe fn GetCountOfRecords(&self) -> windows_core::Result { unsafe { @@ -19869,7 +19869,7 @@ impl IIsdbDigitalCopyControlDescriptor { } } pub unsafe fn GetRecordCopyControl(&self, brecordindex: u8, pbcomponenttag: *mut u8, pbdigitalrecordingcontroldata: *mut u8, pbcopycontroltype: *mut u8, pbapscontroldata: *mut u8, pbmaximumbitrate: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRecordCopyControl)(windows_core::Interface::as_raw(self), brecordindex, core::mem::transmute(pbcomponenttag), core::mem::transmute(pbdigitalrecordingcontroldata), core::mem::transmute(pbcopycontroltype), core::mem::transmute(pbapscontroldata), core::mem::transmute(pbmaximumbitrate)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecordCopyControl)(windows_core::Interface::as_raw(self), brecordindex, pbcomponenttag as _, pbdigitalrecordingcontroldata as _, pbcopycontroltype as _, pbapscontroldata as _, pbmaximumbitrate as _).ok() } } } #[repr(C)] @@ -19968,7 +19968,7 @@ impl IIsdbDownloadContentDescriptor { } } pub unsafe fn GetFlags(&self, pfreboot: *mut super::super::super::Foundation::BOOL, pfaddon: *mut super::super::super::Foundation::BOOL, pfcompatibility: *mut super::super::super::Foundation::BOOL, pfmoduleinfo: *mut super::super::super::Foundation::BOOL, pftextinfo: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(pfreboot), core::mem::transmute(pfaddon), core::mem::transmute(pfcompatibility), core::mem::transmute(pfmoduleinfo), core::mem::transmute(pftextinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFlags)(windows_core::Interface::as_raw(self), pfreboot as _, pfaddon as _, pfcompatibility as _, pfmoduleinfo as _, pftextinfo as _).ok() } } pub unsafe fn GetComponentSize(&self) -> windows_core::Result { unsafe { @@ -20352,7 +20352,7 @@ impl IIsdbEmergencyInformationDescriptor { } } pub unsafe fn GetAreaCode(&self, brecordindex: u8, ppwval: *mut *mut u16, pbnumareacodes: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAreaCode)(windows_core::Interface::as_raw(self), brecordindex, core::mem::transmute(ppwval), core::mem::transmute(pbnumareacodes)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAreaCode)(windows_core::Interface::as_raw(self), brecordindex, ppwval as _, pbnumareacodes as _).ok() } } } #[repr(C)] @@ -20499,7 +20499,7 @@ impl IIsdbEventGroupDescriptor { } } pub unsafe fn GetRecordEvent(&self, brecordindex: u8, pwserviceid: *mut u16, pweventid: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRecordEvent)(windows_core::Interface::as_raw(self), brecordindex, core::mem::transmute(pwserviceid), core::mem::transmute(pweventid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecordEvent)(windows_core::Interface::as_raw(self), brecordindex, pwserviceid as _, pweventid as _).ok() } } pub unsafe fn GetCountOfRefRecords(&self) -> windows_core::Result { unsafe { @@ -20508,7 +20508,7 @@ impl IIsdbEventGroupDescriptor { } } pub unsafe fn GetRefRecordEvent(&self, brecordindex: u8, pworiginalnetworkid: *mut u16, pwtransportstreamid: *mut u16, pwserviceid: *mut u16, pweventid: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRefRecordEvent)(windows_core::Interface::as_raw(self), brecordindex, core::mem::transmute(pworiginalnetworkid), core::mem::transmute(pwtransportstreamid), core::mem::transmute(pwserviceid), core::mem::transmute(pweventid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRefRecordEvent)(windows_core::Interface::as_raw(self), brecordindex, pworiginalnetworkid as _, pwtransportstreamid as _, pwserviceid as _, pweventid as _).ok() } } } #[repr(C)] @@ -20982,7 +20982,7 @@ impl IIsdbSIParameterDescriptor { } } pub unsafe fn GetTableDescriptionBytes(&self, brecordindex: u8, pbbufferlength: *mut u8, pbbuffer: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTableDescriptionBytes)(windows_core::Interface::as_raw(self), brecordindex, core::mem::transmute(pbbufferlength), core::mem::transmute(pbbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTableDescriptionBytes)(windows_core::Interface::as_raw(self), brecordindex, pbbufferlength as _, pbbuffer as _).ok() } } } #[repr(C)] @@ -21150,7 +21150,7 @@ impl IIsdbSeriesDescriptor { } } pub unsafe fn GetExpireDate(&self, pfvalid: *mut super::super::super::Foundation::BOOL, pmdtval: *mut MPEG_DATE_AND_TIME) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetExpireDate)(windows_core::Interface::as_raw(self), core::mem::transmute(pfvalid), core::mem::transmute(pmdtval)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetExpireDate)(windows_core::Interface::as_raw(self), pfvalid as _, pmdtval as _).ok() } } pub unsafe fn GetEpisodeNumber(&self) -> windows_core::Result { unsafe { @@ -21329,37 +21329,37 @@ impl IIsdbSiParser2 { pub unsafe fn GetSDT(&self, tableid: u8, pwtransportstreamid: Option<*const u16>) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetSDT)(windows_core::Interface::as_raw(self), tableid, core::mem::transmute(pwtransportstreamid.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetSDT)(windows_core::Interface::as_raw(self), tableid, pwtransportstreamid.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn GetBIT(&self, tableid: u8, pworiginalnetworkid: Option<*const u16>) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetBIT)(windows_core::Interface::as_raw(self), tableid, core::mem::transmute(pworiginalnetworkid.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetBIT)(windows_core::Interface::as_raw(self), tableid, pworiginalnetworkid.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn GetNBIT(&self, tableid: u8, pworiginalnetworkid: Option<*const u16>) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetNBIT)(windows_core::Interface::as_raw(self), tableid, core::mem::transmute(pworiginalnetworkid.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetNBIT)(windows_core::Interface::as_raw(self), tableid, pworiginalnetworkid.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn GetLDT(&self, tableid: u8, pworiginalserviceid: Option<*const u16>) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetLDT)(windows_core::Interface::as_raw(self), tableid, core::mem::transmute(pworiginalserviceid.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetLDT)(windows_core::Interface::as_raw(self), tableid, pworiginalserviceid.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn GetSDTT(&self, tableid: u8, pwtableidext: Option<*const u16>) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetSDTT)(windows_core::Interface::as_raw(self), tableid, core::mem::transmute(pwtableidext.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetSDTT)(windows_core::Interface::as_raw(self), tableid, pwtableidext.unwrap_or(core::mem::zeroed()) as _, &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 { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetCDT)(windows_core::Interface::as_raw(self), tableid, bsectionnumber, core::mem::transmute(pwdownloaddataid.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetCDT)(windows_core::Interface::as_raw(self), tableid, bsectionnumber, pwdownloaddataid.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn GetEMM(&self, pid: u16, wtableidext: u16) -> windows_core::Result { @@ -22581,7 +22581,7 @@ impl IMPEG2_TIF_CONTROL { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).RegisterTIF)(windows_core::Interface::as_raw(self), punktif.param().abi(), core::mem::transmute(ppvregistrationcontext)).ok() } + unsafe { (windows_core::Interface::vtable(self).RegisterTIF)(windows_core::Interface::as_raw(self), punktif.param().abi(), ppvregistrationcontext as _).ok() } } pub unsafe fn UnregisterTIF(&self, pvregistrationcontext: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UnregisterTIF)(windows_core::Interface::as_raw(self), pvregistrationcontext).ok() } @@ -22599,7 +22599,7 @@ impl IMPEG2_TIF_CONTROL { } } pub unsafe fn GetPIDs(&self, pulcpids: *mut u32, pulpids: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPIDs)(windows_core::Interface::as_raw(self), core::mem::transmute(pulcpids), core::mem::transmute(pulpids)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPIDs)(windows_core::Interface::as_raw(self), pulcpids as _, pulpids as _).ok() } } } #[repr(C)] @@ -22805,7 +22805,7 @@ impl IMSVidAnalogTuner { pub unsafe fn ChannelAvailable(&self, nchannel: i32, signalstrength: *mut i32) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).ChannelAvailable)(windows_core::Interface::as_raw(self), nchannel, core::mem::transmute(signalstrength), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).ChannelAvailable)(windows_core::Interface::as_raw(self), nchannel, signalstrength as _, &mut result__).map(|| result__) } } } @@ -28147,7 +28147,7 @@ impl IMSVidStreamBufferSource { } } pub unsafe fn CurrentRatings(&self, pensystem: *mut EnTvRat_System, penrating: *mut EnTvRat_GenericLevel, pbfenattr: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CurrentRatings)(windows_core::Interface::as_raw(self), core::mem::transmute(pensystem), core::mem::transmute(penrating), core::mem::transmute(pbfenattr)).ok() } + unsafe { (windows_core::Interface::vtable(self).CurrentRatings)(windows_core::Interface::as_raw(self), pensystem as _, penrating as _, pbfenattr as _).ok() } } pub unsafe fn MaxRatingsLevel(&self, ensystem: EnTvRat_System, enrating: EnTvRat_GenericLevel, lbfenattr: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).MaxRatingsLevel)(windows_core::Interface::as_raw(self), ensystem, enrating, lbfenattr).ok() } @@ -29173,7 +29173,7 @@ impl IMSVidVRGraphSegment { unsafe { (windows_core::Interface::vtable(self).SetDestination)(windows_core::Interface::as_raw(self), core::mem::transmute(r)).ok() } } pub unsafe fn get_NativeSize(&self, sizeval: *mut super::super::super::Foundation::SIZE, aspectratio: *mut super::super::super::Foundation::SIZE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_NativeSize)(windows_core::Interface::as_raw(self), core::mem::transmute(sizeval), core::mem::transmute(aspectratio)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_NativeSize)(windows_core::Interface::as_raw(self), sizeval as _, aspectratio as _).ok() } } pub unsafe fn BorderColor(&self) -> windows_core::Result { unsafe { @@ -32115,7 +32115,7 @@ windows_core::imp::interface_hierarchy!(IMSVidWebDVD2, windows_core::IUnknown, s #[cfg(feature = "Win32_System_Com")] impl IMSVidWebDVD2 { pub unsafe fn get_Bookmark(&self, ppdata: *mut *mut u8, pdatalength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_Bookmark)(windows_core::Interface::as_raw(self), core::mem::transmute(ppdata), core::mem::transmute(pdatalength)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_Bookmark)(windows_core::Interface::as_raw(self), ppdata as _, pdatalength as _).ok() } } pub unsafe fn put_Bookmark(&self, pdata: *const u8, dwdatalength: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_Bookmark)(windows_core::Interface::as_raw(self), pdata, dwdatalength).ok() } @@ -33329,7 +33329,7 @@ impl IPBDAAttributesDescriptor { } } pub unsafe fn GetAttributePayload(&self, ppbattributebuffer: *mut *mut u8, pdwattributelength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAttributePayload)(windows_core::Interface::as_raw(self), core::mem::transmute(ppbattributebuffer), core::mem::transmute(pdwattributelength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAttributePayload)(windows_core::Interface::as_raw(self), ppbattributebuffer as _, pdwattributelength as _).ok() } } } #[repr(C)] @@ -33404,7 +33404,7 @@ impl IPBDAEntitlementDescriptor { } } pub unsafe fn GetToken(&self, ppbtokenbuffer: *mut *mut u8, pdwtokenlength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetToken)(windows_core::Interface::as_raw(self), core::mem::transmute(ppbtokenbuffer), core::mem::transmute(pdwtokenlength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetToken)(windows_core::Interface::as_raw(self), ppbtokenbuffer as _, pdwtokenlength as _).ok() } } } #[repr(C)] @@ -33602,7 +33602,7 @@ impl IPBDA_EIT { } } pub unsafe fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie), core::mem::transmute(ppdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, pdwcookie as _, core::mem::transmute(ppdescriptor)).ok() } } } #[repr(C)] @@ -33891,7 +33891,7 @@ impl IPMT { } } pub unsafe fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, core::mem::transmute(pdwcookie), core::mem::transmute(ppdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, pdwcookie as _, core::mem::transmute(ppdescriptor)).ok() } } pub unsafe fn GetCountOfRecords(&self) -> windows_core::Result { unsafe { @@ -33924,13 +33924,13 @@ impl IPMT { } } pub unsafe fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie), core::mem::transmute(ppdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, pdwcookie as _, core::mem::transmute(ppdescriptor)).ok() } } pub unsafe fn QueryServiceGatewayInfo(&self, ppdsmcclist: *mut *mut DSMCC_ELEMENT, puicount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryServiceGatewayInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(ppdsmcclist), core::mem::transmute(puicount)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryServiceGatewayInfo)(windows_core::Interface::as_raw(self), ppdsmcclist as _, puicount as _).ok() } } pub unsafe fn QueryMPEInfo(&self, ppmpelist: *mut *mut MPE_ELEMENT, puicount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryMPEInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(ppmpelist), core::mem::transmute(puicount)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryMPEInfo)(windows_core::Interface::as_raw(self), ppmpelist as _, puicount as _).ok() } } pub unsafe fn RegisterForNextTable(&self, hnexttableavailable: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RegisterForNextTable)(windows_core::Interface::as_raw(self), hnexttableavailable).ok() } @@ -34544,7 +34544,7 @@ impl ISBE2Crossbar { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SetOutputProfile)(windows_core::Interface::as_raw(self), pprofile.param().abi(), core::mem::transmute(pcoutputpins), core::mem::transmute(ppoutputpins)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetOutputProfile)(windows_core::Interface::as_raw(self), pprofile.param().abi(), pcoutputpins as _, core::mem::transmute(ppoutputpins)).ok() } } pub unsafe fn EnumStreams(&self) -> windows_core::Result { unsafe { @@ -34622,7 +34622,7 @@ windows_core::imp::define_interface!(ISBE2EnumStream, ISBE2EnumStream_Vtbl, 0xf7 windows_core::imp::interface_hierarchy!(ISBE2EnumStream, windows_core::IUnknown); impl ISBE2EnumStream { pub unsafe fn Next(&self, pstreamdesc: &mut [SBE2_STREAM_DESC], pcreceived: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pstreamdesc.len().try_into().unwrap(), core::mem::transmute(pstreamdesc.as_ptr()), core::mem::transmute(pcreceived)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pstreamdesc.len().try_into().unwrap(), core::mem::transmute(pstreamdesc.as_ptr()), pcreceived as _).ok() } } pub unsafe fn Skip(&self, crecords: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), crecords).ok() } @@ -34733,7 +34733,7 @@ windows_core::imp::define_interface!(ISBE2GlobalEvent, ISBE2GlobalEvent_Vtbl, 0x windows_core::imp::interface_hierarchy!(ISBE2GlobalEvent, windows_core::IUnknown); impl ISBE2GlobalEvent { pub unsafe fn GetEvent(&self, idevt: *const windows_core::GUID, param1: u32, param2: u32, param3: u32, param4: u32, pspanning: *mut super::super::super::Foundation::BOOL, pcb: *mut u32, pb: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEvent)(windows_core::Interface::as_raw(self), idevt, param1, param2, param3, param4, core::mem::transmute(pspanning), core::mem::transmute(pcb), core::mem::transmute(pb)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEvent)(windows_core::Interface::as_raw(self), idevt, param1, param2, param3, param4, pspanning as _, pcb as _, pb as _).ok() } } } #[repr(C)] @@ -34769,7 +34769,7 @@ impl core::ops::Deref for ISBE2GlobalEvent2 { windows_core::imp::interface_hierarchy!(ISBE2GlobalEvent2, windows_core::IUnknown, ISBE2GlobalEvent); impl ISBE2GlobalEvent2 { pub unsafe fn GetEventEx(&self, idevt: *const windows_core::GUID, param1: u32, param2: u32, param3: u32, param4: u32, pspanning: *mut super::super::super::Foundation::BOOL, pcb: *mut u32, pb: *mut u8, pstreamtime: *mut i64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEventEx)(windows_core::Interface::as_raw(self), idevt, param1, param2, param3, param4, core::mem::transmute(pspanning), core::mem::transmute(pcb), core::mem::transmute(pb), core::mem::transmute(pstreamtime)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventEx)(windows_core::Interface::as_raw(self), idevt, param1, param2, param3, param4, pspanning as _, pcb as _, pb as _, pstreamtime as _).ok() } } } #[repr(C)] @@ -34897,7 +34897,7 @@ windows_core::imp::define_interface!(ISBE2SpanningEvent, ISBE2SpanningEvent_Vtbl windows_core::imp::interface_hierarchy!(ISBE2SpanningEvent, windows_core::IUnknown); impl ISBE2SpanningEvent { pub unsafe fn GetEvent(&self, idevt: *const windows_core::GUID, streamid: u32, pcb: *mut u32, pb: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEvent)(windows_core::Interface::as_raw(self), idevt, streamid, core::mem::transmute(pcb), core::mem::transmute(pb)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEvent)(windows_core::Interface::as_raw(self), idevt, streamid, pcb as _, pb as _).ok() } } } #[repr(C)] @@ -35132,7 +35132,7 @@ impl ISCTE_EAS { } } pub unsafe fn GetLocationCodes(&self, bindex: u8, pbstate: *mut u8, pbcountysubdivision: *mut u8, pwcounty: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLocationCodes)(windows_core::Interface::as_raw(self), bindex, core::mem::transmute(pbstate), core::mem::transmute(pbcountysubdivision), core::mem::transmute(pwcounty)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLocationCodes)(windows_core::Interface::as_raw(self), bindex, pbstate as _, pbcountysubdivision as _, pwcounty as _).ok() } } pub unsafe fn GetExceptionCount(&self) -> windows_core::Result { unsafe { @@ -35141,7 +35141,7 @@ impl ISCTE_EAS { } } pub unsafe fn GetExceptionService(&self, bindex: u8, pbibref: *mut u8, pwfirst: *mut u16, pwsecond: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetExceptionService)(windows_core::Interface::as_raw(self), bindex, core::mem::transmute(pbibref), core::mem::transmute(pwfirst), core::mem::transmute(pwsecond)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetExceptionService)(windows_core::Interface::as_raw(self), bindex, pbibref as _, pwfirst as _, pwsecond as _).ok() } } pub unsafe fn GetCountOfTableDescriptors(&self) -> windows_core::Result { unsafe { @@ -35156,7 +35156,7 @@ impl ISCTE_EAS { } } pub unsafe fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, core::mem::transmute(pdwcookie), core::mem::transmute(ppdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, pdwcookie as _, core::mem::transmute(ppdescriptor)).ok() } } } #[repr(C)] @@ -35822,13 +35822,13 @@ impl IScanningTunerEx { unsafe { (windows_core::Interface::vtable(self).ResumeCurrentScan)(windows_core::Interface::as_raw(self), hevent).ok() } } pub unsafe fn GetTunerScanningCapability(&self, hardwareassistedscanning: *mut i32, numstandardssupported: *mut i32, broadcaststandards: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTunerScanningCapability)(windows_core::Interface::as_raw(self), core::mem::transmute(hardwareassistedscanning), core::mem::transmute(numstandardssupported), core::mem::transmute(broadcaststandards)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTunerScanningCapability)(windows_core::Interface::as_raw(self), hardwareassistedscanning as _, numstandardssupported as _, broadcaststandards as _).ok() } } pub unsafe fn GetTunerStatus(&self, secondsleft: *mut i32, currentlocktype: *mut i32, autodetect: *mut i32, currentfreq: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTunerStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(secondsleft), core::mem::transmute(currentlocktype), core::mem::transmute(autodetect), core::mem::transmute(currentfreq)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTunerStatus)(windows_core::Interface::as_raw(self), secondsleft as _, currentlocktype as _, autodetect as _, currentfreq as _).ok() } } pub unsafe fn GetCurrentTunerStandardCapability(&self, currentbroadcaststandard: windows_core::GUID, settlingtime: *mut i32, tvstandardssupported: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrentTunerStandardCapability)(windows_core::Interface::as_raw(self), core::mem::transmute(currentbroadcaststandard), core::mem::transmute(settlingtime), core::mem::transmute(tvstandardssupported)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentTunerStandardCapability)(windows_core::Interface::as_raw(self), core::mem::transmute(currentbroadcaststandard), settlingtime as _, tvstandardssupported as _).ok() } } pub unsafe fn SetScanSignalTypeFilter(&self, scanmodulationtypes: i32, analogvideostandard: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetScanSignalTypeFilter)(windows_core::Interface::as_raw(self), scanmodulationtypes, analogvideostandard).ok() } @@ -35957,7 +35957,7 @@ impl ISectionList { } } pub unsafe fn GetSectionData(&self, sectionnumber: u16, pdwrawpacketlength: *mut u32, ppsection: *mut *mut SECTION) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSectionData)(windows_core::Interface::as_raw(self), sectionnumber, core::mem::transmute(pdwrawpacketlength), core::mem::transmute(ppsection)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSectionData)(windows_core::Interface::as_raw(self), sectionnumber, pdwrawpacketlength as _, ppsection as _).ok() } } pub unsafe fn GetProgramIdentifier(&self, ppid: *const u16) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetProgramIdentifier)(windows_core::Interface::as_raw(self), ppid).ok() } @@ -36188,7 +36188,7 @@ impl IStreamBufferConfigure { unsafe { (windows_core::Interface::vtable(self).SetBackingFileCount)(windows_core::Interface::as_raw(self), dwmin, dwmax).ok() } } pub unsafe fn GetBackingFileCount(&self, pdwmin: *mut u32, pdwmax: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBackingFileCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmin), core::mem::transmute(pdwmax)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBackingFileCount)(windows_core::Interface::as_raw(self), pdwmin as _, pdwmax as _).ok() } } pub unsafe fn SetBackingFileDuration(&self, dwseconds: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetBackingFileDuration)(windows_core::Interface::as_raw(self), dwseconds).ok() } @@ -36305,7 +36305,7 @@ impl IStreamBufferConfigure2 { unsafe { (windows_core::Interface::vtable(self).SetFFTransitionRates)(windows_core::Interface::as_raw(self), dwmaxfullframerate, dwmaxnonskippingrate).ok() } } pub unsafe fn GetFFTransitionRates(&self, pdwmaxfullframerate: *mut u32, pdwmaxnonskippingrate: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFFTransitionRates)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmaxfullframerate), core::mem::transmute(pdwmaxnonskippingrate)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFFTransitionRates)(windows_core::Interface::as_raw(self), pdwmaxfullframerate as _, pdwmaxnonskippingrate as _).ok() } } } #[repr(C)] @@ -36467,7 +36467,7 @@ windows_core::imp::define_interface!(IStreamBufferDataCounters, IStreamBufferDat windows_core::imp::interface_hierarchy!(IStreamBufferDataCounters, windows_core::IUnknown); impl IStreamBufferDataCounters { pub unsafe fn GetData(&self, ppindata: *mut SBE_PIN_DATA) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), core::mem::transmute(ppindata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), ppindata as _).ok() } } pub unsafe fn ResetData(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ResetData)(windows_core::Interface::as_raw(self)).ok() } @@ -36513,7 +36513,7 @@ impl IStreamBufferInitialize { } #[cfg(feature = "Win32_Security")] pub unsafe fn SetSIDs(&self, csids: u32, ppsid: *mut super::super::super::Security::PSID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetSIDs)(windows_core::Interface::as_raw(self), csids, core::mem::transmute(ppsid)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetSIDs)(windows_core::Interface::as_raw(self), csids, ppsid as _).ok() } } } #[repr(C)] @@ -36730,13 +36730,13 @@ windows_core::imp::define_interface!(IStreamBufferRecordControl, IStreamBufferRe windows_core::imp::interface_hierarchy!(IStreamBufferRecordControl, windows_core::IUnknown); impl IStreamBufferRecordControl { pub unsafe fn Start(&self, prtstart: *mut i64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Start)(windows_core::Interface::as_raw(self), core::mem::transmute(prtstart)).ok() } + unsafe { (windows_core::Interface::vtable(self).Start)(windows_core::Interface::as_raw(self), prtstart as _).ok() } } pub unsafe fn Stop(&self, rtstop: i64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Stop)(windows_core::Interface::as_raw(self), rtstop).ok() } } pub unsafe fn GetRecordingStatus(&self, phresult: *mut windows_core::HRESULT, pbstarted: *mut super::super::super::Foundation::BOOL, pbstopped: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRecordingStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(phresult), core::mem::transmute(pbstarted), core::mem::transmute(pbstopped)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecordingStatus)(windows_core::Interface::as_raw(self), phresult as _, pbstarted as _, pbstopped as _).ok() } } } #[repr(C)] @@ -36802,10 +36802,10 @@ impl IStreamBufferRecordingAttribute { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetAttributeByName)(windows_core::Interface::as_raw(self), pszattributename.param().abi(), pulreserved, core::mem::transmute(pstreambufferattributetype), core::mem::transmute(pbattribute), core::mem::transmute(pcblength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAttributeByName)(windows_core::Interface::as_raw(self), pszattributename.param().abi(), pulreserved, pstreambufferattributetype as _, pbattribute as _, pcblength as _).ok() } } pub unsafe fn GetAttributeByIndex(&self, windex: u16, pulreserved: *const u32, pszattributename: windows_core::PWSTR, pcchnamelength: *mut u16, pstreambufferattributetype: *mut STREAMBUFFER_ATTR_DATATYPE, pbattribute: *mut u8, pcblength: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAttributeByIndex)(windows_core::Interface::as_raw(self), windex, pulreserved, core::mem::transmute(pszattributename), core::mem::transmute(pcchnamelength), core::mem::transmute(pstreambufferattributetype), core::mem::transmute(pbattribute), core::mem::transmute(pcblength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAttributeByIndex)(windows_core::Interface::as_raw(self), windex, pulreserved, core::mem::transmute(pszattributename), pcchnamelength as _, pstreambufferattributetype as _, pbattribute as _, pcblength as _).ok() } } pub unsafe fn EnumAttributes(&self) -> windows_core::Result { unsafe { @@ -37006,7 +37006,7 @@ impl core::ops::Deref for IStreamBufferSink3 { windows_core::imp::interface_hierarchy!(IStreamBufferSink3, windows_core::IUnknown, IStreamBufferSink, IStreamBufferSink2); impl IStreamBufferSink3 { pub unsafe fn SetAvailableFilter(&self, prtmin: *mut i64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetAvailableFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(prtmin)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetAvailableFilter)(windows_core::Interface::as_raw(self), prtmin as _).ok() } } } #[repr(C)] @@ -37094,7 +37094,7 @@ impl ITSDT { } } pub unsafe fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, core::mem::transmute(pdwcookie), core::mem::transmute(ppdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, pdwcookie as _, core::mem::transmute(ppdescriptor)).ok() } } pub unsafe fn RegisterForNextTable(&self, hnexttableavailable: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RegisterForNextTable)(windows_core::Interface::as_raw(self), hnexttableavailable).ok() } @@ -37849,13 +37849,13 @@ windows_core::imp::define_interface!(ITunerCap, ITunerCap_Vtbl, 0xe60dfa45_8d56_ windows_core::imp::interface_hierarchy!(ITunerCap, windows_core::IUnknown); impl ITunerCap { pub unsafe fn get_SupportedNetworkTypes(&self, ulcnetworktypesmax: u32, pulcnetworktypes: *mut u32, pguidnetworktypes: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_SupportedNetworkTypes)(windows_core::Interface::as_raw(self), ulcnetworktypesmax, core::mem::transmute(pulcnetworktypes), core::mem::transmute(pguidnetworktypes)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_SupportedNetworkTypes)(windows_core::Interface::as_raw(self), ulcnetworktypesmax, pulcnetworktypes as _, pguidnetworktypes as _).ok() } } pub unsafe fn get_SupportedVideoFormats(&self, pulamtunermodetype: *mut u32, pulanalogvideostandard: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_SupportedVideoFormats)(windows_core::Interface::as_raw(self), core::mem::transmute(pulamtunermodetype), core::mem::transmute(pulanalogvideostandard)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_SupportedVideoFormats)(windows_core::Interface::as_raw(self), pulamtunermodetype as _, pulanalogvideostandard as _).ok() } } pub unsafe fn get_AuxInputCount(&self, pulcompositecount: *mut u32, pulsvideocount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_AuxInputCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pulcompositecount), core::mem::transmute(pulsvideocount)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_AuxInputCount)(windows_core::Interface::as_raw(self), pulcompositecount as _, pulsvideocount as _).ok() } } } #[repr(C)] @@ -38782,10 +38782,10 @@ impl IXDSCodec { } } pub unsafe fn GetContentAdvisoryRating(&self, prat: *mut i32, ppktseqid: *mut i32, pcallseqid: *mut i32, ptimestart: *mut i64, ptimeend: *mut i64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetContentAdvisoryRating)(windows_core::Interface::as_raw(self), core::mem::transmute(prat), core::mem::transmute(ppktseqid), core::mem::transmute(pcallseqid), core::mem::transmute(ptimestart), core::mem::transmute(ptimeend)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetContentAdvisoryRating)(windows_core::Interface::as_raw(self), prat as _, ppktseqid as _, pcallseqid as _, ptimestart as _, ptimeend as _).ok() } } pub unsafe fn GetXDSPacket(&self, pxdsclasspkt: *mut i32, pxdstypepkt: *mut i32, pbstrxdspkt: *mut windows_core::BSTR, ppktseqid: *mut i32, pcallseqid: *mut i32, ptimestart: *mut i64, ptimeend: *mut i64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetXDSPacket)(windows_core::Interface::as_raw(self), core::mem::transmute(pxdsclasspkt), core::mem::transmute(pxdstypepkt), core::mem::transmute(pbstrxdspkt), core::mem::transmute(ppktseqid), core::mem::transmute(pcallseqid), core::mem::transmute(ptimestart), core::mem::transmute(ptimeend)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetXDSPacket)(windows_core::Interface::as_raw(self), pxdsclasspkt as _, pxdstypepkt as _, core::mem::transmute(pbstrxdspkt), ppktseqid as _, pcallseqid as _, ptimestart as _, ptimeend as _).ok() } } pub unsafe fn GetCurrLicenseExpDate(&self, prottype: *const ProtType) -> windows_core::Result { unsafe { @@ -38995,7 +38995,7 @@ impl IXDSToRat { unsafe { (windows_core::Interface::vtable(self).Init)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn ParseXDSBytePair(&self, byte1: u8, byte2: u8, pensystem: *mut EnTvRat_System, penlevel: *mut EnTvRat_GenericLevel, plbfenattributes: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ParseXDSBytePair)(windows_core::Interface::as_raw(self), byte1, byte2, core::mem::transmute(pensystem), core::mem::transmute(penlevel), core::mem::transmute(plbfenattributes)).ok() } + unsafe { (windows_core::Interface::vtable(self).ParseXDSBytePair)(windows_core::Interface::as_raw(self), byte1, byte2, pensystem as _, penlevel as _, plbfenattributes as _).ok() } } } #[cfg(feature = "Win32_System_Com")] 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 5f204240fb..b158b0ee11 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/DirectShow/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/DirectShow/mod.rs @@ -4764,7 +4764,7 @@ windows_core::imp::define_interface!(IAMAudioRendererStats, IAMAudioRendererStat windows_core::imp::interface_hierarchy!(IAMAudioRendererStats, windows_core::IUnknown); impl IAMAudioRendererStats { pub unsafe fn GetStatParam(&self, dwparam: u32, pdwparam1: *mut u32, pdwparam2: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStatParam)(windows_core::Interface::as_raw(self), dwparam, core::mem::transmute(pdwparam1), core::mem::transmute(pdwparam2)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStatParam)(windows_core::Interface::as_raw(self), dwparam, pdwparam1 as _, pdwparam2 as _).ok() } } } #[repr(C)] @@ -4848,13 +4848,13 @@ windows_core::imp::define_interface!(IAMCameraControl, IAMCameraControl_Vtbl, 0x windows_core::imp::interface_hierarchy!(IAMCameraControl, windows_core::IUnknown); impl IAMCameraControl { pub unsafe fn GetRange(&self, property: i32, pmin: *mut i32, pmax: *mut i32, psteppingdelta: *mut i32, pdefault: *mut i32, pcapsflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRange)(windows_core::Interface::as_raw(self), property, core::mem::transmute(pmin), core::mem::transmute(pmax), core::mem::transmute(psteppingdelta), core::mem::transmute(pdefault), core::mem::transmute(pcapsflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRange)(windows_core::Interface::as_raw(self), property, pmin as _, pmax as _, psteppingdelta as _, pdefault as _, pcapsflags as _).ok() } } pub unsafe fn Set(&self, property: i32, lvalue: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Set)(windows_core::Interface::as_raw(self), property, lvalue, flags).ok() } } pub unsafe fn Get(&self, property: i32, lvalue: *mut i32, flags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Get)(windows_core::Interface::as_raw(self), property, core::mem::transmute(lvalue), core::mem::transmute(flags)).ok() } + unsafe { (windows_core::Interface::vtable(self).Get)(windows_core::Interface::as_raw(self), property, lvalue as _, flags as _).ok() } } } #[repr(C)] @@ -4905,7 +4905,7 @@ windows_core::imp::define_interface!(IAMCertifiedOutputProtection, IAMCertifiedO windows_core::imp::interface_hierarchy!(IAMCertifiedOutputProtection, windows_core::IUnknown); impl IAMCertifiedOutputProtection { pub unsafe fn KeyExchange(&self, prandom: *mut windows_core::GUID, varlencertgh: *mut *mut u8, pdwlengthcertgh: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).KeyExchange)(windows_core::Interface::as_raw(self), core::mem::transmute(prandom), core::mem::transmute(varlencertgh), core::mem::transmute(pdwlengthcertgh)).ok() } + unsafe { (windows_core::Interface::vtable(self).KeyExchange)(windows_core::Interface::as_raw(self), prandom as _, varlencertgh as _, pdwlengthcertgh as _).ok() } } pub unsafe fn SessionSequenceStart(&self, psig: *const AMCOPPSignature) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SessionSequenceStart)(windows_core::Interface::as_raw(self), psig).ok() } @@ -4914,7 +4914,7 @@ impl IAMCertifiedOutputProtection { unsafe { (windows_core::Interface::vtable(self).ProtectionCommand)(windows_core::Interface::as_raw(self), cmd).ok() } } pub unsafe fn ProtectionStatus(&self, pstatusinput: *const AMCOPPStatusInput, pstatusoutput: *mut AMCOPPStatusOutput) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ProtectionStatus)(windows_core::Interface::as_raw(self), pstatusinput, core::mem::transmute(pstatusoutput)).ok() } + unsafe { (windows_core::Interface::vtable(self).ProtectionStatus)(windows_core::Interface::as_raw(self), pstatusinput, pstatusoutput as _).ok() } } } #[repr(C)] @@ -5293,7 +5293,7 @@ windows_core::imp::define_interface!(IAMCrossbar, IAMCrossbar_Vtbl, 0xc6e13380_3 windows_core::imp::interface_hierarchy!(IAMCrossbar, windows_core::IUnknown); impl IAMCrossbar { pub unsafe fn get_PinCounts(&self, outputpincount: *mut i32, inputpincount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_PinCounts)(windows_core::Interface::as_raw(self), core::mem::transmute(outputpincount), core::mem::transmute(inputpincount)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_PinCounts)(windows_core::Interface::as_raw(self), outputpincount as _, inputpincount as _).ok() } } pub unsafe fn CanRoute(&self, outputpinindex: i32, inputpinindex: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).CanRoute)(windows_core::Interface::as_raw(self), outputpinindex, inputpinindex).ok() } @@ -5308,7 +5308,7 @@ impl IAMCrossbar { } } pub unsafe fn get_CrossbarPinInfo(&self, isinputpin: bool, pinindex: i32, pinindexrelated: *mut i32, physicaltype: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_CrossbarPinInfo)(windows_core::Interface::as_raw(self), isinputpin.into(), pinindex, core::mem::transmute(pinindexrelated), core::mem::transmute(physicaltype)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_CrossbarPinInfo)(windows_core::Interface::as_raw(self), isinputpin.into(), pinindex, pinindexrelated as _, physicaltype as _).ok() } } } #[repr(C)] @@ -5422,13 +5422,13 @@ windows_core::imp::define_interface!(IAMDevMemoryAllocator, IAMDevMemoryAllocato windows_core::imp::interface_hierarchy!(IAMDevMemoryAllocator, windows_core::IUnknown); impl IAMDevMemoryAllocator { pub unsafe fn GetInfo(&self, pdwcbtotalfree: *mut u32, pdwcblargestfree: *mut u32, pdwcbtotalmemory: *mut u32, pdwcbminimumchunk: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwcbtotalfree), core::mem::transmute(pdwcblargestfree), core::mem::transmute(pdwcbtotalmemory), core::mem::transmute(pdwcbminimumchunk)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInfo)(windows_core::Interface::as_raw(self), pdwcbtotalfree as _, pdwcblargestfree as _, pdwcbtotalmemory as _, pdwcbminimumchunk as _).ok() } } pub unsafe fn CheckMemory(&self, pbuffer: *const u8) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).CheckMemory)(windows_core::Interface::as_raw(self), pbuffer).ok() } } pub unsafe fn Alloc(&self, ppbuffer: *mut *mut u8, pdwcbbuffer: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Alloc)(windows_core::Interface::as_raw(self), core::mem::transmute(ppbuffer), core::mem::transmute(pdwcbbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).Alloc)(windows_core::Interface::as_raw(self), ppbuffer as _, pdwcbbuffer as _).ok() } } pub unsafe fn Free(&self, pbuffer: *const u8) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Free)(windows_core::Interface::as_raw(self), pbuffer).ok() } @@ -5572,7 +5572,7 @@ windows_core::imp::define_interface!(IAMDeviceRemoval, IAMDeviceRemoval_Vtbl, 0x windows_core::imp::interface_hierarchy!(IAMDeviceRemoval, windows_core::IUnknown); impl IAMDeviceRemoval { pub unsafe fn DeviceInfo(&self, pclsidinterfaceclass: *mut windows_core::GUID, pwszsymboliclink: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DeviceInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pclsidinterfaceclass), core::mem::transmute(pwszsymboliclink)).ok() } + unsafe { (windows_core::Interface::vtable(self).DeviceInfo)(windows_core::Interface::as_raw(self), pclsidinterfaceclass as _, pwszsymboliclink as _).ok() } } pub unsafe fn Reassociate(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reassociate)(windows_core::Interface::as_raw(self)).ok() } @@ -5674,7 +5674,7 @@ impl IAMDirectSound { unsafe { (windows_core::Interface::vtable(self).SetFocusWindow)(windows_core::Interface::as_raw(self), param0, param1.into()).ok() } } pub unsafe fn GetFocusWindow(&self, param0: *mut super::super::Foundation::HWND, param1: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFocusWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFocusWindow)(windows_core::Interface::as_raw(self), param0 as _, param1 as _).ok() } } } #[repr(C)] @@ -5821,7 +5821,7 @@ impl IAMDroppedFrames { } } pub unsafe fn GetDroppedInfo(&self, lsize: i32, plarray: *mut i32, plnumcopied: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDroppedInfo)(windows_core::Interface::as_raw(self), lsize, core::mem::transmute(plarray), core::mem::transmute(plnumcopied)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDroppedInfo)(windows_core::Interface::as_raw(self), lsize, plarray as _, plnumcopied as _).ok() } } pub unsafe fn GetAverageFrameSize(&self) -> windows_core::Result { unsafe { @@ -5905,7 +5905,7 @@ windows_core::imp::define_interface!(IAMExtDevice, IAMExtDevice_Vtbl, 0xb5730a90 windows_core::imp::interface_hierarchy!(IAMExtDevice, windows_core::IUnknown); impl IAMExtDevice { pub unsafe fn GetCapability(&self, capability: i32, pvalue: *mut i32, pdblvalue: *mut f64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCapability)(windows_core::Interface::as_raw(self), capability, core::mem::transmute(pvalue), core::mem::transmute(pdblvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCapability)(windows_core::Interface::as_raw(self), capability, pvalue as _, pdblvalue as _).ok() } } pub unsafe fn ExternalDeviceID(&self) -> windows_core::Result { unsafe { @@ -6067,7 +6067,7 @@ windows_core::imp::define_interface!(IAMExtTransport, IAMExtTransport_Vtbl, 0xa0 windows_core::imp::interface_hierarchy!(IAMExtTransport, windows_core::IUnknown); impl IAMExtTransport { pub unsafe fn GetCapability(&self, capability: i32, pvalue: *mut i32, pdblvalue: *mut f64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCapability)(windows_core::Interface::as_raw(self), capability, core::mem::transmute(pvalue), core::mem::transmute(pdblvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCapability)(windows_core::Interface::as_raw(self), capability, pvalue as _, pdblvalue as _).ok() } } pub unsafe fn SetMediaState(&self, state: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetMediaState)(windows_core::Interface::as_raw(self), state).ok() } @@ -6094,7 +6094,7 @@ impl IAMExtTransport { } } pub unsafe fn GetTransportBasicParameters(&self, param: i32, pvalue: *mut i32, ppszdata: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTransportBasicParameters)(windows_core::Interface::as_raw(self), param, core::mem::transmute(pvalue), core::mem::transmute(ppszdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTransportBasicParameters)(windows_core::Interface::as_raw(self), param, pvalue as _, ppszdata as _).ok() } } pub unsafe fn SetTransportBasicParameters(&self, param: i32, value: i32, pszdata: P2) -> windows_core::Result<()> where @@ -6139,13 +6139,13 @@ impl IAMExtTransport { } } pub unsafe fn GetChase(&self, penabled: *mut i32, poffset: *mut i32, phevent: *mut usize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetChase)(windows_core::Interface::as_raw(self), core::mem::transmute(penabled), core::mem::transmute(poffset), core::mem::transmute(phevent)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetChase)(windows_core::Interface::as_raw(self), penabled as _, poffset as _, phevent as _).ok() } } pub unsafe fn SetChase(&self, enable: i32, offset: i32, hevent: usize) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetChase)(windows_core::Interface::as_raw(self), enable, offset, hevent).ok() } } pub unsafe fn GetBump(&self, pspeed: *mut i32, pduration: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBump)(windows_core::Interface::as_raw(self), core::mem::transmute(pspeed), core::mem::transmute(pduration)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBump)(windows_core::Interface::as_raw(self), pspeed as _, pduration as _).ok() } } pub unsafe fn SetBump(&self, speed: i32, duration: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetBump)(windows_core::Interface::as_raw(self), speed, duration).ok() } @@ -6166,7 +6166,7 @@ impl IAMExtTransport { } } pub unsafe fn SetEditPropertySet(&self, peditid: *mut i32, state: i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetEditPropertySet)(windows_core::Interface::as_raw(self), core::mem::transmute(peditid), state).ok() } + unsafe { (windows_core::Interface::vtable(self).SetEditPropertySet)(windows_core::Interface::as_raw(self), peditid as _, state).ok() } } pub unsafe fn GetEditProperty(&self, editid: i32, param: i32) -> windows_core::Result { unsafe { @@ -6536,13 +6536,13 @@ windows_core::imp::interface_hierarchy!(IAMExtendedErrorInfo, windows_core::IUnk #[cfg(feature = "Win32_System_Com")] impl IAMExtendedErrorInfo { pub unsafe fn HasError(&self, phaserror: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).HasError)(windows_core::Interface::as_raw(self), core::mem::transmute(phaserror)).ok() } + unsafe { (windows_core::Interface::vtable(self).HasError)(windows_core::Interface::as_raw(self), phaserror as _).ok() } } pub unsafe fn ErrorDescription(&self, pbstrerrordescription: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ErrorDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrerrordescription)).ok() } } pub unsafe fn ErrorCode(&self, perrorcode: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ErrorCode)(windows_core::Interface::as_raw(self), core::mem::transmute(perrorcode)).ok() } + unsafe { (windows_core::Interface::vtable(self).ErrorCode)(windows_core::Interface::as_raw(self), perrorcode as _).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -6607,16 +6607,16 @@ windows_core::imp::interface_hierarchy!(IAMExtendedSeeking, windows_core::IUnkno #[cfg(feature = "Win32_System_Com")] impl IAMExtendedSeeking { pub unsafe fn ExSeekCapabilities(&self, pexcapabilities: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ExSeekCapabilities)(windows_core::Interface::as_raw(self), core::mem::transmute(pexcapabilities)).ok() } + unsafe { (windows_core::Interface::vtable(self).ExSeekCapabilities)(windows_core::Interface::as_raw(self), pexcapabilities as _).ok() } } pub unsafe fn MarkerCount(&self, pmarkercount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).MarkerCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pmarkercount)).ok() } + unsafe { (windows_core::Interface::vtable(self).MarkerCount)(windows_core::Interface::as_raw(self), pmarkercount as _).ok() } } pub unsafe fn CurrentMarker(&self, pcurrentmarker: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CurrentMarker)(windows_core::Interface::as_raw(self), core::mem::transmute(pcurrentmarker)).ok() } + unsafe { (windows_core::Interface::vtable(self).CurrentMarker)(windows_core::Interface::as_raw(self), pcurrentmarker as _).ok() } } pub unsafe fn GetMarkerTime(&self, markernum: i32, pmarkertime: *mut f64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMarkerTime)(windows_core::Interface::as_raw(self), markernum, core::mem::transmute(pmarkertime)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMarkerTime)(windows_core::Interface::as_raw(self), markernum, pmarkertime as _).ok() } } pub unsafe fn GetMarkerName(&self, markernum: i32, pbstrmarkername: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetMarkerName)(windows_core::Interface::as_raw(self), markernum, core::mem::transmute(pbstrmarkername)).ok() } @@ -6625,7 +6625,7 @@ impl IAMExtendedSeeking { unsafe { (windows_core::Interface::vtable(self).SetPlaybackSpeed)(windows_core::Interface::as_raw(self), speed).ok() } } pub unsafe fn PlaybackSpeed(&self, pspeed: *mut f64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).PlaybackSpeed)(windows_core::Interface::as_raw(self), core::mem::transmute(pspeed)).ok() } + unsafe { (windows_core::Interface::vtable(self).PlaybackSpeed)(windows_core::Interface::as_raw(self), pspeed as _).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -6844,7 +6844,7 @@ impl IAMGraphStreams { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindUpstreamInterface)(windows_core::Interface::as_raw(self), ppin.param().abi(), riid, core::mem::transmute(ppvinterface), dwflags).ok() } + unsafe { (windows_core::Interface::vtable(self).FindUpstreamInterface)(windows_core::Interface::as_raw(self), ppin.param().abi(), riid, ppvinterface as _, dwflags).ok() } } pub unsafe fn SyncUsingStreamOffset(&self, busestreamoffset: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SyncUsingStreamOffset)(windows_core::Interface::as_raw(self), busestreamoffset.into()).ok() } @@ -6940,42 +6940,42 @@ windows_core::imp::define_interface!(IAMLine21Decoder, IAMLine21Decoder_Vtbl, 0x windows_core::imp::interface_hierarchy!(IAMLine21Decoder, windows_core::IUnknown); impl IAMLine21Decoder { pub unsafe fn GetDecoderLevel(&self, lplevel: *mut AM_LINE21_CCLEVEL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDecoderLevel)(windows_core::Interface::as_raw(self), core::mem::transmute(lplevel)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDecoderLevel)(windows_core::Interface::as_raw(self), lplevel as _).ok() } } pub unsafe fn GetCurrentService(&self, lpservice: *mut AM_LINE21_CCSERVICE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrentService)(windows_core::Interface::as_raw(self), core::mem::transmute(lpservice)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentService)(windows_core::Interface::as_raw(self), lpservice as _).ok() } } pub unsafe fn SetCurrentService(&self, service: AM_LINE21_CCSERVICE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetCurrentService)(windows_core::Interface::as_raw(self), service).ok() } } pub unsafe fn GetServiceState(&self, lpstate: *mut AM_LINE21_CCSTATE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetServiceState)(windows_core::Interface::as_raw(self), core::mem::transmute(lpstate)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetServiceState)(windows_core::Interface::as_raw(self), lpstate as _).ok() } } pub unsafe fn SetServiceState(&self, state: AM_LINE21_CCSTATE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetServiceState)(windows_core::Interface::as_raw(self), state).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetOutputFormat(&self, lpbmih: *mut super::super::Graphics::Gdi::BITMAPINFOHEADER) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOutputFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(lpbmih)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOutputFormat)(windows_core::Interface::as_raw(self), lpbmih as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn SetOutputFormat(&self, lpbmi: *mut super::super::Graphics::Gdi::BITMAPINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetOutputFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(lpbmi)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetOutputFormat)(windows_core::Interface::as_raw(self), lpbmi as _).ok() } } pub unsafe fn GetBackgroundColor(&self, pdwphyscolor: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBackgroundColor)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwphyscolor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBackgroundColor)(windows_core::Interface::as_raw(self), pdwphyscolor as _).ok() } } pub unsafe fn SetBackgroundColor(&self, dwphyscolor: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetBackgroundColor)(windows_core::Interface::as_raw(self), dwphyscolor).ok() } } pub unsafe fn GetRedrawAlways(&self, lpboption: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRedrawAlways)(windows_core::Interface::as_raw(self), core::mem::transmute(lpboption)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRedrawAlways)(windows_core::Interface::as_raw(self), lpboption as _).ok() } } pub unsafe fn SetRedrawAlways(&self, boption: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetRedrawAlways)(windows_core::Interface::as_raw(self), boption.into()).ok() } } pub unsafe fn GetDrawBackgroundMode(&self, lpmode: *mut AM_LINE21_DRAWBGMODE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDrawBackgroundMode)(windows_core::Interface::as_raw(self), core::mem::transmute(lpmode)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDrawBackgroundMode)(windows_core::Interface::as_raw(self), lpmode as _).ok() } } pub unsafe fn SetDrawBackgroundMode(&self, mode: AM_LINE21_DRAWBGMODE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetDrawBackgroundMode)(windows_core::Interface::as_raw(self), mode).ok() } @@ -7335,7 +7335,7 @@ impl IAMMediaContent2 { unsafe { (windows_core::Interface::vtable(self).get_MediaParameterName)(windows_core::Interface::as_raw(self), entrynum, index, core::mem::transmute(pbstrname)).ok() } } pub unsafe fn PlaylistCount(&self, pnumberentries: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).PlaylistCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pnumberentries)).ok() } + unsafe { (windows_core::Interface::vtable(self).PlaylistCount)(windows_core::Interface::as_raw(self), pnumberentries as _).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -7514,7 +7514,7 @@ impl IAMMediaTypeSample { unsafe { (windows_core::Interface::vtable(self).GetSize)(windows_core::Interface::as_raw(self)) } } pub unsafe fn GetTime(&self, ptimestart: *mut i64, ptimeend: *mut i64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTime)(windows_core::Interface::as_raw(self), core::mem::transmute(ptimestart), core::mem::transmute(ptimeend)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTime)(windows_core::Interface::as_raw(self), ptimestart as _, ptimeend as _).ok() } } pub unsafe fn SetTime(&self, ptimestart: *const i64, ptimeend: *const i64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetTime)(windows_core::Interface::as_raw(self), ptimestart, ptimeend).ok() } @@ -7555,7 +7555,7 @@ impl IAMMediaTypeSample { unsafe { (windows_core::Interface::vtable(self).SetDiscontinuity)(windows_core::Interface::as_raw(self), bdiscontinuity.into()).ok() } } pub unsafe fn GetMediaTime(&self, ptimestart: *mut i64, ptimeend: *mut i64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMediaTime)(windows_core::Interface::as_raw(self), core::mem::transmute(ptimestart), core::mem::transmute(ptimeend)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMediaTime)(windows_core::Interface::as_raw(self), ptimestart as _, ptimeend as _).ok() } } pub unsafe fn SetMediaTime(&self, ptimestart: *const i64, ptimeend: *const i64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetMediaTime)(windows_core::Interface::as_raw(self), ptimestart, ptimeend).ok() } @@ -8047,31 +8047,31 @@ windows_core::imp::interface_hierarchy!(IAMNetShowConfig, windows_core::IUnknown #[cfg(feature = "Win32_System_Com")] impl IAMNetShowConfig { pub unsafe fn BufferingTime(&self, pbufferingtime: *mut f64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).BufferingTime)(windows_core::Interface::as_raw(self), core::mem::transmute(pbufferingtime)).ok() } + unsafe { (windows_core::Interface::vtable(self).BufferingTime)(windows_core::Interface::as_raw(self), pbufferingtime as _).ok() } } pub unsafe fn SetBufferingTime(&self, bufferingtime: f64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetBufferingTime)(windows_core::Interface::as_raw(self), bufferingtime).ok() } } pub unsafe fn UseFixedUDPPort(&self, pusefixedudpport: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).UseFixedUDPPort)(windows_core::Interface::as_raw(self), core::mem::transmute(pusefixedudpport)).ok() } + unsafe { (windows_core::Interface::vtable(self).UseFixedUDPPort)(windows_core::Interface::as_raw(self), pusefixedudpport as _).ok() } } pub unsafe fn SetUseFixedUDPPort(&self, usefixedudpport: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetUseFixedUDPPort)(windows_core::Interface::as_raw(self), usefixedudpport).ok() } } pub unsafe fn FixedUDPPort(&self, pfixedudpport: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).FixedUDPPort)(windows_core::Interface::as_raw(self), core::mem::transmute(pfixedudpport)).ok() } + unsafe { (windows_core::Interface::vtable(self).FixedUDPPort)(windows_core::Interface::as_raw(self), pfixedudpport as _).ok() } } pub unsafe fn SetFixedUDPPort(&self, fixedudpport: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetFixedUDPPort)(windows_core::Interface::as_raw(self), fixedudpport).ok() } } pub unsafe fn UseHTTPProxy(&self, pusehttpproxy: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).UseHTTPProxy)(windows_core::Interface::as_raw(self), core::mem::transmute(pusehttpproxy)).ok() } + unsafe { (windows_core::Interface::vtable(self).UseHTTPProxy)(windows_core::Interface::as_raw(self), pusehttpproxy as _).ok() } } pub unsafe fn SetUseHTTPProxy(&self, usehttpproxy: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetUseHTTPProxy)(windows_core::Interface::as_raw(self), usehttpproxy).ok() } } pub unsafe fn EnableAutoProxy(&self, penableautoproxy: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnableAutoProxy)(windows_core::Interface::as_raw(self), core::mem::transmute(penableautoproxy)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnableAutoProxy)(windows_core::Interface::as_raw(self), penableautoproxy as _).ok() } } pub unsafe fn SetEnableAutoProxy(&self, enableautoproxy: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetEnableAutoProxy)(windows_core::Interface::as_raw(self), enableautoproxy).ok() } @@ -8083,31 +8083,31 @@ impl IAMNetShowConfig { unsafe { (windows_core::Interface::vtable(self).SetHTTPProxyHost)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrhttpproxyhost)).ok() } } pub unsafe fn HTTPProxyPort(&self, phttpproxyport: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).HTTPProxyPort)(windows_core::Interface::as_raw(self), core::mem::transmute(phttpproxyport)).ok() } + unsafe { (windows_core::Interface::vtable(self).HTTPProxyPort)(windows_core::Interface::as_raw(self), phttpproxyport as _).ok() } } pub unsafe fn SetHTTPProxyPort(&self, httpproxyport: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetHTTPProxyPort)(windows_core::Interface::as_raw(self), httpproxyport).ok() } } pub unsafe fn EnableMulticast(&self, penablemulticast: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnableMulticast)(windows_core::Interface::as_raw(self), core::mem::transmute(penablemulticast)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnableMulticast)(windows_core::Interface::as_raw(self), penablemulticast as _).ok() } } pub unsafe fn SetEnableMulticast(&self, enablemulticast: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetEnableMulticast)(windows_core::Interface::as_raw(self), enablemulticast).ok() } } pub unsafe fn EnableUDP(&self, penableudp: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnableUDP)(windows_core::Interface::as_raw(self), core::mem::transmute(penableudp)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnableUDP)(windows_core::Interface::as_raw(self), penableudp as _).ok() } } pub unsafe fn SetEnableUDP(&self, enableudp: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetEnableUDP)(windows_core::Interface::as_raw(self), enableudp).ok() } } pub unsafe fn EnableTCP(&self, penabletcp: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnableTCP)(windows_core::Interface::as_raw(self), core::mem::transmute(penabletcp)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnableTCP)(windows_core::Interface::as_raw(self), penabletcp as _).ok() } } pub unsafe fn SetEnableTCP(&self, enabletcp: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetEnableTCP)(windows_core::Interface::as_raw(self), enabletcp).ok() } } pub unsafe fn EnableHTTP(&self, penablehttp: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnableHTTP)(windows_core::Interface::as_raw(self), core::mem::transmute(penablehttp)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnableHTTP)(windows_core::Interface::as_raw(self), penablehttp as _).ok() } } pub unsafe fn SetEnableHTTP(&self, enablehttp: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetEnableHTTP)(windows_core::Interface::as_raw(self), enablehttp).ok() } @@ -8346,19 +8346,19 @@ windows_core::imp::interface_hierarchy!(IAMNetShowExProps, windows_core::IUnknow #[cfg(feature = "Win32_System_Com")] impl IAMNetShowExProps { pub unsafe fn SourceProtocol(&self, psourceprotocol: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SourceProtocol)(windows_core::Interface::as_raw(self), core::mem::transmute(psourceprotocol)).ok() } + unsafe { (windows_core::Interface::vtable(self).SourceProtocol)(windows_core::Interface::as_raw(self), psourceprotocol as _).ok() } } pub unsafe fn Bandwidth(&self, pbandwidth: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Bandwidth)(windows_core::Interface::as_raw(self), core::mem::transmute(pbandwidth)).ok() } + unsafe { (windows_core::Interface::vtable(self).Bandwidth)(windows_core::Interface::as_raw(self), pbandwidth as _).ok() } } pub unsafe fn ErrorCorrection(&self, pbstrerrorcorrection: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ErrorCorrection)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrerrorcorrection)).ok() } } pub unsafe fn CodecCount(&self, pcodeccount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CodecCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pcodeccount)).ok() } + unsafe { (windows_core::Interface::vtable(self).CodecCount)(windows_core::Interface::as_raw(self), pcodeccount as _).ok() } } pub unsafe fn GetCodecInstalled(&self, codecnum: i32, pcodecinstalled: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCodecInstalled)(windows_core::Interface::as_raw(self), codecnum, core::mem::transmute(pcodecinstalled)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCodecInstalled)(windows_core::Interface::as_raw(self), codecnum, pcodecinstalled as _).ok() } } pub unsafe fn GetCodecDescription(&self, codecnum: i32, pbstrcodecdescription: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetCodecDescription)(windows_core::Interface::as_raw(self), codecnum, core::mem::transmute(pbstrcodecdescription)).ok() } @@ -8367,7 +8367,7 @@ impl IAMNetShowExProps { unsafe { (windows_core::Interface::vtable(self).GetCodecURL)(windows_core::Interface::as_raw(self), codecnum, core::mem::transmute(pbstrcodecurl)).ok() } } pub unsafe fn CreationDate(&self, pcreationdate: *mut f64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreationDate)(windows_core::Interface::as_raw(self), core::mem::transmute(pcreationdate)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreationDate)(windows_core::Interface::as_raw(self), pcreationdate as _).ok() } } pub unsafe fn SourceLink(&self, pbstrsourcelink: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SourceLink)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrsourcelink)).ok() } @@ -8492,7 +8492,7 @@ impl IAMNetShowPreroll { unsafe { (windows_core::Interface::vtable(self).SetPreroll)(windows_core::Interface::as_raw(self), fpreroll).ok() } } pub unsafe fn Preroll(&self, pfpreroll: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Preroll)(windows_core::Interface::as_raw(self), core::mem::transmute(pfpreroll)).ok() } + unsafe { (windows_core::Interface::vtable(self).Preroll)(windows_core::Interface::as_raw(self), pfpreroll as _).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -8548,25 +8548,25 @@ windows_core::imp::interface_hierarchy!(IAMNetworkStatus, windows_core::IUnknown #[cfg(feature = "Win32_System_Com")] impl IAMNetworkStatus { pub unsafe fn ReceivedPackets(&self, preceivedpackets: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReceivedPackets)(windows_core::Interface::as_raw(self), core::mem::transmute(preceivedpackets)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReceivedPackets)(windows_core::Interface::as_raw(self), preceivedpackets as _).ok() } } pub unsafe fn RecoveredPackets(&self, precoveredpackets: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RecoveredPackets)(windows_core::Interface::as_raw(self), core::mem::transmute(precoveredpackets)).ok() } + unsafe { (windows_core::Interface::vtable(self).RecoveredPackets)(windows_core::Interface::as_raw(self), precoveredpackets as _).ok() } } pub unsafe fn LostPackets(&self, plostpackets: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).LostPackets)(windows_core::Interface::as_raw(self), core::mem::transmute(plostpackets)).ok() } + unsafe { (windows_core::Interface::vtable(self).LostPackets)(windows_core::Interface::as_raw(self), plostpackets as _).ok() } } pub unsafe fn ReceptionQuality(&self, preceptionquality: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReceptionQuality)(windows_core::Interface::as_raw(self), core::mem::transmute(preceptionquality)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReceptionQuality)(windows_core::Interface::as_raw(self), preceptionquality as _).ok() } } pub unsafe fn BufferingCount(&self, pbufferingcount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).BufferingCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pbufferingcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).BufferingCount)(windows_core::Interface::as_raw(self), pbufferingcount as _).ok() } } pub unsafe fn IsBroadcast(&self, pisbroadcast: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsBroadcast)(windows_core::Interface::as_raw(self), core::mem::transmute(pisbroadcast)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsBroadcast)(windows_core::Interface::as_raw(self), pisbroadcast as _).ok() } } pub unsafe fn BufferingProgress(&self, pbufferingprogress: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).BufferingProgress)(windows_core::Interface::as_raw(self), core::mem::transmute(pbufferingprogress)).ok() } + unsafe { (windows_core::Interface::vtable(self).BufferingProgress)(windows_core::Interface::as_raw(self), pbufferingprogress as _).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -8657,7 +8657,7 @@ windows_core::imp::define_interface!(IAMOpenProgress, IAMOpenProgress_Vtbl, 0x8e windows_core::imp::interface_hierarchy!(IAMOpenProgress, windows_core::IUnknown); impl IAMOpenProgress { pub unsafe fn QueryProgress(&self, plltotal: *mut i64, pllcurrent: *mut i64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryProgress)(windows_core::Interface::as_raw(self), core::mem::transmute(plltotal), core::mem::transmute(pllcurrent)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryProgress)(windows_core::Interface::as_raw(self), plltotal as _, pllcurrent as _).ok() } } pub unsafe fn AbortOperation(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).AbortOperation)(windows_core::Interface::as_raw(self)).ok() } @@ -8843,7 +8843,7 @@ windows_core::imp::define_interface!(IAMPhysicalPinInfo, IAMPhysicalPinInfo_Vtbl windows_core::imp::interface_hierarchy!(IAMPhysicalPinInfo, windows_core::IUnknown); impl IAMPhysicalPinInfo { pub unsafe fn GetPhysicalType(&self, ptype: *mut i32, ppsztype: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPhysicalType)(windows_core::Interface::as_raw(self), core::mem::transmute(ptype), core::mem::transmute(ppsztype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPhysicalType)(windows_core::Interface::as_raw(self), ptype as _, ppsztype as _).ok() } } } #[repr(C)] @@ -8894,10 +8894,10 @@ impl IAMPlayList { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetNamedEvent)(windows_core::Interface::as_raw(self), pwszeventname.param().abi(), dwitemindex, core::mem::transmute(ppitem), core::mem::transmute(pdwflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNamedEvent)(windows_core::Interface::as_raw(self), pwszeventname.param().abi(), dwitemindex, core::mem::transmute(ppitem), pdwflags as _).ok() } } pub unsafe fn GetRepeatInfo(&self, pdwrepeatcount: *mut u32, pdwrepeatstart: *mut u32, pdwrepeatend: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRepeatInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwrepeatcount), core::mem::transmute(pdwrepeatstart), core::mem::transmute(pdwrepeatend)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRepeatInfo)(windows_core::Interface::as_raw(self), pdwrepeatcount as _, pdwrepeatstart as _, pdwrepeatend as _).ok() } } } #[repr(C)] @@ -9242,10 +9242,10 @@ impl IAMPluginControl { } } pub unsafe fn GetPreferredClsidByIndex(&self, index: u32, subtype: *mut windows_core::GUID, clsid: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPreferredClsidByIndex)(windows_core::Interface::as_raw(self), index, core::mem::transmute(subtype), core::mem::transmute(clsid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPreferredClsidByIndex)(windows_core::Interface::as_raw(self), index, subtype as _, clsid as _).ok() } } pub unsafe fn SetPreferredClsid(&self, subtype: *const windows_core::GUID, clsid: Option<*const windows_core::GUID>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetPreferredClsid)(windows_core::Interface::as_raw(self), subtype, core::mem::transmute(clsid.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetPreferredClsid)(windows_core::Interface::as_raw(self), subtype, clsid.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn IsDisabled(&self, clsid: *const windows_core::GUID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).IsDisabled)(windows_core::Interface::as_raw(self), clsid).ok() } @@ -9518,7 +9518,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<()> { - unsafe { (windows_core::Interface::vtable(self).Reserve)(windows_core::Interface::as_raw(self), dwflags, core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Reserve)(windows_core::Interface::as_raw(self), dwflags, pvreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -9567,10 +9567,10 @@ impl IAMStats { } } pub unsafe fn GetValueByIndex(&self, lindex: i32, szname: *mut windows_core::BSTR, lcount: *mut i32, dlast: *mut f64, daverage: *mut f64, dstddev: *mut f64, dmin: *mut f64, dmax: *mut f64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetValueByIndex)(windows_core::Interface::as_raw(self), lindex, core::mem::transmute(szname), core::mem::transmute(lcount), core::mem::transmute(dlast), core::mem::transmute(daverage), core::mem::transmute(dstddev), core::mem::transmute(dmin), core::mem::transmute(dmax)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetValueByIndex)(windows_core::Interface::as_raw(self), lindex, core::mem::transmute(szname), lcount as _, dlast as _, daverage as _, dstddev as _, dmin as _, dmax as _).ok() } } pub unsafe fn GetValueByName(&self, szname: &windows_core::BSTR, lindex: *mut i32, lcount: *mut i32, dlast: *mut f64, daverage: *mut f64, dstddev: *mut f64, dmin: *mut f64, dmax: *mut f64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetValueByName)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(szname), core::mem::transmute(lindex), core::mem::transmute(lcount), core::mem::transmute(dlast), core::mem::transmute(daverage), core::mem::transmute(dstddev), core::mem::transmute(dmin), core::mem::transmute(dmax)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetValueByName)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(szname), lindex as _, lcount as _, dlast as _, daverage as _, dstddev as _, dmin as _, dmax as _).ok() } } pub unsafe fn GetIndex(&self, szname: &windows_core::BSTR, lcreate: i32) -> windows_core::Result { unsafe { @@ -9684,11 +9684,11 @@ impl IAMStreamConfig { } } pub unsafe fn GetNumberOfCapabilities(&self, picount: *mut i32, pisize: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNumberOfCapabilities)(windows_core::Interface::as_raw(self), core::mem::transmute(picount), core::mem::transmute(pisize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNumberOfCapabilities)(windows_core::Interface::as_raw(self), picount as _, pisize as _).ok() } } #[cfg(feature = "Win32_Media_MediaFoundation")] pub unsafe fn GetStreamCaps(&self, iindex: i32, ppmt: *mut *mut super::MediaFoundation::AM_MEDIA_TYPE, pscc: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStreamCaps)(windows_core::Interface::as_raw(self), iindex, core::mem::transmute(ppmt), core::mem::transmute(pscc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStreamCaps)(windows_core::Interface::as_raw(self), iindex, ppmt as _, pscc as _).ok() } } } #[repr(C)] @@ -9766,13 +9766,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<()> { - unsafe { (windows_core::Interface::vtable(self).StartAt)(windows_core::Interface::as_raw(self), core::mem::transmute(ptstart.unwrap_or(core::mem::zeroed())), dwcookie).ok() } + unsafe { (windows_core::Interface::vtable(self).StartAt)(windows_core::Interface::as_raw(self), ptstart.unwrap_or(core::mem::zeroed()) as _, dwcookie).ok() } } pub unsafe fn StopAt(&self, ptstop: Option<*const i64>, bsendextra: bool, dwcookie: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).StopAt)(windows_core::Interface::as_raw(self), core::mem::transmute(ptstop.unwrap_or(core::mem::zeroed())), bsendextra.into(), dwcookie).ok() } + unsafe { (windows_core::Interface::vtable(self).StopAt)(windows_core::Interface::as_raw(self), ptstop.unwrap_or(core::mem::zeroed()) as _, bsendextra.into(), dwcookie).ok() } } pub unsafe fn GetInfo(&self, pinfo: *mut AM_STREAM_INFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInfo)(windows_core::Interface::as_raw(self), pinfo as _).ok() } } } #[repr(C)] @@ -9830,7 +9830,7 @@ impl IAMStreamSelect { } #[cfg(feature = "Win32_Media_MediaFoundation")] pub unsafe fn Info(&self, lindex: i32, ppmt: Option<*mut *mut super::MediaFoundation::AM_MEDIA_TYPE>, pdwflags: Option<*mut u32>, plcid: Option<*mut u32>, pdwgroup: Option<*mut u32>, ppszname: Option<*mut windows_core::PWSTR>, ppobject: Option<*mut Option>, ppunk: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Info)(windows_core::Interface::as_raw(self), lindex, 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() } + unsafe { (windows_core::Interface::vtable(self).Info)(windows_core::Interface::as_raw(self), lindex, ppmt.unwrap_or(core::mem::zeroed()) as _, pdwflags.unwrap_or(core::mem::zeroed()) as _, plcid.unwrap_or(core::mem::zeroed()) as _, pdwgroup.unwrap_or(core::mem::zeroed()) as _, ppszname.unwrap_or(core::mem::zeroed()) as _, ppobject.unwrap_or(core::mem::zeroed()) as _, ppunk.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Enable(&self, lindex: i32, dwflags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Enable)(windows_core::Interface::as_raw(self), lindex, dwflags).ok() } @@ -10391,7 +10391,7 @@ impl IAMTimecodeGenerator { unsafe { (windows_core::Interface::vtable(self).SetTimecode)(windows_core::Interface::as_raw(self), ptimecodesample).ok() } } pub unsafe fn GetTimecode(&self, ptimecodesample: *mut super::TIMECODE_SAMPLE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTimecode)(windows_core::Interface::as_raw(self), core::mem::transmute(ptimecodesample)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTimecode)(windows_core::Interface::as_raw(self), ptimecodesample as _).ok() } } } #[repr(C)] @@ -10499,7 +10499,7 @@ impl IAMTimecodeReader { } } pub unsafe fn GetTimecode(&self, ptimecodesample: *mut super::TIMECODE_SAMPLE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTimecode)(windows_core::Interface::as_raw(self), core::mem::transmute(ptimecodesample)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTimecode)(windows_core::Interface::as_raw(self), ptimecodesample as _).ok() } } } #[repr(C)] @@ -10583,10 +10583,10 @@ impl IAMTuner { unsafe { (windows_core::Interface::vtable(self).put_Channel)(windows_core::Interface::as_raw(self), lchannel, lvideosubchannel, laudiosubchannel).ok() } } pub unsafe fn get_Channel(&self, plchannel: *mut i32, plvideosubchannel: *mut i32, plaudiosubchannel: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_Channel)(windows_core::Interface::as_raw(self), core::mem::transmute(plchannel), core::mem::transmute(plvideosubchannel), core::mem::transmute(plaudiosubchannel)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_Channel)(windows_core::Interface::as_raw(self), plchannel as _, plvideosubchannel as _, plaudiosubchannel as _).ok() } } pub unsafe fn ChannelMinMax(&self, lchannelmin: *mut i32, lchannelmax: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ChannelMinMax)(windows_core::Interface::as_raw(self), core::mem::transmute(lchannelmin), core::mem::transmute(lchannelmax)).ok() } + unsafe { (windows_core::Interface::vtable(self).ChannelMinMax)(windows_core::Interface::as_raw(self), lchannelmin as _, lchannelmax as _).ok() } } pub unsafe fn SetCountryCode(&self, lcountrycode: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetCountryCode)(windows_core::Interface::as_raw(self), lcountrycode).ok() } @@ -10922,7 +10922,7 @@ impl IAMVfwCompressDialogs { unsafe { (windows_core::Interface::vtable(self).ShowDialog)(windows_core::Interface::as_raw(self), idialog, hwnd).ok() } } pub unsafe fn GetState(&self, pstate: *mut core::ffi::c_void, pcbstate: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetState)(windows_core::Interface::as_raw(self), core::mem::transmute(pstate), core::mem::transmute(pcbstate)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetState)(windows_core::Interface::as_raw(self), pstate as _, pcbstate as _).ok() } } pub unsafe fn SetState(&self, pstate: *const core::ffi::c_void, cbstate: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetState)(windows_core::Interface::as_raw(self), pstate, cbstate).ok() } @@ -10988,23 +10988,23 @@ 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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetVideoAcceleratorGUIDs)(windows_core::Interface::as_raw(self), pdwnumguidssupported as _, pguidssupported.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetUncompFormatsSupported)(windows_core::Interface::as_raw(self), pguid, core::mem::transmute(pdwnumformatssupported), core::mem::transmute(pformatssupported.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUncompFormatsSupported)(windows_core::Interface::as_raw(self), pguid, pdwnumformatssupported as _, pformatssupported.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetInternalMemInfo)(windows_core::Interface::as_raw(self), pguid, pamvauncompdatainfo, core::mem::transmute(pamvainternalmeminfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInternalMemInfo)(windows_core::Interface::as_raw(self), pguid, pamvauncompdatainfo, pamvainternalmeminfo as _).ok() } } #[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<()> { - unsafe { (windows_core::Interface::vtable(self).GetCompBufferInfo)(windows_core::Interface::as_raw(self), pguid, pamvauncompdatainfo, core::mem::transmute(pdwnumtypescompbuffers), core::mem::transmute(pamvacompbufferinfo.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCompBufferInfo)(windows_core::Interface::as_raw(self), pguid, pamvauncompdatainfo, pdwnumtypescompbuffers as _, pamvacompbufferinfo.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_DirectDraw")] pub unsafe fn GetInternalCompBufferInfo(&self, pdwnumtypescompbuffers: *mut u32, pamvacompbufferinfo: Option<*mut AMVACompBufferInfo>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetInternalCompBufferInfo)(windows_core::Interface::as_raw(self), pdwnumtypescompbuffers as _, pamvacompbufferinfo.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn BeginFrame(&self, amvabeginframeinfo: *const AMVABeginFrameInfo) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).BeginFrame)(windows_core::Interface::as_raw(self), amvabeginframeinfo).ok() } @@ -11013,7 +11013,7 @@ impl IAMVideoAccelerator { unsafe { (windows_core::Interface::vtable(self).EndFrame)(windows_core::Interface::as_raw(self), pendframeinfo).ok() } } pub unsafe fn GetBuffer(&self, dwtypeindex: u32, dwbufferindex: u32, breadonly: bool, ppbuffer: *mut *mut core::ffi::c_void, lpstride: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), dwtypeindex, dwbufferindex, breadonly.into(), core::mem::transmute(ppbuffer), core::mem::transmute(lpstride)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), dwtypeindex, dwbufferindex, breadonly.into(), ppbuffer as _, lpstride as _).ok() } } pub unsafe fn ReleaseBuffer(&self, dwtypeindex: u32, dwbufferindex: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ReleaseBuffer)(windows_core::Interface::as_raw(self), dwtypeindex, dwbufferindex).ok() } @@ -11176,13 +11176,13 @@ windows_core::imp::interface_hierarchy!(IAMVideoAcceleratorNotify, windows_core: impl IAMVideoAcceleratorNotify { #[cfg(feature = "Win32_Graphics_DirectDraw")] pub unsafe fn GetUncompSurfacesInfo(&self, pguid: *const windows_core::GUID, puncompbufferinfo: *mut AMVAUncompBufferInfo) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetUncompSurfacesInfo)(windows_core::Interface::as_raw(self), pguid, core::mem::transmute(puncompbufferinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUncompSurfacesInfo)(windows_core::Interface::as_raw(self), pguid, puncompbufferinfo as _).ok() } } pub unsafe fn SetUncompSurfacesInfo(&self, dwactualuncompsurfacesallocated: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetUncompSurfacesInfo)(windows_core::Interface::as_raw(self), dwactualuncompsurfacesallocated).ok() } } pub unsafe fn GetCreateVideoAcceleratorData(&self, pguid: *const windows_core::GUID, pdwsizemiscdata: *mut u32, ppmiscdata: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCreateVideoAcceleratorData)(windows_core::Interface::as_raw(self), pguid, core::mem::transmute(pdwsizemiscdata), core::mem::transmute(ppmiscdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCreateVideoAcceleratorData)(windows_core::Interface::as_raw(self), pguid, pdwsizemiscdata as _, ppmiscdata as _).ok() } } } #[repr(C)] @@ -11275,20 +11275,7 @@ impl IAMVideoCompression { } } 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<()> { - unsafe { - (windows_core::Interface::vtable(self).GetInfo)( - windows_core::Interface::as_raw(self), - 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() - } + unsafe { (windows_core::Interface::vtable(self).GetInfo)(windows_core::Interface::as_raw(self), pszversion.unwrap_or(core::mem::zeroed()) as _, pcbversion.unwrap_or(core::mem::zeroed()) as _, pszdescription.unwrap_or(core::mem::zeroed()) as _, pcbdescription.unwrap_or(core::mem::zeroed()) as _, pdefaultkeyframerate.unwrap_or(core::mem::zeroed()) as _, pdefaultpframesperkey.unwrap_or(core::mem::zeroed()) as _, pdefaultquality.unwrap_or(core::mem::zeroed()) as _, pcapabilities.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OverrideKeyFrame(&self, framenumber: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OverrideKeyFrame)(windows_core::Interface::as_raw(self), framenumber).ok() } @@ -11486,7 +11473,7 @@ impl IAMVideoControl { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetFrameRateList)(windows_core::Interface::as_raw(self), ppin.param().abi(), iindex, core::mem::transmute(dimensions), core::mem::transmute(listsize), core::mem::transmute(framerates)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFrameRateList)(windows_core::Interface::as_raw(self), ppin.param().abi(), iindex, core::mem::transmute(dimensions), listsize as _, framerates as _).ok() } } } #[repr(C)] @@ -11642,13 +11629,13 @@ windows_core::imp::define_interface!(IAMVideoProcAmp, IAMVideoProcAmp_Vtbl, 0xc6 windows_core::imp::interface_hierarchy!(IAMVideoProcAmp, windows_core::IUnknown); impl IAMVideoProcAmp { pub unsafe fn GetRange(&self, property: i32, pmin: *mut i32, pmax: *mut i32, psteppingdelta: *mut i32, pdefault: *mut i32, pcapsflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRange)(windows_core::Interface::as_raw(self), property, core::mem::transmute(pmin), core::mem::transmute(pmax), core::mem::transmute(psteppingdelta), core::mem::transmute(pdefault), core::mem::transmute(pcapsflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRange)(windows_core::Interface::as_raw(self), property, pmin as _, pmax as _, psteppingdelta as _, pdefault as _, pcapsflags as _).ok() } } pub unsafe fn Set(&self, property: i32, lvalue: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Set)(windows_core::Interface::as_raw(self), property, lvalue, flags).ok() } } pub unsafe fn Get(&self, property: i32, lvalue: *mut i32, flags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Get)(windows_core::Interface::as_raw(self), property, core::mem::transmute(lvalue), core::mem::transmute(flags)).ok() } + unsafe { (windows_core::Interface::vtable(self).Get)(windows_core::Interface::as_raw(self), property, lvalue as _, flags as _).ok() } } } #[repr(C)] @@ -11773,39 +11760,39 @@ windows_core::imp::define_interface!(IAMWstDecoder, IAMWstDecoder_Vtbl, 0xc056de windows_core::imp::interface_hierarchy!(IAMWstDecoder, windows_core::IUnknown); impl IAMWstDecoder { pub unsafe fn GetDecoderLevel(&self, lplevel: *mut AM_WST_LEVEL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDecoderLevel)(windows_core::Interface::as_raw(self), core::mem::transmute(lplevel)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDecoderLevel)(windows_core::Interface::as_raw(self), lplevel as _).ok() } } pub unsafe fn GetCurrentService(&self, lpservice: *mut AM_WST_SERVICE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrentService)(windows_core::Interface::as_raw(self), core::mem::transmute(lpservice)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentService)(windows_core::Interface::as_raw(self), lpservice as _).ok() } } pub unsafe fn GetServiceState(&self, lpstate: *mut AM_WST_STATE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetServiceState)(windows_core::Interface::as_raw(self), core::mem::transmute(lpstate)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetServiceState)(windows_core::Interface::as_raw(self), lpstate as _).ok() } } pub unsafe fn SetServiceState(&self, state: AM_WST_STATE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetServiceState)(windows_core::Interface::as_raw(self), state).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetOutputFormat(&self, lpbmih: *mut super::super::Graphics::Gdi::BITMAPINFOHEADER) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOutputFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(lpbmih)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOutputFormat)(windows_core::Interface::as_raw(self), lpbmih as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn SetOutputFormat(&self, lpbmi: *mut super::super::Graphics::Gdi::BITMAPINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetOutputFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(lpbmi)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetOutputFormat)(windows_core::Interface::as_raw(self), lpbmi as _).ok() } } pub unsafe fn GetBackgroundColor(&self, pdwphyscolor: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBackgroundColor)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwphyscolor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBackgroundColor)(windows_core::Interface::as_raw(self), pdwphyscolor as _).ok() } } pub unsafe fn SetBackgroundColor(&self, dwphyscolor: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetBackgroundColor)(windows_core::Interface::as_raw(self), dwphyscolor).ok() } } pub unsafe fn GetRedrawAlways(&self, lpboption: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRedrawAlways)(windows_core::Interface::as_raw(self), core::mem::transmute(lpboption)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRedrawAlways)(windows_core::Interface::as_raw(self), lpboption as _).ok() } } pub unsafe fn SetRedrawAlways(&self, boption: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetRedrawAlways)(windows_core::Interface::as_raw(self), boption.into()).ok() } } pub unsafe fn GetDrawBackgroundMode(&self, lpmode: *mut AM_WST_DRAWBGMODE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDrawBackgroundMode)(windows_core::Interface::as_raw(self), core::mem::transmute(lpmode)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDrawBackgroundMode)(windows_core::Interface::as_raw(self), lpmode as _).ok() } } pub unsafe fn SetDrawBackgroundMode(&self, mode: AM_WST_DRAWBGMODE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetDrawBackgroundMode)(windows_core::Interface::as_raw(self), mode).ok() } @@ -11814,16 +11801,16 @@ impl IAMWstDecoder { unsafe { (windows_core::Interface::vtable(self).SetAnswerMode)(windows_core::Interface::as_raw(self), banswer.into()).ok() } } pub unsafe fn GetAnswerMode(&self, pbanswer: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAnswerMode)(windows_core::Interface::as_raw(self), core::mem::transmute(pbanswer)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAnswerMode)(windows_core::Interface::as_raw(self), pbanswer as _).ok() } } pub unsafe fn SetHoldPage(&self, bholdpage: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetHoldPage)(windows_core::Interface::as_raw(self), bholdpage.into()).ok() } } pub unsafe fn GetHoldPage(&self, pbholdpage: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetHoldPage)(windows_core::Interface::as_raw(self), core::mem::transmute(pbholdpage)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetHoldPage)(windows_core::Interface::as_raw(self), pbholdpage as _).ok() } } pub unsafe fn GetCurrentPage(&self, pwstpage: *mut AM_WST_PAGE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrentPage)(windows_core::Interface::as_raw(self), core::mem::transmute(pwstpage)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentPage)(windows_core::Interface::as_raw(self), pwstpage as _).ok() } } pub unsafe fn SetCurrentPage(&self, wstpage: AM_WST_PAGE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetCurrentPage)(windows_core::Interface::as_raw(self), core::mem::transmute(wstpage)).ok() } @@ -12081,7 +12068,7 @@ impl IAsyncReader { unsafe { (windows_core::Interface::vtable(self).Request)(windows_core::Interface::as_raw(self), psample.param().abi(), dwuser).ok() } } pub unsafe fn WaitForNext(&self, dwtimeout: u32, ppsample: Option<*mut Option>, pdwuser: *mut usize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).WaitForNext)(windows_core::Interface::as_raw(self), dwtimeout, core::mem::transmute(ppsample.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwuser)).ok() } + unsafe { (windows_core::Interface::vtable(self).WaitForNext)(windows_core::Interface::as_raw(self), dwtimeout, ppsample.unwrap_or(core::mem::zeroed()) as _, pdwuser as _).ok() } } pub unsafe fn SyncReadAligned(&self, psample: P0) -> windows_core::Result<()> where @@ -12093,7 +12080,7 @@ impl IAsyncReader { unsafe { (windows_core::Interface::vtable(self).SyncRead)(windows_core::Interface::as_raw(self), llposition, pbuffer.len().try_into().unwrap(), core::mem::transmute(pbuffer.as_ptr())).ok() } } pub unsafe fn Length(&self, ptotal: *mut i64, pavailable: *mut i64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Length)(windows_core::Interface::as_raw(self), core::mem::transmute(ptotal), core::mem::transmute(pavailable)).ok() } + unsafe { (windows_core::Interface::vtable(self).Length)(windows_core::Interface::as_raw(self), ptotal as _, pavailable as _).ok() } } pub unsafe fn BeginFlush(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).BeginFlush)(windows_core::Interface::as_raw(self)).ok() } @@ -12208,7 +12195,7 @@ windows_core::imp::interface_hierarchy!(IAudioData, windows_core::IUnknown, IMem impl IAudioData { #[cfg(feature = "Win32_Media_Audio")] pub unsafe fn GetFormat(&self, pwaveformatcurrent: *mut super::Audio::WAVEFORMATEX) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(pwaveformatcurrent)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFormat)(windows_core::Interface::as_raw(self), pwaveformatcurrent as _).ok() } } #[cfg(feature = "Win32_Media_Audio")] pub unsafe fn SetFormat(&self, lpwaveformat: *const super::Audio::WAVEFORMATEX) -> windows_core::Result<()> { @@ -12266,7 +12253,7 @@ windows_core::imp::interface_hierarchy!(IAudioMediaStream, windows_core::IUnknow impl IAudioMediaStream { #[cfg(feature = "Win32_Media_Audio")] pub unsafe fn GetFormat(&self, pwaveformatcurrent: *mut super::Audio::WAVEFORMATEX) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(pwaveformatcurrent)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFormat)(windows_core::Interface::as_raw(self), pwaveformatcurrent as _).ok() } } #[cfg(feature = "Win32_Media_Audio")] pub unsafe fn SetFormat(&self, lpwaveformat: *const super::Audio::WAVEFORMATEX) -> windows_core::Result<()> { @@ -12396,7 +12383,7 @@ impl IBDA_AUX { } } pub unsafe fn EnumCapability(&self, dwindex: u32, dwinputid: *mut u32, pconnectortype: *mut windows_core::GUID, conntypenum: *mut u32, numvideostds: *mut u32, analogstds: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumCapability)(windows_core::Interface::as_raw(self), dwindex, core::mem::transmute(dwinputid), core::mem::transmute(pconnectortype), core::mem::transmute(conntypenum), core::mem::transmute(numvideostds), core::mem::transmute(analogstds)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumCapability)(windows_core::Interface::as_raw(self), dwindex, dwinputid as _, pconnectortype as _, conntypenum as _, numvideostds as _, analogstds as _).ok() } } } #[repr(C)] @@ -12480,13 +12467,13 @@ impl core::ops::Deref for IBDA_AutoDemodulateEx { windows_core::imp::interface_hierarchy!(IBDA_AutoDemodulateEx, windows_core::IUnknown, IBDA_AutoDemodulate); impl IBDA_AutoDemodulateEx { pub unsafe fn get_SupportedDeviceNodeTypes(&self, ulcdevicenodetypesmax: u32, pulcdevicenodetypes: *mut u32, pguiddevicenodetypes: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_SupportedDeviceNodeTypes)(windows_core::Interface::as_raw(self), ulcdevicenodetypesmax, core::mem::transmute(pulcdevicenodetypes), core::mem::transmute(pguiddevicenodetypes)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_SupportedDeviceNodeTypes)(windows_core::Interface::as_raw(self), ulcdevicenodetypesmax, pulcdevicenodetypes as _, pguiddevicenodetypes as _).ok() } } pub unsafe fn get_SupportedVideoFormats(&self, pulamtunermodetype: *mut u32, pulanalogvideostandard: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_SupportedVideoFormats)(windows_core::Interface::as_raw(self), core::mem::transmute(pulamtunermodetype), core::mem::transmute(pulanalogvideostandard)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_SupportedVideoFormats)(windows_core::Interface::as_raw(self), pulamtunermodetype as _, pulanalogvideostandard as _).ok() } } pub unsafe fn get_AuxInputCount(&self, pulcompositecount: *mut u32, pulsvideocount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_AuxInputCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pulcompositecount), core::mem::transmute(pulsvideocount)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_AuxInputCount)(windows_core::Interface::as_raw(self), pulcompositecount as _, pulsvideocount as _).ok() } } } #[repr(C)] @@ -12537,13 +12524,13 @@ windows_core::imp::define_interface!(IBDA_ConditionalAccess, IBDA_ConditionalAcc windows_core::imp::interface_hierarchy!(IBDA_ConditionalAccess, windows_core::IUnknown); impl IBDA_ConditionalAccess { pub unsafe fn get_SmartCardStatus(&self, pcardstatus: *mut SmartCardStatusType, pcardassociation: *mut SmartCardAssociationType, pbstrcarderror: *mut windows_core::BSTR, pfooblocked: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_SmartCardStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pcardstatus), core::mem::transmute(pcardassociation), core::mem::transmute(pbstrcarderror), core::mem::transmute(pfooblocked)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_SmartCardStatus)(windows_core::Interface::as_raw(self), pcardstatus as _, pcardassociation as _, core::mem::transmute(pbstrcarderror), pfooblocked as _).ok() } } pub unsafe fn get_SmartCardInfo(&self, pbstrcardname: *mut windows_core::BSTR, pbstrcardmanufacturer: *mut windows_core::BSTR, pfdaylightsavings: *mut super::super::Foundation::VARIANT_BOOL, pbyratingregion: *mut u8, pltimezoneoffsetminutes: *mut i32, pbstrlanguage: *mut windows_core::BSTR, pealocationcode: *mut EALocationCodeType) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_SmartCardInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrcardname), core::mem::transmute(pbstrcardmanufacturer), core::mem::transmute(pfdaylightsavings), core::mem::transmute(pbyratingregion), core::mem::transmute(pltimezoneoffsetminutes), core::mem::transmute(pbstrlanguage), core::mem::transmute(pealocationcode)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_SmartCardInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrcardname), core::mem::transmute(pbstrcardmanufacturer), pfdaylightsavings as _, pbyratingregion as _, pltimezoneoffsetminutes as _, core::mem::transmute(pbstrlanguage), pealocationcode as _).ok() } } pub unsafe fn get_SmartCardApplications(&self, pulcapplications: *mut u32, rgapplications: &mut [SmartCardApplication]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_SmartCardApplications)(windows_core::Interface::as_raw(self), core::mem::transmute(pulcapplications), rgapplications.len().try_into().unwrap(), core::mem::transmute(rgapplications.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).get_SmartCardApplications)(windows_core::Interface::as_raw(self), pulcapplications as _, rgapplications.len().try_into().unwrap(), core::mem::transmute(rgapplications.as_ptr())).ok() } } pub unsafe fn get_Entitlement(&self, usvirtualchannel: u16) -> windows_core::Result { unsafe { @@ -12807,10 +12794,10 @@ impl IBDA_DRIDRMService { unsafe { (windows_core::Interface::vtable(self).SetDRM)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrnewdrm)).ok() } } pub unsafe fn GetDRMStatus(&self, pbstrdrmuuidlist: *mut windows_core::BSTR, drmuuid: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDRMStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrdrmuuidlist), core::mem::transmute(drmuuid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDRMStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrdrmuuidlist), drmuuid as _).ok() } } pub unsafe fn GetPairingStatus(&self, penumpairingstatus: *mut BDA_DrmPairingError) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPairingStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(penumpairingstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPairingStatus)(windows_core::Interface::as_raw(self), penumpairingstatus as _).ok() } } } #[repr(C)] @@ -12864,22 +12851,22 @@ impl IBDA_DRIWMDRMSession { unsafe { (windows_core::Interface::vtable(self).AcknowledgeLicense)(windows_core::Interface::as_raw(self), hrlicenseack).ok() } } pub unsafe fn ProcessLicenseChallenge(&self, pblicensemessage: &[u8], pdwcblicenseresponse: *mut u32, ppblicenseresponse: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ProcessLicenseChallenge)(windows_core::Interface::as_raw(self), pblicensemessage.len().try_into().unwrap(), core::mem::transmute(pblicensemessage.as_ptr()), core::mem::transmute(pdwcblicenseresponse), core::mem::transmute(ppblicenseresponse)).ok() } + unsafe { (windows_core::Interface::vtable(self).ProcessLicenseChallenge)(windows_core::Interface::as_raw(self), pblicensemessage.len().try_into().unwrap(), core::mem::transmute(pblicensemessage.as_ptr()), pdwcblicenseresponse as _, ppblicenseresponse as _).ok() } } pub unsafe fn ProcessRegistrationChallenge(&self, pbregistrationmessage: &[u8], pdwcbregistrationresponse: *mut u32, ppbregistrationresponse: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ProcessRegistrationChallenge)(windows_core::Interface::as_raw(self), pbregistrationmessage.len().try_into().unwrap(), core::mem::transmute(pbregistrationmessage.as_ptr()), core::mem::transmute(pdwcbregistrationresponse), core::mem::transmute(ppbregistrationresponse)).ok() } + unsafe { (windows_core::Interface::vtable(self).ProcessRegistrationChallenge)(windows_core::Interface::as_raw(self), pbregistrationmessage.len().try_into().unwrap(), core::mem::transmute(pbregistrationmessage.as_ptr()), pdwcbregistrationresponse as _, ppbregistrationresponse as _).ok() } } pub unsafe fn SetRevInfo(&self, pbrevinfo: &[u8], pdwresponse: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetRevInfo)(windows_core::Interface::as_raw(self), pbrevinfo.len().try_into().unwrap(), core::mem::transmute(pbrevinfo.as_ptr()), core::mem::transmute(pdwresponse)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetRevInfo)(windows_core::Interface::as_raw(self), pbrevinfo.len().try_into().unwrap(), core::mem::transmute(pbrevinfo.as_ptr()), pdwresponse as _).ok() } } pub unsafe fn SetCrl(&self, pbcrllen: &[u8], pdwresponse: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetCrl)(windows_core::Interface::as_raw(self), pbcrllen.len().try_into().unwrap(), core::mem::transmute(pbcrllen.as_ptr()), core::mem::transmute(pdwresponse)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetCrl)(windows_core::Interface::as_raw(self), pbcrllen.len().try_into().unwrap(), core::mem::transmute(pbcrllen.as_ptr()), pdwresponse as _).ok() } } pub unsafe fn GetHMSAssociationData(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetHMSAssociationData)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetLastCardeaError(&self, pdwerror: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLastCardeaError)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwerror)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLastCardeaError)(windows_core::Interface::as_raw(self), pdwerror as _).ok() } } } #[repr(C)] @@ -12966,7 +12953,7 @@ windows_core::imp::define_interface!(IBDA_DRM, IBDA_DRM_Vtbl, 0xf98d88b0_1992_4c windows_core::imp::interface_hierarchy!(IBDA_DRM, windows_core::IUnknown); impl IBDA_DRM { pub unsafe fn GetDRMPairingStatus(&self, pdwstatus: *mut u32, pherror: *mut windows_core::HRESULT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDRMPairingStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwstatus), core::mem::transmute(pherror)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDRMPairingStatus)(windows_core::Interface::as_raw(self), pdwstatus as _, pherror as _).ok() } } pub unsafe fn PerformDRMPairing(&self, fsync: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).PerformDRMPairing)(windows_core::Interface::as_raw(self), fsync.into()).ok() } @@ -13014,7 +13001,7 @@ impl IBDA_DRMService { unsafe { (windows_core::Interface::vtable(self).SetDRM)(windows_core::Interface::as_raw(self), puuidnewdrm).ok() } } pub unsafe fn GetDRMStatus(&self, pbstrdrmuuidlist: *mut windows_core::BSTR, drmuuid: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDRMStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrdrmuuidlist), core::mem::transmute(drmuuid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDRMStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrdrmuuidlist), drmuuid as _).ok() } } } #[repr(C)] @@ -13065,7 +13052,7 @@ impl IBDA_DeviceControl { unsafe { (windows_core::Interface::vtable(self).CommitChanges)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetChangeState(&self, pstate: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetChangeState)(windows_core::Interface::as_raw(self), core::mem::transmute(pstate)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetChangeState)(windows_core::Interface::as_raw(self), pstate as _).ok() } } } #[repr(C)] @@ -13157,43 +13144,43 @@ impl IBDA_DigitalDemodulator { unsafe { (windows_core::Interface::vtable(self).SetModulationType)(windows_core::Interface::as_raw(self), pmodulationtype).ok() } } pub unsafe fn ModulationType(&self, pmodulationtype: *mut ModulationType) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ModulationType)(windows_core::Interface::as_raw(self), core::mem::transmute(pmodulationtype)).ok() } + unsafe { (windows_core::Interface::vtable(self).ModulationType)(windows_core::Interface::as_raw(self), pmodulationtype as _).ok() } } pub unsafe fn SetInnerFECMethod(&self, pfecmethod: *const FECMethod) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetInnerFECMethod)(windows_core::Interface::as_raw(self), pfecmethod).ok() } } pub unsafe fn InnerFECMethod(&self, pfecmethod: *mut FECMethod) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).InnerFECMethod)(windows_core::Interface::as_raw(self), core::mem::transmute(pfecmethod)).ok() } + unsafe { (windows_core::Interface::vtable(self).InnerFECMethod)(windows_core::Interface::as_raw(self), pfecmethod as _).ok() } } pub unsafe fn SetInnerFECRate(&self, pfecrate: *const BinaryConvolutionCodeRate) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetInnerFECRate)(windows_core::Interface::as_raw(self), pfecrate).ok() } } pub unsafe fn InnerFECRate(&self, pfecrate: *mut BinaryConvolutionCodeRate) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).InnerFECRate)(windows_core::Interface::as_raw(self), core::mem::transmute(pfecrate)).ok() } + unsafe { (windows_core::Interface::vtable(self).InnerFECRate)(windows_core::Interface::as_raw(self), pfecrate as _).ok() } } pub unsafe fn SetOuterFECMethod(&self, pfecmethod: *const FECMethod) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetOuterFECMethod)(windows_core::Interface::as_raw(self), pfecmethod).ok() } } pub unsafe fn OuterFECMethod(&self, pfecmethod: *mut FECMethod) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OuterFECMethod)(windows_core::Interface::as_raw(self), core::mem::transmute(pfecmethod)).ok() } + unsafe { (windows_core::Interface::vtable(self).OuterFECMethod)(windows_core::Interface::as_raw(self), pfecmethod as _).ok() } } pub unsafe fn SetOuterFECRate(&self, pfecrate: *const BinaryConvolutionCodeRate) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetOuterFECRate)(windows_core::Interface::as_raw(self), pfecrate).ok() } } pub unsafe fn OuterFECRate(&self, pfecrate: *mut BinaryConvolutionCodeRate) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OuterFECRate)(windows_core::Interface::as_raw(self), core::mem::transmute(pfecrate)).ok() } + unsafe { (windows_core::Interface::vtable(self).OuterFECRate)(windows_core::Interface::as_raw(self), pfecrate as _).ok() } } pub unsafe fn SetSymbolRate(&self, psymbolrate: *const u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSymbolRate)(windows_core::Interface::as_raw(self), psymbolrate).ok() } } pub unsafe fn SymbolRate(&self, psymbolrate: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SymbolRate)(windows_core::Interface::as_raw(self), core::mem::transmute(psymbolrate)).ok() } + unsafe { (windows_core::Interface::vtable(self).SymbolRate)(windows_core::Interface::as_raw(self), psymbolrate as _).ok() } } pub unsafe fn SetSpectralInversion(&self, pspectralinversion: *const SpectralInversion) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSpectralInversion)(windows_core::Interface::as_raw(self), pspectralinversion).ok() } } pub unsafe fn SpectralInversion(&self, pspectralinversion: *mut SpectralInversion) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SpectralInversion)(windows_core::Interface::as_raw(self), core::mem::transmute(pspectralinversion)).ok() } + unsafe { (windows_core::Interface::vtable(self).SpectralInversion)(windows_core::Interface::as_raw(self), pspectralinversion as _).ok() } } } #[repr(C)] @@ -13352,25 +13339,25 @@ impl IBDA_DigitalDemodulator2 { unsafe { (windows_core::Interface::vtable(self).SetGuardInterval)(windows_core::Interface::as_raw(self), pguardinterval).ok() } } pub unsafe fn GuardInterval(&self, pguardinterval: *mut GuardInterval) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GuardInterval)(windows_core::Interface::as_raw(self), core::mem::transmute(pguardinterval)).ok() } + unsafe { (windows_core::Interface::vtable(self).GuardInterval)(windows_core::Interface::as_raw(self), pguardinterval as _).ok() } } pub unsafe fn SetTransmissionMode(&self, ptransmissionmode: *const TransmissionMode) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetTransmissionMode)(windows_core::Interface::as_raw(self), ptransmissionmode).ok() } } pub unsafe fn TransmissionMode(&self, ptransmissionmode: *mut TransmissionMode) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TransmissionMode)(windows_core::Interface::as_raw(self), core::mem::transmute(ptransmissionmode)).ok() } + unsafe { (windows_core::Interface::vtable(self).TransmissionMode)(windows_core::Interface::as_raw(self), ptransmissionmode as _).ok() } } pub unsafe fn SetRollOff(&self, prolloff: *const RollOff) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetRollOff)(windows_core::Interface::as_raw(self), prolloff).ok() } } pub unsafe fn RollOff(&self, prolloff: *mut RollOff) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RollOff)(windows_core::Interface::as_raw(self), core::mem::transmute(prolloff)).ok() } + unsafe { (windows_core::Interface::vtable(self).RollOff)(windows_core::Interface::as_raw(self), prolloff as _).ok() } } pub unsafe fn SetPilot(&self, ppilot: *const Pilot) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetPilot)(windows_core::Interface::as_raw(self), ppilot).ok() } } pub unsafe fn Pilot(&self, ppilot: *mut Pilot) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Pilot)(windows_core::Interface::as_raw(self), core::mem::transmute(ppilot)).ok() } + unsafe { (windows_core::Interface::vtable(self).Pilot)(windows_core::Interface::as_raw(self), ppilot as _).ok() } } } #[repr(C)] @@ -13475,13 +13462,13 @@ impl IBDA_DigitalDemodulator3 { unsafe { (windows_core::Interface::vtable(self).SetSignalTimeouts)(windows_core::Interface::as_raw(self), psignaltimeouts).ok() } } pub unsafe fn SignalTimeouts(&self, psignaltimeouts: *mut BDA_SIGNAL_TIMEOUTS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SignalTimeouts)(windows_core::Interface::as_raw(self), core::mem::transmute(psignaltimeouts)).ok() } + unsafe { (windows_core::Interface::vtable(self).SignalTimeouts)(windows_core::Interface::as_raw(self), psignaltimeouts as _).ok() } } pub unsafe fn SetPLPNumber(&self, pplpnumber: *const u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetPLPNumber)(windows_core::Interface::as_raw(self), pplpnumber).ok() } } pub unsafe fn PLPNumber(&self, pplpnumber: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).PLPNumber)(windows_core::Interface::as_raw(self), core::mem::transmute(pplpnumber)).ok() } + unsafe { (windows_core::Interface::vtable(self).PLPNumber)(windows_core::Interface::as_raw(self), pplpnumber as _).ok() } } } #[repr(C)] @@ -13556,7 +13543,7 @@ impl IBDA_DiseqCommand { unsafe { (windows_core::Interface::vtable(self).put_DiseqSendCommand)(windows_core::Interface::as_raw(self), ulrequestid, pbcommand.len().try_into().unwrap(), core::mem::transmute(pbcommand.as_ptr())).ok() } } pub unsafe fn get_DiseqResponse(&self, ulrequestid: u32, pulcbresponselen: *mut u32, pbresponse: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_DiseqResponse)(windows_core::Interface::as_raw(self), ulrequestid, core::mem::transmute(pulcbresponselen), core::mem::transmute(pbresponse)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_DiseqResponse)(windows_core::Interface::as_raw(self), ulrequestid, pulcbresponselen as _, pbresponse as _).ok() } } } #[repr(C)] @@ -13664,43 +13651,19 @@ windows_core::imp::define_interface!(IBDA_Encoder, IBDA_Encoder_Vtbl, 0x3a8bad59 windows_core::imp::interface_hierarchy!(IBDA_Encoder, windows_core::IUnknown); impl IBDA_Encoder { pub unsafe fn QueryCapabilities(&self, numaudiofmts: *mut u32, numvideofmts: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryCapabilities)(windows_core::Interface::as_raw(self), core::mem::transmute(numaudiofmts), core::mem::transmute(numvideofmts)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryCapabilities)(windows_core::Interface::as_raw(self), numaudiofmts as _, numvideofmts as _).ok() } } pub unsafe fn EnumAudioCapability(&self, fmtindex: u32, methodid: *mut u32, algorithmtype: *mut u32, samplingrate: *mut u32, bitdepth: *mut u32, numchannels: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumAudioCapability)(windows_core::Interface::as_raw(self), fmtindex, core::mem::transmute(methodid), core::mem::transmute(algorithmtype), core::mem::transmute(samplingrate), core::mem::transmute(bitdepth), core::mem::transmute(numchannels)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumAudioCapability)(windows_core::Interface::as_raw(self), fmtindex, methodid as _, algorithmtype as _, samplingrate as _, bitdepth as _, numchannels as _).ok() } } pub unsafe fn EnumVideoCapability(&self, fmtindex: u32, methodid: *mut u32, algorithmtype: *mut u32, verticalsize: *mut u32, horizontalsize: *mut u32, aspectratio: *mut u32, frameratecode: *mut u32, progressivesequence: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumVideoCapability)(windows_core::Interface::as_raw(self), fmtindex, core::mem::transmute(methodid), core::mem::transmute(algorithmtype), core::mem::transmute(verticalsize), core::mem::transmute(horizontalsize), core::mem::transmute(aspectratio), core::mem::transmute(frameratecode), core::mem::transmute(progressivesequence)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumVideoCapability)(windows_core::Interface::as_raw(self), fmtindex, methodid as _, algorithmtype as _, verticalsize as _, horizontalsize as _, aspectratio as _, frameratecode as _, progressivesequence as _).ok() } } pub unsafe fn SetParameters(&self, audiobitratemode: u32, audiobitrate: u32, audiomethodid: u32, audioprogram: u32, videobitratemode: u32, videobitrate: u32, videomethodid: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetParameters)(windows_core::Interface::as_raw(self), audiobitratemode, audiobitrate, audiomethodid, audioprogram, videobitratemode, videobitrate, videomethodid).ok() } } pub unsafe fn GetState(&self, audiobitratemax: *mut u32, audiobitratemin: *mut u32, audiobitratemode: *mut u32, audiobitratestepping: *mut u32, audiobitrate: *mut u32, audiomethodid: *mut u32, availableaudioprograms: *mut u32, audioprogram: *mut u32, videobitratemax: *mut u32, videobitratemin: *mut u32, videobitratemode: *mut u32, videobitrate: *mut u32, videobitratestepping: *mut u32, videomethodid: *mut u32, signalsourceid: *mut u32, signalformat: *mut u64, signallock: *mut super::super::Foundation::BOOL, signallevel: *mut i32, signaltonoiseratio: *mut u32) -> windows_core::Result<()> { - unsafe { - (windows_core::Interface::vtable(self).GetState)( - windows_core::Interface::as_raw(self), - core::mem::transmute(audiobitratemax), - core::mem::transmute(audiobitratemin), - core::mem::transmute(audiobitratemode), - core::mem::transmute(audiobitratestepping), - core::mem::transmute(audiobitrate), - core::mem::transmute(audiomethodid), - core::mem::transmute(availableaudioprograms), - core::mem::transmute(audioprogram), - core::mem::transmute(videobitratemax), - core::mem::transmute(videobitratemin), - core::mem::transmute(videobitratemode), - core::mem::transmute(videobitrate), - core::mem::transmute(videobitratestepping), - core::mem::transmute(videomethodid), - core::mem::transmute(signalsourceid), - core::mem::transmute(signalformat), - core::mem::transmute(signallock), - core::mem::transmute(signallevel), - core::mem::transmute(signaltonoiseratio), - ) - .ok() - } + unsafe { (windows_core::Interface::vtable(self).GetState)(windows_core::Interface::as_raw(self), audiobitratemax as _, audiobitratemin as _, audiobitratemode as _, audiobitratestepping as _, audiobitrate as _, audiomethodid as _, availableaudioprograms as _, audioprogram as _, videobitratemax as _, videobitratemin as _, videobitratemode as _, videobitrate as _, videobitratestepping as _, videomethodid as _, signalsourceid as _, signalformat as _, signallock as _, signallevel as _, signaltonoiseratio as _).ok() } } } #[repr(C)] @@ -13791,13 +13754,13 @@ windows_core::imp::define_interface!(IBDA_EthernetFilter, IBDA_EthernetFilter_Vt windows_core::imp::interface_hierarchy!(IBDA_EthernetFilter, windows_core::IUnknown); impl IBDA_EthernetFilter { pub unsafe fn GetMulticastListSize(&self, pulcbaddresses: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMulticastListSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pulcbaddresses)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMulticastListSize)(windows_core::Interface::as_raw(self), pulcbaddresses as _).ok() } } pub unsafe fn PutMulticastList(&self, paddresslist: &[u8]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).PutMulticastList)(windows_core::Interface::as_raw(self), paddresslist.len().try_into().unwrap(), core::mem::transmute(paddresslist.as_ptr())).ok() } } pub unsafe fn GetMulticastList(&self, pulcbaddresses: *mut u32, paddresslist: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMulticastList)(windows_core::Interface::as_raw(self), core::mem::transmute(pulcbaddresses), core::mem::transmute(paddresslist)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMulticastList)(windows_core::Interface::as_raw(self), pulcbaddresses as _, paddresslist as _).ok() } } pub unsafe fn PutMulticastMode(&self, ulmodemask: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).PutMulticastMode)(windows_core::Interface::as_raw(self), ulmodemask).ok() } @@ -13911,7 +13874,7 @@ windows_core::imp::define_interface!(IBDA_FDC, IBDA_FDC_Vtbl, 0x138adc7e_58ae_43 windows_core::imp::interface_hierarchy!(IBDA_FDC, windows_core::IUnknown); impl IBDA_FDC { pub unsafe fn GetStatus(&self, currentbitrate: *mut u32, carrierlock: *mut super::super::Foundation::BOOL, currentfrequency: *mut u32, currentspectruminversion: *mut super::super::Foundation::BOOL, currentpidlist: *mut windows_core::BSTR, currenttidlist: *mut windows_core::BSTR, overflow: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(currentbitrate), core::mem::transmute(carrierlock), core::mem::transmute(currentfrequency), core::mem::transmute(currentspectruminversion), core::mem::transmute(currentpidlist), core::mem::transmute(currenttidlist), core::mem::transmute(overflow)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), currentbitrate as _, carrierlock as _, currentfrequency as _, currentspectruminversion as _, core::mem::transmute(currentpidlist), core::mem::transmute(currenttidlist), overflow as _).ok() } } pub unsafe fn RequestTables(&self, tableids: &windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RequestTables)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(tableids)).ok() } @@ -13935,7 +13898,7 @@ impl IBDA_FDC { unsafe { (windows_core::Interface::vtable(self).RemoveTid)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(tidstoremove)).ok() } } pub unsafe fn GetTableSection(&self, pid: *mut u32, maxbuffersize: u32, actualsize: *mut u32, secbuffer: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTableSection)(windows_core::Interface::as_raw(self), core::mem::transmute(pid), maxbuffersize, core::mem::transmute(actualsize), core::mem::transmute(secbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTableSection)(windows_core::Interface::as_raw(self), pid as _, maxbuffersize, actualsize as _, secbuffer as _).ok() } } } #[repr(C)] @@ -14037,37 +14000,37 @@ impl IBDA_FrequencyFilter { unsafe { (windows_core::Interface::vtable(self).SetAutotune)(windows_core::Interface::as_raw(self), ultransponder).ok() } } pub unsafe fn Autotune(&self, pultransponder: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Autotune)(windows_core::Interface::as_raw(self), core::mem::transmute(pultransponder)).ok() } + unsafe { (windows_core::Interface::vtable(self).Autotune)(windows_core::Interface::as_raw(self), pultransponder as _).ok() } } pub unsafe fn SetFrequency(&self, ulfrequency: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetFrequency)(windows_core::Interface::as_raw(self), ulfrequency).ok() } } pub unsafe fn Frequency(&self, pulfrequency: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Frequency)(windows_core::Interface::as_raw(self), core::mem::transmute(pulfrequency)).ok() } + unsafe { (windows_core::Interface::vtable(self).Frequency)(windows_core::Interface::as_raw(self), pulfrequency as _).ok() } } pub unsafe fn SetPolarity(&self, polarity: Polarisation) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetPolarity)(windows_core::Interface::as_raw(self), polarity).ok() } } pub unsafe fn Polarity(&self, ppolarity: *mut Polarisation) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Polarity)(windows_core::Interface::as_raw(self), core::mem::transmute(ppolarity)).ok() } + unsafe { (windows_core::Interface::vtable(self).Polarity)(windows_core::Interface::as_raw(self), ppolarity as _).ok() } } pub unsafe fn SetRange(&self, ulrange: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetRange)(windows_core::Interface::as_raw(self), ulrange).ok() } } pub unsafe fn Range(&self, pulrange: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Range)(windows_core::Interface::as_raw(self), core::mem::transmute(pulrange)).ok() } + unsafe { (windows_core::Interface::vtable(self).Range)(windows_core::Interface::as_raw(self), pulrange as _).ok() } } pub unsafe fn SetBandwidth(&self, ulbandwidth: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetBandwidth)(windows_core::Interface::as_raw(self), ulbandwidth).ok() } } pub unsafe fn Bandwidth(&self, pulbandwidth: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Bandwidth)(windows_core::Interface::as_raw(self), core::mem::transmute(pulbandwidth)).ok() } + unsafe { (windows_core::Interface::vtable(self).Bandwidth)(windows_core::Interface::as_raw(self), pulbandwidth as _).ok() } } pub unsafe fn SetFrequencyMultiplier(&self, ulmultiplier: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetFrequencyMultiplier)(windows_core::Interface::as_raw(self), ulmultiplier).ok() } } pub unsafe fn FrequencyMultiplier(&self, pulmultiplier: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).FrequencyMultiplier)(windows_core::Interface::as_raw(self), core::mem::transmute(pulmultiplier)).ok() } + unsafe { (windows_core::Interface::vtable(self).FrequencyMultiplier)(windows_core::Interface::as_raw(self), pulmultiplier as _).ok() } } } #[repr(C)] @@ -14205,7 +14168,7 @@ impl IBDA_GuideDataDeliveryService { } } pub unsafe fn GetGuideData(&self, pulcbbufferlen: *mut u32, pbbuffer: *mut u8, pulguidedatapercentageprogress: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGuideData)(windows_core::Interface::as_raw(self), core::mem::transmute(pulcbbufferlen), core::mem::transmute(pbbuffer), core::mem::transmute(pulguidedatapercentageprogress)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGuideData)(windows_core::Interface::as_raw(self), pulcbbufferlen as _, pbbuffer as _, pulguidedatapercentageprogress as _).ok() } } pub unsafe fn RequestGuideDataUpdate(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RequestGuideDataUpdate)(windows_core::Interface::as_raw(self)).ok() } @@ -14217,7 +14180,7 @@ impl IBDA_GuideDataDeliveryService { } } pub unsafe fn GetServices(&self, pulcbbufferlen: *mut u32, pbbuffer: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetServices)(windows_core::Interface::as_raw(self), core::mem::transmute(pulcbbufferlen), core::mem::transmute(pbbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetServices)(windows_core::Interface::as_raw(self), pulcbbufferlen as _, pbbuffer as _).ok() } } pub unsafe fn GetServiceInfoFromTuneXml(&self, bstrtunexml: &windows_core::BSTR) -> windows_core::Result { unsafe { @@ -14319,10 +14282,10 @@ windows_core::imp::define_interface!(IBDA_IPSinkControl, IBDA_IPSinkControl_Vtbl windows_core::imp::interface_hierarchy!(IBDA_IPSinkControl, windows_core::IUnknown); impl IBDA_IPSinkControl { pub unsafe fn GetMulticastList(&self, pulcbsize: *mut u32, pbbuffer: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMulticastList)(windows_core::Interface::as_raw(self), core::mem::transmute(pulcbsize), core::mem::transmute(pbbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMulticastList)(windows_core::Interface::as_raw(self), pulcbsize as _, pbbuffer as _).ok() } } pub unsafe fn GetAdapterIPAddress(&self, pulcbsize: *mut u32, pbbuffer: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAdapterIPAddress)(windows_core::Interface::as_raw(self), core::mem::transmute(pulcbsize), core::mem::transmute(pbbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAdapterIPAddress)(windows_core::Interface::as_raw(self), pulcbsize as _, pbbuffer as _).ok() } } } #[repr(C)] @@ -14364,7 +14327,7 @@ windows_core::imp::define_interface!(IBDA_IPSinkInfo, IBDA_IPSinkInfo_Vtbl, 0xa7 windows_core::imp::interface_hierarchy!(IBDA_IPSinkInfo, windows_core::IUnknown); impl IBDA_IPSinkInfo { pub unsafe fn get_MulticastList(&self, pulcbaddresses: *mut u32, ppbaddresslist: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_MulticastList)(windows_core::Interface::as_raw(self), core::mem::transmute(pulcbaddresses), core::mem::transmute(ppbaddresslist)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_MulticastList)(windows_core::Interface::as_raw(self), pulcbaddresses as _, ppbaddresslist as _).ok() } } pub unsafe fn AdapterIPAddress(&self) -> windows_core::Result { unsafe { @@ -14439,13 +14402,13 @@ windows_core::imp::define_interface!(IBDA_IPV4Filter, IBDA_IPV4Filter_Vtbl, 0x71 windows_core::imp::interface_hierarchy!(IBDA_IPV4Filter, windows_core::IUnknown); impl IBDA_IPV4Filter { pub unsafe fn GetMulticastListSize(&self, pulcbaddresses: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMulticastListSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pulcbaddresses)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMulticastListSize)(windows_core::Interface::as_raw(self), pulcbaddresses as _).ok() } } pub unsafe fn PutMulticastList(&self, paddresslist: &[u8]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).PutMulticastList)(windows_core::Interface::as_raw(self), paddresslist.len().try_into().unwrap(), core::mem::transmute(paddresslist.as_ptr())).ok() } } pub unsafe fn GetMulticastList(&self, pulcbaddresses: *mut u32, paddresslist: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMulticastList)(windows_core::Interface::as_raw(self), core::mem::transmute(pulcbaddresses), core::mem::transmute(paddresslist)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMulticastList)(windows_core::Interface::as_raw(self), pulcbaddresses as _, paddresslist as _).ok() } } pub unsafe fn PutMulticastMode(&self, ulmodemask: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).PutMulticastMode)(windows_core::Interface::as_raw(self), ulmodemask).ok() } @@ -14529,13 +14492,13 @@ windows_core::imp::define_interface!(IBDA_IPV6Filter, IBDA_IPV6Filter_Vtbl, 0xe1 windows_core::imp::interface_hierarchy!(IBDA_IPV6Filter, windows_core::IUnknown); impl IBDA_IPV6Filter { pub unsafe fn GetMulticastListSize(&self, pulcbaddresses: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMulticastListSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pulcbaddresses)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMulticastListSize)(windows_core::Interface::as_raw(self), pulcbaddresses as _).ok() } } pub unsafe fn PutMulticastList(&self, paddresslist: &[u8]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).PutMulticastList)(windows_core::Interface::as_raw(self), paddresslist.len().try_into().unwrap(), core::mem::transmute(paddresslist.as_ptr())).ok() } } pub unsafe fn GetMulticastList(&self, pulcbaddresses: *mut u32, paddresslist: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMulticastList)(windows_core::Interface::as_raw(self), core::mem::transmute(pulcbaddresses), core::mem::transmute(paddresslist)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMulticastList)(windows_core::Interface::as_raw(self), pulcbaddresses as _, paddresslist as _).ok() } } pub unsafe fn PutMulticastMode(&self, ulmodemask: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).PutMulticastMode)(windows_core::Interface::as_raw(self), ulmodemask).ok() } @@ -14652,19 +14615,19 @@ impl IBDA_LNBInfo { unsafe { (windows_core::Interface::vtable(self).SetLocalOscilatorFrequencyLowBand)(windows_core::Interface::as_raw(self), ulloflow).ok() } } pub unsafe fn LocalOscilatorFrequencyLowBand(&self, pulloflow: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).LocalOscilatorFrequencyLowBand)(windows_core::Interface::as_raw(self), core::mem::transmute(pulloflow)).ok() } + unsafe { (windows_core::Interface::vtable(self).LocalOscilatorFrequencyLowBand)(windows_core::Interface::as_raw(self), pulloflow as _).ok() } } pub unsafe fn SetLocalOscilatorFrequencyHighBand(&self, ullofhigh: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetLocalOscilatorFrequencyHighBand)(windows_core::Interface::as_raw(self), ullofhigh).ok() } } pub unsafe fn LocalOscilatorFrequencyHighBand(&self, pullofhigh: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).LocalOscilatorFrequencyHighBand)(windows_core::Interface::as_raw(self), core::mem::transmute(pullofhigh)).ok() } + unsafe { (windows_core::Interface::vtable(self).LocalOscilatorFrequencyHighBand)(windows_core::Interface::as_raw(self), pullofhigh as _).ok() } } pub unsafe fn SetHighLowSwitchFrequency(&self, ulswitchfrequency: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetHighLowSwitchFrequency)(windows_core::Interface::as_raw(self), ulswitchfrequency).ok() } } pub unsafe fn HighLowSwitchFrequency(&self, pulswitchfrequency: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).HighLowSwitchFrequency)(windows_core::Interface::as_raw(self), core::mem::transmute(pulswitchfrequency)).ok() } + unsafe { (windows_core::Interface::vtable(self).HighLowSwitchFrequency)(windows_core::Interface::as_raw(self), pulswitchfrequency as _).ok() } } } #[repr(C)] @@ -14745,7 +14708,7 @@ impl IBDA_MUX { unsafe { (windows_core::Interface::vtable(self).SetPidList)(windows_core::Interface::as_raw(self), pbpidlistbuffer.len().try_into().unwrap(), core::mem::transmute(pbpidlistbuffer.as_ptr())).ok() } } pub unsafe fn GetPidList(&self, pulpidlistcount: *mut u32, pbpidlistbuffer: *mut BDA_MUX_PIDLISTITEM) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPidList)(windows_core::Interface::as_raw(self), core::mem::transmute(pulpidlistcount), core::mem::transmute(pbpidlistbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPidList)(windows_core::Interface::as_raw(self), pulpidlistcount as _, pbpidlistbuffer as _).ok() } } } #[repr(C)] @@ -14865,22 +14828,22 @@ impl IBDA_NetworkProvider { unsafe { (windows_core::Interface::vtable(self).PutSignalSource)(windows_core::Interface::as_raw(self), ulsignalsource).ok() } } pub unsafe fn GetSignalSource(&self, pulsignalsource: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSignalSource)(windows_core::Interface::as_raw(self), core::mem::transmute(pulsignalsource)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSignalSource)(windows_core::Interface::as_raw(self), pulsignalsource as _).ok() } } pub unsafe fn GetNetworkType(&self, pguidnetworktype: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNetworkType)(windows_core::Interface::as_raw(self), core::mem::transmute(pguidnetworktype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNetworkType)(windows_core::Interface::as_raw(self), pguidnetworktype as _).ok() } } pub unsafe fn PutTuningSpace(&self, guidtuningspace: *const windows_core::GUID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).PutTuningSpace)(windows_core::Interface::as_raw(self), guidtuningspace).ok() } } pub unsafe fn GetTuningSpace(&self, pguidtuingspace: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTuningSpace)(windows_core::Interface::as_raw(self), core::mem::transmute(pguidtuingspace)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTuningSpace)(windows_core::Interface::as_raw(self), pguidtuingspace as _).ok() } } pub unsafe fn RegisterDeviceFilter(&self, punkfiltercontrol: P0, ppvregisitrationcontext: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).RegisterDeviceFilter)(windows_core::Interface::as_raw(self), punkfiltercontrol.param().abi(), core::mem::transmute(ppvregisitrationcontext)).ok() } + unsafe { (windows_core::Interface::vtable(self).RegisterDeviceFilter)(windows_core::Interface::as_raw(self), punkfiltercontrol.param().abi(), ppvregisitrationcontext as _).ok() } } pub unsafe fn UnRegisterDeviceFilter(&self, pvregistrationcontext: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UnRegisterDeviceFilter)(windows_core::Interface::as_raw(self), pvregistrationcontext).ok() } @@ -15011,13 +14974,13 @@ windows_core::imp::define_interface!(IBDA_PinControl, IBDA_PinControl_Vtbl, 0x0d windows_core::imp::interface_hierarchy!(IBDA_PinControl, windows_core::IUnknown); impl IBDA_PinControl { pub unsafe fn GetPinID(&self, pulpinid: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPinID)(windows_core::Interface::as_raw(self), core::mem::transmute(pulpinid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPinID)(windows_core::Interface::as_raw(self), pulpinid as _).ok() } } pub unsafe fn GetPinType(&self, pulpintype: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPinType)(windows_core::Interface::as_raw(self), core::mem::transmute(pulpintype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPinType)(windows_core::Interface::as_raw(self), pulpintype as _).ok() } } pub unsafe fn RegistrationContext(&self, pulregistrationctx: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RegistrationContext)(windows_core::Interface::as_raw(self), core::mem::transmute(pulregistrationctx)).ok() } + unsafe { (windows_core::Interface::vtable(self).RegistrationContext)(windows_core::Interface::as_raw(self), pulregistrationctx as _).ok() } } } #[repr(C)] @@ -15071,19 +15034,19 @@ impl IBDA_SignalProperties { unsafe { (windows_core::Interface::vtable(self).PutNetworkType)(windows_core::Interface::as_raw(self), guidnetworktype).ok() } } pub unsafe fn GetNetworkType(&self, pguidnetworktype: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNetworkType)(windows_core::Interface::as_raw(self), core::mem::transmute(pguidnetworktype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNetworkType)(windows_core::Interface::as_raw(self), pguidnetworktype as _).ok() } } pub unsafe fn PutSignalSource(&self, ulsignalsource: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).PutSignalSource)(windows_core::Interface::as_raw(self), ulsignalsource).ok() } } pub unsafe fn GetSignalSource(&self, pulsignalsource: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSignalSource)(windows_core::Interface::as_raw(self), core::mem::transmute(pulsignalsource)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSignalSource)(windows_core::Interface::as_raw(self), pulsignalsource as _).ok() } } pub unsafe fn PutTuningSpace(&self, guidtuningspace: *const windows_core::GUID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).PutTuningSpace)(windows_core::Interface::as_raw(self), guidtuningspace).ok() } } pub unsafe fn GetTuningSpace(&self, pguidtuingspace: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTuningSpace)(windows_core::Interface::as_raw(self), core::mem::transmute(pguidtuingspace)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTuningSpace)(windows_core::Interface::as_raw(self), pguidtuingspace as _).ok() } } } #[repr(C)] @@ -15164,31 +15127,31 @@ impl IBDA_SignalStatistics { unsafe { (windows_core::Interface::vtable(self).SetSignalStrength)(windows_core::Interface::as_raw(self), ldbstrength).ok() } } pub unsafe fn SignalStrength(&self, pldbstrength: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SignalStrength)(windows_core::Interface::as_raw(self), core::mem::transmute(pldbstrength)).ok() } + unsafe { (windows_core::Interface::vtable(self).SignalStrength)(windows_core::Interface::as_raw(self), pldbstrength as _).ok() } } pub unsafe fn SetSignalQuality(&self, lpercentquality: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSignalQuality)(windows_core::Interface::as_raw(self), lpercentquality).ok() } } pub unsafe fn SignalQuality(&self, plpercentquality: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SignalQuality)(windows_core::Interface::as_raw(self), core::mem::transmute(plpercentquality)).ok() } + unsafe { (windows_core::Interface::vtable(self).SignalQuality)(windows_core::Interface::as_raw(self), plpercentquality as _).ok() } } pub unsafe fn SetSignalPresent(&self, fpresent: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSignalPresent)(windows_core::Interface::as_raw(self), fpresent).ok() } } pub unsafe fn SignalPresent(&self, pfpresent: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SignalPresent)(windows_core::Interface::as_raw(self), core::mem::transmute(pfpresent)).ok() } + unsafe { (windows_core::Interface::vtable(self).SignalPresent)(windows_core::Interface::as_raw(self), pfpresent as _).ok() } } pub unsafe fn SetSignalLocked(&self, flocked: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSignalLocked)(windows_core::Interface::as_raw(self), flocked).ok() } } pub unsafe fn SignalLocked(&self, pflocked: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SignalLocked)(windows_core::Interface::as_raw(self), core::mem::transmute(pflocked)).ok() } + unsafe { (windows_core::Interface::vtable(self).SignalLocked)(windows_core::Interface::as_raw(self), pflocked as _).ok() } } pub unsafe fn SetSampleTime(&self, lmssampletime: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSampleTime)(windows_core::Interface::as_raw(self), lmssampletime).ok() } } pub unsafe fn SampleTime(&self, plmssampletime: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SampleTime)(windows_core::Interface::as_raw(self), core::mem::transmute(plmssampletime)).ok() } + unsafe { (windows_core::Interface::vtable(self).SampleTime)(windows_core::Interface::as_raw(self), plmssampletime as _).ok() } } } #[repr(C)] @@ -15302,22 +15265,22 @@ windows_core::imp::define_interface!(IBDA_Topology, IBDA_Topology_Vtbl, 0x79b568 windows_core::imp::interface_hierarchy!(IBDA_Topology, windows_core::IUnknown); impl IBDA_Topology { pub unsafe fn GetNodeTypes(&self, pulcnodetypes: *mut u32, rgulnodetypes: &mut [u32]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNodeTypes)(windows_core::Interface::as_raw(self), core::mem::transmute(pulcnodetypes), rgulnodetypes.len().try_into().unwrap(), core::mem::transmute(rgulnodetypes.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNodeTypes)(windows_core::Interface::as_raw(self), pulcnodetypes as _, rgulnodetypes.len().try_into().unwrap(), core::mem::transmute(rgulnodetypes.as_ptr())).ok() } } pub unsafe fn GetNodeDescriptors(&self, ulcnodedescriptors: *mut u32, rgnodedescriptors: &mut [BDANODE_DESCRIPTOR]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNodeDescriptors)(windows_core::Interface::as_raw(self), core::mem::transmute(ulcnodedescriptors), rgnodedescriptors.len().try_into().unwrap(), core::mem::transmute(rgnodedescriptors.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNodeDescriptors)(windows_core::Interface::as_raw(self), ulcnodedescriptors as _, rgnodedescriptors.len().try_into().unwrap(), core::mem::transmute(rgnodedescriptors.as_ptr())).ok() } } pub unsafe fn GetNodeInterfaces(&self, ulnodetype: u32, pulcinterfaces: *mut u32, rgguidinterfaces: &mut [windows_core::GUID]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNodeInterfaces)(windows_core::Interface::as_raw(self), ulnodetype, core::mem::transmute(pulcinterfaces), rgguidinterfaces.len().try_into().unwrap(), core::mem::transmute(rgguidinterfaces.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNodeInterfaces)(windows_core::Interface::as_raw(self), ulnodetype, pulcinterfaces as _, rgguidinterfaces.len().try_into().unwrap(), core::mem::transmute(rgguidinterfaces.as_ptr())).ok() } } pub unsafe fn GetPinTypes(&self, pulcpintypes: *mut u32, rgulpintypes: &mut [u32]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPinTypes)(windows_core::Interface::as_raw(self), core::mem::transmute(pulcpintypes), rgulpintypes.len().try_into().unwrap(), core::mem::transmute(rgulpintypes.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPinTypes)(windows_core::Interface::as_raw(self), pulcpintypes as _, rgulpintypes.len().try_into().unwrap(), core::mem::transmute(rgulpintypes.as_ptr())).ok() } } pub unsafe fn GetTemplateConnections(&self, pulcconnections: *mut u32, rgconnections: &mut [BDA_TEMPLATE_CONNECTION]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTemplateConnections)(windows_core::Interface::as_raw(self), core::mem::transmute(pulcconnections), rgconnections.len().try_into().unwrap(), core::mem::transmute(rgconnections.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTemplateConnections)(windows_core::Interface::as_raw(self), pulcconnections as _, rgconnections.len().try_into().unwrap(), core::mem::transmute(rgconnections.as_ptr())).ok() } } pub unsafe fn CreatePin(&self, ulpintype: u32, pulpinid: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreatePin)(windows_core::Interface::as_raw(self), ulpintype, core::mem::transmute(pulpinid)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreatePin)(windows_core::Interface::as_raw(self), ulpintype, pulpinid as _).ok() } } pub unsafe fn DeletePin(&self, ulpinid: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DeletePin)(windows_core::Interface::as_raw(self), ulpinid).ok() } @@ -15504,7 +15467,7 @@ impl IBDA_TransportStreamSelector { unsafe { (windows_core::Interface::vtable(self).SetTSID)(windows_core::Interface::as_raw(self), ustsid).ok() } } pub unsafe fn GetTSInformation(&self, pultsinformationbufferlen: *mut u32, pbtsinformationbuffer: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTSInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(pultsinformationbufferlen), core::mem::transmute(pbtsinformationbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTSInformation)(windows_core::Interface::as_raw(self), pultsinformationbufferlen as _, pbtsinformationbuffer as _).ok() } } } #[repr(C)] @@ -15653,7 +15616,7 @@ windows_core::imp::define_interface!(IBDA_WMDRMSession, IBDA_WMDRMSession_Vtbl, windows_core::imp::interface_hierarchy!(IBDA_WMDRMSession, windows_core::IUnknown); impl IBDA_WMDRMSession { pub unsafe fn GetStatus(&self, maxcapturetoken: *mut u32, maxstreamingpid: *mut u32, maxlicense: *mut u32, minsecuritylevel: *mut u32, revinfosequencenumber: *mut u32, revinfoissuedtime: *mut u64, revinfottl: *mut u32, revlistversion: *mut u32, ulstate: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(maxcapturetoken), core::mem::transmute(maxstreamingpid), core::mem::transmute(maxlicense), core::mem::transmute(minsecuritylevel), core::mem::transmute(revinfosequencenumber), core::mem::transmute(revinfoissuedtime), core::mem::transmute(revinfottl), core::mem::transmute(revlistversion), core::mem::transmute(ulstate)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), maxcapturetoken as _, maxstreamingpid as _, maxlicense as _, minsecuritylevel as _, revinfosequencenumber as _, revinfoissuedtime as _, revinfottl as _, revlistversion as _, ulstate as _).ok() } } pub unsafe fn SetRevInfo(&self, pbrevinfo: &[u8]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetRevInfo)(windows_core::Interface::as_raw(self), pbrevinfo.len().try_into().unwrap(), core::mem::transmute(pbrevinfo.as_ptr())).ok() } @@ -15662,19 +15625,19 @@ impl IBDA_WMDRMSession { unsafe { (windows_core::Interface::vtable(self).SetCrl)(windows_core::Interface::as_raw(self), pbcrllen.len().try_into().unwrap(), core::mem::transmute(pbcrllen.as_ptr())).ok() } } pub unsafe fn TransactMessage(&self, pbrequest: &[u8], pulcbresponse: *mut u32, pbresponse: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TransactMessage)(windows_core::Interface::as_raw(self), pbrequest.len().try_into().unwrap(), core::mem::transmute(pbrequest.as_ptr()), core::mem::transmute(pulcbresponse), core::mem::transmute(pbresponse)).ok() } + unsafe { (windows_core::Interface::vtable(self).TransactMessage)(windows_core::Interface::as_raw(self), pbrequest.len().try_into().unwrap(), core::mem::transmute(pbrequest.as_ptr()), pulcbresponse as _, pbresponse as _).ok() } } pub unsafe fn GetLicense(&self, uuidkey: *const windows_core::GUID, pulpackagelen: *mut u32, pbpackage: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLicense)(windows_core::Interface::as_raw(self), uuidkey, core::mem::transmute(pulpackagelen), core::mem::transmute(pbpackage)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLicense)(windows_core::Interface::as_raw(self), uuidkey, pulpackagelen as _, pbpackage as _).ok() } } pub unsafe fn ReissueLicense(&self, uuidkey: *const windows_core::GUID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ReissueLicense)(windows_core::Interface::as_raw(self), uuidkey).ok() } } pub unsafe fn RenewLicense(&self, pbinxmrlicense: &[u8], pbentitlementtoken: &[u8], puldescramblestatus: *mut u32, puloutxmrlicenselen: *mut u32, pboutxmrlicense: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RenewLicense)(windows_core::Interface::as_raw(self), pbinxmrlicense.len().try_into().unwrap(), core::mem::transmute(pbinxmrlicense.as_ptr()), pbentitlementtoken.len().try_into().unwrap(), core::mem::transmute(pbentitlementtoken.as_ptr()), core::mem::transmute(puldescramblestatus), core::mem::transmute(puloutxmrlicenselen), core::mem::transmute(pboutxmrlicense)).ok() } + unsafe { (windows_core::Interface::vtable(self).RenewLicense)(windows_core::Interface::as_raw(self), pbinxmrlicense.len().try_into().unwrap(), core::mem::transmute(pbinxmrlicense.as_ptr()), pbentitlementtoken.len().try_into().unwrap(), core::mem::transmute(pbentitlementtoken.as_ptr()), puldescramblestatus as _, puloutxmrlicenselen as _, pboutxmrlicense as _).ok() } } pub unsafe fn GetKeyInfo(&self, pulkeyinfolen: *mut u32, pbkeyinfo: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetKeyInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pulkeyinfolen), core::mem::transmute(pbkeyinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetKeyInfo)(windows_core::Interface::as_raw(self), pulkeyinfolen as _, pbkeyinfo as _).ok() } } } #[repr(C)] @@ -15770,7 +15733,7 @@ windows_core::imp::define_interface!(IBDA_WMDRMTuner, IBDA_WMDRMTuner_Vtbl, 0x86 windows_core::imp::interface_hierarchy!(IBDA_WMDRMTuner, windows_core::IUnknown); impl IBDA_WMDRMTuner { pub unsafe fn PurchaseEntitlement(&self, uldialogrequest: u32, bstrlanguage: &windows_core::BSTR, pbpurchasetoken: &[u8], puldescramblestatus: *mut u32, pulcapturetokenlen: *mut u32, pbcapturetoken: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).PurchaseEntitlement)(windows_core::Interface::as_raw(self), uldialogrequest, core::mem::transmute_copy(bstrlanguage), pbpurchasetoken.len().try_into().unwrap(), core::mem::transmute(pbpurchasetoken.as_ptr()), core::mem::transmute(puldescramblestatus), core::mem::transmute(pulcapturetokenlen), core::mem::transmute(pbcapturetoken)).ok() } + unsafe { (windows_core::Interface::vtable(self).PurchaseEntitlement)(windows_core::Interface::as_raw(self), uldialogrequest, core::mem::transmute_copy(bstrlanguage), pbpurchasetoken.len().try_into().unwrap(), core::mem::transmute(pbpurchasetoken.as_ptr()), puldescramblestatus as _, pulcapturetokenlen as _, pbcapturetoken as _).ok() } } pub unsafe fn CancelCaptureToken(&self, pbcapturetoken: &[u8]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).CancelCaptureToken)(windows_core::Interface::as_raw(self), pbcapturetoken.len().try_into().unwrap(), core::mem::transmute(pbcapturetoken.as_ptr())).ok() } @@ -15788,7 +15751,7 @@ impl IBDA_WMDRMTuner { unsafe { (windows_core::Interface::vtable(self).SetSyncValue)(windows_core::Interface::as_raw(self), ulsyncvalue).ok() } } pub unsafe fn GetStartCodeProfile(&self, pulstartcodeprofilelen: *mut u32, pbstartcodeprofile: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStartCodeProfile)(windows_core::Interface::as_raw(self), core::mem::transmute(pulstartcodeprofilelen), core::mem::transmute(pbstartcodeprofile)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStartCodeProfile)(windows_core::Interface::as_raw(self), pulstartcodeprofilelen as _, pbstartcodeprofile as _).ok() } } } #[repr(C)] @@ -15878,7 +15841,7 @@ impl core::ops::Deref for IBPCSatelliteTuner { windows_core::imp::interface_hierarchy!(IBPCSatelliteTuner, windows_core::IUnknown, IAMTuner); impl IBPCSatelliteTuner { pub unsafe fn get_DefaultSubChannelTypes(&self, pldefaultvideotype: *mut i32, pldefaultaudiotype: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_DefaultSubChannelTypes)(windows_core::Interface::as_raw(self), core::mem::transmute(pldefaultvideotype), core::mem::transmute(pldefaultaudiotype)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_DefaultSubChannelTypes)(windows_core::Interface::as_raw(self), pldefaultvideotype as _, pldefaultaudiotype as _).ok() } } pub unsafe fn put_DefaultSubChannelTypes(&self, ldefaultvideotype: i32, ldefaultaudiotype: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_DefaultSubChannelTypes)(windows_core::Interface::as_raw(self), ldefaultvideotype, ldefaultaudiotype).ok() } @@ -16421,7 +16384,7 @@ impl IBasicVideo { unsafe { (windows_core::Interface::vtable(self).SetSourcePosition)(windows_core::Interface::as_raw(self), left, top, width, height).ok() } } pub unsafe fn GetSourcePosition(&self, pleft: *mut i32, ptop: *mut i32, pwidth: *mut i32, pheight: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSourcePosition)(windows_core::Interface::as_raw(self), core::mem::transmute(pleft), core::mem::transmute(ptop), core::mem::transmute(pwidth), core::mem::transmute(pheight)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourcePosition)(windows_core::Interface::as_raw(self), pleft as _, ptop as _, pwidth as _, pheight as _).ok() } } pub unsafe fn SetDefaultSourcePosition(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetDefaultSourcePosition)(windows_core::Interface::as_raw(self)).ok() } @@ -16430,19 +16393,19 @@ impl IBasicVideo { unsafe { (windows_core::Interface::vtable(self).SetDestinationPosition)(windows_core::Interface::as_raw(self), left, top, width, height).ok() } } pub unsafe fn GetDestinationPosition(&self, pleft: *mut i32, ptop: *mut i32, pwidth: *mut i32, pheight: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDestinationPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(pleft), core::mem::transmute(ptop), core::mem::transmute(pwidth), core::mem::transmute(pheight)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDestinationPosition)(windows_core::Interface::as_raw(self), pleft as _, ptop as _, pwidth as _, pheight as _).ok() } } pub unsafe fn SetDefaultDestinationPosition(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetDefaultDestinationPosition)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetVideoSize(&self, pwidth: *mut i32, pheight: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVideoSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pwidth), core::mem::transmute(pheight)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVideoSize)(windows_core::Interface::as_raw(self), pwidth as _, pheight as _).ok() } } pub unsafe fn GetVideoPaletteEntries(&self, startindex: i32, entries: i32, pretrieved: *mut i32, ppalette: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVideoPaletteEntries)(windows_core::Interface::as_raw(self), startindex, entries, core::mem::transmute(pretrieved), core::mem::transmute(ppalette)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVideoPaletteEntries)(windows_core::Interface::as_raw(self), startindex, entries, pretrieved as _, ppalette as _).ok() } } pub unsafe fn GetCurrentImage(&self, pbuffersize: *mut i32, pdibimage: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrentImage)(windows_core::Interface::as_raw(self), core::mem::transmute(pbuffersize), core::mem::transmute(pdibimage)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentImage)(windows_core::Interface::as_raw(self), pbuffersize as _, pdibimage as _).ok() } } pub unsafe fn IsUsingDefaultSource(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).IsUsingDefaultSource)(windows_core::Interface::as_raw(self)).ok() } @@ -16852,7 +16815,7 @@ windows_core::imp::interface_hierarchy!(IBasicVideo2, windows_core::IUnknown, su #[cfg(feature = "Win32_System_Com")] impl IBasicVideo2 { pub unsafe fn GetPreferredAspectRatio(&self, plaspectx: *mut i32, plaspecty: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPreferredAspectRatio)(windows_core::Interface::as_raw(self), core::mem::transmute(plaspectx), core::mem::transmute(plaspecty)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPreferredAspectRatio)(windows_core::Interface::as_raw(self), plaspectx as _, plaspecty as _).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -16952,7 +16915,7 @@ windows_core::imp::define_interface!(IBufferingTime, IBufferingTime_Vtbl, 0x1e00 windows_core::imp::interface_hierarchy!(IBufferingTime, windows_core::IUnknown); impl IBufferingTime { pub unsafe fn GetBufferingTime(&self, pdwmilliseconds: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBufferingTime)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmilliseconds)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBufferingTime)(windows_core::Interface::as_raw(self), pdwmilliseconds as _).ok() } } pub unsafe fn SetBufferingTime(&self, dwmilliseconds: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetBufferingTime)(windows_core::Interface::as_raw(self), dwmilliseconds).ok() } @@ -17051,154 +17014,154 @@ windows_core::imp::define_interface!(ICameraControl, ICameraControl_Vtbl, 0x2ba1 windows_core::imp::interface_hierarchy!(ICameraControl, windows_core::IUnknown); impl ICameraControl { pub unsafe fn get_Exposure(&self, pvalue: *mut i32, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_Exposure)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_Exposure)(windows_core::Interface::as_raw(self), pvalue as _, pflags as _).ok() } } pub unsafe fn put_Exposure(&self, value: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_Exposure)(windows_core::Interface::as_raw(self), value, flags).ok() } } pub unsafe fn getRange_Exposure(&self, pmin: *mut i32, pmax: *mut i32, psteppingdelta: *mut i32, pdefault: *mut i32, pcapsflag: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getRange_Exposure)(windows_core::Interface::as_raw(self), core::mem::transmute(pmin), core::mem::transmute(pmax), core::mem::transmute(psteppingdelta), core::mem::transmute(pdefault), core::mem::transmute(pcapsflag)).ok() } + unsafe { (windows_core::Interface::vtable(self).getRange_Exposure)(windows_core::Interface::as_raw(self), pmin as _, pmax as _, psteppingdelta as _, pdefault as _, pcapsflag as _).ok() } } pub unsafe fn get_Focus(&self, pvalue: *mut i32, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_Focus)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_Focus)(windows_core::Interface::as_raw(self), pvalue as _, pflags as _).ok() } } pub unsafe fn put_Focus(&self, value: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_Focus)(windows_core::Interface::as_raw(self), value, flags).ok() } } pub unsafe fn getRange_Focus(&self, pmin: *mut i32, pmax: *mut i32, psteppingdelta: *mut i32, pdefault: *mut i32, pcapsflag: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getRange_Focus)(windows_core::Interface::as_raw(self), core::mem::transmute(pmin), core::mem::transmute(pmax), core::mem::transmute(psteppingdelta), core::mem::transmute(pdefault), core::mem::transmute(pcapsflag)).ok() } + unsafe { (windows_core::Interface::vtable(self).getRange_Focus)(windows_core::Interface::as_raw(self), pmin as _, pmax as _, psteppingdelta as _, pdefault as _, pcapsflag as _).ok() } } pub unsafe fn get_Iris(&self, pvalue: *mut i32, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_Iris)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_Iris)(windows_core::Interface::as_raw(self), pvalue as _, pflags as _).ok() } } pub unsafe fn put_Iris(&self, value: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_Iris)(windows_core::Interface::as_raw(self), value, flags).ok() } } pub unsafe fn getRange_Iris(&self, pmin: *mut i32, pmax: *mut i32, psteppingdelta: *mut i32, pdefault: *mut i32, pcapsflag: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getRange_Iris)(windows_core::Interface::as_raw(self), core::mem::transmute(pmin), core::mem::transmute(pmax), core::mem::transmute(psteppingdelta), core::mem::transmute(pdefault), core::mem::transmute(pcapsflag)).ok() } + unsafe { (windows_core::Interface::vtable(self).getRange_Iris)(windows_core::Interface::as_raw(self), pmin as _, pmax as _, psteppingdelta as _, pdefault as _, pcapsflag as _).ok() } } pub unsafe fn get_Zoom(&self, pvalue: *mut i32, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_Zoom)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_Zoom)(windows_core::Interface::as_raw(self), pvalue as _, pflags as _).ok() } } pub unsafe fn put_Zoom(&self, value: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_Zoom)(windows_core::Interface::as_raw(self), value, flags).ok() } } pub unsafe fn getRange_Zoom(&self, pmin: *mut i32, pmax: *mut i32, psteppingdelta: *mut i32, pdefault: *mut i32, pcapsflag: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getRange_Zoom)(windows_core::Interface::as_raw(self), core::mem::transmute(pmin), core::mem::transmute(pmax), core::mem::transmute(psteppingdelta), core::mem::transmute(pdefault), core::mem::transmute(pcapsflag)).ok() } + unsafe { (windows_core::Interface::vtable(self).getRange_Zoom)(windows_core::Interface::as_raw(self), pmin as _, pmax as _, psteppingdelta as _, pdefault as _, pcapsflag as _).ok() } } pub unsafe fn get_FocalLengths(&self, plocularfocallength: *mut i32, plobjectivefocallengthmin: *mut i32, plobjectivefocallengthmax: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_FocalLengths)(windows_core::Interface::as_raw(self), core::mem::transmute(plocularfocallength), core::mem::transmute(plobjectivefocallengthmin), core::mem::transmute(plobjectivefocallengthmax)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_FocalLengths)(windows_core::Interface::as_raw(self), plocularfocallength as _, plobjectivefocallengthmin as _, plobjectivefocallengthmax as _).ok() } } pub unsafe fn get_Pan(&self, pvalue: *mut i32, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_Pan)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_Pan)(windows_core::Interface::as_raw(self), pvalue as _, pflags as _).ok() } } pub unsafe fn put_Pan(&self, value: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_Pan)(windows_core::Interface::as_raw(self), value, flags).ok() } } pub unsafe fn getRange_Pan(&self, pmin: *mut i32, pmax: *mut i32, psteppingdelta: *mut i32, pdefault: *mut i32, pcapsflag: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getRange_Pan)(windows_core::Interface::as_raw(self), core::mem::transmute(pmin), core::mem::transmute(pmax), core::mem::transmute(psteppingdelta), core::mem::transmute(pdefault), core::mem::transmute(pcapsflag)).ok() } + unsafe { (windows_core::Interface::vtable(self).getRange_Pan)(windows_core::Interface::as_raw(self), pmin as _, pmax as _, psteppingdelta as _, pdefault as _, pcapsflag as _).ok() } } pub unsafe fn get_Tilt(&self, pvalue: *mut i32, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_Tilt)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_Tilt)(windows_core::Interface::as_raw(self), pvalue as _, pflags as _).ok() } } pub unsafe fn put_Tilt(&self, value: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_Tilt)(windows_core::Interface::as_raw(self), value, flags).ok() } } pub unsafe fn getRange_Tilt(&self, pmin: *mut i32, pmax: *mut i32, psteppingdelta: *mut i32, pdefault: *mut i32, pcapsflag: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getRange_Tilt)(windows_core::Interface::as_raw(self), core::mem::transmute(pmin), core::mem::transmute(pmax), core::mem::transmute(psteppingdelta), core::mem::transmute(pdefault), core::mem::transmute(pcapsflag)).ok() } + unsafe { (windows_core::Interface::vtable(self).getRange_Tilt)(windows_core::Interface::as_raw(self), pmin as _, pmax as _, psteppingdelta as _, pdefault as _, pcapsflag as _).ok() } } pub unsafe fn get_PanTilt(&self, ppanvalue: *mut i32, ptiltvalue: *mut i32, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_PanTilt)(windows_core::Interface::as_raw(self), core::mem::transmute(ppanvalue), core::mem::transmute(ptiltvalue), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_PanTilt)(windows_core::Interface::as_raw(self), ppanvalue as _, ptiltvalue as _, pflags as _).ok() } } pub unsafe fn put_PanTilt(&self, panvalue: i32, tiltvalue: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_PanTilt)(windows_core::Interface::as_raw(self), panvalue, tiltvalue, flags).ok() } } pub unsafe fn get_Roll(&self, pvalue: *mut i32, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_Roll)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_Roll)(windows_core::Interface::as_raw(self), pvalue as _, pflags as _).ok() } } pub unsafe fn put_Roll(&self, value: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_Roll)(windows_core::Interface::as_raw(self), value, flags).ok() } } pub unsafe fn getRange_Roll(&self, pmin: *mut i32, pmax: *mut i32, psteppingdelta: *mut i32, pdefault: *mut i32, pcapsflag: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getRange_Roll)(windows_core::Interface::as_raw(self), core::mem::transmute(pmin), core::mem::transmute(pmax), core::mem::transmute(psteppingdelta), core::mem::transmute(pdefault), core::mem::transmute(pcapsflag)).ok() } + unsafe { (windows_core::Interface::vtable(self).getRange_Roll)(windows_core::Interface::as_raw(self), pmin as _, pmax as _, psteppingdelta as _, pdefault as _, pcapsflag as _).ok() } } pub unsafe fn get_ExposureRelative(&self, pvalue: *mut i32, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_ExposureRelative)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_ExposureRelative)(windows_core::Interface::as_raw(self), pvalue as _, pflags as _).ok() } } pub unsafe fn put_ExposureRelative(&self, value: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_ExposureRelative)(windows_core::Interface::as_raw(self), value, flags).ok() } } pub unsafe fn getRange_ExposureRelative(&self, pmin: *mut i32, pmax: *mut i32, psteppingdelta: *mut i32, pdefault: *mut i32, pcapsflag: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getRange_ExposureRelative)(windows_core::Interface::as_raw(self), core::mem::transmute(pmin), core::mem::transmute(pmax), core::mem::transmute(psteppingdelta), core::mem::transmute(pdefault), core::mem::transmute(pcapsflag)).ok() } + unsafe { (windows_core::Interface::vtable(self).getRange_ExposureRelative)(windows_core::Interface::as_raw(self), pmin as _, pmax as _, psteppingdelta as _, pdefault as _, pcapsflag as _).ok() } } pub unsafe fn get_FocusRelative(&self, pvalue: *mut i32, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_FocusRelative)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_FocusRelative)(windows_core::Interface::as_raw(self), pvalue as _, pflags as _).ok() } } pub unsafe fn put_FocusRelative(&self, value: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_FocusRelative)(windows_core::Interface::as_raw(self), value, flags).ok() } } pub unsafe fn getRange_FocusRelative(&self, pmin: *mut i32, pmax: *mut i32, psteppingdelta: *mut i32, pdefault: *mut i32, pcapsflag: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getRange_FocusRelative)(windows_core::Interface::as_raw(self), core::mem::transmute(pmin), core::mem::transmute(pmax), core::mem::transmute(psteppingdelta), core::mem::transmute(pdefault), core::mem::transmute(pcapsflag)).ok() } + unsafe { (windows_core::Interface::vtable(self).getRange_FocusRelative)(windows_core::Interface::as_raw(self), pmin as _, pmax as _, psteppingdelta as _, pdefault as _, pcapsflag as _).ok() } } pub unsafe fn get_IrisRelative(&self, pvalue: *mut i32, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_IrisRelative)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_IrisRelative)(windows_core::Interface::as_raw(self), pvalue as _, pflags as _).ok() } } pub unsafe fn put_IrisRelative(&self, value: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_IrisRelative)(windows_core::Interface::as_raw(self), value, flags).ok() } } pub unsafe fn getRange_IrisRelative(&self, pmin: *mut i32, pmax: *mut i32, psteppingdelta: *mut i32, pdefault: *mut i32, pcapsflag: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getRange_IrisRelative)(windows_core::Interface::as_raw(self), core::mem::transmute(pmin), core::mem::transmute(pmax), core::mem::transmute(psteppingdelta), core::mem::transmute(pdefault), core::mem::transmute(pcapsflag)).ok() } + unsafe { (windows_core::Interface::vtable(self).getRange_IrisRelative)(windows_core::Interface::as_raw(self), pmin as _, pmax as _, psteppingdelta as _, pdefault as _, pcapsflag as _).ok() } } pub unsafe fn get_ZoomRelative(&self, pvalue: *mut i32, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_ZoomRelative)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_ZoomRelative)(windows_core::Interface::as_raw(self), pvalue as _, pflags as _).ok() } } pub unsafe fn put_ZoomRelative(&self, value: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_ZoomRelative)(windows_core::Interface::as_raw(self), value, flags).ok() } } pub unsafe fn getRange_ZoomRelative(&self, pmin: *mut i32, pmax: *mut i32, psteppingdelta: *mut i32, pdefault: *mut i32, pcapsflag: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getRange_ZoomRelative)(windows_core::Interface::as_raw(self), core::mem::transmute(pmin), core::mem::transmute(pmax), core::mem::transmute(psteppingdelta), core::mem::transmute(pdefault), core::mem::transmute(pcapsflag)).ok() } + unsafe { (windows_core::Interface::vtable(self).getRange_ZoomRelative)(windows_core::Interface::as_raw(self), pmin as _, pmax as _, psteppingdelta as _, pdefault as _, pcapsflag as _).ok() } } pub unsafe fn get_PanRelative(&self, pvalue: *mut i32, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_PanRelative)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_PanRelative)(windows_core::Interface::as_raw(self), pvalue as _, pflags as _).ok() } } pub unsafe fn put_PanRelative(&self, value: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_PanRelative)(windows_core::Interface::as_raw(self), value, flags).ok() } } pub unsafe fn get_TiltRelative(&self, pvalue: *mut i32, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_TiltRelative)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_TiltRelative)(windows_core::Interface::as_raw(self), pvalue as _, pflags as _).ok() } } pub unsafe fn put_TiltRelative(&self, value: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_TiltRelative)(windows_core::Interface::as_raw(self), value, flags).ok() } } pub unsafe fn getRange_TiltRelative(&self, pmin: *mut i32, pmax: *mut i32, psteppingdelta: *mut i32, pdefault: *mut i32, pcapsflag: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getRange_TiltRelative)(windows_core::Interface::as_raw(self), core::mem::transmute(pmin), core::mem::transmute(pmax), core::mem::transmute(psteppingdelta), core::mem::transmute(pdefault), core::mem::transmute(pcapsflag)).ok() } + unsafe { (windows_core::Interface::vtable(self).getRange_TiltRelative)(windows_core::Interface::as_raw(self), pmin as _, pmax as _, psteppingdelta as _, pdefault as _, pcapsflag as _).ok() } } pub unsafe fn get_PanTiltRelative(&self, ppanvalue: *mut i32, ptiltvalue: *mut i32, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_PanTiltRelative)(windows_core::Interface::as_raw(self), core::mem::transmute(ppanvalue), core::mem::transmute(ptiltvalue), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_PanTiltRelative)(windows_core::Interface::as_raw(self), ppanvalue as _, ptiltvalue as _, pflags as _).ok() } } pub unsafe fn put_PanTiltRelative(&self, panvalue: i32, tiltvalue: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_PanTiltRelative)(windows_core::Interface::as_raw(self), panvalue, tiltvalue, flags).ok() } } pub unsafe fn getRange_PanRelative(&self, pmin: *mut i32, pmax: *mut i32, psteppingdelta: *mut i32, pdefault: *mut i32, pcapsflag: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getRange_PanRelative)(windows_core::Interface::as_raw(self), core::mem::transmute(pmin), core::mem::transmute(pmax), core::mem::transmute(psteppingdelta), core::mem::transmute(pdefault), core::mem::transmute(pcapsflag)).ok() } + unsafe { (windows_core::Interface::vtable(self).getRange_PanRelative)(windows_core::Interface::as_raw(self), pmin as _, pmax as _, psteppingdelta as _, pdefault as _, pcapsflag as _).ok() } } pub unsafe fn get_RollRelative(&self, pvalue: *mut i32, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_RollRelative)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_RollRelative)(windows_core::Interface::as_raw(self), pvalue as _, pflags as _).ok() } } pub unsafe fn put_RollRelative(&self, value: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_RollRelative)(windows_core::Interface::as_raw(self), value, flags).ok() } } pub unsafe fn getRange_RollRelative(&self, pmin: *mut i32, pmax: *mut i32, psteppingdelta: *mut i32, pdefault: *mut i32, pcapsflag: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getRange_RollRelative)(windows_core::Interface::as_raw(self), core::mem::transmute(pmin), core::mem::transmute(pmax), core::mem::transmute(psteppingdelta), core::mem::transmute(pdefault), core::mem::transmute(pcapsflag)).ok() } + unsafe { (windows_core::Interface::vtable(self).getRange_RollRelative)(windows_core::Interface::as_raw(self), pmin as _, pmax as _, psteppingdelta as _, pdefault as _, pcapsflag as _).ok() } } pub unsafe fn get_ScanMode(&self, pvalue: *mut i32, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_ScanMode)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_ScanMode)(windows_core::Interface::as_raw(self), pvalue as _, pflags as _).ok() } } pub unsafe fn put_ScanMode(&self, value: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_ScanMode)(windows_core::Interface::as_raw(self), value, flags).ok() } } pub unsafe fn get_PrivacyMode(&self, pvalue: *mut i32, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_PrivacyMode)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_PrivacyMode)(windows_core::Interface::as_raw(self), pvalue as _, pflags as _).ok() } } pub unsafe fn put_PrivacyMode(&self, value: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_PrivacyMode)(windows_core::Interface::as_raw(self), value, flags).ok() } @@ -17707,7 +17670,7 @@ impl ICaptureGraphBuilder { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindInterface)(windows_core::Interface::as_raw(self), core::mem::transmute(pcategory.unwrap_or(core::mem::zeroed())), pf.param().abi(), riid, core::mem::transmute(ppint)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindInterface)(windows_core::Interface::as_raw(self), pcategory.unwrap_or(core::mem::zeroed()) as _, pf.param().abi(), riid, ppint as _).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<()> @@ -17716,14 +17679,14 @@ impl ICaptureGraphBuilder { P2: windows_core::Param, P3: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).RenderStream)(windows_core::Interface::as_raw(self), pcategory.unwrap_or(core::mem::zeroed()) as _, 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, { - unsafe { (windows_core::Interface::vtable(self).ControlStream)(windows_core::Interface::as_raw(self), core::mem::transmute(pcategory.unwrap_or(core::mem::zeroed())), pfilter.param().abi(), pstart, pstop, wstartcookie, wstopcookie).ok() } + unsafe { (windows_core::Interface::vtable(self).ControlStream)(windows_core::Interface::as_raw(self), pcategory.unwrap_or(core::mem::zeroed()) as _, pfilter.param().abi(), pstart, pstop, wstartcookie, wstopcookie).ok() } } pub unsafe fn AllocCapFile(&self, lpstr: P0, dwlsize: u64) -> windows_core::Result<()> where @@ -17870,14 +17833,14 @@ impl ICaptureGraphBuilder2 { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SetOutputFileName)(windows_core::Interface::as_raw(self), ptype, lpstrfile.param().abi(), core::mem::transmute(ppf), core::mem::transmute(ppsink.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetOutputFileName)(windows_core::Interface::as_raw(self), ptype, lpstrfile.param().abi(), core::mem::transmute(ppf), ppsink.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (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(), riid, core::mem::transmute(ppint)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindInterface)(windows_core::Interface::as_raw(self), pcategory.unwrap_or(core::mem::zeroed()) as _, ptype.unwrap_or(core::mem::zeroed()) as _, pf.param().abi(), riid, ppint as _).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<()> @@ -17886,14 +17849,14 @@ impl ICaptureGraphBuilder2 { P3: windows_core::Param, P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).RenderStream)(windows_core::Interface::as_raw(self), core::mem::transmute(pcategory.unwrap_or(core::mem::zeroed())), ptype, psource.param().abi(), pfcompressor.param().abi(), pfrenderer.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).RenderStream)(windows_core::Interface::as_raw(self), pcategory.unwrap_or(core::mem::zeroed()) as _, 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, { - unsafe { (windows_core::Interface::vtable(self).ControlStream)(windows_core::Interface::as_raw(self), pcategory, ptype, pfilter.param().abi(), core::mem::transmute(pstart.unwrap_or(core::mem::zeroed())), core::mem::transmute(pstop.unwrap_or(core::mem::zeroed())), wstartcookie, wstopcookie).ok() } + unsafe { (windows_core::Interface::vtable(self).ControlStream)(windows_core::Interface::as_raw(self), pcategory, ptype, pfilter.param().abi(), pstart.unwrap_or(core::mem::zeroed()) as _, pstop.unwrap_or(core::mem::zeroed()) as _, wstartcookie, wstopcookie).ok() } } pub unsafe fn AllocCapFile(&self, lpstr: P0, dwlsize: u64) -> windows_core::Result<()> where @@ -17915,7 +17878,7 @@ impl ICaptureGraphBuilder2 { { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).FindPin)(windows_core::Interface::as_raw(self), psource.param().abi(), pindir, core::mem::transmute(pcategory.unwrap_or(core::mem::zeroed())), core::mem::transmute(ptype.unwrap_or(core::mem::zeroed())), funconnected.into(), num, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).FindPin)(windows_core::Interface::as_raw(self), psource.param().abi(), pindir, pcategory.unwrap_or(core::mem::zeroed()) as _, ptype.unwrap_or(core::mem::zeroed()) as _, funconnected.into(), num, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } } @@ -18233,7 +18196,7 @@ impl IConfigAsfWriter2 { unsafe { (windows_core::Interface::vtable(self).SetParam)(windows_core::Interface::as_raw(self), dwparam, dwparam1, dwparam2).ok() } } pub unsafe fn GetParam(&self, dwparam: u32, pdwparam1: *mut u32, pdwparam2: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetParam)(windows_core::Interface::as_raw(self), dwparam, core::mem::transmute(pdwparam1), core::mem::transmute(pdwparam2)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetParam)(windows_core::Interface::as_raw(self), dwparam, pdwparam1 as _, pdwparam2 as _).ok() } } pub unsafe fn ResetMultiPassState(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ResetMultiPassState)(windows_core::Interface::as_raw(self)).ok() } @@ -18404,7 +18367,7 @@ impl IConfigInterleaving { unsafe { (windows_core::Interface::vtable(self).put_Interleaving)(windows_core::Interface::as_raw(self), prtinterleave, prtpreroll).ok() } } pub unsafe fn get_Interleaving(&self, prtinterleave: *mut i64, prtpreroll: *mut i64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_Interleaving)(windows_core::Interface::as_raw(self), core::mem::transmute(prtinterleave), core::mem::transmute(prtpreroll)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_Interleaving)(windows_core::Interface::as_raw(self), prtinterleave as _, prtpreroll as _).ok() } } } #[repr(C)] @@ -18515,7 +18478,7 @@ impl IDDrawExclModeVideo { } #[cfg(feature = "Win32_Graphics_DirectDraw")] pub unsafe fn GetDDrawObject(&self, ppddrawobject: *mut Option, pbusingexternal: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDDrawObject)(windows_core::Interface::as_raw(self), core::mem::transmute(ppddrawobject), core::mem::transmute(pbusingexternal)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDDrawObject)(windows_core::Interface::as_raw(self), core::mem::transmute(ppddrawobject), pbusingexternal as _).ok() } } #[cfg(feature = "Win32_Graphics_DirectDraw")] pub unsafe fn SetDDrawSurface(&self, pddrawsurface: P0) -> windows_core::Result<()> @@ -18526,13 +18489,13 @@ impl IDDrawExclModeVideo { } #[cfg(feature = "Win32_Graphics_DirectDraw")] pub unsafe fn GetDDrawSurface(&self, ppddrawsurface: *mut Option, pbusingexternal: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDDrawSurface)(windows_core::Interface::as_raw(self), core::mem::transmute(ppddrawsurface), core::mem::transmute(pbusingexternal)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDDrawSurface)(windows_core::Interface::as_raw(self), core::mem::transmute(ppddrawsurface), pbusingexternal as _).ok() } } pub unsafe fn SetDrawParameters(&self, prcsource: *const super::super::Foundation::RECT, prctarget: *const super::super::Foundation::RECT) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetDrawParameters)(windows_core::Interface::as_raw(self), prcsource, prctarget).ok() } } pub unsafe fn GetNativeVideoProps(&self, pdwvideowidth: *mut u32, pdwvideoheight: *mut u32, pdwpictaspectratiox: *mut u32, pdwpictaspectratioy: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNativeVideoProps)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwvideowidth), core::mem::transmute(pdwvideoheight), core::mem::transmute(pdwpictaspectratiox), core::mem::transmute(pdwpictaspectratioy)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNativeVideoProps)(windows_core::Interface::as_raw(self), pdwvideowidth as _, pdwvideoheight as _, pdwpictaspectratiox as _, pdwpictaspectratioy as _).ok() } } pub unsafe fn SetCallbackInterface(&self, pcallback: P0, dwflags: u32) -> windows_core::Result<()> where @@ -18768,7 +18731,7 @@ windows_core::imp::define_interface!(IDVEnc, IDVEnc_Vtbl, 0xd18e17a0_aacb_11d0_a windows_core::imp::interface_hierarchy!(IDVEnc, windows_core::IUnknown); impl IDVEnc { pub unsafe fn get_IFormatResolution(&self, videoformat: *mut i32, dvformat: *mut i32, resolution: *mut i32, fdvinfo: u8, sdvinfo: *mut DVINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_IFormatResolution)(windows_core::Interface::as_raw(self), core::mem::transmute(videoformat), core::mem::transmute(dvformat), core::mem::transmute(resolution), fdvinfo, core::mem::transmute(sdvinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_IFormatResolution)(windows_core::Interface::as_raw(self), videoformat as _, dvformat as _, resolution as _, fdvinfo, sdvinfo as _).ok() } } pub unsafe fn put_IFormatResolution(&self, videoformat: i32, dvformat: i32, resolution: i32, fdvinfo: u8, sdvinfo: *const DVINFO) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_IFormatResolution)(windows_core::Interface::as_raw(self), videoformat, dvformat, resolution, fdvinfo, sdvinfo).ok() } @@ -19006,7 +18969,7 @@ windows_core::imp::interface_hierarchy!(IDirectDrawMediaSample, windows_core::IU impl IDirectDrawMediaSample { #[cfg(feature = "Win32_Graphics_DirectDraw")] pub unsafe fn GetSurfaceAndReleaseLock(&self, ppdirectdrawsurface: *mut Option, prect: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSurfaceAndReleaseLock)(windows_core::Interface::as_raw(self), core::mem::transmute(ppdirectdrawsurface), core::mem::transmute(prect)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSurfaceAndReleaseLock)(windows_core::Interface::as_raw(self), core::mem::transmute(ppdirectdrawsurface), prect as _).ok() } } pub unsafe fn LockMediaSamplePointer(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).LockMediaSamplePointer)(windows_core::Interface::as_raw(self)).ok() } @@ -19110,7 +19073,7 @@ windows_core::imp::interface_hierarchy!(IDirectDrawMediaStream, windows_core::IU impl IDirectDrawMediaStream { #[cfg(feature = "Win32_Graphics_DirectDraw")] pub unsafe fn GetFormat(&self, pddsdcurrent: *mut super::super::Graphics::DirectDraw::DDSURFACEDESC, ppdirectdrawpalette: *mut Option, pddsddesired: *mut super::super::Graphics::DirectDraw::DDSURFACEDESC, pdwflags: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(pddsdcurrent), core::mem::transmute(ppdirectdrawpalette), core::mem::transmute(pddsddesired), core::mem::transmute(pdwflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFormat)(windows_core::Interface::as_raw(self), pddsdcurrent as _, core::mem::transmute(ppdirectdrawpalette), pddsddesired as _, pdwflags as _).ok() } } #[cfg(feature = "Win32_Graphics_DirectDraw")] pub unsafe fn SetFormat(&self, pddsurfacedesc: *const super::super::Graphics::DirectDraw::DDSURFACEDESC, pdirectdrawpalette: P1) -> windows_core::Result<()> @@ -19268,7 +19231,7 @@ windows_core::imp::interface_hierarchy!(IDirectDrawStreamSample, windows_core::I impl IDirectDrawStreamSample { #[cfg(feature = "Win32_Graphics_DirectDraw")] pub unsafe fn GetSurface(&self, ppdirectdrawsurface: *mut Option, prect: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSurface)(windows_core::Interface::as_raw(self), core::mem::transmute(ppdirectdrawsurface), core::mem::transmute(prect)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSurface)(windows_core::Interface::as_raw(self), core::mem::transmute(ppdirectdrawsurface), prect as _).ok() } } pub unsafe fn SetRect(&self, prect: *const super::super::Foundation::RECT) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetRect)(windows_core::Interface::as_raw(self), prect).ok() } @@ -19325,18 +19288,18 @@ impl IDirectDrawVideo { } #[cfg(feature = "Win32_Graphics_DirectDraw")] pub unsafe fn GetCaps(&self, pcaps: *mut super::super::Graphics::DirectDraw::DDCAPS_DX7) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), core::mem::transmute(pcaps)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), pcaps as _).ok() } } #[cfg(feature = "Win32_Graphics_DirectDraw")] pub unsafe fn GetEmulatedCaps(&self, pcaps: *mut super::super::Graphics::DirectDraw::DDCAPS_DX7) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEmulatedCaps)(windows_core::Interface::as_raw(self), core::mem::transmute(pcaps)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEmulatedCaps)(windows_core::Interface::as_raw(self), pcaps as _).ok() } } #[cfg(feature = "Win32_Graphics_DirectDraw")] pub unsafe fn GetSurfaceDesc(&self, psurfacedesc: *mut super::super::Graphics::DirectDraw::DDSURFACEDESC) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSurfaceDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(psurfacedesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSurfaceDesc)(windows_core::Interface::as_raw(self), psurfacedesc as _).ok() } } pub unsafe fn GetFourCCCodes(&self, pcount: *mut u32, pcodes: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFourCCCodes)(windows_core::Interface::as_raw(self), core::mem::transmute(pcount), core::mem::transmute(pcodes)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFourCCCodes)(windows_core::Interface::as_raw(self), pcount as _, pcodes as _).ok() } } #[cfg(feature = "Win32_Graphics_DirectDraw")] pub unsafe fn SetDirectDraw(&self, pdirectdraw: P0) -> windows_core::Result<()> @@ -20947,13 +20910,13 @@ impl IDvdGraphBuilder { } } pub unsafe fn GetDvdInterface(&self, riid: *const windows_core::GUID, ppvif: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDvdInterface)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(ppvif)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDvdInterface)(windows_core::Interface::as_raw(self), riid, ppvif as _).ok() } } pub unsafe fn RenderDvdVideoVolume(&self, lpcwszpathname: P0, dwflags: u32, pstatus: *mut AM_DVD_RENDERSTATUS) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).RenderDvdVideoVolume)(windows_core::Interface::as_raw(self), lpcwszpathname.param().abi(), dwflags, core::mem::transmute(pstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).RenderDvdVideoVolume)(windows_core::Interface::as_raw(self), lpcwszpathname.param().abi(), dwflags, pstatus as _).ok() } } } #[repr(C)] @@ -21028,16 +20991,16 @@ impl IDvdInfo { } } pub unsafe fn GetCurrentButton(&self, pulbuttonsavailable: *mut u32, pulcurrentbutton: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrentButton)(windows_core::Interface::as_raw(self), core::mem::transmute(pulbuttonsavailable), core::mem::transmute(pulcurrentbutton)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentButton)(windows_core::Interface::as_raw(self), pulbuttonsavailable as _, pulcurrentbutton as _).ok() } } pub unsafe fn GetCurrentAngle(&self, pulanglesavailable: *mut u32, pulcurrentangle: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrentAngle)(windows_core::Interface::as_raw(self), core::mem::transmute(pulanglesavailable), core::mem::transmute(pulcurrentangle)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentAngle)(windows_core::Interface::as_raw(self), pulanglesavailable as _, pulcurrentangle as _).ok() } } pub unsafe fn GetCurrentAudio(&self, pulstreamsavailable: *mut u32, pulcurrentstream: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrentAudio)(windows_core::Interface::as_raw(self), core::mem::transmute(pulstreamsavailable), core::mem::transmute(pulcurrentstream)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentAudio)(windows_core::Interface::as_raw(self), pulstreamsavailable as _, pulcurrentstream as _).ok() } } pub unsafe fn GetCurrentSubpicture(&self, pulstreamsavailable: *mut u32, pulcurrentstream: *mut u32, pisdisabled: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrentSubpicture)(windows_core::Interface::as_raw(self), core::mem::transmute(pulstreamsavailable), core::mem::transmute(pulcurrentstream), core::mem::transmute(pisdisabled)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentSubpicture)(windows_core::Interface::as_raw(self), pulstreamsavailable as _, pulcurrentstream as _, pisdisabled as _).ok() } } pub unsafe fn GetCurrentUOPS(&self) -> windows_core::Result { unsafe { @@ -21070,10 +21033,10 @@ impl IDvdInfo { } } pub unsafe fn GetTitleAttributes(&self, ultitle: u32, patr: *mut DVD_ATR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTitleAttributes)(windows_core::Interface::as_raw(self), ultitle, core::mem::transmute(patr)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTitleAttributes)(windows_core::Interface::as_raw(self), ultitle, patr as _).ok() } } pub unsafe fn GetVMGAttributes(&self, patr: *mut DVD_ATR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVMGAttributes)(windows_core::Interface::as_raw(self), core::mem::transmute(patr)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVMGAttributes)(windows_core::Interface::as_raw(self), patr as _).ok() } } pub unsafe fn GetCurrentVideoAttributes(&self) -> windows_core::Result<*mut u8> { unsafe { @@ -21094,13 +21057,13 @@ impl IDvdInfo { } } pub unsafe fn GetCurrentVolumeInfo(&self, pulnumofvol: *mut u32, pulthisvolnum: *mut u32, pside: *mut DVD_DISC_SIDE, pulnumoftitles: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrentVolumeInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pulnumofvol), core::mem::transmute(pulthisvolnum), core::mem::transmute(pside), core::mem::transmute(pulnumoftitles)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentVolumeInfo)(windows_core::Interface::as_raw(self), pulnumofvol as _, pulthisvolnum as _, pside as _, pulnumoftitles as _).ok() } } pub unsafe fn GetDVDTextInfo(&self, ptextmanager: &mut [u8], pulactualsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDVDTextInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(ptextmanager.as_ptr()), ptextmanager.len().try_into().unwrap(), core::mem::transmute(pulactualsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDVDTextInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(ptextmanager.as_ptr()), ptextmanager.len().try_into().unwrap(), pulactualsize as _).ok() } } pub unsafe fn GetPlayerParentalLevel(&self, pulparentallevel: *mut u32, pulcountrycode: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPlayerParentalLevel)(windows_core::Interface::as_raw(self), core::mem::transmute(pulparentallevel), core::mem::transmute(pulcountrycode)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPlayerParentalLevel)(windows_core::Interface::as_raw(self), pulparentallevel as _, pulcountrycode as _).ok() } } pub unsafe fn GetNumberOfChapters(&self, ultitle: u32) -> windows_core::Result { unsafe { @@ -21115,7 +21078,7 @@ impl IDvdInfo { } } pub unsafe fn GetRoot(&self, proot: &mut [u8], pulactualsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRoot)(windows_core::Interface::as_raw(self), core::mem::transmute(proot.as_ptr()), proot.len().try_into().unwrap(), core::mem::transmute(pulactualsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRoot)(windows_core::Interface::as_raw(self), core::mem::transmute(proot.as_ptr()), proot.len().try_into().unwrap(), pulactualsize as _).ok() } } } #[repr(C)] @@ -21436,19 +21399,19 @@ impl IDvdInfo2 { } } pub unsafe fn GetTotalTitleTime(&self, ptotaltime: *mut DVD_HMSF_TIMECODE, ultimecodeflags: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTotalTitleTime)(windows_core::Interface::as_raw(self), core::mem::transmute(ptotaltime), core::mem::transmute(ultimecodeflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTotalTitleTime)(windows_core::Interface::as_raw(self), ptotaltime as _, ultimecodeflags as _).ok() } } pub unsafe fn GetCurrentButton(&self, pulbuttonsavailable: *mut u32, pulcurrentbutton: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrentButton)(windows_core::Interface::as_raw(self), core::mem::transmute(pulbuttonsavailable), core::mem::transmute(pulcurrentbutton)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentButton)(windows_core::Interface::as_raw(self), pulbuttonsavailable as _, pulcurrentbutton as _).ok() } } pub unsafe fn GetCurrentAngle(&self, pulanglesavailable: *mut u32, pulcurrentangle: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrentAngle)(windows_core::Interface::as_raw(self), core::mem::transmute(pulanglesavailable), core::mem::transmute(pulcurrentangle)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentAngle)(windows_core::Interface::as_raw(self), pulanglesavailable as _, pulcurrentangle as _).ok() } } pub unsafe fn GetCurrentAudio(&self, pulstreamsavailable: *mut u32, pulcurrentstream: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrentAudio)(windows_core::Interface::as_raw(self), core::mem::transmute(pulstreamsavailable), core::mem::transmute(pulcurrentstream)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentAudio)(windows_core::Interface::as_raw(self), pulstreamsavailable as _, pulcurrentstream as _).ok() } } pub unsafe fn GetCurrentSubpicture(&self, pulstreamsavailable: *mut u32, pulcurrentstream: *mut u32, pbisdisabled: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrentSubpicture)(windows_core::Interface::as_raw(self), core::mem::transmute(pulstreamsavailable), core::mem::transmute(pulcurrentstream), core::mem::transmute(pbisdisabled)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentSubpicture)(windows_core::Interface::as_raw(self), pulstreamsavailable as _, pulcurrentstream as _, pbisdisabled as _).ok() } } pub unsafe fn GetCurrentUOPS(&self) -> windows_core::Result { unsafe { @@ -21481,19 +21444,19 @@ impl IDvdInfo2 { } } pub unsafe fn GetTitleAttributes(&self, ultitle: u32, pmenu: *mut DVD_MenuAttributes, ptitle: *mut DVD_TitleAttributes) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTitleAttributes)(windows_core::Interface::as_raw(self), ultitle, core::mem::transmute(pmenu), core::mem::transmute(ptitle)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTitleAttributes)(windows_core::Interface::as_raw(self), ultitle, pmenu as _, ptitle as _).ok() } } pub unsafe fn GetVMGAttributes(&self, patr: *mut DVD_MenuAttributes) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVMGAttributes)(windows_core::Interface::as_raw(self), core::mem::transmute(patr)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVMGAttributes)(windows_core::Interface::as_raw(self), patr as _).ok() } } pub unsafe fn GetCurrentVideoAttributes(&self, patr: *mut DVD_VideoAttributes) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrentVideoAttributes)(windows_core::Interface::as_raw(self), core::mem::transmute(patr)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentVideoAttributes)(windows_core::Interface::as_raw(self), patr as _).ok() } } pub unsafe fn GetAudioAttributes(&self, ulstream: u32, patr: *mut DVD_AudioAttributes) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAudioAttributes)(windows_core::Interface::as_raw(self), ulstream, core::mem::transmute(patr)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAudioAttributes)(windows_core::Interface::as_raw(self), ulstream, patr as _).ok() } } pub unsafe fn GetKaraokeAttributes(&self, ulstream: u32, pattributes: *mut DVD_KaraokeAttributes) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetKaraokeAttributes)(windows_core::Interface::as_raw(self), ulstream, core::mem::transmute(pattributes)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetKaraokeAttributes)(windows_core::Interface::as_raw(self), ulstream, pattributes as _).ok() } } pub unsafe fn GetSubpictureAttributes(&self, ulstream: u32) -> windows_core::Result { unsafe { @@ -21502,7 +21465,7 @@ impl IDvdInfo2 { } } pub unsafe fn GetDVDVolumeInfo(&self, pulnumofvolumes: *mut u32, pulvolume: *mut u32, pside: *mut DVD_DISC_SIDE, pulnumoftitles: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDVDVolumeInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pulnumofvolumes), core::mem::transmute(pulvolume), core::mem::transmute(pside), core::mem::transmute(pulnumoftitles)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDVDVolumeInfo)(windows_core::Interface::as_raw(self), pulnumofvolumes as _, pulvolume as _, pside as _, pulnumoftitles as _).ok() } } pub unsafe fn GetDVDTextNumberOfLanguages(&self) -> windows_core::Result { unsafe { @@ -21511,16 +21474,16 @@ impl IDvdInfo2 { } } pub unsafe fn GetDVDTextLanguageInfo(&self, ullangindex: u32, pulnumofstrings: *mut u32, plangcode: *mut u32, pbcharacterset: *mut DVD_TextCharSet) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDVDTextLanguageInfo)(windows_core::Interface::as_raw(self), ullangindex, core::mem::transmute(pulnumofstrings), core::mem::transmute(plangcode), core::mem::transmute(pbcharacterset)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDVDTextLanguageInfo)(windows_core::Interface::as_raw(self), ullangindex, pulnumofstrings as _, plangcode as _, pbcharacterset as _).ok() } } pub unsafe fn GetDVDTextStringAsNative(&self, ullangindex: u32, ulstringindex: u32, pbbuffer: *mut u8, ulmaxbuffersize: u32, pulactualsize: *mut u32, ptype: *mut DVD_TextStringType) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDVDTextStringAsNative)(windows_core::Interface::as_raw(self), ullangindex, ulstringindex, core::mem::transmute(pbbuffer), ulmaxbuffersize, core::mem::transmute(pulactualsize), core::mem::transmute(ptype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDVDTextStringAsNative)(windows_core::Interface::as_raw(self), ullangindex, ulstringindex, pbbuffer as _, ulmaxbuffersize, pulactualsize as _, ptype as _).ok() } } pub unsafe fn GetDVDTextStringAsUnicode(&self, ullangindex: u32, ulstringindex: u32, pchwbuffer: windows_core::PWSTR, ulmaxbuffersize: u32, pulactualsize: *mut u32, ptype: *mut DVD_TextStringType) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDVDTextStringAsUnicode)(windows_core::Interface::as_raw(self), ullangindex, ulstringindex, core::mem::transmute(pchwbuffer), ulmaxbuffersize, core::mem::transmute(pulactualsize), core::mem::transmute(ptype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDVDTextStringAsUnicode)(windows_core::Interface::as_raw(self), ullangindex, ulstringindex, core::mem::transmute(pchwbuffer), ulmaxbuffersize, pulactualsize as _, ptype as _).ok() } } pub unsafe fn GetPlayerParentalLevel(&self, pulparentallevel: *mut u32, pbcountrycode: &mut [u8; 2]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPlayerParentalLevel)(windows_core::Interface::as_raw(self), core::mem::transmute(pulparentallevel), core::mem::transmute(pbcountrycode.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPlayerParentalLevel)(windows_core::Interface::as_raw(self), pulparentallevel as _, core::mem::transmute(pbcountrycode.as_ptr())).ok() } } pub unsafe fn GetNumberOfChapters(&self, ultitle: u32) -> windows_core::Result { unsafe { @@ -21535,7 +21498,7 @@ impl IDvdInfo2 { } } pub unsafe fn GetDVDDirectory(&self, pszwpath: &mut [u16], pulactualsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDVDDirectory)(windows_core::Interface::as_raw(self), core::mem::transmute(pszwpath.as_ptr()), pszwpath.len().try_into().unwrap(), core::mem::transmute(pulactualsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDVDDirectory)(windows_core::Interface::as_raw(self), core::mem::transmute(pszwpath.as_ptr()), pszwpath.len().try_into().unwrap(), pulactualsize as _).ok() } } pub unsafe fn IsAudioStreamEnabled(&self, ulstreamnum: u32) -> windows_core::Result { unsafe { @@ -21559,7 +21522,7 @@ impl IDvdInfo2 { } } pub unsafe fn GetMenuLanguages(&self, planguages: *mut u32, ulmaxlanguages: u32, pulactuallanguages: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMenuLanguages)(windows_core::Interface::as_raw(self), core::mem::transmute(planguages), ulmaxlanguages, core::mem::transmute(pulactuallanguages)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMenuLanguages)(windows_core::Interface::as_raw(self), planguages as _, ulmaxlanguages, pulactuallanguages as _).ok() } } pub unsafe fn GetButtonAtPosition(&self, point: super::super::Foundation::POINT) -> windows_core::Result { unsafe { @@ -21580,13 +21543,13 @@ impl IDvdInfo2 { } } pub unsafe fn GetDefaultAudioLanguage(&self, planguage: *mut u32, paudioextension: *mut DVD_AUDIO_LANG_EXT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDefaultAudioLanguage)(windows_core::Interface::as_raw(self), core::mem::transmute(planguage), core::mem::transmute(paudioextension)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDefaultAudioLanguage)(windows_core::Interface::as_raw(self), planguage as _, paudioextension as _).ok() } } pub unsafe fn GetDefaultSubpictureLanguage(&self, planguage: *mut u32, psubpictureextension: *mut DVD_SUBPICTURE_LANG_EXT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDefaultSubpictureLanguage)(windows_core::Interface::as_raw(self), core::mem::transmute(planguage), core::mem::transmute(psubpictureextension)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDefaultSubpictureLanguage)(windows_core::Interface::as_raw(self), planguage as _, psubpictureextension as _).ok() } } pub unsafe fn GetDecoderCaps(&self, pcaps: *mut DVD_DECODER_CAPS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDecoderCaps)(windows_core::Interface::as_raw(self), core::mem::transmute(pcaps)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDecoderCaps)(windows_core::Interface::as_raw(self), pcaps as _).ok() } } pub unsafe fn GetButtonRect(&self, ulbutton: u32) -> windows_core::Result { unsafe { @@ -22318,7 +22281,7 @@ impl IEncoderAPI { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetParameterValues(&self, api: *const windows_core::GUID, values: *mut *mut super::super::System::Variant::VARIANT, valuescount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetParameterValues)(windows_core::Interface::as_raw(self), api, core::mem::transmute(values), core::mem::transmute(valuescount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetParameterValues)(windows_core::Interface::as_raw(self), api, values as _, valuescount as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetDefaultValue(&self, api: *const windows_core::GUID) -> windows_core::Result { @@ -22454,7 +22417,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 { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppfilter.len().try_into().unwrap(), core::mem::transmute(ppfilter.as_ptr()), pcfetched.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn Skip(&self, cfilters: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), cfilters).ok() } @@ -22539,7 +22502,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 { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppmediatypes.len().try_into().unwrap(), core::mem::transmute(ppmediatypes.as_ptr()), pcfetched.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn Skip(&self, cmediatypes: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), cmediatypes).ok() } @@ -22623,7 +22586,7 @@ windows_core::imp::define_interface!(IEnumPIDMap, IEnumPIDMap_Vtbl, 0xafb6c2a2_2 windows_core::imp::interface_hierarchy!(IEnumPIDMap, windows_core::IUnknown); impl IEnumPIDMap { pub unsafe fn Next(&self, ppidmap: &mut [PID_MAP], pcreceived: *mut u32) -> windows_core::HRESULT { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppidmap.len().try_into().unwrap(), core::mem::transmute(ppidmap.as_ptr()), core::mem::transmute(pcreceived)) } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppidmap.len().try_into().unwrap(), core::mem::transmute(ppidmap.as_ptr()), pcreceived as _) } } pub unsafe fn Skip(&self, crecords: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), crecords).ok() } @@ -22701,7 +22664,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 { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pppins.len().try_into().unwrap(), core::mem::transmute(pppins.as_ptr()), pcfetched.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn Skip(&self, cpins: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), cpins).ok() } @@ -22779,7 +22742,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 { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), apregfilter.len().try_into().unwrap(), core::mem::transmute(apregfilter.as_ptr()), pcfetched.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn Skip(&self, cfilters: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), cfilters).ok() } @@ -22857,7 +22820,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pstreamidmap.len().try_into().unwrap(), core::mem::transmute(pstreamidmap.as_ptr()), pcreceived.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Skip(&self, crecords: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), crecords).ok() } @@ -22942,11 +22905,11 @@ impl IFileSinkFilter { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).SetFileName)(windows_core::Interface::as_raw(self), pszfilename.param().abi(), pmt.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurFile)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszfilename), core::mem::transmute(pmt)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurFile)(windows_core::Interface::as_raw(self), ppszfilename as _, core::mem::transmute(pmt)).ok() } } } #[repr(C)] @@ -23060,11 +23023,11 @@ impl IFileSourceFilter { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Load)(windows_core::Interface::as_raw(self), pszfilename.param().abi(), pmt.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetCurFile)(windows_core::Interface::as_raw(self), ppszfilename as _, pmt.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -23251,7 +23214,7 @@ impl IFilterGraph { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).ConnectDirect)(windows_core::Interface::as_raw(self), ppinout.param().abi(), ppinin.param().abi(), pmt.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Reconnect(&self, ppin: P0) -> windows_core::Result<()> where @@ -23411,13 +23374,13 @@ impl IFilterGraph2 { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).ReconnectEx)(windows_core::Interface::as_raw(self), ppin.param().abi(), pmt.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn RenderEx(&self, ppinout: P0, dwflags: u32, pvcontext: Option<*const u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).RenderEx)(windows_core::Interface::as_raw(self), ppinout.param().abi(), dwflags, core::mem::transmute(pvcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).RenderEx)(windows_core::Interface::as_raw(self), ppinout.param().abi(), dwflags, pvcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -23884,7 +23847,7 @@ impl IFilterMapper2 { P1: windows_core::Param, P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).RegisterFilter)(windows_core::Interface::as_raw(self), clsidfilter, name.param().abi(), core::mem::transmute(ppmoniker.unwrap_or(core::mem::zeroed())), pclsidcategory, szinstance.param().abi(), prf2).ok() } + unsafe { (windows_core::Interface::vtable(self).RegisterFilter)(windows_core::Interface::as_raw(self), clsidfilter, name.param().abi(), ppmoniker.unwrap_or(core::mem::zeroed()) as _, pclsidcategory, szinstance.param().abi(), prf2).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn EnumMatchingFilters(&self, ppenum: *mut Option, dwflags: u32, bexactmatch: bool, dwmerit: u32, binputneeded: bool, cinputtypes: u32, pinputtypes: Option<*const windows_core::GUID>, pmedin: Option<*const REGPINMEDIUM>, ppincategoryin: Option<*const windows_core::GUID>, brender: bool, boutputneeded: bool, coutputtypes: u32, poutputtypes: Option<*const windows_core::GUID>, pmedout: Option<*const REGPINMEDIUM>, ppincategoryout: Option<*const windows_core::GUID>) -> windows_core::Result<()> { @@ -23897,15 +23860,15 @@ impl IFilterMapper2 { dwmerit, binputneeded.into(), cinputtypes, - 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())), + pinputtypes.unwrap_or(core::mem::zeroed()) as _, + pmedin.unwrap_or(core::mem::zeroed()) as _, + ppincategoryin.unwrap_or(core::mem::zeroed()) as _, brender.into(), boutputneeded.into(), coutputtypes, - 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())), + poutputtypes.unwrap_or(core::mem::zeroed()) as _, + pmedout.unwrap_or(core::mem::zeroed()) as _, + ppincategoryout.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -24043,7 +24006,7 @@ windows_core::imp::define_interface!(IFrequencyMap, IFrequencyMap_Vtbl, 0x06fb45 windows_core::imp::interface_hierarchy!(IFrequencyMap, windows_core::IUnknown); impl IFrequencyMap { pub unsafe fn get_FrequencyMapping(&self, ulcount: *mut u32, ppullist: *mut *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_FrequencyMapping)(windows_core::Interface::as_raw(self), core::mem::transmute(ulcount), core::mem::transmute(ppullist)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_FrequencyMapping)(windows_core::Interface::as_raw(self), ulcount as _, ppullist as _).ok() } } pub unsafe fn put_FrequencyMapping(&self, plist: &[u32]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_FrequencyMapping)(windows_core::Interface::as_raw(self), plist.len().try_into().unwrap(), core::mem::transmute(plist.as_ptr())).ok() } @@ -24058,10 +24021,10 @@ impl IFrequencyMap { unsafe { (windows_core::Interface::vtable(self).SetCountryCode)(windows_core::Interface::as_raw(self), ulcountrycode).ok() } } pub unsafe fn get_DefaultFrequencyMapping(&self, ulcountrycode: u32, pulcount: *mut u32, ppullist: *mut *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_DefaultFrequencyMapping)(windows_core::Interface::as_raw(self), ulcountrycode, core::mem::transmute(pulcount), core::mem::transmute(ppullist)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_DefaultFrequencyMapping)(windows_core::Interface::as_raw(self), ulcountrycode, pulcount as _, ppullist as _).ok() } } pub unsafe fn get_CountryCodeList(&self, pulcount: *mut u32, ppullist: *mut *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_CountryCodeList)(windows_core::Interface::as_raw(self), core::mem::transmute(pulcount), core::mem::transmute(ppullist)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_CountryCodeList)(windows_core::Interface::as_raw(self), pulcount as _, ppullist as _).ok() } } } #[repr(C)] @@ -24151,7 +24114,7 @@ impl IFullScreenVideo { } } pub unsafe fn GetModeInfo(&self, mode: i32, pwidth: *mut i32, pheight: *mut i32, pdepth: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetModeInfo)(windows_core::Interface::as_raw(self), mode, core::mem::transmute(pwidth), core::mem::transmute(pheight), core::mem::transmute(pdepth)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModeInfo)(windows_core::Interface::as_raw(self), mode, pwidth as _, pheight as _, pdepth as _).ok() } } pub unsafe fn GetCurrentMode(&self) -> windows_core::Result { unsafe { @@ -24435,7 +24398,7 @@ impl IFullScreenVideoEx { } #[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<()> { - unsafe { (windows_core::Interface::vtable(self).GetAcceleratorTable)(windows_core::Interface::as_raw(self), core::mem::transmute(phwnd), core::mem::transmute(phaccel)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAcceleratorTable)(windows_core::Interface::as_raw(self), phwnd as _, phaccel as _).ok() } } pub unsafe fn KeepPixelAspectRatio(&self, keepaspect: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).KeepPixelAspectRatio)(windows_core::Interface::as_raw(self), keepaspect).ok() } @@ -24929,7 +24892,7 @@ windows_core::imp::define_interface!(IGraphConfigCallback, IGraphConfigCallback_ windows_core::imp::interface_hierarchy!(IGraphConfigCallback, windows_core::IUnknown); impl IGraphConfigCallback { pub unsafe fn Reconfigure(&self, pvcontext: *mut core::ffi::c_void, dwflags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Reconfigure)(windows_core::Interface::as_raw(self), core::mem::transmute(pvcontext), dwflags).ok() } + unsafe { (windows_core::Interface::vtable(self).Reconfigure)(windows_core::Interface::as_raw(self), pvcontext as _, dwflags).ok() } } } #[repr(C)] @@ -25379,7 +25342,7 @@ impl IMediaEvent { } } pub unsafe fn GetEvent(&self, leventcode: *mut i32, lparam1: *mut isize, lparam2: *mut isize, mstimeout: i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(leventcode), core::mem::transmute(lparam1), core::mem::transmute(lparam2), mstimeout).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEvent)(windows_core::Interface::as_raw(self), leventcode as _, lparam1 as _, lparam2 as _, mstimeout).ok() } } pub unsafe fn WaitForCompletion(&self, mstimeout: i32) -> windows_core::Result { unsafe { @@ -25732,7 +25695,7 @@ impl IMediaParamInfo { } } pub unsafe fn GetParamInfo(&self, dwparamindex: u32, pinfo: *mut MP_PARAMINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetParamInfo)(windows_core::Interface::as_raw(self), dwparamindex, core::mem::transmute(pinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetParamInfo)(windows_core::Interface::as_raw(self), dwparamindex, pinfo as _).ok() } } pub unsafe fn GetParamText(&self, dwparamindex: u32) -> windows_core::Result<*mut u16> { unsafe { @@ -25753,7 +25716,7 @@ impl IMediaParamInfo { } } pub unsafe fn GetCurrentTimeFormat(&self, pguidtimeformat: *mut windows_core::GUID, ptimedata: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrentTimeFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(pguidtimeformat), core::mem::transmute(ptimedata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentTimeFormat)(windows_core::Interface::as_raw(self), pguidtimeformat as _, ptimedata as _).ok() } } } #[repr(C)] @@ -26235,10 +26198,10 @@ impl IMediaSample { unsafe { (windows_core::Interface::vtable(self).GetSize)(windows_core::Interface::as_raw(self)) } } pub unsafe fn GetTime(&self, ptimestart: *mut i64, ptimeend: *mut i64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTime)(windows_core::Interface::as_raw(self), core::mem::transmute(ptimestart), core::mem::transmute(ptimeend)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTime)(windows_core::Interface::as_raw(self), ptimestart as _, ptimeend as _).ok() } } pub unsafe fn SetTime(&self, ptimestart: Option<*const i64>, ptimeend: Option<*const i64>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).SetTime)(windows_core::Interface::as_raw(self), ptimestart.unwrap_or(core::mem::zeroed()) as _, ptimeend.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn IsSyncPoint(&self) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).IsSyncPoint)(windows_core::Interface::as_raw(self)) } @@ -26276,10 +26239,10 @@ impl IMediaSample { unsafe { (windows_core::Interface::vtable(self).SetDiscontinuity)(windows_core::Interface::as_raw(self), bdiscontinuity.into()).ok() } } pub unsafe fn GetMediaTime(&self, ptimestart: *mut i64, ptimeend: *mut i64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMediaTime)(windows_core::Interface::as_raw(self), core::mem::transmute(ptimestart), core::mem::transmute(ptimeend)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMediaTime)(windows_core::Interface::as_raw(self), ptimestart as _, ptimeend as _).ok() } } pub unsafe fn SetMediaTime(&self, ptimestart: Option<*const i64>, ptimeend: Option<*const i64>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).SetMediaTime)(windows_core::Interface::as_raw(self), ptimestart.unwrap_or(core::mem::zeroed()) as _, ptimeend.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -26567,7 +26530,7 @@ impl IMediaSeeking { } } pub unsafe fn CheckCapabilities(&self, pcapabilities: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CheckCapabilities)(windows_core::Interface::as_raw(self), core::mem::transmute(pcapabilities)).ok() } + unsafe { (windows_core::Interface::vtable(self).CheckCapabilities)(windows_core::Interface::as_raw(self), pcapabilities as _).ok() } } pub unsafe fn IsFormatSupported(&self, pformat: *const windows_core::GUID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).IsFormatSupported)(windows_core::Interface::as_raw(self), pformat).ok() } @@ -26609,16 +26572,16 @@ impl IMediaSeeking { } } 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<()> { - unsafe { (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())), source, core::mem::transmute(psourceformat.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ConvertTimeFormat)(windows_core::Interface::as_raw(self), ptarget as _, ptargetformat.unwrap_or(core::mem::zeroed()) as _, source, psourceformat.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetPositions(&self, pcurrent: Option<*mut i64>, dwcurrentflags: u32, pstop: Option<*mut i64>, dwstopflags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetPositions)(windows_core::Interface::as_raw(self), core::mem::transmute(pcurrent.unwrap_or(core::mem::zeroed())), dwcurrentflags, core::mem::transmute(pstop.unwrap_or(core::mem::zeroed())), dwstopflags).ok() } + unsafe { (windows_core::Interface::vtable(self).SetPositions)(windows_core::Interface::as_raw(self), pcurrent.unwrap_or(core::mem::zeroed()) as _, dwcurrentflags, pstop.unwrap_or(core::mem::zeroed()) as _, dwstopflags).ok() } } pub unsafe fn GetPositions(&self, pcurrent: Option<*mut i64>, pstop: Option<*mut i64>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetPositions)(windows_core::Interface::as_raw(self), pcurrent.unwrap_or(core::mem::zeroed()) as _, pstop.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetAvailable(&self, pearliest: Option<*mut i64>, platest: Option<*mut i64>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetAvailable)(windows_core::Interface::as_raw(self), pearliest.unwrap_or(core::mem::zeroed()) as _, platest.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetRate(&self, drate: f64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetRate)(windows_core::Interface::as_raw(self), drate).ok() } @@ -26864,7 +26827,7 @@ impl IMediaStream { } } pub unsafe fn GetInformation(&self, ppurposeid: *mut windows_core::GUID, ptype: *mut STREAM_TYPE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(ppurposeid), core::mem::transmute(ptype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInformation)(windows_core::Interface::as_raw(self), ppurposeid as _, ptype as _).ok() } } pub unsafe fn SetSameFormat(&self, pstreamthathasdesiredformat: P0, dwflags: u32) -> windows_core::Result<()> where @@ -27015,7 +26978,7 @@ impl IMediaStreamFilter { unsafe { (windows_core::Interface::vtable(self).SupportSeeking)(windows_core::Interface::as_raw(self), brenderer.into()).ok() } } pub unsafe fn ReferenceTimeToStreamTime(&self, ptime: *mut i64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReferenceTimeToStreamTime)(windows_core::Interface::as_raw(self), core::mem::transmute(ptime)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReferenceTimeToStreamTime)(windows_core::Interface::as_raw(self), ptime as _).ok() } } pub unsafe fn GetCurrentStreamTime(&self) -> windows_core::Result { unsafe { @@ -27252,7 +27215,7 @@ impl IMemAllocator { unsafe { (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<()> { - unsafe { (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())), dwflags).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(ppbuffer), pstarttime.unwrap_or(core::mem::zeroed()) as _, pendtime.unwrap_or(core::mem::zeroed()) as _, dwflags).ok() } } pub unsafe fn ReleaseBuffer(&self, pbuffer: P0) -> windows_core::Result<()> where @@ -27566,7 +27529,7 @@ impl IMemoryData { unsafe { (windows_core::Interface::vtable(self).SetBuffer)(windows_core::Interface::as_raw(self), cbsize, pbdata, dwflags).ok() } } pub unsafe fn GetInfo(&self, pdwlength: *mut u32, ppbdata: *mut *mut u8, pcbactualdata: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwlength), core::mem::transmute(ppbdata), core::mem::transmute(pcbactualdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInfo)(windows_core::Interface::as_raw(self), pdwlength as _, ppbdata as _, pcbactualdata as _).ok() } } pub unsafe fn SetActual(&self, cbdatavalid: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetActual)(windows_core::Interface::as_raw(self), cbdatavalid).ok() } @@ -27623,10 +27586,10 @@ impl IMixerOCX { unsafe { (windows_core::Interface::vtable(self).OnDisplayChange)(windows_core::Interface::as_raw(self), ulbitsperpixel, ulscreenwidth, ulscreenheight).ok() } } pub unsafe fn GetAspectRatio(&self, pdwpictaspectratiox: *mut u32, pdwpictaspectratioy: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAspectRatio)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwpictaspectratiox), core::mem::transmute(pdwpictaspectratioy)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAspectRatio)(windows_core::Interface::as_raw(self), pdwpictaspectratiox as _, pdwpictaspectratioy as _).ok() } } pub unsafe fn GetVideoSize(&self, pdwvideowidth: *mut u32, pdwvideoheight: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVideoSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwvideowidth), core::mem::transmute(pdwvideoheight)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVideoSize)(windows_core::Interface::as_raw(self), pdwvideowidth as _, pdwvideoheight as _).ok() } } pub unsafe fn GetStatus(&self) -> windows_core::Result<*mut u32> { unsafe { @@ -27816,37 +27779,37 @@ impl IMixerPinConfig { unsafe { (windows_core::Interface::vtable(self).SetRelativePosition)(windows_core::Interface::as_raw(self), dwleft, dwtop, dwright, dwbottom).ok() } } pub unsafe fn GetRelativePosition(&self, pdwleft: *mut u32, pdwtop: *mut u32, pdwright: *mut u32, pdwbottom: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRelativePosition)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwleft), core::mem::transmute(pdwtop), core::mem::transmute(pdwright), core::mem::transmute(pdwbottom)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRelativePosition)(windows_core::Interface::as_raw(self), pdwleft as _, pdwtop as _, pdwright as _, pdwbottom as _).ok() } } pub unsafe fn SetZOrder(&self, dwzorder: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetZOrder)(windows_core::Interface::as_raw(self), dwzorder).ok() } } pub unsafe fn GetZOrder(&self, pdwzorder: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetZOrder)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwzorder)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetZOrder)(windows_core::Interface::as_raw(self), pdwzorder as _).ok() } } pub unsafe fn SetColorKey(&self, pcolorkey: *mut COLORKEY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetColorKey)(windows_core::Interface::as_raw(self), core::mem::transmute(pcolorkey)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetColorKey)(windows_core::Interface::as_raw(self), pcolorkey as _).ok() } } pub unsafe fn GetColorKey(&self, pcolorkey: *mut COLORKEY, pcolor: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetColorKey)(windows_core::Interface::as_raw(self), core::mem::transmute(pcolorkey), core::mem::transmute(pcolor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetColorKey)(windows_core::Interface::as_raw(self), pcolorkey as _, pcolor as _).ok() } } pub unsafe fn SetBlendingParameter(&self, dwblendingparameter: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetBlendingParameter)(windows_core::Interface::as_raw(self), dwblendingparameter).ok() } } pub unsafe fn GetBlendingParameter(&self, pdwblendingparameter: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBlendingParameter)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwblendingparameter)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBlendingParameter)(windows_core::Interface::as_raw(self), pdwblendingparameter as _).ok() } } pub unsafe fn SetAspectRatioMode(&self, amaspectratiomode: AM_ASPECT_RATIO_MODE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetAspectRatioMode)(windows_core::Interface::as_raw(self), amaspectratiomode).ok() } } pub unsafe fn GetAspectRatioMode(&self, pamaspectratiomode: *mut AM_ASPECT_RATIO_MODE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAspectRatioMode)(windows_core::Interface::as_raw(self), core::mem::transmute(pamaspectratiomode)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAspectRatioMode)(windows_core::Interface::as_raw(self), pamaspectratiomode as _).ok() } } pub unsafe fn SetStreamTransparent(&self, bstreamtransparent: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetStreamTransparent)(windows_core::Interface::as_raw(self), bstreamtransparent.into()).ok() } } pub unsafe fn GetStreamTransparent(&self, pbstreamtransparent: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStreamTransparent)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstreamtransparent)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStreamTransparent)(windows_core::Interface::as_raw(self), pbstreamtransparent as _).ok() } } } #[repr(C)] @@ -27985,11 +27948,11 @@ windows_core::imp::interface_hierarchy!(IMixerPinConfig2, windows_core::IUnknown impl IMixerPinConfig2 { #[cfg(feature = "Win32_Graphics_DirectDraw")] pub unsafe fn SetOverlaySurfaceColorControls(&self, pcolorcontrol: *mut super::super::Graphics::DirectDraw::DDCOLORCONTROL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetOverlaySurfaceColorControls)(windows_core::Interface::as_raw(self), core::mem::transmute(pcolorcontrol)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetOverlaySurfaceColorControls)(windows_core::Interface::as_raw(self), pcolorcontrol as _).ok() } } #[cfg(feature = "Win32_Graphics_DirectDraw")] pub unsafe fn GetOverlaySurfaceColorControls(&self, pcolorcontrol: *mut super::super::Graphics::DirectDraw::DDCOLORCONTROL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOverlaySurfaceColorControls)(windows_core::Interface::as_raw(self), core::mem::transmute(pcolorcontrol)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOverlaySurfaceColorControls)(windows_core::Interface::as_raw(self), pcolorcontrol as _).ok() } } } #[repr(C)] @@ -28171,14 +28134,14 @@ impl IMpegAudioDecoder { unsafe { (windows_core::Interface::vtable(self).SetIntegerDecode)(windows_core::Interface::as_raw(self), intdecode).ok() } } pub unsafe fn DualMode(&self, pintdecode: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DualMode)(windows_core::Interface::as_raw(self), core::mem::transmute(pintdecode)).ok() } + unsafe { (windows_core::Interface::vtable(self).DualMode)(windows_core::Interface::as_raw(self), pintdecode as _).ok() } } pub unsafe fn SetDualMode(&self, intdecode: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetDualMode)(windows_core::Interface::as_raw(self), intdecode).ok() } } #[cfg(feature = "Win32_Media_Audio")] pub unsafe fn AudioFormat(&self, lpfmt: *mut MPEG1WAVEFORMAT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AudioFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(lpfmt)).ok() } + unsafe { (windows_core::Interface::vtable(self).AudioFormat)(windows_core::Interface::as_raw(self), lpfmt as _).ok() } } } #[repr(C)] @@ -28355,7 +28318,7 @@ windows_core::imp::define_interface!(IMultiMediaStream, IMultiMediaStream_Vtbl, windows_core::imp::interface_hierarchy!(IMultiMediaStream, windows_core::IUnknown); impl IMultiMediaStream { pub unsafe fn GetInformation(&self, pdwflags: *mut MMSSF_GET_INFORMATION_FLAGS, pstreamtype: *mut STREAM_TYPE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwflags), core::mem::transmute(pstreamtype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInformation)(windows_core::Interface::as_raw(self), pdwflags as _, pstreamtype as _).ok() } } pub unsafe fn GetMediaStream(&self, idpurpose: *const windows_core::GUID) -> windows_core::Result { unsafe { @@ -28543,7 +28506,7 @@ windows_core::imp::interface_hierarchy!(IOverlay, windows_core::IUnknown); impl IOverlay { #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetPalette(&self, pdwcolors: *mut u32, pppalette: *mut *mut super::super::Graphics::Gdi::PALETTEENTRY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPalette)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwcolors), core::mem::transmute(pppalette)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPalette)(windows_core::Interface::as_raw(self), pdwcolors as _, pppalette as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn SetPalette(&self, ppalette: &[super::super::Graphics::Gdi::PALETTEENTRY]) -> windows_core::Result<()> { @@ -28562,7 +28525,7 @@ impl IOverlay { } } pub unsafe fn SetColorKey(&self, pcolorkey: *mut COLORKEY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetColorKey)(windows_core::Interface::as_raw(self), core::mem::transmute(pcolorkey)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetColorKey)(windows_core::Interface::as_raw(self), pcolorkey as _).ok() } } pub unsafe fn GetWindowHandle(&self) -> windows_core::Result { unsafe { @@ -28572,10 +28535,10 @@ impl IOverlay { } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetClipList(&self, psourcerect: *mut super::super::Foundation::RECT, pdestinationrect: *mut super::super::Foundation::RECT, pprgndata: *mut *mut super::super::Graphics::Gdi::RGNDATA) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClipList)(windows_core::Interface::as_raw(self), core::mem::transmute(psourcerect), core::mem::transmute(pdestinationrect), core::mem::transmute(pprgndata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClipList)(windows_core::Interface::as_raw(self), psourcerect as _, pdestinationrect as _, pprgndata as _).ok() } } pub unsafe fn GetVideoPosition(&self, psourcerect: *mut super::super::Foundation::RECT, pdestinationrect: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVideoPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(psourcerect), core::mem::transmute(pdestinationrect)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVideoPosition)(windows_core::Interface::as_raw(self), psourcerect as _, pdestinationrect as _).ok() } } pub unsafe fn Advise(&self, poverlaynotify: P0, dwinterests: u32) -> windows_core::Result<()> where @@ -28941,7 +28904,7 @@ impl IPin { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Connect)(windows_core::Interface::as_raw(self), preceivepin.param().abi(), pmt.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Media_MediaFoundation")] pub unsafe fn ReceiveConnection(&self, pconnector: P0, pmt: *const super::MediaFoundation::AM_MEDIA_TYPE) -> windows_core::Result<()> @@ -28990,7 +28953,7 @@ impl IPin { } } pub unsafe fn QueryInternalConnections(&self, appin: Option<*mut Option>, npin: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).QueryInternalConnections)(windows_core::Interface::as_raw(self), appin.unwrap_or(core::mem::zeroed()) as _, npin as _).ok() } } pub unsafe fn EndOfStream(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).EndOfStream)(windows_core::Interface::as_raw(self)).ok() } @@ -29784,11 +29747,11 @@ windows_core::imp::interface_hierarchy!(IQueueCommand, windows_core::IUnknown); impl IQueueCommand { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn InvokeAtStreamTime(&self, pcmd: *mut Option, time: f64, iid: *const windows_core::GUID, dispidmethod: i32, wflags: i16, cargs: i32, pdispparams: *const super::super::System::Variant::VARIANT, pvarresult: *mut super::super::System::Variant::VARIANT, puargerr: *mut i16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).InvokeAtStreamTime)(windows_core::Interface::as_raw(self), core::mem::transmute(pcmd), time, iid, dispidmethod, wflags, cargs, core::mem::transmute(pdispparams), core::mem::transmute(pvarresult), core::mem::transmute(puargerr)).ok() } + unsafe { (windows_core::Interface::vtable(self).InvokeAtStreamTime)(windows_core::Interface::as_raw(self), core::mem::transmute(pcmd), time, iid, dispidmethod, wflags, cargs, core::mem::transmute(pdispparams), core::mem::transmute(pvarresult), puargerr as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn InvokeAtPresentationTime(&self, pcmd: *mut Option, time: f64, iid: *const windows_core::GUID, dispidmethod: i32, wflags: i16, cargs: i32, pdispparams: *const super::super::System::Variant::VARIANT, pvarresult: *mut super::super::System::Variant::VARIANT, puargerr: *mut i16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).InvokeAtPresentationTime)(windows_core::Interface::as_raw(self), core::mem::transmute(pcmd), time, iid, dispidmethod, wflags, cargs, core::mem::transmute(pdispparams), core::mem::transmute(pvarresult), core::mem::transmute(puargerr)).ok() } + unsafe { (windows_core::Interface::vtable(self).InvokeAtPresentationTime)(windows_core::Interface::as_raw(self), core::mem::transmute(pcmd), time, iid, dispidmethod, wflags, cargs, core::mem::transmute(pdispparams), core::mem::transmute(pvarresult), puargerr as _).ok() } } } #[repr(C)] @@ -30384,7 +30347,7 @@ impl IStreamSample { unsafe { (windows_core::Interface::vtable(self).GetMediaStream)(windows_core::Interface::as_raw(self), core::mem::transmute(ppmediastream)).ok() } } pub unsafe fn GetSampleTimes(&self, pstarttime: *mut i64, pendtime: *mut i64, pcurrenttime: *mut i64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSampleTimes)(windows_core::Interface::as_raw(self), core::mem::transmute(pstarttime), core::mem::transmute(pendtime), core::mem::transmute(pcurrenttime)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSampleTimes)(windows_core::Interface::as_raw(self), pstarttime as _, pendtime as _, pcurrenttime as _).ok() } } pub unsafe fn SetSampleTimes(&self, pstarttime: *const i64, pendtime: *const i64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSampleTimes)(windows_core::Interface::as_raw(self), pstarttime, pendtime).ok() } @@ -30572,10 +30535,10 @@ windows_core::imp::define_interface!(IVMRDeinterlaceControl, IVMRDeinterlaceCont windows_core::imp::interface_hierarchy!(IVMRDeinterlaceControl, windows_core::IUnknown); impl IVMRDeinterlaceControl { pub unsafe fn GetNumberOfDeinterlaceModes(&self, lpvideodescription: *const VMRVideoDesc, lpdwnumdeinterlacemodes: *mut u32, lpdeinterlacemodes: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNumberOfDeinterlaceModes)(windows_core::Interface::as_raw(self), lpvideodescription, core::mem::transmute(lpdwnumdeinterlacemodes), core::mem::transmute(lpdeinterlacemodes)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNumberOfDeinterlaceModes)(windows_core::Interface::as_raw(self), lpvideodescription, lpdwnumdeinterlacemodes as _, lpdeinterlacemodes as _).ok() } } pub unsafe fn GetDeinterlaceModeCaps(&self, lpdeinterlacemode: *const windows_core::GUID, lpvideodescription: *const VMRVideoDesc, lpdeinterlacecaps: *mut VMRDeinterlaceCaps) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeinterlaceModeCaps)(windows_core::Interface::as_raw(self), lpdeinterlacemode, lpvideodescription, core::mem::transmute(lpdeinterlacecaps)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeinterlaceModeCaps)(windows_core::Interface::as_raw(self), lpdeinterlacemode, lpvideodescription, lpdeinterlacecaps as _).ok() } } pub unsafe fn GetDeinterlaceMode(&self, dwstreamid: u32) -> windows_core::Result { unsafe { @@ -30704,10 +30667,10 @@ windows_core::imp::define_interface!(IVMRDeinterlaceControl9, IVMRDeinterlaceCon windows_core::imp::interface_hierarchy!(IVMRDeinterlaceControl9, windows_core::IUnknown); impl IVMRDeinterlaceControl9 { pub unsafe fn GetNumberOfDeinterlaceModes(&self, lpvideodescription: *const VMR9VideoDesc, lpdwnumdeinterlacemodes: *mut u32, lpdeinterlacemodes: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNumberOfDeinterlaceModes)(windows_core::Interface::as_raw(self), lpvideodescription, core::mem::transmute(lpdwnumdeinterlacemodes), core::mem::transmute(lpdeinterlacemodes)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNumberOfDeinterlaceModes)(windows_core::Interface::as_raw(self), lpvideodescription, lpdwnumdeinterlacemodes as _, lpdeinterlacemodes as _).ok() } } pub unsafe fn GetDeinterlaceModeCaps(&self, lpdeinterlacemode: *const windows_core::GUID, lpvideodescription: *const VMR9VideoDesc, lpdeinterlacecaps: *mut VMR9DeinterlaceCaps) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeinterlaceModeCaps)(windows_core::Interface::as_raw(self), lpdeinterlacemode, lpvideodescription, core::mem::transmute(lpdeinterlacecaps)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeinterlaceModeCaps)(windows_core::Interface::as_raw(self), lpdeinterlacemode, lpvideodescription, lpdeinterlacecaps as _).ok() } } pub unsafe fn GetDeinterlaceMode(&self, dwstreamid: u32) -> windows_core::Result { unsafe { @@ -31964,10 +31927,10 @@ impl IVMRMixerControl9 { unsafe { (windows_core::Interface::vtable(self).SetProcAmpControl)(windows_core::Interface::as_raw(self), dwstreamid, lpclrcontrol).ok() } } pub unsafe fn GetProcAmpControl(&self, dwstreamid: u32, lpclrcontrol: *mut VMR9ProcAmpControl) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProcAmpControl)(windows_core::Interface::as_raw(self), dwstreamid, core::mem::transmute(lpclrcontrol)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProcAmpControl)(windows_core::Interface::as_raw(self), dwstreamid, lpclrcontrol as _).ok() } } pub unsafe fn GetProcAmpControlRange(&self, dwstreamid: u32, lpclrcontrol: *mut VMR9ProcAmpControlRange) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProcAmpControlRange)(windows_core::Interface::as_raw(self), dwstreamid, core::mem::transmute(lpclrcontrol)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProcAmpControlRange)(windows_core::Interface::as_raw(self), dwstreamid, lpclrcontrol as _).ok() } } } #[repr(C)] @@ -32135,17 +32098,17 @@ impl IVMRMonitorConfig { unsafe { (windows_core::Interface::vtable(self).SetMonitor)(windows_core::Interface::as_raw(self), pguid).ok() } } pub unsafe fn GetMonitor(&self, pguid: *mut VMRGUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMonitor)(windows_core::Interface::as_raw(self), core::mem::transmute(pguid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMonitor)(windows_core::Interface::as_raw(self), pguid as _).ok() } } pub unsafe fn SetDefaultMonitor(&self, pguid: *const VMRGUID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetDefaultMonitor)(windows_core::Interface::as_raw(self), pguid).ok() } } pub unsafe fn GetDefaultMonitor(&self, pguid: *mut VMRGUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDefaultMonitor)(windows_core::Interface::as_raw(self), core::mem::transmute(pguid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDefaultMonitor)(windows_core::Interface::as_raw(self), pguid as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetAvailableMonitors(&self, pinfo: &mut [VMRMONITORINFO], pdwnumdevices: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAvailableMonitors)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo.as_ptr()), pinfo.len().try_into().unwrap(), core::mem::transmute(pdwnumdevices)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAvailableMonitors)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo.as_ptr()), pinfo.len().try_into().unwrap(), pdwnumdevices as _).ok() } } } #[repr(C)] @@ -32239,7 +32202,7 @@ impl IVMRMonitorConfig9 { } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetAvailableMonitors(&self, pinfo: &mut [VMR9MonitorInfo], pdwnumdevices: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAvailableMonitors)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo.as_ptr()), pinfo.len().try_into().unwrap(), core::mem::transmute(pdwnumdevices)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAvailableMonitors)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo.as_ptr()), pinfo.len().try_into().unwrap(), pdwnumdevices as _).ok() } } } #[repr(C)] @@ -32515,7 +32478,7 @@ windows_core::imp::interface_hierarchy!(IVMRSurfaceAllocator, windows_core::IUnk impl IVMRSurfaceAllocator { #[cfg(all(feature = "Win32_Graphics_DirectDraw", feature = "Win32_Graphics_Gdi"))] pub unsafe fn AllocateSurface(&self, dwuserid: usize, lpallocinfo: *const VMRALLOCATIONINFO, lpdwactualbuffers: *mut u32, lplpsurface: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AllocateSurface)(windows_core::Interface::as_raw(self), dwuserid, lpallocinfo, core::mem::transmute(lpdwactualbuffers), core::mem::transmute(lplpsurface)).ok() } + unsafe { (windows_core::Interface::vtable(self).AllocateSurface)(windows_core::Interface::as_raw(self), dwuserid, lpallocinfo, lpdwactualbuffers as _, core::mem::transmute(lplpsurface)).ok() } } pub unsafe fn FreeSurface(&self, dwid: usize) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).FreeSurface)(windows_core::Interface::as_raw(self), dwid).ok() } @@ -32601,7 +32564,7 @@ windows_core::imp::interface_hierarchy!(IVMRSurfaceAllocator9, windows_core::IUn impl IVMRSurfaceAllocator9 { #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn InitializeDevice(&self, dwuserid: usize, lpallocinfo: *const VMR9AllocationInfo, lpnumbuffers: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).InitializeDevice)(windows_core::Interface::as_raw(self), dwuserid, lpallocinfo, core::mem::transmute(lpnumbuffers)).ok() } + unsafe { (windows_core::Interface::vtable(self).InitializeDevice)(windows_core::Interface::as_raw(self), dwuserid, lpallocinfo, lpnumbuffers as _).ok() } } pub unsafe fn TerminateDevice(&self, dwid: usize) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).TerminateDevice)(windows_core::Interface::as_raw(self), dwid).ok() } @@ -32699,7 +32662,7 @@ windows_core::imp::interface_hierarchy!(IVMRSurfaceAllocatorEx9, windows_core::I impl IVMRSurfaceAllocatorEx9 { #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn GetSurfaceEx(&self, dwuserid: usize, surfaceindex: u32, surfaceflags: u32, lplpsurface: *mut Option, lprcdst: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSurfaceEx)(windows_core::Interface::as_raw(self), dwuserid, surfaceindex, surfaceflags, core::mem::transmute(lplpsurface), core::mem::transmute(lprcdst)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSurfaceEx)(windows_core::Interface::as_raw(self), dwuserid, surfaceindex, surfaceflags, core::mem::transmute(lplpsurface), lprcdst as _).ok() } } } #[repr(C)] @@ -32869,7 +32832,7 @@ impl IVMRSurfaceAllocatorNotify9 { } #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn AllocateSurfaceHelper(&self, lpallocinfo: *const VMR9AllocationInfo, lpnumbuffers: *mut u32, lplpsurface: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AllocateSurfaceHelper)(windows_core::Interface::as_raw(self), lpallocinfo, core::mem::transmute(lpnumbuffers), core::mem::transmute(lplpsurface)).ok() } + unsafe { (windows_core::Interface::vtable(self).AllocateSurfaceHelper)(windows_core::Interface::as_raw(self), lpallocinfo, lpnumbuffers as _, core::mem::transmute(lplpsurface)).ok() } } pub unsafe fn NotifyEvent(&self, eventcode: i32, param1: isize, param2: isize) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).NotifyEvent)(windows_core::Interface::as_raw(self), eventcode, param1, param2).ok() } @@ -33105,19 +33068,19 @@ windows_core::imp::define_interface!(IVMRWindowlessControl, IVMRWindowlessContro windows_core::imp::interface_hierarchy!(IVMRWindowlessControl, windows_core::IUnknown); impl IVMRWindowlessControl { pub unsafe fn GetNativeVideoSize(&self, lpwidth: *mut i32, lpheight: *mut i32, lparwidth: *mut i32, lparheight: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNativeVideoSize)(windows_core::Interface::as_raw(self), core::mem::transmute(lpwidth), core::mem::transmute(lpheight), core::mem::transmute(lparwidth), core::mem::transmute(lparheight)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNativeVideoSize)(windows_core::Interface::as_raw(self), lpwidth as _, lpheight as _, lparwidth as _, lparheight as _).ok() } } pub unsafe fn GetMinIdealVideoSize(&self, lpwidth: *mut i32, lpheight: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMinIdealVideoSize)(windows_core::Interface::as_raw(self), core::mem::transmute(lpwidth), core::mem::transmute(lpheight)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMinIdealVideoSize)(windows_core::Interface::as_raw(self), lpwidth as _, lpheight as _).ok() } } pub unsafe fn GetMaxIdealVideoSize(&self, lpwidth: *mut i32, lpheight: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMaxIdealVideoSize)(windows_core::Interface::as_raw(self), core::mem::transmute(lpwidth), core::mem::transmute(lpheight)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMaxIdealVideoSize)(windows_core::Interface::as_raw(self), lpwidth as _, lpheight as _).ok() } } pub unsafe fn SetVideoPosition(&self, lpsrcrect: *const super::super::Foundation::RECT, lpdstrect: *const super::super::Foundation::RECT) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetVideoPosition)(windows_core::Interface::as_raw(self), lpsrcrect, lpdstrect).ok() } } pub unsafe fn GetVideoPosition(&self, lpsrcrect: *mut super::super::Foundation::RECT, lpdstrect: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVideoPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(lpsrcrect), core::mem::transmute(lpdstrect)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVideoPosition)(windows_core::Interface::as_raw(self), lpsrcrect as _, lpdstrect as _).ok() } } pub unsafe fn GetAspectRatioMode(&self) -> windows_core::Result { unsafe { @@ -33349,19 +33312,19 @@ windows_core::imp::define_interface!(IVMRWindowlessControl9, IVMRWindowlessContr windows_core::imp::interface_hierarchy!(IVMRWindowlessControl9, windows_core::IUnknown); impl IVMRWindowlessControl9 { pub unsafe fn GetNativeVideoSize(&self, lpwidth: *mut i32, lpheight: *mut i32, lparwidth: *mut i32, lparheight: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNativeVideoSize)(windows_core::Interface::as_raw(self), core::mem::transmute(lpwidth), core::mem::transmute(lpheight), core::mem::transmute(lparwidth), core::mem::transmute(lparheight)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNativeVideoSize)(windows_core::Interface::as_raw(self), lpwidth as _, lpheight as _, lparwidth as _, lparheight as _).ok() } } pub unsafe fn GetMinIdealVideoSize(&self, lpwidth: *mut i32, lpheight: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMinIdealVideoSize)(windows_core::Interface::as_raw(self), core::mem::transmute(lpwidth), core::mem::transmute(lpheight)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMinIdealVideoSize)(windows_core::Interface::as_raw(self), lpwidth as _, lpheight as _).ok() } } pub unsafe fn GetMaxIdealVideoSize(&self, lpwidth: *mut i32, lpheight: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMaxIdealVideoSize)(windows_core::Interface::as_raw(self), core::mem::transmute(lpwidth), core::mem::transmute(lpheight)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMaxIdealVideoSize)(windows_core::Interface::as_raw(self), lpwidth as _, lpheight as _).ok() } } pub unsafe fn SetVideoPosition(&self, lpsrcrect: *const super::super::Foundation::RECT, lpdstrect: *const super::super::Foundation::RECT) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetVideoPosition)(windows_core::Interface::as_raw(self), lpsrcrect, lpdstrect).ok() } } pub unsafe fn GetVideoPosition(&self, lpsrcrect: *mut super::super::Foundation::RECT, lpdstrect: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVideoPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(lpsrcrect), core::mem::transmute(lpdstrect)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVideoPosition)(windows_core::Interface::as_raw(self), lpsrcrect as _, lpdstrect as _).ok() } } pub unsafe fn GetAspectRatioMode(&self) -> windows_core::Result { unsafe { @@ -33561,24 +33524,24 @@ 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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetConnectInfo)(windows_core::Interface::as_raw(self), pdwnumconnectinfo as _, pddvpconnectinfo.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetConnectInfo(&self, dwchosenentry: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetConnectInfo)(windows_core::Interface::as_raw(self), dwchosenentry).ok() } } pub unsafe fn GetVPDataInfo(&self, pamvpdatainfo: *mut AMVPDATAINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVPDataInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pamvpdatainfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVPDataInfo)(windows_core::Interface::as_raw(self), pamvpdatainfo as _).ok() } } pub unsafe fn GetMaxPixelRate(&self, pamvpsize: *mut AMVPSIZE, pdwmaxpixelspersecond: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMaxPixelRate)(windows_core::Interface::as_raw(self), core::mem::transmute(pamvpsize), core::mem::transmute(pdwmaxpixelspersecond)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMaxPixelRate)(windows_core::Interface::as_raw(self), pamvpsize as _, pdwmaxpixelspersecond as _).ok() } } #[cfg(feature = "Win32_Graphics_DirectDraw")] pub unsafe fn InformVPInputFormats(&self, dwnumformats: u32, pddpixelformats: *mut super::super::Graphics::DirectDraw::DDPIXELFORMAT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).InformVPInputFormats)(windows_core::Interface::as_raw(self), dwnumformats, core::mem::transmute(pddpixelformats)).ok() } + unsafe { (windows_core::Interface::vtable(self).InformVPInputFormats)(windows_core::Interface::as_raw(self), dwnumformats, pddpixelformats as _).ok() } } #[cfg(feature = "Win32_Graphics_DirectDraw")] pub unsafe fn GetVideoFormats(&self, pdwnumformats: *mut u32, pddpixelformats: Option<*mut super::super::Graphics::DirectDraw::DDPIXELFORMAT>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetVideoFormats)(windows_core::Interface::as_raw(self), pdwnumformats as _, pddpixelformats.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetVideoFormat(&self, dwchosenentry: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetVideoFormat)(windows_core::Interface::as_raw(self), dwchosenentry).ok() } @@ -33600,7 +33563,7 @@ impl IVPBaseConfig { unsafe { (windows_core::Interface::vtable(self).SetVideoPortID)(windows_core::Interface::as_raw(self), dwvideoportid).ok() } } pub unsafe fn SetDDSurfaceKernelHandles(&self, chandles: u32, rgddkernelhandles: *mut usize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetDDSurfaceKernelHandles)(windows_core::Interface::as_raw(self), chandles, core::mem::transmute(rgddkernelhandles)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetDDSurfaceKernelHandles)(windows_core::Interface::as_raw(self), chandles, rgddkernelhandles as _).ok() } } pub unsafe fn SetSurfaceParameters(&self, dwpitch: u32, dwxorigin: u32, dwyorigin: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSurfaceParameters)(windows_core::Interface::as_raw(self), dwpitch, dwxorigin, dwyorigin).ok() } @@ -33801,10 +33764,10 @@ impl core::ops::Deref for IVPConfig { windows_core::imp::interface_hierarchy!(IVPConfig, windows_core::IUnknown, IVPBaseConfig); impl IVPConfig { pub unsafe fn IsVPDecimationAllowed(&self, pbisdecimationallowed: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsVPDecimationAllowed)(windows_core::Interface::as_raw(self), core::mem::transmute(pbisdecimationallowed)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsVPDecimationAllowed)(windows_core::Interface::as_raw(self), pbisdecimationallowed as _).ok() } } pub unsafe fn SetScalingFactors(&self, pamvpsize: *mut AMVPSIZE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetScalingFactors)(windows_core::Interface::as_raw(self), core::mem::transmute(pamvpsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetScalingFactors)(windows_core::Interface::as_raw(self), pamvpsize as _).ok() } } } #[repr(C)] @@ -33912,7 +33875,7 @@ impl IVPNotify { unsafe { (windows_core::Interface::vtable(self).SetDeinterlaceMode)(windows_core::Interface::as_raw(self), mode).ok() } } pub unsafe fn GetDeinterlaceMode(&self, pmode: *mut AMVP_MODE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeinterlaceMode)(windows_core::Interface::as_raw(self), core::mem::transmute(pmode)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeinterlaceMode)(windows_core::Interface::as_raw(self), pmode as _).ok() } } } #[repr(C)] @@ -33963,7 +33926,7 @@ impl IVPNotify2 { unsafe { (windows_core::Interface::vtable(self).SetVPSyncMaster)(windows_core::Interface::as_raw(self), bvpsyncmaster.into()).ok() } } pub unsafe fn GetVPSyncMaster(&self, pbvpsyncmaster: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVPSyncMaster)(windows_core::Interface::as_raw(self), core::mem::transmute(pbvpsyncmaster)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVPSyncMaster)(windows_core::Interface::as_raw(self), pbvpsyncmaster as _).ok() } } } #[repr(C)] @@ -34140,121 +34103,121 @@ windows_core::imp::define_interface!(IVideoProcAmp, IVideoProcAmp_Vtbl, 0x405056 windows_core::imp::interface_hierarchy!(IVideoProcAmp, windows_core::IUnknown); impl IVideoProcAmp { pub unsafe fn get_BacklightCompensation(&self, pvalue: *mut i32, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_BacklightCompensation)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_BacklightCompensation)(windows_core::Interface::as_raw(self), pvalue as _, pflags as _).ok() } } pub unsafe fn put_BacklightCompensation(&self, value: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_BacklightCompensation)(windows_core::Interface::as_raw(self), value, flags).ok() } } pub unsafe fn getRange_BacklightCompensation(&self, pmin: *mut i32, pmax: *mut i32, psteppingdelta: *mut i32, pdefault: *mut i32, pcapsflag: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getRange_BacklightCompensation)(windows_core::Interface::as_raw(self), core::mem::transmute(pmin), core::mem::transmute(pmax), core::mem::transmute(psteppingdelta), core::mem::transmute(pdefault), core::mem::transmute(pcapsflag)).ok() } + unsafe { (windows_core::Interface::vtable(self).getRange_BacklightCompensation)(windows_core::Interface::as_raw(self), pmin as _, pmax as _, psteppingdelta as _, pdefault as _, pcapsflag as _).ok() } } pub unsafe fn get_Brightness(&self, pvalue: *mut i32, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_Brightness)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_Brightness)(windows_core::Interface::as_raw(self), pvalue as _, pflags as _).ok() } } pub unsafe fn put_Brightness(&self, value: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_Brightness)(windows_core::Interface::as_raw(self), value, flags).ok() } } pub unsafe fn getRange_Brightness(&self, pmin: *mut i32, pmax: *mut i32, psteppingdelta: *mut i32, pdefault: *mut i32, pcapsflag: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getRange_Brightness)(windows_core::Interface::as_raw(self), core::mem::transmute(pmin), core::mem::transmute(pmax), core::mem::transmute(psteppingdelta), core::mem::transmute(pdefault), core::mem::transmute(pcapsflag)).ok() } + unsafe { (windows_core::Interface::vtable(self).getRange_Brightness)(windows_core::Interface::as_raw(self), pmin as _, pmax as _, psteppingdelta as _, pdefault as _, pcapsflag as _).ok() } } pub unsafe fn get_ColorEnable(&self, pvalue: *mut i32, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_ColorEnable)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_ColorEnable)(windows_core::Interface::as_raw(self), pvalue as _, pflags as _).ok() } } pub unsafe fn put_ColorEnable(&self, value: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_ColorEnable)(windows_core::Interface::as_raw(self), value, flags).ok() } } pub unsafe fn getRange_ColorEnable(&self, pmin: *mut i32, pmax: *mut i32, psteppingdelta: *mut i32, pdefault: *mut i32, pcapsflag: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getRange_ColorEnable)(windows_core::Interface::as_raw(self), core::mem::transmute(pmin), core::mem::transmute(pmax), core::mem::transmute(psteppingdelta), core::mem::transmute(pdefault), core::mem::transmute(pcapsflag)).ok() } + unsafe { (windows_core::Interface::vtable(self).getRange_ColorEnable)(windows_core::Interface::as_raw(self), pmin as _, pmax as _, psteppingdelta as _, pdefault as _, pcapsflag as _).ok() } } pub unsafe fn get_Contrast(&self, pvalue: *mut i32, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_Contrast)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_Contrast)(windows_core::Interface::as_raw(self), pvalue as _, pflags as _).ok() } } pub unsafe fn put_Contrast(&self, value: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_Contrast)(windows_core::Interface::as_raw(self), value, flags).ok() } } pub unsafe fn getRange_Contrast(&self, pmin: *mut i32, pmax: *mut i32, psteppingdelta: *mut i32, pdefault: *mut i32, pcapsflag: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getRange_Contrast)(windows_core::Interface::as_raw(self), core::mem::transmute(pmin), core::mem::transmute(pmax), core::mem::transmute(psteppingdelta), core::mem::transmute(pdefault), core::mem::transmute(pcapsflag)).ok() } + unsafe { (windows_core::Interface::vtable(self).getRange_Contrast)(windows_core::Interface::as_raw(self), pmin as _, pmax as _, psteppingdelta as _, pdefault as _, pcapsflag as _).ok() } } pub unsafe fn get_Gamma(&self, pvalue: *mut i32, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_Gamma)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_Gamma)(windows_core::Interface::as_raw(self), pvalue as _, pflags as _).ok() } } pub unsafe fn put_Gamma(&self, value: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_Gamma)(windows_core::Interface::as_raw(self), value, flags).ok() } } pub unsafe fn getRange_Gamma(&self, pmin: *mut i32, pmax: *mut i32, psteppingdelta: *mut i32, pdefault: *mut i32, pcapsflag: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getRange_Gamma)(windows_core::Interface::as_raw(self), core::mem::transmute(pmin), core::mem::transmute(pmax), core::mem::transmute(psteppingdelta), core::mem::transmute(pdefault), core::mem::transmute(pcapsflag)).ok() } + unsafe { (windows_core::Interface::vtable(self).getRange_Gamma)(windows_core::Interface::as_raw(self), pmin as _, pmax as _, psteppingdelta as _, pdefault as _, pcapsflag as _).ok() } } pub unsafe fn get_Saturation(&self, pvalue: *mut i32, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_Saturation)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_Saturation)(windows_core::Interface::as_raw(self), pvalue as _, pflags as _).ok() } } pub unsafe fn put_Saturation(&self, value: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_Saturation)(windows_core::Interface::as_raw(self), value, flags).ok() } } pub unsafe fn getRange_Saturation(&self, pmin: *mut i32, pmax: *mut i32, psteppingdelta: *mut i32, pdefault: *mut i32, pcapsflag: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getRange_Saturation)(windows_core::Interface::as_raw(self), core::mem::transmute(pmin), core::mem::transmute(pmax), core::mem::transmute(psteppingdelta), core::mem::transmute(pdefault), core::mem::transmute(pcapsflag)).ok() } + unsafe { (windows_core::Interface::vtable(self).getRange_Saturation)(windows_core::Interface::as_raw(self), pmin as _, pmax as _, psteppingdelta as _, pdefault as _, pcapsflag as _).ok() } } pub unsafe fn get_Sharpness(&self, pvalue: *mut i32, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_Sharpness)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_Sharpness)(windows_core::Interface::as_raw(self), pvalue as _, pflags as _).ok() } } pub unsafe fn put_Sharpness(&self, value: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_Sharpness)(windows_core::Interface::as_raw(self), value, flags).ok() } } pub unsafe fn getRange_Sharpness(&self, pmin: *mut i32, pmax: *mut i32, psteppingdelta: *mut i32, pdefault: *mut i32, pcapsflag: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getRange_Sharpness)(windows_core::Interface::as_raw(self), core::mem::transmute(pmin), core::mem::transmute(pmax), core::mem::transmute(psteppingdelta), core::mem::transmute(pdefault), core::mem::transmute(pcapsflag)).ok() } + unsafe { (windows_core::Interface::vtable(self).getRange_Sharpness)(windows_core::Interface::as_raw(self), pmin as _, pmax as _, psteppingdelta as _, pdefault as _, pcapsflag as _).ok() } } pub unsafe fn get_WhiteBalance(&self, pvalue: *mut i32, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_WhiteBalance)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_WhiteBalance)(windows_core::Interface::as_raw(self), pvalue as _, pflags as _).ok() } } pub unsafe fn put_WhiteBalance(&self, value: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_WhiteBalance)(windows_core::Interface::as_raw(self), value, flags).ok() } } pub unsafe fn getRange_WhiteBalance(&self, pmin: *mut i32, pmax: *mut i32, psteppingdelta: *mut i32, pdefault: *mut i32, pcapsflag: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getRange_WhiteBalance)(windows_core::Interface::as_raw(self), core::mem::transmute(pmin), core::mem::transmute(pmax), core::mem::transmute(psteppingdelta), core::mem::transmute(pdefault), core::mem::transmute(pcapsflag)).ok() } + unsafe { (windows_core::Interface::vtable(self).getRange_WhiteBalance)(windows_core::Interface::as_raw(self), pmin as _, pmax as _, psteppingdelta as _, pdefault as _, pcapsflag as _).ok() } } pub unsafe fn get_Gain(&self, pvalue: *mut i32, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_Gain)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_Gain)(windows_core::Interface::as_raw(self), pvalue as _, pflags as _).ok() } } pub unsafe fn put_Gain(&self, value: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_Gain)(windows_core::Interface::as_raw(self), value, flags).ok() } } pub unsafe fn getRange_Gain(&self, pmin: *mut i32, pmax: *mut i32, psteppingdelta: *mut i32, pdefault: *mut i32, pcapsflag: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getRange_Gain)(windows_core::Interface::as_raw(self), core::mem::transmute(pmin), core::mem::transmute(pmax), core::mem::transmute(psteppingdelta), core::mem::transmute(pdefault), core::mem::transmute(pcapsflag)).ok() } + unsafe { (windows_core::Interface::vtable(self).getRange_Gain)(windows_core::Interface::as_raw(self), pmin as _, pmax as _, psteppingdelta as _, pdefault as _, pcapsflag as _).ok() } } pub unsafe fn get_Hue(&self, pvalue: *mut i32, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_Hue)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_Hue)(windows_core::Interface::as_raw(self), pvalue as _, pflags as _).ok() } } pub unsafe fn put_Hue(&self, value: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_Hue)(windows_core::Interface::as_raw(self), value, flags).ok() } } pub unsafe fn getRange_Hue(&self, pmin: *mut i32, pmax: *mut i32, psteppingdelta: *mut i32, pdefault: *mut i32, pcapsflag: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getRange_Hue)(windows_core::Interface::as_raw(self), core::mem::transmute(pmin), core::mem::transmute(pmax), core::mem::transmute(psteppingdelta), core::mem::transmute(pdefault), core::mem::transmute(pcapsflag)).ok() } + unsafe { (windows_core::Interface::vtable(self).getRange_Hue)(windows_core::Interface::as_raw(self), pmin as _, pmax as _, psteppingdelta as _, pdefault as _, pcapsflag as _).ok() } } pub unsafe fn get_DigitalMultiplier(&self, pvalue: *mut i32, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_DigitalMultiplier)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_DigitalMultiplier)(windows_core::Interface::as_raw(self), pvalue as _, pflags as _).ok() } } pub unsafe fn put_DigitalMultiplier(&self, value: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_DigitalMultiplier)(windows_core::Interface::as_raw(self), value, flags).ok() } } pub unsafe fn getRange_DigitalMultiplier(&self, pmin: *mut i32, pmax: *mut i32, psteppingdelta: *mut i32, pdefault: *mut i32, pcapsflag: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getRange_DigitalMultiplier)(windows_core::Interface::as_raw(self), core::mem::transmute(pmin), core::mem::transmute(pmax), core::mem::transmute(psteppingdelta), core::mem::transmute(pdefault), core::mem::transmute(pcapsflag)).ok() } + unsafe { (windows_core::Interface::vtable(self).getRange_DigitalMultiplier)(windows_core::Interface::as_raw(self), pmin as _, pmax as _, psteppingdelta as _, pdefault as _, pcapsflag as _).ok() } } pub unsafe fn get_PowerlineFrequency(&self, pvalue: *mut i32, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_PowerlineFrequency)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_PowerlineFrequency)(windows_core::Interface::as_raw(self), pvalue as _, pflags as _).ok() } } pub unsafe fn put_PowerlineFrequency(&self, value: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_PowerlineFrequency)(windows_core::Interface::as_raw(self), value, flags).ok() } } pub unsafe fn getRange_PowerlineFrequency(&self, pmin: *mut i32, pmax: *mut i32, psteppingdelta: *mut i32, pdefault: *mut i32, pcapsflag: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getRange_PowerlineFrequency)(windows_core::Interface::as_raw(self), core::mem::transmute(pmin), core::mem::transmute(pmax), core::mem::transmute(psteppingdelta), core::mem::transmute(pdefault), core::mem::transmute(pcapsflag)).ok() } + unsafe { (windows_core::Interface::vtable(self).getRange_PowerlineFrequency)(windows_core::Interface::as_raw(self), pmin as _, pmax as _, psteppingdelta as _, pdefault as _, pcapsflag as _).ok() } } pub unsafe fn get_WhiteBalanceComponent(&self, pvalue1: *mut i32, pvalue2: *mut i32, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_WhiteBalanceComponent)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue1), core::mem::transmute(pvalue2), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_WhiteBalanceComponent)(windows_core::Interface::as_raw(self), pvalue1 as _, pvalue2 as _, pflags as _).ok() } } pub unsafe fn put_WhiteBalanceComponent(&self, value1: i32, value2: i32, flags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_WhiteBalanceComponent)(windows_core::Interface::as_raw(self), value1, value2, flags).ok() } } pub unsafe fn getRange_WhiteBalanceComponent(&self, pmin: *mut i32, pmax: *mut i32, psteppingdelta: *mut i32, pdefault: *mut i32, pcapsflag: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getRange_WhiteBalanceComponent)(windows_core::Interface::as_raw(self), core::mem::transmute(pmin), core::mem::transmute(pmax), core::mem::transmute(psteppingdelta), core::mem::transmute(pdefault), core::mem::transmute(pcapsflag)).ok() } + unsafe { (windows_core::Interface::vtable(self).getRange_WhiteBalanceComponent)(windows_core::Interface::as_raw(self), pmin as _, pmax as _, psteppingdelta as _, pdefault as _, pcapsflag as _).ok() } } } #[repr(C)] @@ -34784,16 +34747,16 @@ impl IVideoWindow { unsafe { (windows_core::Interface::vtable(self).SetWindowPosition)(windows_core::Interface::as_raw(self), left, top, width, height).ok() } } pub unsafe fn GetWindowPosition(&self, pleft: *mut i32, ptop: *mut i32, pwidth: *mut i32, pheight: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWindowPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(pleft), core::mem::transmute(ptop), core::mem::transmute(pwidth), core::mem::transmute(pheight)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWindowPosition)(windows_core::Interface::as_raw(self), pleft as _, ptop as _, pwidth as _, pheight as _).ok() } } pub unsafe fn GetMinIdealImageSize(&self, pwidth: *mut i32, pheight: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMinIdealImageSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pwidth), core::mem::transmute(pheight)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMinIdealImageSize)(windows_core::Interface::as_raw(self), pwidth as _, pheight as _).ok() } } pub unsafe fn GetMaxIdealImageSize(&self, pwidth: *mut i32, pheight: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMaxIdealImageSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pwidth), core::mem::transmute(pheight)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMaxIdealImageSize)(windows_core::Interface::as_raw(self), pwidth as _, pheight as _).ok() } } pub unsafe fn GetRestorePosition(&self, pleft: *mut i32, ptop: *mut i32, pwidth: *mut i32, pheight: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRestorePosition)(windows_core::Interface::as_raw(self), core::mem::transmute(pleft), core::mem::transmute(ptop), core::mem::transmute(pwidth), core::mem::transmute(pheight)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRestorePosition)(windows_core::Interface::as_raw(self), pleft as _, ptop as _, pwidth as _, pheight as _).ok() } } pub unsafe fn HideCursor(&self, hidecursor: OA_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).HideCursor)(windows_core::Interface::as_raw(self), hidecursor).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 2d7bac95cf..d802b4dc61 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/DxMediaObjects/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/DxMediaObjects/mod.rs @@ -14,7 +14,7 @@ pub unsafe fn DMOGetName(clsiddmo: *const windows_core::GUID, szname: &mut [u16; #[inline] pub unsafe fn DMOGetTypes(clsiddmo: *const windows_core::GUID, ulinputtypesrequested: u32, pulinputtypessupplied: *mut u32, pinputtypes: *mut DMO_PARTIAL_MEDIATYPE, uloutputtypesrequested: u32, puloutputtypessupplied: *mut u32, poutputtypes: *mut DMO_PARTIAL_MEDIATYPE) -> windows_core::Result<()> { windows_targets::link!("msdmo.dll" "system" fn DMOGetTypes(clsiddmo : *const windows_core::GUID, ulinputtypesrequested : u32, pulinputtypessupplied : *mut u32, pinputtypes : *mut DMO_PARTIAL_MEDIATYPE, uloutputtypesrequested : u32, puloutputtypessupplied : *mut u32, poutputtypes : *mut DMO_PARTIAL_MEDIATYPE) -> windows_core::HRESULT); - unsafe { DMOGetTypes(clsiddmo, ulinputtypesrequested, core::mem::transmute(pulinputtypessupplied), core::mem::transmute(pinputtypes), uloutputtypesrequested, core::mem::transmute(puloutputtypessupplied), core::mem::transmute(poutputtypes)).ok() } + unsafe { DMOGetTypes(clsiddmo, ulinputtypesrequested, pulinputtypessupplied as _, pinputtypes as _, uloutputtypesrequested, puloutputtypessupplied as _, poutputtypes as _).ok() } } #[inline] pub unsafe fn DMORegister(szname: P0, clsiddmo: *const windows_core::GUID, guidcategory: *const windows_core::GUID, dwflags: u32, cintypes: u32, pintypes: *const DMO_PARTIAL_MEDIATYPE, couttypes: u32, pouttypes: *const DMO_PARTIAL_MEDIATYPE) -> windows_core::Result<()> @@ -37,7 +37,7 @@ pub unsafe fn MoCopyMediaType(pmtdest: *mut DMO_MEDIA_TYPE, pmtsrc: *const DMO_M #[inline] pub unsafe fn MoCreateMediaType(ppmt: *mut *mut DMO_MEDIA_TYPE, cbformat: u32) -> windows_core::Result<()> { windows_targets::link!("msdmo.dll" "system" fn MoCreateMediaType(ppmt : *mut *mut DMO_MEDIA_TYPE, cbformat : u32) -> windows_core::HRESULT); - unsafe { MoCreateMediaType(core::mem::transmute(ppmt), cbformat).ok() } + unsafe { MoCreateMediaType(ppmt as _, cbformat).ok() } } #[inline] pub unsafe fn MoDeleteMediaType(pmt: *mut DMO_MEDIA_TYPE) -> windows_core::Result<()> { @@ -47,7 +47,7 @@ pub unsafe fn MoDeleteMediaType(pmt: *mut DMO_MEDIA_TYPE) -> windows_core::Resul #[inline] pub unsafe fn MoDuplicateMediaType(ppmtdest: *mut *mut DMO_MEDIA_TYPE, pmtsrc: *const DMO_MEDIA_TYPE) -> windows_core::Result<()> { windows_targets::link!("msdmo.dll" "system" fn MoDuplicateMediaType(ppmtdest : *mut *mut DMO_MEDIA_TYPE, pmtsrc : *const DMO_MEDIA_TYPE) -> windows_core::HRESULT); - unsafe { MoDuplicateMediaType(core::mem::transmute(ppmtdest), core::mem::transmute(pmtsrc)).ok() } + unsafe { MoDuplicateMediaType(ppmtdest as _, core::mem::transmute(pmtsrc)).ok() } } #[inline] pub unsafe fn MoFreeMediaType(pmt: *mut DMO_MEDIA_TYPE) -> windows_core::Result<()> { @@ -317,7 +317,7 @@ windows_core::imp::define_interface!(IEnumDMO, IEnumDMO_Vtbl, 0x2c3cd98a_2bfa_4a windows_core::imp::interface_hierarchy!(IEnumDMO, windows_core::IUnknown); impl IEnumDMO { pub unsafe fn Next(&self, citemstofetch: u32, pclsid: *mut windows_core::GUID, names: *mut windows_core::PWSTR, pcitemsfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), citemstofetch, core::mem::transmute(pclsid), core::mem::transmute(names), core::mem::transmute(pcitemsfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), citemstofetch, pclsid as _, names as _, pcitemsfetched as _).ok() } } pub unsafe fn Skip(&self, citemstoskip: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), citemstoskip).ok() } @@ -404,7 +404,7 @@ impl IMediaBuffer { } } pub unsafe fn GetBufferAndLength(&self, ppbuffer: Option<*mut *mut u8>, pcblength: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetBufferAndLength)(windows_core::Interface::as_raw(self), ppbuffer.unwrap_or(core::mem::zeroed()) as _, pcblength.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -461,7 +461,7 @@ windows_core::imp::define_interface!(IMediaObject, IMediaObject_Vtbl, 0xd8ad0f58 windows_core::imp::interface_hierarchy!(IMediaObject, windows_core::IUnknown); impl IMediaObject { pub unsafe fn GetStreamCount(&self, pcinputstreams: *mut u32, pcoutputstreams: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStreamCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pcinputstreams), core::mem::transmute(pcoutputstreams)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStreamCount)(windows_core::Interface::as_raw(self), pcinputstreams as _, pcoutputstreams as _).ok() } } pub unsafe fn GetInputStreamInfo(&self, dwinputstreamindex: u32) -> windows_core::Result { unsafe { @@ -476,16 +476,16 @@ impl IMediaObject { } } pub unsafe fn GetInputType(&self, dwinputstreamindex: u32, dwtypeindex: u32, pmt: Option<*mut DMO_MEDIA_TYPE>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInputType)(windows_core::Interface::as_raw(self), dwinputstreamindex, dwtypeindex, core::mem::transmute(pmt.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInputType)(windows_core::Interface::as_raw(self), dwinputstreamindex, dwtypeindex, pmt.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetOutputType(&self, dwoutputstreamindex: u32, dwtypeindex: u32, pmt: Option<*mut DMO_MEDIA_TYPE>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOutputType)(windows_core::Interface::as_raw(self), dwoutputstreamindex, dwtypeindex, core::mem::transmute(pmt.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOutputType)(windows_core::Interface::as_raw(self), dwoutputstreamindex, dwtypeindex, pmt.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetInputType(&self, dwinputstreamindex: u32, pmt: Option<*const DMO_MEDIA_TYPE>, dwflags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetInputType)(windows_core::Interface::as_raw(self), dwinputstreamindex, core::mem::transmute(pmt.unwrap_or(core::mem::zeroed())), dwflags).ok() } + unsafe { (windows_core::Interface::vtable(self).SetInputType)(windows_core::Interface::as_raw(self), dwinputstreamindex, pmt.unwrap_or(core::mem::zeroed()) as _, dwflags).ok() } } pub unsafe fn SetOutputType(&self, dwoutputstreamindex: u32, pmt: Option<*const DMO_MEDIA_TYPE>, dwflags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetOutputType)(windows_core::Interface::as_raw(self), dwoutputstreamindex, core::mem::transmute(pmt.unwrap_or(core::mem::zeroed())), dwflags).ok() } + unsafe { (windows_core::Interface::vtable(self).SetOutputType)(windows_core::Interface::as_raw(self), dwoutputstreamindex, pmt.unwrap_or(core::mem::zeroed()) as _, dwflags).ok() } } pub unsafe fn GetInputCurrentType(&self, dwinputstreamindex: u32, pmt: *mut DMO_MEDIA_TYPE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetInputCurrentType)(windows_core::Interface::as_raw(self), dwinputstreamindex, core::mem::transmute(pmt)).ok() } @@ -494,10 +494,10 @@ impl IMediaObject { unsafe { (windows_core::Interface::vtable(self).GetOutputCurrentType)(windows_core::Interface::as_raw(self), dwoutputstreamindex, core::mem::transmute(pmt)).ok() } } pub unsafe fn GetInputSizeInfo(&self, dwinputstreamindex: u32, pcbsize: *mut u32, pcbmaxlookahead: *mut u32, pcbalignment: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInputSizeInfo)(windows_core::Interface::as_raw(self), dwinputstreamindex, core::mem::transmute(pcbsize), core::mem::transmute(pcbmaxlookahead), core::mem::transmute(pcbalignment)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInputSizeInfo)(windows_core::Interface::as_raw(self), dwinputstreamindex, pcbsize as _, pcbmaxlookahead as _, pcbalignment as _).ok() } } pub unsafe fn GetOutputSizeInfo(&self, dwoutputstreamindex: u32, pcbsize: *mut u32, pcbalignment: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOutputSizeInfo)(windows_core::Interface::as_raw(self), dwoutputstreamindex, core::mem::transmute(pcbsize), core::mem::transmute(pcbalignment)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOutputSizeInfo)(windows_core::Interface::as_raw(self), dwoutputstreamindex, pcbsize as _, pcbalignment as _).ok() } } pub unsafe fn GetInputMaxLatency(&self, dwinputstreamindex: u32) -> windows_core::Result { unsafe { @@ -533,7 +533,7 @@ impl IMediaObject { unsafe { (windows_core::Interface::vtable(self).ProcessInput)(windows_core::Interface::as_raw(self), dwinputstreamindex, pbuffer.param().abi(), dwflags, rttimestamp, rttimelength).ok() } } pub unsafe fn ProcessOutput(&self, dwflags: u32, poutputbuffers: &mut [DMO_OUTPUT_DATA_BUFFER], pdwstatus: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ProcessOutput)(windows_core::Interface::as_raw(self), dwflags, poutputbuffers.len().try_into().unwrap(), core::mem::transmute(poutputbuffers.as_ptr()), core::mem::transmute(pdwstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).ProcessOutput)(windows_core::Interface::as_raw(self), dwflags, poutputbuffers.len().try_into().unwrap(), core::mem::transmute(poutputbuffers.as_ptr()), pdwstatus as _).ok() } } pub unsafe fn Lock(&self, block: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), block).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 89964b3b34..88626df506 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/KernelStreaming/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/KernelStreaming/mod.rs @@ -1,7 +1,7 @@ #[inline] 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); - unsafe { KsCreateAllocator(connectionhandle, allocatorframing, core::mem::transmute(allocatorhandle)) } + unsafe { KsCreateAllocator(connectionhandle, allocatorframing, allocatorhandle as _) } } #[inline] pub unsafe fn KsCreateAllocator2(connectionhandle: super::super::Foundation::HANDLE, allocatorframing: *const KSALLOCATOR_FRAMING) -> windows_core::Result { @@ -14,7 +14,7 @@ pub unsafe fn KsCreateAllocator2(connectionhandle: super::super::Foundation::HAN #[inline] 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); - unsafe { KsCreateClock(connectionhandle, clockcreate, core::mem::transmute(clockhandle)) } + unsafe { KsCreateClock(connectionhandle, clockcreate, clockhandle as _) } } #[inline] pub unsafe fn KsCreateClock2(connectionhandle: super::super::Foundation::HANDLE, clockcreate: *const KSCLOCK_CREATE) -> windows_core::Result { @@ -27,7 +27,7 @@ pub unsafe fn KsCreateClock2(connectionhandle: super::super::Foundation::HANDLE, #[inline] 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); - unsafe { KsCreatePin(filterhandle, connect, desiredaccess, core::mem::transmute(connectionhandle)) } + unsafe { KsCreatePin(filterhandle, connect, desiredaccess, connectionhandle as _) } } #[inline] pub unsafe fn KsCreatePin2(filterhandle: super::super::Foundation::HANDLE, connect: *const KSPIN_CONNECT, desiredaccess: u32) -> windows_core::Result { @@ -40,7 +40,7 @@ pub unsafe fn KsCreatePin2(filterhandle: super::super::Foundation::HANDLE, conne #[inline] 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); - unsafe { KsCreateTopologyNode(parenthandle, nodecreate, desiredaccess, core::mem::transmute(nodehandle)) } + unsafe { KsCreateTopologyNode(parenthandle, nodecreate, desiredaccess, nodehandle as _) } } #[inline] pub unsafe fn KsCreateTopologyNode2(parenthandle: super::super::Foundation::HANDLE, nodecreate: *const KSNODE_CREATE, desiredaccess: u32) -> windows_core::Result { @@ -67,7 +67,7 @@ pub unsafe fn KsGetMediaTypeCount(filterhandle: super::super::Foundation::HANDLE #[inline] 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); - unsafe { KsGetMultiplePinFactoryItems(filterhandle, pinfactoryid, propertyid, core::mem::transmute(items)).ok() } + unsafe { KsGetMultiplePinFactoryItems(filterhandle, pinfactoryid, propertyid, items as _).ok() } } #[inline] pub unsafe fn KsOpenDefaultDevice(category: *const windows_core::GUID, access: u32) -> windows_core::Result { @@ -80,12 +80,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); - unsafe { KsResolveRequiredAttributes(datarange, core::mem::transmute(attributes.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { KsResolveRequiredAttributes(datarange, attributes.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { KsSynchronousDeviceControl(handle, iocontrol, core::mem::transmute(inbuffer.unwrap_or(core::mem::zeroed())), inlength, core::mem::transmute(outbuffer.unwrap_or(core::mem::zeroed())), outlength, core::mem::transmute(bytesreturned.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { KsSynchronousDeviceControl(handle, iocontrol, inbuffer.unwrap_or(core::mem::zeroed()) as _, inlength, outbuffer.unwrap_or(core::mem::zeroed()) as _, outlength, bytesreturned.unwrap_or(core::mem::zeroed()) as _).ok() } } pub const AEC_MODE_FULL_DUPLEX: u32 = 2u32; pub const AEC_MODE_HALF_DUPLEX: u32 = 1u32; @@ -397,7 +397,7 @@ impl IKsAllocator { unsafe { (windows_core::Interface::vtable(self).KsGetAllocatorMode)(windows_core::Interface::as_raw(self)) } } pub unsafe fn KsGetAllocatorStatus(&self, allocatorstatus: *mut KSSTREAMALLOCATOR_STATUS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).KsGetAllocatorStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(allocatorstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).KsGetAllocatorStatus)(windows_core::Interface::as_raw(self), allocatorstatus as _).ok() } } pub unsafe fn KsSetAllocatorMode(&self, mode: KSALLOCATORMODE) { unsafe { (windows_core::Interface::vtable(self).KsSetAllocatorMode)(windows_core::Interface::as_raw(self), mode) } @@ -733,13 +733,13 @@ windows_core::imp::define_interface!(IKsControl, IKsControl_Vtbl, 0x28f54685_06f windows_core::imp::interface_hierarchy!(IKsControl, windows_core::IUnknown); impl IKsControl { pub unsafe fn KsProperty(&self, property: *const KSIDENTIFIER, propertylength: u32, propertydata: *mut core::ffi::c_void, datalength: u32, bytesreturned: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).KsProperty)(windows_core::Interface::as_raw(self), property, propertylength, core::mem::transmute(propertydata), datalength, core::mem::transmute(bytesreturned)).ok() } + unsafe { (windows_core::Interface::vtable(self).KsProperty)(windows_core::Interface::as_raw(self), property, propertylength, propertydata as _, datalength, bytesreturned as _).ok() } } pub unsafe fn KsMethod(&self, method: *const KSIDENTIFIER, methodlength: u32, methoddata: *mut core::ffi::c_void, datalength: u32, bytesreturned: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).KsMethod)(windows_core::Interface::as_raw(self), method, methodlength, core::mem::transmute(methoddata), datalength, core::mem::transmute(bytesreturned)).ok() } + unsafe { (windows_core::Interface::vtable(self).KsMethod)(windows_core::Interface::as_raw(self), method, methodlength, methoddata as _, datalength, bytesreturned as _).ok() } } pub unsafe fn KsEvent(&self, event: *const KSIDENTIFIER, eventlength: u32, eventdata: *mut core::ffi::c_void, datalength: u32, bytesreturned: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).KsEvent)(windows_core::Interface::as_raw(self), event, eventlength, core::mem::transmute(eventdata), datalength, core::mem::transmute(bytesreturned)).ok() } + unsafe { (windows_core::Interface::vtable(self).KsEvent)(windows_core::Interface::as_raw(self), event, eventlength, eventdata as _, datalength, bytesreturned as _).ok() } } } #[repr(C)] @@ -831,7 +831,7 @@ impl IKsDataTypeHandler { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).KsCompleteIoOperation)(windows_core::Interface::as_raw(self), sample.param().abi(), core::mem::transmute(streamheader), iooperation, cancelled.into()).ok() } + unsafe { (windows_core::Interface::vtable(self).KsCompleteIoOperation)(windows_core::Interface::as_raw(self), sample.param().abi(), streamheader as _, iooperation, cancelled.into()).ok() } } pub unsafe fn KsIsMediaTypeInRanges(&self, dataranges: *const core::ffi::c_void) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).KsIsMediaTypeInRanges)(windows_core::Interface::as_raw(self), dataranges).ok() } @@ -841,7 +841,7 @@ impl IKsDataTypeHandler { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).KsPrepareIoOperation)(windows_core::Interface::as_raw(self), sample.param().abi(), core::mem::transmute(streamheader), iooperation).ok() } + unsafe { (windows_core::Interface::vtable(self).KsPrepareIoOperation)(windows_core::Interface::as_raw(self), sample.param().abi(), streamheader as _, iooperation).ok() } } pub unsafe fn KsQueryExtendedSize(&self) -> windows_core::Result { unsafe { @@ -938,7 +938,7 @@ windows_core::imp::define_interface!(IKsFormatSupport, IKsFormatSupport_Vtbl, 0x windows_core::imp::interface_hierarchy!(IKsFormatSupport, windows_core::IUnknown); impl IKsFormatSupport { pub unsafe fn IsFormatSupported(&self, pksformat: *mut KSDATAFORMAT, cbformat: u32, pbsupported: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsFormatSupported)(windows_core::Interface::as_raw(self), core::mem::transmute(pksformat), cbformat, core::mem::transmute(pbsupported)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsFormatSupported)(windows_core::Interface::as_raw(self), pksformat as _, cbformat, pbsupported as _).ok() } } pub unsafe fn GetDevicePreferredFormat(&self) -> windows_core::Result<*mut KSDATAFORMAT> { unsafe { @@ -1002,7 +1002,7 @@ impl IKsInterfaceHandler { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).KsProcessMediaSamples)(windows_core::Interface::as_raw(self), ksdatatypehandler.param().abi(), core::mem::transmute(samplelist), core::mem::transmute(samplecount), iooperation, core::mem::transmute(streamsegment)).ok() } + unsafe { (windows_core::Interface::vtable(self).KsProcessMediaSamples)(windows_core::Interface::as_raw(self), ksdatatypehandler.param().abi(), core::mem::transmute(samplelist), samplecount as _, iooperation, streamsegment as _).ok() } } pub unsafe fn KsCompleteIo(&self, streamsegment: *mut KSSTREAM_SEGMENT) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).KsCompleteIo)(windows_core::Interface::as_raw(self), core::mem::transmute(streamsegment)).ok() } @@ -1107,7 +1107,7 @@ impl IKsJackDescription { } } pub unsafe fn GetJackDescription(&self, njack: u32, pdescription: *mut KSJACK_DESCRIPTION) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetJackDescription)(windows_core::Interface::as_raw(self), njack, core::mem::transmute(pdescription)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetJackDescription)(windows_core::Interface::as_raw(self), njack, pdescription as _).ok() } } } #[repr(C)] @@ -1281,7 +1281,7 @@ windows_core::imp::define_interface!(IKsJackSinkInformation, IKsJackSinkInformat windows_core::imp::interface_hierarchy!(IKsJackSinkInformation, windows_core::IUnknown); impl IKsJackSinkInformation { pub unsafe fn GetJackSinkInformation(&self, pjacksinkinformation: *mut KSJACK_SINK_INFORMATION) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetJackSinkInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(pjacksinkinformation)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetJackSinkInformation)(windows_core::Interface::as_raw(self), pjacksinkinformation as _).ok() } } } #[repr(C)] @@ -1431,7 +1431,7 @@ impl IKsPin { unsafe { (windows_core::Interface::vtable(self).KsCreateSinkPinHandle)(windows_core::Interface::as_raw(self), interface, medium).ok() } } pub unsafe fn KsGetCurrentCommunication(&self, communication: Option<*mut KSPIN_COMMUNICATION>, interface: Option<*mut KSIDENTIFIER>, medium: Option<*mut KSIDENTIFIER>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).KsGetCurrentCommunication)(windows_core::Interface::as_raw(self), communication.unwrap_or(core::mem::zeroed()) as _, interface.unwrap_or(core::mem::zeroed()) as _, medium.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn KsPropagateAcquire(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).KsPropagateAcquire)(windows_core::Interface::as_raw(self)).ok() } @@ -1717,7 +1717,7 @@ windows_core::imp::define_interface!(IKsPinPipe, IKsPinPipe_Vtbl, 0xe539cd90_a8b windows_core::imp::interface_hierarchy!(IKsPinPipe, windows_core::IUnknown); impl IKsPinPipe { pub unsafe fn KsGetPinFramingCache(&self, framingex: *mut *mut KSALLOCATOR_FRAMING_EX, framingprop: *mut FRAMING_PROP, option: FRAMING_CACHE_OPS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).KsGetPinFramingCache)(windows_core::Interface::as_raw(self), core::mem::transmute(framingex), core::mem::transmute(framingprop), option).ok() } + unsafe { (windows_core::Interface::vtable(self).KsGetPinFramingCache)(windows_core::Interface::as_raw(self), framingex as _, framingprop as _, option).ok() } } pub unsafe fn KsSetPinFramingCache(&self, framingex: *const KSALLOCATOR_FRAMING_EX, framingprop: *const FRAMING_PROP, option: FRAMING_CACHE_OPS) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).KsSetPinFramingCache)(windows_core::Interface::as_raw(self), framingex, framingprop, option).ok() } @@ -1887,7 +1887,7 @@ impl IKsPropertySet { unsafe { (windows_core::Interface::vtable(self).Set)(windows_core::Interface::as_raw(self), guidpropset, dwpropid, pinstancedata, cbinstancedata, ppropdata, cbpropdata).ok() } } pub unsafe fn Get(&self, guidpropset: *const windows_core::GUID, dwpropid: u32, pinstancedata: *const core::ffi::c_void, cbinstancedata: u32, ppropdata: *mut core::ffi::c_void, cbpropdata: u32, pcbreturned: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Get)(windows_core::Interface::as_raw(self), guidpropset, dwpropid, pinstancedata, cbinstancedata, core::mem::transmute(ppropdata), cbpropdata, core::mem::transmute(pcbreturned)).ok() } + unsafe { (windows_core::Interface::vtable(self).Get)(windows_core::Interface::as_raw(self), guidpropset, dwpropid, pinstancedata, cbinstancedata, ppropdata as _, cbpropdata, pcbreturned as _).ok() } } pub unsafe fn QuerySupported(&self, guidpropset: *const windows_core::GUID, dwpropid: u32) -> windows_core::Result { unsafe { @@ -1992,7 +1992,7 @@ impl IKsTopology { where P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateNodeInstance)(windows_core::Interface::as_raw(self), nodeid, flags, desiredaccess, unkouter.param().abi(), interfaceid, core::mem::transmute(interface)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateNodeInstance)(windows_core::Interface::as_raw(self), nodeid, flags, desiredaccess, unkouter.param().abi(), interfaceid, interface as _).ok() } } } #[repr(C)] @@ -2046,7 +2046,7 @@ impl IKsTopologyInfo { } } pub unsafe fn get_NodeName(&self, dwnodeid: u32, pwchnodename: Option, dwbufsize: u32, pdwnamelen: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_NodeName)(windows_core::Interface::as_raw(self), dwnodeid, core::mem::transmute(pwchnodename.unwrap_or(core::mem::zeroed())), dwbufsize, core::mem::transmute(pdwnamelen)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_NodeName)(windows_core::Interface::as_raw(self), dwnodeid, pwchnodename.unwrap_or(core::mem::zeroed()) as _, dwbufsize, pdwnamelen as _).ok() } } pub unsafe fn NumNodes(&self) -> windows_core::Result { unsafe { @@ -2061,7 +2061,7 @@ impl IKsTopologyInfo { } } pub unsafe fn CreateNodeInstance(&self, dwnodeid: u32, iid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateNodeInstance)(windows_core::Interface::as_raw(self), dwnodeid, iid, core::mem::transmute(ppvobject)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateNodeInstance)(windows_core::Interface::as_raw(self), dwnodeid, iid, ppvobject as _).ok() } } } #[repr(C)] 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 0df7f82926..c7089a959e 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/MediaFoundation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/MediaFoundation/mod.rs @@ -19,7 +19,7 @@ pub unsafe fn CreatePropertyStore() -> windows_core::Result) -> windows_core::Result<()> { windows_targets::link!("dxva2.dll" "system" fn DXVA2CreateDirect3DDeviceManager9(presettoken : *mut u32, ppdevicemanager : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { DXVA2CreateDirect3DDeviceManager9(core::mem::transmute(presettoken), core::mem::transmute(ppdevicemanager)).ok() } + unsafe { DXVA2CreateDirect3DDeviceManager9(presettoken as _, core::mem::transmute(ppdevicemanager)).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D9")] #[inline] @@ -28,7 +28,7 @@ where P0: windows_core::Param, { windows_targets::link!("dxva2.dll" "system" fn DXVA2CreateVideoService(pdd : * mut core::ffi::c_void, riid : *const windows_core::GUID, ppservice : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { DXVA2CreateVideoService(pdd.param().abi(), riid, core::mem::transmute(ppservice)).ok() } + unsafe { DXVA2CreateVideoService(pdd.param().abi(), riid, ppservice as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D9")] #[inline] @@ -39,7 +39,7 @@ where 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); unsafe { let mut result__ = core::mem::zeroed(); - DXVAHD_CreateDevice(pd3ddevice.param().abi(), pcontentdesc, usage, core::mem::transmute(pplugin.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + DXVAHD_CreateDevice(pd3ddevice.param().abi(), pcontentdesc, usage, pplugin.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[inline] @@ -48,7 +48,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); - unsafe { MFAddPeriodicCallback(callback, pcontext.param().abi(), core::mem::transmute(pdwkey.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { MFAddPeriodicCallback(callback, pcontext.param().abi(), pdwkey.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn MFAllocateSerialWorkQueue(dwworkqueue: u32) -> windows_core::Result { @@ -77,7 +77,7 @@ pub unsafe fn MFAllocateWorkQueueEx(workqueuetype: MFASYNC_WORKQUEUE_TYPE) -> wi #[inline] pub unsafe fn MFAverageTimePerFrameToFrameRate(unaveragetimeperframe: u64, punnumerator: *mut u32, pundenominator: *mut u32) -> windows_core::Result<()> { windows_targets::link!("mfplat.dll" "system" fn MFAverageTimePerFrameToFrameRate(unaveragetimeperframe : u64, punnumerator : *mut u32, pundenominator : *mut u32) -> windows_core::HRESULT); - unsafe { MFAverageTimePerFrameToFrameRate(unaveragetimeperframe, core::mem::transmute(punnumerator), core::mem::transmute(pundenominator)).ok() } + unsafe { MFAverageTimePerFrameToFrameRate(unaveragetimeperframe, punnumerator as _, pundenominator as _).ok() } } #[inline] pub unsafe fn MFBeginCreateFile(accessmode: MF_FILE_ACCESSMODE, openmode: MF_FILE_OPENMODE, fflags: MF_FILE_FLAGS, pwszfilepath: P3, pcallback: P4, pstate: P5) -> windows_core::Result @@ -125,7 +125,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); - unsafe { MFCalculateBitmapImageSize(pbmih, cbbufsize, core::mem::transmute(pcbimagesize), core::mem::transmute(pbknown.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { MFCalculateBitmapImageSize(pbmih, cbbufsize, pcbimagesize as _, pbknown.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn MFCalculateImageSize(guidsubtype: *const windows_core::GUID, unwidth: u32, unheight: u32) -> windows_core::Result { @@ -172,27 +172,27 @@ where #[inline] pub unsafe fn MFConvertColorInfoFromDXVA(ptoformat: *mut MFVIDEOFORMAT, dwfromdxva: u32) -> windows_core::Result<()> { windows_targets::link!("mfplat.dll" "system" fn MFConvertColorInfoFromDXVA(ptoformat : *mut MFVIDEOFORMAT, dwfromdxva : u32) -> windows_core::HRESULT); - unsafe { MFConvertColorInfoFromDXVA(core::mem::transmute(ptoformat), dwfromdxva).ok() } + unsafe { MFConvertColorInfoFromDXVA(ptoformat as _, dwfromdxva).ok() } } #[inline] pub unsafe fn MFConvertColorInfoToDXVA(pdwtodxva: *mut u32, pfromformat: *const MFVIDEOFORMAT) -> windows_core::Result<()> { windows_targets::link!("mfplat.dll" "system" fn MFConvertColorInfoToDXVA(pdwtodxva : *mut u32, pfromformat : *const MFVIDEOFORMAT) -> windows_core::HRESULT); - unsafe { MFConvertColorInfoToDXVA(core::mem::transmute(pdwtodxva), pfromformat).ok() } + unsafe { MFConvertColorInfoToDXVA(pdwtodxva as _, pfromformat).ok() } } #[inline] pub unsafe fn MFConvertFromFP16Array(pdest: *mut f32, psrc: *const u16, dwcount: u32) -> windows_core::Result<()> { windows_targets::link!("mfplat.dll" "system" fn MFConvertFromFP16Array(pdest : *mut f32, psrc : *const u16, dwcount : u32) -> windows_core::HRESULT); - unsafe { MFConvertFromFP16Array(core::mem::transmute(pdest), psrc, dwcount).ok() } + unsafe { MFConvertFromFP16Array(pdest as _, psrc, dwcount).ok() } } #[inline] pub unsafe fn MFConvertToFP16Array(pdest: *mut u16, psrc: *const f32, dwcount: u32) -> windows_core::Result<()> { windows_targets::link!("mfplat.dll" "system" fn MFConvertToFP16Array(pdest : *mut u16, psrc : *const f32, dwcount : u32) -> windows_core::HRESULT); - unsafe { MFConvertToFP16Array(core::mem::transmute(pdest), psrc, dwcount).ok() } + unsafe { MFConvertToFP16Array(pdest as _, psrc, dwcount).ok() } } #[inline] pub unsafe fn MFCopyImage(pdest: *mut u8, ldeststride: i32, psrc: *const u8, lsrcstride: i32, dwwidthinbytes: u32, dwlines: u32) -> windows_core::Result<()> { windows_targets::link!("mfplat.dll" "system" fn MFCopyImage(pdest : *mut u8, ldeststride : i32, psrc : *const u8, lsrcstride : i32, dwwidthinbytes : u32, dwlines : u32) -> windows_core::HRESULT); - unsafe { MFCopyImage(core::mem::transmute(pdest), ldeststride, psrc, lsrcstride, dwwidthinbytes, dwlines).ok() } + unsafe { MFCopyImage(pdest as _, ldeststride, psrc, lsrcstride, dwwidthinbytes, dwlines).ok() } } #[inline] pub unsafe fn MFCreate2DMediaBuffer(dwwidth: u32, dwheight: u32, dwfourcc: u32, fbottomup: bool) -> windows_core::Result { @@ -245,7 +245,7 @@ where P0: windows_core::Param, { windows_targets::link!("mfplat.dll" "system" fn MFCreateAMMediaTypeFromMFMediaType(pmftype : * mut core::ffi::c_void, guidformatblocktype : windows_core::GUID, ppamtype : *mut *mut AM_MEDIA_TYPE) -> windows_core::HRESULT); - unsafe { MFCreateAMMediaTypeFromMFMediaType(pmftype.param().abi(), core::mem::transmute(guidformatblocktype), core::mem::transmute(ppamtype)).ok() } + unsafe { MFCreateAMMediaTypeFromMFMediaType(pmftype.param().abi(), core::mem::transmute(guidformatblocktype), ppamtype as _).ok() } } #[inline] pub unsafe fn MFCreateASFContentInfo() -> windows_core::Result { @@ -511,12 +511,12 @@ where P0: windows_core::Param, { windows_targets::link!("mfplat.dll" "system" fn MFCreateD3D12SynchronizationObject(pdevice : * mut core::ffi::c_void, riid : *const windows_core::GUID, ppvsyncobject : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { MFCreateD3D12SynchronizationObject(pdevice.param().abi(), riid, core::mem::transmute(ppvsyncobject)).ok() } + unsafe { MFCreateD3D12SynchronizationObject(pdevice.param().abi(), riid, ppvsyncobject as _).ok() } } #[inline] pub unsafe fn MFCreateDXGIDeviceManager(resettoken: *mut u32, ppdevicemanager: *mut Option) -> windows_core::Result<()> { windows_targets::link!("mfplat.dll" "system" fn MFCreateDXGIDeviceManager(resettoken : *mut u32, ppdevicemanager : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { MFCreateDXGIDeviceManager(core::mem::transmute(resettoken), core::mem::transmute(ppdevicemanager)).ok() } + unsafe { MFCreateDXGIDeviceManager(resettoken as _, core::mem::transmute(ppdevicemanager)).ok() } } #[inline] pub unsafe fn MFCreateDXGISurfaceBuffer(riid: *const windows_core::GUID, punksurface: P1, usubresourceindex: u32, fbottomupwhenlinear: bool) -> windows_core::Result @@ -677,7 +677,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); - unsafe { MFCreateMFVideoFormatFromMFMediaType(pmftype.param().abi(), core::mem::transmute(ppmfvf), core::mem::transmute(pcbsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { MFCreateMFVideoFormatFromMFMediaType(pmftype.param().abi(), ppmfvf as _, pcbsize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn MFCreateMP3MediaSink(ptargetbytestream: P0) -> windows_core::Result @@ -731,7 +731,7 @@ pub unsafe fn MFCreateMediaEvent(met: u32, guidextendedtype: *const windows_core 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); unsafe { let mut result__ = core::mem::zeroed(); - MFCreateMediaEvent(met, guidextendedtype, hrstatus, core::mem::transmute(pvvalue.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + MFCreateMediaEvent(met, guidextendedtype, hrstatus, pvvalue.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[inline] @@ -741,7 +741,7 @@ where P1: windows_core::Param, { windows_targets::link!("mfplat.dll" "system" fn MFCreateMediaExtensionActivate(szactivatableclassid : windows_core::PCWSTR, pconfiguration : * mut core::ffi::c_void, riid : *const windows_core::GUID, ppvobject : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { MFCreateMediaExtensionActivate(szactivatableclassid.param().abi(), pconfiguration.param().abi(), riid, core::mem::transmute(ppvobject)).ok() } + unsafe { MFCreateMediaExtensionActivate(szactivatableclassid.param().abi(), pconfiguration.param().abi(), riid, ppvobject as _).ok() } } #[inline] pub unsafe fn MFCreateMediaSession(pconfiguration: P0) -> windows_core::Result @@ -837,7 +837,7 @@ where #[inline] pub unsafe fn MFCreateNetSchemePlugin(riid: *const windows_core::GUID, ppvhandler: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("mf.dll" "system" fn MFCreateNetSchemePlugin(riid : *const windows_core::GUID, ppvhandler : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { MFCreateNetSchemePlugin(riid, core::mem::transmute(ppvhandler)).ok() } + unsafe { MFCreateNetSchemePlugin(riid, ppvhandler as _).ok() } } #[inline] pub unsafe fn MFCreatePMPMediaSession(dwcreationflags: u32, pconfiguration: P1, ppmediasession: *mut Option, ppenableractivate: Option<*mut Option>) -> windows_core::Result<()> @@ -845,7 +845,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); - unsafe { MFCreatePMPMediaSession(dwcreationflags, pconfiguration.param().abi(), core::mem::transmute(ppmediasession), core::mem::transmute(ppenableractivate.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { MFCreatePMPMediaSession(dwcreationflags, pconfiguration.param().abi(), core::mem::transmute(ppmediasession), ppenableractivate.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn MFCreatePMPServer(dwcreationflags: u32) -> windows_core::Result { @@ -888,7 +888,7 @@ where P0: windows_core::Param, { windows_targets::link!("mfplat.dll" "system" fn MFCreatePropertiesFromMediaType(pmediatype : * mut core::ffi::c_void, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { MFCreatePropertiesFromMediaType(pmediatype.param().abi(), riid, core::mem::transmute(ppv)).ok() } + unsafe { MFCreatePropertiesFromMediaType(pmediatype.param().abi(), riid, ppv as _).ok() } } #[inline] pub unsafe fn MFCreateProtectedEnvironmentAccess() -> windows_core::Result { @@ -1143,7 +1143,7 @@ where P0: windows_core::Param, { windows_targets::link!("mfplat.dll" "system" fn MFCreateStreamOnMFByteStreamEx(pbytestream : * mut core::ffi::c_void, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { MFCreateStreamOnMFByteStreamEx(pbytestream.param().abi(), riid, core::mem::transmute(ppv)).ok() } + unsafe { MFCreateStreamOnMFByteStreamEx(pbytestream.param().abi(), riid, ppv as _).ok() } } #[inline] pub unsafe fn MFCreateSystemTimeSource() -> windows_core::Result { @@ -1283,7 +1283,7 @@ where P0: windows_core::Param, { windows_targets::link!("evr.dll" "system" fn MFCreateVideoMixer(powner : * mut core::ffi::c_void, riiddevice : *const windows_core::GUID, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { MFCreateVideoMixer(powner.param().abi(), riiddevice, riid, core::mem::transmute(ppv)).ok() } + unsafe { MFCreateVideoMixer(powner.param().abi(), riiddevice, riid, ppv as _).ok() } } #[inline] pub unsafe fn MFCreateVideoMixerAndPresenter(pmixerowner: P0, ppresenterowner: P1, riidmixer: *const windows_core::GUID, ppvvideomixer: *mut *mut core::ffi::c_void, riidpresenter: *const windows_core::GUID, ppvvideopresenter: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -1292,7 +1292,7 @@ where P1: windows_core::Param, { windows_targets::link!("evr.dll" "system" fn MFCreateVideoMixerAndPresenter(pmixerowner : * mut core::ffi::c_void, ppresenterowner : * mut core::ffi::c_void, riidmixer : *const windows_core::GUID, ppvvideomixer : *mut *mut core::ffi::c_void, riidpresenter : *const windows_core::GUID, ppvvideopresenter : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { MFCreateVideoMixerAndPresenter(pmixerowner.param().abi(), ppresenterowner.param().abi(), riidmixer, core::mem::transmute(ppvvideomixer), riidpresenter, core::mem::transmute(ppvvideopresenter)).ok() } + unsafe { MFCreateVideoMixerAndPresenter(pmixerowner.param().abi(), ppresenterowner.param().abi(), riidmixer, ppvvideomixer as _, riidpresenter, ppvvideopresenter as _).ok() } } #[inline] pub unsafe fn MFCreateVideoPresenter(powner: P0, riiddevice: *const windows_core::GUID, riid: *const windows_core::GUID, ppvideopresenter: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -1300,12 +1300,12 @@ where P0: windows_core::Param, { windows_targets::link!("evr.dll" "system" fn MFCreateVideoPresenter(powner : * mut core::ffi::c_void, riiddevice : *const windows_core::GUID, riid : *const windows_core::GUID, ppvideopresenter : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { MFCreateVideoPresenter(powner.param().abi(), riiddevice, riid, core::mem::transmute(ppvideopresenter)).ok() } + unsafe { MFCreateVideoPresenter(powner.param().abi(), riiddevice, riid, ppvideopresenter as _).ok() } } #[inline] pub unsafe fn MFCreateVideoRenderer(riidrenderer: *const windows_core::GUID, ppvideorenderer: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("mf.dll" "system" fn MFCreateVideoRenderer(riidrenderer : *const windows_core::GUID, ppvideorenderer : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { MFCreateVideoRenderer(riidrenderer, core::mem::transmute(ppvideorenderer)).ok() } + unsafe { MFCreateVideoRenderer(riidrenderer, ppvideorenderer as _).ok() } } #[inline] pub unsafe fn MFCreateVideoRendererActivate(hwndvideo: super::super::Foundation::HWND) -> windows_core::Result { @@ -1318,12 +1318,12 @@ pub unsafe fn MFCreateVideoRendererActivate(hwndvideo: super::super::Foundation: #[inline] pub unsafe fn MFCreateVideoSampleAllocator(riid: *const windows_core::GUID, ppsampleallocator: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("evr.dll" "system" fn MFCreateVideoSampleAllocator(riid : *const windows_core::GUID, ppsampleallocator : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { MFCreateVideoSampleAllocator(riid, core::mem::transmute(ppsampleallocator)).ok() } + unsafe { MFCreateVideoSampleAllocator(riid, ppsampleallocator as _).ok() } } #[inline] pub unsafe fn MFCreateVideoSampleAllocatorEx(riid: *const windows_core::GUID, ppsampleallocator: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("mfplat.dll" "system" fn MFCreateVideoSampleAllocatorEx(riid : *const windows_core::GUID, ppsampleallocator : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { MFCreateVideoSampleAllocatorEx(riid, core::mem::transmute(ppsampleallocator)).ok() } + unsafe { MFCreateVideoSampleAllocatorEx(riid, ppsampleallocator as _).ok() } } #[inline] pub unsafe fn MFCreateVideoSampleFromSurface(punksurface: P0) -> windows_core::Result @@ -1404,7 +1404,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); - unsafe { MFCreateWaveFormatExFromMFMediaType(pmftype.param().abi(), core::mem::transmute(ppwf), core::mem::transmute(pcbsize.unwrap_or(core::mem::zeroed())), flags).ok() } + unsafe { MFCreateWaveFormatExFromMFMediaType(pmftype.param().abi(), ppwf as _, pcbsize.unwrap_or(core::mem::zeroed()) as _, flags).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -1460,7 +1460,7 @@ where P0: windows_core::Param, { windows_targets::link!("mf.dll" "system" fn MFEnumDeviceSources(pattributes : * mut core::ffi::c_void, pppsourceactivate : *mut *mut * mut core::ffi::c_void, pcsourceactivate : *mut u32) -> windows_core::HRESULT); - unsafe { MFEnumDeviceSources(pattributes.param().abi(), core::mem::transmute(pppsourceactivate), core::mem::transmute(pcsourceactivate)).ok() } + unsafe { MFEnumDeviceSources(pattributes.param().abi(), pppsourceactivate as _, pcsourceactivate as _).ok() } } #[inline] pub unsafe fn MFFrameRateToAverageTimePerFrame(unnumerator: u32, undenominator: u32) -> windows_core::Result { @@ -1538,7 +1538,7 @@ where P0: windows_core::Param, { windows_targets::link!("mf.dll" "system" fn MFGetService(punkobject : * mut core::ffi::c_void, guidservice : *const windows_core::GUID, riid : *const windows_core::GUID, ppvobject : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { MFGetService(punkobject.param().abi(), guidservice, riid, core::mem::transmute(ppvobject)).ok() } + unsafe { MFGetService(punkobject.param().abi(), guidservice, riid, ppvobject as _).ok() } } #[inline] pub unsafe fn MFGetStrideForBitmapInfoHeader(format: u32, dwwidth: u32) -> windows_core::Result { @@ -1606,7 +1606,7 @@ pub unsafe fn MFGetUncompressedVideoFormat(pvideoformat: *const MFVIDEOFORMAT) - #[inline] 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); - unsafe { MFGetWorkQueueMMCSSClass(dwworkqueueid, core::mem::transmute(pwszclass.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchclass)).ok() } + unsafe { MFGetWorkQueueMMCSSClass(dwworkqueueid, pwszclass.unwrap_or(core::mem::zeroed()) as _, pcchclass as _).ok() } } #[inline] pub unsafe fn MFGetWorkQueueMMCSSPriority(dwworkqueueid: u32) -> windows_core::Result { @@ -1635,7 +1635,7 @@ where #[inline] pub unsafe fn MFHeapFree(pv: *mut core::ffi::c_void) { windows_targets::link!("mfplat.dll" "system" fn MFHeapFree(pv : *mut core::ffi::c_void)); - unsafe { MFHeapFree(core::mem::transmute(pv)) } + unsafe { MFHeapFree(pv as _) } } #[inline] pub unsafe fn MFInitAMMediaTypeFromMFMediaType(pmftype: P0, guidformatblocktype: windows_core::GUID, pamtype: *mut AM_MEDIA_TYPE) -> windows_core::Result<()> @@ -1676,7 +1676,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); - unsafe { MFInitMediaTypeFromMPEG1VideoInfo(pmftype.param().abi(), pmp1vi, cbbufsize, core::mem::transmute(psubtype.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { MFInitMediaTypeFromMPEG1VideoInfo(pmftype.param().abi(), pmp1vi, cbbufsize, psubtype.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1685,7 +1685,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); - unsafe { MFInitMediaTypeFromMPEG2VideoInfo(pmftype.param().abi(), pmp2vi, cbbufsize, core::mem::transmute(psubtype.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { MFInitMediaTypeFromMPEG2VideoInfo(pmftype.param().abi(), pmp2vi, cbbufsize, psubtype.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1694,7 +1694,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); - unsafe { MFInitMediaTypeFromVideoInfoHeader(pmftype.param().abi(), pvih, cbbufsize, core::mem::transmute(psubtype.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { MFInitMediaTypeFromVideoInfoHeader(pmftype.param().abi(), pvih, cbbufsize, psubtype.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1703,7 +1703,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); - unsafe { MFInitMediaTypeFromVideoInfoHeader2(pmftype.param().abi(), pvih2, cbbufsize, core::mem::transmute(psubtype.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { MFInitMediaTypeFromVideoInfoHeader2(pmftype.param().abi(), pvih2, cbbufsize, psubtype.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Media_Audio")] #[inline] @@ -1767,7 +1767,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); - unsafe { MFLockDXGIDeviceManager(core::mem::transmute(presettoken.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppmanager)).ok() } + unsafe { MFLockDXGIDeviceManager(presettoken.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(ppmanager)).ok() } } #[inline] pub unsafe fn MFLockPlatform() -> windows_core::Result<()> { @@ -1780,7 +1780,7 @@ where P0: windows_core::Param, { windows_targets::link!("mfplat.dll" "system" fn MFLockSharedWorkQueue(wszclass : windows_core::PCWSTR, basepriority : i32, pdwtaskid : *mut u32, pid : *mut u32) -> windows_core::HRESULT); - unsafe { MFLockSharedWorkQueue(wszclass.param().abi(), basepriority, core::mem::transmute(pdwtaskid), core::mem::transmute(pid)).ok() } + unsafe { MFLockSharedWorkQueue(wszclass.param().abi(), basepriority, pdwtaskid as _, pid as _).ok() } } #[inline] pub unsafe fn MFLockWorkQueue(dwworkqueue: u32) -> windows_core::Result<()> { @@ -1806,7 +1806,7 @@ where P3: windows_core::Param, { windows_targets::link!("mfplay.dll" "system" fn MFPCreateMediaPlayer(pwszurl : windows_core::PCWSTR, fstartplayback : super::super::Foundation:: BOOL, creationoptions : MFP_CREATION_OPTIONS, pcallback : * mut core::ffi::c_void, hwnd : super::super::Foundation:: HWND, ppmediaplayer : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { MFPCreateMediaPlayer(pwszurl.param().abi(), fstartplayback.into(), creationoptions, pcallback.param().abi(), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppmediaplayer.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { MFPCreateMediaPlayer(pwszurl.param().abi(), fstartplayback.into(), creationoptions, pcallback.param().abi(), hwnd.unwrap_or(core::mem::zeroed()) as _, ppmediaplayer.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn MFPutWaitingWorkItem(hevent: super::super::Foundation::HANDLE, priority: i32, presult: P2, pkey: Option<*mut u64>) -> windows_core::Result<()> @@ -1814,7 +1814,7 @@ where 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); - unsafe { MFPutWaitingWorkItem(hevent, priority, presult.param().abi(), core::mem::transmute(pkey.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { MFPutWaitingWorkItem(hevent, priority, presult.param().abi(), pkey.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn MFPutWorkItem(dwqueue: u32, pcallback: P1, pstate: P2) -> windows_core::Result<()> @@ -1875,7 +1875,7 @@ where P0: windows_core::Param, { windows_targets::link!("mfplat.dll" "system" fn MFRegisterPlatformWithMMCSS(wszclass : windows_core::PCWSTR, pdwtaskid : *mut u32, lpriority : i32) -> windows_core::HRESULT); - unsafe { MFRegisterPlatformWithMMCSS(wszclass.param().abi(), core::mem::transmute(pdwtaskid), lpriority).ok() } + unsafe { MFRegisterPlatformWithMMCSS(wszclass.param().abi(), pdwtaskid as _, lpriority).ok() } } #[inline] pub unsafe fn MFRemovePeriodicCallback(dwkey: u32) -> windows_core::Result<()> { @@ -1897,7 +1897,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); - unsafe { MFScheduleWorkItem(pcallback.param().abi(), pstate.param().abi(), timeout, core::mem::transmute(pkey.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { MFScheduleWorkItem(pcallback.param().abi(), pstate.param().abi(), timeout, pkey.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn MFScheduleWorkItemEx(presult: P0, timeout: i64, pkey: Option<*mut u64>) -> windows_core::Result<()> @@ -1905,7 +1905,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); - unsafe { MFScheduleWorkItemEx(presult.param().abi(), timeout, core::mem::transmute(pkey.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { MFScheduleWorkItemEx(presult.param().abi(), timeout, pkey.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -1923,7 +1923,7 @@ where P0: windows_core::Param, { windows_targets::link!("mfplat.dll" "system" fn MFSerializePresentationDescriptor(ppd : * mut core::ffi::c_void, pcbdata : *mut u32, ppbdata : *mut *mut u8) -> windows_core::HRESULT); - unsafe { MFSerializePresentationDescriptor(ppd.param().abi(), core::mem::transmute(pcbdata), core::mem::transmute(ppbdata)).ok() } + unsafe { MFSerializePresentationDescriptor(ppd.param().abi(), pcbdata as _, ppbdata as _).ok() } } #[inline] pub unsafe fn MFShutdown() -> windows_core::Result<()> { @@ -1944,7 +1944,7 @@ where P0: windows_core::Param, { windows_targets::link!("mfplat.dll" "system" fn MFSplitSample(psample : * mut core::ffi::c_void, poutputsamples : *mut * mut core::ffi::c_void, dwoutputsamplemaxcount : u32, pdwoutputsamplecount : *mut u32) -> windows_core::HRESULT); - unsafe { MFSplitSample(psample.param().abi(), core::mem::transmute(poutputsamples.as_ptr()), poutputsamples.len().try_into().unwrap(), core::mem::transmute(pdwoutputsamplecount)).ok() } + unsafe { MFSplitSample(psample.param().abi(), core::mem::transmute(poutputsamples.as_ptr()), poutputsamples.len().try_into().unwrap(), pdwoutputsamplecount as _).ok() } } #[inline] pub unsafe fn MFStartup(version: u32, dwflags: u32) -> windows_core::Result<()> { @@ -1957,7 +1957,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); - unsafe { MFTEnum(core::mem::transmute(guidcategory), 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() } + unsafe { MFTEnum(core::mem::transmute(guidcategory), flags, pinputtype.unwrap_or(core::mem::zeroed()) as _, poutputtype.unwrap_or(core::mem::zeroed()) as _, pattributes.param().abi(), ppclsidmft as _, pcmfts as _).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<()> @@ -1965,17 +1965,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); - unsafe { 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() } + unsafe { MFTEnum2(core::mem::transmute(guidcategory), flags.0 as _, pinputtype.unwrap_or(core::mem::zeroed()) as _, poutputtype.unwrap_or(core::mem::zeroed()) as _, pattributes.param().abi(), pppmftactivate as _, pnummftactivate as _).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); - unsafe { 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() } + unsafe { MFTEnumEx(core::mem::transmute(guidcategory), flags.0 as _, pinputtype.unwrap_or(core::mem::zeroed()) as _, poutputtype.unwrap_or(core::mem::zeroed()) as _, pppmftactivate as _, pnummftactivate as _).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); - unsafe { 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() } + unsafe { MFTGetInfo(core::mem::transmute(clsidmft), pszname.unwrap_or(core::mem::zeroed()) as _, ppinputtypes.unwrap_or(core::mem::zeroed()) as _, pcinputtypes.unwrap_or(core::mem::zeroed()) as _, ppoutputtypes.unwrap_or(core::mem::zeroed()) as _, pcoutputtypes.unwrap_or(core::mem::zeroed()) as _, ppattributes.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -2098,7 +2098,7 @@ pub unsafe fn OPMGetVideoOutputForTarget(padapterluid: *const super::super::Foun #[inline] 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); - unsafe { OPMGetVideoOutputsFromHMONITOR(hmonitor, vos, core::mem::transmute(pulnumvideooutputs), core::mem::transmute(pppopmvideooutputarray)).ok() } + unsafe { OPMGetVideoOutputsFromHMONITOR(hmonitor, vos, pulnumvideooutputs as _, pppopmvideooutputarray as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D9")] #[inline] @@ -2107,7 +2107,7 @@ where P0: windows_core::Param, { windows_targets::link!("dxva2.dll" "system" fn OPMGetVideoOutputsFromIDirect3DDevice9Object(pdirect3ddevice9 : * mut core::ffi::c_void, vos : OPM_VIDEO_OUTPUT_SEMANTICS, pulnumvideooutputs : *mut u32, pppopmvideooutputarray : *mut *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { OPMGetVideoOutputsFromIDirect3DDevice9Object(pdirect3ddevice9.param().abi(), vos, core::mem::transmute(pulnumvideooutputs), core::mem::transmute(pppopmvideooutputarray)).ok() } + unsafe { OPMGetVideoOutputsFromIDirect3DDevice9Object(pdirect3ddevice9.param().abi(), vos, pulnumvideooutputs as _, pppopmvideooutputarray as _).ok() } } #[inline] pub unsafe fn OPMXboxEnableHDCP(hdcptype: OPM_HDCP_TYPE) -> windows_core::Result<()> { @@ -2117,12 +2117,12 @@ pub unsafe fn OPMXboxEnableHDCP(hdcptype: OPM_HDCP_TYPE) -> windows_core::Result #[inline] pub unsafe fn OPMXboxGetHDCPStatus(phdcpstatus: *mut OPM_HDCP_STATUS) -> windows_core::Result<()> { windows_targets::link!("opmxbox.dll" "system" fn OPMXboxGetHDCPStatus(phdcpstatus : *mut OPM_HDCP_STATUS) -> windows_core::HRESULT); - unsafe { OPMXboxGetHDCPStatus(core::mem::transmute(phdcpstatus)).ok() } + unsafe { OPMXboxGetHDCPStatus(phdcpstatus as _).ok() } } #[inline] pub unsafe fn OPMXboxGetHDCPStatusAndType(phdcpstatus: *mut OPM_HDCP_STATUS, phdcptype: *mut OPM_HDCP_TYPE) -> windows_core::Result<()> { windows_targets::link!("opmxbox.dll" "system" fn OPMXboxGetHDCPStatusAndType(phdcpstatus : *mut OPM_HDCP_STATUS, phdcptype : *mut OPM_HDCP_TYPE) -> windows_core::HRESULT); - unsafe { OPMXboxGetHDCPStatusAndType(core::mem::transmute(phdcpstatus), core::mem::transmute(phdcptype)).ok() } + unsafe { OPMXboxGetHDCPStatusAndType(phdcpstatus as _, phdcptype as _).ok() } } pub const AACMFTEncoder: windows_core::GUID = windows_core::GUID::from_u128(0x93af0c51_2275_45d2_a35b_f2ba21caed00); pub const ACCESSMODE_READ: FILE_ACCESSMODE = FILE_ACCESSMODE(1i32); @@ -9715,7 +9715,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<()> { - unsafe { (windows_core::Interface::vtable(self).ProvideInput)(windows_core::Interface::as_raw(self), dwsamplecount, core::mem::transmute(pdwchannelcount), core::mem::transmute(pinterleavedaudiodata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ProvideInput)(windows_core::Interface::as_raw(self), dwsamplecount, pdwchannelcount as _, pinterleavedaudiodata.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -9809,7 +9809,7 @@ impl ICodecAPI { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetParameterValues(&self, api: *const windows_core::GUID, values: *mut *mut super::super::System::Variant::VARIANT, valuescount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetParameterValues)(windows_core::Interface::as_raw(self), api, core::mem::transmute(values), core::mem::transmute(valuescount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetParameterValues)(windows_core::Interface::as_raw(self), api, values as _, valuescount as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetDefaultValue(&self, api: *const windows_core::GUID) -> windows_core::Result { @@ -9840,10 +9840,10 @@ impl ICodecAPI { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn SetValueWithNotify(&self, api: *const windows_core::GUID, value: *const super::super::System::Variant::VARIANT, changedparam: *mut *mut windows_core::GUID, changedparamcount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetValueWithNotify)(windows_core::Interface::as_raw(self), api, core::mem::transmute(value), core::mem::transmute(changedparam), core::mem::transmute(changedparamcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetValueWithNotify)(windows_core::Interface::as_raw(self), api, core::mem::transmute(value), changedparam as _, changedparamcount as _).ok() } } pub unsafe fn SetAllDefaultsWithNotify(&self, changedparam: *mut *mut windows_core::GUID, changedparamcount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetAllDefaultsWithNotify)(windows_core::Interface::as_raw(self), core::mem::transmute(changedparam), core::mem::transmute(changedparamcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetAllDefaultsWithNotify)(windows_core::Interface::as_raw(self), changedparam as _, changedparamcount as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetAllSettings(&self, __midl__icodecapi0000: P0) -> windows_core::Result<()> @@ -9864,7 +9864,7 @@ impl ICodecAPI { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SetAllSettingsWithNotify)(windows_core::Interface::as_raw(self), __midl__icodecapi0002.param().abi(), core::mem::transmute(changedparam), core::mem::transmute(changedparamcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetAllSettingsWithNotify)(windows_core::Interface::as_raw(self), __midl__icodecapi0002.param().abi(), changedparam as _, changedparamcount as _).ok() } } } #[repr(C)] @@ -10096,7 +10096,7 @@ impl ID3D12VideoDecodeCommandList { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DiscardResource)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pregion.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).DiscardResource)(windows_core::Interface::as_raw(self), presource.param().abi(), pregion.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn BeginQuery(&self, pqueryheap: P0, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32) @@ -10128,10 +10128,10 @@ impl ID3D12VideoDecodeCommandList { unsafe { (windows_core::Interface::vtable(self).SetPredication)(windows_core::Interface::as_raw(self), pbuffer.param().abi(), alignedbufferoffset, operation) } } pub unsafe fn SetMarker(&self, metadata: u32, pdata: Option<*const core::ffi::c_void>, size: u32) { - unsafe { (windows_core::Interface::vtable(self).SetMarker)(windows_core::Interface::as_raw(self), metadata, core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), size) } + unsafe { (windows_core::Interface::vtable(self).SetMarker)(windows_core::Interface::as_raw(self), metadata, pdata.unwrap_or(core::mem::zeroed()) as _, size) } } pub unsafe fn BeginEvent(&self, metadata: u32, pdata: Option<*const core::ffi::c_void>, size: u32) { - unsafe { (windows_core::Interface::vtable(self).BeginEvent)(windows_core::Interface::as_raw(self), metadata, core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), size) } + unsafe { (windows_core::Interface::vtable(self).BeginEvent)(windows_core::Interface::as_raw(self), metadata, pdata.unwrap_or(core::mem::zeroed()) as _, size) } } pub unsafe fn EndEvent(&self) { unsafe { (windows_core::Interface::vtable(self).EndEvent)(windows_core::Interface::as_raw(self)) } @@ -10145,7 +10145,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>) { - unsafe { (windows_core::Interface::vtable(self).WriteBufferImmediate)(windows_core::Interface::as_raw(self), count, pparams, core::mem::transmute(pmodes.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).WriteBufferImmediate)(windows_core::Interface::as_raw(self), count, pparams, pmodes.unwrap_or(core::mem::zeroed()) as _) } } } #[cfg(feature = "Win32_Graphics_Direct3D12")] @@ -10743,7 +10743,7 @@ windows_core::imp::define_interface!(ID3D12VideoDevice, ID3D12VideoDevice_Vtbl, windows_core::imp::interface_hierarchy!(ID3D12VideoDevice, windows_core::IUnknown); impl ID3D12VideoDevice { pub unsafe fn CheckFeatureSupport(&self, featurevideo: D3D12_FEATURE_VIDEO, pfeaturesupportdata: *mut core::ffi::c_void, featuresupportdatasize: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CheckFeatureSupport)(windows_core::Interface::as_raw(self), featurevideo, core::mem::transmute(pfeaturesupportdata), featuresupportdatasize).ok() } + unsafe { (windows_core::Interface::vtable(self).CheckFeatureSupport)(windows_core::Interface::as_raw(self), featurevideo, pfeaturesupportdata as _, featuresupportdatasize).ok() } } pub unsafe fn CreateVideoDecoder(&self, pdesc: *const D3D12_VIDEO_DECODER_DESC) -> windows_core::Result where @@ -10961,7 +10961,7 @@ impl ID3D12VideoDevice2 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ExecuteExtensionCommand)(windows_core::Interface::as_raw(self), pextensioncommand.param().abi(), pexecutionparameters, executionparameterssizeinbytes, core::mem::transmute(poutputdata), outputdatasizeinbytes).ok() } + unsafe { (windows_core::Interface::vtable(self).ExecuteExtensionCommand)(windows_core::Interface::as_raw(self), pextensioncommand.param().abi(), pexecutionparameters, executionparameterssizeinbytes, poutputdata as _, outputdatasizeinbytes).ok() } } } #[repr(C)] @@ -11153,7 +11153,7 @@ impl ID3D12VideoEncodeCommandList { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DiscardResource)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pregion.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).DiscardResource)(windows_core::Interface::as_raw(self), presource.param().abi(), pregion.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn BeginQuery(&self, pqueryheap: P0, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32) @@ -11185,10 +11185,10 @@ impl ID3D12VideoEncodeCommandList { unsafe { (windows_core::Interface::vtable(self).SetPredication)(windows_core::Interface::as_raw(self), pbuffer.param().abi(), alignedbufferoffset, operation) } } pub unsafe fn SetMarker(&self, metadata: u32, pdata: Option<*const core::ffi::c_void>, size: u32) { - unsafe { (windows_core::Interface::vtable(self).SetMarker)(windows_core::Interface::as_raw(self), metadata, core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), size) } + unsafe { (windows_core::Interface::vtable(self).SetMarker)(windows_core::Interface::as_raw(self), metadata, pdata.unwrap_or(core::mem::zeroed()) as _, size) } } pub unsafe fn BeginEvent(&self, metadata: u32, pdata: Option<*const core::ffi::c_void>, size: u32) { - unsafe { (windows_core::Interface::vtable(self).BeginEvent)(windows_core::Interface::as_raw(self), metadata, core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), size) } + unsafe { (windows_core::Interface::vtable(self).BeginEvent)(windows_core::Interface::as_raw(self), metadata, pdata.unwrap_or(core::mem::zeroed()) as _, size) } } pub unsafe fn EndEvent(&self) { unsafe { (windows_core::Interface::vtable(self).EndEvent)(windows_core::Interface::as_raw(self)) } @@ -11206,7 +11206,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>) { - unsafe { (windows_core::Interface::vtable(self).WriteBufferImmediate)(windows_core::Interface::as_raw(self), count, pparams, core::mem::transmute(pmodes.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).WriteBufferImmediate)(windows_core::Interface::as_raw(self), count, pparams, pmodes.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn SetProtectedResourceSession(&self, pprotectedresourcesession: P0) @@ -12125,7 +12125,7 @@ impl ID3D12VideoProcessCommandList { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DiscardResource)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pregion.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).DiscardResource)(windows_core::Interface::as_raw(self), presource.param().abi(), pregion.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn BeginQuery(&self, pqueryheap: P0, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32) @@ -12157,10 +12157,10 @@ impl ID3D12VideoProcessCommandList { unsafe { (windows_core::Interface::vtable(self).SetPredication)(windows_core::Interface::as_raw(self), pbuffer.param().abi(), alignedbufferoffset, operation) } } pub unsafe fn SetMarker(&self, metadata: u32, pdata: Option<*const core::ffi::c_void>, size: u32) { - unsafe { (windows_core::Interface::vtable(self).SetMarker)(windows_core::Interface::as_raw(self), metadata, core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), size) } + unsafe { (windows_core::Interface::vtable(self).SetMarker)(windows_core::Interface::as_raw(self), metadata, pdata.unwrap_or(core::mem::zeroed()) as _, size) } } pub unsafe fn BeginEvent(&self, metadata: u32, pdata: Option<*const core::ffi::c_void>, size: u32) { - unsafe { (windows_core::Interface::vtable(self).BeginEvent)(windows_core::Interface::as_raw(self), metadata, core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), size) } + unsafe { (windows_core::Interface::vtable(self).BeginEvent)(windows_core::Interface::as_raw(self), metadata, pdata.unwrap_or(core::mem::zeroed()) as _, size) } } pub unsafe fn EndEvent(&self) { unsafe { (windows_core::Interface::vtable(self).EndEvent)(windows_core::Interface::as_raw(self)) } @@ -12174,7 +12174,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>) { - unsafe { (windows_core::Interface::vtable(self).WriteBufferImmediate)(windows_core::Interface::as_raw(self), count, pparams, core::mem::transmute(pmodes.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).WriteBufferImmediate)(windows_core::Interface::as_raw(self), count, pparams, pmodes.unwrap_or(core::mem::zeroed()) as _) } } } #[cfg(feature = "Win32_Graphics_Direct3D12")] @@ -12713,11 +12713,11 @@ 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<()> { - unsafe { (windows_core::Interface::vtable(self).CreateVideoSurface)(windows_core::Interface::as_raw(self), width, height, format, pool, usage, r#type, ppsurfaces.len().try_into().unwrap(), core::mem::transmute(ppsurfaces.as_ptr()), core::mem::transmute(psharedhandle.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateVideoSurface)(windows_core::Interface::as_raw(self), width, height, format, pool, usage, r#type, ppsurfaces.len().try_into().unwrap(), core::mem::transmute(ppsurfaces.as_ptr()), psharedhandle.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn GetVideoProcessorDeviceCaps(&self, pcaps: *mut DXVAHD_VPDEVCAPS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorDeviceCaps)(windows_core::Interface::as_raw(self), core::mem::transmute(pcaps)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorDeviceCaps)(windows_core::Interface::as_raw(self), pcaps as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn GetVideoProcessorOutputFormats(&self, pformats: &mut [super::super::Graphics::Direct3D9::D3DFORMAT]) -> windows_core::Result<()> { @@ -12869,13 +12869,13 @@ impl IDXVAHD_VideoProcessor { unsafe { (windows_core::Interface::vtable(self).SetVideoProcessBltState)(windows_core::Interface::as_raw(self), state, datasize, pdata).ok() } } pub unsafe fn GetVideoProcessBltState(&self, state: DXVAHD_BLT_STATE, datasize: u32, pdata: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVideoProcessBltState)(windows_core::Interface::as_raw(self), state, datasize, core::mem::transmute(pdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVideoProcessBltState)(windows_core::Interface::as_raw(self), state, datasize, pdata as _).ok() } } pub unsafe fn SetVideoProcessStreamState(&self, streamnumber: u32, state: DXVAHD_STREAM_STATE, datasize: u32, pdata: *const core::ffi::c_void) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetVideoProcessStreamState)(windows_core::Interface::as_raw(self), streamnumber, state, datasize, pdata).ok() } } pub unsafe fn GetVideoProcessStreamState(&self, streamnumber: u32, state: DXVAHD_STREAM_STATE, datasize: u32, pdata: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVideoProcessStreamState)(windows_core::Interface::as_raw(self), streamnumber, state, datasize, core::mem::transmute(pdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVideoProcessStreamState)(windows_core::Interface::as_raw(self), streamnumber, state, datasize, pdata as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn VideoProcessBltHD(&self, poutputsurface: P0, outputframe: u32, pstreams: &[DXVAHD_STREAM_DATA]) -> windows_core::Result<()> @@ -12958,7 +12958,7 @@ windows_core::imp::interface_hierarchy!(IDirect3D9ExOverlayExtension, windows_co impl IDirect3D9ExOverlayExtension { #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn CheckDeviceOverlayType(&self, adapter: u32, devtype: super::super::Graphics::Direct3D9::D3DDEVTYPE, overlaywidth: u32, overlayheight: u32, overlayformat: super::super::Graphics::Direct3D9::D3DFORMAT, pdisplaymode: *mut super::super::Graphics::Direct3D9::D3DDISPLAYMODEEX, displayrotation: super::super::Graphics::Direct3D9::D3DDISPLAYROTATION, poverlaycaps: *mut D3DOVERLAYCAPS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CheckDeviceOverlayType)(windows_core::Interface::as_raw(self), adapter, devtype, overlaywidth, overlayheight, overlayformat, core::mem::transmute(pdisplaymode), displayrotation, core::mem::transmute(poverlaycaps)).ok() } + unsafe { (windows_core::Interface::vtable(self).CheckDeviceOverlayType)(windows_core::Interface::as_raw(self), adapter, devtype, overlaywidth, overlayheight, overlayformat, pdisplaymode as _, displayrotation, poverlaycaps as _).ok() } } } #[repr(C)] @@ -12994,20 +12994,20 @@ windows_core::imp::define_interface!(IDirect3DAuthenticatedChannel9, IDirect3DAu windows_core::imp::interface_hierarchy!(IDirect3DAuthenticatedChannel9, windows_core::IUnknown); impl IDirect3DAuthenticatedChannel9 { pub unsafe fn GetCertificateSize(&self, pcertificatesize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCertificateSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pcertificatesize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCertificateSize)(windows_core::Interface::as_raw(self), pcertificatesize as _).ok() } } pub unsafe fn GetCertificate(&self, certifactesize: u32, ppcertificate: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCertificate)(windows_core::Interface::as_raw(self), certifactesize, core::mem::transmute(ppcertificate)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCertificate)(windows_core::Interface::as_raw(self), certifactesize, ppcertificate as _).ok() } } pub unsafe fn NegotiateKeyExchange(&self, datasize: u32, pdata: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).NegotiateKeyExchange)(windows_core::Interface::as_raw(self), datasize, core::mem::transmute(pdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).NegotiateKeyExchange)(windows_core::Interface::as_raw(self), datasize, pdata as _).ok() } } pub unsafe fn Query(&self, inputsize: u32, pinput: *const core::ffi::c_void, outputsize: u32, poutput: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Query)(windows_core::Interface::as_raw(self), inputsize, pinput, outputsize, core::mem::transmute(poutput)).ok() } + unsafe { (windows_core::Interface::vtable(self).Query)(windows_core::Interface::as_raw(self), inputsize, pinput, outputsize, poutput as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn Configure(&self, inputsize: u32, pinput: *const core::ffi::c_void, poutput: *mut super::super::Graphics::Direct3D9::D3DAUTHENTICATEDCHANNEL_CONFIGURE_OUTPUT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Configure)(windows_core::Interface::as_raw(self), inputsize, pinput, core::mem::transmute(poutput)).ok() } + unsafe { (windows_core::Interface::vtable(self).Configure)(windows_core::Interface::as_raw(self), inputsize, pinput, poutput as _).ok() } } } #[repr(C)] @@ -13082,13 +13082,13 @@ windows_core::imp::define_interface!(IDirect3DCryptoSession9, IDirect3DCryptoSes windows_core::imp::interface_hierarchy!(IDirect3DCryptoSession9, windows_core::IUnknown); impl IDirect3DCryptoSession9 { pub unsafe fn GetCertificateSize(&self, pcertificatesize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCertificateSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pcertificatesize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCertificateSize)(windows_core::Interface::as_raw(self), pcertificatesize as _).ok() } } pub unsafe fn GetCertificate(&self, certifactesize: u32, ppcertificate: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCertificate)(windows_core::Interface::as_raw(self), certifactesize, core::mem::transmute(ppcertificate)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCertificate)(windows_core::Interface::as_raw(self), certifactesize, ppcertificate as _).ok() } } pub unsafe fn NegotiateKeyExchange(&self, datasize: u32, pdata: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).NegotiateKeyExchange)(windows_core::Interface::as_raw(self), datasize, core::mem::transmute(pdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).NegotiateKeyExchange)(windows_core::Interface::as_raw(self), datasize, pdata as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn EncryptionBlt(&self, psrcsurface: P0, pdstsurface: P1, dstsurfacesize: u32, piv: *mut core::ffi::c_void) -> windows_core::Result<()> @@ -13096,7 +13096,7 @@ impl IDirect3DCryptoSession9 { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EncryptionBlt)(windows_core::Interface::as_raw(self), psrcsurface.param().abi(), pdstsurface.param().abi(), dstsurfacesize, core::mem::transmute(piv)).ok() } + unsafe { (windows_core::Interface::vtable(self).EncryptionBlt)(windows_core::Interface::as_raw(self), psrcsurface.param().abi(), pdstsurface.param().abi(), dstsurfacesize, piv as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn DecryptionBlt(&self, psrcsurface: P0, pdstsurface: P1, srcsurfacesize: u32, pencryptedblockinfo: *mut super::super::Graphics::Direct3D9::D3DENCRYPTED_BLOCK_INFO, pcontentkey: *mut core::ffi::c_void, piv: *mut core::ffi::c_void) -> windows_core::Result<()> @@ -13104,23 +13104,23 @@ impl IDirect3DCryptoSession9 { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DecryptionBlt)(windows_core::Interface::as_raw(self), psrcsurface.param().abi(), pdstsurface.param().abi(), srcsurfacesize, core::mem::transmute(pencryptedblockinfo), core::mem::transmute(pcontentkey), core::mem::transmute(piv)).ok() } + unsafe { (windows_core::Interface::vtable(self).DecryptionBlt)(windows_core::Interface::as_raw(self), psrcsurface.param().abi(), pdstsurface.param().abi(), srcsurfacesize, pencryptedblockinfo as _, pcontentkey as _, piv as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn GetSurfacePitch(&self, psrcsurface: P0, psurfacepitch: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetSurfacePitch)(windows_core::Interface::as_raw(self), psrcsurface.param().abi(), core::mem::transmute(psurfacepitch)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSurfacePitch)(windows_core::Interface::as_raw(self), psrcsurface.param().abi(), psurfacepitch as _).ok() } } pub unsafe fn StartSessionKeyRefresh(&self, prandomnumber: *mut core::ffi::c_void, randomnumbersize: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).StartSessionKeyRefresh)(windows_core::Interface::as_raw(self), core::mem::transmute(prandomnumber), randomnumbersize).ok() } + unsafe { (windows_core::Interface::vtable(self).StartSessionKeyRefresh)(windows_core::Interface::as_raw(self), prandomnumber as _, randomnumbersize).ok() } } pub unsafe fn FinishSessionKeyRefresh(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).FinishSessionKeyRefresh)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetEncryptionBltKey(&self, preadbackkey: *mut core::ffi::c_void, keysize: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEncryptionBltKey)(windows_core::Interface::as_raw(self), core::mem::transmute(preadbackkey), keysize).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEncryptionBltKey)(windows_core::Interface::as_raw(self), preadbackkey as _, keysize).ok() } } } #[repr(C)] @@ -13237,14 +13237,14 @@ windows_core::imp::define_interface!(IDirect3DDevice9Video, IDirect3DDevice9Vide windows_core::imp::interface_hierarchy!(IDirect3DDevice9Video, windows_core::IUnknown); impl IDirect3DDevice9Video { pub unsafe fn GetContentProtectionCaps(&self, pcryptotype: *const windows_core::GUID, pdecodeprofile: *const windows_core::GUID, pcaps: *mut D3DCONTENTPROTECTIONCAPS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetContentProtectionCaps)(windows_core::Interface::as_raw(self), pcryptotype, pdecodeprofile, core::mem::transmute(pcaps)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetContentProtectionCaps)(windows_core::Interface::as_raw(self), pcryptotype, pdecodeprofile, pcaps as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn CreateAuthenticatedChannel(&self, channeltype: super::super::Graphics::Direct3D9::D3DAUTHENTICATEDCHANNELTYPE, ppauthenticatedchannel: *mut Option, pchannelhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateAuthenticatedChannel)(windows_core::Interface::as_raw(self), channeltype, core::mem::transmute(ppauthenticatedchannel), core::mem::transmute(pchannelhandle)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateAuthenticatedChannel)(windows_core::Interface::as_raw(self), channeltype, core::mem::transmute(ppauthenticatedchannel), pchannelhandle as _).ok() } } pub unsafe fn CreateCryptoSession(&self, pcryptotype: *const windows_core::GUID, pdecodeprofile: *const windows_core::GUID, ppcryptosession: *mut Option, pcryptohandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateCryptoSession)(windows_core::Interface::as_raw(self), pcryptotype, pdecodeprofile, core::mem::transmute(ppcryptosession), core::mem::transmute(pcryptohandle)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateCryptoSession)(windows_core::Interface::as_raw(self), pcryptotype, pdecodeprofile, core::mem::transmute(ppcryptosession), pcryptohandle as _).ok() } } } #[repr(C)] @@ -13327,7 +13327,7 @@ impl IDirect3DDeviceManager9 { unsafe { (windows_core::Interface::vtable(self).UnlockDevice)(windows_core::Interface::as_raw(self), hdevice, fsavestate.into()).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetVideoService)(windows_core::Interface::as_raw(self), hdevice, riid, core::mem::transmute(ppservice)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVideoService)(windows_core::Interface::as_raw(self), hdevice, riid, ppservice as _).ok() } } } #[repr(C)] @@ -13430,7 +13430,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<()> { - unsafe { (windows_core::Interface::vtable(self).CreateSurface)(windows_core::Interface::as_raw(self), width, height, backbuffers, format, pool, usage, dxvatype.0 as _, core::mem::transmute(ppsurface), core::mem::transmute(psharedhandle.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateSurface)(windows_core::Interface::as_raw(self), width, height, backbuffers, format, pool, usage, dxvatype.0 as _, core::mem::transmute(ppsurface), psharedhandle.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -13473,10 +13473,10 @@ 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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetCreationParameters)(windows_core::Interface::as_raw(self), pdeviceguid.unwrap_or(core::mem::zeroed()) as _, pvideodesc.unwrap_or(core::mem::zeroed()) as _, pconfig.unwrap_or(core::mem::zeroed()) as _, pdecoderrendertargets as _, pnumsurfaces.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetBuffer(&self, buffertype: DXVA2_BufferfType, ppbuffer: *mut *mut core::ffi::c_void, pbuffersize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), buffertype.0 as _, core::mem::transmute(ppbuffer), core::mem::transmute(pbuffersize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), buffertype.0 as _, ppbuffer as _, pbuffersize as _).ok() } } pub unsafe fn ReleaseBuffer(&self, buffertype: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ReleaseBuffer)(windows_core::Interface::as_raw(self), buffertype).ok() } @@ -13486,10 +13486,10 @@ impl IDirectXVideoDecoder { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).BeginFrame)(windows_core::Interface::as_raw(self), prendertarget.param().abi(), pvpvpdata.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn EndFrame(&self, phandlecomplete: Option<*mut super::super::Foundation::HANDLE>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EndFrame)(windows_core::Interface::as_raw(self), core::mem::transmute(phandlecomplete.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).EndFrame)(windows_core::Interface::as_raw(self), phandlecomplete.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Execute(&self, pexecuteparams: *const DXVA2_DecodeExecuteParams) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Execute)(windows_core::Interface::as_raw(self), pexecuteparams).ok() } @@ -13600,15 +13600,15 @@ impl core::ops::Deref for IDirectXVideoDecoderService { windows_core::imp::interface_hierarchy!(IDirectXVideoDecoderService, windows_core::IUnknown, IDirectXVideoAccelerationService); impl IDirectXVideoDecoderService { pub unsafe fn GetDecoderDeviceGuids(&self, pcount: *mut u32, pguids: *mut *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDecoderDeviceGuids)(windows_core::Interface::as_raw(self), core::mem::transmute(pcount), core::mem::transmute(pguids)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDecoderDeviceGuids)(windows_core::Interface::as_raw(self), pcount as _, pguids as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn GetDecoderRenderTargets(&self, guid: *const windows_core::GUID, pcount: *mut u32, pformats: *mut *mut super::super::Graphics::Direct3D9::D3DFORMAT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDecoderRenderTargets)(windows_core::Interface::as_raw(self), guid, core::mem::transmute(pcount), core::mem::transmute(pformats)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDecoderRenderTargets)(windows_core::Interface::as_raw(self), guid, pcount as _, pformats as _).ok() } } #[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<()> { - unsafe { (windows_core::Interface::vtable(self).GetDecoderConfigurations)(windows_core::Interface::as_raw(self), guid, pvideodesc, core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcount), core::mem::transmute(ppconfigs)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDecoderConfigurations)(windows_core::Interface::as_raw(self), guid, pvideodesc, preserved.unwrap_or(core::mem::zeroed()) as _, pcount as _, ppconfigs as _).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 { @@ -13754,11 +13754,11 @@ 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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetCreationParameters)(windows_core::Interface::as_raw(self), pdeviceguid.unwrap_or(core::mem::zeroed()) as _, pvideodesc.unwrap_or(core::mem::zeroed()) as _, prendertargetformat.unwrap_or(core::mem::zeroed()) as _, pmaxnumsubstreams.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn GetVideoProcessorCaps(&self, pcaps: *mut DXVA2_VideoProcessorCaps) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorCaps)(windows_core::Interface::as_raw(self), core::mem::transmute(pcaps)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorCaps)(windows_core::Interface::as_raw(self), pcaps as _).ok() } } pub unsafe fn GetProcAmpRange(&self, procampcap: u32) -> windows_core::Result { unsafe { @@ -13777,7 +13777,7 @@ impl IDirectXVideoProcessor { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).VideoProcessBlt)(windows_core::Interface::as_raw(self), prendertarget.param().abi(), pbltparams, core::mem::transmute(psamples.as_ptr()), psamples.len().try_into().unwrap(), core::mem::transmute(phandlecomplete.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).VideoProcessBlt)(windows_core::Interface::as_raw(self), prendertarget.param().abi(), pbltparams, core::mem::transmute(psamples.as_ptr()), psamples.len().try_into().unwrap(), phandlecomplete.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -13895,19 +13895,19 @@ impl IDirectXVideoProcessorService { } #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn GetVideoProcessorDeviceGuids(&self, pvideodesc: *const DXVA2_VideoDesc, pcount: *mut u32, pguids: *mut *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorDeviceGuids)(windows_core::Interface::as_raw(self), pvideodesc, core::mem::transmute(pcount), core::mem::transmute(pguids)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorDeviceGuids)(windows_core::Interface::as_raw(self), pvideodesc, pcount as _, pguids as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn GetVideoProcessorRenderTargets(&self, videoprocdeviceguid: *const windows_core::GUID, pvideodesc: *const DXVA2_VideoDesc, pcount: *mut u32, pformats: *mut *mut super::super::Graphics::Direct3D9::D3DFORMAT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorRenderTargets)(windows_core::Interface::as_raw(self), videoprocdeviceguid, pvideodesc, core::mem::transmute(pcount), core::mem::transmute(pformats)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorRenderTargets)(windows_core::Interface::as_raw(self), videoprocdeviceguid, pvideodesc, pcount as _, pformats as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn GetVideoProcessorSubStreamFormats(&self, videoprocdeviceguid: *const windows_core::GUID, pvideodesc: *const DXVA2_VideoDesc, rendertargetformat: super::super::Graphics::Direct3D9::D3DFORMAT, pcount: *mut u32, pformats: *mut *mut super::super::Graphics::Direct3D9::D3DFORMAT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorSubStreamFormats)(windows_core::Interface::as_raw(self), videoprocdeviceguid, pvideodesc, rendertargetformat, core::mem::transmute(pcount), core::mem::transmute(pformats)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorSubStreamFormats)(windows_core::Interface::as_raw(self), videoprocdeviceguid, pvideodesc, rendertargetformat, pcount as _, pformats as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn GetVideoProcessorCaps(&self, videoprocdeviceguid: *const windows_core::GUID, pvideodesc: *const DXVA2_VideoDesc, rendertargetformat: super::super::Graphics::Direct3D9::D3DFORMAT, pcaps: *mut DXVA2_VideoProcessorCaps) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorCaps)(windows_core::Interface::as_raw(self), videoprocdeviceguid, pvideodesc, rendertargetformat, core::mem::transmute(pcaps)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorCaps)(windows_core::Interface::as_raw(self), videoprocdeviceguid, pvideodesc, rendertargetformat, pcaps as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn GetProcAmpRange(&self, videoprocdeviceguid: *const windows_core::GUID, pvideodesc: *const DXVA2_VideoDesc, rendertargetformat: super::super::Graphics::Direct3D9::D3DFORMAT, procampcap: u32) -> windows_core::Result { @@ -14321,7 +14321,7 @@ windows_core::imp::define_interface!(IFileClient, IFileClient_Vtbl, 0xbfccd196_1 windows_core::imp::interface_hierarchy!(IFileClient, windows_core::IUnknown); impl IFileClient { pub unsafe fn GetObjectDiskSize(&self, pqwsize: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetObjectDiskSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pqwsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetObjectDiskSize)(windows_core::Interface::as_raw(self), pqwsize as _).ok() } } pub unsafe fn Write(&self, pfio: P0) -> windows_core::Result<()> where @@ -14390,28 +14390,28 @@ impl IFileIo { unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), eaccessmode, eopenmode, pwszfilename.param().abi()).ok() } } pub unsafe fn GetLength(&self, pqwlength: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLength)(windows_core::Interface::as_raw(self), core::mem::transmute(pqwlength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLength)(windows_core::Interface::as_raw(self), pqwlength as _).ok() } } pub unsafe fn SetLength(&self, qwlength: u64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetLength)(windows_core::Interface::as_raw(self), qwlength).ok() } } pub unsafe fn GetCurrentPosition(&self, pqwposition: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrentPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(pqwposition)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentPosition)(windows_core::Interface::as_raw(self), pqwposition as _).ok() } } pub unsafe fn SetCurrentPosition(&self, qwposition: u64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetCurrentPosition)(windows_core::Interface::as_raw(self), qwposition).ok() } } pub unsafe fn IsEndOfStream(&self, pbendofstream: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsEndOfStream)(windows_core::Interface::as_raw(self), core::mem::transmute(pbendofstream)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsEndOfStream)(windows_core::Interface::as_raw(self), pbendofstream as _).ok() } } pub unsafe fn Read(&self, pbt: *mut u8, ul: u32, pulread: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), core::mem::transmute(pbt), ul, core::mem::transmute(pulread)).ok() } + unsafe { (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), pbt as _, ul, pulread as _).ok() } } pub unsafe fn Write(&self, pbt: *mut u8, ul: u32, pulwritten: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Write)(windows_core::Interface::as_raw(self), core::mem::transmute(pbt), ul, core::mem::transmute(pulwritten)).ok() } + unsafe { (windows_core::Interface::vtable(self).Write)(windows_core::Interface::as_raw(self), pbt as _, ul, pulwritten as _).ok() } } pub unsafe fn Seek(&self, eseekorigin: SEEK_ORIGIN, qwseekoffset: u64, dwseekflags: u32, pqwcurrentposition: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Seek)(windows_core::Interface::as_raw(self), eseekorigin, qwseekoffset, dwseekflags, core::mem::transmute(pqwcurrentposition)).ok() } + unsafe { (windows_core::Interface::vtable(self).Seek)(windows_core::Interface::as_raw(self), eseekorigin, qwseekoffset, dwseekflags, pqwcurrentposition as _).ok() } } pub unsafe fn Close(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() } @@ -14528,13 +14528,13 @@ windows_core::imp::define_interface!(IMF2DBuffer, IMF2DBuffer_Vtbl, 0x7dc9d5f9_9 windows_core::imp::interface_hierarchy!(IMF2DBuffer, windows_core::IUnknown); impl IMF2DBuffer { pub unsafe fn Lock2D(&self, ppbscanline0: *mut *mut u8, plpitch: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Lock2D)(windows_core::Interface::as_raw(self), core::mem::transmute(ppbscanline0), core::mem::transmute(plpitch)).ok() } + unsafe { (windows_core::Interface::vtable(self).Lock2D)(windows_core::Interface::as_raw(self), ppbscanline0 as _, plpitch as _).ok() } } pub unsafe fn Unlock2D(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Unlock2D)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetScanline0AndPitch(&self, pbscanline0: *mut *mut u8, plpitch: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetScanline0AndPitch)(windows_core::Interface::as_raw(self), core::mem::transmute(pbscanline0), core::mem::transmute(plpitch)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScanline0AndPitch)(windows_core::Interface::as_raw(self), pbscanline0 as _, plpitch as _).ok() } } pub unsafe fn IsContiguousFormat(&self) -> windows_core::Result { unsafe { @@ -14657,7 +14657,7 @@ impl core::ops::Deref for IMF2DBuffer2 { windows_core::imp::interface_hierarchy!(IMF2DBuffer2, windows_core::IUnknown, IMF2DBuffer); impl IMF2DBuffer2 { pub unsafe fn Lock2DSize(&self, lockflags: MF2DBuffer_LockFlags, ppbscanline0: *mut *mut u8, plpitch: *mut i32, ppbbufferstart: *mut *mut u8, pcbbufferlength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Lock2DSize)(windows_core::Interface::as_raw(self), lockflags, core::mem::transmute(ppbscanline0), core::mem::transmute(plpitch), core::mem::transmute(ppbbufferstart), core::mem::transmute(pcbbufferlength)).ok() } + unsafe { (windows_core::Interface::vtable(self).Lock2DSize)(windows_core::Interface::as_raw(self), lockflags, ppbscanline0 as _, plpitch as _, ppbbufferstart as _, pcbbufferlength as _).ok() } } pub unsafe fn Copy2DTo(&self, pdestbuffer: P0) -> windows_core::Result<()> where @@ -14903,14 +14903,14 @@ impl IMFASFIndexer { } } pub unsafe fn GetIndexStatus(&self, pindexidentifier: *const ASF_INDEX_IDENTIFIER, pfisindexed: *mut super::super::Foundation::BOOL, pbindexdescriptor: *mut u8, pcbindexdescriptor: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIndexStatus)(windows_core::Interface::as_raw(self), pindexidentifier, core::mem::transmute(pfisindexed), core::mem::transmute(pbindexdescriptor), core::mem::transmute(pcbindexdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIndexStatus)(windows_core::Interface::as_raw(self), pindexidentifier, pfisindexed as _, pbindexdescriptor as _, pcbindexdescriptor as _).ok() } } pub unsafe fn SetIndexStatus(&self, pbindexdescriptor: *const u8, cbindexdescriptor: u32, fgenerateindex: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetIndexStatus)(windows_core::Interface::as_raw(self), pbindexdescriptor, cbindexdescriptor, fgenerateindex.into()).ok() } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn GetSeekPositionForValue(&self, pvarvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT, pindexidentifier: *const ASF_INDEX_IDENTIFIER, pcboffsetwithindata: *mut u64, phnsapproxtime: *mut i64, pdwpayloadnumberofstreamwithinpacket: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSeekPositionForValue)(windows_core::Interface::as_raw(self), core::mem::transmute(pvarvalue), pindexidentifier, core::mem::transmute(pcboffsetwithindata), core::mem::transmute(phnsapproxtime), core::mem::transmute(pdwpayloadnumberofstreamwithinpacket)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSeekPositionForValue)(windows_core::Interface::as_raw(self), core::mem::transmute(pvarvalue), pindexidentifier, pcboffsetwithindata as _, phnsapproxtime as _, pdwpayloadnumberofstreamwithinpacket as _).ok() } } pub unsafe fn GenerateIndexEntries(&self, piasfpacketsample: P0) -> windows_core::Result<()> where @@ -15126,7 +15126,7 @@ impl IMFASFMultiplexer { unsafe { (windows_core::Interface::vtable(self).ProcessSample)(windows_core::Interface::as_raw(self), wstreamnumber, pisample.param().abi(), hnstimestampadjust).ok() } } pub unsafe fn GetNextPacket(&self, pdwstatusflags: *mut u32, ppipacket: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNextPacket)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwstatusflags), core::mem::transmute(ppipacket)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNextPacket)(windows_core::Interface::as_raw(self), pdwstatusflags as _, core::mem::transmute(ppipacket)).ok() } } pub unsafe fn Flush(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Flush)(windows_core::Interface::as_raw(self)).ok() } @@ -15276,7 +15276,7 @@ impl IMFASFMutualExclusion { } } pub unsafe fn GetStreamsForRecord(&self, dwrecordnumber: u32, pwstreamnumarray: *mut u16, pcstreams: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStreamsForRecord)(windows_core::Interface::as_raw(self), dwrecordnumber, core::mem::transmute(pwstreamnumarray), core::mem::transmute(pcstreams)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStreamsForRecord)(windows_core::Interface::as_raw(self), dwrecordnumber, pwstreamnumarray as _, pcstreams as _).ok() } } pub unsafe fn AddStreamForRecord(&self, dwrecordnumber: u32, wstreamnumber: u16) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).AddStreamForRecord)(windows_core::Interface::as_raw(self), dwrecordnumber, wstreamnumber).ok() } @@ -15438,7 +15438,7 @@ impl IMFASFProfile { } } pub unsafe fn GetStream(&self, dwstreamindex: u32, pwstreamnumber: *mut u16, ppistream: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStream)(windows_core::Interface::as_raw(self), dwstreamindex, core::mem::transmute(pwstreamnumber), core::mem::transmute(ppistream)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStream)(windows_core::Interface::as_raw(self), dwstreamindex, pwstreamnumber as _, core::mem::transmute(ppistream)).ok() } } pub unsafe fn GetStreamByNumber(&self, wstreamnumber: u16) -> windows_core::Result { unsafe { @@ -15759,7 +15759,7 @@ impl IMFASFSplitter { unsafe { (windows_core::Interface::vtable(self).SelectStreams)(windows_core::Interface::as_raw(self), pwstreamnumbers, wnumstreams).ok() } } pub unsafe fn GetSelectedStreams(&self, pwstreamnumbers: *mut u16, pwnumstreams: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSelectedStreams)(windows_core::Interface::as_raw(self), core::mem::transmute(pwstreamnumbers), core::mem::transmute(pwnumstreams)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSelectedStreams)(windows_core::Interface::as_raw(self), pwstreamnumbers as _, pwnumstreams as _).ok() } } pub unsafe fn ParseData(&self, pibuffer: P0, cbbufferoffset: u32, cblength: u32) -> windows_core::Result<()> where @@ -15768,7 +15768,7 @@ impl IMFASFSplitter { unsafe { (windows_core::Interface::vtable(self).ParseData)(windows_core::Interface::as_raw(self), pibuffer.param().abi(), cbbufferoffset, cblength).ok() } } pub unsafe fn GetNextSample(&self, pdwstatusflags: *mut ASF_STATUSFLAGS, pwstreamnumber: *mut u16, ppisample: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNextSample)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwstatusflags), core::mem::transmute(pwstreamnumber), core::mem::transmute(ppisample)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNextSample)(windows_core::Interface::as_raw(self), pdwstatusflags as _, pwstreamnumber as _, core::mem::transmute(ppisample)).ok() } } pub unsafe fn Flush(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Flush)(windows_core::Interface::as_raw(self)).ok() } @@ -15930,7 +15930,7 @@ impl IMFASFStreamConfig { } } pub unsafe fn GetPayloadExtension(&self, wpayloadextensionnumber: u16, pguidextensionsystemid: *mut windows_core::GUID, pcbextensiondatasize: *mut u16, pbextensionsysteminfo: *mut u8, pcbextensionsysteminfo: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPayloadExtension)(windows_core::Interface::as_raw(self), wpayloadextensionnumber, core::mem::transmute(pguidextensionsystemid), core::mem::transmute(pcbextensiondatasize), core::mem::transmute(pbextensionsysteminfo), core::mem::transmute(pcbextensionsysteminfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPayloadExtension)(windows_core::Interface::as_raw(self), wpayloadextensionnumber, pguidextensionsystemid as _, pcbextensiondatasize as _, pbextensionsysteminfo as _, pcbextensionsysteminfo as _).ok() } } pub unsafe fn AddPayloadExtension(&self, guidextensionsystemid: windows_core::GUID, cbextensiondatasize: u16, pbextensionsysteminfo: &[u8]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).AddPayloadExtension)(windows_core::Interface::as_raw(self), core::mem::transmute(guidextensionsystemid), cbextensiondatasize, core::mem::transmute(pbextensionsysteminfo.as_ptr()), pbextensionsysteminfo.len().try_into().unwrap()).ok() } @@ -16089,7 +16089,7 @@ impl IMFASFStreamPrioritization { } } pub unsafe fn GetStream(&self, dwstreamindex: u32, pwstreamnumber: *mut u16, pwstreamflags: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStream)(windows_core::Interface::as_raw(self), dwstreamindex, core::mem::transmute(pwstreamnumber), core::mem::transmute(pwstreamflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStream)(windows_core::Interface::as_raw(self), dwstreamindex, pwstreamnumber as _, pwstreamflags as _).ok() } } pub unsafe fn AddStream(&self, wstreamnumber: u16, wstreamflags: u16) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).AddStream)(windows_core::Interface::as_raw(self), wstreamnumber, wstreamflags).ok() } @@ -16242,7 +16242,7 @@ impl IMFASFStreamSelector { } } pub unsafe fn GetBandwidthStep(&self, dwstepnum: u32, pdwbitrate: *mut u32, rgwstreamnumbers: *mut u16, rgselections: *mut ASF_SELECTION_STATUS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBandwidthStep)(windows_core::Interface::as_raw(self), dwstepnum, core::mem::transmute(pdwbitrate), core::mem::transmute(rgwstreamnumbers), core::mem::transmute(rgselections)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBandwidthStep)(windows_core::Interface::as_raw(self), dwstepnum, pdwbitrate as _, rgwstreamnumbers as _, rgselections as _).ok() } } pub unsafe fn BitrateToStepNumber(&self, dwbitrate: u32) -> windows_core::Result { unsafe { @@ -16531,7 +16531,7 @@ windows_core::imp::define_interface!(IMFAsyncCallback, IMFAsyncCallback_Vtbl, 0x windows_core::imp::interface_hierarchy!(IMFAsyncCallback, windows_core::IUnknown); impl IMFAsyncCallback { pub unsafe fn GetParameters(&self, pdwflags: *mut u32, pdwqueue: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwflags), core::mem::transmute(pdwqueue)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetParameters)(windows_core::Interface::as_raw(self), pdwflags as _, pdwqueue as _).ok() } } pub unsafe fn Invoke(&self, pasyncresult: P0) -> windows_core::Result<()> where @@ -16730,7 +16730,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<()> { - unsafe { (windows_core::Interface::vtable(self).GetItem)(windows_core::Interface::as_raw(self), guidkey, core::mem::transmute(pvalue.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetItem)(windows_core::Interface::as_raw(self), guidkey, pvalue.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetItemType(&self, guidkey: *const windows_core::GUID) -> windows_core::Result { unsafe { @@ -16785,10 +16785,10 @@ impl IMFAttributes { } } pub unsafe fn GetString(&self, guidkey: *const windows_core::GUID, pwszvalue: &mut [u16], pcchlength: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetString)(windows_core::Interface::as_raw(self), guidkey, core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len().try_into().unwrap(), core::mem::transmute(pcchlength.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetString)(windows_core::Interface::as_raw(self), guidkey, core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len().try_into().unwrap(), pcchlength.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetAllocatedString(&self, guidkey: *const windows_core::GUID, ppwszvalue: *mut windows_core::PWSTR, pcchlength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAllocatedString)(windows_core::Interface::as_raw(self), guidkey, core::mem::transmute(ppwszvalue), core::mem::transmute(pcchlength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAllocatedString)(windows_core::Interface::as_raw(self), guidkey, ppwszvalue as _, pcchlength as _).ok() } } pub unsafe fn GetBlobSize(&self, guidkey: *const windows_core::GUID) -> windows_core::Result { unsafe { @@ -16797,10 +16797,10 @@ impl IMFAttributes { } } pub unsafe fn GetBlob(&self, guidkey: *const windows_core::GUID, pbuf: &mut [u8], pcbblobsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBlob)(windows_core::Interface::as_raw(self), guidkey, core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap(), core::mem::transmute(pcbblobsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBlob)(windows_core::Interface::as_raw(self), guidkey, core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap(), pcbblobsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetAllocatedBlob(&self, guidkey: *const windows_core::GUID, ppbuf: *mut *mut u8, pcbsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAllocatedBlob)(windows_core::Interface::as_raw(self), guidkey, core::mem::transmute(ppbuf), core::mem::transmute(pcbsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAllocatedBlob)(windows_core::Interface::as_raw(self), guidkey, ppbuf as _, pcbsize as _).ok() } } pub unsafe fn GetUnknown(&self, guidkey: *const windows_core::GUID) -> windows_core::Result where @@ -16860,7 +16860,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<()> { - unsafe { (windows_core::Interface::vtable(self).GetItemByIndex)(windows_core::Interface::as_raw(self), unindex, core::mem::transmute(pguidkey), core::mem::transmute(pvalue.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetItemByIndex)(windows_core::Interface::as_raw(self), unindex, pguidkey as _, pvalue.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CopyAllItems(&self, pdest: P0) -> windows_core::Result<()> where @@ -17578,7 +17578,7 @@ impl IMFByteStream { } } pub unsafe fn Read(&self, pb: &mut [u8], pcbread: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), core::mem::transmute(pb.as_ptr()), pb.len().try_into().unwrap(), core::mem::transmute(pcbread)).ok() } + unsafe { (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), core::mem::transmute(pb.as_ptr()), pb.len().try_into().unwrap(), pcbread as _).ok() } } pub unsafe fn BeginRead(&self, pb: &mut [u8], pcallback: P2, punkstate: P3) -> windows_core::Result<()> where @@ -17928,7 +17928,7 @@ impl core::ops::Deref for IMFByteStreamCacheControl2 { windows_core::imp::interface_hierarchy!(IMFByteStreamCacheControl2, windows_core::IUnknown, IMFByteStreamCacheControl); impl IMFByteStreamCacheControl2 { pub unsafe fn GetByteRanges(&self, pcranges: *mut u32, ppranges: *mut *mut MF_BYTE_STREAM_CACHE_RANGE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetByteRanges)(windows_core::Interface::as_raw(self), core::mem::transmute(pcranges), core::mem::transmute(ppranges)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetByteRanges)(windows_core::Interface::as_raw(self), pcranges as _, ppranges as _).ok() } } pub unsafe fn SetCacheLimit(&self, qwbytes: u64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetCacheLimit)(windows_core::Interface::as_raw(self), qwbytes).ok() } @@ -18002,13 +18002,13 @@ impl IMFByteStreamHandler { P5: windows_core::Param, P6: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).BeginCreateObject)(windows_core::Interface::as_raw(self), pbytestream.param().abi(), pwszurl.param().abi(), dwflags, pprops.param().abi(), core::mem::transmute(ppiunknowncancelcookie.unwrap_or(core::mem::zeroed())), pcallback.param().abi(), punkstate.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).BeginCreateObject)(windows_core::Interface::as_raw(self), pbytestream.param().abi(), pwszurl.param().abi(), dwflags, pprops.param().abi(), ppiunknowncancelcookie.unwrap_or(core::mem::zeroed()) as _, 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 P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EndCreateObject)(windows_core::Interface::as_raw(self), presult.param().abi(), core::mem::transmute(pobjecttype), core::mem::transmute(ppobject)).ok() } + unsafe { (windows_core::Interface::vtable(self).EndCreateObject)(windows_core::Interface::as_raw(self), presult.param().abi(), pobjecttype as _, core::mem::transmute(ppobject)).ok() } } pub unsafe fn CancelObjectCreation(&self, piunknowncancelcookie: P0) -> windows_core::Result<()> where @@ -18137,7 +18137,7 @@ impl IMFByteStreamTimeSeek { unsafe { (windows_core::Interface::vtable(self).TimeSeek)(windows_core::Interface::as_raw(self), qwtimeposition).ok() } } pub unsafe fn GetTimeSeekResult(&self, pqwstarttime: *mut u64, pqwstoptime: *mut u64, pqwduration: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTimeSeekResult)(windows_core::Interface::as_raw(self), core::mem::transmute(pqwstarttime), core::mem::transmute(pqwstoptime), core::mem::transmute(pqwduration)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTimeSeekResult)(windows_core::Interface::as_raw(self), pqwstarttime as _, pqwstoptime as _, pqwduration as _).ok() } } } #[repr(C)] @@ -18275,7 +18275,7 @@ impl IMFCameraControlDefaults { } } 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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).LockControlData)(windows_core::Interface::as_raw(self), control as _, controlsize as _, data.unwrap_or(core::mem::zeroed()) as _, datasize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn UnlockControlData(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UnlockControlData)(windows_core::Interface::as_raw(self)).ok() } @@ -19205,7 +19205,7 @@ impl IMFCapturePreviewSink { unsafe { (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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).UpdateVideo)(windows_core::Interface::as_raw(self), psrc.unwrap_or(core::mem::zeroed()) as _, pdst.unwrap_or(core::mem::zeroed()) as _, pborderclr.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetSampleCallback(&self, dwstreamsinkindex: u32, pcallback: P1) -> windows_core::Result<()> where @@ -19472,17 +19472,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<()> { - unsafe { (windows_core::Interface::vtable(self).GetOutputMediaType)(windows_core::Interface::as_raw(self), dwsinkstreamindex, core::mem::transmute(ppmediatype.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOutputMediaType)(windows_core::Interface::as_raw(self), dwsinkstreamindex, ppmediatype.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetService)(windows_core::Interface::as_raw(self), dwsinkstreamindex, rguidservice, riid, core::mem::transmute(ppunknown.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetService)(windows_core::Interface::as_raw(self), dwsinkstreamindex, rguidservice, riid, ppunknown.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).AddStream)(windows_core::Interface::as_raw(self), dwsourcestreamindex, pmediatype.param().abi(), pattributes.param().abi(), core::mem::transmute(pdwsinkstreamindex.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).AddStream)(windows_core::Interface::as_raw(self), dwsourcestreamindex, pmediatype.param().abi(), pattributes.param().abi(), pdwsinkstreamindex.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Prepare(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Prepare)(windows_core::Interface::as_raw(self)).ok() } @@ -19597,13 +19597,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<()> { - unsafe { (windows_core::Interface::vtable(self).GetCaptureDeviceSource)(windows_core::Interface::as_raw(self), mfcaptureenginedevicetype, core::mem::transmute(ppmediasource.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCaptureDeviceSource)(windows_core::Interface::as_raw(self), mfcaptureenginedevicetype, ppmediasource.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetCaptureDeviceActivate(&self, mfcaptureenginedevicetype: MF_CAPTURE_ENGINE_DEVICE_TYPE, ppactivate: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCaptureDeviceActivate)(windows_core::Interface::as_raw(self), mfcaptureenginedevicetype, core::mem::transmute(ppactivate.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCaptureDeviceActivate)(windows_core::Interface::as_raw(self), mfcaptureenginedevicetype, ppactivate.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetService(&self, rguidservice: *const windows_core::GUID, riid: *const windows_core::GUID, ppunknown: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetService)(windows_core::Interface::as_raw(self), rguidservice, riid, core::mem::transmute(ppunknown.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetService)(windows_core::Interface::as_raw(self), rguidservice, riid, ppunknown.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn AddEffect(&self, dwsourcestreamindex: u32, punknown: P1) -> windows_core::Result<()> where @@ -19621,7 +19621,7 @@ impl IMFCaptureSource { unsafe { (windows_core::Interface::vtable(self).RemoveAllEffects)(windows_core::Interface::as_raw(self), dwsourcestreamindex).ok() } } pub unsafe fn GetAvailableDeviceMediaType(&self, dwsourcestreamindex: u32, dwmediatypeindex: u32, ppmediatype: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAvailableDeviceMediaType)(windows_core::Interface::as_raw(self), dwsourcestreamindex, dwmediatypeindex, core::mem::transmute(ppmediatype.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAvailableDeviceMediaType)(windows_core::Interface::as_raw(self), dwsourcestreamindex, dwmediatypeindex, ppmediatype.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetCurrentDeviceMediaType(&self, dwsourcestreamindex: u32, pmediatype: P1) -> windows_core::Result<()> where @@ -19887,7 +19887,7 @@ impl IMFClock { } } pub unsafe fn GetCorrelatedTime(&self, dwreserved: u32, pllclocktime: *mut i64, phnssystemtime: *mut i64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCorrelatedTime)(windows_core::Interface::as_raw(self), dwreserved, core::mem::transmute(pllclocktime), core::mem::transmute(phnssystemtime)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCorrelatedTime)(windows_core::Interface::as_raw(self), dwreserved, pllclocktime as _, phnssystemtime as _).ok() } } pub unsafe fn GetContinuityKey(&self) -> windows_core::Result { unsafe { @@ -19902,7 +19902,7 @@ impl IMFClock { } } pub unsafe fn GetProperties(&self, pclockproperties: *mut MFCLOCK_PROPERTIES) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(pclockproperties)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), pclockproperties as _).ok() } } } #[repr(C)] @@ -20290,7 +20290,7 @@ impl IMFContentDecryptionModule { } } pub unsafe fn GetProtectionSystemIds(&self, systemids: *mut *mut windows_core::GUID, count: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProtectionSystemIds)(windows_core::Interface::as_raw(self), core::mem::transmute(systemids), core::mem::transmute(count)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProtectionSystemIds)(windows_core::Interface::as_raw(self), systemids as _, count as _).ok() } } } #[repr(C)] @@ -20573,7 +20573,7 @@ impl IMFContentDecryptionModuleSession { } } pub unsafe fn GetKeyStatuses(&self, keystatuses: *mut *mut MFMediaKeyStatus, numkeystatuses: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetKeyStatuses)(windows_core::Interface::as_raw(self), core::mem::transmute(keystatuses), core::mem::transmute(numkeystatuses)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetKeyStatuses)(windows_core::Interface::as_raw(self), keystatuses as _, numkeystatuses as _).ok() } } pub unsafe fn Load(&self, sessionid: P0) -> windows_core::Result where @@ -20804,10 +20804,10 @@ impl IMFContentEnabler { } } pub unsafe fn GetEnableURL(&self, ppwszurl: *mut windows_core::PWSTR, pcchurl: *mut u32, ptruststatus: *mut MF_URL_TRUST_STATUS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEnableURL)(windows_core::Interface::as_raw(self), core::mem::transmute(ppwszurl), core::mem::transmute(pcchurl), core::mem::transmute(ptruststatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEnableURL)(windows_core::Interface::as_raw(self), ppwszurl as _, pcchurl as _, ptruststatus as _).ok() } } pub unsafe fn GetEnableData(&self, ppbdata: *mut *mut u8, pcbdata: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEnableData)(windows_core::Interface::as_raw(self), core::mem::transmute(ppbdata), core::mem::transmute(pcbdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEnableData)(windows_core::Interface::as_raw(self), ppbdata as _, pcbdata as _).ok() } } pub unsafe fn IsAutomaticSupported(&self) -> windows_core::Result { unsafe { @@ -20921,10 +20921,10 @@ windows_core::imp::define_interface!(IMFContentProtectionDevice, IMFContentProte windows_core::imp::interface_hierarchy!(IMFContentProtectionDevice, windows_core::IUnknown); impl IMFContentProtectionDevice { pub unsafe fn InvokeFunction(&self, functionid: u32, inputbuffer: &[u8], outputbufferbytecount: *mut u32, outputbuffer: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).InvokeFunction)(windows_core::Interface::as_raw(self), functionid, inputbuffer.len().try_into().unwrap(), core::mem::transmute(inputbuffer.as_ptr()), core::mem::transmute(outputbufferbytecount), core::mem::transmute(outputbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).InvokeFunction)(windows_core::Interface::as_raw(self), functionid, inputbuffer.len().try_into().unwrap(), core::mem::transmute(inputbuffer.as_ptr()), outputbufferbytecount as _, outputbuffer as _).ok() } } pub unsafe fn GetPrivateDataByteCount(&self, privateinputbytecount: *mut u32, privateoutputbytecount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPrivateDataByteCount)(windows_core::Interface::as_raw(self), core::mem::transmute(privateinputbytecount), core::mem::transmute(privateoutputbytecount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPrivateDataByteCount)(windows_core::Interface::as_raw(self), privateinputbytecount as _, privateoutputbytecount as _).ok() } } } #[repr(C)] @@ -21191,10 +21191,10 @@ windows_core::imp::define_interface!(IMFDRMNetHelper, IMFDRMNetHelper_Vtbl, 0x3d windows_core::imp::interface_hierarchy!(IMFDRMNetHelper, windows_core::IUnknown); impl IMFDRMNetHelper { pub unsafe fn ProcessLicenseRequest(&self, plicenserequest: &[u8], pplicenseresponse: *mut *mut u8, pcblicenseresponse: *mut u32, pbstrkid: *mut windows_core::BSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ProcessLicenseRequest)(windows_core::Interface::as_raw(self), core::mem::transmute(plicenserequest.as_ptr()), plicenserequest.len().try_into().unwrap(), core::mem::transmute(pplicenseresponse), core::mem::transmute(pcblicenseresponse), core::mem::transmute(pbstrkid)).ok() } + unsafe { (windows_core::Interface::vtable(self).ProcessLicenseRequest)(windows_core::Interface::as_raw(self), core::mem::transmute(plicenserequest.as_ptr()), plicenserequest.len().try_into().unwrap(), pplicenseresponse as _, pcblicenseresponse as _, core::mem::transmute(pbstrkid)).ok() } } pub unsafe fn GetChainedLicenseResponse(&self, pplicenseresponse: *mut *mut u8, pcblicenseresponse: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetChainedLicenseResponse)(windows_core::Interface::as_raw(self), core::mem::transmute(pplicenseresponse), core::mem::transmute(pcblicenseresponse)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetChainedLicenseResponse)(windows_core::Interface::as_raw(self), pplicenseresponse as _, pcblicenseresponse as _).ok() } } } #[repr(C)] @@ -21236,7 +21236,7 @@ windows_core::imp::define_interface!(IMFDXGIBuffer, IMFDXGIBuffer_Vtbl, 0xe7174c windows_core::imp::interface_hierarchy!(IMFDXGIBuffer, windows_core::IUnknown); impl IMFDXGIBuffer { pub unsafe fn GetResource(&self, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetResource)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(ppvobject)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetResource)(windows_core::Interface::as_raw(self), riid, ppvobject as _).ok() } } pub unsafe fn GetSubresourceIndex(&self) -> windows_core::Result { unsafe { @@ -21245,7 +21245,7 @@ impl IMFDXGIBuffer { } } pub unsafe fn GetUnknown(&self, guid: *const windows_core::GUID, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetUnknown)(windows_core::Interface::as_raw(self), guid, riid, core::mem::transmute(ppvobject)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUnknown)(windows_core::Interface::as_raw(self), guid, riid, ppvobject as _).ok() } } pub unsafe fn SetUnknown(&self, guid: *const windows_core::GUID, punkdata: P1) -> windows_core::Result<()> where @@ -21320,10 +21320,10 @@ impl IMFDXGIDeviceManager { unsafe { (windows_core::Interface::vtable(self).CloseDeviceHandle)(windows_core::Interface::as_raw(self), hdevice).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetVideoService)(windows_core::Interface::as_raw(self), hdevice, riid, core::mem::transmute(ppservice)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVideoService)(windows_core::Interface::as_raw(self), hdevice, riid, ppservice as _).ok() } } pub unsafe fn LockDevice(&self, hdevice: super::super::Foundation::HANDLE, riid: *const windows_core::GUID, ppunkdevice: *mut *mut core::ffi::c_void, fblock: bool) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).LockDevice)(windows_core::Interface::as_raw(self), hdevice, riid, core::mem::transmute(ppunkdevice), fblock.into()).ok() } + unsafe { (windows_core::Interface::vtable(self).LockDevice)(windows_core::Interface::as_raw(self), hdevice, riid, ppunkdevice as _, fblock.into()).ok() } } pub unsafe fn OpenDeviceHandle(&self) -> windows_core::Result { unsafe { @@ -21473,7 +21473,7 @@ windows_core::imp::define_interface!(IMFDesiredSample, IMFDesiredSample_Vtbl, 0x windows_core::imp::interface_hierarchy!(IMFDesiredSample, windows_core::IUnknown); impl IMFDesiredSample { pub unsafe fn GetDesiredSampleTimeAndDuration(&self, phnssampletime: *mut i64, phnssampleduration: *mut i64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesiredSampleTimeAndDuration)(windows_core::Interface::as_raw(self), core::mem::transmute(phnssampletime), core::mem::transmute(phnssampleduration)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesiredSampleTimeAndDuration)(windows_core::Interface::as_raw(self), phnssampletime as _, phnssampleduration as _).ok() } } pub unsafe fn SetDesiredSampleTimeAndDuration(&self, hnssampletime: i64, hnssampleduration: i64) { unsafe { (windows_core::Interface::vtable(self).SetDesiredSampleTimeAndDuration)(windows_core::Interface::as_raw(self), hnssampletime, hnssampleduration) } @@ -21572,10 +21572,10 @@ impl IMFDeviceTransform { } } pub unsafe fn GetStreamCount(&self, pcinputstreams: *mut u32, pcoutputstreams: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStreamCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pcinputstreams), core::mem::transmute(pcoutputstreams)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStreamCount)(windows_core::Interface::as_raw(self), pcinputstreams as _, pcoutputstreams as _).ok() } } pub unsafe fn GetStreamIDs(&self, dwinputidarraysize: u32, pdwinputstreamids: *mut u32, dwoutputidarraysize: u32, pdwoutputstreamids: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStreamIDs)(windows_core::Interface::as_raw(self), dwinputidarraysize, core::mem::transmute(pdwinputstreamids), dwoutputidarraysize, core::mem::transmute(pdwoutputstreamids)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStreamIDs)(windows_core::Interface::as_raw(self), dwinputidarraysize, pdwinputstreamids as _, dwoutputidarraysize, pdwoutputstreamids as _).ok() } } pub unsafe fn ProcessEvent(&self, dwinputstreamid: u32, pevent: P1) -> windows_core::Result<()> where @@ -21593,7 +21593,7 @@ impl IMFDeviceTransform { unsafe { (windows_core::Interface::vtable(self).ProcessMessage)(windows_core::Interface::as_raw(self), emessage, ulparam).ok() } } pub unsafe fn ProcessOutput(&self, dwflags: u32, coutputbuffercount: u32, poutputsample: *mut MFT_OUTPUT_DATA_BUFFER, pdwstatus: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ProcessOutput)(windows_core::Interface::as_raw(self), dwflags, coutputbuffercount, core::mem::transmute(poutputsample), core::mem::transmute(pdwstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).ProcessOutput)(windows_core::Interface::as_raw(self), dwflags, coutputbuffercount, core::mem::transmute(poutputsample), pdwstatus as _).ok() } } pub unsafe fn SetInputStreamState(&self, dwstreamid: u32, pmediatype: P1, value: DeviceStreamState, dwflags: u32) -> windows_core::Result<()> where @@ -21620,7 +21620,7 @@ impl IMFDeviceTransform { } } pub unsafe fn GetInputStreamPreferredState(&self, dwstreamid: u32, value: *mut DeviceStreamState, ppmediatype: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInputStreamPreferredState)(windows_core::Interface::as_raw(self), dwstreamid, core::mem::transmute(value), core::mem::transmute(ppmediatype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInputStreamPreferredState)(windows_core::Interface::as_raw(self), dwstreamid, value as _, core::mem::transmute(ppmediatype)).ok() } } pub unsafe fn FlushInputStream(&self, dwstreamindex: u32, dwflags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).FlushInputStream)(windows_core::Interface::as_raw(self), dwstreamindex, dwflags).ok() } @@ -21920,7 +21920,7 @@ impl IMFExtendedCameraControl { unsafe { (windows_core::Interface::vtable(self).GetFlags)(windows_core::Interface::as_raw(self)) } } pub unsafe fn LockPayload(&self, pppayload: *mut *mut u8, pulpayload: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).LockPayload)(windows_core::Interface::as_raw(self), core::mem::transmute(pppayload), core::mem::transmute(pulpayload)).ok() } + unsafe { (windows_core::Interface::vtable(self).LockPayload)(windows_core::Interface::as_raw(self), pppayload as _, pulpayload as _).ok() } } pub unsafe fn UnlockPayload(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UnlockPayload)(windows_core::Interface::as_raw(self)).ok() } @@ -22043,7 +22043,7 @@ windows_core::imp::define_interface!(IMFExtendedCameraIntrinsicModel, IMFExtende windows_core::imp::interface_hierarchy!(IMFExtendedCameraIntrinsicModel, windows_core::IUnknown); impl IMFExtendedCameraIntrinsicModel { pub unsafe fn GetModel(&self, pintrinsicmodel: *mut MFExtendedCameraIntrinsic_IntrinsicModel) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetModel)(windows_core::Interface::as_raw(self), core::mem::transmute(pintrinsicmodel)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModel)(windows_core::Interface::as_raw(self), pintrinsicmodel as _).ok() } } pub unsafe fn SetModel(&self, pintrinsicmodel: *const MFExtendedCameraIntrinsic_IntrinsicModel) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetModel)(windows_core::Interface::as_raw(self), pintrinsicmodel).ok() } @@ -22118,7 +22118,7 @@ impl IMFExtendedCameraIntrinsics { } } pub unsafe fn SerializeToBuffer(&self, pbbuffer: *mut u8, pdwbuffersize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SerializeToBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(pbbuffer), core::mem::transmute(pdwbuffersize)).ok() } + unsafe { (windows_core::Interface::vtable(self).SerializeToBuffer)(windows_core::Interface::as_raw(self), pbbuffer as _, pdwbuffersize as _).ok() } } pub unsafe fn GetIntrinsicModelCount(&self) -> windows_core::Result { unsafe { @@ -22232,7 +22232,7 @@ windows_core::imp::define_interface!(IMFExtendedCameraIntrinsicsDistortionModel6 windows_core::imp::interface_hierarchy!(IMFExtendedCameraIntrinsicsDistortionModel6KT, windows_core::IUnknown); impl IMFExtendedCameraIntrinsicsDistortionModel6KT { pub unsafe fn GetDistortionModel(&self, pdistortionmodel: *mut MFCameraIntrinsic_DistortionModel6KT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDistortionModel)(windows_core::Interface::as_raw(self), core::mem::transmute(pdistortionmodel)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDistortionModel)(windows_core::Interface::as_raw(self), pdistortionmodel as _).ok() } } pub unsafe fn SetDistortionModel(&self, pdistortionmodel: *const MFCameraIntrinsic_DistortionModel6KT) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetDistortionModel)(windows_core::Interface::as_raw(self), pdistortionmodel).ok() } @@ -22277,7 +22277,7 @@ windows_core::imp::define_interface!(IMFExtendedCameraIntrinsicsDistortionModelA windows_core::imp::interface_hierarchy!(IMFExtendedCameraIntrinsicsDistortionModelArcTan, windows_core::IUnknown); impl IMFExtendedCameraIntrinsicsDistortionModelArcTan { pub unsafe fn GetDistortionModel(&self, pdistortionmodel: *mut MFCameraIntrinsic_DistortionModelArcTan) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDistortionModel)(windows_core::Interface::as_raw(self), core::mem::transmute(pdistortionmodel)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDistortionModel)(windows_core::Interface::as_raw(self), pdistortionmodel as _).ok() } } pub unsafe fn SetDistortionModel(&self, pdistortionmodel: *const MFCameraIntrinsic_DistortionModelArcTan) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetDistortionModel)(windows_core::Interface::as_raw(self), pdistortionmodel).ok() } @@ -22486,7 +22486,7 @@ windows_core::imp::define_interface!(IMFHDCPStatus, IMFHDCPStatus_Vtbl, 0xde400f windows_core::imp::interface_hierarchy!(IMFHDCPStatus, windows_core::IUnknown); impl IMFHDCPStatus { pub unsafe fn Query(&self, pstatus: *mut MF_HDCP_STATUS, pfstatus: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Query)(windows_core::Interface::as_raw(self), core::mem::transmute(pstatus), core::mem::transmute(pfstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).Query)(windows_core::Interface::as_raw(self), pstatus as _, pfstatus as _).ok() } } pub unsafe fn Set(&self, status: MF_HDCP_STATUS) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Set)(windows_core::Interface::as_raw(self), status).ok() } @@ -22569,7 +22569,7 @@ impl IMFHttpDownloadRequest { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EndReadPayload)(windows_core::Interface::as_raw(self), presult.param().abi(), core::mem::transmute(pqwoffset), core::mem::transmute(pcbread)).ok() } + unsafe { (windows_core::Interface::vtable(self).EndReadPayload)(windows_core::Interface::as_raw(self), presult.param().abi(), pqwoffset as _, pcbread as _).ok() } } pub unsafe fn QueryHeader(&self, szheadername: P0, dwindex: u32) -> windows_core::Result where @@ -22593,7 +22593,7 @@ impl IMFHttpDownloadRequest { } } pub unsafe fn GetTimeSeekResult(&self, pqwstarttime: *mut u64, pqwstoptime: *mut u64, pqwduration: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTimeSeekResult)(windows_core::Interface::as_raw(self), core::mem::transmute(pqwstarttime), core::mem::transmute(pqwstoptime), core::mem::transmute(pqwduration)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTimeSeekResult)(windows_core::Interface::as_raw(self), pqwstarttime as _, pqwstoptime as _, pqwduration as _).ok() } } pub unsafe fn GetHttpStatus(&self) -> windows_core::Result { unsafe { @@ -23045,7 +23045,7 @@ windows_core::imp::define_interface!(IMFInputTrustAuthority, IMFInputTrustAuthor windows_core::imp::interface_hierarchy!(IMFInputTrustAuthority, windows_core::IUnknown); impl IMFInputTrustAuthority { pub unsafe fn GetDecrypter(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDecrypter)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(ppv)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDecrypter)(windows_core::Interface::as_raw(self), riid, ppv as _).ok() } } pub unsafe fn RequestAccess(&self, action: MFPOLICYMANAGER_ACTION) -> windows_core::Result { unsafe { @@ -23186,7 +23186,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), ppbbuffer as _, pcbmaxlength.unwrap_or(core::mem::zeroed()) as _, pcbcurrentlength.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Unlock(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Unlock)(windows_core::Interface::as_raw(self)).ok() } @@ -23417,10 +23417,10 @@ impl IMFMediaEngine { unsafe { (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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetNativeVideoSize)(windows_core::Interface::as_raw(self), cx.unwrap_or(core::mem::zeroed()) as _, cy.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetVideoAspectRatio(&self, cx: Option<*mut u32>, cy: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetVideoAspectRatio)(windows_core::Interface::as_raw(self), cx.unwrap_or(core::mem::zeroed()) as _, cy.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Shutdown(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Shutdown)(windows_core::Interface::as_raw(self)).ok() } @@ -23429,7 +23429,7 @@ impl IMFMediaEngine { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).TransferVideoFrame)(windows_core::Interface::as_raw(self), pdstsurf.param().abi(), core::mem::transmute(psrc.unwrap_or(core::mem::zeroed())), pdst, core::mem::transmute(pborderclr.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).TransferVideoFrame)(windows_core::Interface::as_raw(self), pdstsurf.param().abi(), psrc.unwrap_or(core::mem::zeroed()) as _, pdst, pborderclr.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OnVideoStreamTick(&self) -> windows_core::Result { unsafe { @@ -24111,7 +24111,7 @@ impl IMFMediaEngineClassFactory4 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateContentDecryptionModuleFactory)(windows_core::Interface::as_raw(self), keysystem.param().abi(), riid, core::mem::transmute(ppvobject)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateContentDecryptionModuleFactory)(windows_core::Interface::as_raw(self), keysystem.param().abi(), riid, ppvobject as _).ok() } } } #[repr(C)] @@ -24354,7 +24354,7 @@ impl IMFMediaEngineEx { } } pub unsafe fn UpdateVideoStream(&self, psrc: Option<*const MFVideoNormalizedRect>, pdst: Option<*const super::super::Foundation::RECT>, pborderclr: Option<*const MFARGB>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).UpdateVideoStream)(windows_core::Interface::as_raw(self), psrc.unwrap_or(core::mem::zeroed()) as _, pdst.unwrap_or(core::mem::zeroed()) as _, pborderclr.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetBalance(&self) -> f64 { unsafe { (windows_core::Interface::vtable(self).GetBalance)(windows_core::Interface::as_raw(self)) } @@ -25114,7 +25114,7 @@ windows_core::imp::define_interface!(IMFMediaEngineOPMInfo, IMFMediaEngineOPMInf windows_core::imp::interface_hierarchy!(IMFMediaEngineOPMInfo, windows_core::IUnknown); impl IMFMediaEngineOPMInfo { pub unsafe fn GetOPMInfo(&self, pstatus: *mut MF_MEDIA_ENGINE_OPM_STATUS, pconstricted: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOPMInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pstatus), core::mem::transmute(pconstricted)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOPMInfo)(windows_core::Interface::as_raw(self), pstatus as _, pconstricted as _).ok() } } } #[repr(C)] @@ -25164,7 +25164,7 @@ impl IMFMediaEngineProtectedContent { { unsafe { 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::mem::zeroed())), pdst, core::mem::transmute(pborderclr.unwrap_or(core::mem::zeroed())), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).TransferVideoFrame)(windows_core::Interface::as_raw(self), pdstsurf.param().abi(), psrc.unwrap_or(core::mem::zeroed()) as _, pdst, pborderclr.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| result__) } } pub unsafe fn SetContentProtectionManager(&self, pcpm: P0) -> windows_core::Result<()> @@ -26045,7 +26045,7 @@ windows_core::imp::define_interface!(IMFMediaKeySession, IMFMediaKeySession_Vtbl windows_core::imp::interface_hierarchy!(IMFMediaKeySession, windows_core::IUnknown); impl IMFMediaKeySession { pub unsafe fn GetError(&self, code: *mut u16, systemcode: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetError)(windows_core::Interface::as_raw(self), core::mem::transmute(code), core::mem::transmute(systemcode)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetError)(windows_core::Interface::as_raw(self), code as _, systemcode as _).ok() } } pub unsafe fn KeySystem(&self) -> windows_core::Result { unsafe { @@ -26150,7 +26150,7 @@ impl core::ops::Deref for IMFMediaKeySession2 { windows_core::imp::interface_hierarchy!(IMFMediaKeySession2, windows_core::IUnknown, IMFMediaKeySession); impl IMFMediaKeySession2 { pub unsafe fn get_KeyStatuses(&self, pkeystatusesarray: *mut *mut MFMediaKeyStatus, pusize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_KeyStatuses)(windows_core::Interface::as_raw(self), core::mem::transmute(pkeystatusesarray), core::mem::transmute(pusize)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_KeyStatuses)(windows_core::Interface::as_raw(self), pkeystatusesarray as _, pusize as _).ok() } } pub unsafe fn Load(&self, bstrsessionid: &windows_core::BSTR) -> windows_core::Result { unsafe { @@ -28041,7 +28041,7 @@ impl IMFMediaType { } } pub unsafe fn GetRepresentation(&self, guidrepresentation: windows_core::GUID, ppvrepresentation: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRepresentation)(windows_core::Interface::as_raw(self), core::mem::transmute(guidrepresentation), core::mem::transmute(ppvrepresentation)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRepresentation)(windows_core::Interface::as_raw(self), core::mem::transmute(guidrepresentation), ppvrepresentation as _).ok() } } pub unsafe fn FreeRepresentation(&self, guidrepresentation: windows_core::GUID, pvrepresentation: *const core::ffi::c_void) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).FreeRepresentation)(windows_core::Interface::as_raw(self), core::mem::transmute(guidrepresentation), pvrepresentation).ok() } @@ -28137,7 +28137,7 @@ impl IMFMediaTypeHandler { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).IsMediaTypeSupported)(windows_core::Interface::as_raw(self), pmediatype.param().abi(), ppmediatype.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetMediaTypeCount(&self) -> windows_core::Result { unsafe { @@ -28756,10 +28756,10 @@ impl IMFNetCredential { unsafe { (windows_core::Interface::vtable(self).SetPassword)(windows_core::Interface::as_raw(self), core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), fdataisencrypted.into()).ok() } } pub unsafe fn GetUser(&self, pbdata: Option<*mut u8>, pcbdata: *mut u32, fencryptdata: bool) -> windows_core::Result<()> { - unsafe { (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.into()).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUser)(windows_core::Interface::as_raw(self), pbdata.unwrap_or(core::mem::zeroed()) as _, pcbdata as _, fencryptdata.into()).ok() } } pub unsafe fn GetPassword(&self, pbdata: Option<*mut u8>, pcbdata: *mut u32, fencryptdata: bool) -> windows_core::Result<()> { - unsafe { (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.into()).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPassword)(windows_core::Interface::as_raw(self), pbdata.unwrap_or(core::mem::zeroed()) as _, pcbdata as _, fencryptdata.into()).ok() } } pub unsafe fn LoggedOnUser(&self) -> windows_core::Result { unsafe { @@ -28844,7 +28844,7 @@ impl IMFNetCredentialCache { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetCredential)(windows_core::Interface::as_raw(self), pszurl.param().abi(), pszrealm.param().abi(), dwauthenticationflags, core::mem::transmute(ppcred), core::mem::transmute(pdwrequirementsflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCredential)(windows_core::Interface::as_raw(self), pszurl.param().abi(), pszrealm.param().abi(), dwauthenticationflags, core::mem::transmute(ppcred), pdwrequirementsflags as _).ok() } } pub unsafe fn SetGood(&self, pcred: P0, fgood: bool) -> windows_core::Result<()> where @@ -29083,7 +29083,7 @@ impl IMFNetProxyLocator { unsafe { (windows_core::Interface::vtable(self).RegisterProxyResult)(windows_core::Interface::as_raw(self), hrop).ok() } } pub unsafe fn GetCurrentProxy(&self, pszstr: Option, pcchstr: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentProxy)(windows_core::Interface::as_raw(self), pszstr.unwrap_or(core::mem::zeroed()) as _, pcchstr as _).ok() } } pub unsafe fn Clone(&self) -> windows_core::Result { unsafe { @@ -29347,7 +29347,7 @@ impl IMFObjectReferenceStream { unsafe { (windows_core::Interface::vtable(self).SaveReference)(windows_core::Interface::as_raw(self), riid, punk.param().abi()).ok() } } pub unsafe fn LoadReference(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).LoadReference)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(ppv)).ok() } + unsafe { (windows_core::Interface::vtable(self).LoadReference)(windows_core::Interface::as_raw(self), riid, ppv as _).ok() } } } #[repr(C)] @@ -29581,7 +29581,7 @@ impl IMFOutputTrustAuthority { } } pub unsafe fn SetPolicy(&self, pppolicy: Option<&[Option]>, ppbticket: Option<*mut *mut u8>, pcbticket: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), ppbticket.unwrap_or(core::mem::zeroed()) as _, pcbticket.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -29923,17 +29923,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetStartStopPosition)(windows_core::Interface::as_raw(self), pguidstartpositiontype.unwrap_or(core::mem::zeroed()) as _, pvstartvalue.unwrap_or(core::mem::zeroed()) as _, pguidstoppositiontype.unwrap_or(core::mem::zeroed()) as _, pvstopvalue.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).SetStartStopPosition)(windows_core::Interface::as_raw(self), pguidstartpositiontype.unwrap_or(core::mem::zeroed()) as _, pvstartvalue.unwrap_or(core::mem::zeroed()) as _, pguidstoppositiontype.unwrap_or(core::mem::zeroed()) as _, pvstopvalue.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn HasVideo(&self, pfhasvideo: Option<*mut super::super::Foundation::BOOL>, pfselected: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).HasVideo)(windows_core::Interface::as_raw(self), pfhasvideo.unwrap_or(core::mem::zeroed()) as _, pfselected.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn HasAudio(&self, pfhasaudio: Option<*mut super::super::Foundation::BOOL>, pfselected: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).HasAudio)(windows_core::Interface::as_raw(self), pfhasaudio.unwrap_or(core::mem::zeroed()) as _, pfselected.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn IsProtected(&self) -> windows_core::Result { unsafe { @@ -30321,7 +30321,7 @@ impl IMFPMediaPlayer { } } pub unsafe fn GetSupportedRates(&self, fforwarddirection: bool, pflslowestrate: *mut f32, pflfastestrate: *mut f32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSupportedRates)(windows_core::Interface::as_raw(self), fforwarddirection.into(), core::mem::transmute(pflslowestrate), core::mem::transmute(pflfastestrate)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSupportedRates)(windows_core::Interface::as_raw(self), fforwarddirection.into(), pflslowestrate as _, pflfastestrate as _).ok() } } pub unsafe fn GetState(&self) -> windows_core::Result { unsafe { @@ -30333,13 +30333,13 @@ impl IMFPMediaPlayer { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateMediaItemFromURL)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), fsync.into(), dwuserdata, core::mem::transmute(ppmediaitem.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateMediaItemFromURL)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), fsync.into(), dwuserdata, ppmediaitem.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CreateMediaItemFromObject(&self, piunknownobj: P0, fsync: bool, dwuserdata: usize, ppmediaitem: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateMediaItemFromObject)(windows_core::Interface::as_raw(self), piunknownobj.param().abi(), fsync.into(), dwuserdata, core::mem::transmute(ppmediaitem.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateMediaItemFromObject)(windows_core::Interface::as_raw(self), piunknownobj.param().abi(), fsync.into(), dwuserdata, ppmediaitem.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetMediaItem(&self, pimfpmediaitem: P0) -> windows_core::Result<()> where @@ -30384,10 +30384,10 @@ impl IMFPMediaPlayer { unsafe { (windows_core::Interface::vtable(self).SetMute)(windows_core::Interface::as_raw(self), fmute.into()).ok() } } pub unsafe fn GetNativeVideoSize(&self, pszvideo: Option<*mut super::super::Foundation::SIZE>, pszarvideo: Option<*mut super::super::Foundation::SIZE>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetNativeVideoSize)(windows_core::Interface::as_raw(self), pszvideo.unwrap_or(core::mem::zeroed()) as _, pszarvideo.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetIdealVideoSize(&self, pszmin: Option<*mut super::super::Foundation::SIZE>, pszmax: Option<*mut super::super::Foundation::SIZE>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetIdealVideoSize)(windows_core::Interface::as_raw(self), pszmin.unwrap_or(core::mem::zeroed()) as _, pszmax.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetVideoSourceRect(&self, pnrcsource: *const MFVideoNormalizedRect) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetVideoSourceRect)(windows_core::Interface::as_raw(self), pnrcsource).ok() } @@ -30919,13 +30919,13 @@ impl IMFPluginControl { } } pub unsafe fn GetPreferredClsidByIndex(&self, plugintype: u32, index: u32, selector: *mut windows_core::PWSTR, clsid: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPreferredClsidByIndex)(windows_core::Interface::as_raw(self), plugintype, index, core::mem::transmute(selector), core::mem::transmute(clsid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPreferredClsidByIndex)(windows_core::Interface::as_raw(self), plugintype, index, selector as _, clsid as _).ok() } } pub unsafe fn SetPreferredClsid(&self, plugintype: u32, selector: P1, clsid: Option<*const windows_core::GUID>) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SetPreferredClsid)(windows_core::Interface::as_raw(self), plugintype, selector.param().abi(), core::mem::transmute(clsid.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetPreferredClsid)(windows_core::Interface::as_raw(self), plugintype, selector.param().abi(), clsid.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn IsDisabled(&self, plugintype: u32, clsid: *const windows_core::GUID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).IsDisabled)(windows_core::Interface::as_raw(self), plugintype, clsid).ok() } @@ -31225,7 +31225,7 @@ impl IMFPresentationDescriptor { } } pub unsafe fn GetStreamDescriptorByIndex(&self, dwindex: u32, pfselected: *mut super::super::Foundation::BOOL, ppdescriptor: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStreamDescriptorByIndex)(windows_core::Interface::as_raw(self), dwindex, core::mem::transmute(pfselected), core::mem::transmute(ppdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStreamDescriptorByIndex)(windows_core::Interface::as_raw(self), dwindex, pfselected as _, core::mem::transmute(ppdescriptor)).ok() } } pub unsafe fn SelectStream(&self, dwdescriptorindex: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SelectStream)(windows_core::Interface::as_raw(self), dwdescriptorindex).ok() } @@ -31369,7 +31369,7 @@ impl IMFProtectedEnvironmentAccess { unsafe { (windows_core::Interface::vtable(self).Call)(windows_core::Interface::as_raw(self), input.len().try_into().unwrap(), core::mem::transmute(input.as_ptr()), output.len().try_into().unwrap(), core::mem::transmute(output.as_ptr())).ok() } } pub unsafe fn ReadGRL(&self, outputlength: *mut u32, output: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadGRL)(windows_core::Interface::as_raw(self), core::mem::transmute(outputlength), core::mem::transmute(output)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadGRL)(windows_core::Interface::as_raw(self), outputlength as _, output as _).ok() } } } #[repr(C)] @@ -31731,7 +31731,7 @@ impl IMFRateControl { unsafe { (windows_core::Interface::vtable(self).SetRate)(windows_core::Interface::as_raw(self), fthin.into(), flrate).ok() } } pub unsafe fn GetRate(&self, pfthin: *mut super::super::Foundation::BOOL, pflrate: *mut f32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRate)(windows_core::Interface::as_raw(self), core::mem::transmute(pfthin), core::mem::transmute(pflrate)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRate)(windows_core::Interface::as_raw(self), pfthin as _, pflrate as _).ok() } } } #[repr(C)] @@ -31781,7 +31781,7 @@ impl IMFRateSupport { } } pub unsafe fn IsRateSupported(&self, fthin: bool, flrate: f32, pflnearestsupportedrate: *mut f32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsRateSupported)(windows_core::Interface::as_raw(self), fthin.into(), flrate, core::mem::transmute(pflnearestsupportedrate)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsRateSupported)(windows_core::Interface::as_raw(self), fthin.into(), flrate, pflnearestsupportedrate as _).ok() } } } #[repr(C)] @@ -31964,7 +31964,7 @@ impl IMFRealTimeClientEx { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).RegisterThreadsEx)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwtaskindex), wszclassname.param().abi(), lbasepriority).ok() } + unsafe { (windows_core::Interface::vtable(self).RegisterThreadsEx)(windows_core::Interface::as_raw(self), pdwtaskindex as _, wszclassname.param().abi(), lbasepriority).ok() } } pub unsafe fn UnregisterThreads(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UnregisterThreads)(windows_core::Interface::as_raw(self)).ok() } @@ -32214,10 +32214,10 @@ windows_core::imp::define_interface!(IMFRemoteProxy, IMFRemoteProxy_Vtbl, 0x994e windows_core::imp::interface_hierarchy!(IMFRemoteProxy, windows_core::IUnknown); impl IMFRemoteProxy { pub unsafe fn GetRemoteObject(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRemoteObject)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(ppv)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRemoteObject)(windows_core::Interface::as_raw(self), riid, ppv as _).ok() } } pub unsafe fn GetRemoteHost(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRemoteHost)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(ppv)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRemoteHost)(windows_core::Interface::as_raw(self), riid, ppv as _).ok() } } } #[repr(C)] @@ -32368,7 +32368,7 @@ impl IMFSSLCertificateManager { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetClientCertificate)(windows_core::Interface::as_raw(self), pszurl.param().abi(), core::mem::transmute(ppbdata), core::mem::transmute(pcbdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClientCertificate)(windows_core::Interface::as_raw(self), pszurl.param().abi(), ppbdata as _, pcbdata as _).ok() } } pub unsafe fn BeginGetClientCertificate(&self, pszurl: P0, pcallback: P1, pstate: P2) -> windows_core::Result<()> where @@ -32382,13 +32382,13 @@ impl IMFSSLCertificateManager { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EndGetClientCertificate)(windows_core::Interface::as_raw(self), presult.param().abi(), core::mem::transmute(ppbdata), core::mem::transmute(pcbdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).EndGetClientCertificate)(windows_core::Interface::as_raw(self), presult.param().abi(), ppbdata as _, pcbdata as _).ok() } } pub unsafe fn GetCertificatePolicy(&self, pszurl: P0, pfoverrideautomaticcheck: *mut super::super::Foundation::BOOL, pfclientcertificateavailable: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetCertificatePolicy)(windows_core::Interface::as_raw(self), pszurl.param().abi(), core::mem::transmute(pfoverrideautomaticcheck), core::mem::transmute(pfclientcertificateavailable)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCertificatePolicy)(windows_core::Interface::as_raw(self), pszurl.param().abi(), pfoverrideautomaticcheck as _, pfclientcertificateavailable as _).ok() } } pub unsafe fn OnServerCertificate(&self, pszurl: P0, pbdata: &[u8]) -> windows_core::Result where @@ -32745,7 +32745,7 @@ impl IMFSampleAllocatorControl { unsafe { (windows_core::Interface::vtable(self).SetDefaultAllocator)(windows_core::Interface::as_raw(self), dwoutputstreamid, pallocator.param().abi()).ok() } } pub unsafe fn GetAllocatorUsage(&self, dwoutputstreamid: u32, pdwinputstreamid: *mut u32, peusage: *mut MFSampleAllocatorUsage) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAllocatorUsage)(windows_core::Interface::as_raw(self), dwoutputstreamid, core::mem::transmute(pdwinputstreamid), core::mem::transmute(peusage)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAllocatorUsage)(windows_core::Interface::as_raw(self), dwoutputstreamid, pdwinputstreamid as _, peusage as _).ok() } } } #[repr(C)] @@ -32969,10 +32969,10 @@ impl IMFSampleProtection { } } pub unsafe fn GetProtectionCertificate(&self, dwversion: u32, ppcert: *mut *mut u8, pcbcert: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProtectionCertificate)(windows_core::Interface::as_raw(self), dwversion, core::mem::transmute(ppcert), core::mem::transmute(pcbcert)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProtectionCertificate)(windows_core::Interface::as_raw(self), dwversion, ppcert as _, pcbcert as _).ok() } } pub unsafe fn InitOutputProtection(&self, dwversion: u32, dwoutputid: u32, pbcert: *const u8, cbcert: u32, ppbseed: *mut *mut u8, pcbseed: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).InitOutputProtection)(windows_core::Interface::as_raw(self), dwversion, dwoutputid, pbcert, cbcert, core::mem::transmute(ppbseed), core::mem::transmute(pcbseed)).ok() } + unsafe { (windows_core::Interface::vtable(self).InitOutputProtection)(windows_core::Interface::as_raw(self), dwversion, dwoutputid, pbcert, cbcert, ppbseed as _, pcbseed as _).ok() } } pub unsafe fn InitInputProtection(&self, dwversion: u32, dwinputid: u32, pbseed: *const u8, cbseed: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).InitInputProtection)(windows_core::Interface::as_raw(self), dwversion, dwinputid, pbseed, cbseed).ok() } @@ -33149,13 +33149,13 @@ impl IMFSchemeHandler { P4: windows_core::Param, P5: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).BeginCreateObject)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), dwflags, pprops.param().abi(), core::mem::transmute(ppiunknowncancelcookie.unwrap_or(core::mem::zeroed())), pcallback.param().abi(), punkstate.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).BeginCreateObject)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), dwflags, pprops.param().abi(), ppiunknowncancelcookie.unwrap_or(core::mem::zeroed()) as _, 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 P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EndCreateObject)(windows_core::Interface::as_raw(self), presult.param().abi(), core::mem::transmute(pobjecttype), core::mem::transmute(ppobject)).ok() } + unsafe { (windows_core::Interface::vtable(self).EndCreateObject)(windows_core::Interface::as_raw(self), presult.param().abi(), pobjecttype as _, core::mem::transmute(ppobject)).ok() } } pub unsafe fn CancelObjectCreation(&self, piunknowncancelcookie: P0) -> windows_core::Result<()> where @@ -33257,7 +33257,7 @@ windows_core::imp::define_interface!(IMFSecureChannel, IMFSecureChannel_Vtbl, 0x windows_core::imp::interface_hierarchy!(IMFSecureChannel, windows_core::IUnknown); impl IMFSecureChannel { pub unsafe fn GetCertificate(&self, ppcert: *mut *mut u8, pcbcert: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCertificate)(windows_core::Interface::as_raw(self), core::mem::transmute(ppcert), core::mem::transmute(pcbcert)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCertificate)(windows_core::Interface::as_raw(self), ppcert as _, pcbcert as _).ok() } } pub unsafe fn SetupSession(&self, pbencryptedsessionkey: &[u8]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetupSession)(windows_core::Interface::as_raw(self), core::mem::transmute(pbencryptedsessionkey.as_ptr()), pbencryptedsessionkey.len().try_into().unwrap()).ok() } @@ -33500,10 +33500,10 @@ windows_core::imp::define_interface!(IMFSensorActivityReport, IMFSensorActivityR windows_core::imp::interface_hierarchy!(IMFSensorActivityReport, windows_core::IUnknown); impl IMFSensorActivityReport { pub unsafe fn GetFriendlyName(&self, friendlyname: &mut [u16], pcchwritten: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFriendlyName)(windows_core::Interface::as_raw(self), core::mem::transmute(friendlyname.as_ptr()), friendlyname.len().try_into().unwrap(), core::mem::transmute(pcchwritten)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFriendlyName)(windows_core::Interface::as_raw(self), core::mem::transmute(friendlyname.as_ptr()), friendlyname.len().try_into().unwrap(), pcchwritten as _).ok() } } pub unsafe fn GetSymbolicLink(&self, symboliclink: &mut [u16], pcchwritten: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSymbolicLink)(windows_core::Interface::as_raw(self), core::mem::transmute(symboliclink.as_ptr()), symboliclink.len().try_into().unwrap(), core::mem::transmute(pcchwritten)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolicLink)(windows_core::Interface::as_raw(self), core::mem::transmute(symboliclink.as_ptr()), symboliclink.len().try_into().unwrap(), pcchwritten as _).ok() } } pub unsafe fn GetProcessCount(&self) -> windows_core::Result { unsafe { @@ -33605,7 +33605,7 @@ impl IMFSensorDevice { } } pub unsafe fn GetSymbolicLink(&self, symboliclink: &mut [u16], pcchwritten: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSymbolicLink)(windows_core::Interface::as_raw(self), core::mem::transmute(symboliclink.as_ptr()), symboliclink.len().try_into().unwrap(), core::mem::transmute(pcchwritten)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolicLink)(windows_core::Interface::as_raw(self), core::mem::transmute(symboliclink.as_ptr()), symboliclink.len().try_into().unwrap(), pcchwritten as _).ok() } } pub unsafe fn GetDeviceAttributes(&self) -> windows_core::Result { unsafe { @@ -33779,7 +33779,7 @@ windows_core::imp::define_interface!(IMFSensorGroup, IMFSensorGroup_Vtbl, 0x4110 windows_core::imp::interface_hierarchy!(IMFSensorGroup, windows_core::IUnknown); impl IMFSensorGroup { pub unsafe fn GetSymbolicLink(&self, symboliclink: &mut [u16], pcchwritten: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSymbolicLink)(windows_core::Interface::as_raw(self), core::mem::transmute(symboliclink.as_ptr()), symboliclink.len().try_into().unwrap(), core::mem::transmute(pcchwritten)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolicLink)(windows_core::Interface::as_raw(self), core::mem::transmute(symboliclink.as_ptr()), symboliclink.len().try_into().unwrap(), pcchwritten as _).ok() } } pub unsafe fn GetFlags(&self) -> windows_core::Result { unsafe { @@ -34055,7 +34055,7 @@ windows_core::imp::define_interface!(IMFSensorProfile, IMFSensorProfile_Vtbl, 0x windows_core::imp::interface_hierarchy!(IMFSensorProfile, windows_core::IUnknown); impl IMFSensorProfile { pub unsafe fn GetProfileId(&self, pid: *mut SENSORPROFILEID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProfileId)(windows_core::Interface::as_raw(self), core::mem::transmute(pid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProfileId)(windows_core::Interface::as_raw(self), pid as _).ok() } } pub unsafe fn AddProfileFilter(&self, streamid: u32, wzfiltersetstring: P1) -> windows_core::Result<()> where @@ -34368,7 +34368,7 @@ impl IMFSensorTransformFactory { } } pub unsafe fn GetTransformInformation(&self, transformindex: u32, pguidtransformid: *mut windows_core::GUID, ppattributes: *mut Option, ppstreaminformation: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTransformInformation)(windows_core::Interface::as_raw(self), transformindex, core::mem::transmute(pguidtransformid), core::mem::transmute(ppattributes), core::mem::transmute(ppstreaminformation)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTransformInformation)(windows_core::Interface::as_raw(self), transformindex, pguidtransformid as _, core::mem::transmute(ppattributes), core::mem::transmute(ppstreaminformation)).ok() } } pub unsafe fn CreateTransform(&self, guidsensortransformid: *const windows_core::GUID, pattributes: P1) -> windows_core::Result where @@ -34479,7 +34479,7 @@ impl IMFSequencerSource { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetPresentationContext)(windows_core::Interface::as_raw(self), ppd.param().abi(), pid.unwrap_or(core::mem::zeroed()) as _, pptopology.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn UpdateTopology(&self, dwid: u32, ptopology: P1) -> windows_core::Result<()> where @@ -34662,7 +34662,7 @@ impl IMFSignedLibrary { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetProcedureAddress)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(address)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProcedureAddress)(windows_core::Interface::as_raw(self), name.param().abi(), address as _).ok() } } } #[repr(C)] @@ -34819,10 +34819,10 @@ impl IMFSinkWriter { unsafe { (windows_core::Interface::vtable(self).Finalize)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetServiceForStream(&self, dwstreamindex: u32, guidservice: *const windows_core::GUID, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetServiceForStream)(windows_core::Interface::as_raw(self), dwstreamindex, guidservice, riid, core::mem::transmute(ppvobject)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetServiceForStream)(windows_core::Interface::as_raw(self), dwstreamindex, guidservice, riid, ppvobject as _).ok() } } pub unsafe fn GetStatistics(&self, dwstreamindex: u32, pstats: *mut MF_SINK_WRITER_STATISTICS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStatistics)(windows_core::Interface::as_raw(self), dwstreamindex, core::mem::transmute(pstats)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStatistics)(windows_core::Interface::as_raw(self), dwstreamindex, pstats as _).ok() } } } #[repr(C)] @@ -35105,7 +35105,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<()> { - unsafe { (windows_core::Interface::vtable(self).GetTransformForStream)(windows_core::Interface::as_raw(self), dwstreamindex, dwtransformindex, core::mem::transmute(pguidcategory.unwrap_or(core::mem::zeroed())), core::mem::transmute(pptransform)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTransformForStream)(windows_core::Interface::as_raw(self), dwstreamindex, dwtransformindex, pguidcategory.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pptransform)).ok() } } } #[repr(C)] @@ -35168,7 +35168,7 @@ impl IMFSourceBuffer { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).AppendByteStream)(windows_core::Interface::as_raw(self), pstream.param().abi(), pmaxlen.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Abort(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Abort)(windows_core::Interface::as_raw(self)).ok() } @@ -35540,20 +35540,20 @@ impl IMFSourceReader { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SetCurrentMediaType)(windows_core::Interface::as_raw(self), dwstreamindex, core::mem::transmute(pdwreserved.unwrap_or(core::mem::zeroed())), pmediatype.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).SetCurrentMediaType)(windows_core::Interface::as_raw(self), dwstreamindex, pdwreserved.unwrap_or(core::mem::zeroed()) as _, 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<()> { unsafe { (windows_core::Interface::vtable(self).SetCurrentPosition)(windows_core::Interface::as_raw(self), guidtimeformat, core::mem::transmute(varposition)).ok() } } pub unsafe fn ReadSample(&self, dwstreamindex: u32, dwcontrolflags: u32, pdwactualstreamindex: Option<*mut u32>, pdwstreamflags: Option<*mut u32>, plltimestamp: Option<*mut i64>, ppsample: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadSample)(windows_core::Interface::as_raw(self), dwstreamindex, 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() } + unsafe { (windows_core::Interface::vtable(self).ReadSample)(windows_core::Interface::as_raw(self), dwstreamindex, dwcontrolflags, pdwactualstreamindex.unwrap_or(core::mem::zeroed()) as _, pdwstreamflags.unwrap_or(core::mem::zeroed()) as _, plltimestamp.unwrap_or(core::mem::zeroed()) as _, ppsample.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Flush(&self, dwstreamindex: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Flush)(windows_core::Interface::as_raw(self), dwstreamindex).ok() } } pub unsafe fn GetServiceForStream(&self, dwstreamindex: u32, guidservice: *const windows_core::GUID, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetServiceForStream)(windows_core::Interface::as_raw(self), dwstreamindex, guidservice, riid, core::mem::transmute(ppvobject)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetServiceForStream)(windows_core::Interface::as_raw(self), dwstreamindex, guidservice, riid, ppvobject as _).ok() } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn GetPresentationAttribute(&self, dwstreamindex: u32, guidattribute: *const windows_core::GUID) -> windows_core::Result { @@ -35845,7 +35845,7 @@ impl IMFSourceReaderEx { unsafe { (windows_core::Interface::vtable(self).RemoveAllTransformsForStream)(windows_core::Interface::as_raw(self), dwstreamindex).ok() } } pub unsafe fn GetTransformForStream(&self, dwstreamindex: u32, dwtransformindex: u32, pguidcategory: Option<*mut windows_core::GUID>, pptransform: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTransformForStream)(windows_core::Interface::as_raw(self), dwstreamindex, dwtransformindex, core::mem::transmute(pguidcategory.unwrap_or(core::mem::zeroed())), core::mem::transmute(pptransform)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTransformForStream)(windows_core::Interface::as_raw(self), dwstreamindex, dwtransformindex, pguidcategory.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pptransform)).ok() } } } #[repr(C)] @@ -35919,7 +35919,7 @@ impl IMFSourceResolver { P0: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateObjectFromURL)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), dwflags, pprops.param().abi(), core::mem::transmute(pobjecttype), core::mem::transmute(ppobject)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateObjectFromURL)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), dwflags, pprops.param().abi(), pobjecttype as _, core::mem::transmute(ppobject)).ok() } } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn CreateObjectFromByteStream(&self, pbytestream: P0, pwszurl: P1, dwflags: u32, pprops: P3, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut Option) -> windows_core::Result<()> @@ -35928,7 +35928,7 @@ impl IMFSourceResolver { P1: windows_core::Param, P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateObjectFromByteStream)(windows_core::Interface::as_raw(self), pbytestream.param().abi(), pwszurl.param().abi(), dwflags, pprops.param().abi(), core::mem::transmute(pobjecttype), core::mem::transmute(ppobject)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateObjectFromByteStream)(windows_core::Interface::as_raw(self), pbytestream.param().abi(), pwszurl.param().abi(), dwflags, pprops.param().abi(), pobjecttype as _, core::mem::transmute(ppobject)).ok() } } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn BeginCreateObjectFromURL(&self, pwszurl: P0, dwflags: u32, pprops: P2, ppiunknowncancelcookie: Option<*mut Option>, pcallback: P4, punkstate: P5) -> windows_core::Result<()> @@ -35938,13 +35938,13 @@ impl IMFSourceResolver { P4: windows_core::Param, P5: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).BeginCreateObjectFromURL)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), dwflags, pprops.param().abi(), core::mem::transmute(ppiunknowncancelcookie.unwrap_or(core::mem::zeroed())), pcallback.param().abi(), punkstate.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).BeginCreateObjectFromURL)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), dwflags, pprops.param().abi(), ppiunknowncancelcookie.unwrap_or(core::mem::zeroed()) as _, 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 P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EndCreateObjectFromURL)(windows_core::Interface::as_raw(self), presult.param().abi(), core::mem::transmute(pobjecttype), core::mem::transmute(ppobject)).ok() } + unsafe { (windows_core::Interface::vtable(self).EndCreateObjectFromURL)(windows_core::Interface::as_raw(self), presult.param().abi(), pobjecttype as _, core::mem::transmute(ppobject)).ok() } } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn BeginCreateObjectFromByteStream(&self, pbytestream: P0, pwszurl: P1, dwflags: u32, pprops: P3, ppiunknowncancelcookie: Option<*mut Option>, pcallback: P5, punkstate: P6) -> windows_core::Result<()> @@ -35955,13 +35955,13 @@ impl IMFSourceResolver { P5: windows_core::Param, P6: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).BeginCreateObjectFromByteStream)(windows_core::Interface::as_raw(self), pbytestream.param().abi(), pwszurl.param().abi(), dwflags, pprops.param().abi(), core::mem::transmute(ppiunknowncancelcookie.unwrap_or(core::mem::zeroed())), pcallback.param().abi(), punkstate.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).BeginCreateObjectFromByteStream)(windows_core::Interface::as_raw(self), pbytestream.param().abi(), pwszurl.param().abi(), dwflags, pprops.param().abi(), ppiunknowncancelcookie.unwrap_or(core::mem::zeroed()) as _, 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 P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EndCreateObjectFromByteStream)(windows_core::Interface::as_raw(self), presult.param().abi(), core::mem::transmute(pobjecttype), core::mem::transmute(ppobject)).ok() } + unsafe { (windows_core::Interface::vtable(self).EndCreateObjectFromByteStream)(windows_core::Interface::as_raw(self), presult.param().abi(), pobjecttype as _, core::mem::transmute(ppobject)).ok() } } pub unsafe fn CancelObjectCreation(&self, piunknowncancelcookie: P0) -> windows_core::Result<()> where @@ -36523,10 +36523,10 @@ windows_core::imp::define_interface!(IMFSystemId, IMFSystemId_Vtbl, 0xfff4af3a_1 windows_core::imp::interface_hierarchy!(IMFSystemId, windows_core::IUnknown); impl IMFSystemId { pub unsafe fn GetData(&self, size: *mut u32, data: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), core::mem::transmute(size), core::mem::transmute(data)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), size as _, data as _).ok() } } pub unsafe fn Setup(&self, stage: u32, pbin: &[u8], pcbout: *mut u32, ppbout: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Setup)(windows_core::Interface::as_raw(self), stage, pbin.len().try_into().unwrap(), core::mem::transmute(pbin.as_ptr()), core::mem::transmute(pcbout), core::mem::transmute(ppbout)).ok() } + unsafe { (windows_core::Interface::vtable(self).Setup)(windows_core::Interface::as_raw(self), stage, pbin.len().try_into().unwrap(), core::mem::transmute(pbin.as_ptr()), pcbout as _, ppbout as _).ok() } } } #[repr(C)] @@ -36957,7 +36957,7 @@ windows_core::imp::define_interface!(IMFTimedTextBinary, IMFTimedTextBinary_Vtbl windows_core::imp::interface_hierarchy!(IMFTimedTextBinary, windows_core::IUnknown); impl IMFTimedTextBinary { pub unsafe fn GetData(&self, data: *mut *mut u8, length: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), core::mem::transmute(data), core::mem::transmute(length)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), data as _, length as _).ok() } } } #[repr(C)] @@ -37296,10 +37296,10 @@ impl IMFTimedTextCueList { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).AddTextCue)(windows_core::Interface::as_raw(self), start, duration, text.param().abi(), core::mem::transmute(cue.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).AddTextCue)(windows_core::Interface::as_raw(self), start, duration, text.param().abi(), cue.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn AddDataCue(&self, start: f64, duration: f64, data: &[u8], cue: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AddDataCue)(windows_core::Interface::as_raw(self), start, duration, core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap(), core::mem::transmute(cue.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).AddDataCue)(windows_core::Interface::as_raw(self), start, duration, core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap(), cue.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn RemoveCue(&self, cue: P0) -> windows_core::Result<()> where @@ -37419,7 +37419,7 @@ impl IMFTimedTextFormattedText { unsafe { (windows_core::Interface::vtable(self).GetSubformattingCount)(windows_core::Interface::as_raw(self)) } } pub unsafe fn GetSubformatting(&self, index: u32, firstchar: *mut u32, charlength: *mut u32, style: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSubformatting)(windows_core::Interface::as_raw(self), index, core::mem::transmute(firstchar), core::mem::transmute(charlength), core::mem::transmute(style)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSubformatting)(windows_core::Interface::as_raw(self), index, firstchar as _, charlength as _, core::mem::transmute(style)).ok() } } } #[repr(C)] @@ -37590,10 +37590,10 @@ impl IMFTimedTextRegion { } } pub unsafe fn GetPosition(&self, px: *mut f64, py: *mut f64, unittype: *mut MF_TIMED_TEXT_UNIT_TYPE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(px), core::mem::transmute(py), core::mem::transmute(unittype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPosition)(windows_core::Interface::as_raw(self), px as _, py as _, unittype as _).ok() } } pub unsafe fn GetExtent(&self, pwidth: *mut f64, pheight: *mut f64, unittype: *mut MF_TIMED_TEXT_UNIT_TYPE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetExtent)(windows_core::Interface::as_raw(self), core::mem::transmute(pwidth), core::mem::transmute(pheight), core::mem::transmute(unittype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetExtent)(windows_core::Interface::as_raw(self), pwidth as _, pheight as _, unittype as _).ok() } } pub unsafe fn GetBackgroundColor(&self) -> windows_core::Result { unsafe { @@ -37614,7 +37614,7 @@ impl IMFTimedTextRegion { } } pub unsafe fn GetLineHeight(&self, plineheight: *mut f64, unittype: *mut MF_TIMED_TEXT_UNIT_TYPE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLineHeight)(windows_core::Interface::as_raw(self), core::mem::transmute(plineheight), core::mem::transmute(unittype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLineHeight)(windows_core::Interface::as_raw(self), plineheight as _, unittype as _).ok() } } pub unsafe fn GetClipOverflow(&self) -> windows_core::Result { unsafe { @@ -37623,7 +37623,7 @@ impl IMFTimedTextRegion { } } pub unsafe fn GetPadding(&self, before: *mut f64, start: *mut f64, after: *mut f64, end: *mut f64, unittype: *mut MF_TIMED_TEXT_UNIT_TYPE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPadding)(windows_core::Interface::as_raw(self), core::mem::transmute(before), core::mem::transmute(start), core::mem::transmute(after), core::mem::transmute(end), core::mem::transmute(unittype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPadding)(windows_core::Interface::as_raw(self), before as _, start as _, after as _, end as _, unittype as _).ok() } } pub unsafe fn GetWrap(&self) -> windows_core::Result { unsafe { @@ -37941,7 +37941,7 @@ impl IMFTimedTextStyle { } } pub unsafe fn GetFontSize(&self, fontsize: *mut f64, unittype: *mut MF_TIMED_TEXT_UNIT_TYPE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFontSize)(windows_core::Interface::as_raw(self), core::mem::transmute(fontsize), core::mem::transmute(unittype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFontSize)(windows_core::Interface::as_raw(self), fontsize as _, unittype as _).ok() } } pub unsafe fn GetColor(&self) -> windows_core::Result { unsafe { @@ -37992,7 +37992,7 @@ impl IMFTimedTextStyle { } } pub unsafe fn GetTextOutline(&self, color: *mut MFARGB, thickness: *mut f64, blurradius: *mut f64, unittype: *mut MF_TIMED_TEXT_UNIT_TYPE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTextOutline)(windows_core::Interface::as_raw(self), core::mem::transmute(color), core::mem::transmute(thickness), core::mem::transmute(blurradius), core::mem::transmute(unittype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTextOutline)(windows_core::Interface::as_raw(self), color as _, thickness as _, blurradius as _, unittype as _).ok() } } } #[repr(C)] @@ -38960,10 +38960,10 @@ impl IMFTopologyNode { unsafe { (windows_core::Interface::vtable(self).DisconnectOutput)(windows_core::Interface::as_raw(self), dwoutputindex).ok() } } pub unsafe fn GetInput(&self, dwinputindex: u32, ppupstreamnode: *mut Option, pdwoutputindexonupstreamnode: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInput)(windows_core::Interface::as_raw(self), dwinputindex, core::mem::transmute(ppupstreamnode), core::mem::transmute(pdwoutputindexonupstreamnode)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInput)(windows_core::Interface::as_raw(self), dwinputindex, core::mem::transmute(ppupstreamnode), pdwoutputindexonupstreamnode as _).ok() } } pub unsafe fn GetOutput(&self, dwoutputindex: u32, ppdownstreamnode: *mut Option, pdwinputindexondownstreamnode: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOutput)(windows_core::Interface::as_raw(self), dwoutputindex, core::mem::transmute(ppdownstreamnode), core::mem::transmute(pdwinputindexondownstreamnode)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOutput)(windows_core::Interface::as_raw(self), dwoutputindex, core::mem::transmute(ppdownstreamnode), pdwinputindexondownstreamnode as _).ok() } } pub unsafe fn SetOutputPrefType(&self, dwoutputindex: u32, ptype: P1) -> windows_core::Result<()> where @@ -39236,7 +39236,7 @@ windows_core::imp::define_interface!(IMFTopologyServiceLookup, IMFTopologyServic windows_core::imp::interface_hierarchy!(IMFTopologyServiceLookup, windows_core::IUnknown); impl IMFTopologyServiceLookup { pub unsafe fn LookupService(&self, r#type: MF_SERVICE_LOOKUP_TYPE, dwindex: u32, guidservice: *const windows_core::GUID, riid: *const windows_core::GUID, ppvobjects: *mut *mut core::ffi::c_void, pnobjects: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).LookupService)(windows_core::Interface::as_raw(self), r#type, dwindex, guidservice, riid, core::mem::transmute(ppvobjects), core::mem::transmute(pnobjects)).ok() } + unsafe { (windows_core::Interface::vtable(self).LookupService)(windows_core::Interface::as_raw(self), r#type, dwindex, guidservice, riid, ppvobjects as _, pnobjects as _).ok() } } } #[repr(C)] @@ -39564,16 +39564,16 @@ windows_core::imp::define_interface!(IMFTransform, IMFTransform_Vtbl, 0xbf94c121 windows_core::imp::interface_hierarchy!(IMFTransform, windows_core::IUnknown); impl IMFTransform { pub unsafe fn GetStreamLimits(&self, pdwinputminimum: *mut u32, pdwinputmaximum: *mut u32, pdwoutputminimum: *mut u32, pdwoutputmaximum: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStreamLimits)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwinputminimum), core::mem::transmute(pdwinputmaximum), core::mem::transmute(pdwoutputminimum), core::mem::transmute(pdwoutputmaximum)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStreamLimits)(windows_core::Interface::as_raw(self), pdwinputminimum as _, pdwinputmaximum as _, pdwoutputminimum as _, pdwoutputmaximum as _).ok() } } pub unsafe fn GetStreamCount(&self, pcinputstreams: *mut u32, pcoutputstreams: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStreamCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pcinputstreams), core::mem::transmute(pcoutputstreams)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStreamCount)(windows_core::Interface::as_raw(self), pcinputstreams as _, pcoutputstreams as _).ok() } } pub unsafe fn GetStreamIDs(&self, pdwinputids: &mut [u32], pdwoutputids: &mut [u32]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetStreamIDs)(windows_core::Interface::as_raw(self), pdwinputids.len().try_into().unwrap(), core::mem::transmute(pdwinputids.as_ptr()), pdwoutputids.len().try_into().unwrap(), core::mem::transmute(pdwoutputids.as_ptr())).ok() } } pub unsafe fn GetInputStreamInfo(&self, dwinputstreamid: u32, pstreaminfo: *mut MFT_INPUT_STREAM_INFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInputStreamInfo)(windows_core::Interface::as_raw(self), dwinputstreamid, core::mem::transmute(pstreaminfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInputStreamInfo)(windows_core::Interface::as_raw(self), dwinputstreamid, pstreaminfo as _).ok() } } pub unsafe fn GetOutputStreamInfo(&self, dwoutputstreamid: u32) -> windows_core::Result { unsafe { @@ -39672,7 +39672,7 @@ impl IMFTransform { unsafe { (windows_core::Interface::vtable(self).ProcessInput)(windows_core::Interface::as_raw(self), dwinputstreamid, psample.param().abi(), dwflags).ok() } } pub unsafe fn ProcessOutput(&self, dwflags: u32, poutputsamples: &mut [MFT_OUTPUT_DATA_BUFFER], pdwstatus: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ProcessOutput)(windows_core::Interface::as_raw(self), dwflags, poutputsamples.len().try_into().unwrap(), core::mem::transmute(poutputsamples.as_ptr()), core::mem::transmute(pdwstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).ProcessOutput)(windows_core::Interface::as_raw(self), dwflags, poutputsamples.len().try_into().unwrap(), core::mem::transmute(poutputsamples.as_ptr()), pdwstatus as _).ok() } } } #[repr(C)] @@ -40168,16 +40168,16 @@ windows_core::imp::define_interface!(IMFVideoDisplayControl, IMFVideoDisplayCont windows_core::imp::interface_hierarchy!(IMFVideoDisplayControl, windows_core::IUnknown); impl IMFVideoDisplayControl { pub unsafe fn GetNativeVideoSize(&self, pszvideo: *mut super::super::Foundation::SIZE, pszarvideo: *mut super::super::Foundation::SIZE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNativeVideoSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pszvideo), core::mem::transmute(pszarvideo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNativeVideoSize)(windows_core::Interface::as_raw(self), pszvideo as _, pszarvideo as _).ok() } } pub unsafe fn GetIdealVideoSize(&self, pszmin: *mut super::super::Foundation::SIZE, pszmax: *mut super::super::Foundation::SIZE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIdealVideoSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pszmin), core::mem::transmute(pszmax)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIdealVideoSize)(windows_core::Interface::as_raw(self), pszmin as _, pszmax as _).ok() } } pub unsafe fn SetVideoPosition(&self, pnrcsource: *const MFVideoNormalizedRect, prcdest: *const super::super::Foundation::RECT) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetVideoPosition)(windows_core::Interface::as_raw(self), pnrcsource, prcdest).ok() } } pub unsafe fn GetVideoPosition(&self, pnrcsource: *mut MFVideoNormalizedRect, prcdest: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVideoPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(pnrcsource), core::mem::transmute(prcdest)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVideoPosition)(windows_core::Interface::as_raw(self), pnrcsource as _, prcdest as _).ok() } } pub unsafe fn SetAspectRatioMode(&self, dwaspectratiomode: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetAspectRatioMode)(windows_core::Interface::as_raw(self), dwaspectratiomode).ok() } @@ -40202,7 +40202,7 @@ impl IMFVideoDisplayControl { } #[cfg(feature = "Win32_Graphics_Gdi")] 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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentImage)(windows_core::Interface::as_raw(self), pbih as _, pdib as _, pcbdib as _, ptimestamp as _).ok() } } pub unsafe fn SetBorderColor(&self, clr: super::super::Foundation::COLORREF) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetBorderColor)(windows_core::Interface::as_raw(self), clr).ok() } @@ -40442,7 +40442,7 @@ impl IMFVideoMediaType { unsafe { (windows_core::Interface::vtable(self).GetVideoFormat)(windows_core::Interface::as_raw(self)) } } pub unsafe fn GetVideoRepresentation(&self, guidrepresentation: windows_core::GUID, ppvrepresentation: *mut *mut core::ffi::c_void, lstride: i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVideoRepresentation)(windows_core::Interface::as_raw(self), core::mem::transmute(guidrepresentation), core::mem::transmute(ppvrepresentation), lstride).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVideoRepresentation)(windows_core::Interface::as_raw(self), core::mem::transmute(guidrepresentation), ppvrepresentation as _, lstride).ok() } } } #[repr(C)] @@ -40497,7 +40497,7 @@ impl IMFVideoMixerBitmap { unsafe { (windows_core::Interface::vtable(self).UpdateAlphaBitmapParameters)(windows_core::Interface::as_raw(self), pbmpparms).ok() } } pub unsafe fn GetAlphaBitmapParameters(&self, pbmpparms: *mut MFVideoAlphaBitmapParams) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAlphaBitmapParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(pbmpparms)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAlphaBitmapParameters)(windows_core::Interface::as_raw(self), pbmpparms as _).ok() } } } #[repr(C)] @@ -40710,7 +40710,7 @@ windows_core::imp::define_interface!(IMFVideoPositionMapper, IMFVideoPositionMap windows_core::imp::interface_hierarchy!(IMFVideoPositionMapper, windows_core::IUnknown); impl IMFVideoPositionMapper { pub unsafe fn MapOutputCoordinateToInputStream(&self, xout: f32, yout: f32, dwoutputstreamindex: u32, dwinputstreamindex: u32, pxin: *mut f32, pyin: *mut f32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).MapOutputCoordinateToInputStream)(windows_core::Interface::as_raw(self), xout, yout, dwoutputstreamindex, dwinputstreamindex, core::mem::transmute(pxin), core::mem::transmute(pyin)).ok() } + unsafe { (windows_core::Interface::vtable(self).MapOutputCoordinateToInputStream)(windows_core::Interface::as_raw(self), xout, yout, dwoutputstreamindex, dwinputstreamindex, pxin as _, pyin as _).ok() } } } #[repr(C)] @@ -40803,11 +40803,11 @@ windows_core::imp::define_interface!(IMFVideoProcessor, IMFVideoProcessor_Vtbl, windows_core::imp::interface_hierarchy!(IMFVideoProcessor, windows_core::IUnknown); impl IMFVideoProcessor { pub unsafe fn GetAvailableVideoProcessorModes(&self, lpdwnumprocessingmodes: *mut u32, ppvideoprocessingmodes: *mut *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAvailableVideoProcessorModes)(windows_core::Interface::as_raw(self), core::mem::transmute(lpdwnumprocessingmodes), core::mem::transmute(ppvideoprocessingmodes)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAvailableVideoProcessorModes)(windows_core::Interface::as_raw(self), lpdwnumprocessingmodes as _, ppvideoprocessingmodes as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn GetVideoProcessorCaps(&self, lpvideoprocessormode: *const windows_core::GUID, lpvideoprocessorcaps: *mut DXVA2_VideoProcessorCaps) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorCaps)(windows_core::Interface::as_raw(self), lpvideoprocessormode, core::mem::transmute(lpvideoprocessorcaps)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorCaps)(windows_core::Interface::as_raw(self), lpvideoprocessormode, lpvideoprocessorcaps as _).ok() } } pub unsafe fn GetVideoProcessorMode(&self) -> windows_core::Result { unsafe { @@ -41029,13 +41029,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<()> { - unsafe { (windows_core::Interface::vtable(self).SetBorderColor)(windows_core::Interface::as_raw(self), core::mem::transmute(pbordercolor.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetBorderColor)(windows_core::Interface::as_raw(self), pbordercolor.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetSourceRectangle(&self, psrcrect: Option<*const super::super::Foundation::RECT>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetSourceRectangle)(windows_core::Interface::as_raw(self), core::mem::transmute(psrcrect.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetSourceRectangle)(windows_core::Interface::as_raw(self), psrcrect.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetDestinationRectangle(&self, pdstrect: Option<*const super::super::Foundation::RECT>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetDestinationRectangle)(windows_core::Interface::as_raw(self), core::mem::transmute(pdstrect.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetDestinationRectangle)(windows_core::Interface::as_raw(self), pdstrect.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetMirror(&self, emirror: MF_VIDEO_PROCESSOR_MIRROR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetMirror)(windows_core::Interface::as_raw(self), emirror).ok() } @@ -41044,7 +41044,7 @@ impl IMFVideoProcessorControl { unsafe { (windows_core::Interface::vtable(self).SetRotation)(windows_core::Interface::as_raw(self), erotation).ok() } } pub unsafe fn SetConstrictionSize(&self, pconstrictionsize: Option<*const super::super::Foundation::SIZE>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetConstrictionSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pconstrictionsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetConstrictionSize)(windows_core::Interface::as_raw(self), pconstrictionsize.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -41642,7 +41642,7 @@ impl IMFVirtualCamera { } } 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<()> { - unsafe { (windows_core::Interface::vtable(self).SendCameraProperty)(windows_core::Interface::as_raw(self), propertyset, propertyid, propertyflags, core::mem::transmute(propertypayload.unwrap_or(core::mem::zeroed())), propertypayloadlength, core::mem::transmute(data.unwrap_or(core::mem::zeroed())), datalength, core::mem::transmute(datawritten)).ok() } + unsafe { (windows_core::Interface::vtable(self).SendCameraProperty)(windows_core::Interface::as_raw(self), propertyset, propertyid, propertyflags, propertypayload.unwrap_or(core::mem::zeroed()) as _, propertypayloadlength, data.unwrap_or(core::mem::zeroed()) as _, datalength, datawritten as _).ok() } } pub unsafe fn CreateSyncEvent(&self, kseventset: *const windows_core::GUID, kseventid: u32, kseventflags: u32, eventhandle: super::super::Foundation::HANDLE) -> windows_core::Result { unsafe { @@ -41830,7 +41830,7 @@ impl IMFWorkQueueServices { unsafe { (windows_core::Interface::vtable(self).EndUnregisterTopologyWorkQueuesWithMMCSS)(windows_core::Interface::as_raw(self), presult.param().abi()).ok() } } pub unsafe fn GetTopologyWorkQueueMMCSSClass(&self, dwtopologyworkqueueid: u32, pwszclass: windows_core::PWSTR, pcchclass: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTopologyWorkQueueMMCSSClass)(windows_core::Interface::as_raw(self), dwtopologyworkqueueid, core::mem::transmute(pwszclass), core::mem::transmute(pcchclass)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTopologyWorkQueueMMCSSClass)(windows_core::Interface::as_raw(self), dwtopologyworkqueueid, core::mem::transmute(pwszclass), pcchclass as _).ok() } } pub unsafe fn GetTopologyWorkQueueMMCSSTaskId(&self, dwtopologyworkqueueid: u32) -> windows_core::Result { unsafe { @@ -41869,7 +41869,7 @@ impl IMFWorkQueueServices { unsafe { (windows_core::Interface::vtable(self).EndUnregisterPlatformWorkQueueWithMMCSS)(windows_core::Interface::as_raw(self), presult.param().abi()).ok() } } pub unsafe fn GetPlaftormWorkQueueMMCSSClass(&self, dwplatformworkqueueid: u32, pwszclass: windows_core::PWSTR, pcchclass: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPlaftormWorkQueueMMCSSClass)(windows_core::Interface::as_raw(self), dwplatformworkqueueid, core::mem::transmute(pwszclass), core::mem::transmute(pcchclass)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPlaftormWorkQueueMMCSSClass)(windows_core::Interface::as_raw(self), dwplatformworkqueueid, core::mem::transmute(pwszclass), pcchclass as _).ok() } } pub unsafe fn GetPlatformWorkQueueMMCSSTaskId(&self, dwplatformworkqueueid: u32) -> windows_core::Result { unsafe { @@ -42111,16 +42111,16 @@ windows_core::imp::define_interface!(IOPMVideoOutput, IOPMVideoOutput_Vtbl, 0x0a windows_core::imp::interface_hierarchy!(IOPMVideoOutput, windows_core::IUnknown); impl IOPMVideoOutput { pub unsafe fn StartInitialization(&self, prnrandomnumber: *mut OPM_RANDOM_NUMBER, ppbcertificate: *mut *mut u8, pulcertificatelength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).StartInitialization)(windows_core::Interface::as_raw(self), core::mem::transmute(prnrandomnumber), core::mem::transmute(ppbcertificate), core::mem::transmute(pulcertificatelength)).ok() } + unsafe { (windows_core::Interface::vtable(self).StartInitialization)(windows_core::Interface::as_raw(self), prnrandomnumber as _, ppbcertificate as _, pulcertificatelength as _).ok() } } pub unsafe fn FinishInitialization(&self, pparameters: *const OPM_ENCRYPTED_INITIALIZATION_PARAMETERS) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).FinishInitialization)(windows_core::Interface::as_raw(self), pparameters).ok() } } pub unsafe fn GetInformation(&self, pparameters: *const OPM_GET_INFO_PARAMETERS, prequestedinformation: *mut OPM_REQUESTED_INFORMATION) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInformation)(windows_core::Interface::as_raw(self), pparameters, core::mem::transmute(prequestedinformation)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInformation)(windows_core::Interface::as_raw(self), pparameters, prequestedinformation as _).ok() } } pub unsafe fn COPPCompatibleGetInformation(&self, pparameters: *const OPM_COPP_COMPATIBLE_GET_INFO_PARAMETERS, prequestedinformation: *mut OPM_REQUESTED_INFORMATION) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).COPPCompatibleGetInformation)(windows_core::Interface::as_raw(self), pparameters, core::mem::transmute(prequestedinformation)).ok() } + unsafe { (windows_core::Interface::vtable(self).COPPCompatibleGetInformation)(windows_core::Interface::as_raw(self), pparameters, prequestedinformation as _).ok() } } pub unsafe fn Configure(&self, pparameters: *const OPM_CONFIGURE_PARAMETERS, pbadditionalparameters: Option<&[u8]>) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Configure)(windows_core::Interface::as_raw(self), pparameters, pbadditionalparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pbadditionalparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() } @@ -42323,10 +42323,10 @@ windows_core::imp::define_interface!(IToc, IToc_Vtbl, 0xd6f05441_a919_423b_91a0_ windows_core::imp::interface_hierarchy!(IToc, windows_core::IUnknown); impl IToc { pub unsafe fn SetDescriptor(&self, pdescriptor: *mut TOC_DESCRIPTOR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetDescriptor)(windows_core::Interface::as_raw(self), core::mem::transmute(pdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetDescriptor)(windows_core::Interface::as_raw(self), pdescriptor as _).ok() } } pub unsafe fn GetDescriptor(&self, pdescriptor: *mut TOC_DESCRIPTOR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDescriptor)(windows_core::Interface::as_raw(self), core::mem::transmute(pdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDescriptor)(windows_core::Interface::as_raw(self), pdescriptor as _).ok() } } pub unsafe fn SetDescription(&self, pwszdescription: P0) -> windows_core::Result<()> where @@ -42335,16 +42335,16 @@ impl IToc { unsafe { (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: Option) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetDescription)(windows_core::Interface::as_raw(self), pwdescriptionsize as _, pwszdescription.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetContext(&self, dwcontextsize: u32, pbtcontext: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetContext)(windows_core::Interface::as_raw(self), dwcontextsize, core::mem::transmute(pbtcontext)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetContext)(windows_core::Interface::as_raw(self), dwcontextsize, pbtcontext as _).ok() } } pub unsafe fn GetContext(&self, pdwcontextsize: *mut u32, pbtcontext: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetContext)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwcontextsize), core::mem::transmute(pbtcontext)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetContext)(windows_core::Interface::as_raw(self), pdwcontextsize as _, pbtcontext as _).ok() } } pub unsafe fn GetEntryListCount(&self, pwcount: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEntryListCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pwcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEntryListCount)(windows_core::Interface::as_raw(self), pwcount as _).ok() } } pub unsafe fn GetEntryListByIndex(&self, wentrylistindex: u16) -> windows_core::Result { unsafe { @@ -42356,7 +42356,7 @@ impl IToc { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).AddEntryList)(windows_core::Interface::as_raw(self), pentrylist.param().abi(), core::mem::transmute(pwentrylistindex)).ok() } + unsafe { (windows_core::Interface::vtable(self).AddEntryList)(windows_core::Interface::as_raw(self), pentrylist.param().abi(), pwentrylistindex as _).ok() } } pub unsafe fn AddEntryListByIndex(&self, wentrylistindex: u16, pentrylist: P1) -> windows_core::Result<()> where @@ -42494,7 +42494,7 @@ windows_core::imp::define_interface!(ITocCollection, ITocCollection_Vtbl, 0x23fe windows_core::imp::interface_hierarchy!(ITocCollection, windows_core::IUnknown); impl ITocCollection { pub unsafe fn GetEntryCount(&self, pdwentrycount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEntryCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwentrycount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEntryCount)(windows_core::Interface::as_raw(self), pdwentrycount as _).ok() } } pub unsafe fn GetEntryByIndex(&self, dwentryindex: u32) -> windows_core::Result { unsafe { @@ -42506,7 +42506,7 @@ impl ITocCollection { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).AddEntry)(windows_core::Interface::as_raw(self), ptoc.param().abi(), core::mem::transmute(pdwentryindex)).ok() } + unsafe { (windows_core::Interface::vtable(self).AddEntry)(windows_core::Interface::as_raw(self), ptoc.param().abi(), pdwentryindex as _).ok() } } pub unsafe fn AddEntryByIndex(&self, dwentryindex: u32, ptoc: P1) -> windows_core::Result<()> where @@ -42596,25 +42596,25 @@ impl ITocEntry { unsafe { (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: Option) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetTitle)(windows_core::Interface::as_raw(self), pwtitlesize as _, pwsztitle.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetDescriptor(&self, pdescriptor: *mut TOC_ENTRY_DESCRIPTOR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetDescriptor)(windows_core::Interface::as_raw(self), core::mem::transmute(pdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetDescriptor)(windows_core::Interface::as_raw(self), pdescriptor as _).ok() } } pub unsafe fn GetDescriptor(&self, pdescriptor: *mut TOC_ENTRY_DESCRIPTOR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDescriptor)(windows_core::Interface::as_raw(self), core::mem::transmute(pdescriptor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDescriptor)(windows_core::Interface::as_raw(self), pdescriptor as _).ok() } } pub unsafe fn SetSubEntries(&self, dwnumsubentries: u32, pwsubentryindices: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetSubEntries)(windows_core::Interface::as_raw(self), dwnumsubentries, core::mem::transmute(pwsubentryindices)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetSubEntries)(windows_core::Interface::as_raw(self), dwnumsubentries, pwsubentryindices as _).ok() } } pub unsafe fn GetSubEntries(&self, pdwnumsubentries: *mut u32, pwsubentryindices: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSubEntries)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwnumsubentries), core::mem::transmute(pwsubentryindices)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSubEntries)(windows_core::Interface::as_raw(self), pdwnumsubentries as _, pwsubentryindices as _).ok() } } pub unsafe fn SetDescriptionData(&self, dwdescriptiondatasize: u32, pbtdescriptiondata: *mut u8, pguidtype: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetDescriptionData)(windows_core::Interface::as_raw(self), dwdescriptiondatasize, core::mem::transmute(pbtdescriptiondata), core::mem::transmute(pguidtype)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetDescriptionData)(windows_core::Interface::as_raw(self), dwdescriptiondatasize, pbtdescriptiondata as _, pguidtype as _).ok() } } pub unsafe fn GetDescriptionData(&self, pdwdescriptiondatasize: *mut u32, pbtdescriptiondata: *mut u8, pguidtype: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDescriptionData)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwdescriptiondatasize), core::mem::transmute(pbtdescriptiondata), core::mem::transmute(pguidtype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDescriptionData)(windows_core::Interface::as_raw(self), pdwdescriptiondatasize as _, pbtdescriptiondata as _, pguidtype as _).ok() } } } #[repr(C)] @@ -42710,7 +42710,7 @@ windows_core::imp::define_interface!(ITocEntryList, ITocEntryList_Vtbl, 0x3a8ccc windows_core::imp::interface_hierarchy!(ITocEntryList, windows_core::IUnknown); impl ITocEntryList { pub unsafe fn GetEntryCount(&self, pdwentrycount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEntryCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwentrycount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEntryCount)(windows_core::Interface::as_raw(self), pdwentrycount as _).ok() } } pub unsafe fn GetEntryByIndex(&self, dwentryindex: u32) -> windows_core::Result { unsafe { @@ -42722,7 +42722,7 @@ impl ITocEntryList { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).AddEntry)(windows_core::Interface::as_raw(self), pentry.param().abi(), core::mem::transmute(pdwentryindex)).ok() } + unsafe { (windows_core::Interface::vtable(self).AddEntry)(windows_core::Interface::as_raw(self), pentry.param().abi(), pdwentryindex as _).ok() } } pub unsafe fn AddEntryByIndex(&self, dwentryindex: u32, pentry: P1) -> windows_core::Result<()> where @@ -42812,7 +42812,7 @@ impl ITocParser { unsafe { (windows_core::Interface::vtable(self).Init)(windows_core::Interface::as_raw(self), pwszfilename.param().abi()).ok() } } pub unsafe fn GetTocCount(&self, enumtocpostype: TOC_POS_TYPE, pdwtoccount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTocCount)(windows_core::Interface::as_raw(self), enumtocpostype, core::mem::transmute(pdwtoccount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTocCount)(windows_core::Interface::as_raw(self), enumtocpostype, pdwtoccount as _).ok() } } pub unsafe fn GetTocByIndex(&self, enumtocpostype: TOC_POS_TYPE, dwtocindex: u32) -> windows_core::Result { unsafe { @@ -42830,7 +42830,7 @@ impl ITocParser { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).AddToc)(windows_core::Interface::as_raw(self), enumtocpostype, ptoc.param().abi(), core::mem::transmute(pdwtocindex)).ok() } + unsafe { (windows_core::Interface::vtable(self).AddToc)(windows_core::Interface::as_raw(self), enumtocpostype, ptoc.param().abi(), pdwtocindex as _).ok() } } pub unsafe fn RemoveTocByIndex(&self, enumtocpostype: TOC_POS_TYPE, dwtocindex: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RemoveTocByIndex)(windows_core::Interface::as_raw(self), enumtocpostype, dwtocindex).ok() } @@ -42947,7 +42947,7 @@ windows_core::imp::define_interface!(IValidateBinding, IValidateBinding_Vtbl, 0x windows_core::imp::interface_hierarchy!(IValidateBinding, windows_core::IUnknown); impl IValidateBinding { pub unsafe fn GetIdentifier(&self, guidlicensorid: windows_core::GUID, pbephemeron: &[u8], ppbblobvalidationid: *mut *mut u8, pcbblobsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIdentifier)(windows_core::Interface::as_raw(self), core::mem::transmute(guidlicensorid), core::mem::transmute(pbephemeron.as_ptr()), pbephemeron.len().try_into().unwrap(), core::mem::transmute(ppbblobvalidationid), core::mem::transmute(pcbblobsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIdentifier)(windows_core::Interface::as_raw(self), core::mem::transmute(guidlicensorid), core::mem::transmute(pbephemeron.as_ptr()), pbephemeron.len().try_into().unwrap(), ppbblobvalidationid as _, pcbblobsize as _).ok() } } } #[repr(C)] @@ -42980,13 +42980,13 @@ impl IWMCodecLeakyBucket { unsafe { (windows_core::Interface::vtable(self).SetBufferSizeBits)(windows_core::Interface::as_raw(self), ulbuffersize).ok() } } pub unsafe fn GetBufferSizeBits(&self, pulbuffersize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBufferSizeBits)(windows_core::Interface::as_raw(self), core::mem::transmute(pulbuffersize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBufferSizeBits)(windows_core::Interface::as_raw(self), pulbuffersize as _).ok() } } pub unsafe fn SetBufferFullnessBits(&self, ulbufferfullness: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetBufferFullnessBits)(windows_core::Interface::as_raw(self), ulbufferfullness).ok() } } pub unsafe fn GetBufferFullnessBits(&self, pulbufferfullness: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBufferFullnessBits)(windows_core::Interface::as_raw(self), core::mem::transmute(pulbufferfullness)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBufferFullnessBits)(windows_core::Interface::as_raw(self), pulbufferfullness as _).ok() } } } #[repr(C)] @@ -43046,7 +43046,7 @@ windows_core::imp::define_interface!(IWMCodecOutputTimestamp, IWMCodecOutputTime windows_core::imp::interface_hierarchy!(IWMCodecOutputTimestamp, windows_core::IUnknown); impl IWMCodecOutputTimestamp { pub unsafe fn GetNextOutputTime(&self, prttime: *mut i64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNextOutputTime)(windows_core::Interface::as_raw(self), core::mem::transmute(prttime)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNextOutputTime)(windows_core::Interface::as_raw(self), prttime as _).ok() } } } #[repr(C)] @@ -43080,7 +43080,7 @@ impl IWMCodecPrivateData { unsafe { (windows_core::Interface::vtable(self).SetPartialOutputType)(windows_core::Interface::as_raw(self), core::mem::transmute(pmt)).ok() } } pub unsafe fn GetPrivateData(&self, pbdata: *mut u8, pcbdata: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), core::mem::transmute(pbdata), core::mem::transmute(pcbdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), pbdata as _, pcbdata as _).ok() } } } #[repr(C)] @@ -43132,13 +43132,13 @@ impl IWMCodecProps { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetFormatProp)(windows_core::Interface::as_raw(self), core::mem::transmute(pmt), pszname.param().abi(), core::mem::transmute(ptype), core::mem::transmute(pvalue), core::mem::transmute(pdwsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFormatProp)(windows_core::Interface::as_raw(self), core::mem::transmute(pmt), pszname.param().abi(), ptype as _, pvalue as _, pdwsize as _).ok() } } pub unsafe fn GetCodecProp(&self, dwformat: u32, pszname: P1, ptype: *mut WMT_PROP_DATATYPE, pvalue: *mut u8, pdwsize: *mut u32) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetCodecProp)(windows_core::Interface::as_raw(self), dwformat, pszname.param().abi(), core::mem::transmute(ptype), core::mem::transmute(pvalue), core::mem::transmute(pdwsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCodecProp)(windows_core::Interface::as_raw(self), dwformat, pszname.param().abi(), ptype as _, pvalue as _, pdwsize as _).ok() } } } #[repr(C)] @@ -43187,11 +43187,11 @@ windows_core::imp::interface_hierarchy!(IWMCodecStrings, windows_core::IUnknown) impl IWMCodecStrings { #[cfg(feature = "Win32_Media_DxMediaObjects")] pub unsafe fn GetName(&self, pmt: *mut super::DxMediaObjects::DMO_MEDIA_TYPE, szname: Option<&mut [u16]>, pcchlength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetName)(windows_core::Interface::as_raw(self), core::mem::transmute(pmt), szname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pcchlength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetName)(windows_core::Interface::as_raw(self), core::mem::transmute(pmt), szname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcchlength as _).ok() } } #[cfg(feature = "Win32_Media_DxMediaObjects")] pub unsafe fn GetDescription(&self, pmt: *mut super::DxMediaObjects::DMO_MEDIA_TYPE, szdescription: Option<&mut [u16]>, pcchlength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(pmt), szdescription.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szdescription.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pcchlength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(pmt), szdescription.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szdescription.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcchlength as _).ok() } } } #[repr(C)] @@ -43446,7 +43446,7 @@ impl IWMResamplerProps { unsafe { (windows_core::Interface::vtable(self).SetHalfFilterLength)(windows_core::Interface::as_raw(self), lhalffilterlen).ok() } } pub unsafe fn SetUserChannelMtx(&self, userchannelmtx: *mut f32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetUserChannelMtx)(windows_core::Interface::as_raw(self), core::mem::transmute(userchannelmtx)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetUserChannelMtx)(windows_core::Interface::as_raw(self), userchannelmtx as _).ok() } } } #[repr(C)] @@ -43500,7 +43500,7 @@ impl IWMResizerProps { unsafe { (windows_core::Interface::vtable(self).SetFullCropRegion)(windows_core::Interface::as_raw(self), lcliporixsrc, lcliporiysrc, lclipwidthsrc, lclipheightsrc, lcliporixdst, lcliporiydst, lclipwidthdst, lclipheightdst).ok() } } pub unsafe fn GetFullCropRegion(&self, lcliporixsrc: *mut i32, lcliporiysrc: *mut i32, lclipwidthsrc: *mut i32, lclipheightsrc: *mut i32, lcliporixdst: *mut i32, lcliporiydst: *mut i32, lclipwidthdst: *mut i32, lclipheightdst: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFullCropRegion)(windows_core::Interface::as_raw(self), core::mem::transmute(lcliporixsrc), core::mem::transmute(lcliporiysrc), core::mem::transmute(lclipwidthsrc), core::mem::transmute(lclipheightsrc), core::mem::transmute(lcliporixdst), core::mem::transmute(lcliporiydst), core::mem::transmute(lclipwidthdst), core::mem::transmute(lclipheightdst)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFullCropRegion)(windows_core::Interface::as_raw(self), lcliporixsrc as _, lcliporiysrc as _, lclipwidthsrc as _, lclipheightsrc as _, lcliporixdst as _, lcliporiydst as _, lclipwidthdst as _, lclipheightdst as _).ok() } } } #[repr(C)] @@ -43632,7 +43632,7 @@ impl IWMVideoDecoderHurryup { unsafe { (windows_core::Interface::vtable(self).SetHurryup)(windows_core::Interface::as_raw(self), lhurryup).ok() } } pub unsafe fn GetHurryup(&self, plhurryup: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetHurryup)(windows_core::Interface::as_raw(self), core::mem::transmute(plhurryup)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetHurryup)(windows_core::Interface::as_raw(self), plhurryup as _).ok() } } } #[repr(C)] @@ -43674,7 +43674,7 @@ windows_core::imp::define_interface!(IWMVideoDecoderReconBuffer, IWMVideoDecoder windows_core::imp::interface_hierarchy!(IWMVideoDecoderReconBuffer, windows_core::IUnknown); impl IWMVideoDecoderReconBuffer { pub unsafe fn GetReconstructedVideoFrameSize(&self, pdwsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetReconstructedVideoFrameSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetReconstructedVideoFrameSize)(windows_core::Interface::as_raw(self), pdwsize as _).ok() } } #[cfg(feature = "Win32_Media_DxMediaObjects")] pub unsafe fn GetReconstructedVideoFrame(&self, pbuf: P0) -> windows_core::Result<()> 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 a7c61b6f74..7d6924e4a6 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/MediaPlayer/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/MediaPlayer/mod.rs @@ -3559,7 +3559,7 @@ windows_core::imp::define_interface!(IWMPCdromBurn, IWMPCdromBurn_Vtbl, 0xbd94db windows_core::imp::interface_hierarchy!(IWMPCdromBurn, windows_core::IUnknown); impl IWMPCdromBurn { pub unsafe fn isAvailable(&self, bstritem: &windows_core::BSTR, pisavailable: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).isAvailable)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstritem), core::mem::transmute(pisavailable)).ok() } + unsafe { (windows_core::Interface::vtable(self).isAvailable)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstritem), pisavailable as _).ok() } } pub unsafe fn getItemInfo(&self, bstritem: &windows_core::BSTR, pbstrval: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).getItemInfo)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstritem), core::mem::transmute(pbstrval)).ok() } @@ -3571,7 +3571,7 @@ impl IWMPCdromBurn { unsafe { (windows_core::Interface::vtable(self).Setlabel)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrlabel)).ok() } } pub unsafe fn burnFormat(&self, pwmpbf: *mut WMPBurnFormat) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).burnFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(pwmpbf)).ok() } + unsafe { (windows_core::Interface::vtable(self).burnFormat)(windows_core::Interface::as_raw(self), pwmpbf as _).ok() } } pub unsafe fn SetburnFormat(&self, wmpbf: WMPBurnFormat) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetburnFormat)(windows_core::Interface::as_raw(self), wmpbf).ok() } @@ -3594,10 +3594,10 @@ impl IWMPCdromBurn { unsafe { (windows_core::Interface::vtable(self).refreshStatus)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn burnState(&self, pwmpbs: *mut WMPBurnState) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).burnState)(windows_core::Interface::as_raw(self), core::mem::transmute(pwmpbs)).ok() } + unsafe { (windows_core::Interface::vtable(self).burnState)(windows_core::Interface::as_raw(self), pwmpbs as _).ok() } } pub unsafe fn burnProgress(&self, plprogress: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).burnProgress)(windows_core::Interface::as_raw(self), core::mem::transmute(plprogress)).ok() } + unsafe { (windows_core::Interface::vtable(self).burnProgress)(windows_core::Interface::as_raw(self), plprogress as _).ok() } } pub unsafe fn startBurn(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).startBurn)(windows_core::Interface::as_raw(self)).ok() } @@ -3781,7 +3781,7 @@ windows_core::imp::interface_hierarchy!(IWMPCdromCollection, windows_core::IUnkn #[cfg(feature = "Win32_System_Com")] impl IWMPCdromCollection { pub unsafe fn count(&self, plcount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).count)(windows_core::Interface::as_raw(self), core::mem::transmute(plcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).count)(windows_core::Interface::as_raw(self), plcount as _).ok() } } pub unsafe fn item(&self, lindex: i32) -> windows_core::Result { unsafe { @@ -3860,10 +3860,10 @@ windows_core::imp::define_interface!(IWMPCdromRip, IWMPCdromRip_Vtbl, 0x56e2294f windows_core::imp::interface_hierarchy!(IWMPCdromRip, windows_core::IUnknown); impl IWMPCdromRip { pub unsafe fn ripState(&self, pwmprs: *mut WMPRipState) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ripState)(windows_core::Interface::as_raw(self), core::mem::transmute(pwmprs)).ok() } + unsafe { (windows_core::Interface::vtable(self).ripState)(windows_core::Interface::as_raw(self), pwmprs as _).ok() } } pub unsafe fn ripProgress(&self, plprogress: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ripProgress)(windows_core::Interface::as_raw(self), core::mem::transmute(plprogress)).ok() } + unsafe { (windows_core::Interface::vtable(self).ripProgress)(windows_core::Interface::as_raw(self), plprogress as _).ok() } } pub unsafe fn startRip(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).startRip)(windows_core::Interface::as_raw(self)).ok() } @@ -4070,16 +4070,16 @@ windows_core::imp::interface_hierarchy!(IWMPClosedCaption2, windows_core::IUnkno #[cfg(feature = "Win32_System_Com")] impl IWMPClosedCaption2 { pub unsafe fn SAMILangCount(&self, plcount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SAMILangCount)(windows_core::Interface::as_raw(self), core::mem::transmute(plcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).SAMILangCount)(windows_core::Interface::as_raw(self), plcount as _).ok() } } pub unsafe fn getSAMILangName(&self, nindex: i32, pbstrname: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).getSAMILangName)(windows_core::Interface::as_raw(self), nindex, core::mem::transmute(pbstrname)).ok() } } pub unsafe fn getSAMILangID(&self, nindex: i32, pllangid: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getSAMILangID)(windows_core::Interface::as_raw(self), nindex, core::mem::transmute(pllangid)).ok() } + unsafe { (windows_core::Interface::vtable(self).getSAMILangID)(windows_core::Interface::as_raw(self), nindex, pllangid as _).ok() } } pub unsafe fn SAMIStyleCount(&self, plcount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SAMIStyleCount)(windows_core::Interface::as_raw(self), core::mem::transmute(plcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).SAMIStyleCount)(windows_core::Interface::as_raw(self), plcount as _).ok() } } pub unsafe fn getSAMIStyleName(&self, nindex: i32, pbstrname: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).getSAMIStyleName)(windows_core::Interface::as_raw(self), nindex, core::mem::transmute(pbstrname)).ok() } @@ -4411,7 +4411,7 @@ impl IWMPContentPartner { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetCommands(&self, location: &windows_core::BSTR, plocationcontext: *const super::super::System::Variant::VARIANT, itemlocation: &windows_core::BSTR, prgitemids: &[u32], pcitemids: *mut u32, pprgitems: *mut *mut WMPContextMenuInfo) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCommands)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(location), core::mem::transmute(plocationcontext), core::mem::transmute_copy(itemlocation), prgitemids.len().try_into().unwrap(), core::mem::transmute(prgitemids.as_ptr()), core::mem::transmute(pcitemids), core::mem::transmute(pprgitems)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCommands)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(location), core::mem::transmute(plocationcontext), core::mem::transmute_copy(itemlocation), prgitemids.len().try_into().unwrap(), core::mem::transmute(prgitemids.as_ptr()), pcitemids as _, pprgitems as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn InvokeCommand(&self, dwcommandid: u32, location: &windows_core::BSTR, plocationcontext: *const super::super::System::Variant::VARIANT, itemlocation: &windows_core::BSTR, rgitemids: &[u32]) -> windows_core::Result<()> { @@ -4421,7 +4421,7 @@ impl IWMPContentPartner { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CanBuySilent)(windows_core::Interface::as_raw(self), pinfo.param().abi(), core::mem::transmute(pbstrtotalprice), core::mem::transmute(psilentok)).ok() } + unsafe { (windows_core::Interface::vtable(self).CanBuySilent)(windows_core::Interface::as_raw(self), pinfo.param().abi(), core::mem::transmute(pbstrtotalprice), psilentok as _).ok() } } pub unsafe fn Buy(&self, pinfo: P0, cookie: u32) -> windows_core::Result<()> where @@ -4451,11 +4451,11 @@ impl IWMPContentPartner { } #[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<()> { - unsafe { (windows_core::Interface::vtable(self).GetCatalogURL)(windows_core::Interface::as_raw(self), dwcatalogversion, dwcatalogschemaversion, cataloglcid, core::mem::transmute(pdwnewcatalogversion), core::mem::transmute(pbstrcatalogurl), core::mem::transmute(pexpirationdate)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCatalogURL)(windows_core::Interface::as_raw(self), dwcatalogversion, dwcatalogschemaversion, cataloglcid, pdwnewcatalogversion as _, core::mem::transmute(pbstrcatalogurl), core::mem::transmute(pexpirationdate)).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetTemplate(&self, task: WMPTaskType, location: &windows_core::BSTR, pcontext: *const super::super::System::Variant::VARIANT, clicklocation: &windows_core::BSTR, pclickcontext: *const super::super::System::Variant::VARIANT, bstrfilter: &windows_core::BSTR, bstrviewparams: &windows_core::BSTR, pbstrtemplateurl: *mut windows_core::BSTR, ptemplatesize: *mut WMPTemplateSize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTemplate)(windows_core::Interface::as_raw(self), task, core::mem::transmute_copy(location), core::mem::transmute(pcontext), core::mem::transmute_copy(clicklocation), core::mem::transmute(pclickcontext), core::mem::transmute_copy(bstrfilter), core::mem::transmute_copy(bstrviewparams), core::mem::transmute(pbstrtemplateurl), core::mem::transmute(ptemplatesize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTemplate)(windows_core::Interface::as_raw(self), task, core::mem::transmute_copy(location), core::mem::transmute(pcontext), core::mem::transmute_copy(clicklocation), core::mem::transmute(pclickcontext), core::mem::transmute_copy(bstrfilter), core::mem::transmute_copy(bstrviewparams), core::mem::transmute(pbstrtemplateurl), ptemplatesize as _).ok() } } pub unsafe fn UpdateDevice(&self, bstrdevicename: &windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UpdateDevice)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrdevicename)).ok() } @@ -4800,7 +4800,7 @@ impl IWMPContentPartnerCallback { unsafe { (windows_core::Interface::vtable(self).DownloadTrack)(windows_core::Interface::as_raw(self), cookie, core::mem::transmute_copy(bstrtrackurl), dwservicetrackid, core::mem::transmute_copy(bstrdownloadparams), hrdownload).ok() } } pub unsafe fn GetCatalogVersion(&self, pdwversion: *mut u32, pdwschemaversion: *mut u32, plcid: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCatalogVersion)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwversion), core::mem::transmute(pdwschemaversion), core::mem::transmute(plcid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCatalogVersion)(windows_core::Interface::as_raw(self), pdwversion as _, pdwschemaversion as _, plcid as _).ok() } } pub unsafe fn UpdateDeviceComplete(&self, bstrdevicename: &windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UpdateDeviceComplete)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrdevicename)).ok() } @@ -4818,7 +4818,7 @@ impl IWMPContentPartnerCallback { unsafe { (windows_core::Interface::vtable(self).SendMessageComplete)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrmsg), core::mem::transmute_copy(bstrparam), core::mem::transmute_copy(bstrresult)).ok() } } pub unsafe fn GetContentIDsInLibrary(&self, pccontentids: *mut u32, pprgids: *mut *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetContentIDsInLibrary)(windows_core::Interface::as_raw(self), core::mem::transmute(pccontentids), core::mem::transmute(pprgids)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetContentIDsInLibrary)(windows_core::Interface::as_raw(self), pccontentids as _, pprgids as _).ok() } } pub unsafe fn RefreshLicenseComplete(&self, dwcookie: u32, contentid: u32, hrrefresh: windows_core::HRESULT) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RefreshLicenseComplete)(windows_core::Interface::as_raw(self), dwcookie, contentid, hrrefresh).ok() } @@ -4988,7 +4988,7 @@ windows_core::imp::interface_hierarchy!(IWMPControls, windows_core::IUnknown, su #[cfg(feature = "Win32_System_Com")] impl IWMPControls { pub unsafe fn get_isAvailable(&self, bstritem: &windows_core::BSTR, pisavailable: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_isAvailable)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstritem), core::mem::transmute(pisavailable)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_isAvailable)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstritem), pisavailable as _).ok() } } pub unsafe fn play(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).play)(windows_core::Interface::as_raw(self)).ok() } @@ -5006,7 +5006,7 @@ impl IWMPControls { unsafe { (windows_core::Interface::vtable(self).fastReverse)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn currentPosition(&self, pdcurrentposition: *mut f64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).currentPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(pdcurrentposition)).ok() } + unsafe { (windows_core::Interface::vtable(self).currentPosition)(windows_core::Interface::as_raw(self), pdcurrentposition as _).ok() } } pub unsafe fn SetcurrentPosition(&self, dcurrentposition: f64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetcurrentPosition)(windows_core::Interface::as_raw(self), dcurrentposition).ok() } @@ -5033,7 +5033,7 @@ impl IWMPControls { unsafe { (windows_core::Interface::vtable(self).SetcurrentItem)(windows_core::Interface::as_raw(self), piwmpmedia.param().abi()).ok() } } pub unsafe fn currentMarker(&self, plmarker: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).currentMarker)(windows_core::Interface::as_raw(self), core::mem::transmute(plmarker)).ok() } + unsafe { (windows_core::Interface::vtable(self).currentMarker)(windows_core::Interface::as_raw(self), plmarker as _).ok() } } pub unsafe fn SetcurrentMarker(&self, lmarker: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetcurrentMarker)(windows_core::Interface::as_raw(self), lmarker).ok() } @@ -5274,22 +5274,22 @@ windows_core::imp::interface_hierarchy!(IWMPControls3, windows_core::IUnknown, s #[cfg(feature = "Win32_System_Com")] impl IWMPControls3 { pub unsafe fn audioLanguageCount(&self, plcount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).audioLanguageCount)(windows_core::Interface::as_raw(self), core::mem::transmute(plcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).audioLanguageCount)(windows_core::Interface::as_raw(self), plcount as _).ok() } } pub unsafe fn getAudioLanguageID(&self, lindex: i32, pllangid: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getAudioLanguageID)(windows_core::Interface::as_raw(self), lindex, core::mem::transmute(pllangid)).ok() } + unsafe { (windows_core::Interface::vtable(self).getAudioLanguageID)(windows_core::Interface::as_raw(self), lindex, pllangid as _).ok() } } pub unsafe fn getAudioLanguageDescription(&self, lindex: i32, pbstrlangdesc: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).getAudioLanguageDescription)(windows_core::Interface::as_raw(self), lindex, core::mem::transmute(pbstrlangdesc)).ok() } } pub unsafe fn currentAudioLanguage(&self, pllangid: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).currentAudioLanguage)(windows_core::Interface::as_raw(self), core::mem::transmute(pllangid)).ok() } + unsafe { (windows_core::Interface::vtable(self).currentAudioLanguage)(windows_core::Interface::as_raw(self), pllangid as _).ok() } } pub unsafe fn SetcurrentAudioLanguage(&self, llangid: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetcurrentAudioLanguage)(windows_core::Interface::as_raw(self), llangid).ok() } } pub unsafe fn currentAudioLanguageIndex(&self, plindex: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).currentAudioLanguageIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(plindex)).ok() } + unsafe { (windows_core::Interface::vtable(self).currentAudioLanguageIndex)(windows_core::Interface::as_raw(self), plindex as _).ok() } } pub unsafe fn SetcurrentAudioLanguageIndex(&self, lindex: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetcurrentAudioLanguageIndex)(windows_core::Interface::as_raw(self), lindex).ok() } @@ -5483,10 +5483,10 @@ impl IWMPCore { unsafe { (windows_core::Interface::vtable(self).SetURL)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrurl)).ok() } } pub unsafe fn openState(&self, pwmpos: *mut WMPOpenState) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).openState)(windows_core::Interface::as_raw(self), core::mem::transmute(pwmpos)).ok() } + unsafe { (windows_core::Interface::vtable(self).openState)(windows_core::Interface::as_raw(self), pwmpos as _).ok() } } pub unsafe fn playState(&self, pwmpps: *mut WMPPlayState) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).playState)(windows_core::Interface::as_raw(self), core::mem::transmute(pwmpps)).ok() } + unsafe { (windows_core::Interface::vtable(self).playState)(windows_core::Interface::as_raw(self), pwmpps as _).ok() } } pub unsafe fn controls(&self) -> windows_core::Result { unsafe { @@ -5561,7 +5561,7 @@ impl IWMPCore { } } pub unsafe fn isOnline(&self, pfonline: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).isOnline)(windows_core::Interface::as_raw(self), core::mem::transmute(pfonline)).ok() } + unsafe { (windows_core::Interface::vtable(self).isOnline)(windows_core::Interface::as_raw(self), pfonline as _).ok() } } pub unsafe fn error(&self) -> windows_core::Result { unsafe { @@ -5983,7 +5983,7 @@ windows_core::imp::interface_hierarchy!(IWMPDVD, windows_core::IUnknown, super:: #[cfg(feature = "Win32_System_Com")] impl IWMPDVD { pub unsafe fn get_isAvailable(&self, bstritem: &windows_core::BSTR, pisavailable: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_isAvailable)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstritem), core::mem::transmute(pisavailable)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_isAvailable)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstritem), pisavailable as _).ok() } } pub unsafe fn domain(&self, strdomain: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).domain)(windows_core::Interface::as_raw(self), core::mem::transmute(strdomain)).ok() } @@ -6090,10 +6090,10 @@ windows_core::imp::interface_hierarchy!(IWMPDownloadCollection, windows_core::IU #[cfg(feature = "Win32_System_Com")] impl IWMPDownloadCollection { pub unsafe fn id(&self, plid: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).id)(windows_core::Interface::as_raw(self), core::mem::transmute(plid)).ok() } + unsafe { (windows_core::Interface::vtable(self).id)(windows_core::Interface::as_raw(self), plid as _).ok() } } pub unsafe fn count(&self, plcount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).count)(windows_core::Interface::as_raw(self), core::mem::transmute(plcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).count)(windows_core::Interface::as_raw(self), plcount as _).ok() } } pub unsafe fn item(&self, litem: i32) -> windows_core::Result { unsafe { @@ -6218,16 +6218,16 @@ impl IWMPDownloadItem { unsafe { (windows_core::Interface::vtable(self).sourceURL)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrurl)).ok() } } pub unsafe fn size(&self, plsize: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).size)(windows_core::Interface::as_raw(self), core::mem::transmute(plsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).size)(windows_core::Interface::as_raw(self), plsize as _).ok() } } pub unsafe fn r#type(&self, pbstrtype: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).r#type)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrtype)).ok() } } pub unsafe fn progress(&self, plprogress: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).progress)(windows_core::Interface::as_raw(self), core::mem::transmute(plprogress)).ok() } + unsafe { (windows_core::Interface::vtable(self).progress)(windows_core::Interface::as_raw(self), plprogress as _).ok() } } pub unsafe fn downloadState(&self, pwmpsdls: *mut WMPSubscriptionDownloadState) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).downloadState)(windows_core::Interface::as_raw(self), core::mem::transmute(pwmpsdls)).ok() } + unsafe { (windows_core::Interface::vtable(self).downloadState)(windows_core::Interface::as_raw(self), pwmpsdls as _).ok() } } pub unsafe fn pause(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).pause)(windows_core::Interface::as_raw(self)).ok() } @@ -6458,13 +6458,13 @@ 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: super::super::Graphics::Gdi::HDC, prc: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Render)(windows_core::Interface::as_raw(self), core::mem::transmute(plevels), hdc, core::mem::transmute(prc)).ok() } + unsafe { (windows_core::Interface::vtable(self).Render)(windows_core::Interface::as_raw(self), plevels as _, hdc, prc as _).ok() } } pub unsafe fn MediaInfo(&self, lchannelcount: i32, lsamplerate: i32, bstrtitle: &windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).MediaInfo)(windows_core::Interface::as_raw(self), lchannelcount, lsamplerate, core::mem::transmute_copy(bstrtitle)).ok() } } pub unsafe fn GetCapabilities(&self, pdwcapabilities: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCapabilities)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwcapabilities)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCapabilities)(windows_core::Interface::as_raw(self), pdwcapabilities as _).ok() } } pub unsafe fn GetTitle(&self, bstrtitle: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetTitle)(windows_core::Interface::as_raw(self), core::mem::transmute(bstrtitle)).ok() } @@ -6473,13 +6473,13 @@ impl IWMPEffects { unsafe { (windows_core::Interface::vtable(self).GetPresetTitle)(windows_core::Interface::as_raw(self), npreset, core::mem::transmute(bstrpresettitle)).ok() } } pub unsafe fn GetPresetCount(&self, pnpresetcount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPresetCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pnpresetcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPresetCount)(windows_core::Interface::as_raw(self), pnpresetcount as _).ok() } } pub unsafe fn SetCurrentPreset(&self, npreset: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetCurrentPreset)(windows_core::Interface::as_raw(self), npreset).ok() } } pub unsafe fn GetCurrentPreset(&self, pnpreset: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrentPreset)(windows_core::Interface::as_raw(self), core::mem::transmute(pnpreset)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentPreset)(windows_core::Interface::as_raw(self), pnpreset as _).ok() } } pub unsafe fn DisplayPropertyPage(&self, hwndowner: super::super::Foundation::HWND) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DisplayPropertyPage)(windows_core::Interface::as_raw(self), hwndowner).ok() } @@ -6488,7 +6488,7 @@ impl IWMPEffects { unsafe { (windows_core::Interface::vtable(self).GoFullscreen)(windows_core::Interface::as_raw(self), ffullscreen.into()).ok() } } pub unsafe fn RenderFullScreen(&self, plevels: *mut TimedLevel) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RenderFullScreen)(windows_core::Interface::as_raw(self), core::mem::transmute(plevels)).ok() } + unsafe { (windows_core::Interface::vtable(self).RenderFullScreen)(windows_core::Interface::as_raw(self), plevels as _).ok() } } } #[repr(C)] @@ -6643,10 +6643,10 @@ impl IWMPEffects2 { unsafe { (windows_core::Interface::vtable(self).NotifyNewMedia)(windows_core::Interface::as_raw(self), pmedia.param().abi()).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<()> { - unsafe { (windows_core::Interface::vtable(self).OnWindowMessage)(windows_core::Interface::as_raw(self), msg, wparam, lparam, core::mem::transmute(plresultparam)).ok() } + unsafe { (windows_core::Interface::vtable(self).OnWindowMessage)(windows_core::Interface::as_raw(self), msg, wparam, lparam, plresultparam as _).ok() } } pub unsafe fn RenderWindowed(&self, pdata: *mut TimedLevel, frequiredrender: bool) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RenderWindowed)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata), frequiredrender.into()).ok() } + unsafe { (windows_core::Interface::vtable(self).RenderWindowed)(windows_core::Interface::as_raw(self), pdata as _, frequiredrender.into()).ok() } } } #[repr(C)] @@ -6746,7 +6746,7 @@ impl IWMPError { unsafe { (windows_core::Interface::vtable(self).clearErrorQueue)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn errorCount(&self, plnumerrors: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).errorCount)(windows_core::Interface::as_raw(self), core::mem::transmute(plnumerrors)).ok() } + unsafe { (windows_core::Interface::vtable(self).errorCount)(windows_core::Interface::as_raw(self), plnumerrors as _).ok() } } pub unsafe fn get_item(&self, dwindex: i32) -> windows_core::Result { unsafe { @@ -6835,7 +6835,7 @@ windows_core::imp::interface_hierarchy!(IWMPErrorItem, windows_core::IUnknown, s #[cfg(feature = "Win32_System_Com")] impl IWMPErrorItem { pub unsafe fn errorCode(&self, phr: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).errorCode)(windows_core::Interface::as_raw(self), core::mem::transmute(phr)).ok() } + unsafe { (windows_core::Interface::vtable(self).errorCode)(windows_core::Interface::as_raw(self), phr as _).ok() } } pub unsafe fn errorDescription(&self, pbstrdescription: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).errorDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrdescription)).ok() } @@ -6845,7 +6845,7 @@ impl IWMPErrorItem { unsafe { (windows_core::Interface::vtable(self).errorContext)(windows_core::Interface::as_raw(self), core::mem::transmute(pvarcontext)).ok() } } pub unsafe fn remedy(&self, plremedy: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).remedy)(windows_core::Interface::as_raw(self), core::mem::transmute(plremedy)).ok() } + unsafe { (windows_core::Interface::vtable(self).remedy)(windows_core::Interface::as_raw(self), plremedy as _).ok() } } pub unsafe fn customUrl(&self, pbstrcustomurl: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).customUrl)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrcustomurl)).ok() } @@ -6934,7 +6934,7 @@ windows_core::imp::interface_hierarchy!(IWMPErrorItem2, windows_core::IUnknown, #[cfg(feature = "Win32_System_Com")] impl IWMPErrorItem2 { pub unsafe fn condition(&self, plcondition: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).condition)(windows_core::Interface::as_raw(self), core::mem::transmute(plcondition)).ok() } + unsafe { (windows_core::Interface::vtable(self).condition)(windows_core::Interface::as_raw(self), plcondition as _).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -7948,7 +7948,7 @@ windows_core::imp::define_interface!(IWMPFolderMonitorServices, IWMPFolderMonito windows_core::imp::interface_hierarchy!(IWMPFolderMonitorServices, windows_core::IUnknown); impl IWMPFolderMonitorServices { pub unsafe fn count(&self, plcount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).count)(windows_core::Interface::as_raw(self), core::mem::transmute(plcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).count)(windows_core::Interface::as_raw(self), plcount as _).ok() } } pub unsafe fn item(&self, lindex: i32, pbstrfolder: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).item)(windows_core::Interface::as_raw(self), lindex, core::mem::transmute(pbstrfolder)).ok() } @@ -7960,19 +7960,19 @@ impl IWMPFolderMonitorServices { unsafe { (windows_core::Interface::vtable(self).remove)(windows_core::Interface::as_raw(self), lindex).ok() } } pub unsafe fn scanState(&self, pwmpfss: *mut WMPFolderScanState) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).scanState)(windows_core::Interface::as_raw(self), core::mem::transmute(pwmpfss)).ok() } + unsafe { (windows_core::Interface::vtable(self).scanState)(windows_core::Interface::as_raw(self), pwmpfss as _).ok() } } pub unsafe fn currentFolder(&self, pbstrfolder: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).currentFolder)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrfolder)).ok() } } pub unsafe fn scannedFilesCount(&self, plcount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).scannedFilesCount)(windows_core::Interface::as_raw(self), core::mem::transmute(plcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).scannedFilesCount)(windows_core::Interface::as_raw(self), plcount as _).ok() } } pub unsafe fn addedFilesCount(&self, plcount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).addedFilesCount)(windows_core::Interface::as_raw(self), core::mem::transmute(plcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).addedFilesCount)(windows_core::Interface::as_raw(self), plcount as _).ok() } } pub unsafe fn updateProgress(&self, plprogress: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).updateProgress)(windows_core::Interface::as_raw(self), core::mem::transmute(plprogress)).ok() } + unsafe { (windows_core::Interface::vtable(self).updateProgress)(windows_core::Interface::as_raw(self), plprogress as _).ok() } } pub unsafe fn startScan(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).startScan)(windows_core::Interface::as_raw(self)).ok() } @@ -8114,7 +8114,7 @@ impl IWMPGraphCreation { unsafe { (windows_core::Interface::vtable(self).GraphCreationPostRender)(windows_core::Interface::as_raw(self), pfiltergraph.param().abi()).ok() } } pub unsafe fn GetGraphCreationFlags(&self, pdwflags: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGraphCreationFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGraphCreationFlags)(windows_core::Interface::as_raw(self), pdwflags as _).ok() } } } #[repr(C)] @@ -8168,7 +8168,7 @@ impl IWMPLibrary { unsafe { (windows_core::Interface::vtable(self).name)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrname)).ok() } } pub unsafe fn r#type(&self, pwmplt: *mut WMPLibraryType) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).r#type)(windows_core::Interface::as_raw(self), core::mem::transmute(pwmplt)).ok() } + unsafe { (windows_core::Interface::vtable(self).r#type)(windows_core::Interface::as_raw(self), pwmplt as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn mediaCollection(&self) -> windows_core::Result { @@ -8181,7 +8181,7 @@ impl IWMPLibrary { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).isIdentical)(windows_core::Interface::as_raw(self), piwmplibrary.param().abi(), core::mem::transmute(pvbool)).ok() } + unsafe { (windows_core::Interface::vtable(self).isIdentical)(windows_core::Interface::as_raw(self), piwmplibrary.param().abi(), pvbool as _).ok() } } } #[repr(C)] @@ -8292,7 +8292,7 @@ windows_core::imp::define_interface!(IWMPLibraryServices, IWMPLibraryServices_Vt windows_core::imp::interface_hierarchy!(IWMPLibraryServices, windows_core::IUnknown); impl IWMPLibraryServices { pub unsafe fn getCountByType(&self, wmplt: WMPLibraryType, plcount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getCountByType)(windows_core::Interface::as_raw(self), wmplt, core::mem::transmute(plcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).getCountByType)(windows_core::Interface::as_raw(self), wmplt, plcount as _).ok() } } pub unsafe fn getLibraryByType(&self, wmplt: WMPLibraryType, lindex: i32) -> windows_core::Result { unsafe { @@ -8346,10 +8346,10 @@ windows_core::imp::define_interface!(IWMPLibrarySharingServices, IWMPLibraryShar windows_core::imp::interface_hierarchy!(IWMPLibrarySharingServices, windows_core::IUnknown); impl IWMPLibrarySharingServices { pub unsafe fn isLibraryShared(&self, pvbshared: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).isLibraryShared)(windows_core::Interface::as_raw(self), core::mem::transmute(pvbshared)).ok() } + unsafe { (windows_core::Interface::vtable(self).isLibraryShared)(windows_core::Interface::as_raw(self), pvbshared as _).ok() } } pub unsafe fn isLibrarySharingEnabled(&self, pvbenabled: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).isLibrarySharingEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(pvbenabled)).ok() } + unsafe { (windows_core::Interface::vtable(self).isLibrarySharingEnabled)(windows_core::Interface::as_raw(self), pvbenabled as _).ok() } } pub unsafe fn showLibrarySharing(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).showLibrarySharing)(windows_core::Interface::as_raw(self)).ok() } @@ -8416,7 +8416,7 @@ impl IWMPMedia { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).get_isIdentical)(windows_core::Interface::as_raw(self), piwmpmedia.param().abi(), core::mem::transmute(pvbool)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_isIdentical)(windows_core::Interface::as_raw(self), piwmpmedia.param().abi(), pvbool as _).ok() } } pub unsafe fn sourceURL(&self, pbstrsourceurl: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).sourceURL)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrsourceurl)).ok() } @@ -8428,28 +8428,28 @@ impl IWMPMedia { unsafe { (windows_core::Interface::vtable(self).Setname)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrname)).ok() } } pub unsafe fn imageSourceWidth(&self, pwidth: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).imageSourceWidth)(windows_core::Interface::as_raw(self), core::mem::transmute(pwidth)).ok() } + unsafe { (windows_core::Interface::vtable(self).imageSourceWidth)(windows_core::Interface::as_raw(self), pwidth as _).ok() } } pub unsafe fn imageSourceHeight(&self, pheight: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).imageSourceHeight)(windows_core::Interface::as_raw(self), core::mem::transmute(pheight)).ok() } + unsafe { (windows_core::Interface::vtable(self).imageSourceHeight)(windows_core::Interface::as_raw(self), pheight as _).ok() } } pub unsafe fn markerCount(&self, pmarkercount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).markerCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pmarkercount)).ok() } + unsafe { (windows_core::Interface::vtable(self).markerCount)(windows_core::Interface::as_raw(self), pmarkercount as _).ok() } } pub unsafe fn getMarkerTime(&self, markernum: i32, pmarkertime: *mut f64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getMarkerTime)(windows_core::Interface::as_raw(self), markernum, core::mem::transmute(pmarkertime)).ok() } + unsafe { (windows_core::Interface::vtable(self).getMarkerTime)(windows_core::Interface::as_raw(self), markernum, pmarkertime as _).ok() } } pub unsafe fn getMarkerName(&self, markernum: i32, pbstrmarkername: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).getMarkerName)(windows_core::Interface::as_raw(self), markernum, core::mem::transmute(pbstrmarkername)).ok() } } pub unsafe fn duration(&self, pduration: *mut f64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).duration)(windows_core::Interface::as_raw(self), core::mem::transmute(pduration)).ok() } + unsafe { (windows_core::Interface::vtable(self).duration)(windows_core::Interface::as_raw(self), pduration as _).ok() } } pub unsafe fn durationString(&self, pbstrduration: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).durationString)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrduration)).ok() } } pub unsafe fn attributeCount(&self, plcount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).attributeCount)(windows_core::Interface::as_raw(self), core::mem::transmute(plcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).attributeCount)(windows_core::Interface::as_raw(self), plcount as _).ok() } } pub unsafe fn getAttributeName(&self, lindex: i32, pbstritemname: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).getAttributeName)(windows_core::Interface::as_raw(self), lindex, core::mem::transmute(pbstritemname)).ok() } @@ -8467,10 +8467,10 @@ impl IWMPMedia { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).isMemberOf)(windows_core::Interface::as_raw(self), pplaylist.param().abi(), core::mem::transmute(pvarfismemberof)).ok() } + unsafe { (windows_core::Interface::vtable(self).isMemberOf)(windows_core::Interface::as_raw(self), pplaylist.param().abi(), pvarfismemberof as _).ok() } } pub unsafe fn isReadOnlyItem(&self, bstritemname: &windows_core::BSTR, pvarfisreadonly: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).isReadOnlyItem)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstritemname), core::mem::transmute(pvarfisreadonly)).ok() } + unsafe { (windows_core::Interface::vtable(self).isReadOnlyItem)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstritemname), pvarfisreadonly as _).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -8723,7 +8723,7 @@ windows_core::imp::interface_hierarchy!(IWMPMedia3, windows_core::IUnknown, supe #[cfg(feature = "Win32_System_Com")] impl IWMPMedia3 { pub unsafe fn getAttributeCountByType(&self, bstrtype: &windows_core::BSTR, bstrlanguage: &windows_core::BSTR, plcount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getAttributeCountByType)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrtype), core::mem::transmute_copy(bstrlanguage), core::mem::transmute(plcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).getAttributeCountByType)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrtype), core::mem::transmute_copy(bstrlanguage), plcount as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn getItemInfoByType(&self, bstrtype: &windows_core::BSTR, bstrlanguage: &windows_core::BSTR, lindex: i32, pvarvalue: *mut super::super::System::Variant::VARIANT) -> windows_core::Result<()> { @@ -8840,7 +8840,7 @@ impl IWMPMediaCollection { } } pub unsafe fn getMediaAtom(&self, bstritemname: &windows_core::BSTR, platom: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getMediaAtom)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstritemname), core::mem::transmute(platom)).ok() } + unsafe { (windows_core::Interface::vtable(self).getMediaAtom)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstritemname), platom as _).ok() } } pub unsafe fn setDeleted(&self, pitem: P0, varfisdeleted: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> where @@ -8852,7 +8852,7 @@ impl IWMPMediaCollection { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).isDeleted)(windows_core::Interface::as_raw(self), pitem.param().abi(), core::mem::transmute(pvarfisdeleted)).ok() } + unsafe { (windows_core::Interface::vtable(self).isDeleted)(windows_core::Interface::as_raw(self), pitem.param().abi(), pvarfisdeleted as _).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -9166,7 +9166,7 @@ impl IWMPMediaPluginRegistrar { P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).WMPRegisterPlayerPlugin)(windows_core::Interface::as_raw(self), pwszfriendlyname.param().abi(), pwszdescription.param().abi(), pwszuninstallstring.param().abi(), dwpriority, core::mem::transmute(guidplugintype), core::mem::transmute(clsid), cmediatypes, core::mem::transmute(pmediatypes)).ok() } + unsafe { (windows_core::Interface::vtable(self).WMPRegisterPlayerPlugin)(windows_core::Interface::as_raw(self), pwszfriendlyname.param().abi(), pwszdescription.param().abi(), pwszuninstallstring.param().abi(), dwpriority, core::mem::transmute(guidplugintype), core::mem::transmute(clsid), cmediatypes, pmediatypes as _).ok() } } pub unsafe fn WMPUnRegisterPlayerPlugin(&self, guidplugintype: windows_core::GUID, clsid: windows_core::GUID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).WMPUnRegisterPlayerPlugin)(windows_core::Interface::as_raw(self), core::mem::transmute(guidplugintype), core::mem::transmute(clsid)).ok() } @@ -9363,46 +9363,46 @@ windows_core::imp::interface_hierarchy!(IWMPNetwork, windows_core::IUnknown, sup #[cfg(feature = "Win32_System_Com")] impl IWMPNetwork { pub unsafe fn bandWidth(&self, plbandwidth: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).bandWidth)(windows_core::Interface::as_raw(self), core::mem::transmute(plbandwidth)).ok() } + unsafe { (windows_core::Interface::vtable(self).bandWidth)(windows_core::Interface::as_raw(self), plbandwidth as _).ok() } } pub unsafe fn recoveredPackets(&self, plrecoveredpackets: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).recoveredPackets)(windows_core::Interface::as_raw(self), core::mem::transmute(plrecoveredpackets)).ok() } + unsafe { (windows_core::Interface::vtable(self).recoveredPackets)(windows_core::Interface::as_raw(self), plrecoveredpackets as _).ok() } } pub unsafe fn sourceProtocol(&self, pbstrsourceprotocol: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).sourceProtocol)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrsourceprotocol)).ok() } } pub unsafe fn receivedPackets(&self, plreceivedpackets: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).receivedPackets)(windows_core::Interface::as_raw(self), core::mem::transmute(plreceivedpackets)).ok() } + unsafe { (windows_core::Interface::vtable(self).receivedPackets)(windows_core::Interface::as_raw(self), plreceivedpackets as _).ok() } } pub unsafe fn lostPackets(&self, pllostpackets: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).lostPackets)(windows_core::Interface::as_raw(self), core::mem::transmute(pllostpackets)).ok() } + unsafe { (windows_core::Interface::vtable(self).lostPackets)(windows_core::Interface::as_raw(self), pllostpackets as _).ok() } } pub unsafe fn receptionQuality(&self, plreceptionquality: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).receptionQuality)(windows_core::Interface::as_raw(self), core::mem::transmute(plreceptionquality)).ok() } + unsafe { (windows_core::Interface::vtable(self).receptionQuality)(windows_core::Interface::as_raw(self), plreceptionquality as _).ok() } } pub unsafe fn bufferingCount(&self, plbufferingcount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).bufferingCount)(windows_core::Interface::as_raw(self), core::mem::transmute(plbufferingcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).bufferingCount)(windows_core::Interface::as_raw(self), plbufferingcount as _).ok() } } pub unsafe fn bufferingProgress(&self, plbufferingprogress: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).bufferingProgress)(windows_core::Interface::as_raw(self), core::mem::transmute(plbufferingprogress)).ok() } + unsafe { (windows_core::Interface::vtable(self).bufferingProgress)(windows_core::Interface::as_raw(self), plbufferingprogress as _).ok() } } pub unsafe fn bufferingTime(&self, plbufferingtime: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).bufferingTime)(windows_core::Interface::as_raw(self), core::mem::transmute(plbufferingtime)).ok() } + unsafe { (windows_core::Interface::vtable(self).bufferingTime)(windows_core::Interface::as_raw(self), plbufferingtime as _).ok() } } pub unsafe fn SetbufferingTime(&self, lbufferingtime: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetbufferingTime)(windows_core::Interface::as_raw(self), lbufferingtime).ok() } } pub unsafe fn frameRate(&self, plframerate: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).frameRate)(windows_core::Interface::as_raw(self), core::mem::transmute(plframerate)).ok() } + unsafe { (windows_core::Interface::vtable(self).frameRate)(windows_core::Interface::as_raw(self), plframerate as _).ok() } } pub unsafe fn maxBitRate(&self, plbitrate: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).maxBitRate)(windows_core::Interface::as_raw(self), core::mem::transmute(plbitrate)).ok() } + unsafe { (windows_core::Interface::vtable(self).maxBitRate)(windows_core::Interface::as_raw(self), plbitrate as _).ok() } } pub unsafe fn bitRate(&self, plbitrate: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).bitRate)(windows_core::Interface::as_raw(self), core::mem::transmute(plbitrate)).ok() } + unsafe { (windows_core::Interface::vtable(self).bitRate)(windows_core::Interface::as_raw(self), plbitrate as _).ok() } } pub unsafe fn getProxySettings(&self, bstrprotocol: &windows_core::BSTR, plproxysetting: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getProxySettings)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrprotocol), core::mem::transmute(plproxysetting)).ok() } + unsafe { (windows_core::Interface::vtable(self).getProxySettings)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrprotocol), plproxysetting as _).ok() } } pub unsafe fn setProxySettings(&self, bstrprotocol: &windows_core::BSTR, lproxysetting: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).setProxySettings)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrprotocol), lproxysetting).ok() } @@ -9414,7 +9414,7 @@ impl IWMPNetwork { unsafe { (windows_core::Interface::vtable(self).setProxyName)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrprotocol), core::mem::transmute_copy(bstrproxyname)).ok() } } pub unsafe fn getProxyPort(&self, bstrprotocol: &windows_core::BSTR, lproxyport: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getProxyPort)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrprotocol), core::mem::transmute(lproxyport)).ok() } + unsafe { (windows_core::Interface::vtable(self).getProxyPort)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrprotocol), lproxyport as _).ok() } } pub unsafe fn setProxyPort(&self, bstrprotocol: &windows_core::BSTR, lproxyport: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).setProxyPort)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrprotocol), lproxyport).ok() } @@ -9426,25 +9426,25 @@ impl IWMPNetwork { unsafe { (windows_core::Interface::vtable(self).setProxyExceptionList)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrprotocol), core::mem::transmute_copy(pbstrexceptionlist)).ok() } } pub unsafe fn getProxyBypassForLocal(&self, bstrprotocol: &windows_core::BSTR, pfbypassforlocal: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getProxyBypassForLocal)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrprotocol), core::mem::transmute(pfbypassforlocal)).ok() } + unsafe { (windows_core::Interface::vtable(self).getProxyBypassForLocal)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrprotocol), pfbypassforlocal as _).ok() } } pub unsafe fn setProxyBypassForLocal(&self, bstrprotocol: &windows_core::BSTR, fbypassforlocal: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).setProxyBypassForLocal)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrprotocol), fbypassforlocal).ok() } } pub unsafe fn maxBandwidth(&self, lmaxbandwidth: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).maxBandwidth)(windows_core::Interface::as_raw(self), core::mem::transmute(lmaxbandwidth)).ok() } + unsafe { (windows_core::Interface::vtable(self).maxBandwidth)(windows_core::Interface::as_raw(self), lmaxbandwidth as _).ok() } } pub unsafe fn SetmaxBandwidth(&self, lmaxbandwidth: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetmaxBandwidth)(windows_core::Interface::as_raw(self), lmaxbandwidth).ok() } } pub unsafe fn downloadProgress(&self, pldownloadprogress: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).downloadProgress)(windows_core::Interface::as_raw(self), core::mem::transmute(pldownloadprogress)).ok() } + unsafe { (windows_core::Interface::vtable(self).downloadProgress)(windows_core::Interface::as_raw(self), pldownloadprogress as _).ok() } } pub unsafe fn encodedFrameRate(&self, plframerate: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).encodedFrameRate)(windows_core::Interface::as_raw(self), core::mem::transmute(plframerate)).ok() } + unsafe { (windows_core::Interface::vtable(self).encodedFrameRate)(windows_core::Interface::as_raw(self), plframerate as _).ok() } } pub unsafe fn framesSkipped(&self, plframes: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).framesSkipped)(windows_core::Interface::as_raw(self), core::mem::transmute(plframes)).ok() } + unsafe { (windows_core::Interface::vtable(self).framesSkipped)(windows_core::Interface::as_raw(self), plframes as _).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -9724,25 +9724,25 @@ windows_core::imp::define_interface!(IWMPNodeRealEstate, IWMPNodeRealEstate_Vtbl windows_core::imp::interface_hierarchy!(IWMPNodeRealEstate, windows_core::IUnknown); impl IWMPNodeRealEstate { pub unsafe fn GetDesiredSize(&self, psize: *mut super::super::Foundation::SIZE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesiredSize)(windows_core::Interface::as_raw(self), core::mem::transmute(psize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesiredSize)(windows_core::Interface::as_raw(self), psize as _).ok() } } pub unsafe fn SetRects(&self, psrc: *const super::super::Foundation::RECT, pdest: *const super::super::Foundation::RECT, pclip: *const super::super::Foundation::RECT) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetRects)(windows_core::Interface::as_raw(self), psrc, pdest, pclip).ok() } } pub unsafe fn GetRects(&self, psrc: *mut super::super::Foundation::RECT, pdest: *mut super::super::Foundation::RECT, pclip: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRects)(windows_core::Interface::as_raw(self), core::mem::transmute(psrc), core::mem::transmute(pdest), core::mem::transmute(pclip)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRects)(windows_core::Interface::as_raw(self), psrc as _, pdest as _, pclip as _).ok() } } pub unsafe fn SetWindowless(&self, fwindowless: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetWindowless)(windows_core::Interface::as_raw(self), fwindowless.into()).ok() } } pub unsafe fn GetWindowless(&self, pfwindowless: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWindowless)(windows_core::Interface::as_raw(self), core::mem::transmute(pfwindowless)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWindowless)(windows_core::Interface::as_raw(self), pfwindowless as _).ok() } } pub unsafe fn SetFullScreen(&self, ffullscreen: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetFullScreen)(windows_core::Interface::as_raw(self), ffullscreen.into()).ok() } } pub unsafe fn GetFullScreen(&self, pffullscreen: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFullScreen)(windows_core::Interface::as_raw(self), core::mem::transmute(pffullscreen)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFullScreen)(windows_core::Interface::as_raw(self), pffullscreen as _).ok() } } } #[repr(C)] @@ -9829,7 +9829,7 @@ windows_core::imp::define_interface!(IWMPNodeRealEstateHost, IWMPNodeRealEstateH windows_core::imp::interface_hierarchy!(IWMPNodeRealEstateHost, windows_core::IUnknown); impl IWMPNodeRealEstateHost { pub unsafe fn OnDesiredSizeChange(&self, psize: *mut super::super::Foundation::SIZE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OnDesiredSizeChange)(windows_core::Interface::as_raw(self), core::mem::transmute(psize)).ok() } + unsafe { (windows_core::Interface::vtable(self).OnDesiredSizeChange)(windows_core::Interface::as_raw(self), psize as _).ok() } } pub unsafe fn OnFullScreenTransition(&self, ffullscreen: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OnFullScreenTransition)(windows_core::Interface::as_raw(self), ffullscreen.into()).ok() } @@ -9877,7 +9877,7 @@ impl IWMPNodeWindowed { unsafe { (windows_core::Interface::vtable(self).SetOwnerWindow)(windows_core::Interface::as_raw(self), hwnd).ok() } } pub unsafe fn GetOwnerWindow(&self, phwnd: *mut isize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOwnerWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(phwnd)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOwnerWindow)(windows_core::Interface::as_raw(self), phwnd as _).ok() } } } #[repr(C)] @@ -9919,7 +9919,7 @@ windows_core::imp::define_interface!(IWMPNodeWindowedHost, IWMPNodeWindowedHost_ windows_core::imp::interface_hierarchy!(IWMPNodeWindowedHost, windows_core::IUnknown); impl IWMPNodeWindowedHost { 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<()> { - unsafe { (windows_core::Interface::vtable(self).OnWindowMessageFromRenderer)(windows_core::Interface::as_raw(self), umsg, wparam, lparam, core::mem::transmute(plret), core::mem::transmute(pfhandled)).ok() } + unsafe { (windows_core::Interface::vtable(self).OnWindowMessageFromRenderer)(windows_core::Interface::as_raw(self), umsg, wparam, lparam, plret as _, pfhandled as _).ok() } } } #[repr(C)] @@ -10025,19 +10025,19 @@ windows_core::imp::interface_hierarchy!(IWMPPlayer, windows_core::IUnknown, supe #[cfg(feature = "Win32_System_Com")] impl IWMPPlayer { pub unsafe fn enabled(&self, pbenabled: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).enabled)(windows_core::Interface::as_raw(self), core::mem::transmute(pbenabled)).ok() } + unsafe { (windows_core::Interface::vtable(self).enabled)(windows_core::Interface::as_raw(self), pbenabled as _).ok() } } pub unsafe fn Setenabled(&self, benabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Setenabled)(windows_core::Interface::as_raw(self), benabled).ok() } } pub unsafe fn fullScreen(&self, pbfullscreen: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).fullScreen)(windows_core::Interface::as_raw(self), core::mem::transmute(pbfullscreen)).ok() } + unsafe { (windows_core::Interface::vtable(self).fullScreen)(windows_core::Interface::as_raw(self), pbfullscreen as _).ok() } } pub unsafe fn SetfullScreen(&self, bfullscreen: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetfullScreen)(windows_core::Interface::as_raw(self), bfullscreen).ok() } } pub unsafe fn enableContextMenu(&self, pbenablecontextmenu: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).enableContextMenu)(windows_core::Interface::as_raw(self), core::mem::transmute(pbenablecontextmenu)).ok() } + unsafe { (windows_core::Interface::vtable(self).enableContextMenu)(windows_core::Interface::as_raw(self), pbenablecontextmenu as _).ok() } } pub unsafe fn SetenableContextMenu(&self, benablecontextmenu: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetenableContextMenu)(windows_core::Interface::as_raw(self), benablecontextmenu).ok() } @@ -10156,19 +10156,19 @@ windows_core::imp::interface_hierarchy!(IWMPPlayer2, windows_core::IUnknown, sup #[cfg(feature = "Win32_System_Com")] impl IWMPPlayer2 { pub unsafe fn enabled(&self, pbenabled: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).enabled)(windows_core::Interface::as_raw(self), core::mem::transmute(pbenabled)).ok() } + unsafe { (windows_core::Interface::vtable(self).enabled)(windows_core::Interface::as_raw(self), pbenabled as _).ok() } } pub unsafe fn Setenabled(&self, benabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Setenabled)(windows_core::Interface::as_raw(self), benabled).ok() } } pub unsafe fn fullScreen(&self, pbfullscreen: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).fullScreen)(windows_core::Interface::as_raw(self), core::mem::transmute(pbfullscreen)).ok() } + unsafe { (windows_core::Interface::vtable(self).fullScreen)(windows_core::Interface::as_raw(self), pbfullscreen as _).ok() } } pub unsafe fn SetfullScreen(&self, bfullscreen: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetfullScreen)(windows_core::Interface::as_raw(self), bfullscreen).ok() } } pub unsafe fn enableContextMenu(&self, pbenablecontextmenu: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).enableContextMenu)(windows_core::Interface::as_raw(self), core::mem::transmute(pbenablecontextmenu)).ok() } + unsafe { (windows_core::Interface::vtable(self).enableContextMenu)(windows_core::Interface::as_raw(self), pbenablecontextmenu as _).ok() } } pub unsafe fn SetenableContextMenu(&self, benablecontextmenu: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetenableContextMenu)(windows_core::Interface::as_raw(self), benablecontextmenu).ok() } @@ -10180,13 +10180,13 @@ impl IWMPPlayer2 { unsafe { (windows_core::Interface::vtable(self).uiMode)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrmode)).ok() } } pub unsafe fn stretchToFit(&self, pbenabled: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).stretchToFit)(windows_core::Interface::as_raw(self), core::mem::transmute(pbenabled)).ok() } + unsafe { (windows_core::Interface::vtable(self).stretchToFit)(windows_core::Interface::as_raw(self), pbenabled as _).ok() } } pub unsafe fn SetstretchToFit(&self, benabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetstretchToFit)(windows_core::Interface::as_raw(self), benabled).ok() } } pub unsafe fn windowlessVideo(&self, pbenabled: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).windowlessVideo)(windows_core::Interface::as_raw(self), core::mem::transmute(pbenabled)).ok() } + unsafe { (windows_core::Interface::vtable(self).windowlessVideo)(windows_core::Interface::as_raw(self), pbenabled as _).ok() } } pub unsafe fn SetwindowlessVideo(&self, benabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetwindowlessVideo)(windows_core::Interface::as_raw(self), benabled).ok() } @@ -10335,19 +10335,19 @@ windows_core::imp::interface_hierarchy!(IWMPPlayer3, windows_core::IUnknown, sup #[cfg(feature = "Win32_System_Com")] impl IWMPPlayer3 { pub unsafe fn enabled(&self, pbenabled: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).enabled)(windows_core::Interface::as_raw(self), core::mem::transmute(pbenabled)).ok() } + unsafe { (windows_core::Interface::vtable(self).enabled)(windows_core::Interface::as_raw(self), pbenabled as _).ok() } } pub unsafe fn Setenabled(&self, benabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Setenabled)(windows_core::Interface::as_raw(self), benabled).ok() } } pub unsafe fn fullScreen(&self, pbfullscreen: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).fullScreen)(windows_core::Interface::as_raw(self), core::mem::transmute(pbfullscreen)).ok() } + unsafe { (windows_core::Interface::vtable(self).fullScreen)(windows_core::Interface::as_raw(self), pbfullscreen as _).ok() } } pub unsafe fn SetfullScreen(&self, bfullscreen: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetfullScreen)(windows_core::Interface::as_raw(self), bfullscreen).ok() } } pub unsafe fn enableContextMenu(&self, pbenablecontextmenu: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).enableContextMenu)(windows_core::Interface::as_raw(self), core::mem::transmute(pbenablecontextmenu)).ok() } + unsafe { (windows_core::Interface::vtable(self).enableContextMenu)(windows_core::Interface::as_raw(self), pbenablecontextmenu as _).ok() } } pub unsafe fn SetenableContextMenu(&self, benablecontextmenu: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetenableContextMenu)(windows_core::Interface::as_raw(self), benablecontextmenu).ok() } @@ -10359,13 +10359,13 @@ impl IWMPPlayer3 { unsafe { (windows_core::Interface::vtable(self).uiMode)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrmode)).ok() } } pub unsafe fn stretchToFit(&self, pbenabled: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).stretchToFit)(windows_core::Interface::as_raw(self), core::mem::transmute(pbenabled)).ok() } + unsafe { (windows_core::Interface::vtable(self).stretchToFit)(windows_core::Interface::as_raw(self), pbenabled as _).ok() } } pub unsafe fn SetstretchToFit(&self, benabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetstretchToFit)(windows_core::Interface::as_raw(self), benabled).ok() } } pub unsafe fn windowlessVideo(&self, pbenabled: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).windowlessVideo)(windows_core::Interface::as_raw(self), core::mem::transmute(pbenabled)).ok() } + unsafe { (windows_core::Interface::vtable(self).windowlessVideo)(windows_core::Interface::as_raw(self), pbenabled as _).ok() } } pub unsafe fn SetwindowlessVideo(&self, benabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetwindowlessVideo)(windows_core::Interface::as_raw(self), benabled).ok() } @@ -10514,19 +10514,19 @@ windows_core::imp::interface_hierarchy!(IWMPPlayer4, windows_core::IUnknown, sup #[cfg(feature = "Win32_System_Com")] impl IWMPPlayer4 { pub unsafe fn enabled(&self, pbenabled: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).enabled)(windows_core::Interface::as_raw(self), core::mem::transmute(pbenabled)).ok() } + unsafe { (windows_core::Interface::vtable(self).enabled)(windows_core::Interface::as_raw(self), pbenabled as _).ok() } } pub unsafe fn Setenabled(&self, benabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Setenabled)(windows_core::Interface::as_raw(self), benabled).ok() } } pub unsafe fn fullScreen(&self, pbfullscreen: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).fullScreen)(windows_core::Interface::as_raw(self), core::mem::transmute(pbfullscreen)).ok() } + unsafe { (windows_core::Interface::vtable(self).fullScreen)(windows_core::Interface::as_raw(self), pbfullscreen as _).ok() } } pub unsafe fn SetfullScreen(&self, bfullscreen: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetfullScreen)(windows_core::Interface::as_raw(self), bfullscreen).ok() } } pub unsafe fn enableContextMenu(&self, pbenablecontextmenu: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).enableContextMenu)(windows_core::Interface::as_raw(self), core::mem::transmute(pbenablecontextmenu)).ok() } + unsafe { (windows_core::Interface::vtable(self).enableContextMenu)(windows_core::Interface::as_raw(self), pbenablecontextmenu as _).ok() } } pub unsafe fn SetenableContextMenu(&self, benablecontextmenu: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetenableContextMenu)(windows_core::Interface::as_raw(self), benablecontextmenu).ok() } @@ -10538,19 +10538,19 @@ impl IWMPPlayer4 { unsafe { (windows_core::Interface::vtable(self).uiMode)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrmode)).ok() } } pub unsafe fn stretchToFit(&self, pbenabled: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).stretchToFit)(windows_core::Interface::as_raw(self), core::mem::transmute(pbenabled)).ok() } + unsafe { (windows_core::Interface::vtable(self).stretchToFit)(windows_core::Interface::as_raw(self), pbenabled as _).ok() } } pub unsafe fn SetstretchToFit(&self, benabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetstretchToFit)(windows_core::Interface::as_raw(self), benabled).ok() } } pub unsafe fn windowlessVideo(&self, pbenabled: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).windowlessVideo)(windows_core::Interface::as_raw(self), core::mem::transmute(pbenabled)).ok() } + unsafe { (windows_core::Interface::vtable(self).windowlessVideo)(windows_core::Interface::as_raw(self), pbenabled as _).ok() } } pub unsafe fn SetwindowlessVideo(&self, benabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetwindowlessVideo)(windows_core::Interface::as_raw(self), benabled).ok() } } pub unsafe fn isRemote(&self, pvarfisremote: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).isRemote)(windows_core::Interface::as_raw(self), core::mem::transmute(pvarfisremote)).ok() } + unsafe { (windows_core::Interface::vtable(self).isRemote)(windows_core::Interface::as_raw(self), pvarfisremote as _).ok() } } pub unsafe fn playerApplication(&self) -> windows_core::Result { unsafe { @@ -10744,10 +10744,10 @@ impl IWMPPlayerApplication { unsafe { (windows_core::Interface::vtable(self).switchToControl)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn playerDocked(&self, pbplayerdocked: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).playerDocked)(windows_core::Interface::as_raw(self), core::mem::transmute(pbplayerdocked)).ok() } + unsafe { (windows_core::Interface::vtable(self).playerDocked)(windows_core::Interface::as_raw(self), pbplayerdocked as _).ok() } } pub unsafe fn hasDisplay(&self, pbhasdisplay: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).hasDisplay)(windows_core::Interface::as_raw(self), core::mem::transmute(pbhasdisplay)).ok() } + unsafe { (windows_core::Interface::vtable(self).hasDisplay)(windows_core::Interface::as_raw(self), pbhasdisplay as _).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -10914,7 +10914,7 @@ windows_core::imp::interface_hierarchy!(IWMPPlaylist, windows_core::IUnknown, su #[cfg(feature = "Win32_System_Com")] impl IWMPPlaylist { pub unsafe fn count(&self, plcount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).count)(windows_core::Interface::as_raw(self), core::mem::transmute(plcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).count)(windows_core::Interface::as_raw(self), plcount as _).ok() } } pub unsafe fn name(&self, pbstrname: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).name)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrname)).ok() } @@ -10923,7 +10923,7 @@ impl IWMPPlaylist { unsafe { (windows_core::Interface::vtable(self).Setname)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrname)).ok() } } pub unsafe fn attributeCount(&self, plcount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).attributeCount)(windows_core::Interface::as_raw(self), core::mem::transmute(plcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).attributeCount)(windows_core::Interface::as_raw(self), plcount as _).ok() } } pub unsafe fn get_attributeName(&self, lindex: i32, pbstrattributename: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).get_attributeName)(windows_core::Interface::as_raw(self), lindex, core::mem::transmute(pbstrattributename)).ok() } @@ -10944,7 +10944,7 @@ impl IWMPPlaylist { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).get_isIdentical)(windows_core::Interface::as_raw(self), piwmpplaylist.param().abi(), core::mem::transmute(pvbool)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_isIdentical)(windows_core::Interface::as_raw(self), piwmpplaylist.param().abi(), pvbool as _).ok() } } pub unsafe fn clear(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).clear)(windows_core::Interface::as_raw(self)).ok() } @@ -11138,7 +11138,7 @@ windows_core::imp::interface_hierarchy!(IWMPPlaylistArray, windows_core::IUnknow #[cfg(feature = "Win32_System_Com")] impl IWMPPlaylistArray { pub unsafe fn count(&self, plcount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).count)(windows_core::Interface::as_raw(self), core::mem::transmute(plcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).count)(windows_core::Interface::as_raw(self), plcount as _).ok() } } pub unsafe fn item(&self, lindex: i32) -> windows_core::Result { unsafe { @@ -11235,7 +11235,7 @@ impl IWMPPlaylistCollection { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).isDeleted)(windows_core::Interface::as_raw(self), pitem.param().abi(), core::mem::transmute(pvarfisdeleted)).ok() } + unsafe { (windows_core::Interface::vtable(self).isDeleted)(windows_core::Interface::as_raw(self), pitem.param().abi(), pvarfisdeleted as _).ok() } } pub unsafe fn importPlaylist(&self, pitem: P0) -> windows_core::Result where @@ -11365,10 +11365,10 @@ impl IWMPPlugin { unsafe { (windows_core::Interface::vtable(self).Shutdown)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetID(&self, pguid: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetID)(windows_core::Interface::as_raw(self), core::mem::transmute(pguid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetID)(windows_core::Interface::as_raw(self), pguid as _).ok() } } pub unsafe fn GetCaps(&self, pdwflags: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), pdwflags as _).ok() } } pub unsafe fn AdviseWMPServices(&self, pwmpservices: P0) -> windows_core::Result<()> where @@ -11458,7 +11458,7 @@ impl IWMPPluginEnable { unsafe { (windows_core::Interface::vtable(self).SetEnable)(windows_core::Interface::as_raw(self), fenable.into()).ok() } } pub unsafe fn GetEnable(&self, pfenable: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEnable)(windows_core::Interface::as_raw(self), core::mem::transmute(pfenable)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEnable)(windows_core::Interface::as_raw(self), pfenable as _).ok() } } } #[repr(C)] @@ -11507,7 +11507,7 @@ impl IWMPPluginUI { unsafe { (windows_core::Interface::vtable(self).SetCore)(windows_core::Interface::as_raw(self), pcore.param().abi()).ok() } } pub unsafe fn Create(&self, hwndparent: super::super::Foundation::HWND, phwndwindow: *mut super::super::Foundation::HWND) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Create)(windows_core::Interface::as_raw(self), hwndparent, core::mem::transmute(phwndwindow)).ok() } + unsafe { (windows_core::Interface::vtable(self).Create)(windows_core::Interface::as_raw(self), hwndparent, phwndwindow as _).ok() } } pub unsafe fn Destroy(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Destroy)(windows_core::Interface::as_raw(self)).ok() } @@ -11531,7 +11531,7 @@ impl IWMPPluginUI { } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn TranslateAccelerator(&self, lpmsg: *mut super::super::UI::WindowsAndMessaging::MSG) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TranslateAccelerator)(windows_core::Interface::as_raw(self), core::mem::transmute(lpmsg)).ok() } + unsafe { (windows_core::Interface::vtable(self).TranslateAccelerator)(windows_core::Interface::as_raw(self), lpmsg as _).ok() } } } #[repr(C)] @@ -11771,7 +11771,7 @@ impl IWMPRenderConfig { unsafe { (windows_core::Interface::vtable(self).SetinProcOnly)(windows_core::Interface::as_raw(self), finproc.into()).ok() } } pub unsafe fn inProcOnly(&self, pfinproc: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).inProcOnly)(windows_core::Interface::as_raw(self), core::mem::transmute(pfinproc)).ok() } + unsafe { (windows_core::Interface::vtable(self).inProcOnly)(windows_core::Interface::as_raw(self), pfinproc as _).ok() } } } #[repr(C)] @@ -11813,10 +11813,10 @@ windows_core::imp::define_interface!(IWMPServices, IWMPServices_Vtbl, 0xafb6b76b windows_core::imp::interface_hierarchy!(IWMPServices, windows_core::IUnknown); impl IWMPServices { pub unsafe fn GetStreamTime(&self, prt: *mut i64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStreamTime)(windows_core::Interface::as_raw(self), core::mem::transmute(prt)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStreamTime)(windows_core::Interface::as_raw(self), prt as _).ok() } } pub unsafe fn GetStreamState(&self, pstate: *mut WMPServices_StreamState) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStreamState)(windows_core::Interface::as_raw(self), core::mem::transmute(pstate)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStreamState)(windows_core::Interface::as_raw(self), pstate as _).ok() } } } #[repr(C)] @@ -11868,10 +11868,10 @@ windows_core::imp::interface_hierarchy!(IWMPSettings, windows_core::IUnknown, su #[cfg(feature = "Win32_System_Com")] impl IWMPSettings { pub unsafe fn get_isAvailable(&self, bstritem: &windows_core::BSTR, pisavailable: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_isAvailable)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstritem), core::mem::transmute(pisavailable)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_isAvailable)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstritem), pisavailable as _).ok() } } pub unsafe fn autoStart(&self, pfautostart: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).autoStart)(windows_core::Interface::as_raw(self), core::mem::transmute(pfautostart)).ok() } + unsafe { (windows_core::Interface::vtable(self).autoStart)(windows_core::Interface::as_raw(self), pfautostart as _).ok() } } pub unsafe fn SetautoStart(&self, fautostart: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetautoStart)(windows_core::Interface::as_raw(self), fautostart).ok() } @@ -11889,49 +11889,49 @@ impl IWMPSettings { unsafe { (windows_core::Interface::vtable(self).SetdefaultFrame)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrdefaultframe)).ok() } } pub unsafe fn invokeURLs(&self, pfinvokeurls: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).invokeURLs)(windows_core::Interface::as_raw(self), core::mem::transmute(pfinvokeurls)).ok() } + unsafe { (windows_core::Interface::vtable(self).invokeURLs)(windows_core::Interface::as_raw(self), pfinvokeurls as _).ok() } } pub unsafe fn SetinvokeURLs(&self, finvokeurls: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetinvokeURLs)(windows_core::Interface::as_raw(self), finvokeurls).ok() } } pub unsafe fn mute(&self, pfmute: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).mute)(windows_core::Interface::as_raw(self), core::mem::transmute(pfmute)).ok() } + unsafe { (windows_core::Interface::vtable(self).mute)(windows_core::Interface::as_raw(self), pfmute as _).ok() } } pub unsafe fn Setmute(&self, fmute: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Setmute)(windows_core::Interface::as_raw(self), fmute).ok() } } pub unsafe fn playCount(&self, plcount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).playCount)(windows_core::Interface::as_raw(self), core::mem::transmute(plcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).playCount)(windows_core::Interface::as_raw(self), plcount as _).ok() } } pub unsafe fn SetplayCount(&self, lcount: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetplayCount)(windows_core::Interface::as_raw(self), lcount).ok() } } pub unsafe fn rate(&self, pdrate: *mut f64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).rate)(windows_core::Interface::as_raw(self), core::mem::transmute(pdrate)).ok() } + unsafe { (windows_core::Interface::vtable(self).rate)(windows_core::Interface::as_raw(self), pdrate as _).ok() } } pub unsafe fn Setrate(&self, drate: f64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Setrate)(windows_core::Interface::as_raw(self), drate).ok() } } pub unsafe fn balance(&self, plbalance: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).balance)(windows_core::Interface::as_raw(self), core::mem::transmute(plbalance)).ok() } + unsafe { (windows_core::Interface::vtable(self).balance)(windows_core::Interface::as_raw(self), plbalance as _).ok() } } pub unsafe fn Setbalance(&self, lbalance: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Setbalance)(windows_core::Interface::as_raw(self), lbalance).ok() } } pub unsafe fn volume(&self, plvolume: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).volume)(windows_core::Interface::as_raw(self), core::mem::transmute(plvolume)).ok() } + unsafe { (windows_core::Interface::vtable(self).volume)(windows_core::Interface::as_raw(self), plvolume as _).ok() } } pub unsafe fn Setvolume(&self, lvolume: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Setvolume)(windows_core::Interface::as_raw(self), lvolume).ok() } } pub unsafe fn getMode(&self, bstrmode: &windows_core::BSTR, pvarfmode: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getMode)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrmode), core::mem::transmute(pvarfmode)).ok() } + unsafe { (windows_core::Interface::vtable(self).getMode)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrmode), pvarfmode as _).ok() } } pub unsafe fn setMode(&self, bstrmode: &windows_core::BSTR, varfmode: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).setMode)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrmode), varfmode).ok() } } pub unsafe fn enableErrorDialogs(&self, pfenableerrordialogs: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).enableErrorDialogs)(windows_core::Interface::as_raw(self), core::mem::transmute(pfenableerrordialogs)).ok() } + unsafe { (windows_core::Interface::vtable(self).enableErrorDialogs)(windows_core::Interface::as_raw(self), pfenableerrordialogs as _).ok() } } pub unsafe fn SetenableErrorDialogs(&self, fenableerrordialogs: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetenableErrorDialogs)(windows_core::Interface::as_raw(self), fenableerrordialogs).ok() } @@ -12179,13 +12179,13 @@ windows_core::imp::interface_hierarchy!(IWMPSettings2, windows_core::IUnknown, s #[cfg(feature = "Win32_System_Com")] impl IWMPSettings2 { pub unsafe fn defaultAudioLanguage(&self, pllangid: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).defaultAudioLanguage)(windows_core::Interface::as_raw(self), core::mem::transmute(pllangid)).ok() } + unsafe { (windows_core::Interface::vtable(self).defaultAudioLanguage)(windows_core::Interface::as_raw(self), pllangid as _).ok() } } pub unsafe fn mediaAccessRights(&self, pbstrrights: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).mediaAccessRights)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrrights)).ok() } } pub unsafe fn requestMediaAccessRights(&self, bstrdesiredaccess: &windows_core::BSTR, pvbaccepted: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).requestMediaAccessRights)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrdesiredaccess), core::mem::transmute(pvbaccepted)).ok() } + unsafe { (windows_core::Interface::vtable(self).requestMediaAccessRights)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrdesiredaccess), pvbaccepted as _).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -12280,7 +12280,7 @@ windows_core::imp::interface_hierarchy!(IWMPStringCollection, windows_core::IUnk #[cfg(feature = "Win32_System_Com")] impl IWMPStringCollection { pub unsafe fn count(&self, plcount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).count)(windows_core::Interface::as_raw(self), core::mem::transmute(plcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).count)(windows_core::Interface::as_raw(self), plcount as _).ok() } } pub unsafe fn item(&self, lindex: i32, pbstrstring: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).item)(windows_core::Interface::as_raw(self), lindex, core::mem::transmute(pbstrstring)).ok() } @@ -12338,13 +12338,13 @@ impl IWMPStringCollection2 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).isIdentical)(windows_core::Interface::as_raw(self), piwmpstringcollection2.param().abi(), core::mem::transmute(pvbool)).ok() } + unsafe { (windows_core::Interface::vtable(self).isIdentical)(windows_core::Interface::as_raw(self), piwmpstringcollection2.param().abi(), pvbool as _).ok() } } pub unsafe fn getItemInfo(&self, lcollectionindex: i32, bstritemname: &windows_core::BSTR, pbstrvalue: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).getItemInfo)(windows_core::Interface::as_raw(self), lcollectionindex, core::mem::transmute_copy(bstritemname), core::mem::transmute(pbstrvalue)).ok() } } pub unsafe fn getAttributeCountByType(&self, lcollectionindex: i32, bstrtype: &windows_core::BSTR, bstrlanguage: &windows_core::BSTR, plcount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getAttributeCountByType)(windows_core::Interface::as_raw(self), lcollectionindex, core::mem::transmute_copy(bstrtype), core::mem::transmute_copy(bstrlanguage), core::mem::transmute(plcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).getAttributeCountByType)(windows_core::Interface::as_raw(self), lcollectionindex, core::mem::transmute_copy(bstrtype), core::mem::transmute_copy(bstrlanguage), plcount as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn getItemInfoByType(&self, lcollectionindex: i32, bstrtype: &windows_core::BSTR, bstrlanguage: &windows_core::BSTR, lattributeindex: i32, pvarvalue: *mut super::super::System::Variant::VARIANT) -> windows_core::Result<()> { @@ -12419,21 +12419,21 @@ impl IWMPSubscriptionService { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).allowPlay)(windows_core::Interface::as_raw(self), hwnd, pmedia.param().abi(), core::mem::transmute(pfallowplay)).ok() } + unsafe { (windows_core::Interface::vtable(self).allowPlay)(windows_core::Interface::as_raw(self), hwnd, pmedia.param().abi(), pfallowplay as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn allowCDBurn(&self, hwnd: super::super::Foundation::HWND, pplaylist: P1, pfallowburn: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).allowCDBurn)(windows_core::Interface::as_raw(self), hwnd, pplaylist.param().abi(), core::mem::transmute(pfallowburn)).ok() } + unsafe { (windows_core::Interface::vtable(self).allowCDBurn)(windows_core::Interface::as_raw(self), hwnd, pplaylist.param().abi(), pfallowburn as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn allowPDATransfer(&self, hwnd: super::super::Foundation::HWND, pplaylist: P1, pfallowtransfer: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).allowPDATransfer)(windows_core::Interface::as_raw(self), hwnd, pplaylist.param().abi(), core::mem::transmute(pfallowtransfer)).ok() } + unsafe { (windows_core::Interface::vtable(self).allowPDATransfer)(windows_core::Interface::as_raw(self), hwnd, pplaylist.param().abi(), pfallowtransfer as _).ok() } } pub unsafe fn startBackgroundProcessing(&self, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).startBackgroundProcessing)(windows_core::Interface::as_raw(self), hwnd).ok() } @@ -12634,19 +12634,19 @@ impl IWMPSyncDevice { unsafe { (windows_core::Interface::vtable(self).deviceId)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrdeviceid)).ok() } } pub unsafe fn partnershipIndex(&self, plindex: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).partnershipIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(plindex)).ok() } + unsafe { (windows_core::Interface::vtable(self).partnershipIndex)(windows_core::Interface::as_raw(self), plindex as _).ok() } } pub unsafe fn connected(&self, pvbconnected: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).connected)(windows_core::Interface::as_raw(self), core::mem::transmute(pvbconnected)).ok() } + unsafe { (windows_core::Interface::vtable(self).connected)(windows_core::Interface::as_raw(self), pvbconnected as _).ok() } } pub unsafe fn status(&self, pwmpds: *mut WMPDeviceStatus) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).status)(windows_core::Interface::as_raw(self), core::mem::transmute(pwmpds)).ok() } + unsafe { (windows_core::Interface::vtable(self).status)(windows_core::Interface::as_raw(self), pwmpds as _).ok() } } pub unsafe fn syncState(&self, pwmpss: *mut WMPSyncState) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).syncState)(windows_core::Interface::as_raw(self), core::mem::transmute(pwmpss)).ok() } + unsafe { (windows_core::Interface::vtable(self).syncState)(windows_core::Interface::as_raw(self), pwmpss as _).ok() } } pub unsafe fn progress(&self, plprogress: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).progress)(windows_core::Interface::as_raw(self), core::mem::transmute(plprogress)).ok() } + unsafe { (windows_core::Interface::vtable(self).progress)(windows_core::Interface::as_raw(self), plprogress as _).ok() } } pub unsafe fn getItemInfo(&self, bstritemname: &windows_core::BSTR, pbstrval: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).getItemInfo)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstritemname), core::mem::transmute(pbstrval)).ok() } @@ -12670,7 +12670,7 @@ impl IWMPSyncDevice { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).isIdentical)(windows_core::Interface::as_raw(self), pdevice.param().abi(), core::mem::transmute(pvbool)).ok() } + unsafe { (windows_core::Interface::vtable(self).isIdentical)(windows_core::Interface::as_raw(self), pdevice.param().abi(), pvbool as _).ok() } } } #[repr(C)] @@ -12936,7 +12936,7 @@ windows_core::imp::define_interface!(IWMPSyncServices, IWMPSyncServices_Vtbl, 0x windows_core::imp::interface_hierarchy!(IWMPSyncServices, windows_core::IUnknown); impl IWMPSyncServices { pub unsafe fn deviceCount(&self, plcount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).deviceCount)(windows_core::Interface::as_raw(self), core::mem::transmute(plcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).deviceCount)(windows_core::Interface::as_raw(self), plcount as _).ok() } } pub unsafe fn getDevice(&self, lindex: i32) -> windows_core::Result { unsafe { @@ -12990,7 +12990,7 @@ windows_core::imp::define_interface!(IWMPTranscodePolicy, IWMPTranscodePolicy_Vt windows_core::imp::interface_hierarchy!(IWMPTranscodePolicy, windows_core::IUnknown); impl IWMPTranscodePolicy { pub unsafe fn allowTranscode(&self, pvballow: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).allowTranscode)(windows_core::Interface::as_raw(self), core::mem::transmute(pvballow)).ok() } + unsafe { (windows_core::Interface::vtable(self).allowTranscode)(windows_core::Interface::as_raw(self), pvballow as _).ok() } } } #[repr(C)] @@ -13090,7 +13090,7 @@ windows_core::imp::define_interface!(IWMPWindowMessageSink, IWMPWindowMessageSin windows_core::imp::interface_hierarchy!(IWMPWindowMessageSink, windows_core::IUnknown); impl IWMPWindowMessageSink { 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<()> { - unsafe { (windows_core::Interface::vtable(self).OnWindowMessage)(windows_core::Interface::as_raw(self), umsg, wparam, lparam, core::mem::transmute(plret), core::mem::transmute(pfhandled)).ok() } + unsafe { (windows_core::Interface::vtable(self).OnWindowMessage)(windows_core::Interface::as_raw(self), umsg, wparam, lparam, plret as _, pfhandled as _).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 6079275ad7..be88b4f2b3 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/Multimedia/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/Multimedia/mod.rs @@ -64,7 +64,7 @@ where P0: windows_core::Param, { windows_targets::link!("avifil32.dll" "system" fn AVIFileInfoA(pfile : * mut core::ffi::c_void, pfi : *mut AVIFILEINFOA, lsize : i32) -> windows_core::HRESULT); - unsafe { AVIFileInfoA(pfile.param().abi(), core::mem::transmute(pfi), lsize).ok() } + unsafe { AVIFileInfoA(pfile.param().abi(), pfi as _, lsize).ok() } } #[inline] pub unsafe fn AVIFileInfoW(pfile: P0, pfi: *mut AVIFILEINFOW, lsize: i32) -> windows_core::Result<()> @@ -72,7 +72,7 @@ where P0: windows_core::Param, { windows_targets::link!("avifil32.dll" "system" fn AVIFileInfoW(pfile : * mut core::ffi::c_void, pfi : *mut AVIFILEINFOW, lsize : i32) -> windows_core::HRESULT); - unsafe { AVIFileInfoW(pfile.param().abi(), core::mem::transmute(pfi), lsize).ok() } + unsafe { AVIFileInfoW(pfile.param().abi(), pfi as _, lsize).ok() } } #[inline] pub unsafe fn AVIFileInit() { @@ -85,7 +85,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); - unsafe { AVIFileOpenA(core::mem::transmute(ppfile), szfile.param().abi(), umode, core::mem::transmute(lphandler.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { AVIFileOpenA(core::mem::transmute(ppfile), szfile.param().abi(), umode, lphandler.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn AVIFileOpenW(ppfile: *mut Option, szfile: P1, umode: u32, lphandler: Option<*const windows_core::GUID>) -> windows_core::Result<()> @@ -93,7 +93,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); - unsafe { AVIFileOpenW(core::mem::transmute(ppfile), szfile.param().abi(), umode, core::mem::transmute(lphandler.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { AVIFileOpenW(core::mem::transmute(ppfile), szfile.param().abi(), umode, lphandler.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn AVIFileReadData(pfile: P0, ckid: u32, lpdata: *mut core::ffi::c_void, lpcbdata: *mut i32) -> windows_core::Result<()> @@ -101,7 +101,7 @@ where P0: windows_core::Param, { windows_targets::link!("avifil32.dll" "system" fn AVIFileReadData(pfile : * mut core::ffi::c_void, ckid : u32, lpdata : *mut core::ffi::c_void, lpcbdata : *mut i32) -> windows_core::HRESULT); - unsafe { AVIFileReadData(pfile.param().abi(), ckid, core::mem::transmute(lpdata), core::mem::transmute(lpcbdata)).ok() } + unsafe { AVIFileReadData(pfile.param().abi(), ckid, lpdata as _, lpcbdata as _).ok() } } #[inline] pub unsafe fn AVIFileRelease(pfile: P0) -> u32 @@ -133,7 +133,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); - unsafe { AVIMakeCompressedStream(core::mem::transmute(ppscompressed), ppssource.param().abi(), lpoptions, core::mem::transmute(pclsidhandler.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { AVIMakeCompressedStream(core::mem::transmute(ppscompressed), ppssource.param().abi(), lpoptions, pclsidhandler.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn AVIMakeFileFromStreams(ppfile: *mut Option, papstreams: &[Option]) -> windows_core::Result<()> { @@ -163,12 +163,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); - unsafe { AVISaveA(szfile.param().abi(), core::mem::transmute(pclsidhandler.unwrap_or(core::mem::zeroed())), lpfncallback, nstreams, pfile.param().abi(), lpoptions).ok() } + unsafe { AVISaveA(szfile.param().abi(), pclsidhandler.unwrap_or(core::mem::zeroed()) as _, lpfncallback, nstreams, pfile.param().abi(), lpoptions).ok() } } #[inline] 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); - unsafe { AVISaveOptions(hwnd, uiflags, nstreams, core::mem::transmute(ppavi), core::mem::transmute(plpoptions)) } + unsafe { AVISaveOptions(hwnd, uiflags, nstreams, core::mem::transmute(ppavi), plpoptions as _) } } #[inline] pub unsafe fn AVISaveOptionsFree(plpoptions: &[*const AVICOMPRESSOPTIONS]) -> windows_core::Result<()> { @@ -181,7 +181,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); - unsafe { AVISaveVA(szfile.param().abi(), core::mem::transmute(pclsidhandler.unwrap_or(core::mem::zeroed())), lpfncallback, nstreams, core::mem::transmute(ppavi), plpoptions).ok() } + unsafe { AVISaveVA(szfile.param().abi(), pclsidhandler.unwrap_or(core::mem::zeroed()) as _, lpfncallback, nstreams, core::mem::transmute(ppavi), plpoptions).ok() } } #[inline] pub unsafe fn AVISaveVW(szfile: P0, pclsidhandler: Option<*const windows_core::GUID>, lpfncallback: AVISAVECALLBACK, nstreams: i32, ppavi: *const Option, plpoptions: *const *const AVICOMPRESSOPTIONS) -> windows_core::Result<()> @@ -189,7 +189,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); - unsafe { AVISaveVW(szfile.param().abi(), core::mem::transmute(pclsidhandler.unwrap_or(core::mem::zeroed())), lpfncallback, nstreams, core::mem::transmute(ppavi), plpoptions).ok() } + unsafe { AVISaveVW(szfile.param().abi(), pclsidhandler.unwrap_or(core::mem::zeroed()) as _, lpfncallback, nstreams, core::mem::transmute(ppavi), plpoptions).ok() } } #[inline] pub unsafe fn AVISaveW(szfile: P0, pclsidhandler: Option<*const windows_core::GUID>, lpfncallback: AVISAVECALLBACK, nstreams: i32, pfile: P4, lpoptions: *const AVICOMPRESSOPTIONS) -> windows_core::Result<()> @@ -198,7 +198,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); - unsafe { AVISaveW(szfile.param().abi(), core::mem::transmute(pclsidhandler.unwrap_or(core::mem::zeroed())), lpfncallback, nstreams, pfile.param().abi(), lpoptions).ok() } + unsafe { AVISaveW(szfile.param().abi(), pclsidhandler.unwrap_or(core::mem::zeroed()) as _, lpfncallback, nstreams, pfile.param().abi(), lpoptions).ok() } } #[inline] pub unsafe fn AVIStreamAddRef(pavi: P0) -> u32 @@ -219,7 +219,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); - unsafe { AVIStreamCreate(core::mem::transmute(ppavi), lparam1, lparam2, core::mem::transmute(pclsidhandler.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { AVIStreamCreate(core::mem::transmute(ppavi), lparam1, lparam2, pclsidhandler.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn AVIStreamEndStreaming(pavi: P0) -> windows_core::Result<()> @@ -260,7 +260,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 >); - unsafe { AVIStreamGetFrameOpen(pavi.param().abi(), core::mem::transmute(lpbiwanted.unwrap_or(core::mem::zeroed()))) } + unsafe { AVIStreamGetFrameOpen(pavi.param().abi(), lpbiwanted.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn AVIStreamInfoA(pavi: P0, psi: *mut AVISTREAMINFOA, lsize: i32) -> windows_core::Result<()> @@ -268,7 +268,7 @@ where P0: windows_core::Param, { windows_targets::link!("avifil32.dll" "system" fn AVIStreamInfoA(pavi : * mut core::ffi::c_void, psi : *mut AVISTREAMINFOA, lsize : i32) -> windows_core::HRESULT); - unsafe { AVIStreamInfoA(pavi.param().abi(), core::mem::transmute(psi), lsize).ok() } + unsafe { AVIStreamInfoA(pavi.param().abi(), psi as _, lsize).ok() } } #[inline] pub unsafe fn AVIStreamInfoW(pavi: P0, psi: *mut AVISTREAMINFOW, lsize: i32) -> windows_core::Result<()> @@ -276,7 +276,7 @@ where P0: windows_core::Param, { windows_targets::link!("avifil32.dll" "system" fn AVIStreamInfoW(pavi : * mut core::ffi::c_void, psi : *mut AVISTREAMINFOW, lsize : i32) -> windows_core::HRESULT); - unsafe { AVIStreamInfoW(pavi.param().abi(), core::mem::transmute(psi), lsize).ok() } + unsafe { AVIStreamInfoW(pavi.param().abi(), psi as _, lsize).ok() } } #[inline] pub unsafe fn AVIStreamLength(pavi: P0) -> i32 @@ -292,7 +292,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); - unsafe { AVIStreamOpenFromFileA(core::mem::transmute(ppavi), szfile.param().abi(), fcctype, lparam, mode, core::mem::transmute(pclsidhandler.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { AVIStreamOpenFromFileA(core::mem::transmute(ppavi), szfile.param().abi(), fcctype, lparam, mode, pclsidhandler.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -300,7 +300,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); - unsafe { AVIStreamOpenFromFileW(core::mem::transmute(ppavi), szfile.param().abi(), fcctype, lparam, mode, core::mem::transmute(pclsidhandler.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { AVIStreamOpenFromFileW(core::mem::transmute(ppavi), szfile.param().abi(), fcctype, lparam, mode, pclsidhandler.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -308,7 +308,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); - unsafe { AVIStreamRead(pavi.param().abi(), lstart, lsamples, core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), cbbuffer, core::mem::transmute(plbytes.unwrap_or(core::mem::zeroed())), core::mem::transmute(plsamples.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { AVIStreamRead(pavi.param().abi(), lstart, lsamples, lpbuffer.unwrap_or(core::mem::zeroed()) as _, cbbuffer, plbytes.unwrap_or(core::mem::zeroed()) as _, plsamples.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn AVIStreamReadData(pavi: P0, fcc: u32, lp: Option<*mut core::ffi::c_void>, lpcb: *mut i32) -> windows_core::Result<()> @@ -316,7 +316,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); - unsafe { AVIStreamReadData(pavi.param().abi(), fcc, core::mem::transmute(lp.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcb)).ok() } + unsafe { AVIStreamReadData(pavi.param().abi(), fcc, lp.unwrap_or(core::mem::zeroed()) as _, lpcb as _).ok() } } #[inline] pub unsafe fn AVIStreamReadFormat(pavi: P0, lpos: i32, lpformat: Option<*mut core::ffi::c_void>, lpcbformat: *mut i32) -> windows_core::Result<()> @@ -324,7 +324,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); - unsafe { AVIStreamReadFormat(pavi.param().abi(), lpos, core::mem::transmute(lpformat.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbformat)).ok() } + unsafe { AVIStreamReadFormat(pavi.param().abi(), lpos, lpformat.unwrap_or(core::mem::zeroed()) as _, lpcbformat as _).ok() } } #[inline] pub unsafe fn AVIStreamRelease(pavi: P0) -> u32 @@ -372,7 +372,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); - unsafe { AVIStreamWrite(pavi.param().abi(), lstart, lsamples, lpbuffer, cbbuffer, dwflags, core::mem::transmute(plsampwritten.unwrap_or(core::mem::zeroed())), core::mem::transmute(plbyteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { AVIStreamWrite(pavi.param().abi(), lstart, lsamples, lpbuffer, cbbuffer, dwflags, plsampwritten.unwrap_or(core::mem::zeroed()) as _, plbyteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn AVIStreamWriteData(pavi: P0, fcc: u32, lp: *const core::ffi::c_void, cb: i32) -> windows_core::Result<()> @@ -404,7 +404,7 @@ pub unsafe fn DefDriverProc(dwdriveridentifier: usize, hdrvr: HDRVR, umsg: u32, #[inline] 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); - unsafe { DrawDibBegin(hdd, core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), dxdst, dydst, lpbi, dxsrc, dysrc, wflags) } + unsafe { DrawDibBegin(hdd, hdc.unwrap_or(core::mem::zeroed()) as _, dxdst, dydst, lpbi, dxsrc, dysrc, wflags) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -421,7 +421,7 @@ pub unsafe fn DrawDibClose(hdd: isize) -> super::super::Foundation::BOOL { #[inline] 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); - unsafe { DrawDibDraw(hdd, hdc, xdst, ydst, dxdst, dydst, core::mem::transmute(lpbi.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpbits.unwrap_or(core::mem::zeroed())), xsrc, ysrc, dxsrc, dysrc, wflags) } + unsafe { DrawDibDraw(hdd, hdc, xdst, ydst, dxdst, dydst, lpbi.unwrap_or(core::mem::zeroed()) as _, lpbits.unwrap_or(core::mem::zeroed()) as _, xsrc, ysrc, dxsrc, dysrc, wflags) } } #[inline] pub unsafe fn DrawDibEnd(hdd: isize) -> super::super::Foundation::BOOL { @@ -432,7 +432,7 @@ pub unsafe fn DrawDibEnd(hdd: isize) -> super::super::Foundation::BOOL { #[inline] pub unsafe fn DrawDibGetBuffer(hdd: isize, lpbi: *mut super::super::Graphics::Gdi::BITMAPINFOHEADER, dwsize: u32, dwflags: u32) -> *mut core::ffi::c_void { windows_targets::link!("msvfw32.dll" "system" fn DrawDibGetBuffer(hdd : isize, lpbi : *mut super::super::Graphics::Gdi:: BITMAPINFOHEADER, dwsize : u32, dwflags : u32) -> *mut core::ffi::c_void); - unsafe { DrawDibGetBuffer(hdd, core::mem::transmute(lpbi), dwsize, dwflags) } + unsafe { DrawDibGetBuffer(hdd, lpbi as _, dwsize, dwflags) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -461,7 +461,7 @@ pub unsafe fn DrawDibRealize(hdd: isize, hdc: super::super::Graphics::Gdi::HDC, #[inline] 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); - unsafe { DrawDibSetPalette(hdd, core::mem::transmute(hpal.unwrap_or(core::mem::zeroed()))) } + unsafe { DrawDibSetPalette(hdd, hpal.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn DrawDibStart(hdd: isize, rate: u32) -> super::super::Foundation::BOOL { @@ -476,7 +476,7 @@ pub unsafe fn DrawDibStop(hdd: isize) -> super::super::Foundation::BOOL { #[inline] pub unsafe fn DrawDibTime(hdd: isize, lpddtime: *mut DRAWDIBTIME) -> super::super::Foundation::BOOL { windows_targets::link!("msvfw32.dll" "system" fn DrawDibTime(hdd : isize, lpddtime : *mut DRAWDIBTIME) -> super::super::Foundation:: BOOL); - unsafe { DrawDibTime(hdd, core::mem::transmute(lpddtime)) } + unsafe { DrawDibTime(hdd, lpddtime as _) } } #[inline] pub unsafe fn DriverCallback(dwcallback: usize, dwflags: u32, hdevice: HDRVR, dwmsg: u32, dwuser: usize, dwparam1: usize, dwparam2: usize) -> super::super::Foundation::BOOL { @@ -505,7 +505,7 @@ where P0: windows_core::Param, { windows_targets::link!("avifil32.dll" "system" fn EditStreamCopy(pavi : * mut core::ffi::c_void, plstart : *mut i32, pllength : *mut i32, ppresult : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { EditStreamCopy(pavi.param().abi(), core::mem::transmute(plstart), core::mem::transmute(pllength), core::mem::transmute(ppresult)).ok() } + unsafe { EditStreamCopy(pavi.param().abi(), plstart as _, pllength as _, core::mem::transmute(ppresult)).ok() } } #[inline] pub unsafe fn EditStreamCut(pavi: P0, plstart: *mut i32, pllength: *mut i32, ppresult: *mut Option) -> windows_core::Result<()> @@ -513,7 +513,7 @@ where P0: windows_core::Param, { windows_targets::link!("avifil32.dll" "system" fn EditStreamCut(pavi : * mut core::ffi::c_void, plstart : *mut i32, pllength : *mut i32, ppresult : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { EditStreamCut(pavi.param().abi(), core::mem::transmute(plstart), core::mem::transmute(pllength), core::mem::transmute(ppresult)).ok() } + unsafe { EditStreamCut(pavi.param().abi(), plstart as _, pllength as _, core::mem::transmute(ppresult)).ok() } } #[inline] pub unsafe fn EditStreamPaste(pavi: P0, plpos: *mut i32, pllength: *mut i32, pstream: P3, lstart: i32, lend: i32) -> windows_core::Result<()> @@ -522,7 +522,7 @@ where P3: windows_core::Param, { windows_targets::link!("avifil32.dll" "system" fn EditStreamPaste(pavi : * mut core::ffi::c_void, plpos : *mut i32, pllength : *mut i32, pstream : * mut core::ffi::c_void, lstart : i32, lend : i32) -> windows_core::HRESULT); - unsafe { EditStreamPaste(pavi.param().abi(), core::mem::transmute(plpos), core::mem::transmute(pllength), pstream.param().abi(), lstart, lend).ok() } + unsafe { EditStreamPaste(pavi.param().abi(), plpos as _, pllength as _, pstream.param().abi(), lstart, lend).ok() } } #[inline] pub unsafe fn EditStreamSetInfoA(pavi: P0, lpinfo: *const AVISTREAMINFOA, cbinfo: i32) -> windows_core::Result<()> @@ -567,25 +567,25 @@ pub unsafe fn GetDriverModuleHandle(hdriver: HDRVR) -> super::super::Foundation: #[inline] pub unsafe fn GetOpenFileNamePreviewA(lpofn: *mut super::super::UI::Controls::Dialogs::OPENFILENAMEA) -> super::super::Foundation::BOOL { windows_targets::link!("msvfw32.dll" "system" fn GetOpenFileNamePreviewA(lpofn : *mut super::super::UI::Controls::Dialogs:: OPENFILENAMEA) -> super::super::Foundation:: BOOL); - unsafe { GetOpenFileNamePreviewA(core::mem::transmute(lpofn)) } + unsafe { GetOpenFileNamePreviewA(lpofn as _) } } #[cfg(feature = "Win32_UI_Controls_Dialogs")] #[inline] pub unsafe fn GetOpenFileNamePreviewW(lpofn: *mut super::super::UI::Controls::Dialogs::OPENFILENAMEW) -> super::super::Foundation::BOOL { windows_targets::link!("msvfw32.dll" "system" fn GetOpenFileNamePreviewW(lpofn : *mut super::super::UI::Controls::Dialogs:: OPENFILENAMEW) -> super::super::Foundation:: BOOL); - unsafe { GetOpenFileNamePreviewW(core::mem::transmute(lpofn)) } + unsafe { GetOpenFileNamePreviewW(lpofn as _) } } #[cfg(feature = "Win32_UI_Controls_Dialogs")] #[inline] pub unsafe fn GetSaveFileNamePreviewA(lpofn: *mut super::super::UI::Controls::Dialogs::OPENFILENAMEA) -> super::super::Foundation::BOOL { windows_targets::link!("msvfw32.dll" "system" fn GetSaveFileNamePreviewA(lpofn : *mut super::super::UI::Controls::Dialogs:: OPENFILENAMEA) -> super::super::Foundation:: BOOL); - unsafe { GetSaveFileNamePreviewA(core::mem::transmute(lpofn)) } + unsafe { GetSaveFileNamePreviewA(lpofn as _) } } #[cfg(feature = "Win32_UI_Controls_Dialogs")] #[inline] pub unsafe fn GetSaveFileNamePreviewW(lpofn: *mut super::super::UI::Controls::Dialogs::OPENFILENAMEW) -> super::super::Foundation::BOOL { windows_targets::link!("msvfw32.dll" "system" fn GetSaveFileNamePreviewW(lpofn : *mut super::super::UI::Controls::Dialogs:: OPENFILENAMEW) -> super::super::Foundation:: BOOL); - unsafe { GetSaveFileNamePreviewW(core::mem::transmute(lpofn)) } + unsafe { GetSaveFileNamePreviewW(lpofn as _) } } #[inline] pub unsafe fn ICClose(hic: HIC) -> super::super::Foundation::LRESULT { @@ -596,7 +596,7 @@ pub unsafe fn ICClose(hic: HIC) -> super::super::Foundation::LRESULT { #[inline] 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); - unsafe { ICCompress(hic, dwflags, lpbioutput, core::mem::transmute(lpdata), lpbiinput, lpbits, core::mem::transmute(lpckid.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwflags.unwrap_or(core::mem::zeroed())), lframenum, dwframesize, dwquality, core::mem::transmute(lpbiprev.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpprev.unwrap_or(core::mem::zeroed()))) } + unsafe { ICCompress(hic, dwflags, lpbioutput, lpdata as _, lpbiinput, lpbits, lpckid.unwrap_or(core::mem::zeroed()) as _, lpdwflags.unwrap_or(core::mem::zeroed()) as _, lframenum, dwframesize, dwquality, lpbiprev.unwrap_or(core::mem::zeroed()) as _, lpprev.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -605,7 +605,7 @@ where 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); - unsafe { ICCompressorChoose(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), 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()) } + unsafe { ICCompressorChoose(hwnd.unwrap_or(core::mem::zeroed()) as _, uiflags, pvin.unwrap_or(core::mem::zeroed()) as _, lpdata.unwrap_or(core::mem::zeroed()) as _, pc as _, lpsztitle.param().abi()) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -617,46 +617,46 @@ pub unsafe fn ICCompressorFree(pc: *const COMPVARS) { #[inline] 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); - unsafe { ICDecompress(hic, dwflags, lpbiformat, lpdata, lpbi, core::mem::transmute(lpbits)) } + unsafe { ICDecompress(hic, dwflags, lpbiformat, lpdata, lpbi, lpbits as _) } } #[inline] 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); - unsafe { ICDraw(hic, dwflags, lpformat, core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), cbdata, ltime) } + unsafe { ICDraw(hic, dwflags, lpformat, lpdata.unwrap_or(core::mem::zeroed()) as _, cbdata, ltime) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { ICDrawBegin(hic, 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())), xdst, ydst, dxdst, dydst, lpbi, xsrc, ysrc, dxsrc, dysrc, dwrate, dwscale) } + unsafe { ICDrawBegin(hic, dwflags, hpal.unwrap_or(core::mem::zeroed()) as _, hwnd.unwrap_or(core::mem::zeroed()) as _, hdc.unwrap_or(core::mem::zeroed()) as _, xdst, ydst, dxdst, dydst, lpbi, xsrc, ysrc, dxsrc, dysrc, dwrate, dwscale) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { ICGetDisplayFormat(core::mem::transmute(hic.unwrap_or(core::mem::zeroed())), lpbiin, core::mem::transmute(lpbiout), bitdepth, dx, dy) } + unsafe { ICGetDisplayFormat(hic.unwrap_or(core::mem::zeroed()) as _, lpbiin, lpbiout as _, bitdepth, dx, dy) } } #[inline] 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); - unsafe { ICGetInfo(hic, core::mem::transmute(picinfo), cb) } + unsafe { ICGetInfo(hic, picinfo as _, cb) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { ICImageCompress(hic, uiflags, lpbiin, lpbits, core::mem::transmute(lpbiout.unwrap_or(core::mem::zeroed())), lquality, core::mem::transmute(plsize.unwrap_or(core::mem::zeroed()))) } + unsafe { ICImageCompress(hic, uiflags, lpbiin, lpbits, lpbiout.unwrap_or(core::mem::zeroed()) as _, lquality, plsize.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { ICImageDecompress(core::mem::transmute(hic.unwrap_or(core::mem::zeroed())), uiflags, lpbiin, lpbits, core::mem::transmute(lpbiout.unwrap_or(core::mem::zeroed()))) } + unsafe { ICImageDecompress(hic.unwrap_or(core::mem::zeroed()) as _, uiflags, lpbiin, lpbits, lpbiout.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ICInfo(fcctype: u32, fcchandler: u32, lpicinfo: *mut ICINFO) -> super::super::Foundation::BOOL { windows_targets::link!("msvfw32.dll" "system" fn ICInfo(fcctype : u32, fcchandler : u32, lpicinfo : *mut ICINFO) -> super::super::Foundation:: BOOL); - unsafe { ICInfo(fcctype, fcchandler, core::mem::transmute(lpicinfo)) } + unsafe { ICInfo(fcctype, fcchandler, lpicinfo as _) } } #[inline] pub unsafe fn ICInstall(fcctype: u32, fcchandler: u32, lparam: super::super::Foundation::LPARAM, szdesc: P3, wflags: u32) -> super::super::Foundation::BOOL @@ -670,7 +670,7 @@ where #[inline] pub unsafe fn ICLocate(fcctype: u32, fcchandler: u32, lpbiin: *const super::super::Graphics::Gdi::BITMAPINFOHEADER, lpbiout: Option<*const super::super::Graphics::Gdi::BITMAPINFOHEADER>, wflags: u16) -> HIC { windows_targets::link!("msvfw32.dll" "system" fn ICLocate(fcctype : u32, fcchandler : u32, lpbiin : *const super::super::Graphics::Gdi:: BITMAPINFOHEADER, lpbiout : *const super::super::Graphics::Gdi:: BITMAPINFOHEADER, wflags : u16) -> HIC); - unsafe { ICLocate(fcctype, fcchandler, lpbiin, core::mem::transmute(lpbiout.unwrap_or(core::mem::zeroed())), wflags) } + unsafe { ICLocate(fcctype, fcchandler, lpbiin, lpbiout.unwrap_or(core::mem::zeroed()) as _, wflags) } } #[inline] pub unsafe fn ICOpen(fcctype: u32, fcchandler: u32, wmode: u32) -> HIC { @@ -696,7 +696,7 @@ pub unsafe fn ICSendMessage(hic: HIC, msg: u32, dw1: usize, dw2: usize) -> super #[inline] 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); - unsafe { ICSeqCompressFrame(pc, core::mem::transmute(uiflags.unwrap_or(core::mem::zeroed())), lpbits, core::mem::transmute(pfkey), core::mem::transmute(plsize.unwrap_or(core::mem::zeroed()))) } + unsafe { ICSeqCompressFrame(pc, uiflags.unwrap_or(core::mem::zeroed()) as _, lpbits, pfkey as _, plsize.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -716,7 +716,7 @@ where 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); - unsafe { MCIWndCreateA(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), dwstyle, szfile.param().abi()) } + unsafe { MCIWndCreateA(hwndparent.unwrap_or(core::mem::zeroed()) as _, hinstance.unwrap_or(core::mem::zeroed()) as _, dwstyle, szfile.param().abi()) } } #[inline] pub unsafe fn MCIWndCreateW(hwndparent: Option, hinstance: Option, dwstyle: u32, szfile: P3) -> super::super::Foundation::HWND @@ -724,7 +724,7 @@ where 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); - unsafe { MCIWndCreateW(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), dwstyle, szfile.param().abi()) } + unsafe { MCIWndCreateW(hwndparent.unwrap_or(core::mem::zeroed()) as _, hinstance.unwrap_or(core::mem::zeroed()) as _, dwstyle, szfile.param().abi()) } } #[inline] pub unsafe fn MCIWndRegisterClass() -> super::super::Foundation::BOOL { @@ -756,7 +756,7 @@ where P0: 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); - unsafe { capCreateCaptureWindowA(lpszwindowname.param().abi(), dwstyle, x, y, nwidth, nheight, core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), nid) } + unsafe { capCreateCaptureWindowA(lpszwindowname.param().abi(), dwstyle, x, y, nwidth, nheight, hwndparent.unwrap_or(core::mem::zeroed()) as _, nid) } } #[inline] pub unsafe fn capCreateCaptureWindowW(lpszwindowname: P0, dwstyle: u32, x: i32, y: i32, nwidth: i32, nheight: i32, hwndparent: Option, nid: i32) -> super::super::Foundation::HWND @@ -764,7 +764,7 @@ where P0: 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); - unsafe { capCreateCaptureWindowW(lpszwindowname.param().abi(), dwstyle, x, y, nwidth, nheight, core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), nid) } + unsafe { capCreateCaptureWindowW(lpszwindowname.param().abi(), dwstyle, x, y, nwidth, nheight, hwndparent.unwrap_or(core::mem::zeroed()) as _, nid) } } #[inline] pub unsafe fn capGetDriverDescriptionA(wdriverindex: u32, lpszname: &mut [u8], lpszver: &mut [u8]) -> super::super::Foundation::BOOL { @@ -779,12 +779,12 @@ pub unsafe fn capGetDriverDescriptionW(wdriverindex: u32, lpszname: &mut [u16], #[inline] pub unsafe fn joyGetDevCapsA(ujoyid: usize, pjc: *mut JOYCAPSA, cbjc: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn joyGetDevCapsA(ujoyid : usize, pjc : *mut JOYCAPSA, cbjc : u32) -> u32); - unsafe { joyGetDevCapsA(ujoyid, core::mem::transmute(pjc), cbjc) } + unsafe { joyGetDevCapsA(ujoyid, pjc as _, cbjc) } } #[inline] pub unsafe fn joyGetDevCapsW(ujoyid: usize, pjc: *mut JOYCAPSW, cbjc: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn joyGetDevCapsW(ujoyid : usize, pjc : *mut JOYCAPSW, cbjc : u32) -> u32); - unsafe { joyGetDevCapsW(ujoyid, core::mem::transmute(pjc), cbjc) } + unsafe { joyGetDevCapsW(ujoyid, pjc as _, cbjc) } } #[inline] pub unsafe fn joyGetNumDevs() -> u32 { @@ -794,17 +794,17 @@ pub unsafe fn joyGetNumDevs() -> u32 { #[inline] pub unsafe fn joyGetPos(ujoyid: u32, pji: *mut JOYINFO) -> u32 { windows_targets::link!("winmm.dll" "system" fn joyGetPos(ujoyid : u32, pji : *mut JOYINFO) -> u32); - unsafe { joyGetPos(ujoyid, core::mem::transmute(pji)) } + unsafe { joyGetPos(ujoyid, pji as _) } } #[inline] pub unsafe fn joyGetPosEx(ujoyid: u32, pji: *mut JOYINFOEX) -> u32 { windows_targets::link!("winmm.dll" "system" fn joyGetPosEx(ujoyid : u32, pji : *mut JOYINFOEX) -> u32); - unsafe { joyGetPosEx(ujoyid, core::mem::transmute(pji)) } + unsafe { joyGetPosEx(ujoyid, pji as _) } } #[inline] pub unsafe fn joyGetThreshold(ujoyid: u32, puthreshold: *mut u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn joyGetThreshold(ujoyid : u32, puthreshold : *mut u32) -> u32); - unsafe { joyGetThreshold(ujoyid, core::mem::transmute(puthreshold)) } + unsafe { joyGetThreshold(ujoyid, puthreshold as _) } } #[inline] pub unsafe fn joyReleaseCapture(ujoyid: u32) -> u32 { @@ -904,12 +904,12 @@ where #[inline] 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); - unsafe { mciSendCommandA(mciid, umsg, core::mem::transmute(dwparam1.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwparam2.unwrap_or(core::mem::zeroed()))) } + unsafe { mciSendCommandA(mciid, umsg, dwparam1.unwrap_or(core::mem::zeroed()) as _, dwparam2.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { mciSendCommandW(mciid, umsg, core::mem::transmute(dwparam1.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwparam2.unwrap_or(core::mem::zeroed()))) } + unsafe { mciSendCommandW(mciid, umsg, dwparam1.unwrap_or(core::mem::zeroed()) as _, dwparam2.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn mciSendStringA(lpstrcommand: P0, lpstrreturnstring: Option<&mut [u8]>, hwndcallback: Option) -> u32 @@ -917,7 +917,7 @@ where P0: 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); - unsafe { 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()))) } + unsafe { 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.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn mciSendStringW(lpstrcommand: P0, lpstrreturnstring: Option<&mut [u16]>, hwndcallback: Option) -> u32 @@ -925,7 +925,7 @@ where P0: 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); - unsafe { 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()))) } + unsafe { 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.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn mciSetDriverData(wdeviceid: u32, dwdata: usize) -> super::super::Foundation::BOOL { @@ -935,7 +935,7 @@ pub unsafe fn mciSetDriverData(wdeviceid: u32, dwdata: usize) -> super::super::F #[inline] 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); - unsafe { mciSetYieldProc(mciid, core::mem::transmute(fpyieldproc.unwrap_or(core::mem::zeroed())), dwyielddata) } + unsafe { mciSetYieldProc(mciid, fpyieldproc.unwrap_or(core::mem::zeroed()) as _, dwyielddata) } } #[inline] pub unsafe fn mmDrvInstall(hdriver: HDRVR, wszdrventry: P1, drvmessage: DRIVERMSGPROC, wflags: u32) -> u32 @@ -958,7 +958,7 @@ pub unsafe fn mmTaskBlock(h: u32) { #[inline] pub unsafe fn mmTaskCreate(lpfn: LPTASKCALLBACK, lph: *mut super::super::Foundation::HANDLE, dwinst: usize) -> u32 { windows_targets::link!("winmm.dll" "system" fn mmTaskCreate(lpfn : LPTASKCALLBACK, lph : *mut super::super::Foundation:: HANDLE, dwinst : usize) -> u32); - unsafe { mmTaskCreate(lpfn, core::mem::transmute(lph), dwinst) } + unsafe { mmTaskCreate(lpfn, lph as _, dwinst) } } #[inline] pub unsafe fn mmTaskSignal(h: u32) -> super::super::Foundation::BOOL { @@ -973,7 +973,7 @@ pub unsafe fn mmTaskYield() { #[inline] 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); - unsafe { mmioAdvance(hmmio, core::mem::transmute(pmmioinfo.unwrap_or(core::mem::zeroed())), fuadvance) } + unsafe { mmioAdvance(hmmio, pmmioinfo.unwrap_or(core::mem::zeroed()) as _, fuadvance) } } #[inline] pub unsafe fn mmioAscend(hmmio: HMMIO, pmmcki: *const MMCKINFO, fuascend: u32) -> u32 { @@ -993,7 +993,7 @@ pub unsafe fn mmioCreateChunk(hmmio: HMMIO, pmmcki: *const MMCKINFO, fucreate: u #[inline] 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); - unsafe { mmioDescend(hmmio, core::mem::transmute(pmmcki), core::mem::transmute(pmmckiparent.unwrap_or(core::mem::zeroed())), fudescend) } + unsafe { mmioDescend(hmmio, pmmcki as _, pmmckiparent.unwrap_or(core::mem::zeroed()) as _, fudescend) } } #[inline] pub unsafe fn mmioFlush(hmmio: HMMIO, fuflush: u32) -> u32 { @@ -1003,27 +1003,27 @@ pub unsafe fn mmioFlush(hmmio: HMMIO, fuflush: u32) -> u32 { #[inline] 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); - unsafe { mmioGetInfo(hmmio, core::mem::transmute(pmmioinfo), fuinfo) } + unsafe { mmioGetInfo(hmmio, pmmioinfo as _, fuinfo) } } #[inline] 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); - unsafe { mmioInstallIOProcA(fccioproc, core::mem::transmute(pioproc.unwrap_or(core::mem::zeroed())), dwflags) } + unsafe { mmioInstallIOProcA(fccioproc, pioproc.unwrap_or(core::mem::zeroed()) as _, dwflags) } } #[inline] 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); - unsafe { mmioInstallIOProcW(fccioproc, core::mem::transmute(pioproc.unwrap_or(core::mem::zeroed())), dwflags) } + unsafe { mmioInstallIOProcW(fccioproc, pioproc.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { 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())), fdwopen) } + unsafe { mmioOpenA(core::mem::transmute(pszfilename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pmmioinfo.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { 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())), fdwopen) } + unsafe { mmioOpenW(core::mem::transmute(pszfilename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pmmioinfo.unwrap_or(core::mem::zeroed()) as _, fdwopen) } } #[inline] pub unsafe fn mmioRead(hmmio: HMMIO, pch: &mut [u8]) -> i32 { @@ -1037,7 +1037,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); - unsafe { mmioRenameA(pszfilename.param().abi(), psznewfilename.param().abi(), core::mem::transmute(pmmioinfo.unwrap_or(core::mem::zeroed())), fdwrename) } + unsafe { mmioRenameA(pszfilename.param().abi(), psznewfilename.param().abi(), pmmioinfo.unwrap_or(core::mem::zeroed()) as _, fdwrename) } } #[inline] pub unsafe fn mmioRenameW(pszfilename: P0, psznewfilename: P1, pmmioinfo: Option<*const MMIOINFO>, fdwrename: u32) -> u32 @@ -1046,7 +1046,7 @@ where P1: windows_core::Param, { windows_targets::link!("winmm.dll" "system" fn mmioRenameW(pszfilename : windows_core::PCWSTR, psznewfilename : windows_core::PCWSTR, pmmioinfo : *const MMIOINFO, fdwrename : u32) -> u32); - unsafe { mmioRenameW(pszfilename.param().abi(), psznewfilename.param().abi(), core::mem::transmute(pmmioinfo.unwrap_or(core::mem::zeroed())), fdwrename) } + unsafe { mmioRenameW(pszfilename.param().abi(), psznewfilename.param().abi(), pmmioinfo.unwrap_or(core::mem::zeroed()) as _, fdwrename) } } #[inline] pub unsafe fn mmioSeek(hmmio: HMMIO, loffset: i32, iorigin: i32) -> i32 { @@ -1056,7 +1056,7 @@ pub unsafe fn mmioSeek(hmmio: HMMIO, loffset: i32, iorigin: i32) -> i32 { #[inline] 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); - unsafe { mmioSendMessage(hmmio, umsg, core::mem::transmute(lparam1.unwrap_or(core::mem::zeroed())), core::mem::transmute(lparam2.unwrap_or(core::mem::zeroed()))) } + unsafe { mmioSendMessage(hmmio, umsg, lparam1.unwrap_or(core::mem::zeroed()) as _, lparam2.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn mmioSetBuffer(hmmio: HMMIO, pchbuffer: Option<&mut [u8]>, fubuffer: u32) -> u32 { @@ -1096,7 +1096,7 @@ where P1: windows_core::Param, { windows_targets::link!("api-ms-win-mm-misc-l1-1-1.dll" "system" fn sndOpenSound(eventname : windows_core::PCWSTR, appname : windows_core::PCWSTR, flags : i32, filehandle : *mut super::super::Foundation:: HANDLE) -> i32); - unsafe { sndOpenSound(eventname.param().abi(), appname.param().abi(), flags, core::mem::transmute(filehandle)) } + unsafe { sndOpenSound(eventname.param().abi(), appname.param().abi(), flags, filehandle as _) } } pub const ACMDM_BASE: u32 = 24576u32; pub const ACM_MPEG_COPYRIGHT: u32 = 2u32; @@ -2003,16 +2003,16 @@ windows_core::imp::define_interface!(IAVIEditStream, IAVIEditStream_Vtbl, 0x0002 windows_core::imp::interface_hierarchy!(IAVIEditStream, windows_core::IUnknown); impl IAVIEditStream { pub unsafe fn Cut(&self, plstart: *mut i32, pllength: *mut i32, ppresult: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Cut)(windows_core::Interface::as_raw(self), core::mem::transmute(plstart), core::mem::transmute(pllength), core::mem::transmute(ppresult)).ok() } + unsafe { (windows_core::Interface::vtable(self).Cut)(windows_core::Interface::as_raw(self), plstart as _, pllength as _, core::mem::transmute(ppresult)).ok() } } pub unsafe fn Copy(&self, plstart: *mut i32, pllength: *mut i32, ppresult: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Copy)(windows_core::Interface::as_raw(self), core::mem::transmute(plstart), core::mem::transmute(pllength), core::mem::transmute(ppresult)).ok() } + unsafe { (windows_core::Interface::vtable(self).Copy)(windows_core::Interface::as_raw(self), plstart as _, pllength as _, core::mem::transmute(ppresult)).ok() } } pub unsafe fn Paste(&self, plpos: *mut i32, pllength: *mut i32, pstream: P2, lstart: i32, lend: i32) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Paste)(windows_core::Interface::as_raw(self), core::mem::transmute(plpos), core::mem::transmute(pllength), pstream.param().abi(), lstart, lend).ok() } + unsafe { (windows_core::Interface::vtable(self).Paste)(windows_core::Interface::as_raw(self), plpos as _, pllength as _, pstream.param().abi(), lstart, lend).ok() } } pub unsafe fn Clone(&self) -> windows_core::Result { unsafe { @@ -2096,7 +2096,7 @@ windows_core::imp::define_interface!(IAVIFile, IAVIFile_Vtbl, 0x00020020_0000_00 windows_core::imp::interface_hierarchy!(IAVIFile, windows_core::IUnknown); impl IAVIFile { pub unsafe fn Info(&self, pfi: *mut AVIFILEINFOW, lsize: i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Info)(windows_core::Interface::as_raw(self), core::mem::transmute(pfi), lsize).ok() } + unsafe { (windows_core::Interface::vtable(self).Info)(windows_core::Interface::as_raw(self), pfi as _, lsize).ok() } } pub unsafe fn GetStream(&self, ppstream: *mut Option, fcctype: u32, lparam: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetStream)(windows_core::Interface::as_raw(self), core::mem::transmute(ppstream), fcctype, lparam).ok() } @@ -2108,7 +2108,7 @@ impl IAVIFile { unsafe { (windows_core::Interface::vtable(self).WriteData)(windows_core::Interface::as_raw(self), ckid, lpdata, cbdata).ok() } } pub unsafe fn ReadData(&self, ckid: u32, lpdata: *mut core::ffi::c_void, lpcbdata: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadData)(windows_core::Interface::as_raw(self), ckid, core::mem::transmute(lpdata), core::mem::transmute(lpcbdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadData)(windows_core::Interface::as_raw(self), ckid, lpdata as _, lpcbdata as _).ok() } } pub unsafe fn EndRecord(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).EndRecord)(windows_core::Interface::as_raw(self)).ok() } @@ -2248,28 +2248,28 @@ impl IAVIStream { unsafe { (windows_core::Interface::vtable(self).Create)(windows_core::Interface::as_raw(self), lparam1, lparam2).ok() } } pub unsafe fn Info(&self, psi: *mut AVISTREAMINFOW, lsize: i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Info)(windows_core::Interface::as_raw(self), core::mem::transmute(psi), lsize).ok() } + unsafe { (windows_core::Interface::vtable(self).Info)(windows_core::Interface::as_raw(self), psi as _, lsize).ok() } } pub unsafe fn FindSample(&self, lpos: i32, lflags: i32) -> i32 { unsafe { (windows_core::Interface::vtable(self).FindSample)(windows_core::Interface::as_raw(self), lpos, lflags) } } pub unsafe fn ReadFormat(&self, lpos: i32, lpformat: Option<*mut core::ffi::c_void>, lpcbformat: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadFormat)(windows_core::Interface::as_raw(self), lpos, core::mem::transmute(lpformat.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbformat)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadFormat)(windows_core::Interface::as_raw(self), lpos, lpformat.unwrap_or(core::mem::zeroed()) as _, lpcbformat as _).ok() } } pub unsafe fn SetFormat(&self, lpos: i32, lpformat: *const core::ffi::c_void, cbformat: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetFormat)(windows_core::Interface::as_raw(self), lpos, lpformat, cbformat).ok() } } pub unsafe fn Read(&self, lstart: i32, lsamples: i32, lpbuffer: Option<*mut core::ffi::c_void>, cbbuffer: i32, plbytes: Option<*mut i32>, plsamples: Option<*mut i32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), lstart, lsamples, core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), cbbuffer, core::mem::transmute(plbytes.unwrap_or(core::mem::zeroed())), core::mem::transmute(plsamples.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), lstart, lsamples, lpbuffer.unwrap_or(core::mem::zeroed()) as _, cbbuffer, plbytes.unwrap_or(core::mem::zeroed()) as _, plsamples.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).Write)(windows_core::Interface::as_raw(self), lstart, lsamples, lpbuffer, cbbuffer, dwflags, core::mem::transmute(plsampwritten.unwrap_or(core::mem::zeroed())), core::mem::transmute(plbyteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Write)(windows_core::Interface::as_raw(self), lstart, lsamples, lpbuffer, cbbuffer, dwflags, plsampwritten.unwrap_or(core::mem::zeroed()) as _, plbyteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Delete(&self, lstart: i32, lsamples: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Delete)(windows_core::Interface::as_raw(self), lstart, lsamples).ok() } } pub unsafe fn ReadData(&self, fcc: u32, lp: Option<*mut core::ffi::c_void>, lpcb: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadData)(windows_core::Interface::as_raw(self), fcc, core::mem::transmute(lp.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcb)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadData)(windows_core::Interface::as_raw(self), fcc, lp.unwrap_or(core::mem::zeroed()) as _, lpcb as _).ok() } } pub unsafe fn WriteData(&self, fcc: u32, lp: *const core::ffi::c_void, cb: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).WriteData)(windows_core::Interface::as_raw(self), fcc, lp, cb).ok() } @@ -2859,7 +2859,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<()> { - unsafe { (windows_core::Interface::vtable(self).SetFormat)(windows_core::Interface::as_raw(self), lpbi, core::mem::transmute(lpbits.unwrap_or(core::mem::zeroed())), x, y, dx, dy).ok() } + unsafe { (windows_core::Interface::vtable(self).SetFormat)(windows_core::Interface::as_raw(self), lpbi, lpbits.unwrap_or(core::mem::zeroed()) as _, x, y, dx, dy).ok() } } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/Media/PictureAcquisition/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/PictureAcquisition/mod.rs index c526f7621c..6bf53735a1 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/PictureAcquisition/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/PictureAcquisition/mod.rs @@ -42,7 +42,7 @@ impl IPhotoAcquire { P3: windows_core::Param, P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Acquire)(windows_core::Interface::as_raw(self), pphotoacquiresource.param().abi(), fshowprogress.into(), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), pszapplicationname.param().abi(), pphotoacquireprogresscb.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).Acquire)(windows_core::Interface::as_raw(self), pphotoacquiresource.param().abi(), fshowprogress.into(), hwndparent.unwrap_or(core::mem::zeroed()) as _, pszapplicationname.param().abi(), pphotoacquireprogresscb.param().abi()).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn EnumResults(&self) -> windows_core::Result { @@ -130,7 +130,7 @@ impl IPhotoAcquireDeviceSelectionDialog { unsafe { (windows_core::Interface::vtable(self).SetSubmitButtonText)(windows_core::Interface::as_raw(self), pszsubmitbuttontext.param().abi()).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<()> { - unsafe { (windows_core::Interface::vtable(self).DoModal)(windows_core::Interface::as_raw(self), hwndparent, dwdeviceflags, core::mem::transmute(pbstrdeviceid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pndevicetype.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).DoModal)(windows_core::Interface::as_raw(self), hwndparent, dwdeviceflags, pbstrdeviceid.unwrap_or(core::mem::zeroed()) as _, pndevicetype.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -407,7 +407,7 @@ impl IPhotoAcquireOptionsDialog { unsafe { (windows_core::Interface::vtable(self).Destroy)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn DoModal(&self, hwndparent: super::super::Foundation::HWND, ppnreturncode: Option<*mut isize>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DoModal)(windows_core::Interface::as_raw(self), hwndparent, core::mem::transmute(ppnreturncode.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).DoModal)(windows_core::Interface::as_raw(self), hwndparent, ppnreturncode.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SaveData(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SaveData)(windows_core::Interface::as_raw(self)).ok() } @@ -668,7 +668,7 @@ impl IPhotoAcquireProgressCB { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetUserInput)(windows_core::Interface::as_raw(self), riidtype, punknown.param().abi(), core::mem::transmute(ppropvarresult), core::mem::transmute(ppropvardefault.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUserInput)(windows_core::Interface::as_raw(self), riidtype, punknown.param().abi(), core::mem::transmute(ppropvarresult), ppropvardefault.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -1134,13 +1134,13 @@ 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeviceIcons)(windows_core::Interface::as_raw(self), nsize, core::mem::transmute(phlargeicon.unwrap_or(core::mem::zeroed())), core::mem::transmute(phsmallicon.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceIcons)(windows_core::Interface::as_raw(self), nsize, phlargeicon.unwrap_or(core::mem::zeroed()) as _, phsmallicon.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn InitializeItemList(&self, fforceenumeration: bool, pphotoacquireprogresscb: P1, pnitemcount: Option<*mut u32>) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).InitializeItemList)(windows_core::Interface::as_raw(self), fforceenumeration.into(), pphotoacquireprogresscb.param().abi(), core::mem::transmute(pnitemcount.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).InitializeItemList)(windows_core::Interface::as_raw(self), fforceenumeration.into(), pphotoacquireprogresscb.param().abi(), pnitemcount.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetItemCount(&self) -> windows_core::Result { unsafe { @@ -1167,7 +1167,7 @@ impl IPhotoAcquireSource { } } pub unsafe fn BindToObject(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).BindToObject)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(ppv)).ok() } + unsafe { (windows_core::Interface::vtable(self).BindToObject)(windows_core::Interface::as_raw(self), riid, ppv as _).ok() } } } #[repr(C)] @@ -1378,7 +1378,7 @@ impl IPhotoProgressDialog { } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] pub unsafe fn SetImage(&self, nimagetype: PROGRESS_DIALOG_IMAGE_TYPE, hicon: Option, hbitmap: Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetImage)(windows_core::Interface::as_raw(self), nimagetype, core::mem::transmute(hicon.unwrap_or(core::mem::zeroed())), core::mem::transmute(hbitmap.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetImage)(windows_core::Interface::as_raw(self), nimagetype, hicon.unwrap_or(core::mem::zeroed()) as _, hbitmap.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetPercentComplete(&self, npercent: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetPercentComplete)(windows_core::Interface::as_raw(self), npercent).ok() } @@ -1415,7 +1415,7 @@ impl IPhotoProgressDialog { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetUserInput)(windows_core::Interface::as_raw(self), riidtype, punknown.param().abi(), core::mem::transmute(ppropvarresult), core::mem::transmute(ppropvardefault.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUserInput)(windows_core::Interface::as_raw(self), riidtype, punknown.param().abi(), core::mem::transmute(ppropvarresult), ppropvardefault.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -1683,7 +1683,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<()> { - unsafe { (windows_core::Interface::vtable(self).GetImage)(windows_core::Interface::as_raw(self), nsize, core::mem::transmute(phbitmap.unwrap_or(core::mem::zeroed())), core::mem::transmute(phicon.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetImage)(windows_core::Interface::as_raw(self), nsize, phbitmap.unwrap_or(core::mem::zeroed()) as _, phicon.unwrap_or(core::mem::zeroed()) as _).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 5e5e3806e6..b26e7a3bfa 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<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(pelt), core::mem::transmute(pceltfetched.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(pelt), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -518,7 +518,7 @@ impl IEnumSpObjectTokens { } } pub unsafe fn GetCount(&self, pcount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCount)(windows_core::Interface::as_raw(self), pcount as _).ok() } } } #[repr(C)] @@ -625,29 +625,29 @@ impl ISpAudio { unsafe { (windows_core::Interface::vtable(self).SetFormat)(windows_core::Interface::as_raw(self), rguidfmtid, pwaveformatex).ok() } } pub unsafe fn GetStatus(&self, pstatus: *mut SPAUDIOSTATUS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), pstatus as _).ok() } } pub unsafe fn SetBufferInfo(&self, pbuffinfo: *const SPAUDIOBUFFERINFO) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetBufferInfo)(windows_core::Interface::as_raw(self), pbuffinfo).ok() } } pub unsafe fn GetBufferInfo(&self, pbuffinfo: *mut SPAUDIOBUFFERINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBufferInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pbuffinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBufferInfo)(windows_core::Interface::as_raw(self), pbuffinfo as _).ok() } } #[cfg(feature = "Win32_Media_Audio")] pub unsafe fn GetDefaultFormat(&self, pformatid: *mut windows_core::GUID, ppcomemwaveformatex: *mut *mut super::Audio::WAVEFORMATEX) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDefaultFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(pformatid), core::mem::transmute(ppcomemwaveformatex)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDefaultFormat)(windows_core::Interface::as_raw(self), pformatid as _, ppcomemwaveformatex as _).ok() } } pub unsafe fn EventHandle(&self) -> super::super::Foundation::HANDLE { unsafe { (windows_core::Interface::vtable(self).EventHandle)(windows_core::Interface::as_raw(self)) } } pub unsafe fn GetVolumeLevel(&self, plevel: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVolumeLevel)(windows_core::Interface::as_raw(self), core::mem::transmute(plevel)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVolumeLevel)(windows_core::Interface::as_raw(self), plevel as _).ok() } } pub unsafe fn SetVolumeLevel(&self, level: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetVolumeLevel)(windows_core::Interface::as_raw(self), level).ok() } } pub unsafe fn GetBufferNotifySize(&self, pcbsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBufferNotifySize)(windows_core::Interface::as_raw(self), core::mem::transmute(pcbsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBufferNotifySize)(windows_core::Interface::as_raw(self), pcbsize as _).ok() } } pub unsafe fn SetBufferNotifySize(&self, cbsize: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetBufferNotifySize)(windows_core::Interface::as_raw(self), cbsize).ok() } @@ -959,7 +959,7 @@ impl ISpDataKey { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), pszvaluename.param().abi(), core::mem::transmute(pcbdata), core::mem::transmute(pdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), pszvaluename.param().abi(), pcbdata as _, pdata as _).ok() } } pub unsafe fn SetStringValue(&self, pszvaluename: P0, pszvalue: P1) -> windows_core::Result<()> where @@ -987,7 +987,7 @@ impl ISpDataKey { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetDWORD)(windows_core::Interface::as_raw(self), pszvaluename.param().abi(), core::mem::transmute(pdwvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDWORD)(windows_core::Interface::as_raw(self), pszvaluename.param().abi(), pdwvalue as _).ok() } } pub unsafe fn OpenKey(&self, pszsubkeyname: P0) -> windows_core::Result where @@ -1191,7 +1191,7 @@ windows_core::imp::define_interface!(ISpDisplayAlternates, ISpDisplayAlternates_ windows_core::imp::interface_hierarchy!(ISpDisplayAlternates, windows_core::IUnknown); impl ISpDisplayAlternates { pub unsafe fn GetDisplayAlternates(&self, pphrase: *const SPDISPLAYPHRASE, crequestcount: u32, ppcomemphrases: *mut *mut SPDISPLAYPHRASE, pcphrasesreturned: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDisplayAlternates)(windows_core::Interface::as_raw(self), pphrase, crequestcount, core::mem::transmute(ppcomemphrases), core::mem::transmute(pcphrasesreturned)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDisplayAlternates)(windows_core::Interface::as_raw(self), pphrase, crequestcount, ppcomemphrases as _, pcphrasesreturned as _).ok() } } pub unsafe fn SetFullStopTrailSpace(&self, ultrailspace: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetFullStopTrailSpace)(windows_core::Interface::as_raw(self), ultrailspace).ok() } @@ -1241,7 +1241,7 @@ impl ISpEnginePronunciation { P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Normalize)(windows_core::Interface::as_raw(self), pszword.param().abi(), pszleftcontext.param().abi(), pszrightcontext.param().abi(), langid, core::mem::transmute(pnormalizationlist)).ok() } + unsafe { (windows_core::Interface::vtable(self).Normalize)(windows_core::Interface::as_raw(self), pszword.param().abi(), pszleftcontext.param().abi(), pszrightcontext.param().abi(), langid, pnormalizationlist as _).ok() } } pub unsafe fn GetPronunciations(&self, pszword: P0, pszleftcontext: P1, pszrightcontext: P2, langid: u16, penginepronunciationlist: *mut SPWORDPRONUNCIATIONLIST) -> windows_core::Result<()> where @@ -1249,7 +1249,7 @@ impl ISpEnginePronunciation { P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetPronunciations)(windows_core::Interface::as_raw(self), pszword.param().abi(), pszleftcontext.param().abi(), pszrightcontext.param().abi(), langid, core::mem::transmute(penginepronunciationlist)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPronunciations)(windows_core::Interface::as_raw(self), pszword.param().abi(), pszleftcontext.param().abi(), pszrightcontext.param().abi(), langid, penginepronunciationlist as _).ok() } } } #[repr(C)] @@ -1328,7 +1328,7 @@ impl ISpEventSink { unsafe { (windows_core::Interface::vtable(self).AddEvents)(windows_core::Interface::as_raw(self), peventarray, ulcount).ok() } } pub unsafe fn GetEventInterest(&self, pulleventinterest: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEventInterest)(windows_core::Interface::as_raw(self), core::mem::transmute(pulleventinterest)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventInterest)(windows_core::Interface::as_raw(self), pulleventinterest as _).ok() } } } #[repr(C)] @@ -1379,10 +1379,10 @@ impl ISpEventSource { unsafe { (windows_core::Interface::vtable(self).SetInterest)(windows_core::Interface::as_raw(self), ulleventinterest, ullqueuedinterest).ok() } } pub unsafe fn GetEvents(&self, ulcount: u32, peventarray: *mut SPEVENT, pulfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEvents)(windows_core::Interface::as_raw(self), ulcount, core::mem::transmute(peventarray), core::mem::transmute(pulfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEvents)(windows_core::Interface::as_raw(self), ulcount, peventarray as _, pulfetched as _).ok() } } pub unsafe fn GetInfo(&self, pinfo: *mut SPEVENTSOURCEINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInfo)(windows_core::Interface::as_raw(self), pinfo as _).ok() } } } #[repr(C)] @@ -1439,7 +1439,7 @@ impl core::ops::Deref for ISpEventSource2 { windows_core::imp::interface_hierarchy!(ISpEventSource2, windows_core::IUnknown, ISpNotifySource, ISpEventSource); impl ISpEventSource2 { pub unsafe fn GetEventsEx(&self, ulcount: u32, peventarray: *mut SPEVENTEX, pulfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEventsEx)(windows_core::Interface::as_raw(self), ulcount, core::mem::transmute(peventarray), core::mem::transmute(pulfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventsEx)(windows_core::Interface::as_raw(self), ulcount, peventarray as _, pulfetched as _).ok() } } } #[repr(C)] @@ -1537,13 +1537,13 @@ impl ISpGrammarBuilder { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetRule)(windows_core::Interface::as_raw(self), pszrulename.param().abi(), dwruleid, dwattributes, fcreateifnotexist.into(), core::mem::transmute(phinitialstate)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRule)(windows_core::Interface::as_raw(self), pszrulename.param().abi(), dwruleid, dwattributes, fcreateifnotexist.into(), phinitialstate as _).ok() } } pub unsafe fn ClearRule(&self, hstate: SPSTATEHANDLE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ClearRule)(windows_core::Interface::as_raw(self), hstate).ok() } } pub unsafe fn CreateNewState(&self, hstate: SPSTATEHANDLE, phstate: *mut SPSTATEHANDLE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateNewState)(windows_core::Interface::as_raw(self), hstate, core::mem::transmute(phstate)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateNewState)(windows_core::Interface::as_raw(self), hstate, phstate as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn AddWordTransition(&self, hfromstate: SPSTATEHANDLE, htostate: SPSTATEHANDLE, psz: P2, pszseparators: P3, ewordtype: SPGRAMMARWORDTYPE, weight: f32, ppropinfo: *const SPPROPERTYINFO) -> windows_core::Result<()> @@ -1816,28 +1816,28 @@ impl ISpLexicon { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetPronunciations)(windows_core::Interface::as_raw(self), pszword.param().abi(), langid, dwflags, core::mem::transmute(pwordpronunciationlist)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPronunciations)(windows_core::Interface::as_raw(self), pszword.param().abi(), langid, dwflags, pwordpronunciationlist as _).ok() } } pub unsafe fn AddPronunciation(&self, pszword: P0, langid: u16, epartofspeech: SPPARTOFSPEECH, pszpronunciation: Option<*const u16>) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).AddPronunciation)(windows_core::Interface::as_raw(self), pszword.param().abi(), langid, epartofspeech, core::mem::transmute(pszpronunciation.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).AddPronunciation)(windows_core::Interface::as_raw(self), pszword.param().abi(), langid, epartofspeech, pszpronunciation.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn RemovePronunciation(&self, pszword: P0, langid: u16, epartofspeech: SPPARTOFSPEECH, pszpronunciation: Option<*const u16>) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).RemovePronunciation)(windows_core::Interface::as_raw(self), pszword.param().abi(), langid, epartofspeech, core::mem::transmute(pszpronunciation.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).RemovePronunciation)(windows_core::Interface::as_raw(self), pszword.param().abi(), langid, epartofspeech, pszpronunciation.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetGeneration(&self, pdwgeneration: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGeneration)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwgeneration)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGeneration)(windows_core::Interface::as_raw(self), pdwgeneration as _).ok() } } pub unsafe fn GetGenerationChange(&self, dwflags: u32, pdwgeneration: *mut u32, pwordlist: *mut SPWORDLIST) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGenerationChange)(windows_core::Interface::as_raw(self), dwflags, core::mem::transmute(pdwgeneration), core::mem::transmute(pwordlist)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGenerationChange)(windows_core::Interface::as_raw(self), dwflags, pdwgeneration as _, pwordlist as _).ok() } } pub unsafe fn GetWords(&self, dwflags: u32, pdwgeneration: *mut u32, pdwcookie: Option<*mut u32>, pwordlist: *mut SPWORDLIST) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWords)(windows_core::Interface::as_raw(self), dwflags, core::mem::transmute(pdwgeneration), core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(pwordlist)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWords)(windows_core::Interface::as_raw(self), dwflags, pdwgeneration as _, pdwcookie.unwrap_or(core::mem::zeroed()) as _, pwordlist as _).ok() } } } #[repr(C)] @@ -1925,16 +1925,16 @@ windows_core::imp::interface_hierarchy!(ISpMMSysAudio, windows_core::IUnknown, s #[cfg(feature = "Win32_System_Com")] impl ISpMMSysAudio { pub unsafe fn GetDeviceId(&self, pudeviceid: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeviceId)(windows_core::Interface::as_raw(self), core::mem::transmute(pudeviceid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceId)(windows_core::Interface::as_raw(self), pudeviceid as _).ok() } } pub unsafe fn SetDeviceId(&self, udeviceid: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetDeviceId)(windows_core::Interface::as_raw(self), udeviceid).ok() } } pub unsafe fn GetMMHandle(&self, phandle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMMHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(phandle)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMMHandle)(windows_core::Interface::as_raw(self), phandle as _).ok() } } pub unsafe fn GetLineId(&self, pulineid: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLineId)(windows_core::Interface::as_raw(self), core::mem::transmute(pulineid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLineId)(windows_core::Interface::as_raw(self), pulineid as _).ok() } } pub unsafe fn SetLineId(&self, ulineid: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetLineId)(windows_core::Interface::as_raw(self), ulineid).ok() } @@ -2085,7 +2085,7 @@ impl ISpNotifySource { unsafe { (windows_core::Interface::vtable(self).SetNotifyWindowMessage)(windows_core::Interface::as_raw(self), hwnd, msg, wparam, lparam).ok() } } pub unsafe fn SetNotifyCallbackFunction(&self, pfncallback: *mut SPNOTIFYCALLBACK, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetNotifyCallbackFunction)(windows_core::Interface::as_raw(self), core::mem::transmute(pfncallback), wparam, lparam).ok() } + unsafe { (windows_core::Interface::vtable(self).SetNotifyCallbackFunction)(windows_core::Interface::as_raw(self), pfncallback as _, wparam, lparam).ok() } } pub unsafe fn SetNotifyCallbackInterface(&self, pspcallback: P0, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> where @@ -2196,7 +2196,7 @@ impl ISpNotifyTranslator { unsafe { (windows_core::Interface::vtable(self).InitWindowMessage)(windows_core::Interface::as_raw(self), hwnd, msg, wparam, lparam).ok() } } pub unsafe fn InitCallback(&self, pfncallback: *mut SPNOTIFYCALLBACK, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).InitCallback)(windows_core::Interface::as_raw(self), core::mem::transmute(pfncallback), wparam, lparam).ok() } + unsafe { (windows_core::Interface::vtable(self).InitCallback)(windows_core::Interface::as_raw(self), pfncallback as _, wparam, lparam).ok() } } pub unsafe fn InitSpNotifyCallback(&self, pspcallback: P0, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> where @@ -2317,7 +2317,7 @@ impl ISpObjectToken { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateInstance)(windows_core::Interface::as_raw(self), punkouter.param().abi(), dwclscontext, riid, core::mem::transmute(ppvobject)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateInstance)(windows_core::Interface::as_raw(self), punkouter.param().abi(), dwclscontext, riid, ppvobject as _).ok() } } pub unsafe fn GetStorageFileName(&self, clsidcaller: *const windows_core::GUID, pszvaluename: P1, pszfilenamespecifier: P2, nfolder: u32) -> windows_core::Result where @@ -2336,14 +2336,14 @@ impl ISpObjectToken { unsafe { (windows_core::Interface::vtable(self).RemoveStorageFileName)(windows_core::Interface::as_raw(self), clsidcaller, pszkeyname.param().abi(), fdeletefile.into()).ok() } } pub unsafe fn Remove(&self, pclsidcaller: Option<*const windows_core::GUID>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Remove)(windows_core::Interface::as_raw(self), core::mem::transmute(pclsidcaller.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Remove)(windows_core::Interface::as_raw(self), pclsidcaller.unwrap_or(core::mem::zeroed()) as _).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 P0: windows_core::Param, P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).IsUISupported)(windows_core::Interface::as_raw(self), psztypeofui.param().abi(), core::mem::transmute(pvextradata), cbextradata, punkobject.param().abi(), core::mem::transmute(pfsupported)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsUISupported)(windows_core::Interface::as_raw(self), psztypeofui.param().abi(), pvextradata as _, cbextradata, punkobject.param().abi(), pfsupported as _).ok() } } 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 @@ -2351,13 +2351,13 @@ impl ISpObjectToken { P2: windows_core::Param, P5: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DisplayUI)(windows_core::Interface::as_raw(self), hwndparent, psztitle.param().abi(), psztypeofui.param().abi(), core::mem::transmute(pvextradata), cbextradata, punkobject.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).DisplayUI)(windows_core::Interface::as_raw(self), hwndparent, psztitle.param().abi(), psztypeofui.param().abi(), pvextradata as _, cbextradata, punkobject.param().abi()).ok() } } pub unsafe fn MatchesAttributes(&self, pszattributes: P0, pfmatches: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).MatchesAttributes)(windows_core::Interface::as_raw(self), pszattributes.param().abi(), core::mem::transmute(pfmatches)).ok() } + unsafe { (windows_core::Interface::vtable(self).MatchesAttributes)(windows_core::Interface::as_raw(self), pszattributes.param().abi(), pfmatches as _).ok() } } } #[repr(C)] @@ -3059,7 +3059,7 @@ impl ISpPhrase { } } pub unsafe fn GetText(&self, ulstart: u32, ulcount: u32, fusetextreplacements: bool, ppszcomemtext: *mut windows_core::PWSTR, pbdisplayattributes: Option<*mut u8>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), ulstart, ulcount, fusetextreplacements.into(), core::mem::transmute(ppszcomemtext), core::mem::transmute(pbdisplayattributes.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), ulstart, ulcount, fusetextreplacements.into(), ppszcomemtext as _, pbdisplayattributes.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Discard(&self, dwvaluetypes: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Discard)(windows_core::Interface::as_raw(self), dwvaluetypes).ok() } @@ -3146,10 +3146,10 @@ impl core::ops::Deref for ISpPhrase2 { windows_core::imp::interface_hierarchy!(ISpPhrase2, windows_core::IUnknown, ISpPhrase); impl ISpPhrase2 { pub unsafe fn GetXMLResult(&self, ppszcomemxmlresult: *mut windows_core::PWSTR, options: SPXMLRESULTOPTIONS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetXMLResult)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszcomemxmlresult), options).ok() } + unsafe { (windows_core::Interface::vtable(self).GetXMLResult)(windows_core::Interface::as_raw(self), ppszcomemxmlresult as _, options).ok() } } pub unsafe fn GetXMLErrorInfo(&self, psemanticerrorinfo: *mut SPSEMANTICERRORINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetXMLErrorInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(psemanticerrorinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetXMLErrorInfo)(windows_core::Interface::as_raw(self), psemanticerrorinfo as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetAudio(&self, ulstartelement: u32, celements: u32) -> windows_core::Result { @@ -3225,7 +3225,7 @@ impl core::ops::Deref for ISpPhraseAlt { windows_core::imp::interface_hierarchy!(ISpPhraseAlt, windows_core::IUnknown, ISpPhrase); impl ISpPhraseAlt { pub unsafe fn GetAltInfo(&self, ppparent: *mut Option, pulstartelementinparent: *mut u32, pcelementsinparent: *mut u32, pcelementsinalt: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAltInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(ppparent), core::mem::transmute(pulstartelementinparent), core::mem::transmute(pcelementsinparent), core::mem::transmute(pcelementsinalt)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAltInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(ppparent), pulstartelementinparent as _, pcelementsinparent as _, pcelementsinalt as _).ok() } } pub unsafe fn Commit(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Commit)(windows_core::Interface::as_raw(self)).ok() } @@ -3397,10 +3397,10 @@ windows_core::imp::define_interface!(ISpPrivateEngineCallEx, ISpPrivateEngineCal windows_core::imp::interface_hierarchy!(ISpPrivateEngineCallEx, windows_core::IUnknown); impl ISpPrivateEngineCallEx { pub unsafe fn CallEngineSynchronize(&self, pinframe: *const core::ffi::c_void, ulinframesize: u32, ppcomemoutframe: *mut *mut core::ffi::c_void, puloutframesize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CallEngineSynchronize)(windows_core::Interface::as_raw(self), pinframe, ulinframesize, core::mem::transmute(ppcomemoutframe), core::mem::transmute(puloutframesize)).ok() } + unsafe { (windows_core::Interface::vtable(self).CallEngineSynchronize)(windows_core::Interface::as_raw(self), pinframe, ulinframesize, ppcomemoutframe as _, puloutframesize as _).ok() } } pub unsafe fn CallEngineImmediate(&self, pinframe: *const core::ffi::c_void, ulinframesize: u32, ppcomemoutframe: *mut *mut core::ffi::c_void, puloutframesize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CallEngineImmediate)(windows_core::Interface::as_raw(self), pinframe, ulinframesize, core::mem::transmute(ppcomemoutframe), core::mem::transmute(puloutframesize)).ok() } + unsafe { (windows_core::Interface::vtable(self).CallEngineImmediate)(windows_core::Interface::as_raw(self), pinframe, ulinframesize, ppcomemoutframe as _, puloutframesize as _).ok() } } } #[repr(C)] @@ -3451,7 +3451,7 @@ impl ISpProperties { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetPropertyNum)(windows_core::Interface::as_raw(self), pname.param().abi(), core::mem::transmute(plvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropertyNum)(windows_core::Interface::as_raw(self), pname.param().abi(), plvalue as _).ok() } } pub unsafe fn SetPropertyString(&self, pname: P0, pvalue: P1) -> windows_core::Result<()> where @@ -3551,10 +3551,10 @@ impl ISpRecoContext { } } pub unsafe fn GetStatus(&self, pstatus: *mut SPRECOCONTEXTSTATUS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), pstatus as _).ok() } } pub unsafe fn GetMaxAlternates(&self, pcalternates: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMaxAlternates)(windows_core::Interface::as_raw(self), core::mem::transmute(pcalternates)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMaxAlternates)(windows_core::Interface::as_raw(self), pcalternates as _).ok() } } pub unsafe fn SetMaxAlternates(&self, calternates: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetMaxAlternates)(windows_core::Interface::as_raw(self), calternates).ok() } @@ -3565,7 +3565,7 @@ impl ISpRecoContext { } #[cfg(feature = "Win32_Media_Audio")] pub unsafe fn GetAudioOptions(&self, poptions: *mut SPAUDIOOPTIONS, paudioformatid: *mut windows_core::GUID, ppcomemwfex: *mut *mut super::Audio::WAVEFORMATEX) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAudioOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(poptions), core::mem::transmute(paudioformatid), core::mem::transmute(ppcomemwfex)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAudioOptions)(windows_core::Interface::as_raw(self), poptions as _, paudioformatid as _, ppcomemwfex as _).ok() } } pub unsafe fn DeserializeResult(&self, pserializedresult: *const SPSERIALIZEDRESULT) -> windows_core::Result { unsafe { @@ -3604,13 +3604,13 @@ impl ISpRecoContext { unsafe { (windows_core::Interface::vtable(self).SetVoicePurgeEvent)(windows_core::Interface::as_raw(self), ulleventinterest).ok() } } pub unsafe fn GetVoicePurgeEvent(&self, pulleventinterest: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVoicePurgeEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(pulleventinterest)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVoicePurgeEvent)(windows_core::Interface::as_raw(self), pulleventinterest as _).ok() } } pub unsafe fn SetContextState(&self, econtextstate: SPCONTEXTSTATE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetContextState)(windows_core::Interface::as_raw(self), econtextstate).ok() } } pub unsafe fn GetContextState(&self, pecontextstate: *mut SPCONTEXTSTATE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetContextState)(windows_core::Interface::as_raw(self), core::mem::transmute(pecontextstate)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetContextState)(windows_core::Interface::as_raw(self), pecontextstate as _).ok() } } } #[repr(C)] @@ -3832,7 +3832,7 @@ impl ISpRecoContext2 { unsafe { (windows_core::Interface::vtable(self).SetGrammarOptions)(windows_core::Interface::as_raw(self), egrammaroptions).ok() } } pub unsafe fn GetGrammarOptions(&self, pegrammaroptions: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGrammarOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(pegrammaroptions)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGrammarOptions)(windows_core::Interface::as_raw(self), pegrammaroptions as _).ok() } } pub unsafe fn SetAdaptationData2(&self, padaptationdata: P0, cch: u32, ptopicname: P2, eadaptationsettings: u32, erelevance: SPADAPTATIONRELEVANCE) -> windows_core::Result<()> where @@ -3896,7 +3896,7 @@ impl core::ops::Deref for ISpRecoGrammar { windows_core::imp::interface_hierarchy!(ISpRecoGrammar, windows_core::IUnknown, ISpGrammarBuilder); impl ISpRecoGrammar { pub unsafe fn GetGrammarId(&self, pullgrammarid: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGrammarId)(windows_core::Interface::as_raw(self), core::mem::transmute(pullgrammarid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGrammarId)(windows_core::Interface::as_raw(self), pullgrammarid as _).ok() } } pub unsafe fn GetRecoContext(&self) -> windows_core::Result { unsafe { @@ -3936,7 +3936,7 @@ impl ISpRecoGrammar { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SetRuleState)(windows_core::Interface::as_raw(self), pszname.param().abi(), core::mem::transmute(preserved), newstate).ok() } + unsafe { (windows_core::Interface::vtable(self).SetRuleState)(windows_core::Interface::as_raw(self), pszname.param().abi(), preserved as _, newstate).ok() } } pub unsafe fn SetRuleIdState(&self, ulruleid: u32, newstate: SPRULESTATE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetRuleIdState)(windows_core::Interface::as_raw(self), ulruleid, newstate).ok() } @@ -3963,7 +3963,7 @@ impl ISpRecoGrammar { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).IsPronounceable)(windows_core::Interface::as_raw(self), pszword.param().abi(), core::mem::transmute(pwordpronounceable)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsPronounceable)(windows_core::Interface::as_raw(self), pszword.param().abi(), pwordpronounceable as _).ok() } } pub unsafe fn SetGrammarState(&self, egrammarstate: SPGRAMMARSTATE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetGrammarState)(windows_core::Interface::as_raw(self), egrammarstate).ok() } @@ -3973,10 +3973,10 @@ impl ISpRecoGrammar { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).SaveCmd)(windows_core::Interface::as_raw(self), pstream.param().abi(), ppszcomemerrortext.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetGrammarState(&self, pegrammarstate: *mut SPGRAMMARSTATE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGrammarState)(windows_core::Interface::as_raw(self), core::mem::transmute(pegrammarstate)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGrammarState)(windows_core::Interface::as_raw(self), pegrammarstate as _).ok() } } } #[repr(C)] @@ -4174,7 +4174,7 @@ windows_core::imp::define_interface!(ISpRecoGrammar2, ISpRecoGrammar2_Vtbl, 0x4b windows_core::imp::interface_hierarchy!(ISpRecoGrammar2, windows_core::IUnknown); impl ISpRecoGrammar2 { pub unsafe fn GetRules(&self, ppcomemrules: *mut *mut SPRULE, punumrules: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRules)(windows_core::Interface::as_raw(self), core::mem::transmute(ppcomemrules), core::mem::transmute(punumrules)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRules)(windows_core::Interface::as_raw(self), ppcomemrules as _, punumrules as _).ok() } } pub unsafe fn LoadCmdFromFile2(&self, pszfilename: P0, options: SPLOADOPTIONS, pszsharinguri: P2, pszbaseuri: P3) -> windows_core::Result<()> where @@ -4329,10 +4329,10 @@ impl core::ops::Deref for ISpRecoResult { windows_core::imp::interface_hierarchy!(ISpRecoResult, windows_core::IUnknown, ISpPhrase); impl ISpRecoResult { pub unsafe fn GetResultTimes(&self, ptimes: *mut SPRECORESULTTIMES) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetResultTimes)(windows_core::Interface::as_raw(self), core::mem::transmute(ptimes)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetResultTimes)(windows_core::Interface::as_raw(self), ptimes as _).ok() } } pub unsafe fn GetAlternates(&self, ulstartelement: u32, celements: u32, ppphrases: &mut [Option], pcphrasesreturned: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAlternates)(windows_core::Interface::as_raw(self), ulstartelement, celements, ppphrases.len().try_into().unwrap(), core::mem::transmute(ppphrases.as_ptr()), core::mem::transmute(pcphrasesreturned)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAlternates)(windows_core::Interface::as_raw(self), ulstartelement, celements, ppphrases.len().try_into().unwrap(), core::mem::transmute(ppphrases.as_ptr()), pcphrasesreturned as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetAudio(&self, ulstartelement: u32, celements: u32) -> windows_core::Result { @@ -4342,10 +4342,10 @@ impl ISpRecoResult { } } pub unsafe fn SpeakAudio(&self, ulstartelement: u32, celements: u32, dwflags: u32, pulstreamnumber: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SpeakAudio)(windows_core::Interface::as_raw(self), ulstartelement, celements, dwflags, core::mem::transmute(pulstreamnumber)).ok() } + unsafe { (windows_core::Interface::vtable(self).SpeakAudio)(windows_core::Interface::as_raw(self), ulstartelement, celements, dwflags, pulstreamnumber as _).ok() } } pub unsafe fn Serialize(&self, ppcomemserializedresult: *mut *mut SPSERIALIZEDRESULT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Serialize)(windows_core::Interface::as_raw(self), core::mem::transmute(ppcomemserializedresult)).ok() } + unsafe { (windows_core::Interface::vtable(self).Serialize)(windows_core::Interface::as_raw(self), ppcomemserializedresult as _).ok() } } #[cfg(feature = "Win32_Media_Audio")] pub unsafe fn ScaleAudio(&self, paudioformatid: *const windows_core::GUID, pwaveformatex: *const super::Audio::WAVEFORMATEX) -> windows_core::Result<()> { @@ -4605,30 +4605,30 @@ impl ISpRecognizer { unsafe { (windows_core::Interface::vtable(self).IsSharedInstance)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetRecoState(&self, pstate: *mut SPRECOSTATE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRecoState)(windows_core::Interface::as_raw(self), core::mem::transmute(pstate)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecoState)(windows_core::Interface::as_raw(self), pstate as _).ok() } } pub unsafe fn SetRecoState(&self, newstate: SPRECOSTATE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetRecoState)(windows_core::Interface::as_raw(self), newstate).ok() } } pub unsafe fn GetStatus(&self, pstatus: *mut SPRECOGNIZERSTATUS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), pstatus as _).ok() } } #[cfg(feature = "Win32_Media_Audio")] pub unsafe fn GetFormat(&self, waveformattype: SPSTREAMFORMATTYPE, pformatid: *mut windows_core::GUID, ppcomemwfex: *mut *mut super::Audio::WAVEFORMATEX) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFormat)(windows_core::Interface::as_raw(self), waveformattype, core::mem::transmute(pformatid), core::mem::transmute(ppcomemwfex)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFormat)(windows_core::Interface::as_raw(self), waveformattype, pformatid as _, ppcomemwfex as _).ok() } } pub unsafe fn IsUISupported(&self, psztypeofui: P0, pvextradata: *mut core::ffi::c_void, cbextradata: u32, pfsupported: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).IsUISupported)(windows_core::Interface::as_raw(self), psztypeofui.param().abi(), core::mem::transmute(pvextradata), cbextradata, core::mem::transmute(pfsupported)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsUISupported)(windows_core::Interface::as_raw(self), psztypeofui.param().abi(), pvextradata as _, cbextradata, pfsupported as _).ok() } } 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 P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DisplayUI)(windows_core::Interface::as_raw(self), hwndparent, psztitle.param().abi(), psztypeofui.param().abi(), core::mem::transmute(pvextradata), cbextradata).ok() } + unsafe { (windows_core::Interface::vtable(self).DisplayUI)(windows_core::Interface::as_raw(self), hwndparent, psztitle.param().abi(), psztypeofui.param().abi(), pvextradata as _, cbextradata).ok() } } pub unsafe fn EmulateRecognition(&self, pphrase: P0) -> windows_core::Result<()> where @@ -4960,7 +4960,7 @@ impl ISpResourceManager { unsafe { (windows_core::Interface::vtable(self).SetObject)(windows_core::Interface::as_raw(self), guidserviceid, punkobject.param().abi()).ok() } } pub unsafe fn GetObject(&self, guidserviceid: *const windows_core::GUID, objectclsid: *const windows_core::GUID, objectiid: *const windows_core::GUID, freleasewhenlastexternalrefreleased: bool, ppobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetObject)(windows_core::Interface::as_raw(self), guidserviceid, objectclsid, objectiid, freleasewhenlastexternalrefreleased.into(), core::mem::transmute(ppobject)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetObject)(windows_core::Interface::as_raw(self), guidserviceid, objectclsid, objectiid, freleasewhenlastexternalrefreleased.into(), ppobject as _).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -5006,10 +5006,10 @@ windows_core::imp::define_interface!(ISpSRAlternates, ISpSRAlternates_Vtbl, 0xfe windows_core::imp::interface_hierarchy!(ISpSRAlternates, windows_core::IUnknown); impl ISpSRAlternates { pub unsafe fn GetAlternates(&self, paltrequest: *const SPPHRASEALTREQUEST, ppalts: *mut *mut SPPHRASEALT, pcalts: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAlternates)(windows_core::Interface::as_raw(self), core::mem::transmute(paltrequest), core::mem::transmute(ppalts), core::mem::transmute(pcalts)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAlternates)(windows_core::Interface::as_raw(self), core::mem::transmute(paltrequest), ppalts as _, pcalts as _).ok() } } pub unsafe fn Commit(&self, paltrequest: *const SPPHRASEALTREQUEST, palt: *const SPPHRASEALT, ppvresultextra: *mut *mut core::ffi::c_void, pcbresultextra: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Commit)(windows_core::Interface::as_raw(self), core::mem::transmute(paltrequest), core::mem::transmute(palt), core::mem::transmute(ppvresultextra), core::mem::transmute(pcbresultextra)).ok() } + unsafe { (windows_core::Interface::vtable(self).Commit)(windows_core::Interface::as_raw(self), core::mem::transmute(paltrequest), core::mem::transmute(palt), ppvresultextra as _, pcbresultextra as _).ok() } } } #[repr(C)] @@ -5097,7 +5097,7 @@ impl ISpSREngine { } #[cfg(feature = "Win32_Media_Audio")] pub unsafe fn GetInputAudioFormat(&self, pguidsourceformatid: *const windows_core::GUID, psourcewaveformatex: *const super::Audio::WAVEFORMATEX, pguiddesiredformatid: *mut windows_core::GUID, ppcomemdesiredwaveformatex: *mut *mut super::Audio::WAVEFORMATEX) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInputAudioFormat)(windows_core::Interface::as_raw(self), pguidsourceformatid, psourcewaveformatex, core::mem::transmute(pguiddesiredformatid), core::mem::transmute(ppcomemdesiredwaveformatex)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInputAudioFormat)(windows_core::Interface::as_raw(self), pguidsourceformatid, psourcewaveformatex, pguiddesiredformatid as _, ppcomemdesiredwaveformatex as _).ok() } } #[cfg(feature = "Win32_Media_Audio")] 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: bool, frealtimeaudio: bool, paudioobjecttoken: P7) -> windows_core::Result<()> @@ -5113,7 +5113,7 @@ impl ISpSREngine { unsafe { (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: SPGRAMMARHANDLE, ppvenginegrammarcontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OnCreateGrammar)(windows_core::Interface::as_raw(self), pvenginerecocontext, hsapigrammar, core::mem::transmute(ppvenginegrammarcontext)).ok() } + unsafe { (windows_core::Interface::vtable(self).OnCreateGrammar)(windows_core::Interface::as_raw(self), pvenginerecocontext, hsapigrammar, ppvenginegrammarcontext as _).ok() } } pub unsafe fn OnDeleteGrammar(&self, pvenginegrammar: *const core::ffi::c_void) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OnDeleteGrammar)(windows_core::Interface::as_raw(self), pvenginegrammar).ok() } @@ -5167,13 +5167,13 @@ impl ISpSREngine { } } pub unsafe fn OnCreateRecoContext(&self, hsapirecocontext: SPRECOCONTEXTHANDLE, ppvenginecontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OnCreateRecoContext)(windows_core::Interface::as_raw(self), hsapirecocontext, core::mem::transmute(ppvenginecontext)).ok() } + unsafe { (windows_core::Interface::vtable(self).OnCreateRecoContext)(windows_core::Interface::as_raw(self), hsapirecocontext, ppvenginecontext as _).ok() } } pub unsafe fn OnDeleteRecoContext(&self, pvenginecontext: *const core::ffi::c_void) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OnDeleteRecoContext)(windows_core::Interface::as_raw(self), pvenginecontext).ok() } } pub unsafe fn PrivateCall(&self, pvenginecontext: *const core::ffi::c_void, pcallframe: *mut core::ffi::c_void, ulcallframesize: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).PrivateCall)(windows_core::Interface::as_raw(self), pvenginecontext, core::mem::transmute(pcallframe), ulcallframesize).ok() } + unsafe { (windows_core::Interface::vtable(self).PrivateCall)(windows_core::Interface::as_raw(self), pvenginecontext, pcallframe as _, ulcallframesize).ok() } } pub unsafe fn SetAdaptationData(&self, pvenginecontext: *const core::ffi::c_void, padaptationdata: &[u16]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetAdaptationData)(windows_core::Interface::as_raw(self), pvenginecontext, core::mem::transmute(padaptationdata.as_ptr()), padaptationdata.len().try_into().unwrap()).ok() } @@ -5219,7 +5219,7 @@ impl ISpSREngine { unsafe { (windows_core::Interface::vtable(self).RuleNotify)(windows_core::Interface::as_raw(self), action, crules, prules).ok() } } pub unsafe fn PrivateCallEx(&self, pvenginecontext: *const core::ffi::c_void, pincallframe: *const core::ffi::c_void, ulincallframesize: u32, ppvcomemresponse: *mut *mut core::ffi::c_void, pulresponsesize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).PrivateCallEx)(windows_core::Interface::as_raw(self), pvenginecontext, pincallframe, ulincallframesize, core::mem::transmute(ppvcomemresponse), core::mem::transmute(pulresponsesize)).ok() } + unsafe { (windows_core::Interface::vtable(self).PrivateCallEx)(windows_core::Interface::as_raw(self), pvenginecontext, pincallframe, ulincallframesize, ppvcomemresponse as _, pulresponsesize as _).ok() } } pub unsafe fn SetContextState(&self, pvenginecontext: *const core::ffi::c_void, econtextstate: SPCONTEXTSTATE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetContextState)(windows_core::Interface::as_raw(self), pvenginecontext, econtextstate).ok() } @@ -5546,7 +5546,7 @@ impl core::ops::Deref for ISpSREngine2 { windows_core::imp::interface_hierarchy!(ISpSREngine2, windows_core::IUnknown, ISpSREngine); impl ISpSREngine2 { pub unsafe fn PrivateCallImmediate(&self, pvenginecontext: *const core::ffi::c_void, pincallframe: *const core::ffi::c_void, ulincallframesize: u32, ppvcomemresponse: *mut *mut core::ffi::c_void, pulresponsesize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).PrivateCallImmediate)(windows_core::Interface::as_raw(self), pvenginecontext, pincallframe, ulincallframesize, core::mem::transmute(ppvcomemresponse), core::mem::transmute(pulresponsesize)).ok() } + unsafe { (windows_core::Interface::vtable(self).PrivateCallImmediate)(windows_core::Interface::as_raw(self), pvenginecontext, pincallframe, ulincallframesize, ppvcomemresponse as _, pulresponsesize as _).ok() } } pub unsafe fn SetAdaptationData2(&self, pvenginecontext: *const core::ffi::c_void, padaptationdata: &[u16], ptopicname: P3, esettings: SPADAPTATIONSETTINGS, erelevance: SPADAPTATIONRELEVANCE) -> windows_core::Result<()> where @@ -5741,19 +5741,19 @@ impl ISpSREngineSite { unsafe { (windows_core::Interface::vtable(self).Synchronize)(windows_core::Interface::as_raw(self), ullprocessedthrupos).ok() } } pub unsafe fn GetWordInfo(&self, pwordentry: *mut SPWORDENTRY, options: SPWORDINFOOPT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWordInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pwordentry), options).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWordInfo)(windows_core::Interface::as_raw(self), pwordentry as _, options).ok() } } pub unsafe fn SetWordClientContext(&self, hword: SPWORDHANDLE, pvclientcontext: *const core::ffi::c_void) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetWordClientContext)(windows_core::Interface::as_raw(self), hword, pvclientcontext).ok() } } pub unsafe fn GetRuleInfo(&self, pruleentry: *mut SPRULEENTRY, options: SPRULEINFOOPT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRuleInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pruleentry), options).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRuleInfo)(windows_core::Interface::as_raw(self), pruleentry as _, options).ok() } } pub unsafe fn SetRuleClientContext(&self, hrule: SPRULEHANDLE, pvclientcontext: *const core::ffi::c_void) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetRuleClientContext)(windows_core::Interface::as_raw(self), hrule, pvclientcontext).ok() } } pub unsafe fn GetStateInfo(&self, hstate: SPSTATEHANDLE, pstateinfo: *mut SPSTATEINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStateInfo)(windows_core::Interface::as_raw(self), hstate, core::mem::transmute(pstateinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStateInfo)(windows_core::Interface::as_raw(self), hstate, pstateinfo as _).ok() } } pub unsafe fn GetResource(&self, hrule: SPRULEHANDLE, pszresourcename: P1) -> windows_core::Result where @@ -6033,7 +6033,7 @@ impl ISpSREngineSite2 { unsafe { (windows_core::Interface::vtable(self).UpdateRecoPosEx)(windows_core::Interface::as_raw(self), ullcurrentrecopos, ullcurrentrecotime).ok() } } pub unsafe fn GetRuleTransition(&self, ulgrammarid: u32, ruleindex: u32, ptrans: *mut SPTRANSITIONENTRY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRuleTransition)(windows_core::Interface::as_raw(self), ulgrammarid, ruleindex, core::mem::transmute(ptrans)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRuleTransition)(windows_core::Interface::as_raw(self), ulgrammarid, ruleindex, ptrans as _).ok() } } pub unsafe fn RecognitionEx(&self, presultinfo: *const SPRECORESULTINFOEX) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RecognitionEx)(windows_core::Interface::as_raw(self), core::mem::transmute(presultinfo)).ok() } @@ -6099,7 +6099,7 @@ windows_core::imp::define_interface!(ISpSerializeState, ISpSerializeState_Vtbl, windows_core::imp::interface_hierarchy!(ISpSerializeState, windows_core::IUnknown); impl ISpSerializeState { pub unsafe fn GetSerializedState(&self, ppbdata: *mut *mut u8, pulsize: *mut u32, dwreserved: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSerializedState)(windows_core::Interface::as_raw(self), core::mem::transmute(ppbdata), core::mem::transmute(pulsize), dwreserved).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSerializedState)(windows_core::Interface::as_raw(self), ppbdata as _, pulsize as _, dwreserved).ok() } } pub unsafe fn SetSerializedState(&self, pbdata: *const u8, ulsize: u32, dwreserved: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSerializedState)(windows_core::Interface::as_raw(self), pbdata, ulsize, dwreserved).ok() } @@ -6158,7 +6158,7 @@ impl ISpShortcut { unsafe { (windows_core::Interface::vtable(self).RemoveShortcut)(windows_core::Interface::as_raw(self), pszdisplay.param().abi(), langid, pszspoken.param().abi(), shtype).ok() } } pub unsafe fn GetShortcuts(&self, langid: u16, pshortcutpairlist: *mut SPSHORTCUTPAIRLIST) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetShortcuts)(windows_core::Interface::as_raw(self), langid, core::mem::transmute(pshortcutpairlist)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetShortcuts)(windows_core::Interface::as_raw(self), langid, pshortcutpairlist as _).ok() } } pub unsafe fn GetGeneration(&self) -> windows_core::Result { unsafe { @@ -6167,16 +6167,16 @@ impl ISpShortcut { } } pub unsafe fn GetWordsFromGenerationChange(&self, pdwgeneration: *mut u32, pwordlist: *mut SPWORDLIST) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWordsFromGenerationChange)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwgeneration), core::mem::transmute(pwordlist)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWordsFromGenerationChange)(windows_core::Interface::as_raw(self), pdwgeneration as _, pwordlist as _).ok() } } pub unsafe fn GetWords(&self, pdwgeneration: *mut u32, pdwcookie: *mut u32, pwordlist: *mut SPWORDLIST) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWords)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwgeneration), core::mem::transmute(pdwcookie), core::mem::transmute(pwordlist)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWords)(windows_core::Interface::as_raw(self), pdwgeneration as _, pdwcookie as _, pwordlist as _).ok() } } pub unsafe fn GetShortcutsForGeneration(&self, pdwgeneration: *mut u32, pdwcookie: *mut u32, pshortcutpairlist: *mut SPSHORTCUTPAIRLIST) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetShortcutsForGeneration)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwgeneration), core::mem::transmute(pdwcookie), core::mem::transmute(pshortcutpairlist)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetShortcutsForGeneration)(windows_core::Interface::as_raw(self), pdwgeneration as _, pdwcookie as _, pshortcutpairlist as _).ok() } } pub unsafe fn GetGenerationChange(&self, pdwgeneration: *mut u32, pshortcutpairlist: *mut SPSHORTCUTPAIRLIST) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGenerationChange)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwgeneration), core::mem::transmute(pshortcutpairlist)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGenerationChange)(windows_core::Interface::as_raw(self), pdwgeneration as _, pshortcutpairlist as _).ok() } } } #[repr(C)] @@ -6305,7 +6305,7 @@ impl ISpStream { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).BindToFile)(windows_core::Interface::as_raw(self), pszfilename.param().abi(), emode, core::mem::transmute(pformatid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pwaveformatex.unwrap_or(core::mem::zeroed())), ulleventinterest).ok() } + unsafe { (windows_core::Interface::vtable(self).BindToFile)(windows_core::Interface::as_raw(self), pszfilename.param().abi(), emode, pformatid.unwrap_or(core::mem::zeroed()) as _, pwaveformatex.unwrap_or(core::mem::zeroed()) as _, ulleventinterest).ok() } } pub unsafe fn Close(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() } @@ -6590,7 +6590,7 @@ impl ISpTTSEngine { } #[cfg(feature = "Win32_Media_Audio")] pub unsafe fn GetOutputFormat(&self, ptargetfmtid: *const windows_core::GUID, ptargetwaveformatex: *const super::Audio::WAVEFORMATEX, poutputformatid: *mut windows_core::GUID, ppcomemoutputwaveformatex: *mut *mut super::Audio::WAVEFORMATEX) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOutputFormat)(windows_core::Interface::as_raw(self), ptargetfmtid, ptargetwaveformatex, core::mem::transmute(poutputformatid), core::mem::transmute(ppcomemoutputwaveformatex)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOutputFormat)(windows_core::Interface::as_raw(self), ptargetfmtid, ptargetwaveformatex, poutputformatid as _, ppcomemoutputwaveformatex as _).ok() } } } #[repr(C)] @@ -6668,7 +6668,7 @@ impl ISpTTSEngineSite { } } pub unsafe fn GetSkipInfo(&self, petype: *mut SPVSKIPTYPE, plnumitems: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSkipInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(petype), core::mem::transmute(plnumitems)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSkipInfo)(windows_core::Interface::as_raw(self), petype as _, plnumitems as _).ok() } } pub unsafe fn CompleteSkip(&self, ulnumskipped: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).CompleteSkip)(windows_core::Interface::as_raw(self), ulnumskipped).ok() } @@ -6766,7 +6766,7 @@ impl windows_core::RuntimeName for ISpTTSEngineSite {} windows_core::imp::define_interface!(ISpTask, ISpTask_Vtbl); impl ISpTask { pub unsafe fn Execute(&self, pvtaskdata: *mut core::ffi::c_void, pfcontinueprocessing: *const i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Execute)(windows_core::Interface::as_raw(self), core::mem::transmute(pvtaskdata), pfcontinueprocessing).ok() } + unsafe { (windows_core::Interface::vtable(self).Execute)(windows_core::Interface::as_raw(self), pvtaskdata as _, pfcontinueprocessing).ok() } } } #[repr(C)] @@ -6815,7 +6815,7 @@ impl ISpTaskManager { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).QueueTask)(windows_core::Interface::as_raw(self), ptask.param().abi(), pvtaskdata, hcompevent, core::mem::transmute(pdwgroupid), core::mem::transmute(ptaskid)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueueTask)(windows_core::Interface::as_raw(self), ptask.param().abi(), pvtaskdata, hcompevent, pdwgroupid as _, ptaskid as _).ok() } } pub unsafe fn CreateReoccurringTask(&self, ptask: P0, pvtaskdata: *const core::ffi::c_void, hcompevent: super::super::Foundation::HANDLE) -> windows_core::Result where @@ -6956,7 +6956,7 @@ impl ISpThreadControl { } } pub unsafe fn WaitForThreadDone(&self, fforcestop: bool, phrthreadresult: *mut windows_core::HRESULT, mstimeout: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).WaitForThreadDone)(windows_core::Interface::as_raw(self), fforcestop.into(), core::mem::transmute(phrthreadresult), mstimeout).ok() } + unsafe { (windows_core::Interface::vtable(self).WaitForThreadDone)(windows_core::Interface::as_raw(self), fforcestop.into(), phrthreadresult as _, mstimeout).ok() } } pub unsafe fn TerminateThread(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).TerminateThread)(windows_core::Interface::as_raw(self)).ok() } @@ -7087,13 +7087,13 @@ 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: super::super::Foundation::HWND) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).InitThread)(windows_core::Interface::as_raw(self), core::mem::transmute(pvtaskdata), hwnd).ok() } + unsafe { (windows_core::Interface::vtable(self).InitThread)(windows_core::Interface::as_raw(self), pvtaskdata as _, hwnd).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<()> { - unsafe { (windows_core::Interface::vtable(self).ThreadProc)(windows_core::Interface::as_raw(self), core::mem::transmute(pvtaskdata), hexitthreadevent, hnotifyevent, hwndworker, pfcontinueprocessing).ok() } + unsafe { (windows_core::Interface::vtable(self).ThreadProc)(windows_core::Interface::as_raw(self), pvtaskdata as _, hexitthreadevent, hnotifyevent, hwndworker, pfcontinueprocessing).ok() } } 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 { - unsafe { (windows_core::Interface::vtable(self).WindowMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(pvtaskdata), hwnd, msg, wparam, lparam) } + unsafe { (windows_core::Interface::vtable(self).WindowMessage)(windows_core::Interface::as_raw(self), pvtaskdata as _, hwnd, msg, wparam, lparam) } } } #[repr(C)] @@ -7315,47 +7315,47 @@ impl ISpVoice { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Speak)(windows_core::Interface::as_raw(self), pwcs.param().abi(), dwflags, core::mem::transmute(pulstreamnumber.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Speak)(windows_core::Interface::as_raw(self), pwcs.param().abi(), dwflags, pulstreamnumber.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).SpeakStream)(windows_core::Interface::as_raw(self), pstream.param().abi(), dwflags, core::mem::transmute(pulstreamnumber.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SpeakStream)(windows_core::Interface::as_raw(self), pstream.param().abi(), dwflags, pulstreamnumber.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetStatus(&self, pstatus: *mut SPVOICESTATUS, ppszlastbookmark: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pstatus), core::mem::transmute(ppszlastbookmark)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), pstatus as _, ppszlastbookmark as _).ok() } } pub unsafe fn Skip(&self, pitemtype: P0, lnumitems: i32, pulnumskipped: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), pitemtype.param().abi(), lnumitems, core::mem::transmute(pulnumskipped)).ok() } + unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), pitemtype.param().abi(), lnumitems, pulnumskipped as _).ok() } } pub unsafe fn SetPriority(&self, epriority: SPVPRIORITY) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetPriority)(windows_core::Interface::as_raw(self), epriority).ok() } } pub unsafe fn GetPriority(&self, pepriority: *mut SPVPRIORITY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPriority)(windows_core::Interface::as_raw(self), core::mem::transmute(pepriority)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPriority)(windows_core::Interface::as_raw(self), pepriority as _).ok() } } pub unsafe fn SetAlertBoundary(&self, eboundary: SPEVENTENUM) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetAlertBoundary)(windows_core::Interface::as_raw(self), eboundary).ok() } } pub unsafe fn GetAlertBoundary(&self, peboundary: *mut SPEVENTENUM) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAlertBoundary)(windows_core::Interface::as_raw(self), core::mem::transmute(peboundary)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAlertBoundary)(windows_core::Interface::as_raw(self), peboundary as _).ok() } } pub unsafe fn SetRate(&self, rateadjust: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetRate)(windows_core::Interface::as_raw(self), rateadjust).ok() } } pub unsafe fn GetRate(&self, prateadjust: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRate)(windows_core::Interface::as_raw(self), core::mem::transmute(prateadjust)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRate)(windows_core::Interface::as_raw(self), prateadjust as _).ok() } } pub unsafe fn SetVolume(&self, usvolume: u16) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetVolume)(windows_core::Interface::as_raw(self), usvolume).ok() } } pub unsafe fn GetVolume(&self, pusvolume: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVolume)(windows_core::Interface::as_raw(self), core::mem::transmute(pusvolume)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVolume)(windows_core::Interface::as_raw(self), pusvolume as _).ok() } } pub unsafe fn WaitUntilDone(&self, mstimeout: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).WaitUntilDone)(windows_core::Interface::as_raw(self), mstimeout).ok() } @@ -7364,7 +7364,7 @@ impl ISpVoice { unsafe { (windows_core::Interface::vtable(self).SetSyncSpeakTimeout)(windows_core::Interface::as_raw(self), mstimeout).ok() } } pub unsafe fn GetSyncSpeakTimeout(&self, pmstimeout: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSyncSpeakTimeout)(windows_core::Interface::as_raw(self), core::mem::transmute(pmstimeout)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSyncSpeakTimeout)(windows_core::Interface::as_raw(self), pmstimeout as _).ok() } } pub unsafe fn SpeakCompleteEvent(&self) -> super::super::Foundation::HANDLE { unsafe { (windows_core::Interface::vtable(self).SpeakCompleteEvent)(windows_core::Interface::as_raw(self)) } @@ -7373,14 +7373,14 @@ impl ISpVoice { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).IsUISupported)(windows_core::Interface::as_raw(self), psztypeofui.param().abi(), core::mem::transmute(pvextradata), cbextradata, core::mem::transmute(pfsupported)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsUISupported)(windows_core::Interface::as_raw(self), psztypeofui.param().abi(), pvextradata as _, cbextradata, pfsupported as _).ok() } } 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 P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DisplayUI)(windows_core::Interface::as_raw(self), hwndparent, psztitle.param().abi(), psztypeofui.param().abi(), core::mem::transmute(pvextradata), cbextradata).ok() } + unsafe { (windows_core::Interface::vtable(self).DisplayUI)(windows_core::Interface::as_raw(self), hwndparent, psztitle.param().abi(), psztypeofui.param().abi(), pvextradata as _, cbextradata).ok() } } } #[repr(C)] @@ -7662,10 +7662,10 @@ impl core::ops::Deref for ISpXMLRecoResult { windows_core::imp::interface_hierarchy!(ISpXMLRecoResult, windows_core::IUnknown, ISpPhrase, ISpRecoResult); impl ISpXMLRecoResult { pub unsafe fn GetXMLResult(&self, ppszcomemxmlresult: *mut windows_core::PWSTR, options: SPXMLRESULTOPTIONS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetXMLResult)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszcomemxmlresult), options).ok() } + unsafe { (windows_core::Interface::vtable(self).GetXMLResult)(windows_core::Interface::as_raw(self), ppszcomemxmlresult as _, options).ok() } } pub unsafe fn GetXMLErrorInfo(&self, psemanticerrorinfo: *mut SPSEMANTICERRORINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetXMLErrorInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(psemanticerrorinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetXMLErrorInfo)(windows_core::Interface::as_raw(self), psemanticerrorinfo as _).ok() } } } #[repr(C)] @@ -8349,7 +8349,7 @@ impl ISpeechBaseStream { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn Read(&self, buffer: *mut super::super::System::Variant::VARIANT, numberofbytes: i32, bytesread: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer), numberofbytes, core::mem::transmute(bytesread)).ok() } + unsafe { (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer), numberofbytes, bytesread as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn Write(&self, buffer: &super::super::System::Variant::VARIANT) -> windows_core::Result { @@ -9656,7 +9656,7 @@ impl ISpeechLexicon { } } pub unsafe fn GetWords(&self, flags: SpeechLexiconType, generationid: *mut i32, words: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWords)(windows_core::Interface::as_raw(self), flags, core::mem::transmute(generationid), core::mem::transmute(words)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWords)(windows_core::Interface::as_raw(self), flags, generationid as _, core::mem::transmute(words)).ok() } } pub unsafe fn AddPronunciation(&self, bstrword: &windows_core::BSTR, langid: i32, partofspeech: SpeechPartOfSpeech, bstrpronunciation: &windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).AddPronunciation)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrword), langid, partofspeech, core::mem::transmute_copy(bstrpronunciation)).ok() } @@ -9679,7 +9679,7 @@ impl ISpeechLexicon { } } pub unsafe fn GetGenerationChange(&self, generationid: *mut i32, ppwords: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGenerationChange)(windows_core::Interface::as_raw(self), core::mem::transmute(generationid), core::mem::transmute(ppwords)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGenerationChange)(windows_core::Interface::as_raw(self), generationid as _, core::mem::transmute(ppwords)).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -14184,7 +14184,7 @@ 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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetXMLErrorInfo)(windows_core::Interface::as_raw(self), linenumber as _, core::mem::transmute(scriptline), core::mem::transmute(source), core::mem::transmute(description), resultcode as _, iserror as _).ok() } } pub unsafe fn SetTextFeedback(&self, feedback: &windows_core::BSTR, wassuccessful: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetTextFeedback)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(feedback), wassuccessful).ok() } @@ -14630,7 +14630,7 @@ impl ISpeechRecognizer { } } pub unsafe fn GetPropertyNumber(&self, name: &windows_core::BSTR, value: *mut i32, supported: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPropertyNumber)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(name), core::mem::transmute(value), core::mem::transmute(supported)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropertyNumber)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(name), value as _, supported as _).ok() } } pub unsafe fn SetPropertyString(&self, name: &windows_core::BSTR, value: &windows_core::BSTR) -> windows_core::Result { unsafe { @@ -14639,7 +14639,7 @@ impl ISpeechRecognizer { } } pub unsafe fn GetPropertyString(&self, name: &windows_core::BSTR, value: *mut windows_core::BSTR, supported: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPropertyString)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(name), core::mem::transmute(value), core::mem::transmute(supported)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropertyString)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(name), core::mem::transmute(value), supported as _).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) -> windows_core::Result { @@ -15214,10 +15214,10 @@ windows_core::imp::interface_hierarchy!(ISpeechResourceLoader, windows_core::IUn #[cfg(feature = "Win32_System_Com")] impl ISpeechResourceLoader { 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<()> { - unsafe { (windows_core::Interface::vtable(self).LoadResource)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrresourceuri), 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() } + unsafe { (windows_core::Interface::vtable(self).LoadResource)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrresourceuri), falwaysreload, core::mem::transmute(pstream), pbstrmimetype.unwrap_or(core::mem::zeroed()) as _, pfmodified as _, pbstrredirecturl.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetLocalCopy)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrresourceuri), core::mem::transmute(pbstrlocalpath), pbstrmimetype.unwrap_or(core::mem::zeroed()) as _, pbstrredirecturl.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReleaseLocalCopy(&self, pbstrlocalpath: &windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ReleaseLocalCopy)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(pbstrlocalpath)).ok() } @@ -16629,7 +16629,7 @@ impl ISpeechXMLRecoResult { } } 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 i32, iserror: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetXMLErrorInfo)(windows_core::Interface::as_raw(self), linenumber as _, core::mem::transmute(scriptline), core::mem::transmute(source), core::mem::transmute(description), resultcode as _, iserror as _).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -18575,10 +18575,10 @@ windows_core::imp::define_interface!(_ISpPrivateEngineCall, _ISpPrivateEngineCal windows_core::imp::interface_hierarchy!(_ISpPrivateEngineCall, windows_core::IUnknown); impl _ISpPrivateEngineCall { pub unsafe fn CallEngine(&self, pcallframe: *mut core::ffi::c_void, ulcallframesize: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CallEngine)(windows_core::Interface::as_raw(self), core::mem::transmute(pcallframe), ulcallframesize).ok() } + unsafe { (windows_core::Interface::vtable(self).CallEngine)(windows_core::Interface::as_raw(self), pcallframe as _, ulcallframesize).ok() } } pub unsafe fn CallEngineEx(&self, pinframe: *const core::ffi::c_void, ulinframesize: u32, ppcomemoutframe: *mut *mut core::ffi::c_void, puloutframesize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CallEngineEx)(windows_core::Interface::as_raw(self), pinframe, ulinframesize, core::mem::transmute(ppcomemoutframe), core::mem::transmute(puloutframesize)).ok() } + unsafe { (windows_core::Interface::vtable(self).CallEngineEx)(windows_core::Interface::as_raw(self), pinframe, ulinframesize, ppcomemoutframe as _, puloutframesize as _).ok() } } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/Media/WindowsMediaFormat/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/WindowsMediaFormat/mod.rs index b5b1b9f6ec..fae0f5b44b 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/WindowsMediaFormat/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/WindowsMediaFormat/mod.rs @@ -96,7 +96,7 @@ where P0: windows_core::Param, { windows_targets::link!("wmvcore.dll" "system" fn WMIsContentProtected(pwszfilename : windows_core::PCWSTR, pfisprotected : *mut super::super::Foundation:: BOOL) -> windows_core::HRESULT); - unsafe { WMIsContentProtected(pwszfilename.param().abi(), core::mem::transmute(pfisprotected)).ok() } + unsafe { WMIsContentProtected(pwszfilename.param().abi(), pfisprotected as _).ok() } } pub const AM_CONFIGASFWRITER_PARAM_AUTOINDEX: _AM_ASFWRITERCONFIG_PARAM = _AM_ASFWRITERCONFIG_PARAM(1i32); pub const AM_CONFIGASFWRITER_PARAM_DONTCOMPRESS: _AM_ASFWRITERCONFIG_PARAM = _AM_ASFWRITERCONFIG_PARAM(3i32); @@ -248,7 +248,7 @@ impl INSNetSourceCreator { } } pub unsafe fn GetProtocolName(&self, dwprotocolnum: u32, pwszprotocolname: windows_core::PWSTR, pcchprotocolname: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProtocolName)(windows_core::Interface::as_raw(self), dwprotocolnum, core::mem::transmute(pwszprotocolname), core::mem::transmute(pcchprotocolname)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProtocolName)(windows_core::Interface::as_raw(self), dwprotocolnum, core::mem::transmute(pwszprotocolname), pcchprotocolname as _).ok() } } pub unsafe fn Shutdown(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Shutdown)(windows_core::Interface::as_raw(self)).ok() } @@ -398,7 +398,7 @@ impl INSSBuffer { } } pub unsafe fn GetBufferAndLength(&self, ppdwbuffer: *mut *mut u8, pdwlength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBufferAndLength)(windows_core::Interface::as_raw(self), core::mem::transmute(ppdwbuffer), core::mem::transmute(pdwlength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBufferAndLength)(windows_core::Interface::as_raw(self), ppdwbuffer as _, pdwlength as _).ok() } } } #[repr(C)] @@ -554,7 +554,7 @@ impl INSSBuffer3 { unsafe { (windows_core::Interface::vtable(self).SetProperty)(windows_core::Interface::as_raw(self), core::mem::transmute(guidbufferproperty), pvbufferproperty, dwbufferpropertysize).ok() } } pub unsafe fn GetProperty(&self, guidbufferproperty: windows_core::GUID, pvbufferproperty: *mut core::ffi::c_void, pdwbufferpropertysize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), core::mem::transmute(guidbufferproperty), core::mem::transmute(pvbufferproperty), core::mem::transmute(pdwbufferpropertysize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), core::mem::transmute(guidbufferproperty), pvbufferproperty as _, pdwbufferpropertysize as _).ok() } } } #[repr(C)] @@ -604,7 +604,7 @@ impl INSSBuffer4 { } } pub unsafe fn GetPropertyByIndex(&self, dwbufferpropertyindex: u32, pguidbufferproperty: *mut windows_core::GUID, pvbufferproperty: *mut core::ffi::c_void, pdwbufferpropertysize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPropertyByIndex)(windows_core::Interface::as_raw(self), dwbufferpropertyindex, core::mem::transmute(pguidbufferproperty), core::mem::transmute(pvbufferproperty), core::mem::transmute(pdwbufferpropertysize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropertyByIndex)(windows_core::Interface::as_raw(self), dwbufferpropertyindex, pguidbufferproperty as _, pvbufferproperty as _, pdwbufferpropertysize as _).ok() } } } #[repr(C)] @@ -880,13 +880,13 @@ impl IWMBackupRestoreProps { } } pub unsafe fn GetPropByIndex(&self, windex: u16, pwszname: windows_core::PWSTR, pcchnamelen: *mut u16, ptype: *mut WMT_ATTR_DATATYPE, pvalue: *mut u8, pcblength: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPropByIndex)(windows_core::Interface::as_raw(self), windex, core::mem::transmute(pwszname), core::mem::transmute(pcchnamelen), core::mem::transmute(ptype), core::mem::transmute(pvalue), core::mem::transmute(pcblength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropByIndex)(windows_core::Interface::as_raw(self), windex, core::mem::transmute(pwszname), pcchnamelen as _, ptype as _, pvalue as _, pcblength as _).ok() } } pub unsafe fn GetPropByName(&self, pszname: P0, ptype: *mut WMT_ATTR_DATATYPE, pvalue: *mut u8, pcblength: *mut u16) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetPropByName)(windows_core::Interface::as_raw(self), pszname.param().abi(), core::mem::transmute(ptype), core::mem::transmute(pvalue), core::mem::transmute(pcblength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropByName)(windows_core::Interface::as_raw(self), pszname.param().abi(), ptype as _, pvalue as _, pcblength as _).ok() } } pub unsafe fn SetProp(&self, pszname: P0, r#type: WMT_ATTR_DATATYPE, pvalue: &[u8]) -> windows_core::Result<()> where @@ -1000,7 +1000,7 @@ impl IWMBandwidthSharing { unsafe { (windows_core::Interface::vtable(self).SetType)(windows_core::Interface::as_raw(self), guidtype).ok() } } pub unsafe fn GetBandwidth(&self, pdwbitrate: *mut u32, pmsbufferwindow: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBandwidth)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwbitrate), core::mem::transmute(pmsbufferwindow)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBandwidth)(windows_core::Interface::as_raw(self), pdwbitrate as _, pmsbufferwindow as _).ok() } } pub unsafe fn SetBandwidth(&self, dwbitrate: u32, msbufferwindow: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetBandwidth)(windows_core::Interface::as_raw(self), dwbitrate, msbufferwindow).ok() } @@ -1138,7 +1138,7 @@ impl core::ops::Deref for IWMClientConnections2 { windows_core::imp::interface_hierarchy!(IWMClientConnections2, windows_core::IUnknown, IWMClientConnections); impl IWMClientConnections2 { pub unsafe fn GetClientInfo(&self, dwclientnum: u32, pwsznetworkaddress: windows_core::PWSTR, pcchnetworkaddress: *mut u32, pwszport: windows_core::PWSTR, pcchport: *mut u32, pwszdnsname: windows_core::PWSTR, pcchdnsname: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClientInfo)(windows_core::Interface::as_raw(self), dwclientnum, core::mem::transmute(pwsznetworkaddress), core::mem::transmute(pcchnetworkaddress), core::mem::transmute(pwszport), core::mem::transmute(pcchport), core::mem::transmute(pwszdnsname), core::mem::transmute(pcchdnsname)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClientInfo)(windows_core::Interface::as_raw(self), dwclientnum, core::mem::transmute(pwsznetworkaddress), pcchnetworkaddress as _, core::mem::transmute(pwszport), pcchport as _, core::mem::transmute(pwszdnsname), pcchdnsname as _).ok() } } } #[repr(C)] @@ -1258,10 +1258,10 @@ impl core::ops::Deref for IWMCodecInfo2 { windows_core::imp::interface_hierarchy!(IWMCodecInfo2, windows_core::IUnknown, IWMCodecInfo); impl IWMCodecInfo2 { pub unsafe fn GetCodecName(&self, guidtype: *const windows_core::GUID, dwcodecindex: u32, wszname: windows_core::PWSTR, pcchname: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCodecName)(windows_core::Interface::as_raw(self), guidtype, dwcodecindex, core::mem::transmute(wszname), core::mem::transmute(pcchname)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCodecName)(windows_core::Interface::as_raw(self), guidtype, dwcodecindex, core::mem::transmute(wszname), pcchname as _).ok() } } pub unsafe fn GetCodecFormatDesc(&self, guidtype: *const windows_core::GUID, dwcodecindex: u32, dwformatindex: u32, ppistreamconfig: *mut Option, wszdesc: windows_core::PWSTR, pcchdesc: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCodecFormatDesc)(windows_core::Interface::as_raw(self), guidtype, dwcodecindex, dwformatindex, core::mem::transmute(ppistreamconfig), core::mem::transmute(wszdesc), core::mem::transmute(pcchdesc)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCodecFormatDesc)(windows_core::Interface::as_raw(self), guidtype, dwcodecindex, dwformatindex, core::mem::transmute(ppistreamconfig), core::mem::transmute(wszdesc), pcchdesc as _).ok() } } } #[repr(C)] @@ -1312,13 +1312,13 @@ impl IWMCodecInfo3 { where P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetCodecFormatProp)(windows_core::Interface::as_raw(self), guidtype, dwcodecindex, dwformatindex, pszname.param().abi(), core::mem::transmute(ptype), core::mem::transmute(pvalue), core::mem::transmute(pdwsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCodecFormatProp)(windows_core::Interface::as_raw(self), guidtype, dwcodecindex, dwformatindex, pszname.param().abi(), ptype as _, pvalue as _, pdwsize as _).ok() } } pub unsafe fn GetCodecProp(&self, guidtype: *const windows_core::GUID, dwcodecindex: u32, pszname: P2, ptype: *mut WMT_ATTR_DATATYPE, pvalue: *mut u8, pdwsize: *mut u32) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetCodecProp)(windows_core::Interface::as_raw(self), guidtype, dwcodecindex, pszname.param().abi(), core::mem::transmute(ptype), core::mem::transmute(pvalue), core::mem::transmute(pdwsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCodecProp)(windows_core::Interface::as_raw(self), guidtype, dwcodecindex, pszname.param().abi(), ptype as _, pvalue as _, pdwsize as _).ok() } } pub unsafe fn SetCodecEnumerationSetting(&self, guidtype: *const windows_core::GUID, dwcodecindex: u32, pszname: P2, r#type: WMT_ATTR_DATATYPE, pvalue: &[u8]) -> windows_core::Result<()> where @@ -1330,7 +1330,7 @@ impl IWMCodecInfo3 { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetCodecEnumerationSetting)(windows_core::Interface::as_raw(self), guidtype, dwcodecindex, pszname.param().abi(), core::mem::transmute(ptype), core::mem::transmute(pvalue), core::mem::transmute(pdwsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCodecEnumerationSetting)(windows_core::Interface::as_raw(self), guidtype, dwcodecindex, pszname.param().abi(), ptype as _, pvalue as _, pdwsize as _).ok() } } } #[repr(C)] @@ -1394,7 +1394,7 @@ impl IWMCredentialCallback { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).AcquireCredentials)(windows_core::Interface::as_raw(self), pwszrealm.param().abi(), pwszsite.param().abi(), core::mem::transmute(pwszuser.as_ptr()), pwszuser.len().try_into().unwrap(), core::mem::transmute(pwszpassword.as_ptr()), pwszpassword.len().try_into().unwrap(), hrstatus, core::mem::transmute(pdwflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).AcquireCredentials)(windows_core::Interface::as_raw(self), pwszrealm.param().abi(), pwszsite.param().abi(), core::mem::transmute(pwszuser.as_ptr()), pwszuser.len().try_into().unwrap(), core::mem::transmute(pwszpassword.as_ptr()), pwszpassword.len().try_into().unwrap(), hrstatus, pdwflags as _).ok() } } } #[repr(C)] @@ -1427,7 +1427,7 @@ impl IWMDRMEditor { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetDRMProperty)(windows_core::Interface::as_raw(self), pwstrname.param().abi(), core::mem::transmute(pdwtype), core::mem::transmute(pvalue), core::mem::transmute(pcblength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDRMProperty)(windows_core::Interface::as_raw(self), pwstrname.param().abi(), pdwtype as _, pvalue as _, pcblength as _).ok() } } } #[repr(C)] @@ -1457,10 +1457,10 @@ windows_core::imp::define_interface!(IWMDRMMessageParser, IWMDRMMessageParser_Vt windows_core::imp::interface_hierarchy!(IWMDRMMessageParser, windows_core::IUnknown); impl IWMDRMMessageParser { pub unsafe fn ParseRegistrationReqMsg(&self, pbregistrationreqmsg: &[u8], ppdevicecert: *mut Option, pdeviceserialnumber: *mut DRM_VAL16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ParseRegistrationReqMsg)(windows_core::Interface::as_raw(self), core::mem::transmute(pbregistrationreqmsg.as_ptr()), pbregistrationreqmsg.len().try_into().unwrap(), core::mem::transmute(ppdevicecert), core::mem::transmute(pdeviceserialnumber)).ok() } + unsafe { (windows_core::Interface::vtable(self).ParseRegistrationReqMsg)(windows_core::Interface::as_raw(self), core::mem::transmute(pbregistrationreqmsg.as_ptr()), pbregistrationreqmsg.len().try_into().unwrap(), core::mem::transmute(ppdevicecert), pdeviceserialnumber as _).ok() } } pub unsafe fn ParseLicenseRequestMsg(&self, pblicenserequestmsg: &[u8], ppdevicecert: *mut Option, pdeviceserialnumber: *mut DRM_VAL16, pbstraction: *mut windows_core::BSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ParseLicenseRequestMsg)(windows_core::Interface::as_raw(self), core::mem::transmute(pblicenserequestmsg.as_ptr()), pblicenserequestmsg.len().try_into().unwrap(), core::mem::transmute(ppdevicecert), core::mem::transmute(pdeviceserialnumber), core::mem::transmute(pbstraction)).ok() } + unsafe { (windows_core::Interface::vtable(self).ParseLicenseRequestMsg)(windows_core::Interface::as_raw(self), core::mem::transmute(pblicenserequestmsg.as_ptr()), pblicenserequestmsg.len().try_into().unwrap(), core::mem::transmute(ppdevicecert), pdeviceserialnumber as _, core::mem::transmute(pbstraction)).ok() } } } #[repr(C)] @@ -1529,7 +1529,7 @@ impl IWMDRMReader { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetDRMProperty)(windows_core::Interface::as_raw(self), pwstrname.param().abi(), core::mem::transmute(pdwtype), core::mem::transmute(pvalue), core::mem::transmute(pcblength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDRMProperty)(windows_core::Interface::as_raw(self), pwstrname.param().abi(), pdwtype as _, pvalue as _, pcblength as _).ok() } } } #[repr(C)] @@ -1634,10 +1634,10 @@ impl IWMDRMReader2 { unsafe { (windows_core::Interface::vtable(self).SetEvaluateOutputLevelLicenses)(windows_core::Interface::as_raw(self), fevaluate.into()).ok() } } pub unsafe fn GetPlayOutputLevels(&self, pplayopl: *mut DRM_PLAY_OPL, pcblength: *mut u32, pdwminappcompliancelevel: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPlayOutputLevels)(windows_core::Interface::as_raw(self), core::mem::transmute(pplayopl), core::mem::transmute(pcblength), core::mem::transmute(pdwminappcompliancelevel)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPlayOutputLevels)(windows_core::Interface::as_raw(self), pplayopl as _, pcblength as _, pdwminappcompliancelevel as _).ok() } } pub unsafe fn GetCopyOutputLevels(&self, pcopyopl: *mut DRM_COPY_OPL, pcblength: *mut u32, pdwminappcompliancelevel: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCopyOutputLevels)(windows_core::Interface::as_raw(self), core::mem::transmute(pcopyopl), core::mem::transmute(pcblength), core::mem::transmute(pdwminappcompliancelevel)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCopyOutputLevels)(windows_core::Interface::as_raw(self), pcopyopl as _, pcblength as _, pdwminappcompliancelevel as _).ok() } } pub unsafe fn TryNextLicense(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).TryNextLicense)(windows_core::Interface::as_raw(self)).ok() } @@ -1706,7 +1706,7 @@ impl core::ops::Deref for IWMDRMReader3 { windows_core::imp::interface_hierarchy!(IWMDRMReader3, windows_core::IUnknown, IWMDRMReader, IWMDRMReader2); impl IWMDRMReader3 { pub unsafe fn GetInclusionList(&self, ppguids: *mut *mut windows_core::GUID, pcguids: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInclusionList)(windows_core::Interface::as_raw(self), core::mem::transmute(ppguids), core::mem::transmute(pcguids)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInclusionList)(windows_core::Interface::as_raw(self), ppguids as _, pcguids as _).ok() } } } #[repr(C)] @@ -1778,7 +1778,7 @@ impl IWMDRMTranscryptor { where P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrfilename), core::mem::transmute(pblicenserequestmsg), cblicenserequestmsg, core::mem::transmute(pplicenseresponsemsg), pcallback.param().abi(), pvcontext).ok() } + unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrfilename), pblicenserequestmsg as _, cblicenserequestmsg, core::mem::transmute(pplicenseresponsemsg), pcallback.param().abi(), pvcontext).ok() } } pub unsafe fn Seek(&self, hnstime: u64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Seek)(windows_core::Interface::as_raw(self), hnstime).ok() } @@ -1940,13 +1940,13 @@ windows_core::imp::define_interface!(IWMDRMWriter, IWMDRMWriter_Vtbl, 0xd6ea5dd0 windows_core::imp::interface_hierarchy!(IWMDRMWriter, windows_core::IUnknown); impl IWMDRMWriter { pub unsafe fn GenerateKeySeed(&self, pwszkeyseed: windows_core::PWSTR, pcwchlength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GenerateKeySeed)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszkeyseed), core::mem::transmute(pcwchlength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GenerateKeySeed)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszkeyseed), pcwchlength as _).ok() } } pub unsafe fn GenerateKeyID(&self, pwszkeyid: windows_core::PWSTR, pcwchlength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GenerateKeyID)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszkeyid), core::mem::transmute(pcwchlength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GenerateKeyID)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszkeyid), pcwchlength as _).ok() } } pub unsafe fn GenerateSigningKeyPair(&self, pwszprivkey: windows_core::PWSTR, pcwchprivkeylength: *mut u32, pwszpubkey: windows_core::PWSTR, pcwchpubkeylength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GenerateSigningKeyPair)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszprivkey), core::mem::transmute(pcwchprivkeylength), core::mem::transmute(pwszpubkey), core::mem::transmute(pcwchpubkeylength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GenerateSigningKeyPair)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszprivkey), pcwchprivkeylength as _, core::mem::transmute(pwszpubkey), pcwchpubkeylength as _).ok() } } pub unsafe fn SetDRMAttribute(&self, wstreamnum: u16, pszname: P1, r#type: WMT_ATTR_DATATYPE, pvalue: &[u8]) -> windows_core::Result<()> where @@ -2267,13 +2267,13 @@ impl IWMHeaderInfo { } } pub unsafe fn GetAttributeByIndex(&self, windex: u16, pwstreamnum: *mut u16, pwszname: windows_core::PWSTR, pcchnamelen: *mut u16, ptype: *mut WMT_ATTR_DATATYPE, pvalue: *mut u8, pcblength: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAttributeByIndex)(windows_core::Interface::as_raw(self), windex, core::mem::transmute(pwstreamnum), core::mem::transmute(pwszname), core::mem::transmute(pcchnamelen), core::mem::transmute(ptype), core::mem::transmute(pvalue), core::mem::transmute(pcblength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAttributeByIndex)(windows_core::Interface::as_raw(self), windex, pwstreamnum as _, core::mem::transmute(pwszname), pcchnamelen as _, ptype as _, pvalue as _, pcblength as _).ok() } } pub unsafe fn GetAttributeByName(&self, pwstreamnum: *mut u16, pszname: P1, ptype: *mut WMT_ATTR_DATATYPE, pvalue: *mut u8, pcblength: *mut u16) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetAttributeByName)(windows_core::Interface::as_raw(self), core::mem::transmute(pwstreamnum), pszname.param().abi(), core::mem::transmute(ptype), core::mem::transmute(pvalue), core::mem::transmute(pcblength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAttributeByName)(windows_core::Interface::as_raw(self), pwstreamnum as _, pszname.param().abi(), ptype as _, pvalue as _, pcblength as _).ok() } } pub unsafe fn SetAttribute(&self, wstreamnum: u16, pszname: P1, r#type: WMT_ATTR_DATATYPE, pvalue: &[u8]) -> windows_core::Result<()> where @@ -2288,7 +2288,7 @@ impl IWMHeaderInfo { } } pub unsafe fn GetMarker(&self, windex: u16, pwszmarkername: windows_core::PWSTR, pcchmarkernamelen: *mut u16, pcnsmarkertime: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMarker)(windows_core::Interface::as_raw(self), windex, core::mem::transmute(pwszmarkername), core::mem::transmute(pcchmarkernamelen), core::mem::transmute(pcnsmarkertime)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMarker)(windows_core::Interface::as_raw(self), windex, core::mem::transmute(pwszmarkername), pcchmarkernamelen as _, pcnsmarkertime as _).ok() } } pub unsafe fn AddMarker(&self, pwszmarkername: P0, cnsmarkertime: u64) -> windows_core::Result<()> where @@ -2306,7 +2306,7 @@ impl IWMHeaderInfo { } } pub unsafe fn GetScript(&self, windex: u16, pwsztype: windows_core::PWSTR, pcchtypelen: *mut u16, pwszcommand: windows_core::PWSTR, pcchcommandlen: *mut u16, pcnsscripttime: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetScript)(windows_core::Interface::as_raw(self), windex, core::mem::transmute(pwsztype), core::mem::transmute(pcchtypelen), core::mem::transmute(pwszcommand), core::mem::transmute(pcchcommandlen), core::mem::transmute(pcnsscripttime)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScript)(windows_core::Interface::as_raw(self), windex, core::mem::transmute(pwsztype), pcchtypelen as _, core::mem::transmute(pwszcommand), pcchcommandlen as _, pcnsscripttime as _).ok() } } pub unsafe fn AddScript(&self, pwsztype: P0, pwszcommand: P1, cnsscripttime: u64) -> windows_core::Result<()> where @@ -2478,7 +2478,7 @@ impl IWMHeaderInfo2 { } } pub unsafe fn GetCodecInfo(&self, windex: u32, pcchname: *mut u16, pwszname: windows_core::PWSTR, pcchdescription: *mut u16, pwszdescription: windows_core::PWSTR, pcodectype: *mut WMT_CODEC_INFO_TYPE, pcbcodecinfo: *mut u16, pbcodecinfo: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCodecInfo)(windows_core::Interface::as_raw(self), windex, core::mem::transmute(pcchname), core::mem::transmute(pwszname), core::mem::transmute(pcchdescription), core::mem::transmute(pwszdescription), core::mem::transmute(pcodectype), core::mem::transmute(pcbcodecinfo), core::mem::transmute(pbcodecinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCodecInfo)(windows_core::Interface::as_raw(self), windex, pcchname as _, core::mem::transmute(pwszname), pcchdescription as _, core::mem::transmute(pwszdescription), pcodectype as _, pcbcodecinfo as _, pbcodecinfo as _).ok() } } } #[repr(C)] @@ -2541,10 +2541,10 @@ impl IWMHeaderInfo3 { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetAttributeIndices)(windows_core::Interface::as_raw(self), wstreamnum, pwszname.param().abi(), pwlangindex, core::mem::transmute(pwindices), core::mem::transmute(pwcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAttributeIndices)(windows_core::Interface::as_raw(self), wstreamnum, pwszname.param().abi(), pwlangindex, pwindices as _, pwcount as _).ok() } } pub unsafe fn GetAttributeByIndexEx(&self, wstreamnum: u16, windex: u16, pwszname: windows_core::PWSTR, pwnamelen: *mut u16, ptype: *mut WMT_ATTR_DATATYPE, pwlangindex: *mut u16, pvalue: *mut u8, pdwdatalength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAttributeByIndexEx)(windows_core::Interface::as_raw(self), wstreamnum, windex, core::mem::transmute(pwszname), core::mem::transmute(pwnamelen), core::mem::transmute(ptype), core::mem::transmute(pwlangindex), core::mem::transmute(pvalue), core::mem::transmute(pdwdatalength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAttributeByIndexEx)(windows_core::Interface::as_raw(self), wstreamnum, windex, core::mem::transmute(pwszname), pwnamelen as _, ptype as _, pwlangindex as _, pvalue as _, pdwdatalength as _).ok() } } pub unsafe fn ModifyAttribute(&self, wstreamnum: u16, windex: u16, r#type: WMT_ATTR_DATATYPE, wlangindex: u16, pvalue: &[u8]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ModifyAttribute)(windows_core::Interface::as_raw(self), wstreamnum, windex, r#type, wlangindex, core::mem::transmute(pvalue.as_ptr()), pvalue.len().try_into().unwrap()).ok() } @@ -2553,7 +2553,7 @@ impl IWMHeaderInfo3 { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).AddAttribute)(windows_core::Interface::as_raw(self), wstreamnum, pszname.param().abi(), core::mem::transmute(pwindex), r#type, wlangindex, core::mem::transmute(pvalue.as_ptr()), pvalue.len().try_into().unwrap()).ok() } + unsafe { (windows_core::Interface::vtable(self).AddAttribute)(windows_core::Interface::as_raw(self), wstreamnum, pszname.param().abi(), pwindex as _, r#type, wlangindex, core::mem::transmute(pvalue.as_ptr()), pvalue.len().try_into().unwrap()).ok() } } pub unsafe fn DeleteAttribute(&self, wstreamnum: u16, windex: u16) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DeleteAttribute)(windows_core::Interface::as_raw(self), wstreamnum, windex).ok() } @@ -2659,7 +2659,7 @@ impl IWMIStreamProps { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), pszname.param().abi(), core::mem::transmute(ptype), core::mem::transmute(pvalue), core::mem::transmute(pdwsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), pszname.param().abi(), ptype as _, pvalue as _, pdwsize as _).ok() } } } #[repr(C)] @@ -2695,7 +2695,7 @@ impl IWMImageInfo { } } pub unsafe fn GetImage(&self, windex: u32, pcchmimetype: *mut u16, pwszmimetype: windows_core::PWSTR, pcchdescription: *mut u16, pwszdescription: windows_core::PWSTR, pimagetype: *mut u16, pcbimagedata: *mut u32, pbimagedata: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetImage)(windows_core::Interface::as_raw(self), windex, core::mem::transmute(pcchmimetype), core::mem::transmute(pwszmimetype), core::mem::transmute(pcchdescription), core::mem::transmute(pwszdescription), core::mem::transmute(pimagetype), core::mem::transmute(pcbimagedata), core::mem::transmute(pbimagedata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetImage)(windows_core::Interface::as_raw(self), windex, pcchmimetype as _, core::mem::transmute(pwszmimetype), pcchdescription as _, core::mem::transmute(pwszdescription), pimagetype as _, pcbimagedata as _, pbimagedata as _).ok() } } } #[repr(C)] @@ -2834,10 +2834,10 @@ impl core::ops::Deref for IWMInputMediaProps { windows_core::imp::interface_hierarchy!(IWMInputMediaProps, windows_core::IUnknown, IWMMediaProps); impl IWMInputMediaProps { pub unsafe fn GetConnectionName(&self, pwszname: windows_core::PWSTR, pcchname: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetConnectionName)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszname), core::mem::transmute(pcchname)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConnectionName)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszname), pcchname as _).ok() } } pub unsafe fn GetGroupName(&self, pwszname: windows_core::PWSTR, pcchname: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGroupName)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszname), core::mem::transmute(pcchname)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGroupName)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszname), pcchname as _).ok() } } } #[repr(C)] @@ -2885,7 +2885,7 @@ impl IWMLanguageList { } } pub unsafe fn GetLanguageDetails(&self, windex: u16, pwszlanguagestring: windows_core::PWSTR, pcchlanguagestringlength: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLanguageDetails)(windows_core::Interface::as_raw(self), windex, core::mem::transmute(pwszlanguagestring), core::mem::transmute(pcchlanguagestringlength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLanguageDetails)(windows_core::Interface::as_raw(self), windex, core::mem::transmute(pwszlanguagestring), pcchlanguagestringlength as _).ok() } } pub unsafe fn AddLanguageByRFC1766String(&self, pwszlanguagestring: P0) -> windows_core::Result where @@ -3053,10 +3053,10 @@ windows_core::imp::define_interface!(IWMLicenseRevocationAgent, IWMLicenseRevoca windows_core::imp::interface_hierarchy!(IWMLicenseRevocationAgent, windows_core::IUnknown); impl IWMLicenseRevocationAgent { pub unsafe fn GetLRBChallenge(&self, pmachineid: *const u8, dwmachineidlength: u32, pchallenge: *const u8, dwchallengelength: u32, pchallengeoutput: *mut u8, pdwchallengeoutputlength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLRBChallenge)(windows_core::Interface::as_raw(self), pmachineid, dwmachineidlength, pchallenge, dwchallengelength, core::mem::transmute(pchallengeoutput), core::mem::transmute(pdwchallengeoutputlength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLRBChallenge)(windows_core::Interface::as_raw(self), pmachineid, dwmachineidlength, pchallenge, dwchallengelength, pchallengeoutput as _, pdwchallengeoutputlength as _).ok() } } pub unsafe fn ProcessLRB(&self, psignedlrb: *const u8, dwsignedlrblength: u32, psignedack: *mut u8, pdwsignedacklength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ProcessLRB)(windows_core::Interface::as_raw(self), psignedlrb, dwsignedlrblength, core::mem::transmute(psignedack), core::mem::transmute(pdwsignedacklength)).ok() } + unsafe { (windows_core::Interface::vtable(self).ProcessLRB)(windows_core::Interface::as_raw(self), psignedlrb, dwsignedlrblength, psignedack as _, pdwsignedacklength as _).ok() } } } #[repr(C)] @@ -3104,7 +3104,7 @@ impl IWMMediaProps { } } pub unsafe fn GetMediaType(&self, ptype: *mut WM_MEDIA_TYPE, pcbtype: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMediaType)(windows_core::Interface::as_raw(self), core::mem::transmute(ptype), core::mem::transmute(pcbtype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMediaType)(windows_core::Interface::as_raw(self), core::mem::transmute(ptype), pcbtype as _).ok() } } pub unsafe fn SetMediaType(&self, ptype: *const WM_MEDIA_TYPE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetMediaType)(windows_core::Interface::as_raw(self), core::mem::transmute(ptype)).ok() } @@ -3325,7 +3325,7 @@ impl core::ops::Deref for IWMMutualExclusion2 { windows_core::imp::interface_hierarchy!(IWMMutualExclusion2, windows_core::IUnknown, IWMStreamList, IWMMutualExclusion); impl IWMMutualExclusion2 { pub unsafe fn GetName(&self, pwszname: windows_core::PWSTR, pcchname: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetName)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszname), core::mem::transmute(pcchname)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetName)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszname), pcchname as _).ok() } } pub unsafe fn SetName(&self, pwszname: P0) -> windows_core::Result<()> where @@ -3346,7 +3346,7 @@ impl IWMMutualExclusion2 { unsafe { (windows_core::Interface::vtable(self).RemoveRecord)(windows_core::Interface::as_raw(self), wrecordnumber).ok() } } pub unsafe fn GetRecordName(&self, wrecordnumber: u16, pwszrecordname: windows_core::PWSTR, pcchrecordname: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRecordName)(windows_core::Interface::as_raw(self), wrecordnumber, core::mem::transmute(pwszrecordname), core::mem::transmute(pcchrecordname)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecordName)(windows_core::Interface::as_raw(self), wrecordnumber, core::mem::transmute(pwszrecordname), pcchrecordname as _).ok() } } pub unsafe fn SetRecordName(&self, wrecordnumber: u16, pwszrecordname: P1) -> windows_core::Result<()> where @@ -3355,7 +3355,7 @@ impl IWMMutualExclusion2 { unsafe { (windows_core::Interface::vtable(self).SetRecordName)(windows_core::Interface::as_raw(self), wrecordnumber, pwszrecordname.param().abi()).ok() } } pub unsafe fn GetStreamsForRecord(&self, wrecordnumber: u16, pwstreamnumarray: *mut u16, pcstreams: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStreamsForRecord)(windows_core::Interface::as_raw(self), wrecordnumber, core::mem::transmute(pwstreamnumarray), core::mem::transmute(pcstreams)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStreamsForRecord)(windows_core::Interface::as_raw(self), wrecordnumber, pwstreamnumarray as _, pcstreams as _).ok() } } pub unsafe fn AddStreamForRecord(&self, wrecordnumber: u16, wstreamnumber: u16) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).AddStreamForRecord)(windows_core::Interface::as_raw(self), wrecordnumber, wstreamnumber).ok() } @@ -3487,10 +3487,10 @@ impl core::ops::Deref for IWMOutputMediaProps { windows_core::imp::interface_hierarchy!(IWMOutputMediaProps, windows_core::IUnknown, IWMMediaProps); impl IWMOutputMediaProps { pub unsafe fn GetStreamGroupName(&self, pwszname: windows_core::PWSTR, pcchname: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStreamGroupName)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszname), core::mem::transmute(pcchname)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStreamGroupName)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszname), pcchname as _).ok() } } pub unsafe fn GetConnectionName(&self, pwszname: windows_core::PWSTR, pcchname: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetConnectionName)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszname), core::mem::transmute(pcchname)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConnectionName)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszname), pcchname as _).ok() } } } #[repr(C)] @@ -3721,7 +3721,7 @@ impl IWMProfile { } } pub unsafe fn GetName(&self, pwszname: windows_core::PWSTR, pcchname: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetName)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszname), core::mem::transmute(pcchname)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetName)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszname), pcchname as _).ok() } } pub unsafe fn SetName(&self, pwszname: P0) -> windows_core::Result<()> where @@ -3730,7 +3730,7 @@ impl IWMProfile { unsafe { (windows_core::Interface::vtable(self).SetName)(windows_core::Interface::as_raw(self), pwszname.param().abi()).ok() } } pub unsafe fn GetDescription(&self, pwszdescription: windows_core::PWSTR, pcchdescription: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszdescription), core::mem::transmute(pcchdescription)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszdescription), pcchdescription as _).ok() } } pub unsafe fn SetDescription(&self, pwszdescription: P0) -> windows_core::Result<()> where @@ -4358,7 +4358,7 @@ impl IWMProfileManager { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SaveProfile)(windows_core::Interface::as_raw(self), piwmprofile.param().abi(), pwszprofile.param().abi(), core::mem::transmute(pdwlength)).ok() } + unsafe { (windows_core::Interface::vtable(self).SaveProfile)(windows_core::Interface::as_raw(self), piwmprofile.param().abi(), pwszprofile.param().abi(), pdwlength as _).ok() } } pub unsafe fn GetSystemProfileCount(&self) -> windows_core::Result { unsafe { @@ -4484,7 +4484,7 @@ impl core::ops::Deref for IWMProfileManager2 { windows_core::imp::interface_hierarchy!(IWMProfileManager2, windows_core::IUnknown, IWMProfileManager); impl IWMProfileManager2 { pub unsafe fn GetSystemProfileVersion(&self, pdwversion: *mut WMT_VERSION) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSystemProfileVersion)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwversion)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSystemProfileVersion)(windows_core::Interface::as_raw(self), pdwversion as _).ok() } } pub unsafe fn SetSystemProfileVersion(&self, dwversion: WMT_VERSION) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSystemProfileVersion)(windows_core::Interface::as_raw(self), dwversion).ok() } @@ -4529,7 +4529,7 @@ windows_core::imp::define_interface!(IWMProfileManagerLanguage, IWMProfileManage windows_core::imp::interface_hierarchy!(IWMProfileManagerLanguage, windows_core::IUnknown); impl IWMProfileManagerLanguage { pub unsafe fn GetUserLanguageID(&self, wlangid: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetUserLanguageID)(windows_core::Interface::as_raw(self), core::mem::transmute(wlangid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUserLanguageID)(windows_core::Interface::as_raw(self), wlangid as _).ok() } } pub unsafe fn SetUserLanguageID(&self, wlangid: u16) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetUserLanguageID)(windows_core::Interface::as_raw(self), wlangid).ok() } @@ -4580,7 +4580,7 @@ impl IWMPropertyVault { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetPropertyByName)(windows_core::Interface::as_raw(self), pszname.param().abi(), core::mem::transmute(ptype), core::mem::transmute(pvalue), core::mem::transmute(pdwsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropertyByName)(windows_core::Interface::as_raw(self), pszname.param().abi(), ptype as _, pvalue as _, pdwsize as _).ok() } } pub unsafe fn SetProperty(&self, pszname: P0, ptype: WMT_ATTR_DATATYPE, pvalue: *const u8, dwsize: u32) -> windows_core::Result<()> where @@ -4589,7 +4589,7 @@ impl IWMPropertyVault { unsafe { (windows_core::Interface::vtable(self).SetProperty)(windows_core::Interface::as_raw(self), pszname.param().abi(), ptype, pvalue, dwsize).ok() } } pub unsafe fn GetPropertyByIndex(&self, dwindex: u32, pszname: windows_core::PWSTR, pdwnamelen: *mut u32, ptype: *mut WMT_ATTR_DATATYPE, pvalue: *mut u8, pdwsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPropertyByIndex)(windows_core::Interface::as_raw(self), dwindex, core::mem::transmute(pszname), core::mem::transmute(pdwnamelen), core::mem::transmute(ptype), core::mem::transmute(pvalue), core::mem::transmute(pdwsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropertyByIndex)(windows_core::Interface::as_raw(self), dwindex, core::mem::transmute(pszname), pdwnamelen as _, ptype as _, pvalue as _, pdwsize as _).ok() } } pub unsafe fn CopyPropertiesFrom(&self, piwmpropertyvault: P0) -> windows_core::Result<()> where @@ -4905,7 +4905,7 @@ windows_core::imp::define_interface!(IWMReaderAccelerator, IWMReaderAccelerator_ windows_core::imp::interface_hierarchy!(IWMReaderAccelerator, windows_core::IUnknown); impl IWMReaderAccelerator { pub unsafe fn GetCodecInterface(&self, dwoutputnum: u32, riid: *const windows_core::GUID, ppvcodecinterface: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCodecInterface)(windows_core::Interface::as_raw(self), dwoutputnum, riid, core::mem::transmute(ppvcodecinterface)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCodecInterface)(windows_core::Interface::as_raw(self), dwoutputnum, riid, ppvcodecinterface as _).ok() } } pub unsafe fn Notify(&self, dwoutputnum: u32, psubtype: *const WM_MEDIA_TYPE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Notify)(windows_core::Interface::as_raw(self), dwoutputnum, core::mem::transmute(psubtype)).ok() } @@ -5016,7 +5016,7 @@ impl IWMReaderAdvanced { } } pub unsafe fn GetStatistics(&self, pstatistics: *mut WM_READER_STATISTICS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStatistics)(windows_core::Interface::as_raw(self), core::mem::transmute(pstatistics)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStatistics)(windows_core::Interface::as_raw(self), pstatistics as _).ok() } } pub unsafe fn SetClientInfo(&self, pclientinfo: *const WM_READER_CLIENTINFO) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetClientInfo)(windows_core::Interface::as_raw(self), pclientinfo).ok() } @@ -5307,10 +5307,10 @@ impl IWMReaderAdvanced2 { } } pub unsafe fn GetBufferProgress(&self, pdwpercent: *mut u32, pcnsbuffering: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBufferProgress)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwpercent), core::mem::transmute(pcnsbuffering)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBufferProgress)(windows_core::Interface::as_raw(self), pdwpercent as _, pcnsbuffering as _).ok() } } pub unsafe fn GetDownloadProgress(&self, pdwpercent: *mut u32, pqwbytesdownloaded: *mut u64, pcnsdownload: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDownloadProgress)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwpercent), core::mem::transmute(pqwbytesdownloaded), core::mem::transmute(pcnsdownload)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDownloadProgress)(windows_core::Interface::as_raw(self), pdwpercent as _, pqwbytesdownloaded as _, pcnsdownload as _).ok() } } pub unsafe fn GetSaveAsProgress(&self) -> windows_core::Result { unsafe { @@ -5325,7 +5325,7 @@ impl IWMReaderAdvanced2 { unsafe { (windows_core::Interface::vtable(self).SaveFileAs)(windows_core::Interface::as_raw(self), pwszfilename.param().abi()).ok() } } pub unsafe fn GetProtocolName(&self, pwszprotocol: windows_core::PWSTR, pcchprotocol: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProtocolName)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszprotocol), core::mem::transmute(pcchprotocol)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProtocolName)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszprotocol), pcchprotocol as _).ok() } } pub unsafe fn StartAtMarker(&self, wmarkerindex: u16, cnsduration: u64, frate: f32, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).StartAtMarker)(windows_core::Interface::as_raw(self), wmarkerindex, cnsduration, frate, pvcontext).ok() } @@ -5334,7 +5334,7 @@ impl IWMReaderAdvanced2 { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetOutputSetting)(windows_core::Interface::as_raw(self), dwoutputnum, pszname.param().abi(), core::mem::transmute(ptype), core::mem::transmute(pvalue), core::mem::transmute(pcblength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOutputSetting)(windows_core::Interface::as_raw(self), dwoutputnum, pszname.param().abi(), ptype as _, pvalue as _, pcblength as _).ok() } } pub unsafe fn SetOutputSetting(&self, dwoutputnum: u32, pszname: P1, r#type: WMT_ATTR_DATATYPE, pvalue: &[u8]) -> windows_core::Result<()> where @@ -5612,7 +5612,7 @@ impl IWMReaderAdvanced4 { } } pub unsafe fn GetLanguage(&self, dwoutputnum: u32, wlanguage: u16, pwszlanguagestring: windows_core::PWSTR, pcchlanguagestringlength: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLanguage)(windows_core::Interface::as_raw(self), dwoutputnum, wlanguage, core::mem::transmute(pwszlanguagestring), core::mem::transmute(pcchlanguagestringlength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLanguage)(windows_core::Interface::as_raw(self), dwoutputnum, wlanguage, core::mem::transmute(pwszlanguagestring), pcchlanguagestringlength as _).ok() } } pub unsafe fn GetMaxSpeedFactor(&self) -> windows_core::Result { unsafe { @@ -5647,7 +5647,7 @@ impl IWMReaderAdvanced4 { unsafe { (windows_core::Interface::vtable(self).CancelSaveFileAs)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetURL(&self, pwszurl: windows_core::PWSTR, pcchurl: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetURL)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszurl), core::mem::transmute(pcchurl)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetURL)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszurl), pcchurl as _).ok() } } } #[repr(C)] @@ -5827,7 +5827,7 @@ impl core::ops::Deref for IWMReaderAdvanced6 { windows_core::imp::interface_hierarchy!(IWMReaderAdvanced6, windows_core::IUnknown, IWMReaderAdvanced, IWMReaderAdvanced2, IWMReaderAdvanced3, IWMReaderAdvanced4, IWMReaderAdvanced5); impl IWMReaderAdvanced6 { pub unsafe fn SetProtectStreamSamples(&self, pbcertificate: &[u8], dwcertificatetype: u32, dwflags: u32, pbinitializationvector: *mut u8, pcbinitializationvector: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetProtectStreamSamples)(windows_core::Interface::as_raw(self), core::mem::transmute(pbcertificate.as_ptr()), pbcertificate.len().try_into().unwrap(), dwcertificatetype, dwflags, core::mem::transmute(pbinitializationvector), core::mem::transmute(pcbinitializationvector)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetProtectStreamSamples)(windows_core::Interface::as_raw(self), core::mem::transmute(pbcertificate.as_ptr()), pbcertificate.len().try_into().unwrap(), dwcertificatetype, dwflags, pbinitializationvector as _, pcbinitializationvector as _).ok() } } } #[repr(C)] @@ -6049,7 +6049,7 @@ impl IWMReaderNetworkConfig { unsafe { (windows_core::Interface::vtable(self).SetBufferingTime)(windows_core::Interface::as_raw(self), cnsbufferingtime).ok() } } pub unsafe fn GetUDPPortRanges(&self, prangearray: *mut WM_PORT_NUMBER_RANGE, pcranges: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetUDPPortRanges)(windows_core::Interface::as_raw(self), core::mem::transmute(prangearray), core::mem::transmute(pcranges)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUDPPortRanges)(windows_core::Interface::as_raw(self), prangearray as _, pcranges as _).ok() } } pub unsafe fn SetUDPPortRanges(&self, prangearray: &[WM_PORT_NUMBER_RANGE]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetUDPPortRanges)(windows_core::Interface::as_raw(self), core::mem::transmute(prangearray.as_ptr()), prangearray.len().try_into().unwrap()).ok() } @@ -6073,7 +6073,7 @@ impl IWMReaderNetworkConfig { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetProxyHostName)(windows_core::Interface::as_raw(self), pwszprotocol.param().abi(), core::mem::transmute(pwszhostname), core::mem::transmute(pcchhostname)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProxyHostName)(windows_core::Interface::as_raw(self), pwszprotocol.param().abi(), core::mem::transmute(pwszhostname), pcchhostname as _).ok() } } pub unsafe fn SetProxyHostName(&self, pwszprotocol: P0, pwszhostname: P1) -> windows_core::Result<()> where @@ -6101,7 +6101,7 @@ impl IWMReaderNetworkConfig { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetProxyExceptionList)(windows_core::Interface::as_raw(self), pwszprotocol.param().abi(), core::mem::transmute(pwszexceptionlist), core::mem::transmute(pcchexceptionlist)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProxyExceptionList)(windows_core::Interface::as_raw(self), pwszprotocol.param().abi(), core::mem::transmute(pwszexceptionlist), pcchexceptionlist as _).ok() } } pub unsafe fn SetProxyExceptionList(&self, pwszprotocol: P0, pwszexceptionlist: P1) -> windows_core::Result<()> where @@ -6189,7 +6189,7 @@ impl IWMReaderNetworkConfig { } } pub unsafe fn GetSupportedProtocolName(&self, dwprotocolnum: u32, pwszprotocolname: windows_core::PWSTR, pcchprotocolname: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSupportedProtocolName)(windows_core::Interface::as_raw(self), dwprotocolnum, core::mem::transmute(pwszprotocolname), core::mem::transmute(pcchprotocolname)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSupportedProtocolName)(windows_core::Interface::as_raw(self), dwprotocolnum, core::mem::transmute(pwszprotocolname), pcchprotocolname as _).ok() } } pub unsafe fn AddLoggingUrl(&self, pwszurl: P0) -> windows_core::Result<()> where @@ -6198,7 +6198,7 @@ impl IWMReaderNetworkConfig { unsafe { (windows_core::Interface::vtable(self).AddLoggingUrl)(windows_core::Interface::as_raw(self), pwszurl.param().abi()).ok() } } pub unsafe fn GetLoggingUrl(&self, dwindex: u32, pwszurl: windows_core::PWSTR, pcchurl: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLoggingUrl)(windows_core::Interface::as_raw(self), dwindex, core::mem::transmute(pwszurl), core::mem::transmute(pcchurl)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLoggingUrl)(windows_core::Interface::as_raw(self), dwindex, core::mem::transmute(pwszurl), pcchurl as _).ok() } } pub unsafe fn GetLoggingUrlCount(&self) -> windows_core::Result { unsafe { @@ -6999,7 +6999,7 @@ impl IWMReaderTimecode { } } pub unsafe fn GetTimecodeRangeBounds(&self, wstreamnum: u16, wrangenum: u16, pstarttimecode: *mut u32, pendtimecode: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTimecodeRangeBounds)(windows_core::Interface::as_raw(self), wstreamnum, wrangenum, core::mem::transmute(pstarttimecode), core::mem::transmute(pendtimecode)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTimecodeRangeBounds)(windows_core::Interface::as_raw(self), wstreamnum, wrangenum, pstarttimecode as _, pendtimecode as _).ok() } } } #[repr(C)] @@ -7477,7 +7477,7 @@ impl IWMSInternalAdminNetSource { unsafe { (windows_core::Interface::vtable(self).SetCredentials)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrrealm), core::mem::transmute_copy(bstrname), core::mem::transmute_copy(bstrpassword), fpersist.into(), fconfirmedgood.into()).ok() } } pub unsafe fn GetCredentials(&self, bstrrealm: &windows_core::BSTR, pbstrname: *mut windows_core::BSTR, pbstrpassword: *mut windows_core::BSTR, pfconfirmedgood: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCredentials)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrrealm), core::mem::transmute(pbstrname), core::mem::transmute(pbstrpassword), core::mem::transmute(pfconfirmedgood)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCredentials)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrrealm), core::mem::transmute(pbstrname), core::mem::transmute(pbstrpassword), pfconfirmedgood as _).ok() } } pub unsafe fn DeleteCredentials(&self, bstrrealm: &windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DeleteCredentials)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrrealm)).ok() } @@ -7492,7 +7492,7 @@ impl IWMSInternalAdminNetSource { unsafe { (windows_core::Interface::vtable(self).SetCredentialFlags)(windows_core::Interface::as_raw(self), dwflags).ok() } } pub unsafe fn FindProxyForURL(&self, bstrprotocol: &windows_core::BSTR, bstrhost: &windows_core::BSTR, pfproxyenabled: *mut super::super::Foundation::BOOL, pbstrproxyserver: *mut windows_core::BSTR, pdwproxyport: *mut u32, pdwproxycontext: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).FindProxyForURL)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrprotocol), core::mem::transmute_copy(bstrhost), core::mem::transmute(pfproxyenabled), core::mem::transmute(pbstrproxyserver), core::mem::transmute(pdwproxyport), core::mem::transmute(pdwproxycontext)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindProxyForURL)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrprotocol), core::mem::transmute_copy(bstrhost), pfproxyenabled as _, core::mem::transmute(pbstrproxyserver), pdwproxyport as _, pdwproxycontext as _).ok() } } pub unsafe fn RegisterProxyFailure(&self, hrparam: windows_core::HRESULT, dwproxycontext: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RegisterProxyFailure)(windows_core::Interface::as_raw(self), hrparam, dwproxycontext).ok() } @@ -7648,13 +7648,13 @@ impl IWMSInternalAdminNetSource2 { unsafe { (windows_core::Interface::vtable(self).SetCredentialsEx)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrrealm), core::mem::transmute_copy(bstrurl), fproxy.into(), core::mem::transmute_copy(bstrname), core::mem::transmute_copy(bstrpassword), fpersist.into(), fconfirmedgood.into()).ok() } } pub unsafe fn GetCredentialsEx(&self, bstrrealm: &windows_core::BSTR, bstrurl: &windows_core::BSTR, fproxy: bool, pdwurlpolicy: *mut NETSOURCE_URLCREDPOLICY_SETTINGS, pbstrname: *mut windows_core::BSTR, pbstrpassword: *mut windows_core::BSTR, pfconfirmedgood: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCredentialsEx)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrrealm), core::mem::transmute_copy(bstrurl), fproxy.into(), core::mem::transmute(pdwurlpolicy), core::mem::transmute(pbstrname), core::mem::transmute(pbstrpassword), core::mem::transmute(pfconfirmedgood)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCredentialsEx)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrrealm), core::mem::transmute_copy(bstrurl), fproxy.into(), pdwurlpolicy as _, core::mem::transmute(pbstrname), core::mem::transmute(pbstrpassword), pfconfirmedgood as _).ok() } } pub unsafe fn DeleteCredentialsEx(&self, bstrrealm: &windows_core::BSTR, bstrurl: &windows_core::BSTR, fproxy: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DeleteCredentialsEx)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrrealm), core::mem::transmute_copy(bstrurl), fproxy.into()).ok() } } pub unsafe fn FindProxyForURLEx(&self, bstrprotocol: &windows_core::BSTR, bstrhost: &windows_core::BSTR, bstrurl: &windows_core::BSTR, pfproxyenabled: *mut super::super::Foundation::BOOL, pbstrproxyserver: *mut windows_core::BSTR, pdwproxyport: *mut u32, pdwproxycontext: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).FindProxyForURLEx)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrprotocol), core::mem::transmute_copy(bstrhost), core::mem::transmute_copy(bstrurl), core::mem::transmute(pfproxyenabled), core::mem::transmute(pbstrproxyserver), core::mem::transmute(pdwproxyport), core::mem::transmute(pdwproxycontext)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindProxyForURLEx)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrprotocol), core::mem::transmute_copy(bstrhost), core::mem::transmute_copy(bstrurl), pfproxyenabled as _, core::mem::transmute(pbstrproxyserver), pdwproxyport as _, pdwproxycontext as _).ok() } } } #[repr(C)] @@ -7726,7 +7726,7 @@ impl IWMSInternalAdminNetSource3 { } } pub unsafe fn FindProxyForURLEx2(&self, bstrprotocol: &windows_core::BSTR, bstrhost: &windows_core::BSTR, bstrurl: &windows_core::BSTR, pfproxyenabled: *mut super::super::Foundation::BOOL, pbstrproxyserver: *mut windows_core::BSTR, pdwproxyport: *mut u32, pqwproxycontext: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).FindProxyForURLEx2)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrprotocol), core::mem::transmute_copy(bstrhost), core::mem::transmute_copy(bstrurl), core::mem::transmute(pfproxyenabled), core::mem::transmute(pbstrproxyserver), core::mem::transmute(pdwproxyport), core::mem::transmute(pqwproxycontext)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindProxyForURLEx2)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrprotocol), core::mem::transmute_copy(bstrhost), core::mem::transmute_copy(bstrurl), pfproxyenabled as _, core::mem::transmute(pbstrproxyserver), pdwproxyport as _, pqwproxycontext as _).ok() } } pub unsafe fn RegisterProxyFailure2(&self, hrparam: windows_core::HRESULT, qwproxycontext: u64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RegisterProxyFailure2)(windows_core::Interface::as_raw(self), hrparam, qwproxycontext).ok() } @@ -7744,7 +7744,7 @@ impl IWMSInternalAdminNetSource3 { unsafe { (windows_core::Interface::vtable(self).SetCredentialsEx2)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrrealm), core::mem::transmute_copy(bstrurl), fproxy.into(), core::mem::transmute_copy(bstrname), core::mem::transmute_copy(bstrpassword), fpersist.into(), fconfirmedgood.into(), fcleartextauthentication.into()).ok() } } pub unsafe fn GetCredentialsEx2(&self, bstrrealm: &windows_core::BSTR, bstrurl: &windows_core::BSTR, fproxy: bool, fcleartextauthentication: bool, pdwurlpolicy: *mut NETSOURCE_URLCREDPOLICY_SETTINGS, pbstrname: *mut windows_core::BSTR, pbstrpassword: *mut windows_core::BSTR, pfconfirmedgood: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCredentialsEx2)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrrealm), core::mem::transmute_copy(bstrurl), fproxy.into(), fcleartextauthentication.into(), core::mem::transmute(pdwurlpolicy), core::mem::transmute(pbstrname), core::mem::transmute(pbstrpassword), core::mem::transmute(pfconfirmedgood)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCredentialsEx2)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrrealm), core::mem::transmute_copy(bstrurl), fproxy.into(), fcleartextauthentication.into(), pdwurlpolicy as _, core::mem::transmute(pbstrname), core::mem::transmute(pbstrpassword), pfconfirmedgood as _).ok() } } } #[repr(C)] @@ -7873,7 +7873,7 @@ impl IWMSecureChannel { unsafe { (windows_core::Interface::vtable(self).WMSC_Disconnect)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn WMSC_GetValidCertificate(&self, ppbcertificate: *mut *mut u8, pdwsignature: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).WMSC_GetValidCertificate)(windows_core::Interface::as_raw(self), core::mem::transmute(ppbcertificate), core::mem::transmute(pdwsignature)).ok() } + unsafe { (windows_core::Interface::vtable(self).WMSC_GetValidCertificate)(windows_core::Interface::as_raw(self), ppbcertificate as _, pdwsignature as _).ok() } } pub unsafe fn WMSC_Encrypt(&self, pbdata: *const u8, cbdata: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).WMSC_Encrypt)(windows_core::Interface::as_raw(self), pbdata, cbdata).ok() } @@ -8062,7 +8062,7 @@ impl IWMStreamConfig { unsafe { (windows_core::Interface::vtable(self).SetStreamNumber)(windows_core::Interface::as_raw(self), wstreamnum).ok() } } pub unsafe fn GetStreamName(&self, pwszstreamname: windows_core::PWSTR, pcchstreamname: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStreamName)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszstreamname), core::mem::transmute(pcchstreamname)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStreamName)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszstreamname), pcchstreamname as _).ok() } } pub unsafe fn SetStreamName(&self, pwszstreamname: P0) -> windows_core::Result<()> where @@ -8071,7 +8071,7 @@ impl IWMStreamConfig { unsafe { (windows_core::Interface::vtable(self).SetStreamName)(windows_core::Interface::as_raw(self), pwszstreamname.param().abi()).ok() } } pub unsafe fn GetConnectionName(&self, pwszinputname: windows_core::PWSTR, pcchinputname: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetConnectionName)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszinputname), core::mem::transmute(pcchinputname)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConnectionName)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszinputname), pcchinputname as _).ok() } } pub unsafe fn SetConnectionName(&self, pwszinputname: P0) -> windows_core::Result<()> where @@ -8266,7 +8266,7 @@ impl IWMStreamConfig2 { } } pub unsafe fn GetDataUnitExtension(&self, wdataunitextensionnumber: u16, pguidextensionsystemid: *mut windows_core::GUID, pcbextensiondatasize: *mut u16, pbextensionsysteminfo: *mut u8, pcbextensionsysteminfo: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDataUnitExtension)(windows_core::Interface::as_raw(self), wdataunitextensionnumber, core::mem::transmute(pguidextensionsystemid), core::mem::transmute(pcbextensiondatasize), core::mem::transmute(pbextensionsysteminfo), core::mem::transmute(pcbextensionsysteminfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDataUnitExtension)(windows_core::Interface::as_raw(self), wdataunitextensionnumber, pguidextensionsystemid as _, pcbextensiondatasize as _, pbextensionsysteminfo as _, pcbextensionsysteminfo as _).ok() } } pub unsafe fn RemoveAllDataUnitExtensions(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RemoveAllDataUnitExtensions)(windows_core::Interface::as_raw(self)).ok() } @@ -8365,7 +8365,7 @@ impl core::ops::Deref for IWMStreamConfig3 { windows_core::imp::interface_hierarchy!(IWMStreamConfig3, windows_core::IUnknown, IWMStreamConfig, IWMStreamConfig2); impl IWMStreamConfig3 { pub unsafe fn GetLanguage(&self, pwszlanguagestring: windows_core::PWSTR, pcchlanguagestringlength: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLanguage)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszlanguagestring), core::mem::transmute(pcchlanguagestringlength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLanguage)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszlanguagestring), pcchlanguagestringlength as _).ok() } } pub unsafe fn SetLanguage(&self, pwszlanguagestring: P0) -> windows_core::Result<()> where @@ -8413,7 +8413,7 @@ windows_core::imp::define_interface!(IWMStreamList, IWMStreamList_Vtbl, 0x96406b windows_core::imp::interface_hierarchy!(IWMStreamList, windows_core::IUnknown); impl IWMStreamList { pub unsafe fn GetStreams(&self, pwstreamnumarray: *mut u16, pcstreams: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStreams)(windows_core::Interface::as_raw(self), core::mem::transmute(pwstreamnumarray), core::mem::transmute(pcstreams)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStreams)(windows_core::Interface::as_raw(self), pwstreamnumarray as _, pcstreams as _).ok() } } pub unsafe fn AddStream(&self, wstreamnum: u16) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).AddStream)(windows_core::Interface::as_raw(self), wstreamnum).ok() } @@ -8470,7 +8470,7 @@ windows_core::imp::define_interface!(IWMStreamPrioritization, IWMStreamPrioritiz windows_core::imp::interface_hierarchy!(IWMStreamPrioritization, windows_core::IUnknown); impl IWMStreamPrioritization { pub unsafe fn GetPriorityRecords(&self, precordarray: *mut WM_STREAM_PRIORITY_RECORD, pcrecords: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPriorityRecords)(windows_core::Interface::as_raw(self), core::mem::transmute(precordarray), core::mem::transmute(pcrecords)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPriorityRecords)(windows_core::Interface::as_raw(self), precordarray as _, pcrecords as _).ok() } } pub unsafe fn SetPriorityRecords(&self, precordarray: *const WM_STREAM_PRIORITY_RECORD, crecords: u16) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetPriorityRecords)(windows_core::Interface::as_raw(self), precordarray, crecords).ok() } @@ -8530,7 +8530,7 @@ impl IWMSyncReader { unsafe { (windows_core::Interface::vtable(self).SetRangeByFrame)(windows_core::Interface::as_raw(self), wstreamnum, qwframenumber, cframestoread).ok() } } pub unsafe fn GetNextSample(&self, wstreamnum: u16, ppsample: *mut Option, pcnssampletime: *mut u64, pcnsduration: *mut u64, pdwflags: *mut u32, pdwoutputnum: *mut u32, pwstreamnum: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNextSample)(windows_core::Interface::as_raw(self), wstreamnum, core::mem::transmute(ppsample), core::mem::transmute(pcnssampletime), core::mem::transmute(pcnsduration), core::mem::transmute(pdwflags), core::mem::transmute(pdwoutputnum), core::mem::transmute(pwstreamnum)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNextSample)(windows_core::Interface::as_raw(self), wstreamnum, core::mem::transmute(ppsample), pcnssampletime as _, pcnsduration as _, pdwflags as _, pdwoutputnum as _, pwstreamnum as _).ok() } } pub unsafe fn SetStreamsSelected(&self, cstreamcount: u16, pwstreamnumbers: *const u16, pselections: *const WMT_STREAM_SELECTION) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetStreamsSelected)(windows_core::Interface::as_raw(self), cstreamcount, pwstreamnumbers, pselections).ok() } @@ -8554,7 +8554,7 @@ impl IWMSyncReader { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetOutputSetting)(windows_core::Interface::as_raw(self), dwoutputnum, pszname.param().abi(), core::mem::transmute(ptype), core::mem::transmute(pvalue), core::mem::transmute(pcblength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOutputSetting)(windows_core::Interface::as_raw(self), dwoutputnum, pszname.param().abi(), ptype as _, pvalue as _, pcblength as _).ok() } } pub unsafe fn SetOutputSetting(&self, dwoutputnum: u32, pszname: P1, r#type: WMT_ATTR_DATATYPE, pvalue: &[u8]) -> windows_core::Result<()> where @@ -9134,7 +9134,7 @@ impl IWMWatermarkInfo { } } pub unsafe fn GetWatermarkEntry(&self, wmettype: WMT_WATERMARK_ENTRY_TYPE, dwentrynum: u32, pentry: *mut WMT_WATERMARK_ENTRY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWatermarkEntry)(windows_core::Interface::as_raw(self), wmettype, dwentrynum, core::mem::transmute(pentry)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWatermarkEntry)(windows_core::Interface::as_raw(self), wmettype, dwentrynum, pentry as _).ok() } } } #[repr(C)] @@ -9461,7 +9461,7 @@ impl IWMWriterAdvanced { } } pub unsafe fn GetStatistics(&self, wstreamnum: u16, pstats: *mut WM_WRITER_STATISTICS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStatistics)(windows_core::Interface::as_raw(self), wstreamnum, core::mem::transmute(pstats)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStatistics)(windows_core::Interface::as_raw(self), wstreamnum, pstats as _).ok() } } pub unsafe fn SetSyncTolerance(&self, mswindow: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSyncTolerance)(windows_core::Interface::as_raw(self), mswindow).ok() } @@ -9632,7 +9632,7 @@ impl IWMWriterAdvanced2 { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetInputSetting)(windows_core::Interface::as_raw(self), dwinputnum, pszname.param().abi(), core::mem::transmute(ptype), core::mem::transmute(pvalue), core::mem::transmute(pcblength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInputSetting)(windows_core::Interface::as_raw(self), dwinputnum, pszname.param().abi(), ptype as _, pvalue as _, pcblength as _).ok() } } pub unsafe fn SetInputSetting(&self, dwinputnum: u32, pszname: P1, r#type: WMT_ATTR_DATATYPE, pvalue: &[u8]) -> windows_core::Result<()> where @@ -9686,7 +9686,7 @@ impl core::ops::Deref for IWMWriterAdvanced3 { windows_core::imp::interface_hierarchy!(IWMWriterAdvanced3, windows_core::IUnknown, IWMWriterAdvanced, IWMWriterAdvanced2); impl IWMWriterAdvanced3 { pub unsafe fn GetStatisticsEx(&self, wstreamnum: u16, pstats: *mut WM_WRITER_STATISTICS_EX) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStatisticsEx)(windows_core::Interface::as_raw(self), wstreamnum, core::mem::transmute(pstats)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStatisticsEx)(windows_core::Interface::as_raw(self), wstreamnum, pstats as _).ok() } } pub unsafe fn SetNonBlocking(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetNonBlocking)(windows_core::Interface::as_raw(self)).ok() } @@ -10091,10 +10091,10 @@ impl IWMWriterNetworkSink { } } pub unsafe fn GetHostURL(&self, pwszurl: windows_core::PWSTR, pcchurl: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetHostURL)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszurl), core::mem::transmute(pcchurl)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetHostURL)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszurl), pcchurl as _).ok() } } pub unsafe fn Open(&self, pdwportnum: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Open)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwportnum)).ok() } + unsafe { (windows_core::Interface::vtable(self).Open)(windows_core::Interface::as_raw(self), pdwportnum as _).ok() } } pub unsafe fn Disconnect(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Disconnect)(windows_core::Interface::as_raw(self)).ok() } @@ -10211,7 +10211,7 @@ impl IWMWriterPostView { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SetPostViewCallback)(windows_core::Interface::as_raw(self), pcallback.param().abi(), core::mem::transmute(pvcontext)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetPostViewCallback)(windows_core::Interface::as_raw(self), pcallback.param().abi(), pvcontext as _).ok() } } pub unsafe fn SetReceivePostViewSamples(&self, wstreamnum: u16, freceivepostviewsamples: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetReceivePostViewSamples)(windows_core::Interface::as_raw(self), wstreamnum, freceivepostviewsamples.into()).ok() } diff --git a/crates/libs/windows/src/Windows/Win32/Media/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/mod.rs index 540dbd877a..78c4584785 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/mod.rs @@ -37,12 +37,12 @@ pub unsafe fn timeEndPeriod(uperiod: u32) -> u32 { #[inline] pub unsafe fn timeGetDevCaps(ptc: *mut TIMECAPS, cbtc: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn timeGetDevCaps(ptc : *mut TIMECAPS, cbtc : u32) -> u32); - unsafe { timeGetDevCaps(core::mem::transmute(ptc), cbtc) } + unsafe { timeGetDevCaps(ptc as _, cbtc) } } #[inline] pub unsafe fn timeGetSystemTime(pmmt: *mut MMTIME, cbmmt: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn timeGetSystemTime(pmmt : *mut MMTIME, cbmmt : u32) -> u32); - unsafe { timeGetSystemTime(core::mem::transmute(pmmt), cbmmt) } + unsafe { timeGetSystemTime(pmmt as _, cbmmt) } } #[inline] pub unsafe fn timeGetTime() -> u32 { 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 94d120ddd9..e30bf31808 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Dhcp/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Dhcp/mod.rs @@ -17,7 +17,7 @@ where #[inline] pub unsafe fn DhcpAddServer(flags: u32, idinfo: *mut core::ffi::c_void, newserver: *mut DHCPDS_SERVER, callbackfn: *mut core::ffi::c_void, callbackdata: *mut core::ffi::c_void) -> u32 { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpAddServer(flags : u32, idinfo : *mut core::ffi::c_void, newserver : *mut DHCPDS_SERVER, callbackfn : *mut core::ffi::c_void, callbackdata : *mut core::ffi::c_void) -> u32); - unsafe { DhcpAddServer(flags, core::mem::transmute(idinfo), core::mem::transmute(newserver), core::mem::transmute(callbackfn), core::mem::transmute(callbackdata)) } + unsafe { DhcpAddServer(flags, idinfo as _, newserver as _, callbackfn as _, callbackdata as _) } } #[inline] pub unsafe fn DhcpAddSubnetElement(serveripaddress: P0, subnetaddress: u32, addelementinfo: *const DHCP_SUBNET_ELEMENT_DATA) -> u32 @@ -49,7 +49,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpAddSubnetElementV6(serveripaddress : windows_core::PCWSTR, subnetaddress : DHCP_IPV6_ADDRESS, addelementinfo : *mut DHCP_SUBNET_ELEMENT_DATA_V6) -> u32); - unsafe { DhcpAddSubnetElementV6(serveripaddress.param().abi(), core::mem::transmute(subnetaddress), core::mem::transmute(addelementinfo)) } + unsafe { DhcpAddSubnetElementV6(serveripaddress.param().abi(), core::mem::transmute(subnetaddress), addelementinfo as _) } } #[inline] pub unsafe fn DhcpAuditLogGetParams(serveripaddress: P0, flags: u32, auditlogdir: *mut windows_core::PWSTR, diskcheckinterval: *mut u32, maxlogfilessize: *mut u32, minspaceondisk: *mut u32) -> u32 @@ -57,7 +57,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpAuditLogGetParams(serveripaddress : windows_core::PCWSTR, flags : u32, auditlogdir : *mut windows_core::PWSTR, diskcheckinterval : *mut u32, maxlogfilessize : *mut u32, minspaceondisk : *mut u32) -> u32); - unsafe { DhcpAuditLogGetParams(serveripaddress.param().abi(), flags, core::mem::transmute(auditlogdir), core::mem::transmute(diskcheckinterval), core::mem::transmute(maxlogfilessize), core::mem::transmute(minspaceondisk)) } + unsafe { DhcpAuditLogGetParams(serveripaddress.param().abi(), flags, auditlogdir as _, diskcheckinterval as _, maxlogfilessize as _, minspaceondisk as _) } } #[inline] pub unsafe fn DhcpAuditLogSetParams(serveripaddress: P0, flags: u32, auditlogdir: P2, diskcheckinterval: u32, maxlogfilessize: u32, minspaceondisk: u32) -> u32 @@ -76,7 +76,7 @@ pub unsafe fn DhcpCApiCleanup() { #[inline] pub unsafe fn DhcpCApiInitialize(version: *mut u32) -> u32 { windows_targets::link!("dhcpcsvc.dll" "system" fn DhcpCApiInitialize(version : *mut u32) -> u32); - unsafe { DhcpCApiInitialize(core::mem::transmute(version)) } + unsafe { DhcpCApiInitialize(version as _) } } #[inline] pub unsafe fn DhcpCreateClass(serveripaddress: P0, reservedmustbezero: u32, classinfo: *mut DHCP_CLASS_INFO) -> u32 @@ -84,7 +84,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpCreateClass(serveripaddress : windows_core::PCWSTR, reservedmustbezero : u32, classinfo : *mut DHCP_CLASS_INFO) -> u32); - unsafe { DhcpCreateClass(serveripaddress.param().abi(), reservedmustbezero, core::mem::transmute(classinfo)) } + unsafe { DhcpCreateClass(serveripaddress.param().abi(), reservedmustbezero, classinfo as _) } } #[inline] pub unsafe fn DhcpCreateClassV6(serveripaddress: P0, reservedmustbezero: u32, classinfo: *mut DHCP_CLASS_INFO_V6) -> u32 @@ -92,7 +92,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpCreateClassV6(serveripaddress : windows_core::PCWSTR, reservedmustbezero : u32, classinfo : *mut DHCP_CLASS_INFO_V6) -> u32); - unsafe { DhcpCreateClassV6(serveripaddress.param().abi(), reservedmustbezero, core::mem::transmute(classinfo)) } + unsafe { DhcpCreateClassV6(serveripaddress.param().abi(), reservedmustbezero, classinfo as _) } } #[inline] pub unsafe fn DhcpCreateClientInfo(serveripaddress: P0, clientinfo: *const DHCP_CLIENT_INFO) -> u32 @@ -134,7 +134,7 @@ where P4: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpCreateOptionV5(serveripaddress : windows_core::PCWSTR, flags : u32, optionid : u32, classname : windows_core::PCWSTR, vendorname : windows_core::PCWSTR, optioninfo : *mut DHCP_OPTION) -> u32); - unsafe { DhcpCreateOptionV5(serveripaddress.param().abi(), flags, optionid, classname.param().abi(), vendorname.param().abi(), core::mem::transmute(optioninfo)) } + unsafe { DhcpCreateOptionV5(serveripaddress.param().abi(), flags, optionid, classname.param().abi(), vendorname.param().abi(), optioninfo as _) } } #[inline] pub unsafe fn DhcpCreateOptionV6(serveripaddress: P0, flags: u32, optionid: u32, classname: P3, vendorname: P4, optioninfo: *mut DHCP_OPTION) -> u32 @@ -144,7 +144,7 @@ where P4: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpCreateOptionV6(serveripaddress : windows_core::PCWSTR, flags : u32, optionid : u32, classname : windows_core::PCWSTR, vendorname : windows_core::PCWSTR, optioninfo : *mut DHCP_OPTION) -> u32); - unsafe { DhcpCreateOptionV6(serveripaddress.param().abi(), flags, optionid, classname.param().abi(), vendorname.param().abi(), core::mem::transmute(optioninfo)) } + unsafe { DhcpCreateOptionV6(serveripaddress.param().abi(), flags, optionid, classname.param().abi(), vendorname.param().abi(), optioninfo as _) } } #[inline] pub unsafe fn DhcpCreateSubnet(serveripaddress: P0, subnetaddress: u32, subnetinfo: *const DHCP_SUBNET_INFO) -> u32 @@ -160,7 +160,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpCreateSubnetV6(serveripaddress : windows_core::PCWSTR, subnetaddress : DHCP_IPV6_ADDRESS, subnetinfo : *mut DHCP_SUBNET_INFO_V6) -> u32); - unsafe { DhcpCreateSubnetV6(serveripaddress.param().abi(), core::mem::transmute(subnetaddress), core::mem::transmute(subnetinfo)) } + unsafe { DhcpCreateSubnetV6(serveripaddress.param().abi(), core::mem::transmute(subnetaddress), subnetinfo as _) } } #[inline] pub unsafe fn DhcpCreateSubnetVQ(serveripaddress: P0, subnetaddress: u32, subnetinfo: *const DHCP_SUBNET_INFO_VQ) -> u32 @@ -173,7 +173,7 @@ where #[inline] pub unsafe fn DhcpDeRegisterParamChange(flags: u32, reserved: *mut core::ffi::c_void, event: *mut core::ffi::c_void) -> u32 { windows_targets::link!("dhcpcsvc.dll" "system" fn DhcpDeRegisterParamChange(flags : u32, reserved : *mut core::ffi::c_void, event : *mut core::ffi::c_void) -> u32); - unsafe { DhcpDeRegisterParamChange(flags, core::mem::transmute(reserved), core::mem::transmute(event)) } + unsafe { DhcpDeRegisterParamChange(flags, reserved as _, event as _) } } #[inline] pub unsafe fn DhcpDeleteClass(serveripaddress: P0, reservedmustbezero: u32, classname: P2) -> u32 @@ -220,7 +220,7 @@ where #[inline] pub unsafe fn DhcpDeleteServer(flags: u32, idinfo: *mut core::ffi::c_void, newserver: *mut DHCPDS_SERVER, callbackfn: *mut core::ffi::c_void, callbackdata: *mut core::ffi::c_void) -> u32 { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpDeleteServer(flags : u32, idinfo : *mut core::ffi::c_void, newserver : *mut DHCPDS_SERVER, callbackfn : *mut core::ffi::c_void, callbackdata : *mut core::ffi::c_void) -> u32); - unsafe { DhcpDeleteServer(flags, core::mem::transmute(idinfo), core::mem::transmute(newserver), core::mem::transmute(callbackfn), core::mem::transmute(callbackdata)) } + unsafe { DhcpDeleteServer(flags, idinfo as _, newserver as _, callbackfn as _, callbackdata as _) } } #[inline] pub unsafe fn DhcpDeleteSubnet(serveripaddress: P0, subnetaddress: u32, forceflag: DHCP_FORCE_FLAG) -> u32 @@ -263,7 +263,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpEnumClasses(serveripaddress : windows_core::PCWSTR, reservedmustbezero : u32, resumehandle : *mut u32, preferredmaximum : u32, classinfoarray : *mut *mut DHCP_CLASS_INFO_ARRAY, nread : *mut u32, ntotal : *mut u32) -> u32); - unsafe { DhcpEnumClasses(serveripaddress.param().abi(), reservedmustbezero, core::mem::transmute(resumehandle), preferredmaximum, core::mem::transmute(classinfoarray), core::mem::transmute(nread), core::mem::transmute(ntotal)) } + unsafe { DhcpEnumClasses(serveripaddress.param().abi(), reservedmustbezero, resumehandle as _, preferredmaximum, classinfoarray as _, nread as _, ntotal as _) } } #[inline] pub unsafe fn DhcpEnumClassesV6(serveripaddress: P0, reservedmustbezero: u32, resumehandle: *mut u32, preferredmaximum: u32, classinfoarray: *mut *mut DHCP_CLASS_INFO_ARRAY_V6, nread: *mut u32, ntotal: *mut u32) -> u32 @@ -271,7 +271,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpEnumClassesV6(serveripaddress : windows_core::PCWSTR, reservedmustbezero : u32, resumehandle : *mut u32, preferredmaximum : u32, classinfoarray : *mut *mut DHCP_CLASS_INFO_ARRAY_V6, nread : *mut u32, ntotal : *mut u32) -> u32); - unsafe { DhcpEnumClassesV6(serveripaddress.param().abi(), reservedmustbezero, core::mem::transmute(resumehandle), preferredmaximum, core::mem::transmute(classinfoarray), core::mem::transmute(nread), core::mem::transmute(ntotal)) } + unsafe { DhcpEnumClassesV6(serveripaddress.param().abi(), reservedmustbezero, resumehandle as _, preferredmaximum, classinfoarray as _, nread as _, ntotal as _) } } #[inline] pub unsafe fn DhcpEnumFilterV4(serveripaddress: P0, resumehandle: *mut DHCP_ADDR_PATTERN, preferredmaximum: u32, listtype: DHCP_FILTER_LIST_TYPE, enumfilterinfo: *mut *mut DHCP_FILTER_ENUM_INFO, elementsread: *mut u32, elementstotal: *mut u32) -> u32 @@ -279,7 +279,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpEnumFilterV4(serveripaddress : windows_core::PCWSTR, resumehandle : *mut DHCP_ADDR_PATTERN, preferredmaximum : u32, listtype : DHCP_FILTER_LIST_TYPE, enumfilterinfo : *mut *mut DHCP_FILTER_ENUM_INFO, elementsread : *mut u32, elementstotal : *mut u32) -> u32); - unsafe { DhcpEnumFilterV4(serveripaddress.param().abi(), core::mem::transmute(resumehandle), preferredmaximum, listtype, core::mem::transmute(enumfilterinfo), core::mem::transmute(elementsread), core::mem::transmute(elementstotal)) } + unsafe { DhcpEnumFilterV4(serveripaddress.param().abi(), resumehandle as _, preferredmaximum, listtype, enumfilterinfo as _, elementsread as _, elementstotal as _) } } #[inline] pub unsafe fn DhcpEnumOptionValues(serveripaddress: P0, scopeinfo: *const DHCP_OPTION_SCOPE_INFO, resumehandle: *mut u32, preferredmaximum: u32, optionvalues: *mut *mut DHCP_OPTION_VALUE_ARRAY, optionsread: *mut u32, optionstotal: *mut u32) -> u32 @@ -287,7 +287,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpEnumOptionValues(serveripaddress : windows_core::PCWSTR, scopeinfo : *const DHCP_OPTION_SCOPE_INFO, resumehandle : *mut u32, preferredmaximum : u32, optionvalues : *mut *mut DHCP_OPTION_VALUE_ARRAY, optionsread : *mut u32, optionstotal : *mut u32) -> u32); - unsafe { DhcpEnumOptionValues(serveripaddress.param().abi(), scopeinfo, core::mem::transmute(resumehandle), preferredmaximum, core::mem::transmute(optionvalues), core::mem::transmute(optionsread), core::mem::transmute(optionstotal)) } + unsafe { DhcpEnumOptionValues(serveripaddress.param().abi(), scopeinfo, resumehandle as _, preferredmaximum, optionvalues as _, optionsread as _, optionstotal as _) } } #[inline] pub unsafe fn DhcpEnumOptionValuesV5(serveripaddress: P0, flags: u32, classname: P2, vendorname: P3, scopeinfo: *mut DHCP_OPTION_SCOPE_INFO, resumehandle: *mut u32, preferredmaximum: u32, optionvalues: *mut *mut DHCP_OPTION_VALUE_ARRAY, optionsread: *mut u32, optionstotal: *mut u32) -> u32 @@ -297,7 +297,7 @@ where P3: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpEnumOptionValuesV5(serveripaddress : windows_core::PCWSTR, flags : u32, classname : windows_core::PCWSTR, vendorname : windows_core::PCWSTR, scopeinfo : *mut DHCP_OPTION_SCOPE_INFO, resumehandle : *mut u32, preferredmaximum : u32, optionvalues : *mut *mut DHCP_OPTION_VALUE_ARRAY, optionsread : *mut u32, optionstotal : *mut u32) -> u32); - unsafe { DhcpEnumOptionValuesV5(serveripaddress.param().abi(), flags, classname.param().abi(), vendorname.param().abi(), core::mem::transmute(scopeinfo), core::mem::transmute(resumehandle), preferredmaximum, core::mem::transmute(optionvalues), core::mem::transmute(optionsread), core::mem::transmute(optionstotal)) } + unsafe { DhcpEnumOptionValuesV5(serveripaddress.param().abi(), flags, classname.param().abi(), vendorname.param().abi(), scopeinfo as _, resumehandle as _, preferredmaximum, optionvalues as _, optionsread as _, optionstotal as _) } } #[inline] pub unsafe fn DhcpEnumOptionValuesV6(serveripaddress: P0, flags: u32, classname: P2, vendorname: P3, scopeinfo: *mut DHCP_OPTION_SCOPE_INFO6, resumehandle: *mut u32, preferredmaximum: u32, optionvalues: *mut *mut DHCP_OPTION_VALUE_ARRAY, optionsread: *mut u32, optionstotal: *mut u32) -> u32 @@ -307,7 +307,7 @@ where P3: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpEnumOptionValuesV6(serveripaddress : windows_core::PCWSTR, flags : u32, classname : windows_core::PCWSTR, vendorname : windows_core::PCWSTR, scopeinfo : *mut DHCP_OPTION_SCOPE_INFO6, resumehandle : *mut u32, preferredmaximum : u32, optionvalues : *mut *mut DHCP_OPTION_VALUE_ARRAY, optionsread : *mut u32, optionstotal : *mut u32) -> u32); - unsafe { DhcpEnumOptionValuesV6(serveripaddress.param().abi(), flags, classname.param().abi(), vendorname.param().abi(), core::mem::transmute(scopeinfo), core::mem::transmute(resumehandle), preferredmaximum, core::mem::transmute(optionvalues), core::mem::transmute(optionsread), core::mem::transmute(optionstotal)) } + unsafe { DhcpEnumOptionValuesV6(serveripaddress.param().abi(), flags, classname.param().abi(), vendorname.param().abi(), scopeinfo as _, resumehandle as _, preferredmaximum, optionvalues as _, optionsread as _, optionstotal as _) } } #[inline] pub unsafe fn DhcpEnumOptions(serveripaddress: P0, resumehandle: *mut u32, preferredmaximum: u32, options: *mut *mut DHCP_OPTION_ARRAY, optionsread: *mut u32, optionstotal: *mut u32) -> u32 @@ -315,7 +315,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpEnumOptions(serveripaddress : windows_core::PCWSTR, resumehandle : *mut u32, preferredmaximum : u32, options : *mut *mut DHCP_OPTION_ARRAY, optionsread : *mut u32, optionstotal : *mut u32) -> u32); - unsafe { DhcpEnumOptions(serveripaddress.param().abi(), core::mem::transmute(resumehandle), preferredmaximum, core::mem::transmute(options), core::mem::transmute(optionsread), core::mem::transmute(optionstotal)) } + unsafe { DhcpEnumOptions(serveripaddress.param().abi(), resumehandle as _, preferredmaximum, options as _, optionsread as _, optionstotal as _) } } #[inline] pub unsafe fn DhcpEnumOptionsV5(serveripaddress: P0, flags: u32, classname: P2, vendorname: P3, resumehandle: *mut u32, preferredmaximum: u32, options: *mut *mut DHCP_OPTION_ARRAY, optionsread: *mut u32, optionstotal: *mut u32) -> u32 @@ -325,7 +325,7 @@ where P3: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpEnumOptionsV5(serveripaddress : windows_core::PCWSTR, flags : u32, classname : windows_core::PCWSTR, vendorname : windows_core::PCWSTR, resumehandle : *mut u32, preferredmaximum : u32, options : *mut *mut DHCP_OPTION_ARRAY, optionsread : *mut u32, optionstotal : *mut u32) -> u32); - unsafe { DhcpEnumOptionsV5(serveripaddress.param().abi(), flags, classname.param().abi(), vendorname.param().abi(), core::mem::transmute(resumehandle), preferredmaximum, core::mem::transmute(options), core::mem::transmute(optionsread), core::mem::transmute(optionstotal)) } + unsafe { DhcpEnumOptionsV5(serveripaddress.param().abi(), flags, classname.param().abi(), vendorname.param().abi(), resumehandle as _, preferredmaximum, options as _, optionsread as _, optionstotal as _) } } #[inline] pub unsafe fn DhcpEnumOptionsV6(serveripaddress: P0, flags: u32, classname: P2, vendorname: P3, resumehandle: *mut u32, preferredmaximum: u32, options: *mut *mut DHCP_OPTION_ARRAY, optionsread: *mut u32, optionstotal: *mut u32) -> u32 @@ -335,12 +335,12 @@ where P3: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpEnumOptionsV6(serveripaddress : windows_core::PCWSTR, flags : u32, classname : windows_core::PCWSTR, vendorname : windows_core::PCWSTR, resumehandle : *mut u32, preferredmaximum : u32, options : *mut *mut DHCP_OPTION_ARRAY, optionsread : *mut u32, optionstotal : *mut u32) -> u32); - unsafe { DhcpEnumOptionsV6(serveripaddress.param().abi(), flags, classname.param().abi(), vendorname.param().abi(), core::mem::transmute(resumehandle), preferredmaximum, core::mem::transmute(options), core::mem::transmute(optionsread), core::mem::transmute(optionstotal)) } + unsafe { DhcpEnumOptionsV6(serveripaddress.param().abi(), flags, classname.param().abi(), vendorname.param().abi(), resumehandle as _, preferredmaximum, options as _, optionsread as _, optionstotal as _) } } #[inline] pub unsafe fn DhcpEnumServers(flags: u32, idinfo: *mut core::ffi::c_void, servers: *mut *mut DHCPDS_SERVERS, callbackfn: *mut core::ffi::c_void, callbackdata: *mut core::ffi::c_void) -> u32 { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpEnumServers(flags : u32, idinfo : *mut core::ffi::c_void, servers : *mut *mut DHCPDS_SERVERS, callbackfn : *mut core::ffi::c_void, callbackdata : *mut core::ffi::c_void) -> u32); - unsafe { DhcpEnumServers(flags, core::mem::transmute(idinfo), core::mem::transmute(servers), core::mem::transmute(callbackfn), core::mem::transmute(callbackdata)) } + unsafe { DhcpEnumServers(flags, idinfo as _, servers as _, callbackfn as _, callbackdata as _) } } #[inline] pub unsafe fn DhcpEnumSubnetClients(serveripaddress: P0, subnetaddress: u32, resumehandle: *mut u32, preferredmaximum: u32, clientinfo: *mut *mut DHCP_CLIENT_INFO_ARRAY, clientsread: *mut u32, clientstotal: *mut u32) -> u32 @@ -348,7 +348,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpEnumSubnetClients(serveripaddress : windows_core::PCWSTR, subnetaddress : u32, resumehandle : *mut u32, preferredmaximum : u32, clientinfo : *mut *mut DHCP_CLIENT_INFO_ARRAY, clientsread : *mut u32, clientstotal : *mut u32) -> u32); - unsafe { DhcpEnumSubnetClients(serveripaddress.param().abi(), subnetaddress, core::mem::transmute(resumehandle), preferredmaximum, core::mem::transmute(clientinfo), core::mem::transmute(clientsread), core::mem::transmute(clientstotal)) } + unsafe { DhcpEnumSubnetClients(serveripaddress.param().abi(), subnetaddress, resumehandle as _, preferredmaximum, clientinfo as _, clientsread as _, clientstotal as _) } } #[inline] pub unsafe fn DhcpEnumSubnetClientsFilterStatusInfo(serveripaddress: P0, subnetaddress: u32, resumehandle: *mut u32, preferredmaximum: u32, clientinfo: *mut *mut DHCP_CLIENT_FILTER_STATUS_INFO_ARRAY, clientsread: *mut u32, clientstotal: *mut u32) -> u32 @@ -356,7 +356,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpEnumSubnetClientsFilterStatusInfo(serveripaddress : windows_core::PCWSTR, subnetaddress : u32, resumehandle : *mut u32, preferredmaximum : u32, clientinfo : *mut *mut DHCP_CLIENT_FILTER_STATUS_INFO_ARRAY, clientsread : *mut u32, clientstotal : *mut u32) -> u32); - unsafe { DhcpEnumSubnetClientsFilterStatusInfo(serveripaddress.param().abi(), subnetaddress, core::mem::transmute(resumehandle), preferredmaximum, core::mem::transmute(clientinfo), core::mem::transmute(clientsread), core::mem::transmute(clientstotal)) } + unsafe { DhcpEnumSubnetClientsFilterStatusInfo(serveripaddress.param().abi(), subnetaddress, resumehandle as _, preferredmaximum, clientinfo as _, clientsread as _, clientstotal as _) } } #[inline] pub unsafe fn DhcpEnumSubnetClientsV4(serveripaddress: P0, subnetaddress: u32, resumehandle: *mut u32, preferredmaximum: u32, clientinfo: *mut *mut DHCP_CLIENT_INFO_ARRAY_V4, clientsread: *mut u32, clientstotal: *mut u32) -> u32 @@ -364,7 +364,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpEnumSubnetClientsV4(serveripaddress : windows_core::PCWSTR, subnetaddress : u32, resumehandle : *mut u32, preferredmaximum : u32, clientinfo : *mut *mut DHCP_CLIENT_INFO_ARRAY_V4, clientsread : *mut u32, clientstotal : *mut u32) -> u32); - unsafe { DhcpEnumSubnetClientsV4(serveripaddress.param().abi(), subnetaddress, core::mem::transmute(resumehandle), preferredmaximum, core::mem::transmute(clientinfo), core::mem::transmute(clientsread), core::mem::transmute(clientstotal)) } + unsafe { DhcpEnumSubnetClientsV4(serveripaddress.param().abi(), subnetaddress, resumehandle as _, preferredmaximum, clientinfo as _, clientsread as _, clientstotal as _) } } #[inline] pub unsafe fn DhcpEnumSubnetClientsV5(serveripaddress: P0, subnetaddress: u32, resumehandle: *mut u32, preferredmaximum: u32, clientinfo: *mut *mut DHCP_CLIENT_INFO_ARRAY_V5, clientsread: *mut u32, clientstotal: *mut u32) -> u32 @@ -372,7 +372,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpEnumSubnetClientsV5(serveripaddress : windows_core::PCWSTR, subnetaddress : u32, resumehandle : *mut u32, preferredmaximum : u32, clientinfo : *mut *mut DHCP_CLIENT_INFO_ARRAY_V5, clientsread : *mut u32, clientstotal : *mut u32) -> u32); - unsafe { DhcpEnumSubnetClientsV5(serveripaddress.param().abi(), subnetaddress, core::mem::transmute(resumehandle), preferredmaximum, core::mem::transmute(clientinfo), core::mem::transmute(clientsread), core::mem::transmute(clientstotal)) } + unsafe { DhcpEnumSubnetClientsV5(serveripaddress.param().abi(), subnetaddress, resumehandle as _, preferredmaximum, clientinfo as _, clientsread as _, clientstotal as _) } } #[inline] pub unsafe fn DhcpEnumSubnetClientsV6(serveripaddress: P0, subnetaddress: DHCP_IPV6_ADDRESS, resumehandle: *mut DHCP_IPV6_ADDRESS, preferredmaximum: u32, clientinfo: *mut *mut DHCP_CLIENT_INFO_ARRAY_V6, clientsread: *mut u32, clientstotal: *mut u32) -> u32 @@ -380,7 +380,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpEnumSubnetClientsV6(serveripaddress : windows_core::PCWSTR, subnetaddress : DHCP_IPV6_ADDRESS, resumehandle : *mut DHCP_IPV6_ADDRESS, preferredmaximum : u32, clientinfo : *mut *mut DHCP_CLIENT_INFO_ARRAY_V6, clientsread : *mut u32, clientstotal : *mut u32) -> u32); - unsafe { DhcpEnumSubnetClientsV6(serveripaddress.param().abi(), core::mem::transmute(subnetaddress), core::mem::transmute(resumehandle), preferredmaximum, core::mem::transmute(clientinfo), core::mem::transmute(clientsread), core::mem::transmute(clientstotal)) } + unsafe { DhcpEnumSubnetClientsV6(serveripaddress.param().abi(), core::mem::transmute(subnetaddress), resumehandle as _, preferredmaximum, clientinfo as _, clientsread as _, clientstotal as _) } } #[inline] pub unsafe fn DhcpEnumSubnetClientsVQ(serveripaddress: P0, subnetaddress: u32, resumehandle: *mut u32, preferredmaximum: u32, clientinfo: *mut *mut DHCP_CLIENT_INFO_ARRAY_VQ, clientsread: *mut u32, clientstotal: *mut u32) -> u32 @@ -388,7 +388,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpEnumSubnetClientsVQ(serveripaddress : windows_core::PCWSTR, subnetaddress : u32, resumehandle : *mut u32, preferredmaximum : u32, clientinfo : *mut *mut DHCP_CLIENT_INFO_ARRAY_VQ, clientsread : *mut u32, clientstotal : *mut u32) -> u32); - unsafe { DhcpEnumSubnetClientsVQ(serveripaddress.param().abi(), subnetaddress, core::mem::transmute(resumehandle), preferredmaximum, core::mem::transmute(clientinfo), core::mem::transmute(clientsread), core::mem::transmute(clientstotal)) } + unsafe { DhcpEnumSubnetClientsVQ(serveripaddress.param().abi(), subnetaddress, resumehandle as _, preferredmaximum, clientinfo as _, clientsread as _, clientstotal as _) } } #[inline] pub unsafe fn DhcpEnumSubnetElements(serveripaddress: P0, subnetaddress: u32, enumelementtype: DHCP_SUBNET_ELEMENT_TYPE, resumehandle: *mut u32, preferredmaximum: u32, enumelementinfo: *mut *mut DHCP_SUBNET_ELEMENT_INFO_ARRAY, elementsread: *mut u32, elementstotal: *mut u32) -> u32 @@ -396,7 +396,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpEnumSubnetElements(serveripaddress : windows_core::PCWSTR, subnetaddress : u32, enumelementtype : DHCP_SUBNET_ELEMENT_TYPE, resumehandle : *mut u32, preferredmaximum : u32, enumelementinfo : *mut *mut DHCP_SUBNET_ELEMENT_INFO_ARRAY, elementsread : *mut u32, elementstotal : *mut u32) -> u32); - unsafe { DhcpEnumSubnetElements(serveripaddress.param().abi(), subnetaddress, enumelementtype, core::mem::transmute(resumehandle), preferredmaximum, core::mem::transmute(enumelementinfo), core::mem::transmute(elementsread), core::mem::transmute(elementstotal)) } + unsafe { DhcpEnumSubnetElements(serveripaddress.param().abi(), subnetaddress, enumelementtype, resumehandle as _, preferredmaximum, enumelementinfo as _, elementsread as _, elementstotal as _) } } #[inline] pub unsafe fn DhcpEnumSubnetElementsV4(serveripaddress: P0, subnetaddress: u32, enumelementtype: DHCP_SUBNET_ELEMENT_TYPE, resumehandle: *mut u32, preferredmaximum: u32, enumelementinfo: *mut *mut DHCP_SUBNET_ELEMENT_INFO_ARRAY_V4, elementsread: *mut u32, elementstotal: *mut u32) -> u32 @@ -404,7 +404,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpEnumSubnetElementsV4(serveripaddress : windows_core::PCWSTR, subnetaddress : u32, enumelementtype : DHCP_SUBNET_ELEMENT_TYPE, resumehandle : *mut u32, preferredmaximum : u32, enumelementinfo : *mut *mut DHCP_SUBNET_ELEMENT_INFO_ARRAY_V4, elementsread : *mut u32, elementstotal : *mut u32) -> u32); - unsafe { DhcpEnumSubnetElementsV4(serveripaddress.param().abi(), subnetaddress, enumelementtype, core::mem::transmute(resumehandle), preferredmaximum, core::mem::transmute(enumelementinfo), core::mem::transmute(elementsread), core::mem::transmute(elementstotal)) } + unsafe { DhcpEnumSubnetElementsV4(serveripaddress.param().abi(), subnetaddress, enumelementtype, resumehandle as _, preferredmaximum, enumelementinfo as _, elementsread as _, elementstotal as _) } } #[inline] pub unsafe fn DhcpEnumSubnetElementsV5(serveripaddress: P0, subnetaddress: u32, enumelementtype: DHCP_SUBNET_ELEMENT_TYPE, resumehandle: *mut u32, preferredmaximum: u32, enumelementinfo: *mut *mut DHCP_SUBNET_ELEMENT_INFO_ARRAY_V5, elementsread: *mut u32, elementstotal: *mut u32) -> u32 @@ -412,7 +412,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpEnumSubnetElementsV5(serveripaddress : windows_core::PCWSTR, subnetaddress : u32, enumelementtype : DHCP_SUBNET_ELEMENT_TYPE, resumehandle : *mut u32, preferredmaximum : u32, enumelementinfo : *mut *mut DHCP_SUBNET_ELEMENT_INFO_ARRAY_V5, elementsread : *mut u32, elementstotal : *mut u32) -> u32); - unsafe { DhcpEnumSubnetElementsV5(serveripaddress.param().abi(), subnetaddress, enumelementtype, core::mem::transmute(resumehandle), preferredmaximum, core::mem::transmute(enumelementinfo), core::mem::transmute(elementsread), core::mem::transmute(elementstotal)) } + unsafe { DhcpEnumSubnetElementsV5(serveripaddress.param().abi(), subnetaddress, enumelementtype, resumehandle as _, preferredmaximum, enumelementinfo as _, elementsread as _, elementstotal as _) } } #[inline] pub unsafe fn DhcpEnumSubnetElementsV6(serveripaddress: P0, subnetaddress: DHCP_IPV6_ADDRESS, enumelementtype: DHCP_SUBNET_ELEMENT_TYPE_V6, resumehandle: *mut u32, preferredmaximum: u32, enumelementinfo: *mut *mut DHCP_SUBNET_ELEMENT_INFO_ARRAY_V6, elementsread: *mut u32, elementstotal: *mut u32) -> u32 @@ -420,7 +420,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpEnumSubnetElementsV6(serveripaddress : windows_core::PCWSTR, subnetaddress : DHCP_IPV6_ADDRESS, enumelementtype : DHCP_SUBNET_ELEMENT_TYPE_V6, resumehandle : *mut u32, preferredmaximum : u32, enumelementinfo : *mut *mut DHCP_SUBNET_ELEMENT_INFO_ARRAY_V6, elementsread : *mut u32, elementstotal : *mut u32) -> u32); - unsafe { DhcpEnumSubnetElementsV6(serveripaddress.param().abi(), core::mem::transmute(subnetaddress), enumelementtype, core::mem::transmute(resumehandle), preferredmaximum, core::mem::transmute(enumelementinfo), core::mem::transmute(elementsread), core::mem::transmute(elementstotal)) } + unsafe { DhcpEnumSubnetElementsV6(serveripaddress.param().abi(), core::mem::transmute(subnetaddress), enumelementtype, resumehandle as _, preferredmaximum, enumelementinfo as _, elementsread as _, elementstotal as _) } } #[inline] pub unsafe fn DhcpEnumSubnets(serveripaddress: P0, resumehandle: *mut u32, preferredmaximum: u32, enuminfo: *mut *mut DHCP_IP_ARRAY, elementsread: *mut u32, elementstotal: *mut u32) -> u32 @@ -428,7 +428,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpEnumSubnets(serveripaddress : windows_core::PCWSTR, resumehandle : *mut u32, preferredmaximum : u32, enuminfo : *mut *mut DHCP_IP_ARRAY, elementsread : *mut u32, elementstotal : *mut u32) -> u32); - unsafe { DhcpEnumSubnets(serveripaddress.param().abi(), core::mem::transmute(resumehandle), preferredmaximum, core::mem::transmute(enuminfo), core::mem::transmute(elementsread), core::mem::transmute(elementstotal)) } + unsafe { DhcpEnumSubnets(serveripaddress.param().abi(), resumehandle as _, preferredmaximum, enuminfo as _, elementsread as _, elementstotal as _) } } #[inline] pub unsafe fn DhcpEnumSubnetsV6(serveripaddress: P0, resumehandle: *mut u32, preferredmaximum: u32, enuminfo: *mut *mut DHCPV6_IP_ARRAY, elementsread: *mut u32, elementstotal: *mut u32) -> u32 @@ -436,7 +436,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpEnumSubnetsV6(serveripaddress : windows_core::PCWSTR, resumehandle : *mut u32, preferredmaximum : u32, enuminfo : *mut *mut DHCPV6_IP_ARRAY, elementsread : *mut u32, elementstotal : *mut u32) -> u32); - unsafe { DhcpEnumSubnetsV6(serveripaddress.param().abi(), core::mem::transmute(resumehandle), preferredmaximum, core::mem::transmute(enuminfo), core::mem::transmute(elementsread), core::mem::transmute(elementstotal)) } + unsafe { DhcpEnumSubnetsV6(serveripaddress.param().abi(), resumehandle as _, preferredmaximum, enuminfo as _, elementsread as _, elementstotal as _) } } #[inline] pub unsafe fn DhcpGetAllOptionValues(serveripaddress: P0, flags: u32, scopeinfo: *mut DHCP_OPTION_SCOPE_INFO, values: *mut *mut DHCP_ALL_OPTION_VALUES) -> u32 @@ -444,7 +444,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpGetAllOptionValues(serveripaddress : windows_core::PCWSTR, flags : u32, scopeinfo : *mut DHCP_OPTION_SCOPE_INFO, values : *mut *mut DHCP_ALL_OPTION_VALUES) -> u32); - unsafe { DhcpGetAllOptionValues(serveripaddress.param().abi(), flags, core::mem::transmute(scopeinfo), core::mem::transmute(values)) } + unsafe { DhcpGetAllOptionValues(serveripaddress.param().abi(), flags, scopeinfo as _, values as _) } } #[inline] pub unsafe fn DhcpGetAllOptionValuesV6(serveripaddress: P0, flags: u32, scopeinfo: *mut DHCP_OPTION_SCOPE_INFO6, values: *mut *mut DHCP_ALL_OPTION_VALUES) -> u32 @@ -452,7 +452,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpGetAllOptionValuesV6(serveripaddress : windows_core::PCWSTR, flags : u32, scopeinfo : *mut DHCP_OPTION_SCOPE_INFO6, values : *mut *mut DHCP_ALL_OPTION_VALUES) -> u32); - unsafe { DhcpGetAllOptionValuesV6(serveripaddress.param().abi(), flags, core::mem::transmute(scopeinfo), core::mem::transmute(values)) } + unsafe { DhcpGetAllOptionValuesV6(serveripaddress.param().abi(), flags, scopeinfo as _, values as _) } } #[inline] pub unsafe fn DhcpGetAllOptions(serveripaddress: P0, flags: u32, optionstruct: *mut *mut DHCP_ALL_OPTIONS) -> u32 @@ -460,7 +460,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpGetAllOptions(serveripaddress : windows_core::PCWSTR, flags : u32, optionstruct : *mut *mut DHCP_ALL_OPTIONS) -> u32); - unsafe { DhcpGetAllOptions(serveripaddress.param().abi(), flags, core::mem::transmute(optionstruct)) } + unsafe { DhcpGetAllOptions(serveripaddress.param().abi(), flags, optionstruct as _) } } #[inline] pub unsafe fn DhcpGetAllOptionsV6(serveripaddress: P0, flags: u32, optionstruct: *mut *mut DHCP_ALL_OPTIONS) -> u32 @@ -468,7 +468,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpGetAllOptionsV6(serveripaddress : windows_core::PCWSTR, flags : u32, optionstruct : *mut *mut DHCP_ALL_OPTIONS) -> u32); - unsafe { DhcpGetAllOptionsV6(serveripaddress.param().abi(), flags, core::mem::transmute(optionstruct)) } + unsafe { DhcpGetAllOptionsV6(serveripaddress.param().abi(), flags, optionstruct as _) } } #[inline] pub unsafe fn DhcpGetClassInfo(serveripaddress: P0, reservedmustbezero: u32, partialclassinfo: *mut DHCP_CLASS_INFO, filledclassinfo: *mut *mut DHCP_CLASS_INFO) -> u32 @@ -476,7 +476,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpGetClassInfo(serveripaddress : windows_core::PCWSTR, reservedmustbezero : u32, partialclassinfo : *mut DHCP_CLASS_INFO, filledclassinfo : *mut *mut DHCP_CLASS_INFO) -> u32); - unsafe { DhcpGetClassInfo(serveripaddress.param().abi(), reservedmustbezero, core::mem::transmute(partialclassinfo), core::mem::transmute(filledclassinfo)) } + unsafe { DhcpGetClassInfo(serveripaddress.param().abi(), reservedmustbezero, partialclassinfo as _, filledclassinfo as _) } } #[inline] pub unsafe fn DhcpGetClientInfo(serveripaddress: P0, searchinfo: *const DHCP_SEARCH_INFO, clientinfo: *mut *mut DHCP_CLIENT_INFO) -> u32 @@ -484,7 +484,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpGetClientInfo(serveripaddress : windows_core::PCWSTR, searchinfo : *const DHCP_SEARCH_INFO, clientinfo : *mut *mut DHCP_CLIENT_INFO) -> u32); - unsafe { DhcpGetClientInfo(serveripaddress.param().abi(), searchinfo, core::mem::transmute(clientinfo)) } + unsafe { DhcpGetClientInfo(serveripaddress.param().abi(), searchinfo, clientinfo as _) } } #[inline] pub unsafe fn DhcpGetClientInfoV4(serveripaddress: P0, searchinfo: *const DHCP_SEARCH_INFO, clientinfo: *mut *mut DHCP_CLIENT_INFO_V4) -> u32 @@ -492,7 +492,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpGetClientInfoV4(serveripaddress : windows_core::PCWSTR, searchinfo : *const DHCP_SEARCH_INFO, clientinfo : *mut *mut DHCP_CLIENT_INFO_V4) -> u32); - unsafe { DhcpGetClientInfoV4(serveripaddress.param().abi(), searchinfo, core::mem::transmute(clientinfo)) } + unsafe { DhcpGetClientInfoV4(serveripaddress.param().abi(), searchinfo, clientinfo as _) } } #[inline] pub unsafe fn DhcpGetClientInfoV6(serveripaddress: P0, searchinfo: *const DHCP_SEARCH_INFO_V6, clientinfo: *mut *mut DHCP_CLIENT_INFO_V6) -> u32 @@ -500,7 +500,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpGetClientInfoV6(serveripaddress : windows_core::PCWSTR, searchinfo : *const DHCP_SEARCH_INFO_V6, clientinfo : *mut *mut DHCP_CLIENT_INFO_V6) -> u32); - unsafe { DhcpGetClientInfoV6(serveripaddress.param().abi(), searchinfo, core::mem::transmute(clientinfo)) } + unsafe { DhcpGetClientInfoV6(serveripaddress.param().abi(), searchinfo, clientinfo as _) } } #[inline] pub unsafe fn DhcpGetClientInfoVQ(serveripaddress: P0, searchinfo: *const DHCP_SEARCH_INFO, clientinfo: *mut *mut DHCP_CLIENT_INFO_VQ) -> u32 @@ -508,7 +508,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpGetClientInfoVQ(serveripaddress : windows_core::PCWSTR, searchinfo : *const DHCP_SEARCH_INFO, clientinfo : *mut *mut DHCP_CLIENT_INFO_VQ) -> u32); - unsafe { DhcpGetClientInfoVQ(serveripaddress.param().abi(), searchinfo, core::mem::transmute(clientinfo)) } + unsafe { DhcpGetClientInfoVQ(serveripaddress.param().abi(), searchinfo, clientinfo as _) } } #[inline] pub unsafe fn DhcpGetClientOptions(serveripaddress: P0, clientipaddress: u32, clientsubnetmask: u32, clientoptions: *mut *mut DHCP_OPTION_LIST) -> u32 @@ -516,7 +516,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpGetClientOptions(serveripaddress : windows_core::PCWSTR, clientipaddress : u32, clientsubnetmask : u32, clientoptions : *mut *mut DHCP_OPTION_LIST) -> u32); - unsafe { DhcpGetClientOptions(serveripaddress.param().abi(), clientipaddress, clientsubnetmask, core::mem::transmute(clientoptions)) } + unsafe { DhcpGetClientOptions(serveripaddress.param().abi(), clientipaddress, clientsubnetmask, clientoptions as _) } } #[inline] pub unsafe fn DhcpGetFilterV4(serveripaddress: P0, globalfilterinfo: *mut DHCP_FILTER_GLOBAL_INFO) -> u32 @@ -524,7 +524,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpGetFilterV4(serveripaddress : windows_core::PCWSTR, globalfilterinfo : *mut DHCP_FILTER_GLOBAL_INFO) -> u32); - unsafe { DhcpGetFilterV4(serveripaddress.param().abi(), core::mem::transmute(globalfilterinfo)) } + unsafe { DhcpGetFilterV4(serveripaddress.param().abi(), globalfilterinfo as _) } } #[inline] pub unsafe fn DhcpGetMibInfo(serveripaddress: P0, mibinfo: *mut *mut DHCP_MIB_INFO) -> u32 @@ -532,7 +532,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpGetMibInfo(serveripaddress : windows_core::PCWSTR, mibinfo : *mut *mut DHCP_MIB_INFO) -> u32); - unsafe { DhcpGetMibInfo(serveripaddress.param().abi(), core::mem::transmute(mibinfo)) } + unsafe { DhcpGetMibInfo(serveripaddress.param().abi(), mibinfo as _) } } #[inline] pub unsafe fn DhcpGetMibInfoV5(serveripaddress: P0, mibinfo: *mut *mut DHCP_MIB_INFO_V5) -> u32 @@ -540,7 +540,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpGetMibInfoV5(serveripaddress : windows_core::PCWSTR, mibinfo : *mut *mut DHCP_MIB_INFO_V5) -> u32); - unsafe { DhcpGetMibInfoV5(serveripaddress.param().abi(), core::mem::transmute(mibinfo)) } + unsafe { DhcpGetMibInfoV5(serveripaddress.param().abi(), mibinfo as _) } } #[inline] pub unsafe fn DhcpGetMibInfoV6(serveripaddress: P0, mibinfo: *mut *mut DHCP_MIB_INFO_V6) -> u32 @@ -548,7 +548,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpGetMibInfoV6(serveripaddress : windows_core::PCWSTR, mibinfo : *mut *mut DHCP_MIB_INFO_V6) -> u32); - unsafe { DhcpGetMibInfoV6(serveripaddress.param().abi(), core::mem::transmute(mibinfo)) } + unsafe { DhcpGetMibInfoV6(serveripaddress.param().abi(), mibinfo as _) } } #[inline] pub unsafe fn DhcpGetOptionInfo(serveripaddress: P0, optionid: u32, optioninfo: *mut *mut DHCP_OPTION) -> u32 @@ -556,7 +556,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpGetOptionInfo(serveripaddress : windows_core::PCWSTR, optionid : u32, optioninfo : *mut *mut DHCP_OPTION) -> u32); - unsafe { DhcpGetOptionInfo(serveripaddress.param().abi(), optionid, core::mem::transmute(optioninfo)) } + unsafe { DhcpGetOptionInfo(serveripaddress.param().abi(), optionid, optioninfo as _) } } #[inline] pub unsafe fn DhcpGetOptionInfoV5(serveripaddress: P0, flags: u32, optionid: u32, classname: P3, vendorname: P4, optioninfo: *mut *mut DHCP_OPTION) -> u32 @@ -566,7 +566,7 @@ where P4: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpGetOptionInfoV5(serveripaddress : windows_core::PCWSTR, flags : u32, optionid : u32, classname : windows_core::PCWSTR, vendorname : windows_core::PCWSTR, optioninfo : *mut *mut DHCP_OPTION) -> u32); - unsafe { DhcpGetOptionInfoV5(serveripaddress.param().abi(), flags, optionid, classname.param().abi(), vendorname.param().abi(), core::mem::transmute(optioninfo)) } + unsafe { DhcpGetOptionInfoV5(serveripaddress.param().abi(), flags, optionid, classname.param().abi(), vendorname.param().abi(), optioninfo as _) } } #[inline] pub unsafe fn DhcpGetOptionInfoV6(serveripaddress: P0, flags: u32, optionid: u32, classname: P3, vendorname: P4, optioninfo: *mut *mut DHCP_OPTION) -> u32 @@ -576,7 +576,7 @@ where P4: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpGetOptionInfoV6(serveripaddress : windows_core::PCWSTR, flags : u32, optionid : u32, classname : windows_core::PCWSTR, vendorname : windows_core::PCWSTR, optioninfo : *mut *mut DHCP_OPTION) -> u32); - unsafe { DhcpGetOptionInfoV6(serveripaddress.param().abi(), flags, optionid, classname.param().abi(), vendorname.param().abi(), core::mem::transmute(optioninfo)) } + unsafe { DhcpGetOptionInfoV6(serveripaddress.param().abi(), flags, optionid, classname.param().abi(), vendorname.param().abi(), optioninfo as _) } } #[inline] pub unsafe fn DhcpGetOptionValue(serveripaddress: P0, optionid: u32, scopeinfo: *const DHCP_OPTION_SCOPE_INFO, optionvalue: *mut *mut DHCP_OPTION_VALUE) -> u32 @@ -584,7 +584,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpGetOptionValue(serveripaddress : windows_core::PCWSTR, optionid : u32, scopeinfo : *const DHCP_OPTION_SCOPE_INFO, optionvalue : *mut *mut DHCP_OPTION_VALUE) -> u32); - unsafe { DhcpGetOptionValue(serveripaddress.param().abi(), optionid, scopeinfo, core::mem::transmute(optionvalue)) } + unsafe { DhcpGetOptionValue(serveripaddress.param().abi(), optionid, scopeinfo, optionvalue as _) } } #[inline] pub unsafe fn DhcpGetOptionValueV5(serveripaddress: P0, flags: u32, optionid: u32, classname: P3, vendorname: P4, scopeinfo: *mut DHCP_OPTION_SCOPE_INFO, optionvalue: *mut *mut DHCP_OPTION_VALUE) -> u32 @@ -594,7 +594,7 @@ where P4: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpGetOptionValueV5(serveripaddress : windows_core::PCWSTR, flags : u32, optionid : u32, classname : windows_core::PCWSTR, vendorname : windows_core::PCWSTR, scopeinfo : *mut DHCP_OPTION_SCOPE_INFO, optionvalue : *mut *mut DHCP_OPTION_VALUE) -> u32); - unsafe { DhcpGetOptionValueV5(serveripaddress.param().abi(), flags, optionid, classname.param().abi(), vendorname.param().abi(), core::mem::transmute(scopeinfo), core::mem::transmute(optionvalue)) } + unsafe { DhcpGetOptionValueV5(serveripaddress.param().abi(), flags, optionid, classname.param().abi(), vendorname.param().abi(), scopeinfo as _, optionvalue as _) } } #[inline] pub unsafe fn DhcpGetOptionValueV6(serveripaddress: P0, flags: u32, optionid: u32, classname: P3, vendorname: P4, scopeinfo: *mut DHCP_OPTION_SCOPE_INFO6, optionvalue: *mut *mut DHCP_OPTION_VALUE) -> u32 @@ -604,7 +604,7 @@ where P4: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpGetOptionValueV6(serveripaddress : windows_core::PCWSTR, flags : u32, optionid : u32, classname : windows_core::PCWSTR, vendorname : windows_core::PCWSTR, scopeinfo : *mut DHCP_OPTION_SCOPE_INFO6, optionvalue : *mut *mut DHCP_OPTION_VALUE) -> u32); - unsafe { DhcpGetOptionValueV6(serveripaddress.param().abi(), flags, optionid, classname.param().abi(), vendorname.param().abi(), core::mem::transmute(scopeinfo), core::mem::transmute(optionvalue)) } + unsafe { DhcpGetOptionValueV6(serveripaddress.param().abi(), flags, optionid, classname.param().abi(), vendorname.param().abi(), scopeinfo as _, optionvalue as _) } } #[inline] pub unsafe fn DhcpGetOriginalSubnetMask(sadaptername: P0, dwsubnetmask: *mut u32) -> u32 @@ -612,7 +612,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpcsvc.dll" "system" fn DhcpGetOriginalSubnetMask(sadaptername : windows_core::PCWSTR, dwsubnetmask : *mut u32) -> u32); - unsafe { DhcpGetOriginalSubnetMask(sadaptername.param().abi(), core::mem::transmute(dwsubnetmask)) } + unsafe { DhcpGetOriginalSubnetMask(sadaptername.param().abi(), dwsubnetmask as _) } } #[inline] pub unsafe fn DhcpGetServerBindingInfo(serveripaddress: P0, flags: u32, bindelementsinfo: *mut *mut DHCP_BIND_ELEMENT_ARRAY) -> u32 @@ -620,7 +620,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpGetServerBindingInfo(serveripaddress : windows_core::PCWSTR, flags : u32, bindelementsinfo : *mut *mut DHCP_BIND_ELEMENT_ARRAY) -> u32); - unsafe { DhcpGetServerBindingInfo(serveripaddress.param().abi(), flags, core::mem::transmute(bindelementsinfo)) } + unsafe { DhcpGetServerBindingInfo(serveripaddress.param().abi(), flags, bindelementsinfo as _) } } #[inline] pub unsafe fn DhcpGetServerBindingInfoV6(serveripaddress: P0, flags: u32, bindelementsinfo: *mut *mut DHCPV6_BIND_ELEMENT_ARRAY) -> u32 @@ -628,7 +628,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpGetServerBindingInfoV6(serveripaddress : windows_core::PCWSTR, flags : u32, bindelementsinfo : *mut *mut DHCPV6_BIND_ELEMENT_ARRAY) -> u32); - unsafe { DhcpGetServerBindingInfoV6(serveripaddress.param().abi(), flags, core::mem::transmute(bindelementsinfo)) } + unsafe { DhcpGetServerBindingInfoV6(serveripaddress.param().abi(), flags, bindelementsinfo as _) } } #[inline] pub unsafe fn DhcpGetServerSpecificStrings(serveripaddress: P0, serverspecificstrings: *mut *mut DHCP_SERVER_SPECIFIC_STRINGS) -> u32 @@ -636,7 +636,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpGetServerSpecificStrings(serveripaddress : windows_core::PCWSTR, serverspecificstrings : *mut *mut DHCP_SERVER_SPECIFIC_STRINGS) -> u32); - unsafe { DhcpGetServerSpecificStrings(serveripaddress.param().abi(), core::mem::transmute(serverspecificstrings)) } + unsafe { DhcpGetServerSpecificStrings(serveripaddress.param().abi(), serverspecificstrings as _) } } #[inline] pub unsafe fn DhcpGetSubnetDelayOffer(serveripaddress: P0, subnetaddress: u32, timedelayinmilliseconds: *mut u16) -> u32 @@ -644,7 +644,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpGetSubnetDelayOffer(serveripaddress : windows_core::PCWSTR, subnetaddress : u32, timedelayinmilliseconds : *mut u16) -> u32); - unsafe { DhcpGetSubnetDelayOffer(serveripaddress.param().abi(), subnetaddress, core::mem::transmute(timedelayinmilliseconds)) } + unsafe { DhcpGetSubnetDelayOffer(serveripaddress.param().abi(), subnetaddress, timedelayinmilliseconds as _) } } #[inline] pub unsafe fn DhcpGetSubnetInfo(serveripaddress: P0, subnetaddress: u32, subnetinfo: *mut *mut DHCP_SUBNET_INFO) -> u32 @@ -652,7 +652,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpGetSubnetInfo(serveripaddress : windows_core::PCWSTR, subnetaddress : u32, subnetinfo : *mut *mut DHCP_SUBNET_INFO) -> u32); - unsafe { DhcpGetSubnetInfo(serveripaddress.param().abi(), subnetaddress, core::mem::transmute(subnetinfo)) } + unsafe { DhcpGetSubnetInfo(serveripaddress.param().abi(), subnetaddress, subnetinfo as _) } } #[inline] pub unsafe fn DhcpGetSubnetInfoV6(serveripaddress: P0, subnetaddress: DHCP_IPV6_ADDRESS, subnetinfo: *mut *mut DHCP_SUBNET_INFO_V6) -> u32 @@ -660,7 +660,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpGetSubnetInfoV6(serveripaddress : windows_core::PCWSTR, subnetaddress : DHCP_IPV6_ADDRESS, subnetinfo : *mut *mut DHCP_SUBNET_INFO_V6) -> u32); - unsafe { DhcpGetSubnetInfoV6(serveripaddress.param().abi(), core::mem::transmute(subnetaddress), core::mem::transmute(subnetinfo)) } + unsafe { DhcpGetSubnetInfoV6(serveripaddress.param().abi(), core::mem::transmute(subnetaddress), subnetinfo as _) } } #[inline] pub unsafe fn DhcpGetSubnetInfoVQ(serveripaddress: P0, subnetaddress: u32, subnetinfo: *mut *mut DHCP_SUBNET_INFO_VQ) -> u32 @@ -668,7 +668,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpGetSubnetInfoVQ(serveripaddress : windows_core::PCWSTR, subnetaddress : u32, subnetinfo : *mut *mut DHCP_SUBNET_INFO_VQ) -> u32); - unsafe { DhcpGetSubnetInfoVQ(serveripaddress.param().abi(), subnetaddress, core::mem::transmute(subnetinfo)) } + unsafe { DhcpGetSubnetInfoVQ(serveripaddress.param().abi(), subnetaddress, subnetinfo as _) } } #[inline] pub unsafe fn DhcpGetSuperScopeInfoV4(serveripaddress: P0, superscopetable: *mut *mut DHCP_SUPER_SCOPE_TABLE) -> u32 @@ -676,12 +676,12 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpGetSuperScopeInfoV4(serveripaddress : windows_core::PCWSTR, superscopetable : *mut *mut DHCP_SUPER_SCOPE_TABLE) -> u32); - unsafe { DhcpGetSuperScopeInfoV4(serveripaddress.param().abi(), core::mem::transmute(superscopetable)) } + unsafe { DhcpGetSuperScopeInfoV4(serveripaddress.param().abi(), superscopetable as _) } } #[inline] pub unsafe fn DhcpGetThreadOptions(pflags: *mut u32, reserved: *mut core::ffi::c_void) -> u32 { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpGetThreadOptions(pflags : *mut u32, reserved : *mut core::ffi::c_void) -> u32); - unsafe { DhcpGetThreadOptions(core::mem::transmute(pflags), core::mem::transmute(reserved)) } + unsafe { DhcpGetThreadOptions(pflags as _, reserved as _) } } #[inline] pub unsafe fn DhcpGetVersion(serveripaddress: P0, majorversion: *mut u32, minorversion: *mut u32) -> u32 @@ -689,7 +689,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpGetVersion(serveripaddress : windows_core::PCWSTR, majorversion : *mut u32, minorversion : *mut u32) -> u32); - unsafe { DhcpGetVersion(serveripaddress.param().abi(), core::mem::transmute(majorversion), core::mem::transmute(minorversion)) } + unsafe { DhcpGetVersion(serveripaddress.param().abi(), majorversion as _, minorversion as _) } } #[inline] pub unsafe fn DhcpHlprAddV4PolicyCondition(policy: *mut DHCP_POLICY, parentexpr: u32, r#type: DHCP_POL_ATTR_TYPE, optionid: u32, suboptionid: u32, vendorname: P5, operator: DHCP_POL_COMPARATOR, value: &[u8], conditionindex: *mut u32) -> u32 @@ -697,17 +697,17 @@ where P5: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpHlprAddV4PolicyCondition(policy : *mut DHCP_POLICY, parentexpr : u32, r#type : DHCP_POL_ATTR_TYPE, optionid : u32, suboptionid : u32, vendorname : windows_core::PCWSTR, operator : DHCP_POL_COMPARATOR, value : *const u8, valuelength : u32, conditionindex : *mut u32) -> u32); - unsafe { DhcpHlprAddV4PolicyCondition(core::mem::transmute(policy), parentexpr, r#type, optionid, suboptionid, vendorname.param().abi(), operator, core::mem::transmute(value.as_ptr()), value.len().try_into().unwrap(), core::mem::transmute(conditionindex)) } + unsafe { DhcpHlprAddV4PolicyCondition(policy as _, parentexpr, r#type, optionid, suboptionid, vendorname.param().abi(), operator, core::mem::transmute(value.as_ptr()), value.len().try_into().unwrap(), conditionindex as _) } } #[inline] pub unsafe fn DhcpHlprAddV4PolicyExpr(policy: *mut DHCP_POLICY, parentexpr: u32, operator: DHCP_POL_LOGIC_OPER, exprindex: *mut u32) -> u32 { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpHlprAddV4PolicyExpr(policy : *mut DHCP_POLICY, parentexpr : u32, operator : DHCP_POL_LOGIC_OPER, exprindex : *mut u32) -> u32); - unsafe { DhcpHlprAddV4PolicyExpr(core::mem::transmute(policy), parentexpr, operator, core::mem::transmute(exprindex)) } + unsafe { DhcpHlprAddV4PolicyExpr(policy as _, parentexpr, operator, exprindex as _) } } #[inline] pub unsafe fn DhcpHlprAddV4PolicyRange(policy: *mut DHCP_POLICY, range: *const DHCP_IP_RANGE) -> u32 { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpHlprAddV4PolicyRange(policy : *mut DHCP_POLICY, range : *const DHCP_IP_RANGE) -> u32); - unsafe { DhcpHlprAddV4PolicyRange(core::mem::transmute(policy), range) } + unsafe { DhcpHlprAddV4PolicyRange(policy as _, range) } } #[inline] pub unsafe fn DhcpHlprCreateV4Policy(policyname: P0, fglobalpolicy: bool, subnet: u32, processingorder: u32, rootoperator: DHCP_POL_LOGIC_OPER, description: P5, enabled: bool, policy: *mut *mut DHCP_POLICY) -> u32 @@ -716,7 +716,7 @@ where P5: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpHlprCreateV4Policy(policyname : windows_core::PCWSTR, fglobalpolicy : super::super::Foundation:: BOOL, subnet : u32, processingorder : u32, rootoperator : DHCP_POL_LOGIC_OPER, description : windows_core::PCWSTR, enabled : super::super::Foundation:: BOOL, policy : *mut *mut DHCP_POLICY) -> u32); - unsafe { DhcpHlprCreateV4Policy(policyname.param().abi(), fglobalpolicy.into(), subnet, processingorder, rootoperator, description.param().abi(), enabled.into(), core::mem::transmute(policy)) } + unsafe { DhcpHlprCreateV4Policy(policyname.param().abi(), fglobalpolicy.into(), subnet, processingorder, rootoperator, description.param().abi(), enabled.into(), policy as _) } } #[inline] pub unsafe fn DhcpHlprCreateV4PolicyEx(policyname: P0, fglobalpolicy: bool, subnet: u32, processingorder: u32, rootoperator: DHCP_POL_LOGIC_OPER, description: P5, enabled: bool, policy: *mut *mut DHCP_POLICY_EX) -> u32 @@ -725,7 +725,7 @@ where P5: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpHlprCreateV4PolicyEx(policyname : windows_core::PCWSTR, fglobalpolicy : super::super::Foundation:: BOOL, subnet : u32, processingorder : u32, rootoperator : DHCP_POL_LOGIC_OPER, description : windows_core::PCWSTR, enabled : super::super::Foundation:: BOOL, policy : *mut *mut DHCP_POLICY_EX) -> u32); - unsafe { DhcpHlprCreateV4PolicyEx(policyname.param().abi(), fglobalpolicy.into(), subnet, processingorder, rootoperator, description.param().abi(), enabled.into(), core::mem::transmute(policy)) } + unsafe { DhcpHlprCreateV4PolicyEx(policyname.param().abi(), fglobalpolicy.into(), subnet, processingorder, rootoperator, description.param().abi(), enabled.into(), policy as _) } } #[inline] pub unsafe fn DhcpHlprFindV4DhcpProperty(propertyarray: *const DHCP_PROPERTY_ARRAY, id: DHCP_PROPERTY_ID, r#type: DHCP_PROPERTY_TYPE) -> *mut DHCP_PROPERTY { @@ -735,32 +735,32 @@ pub unsafe fn DhcpHlprFindV4DhcpProperty(propertyarray: *const DHCP_PROPERTY_ARR #[inline] pub unsafe fn DhcpHlprFreeV4DhcpProperty(property: *mut DHCP_PROPERTY) { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpHlprFreeV4DhcpProperty(property : *mut DHCP_PROPERTY)); - unsafe { DhcpHlprFreeV4DhcpProperty(core::mem::transmute(property)) } + unsafe { DhcpHlprFreeV4DhcpProperty(property as _) } } #[inline] pub unsafe fn DhcpHlprFreeV4DhcpPropertyArray(propertyarray: *mut DHCP_PROPERTY_ARRAY) { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpHlprFreeV4DhcpPropertyArray(propertyarray : *mut DHCP_PROPERTY_ARRAY)); - unsafe { DhcpHlprFreeV4DhcpPropertyArray(core::mem::transmute(propertyarray)) } + unsafe { DhcpHlprFreeV4DhcpPropertyArray(propertyarray as _) } } #[inline] pub unsafe fn DhcpHlprFreeV4Policy(policy: *mut DHCP_POLICY) { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpHlprFreeV4Policy(policy : *mut DHCP_POLICY)); - unsafe { DhcpHlprFreeV4Policy(core::mem::transmute(policy)) } + unsafe { DhcpHlprFreeV4Policy(policy as _) } } #[inline] pub unsafe fn DhcpHlprFreeV4PolicyArray(policyarray: *mut DHCP_POLICY_ARRAY) { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpHlprFreeV4PolicyArray(policyarray : *mut DHCP_POLICY_ARRAY)); - unsafe { DhcpHlprFreeV4PolicyArray(core::mem::transmute(policyarray)) } + unsafe { DhcpHlprFreeV4PolicyArray(policyarray as _) } } #[inline] pub unsafe fn DhcpHlprFreeV4PolicyEx(policyex: *mut DHCP_POLICY_EX) { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpHlprFreeV4PolicyEx(policyex : *mut DHCP_POLICY_EX)); - unsafe { DhcpHlprFreeV4PolicyEx(core::mem::transmute(policyex)) } + unsafe { DhcpHlprFreeV4PolicyEx(policyex as _) } } #[inline] pub unsafe fn DhcpHlprFreeV4PolicyExArray(policyexarray: *mut DHCP_POLICY_EX_ARRAY) { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpHlprFreeV4PolicyExArray(policyexarray : *mut DHCP_POLICY_EX_ARRAY)); - unsafe { DhcpHlprFreeV4PolicyExArray(core::mem::transmute(policyexarray)) } + unsafe { DhcpHlprFreeV4PolicyExArray(policyexarray as _) } } #[inline] pub unsafe fn DhcpHlprIsV4PolicySingleUC(policy: *const DHCP_POLICY) -> super::super::Foundation::BOOL { @@ -780,12 +780,12 @@ pub unsafe fn DhcpHlprIsV4PolicyWellFormed(ppolicy: *const DHCP_POLICY) -> super #[inline] pub unsafe fn DhcpHlprModifyV4PolicyExpr(policy: *mut DHCP_POLICY, operator: DHCP_POL_LOGIC_OPER) -> u32 { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpHlprModifyV4PolicyExpr(policy : *mut DHCP_POLICY, operator : DHCP_POL_LOGIC_OPER) -> u32); - unsafe { DhcpHlprModifyV4PolicyExpr(core::mem::transmute(policy), operator) } + unsafe { DhcpHlprModifyV4PolicyExpr(policy as _, operator) } } #[inline] pub unsafe fn DhcpHlprResetV4PolicyExpr(policy: *mut DHCP_POLICY) -> u32 { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpHlprResetV4PolicyExpr(policy : *mut DHCP_POLICY) -> u32); - unsafe { DhcpHlprResetV4PolicyExpr(core::mem::transmute(policy)) } + unsafe { DhcpHlprResetV4PolicyExpr(policy as _) } } #[inline] pub unsafe fn DhcpModifyClass(serveripaddress: P0, reservedmustbezero: u32, classinfo: *mut DHCP_CLASS_INFO) -> u32 @@ -793,7 +793,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpModifyClass(serveripaddress : windows_core::PCWSTR, reservedmustbezero : u32, classinfo : *mut DHCP_CLASS_INFO) -> u32); - unsafe { DhcpModifyClass(serveripaddress.param().abi(), reservedmustbezero, core::mem::transmute(classinfo)) } + unsafe { DhcpModifyClass(serveripaddress.param().abi(), reservedmustbezero, classinfo as _) } } #[inline] pub unsafe fn DhcpModifyClassV6(serveripaddress: P0, reservedmustbezero: u32, classinfo: *mut DHCP_CLASS_INFO_V6) -> u32 @@ -801,7 +801,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpModifyClassV6(serveripaddress : windows_core::PCWSTR, reservedmustbezero : u32, classinfo : *mut DHCP_CLASS_INFO_V6) -> u32); - unsafe { DhcpModifyClassV6(serveripaddress.param().abi(), reservedmustbezero, core::mem::transmute(classinfo)) } + unsafe { DhcpModifyClassV6(serveripaddress.param().abi(), reservedmustbezero, classinfo as _) } } #[inline] pub unsafe fn DhcpRegisterParamChange(flags: u32, reserved: Option<*const core::ffi::c_void>, adaptername: P2, classid: *mut DHCPCAPI_CLASSID, params: DHCPCAPI_PARAMS_ARRAY, handle: *mut core::ffi::c_void) -> u32 @@ -809,7 +809,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); - unsafe { DhcpRegisterParamChange(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)) } + unsafe { DhcpRegisterParamChange(flags, reserved.unwrap_or(core::mem::zeroed()) as _, adaptername.param().abi(), classid as _, core::mem::transmute(params), handle as _) } } #[inline] pub unsafe fn DhcpRemoveDNSRegistrations() -> u32 { @@ -860,7 +860,7 @@ where P4: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpRemoveOptionValueV5(serveripaddress : windows_core::PCWSTR, flags : u32, optionid : u32, classname : windows_core::PCWSTR, vendorname : windows_core::PCWSTR, scopeinfo : *mut DHCP_OPTION_SCOPE_INFO) -> u32); - unsafe { DhcpRemoveOptionValueV5(serveripaddress.param().abi(), flags, optionid, classname.param().abi(), vendorname.param().abi(), core::mem::transmute(scopeinfo)) } + unsafe { DhcpRemoveOptionValueV5(serveripaddress.param().abi(), flags, optionid, classname.param().abi(), vendorname.param().abi(), scopeinfo as _) } } #[inline] pub unsafe fn DhcpRemoveOptionValueV6(serveripaddress: P0, flags: u32, optionid: u32, classname: P3, vendorname: P4, scopeinfo: *mut DHCP_OPTION_SCOPE_INFO6) -> u32 @@ -870,7 +870,7 @@ where P4: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpRemoveOptionValueV6(serveripaddress : windows_core::PCWSTR, flags : u32, optionid : u32, classname : windows_core::PCWSTR, vendorname : windows_core::PCWSTR, scopeinfo : *mut DHCP_OPTION_SCOPE_INFO6) -> u32); - unsafe { DhcpRemoveOptionValueV6(serveripaddress.param().abi(), flags, optionid, classname.param().abi(), vendorname.param().abi(), core::mem::transmute(scopeinfo)) } + unsafe { DhcpRemoveOptionValueV6(serveripaddress.param().abi(), flags, optionid, classname.param().abi(), vendorname.param().abi(), scopeinfo as _) } } #[inline] pub unsafe fn DhcpRemoveSubnetElement(serveripaddress: P0, subnetaddress: u32, removeelementinfo: *const DHCP_SUBNET_ELEMENT_DATA, forceflag: DHCP_FORCE_FLAG) -> u32 @@ -902,7 +902,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpRemoveSubnetElementV6(serveripaddress : windows_core::PCWSTR, subnetaddress : DHCP_IPV6_ADDRESS, removeelementinfo : *mut DHCP_SUBNET_ELEMENT_DATA_V6, forceflag : DHCP_FORCE_FLAG) -> u32); - unsafe { DhcpRemoveSubnetElementV6(serveripaddress.param().abi(), core::mem::transmute(subnetaddress), core::mem::transmute(removeelementinfo), forceflag) } + unsafe { DhcpRemoveSubnetElementV6(serveripaddress.param().abi(), core::mem::transmute(subnetaddress), removeelementinfo as _, forceflag) } } #[inline] pub unsafe fn DhcpRequestParams(flags: u32, reserved: *mut core::ffi::c_void, adaptername: P2, classid: *mut DHCPCAPI_CLASSID, sendparams: DHCPCAPI_PARAMS_ARRAY, recdparams: DHCPCAPI_PARAMS_ARRAY, buffer: *mut u8, psize: *mut u32, requestidstr: P8) -> u32 @@ -911,12 +911,12 @@ where P8: windows_core::Param, { windows_targets::link!("dhcpcsvc.dll" "system" fn DhcpRequestParams(flags : u32, reserved : *mut core::ffi::c_void, adaptername : windows_core::PCWSTR, classid : *mut DHCPCAPI_CLASSID, sendparams : DHCPCAPI_PARAMS_ARRAY, recdparams : DHCPCAPI_PARAMS_ARRAY, buffer : *mut u8, psize : *mut u32, requestidstr : windows_core::PCWSTR) -> u32); - unsafe { DhcpRequestParams(flags, core::mem::transmute(reserved), adaptername.param().abi(), core::mem::transmute(classid), core::mem::transmute(sendparams), core::mem::transmute(recdparams), core::mem::transmute(buffer), core::mem::transmute(psize), requestidstr.param().abi()) } + unsafe { DhcpRequestParams(flags, reserved as _, adaptername.param().abi(), classid as _, core::mem::transmute(sendparams), core::mem::transmute(recdparams), buffer as _, psize as _, requestidstr.param().abi()) } } #[inline] pub unsafe fn DhcpRpcFreeMemory(bufferpointer: *mut core::ffi::c_void) { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpRpcFreeMemory(bufferpointer : *mut core::ffi::c_void)); - unsafe { DhcpRpcFreeMemory(core::mem::transmute(bufferpointer)) } + unsafe { DhcpRpcFreeMemory(bufferpointer as _) } } #[inline] pub unsafe fn DhcpScanDatabase(serveripaddress: P0, subnetaddress: u32, fixflag: u32, scanlist: *mut *mut DHCP_SCAN_LIST) -> u32 @@ -924,12 +924,12 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpScanDatabase(serveripaddress : windows_core::PCWSTR, subnetaddress : u32, fixflag : u32, scanlist : *mut *mut DHCP_SCAN_LIST) -> u32); - unsafe { DhcpScanDatabase(serveripaddress.param().abi(), subnetaddress, fixflag, core::mem::transmute(scanlist)) } + unsafe { DhcpScanDatabase(serveripaddress.param().abi(), subnetaddress, fixflag, scanlist as _) } } #[inline] pub unsafe fn DhcpServerAuditlogParamsFree(configinfo: *mut DHCP_SERVER_CONFIG_INFO_VQ) { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpServerAuditlogParamsFree(configinfo : *mut DHCP_SERVER_CONFIG_INFO_VQ)); - unsafe { DhcpServerAuditlogParamsFree(core::mem::transmute(configinfo)) } + unsafe { DhcpServerAuditlogParamsFree(configinfo as _) } } #[inline] pub unsafe fn DhcpServerBackupDatabase(serveripaddress: P0, path: P1) -> u32 @@ -946,7 +946,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpServerGetConfig(serveripaddress : windows_core::PCWSTR, configinfo : *mut *mut DHCP_SERVER_CONFIG_INFO) -> u32); - unsafe { DhcpServerGetConfig(serveripaddress.param().abi(), core::mem::transmute(configinfo)) } + unsafe { DhcpServerGetConfig(serveripaddress.param().abi(), configinfo as _) } } #[inline] pub unsafe fn DhcpServerGetConfigV4(serveripaddress: P0, configinfo: *mut *mut DHCP_SERVER_CONFIG_INFO_V4) -> u32 @@ -954,7 +954,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpServerGetConfigV4(serveripaddress : windows_core::PCWSTR, configinfo : *mut *mut DHCP_SERVER_CONFIG_INFO_V4) -> u32); - unsafe { DhcpServerGetConfigV4(serveripaddress.param().abi(), core::mem::transmute(configinfo)) } + unsafe { DhcpServerGetConfigV4(serveripaddress.param().abi(), configinfo as _) } } #[inline] pub unsafe fn DhcpServerGetConfigV6(serveripaddress: P0, scopeinfo: *mut DHCP_OPTION_SCOPE_INFO6, configinfo: *mut *mut DHCP_SERVER_CONFIG_INFO_V6) -> u32 @@ -962,7 +962,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpServerGetConfigV6(serveripaddress : windows_core::PCWSTR, scopeinfo : *mut DHCP_OPTION_SCOPE_INFO6, configinfo : *mut *mut DHCP_SERVER_CONFIG_INFO_V6) -> u32); - unsafe { DhcpServerGetConfigV6(serveripaddress.param().abi(), core::mem::transmute(scopeinfo), core::mem::transmute(configinfo)) } + unsafe { DhcpServerGetConfigV6(serveripaddress.param().abi(), scopeinfo as _, configinfo as _) } } #[inline] pub unsafe fn DhcpServerGetConfigVQ(serveripaddress: P0, configinfo: *mut *mut DHCP_SERVER_CONFIG_INFO_VQ) -> u32 @@ -970,7 +970,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpServerGetConfigVQ(serveripaddress : windows_core::PCWSTR, configinfo : *mut *mut DHCP_SERVER_CONFIG_INFO_VQ) -> u32); - unsafe { DhcpServerGetConfigVQ(serveripaddress.param().abi(), core::mem::transmute(configinfo)) } + unsafe { DhcpServerGetConfigVQ(serveripaddress.param().abi(), configinfo as _) } } #[inline] pub unsafe fn DhcpServerQueryAttribute(serveripaddr: P0, dwreserved: u32, dhcpattribid: u32, pdhcpattrib: *mut *mut DHCP_ATTRIB) -> u32 @@ -978,7 +978,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpServerQueryAttribute(serveripaddr : windows_core::PCWSTR, dwreserved : u32, dhcpattribid : u32, pdhcpattrib : *mut *mut DHCP_ATTRIB) -> u32); - unsafe { DhcpServerQueryAttribute(serveripaddr.param().abi(), dwreserved, dhcpattribid, core::mem::transmute(pdhcpattrib)) } + unsafe { DhcpServerQueryAttribute(serveripaddr.param().abi(), dwreserved, dhcpattribid, pdhcpattrib as _) } } #[inline] pub unsafe fn DhcpServerQueryAttributes(serveripaddr: P0, dwreserved: u32, dwattribcount: u32, pdhcpattribs: *mut u32, pdhcpattribarr: *mut *mut DHCP_ATTRIB_ARRAY) -> u32 @@ -986,7 +986,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpServerQueryAttributes(serveripaddr : windows_core::PCWSTR, dwreserved : u32, dwattribcount : u32, pdhcpattribs : *mut u32, pdhcpattribarr : *mut *mut DHCP_ATTRIB_ARRAY) -> u32); - unsafe { DhcpServerQueryAttributes(serveripaddr.param().abi(), dwreserved, dwattribcount, core::mem::transmute(pdhcpattribs), core::mem::transmute(pdhcpattribarr)) } + unsafe { DhcpServerQueryAttributes(serveripaddr.param().abi(), dwreserved, dwattribcount, pdhcpattribs as _, pdhcpattribarr as _) } } #[inline] pub unsafe fn DhcpServerQueryDnsRegCredentials(serveripaddress: P0, uname: &mut [u16], domain: &mut [u16]) -> u32 @@ -1019,7 +1019,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpServerSetConfig(serveripaddress : windows_core::PCWSTR, fieldstoset : u32, configinfo : *mut DHCP_SERVER_CONFIG_INFO) -> u32); - unsafe { DhcpServerSetConfig(serveripaddress.param().abi(), fieldstoset, core::mem::transmute(configinfo)) } + unsafe { DhcpServerSetConfig(serveripaddress.param().abi(), fieldstoset, configinfo as _) } } #[inline] pub unsafe fn DhcpServerSetConfigV4(serveripaddress: P0, fieldstoset: u32, configinfo: *mut DHCP_SERVER_CONFIG_INFO_V4) -> u32 @@ -1027,7 +1027,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpServerSetConfigV4(serveripaddress : windows_core::PCWSTR, fieldstoset : u32, configinfo : *mut DHCP_SERVER_CONFIG_INFO_V4) -> u32); - unsafe { DhcpServerSetConfigV4(serveripaddress.param().abi(), fieldstoset, core::mem::transmute(configinfo)) } + unsafe { DhcpServerSetConfigV4(serveripaddress.param().abi(), fieldstoset, configinfo as _) } } #[inline] pub unsafe fn DhcpServerSetConfigV6(serveripaddress: P0, scopeinfo: *mut DHCP_OPTION_SCOPE_INFO6, fieldstoset: u32, configinfo: *mut DHCP_SERVER_CONFIG_INFO_V6) -> u32 @@ -1035,7 +1035,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpServerSetConfigV6(serveripaddress : windows_core::PCWSTR, scopeinfo : *mut DHCP_OPTION_SCOPE_INFO6, fieldstoset : u32, configinfo : *mut DHCP_SERVER_CONFIG_INFO_V6) -> u32); - unsafe { DhcpServerSetConfigV6(serveripaddress.param().abi(), core::mem::transmute(scopeinfo), fieldstoset, core::mem::transmute(configinfo)) } + unsafe { DhcpServerSetConfigV6(serveripaddress.param().abi(), scopeinfo as _, fieldstoset, configinfo as _) } } #[inline] pub unsafe fn DhcpServerSetConfigVQ(serveripaddress: P0, fieldstoset: u32, configinfo: *mut DHCP_SERVER_CONFIG_INFO_VQ) -> u32 @@ -1043,7 +1043,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpServerSetConfigVQ(serveripaddress : windows_core::PCWSTR, fieldstoset : u32, configinfo : *mut DHCP_SERVER_CONFIG_INFO_VQ) -> u32); - unsafe { DhcpServerSetConfigVQ(serveripaddress.param().abi(), fieldstoset, core::mem::transmute(configinfo)) } + unsafe { DhcpServerSetConfigVQ(serveripaddress.param().abi(), fieldstoset, configinfo as _) } } #[inline] pub unsafe fn DhcpServerSetDnsRegCredentials(serveripaddress: P0, uname: P1, domain: P2, passwd: P3) -> u32 @@ -1123,7 +1123,7 @@ where P4: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpSetOptionInfoV5(serveripaddress : windows_core::PCWSTR, flags : u32, optionid : u32, classname : windows_core::PCWSTR, vendorname : windows_core::PCWSTR, optioninfo : *mut DHCP_OPTION) -> u32); - unsafe { DhcpSetOptionInfoV5(serveripaddress.param().abi(), flags, optionid, classname.param().abi(), vendorname.param().abi(), core::mem::transmute(optioninfo)) } + unsafe { DhcpSetOptionInfoV5(serveripaddress.param().abi(), flags, optionid, classname.param().abi(), vendorname.param().abi(), optioninfo as _) } } #[inline] pub unsafe fn DhcpSetOptionInfoV6(serveripaddress: P0, flags: u32, optionid: u32, classname: P3, vendorname: P4, optioninfo: *mut DHCP_OPTION) -> u32 @@ -1133,7 +1133,7 @@ where P4: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpSetOptionInfoV6(serveripaddress : windows_core::PCWSTR, flags : u32, optionid : u32, classname : windows_core::PCWSTR, vendorname : windows_core::PCWSTR, optioninfo : *mut DHCP_OPTION) -> u32); - unsafe { DhcpSetOptionInfoV6(serveripaddress.param().abi(), flags, optionid, classname.param().abi(), vendorname.param().abi(), core::mem::transmute(optioninfo)) } + unsafe { DhcpSetOptionInfoV6(serveripaddress.param().abi(), flags, optionid, classname.param().abi(), vendorname.param().abi(), optioninfo as _) } } #[inline] pub unsafe fn DhcpSetOptionValue(serveripaddress: P0, optionid: u32, scopeinfo: *const DHCP_OPTION_SCOPE_INFO, optionvalue: *const DHCP_OPTION_DATA) -> u32 @@ -1151,7 +1151,7 @@ where P4: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpSetOptionValueV5(serveripaddress : windows_core::PCWSTR, flags : u32, optionid : u32, classname : windows_core::PCWSTR, vendorname : windows_core::PCWSTR, scopeinfo : *mut DHCP_OPTION_SCOPE_INFO, optionvalue : *mut DHCP_OPTION_DATA) -> u32); - unsafe { DhcpSetOptionValueV5(serveripaddress.param().abi(), flags, optionid, classname.param().abi(), vendorname.param().abi(), core::mem::transmute(scopeinfo), core::mem::transmute(optionvalue)) } + unsafe { DhcpSetOptionValueV5(serveripaddress.param().abi(), flags, optionid, classname.param().abi(), vendorname.param().abi(), scopeinfo as _, optionvalue as _) } } #[inline] pub unsafe fn DhcpSetOptionValueV6(serveripaddress: P0, flags: u32, optionid: u32, classname: P3, vendorname: P4, scopeinfo: *mut DHCP_OPTION_SCOPE_INFO6, optionvalue: *mut DHCP_OPTION_DATA) -> u32 @@ -1161,7 +1161,7 @@ where P4: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpSetOptionValueV6(serveripaddress : windows_core::PCWSTR, flags : u32, optionid : u32, classname : windows_core::PCWSTR, vendorname : windows_core::PCWSTR, scopeinfo : *mut DHCP_OPTION_SCOPE_INFO6, optionvalue : *mut DHCP_OPTION_DATA) -> u32); - unsafe { DhcpSetOptionValueV6(serveripaddress.param().abi(), flags, optionid, classname.param().abi(), vendorname.param().abi(), core::mem::transmute(scopeinfo), core::mem::transmute(optionvalue)) } + unsafe { DhcpSetOptionValueV6(serveripaddress.param().abi(), flags, optionid, classname.param().abi(), vendorname.param().abi(), scopeinfo as _, optionvalue as _) } } #[inline] pub unsafe fn DhcpSetOptionValues(serveripaddress: P0, scopeinfo: *const DHCP_OPTION_SCOPE_INFO, optionvalues: *const DHCP_OPTION_VALUE_ARRAY) -> u32 @@ -1179,7 +1179,7 @@ where P3: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpSetOptionValuesV5(serveripaddress : windows_core::PCWSTR, flags : u32, classname : windows_core::PCWSTR, vendorname : windows_core::PCWSTR, scopeinfo : *mut DHCP_OPTION_SCOPE_INFO, optionvalues : *mut DHCP_OPTION_VALUE_ARRAY) -> u32); - unsafe { DhcpSetOptionValuesV5(serveripaddress.param().abi(), flags, classname.param().abi(), vendorname.param().abi(), core::mem::transmute(scopeinfo), core::mem::transmute(optionvalues)) } + unsafe { DhcpSetOptionValuesV5(serveripaddress.param().abi(), flags, classname.param().abi(), vendorname.param().abi(), scopeinfo as _, optionvalues as _) } } #[inline] pub unsafe fn DhcpSetServerBindingInfo(serveripaddress: P0, flags: u32, bindelementinfo: *mut DHCP_BIND_ELEMENT_ARRAY) -> u32 @@ -1187,7 +1187,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpSetServerBindingInfo(serveripaddress : windows_core::PCWSTR, flags : u32, bindelementinfo : *mut DHCP_BIND_ELEMENT_ARRAY) -> u32); - unsafe { DhcpSetServerBindingInfo(serveripaddress.param().abi(), flags, core::mem::transmute(bindelementinfo)) } + unsafe { DhcpSetServerBindingInfo(serveripaddress.param().abi(), flags, bindelementinfo as _) } } #[inline] pub unsafe fn DhcpSetServerBindingInfoV6(serveripaddress: P0, flags: u32, bindelementinfo: *mut DHCPV6_BIND_ELEMENT_ARRAY) -> u32 @@ -1195,7 +1195,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpSetServerBindingInfoV6(serveripaddress : windows_core::PCWSTR, flags : u32, bindelementinfo : *mut DHCPV6_BIND_ELEMENT_ARRAY) -> u32); - unsafe { DhcpSetServerBindingInfoV6(serveripaddress.param().abi(), flags, core::mem::transmute(bindelementinfo)) } + unsafe { DhcpSetServerBindingInfoV6(serveripaddress.param().abi(), flags, bindelementinfo as _) } } #[inline] pub unsafe fn DhcpSetSubnetDelayOffer(serveripaddress: P0, subnetaddress: u32, timedelayinmilliseconds: u16) -> u32 @@ -1219,7 +1219,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpSetSubnetInfoV6(serveripaddress : windows_core::PCWSTR, subnetaddress : DHCP_IPV6_ADDRESS, subnetinfo : *mut DHCP_SUBNET_INFO_V6) -> u32); - unsafe { DhcpSetSubnetInfoV6(serveripaddress.param().abi(), core::mem::transmute(subnetaddress), core::mem::transmute(subnetinfo)) } + unsafe { DhcpSetSubnetInfoV6(serveripaddress.param().abi(), core::mem::transmute(subnetaddress), subnetinfo as _) } } #[inline] pub unsafe fn DhcpSetSubnetInfoVQ(serveripaddress: P0, subnetaddress: u32, subnetinfo: *const DHCP_SUBNET_INFO_VQ) -> u32 @@ -1241,7 +1241,7 @@ where #[inline] pub unsafe fn DhcpSetThreadOptions(flags: u32, reserved: *mut core::ffi::c_void) -> u32 { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpSetThreadOptions(flags : u32, reserved : *mut core::ffi::c_void) -> u32); - unsafe { DhcpSetThreadOptions(flags, core::mem::transmute(reserved)) } + unsafe { DhcpSetThreadOptions(flags, reserved as _) } } #[inline] pub unsafe fn DhcpUndoRequestParams(flags: Option, reserved: Option<*const core::ffi::c_void>, adaptername: P2, requestidstr: P3) -> u32 @@ -1250,7 +1250,7 @@ where 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); - unsafe { 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()) } + unsafe { DhcpUndoRequestParams(flags.unwrap_or(core::mem::zeroed()) as _, reserved.unwrap_or(core::mem::zeroed()) as _, adaptername.param().abi(), requestidstr.param().abi()) } } #[inline] pub unsafe fn DhcpV4AddPolicyRange(serveripaddress: P0, subnetaddress: u32, policyname: P2, range: *const DHCP_IP_RANGE) -> u32 @@ -1308,7 +1308,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4EnumPolicies(serveripaddress : windows_core::PCWSTR, resumehandle : *mut u32, preferredmaximum : u32, fglobalpolicy : super::super::Foundation:: BOOL, subnetaddress : u32, enuminfo : *mut *mut DHCP_POLICY_ARRAY, elementsread : *mut u32, elementstotal : *mut u32) -> u32); - unsafe { DhcpV4EnumPolicies(serveripaddress.param().abi(), core::mem::transmute(resumehandle), preferredmaximum, fglobalpolicy.into(), subnetaddress, core::mem::transmute(enuminfo), core::mem::transmute(elementsread), core::mem::transmute(elementstotal)) } + unsafe { DhcpV4EnumPolicies(serveripaddress.param().abi(), resumehandle as _, preferredmaximum, fglobalpolicy.into(), subnetaddress, enuminfo as _, elementsread as _, elementstotal as _) } } #[inline] pub unsafe fn DhcpV4EnumPoliciesEx(serveripaddress: P0, resumehandle: *mut u32, preferredmaximum: u32, globalpolicy: bool, subnetaddress: u32, enuminfo: *mut *mut DHCP_POLICY_EX_ARRAY, elementsread: *mut u32, elementstotal: *mut u32) -> u32 @@ -1316,7 +1316,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4EnumPoliciesEx(serveripaddress : windows_core::PCWSTR, resumehandle : *mut u32, preferredmaximum : u32, globalpolicy : super::super::Foundation:: BOOL, subnetaddress : u32, enuminfo : *mut *mut DHCP_POLICY_EX_ARRAY, elementsread : *mut u32, elementstotal : *mut u32) -> u32); - unsafe { DhcpV4EnumPoliciesEx(serveripaddress.param().abi(), core::mem::transmute(resumehandle), preferredmaximum, globalpolicy.into(), subnetaddress, core::mem::transmute(enuminfo), core::mem::transmute(elementsread), core::mem::transmute(elementstotal)) } + unsafe { DhcpV4EnumPoliciesEx(serveripaddress.param().abi(), resumehandle as _, preferredmaximum, globalpolicy.into(), subnetaddress, enuminfo as _, elementsread as _, elementstotal as _) } } #[inline] pub unsafe fn DhcpV4EnumSubnetClients(serveripaddress: P0, subnetaddress: u32, resumehandle: *mut u32, preferredmaximum: u32, clientinfo: *mut *mut DHCP_CLIENT_INFO_PB_ARRAY, clientsread: *mut u32, clientstotal: *mut u32) -> u32 @@ -1324,7 +1324,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4EnumSubnetClients(serveripaddress : windows_core::PCWSTR, subnetaddress : u32, resumehandle : *mut u32, preferredmaximum : u32, clientinfo : *mut *mut DHCP_CLIENT_INFO_PB_ARRAY, clientsread : *mut u32, clientstotal : *mut u32) -> u32); - unsafe { DhcpV4EnumSubnetClients(serveripaddress.param().abi(), subnetaddress, core::mem::transmute(resumehandle), preferredmaximum, core::mem::transmute(clientinfo), core::mem::transmute(clientsread), core::mem::transmute(clientstotal)) } + unsafe { DhcpV4EnumSubnetClients(serveripaddress.param().abi(), subnetaddress, resumehandle as _, preferredmaximum, clientinfo as _, clientsread as _, clientstotal as _) } } #[inline] pub unsafe fn DhcpV4EnumSubnetClientsEx(serveripaddress: P0, subnetaddress: u32, resumehandle: *mut u32, preferredmaximum: u32, clientinfo: *mut *mut DHCP_CLIENT_INFO_EX_ARRAY, clientsread: *mut u32, clientstotal: *mut u32) -> u32 @@ -1332,7 +1332,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4EnumSubnetClientsEx(serveripaddress : windows_core::PCWSTR, subnetaddress : u32, resumehandle : *mut u32, preferredmaximum : u32, clientinfo : *mut *mut DHCP_CLIENT_INFO_EX_ARRAY, clientsread : *mut u32, clientstotal : *mut u32) -> u32); - unsafe { DhcpV4EnumSubnetClientsEx(serveripaddress.param().abi(), subnetaddress, core::mem::transmute(resumehandle), preferredmaximum, core::mem::transmute(clientinfo), core::mem::transmute(clientsread), core::mem::transmute(clientstotal)) } + unsafe { DhcpV4EnumSubnetClientsEx(serveripaddress.param().abi(), subnetaddress, resumehandle as _, preferredmaximum, clientinfo as _, clientsread as _, clientstotal as _) } } #[inline] pub unsafe fn DhcpV4EnumSubnetReservations(serveripaddress: P0, subnetaddress: u32, resumehandle: *mut u32, preferredmaximum: u32, enumelementinfo: *mut *mut DHCP_RESERVATION_INFO_ARRAY, elementsread: *mut u32, elementstotal: *mut u32) -> u32 @@ -1340,7 +1340,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4EnumSubnetReservations(serveripaddress : windows_core::PCWSTR, subnetaddress : u32, resumehandle : *mut u32, preferredmaximum : u32, enumelementinfo : *mut *mut DHCP_RESERVATION_INFO_ARRAY, elementsread : *mut u32, elementstotal : *mut u32) -> u32); - unsafe { DhcpV4EnumSubnetReservations(serveripaddress.param().abi(), subnetaddress, core::mem::transmute(resumehandle), preferredmaximum, core::mem::transmute(enumelementinfo), core::mem::transmute(elementsread), core::mem::transmute(elementstotal)) } + unsafe { DhcpV4EnumSubnetReservations(serveripaddress.param().abi(), subnetaddress, resumehandle as _, preferredmaximum, enumelementinfo as _, elementsread as _, elementstotal as _) } } #[inline] pub unsafe fn DhcpV4FailoverAddScopeToRelationship(serveripaddress: P0, prelationship: *const DHCP_FAILOVER_RELATIONSHIP) -> u32 @@ -1381,7 +1381,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4FailoverEnumRelationship(serveripaddress : windows_core::PCWSTR, resumehandle : *mut u32, preferredmaximum : u32, prelationship : *mut *mut DHCP_FAILOVER_RELATIONSHIP_ARRAY, relationshipread : *mut u32, relationshiptotal : *mut u32) -> u32); - unsafe { DhcpV4FailoverEnumRelationship(serveripaddress.param().abi(), core::mem::transmute(resumehandle), preferredmaximum, core::mem::transmute(prelationship), core::mem::transmute(relationshipread), core::mem::transmute(relationshiptotal)) } + unsafe { DhcpV4FailoverEnumRelationship(serveripaddress.param().abi(), resumehandle as _, preferredmaximum, prelationship as _, relationshipread as _, relationshiptotal as _) } } #[inline] pub unsafe fn DhcpV4FailoverGetAddressStatus(serveripaddress: P0, subnetaddress: u32, pstatus: *mut u32) -> u32 @@ -1389,7 +1389,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4FailoverGetAddressStatus(serveripaddress : windows_core::PCWSTR, subnetaddress : u32, pstatus : *mut u32) -> u32); - unsafe { DhcpV4FailoverGetAddressStatus(serveripaddress.param().abi(), subnetaddress, core::mem::transmute(pstatus)) } + unsafe { DhcpV4FailoverGetAddressStatus(serveripaddress.param().abi(), subnetaddress, pstatus as _) } } #[inline] pub unsafe fn DhcpV4FailoverGetClientInfo(serveripaddress: P0, searchinfo: *const DHCP_SEARCH_INFO, clientinfo: *mut *mut DHCPV4_FAILOVER_CLIENT_INFO) -> u32 @@ -1397,7 +1397,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4FailoverGetClientInfo(serveripaddress : windows_core::PCWSTR, searchinfo : *const DHCP_SEARCH_INFO, clientinfo : *mut *mut DHCPV4_FAILOVER_CLIENT_INFO) -> u32); - unsafe { DhcpV4FailoverGetClientInfo(serveripaddress.param().abi(), searchinfo, core::mem::transmute(clientinfo)) } + unsafe { DhcpV4FailoverGetClientInfo(serveripaddress.param().abi(), searchinfo, clientinfo as _) } } #[inline] pub unsafe fn DhcpV4FailoverGetRelationship(serveripaddress: P0, prelationshipname: P1, prelationship: *mut *mut DHCP_FAILOVER_RELATIONSHIP) -> u32 @@ -1406,7 +1406,7 @@ where P1: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4FailoverGetRelationship(serveripaddress : windows_core::PCWSTR, prelationshipname : windows_core::PCWSTR, prelationship : *mut *mut DHCP_FAILOVER_RELATIONSHIP) -> u32); - unsafe { DhcpV4FailoverGetRelationship(serveripaddress.param().abi(), prelationshipname.param().abi(), core::mem::transmute(prelationship)) } + unsafe { DhcpV4FailoverGetRelationship(serveripaddress.param().abi(), prelationshipname.param().abi(), prelationship as _) } } #[inline] pub unsafe fn DhcpV4FailoverGetScopeRelationship(serveripaddress: P0, scopeid: u32, prelationship: *mut *mut DHCP_FAILOVER_RELATIONSHIP) -> u32 @@ -1414,7 +1414,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4FailoverGetScopeRelationship(serveripaddress : windows_core::PCWSTR, scopeid : u32, prelationship : *mut *mut DHCP_FAILOVER_RELATIONSHIP) -> u32); - unsafe { DhcpV4FailoverGetScopeRelationship(serveripaddress.param().abi(), scopeid, core::mem::transmute(prelationship)) } + unsafe { DhcpV4FailoverGetScopeRelationship(serveripaddress.param().abi(), scopeid, prelationship as _) } } #[inline] pub unsafe fn DhcpV4FailoverGetScopeStatistics(serveripaddress: P0, scopeid: u32, pstats: *mut *mut DHCP_FAILOVER_STATISTICS) -> u32 @@ -1422,7 +1422,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4FailoverGetScopeStatistics(serveripaddress : windows_core::PCWSTR, scopeid : u32, pstats : *mut *mut DHCP_FAILOVER_STATISTICS) -> u32); - unsafe { DhcpV4FailoverGetScopeStatistics(serveripaddress.param().abi(), scopeid, core::mem::transmute(pstats)) } + unsafe { DhcpV4FailoverGetScopeStatistics(serveripaddress.param().abi(), scopeid, pstats as _) } } #[inline] pub unsafe fn DhcpV4FailoverGetSystemTime(serveripaddress: P0, ptime: *mut u32, pmaxalloweddeltatime: *mut u32) -> u32 @@ -1430,7 +1430,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4FailoverGetSystemTime(serveripaddress : windows_core::PCWSTR, ptime : *mut u32, pmaxalloweddeltatime : *mut u32) -> u32); - unsafe { DhcpV4FailoverGetSystemTime(serveripaddress.param().abi(), core::mem::transmute(ptime), core::mem::transmute(pmaxalloweddeltatime)) } + unsafe { DhcpV4FailoverGetSystemTime(serveripaddress.param().abi(), ptime as _, pmaxalloweddeltatime as _) } } #[inline] pub unsafe fn DhcpV4FailoverSetRelationship(serveripaddress: P0, flags: u32, prelationship: *const DHCP_FAILOVER_RELATIONSHIP) -> u32 @@ -1455,7 +1455,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4GetAllOptionValues(serveripaddress : windows_core::PCWSTR, flags : u32, scopeinfo : *mut DHCP_OPTION_SCOPE_INFO, values : *mut *mut DHCP_ALL_OPTION_VALUES_PB) -> u32); - unsafe { DhcpV4GetAllOptionValues(serveripaddress.param().abi(), flags, core::mem::transmute(scopeinfo), core::mem::transmute(values)) } + unsafe { DhcpV4GetAllOptionValues(serveripaddress.param().abi(), flags, scopeinfo as _, values as _) } } #[inline] pub unsafe fn DhcpV4GetClientInfo(serveripaddress: P0, searchinfo: *const DHCP_SEARCH_INFO, clientinfo: *mut *mut DHCP_CLIENT_INFO_PB) -> u32 @@ -1463,7 +1463,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4GetClientInfo(serveripaddress : windows_core::PCWSTR, searchinfo : *const DHCP_SEARCH_INFO, clientinfo : *mut *mut DHCP_CLIENT_INFO_PB) -> u32); - unsafe { DhcpV4GetClientInfo(serveripaddress.param().abi(), searchinfo, core::mem::transmute(clientinfo)) } + unsafe { DhcpV4GetClientInfo(serveripaddress.param().abi(), searchinfo, clientinfo as _) } } #[inline] pub unsafe fn DhcpV4GetClientInfoEx(serveripaddress: P0, searchinfo: *const DHCP_SEARCH_INFO, clientinfo: *mut *mut DHCP_CLIENT_INFO_EX) -> u32 @@ -1471,7 +1471,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4GetClientInfoEx(serveripaddress : windows_core::PCWSTR, searchinfo : *const DHCP_SEARCH_INFO, clientinfo : *mut *mut DHCP_CLIENT_INFO_EX) -> u32); - unsafe { DhcpV4GetClientInfoEx(serveripaddress.param().abi(), searchinfo, core::mem::transmute(clientinfo)) } + unsafe { DhcpV4GetClientInfoEx(serveripaddress.param().abi(), searchinfo, clientinfo as _) } } #[inline] pub unsafe fn DhcpV4GetFreeIPAddress(serveripaddress: P0, scopeid: u32, startip: u32, endip: u32, numfreeaddrreq: u32, ipaddrlist: *mut *mut DHCP_IP_ARRAY) -> u32 @@ -1479,7 +1479,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4GetFreeIPAddress(serveripaddress : windows_core::PCWSTR, scopeid : u32, startip : u32, endip : u32, numfreeaddrreq : u32, ipaddrlist : *mut *mut DHCP_IP_ARRAY) -> u32); - unsafe { DhcpV4GetFreeIPAddress(serveripaddress.param().abi(), scopeid, startip, endip, numfreeaddrreq, core::mem::transmute(ipaddrlist)) } + unsafe { DhcpV4GetFreeIPAddress(serveripaddress.param().abi(), scopeid, startip, endip, numfreeaddrreq, ipaddrlist as _) } } #[inline] pub unsafe fn DhcpV4GetOptionValue(serveripaddress: P0, flags: u32, optionid: u32, policyname: P3, vendorname: P4, scopeinfo: *mut DHCP_OPTION_SCOPE_INFO, optionvalue: *mut *mut DHCP_OPTION_VALUE) -> u32 @@ -1489,7 +1489,7 @@ where P4: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4GetOptionValue(serveripaddress : windows_core::PCWSTR, flags : u32, optionid : u32, policyname : windows_core::PCWSTR, vendorname : windows_core::PCWSTR, scopeinfo : *mut DHCP_OPTION_SCOPE_INFO, optionvalue : *mut *mut DHCP_OPTION_VALUE) -> u32); - unsafe { DhcpV4GetOptionValue(serveripaddress.param().abi(), flags, optionid, policyname.param().abi(), vendorname.param().abi(), core::mem::transmute(scopeinfo), core::mem::transmute(optionvalue)) } + unsafe { DhcpV4GetOptionValue(serveripaddress.param().abi(), flags, optionid, policyname.param().abi(), vendorname.param().abi(), scopeinfo as _, optionvalue as _) } } #[inline] pub unsafe fn DhcpV4GetPolicy(serveripaddress: P0, fglobalpolicy: bool, subnetaddress: u32, policyname: P3, policy: *mut *mut DHCP_POLICY) -> u32 @@ -1498,7 +1498,7 @@ where P3: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4GetPolicy(serveripaddress : windows_core::PCWSTR, fglobalpolicy : super::super::Foundation:: BOOL, subnetaddress : u32, policyname : windows_core::PCWSTR, policy : *mut *mut DHCP_POLICY) -> u32); - unsafe { DhcpV4GetPolicy(serveripaddress.param().abi(), fglobalpolicy.into(), subnetaddress, policyname.param().abi(), core::mem::transmute(policy)) } + unsafe { DhcpV4GetPolicy(serveripaddress.param().abi(), fglobalpolicy.into(), subnetaddress, policyname.param().abi(), policy as _) } } #[inline] pub unsafe fn DhcpV4GetPolicyEx(serveripaddress: P0, globalpolicy: bool, subnetaddress: u32, policyname: P3, policy: *mut *mut DHCP_POLICY_EX) -> u32 @@ -1507,7 +1507,7 @@ where P3: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4GetPolicyEx(serveripaddress : windows_core::PCWSTR, globalpolicy : super::super::Foundation:: BOOL, subnetaddress : u32, policyname : windows_core::PCWSTR, policy : *mut *mut DHCP_POLICY_EX) -> u32); - unsafe { DhcpV4GetPolicyEx(serveripaddress.param().abi(), globalpolicy.into(), subnetaddress, policyname.param().abi(), core::mem::transmute(policy)) } + unsafe { DhcpV4GetPolicyEx(serveripaddress.param().abi(), globalpolicy.into(), subnetaddress, policyname.param().abi(), policy as _) } } #[inline] pub unsafe fn DhcpV4QueryPolicyEnforcement(serveripaddress: P0, fglobalpolicy: bool, subnetaddress: u32, enabled: *mut super::super::Foundation::BOOL) -> u32 @@ -1515,7 +1515,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4QueryPolicyEnforcement(serveripaddress : windows_core::PCWSTR, fglobalpolicy : super::super::Foundation:: BOOL, subnetaddress : u32, enabled : *mut super::super::Foundation:: BOOL) -> u32); - unsafe { DhcpV4QueryPolicyEnforcement(serveripaddress.param().abi(), fglobalpolicy.into(), subnetaddress, core::mem::transmute(enabled)) } + unsafe { DhcpV4QueryPolicyEnforcement(serveripaddress.param().abi(), fglobalpolicy.into(), subnetaddress, enabled as _) } } #[inline] pub unsafe fn DhcpV4RemoveOptionValue(serveripaddress: P0, flags: u32, optionid: u32, policyname: P3, vendorname: P4, scopeinfo: *mut DHCP_OPTION_SCOPE_INFO) -> u32 @@ -1525,7 +1525,7 @@ where P4: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4RemoveOptionValue(serveripaddress : windows_core::PCWSTR, flags : u32, optionid : u32, policyname : windows_core::PCWSTR, vendorname : windows_core::PCWSTR, scopeinfo : *mut DHCP_OPTION_SCOPE_INFO) -> u32); - unsafe { DhcpV4RemoveOptionValue(serveripaddress.param().abi(), flags, optionid, policyname.param().abi(), vendorname.param().abi(), core::mem::transmute(scopeinfo)) } + unsafe { DhcpV4RemoveOptionValue(serveripaddress.param().abi(), flags, optionid, policyname.param().abi(), vendorname.param().abi(), scopeinfo as _) } } #[inline] pub unsafe fn DhcpV4RemovePolicyRange(serveripaddress: P0, subnetaddress: u32, policyname: P2, range: *const DHCP_IP_RANGE) -> u32 @@ -1544,7 +1544,7 @@ where P4: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4SetOptionValue(serveripaddress : windows_core::PCWSTR, flags : u32, optionid : u32, policyname : windows_core::PCWSTR, vendorname : windows_core::PCWSTR, scopeinfo : *mut DHCP_OPTION_SCOPE_INFO, optionvalue : *mut DHCP_OPTION_DATA) -> u32); - unsafe { DhcpV4SetOptionValue(serveripaddress.param().abi(), flags, optionid, policyname.param().abi(), vendorname.param().abi(), core::mem::transmute(scopeinfo), core::mem::transmute(optionvalue)) } + unsafe { DhcpV4SetOptionValue(serveripaddress.param().abi(), flags, optionid, policyname.param().abi(), vendorname.param().abi(), scopeinfo as _, optionvalue as _) } } #[inline] pub unsafe fn DhcpV4SetOptionValues(serveripaddress: P0, flags: u32, policyname: P2, vendorname: P3, scopeinfo: *mut DHCP_OPTION_SCOPE_INFO, optionvalues: *mut DHCP_OPTION_VALUE_ARRAY) -> u32 @@ -1554,7 +1554,7 @@ where P3: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4SetOptionValues(serveripaddress : windows_core::PCWSTR, flags : u32, policyname : windows_core::PCWSTR, vendorname : windows_core::PCWSTR, scopeinfo : *mut DHCP_OPTION_SCOPE_INFO, optionvalues : *mut DHCP_OPTION_VALUE_ARRAY) -> u32); - unsafe { DhcpV4SetOptionValues(serveripaddress.param().abi(), flags, policyname.param().abi(), vendorname.param().abi(), core::mem::transmute(scopeinfo), core::mem::transmute(optionvalues)) } + unsafe { DhcpV4SetOptionValues(serveripaddress.param().abi(), flags, policyname.param().abi(), vendorname.param().abi(), scopeinfo as _, optionvalues as _) } } #[inline] pub unsafe fn DhcpV4SetPolicy(serveripaddress: P0, fieldsmodified: u32, fglobalpolicy: bool, subnetaddress: u32, policyname: P4, policy: *const DHCP_POLICY) -> u32 @@ -1596,7 +1596,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV6GetFreeIPAddress(serveripaddress : windows_core::PCWSTR, scopeid : DHCP_IPV6_ADDRESS, startip : DHCP_IPV6_ADDRESS, endip : DHCP_IPV6_ADDRESS, numfreeaddrreq : u32, ipaddrlist : *mut *mut DHCPV6_IP_ARRAY) -> u32); - unsafe { DhcpV6GetFreeIPAddress(serveripaddress.param().abi(), core::mem::transmute(scopeid), core::mem::transmute(startip), core::mem::transmute(endip), numfreeaddrreq, core::mem::transmute(ipaddrlist)) } + unsafe { DhcpV6GetFreeIPAddress(serveripaddress.param().abi(), core::mem::transmute(scopeid), core::mem::transmute(startip), core::mem::transmute(endip), numfreeaddrreq, ipaddrlist as _) } } #[inline] pub unsafe fn DhcpV6GetStatelessStatistics(serveripaddress: P0, statelessstats: *mut *mut DHCPV6_STATELESS_STATS) -> u32 @@ -1604,7 +1604,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV6GetStatelessStatistics(serveripaddress : windows_core::PCWSTR, statelessstats : *mut *mut DHCPV6_STATELESS_STATS) -> u32); - unsafe { DhcpV6GetStatelessStatistics(serveripaddress.param().abi(), core::mem::transmute(statelessstats)) } + unsafe { DhcpV6GetStatelessStatistics(serveripaddress.param().abi(), statelessstats as _) } } #[inline] pub unsafe fn DhcpV6GetStatelessStoreParams(serveripaddress: P0, fserverlevel: bool, subnetaddress: DHCP_IPV6_ADDRESS, params: *mut *mut DHCPV6_STATELESS_PARAMS) -> u32 @@ -1612,7 +1612,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV6GetStatelessStoreParams(serveripaddress : windows_core::PCWSTR, fserverlevel : super::super::Foundation:: BOOL, subnetaddress : DHCP_IPV6_ADDRESS, params : *mut *mut DHCPV6_STATELESS_PARAMS) -> u32); - unsafe { DhcpV6GetStatelessStoreParams(serveripaddress.param().abi(), fserverlevel.into(), core::mem::transmute(subnetaddress), core::mem::transmute(params)) } + unsafe { DhcpV6GetStatelessStoreParams(serveripaddress.param().abi(), fserverlevel.into(), core::mem::transmute(subnetaddress), params as _) } } #[inline] pub unsafe fn DhcpV6SetStatelessStoreParams(serveripaddress: P0, fserverlevel: bool, subnetaddress: DHCP_IPV6_ADDRESS, fieldmodified: u32, params: *const DHCPV6_STATELESS_PARAMS) -> u32 @@ -1630,7 +1630,7 @@ pub unsafe fn Dhcpv6CApiCleanup() { #[inline] pub unsafe fn Dhcpv6CApiInitialize(version: *mut u32) { windows_targets::link!("dhcpcsvc6.dll" "system" fn Dhcpv6CApiInitialize(version : *mut u32)); - unsafe { Dhcpv6CApiInitialize(core::mem::transmute(version)) } + unsafe { Dhcpv6CApiInitialize(version as _) } } #[inline] pub unsafe fn Dhcpv6ReleasePrefix(adaptername: P0, classid: *mut DHCPV6CAPI_CLASSID, leaseinfo: *mut DHCPV6PrefixLeaseInformation) -> u32 @@ -1638,7 +1638,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpcsvc6.dll" "system" fn Dhcpv6ReleasePrefix(adaptername : windows_core::PCWSTR, classid : *mut DHCPV6CAPI_CLASSID, leaseinfo : *mut DHCPV6PrefixLeaseInformation) -> u32); - unsafe { Dhcpv6ReleasePrefix(adaptername.param().abi(), core::mem::transmute(classid), core::mem::transmute(leaseinfo)) } + unsafe { Dhcpv6ReleasePrefix(adaptername.param().abi(), classid as _, leaseinfo as _) } } #[inline] pub unsafe fn Dhcpv6RenewPrefix(adaptername: P0, pclassid: *mut DHCPV6CAPI_CLASSID, prefixleaseinfo: *mut DHCPV6PrefixLeaseInformation, pdwtimetowait: *mut u32, bvalidateprefix: u32) -> u32 @@ -1646,7 +1646,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpcsvc6.dll" "system" fn Dhcpv6RenewPrefix(adaptername : windows_core::PCWSTR, pclassid : *mut DHCPV6CAPI_CLASSID, prefixleaseinfo : *mut DHCPV6PrefixLeaseInformation, pdwtimetowait : *mut u32, bvalidateprefix : u32) -> u32); - unsafe { Dhcpv6RenewPrefix(adaptername.param().abi(), core::mem::transmute(pclassid), core::mem::transmute(prefixleaseinfo), core::mem::transmute(pdwtimetowait), bvalidateprefix) } + unsafe { Dhcpv6RenewPrefix(adaptername.param().abi(), pclassid as _, prefixleaseinfo as _, pdwtimetowait as _, bvalidateprefix) } } #[inline] pub unsafe fn Dhcpv6RequestParams(forcenewinform: bool, reserved: *mut core::ffi::c_void, adaptername: P2, classid: *mut DHCPV6CAPI_CLASSID, recdparams: DHCPV6CAPI_PARAMS_ARRAY, buffer: *mut u8, psize: *mut u32) -> u32 @@ -1654,7 +1654,7 @@ where P2: windows_core::Param, { windows_targets::link!("dhcpcsvc6.dll" "system" fn Dhcpv6RequestParams(forcenewinform : super::super::Foundation:: BOOL, reserved : *mut core::ffi::c_void, adaptername : windows_core::PCWSTR, classid : *mut DHCPV6CAPI_CLASSID, recdparams : DHCPV6CAPI_PARAMS_ARRAY, buffer : *mut u8, psize : *mut u32) -> u32); - unsafe { Dhcpv6RequestParams(forcenewinform.into(), core::mem::transmute(reserved), adaptername.param().abi(), core::mem::transmute(classid), core::mem::transmute(recdparams), core::mem::transmute(buffer), core::mem::transmute(psize)) } + unsafe { Dhcpv6RequestParams(forcenewinform.into(), reserved as _, adaptername.param().abi(), classid as _, core::mem::transmute(recdparams), buffer as _, psize as _) } } #[inline] pub unsafe fn Dhcpv6RequestPrefix(adaptername: P0, pclassid: *mut DHCPV6CAPI_CLASSID, prefixleaseinfo: *mut DHCPV6PrefixLeaseInformation, pdwtimetowait: *mut u32) -> u32 @@ -1662,7 +1662,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpcsvc6.dll" "system" fn Dhcpv6RequestPrefix(adaptername : windows_core::PCWSTR, pclassid : *mut DHCPV6CAPI_CLASSID, prefixleaseinfo : *mut DHCPV6PrefixLeaseInformation, pdwtimetowait : *mut u32) -> u32); - unsafe { Dhcpv6RequestPrefix(adaptername.param().abi(), core::mem::transmute(pclassid), core::mem::transmute(prefixleaseinfo), core::mem::transmute(pdwtimetowait)) } + unsafe { Dhcpv6RequestPrefix(adaptername.param().abi(), pclassid as _, prefixleaseinfo as _, pdwtimetowait as _) } } pub const ADDRESS_TYPE_IANA: u32 = 0u32; pub const ADDRESS_TYPE_IATA: u32 = 1u32; 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 ed58700ba6..66d5f1acbb 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); - unsafe { DnsAcquireContextHandle_A(credentialflags, core::mem::transmute(credentials.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcontext)) } + unsafe { DnsAcquireContextHandle_A(credentialflags, credentials.unwrap_or(core::mem::zeroed()) as _, pcontext as _) } } #[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); - unsafe { DnsAcquireContextHandle_W(credentialflags, core::mem::transmute(credentials.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcontext)) } + unsafe { DnsAcquireContextHandle_W(credentialflags, credentials.unwrap_or(core::mem::zeroed()) as _, pcontext as _) } } #[inline] pub unsafe fn DnsCancelQuery(pcancelhandle: *const DNS_QUERY_CANCEL) -> i32 { @@ -34,27 +34,27 @@ where #[inline] pub unsafe fn DnsConnectionFreeNameList(pnamelist: *mut DNS_CONNECTION_NAME_LIST) { windows_targets::link!("dnsapi.dll" "system" fn DnsConnectionFreeNameList(pnamelist : *mut DNS_CONNECTION_NAME_LIST)); - unsafe { DnsConnectionFreeNameList(core::mem::transmute(pnamelist)) } + unsafe { DnsConnectionFreeNameList(pnamelist as _) } } #[inline] pub unsafe fn DnsConnectionFreeProxyInfo(pproxyinfo: *mut DNS_CONNECTION_PROXY_INFO) { windows_targets::link!("dnsapi.dll" "system" fn DnsConnectionFreeProxyInfo(pproxyinfo : *mut DNS_CONNECTION_PROXY_INFO)); - unsafe { DnsConnectionFreeProxyInfo(core::mem::transmute(pproxyinfo)) } + unsafe { DnsConnectionFreeProxyInfo(pproxyinfo as _) } } #[inline] pub unsafe fn DnsConnectionFreeProxyInfoEx(pproxyinfoex: *mut DNS_CONNECTION_PROXY_INFO_EX) { windows_targets::link!("dnsapi.dll" "system" fn DnsConnectionFreeProxyInfoEx(pproxyinfoex : *mut DNS_CONNECTION_PROXY_INFO_EX)); - unsafe { DnsConnectionFreeProxyInfoEx(core::mem::transmute(pproxyinfoex)) } + unsafe { DnsConnectionFreeProxyInfoEx(pproxyinfoex as _) } } #[inline] pub unsafe fn DnsConnectionFreeProxyList(pproxylist: *mut DNS_CONNECTION_PROXY_LIST) { windows_targets::link!("dnsapi.dll" "system" fn DnsConnectionFreeProxyList(pproxylist : *mut DNS_CONNECTION_PROXY_LIST)); - unsafe { DnsConnectionFreeProxyList(core::mem::transmute(pproxylist)) } + unsafe { DnsConnectionFreeProxyList(pproxylist as _) } } #[inline] pub unsafe fn DnsConnectionGetNameList(pnamelist: *mut DNS_CONNECTION_NAME_LIST) -> u32 { windows_targets::link!("dnsapi.dll" "system" fn DnsConnectionGetNameList(pnamelist : *mut DNS_CONNECTION_NAME_LIST) -> u32); - unsafe { DnsConnectionGetNameList(core::mem::transmute(pnamelist)) } + unsafe { DnsConnectionGetNameList(pnamelist as _) } } #[inline] pub unsafe fn DnsConnectionGetProxyInfo(pwszconnectionname: P0, r#type: DNS_CONNECTION_PROXY_TYPE, pproxyinfo: *mut DNS_CONNECTION_PROXY_INFO) -> u32 @@ -62,7 +62,7 @@ where P0: windows_core::Param, { windows_targets::link!("dnsapi.dll" "system" fn DnsConnectionGetProxyInfo(pwszconnectionname : windows_core::PCWSTR, r#type : DNS_CONNECTION_PROXY_TYPE, pproxyinfo : *mut DNS_CONNECTION_PROXY_INFO) -> u32); - unsafe { DnsConnectionGetProxyInfo(pwszconnectionname.param().abi(), r#type, core::mem::transmute(pproxyinfo)) } + unsafe { DnsConnectionGetProxyInfo(pwszconnectionname.param().abi(), r#type, pproxyinfo as _) } } #[inline] pub unsafe fn DnsConnectionGetProxyInfoForHostUrl(pwszhosturl: P0, pselectioncontext: Option<&[u8]>, dwexplicitinterfaceindex: u32, pproxyinfoex: *mut DNS_CONNECTION_PROXY_INFO_EX) -> u32 @@ -70,7 +70,7 @@ where P0: windows_core::Param, { windows_targets::link!("dnsapi.dll" "system" fn DnsConnectionGetProxyInfoForHostUrl(pwszhosturl : windows_core::PCWSTR, pselectioncontext : *const u8, dwselectioncontextlength : u32, dwexplicitinterfaceindex : u32, pproxyinfoex : *mut DNS_CONNECTION_PROXY_INFO_EX) -> u32); - unsafe { DnsConnectionGetProxyInfoForHostUrl(pwszhosturl.param().abi(), core::mem::transmute(pselectioncontext.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pselectioncontext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dwexplicitinterfaceindex, core::mem::transmute(pproxyinfoex)) } + unsafe { DnsConnectionGetProxyInfoForHostUrl(pwszhosturl.param().abi(), core::mem::transmute(pselectioncontext.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pselectioncontext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dwexplicitinterfaceindex, pproxyinfoex as _) } } #[inline] pub unsafe fn DnsConnectionGetProxyInfoForHostUrlEx(pwszhosturl: P0, pselectioncontext: Option<&[u8]>, dwexplicitinterfaceindex: u32, pwszconnectionname: P4, pproxyinfoex: *mut DNS_CONNECTION_PROXY_INFO_EX) -> u32 @@ -79,7 +79,7 @@ where P4: windows_core::Param, { windows_targets::link!("dnsapi.dll" "system" fn DnsConnectionGetProxyInfoForHostUrlEx(pwszhosturl : windows_core::PCWSTR, pselectioncontext : *const u8, dwselectioncontextlength : u32, dwexplicitinterfaceindex : u32, pwszconnectionname : windows_core::PCWSTR, pproxyinfoex : *mut DNS_CONNECTION_PROXY_INFO_EX) -> u32); - unsafe { DnsConnectionGetProxyInfoForHostUrlEx(pwszhosturl.param().abi(), core::mem::transmute(pselectioncontext.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pselectioncontext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dwexplicitinterfaceindex, pwszconnectionname.param().abi(), core::mem::transmute(pproxyinfoex)) } + unsafe { DnsConnectionGetProxyInfoForHostUrlEx(pwszhosturl.param().abi(), core::mem::transmute(pselectioncontext.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pselectioncontext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dwexplicitinterfaceindex, pwszconnectionname.param().abi(), pproxyinfoex as _) } } #[inline] pub unsafe fn DnsConnectionGetProxyList(pwszconnectionname: P0, pproxylist: *mut DNS_CONNECTION_PROXY_LIST) -> u32 @@ -87,7 +87,7 @@ where P0: windows_core::Param, { windows_targets::link!("dnsapi.dll" "system" fn DnsConnectionGetProxyList(pwszconnectionname : windows_core::PCWSTR, pproxylist : *mut DNS_CONNECTION_PROXY_LIST) -> u32); - unsafe { DnsConnectionGetProxyList(pwszconnectionname.param().abi(), core::mem::transmute(pproxylist)) } + unsafe { DnsConnectionGetProxyList(pwszconnectionname.param().abi(), pproxylist as _) } } #[inline] pub unsafe fn DnsConnectionSetPolicyEntries(policyentrytag: DNS_CONNECTION_POLICY_TAG, ppolicyentrylist: *const DNS_CONNECTION_POLICY_ENTRY_LIST) -> u32 { @@ -110,22 +110,22 @@ pub unsafe fn DnsConnectionUpdateIfIndexTable(pconnectionifindexentries: *const #[inline] pub unsafe fn DnsExtractRecordsFromMessage_UTF8(pdnsbuffer: *const DNS_MESSAGE_BUFFER, wmessagelength: u16, pprecord: *mut *mut DNS_RECORDA) -> i32 { windows_targets::link!("dnsapi.dll" "system" fn DnsExtractRecordsFromMessage_UTF8(pdnsbuffer : *const DNS_MESSAGE_BUFFER, wmessagelength : u16, pprecord : *mut *mut DNS_RECORDA) -> i32); - unsafe { DnsExtractRecordsFromMessage_UTF8(pdnsbuffer, wmessagelength, core::mem::transmute(pprecord)) } + unsafe { DnsExtractRecordsFromMessage_UTF8(pdnsbuffer, wmessagelength, pprecord as _) } } #[inline] pub unsafe fn DnsExtractRecordsFromMessage_W(pdnsbuffer: *const DNS_MESSAGE_BUFFER, wmessagelength: u16, pprecord: *mut *mut DNS_RECORDA) -> i32 { windows_targets::link!("dnsapi.dll" "system" fn DnsExtractRecordsFromMessage_W(pdnsbuffer : *const DNS_MESSAGE_BUFFER, wmessagelength : u16, pprecord : *mut *mut DNS_RECORDA) -> i32); - unsafe { DnsExtractRecordsFromMessage_W(pdnsbuffer, wmessagelength, core::mem::transmute(pprecord)) } + unsafe { DnsExtractRecordsFromMessage_W(pdnsbuffer, wmessagelength, pprecord as _) } } #[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)); - unsafe { DnsFree(core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), freetype) } + unsafe { DnsFree(pdata.unwrap_or(core::mem::zeroed()) as _, freetype) } } #[inline] pub unsafe fn DnsFreeCustomServers(pcservers: *mut u32, ppservers: *mut *mut DNS_CUSTOM_SERVER) { windows_targets::link!("dnsapi.dll" "system" fn DnsFreeCustomServers(pcservers : *mut u32, ppservers : *mut *mut DNS_CUSTOM_SERVER)); - unsafe { DnsFreeCustomServers(core::mem::transmute(pcservers), core::mem::transmute(ppservers)) } + unsafe { DnsFreeCustomServers(pcservers as _, ppservers as _) } } #[inline] pub unsafe fn DnsFreeProxyName(proxyname: P0) @@ -138,7 +138,7 @@ where #[inline] pub unsafe fn DnsGetApplicationSettings(pcservers: *mut u32, ppdefaultservers: *mut *mut DNS_CUSTOM_SERVER, psettings: Option<*mut DNS_APPLICATION_SETTINGS>) -> u32 { windows_targets::link!("dnsapi.dll" "system" fn DnsGetApplicationSettings(pcservers : *mut u32, ppdefaultservers : *mut *mut DNS_CUSTOM_SERVER, psettings : *mut DNS_APPLICATION_SETTINGS) -> u32); - unsafe { DnsGetApplicationSettings(core::mem::transmute(pcservers), core::mem::transmute(ppdefaultservers), core::mem::transmute(psettings.unwrap_or(core::mem::zeroed()))) } + unsafe { DnsGetApplicationSettings(pcservers as _, ppdefaultservers as _, psettings.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -146,22 +146,22 @@ 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); - unsafe { 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()))) } + unsafe { DnsGetProxyInformation(hostname.param().abi(), proxyinformation as _, defaultproxyinformation.unwrap_or(core::mem::zeroed()) as _, completionroutine.unwrap_or(core::mem::zeroed()) as _, completioncontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { DnsModifyRecordsInSet_A(core::mem::transmute(paddrecords.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdeleterecords.unwrap_or(core::mem::zeroed())), 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()))) } + unsafe { DnsModifyRecordsInSet_A(paddrecords.unwrap_or(core::mem::zeroed()) as _, pdeleterecords.unwrap_or(core::mem::zeroed()) as _, options, hcredentials.unwrap_or(core::mem::zeroed()) as _, pextralist.unwrap_or(core::mem::zeroed()) as _, preserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { DnsModifyRecordsInSet_UTF8(core::mem::transmute(paddrecords.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdeleterecords.unwrap_or(core::mem::zeroed())), 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()))) } + unsafe { DnsModifyRecordsInSet_UTF8(paddrecords.unwrap_or(core::mem::zeroed()) as _, pdeleterecords.unwrap_or(core::mem::zeroed()) as _, options, hcredentials.unwrap_or(core::mem::zeroed()) as _, pextralist.unwrap_or(core::mem::zeroed()) as _, preserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { DnsModifyRecordsInSet_W(core::mem::transmute(paddrecords.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdeleterecords.unwrap_or(core::mem::zeroed())), 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()))) } + unsafe { DnsModifyRecordsInSet_W(paddrecords.unwrap_or(core::mem::zeroed()) as _, pdeleterecords.unwrap_or(core::mem::zeroed()) as _, options, hcredentials.unwrap_or(core::mem::zeroed()) as _, pextralist.unwrap_or(core::mem::zeroed()) as _, preserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn DnsNameCompare_A(pname1: P0, pname2: P1) -> super::super::Foundation::BOOL @@ -187,22 +187,22 @@ 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); - unsafe { DnsQueryConfig(config, 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)) } + unsafe { DnsQueryConfig(config, flag, pwsadaptername.param().abi(), preserved.unwrap_or(core::mem::zeroed()) as _, pbuffer.unwrap_or(core::mem::zeroed()) as _, pbuflen as _) } } #[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); - unsafe { DnsQueryEx(pqueryrequest, core::mem::transmute(pqueryresults), core::mem::transmute(pcancelhandle.unwrap_or(core::mem::zeroed()))) } + unsafe { DnsQueryEx(pqueryrequest, pqueryresults as _, pcancelhandle.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn DnsQueryRaw(queryrequest: *const DNS_QUERY_RAW_REQUEST, cancelhandle: *mut DNS_QUERY_RAW_CANCEL) -> i32 { windows_targets::link!("dnsapi.dll" "system" fn DnsQueryRaw(queryrequest : *const DNS_QUERY_RAW_REQUEST, cancelhandle : *mut DNS_QUERY_RAW_CANCEL) -> i32); - unsafe { DnsQueryRaw(queryrequest, core::mem::transmute(cancelhandle)) } + unsafe { DnsQueryRaw(queryrequest, cancelhandle as _) } } #[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)); - unsafe { DnsQueryRawResultFree(core::mem::transmute(queryresults.unwrap_or(core::mem::zeroed()))) } + unsafe { DnsQueryRawResultFree(queryresults.unwrap_or(core::mem::zeroed()) as _) } } #[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 @@ -210,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); - unsafe { DnsQuery_A(pszname.param().abi(), wtype, options, core::mem::transmute(pextra.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppqueryresults), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } + unsafe { DnsQuery_A(pszname.param().abi(), wtype, options, pextra.unwrap_or(core::mem::zeroed()) as _, ppqueryresults as _, preserved.unwrap_or(core::mem::zeroed()) as _) } } #[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 @@ -218,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); - unsafe { DnsQuery_UTF8(pszname.param().abi(), wtype, options, core::mem::transmute(pextra.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppqueryresults), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } + unsafe { DnsQuery_UTF8(pszname.param().abi(), wtype, options, pextra.unwrap_or(core::mem::zeroed()) as _, ppqueryresults as _, preserved.unwrap_or(core::mem::zeroed()) as _) } } #[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 @@ -226,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); - unsafe { DnsQuery_W(pszname.param().abi(), wtype, options, core::mem::transmute(pextra.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppqueryresults), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } + unsafe { DnsQuery_W(pszname.param().abi(), wtype, options, pextra.unwrap_or(core::mem::zeroed()) as _, ppqueryresults as _, preserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn DnsRecordCompare(precord1: *const DNS_RECORDA, precord2: *const DNS_RECORDA) -> super::super::Foundation::BOOL { @@ -241,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); - unsafe { 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()))) } + unsafe { DnsRecordSetCompare(prr1 as _, prr2 as _, ppdiff1.unwrap_or(core::mem::zeroed()) as _, ppdiff2.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn DnsRecordSetCopyEx(precordset: *const DNS_RECORDA, charsetin: DNS_CHARSET, charsetout: DNS_CHARSET) -> *mut DNS_RECORDA { @@ -251,7 +251,7 @@ pub unsafe fn DnsRecordSetCopyEx(precordset: *const DNS_RECORDA, charsetin: DNS_ #[inline] pub unsafe fn DnsRecordSetDetach(precordlist: *mut DNS_RECORDA) -> *mut DNS_RECORDA { windows_targets::link!("dnsapi.dll" "system" fn DnsRecordSetDetach(precordlist : *mut DNS_RECORDA) -> *mut DNS_RECORDA); - unsafe { DnsRecordSetDetach(core::mem::transmute(precordlist)) } + unsafe { DnsRecordSetDetach(precordlist as _) } } #[inline] pub unsafe fn DnsReleaseContextHandle(hcontext: super::super::Foundation::HANDLE) { @@ -261,22 +261,22 @@ pub unsafe fn DnsReleaseContextHandle(hcontext: super::super::Foundation::HANDLE #[inline] 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); - unsafe { DnsReplaceRecordSetA(preplaceset, 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()))) } + unsafe { DnsReplaceRecordSetA(preplaceset, options, hcontext.unwrap_or(core::mem::zeroed()) as _, pextrainfo.unwrap_or(core::mem::zeroed()) as _, preserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { DnsReplaceRecordSetUTF8(preplaceset, 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()))) } + unsafe { DnsReplaceRecordSetUTF8(preplaceset, options, hcontext.unwrap_or(core::mem::zeroed()) as _, pextrainfo.unwrap_or(core::mem::zeroed()) as _, preserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { DnsReplaceRecordSetW(preplaceset, 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()))) } + unsafe { DnsReplaceRecordSetW(preplaceset, options, hcontext.unwrap_or(core::mem::zeroed()) as _, pextrainfo.unwrap_or(core::mem::zeroed()) as _, preserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn DnsServiceBrowse(prequest: *const DNS_SERVICE_BROWSE_REQUEST, pcancel: *mut DNS_SERVICE_CANCEL) -> i32 { windows_targets::link!("dnsapi.dll" "system" fn DnsServiceBrowse(prequest : *const DNS_SERVICE_BROWSE_REQUEST, pcancel : *mut DNS_SERVICE_CANCEL) -> i32); - unsafe { DnsServiceBrowse(prequest, core::mem::transmute(pcancel)) } + unsafe { DnsServiceBrowse(prequest, pcancel as _) } } #[inline] pub unsafe fn DnsServiceBrowseCancel(pcancelhandle: *const DNS_SERVICE_CANCEL) -> i32 { @@ -290,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); - unsafe { 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())), wport, wpriority, wweight, dwpropertiescount, keys, values) } + unsafe { DnsServiceConstructInstance(pservicename.param().abi(), phostname.param().abi(), pip4.unwrap_or(core::mem::zeroed()) as _, pip6.unwrap_or(core::mem::zeroed()) as _, wport, wpriority, wweight, dwpropertiescount, keys, values) } } #[inline] pub unsafe fn DnsServiceCopyInstance(porig: *const DNS_SERVICE_INSTANCE) -> *mut DNS_SERVICE_INSTANCE { @@ -300,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); - unsafe { DnsServiceDeRegister(prequest, core::mem::transmute(pcancel.unwrap_or(core::mem::zeroed()))) } + unsafe { DnsServiceDeRegister(prequest, pcancel.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn DnsServiceFreeInstance(pinstance: *const DNS_SERVICE_INSTANCE) { @@ -310,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); - unsafe { DnsServiceRegister(prequest, core::mem::transmute(pcancel.unwrap_or(core::mem::zeroed()))) } + unsafe { DnsServiceRegister(prequest, pcancel.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn DnsServiceRegisterCancel(pcancelhandle: *const DNS_SERVICE_CANCEL) -> u32 { @@ -320,7 +320,7 @@ pub unsafe fn DnsServiceRegisterCancel(pcancelhandle: *const DNS_SERVICE_CANCEL) #[inline] pub unsafe fn DnsServiceResolve(prequest: *const DNS_SERVICE_RESOLVE_REQUEST, pcancel: *mut DNS_SERVICE_CANCEL) -> i32 { windows_targets::link!("dnsapi.dll" "system" fn DnsServiceResolve(prequest : *const DNS_SERVICE_RESOLVE_REQUEST, pcancel : *mut DNS_SERVICE_CANCEL) -> i32); - unsafe { DnsServiceResolve(prequest, core::mem::transmute(pcancel)) } + unsafe { DnsServiceResolve(prequest, pcancel as _) } } #[inline] pub unsafe fn DnsServiceResolveCancel(pcancelhandle: *const DNS_SERVICE_CANCEL) -> i32 { @@ -330,17 +330,17 @@ 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); - unsafe { DnsSetApplicationSettings(pservers.len().try_into().unwrap(), core::mem::transmute(pservers.as_ptr()), core::mem::transmute(psettings.unwrap_or(core::mem::zeroed()))) } + unsafe { DnsSetApplicationSettings(pservers.len().try_into().unwrap(), core::mem::transmute(pservers.as_ptr()), psettings.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn DnsStartMulticastQuery(pqueryrequest: *const MDNS_QUERY_REQUEST, phandle: *mut MDNS_QUERY_HANDLE) -> i32 { windows_targets::link!("dnsapi.dll" "system" fn DnsStartMulticastQuery(pqueryrequest : *const MDNS_QUERY_REQUEST, phandle : *mut MDNS_QUERY_HANDLE) -> i32); - unsafe { DnsStartMulticastQuery(pqueryrequest, core::mem::transmute(phandle)) } + unsafe { DnsStartMulticastQuery(pqueryrequest, phandle as _) } } #[inline] pub unsafe fn DnsStopMulticastQuery(phandle: *mut MDNS_QUERY_HANDLE) -> i32 { windows_targets::link!("dnsapi.dll" "system" fn DnsStopMulticastQuery(phandle : *mut MDNS_QUERY_HANDLE) -> i32); - unsafe { DnsStopMulticastQuery(core::mem::transmute(phandle)) } + unsafe { DnsStopMulticastQuery(phandle as _) } } #[inline] pub unsafe fn DnsValidateName_A(pszname: P0, format: DNS_NAME_FORMAT) -> i32 @@ -372,7 +372,7 @@ where P2: windows_core::Param, { windows_targets::link!("dnsapi.dll" "system" fn DnsWriteQuestionToBuffer_UTF8(pdnsbuffer : *mut DNS_MESSAGE_BUFFER, pdwbuffersize : *mut u32, pszname : windows_core::PCSTR, wtype : u16, xid : u16, frecursiondesired : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - unsafe { DnsWriteQuestionToBuffer_UTF8(core::mem::transmute(pdnsbuffer), core::mem::transmute(pdwbuffersize), pszname.param().abi(), wtype, xid, frecursiondesired.into()) } + unsafe { DnsWriteQuestionToBuffer_UTF8(pdnsbuffer as _, pdwbuffersize as _, pszname.param().abi(), wtype, xid, frecursiondesired.into()) } } #[inline] pub unsafe fn DnsWriteQuestionToBuffer_W(pdnsbuffer: *mut DNS_MESSAGE_BUFFER, pdwbuffersize: *mut u32, pszname: P2, wtype: u16, xid: u16, frecursiondesired: bool) -> super::super::Foundation::BOOL @@ -380,7 +380,7 @@ where P2: windows_core::Param, { windows_targets::link!("dnsapi.dll" "system" fn DnsWriteQuestionToBuffer_W(pdnsbuffer : *mut DNS_MESSAGE_BUFFER, pdwbuffersize : *mut u32, pszname : windows_core::PCWSTR, wtype : u16, xid : u16, frecursiondesired : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - unsafe { DnsWriteQuestionToBuffer_W(core::mem::transmute(pdnsbuffer), core::mem::transmute(pdwbuffersize), pszname.param().abi(), wtype, xid, frecursiondesired.into()) } + unsafe { DnsWriteQuestionToBuffer_W(pdnsbuffer as _, pdwbuffersize as _, pszname.param().abi(), wtype, xid, frecursiondesired.into()) } } pub const DDR_MAX_IP_HINTS: u32 = 4u32; pub const DNSREC_ADDITIONAL: u32 = 3u32; 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 69e3a1288e..955a1fa418 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/IpHelper/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/IpHelper/mod.rs @@ -1,7 +1,7 @@ #[inline] pub unsafe fn AddIPAddress(address: u32, ipmask: u32, ifindex: u32, ntecontext: *mut u32, nteinstance: *mut u32) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn AddIPAddress(address : u32, ipmask : u32, ifindex : u32, ntecontext : *mut u32, nteinstance : *mut u32) -> u32); - unsafe { AddIPAddress(address, ipmask, ifindex, core::mem::transmute(ntecontext), core::mem::transmute(nteinstance)) } + unsafe { AddIPAddress(address, ipmask, ifindex, ntecontext as _, nteinstance as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -23,18 +23,18 @@ pub unsafe fn CancelMibChangeNotify2(notificationhandle: super::super::Foundatio #[inline] pub unsafe fn CaptureInterfaceHardwareCrossTimestamp(interfaceluid: *const super::Ndis::NET_LUID_LH, crosstimestamp: *mut INTERFACE_HARDWARE_CROSSTIMESTAMP) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn CaptureInterfaceHardwareCrossTimestamp(interfaceluid : *const super::Ndis:: NET_LUID_LH, crosstimestamp : *mut INTERFACE_HARDWARE_CROSSTIMESTAMP) -> u32); - unsafe { CaptureInterfaceHardwareCrossTimestamp(interfaceluid, core::mem::transmute(crosstimestamp)) } + unsafe { CaptureInterfaceHardwareCrossTimestamp(interfaceluid, crosstimestamp as _) } } #[inline] pub unsafe fn ConvertCompartmentGuidToId(compartmentguid: *const windows_core::GUID, compartmentid: *mut u32) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn ConvertCompartmentGuidToId(compartmentguid : *const windows_core::GUID, compartmentid : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { ConvertCompartmentGuidToId(compartmentguid, core::mem::transmute(compartmentid)) } + unsafe { ConvertCompartmentGuidToId(compartmentguid, compartmentid as _) } } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] 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); - unsafe { ConvertCompartmentIdToGuid(compartmentid, core::mem::transmute(compartmentguid)) } + unsafe { ConvertCompartmentIdToGuid(compartmentid, compartmentguid as _) } } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] @@ -43,19 +43,19 @@ where P0: windows_core::Param, { windows_targets::link!("iphlpapi.dll" "system" fn ConvertInterfaceAliasToLuid(interfacealias : windows_core::PCWSTR, interfaceluid : *mut super::Ndis:: NET_LUID_LH) -> super::super::Foundation:: WIN32_ERROR); - unsafe { ConvertInterfaceAliasToLuid(interfacealias.param().abi(), core::mem::transmute(interfaceluid)) } + unsafe { ConvertInterfaceAliasToLuid(interfacealias.param().abi(), interfaceluid as _) } } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] pub unsafe fn ConvertInterfaceGuidToLuid(interfaceguid: *const windows_core::GUID, interfaceluid: *mut super::Ndis::NET_LUID_LH) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn ConvertInterfaceGuidToLuid(interfaceguid : *const windows_core::GUID, interfaceluid : *mut super::Ndis:: NET_LUID_LH) -> super::super::Foundation:: WIN32_ERROR); - unsafe { ConvertInterfaceGuidToLuid(interfaceguid, core::mem::transmute(interfaceluid)) } + unsafe { ConvertInterfaceGuidToLuid(interfaceguid, interfaceluid as _) } } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] pub unsafe fn ConvertInterfaceIndexToLuid(interfaceindex: u32, interfaceluid: *mut super::Ndis::NET_LUID_LH) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn ConvertInterfaceIndexToLuid(interfaceindex : u32, interfaceluid : *mut super::Ndis:: NET_LUID_LH) -> super::super::Foundation:: WIN32_ERROR); - unsafe { ConvertInterfaceIndexToLuid(interfaceindex, core::mem::transmute(interfaceluid)) } + unsafe { ConvertInterfaceIndexToLuid(interfaceindex, interfaceluid as _) } } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] @@ -67,13 +67,13 @@ pub unsafe fn ConvertInterfaceLuidToAlias(interfaceluid: *const super::Ndis::NET #[inline] pub unsafe fn ConvertInterfaceLuidToGuid(interfaceluid: *const super::Ndis::NET_LUID_LH, interfaceguid: *mut windows_core::GUID) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn ConvertInterfaceLuidToGuid(interfaceluid : *const super::Ndis:: NET_LUID_LH, interfaceguid : *mut windows_core::GUID) -> super::super::Foundation:: WIN32_ERROR); - unsafe { ConvertInterfaceLuidToGuid(interfaceluid, core::mem::transmute(interfaceguid)) } + unsafe { ConvertInterfaceLuidToGuid(interfaceluid, interfaceguid as _) } } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] pub unsafe fn ConvertInterfaceLuidToIndex(interfaceluid: *const super::Ndis::NET_LUID_LH, interfaceindex: *mut u32) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn ConvertInterfaceLuidToIndex(interfaceluid : *const super::Ndis:: NET_LUID_LH, interfaceindex : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { ConvertInterfaceLuidToIndex(interfaceluid, core::mem::transmute(interfaceindex)) } + unsafe { ConvertInterfaceLuidToIndex(interfaceluid, interfaceindex as _) } } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] @@ -94,7 +94,7 @@ where P0: windows_core::Param, { windows_targets::link!("iphlpapi.dll" "system" fn ConvertInterfaceNameToLuidA(interfacename : windows_core::PCSTR, interfaceluid : *mut super::Ndis:: NET_LUID_LH) -> super::super::Foundation:: WIN32_ERROR); - unsafe { ConvertInterfaceNameToLuidA(interfacename.param().abi(), core::mem::transmute(interfaceluid)) } + unsafe { ConvertInterfaceNameToLuidA(interfacename.param().abi(), interfaceluid as _) } } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] @@ -103,17 +103,17 @@ where P0: windows_core::Param, { windows_targets::link!("iphlpapi.dll" "system" fn ConvertInterfaceNameToLuidW(interfacename : windows_core::PCWSTR, interfaceluid : *mut super::Ndis:: NET_LUID_LH) -> super::super::Foundation:: WIN32_ERROR); - unsafe { ConvertInterfaceNameToLuidW(interfacename.param().abi(), core::mem::transmute(interfaceluid)) } + unsafe { ConvertInterfaceNameToLuidW(interfacename.param().abi(), interfaceluid as _) } } #[inline] pub unsafe fn ConvertIpv4MaskToLength(mask: u32, masklength: *mut u8) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn ConvertIpv4MaskToLength(mask : u32, masklength : *mut u8) -> super::super::Foundation:: WIN32_ERROR); - unsafe { ConvertIpv4MaskToLength(mask, core::mem::transmute(masklength)) } + unsafe { ConvertIpv4MaskToLength(mask, masklength as _) } } #[inline] pub unsafe fn ConvertLengthToIpv4Mask(masklength: u32, mask: *mut u32) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn ConvertLengthToIpv4Mask(masklength : u32, mask : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { ConvertLengthToIpv4Mask(masklength, core::mem::transmute(mask)) } + unsafe { ConvertLengthToIpv4Mask(masklength, mask as _) } } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] @@ -147,12 +147,12 @@ pub unsafe fn CreateIpNetEntry2(row: *const MIB_IPNET_ROW2) -> super::super::Fou #[inline] pub unsafe fn CreatePersistentTcpPortReservation(startport: u16, numberofports: u16, token: *mut u64) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn CreatePersistentTcpPortReservation(startport : u16, numberofports : u16, token : *mut u64) -> u32); - unsafe { CreatePersistentTcpPortReservation(startport, numberofports, core::mem::transmute(token)) } + unsafe { CreatePersistentTcpPortReservation(startport, numberofports, token as _) } } #[inline] pub unsafe fn CreatePersistentUdpPortReservation(startport: u16, numberofports: u16, token: *mut u64) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn CreatePersistentUdpPortReservation(startport : u16, numberofports : u16, token : *mut u64) -> u32); - unsafe { CreatePersistentUdpPortReservation(startport, numberofports, core::mem::transmute(token)) } + unsafe { CreatePersistentUdpPortReservation(startport, numberofports, token as _) } } #[inline] pub unsafe fn CreateProxyArpEntry(dwaddress: u32, dwmask: u32, dwifindex: u32) -> u32 { @@ -163,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); - unsafe { CreateSortedAddressPairs(core::mem::transmute(sourceaddresslist.unwrap_or(core::mem::zeroed())), sourceaddresscount, destinationaddresslist, destinationaddresscount, addresssortoptions, core::mem::transmute(sortedaddresspairlist), core::mem::transmute(sortedaddresspaircount)) } + unsafe { CreateSortedAddressPairs(sourceaddresslist.unwrap_or(core::mem::zeroed()) as _, sourceaddresscount, destinationaddresslist, destinationaddresscount, addresssortoptions, sortedaddresspairlist as _, sortedaddresspaircount as _) } } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] @@ -230,13 +230,13 @@ pub unsafe fn DeleteUnicastIpAddressEntry(row: *const MIB_UNICASTIPADDRESS_ROW) #[inline] pub unsafe fn DisableMediaSense(phandle: *mut super::super::Foundation::HANDLE, poverlapped: *const super::super::System::IO::OVERLAPPED) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn DisableMediaSense(phandle : *mut super::super::Foundation:: HANDLE, poverlapped : *const super::super::System::IO:: OVERLAPPED) -> u32); - unsafe { DisableMediaSense(core::mem::transmute(phandle), poverlapped) } + unsafe { DisableMediaSense(phandle as _, poverlapped) } } #[cfg(feature = "Win32_System_IO")] #[inline] pub unsafe fn EnableRouter(phandle: *mut super::super::Foundation::HANDLE, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn EnableRouter(phandle : *mut super::super::Foundation:: HANDLE, poverlapped : *mut super::super::System::IO:: OVERLAPPED) -> u32); - unsafe { EnableRouter(core::mem::transmute(phandle), core::mem::transmute(poverlapped)) } + unsafe { EnableRouter(phandle as _, poverlapped as _) } } #[inline] pub unsafe fn FlushIpNetTable(dwifindex: u32) -> u32 { @@ -258,12 +258,12 @@ pub unsafe fn FlushIpPathTable(family: super::super::Networking::WinSock::ADDRES #[inline] pub unsafe fn FreeDnsSettings(settings: *mut DNS_SETTINGS) { windows_targets::link!("iphlpapi.dll" "system" fn FreeDnsSettings(settings : *mut DNS_SETTINGS)); - unsafe { FreeDnsSettings(core::mem::transmute(settings)) } + unsafe { FreeDnsSettings(settings as _) } } #[inline] pub unsafe fn FreeInterfaceDnsSettings(settings: *mut DNS_INTERFACE_SETTINGS) { windows_targets::link!("iphlpapi.dll" "system" fn FreeInterfaceDnsSettings(settings : *mut DNS_INTERFACE_SETTINGS)); - unsafe { FreeInterfaceDnsSettings(core::mem::transmute(settings)) } + unsafe { FreeInterfaceDnsSettings(settings as _) } } #[inline] pub unsafe fn FreeMibTable(memory: *const core::ffi::c_void) { @@ -276,7 +276,7 @@ where P0: windows_core::Param, { windows_targets::link!("iphlpapi.dll" "system" fn GetAdapterIndex(adaptername : windows_core::PCWSTR, ifindex : *mut u32) -> u32); - unsafe { GetAdapterIndex(adaptername.param().abi(), core::mem::transmute(ifindex)) } + unsafe { GetAdapterIndex(adaptername.param().abi(), ifindex as _) } } #[inline] pub unsafe fn GetAdapterOrderMap() -> *mut IP_ADAPTER_ORDER_MAP { @@ -287,47 +287,47 @@ 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); - unsafe { GetAdaptersAddresses(family, flags, core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(adapteraddresses.unwrap_or(core::mem::zeroed())), core::mem::transmute(sizepointer)) } + unsafe { GetAdaptersAddresses(family, flags, reserved.unwrap_or(core::mem::zeroed()) as _, adapteraddresses.unwrap_or(core::mem::zeroed()) as _, sizepointer as _) } } #[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); - unsafe { GetAdaptersInfo(core::mem::transmute(adapterinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(sizepointer)) } + unsafe { GetAdaptersInfo(adapterinfo.unwrap_or(core::mem::zeroed()) as _, sizepointer as _) } } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] pub unsafe fn GetAnycastIpAddressEntry(row: *mut MIB_ANYCASTIPADDRESS_ROW) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn GetAnycastIpAddressEntry(row : *mut MIB_ANYCASTIPADDRESS_ROW) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetAnycastIpAddressEntry(core::mem::transmute(row)) } + unsafe { GetAnycastIpAddressEntry(row as _) } } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] pub unsafe fn GetAnycastIpAddressTable(family: super::super::Networking::WinSock::ADDRESS_FAMILY, table: *mut *mut MIB_ANYCASTIPADDRESS_TABLE) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn GetAnycastIpAddressTable(family : super::super::Networking::WinSock:: ADDRESS_FAMILY, table : *mut *mut MIB_ANYCASTIPADDRESS_TABLE) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetAnycastIpAddressTable(family, core::mem::transmute(table)) } + unsafe { GetAnycastIpAddressTable(family, table as _) } } #[inline] pub unsafe fn GetBestInterface(dwdestaddr: u32, pdwbestifindex: *mut u32) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetBestInterface(dwdestaddr : u32, pdwbestifindex : *mut u32) -> u32); - unsafe { GetBestInterface(dwdestaddr, core::mem::transmute(pdwbestifindex)) } + unsafe { GetBestInterface(dwdestaddr, pdwbestifindex as _) } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] pub unsafe fn GetBestInterfaceEx(pdestaddr: *const super::super::Networking::WinSock::SOCKADDR, pdwbestifindex: *mut u32) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetBestInterfaceEx(pdestaddr : *const super::super::Networking::WinSock:: SOCKADDR, pdwbestifindex : *mut u32) -> u32); - unsafe { GetBestInterfaceEx(pdestaddr, core::mem::transmute(pdwbestifindex)) } + unsafe { GetBestInterfaceEx(pdestaddr, pdwbestifindex as _) } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] 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); - unsafe { GetBestRoute(dwdestaddr, core::mem::transmute(dwsourceaddr.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbestroute)) } + unsafe { GetBestRoute(dwdestaddr, dwsourceaddr.unwrap_or(core::mem::zeroed()) as _, pbestroute as _) } } #[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); - unsafe { GetBestRoute2(core::mem::transmute(interfaceluid.unwrap_or(core::mem::zeroed())), interfaceindex, core::mem::transmute(sourceaddress.unwrap_or(core::mem::zeroed())), destinationaddress, addresssortoptions, core::mem::transmute(bestroute), core::mem::transmute(bestsourceaddress)) } + unsafe { GetBestRoute2(interfaceluid.unwrap_or(core::mem::zeroed()) as _, interfaceindex, sourceaddress.unwrap_or(core::mem::zeroed()) as _, destinationaddress, addresssortoptions, bestroute as _, bestsourceaddress as _) } } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] @@ -338,7 +338,7 @@ pub unsafe fn GetCurrentThreadCompartmentId() -> super::Ndis::NET_IF_COMPARTMENT #[inline] pub unsafe fn GetCurrentThreadCompartmentScope(compartmentscope: *mut u32, compartmentid: *mut u32) { windows_targets::link!("iphlpapi.dll" "system" fn GetCurrentThreadCompartmentScope(compartmentscope : *mut u32, compartmentid : *mut u32)); - unsafe { GetCurrentThreadCompartmentScope(core::mem::transmute(compartmentscope), core::mem::transmute(compartmentid)) } + unsafe { GetCurrentThreadCompartmentScope(compartmentscope as _, compartmentid as _) } } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] @@ -349,17 +349,17 @@ pub unsafe fn GetDefaultCompartmentId() -> super::Ndis::NET_IF_COMPARTMENT_ID { #[inline] pub unsafe fn GetDnsSettings(settings: *mut DNS_SETTINGS) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn GetDnsSettings(settings : *mut DNS_SETTINGS) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetDnsSettings(core::mem::transmute(settings)) } + unsafe { GetDnsSettings(settings as _) } } #[inline] pub unsafe fn GetExtendedTcpTable(ptcptable: Option<*mut core::ffi::c_void>, pdwsize: *mut u32, border: bool, ulaf: u32, tableclass: TCP_TABLE_CLASS, reserved: u32) -> u32 { 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); - unsafe { GetExtendedTcpTable(core::mem::transmute(ptcptable.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsize), border.into(), ulaf, tableclass, reserved) } + unsafe { GetExtendedTcpTable(ptcptable.unwrap_or(core::mem::zeroed()) as _, pdwsize as _, border.into(), ulaf, tableclass, reserved) } } #[inline] pub unsafe fn GetExtendedUdpTable(pudptable: Option<*mut core::ffi::c_void>, pdwsize: *mut u32, border: bool, ulaf: u32, tableclass: UDP_TABLE_CLASS, reserved: u32) -> u32 { 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); - unsafe { GetExtendedUdpTable(core::mem::transmute(pudptable.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsize), border.into(), ulaf, tableclass, reserved) } + unsafe { GetExtendedUdpTable(pudptable.unwrap_or(core::mem::zeroed()) as _, pdwsize as _, border.into(), ulaf, tableclass, reserved) } } #[inline] pub unsafe fn GetFriendlyIfIndex(ifindex: u32) -> u32 { @@ -369,175 +369,175 @@ pub unsafe fn GetFriendlyIfIndex(ifindex: u32) -> u32 { #[inline] pub unsafe fn GetIcmpStatistics(statistics: *mut MIB_ICMP) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetIcmpStatistics(statistics : *mut MIB_ICMP) -> u32); - unsafe { GetIcmpStatistics(core::mem::transmute(statistics)) } + unsafe { GetIcmpStatistics(statistics as _) } } #[inline] pub unsafe fn GetIcmpStatisticsEx(statistics: *mut MIB_ICMP_EX_XPSP1, family: u32) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetIcmpStatisticsEx(statistics : *mut MIB_ICMP_EX_XPSP1, family : u32) -> u32); - unsafe { GetIcmpStatisticsEx(core::mem::transmute(statistics), family) } + unsafe { GetIcmpStatisticsEx(statistics as _, family) } } #[inline] pub unsafe fn GetIfEntry(pifrow: *mut MIB_IFROW) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetIfEntry(pifrow : *mut MIB_IFROW) -> u32); - unsafe { GetIfEntry(core::mem::transmute(pifrow)) } + unsafe { GetIfEntry(pifrow as _) } } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] pub unsafe fn GetIfEntry2(row: *mut MIB_IF_ROW2) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn GetIfEntry2(row : *mut MIB_IF_ROW2) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetIfEntry2(core::mem::transmute(row)) } + unsafe { GetIfEntry2(row as _) } } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] pub unsafe fn GetIfEntry2Ex(level: MIB_IF_ENTRY_LEVEL, row: *mut MIB_IF_ROW2) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn GetIfEntry2Ex(level : MIB_IF_ENTRY_LEVEL, row : *mut MIB_IF_ROW2) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetIfEntry2Ex(level, core::mem::transmute(row)) } + unsafe { GetIfEntry2Ex(level, row as _) } } #[inline] pub unsafe fn GetIfStackTable(table: *mut *mut MIB_IFSTACK_TABLE) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn GetIfStackTable(table : *mut *mut MIB_IFSTACK_TABLE) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetIfStackTable(core::mem::transmute(table)) } + unsafe { GetIfStackTable(table as _) } } #[inline] pub unsafe fn GetIfTable(piftable: Option<*mut MIB_IFTABLE>, pdwsize: *mut u32, border: bool) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetIfTable(piftable : *mut MIB_IFTABLE, pdwsize : *mut u32, border : super::super::Foundation:: BOOL) -> u32); - unsafe { GetIfTable(core::mem::transmute(piftable.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsize), border.into()) } + unsafe { GetIfTable(piftable.unwrap_or(core::mem::zeroed()) as _, pdwsize as _, border.into()) } } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] pub unsafe fn GetIfTable2(table: *mut *mut MIB_IF_TABLE2) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn GetIfTable2(table : *mut *mut MIB_IF_TABLE2) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetIfTable2(core::mem::transmute(table)) } + unsafe { GetIfTable2(table as _) } } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] pub unsafe fn GetIfTable2Ex(level: MIB_IF_TABLE_LEVEL, table: *mut *mut MIB_IF_TABLE2) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn GetIfTable2Ex(level : MIB_IF_TABLE_LEVEL, table : *mut *mut MIB_IF_TABLE2) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetIfTable2Ex(level, core::mem::transmute(table)) } + unsafe { GetIfTable2Ex(level, table as _) } } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] pub unsafe fn GetInterfaceActiveTimestampCapabilities(interfaceluid: *const super::Ndis::NET_LUID_LH, timestampcapabilites: *mut INTERFACE_TIMESTAMP_CAPABILITIES) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetInterfaceActiveTimestampCapabilities(interfaceluid : *const super::Ndis:: NET_LUID_LH, timestampcapabilites : *mut INTERFACE_TIMESTAMP_CAPABILITIES) -> u32); - unsafe { GetInterfaceActiveTimestampCapabilities(interfaceluid, core::mem::transmute(timestampcapabilites)) } + unsafe { GetInterfaceActiveTimestampCapabilities(interfaceluid, timestampcapabilites as _) } } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] pub unsafe fn GetInterfaceCurrentTimestampCapabilities(interfaceluid: *const super::Ndis::NET_LUID_LH, timestampcapabilites: *mut INTERFACE_TIMESTAMP_CAPABILITIES) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetInterfaceCurrentTimestampCapabilities(interfaceluid : *const super::Ndis:: NET_LUID_LH, timestampcapabilites : *mut INTERFACE_TIMESTAMP_CAPABILITIES) -> u32); - unsafe { GetInterfaceCurrentTimestampCapabilities(interfaceluid, core::mem::transmute(timestampcapabilites)) } + unsafe { GetInterfaceCurrentTimestampCapabilities(interfaceluid, timestampcapabilites as _) } } #[inline] pub unsafe fn GetInterfaceDnsSettings(interface: windows_core::GUID, settings: *mut DNS_INTERFACE_SETTINGS) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn GetInterfaceDnsSettings(interface : windows_core::GUID, settings : *mut DNS_INTERFACE_SETTINGS) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetInterfaceDnsSettings(core::mem::transmute(interface), core::mem::transmute(settings)) } + unsafe { GetInterfaceDnsSettings(core::mem::transmute(interface), settings as _) } } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] pub unsafe fn GetInterfaceHardwareTimestampCapabilities(interfaceluid: *const super::Ndis::NET_LUID_LH, timestampcapabilites: *mut INTERFACE_TIMESTAMP_CAPABILITIES) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetInterfaceHardwareTimestampCapabilities(interfaceluid : *const super::Ndis:: NET_LUID_LH, timestampcapabilites : *mut INTERFACE_TIMESTAMP_CAPABILITIES) -> u32); - unsafe { GetInterfaceHardwareTimestampCapabilities(interfaceluid, core::mem::transmute(timestampcapabilites)) } + unsafe { GetInterfaceHardwareTimestampCapabilities(interfaceluid, timestampcapabilites as _) } } #[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); - unsafe { GetInterfaceInfo(core::mem::transmute(piftable.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwoutbuflen)) } + unsafe { GetInterfaceInfo(piftable.unwrap_or(core::mem::zeroed()) as _, dwoutbuflen as _) } } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] pub unsafe fn GetInterfaceSupportedTimestampCapabilities(interfaceluid: *const super::Ndis::NET_LUID_LH, timestampcapabilites: *mut INTERFACE_TIMESTAMP_CAPABILITIES) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetInterfaceSupportedTimestampCapabilities(interfaceluid : *const super::Ndis:: NET_LUID_LH, timestampcapabilites : *mut INTERFACE_TIMESTAMP_CAPABILITIES) -> u32); - unsafe { GetInterfaceSupportedTimestampCapabilities(interfaceluid, core::mem::transmute(timestampcapabilites)) } + unsafe { GetInterfaceSupportedTimestampCapabilities(interfaceluid, timestampcapabilites as _) } } #[inline] pub unsafe fn GetInvertedIfStackTable(table: *mut *mut MIB_INVERTEDIFSTACK_TABLE) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn GetInvertedIfStackTable(table : *mut *mut MIB_INVERTEDIFSTACK_TABLE) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetInvertedIfStackTable(core::mem::transmute(table)) } + unsafe { GetInvertedIfStackTable(table as _) } } #[inline] pub unsafe fn GetIpAddrTable(pipaddrtable: Option<*mut MIB_IPADDRTABLE>, pdwsize: *mut u32, border: bool) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetIpAddrTable(pipaddrtable : *mut MIB_IPADDRTABLE, pdwsize : *mut u32, border : super::super::Foundation:: BOOL) -> u32); - unsafe { GetIpAddrTable(core::mem::transmute(pipaddrtable.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsize), border.into()) } + unsafe { GetIpAddrTable(pipaddrtable.unwrap_or(core::mem::zeroed()) as _, pdwsize as _, border.into()) } } #[inline] 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); - unsafe { GetIpErrorString(errorcode, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(size)) } + unsafe { GetIpErrorString(errorcode, buffer.unwrap_or(core::mem::zeroed()) as _, size as _) } } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] pub unsafe fn GetIpForwardEntry2(row: *mut MIB_IPFORWARD_ROW2) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn GetIpForwardEntry2(row : *mut MIB_IPFORWARD_ROW2) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetIpForwardEntry2(core::mem::transmute(row)) } + unsafe { GetIpForwardEntry2(row as _) } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] pub unsafe fn GetIpForwardTable(pipforwardtable: Option<*mut MIB_IPFORWARDTABLE>, pdwsize: *mut u32, border: bool) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetIpForwardTable(pipforwardtable : *mut MIB_IPFORWARDTABLE, pdwsize : *mut u32, border : super::super::Foundation:: BOOL) -> u32); - unsafe { GetIpForwardTable(core::mem::transmute(pipforwardtable.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsize), border.into()) } + unsafe { GetIpForwardTable(pipforwardtable.unwrap_or(core::mem::zeroed()) as _, pdwsize as _, border.into()) } } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] pub unsafe fn GetIpForwardTable2(family: super::super::Networking::WinSock::ADDRESS_FAMILY, table: *mut *mut MIB_IPFORWARD_TABLE2) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn GetIpForwardTable2(family : super::super::Networking::WinSock:: ADDRESS_FAMILY, table : *mut *mut MIB_IPFORWARD_TABLE2) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetIpForwardTable2(family, core::mem::transmute(table)) } + unsafe { GetIpForwardTable2(family, table as _) } } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] pub unsafe fn GetIpInterfaceEntry(row: *mut MIB_IPINTERFACE_ROW) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn GetIpInterfaceEntry(row : *mut MIB_IPINTERFACE_ROW) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetIpInterfaceEntry(core::mem::transmute(row)) } + unsafe { GetIpInterfaceEntry(row as _) } } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] pub unsafe fn GetIpInterfaceTable(family: super::super::Networking::WinSock::ADDRESS_FAMILY, table: *mut *mut MIB_IPINTERFACE_TABLE) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn GetIpInterfaceTable(family : super::super::Networking::WinSock:: ADDRESS_FAMILY, table : *mut *mut MIB_IPINTERFACE_TABLE) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetIpInterfaceTable(family, core::mem::transmute(table)) } + unsafe { GetIpInterfaceTable(family, table as _) } } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] pub unsafe fn GetIpNetEntry2(row: *mut MIB_IPNET_ROW2) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn GetIpNetEntry2(row : *mut MIB_IPNET_ROW2) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetIpNetEntry2(core::mem::transmute(row)) } + unsafe { GetIpNetEntry2(row as _) } } #[inline] pub unsafe fn GetIpNetTable(ipnettable: Option<*mut MIB_IPNETTABLE>, sizepointer: *mut u32, order: bool) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetIpNetTable(ipnettable : *mut MIB_IPNETTABLE, sizepointer : *mut u32, order : super::super::Foundation:: BOOL) -> u32); - unsafe { GetIpNetTable(core::mem::transmute(ipnettable.unwrap_or(core::mem::zeroed())), core::mem::transmute(sizepointer), order.into()) } + unsafe { GetIpNetTable(ipnettable.unwrap_or(core::mem::zeroed()) as _, sizepointer as _, order.into()) } } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] pub unsafe fn GetIpNetTable2(family: super::super::Networking::WinSock::ADDRESS_FAMILY, table: *mut *mut MIB_IPNET_TABLE2) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn GetIpNetTable2(family : super::super::Networking::WinSock:: ADDRESS_FAMILY, table : *mut *mut MIB_IPNET_TABLE2) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetIpNetTable2(family, core::mem::transmute(table)) } + unsafe { GetIpNetTable2(family, table as _) } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] pub unsafe fn GetIpNetworkConnectionBandwidthEstimates(interfaceindex: u32, addressfamily: super::super::Networking::WinSock::ADDRESS_FAMILY, bandwidthestimates: *mut MIB_IP_NETWORK_CONNECTION_BANDWIDTH_ESTIMATES) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn GetIpNetworkConnectionBandwidthEstimates(interfaceindex : u32, addressfamily : super::super::Networking::WinSock:: ADDRESS_FAMILY, bandwidthestimates : *mut MIB_IP_NETWORK_CONNECTION_BANDWIDTH_ESTIMATES) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetIpNetworkConnectionBandwidthEstimates(interfaceindex, addressfamily, core::mem::transmute(bandwidthestimates)) } + unsafe { GetIpNetworkConnectionBandwidthEstimates(interfaceindex, addressfamily, bandwidthestimates as _) } } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] pub unsafe fn GetIpPathEntry(row: *mut MIB_IPPATH_ROW) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn GetIpPathEntry(row : *mut MIB_IPPATH_ROW) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetIpPathEntry(core::mem::transmute(row)) } + unsafe { GetIpPathEntry(row as _) } } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] pub unsafe fn GetIpPathTable(family: super::super::Networking::WinSock::ADDRESS_FAMILY, table: *mut *mut MIB_IPPATH_TABLE) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn GetIpPathTable(family : super::super::Networking::WinSock:: ADDRESS_FAMILY, table : *mut *mut MIB_IPPATH_TABLE) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetIpPathTable(family, core::mem::transmute(table)) } + unsafe { GetIpPathTable(family, table as _) } } #[inline] pub unsafe fn GetIpStatistics(statistics: *mut MIB_IPSTATS_LH) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetIpStatistics(statistics : *mut MIB_IPSTATS_LH) -> u32); - unsafe { GetIpStatistics(core::mem::transmute(statistics)) } + unsafe { GetIpStatistics(statistics as _) } } #[inline] pub unsafe fn GetIpStatisticsEx(statistics: *mut MIB_IPSTATS_LH, family: u32) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetIpStatisticsEx(statistics : *mut MIB_IPSTATS_LH, family : u32) -> u32); - unsafe { GetIpStatisticsEx(core::mem::transmute(statistics), family) } + unsafe { GetIpStatisticsEx(statistics as _, family) } } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] @@ -549,70 +549,70 @@ pub unsafe fn GetJobCompartmentId(jobhandle: super::super::Foundation::HANDLE) - #[inline] pub unsafe fn GetMulticastIpAddressEntry(row: *mut MIB_MULTICASTIPADDRESS_ROW) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn GetMulticastIpAddressEntry(row : *mut MIB_MULTICASTIPADDRESS_ROW) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetMulticastIpAddressEntry(core::mem::transmute(row)) } + unsafe { GetMulticastIpAddressEntry(row as _) } } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] pub unsafe fn GetMulticastIpAddressTable(family: super::super::Networking::WinSock::ADDRESS_FAMILY, table: *mut *mut MIB_MULTICASTIPADDRESS_TABLE) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn GetMulticastIpAddressTable(family : super::super::Networking::WinSock:: ADDRESS_FAMILY, table : *mut *mut MIB_MULTICASTIPADDRESS_TABLE) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetMulticastIpAddressTable(family, core::mem::transmute(table)) } + unsafe { GetMulticastIpAddressTable(family, table as _) } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] pub unsafe fn GetNetworkConnectivityHint(connectivityhint: *mut super::super::Networking::WinSock::NL_NETWORK_CONNECTIVITY_HINT) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn GetNetworkConnectivityHint(connectivityhint : *mut super::super::Networking::WinSock:: NL_NETWORK_CONNECTIVITY_HINT) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetNetworkConnectivityHint(core::mem::transmute(connectivityhint)) } + unsafe { GetNetworkConnectivityHint(connectivityhint as _) } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] pub unsafe fn GetNetworkConnectivityHintForInterface(interfaceindex: u32, connectivityhint: *mut super::super::Networking::WinSock::NL_NETWORK_CONNECTIVITY_HINT) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn GetNetworkConnectivityHintForInterface(interfaceindex : u32, connectivityhint : *mut super::super::Networking::WinSock:: NL_NETWORK_CONNECTIVITY_HINT) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetNetworkConnectivityHintForInterface(interfaceindex, core::mem::transmute(connectivityhint)) } + unsafe { GetNetworkConnectivityHintForInterface(interfaceindex, connectivityhint as _) } } #[inline] pub unsafe fn GetNetworkInformation(networkguid: *const windows_core::GUID, compartmentid: *mut u32, siteid: *mut u32, networkname: &mut [u16]) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn GetNetworkInformation(networkguid : *const windows_core::GUID, compartmentid : *mut u32, siteid : *mut u32, networkname : windows_core::PWSTR, length : u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetNetworkInformation(networkguid, core::mem::transmute(compartmentid), core::mem::transmute(siteid), core::mem::transmute(networkname.as_ptr()), networkname.len().try_into().unwrap()) } + unsafe { GetNetworkInformation(networkguid, compartmentid as _, siteid as _, core::mem::transmute(networkname.as_ptr()), networkname.len().try_into().unwrap()) } } #[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); - unsafe { GetNetworkParams(core::mem::transmute(pfixedinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(poutbuflen)) } + unsafe { GetNetworkParams(pfixedinfo.unwrap_or(core::mem::zeroed()) as _, poutbuflen as _) } } #[inline] pub unsafe fn GetNumberOfInterfaces(pdwnumif: *mut u32) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetNumberOfInterfaces(pdwnumif : *mut u32) -> u32); - unsafe { GetNumberOfInterfaces(core::mem::transmute(pdwnumif)) } + unsafe { GetNumberOfInterfaces(pdwnumif as _) } } #[inline] pub unsafe fn GetOwnerModuleFromPidAndInfo(ulpid: u32, pinfo: *const u64, class: TCPIP_OWNER_MODULE_INFO_CLASS, pbuffer: *mut core::ffi::c_void, pdwsize: *mut u32) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetOwnerModuleFromPidAndInfo(ulpid : u32, pinfo : *const u64, class : TCPIP_OWNER_MODULE_INFO_CLASS, pbuffer : *mut core::ffi::c_void, pdwsize : *mut u32) -> u32); - unsafe { GetOwnerModuleFromPidAndInfo(ulpid, pinfo, class, core::mem::transmute(pbuffer), core::mem::transmute(pdwsize)) } + unsafe { GetOwnerModuleFromPidAndInfo(ulpid, pinfo, class, pbuffer as _, pdwsize as _) } } #[inline] pub unsafe fn GetOwnerModuleFromTcp6Entry(ptcpentry: *const MIB_TCP6ROW_OWNER_MODULE, class: TCPIP_OWNER_MODULE_INFO_CLASS, pbuffer: *mut core::ffi::c_void, pdwsize: *mut u32) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetOwnerModuleFromTcp6Entry(ptcpentry : *const MIB_TCP6ROW_OWNER_MODULE, class : TCPIP_OWNER_MODULE_INFO_CLASS, pbuffer : *mut core::ffi::c_void, pdwsize : *mut u32) -> u32); - unsafe { GetOwnerModuleFromTcp6Entry(ptcpentry, class, core::mem::transmute(pbuffer), core::mem::transmute(pdwsize)) } + unsafe { GetOwnerModuleFromTcp6Entry(ptcpentry, class, pbuffer as _, pdwsize as _) } } #[inline] pub unsafe fn GetOwnerModuleFromTcpEntry(ptcpentry: *const MIB_TCPROW_OWNER_MODULE, class: TCPIP_OWNER_MODULE_INFO_CLASS, pbuffer: *mut core::ffi::c_void, pdwsize: *mut u32) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetOwnerModuleFromTcpEntry(ptcpentry : *const MIB_TCPROW_OWNER_MODULE, class : TCPIP_OWNER_MODULE_INFO_CLASS, pbuffer : *mut core::ffi::c_void, pdwsize : *mut u32) -> u32); - unsafe { GetOwnerModuleFromTcpEntry(ptcpentry, class, core::mem::transmute(pbuffer), core::mem::transmute(pdwsize)) } + unsafe { GetOwnerModuleFromTcpEntry(ptcpentry, class, pbuffer as _, pdwsize as _) } } #[inline] pub unsafe fn GetOwnerModuleFromUdp6Entry(pudpentry: *const MIB_UDP6ROW_OWNER_MODULE, class: TCPIP_OWNER_MODULE_INFO_CLASS, pbuffer: *mut core::ffi::c_void, pdwsize: *mut u32) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetOwnerModuleFromUdp6Entry(pudpentry : *const MIB_UDP6ROW_OWNER_MODULE, class : TCPIP_OWNER_MODULE_INFO_CLASS, pbuffer : *mut core::ffi::c_void, pdwsize : *mut u32) -> u32); - unsafe { GetOwnerModuleFromUdp6Entry(pudpentry, class, core::mem::transmute(pbuffer), core::mem::transmute(pdwsize)) } + unsafe { GetOwnerModuleFromUdp6Entry(pudpentry, class, pbuffer as _, pdwsize as _) } } #[inline] pub unsafe fn GetOwnerModuleFromUdpEntry(pudpentry: *const MIB_UDPROW_OWNER_MODULE, class: TCPIP_OWNER_MODULE_INFO_CLASS, pbuffer: *mut core::ffi::c_void, pdwsize: *mut u32) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetOwnerModuleFromUdpEntry(pudpentry : *const MIB_UDPROW_OWNER_MODULE, class : TCPIP_OWNER_MODULE_INFO_CLASS, pbuffer : *mut core::ffi::c_void, pdwsize : *mut u32) -> u32); - unsafe { GetOwnerModuleFromUdpEntry(pudpentry, class, core::mem::transmute(pbuffer), core::mem::transmute(pdwsize)) } + unsafe { GetOwnerModuleFromUdpEntry(pudpentry, class, pbuffer as _, pdwsize as _) } } #[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); - unsafe { GetPerAdapterInfo(ifindex, core::mem::transmute(pperadapterinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(poutbuflen)) } + unsafe { GetPerAdapterInfo(ifindex, pperadapterinfo.unwrap_or(core::mem::zeroed()) as _, poutbuflen as _) } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -656,7 +656,7 @@ pub unsafe fn GetPerTcpConnectionEStats(row: *const MIB_TCPROW_LH, estatstype: T #[inline] pub unsafe fn GetRTTAndHopCount(destipaddress: u32, hopcount: *mut u32, maxhops: u32, rtt: *mut u32) -> windows_core::Result<()> { windows_targets::link!("iphlpapi.dll" "system" fn GetRTTAndHopCount(destipaddress : u32, hopcount : *mut u32, maxhops : u32, rtt : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetRTTAndHopCount(destipaddress, core::mem::transmute(hopcount), maxhops, core::mem::transmute(rtt)).ok() } + unsafe { GetRTTAndHopCount(destipaddress, hopcount as _, maxhops, rtt as _).ok() } } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] @@ -668,86 +668,86 @@ pub unsafe fn GetSessionCompartmentId(sessionid: u32) -> super::Ndis::NET_IF_COM #[inline] pub unsafe fn GetTcp6Table(tcptable: *mut MIB_TCP6TABLE, sizepointer: *mut u32, order: bool) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetTcp6Table(tcptable : *mut MIB_TCP6TABLE, sizepointer : *mut u32, order : super::super::Foundation:: BOOL) -> u32); - unsafe { GetTcp6Table(core::mem::transmute(tcptable), core::mem::transmute(sizepointer), order.into()) } + unsafe { GetTcp6Table(tcptable as _, sizepointer as _, order.into()) } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] pub unsafe fn GetTcp6Table2(tcptable: *mut MIB_TCP6TABLE2, sizepointer: *mut u32, order: bool) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetTcp6Table2(tcptable : *mut MIB_TCP6TABLE2, sizepointer : *mut u32, order : super::super::Foundation:: BOOL) -> u32); - unsafe { GetTcp6Table2(core::mem::transmute(tcptable), core::mem::transmute(sizepointer), order.into()) } + unsafe { GetTcp6Table2(tcptable as _, sizepointer as _, order.into()) } } #[inline] pub unsafe fn GetTcpStatistics(statistics: *mut MIB_TCPSTATS_LH) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetTcpStatistics(statistics : *mut MIB_TCPSTATS_LH) -> u32); - unsafe { GetTcpStatistics(core::mem::transmute(statistics)) } + unsafe { GetTcpStatistics(statistics as _) } } #[inline] pub unsafe fn GetTcpStatisticsEx(statistics: *mut MIB_TCPSTATS_LH, family: u32) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetTcpStatisticsEx(statistics : *mut MIB_TCPSTATS_LH, family : u32) -> u32); - unsafe { GetTcpStatisticsEx(core::mem::transmute(statistics), family) } + unsafe { GetTcpStatisticsEx(statistics as _, family) } } #[inline] pub unsafe fn GetTcpStatisticsEx2(statistics: *mut MIB_TCPSTATS2, family: u32) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetTcpStatisticsEx2(statistics : *mut MIB_TCPSTATS2, family : u32) -> u32); - unsafe { GetTcpStatisticsEx2(core::mem::transmute(statistics), family) } + unsafe { GetTcpStatisticsEx2(statistics as _, family) } } #[inline] pub unsafe fn GetTcpTable(tcptable: Option<*mut MIB_TCPTABLE>, sizepointer: *mut u32, order: bool) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetTcpTable(tcptable : *mut MIB_TCPTABLE, sizepointer : *mut u32, order : super::super::Foundation:: BOOL) -> u32); - unsafe { GetTcpTable(core::mem::transmute(tcptable.unwrap_or(core::mem::zeroed())), core::mem::transmute(sizepointer), order.into()) } + unsafe { GetTcpTable(tcptable.unwrap_or(core::mem::zeroed()) as _, sizepointer as _, order.into()) } } #[inline] pub unsafe fn GetTcpTable2(tcptable: Option<*mut MIB_TCPTABLE2>, sizepointer: *mut u32, order: bool) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetTcpTable2(tcptable : *mut MIB_TCPTABLE2, sizepointer : *mut u32, order : super::super::Foundation:: BOOL) -> u32); - unsafe { GetTcpTable2(core::mem::transmute(tcptable.unwrap_or(core::mem::zeroed())), core::mem::transmute(sizepointer), order.into()) } + unsafe { GetTcpTable2(tcptable.unwrap_or(core::mem::zeroed()) as _, sizepointer as _, order.into()) } } #[inline] pub unsafe fn GetTeredoPort(port: *mut u16) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn GetTeredoPort(port : *mut u16) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetTeredoPort(core::mem::transmute(port)) } + unsafe { GetTeredoPort(port as _) } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] pub unsafe fn GetUdp6Table(udp6table: Option<*mut MIB_UDP6TABLE>, sizepointer: *mut u32, order: bool) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetUdp6Table(udp6table : *mut MIB_UDP6TABLE, sizepointer : *mut u32, order : super::super::Foundation:: BOOL) -> u32); - unsafe { GetUdp6Table(core::mem::transmute(udp6table.unwrap_or(core::mem::zeroed())), core::mem::transmute(sizepointer), order.into()) } + unsafe { GetUdp6Table(udp6table.unwrap_or(core::mem::zeroed()) as _, sizepointer as _, order.into()) } } #[inline] pub unsafe fn GetUdpStatistics(stats: *mut MIB_UDPSTATS) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetUdpStatistics(stats : *mut MIB_UDPSTATS) -> u32); - unsafe { GetUdpStatistics(core::mem::transmute(stats)) } + unsafe { GetUdpStatistics(stats as _) } } #[inline] pub unsafe fn GetUdpStatisticsEx(statistics: *mut MIB_UDPSTATS, family: u32) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetUdpStatisticsEx(statistics : *mut MIB_UDPSTATS, family : u32) -> u32); - unsafe { GetUdpStatisticsEx(core::mem::transmute(statistics), family) } + unsafe { GetUdpStatisticsEx(statistics as _, family) } } #[inline] pub unsafe fn GetUdpStatisticsEx2(statistics: *mut MIB_UDPSTATS2, family: u32) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetUdpStatisticsEx2(statistics : *mut MIB_UDPSTATS2, family : u32) -> u32); - unsafe { GetUdpStatisticsEx2(core::mem::transmute(statistics), family) } + unsafe { GetUdpStatisticsEx2(statistics as _, family) } } #[inline] pub unsafe fn GetUdpTable(udptable: Option<*mut MIB_UDPTABLE>, sizepointer: *mut u32, order: bool) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetUdpTable(udptable : *mut MIB_UDPTABLE, sizepointer : *mut u32, order : super::super::Foundation:: BOOL) -> u32); - unsafe { GetUdpTable(core::mem::transmute(udptable.unwrap_or(core::mem::zeroed())), core::mem::transmute(sizepointer), order.into()) } + unsafe { GetUdpTable(udptable.unwrap_or(core::mem::zeroed()) as _, sizepointer as _, order.into()) } } #[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); - unsafe { GetUniDirectionalAdapterInfo(core::mem::transmute(pipifinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwoutbuflen)) } + unsafe { GetUniDirectionalAdapterInfo(pipifinfo.unwrap_or(core::mem::zeroed()) as _, dwoutbuflen as _) } } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] pub unsafe fn GetUnicastIpAddressEntry(row: *mut MIB_UNICASTIPADDRESS_ROW) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn GetUnicastIpAddressEntry(row : *mut MIB_UNICASTIPADDRESS_ROW) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetUnicastIpAddressEntry(core::mem::transmute(row)) } + unsafe { GetUnicastIpAddressEntry(row as _) } } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] pub unsafe fn GetUnicastIpAddressTable(family: super::super::Networking::WinSock::ADDRESS_FAMILY, table: *mut *mut MIB_UNICASTIPADDRESS_TABLE) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn GetUnicastIpAddressTable(family : super::super::Networking::WinSock:: ADDRESS_FAMILY, table : *mut *mut MIB_UNICASTIPADDRESS_TABLE) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetUnicastIpAddressTable(family, core::mem::transmute(table)) } + unsafe { GetUnicastIpAddressTable(family, table as _) } } #[inline] pub unsafe fn Icmp6CreateFile() -> windows_core::Result { @@ -758,13 +758,13 @@ pub unsafe fn Icmp6CreateFile() -> windows_core::Result u32 { windows_targets::link!("iphlpapi.dll" "system" fn Icmp6ParseReplies(replybuffer : *mut core::ffi::c_void, replysize : u32) -> u32); - unsafe { Icmp6ParseReplies(core::mem::transmute(replybuffer), replysize) } + unsafe { Icmp6ParseReplies(replybuffer as _, replysize) } } #[cfg(all(feature = "Win32_Networking_WinSock", feature = "Win32_System_IO"))] #[inline] 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); - unsafe { Icmp6SendEcho2(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())), sourceaddress, destinationaddress, requestdata, requestsize, core::mem::transmute(requestoptions.unwrap_or(core::mem::zeroed())), core::mem::transmute(replybuffer), replysize, timeout) } + unsafe { Icmp6SendEcho2(icmphandle, event.unwrap_or(core::mem::zeroed()) as _, apcroutine.unwrap_or(core::mem::zeroed()) as _, apccontext.unwrap_or(core::mem::zeroed()) as _, sourceaddress, destinationaddress, requestdata, requestsize, requestoptions.unwrap_or(core::mem::zeroed()) as _, replybuffer as _, replysize, timeout) } } #[inline] pub unsafe fn IcmpCloseHandle(icmphandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -780,42 +780,42 @@ pub unsafe fn IcmpCreateFile() -> windows_core::Result u32 { windows_targets::link!("iphlpapi.dll" "system" fn IcmpParseReplies(replybuffer : *mut core::ffi::c_void, replysize : u32) -> u32); - unsafe { IcmpParseReplies(core::mem::transmute(replybuffer), replysize) } + unsafe { IcmpParseReplies(replybuffer as _, replysize) } } #[inline] 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); - unsafe { IcmpSendEcho(icmphandle, destinationaddress, requestdata, requestsize, core::mem::transmute(requestoptions.unwrap_or(core::mem::zeroed())), core::mem::transmute(replybuffer), replysize, timeout) } + unsafe { IcmpSendEcho(icmphandle, destinationaddress, requestdata, requestsize, requestoptions.unwrap_or(core::mem::zeroed()) as _, replybuffer as _, replysize, timeout) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { IcmpSendEcho2(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())), destinationaddress, requestdata, requestsize, core::mem::transmute(requestoptions.unwrap_or(core::mem::zeroed())), core::mem::transmute(replybuffer), replysize, timeout) } + unsafe { IcmpSendEcho2(icmphandle, event.unwrap_or(core::mem::zeroed()) as _, apcroutine.unwrap_or(core::mem::zeroed()) as _, apccontext.unwrap_or(core::mem::zeroed()) as _, destinationaddress, requestdata, requestsize, requestoptions.unwrap_or(core::mem::zeroed()) as _, replybuffer as _, replysize, timeout) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { IcmpSendEcho2Ex(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())), sourceaddress, destinationaddress, requestdata, requestsize, core::mem::transmute(requestoptions.unwrap_or(core::mem::zeroed())), core::mem::transmute(replybuffer), replysize, timeout) } + unsafe { IcmpSendEcho2Ex(icmphandle, event.unwrap_or(core::mem::zeroed()) as _, apcroutine.unwrap_or(core::mem::zeroed()) as _, apccontext.unwrap_or(core::mem::zeroed()) as _, sourceaddress, destinationaddress, requestdata, requestsize, requestoptions.unwrap_or(core::mem::zeroed()) as _, replybuffer as _, replysize, timeout) } } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] pub unsafe fn InitializeIpForwardEntry(row: *mut MIB_IPFORWARD_ROW2) { windows_targets::link!("iphlpapi.dll" "system" fn InitializeIpForwardEntry(row : *mut MIB_IPFORWARD_ROW2)); - unsafe { InitializeIpForwardEntry(core::mem::transmute(row)) } + unsafe { InitializeIpForwardEntry(row as _) } } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] pub unsafe fn InitializeIpInterfaceEntry(row: *mut MIB_IPINTERFACE_ROW) { windows_targets::link!("iphlpapi.dll" "system" fn InitializeIpInterfaceEntry(row : *mut MIB_IPINTERFACE_ROW)); - unsafe { InitializeIpInterfaceEntry(core::mem::transmute(row)) } + unsafe { InitializeIpInterfaceEntry(row as _) } } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] pub unsafe fn InitializeUnicastIpAddressEntry(row: *mut MIB_UNICASTIPADDRESS_ROW) { windows_targets::link!("iphlpapi.dll" "system" fn InitializeUnicastIpAddressEntry(row : *mut MIB_UNICASTIPADDRESS_ROW)); - unsafe { InitializeUnicastIpAddressEntry(core::mem::transmute(row)) } + unsafe { InitializeUnicastIpAddressEntry(row as _) } } #[inline] pub unsafe fn IpReleaseAddress(adapterinfo: *const IP_ADAPTER_INDEX_MAP) -> u32 { @@ -830,69 +830,69 @@ pub unsafe fn IpRenewAddress(adapterinfo: *const IP_ADAPTER_INDEX_MAP) -> u32 { #[inline] pub unsafe fn LookupPersistentTcpPortReservation(startport: u16, numberofports: u16, token: *mut u64) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn LookupPersistentTcpPortReservation(startport : u16, numberofports : u16, token : *mut u64) -> u32); - unsafe { LookupPersistentTcpPortReservation(startport, numberofports, core::mem::transmute(token)) } + unsafe { LookupPersistentTcpPortReservation(startport, numberofports, token as _) } } #[inline] pub unsafe fn LookupPersistentUdpPortReservation(startport: u16, numberofports: u16, token: *mut u64) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn LookupPersistentUdpPortReservation(startport : u16, numberofports : u16, token : *mut u64) -> u32); - unsafe { LookupPersistentUdpPortReservation(startport, numberofports, core::mem::transmute(token)) } + unsafe { LookupPersistentUdpPortReservation(startport, numberofports, token as _) } } #[inline] pub unsafe fn NhpAllocateAndGetInterfaceInfoFromStack(pptable: *mut *mut IP_INTERFACE_NAME_INFO_W2KSP1, pdwcount: *mut u32, border: bool, hheap: super::super::Foundation::HANDLE, dwflags: u32) -> u32 { 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); - unsafe { NhpAllocateAndGetInterfaceInfoFromStack(core::mem::transmute(pptable), core::mem::transmute(pdwcount), border.into(), hheap, dwflags) } + unsafe { NhpAllocateAndGetInterfaceInfoFromStack(pptable as _, pdwcount as _, border.into(), hheap, dwflags) } } #[cfg(feature = "Win32_System_IO")] #[inline] pub unsafe fn NotifyAddrChange(handle: *mut super::super::Foundation::HANDLE, overlapped: *const super::super::System::IO::OVERLAPPED) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn NotifyAddrChange(handle : *mut super::super::Foundation:: HANDLE, overlapped : *const super::super::System::IO:: OVERLAPPED) -> u32); - unsafe { NotifyAddrChange(core::mem::transmute(handle), overlapped) } + unsafe { NotifyAddrChange(handle as _, overlapped) } } #[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); - unsafe { NotifyIfTimestampConfigChange(core::mem::transmute(callercontext.unwrap_or(core::mem::zeroed())), callback, core::mem::transmute(notificationhandle)) } + unsafe { NotifyIfTimestampConfigChange(callercontext.unwrap_or(core::mem::zeroed()) as _, callback, notificationhandle as _) } } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] pub unsafe fn NotifyIpInterfaceChange(family: super::super::Networking::WinSock::ADDRESS_FAMILY, callback: PIPINTERFACE_CHANGE_CALLBACK, callercontext: Option<*const core::ffi::c_void>, initialnotification: bool, notificationhandle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR { 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 : bool, notificationhandle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: WIN32_ERROR); - unsafe { NotifyIpInterfaceChange(family, callback, core::mem::transmute(callercontext.unwrap_or(core::mem::zeroed())), initialnotification, core::mem::transmute(notificationhandle)) } + unsafe { NotifyIpInterfaceChange(family, callback, callercontext.unwrap_or(core::mem::zeroed()) as _, initialnotification, notificationhandle as _) } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] pub unsafe fn NotifyNetworkConnectivityHintChange(callback: PNETWORK_CONNECTIVITY_HINT_CHANGE_CALLBACK, callercontext: Option<*const core::ffi::c_void>, initialnotification: bool, notificationhandle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn NotifyNetworkConnectivityHintChange(callback : PNETWORK_CONNECTIVITY_HINT_CHANGE_CALLBACK, callercontext : *const core::ffi::c_void, initialnotification : bool, notificationhandle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: WIN32_ERROR); - unsafe { NotifyNetworkConnectivityHintChange(callback, core::mem::transmute(callercontext.unwrap_or(core::mem::zeroed())), initialnotification, core::mem::transmute(notificationhandle)) } + unsafe { NotifyNetworkConnectivityHintChange(callback, callercontext.unwrap_or(core::mem::zeroed()) as _, initialnotification, notificationhandle as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] pub unsafe fn NotifyRouteChange(handle: *mut super::super::Foundation::HANDLE, overlapped: *const super::super::System::IO::OVERLAPPED) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn NotifyRouteChange(handle : *mut super::super::Foundation:: HANDLE, overlapped : *const super::super::System::IO:: OVERLAPPED) -> u32); - unsafe { NotifyRouteChange(core::mem::transmute(handle), overlapped) } + unsafe { NotifyRouteChange(handle as _, overlapped) } } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] pub unsafe fn NotifyRouteChange2(addressfamily: super::super::Networking::WinSock::ADDRESS_FAMILY, callback: PIPFORWARD_CHANGE_CALLBACK, callercontext: *const core::ffi::c_void, initialnotification: bool, notificationhandle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn NotifyRouteChange2(addressfamily : super::super::Networking::WinSock:: ADDRESS_FAMILY, callback : PIPFORWARD_CHANGE_CALLBACK, callercontext : *const core::ffi::c_void, initialnotification : bool, notificationhandle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: WIN32_ERROR); - unsafe { NotifyRouteChange2(addressfamily, callback, callercontext, initialnotification, core::mem::transmute(notificationhandle)) } + unsafe { NotifyRouteChange2(addressfamily, callback, callercontext, initialnotification, notificationhandle as _) } } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] pub unsafe fn NotifyStableUnicastIpAddressTable(family: super::super::Networking::WinSock::ADDRESS_FAMILY, table: *mut *mut MIB_UNICASTIPADDRESS_TABLE, callercallback: PSTABLE_UNICAST_IPADDRESS_TABLE_CALLBACK, callercontext: *const core::ffi::c_void, notificationhandle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn NotifyStableUnicastIpAddressTable(family : super::super::Networking::WinSock:: ADDRESS_FAMILY, table : *mut *mut MIB_UNICASTIPADDRESS_TABLE, callercallback : PSTABLE_UNICAST_IPADDRESS_TABLE_CALLBACK, callercontext : *const core::ffi::c_void, notificationhandle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: WIN32_ERROR); - unsafe { NotifyStableUnicastIpAddressTable(family, core::mem::transmute(table), callercallback, callercontext, core::mem::transmute(notificationhandle)) } + unsafe { NotifyStableUnicastIpAddressTable(family, table as _, callercallback, callercontext, notificationhandle as _) } } #[inline] pub unsafe fn NotifyTeredoPortChange(callback: PTEREDO_PORT_CHANGE_CALLBACK, callercontext: *const core::ffi::c_void, initialnotification: bool, notificationhandle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn NotifyTeredoPortChange(callback : PTEREDO_PORT_CHANGE_CALLBACK, callercontext : *const core::ffi::c_void, initialnotification : bool, notificationhandle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: WIN32_ERROR); - unsafe { NotifyTeredoPortChange(callback, callercontext, initialnotification, core::mem::transmute(notificationhandle)) } + unsafe { NotifyTeredoPortChange(callback, callercontext, initialnotification, notificationhandle as _) } } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] pub unsafe fn NotifyUnicastIpAddressChange(family: super::super::Networking::WinSock::ADDRESS_FAMILY, callback: PUNICAST_IPADDRESS_CHANGE_CALLBACK, callercontext: Option<*const core::ffi::c_void>, initialnotification: bool, notificationhandle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR { 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 : bool, notificationhandle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: WIN32_ERROR); - unsafe { NotifyUnicastIpAddressChange(family, callback, core::mem::transmute(callercontext.unwrap_or(core::mem::zeroed())), initialnotification, core::mem::transmute(notificationhandle)) } + unsafe { NotifyUnicastIpAddressChange(family, callback, callercontext.unwrap_or(core::mem::zeroed()) as _, initialnotification, notificationhandle as _) } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -901,37 +901,37 @@ 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); - unsafe { ParseNetworkString(networkstring.param().abi(), 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()))) } + unsafe { ParseNetworkString(networkstring.param().abi(), types, addressinfo.unwrap_or(core::mem::zeroed()) as _, portnumber.unwrap_or(core::mem::zeroed()) as _, prefixlength.unwrap_or(core::mem::zeroed()) as _) } } #[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 { windows_targets::link!("iphlpapi.dll" "system" 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); - unsafe { PfAddFiltersToInterface(core::mem::transmute(ih), cinfilters, core::mem::transmute(pfiltin), coutfilters, core::mem::transmute(pfiltout), core::mem::transmute(pfhandle)) } + unsafe { PfAddFiltersToInterface(ih as _, cinfilters, pfiltin as _, coutfilters, pfiltout as _, pfhandle as _) } } #[inline] pub unsafe fn PfAddGlobalFilterToInterface(pinterface: *mut core::ffi::c_void, gffilter: GLOBAL_FILTER) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn PfAddGlobalFilterToInterface(pinterface : *mut core::ffi::c_void, gffilter : GLOBAL_FILTER) -> u32); - unsafe { PfAddGlobalFilterToInterface(core::mem::transmute(pinterface), gffilter) } + unsafe { PfAddGlobalFilterToInterface(pinterface as _, gffilter) } } #[inline] pub unsafe fn PfBindInterfaceToIPAddress(pinterface: *mut core::ffi::c_void, pfattype: PFADDRESSTYPE, ipaddress: *mut u8) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn PfBindInterfaceToIPAddress(pinterface : *mut core::ffi::c_void, pfattype : PFADDRESSTYPE, ipaddress : *mut u8) -> u32); - unsafe { PfBindInterfaceToIPAddress(core::mem::transmute(pinterface), pfattype, core::mem::transmute(ipaddress)) } + unsafe { PfBindInterfaceToIPAddress(pinterface as _, pfattype, ipaddress as _) } } #[inline] pub unsafe fn PfBindInterfaceToIndex(pinterface: *mut core::ffi::c_void, dwindex: u32, pfatlinktype: PFADDRESSTYPE, linkipaddress: *mut u8) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn PfBindInterfaceToIndex(pinterface : *mut core::ffi::c_void, dwindex : u32, pfatlinktype : PFADDRESSTYPE, linkipaddress : *mut u8) -> u32); - unsafe { PfBindInterfaceToIndex(core::mem::transmute(pinterface), dwindex, pfatlinktype, core::mem::transmute(linkipaddress)) } + unsafe { PfBindInterfaceToIndex(pinterface as _, dwindex, pfatlinktype, linkipaddress as _) } } #[inline] pub unsafe fn PfCreateInterface(dwname: u32, inaction: PFFORWARD_ACTION, outaction: PFFORWARD_ACTION, buselog: bool, bmustbeunique: bool, ppinterface: *mut *mut core::ffi::c_void) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn PfCreateInterface(dwname : u32, inaction : PFFORWARD_ACTION, outaction : PFFORWARD_ACTION, buselog : super::super::Foundation:: BOOL, bmustbeunique : super::super::Foundation:: BOOL, ppinterface : *mut *mut core::ffi::c_void) -> u32); - unsafe { PfCreateInterface(dwname, inaction, outaction, buselog.into(), bmustbeunique.into(), core::mem::transmute(ppinterface)) } + unsafe { PfCreateInterface(dwname, inaction, outaction, buselog.into(), bmustbeunique.into(), ppinterface as _) } } #[inline] pub unsafe fn PfDeleteInterface(pinterface: *mut core::ffi::c_void) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn PfDeleteInterface(pinterface : *mut core::ffi::c_void) -> u32); - unsafe { PfDeleteInterface(core::mem::transmute(pinterface)) } + unsafe { PfDeleteInterface(pinterface as _) } } #[inline] pub unsafe fn PfDeleteLog() -> u32 { @@ -941,7 +941,7 @@ pub unsafe fn PfDeleteLog() -> u32 { #[inline] pub unsafe fn PfGetInterfaceStatistics(pinterface: *mut core::ffi::c_void, ppfstats: *mut PF_INTERFACE_STATS, pdwbuffersize: *mut u32, fresetcounters: bool) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn PfGetInterfaceStatistics(pinterface : *mut core::ffi::c_void, ppfstats : *mut PF_INTERFACE_STATS, pdwbuffersize : *mut u32, fresetcounters : super::super::Foundation:: BOOL) -> u32); - unsafe { PfGetInterfaceStatistics(core::mem::transmute(pinterface), core::mem::transmute(ppfstats), core::mem::transmute(pdwbuffersize), fresetcounters.into()) } + unsafe { PfGetInterfaceStatistics(pinterface as _, ppfstats as _, pdwbuffersize as _, fresetcounters.into()) } } #[inline] pub unsafe fn PfMakeLog(hevent: super::super::Foundation::HANDLE) -> u32 { @@ -951,65 +951,65 @@ pub unsafe fn PfMakeLog(hevent: super::super::Foundation::HANDLE) -> u32 { #[inline] pub unsafe fn PfRebindFilters(pinterface: *mut core::ffi::c_void, platebindinfo: *mut PF_LATEBIND_INFO) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn PfRebindFilters(pinterface : *mut core::ffi::c_void, platebindinfo : *mut PF_LATEBIND_INFO) -> u32); - unsafe { PfRebindFilters(core::mem::transmute(pinterface), core::mem::transmute(platebindinfo)) } + unsafe { PfRebindFilters(pinterface as _, platebindinfo as _) } } #[inline] pub unsafe fn PfRemoveFilterHandles(pinterface: *mut core::ffi::c_void, cfilters: u32, pvhandles: *mut *mut core::ffi::c_void) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn PfRemoveFilterHandles(pinterface : *mut core::ffi::c_void, cfilters : u32, pvhandles : *mut *mut core::ffi::c_void) -> u32); - unsafe { PfRemoveFilterHandles(core::mem::transmute(pinterface), cfilters, core::mem::transmute(pvhandles)) } + unsafe { PfRemoveFilterHandles(pinterface as _, cfilters, pvhandles as _) } } #[inline] pub unsafe fn PfRemoveFiltersFromInterface(ih: *mut core::ffi::c_void, cinfilters: u32, pfiltin: *mut PF_FILTER_DESCRIPTOR, coutfilters: u32, pfiltout: *mut PF_FILTER_DESCRIPTOR) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn PfRemoveFiltersFromInterface(ih : *mut core::ffi::c_void, cinfilters : u32, pfiltin : *mut PF_FILTER_DESCRIPTOR, coutfilters : u32, pfiltout : *mut PF_FILTER_DESCRIPTOR) -> u32); - unsafe { PfRemoveFiltersFromInterface(core::mem::transmute(ih), cinfilters, core::mem::transmute(pfiltin), coutfilters, core::mem::transmute(pfiltout)) } + unsafe { PfRemoveFiltersFromInterface(ih as _, cinfilters, pfiltin as _, coutfilters, pfiltout as _) } } #[inline] pub unsafe fn PfRemoveGlobalFilterFromInterface(pinterface: *mut core::ffi::c_void, gffilter: GLOBAL_FILTER) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn PfRemoveGlobalFilterFromInterface(pinterface : *mut core::ffi::c_void, gffilter : GLOBAL_FILTER) -> u32); - unsafe { PfRemoveGlobalFilterFromInterface(core::mem::transmute(pinterface), gffilter) } + unsafe { PfRemoveGlobalFilterFromInterface(pinterface as _, gffilter) } } #[inline] pub unsafe fn PfSetLogBuffer(pbbuffer: *mut u8, dwsize: u32, dwthreshold: u32, dwentries: u32, pdwloggedentries: *mut u32, pdwlostentries: *mut u32, pdwsizeused: *mut u32) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn PfSetLogBuffer(pbbuffer : *mut u8, dwsize : u32, dwthreshold : u32, dwentries : u32, pdwloggedentries : *mut u32, pdwlostentries : *mut u32, pdwsizeused : *mut u32) -> u32); - unsafe { PfSetLogBuffer(core::mem::transmute(pbbuffer), dwsize, dwthreshold, dwentries, core::mem::transmute(pdwloggedentries), core::mem::transmute(pdwlostentries), core::mem::transmute(pdwsizeused)) } + unsafe { PfSetLogBuffer(pbbuffer as _, dwsize, dwthreshold, dwentries, pdwloggedentries as _, pdwlostentries as _, pdwsizeused as _) } } #[inline] pub unsafe fn PfTestPacket(pininterface: *mut core::ffi::c_void, poutinterface: *mut core::ffi::c_void, cbytes: u32, pbpacket: *mut u8, ppaction: *mut PFFORWARD_ACTION) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn PfTestPacket(pininterface : *mut core::ffi::c_void, poutinterface : *mut core::ffi::c_void, cbytes : u32, pbpacket : *mut u8, ppaction : *mut PFFORWARD_ACTION) -> u32); - unsafe { PfTestPacket(core::mem::transmute(pininterface), core::mem::transmute(poutinterface), cbytes, core::mem::transmute(pbpacket), core::mem::transmute(ppaction)) } + unsafe { PfTestPacket(pininterface as _, poutinterface as _, cbytes, pbpacket as _, ppaction as _) } } #[inline] pub unsafe fn PfUnBindInterface(pinterface: *mut core::ffi::c_void) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn PfUnBindInterface(pinterface : *mut core::ffi::c_void) -> u32); - unsafe { PfUnBindInterface(core::mem::transmute(pinterface)) } + unsafe { PfUnBindInterface(pinterface as _) } } #[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); - unsafe { RegisterInterfaceTimestampConfigChange(callback, core::mem::transmute(callercontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(notificationhandle)) } + unsafe { RegisterInterfaceTimestampConfigChange(callback, callercontext.unwrap_or(core::mem::zeroed()) as _, notificationhandle as _) } } #[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); - unsafe { ResolveIpNetEntry2(core::mem::transmute(row), core::mem::transmute(sourceaddress.unwrap_or(core::mem::zeroed()))) } + unsafe { ResolveIpNetEntry2(row as _, sourceaddress.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] pub unsafe fn ResolveNeighbor(networkaddress: *const super::super::Networking::WinSock::SOCKADDR, physicaladdress: *mut core::ffi::c_void, physicaladdresslength: *mut u32) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn ResolveNeighbor(networkaddress : *const super::super::Networking::WinSock:: SOCKADDR, physicaladdress : *mut core::ffi::c_void, physicaladdresslength : *mut u32) -> u32); - unsafe { ResolveNeighbor(networkaddress, core::mem::transmute(physicaladdress), core::mem::transmute(physicaladdresslength)) } + unsafe { ResolveNeighbor(networkaddress, physicaladdress as _, physicaladdresslength as _) } } #[cfg(feature = "Win32_System_IO")] #[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); - unsafe { RestoreMediaSense(poverlapped, core::mem::transmute(lpdwenablecount.unwrap_or(core::mem::zeroed()))) } + unsafe { RestoreMediaSense(poverlapped, lpdwenablecount.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SendARP(destip: u32, srcip: u32, pmacaddr: *mut core::ffi::c_void, phyaddrlen: *mut u32) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn SendARP(destip : u32, srcip : u32, pmacaddr : *mut core::ffi::c_void, phyaddrlen : *mut u32) -> u32); - unsafe { SendARP(destip, srcip, core::mem::transmute(pmacaddr), core::mem::transmute(phyaddrlen)) } + unsafe { SendARP(destip, srcip, pmacaddr as _, phyaddrlen as _) } } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] @@ -1053,7 +1053,7 @@ pub unsafe fn SetIpForwardEntry2(route: *const MIB_IPFORWARD_ROW2) -> super::sup #[inline] pub unsafe fn SetIpInterfaceEntry(row: *mut MIB_IPINTERFACE_ROW) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn SetIpInterfaceEntry(row : *mut MIB_IPINTERFACE_ROW) -> super::super::Foundation:: WIN32_ERROR); - unsafe { SetIpInterfaceEntry(core::mem::transmute(row)) } + unsafe { SetIpInterfaceEntry(row as _) } } #[inline] pub unsafe fn SetIpNetEntry(parpentry: *const MIB_IPNETROW_LH) -> u32 { @@ -1128,7 +1128,7 @@ pub unsafe fn SetUnicastIpAddressEntry(row: *const MIB_UNICASTIPADDRESS_ROW) -> #[inline] pub unsafe fn UnenableRouter(poverlapped: *const super::super::System::IO::OVERLAPPED, lpdwenablecount: Option<*mut u32>) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn UnenableRouter(poverlapped : *const super::super::System::IO:: OVERLAPPED, lpdwenablecount : *mut u32) -> u32); - unsafe { UnenableRouter(poverlapped, core::mem::transmute(lpdwenablecount.unwrap_or(core::mem::zeroed()))) } + unsafe { UnenableRouter(poverlapped, lpdwenablecount.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn UnregisterInterfaceTimestampConfigChange(notificationhandle: HIFTIMESTAMPCHANGE) { 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 ef8f977463..9d8b1b849c 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/MobileBroadband/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/MobileBroadband/mod.rs @@ -58,7 +58,7 @@ impl IMbnConnection { } } pub unsafe fn GetConnectionState(&self, connectionstate: *mut MBN_ACTIVATION_STATE, profilename: *mut windows_core::BSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetConnectionState)(windows_core::Interface::as_raw(self), core::mem::transmute(connectionstate), core::mem::transmute(profilename)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConnectionState)(windows_core::Interface::as_raw(self), connectionstate as _, core::mem::transmute(profilename)).ok() } } pub unsafe fn GetVoiceCallState(&self) -> windows_core::Result { unsafe { @@ -1492,7 +1492,7 @@ impl IMbnInterface { pub unsafe fn GetVisibleProviders(&self, age: *mut u32) -> windows_core::Result<*mut super::super::System::Com::SAFEARRAY> { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetVisibleProviders)(windows_core::Interface::as_raw(self), core::mem::transmute(age), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetVisibleProviders)(windows_core::Interface::as_raw(self), age as _, &mut result__).map(|| result__) } } pub unsafe fn ScanNetwork(&self) -> windows_core::Result { @@ -1981,7 +1981,7 @@ impl IMbnMultiCarrier { pub unsafe fn GetVisibleProviders(&self, age: *mut u32) -> windows_core::Result<*mut super::super::System::Com::SAFEARRAY> { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetVisibleProviders)(windows_core::Interface::as_raw(self), core::mem::transmute(age), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetVisibleProviders)(windows_core::Interface::as_raw(self), age as _, &mut result__).map(|| result__) } } #[cfg(feature = "Win32_System_Com")] diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Multicast/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Multicast/mod.rs index 1318e42e58..6ece9dcb9b 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Multicast/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Multicast/mod.rs @@ -6,32 +6,32 @@ pub unsafe fn McastApiCleanup() { #[inline] pub unsafe fn McastApiStartup(version: *mut u32) -> u32 { windows_targets::link!("dhcpcsvc.dll" "system" fn McastApiStartup(version : *mut u32) -> u32); - unsafe { McastApiStartup(core::mem::transmute(version)) } + unsafe { McastApiStartup(version as _) } } #[inline] pub unsafe fn McastEnumerateScopes(addrfamily: u16, requery: bool, pscopelist: *mut MCAST_SCOPE_ENTRY, pscopelen: *mut u32, pscopecount: *mut u32) -> u32 { windows_targets::link!("dhcpcsvc.dll" "system" fn McastEnumerateScopes(addrfamily : u16, requery : super::super::Foundation:: BOOL, pscopelist : *mut MCAST_SCOPE_ENTRY, pscopelen : *mut u32, pscopecount : *mut u32) -> u32); - unsafe { McastEnumerateScopes(addrfamily, requery.into(), core::mem::transmute(pscopelist), core::mem::transmute(pscopelen), core::mem::transmute(pscopecount)) } + unsafe { McastEnumerateScopes(addrfamily, requery.into(), pscopelist as _, pscopelen as _, pscopecount as _) } } #[inline] pub unsafe fn McastGenUID(prequestid: *mut MCAST_CLIENT_UID) -> u32 { windows_targets::link!("dhcpcsvc.dll" "system" fn McastGenUID(prequestid : *mut MCAST_CLIENT_UID) -> u32); - unsafe { McastGenUID(core::mem::transmute(prequestid)) } + unsafe { McastGenUID(prequestid as _) } } #[inline] pub unsafe fn McastReleaseAddress(addrfamily: u16, prequestid: *mut MCAST_CLIENT_UID, preleaserequest: *mut MCAST_LEASE_REQUEST) -> u32 { windows_targets::link!("dhcpcsvc.dll" "system" fn McastReleaseAddress(addrfamily : u16, prequestid : *mut MCAST_CLIENT_UID, preleaserequest : *mut MCAST_LEASE_REQUEST) -> u32); - unsafe { McastReleaseAddress(addrfamily, core::mem::transmute(prequestid), core::mem::transmute(preleaserequest)) } + unsafe { McastReleaseAddress(addrfamily, prequestid as _, preleaserequest as _) } } #[inline] pub unsafe fn McastRenewAddress(addrfamily: u16, prequestid: *mut MCAST_CLIENT_UID, prenewrequest: *mut MCAST_LEASE_REQUEST, prenewresponse: *mut MCAST_LEASE_RESPONSE) -> u32 { windows_targets::link!("dhcpcsvc.dll" "system" fn McastRenewAddress(addrfamily : u16, prequestid : *mut MCAST_CLIENT_UID, prenewrequest : *mut MCAST_LEASE_REQUEST, prenewresponse : *mut MCAST_LEASE_RESPONSE) -> u32); - unsafe { McastRenewAddress(addrfamily, core::mem::transmute(prequestid), core::mem::transmute(prenewrequest), core::mem::transmute(prenewresponse)) } + unsafe { McastRenewAddress(addrfamily, prequestid as _, prenewrequest as _, prenewresponse as _) } } #[inline] pub unsafe fn McastRequestAddress(addrfamily: u16, prequestid: *mut MCAST_CLIENT_UID, pscopectx: *mut MCAST_SCOPE_CTX, paddrrequest: *mut MCAST_LEASE_REQUEST, paddrresponse: *mut MCAST_LEASE_RESPONSE) -> u32 { windows_targets::link!("dhcpcsvc.dll" "system" fn McastRequestAddress(addrfamily : u16, prequestid : *mut MCAST_CLIENT_UID, pscopectx : *mut MCAST_SCOPE_CTX, paddrrequest : *mut MCAST_LEASE_REQUEST, paddrresponse : *mut MCAST_LEASE_RESPONSE) -> u32); - unsafe { McastRequestAddress(addrfamily, core::mem::transmute(prequestid), core::mem::transmute(pscopectx), core::mem::transmute(paddrrequest), core::mem::transmute(paddrresponse)) } + unsafe { McastRequestAddress(addrfamily, prequestid as _, pscopectx as _, paddrrequest as _, paddrresponse as _) } } #[repr(C)] #[derive(Clone, Copy)] diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetBios/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetBios/mod.rs index 1bd7a27d3e..9d15fa55ab 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetBios/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetBios/mod.rs @@ -1,7 +1,7 @@ #[inline] pub unsafe fn Netbios(pncb: *mut NCB) -> u8 { windows_targets::link!("netapi32.dll" "system" fn Netbios(pncb : *mut NCB) -> u8); - unsafe { Netbios(core::mem::transmute(pncb)) } + unsafe { Netbios(pncb as _) } } #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] 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 9fa4cc07bf..c9339ee4c9 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetManagement/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetManagement/mod.rs @@ -12,7 +12,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn I_NetLogonControl2(servername : windows_core::PCWSTR, functioncode : u32, querylevel : u32, data : *const u8, buffer : *mut *mut u8) -> u32); - unsafe { I_NetLogonControl2(servername.param().abi(), functioncode, querylevel, data, core::mem::transmute(buffer)) } + unsafe { I_NetLogonControl2(servername.param().abi(), functioncode, querylevel, data, buffer as _) } } #[inline] pub unsafe fn LogErrorA(dwmessageid: u32, plpwssubstrings: &[windows_core::PCSTR], dwerrorcode: u32) { @@ -37,12 +37,12 @@ pub unsafe fn LogEventW(weventtype: u32, dwmessageid: u32, plpwssubstrings: &[wi #[inline] pub unsafe fn MprSetupProtocolEnum(dwtransportid: u32, lplpbuffer: *mut *mut u8, lpdwentriesread: *mut u32) -> u32 { windows_targets::link!("rtutils.dll" "system" fn MprSetupProtocolEnum(dwtransportid : u32, lplpbuffer : *mut *mut u8, lpdwentriesread : *mut u32) -> u32); - unsafe { MprSetupProtocolEnum(dwtransportid, core::mem::transmute(lplpbuffer), core::mem::transmute(lpdwentriesread)) } + unsafe { MprSetupProtocolEnum(dwtransportid, lplpbuffer as _, lpdwentriesread as _) } } #[inline] pub unsafe fn MprSetupProtocolFree(lpbuffer: *mut core::ffi::c_void) -> u32 { windows_targets::link!("rtutils.dll" "system" fn MprSetupProtocolFree(lpbuffer : *mut core::ffi::c_void) -> u32); - unsafe { MprSetupProtocolFree(core::mem::transmute(lpbuffer)) } + unsafe { MprSetupProtocolFree(lpbuffer as _) } } #[inline] pub unsafe fn NetAccessAdd(servername: P0, level: u32, buf: *const u8, parm_err: Option<*mut u32>) -> u32 @@ -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); - unsafe { NetAccessAdd(servername.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(core::mem::zeroed()))) } + unsafe { NetAccessAdd(servername.param().abi(), level, buf, parm_err.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { NetAccessEnum(servername.param().abi(), basepath.param().abi(), recursive, level, core::mem::transmute(bufptr), prefmaxlen, core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::mem::zeroed()))) } + unsafe { NetAccessEnum(servername.param().abi(), basepath.param().abi(), recursive, level, bufptr as _, prefmaxlen, entriesread as _, totalentries as _, resume_handle.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetAccessGetInfo(servername: P0, resource: P1, level: u32, bufptr: *mut *mut u8) -> u32 @@ -77,7 +77,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetAccessGetInfo(servername : windows_core::PCWSTR, resource : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8) -> u32); - unsafe { NetAccessGetInfo(servername.param().abi(), resource.param().abi(), level, core::mem::transmute(bufptr)) } + unsafe { NetAccessGetInfo(servername.param().abi(), resource.param().abi(), level, bufptr as _) } } #[inline] pub unsafe fn NetAccessGetUserPerms(servername: P0, ugname: P1, resource: P2, perms: *mut u32) -> u32 @@ -87,7 +87,7 @@ where P2: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetAccessGetUserPerms(servername : windows_core::PCWSTR, ugname : windows_core::PCWSTR, resource : windows_core::PCWSTR, perms : *mut u32) -> u32); - unsafe { NetAccessGetUserPerms(servername.param().abi(), ugname.param().abi(), resource.param().abi(), core::mem::transmute(perms)) } + unsafe { NetAccessGetUserPerms(servername.param().abi(), ugname.param().abi(), resource.param().abi(), perms as _) } } #[inline] pub unsafe fn NetAccessSetInfo(servername: P0, resource: P1, level: u32, buf: *const u8, parm_err: Option<*mut u32>) -> 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); - unsafe { NetAccessSetInfo(servername.param().abi(), resource.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(core::mem::zeroed()))) } + unsafe { NetAccessSetInfo(servername.param().abi(), resource.param().abi(), level, buf, parm_err.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetAddAlternateComputerName(server: P0, alternatename: P1, domainaccount: P2, domainaccountpassword: P3, reserved: u32) -> u32 @@ -139,22 +139,22 @@ where #[inline] pub unsafe fn NetApiBufferAllocate(bytecount: u32, buffer: *mut *mut core::ffi::c_void) -> u32 { windows_targets::link!("netapi32.dll" "system" fn NetApiBufferAllocate(bytecount : u32, buffer : *mut *mut core::ffi::c_void) -> u32); - unsafe { NetApiBufferAllocate(bytecount, core::mem::transmute(buffer)) } + unsafe { NetApiBufferAllocate(bytecount, buffer as _) } } #[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); - unsafe { NetApiBufferFree(core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } + unsafe { NetApiBufferFree(buffer.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { NetApiBufferReallocate(core::mem::transmute(oldbuffer.unwrap_or(core::mem::zeroed())), newbytecount, core::mem::transmute(newbuffer)) } + unsafe { NetApiBufferReallocate(oldbuffer.unwrap_or(core::mem::zeroed()) as _, newbytecount, newbuffer as _) } } #[inline] pub unsafe fn NetApiBufferSize(buffer: *const core::ffi::c_void, bytecount: *mut u32) -> u32 { windows_targets::link!("netapi32.dll" "system" fn NetApiBufferSize(buffer : *const core::ffi::c_void, bytecount : *mut u32) -> u32); - unsafe { NetApiBufferSize(buffer, core::mem::transmute(bytecount)) } + unsafe { NetApiBufferSize(buffer, bytecount as _) } } #[inline] pub unsafe fn NetAuditClear(server: P0, backupfile: P1, service: P2) -> u32 @@ -173,7 +173,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetAuditRead(server : windows_core::PCWSTR, service : windows_core::PCWSTR, auditloghandle : *mut HLOG, offset : u32, reserved1 : *mut u32, reserved2 : u32, offsetflag : u32, bufptr : *mut *mut u8, prefmaxlen : u32, bytesread : *mut u32, totalavailable : *mut u32) -> u32); - unsafe { NetAuditRead(server.param().abi(), service.param().abi(), core::mem::transmute(auditloghandle), offset, core::mem::transmute(reserved1), reserved2, offsetflag, core::mem::transmute(bufptr), prefmaxlen, core::mem::transmute(bytesread), core::mem::transmute(totalavailable)) } + unsafe { NetAuditRead(server.param().abi(), service.param().abi(), auditloghandle as _, offset, reserved1 as _, reserved2, offsetflag, bufptr as _, prefmaxlen, bytesread as _, totalavailable as _) } } #[inline] pub unsafe fn NetAuditWrite(r#type: u32, buf: *mut u8, numbytes: u32, service: P3, reserved: *mut u8) -> u32 @@ -181,7 +181,7 @@ where P3: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetAuditWrite(r#type : u32, buf : *mut u8, numbytes : u32, service : windows_core::PCWSTR, reserved : *mut u8) -> u32); - unsafe { NetAuditWrite(r#type, core::mem::transmute(buf), numbytes, service.param().abi(), core::mem::transmute(reserved)) } + unsafe { NetAuditWrite(r#type, buf as _, numbytes, service.param().abi(), reserved as _) } } #[inline] pub unsafe fn NetConfigGet(server: P0, component: P1, parameter: P2, bufptr: *mut *mut u8) -> u32 @@ -191,7 +191,7 @@ where P2: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetConfigGet(server : windows_core::PCWSTR, component : windows_core::PCWSTR, parameter : windows_core::PCWSTR, bufptr : *mut *mut u8) -> u32); - unsafe { NetConfigGet(server.param().abi(), component.param().abi(), parameter.param().abi(), core::mem::transmute(bufptr)) } + unsafe { NetConfigGet(server.param().abi(), component.param().abi(), parameter.param().abi(), bufptr as _) } } #[inline] pub unsafe fn NetConfigGetAll(server: P0, component: P1, bufptr: *mut *mut u8) -> u32 @@ -200,7 +200,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetConfigGetAll(server : windows_core::PCWSTR, component : windows_core::PCWSTR, bufptr : *mut *mut u8) -> u32); - unsafe { NetConfigGetAll(server.param().abi(), component.param().abi(), core::mem::transmute(bufptr)) } + unsafe { NetConfigGetAll(server.param().abi(), component.param().abi(), bufptr as _) } } #[inline] pub unsafe fn NetConfigSet(server: P0, reserved1: P1, component: P2, level: u32, reserved2: u32, buf: *mut u8, reserved3: u32) -> u32 @@ -210,12 +210,12 @@ where P2: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetConfigSet(server : windows_core::PCWSTR, reserved1 : windows_core::PCWSTR, component : windows_core::PCWSTR, level : u32, reserved2 : u32, buf : *mut u8, reserved3 : u32) -> u32); - unsafe { NetConfigSet(server.param().abi(), reserved1.param().abi(), component.param().abi(), level, reserved2, core::mem::transmute(buf), reserved3) } + unsafe { NetConfigSet(server.param().abi(), reserved1.param().abi(), component.param().abi(), level, reserved2, buf as _, reserved3) } } #[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); - unsafe { NetCreateProvisioningPackage(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()))) } + unsafe { NetCreateProvisioningPackage(pprovisioningparams, pppackagebindata.unwrap_or(core::mem::zeroed()) as _, pdwpackagebindatasize.unwrap_or(core::mem::zeroed()) as _, pppackagetextdata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetEnumerateComputerNames(server: P0, nametype: NET_COMPUTER_NAME_TYPE, reserved: u32, entrycount: *mut u32, computernames: *mut *mut windows_core::PWSTR) -> u32 @@ -223,7 +223,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetEnumerateComputerNames(server : windows_core::PCWSTR, nametype : NET_COMPUTER_NAME_TYPE, reserved : u32, entrycount : *mut u32, computernames : *mut *mut windows_core::PWSTR) -> u32); - unsafe { NetEnumerateComputerNames(server.param().abi(), nametype, reserved, core::mem::transmute(entrycount), core::mem::transmute(computernames)) } + unsafe { NetEnumerateComputerNames(server.param().abi(), nametype, reserved, entrycount as _, computernames as _) } } #[inline] pub unsafe fn NetEnumerateServiceAccounts(servername: P0, flags: u32, accountscount: *mut u32, accounts: *mut *mut *mut u16) -> super::super::Foundation::NTSTATUS @@ -231,7 +231,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetEnumerateServiceAccounts(servername : windows_core::PCWSTR, flags : u32, accountscount : *mut u32, accounts : *mut *mut *mut u16) -> super::super::Foundation:: NTSTATUS); - unsafe { NetEnumerateServiceAccounts(servername.param().abi(), flags, core::mem::transmute(accountscount), core::mem::transmute(accounts)) } + unsafe { NetEnumerateServiceAccounts(servername.param().abi(), flags, accountscount as _, accounts as _) } } #[inline] pub unsafe fn NetErrorLogClear(uncservername: P0, backupfile: P1, reserved: Option<*const u8>) -> 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); - unsafe { NetErrorLogClear(uncservername.param().abi(), backupfile.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } + unsafe { NetErrorLogClear(uncservername.param().abi(), backupfile.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { NetErrorLogRead(uncservername.param().abi(), reserved1.param().abi(), errorloghandle, offset, core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed())), reserved3, offsetflag, core::mem::transmute(bufptr), prefmaxsize, core::mem::transmute(bytesread), core::mem::transmute(totalavailable)) } + unsafe { NetErrorLogRead(uncservername.param().abi(), reserved1.param().abi(), errorloghandle, offset, reserved2.unwrap_or(core::mem::zeroed()) as _, reserved3, offsetflag, bufptr as _, prefmaxsize, bytesread as _, totalavailable as _) } } #[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); - unsafe { NetErrorLogWrite(core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), code, component.param().abi(), buffer, numbytes, msgbuf, strcount, core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))) } + unsafe { NetErrorLogWrite(reserved1.unwrap_or(core::mem::zeroed()) as _, code, component.param().abi(), buffer, numbytes, msgbuf, strcount, reserved2.unwrap_or(core::mem::zeroed()) as _) } } #[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)); - unsafe { NetFreeAadJoinInformation(core::mem::transmute(pjoininfo.unwrap_or(core::mem::zeroed()))) } + unsafe { NetFreeAadJoinInformation(pjoininfo.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] @@ -284,7 +284,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetGetAnyDCName(servername : windows_core::PCWSTR, domainname : windows_core::PCWSTR, buffer : *mut *mut u8) -> u32); - unsafe { NetGetAnyDCName(servername.param().abi(), domainname.param().abi(), core::mem::transmute(buffer)) } + unsafe { NetGetAnyDCName(servername.param().abi(), domainname.param().abi(), buffer as _) } } #[inline] pub unsafe fn NetGetDCName(servername: P0, domainname: P1, buffer: *mut *mut u8) -> u32 @@ -293,7 +293,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetGetDCName(servername : windows_core::PCWSTR, domainname : windows_core::PCWSTR, buffer : *mut *mut u8) -> u32); - unsafe { NetGetDCName(servername.param().abi(), domainname.param().abi(), core::mem::transmute(buffer)) } + unsafe { NetGetDCName(servername.param().abi(), domainname.param().abi(), buffer as _) } } #[inline] pub unsafe fn NetGetDisplayInformationIndex(servername: P0, level: u32, prefix: P2, index: *mut u32) -> u32 @@ -302,7 +302,7 @@ where P2: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetGetDisplayInformationIndex(servername : windows_core::PCWSTR, level : u32, prefix : windows_core::PCWSTR, index : *mut u32) -> u32); - unsafe { NetGetDisplayInformationIndex(servername.param().abi(), level, prefix.param().abi(), core::mem::transmute(index)) } + unsafe { NetGetDisplayInformationIndex(servername.param().abi(), level, prefix.param().abi(), index as _) } } #[inline] pub unsafe fn NetGetJoinInformation(lpserver: P0, lpnamebuffer: *mut windows_core::PWSTR, buffertype: *mut NETSETUP_JOIN_STATUS) -> u32 @@ -310,7 +310,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetGetJoinInformation(lpserver : windows_core::PCWSTR, lpnamebuffer : *mut windows_core::PWSTR, buffertype : *mut NETSETUP_JOIN_STATUS) -> u32); - unsafe { NetGetJoinInformation(lpserver.param().abi(), core::mem::transmute(lpnamebuffer), core::mem::transmute(buffertype)) } + unsafe { NetGetJoinInformation(lpserver.param().abi(), lpnamebuffer as _, buffertype as _) } } #[inline] pub unsafe fn NetGetJoinableOUs(lpserver: P0, lpdomain: P1, lpaccount: P2, lppassword: P3, oucount: *mut u32, ous: *mut *mut windows_core::PWSTR) -> u32 @@ -321,7 +321,7 @@ where P3: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetGetJoinableOUs(lpserver : windows_core::PCWSTR, lpdomain : windows_core::PCWSTR, lpaccount : windows_core::PCWSTR, lppassword : windows_core::PCWSTR, oucount : *mut u32, ous : *mut *mut windows_core::PWSTR) -> u32); - unsafe { NetGetJoinableOUs(lpserver.param().abi(), lpdomain.param().abi(), lpaccount.param().abi(), lppassword.param().abi(), core::mem::transmute(oucount), core::mem::transmute(ous)) } + unsafe { NetGetJoinableOUs(lpserver.param().abi(), lpdomain.param().abi(), lpaccount.param().abi(), lppassword.param().abi(), oucount as _, ous as _) } } #[inline] pub unsafe fn NetGroupAdd(servername: P0, level: u32, buf: *const u8, parm_err: Option<*mut u32>) -> u32 @@ -329,7 +329,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); - unsafe { NetGroupAdd(servername.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(core::mem::zeroed()))) } + unsafe { NetGroupAdd(servername.param().abi(), level, buf, parm_err.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetGroupAddUser(servername: P0, groupname: P1, username: P2) -> u32 @@ -366,7 +366,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); - unsafe { NetGroupEnum(servername.param().abi(), level, core::mem::transmute(bufptr), prefmaxlen, core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::mem::zeroed()))) } + unsafe { NetGroupEnum(servername.param().abi(), level, bufptr as _, prefmaxlen, entriesread as _, totalentries as _, resume_handle.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetGroupGetInfo(servername: P0, groupname: P1, level: u32, bufptr: *mut *mut u8) -> u32 @@ -375,7 +375,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetGroupGetInfo(servername : windows_core::PCWSTR, groupname : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8) -> u32); - unsafe { NetGroupGetInfo(servername.param().abi(), groupname.param().abi(), level, core::mem::transmute(bufptr)) } + unsafe { NetGroupGetInfo(servername.param().abi(), groupname.param().abi(), level, bufptr as _) } } #[inline] pub unsafe fn NetGroupGetUsers(servername: P0, groupname: P1, level: u32, bufptr: *mut *mut u8, prefmaxlen: u32, entriesread: *mut u32, totalentries: *mut u32, resumehandle: Option<*mut usize>) -> u32 @@ -384,7 +384,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); - unsafe { NetGroupGetUsers(servername.param().abi(), groupname.param().abi(), level, core::mem::transmute(bufptr), prefmaxlen, core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resumehandle.unwrap_or(core::mem::zeroed()))) } + unsafe { NetGroupGetUsers(servername.param().abi(), groupname.param().abi(), level, bufptr as _, prefmaxlen, entriesread as _, totalentries as _, resumehandle.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetGroupSetInfo(servername: P0, groupname: P1, level: u32, buf: *const u8, parm_err: Option<*mut u32>) -> u32 @@ -393,7 +393,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); - unsafe { NetGroupSetInfo(servername.param().abi(), groupname.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(core::mem::zeroed()))) } + unsafe { NetGroupSetInfo(servername.param().abi(), groupname.param().abi(), level, buf, parm_err.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetGroupSetUsers(servername: P0, groupname: P1, level: u32, buf: *const u8, totalentries: u32) -> u32 @@ -411,7 +411,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetIsServiceAccount(servername : windows_core::PCWSTR, accountname : windows_core::PCWSTR, isservice : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: NTSTATUS); - unsafe { NetIsServiceAccount(servername.param().abi(), accountname.param().abi(), core::mem::transmute(isservice)) } + unsafe { NetIsServiceAccount(servername.param().abi(), accountname.param().abi(), isservice as _) } } #[inline] pub unsafe fn NetJoinDomain(lpserver: P0, lpdomain: P1, lpmachineaccountou: P2, lpaccount: P3, lppassword: P4, fjoinoptions: NET_JOIN_DOMAIN_JOIN_OPTIONS) -> u32 @@ -431,7 +431,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetLocalGroupAdd(servername : windows_core::PCWSTR, level : u32, buf : *const u8, parm_err : *mut u32) -> u32); - unsafe { NetLocalGroupAdd(servername.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(core::mem::zeroed()))) } + unsafe { NetLocalGroupAdd(servername.param().abi(), level, buf, parm_err.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -486,7 +486,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetLocalGroupEnum(servername : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8, prefmaxlen : u32, entriesread : *mut u32, totalentries : *mut u32, resumehandle : *mut usize) -> u32); - unsafe { NetLocalGroupEnum(servername.param().abi(), level, core::mem::transmute(bufptr), prefmaxlen, core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resumehandle.unwrap_or(core::mem::zeroed()))) } + unsafe { NetLocalGroupEnum(servername.param().abi(), level, bufptr as _, prefmaxlen, entriesread as _, totalentries as _, resumehandle.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetLocalGroupGetInfo(servername: P0, groupname: P1, level: u32, bufptr: *mut *mut u8) -> u32 @@ -495,7 +495,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetLocalGroupGetInfo(servername : windows_core::PCWSTR, groupname : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8) -> u32); - unsafe { NetLocalGroupGetInfo(servername.param().abi(), groupname.param().abi(), level, core::mem::transmute(bufptr)) } + unsafe { NetLocalGroupGetInfo(servername.param().abi(), groupname.param().abi(), level, bufptr as _) } } #[inline] pub unsafe fn NetLocalGroupGetMembers(servername: P0, localgroupname: P1, level: u32, bufptr: *mut *mut u8, prefmaxlen: u32, entriesread: *mut u32, totalentries: *mut u32, resumehandle: Option<*mut usize>) -> u32 @@ -504,7 +504,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetLocalGroupGetMembers(servername : windows_core::PCWSTR, localgroupname : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8, prefmaxlen : u32, entriesread : *mut u32, totalentries : *mut u32, resumehandle : *mut usize) -> u32); - unsafe { NetLocalGroupGetMembers(servername.param().abi(), localgroupname.param().abi(), level, core::mem::transmute(bufptr), prefmaxlen, core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resumehandle.unwrap_or(core::mem::zeroed()))) } + unsafe { NetLocalGroupGetMembers(servername.param().abi(), localgroupname.param().abi(), level, bufptr as _, prefmaxlen, entriesread as _, totalentries as _, resumehandle.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetLocalGroupSetInfo(servername: P0, groupname: P1, level: u32, buf: *const u8, parm_err: Option<*mut u32>) -> u32 @@ -513,7 +513,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetLocalGroupSetInfo(servername : windows_core::PCWSTR, groupname : windows_core::PCWSTR, level : u32, buf : *const u8, parm_err : *mut u32) -> u32); - unsafe { NetLocalGroupSetInfo(servername.param().abi(), groupname.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(core::mem::zeroed()))) } + unsafe { NetLocalGroupSetInfo(servername.param().abi(), groupname.param().abi(), level, buf, parm_err.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetLocalGroupSetMembers(servername: P0, groupname: P1, level: u32, buf: *const u8, totalentries: u32) -> u32 @@ -558,7 +558,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetMessageNameEnum(servername : windows_core::PCWSTR, level : u32, bufptr : *const *const u8, prefmaxlen : u32, entriesread : *mut u32, totalentries : *mut u32, resume_handle : *mut u32) -> u32); - unsafe { NetMessageNameEnum(servername.param().abi(), level, bufptr, prefmaxlen, core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle)) } + unsafe { NetMessageNameEnum(servername.param().abi(), level, bufptr, prefmaxlen, entriesread as _, totalentries as _, resume_handle as _) } } #[inline] pub unsafe fn NetMessageNameGetInfo(servername: P0, msgname: P1, level: u32, bufptr: *const *const u8) -> u32 @@ -578,7 +578,7 @@ where P3: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetProvisionComputerAccount(lpdomain : windows_core::PCWSTR, lpmachinename : windows_core::PCWSTR, lpmachineaccountou : windows_core::PCWSTR, lpdcname : windows_core::PCWSTR, dwoptions : NETSETUP_PROVISION, pprovisionbindata : *mut *mut u8, pdwprovisionbindatasize : *mut u32, pprovisiontextdata : *mut windows_core::PWSTR) -> u32); - unsafe { NetProvisionComputerAccount(lpdomain.param().abi(), lpmachinename.param().abi(), lpmachineaccountou.param().abi(), lpdcname.param().abi(), 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()))) } + unsafe { NetProvisionComputerAccount(lpdomain.param().abi(), lpmachinename.param().abi(), lpmachineaccountou.param().abi(), lpdcname.param().abi(), dwoptions, pprovisionbindata.unwrap_or(core::mem::zeroed()) as _, pdwprovisionbindatasize.unwrap_or(core::mem::zeroed()) as _, pprovisiontextdata.unwrap_or(core::mem::zeroed()) as _) } } #[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 @@ -586,7 +586,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetQueryDisplayInformation(servername : windows_core::PCWSTR, level : u32, index : u32, entriesrequested : u32, preferredmaximumlength : u32, returnedentrycount : *mut u32, sortedbuffer : *mut *mut core::ffi::c_void) -> u32); - unsafe { NetQueryDisplayInformation(servername.param().abi(), level, index, entriesrequested, preferredmaximumlength, core::mem::transmute(returnedentrycount), core::mem::transmute(sortedbuffer)) } + unsafe { NetQueryDisplayInformation(servername.param().abi(), level, index, entriesrequested, preferredmaximumlength, returnedentrycount as _, sortedbuffer as _) } } #[inline] pub unsafe fn NetQueryServiceAccount(servername: P0, accountname: P1, infolevel: u32, buffer: *mut *mut u8) -> super::super::Foundation::NTSTATUS @@ -595,7 +595,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetQueryServiceAccount(servername : windows_core::PCWSTR, accountname : windows_core::PCWSTR, infolevel : u32, buffer : *mut *mut u8) -> super::super::Foundation:: NTSTATUS); - unsafe { NetQueryServiceAccount(servername.param().abi(), accountname.param().abi(), infolevel, core::mem::transmute(buffer)) } + unsafe { NetQueryServiceAccount(servername.param().abi(), accountname.param().abi(), infolevel, buffer as _) } } #[inline] pub unsafe fn NetRemoteComputerSupports(uncservername: P0, optionswanted: NET_REMOTE_COMPUTER_SUPPORTS_OPTIONS, optionssupported: *mut u32) -> u32 @@ -603,7 +603,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetRemoteComputerSupports(uncservername : windows_core::PCWSTR, optionswanted : NET_REMOTE_COMPUTER_SUPPORTS_OPTIONS, optionssupported : *mut u32) -> u32); - unsafe { NetRemoteComputerSupports(uncservername.param().abi(), optionswanted, core::mem::transmute(optionssupported)) } + unsafe { NetRemoteComputerSupports(uncservername.param().abi(), optionswanted, optionssupported as _) } } #[inline] pub unsafe fn NetRemoteTOD(uncservername: P0, bufferptr: *mut *mut u8) -> u32 @@ -611,7 +611,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetRemoteTOD(uncservername : windows_core::PCWSTR, bufferptr : *mut *mut u8) -> u32); - unsafe { NetRemoteTOD(uncservername.param().abi(), core::mem::transmute(bufferptr)) } + unsafe { NetRemoteTOD(uncservername.param().abi(), bufferptr as _) } } #[inline] pub unsafe fn NetRemoveAlternateComputerName(server: P0, alternatename: P1, domainaccount: P2, domainaccountpassword: P3, reserved: u32) -> u32 @@ -650,7 +650,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetReplExportDirAdd(servername : windows_core::PCWSTR, level : u32, buf : *const u8, parm_err : *mut u32) -> u32); - unsafe { NetReplExportDirAdd(servername.param().abi(), level, buf, core::mem::transmute(parm_err)) } + unsafe { NetReplExportDirAdd(servername.param().abi(), level, buf, parm_err as _) } } #[inline] pub unsafe fn NetReplExportDirDel(servername: P0, dirname: P1) -> u32 @@ -667,7 +667,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetReplExportDirEnum(servername : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8, prefmaxlen : u32, entriesread : *mut u32, totalentries : *mut u32, resumehandle : *mut u32) -> u32); - unsafe { NetReplExportDirEnum(servername.param().abi(), level, core::mem::transmute(bufptr), prefmaxlen, core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resumehandle)) } + unsafe { NetReplExportDirEnum(servername.param().abi(), level, bufptr as _, prefmaxlen, entriesread as _, totalentries as _, resumehandle as _) } } #[inline] pub unsafe fn NetReplExportDirGetInfo(servername: P0, dirname: P1, level: u32, bufptr: *mut *mut u8) -> u32 @@ -676,7 +676,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetReplExportDirGetInfo(servername : windows_core::PCWSTR, dirname : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8) -> u32); - unsafe { NetReplExportDirGetInfo(servername.param().abi(), dirname.param().abi(), level, core::mem::transmute(bufptr)) } + unsafe { NetReplExportDirGetInfo(servername.param().abi(), dirname.param().abi(), level, bufptr as _) } } #[inline] pub unsafe fn NetReplExportDirLock(servername: P0, dirname: P1) -> u32 @@ -694,7 +694,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetReplExportDirSetInfo(servername : windows_core::PCWSTR, dirname : windows_core::PCWSTR, level : u32, buf : *const u8, parm_err : *mut u32) -> u32); - unsafe { NetReplExportDirSetInfo(servername.param().abi(), dirname.param().abi(), level, buf, core::mem::transmute(parm_err)) } + unsafe { NetReplExportDirSetInfo(servername.param().abi(), dirname.param().abi(), level, buf, parm_err as _) } } #[inline] pub unsafe fn NetReplExportDirUnlock(servername: P0, dirname: P1, unlockforce: u32) -> u32 @@ -711,7 +711,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetReplGetInfo(servername : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8) -> u32); - unsafe { NetReplGetInfo(servername.param().abi(), level, core::mem::transmute(bufptr)) } + unsafe { NetReplGetInfo(servername.param().abi(), level, bufptr as _) } } #[inline] pub unsafe fn NetReplImportDirAdd(servername: P0, level: u32, buf: *const u8, parm_err: *mut u32) -> u32 @@ -719,7 +719,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetReplImportDirAdd(servername : windows_core::PCWSTR, level : u32, buf : *const u8, parm_err : *mut u32) -> u32); - unsafe { NetReplImportDirAdd(servername.param().abi(), level, buf, core::mem::transmute(parm_err)) } + unsafe { NetReplImportDirAdd(servername.param().abi(), level, buf, parm_err as _) } } #[inline] pub unsafe fn NetReplImportDirDel(servername: P0, dirname: P1) -> u32 @@ -736,7 +736,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetReplImportDirEnum(servername : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8, prefmaxlen : u32, entriesread : *mut u32, totalentries : *mut u32, resumehandle : *mut u32) -> u32); - unsafe { NetReplImportDirEnum(servername.param().abi(), level, core::mem::transmute(bufptr), prefmaxlen, core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resumehandle)) } + unsafe { NetReplImportDirEnum(servername.param().abi(), level, bufptr as _, prefmaxlen, entriesread as _, totalentries as _, resumehandle as _) } } #[inline] pub unsafe fn NetReplImportDirGetInfo(servername: P0, dirname: P1, level: u32, bufptr: *mut *mut u8) -> u32 @@ -745,7 +745,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetReplImportDirGetInfo(servername : windows_core::PCWSTR, dirname : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8) -> u32); - unsafe { NetReplImportDirGetInfo(servername.param().abi(), dirname.param().abi(), level, core::mem::transmute(bufptr)) } + unsafe { NetReplImportDirGetInfo(servername.param().abi(), dirname.param().abi(), level, bufptr as _) } } #[inline] pub unsafe fn NetReplImportDirLock(servername: P0, dirname: P1) -> u32 @@ -771,7 +771,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetReplSetInfo(servername : windows_core::PCWSTR, level : u32, buf : *const u8, parm_err : *mut u32) -> u32); - unsafe { NetReplSetInfo(servername.param().abi(), level, buf, core::mem::transmute(parm_err)) } + unsafe { NetReplSetInfo(servername.param().abi(), level, buf, parm_err as _) } } #[inline] pub unsafe fn NetRequestOfflineDomainJoin(pprovisionbindata: &[u8], dwoptions: NET_REQUEST_PROVISION_OPTIONS, lpwindowspath: P3) -> u32 @@ -787,7 +787,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); - unsafe { NetRequestProvisioningPackageInstall(core::mem::transmute(ppackagebindata.as_ptr()), ppackagebindata.len().try_into().unwrap(), dwprovisionoptions, lpwindowspath.param().abi(), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { NetRequestProvisioningPackageInstall(core::mem::transmute(ppackagebindata.as_ptr()), ppackagebindata.len().try_into().unwrap(), dwprovisionoptions, lpwindowspath.param().abi(), pvreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetScheduleJobAdd(servername: P0, buffer: *mut u8, jobid: *mut u32) -> u32 @@ -795,7 +795,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetScheduleJobAdd(servername : windows_core::PCWSTR, buffer : *mut u8, jobid : *mut u32) -> u32); - unsafe { NetScheduleJobAdd(servername.param().abi(), core::mem::transmute(buffer), core::mem::transmute(jobid)) } + unsafe { NetScheduleJobAdd(servername.param().abi(), buffer as _, jobid as _) } } #[inline] pub unsafe fn NetScheduleJobDel(servername: P0, minjobid: u32, maxjobid: u32) -> u32 @@ -811,7 +811,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetScheduleJobEnum(servername : windows_core::PCWSTR, pointertobuffer : *mut *mut u8, prefferedmaximumlength : u32, entriesread : *mut u32, totalentries : *mut u32, resumehandle : *mut u32) -> u32); - unsafe { NetScheduleJobEnum(servername.param().abi(), core::mem::transmute(pointertobuffer), prefferedmaximumlength, core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resumehandle)) } + unsafe { NetScheduleJobEnum(servername.param().abi(), pointertobuffer as _, prefferedmaximumlength, entriesread as _, totalentries as _, resumehandle as _) } } #[inline] pub unsafe fn NetScheduleJobGetInfo(servername: P0, jobid: u32, pointertobuffer: *mut *mut u8) -> u32 @@ -819,7 +819,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetScheduleJobGetInfo(servername : windows_core::PCWSTR, jobid : u32, pointertobuffer : *mut *mut u8) -> u32); - unsafe { NetScheduleJobGetInfo(servername.param().abi(), jobid, core::mem::transmute(pointertobuffer)) } + unsafe { NetScheduleJobGetInfo(servername.param().abi(), jobid, pointertobuffer as _) } } #[inline] pub unsafe fn NetServerComputerNameAdd(servername: P0, emulateddomainname: P1, emulatedservername: P2) -> u32 @@ -846,7 +846,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetServerDiskEnum(servername : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8, prefmaxlen : u32, entriesread : *mut u32, totalentries : *mut u32, resume_handle : *mut u32) -> u32); - unsafe { NetServerDiskEnum(servername.param().abi(), level, core::mem::transmute(bufptr), prefmaxlen, core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::mem::zeroed()))) } + unsafe { NetServerDiskEnum(servername.param().abi(), level, bufptr as _, prefmaxlen, entriesread as _, totalentries as _, resume_handle.unwrap_or(core::mem::zeroed()) as _) } } #[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 +855,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); - unsafe { NetServerEnum(servername.param().abi(), level, core::mem::transmute(bufptr), prefmaxlen, core::mem::transmute(entriesread), core::mem::transmute(totalentries), servertype, domain.param().abi(), core::mem::transmute(resume_handle.unwrap_or(core::mem::zeroed()))) } + unsafe { NetServerEnum(servername.param().abi(), level, bufptr as _, prefmaxlen, entriesread as _, totalentries as _, servertype, domain.param().abi(), resume_handle.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetServerGetInfo(servername: P0, level: u32, bufptr: *mut *mut u8) -> u32 @@ -863,7 +863,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetServerGetInfo(servername : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8) -> u32); - unsafe { NetServerGetInfo(servername.param().abi(), level, core::mem::transmute(bufptr)) } + unsafe { NetServerGetInfo(servername.param().abi(), level, bufptr as _) } } #[inline] pub unsafe fn NetServerSetInfo(servername: P0, level: u32, buf: *const u8, parmerror: Option<*mut u32>) -> u32 @@ -871,7 +871,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetServerSetInfo(servername : windows_core::PCWSTR, level : u32, buf : *const u8, parmerror : *mut u32) -> u32); - unsafe { NetServerSetInfo(servername.param().abi(), level, buf, core::mem::transmute(parmerror.unwrap_or(core::mem::zeroed()))) } + unsafe { NetServerSetInfo(servername.param().abi(), level, buf, parmerror.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetServerTransportAdd(servername: P0, level: u32, bufptr: *const u8) -> u32 @@ -903,7 +903,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetServerTransportEnum(servername : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8, prefmaxlen : u32, entriesread : *mut u32, totalentries : *mut u32, resume_handle : *mut u32) -> u32); - unsafe { NetServerTransportEnum(servername.param().abi(), level, core::mem::transmute(bufptr), prefmaxlen, core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::mem::zeroed()))) } + unsafe { NetServerTransportEnum(servername.param().abi(), level, bufptr as _, prefmaxlen, entriesread as _, totalentries as _, resume_handle.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetServiceControl(servername: P0, service: P1, opcode: u32, arg: u32, bufptr: *mut *mut u8) -> u32 @@ -912,7 +912,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetServiceControl(servername : windows_core::PCWSTR, service : windows_core::PCWSTR, opcode : u32, arg : u32, bufptr : *mut *mut u8) -> u32); - unsafe { NetServiceControl(servername.param().abi(), service.param().abi(), opcode, arg, core::mem::transmute(bufptr)) } + unsafe { NetServiceControl(servername.param().abi(), service.param().abi(), opcode, arg, bufptr as _) } } #[inline] pub unsafe fn NetServiceEnum(servername: P0, level: u32, bufptr: *mut *mut u8, prefmaxlen: u32, entriesread: *mut u32, totalentries: *mut u32, resume_handle: Option<*mut u32>) -> u32 @@ -920,7 +920,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetServiceEnum(servername : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8, prefmaxlen : u32, entriesread : *mut u32, totalentries : *mut u32, resume_handle : *mut u32) -> u32); - unsafe { NetServiceEnum(servername.param().abi(), level, core::mem::transmute(bufptr), prefmaxlen, core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::mem::zeroed()))) } + unsafe { NetServiceEnum(servername.param().abi(), level, bufptr as _, prefmaxlen, entriesread as _, totalentries as _, resume_handle.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetServiceGetInfo(servername: P0, service: P1, level: u32, bufptr: *mut *mut u8) -> u32 @@ -929,7 +929,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetServiceGetInfo(servername : windows_core::PCWSTR, service : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8) -> u32); - unsafe { NetServiceGetInfo(servername.param().abi(), service.param().abi(), level, core::mem::transmute(bufptr)) } + unsafe { NetServiceGetInfo(servername.param().abi(), service.param().abi(), level, bufptr as _) } } #[inline] pub unsafe fn NetServiceInstall(servername: P0, service: P1, argv: &[windows_core::PCWSTR], bufptr: *mut *mut u8) -> u32 @@ -938,7 +938,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetServiceInstall(servername : windows_core::PCWSTR, service : windows_core::PCWSTR, argc : u32, argv : *const windows_core::PCWSTR, bufptr : *mut *mut u8) -> u32); - unsafe { NetServiceInstall(servername.param().abi(), service.param().abi(), argv.len().try_into().unwrap(), core::mem::transmute(argv.as_ptr()), core::mem::transmute(bufptr)) } + unsafe { NetServiceInstall(servername.param().abi(), service.param().abi(), argv.len().try_into().unwrap(), core::mem::transmute(argv.as_ptr()), bufptr as _) } } #[inline] pub unsafe fn NetSetPrimaryComputerName(server: P0, primaryname: P1, domainaccount: P2, domainaccountpassword: P3, reserved: u32) -> u32 @@ -964,7 +964,7 @@ where #[inline] pub unsafe fn NetUseAdd(servername: Option<*const i8>, levelflags: u32, buf: *const u8, parm_err: Option<*mut u32>) -> u32 { windows_targets::link!("netapi32.dll" "system" fn NetUseAdd(servername : *const i8, levelflags : u32, buf : *const u8, parm_err : *mut u32) -> u32); - unsafe { NetUseAdd(core::mem::transmute(servername.unwrap_or(core::mem::zeroed())), levelflags, buf, core::mem::transmute(parm_err.unwrap_or(core::mem::zeroed()))) } + unsafe { NetUseAdd(servername.unwrap_or(core::mem::zeroed()) as _, levelflags, buf, parm_err.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetUseDel(uncservername: P0, usename: P1, forcelevelflags: FORCE_LEVEL_FLAGS) -> u32 @@ -981,7 +981,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetUseEnum(uncservername : windows_core::PCWSTR, levelflags : u32, bufptr : *mut *mut u8, preferedmaximumsize : u32, entriesread : *mut u32, totalentries : *mut u32, resumehandle : *mut u32) -> u32); - unsafe { NetUseEnum(uncservername.param().abi(), levelflags, core::mem::transmute(bufptr.unwrap_or(core::mem::zeroed())), preferedmaximumsize, core::mem::transmute(entriesread.unwrap_or(core::mem::zeroed())), core::mem::transmute(totalentries), core::mem::transmute(resumehandle.unwrap_or(core::mem::zeroed()))) } + unsafe { NetUseEnum(uncservername.param().abi(), levelflags, bufptr.unwrap_or(core::mem::zeroed()) as _, preferedmaximumsize, entriesread.unwrap_or(core::mem::zeroed()) as _, totalentries as _, resumehandle.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetUseGetInfo(uncservername: P0, usename: P1, levelflags: u32, bufptr: Option<*mut *mut u8>) -> u32 @@ -990,7 +990,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetUseGetInfo(uncservername : windows_core::PCWSTR, usename : windows_core::PCWSTR, levelflags : u32, bufptr : *mut *mut u8) -> u32); - unsafe { NetUseGetInfo(uncservername.param().abi(), usename.param().abi(), levelflags, core::mem::transmute(bufptr.unwrap_or(core::mem::zeroed()))) } + unsafe { NetUseGetInfo(uncservername.param().abi(), usename.param().abi(), levelflags, bufptr.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetUserAdd(servername: P0, level: u32, buf: *const u8, parm_err: Option<*mut u32>) -> u32 @@ -998,7 +998,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetUserAdd(servername : windows_core::PCWSTR, level : u32, buf : *const u8, parm_err : *mut u32) -> u32); - unsafe { NetUserAdd(servername.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(core::mem::zeroed()))) } + unsafe { NetUserAdd(servername.param().abi(), level, buf, parm_err.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetUserChangePassword(domainname: P0, username: P1, oldpassword: P2, newpassword: P3) -> u32 @@ -1026,7 +1026,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetUserEnum(servername : windows_core::PCWSTR, level : u32, filter : NET_USER_ENUM_FILTER_FLAGS, bufptr : *mut *mut u8, prefmaxlen : u32, entriesread : *mut u32, totalentries : *mut u32, resume_handle : *mut u32) -> u32); - unsafe { NetUserEnum(servername.param().abi(), level, filter, core::mem::transmute(bufptr), prefmaxlen, core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::mem::zeroed()))) } + unsafe { NetUserEnum(servername.param().abi(), level, filter, bufptr as _, prefmaxlen, entriesread as _, totalentries as _, resume_handle.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetUserGetGroups(servername: P0, username: P1, level: u32, bufptr: *mut *mut u8, prefmaxlen: u32, entriesread: *mut u32, totalentries: *mut u32) -> u32 @@ -1035,7 +1035,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetUserGetGroups(servername : windows_core::PCWSTR, username : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8, prefmaxlen : u32, entriesread : *mut u32, totalentries : *mut u32) -> u32); - unsafe { NetUserGetGroups(servername.param().abi(), username.param().abi(), level, core::mem::transmute(bufptr), prefmaxlen, core::mem::transmute(entriesread), core::mem::transmute(totalentries)) } + unsafe { NetUserGetGroups(servername.param().abi(), username.param().abi(), level, bufptr as _, prefmaxlen, entriesread as _, totalentries as _) } } #[inline] pub unsafe fn NetUserGetInfo(servername: P0, username: P1, level: u32, bufptr: *mut *mut u8) -> u32 @@ -1044,7 +1044,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetUserGetInfo(servername : windows_core::PCWSTR, username : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8) -> u32); - unsafe { NetUserGetInfo(servername.param().abi(), username.param().abi(), level, core::mem::transmute(bufptr)) } + unsafe { NetUserGetInfo(servername.param().abi(), username.param().abi(), level, bufptr as _) } } #[inline] pub unsafe fn NetUserGetLocalGroups(servername: P0, username: P1, level: u32, flags: u32, bufptr: *mut *mut u8, prefmaxlen: u32, entriesread: *mut u32, totalentries: *mut u32) -> u32 @@ -1053,7 +1053,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetUserGetLocalGroups(servername : windows_core::PCWSTR, username : windows_core::PCWSTR, level : u32, flags : u32, bufptr : *mut *mut u8, prefmaxlen : u32, entriesread : *mut u32, totalentries : *mut u32) -> u32); - unsafe { NetUserGetLocalGroups(servername.param().abi(), username.param().abi(), level, flags, core::mem::transmute(bufptr), prefmaxlen, core::mem::transmute(entriesread), core::mem::transmute(totalentries)) } + unsafe { NetUserGetLocalGroups(servername.param().abi(), username.param().abi(), level, flags, bufptr as _, prefmaxlen, entriesread as _, totalentries as _) } } #[inline] pub unsafe fn NetUserModalsGet(servername: P0, level: u32, bufptr: *mut *mut u8) -> u32 @@ -1061,7 +1061,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetUserModalsGet(servername : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8) -> u32); - unsafe { NetUserModalsGet(servername.param().abi(), level, core::mem::transmute(bufptr)) } + unsafe { NetUserModalsGet(servername.param().abi(), level, bufptr as _) } } #[inline] pub unsafe fn NetUserModalsSet(servername: P0, level: u32, buf: *const u8, parm_err: Option<*mut u32>) -> u32 @@ -1069,7 +1069,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetUserModalsSet(servername : windows_core::PCWSTR, level : u32, buf : *const u8, parm_err : *mut u32) -> u32); - unsafe { NetUserModalsSet(servername.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(core::mem::zeroed()))) } + unsafe { NetUserModalsSet(servername.param().abi(), level, buf, parm_err.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetUserSetGroups(servername: P0, username: P1, level: u32, buf: *const u8, num_entries: u32) -> u32 @@ -1087,7 +1087,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetUserSetInfo(servername : windows_core::PCWSTR, username : windows_core::PCWSTR, level : u32, buf : *const u8, parm_err : *mut u32) -> u32); - unsafe { NetUserSetInfo(servername.param().abi(), username.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(core::mem::zeroed()))) } + unsafe { NetUserSetInfo(servername.param().abi(), username.param().abi(), level, buf, parm_err.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetValidateName(lpserver: P0, lpname: P1, lpaccount: P2, lppassword: P3, nametype: NETSETUP_NAME_TYPE) -> u32 @@ -1106,12 +1106,12 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetValidatePasswordPolicy(servername : windows_core::PCWSTR, qualifier : *mut core::ffi::c_void, validationtype : NET_VALIDATE_PASSWORD_TYPE, inputarg : *mut core::ffi::c_void, outputarg : *mut *mut core::ffi::c_void) -> u32); - unsafe { NetValidatePasswordPolicy(servername.param().abi(), core::mem::transmute(qualifier), validationtype, core::mem::transmute(inputarg), core::mem::transmute(outputarg)) } + unsafe { NetValidatePasswordPolicy(servername.param().abi(), qualifier as _, validationtype, inputarg as _, outputarg as _) } } #[inline] pub unsafe fn NetValidatePasswordPolicyFree(outputarg: *mut *mut core::ffi::c_void) -> u32 { windows_targets::link!("netapi32.dll" "system" fn NetValidatePasswordPolicyFree(outputarg : *mut *mut core::ffi::c_void) -> u32); - unsafe { NetValidatePasswordPolicyFree(core::mem::transmute(outputarg)) } + unsafe { NetValidatePasswordPolicyFree(outputarg as _) } } #[inline] pub unsafe fn NetWkstaGetInfo(servername: P0, level: u32, bufptr: Option<*mut *mut u8>) -> u32 @@ -1119,7 +1119,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetWkstaGetInfo(servername : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8) -> u32); - unsafe { NetWkstaGetInfo(servername.param().abi(), level, core::mem::transmute(bufptr.unwrap_or(core::mem::zeroed()))) } + unsafe { NetWkstaGetInfo(servername.param().abi(), level, bufptr.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetWkstaSetInfo(servername: P0, level: u32, buffer: *const u8, parm_err: Option<*mut u32>) -> u32 @@ -1127,12 +1127,12 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetWkstaSetInfo(servername : windows_core::PCWSTR, level : u32, buffer : *const u8, parm_err : *mut u32) -> u32); - unsafe { NetWkstaSetInfo(servername.param().abi(), level, buffer, core::mem::transmute(parm_err.unwrap_or(core::mem::zeroed()))) } + unsafe { NetWkstaSetInfo(servername.param().abi(), level, buffer, parm_err.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { NetWkstaTransportAdd(core::mem::transmute(servername.unwrap_or(core::mem::zeroed())), level, buf, core::mem::transmute(parm_err.unwrap_or(core::mem::zeroed()))) } + unsafe { NetWkstaTransportAdd(servername.unwrap_or(core::mem::zeroed()) as _, level, buf, parm_err.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetWkstaTransportDel(servername: P0, transportname: P1, ucond: FORCE_LEVEL_FLAGS) -> u32 @@ -1146,7 +1146,7 @@ where #[inline] pub unsafe fn NetWkstaTransportEnum(servername: Option<*const i8>, level: u32, bufptr: *mut *mut u8, prefmaxlen: u32, entriesread: *mut u32, totalentries: *mut u32, resume_handle: Option<*mut u32>) -> u32 { windows_targets::link!("netapi32.dll" "system" fn NetWkstaTransportEnum(servername : *const i8, level : u32, bufptr : *mut *mut u8, prefmaxlen : u32, entriesread : *mut u32, totalentries : *mut u32, resume_handle : *mut u32) -> u32); - unsafe { NetWkstaTransportEnum(core::mem::transmute(servername.unwrap_or(core::mem::zeroed())), level, core::mem::transmute(bufptr), prefmaxlen, core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::mem::zeroed()))) } + unsafe { NetWkstaTransportEnum(servername.unwrap_or(core::mem::zeroed()) as _, level, bufptr as _, prefmaxlen, entriesread as _, totalentries as _, resume_handle.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetWkstaUserEnum(servername: P0, level: u32, bufptr: Option<*mut *mut u8>, prefmaxlen: u32, entriesread: Option<*mut u32>, totalentries: *mut u32, resumehandle: Option<*mut u32>) -> u32 @@ -1154,7 +1154,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetWkstaUserEnum(servername : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8, prefmaxlen : u32, entriesread : *mut u32, totalentries : *mut u32, resumehandle : *mut u32) -> u32); - unsafe { NetWkstaUserEnum(servername.param().abi(), level, core::mem::transmute(bufptr.unwrap_or(core::mem::zeroed())), prefmaxlen, core::mem::transmute(entriesread.unwrap_or(core::mem::zeroed())), core::mem::transmute(totalentries), core::mem::transmute(resumehandle.unwrap_or(core::mem::zeroed()))) } + unsafe { NetWkstaUserEnum(servername.param().abi(), level, bufptr.unwrap_or(core::mem::zeroed()) as _, prefmaxlen, entriesread.unwrap_or(core::mem::zeroed()) as _, totalentries as _, resumehandle.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetWkstaUserGetInfo(reserved: P0, level: u32, bufptr: *mut *mut u8) -> u32 @@ -1162,7 +1162,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetWkstaUserGetInfo(reserved : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8) -> u32); - unsafe { NetWkstaUserGetInfo(reserved.param().abi(), level, core::mem::transmute(bufptr)) } + unsafe { NetWkstaUserGetInfo(reserved.param().abi(), level, bufptr as _) } } #[inline] pub unsafe fn NetWkstaUserSetInfo(reserved: P0, level: u32, buf: *const u8, parm_err: Option<*mut u32>) -> u32 @@ -1170,7 +1170,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetWkstaUserSetInfo(reserved : windows_core::PCWSTR, level : u32, buf : *const u8, parm_err : *mut u32) -> u32); - unsafe { NetWkstaUserSetInfo(reserved.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(core::mem::zeroed()))) } + unsafe { NetWkstaUserSetInfo(reserved.param().abi(), level, buf, parm_err.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RouterAssert(pszfailedassertion: P0, pszfilename: P1, dwlinenumber: u32, pszmessage: P3) @@ -1185,12 +1185,12 @@ where #[inline] pub unsafe fn RouterGetErrorStringA(dwerrorcode: u32, lplpszerrorstring: *mut windows_core::PSTR) -> u32 { windows_targets::link!("rtutils.dll" "system" fn RouterGetErrorStringA(dwerrorcode : u32, lplpszerrorstring : *mut windows_core::PSTR) -> u32); - unsafe { RouterGetErrorStringA(dwerrorcode, core::mem::transmute(lplpszerrorstring)) } + unsafe { RouterGetErrorStringA(dwerrorcode, lplpszerrorstring as _) } } #[inline] pub unsafe fn RouterGetErrorStringW(dwerrorcode: u32, lplpwszerrorstring: *mut windows_core::PWSTR) -> u32 { windows_targets::link!("rtutils.dll" "system" fn RouterGetErrorStringW(dwerrorcode : u32, lplpwszerrorstring : *mut windows_core::PWSTR) -> u32); - unsafe { RouterGetErrorStringW(dwerrorcode, core::mem::transmute(lplpwszerrorstring)) } + unsafe { RouterGetErrorStringW(dwerrorcode, lplpwszerrorstring as _) } } #[inline] pub unsafe fn RouterLogDeregisterA(hloghandle: super::super::Foundation::HANDLE) { @@ -1210,12 +1210,12 @@ pub unsafe fn RouterLogEventA(hloghandle: super::super::Foundation::HANDLE, dwev #[inline] 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)); - unsafe { RouterLogEventDataA(hloghandle, dweventtype, 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())), dwdatabytes, core::mem::transmute(lpdatabytes)) } + unsafe { RouterLogEventDataA(hloghandle, dweventtype, 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())), dwdatabytes, lpdatabytes as _) } } #[inline] 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)); - unsafe { RouterLogEventDataW(hloghandle, dweventtype, 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())), dwdatabytes, core::mem::transmute(lpdatabytes)) } + unsafe { RouterLogEventDataW(hloghandle, dweventtype, 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())), dwdatabytes, lpdatabytes as _) } } #[inline] pub unsafe fn RouterLogEventExA(hloghandle: super::super::Foundation::HANDLE, dweventtype: u32, dwerrorcode: u32, dwmessageid: u32, ptszformat: P4) @@ -1249,7 +1249,7 @@ where 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)); - unsafe { RouterLogEventValistExA(hloghandle, dweventtype, dwerrorcode, dwmessageid, ptszformat.param().abi(), core::mem::transmute(arglist)) } + unsafe { RouterLogEventValistExA(hloghandle, dweventtype, dwerrorcode, dwmessageid, ptszformat.param().abi(), arglist as _) } } #[inline] pub unsafe fn RouterLogEventValistExW(hloghandle: super::super::Foundation::HANDLE, dweventtype: u32, dwerrorcode: u32, dwmessageid: u32, ptszformat: P4, arglist: *mut i8) @@ -1257,7 +1257,7 @@ where 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)); - unsafe { RouterLogEventValistExW(hloghandle, dweventtype, dwerrorcode, dwmessageid, ptszformat.param().abi(), core::mem::transmute(arglist)) } + unsafe { RouterLogEventValistExW(hloghandle, dweventtype, dwerrorcode, dwmessageid, ptszformat.param().abi(), arglist as _) } } #[inline] pub unsafe fn RouterLogEventW(hloghandle: super::super::Foundation::HANDLE, dweventtype: u32, dwmessageid: u32, plpszsubstringarray: Option<&[windows_core::PCWSTR]>, dwerrorcode: u32) { @@ -1316,7 +1316,7 @@ where P6: windows_core::Param, { windows_targets::link!("rtutils.dll" "system" fn TraceDumpExA(dwtraceid : u32, dwflags : u32, lpbbytes : *mut u8, dwbytecount : u32, dwgroupsize : u32, baddressprefix : super::super::Foundation:: BOOL, lpszprefix : windows_core::PCSTR) -> u32); - unsafe { TraceDumpExA(dwtraceid, dwflags, core::mem::transmute(lpbbytes), dwbytecount, dwgroupsize, baddressprefix.into(), lpszprefix.param().abi()) } + unsafe { TraceDumpExA(dwtraceid, dwflags, lpbbytes as _, dwbytecount, dwgroupsize, baddressprefix.into(), lpszprefix.param().abi()) } } #[inline] pub unsafe fn TraceDumpExW(dwtraceid: u32, dwflags: u32, lpbbytes: *mut u8, dwbytecount: u32, dwgroupsize: u32, baddressprefix: bool, lpszprefix: P6) -> u32 @@ -1324,17 +1324,17 @@ where P6: windows_core::Param, { windows_targets::link!("rtutils.dll" "system" fn TraceDumpExW(dwtraceid : u32, dwflags : u32, lpbbytes : *mut u8, dwbytecount : u32, dwgroupsize : u32, baddressprefix : super::super::Foundation:: BOOL, lpszprefix : windows_core::PCWSTR) -> u32); - unsafe { TraceDumpExW(dwtraceid, dwflags, core::mem::transmute(lpbbytes), dwbytecount, dwgroupsize, baddressprefix.into(), lpszprefix.param().abi()) } + unsafe { TraceDumpExW(dwtraceid, dwflags, lpbbytes as _, dwbytecount, dwgroupsize, baddressprefix.into(), lpszprefix.param().abi()) } } #[inline] pub unsafe fn TraceGetConsoleA(dwtraceid: u32, lphconsole: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("rtutils.dll" "system" fn TraceGetConsoleA(dwtraceid : u32, lphconsole : *mut super::super::Foundation:: HANDLE) -> u32); - unsafe { TraceGetConsoleA(dwtraceid, core::mem::transmute(lphconsole)) } + unsafe { TraceGetConsoleA(dwtraceid, lphconsole as _) } } #[inline] pub unsafe fn TraceGetConsoleW(dwtraceid: u32, lphconsole: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("rtutils.dll" "system" fn TraceGetConsoleW(dwtraceid : u32, lphconsole : *mut super::super::Foundation:: HANDLE) -> u32); - unsafe { TraceGetConsoleW(dwtraceid, core::mem::transmute(lphconsole)) } + unsafe { TraceGetConsoleW(dwtraceid, lphconsole as _) } } #[inline] pub unsafe fn TracePrintfA(dwtraceid: u32, lpszformat: P1) -> u32 @@ -1406,7 +1406,7 @@ where P2: windows_core::Param, { windows_targets::link!("rtutils.dll" "system" fn TraceVprintfExA(dwtraceid : u32, dwflags : u32, lpszformat : windows_core::PCSTR, arglist : *mut i8) -> u32); - unsafe { TraceVprintfExA(dwtraceid, dwflags, lpszformat.param().abi(), core::mem::transmute(arglist)) } + unsafe { TraceVprintfExA(dwtraceid, dwflags, lpszformat.param().abi(), arglist as _) } } #[inline] pub unsafe fn TraceVprintfExW(dwtraceid: u32, dwflags: u32, lpszformat: P2, arglist: *mut i8) -> u32 @@ -1414,7 +1414,7 @@ where P2: windows_core::Param, { windows_targets::link!("rtutils.dll" "system" fn TraceVprintfExW(dwtraceid : u32, dwflags : u32, lpszformat : windows_core::PCWSTR, arglist : *mut i8) -> u32); - unsafe { TraceVprintfExW(dwtraceid, dwflags, lpszformat.param().abi(), core::mem::transmute(arglist)) } + unsafe { TraceVprintfExW(dwtraceid, dwflags, lpszformat.param().abi(), arglist as _) } } pub const AA_AUDIT_ALL: u32 = 1u32; pub const AA_A_ACL: u32 = 32768u32; @@ -2720,7 +2720,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -2729,7 +2729,7 @@ impl IEnumNetCfgBindingInterface { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenum.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), ppenum.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -2789,7 +2789,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -2798,7 +2798,7 @@ impl IEnumNetCfgBindingPath { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenum.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), ppenum.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -2858,7 +2858,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -2867,7 +2867,7 @@ impl IEnumNetCfgComponent { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenum.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), ppenum.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -2929,7 +2929,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<()> { - unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), pvreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Uninitialize(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Uninitialize)(windows_core::Interface::as_raw(self)).ok() } @@ -2941,16 +2941,16 @@ impl INetCfg { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).EnumComponents)(windows_core::Interface::as_raw(self), pguidclass, core::mem::transmute(ppenumcomponent.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumComponents)(windows_core::Interface::as_raw(self), pguidclass, ppenumcomponent.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn FindComponent(&self, pszwinfid: P0, pcomponent: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).FindComponent)(windows_core::Interface::as_raw(self), pszwinfid.param().abi(), pcomponent.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).QueryNetCfgClass)(windows_core::Interface::as_raw(self), pguidclass, riid, core::mem::transmute(ppvobject.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryNetCfgClass)(windows_core::Interface::as_raw(self), pguidclass, riid, ppvobject.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -3037,13 +3037,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<()> { - unsafe { (windows_core::Interface::vtable(self).GetName)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszwinterfacename.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetName)(windows_core::Interface::as_raw(self), ppszwinterfacename.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetUpperComponent(&self, ppnccitem: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetUpperComponent)(windows_core::Interface::as_raw(self), core::mem::transmute(ppnccitem.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUpperComponent)(windows_core::Interface::as_raw(self), ppnccitem.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetLowerComponent(&self, ppnccitem: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLowerComponent)(windows_core::Interface::as_raw(self), core::mem::transmute(ppnccitem.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLowerComponent)(windows_core::Interface::as_raw(self), ppnccitem.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -3112,10 +3112,10 @@ impl INetCfgBindingPath { unsafe { (windows_core::Interface::vtable(self).Enable)(windows_core::Interface::as_raw(self), fenable.into()).ok() } } pub unsafe fn GetPathToken(&self, ppszwpathtoken: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPathToken)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszwpathtoken.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPathToken)(windows_core::Interface::as_raw(self), ppszwpathtoken.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetOwner(&self, ppcomponent: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOwner)(windows_core::Interface::as_raw(self), core::mem::transmute(ppcomponent.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOwner)(windows_core::Interface::as_raw(self), ppcomponent.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetDepth(&self) -> windows_core::Result { unsafe { @@ -3124,7 +3124,7 @@ impl INetCfgBindingPath { } } pub unsafe fn EnumBindingInterfaces(&self, ppenuminterface: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumBindingInterfaces)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenuminterface.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumBindingInterfaces)(windows_core::Interface::as_raw(self), ppenuminterface.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -3229,10 +3229,10 @@ impl INetCfgClass { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).FindComponent)(windows_core::Interface::as_raw(self), pszwinfid.param().abi(), ppnccitem.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn EnumComponents(&self, ppenumcomponent: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumComponents)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenumcomponent.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumComponents)(windows_core::Interface::as_raw(self), ppenumcomponent.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -3274,7 +3274,7 @@ windows_core::imp::define_interface!(INetCfgClassSetup, INetCfgClassSetup_Vtbl, windows_core::imp::interface_hierarchy!(INetCfgClassSetup, windows_core::IUnknown); impl INetCfgClassSetup { pub unsafe fn SelectAndInstall(&self, hwndparent: super::super::Foundation::HWND, pobotoken: Option<*const OBO_TOKEN>, ppnccitem: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SelectAndInstall)(windows_core::Interface::as_raw(self), hwndparent, core::mem::transmute(pobotoken.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppnccitem.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SelectAndInstall)(windows_core::Interface::as_raw(self), hwndparent, pobotoken.unwrap_or(core::mem::zeroed()) as _, ppnccitem.unwrap_or(core::mem::zeroed()) as _).ok() } } 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 @@ -3282,13 +3282,13 @@ impl INetCfgClassSetup { P4: windows_core::Param, P5: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Install)(windows_core::Interface::as_raw(self), pszwinfid.param().abi(), pobotoken.unwrap_or(core::mem::zeroed()) as _, dwsetupflags.unwrap_or(core::mem::zeroed()) as _, dwupgradefrombuildno.unwrap_or(core::mem::zeroed()) as _, pszwanswerfile.param().abi(), pszwanswersections.param().abi(), ppnccitem.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).DeInstall)(windows_core::Interface::as_raw(self), pcomponent.param().abi(), pobotoken.unwrap_or(core::mem::zeroed()) as _, pmszwrefs.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -3348,7 +3348,7 @@ impl INetCfgClassSetup2 { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).UpdateNonEnumeratedComponent)(windows_core::Interface::as_raw(self), picomp.param().abi(), dwsetupflags.unwrap_or(core::mem::zeroed()) as _, dwupgradefrombuildno.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -3378,7 +3378,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<()> { - unsafe { (windows_core::Interface::vtable(self).GetDisplayName)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszwdisplayname.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDisplayName)(windows_core::Interface::as_raw(self), ppszwdisplayname.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetDisplayName(&self, pszwdisplayname: P0) -> windows_core::Result<()> where @@ -3387,10 +3387,10 @@ impl INetCfgComponent { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).GetHelpText)(windows_core::Interface::as_raw(self), core::mem::transmute(pszwhelptext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetHelpText)(windows_core::Interface::as_raw(self), pszwhelptext.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetId(&self, ppszwid: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetId)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszwid.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetId)(windows_core::Interface::as_raw(self), ppszwid.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetCharacteristics(&self) -> windows_core::Result { unsafe { @@ -3399,16 +3399,16 @@ impl INetCfgComponent { } } pub unsafe fn GetInstanceGuid(&self, pguid: Option<*mut windows_core::GUID>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInstanceGuid)(windows_core::Interface::as_raw(self), core::mem::transmute(pguid.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInstanceGuid)(windows_core::Interface::as_raw(self), pguid.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetPnpDevNodeId(&self, ppszwdevnodeid: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPnpDevNodeId)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszwdevnodeid.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPnpDevNodeId)(windows_core::Interface::as_raw(self), ppszwdevnodeid.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetClassGuid(&self, pguid: Option<*mut windows_core::GUID>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClassGuid)(windows_core::Interface::as_raw(self), core::mem::transmute(pguid.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClassGuid)(windows_core::Interface::as_raw(self), pguid.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetBindName(&self, ppszwbindname: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBindName)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszwbindname.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBindName)(windows_core::Interface::as_raw(self), ppszwbindname.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetDeviceStatus(&self) -> windows_core::Result { unsafe { @@ -3418,13 +3418,13 @@ impl INetCfgComponent { } #[cfg(feature = "Win32_System_Registry")] pub unsafe fn OpenParamKey(&self, phkey: Option<*mut super::super::System::Registry::HKEY>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OpenParamKey)(windows_core::Interface::as_raw(self), core::mem::transmute(phkey.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).OpenParamKey)(windows_core::Interface::as_raw(self), phkey.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn RaisePropertyUi(&self, hwndparent: Option, dwflags: u32, punkcontext: P2) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).RaisePropertyUi)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), dwflags, punkcontext.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).RaisePropertyUi)(windows_core::Interface::as_raw(self), hwndparent.unwrap_or(core::mem::zeroed()) as _, dwflags, punkcontext.param().abi()).ok() } } } #[repr(C)] @@ -3604,7 +3604,7 @@ impl INetCfgComponentBindings { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).EnumBindingPaths)(windows_core::Interface::as_raw(self), dwflags, core::mem::transmute(ppienum.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumBindingPaths)(windows_core::Interface::as_raw(self), dwflags, ppienum.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn MoveBefore(&self, pncbitemsrc: P0, pncbitemdest: P1) -> windows_core::Result<()> where @@ -3940,7 +3940,7 @@ impl INetCfgComponentPropertyUi { unsafe { (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: super::super::Foundation::HWND, pszstartpage: Option<*const windows_core::PCWSTR>) -> windows_core::Result<()> { - unsafe { (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, core::mem::transmute(pszstartpage.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).MergePropPages)(windows_core::Interface::as_raw(self), pdwdefpages as _, pahpspprivate as _, pcpages as _, hwndparent, pszstartpage.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ValidateProperties(&self, hwndsheet: super::super::Foundation::HWND) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ValidateProperties)(windows_core::Interface::as_raw(self), hwndsheet).ok() } @@ -4156,7 +4156,7 @@ impl INetCfgComponentUpperEdge { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetInterfaceIdsForAdapter)(windows_core::Interface::as_raw(self), padapter.param().abi(), pdwnuminterfaces as _, ppguidinterfaceids.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn AddInterfacesToAdapter(&self, padapter: P0, dwnuminterfaces: u32) -> windows_core::Result<()> where @@ -4222,13 +4222,13 @@ impl INetCfgLock { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).AcquireWriteLock)(windows_core::Interface::as_raw(self), cmstimeout, pszwclientdescription.param().abi(), core::mem::transmute(ppszwclientdescription.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).AcquireWriteLock)(windows_core::Interface::as_raw(self), cmstimeout, pszwclientdescription.param().abi(), ppszwclientdescription.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReleaseWriteLock(&self) -> windows_core::Result<()> { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).IsWriteLocked)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszwclientdescription.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).IsWriteLocked)(windows_core::Interface::as_raw(self), ppszwclientdescription.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -4439,7 +4439,7 @@ windows_core::imp::define_interface!(INetRasConnectionIpUiInfo, INetRasConnectio windows_core::imp::interface_hierarchy!(INetRasConnectionIpUiInfo, windows_core::IUnknown); impl INetRasConnectionIpUiInfo { pub unsafe fn GetUiInfo(&self, pinfo: *mut RASCON_IPUI) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetUiInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUiInfo)(windows_core::Interface::as_raw(self), pinfo as _).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 527d0f215f..5ae29421cc 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetShell/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetShell/mod.rs @@ -4,7 +4,7 @@ where 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); - unsafe { MatchEnumTag(hmodule, pwcarg.param().abi(), dwnumarg, penumtable, core::mem::transmute(pdwvalue)) } + unsafe { MatchEnumTag(hmodule, pwcarg.param().abi(), dwnumarg, penumtable, pdwvalue as _) } } #[inline] pub unsafe fn MatchToken(pwszusertoken: P0, pwszcmdtoken: P1) -> super::super::Foundation::BOOL @@ -18,7 +18,7 @@ where #[inline] 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); - unsafe { PreprocessCommand(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppwcarguments.as_ptr()), dwcurrentindex, ppwcarguments.len().try_into().unwrap(), core::mem::transmute(ptttags.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ptttags.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dwminargs, dwmaxargs, core::mem::transmute(pdwtagtype.unwrap_or(core::mem::zeroed()))) } + unsafe { PreprocessCommand(hmodule.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(ppwcarguments.as_ptr()), dwcurrentindex, ppwcarguments.len().try_into().unwrap(), core::mem::transmute(ptttags.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ptttags.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dwminargs, dwmaxargs, pdwtagtype.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn PrintError(hmodule: super::super::Foundation::HANDLE, dwerrid: u32) -> u32 { diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetworkDiagnosticsFramework/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetworkDiagnosticsFramework/mod.rs index e10282ee23..6f2e4e9b51 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetworkDiagnosticsFramework/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetworkDiagnosticsFramework/mod.rs @@ -6,12 +6,12 @@ pub unsafe fn NdfCancelIncident(handle: *const core::ffi::c_void) -> windows_cor #[inline] pub unsafe fn NdfCloseIncident(handle: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("ndfapi.dll" "system" fn NdfCloseIncident(handle : *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { NdfCloseIncident(core::mem::transmute(handle)).ok() } + unsafe { NdfCloseIncident(handle as _).ok() } } #[inline] pub unsafe fn NdfCreateConnectivityIncident(handle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("ndfapi.dll" "system" fn NdfCreateConnectivityIncident(handle : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { NdfCreateConnectivityIncident(core::mem::transmute(handle)).ok() } + unsafe { NdfCreateConnectivityIncident(handle as _).ok() } } #[inline] pub unsafe fn NdfCreateDNSIncident(hostname: P0, querytype: u16, handle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -19,7 +19,7 @@ where P0: windows_core::Param, { windows_targets::link!("ndfapi.dll" "system" fn NdfCreateDNSIncident(hostname : windows_core::PCWSTR, querytype : u16, handle : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { NdfCreateDNSIncident(hostname.param().abi(), querytype, core::mem::transmute(handle)).ok() } + unsafe { NdfCreateDNSIncident(hostname.param().abi(), querytype, handle as _).ok() } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -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); - unsafe { 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() } + unsafe { NdfCreateGroupingIncident(cloudname.param().abi(), groupname.param().abi(), identity.param().abi(), invitation.param().abi(), addresses.unwrap_or(core::mem::zeroed()) as _, appid.param().abi(), handle as _).ok() } } #[inline] pub unsafe fn NdfCreateIncident(helperclassname: P0, attributes: &[HELPER_ATTRIBUTE], handle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -40,12 +40,12 @@ where P0: windows_core::Param, { windows_targets::link!("ndfapi.dll" "system" fn NdfCreateIncident(helperclassname : windows_core::PCWSTR, celt : u32, attributes : *const HELPER_ATTRIBUTE, handle : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { NdfCreateIncident(helperclassname.param().abi(), attributes.len().try_into().unwrap(), core::mem::transmute(attributes.as_ptr()), core::mem::transmute(handle)).ok() } + unsafe { NdfCreateIncident(helperclassname.param().abi(), attributes.len().try_into().unwrap(), core::mem::transmute(attributes.as_ptr()), handle as _).ok() } } #[inline] pub unsafe fn NdfCreateNetConnectionIncident(handle: *mut *mut core::ffi::c_void, id: windows_core::GUID) -> windows_core::Result<()> { windows_targets::link!("ndfapi.dll" "system" fn NdfCreateNetConnectionIncident(handle : *mut *mut core::ffi::c_void, id : windows_core::GUID) -> windows_core::HRESULT); - unsafe { NdfCreateNetConnectionIncident(core::mem::transmute(handle), core::mem::transmute(id)).ok() } + unsafe { NdfCreateNetConnectionIncident(handle as _, core::mem::transmute(id)).ok() } } #[inline] pub unsafe fn NdfCreatePnrpIncident(cloudname: P0, peername: P1, diagnosepublish: bool, appid: P3, handle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -55,7 +55,7 @@ where P3: windows_core::Param, { windows_targets::link!("ndfapi.dll" "system" fn NdfCreatePnrpIncident(cloudname : windows_core::PCWSTR, peername : windows_core::PCWSTR, diagnosepublish : super::super::Foundation:: BOOL, appid : windows_core::PCWSTR, handle : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { NdfCreatePnrpIncident(cloudname.param().abi(), peername.param().abi(), diagnosepublish.into(), appid.param().abi(), core::mem::transmute(handle)).ok() } + unsafe { NdfCreatePnrpIncident(cloudname.param().abi(), peername.param().abi(), diagnosepublish.into(), appid.param().abi(), handle as _).ok() } } #[inline] pub unsafe fn NdfCreateSharingIncident(uncpath: P0, handle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -63,7 +63,7 @@ where P0: windows_core::Param, { windows_targets::link!("ndfapi.dll" "system" fn NdfCreateSharingIncident(uncpath : windows_core::PCWSTR, handle : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { NdfCreateSharingIncident(uncpath.param().abi(), core::mem::transmute(handle)).ok() } + unsafe { NdfCreateSharingIncident(uncpath.param().abi(), handle as _).ok() } } #[inline] pub unsafe fn NdfCreateWebIncident(url: P0, handle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -71,7 +71,7 @@ where P0: windows_core::Param, { windows_targets::link!("ndfapi.dll" "system" fn NdfCreateWebIncident(url : windows_core::PCWSTR, handle : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { NdfCreateWebIncident(url.param().abi(), core::mem::transmute(handle)).ok() } + unsafe { NdfCreateWebIncident(url.param().abi(), handle as _).ok() } } #[inline] pub unsafe fn NdfCreateWebIncidentEx(url: P0, usewinhttp: bool, modulename: P2, handle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -80,7 +80,7 @@ where P2: windows_core::Param, { windows_targets::link!("ndfapi.dll" "system" fn NdfCreateWebIncidentEx(url : windows_core::PCWSTR, usewinhttp : super::super::Foundation:: BOOL, modulename : windows_core::PCWSTR, handle : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { NdfCreateWebIncidentEx(url.param().abi(), usewinhttp.into(), modulename.param().abi(), core::mem::transmute(handle)).ok() } + unsafe { NdfCreateWebIncidentEx(url.param().abi(), usewinhttp.into(), modulename.param().abi(), handle as _).ok() } } #[cfg(all(feature = "Win32_Networking_WinSock", feature = "Win32_Security"))] #[inline] @@ -90,17 +90,17 @@ where 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); - unsafe { NdfCreateWinSockIncident(sock, host.param().abi(), port, appid.param().abi(), core::mem::transmute(userid.unwrap_or(core::mem::zeroed())), core::mem::transmute(handle)).ok() } + unsafe { NdfCreateWinSockIncident(sock, host.param().abi(), port, appid.param().abi(), userid.unwrap_or(core::mem::zeroed()) as _, handle as _).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<()> { windows_targets::link!("ndfapi.dll" "system" fn NdfDiagnoseIncident(handle : *const core::ffi::c_void, rootcausecount : *mut u32, rootcauses : *mut *mut RootCauseInfo, dwwait : u32, dwflags : u32) -> windows_core::HRESULT); - unsafe { NdfDiagnoseIncident(handle, core::mem::transmute(rootcausecount), core::mem::transmute(rootcauses), dwwait, dwflags).ok() } + unsafe { NdfDiagnoseIncident(handle, rootcausecount as _, rootcauses as _, dwwait, dwflags).ok() } } #[inline] 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); - unsafe { NdfExecuteDiagnosis(handle, core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { NdfExecuteDiagnosis(handle, hwnd.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn NdfGetTraceFile(handle: *const core::ffi::c_void) -> windows_core::Result { @@ -240,7 +240,7 @@ windows_core::imp::define_interface!(INetDiagExtensibleHelper, INetDiagExtensibl windows_core::imp::interface_hierarchy!(INetDiagExtensibleHelper, windows_core::IUnknown); impl INetDiagExtensibleHelper { pub unsafe fn ResolveAttributes(&self, rgkeyattributes: &[HELPER_ATTRIBUTE], pcelt: *mut u32, prgmatchvalues: *mut *mut HELPER_ATTRIBUTE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ResolveAttributes)(windows_core::Interface::as_raw(self), rgkeyattributes.len().try_into().unwrap(), core::mem::transmute(rgkeyattributes.as_ptr()), core::mem::transmute(pcelt), core::mem::transmute(prgmatchvalues)).ok() } + unsafe { (windows_core::Interface::vtable(self).ResolveAttributes)(windows_core::Interface::as_raw(self), rgkeyattributes.len().try_into().unwrap(), core::mem::transmute(rgkeyattributes.as_ptr()), pcelt as _, prgmatchvalues as _).ok() } } } #[repr(C)] @@ -279,40 +279,40 @@ impl INetDiagHelper { } } pub unsafe fn GetKeyAttributes(&self, pcelt: *mut u32, pprgattributes: *mut *mut HELPER_ATTRIBUTE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetKeyAttributes)(windows_core::Interface::as_raw(self), core::mem::transmute(pcelt), core::mem::transmute(pprgattributes)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetKeyAttributes)(windows_core::Interface::as_raw(self), pcelt as _, pprgattributes as _).ok() } } pub unsafe fn LowHealth(&self, pwszinstancedescription: P0, ppwszdescription: *mut windows_core::PWSTR, pdeferredtime: *mut i32, pstatus: *mut DIAGNOSIS_STATUS) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).LowHealth)(windows_core::Interface::as_raw(self), pwszinstancedescription.param().abi(), core::mem::transmute(ppwszdescription), core::mem::transmute(pdeferredtime), core::mem::transmute(pstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).LowHealth)(windows_core::Interface::as_raw(self), pwszinstancedescription.param().abi(), ppwszdescription as _, pdeferredtime as _, pstatus as _).ok() } } pub unsafe fn HighUtilization(&self, pwszinstancedescription: P0, ppwszdescription: *mut windows_core::PWSTR, pdeferredtime: *mut i32, pstatus: *mut DIAGNOSIS_STATUS) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).HighUtilization)(windows_core::Interface::as_raw(self), pwszinstancedescription.param().abi(), core::mem::transmute(ppwszdescription), core::mem::transmute(pdeferredtime), core::mem::transmute(pstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).HighUtilization)(windows_core::Interface::as_raw(self), pwszinstancedescription.param().abi(), ppwszdescription as _, pdeferredtime as _, pstatus as _).ok() } } pub unsafe fn GetLowerHypotheses(&self, pcelt: *mut u32, pprghypotheses: *mut *mut HYPOTHESIS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLowerHypotheses)(windows_core::Interface::as_raw(self), core::mem::transmute(pcelt), core::mem::transmute(pprghypotheses)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLowerHypotheses)(windows_core::Interface::as_raw(self), pcelt as _, pprghypotheses as _).ok() } } pub unsafe fn GetDownStreamHypotheses(&self, pcelt: *mut u32, pprghypotheses: *mut *mut HYPOTHESIS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDownStreamHypotheses)(windows_core::Interface::as_raw(self), core::mem::transmute(pcelt), core::mem::transmute(pprghypotheses)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDownStreamHypotheses)(windows_core::Interface::as_raw(self), pcelt as _, pprghypotheses as _).ok() } } pub unsafe fn GetHigherHypotheses(&self, pcelt: *mut u32, pprghypotheses: *mut *mut HYPOTHESIS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetHigherHypotheses)(windows_core::Interface::as_raw(self), core::mem::transmute(pcelt), core::mem::transmute(pprghypotheses)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetHigherHypotheses)(windows_core::Interface::as_raw(self), pcelt as _, pprghypotheses as _).ok() } } pub unsafe fn GetUpStreamHypotheses(&self, pcelt: *mut u32, pprghypotheses: *mut *mut HYPOTHESIS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetUpStreamHypotheses)(windows_core::Interface::as_raw(self), core::mem::transmute(pcelt), core::mem::transmute(pprghypotheses)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUpStreamHypotheses)(windows_core::Interface::as_raw(self), pcelt as _, pprghypotheses as _).ok() } } pub unsafe fn Repair(&self, pinfo: *const RepairInfo, pdeferredtime: *mut i32, pstatus: *mut REPAIR_STATUS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Repair)(windows_core::Interface::as_raw(self), pinfo, core::mem::transmute(pdeferredtime), core::mem::transmute(pstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).Repair)(windows_core::Interface::as_raw(self), pinfo, pdeferredtime as _, pstatus as _).ok() } } pub unsafe fn Validate(&self, problem: PROBLEM_TYPE, pdeferredtime: *mut i32, pstatus: *mut REPAIR_STATUS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Validate)(windows_core::Interface::as_raw(self), problem, core::mem::transmute(pdeferredtime), core::mem::transmute(pstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).Validate)(windows_core::Interface::as_raw(self), problem, pdeferredtime as _, pstatus as _).ok() } } pub unsafe fn GetRepairInfo(&self, problem: PROBLEM_TYPE, pcelt: *mut u32, ppinfo: *mut *mut RepairInfo) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRepairInfo)(windows_core::Interface::as_raw(self), problem, core::mem::transmute(pcelt), core::mem::transmute(ppinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRepairInfo)(windows_core::Interface::as_raw(self), problem, pcelt as _, ppinfo as _).ok() } } pub unsafe fn GetLifeTime(&self) -> windows_core::Result { unsafe { @@ -330,7 +330,7 @@ impl INetDiagHelper { } } pub unsafe fn GetAttributes(&self, pcelt: *mut u32, pprgattributes: *mut *mut HELPER_ATTRIBUTE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAttributes)(windows_core::Interface::as_raw(self), core::mem::transmute(pcelt), core::mem::transmute(pprgattributes)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAttributes)(windows_core::Interface::as_raw(self), pcelt as _, pprgattributes as _).ok() } } pub unsafe fn Cancel(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Cancel)(windows_core::Interface::as_raw(self)).ok() } @@ -540,7 +540,7 @@ windows_core::imp::define_interface!(INetDiagHelperEx, INetDiagHelperEx_Vtbl, 0x windows_core::imp::interface_hierarchy!(INetDiagHelperEx, windows_core::IUnknown); impl INetDiagHelperEx { pub unsafe fn ReconfirmLowHealth(&self, presults: &[HypothesisResult], ppwszupdateddescription: *mut windows_core::PWSTR, pupdatedstatus: *mut DIAGNOSIS_STATUS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReconfirmLowHealth)(windows_core::Interface::as_raw(self), presults.len().try_into().unwrap(), core::mem::transmute(presults.as_ptr()), core::mem::transmute(ppwszupdateddescription), core::mem::transmute(pupdatedstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReconfirmLowHealth)(windows_core::Interface::as_raw(self), presults.len().try_into().unwrap(), core::mem::transmute(presults.as_ptr()), ppwszupdateddescription as _, pupdatedstatus as _).ok() } } pub unsafe fn SetUtilities(&self, putilities: P0) -> windows_core::Result<()> where @@ -600,7 +600,7 @@ windows_core::imp::define_interface!(INetDiagHelperInfo, INetDiagHelperInfo_Vtbl windows_core::imp::interface_hierarchy!(INetDiagHelperInfo, windows_core::IUnknown); impl INetDiagHelperInfo { pub unsafe fn GetAttributeInfo(&self, pcelt: *mut u32, pprgattributeinfos: *mut *mut HelperAttributeInfo) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAttributeInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pcelt), core::mem::transmute(pprgattributeinfos)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAttributeInfo)(windows_core::Interface::as_raw(self), pcelt as _, pprgattributeinfos as _).ok() } } } #[repr(C)] 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 289b4e2ca2..fdc5efa0c1 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/P2P/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/P2P/mod.rs @@ -23,7 +23,7 @@ pub unsafe fn DrtCreateDerivedKeySecurityProvider(prootcert: *const super::super 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); unsafe { let mut result__ = core::mem::zeroed(); - DrtCreateDerivedKeySecurityProvider(prootcert, core::mem::transmute(plocalcert.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + DrtCreateDerivedKeySecurityProvider(prootcert, plocalcert.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -40,7 +40,7 @@ where #[inline] pub unsafe fn DrtCreateIpv6UdpTransport(scope: DRT_SCOPE, dwscopeid: u32, dwlocalitythreshold: u32, pwport: *mut u16, phtransport: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("drttransport.dll" "system" fn DrtCreateIpv6UdpTransport(scope : DRT_SCOPE, dwscopeid : u32, dwlocalitythreshold : u32, pwport : *mut u16, phtransport : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { DrtCreateIpv6UdpTransport(scope, dwscopeid, dwlocalitythreshold, core::mem::transmute(pwport), core::mem::transmute(phtransport)).ok() } + unsafe { DrtCreateIpv6UdpTransport(scope, dwscopeid, dwlocalitythreshold, pwport as _, phtransport as _).ok() } } #[inline] pub unsafe fn DrtCreateNullSecurityProvider() -> windows_core::Result<*mut DRT_SECURITY_PROVIDER> { @@ -97,7 +97,7 @@ pub unsafe fn DrtEndSearch(hsearchcontext: *const core::ffi::c_void) -> windows_ #[inline] pub unsafe fn DrtGetEventData(hdrt: *const core::ffi::c_void, uleventdatalen: u32, peventdata: *mut DRT_EVENT_DATA) -> windows_core::Result<()> { windows_targets::link!("drt.dll" "system" fn DrtGetEventData(hdrt : *const core::ffi::c_void, uleventdatalen : u32, peventdata : *mut DRT_EVENT_DATA) -> windows_core::HRESULT); - unsafe { DrtGetEventData(hdrt, uleventdatalen, core::mem::transmute(peventdata)).ok() } + unsafe { DrtGetEventData(hdrt, uleventdatalen, peventdata as _).ok() } } #[inline] pub unsafe fn DrtGetEventDataSize(hdrt: *const core::ffi::c_void) -> windows_core::Result { @@ -124,7 +124,7 @@ pub unsafe fn DrtGetInstanceNameSize(hdrt: *const core::ffi::c_void) -> windows_ #[inline] pub unsafe fn DrtGetSearchPath(hsearchcontext: *const core::ffi::c_void, ulsearchpathsize: u32, psearchpath: *mut DRT_ADDRESS_LIST) -> windows_core::Result<()> { windows_targets::link!("drt.dll" "system" fn DrtGetSearchPath(hsearchcontext : *const core::ffi::c_void, ulsearchpathsize : u32, psearchpath : *mut DRT_ADDRESS_LIST) -> windows_core::HRESULT); - unsafe { DrtGetSearchPath(hsearchcontext, ulsearchpathsize, core::mem::transmute(psearchpath)).ok() } + unsafe { DrtGetSearchPath(hsearchcontext, ulsearchpathsize, psearchpath as _).ok() } } #[inline] pub unsafe fn DrtGetSearchPathSize(hsearchcontext: *const core::ffi::c_void) -> windows_core::Result { @@ -137,7 +137,7 @@ pub unsafe fn DrtGetSearchPathSize(hsearchcontext: *const core::ffi::c_void) -> #[inline] pub unsafe fn DrtGetSearchResult(hsearchcontext: *const core::ffi::c_void, ulsearchresultsize: u32, psearchresult: *mut DRT_SEARCH_RESULT) -> windows_core::Result<()> { windows_targets::link!("drt.dll" "system" fn DrtGetSearchResult(hsearchcontext : *const core::ffi::c_void, ulsearchresultsize : u32, psearchresult : *mut DRT_SEARCH_RESULT) -> windows_core::HRESULT); - unsafe { DrtGetSearchResult(hsearchcontext, ulsearchresultsize, core::mem::transmute(psearchresult)).ok() } + unsafe { DrtGetSearchResult(hsearchcontext, ulsearchresultsize, psearchresult as _).ok() } } #[inline] pub unsafe fn DrtGetSearchResultSize(hsearchcontext: *const core::ffi::c_void) -> windows_core::Result { @@ -150,17 +150,17 @@ pub unsafe fn DrtGetSearchResultSize(hsearchcontext: *const core::ffi::c_void) - #[inline] 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); - unsafe { DrtOpen(psettings, core::mem::transmute(hevent.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(phdrt)).ok() } + unsafe { DrtOpen(psettings, hevent.unwrap_or(core::mem::zeroed()) as _, pvcontext.unwrap_or(core::mem::zeroed()) as _, phdrt as _).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); - unsafe { DrtRegisterKey(hdrt, pregistration, core::mem::transmute(pvkeycontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(phkeyregistration)).ok() } + unsafe { DrtRegisterKey(hdrt, pregistration, pvkeycontext.unwrap_or(core::mem::zeroed()) as _, phkeyregistration as _).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: 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); - unsafe { DrtStartSearch(hdrt, pkey, core::mem::transmute(pinfo.unwrap_or(core::mem::zeroed())), timeout, hevent, core::mem::transmute(pvcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(hsearchcontext)).ok() } + unsafe { DrtStartSearch(hdrt, pkey, pinfo.unwrap_or(core::mem::zeroed()) as _, timeout, hevent, pvcontext.unwrap_or(core::mem::zeroed()) as _, hsearchcontext as _).ok() } } #[inline] pub unsafe fn DrtUnregisterKey(hkeyregistration: *const core::ffi::c_void) { @@ -178,19 +178,19 @@ 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); - unsafe { PeerCollabAddContact(pwzcontactdata.param().abi(), core::mem::transmute(ppcontact.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { PeerCollabAddContact(pwzcontactdata.param().abi(), ppcontact.unwrap_or(core::mem::zeroed()) as _).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: 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); - unsafe { PeerCollabAsyncInviteContact(core::mem::transmute(pccontact.unwrap_or(core::mem::zeroed())), pcendpoint, pcinvitation, core::mem::transmute(hevent.unwrap_or(core::mem::zeroed())), core::mem::transmute(phinvitation.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { PeerCollabAsyncInviteContact(pccontact.unwrap_or(core::mem::zeroed()) as _, pcendpoint, pcinvitation, hevent.unwrap_or(core::mem::zeroed()) as _, phinvitation.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] 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); - unsafe { PeerCollabAsyncInviteEndpoint(pcendpoint, pcinvitation, core::mem::transmute(hevent.unwrap_or(core::mem::zeroed())), core::mem::transmute(phinvitation.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { PeerCollabAsyncInviteEndpoint(pcendpoint, pcinvitation, hevent.unwrap_or(core::mem::zeroed()) as _, phinvitation.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn PeerCollabCancelInvitation(hinvitation: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -224,34 +224,34 @@ pub unsafe fn PeerCollabDeleteObject(pobjectid: *const windows_core::GUID) -> wi #[inline] pub unsafe fn PeerCollabEnumApplicationRegistrationInfo(registrationtype: PEER_APPLICATION_REGISTRATION_TYPE, phpeerenum: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("p2p.dll" "system" fn PeerCollabEnumApplicationRegistrationInfo(registrationtype : PEER_APPLICATION_REGISTRATION_TYPE, phpeerenum : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PeerCollabEnumApplicationRegistrationInfo(registrationtype, core::mem::transmute(phpeerenum)).ok() } + unsafe { PeerCollabEnumApplicationRegistrationInfo(registrationtype, phpeerenum as _).ok() } } #[cfg(feature = "Win32_Networking_WinSock")] #[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); - unsafe { PeerCollabEnumApplications(core::mem::transmute(pcendpoint.unwrap_or(core::mem::zeroed())), core::mem::transmute(papplicationid.unwrap_or(core::mem::zeroed())), core::mem::transmute(phpeerenum)).ok() } + unsafe { PeerCollabEnumApplications(pcendpoint.unwrap_or(core::mem::zeroed()) as _, papplicationid.unwrap_or(core::mem::zeroed()) as _, phpeerenum as _).ok() } } #[inline] pub unsafe fn PeerCollabEnumContacts(phpeerenum: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("p2p.dll" "system" fn PeerCollabEnumContacts(phpeerenum : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PeerCollabEnumContacts(core::mem::transmute(phpeerenum)).ok() } + unsafe { PeerCollabEnumContacts(phpeerenum as _).ok() } } #[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); - unsafe { PeerCollabEnumEndpoints(core::mem::transmute(pccontact.unwrap_or(core::mem::zeroed())), core::mem::transmute(phpeerenum)).ok() } + unsafe { PeerCollabEnumEndpoints(pccontact.unwrap_or(core::mem::zeroed()) as _, phpeerenum as _).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); - unsafe { PeerCollabEnumObjects(core::mem::transmute(pcendpoint.unwrap_or(core::mem::zeroed())), core::mem::transmute(pobjectid.unwrap_or(core::mem::zeroed())), core::mem::transmute(phpeerenum)).ok() } + unsafe { PeerCollabEnumObjects(pcendpoint.unwrap_or(core::mem::zeroed()) as _, pobjectid.unwrap_or(core::mem::zeroed()) as _, phpeerenum as _).ok() } } #[inline] pub unsafe fn PeerCollabEnumPeopleNearMe(phpeerenum: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("p2p.dll" "system" fn PeerCollabEnumPeopleNearMe(phpeerenum : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PeerCollabEnumPeopleNearMe(core::mem::transmute(phpeerenum)).ok() } + unsafe { PeerCollabEnumPeopleNearMe(phpeerenum as _).ok() } } #[inline] pub unsafe fn PeerCollabExportContact(pwzpeername: P0) -> windows_core::Result @@ -323,7 +323,7 @@ pub unsafe fn PeerCollabGetPresenceInfo(pcendpoint: Option<*const PEER_ENDPOINT> windows_targets::link!("p2p.dll" "system" fn PeerCollabGetPresenceInfo(pcendpoint : *const PEER_ENDPOINT, pppresenceinfo : *mut *mut PEER_PRESENCE_INFO) -> windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - PeerCollabGetPresenceInfo(core::mem::transmute(pcendpoint.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + PeerCollabGetPresenceInfo(pcendpoint.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -340,7 +340,7 @@ pub unsafe fn PeerCollabInviteContact(pccontact: Option<*const PEER_CONTACT>, pc 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); unsafe { let mut result__ = core::mem::zeroed(); - PeerCollabInviteContact(core::mem::transmute(pccontact.unwrap_or(core::mem::zeroed())), pcendpoint, pcinvitation, &mut result__).map(|| core::mem::transmute(result__)) + PeerCollabInviteContact(pccontact.unwrap_or(core::mem::zeroed()) as _, pcendpoint, pcinvitation, &mut result__).map(|| core::mem::transmute(result__)) } } #[cfg(feature = "Win32_Networking_WinSock")] @@ -369,7 +369,7 @@ pub unsafe fn PeerCollabQueryContactData(pcendpoint: Option<*const PEER_ENDPOINT windows_targets::link!("p2p.dll" "system" fn PeerCollabQueryContactData(pcendpoint : *const PEER_ENDPOINT, ppwzcontactdata : *mut windows_core::PWSTR) -> windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - PeerCollabQueryContactData(core::mem::transmute(pcendpoint.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + PeerCollabQueryContactData(pcendpoint.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[cfg(feature = "Win32_Networking_WinSock")] @@ -386,7 +386,7 @@ pub unsafe fn PeerCollabRegisterApplication(pcapplication: *const PEER_APPLICATI #[inline] 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); - unsafe { PeerCollabRegisterEvent(hevent, peventregistrations.len().try_into().unwrap(), core::mem::transmute(peventregistrations.as_ptr()), core::mem::transmute(phpeerevent)).ok() } + unsafe { PeerCollabRegisterEvent(hevent, peventregistrations.len().try_into().unwrap(), core::mem::transmute(peventregistrations.as_ptr()), phpeerevent as _).ok() } } #[inline] pub unsafe fn PeerCollabSetEndpointName(pwzendpointname: P0) -> windows_core::Result<()> @@ -414,7 +414,7 @@ pub unsafe fn PeerCollabShutdown() -> windows_core::Result<()> { #[inline] 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); - unsafe { PeerCollabSignin(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), dwsigninoptions).ok() } + unsafe { PeerCollabSignin(hwndparent.unwrap_or(core::mem::zeroed()) as _, dwsigninoptions).ok() } } #[inline] pub unsafe fn PeerCollabSignout(dwsigninoptions: u32) -> windows_core::Result<()> { @@ -487,7 +487,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); - unsafe { PeerDistClientCancelAsyncOperation(hpeerdist, hcontenthandle, core::mem::transmute(poverlapped.unwrap_or(core::mem::zeroed()))) } + unsafe { PeerDistClientCancelAsyncOperation(hpeerdist, hcontenthandle, poverlapped.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn PeerDistClientCloseContent(hpeerdist: isize, hcontenthandle: isize) -> u32 { @@ -504,17 +504,17 @@ pub unsafe fn PeerDistClientCompleteContentInformation(hpeerdist: isize, hconten #[inline] 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); - unsafe { PeerDistClientFlushContent(hpeerdist, pcontenttag, core::mem::transmute(hcompletionport.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulcompletionkey.unwrap_or(core::mem::zeroed())), lpoverlapped) } + unsafe { PeerDistClientFlushContent(hpeerdist, pcontenttag, hcompletionport.unwrap_or(core::mem::zeroed()) as _, ulcompletionkey.unwrap_or(core::mem::zeroed()) as _, 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 { windows_targets::link!("peerdist.dll" "system" fn PeerDistClientGetInformationByHandle(hpeerdist : isize, hcontenthandle : isize, peerdistclientinfoclass : PEERDIST_CLIENT_INFO_BY_HANDLE_CLASS, dwbuffersize : u32, lpinformation : *mut core::ffi::c_void) -> u32); - unsafe { PeerDistClientGetInformationByHandle(hpeerdist, hcontenthandle, peerdistclientinfoclass, dwbuffersize, core::mem::transmute(lpinformation)) } + unsafe { PeerDistClientGetInformationByHandle(hpeerdist, hcontenthandle, peerdistclientinfoclass, dwbuffersize, lpinformation as _) } } #[inline] 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); - unsafe { PeerDistClientOpenContent(hpeerdist, pcontenttag, core::mem::transmute(hcompletionport.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulcompletionkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(phcontenthandle)) } + unsafe { PeerDistClientOpenContent(hpeerdist, pcontenttag, hcompletionport.unwrap_or(core::mem::zeroed()) as _, ulcompletionkey.unwrap_or(core::mem::zeroed()) as _, phcontenthandle as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -526,29 +526,29 @@ pub unsafe fn PeerDistClientStreamRead(hpeerdist: isize, hcontenthandle: isize, #[inline] pub unsafe fn PeerDistGetOverlappedResult(lpoverlapped: *const super::super::System::IO::OVERLAPPED, lpnumberofbytestransferred: *mut u32, bwait: bool) -> super::super::Foundation::BOOL { windows_targets::link!("peerdist.dll" "system" fn PeerDistGetOverlappedResult(lpoverlapped : *const super::super::System::IO:: OVERLAPPED, lpnumberofbytestransferred : *mut u32, bwait : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - unsafe { PeerDistGetOverlappedResult(lpoverlapped, core::mem::transmute(lpnumberofbytestransferred), bwait.into()) } + unsafe { PeerDistGetOverlappedResult(lpoverlapped, lpnumberofbytestransferred as _, bwait.into()) } } #[inline] pub unsafe fn PeerDistGetStatus(hpeerdist: isize, ppeerdiststatus: *mut PEERDIST_STATUS) -> u32 { windows_targets::link!("peerdist.dll" "system" fn PeerDistGetStatus(hpeerdist : isize, ppeerdiststatus : *mut PEERDIST_STATUS) -> u32); - unsafe { PeerDistGetStatus(hpeerdist, core::mem::transmute(ppeerdiststatus)) } + unsafe { PeerDistGetStatus(hpeerdist, ppeerdiststatus as _) } } #[inline] pub unsafe fn PeerDistGetStatusEx(hpeerdist: isize, ppeerdiststatus: *mut PEERDIST_STATUS_INFO) -> u32 { windows_targets::link!("peerdist.dll" "system" fn PeerDistGetStatusEx(hpeerdist : isize, ppeerdiststatus : *mut PEERDIST_STATUS_INFO) -> u32); - unsafe { PeerDistGetStatusEx(hpeerdist, core::mem::transmute(ppeerdiststatus)) } + unsafe { PeerDistGetStatusEx(hpeerdist, ppeerdiststatus as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { PeerDistRegisterForStatusChangeNotification(hpeerdist, core::mem::transmute(hcompletionport.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulcompletionkey.unwrap_or(core::mem::zeroed())), lpoverlapped, core::mem::transmute(ppeerdiststatus)) } + unsafe { PeerDistRegisterForStatusChangeNotification(hpeerdist, hcompletionport.unwrap_or(core::mem::zeroed()) as _, ulcompletionkey.unwrap_or(core::mem::zeroed()) as _, lpoverlapped, ppeerdiststatus as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { PeerDistRegisterForStatusChangeNotificationEx(hpeerdist, core::mem::transmute(hcompletionport.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulcompletionkey.unwrap_or(core::mem::zeroed())), lpoverlapped, core::mem::transmute(ppeerdiststatus)) } + unsafe { PeerDistRegisterForStatusChangeNotificationEx(hpeerdist, hcompletionport.unwrap_or(core::mem::zeroed()) as _, ulcompletionkey.unwrap_or(core::mem::zeroed()) as _, lpoverlapped, ppeerdiststatus as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -569,12 +569,12 @@ pub unsafe fn PeerDistServerCloseStreamHandle(hpeerdist: isize, hstream: isize) #[inline] 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); - unsafe { PeerDistServerOpenContentInformation(hpeerdist, pcontentidentifier.len().try_into().unwrap(), core::mem::transmute(pcontentidentifier.as_ptr()), ullcontentoffset, cbcontentlength, core::mem::transmute(hcompletionport.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulcompletionkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(phcontentinfo)) } + unsafe { PeerDistServerOpenContentInformation(hpeerdist, pcontentidentifier.len().try_into().unwrap(), core::mem::transmute(pcontentidentifier.as_ptr()), ullcontentoffset, cbcontentlength, hcompletionport.unwrap_or(core::mem::zeroed()) as _, ulcompletionkey.unwrap_or(core::mem::zeroed()) as _, phcontentinfo as _) } } #[inline] 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); - unsafe { PeerDistServerOpenContentInformationEx(hpeerdist, pcontentidentifier.len().try_into().unwrap(), core::mem::transmute(pcontentidentifier.as_ptr()), ullcontentoffset, cbcontentlength, pretrievaloptions, core::mem::transmute(hcompletionport.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulcompletionkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(phcontentinfo)) } + unsafe { PeerDistServerOpenContentInformationEx(hpeerdist, pcontentidentifier.len().try_into().unwrap(), core::mem::transmute(pcontentidentifier.as_ptr()), ullcontentoffset, cbcontentlength, pretrievaloptions, hcompletionport.unwrap_or(core::mem::zeroed()) as _, ulcompletionkey.unwrap_or(core::mem::zeroed()) as _, phcontentinfo as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -591,7 +591,7 @@ pub unsafe fn PeerDistServerPublishCompleteStream(hpeerdist: isize, hstream: isi #[inline] 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); - unsafe { PeerDistServerPublishStream(hpeerdist, pcontentidentifier.len().try_into().unwrap(), core::mem::transmute(pcontentidentifier.as_ptr()), 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)) } + unsafe { PeerDistServerPublishStream(hpeerdist, pcontentidentifier.len().try_into().unwrap(), core::mem::transmute(pcontentidentifier.as_ptr()), cbcontentlength, ppublishoptions.unwrap_or(core::mem::zeroed()) as _, hcompletionport.unwrap_or(core::mem::zeroed()) as _, ulcompletionkey.unwrap_or(core::mem::zeroed()) as _, phstream as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -612,7 +612,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); - unsafe { PeerDistStartup(dwversionrequested, core::mem::transmute(phpeerdist), core::mem::transmute(pdwsupportedversion.unwrap_or(core::mem::zeroed()))) } + unsafe { PeerDistStartup(dwversionrequested, phpeerdist as _, pdwsupportedversion.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn PeerDistUnregisterForStatusChangeNotification(hpeerdist: isize) -> u32 { @@ -630,17 +630,17 @@ where P0: windows_core::Param, { windows_targets::link!("p2p.dll" "system" fn PeerEnumGroups(pwzidentity : windows_core::PCWSTR, phpeerenum : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PeerEnumGroups(pwzidentity.param().abi(), core::mem::transmute(phpeerenum)).ok() } + unsafe { PeerEnumGroups(pwzidentity.param().abi(), phpeerenum as _).ok() } } #[inline] pub unsafe fn PeerEnumIdentities(phpeerenum: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("p2p.dll" "system" fn PeerEnumIdentities(phpeerenum : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PeerEnumIdentities(core::mem::transmute(phpeerenum)).ok() } + unsafe { PeerEnumIdentities(phpeerenum as _).ok() } } #[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)); - unsafe { PeerFreeData(core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed()))) } + unsafe { PeerFreeData(pvdata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn PeerGetItemCount(hpeerenum: *const core::ffi::c_void) -> windows_core::Result { @@ -653,7 +653,7 @@ pub unsafe fn PeerGetItemCount(hpeerenum: *const core::ffi::c_void) -> windows_c #[inline] pub unsafe fn PeerGetNextItem(hpeerenum: *const core::ffi::c_void, pcount: *mut u32, pppvitems: *mut *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("p2p.dll" "system" fn PeerGetNextItem(hpeerenum : *const core::ffi::c_void, pcount : *mut u32, pppvitems : *mut *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PeerGetNextItem(hpeerenum, core::mem::transmute(pcount), core::mem::transmute(pppvitems)).ok() } + unsafe { PeerGetNextItem(hpeerenum, pcount as _, pppvitems as _).ok() } } #[inline] pub unsafe fn PeerGraphAddRecord(hgraph: *const core::ffi::c_void, precord: *const PEER_RECORD) -> windows_core::Result { @@ -691,7 +691,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); - unsafe { PeerGraphCreate(pgraphproperties, pwzdatabasename.param().abi(), core::mem::transmute(psecurityinterface.unwrap_or(core::mem::zeroed())), core::mem::transmute(phgraph)).ok() } + unsafe { PeerGraphCreate(pgraphproperties, pwzdatabasename.param().abi(), psecurityinterface.unwrap_or(core::mem::zeroed()) as _, phgraph as _).ok() } } #[inline] pub unsafe fn PeerGraphDelete(pwzgraphid: P0, pwzpeerid: P1, pwzdatabasename: P2) -> windows_core::Result<()> @@ -716,7 +716,7 @@ pub unsafe fn PeerGraphEndEnumeration(hpeerenum: *const core::ffi::c_void) -> wi #[inline] pub unsafe fn PeerGraphEnumConnections(hgraph: *const core::ffi::c_void, dwflags: u32, phpeerenum: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("p2pgraph.dll" "system" fn PeerGraphEnumConnections(hgraph : *const core::ffi::c_void, dwflags : u32, phpeerenum : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PeerGraphEnumConnections(hgraph, dwflags, core::mem::transmute(phpeerenum)).ok() } + unsafe { PeerGraphEnumConnections(hgraph, dwflags, phpeerenum as _).ok() } } #[inline] pub unsafe fn PeerGraphEnumNodes(hgraph: *const core::ffi::c_void, pwzpeerid: P1, phpeerenum: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -724,7 +724,7 @@ where P1: windows_core::Param, { windows_targets::link!("p2pgraph.dll" "system" fn PeerGraphEnumNodes(hgraph : *const core::ffi::c_void, pwzpeerid : windows_core::PCWSTR, phpeerenum : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PeerGraphEnumNodes(hgraph, pwzpeerid.param().abi(), core::mem::transmute(phpeerenum)).ok() } + unsafe { PeerGraphEnumNodes(hgraph, pwzpeerid.param().abi(), phpeerenum as _).ok() } } #[inline] pub unsafe fn PeerGraphEnumRecords(hgraph: *const core::ffi::c_void, precordtype: Option<*const windows_core::GUID>, pwzpeerid: P2, phpeerenum: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -732,7 +732,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); - unsafe { PeerGraphEnumRecords(hgraph, core::mem::transmute(precordtype.unwrap_or(core::mem::zeroed())), pwzpeerid.param().abi(), core::mem::transmute(phpeerenum)).ok() } + unsafe { PeerGraphEnumRecords(hgraph, precordtype.unwrap_or(core::mem::zeroed()) as _, pwzpeerid.param().abi(), phpeerenum as _).ok() } } #[inline] pub unsafe fn PeerGraphExportDatabase(hgraph: *const core::ffi::c_void, pwzfilepath: P1) -> windows_core::Result<()> @@ -766,7 +766,7 @@ pub unsafe fn PeerGraphGetItemCount(hpeerenum: *const core::ffi::c_void) -> wind #[inline] pub unsafe fn PeerGraphGetNextItem(hpeerenum: *const core::ffi::c_void, pcount: *mut u32, pppvitems: *mut *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("p2pgraph.dll" "system" fn PeerGraphGetNextItem(hpeerenum : *const core::ffi::c_void, pcount : *mut u32, pppvitems : *mut *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PeerGraphGetNextItem(hpeerenum, core::mem::transmute(pcount), core::mem::transmute(pppvitems)).ok() } + unsafe { PeerGraphGetNextItem(hpeerenum, pcount as _, pppvitems as _).ok() } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -812,7 +812,7 @@ where #[inline] 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); - unsafe { PeerGraphListen(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() } + unsafe { PeerGraphListen(hgraph, dwscope.unwrap_or(core::mem::zeroed()) as _, dwscopeid.unwrap_or(core::mem::zeroed()) as _, wport.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -822,7 +822,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); - unsafe { 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() } + unsafe { PeerGraphOpen(pwzgraphid.param().abi(), pwzpeerid.param().abi(), pwzdatabasename.param().abi(), psecurityinterface.unwrap_or(core::mem::zeroed()) as _, precordtypesyncprecedence.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(precordtypesyncprecedence.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), phgraph as _).ok() } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -847,7 +847,7 @@ pub unsafe fn PeerGraphPeerTimeToUniversalTime(hgraph: *const core::ffi::c_void, #[inline] 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); - unsafe { PeerGraphRegisterEvent(hgraph, hevent, peventregistrations.len().try_into().unwrap(), core::mem::transmute(peventregistrations.as_ptr()), core::mem::transmute(phpeerevent)).ok() } + unsafe { PeerGraphRegisterEvent(hgraph, hevent, peventregistrations.len().try_into().unwrap(), core::mem::transmute(peventregistrations.as_ptr()), phpeerevent as _).ok() } } #[inline] pub unsafe fn PeerGraphSearchRecords(hgraph: *const core::ffi::c_void, pwzcriteria: P1, phpeerenum: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -855,7 +855,7 @@ where P1: windows_core::Param, { windows_targets::link!("p2pgraph.dll" "system" fn PeerGraphSearchRecords(hgraph : *const core::ffi::c_void, pwzcriteria : windows_core::PCWSTR, phpeerenum : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PeerGraphSearchRecords(hgraph, pwzcriteria.param().abi(), core::mem::transmute(phpeerenum)).ok() } + unsafe { PeerGraphSearchRecords(hgraph, pwzcriteria.param().abi(), phpeerenum as _).ok() } } #[inline] pub unsafe fn PeerGraphSendData(hgraph: *const core::ffi::c_void, ullconnectionid: u64, ptype: *const windows_core::GUID, cbdata: u32, pvdata: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -948,7 +948,7 @@ pub unsafe fn PeerGroupConnectByAddress(hgroup: *const core::ffi::c_void, paddre #[inline] pub unsafe fn PeerGroupCreate(pproperties: *const PEER_GROUP_PROPERTIES, phgroup: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("p2p.dll" "system" fn PeerGroupCreate(pproperties : *const PEER_GROUP_PROPERTIES, phgroup : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PeerGroupCreate(pproperties, core::mem::transmute(phgroup)).ok() } + unsafe { PeerGroupCreate(pproperties, phgroup as _).ok() } } #[inline] pub unsafe fn PeerGroupCreateInvitation(hgroup: *const core::ffi::c_void, pwzidentityinfo: P1, pftexpiration: Option<*const super::super::Foundation::FILETIME>, proles: Option<&[windows_core::GUID]>) -> windows_core::Result @@ -958,7 +958,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); unsafe { let mut result__ = core::mem::zeroed(); - PeerGroupCreateInvitation(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__)) + PeerGroupCreateInvitation(hgroup, pwzidentityinfo.param().abi(), pftexpiration.unwrap_or(core::mem::zeroed()) as _, 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] @@ -986,7 +986,7 @@ pub unsafe fn PeerGroupDeleteRecord(hgroup: *const core::ffi::c_void, precordid: #[inline] pub unsafe fn PeerGroupEnumConnections(hgroup: *const core::ffi::c_void, dwflags: u32, phpeerenum: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("p2p.dll" "system" fn PeerGroupEnumConnections(hgroup : *const core::ffi::c_void, dwflags : u32, phpeerenum : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PeerGroupEnumConnections(hgroup, dwflags, core::mem::transmute(phpeerenum)).ok() } + unsafe { PeerGroupEnumConnections(hgroup, dwflags, phpeerenum as _).ok() } } #[inline] pub unsafe fn PeerGroupEnumMembers(hgroup: *const core::ffi::c_void, dwflags: u32, pwzidentity: P2, phpeerenum: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -994,12 +994,12 @@ where P2: windows_core::Param, { windows_targets::link!("p2p.dll" "system" fn PeerGroupEnumMembers(hgroup : *const core::ffi::c_void, dwflags : u32, pwzidentity : windows_core::PCWSTR, phpeerenum : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PeerGroupEnumMembers(hgroup, dwflags, pwzidentity.param().abi(), core::mem::transmute(phpeerenum)).ok() } + unsafe { PeerGroupEnumMembers(hgroup, dwflags, pwzidentity.param().abi(), phpeerenum as _).ok() } } #[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); - unsafe { PeerGroupEnumRecords(hgroup, core::mem::transmute(precordtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(phpeerenum)).ok() } + unsafe { PeerGroupEnumRecords(hgroup, precordtype.unwrap_or(core::mem::zeroed()) as _, phpeerenum as _).ok() } } #[inline] pub unsafe fn PeerGroupExportConfig(hgroup: *const core::ffi::c_void, pwzpassword: P1) -> windows_core::Result @@ -1059,7 +1059,7 @@ where P1: windows_core::Param, { windows_targets::link!("p2p.dll" "system" fn PeerGroupImportConfig(pwzxml : windows_core::PCWSTR, pwzpassword : windows_core::PCWSTR, foverwrite : super::super::Foundation:: BOOL, ppwzidentity : *mut windows_core::PWSTR, ppwzgroup : *mut windows_core::PWSTR) -> windows_core::HRESULT); - unsafe { PeerGroupImportConfig(pwzxml.param().abi(), pwzpassword.param().abi(), foverwrite.into(), core::mem::transmute(ppwzidentity), core::mem::transmute(ppwzgroup)).ok() } + unsafe { PeerGroupImportConfig(pwzxml.param().abi(), pwzpassword.param().abi(), foverwrite.into(), ppwzidentity as _, ppwzgroup as _).ok() } } #[inline] pub unsafe fn PeerGroupImportDatabase(hgroup: *const core::ffi::c_void, pwzfilepath: P1) -> windows_core::Result<()> @@ -1076,7 +1076,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); - unsafe { PeerGroupIssueCredentials(hgroup, pwzsubjectidentity.param().abi(), core::mem::transmute(pcredentialinfo.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(ppwzinvitation.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { PeerGroupIssueCredentials(hgroup, pwzsubjectidentity.param().abi(), pcredentialinfo.unwrap_or(core::mem::zeroed()) as _, dwflags, ppwzinvitation.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn PeerGroupJoin(pwzidentity: P0, pwzinvitation: P1, pwzcloud: P2, phgroup: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -1086,7 +1086,7 @@ where P2: windows_core::Param, { windows_targets::link!("p2p.dll" "system" fn PeerGroupJoin(pwzidentity : windows_core::PCWSTR, pwzinvitation : windows_core::PCWSTR, pwzcloud : windows_core::PCWSTR, phgroup : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PeerGroupJoin(pwzidentity.param().abi(), pwzinvitation.param().abi(), pwzcloud.param().abi(), core::mem::transmute(phgroup)).ok() } + unsafe { PeerGroupJoin(pwzidentity.param().abi(), pwzinvitation.param().abi(), pwzcloud.param().abi(), phgroup as _).ok() } } #[inline] pub unsafe fn PeerGroupOpen(pwzidentity: P0, pwzgrouppeername: P1, pwzcloud: P2, phgroup: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -1096,7 +1096,7 @@ where P2: windows_core::Param, { windows_targets::link!("p2p.dll" "system" fn PeerGroupOpen(pwzidentity : windows_core::PCWSTR, pwzgrouppeername : windows_core::PCWSTR, pwzcloud : windows_core::PCWSTR, phgroup : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PeerGroupOpen(pwzidentity.param().abi(), pwzgrouppeername.param().abi(), pwzcloud.param().abi(), core::mem::transmute(phgroup)).ok() } + unsafe { PeerGroupOpen(pwzidentity.param().abi(), pwzgrouppeername.param().abi(), pwzcloud.param().abi(), phgroup as _).ok() } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -1131,7 +1131,7 @@ where P3: windows_core::Param, { windows_targets::link!("p2p.dll" "system" fn PeerGroupPasswordJoin(pwzidentity : windows_core::PCWSTR, pwzinvitation : windows_core::PCWSTR, pwzpassword : windows_core::PCWSTR, pwzcloud : windows_core::PCWSTR, phgroup : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PeerGroupPasswordJoin(pwzidentity.param().abi(), pwzinvitation.param().abi(), pwzpassword.param().abi(), pwzcloud.param().abi(), core::mem::transmute(phgroup)).ok() } + unsafe { PeerGroupPasswordJoin(pwzidentity.param().abi(), pwzinvitation.param().abi(), pwzpassword.param().abi(), pwzcloud.param().abi(), phgroup as _).ok() } } #[inline] pub unsafe fn PeerGroupPeerTimeToUniversalTime(hgroup: *const core::ffi::c_void, pftpeertime: *const super::super::Foundation::FILETIME) -> windows_core::Result { @@ -1144,7 +1144,7 @@ pub unsafe fn PeerGroupPeerTimeToUniversalTime(hgroup: *const core::ffi::c_void, #[inline] 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); - unsafe { PeerGroupRegisterEvent(hgroup, hevent, peventregistrations.len().try_into().unwrap(), core::mem::transmute(peventregistrations.as_ptr()), core::mem::transmute(phpeerevent)).ok() } + unsafe { PeerGroupRegisterEvent(hgroup, hevent, peventregistrations.len().try_into().unwrap(), core::mem::transmute(peventregistrations.as_ptr()), phpeerevent as _).ok() } } #[inline] pub unsafe fn PeerGroupResumePasswordAuthentication(hgroup: *const core::ffi::c_void, hpeereventhandle: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -1157,7 +1157,7 @@ where P1: windows_core::Param, { windows_targets::link!("p2p.dll" "system" fn PeerGroupSearchRecords(hgroup : *const core::ffi::c_void, pwzcriteria : windows_core::PCWSTR, phpeerenum : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PeerGroupSearchRecords(hgroup, pwzcriteria.param().abi(), core::mem::transmute(phpeerenum)).ok() } + unsafe { PeerGroupSearchRecords(hgroup, pwzcriteria.param().abi(), phpeerenum as _).ok() } } #[inline] pub unsafe fn PeerGroupSendData(hgroup: *const core::ffi::c_void, ullconnectionid: u64, ptype: *const windows_core::GUID, cbdata: u32, pvdata: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -1220,7 +1220,7 @@ where 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); unsafe { let mut result__ = core::mem::zeroed(); - PeerIdentityCreate(pwzclassifier.param().abi(), pwzfriendlyname.param().abi(), core::mem::transmute(hcryptprov.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + PeerIdentityCreate(pwzclassifier.param().abi(), pwzfriendlyname.param().abi(), hcryptprov.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -1324,7 +1324,7 @@ pub unsafe fn PeerPnrpEndResolve(hresolve: *const core::ffi::c_void) -> windows_ #[inline] pub unsafe fn PeerPnrpGetCloudInfo(pcnumclouds: *mut u32, ppcloudinfo: *mut *mut PEER_PNRP_CLOUD_INFO) -> windows_core::Result<()> { windows_targets::link!("p2p.dll" "system" fn PeerPnrpGetCloudInfo(pcnumclouds : *mut u32, ppcloudinfo : *mut *mut PEER_PNRP_CLOUD_INFO) -> windows_core::HRESULT); - unsafe { PeerPnrpGetCloudInfo(core::mem::transmute(pcnumclouds), core::mem::transmute(ppcloudinfo)).ok() } + unsafe { PeerPnrpGetCloudInfo(pcnumclouds as _, ppcloudinfo as _).ok() } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -1342,7 +1342,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); - unsafe { PeerPnrpRegister(pcwzpeername.param().abi(), core::mem::transmute(pregistrationinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(phregistration)).ok() } + unsafe { PeerPnrpRegister(pcwzpeername.param().abi(), pregistrationinfo.unwrap_or(core::mem::zeroed()) as _, phregistration as _).ok() } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -1352,7 +1352,7 @@ where P1: windows_core::Param, { windows_targets::link!("p2p.dll" "system" fn PeerPnrpResolve(pcwzpeername : windows_core::PCWSTR, pcwzcloudname : windows_core::PCWSTR, pcendpoints : *mut u32, ppendpoints : *mut *mut PEER_PNRP_ENDPOINT_INFO) -> windows_core::HRESULT); - unsafe { PeerPnrpResolve(pcwzpeername.param().abi(), pcwzcloudname.param().abi(), core::mem::transmute(pcendpoints), core::mem::transmute(ppendpoints)).ok() } + unsafe { PeerPnrpResolve(pcwzpeername.param().abi(), pcwzcloudname.param().abi(), pcendpoints as _, ppendpoints as _).ok() } } #[inline] pub unsafe fn PeerPnrpShutdown() -> windows_core::Result<()> { @@ -1366,7 +1366,7 @@ where P1: 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); - unsafe { PeerPnrpStartResolve(pcwzpeername.param().abi(), pcwzcloudname.param().abi(), core::mem::transmute(cmaxendpoints.unwrap_or(core::mem::zeroed())), hevent, core::mem::transmute(phresolve)).ok() } + unsafe { PeerPnrpStartResolve(pcwzpeername.param().abi(), pcwzcloudname.param().abi(), cmaxendpoints.unwrap_or(core::mem::zeroed()) as _, hevent, phresolve as _).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 01a866817a..546e761b78 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/QoS/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/QoS/mod.rs @@ -2,7 +2,7 @@ #[inline] 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); - unsafe { QOSAddSocketToFlow(qoshandle, socket, core::mem::transmute(destaddr.unwrap_or(core::mem::zeroed())), traffictype, core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(flowid)) } + unsafe { QOSAddSocketToFlow(qoshandle, socket, destaddr.unwrap_or(core::mem::zeroed()) as _, traffictype, flags.unwrap_or(core::mem::zeroed()) as _, flowid as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -18,59 +18,59 @@ pub unsafe fn QOSCloseHandle(qoshandle: super::super::Foundation::HANDLE) -> sup #[inline] pub unsafe fn QOSCreateHandle(version: *const QOS_VERSION, qoshandle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { windows_targets::link!("qwave.dll" "system" fn QOSCreateHandle(version : *const QOS_VERSION, qoshandle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - unsafe { QOSCreateHandle(version, core::mem::transmute(qoshandle)) } + unsafe { QOSCreateHandle(version, qoshandle as _) } } #[inline] 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); - unsafe { QOSEnumerateFlows(qoshandle, core::mem::transmute(size), core::mem::transmute(buffer)) } + unsafe { QOSEnumerateFlows(qoshandle, size as _, buffer as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { QOSNotifyFlow(qoshandle, flowid, 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()))) } + unsafe { QOSNotifyFlow(qoshandle, flowid, operation, size.unwrap_or(core::mem::zeroed()) as _, buffer.unwrap_or(core::mem::zeroed()) as _, flags.unwrap_or(core::mem::zeroed()) as _, overlapped.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { QOSQueryFlow(qoshandle, flowid, 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()))) } + unsafe { QOSQueryFlow(qoshandle, flowid, operation, size as _, buffer as _, flags.unwrap_or(core::mem::zeroed()) as _, overlapped.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] 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); - unsafe { QOSRemoveSocketFromFlow(qoshandle, core::mem::transmute(socket.unwrap_or(core::mem::zeroed())), flowid, core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))) } + unsafe { QOSRemoveSocketFromFlow(qoshandle, socket.unwrap_or(core::mem::zeroed()) as _, flowid, flags.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { QOSSetFlow(qoshandle, flowid, operation, size, buffer, core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } + unsafe { QOSSetFlow(qoshandle, flowid, operation, size, buffer, flags.unwrap_or(core::mem::zeroed()) as _, overlapped.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] 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); - unsafe { QOSStartTrackingClient(qoshandle, destaddr, core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))) } + unsafe { QOSStartTrackingClient(qoshandle, destaddr, flags.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] 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); - unsafe { QOSStopTrackingClient(qoshandle, destaddr, core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))) } + unsafe { QOSStopTrackingClient(qoshandle, destaddr, flags.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { TcAddFilter(flowhandle, pgenericfilter, core::mem::transmute(pfilterhandle)) } + unsafe { TcAddFilter(flowhandle, pgenericfilter, pfilterhandle as _) } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] 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); - unsafe { TcAddFlow(ifchandle, clflowctx, flags, pgenericflow, core::mem::transmute(pflowhandle)) } + unsafe { TcAddFlow(ifchandle, clflowctx, flags, pgenericflow, pflowhandle as _) } } #[inline] pub unsafe fn TcCloseInterface(ifchandle: super::super::Foundation::HANDLE) -> u32 { @@ -96,13 +96,13 @@ pub unsafe fn TcDeregisterClient(clienthandle: super::super::Foundation::HANDLE) #[inline] 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); - unsafe { TcEnumerateFlows(ifchandle, core::mem::transmute(penumhandle), core::mem::transmute(pflowcount), core::mem::transmute(pbufsize), core::mem::transmute(buffer)) } + unsafe { TcEnumerateFlows(ifchandle, penumhandle as _, pflowcount as _, pbufsize as _, buffer as _) } } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] 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); - unsafe { TcEnumerateInterfaces(clienthandle, core::mem::transmute(pbuffersize), core::mem::transmute(interfacebuffer)) } + unsafe { TcEnumerateInterfaces(clienthandle, pbuffersize as _, interfacebuffer as _) } } #[inline] pub unsafe fn TcGetFlowNameA(flowhandle: super::super::Foundation::HANDLE, pflowname: &mut [u8]) -> u32 { @@ -126,7 +126,7 @@ where P0: 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); - unsafe { TcOpenInterfaceA(pinterfacename.param().abi(), clienthandle, clifcctx, core::mem::transmute(pifchandle)) } + unsafe { TcOpenInterfaceA(pinterfacename.param().abi(), clienthandle, clifcctx, pifchandle as _) } } #[inline] pub unsafe fn TcOpenInterfaceW(pinterfacename: P0, clienthandle: super::super::Foundation::HANDLE, clifcctx: super::super::Foundation::HANDLE, pifchandle: *mut super::super::Foundation::HANDLE) -> u32 @@ -134,7 +134,7 @@ where P0: 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); - unsafe { TcOpenInterfaceW(pinterfacename.param().abi(), clienthandle, clifcctx, core::mem::transmute(pifchandle)) } + unsafe { TcOpenInterfaceW(pinterfacename.param().abi(), clienthandle, clifcctx, pifchandle as _) } } #[inline] pub unsafe fn TcQueryFlowA(pflowname: P0, pguidparam: *const windows_core::GUID, pbuffersize: *mut u32, buffer: *mut core::ffi::c_void) -> u32 @@ -142,7 +142,7 @@ where P0: windows_core::Param, { windows_targets::link!("traffic.dll" "system" fn TcQueryFlowA(pflowname : windows_core::PCSTR, pguidparam : *const windows_core::GUID, pbuffersize : *mut u32, buffer : *mut core::ffi::c_void) -> u32); - unsafe { TcQueryFlowA(pflowname.param().abi(), pguidparam, core::mem::transmute(pbuffersize), core::mem::transmute(buffer)) } + unsafe { TcQueryFlowA(pflowname.param().abi(), pguidparam, pbuffersize as _, buffer as _) } } #[inline] pub unsafe fn TcQueryFlowW(pflowname: P0, pguidparam: *const windows_core::GUID, pbuffersize: *mut u32, buffer: *mut core::ffi::c_void) -> u32 @@ -150,17 +150,17 @@ where P0: windows_core::Param, { windows_targets::link!("traffic.dll" "system" fn TcQueryFlowW(pflowname : windows_core::PCWSTR, pguidparam : *const windows_core::GUID, pbuffersize : *mut u32, buffer : *mut core::ffi::c_void) -> u32); - unsafe { TcQueryFlowW(pflowname.param().abi(), pguidparam, core::mem::transmute(pbuffersize), core::mem::transmute(buffer)) } + unsafe { TcQueryFlowW(pflowname.param().abi(), pguidparam, pbuffersize as _, buffer as _) } } #[inline] pub unsafe fn TcQueryInterface(ifchandle: super::super::Foundation::HANDLE, pguidparam: *const windows_core::GUID, notifychange: bool, pbuffersize: *mut u32, buffer: *mut core::ffi::c_void) -> u32 { windows_targets::link!("traffic.dll" "system" fn TcQueryInterface(ifchandle : super::super::Foundation:: HANDLE, pguidparam : *const windows_core::GUID, notifychange : bool, pbuffersize : *mut u32, buffer : *mut core::ffi::c_void) -> u32); - unsafe { TcQueryInterface(ifchandle, pguidparam, notifychange, core::mem::transmute(pbuffersize), core::mem::transmute(buffer)) } + unsafe { TcQueryInterface(ifchandle, pguidparam, notifychange, pbuffersize as _, buffer as _) } } #[inline] 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); - unsafe { TcRegisterClient(tciversion, clregctx, clienthandlerlist, core::mem::transmute(pclienthandle)) } + unsafe { TcRegisterClient(tciversion, clregctx, clienthandlerlist, pclienthandle as _) } } #[inline] pub unsafe fn TcSetFlowA(pflowname: P0, pguidparam: *const windows_core::GUID, buffersize: u32, buffer: *const core::ffi::c_void) -> u32 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 f666ed3eaf..cf2b665328 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Rras/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Rras/mod.rs @@ -16,41 +16,41 @@ pub unsafe fn MgmDeleteGroupMembershipEntry(hprotocol: super::super::Foundation: #[inline] pub unsafe fn MgmGetFirstMfe(pdwbuffersize: *mut u32, pbbuffer: *mut u8, pdwnumentries: *mut u32) -> u32 { windows_targets::link!("rtm.dll" "system" fn MgmGetFirstMfe(pdwbuffersize : *mut u32, pbbuffer : *mut u8, pdwnumentries : *mut u32) -> u32); - unsafe { MgmGetFirstMfe(core::mem::transmute(pdwbuffersize), core::mem::transmute(pbbuffer), core::mem::transmute(pdwnumentries)) } + unsafe { MgmGetFirstMfe(pdwbuffersize as _, pbbuffer as _, pdwnumentries as _) } } #[inline] pub unsafe fn MgmGetFirstMfeStats(pdwbuffersize: *mut u32, pbbuffer: *mut u8, pdwnumentries: *mut u32, dwflags: u32) -> u32 { windows_targets::link!("rtm.dll" "system" fn MgmGetFirstMfeStats(pdwbuffersize : *mut u32, pbbuffer : *mut u8, pdwnumentries : *mut u32, dwflags : u32) -> u32); - unsafe { MgmGetFirstMfeStats(core::mem::transmute(pdwbuffersize), core::mem::transmute(pbbuffer), core::mem::transmute(pdwnumentries), dwflags) } + unsafe { MgmGetFirstMfeStats(pdwbuffersize as _, pbbuffer as _, pdwnumentries as _, dwflags) } } #[cfg(feature = "Win32_NetworkManagement_IpHelper")] #[inline] pub unsafe fn MgmGetMfe(pimm: *mut super::IpHelper::MIB_IPMCAST_MFE, pdwbuffersize: *mut u32, pbbuffer: *mut u8) -> u32 { windows_targets::link!("rtm.dll" "system" fn MgmGetMfe(pimm : *mut super::IpHelper:: MIB_IPMCAST_MFE, pdwbuffersize : *mut u32, pbbuffer : *mut u8) -> u32); - unsafe { MgmGetMfe(core::mem::transmute(pimm), core::mem::transmute(pdwbuffersize), core::mem::transmute(pbbuffer)) } + unsafe { MgmGetMfe(pimm as _, pdwbuffersize as _, pbbuffer as _) } } #[cfg(feature = "Win32_NetworkManagement_IpHelper")] #[inline] pub unsafe fn MgmGetMfeStats(pimm: *mut super::IpHelper::MIB_IPMCAST_MFE, pdwbuffersize: *mut u32, pbbuffer: *mut u8, dwflags: u32) -> u32 { windows_targets::link!("rtm.dll" "system" fn MgmGetMfeStats(pimm : *mut super::IpHelper:: MIB_IPMCAST_MFE, pdwbuffersize : *mut u32, pbbuffer : *mut u8, dwflags : u32) -> u32); - unsafe { MgmGetMfeStats(core::mem::transmute(pimm), core::mem::transmute(pdwbuffersize), core::mem::transmute(pbbuffer), dwflags) } + unsafe { MgmGetMfeStats(pimm as _, pdwbuffersize as _, pbbuffer as _, dwflags) } } #[cfg(feature = "Win32_NetworkManagement_IpHelper")] #[inline] pub unsafe fn MgmGetNextMfe(pimmstart: *mut super::IpHelper::MIB_IPMCAST_MFE, pdwbuffersize: *mut u32, pbbuffer: *mut u8, pdwnumentries: *mut u32) -> u32 { windows_targets::link!("rtm.dll" "system" fn MgmGetNextMfe(pimmstart : *mut super::IpHelper:: MIB_IPMCAST_MFE, pdwbuffersize : *mut u32, pbbuffer : *mut u8, pdwnumentries : *mut u32) -> u32); - unsafe { MgmGetNextMfe(core::mem::transmute(pimmstart), core::mem::transmute(pdwbuffersize), core::mem::transmute(pbbuffer), core::mem::transmute(pdwnumentries)) } + unsafe { MgmGetNextMfe(pimmstart as _, pdwbuffersize as _, pbbuffer as _, pdwnumentries as _) } } #[cfg(feature = "Win32_NetworkManagement_IpHelper")] #[inline] pub unsafe fn MgmGetNextMfeStats(pimmstart: *mut super::IpHelper::MIB_IPMCAST_MFE, pdwbuffersize: *mut u32, pbbuffer: *mut u8, pdwnumentries: *mut u32, dwflags: u32) -> u32 { windows_targets::link!("rtm.dll" "system" fn MgmGetNextMfeStats(pimmstart : *mut super::IpHelper:: MIB_IPMCAST_MFE, pdwbuffersize : *mut u32, pbbuffer : *mut u8, pdwnumentries : *mut u32, dwflags : u32) -> u32); - unsafe { MgmGetNextMfeStats(core::mem::transmute(pimmstart), core::mem::transmute(pdwbuffersize), core::mem::transmute(pbbuffer), core::mem::transmute(pdwnumentries), dwflags) } + unsafe { MgmGetNextMfeStats(pimmstart as _, pdwbuffersize as _, pbbuffer as _, pdwnumentries as _, dwflags) } } #[inline] pub unsafe fn MgmGetProtocolOnInterface(dwifindex: u32, dwifnexthopaddr: u32, pdwifprotocolid: *mut u32, pdwifcomponentid: *mut u32) -> u32 { windows_targets::link!("rtm.dll" "system" fn MgmGetProtocolOnInterface(dwifindex : u32, dwifnexthopaddr : u32, pdwifprotocolid : *mut u32, pdwifcomponentid : *mut u32) -> u32); - unsafe { MgmGetProtocolOnInterface(dwifindex, dwifnexthopaddr, core::mem::transmute(pdwifprotocolid), core::mem::transmute(pdwifcomponentid)) } + unsafe { MgmGetProtocolOnInterface(dwifindex, dwifnexthopaddr, pdwifprotocolid as _, pdwifcomponentid as _) } } #[inline] pub unsafe fn MgmGroupEnumerationEnd(henum: super::super::Foundation::HANDLE) -> u32 { @@ -60,17 +60,17 @@ pub unsafe fn MgmGroupEnumerationEnd(henum: super::super::Foundation::HANDLE) -> #[inline] 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); - unsafe { MgmGroupEnumerationGetNext(henum, core::mem::transmute(pdwbuffersize), core::mem::transmute(pbbuffer), core::mem::transmute(pdwnumentries)) } + unsafe { MgmGroupEnumerationGetNext(henum, pdwbuffersize as _, pbbuffer as _, pdwnumentries as _) } } #[inline] 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); - unsafe { MgmGroupEnumerationStart(hprotocol, metenumtype, core::mem::transmute(phenumhandle)) } + unsafe { MgmGroupEnumerationStart(hprotocol, metenumtype, phenumhandle as _) } } #[inline] pub unsafe fn MgmRegisterMProtocol(prpiinfo: *mut ROUTING_PROTOCOL_CONFIG, dwprotocolid: u32, dwcomponentid: u32, phprotocol: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("rtm.dll" "system" fn MgmRegisterMProtocol(prpiinfo : *mut ROUTING_PROTOCOL_CONFIG, dwprotocolid : u32, dwcomponentid : u32, phprotocol : *mut super::super::Foundation:: HANDLE) -> u32); - unsafe { MgmRegisterMProtocol(core::mem::transmute(prpiinfo), dwprotocolid, dwcomponentid, core::mem::transmute(phprotocol)) } + unsafe { MgmRegisterMProtocol(prpiinfo as _, dwprotocolid, dwcomponentid, phprotocol as _) } } #[inline] pub unsafe fn MgmReleaseInterfaceOwnership(hprotocol: super::super::Foundation::HANDLE, dwifindex: u32, dwifnexthopaddr: u32) -> u32 { @@ -95,22 +95,22 @@ pub unsafe fn MprAdminConnectionClearStats(hrasserver: isize, hrasconnection: su #[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); - unsafe { MprAdminConnectionEnum(hrasserver, dwlevel, core::mem::transmute(lplpbbuffer), dwprefmaxlen, core::mem::transmute(lpdwentriesread), core::mem::transmute(lpdwtotalentries), core::mem::transmute(lpdwresumehandle.unwrap_or(core::mem::zeroed()))) } + unsafe { MprAdminConnectionEnum(hrasserver, dwlevel, lplpbbuffer as _, dwprefmaxlen, lpdwentriesread as _, lpdwtotalentries as _, lpdwresumehandle.unwrap_or(core::mem::zeroed()) as _) } } #[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 { windows_targets::link!("mprapi.dll" "system" 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); - unsafe { MprAdminConnectionEnumEx(hrasserver, pobjectheader, dwpreferedmaxlen, core::mem::transmute(lpdwentriesread), core::mem::transmute(lpdwtotalentries), core::mem::transmute(pprasconn), lpdwresumehandle) } + unsafe { MprAdminConnectionEnumEx(hrasserver, pobjectheader, dwpreferedmaxlen, lpdwentriesread as _, lpdwtotalentries as _, pprasconn as _, lpdwresumehandle) } } #[inline] 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); - unsafe { MprAdminConnectionGetInfo(hrasserver, dwlevel, hrasconnection, core::mem::transmute(lplpbbuffer)) } + unsafe { MprAdminConnectionGetInfo(hrasserver, dwlevel, hrasconnection, lplpbbuffer as _) } } #[inline] 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); - unsafe { MprAdminConnectionGetInfoEx(hrasserver, hrasconnection, core::mem::transmute(prasconnection)) } + unsafe { MprAdminConnectionGetInfoEx(hrasserver, hrasconnection, prasconnection as _) } } #[inline] pub unsafe fn MprAdminConnectionRemoveQuarantine(hrasserver: super::super::Foundation::HANDLE, hrasconnection: super::super::Foundation::HANDLE, fisipaddress: bool) -> u32 { @@ -125,7 +125,7 @@ pub unsafe fn MprAdminDeregisterConnectionNotification(hmprserver: isize, hevent #[inline] pub unsafe fn MprAdminDeviceEnum(hmprserver: isize, dwlevel: u32, lplpbbuffer: *mut *mut u8, lpdwtotalentries: *mut u32) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminDeviceEnum(hmprserver : isize, dwlevel : u32, lplpbbuffer : *mut *mut u8, lpdwtotalentries : *mut u32) -> u32); - unsafe { MprAdminDeviceEnum(hmprserver, dwlevel, core::mem::transmute(lplpbbuffer), core::mem::transmute(lpdwtotalentries)) } + unsafe { MprAdminDeviceEnum(hmprserver, dwlevel, lplpbbuffer as _, lpdwtotalentries as _) } } #[inline] pub unsafe fn MprAdminEstablishDomainRasServer(pszdomain: P0, pszmachine: P1, benable: bool) -> u32 @@ -139,7 +139,7 @@ where #[inline] pub unsafe fn MprAdminGetErrorString(dwerror: u32, lplpwserrorstring: *mut windows_core::PWSTR) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminGetErrorString(dwerror : u32, lplpwserrorstring : *mut windows_core::PWSTR) -> u32); - unsafe { MprAdminGetErrorString(dwerror, core::mem::transmute(lplpwserrorstring)) } + unsafe { MprAdminGetErrorString(dwerror, lplpwserrorstring as _) } } #[inline] pub unsafe fn MprAdminGetPDCServer(lpszdomain: P0, lpszserver: P1, lpszpdcserver: windows_core::PWSTR) -> u32 @@ -158,7 +158,7 @@ pub unsafe fn MprAdminInterfaceConnect(hmprserver: isize, hinterface: super::sup #[inline] pub unsafe fn MprAdminInterfaceCreate(hmprserver: isize, dwlevel: u32, lpbbuffer: *const u8, phinterface: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminInterfaceCreate(hmprserver : isize, dwlevel : u32, lpbbuffer : *const u8, phinterface : *mut super::super::Foundation:: HANDLE) -> u32); - unsafe { MprAdminInterfaceCreate(hmprserver, dwlevel, lpbbuffer, core::mem::transmute(phinterface)) } + unsafe { MprAdminInterfaceCreate(hmprserver, dwlevel, lpbbuffer, phinterface as _) } } #[inline] pub unsafe fn MprAdminInterfaceDelete(hmprserver: isize, hinterface: super::super::Foundation::HANDLE) -> u32 { @@ -168,7 +168,7 @@ pub unsafe fn MprAdminInterfaceDelete(hmprserver: isize, hinterface: super::supe #[inline] 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); - unsafe { MprAdminInterfaceDeviceGetInfo(hmprserver, hinterface, dwindex, dwlevel, core::mem::transmute(lplpbuffer)) } + unsafe { MprAdminInterfaceDeviceGetInfo(hmprserver, hinterface, dwindex, dwlevel, lplpbuffer as _) } } #[inline] pub unsafe fn MprAdminInterfaceDeviceSetInfo(hmprserver: isize, hinterface: super::super::Foundation::HANDLE, dwindex: u32, dwlevel: u32, lpbbuffer: *const u8) -> u32 { @@ -183,7 +183,7 @@ pub unsafe fn MprAdminInterfaceDisconnect(hmprserver: isize, hinterface: super:: #[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); - unsafe { MprAdminInterfaceEnum(hmprserver, dwlevel, core::mem::transmute(lplpbbuffer), dwprefmaxlen, core::mem::transmute(lpdwentriesread), core::mem::transmute(lpdwtotalentries), core::mem::transmute(lpdwresumehandle.unwrap_or(core::mem::zeroed()))) } + unsafe { MprAdminInterfaceEnum(hmprserver, dwlevel, lplpbbuffer as _, dwprefmaxlen, lpdwentriesread as _, lpdwtotalentries as _, lpdwresumehandle.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MprAdminInterfaceGetCredentials(lpwsserver: P0, lpwsinterfacename: P1, lpwsusername: Option, lpwspassword: Option, lpwsdomainname: Option) -> u32 @@ -192,18 +192,18 @@ where 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); - unsafe { 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()))) } + unsafe { MprAdminInterfaceGetCredentials(lpwsserver.param().abi(), lpwsinterfacename.param().abi(), lpwsusername.unwrap_or(core::mem::zeroed()) as _, lpwspassword.unwrap_or(core::mem::zeroed()) as _, lpwsdomainname.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { MprAdminInterfaceGetCredentialsEx(hmprserver, hinterface, dwlevel, core::mem::transmute(lplpbbuffer)) } + unsafe { MprAdminInterfaceGetCredentialsEx(hmprserver, hinterface, dwlevel, lplpbbuffer as _) } } #[cfg(all(feature = "Win32_Networking_WinSock", feature = "Win32_Security_Cryptography"))] #[inline] 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); - unsafe { MprAdminInterfaceGetCustomInfoEx(hmprserver, hinterface, core::mem::transmute(pcustominfo)) } + unsafe { MprAdminInterfaceGetCustomInfoEx(hmprserver, hinterface, pcustominfo as _) } } #[inline] pub unsafe fn MprAdminInterfaceGetHandle(hmprserver: isize, lpwsinterfacename: P1, phinterface: *mut super::super::Foundation::HANDLE, fincludeclientinterfaces: bool) -> u32 @@ -211,7 +211,7 @@ where P1: windows_core::Param, { windows_targets::link!("mprapi.dll" "system" fn MprAdminInterfaceGetHandle(hmprserver : isize, lpwsinterfacename : windows_core::PCWSTR, phinterface : *mut super::super::Foundation:: HANDLE, fincludeclientinterfaces : super::super::Foundation:: BOOL) -> u32); - unsafe { MprAdminInterfaceGetHandle(hmprserver, lpwsinterfacename.param().abi(), core::mem::transmute(phinterface), fincludeclientinterfaces.into()) } + unsafe { MprAdminInterfaceGetHandle(hmprserver, lpwsinterfacename.param().abi(), phinterface as _, fincludeclientinterfaces.into()) } } #[inline] pub unsafe fn MprAdminInterfaceGetInfo(hmprserver: isize, hinterface: super::super::Foundation::HANDLE, dwlevel: u32, lplpbbuffer: *const *const u8) -> u32 { @@ -221,7 +221,7 @@ pub unsafe fn MprAdminInterfaceGetInfo(hmprserver: isize, hinterface: super::sup #[inline] 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); - unsafe { MprAdminInterfaceQueryUpdateResult(hmprserver, hinterface, dwprotocolid, core::mem::transmute(lpdwupdateresult)) } + unsafe { MprAdminInterfaceQueryUpdateResult(hmprserver, hinterface, dwprotocolid, lpdwupdateresult as _) } } #[inline] pub unsafe fn MprAdminInterfaceSetCredentials(lpwsserver: P0, lpwsinterfacename: P1, lpwsusername: P2, lpwsdomainname: P3, lpwspassword: P4) -> u32 @@ -259,7 +259,7 @@ pub unsafe fn MprAdminInterfaceTransportAdd(hmprserver: isize, hinterface: super #[inline] 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); - unsafe { MprAdminInterfaceTransportGetInfo(hmprserver, hinterface, dwtransportid, core::mem::transmute(ppinterfaceinfo), core::mem::transmute(lpdwinterfaceinfosize.unwrap_or(core::mem::zeroed()))) } + unsafe { MprAdminInterfaceTransportGetInfo(hmprserver, hinterface, dwtransportid, ppinterfaceinfo as _, lpdwinterfaceinfosize.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MprAdminInterfaceTransportRemove(hmprserver: isize, hinterface: super::super::Foundation::HANDLE, dwtransportid: u32) -> u32 { @@ -288,7 +288,7 @@ where P1: windows_core::Param, { windows_targets::link!("mprapi.dll" "system" fn MprAdminIsDomainRasServer(pszdomain : windows_core::PCWSTR, pszmachine : windows_core::PCWSTR, pbisrasserver : *mut super::super::Foundation:: BOOL) -> u32); - unsafe { MprAdminIsDomainRasServer(pszdomain.param().abi(), pszmachine.param().abi(), core::mem::transmute(pbisrasserver)) } + unsafe { MprAdminIsDomainRasServer(pszdomain.param().abi(), pszmachine.param().abi(), pbisrasserver as _) } } #[inline] pub unsafe fn MprAdminIsServiceInitialized(lpwsservername: P0, fisserviceinitialized: *const super::super::Foundation::BOOL) -> u32 @@ -324,17 +324,17 @@ pub unsafe fn MprAdminMIBEntryDelete(hmibserver: isize, dwprotocolid: u32, dwrou #[inline] pub unsafe fn MprAdminMIBEntryGet(hmibserver: isize, dwprotocolid: u32, dwroutingpid: u32, lpinentry: *const core::ffi::c_void, dwinentrysize: u32, lplpoutentry: *mut *mut core::ffi::c_void, lpoutentrysize: *mut u32) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminMIBEntryGet(hmibserver : isize, dwprotocolid : u32, dwroutingpid : u32, lpinentry : *const core::ffi::c_void, dwinentrysize : u32, lplpoutentry : *mut *mut core::ffi::c_void, lpoutentrysize : *mut u32) -> u32); - unsafe { MprAdminMIBEntryGet(hmibserver, dwprotocolid, dwroutingpid, lpinentry, dwinentrysize, core::mem::transmute(lplpoutentry), core::mem::transmute(lpoutentrysize)) } + unsafe { MprAdminMIBEntryGet(hmibserver, dwprotocolid, dwroutingpid, lpinentry, dwinentrysize, lplpoutentry as _, lpoutentrysize as _) } } #[inline] pub unsafe fn MprAdminMIBEntryGetFirst(hmibserver: isize, dwprotocolid: u32, dwroutingpid: u32, lpinentry: *const core::ffi::c_void, dwinentrysize: u32, lplpoutentry: *mut *mut core::ffi::c_void, lpoutentrysize: *mut u32) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminMIBEntryGetFirst(hmibserver : isize, dwprotocolid : u32, dwroutingpid : u32, lpinentry : *const core::ffi::c_void, dwinentrysize : u32, lplpoutentry : *mut *mut core::ffi::c_void, lpoutentrysize : *mut u32) -> u32); - unsafe { MprAdminMIBEntryGetFirst(hmibserver, dwprotocolid, dwroutingpid, lpinentry, dwinentrysize, core::mem::transmute(lplpoutentry), core::mem::transmute(lpoutentrysize)) } + unsafe { MprAdminMIBEntryGetFirst(hmibserver, dwprotocolid, dwroutingpid, lpinentry, dwinentrysize, lplpoutentry as _, lpoutentrysize as _) } } #[inline] pub unsafe fn MprAdminMIBEntryGetNext(hmibserver: isize, dwprotocolid: u32, dwroutingpid: u32, lpinentry: *const core::ffi::c_void, dwinentrysize: u32, lplpoutentry: *mut *mut core::ffi::c_void, lpoutentrysize: *mut u32) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminMIBEntryGetNext(hmibserver : isize, dwprotocolid : u32, dwroutingpid : u32, lpinentry : *const core::ffi::c_void, dwinentrysize : u32, lplpoutentry : *mut *mut core::ffi::c_void, lpoutentrysize : *mut u32) -> u32); - unsafe { MprAdminMIBEntryGetNext(hmibserver, dwprotocolid, dwroutingpid, lpinentry, dwinentrysize, core::mem::transmute(lplpoutentry), core::mem::transmute(lpoutentrysize)) } + unsafe { MprAdminMIBEntryGetNext(hmibserver, dwprotocolid, dwroutingpid, lpinentry, dwinentrysize, lplpoutentry as _, lpoutentrysize as _) } } #[inline] pub unsafe fn MprAdminMIBEntrySet(hmibserver: isize, dwprotocolid: u32, dwroutingpid: u32, lpentry: *const core::ffi::c_void, dwentrysize: u32) -> u32 { @@ -347,7 +347,7 @@ where P0: windows_core::Param, { windows_targets::link!("mprapi.dll" "system" fn MprAdminMIBServerConnect(lpwsservername : windows_core::PCWSTR, phmibserver : *mut isize) -> u32); - unsafe { MprAdminMIBServerConnect(lpwsservername.param().abi(), core::mem::transmute(phmibserver)) } + unsafe { MprAdminMIBServerConnect(lpwsservername.param().abi(), phmibserver as _) } } #[inline] pub unsafe fn MprAdminMIBServerDisconnect(hmibserver: isize) { @@ -367,12 +367,12 @@ pub unsafe fn MprAdminPortDisconnect(hrasserver: isize, hport: super::super::Fou #[inline] 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); - unsafe { MprAdminPortEnum(hrasserver, dwlevel, hrasconnection, core::mem::transmute(lplpbbuffer), dwprefmaxlen, core::mem::transmute(lpdwentriesread), core::mem::transmute(lpdwtotalentries), core::mem::transmute(lpdwresumehandle.unwrap_or(core::mem::zeroed()))) } + unsafe { MprAdminPortEnum(hrasserver, dwlevel, hrasconnection, lplpbbuffer as _, dwprefmaxlen, lpdwentriesread as _, lpdwtotalentries as _, lpdwresumehandle.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { MprAdminPortGetInfo(hrasserver, dwlevel, hport, core::mem::transmute(lplpbbuffer)) } + unsafe { MprAdminPortGetInfo(hrasserver, dwlevel, hport, lplpbbuffer as _) } } #[inline] pub unsafe fn MprAdminPortReset(hrasserver: isize, hport: super::super::Foundation::HANDLE) -> u32 { @@ -398,7 +398,7 @@ where P0: windows_core::Param, { windows_targets::link!("mprapi.dll" "system" fn MprAdminServerConnect(lpwsservername : windows_core::PCWSTR, phmprserver : *mut isize) -> u32); - unsafe { MprAdminServerConnect(lpwsservername.param().abi(), core::mem::transmute(phmprserver)) } + unsafe { MprAdminServerConnect(lpwsservername.param().abi(), phmprserver as _) } } #[inline] pub unsafe fn MprAdminServerDisconnect(hmprserver: isize) { @@ -413,13 +413,13 @@ pub unsafe fn MprAdminServerGetCredentials(hmprserver: isize, dwlevel: u32, lplp #[inline] pub unsafe fn MprAdminServerGetInfo(hmprserver: isize, dwlevel: u32, lplpbbuffer: *mut *mut u8) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminServerGetInfo(hmprserver : isize, dwlevel : u32, lplpbbuffer : *mut *mut u8) -> u32); - unsafe { MprAdminServerGetInfo(hmprserver, dwlevel, core::mem::transmute(lplpbbuffer)) } + unsafe { MprAdminServerGetInfo(hmprserver, dwlevel, lplpbbuffer as _) } } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] pub unsafe fn MprAdminServerGetInfoEx(hmprserver: isize, pserverinfo: *mut MPR_SERVER_EX1) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminServerGetInfoEx(hmprserver : isize, pserverinfo : *mut MPR_SERVER_EX1) -> u32); - unsafe { MprAdminServerGetInfoEx(hmprserver, core::mem::transmute(pserverinfo)) } + unsafe { MprAdminServerGetInfoEx(hmprserver, pserverinfo as _) } } #[inline] pub unsafe fn MprAdminServerSetCredentials(hmprserver: isize, dwlevel: u32, lpbbuffer: *const u8) -> u32 { @@ -444,17 +444,17 @@ where 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); - unsafe { MprAdminTransportCreate(hmprserver, dwtransportid, lpwstransportname.param().abi(), pglobalinfo, dwglobalinfosize, core::mem::transmute(pclientinterfaceinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwclientinterfaceinfosize.unwrap_or(core::mem::zeroed())), lpwsdllpath.param().abi()) } + unsafe { MprAdminTransportCreate(hmprserver, dwtransportid, lpwstransportname.param().abi(), pglobalinfo, dwglobalinfosize, pclientinterfaceinfo.unwrap_or(core::mem::zeroed()) as _, dwclientinterfaceinfosize.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { MprAdminTransportGetInfo(hmprserver, 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()))) } + unsafe { MprAdminTransportGetInfo(hmprserver, dwtransportid, ppglobalinfo.unwrap_or(core::mem::zeroed()) as _, lpdwglobalinfosize.unwrap_or(core::mem::zeroed()) as _, ppclientinterfaceinfo.unwrap_or(core::mem::zeroed()) as _, lpdwclientinterfaceinfosize.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { MprAdminTransportSetInfo(hmprserver, dwtransportid, core::mem::transmute(pglobalinfo.unwrap_or(core::mem::zeroed())), dwglobalinfosize, core::mem::transmute(pclientinterfaceinfo.unwrap_or(core::mem::zeroed())), dwclientinterfaceinfosize) } + unsafe { MprAdminTransportSetInfo(hmprserver, dwtransportid, pglobalinfo.unwrap_or(core::mem::zeroed()) as _, dwglobalinfosize, pclientinterfaceinfo.unwrap_or(core::mem::zeroed()) as _, dwclientinterfaceinfosize) } } #[inline] pub unsafe fn MprAdminUpdateConnection(hrasserver: isize, hrasconnection: super::super::Foundation::HANDLE, prasupdateconnection: *const RAS_UPDATE_CONNECTION) -> u32 { @@ -468,7 +468,7 @@ where P1: windows_core::Param, { windows_targets::link!("mprapi.dll" "system" fn MprAdminUserGetInfo(lpszserver : windows_core::PCWSTR, lpszuser : windows_core::PCWSTR, dwlevel : u32, lpbbuffer : *mut u8) -> u32); - unsafe { MprAdminUserGetInfo(lpszserver.param().abi(), lpszuser.param().abi(), dwlevel, core::mem::transmute(lpbbuffer)) } + unsafe { MprAdminUserGetInfo(lpszserver.param().abi(), lpszuser.param().abi(), dwlevel, lpbbuffer as _) } } #[inline] pub unsafe fn MprAdminUserSetInfo(lpszserver: P0, lpszuser: P1, dwlevel: u32, lpbbuffer: *const u8) -> u32 @@ -487,7 +487,7 @@ pub unsafe fn MprConfigBufferFree(pbuffer: *const core::ffi::c_void) -> u32 { #[inline] 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); - unsafe { MprConfigFilterGetInfo(hmprconfig, dwlevel, dwtransportid, core::mem::transmute(lpbuffer)) } + unsafe { MprConfigFilterGetInfo(hmprconfig, dwlevel, dwtransportid, lpbuffer as _) } } #[inline] pub unsafe fn MprConfigFilterSetInfo(hmprconfig: super::super::Foundation::HANDLE, dwlevel: u32, dwtransportid: u32, lpbuffer: *const u8) -> u32 { @@ -513,7 +513,7 @@ where #[inline] 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); - unsafe { MprConfigInterfaceCreate(hmprconfig, dwlevel, lpbbuffer, core::mem::transmute(phrouterinterface)) } + unsafe { MprConfigInterfaceCreate(hmprconfig, dwlevel, lpbbuffer, phrouterinterface as _) } } #[inline] pub unsafe fn MprConfigInterfaceDelete(hmprconfig: super::super::Foundation::HANDLE, hrouterinterface: super::super::Foundation::HANDLE) -> u32 { @@ -523,13 +523,13 @@ pub unsafe fn MprConfigInterfaceDelete(hmprconfig: super::super::Foundation::HAN #[inline] 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); - unsafe { MprConfigInterfaceEnum(hmprconfig, dwlevel, core::mem::transmute(lplpbuffer), dwprefmaxlen, core::mem::transmute(lpdwentriesread), core::mem::transmute(lpdwtotalentries), core::mem::transmute(lpdwresumehandle.unwrap_or(core::mem::zeroed()))) } + unsafe { MprConfigInterfaceEnum(hmprconfig, dwlevel, lplpbuffer as _, dwprefmaxlen, lpdwentriesread as _, lpdwtotalentries as _, lpdwresumehandle.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Win32_Networking_WinSock", feature = "Win32_Security_Cryptography"))] #[inline] 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); - unsafe { MprConfigInterfaceGetCustomInfoEx(hmprconfig, hrouterinterface, core::mem::transmute(pcustominfo)) } + unsafe { MprConfigInterfaceGetCustomInfoEx(hmprconfig, hrouterinterface, pcustominfo as _) } } #[inline] pub unsafe fn MprConfigInterfaceGetHandle(hmprconfig: super::super::Foundation::HANDLE, lpwsinterfacename: P1, phrouterinterface: *mut super::super::Foundation::HANDLE) -> u32 @@ -537,12 +537,12 @@ where 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); - unsafe { MprConfigInterfaceGetHandle(hmprconfig, lpwsinterfacename.param().abi(), core::mem::transmute(phrouterinterface)) } + unsafe { MprConfigInterfaceGetHandle(hmprconfig, lpwsinterfacename.param().abi(), phrouterinterface as _) } } #[inline] 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); - unsafe { MprConfigInterfaceGetInfo(hmprconfig, hrouterinterface, dwlevel, core::mem::transmute(lplpbuffer), core::mem::transmute(lpdwbuffersize)) } + unsafe { MprConfigInterfaceGetInfo(hmprconfig, hrouterinterface, dwlevel, lplpbuffer as _, lpdwbuffersize as _) } } #[cfg(all(feature = "Win32_Networking_WinSock", feature = "Win32_Security_Cryptography"))] #[inline] @@ -561,22 +561,22 @@ where 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); - unsafe { MprConfigInterfaceTransportAdd(hmprconfig, hrouterinterface, dwtransportid, lpwstransportname.param().abi(), core::mem::transmute(pinterfaceinfo.as_ptr()), pinterfaceinfo.len().try_into().unwrap(), core::mem::transmute(phrouteriftransport)) } + unsafe { MprConfigInterfaceTransportAdd(hmprconfig, hrouterinterface, dwtransportid, lpwstransportname.param().abi(), core::mem::transmute(pinterfaceinfo.as_ptr()), pinterfaceinfo.len().try_into().unwrap(), phrouteriftransport as _) } } #[inline] 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); - unsafe { MprConfigInterfaceTransportEnum(hmprconfig, hrouterinterface, dwlevel, core::mem::transmute(lplpbuffer), dwprefmaxlen, core::mem::transmute(lpdwentriesread), core::mem::transmute(lpdwtotalentries), core::mem::transmute(lpdwresumehandle.unwrap_or(core::mem::zeroed()))) } + unsafe { MprConfigInterfaceTransportEnum(hmprconfig, hrouterinterface, dwlevel, lplpbuffer as _, dwprefmaxlen, lpdwentriesread as _, lpdwtotalentries as _, lpdwresumehandle.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { MprConfigInterfaceTransportGetHandle(hmprconfig, hrouterinterface, dwtransportid, core::mem::transmute(phrouteriftransport)) } + unsafe { MprConfigInterfaceTransportGetHandle(hmprconfig, hrouterinterface, dwtransportid, phrouteriftransport as _) } } #[inline] 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); - unsafe { MprConfigInterfaceTransportGetInfo(hmprconfig, hrouterinterface, hrouteriftransport, core::mem::transmute(ppinterfaceinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwinterfaceinfosize.unwrap_or(core::mem::zeroed()))) } + unsafe { MprConfigInterfaceTransportGetInfo(hmprconfig, hrouterinterface, hrouteriftransport, ppinterfaceinfo.unwrap_or(core::mem::zeroed()) as _, lpdwinterfaceinfosize.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MprConfigInterfaceTransportRemove(hmprconfig: super::super::Foundation::HANDLE, hrouterinterface: super::super::Foundation::HANDLE, hrouteriftransport: super::super::Foundation::HANDLE) -> u32 { @@ -602,7 +602,7 @@ where P0: windows_core::Param, { windows_targets::link!("mprapi.dll" "system" fn MprConfigServerConnect(lpwsservername : windows_core::PCWSTR, phmprconfig : *mut super::super::Foundation:: HANDLE) -> u32); - unsafe { MprConfigServerConnect(lpwsservername.param().abi(), core::mem::transmute(phmprconfig)) } + unsafe { MprConfigServerConnect(lpwsservername.param().abi(), phmprconfig as _) } } #[inline] pub unsafe fn MprConfigServerDisconnect(hmprconfig: super::super::Foundation::HANDLE) { @@ -612,13 +612,13 @@ pub unsafe fn MprConfigServerDisconnect(hmprconfig: super::super::Foundation::HA #[inline] 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); - unsafe { MprConfigServerGetInfo(hmprconfig, dwlevel, core::mem::transmute(lplpbbuffer)) } + unsafe { MprConfigServerGetInfo(hmprconfig, dwlevel, lplpbbuffer as _) } } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] 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); - unsafe { MprConfigServerGetInfoEx(hmprconfig, core::mem::transmute(pserverinfo)) } + unsafe { MprConfigServerGetInfoEx(hmprconfig, pserverinfo as _) } } #[inline] pub unsafe fn MprConfigServerInstall(dwlevel: u32, pbuffer: *const core::ffi::c_void) -> u32 { @@ -656,7 +656,7 @@ where 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); - unsafe { MprConfigTransportCreate(hmprconfig, 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)) } + unsafe { MprConfigTransportCreate(hmprconfig, 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(), phroutertransport as _) } } #[inline] pub unsafe fn MprConfigTransportDelete(hmprconfig: super::super::Foundation::HANDLE, hroutertransport: super::super::Foundation::HANDLE) -> u32 { @@ -666,17 +666,17 @@ pub unsafe fn MprConfigTransportDelete(hmprconfig: super::super::Foundation::HAN #[inline] 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); - unsafe { MprConfigTransportEnum(hmprconfig, dwlevel, core::mem::transmute(lplpbuffer), dwprefmaxlen, core::mem::transmute(lpdwentriesread), core::mem::transmute(lpdwtotalentries), core::mem::transmute(lpdwresumehandle.unwrap_or(core::mem::zeroed()))) } + unsafe { MprConfigTransportEnum(hmprconfig, dwlevel, lplpbuffer as _, dwprefmaxlen, lpdwentriesread as _, lpdwtotalentries as _, lpdwresumehandle.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { MprConfigTransportGetHandle(hmprconfig, dwtransportid, core::mem::transmute(phroutertransport)) } + unsafe { MprConfigTransportGetHandle(hmprconfig, dwtransportid, phroutertransport as _) } } #[inline] 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); - unsafe { MprConfigTransportGetInfo(hmprconfig, 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()))) } + unsafe { MprConfigTransportGetInfo(hmprconfig, hroutertransport, ppglobalinfo.unwrap_or(core::mem::zeroed()) as _, lpdwglobalinfosize.unwrap_or(core::mem::zeroed()) as _, ppclientinterfaceinfo.unwrap_or(core::mem::zeroed()) as _, lpdwclientinterfaceinfosize.unwrap_or(core::mem::zeroed()) as _, lplpwsdllpath.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MprConfigTransportSetInfo(hmprconfig: super::super::Foundation::HANDLE, hroutertransport: super::super::Foundation::HANDLE, pglobalinfo: Option<&[u8]>, pclientinterfaceinfo: Option<&[u8]>, lpwsdllpath: P6) -> u32 @@ -689,12 +689,12 @@ where #[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 { windows_targets::link!("mprapi.dll" "system" 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); - unsafe { MprInfoBlockAdd(lpheader, dwinfotype, dwitemsize, dwitemcount, lpitemdata, core::mem::transmute(lplpnewheader)) } + unsafe { MprInfoBlockAdd(lpheader, dwinfotype, dwitemsize, dwitemcount, lpitemdata, lplpnewheader as _) } } #[inline] pub unsafe fn MprInfoBlockFind(lpheader: *const core::ffi::c_void, dwinfotype: u32, lpdwitemsize: *mut u32, lpdwitemcount: *mut u32, lplpitemdata: *mut *mut u8) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprInfoBlockFind(lpheader : *const core::ffi::c_void, dwinfotype : u32, lpdwitemsize : *mut u32, lpdwitemcount : *mut u32, lplpitemdata : *mut *mut u8) -> u32); - unsafe { MprInfoBlockFind(lpheader, dwinfotype, core::mem::transmute(lpdwitemsize), core::mem::transmute(lpdwitemcount), core::mem::transmute(lplpitemdata)) } + unsafe { MprInfoBlockFind(lpheader, dwinfotype, lpdwitemsize as _, lpdwitemcount as _, lplpitemdata as _) } } #[inline] pub unsafe fn MprInfoBlockQuerySize(lpheader: *const core::ffi::c_void) -> u32 { @@ -704,17 +704,17 @@ pub unsafe fn MprInfoBlockQuerySize(lpheader: *const core::ffi::c_void) -> u32 { #[inline] pub unsafe fn MprInfoBlockRemove(lpheader: *const core::ffi::c_void, dwinfotype: u32, lplpnewheader: *mut *mut core::ffi::c_void) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprInfoBlockRemove(lpheader : *const core::ffi::c_void, dwinfotype : u32, lplpnewheader : *mut *mut core::ffi::c_void) -> u32); - unsafe { MprInfoBlockRemove(lpheader, dwinfotype, core::mem::transmute(lplpnewheader)) } + unsafe { MprInfoBlockRemove(lpheader, dwinfotype, lplpnewheader as _) } } #[inline] pub unsafe fn MprInfoBlockSet(lpheader: *const core::ffi::c_void, dwinfotype: u32, dwitemsize: u32, dwitemcount: u32, lpitemdata: *const u8, lplpnewheader: *mut *mut core::ffi::c_void) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprInfoBlockSet(lpheader : *const core::ffi::c_void, dwinfotype : u32, dwitemsize : u32, dwitemcount : u32, lpitemdata : *const u8, lplpnewheader : *mut *mut core::ffi::c_void) -> u32); - unsafe { MprInfoBlockSet(lpheader, dwinfotype, dwitemsize, dwitemcount, lpitemdata, core::mem::transmute(lplpnewheader)) } + unsafe { MprInfoBlockSet(lpheader, dwinfotype, dwitemsize, dwitemcount, lpitemdata, lplpnewheader as _) } } #[inline] pub unsafe fn MprInfoCreate(dwversion: u32, lplpnewheader: *mut *mut core::ffi::c_void) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprInfoCreate(dwversion : u32, lplpnewheader : *mut *mut core::ffi::c_void) -> u32); - unsafe { MprInfoCreate(dwversion, core::mem::transmute(lplpnewheader)) } + unsafe { MprInfoCreate(dwversion, lplpnewheader as _) } } #[inline] pub unsafe fn MprInfoDelete(lpheader: *const core::ffi::c_void) -> u32 { @@ -724,12 +724,12 @@ pub unsafe fn MprInfoDelete(lpheader: *const core::ffi::c_void) -> u32 { #[inline] pub unsafe fn MprInfoDuplicate(lpheader: *const core::ffi::c_void, lplpnewheader: *mut *mut core::ffi::c_void) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprInfoDuplicate(lpheader : *const core::ffi::c_void, lplpnewheader : *mut *mut core::ffi::c_void) -> u32); - unsafe { MprInfoDuplicate(lpheader, core::mem::transmute(lplpnewheader)) } + unsafe { MprInfoDuplicate(lpheader, lplpnewheader as _) } } #[inline] pub unsafe fn MprInfoRemoveAll(lpheader: *const core::ffi::c_void, lplpnewheader: *mut *mut core::ffi::c_void) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprInfoRemoveAll(lpheader : *const core::ffi::c_void, lplpnewheader : *mut *mut core::ffi::c_void) -> u32); - unsafe { MprInfoRemoveAll(lpheader, core::mem::transmute(lplpnewheader)) } + unsafe { MprInfoRemoveAll(lpheader, lplpnewheader as _) } } #[inline] pub unsafe fn RasClearConnectionStatistics(hrasconn: HRASCONN) -> u32 { @@ -809,7 +809,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); - unsafe { RasDialA(core::mem::transmute(param0.unwrap_or(core::mem::zeroed())), param1.param().abi(), param2, param3, core::mem::transmute(param4.unwrap_or(core::mem::zeroed())), core::mem::transmute(param5)) } + unsafe { RasDialA(param0.unwrap_or(core::mem::zeroed()) as _, param1.param().abi(), param2, param3, param4.unwrap_or(core::mem::zeroed()) as _, param5 as _) } } #[inline] pub unsafe fn RasDialDlgA(lpszphonebook: P0, lpszentry: P1, lpszphonenumber: P2, lpinfo: *mut RASDIALDLG) -> super::super::Foundation::BOOL @@ -819,7 +819,7 @@ where P2: windows_core::Param, { windows_targets::link!("rasdlg.dll" "system" fn RasDialDlgA(lpszphonebook : windows_core::PCSTR, lpszentry : windows_core::PCSTR, lpszphonenumber : windows_core::PCSTR, lpinfo : *mut RASDIALDLG) -> super::super::Foundation:: BOOL); - unsafe { RasDialDlgA(lpszphonebook.param().abi(), lpszentry.param().abi(), lpszphonenumber.param().abi(), core::mem::transmute(lpinfo)) } + unsafe { RasDialDlgA(lpszphonebook.param().abi(), lpszentry.param().abi(), lpszphonenumber.param().abi(), lpinfo as _) } } #[inline] pub unsafe fn RasDialDlgW(lpszphonebook: P0, lpszentry: P1, lpszphonenumber: P2, lpinfo: *mut RASDIALDLG) -> super::super::Foundation::BOOL @@ -829,7 +829,7 @@ where P2: windows_core::Param, { windows_targets::link!("rasdlg.dll" "system" fn RasDialDlgW(lpszphonebook : windows_core::PCWSTR, lpszentry : windows_core::PCWSTR, lpszphonenumber : windows_core::PCWSTR, lpinfo : *mut RASDIALDLG) -> super::super::Foundation:: BOOL); - unsafe { RasDialDlgW(lpszphonebook.param().abi(), lpszentry.param().abi(), lpszphonenumber.param().abi(), core::mem::transmute(lpinfo)) } + unsafe { RasDialDlgW(lpszphonebook.param().abi(), lpszentry.param().abi(), lpszphonenumber.param().abi(), lpinfo as _) } } #[inline] pub unsafe fn RasDialW(param0: Option<*const RASDIALEXTENSIONS>, param1: P1, param2: *const RASDIALPARAMSW, param3: u32, param4: Option<*const core::ffi::c_void>, param5: *mut HRASCONN) -> u32 @@ -837,7 +837,7 @@ 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); - unsafe { RasDialW(core::mem::transmute(param0.unwrap_or(core::mem::zeroed())), param1.param().abi(), param2, param3, core::mem::transmute(param4.unwrap_or(core::mem::zeroed())), core::mem::transmute(param5)) } + unsafe { RasDialW(param0.unwrap_or(core::mem::zeroed()) as _, param1.param().abi(), param2, param3, param4.unwrap_or(core::mem::zeroed()) as _, param5 as _) } } #[inline] pub unsafe fn RasEditPhonebookEntryA(param0: super::super::Foundation::HWND, param1: P1, param2: P2) -> u32 @@ -864,7 +864,7 @@ where P1: windows_core::Param, { windows_targets::link!("rasdlg.dll" "system" fn RasEntryDlgA(lpszphonebook : windows_core::PCSTR, lpszentry : windows_core::PCSTR, lpinfo : *mut RASENTRYDLGA) -> super::super::Foundation:: BOOL); - unsafe { RasEntryDlgA(lpszphonebook.param().abi(), lpszentry.param().abi(), core::mem::transmute(lpinfo)) } + unsafe { RasEntryDlgA(lpszphonebook.param().abi(), lpszentry.param().abi(), lpinfo as _) } } #[inline] pub unsafe fn RasEntryDlgW(lpszphonebook: P0, lpszentry: P1, lpinfo: *mut RASENTRYDLGW) -> super::super::Foundation::BOOL @@ -873,37 +873,37 @@ where P1: windows_core::Param, { windows_targets::link!("rasdlg.dll" "system" fn RasEntryDlgW(lpszphonebook : windows_core::PCWSTR, lpszentry : windows_core::PCWSTR, lpinfo : *mut RASENTRYDLGW) -> super::super::Foundation:: BOOL); - unsafe { RasEntryDlgW(lpszphonebook.param().abi(), lpszentry.param().abi(), core::mem::transmute(lpinfo)) } + unsafe { RasEntryDlgW(lpszphonebook.param().abi(), lpszentry.param().abi(), lpinfo as _) } } #[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); - unsafe { RasEnumAutodialAddressesA(core::mem::transmute(lpprasautodialaddresses.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwcbrasautodialaddresses), core::mem::transmute(lpdwcrasautodialaddresses)) } + unsafe { RasEnumAutodialAddressesA(lpprasautodialaddresses.unwrap_or(core::mem::zeroed()) as _, lpdwcbrasautodialaddresses as _, lpdwcrasautodialaddresses as _) } } #[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); - unsafe { RasEnumAutodialAddressesW(core::mem::transmute(lpprasautodialaddresses.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwcbrasautodialaddresses), core::mem::transmute(lpdwcrasautodialaddresses)) } + unsafe { RasEnumAutodialAddressesW(lpprasautodialaddresses.unwrap_or(core::mem::zeroed()) as _, lpdwcbrasautodialaddresses as _, lpdwcrasautodialaddresses as _) } } #[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); - unsafe { RasEnumConnectionsA(core::mem::transmute(param0.unwrap_or(core::mem::zeroed())), core::mem::transmute(param1), core::mem::transmute(param2)) } + unsafe { RasEnumConnectionsA(param0.unwrap_or(core::mem::zeroed()) as _, param1 as _, param2 as _) } } #[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); - unsafe { RasEnumConnectionsW(core::mem::transmute(param0.unwrap_or(core::mem::zeroed())), core::mem::transmute(param1), core::mem::transmute(param2)) } + unsafe { RasEnumConnectionsW(param0.unwrap_or(core::mem::zeroed()) as _, param1 as _, param2 as _) } } #[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); - unsafe { RasEnumDevicesA(core::mem::transmute(param0.unwrap_or(core::mem::zeroed())), core::mem::transmute(param1), core::mem::transmute(param2)) } + unsafe { RasEnumDevicesA(param0.unwrap_or(core::mem::zeroed()) as _, param1 as _, param2 as _) } } #[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); - unsafe { RasEnumDevicesW(core::mem::transmute(param0.unwrap_or(core::mem::zeroed())), core::mem::transmute(param1), core::mem::transmute(param2)) } + unsafe { RasEnumDevicesW(param0.unwrap_or(core::mem::zeroed()) as _, param1 as _, param2 as _) } } #[inline] pub unsafe fn RasEnumEntriesA(param0: P0, param1: P1, param2: Option<*mut RASENTRYNAMEA>, param3: *mut u32, param4: *mut u32) -> u32 @@ -912,7 +912,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); - unsafe { RasEnumEntriesA(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2.unwrap_or(core::mem::zeroed())), core::mem::transmute(param3), core::mem::transmute(param4)) } + unsafe { RasEnumEntriesA(param0.param().abi(), param1.param().abi(), param2.unwrap_or(core::mem::zeroed()) as _, param3 as _, param4 as _) } } #[inline] pub unsafe fn RasEnumEntriesW(param0: P0, param1: P1, param2: Option<*mut RASENTRYNAMEW>, param3: *mut u32, param4: *mut u32) -> u32 @@ -921,7 +921,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); - unsafe { RasEnumEntriesW(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2.unwrap_or(core::mem::zeroed())), core::mem::transmute(param3), core::mem::transmute(param4)) } + unsafe { RasEnumEntriesW(param0.param().abi(), param1.param().abi(), param2.unwrap_or(core::mem::zeroed()) as _, param3 as _, param4 as _) } } #[inline] pub unsafe fn RasFreeEapUserIdentityA(praseapuseridentity: *const RASEAPUSERIDENTITYA) { @@ -939,7 +939,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); - unsafe { 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)) } + unsafe { RasGetAutodialAddressA(param0.param().abi(), param1.unwrap_or(core::mem::zeroed()) as _, param2.unwrap_or(core::mem::zeroed()) as _, param3 as _, param4 as _) } } #[inline] pub unsafe fn RasGetAutodialAddressW(param0: P0, param1: Option<*const u32>, param2: Option<*mut RASAUTODIALENTRYW>, param3: *mut u32, param4: *mut u32) -> u32 @@ -947,54 +947,54 @@ 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); - unsafe { 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)) } + unsafe { RasGetAutodialAddressW(param0.param().abi(), param1.unwrap_or(core::mem::zeroed()) as _, param2.unwrap_or(core::mem::zeroed()) as _, param3 as _, param4 as _) } } #[inline] pub unsafe fn RasGetAutodialEnableA(param0: u32, param1: *mut super::super::Foundation::BOOL) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasGetAutodialEnableA(param0 : u32, param1 : *mut super::super::Foundation:: BOOL) -> u32); - unsafe { RasGetAutodialEnableA(param0, core::mem::transmute(param1)) } + unsafe { RasGetAutodialEnableA(param0, param1 as _) } } #[inline] pub unsafe fn RasGetAutodialEnableW(param0: u32, param1: *mut super::super::Foundation::BOOL) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasGetAutodialEnableW(param0 : u32, param1 : *mut super::super::Foundation:: BOOL) -> u32); - unsafe { RasGetAutodialEnableW(param0, core::mem::transmute(param1)) } + unsafe { RasGetAutodialEnableW(param0, param1 as _) } } #[inline] pub unsafe fn RasGetAutodialParamA(param0: u32, param1: *mut core::ffi::c_void, param2: *mut u32) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasGetAutodialParamA(param0 : u32, param1 : *mut core::ffi::c_void, param2 : *mut u32) -> u32); - unsafe { RasGetAutodialParamA(param0, core::mem::transmute(param1), core::mem::transmute(param2)) } + unsafe { RasGetAutodialParamA(param0, param1 as _, param2 as _) } } #[inline] pub unsafe fn RasGetAutodialParamW(param0: u32, param1: *mut core::ffi::c_void, param2: *mut u32) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasGetAutodialParamW(param0 : u32, param1 : *mut core::ffi::c_void, param2 : *mut u32) -> u32); - unsafe { RasGetAutodialParamW(param0, core::mem::transmute(param1), core::mem::transmute(param2)) } + unsafe { RasGetAutodialParamW(param0, param1 as _, param2 as _) } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] pub unsafe fn RasGetConnectStatusA(param0: HRASCONN, param1: *mut RASCONNSTATUSA) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasGetConnectStatusA(param0 : HRASCONN, param1 : *mut RASCONNSTATUSA) -> u32); - unsafe { RasGetConnectStatusA(param0, core::mem::transmute(param1)) } + unsafe { RasGetConnectStatusA(param0, param1 as _) } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] pub unsafe fn RasGetConnectStatusW(param0: HRASCONN, param1: *mut RASCONNSTATUSW) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasGetConnectStatusW(param0 : HRASCONN, param1 : *mut RASCONNSTATUSW) -> u32); - unsafe { RasGetConnectStatusW(param0, core::mem::transmute(param1)) } + unsafe { RasGetConnectStatusW(param0, param1 as _) } } #[inline] 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); - unsafe { RasGetConnectionStatistics(hrasconn, core::mem::transmute(lpstatistics)) } + unsafe { RasGetConnectionStatistics(hrasconn, lpstatistics as _) } } #[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); - unsafe { RasGetCountryInfoA(core::mem::transmute(param0.unwrap_or(core::mem::zeroed())), core::mem::transmute(param1)) } + unsafe { RasGetCountryInfoA(param0.unwrap_or(core::mem::zeroed()) as _, param1 as _) } } #[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); - unsafe { RasGetCountryInfoW(core::mem::transmute(param0.unwrap_or(core::mem::zeroed())), core::mem::transmute(param1)) } + unsafe { RasGetCountryInfoW(param0.unwrap_or(core::mem::zeroed()) as _, param1 as _) } } #[inline] pub unsafe fn RasGetCredentialsA(param0: P0, param1: P1, param2: *mut RASCREDENTIALSA) -> u32 @@ -1003,7 +1003,7 @@ where P1: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasGetCredentialsA(param0 : windows_core::PCSTR, param1 : windows_core::PCSTR, param2 : *mut RASCREDENTIALSA) -> u32); - unsafe { RasGetCredentialsA(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2)) } + unsafe { RasGetCredentialsA(param0.param().abi(), param1.param().abi(), param2 as _) } } #[inline] pub unsafe fn RasGetCredentialsW(param0: P0, param1: P1, param2: *mut RASCREDENTIALSW) -> u32 @@ -1012,7 +1012,7 @@ where P1: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasGetCredentialsW(param0 : windows_core::PCWSTR, param1 : windows_core::PCWSTR, param2 : *mut RASCREDENTIALSW) -> u32); - unsafe { RasGetCredentialsW(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2)) } + unsafe { RasGetCredentialsW(param0.param().abi(), param1.param().abi(), param2 as _) } } #[inline] pub unsafe fn RasGetCustomAuthDataA(pszphonebook: P0, pszentry: P1, pbcustomauthdata: Option<*mut u8>, pdwsizeofcustomauthdata: *mut u32) -> u32 @@ -1021,7 +1021,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); - unsafe { RasGetCustomAuthDataA(pszphonebook.param().abi(), pszentry.param().abi(), core::mem::transmute(pbcustomauthdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsizeofcustomauthdata)) } + unsafe { RasGetCustomAuthDataA(pszphonebook.param().abi(), pszentry.param().abi(), pbcustomauthdata.unwrap_or(core::mem::zeroed()) as _, pdwsizeofcustomauthdata as _) } } #[inline] pub unsafe fn RasGetCustomAuthDataW(pszphonebook: P0, pszentry: P1, pbcustomauthdata: Option<*mut u8>, pdwsizeofcustomauthdata: *mut u32) -> u32 @@ -1030,7 +1030,7 @@ where P1: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasGetCustomAuthDataW(pszphonebook : windows_core::PCWSTR, pszentry : windows_core::PCWSTR, pbcustomauthdata : *mut u8, pdwsizeofcustomauthdata : *mut u32) -> u32); - unsafe { RasGetCustomAuthDataW(pszphonebook.param().abi(), pszentry.param().abi(), core::mem::transmute(pbcustomauthdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsizeofcustomauthdata)) } + unsafe { RasGetCustomAuthDataW(pszphonebook.param().abi(), pszentry.param().abi(), pbcustomauthdata.unwrap_or(core::mem::zeroed()) as _, pdwsizeofcustomauthdata as _) } } #[inline] pub unsafe fn RasGetEapUserDataA(htoken: Option, pszphonebook: P1, pszentry: P2, pbeapdata: Option<*mut u8>, pdwsizeofeapdata: *mut u32) -> u32 @@ -1039,7 +1039,7 @@ where P2: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasGetEapUserDataA(htoken : super::super::Foundation:: HANDLE, pszphonebook : windows_core::PCSTR, pszentry : windows_core::PCSTR, pbeapdata : *mut u8, pdwsizeofeapdata : *mut u32) -> u32); - unsafe { 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)) } + unsafe { RasGetEapUserDataA(htoken.unwrap_or(core::mem::zeroed()) as _, pszphonebook.param().abi(), pszentry.param().abi(), pbeapdata.unwrap_or(core::mem::zeroed()) as _, pdwsizeofeapdata as _) } } #[inline] pub unsafe fn RasGetEapUserDataW(htoken: Option, pszphonebook: P1, pszentry: P2, pbeapdata: Option<*mut u8>, pdwsizeofeapdata: *mut u32) -> u32 @@ -1048,7 +1048,7 @@ where P2: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasGetEapUserDataW(htoken : super::super::Foundation:: HANDLE, pszphonebook : windows_core::PCWSTR, pszentry : windows_core::PCWSTR, pbeapdata : *mut u8, pdwsizeofeapdata : *mut u32) -> u32); - unsafe { 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)) } + unsafe { RasGetEapUserDataW(htoken.unwrap_or(core::mem::zeroed()) as _, pszphonebook.param().abi(), pszentry.param().abi(), pbeapdata.unwrap_or(core::mem::zeroed()) as _, pdwsizeofeapdata as _) } } #[inline] pub unsafe fn RasGetEapUserIdentityA(pszphonebook: P0, pszentry: P1, dwflags: u32, hwnd: super::super::Foundation::HWND, ppraseapuseridentity: *mut *mut RASEAPUSERIDENTITYA) -> u32 @@ -1057,7 +1057,7 @@ where P1: 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); - unsafe { RasGetEapUserIdentityA(pszphonebook.param().abi(), pszentry.param().abi(), dwflags, hwnd, core::mem::transmute(ppraseapuseridentity)) } + unsafe { RasGetEapUserIdentityA(pszphonebook.param().abi(), pszentry.param().abi(), dwflags, hwnd, ppraseapuseridentity as _) } } #[inline] pub unsafe fn RasGetEapUserIdentityW(pszphonebook: P0, pszentry: P1, dwflags: u32, hwnd: super::super::Foundation::HWND, ppraseapuseridentity: *mut *mut RASEAPUSERIDENTITYW) -> u32 @@ -1066,7 +1066,7 @@ where P1: 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); - unsafe { RasGetEapUserIdentityW(pszphonebook.param().abi(), pszentry.param().abi(), dwflags, hwnd, core::mem::transmute(ppraseapuseridentity)) } + unsafe { RasGetEapUserIdentityW(pszphonebook.param().abi(), pszentry.param().abi(), dwflags, hwnd, ppraseapuseridentity as _) } } #[inline] pub unsafe fn RasGetEntryDialParamsA(param0: P0, param1: *mut RASDIALPARAMSA, param2: *mut super::super::Foundation::BOOL) -> u32 @@ -1074,7 +1074,7 @@ where P0: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasGetEntryDialParamsA(param0 : windows_core::PCSTR, param1 : *mut RASDIALPARAMSA, param2 : *mut super::super::Foundation:: BOOL) -> u32); - unsafe { RasGetEntryDialParamsA(param0.param().abi(), core::mem::transmute(param1), core::mem::transmute(param2)) } + unsafe { RasGetEntryDialParamsA(param0.param().abi(), param1 as _, param2 as _) } } #[inline] pub unsafe fn RasGetEntryDialParamsW(param0: P0, param1: *mut RASDIALPARAMSW, param2: *mut super::super::Foundation::BOOL) -> u32 @@ -1082,7 +1082,7 @@ where P0: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasGetEntryDialParamsW(param0 : windows_core::PCWSTR, param1 : *mut RASDIALPARAMSW, param2 : *mut super::super::Foundation:: BOOL) -> u32); - unsafe { RasGetEntryDialParamsW(param0.param().abi(), core::mem::transmute(param1), core::mem::transmute(param2)) } + unsafe { RasGetEntryDialParamsW(param0.param().abi(), param1 as _, param2 as _) } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -1092,7 +1092,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); - unsafe { 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()))) } + unsafe { RasGetEntryPropertiesA(param0.param().abi(), param1.param().abi(), param2.unwrap_or(core::mem::zeroed()) as _, param3 as _, param4.unwrap_or(core::mem::zeroed()) as _, param5.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -1102,7 +1102,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); - unsafe { 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()))) } + unsafe { RasGetEntryPropertiesW(param0.param().abi(), param1.param().abi(), param2.unwrap_or(core::mem::zeroed()) as _, param3 as _, param4.unwrap_or(core::mem::zeroed()) as _, param5.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RasGetErrorStringA(resourceid: u32, lpszstring: &mut [u8]) -> u32 { @@ -1117,7 +1117,7 @@ pub unsafe fn RasGetErrorStringW(resourceid: u32, lpszstring: &mut [u16]) -> u32 #[inline] 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); - unsafe { RasGetLinkStatistics(hrasconn, dwsubentry, core::mem::transmute(lpstatistics)) } + unsafe { RasGetLinkStatistics(hrasconn, dwsubentry, lpstatistics as _) } } #[inline] pub unsafe fn RasGetPCscf(lpszpcscf: windows_core::PWSTR) -> u32 { @@ -1127,28 +1127,28 @@ pub unsafe fn RasGetPCscf(lpszpcscf: windows_core::PWSTR) -> u32 { #[inline] 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); - unsafe { RasGetProjectionInfoA(param0, param1, core::mem::transmute(param2), core::mem::transmute(param3)) } + unsafe { RasGetProjectionInfoA(param0, param1, param2 as _, param3 as _) } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] 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); - unsafe { RasGetProjectionInfoEx(hrasconn, core::mem::transmute(prasprojection.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwsize)) } + unsafe { RasGetProjectionInfoEx(hrasconn, prasprojection.unwrap_or(core::mem::zeroed()) as _, lpdwsize as _) } } #[inline] 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); - unsafe { RasGetProjectionInfoW(param0, param1, core::mem::transmute(param2), core::mem::transmute(param3)) } + unsafe { RasGetProjectionInfoW(param0, param1, param2 as _, param3 as _) } } #[inline] 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); - unsafe { RasGetSubEntryHandleA(param0, param1, core::mem::transmute(param2)) } + unsafe { RasGetSubEntryHandleA(param0, param1, param2 as _) } } #[inline] 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); - unsafe { RasGetSubEntryHandleW(param0, param1, core::mem::transmute(param2)) } + unsafe { RasGetSubEntryHandleW(param0, param1, param2 as _) } } #[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 @@ -1157,7 +1157,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); - unsafe { RasGetSubEntryPropertiesA(param0.param().abi(), param1.param().abi(), 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()))) } + unsafe { RasGetSubEntryPropertiesA(param0.param().abi(), param1.param().abi(), param2, param3.unwrap_or(core::mem::zeroed()) as _, param4.unwrap_or(core::mem::zeroed()) as _, param5.unwrap_or(core::mem::zeroed()) as _, param6.unwrap_or(core::mem::zeroed()) as _) } } #[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 @@ -1166,7 +1166,7 @@ where P1: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasGetSubEntryPropertiesW(param0 : windows_core::PCWSTR, param1 : windows_core::PCWSTR, param2 : u32, param3 : *mut RASSUBENTRYW, param4 : *mut u32, param5 : *mut u8, param6 : *mut u32) -> u32); - unsafe { RasGetSubEntryPropertiesW(param0.param().abi(), param1.param().abi(), 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()))) } + unsafe { RasGetSubEntryPropertiesW(param0.param().abi(), param1.param().abi(), param2, param3.unwrap_or(core::mem::zeroed()) as _, param4.unwrap_or(core::mem::zeroed()) as _, param5.unwrap_or(core::mem::zeroed()) as _, param6.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RasHangUpA(param0: HRASCONN) -> u32 { @@ -1190,7 +1190,7 @@ where P1: windows_core::Param, { windows_targets::link!("rasdlg.dll" "system" fn RasPhonebookDlgA(lpszphonebook : windows_core::PCSTR, lpszentry : windows_core::PCSTR, lpinfo : *mut RASPBDLGA) -> super::super::Foundation:: BOOL); - unsafe { RasPhonebookDlgA(lpszphonebook.param().abi(), lpszentry.param().abi(), core::mem::transmute(lpinfo)) } + unsafe { RasPhonebookDlgA(lpszphonebook.param().abi(), lpszentry.param().abi(), lpinfo as _) } } #[inline] pub unsafe fn RasPhonebookDlgW(lpszphonebook: P0, lpszentry: P1, lpinfo: *mut RASPBDLGW) -> super::super::Foundation::BOOL @@ -1199,7 +1199,7 @@ where P1: windows_core::Param, { windows_targets::link!("rasdlg.dll" "system" fn RasPhonebookDlgW(lpszphonebook : windows_core::PCWSTR, lpszentry : windows_core::PCWSTR, lpinfo : *mut RASPBDLGW) -> super::super::Foundation:: BOOL); - unsafe { RasPhonebookDlgW(lpszphonebook.param().abi(), lpszentry.param().abi(), core::mem::transmute(lpinfo)) } + unsafe { RasPhonebookDlgW(lpszphonebook.param().abi(), lpszentry.param().abi(), lpinfo as _) } } #[inline] pub unsafe fn RasRenameEntryA(param0: P0, param1: P1, param2: P2) -> u32 @@ -1227,7 +1227,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); - unsafe { RasSetAutodialAddressA(param0.param().abi(), param1, core::mem::transmute(param2.unwrap_or(core::mem::zeroed())), param3, param4) } + unsafe { RasSetAutodialAddressA(param0.param().abi(), param1, param2.unwrap_or(core::mem::zeroed()) as _, param3, param4) } } #[inline] pub unsafe fn RasSetAutodialAddressW(param0: P0, param1: u32, param2: Option<*const RASAUTODIALENTRYW>, param3: u32, param4: u32) -> u32 @@ -1235,7 +1235,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); - unsafe { RasSetAutodialAddressW(param0.param().abi(), param1, core::mem::transmute(param2.unwrap_or(core::mem::zeroed())), param3, param4) } + unsafe { RasSetAutodialAddressW(param0.param().abi(), param1, param2.unwrap_or(core::mem::zeroed()) as _, param3, param4) } } #[inline] pub unsafe fn RasSetAutodialEnableA(param0: u32, param1: bool) -> u32 { @@ -1300,7 +1300,7 @@ where 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); - unsafe { RasSetEapUserDataA(core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), pszphonebook.param().abi(), pszentry.param().abi(), pbeapdata, dwsizeofeapdata) } + unsafe { RasSetEapUserDataA(htoken.unwrap_or(core::mem::zeroed()) as _, pszphonebook.param().abi(), pszentry.param().abi(), pbeapdata, dwsizeofeapdata) } } #[inline] pub unsafe fn RasSetEapUserDataW(htoken: Option, pszphonebook: P1, pszentry: P2, pbeapdata: *const u8, dwsizeofeapdata: u32) -> u32 @@ -1309,7 +1309,7 @@ where 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); - unsafe { RasSetEapUserDataW(core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), pszphonebook.param().abi(), pszentry.param().abi(), pbeapdata, dwsizeofeapdata) } + unsafe { RasSetEapUserDataW(htoken.unwrap_or(core::mem::zeroed()) as _, pszphonebook.param().abi(), pszentry.param().abi(), pbeapdata, dwsizeofeapdata) } } #[inline] pub unsafe fn RasSetEntryDialParamsA(param0: P0, param1: *const RASDIALPARAMSA, param2: bool) -> u32 @@ -1335,7 +1335,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); - unsafe { RasSetEntryPropertiesA(param0.param().abi(), param1.param().abi(), param2, param3, core::mem::transmute(param4.unwrap_or(core::mem::zeroed())), param5) } + unsafe { RasSetEntryPropertiesA(param0.param().abi(), param1.param().abi(), param2, param3, param4.unwrap_or(core::mem::zeroed()) as _, param5) } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -1345,7 +1345,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); - unsafe { RasSetEntryPropertiesW(param0.param().abi(), param1.param().abi(), param2, param3, core::mem::transmute(param4.unwrap_or(core::mem::zeroed())), param5) } + unsafe { RasSetEntryPropertiesW(param0.param().abi(), param1.param().abi(), param2, param3, param4.unwrap_or(core::mem::zeroed()) as _, param5) } } #[inline] pub unsafe fn RasSetSubEntryPropertiesA(param0: P0, param1: P1, param2: u32, param3: *const RASSUBENTRYA, param4: u32, param5: Option<*const u8>, param6: u32) -> u32 @@ -1354,7 +1354,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); - unsafe { RasSetSubEntryPropertiesA(param0.param().abi(), param1.param().abi(), param2, param3, param4, core::mem::transmute(param5.unwrap_or(core::mem::zeroed())), param6) } + unsafe { RasSetSubEntryPropertiesA(param0.param().abi(), param1.param().abi(), param2, param3, param4, param5.unwrap_or(core::mem::zeroed()) as _, param6) } } #[inline] pub unsafe fn RasSetSubEntryPropertiesW(param0: P0, param1: P1, param2: u32, param3: *const RASSUBENTRYW, param4: u32, param5: Option<*const u8>, param6: u32) -> u32 @@ -1363,7 +1363,7 @@ where P1: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasSetSubEntryPropertiesW(param0 : windows_core::PCWSTR, param1 : windows_core::PCWSTR, param2 : u32, param3 : *const RASSUBENTRYW, param4 : u32, param5 : *const u8, param6 : u32) -> u32); - unsafe { RasSetSubEntryPropertiesW(param0.param().abi(), param1.param().abi(), param2, param3, param4, core::mem::transmute(param5.unwrap_or(core::mem::zeroed())), param6) } + unsafe { RasSetSubEntryPropertiesW(param0.param().abi(), param1.param().abi(), param2, param3, param4, param5.unwrap_or(core::mem::zeroed()) as _, param6) } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -1392,12 +1392,12 @@ where #[inline] pub unsafe fn RtmAddNextHop(rtmreghandle: isize, nexthopinfo: *mut RTM_NEXTHOP_INFO, nexthophandle: *mut isize, changeflags: *mut u32) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmAddNextHop(rtmreghandle : isize, nexthopinfo : *mut RTM_NEXTHOP_INFO, nexthophandle : *mut isize, changeflags : *mut u32) -> u32); - unsafe { RtmAddNextHop(rtmreghandle, core::mem::transmute(nexthopinfo), core::mem::transmute(nexthophandle), core::mem::transmute(changeflags)) } + unsafe { RtmAddNextHop(rtmreghandle, nexthopinfo as _, nexthophandle as _, changeflags as _) } } #[inline] pub unsafe fn RtmAddRouteToDest(rtmreghandle: isize, routehandle: *mut isize, destaddress: *mut RTM_NET_ADDRESS, routeinfo: *mut RTM_ROUTE_INFO, timetolive: u32, routelisthandle: isize, notifytype: u32, notifyhandle: isize, changeflags: *mut u32) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmAddRouteToDest(rtmreghandle : isize, routehandle : *mut isize, destaddress : *mut RTM_NET_ADDRESS, routeinfo : *mut RTM_ROUTE_INFO, timetolive : u32, routelisthandle : isize, notifytype : u32, notifyhandle : isize, changeflags : *mut u32) -> u32); - unsafe { RtmAddRouteToDest(rtmreghandle, core::mem::transmute(routehandle), core::mem::transmute(destaddress), core::mem::transmute(routeinfo), timetolive, routelisthandle, notifytype, notifyhandle, core::mem::transmute(changeflags)) } + unsafe { RtmAddRouteToDest(rtmreghandle, routehandle as _, destaddress as _, routeinfo as _, timetolive, routelisthandle, notifytype, notifyhandle, changeflags as _) } } #[inline] pub unsafe fn RtmBlockMethods(rtmreghandle: isize, targethandle: super::super::Foundation::HANDLE, targettype: u8, blockingflag: u32) -> u32 { @@ -1408,38 +1408,38 @@ pub unsafe fn RtmBlockMethods(rtmreghandle: isize, targethandle: super::super::F #[inline] pub unsafe fn RtmConvertIpv6AddressAndLengthToNetAddress(pnetaddress: *mut RTM_NET_ADDRESS, address: super::super::Networking::WinSock::IN6_ADDR, dwlength: u32, dwaddresssize: u32) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmConvertIpv6AddressAndLengthToNetAddress(pnetaddress : *mut RTM_NET_ADDRESS, address : super::super::Networking::WinSock:: IN6_ADDR, dwlength : u32, dwaddresssize : u32) -> u32); - unsafe { RtmConvertIpv6AddressAndLengthToNetAddress(core::mem::transmute(pnetaddress), core::mem::transmute(address), dwlength, dwaddresssize) } + unsafe { RtmConvertIpv6AddressAndLengthToNetAddress(pnetaddress as _, core::mem::transmute(address), dwlength, dwaddresssize) } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] pub unsafe fn RtmConvertNetAddressToIpv6AddressAndLength(pnetaddress: *mut RTM_NET_ADDRESS, paddress: *mut super::super::Networking::WinSock::IN6_ADDR, plength: *mut u32, dwaddresssize: u32) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmConvertNetAddressToIpv6AddressAndLength(pnetaddress : *mut RTM_NET_ADDRESS, paddress : *mut super::super::Networking::WinSock:: IN6_ADDR, plength : *mut u32, dwaddresssize : u32) -> u32); - unsafe { RtmConvertNetAddressToIpv6AddressAndLength(core::mem::transmute(pnetaddress), core::mem::transmute(paddress), core::mem::transmute(plength), dwaddresssize) } + unsafe { RtmConvertNetAddressToIpv6AddressAndLength(pnetaddress as _, paddress as _, plength as _, dwaddresssize) } } #[inline] pub unsafe fn RtmCreateDestEnum(rtmreghandle: isize, targetviews: u32, enumflags: u32, netaddress: *mut RTM_NET_ADDRESS, protocolid: u32, rtmenumhandle: *mut isize) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmCreateDestEnum(rtmreghandle : isize, targetviews : u32, enumflags : u32, netaddress : *mut RTM_NET_ADDRESS, protocolid : u32, rtmenumhandle : *mut isize) -> u32); - unsafe { RtmCreateDestEnum(rtmreghandle, targetviews, enumflags, core::mem::transmute(netaddress), protocolid, core::mem::transmute(rtmenumhandle)) } + unsafe { RtmCreateDestEnum(rtmreghandle, targetviews, enumflags, netaddress as _, protocolid, rtmenumhandle as _) } } #[inline] pub unsafe fn RtmCreateNextHopEnum(rtmreghandle: isize, enumflags: u32, netaddress: *mut RTM_NET_ADDRESS, rtmenumhandle: *mut isize) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmCreateNextHopEnum(rtmreghandle : isize, enumflags : u32, netaddress : *mut RTM_NET_ADDRESS, rtmenumhandle : *mut isize) -> u32); - unsafe { RtmCreateNextHopEnum(rtmreghandle, enumflags, core::mem::transmute(netaddress), core::mem::transmute(rtmenumhandle)) } + unsafe { RtmCreateNextHopEnum(rtmreghandle, enumflags, netaddress as _, rtmenumhandle as _) } } #[inline] pub unsafe fn RtmCreateRouteEnum(rtmreghandle: isize, desthandle: isize, targetviews: u32, enumflags: u32, startdest: *mut RTM_NET_ADDRESS, matchingflags: u32, criteriaroute: *mut RTM_ROUTE_INFO, criteriainterface: u32, rtmenumhandle: *mut isize) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmCreateRouteEnum(rtmreghandle : isize, desthandle : isize, targetviews : u32, enumflags : u32, startdest : *mut RTM_NET_ADDRESS, matchingflags : u32, criteriaroute : *mut RTM_ROUTE_INFO, criteriainterface : u32, rtmenumhandle : *mut isize) -> u32); - unsafe { RtmCreateRouteEnum(rtmreghandle, desthandle, targetviews, enumflags, core::mem::transmute(startdest), matchingflags, core::mem::transmute(criteriaroute), criteriainterface, core::mem::transmute(rtmenumhandle)) } + unsafe { RtmCreateRouteEnum(rtmreghandle, desthandle, targetviews, enumflags, startdest as _, matchingflags, criteriaroute as _, criteriainterface, rtmenumhandle as _) } } #[inline] pub unsafe fn RtmCreateRouteList(rtmreghandle: isize, routelisthandle: *mut isize) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmCreateRouteList(rtmreghandle : isize, routelisthandle : *mut isize) -> u32); - unsafe { RtmCreateRouteList(rtmreghandle, core::mem::transmute(routelisthandle)) } + unsafe { RtmCreateRouteList(rtmreghandle, routelisthandle as _) } } #[inline] pub unsafe fn RtmCreateRouteListEnum(rtmreghandle: isize, routelisthandle: isize, rtmenumhandle: *mut isize) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmCreateRouteListEnum(rtmreghandle : isize, routelisthandle : isize, rtmenumhandle : *mut isize) -> u32); - unsafe { RtmCreateRouteListEnum(rtmreghandle, routelisthandle, core::mem::transmute(rtmenumhandle)) } + unsafe { RtmCreateRouteListEnum(rtmreghandle, routelisthandle, rtmenumhandle as _) } } #[inline] pub unsafe fn RtmDeleteEnumHandle(rtmreghandle: isize, enumhandle: isize) -> u32 { @@ -1449,7 +1449,7 @@ pub unsafe fn RtmDeleteEnumHandle(rtmreghandle: isize, enumhandle: isize) -> u32 #[inline] pub unsafe fn RtmDeleteNextHop(rtmreghandle: isize, nexthophandle: isize, nexthopinfo: *mut RTM_NEXTHOP_INFO) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmDeleteNextHop(rtmreghandle : isize, nexthophandle : isize, nexthopinfo : *mut RTM_NEXTHOP_INFO) -> u32); - unsafe { RtmDeleteNextHop(rtmreghandle, nexthophandle, core::mem::transmute(nexthopinfo)) } + unsafe { RtmDeleteNextHop(rtmreghandle, nexthophandle, nexthopinfo as _) } } #[inline] pub unsafe fn RtmDeleteRouteList(rtmreghandle: isize, routelisthandle: isize) -> u32 { @@ -1459,7 +1459,7 @@ pub unsafe fn RtmDeleteRouteList(rtmreghandle: isize, routelisthandle: isize) -> #[inline] pub unsafe fn RtmDeleteRouteToDest(rtmreghandle: isize, routehandle: isize, changeflags: *mut u32) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmDeleteRouteToDest(rtmreghandle : isize, routehandle : isize, changeflags : *mut u32) -> u32); - unsafe { RtmDeleteRouteToDest(rtmreghandle, routehandle, core::mem::transmute(changeflags)) } + unsafe { RtmDeleteRouteToDest(rtmreghandle, routehandle, changeflags as _) } } #[inline] pub unsafe fn RtmDeregisterEntity(rtmreghandle: isize) -> u32 { @@ -1474,102 +1474,102 @@ pub unsafe fn RtmDeregisterFromChangeNotification(rtmreghandle: isize, notifyhan #[inline] pub unsafe fn RtmFindNextHop(rtmreghandle: isize, nexthopinfo: *mut RTM_NEXTHOP_INFO, nexthophandle: *mut isize, nexthoppointer: *mut *mut RTM_NEXTHOP_INFO) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmFindNextHop(rtmreghandle : isize, nexthopinfo : *mut RTM_NEXTHOP_INFO, nexthophandle : *mut isize, nexthoppointer : *mut *mut RTM_NEXTHOP_INFO) -> u32); - unsafe { RtmFindNextHop(rtmreghandle, core::mem::transmute(nexthopinfo), core::mem::transmute(nexthophandle), core::mem::transmute(nexthoppointer)) } + unsafe { RtmFindNextHop(rtmreghandle, nexthopinfo as _, nexthophandle as _, nexthoppointer as _) } } #[inline] pub unsafe fn RtmGetChangeStatus(rtmreghandle: isize, notifyhandle: isize, desthandle: isize, changestatus: *mut super::super::Foundation::BOOL) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmGetChangeStatus(rtmreghandle : isize, notifyhandle : isize, desthandle : isize, changestatus : *mut super::super::Foundation:: BOOL) -> u32); - unsafe { RtmGetChangeStatus(rtmreghandle, notifyhandle, desthandle, core::mem::transmute(changestatus)) } + unsafe { RtmGetChangeStatus(rtmreghandle, notifyhandle, desthandle, changestatus as _) } } #[inline] pub unsafe fn RtmGetChangedDests(rtmreghandle: isize, notifyhandle: isize, numdests: *mut u32, changeddests: *mut RTM_DEST_INFO) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmGetChangedDests(rtmreghandle : isize, notifyhandle : isize, numdests : *mut u32, changeddests : *mut RTM_DEST_INFO) -> u32); - unsafe { RtmGetChangedDests(rtmreghandle, notifyhandle, core::mem::transmute(numdests), core::mem::transmute(changeddests)) } + unsafe { RtmGetChangedDests(rtmreghandle, notifyhandle, numdests as _, changeddests as _) } } #[inline] pub unsafe fn RtmGetDestInfo(rtmreghandle: isize, desthandle: isize, protocolid: u32, targetviews: u32, destinfo: *mut RTM_DEST_INFO) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmGetDestInfo(rtmreghandle : isize, desthandle : isize, protocolid : u32, targetviews : u32, destinfo : *mut RTM_DEST_INFO) -> u32); - unsafe { RtmGetDestInfo(rtmreghandle, desthandle, protocolid, targetviews, core::mem::transmute(destinfo)) } + unsafe { RtmGetDestInfo(rtmreghandle, desthandle, protocolid, targetviews, destinfo as _) } } #[inline] pub unsafe fn RtmGetEntityInfo(rtmreghandle: isize, entityhandle: isize, entityinfo: *mut RTM_ENTITY_INFO) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmGetEntityInfo(rtmreghandle : isize, entityhandle : isize, entityinfo : *mut RTM_ENTITY_INFO) -> u32); - unsafe { RtmGetEntityInfo(rtmreghandle, entityhandle, core::mem::transmute(entityinfo)) } + unsafe { RtmGetEntityInfo(rtmreghandle, entityhandle, entityinfo as _) } } #[inline] pub unsafe fn RtmGetEntityMethods(rtmreghandle: isize, entityhandle: isize, nummethods: *mut u32, exptmethods: *mut RTM_ENTITY_EXPORT_METHOD) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmGetEntityMethods(rtmreghandle : isize, entityhandle : isize, nummethods : *mut u32, exptmethods : *mut RTM_ENTITY_EXPORT_METHOD) -> u32); - unsafe { RtmGetEntityMethods(rtmreghandle, entityhandle, core::mem::transmute(nummethods), core::mem::transmute(exptmethods)) } + unsafe { RtmGetEntityMethods(rtmreghandle, entityhandle, nummethods as _, exptmethods as _) } } #[inline] pub unsafe fn RtmGetEnumDests(rtmreghandle: isize, enumhandle: isize, numdests: *mut u32, destinfos: *mut RTM_DEST_INFO) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmGetEnumDests(rtmreghandle : isize, enumhandle : isize, numdests : *mut u32, destinfos : *mut RTM_DEST_INFO) -> u32); - unsafe { RtmGetEnumDests(rtmreghandle, enumhandle, core::mem::transmute(numdests), core::mem::transmute(destinfos)) } + unsafe { RtmGetEnumDests(rtmreghandle, enumhandle, numdests as _, destinfos as _) } } #[inline] pub unsafe fn RtmGetEnumNextHops(rtmreghandle: isize, enumhandle: isize, numnexthops: *mut u32, nexthophandles: *mut isize) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmGetEnumNextHops(rtmreghandle : isize, enumhandle : isize, numnexthops : *mut u32, nexthophandles : *mut isize) -> u32); - unsafe { RtmGetEnumNextHops(rtmreghandle, enumhandle, core::mem::transmute(numnexthops), core::mem::transmute(nexthophandles)) } + unsafe { RtmGetEnumNextHops(rtmreghandle, enumhandle, numnexthops as _, nexthophandles as _) } } #[inline] pub unsafe fn RtmGetEnumRoutes(rtmreghandle: isize, enumhandle: isize, numroutes: *mut u32, routehandles: *mut isize) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmGetEnumRoutes(rtmreghandle : isize, enumhandle : isize, numroutes : *mut u32, routehandles : *mut isize) -> u32); - unsafe { RtmGetEnumRoutes(rtmreghandle, enumhandle, core::mem::transmute(numroutes), core::mem::transmute(routehandles)) } + unsafe { RtmGetEnumRoutes(rtmreghandle, enumhandle, numroutes as _, routehandles as _) } } #[inline] pub unsafe fn RtmGetExactMatchDestination(rtmreghandle: isize, destaddress: *mut RTM_NET_ADDRESS, protocolid: u32, targetviews: u32, destinfo: *mut RTM_DEST_INFO) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmGetExactMatchDestination(rtmreghandle : isize, destaddress : *mut RTM_NET_ADDRESS, protocolid : u32, targetviews : u32, destinfo : *mut RTM_DEST_INFO) -> u32); - unsafe { RtmGetExactMatchDestination(rtmreghandle, core::mem::transmute(destaddress), protocolid, targetviews, core::mem::transmute(destinfo)) } + unsafe { RtmGetExactMatchDestination(rtmreghandle, destaddress as _, protocolid, targetviews, destinfo as _) } } #[inline] pub unsafe fn RtmGetExactMatchRoute(rtmreghandle: isize, destaddress: *mut RTM_NET_ADDRESS, matchingflags: u32, routeinfo: *mut RTM_ROUTE_INFO, interfaceindex: u32, targetviews: u32, routehandle: *mut isize) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmGetExactMatchRoute(rtmreghandle : isize, destaddress : *mut RTM_NET_ADDRESS, matchingflags : u32, routeinfo : *mut RTM_ROUTE_INFO, interfaceindex : u32, targetviews : u32, routehandle : *mut isize) -> u32); - unsafe { RtmGetExactMatchRoute(rtmreghandle, core::mem::transmute(destaddress), matchingflags, core::mem::transmute(routeinfo), interfaceindex, targetviews, core::mem::transmute(routehandle)) } + unsafe { RtmGetExactMatchRoute(rtmreghandle, destaddress as _, matchingflags, routeinfo as _, interfaceindex, targetviews, routehandle as _) } } #[inline] pub unsafe fn RtmGetLessSpecificDestination(rtmreghandle: isize, desthandle: isize, protocolid: u32, targetviews: u32, destinfo: *mut RTM_DEST_INFO) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmGetLessSpecificDestination(rtmreghandle : isize, desthandle : isize, protocolid : u32, targetviews : u32, destinfo : *mut RTM_DEST_INFO) -> u32); - unsafe { RtmGetLessSpecificDestination(rtmreghandle, desthandle, protocolid, targetviews, core::mem::transmute(destinfo)) } + unsafe { RtmGetLessSpecificDestination(rtmreghandle, desthandle, protocolid, targetviews, destinfo as _) } } #[inline] pub unsafe fn RtmGetListEnumRoutes(rtmreghandle: isize, enumhandle: isize, numroutes: *mut u32, routehandles: *mut isize) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmGetListEnumRoutes(rtmreghandle : isize, enumhandle : isize, numroutes : *mut u32, routehandles : *mut isize) -> u32); - unsafe { RtmGetListEnumRoutes(rtmreghandle, enumhandle, core::mem::transmute(numroutes), core::mem::transmute(routehandles)) } + unsafe { RtmGetListEnumRoutes(rtmreghandle, enumhandle, numroutes as _, routehandles as _) } } #[inline] pub unsafe fn RtmGetMostSpecificDestination(rtmreghandle: isize, destaddress: *mut RTM_NET_ADDRESS, protocolid: u32, targetviews: u32, destinfo: *mut RTM_DEST_INFO) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmGetMostSpecificDestination(rtmreghandle : isize, destaddress : *mut RTM_NET_ADDRESS, protocolid : u32, targetviews : u32, destinfo : *mut RTM_DEST_INFO) -> u32); - unsafe { RtmGetMostSpecificDestination(rtmreghandle, core::mem::transmute(destaddress), protocolid, targetviews, core::mem::transmute(destinfo)) } + unsafe { RtmGetMostSpecificDestination(rtmreghandle, destaddress as _, protocolid, targetviews, destinfo as _) } } #[inline] pub unsafe fn RtmGetNextHopInfo(rtmreghandle: isize, nexthophandle: isize, nexthopinfo: *mut RTM_NEXTHOP_INFO) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmGetNextHopInfo(rtmreghandle : isize, nexthophandle : isize, nexthopinfo : *mut RTM_NEXTHOP_INFO) -> u32); - unsafe { RtmGetNextHopInfo(rtmreghandle, nexthophandle, core::mem::transmute(nexthopinfo)) } + unsafe { RtmGetNextHopInfo(rtmreghandle, nexthophandle, nexthopinfo as _) } } #[inline] pub unsafe fn RtmGetNextHopPointer(rtmreghandle: isize, nexthophandle: isize, nexthoppointer: *mut *mut RTM_NEXTHOP_INFO) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmGetNextHopPointer(rtmreghandle : isize, nexthophandle : isize, nexthoppointer : *mut *mut RTM_NEXTHOP_INFO) -> u32); - unsafe { RtmGetNextHopPointer(rtmreghandle, nexthophandle, core::mem::transmute(nexthoppointer)) } + unsafe { RtmGetNextHopPointer(rtmreghandle, nexthophandle, nexthoppointer as _) } } #[inline] pub unsafe fn RtmGetOpaqueInformationPointer(rtmreghandle: isize, desthandle: isize, opaqueinfopointer: *mut *mut core::ffi::c_void) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmGetOpaqueInformationPointer(rtmreghandle : isize, desthandle : isize, opaqueinfopointer : *mut *mut core::ffi::c_void) -> u32); - unsafe { RtmGetOpaqueInformationPointer(rtmreghandle, desthandle, core::mem::transmute(opaqueinfopointer)) } + unsafe { RtmGetOpaqueInformationPointer(rtmreghandle, desthandle, opaqueinfopointer as _) } } #[inline] pub unsafe fn RtmGetRegisteredEntities(rtmreghandle: isize, numentities: *mut u32, entityhandles: *mut isize, entityinfos: *mut RTM_ENTITY_INFO) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmGetRegisteredEntities(rtmreghandle : isize, numentities : *mut u32, entityhandles : *mut isize, entityinfos : *mut RTM_ENTITY_INFO) -> u32); - unsafe { RtmGetRegisteredEntities(rtmreghandle, core::mem::transmute(numentities), core::mem::transmute(entityhandles), core::mem::transmute(entityinfos)) } + unsafe { RtmGetRegisteredEntities(rtmreghandle, numentities as _, entityhandles as _, entityinfos as _) } } #[inline] pub unsafe fn RtmGetRouteInfo(rtmreghandle: isize, routehandle: isize, routeinfo: *mut RTM_ROUTE_INFO, destaddress: *mut RTM_NET_ADDRESS) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmGetRouteInfo(rtmreghandle : isize, routehandle : isize, routeinfo : *mut RTM_ROUTE_INFO, destaddress : *mut RTM_NET_ADDRESS) -> u32); - unsafe { RtmGetRouteInfo(rtmreghandle, routehandle, core::mem::transmute(routeinfo), core::mem::transmute(destaddress)) } + unsafe { RtmGetRouteInfo(rtmreghandle, routehandle, routeinfo as _, destaddress as _) } } #[inline] pub unsafe fn RtmGetRoutePointer(rtmreghandle: isize, routehandle: isize, routepointer: *mut *mut RTM_ROUTE_INFO) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmGetRoutePointer(rtmreghandle : isize, routehandle : isize, routepointer : *mut *mut RTM_ROUTE_INFO) -> u32); - unsafe { RtmGetRoutePointer(rtmreghandle, routehandle, core::mem::transmute(routepointer)) } + unsafe { RtmGetRoutePointer(rtmreghandle, routehandle, routepointer as _) } } #[inline] pub unsafe fn RtmHoldDestination(rtmreghandle: isize, desthandle: isize, targetviews: u32, holdtime: u32) -> u32 { @@ -1579,27 +1579,27 @@ pub unsafe fn RtmHoldDestination(rtmreghandle: isize, desthandle: isize, targetv #[inline] pub unsafe fn RtmIgnoreChangedDests(rtmreghandle: isize, notifyhandle: isize, numdests: u32, changeddests: *mut isize) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmIgnoreChangedDests(rtmreghandle : isize, notifyhandle : isize, numdests : u32, changeddests : *mut isize) -> u32); - unsafe { RtmIgnoreChangedDests(rtmreghandle, notifyhandle, numdests, core::mem::transmute(changeddests)) } + unsafe { RtmIgnoreChangedDests(rtmreghandle, notifyhandle, numdests, changeddests as _) } } #[inline] pub unsafe fn RtmInsertInRouteList(rtmreghandle: isize, routelisthandle: isize, numroutes: u32, routehandles: *mut isize) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmInsertInRouteList(rtmreghandle : isize, routelisthandle : isize, numroutes : u32, routehandles : *mut isize) -> u32); - unsafe { RtmInsertInRouteList(rtmreghandle, routelisthandle, numroutes, core::mem::transmute(routehandles)) } + unsafe { RtmInsertInRouteList(rtmreghandle, routelisthandle, numroutes, routehandles as _) } } #[inline] pub unsafe fn RtmInvokeMethod(rtmreghandle: isize, entityhandle: isize, input: *mut RTM_ENTITY_METHOD_INPUT, outputsize: *mut u32, output: *mut RTM_ENTITY_METHOD_OUTPUT) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmInvokeMethod(rtmreghandle : isize, entityhandle : isize, input : *mut RTM_ENTITY_METHOD_INPUT, outputsize : *mut u32, output : *mut RTM_ENTITY_METHOD_OUTPUT) -> u32); - unsafe { RtmInvokeMethod(rtmreghandle, entityhandle, core::mem::transmute(input), core::mem::transmute(outputsize), core::mem::transmute(output)) } + unsafe { RtmInvokeMethod(rtmreghandle, entityhandle, input as _, outputsize as _, output as _) } } #[inline] pub unsafe fn RtmIsBestRoute(rtmreghandle: isize, routehandle: isize, bestinviews: *mut u32) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmIsBestRoute(rtmreghandle : isize, routehandle : isize, bestinviews : *mut u32) -> u32); - unsafe { RtmIsBestRoute(rtmreghandle, routehandle, core::mem::transmute(bestinviews)) } + unsafe { RtmIsBestRoute(rtmreghandle, routehandle, bestinviews as _) } } #[inline] pub unsafe fn RtmIsMarkedForChangeNotification(rtmreghandle: isize, notifyhandle: isize, desthandle: isize, destmarked: *mut super::super::Foundation::BOOL) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmIsMarkedForChangeNotification(rtmreghandle : isize, notifyhandle : isize, desthandle : isize, destmarked : *mut super::super::Foundation:: BOOL) -> u32); - unsafe { RtmIsMarkedForChangeNotification(rtmreghandle, notifyhandle, desthandle, core::mem::transmute(destmarked)) } + unsafe { RtmIsMarkedForChangeNotification(rtmreghandle, notifyhandle, desthandle, destmarked as _) } } #[inline] pub unsafe fn RtmLockDestination(rtmreghandle: isize, desthandle: isize, exclusive: bool, lockdest: bool) -> u32 { @@ -1609,12 +1609,12 @@ pub unsafe fn RtmLockDestination(rtmreghandle: isize, desthandle: isize, exclusi #[inline] pub unsafe fn RtmLockNextHop(rtmreghandle: isize, nexthophandle: isize, exclusive: bool, locknexthop: bool, nexthoppointer: *mut *mut RTM_NEXTHOP_INFO) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmLockNextHop(rtmreghandle : isize, nexthophandle : isize, exclusive : super::super::Foundation:: BOOL, locknexthop : super::super::Foundation:: BOOL, nexthoppointer : *mut *mut RTM_NEXTHOP_INFO) -> u32); - unsafe { RtmLockNextHop(rtmreghandle, nexthophandle, exclusive.into(), locknexthop.into(), core::mem::transmute(nexthoppointer)) } + unsafe { RtmLockNextHop(rtmreghandle, nexthophandle, exclusive.into(), locknexthop.into(), nexthoppointer as _) } } #[inline] pub unsafe fn RtmLockRoute(rtmreghandle: isize, routehandle: isize, exclusive: bool, lockroute: bool, routepointer: *mut *mut RTM_ROUTE_INFO) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmLockRoute(rtmreghandle : isize, routehandle : isize, exclusive : super::super::Foundation:: BOOL, lockroute : super::super::Foundation:: BOOL, routepointer : *mut *mut RTM_ROUTE_INFO) -> u32); - unsafe { RtmLockRoute(rtmreghandle, routehandle, exclusive.into(), lockroute.into(), core::mem::transmute(routepointer)) } + unsafe { RtmLockRoute(rtmreghandle, routehandle, exclusive.into(), lockroute.into(), routepointer as _) } } #[inline] pub unsafe fn RtmMarkDestForChangeNotification(rtmreghandle: isize, notifyhandle: isize, desthandle: isize, markdest: bool) -> u32 { @@ -1624,67 +1624,67 @@ pub unsafe fn RtmMarkDestForChangeNotification(rtmreghandle: isize, notifyhandle #[inline] pub unsafe fn RtmReferenceHandles(rtmreghandle: isize, numhandles: u32, rtmhandles: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmReferenceHandles(rtmreghandle : isize, numhandles : u32, rtmhandles : *mut super::super::Foundation:: HANDLE) -> u32); - unsafe { RtmReferenceHandles(rtmreghandle, numhandles, core::mem::transmute(rtmhandles)) } + unsafe { RtmReferenceHandles(rtmreghandle, numhandles, rtmhandles as _) } } #[inline] pub unsafe fn RtmRegisterEntity(rtmentityinfo: *mut RTM_ENTITY_INFO, exportmethods: *mut RTM_ENTITY_EXPORT_METHODS, eventcallback: RTM_EVENT_CALLBACK, reserveopaquepointer: bool, rtmregprofile: *mut RTM_REGN_PROFILE, rtmreghandle: *mut isize) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmRegisterEntity(rtmentityinfo : *mut RTM_ENTITY_INFO, exportmethods : *mut RTM_ENTITY_EXPORT_METHODS, eventcallback : RTM_EVENT_CALLBACK, reserveopaquepointer : super::super::Foundation:: BOOL, rtmregprofile : *mut RTM_REGN_PROFILE, rtmreghandle : *mut isize) -> u32); - unsafe { RtmRegisterEntity(core::mem::transmute(rtmentityinfo), core::mem::transmute(exportmethods), eventcallback, reserveopaquepointer.into(), core::mem::transmute(rtmregprofile), core::mem::transmute(rtmreghandle)) } + unsafe { RtmRegisterEntity(rtmentityinfo as _, exportmethods as _, eventcallback, reserveopaquepointer.into(), rtmregprofile as _, rtmreghandle as _) } } #[inline] pub unsafe fn RtmRegisterForChangeNotification(rtmreghandle: isize, targetviews: u32, notifyflags: u32, notifycontext: *mut core::ffi::c_void, notifyhandle: *mut isize) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmRegisterForChangeNotification(rtmreghandle : isize, targetviews : u32, notifyflags : u32, notifycontext : *mut core::ffi::c_void, notifyhandle : *mut isize) -> u32); - unsafe { RtmRegisterForChangeNotification(rtmreghandle, targetviews, notifyflags, core::mem::transmute(notifycontext), core::mem::transmute(notifyhandle)) } + unsafe { RtmRegisterForChangeNotification(rtmreghandle, targetviews, notifyflags, notifycontext as _, notifyhandle as _) } } #[inline] pub unsafe fn RtmReleaseChangedDests(rtmreghandle: isize, notifyhandle: isize, numdests: u32, changeddests: *mut RTM_DEST_INFO) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmReleaseChangedDests(rtmreghandle : isize, notifyhandle : isize, numdests : u32, changeddests : *mut RTM_DEST_INFO) -> u32); - unsafe { RtmReleaseChangedDests(rtmreghandle, notifyhandle, numdests, core::mem::transmute(changeddests)) } + unsafe { RtmReleaseChangedDests(rtmreghandle, notifyhandle, numdests, changeddests as _) } } #[inline] pub unsafe fn RtmReleaseDestInfo(rtmreghandle: isize, destinfo: *mut RTM_DEST_INFO) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmReleaseDestInfo(rtmreghandle : isize, destinfo : *mut RTM_DEST_INFO) -> u32); - unsafe { RtmReleaseDestInfo(rtmreghandle, core::mem::transmute(destinfo)) } + unsafe { RtmReleaseDestInfo(rtmreghandle, destinfo as _) } } #[inline] pub unsafe fn RtmReleaseDests(rtmreghandle: isize, numdests: u32, destinfos: *mut RTM_DEST_INFO) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmReleaseDests(rtmreghandle : isize, numdests : u32, destinfos : *mut RTM_DEST_INFO) -> u32); - unsafe { RtmReleaseDests(rtmreghandle, numdests, core::mem::transmute(destinfos)) } + unsafe { RtmReleaseDests(rtmreghandle, numdests, destinfos as _) } } #[inline] pub unsafe fn RtmReleaseEntities(rtmreghandle: isize, numentities: u32, entityhandles: *mut isize) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmReleaseEntities(rtmreghandle : isize, numentities : u32, entityhandles : *mut isize) -> u32); - unsafe { RtmReleaseEntities(rtmreghandle, numentities, core::mem::transmute(entityhandles)) } + unsafe { RtmReleaseEntities(rtmreghandle, numentities, entityhandles as _) } } #[inline] pub unsafe fn RtmReleaseEntityInfo(rtmreghandle: isize, entityinfo: *mut RTM_ENTITY_INFO) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmReleaseEntityInfo(rtmreghandle : isize, entityinfo : *mut RTM_ENTITY_INFO) -> u32); - unsafe { RtmReleaseEntityInfo(rtmreghandle, core::mem::transmute(entityinfo)) } + unsafe { RtmReleaseEntityInfo(rtmreghandle, entityinfo as _) } } #[inline] pub unsafe fn RtmReleaseNextHopInfo(rtmreghandle: isize, nexthopinfo: *mut RTM_NEXTHOP_INFO) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmReleaseNextHopInfo(rtmreghandle : isize, nexthopinfo : *mut RTM_NEXTHOP_INFO) -> u32); - unsafe { RtmReleaseNextHopInfo(rtmreghandle, core::mem::transmute(nexthopinfo)) } + unsafe { RtmReleaseNextHopInfo(rtmreghandle, nexthopinfo as _) } } #[inline] pub unsafe fn RtmReleaseNextHops(rtmreghandle: isize, numnexthops: u32, nexthophandles: *mut isize) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmReleaseNextHops(rtmreghandle : isize, numnexthops : u32, nexthophandles : *mut isize) -> u32); - unsafe { RtmReleaseNextHops(rtmreghandle, numnexthops, core::mem::transmute(nexthophandles)) } + unsafe { RtmReleaseNextHops(rtmreghandle, numnexthops, nexthophandles as _) } } #[inline] pub unsafe fn RtmReleaseRouteInfo(rtmreghandle: isize, routeinfo: *mut RTM_ROUTE_INFO) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmReleaseRouteInfo(rtmreghandle : isize, routeinfo : *mut RTM_ROUTE_INFO) -> u32); - unsafe { RtmReleaseRouteInfo(rtmreghandle, core::mem::transmute(routeinfo)) } + unsafe { RtmReleaseRouteInfo(rtmreghandle, routeinfo as _) } } #[inline] pub unsafe fn RtmReleaseRoutes(rtmreghandle: isize, numroutes: u32, routehandles: *mut isize) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmReleaseRoutes(rtmreghandle : isize, numroutes : u32, routehandles : *mut isize) -> u32); - unsafe { RtmReleaseRoutes(rtmreghandle, numroutes, core::mem::transmute(routehandles)) } + unsafe { RtmReleaseRoutes(rtmreghandle, numroutes, routehandles as _) } } #[inline] pub unsafe fn RtmUpdateAndUnlockRoute(rtmreghandle: isize, routehandle: isize, timetolive: u32, routelisthandle: isize, notifytype: u32, notifyhandle: isize, changeflags: *mut u32) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmUpdateAndUnlockRoute(rtmreghandle : isize, routehandle : isize, timetolive : u32, routelisthandle : isize, notifytype : u32, notifyhandle : isize, changeflags : *mut u32) -> u32); - unsafe { RtmUpdateAndUnlockRoute(rtmreghandle, routehandle, timetolive, routelisthandle, notifytype, notifyhandle, core::mem::transmute(changeflags)) } + unsafe { RtmUpdateAndUnlockRoute(rtmreghandle, routehandle, timetolive, routelisthandle, notifytype, notifyhandle, changeflags as _) } } pub const ALLOW_NO_AUTH: u32 = 1u32; pub const ALL_SOURCES: MGM_ENUM_TYPES = MGM_ENUM_TYPES(1i32); 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 6e671a7806..649f6a8303 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Snmp/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Snmp/mod.rs @@ -21,7 +21,7 @@ pub unsafe fn SnmpClose(session: isize) -> u32 { #[inline] pub unsafe fn SnmpContextToStr(context: isize, string: *mut smiOCTETS) -> u32 { windows_targets::link!("wsnmp32.dll" "system" fn SnmpContextToStr(context : isize, string : *mut smiOCTETS) -> u32); - unsafe { SnmpContextToStr(context, core::mem::transmute(string)) } + unsafe { SnmpContextToStr(context, string as _) } } #[inline] pub unsafe fn SnmpCountVbl(vbl: isize) -> u32 { @@ -36,17 +36,17 @@ pub unsafe fn SnmpCreatePdu(session: isize, pdu_type: SNMP_PDU_TYPE, request_id: #[inline] 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); - unsafe { SnmpCreateSession(hwnd, wmsg, fcallback, core::mem::transmute(lpclientdata)) } + unsafe { SnmpCreateSession(hwnd, wmsg, fcallback, lpclientdata as _) } } #[inline] pub unsafe fn SnmpCreateVbl(session: isize, name: *mut smiOID, value: *mut smiVALUE) -> isize { windows_targets::link!("wsnmp32.dll" "system" fn SnmpCreateVbl(session : isize, name : *mut smiOID, value : *mut smiVALUE) -> isize); - unsafe { SnmpCreateVbl(session, core::mem::transmute(name), core::mem::transmute(value)) } + unsafe { SnmpCreateVbl(session, name as _, value as _) } } #[inline] pub unsafe fn SnmpDecodeMsg(session: isize, srcentity: *mut isize, dstentity: *mut isize, context: *mut isize, pdu: *mut isize, msgbufdesc: *mut smiOCTETS) -> u32 { windows_targets::link!("wsnmp32.dll" "system" fn SnmpDecodeMsg(session : isize, srcentity : *mut isize, dstentity : *mut isize, context : *mut isize, pdu : *mut isize, msgbufdesc : *mut smiOCTETS) -> u32); - unsafe { SnmpDecodeMsg(session, core::mem::transmute(srcentity), core::mem::transmute(dstentity), core::mem::transmute(context), core::mem::transmute(pdu), core::mem::transmute(msgbufdesc)) } + unsafe { SnmpDecodeMsg(session, srcentity as _, dstentity as _, context as _, pdu as _, msgbufdesc as _) } } #[inline] pub unsafe fn SnmpDeleteVb(vbl: isize, index: u32) -> u32 { @@ -66,7 +66,7 @@ pub unsafe fn SnmpDuplicateVbl(session: isize, vbl: isize) -> isize { #[inline] pub unsafe fn SnmpEncodeMsg(session: isize, srcentity: isize, dstentity: isize, context: isize, pdu: isize, msgbufdesc: *mut smiOCTETS) -> u32 { windows_targets::link!("wsnmp32.dll" "system" fn SnmpEncodeMsg(session : isize, srcentity : isize, dstentity : isize, context : isize, pdu : isize, msgbufdesc : *mut smiOCTETS) -> u32); - unsafe { SnmpEncodeMsg(session, srcentity, dstentity, context, pdu, core::mem::transmute(msgbufdesc)) } + unsafe { SnmpEncodeMsg(session, srcentity, dstentity, context, pdu, msgbufdesc as _) } } #[inline] pub unsafe fn SnmpEntityToStr(entity: isize, string: &mut [u8]) -> u32 { @@ -81,7 +81,7 @@ pub unsafe fn SnmpFreeContext(context: isize) -> u32 { #[inline] pub unsafe fn SnmpFreeDescriptor(syntax: u32, descriptor: *mut smiOCTETS) -> u32 { windows_targets::link!("wsnmp32.dll" "system" fn SnmpFreeDescriptor(syntax : u32, descriptor : *mut smiOCTETS) -> u32); - unsafe { SnmpFreeDescriptor(syntax, core::mem::transmute(descriptor)) } + unsafe { SnmpFreeDescriptor(syntax, descriptor as _) } } #[inline] pub unsafe fn SnmpFreeEntity(entity: isize) -> u32 { @@ -106,37 +106,37 @@ pub unsafe fn SnmpGetLastError(session: isize) -> u32 { #[inline] pub unsafe fn SnmpGetPduData(pdu: isize, pdu_type: *mut SNMP_PDU_TYPE, request_id: *mut i32, error_status: *mut SNMP_ERROR, error_index: *mut i32, varbindlist: *mut isize) -> u32 { windows_targets::link!("wsnmp32.dll" "system" fn SnmpGetPduData(pdu : isize, pdu_type : *mut SNMP_PDU_TYPE, request_id : *mut i32, error_status : *mut SNMP_ERROR, error_index : *mut i32, varbindlist : *mut isize) -> u32); - unsafe { SnmpGetPduData(pdu, core::mem::transmute(pdu_type), core::mem::transmute(request_id), core::mem::transmute(error_status), core::mem::transmute(error_index), core::mem::transmute(varbindlist)) } + unsafe { SnmpGetPduData(pdu, pdu_type as _, request_id as _, error_status as _, error_index as _, varbindlist as _) } } #[inline] pub unsafe fn SnmpGetRetransmitMode(nretransmitmode: *mut SNMP_STATUS) -> u32 { windows_targets::link!("wsnmp32.dll" "system" fn SnmpGetRetransmitMode(nretransmitmode : *mut SNMP_STATUS) -> u32); - unsafe { SnmpGetRetransmitMode(core::mem::transmute(nretransmitmode)) } + unsafe { SnmpGetRetransmitMode(nretransmitmode as _) } } #[inline] pub unsafe fn SnmpGetRetry(hentity: isize, npolicyretry: *mut u32, nactualretry: *mut u32) -> u32 { windows_targets::link!("wsnmp32.dll" "system" fn SnmpGetRetry(hentity : isize, npolicyretry : *mut u32, nactualretry : *mut u32) -> u32); - unsafe { SnmpGetRetry(hentity, core::mem::transmute(npolicyretry), core::mem::transmute(nactualretry)) } + unsafe { SnmpGetRetry(hentity, npolicyretry as _, nactualretry as _) } } #[inline] pub unsafe fn SnmpGetTimeout(hentity: isize, npolicytimeout: *mut u32, nactualtimeout: *mut u32) -> u32 { windows_targets::link!("wsnmp32.dll" "system" fn SnmpGetTimeout(hentity : isize, npolicytimeout : *mut u32, nactualtimeout : *mut u32) -> u32); - unsafe { SnmpGetTimeout(hentity, core::mem::transmute(npolicytimeout), core::mem::transmute(nactualtimeout)) } + unsafe { SnmpGetTimeout(hentity, npolicytimeout as _, nactualtimeout as _) } } #[inline] pub unsafe fn SnmpGetTranslateMode(ntranslatemode: *mut SNMP_API_TRANSLATE_MODE) -> u32 { windows_targets::link!("wsnmp32.dll" "system" fn SnmpGetTranslateMode(ntranslatemode : *mut SNMP_API_TRANSLATE_MODE) -> u32); - unsafe { SnmpGetTranslateMode(core::mem::transmute(ntranslatemode)) } + unsafe { SnmpGetTranslateMode(ntranslatemode as _) } } #[inline] pub unsafe fn SnmpGetVb(vbl: isize, index: u32, name: *mut smiOID, value: *mut smiVALUE) -> u32 { windows_targets::link!("wsnmp32.dll" "system" fn SnmpGetVb(vbl : isize, index : u32, name : *mut smiOID, value : *mut smiVALUE) -> u32); - unsafe { SnmpGetVb(vbl, index, core::mem::transmute(name), core::mem::transmute(value)) } + unsafe { SnmpGetVb(vbl, index, name as _, value as _) } } #[inline] pub unsafe fn SnmpGetVendorInfo(vendorinfo: *mut smiVENDORINFO) -> u32 { windows_targets::link!("wsnmp32.dll" "system" fn SnmpGetVendorInfo(vendorinfo : *mut smiVENDORINFO) -> u32); - unsafe { SnmpGetVendorInfo(core::mem::transmute(vendorinfo)) } + unsafe { SnmpGetVendorInfo(vendorinfo as _) } } #[inline] pub unsafe fn SnmpListen(hentity: isize, lstatus: SNMP_STATUS) -> u32 { @@ -151,27 +151,27 @@ pub unsafe fn SnmpListenEx(hentity: isize, lstatus: u32, nuseentityaddr: u32) -> #[inline] pub unsafe fn SnmpMgrClose(session: *mut core::ffi::c_void) -> super::super::Foundation::BOOL { windows_targets::link!("mgmtapi.dll" "system" fn SnmpMgrClose(session : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { SnmpMgrClose(core::mem::transmute(session)) } + unsafe { SnmpMgrClose(session as _) } } #[inline] pub unsafe fn SnmpMgrCtl(session: *mut core::ffi::c_void, dwctlcode: u32, lpvinbuffer: *mut core::ffi::c_void, cbinbuffer: u32, lpvoutbuffer: *mut core::ffi::c_void, cboutbuffer: u32, lpcbbytesreturned: *mut u32) -> windows_core::Result<()> { windows_targets::link!("mgmtapi.dll" "system" fn SnmpMgrCtl(session : *mut core::ffi::c_void, dwctlcode : u32, lpvinbuffer : *mut core::ffi::c_void, cbinbuffer : u32, lpvoutbuffer : *mut core::ffi::c_void, cboutbuffer : u32, lpcbbytesreturned : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { SnmpMgrCtl(core::mem::transmute(session), dwctlcode, core::mem::transmute(lpvinbuffer), cbinbuffer, core::mem::transmute(lpvoutbuffer), cboutbuffer, core::mem::transmute(lpcbbytesreturned)).ok() } + unsafe { SnmpMgrCtl(session as _, dwctlcode, lpvinbuffer as _, cbinbuffer, lpvoutbuffer as _, cboutbuffer, lpcbbytesreturned as _).ok() } } #[inline] pub unsafe fn SnmpMgrGetTrap(enterprise: *mut AsnObjectIdentifier, ipaddress: *mut AsnOctetString, generictrap: *mut SNMP_GENERICTRAP, specifictrap: *mut i32, timestamp: *mut u32, variablebindings: *mut SnmpVarBindList) -> super::super::Foundation::BOOL { windows_targets::link!("mgmtapi.dll" "system" fn SnmpMgrGetTrap(enterprise : *mut AsnObjectIdentifier, ipaddress : *mut AsnOctetString, generictrap : *mut SNMP_GENERICTRAP, specifictrap : *mut i32, timestamp : *mut u32, variablebindings : *mut SnmpVarBindList) -> super::super::Foundation:: BOOL); - unsafe { SnmpMgrGetTrap(core::mem::transmute(enterprise), core::mem::transmute(ipaddress), core::mem::transmute(generictrap), core::mem::transmute(specifictrap), core::mem::transmute(timestamp), core::mem::transmute(variablebindings)) } + unsafe { SnmpMgrGetTrap(enterprise as _, ipaddress as _, generictrap as _, specifictrap as _, timestamp as _, variablebindings as _) } } #[inline] pub unsafe fn SnmpMgrGetTrapEx(enterprise: *mut AsnObjectIdentifier, agentaddress: *mut AsnOctetString, sourceaddress: *mut AsnOctetString, generictrap: *mut SNMP_GENERICTRAP, specifictrap: *mut i32, community: *mut AsnOctetString, timestamp: *mut u32, variablebindings: *mut SnmpVarBindList) -> super::super::Foundation::BOOL { windows_targets::link!("mgmtapi.dll" "system" fn SnmpMgrGetTrapEx(enterprise : *mut AsnObjectIdentifier, agentaddress : *mut AsnOctetString, sourceaddress : *mut AsnOctetString, generictrap : *mut SNMP_GENERICTRAP, specifictrap : *mut i32, community : *mut AsnOctetString, timestamp : *mut u32, variablebindings : *mut SnmpVarBindList) -> super::super::Foundation:: BOOL); - unsafe { SnmpMgrGetTrapEx(core::mem::transmute(enterprise), core::mem::transmute(agentaddress), core::mem::transmute(sourceaddress), core::mem::transmute(generictrap), core::mem::transmute(specifictrap), core::mem::transmute(community), core::mem::transmute(timestamp), core::mem::transmute(variablebindings)) } + unsafe { SnmpMgrGetTrapEx(enterprise as _, agentaddress as _, sourceaddress as _, generictrap as _, specifictrap as _, community as _, timestamp as _, variablebindings as _) } } #[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); - unsafe { SnmpMgrOidToStr(core::mem::transmute(oid), core::mem::transmute(string.unwrap_or(core::mem::zeroed()))) } + unsafe { SnmpMgrOidToStr(oid as _, string.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SnmpMgrOpen(lpagentaddress: P0, lpagentcommunity: P1, ntimeout: i32, nretries: i32) -> *mut core::ffi::c_void @@ -185,7 +185,7 @@ where #[inline] pub unsafe fn SnmpMgrRequest(session: *mut core::ffi::c_void, requesttype: u8, variablebindings: *mut SnmpVarBindList, errorstatus: *mut SNMP_ERROR_STATUS, errorindex: *mut i32) -> i32 { windows_targets::link!("mgmtapi.dll" "system" fn SnmpMgrRequest(session : *mut core::ffi::c_void, requesttype : u8, variablebindings : *mut SnmpVarBindList, errorstatus : *mut SNMP_ERROR_STATUS, errorindex : *mut i32) -> i32); - unsafe { SnmpMgrRequest(core::mem::transmute(session), requesttype, core::mem::transmute(variablebindings), core::mem::transmute(errorstatus), core::mem::transmute(errorindex)) } + unsafe { SnmpMgrRequest(session as _, requesttype, variablebindings as _, errorstatus as _, errorindex as _) } } #[inline] pub unsafe fn SnmpMgrStrToOid(string: P0, oid: *mut AsnObjectIdentifier) -> super::super::Foundation::BOOL @@ -193,22 +193,22 @@ where P0: windows_core::Param, { windows_targets::link!("mgmtapi.dll" "system" fn SnmpMgrStrToOid(string : windows_core::PCSTR, oid : *mut AsnObjectIdentifier) -> super::super::Foundation:: BOOL); - unsafe { SnmpMgrStrToOid(string.param().abi(), core::mem::transmute(oid)) } + unsafe { SnmpMgrStrToOid(string.param().abi(), oid as _) } } #[inline] pub unsafe fn SnmpMgrTrapListen(phtrapavailable: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("mgmtapi.dll" "system" fn SnmpMgrTrapListen(phtrapavailable : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - unsafe { SnmpMgrTrapListen(core::mem::transmute(phtrapavailable)).ok() } + unsafe { SnmpMgrTrapListen(phtrapavailable as _).ok() } } #[inline] pub unsafe fn SnmpOidCompare(xoid: *mut smiOID, yoid: *mut smiOID, maxlen: u32, result: *mut i32) -> u32 { windows_targets::link!("wsnmp32.dll" "system" fn SnmpOidCompare(xoid : *mut smiOID, yoid : *mut smiOID, maxlen : u32, result : *mut i32) -> u32); - unsafe { SnmpOidCompare(core::mem::transmute(xoid), core::mem::transmute(yoid), maxlen, core::mem::transmute(result)) } + unsafe { SnmpOidCompare(xoid as _, yoid as _, maxlen, result as _) } } #[inline] pub unsafe fn SnmpOidCopy(srcoid: *mut smiOID, dstoid: *mut smiOID) -> u32 { windows_targets::link!("wsnmp32.dll" "system" fn SnmpOidCopy(srcoid : *mut smiOID, dstoid : *mut smiOID) -> u32); - unsafe { SnmpOidCopy(core::mem::transmute(srcoid), core::mem::transmute(dstoid)) } + unsafe { SnmpOidCopy(srcoid as _, dstoid as _) } } #[inline] pub unsafe fn SnmpOidToStr(srcoid: *const smiOID, string: &mut [u8]) -> u32 { @@ -223,12 +223,12 @@ pub unsafe fn SnmpOpen(hwnd: super::super::Foundation::HWND, wmsg: u32) -> isize #[inline] pub unsafe fn SnmpRecvMsg(session: isize, srcentity: *mut isize, dstentity: *mut isize, context: *mut isize, pdu: *mut isize) -> u32 { windows_targets::link!("wsnmp32.dll" "system" fn SnmpRecvMsg(session : isize, srcentity : *mut isize, dstentity : *mut isize, context : *mut isize, pdu : *mut isize) -> u32); - unsafe { SnmpRecvMsg(session, core::mem::transmute(srcentity), core::mem::transmute(dstentity), core::mem::transmute(context), core::mem::transmute(pdu)) } + unsafe { SnmpRecvMsg(session, srcentity as _, dstentity as _, context as _, pdu as _) } } #[inline] pub unsafe fn SnmpRegister(session: isize, srcentity: isize, dstentity: isize, context: isize, notification: *mut smiOID, state: SNMP_STATUS) -> u32 { windows_targets::link!("wsnmp32.dll" "system" fn SnmpRegister(session : isize, srcentity : isize, dstentity : isize, context : isize, notification : *mut smiOID, state : SNMP_STATUS) -> u32); - unsafe { SnmpRegister(session, srcentity, dstentity, context, core::mem::transmute(notification), state) } + unsafe { SnmpRegister(session, srcentity, dstentity, context, notification as _, state) } } #[inline] pub unsafe fn SnmpSendMsg(session: isize, srcentity: isize, dstentity: isize, context: isize, pdu: isize) -> u32 { @@ -268,22 +268,22 @@ pub unsafe fn SnmpSetTranslateMode(ntranslatemode: SNMP_API_TRANSLATE_MODE) -> u #[inline] pub unsafe fn SnmpSetVb(vbl: isize, index: u32, name: *mut smiOID, value: *mut smiVALUE) -> u32 { windows_targets::link!("wsnmp32.dll" "system" fn SnmpSetVb(vbl : isize, index : u32, name : *mut smiOID, value : *mut smiVALUE) -> u32); - unsafe { SnmpSetVb(vbl, index, core::mem::transmute(name), core::mem::transmute(value)) } + unsafe { SnmpSetVb(vbl, index, name as _, value as _) } } #[inline] pub unsafe fn SnmpStartup(nmajorversion: *mut u32, nminorversion: *mut u32, nlevel: *mut u32, ntranslatemode: *mut SNMP_API_TRANSLATE_MODE, nretransmitmode: *mut SNMP_STATUS) -> u32 { windows_targets::link!("wsnmp32.dll" "system" fn SnmpStartup(nmajorversion : *mut u32, nminorversion : *mut u32, nlevel : *mut u32, ntranslatemode : *mut SNMP_API_TRANSLATE_MODE, nretransmitmode : *mut SNMP_STATUS) -> u32); - unsafe { SnmpStartup(core::mem::transmute(nmajorversion), core::mem::transmute(nminorversion), core::mem::transmute(nlevel), core::mem::transmute(ntranslatemode), core::mem::transmute(nretransmitmode)) } + unsafe { SnmpStartup(nmajorversion as _, nminorversion as _, nlevel as _, ntranslatemode as _, nretransmitmode as _) } } #[inline] pub unsafe fn SnmpStartupEx(nmajorversion: *mut u32, nminorversion: *mut u32, nlevel: *mut u32, ntranslatemode: *mut SNMP_API_TRANSLATE_MODE, nretransmitmode: *mut SNMP_STATUS) -> u32 { windows_targets::link!("wsnmp32.dll" "system" fn SnmpStartupEx(nmajorversion : *mut u32, nminorversion : *mut u32, nlevel : *mut u32, ntranslatemode : *mut SNMP_API_TRANSLATE_MODE, nretransmitmode : *mut SNMP_STATUS) -> u32); - unsafe { SnmpStartupEx(core::mem::transmute(nmajorversion), core::mem::transmute(nminorversion), core::mem::transmute(nlevel), core::mem::transmute(ntranslatemode), core::mem::transmute(nretransmitmode)) } + unsafe { SnmpStartupEx(nmajorversion as _, nminorversion as _, nlevel as _, ntranslatemode as _, nretransmitmode as _) } } #[inline] pub unsafe fn SnmpStrToContext(session: isize, string: *mut smiOCTETS) -> isize { windows_targets::link!("wsnmp32.dll" "system" fn SnmpStrToContext(session : isize, string : *mut smiOCTETS) -> isize); - unsafe { SnmpStrToContext(session, core::mem::transmute(string)) } + unsafe { SnmpStrToContext(session, string as _) } } #[inline] pub unsafe fn SnmpStrToEntity(session: isize, string: P1) -> isize @@ -299,7 +299,7 @@ where P0: windows_core::Param, { windows_targets::link!("wsnmp32.dll" "system" fn SnmpStrToOid(string : windows_core::PCSTR, dstoid : *mut smiOID) -> u32); - unsafe { SnmpStrToOid(string.param().abi(), core::mem::transmute(dstoid)) } + unsafe { SnmpStrToOid(string.param().abi(), dstoid as _) } } #[inline] pub unsafe fn SnmpSvcGetUptime() -> u32 { @@ -319,12 +319,12 @@ pub unsafe fn SnmpSvcSetLogType(nlogtype: SNMP_OUTPUT_LOG_TYPE) { #[inline] pub unsafe fn SnmpUtilAsnAnyCpy(panydst: *mut AsnAny, panysrc: *mut AsnAny) -> i32 { windows_targets::link!("snmpapi.dll" "system" fn SnmpUtilAsnAnyCpy(panydst : *mut AsnAny, panysrc : *mut AsnAny) -> i32); - unsafe { SnmpUtilAsnAnyCpy(core::mem::transmute(panydst), core::mem::transmute(panysrc)) } + unsafe { SnmpUtilAsnAnyCpy(panydst as _, panysrc as _) } } #[inline] pub unsafe fn SnmpUtilAsnAnyFree(pany: *mut AsnAny) { windows_targets::link!("snmpapi.dll" "system" fn SnmpUtilAsnAnyFree(pany : *mut AsnAny)); - unsafe { SnmpUtilAsnAnyFree(core::mem::transmute(pany)) } + unsafe { SnmpUtilAsnAnyFree(pany as _) } } #[inline] pub unsafe fn SnmpUtilDbgPrint(nloglevel: SNMP_LOG, szformat: P1) @@ -337,7 +337,7 @@ where #[inline] pub unsafe fn SnmpUtilIdsToA(ids: *mut u32, idlength: u32) -> windows_core::PSTR { windows_targets::link!("snmpapi.dll" "system" fn SnmpUtilIdsToA(ids : *mut u32, idlength : u32) -> windows_core::PSTR); - unsafe { SnmpUtilIdsToA(core::mem::transmute(ids), idlength) } + unsafe { SnmpUtilIdsToA(ids as _, idlength) } } #[inline] pub unsafe fn SnmpUtilMemAlloc(nbytes: u32) -> *mut core::ffi::c_void { @@ -347,92 +347,92 @@ pub unsafe fn SnmpUtilMemAlloc(nbytes: u32) -> *mut core::ffi::c_void { #[inline] pub unsafe fn SnmpUtilMemFree(pmem: *mut core::ffi::c_void) { windows_targets::link!("snmpapi.dll" "system" fn SnmpUtilMemFree(pmem : *mut core::ffi::c_void)); - unsafe { SnmpUtilMemFree(core::mem::transmute(pmem)) } + unsafe { SnmpUtilMemFree(pmem as _) } } #[inline] pub unsafe fn SnmpUtilMemReAlloc(pmem: *mut core::ffi::c_void, nbytes: u32) -> *mut core::ffi::c_void { windows_targets::link!("snmpapi.dll" "system" fn SnmpUtilMemReAlloc(pmem : *mut core::ffi::c_void, nbytes : u32) -> *mut core::ffi::c_void); - unsafe { SnmpUtilMemReAlloc(core::mem::transmute(pmem), nbytes) } + unsafe { SnmpUtilMemReAlloc(pmem as _, nbytes) } } #[inline] pub unsafe fn SnmpUtilOctetsCmp(poctets1: *mut AsnOctetString, poctets2: *mut AsnOctetString) -> i32 { windows_targets::link!("snmpapi.dll" "system" fn SnmpUtilOctetsCmp(poctets1 : *mut AsnOctetString, poctets2 : *mut AsnOctetString) -> i32); - unsafe { SnmpUtilOctetsCmp(core::mem::transmute(poctets1), core::mem::transmute(poctets2)) } + unsafe { SnmpUtilOctetsCmp(poctets1 as _, poctets2 as _) } } #[inline] pub unsafe fn SnmpUtilOctetsCpy(poctetsdst: *mut AsnOctetString, poctetssrc: *mut AsnOctetString) -> i32 { windows_targets::link!("snmpapi.dll" "system" fn SnmpUtilOctetsCpy(poctetsdst : *mut AsnOctetString, poctetssrc : *mut AsnOctetString) -> i32); - unsafe { SnmpUtilOctetsCpy(core::mem::transmute(poctetsdst), core::mem::transmute(poctetssrc)) } + unsafe { SnmpUtilOctetsCpy(poctetsdst as _, poctetssrc as _) } } #[inline] pub unsafe fn SnmpUtilOctetsFree(poctets: *mut AsnOctetString) { windows_targets::link!("snmpapi.dll" "system" fn SnmpUtilOctetsFree(poctets : *mut AsnOctetString)); - unsafe { SnmpUtilOctetsFree(core::mem::transmute(poctets)) } + unsafe { SnmpUtilOctetsFree(poctets as _) } } #[inline] pub unsafe fn SnmpUtilOctetsNCmp(poctets1: *mut AsnOctetString, poctets2: *mut AsnOctetString, nchars: u32) -> i32 { windows_targets::link!("snmpapi.dll" "system" fn SnmpUtilOctetsNCmp(poctets1 : *mut AsnOctetString, poctets2 : *mut AsnOctetString, nchars : u32) -> i32); - unsafe { SnmpUtilOctetsNCmp(core::mem::transmute(poctets1), core::mem::transmute(poctets2), nchars) } + unsafe { SnmpUtilOctetsNCmp(poctets1 as _, poctets2 as _, nchars) } } #[inline] pub unsafe fn SnmpUtilOidAppend(poiddst: *mut AsnObjectIdentifier, poidsrc: *mut AsnObjectIdentifier) -> i32 { windows_targets::link!("snmpapi.dll" "system" fn SnmpUtilOidAppend(poiddst : *mut AsnObjectIdentifier, poidsrc : *mut AsnObjectIdentifier) -> i32); - unsafe { SnmpUtilOidAppend(core::mem::transmute(poiddst), core::mem::transmute(poidsrc)) } + unsafe { SnmpUtilOidAppend(poiddst as _, poidsrc as _) } } #[inline] pub unsafe fn SnmpUtilOidCmp(poid1: *mut AsnObjectIdentifier, poid2: *mut AsnObjectIdentifier) -> i32 { windows_targets::link!("snmpapi.dll" "system" fn SnmpUtilOidCmp(poid1 : *mut AsnObjectIdentifier, poid2 : *mut AsnObjectIdentifier) -> i32); - unsafe { SnmpUtilOidCmp(core::mem::transmute(poid1), core::mem::transmute(poid2)) } + unsafe { SnmpUtilOidCmp(poid1 as _, poid2 as _) } } #[inline] pub unsafe fn SnmpUtilOidCpy(poiddst: *mut AsnObjectIdentifier, poidsrc: *mut AsnObjectIdentifier) -> i32 { windows_targets::link!("snmpapi.dll" "system" fn SnmpUtilOidCpy(poiddst : *mut AsnObjectIdentifier, poidsrc : *mut AsnObjectIdentifier) -> i32); - unsafe { SnmpUtilOidCpy(core::mem::transmute(poiddst), core::mem::transmute(poidsrc)) } + unsafe { SnmpUtilOidCpy(poiddst as _, poidsrc as _) } } #[inline] pub unsafe fn SnmpUtilOidFree(poid: *mut AsnObjectIdentifier) { windows_targets::link!("snmpapi.dll" "system" fn SnmpUtilOidFree(poid : *mut AsnObjectIdentifier)); - unsafe { SnmpUtilOidFree(core::mem::transmute(poid)) } + unsafe { SnmpUtilOidFree(poid as _) } } #[inline] pub unsafe fn SnmpUtilOidNCmp(poid1: *mut AsnObjectIdentifier, poid2: *mut AsnObjectIdentifier, nsubids: u32) -> i32 { windows_targets::link!("snmpapi.dll" "system" fn SnmpUtilOidNCmp(poid1 : *mut AsnObjectIdentifier, poid2 : *mut AsnObjectIdentifier, nsubids : u32) -> i32); - unsafe { SnmpUtilOidNCmp(core::mem::transmute(poid1), core::mem::transmute(poid2), nsubids) } + unsafe { SnmpUtilOidNCmp(poid1 as _, poid2 as _, nsubids) } } #[inline] pub unsafe fn SnmpUtilOidToA(oid: *mut AsnObjectIdentifier) -> windows_core::PSTR { windows_targets::link!("snmpapi.dll" "system" fn SnmpUtilOidToA(oid : *mut AsnObjectIdentifier) -> windows_core::PSTR); - unsafe { SnmpUtilOidToA(core::mem::transmute(oid)) } + unsafe { SnmpUtilOidToA(oid as _) } } #[inline] pub unsafe fn SnmpUtilPrintAsnAny(pany: *mut AsnAny) { windows_targets::link!("snmpapi.dll" "system" fn SnmpUtilPrintAsnAny(pany : *mut AsnAny)); - unsafe { SnmpUtilPrintAsnAny(core::mem::transmute(pany)) } + unsafe { SnmpUtilPrintAsnAny(pany as _) } } #[inline] pub unsafe fn SnmpUtilPrintOid(oid: *mut AsnObjectIdentifier) { windows_targets::link!("snmpapi.dll" "system" fn SnmpUtilPrintOid(oid : *mut AsnObjectIdentifier)); - unsafe { SnmpUtilPrintOid(core::mem::transmute(oid)) } + unsafe { SnmpUtilPrintOid(oid as _) } } #[inline] pub unsafe fn SnmpUtilVarBindCpy(pvbdst: *mut SnmpVarBind, pvbsrc: *mut SnmpVarBind) -> i32 { windows_targets::link!("snmpapi.dll" "system" fn SnmpUtilVarBindCpy(pvbdst : *mut SnmpVarBind, pvbsrc : *mut SnmpVarBind) -> i32); - unsafe { SnmpUtilVarBindCpy(core::mem::transmute(pvbdst), core::mem::transmute(pvbsrc)) } + unsafe { SnmpUtilVarBindCpy(pvbdst as _, pvbsrc as _) } } #[inline] pub unsafe fn SnmpUtilVarBindFree(pvb: *mut SnmpVarBind) { windows_targets::link!("snmpapi.dll" "system" fn SnmpUtilVarBindFree(pvb : *mut SnmpVarBind)); - unsafe { SnmpUtilVarBindFree(core::mem::transmute(pvb)) } + unsafe { SnmpUtilVarBindFree(pvb as _) } } #[inline] pub unsafe fn SnmpUtilVarBindListCpy(pvbldst: *mut SnmpVarBindList, pvblsrc: *mut SnmpVarBindList) -> i32 { windows_targets::link!("snmpapi.dll" "system" fn SnmpUtilVarBindListCpy(pvbldst : *mut SnmpVarBindList, pvblsrc : *mut SnmpVarBindList) -> i32); - unsafe { SnmpUtilVarBindListCpy(core::mem::transmute(pvbldst), core::mem::transmute(pvblsrc)) } + unsafe { SnmpUtilVarBindListCpy(pvbldst as _, pvblsrc as _) } } #[inline] pub unsafe fn SnmpUtilVarBindListFree(pvbl: *mut SnmpVarBindList) { windows_targets::link!("snmpapi.dll" "system" fn SnmpUtilVarBindListFree(pvbl : *mut SnmpVarBindList)); - unsafe { SnmpUtilVarBindListFree(core::mem::transmute(pvbl)) } + unsafe { SnmpUtilVarBindListFree(pvbl as _) } } pub const ASN_APPLICATION: u32 = 64u32; pub const ASN_CONSTRUCTOR: u32 = 32u32; 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 10b293dd9a..89f57ce17a 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WNet/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WNet/mod.rs @@ -1,12 +1,12 @@ #[inline] pub unsafe fn MultinetGetConnectionPerformanceA(lpnetresource: *const NETRESOURCEA, lpnetconnectinfostruct: *mut NETCONNECTINFOSTRUCT) -> u32 { windows_targets::link!("mpr.dll" "system" fn MultinetGetConnectionPerformanceA(lpnetresource : *const NETRESOURCEA, lpnetconnectinfostruct : *mut NETCONNECTINFOSTRUCT) -> u32); - unsafe { MultinetGetConnectionPerformanceA(lpnetresource, core::mem::transmute(lpnetconnectinfostruct)) } + unsafe { MultinetGetConnectionPerformanceA(lpnetresource, lpnetconnectinfostruct as _) } } #[inline] pub unsafe fn MultinetGetConnectionPerformanceW(lpnetresource: *const NETRESOURCEW, lpnetconnectinfostruct: *mut NETCONNECTINFOSTRUCT) -> u32 { windows_targets::link!("mpr.dll" "system" fn MultinetGetConnectionPerformanceW(lpnetresource : *const NETRESOURCEW, lpnetconnectinfostruct : *mut NETCONNECTINFOSTRUCT) -> u32); - unsafe { MultinetGetConnectionPerformanceW(lpnetresource, core::mem::transmute(lpnetconnectinfostruct)) } + unsafe { MultinetGetConnectionPerformanceW(lpnetresource, lpnetconnectinfostruct as _) } } #[inline] pub unsafe fn NPAddConnection(lpnetresource: *const NETRESOURCEW, lppassword: P1, lpusername: P2) -> u32 @@ -24,12 +24,12 @@ where 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); - unsafe { NPAddConnection3(core::mem::transmute(hwndowner.unwrap_or(core::mem::zeroed())), lpnetresource, lppassword.param().abi(), lpusername.param().abi(), dwflags) } + unsafe { NPAddConnection3(hwndowner.unwrap_or(core::mem::zeroed()) as _, lpnetresource, lppassword.param().abi(), lpusername.param().abi(), dwflags) } } #[inline] 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); - unsafe { NPAddConnection4(core::mem::transmute(hwndowner.unwrap_or(core::mem::zeroed())), lpnetresource, core::mem::transmute(lpauthbuffer.unwrap_or(core::mem::zeroed())), cbauthbuffer, dwflags, core::mem::transmute(lpuseoptions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpuseoptions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } + unsafe { NPAddConnection4(hwndowner.unwrap_or(core::mem::zeroed()) as _, lpnetresource, lpauthbuffer.unwrap_or(core::mem::zeroed()) as _, cbauthbuffer, dwflags, core::mem::transmute(lpuseoptions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpuseoptions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } } #[inline] pub unsafe fn NPCancelConnection(lpname: P0, fforce: bool) -> u32 @@ -55,7 +55,7 @@ pub unsafe fn NPCloseEnum(henum: super::super::Foundation::HANDLE) -> u32 { #[inline] 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); - unsafe { NPEnumResource(henum, core::mem::transmute(lpccount), core::mem::transmute(lpbuffer), core::mem::transmute(lpbuffersize)) } + unsafe { NPEnumResource(henum, lpccount as _, lpbuffer as _, lpbuffersize as _) } } #[inline] pub unsafe fn NPFormatNetworkName(lpremotename: P0, lpformattedname: windows_core::PWSTR, lpnlength: *mut u32, dwflags: NETWORK_NAME_FORMAT_FLAGS, dwavecharperline: u32) -> u32 @@ -63,7 +63,7 @@ where P0: windows_core::Param, { windows_targets::link!("davclnt.dll" "system" fn NPFormatNetworkName(lpremotename : windows_core::PCWSTR, lpformattedname : windows_core::PWSTR, lpnlength : *mut u32, dwflags : NETWORK_NAME_FORMAT_FLAGS, dwavecharperline : u32) -> u32); - unsafe { NPFormatNetworkName(lpremotename.param().abi(), core::mem::transmute(lpformattedname), core::mem::transmute(lpnlength), dwflags, dwavecharperline) } + unsafe { NPFormatNetworkName(lpremotename.param().abi(), core::mem::transmute(lpformattedname), lpnlength as _, dwflags, dwavecharperline) } } #[inline] pub unsafe fn NPGetCaps(ndex: u32) -> u32 { @@ -76,7 +76,7 @@ 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); - unsafe { NPGetConnection(lplocalname.param().abi(), core::mem::transmute(lpremotename.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpnbufferlen)) } + unsafe { NPGetConnection(lplocalname.param().abi(), lpremotename.unwrap_or(core::mem::zeroed()) as _, lpnbufferlen as _) } } #[inline] pub unsafe fn NPGetConnection3(lplocalname: P0, dwlevel: u32, lpbuffer: *mut core::ffi::c_void, lpbuffersize: *mut u32) -> u32 @@ -84,7 +84,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntlanman.dll" "system" fn NPGetConnection3(lplocalname : windows_core::PCWSTR, dwlevel : u32, lpbuffer : *mut core::ffi::c_void, lpbuffersize : *mut u32) -> u32); - unsafe { NPGetConnection3(lplocalname.param().abi(), dwlevel, core::mem::transmute(lpbuffer), core::mem::transmute(lpbuffersize)) } + unsafe { NPGetConnection3(lplocalname.param().abi(), dwlevel, lpbuffer as _, lpbuffersize as _) } } #[inline] pub unsafe fn NPGetConnectionPerformance(lpremotename: P0, lpnetconnectinfo: *mut NETCONNECTINFOSTRUCT) -> u32 @@ -92,7 +92,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntlanman.dll" "system" fn NPGetConnectionPerformance(lpremotename : windows_core::PCWSTR, lpnetconnectinfo : *mut NETCONNECTINFOSTRUCT) -> u32); - unsafe { NPGetConnectionPerformance(lpremotename.param().abi(), core::mem::transmute(lpnetconnectinfo)) } + unsafe { NPGetConnectionPerformance(lpremotename.param().abi(), lpnetconnectinfo as _) } } #[inline] pub unsafe fn NPGetPersistentUseOptionsForConnection(lpremotepath: P0, lpreaduseoptions: Option<&[u8]>, lpwriteuseoptions: *mut u8, lpsizewriteuseoptions: *mut u32) -> u32 @@ -100,17 +100,17 @@ where P0: windows_core::Param, { windows_targets::link!("ntlanman.dll" "system" fn NPGetPersistentUseOptionsForConnection(lpremotepath : windows_core::PCWSTR, lpreaduseoptions : *const u8, cbreaduseoptions : u32, lpwriteuseoptions : *mut u8, lpsizewriteuseoptions : *mut u32) -> u32); - unsafe { NPGetPersistentUseOptionsForConnection(lpremotepath.param().abi(), core::mem::transmute(lpreaduseoptions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpreaduseoptions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpwriteuseoptions), core::mem::transmute(lpsizewriteuseoptions)) } + unsafe { NPGetPersistentUseOptionsForConnection(lpremotepath.param().abi(), core::mem::transmute(lpreaduseoptions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpreaduseoptions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpwriteuseoptions as _, lpsizewriteuseoptions as _) } } #[inline] pub unsafe fn NPGetResourceInformation(lpnetresource: *const NETRESOURCEW, lpbuffer: *mut core::ffi::c_void, lpbuffersize: *mut u32, lplpsystem: *mut windows_core::PWSTR) -> u32 { windows_targets::link!("davclnt.dll" "system" fn NPGetResourceInformation(lpnetresource : *const NETRESOURCEW, lpbuffer : *mut core::ffi::c_void, lpbuffersize : *mut u32, lplpsystem : *mut windows_core::PWSTR) -> u32); - unsafe { NPGetResourceInformation(lpnetresource, core::mem::transmute(lpbuffer), core::mem::transmute(lpbuffersize), core::mem::transmute(lplpsystem)) } + unsafe { NPGetResourceInformation(lpnetresource, lpbuffer as _, lpbuffersize as _, lplpsystem as _) } } #[inline] pub unsafe fn NPGetResourceParent(lpnetresource: *const NETRESOURCEW, lpbuffer: *mut core::ffi::c_void, lpbuffersize: *mut u32) -> u32 { windows_targets::link!("davclnt.dll" "system" fn NPGetResourceParent(lpnetresource : *const NETRESOURCEW, lpbuffer : *mut core::ffi::c_void, lpbuffersize : *mut u32) -> u32); - unsafe { NPGetResourceParent(lpnetresource, core::mem::transmute(lpbuffer), core::mem::transmute(lpbuffersize)) } + unsafe { NPGetResourceParent(lpnetresource, lpbuffer as _, lpbuffersize as _) } } #[inline] pub unsafe fn NPGetUniversalName(lplocalpath: P0, dwinfolevel: UNC_INFO_LEVEL, lpbuffer: *mut core::ffi::c_void, lpbuffersize: *mut u32) -> u32 @@ -118,7 +118,7 @@ where P0: windows_core::Param, { windows_targets::link!("davclnt.dll" "system" fn NPGetUniversalName(lplocalpath : windows_core::PCWSTR, dwinfolevel : UNC_INFO_LEVEL, lpbuffer : *mut core::ffi::c_void, lpbuffersize : *mut u32) -> u32); - unsafe { NPGetUniversalName(lplocalpath.param().abi(), dwinfolevel, core::mem::transmute(lpbuffer), core::mem::transmute(lpbuffersize)) } + unsafe { NPGetUniversalName(lplocalpath.param().abi(), dwinfolevel, lpbuffer as _, lpbuffersize as _) } } #[inline] pub unsafe fn NPGetUser(lpname: P0, lpusername: windows_core::PWSTR, lpnbufferlen: *mut u32) -> u32 @@ -126,12 +126,12 @@ where P0: windows_core::Param, { windows_targets::link!("davclnt.dll" "system" fn NPGetUser(lpname : windows_core::PCWSTR, lpusername : windows_core::PWSTR, lpnbufferlen : *mut u32) -> u32); - unsafe { NPGetUser(lpname.param().abi(), core::mem::transmute(lpusername), core::mem::transmute(lpnbufferlen)) } + unsafe { NPGetUser(lpname.param().abi(), core::mem::transmute(lpusername), lpnbufferlen as _) } } #[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); - unsafe { NPOpenEnum(dwscope, dwtype, dwusage, core::mem::transmute(lpnetresource.unwrap_or(core::mem::zeroed())), core::mem::transmute(lphenum)) } + unsafe { NPOpenEnum(dwscope, dwtype, dwusage, lpnetresource.unwrap_or(core::mem::zeroed()) as _, lphenum as _) } } #[inline] pub unsafe fn WNetAddConnection2A(lpnetresource: *const NETRESOURCEA, lppassword: P1, lpusername: P2, dwflags: NET_CONNECT_FLAGS) -> super::super::Foundation::WIN32_ERROR @@ -158,7 +158,7 @@ where 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); - unsafe { WNetAddConnection3A(core::mem::transmute(hwndowner.unwrap_or(core::mem::zeroed())), lpnetresource, lppassword.param().abi(), lpusername.param().abi(), dwflags) } + unsafe { WNetAddConnection3A(hwndowner.unwrap_or(core::mem::zeroed()) as _, lpnetresource, lppassword.param().abi(), lpusername.param().abi(), dwflags) } } #[inline] pub unsafe fn WNetAddConnection3W(hwndowner: Option, lpnetresource: *const NETRESOURCEW, lppassword: P2, lpusername: P3, dwflags: NET_CONNECT_FLAGS) -> super::super::Foundation::WIN32_ERROR @@ -167,17 +167,17 @@ where 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); - unsafe { WNetAddConnection3W(core::mem::transmute(hwndowner.unwrap_or(core::mem::zeroed())), lpnetresource, lppassword.param().abi(), lpusername.param().abi(), dwflags) } + unsafe { WNetAddConnection3W(hwndowner.unwrap_or(core::mem::zeroed()) as _, lpnetresource, lppassword.param().abi(), lpusername.param().abi(), dwflags) } } #[inline] 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); - unsafe { WNetAddConnection4A(core::mem::transmute(hwndowner.unwrap_or(core::mem::zeroed())), lpnetresource, pauthbuffer, cbauthbuffer, dwflags, core::mem::transmute(lpuseoptions.as_ptr()), lpuseoptions.len().try_into().unwrap()) } + unsafe { WNetAddConnection4A(hwndowner.unwrap_or(core::mem::zeroed()) as _, lpnetresource, pauthbuffer, cbauthbuffer, dwflags, core::mem::transmute(lpuseoptions.as_ptr()), lpuseoptions.len().try_into().unwrap()) } } #[inline] 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); - unsafe { WNetAddConnection4W(core::mem::transmute(hwndowner.unwrap_or(core::mem::zeroed())), lpnetresource, pauthbuffer, cbauthbuffer, dwflags, core::mem::transmute(lpuseoptions.as_ptr()), lpuseoptions.len().try_into().unwrap()) } + unsafe { WNetAddConnection4W(hwndowner.unwrap_or(core::mem::zeroed()) as _, lpnetresource, pauthbuffer, cbauthbuffer, 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 @@ -244,17 +244,17 @@ pub unsafe fn WNetConnectionDialog(hwnd: super::super::Foundation::HWND, dwtype: #[inline] pub unsafe fn WNetConnectionDialog1A(lpconndlgstruct: *mut CONNECTDLGSTRUCTA) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("mpr.dll" "system" fn WNetConnectionDialog1A(lpconndlgstruct : *mut CONNECTDLGSTRUCTA) -> super::super::Foundation:: WIN32_ERROR); - unsafe { WNetConnectionDialog1A(core::mem::transmute(lpconndlgstruct)) } + unsafe { WNetConnectionDialog1A(lpconndlgstruct as _) } } #[inline] pub unsafe fn WNetConnectionDialog1W(lpconndlgstruct: *mut CONNECTDLGSTRUCTW) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("mpr.dll" "system" fn WNetConnectionDialog1W(lpconndlgstruct : *mut CONNECTDLGSTRUCTW) -> super::super::Foundation:: WIN32_ERROR); - unsafe { WNetConnectionDialog1W(core::mem::transmute(lpconndlgstruct)) } + unsafe { WNetConnectionDialog1W(lpconndlgstruct as _) } } #[inline] 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); - unsafe { WNetDisconnectDialog(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), dwtype) } + unsafe { WNetDisconnectDialog(hwnd.unwrap_or(core::mem::zeroed()) as _, dwtype) } } #[inline] pub unsafe fn WNetDisconnectDialog1A(lpconndlgstruct: *const DISCDLGSTRUCTA) -> super::super::Foundation::WIN32_ERROR { @@ -269,12 +269,12 @@ pub unsafe fn WNetDisconnectDialog1W(lpconndlgstruct: *const DISCDLGSTRUCTW) -> #[inline] 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); - unsafe { WNetEnumResourceA(henum, core::mem::transmute(lpccount), core::mem::transmute(lpbuffer), core::mem::transmute(lpbuffersize)) } + unsafe { WNetEnumResourceA(henum, lpccount as _, lpbuffer as _, lpbuffersize as _) } } #[inline] 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); - unsafe { WNetEnumResourceW(henum, core::mem::transmute(lpccount), core::mem::transmute(lpbuffer), core::mem::transmute(lpbuffersize)) } + unsafe { WNetEnumResourceW(henum, lpccount as _, lpbuffer as _, lpbuffersize as _) } } #[inline] pub unsafe fn WNetGetConnectionA(lplocalname: P0, lpremotename: Option, lpnlength: *mut u32) -> super::super::Foundation::WIN32_ERROR @@ -282,7 +282,7 @@ 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); - unsafe { WNetGetConnectionA(lplocalname.param().abi(), core::mem::transmute(lpremotename.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpnlength)) } + unsafe { WNetGetConnectionA(lplocalname.param().abi(), lpremotename.unwrap_or(core::mem::zeroed()) as _, lpnlength as _) } } #[inline] pub unsafe fn WNetGetConnectionW(lplocalname: P0, lpremotename: Option, lpnlength: *mut u32) -> super::super::Foundation::WIN32_ERROR @@ -290,17 +290,17 @@ 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); - unsafe { WNetGetConnectionW(lplocalname.param().abi(), core::mem::transmute(lpremotename.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpnlength)) } + unsafe { WNetGetConnectionW(lplocalname.param().abi(), lpremotename.unwrap_or(core::mem::zeroed()) as _, lpnlength as _) } } #[inline] pub unsafe fn WNetGetLastErrorA(lperror: *mut u32, lperrorbuf: &mut [u8], lpnamebuf: &mut [u8]) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("mpr.dll" "system" fn WNetGetLastErrorA(lperror : *mut u32, lperrorbuf : windows_core::PSTR, nerrorbufsize : u32, lpnamebuf : windows_core::PSTR, nnamebufsize : u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { WNetGetLastErrorA(core::mem::transmute(lperror), core::mem::transmute(lperrorbuf.as_ptr()), lperrorbuf.len().try_into().unwrap(), core::mem::transmute(lpnamebuf.as_ptr()), lpnamebuf.len().try_into().unwrap()) } + unsafe { WNetGetLastErrorA(lperror as _, core::mem::transmute(lperrorbuf.as_ptr()), lperrorbuf.len().try_into().unwrap(), core::mem::transmute(lpnamebuf.as_ptr()), lpnamebuf.len().try_into().unwrap()) } } #[inline] pub unsafe fn WNetGetLastErrorW(lperror: *mut u32, lperrorbuf: &mut [u16], lpnamebuf: &mut [u16]) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("mpr.dll" "system" fn WNetGetLastErrorW(lperror : *mut u32, lperrorbuf : windows_core::PWSTR, nerrorbufsize : u32, lpnamebuf : windows_core::PWSTR, nnamebufsize : u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { WNetGetLastErrorW(core::mem::transmute(lperror), core::mem::transmute(lperrorbuf.as_ptr()), lperrorbuf.len().try_into().unwrap(), core::mem::transmute(lpnamebuf.as_ptr()), lpnamebuf.len().try_into().unwrap()) } + unsafe { WNetGetLastErrorW(lperror as _, core::mem::transmute(lperrorbuf.as_ptr()), lperrorbuf.len().try_into().unwrap(), core::mem::transmute(lpnamebuf.as_ptr()), lpnamebuf.len().try_into().unwrap()) } } #[inline] pub unsafe fn WNetGetNetworkInformationA(lpprovider: P0, lpnetinfostruct: *mut NETINFOSTRUCT) -> super::super::Foundation::WIN32_ERROR @@ -308,7 +308,7 @@ where P0: windows_core::Param, { windows_targets::link!("mpr.dll" "system" fn WNetGetNetworkInformationA(lpprovider : windows_core::PCSTR, lpnetinfostruct : *mut NETINFOSTRUCT) -> super::super::Foundation:: WIN32_ERROR); - unsafe { WNetGetNetworkInformationA(lpprovider.param().abi(), core::mem::transmute(lpnetinfostruct)) } + unsafe { WNetGetNetworkInformationA(lpprovider.param().abi(), lpnetinfostruct as _) } } #[inline] pub unsafe fn WNetGetNetworkInformationW(lpprovider: P0, lpnetinfostruct: *mut NETINFOSTRUCT) -> super::super::Foundation::WIN32_ERROR @@ -316,37 +316,37 @@ where P0: windows_core::Param, { windows_targets::link!("mpr.dll" "system" fn WNetGetNetworkInformationW(lpprovider : windows_core::PCWSTR, lpnetinfostruct : *mut NETINFOSTRUCT) -> super::super::Foundation:: WIN32_ERROR); - unsafe { WNetGetNetworkInformationW(lpprovider.param().abi(), core::mem::transmute(lpnetinfostruct)) } + unsafe { WNetGetNetworkInformationW(lpprovider.param().abi(), lpnetinfostruct as _) } } #[inline] pub unsafe fn WNetGetProviderNameA(dwnettype: u32, lpprovidername: windows_core::PSTR, lpbuffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("mpr.dll" "system" fn WNetGetProviderNameA(dwnettype : u32, lpprovidername : windows_core::PSTR, lpbuffersize : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { WNetGetProviderNameA(dwnettype, core::mem::transmute(lpprovidername), core::mem::transmute(lpbuffersize)) } + unsafe { WNetGetProviderNameA(dwnettype, core::mem::transmute(lpprovidername), lpbuffersize as _) } } #[inline] pub unsafe fn WNetGetProviderNameW(dwnettype: u32, lpprovidername: windows_core::PWSTR, lpbuffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("mpr.dll" "system" fn WNetGetProviderNameW(dwnettype : u32, lpprovidername : windows_core::PWSTR, lpbuffersize : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { WNetGetProviderNameW(dwnettype, core::mem::transmute(lpprovidername), core::mem::transmute(lpbuffersize)) } + unsafe { WNetGetProviderNameW(dwnettype, core::mem::transmute(lpprovidername), lpbuffersize as _) } } #[inline] pub unsafe fn WNetGetResourceInformationA(lpnetresource: *const NETRESOURCEA, lpbuffer: *mut core::ffi::c_void, lpcbbuffer: *mut u32, lplpsystem: *mut windows_core::PSTR) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("mpr.dll" "system" fn WNetGetResourceInformationA(lpnetresource : *const NETRESOURCEA, lpbuffer : *mut core::ffi::c_void, lpcbbuffer : *mut u32, lplpsystem : *mut windows_core::PSTR) -> super::super::Foundation:: WIN32_ERROR); - unsafe { WNetGetResourceInformationA(lpnetresource, core::mem::transmute(lpbuffer), core::mem::transmute(lpcbbuffer), core::mem::transmute(lplpsystem)) } + unsafe { WNetGetResourceInformationA(lpnetresource, lpbuffer as _, lpcbbuffer as _, lplpsystem as _) } } #[inline] pub unsafe fn WNetGetResourceInformationW(lpnetresource: *const NETRESOURCEW, lpbuffer: *mut core::ffi::c_void, lpcbbuffer: *mut u32, lplpsystem: *mut windows_core::PWSTR) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("mpr.dll" "system" fn WNetGetResourceInformationW(lpnetresource : *const NETRESOURCEW, lpbuffer : *mut core::ffi::c_void, lpcbbuffer : *mut u32, lplpsystem : *mut windows_core::PWSTR) -> super::super::Foundation:: WIN32_ERROR); - unsafe { WNetGetResourceInformationW(lpnetresource, core::mem::transmute(lpbuffer), core::mem::transmute(lpcbbuffer), core::mem::transmute(lplpsystem)) } + unsafe { WNetGetResourceInformationW(lpnetresource, lpbuffer as _, lpcbbuffer as _, lplpsystem as _) } } #[inline] pub unsafe fn WNetGetResourceParentA(lpnetresource: *const NETRESOURCEA, lpbuffer: *mut core::ffi::c_void, lpcbbuffer: *mut u32) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("mpr.dll" "system" fn WNetGetResourceParentA(lpnetresource : *const NETRESOURCEA, lpbuffer : *mut core::ffi::c_void, lpcbbuffer : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { WNetGetResourceParentA(lpnetresource, core::mem::transmute(lpbuffer), core::mem::transmute(lpcbbuffer)) } + unsafe { WNetGetResourceParentA(lpnetresource, lpbuffer as _, lpcbbuffer as _) } } #[inline] pub unsafe fn WNetGetResourceParentW(lpnetresource: *const NETRESOURCEW, lpbuffer: *mut core::ffi::c_void, lpcbbuffer: *mut u32) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("mpr.dll" "system" fn WNetGetResourceParentW(lpnetresource : *const NETRESOURCEW, lpbuffer : *mut core::ffi::c_void, lpcbbuffer : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { WNetGetResourceParentW(lpnetresource, core::mem::transmute(lpbuffer), core::mem::transmute(lpcbbuffer)) } + unsafe { WNetGetResourceParentW(lpnetresource, lpbuffer as _, lpcbbuffer as _) } } #[inline] pub unsafe fn WNetGetUniversalNameA(lplocalpath: P0, dwinfolevel: UNC_INFO_LEVEL, lpbuffer: *mut core::ffi::c_void, lpbuffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR @@ -354,7 +354,7 @@ where P0: windows_core::Param, { windows_targets::link!("mpr.dll" "system" fn WNetGetUniversalNameA(lplocalpath : windows_core::PCSTR, dwinfolevel : UNC_INFO_LEVEL, lpbuffer : *mut core::ffi::c_void, lpbuffersize : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { WNetGetUniversalNameA(lplocalpath.param().abi(), dwinfolevel, core::mem::transmute(lpbuffer), core::mem::transmute(lpbuffersize)) } + unsafe { WNetGetUniversalNameA(lplocalpath.param().abi(), dwinfolevel, lpbuffer as _, lpbuffersize as _) } } #[inline] pub unsafe fn WNetGetUniversalNameW(lplocalpath: P0, dwinfolevel: UNC_INFO_LEVEL, lpbuffer: *mut core::ffi::c_void, lpbuffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR @@ -362,7 +362,7 @@ where P0: windows_core::Param, { windows_targets::link!("mpr.dll" "system" fn WNetGetUniversalNameW(lplocalpath : windows_core::PCWSTR, dwinfolevel : UNC_INFO_LEVEL, lpbuffer : *mut core::ffi::c_void, lpbuffersize : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { WNetGetUniversalNameW(lplocalpath.param().abi(), dwinfolevel, core::mem::transmute(lpbuffer), core::mem::transmute(lpbuffersize)) } + unsafe { WNetGetUniversalNameW(lplocalpath.param().abi(), dwinfolevel, lpbuffer as _, lpbuffersize as _) } } #[inline] pub unsafe fn WNetGetUserA(lpname: P0, lpusername: windows_core::PSTR, lpnlength: *mut u32) -> super::super::Foundation::WIN32_ERROR @@ -370,7 +370,7 @@ where P0: windows_core::Param, { windows_targets::link!("mpr.dll" "system" fn WNetGetUserA(lpname : windows_core::PCSTR, lpusername : windows_core::PSTR, lpnlength : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { WNetGetUserA(lpname.param().abi(), core::mem::transmute(lpusername), core::mem::transmute(lpnlength)) } + unsafe { WNetGetUserA(lpname.param().abi(), core::mem::transmute(lpusername), lpnlength as _) } } #[inline] pub unsafe fn WNetGetUserW(lpname: P0, lpusername: windows_core::PWSTR, lpnlength: *mut u32) -> super::super::Foundation::WIN32_ERROR @@ -378,17 +378,17 @@ where P0: windows_core::Param, { windows_targets::link!("mpr.dll" "system" fn WNetGetUserW(lpname : windows_core::PCWSTR, lpusername : windows_core::PWSTR, lpnlength : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { WNetGetUserW(lpname.param().abi(), core::mem::transmute(lpusername), core::mem::transmute(lpnlength)) } + unsafe { WNetGetUserW(lpname.param().abi(), core::mem::transmute(lpusername), lpnlength as _) } } #[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); - unsafe { WNetOpenEnumA(dwscope, dwtype, dwusage, core::mem::transmute(lpnetresource.unwrap_or(core::mem::zeroed())), core::mem::transmute(lphenum)) } + unsafe { WNetOpenEnumA(dwscope, dwtype, dwusage, lpnetresource.unwrap_or(core::mem::zeroed()) as _, lphenum as _) } } #[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); - unsafe { WNetOpenEnumW(dwscope, dwtype, dwusage, core::mem::transmute(lpnetresource.unwrap_or(core::mem::zeroed())), core::mem::transmute(lphenum)) } + unsafe { WNetOpenEnumW(dwscope, dwtype, dwusage, lpnetresource.unwrap_or(core::mem::zeroed()) as _, lphenum as _) } } #[inline] pub unsafe fn WNetSetLastErrorA(err: u32, lperror: P1, lpproviders: P2) @@ -411,38 +411,12 @@ where #[inline] 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); - unsafe { - WNetUseConnection4A( - core::mem::transmute(hwndowner.unwrap_or(core::mem::zeroed())), - lpnetresource, - core::mem::transmute(pauthbuffer.unwrap_or(core::mem::zeroed())), - cbauthbuffer, - dwflags, - core::mem::transmute(lpuseoptions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - lpuseoptions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(lpaccessname.unwrap_or(core::mem::zeroed())), - core::mem::transmute(lpbuffersize.unwrap_or(core::mem::zeroed())), - core::mem::transmute(lpresult.unwrap_or(core::mem::zeroed())), - ) - } + unsafe { WNetUseConnection4A(hwndowner.unwrap_or(core::mem::zeroed()) as _, lpnetresource, pauthbuffer.unwrap_or(core::mem::zeroed()) as _, cbauthbuffer, dwflags, core::mem::transmute(lpuseoptions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpuseoptions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpaccessname.unwrap_or(core::mem::zeroed()) as _, lpbuffersize.unwrap_or(core::mem::zeroed()) as _, lpresult.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { - WNetUseConnection4W( - core::mem::transmute(hwndowner.unwrap_or(core::mem::zeroed())), - lpnetresource, - core::mem::transmute(pauthbuffer.unwrap_or(core::mem::zeroed())), - cbauthbuffer, - dwflags, - core::mem::transmute(lpuseoptions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - lpuseoptions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(lpaccessname.unwrap_or(core::mem::zeroed())), - core::mem::transmute(lpbuffersize.unwrap_or(core::mem::zeroed())), - core::mem::transmute(lpresult.unwrap_or(core::mem::zeroed())), - ) - } + unsafe { WNetUseConnection4W(hwndowner.unwrap_or(core::mem::zeroed()) as _, lpnetresource, pauthbuffer.unwrap_or(core::mem::zeroed()) as _, cbauthbuffer, dwflags, core::mem::transmute(lpuseoptions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpuseoptions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpaccessname.unwrap_or(core::mem::zeroed()) as _, lpbuffersize.unwrap_or(core::mem::zeroed()) as _, lpresult.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -451,7 +425,7 @@ where 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); - unsafe { WNetUseConnectionA(core::mem::transmute(hwndowner.unwrap_or(core::mem::zeroed())), lpnetresource, lppassword.param().abi(), lpuserid.param().abi(), 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()))) } + unsafe { WNetUseConnectionA(hwndowner.unwrap_or(core::mem::zeroed()) as _, lpnetresource, lppassword.param().abi(), lpuserid.param().abi(), dwflags, lpaccessname.unwrap_or(core::mem::zeroed()) as _, lpbuffersize.unwrap_or(core::mem::zeroed()) as _, lpresult.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -460,7 +434,7 @@ where 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); - unsafe { WNetUseConnectionW(core::mem::transmute(hwndowner.unwrap_or(core::mem::zeroed())), lpnetresource, lppassword.param().abi(), lpuserid.param().abi(), 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()))) } + unsafe { WNetUseConnectionW(hwndowner.unwrap_or(core::mem::zeroed()) as _, lpnetresource, lppassword.param().abi(), lpuserid.param().abi(), dwflags, lpaccessname.unwrap_or(core::mem::zeroed()) as _, lpbuffersize.unwrap_or(core::mem::zeroed()) as _, lpresult.unwrap_or(core::mem::zeroed()) as _) } } 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 9ebe0d45fc..06967dbc1f 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WebDav/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WebDav/mod.rs @@ -6,7 +6,7 @@ where P3: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn DavAddConnection(connectionhandle : *mut super::super::Foundation:: HANDLE, remotename : windows_core::PCWSTR, username : windows_core::PCWSTR, password : windows_core::PCWSTR, clientcert : *const u8, certsize : u32) -> u32); - unsafe { DavAddConnection(core::mem::transmute(connectionhandle), remotename.param().abi(), username.param().abi(), password.param().abi(), core::mem::transmute(clientcert.as_ptr()), clientcert.len().try_into().unwrap()) } + unsafe { DavAddConnection(connectionhandle as _, remotename.param().abi(), username.param().abi(), password.param().abi(), core::mem::transmute(clientcert.as_ptr()), clientcert.len().try_into().unwrap()) } } #[inline] pub unsafe fn DavCancelConnectionsToServer(lpname: P0, fforce: bool) -> u32 @@ -29,7 +29,7 @@ pub unsafe fn DavFlushFile(hfile: super::super::Foundation::HANDLE) -> u32 { #[inline] 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); - unsafe { DavGetExtendedError(hfile, core::mem::transmute(exterror), core::mem::transmute(exterrorstring), core::mem::transmute(cchsize)) } + unsafe { DavGetExtendedError(hfile, exterror as _, core::mem::transmute(exterrorstring), cchsize as _) } } #[inline] pub unsafe fn DavGetHTTPFromUNCPath(uncpath: P0, url: Option, lpsize: *mut u32) -> u32 @@ -37,7 +37,7 @@ 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); - unsafe { DavGetHTTPFromUNCPath(uncpath.param().abi(), core::mem::transmute(url.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpsize)) } + unsafe { DavGetHTTPFromUNCPath(uncpath.param().abi(), url.unwrap_or(core::mem::zeroed()) as _, lpsize as _) } } #[inline] pub unsafe fn DavGetTheLockOwnerOfTheFile(filename: P0, lockownername: Option, lockownernamelengthinbytes: *mut u32) -> u32 @@ -45,7 +45,7 @@ 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); - unsafe { DavGetTheLockOwnerOfTheFile(filename.param().abi(), core::mem::transmute(lockownername.unwrap_or(core::mem::zeroed())), core::mem::transmute(lockownernamelengthinbytes)) } + unsafe { DavGetTheLockOwnerOfTheFile(filename.param().abi(), lockownername.unwrap_or(core::mem::zeroed()) as _, lockownernamelengthinbytes as _) } } #[inline] pub unsafe fn DavGetUNCFromHTTPPath(url: P0, uncpath: Option, lpsize: *mut u32) -> u32 @@ -53,7 +53,7 @@ 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); - unsafe { DavGetUNCFromHTTPPath(url.param().abi(), core::mem::transmute(uncpath.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpsize)) } + unsafe { DavGetUNCFromHTTPPath(url.param().abi(), uncpath.unwrap_or(core::mem::zeroed()) as _, lpsize as _) } } #[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 2a791d6182..3dd7f79556 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WiFi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WiFi/mod.rs @@ -16,17 +16,17 @@ pub unsafe fn WFDCloseSession(hsessionhandle: super::super::Foundation::HANDLE) #[inline] pub unsafe fn WFDOpenHandle(dwclientversion: u32, pdwnegotiatedversion: *mut u32, phclienthandle: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("wlanapi.dll" "system" fn WFDOpenHandle(dwclientversion : u32, pdwnegotiatedversion : *mut u32, phclienthandle : *mut super::super::Foundation:: HANDLE) -> u32); - unsafe { WFDOpenHandle(dwclientversion, core::mem::transmute(pdwnegotiatedversion), core::mem::transmute(phclienthandle)) } + unsafe { WFDOpenHandle(dwclientversion, pdwnegotiatedversion as _, phclienthandle as _) } } #[inline] 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); - unsafe { WFDOpenLegacySession(hclienthandle, plegacymacaddress, core::mem::transmute(phsessionhandle), core::mem::transmute(pguidsessioninterface)) } + unsafe { WFDOpenLegacySession(hclienthandle, plegacymacaddress, phsessionhandle as _, pguidsessioninterface as _) } } #[inline] 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); - unsafe { WFDStartOpenSession(hclienthandle, pdeviceaddress, core::mem::transmute(pvcontext.unwrap_or(core::mem::zeroed())), pfncallback, core::mem::transmute(phsessionhandle)) } + unsafe { WFDStartOpenSession(hclienthandle, pdeviceaddress, pvcontext.unwrap_or(core::mem::zeroed()) as _, pfncallback, phsessionhandle as _) } } #[inline] pub unsafe fn WFDUpdateDeviceVisibility(pdeviceaddress: *const *const u8) -> u32 { @@ -41,19 +41,19 @@ pub unsafe fn WlanAllocateMemory(dwmemorysize: u32) -> *mut core::ffi::c_void { #[inline] 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); - unsafe { WlanCloseHandle(hclienthandle, core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } + unsafe { WlanCloseHandle(hclienthandle, preserved.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] 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); - unsafe { WlanConnect(hclienthandle, pinterfaceguid, pconnectionparameters, core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } + unsafe { WlanConnect(hclienthandle, pinterfaceguid, pconnectionparameters, preserved.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] 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); - unsafe { WlanConnect2(hclienthandle, pinterfaceguid, pconnectionparameters, core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } + unsafe { WlanConnect2(hclienthandle, pinterfaceguid, pconnectionparameters, preserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn WlanDeleteProfile(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, strprofilename: P2, preserved: Option<*const core::ffi::c_void>) -> u32 @@ -61,22 +61,22 @@ where 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); - unsafe { WlanDeleteProfile(hclienthandle, pinterfaceguid, strprofilename.param().abi(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } + unsafe { WlanDeleteProfile(hclienthandle, pinterfaceguid, strprofilename.param().abi(), preserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { WlanDeviceServiceCommand(hclienthandle, pinterfaceguid, pdeviceserviceguid, dwopcode, dwinbuffersize, core::mem::transmute(pinbuffer.unwrap_or(core::mem::zeroed())), dwoutbuffersize, core::mem::transmute(poutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwbytesreturned)) } + unsafe { WlanDeviceServiceCommand(hclienthandle, pinterfaceguid, pdeviceserviceguid, dwopcode, dwinbuffersize, pinbuffer.unwrap_or(core::mem::zeroed()) as _, dwoutbuffersize, poutbuffer.unwrap_or(core::mem::zeroed()) as _, pdwbytesreturned as _) } } #[inline] 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); - unsafe { WlanDisconnect(hclienthandle, pinterfaceguid, core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } + unsafe { WlanDisconnect(hclienthandle, pinterfaceguid, preserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { WlanEnumInterfaces(hclienthandle, core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppinterfacelist)) } + unsafe { WlanEnumInterfaces(hclienthandle, preserved.unwrap_or(core::mem::zeroed()) as _, ppinterfacelist as _) } } #[inline] 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 @@ -84,7 +84,7 @@ where 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); - unsafe { WlanExtractPsdIEDataList(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)) } + unsafe { WlanExtractPsdIEDataList(hclienthandle, prawiedata.len().try_into().unwrap(), core::mem::transmute(prawiedata.as_ptr()), strformat.param().abi(), preserved.unwrap_or(core::mem::zeroed()) as _, pppsdiedatalist as _) } } #[inline] pub unsafe fn WlanFreeMemory(pmemory: *const core::ffi::c_void) { @@ -94,27 +94,27 @@ pub unsafe fn WlanFreeMemory(pmemory: *const core::ffi::c_void) { #[inline] 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); - unsafe { WlanGetAvailableNetworkList(hclienthandle, pinterfaceguid, dwflags, core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppavailablenetworklist)) } + unsafe { WlanGetAvailableNetworkList(hclienthandle, pinterfaceguid, dwflags, preserved.unwrap_or(core::mem::zeroed()) as _, ppavailablenetworklist as _) } } #[inline] 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); - unsafe { WlanGetAvailableNetworkList2(hclienthandle, pinterfaceguid, dwflags, core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppavailablenetworklist)) } + unsafe { WlanGetAvailableNetworkList2(hclienthandle, pinterfaceguid, dwflags, preserved.unwrap_or(core::mem::zeroed()) as _, ppavailablenetworklist as _) } } #[inline] 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); - unsafe { WlanGetFilterList(hclienthandle, wlanfilterlisttype, core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppnetworklist)) } + unsafe { WlanGetFilterList(hclienthandle, wlanfilterlisttype, preserved.unwrap_or(core::mem::zeroed()) as _, ppnetworklist as _) } } #[inline] 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); - unsafe { WlanGetInterfaceCapability(hclienthandle, pinterfaceguid, core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppcapability)) } + unsafe { WlanGetInterfaceCapability(hclienthandle, pinterfaceguid, preserved.unwrap_or(core::mem::zeroed()) as _, ppcapability as _) } } #[inline] pub unsafe fn WlanGetNetworkBssList(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, pdot11ssid: Option<*const DOT11_SSID>, dot11bsstype: DOT11_BSS_TYPE, bsecurityenabled: bool, preserved: Option<*const core::ffi::c_void>, ppwlanbsslist: *mut *mut WLAN_BSS_LIST) -> u32 { 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); - unsafe { WlanGetNetworkBssList(hclienthandle, pinterfaceguid, core::mem::transmute(pdot11ssid.unwrap_or(core::mem::zeroed())), dot11bsstype, bsecurityenabled.into(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppwlanbsslist)) } + unsafe { WlanGetNetworkBssList(hclienthandle, pinterfaceguid, pdot11ssid.unwrap_or(core::mem::zeroed()) as _, dot11bsstype, bsecurityenabled.into(), preserved.unwrap_or(core::mem::zeroed()) as _, ppwlanbsslist as _) } } #[inline] 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 @@ -122,7 +122,7 @@ where 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); - unsafe { WlanGetProfile(hclienthandle, 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()))) } + unsafe { WlanGetProfile(hclienthandle, pinterfaceguid, strprofilename.param().abi(), preserved.unwrap_or(core::mem::zeroed()) as _, pstrprofilexml as _, pdwflags.unwrap_or(core::mem::zeroed()) as _, pdwgrantedaccess.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -130,117 +130,117 @@ where 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); - unsafe { WlanGetProfileCustomUserData(hclienthandle, pinterfaceguid, strprofilename.param().abi(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwdatasize), core::mem::transmute(ppdata)) } + unsafe { WlanGetProfileCustomUserData(hclienthandle, pinterfaceguid, strprofilename.param().abi(), preserved.unwrap_or(core::mem::zeroed()) as _, pdwdatasize as _, ppdata as _) } } #[inline] 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); - unsafe { WlanGetProfileList(hclienthandle, pinterfaceguid, core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppprofilelist)) } + unsafe { WlanGetProfileList(hclienthandle, pinterfaceguid, preserved.unwrap_or(core::mem::zeroed()) as _, ppprofilelist as _) } } #[inline] 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); - unsafe { WlanGetSecuritySettings(hclienthandle, securableobject, core::mem::transmute(pvaluetype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pstrcurrentsddl), core::mem::transmute(pdwgrantedaccess)) } + unsafe { WlanGetSecuritySettings(hclienthandle, securableobject, pvaluetype.unwrap_or(core::mem::zeroed()) as _, pstrcurrentsddl as _, pdwgrantedaccess as _) } } #[inline] 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); - unsafe { WlanGetSupportedDeviceServices(hclienthandle, pinterfaceguid, core::mem::transmute(ppdevsvcguidlist)) } + unsafe { WlanGetSupportedDeviceServices(hclienthandle, pinterfaceguid, ppdevsvcguidlist as _) } } #[inline] 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); - unsafe { WlanHostedNetworkForceStart(hclienthandle, core::mem::transmute(pfailreason.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { WlanHostedNetworkForceStart(hclienthandle, pfailreason.unwrap_or(core::mem::zeroed()) as _, pvreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { WlanHostedNetworkForceStop(hclienthandle, core::mem::transmute(pfailreason.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { WlanHostedNetworkForceStop(hclienthandle, pfailreason.unwrap_or(core::mem::zeroed()) as _, pvreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { WlanHostedNetworkInitSettings(hclienthandle, core::mem::transmute(pfailreason.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { WlanHostedNetworkInitSettings(hclienthandle, pfailreason.unwrap_or(core::mem::zeroed()) as _, pvreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { WlanHostedNetworkQueryProperty(hclienthandle, opcode, core::mem::transmute(pdwdatasize), core::mem::transmute(ppvdata), core::mem::transmute(pwlanopcodevaluetype), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { WlanHostedNetworkQueryProperty(hclienthandle, opcode, pdwdatasize as _, ppvdata as _, pwlanopcodevaluetype as _, pvreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { WlanHostedNetworkQuerySecondaryKey(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()))) } + unsafe { WlanHostedNetworkQuerySecondaryKey(hclienthandle, pdwkeylength as _, ppuckeydata as _, pbispassphrase as _, pbpersistent as _, pfailreason.unwrap_or(core::mem::zeroed()) as _, pvreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { WlanHostedNetworkQueryStatus(hclienthandle, core::mem::transmute(ppwlanhostednetworkstatus), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { WlanHostedNetworkQueryStatus(hclienthandle, ppwlanhostednetworkstatus as _, pvreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { WlanHostedNetworkRefreshSecuritySettings(hclienthandle, core::mem::transmute(pfailreason.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { WlanHostedNetworkRefreshSecuritySettings(hclienthandle, pfailreason.unwrap_or(core::mem::zeroed()) as _, pvreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { WlanHostedNetworkSetProperty(hclienthandle, opcode, dwdatasize, pvdata, core::mem::transmute(pfailreason.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { WlanHostedNetworkSetProperty(hclienthandle, opcode, dwdatasize, pvdata, pfailreason.unwrap_or(core::mem::zeroed()) as _, pvreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn WlanHostedNetworkSetSecondaryKey(hclienthandle: super::super::Foundation::HANDLE, puckeydata: &[u8], bispassphrase: bool, bpersistent: bool, pfailreason: Option<*mut WLAN_HOSTED_NETWORK_REASON>, pvreserved: Option<*const core::ffi::c_void>) -> u32 { 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); - unsafe { WlanHostedNetworkSetSecondaryKey(hclienthandle, puckeydata.len().try_into().unwrap(), core::mem::transmute(puckeydata.as_ptr()), bispassphrase.into(), bpersistent.into(), core::mem::transmute(pfailreason.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { WlanHostedNetworkSetSecondaryKey(hclienthandle, puckeydata.len().try_into().unwrap(), core::mem::transmute(puckeydata.as_ptr()), bispassphrase.into(), bpersistent.into(), pfailreason.unwrap_or(core::mem::zeroed()) as _, pvreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { WlanHostedNetworkStartUsing(hclienthandle, core::mem::transmute(pfailreason.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { WlanHostedNetworkStartUsing(hclienthandle, pfailreason.unwrap_or(core::mem::zeroed()) as _, pvreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { WlanHostedNetworkStopUsing(hclienthandle, core::mem::transmute(pfailreason.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { WlanHostedNetworkStopUsing(hclienthandle, pfailreason.unwrap_or(core::mem::zeroed()) as _, pvreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { WlanIhvControl(hclienthandle, pinterfaceguid, r#type, dwinbuffersize, pinbuffer, dwoutbuffersize, core::mem::transmute(poutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwbytesreturned)) } + unsafe { WlanIhvControl(hclienthandle, pinterfaceguid, r#type, dwinbuffersize, pinbuffer, dwoutbuffersize, poutbuffer.unwrap_or(core::mem::zeroed()) as _, pdwbytesreturned as _) } } #[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); - unsafe { WlanOpenHandle(dwclientversion, core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwnegotiatedversion), core::mem::transmute(phclienthandle)) } + unsafe { WlanOpenHandle(dwclientversion, preserved.unwrap_or(core::mem::zeroed()) as _, pdwnegotiatedversion as _, phclienthandle as _) } } #[inline] 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); - unsafe { WlanQueryAutoConfigParameter(hclienthandle, 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()))) } + unsafe { WlanQueryAutoConfigParameter(hclienthandle, opcode, preserved.unwrap_or(core::mem::zeroed()) as _, pdwdatasize as _, ppdata as _, pwlanopcodevaluetype.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { WlanQueryInterface(hclienthandle, pinterfaceguid, 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()))) } + unsafe { WlanQueryInterface(hclienthandle, pinterfaceguid, opcode, preserved.unwrap_or(core::mem::zeroed()) as _, pdwdatasize as _, ppdata as _, pwlanopcodevaluetype.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { WlanReasonCodeToString(dwreasoncode, pstringbuffer.len().try_into().unwrap(), core::mem::transmute(pstringbuffer.as_ptr()), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } + unsafe { WlanReasonCodeToString(dwreasoncode, pstringbuffer.len().try_into().unwrap(), core::mem::transmute(pstringbuffer.as_ptr()), preserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { WlanRegisterDeviceServiceNotification(hclienthandle, core::mem::transmute(pdevsvcguidlist.unwrap_or(core::mem::zeroed()))) } + unsafe { WlanRegisterDeviceServiceNotification(hclienthandle, pdevsvcguidlist.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn WlanRegisterNotification(hclienthandle: super::super::Foundation::HANDLE, dwnotifsource: WLAN_NOTIFICATION_SOURCES, bignoreduplicate: bool, funccallback: Option, pcallbackcontext: Option<*const core::ffi::c_void>, preserved: Option<*const core::ffi::c_void>, pdwprevnotifsource: Option<*mut u32>) -> u32 { 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); - unsafe { WlanRegisterNotification(hclienthandle, dwnotifsource, bignoreduplicate.into(), 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()))) } + unsafe { WlanRegisterNotification(hclienthandle, dwnotifsource, bignoreduplicate.into(), funccallback.unwrap_or(core::mem::zeroed()) as _, pcallbackcontext.unwrap_or(core::mem::zeroed()) as _, preserved.unwrap_or(core::mem::zeroed()) as _, pdwprevnotifsource.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn WlanRegisterVirtualStationNotification(hclienthandle: super::super::Foundation::HANDLE, bregister: bool, preserved: Option<*const core::ffi::c_void>) -> u32 { 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); - unsafe { WlanRegisterVirtualStationNotification(hclienthandle, bregister.into(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } + unsafe { WlanRegisterVirtualStationNotification(hclienthandle, bregister.into(), preserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -249,7 +249,7 @@ where 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); - unsafe { WlanRenameProfile(hclienthandle, pinterfaceguid, stroldprofilename.param().abi(), strnewprofilename.param().abi(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } + unsafe { WlanRenameProfile(hclienthandle, pinterfaceguid, stroldprofilename.param().abi(), strnewprofilename.param().abi(), preserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn WlanSaveTemporaryProfile(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, strprofilename: P2, stralluserprofilesecurity: P3, dwflags: u32, boverwrite: bool, preserved: Option<*const core::ffi::c_void>) -> u32 @@ -258,27 +258,27 @@ where P3: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanSaveTemporaryProfile(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const windows_core::GUID, strprofilename : windows_core::PCWSTR, stralluserprofilesecurity : windows_core::PCWSTR, dwflags : u32, boverwrite : super::super::Foundation:: BOOL, preserved : *const core::ffi::c_void) -> u32); - unsafe { WlanSaveTemporaryProfile(hclienthandle, pinterfaceguid, strprofilename.param().abi(), stralluserprofilesecurity.param().abi(), dwflags, boverwrite.into(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } + unsafe { WlanSaveTemporaryProfile(hclienthandle, pinterfaceguid, strprofilename.param().abi(), stralluserprofilesecurity.param().abi(), dwflags, boverwrite.into(), preserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { WlanScan(hclienthandle, 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()))) } + unsafe { WlanScan(hclienthandle, pinterfaceguid, pdot11ssid.unwrap_or(core::mem::zeroed()) as _, piedata.unwrap_or(core::mem::zeroed()) as _, preserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { WlanSetAutoConfigParameter(hclienthandle, opcode, dwdatasize, pdata, core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } + unsafe { WlanSetAutoConfigParameter(hclienthandle, opcode, dwdatasize, pdata, preserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { WlanSetFilterList(hclienthandle, wlanfilterlisttype, core::mem::transmute(pnetworklist.unwrap_or(core::mem::zeroed())), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } + unsafe { WlanSetFilterList(hclienthandle, wlanfilterlisttype, pnetworklist.unwrap_or(core::mem::zeroed()) as _, preserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { WlanSetInterface(hclienthandle, pinterfaceguid, opcode, dwdatasize, pdata, core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } + unsafe { WlanSetInterface(hclienthandle, pinterfaceguid, opcode, dwdatasize, pdata, preserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn WlanSetProfile(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, dwflags: u32, strprofilexml: P3, stralluserprofilesecurity: P4, boverwrite: bool, preserved: Option<*const core::ffi::c_void>, pdwreasoncode: *mut u32) -> u32 @@ -287,7 +287,7 @@ where P4: 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); - unsafe { WlanSetProfile(hclienthandle, pinterfaceguid, dwflags, strprofilexml.param().abi(), stralluserprofilesecurity.param().abi(), boverwrite.into(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwreasoncode)) } + unsafe { WlanSetProfile(hclienthandle, pinterfaceguid, dwflags, strprofilexml.param().abi(), stralluserprofilesecurity.param().abi(), boverwrite.into(), preserved.unwrap_or(core::mem::zeroed()) as _, pdwreasoncode as _) } } #[inline] 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 @@ -295,7 +295,7 @@ where 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); - unsafe { WlanSetProfileCustomUserData(hclienthandle, pinterfaceguid, strprofilename.param().abi(), pdata.len().try_into().unwrap(), core::mem::transmute(pdata.as_ptr()), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } + unsafe { WlanSetProfileCustomUserData(hclienthandle, pinterfaceguid, strprofilename.param().abi(), pdata.len().try_into().unwrap(), core::mem::transmute(pdata.as_ptr()), preserved.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security_ExtensibleAuthenticationProtocol")] #[inline] @@ -304,7 +304,7 @@ where 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); - unsafe { WlanSetProfileEapUserData(hclienthandle, pinterfaceguid, strprofilename.param().abi(), core::mem::transmute(eaptype), dwflags, pbeapuserdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pbeapuserdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } + unsafe { WlanSetProfileEapUserData(hclienthandle, pinterfaceguid, strprofilename.param().abi(), core::mem::transmute(eaptype), dwflags, pbeapuserdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pbeapuserdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), preserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -313,12 +313,12 @@ where 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); - unsafe { WlanSetProfileEapXmlUserData(hclienthandle, pinterfaceguid, strprofilename.param().abi(), dwflags, streapxmluserdata.param().abi(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } + unsafe { WlanSetProfileEapXmlUserData(hclienthandle, pinterfaceguid, strprofilename.param().abi(), dwflags, streapxmluserdata.param().abi(), preserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { WlanSetProfileList(hclienthandle, pinterfaceguid, strprofilenames.len().try_into().unwrap(), core::mem::transmute(strprofilenames.as_ptr()), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } + unsafe { WlanSetProfileList(hclienthandle, pinterfaceguid, strprofilenames.len().try_into().unwrap(), core::mem::transmute(strprofilenames.as_ptr()), preserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -326,7 +326,7 @@ where 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); - unsafe { WlanSetProfilePosition(hclienthandle, pinterfaceguid, strprofilename.param().abi(), dwposition, core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } + unsafe { WlanSetProfilePosition(hclienthandle, pinterfaceguid, strprofilename.param().abi(), dwposition, preserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -334,7 +334,7 @@ where P1: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanSetPsdIEDataList(hclienthandle : super::super::Foundation:: HANDLE, strformat : windows_core::PCWSTR, ppsdiedatalist : *const WLAN_RAW_DATA_LIST, preserved : *const core::ffi::c_void) -> u32); - unsafe { WlanSetPsdIEDataList(hclienthandle, strformat.param().abi(), core::mem::transmute(ppsdiedatalist.unwrap_or(core::mem::zeroed())), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } + unsafe { WlanSetPsdIEDataList(hclienthandle, strformat.param().abi(), ppsdiedatalist.unwrap_or(core::mem::zeroed()) as _, preserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn WlanSetSecuritySettings(hclienthandle: super::super::Foundation::HANDLE, securableobject: WLAN_SECURABLE_OBJECT, strmodifiedsddl: P2) -> u32 @@ -350,7 +350,7 @@ where P1: windows_core::Param, { windows_targets::link!("wlanui.dll" "system" fn WlanUIEditProfile(dwclientversion : u32, wstrprofilename : windows_core::PCWSTR, pinterfaceguid : *const windows_core::GUID, hwnd : super::super::Foundation:: HWND, wlstartpage : WL_DISPLAY_PAGES, preserved : *const core::ffi::c_void, pwlanreasoncode : *mut u32) -> u32); - unsafe { WlanUIEditProfile(dwclientversion, wstrprofilename.param().abi(), pinterfaceguid, hwnd, wlstartpage, core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pwlanreasoncode.unwrap_or(core::mem::zeroed()))) } + unsafe { WlanUIEditProfile(dwclientversion, wstrprofilename.param().abi(), pinterfaceguid, hwnd, wlstartpage, preserved.unwrap_or(core::mem::zeroed()) as _, pwlanreasoncode.unwrap_or(core::mem::zeroed()) as _) } } #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] @@ -4664,7 +4664,7 @@ windows_core::imp::define_interface!(IDot11AdHocInterface, IDot11AdHocInterface_ windows_core::imp::interface_hierarchy!(IDot11AdHocInterface, windows_core::IUnknown); impl IDot11AdHocInterface { pub unsafe fn GetDeviceSignature(&self, psignature: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeviceSignature)(windows_core::Interface::as_raw(self), core::mem::transmute(psignature)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceSignature)(windows_core::Interface::as_raw(self), psignature as _).ok() } } pub unsafe fn GetFriendlyName(&self) -> windows_core::Result { unsafe { @@ -4673,13 +4673,13 @@ impl IDot11AdHocInterface { } } pub unsafe fn IsDot11d(&self, pf11d: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsDot11d)(windows_core::Interface::as_raw(self), core::mem::transmute(pf11d)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsDot11d)(windows_core::Interface::as_raw(self), pf11d as _).ok() } } pub unsafe fn IsAdHocCapable(&self, pfadhoccapable: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsAdHocCapable)(windows_core::Interface::as_raw(self), core::mem::transmute(pfadhoccapable)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsAdHocCapable)(windows_core::Interface::as_raw(self), pfadhoccapable as _).ok() } } pub unsafe fn IsRadioOn(&self, pfisradioon: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsRadioOn)(windows_core::Interface::as_raw(self), core::mem::transmute(pfisradioon)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsRadioOn)(windows_core::Interface::as_raw(self), pfisradioon as _).ok() } } pub unsafe fn GetActiveNetwork(&self) -> windows_core::Result { unsafe { @@ -4700,7 +4700,7 @@ impl IDot11AdHocInterface { } } pub unsafe fn GetStatus(&self, pstate: *mut DOT11_ADHOC_NETWORK_CONNECTION_STATUS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pstate)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), pstate as _).ok() } } } #[repr(C)] @@ -5060,7 +5060,7 @@ windows_core::imp::define_interface!(IDot11AdHocNetwork, IDot11AdHocNetwork_Vtbl windows_core::imp::interface_hierarchy!(IDot11AdHocNetwork, windows_core::IUnknown); impl IDot11AdHocNetwork { pub unsafe fn GetStatus(&self, estatus: *mut DOT11_ADHOC_NETWORK_CONNECTION_STATUS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(estatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), estatus as _).ok() } } pub unsafe fn GetSSID(&self) -> windows_core::Result { unsafe { @@ -5069,7 +5069,7 @@ impl IDot11AdHocNetwork { } } pub unsafe fn HasProfile(&self, pf11d: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).HasProfile)(windows_core::Interface::as_raw(self), core::mem::transmute(pf11d)).ok() } + unsafe { (windows_core::Interface::vtable(self).HasProfile)(windows_core::Interface::as_raw(self), pf11d as _).ok() } } pub unsafe fn GetProfileName(&self) -> windows_core::Result { unsafe { @@ -5081,7 +5081,7 @@ impl IDot11AdHocNetwork { unsafe { (windows_core::Interface::vtable(self).DeleteProfile)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetSignalQuality(&self, pustrengthvalue: *mut u32, pustrengthmax: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSignalQuality)(windows_core::Interface::as_raw(self), core::mem::transmute(pustrengthvalue), core::mem::transmute(pustrengthmax)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSignalQuality)(windows_core::Interface::as_raw(self), pustrengthvalue as _, pustrengthmax as _).ok() } } pub unsafe fn GetSecuritySetting(&self) -> windows_core::Result { unsafe { @@ -5090,10 +5090,10 @@ impl IDot11AdHocNetwork { } } pub unsafe fn GetContextGuid(&self, pcontextguid: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetContextGuid)(windows_core::Interface::as_raw(self), core::mem::transmute(pcontextguid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetContextGuid)(windows_core::Interface::as_raw(self), pcontextguid as _).ok() } } pub unsafe fn GetSignature(&self, psignature: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSignature)(windows_core::Interface::as_raw(self), core::mem::transmute(psignature)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSignature)(windows_core::Interface::as_raw(self), psignature as _).ok() } } pub unsafe fn GetInterface(&self) -> windows_core::Result { unsafe { @@ -5309,10 +5309,10 @@ windows_core::imp::define_interface!(IDot11AdHocSecuritySettings, IDot11AdHocSec windows_core::imp::interface_hierarchy!(IDot11AdHocSecuritySettings, windows_core::IUnknown); impl IDot11AdHocSecuritySettings { pub unsafe fn GetDot11AuthAlgorithm(&self, pauth: *mut DOT11_ADHOC_AUTH_ALGORITHM) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDot11AuthAlgorithm)(windows_core::Interface::as_raw(self), core::mem::transmute(pauth)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDot11AuthAlgorithm)(windows_core::Interface::as_raw(self), pauth as _).ok() } } pub unsafe fn GetDot11CipherAlgorithm(&self, pcipher: *mut DOT11_ADHOC_CIPHER_ALGORITHM) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDot11CipherAlgorithm)(windows_core::Interface::as_raw(self), core::mem::transmute(pcipher)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDot11CipherAlgorithm)(windows_core::Interface::as_raw(self), pcipher as _).ok() } } } #[repr(C)] @@ -5354,7 +5354,7 @@ windows_core::imp::define_interface!(IEnumDot11AdHocInterfaces, IEnumDot11AdHocI windows_core::imp::interface_hierarchy!(IEnumDot11AdHocInterfaces, windows_core::IUnknown); impl IEnumDot11AdHocInterfaces { pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -5432,7 +5432,7 @@ windows_core::imp::define_interface!(IEnumDot11AdHocNetworks, IEnumDot11AdHocNet windows_core::imp::interface_hierarchy!(IEnumDot11AdHocNetworks, windows_core::IUnknown); impl IEnumDot11AdHocNetworks { pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -5510,7 +5510,7 @@ windows_core::imp::define_interface!(IEnumDot11AdHocSecuritySettings, IEnumDot11 windows_core::imp::interface_hierarchy!(IEnumDot11AdHocSecuritySettings, windows_core::IUnknown); impl IEnumDot11AdHocSecuritySettings { pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsConnectNow/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsConnectNow/mod.rs index 12314e3e7e..799e31d914 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsConnectNow/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsConnectNow/mod.rs @@ -56,7 +56,7 @@ impl IWCNDevice { unsafe { (windows_core::Interface::vtable(self).Connect)(windows_core::Interface::as_raw(self), pnotify.param().abi()).ok() } } pub unsafe fn GetAttribute(&self, attributetype: WCN_ATTRIBUTE_TYPE, pbbuffer: &mut [u8], pdwbufferused: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAttribute)(windows_core::Interface::as_raw(self), attributetype, pbbuffer.len().try_into().unwrap(), core::mem::transmute(pbbuffer.as_ptr()), core::mem::transmute(pdwbufferused)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAttribute)(windows_core::Interface::as_raw(self), attributetype, pbbuffer.len().try_into().unwrap(), core::mem::transmute(pbbuffer.as_ptr()), pdwbufferused as _).ok() } } pub unsafe fn GetIntegerAttribute(&self, attributetype: WCN_ATTRIBUTE_TYPE) -> windows_core::Result { unsafe { @@ -77,7 +77,7 @@ impl IWCNDevice { unsafe { (windows_core::Interface::vtable(self).SetNetworkProfile)(windows_core::Interface::as_raw(self), pszprofilexml.param().abi()).ok() } } pub unsafe fn GetVendorExtension(&self, pvendorextspec: *const WCN_VENDOR_EXTENSION_SPEC, pbbuffer: &mut [u8], pdwbufferused: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVendorExtension)(windows_core::Interface::as_raw(self), pvendorextspec, pbbuffer.len().try_into().unwrap(), core::mem::transmute(pbbuffer.as_ptr()), core::mem::transmute(pdwbufferused)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVendorExtension)(windows_core::Interface::as_raw(self), pvendorextspec, pbbuffer.len().try_into().unwrap(), core::mem::transmute(pbbuffer.as_ptr()), pdwbufferused as _).ok() } } pub unsafe fn SetVendorExtension(&self, pvendorextspec: *const WCN_VENDOR_EXTENSION_SPEC, pbbuffer: &[u8]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetVendorExtension)(windows_core::Interface::as_raw(self), pvendorextspec, pbbuffer.len().try_into().unwrap(), core::mem::transmute(pbbuffer.as_ptr())).ok() } 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 46c1f2c200..f861d17e25 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsConnectionManager/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsConnectionManager/mod.rs @@ -31,7 +31,7 @@ pub unsafe fn OnDemandRegisterNotification(callback: ONDEMAND_NOTIFICATION_CALLB 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); unsafe { let mut result__ = core::mem::zeroed(); - OnDemandRegisterNotification(callback, core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + OnDemandRegisterNotification(callback, callbackcontext.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -42,12 +42,12 @@ pub unsafe fn OnDemandUnRegisterNotification(registrationhandle: super::super::F #[inline] pub unsafe fn WcmFreeMemory(pmemory: *mut core::ffi::c_void) { windows_targets::link!("wcmapi.dll" "system" fn WcmFreeMemory(pmemory : *mut core::ffi::c_void)); - unsafe { WcmFreeMemory(core::mem::transmute(pmemory)) } + unsafe { WcmFreeMemory(pmemory as _) } } #[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); - unsafe { WcmGetProfileList(core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppprofilelist)) } + unsafe { WcmGetProfileList(preserved.unwrap_or(core::mem::zeroed()) as _, ppprofilelist as _) } } #[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 @@ -55,12 +55,12 @@ 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); - unsafe { WcmQueryProperty(core::mem::transmute(pinterface.unwrap_or(core::mem::zeroed())), strprofilename.param().abi(), property, core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwdatasize), core::mem::transmute(ppdata)) } + unsafe { WcmQueryProperty(pinterface.unwrap_or(core::mem::zeroed()) as _, strprofilename.param().abi(), property, preserved.unwrap_or(core::mem::zeroed()) as _, pdwdatasize as _, ppdata as _) } } #[inline] pub unsafe fn WcmSetProfileList(pprofilelist: *const WCM_PROFILE_INFO_LIST, dwposition: u32, fignoreunknownprofiles: bool, preserved: Option<*const core::ffi::c_void>) -> u32 { 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); - unsafe { WcmSetProfileList(pprofilelist, dwposition, fignoreunknownprofiles.into(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } + unsafe { WcmSetProfileList(pprofilelist, dwposition, fignoreunknownprofiles.into(), preserved.unwrap_or(core::mem::zeroed()) as _) } } #[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 +68,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); - unsafe { WcmSetProperty(core::mem::transmute(pinterface.unwrap_or(core::mem::zeroed())), strprofilename.param().abi(), 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()))) } + unsafe { WcmSetProperty(pinterface.unwrap_or(core::mem::zeroed()) as _, strprofilename.param().abi(), property, preserved.unwrap_or(core::mem::zeroed()) as _, 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 b40bb18cb2..e9028a4031 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsFilteringPlatform/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsFilteringPlatform/mod.rs @@ -2,12 +2,12 @@ #[inline] 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); - unsafe { FwpmCalloutAdd0(enginehandle, callout, core::mem::transmute(sd.unwrap_or(core::mem::zeroed())), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))) } + unsafe { FwpmCalloutAdd0(enginehandle, callout, sd.unwrap_or(core::mem::zeroed()) as _, id.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { FwpmCalloutCreateEnumHandle0(enginehandle, core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } + unsafe { FwpmCalloutCreateEnumHandle0(enginehandle, enumtemplate.unwrap_or(core::mem::zeroed()) as _, enumhandle as _) } } #[inline] pub unsafe fn FwpmCalloutDeleteById0(enginehandle: super::super::Foundation::HANDLE, id: u32) -> u32 { @@ -22,54 +22,54 @@ pub unsafe fn FwpmCalloutDeleteByKey0(enginehandle: super::super::Foundation::HA #[inline] 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); - unsafe { FwpmCalloutDestroyEnumHandle0(enginehandle, core::mem::transmute(enumhandle)) } + unsafe { FwpmCalloutDestroyEnumHandle0(enginehandle, enumhandle as _) } } #[inline] 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); - unsafe { FwpmCalloutEnum0(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmCalloutEnum0(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[inline] 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); - unsafe { FwpmCalloutGetById0(enginehandle, id, core::mem::transmute(callout)) } + unsafe { FwpmCalloutGetById0(enginehandle, id, callout as _) } } #[inline] 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); - unsafe { FwpmCalloutGetByKey0(enginehandle, key, core::mem::transmute(callout)) } + unsafe { FwpmCalloutGetByKey0(enginehandle, key, callout as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmCalloutGetSecurityInfoByKey0(enginehandle, core::mem::transmute(key.unwrap_or(core::mem::zeroed())), securityinfo, core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } + unsafe { FwpmCalloutGetSecurityInfoByKey0(enginehandle, key.unwrap_or(core::mem::zeroed()) as _, securityinfo, sidowner as _, sidgroup as _, dacl as _, sacl as _, securitydescriptor as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmCalloutSetSecurityInfoByKey0(enginehandle, core::mem::transmute(key.unwrap_or(core::mem::zeroed())), 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()))) } + unsafe { FwpmCalloutSetSecurityInfoByKey0(enginehandle, key.unwrap_or(core::mem::zeroed()) as _, securityinfo, sidowner.unwrap_or(core::mem::zeroed()) as _, sidgroup.unwrap_or(core::mem::zeroed()) as _, dacl.unwrap_or(core::mem::zeroed()) as _, sacl.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { FwpmCalloutSubscribeChanges0(enginehandle, subscription, callback, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(changehandle)) } + unsafe { FwpmCalloutSubscribeChanges0(enginehandle, subscription, callback, context.unwrap_or(core::mem::zeroed()) as _, changehandle as _) } } #[inline] 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); - unsafe { FwpmCalloutSubscriptionsGet0(enginehandle, core::mem::transmute(entries), core::mem::transmute(numentries)) } + unsafe { FwpmCalloutSubscriptionsGet0(enginehandle, entries as _, numentries as _) } } #[inline] 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); - unsafe { FwpmCalloutUnsubscribeChanges0(enginehandle, core::mem::transmute(changehandle)) } + unsafe { FwpmCalloutUnsubscribeChanges0(enginehandle, changehandle as _) } } #[inline] 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); - unsafe { FwpmConnectionCreateEnumHandle0(enginehandle, core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } + unsafe { FwpmConnectionCreateEnumHandle0(enginehandle, enumtemplate.unwrap_or(core::mem::zeroed()) as _, enumhandle as _) } } #[inline] pub unsafe fn FwpmConnectionDestroyEnumHandle0(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE) -> u32 { @@ -79,39 +79,39 @@ pub unsafe fn FwpmConnectionDestroyEnumHandle0(enginehandle: super::super::Found #[inline] 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); - unsafe { FwpmConnectionEnum0(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmConnectionEnum0(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[inline] 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); - unsafe { FwpmConnectionGetById0(enginehandle, id, core::mem::transmute(connection)) } + unsafe { FwpmConnectionGetById0(enginehandle, id, connection as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmConnectionGetSecurityInfo0(enginehandle, securityinfo, core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } + unsafe { FwpmConnectionGetSecurityInfo0(enginehandle, securityinfo, sidowner as _, sidgroup as _, dacl as _, sacl as _, securitydescriptor as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmConnectionSetSecurityInfo0(enginehandle, 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()))) } + unsafe { FwpmConnectionSetSecurityInfo0(enginehandle, securityinfo, sidowner.unwrap_or(core::mem::zeroed()) as _, sidgroup.unwrap_or(core::mem::zeroed()) as _, dacl.unwrap_or(core::mem::zeroed()) as _, sacl.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { FwpmConnectionSubscribe0(enginehandle, subscription, callback, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(eventshandle)) } + unsafe { FwpmConnectionSubscribe0(enginehandle, subscription, callback, context.unwrap_or(core::mem::zeroed()) as _, eventshandle as _) } } #[inline] 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); - unsafe { FwpmConnectionUnsubscribe0(enginehandle, core::mem::transmute(eventshandle)) } + unsafe { FwpmConnectionUnsubscribe0(enginehandle, eventshandle as _) } } #[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); - unsafe { FwpmDynamicKeywordSubscribe0(flags, callback, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(subscriptionhandle)) } + unsafe { FwpmDynamicKeywordSubscribe0(flags, callback, context.unwrap_or(core::mem::zeroed()) as _, subscriptionhandle as _) } } #[inline] pub unsafe fn FwpmDynamicKeywordUnsubscribe0(subscriptionhandle: super::super::Foundation::HANDLE) -> u32 { @@ -121,19 +121,19 @@ pub unsafe fn FwpmDynamicKeywordUnsubscribe0(subscriptionhandle: super::super::F #[inline] pub unsafe fn FwpmEngineClose0(enginehandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmEngineClose0(enginehandle : super::super::Foundation:: HANDLE) -> u32); - unsafe { FwpmEngineClose0(core::mem::transmute(enginehandle)) } + unsafe { FwpmEngineClose0(enginehandle as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmEngineGetOption0(enginehandle, option, core::mem::transmute(value)) } + unsafe { FwpmEngineGetOption0(enginehandle, option, value as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmEngineGetSecurityInfo0(enginehandle, securityinfo, core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } + unsafe { FwpmEngineGetSecurityInfo0(enginehandle, securityinfo, sidowner as _, sidgroup as _, dacl as _, sacl as _, securitydescriptor as _) } } #[cfg(all(feature = "Win32_Security", feature = "Win32_System_Rpc"))] #[inline] @@ -142,7 +142,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmEngineOpen0(servername : windows_core::PCWSTR, authnservice : u32, authidentity : *const super::super::System::Rpc:: SEC_WINNT_AUTH_IDENTITY_W, session : *const FWPM_SESSION0, enginehandle : *mut super::super::Foundation:: HANDLE) -> u32); - unsafe { FwpmEngineOpen0(servername.param().abi(), authnservice, core::mem::transmute(authidentity.unwrap_or(core::mem::zeroed())), core::mem::transmute(session.unwrap_or(core::mem::zeroed())), core::mem::transmute(enginehandle)) } + unsafe { FwpmEngineOpen0(servername.param().abi(), authnservice, authidentity.unwrap_or(core::mem::zeroed()) as _, session.unwrap_or(core::mem::zeroed()) as _, enginehandle as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -154,19 +154,19 @@ pub unsafe fn FwpmEngineSetOption0(enginehandle: super::super::Foundation::HANDL #[inline] 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); - unsafe { FwpmEngineSetSecurityInfo0(enginehandle, 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()))) } + unsafe { FwpmEngineSetSecurityInfo0(enginehandle, securityinfo, sidowner.unwrap_or(core::mem::zeroed()) as _, sidgroup.unwrap_or(core::mem::zeroed()) as _, dacl.unwrap_or(core::mem::zeroed()) as _, sacl.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmFilterAdd0(enginehandle, filter, core::mem::transmute(sd.unwrap_or(core::mem::zeroed())), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))) } + unsafe { FwpmFilterAdd0(enginehandle, filter, sd.unwrap_or(core::mem::zeroed()) as _, id.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmFilterCreateEnumHandle0(enginehandle, core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } + unsafe { FwpmFilterCreateEnumHandle0(enginehandle, enumtemplate.unwrap_or(core::mem::zeroed()) as _, enumhandle as _) } } #[inline] pub unsafe fn FwpmFilterDeleteById0(enginehandle: super::super::Foundation::HANDLE, id: u64) -> u32 { @@ -181,59 +181,59 @@ pub unsafe fn FwpmFilterDeleteByKey0(enginehandle: super::super::Foundation::HAN #[inline] 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); - unsafe { FwpmFilterDestroyEnumHandle0(enginehandle, core::mem::transmute(enumhandle)) } + unsafe { FwpmFilterDestroyEnumHandle0(enginehandle, enumhandle as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmFilterEnum0(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmFilterEnum0(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmFilterGetById0(enginehandle, id, core::mem::transmute(filter)) } + unsafe { FwpmFilterGetById0(enginehandle, id, filter as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmFilterGetByKey0(enginehandle, key, core::mem::transmute(filter)) } + unsafe { FwpmFilterGetByKey0(enginehandle, key, filter as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmFilterGetSecurityInfoByKey0(enginehandle, core::mem::transmute(key.unwrap_or(core::mem::zeroed())), securityinfo, core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } + unsafe { FwpmFilterGetSecurityInfoByKey0(enginehandle, key.unwrap_or(core::mem::zeroed()) as _, securityinfo, sidowner as _, sidgroup as _, dacl as _, sacl as _, securitydescriptor as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmFilterSetSecurityInfoByKey0(enginehandle, core::mem::transmute(key.unwrap_or(core::mem::zeroed())), 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()))) } + unsafe { FwpmFilterSetSecurityInfoByKey0(enginehandle, key.unwrap_or(core::mem::zeroed()) as _, securityinfo, sidowner.unwrap_or(core::mem::zeroed()) as _, sidgroup.unwrap_or(core::mem::zeroed()) as _, dacl.unwrap_or(core::mem::zeroed()) as _, sacl.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmFilterSubscribeChanges0(enginehandle, subscription, callback, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(changehandle)) } + unsafe { FwpmFilterSubscribeChanges0(enginehandle, subscription, callback, context.unwrap_or(core::mem::zeroed()) as _, changehandle as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmFilterSubscriptionsGet0(enginehandle, core::mem::transmute(entries), core::mem::transmute(numentries)) } + unsafe { FwpmFilterSubscriptionsGet0(enginehandle, entries as _, numentries as _) } } #[inline] 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); - unsafe { FwpmFilterUnsubscribeChanges0(enginehandle, core::mem::transmute(changehandle)) } + unsafe { FwpmFilterUnsubscribeChanges0(enginehandle, changehandle as _) } } #[inline] pub unsafe fn FwpmFreeMemory0(p: *mut *mut core::ffi::c_void) { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmFreeMemory0(p : *mut *mut core::ffi::c_void)); - unsafe { FwpmFreeMemory0(core::mem::transmute(p)) } + unsafe { FwpmFreeMemory0(p as _) } } #[inline] pub unsafe fn FwpmGetAppIdFromFileName0(filename: P0, appid: *mut *mut FWP_BYTE_BLOB) -> u32 @@ -241,31 +241,31 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmGetAppIdFromFileName0(filename : windows_core::PCWSTR, appid : *mut *mut FWP_BYTE_BLOB) -> u32); - unsafe { FwpmGetAppIdFromFileName0(filename.param().abi(), core::mem::transmute(appid)) } + unsafe { FwpmGetAppIdFromFileName0(filename.param().abi(), appid as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmIPsecTunnelAdd0(enginehandle, flags, core::mem::transmute(mainmodepolicy.unwrap_or(core::mem::zeroed())), tunnelpolicy, filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), core::mem::transmute(sd.unwrap_or(core::mem::zeroed()))) } + unsafe { FwpmIPsecTunnelAdd0(enginehandle, flags, mainmodepolicy.unwrap_or(core::mem::zeroed()) as _, tunnelpolicy, filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), sd.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmIPsecTunnelAdd1(enginehandle, flags, core::mem::transmute(mainmodepolicy.unwrap_or(core::mem::zeroed())), 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()))) } + unsafe { FwpmIPsecTunnelAdd1(enginehandle, flags, mainmodepolicy.unwrap_or(core::mem::zeroed()) as _, tunnelpolicy, filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), keymodkey.unwrap_or(core::mem::zeroed()) as _, sd.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmIPsecTunnelAdd2(enginehandle, flags, core::mem::transmute(mainmodepolicy.unwrap_or(core::mem::zeroed())), 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()))) } + unsafe { FwpmIPsecTunnelAdd2(enginehandle, flags, mainmodepolicy.unwrap_or(core::mem::zeroed()) as _, tunnelpolicy, filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), keymodkey.unwrap_or(core::mem::zeroed()) as _, sd.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmIPsecTunnelAdd3(enginehandle, flags, core::mem::transmute(mainmodepolicy.unwrap_or(core::mem::zeroed())), 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()))) } + unsafe { FwpmIPsecTunnelAdd3(enginehandle, flags, mainmodepolicy.unwrap_or(core::mem::zeroed()) as _, tunnelpolicy, filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), keymodkey.unwrap_or(core::mem::zeroed()) as _, sd.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FwpmIPsecTunnelDeleteByKey0(enginehandle: super::super::Foundation::HANDLE, key: *const windows_core::GUID) -> u32 { @@ -275,174 +275,174 @@ pub unsafe fn FwpmIPsecTunnelDeleteByKey0(enginehandle: super::super::Foundation #[inline] 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); - unsafe { FwpmLayerCreateEnumHandle0(enginehandle, core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } + unsafe { FwpmLayerCreateEnumHandle0(enginehandle, enumtemplate.unwrap_or(core::mem::zeroed()) as _, enumhandle as _) } } #[inline] 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); - unsafe { FwpmLayerDestroyEnumHandle0(enginehandle, core::mem::transmute(enumhandle)) } + unsafe { FwpmLayerDestroyEnumHandle0(enginehandle, enumhandle as _) } } #[inline] 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); - unsafe { FwpmLayerEnum0(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmLayerEnum0(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[inline] 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); - unsafe { FwpmLayerGetById0(enginehandle, id, core::mem::transmute(layer)) } + unsafe { FwpmLayerGetById0(enginehandle, id, layer as _) } } #[inline] 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); - unsafe { FwpmLayerGetByKey0(enginehandle, key, core::mem::transmute(layer)) } + unsafe { FwpmLayerGetByKey0(enginehandle, key, layer as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmLayerGetSecurityInfoByKey0(enginehandle, core::mem::transmute(key.unwrap_or(core::mem::zeroed())), securityinfo, core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } + unsafe { FwpmLayerGetSecurityInfoByKey0(enginehandle, key.unwrap_or(core::mem::zeroed()) as _, securityinfo, sidowner as _, sidgroup as _, dacl as _, sacl as _, securitydescriptor as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmLayerSetSecurityInfoByKey0(enginehandle, core::mem::transmute(key.unwrap_or(core::mem::zeroed())), 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()))) } + unsafe { FwpmLayerSetSecurityInfoByKey0(enginehandle, key.unwrap_or(core::mem::zeroed()) as _, securityinfo, sidowner.unwrap_or(core::mem::zeroed()) as _, sidgroup.unwrap_or(core::mem::zeroed()) as _, dacl.unwrap_or(core::mem::zeroed()) as _, sacl.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmNetEventCreateEnumHandle0(enginehandle, core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } + unsafe { FwpmNetEventCreateEnumHandle0(enginehandle, enumtemplate.unwrap_or(core::mem::zeroed()) as _, enumhandle as _) } } #[inline] 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); - unsafe { FwpmNetEventDestroyEnumHandle0(enginehandle, core::mem::transmute(enumhandle)) } + unsafe { FwpmNetEventDestroyEnumHandle0(enginehandle, enumhandle as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmNetEventEnum0(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmNetEventEnum0(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmNetEventEnum1(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmNetEventEnum1(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmNetEventEnum2(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmNetEventEnum2(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmNetEventEnum3(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmNetEventEnum3(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmNetEventEnum4(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmNetEventEnum4(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmNetEventEnum5(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmNetEventEnum5(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmNetEventSubscribe0(enginehandle, subscription, callback, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(eventshandle)) } + unsafe { FwpmNetEventSubscribe0(enginehandle, subscription, callback, context.unwrap_or(core::mem::zeroed()) as _, eventshandle as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmNetEventSubscribe1(enginehandle, subscription, callback, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(eventshandle)) } + unsafe { FwpmNetEventSubscribe1(enginehandle, subscription, callback, context.unwrap_or(core::mem::zeroed()) as _, eventshandle as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmNetEventSubscribe2(enginehandle, subscription, callback, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(eventshandle)) } + unsafe { FwpmNetEventSubscribe2(enginehandle, subscription, callback, context.unwrap_or(core::mem::zeroed()) as _, eventshandle as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmNetEventSubscribe3(enginehandle, subscription, callback, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(eventshandle)) } + unsafe { FwpmNetEventSubscribe3(enginehandle, subscription, callback, context.unwrap_or(core::mem::zeroed()) as _, eventshandle as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmNetEventSubscribe4(enginehandle, subscription, callback, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(eventshandle)) } + unsafe { FwpmNetEventSubscribe4(enginehandle, subscription, callback, context.unwrap_or(core::mem::zeroed()) as _, eventshandle as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmNetEventSubscriptionsGet0(enginehandle, core::mem::transmute(entries), core::mem::transmute(numentries)) } + unsafe { FwpmNetEventSubscriptionsGet0(enginehandle, entries as _, numentries as _) } } #[inline] 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); - unsafe { FwpmNetEventUnsubscribe0(enginehandle, core::mem::transmute(eventshandle)) } + unsafe { FwpmNetEventUnsubscribe0(enginehandle, eventshandle as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmNetEventsGetSecurityInfo0(enginehandle, securityinfo, core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } + unsafe { FwpmNetEventsGetSecurityInfo0(enginehandle, securityinfo, sidowner as _, sidgroup as _, dacl as _, sacl as _, securitydescriptor as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmNetEventsSetSecurityInfo0(enginehandle, 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()))) } + unsafe { FwpmNetEventsSetSecurityInfo0(enginehandle, securityinfo, sidowner.unwrap_or(core::mem::zeroed()) as _, sidgroup.unwrap_or(core::mem::zeroed()) as _, dacl.unwrap_or(core::mem::zeroed()) as _, sacl.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmProviderAdd0(enginehandle, provider, core::mem::transmute(sd.unwrap_or(core::mem::zeroed()))) } + unsafe { FwpmProviderAdd0(enginehandle, provider, sd.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmProviderContextAdd0(enginehandle, providercontext, core::mem::transmute(sd.unwrap_or(core::mem::zeroed())), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))) } + unsafe { FwpmProviderContextAdd0(enginehandle, providercontext, sd.unwrap_or(core::mem::zeroed()) as _, id.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmProviderContextAdd1(enginehandle, providercontext, core::mem::transmute(sd.unwrap_or(core::mem::zeroed())), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))) } + unsafe { FwpmProviderContextAdd1(enginehandle, providercontext, sd.unwrap_or(core::mem::zeroed()) as _, id.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmProviderContextAdd2(enginehandle, providercontext, core::mem::transmute(sd.unwrap_or(core::mem::zeroed())), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))) } + unsafe { FwpmProviderContextAdd2(enginehandle, providercontext, sd.unwrap_or(core::mem::zeroed()) as _, id.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmProviderContextAdd3(enginehandle, providercontext, core::mem::transmute(sd.unwrap_or(core::mem::zeroed())), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))) } + unsafe { FwpmProviderContextAdd3(enginehandle, providercontext, sd.unwrap_or(core::mem::zeroed()) as _, id.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { FwpmProviderContextCreateEnumHandle0(enginehandle, core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } + unsafe { FwpmProviderContextCreateEnumHandle0(enginehandle, enumtemplate.unwrap_or(core::mem::zeroed()) as _, enumhandle as _) } } #[inline] pub unsafe fn FwpmProviderContextDeleteById0(enginehandle: super::super::Foundation::HANDLE, id: u64) -> u32 { @@ -457,111 +457,111 @@ pub unsafe fn FwpmProviderContextDeleteByKey0(enginehandle: super::super::Founda #[inline] 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); - unsafe { FwpmProviderContextDestroyEnumHandle0(enginehandle, core::mem::transmute(enumhandle)) } + unsafe { FwpmProviderContextDestroyEnumHandle0(enginehandle, enumhandle as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmProviderContextEnum0(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmProviderContextEnum0(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmProviderContextEnum1(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmProviderContextEnum1(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmProviderContextEnum2(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmProviderContextEnum2(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmProviderContextEnum3(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmProviderContextEnum3(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmProviderContextGetById0(enginehandle, id, core::mem::transmute(providercontext)) } + unsafe { FwpmProviderContextGetById0(enginehandle, id, providercontext as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmProviderContextGetById1(enginehandle, id, core::mem::transmute(providercontext)) } + unsafe { FwpmProviderContextGetById1(enginehandle, id, providercontext as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmProviderContextGetById2(enginehandle, id, core::mem::transmute(providercontext)) } + unsafe { FwpmProviderContextGetById2(enginehandle, id, providercontext as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmProviderContextGetById3(enginehandle, id, core::mem::transmute(providercontext)) } + unsafe { FwpmProviderContextGetById3(enginehandle, id, providercontext as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmProviderContextGetByKey0(enginehandle, key, core::mem::transmute(providercontext)) } + unsafe { FwpmProviderContextGetByKey0(enginehandle, key, providercontext as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmProviderContextGetByKey1(enginehandle, key, core::mem::transmute(providercontext)) } + unsafe { FwpmProviderContextGetByKey1(enginehandle, key, providercontext as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmProviderContextGetByKey2(enginehandle, key, core::mem::transmute(providercontext)) } + unsafe { FwpmProviderContextGetByKey2(enginehandle, key, providercontext as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmProviderContextGetByKey3(enginehandle, key, core::mem::transmute(providercontext)) } + unsafe { FwpmProviderContextGetByKey3(enginehandle, key, providercontext as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmProviderContextGetSecurityInfoByKey0(enginehandle, core::mem::transmute(key.unwrap_or(core::mem::zeroed())), securityinfo, core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } + unsafe { FwpmProviderContextGetSecurityInfoByKey0(enginehandle, key.unwrap_or(core::mem::zeroed()) as _, securityinfo, sidowner as _, sidgroup as _, dacl as _, sacl as _, securitydescriptor as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmProviderContextSetSecurityInfoByKey0(enginehandle, core::mem::transmute(key.unwrap_or(core::mem::zeroed())), 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()))) } + unsafe { FwpmProviderContextSetSecurityInfoByKey0(enginehandle, key.unwrap_or(core::mem::zeroed()) as _, securityinfo, sidowner.unwrap_or(core::mem::zeroed()) as _, sidgroup.unwrap_or(core::mem::zeroed()) as _, dacl.unwrap_or(core::mem::zeroed()) as _, sacl.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { FwpmProviderContextSubscribeChanges0(enginehandle, subscription, callback, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(changehandle)) } + unsafe { FwpmProviderContextSubscribeChanges0(enginehandle, subscription, callback, context.unwrap_or(core::mem::zeroed()) as _, changehandle as _) } } #[inline] 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); - unsafe { FwpmProviderContextSubscriptionsGet0(enginehandle, core::mem::transmute(entries), core::mem::transmute(numentries)) } + unsafe { FwpmProviderContextSubscriptionsGet0(enginehandle, entries as _, numentries as _) } } #[inline] 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); - unsafe { FwpmProviderContextUnsubscribeChanges0(enginehandle, core::mem::transmute(changehandle)) } + unsafe { FwpmProviderContextUnsubscribeChanges0(enginehandle, changehandle as _) } } #[inline] 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); - unsafe { FwpmProviderCreateEnumHandle0(enginehandle, core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } + unsafe { FwpmProviderCreateEnumHandle0(enginehandle, enumtemplate.unwrap_or(core::mem::zeroed()) as _, enumhandle as _) } } #[inline] pub unsafe fn FwpmProviderDeleteByKey0(enginehandle: super::super::Foundation::HANDLE, key: *const windows_core::GUID) -> u32 { @@ -571,71 +571,71 @@ pub unsafe fn FwpmProviderDeleteByKey0(enginehandle: super::super::Foundation::H #[inline] 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); - unsafe { FwpmProviderDestroyEnumHandle0(enginehandle, core::mem::transmute(enumhandle)) } + unsafe { FwpmProviderDestroyEnumHandle0(enginehandle, enumhandle as _) } } #[inline] 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); - unsafe { FwpmProviderEnum0(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmProviderEnum0(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[inline] 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); - unsafe { FwpmProviderGetByKey0(enginehandle, key, core::mem::transmute(provider)) } + unsafe { FwpmProviderGetByKey0(enginehandle, key, provider as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmProviderGetSecurityInfoByKey0(enginehandle, core::mem::transmute(key.unwrap_or(core::mem::zeroed())), securityinfo, core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } + unsafe { FwpmProviderGetSecurityInfoByKey0(enginehandle, key.unwrap_or(core::mem::zeroed()) as _, securityinfo, sidowner as _, sidgroup as _, dacl as _, sacl as _, securitydescriptor as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmProviderSetSecurityInfoByKey0(enginehandle, core::mem::transmute(key.unwrap_or(core::mem::zeroed())), 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()))) } + unsafe { FwpmProviderSetSecurityInfoByKey0(enginehandle, key.unwrap_or(core::mem::zeroed()) as _, securityinfo, sidowner.unwrap_or(core::mem::zeroed()) as _, sidgroup.unwrap_or(core::mem::zeroed()) as _, dacl.unwrap_or(core::mem::zeroed()) as _, sacl.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { FwpmProviderSubscribeChanges0(enginehandle, subscription, callback, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(changehandle)) } + unsafe { FwpmProviderSubscribeChanges0(enginehandle, subscription, callback, context.unwrap_or(core::mem::zeroed()) as _, changehandle as _) } } #[inline] 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); - unsafe { FwpmProviderSubscriptionsGet0(enginehandle, core::mem::transmute(entries), core::mem::transmute(numentries)) } + unsafe { FwpmProviderSubscriptionsGet0(enginehandle, entries as _, numentries as _) } } #[inline] 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); - unsafe { FwpmProviderUnsubscribeChanges0(enginehandle, core::mem::transmute(changehandle)) } + unsafe { FwpmProviderUnsubscribeChanges0(enginehandle, changehandle as _) } } #[inline] 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); - unsafe { FwpmSessionCreateEnumHandle0(enginehandle, core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } + unsafe { FwpmSessionCreateEnumHandle0(enginehandle, enumtemplate.unwrap_or(core::mem::zeroed()) as _, enumhandle as _) } } #[inline] 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); - unsafe { FwpmSessionDestroyEnumHandle0(enginehandle, core::mem::transmute(enumhandle)) } + unsafe { FwpmSessionDestroyEnumHandle0(enginehandle, enumhandle as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmSessionEnum0(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmSessionEnum0(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmSubLayerAdd0(enginehandle, sublayer, core::mem::transmute(sd.unwrap_or(core::mem::zeroed()))) } + unsafe { FwpmSubLayerAdd0(enginehandle, sublayer, sd.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { FwpmSubLayerCreateEnumHandle0(enginehandle, core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } + unsafe { FwpmSubLayerCreateEnumHandle0(enginehandle, enumtemplate.unwrap_or(core::mem::zeroed()) as _, enumhandle as _) } } #[inline] pub unsafe fn FwpmSubLayerDeleteByKey0(enginehandle: super::super::Foundation::HANDLE, key: *const windows_core::GUID) -> u32 { @@ -645,59 +645,59 @@ pub unsafe fn FwpmSubLayerDeleteByKey0(enginehandle: super::super::Foundation::H #[inline] 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); - unsafe { FwpmSubLayerDestroyEnumHandle0(enginehandle, core::mem::transmute(enumhandle)) } + unsafe { FwpmSubLayerDestroyEnumHandle0(enginehandle, enumhandle as _) } } #[inline] 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); - unsafe { FwpmSubLayerEnum0(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { FwpmSubLayerEnum0(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[inline] 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); - unsafe { FwpmSubLayerGetByKey0(enginehandle, key, core::mem::transmute(sublayer)) } + unsafe { FwpmSubLayerGetByKey0(enginehandle, key, sublayer as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmSubLayerGetSecurityInfoByKey0(enginehandle, core::mem::transmute(key.unwrap_or(core::mem::zeroed())), securityinfo, core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } + unsafe { FwpmSubLayerGetSecurityInfoByKey0(enginehandle, key.unwrap_or(core::mem::zeroed()) as _, securityinfo, sidowner as _, sidgroup as _, dacl as _, sacl as _, securitydescriptor as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmSubLayerSetSecurityInfoByKey0(enginehandle, core::mem::transmute(key.unwrap_or(core::mem::zeroed())), 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()))) } + unsafe { FwpmSubLayerSetSecurityInfoByKey0(enginehandle, key.unwrap_or(core::mem::zeroed()) as _, securityinfo, sidowner.unwrap_or(core::mem::zeroed()) as _, sidgroup.unwrap_or(core::mem::zeroed()) as _, dacl.unwrap_or(core::mem::zeroed()) as _, sacl.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { FwpmSubLayerSubscribeChanges0(enginehandle, subscription, callback, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(changehandle)) } + unsafe { FwpmSubLayerSubscribeChanges0(enginehandle, subscription, callback, context.unwrap_or(core::mem::zeroed()) as _, changehandle as _) } } #[inline] 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); - unsafe { FwpmSubLayerSubscriptionsGet0(enginehandle, core::mem::transmute(entries), core::mem::transmute(numentries)) } + unsafe { FwpmSubLayerSubscriptionsGet0(enginehandle, entries as _, numentries as _) } } #[inline] 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); - unsafe { FwpmSubLayerUnsubscribeChanges0(enginehandle, core::mem::transmute(changehandle)) } + unsafe { FwpmSubLayerUnsubscribeChanges0(enginehandle, changehandle as _) } } #[inline] 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); - unsafe { FwpmSystemPortsGet0(core::mem::transmute(enginehandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(sysports)) } + unsafe { FwpmSystemPortsGet0(enginehandle.unwrap_or(core::mem::zeroed()) as _, sysports as _) } } #[inline] 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); - unsafe { FwpmSystemPortsSubscribe0(core::mem::transmute(enginehandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), callback, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(sysportshandle)) } + unsafe { FwpmSystemPortsSubscribe0(enginehandle.unwrap_or(core::mem::zeroed()) as _, reserved.unwrap_or(core::mem::zeroed()) as _, callback, context.unwrap_or(core::mem::zeroed()) as _, sysportshandle as _) } } #[inline] 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); - unsafe { FwpmSystemPortsUnsubscribe0(core::mem::transmute(enginehandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(sysportshandle)) } + unsafe { FwpmSystemPortsUnsubscribe0(enginehandle.unwrap_or(core::mem::zeroed()) as _, sysportshandle as _) } } #[inline] pub unsafe fn FwpmTransactionAbort0(enginehandle: super::super::Foundation::HANDLE) -> u32 { @@ -717,84 +717,84 @@ pub unsafe fn FwpmTransactionCommit0(enginehandle: super::super::Foundation::HAN #[inline] 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); - unsafe { FwpmvSwitchEventSubscribe0(enginehandle, subscription, callback, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(subscriptionhandle)) } + unsafe { FwpmvSwitchEventSubscribe0(enginehandle, subscription, callback, context.unwrap_or(core::mem::zeroed()) as _, subscriptionhandle as _) } } #[inline] 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); - unsafe { FwpmvSwitchEventUnsubscribe0(enginehandle, core::mem::transmute(subscriptionhandle)) } + unsafe { FwpmvSwitchEventUnsubscribe0(enginehandle, subscriptionhandle as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmvSwitchEventsGetSecurityInfo0(enginehandle, securityinfo, core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } + unsafe { FwpmvSwitchEventsGetSecurityInfo0(enginehandle, securityinfo, sidowner as _, sidgroup as _, dacl as _, sacl as _, securitydescriptor as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { FwpmvSwitchEventsSetSecurityInfo0(enginehandle, 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()))) } + unsafe { FwpmvSwitchEventsSetSecurityInfo0(enginehandle, securityinfo, sidowner.unwrap_or(core::mem::zeroed()) as _, sidgroup.unwrap_or(core::mem::zeroed()) as _, dacl.unwrap_or(core::mem::zeroed()) as _, sacl.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { IPsecDospGetSecurityInfo0(enginehandle, securityinfo, core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } + unsafe { IPsecDospGetSecurityInfo0(enginehandle, securityinfo, sidowner as _, sidgroup as _, dacl as _, sacl as _, securitydescriptor as _) } } #[inline] 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); - unsafe { IPsecDospGetStatistics0(enginehandle, core::mem::transmute(idpstatistics)) } + unsafe { IPsecDospGetStatistics0(enginehandle, idpstatistics as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { IPsecDospSetSecurityInfo0(enginehandle, 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()))) } + unsafe { IPsecDospSetSecurityInfo0(enginehandle, securityinfo, sidowner.unwrap_or(core::mem::zeroed()) as _, sidgroup.unwrap_or(core::mem::zeroed()) as _, dacl.unwrap_or(core::mem::zeroed()) as _, sacl.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { IPsecDospStateCreateEnumHandle0(enginehandle, core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } + unsafe { IPsecDospStateCreateEnumHandle0(enginehandle, enumtemplate.unwrap_or(core::mem::zeroed()) as _, enumhandle as _) } } #[inline] 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); - unsafe { IPsecDospStateDestroyEnumHandle0(enginehandle, core::mem::transmute(enumhandle)) } + unsafe { IPsecDospStateDestroyEnumHandle0(enginehandle, enumhandle as _) } } #[inline] 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); - unsafe { IPsecDospStateEnum0(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentries)) } + unsafe { IPsecDospStateEnum0(enginehandle, enumhandle, numentriesrequested, entries as _, numentries as _) } } #[inline] 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); - unsafe { IPsecGetStatistics0(enginehandle, core::mem::transmute(ipsecstatistics)) } + unsafe { IPsecGetStatistics0(enginehandle, ipsecstatistics as _) } } #[inline] 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); - unsafe { IPsecGetStatistics1(enginehandle, core::mem::transmute(ipsecstatistics)) } + unsafe { IPsecGetStatistics1(enginehandle, ipsecstatistics as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { IPsecKeyManagerAddAndRegister0(enginehandle, keymanager, keymanagercallbacks, core::mem::transmute(keymgmthandle)) } + unsafe { IPsecKeyManagerAddAndRegister0(enginehandle, keymanager, keymanagercallbacks, keymgmthandle as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { IPsecKeyManagerGetSecurityInfoByKey0(enginehandle, core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), securityinfo, core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } + unsafe { IPsecKeyManagerGetSecurityInfoByKey0(enginehandle, reserved.unwrap_or(core::mem::zeroed()) as _, securityinfo, sidowner as _, sidgroup as _, dacl as _, sacl as _, securitydescriptor as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { IPsecKeyManagerSetSecurityInfoByKey0(enginehandle, core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), 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()))) } + unsafe { IPsecKeyManagerSetSecurityInfoByKey0(enginehandle, reserved.unwrap_or(core::mem::zeroed()) as _, securityinfo, sidowner.unwrap_or(core::mem::zeroed()) as _, sidgroup.unwrap_or(core::mem::zeroed()) as _, dacl.unwrap_or(core::mem::zeroed()) as _, sacl.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn IPsecKeyManagerUnregisterAndDelete0(enginehandle: super::super::Foundation::HANDLE, keymgmthandle: super::super::Foundation::HANDLE) -> u32 { @@ -804,7 +804,7 @@ pub unsafe fn IPsecKeyManagerUnregisterAndDelete0(enginehandle: super::super::Fo #[inline] 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); - unsafe { IPsecKeyManagersGet0(enginehandle, core::mem::transmute(entries), core::mem::transmute(numentries)) } + unsafe { IPsecKeyManagersGet0(enginehandle, entries as _, numentries as _) } } #[inline] pub unsafe fn IPsecSaContextAddInbound0(enginehandle: super::super::Foundation::HANDLE, id: u64, inboundbundle: *const IPSEC_SA_BUNDLE0) -> u32 { @@ -829,18 +829,18 @@ pub unsafe fn IPsecSaContextAddOutbound1(enginehandle: super::super::Foundation: #[inline] 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); - unsafe { IPsecSaContextCreate0(enginehandle, outboundtraffic, core::mem::transmute(inboundfilterid.unwrap_or(core::mem::zeroed())), core::mem::transmute(id)) } + unsafe { IPsecSaContextCreate0(enginehandle, outboundtraffic, inboundfilterid.unwrap_or(core::mem::zeroed()) as _, id as _) } } #[inline] 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); - unsafe { IPsecSaContextCreate1(enginehandle, outboundtraffic, core::mem::transmute(virtualiftunnelinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(inboundfilterid.unwrap_or(core::mem::zeroed())), core::mem::transmute(id)) } + unsafe { IPsecSaContextCreate1(enginehandle, outboundtraffic, virtualiftunnelinfo.unwrap_or(core::mem::zeroed()) as _, inboundfilterid.unwrap_or(core::mem::zeroed()) as _, id as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { IPsecSaContextCreateEnumHandle0(enginehandle, core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } + unsafe { IPsecSaContextCreateEnumHandle0(enginehandle, enumtemplate.unwrap_or(core::mem::zeroed()) as _, enumhandle as _) } } #[inline] pub unsafe fn IPsecSaContextDeleteById0(enginehandle: super::super::Foundation::HANDLE, id: u64) -> u32 { @@ -850,19 +850,19 @@ pub unsafe fn IPsecSaContextDeleteById0(enginehandle: super::super::Foundation:: #[inline] 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); - unsafe { IPsecSaContextDestroyEnumHandle0(enginehandle, core::mem::transmute(enumhandle)) } + unsafe { IPsecSaContextDestroyEnumHandle0(enginehandle, enumhandle as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { IPsecSaContextEnum0(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { IPsecSaContextEnum0(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { IPsecSaContextEnum1(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { IPsecSaContextEnum1(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[inline] pub unsafe fn IPsecSaContextExpire0(enginehandle: super::super::Foundation::HANDLE, id: u64) -> u32 { @@ -873,23 +873,23 @@ pub unsafe fn IPsecSaContextExpire0(enginehandle: super::super::Foundation::HAND #[inline] 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); - unsafe { IPsecSaContextGetById0(enginehandle, id, core::mem::transmute(sacontext)) } + unsafe { IPsecSaContextGetById0(enginehandle, id, sacontext as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { IPsecSaContextGetById1(enginehandle, id, core::mem::transmute(sacontext)) } + unsafe { IPsecSaContextGetById1(enginehandle, id, sacontext as _) } } #[inline] 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); - unsafe { IPsecSaContextGetSpi0(enginehandle, id, getspi, core::mem::transmute(inboundspi)) } + unsafe { IPsecSaContextGetSpi0(enginehandle, id, getspi, inboundspi as _) } } #[inline] 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); - unsafe { IPsecSaContextGetSpi1(enginehandle, id, getspi, core::mem::transmute(inboundspi)) } + unsafe { IPsecSaContextGetSpi1(enginehandle, id, getspi, inboundspi as _) } } #[inline] pub unsafe fn IPsecSaContextSetSpi0(enginehandle: super::super::Foundation::HANDLE, id: u64, getspi: *const IPSEC_GETSPI1, inboundspi: u32) -> u32 { @@ -900,18 +900,18 @@ pub unsafe fn IPsecSaContextSetSpi0(enginehandle: super::super::Foundation::HAND #[inline] 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); - unsafe { IPsecSaContextSubscribe0(enginehandle, subscription, callback, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(eventshandle)) } + unsafe { IPsecSaContextSubscribe0(enginehandle, subscription, callback, context.unwrap_or(core::mem::zeroed()) as _, eventshandle as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { IPsecSaContextSubscriptionsGet0(enginehandle, core::mem::transmute(entries), core::mem::transmute(numentries)) } + unsafe { IPsecSaContextSubscriptionsGet0(enginehandle, entries as _, numentries as _) } } #[inline] 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); - unsafe { IPsecSaContextUnsubscribe0(enginehandle, core::mem::transmute(eventshandle)) } + unsafe { IPsecSaContextUnsubscribe0(enginehandle, eventshandle as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -922,64 +922,64 @@ pub unsafe fn IPsecSaContextUpdate0(enginehandle: super::super::Foundation::HAND #[inline] 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); - unsafe { IPsecSaCreateEnumHandle0(enginehandle, core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } + unsafe { IPsecSaCreateEnumHandle0(enginehandle, enumtemplate.unwrap_or(core::mem::zeroed()) as _, enumhandle as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { IPsecSaDbGetSecurityInfo0(enginehandle, securityinfo, core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } + unsafe { IPsecSaDbGetSecurityInfo0(enginehandle, securityinfo, sidowner as _, sidgroup as _, dacl as _, sacl as _, securitydescriptor as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { IPsecSaDbSetSecurityInfo0(enginehandle, 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()))) } + unsafe { IPsecSaDbSetSecurityInfo0(enginehandle, securityinfo, sidowner.unwrap_or(core::mem::zeroed()) as _, sidgroup.unwrap_or(core::mem::zeroed()) as _, dacl.unwrap_or(core::mem::zeroed()) as _, sacl.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { IPsecSaDestroyEnumHandle0(enginehandle, core::mem::transmute(enumhandle)) } + unsafe { IPsecSaDestroyEnumHandle0(enginehandle, enumhandle as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { IPsecSaEnum0(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { IPsecSaEnum0(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { IPsecSaEnum1(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { IPsecSaEnum1(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[inline] 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); - unsafe { IkeextGetStatistics0(enginehandle, core::mem::transmute(ikeextstatistics)) } + unsafe { IkeextGetStatistics0(enginehandle, ikeextstatistics as _) } } #[inline] 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); - unsafe { IkeextGetStatistics1(enginehandle, core::mem::transmute(ikeextstatistics)) } + unsafe { IkeextGetStatistics1(enginehandle, ikeextstatistics as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { IkeextSaCreateEnumHandle0(enginehandle, core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } + unsafe { IkeextSaCreateEnumHandle0(enginehandle, enumtemplate.unwrap_or(core::mem::zeroed()) as _, enumhandle as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { IkeextSaDbGetSecurityInfo0(enginehandle, securityinfo, core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } + unsafe { IkeextSaDbGetSecurityInfo0(enginehandle, securityinfo, sidowner as _, sidgroup as _, dacl as _, sacl as _, securitydescriptor as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { IkeextSaDbSetSecurityInfo0(enginehandle, 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()))) } + unsafe { IkeextSaDbSetSecurityInfo0(enginehandle, securityinfo, sidowner.unwrap_or(core::mem::zeroed()) as _, sidgroup.unwrap_or(core::mem::zeroed()) as _, dacl.unwrap_or(core::mem::zeroed()) as _, sacl.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn IkeextSaDeleteById0(enginehandle: super::super::Foundation::HANDLE, id: u64) -> u32 { @@ -989,37 +989,37 @@ pub unsafe fn IkeextSaDeleteById0(enginehandle: super::super::Foundation::HANDLE #[inline] 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); - unsafe { IkeextSaDestroyEnumHandle0(enginehandle, core::mem::transmute(enumhandle)) } + unsafe { IkeextSaDestroyEnumHandle0(enginehandle, enumhandle as _) } } #[inline] 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); - unsafe { IkeextSaEnum0(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { IkeextSaEnum0(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[inline] 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); - unsafe { IkeextSaEnum1(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { IkeextSaEnum1(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[inline] 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); - unsafe { IkeextSaEnum2(enginehandle, enumhandle, numentriesrequested, core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } + unsafe { IkeextSaEnum2(enginehandle, enumhandle, numentriesrequested, entries as _, numentriesreturned as _) } } #[inline] 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); - unsafe { IkeextSaGetById0(enginehandle, id, core::mem::transmute(sa)) } + unsafe { IkeextSaGetById0(enginehandle, id, sa as _) } } #[inline] 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); - unsafe { IkeextSaGetById1(enginehandle, id, core::mem::transmute(salookupcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(sa)) } + unsafe { IkeextSaGetById1(enginehandle, id, salookupcontext.unwrap_or(core::mem::zeroed()) as _, sa as _) } } #[inline] 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); - unsafe { IkeextSaGetById2(enginehandle, id, core::mem::transmute(salookupcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(sa)) } + unsafe { IkeextSaGetById2(enginehandle, id, salookupcontext.unwrap_or(core::mem::zeroed()) as _, sa as _) } } #[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 974c385b49..6a8f72e4bf 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsFirewall/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsFirewall/mod.rs @@ -1,7 +1,7 @@ #[inline] pub unsafe fn NcFreeNetconProperties(pprops: *mut NETCON_PROPERTIES) { windows_targets::link!("netshell.dll" "system" fn NcFreeNetconProperties(pprops : *mut NETCON_PROPERTIES)); - unsafe { NcFreeNetconProperties(core::mem::transmute(pprops)) } + unsafe { NcFreeNetconProperties(pprops as _) } } #[inline] pub unsafe fn NcIsValidConnectionName(pszwname: P0) -> super::super::Foundation::BOOL @@ -17,13 +17,13 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-net-isolation-l1-1-0.dll" "system" fn NetworkIsolationDiagnoseConnectFailureAndGetInfo(wszservername : windows_core::PCWSTR, netisoerror : *mut NETISO_ERROR_TYPE) -> u32); - unsafe { NetworkIsolationDiagnoseConnectFailureAndGetInfo(wszservername.param().abi(), core::mem::transmute(netisoerror)) } + unsafe { NetworkIsolationDiagnoseConnectFailureAndGetInfo(wszservername.param().abi(), netisoerror as _) } } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn NetworkIsolationEnumAppContainers(flags: u32, pdwnumpublicappcs: *mut u32, pppublicappcs: *mut *mut INET_FIREWALL_APP_CONTAINER) -> u32 { windows_targets::link!("api-ms-win-net-isolation-l1-1-0.dll" "system" fn NetworkIsolationEnumAppContainers(flags : u32, pdwnumpublicappcs : *mut u32, pppublicappcs : *mut *mut INET_FIREWALL_APP_CONTAINER) -> u32); - unsafe { NetworkIsolationEnumAppContainers(flags, core::mem::transmute(pdwnumpublicappcs), core::mem::transmute(pppublicappcs)) } + unsafe { NetworkIsolationEnumAppContainers(flags, pdwnumpublicappcs as _, pppublicappcs as _) } } #[cfg(feature = "Win32_System_Ole")] #[inline] @@ -44,7 +44,7 @@ pub unsafe fn NetworkIsolationFreeAppContainers(ppublicappcs: *const INET_FIREWA #[inline] pub unsafe fn NetworkIsolationGetAppContainerConfig(pdwnumpublicappcs: *mut u32, appcontainersids: *mut *mut super::super::Security::SID_AND_ATTRIBUTES) -> u32 { windows_targets::link!("api-ms-win-net-isolation-l1-1-0.dll" "system" fn NetworkIsolationGetAppContainerConfig(pdwnumpublicappcs : *mut u32, appcontainersids : *mut *mut super::super::Security:: SID_AND_ATTRIBUTES) -> u32); - unsafe { NetworkIsolationGetAppContainerConfig(core::mem::transmute(pdwnumpublicappcs), core::mem::transmute(appcontainersids)) } + unsafe { NetworkIsolationGetAppContainerConfig(pdwnumpublicappcs as _, appcontainersids as _) } } #[inline] pub unsafe fn NetworkIsolationGetEnterpriseIdAsync(wszservername: P0, dwflags: u32, context: Option<*const core::ffi::c_void>, callback: PNETISO_EDP_ID_CALLBACK_FN, hoperation: *mut super::super::Foundation::HANDLE) -> u32 @@ -52,7 +52,7 @@ where P0: windows_core::Param, { windows_targets::link!("firewallapi.dll" "system" fn NetworkIsolationGetEnterpriseIdAsync(wszservername : windows_core::PCWSTR, dwflags : u32, context : *const core::ffi::c_void, callback : PNETISO_EDP_ID_CALLBACK_FN, hoperation : *mut super::super::Foundation:: HANDLE) -> u32); - unsafe { NetworkIsolationGetEnterpriseIdAsync(wszservername.param().abi(), dwflags, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), callback, core::mem::transmute(hoperation)) } + unsafe { NetworkIsolationGetEnterpriseIdAsync(wszservername.param().abi(), dwflags, context.unwrap_or(core::mem::zeroed()) as _, callback, hoperation as _) } } #[inline] pub unsafe fn NetworkIsolationGetEnterpriseIdClose(hoperation: super::super::Foundation::HANDLE, bwaitforoperation: bool) -> u32 { @@ -63,7 +63,7 @@ pub unsafe fn NetworkIsolationGetEnterpriseIdClose(hoperation: super::super::Fou #[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); - unsafe { NetworkIsolationRegisterForAppContainerChanges(flags, callback, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(registrationobject)) } + unsafe { NetworkIsolationRegisterForAppContainerChanges(flags, callback, context.unwrap_or(core::mem::zeroed()) as _, registrationobject as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -632,7 +632,7 @@ windows_core::imp::define_interface!(IEnumNetConnection, IEnumNetConnection_Vtbl windows_core::imp::interface_hierarchy!(IEnumNetConnection, windows_core::IUnknown); impl IEnumNetConnection { pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -711,7 +711,7 @@ windows_core::imp::interface_hierarchy!(IEnumNetSharingEveryConnection, windows_ impl IEnumNetSharingEveryConnection { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn Next(&self, rgvar: &mut [super::super::System::Variant::VARIANT], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgvar.len().try_into().unwrap(), core::mem::transmute(rgvar.as_ptr()), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgvar.len().try_into().unwrap(), core::mem::transmute(rgvar.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -796,7 +796,7 @@ windows_core::imp::interface_hierarchy!(IEnumNetSharingPortMapping, windows_core impl IEnumNetSharingPortMapping { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn Next(&self, rgvar: &mut [super::super::System::Variant::VARIANT], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgvar.len().try_into().unwrap(), core::mem::transmute(rgvar.as_ptr()), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgvar.len().try_into().unwrap(), core::mem::transmute(rgvar.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -881,7 +881,7 @@ windows_core::imp::interface_hierarchy!(IEnumNetSharingPrivateConnection, window impl IEnumNetSharingPrivateConnection { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn Next(&self, rgvar: &mut [super::super::System::Variant::VARIANT], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgvar.len().try_into().unwrap(), core::mem::transmute(rgvar.as_ptr()), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgvar.len().try_into().unwrap(), core::mem::transmute(rgvar.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -966,7 +966,7 @@ windows_core::imp::interface_hierarchy!(IEnumNetSharingPublicConnection, windows impl IEnumNetSharingPublicConnection { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn Next(&self, rgvar: &mut [super::super::System::Variant::VARIANT], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgvar.len().try_into().unwrap(), core::mem::transmute(rgvar.as_ptr()), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgvar.len().try_into().unwrap(), core::mem::transmute(rgvar.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } 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 974396e1bc..a0f9b98522 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsNetworkVirtualization/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsNetworkVirtualization/mod.rs @@ -7,7 +7,7 @@ pub unsafe fn WnvOpen() -> super::super::Foundation::HANDLE { #[inline] 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); - unsafe { WnvRequestNotification(wnvhandle, core::mem::transmute(notificationparam), core::mem::transmute(overlapped), core::mem::transmute(bytestransferred)) } + unsafe { WnvRequestNotification(wnvhandle, notificationparam as _, overlapped as _, bytestransferred as _) } } 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 05aee79b57..35afb4abdf 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/ActiveDirectory/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/ActiveDirectory/mod.rs @@ -14,7 +14,7 @@ where #[inline] pub unsafe fn ADsBuildVarArrayInt(lpdwobjecttypes: *mut u32, dwobjecttypes: u32, pvar: *mut super::super::System::Variant::VARIANT) -> windows_core::Result<()> { windows_targets::link!("activeds.dll" "system" fn ADsBuildVarArrayInt(lpdwobjecttypes : *mut u32, dwobjecttypes : u32, pvar : *mut super::super::System::Variant:: VARIANT) -> windows_core::HRESULT); - unsafe { ADsBuildVarArrayInt(core::mem::transmute(lpdwobjecttypes), dwobjecttypes, core::mem::transmute(pvar)).ok() } + unsafe { ADsBuildVarArrayInt(lpdwobjecttypes as _, dwobjecttypes, core::mem::transmute(pvar)).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] #[inline] @@ -28,12 +28,12 @@ where P0: windows_core::Param, { windows_targets::link!("activeds.dll" "system" fn ADsDecodeBinaryData(szsrcdata : windows_core::PCWSTR, ppbdestdata : *mut *mut u8, pdwdestlen : *mut u32) -> windows_core::HRESULT); - unsafe { ADsDecodeBinaryData(szsrcdata.param().abi(), core::mem::transmute(ppbdestdata), core::mem::transmute(pdwdestlen)).ok() } + unsafe { ADsDecodeBinaryData(szsrcdata.param().abi(), ppbdestdata as _, pdwdestlen as _).ok() } } #[inline] pub unsafe fn ADsEncodeBinaryData(pbsrcdata: *mut u8, dwsrclen: u32, ppszdestdata: *mut windows_core::PWSTR) -> windows_core::Result<()> { windows_targets::link!("activeds.dll" "system" fn ADsEncodeBinaryData(pbsrcdata : *mut u8, dwsrclen : u32, ppszdestdata : *mut windows_core::PWSTR) -> windows_core::HRESULT); - unsafe { ADsEncodeBinaryData(core::mem::transmute(pbsrcdata), dwsrclen, core::mem::transmute(ppszdestdata)).ok() } + unsafe { ADsEncodeBinaryData(pbsrcdata as _, dwsrclen, ppszdestdata as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] #[inline] @@ -42,7 +42,7 @@ where P0: windows_core::Param, { windows_targets::link!("activeds.dll" "system" fn ADsEnumerateNext(penumvariant : * mut core::ffi::c_void, celements : u32, pvar : *mut super::super::System::Variant:: VARIANT, pcelementsfetched : *mut u32) -> windows_core::HRESULT); - unsafe { ADsEnumerateNext(penumvariant.param().abi(), celements, core::mem::transmute(pvar), core::mem::transmute(pcelementsfetched)).ok() } + unsafe { ADsEnumerateNext(penumvariant.param().abi(), celements, core::mem::transmute(pvar), pcelementsfetched as _).ok() } } #[cfg(feature = "Win32_System_Ole")] #[inline] @@ -56,7 +56,7 @@ where #[inline] pub unsafe fn ADsGetLastError(lperror: *mut u32, lperrorbuf: &mut [u16], lpnamebuf: &mut [u16]) -> windows_core::Result<()> { windows_targets::link!("activeds.dll" "system" fn ADsGetLastError(lperror : *mut u32, lperrorbuf : windows_core::PWSTR, dwerrorbuflen : u32, lpnamebuf : windows_core::PWSTR, dwnamebuflen : u32) -> windows_core::HRESULT); - unsafe { ADsGetLastError(core::mem::transmute(lperror), core::mem::transmute(lperrorbuf.as_ptr()), lperrorbuf.len().try_into().unwrap(), core::mem::transmute(lpnamebuf.as_ptr()), lpnamebuf.len().try_into().unwrap()).ok() } + unsafe { ADsGetLastError(lperror as _, core::mem::transmute(lperrorbuf.as_ptr()), lperrorbuf.len().try_into().unwrap(), core::mem::transmute(lpnamebuf.as_ptr()), lpnamebuf.len().try_into().unwrap()).ok() } } #[inline] pub unsafe fn ADsGetObject(lpszpathname: P0, riid: *const windows_core::GUID, ppobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -64,7 +64,7 @@ where P0: windows_core::Param, { windows_targets::link!("activeds.dll" "system" fn ADsGetObject(lpszpathname : windows_core::PCWSTR, riid : *const windows_core::GUID, ppobject : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { ADsGetObject(lpszpathname.param().abi(), riid, core::mem::transmute(ppobject)).ok() } + unsafe { ADsGetObject(lpszpathname.param().abi(), riid, ppobject as _).ok() } } #[inline] pub unsafe fn ADsOpenObject(lpszpathname: P0, lpszusername: P1, lpszpassword: P2, dwreserved: ADS_AUTHENTICATION_ENUM, riid: *const windows_core::GUID, ppobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -74,7 +74,7 @@ where P2: windows_core::Param, { windows_targets::link!("activeds.dll" "system" fn ADsOpenObject(lpszpathname : windows_core::PCWSTR, lpszusername : windows_core::PCWSTR, lpszpassword : windows_core::PCWSTR, dwreserved : ADS_AUTHENTICATION_ENUM, riid : *const windows_core::GUID, ppobject : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { ADsOpenObject(lpszpathname.param().abi(), lpszusername.param().abi(), lpszpassword.param().abi(), dwreserved, riid, core::mem::transmute(ppobject)).ok() } + unsafe { ADsOpenObject(lpszpathname.param().abi(), lpszusername.param().abi(), lpszpassword.param().abi(), dwreserved, riid, ppobject as _).ok() } } #[inline] pub unsafe fn ADsPropCheckIfWritable(pwzattr: P0, pwritableattrs: *const ADS_ATTR_INFO) -> super::super::Foundation::BOOL @@ -92,7 +92,7 @@ where P1: windows_core::Param, { windows_targets::link!("dsprop.dll" "system" fn ADsPropCreateNotifyObj(pappthddataobj : * mut core::ffi::c_void, pwzadsobjname : windows_core::PCWSTR, phnotifyobj : *mut super::super::Foundation:: HWND) -> windows_core::HRESULT); - unsafe { ADsPropCreateNotifyObj(pappthddataobj.param().abi(), pwzadsobjname.param().abi(), core::mem::transmute(phnotifyobj)).ok() } + unsafe { ADsPropCreateNotifyObj(pappthddataobj.param().abi(), pwzadsobjname.param().abi(), phnotifyobj as _).ok() } } #[inline] pub unsafe fn ADsPropGetInitInfo(hnotifyobj: super::super::Foundation::HWND, pinitparams: *mut ADSPROPINITPARAMS) -> super::super::Foundation::BOOL { @@ -102,7 +102,7 @@ pub unsafe fn ADsPropGetInitInfo(hnotifyobj: super::super::Foundation::HWND, pin #[inline] 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); - unsafe { ADsPropSendErrorMessage(hnotifyobj, core::mem::transmute(perror)) } + unsafe { ADsPropSendErrorMessage(hnotifyobj, perror as _) } } #[inline] pub unsafe fn ADsPropSetHwnd(hnotifyobj: super::super::Foundation::HWND, hpage: super::super::Foundation::HWND) -> super::super::Foundation::BOOL { @@ -131,13 +131,13 @@ where #[inline] pub unsafe fn AdsFreeAdsValues(padsvalues: *mut ADSVALUE, dwnumvalues: u32) { windows_targets::link!("activeds.dll" "system" fn AdsFreeAdsValues(padsvalues : *mut ADSVALUE, dwnumvalues : u32)); - unsafe { AdsFreeAdsValues(core::mem::transmute(padsvalues), dwnumvalues) } + unsafe { AdsFreeAdsValues(padsvalues as _, dwnumvalues) } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] #[inline] pub unsafe fn AdsTypeToPropVariant(padsvalues: *mut ADSVALUE, dwnumvalues: u32, pvariant: *mut super::super::System::Variant::VARIANT) -> windows_core::Result<()> { windows_targets::link!("activeds.dll" "system" fn AdsTypeToPropVariant(padsvalues : *mut ADSVALUE, dwnumvalues : u32, pvariant : *mut super::super::System::Variant:: VARIANT) -> windows_core::HRESULT); - unsafe { AdsTypeToPropVariant(core::mem::transmute(padsvalues), dwnumvalues, core::mem::transmute(pvariant)).ok() } + unsafe { AdsTypeToPropVariant(padsvalues as _, dwnumvalues, core::mem::transmute(pvariant)).ok() } } #[inline] pub unsafe fn AllocADsMem(cb: u32) -> *mut core::ffi::c_void { @@ -173,7 +173,7 @@ 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); - unsafe { DsAddSidHistoryA(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()) } + unsafe { DsAddSidHistoryA(hds, flags.unwrap_or(core::mem::zeroed()) as _, srcdomain.param().abi(), srcprincipal.param().abi(), srcdomaincontroller.param().abi(), srcdomaincreds.unwrap_or(core::mem::zeroed()) as _, dstdomain.param().abi(), dstprincipal.param().abi()) } } #[inline] 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 @@ -185,7 +185,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); - unsafe { DsAddSidHistoryW(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()) } + unsafe { DsAddSidHistoryW(hds, flags.unwrap_or(core::mem::zeroed()) as _, srcdomain.param().abi(), srcprincipal.param().abi(), srcdomaincontroller.param().abi(), srcdomaincreds.unwrap_or(core::mem::zeroed()) as _, dstdomain.param().abi(), dstprincipal.param().abi()) } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -194,7 +194,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn DsAddressToSiteNamesA(computername : windows_core::PCSTR, entrycount : u32, socketaddresses : *const super::WinSock:: SOCKET_ADDRESS, sitenames : *mut *mut windows_core::PSTR) -> u32); - unsafe { DsAddressToSiteNamesA(computername.param().abi(), socketaddresses.len().try_into().unwrap(), core::mem::transmute(socketaddresses.as_ptr()), core::mem::transmute(sitenames)) } + unsafe { DsAddressToSiteNamesA(computername.param().abi(), socketaddresses.len().try_into().unwrap(), core::mem::transmute(socketaddresses.as_ptr()), sitenames as _) } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -203,7 +203,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn DsAddressToSiteNamesExA(computername : windows_core::PCSTR, entrycount : u32, socketaddresses : *const super::WinSock:: SOCKET_ADDRESS, sitenames : *mut *mut windows_core::PSTR, subnetnames : *mut *mut windows_core::PSTR) -> u32); - unsafe { DsAddressToSiteNamesExA(computername.param().abi(), socketaddresses.len().try_into().unwrap(), core::mem::transmute(socketaddresses.as_ptr()), core::mem::transmute(sitenames), core::mem::transmute(subnetnames)) } + unsafe { DsAddressToSiteNamesExA(computername.param().abi(), socketaddresses.len().try_into().unwrap(), core::mem::transmute(socketaddresses.as_ptr()), sitenames as _, subnetnames as _) } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -212,7 +212,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn DsAddressToSiteNamesExW(computername : windows_core::PCWSTR, entrycount : u32, socketaddresses : *const super::WinSock:: SOCKET_ADDRESS, sitenames : *mut *mut windows_core::PWSTR, subnetnames : *mut *mut windows_core::PWSTR) -> u32); - unsafe { DsAddressToSiteNamesExW(computername.param().abi(), socketaddresses.len().try_into().unwrap(), core::mem::transmute(socketaddresses.as_ptr()), core::mem::transmute(sitenames), core::mem::transmute(subnetnames)) } + unsafe { DsAddressToSiteNamesExW(computername.param().abi(), socketaddresses.len().try_into().unwrap(), core::mem::transmute(socketaddresses.as_ptr()), sitenames as _, subnetnames as _) } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -221,7 +221,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn DsAddressToSiteNamesW(computername : windows_core::PCWSTR, entrycount : u32, socketaddresses : *const super::WinSock:: SOCKET_ADDRESS, sitenames : *mut *mut windows_core::PWSTR) -> u32); - unsafe { DsAddressToSiteNamesW(computername.param().abi(), socketaddresses.len().try_into().unwrap(), core::mem::transmute(socketaddresses.as_ptr()), core::mem::transmute(sitenames)) } + unsafe { DsAddressToSiteNamesW(computername.param().abi(), socketaddresses.len().try_into().unwrap(), core::mem::transmute(socketaddresses.as_ptr()), sitenames as _) } } #[inline] pub unsafe fn DsBindA(domaincontrollername: P0, dnsdomainname: P1, phds: *mut super::super::Foundation::HANDLE) -> u32 @@ -230,7 +230,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsBindA(domaincontrollername : windows_core::PCSTR, dnsdomainname : windows_core::PCSTR, phds : *mut super::super::Foundation:: HANDLE) -> u32); - unsafe { DsBindA(domaincontrollername.param().abi(), dnsdomainname.param().abi(), core::mem::transmute(phds)) } + unsafe { DsBindA(domaincontrollername.param().abi(), dnsdomainname.param().abi(), phds as _) } } #[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: Option, phds: *mut super::super::Foundation::HANDLE) -> u32 @@ -241,7 +241,7 @@ 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); - unsafe { 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)) } + unsafe { DsBindByInstanceA(servername.param().abi(), annotation.param().abi(), instanceguid.unwrap_or(core::mem::zeroed()) as _, dnsdomainname.param().abi(), authidentity.unwrap_or(core::mem::zeroed()) as _, serviceprincipalname.param().abi(), bindflags.unwrap_or(core::mem::zeroed()) as _, phds as _) } } #[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: Option, phds: *mut super::super::Foundation::HANDLE) -> u32 @@ -252,7 +252,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); - unsafe { 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)) } + unsafe { DsBindByInstanceW(servername.param().abi(), annotation.param().abi(), instanceguid.unwrap_or(core::mem::zeroed()) as _, dnsdomainname.param().abi(), authidentity.unwrap_or(core::mem::zeroed()) as _, serviceprincipalname.param().abi(), bindflags.unwrap_or(core::mem::zeroed()) as _, phds as _) } } #[inline] pub unsafe fn DsBindToISTGA(sitename: P0, phds: *mut super::super::Foundation::HANDLE) -> u32 @@ -260,7 +260,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsBindToISTGA(sitename : windows_core::PCSTR, phds : *mut super::super::Foundation:: HANDLE) -> u32); - unsafe { DsBindToISTGA(sitename.param().abi(), core::mem::transmute(phds)) } + unsafe { DsBindToISTGA(sitename.param().abi(), phds as _) } } #[inline] pub unsafe fn DsBindToISTGW(sitename: P0, phds: *mut super::super::Foundation::HANDLE) -> u32 @@ -268,7 +268,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsBindToISTGW(sitename : windows_core::PCWSTR, phds : *mut super::super::Foundation:: HANDLE) -> u32); - unsafe { DsBindToISTGW(sitename.param().abi(), core::mem::transmute(phds)) } + unsafe { DsBindToISTGW(sitename.param().abi(), phds as _) } } #[inline] pub unsafe fn DsBindW(domaincontrollername: P0, dnsdomainname: P1, phds: *mut super::super::Foundation::HANDLE) -> u32 @@ -277,7 +277,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsBindW(domaincontrollername : windows_core::PCWSTR, dnsdomainname : windows_core::PCWSTR, phds : *mut super::super::Foundation:: HANDLE) -> u32); - unsafe { DsBindW(domaincontrollername.param().abi(), dnsdomainname.param().abi(), core::mem::transmute(phds)) } + unsafe { DsBindW(domaincontrollername.param().abi(), dnsdomainname.param().abi(), phds as _) } } #[inline] pub unsafe fn DsBindWithCredA(domaincontrollername: P0, dnsdomainname: P1, authidentity: Option<*const core::ffi::c_void>, phds: *mut super::super::Foundation::HANDLE) -> u32 @@ -286,7 +286,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); - unsafe { DsBindWithCredA(domaincontrollername.param().abi(), dnsdomainname.param().abi(), core::mem::transmute(authidentity.unwrap_or(core::mem::zeroed())), core::mem::transmute(phds)) } + unsafe { DsBindWithCredA(domaincontrollername.param().abi(), dnsdomainname.param().abi(), authidentity.unwrap_or(core::mem::zeroed()) as _, phds as _) } } #[inline] pub unsafe fn DsBindWithCredW(domaincontrollername: P0, dnsdomainname: P1, authidentity: Option<*const core::ffi::c_void>, phds: *mut super::super::Foundation::HANDLE) -> u32 @@ -295,7 +295,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); - unsafe { DsBindWithCredW(domaincontrollername.param().abi(), dnsdomainname.param().abi(), core::mem::transmute(authidentity.unwrap_or(core::mem::zeroed())), core::mem::transmute(phds)) } + unsafe { DsBindWithCredW(domaincontrollername.param().abi(), dnsdomainname.param().abi(), authidentity.unwrap_or(core::mem::zeroed()) as _, phds as _) } } #[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 @@ -305,7 +305,7 @@ 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); - unsafe { DsBindWithSpnA(domaincontrollername.param().abi(), dnsdomainname.param().abi(), core::mem::transmute(authidentity.unwrap_or(core::mem::zeroed())), serviceprincipalname.param().abi(), core::mem::transmute(phds)) } + unsafe { DsBindWithSpnA(domaincontrollername.param().abi(), dnsdomainname.param().abi(), authidentity.unwrap_or(core::mem::zeroed()) as _, serviceprincipalname.param().abi(), phds as _) } } #[inline] 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 @@ -315,7 +315,7 @@ where 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); - unsafe { 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)) } + unsafe { DsBindWithSpnExA(domaincontrollername.param().abi(), dnsdomainname.param().abi(), authidentity.unwrap_or(core::mem::zeroed()) as _, serviceprincipalname.param().abi(), bindflags.unwrap_or(core::mem::zeroed()) as _, phds as _) } } #[inline] 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 @@ -325,7 +325,7 @@ where 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); - unsafe { 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)) } + unsafe { DsBindWithSpnExW(domaincontrollername.param().abi(), dnsdomainname.param().abi(), authidentity.unwrap_or(core::mem::zeroed()) as _, serviceprincipalname.param().abi(), bindflags.unwrap_or(core::mem::zeroed()) as _, phds as _) } } #[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 @@ -335,7 +335,7 @@ 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); - unsafe { DsBindWithSpnW(domaincontrollername.param().abi(), dnsdomainname.param().abi(), core::mem::transmute(authidentity.unwrap_or(core::mem::zeroed())), serviceprincipalname.param().abi(), core::mem::transmute(phds)) } + unsafe { DsBindWithSpnW(domaincontrollername.param().abi(), dnsdomainname.param().abi(), authidentity.unwrap_or(core::mem::zeroed()) as _, serviceprincipalname.param().abi(), phds as _) } } #[inline] pub unsafe fn DsBindingSetTimeout(hds: super::super::Foundation::HANDLE, ctimeoutsecs: u32) -> u32 { @@ -346,13 +346,13 @@ pub unsafe fn DsBindingSetTimeout(hds: super::super::Foundation::HANDLE, ctimeou #[inline] pub unsafe fn DsBrowseForContainerA(pinfo: *mut DSBROWSEINFOA) -> i32 { windows_targets::link!("dsuiext.dll" "system" fn DsBrowseForContainerA(pinfo : *mut DSBROWSEINFOA) -> i32); - unsafe { DsBrowseForContainerA(core::mem::transmute(pinfo)) } + unsafe { DsBrowseForContainerA(pinfo as _) } } #[cfg(feature = "Win32_UI_Shell")] #[inline] pub unsafe fn DsBrowseForContainerW(pinfo: *mut DSBROWSEINFOW) -> i32 { windows_targets::link!("dsuiext.dll" "system" fn DsBrowseForContainerW(pinfo : *mut DSBROWSEINFOW) -> i32); - unsafe { DsBrowseForContainerW(core::mem::transmute(pinfo)) } + unsafe { DsBrowseForContainerW(pinfo as _) } } #[inline] pub unsafe fn DsClientMakeSpnForTargetServerA(serviceclass: P0, servicename: P1, pcspnlength: *mut u32, pszspn: windows_core::PSTR) -> u32 @@ -361,7 +361,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsClientMakeSpnForTargetServerA(serviceclass : windows_core::PCSTR, servicename : windows_core::PCSTR, pcspnlength : *mut u32, pszspn : windows_core::PSTR) -> u32); - unsafe { DsClientMakeSpnForTargetServerA(serviceclass.param().abi(), servicename.param().abi(), core::mem::transmute(pcspnlength), core::mem::transmute(pszspn)) } + unsafe { DsClientMakeSpnForTargetServerA(serviceclass.param().abi(), servicename.param().abi(), pcspnlength as _, core::mem::transmute(pszspn)) } } #[inline] pub unsafe fn DsClientMakeSpnForTargetServerW(serviceclass: P0, servicename: P1, pcspnlength: *mut u32, pszspn: windows_core::PWSTR) -> u32 @@ -370,51 +370,27 @@ where P1: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsClientMakeSpnForTargetServerW(serviceclass : windows_core::PCWSTR, servicename : windows_core::PCWSTR, pcspnlength : *mut u32, pszspn : windows_core::PWSTR) -> u32); - unsafe { DsClientMakeSpnForTargetServerW(serviceclass.param().abi(), servicename.param().abi(), core::mem::transmute(pcspnlength), core::mem::transmute(pszspn)) } + unsafe { DsClientMakeSpnForTargetServerW(serviceclass.param().abi(), servicename.param().abi(), pcspnlength as _, core::mem::transmute(pszspn)) } } #[inline] 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); - unsafe { DsCrackNamesA(core::mem::transmute(hds.unwrap_or(core::mem::zeroed())), flags, formatoffered, formatdesired, rpnames.len().try_into().unwrap(), core::mem::transmute(rpnames.as_ptr()), core::mem::transmute(ppresult)) } + unsafe { DsCrackNamesA(hds.unwrap_or(core::mem::zeroed()) as _, flags, formatoffered, formatdesired, rpnames.len().try_into().unwrap(), core::mem::transmute(rpnames.as_ptr()), ppresult as _) } } #[inline] 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); - unsafe { DsCrackNamesW(core::mem::transmute(hds.unwrap_or(core::mem::zeroed())), flags, formatoffered, formatdesired, rpnames.len().try_into().unwrap(), core::mem::transmute(rpnames.as_ptr()), core::mem::transmute(ppresult)) } + unsafe { DsCrackNamesW(hds.unwrap_or(core::mem::zeroed()) as _, flags, formatoffered, formatdesired, rpnames.len().try_into().unwrap(), core::mem::transmute(rpnames.as_ptr()), ppresult as _) } } #[inline] 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); - unsafe { - 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())), - ) - } + unsafe { DsCrackSpn2A(core::mem::transmute(pszspn.as_ptr()), pszspn.len().try_into().unwrap(), pcserviceclass.unwrap_or(core::mem::zeroed()) as _, serviceclass.unwrap_or(core::mem::zeroed()) as _, pcservicename.unwrap_or(core::mem::zeroed()) as _, servicename.unwrap_or(core::mem::zeroed()) as _, pcinstancename.unwrap_or(core::mem::zeroed()) as _, instancename.unwrap_or(core::mem::zeroed()) as _, pinstanceport.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { - 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())), - ) - } + unsafe { DsCrackSpn2W(core::mem::transmute(pszspn.as_ptr()), pszspn.len().try_into().unwrap(), pcserviceclass.unwrap_or(core::mem::zeroed()) as _, serviceclass.unwrap_or(core::mem::zeroed()) as _, pcservicename.unwrap_or(core::mem::zeroed()) as _, servicename.unwrap_or(core::mem::zeroed()) as _, pcinstancename.unwrap_or(core::mem::zeroed()) as _, instancename.unwrap_or(core::mem::zeroed()) as _, pinstanceport.unwrap_or(core::mem::zeroed()) as _) } } #[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 @@ -422,7 +398,7 @@ where P0: windows_core::Param, { windows_targets::link!("dsparse.dll" "system" fn DsCrackSpn3W(pszspn : windows_core::PCWSTR, 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); - unsafe { DsCrackSpn3W(pszspn.param().abi(), cspn, core::mem::transmute(pchostname), core::mem::transmute(hostname), core::mem::transmute(pcinstancename), core::mem::transmute(instancename), core::mem::transmute(pportnumber), core::mem::transmute(pcdomainname), core::mem::transmute(domainname), core::mem::transmute(pcrealmname), core::mem::transmute(realmname)) } + unsafe { DsCrackSpn3W(pszspn.param().abi(), cspn, pchostname as _, core::mem::transmute(hostname), pcinstancename as _, core::mem::transmute(instancename), pportnumber as _, pcdomainname as _, core::mem::transmute(domainname), pcrealmname as _, core::mem::transmute(realmname)) } } #[inline] pub unsafe fn DsCrackSpn4W(pszspn: P0, cspn: u32, pchostname: *mut u32, hostname: windows_core::PWSTR, pcinstancename: *mut u32, instancename: windows_core::PWSTR, pcportname: *mut u32, portname: windows_core::PWSTR, pcdomainname: *mut u32, domainname: windows_core::PWSTR, pcrealmname: *mut u32, realmname: windows_core::PWSTR) -> u32 @@ -430,7 +406,7 @@ where P0: windows_core::Param, { windows_targets::link!("dsparse.dll" "system" fn DsCrackSpn4W(pszspn : windows_core::PCWSTR, cspn : u32, pchostname : *mut u32, hostname : windows_core::PWSTR, pcinstancename : *mut u32, instancename : windows_core::PWSTR, pcportname : *mut u32, portname : windows_core::PWSTR, pcdomainname : *mut u32, domainname : windows_core::PWSTR, pcrealmname : *mut u32, realmname : windows_core::PWSTR) -> u32); - unsafe { DsCrackSpn4W(pszspn.param().abi(), 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)) } + unsafe { DsCrackSpn4W(pszspn.param().abi(), cspn, pchostname as _, core::mem::transmute(hostname), pcinstancename as _, core::mem::transmute(instancename), pcportname as _, core::mem::transmute(portname), pcdomainname as _, core::mem::transmute(domainname), pcrealmname as _, core::mem::transmute(realmname)) } } #[inline] 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 @@ -438,18 +414,7 @@ where P0: windows_core::Param, { windows_targets::link!("dsparse.dll" "system" fn DsCrackSpnA(pszspn : windows_core::PCSTR, pcserviceclass : *mut u32, serviceclass : windows_core::PSTR, pcservicename : *mut u32, servicename : windows_core::PSTR, pcinstancename : *mut u32, instancename : windows_core::PSTR, pinstanceport : *mut u16) -> u32); - unsafe { - 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())), - ) - } + unsafe { DsCrackSpnA(pszspn.param().abi(), pcserviceclass.unwrap_or(core::mem::zeroed()) as _, serviceclass.unwrap_or(core::mem::zeroed()) as _, pcservicename.unwrap_or(core::mem::zeroed()) as _, servicename.unwrap_or(core::mem::zeroed()) as _, pcinstancename.unwrap_or(core::mem::zeroed()) as _, instancename.unwrap_or(core::mem::zeroed()) as _, pinstanceport.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -457,28 +422,17 @@ where P0: windows_core::Param, { windows_targets::link!("dsparse.dll" "system" fn DsCrackSpnW(pszspn : windows_core::PCWSTR, pcserviceclass : *mut u32, serviceclass : windows_core::PWSTR, pcservicename : *mut u32, servicename : windows_core::PWSTR, pcinstancename : *mut u32, instancename : windows_core::PWSTR, pinstanceport : *mut u16) -> u32); - unsafe { - 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())), - ) - } + unsafe { DsCrackSpnW(pszspn.param().abi(), pcserviceclass.unwrap_or(core::mem::zeroed()) as _, serviceclass.unwrap_or(core::mem::zeroed()) as _, pcservicename.unwrap_or(core::mem::zeroed()) as _, servicename.unwrap_or(core::mem::zeroed()) as _, pcinstancename.unwrap_or(core::mem::zeroed()) as _, instancename.unwrap_or(core::mem::zeroed()) as _, pinstanceport.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { 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()))) } + unsafe { DsCrackUnquotedMangledRdnA(core::mem::transmute(pszrdn.as_ptr()), pszrdn.len().try_into().unwrap(), pguid.unwrap_or(core::mem::zeroed()) as _, pedsmanglefor.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { 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()))) } + unsafe { DsCrackUnquotedMangledRdnW(core::mem::transmute(pszrdn.as_ptr()), pszrdn.len().try_into().unwrap(), pguid.unwrap_or(core::mem::zeroed()) as _, pedsmanglefor.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn DsDeregisterDnsHostRecordsA(servername: P0, dnsdomainname: P1, domainguid: Option<*const windows_core::GUID>, dsaguid: Option<*const windows_core::GUID>, dnshostname: P4) -> u32 @@ -488,7 +442,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); - unsafe { 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()) } + unsafe { DsDeregisterDnsHostRecordsA(servername.param().abi(), dnsdomainname.param().abi(), domainguid.unwrap_or(core::mem::zeroed()) as _, dsaguid.unwrap_or(core::mem::zeroed()) as _, 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 @@ -498,7 +452,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); - unsafe { 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()) } + unsafe { DsDeregisterDnsHostRecordsW(servername.param().abi(), dnsdomainname.param().abi(), domainguid.unwrap_or(core::mem::zeroed()) as _, dsaguid.unwrap_or(core::mem::zeroed()) as _, dnshostname.param().abi()) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -507,7 +461,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn DsEnumerateDomainTrustsA(servername : windows_core::PCSTR, flags : u32, domains : *mut *mut DS_DOMAIN_TRUSTSA, domaincount : *mut u32) -> u32); - unsafe { DsEnumerateDomainTrustsA(servername.param().abi(), flags, core::mem::transmute(domains), core::mem::transmute(domaincount)) } + unsafe { DsEnumerateDomainTrustsA(servername.param().abi(), flags, domains as _, domaincount as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -516,7 +470,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn DsEnumerateDomainTrustsW(servername : windows_core::PCWSTR, flags : u32, domains : *mut *mut DS_DOMAIN_TRUSTSW, domaincount : *mut u32) -> u32); - unsafe { DsEnumerateDomainTrustsW(servername.param().abi(), flags, core::mem::transmute(domains), core::mem::transmute(domaincount)) } + unsafe { DsEnumerateDomainTrustsW(servername.param().abi(), flags, domains as _, domaincount as _) } } #[inline] pub unsafe fn DsFreeDomainControllerInfoA(infolevel: u32, pinfo: &[u8]) { @@ -576,7 +530,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); - unsafe { DsGetDcNameA(computername.param().abi(), domainname.param().abi(), core::mem::transmute(domainguid.unwrap_or(core::mem::zeroed())), sitename.param().abi(), flags, core::mem::transmute(domaincontrollerinfo)) } + unsafe { DsGetDcNameA(computername.param().abi(), domainname.param().abi(), domainguid.unwrap_or(core::mem::zeroed()) as _, sitename.param().abi(), flags, domaincontrollerinfo as _) } } #[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 @@ -586,19 +540,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); - unsafe { DsGetDcNameW(computername.param().abi(), domainname.param().abi(), core::mem::transmute(domainguid.unwrap_or(core::mem::zeroed())), sitename.param().abi(), flags, core::mem::transmute(domaincontrollerinfo)) } + unsafe { DsGetDcNameW(computername.param().abi(), domainname.param().abi(), domainguid.unwrap_or(core::mem::zeroed()) as _, sitename.param().abi(), flags, domaincontrollerinfo as _) } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] 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); - unsafe { DsGetDcNextA(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()))) } + unsafe { DsGetDcNextA(getdccontexthandle, sockaddresscount.unwrap_or(core::mem::zeroed()) as _, sockaddresses.unwrap_or(core::mem::zeroed()) as _, dnshostname.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] 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); - unsafe { DsGetDcNextW(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()))) } + unsafe { DsGetDcNextW(getdccontexthandle, sockaddresscount.unwrap_or(core::mem::zeroed()) as _, sockaddresses.unwrap_or(core::mem::zeroed()) as _, dnshostname.unwrap_or(core::mem::zeroed()) as _) } } #[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 @@ -608,7 +562,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); - unsafe { DsGetDcOpenA(dnsname.param().abi(), optionflags, sitename.param().abi(), core::mem::transmute(domainguid.unwrap_or(core::mem::zeroed())), dnsforestname.param().abi(), dcflags, core::mem::transmute(retgetdccontext)) } + unsafe { DsGetDcOpenA(dnsname.param().abi(), optionflags, sitename.param().abi(), domainguid.unwrap_or(core::mem::zeroed()) as _, dnsforestname.param().abi(), dcflags, retgetdccontext as _) } } #[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 @@ -618,7 +572,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); - unsafe { DsGetDcOpenW(dnsname.param().abi(), optionflags, sitename.param().abi(), core::mem::transmute(domainguid.unwrap_or(core::mem::zeroed())), dnsforestname.param().abi(), dcflags, core::mem::transmute(retgetdccontext)) } + unsafe { DsGetDcOpenW(dnsname.param().abi(), optionflags, sitename.param().abi(), domainguid.unwrap_or(core::mem::zeroed()) as _, dnsforestname.param().abi(), dcflags, retgetdccontext as _) } } #[inline] pub unsafe fn DsGetDcSiteCoverageA(servername: P0, entrycount: *mut u32, sitenames: *mut *mut windows_core::PSTR) -> u32 @@ -626,7 +580,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn DsGetDcSiteCoverageA(servername : windows_core::PCSTR, entrycount : *mut u32, sitenames : *mut *mut windows_core::PSTR) -> u32); - unsafe { DsGetDcSiteCoverageA(servername.param().abi(), core::mem::transmute(entrycount), core::mem::transmute(sitenames)) } + unsafe { DsGetDcSiteCoverageA(servername.param().abi(), entrycount as _, sitenames as _) } } #[inline] pub unsafe fn DsGetDcSiteCoverageW(servername: P0, entrycount: *mut u32, sitenames: *mut *mut windows_core::PWSTR) -> u32 @@ -634,7 +588,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn DsGetDcSiteCoverageW(servername : windows_core::PCWSTR, entrycount : *mut u32, sitenames : *mut *mut windows_core::PWSTR) -> u32); - unsafe { DsGetDcSiteCoverageW(servername.param().abi(), core::mem::transmute(entrycount), core::mem::transmute(sitenames)) } + unsafe { DsGetDcSiteCoverageW(servername.param().abi(), entrycount as _, sitenames as _) } } #[inline] pub unsafe fn DsGetDomainControllerInfoA(hds: super::super::Foundation::HANDLE, domainname: P1, infolevel: u32, pcout: *mut u32, ppinfo: *mut *mut core::ffi::c_void) -> u32 @@ -642,7 +596,7 @@ where 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); - unsafe { DsGetDomainControllerInfoA(hds, domainname.param().abi(), infolevel, core::mem::transmute(pcout), core::mem::transmute(ppinfo)) } + unsafe { DsGetDomainControllerInfoA(hds, domainname.param().abi(), infolevel, pcout as _, ppinfo as _) } } #[inline] pub unsafe fn DsGetDomainControllerInfoW(hds: super::super::Foundation::HANDLE, domainname: P1, infolevel: u32, pcout: *mut u32, ppinfo: *mut *mut core::ffi::c_void) -> u32 @@ -650,7 +604,7 @@ where 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); - unsafe { DsGetDomainControllerInfoW(hds, domainname.param().abi(), infolevel, core::mem::transmute(pcout), core::mem::transmute(ppinfo)) } + unsafe { DsGetDomainControllerInfoW(hds, domainname.param().abi(), infolevel, pcout as _, ppinfo as _) } } #[cfg(feature = "Win32_Security_Authentication_Identity")] #[inline] @@ -660,7 +614,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn DsGetForestTrustInformationW(servername : windows_core::PCWSTR, trusteddomainname : windows_core::PCWSTR, flags : u32, foresttrustinfo : *mut *mut super::super::Security::Authentication::Identity:: LSA_FOREST_TRUST_INFORMATION) -> u32); - unsafe { DsGetForestTrustInformationW(servername.param().abi(), trusteddomainname.param().abi(), flags, core::mem::transmute(foresttrustinfo)) } + unsafe { DsGetForestTrustInformationW(servername.param().abi(), trusteddomainname.param().abi(), flags, foresttrustinfo as _) } } #[inline] pub unsafe fn DsGetFriendlyClassName(pszobjectclass: P0, pszbuffer: &mut [u16]) -> windows_core::Result<()> @@ -682,7 +636,7 @@ where #[inline] pub unsafe fn DsGetRdnW(ppdn: *mut windows_core::PWSTR, pcdn: *mut u32, ppkey: *mut windows_core::PWSTR, pckey: *mut u32, ppval: *mut windows_core::PWSTR, pcval: *mut u32) -> u32 { windows_targets::link!("dsparse.dll" "system" fn DsGetRdnW(ppdn : *mut windows_core::PWSTR, pcdn : *mut u32, ppkey : *mut windows_core::PWSTR, pckey : *mut u32, ppval : *mut windows_core::PWSTR, pcval : *mut u32) -> u32); - unsafe { DsGetRdnW(core::mem::transmute(ppdn), core::mem::transmute(pcdn), core::mem::transmute(ppkey), core::mem::transmute(pckey), core::mem::transmute(ppval), core::mem::transmute(pcval)) } + unsafe { DsGetRdnW(ppdn as _, pcdn as _, ppkey as _, pckey as _, ppval as _, pcval as _) } } #[inline] pub unsafe fn DsGetSiteNameA(computername: P0, sitename: *mut windows_core::PSTR) -> u32 @@ -690,7 +644,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn DsGetSiteNameA(computername : windows_core::PCSTR, sitename : *mut windows_core::PSTR) -> u32); - unsafe { DsGetSiteNameA(computername.param().abi(), core::mem::transmute(sitename)) } + unsafe { DsGetSiteNameA(computername.param().abi(), sitename as _) } } #[inline] pub unsafe fn DsGetSiteNameW(computername: P0, sitename: *mut windows_core::PWSTR) -> u32 @@ -698,7 +652,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn DsGetSiteNameW(computername : windows_core::PCWSTR, sitename : *mut windows_core::PWSTR) -> u32); - unsafe { DsGetSiteNameW(computername.param().abi(), core::mem::transmute(sitename)) } + unsafe { DsGetSiteNameW(computername.param().abi(), sitename as _) } } #[inline] pub unsafe fn DsGetSpnA(servicetype: DS_SPN_NAME_TYPE, serviceclass: P1, servicename: P2, instanceport: u16, cinstancenames: u16, pinstancenames: Option<*const windows_core::PCSTR>, pinstanceports: Option<*const u16>, pcspn: *mut u32, prpszspn: *mut *mut windows_core::PSTR) -> u32 @@ -707,7 +661,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); - unsafe { DsGetSpnA(servicetype, serviceclass.param().abi(), servicename.param().abi(), instanceport, 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)) } + unsafe { DsGetSpnA(servicetype, serviceclass.param().abi(), servicename.param().abi(), instanceport, cinstancenames, pinstancenames.unwrap_or(core::mem::zeroed()) as _, pinstanceports.unwrap_or(core::mem::zeroed()) as _, pcspn as _, prpszspn as _) } } #[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 @@ -716,7 +670,7 @@ 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); - unsafe { DsGetSpnW(servicetype, serviceclass.param().abi(), servicename.param().abi(), instanceport, 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)) } + unsafe { DsGetSpnW(servicetype, serviceclass.param().abi(), servicename.param().abi(), instanceport, cinstancenames, pinstancenames.unwrap_or(core::mem::zeroed()) as _, pinstanceports.unwrap_or(core::mem::zeroed()) as _, pcspn as _, prpszspn as _) } } #[inline] pub unsafe fn DsInheritSecurityIdentityA(hds: super::super::Foundation::HANDLE, flags: Option, srcprincipal: P2, dstprincipal: P3) -> u32 @@ -725,7 +679,7 @@ where 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); - unsafe { DsInheritSecurityIdentityA(hds, core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), srcprincipal.param().abi(), dstprincipal.param().abi()) } + unsafe { DsInheritSecurityIdentityA(hds, flags.unwrap_or(core::mem::zeroed()) as _, srcprincipal.param().abi(), dstprincipal.param().abi()) } } #[inline] pub unsafe fn DsInheritSecurityIdentityW(hds: super::super::Foundation::HANDLE, flags: Option, srcprincipal: P2, dstprincipal: P3) -> u32 @@ -734,7 +688,7 @@ where 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); - unsafe { DsInheritSecurityIdentityW(hds, core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), srcprincipal.param().abi(), dstprincipal.param().abi()) } + unsafe { DsInheritSecurityIdentityW(hds, flags.unwrap_or(core::mem::zeroed()) as _, srcprincipal.param().abi(), dstprincipal.param().abi()) } } #[inline] pub unsafe fn DsIsMangledDnA(pszdn: P0, edsmanglefor: DS_MANGLE_FOR) -> super::super::Foundation::BOOL @@ -768,7 +722,7 @@ where 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); - unsafe { DsListDomainsInSiteA(hds, site.param().abi(), core::mem::transmute(ppdomains)) } + unsafe { DsListDomainsInSiteA(hds, site.param().abi(), ppdomains as _) } } #[inline] pub unsafe fn DsListDomainsInSiteW(hds: super::super::Foundation::HANDLE, site: P1, ppdomains: *mut *mut DS_NAME_RESULTW) -> u32 @@ -776,7 +730,7 @@ where 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); - unsafe { DsListDomainsInSiteW(hds, site.param().abi(), core::mem::transmute(ppdomains)) } + unsafe { DsListDomainsInSiteW(hds, site.param().abi(), ppdomains as _) } } #[inline] pub unsafe fn DsListInfoForServerA(hds: super::super::Foundation::HANDLE, server: P1, ppinfo: *mut *mut DS_NAME_RESULTA) -> u32 @@ -784,7 +738,7 @@ where 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); - unsafe { DsListInfoForServerA(hds, server.param().abi(), core::mem::transmute(ppinfo)) } + unsafe { DsListInfoForServerA(hds, server.param().abi(), ppinfo as _) } } #[inline] pub unsafe fn DsListInfoForServerW(hds: super::super::Foundation::HANDLE, server: P1, ppinfo: *mut *mut DS_NAME_RESULTW) -> u32 @@ -792,17 +746,17 @@ where 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); - unsafe { DsListInfoForServerW(hds, server.param().abi(), core::mem::transmute(ppinfo)) } + unsafe { DsListInfoForServerW(hds, server.param().abi(), ppinfo as _) } } #[inline] 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); - unsafe { DsListRolesA(hds, core::mem::transmute(pproles)) } + unsafe { DsListRolesA(hds, pproles as _) } } #[inline] 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); - unsafe { DsListRolesW(hds, core::mem::transmute(pproles)) } + unsafe { DsListRolesW(hds, pproles as _) } } #[inline] pub unsafe fn DsListServersForDomainInSiteA(hds: super::super::Foundation::HANDLE, domain: P1, site: P2, ppservers: *mut *mut DS_NAME_RESULTA) -> u32 @@ -811,7 +765,7 @@ where 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); - unsafe { DsListServersForDomainInSiteA(hds, domain.param().abi(), site.param().abi(), core::mem::transmute(ppservers)) } + unsafe { DsListServersForDomainInSiteA(hds, domain.param().abi(), site.param().abi(), ppservers as _) } } #[inline] pub unsafe fn DsListServersForDomainInSiteW(hds: super::super::Foundation::HANDLE, domain: P1, site: P2, ppservers: *mut *mut DS_NAME_RESULTW) -> u32 @@ -820,7 +774,7 @@ where 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); - unsafe { DsListServersForDomainInSiteW(hds, domain.param().abi(), site.param().abi(), core::mem::transmute(ppservers)) } + unsafe { DsListServersForDomainInSiteW(hds, domain.param().abi(), site.param().abi(), ppservers as _) } } #[inline] pub unsafe fn DsListServersInSiteA(hds: super::super::Foundation::HANDLE, site: P1, ppservers: *mut *mut DS_NAME_RESULTA) -> u32 @@ -828,7 +782,7 @@ where 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); - unsafe { DsListServersInSiteA(hds, site.param().abi(), core::mem::transmute(ppservers)) } + unsafe { DsListServersInSiteA(hds, site.param().abi(), ppservers as _) } } #[inline] pub unsafe fn DsListServersInSiteW(hds: super::super::Foundation::HANDLE, site: P1, ppservers: *mut *mut DS_NAME_RESULTW) -> u32 @@ -836,17 +790,17 @@ where 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); - unsafe { DsListServersInSiteW(hds, site.param().abi(), core::mem::transmute(ppservers)) } + unsafe { DsListServersInSiteW(hds, site.param().abi(), ppservers as _) } } #[inline] 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); - unsafe { DsListSitesA(hds, core::mem::transmute(ppsites)) } + unsafe { DsListSitesA(hds, ppsites as _) } } #[inline] 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); - unsafe { DsListSitesW(hds, core::mem::transmute(ppsites)) } + unsafe { DsListSitesW(hds, ppsites as _) } } #[inline] pub unsafe fn DsMakePasswordCredentialsA(user: P0, domain: P1, password: P2, pauthidentity: *mut *mut core::ffi::c_void) -> u32 @@ -856,7 +810,7 @@ where P2: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsMakePasswordCredentialsA(user : windows_core::PCSTR, domain : windows_core::PCSTR, password : windows_core::PCSTR, pauthidentity : *mut *mut core::ffi::c_void) -> u32); - unsafe { DsMakePasswordCredentialsA(user.param().abi(), domain.param().abi(), password.param().abi(), core::mem::transmute(pauthidentity)) } + unsafe { DsMakePasswordCredentialsA(user.param().abi(), domain.param().abi(), password.param().abi(), pauthidentity as _) } } #[inline] pub unsafe fn DsMakePasswordCredentialsW(user: P0, domain: P1, password: P2, pauthidentity: *mut *mut core::ffi::c_void) -> u32 @@ -866,7 +820,7 @@ where P2: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsMakePasswordCredentialsW(user : windows_core::PCWSTR, domain : windows_core::PCWSTR, password : windows_core::PCWSTR, pauthidentity : *mut *mut core::ffi::c_void) -> u32); - unsafe { DsMakePasswordCredentialsW(user.param().abi(), domain.param().abi(), password.param().abi(), core::mem::transmute(pauthidentity)) } + unsafe { DsMakePasswordCredentialsW(user.param().abi(), domain.param().abi(), password.param().abi(), pauthidentity as _) } } #[inline] pub unsafe fn DsMakeSpnA(serviceclass: P0, servicename: P1, instancename: P2, instanceport: u16, referrer: P4, pcspnlength: *mut u32, pszspn: Option) -> u32 @@ -877,7 +831,7 @@ 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); - unsafe { DsMakeSpnA(serviceclass.param().abi(), servicename.param().abi(), instancename.param().abi(), instanceport, referrer.param().abi(), core::mem::transmute(pcspnlength), core::mem::transmute(pszspn.unwrap_or(core::mem::zeroed()))) } + unsafe { DsMakeSpnA(serviceclass.param().abi(), servicename.param().abi(), instancename.param().abi(), instanceport, referrer.param().abi(), pcspnlength as _, pszspn.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn DsMakeSpnW(serviceclass: P0, servicename: P1, instancename: P2, instanceport: u16, referrer: P4, pcspnlength: *mut u32, pszspn: Option) -> u32 @@ -888,17 +842,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); - unsafe { DsMakeSpnW(serviceclass.param().abi(), servicename.param().abi(), instancename.param().abi(), instanceport, referrer.param().abi(), core::mem::transmute(pcspnlength), core::mem::transmute(pszspn.unwrap_or(core::mem::zeroed()))) } + unsafe { DsMakeSpnW(serviceclass.param().abi(), servicename.param().abi(), instancename.param().abi(), instanceport, referrer.param().abi(), pcspnlength as _, pszspn.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { DsMapSchemaGuidsA(hds, rguids.len().try_into().unwrap(), core::mem::transmute(rguids.as_ptr()), core::mem::transmute(ppguidmap)) } + unsafe { DsMapSchemaGuidsA(hds, rguids.len().try_into().unwrap(), core::mem::transmute(rguids.as_ptr()), ppguidmap as _) } } #[inline] 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); - unsafe { DsMapSchemaGuidsW(hds, rguids.len().try_into().unwrap(), core::mem::transmute(rguids.as_ptr()), core::mem::transmute(ppguidmap)) } + unsafe { DsMapSchemaGuidsW(hds, rguids.len().try_into().unwrap(), core::mem::transmute(rguids.as_ptr()), ppguidmap as _) } } #[cfg(feature = "Win32_Security_Authentication_Identity")] #[inline] @@ -907,7 +861,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn DsMergeForestTrustInformationW(domainname : windows_core::PCWSTR, newforesttrustinfo : *const super::super::Security::Authentication::Identity:: LSA_FOREST_TRUST_INFORMATION, oldforesttrustinfo : *const super::super::Security::Authentication::Identity:: LSA_FOREST_TRUST_INFORMATION, mergedforesttrustinfo : *mut *mut super::super::Security::Authentication::Identity:: LSA_FOREST_TRUST_INFORMATION) -> u32); - unsafe { DsMergeForestTrustInformationW(domainname.param().abi(), newforesttrustinfo, core::mem::transmute(oldforesttrustinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(mergedforesttrustinfo)) } + unsafe { DsMergeForestTrustInformationW(domainname.param().abi(), newforesttrustinfo, oldforesttrustinfo.unwrap_or(core::mem::zeroed()) as _, mergedforesttrustinfo as _) } } #[inline] 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 @@ -915,7 +869,7 @@ where 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); - unsafe { DsQuerySitesByCostA(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)) } + unsafe { DsQuerySitesByCostA(hds, pszfromsite.param().abi(), core::mem::transmute(rgsztosites.as_ptr()), rgsztosites.len().try_into().unwrap(), dwflags.unwrap_or(core::mem::zeroed()) as _, prgsiteinfo as _) } } #[inline] 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 @@ -923,7 +877,7 @@ where 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); - unsafe { DsQuerySitesByCostW(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)) } + unsafe { DsQuerySitesByCostW(hds, pwszfromsite.param().abi(), core::mem::transmute(rgwsztosites.as_ptr()), rgwsztosites.len().try_into().unwrap(), dwflags.unwrap_or(core::mem::zeroed()) as _, prgsiteinfo as _) } } #[inline] pub unsafe fn DsQuerySitesFree(rgsiteinfo: *const DS_SITE_COST_INFO) { @@ -933,12 +887,12 @@ pub unsafe fn DsQuerySitesFree(rgsiteinfo: *const DS_SITE_COST_INFO) { #[inline] pub unsafe fn DsQuoteRdnValueA(psunquotedrdnvalue: &[u8], pcquotedrdnvaluelength: *mut u32, psquotedrdnvalue: windows_core::PSTR) -> u32 { windows_targets::link!("dsparse.dll" "system" fn DsQuoteRdnValueA(cunquotedrdnvaluelength : u32, psunquotedrdnvalue : windows_core::PCSTR, pcquotedrdnvaluelength : *mut u32, psquotedrdnvalue : windows_core::PSTR) -> u32); - unsafe { DsQuoteRdnValueA(psunquotedrdnvalue.len().try_into().unwrap(), core::mem::transmute(psunquotedrdnvalue.as_ptr()), core::mem::transmute(pcquotedrdnvaluelength), core::mem::transmute(psquotedrdnvalue)) } + unsafe { DsQuoteRdnValueA(psunquotedrdnvalue.len().try_into().unwrap(), core::mem::transmute(psunquotedrdnvalue.as_ptr()), pcquotedrdnvaluelength as _, core::mem::transmute(psquotedrdnvalue)) } } #[inline] pub unsafe fn DsQuoteRdnValueW(psunquotedrdnvalue: &[u16], pcquotedrdnvaluelength: *mut u32, psquotedrdnvalue: windows_core::PWSTR) -> u32 { windows_targets::link!("dsparse.dll" "system" fn DsQuoteRdnValueW(cunquotedrdnvaluelength : u32, psunquotedrdnvalue : windows_core::PCWSTR, pcquotedrdnvaluelength : *mut u32, psquotedrdnvalue : windows_core::PWSTR) -> u32); - unsafe { DsQuoteRdnValueW(psunquotedrdnvalue.len().try_into().unwrap(), core::mem::transmute(psunquotedrdnvalue.as_ptr()), core::mem::transmute(pcquotedrdnvaluelength), core::mem::transmute(psquotedrdnvalue)) } + unsafe { DsQuoteRdnValueW(psunquotedrdnvalue.len().try_into().unwrap(), core::mem::transmute(psunquotedrdnvalue.as_ptr()), pcquotedrdnvaluelength as _, core::mem::transmute(psquotedrdnvalue)) } } #[inline] pub unsafe fn DsRemoveDsDomainA(hds: super::super::Foundation::HANDLE, domaindn: P1) -> u32 @@ -963,7 +917,7 @@ where P2: 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); - unsafe { DsRemoveDsServerA(hds, serverdn.param().abi(), domaindn.param().abi(), core::mem::transmute(flastdcindomain.unwrap_or(core::mem::zeroed())), fcommit.into()) } + unsafe { DsRemoveDsServerA(hds, serverdn.param().abi(), domaindn.param().abi(), flastdcindomain.unwrap_or(core::mem::zeroed()) as _, fcommit.into()) } } #[inline] pub unsafe fn DsRemoveDsServerW(hds: super::super::Foundation::HANDLE, serverdn: P1, domaindn: P2, flastdcindomain: Option<*mut super::super::Foundation::BOOL>, fcommit: bool) -> u32 @@ -972,7 +926,7 @@ where P2: 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); - unsafe { DsRemoveDsServerW(hds, serverdn.param().abi(), domaindn.param().abi(), core::mem::transmute(flastdcindomain.unwrap_or(core::mem::zeroed())), fcommit.into()) } + unsafe { DsRemoveDsServerW(hds, serverdn.param().abi(), domaindn.param().abi(), flastdcindomain.unwrap_or(core::mem::zeroed()) as _, fcommit.into()) } } #[inline] pub unsafe fn DsReplicaAddA(hds: super::super::Foundation::HANDLE, namecontext: P1, sourcedsadn: P2, transportdn: P3, sourcedsaaddress: P4, pschedule: Option<*const SCHEDULE>, options: u32) -> u32 @@ -983,7 +937,7 @@ where P4: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsReplicaAddA(hds : super::super::Foundation:: HANDLE, namecontext : windows_core::PCSTR, sourcedsadn : windows_core::PCSTR, transportdn : windows_core::PCSTR, sourcedsaaddress : windows_core::PCSTR, pschedule : *const SCHEDULE, options : u32) -> u32); - unsafe { DsReplicaAddA(hds, namecontext.param().abi(), sourcedsadn.param().abi(), transportdn.param().abi(), sourcedsaaddress.param().abi(), core::mem::transmute(pschedule.unwrap_or(core::mem::zeroed())), options) } + unsafe { DsReplicaAddA(hds, namecontext.param().abi(), sourcedsadn.param().abi(), transportdn.param().abi(), sourcedsaaddress.param().abi(), pschedule.unwrap_or(core::mem::zeroed()) as _, options) } } #[inline] pub unsafe fn DsReplicaAddW(hds: super::super::Foundation::HANDLE, namecontext: P1, sourcedsadn: P2, transportdn: P3, sourcedsaaddress: P4, pschedule: Option<*const SCHEDULE>, options: u32) -> u32 @@ -994,7 +948,7 @@ where P4: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsReplicaAddW(hds : super::super::Foundation:: HANDLE, namecontext : windows_core::PCWSTR, sourcedsadn : windows_core::PCWSTR, transportdn : windows_core::PCWSTR, sourcedsaaddress : windows_core::PCWSTR, pschedule : *const SCHEDULE, options : u32) -> u32); - unsafe { DsReplicaAddW(hds, namecontext.param().abi(), sourcedsadn.param().abi(), transportdn.param().abi(), sourcedsaaddress.param().abi(), core::mem::transmute(pschedule.unwrap_or(core::mem::zeroed())), options) } + unsafe { DsReplicaAddW(hds, namecontext.param().abi(), sourcedsadn.param().abi(), transportdn.param().abi(), sourcedsaaddress.param().abi(), pschedule.unwrap_or(core::mem::zeroed()) as _, options) } } #[inline] pub unsafe fn DsReplicaConsistencyCheck(hds: super::super::Foundation::HANDLE, taskid: DS_KCC_TASKID, dwflags: u32) -> u32 { @@ -1032,7 +986,7 @@ where 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); - unsafe { DsReplicaGetInfo2W(hds, infotype, pszobject.param().abi(), core::mem::transmute(puuidforsourcedsaobjguid.unwrap_or(core::mem::zeroed())), pszattributename.param().abi(), pszvalue.param().abi(), dwflags, dwenumerationcontext, core::mem::transmute(ppinfo)) } + unsafe { DsReplicaGetInfo2W(hds, infotype, pszobject.param().abi(), puuidforsourcedsaobjguid.unwrap_or(core::mem::zeroed()) as _, pszattributename.param().abi(), pszvalue.param().abi(), dwflags, dwenumerationcontext, ppinfo as _) } } #[inline] 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 @@ -1040,7 +994,7 @@ where 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); - unsafe { DsReplicaGetInfoW(hds, infotype, pszobject.param().abi(), core::mem::transmute(puuidforsourcedsaobjguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppinfo)) } + unsafe { DsReplicaGetInfoW(hds, infotype, pszobject.param().abi(), puuidforsourcedsaobjguid.unwrap_or(core::mem::zeroed()) as _, ppinfo as _) } } #[inline] 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 @@ -1050,7 +1004,7 @@ where 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); - unsafe { DsReplicaModifyA(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())), modifyfields, options) } + unsafe { DsReplicaModifyA(hds, namecontext.param().abi(), puuidsourcedsa.unwrap_or(core::mem::zeroed()) as _, transportdn.param().abi(), sourcedsaaddress.param().abi(), pschedule.unwrap_or(core::mem::zeroed()) as _, replicaflags.unwrap_or(core::mem::zeroed()) as _, modifyfields, options) } } #[inline] 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 @@ -1060,7 +1014,7 @@ where 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); - unsafe { DsReplicaModifyW(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())), replicaflags, modifyfields, options) } + unsafe { DsReplicaModifyW(hds, namecontext.param().abi(), puuidsourcedsa.unwrap_or(core::mem::zeroed()) as _, transportdn.param().abi(), sourcedsaaddress.param().abi(), pschedule.unwrap_or(core::mem::zeroed()) as _, replicaflags, modifyfields, options) } } #[inline] pub unsafe fn DsReplicaSyncA(hds: super::super::Foundation::HANDLE, namecontext: P1, puuiddsasrc: *const windows_core::GUID, options: u32) -> u32 @@ -1076,7 +1030,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsReplicaSyncAllA(hds : super::super::Foundation:: HANDLE, psznamecontext : windows_core::PCSTR, ulflags : u32, pfncallback : isize, pcallbackdata : *const core::ffi::c_void, perrors : *mut *mut *mut DS_REPSYNCALL_ERRINFOA) -> u32); - unsafe { DsReplicaSyncAllA(hds, psznamecontext.param().abi(), ulflags, pfncallback, core::mem::transmute(pcallbackdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(perrors.unwrap_or(core::mem::zeroed()))) } + unsafe { DsReplicaSyncAllA(hds, psznamecontext.param().abi(), ulflags, pfncallback, pcallbackdata.unwrap_or(core::mem::zeroed()) as _, perrors.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -1084,7 +1038,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsReplicaSyncAllW(hds : super::super::Foundation:: HANDLE, psznamecontext : windows_core::PCWSTR, ulflags : u32, pfncallback : isize, pcallbackdata : *const core::ffi::c_void, perrors : *mut *mut *mut DS_REPSYNCALL_ERRINFOW) -> u32); - unsafe { DsReplicaSyncAllW(hds, psznamecontext.param().abi(), ulflags, pfncallback, core::mem::transmute(pcallbackdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(perrors.unwrap_or(core::mem::zeroed()))) } + unsafe { DsReplicaSyncAllW(hds, psznamecontext.param().abi(), ulflags, pfncallback, pcallbackdata.unwrap_or(core::mem::zeroed()) as _, perrors.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn DsReplicaSyncW(hds: super::super::Foundation::HANDLE, namecontext: P1, puuiddsasrc: *const windows_core::GUID, options: u32) -> u32 @@ -1131,7 +1085,7 @@ where #[inline] pub unsafe fn DsRoleFreeMemory(buffer: *mut core::ffi::c_void) { windows_targets::link!("netapi32.dll" "system" fn DsRoleFreeMemory(buffer : *mut core::ffi::c_void)); - unsafe { DsRoleFreeMemory(core::mem::transmute(buffer)) } + unsafe { DsRoleFreeMemory(buffer as _) } } #[inline] pub unsafe fn DsRoleGetPrimaryDomainInformation(lpserver: P0, infolevel: DSROLE_PRIMARY_DOMAIN_INFO_LEVEL, buffer: *mut *mut u8) -> u32 @@ -1139,7 +1093,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn DsRoleGetPrimaryDomainInformation(lpserver : windows_core::PCWSTR, infolevel : DSROLE_PRIMARY_DOMAIN_INFO_LEVEL, buffer : *mut *mut u8) -> u32); - unsafe { DsRoleGetPrimaryDomainInformation(lpserver.param().abi(), infolevel, core::mem::transmute(buffer)) } + unsafe { DsRoleGetPrimaryDomainInformation(lpserver.param().abi(), infolevel, buffer as _) } } #[inline] pub unsafe fn DsServerRegisterSpnA(operation: DS_SPN_WRITE_OP, serviceclass: P1, userobjectdn: P2) -> u32 @@ -1172,12 +1126,12 @@ pub unsafe fn DsUnBindW(phds: *const super::super::Foundation::HANDLE) -> u32 { #[inline] pub unsafe fn DsUnquoteRdnValueA(psquotedrdnvalue: &[u8], pcunquotedrdnvaluelength: *mut u32, psunquotedrdnvalue: windows_core::PSTR) -> u32 { windows_targets::link!("dsparse.dll" "system" fn DsUnquoteRdnValueA(cquotedrdnvaluelength : u32, psquotedrdnvalue : windows_core::PCSTR, pcunquotedrdnvaluelength : *mut u32, psunquotedrdnvalue : windows_core::PSTR) -> u32); - unsafe { DsUnquoteRdnValueA(psquotedrdnvalue.len().try_into().unwrap(), core::mem::transmute(psquotedrdnvalue.as_ptr()), core::mem::transmute(pcunquotedrdnvaluelength), core::mem::transmute(psunquotedrdnvalue)) } + unsafe { DsUnquoteRdnValueA(psquotedrdnvalue.len().try_into().unwrap(), core::mem::transmute(psquotedrdnvalue.as_ptr()), pcunquotedrdnvaluelength as _, core::mem::transmute(psunquotedrdnvalue)) } } #[inline] pub unsafe fn DsUnquoteRdnValueW(psquotedrdnvalue: &[u16], pcunquotedrdnvaluelength: *mut u32, psunquotedrdnvalue: windows_core::PWSTR) -> u32 { windows_targets::link!("dsparse.dll" "system" fn DsUnquoteRdnValueW(cquotedrdnvaluelength : u32, psquotedrdnvalue : windows_core::PCWSTR, pcunquotedrdnvaluelength : *mut u32, psunquotedrdnvalue : windows_core::PWSTR) -> u32); - unsafe { DsUnquoteRdnValueW(psquotedrdnvalue.len().try_into().unwrap(), core::mem::transmute(psquotedrdnvalue.as_ptr()), core::mem::transmute(pcunquotedrdnvaluelength), core::mem::transmute(psunquotedrdnvalue)) } + unsafe { DsUnquoteRdnValueW(psquotedrdnvalue.len().try_into().unwrap(), core::mem::transmute(psquotedrdnvalue.as_ptr()), pcunquotedrdnvaluelength as _, core::mem::transmute(psunquotedrdnvalue)) } } #[inline] pub unsafe fn DsValidateSubnetNameA(subnetname: P0) -> u32 @@ -1214,7 +1168,7 @@ where #[inline] pub unsafe fn FreeADsMem(pmem: *mut core::ffi::c_void) -> super::super::Foundation::BOOL { windows_targets::link!("activeds.dll" "system" fn FreeADsMem(pmem : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { FreeADsMem(core::mem::transmute(pmem)) } + unsafe { FreeADsMem(pmem as _) } } #[inline] pub unsafe fn FreeADsStr(pstr: P0) -> super::super::Foundation::BOOL @@ -1228,12 +1182,12 @@ where #[inline] pub unsafe fn PropVariantToAdsType(pvariant: *mut super::super::System::Variant::VARIANT, dwnumvariant: u32, ppadsvalues: *mut *mut ADSVALUE, pdwnumvalues: *mut u32) -> windows_core::Result<()> { windows_targets::link!("activeds.dll" "system" fn PropVariantToAdsType(pvariant : *mut super::super::System::Variant:: VARIANT, dwnumvariant : u32, ppadsvalues : *mut *mut ADSVALUE, pdwnumvalues : *mut u32) -> windows_core::HRESULT); - unsafe { PropVariantToAdsType(core::mem::transmute(pvariant), dwnumvariant, core::mem::transmute(ppadsvalues), core::mem::transmute(pdwnumvalues)).ok() } + unsafe { PropVariantToAdsType(core::mem::transmute(pvariant), dwnumvariant, ppadsvalues as _, pdwnumvalues as _).ok() } } #[inline] pub unsafe fn ReallocADsMem(poldmem: *mut core::ffi::c_void, cbold: u32, cbnew: u32) -> *mut core::ffi::c_void { windows_targets::link!("activeds.dll" "system" fn ReallocADsMem(poldmem : *mut core::ffi::c_void, cbold : u32, cbnew : u32) -> *mut core::ffi::c_void); - unsafe { ReallocADsMem(core::mem::transmute(poldmem), cbold, cbnew) } + unsafe { ReallocADsMem(poldmem as _, cbold, cbnew) } } #[inline] pub unsafe fn ReallocADsStr(ppstr: *mut windows_core::PWSTR, pstr: P1) -> super::super::Foundation::BOOL @@ -1241,7 +1195,7 @@ where P1: windows_core::Param, { windows_targets::link!("activeds.dll" "system" fn ReallocADsStr(ppstr : *mut windows_core::PWSTR, pstr : windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - unsafe { ReallocADsStr(core::mem::transmute(ppstr), pstr.param().abi()) } + unsafe { ReallocADsStr(ppstr as _, pstr.param().abi()) } } #[cfg(all(feature = "Win32_Security", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] #[inline] @@ -1252,7 +1206,7 @@ where P5: windows_core::Param, { windows_targets::link!("activeds.dll" "system" fn SecurityDescriptorToBinarySD(vvarsecdes : super::super::System::Variant:: VARIANT, ppsecuritydescriptor : *mut super::super::Security:: PSECURITY_DESCRIPTOR, pdwsdlength : *mut u32, pszservername : windows_core::PCWSTR, username : windows_core::PCWSTR, password : windows_core::PCWSTR, dwflags : u32) -> windows_core::HRESULT); - unsafe { SecurityDescriptorToBinarySD(core::mem::transmute_copy(vvarsecdes), core::mem::transmute(ppsecuritydescriptor), core::mem::transmute(pdwsdlength), pszservername.param().abi(), username.param().abi(), password.param().abi(), dwflags).ok() } + unsafe { SecurityDescriptorToBinarySD(core::mem::transmute_copy(vvarsecdes), ppsecuritydescriptor as _, pdwsdlength as _, pszservername.param().abi(), username.param().abi(), password.param().abi(), dwflags).ok() } } pub const ACTRL_DS_CONTROL_ACCESS: u32 = 256u32; pub const ACTRL_DS_CREATE_CHILD: u32 = 1u32; @@ -7566,7 +7520,7 @@ impl IADsExtension { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn PrivateInvoke(&self, dispidmember: i32, riid: *const windows_core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut super::super::System::Variant::VARIANT, pexcepinfo: *mut super::super::System::Com::EXCEPINFO, puargerr: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).PrivateInvoke)(windows_core::Interface::as_raw(self), dispidmember, riid, lcid, wflags, pdispparams, core::mem::transmute(pvarresult), core::mem::transmute(pexcepinfo), core::mem::transmute(puargerr)).ok() } + unsafe { (windows_core::Interface::vtable(self).PrivateInvoke)(windows_core::Interface::as_raw(self), dispidmember, riid, lcid, wflags, pdispparams, core::mem::transmute(pvarresult), core::mem::transmute(pexcepinfo), puargerr as _).ok() } } } #[repr(C)] @@ -12378,7 +12332,7 @@ windows_core::imp::interface_hierarchy!(IADsPropertyValue2, windows_core::IUnkno impl IADsPropertyValue2 { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetObjectProperty(&self, lnadstype: *mut i32, pvprop: *mut super::super::System::Variant::VARIANT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetObjectProperty)(windows_core::Interface::as_raw(self), core::mem::transmute(lnadstype), core::mem::transmute(pvprop)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetObjectProperty)(windows_core::Interface::as_raw(self), lnadstype as _, core::mem::transmute(pvprop)).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn PutObjectProperty(&self, lnadstype: i32, vprop: &super::super::System::Variant::VARIANT) -> windows_core::Result<()> { @@ -16131,7 +16085,7 @@ impl IDirectoryObject { } } pub unsafe fn GetObjectAttributes(&self, pattributenames: *const windows_core::PCWSTR, dwnumberattributes: u32, ppattributeentries: *mut *mut ADS_ATTR_INFO, pdwnumattributesreturned: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetObjectAttributes)(windows_core::Interface::as_raw(self), pattributenames, dwnumberattributes, core::mem::transmute(ppattributeentries), core::mem::transmute(pdwnumattributesreturned)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetObjectAttributes)(windows_core::Interface::as_raw(self), pattributenames, dwnumberattributes, ppattributeentries as _, pdwnumattributesreturned as _).ok() } } pub unsafe fn SetObjectAttributes(&self, pattributeentries: *const ADS_ATTR_INFO, dwnumattributes: u32) -> windows_core::Result { unsafe { @@ -16405,13 +16359,13 @@ impl IDirectorySearch { unsafe { (windows_core::Interface::vtable(self).GetPreviousRow)(windows_core::Interface::as_raw(self), hsearchresult) } } pub unsafe fn GetNextColumnName(&self, hsearchhandle: ADS_SEARCH_HANDLE, ppszcolumnname: *mut windows_core::PWSTR) -> windows_core::HRESULT { - unsafe { (windows_core::Interface::vtable(self).GetNextColumnName)(windows_core::Interface::as_raw(self), hsearchhandle, core::mem::transmute(ppszcolumnname)) } + unsafe { (windows_core::Interface::vtable(self).GetNextColumnName)(windows_core::Interface::as_raw(self), hsearchhandle, ppszcolumnname as _) } } pub unsafe fn GetColumn(&self, hsearchresult: ADS_SEARCH_HANDLE, szcolumnname: P1, psearchcolumn: *mut ADS_SEARCH_COLUMN) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetColumn)(windows_core::Interface::as_raw(self), hsearchresult, szcolumnname.param().abi(), core::mem::transmute(psearchcolumn)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetColumn)(windows_core::Interface::as_raw(self), hsearchresult, szcolumnname.param().abi(), psearchcolumn as _).ok() } } pub unsafe fn FreeColumn(&self, psearchcolumn: *const ADS_SEARCH_COLUMN) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).FreeColumn)(windows_core::Interface::as_raw(self), psearchcolumn).ok() } @@ -16610,7 +16564,7 @@ impl IDsAdminNewObj { unsafe { (windows_core::Interface::vtable(self).SetButtons)(windows_core::Interface::as_raw(self), ncurrindex, bvalid.into()).ok() } } pub unsafe fn GetPageCounts(&self, pntotal: *mut i32, pnstartindex: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPageCounts)(windows_core::Interface::as_raw(self), core::mem::transmute(pntotal), core::mem::transmute(pnstartindex)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPageCounts)(windows_core::Interface::as_raw(self), pntotal as _, pnstartindex as _).ok() } } } #[repr(C)] @@ -16659,7 +16613,7 @@ impl IDsAdminNewObjExt { P2: windows_core::Param, P3: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), padscontainerobj.param().abi(), padscopysource.param().abi(), lpszclassname.param().abi(), pdsadminnewobj.param().abi(), pdispinfo as _).ok() } } #[cfg(feature = "Win32_UI_Controls")] pub unsafe fn AddPages(&self, lpfnaddpage: super::super::UI::Controls::LPFNSVADDPROPSHEETPAGE, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { @@ -16817,7 +16771,7 @@ impl IDsAdminNotifyHandler { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), pextrainfo.param().abi(), core::mem::transmute(pueventflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), pextrainfo.param().abi(), pueventflags as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Begin(&self, uevent: u32, parg1: P1, parg2: P2, puflags: *mut u32, pbstr: *mut windows_core::BSTR) -> windows_core::Result<()> @@ -16825,7 +16779,7 @@ impl IDsAdminNotifyHandler { P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Begin)(windows_core::Interface::as_raw(self), uevent, parg1.param().abi(), parg2.param().abi(), core::mem::transmute(puflags), core::mem::transmute(pbstr)).ok() } + unsafe { (windows_core::Interface::vtable(self).Begin)(windows_core::Interface::as_raw(self), uevent, parg1.param().abi(), parg2.param().abi(), puflags as _, core::mem::transmute(pbstr)).ok() } } pub unsafe fn Notify(&self, nitem: u32, uflags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Notify)(windows_core::Interface::as_raw(self), nitem, uflags).ok() } @@ -16900,13 +16854,13 @@ windows_core::imp::define_interface!(IDsBrowseDomainTree, IDsBrowseDomainTree_Vt windows_core::imp::interface_hierarchy!(IDsBrowseDomainTree, windows_core::IUnknown); impl IDsBrowseDomainTree { pub unsafe fn BrowseTo(&self, hwndparent: super::super::Foundation::HWND, ppsztargetpath: *mut windows_core::PWSTR, dwflags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).BrowseTo)(windows_core::Interface::as_raw(self), hwndparent, core::mem::transmute(ppsztargetpath), dwflags).ok() } + unsafe { (windows_core::Interface::vtable(self).BrowseTo)(windows_core::Interface::as_raw(self), hwndparent, ppsztargetpath as _, dwflags).ok() } } pub unsafe fn GetDomains(&self, ppdomaintree: *mut *mut DOMAIN_TREE, dwflags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDomains)(windows_core::Interface::as_raw(self), core::mem::transmute(ppdomaintree), dwflags).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDomains)(windows_core::Interface::as_raw(self), ppdomaintree as _, dwflags).ok() } } pub unsafe fn FreeDomains(&self, ppdomaintree: *mut *mut DOMAIN_TREE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).FreeDomains)(windows_core::Interface::as_raw(self), core::mem::transmute(ppdomaintree)).ok() } + unsafe { (windows_core::Interface::vtable(self).FreeDomains)(windows_core::Interface::as_raw(self), ppdomaintree as _).ok() } } pub unsafe fn FlushCachedDomains(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).FlushCachedDomains)(windows_core::Interface::as_raw(self)).ok() } @@ -17000,13 +16954,13 @@ impl IDsDisplaySpecifier { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetDisplaySpecifier)(windows_core::Interface::as_raw(self), pszobjectclass.param().abi(), riid, core::mem::transmute(ppv)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDisplaySpecifier)(windows_core::Interface::as_raw(self), pszobjectclass.param().abi(), riid, ppv as _).ok() } } pub unsafe fn GetIconLocation(&self, pszobjectclass: P0, dwflags: u32, pszbuffer: &mut [u16], presid: *mut i32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetIconLocation)(windows_core::Interface::as_raw(self), pszobjectclass.param().abi(), dwflags, core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len().try_into().unwrap(), core::mem::transmute(presid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIconLocation)(windows_core::Interface::as_raw(self), pszobjectclass.param().abi(), dwflags, core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len().try_into().unwrap(), presid as _).ok() } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn GetIcon(&self, pszobjectclass: P0, dwflags: u32, cxicon: i32, cyicon: i32) -> super::super::UI::WindowsAndMessaging::HICON @@ -17039,7 +16993,7 @@ impl IDsDisplaySpecifier { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetClassCreationInfo)(windows_core::Interface::as_raw(self), pszobjectclass.param().abi(), core::mem::transmute(ppdscci)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClassCreationInfo)(windows_core::Interface::as_raw(self), pszobjectclass.param().abi(), ppdscci as _).ok() } } pub unsafe fn EnumClassAttributes(&self, pszobjectclass: P0, pcbenum: LPDSENUMATTRIBUTES, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> where @@ -17180,7 +17134,7 @@ windows_core::imp::define_interface!(IDsObjectPicker, IDsObjectPicker_Vtbl, 0x0c windows_core::imp::interface_hierarchy!(IDsObjectPicker, windows_core::IUnknown); impl IDsObjectPicker { pub unsafe fn Initialize(&self, pinitinfo: *mut DSOP_INIT_INFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(pinitinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), pinitinfo as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn InvokeDialog(&self, hwndparent: super::super::Foundation::HWND) -> windows_core::Result { @@ -17320,21 +17274,21 @@ impl IPersistQuery { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ReadInt)(windows_core::Interface::as_raw(self), psection.param().abi(), pvaluename.param().abi(), core::mem::transmute(pvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadInt)(windows_core::Interface::as_raw(self), psection.param().abi(), pvaluename.param().abi(), pvalue as _).ok() } } pub unsafe fn WriteStruct(&self, psection: P0, pvaluename: P1, pstruct: *mut core::ffi::c_void, cbstruct: u32) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).WriteStruct)(windows_core::Interface::as_raw(self), psection.param().abi(), pvaluename.param().abi(), core::mem::transmute(pstruct), cbstruct).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteStruct)(windows_core::Interface::as_raw(self), psection.param().abi(), pvaluename.param().abi(), pstruct as _, cbstruct).ok() } } pub unsafe fn ReadStruct(&self, psection: P0, pvaluename: P1, pstruct: *mut core::ffi::c_void, cbstruct: u32) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ReadStruct)(windows_core::Interface::as_raw(self), psection.param().abi(), pvaluename.param().abi(), core::mem::transmute(pstruct), cbstruct).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadStruct)(windows_core::Interface::as_raw(self), psection.param().abi(), pvaluename.param().abi(), pstruct as _, cbstruct).ok() } } pub unsafe fn Clear(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Clear)(windows_core::Interface::as_raw(self)).ok() } @@ -17451,7 +17405,7 @@ impl IPrivateDispatch { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn ADSIInvoke(&self, dispidmember: i32, riid: *const windows_core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut super::super::System::Variant::VARIANT, pexcepinfo: *mut super::super::System::Com::EXCEPINFO, puargerr: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ADSIInvoke)(windows_core::Interface::as_raw(self), dispidmember, riid, lcid, wflags, pdispparams, core::mem::transmute(pvarresult), core::mem::transmute(pexcepinfo), core::mem::transmute(puargerr)).ok() } + unsafe { (windows_core::Interface::vtable(self).ADSIInvoke)(windows_core::Interface::as_raw(self), dispidmember, riid, lcid, wflags, pdispparams, core::mem::transmute(pvarresult), core::mem::transmute(pexcepinfo), puargerr as _).ok() } } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/Networking/BackgroundIntelligentTransferService/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/BackgroundIntelligentTransferService/mod.rs index ce2007a3fc..18aedbe044 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/BackgroundIntelligentTransferService/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/BackgroundIntelligentTransferService/mod.rs @@ -920,7 +920,7 @@ windows_core::imp::define_interface!(IBackgroundCopyError, IBackgroundCopyError_ windows_core::imp::interface_hierarchy!(IBackgroundCopyError, windows_core::IUnknown); impl IBackgroundCopyError { pub unsafe fn GetError(&self, pcontext: *mut BG_ERROR_CONTEXT, pcode: *mut windows_core::HRESULT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetError)(windows_core::Interface::as_raw(self), core::mem::transmute(pcontext), core::mem::transmute(pcode)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetError)(windows_core::Interface::as_raw(self), pcontext as _, pcode as _).ok() } } pub unsafe fn GetFile(&self) -> windows_core::Result { unsafe { @@ -1049,7 +1049,7 @@ impl IBackgroundCopyFile { } } pub unsafe fn GetProgress(&self, pval: *mut BG_FILE_PROGRESS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProgress)(windows_core::Interface::as_raw(self), core::mem::transmute(pval)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProgress)(windows_core::Interface::as_raw(self), pval as _).ok() } } } #[repr(C)] @@ -1118,7 +1118,7 @@ impl core::ops::Deref for IBackgroundCopyFile2 { windows_core::imp::interface_hierarchy!(IBackgroundCopyFile2, windows_core::IUnknown, IBackgroundCopyFile); impl IBackgroundCopyFile2 { pub unsafe fn GetFileRanges(&self, rangecount: *mut u32, ranges: *mut *mut BG_FILE_RANGE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFileRanges)(windows_core::Interface::as_raw(self), core::mem::transmute(rangecount), core::mem::transmute(ranges)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFileRanges)(windows_core::Interface::as_raw(self), rangecount as _, ranges as _).ok() } } pub unsafe fn SetRemoteName(&self, val: P0) -> windows_core::Result<()> where @@ -1274,7 +1274,7 @@ impl core::ops::Deref for IBackgroundCopyFile4 { windows_core::imp::interface_hierarchy!(IBackgroundCopyFile4, windows_core::IUnknown, IBackgroundCopyFile, IBackgroundCopyFile2, IBackgroundCopyFile3); impl IBackgroundCopyFile4 { pub unsafe fn GetPeerDownloadStats(&self, pfromorigin: *mut u64, pfrompeers: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPeerDownloadStats)(windows_core::Interface::as_raw(self), core::mem::transmute(pfromorigin), core::mem::transmute(pfrompeers)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPeerDownloadStats)(windows_core::Interface::as_raw(self), pfromorigin as _, pfrompeers as _).ok() } } } #[repr(C)] @@ -1376,7 +1376,7 @@ impl IBackgroundCopyFile6 { unsafe { (windows_core::Interface::vtable(self).RequestFileRanges)(windows_core::Interface::as_raw(self), ranges.len().try_into().unwrap(), core::mem::transmute(ranges.as_ptr())).ok() } } pub unsafe fn GetFilledFileRanges(&self, rangecount: *mut u32, ranges: *mut *mut BG_FILE_RANGE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFilledFileRanges)(windows_core::Interface::as_raw(self), core::mem::transmute(rangecount), core::mem::transmute(ranges)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFilledFileRanges)(windows_core::Interface::as_raw(self), rangecount as _, ranges as _).ok() } } } #[repr(C)] @@ -1444,7 +1444,7 @@ impl IBackgroundCopyGroup { } } pub unsafe fn GetStatus(&self, pdwstatus: *mut u32, pdwjobindex: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwstatus), core::mem::transmute(pdwjobindex)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), pdwstatus as _, pdwjobindex as _).ok() } } pub unsafe fn GetJob(&self, jobid: windows_core::GUID) -> windows_core::Result { unsafe { @@ -1754,10 +1754,10 @@ impl IBackgroundCopyJob { } } pub unsafe fn GetProgress(&self, pval: *mut BG_JOB_PROGRESS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProgress)(windows_core::Interface::as_raw(self), core::mem::transmute(pval)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProgress)(windows_core::Interface::as_raw(self), pval as _).ok() } } pub unsafe fn GetTimes(&self, pval: *mut BG_JOB_TIMES) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTimes)(windows_core::Interface::as_raw(self), core::mem::transmute(pval)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTimes)(windows_core::Interface::as_raw(self), pval as _).ok() } } pub unsafe fn GetState(&self) -> windows_core::Result { unsafe { @@ -1863,7 +1863,7 @@ impl IBackgroundCopyJob { unsafe { (windows_core::Interface::vtable(self).SetProxySettings)(windows_core::Interface::as_raw(self), proxyusage, proxylist.param().abi(), proxybypasslist.param().abi()).ok() } } pub unsafe fn GetProxySettings(&self, pproxyusage: *mut BG_JOB_PROXY_USAGE, pproxylist: *mut windows_core::PWSTR, pproxybypasslist: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProxySettings)(windows_core::Interface::as_raw(self), core::mem::transmute(pproxyusage), core::mem::transmute(pproxylist), core::mem::transmute(pproxybypasslist)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProxySettings)(windows_core::Interface::as_raw(self), pproxyusage as _, pproxylist as _, pproxybypasslist as _).ok() } } pub unsafe fn TakeOwnership(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).TakeOwnership)(windows_core::Interface::as_raw(self)).ok() } @@ -2271,7 +2271,7 @@ impl IBackgroundCopyJob1 { } } pub unsafe fn GetStatus(&self, pdwstatus: *mut u32, pdwwin32result: *mut u32, pdwtransportresult: *mut u32, pdwnumofretries: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwstatus), core::mem::transmute(pdwwin32result), core::mem::transmute(pdwtransportresult), core::mem::transmute(pdwnumofretries)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), pdwstatus as _, pdwwin32result as _, pdwtransportresult as _, pdwnumofretries as _).ok() } } pub unsafe fn AddFiles(&self, ppfileset: &[*const FILESETINFO]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).AddFiles)(windows_core::Interface::as_raw(self), ppfileset.len().try_into().unwrap(), core::mem::transmute(ppfileset.as_ptr())).ok() } @@ -2428,13 +2428,13 @@ impl IBackgroundCopyJob2 { unsafe { (windows_core::Interface::vtable(self).SetNotifyCmdLine)(windows_core::Interface::as_raw(self), program.param().abi(), parameters.param().abi()).ok() } } pub unsafe fn GetNotifyCmdLine(&self, pprogram: *mut windows_core::PWSTR, pparameters: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNotifyCmdLine)(windows_core::Interface::as_raw(self), core::mem::transmute(pprogram), core::mem::transmute(pparameters)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNotifyCmdLine)(windows_core::Interface::as_raw(self), pprogram as _, pparameters as _).ok() } } pub unsafe fn GetReplyProgress(&self, pprogress: *mut BG_JOB_REPLY_PROGRESS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetReplyProgress)(windows_core::Interface::as_raw(self), core::mem::transmute(pprogress)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetReplyProgress)(windows_core::Interface::as_raw(self), pprogress as _).ok() } } pub unsafe fn GetReplyData(&self, ppbuffer: *mut *mut u8, plength: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetReplyData)(windows_core::Interface::as_raw(self), core::mem::transmute(ppbuffer), core::mem::transmute(plength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetReplyData)(windows_core::Interface::as_raw(self), ppbuffer as _, plength as _).ok() } } pub unsafe fn SetReplyFileName(&self, replyfilename: P0) -> windows_core::Result<()> where @@ -2857,7 +2857,7 @@ impl IBackgroundCopyJobHttpOptions { unsafe { (windows_core::Interface::vtable(self).RemoveClientCertificate)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetClientCertificate(&self, pstorelocation: *mut BG_CERT_STORE_LOCATION, pstorename: *mut windows_core::PWSTR, ppcerthashblob: *mut *mut u8, psubjectname: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClientCertificate)(windows_core::Interface::as_raw(self), core::mem::transmute(pstorelocation), core::mem::transmute(pstorename), core::mem::transmute(ppcerthashblob), core::mem::transmute(psubjectname)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClientCertificate)(windows_core::Interface::as_raw(self), pstorelocation as _, pstorename as _, ppcerthashblob as _, psubjectname as _).ok() } } pub unsafe fn SetCustomHeaders(&self, requestheaders: P0) -> windows_core::Result<()> where @@ -3106,7 +3106,7 @@ impl IBackgroundCopyManager { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateJob)(windows_core::Interface::as_raw(self), displayname.param().abi(), r#type, core::mem::transmute(pjobid), core::mem::transmute(ppjob)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateJob)(windows_core::Interface::as_raw(self), displayname.param().abi(), r#type, pjobid as _, core::mem::transmute(ppjob)).ok() } } pub unsafe fn GetJob(&self, jobid: *const windows_core::GUID) -> windows_core::Result { unsafe { @@ -3683,7 +3683,7 @@ impl IBitsPeerCacheRecord { unsafe { (windows_core::Interface::vtable(self).IsFileValidated)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetFileRanges(&self, prangecount: *mut u32, ppranges: *mut *mut BG_FILE_RANGE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFileRanges)(windows_core::Interface::as_raw(self), core::mem::transmute(prangecount), core::mem::transmute(ppranges)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFileRanges)(windows_core::Interface::as_raw(self), prangecount as _, ppranges as _).ok() } } } #[repr(C)] @@ -3899,7 +3899,7 @@ windows_core::imp::define_interface!(IEnumBackgroundCopyFiles, IEnumBackgroundCo windows_core::imp::interface_hierarchy!(IEnumBackgroundCopyFiles, windows_core::IUnknown); impl IEnumBackgroundCopyFiles { pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -3998,7 +3998,7 @@ windows_core::imp::define_interface!(IEnumBackgroundCopyGroups, IEnumBackgroundC windows_core::imp::interface_hierarchy!(IEnumBackgroundCopyGroups, windows_core::IUnknown); impl IEnumBackgroundCopyGroups { pub unsafe fn Next(&self, rgelt: &mut [windows_core::GUID], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -4097,7 +4097,7 @@ windows_core::imp::define_interface!(IEnumBackgroundCopyJobs, IEnumBackgroundCop windows_core::imp::interface_hierarchy!(IEnumBackgroundCopyJobs, windows_core::IUnknown); impl IEnumBackgroundCopyJobs { pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -4196,7 +4196,7 @@ windows_core::imp::define_interface!(IEnumBackgroundCopyJobs1, IEnumBackgroundCo windows_core::imp::interface_hierarchy!(IEnumBackgroundCopyJobs1, windows_core::IUnknown); impl IEnumBackgroundCopyJobs1 { pub unsafe fn Next(&self, rgelt: &mut [windows_core::GUID], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -4295,7 +4295,7 @@ windows_core::imp::define_interface!(IEnumBitsPeerCacheRecords, IEnumBitsPeerCac windows_core::imp::interface_hierarchy!(IEnumBitsPeerCacheRecords, windows_core::IUnknown); impl IEnumBitsPeerCacheRecords { pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -4394,7 +4394,7 @@ windows_core::imp::define_interface!(IEnumBitsPeers, IEnumBitsPeers_Vtbl, 0x659c windows_core::imp::interface_hierarchy!(IEnumBitsPeers, windows_core::IUnknown); impl IEnumBitsPeers { pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } 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 b43b3d6645..f3c190d10a 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/Clustering/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/Clustering/mod.rs @@ -43,7 +43,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn AddClusterNode(hcluster : HCLUSTER, lpsznodename : windows_core::PCWSTR, pfnprogresscallback : PCLUSTER_SETUP_PROGRESS_CALLBACK, pvcallbackarg : *const core::ffi::c_void) -> HNODE); - unsafe { AddClusterNode(hcluster, lpsznodename.param().abi(), core::mem::transmute(pfnprogresscallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvcallbackarg.unwrap_or(core::mem::zeroed()))) } + unsafe { AddClusterNode(hcluster, lpsznodename.param().abi(), pfnprogresscallback.unwrap_or(core::mem::zeroed()) as _, pvcallbackarg.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn AddClusterNodeEx(hcluster: HCLUSTER, lpsznodename: P1, dwflags: u32, pfnprogresscallback: Option, pvcallbackarg: Option<*const core::ffi::c_void>) -> HNODE @@ -51,7 +51,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn AddClusterNodeEx(hcluster : HCLUSTER, lpsznodename : windows_core::PCWSTR, dwflags : u32, pfnprogresscallback : PCLUSTER_SETUP_PROGRESS_CALLBACK, pvcallbackarg : *const core::ffi::c_void) -> HNODE); - unsafe { AddClusterNodeEx(hcluster, lpsznodename.param().abi(), dwflags, core::mem::transmute(pfnprogresscallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvcallbackarg.unwrap_or(core::mem::zeroed()))) } + unsafe { AddClusterNodeEx(hcluster, lpsznodename.param().abi(), dwflags, pfnprogresscallback.unwrap_or(core::mem::zeroed()) as _, pvcallbackarg.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn AddClusterResourceDependency(hresource: HRESOURCE, hdependson: HRESOURCE) -> u32 { @@ -87,7 +87,7 @@ where 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); - unsafe { AddClusterStorageNode(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()) } + unsafe { AddClusterStorageNode(hcluster, lpsznodename.param().abi(), pfnprogresscallback.unwrap_or(core::mem::zeroed()) as _, pvcallbackarg.unwrap_or(core::mem::zeroed()) as _, lpszclusterstoragenodedescription.param().abi(), lpszclusterstoragenodelocation.param().abi()) } } #[inline] pub unsafe fn AddCrossClusterGroupSetDependency(hdependentgroupset: HGROUPSET, lpremoteclustername: P1, lpremotegroupsetname: P2) -> u32 @@ -192,7 +192,7 @@ pub unsafe fn ClusAddClusterHealthFault(hcluster: HCLUSTER, failure: *const CLUS #[inline] 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); - unsafe { ClusGetClusterHealthFaults(hcluster, core::mem::transmute(objects), flags) } + unsafe { ClusGetClusterHealthFaults(hcluster, objects as _, flags) } } #[inline] pub unsafe fn ClusRemoveClusterHealthFault(hcluster: HCLUSTER, id: P1, flags: u32) -> u32 @@ -205,12 +205,12 @@ where #[inline] pub unsafe fn ClusWorkerCheckTerminate(lpworker: *mut CLUS_WORKER) -> super::super::Foundation::BOOL { windows_targets::link!("resutils.dll" "system" fn ClusWorkerCheckTerminate(lpworker : *mut CLUS_WORKER) -> super::super::Foundation:: BOOL); - unsafe { ClusWorkerCheckTerminate(core::mem::transmute(lpworker)) } + unsafe { ClusWorkerCheckTerminate(lpworker as _) } } #[inline] pub unsafe fn ClusWorkerCreate(lpworker: *mut CLUS_WORKER, lpstartaddress: PWORKER_START_ROUTINE, lpparameter: *mut core::ffi::c_void) -> u32 { windows_targets::link!("resutils.dll" "system" fn ClusWorkerCreate(lpworker : *mut CLUS_WORKER, lpstartaddress : PWORKER_START_ROUTINE, lpparameter : *mut core::ffi::c_void) -> u32); - unsafe { ClusWorkerCreate(core::mem::transmute(lpworker), lpstartaddress, core::mem::transmute(lpparameter)) } + unsafe { ClusWorkerCreate(lpworker as _, lpstartaddress, lpparameter as _) } } #[inline] pub unsafe fn ClusWorkerTerminate(lpworker: *const CLUS_WORKER) { @@ -220,7 +220,7 @@ pub unsafe fn ClusWorkerTerminate(lpworker: *const CLUS_WORKER) { #[inline] pub unsafe fn ClusWorkerTerminateEx(clusworker: *mut CLUS_WORKER, timeoutinmilliseconds: u32, waitonly: bool) -> u32 { windows_targets::link!("resutils.dll" "system" fn ClusWorkerTerminateEx(clusworker : *mut CLUS_WORKER, timeoutinmilliseconds : u32, waitonly : super::super::Foundation:: BOOL) -> u32); - unsafe { ClusWorkerTerminateEx(core::mem::transmute(clusworker), timeoutinmilliseconds, waitonly.into()) } + unsafe { ClusWorkerTerminateEx(clusworker as _, timeoutinmilliseconds, waitonly.into()) } } #[inline] pub unsafe fn ClusWorkersTerminate(clusworkers: &mut [*mut CLUS_WORKER], timeoutinmilliseconds: u32, waitonly: bool) -> u32 { @@ -264,7 +264,7 @@ where P1: 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); - unsafe { ClusterAffinityRuleControl(hcluster, affinityrulename.param().abi(), core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), cbinbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), cboutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed()))) } + unsafe { ClusterAffinityRuleControl(hcluster, affinityrulename.param().abi(), hhostnode.unwrap_or(core::mem::zeroed()) as _, dwcontrolcode, lpinbuffer.unwrap_or(core::mem::zeroed()) as _, cbinbuffersize, lpoutbuffer.unwrap_or(core::mem::zeroed()) as _, cboutbuffersize, lpbytesreturned.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ClusterClearBackupStateForSharedVolume(lpszvolumepathname: P0) -> u32 @@ -287,7 +287,7 @@ pub unsafe fn ClusterCloseEnumEx(hclusterenum: HCLUSENUMEX) -> u32 { #[inline] 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); - unsafe { ClusterControl(hcluster, core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), noutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed()))) } + unsafe { ClusterControl(hcluster, hhostnode.unwrap_or(core::mem::zeroed()) as _, dwcontrolcode, lpinbuffer.unwrap_or(core::mem::zeroed()) as _, ninbuffersize, lpoutbuffer.unwrap_or(core::mem::zeroed()) as _, noutbuffersize, lpbytesreturned.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -295,7 +295,7 @@ where 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); - unsafe { ClusterControlEx(hcluster, core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), noutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed())), lpszreason.param().abi()) } + unsafe { ClusterControlEx(hcluster, hhostnode.unwrap_or(core::mem::zeroed()) as _, dwcontrolcode, lpinbuffer.unwrap_or(core::mem::zeroed()) as _, ninbuffersize, lpoutbuffer.unwrap_or(core::mem::zeroed()) as _, noutbuffersize, lpbytesreturned.unwrap_or(core::mem::zeroed()) as _, lpszreason.param().abi()) } } #[inline] pub unsafe fn ClusterCreateAffinityRule(hcluster: HCLUSTER, rulename: P1, ruletype: CLUS_AFFINITY_RULE_TYPE) -> u32 @@ -308,22 +308,22 @@ where #[inline] 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); - unsafe { ClusterDecrypt(hcluscryptprovider, pcryptinput, cbcryptinput, core::mem::transmute(ppcryptoutput), core::mem::transmute(pcbcryptoutput)) } + unsafe { ClusterDecrypt(hcluscryptprovider, pcryptinput, cbcryptinput, ppcryptoutput as _, pcbcryptoutput as _) } } #[inline] 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); - unsafe { ClusterEncrypt(hcluscryptprovider, core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap(), core::mem::transmute(ppdata), core::mem::transmute(pcbdata)) } + unsafe { ClusterEncrypt(hcluscryptprovider, core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap(), ppdata as _, pcbdata as _) } } #[inline] 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); - unsafe { ClusterEnum(henum, dwindex, core::mem::transmute(lpdwtype), core::mem::transmute(lpszname), core::mem::transmute(lpcchname)) } + unsafe { ClusterEnum(henum, dwindex, lpdwtype as _, core::mem::transmute(lpszname), lpcchname as _) } } #[inline] 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); - unsafe { ClusterEnumEx(hclusterenum, dwindex, core::mem::transmute(pitem), core::mem::transmute(cbitem)) } + unsafe { ClusterEnumEx(hclusterenum, dwindex, pitem as _, cbitem as _) } } #[inline] pub unsafe fn ClusterGetEnumCount(henum: HCLUSENUM) -> u32 { @@ -364,7 +364,7 @@ pub unsafe fn ClusterGroupCloseEnumEx(hgroupenumex: HGROUPENUMEX) -> u32 { #[inline] 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); - unsafe { ClusterGroupControl(hgroup, core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), noutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed()))) } + unsafe { ClusterGroupControl(hgroup, hhostnode.unwrap_or(core::mem::zeroed()) as _, dwcontrolcode, lpinbuffer.unwrap_or(core::mem::zeroed()) as _, ninbuffersize, lpoutbuffer.unwrap_or(core::mem::zeroed()) as _, noutbuffersize, lpbytesreturned.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -372,17 +372,17 @@ where 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); - unsafe { ClusterGroupControlEx(hgroup, core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), noutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed())), lpszreason.param().abi()) } + unsafe { ClusterGroupControlEx(hgroup, hhostnode.unwrap_or(core::mem::zeroed()) as _, dwcontrolcode, lpinbuffer.unwrap_or(core::mem::zeroed()) as _, ninbuffersize, lpoutbuffer.unwrap_or(core::mem::zeroed()) as _, noutbuffersize, lpbytesreturned.unwrap_or(core::mem::zeroed()) as _, lpszreason.param().abi()) } } #[inline] 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); - unsafe { ClusterGroupEnum(hgroupenum, dwindex, core::mem::transmute(lpdwtype), core::mem::transmute(lpszresourcename), core::mem::transmute(lpcchname)) } + unsafe { ClusterGroupEnum(hgroupenum, dwindex, lpdwtype as _, core::mem::transmute(lpszresourcename), lpcchname as _) } } #[inline] 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); - unsafe { ClusterGroupEnumEx(hgroupenumex, dwindex, core::mem::transmute(pitem), core::mem::transmute(cbitem)) } + unsafe { ClusterGroupEnumEx(hgroupenumex, dwindex, pitem as _, cbitem as _) } } #[inline] pub unsafe fn ClusterGroupGetEnumCount(hgroupenum: HGROUPENUM) -> u32 { @@ -416,7 +416,7 @@ pub unsafe fn ClusterGroupSetCloseEnum(hgroupsetenum: HGROUPSETENUM) -> u32 { #[inline] 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); - unsafe { ClusterGroupSetControl(hgroupset, core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), cbinbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), cboutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed()))) } + unsafe { ClusterGroupSetControl(hgroupset, hhostnode.unwrap_or(core::mem::zeroed()) as _, dwcontrolcode, lpinbuffer.unwrap_or(core::mem::zeroed()) as _, cbinbuffersize, lpoutbuffer.unwrap_or(core::mem::zeroed()) as _, cboutbuffersize, lpbytesreturned.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -424,12 +424,12 @@ where 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); - unsafe { ClusterGroupSetControlEx(hgroupset, core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), cbinbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), cboutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed())), lpszreason.param().abi()) } + unsafe { ClusterGroupSetControlEx(hgroupset, hhostnode.unwrap_or(core::mem::zeroed()) as _, dwcontrolcode, lpinbuffer.unwrap_or(core::mem::zeroed()) as _, cbinbuffersize, lpoutbuffer.unwrap_or(core::mem::zeroed()) as _, cboutbuffersize, lpbytesreturned.unwrap_or(core::mem::zeroed()) as _, lpszreason.param().abi()) } } #[inline] 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); - unsafe { ClusterGroupSetEnum(hgroupsetenum, dwindex, core::mem::transmute(lpszname), core::mem::transmute(lpcchname)) } + unsafe { ClusterGroupSetEnum(hgroupsetenum, dwindex, core::mem::transmute(lpszname), lpcchname as _) } } #[inline] pub unsafe fn ClusterGroupSetGetEnumCount(hgroupsetenum: HGROUPSETENUM) -> u32 { @@ -457,7 +457,7 @@ pub unsafe fn ClusterNetInterfaceCloseEnum(hnetinterfaceenum: HNETINTERFACEENUM) #[inline] 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); - unsafe { ClusterNetInterfaceControl(hnetinterface, core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), noutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed()))) } + unsafe { ClusterNetInterfaceControl(hnetinterface, hhostnode.unwrap_or(core::mem::zeroed()) as _, dwcontrolcode, lpinbuffer.unwrap_or(core::mem::zeroed()) as _, ninbuffersize, lpoutbuffer.unwrap_or(core::mem::zeroed()) as _, noutbuffersize, lpbytesreturned.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -465,12 +465,12 @@ where 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); - unsafe { ClusterNetInterfaceControlEx(hnetinterface, core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), noutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed())), lpszreason.param().abi()) } + unsafe { ClusterNetInterfaceControlEx(hnetinterface, hhostnode.unwrap_or(core::mem::zeroed()) as _, dwcontrolcode, lpinbuffer.unwrap_or(core::mem::zeroed()) as _, ninbuffersize, lpoutbuffer.unwrap_or(core::mem::zeroed()) as _, noutbuffersize, lpbytesreturned.unwrap_or(core::mem::zeroed()) as _, lpszreason.param().abi()) } } #[inline] 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); - unsafe { ClusterNetInterfaceEnum(hnetinterfaceenum, dwindex, core::mem::transmute(lpszname), core::mem::transmute(lpcchname)) } + unsafe { ClusterNetInterfaceEnum(hnetinterfaceenum, dwindex, core::mem::transmute(lpszname), lpcchname as _) } } #[inline] pub unsafe fn ClusterNetInterfaceOpenEnum(hcluster: HCLUSTER, lpsznodename: P1, lpsznetworkname: P2) -> HNETINTERFACEENUM @@ -489,7 +489,7 @@ pub unsafe fn ClusterNetworkCloseEnum(hnetworkenum: HNETWORKENUM) -> u32 { #[inline] 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); - unsafe { ClusterNetworkControl(hnetwork, core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), noutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed()))) } + unsafe { ClusterNetworkControl(hnetwork, hhostnode.unwrap_or(core::mem::zeroed()) as _, dwcontrolcode, lpinbuffer.unwrap_or(core::mem::zeroed()) as _, ninbuffersize, lpoutbuffer.unwrap_or(core::mem::zeroed()) as _, noutbuffersize, lpbytesreturned.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -497,12 +497,12 @@ where 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); - unsafe { ClusterNetworkControlEx(hnetwork, core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), noutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed())), lpszreason.param().abi()) } + unsafe { ClusterNetworkControlEx(hnetwork, hhostnode.unwrap_or(core::mem::zeroed()) as _, dwcontrolcode, lpinbuffer.unwrap_or(core::mem::zeroed()) as _, ninbuffersize, lpoutbuffer.unwrap_or(core::mem::zeroed()) as _, noutbuffersize, lpbytesreturned.unwrap_or(core::mem::zeroed()) as _, lpszreason.param().abi()) } } #[inline] 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); - unsafe { ClusterNetworkEnum(hnetworkenum, dwindex, core::mem::transmute(lpdwtype), core::mem::transmute(lpszname), core::mem::transmute(lpcchname)) } + unsafe { ClusterNetworkEnum(hnetworkenum, dwindex, lpdwtype as _, core::mem::transmute(lpszname), lpcchname as _) } } #[inline] pub unsafe fn ClusterNetworkGetEnumCount(hnetworkenum: HNETWORKENUM) -> u32 { @@ -527,7 +527,7 @@ pub unsafe fn ClusterNodeCloseEnumEx(hnodeenum: HNODEENUMEX) -> u32 { #[inline] 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); - unsafe { ClusterNodeControl(hnode, core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), noutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed()))) } + unsafe { ClusterNodeControl(hnode, hhostnode.unwrap_or(core::mem::zeroed()) as _, dwcontrolcode, lpinbuffer.unwrap_or(core::mem::zeroed()) as _, ninbuffersize, lpoutbuffer.unwrap_or(core::mem::zeroed()) as _, noutbuffersize, lpbytesreturned.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -535,17 +535,17 @@ where 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); - unsafe { ClusterNodeControlEx(hnode, core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), noutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed())), lpszreason.param().abi()) } + unsafe { ClusterNodeControlEx(hnode, hhostnode.unwrap_or(core::mem::zeroed()) as _, dwcontrolcode, lpinbuffer.unwrap_or(core::mem::zeroed()) as _, ninbuffersize, lpoutbuffer.unwrap_or(core::mem::zeroed()) as _, noutbuffersize, lpbytesreturned.unwrap_or(core::mem::zeroed()) as _, lpszreason.param().abi()) } } #[inline] 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); - unsafe { ClusterNodeEnum(hnodeenum, dwindex, core::mem::transmute(lpdwtype), core::mem::transmute(lpszname), core::mem::transmute(lpcchname)) } + unsafe { ClusterNodeEnum(hnodeenum, dwindex, lpdwtype as _, core::mem::transmute(lpszname), lpcchname as _) } } #[inline] 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); - unsafe { ClusterNodeEnumEx(hnodeenum, dwindex, core::mem::transmute(pitem), core::mem::transmute(cbitem)) } + unsafe { ClusterNodeEnumEx(hnodeenum, dwindex, pitem as _, cbitem as _) } } #[inline] pub unsafe fn ClusterNodeGetEnumCount(hnodeenum: HNODEENUM) -> u32 { @@ -565,7 +565,7 @@ pub unsafe fn ClusterNodeOpenEnum(hnode: HNODE, dwtype: u32) -> HNODEENUM { #[inline] 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); - unsafe { ClusterNodeOpenEnumEx(hnode, dwtype, core::mem::transmute(poptions.unwrap_or(core::mem::zeroed()))) } + unsafe { ClusterNodeOpenEnumEx(hnode, dwtype, poptions.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ClusterNodeReplacement(hcluster: HCLUSTER, lpsznodenamecurrent: P1, lpsznodenamenew: P2) -> u32 @@ -584,7 +584,7 @@ pub unsafe fn ClusterOpenEnum(hcluster: HCLUSTER, dwtype: u32) -> HCLUSENUM { #[inline] 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); - unsafe { ClusterOpenEnumEx(hcluster, dwtype, core::mem::transmute(poptions.unwrap_or(core::mem::zeroed()))) } + unsafe { ClusterOpenEnumEx(hcluster, dwtype, poptions.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ClusterPrepareSharedVolumeForBackup(lpszfilename: P0, lpszvolumepathname: windows_core::PWSTR, lpcchvolumepathname: *mut u32, lpszvolumename: windows_core::PWSTR, lpcchvolumename: *mut u32) -> u32 @@ -592,7 +592,7 @@ where P0: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ClusterPrepareSharedVolumeForBackup(lpszfilename : windows_core::PCWSTR, lpszvolumepathname : windows_core::PWSTR, lpcchvolumepathname : *mut u32, lpszvolumename : windows_core::PWSTR, lpcchvolumename : *mut u32) -> u32); - unsafe { ClusterPrepareSharedVolumeForBackup(lpszfilename.param().abi(), core::mem::transmute(lpszvolumepathname), core::mem::transmute(lpcchvolumepathname), core::mem::transmute(lpszvolumename), core::mem::transmute(lpcchvolumename)) } + unsafe { ClusterPrepareSharedVolumeForBackup(lpszfilename.param().abi(), core::mem::transmute(lpszvolumepathname), lpcchvolumepathname as _, core::mem::transmute(lpszvolumename), lpcchvolumename as _) } } #[inline] pub unsafe fn ClusterRegBatchAddCommand(hregbatch: HREGBATCH, dwcommand: CLUSTER_REG_COMMAND, wzname: P2, dwoptions: u32, lpdata: Option<*const core::ffi::c_void>, cbdata: u32) -> i32 @@ -600,7 +600,7 @@ where 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); - unsafe { ClusterRegBatchAddCommand(hregbatch, dwcommand, wzname.param().abi(), dwoptions, core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), cbdata) } + unsafe { ClusterRegBatchAddCommand(hregbatch, dwcommand, wzname.param().abi(), dwoptions, lpdata.unwrap_or(core::mem::zeroed()) as _, cbdata) } } #[inline] pub unsafe fn ClusterRegBatchCloseNotification(hbatchnotification: HREGBATCHNOTIFICATION) -> i32 { @@ -610,17 +610,17 @@ pub unsafe fn ClusterRegBatchCloseNotification(hbatchnotification: HREGBATCHNOTI #[inline] 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); - unsafe { ClusterRegBatchReadCommand(hbatchnotification, core::mem::transmute(pbatchcommand)) } + unsafe { ClusterRegBatchReadCommand(hbatchnotification, pbatchcommand as _) } } #[inline] pub unsafe fn ClusterRegCloseBatch(hregbatch: HREGBATCH, bcommit: bool, failedcommandnumber: Option<*mut i32>) -> i32 { windows_targets::link!("clusapi.dll" "system" fn ClusterRegCloseBatch(hregbatch : HREGBATCH, bcommit : super::super::Foundation:: BOOL, failedcommandnumber : *mut i32) -> i32); - unsafe { ClusterRegCloseBatch(hregbatch, bcommit.into(), core::mem::transmute(failedcommandnumber.unwrap_or(core::mem::zeroed()))) } + unsafe { ClusterRegCloseBatch(hregbatch, bcommit.into(), failedcommandnumber.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { ClusterRegCloseBatchEx(hregbatch, flags, core::mem::transmute(failedcommandnumber.unwrap_or(core::mem::zeroed()))) } + unsafe { ClusterRegCloseBatchEx(hregbatch, flags, failedcommandnumber.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ClusterRegCloseBatchNotifyPort(hbatchnotifyport: HREGBATCHPORT) -> i32 { @@ -636,12 +636,12 @@ pub unsafe fn ClusterRegCloseKey(hkey: super::super::System::Registry::HKEY) -> #[inline] pub unsafe fn ClusterRegCloseReadBatch(hregreadbatch: HREGREADBATCH, phregreadbatchreply: *mut HREGREADBATCHREPLY) -> i32 { windows_targets::link!("clusapi.dll" "system" fn ClusterRegCloseReadBatch(hregreadbatch : HREGREADBATCH, phregreadbatchreply : *mut HREGREADBATCHREPLY) -> i32); - unsafe { ClusterRegCloseReadBatch(hregreadbatch, core::mem::transmute(phregreadbatchreply)) } + unsafe { ClusterRegCloseReadBatch(hregreadbatch, phregreadbatchreply as _) } } #[inline] 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); - unsafe { ClusterRegCloseReadBatchEx(hregreadbatch, flags, core::mem::transmute(phregreadbatchreply)) } + unsafe { ClusterRegCloseReadBatchEx(hregreadbatch, flags, phregreadbatchreply as _) } } #[inline] pub unsafe fn ClusterRegCloseReadBatchReply(hregreadbatchreply: HREGREADBATCHREPLY) -> i32 { @@ -652,13 +652,13 @@ pub unsafe fn ClusterRegCloseReadBatchReply(hregreadbatchreply: HREGREADBATCHREP #[inline] 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); - unsafe { ClusterRegCreateBatch(core::mem::transmute(hkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(phregbatch)) } + unsafe { ClusterRegCreateBatch(hkey.unwrap_or(core::mem::zeroed()) as _, phregbatch as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { ClusterRegCreateBatchNotifyPort(hkey, core::mem::transmute(phbatchnotifyport)) } + unsafe { ClusterRegCreateBatchNotifyPort(hkey, phbatchnotifyport as _) } } #[cfg(all(feature = "Win32_Security", feature = "Win32_System_Registry"))] #[inline] @@ -667,7 +667,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterRegCreateKey(hkey : super::super::System::Registry:: HKEY, lpszsubkey : windows_core::PCWSTR, dwoptions : u32, samdesired : u32, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, phkresult : *mut super::super::System::Registry:: HKEY, lpdwdisposition : *mut u32) -> i32); - unsafe { ClusterRegCreateKey(hkey, lpszsubkey.param().abi(), dwoptions, samdesired, core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(phkresult), core::mem::transmute(lpdwdisposition.unwrap_or(core::mem::zeroed()))) } + unsafe { ClusterRegCreateKey(hkey, lpszsubkey.param().abi(), dwoptions, samdesired, lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _, phkresult as _, lpdwdisposition.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Win32_Security", feature = "Win32_System_Registry"))] #[inline] @@ -677,13 +677,13 @@ where 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); - unsafe { ClusterRegCreateKeyEx(hkey, lpsubkey.param().abi(), dwoptions, 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()) } + unsafe { ClusterRegCreateKeyEx(hkey, lpsubkey.param().abi(), dwoptions, samdesired, lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _, phkresult as _, lpdwdisposition.unwrap_or(core::mem::zeroed()) as _, lpszreason.param().abi()) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { ClusterRegCreateReadBatch(hkey, core::mem::transmute(phregreadbatch)) } + unsafe { ClusterRegCreateReadBatch(hkey, phregreadbatch as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -727,24 +727,24 @@ where #[inline] 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); - unsafe { ClusterRegEnumKey(hkey, dwindex, core::mem::transmute(lpszname), core::mem::transmute(lpcchname), core::mem::transmute(lpftlastwritetime.unwrap_or(core::mem::zeroed()))) } + unsafe { ClusterRegEnumKey(hkey, dwindex, core::mem::transmute(lpszname), lpcchname as _, lpftlastwritetime.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { ClusterRegEnumValue(hkey, 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()))) } + unsafe { ClusterRegEnumValue(hkey, dwindex, core::mem::transmute(lpszvaluename), lpcchvaluename as _, lpdwtype.unwrap_or(core::mem::zeroed()) as _, lpdata.unwrap_or(core::mem::zeroed()) as _, lpcbdata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ClusterRegGetBatchNotification(hbatchnotify: HREGBATCHPORT, phbatchnotification: *mut HREGBATCHNOTIFICATION) -> i32 { windows_targets::link!("clusapi.dll" "system" fn ClusterRegGetBatchNotification(hbatchnotify : HREGBATCHPORT, phbatchnotification : *mut HREGBATCHNOTIFICATION) -> i32); - unsafe { ClusterRegGetBatchNotification(hbatchnotify, core::mem::transmute(phbatchnotification)) } + unsafe { ClusterRegGetBatchNotification(hbatchnotify, phbatchnotification as _) } } #[cfg(all(feature = "Win32_Security", feature = "Win32_System_Registry"))] #[inline] 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); - unsafe { ClusterRegGetKeySecurity(hkey, requestedinformation, core::mem::transmute(psecuritydescriptor), core::mem::transmute(lpcbsecuritydescriptor)) } + unsafe { ClusterRegGetKeySecurity(hkey, requestedinformation, psecuritydescriptor as _, lpcbsecuritydescriptor as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -753,7 +753,7 @@ where 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); - unsafe { ClusterRegOpenKey(hkey, lpszsubkey.param().abi(), samdesired, core::mem::transmute(phkresult)) } + unsafe { ClusterRegOpenKey(hkey, lpszsubkey.param().abi(), samdesired, phkresult as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -768,7 +768,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterRegQueryValue(hkey : super::super::System::Registry:: HKEY, lpszvaluename : windows_core::PCWSTR, lpdwvaluetype : *mut u32, lpdata : *mut u8, lpcbdata : *mut u32) -> i32); - unsafe { ClusterRegQueryValue(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()))) } + unsafe { ClusterRegQueryValue(hkey, lpszvaluename.param().abi(), lpdwvaluetype.unwrap_or(core::mem::zeroed()) as _, lpdata.unwrap_or(core::mem::zeroed()) as _, lpcbdata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ClusterRegReadBatchAddCommand(hregreadbatch: HREGREADBATCH, wzsubkeyname: P1, wzvaluename: P2) -> i32 @@ -782,7 +782,7 @@ where #[inline] 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); - unsafe { ClusterRegReadBatchReplyNextCommand(hregreadbatchreply, core::mem::transmute(pbatchcommand)) } + unsafe { ClusterRegReadBatchReplyNextCommand(hregreadbatchreply, pbatchcommand as _) } } #[cfg(all(feature = "Win32_Security", feature = "Win32_System_Registry"))] #[inline] @@ -865,12 +865,12 @@ pub unsafe fn ClusterResourceCloseEnumEx(hresourceenumex: HRESENUMEX) -> u32 { #[inline] 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); - unsafe { ClusterResourceControl(hresource, core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), cbinbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), cboutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed()))) } + unsafe { ClusterResourceControl(hresource, hhostnode.unwrap_or(core::mem::zeroed()) as _, dwcontrolcode, lpinbuffer.unwrap_or(core::mem::zeroed()) as _, cbinbuffersize, lpoutbuffer.unwrap_or(core::mem::zeroed()) as _, cboutbuffersize, lpbytesreturned.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { ClusterResourceControlAsUser(hresource, core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), cbinbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), cboutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed()))) } + unsafe { ClusterResourceControlAsUser(hresource, hhostnode.unwrap_or(core::mem::zeroed()) as _, dwcontrolcode, lpinbuffer.unwrap_or(core::mem::zeroed()) as _, cbinbuffersize, lpoutbuffer.unwrap_or(core::mem::zeroed()) as _, cboutbuffersize, lpbytesreturned.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -878,7 +878,7 @@ where 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); - unsafe { ClusterResourceControlAsUserEx(hresource, core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), cbinbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), cboutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed())), lpszreason.param().abi()) } + unsafe { ClusterResourceControlAsUserEx(hresource, hhostnode.unwrap_or(core::mem::zeroed()) as _, dwcontrolcode, lpinbuffer.unwrap_or(core::mem::zeroed()) as _, cbinbuffersize, lpoutbuffer.unwrap_or(core::mem::zeroed()) as _, cboutbuffersize, lpbytesreturned.unwrap_or(core::mem::zeroed()) as _, lpszreason.param().abi()) } } #[inline] 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 @@ -886,17 +886,17 @@ where 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); - unsafe { ClusterResourceControlEx(hresource, core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), cbinbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), cboutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed())), lpszreason.param().abi()) } + unsafe { ClusterResourceControlEx(hresource, hhostnode.unwrap_or(core::mem::zeroed()) as _, dwcontrolcode, lpinbuffer.unwrap_or(core::mem::zeroed()) as _, cbinbuffersize, lpoutbuffer.unwrap_or(core::mem::zeroed()) as _, cboutbuffersize, lpbytesreturned.unwrap_or(core::mem::zeroed()) as _, lpszreason.param().abi()) } } #[inline] 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); - unsafe { ClusterResourceEnum(hresenum, dwindex, core::mem::transmute(lpdwtype), core::mem::transmute(lpszname), core::mem::transmute(lpcchname)) } + unsafe { ClusterResourceEnum(hresenum, dwindex, lpdwtype as _, core::mem::transmute(lpszname), lpcchname as _) } } #[inline] 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); - unsafe { ClusterResourceEnumEx(hresourceenumex, dwindex, core::mem::transmute(pitem), core::mem::transmute(cbitem)) } + unsafe { ClusterResourceEnumEx(hresourceenumex, dwindex, pitem as _, cbitem as _) } } #[inline] pub unsafe fn ClusterResourceGetEnumCount(hresenum: HRESENUM) -> u32 { @@ -933,7 +933,7 @@ where P1: 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); - unsafe { ClusterResourceTypeControl(hcluster, lpszresourcetypename.param().abi(), core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), noutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed()))) } + unsafe { ClusterResourceTypeControl(hcluster, lpszresourcetypename.param().abi(), hhostnode.unwrap_or(core::mem::zeroed()) as _, dwcontrolcode, lpinbuffer.unwrap_or(core::mem::zeroed()) as _, ninbuffersize, lpoutbuffer.unwrap_or(core::mem::zeroed()) as _, noutbuffersize, lpbytesreturned.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -941,7 +941,7 @@ where P1: 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); - unsafe { ClusterResourceTypeControlAsUser(hcluster, lpszresourcetypename.param().abi(), core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), noutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed()))) } + unsafe { ClusterResourceTypeControlAsUser(hcluster, lpszresourcetypename.param().abi(), hhostnode.unwrap_or(core::mem::zeroed()) as _, dwcontrolcode, lpinbuffer.unwrap_or(core::mem::zeroed()) as _, ninbuffersize, lpoutbuffer.unwrap_or(core::mem::zeroed()) as _, noutbuffersize, lpbytesreturned.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -950,7 +950,7 @@ where 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); - unsafe { ClusterResourceTypeControlAsUserEx(hcluster, lpszresourcetypename.param().abi(), core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), noutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed())), lpszreason.param().abi()) } + unsafe { ClusterResourceTypeControlAsUserEx(hcluster, lpszresourcetypename.param().abi(), hhostnode.unwrap_or(core::mem::zeroed()) as _, dwcontrolcode, lpinbuffer.unwrap_or(core::mem::zeroed()) as _, ninbuffersize, lpoutbuffer.unwrap_or(core::mem::zeroed()) as _, noutbuffersize, lpbytesreturned.unwrap_or(core::mem::zeroed()) as _, lpszreason.param().abi()) } } #[inline] 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 @@ -959,12 +959,12 @@ where 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); - unsafe { ClusterResourceTypeControlEx(hcluster, lpszresourcetypename.param().abi(), core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), noutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed())), lpszreason.param().abi()) } + unsafe { ClusterResourceTypeControlEx(hcluster, lpszresourcetypename.param().abi(), hhostnode.unwrap_or(core::mem::zeroed()) as _, dwcontrolcode, lpinbuffer.unwrap_or(core::mem::zeroed()) as _, ninbuffersize, lpoutbuffer.unwrap_or(core::mem::zeroed()) as _, noutbuffersize, lpbytesreturned.unwrap_or(core::mem::zeroed()) as _, lpszreason.param().abi()) } } #[inline] 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); - unsafe { ClusterResourceTypeEnum(hrestypeenum, dwindex, core::mem::transmute(lpdwtype), core::mem::transmute(lpszname), core::mem::transmute(lpcchname)) } + unsafe { ClusterResourceTypeEnum(hrestypeenum, dwindex, lpdwtype as _, core::mem::transmute(lpszname), lpcchname as _) } } #[inline] pub unsafe fn ClusterResourceTypeGetEnumCount(hrestypeenum: HRESTYPEENUM) -> u32 { @@ -998,12 +998,12 @@ where #[inline] pub unsafe fn ClusterUpgradeFunctionalLevel(hcluster: HCLUSTER, perform: bool, pfnprogresscallback: Option, pvcallbackarg: Option<*const core::ffi::c_void>) -> u32 { 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); - unsafe { ClusterUpgradeFunctionalLevel(hcluster, perform.into(), core::mem::transmute(pfnprogresscallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvcallbackarg.unwrap_or(core::mem::zeroed()))) } + unsafe { ClusterUpgradeFunctionalLevel(hcluster, perform.into(), pfnprogresscallback.unwrap_or(core::mem::zeroed()) as _, pvcallbackarg.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { CreateCluster(pconfig, core::mem::transmute(pfnprogresscallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvcallbackarg.unwrap_or(core::mem::zeroed()))) } + unsafe { CreateCluster(pconfig, pfnprogresscallback.unwrap_or(core::mem::zeroed()) as _, pvcallbackarg.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CreateClusterAvailabilitySet(hcluster: HCLUSTER, lpavailabilitysetname: P1, pavailabilitysetconfig: *const CLUSTER_AVAILABILITY_SET_CONFIG) -> HGROUPSET @@ -1027,7 +1027,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn CreateClusterGroupEx(hcluster : HCLUSTER, lpszgroupname : windows_core::PCWSTR, pgroupinfo : *const CLUSTER_CREATE_GROUP_INFO) -> HGROUP); - unsafe { CreateClusterGroupEx(hcluster, lpszgroupname.param().abi(), core::mem::transmute(pgroupinfo.unwrap_or(core::mem::zeroed()))) } + unsafe { CreateClusterGroupEx(hcluster, lpszgroupname.param().abi(), pgroupinfo.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CreateClusterGroupSet(hcluster: HCLUSTER, groupsetname: P1) -> HGROUPSET @@ -1040,7 +1040,7 @@ where #[inline] 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); - unsafe { CreateClusterNameAccount(hcluster, pconfig, core::mem::transmute(pfnprogresscallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvcallbackarg.unwrap_or(core::mem::zeroed()))) } + unsafe { CreateClusterNameAccount(hcluster, pconfig, pfnprogresscallback.unwrap_or(core::mem::zeroed()) as _, pvcallbackarg.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CreateClusterNotifyPort(hchange: HCHANGE, hcluster: HCLUSTER, dwfilter: u32, dwnotifykey: usize) -> HCHANGE { @@ -1151,7 +1151,7 @@ where #[inline] pub unsafe fn DestroyCluster(hcluster: HCLUSTER, pfnprogresscallback: Option, pvcallbackarg: Option<*const core::ffi::c_void>, fdeletevirtualcomputerobjects: bool) -> u32 { 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); - unsafe { DestroyCluster(hcluster, core::mem::transmute(pfnprogresscallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvcallbackarg.unwrap_or(core::mem::zeroed())), fdeletevirtualcomputerobjects.into()) } + unsafe { DestroyCluster(hcluster, pfnprogresscallback.unwrap_or(core::mem::zeroed()) as _, pvcallbackarg.unwrap_or(core::mem::zeroed()) as _, fdeletevirtualcomputerobjects.into()) } } #[inline] pub unsafe fn DestroyClusterGroup(hgroup: HGROUP) -> u32 { @@ -1169,22 +1169,22 @@ where #[inline] 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); - unsafe { DetermineCNOResTypeFromCluster(hcluster, core::mem::transmute(pcnorestype)) } + unsafe { DetermineCNOResTypeFromCluster(hcluster, pcnorestype as _) } } #[inline] pub unsafe fn DetermineCNOResTypeFromNodelist(cnodes: u32, ppsznodenames: *const windows_core::PCWSTR, pcnorestype: *mut CLUSTER_MGMT_POINT_RESTYPE) -> u32 { windows_targets::link!("clusapi.dll" "system" fn DetermineCNOResTypeFromNodelist(cnodes : u32, ppsznodenames : *const windows_core::PCWSTR, pcnorestype : *mut CLUSTER_MGMT_POINT_RESTYPE) -> u32); - unsafe { DetermineCNOResTypeFromNodelist(cnodes, ppsznodenames, core::mem::transmute(pcnorestype)) } + unsafe { DetermineCNOResTypeFromNodelist(cnodes, ppsznodenames, pcnorestype as _) } } #[inline] 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); - unsafe { DetermineClusterCloudTypeFromCluster(hcluster, core::mem::transmute(pcloudtype)) } + unsafe { DetermineClusterCloudTypeFromCluster(hcluster, pcloudtype as _) } } #[inline] pub unsafe fn DetermineClusterCloudTypeFromNodelist(cnodes: u32, ppsznodenames: *const windows_core::PCWSTR, pcloudtype: *mut CLUSTER_CLOUD_TYPE) -> u32 { windows_targets::link!("clusapi.dll" "system" fn DetermineClusterCloudTypeFromNodelist(cnodes : u32, ppsznodenames : *const windows_core::PCWSTR, pcloudtype : *mut CLUSTER_CLOUD_TYPE) -> u32); - unsafe { DetermineClusterCloudTypeFromNodelist(cnodes, ppsznodenames, core::mem::transmute(pcloudtype)) } + unsafe { DetermineClusterCloudTypeFromNodelist(cnodes, ppsznodenames, pcloudtype as _) } } #[inline] pub unsafe fn EvictClusterNode(hnode: HNODE) -> u32 { @@ -1194,7 +1194,7 @@ pub unsafe fn EvictClusterNode(hnode: HNODE) -> u32 { #[inline] 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); - unsafe { EvictClusterNodeEx(hnode, dwtimeout, core::mem::transmute(phrcleanupstatus)) } + unsafe { EvictClusterNodeEx(hnode, dwtimeout, phrcleanupstatus as _) } } #[inline] pub unsafe fn EvictClusterNodeEx2(hnode: HNODE, dwtimeout: u32, phrcleanupstatus: *mut windows_core::HRESULT, lpszreason: P3) -> u32 @@ -1202,7 +1202,7 @@ where 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); - unsafe { EvictClusterNodeEx2(hnode, dwtimeout, core::mem::transmute(phrcleanupstatus), lpszreason.param().abi()) } + unsafe { EvictClusterNodeEx2(hnode, dwtimeout, phrcleanupstatus as _, lpszreason.param().abi()) } } #[inline] pub unsafe fn FailClusterResource(hresource: HRESOURCE) -> u32 { @@ -1225,12 +1225,12 @@ pub unsafe fn FreeClusterCrypt(pcryptinfo: *const core::ffi::c_void) -> u32 { #[inline] pub unsafe fn FreeClusterHealthFault(clusterhealthfault: *mut CLUSTER_HEALTH_FAULT) -> u32 { windows_targets::link!("resutils.dll" "system" fn FreeClusterHealthFault(clusterhealthfault : *mut CLUSTER_HEALTH_FAULT) -> u32); - unsafe { FreeClusterHealthFault(core::mem::transmute(clusterhealthfault)) } + unsafe { FreeClusterHealthFault(clusterhealthfault as _) } } #[inline] pub unsafe fn FreeClusterHealthFaultArray(clusterhealthfaultarray: *mut CLUSTER_HEALTH_FAULT_ARRAY) -> u32 { windows_targets::link!("resutils.dll" "system" fn FreeClusterHealthFaultArray(clusterhealthfaultarray : *mut CLUSTER_HEALTH_FAULT_ARRAY) -> u32); - unsafe { FreeClusterHealthFaultArray(core::mem::transmute(clusterhealthfaultarray)) } + unsafe { FreeClusterHealthFaultArray(clusterhealthfaultarray as _) } } #[inline] pub unsafe fn GetClusterFromGroup(hgroup: HGROUP) -> HCLUSTER { @@ -1267,12 +1267,12 @@ pub unsafe fn GetClusterGroupKey(hgroup: HGROUP, samdesired: u32) -> windows_cor #[inline] 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); - unsafe { GetClusterGroupState(hgroup, core::mem::transmute(lpsznodename.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchnodename.unwrap_or(core::mem::zeroed()))) } + unsafe { GetClusterGroupState(hgroup, lpsznodename.unwrap_or(core::mem::zeroed()) as _, lpcchnodename.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { GetClusterInformation(hcluster, core::mem::transmute(lpszclustername), core::mem::transmute(lpcchclustername), core::mem::transmute(lpclusterinfo.unwrap_or(core::mem::zeroed()))) } + unsafe { GetClusterInformation(hcluster, core::mem::transmute(lpszclustername), lpcchclustername as _, lpclusterinfo.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -1288,7 +1288,7 @@ where 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); - unsafe { GetClusterNetInterface(hcluster, lpsznodename.param().abi(), lpsznetworkname.param().abi(), core::mem::transmute(lpszinterfacename), core::mem::transmute(lpcchinterfacename)) } + unsafe { GetClusterNetInterface(hcluster, lpsznodename.param().abi(), lpsznetworkname.param().abi(), core::mem::transmute(lpszinterfacename), lpcchinterfacename as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -1305,7 +1305,7 @@ pub unsafe fn GetClusterNetInterfaceState(hnetinterface: HNETINTERFACE) -> CLUST #[inline] 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); - unsafe { GetClusterNetworkId(hnetwork, core::mem::transmute(lpsznetworkid), core::mem::transmute(lpcchname)) } + unsafe { GetClusterNetworkId(hnetwork, core::mem::transmute(lpsznetworkid), lpcchname as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -1322,7 +1322,7 @@ pub unsafe fn GetClusterNetworkState(hnetwork: HNETWORK) -> CLUSTER_NETWORK_STAT #[inline] 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); - unsafe { GetClusterNodeId(core::mem::transmute(hnode.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpsznodeid), core::mem::transmute(lpcchname)) } + unsafe { GetClusterNodeId(hnode.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(lpsznodeid), lpcchname as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -1339,7 +1339,7 @@ pub unsafe fn GetClusterNodeState(hnode: HNODE) -> CLUSTER_NODE_STATE { #[inline] 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); - unsafe { GetClusterNotify(hchange, core::mem::transmute(lpdwnotifykey), core::mem::transmute(lpdwfiltertype), core::mem::transmute(lpszname), core::mem::transmute(lpcchname), dwmilliseconds) } + unsafe { GetClusterNotify(hchange, lpdwnotifykey as _, lpdwfiltertype as _, core::mem::transmute(lpszname), lpcchname as _, dwmilliseconds) } } #[inline] 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 { @@ -1347,31 +1347,31 @@ pub unsafe fn GetClusterNotifyV2(hchange: HCHANGE, lpdwnotifykey: *mut usize, pf unsafe { GetClusterNotifyV2( hchange, - core::mem::transmute(lpdwnotifykey), - 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())), + lpdwnotifykey as _, + pfilterandtype.unwrap_or(core::mem::zeroed()) as _, + buffer.unwrap_or(core::mem::zeroed()) as _, + lpbbuffersize.unwrap_or(core::mem::zeroed()) as _, + lpszobjectid.unwrap_or(core::mem::zeroed()) as _, + lpcchobjectid.unwrap_or(core::mem::zeroed()) as _, + lpszparentid.unwrap_or(core::mem::zeroed()) as _, + lpcchparentid.unwrap_or(core::mem::zeroed()) as _, + lpszname.unwrap_or(core::mem::zeroed()) as _, + lpcchname.unwrap_or(core::mem::zeroed()) as _, + lpsztype.unwrap_or(core::mem::zeroed()) as _, + lpcchtype.unwrap_or(core::mem::zeroed()) as _, + dwmilliseconds.unwrap_or(core::mem::zeroed()) as _, ) } } #[inline] 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); - unsafe { GetClusterQuorumResource(hcluster, core::mem::transmute(lpszresourcename), core::mem::transmute(lpcchresourcename), core::mem::transmute(lpszdevicename), core::mem::transmute(lpcchdevicename), core::mem::transmute(lpdwmaxquorumlogsize)) } + unsafe { GetClusterQuorumResource(hcluster, core::mem::transmute(lpszresourcename), lpcchresourcename as _, core::mem::transmute(lpszdevicename), lpcchdevicename as _, lpdwmaxquorumlogsize as _) } } #[inline] 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); - unsafe { GetClusterResourceDependencyExpression(hresource, core::mem::transmute(lpszdependencyexpression.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchdependencyexpression)) } + unsafe { GetClusterResourceDependencyExpression(hresource, lpszdependencyexpression.unwrap_or(core::mem::zeroed()) as _, lpcchdependencyexpression as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -1383,12 +1383,12 @@ pub unsafe fn GetClusterResourceKey(hresource: HRESOURCE, samdesired: u32) -> wi #[inline] 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); - unsafe { GetClusterResourceNetworkName(hresource, core::mem::transmute(lpbuffer), core::mem::transmute(nsize)).ok() } + unsafe { GetClusterResourceNetworkName(hresource, core::mem::transmute(lpbuffer), nsize as _).ok() } } #[inline] 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); - unsafe { GetClusterResourceState(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()))) } + unsafe { GetClusterResourceState(hresource, lpsznodename.unwrap_or(core::mem::zeroed()) as _, lpcchnodename.unwrap_or(core::mem::zeroed()) as _, lpszgroupname.unwrap_or(core::mem::zeroed()) as _, lpcchgroupname.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -1406,7 +1406,7 @@ where P0: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn GetNodeCloudTypeDW(ppsznodename : windows_core::PCWSTR, nodecloudtype : *mut u32) -> u32); - unsafe { GetNodeCloudTypeDW(ppsznodename.param().abi(), core::mem::transmute(nodecloudtype)) } + unsafe { GetNodeCloudTypeDW(ppsznodename.param().abi(), nodecloudtype as _) } } #[inline] pub unsafe fn GetNodeClusterState(lpsznodename: P0, pdwclusterstate: *mut u32) -> u32 @@ -1414,22 +1414,22 @@ where P0: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn GetNodeClusterState(lpsznodename : windows_core::PCWSTR, pdwclusterstate : *mut u32) -> u32); - unsafe { GetNodeClusterState(lpsznodename.param().abi(), core::mem::transmute(pdwclusterstate)) } + unsafe { GetNodeClusterState(lpsznodename.param().abi(), pdwclusterstate as _) } } #[inline] 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); - unsafe { GetNotifyEventHandle(hchange, core::mem::transmute(lphtargetevent)) } + unsafe { GetNotifyEventHandle(hchange, lphtargetevent as _) } } #[inline] pub unsafe fn InitializeClusterHealthFault(clusterhealthfault: *mut CLUSTER_HEALTH_FAULT) -> u32 { windows_targets::link!("resutils.dll" "system" fn InitializeClusterHealthFault(clusterhealthfault : *mut CLUSTER_HEALTH_FAULT) -> u32); - unsafe { InitializeClusterHealthFault(core::mem::transmute(clusterhealthfault)) } + unsafe { InitializeClusterHealthFault(clusterhealthfault as _) } } #[inline] pub unsafe fn InitializeClusterHealthFaultArray(clusterhealthfaultarray: *mut CLUSTER_HEALTH_FAULT_ARRAY) -> u32 { windows_targets::link!("resutils.dll" "system" fn InitializeClusterHealthFaultArray(clusterhealthfaultarray : *mut CLUSTER_HEALTH_FAULT_ARRAY) -> u32); - unsafe { InitializeClusterHealthFaultArray(core::mem::transmute(clusterhealthfaultarray)) } + unsafe { InitializeClusterHealthFaultArray(clusterhealthfaultarray as _) } } #[inline] pub unsafe fn IsFileOnClusterSharedVolume(lpszpathname: P0, pbfileisonsharedvolume: *mut super::super::Foundation::BOOL) -> u32 @@ -1437,17 +1437,17 @@ where P0: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn IsFileOnClusterSharedVolume(lpszpathname : windows_core::PCWSTR, pbfileisonsharedvolume : *mut super::super::Foundation:: BOOL) -> u32); - unsafe { IsFileOnClusterSharedVolume(lpszpathname.param().abi(), core::mem::transmute(pbfileisonsharedvolume)) } + unsafe { IsFileOnClusterSharedVolume(lpszpathname.param().abi(), pbfileisonsharedvolume as _) } } #[inline] pub unsafe fn MoveClusterGroup(hgroup: HGROUP, hdestinationnode: Option) -> u32 { windows_targets::link!("clusapi.dll" "system" fn MoveClusterGroup(hgroup : HGROUP, hdestinationnode : HNODE) -> u32); - unsafe { MoveClusterGroup(hgroup, core::mem::transmute(hdestinationnode.unwrap_or(core::mem::zeroed()))) } + unsafe { MoveClusterGroup(hgroup, hdestinationnode.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { MoveClusterGroupEx(hgroup, core::mem::transmute(hdestinationnode.unwrap_or(core::mem::zeroed())), 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())) } + unsafe { MoveClusterGroupEx(hgroup, hdestinationnode.unwrap_or(core::mem::zeroed()) as _, 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: HGROUP, hdestinationnode: Option, dwmoveflags: u32, lpinbuffer: Option<&[u8]>, lpszreason: P5) -> u32 @@ -1455,7 +1455,7 @@ where 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); - unsafe { MoveClusterGroupEx2(hgroup, core::mem::transmute(hdestinationnode.unwrap_or(core::mem::zeroed())), 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()) } + unsafe { MoveClusterGroupEx2(hgroup, hdestinationnode.unwrap_or(core::mem::zeroed()) as _, 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: HGROUP) -> u32 { @@ -1473,7 +1473,7 @@ where 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); - unsafe { OfflineClusterGroupEx2(hgroup, dwofflineflags, core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), cbinbuffersize, lpszreason.param().abi()) } + unsafe { OfflineClusterGroupEx2(hgroup, dwofflineflags, lpinbuffer.unwrap_or(core::mem::zeroed()) as _, cbinbuffersize, lpszreason.param().abi()) } } #[inline] pub unsafe fn OfflineClusterResource(hresource: HRESOURCE) -> u32 { @@ -1496,12 +1496,12 @@ where #[inline] pub unsafe fn OnlineClusterGroup(hgroup: HGROUP, hdestinationnode: Option) -> u32 { windows_targets::link!("clusapi.dll" "system" fn OnlineClusterGroup(hgroup : HGROUP, hdestinationnode : HNODE) -> u32); - unsafe { OnlineClusterGroup(hgroup, core::mem::transmute(hdestinationnode.unwrap_or(core::mem::zeroed()))) } + unsafe { OnlineClusterGroup(hgroup, hdestinationnode.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { OnlineClusterGroupEx(hgroup, core::mem::transmute(hdestinationnode.unwrap_or(core::mem::zeroed())), 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())) } + unsafe { OnlineClusterGroupEx(hgroup, hdestinationnode.unwrap_or(core::mem::zeroed()) as _, 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: HGROUP, hdestinationnode: Option, dwonlineflags: u32, lpinbuffer: Option<&[u8]>, lpszreason: P5) -> u32 @@ -1509,7 +1509,7 @@ where 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); - unsafe { OnlineClusterGroupEx2(hgroup, core::mem::transmute(hdestinationnode.unwrap_or(core::mem::zeroed())), 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()) } + unsafe { OnlineClusterGroupEx2(hgroup, hdestinationnode.unwrap_or(core::mem::zeroed()) as _, 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: HRESOURCE) -> u32 { @@ -1560,7 +1560,7 @@ where P0: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn OpenClusterEx(lpszclustername : windows_core::PCWSTR, desiredaccess : u32, grantedaccess : *mut u32) -> HCLUSTER); - unsafe { OpenClusterEx(lpszclustername.param().abi(), desiredaccess, core::mem::transmute(grantedaccess.unwrap_or(core::mem::zeroed()))) } + unsafe { OpenClusterEx(lpszclustername.param().abi(), desiredaccess, grantedaccess.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn OpenClusterGroup(hcluster: HCLUSTER, lpszgroupname: P1) -> HGROUP @@ -1576,7 +1576,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn OpenClusterGroupEx(hcluster : HCLUSTER, lpszgroupname : windows_core::PCWSTR, dwdesiredaccess : u32, lpdwgrantedaccess : *mut u32) -> HGROUP); - unsafe { OpenClusterGroupEx(hcluster, lpszgroupname.param().abi(), dwdesiredaccess, core::mem::transmute(lpdwgrantedaccess.unwrap_or(core::mem::zeroed()))) } + unsafe { OpenClusterGroupEx(hcluster, lpszgroupname.param().abi(), dwdesiredaccess, lpdwgrantedaccess.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn OpenClusterGroupSet(hcluster: HCLUSTER, lpszgroupsetname: P1) -> HGROUPSET @@ -1600,7 +1600,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn OpenClusterNetInterfaceEx(hcluster : HCLUSTER, lpszinterfacename : windows_core::PCWSTR, dwdesiredaccess : u32, lpdwgrantedaccess : *mut u32) -> HNETINTERFACE); - unsafe { OpenClusterNetInterfaceEx(hcluster, lpszinterfacename.param().abi(), dwdesiredaccess, core::mem::transmute(lpdwgrantedaccess.unwrap_or(core::mem::zeroed()))) } + unsafe { OpenClusterNetInterfaceEx(hcluster, lpszinterfacename.param().abi(), dwdesiredaccess, lpdwgrantedaccess.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn OpenClusterNetwork(hcluster: HCLUSTER, lpsznetworkname: P1) -> HNETWORK @@ -1616,7 +1616,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn OpenClusterNetworkEx(hcluster : HCLUSTER, lpsznetworkname : windows_core::PCWSTR, dwdesiredaccess : u32, lpdwgrantedaccess : *mut u32) -> HNETWORK); - unsafe { OpenClusterNetworkEx(hcluster, lpsznetworkname.param().abi(), dwdesiredaccess, core::mem::transmute(lpdwgrantedaccess.unwrap_or(core::mem::zeroed()))) } + unsafe { OpenClusterNetworkEx(hcluster, lpsznetworkname.param().abi(), dwdesiredaccess, lpdwgrantedaccess.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn OpenClusterNode(hcluster: HCLUSTER, lpsznodename: P1) -> HNODE @@ -1637,7 +1637,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn OpenClusterNodeEx(hcluster : HCLUSTER, lpsznodename : windows_core::PCWSTR, dwdesiredaccess : u32, lpdwgrantedaccess : *mut u32) -> HNODE); - unsafe { OpenClusterNodeEx(hcluster, lpsznodename.param().abi(), dwdesiredaccess, core::mem::transmute(lpdwgrantedaccess.unwrap_or(core::mem::zeroed()))) } + unsafe { OpenClusterNodeEx(hcluster, lpsznodename.param().abi(), dwdesiredaccess, lpdwgrantedaccess.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn OpenClusterResource(hcluster: HCLUSTER, lpszresourcename: P1) -> HRESOURCE @@ -1653,7 +1653,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn OpenClusterResourceEx(hcluster : HCLUSTER, lpszresourcename : windows_core::PCWSTR, dwdesiredaccess : u32, lpdwgrantedaccess : *mut u32) -> HRESOURCE); - unsafe { OpenClusterResourceEx(hcluster, lpszresourcename.param().abi(), dwdesiredaccess, core::mem::transmute(lpdwgrantedaccess.unwrap_or(core::mem::zeroed()))) } + unsafe { OpenClusterResourceEx(hcluster, lpszresourcename.param().abi(), dwdesiredaccess, lpdwgrantedaccess.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn PauseClusterNode(hnode: HNODE) -> u32 { @@ -1663,7 +1663,7 @@ pub unsafe fn PauseClusterNode(hnode: HNODE) -> u32 { #[inline] pub unsafe fn PauseClusterNodeEx(hnode: HNODE, bdrainnode: bool, dwpauseflags: u32, hnodedraintarget: Option) -> u32 { windows_targets::link!("clusapi.dll" "system" fn PauseClusterNodeEx(hnode : HNODE, bdrainnode : super::super::Foundation:: BOOL, dwpauseflags : u32, hnodedraintarget : HNODE) -> u32); - unsafe { PauseClusterNodeEx(hnode, bdrainnode.into(), dwpauseflags, core::mem::transmute(hnodedraintarget.unwrap_or(core::mem::zeroed()))) } + unsafe { PauseClusterNodeEx(hnode, bdrainnode.into(), dwpauseflags, hnodedraintarget.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn PauseClusterNodeEx2(hnode: HNODE, bdrainnode: bool, dwpauseflags: u32, hnodedraintarget: Option, lpszreason: P4) -> u32 @@ -1671,12 +1671,12 @@ where 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); - unsafe { PauseClusterNodeEx2(hnode, bdrainnode.into(), dwpauseflags, core::mem::transmute(hnodedraintarget.unwrap_or(core::mem::zeroed())), lpszreason.param().abi()) } + unsafe { PauseClusterNodeEx2(hnode, bdrainnode.into(), dwpauseflags, hnodedraintarget.unwrap_or(core::mem::zeroed()) as _, 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 { windows_targets::link!("ntlanman.dll" "system" fn QueryAppInstanceVersion(appinstanceid : *const windows_core::GUID, instanceversionhigh : *mut u64, instanceversionlow : *mut u64, versionstatus : *mut super::super::Foundation:: NTSTATUS) -> u32); - unsafe { QueryAppInstanceVersion(appinstanceid, core::mem::transmute(instanceversionhigh), core::mem::transmute(instanceversionlow), core::mem::transmute(versionstatus)) } + unsafe { QueryAppInstanceVersion(appinstanceid, instanceversionhigh as _, instanceversionlow as _, versionstatus as _) } } #[inline] pub unsafe fn RegisterAppInstance(processhandle: super::super::Foundation::HANDLE, appinstanceid: *const windows_core::GUID, childreninheritappinstance: bool) -> u32 { @@ -1802,7 +1802,7 @@ pub unsafe fn RemoveResourceFromClusterSharedVolumes(hresource: HRESOURCE) -> u3 #[inline] 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); - unsafe { ResUtilAddUnknownProperties(hkeyclusterkey, ppropertytable, core::mem::transmute(poutpropertylist), pcboutpropertylistsize, core::mem::transmute(pcbbytesreturned), core::mem::transmute(pcbrequired)) } + unsafe { ResUtilAddUnknownProperties(hkeyclusterkey, ppropertytable, poutpropertylist as _, pcboutpropertylistsize, pcbbytesreturned as _, pcbrequired as _) } } #[inline] pub unsafe fn ResUtilCreateDirectoryTree(pszpath: P0) -> u32 @@ -1815,17 +1815,17 @@ where #[inline] pub unsafe fn ResUtilDupGroup(group: HGROUP, copy: *mut HGROUP) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilDupGroup(group : HGROUP, copy : *mut HGROUP) -> u32); - unsafe { ResUtilDupGroup(group, core::mem::transmute(copy)) } + unsafe { ResUtilDupGroup(group, copy as _) } } #[inline] pub unsafe fn ResUtilDupParameterBlock(poutparams: *mut u8, pinparams: *const u8, ppropertytable: *const RESUTIL_PROPERTY_ITEM) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilDupParameterBlock(poutparams : *mut u8, pinparams : *const u8, ppropertytable : *const RESUTIL_PROPERTY_ITEM) -> u32); - unsafe { ResUtilDupParameterBlock(core::mem::transmute(poutparams), pinparams, ppropertytable) } + unsafe { ResUtilDupParameterBlock(poutparams as _, pinparams, ppropertytable) } } #[inline] pub unsafe fn ResUtilDupResource(group: HRESOURCE, copy: *mut HRESOURCE) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilDupResource(group : HRESOURCE, copy : *mut HRESOURCE) -> u32); - unsafe { ResUtilDupResource(group, core::mem::transmute(copy)) } + unsafe { ResUtilDupResource(group, copy as _) } } #[inline] pub unsafe fn ResUtilDupString(pszinstring: P0) -> windows_core::PWSTR @@ -1838,23 +1838,23 @@ where #[inline] 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); - unsafe { ResUtilEnumGroups(hcluster, hself, prescallback, core::mem::transmute(pparameter)) } + unsafe { ResUtilEnumGroups(hcluster, hself, prescallback, pparameter as _) } } #[inline] 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); - unsafe { ResUtilEnumGroupsEx(hcluster, hself, grouptype, prescallback, core::mem::transmute(pparameter)) } + unsafe { ResUtilEnumGroupsEx(hcluster, hself, grouptype, prescallback, pparameter as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { ResUtilEnumPrivateProperties(hkeyclusterkey, core::mem::transmute(pszoutproperties), cboutpropertiessize, core::mem::transmute(pcbbytesreturned), core::mem::transmute(pcbrequired)) } + unsafe { ResUtilEnumPrivateProperties(hkeyclusterkey, core::mem::transmute(pszoutproperties), cboutpropertiessize, pcbbytesreturned as _, pcbrequired as _) } } #[inline] pub unsafe fn ResUtilEnumProperties(ppropertytable: *const RESUTIL_PROPERTY_ITEM, pszoutproperties: windows_core::PWSTR, cboutpropertiessize: u32, pcbbytesreturned: *mut u32, pcbrequired: *mut u32) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilEnumProperties(ppropertytable : *const RESUTIL_PROPERTY_ITEM, pszoutproperties : windows_core::PWSTR, cboutpropertiessize : u32, pcbbytesreturned : *mut u32, pcbrequired : *mut u32) -> u32); - unsafe { ResUtilEnumProperties(ppropertytable, core::mem::transmute(pszoutproperties), cboutpropertiessize, core::mem::transmute(pcbbytesreturned), core::mem::transmute(pcbrequired)) } + unsafe { ResUtilEnumProperties(ppropertytable, core::mem::transmute(pszoutproperties), cboutpropertiessize, pcbbytesreturned as _, pcbrequired as _) } } #[inline] pub unsafe fn ResUtilEnumResources(hself: HRESOURCE, lpszrestypename: P1, prescallback: LPRESOURCE_CALLBACK, pparameter: *mut core::ffi::c_void) -> u32 @@ -1862,7 +1862,7 @@ where 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); - unsafe { ResUtilEnumResources(hself, lpszrestypename.param().abi(), prescallback, core::mem::transmute(pparameter)) } + unsafe { ResUtilEnumResources(hself, lpszrestypename.param().abi(), prescallback, pparameter as _) } } #[inline] pub unsafe fn ResUtilEnumResourcesEx(hcluster: HCLUSTER, hself: HRESOURCE, lpszrestypename: P2, prescallback: LPRESOURCE_CALLBACK_EX, pparameter: *mut core::ffi::c_void) -> u32 @@ -1870,7 +1870,7 @@ where 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); - unsafe { ResUtilEnumResourcesEx(hcluster, hself, lpszrestypename.param().abi(), prescallback, core::mem::transmute(pparameter)) } + unsafe { ResUtilEnumResourcesEx(hcluster, hself, lpszrestypename.param().abi(), prescallback, pparameter as _) } } #[inline] pub unsafe fn ResUtilEnumResourcesEx2(hcluster: HCLUSTER, hself: HRESOURCE, lpszrestypename: P2, prescallback: LPRESOURCE_CALLBACK_EX, pparameter: *mut core::ffi::c_void, dwdesiredaccess: u32) -> u32 @@ -1878,7 +1878,7 @@ where 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); - unsafe { ResUtilEnumResourcesEx2(hcluster, hself, lpszrestypename.param().abi(), prescallback, core::mem::transmute(pparameter), dwdesiredaccess) } + unsafe { ResUtilEnumResourcesEx2(hcluster, hself, lpszrestypename.param().abi(), prescallback, pparameter as _, dwdesiredaccess) } } #[inline] pub unsafe fn ResUtilExpandEnvironmentStrings(pszsrc: P0) -> windows_core::PWSTR @@ -1894,12 +1894,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); - unsafe { ResUtilFindBinaryProperty(ppropertylist, cbpropertylistsize, pszpropertyname.param().abi(), core::mem::transmute(pbpropertyvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbpropertyvaluesize.unwrap_or(core::mem::zeroed()))) } + unsafe { ResUtilFindBinaryProperty(ppropertylist, cbpropertylistsize, pszpropertyname.param().abi(), pbpropertyvalue.unwrap_or(core::mem::zeroed()) as _, pcbpropertyvaluesize.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { ResUtilFindDependentDiskResourceDriveLetter(hcluster, hresource, core::mem::transmute(pszdriveletter), core::mem::transmute(pcchdriveletter)) } + unsafe { ResUtilFindDependentDiskResourceDriveLetter(hcluster, hresource, core::mem::transmute(pszdriveletter), pcchdriveletter as _) } } #[inline] pub unsafe fn ResUtilFindDwordProperty(ppropertylist: *const core::ffi::c_void, cbpropertylistsize: u32, pszpropertyname: P2, pdwpropertyvalue: *mut u32) -> u32 @@ -1907,7 +1907,7 @@ where P2: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilFindDwordProperty(ppropertylist : *const core::ffi::c_void, cbpropertylistsize : u32, pszpropertyname : windows_core::PCWSTR, pdwpropertyvalue : *mut u32) -> u32); - unsafe { ResUtilFindDwordProperty(ppropertylist, cbpropertylistsize, pszpropertyname.param().abi(), core::mem::transmute(pdwpropertyvalue)) } + unsafe { ResUtilFindDwordProperty(ppropertylist, cbpropertylistsize, pszpropertyname.param().abi(), pdwpropertyvalue as _) } } #[inline] pub unsafe fn ResUtilFindExpandSzProperty(ppropertylist: *const core::ffi::c_void, cbpropertylistsize: u32, pszpropertyname: P2, pszpropertyvalue: Option<*mut windows_core::PWSTR>) -> u32 @@ -1915,7 +1915,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); - unsafe { ResUtilFindExpandSzProperty(ppropertylist, cbpropertylistsize, pszpropertyname.param().abi(), core::mem::transmute(pszpropertyvalue.unwrap_or(core::mem::zeroed()))) } + unsafe { ResUtilFindExpandSzProperty(ppropertylist, cbpropertylistsize, pszpropertyname.param().abi(), pszpropertyvalue.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ResUtilFindExpandedSzProperty(ppropertylist: *const core::ffi::c_void, cbpropertylistsize: u32, pszpropertyname: P2, pszpropertyvalue: Option<*mut windows_core::PWSTR>) -> u32 @@ -1923,7 +1923,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); - unsafe { ResUtilFindExpandedSzProperty(ppropertylist, cbpropertylistsize, pszpropertyname.param().abi(), core::mem::transmute(pszpropertyvalue.unwrap_or(core::mem::zeroed()))) } + unsafe { ResUtilFindExpandedSzProperty(ppropertylist, cbpropertylistsize, pszpropertyname.param().abi(), pszpropertyvalue.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ResUtilFindFileTimeProperty(ppropertylist: *const core::ffi::c_void, cbpropertylistsize: u32, pszpropertyname: P2, pftpropertyvalue: *mut super::super::Foundation::FILETIME) -> u32 @@ -1931,7 +1931,7 @@ where P2: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilFindFileTimeProperty(ppropertylist : *const core::ffi::c_void, cbpropertylistsize : u32, pszpropertyname : windows_core::PCWSTR, pftpropertyvalue : *mut super::super::Foundation:: FILETIME) -> u32); - unsafe { ResUtilFindFileTimeProperty(ppropertylist, cbpropertylistsize, pszpropertyname.param().abi(), core::mem::transmute(pftpropertyvalue)) } + unsafe { ResUtilFindFileTimeProperty(ppropertylist, cbpropertylistsize, pszpropertyname.param().abi(), pftpropertyvalue as _) } } #[inline] pub unsafe fn ResUtilFindLongProperty(ppropertylist: *const core::ffi::c_void, cbpropertylistsize: u32, pszpropertyname: P2, plpropertyvalue: *mut i32) -> u32 @@ -1939,7 +1939,7 @@ where P2: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilFindLongProperty(ppropertylist : *const core::ffi::c_void, cbpropertylistsize : u32, pszpropertyname : windows_core::PCWSTR, plpropertyvalue : *mut i32) -> u32); - unsafe { ResUtilFindLongProperty(ppropertylist, cbpropertylistsize, pszpropertyname.param().abi(), core::mem::transmute(plpropertyvalue)) } + unsafe { ResUtilFindLongProperty(ppropertylist, cbpropertylistsize, pszpropertyname.param().abi(), plpropertyvalue as _) } } #[inline] pub unsafe fn ResUtilFindMultiSzProperty(ppropertylist: *const core::ffi::c_void, cbpropertylistsize: u32, pszpropertyname: P2, pszpropertyvalue: *mut windows_core::PWSTR, pcbpropertyvaluesize: *mut u32) -> u32 @@ -1947,7 +1947,7 @@ where P2: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilFindMultiSzProperty(ppropertylist : *const core::ffi::c_void, cbpropertylistsize : u32, pszpropertyname : windows_core::PCWSTR, pszpropertyvalue : *mut windows_core::PWSTR, pcbpropertyvaluesize : *mut u32) -> u32); - unsafe { ResUtilFindMultiSzProperty(ppropertylist, cbpropertylistsize, pszpropertyname.param().abi(), core::mem::transmute(pszpropertyvalue), core::mem::transmute(pcbpropertyvaluesize)) } + unsafe { ResUtilFindMultiSzProperty(ppropertylist, cbpropertylistsize, pszpropertyname.param().abi(), pszpropertyvalue as _, pcbpropertyvaluesize as _) } } #[inline] pub unsafe fn ResUtilFindSzProperty(ppropertylist: *const core::ffi::c_void, cbpropertylistsize: u32, pszpropertyname: P2, pszpropertyvalue: Option<*mut windows_core::PWSTR>) -> u32 @@ -1955,7 +1955,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); - unsafe { ResUtilFindSzProperty(ppropertylist, cbpropertylistsize, pszpropertyname.param().abi(), core::mem::transmute(pszpropertyvalue.unwrap_or(core::mem::zeroed()))) } + unsafe { ResUtilFindSzProperty(ppropertylist, cbpropertylistsize, pszpropertyname.param().abi(), pszpropertyvalue.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ResUtilFindULargeIntegerProperty(ppropertylist: *const core::ffi::c_void, cbpropertylistsize: u32, pszpropertyname: P2, plpropertyvalue: *mut u64) -> u32 @@ -1963,28 +1963,28 @@ where P2: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilFindULargeIntegerProperty(ppropertylist : *const core::ffi::c_void, cbpropertylistsize : u32, pszpropertyname : windows_core::PCWSTR, plpropertyvalue : *mut u64) -> u32); - unsafe { ResUtilFindULargeIntegerProperty(ppropertylist, cbpropertylistsize, pszpropertyname.param().abi(), core::mem::transmute(plpropertyvalue)) } + unsafe { ResUtilFindULargeIntegerProperty(ppropertylist, cbpropertylistsize, pszpropertyname.param().abi(), plpropertyvalue as _) } } #[inline] pub unsafe fn ResUtilFreeEnvironment(lpenvironment: *mut core::ffi::c_void) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilFreeEnvironment(lpenvironment : *mut core::ffi::c_void) -> u32); - unsafe { ResUtilFreeEnvironment(core::mem::transmute(lpenvironment)) } + unsafe { ResUtilFreeEnvironment(lpenvironment as _) } } #[inline] pub unsafe fn ResUtilFreeParameterBlock(poutparams: *mut u8, pinparams: *const u8, ppropertytable: *const RESUTIL_PROPERTY_ITEM) { windows_targets::link!("resutils.dll" "system" fn ResUtilFreeParameterBlock(poutparams : *mut u8, pinparams : *const u8, ppropertytable : *const RESUTIL_PROPERTY_ITEM)); - unsafe { ResUtilFreeParameterBlock(core::mem::transmute(poutparams), pinparams, ppropertytable) } + unsafe { ResUtilFreeParameterBlock(poutparams as _, pinparams, ppropertytable) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { ResUtilGetAllProperties(hkeyclusterkey, ppropertytable, core::mem::transmute(poutpropertylist), cboutpropertylistsize, core::mem::transmute(pcbbytesreturned), core::mem::transmute(pcbrequired)) } + unsafe { ResUtilGetAllProperties(hkeyclusterkey, ppropertytable, poutpropertylist as _, cboutpropertylistsize, pcbbytesreturned as _, pcbrequired as _) } } #[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 { windows_targets::link!("resutils.dll" "system" fn ResUtilGetBinaryProperty(ppboutvalue : *mut *mut u8, pcboutvaluesize : *mut u32, pvaluestruct : *const CLUSPROP_BINARY, pboldvalue : *const u8, cboldvaluesize : u32, pppropertylist : *mut *mut u8, pcbpropertylistsize : *mut u32) -> u32); - unsafe { ResUtilGetBinaryProperty(core::mem::transmute(ppboutvalue), core::mem::transmute(pcboutvaluesize), pvaluestruct, core::mem::transmute(pboldvalue.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pboldvalue.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pppropertylist), core::mem::transmute(pcbpropertylistsize)) } + unsafe { ResUtilGetBinaryProperty(ppboutvalue as _, pcboutvaluesize as _, pvaluestruct, core::mem::transmute(pboldvalue.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pboldvalue.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pppropertylist as _, pcbpropertylistsize as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -1993,17 +1993,17 @@ where 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); - unsafe { ResUtilGetBinaryValue(hkeyclusterkey, pszvaluename.param().abi(), core::mem::transmute(ppboutvalue), core::mem::transmute(pcboutvaluesize)) } + unsafe { ResUtilGetBinaryValue(hkeyclusterkey, pszvaluename.param().abi(), ppboutvalue as _, pcboutvaluesize as _) } } #[inline] 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); - unsafe { ResUtilGetClusterGroupType(hgroup, core::mem::transmute(grouptype)) } + unsafe { ResUtilGetClusterGroupType(hgroup, grouptype as _) } } #[inline] 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); - unsafe { ResUtilGetClusterId(hcluster, core::mem::transmute(guid)) } + unsafe { ResUtilGetClusterId(hcluster, guid as _) } } #[inline] pub unsafe fn ResUtilGetClusterRoleState(hcluster: HCLUSTER, eclusterrole: CLUSTER_ROLE) -> CLUSTER_ROLE_STATE { @@ -2013,12 +2013,12 @@ pub unsafe fn ResUtilGetClusterRoleState(hcluster: HCLUSTER, eclusterrole: CLUST #[inline] 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); - unsafe { ResUtilGetCoreClusterResources(hcluster, core::mem::transmute(phclusternameresource), core::mem::transmute(phclusteripaddressresource), core::mem::transmute(phclusterquorumresource)) } + unsafe { ResUtilGetCoreClusterResources(hcluster, phclusternameresource as _, phclusteripaddressresource as _, phclusterquorumresource as _) } } #[inline] 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); - unsafe { ResUtilGetCoreClusterResourcesEx(hclusterin, core::mem::transmute(phclusternameresourceout.unwrap_or(core::mem::zeroed())), core::mem::transmute(phclusterquorumresourceout.unwrap_or(core::mem::zeroed())), dwdesiredaccess) } + unsafe { ResUtilGetCoreClusterResourcesEx(hclusterin, phclusternameresourceout.unwrap_or(core::mem::zeroed()) as _, phclusterquorumresourceout.unwrap_or(core::mem::zeroed()) as _, dwdesiredaccess) } } #[inline] pub unsafe fn ResUtilGetCoreGroup(hcluster: HCLUSTER) -> HGROUP { @@ -2028,7 +2028,7 @@ pub unsafe fn ResUtilGetCoreGroup(hcluster: HCLUSTER) -> HGROUP { #[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 { windows_targets::link!("resutils.dll" "system" fn ResUtilGetDwordProperty(pdwoutvalue : *mut u32, pvaluestruct : *const CLUSPROP_DWORD, dwoldvalue : u32, dwminimum : u32, dwmaximum : u32, pppropertylist : *mut *mut u8, pcbpropertylistsize : *mut u32) -> u32); - unsafe { ResUtilGetDwordProperty(core::mem::transmute(pdwoutvalue), pvaluestruct, dwoldvalue, dwminimum, dwmaximum, core::mem::transmute(pppropertylist), core::mem::transmute(pcbpropertylistsize)) } + unsafe { ResUtilGetDwordProperty(pdwoutvalue as _, pvaluestruct, dwoldvalue, dwminimum, dwmaximum, pppropertylist as _, pcbpropertylistsize as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -2037,7 +2037,7 @@ where 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); - unsafe { ResUtilGetDwordValue(hkeyclusterkey, pszvaluename.param().abi(), core::mem::transmute(pdwoutvalue), dwdefaultvalue) } + unsafe { ResUtilGetDwordValue(hkeyclusterkey, pszvaluename.param().abi(), pdwoutvalue as _, dwdefaultvalue) } } #[inline] pub unsafe fn ResUtilGetEnvironmentWithNetName(hresource: HRESOURCE) -> *mut core::ffi::c_void { @@ -2047,12 +2047,12 @@ pub unsafe fn ResUtilGetEnvironmentWithNetName(hresource: HRESOURCE) -> *mut cor #[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 { windows_targets::link!("resutils.dll" "system" 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); - unsafe { ResUtilGetFileTimeProperty(core::mem::transmute(pftoutvalue), pvaluestruct, core::mem::transmute(ftoldvalue), core::mem::transmute(ftminimum), core::mem::transmute(ftmaximum), core::mem::transmute(pppropertylist), core::mem::transmute(pcbpropertylistsize)) } + unsafe { ResUtilGetFileTimeProperty(pftoutvalue as _, pvaluestruct, core::mem::transmute(ftoldvalue), core::mem::transmute(ftminimum), core::mem::transmute(ftmaximum), pppropertylist as _, pcbpropertylistsize as _) } } #[inline] pub unsafe fn ResUtilGetLongProperty(ploutvalue: *mut i32, pvaluestruct: *const CLUSPROP_LONG, loldvalue: i32, lminimum: i32, lmaximum: i32, pppropertylist: *mut *mut u8, pcbpropertylistsize: *mut u32) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilGetLongProperty(ploutvalue : *mut i32, pvaluestruct : *const CLUSPROP_LONG, loldvalue : i32, lminimum : i32, lmaximum : i32, pppropertylist : *mut *mut u8, pcbpropertylistsize : *mut u32) -> u32); - unsafe { ResUtilGetLongProperty(core::mem::transmute(ploutvalue), pvaluestruct, loldvalue, lminimum, lmaximum, core::mem::transmute(pppropertylist), core::mem::transmute(pcbpropertylistsize)) } + unsafe { ResUtilGetLongProperty(ploutvalue as _, pvaluestruct, loldvalue, lminimum, lmaximum, pppropertylist as _, pcbpropertylistsize as _) } } #[inline] pub unsafe fn ResUtilGetMultiSzProperty(ppszoutvalue: *mut windows_core::PWSTR, pcboutvaluesize: *mut u32, pvaluestruct: *const CLUSPROP_SZ, pszoldvalue: P3, cboldvaluesize: u32, pppropertylist: *mut *mut u8, pcbpropertylistsize: *mut u32) -> u32 @@ -2060,42 +2060,42 @@ where P3: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilGetMultiSzProperty(ppszoutvalue : *mut windows_core::PWSTR, pcboutvaluesize : *mut u32, pvaluestruct : *const CLUSPROP_SZ, pszoldvalue : windows_core::PCWSTR, cboldvaluesize : u32, pppropertylist : *mut *mut u8, pcbpropertylistsize : *mut u32) -> u32); - unsafe { ResUtilGetMultiSzProperty(core::mem::transmute(ppszoutvalue), core::mem::transmute(pcboutvaluesize), pvaluestruct, pszoldvalue.param().abi(), cboldvaluesize, core::mem::transmute(pppropertylist), core::mem::transmute(pcbpropertylistsize)) } + unsafe { ResUtilGetMultiSzProperty(ppszoutvalue as _, pcboutvaluesize as _, pvaluestruct, pszoldvalue.param().abi(), cboldvaluesize, pppropertylist as _, pcbpropertylistsize as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { ResUtilGetPrivateProperties(hkeyclusterkey, core::mem::transmute(poutpropertylist), cboutpropertylistsize, core::mem::transmute(pcbbytesreturned), core::mem::transmute(pcbrequired)) } + unsafe { ResUtilGetPrivateProperties(hkeyclusterkey, poutpropertylist as _, cboutpropertylistsize, pcbbytesreturned as _, pcbrequired as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { ResUtilGetProperties(hkeyclusterkey, ppropertytable, core::mem::transmute(poutpropertylist), cboutpropertylistsize, core::mem::transmute(pcbbytesreturned), core::mem::transmute(pcbrequired)) } + unsafe { ResUtilGetProperties(hkeyclusterkey, ppropertytable, poutpropertylist as _, cboutpropertylistsize, pcbbytesreturned as _, pcbrequired as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] pub unsafe fn ResUtilGetPropertiesToParameterBlock(hkeyclusterkey: super::super::System::Registry::HKEY, ppropertytable: *const RESUTIL_PROPERTY_ITEM, poutparams: *mut u8, bcheckforrequiredproperties: bool, psznameofpropinerror: *mut windows_core::PWSTR) -> u32 { 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); - unsafe { ResUtilGetPropertiesToParameterBlock(hkeyclusterkey, ppropertytable, core::mem::transmute(poutparams), bcheckforrequiredproperties.into(), core::mem::transmute(psznameofpropinerror)) } + unsafe { ResUtilGetPropertiesToParameterBlock(hkeyclusterkey, ppropertytable, poutparams as _, bcheckforrequiredproperties.into(), psznameofpropinerror as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { ResUtilGetProperty(hkeyclusterkey, ppropertytableitem, core::mem::transmute(poutpropertyitem), core::mem::transmute(pcboutpropertyitemsize)) } + unsafe { ResUtilGetProperty(hkeyclusterkey, ppropertytableitem, poutpropertyitem as _, pcboutpropertyitemsize as _) } } #[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 { windows_targets::link!("resutils.dll" "system" fn ResUtilGetPropertyFormats(ppropertytable : *const RESUTIL_PROPERTY_ITEM, poutpropertyformatlist : *mut core::ffi::c_void, cbpropertyformatlistsize : u32, pcbbytesreturned : *mut u32, pcbrequired : *mut u32) -> u32); - unsafe { ResUtilGetPropertyFormats(ppropertytable, core::mem::transmute(poutpropertyformatlist), cbpropertyformatlistsize, core::mem::transmute(pcbbytesreturned), core::mem::transmute(pcbrequired)) } + unsafe { ResUtilGetPropertyFormats(ppropertytable, poutpropertyformatlist as _, cbpropertyformatlistsize, pcbbytesreturned as _, pcbrequired as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { ResUtilGetPropertySize(hkeyclusterkey, ppropertytableitem, core::mem::transmute(pcboutpropertylistsize), core::mem::transmute(pnpropertycount)) } + unsafe { ResUtilGetPropertySize(hkeyclusterkey, ppropertytableitem, pcboutpropertylistsize as _, pnpropertycount as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -2104,7 +2104,7 @@ where 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); - unsafe { ResUtilGetQwordValue(hkeyclusterkey, pszvaluename.param().abi(), core::mem::transmute(pqwoutvalue), qwdefaultvalue) } + unsafe { ResUtilGetQwordValue(hkeyclusterkey, pszvaluename.param().abi(), pqwoutvalue as _, qwdefaultvalue) } } #[inline] pub unsafe fn ResUtilGetResourceDependency(hself: super::super::Foundation::HANDLE, lpszresourcetype: P1) -> HRESOURCE @@ -2117,12 +2117,12 @@ where #[inline] pub unsafe fn ResUtilGetResourceDependencyByClass(hcluster: HCLUSTER, hself: super::super::Foundation::HANDLE, prci: *mut CLUS_RESOURCE_CLASS_INFO, brecurse: bool) -> HRESOURCE { 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); - unsafe { ResUtilGetResourceDependencyByClass(hcluster, hself, core::mem::transmute(prci), brecurse.into()) } + unsafe { ResUtilGetResourceDependencyByClass(hcluster, hself, prci as _, brecurse.into()) } } #[inline] pub unsafe fn ResUtilGetResourceDependencyByClassEx(hcluster: HCLUSTER, hself: super::super::Foundation::HANDLE, prci: *mut CLUS_RESOURCE_CLASS_INFO, brecurse: bool, dwdesiredaccess: u32) -> HRESOURCE { 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); - unsafe { ResUtilGetResourceDependencyByClassEx(hcluster, hself, core::mem::transmute(prci), brecurse.into(), dwdesiredaccess) } + unsafe { ResUtilGetResourceDependencyByClassEx(hcluster, hself, prci as _, brecurse.into(), dwdesiredaccess) } } #[inline] pub unsafe fn ResUtilGetResourceDependencyByName(hcluster: HCLUSTER, hself: super::super::Foundation::HANDLE, lpszresourcetype: P2, brecurse: bool) -> HRESOURCE @@ -2151,12 +2151,12 @@ where #[inline] 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); - unsafe { ResUtilGetResourceDependentIPAddressProps(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)) } + unsafe { ResUtilGetResourceDependentIPAddressProps(hresource, core::mem::transmute(pszaddress), pcchaddress as _, core::mem::transmute(pszsubnetmask), pcchsubnetmask as _, core::mem::transmute(psznetwork), pcchnetwork as _) } } #[inline] 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); - unsafe { ResUtilGetResourceName(hresource, core::mem::transmute(pszresourcename), core::mem::transmute(pcchresourcenameinout)) } + unsafe { ResUtilGetResourceName(hresource, core::mem::transmute(pszresourcename), pcchresourcenameinout as _) } } #[inline] pub unsafe fn ResUtilGetResourceNameDependency(lpszresourcename: P0, lpszresourcetype: P1) -> HRESOURCE @@ -2182,7 +2182,7 @@ where P2: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilGetSzProperty(ppszoutvalue : *mut windows_core::PWSTR, pvaluestruct : *const CLUSPROP_SZ, pszoldvalue : windows_core::PCWSTR, pppropertylist : *mut *mut u8, pcbpropertylistsize : *mut u32) -> u32); - unsafe { ResUtilGetSzProperty(core::mem::transmute(ppszoutvalue), pvaluestruct, pszoldvalue.param().abi(), core::mem::transmute(pppropertylist), core::mem::transmute(pcbpropertylistsize)) } + unsafe { ResUtilGetSzProperty(ppszoutvalue as _, pvaluestruct, pszoldvalue.param().abi(), pppropertylist as _, pcbpropertylistsize as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -2196,7 +2196,7 @@ where #[inline] 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); - unsafe { ResUtilGroupsEqual(hself, hgroup, core::mem::transmute(pequal)) } + unsafe { ResUtilGroupsEqual(hself, hgroup, pequal as _) } } #[inline] pub unsafe fn ResUtilIsPathValid(pszpath: P0) -> super::super::Foundation::BOOL @@ -2209,7 +2209,7 @@ where #[inline] 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); - unsafe { ResUtilIsResourceClassEqual(core::mem::transmute(prci), hresource) } + unsafe { ResUtilIsResourceClassEqual(prci as _, hresource) } } #[inline] pub unsafe fn ResUtilLeftPaxosIsLessThanRight(left: *const PaxosTagCStruct, right: *const PaxosTagCStruct) -> super::super::Foundation::BOOL { @@ -2219,7 +2219,7 @@ pub unsafe fn ResUtilLeftPaxosIsLessThanRight(left: *const PaxosTagCStruct, righ #[inline] 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); - unsafe { ResUtilNodeEnum(hcluster, pnodecallback, core::mem::transmute(pparameter)) } + unsafe { ResUtilNodeEnum(hcluster, pnodecallback, pparameter as _) } } #[inline] pub unsafe fn ResUtilPaxosComparer(left: *const PaxosTagCStruct, right: *const PaxosTagCStruct) -> super::super::Foundation::BOOL { @@ -2229,7 +2229,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); - unsafe { ResUtilPropertyListFromParameterBlock(ppropertytable, core::mem::transmute(poutpropertylist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcboutpropertylistsize), pinparams, core::mem::transmute(pcbbytesreturned), core::mem::transmute(pcbrequired)) } + unsafe { ResUtilPropertyListFromParameterBlock(ppropertytable, poutpropertylist.unwrap_or(core::mem::zeroed()) as _, pcboutpropertylistsize as _, pinparams, pcbbytesreturned as _, pcbrequired as _) } } #[inline] pub unsafe fn ResUtilRemoveResourceServiceEnvironment(pszservicename: P0, pfnlogevent: PLOG_EVENT_ROUTINE, hresourcehandle: isize) -> u32 @@ -2242,7 +2242,7 @@ where #[inline] 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); - unsafe { ResUtilResourceDepEnum(hself, enumtype, prescallback, core::mem::transmute(pparameter)) } + unsafe { ResUtilResourceDepEnum(hself, enumtype, prescallback, pparameter as _) } } #[inline] pub unsafe fn ResUtilResourceTypesEqual(lpszresourcetypename: P0, hresource: HRESOURCE) -> super::super::Foundation::BOOL @@ -2264,7 +2264,7 @@ where P1: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilSetBinaryValue(hkeyclusterkey : super::super::System::Registry:: HKEY, pszvaluename : windows_core::PCWSTR, pbnewvalue : *const u8, cbnewvaluesize : u32, ppboutvalue : *mut *mut u8, pcboutvaluesize : *mut u32) -> u32); - unsafe { ResUtilSetBinaryValue(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)) } + unsafe { ResUtilSetBinaryValue(hkeyclusterkey, pszvaluename.param().abi(), core::mem::transmute(pbnewvalue.as_ptr()), pbnewvalue.len().try_into().unwrap(), ppboutvalue.unwrap_or(core::mem::zeroed()) as _, pcboutvaluesize as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -2273,7 +2273,7 @@ where 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); - unsafe { ResUtilSetDwordValue(hkeyclusterkey, pszvaluename.param().abi(), dwnewvalue, core::mem::transmute(pdwoutvalue)) } + unsafe { ResUtilSetDwordValue(hkeyclusterkey, pszvaluename.param().abi(), dwnewvalue, pdwoutvalue as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -2283,7 +2283,7 @@ where P2: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilSetExpandSzValue(hkeyclusterkey : super::super::System::Registry:: HKEY, pszvaluename : windows_core::PCWSTR, psznewvalue : windows_core::PCWSTR, ppszoutstring : *mut windows_core::PWSTR) -> u32); - unsafe { ResUtilSetExpandSzValue(hkeyclusterkey, pszvaluename.param().abi(), psznewvalue.param().abi(), core::mem::transmute(ppszoutstring.unwrap_or(core::mem::zeroed()))) } + unsafe { ResUtilSetExpandSzValue(hkeyclusterkey, pszvaluename.param().abi(), psznewvalue.param().abi(), ppszoutstring.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -2293,7 +2293,7 @@ where P2: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilSetMultiSzValue(hkeyclusterkey : super::super::System::Registry:: HKEY, pszvaluename : windows_core::PCWSTR, psznewvalue : windows_core::PCWSTR, cbnewvaluesize : u32, ppszoutvalue : *mut windows_core::PWSTR, pcboutvaluesize : *mut u32) -> u32); - unsafe { ResUtilSetMultiSzValue(hkeyclusterkey, pszvaluename.param().abi(), psznewvalue.param().abi(), cbnewvaluesize, core::mem::transmute(ppszoutvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcboutvaluesize.unwrap_or(core::mem::zeroed()))) } + unsafe { ResUtilSetMultiSzValue(hkeyclusterkey, pszvaluename.param().abi(), psznewvalue.param().abi(), cbnewvaluesize, ppszoutvalue.unwrap_or(core::mem::zeroed()) as _, pcboutvaluesize.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -2305,25 +2305,25 @@ pub unsafe fn ResUtilSetPrivatePropertyList(hkeyclusterkey: super::super::System #[inline] 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); - unsafe { ResUtilSetPropertyParameterBlock(hkeyclusterkey, ppropertytable, core::mem::transmute(reserved), pinparams, pinpropertylist, cbinpropertylistsize, core::mem::transmute(poutparams)) } + unsafe { ResUtilSetPropertyParameterBlock(hkeyclusterkey, ppropertytable, reserved as _, pinparams, pinpropertylist, cbinpropertylistsize, poutparams as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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: bool, poutparams: *mut u8) -> u32 { 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); - unsafe { ResUtilSetPropertyParameterBlockEx(hkeyclusterkey, ppropertytable, core::mem::transmute(reserved), pinparams, pinpropertylist, cbinpropertylistsize, bforcewrite.into(), core::mem::transmute(poutparams)) } + unsafe { ResUtilSetPropertyParameterBlockEx(hkeyclusterkey, ppropertytable, reserved as _, pinparams, pinpropertylist, cbinpropertylistsize, bforcewrite.into(), poutparams as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] pub unsafe fn ResUtilSetPropertyTable(hkeyclusterkey: super::super::System::Registry::HKEY, ppropertytable: *const RESUTIL_PROPERTY_ITEM, reserved: Option<*const core::ffi::c_void>, ballowunknownproperties: bool, pinpropertylist: *const core::ffi::c_void, cbinpropertylistsize: u32, poutparams: Option<*mut u8>) -> u32 { 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); - unsafe { ResUtilSetPropertyTable(hkeyclusterkey, ppropertytable, core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), ballowunknownproperties.into(), pinpropertylist, cbinpropertylistsize, core::mem::transmute(poutparams.unwrap_or(core::mem::zeroed()))) } + unsafe { ResUtilSetPropertyTable(hkeyclusterkey, ppropertytable, reserved.unwrap_or(core::mem::zeroed()) as _, ballowunknownproperties.into(), pinpropertylist, cbinpropertylistsize, poutparams.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] pub unsafe fn ResUtilSetPropertyTableEx(hkeyclusterkey: super::super::System::Registry::HKEY, ppropertytable: *const RESUTIL_PROPERTY_ITEM, reserved: *mut core::ffi::c_void, ballowunknownproperties: bool, pinpropertylist: *const core::ffi::c_void, cbinpropertylistsize: u32, bforcewrite: bool, poutparams: *mut u8) -> u32 { 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); - unsafe { ResUtilSetPropertyTableEx(hkeyclusterkey, ppropertytable, core::mem::transmute(reserved), ballowunknownproperties.into(), pinpropertylist, cbinpropertylistsize, bforcewrite.into(), core::mem::transmute(poutparams)) } + unsafe { ResUtilSetPropertyTableEx(hkeyclusterkey, ppropertytable, reserved as _, ballowunknownproperties.into(), pinpropertylist, cbinpropertylistsize, bforcewrite.into(), poutparams as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -2332,7 +2332,7 @@ where P1: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilSetQwordValue(hkeyclusterkey : super::super::System::Registry:: HKEY, pszvaluename : windows_core::PCWSTR, qwnewvalue : u64, pqwoutvalue : *mut u64) -> u32); - unsafe { ResUtilSetQwordValue(hkeyclusterkey, pszvaluename.param().abi(), qwnewvalue, core::mem::transmute(pqwoutvalue.unwrap_or(core::mem::zeroed()))) } + unsafe { ResUtilSetQwordValue(hkeyclusterkey, pszvaluename.param().abi(), qwnewvalue, pqwoutvalue.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ResUtilSetResourceServiceEnvironment(pszservicename: P0, hresource: HRESOURCE, pfnlogevent: PLOG_EVENT_ROUTINE, hresourcehandle: isize) -> u32 @@ -2349,7 +2349,7 @@ where P0: 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); - unsafe { ResUtilSetResourceServiceStartParameters(pszservicename.param().abi(), schscmhandle, core::mem::transmute(phservice), pfnlogevent, hresourcehandle) } + unsafe { ResUtilSetResourceServiceStartParameters(pszservicename.param().abi(), schscmhandle, phservice as _, pfnlogevent, hresourcehandle) } } #[cfg(feature = "Win32_System_Services")] #[inline] @@ -2358,7 +2358,7 @@ where P0: 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); - unsafe { ResUtilSetResourceServiceStartParametersEx(pszservicename.param().abi(), schscmhandle, core::mem::transmute(phservice), dwdesiredaccess, pfnlogevent, hresourcehandle) } + unsafe { ResUtilSetResourceServiceStartParametersEx(pszservicename.param().abi(), schscmhandle, phservice as _, dwdesiredaccess, pfnlogevent, hresourcehandle) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -2368,7 +2368,7 @@ where P2: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilSetSzValue(hkeyclusterkey : super::super::System::Registry:: HKEY, pszvaluename : windows_core::PCWSTR, psznewvalue : windows_core::PCWSTR, ppszoutstring : *mut windows_core::PWSTR) -> u32); - unsafe { ResUtilSetSzValue(hkeyclusterkey, pszvaluename.param().abi(), psznewvalue.param().abi(), core::mem::transmute(ppszoutstring.unwrap_or(core::mem::zeroed()))) } + unsafe { ResUtilSetSzValue(hkeyclusterkey, pszvaluename.param().abi(), psznewvalue.param().abi(), ppszoutstring.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -2392,7 +2392,7 @@ where P0: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilStartResourceService(pszservicename : windows_core::PCWSTR, phservicehandle : *mut super::super::System::Services:: SC_HANDLE) -> u32); - unsafe { ResUtilStartResourceService(pszservicename.param().abi(), core::mem::transmute(phservicehandle)) } + unsafe { ResUtilStartResourceService(pszservicename.param().abi(), phservicehandle as _) } } #[inline] pub unsafe fn ResUtilStopResourceService(pszservicename: P0) -> u32 @@ -2411,7 +2411,7 @@ pub unsafe fn ResUtilStopService(hservicehandle: super::super::System::Services: #[inline] pub unsafe fn ResUtilTerminateServiceProcessFromResDll(dwservicepid: u32, boffline: bool, pdwresourcestate: *mut u32, pfnlogevent: PLOG_EVENT_ROUTINE, hresourcehandle: isize) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilTerminateServiceProcessFromResDll(dwservicepid : u32, boffline : super::super::Foundation:: BOOL, pdwresourcestate : *mut u32, pfnlogevent : PLOG_EVENT_ROUTINE, hresourcehandle : isize) -> u32); - unsafe { ResUtilTerminateServiceProcessFromResDll(dwservicepid, boffline.into(), core::mem::transmute(pdwresourcestate), pfnlogevent, hresourcehandle) } + unsafe { ResUtilTerminateServiceProcessFromResDll(dwservicepid, boffline.into(), pdwresourcestate as _, pfnlogevent, hresourcehandle) } } #[inline] pub unsafe fn ResUtilVerifyPrivatePropertyList(pinpropertylist: *const core::ffi::c_void, cbinpropertylistsize: u32) -> u32 { @@ -2421,7 +2421,7 @@ pub unsafe fn ResUtilVerifyPrivatePropertyList(pinpropertylist: *const core::ffi #[inline] pub unsafe fn ResUtilVerifyPropertyTable(ppropertytable: *const RESUTIL_PROPERTY_ITEM, reserved: Option<*const core::ffi::c_void>, ballowunknownproperties: bool, pinpropertylist: *const core::ffi::c_void, cbinpropertylistsize: u32, poutparams: Option<*mut u8>) -> u32 { 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); - unsafe { ResUtilVerifyPropertyTable(ppropertytable, core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), ballowunknownproperties.into(), pinpropertylist, cbinpropertylistsize, core::mem::transmute(poutparams.unwrap_or(core::mem::zeroed()))) } + unsafe { ResUtilVerifyPropertyTable(ppropertytable, reserved.unwrap_or(core::mem::zeroed()) as _, ballowunknownproperties.into(), pinpropertylist, cbinpropertylistsize, poutparams.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ResUtilVerifyResourceService(pszservicename: P0) -> u32 @@ -2440,7 +2440,7 @@ pub unsafe fn ResUtilVerifyService(hservicehandle: super::super::System::Service #[inline] pub unsafe fn ResUtilVerifyShutdownSafe(flags: u32, reason: u32, presult: *mut u32) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilVerifyShutdownSafe(flags : u32, reason : u32, presult : *mut u32) -> u32); - unsafe { ResUtilVerifyShutdownSafe(flags, reason, core::mem::transmute(presult)) } + unsafe { ResUtilVerifyShutdownSafe(flags, reason, presult as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -2636,7 +2636,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn SetClusterServiceAccountPassword(lpszclustername : windows_core::PCWSTR, lpsznewpassword : windows_core::PCWSTR, dwflags : u32, lpreturnstatusbuffer : *mut CLUSTER_SET_PASSWORD_STATUS, lpcbreturnstatusbuffersize : *mut u32) -> u32); - unsafe { SetClusterServiceAccountPassword(lpszclustername.param().abi(), lpsznewpassword.param().abi(), dwflags, core::mem::transmute(lpreturnstatusbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbreturnstatusbuffersize)) } + unsafe { SetClusterServiceAccountPassword(lpszclustername.param().abi(), lpsznewpassword.param().abi(), dwflags, lpreturnstatusbuffer.unwrap_or(core::mem::zeroed()) as _, lpcbreturnstatusbuffersize as _) } } #[inline] pub unsafe fn SetGroupDependencyExpression(hgroup: HGROUP, lpszdependencyexpression: P1) -> u32 @@ -5983,7 +5983,7 @@ windows_core::imp::define_interface!(IGetClusterDataInfo, IGetClusterDataInfo_Vt windows_core::imp::interface_hierarchy!(IGetClusterDataInfo, windows_core::IUnknown); impl IGetClusterDataInfo { pub unsafe fn GetClusterName(&self, lpszname: &windows_core::BSTR, pcchname: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClusterName)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(lpszname), core::mem::transmute(pcchname)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClusterName)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(lpszname), pcchname as _).ok() } } pub unsafe fn GetClusterHandle(&self) -> HCLUSTER { unsafe { (windows_core::Interface::vtable(self).GetClusterHandle)(windows_core::Interface::as_raw(self)) } @@ -6160,7 +6160,7 @@ windows_core::imp::define_interface!(IGetClusterObjectInfo, IGetClusterObjectInf windows_core::imp::interface_hierarchy!(IGetClusterObjectInfo, windows_core::IUnknown); impl IGetClusterObjectInfo { pub unsafe fn GetObjectName(&self, lobjindex: i32, lpszname: &windows_core::BSTR, pcchname: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetObjectName)(windows_core::Interface::as_raw(self), lobjindex, core::mem::transmute_copy(lpszname), core::mem::transmute(pcchname)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetObjectName)(windows_core::Interface::as_raw(self), lobjindex, core::mem::transmute_copy(lpszname), pcchname as _).ok() } } pub unsafe fn GetObjectType(&self, lobjindex: i32) -> CLUADMEX_OBJECT_TYPE { unsafe { (windows_core::Interface::vtable(self).GetObjectType)(windows_core::Interface::as_raw(self), lobjindex) } @@ -6208,10 +6208,10 @@ impl IGetClusterResourceInfo { unsafe { (windows_core::Interface::vtable(self).GetResourceHandle)(windows_core::Interface::as_raw(self), lobjindex) } } pub unsafe fn GetResourceTypeName(&self, lobjindex: i32, lpszrestypename: &windows_core::BSTR, pcchrestypename: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetResourceTypeName)(windows_core::Interface::as_raw(self), lobjindex, core::mem::transmute_copy(lpszrestypename), core::mem::transmute(pcchrestypename)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetResourceTypeName)(windows_core::Interface::as_raw(self), lobjindex, core::mem::transmute_copy(lpszrestypename), pcchrestypename as _).ok() } } pub unsafe fn GetResourceNetworkName(&self, lobjindex: i32, lpsznetname: &windows_core::BSTR, pcchnetname: *mut u32) -> super::super::Foundation::BOOL { - unsafe { (windows_core::Interface::vtable(self).GetResourceNetworkName)(windows_core::Interface::as_raw(self), lobjindex, core::mem::transmute_copy(lpsznetname), core::mem::transmute(pcchnetname)) } + unsafe { (windows_core::Interface::vtable(self).GetResourceNetworkName)(windows_core::Interface::as_raw(self), lobjindex, core::mem::transmute_copy(lpsznetname), pcchnetname as _) } } } #[repr(C)] @@ -6262,7 +6262,7 @@ windows_core::imp::define_interface!(IGetClusterUIInfo, IGetClusterUIInfo_Vtbl, windows_core::imp::interface_hierarchy!(IGetClusterUIInfo, windows_core::IUnknown); impl IGetClusterUIInfo { pub unsafe fn GetClusterName(&self, lpszname: &windows_core::BSTR, pcchname: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClusterName)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(lpszname), core::mem::transmute(pcchname)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClusterName)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(lpszname), pcchname as _).ok() } } pub unsafe fn GetLocale(&self) -> u32 { unsafe { (windows_core::Interface::vtable(self).GetLocale)(windows_core::Interface::as_raw(self)) } 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 42e850c9ed..e52ff4af71 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/HttpServer/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/HttpServer/mod.rs @@ -5,7 +5,7 @@ where P1: windows_core::Param, { windows_targets::link!("httpapi.dll" "system" fn HttpAddFragmentToCache(requestqueuehandle : super::super::Foundation:: HANDLE, urlprefix : windows_core::PCWSTR, datachunk : *const HTTP_DATA_CHUNK, cachepolicy : *const HTTP_CACHE_POLICY, overlapped : *mut super::super::System::IO:: OVERLAPPED) -> u32); - unsafe { HttpAddFragmentToCache(requestqueuehandle, urlprefix.param().abi(), datachunk, cachepolicy, core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } + unsafe { HttpAddFragmentToCache(requestqueuehandle, urlprefix.param().abi(), datachunk, cachepolicy, overlapped.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn HttpAddUrl(requestqueuehandle: super::super::Foundation::HANDLE, fullyqualifiedurl: P1, reserved: Option<*const core::ffi::c_void>) -> u32 @@ -13,7 +13,7 @@ where P1: windows_core::Param, { windows_targets::link!("httpapi.dll" "system" fn HttpAddUrl(requestqueuehandle : super::super::Foundation:: HANDLE, fullyqualifiedurl : windows_core::PCWSTR, reserved : *const core::ffi::c_void) -> u32); - unsafe { HttpAddUrl(requestqueuehandle, fullyqualifiedurl.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } + unsafe { HttpAddUrl(requestqueuehandle, fullyqualifiedurl.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn HttpAddUrlToUrlGroup(urlgroupid: u64, pfullyqualifiedurl: P1, urlcontext: u64, reserved: Option) -> u32 @@ -21,13 +21,13 @@ where P1: windows_core::Param, { windows_targets::link!("httpapi.dll" "system" fn HttpAddUrlToUrlGroup(urlgroupid : u64, pfullyqualifiedurl : windows_core::PCWSTR, urlcontext : u64, reserved : u32) -> u32); - unsafe { HttpAddUrlToUrlGroup(urlgroupid, pfullyqualifiedurl.param().abi(), urlcontext, core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } + unsafe { HttpAddUrlToUrlGroup(urlgroupid, pfullyqualifiedurl.param().abi(), urlcontext, reserved.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { HttpCancelHttpRequest(requestqueuehandle, requestid, core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } + unsafe { HttpCancelHttpRequest(requestqueuehandle, requestid, overlapped.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn HttpCloseRequestQueue(requestqueuehandle: super::super::Foundation::HANDLE) -> u32 { @@ -47,7 +47,7 @@ pub unsafe fn HttpCloseUrlGroup(urlgroupid: u64) -> u32 { #[inline] 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); - unsafe { HttpCreateHttpHandle(core::mem::transmute(requestqueuehandle), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } + unsafe { HttpCreateHttpHandle(requestqueuehandle as _, reserved.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -56,17 +56,17 @@ 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); - unsafe { 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)) } + unsafe { HttpCreateRequestQueue(core::mem::transmute(version), name.param().abi(), securityattributes.unwrap_or(core::mem::zeroed()) as _, flags.unwrap_or(core::mem::zeroed()) as _, requestqueuehandle as _) } } #[inline] 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); - unsafe { HttpCreateServerSession(core::mem::transmute(version), core::mem::transmute(serversessionid), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } + unsafe { HttpCreateServerSession(core::mem::transmute(version), serversessionid as _, reserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { HttpCreateUrlGroup(serversessionid, core::mem::transmute(purlgroupid), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } + unsafe { HttpCreateUrlGroup(serversessionid, purlgroupid as _, reserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -75,7 +75,7 @@ where 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); - unsafe { HttpDeclarePush(requestqueuehandle, requestid, verb, path.param().abi(), query.param().abi(), core::mem::transmute(headers.unwrap_or(core::mem::zeroed()))) } + unsafe { HttpDeclarePush(requestqueuehandle, requestid, verb, path.param().abi(), query.param().abi(), headers.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 { @@ -86,7 +86,7 @@ pub unsafe fn HttpDelegateRequestEx(requestqueuehandle: super::super::Foundation #[inline] 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); - unsafe { HttpDeleteServiceConfiguration(core::mem::transmute(servicehandle.unwrap_or(core::mem::zeroed())), configid, pconfiginformation, configinformationlength, core::mem::transmute(poverlapped.unwrap_or(core::mem::zeroed()))) } + unsafe { HttpDeleteServiceConfiguration(servicehandle.unwrap_or(core::mem::zeroed()) as _, configid, pconfiginformation, configinformationlength, poverlapped.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn HttpFindUrlGroupId(fullyqualifiedurl: P0, requestqueuehandle: super::super::Foundation::HANDLE, urlgroupid: *mut u64) -> u32 @@ -94,7 +94,7 @@ where P0: windows_core::Param, { windows_targets::link!("httpapi.dll" "system" fn HttpFindUrlGroupId(fullyqualifiedurl : windows_core::PCWSTR, requestqueuehandle : super::super::Foundation:: HANDLE, urlgroupid : *mut u64) -> u32); - unsafe { HttpFindUrlGroupId(fullyqualifiedurl.param().abi(), requestqueuehandle, core::mem::transmute(urlgroupid)) } + unsafe { HttpFindUrlGroupId(fullyqualifiedurl.param().abi(), requestqueuehandle, urlgroupid as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -103,17 +103,17 @@ where P1: windows_core::Param, { windows_targets::link!("httpapi.dll" "system" fn HttpFlushResponseCache(requestqueuehandle : super::super::Foundation:: HANDLE, urlprefix : windows_core::PCWSTR, flags : u32, overlapped : *mut super::super::System::IO:: OVERLAPPED) -> u32); - unsafe { HttpFlushResponseCache(requestqueuehandle, urlprefix.param().abi(), flags, core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } + unsafe { HttpFlushResponseCache(requestqueuehandle, urlprefix.param().abi(), flags, overlapped.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn HttpGetExtension(version: HTTPAPI_VERSION, extension: u32, buffer: *mut core::ffi::c_void, buffersize: u32) -> u32 { windows_targets::link!("httpapi.dll" "system" fn HttpGetExtension(version : HTTPAPI_VERSION, extension : u32, buffer : *mut core::ffi::c_void, buffersize : u32) -> u32); - unsafe { HttpGetExtension(core::mem::transmute(version), extension, core::mem::transmute(buffer), buffersize) } + unsafe { HttpGetExtension(core::mem::transmute(version), extension, buffer as _, buffersize) } } #[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); - unsafe { HttpInitialize(core::mem::transmute(version), flags, core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } + unsafe { HttpInitialize(core::mem::transmute(version), flags, preserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn HttpIsFeatureSupported(featureid: HTTP_FEATURE_ID) -> super::super::Foundation::BOOL { @@ -126,28 +126,28 @@ 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); - unsafe { 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)) } + unsafe { HttpPrepareUrl(reserved.unwrap_or(core::mem::zeroed()) as _, flags.unwrap_or(core::mem::zeroed()) as _, url.param().abi(), preparedurl as _) } } #[inline] 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); - unsafe { HttpQueryRequestQueueProperty(requestqueuehandle, property, core::mem::transmute(propertyinformation.unwrap_or(core::mem::zeroed())), 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()))) } + unsafe { HttpQueryRequestQueueProperty(requestqueuehandle, property, propertyinformation.unwrap_or(core::mem::zeroed()) as _, propertyinformationlength, reserved1.unwrap_or(core::mem::zeroed()) as _, returnlength.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { HttpQueryServerSessionProperty(serversessionid, property, core::mem::transmute(propertyinformation.unwrap_or(core::mem::zeroed())), propertyinformationlength, core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } + unsafe { HttpQueryServerSessionProperty(serversessionid, property, propertyinformation.unwrap_or(core::mem::zeroed()) as _, propertyinformationlength, returnlength.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { HttpQueryServiceConfiguration(core::mem::transmute(servicehandle.unwrap_or(core::mem::zeroed())), configid, core::mem::transmute(pinput.unwrap_or(core::mem::zeroed())), inputlength, core::mem::transmute(poutput.unwrap_or(core::mem::zeroed())), outputlength, core::mem::transmute(preturnlength.unwrap_or(core::mem::zeroed())), core::mem::transmute(poverlapped.unwrap_or(core::mem::zeroed()))) } + unsafe { HttpQueryServiceConfiguration(servicehandle.unwrap_or(core::mem::zeroed()) as _, configid, pinput.unwrap_or(core::mem::zeroed()) as _, inputlength, poutput.unwrap_or(core::mem::zeroed()) as _, outputlength, preturnlength.unwrap_or(core::mem::zeroed()) as _, poverlapped.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { HttpQueryUrlGroupProperty(urlgroupid, property, core::mem::transmute(propertyinformation.unwrap_or(core::mem::zeroed())), propertyinformationlength, core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } + unsafe { HttpQueryUrlGroupProperty(urlgroupid, property, propertyinformation.unwrap_or(core::mem::zeroed()) as _, propertyinformationlength, returnlength.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -156,25 +156,25 @@ where P1: windows_core::Param, { windows_targets::link!("httpapi.dll" "system" fn HttpReadFragmentFromCache(requestqueuehandle : super::super::Foundation:: HANDLE, urlprefix : windows_core::PCWSTR, byterange : *const HTTP_BYTE_RANGE, buffer : *mut core::ffi::c_void, bufferlength : u32, bytesread : *mut u32, overlapped : *mut super::super::System::IO:: OVERLAPPED) -> u32); - unsafe { HttpReadFragmentFromCache(requestqueuehandle, urlprefix.param().abi(), core::mem::transmute(byterange.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer), bufferlength, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed())), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } + unsafe { HttpReadFragmentFromCache(requestqueuehandle, urlprefix.param().abi(), byterange.unwrap_or(core::mem::zeroed()) as _, buffer as _, bufferlength, bytesread.unwrap_or(core::mem::zeroed()) as _, overlapped.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { HttpReceiveClientCertificate(requestqueuehandle, connectionid, flags, core::mem::transmute(sslclientcertinfo), sslclientcertinfosize, core::mem::transmute(bytesreceived.unwrap_or(core::mem::zeroed())), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } + unsafe { HttpReceiveClientCertificate(requestqueuehandle, connectionid, flags, sslclientcertinfo as _, sslclientcertinfosize, bytesreceived.unwrap_or(core::mem::zeroed()) as _, overlapped.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Win32_Networking_WinSock", feature = "Win32_System_IO"))] #[inline] 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); - unsafe { HttpReceiveHttpRequest(requestqueuehandle, requestid, flags, core::mem::transmute(requestbuffer), requestbufferlength, core::mem::transmute(bytesreturned.unwrap_or(core::mem::zeroed())), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } + unsafe { HttpReceiveHttpRequest(requestqueuehandle, requestid, flags, requestbuffer as _, requestbufferlength, bytesreturned.unwrap_or(core::mem::zeroed()) as _, overlapped.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { HttpReceiveRequestEntityBody(requestqueuehandle, requestid, flags, core::mem::transmute(entitybuffer), entitybufferlength, core::mem::transmute(bytesreturned.unwrap_or(core::mem::zeroed())), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } + unsafe { HttpReceiveRequestEntityBody(requestqueuehandle, requestid, flags, entitybuffer as _, entitybufferlength, bytesreturned.unwrap_or(core::mem::zeroed()) as _, overlapped.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn HttpRemoveUrl(requestqueuehandle: super::super::Foundation::HANDLE, fullyqualifiedurl: P1) -> u32 @@ -196,37 +196,24 @@ where #[inline] 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); - unsafe { HttpSendHttpResponse(requestqueuehandle, requestid, flags, httpresponse, 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()))) } + unsafe { HttpSendHttpResponse(requestqueuehandle, requestid, flags, httpresponse, cachepolicy.unwrap_or(core::mem::zeroed()) as _, bytessent.unwrap_or(core::mem::zeroed()) as _, reserved1.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _, overlapped.unwrap_or(core::mem::zeroed()) as _, logdata.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { - HttpSendResponseEntityBody( - requestqueuehandle, - requestid, - 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::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())), - ) - } + unsafe { HttpSendResponseEntityBody(requestqueuehandle, requestid, 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())), bytessent.unwrap_or(core::mem::zeroed()) as _, reserved1.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _, overlapped.unwrap_or(core::mem::zeroed()) as _, logdata.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { HttpSetRequestProperty(requestqueuehandle, id, propertyid, core::mem::transmute(input.unwrap_or(core::mem::zeroed())), inputpropertysize, overlapped) } + unsafe { HttpSetRequestProperty(requestqueuehandle, id, propertyid, input.unwrap_or(core::mem::zeroed()) as _, inputpropertysize, overlapped) } } #[inline] 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); - unsafe { HttpSetRequestQueueProperty(requestqueuehandle, property, propertyinformation, propertyinformationlength, core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))) } + unsafe { HttpSetRequestQueueProperty(requestqueuehandle, property, propertyinformation, propertyinformationlength, reserved1.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn HttpSetServerSessionProperty(serversessionid: u64, property: HTTP_SERVER_PROPERTY, propertyinformation: *const core::ffi::c_void, propertyinformationlength: u32) -> u32 { @@ -237,7 +224,7 @@ pub unsafe fn HttpSetServerSessionProperty(serversessionid: u64, property: HTTP_ #[inline] 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); - unsafe { HttpSetServiceConfiguration(core::mem::transmute(servicehandle.unwrap_or(core::mem::zeroed())), configid, pconfiginformation, configinformationlength, core::mem::transmute(poverlapped.unwrap_or(core::mem::zeroed()))) } + unsafe { HttpSetServiceConfiguration(servicehandle.unwrap_or(core::mem::zeroed()) as _, configid, pconfiginformation, configinformationlength, poverlapped.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn HttpSetUrlGroupProperty(urlgroupid: u64, property: HTTP_SERVER_PROPERTY, propertyinformation: *const core::ffi::c_void, propertyinformationlength: u32) -> u32 { @@ -252,31 +239,31 @@ pub unsafe fn HttpShutdownRequestQueue(requestqueuehandle: super::super::Foundat #[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); - unsafe { HttpTerminate(flags, core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } + unsafe { HttpTerminate(flags, preserved.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { HttpUpdateServiceConfiguration(core::mem::transmute(handle.unwrap_or(core::mem::zeroed())), configid, configinfo, configinfolength, core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } + unsafe { HttpUpdateServiceConfiguration(handle.unwrap_or(core::mem::zeroed()) as _, configid, configinfo, configinfolength, overlapped.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { HttpWaitForDemandStart(requestqueuehandle, core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } + unsafe { HttpWaitForDemandStart(requestqueuehandle, overlapped.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { HttpWaitForDisconnect(requestqueuehandle, connectionid, core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } + unsafe { HttpWaitForDisconnect(requestqueuehandle, connectionid, overlapped.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { HttpWaitForDisconnectEx(requestqueuehandle, connectionid, core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } + unsafe { HttpWaitForDisconnectEx(requestqueuehandle, connectionid, reserved.unwrap_or(core::mem::zeroed()) as _, overlapped.unwrap_or(core::mem::zeroed()) as _) } } 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 728a83b2d7..893b13f5df 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/Ldap/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/Ldap/mod.rs @@ -26,37 +26,37 @@ pub unsafe fn ber_alloc_t(options: i32) -> *mut BerElement { #[inline] pub unsafe fn ber_bvdup(pberval: *mut LDAP_BERVAL) -> *mut LDAP_BERVAL { windows_targets::link!("wldap32.dll" "cdecl" fn ber_bvdup(pberval : *mut LDAP_BERVAL) -> *mut LDAP_BERVAL); - unsafe { ber_bvdup(core::mem::transmute(pberval)) } + unsafe { ber_bvdup(pberval as _) } } #[inline] pub unsafe fn ber_bvecfree(pberval: *mut *mut LDAP_BERVAL) { windows_targets::link!("wldap32.dll" "cdecl" fn ber_bvecfree(pberval : *mut *mut LDAP_BERVAL)); - unsafe { ber_bvecfree(core::mem::transmute(pberval)) } + unsafe { ber_bvecfree(pberval as _) } } #[inline] pub unsafe fn ber_bvfree(bv: *mut LDAP_BERVAL) { windows_targets::link!("wldap32.dll" "cdecl" fn ber_bvfree(bv : *mut LDAP_BERVAL)); - unsafe { ber_bvfree(core::mem::transmute(bv)) } + unsafe { ber_bvfree(bv as _) } } #[inline] pub unsafe fn ber_first_element(pberelement: *mut BerElement, plen: *mut u32, ppopaque: *mut *mut i8) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ber_first_element(pberelement : *mut BerElement, plen : *mut u32, ppopaque : *mut *mut i8) -> u32); - unsafe { ber_first_element(core::mem::transmute(pberelement), core::mem::transmute(plen), core::mem::transmute(ppopaque)) } + unsafe { ber_first_element(pberelement as _, plen as _, ppopaque as _) } } #[inline] pub unsafe fn ber_flatten(pberelement: *mut BerElement, pberval: *mut *mut LDAP_BERVAL) -> i32 { windows_targets::link!("wldap32.dll" "cdecl" fn ber_flatten(pberelement : *mut BerElement, pberval : *mut *mut LDAP_BERVAL) -> i32); - unsafe { ber_flatten(core::mem::transmute(pberelement), core::mem::transmute(pberval)) } + unsafe { ber_flatten(pberelement as _, pberval as _) } } #[inline] pub unsafe fn ber_free(pberelement: *mut BerElement, fbuf: i32) { windows_targets::link!("wldap32.dll" "cdecl" fn ber_free(pberelement : *mut BerElement, fbuf : i32)); - unsafe { ber_free(core::mem::transmute(pberelement), fbuf) } + unsafe { ber_free(pberelement as _, fbuf) } } #[inline] pub unsafe fn ber_init(pberval: *mut LDAP_BERVAL) -> *mut BerElement { windows_targets::link!("wldap32.dll" "cdecl" fn ber_init(pberval : *mut LDAP_BERVAL) -> *mut BerElement); - unsafe { ber_init(core::mem::transmute(pberval)) } + unsafe { ber_init(pberval as _) } } #[inline] pub unsafe fn ber_next_element(pberelement: *mut BerElement, plen: *mut u32, opaque: P2) -> u32 @@ -64,12 +64,12 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ber_next_element(pberelement : *mut BerElement, plen : *mut u32, opaque : windows_core::PCSTR) -> u32); - unsafe { ber_next_element(core::mem::transmute(pberelement), core::mem::transmute(plen), opaque.param().abi()) } + unsafe { ber_next_element(pberelement as _, plen as _, opaque.param().abi()) } } #[inline] pub unsafe fn ber_peek_tag(pberelement: *mut BerElement, plen: *mut u32) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ber_peek_tag(pberelement : *mut BerElement, plen : *mut u32) -> u32); - unsafe { ber_peek_tag(core::mem::transmute(pberelement), core::mem::transmute(plen)) } + unsafe { ber_peek_tag(pberelement as _, plen as _) } } #[inline] pub unsafe fn ber_printf(pberelement: *mut BerElement, fmt: P1) -> i32 @@ -77,7 +77,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ber_printf(pberelement : *mut BerElement, fmt : windows_core::PCSTR) -> i32); - unsafe { ber_printf(core::mem::transmute(pberelement), fmt.param().abi()) } + unsafe { ber_printf(pberelement as _, fmt.param().abi()) } } #[inline] pub unsafe fn ber_scanf(pberelement: *mut BerElement, fmt: P1) -> u32 @@ -85,12 +85,12 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ber_scanf(pberelement : *mut BerElement, fmt : windows_core::PCSTR) -> u32); - unsafe { ber_scanf(core::mem::transmute(pberelement), fmt.param().abi()) } + unsafe { ber_scanf(pberelement as _, fmt.param().abi()) } } #[inline] pub unsafe fn ber_skip_tag(pberelement: *mut BerElement, plen: *mut u32) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ber_skip_tag(pberelement : *mut BerElement, plen : *mut u32) -> u32); - unsafe { ber_skip_tag(core::mem::transmute(pberelement), core::mem::transmute(plen)) } + unsafe { ber_skip_tag(pberelement as _, plen as _) } } #[inline] pub unsafe fn cldap_open(hostname: P0, portnumber: u32) -> *mut LDAP @@ -119,7 +119,7 @@ where #[inline] pub unsafe fn ldap_abandon(ld: *mut LDAP, msgid: u32) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_abandon(ld : *mut LDAP, msgid : u32) -> u32); - unsafe { ldap_abandon(core::mem::transmute(ld), msgid) } + unsafe { ldap_abandon(ld as _, msgid) } } #[inline] pub unsafe fn ldap_add(ld: *mut LDAP, dn: P1, attrs: *mut *mut LDAPModA) -> u32 @@ -127,7 +127,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_add(ld : *mut LDAP, dn : windows_core::PCSTR, attrs : *mut *mut LDAPModA) -> u32); - unsafe { ldap_add(core::mem::transmute(ld), dn.param().abi(), core::mem::transmute(attrs)) } + unsafe { ldap_add(ld as _, dn.param().abi(), attrs as _) } } #[inline] pub unsafe fn ldap_addA(ld: *mut LDAP, dn: P1, attrs: *mut *mut LDAPModA) -> u32 @@ -135,7 +135,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_addA(ld : *mut LDAP, dn : windows_core::PCSTR, attrs : *mut *mut LDAPModA) -> u32); - unsafe { ldap_addA(core::mem::transmute(ld), dn.param().abi(), core::mem::transmute(attrs)) } + unsafe { ldap_addA(ld as _, dn.param().abi(), attrs as _) } } #[inline] pub unsafe fn ldap_addW(ld: *mut LDAP, dn: P1, attrs: *mut *mut LDAPModW) -> u32 @@ -143,7 +143,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_addW(ld : *mut LDAP, dn : windows_core::PCWSTR, attrs : *mut *mut LDAPModW) -> u32); - unsafe { ldap_addW(core::mem::transmute(ld), dn.param().abi(), core::mem::transmute(attrs)) } + unsafe { ldap_addW(ld as _, dn.param().abi(), attrs as _) } } #[inline] pub unsafe fn ldap_add_ext(ld: *mut LDAP, dn: P1, attrs: *mut *mut LDAPModA, servercontrols: *mut *mut LDAPControlA, clientcontrols: *mut *mut LDAPControlA, messagenumber: *mut u32) -> u32 @@ -151,7 +151,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_add_ext(ld : *mut LDAP, dn : windows_core::PCSTR, attrs : *mut *mut LDAPModA, servercontrols : *mut *mut LDAPControlA, clientcontrols : *mut *mut LDAPControlA, messagenumber : *mut u32) -> u32); - unsafe { ldap_add_ext(core::mem::transmute(ld), dn.param().abi(), core::mem::transmute(attrs), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols), core::mem::transmute(messagenumber)) } + unsafe { ldap_add_ext(ld as _, dn.param().abi(), attrs as _, servercontrols as _, clientcontrols as _, messagenumber as _) } } #[inline] pub unsafe fn ldap_add_extA(ld: *mut LDAP, dn: P1, attrs: *mut *mut LDAPModA, servercontrols: *mut *mut LDAPControlA, clientcontrols: *mut *mut LDAPControlA, messagenumber: *mut u32) -> u32 @@ -159,7 +159,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_add_extA(ld : *mut LDAP, dn : windows_core::PCSTR, attrs : *mut *mut LDAPModA, servercontrols : *mut *mut LDAPControlA, clientcontrols : *mut *mut LDAPControlA, messagenumber : *mut u32) -> u32); - unsafe { ldap_add_extA(core::mem::transmute(ld), dn.param().abi(), core::mem::transmute(attrs), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols), core::mem::transmute(messagenumber)) } + unsafe { ldap_add_extA(ld as _, dn.param().abi(), attrs as _, servercontrols as _, clientcontrols as _, messagenumber as _) } } #[inline] pub unsafe fn ldap_add_extW(ld: *mut LDAP, dn: P1, attrs: *mut *mut LDAPModW, servercontrols: *mut *mut LDAPControlW, clientcontrols: *mut *mut LDAPControlW, messagenumber: *mut u32) -> u32 @@ -167,7 +167,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_add_extW(ld : *mut LDAP, dn : windows_core::PCWSTR, attrs : *mut *mut LDAPModW, servercontrols : *mut *mut LDAPControlW, clientcontrols : *mut *mut LDAPControlW, messagenumber : *mut u32) -> u32); - unsafe { ldap_add_extW(core::mem::transmute(ld), dn.param().abi(), core::mem::transmute(attrs), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols), core::mem::transmute(messagenumber)) } + unsafe { ldap_add_extW(ld as _, dn.param().abi(), attrs as _, servercontrols as _, clientcontrols as _, messagenumber as _) } } #[inline] pub unsafe fn ldap_add_ext_s(ld: *mut LDAP, dn: P1, attrs: *mut *mut LDAPModA, servercontrols: *mut *mut LDAPControlA, clientcontrols: *mut *mut LDAPControlA) -> u32 @@ -175,7 +175,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_add_ext_s(ld : *mut LDAP, dn : windows_core::PCSTR, attrs : *mut *mut LDAPModA, servercontrols : *mut *mut LDAPControlA, clientcontrols : *mut *mut LDAPControlA) -> u32); - unsafe { ldap_add_ext_s(core::mem::transmute(ld), dn.param().abi(), core::mem::transmute(attrs), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols)) } + unsafe { ldap_add_ext_s(ld as _, dn.param().abi(), attrs as _, servercontrols as _, clientcontrols as _) } } #[inline] pub unsafe fn ldap_add_ext_sA(ld: *mut LDAP, dn: P1, attrs: *mut *mut LDAPModA, servercontrols: *mut *mut LDAPControlA, clientcontrols: *mut *mut LDAPControlA) -> u32 @@ -183,7 +183,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_add_ext_sA(ld : *mut LDAP, dn : windows_core::PCSTR, attrs : *mut *mut LDAPModA, servercontrols : *mut *mut LDAPControlA, clientcontrols : *mut *mut LDAPControlA) -> u32); - unsafe { ldap_add_ext_sA(core::mem::transmute(ld), dn.param().abi(), core::mem::transmute(attrs), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols)) } + unsafe { ldap_add_ext_sA(ld as _, dn.param().abi(), attrs as _, servercontrols as _, clientcontrols as _) } } #[inline] pub unsafe fn ldap_add_ext_sW(ld: *mut LDAP, dn: P1, attrs: *mut *mut LDAPModW, servercontrols: *mut *mut LDAPControlW, clientcontrols: *mut *mut LDAPControlW) -> u32 @@ -191,7 +191,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_add_ext_sW(ld : *mut LDAP, dn : windows_core::PCWSTR, attrs : *mut *mut LDAPModW, servercontrols : *mut *mut LDAPControlW, clientcontrols : *mut *mut LDAPControlW) -> u32); - unsafe { ldap_add_ext_sW(core::mem::transmute(ld), dn.param().abi(), core::mem::transmute(attrs), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols)) } + unsafe { ldap_add_ext_sW(ld as _, dn.param().abi(), attrs as _, servercontrols as _, clientcontrols as _) } } #[inline] pub unsafe fn ldap_add_s(ld: *mut LDAP, dn: P1, attrs: *mut *mut LDAPModA) -> u32 @@ -199,7 +199,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_add_s(ld : *mut LDAP, dn : windows_core::PCSTR, attrs : *mut *mut LDAPModA) -> u32); - unsafe { ldap_add_s(core::mem::transmute(ld), dn.param().abi(), core::mem::transmute(attrs)) } + unsafe { ldap_add_s(ld as _, dn.param().abi(), attrs as _) } } #[inline] pub unsafe fn ldap_add_sA(ld: *mut LDAP, dn: P1, attrs: *mut *mut LDAPModA) -> u32 @@ -207,7 +207,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_add_sA(ld : *mut LDAP, dn : windows_core::PCSTR, attrs : *mut *mut LDAPModA) -> u32); - unsafe { ldap_add_sA(core::mem::transmute(ld), dn.param().abi(), core::mem::transmute(attrs)) } + unsafe { ldap_add_sA(ld as _, dn.param().abi(), attrs as _) } } #[inline] pub unsafe fn ldap_add_sW(ld: *mut LDAP, dn: P1, attrs: *mut *mut LDAPModW) -> u32 @@ -215,7 +215,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_add_sW(ld : *mut LDAP, dn : windows_core::PCWSTR, attrs : *mut *mut LDAPModW) -> u32); - unsafe { ldap_add_sW(core::mem::transmute(ld), dn.param().abi(), core::mem::transmute(attrs)) } + unsafe { ldap_add_sW(ld as _, dn.param().abi(), attrs as _) } } #[inline] pub unsafe fn ldap_bind(ld: *mut LDAP, dn: P1, cred: P2, method: u32) -> u32 @@ -224,7 +224,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_bind(ld : *mut LDAP, dn : windows_core::PCSTR, cred : windows_core::PCSTR, method : u32) -> u32); - unsafe { ldap_bind(core::mem::transmute(ld), dn.param().abi(), cred.param().abi(), method) } + unsafe { ldap_bind(ld as _, dn.param().abi(), cred.param().abi(), method) } } #[inline] pub unsafe fn ldap_bindA(ld: *mut LDAP, dn: P1, cred: P2, method: u32) -> u32 @@ -233,7 +233,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_bindA(ld : *mut LDAP, dn : windows_core::PCSTR, cred : windows_core::PCSTR, method : u32) -> u32); - unsafe { ldap_bindA(core::mem::transmute(ld), dn.param().abi(), cred.param().abi(), method) } + unsafe { ldap_bindA(ld as _, dn.param().abi(), cred.param().abi(), method) } } #[inline] pub unsafe fn ldap_bindW(ld: *mut LDAP, dn: P1, cred: P2, method: u32) -> u32 @@ -242,7 +242,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_bindW(ld : *mut LDAP, dn : windows_core::PCWSTR, cred : windows_core::PCWSTR, method : u32) -> u32); - unsafe { ldap_bindW(core::mem::transmute(ld), dn.param().abi(), cred.param().abi(), method) } + unsafe { ldap_bindW(ld as _, dn.param().abi(), cred.param().abi(), method) } } #[inline] pub unsafe fn ldap_bind_s(ld: *mut LDAP, dn: P1, cred: P2, method: u32) -> u32 @@ -251,7 +251,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_bind_s(ld : *mut LDAP, dn : windows_core::PCSTR, cred : windows_core::PCSTR, method : u32) -> u32); - unsafe { ldap_bind_s(core::mem::transmute(ld), dn.param().abi(), cred.param().abi(), method) } + unsafe { ldap_bind_s(ld as _, dn.param().abi(), cred.param().abi(), method) } } #[inline] pub unsafe fn ldap_bind_sA(ld: *mut LDAP, dn: P1, cred: P2, method: u32) -> u32 @@ -260,7 +260,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_bind_sA(ld : *mut LDAP, dn : windows_core::PCSTR, cred : windows_core::PCSTR, method : u32) -> u32); - unsafe { ldap_bind_sA(core::mem::transmute(ld), dn.param().abi(), cred.param().abi(), method) } + unsafe { ldap_bind_sA(ld as _, dn.param().abi(), cred.param().abi(), method) } } #[inline] pub unsafe fn ldap_bind_sW(ld: *mut LDAP, dn: P1, cred: P2, method: u32) -> u32 @@ -269,7 +269,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_bind_sW(ld : *mut LDAP, dn : windows_core::PCWSTR, cred : windows_core::PCWSTR, method : u32) -> u32); - unsafe { ldap_bind_sW(core::mem::transmute(ld), dn.param().abi(), cred.param().abi(), method) } + unsafe { ldap_bind_sW(ld as _, dn.param().abi(), cred.param().abi(), method) } } #[inline] pub unsafe fn ldap_check_filterA(ld: *mut LDAP, searchfilter: P1) -> u32 @@ -277,7 +277,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_check_filterA(ld : *mut LDAP, searchfilter : windows_core::PCSTR) -> u32); - unsafe { ldap_check_filterA(core::mem::transmute(ld), searchfilter.param().abi()) } + unsafe { ldap_check_filterA(ld as _, searchfilter.param().abi()) } } #[inline] pub unsafe fn ldap_check_filterW(ld: *mut LDAP, searchfilter: P1) -> u32 @@ -285,7 +285,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_check_filterW(ld : *mut LDAP, searchfilter : windows_core::PCWSTR) -> u32); - unsafe { ldap_check_filterW(core::mem::transmute(ld), searchfilter.param().abi()) } + unsafe { ldap_check_filterW(ld as _, searchfilter.param().abi()) } } #[inline] pub unsafe fn ldap_cleanup(hinstance: super::super::Foundation::HANDLE) -> u32 { @@ -295,7 +295,7 @@ pub unsafe fn ldap_cleanup(hinstance: super::super::Foundation::HANDLE) -> u32 { #[inline] pub unsafe fn ldap_close_extended_op(ld: *mut LDAP, messagenumber: u32) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_close_extended_op(ld : *mut LDAP, messagenumber : u32) -> u32); - unsafe { ldap_close_extended_op(core::mem::transmute(ld), messagenumber) } + unsafe { ldap_close_extended_op(ld as _, messagenumber) } } #[inline] pub unsafe fn ldap_compare(ld: *mut LDAP, dn: P1, attr: P2, value: P3) -> u32 @@ -305,7 +305,7 @@ where P3: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_compare(ld : *mut LDAP, dn : windows_core::PCSTR, attr : windows_core::PCSTR, value : windows_core::PCSTR) -> u32); - unsafe { ldap_compare(core::mem::transmute(ld), dn.param().abi(), attr.param().abi(), value.param().abi()) } + unsafe { ldap_compare(ld as _, dn.param().abi(), attr.param().abi(), value.param().abi()) } } #[inline] pub unsafe fn ldap_compareA(ld: *mut LDAP, dn: P1, attr: P2, value: P3) -> u32 @@ -315,7 +315,7 @@ where P3: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_compareA(ld : *mut LDAP, dn : windows_core::PCSTR, attr : windows_core::PCSTR, value : windows_core::PCSTR) -> u32); - unsafe { ldap_compareA(core::mem::transmute(ld), dn.param().abi(), attr.param().abi(), value.param().abi()) } + unsafe { ldap_compareA(ld as _, dn.param().abi(), attr.param().abi(), value.param().abi()) } } #[inline] pub unsafe fn ldap_compareW(ld: *mut LDAP, dn: P1, attr: P2, value: P3) -> u32 @@ -325,7 +325,7 @@ where P3: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_compareW(ld : *mut LDAP, dn : windows_core::PCWSTR, attr : windows_core::PCWSTR, value : windows_core::PCWSTR) -> u32); - unsafe { ldap_compareW(core::mem::transmute(ld), dn.param().abi(), attr.param().abi(), value.param().abi()) } + unsafe { ldap_compareW(ld as _, dn.param().abi(), attr.param().abi(), value.param().abi()) } } #[inline] pub unsafe fn ldap_compare_ext(ld: *mut LDAP, dn: P1, attr: P2, value: P3, data: *mut LDAP_BERVAL, servercontrols: *mut *mut LDAPControlA, clientcontrols: *mut *mut LDAPControlA, messagenumber: *mut u32) -> u32 @@ -335,7 +335,7 @@ where P3: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_compare_ext(ld : *mut LDAP, dn : windows_core::PCSTR, attr : windows_core::PCSTR, value : windows_core::PCSTR, data : *mut LDAP_BERVAL, servercontrols : *mut *mut LDAPControlA, clientcontrols : *mut *mut LDAPControlA, messagenumber : *mut u32) -> u32); - unsafe { ldap_compare_ext(core::mem::transmute(ld), dn.param().abi(), attr.param().abi(), value.param().abi(), core::mem::transmute(data), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols), core::mem::transmute(messagenumber)) } + unsafe { ldap_compare_ext(ld as _, dn.param().abi(), attr.param().abi(), value.param().abi(), data as _, servercontrols as _, clientcontrols as _, messagenumber as _) } } #[inline] pub unsafe fn ldap_compare_extA(ld: *mut LDAP, dn: P1, attr: P2, value: P3, data: Option<*const LDAP_BERVAL>, servercontrols: *mut *mut LDAPControlA, clientcontrols: *mut *mut LDAPControlA, messagenumber: *mut u32) -> u32 @@ -345,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); - unsafe { 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)) } + unsafe { ldap_compare_extA(ld as _, dn.param().abi(), attr.param().abi(), value.param().abi(), data.unwrap_or(core::mem::zeroed()) as _, servercontrols as _, clientcontrols as _, messagenumber as _) } } #[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 @@ -355,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); - unsafe { 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)) } + unsafe { ldap_compare_extW(ld as _, dn.param().abi(), attr.param().abi(), value.param().abi(), data.unwrap_or(core::mem::zeroed()) as _, servercontrols as _, clientcontrols as _, messagenumber as _) } } #[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 @@ -365,7 +365,7 @@ where P3: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_compare_ext_s(ld : *mut LDAP, dn : windows_core::PCSTR, attr : windows_core::PCSTR, value : windows_core::PCSTR, data : *mut LDAP_BERVAL, servercontrols : *mut *mut LDAPControlA, clientcontrols : *mut *mut LDAPControlA) -> u32); - unsafe { ldap_compare_ext_s(core::mem::transmute(ld), dn.param().abi(), attr.param().abi(), value.param().abi(), core::mem::transmute(data), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols)) } + unsafe { ldap_compare_ext_s(ld as _, dn.param().abi(), attr.param().abi(), value.param().abi(), data as _, servercontrols as _, clientcontrols as _) } } #[inline] pub unsafe fn ldap_compare_ext_sA(ld: *mut LDAP, dn: P1, attr: P2, value: P3, data: Option<*const LDAP_BERVAL>, servercontrols: *mut *mut LDAPControlA, clientcontrols: *mut *mut LDAPControlA) -> u32 @@ -375,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); - unsafe { 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)) } + unsafe { ldap_compare_ext_sA(ld as _, dn.param().abi(), attr.param().abi(), value.param().abi(), data.unwrap_or(core::mem::zeroed()) as _, servercontrols as _, clientcontrols as _) } } #[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 @@ -385,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); - unsafe { 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)) } + unsafe { ldap_compare_ext_sW(ld as _, dn.param().abi(), attr.param().abi(), value.param().abi(), data.unwrap_or(core::mem::zeroed()) as _, servercontrols as _, clientcontrols as _) } } #[inline] pub unsafe fn ldap_compare_s(ld: *mut LDAP, dn: P1, attr: P2, value: P3) -> u32 @@ -395,7 +395,7 @@ where P3: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_compare_s(ld : *mut LDAP, dn : windows_core::PCSTR, attr : windows_core::PCSTR, value : windows_core::PCSTR) -> u32); - unsafe { ldap_compare_s(core::mem::transmute(ld), dn.param().abi(), attr.param().abi(), value.param().abi()) } + unsafe { ldap_compare_s(ld as _, dn.param().abi(), attr.param().abi(), value.param().abi()) } } #[inline] pub unsafe fn ldap_compare_sA(ld: *mut LDAP, dn: P1, attr: P2, value: P3) -> u32 @@ -405,7 +405,7 @@ where P3: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_compare_sA(ld : *mut LDAP, dn : windows_core::PCSTR, attr : windows_core::PCSTR, value : windows_core::PCSTR) -> u32); - unsafe { ldap_compare_sA(core::mem::transmute(ld), dn.param().abi(), attr.param().abi(), value.param().abi()) } + unsafe { ldap_compare_sA(ld as _, dn.param().abi(), attr.param().abi(), value.param().abi()) } } #[inline] pub unsafe fn ldap_compare_sW(ld: *mut LDAP, dn: P1, attr: P2, value: P3) -> u32 @@ -415,117 +415,117 @@ where P3: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_compare_sW(ld : *mut LDAP, dn : windows_core::PCWSTR, attr : windows_core::PCWSTR, value : windows_core::PCWSTR) -> u32); - unsafe { ldap_compare_sW(core::mem::transmute(ld), dn.param().abi(), attr.param().abi(), value.param().abi()) } + unsafe { ldap_compare_sW(ld as _, dn.param().abi(), attr.param().abi(), value.param().abi()) } } #[inline] pub unsafe fn ldap_conn_from_msg(primaryconn: *mut LDAP, res: *mut LDAPMessage) -> *mut LDAP { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_conn_from_msg(primaryconn : *mut LDAP, res : *mut LDAPMessage) -> *mut LDAP); - unsafe { ldap_conn_from_msg(core::mem::transmute(primaryconn), core::mem::transmute(res)) } + unsafe { ldap_conn_from_msg(primaryconn as _, res as _) } } #[inline] pub unsafe fn ldap_connect(ld: *mut LDAP, timeout: *mut LDAP_TIMEVAL) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_connect(ld : *mut LDAP, timeout : *mut LDAP_TIMEVAL) -> u32); - unsafe { ldap_connect(core::mem::transmute(ld), core::mem::transmute(timeout)) } + unsafe { ldap_connect(ld as _, timeout as _) } } #[inline] pub unsafe fn ldap_control_free(control: *mut LDAPControlA) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_control_free(control : *mut LDAPControlA) -> u32); - unsafe { ldap_control_free(core::mem::transmute(control)) } + unsafe { ldap_control_free(control as _) } } #[inline] pub unsafe fn ldap_control_freeA(controls: *mut LDAPControlA) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_control_freeA(controls : *mut LDAPControlA) -> u32); - unsafe { ldap_control_freeA(core::mem::transmute(controls)) } + unsafe { ldap_control_freeA(controls as _) } } #[inline] pub unsafe fn ldap_control_freeW(control: *mut LDAPControlW) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_control_freeW(control : *mut LDAPControlW) -> u32); - unsafe { ldap_control_freeW(core::mem::transmute(control)) } + unsafe { ldap_control_freeW(control as _) } } #[inline] pub unsafe fn ldap_controls_free(controls: *mut *mut LDAPControlA) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_controls_free(controls : *mut *mut LDAPControlA) -> u32); - unsafe { ldap_controls_free(core::mem::transmute(controls)) } + unsafe { ldap_controls_free(controls as _) } } #[inline] pub unsafe fn ldap_controls_freeA(controls: *mut *mut LDAPControlA) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_controls_freeA(controls : *mut *mut LDAPControlA) -> u32); - unsafe { ldap_controls_freeA(core::mem::transmute(controls)) } + unsafe { ldap_controls_freeA(controls as _) } } #[inline] pub unsafe fn ldap_controls_freeW(control: *mut *mut LDAPControlW) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_controls_freeW(control : *mut *mut LDAPControlW) -> u32); - unsafe { ldap_controls_freeW(core::mem::transmute(control)) } + unsafe { ldap_controls_freeW(control as _) } } #[inline] pub unsafe fn ldap_count_entries(ld: *mut LDAP, res: *mut LDAPMessage) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_count_entries(ld : *mut LDAP, res : *mut LDAPMessage) -> u32); - unsafe { ldap_count_entries(core::mem::transmute(ld), core::mem::transmute(res)) } + unsafe { ldap_count_entries(ld as _, res as _) } } #[inline] pub unsafe fn ldap_count_references(ld: *mut LDAP, res: *mut LDAPMessage) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_count_references(ld : *mut LDAP, res : *mut LDAPMessage) -> u32); - unsafe { ldap_count_references(core::mem::transmute(ld), core::mem::transmute(res)) } + unsafe { ldap_count_references(ld as _, res as _) } } #[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); - unsafe { ldap_count_values(core::mem::transmute(vals.unwrap_or(core::mem::zeroed()))) } + unsafe { ldap_count_values(vals.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { ldap_count_valuesA(core::mem::transmute(vals.unwrap_or(core::mem::zeroed()))) } + unsafe { ldap_count_valuesA(vals.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { ldap_count_valuesW(core::mem::transmute(vals.unwrap_or(core::mem::zeroed()))) } + unsafe { ldap_count_valuesW(vals.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ldap_count_values_len(vals: *mut *mut LDAP_BERVAL) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_count_values_len(vals : *mut *mut LDAP_BERVAL) -> u32); - unsafe { ldap_count_values_len(core::mem::transmute(vals)) } + unsafe { ldap_count_values_len(vals as _) } } #[inline] pub unsafe fn ldap_create_page_control(externalhandle: *mut LDAP, pagesize: u32, cookie: *mut LDAP_BERVAL, iscritical: u8, control: *mut *mut LDAPControlA) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_create_page_control(externalhandle : *mut LDAP, pagesize : u32, cookie : *mut LDAP_BERVAL, iscritical : u8, control : *mut *mut LDAPControlA) -> u32); - unsafe { ldap_create_page_control(core::mem::transmute(externalhandle), pagesize, core::mem::transmute(cookie), iscritical, core::mem::transmute(control)) } + unsafe { ldap_create_page_control(externalhandle as _, pagesize, cookie as _, iscritical, control as _) } } #[inline] pub unsafe fn ldap_create_page_controlA(externalhandle: *mut LDAP, pagesize: u32, cookie: *mut LDAP_BERVAL, iscritical: u8, control: *mut *mut LDAPControlA) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_create_page_controlA(externalhandle : *mut LDAP, pagesize : u32, cookie : *mut LDAP_BERVAL, iscritical : u8, control : *mut *mut LDAPControlA) -> u32); - unsafe { ldap_create_page_controlA(core::mem::transmute(externalhandle), pagesize, core::mem::transmute(cookie), iscritical, core::mem::transmute(control)) } + unsafe { ldap_create_page_controlA(externalhandle as _, pagesize, cookie as _, iscritical, control as _) } } #[inline] pub unsafe fn ldap_create_page_controlW(externalhandle: *mut LDAP, pagesize: u32, cookie: *mut LDAP_BERVAL, iscritical: u8, control: *mut *mut LDAPControlW) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_create_page_controlW(externalhandle : *mut LDAP, pagesize : u32, cookie : *mut LDAP_BERVAL, iscritical : u8, control : *mut *mut LDAPControlW) -> u32); - unsafe { ldap_create_page_controlW(core::mem::transmute(externalhandle), pagesize, core::mem::transmute(cookie), iscritical, core::mem::transmute(control)) } + unsafe { ldap_create_page_controlW(externalhandle as _, pagesize, cookie as _, iscritical, control as _) } } #[inline] pub unsafe fn ldap_create_sort_control(externalhandle: *mut LDAP, sortkeys: *mut *mut LDAPSortKeyA, iscritical: u8, control: *mut *mut LDAPControlA) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_create_sort_control(externalhandle : *mut LDAP, sortkeys : *mut *mut LDAPSortKeyA, iscritical : u8, control : *mut *mut LDAPControlA) -> u32); - unsafe { ldap_create_sort_control(core::mem::transmute(externalhandle), core::mem::transmute(sortkeys), iscritical, core::mem::transmute(control)) } + unsafe { ldap_create_sort_control(externalhandle as _, sortkeys as _, iscritical, control as _) } } #[inline] pub unsafe fn ldap_create_sort_controlA(externalhandle: *mut LDAP, sortkeys: *mut *mut LDAPSortKeyA, iscritical: u8, control: *mut *mut LDAPControlA) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_create_sort_controlA(externalhandle : *mut LDAP, sortkeys : *mut *mut LDAPSortKeyA, iscritical : u8, control : *mut *mut LDAPControlA) -> u32); - unsafe { ldap_create_sort_controlA(core::mem::transmute(externalhandle), core::mem::transmute(sortkeys), iscritical, core::mem::transmute(control)) } + unsafe { ldap_create_sort_controlA(externalhandle as _, sortkeys as _, iscritical, control as _) } } #[inline] pub unsafe fn ldap_create_sort_controlW(externalhandle: *mut LDAP, sortkeys: *mut *mut LDAPSortKeyW, iscritical: u8, control: *mut *mut LDAPControlW) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_create_sort_controlW(externalhandle : *mut LDAP, sortkeys : *mut *mut LDAPSortKeyW, iscritical : u8, control : *mut *mut LDAPControlW) -> u32); - unsafe { ldap_create_sort_controlW(core::mem::transmute(externalhandle), core::mem::transmute(sortkeys), iscritical, core::mem::transmute(control)) } + unsafe { ldap_create_sort_controlW(externalhandle as _, sortkeys as _, iscritical, control as _) } } #[inline] pub unsafe fn ldap_create_vlv_controlA(externalhandle: *mut LDAP, vlvinfo: *mut LDAPVLVInfo, iscritical: u8, control: *mut *mut LDAPControlA) -> i32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_create_vlv_controlA(externalhandle : *mut LDAP, vlvinfo : *mut LDAPVLVInfo, iscritical : u8, control : *mut *mut LDAPControlA) -> i32); - unsafe { ldap_create_vlv_controlA(core::mem::transmute(externalhandle), core::mem::transmute(vlvinfo), iscritical, core::mem::transmute(control)) } + unsafe { ldap_create_vlv_controlA(externalhandle as _, vlvinfo as _, iscritical, control as _) } } #[inline] pub unsafe fn ldap_create_vlv_controlW(externalhandle: *mut LDAP, vlvinfo: *mut LDAPVLVInfo, iscritical: u8, control: *mut *mut LDAPControlW) -> i32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_create_vlv_controlW(externalhandle : *mut LDAP, vlvinfo : *mut LDAPVLVInfo, iscritical : u8, control : *mut *mut LDAPControlW) -> i32); - unsafe { ldap_create_vlv_controlW(core::mem::transmute(externalhandle), core::mem::transmute(vlvinfo), iscritical, core::mem::transmute(control)) } + unsafe { ldap_create_vlv_controlW(externalhandle as _, vlvinfo as _, iscritical, control as _) } } #[inline] pub unsafe fn ldap_delete(ld: *mut LDAP, dn: P1) -> u32 @@ -533,7 +533,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_delete(ld : *mut LDAP, dn : windows_core::PCSTR) -> u32); - unsafe { ldap_delete(core::mem::transmute(ld), dn.param().abi()) } + unsafe { ldap_delete(ld as _, dn.param().abi()) } } #[inline] pub unsafe fn ldap_deleteA(ld: *mut LDAP, dn: P1) -> u32 @@ -541,7 +541,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_deleteA(ld : *mut LDAP, dn : windows_core::PCSTR) -> u32); - unsafe { ldap_deleteA(core::mem::transmute(ld), dn.param().abi()) } + unsafe { ldap_deleteA(ld as _, dn.param().abi()) } } #[inline] pub unsafe fn ldap_deleteW(ld: *mut LDAP, dn: P1) -> u32 @@ -549,7 +549,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_deleteW(ld : *mut LDAP, dn : windows_core::PCWSTR) -> u32); - unsafe { ldap_deleteW(core::mem::transmute(ld), dn.param().abi()) } + unsafe { ldap_deleteW(ld as _, dn.param().abi()) } } #[inline] pub unsafe fn ldap_delete_ext(ld: *mut LDAP, dn: P1, servercontrols: *mut *mut LDAPControlA, clientcontrols: *mut *mut LDAPControlA, messagenumber: *mut u32) -> u32 @@ -557,7 +557,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_delete_ext(ld : *mut LDAP, dn : windows_core::PCSTR, servercontrols : *mut *mut LDAPControlA, clientcontrols : *mut *mut LDAPControlA, messagenumber : *mut u32) -> u32); - unsafe { ldap_delete_ext(core::mem::transmute(ld), dn.param().abi(), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols), core::mem::transmute(messagenumber)) } + unsafe { ldap_delete_ext(ld as _, dn.param().abi(), servercontrols as _, clientcontrols as _, messagenumber as _) } } #[inline] pub unsafe fn ldap_delete_extA(ld: *mut LDAP, dn: P1, servercontrols: *mut *mut LDAPControlA, clientcontrols: *mut *mut LDAPControlA, messagenumber: *mut u32) -> u32 @@ -565,7 +565,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_delete_extA(ld : *mut LDAP, dn : windows_core::PCSTR, servercontrols : *mut *mut LDAPControlA, clientcontrols : *mut *mut LDAPControlA, messagenumber : *mut u32) -> u32); - unsafe { ldap_delete_extA(core::mem::transmute(ld), dn.param().abi(), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols), core::mem::transmute(messagenumber)) } + unsafe { ldap_delete_extA(ld as _, dn.param().abi(), servercontrols as _, clientcontrols as _, messagenumber as _) } } #[inline] pub unsafe fn ldap_delete_extW(ld: *mut LDAP, dn: P1, servercontrols: *mut *mut LDAPControlW, clientcontrols: *mut *mut LDAPControlW, messagenumber: *mut u32) -> u32 @@ -573,7 +573,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_delete_extW(ld : *mut LDAP, dn : windows_core::PCWSTR, servercontrols : *mut *mut LDAPControlW, clientcontrols : *mut *mut LDAPControlW, messagenumber : *mut u32) -> u32); - unsafe { ldap_delete_extW(core::mem::transmute(ld), dn.param().abi(), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols), core::mem::transmute(messagenumber)) } + unsafe { ldap_delete_extW(ld as _, dn.param().abi(), servercontrols as _, clientcontrols as _, messagenumber as _) } } #[inline] pub unsafe fn ldap_delete_ext_s(ld: *mut LDAP, dn: P1, servercontrols: *mut *mut LDAPControlA, clientcontrols: *mut *mut LDAPControlA) -> u32 @@ -581,7 +581,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_delete_ext_s(ld : *mut LDAP, dn : windows_core::PCSTR, servercontrols : *mut *mut LDAPControlA, clientcontrols : *mut *mut LDAPControlA) -> u32); - unsafe { ldap_delete_ext_s(core::mem::transmute(ld), dn.param().abi(), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols)) } + unsafe { ldap_delete_ext_s(ld as _, dn.param().abi(), servercontrols as _, clientcontrols as _) } } #[inline] pub unsafe fn ldap_delete_ext_sA(ld: *mut LDAP, dn: P1, servercontrols: *mut *mut LDAPControlA, clientcontrols: *mut *mut LDAPControlA) -> u32 @@ -589,7 +589,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_delete_ext_sA(ld : *mut LDAP, dn : windows_core::PCSTR, servercontrols : *mut *mut LDAPControlA, clientcontrols : *mut *mut LDAPControlA) -> u32); - unsafe { ldap_delete_ext_sA(core::mem::transmute(ld), dn.param().abi(), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols)) } + unsafe { ldap_delete_ext_sA(ld as _, dn.param().abi(), servercontrols as _, clientcontrols as _) } } #[inline] pub unsafe fn ldap_delete_ext_sW(ld: *mut LDAP, dn: P1, servercontrols: *mut *mut LDAPControlW, clientcontrols: *mut *mut LDAPControlW) -> u32 @@ -597,7 +597,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_delete_ext_sW(ld : *mut LDAP, dn : windows_core::PCWSTR, servercontrols : *mut *mut LDAPControlW, clientcontrols : *mut *mut LDAPControlW) -> u32); - unsafe { ldap_delete_ext_sW(core::mem::transmute(ld), dn.param().abi(), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols)) } + unsafe { ldap_delete_ext_sW(ld as _, dn.param().abi(), servercontrols as _, clientcontrols as _) } } #[inline] pub unsafe fn ldap_delete_s(ld: *mut LDAP, dn: P1) -> u32 @@ -605,7 +605,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_delete_s(ld : *mut LDAP, dn : windows_core::PCSTR) -> u32); - unsafe { ldap_delete_s(core::mem::transmute(ld), dn.param().abi()) } + unsafe { ldap_delete_s(ld as _, dn.param().abi()) } } #[inline] pub unsafe fn ldap_delete_sA(ld: *mut LDAP, dn: P1) -> u32 @@ -613,7 +613,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_delete_sA(ld : *mut LDAP, dn : windows_core::PCSTR) -> u32); - unsafe { ldap_delete_sA(core::mem::transmute(ld), dn.param().abi()) } + unsafe { ldap_delete_sA(ld as _, dn.param().abi()) } } #[inline] pub unsafe fn ldap_delete_sW(ld: *mut LDAP, dn: P1) -> u32 @@ -621,7 +621,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_delete_sW(ld : *mut LDAP, dn : windows_core::PCWSTR) -> u32); - unsafe { ldap_delete_sW(core::mem::transmute(ld), dn.param().abi()) } + unsafe { ldap_delete_sW(ld as _, dn.param().abi()) } } #[inline] pub unsafe fn ldap_dn2ufn(dn: P0) -> windows_core::PSTR @@ -650,12 +650,12 @@ where #[inline] pub unsafe fn ldap_encode_sort_controlA(externalhandle: *mut LDAP, sortkeys: *mut *mut LDAPSortKeyA, control: *mut LDAPControlA, criticality: bool) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_encode_sort_controlA(externalhandle : *mut LDAP, sortkeys : *mut *mut LDAPSortKeyA, control : *mut LDAPControlA, criticality : bool) -> u32); - unsafe { ldap_encode_sort_controlA(core::mem::transmute(externalhandle), core::mem::transmute(sortkeys), core::mem::transmute(control), criticality) } + unsafe { ldap_encode_sort_controlA(externalhandle as _, sortkeys as _, control as _, criticality) } } #[inline] pub unsafe fn ldap_encode_sort_controlW(externalhandle: *mut LDAP, sortkeys: *mut *mut LDAPSortKeyW, control: *mut LDAPControlW, criticality: bool) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_encode_sort_controlW(externalhandle : *mut LDAP, sortkeys : *mut *mut LDAPSortKeyW, control : *mut LDAPControlW, criticality : bool) -> u32); - unsafe { ldap_encode_sort_controlW(core::mem::transmute(externalhandle), core::mem::transmute(sortkeys), core::mem::transmute(control), criticality) } + unsafe { ldap_encode_sort_controlW(externalhandle as _, sortkeys as _, control as _, criticality) } } #[inline] pub unsafe fn ldap_err2string(err: u32) -> windows_core::PSTR { @@ -685,7 +685,7 @@ pub unsafe fn ldap_escape_filter_elementA(sourcefilterelement: &[u8], destfilter #[inline] 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); - unsafe { ldap_escape_filter_elementW(core::mem::transmute(sourcefilterelement.as_ptr()), sourcefilterelement.len().try_into().unwrap(), core::mem::transmute(destfilterelement.unwrap_or(core::mem::zeroed())), destlength) } + unsafe { ldap_escape_filter_elementW(core::mem::transmute(sourcefilterelement.as_ptr()), sourcefilterelement.len().try_into().unwrap(), destfilterelement.unwrap_or(core::mem::zeroed()) as _, destlength) } } #[inline] pub unsafe fn ldap_explode_dn(dn: P0, notypes: u32) -> *mut windows_core::PSTR @@ -717,7 +717,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_extended_operation(ld : *mut LDAP, oid : windows_core::PCSTR, data : *mut LDAP_BERVAL, servercontrols : *mut *mut LDAPControlA, clientcontrols : *mut *mut LDAPControlA, messagenumber : *mut u32) -> u32); - unsafe { ldap_extended_operation(core::mem::transmute(ld), oid.param().abi(), core::mem::transmute(data), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols), core::mem::transmute(messagenumber)) } + unsafe { ldap_extended_operation(ld as _, oid.param().abi(), data as _, servercontrols as _, clientcontrols as _, messagenumber as _) } } #[inline] pub unsafe fn ldap_extended_operationA(ld: *mut LDAP, oid: P1, data: *mut LDAP_BERVAL, servercontrols: *mut *mut LDAPControlA, clientcontrols: *mut *mut LDAPControlA, messagenumber: *mut u32) -> u32 @@ -725,7 +725,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_extended_operationA(ld : *mut LDAP, oid : windows_core::PCSTR, data : *mut LDAP_BERVAL, servercontrols : *mut *mut LDAPControlA, clientcontrols : *mut *mut LDAPControlA, messagenumber : *mut u32) -> u32); - unsafe { ldap_extended_operationA(core::mem::transmute(ld), oid.param().abi(), core::mem::transmute(data), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols), core::mem::transmute(messagenumber)) } + unsafe { ldap_extended_operationA(ld as _, oid.param().abi(), data as _, servercontrols as _, clientcontrols as _, messagenumber as _) } } #[inline] pub unsafe fn ldap_extended_operationW(ld: *mut LDAP, oid: P1, data: *mut LDAP_BERVAL, servercontrols: *mut *mut LDAPControlW, clientcontrols: *mut *mut LDAPControlW, messagenumber: *mut u32) -> u32 @@ -733,7 +733,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_extended_operationW(ld : *mut LDAP, oid : windows_core::PCWSTR, data : *mut LDAP_BERVAL, servercontrols : *mut *mut LDAPControlW, clientcontrols : *mut *mut LDAPControlW, messagenumber : *mut u32) -> u32); - unsafe { ldap_extended_operationW(core::mem::transmute(ld), oid.param().abi(), core::mem::transmute(data), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols), core::mem::transmute(messagenumber)) } + unsafe { ldap_extended_operationW(ld as _, oid.param().abi(), data as _, servercontrols as _, clientcontrols as _, messagenumber as _) } } #[inline] pub unsafe fn ldap_extended_operation_sA(externalhandle: *mut LDAP, oid: P1, data: *mut LDAP_BERVAL, servercontrols: *mut *mut LDAPControlA, clientcontrols: *mut *mut LDAPControlA, returnedoid: *mut windows_core::PSTR, returneddata: *mut *mut LDAP_BERVAL) -> u32 @@ -741,7 +741,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_extended_operation_sA(externalhandle : *mut LDAP, oid : windows_core::PCSTR, data : *mut LDAP_BERVAL, servercontrols : *mut *mut LDAPControlA, clientcontrols : *mut *mut LDAPControlA, returnedoid : *mut windows_core::PSTR, returneddata : *mut *mut LDAP_BERVAL) -> u32); - unsafe { ldap_extended_operation_sA(core::mem::transmute(externalhandle), oid.param().abi(), core::mem::transmute(data), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols), core::mem::transmute(returnedoid), core::mem::transmute(returneddata)) } + unsafe { ldap_extended_operation_sA(externalhandle as _, oid.param().abi(), data as _, servercontrols as _, clientcontrols as _, returnedoid as _, returneddata as _) } } #[inline] pub unsafe fn ldap_extended_operation_sW(externalhandle: *mut LDAP, oid: P1, data: *mut LDAP_BERVAL, servercontrols: *mut *mut LDAPControlW, clientcontrols: *mut *mut LDAPControlW, returnedoid: *mut windows_core::PWSTR, returneddata: *mut *mut LDAP_BERVAL) -> u32 @@ -749,87 +749,87 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_extended_operation_sW(externalhandle : *mut LDAP, oid : windows_core::PCWSTR, data : *mut LDAP_BERVAL, servercontrols : *mut *mut LDAPControlW, clientcontrols : *mut *mut LDAPControlW, returnedoid : *mut windows_core::PWSTR, returneddata : *mut *mut LDAP_BERVAL) -> u32); - unsafe { ldap_extended_operation_sW(core::mem::transmute(externalhandle), oid.param().abi(), core::mem::transmute(data), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols), core::mem::transmute(returnedoid), core::mem::transmute(returneddata)) } + unsafe { ldap_extended_operation_sW(externalhandle as _, oid.param().abi(), data as _, servercontrols as _, clientcontrols as _, returnedoid as _, returneddata as _) } } #[inline] pub unsafe fn ldap_first_attribute(ld: *mut LDAP, entry: *mut LDAPMessage, ptr: *mut *mut BerElement) -> windows_core::PSTR { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_first_attribute(ld : *mut LDAP, entry : *mut LDAPMessage, ptr : *mut *mut BerElement) -> windows_core::PSTR); - unsafe { ldap_first_attribute(core::mem::transmute(ld), core::mem::transmute(entry), core::mem::transmute(ptr)) } + unsafe { ldap_first_attribute(ld as _, entry as _, ptr as _) } } #[inline] pub unsafe fn ldap_first_attributeA(ld: *mut LDAP, entry: *mut LDAPMessage, ptr: *mut *mut BerElement) -> windows_core::PSTR { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_first_attributeA(ld : *mut LDAP, entry : *mut LDAPMessage, ptr : *mut *mut BerElement) -> windows_core::PSTR); - unsafe { ldap_first_attributeA(core::mem::transmute(ld), core::mem::transmute(entry), core::mem::transmute(ptr)) } + unsafe { ldap_first_attributeA(ld as _, entry as _, ptr as _) } } #[inline] pub unsafe fn ldap_first_attributeW(ld: *mut LDAP, entry: *mut LDAPMessage, ptr: *mut *mut BerElement) -> windows_core::PWSTR { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_first_attributeW(ld : *mut LDAP, entry : *mut LDAPMessage, ptr : *mut *mut BerElement) -> windows_core::PWSTR); - unsafe { ldap_first_attributeW(core::mem::transmute(ld), core::mem::transmute(entry), core::mem::transmute(ptr)) } + unsafe { ldap_first_attributeW(ld as _, entry as _, ptr as _) } } #[inline] pub unsafe fn ldap_first_entry(ld: *mut LDAP, res: *mut LDAPMessage) -> *mut LDAPMessage { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_first_entry(ld : *mut LDAP, res : *mut LDAPMessage) -> *mut LDAPMessage); - unsafe { ldap_first_entry(core::mem::transmute(ld), core::mem::transmute(res)) } + unsafe { ldap_first_entry(ld as _, res as _) } } #[inline] pub unsafe fn ldap_first_reference(ld: *mut LDAP, res: *mut LDAPMessage) -> *mut LDAPMessage { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_first_reference(ld : *mut LDAP, res : *mut LDAPMessage) -> *mut LDAPMessage); - unsafe { ldap_first_reference(core::mem::transmute(ld), core::mem::transmute(res)) } + unsafe { ldap_first_reference(ld as _, res as _) } } #[inline] pub unsafe fn ldap_free_controls(controls: *mut *mut LDAPControlA) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_free_controls(controls : *mut *mut LDAPControlA) -> u32); - unsafe { ldap_free_controls(core::mem::transmute(controls)) } + unsafe { ldap_free_controls(controls as _) } } #[inline] pub unsafe fn ldap_free_controlsA(controls: *mut *mut LDAPControlA) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_free_controlsA(controls : *mut *mut LDAPControlA) -> u32); - unsafe { ldap_free_controlsA(core::mem::transmute(controls)) } + unsafe { ldap_free_controlsA(controls as _) } } #[inline] pub unsafe fn ldap_free_controlsW(controls: *mut *mut LDAPControlW) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_free_controlsW(controls : *mut *mut LDAPControlW) -> u32); - unsafe { ldap_free_controlsW(core::mem::transmute(controls)) } + unsafe { ldap_free_controlsW(controls as _) } } #[inline] pub unsafe fn ldap_get_dn(ld: *mut LDAP, entry: *mut LDAPMessage) -> windows_core::PSTR { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_get_dn(ld : *mut LDAP, entry : *mut LDAPMessage) -> windows_core::PSTR); - unsafe { ldap_get_dn(core::mem::transmute(ld), core::mem::transmute(entry)) } + unsafe { ldap_get_dn(ld as _, entry as _) } } #[inline] pub unsafe fn ldap_get_dnA(ld: *mut LDAP, entry: *mut LDAPMessage) -> windows_core::PSTR { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_get_dnA(ld : *mut LDAP, entry : *mut LDAPMessage) -> windows_core::PSTR); - unsafe { ldap_get_dnA(core::mem::transmute(ld), core::mem::transmute(entry)) } + unsafe { ldap_get_dnA(ld as _, entry as _) } } #[inline] pub unsafe fn ldap_get_dnW(ld: *mut LDAP, entry: *mut LDAPMessage) -> windows_core::PWSTR { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_get_dnW(ld : *mut LDAP, entry : *mut LDAPMessage) -> windows_core::PWSTR); - unsafe { ldap_get_dnW(core::mem::transmute(ld), core::mem::transmute(entry)) } + unsafe { ldap_get_dnW(ld as _, entry as _) } } #[inline] 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); - unsafe { ldap_get_next_page(core::mem::transmute(externalhandle), searchhandle, pagesize, core::mem::transmute(messagenumber)) } + unsafe { ldap_get_next_page(externalhandle as _, searchhandle, pagesize, messagenumber as _) } } #[inline] 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); - unsafe { ldap_get_next_page_s(core::mem::transmute(externalhandle), searchhandle, core::mem::transmute(timeout), pagesize, core::mem::transmute(totalcount), core::mem::transmute(results)) } + unsafe { ldap_get_next_page_s(externalhandle as _, searchhandle, timeout as _, pagesize, totalcount as _, results as _) } } #[inline] pub unsafe fn ldap_get_option(ld: *mut LDAP, option: i32, outvalue: *mut core::ffi::c_void) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_get_option(ld : *mut LDAP, option : i32, outvalue : *mut core::ffi::c_void) -> u32); - unsafe { ldap_get_option(core::mem::transmute(ld), option, core::mem::transmute(outvalue)) } + unsafe { ldap_get_option(ld as _, option, outvalue as _) } } #[inline] pub unsafe fn ldap_get_optionW(ld: *mut LDAP, option: i32, outvalue: *mut core::ffi::c_void) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_get_optionW(ld : *mut LDAP, option : i32, outvalue : *mut core::ffi::c_void) -> u32); - unsafe { ldap_get_optionW(core::mem::transmute(ld), option, core::mem::transmute(outvalue)) } + unsafe { ldap_get_optionW(ld as _, option, outvalue as _) } } #[inline] 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); - unsafe { ldap_get_paged_count(core::mem::transmute(externalhandle), searchblock, core::mem::transmute(totalcount), core::mem::transmute(results)) } + unsafe { ldap_get_paged_count(externalhandle as _, searchblock, totalcount as _, results as _) } } #[inline] pub unsafe fn ldap_get_values(ld: *mut LDAP, entry: *mut LDAPMessage, attr: P2) -> *mut windows_core::PSTR @@ -837,7 +837,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_get_values(ld : *mut LDAP, entry : *mut LDAPMessage, attr : windows_core::PCSTR) -> *mut windows_core::PSTR); - unsafe { ldap_get_values(core::mem::transmute(ld), core::mem::transmute(entry), attr.param().abi()) } + unsafe { ldap_get_values(ld as _, entry as _, attr.param().abi()) } } #[inline] pub unsafe fn ldap_get_valuesA(ld: *mut LDAP, entry: *mut LDAPMessage, attr: P2) -> *mut windows_core::PSTR @@ -845,7 +845,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_get_valuesA(ld : *mut LDAP, entry : *mut LDAPMessage, attr : windows_core::PCSTR) -> *mut windows_core::PSTR); - unsafe { ldap_get_valuesA(core::mem::transmute(ld), core::mem::transmute(entry), attr.param().abi()) } + unsafe { ldap_get_valuesA(ld as _, entry as _, attr.param().abi()) } } #[inline] pub unsafe fn ldap_get_valuesW(ld: *mut LDAP, entry: *mut LDAPMessage, attr: P2) -> *mut windows_core::PWSTR @@ -853,7 +853,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_get_valuesW(ld : *mut LDAP, entry : *mut LDAPMessage, attr : windows_core::PCWSTR) -> *mut windows_core::PWSTR); - unsafe { ldap_get_valuesW(core::mem::transmute(ld), core::mem::transmute(entry), attr.param().abi()) } + unsafe { ldap_get_valuesW(ld as _, entry as _, attr.param().abi()) } } #[inline] pub unsafe fn ldap_get_values_len(externalhandle: *mut LDAP, message: *mut LDAPMessage, attr: P2) -> *mut *mut LDAP_BERVAL @@ -861,7 +861,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_get_values_len(externalhandle : *mut LDAP, message : *mut LDAPMessage, attr : windows_core::PCSTR) -> *mut *mut LDAP_BERVAL); - unsafe { ldap_get_values_len(core::mem::transmute(externalhandle), core::mem::transmute(message), attr.param().abi()) } + unsafe { ldap_get_values_len(externalhandle as _, message as _, attr.param().abi()) } } #[inline] pub unsafe fn ldap_get_values_lenA(externalhandle: *mut LDAP, message: *mut LDAPMessage, attr: P2) -> *mut *mut LDAP_BERVAL @@ -869,7 +869,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_get_values_lenA(externalhandle : *mut LDAP, message : *mut LDAPMessage, attr : windows_core::PCSTR) -> *mut *mut LDAP_BERVAL); - unsafe { ldap_get_values_lenA(core::mem::transmute(externalhandle), core::mem::transmute(message), attr.param().abi()) } + unsafe { ldap_get_values_lenA(externalhandle as _, message as _, attr.param().abi()) } } #[inline] pub unsafe fn ldap_get_values_lenW(externalhandle: *mut LDAP, message: *mut LDAPMessage, attr: P2) -> *mut *mut LDAP_BERVAL @@ -877,7 +877,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_get_values_lenW(externalhandle : *mut LDAP, message : *mut LDAPMessage, attr : windows_core::PCWSTR) -> *mut *mut LDAP_BERVAL); - unsafe { ldap_get_values_lenW(core::mem::transmute(externalhandle), core::mem::transmute(message), attr.param().abi()) } + unsafe { ldap_get_values_lenW(externalhandle as _, message as _, attr.param().abi()) } } #[inline] pub unsafe fn ldap_init(hostname: P0, portnumber: u32) -> *mut LDAP @@ -933,7 +933,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_modify(ld : *mut LDAP, dn : windows_core::PCSTR, mods : *mut *mut LDAPModA) -> u32); - unsafe { ldap_modify(core::mem::transmute(ld), dn.param().abi(), core::mem::transmute(mods)) } + unsafe { ldap_modify(ld as _, dn.param().abi(), mods as _) } } #[inline] pub unsafe fn ldap_modifyA(ld: *mut LDAP, dn: P1, mods: *mut *mut LDAPModA) -> u32 @@ -941,7 +941,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_modifyA(ld : *mut LDAP, dn : windows_core::PCSTR, mods : *mut *mut LDAPModA) -> u32); - unsafe { ldap_modifyA(core::mem::transmute(ld), dn.param().abi(), core::mem::transmute(mods)) } + unsafe { ldap_modifyA(ld as _, dn.param().abi(), mods as _) } } #[inline] pub unsafe fn ldap_modifyW(ld: *mut LDAP, dn: P1, mods: *mut *mut LDAPModW) -> u32 @@ -949,7 +949,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_modifyW(ld : *mut LDAP, dn : windows_core::PCWSTR, mods : *mut *mut LDAPModW) -> u32); - unsafe { ldap_modifyW(core::mem::transmute(ld), dn.param().abi(), core::mem::transmute(mods)) } + unsafe { ldap_modifyW(ld as _, dn.param().abi(), mods as _) } } #[inline] pub unsafe fn ldap_modify_ext(ld: *mut LDAP, dn: P1, mods: *mut *mut LDAPModA, servercontrols: *mut *mut LDAPControlA, clientcontrols: *mut *mut LDAPControlA, messagenumber: *mut u32) -> u32 @@ -957,7 +957,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_modify_ext(ld : *mut LDAP, dn : windows_core::PCSTR, mods : *mut *mut LDAPModA, servercontrols : *mut *mut LDAPControlA, clientcontrols : *mut *mut LDAPControlA, messagenumber : *mut u32) -> u32); - unsafe { ldap_modify_ext(core::mem::transmute(ld), dn.param().abi(), core::mem::transmute(mods), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols), core::mem::transmute(messagenumber)) } + unsafe { ldap_modify_ext(ld as _, dn.param().abi(), mods as _, servercontrols as _, clientcontrols as _, messagenumber as _) } } #[inline] pub unsafe fn ldap_modify_extA(ld: *mut LDAP, dn: P1, mods: *mut *mut LDAPModA, servercontrols: *mut *mut LDAPControlA, clientcontrols: *mut *mut LDAPControlA, messagenumber: *mut u32) -> u32 @@ -965,7 +965,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_modify_extA(ld : *mut LDAP, dn : windows_core::PCSTR, mods : *mut *mut LDAPModA, servercontrols : *mut *mut LDAPControlA, clientcontrols : *mut *mut LDAPControlA, messagenumber : *mut u32) -> u32); - unsafe { ldap_modify_extA(core::mem::transmute(ld), dn.param().abi(), core::mem::transmute(mods), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols), core::mem::transmute(messagenumber)) } + unsafe { ldap_modify_extA(ld as _, dn.param().abi(), mods as _, servercontrols as _, clientcontrols as _, messagenumber as _) } } #[inline] pub unsafe fn ldap_modify_extW(ld: *mut LDAP, dn: P1, mods: *mut *mut LDAPModW, servercontrols: *mut *mut LDAPControlW, clientcontrols: *mut *mut LDAPControlW, messagenumber: *mut u32) -> u32 @@ -973,7 +973,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_modify_extW(ld : *mut LDAP, dn : windows_core::PCWSTR, mods : *mut *mut LDAPModW, servercontrols : *mut *mut LDAPControlW, clientcontrols : *mut *mut LDAPControlW, messagenumber : *mut u32) -> u32); - unsafe { ldap_modify_extW(core::mem::transmute(ld), dn.param().abi(), core::mem::transmute(mods), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols), core::mem::transmute(messagenumber)) } + unsafe { ldap_modify_extW(ld as _, dn.param().abi(), mods as _, servercontrols as _, clientcontrols as _, messagenumber as _) } } #[inline] pub unsafe fn ldap_modify_ext_s(ld: *mut LDAP, dn: P1, mods: *mut *mut LDAPModA, servercontrols: *mut *mut LDAPControlA, clientcontrols: *mut *mut LDAPControlA) -> u32 @@ -981,7 +981,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_modify_ext_s(ld : *mut LDAP, dn : windows_core::PCSTR, mods : *mut *mut LDAPModA, servercontrols : *mut *mut LDAPControlA, clientcontrols : *mut *mut LDAPControlA) -> u32); - unsafe { ldap_modify_ext_s(core::mem::transmute(ld), dn.param().abi(), core::mem::transmute(mods), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols)) } + unsafe { ldap_modify_ext_s(ld as _, dn.param().abi(), mods as _, servercontrols as _, clientcontrols as _) } } #[inline] pub unsafe fn ldap_modify_ext_sA(ld: *mut LDAP, dn: P1, mods: *mut *mut LDAPModA, servercontrols: *mut *mut LDAPControlA, clientcontrols: *mut *mut LDAPControlA) -> u32 @@ -989,7 +989,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_modify_ext_sA(ld : *mut LDAP, dn : windows_core::PCSTR, mods : *mut *mut LDAPModA, servercontrols : *mut *mut LDAPControlA, clientcontrols : *mut *mut LDAPControlA) -> u32); - unsafe { ldap_modify_ext_sA(core::mem::transmute(ld), dn.param().abi(), core::mem::transmute(mods), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols)) } + unsafe { ldap_modify_ext_sA(ld as _, dn.param().abi(), mods as _, servercontrols as _, clientcontrols as _) } } #[inline] pub unsafe fn ldap_modify_ext_sW(ld: *mut LDAP, dn: P1, mods: *mut *mut LDAPModW, servercontrols: *mut *mut LDAPControlW, clientcontrols: *mut *mut LDAPControlW) -> u32 @@ -997,7 +997,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_modify_ext_sW(ld : *mut LDAP, dn : windows_core::PCWSTR, mods : *mut *mut LDAPModW, servercontrols : *mut *mut LDAPControlW, clientcontrols : *mut *mut LDAPControlW) -> u32); - unsafe { ldap_modify_ext_sW(core::mem::transmute(ld), dn.param().abi(), core::mem::transmute(mods), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols)) } + unsafe { ldap_modify_ext_sW(ld as _, dn.param().abi(), mods as _, servercontrols as _, clientcontrols as _) } } #[inline] pub unsafe fn ldap_modify_s(ld: *mut LDAP, dn: P1, mods: *mut *mut LDAPModA) -> u32 @@ -1005,7 +1005,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_modify_s(ld : *mut LDAP, dn : windows_core::PCSTR, mods : *mut *mut LDAPModA) -> u32); - unsafe { ldap_modify_s(core::mem::transmute(ld), dn.param().abi(), core::mem::transmute(mods)) } + unsafe { ldap_modify_s(ld as _, dn.param().abi(), mods as _) } } #[inline] pub unsafe fn ldap_modify_sA(ld: *mut LDAP, dn: P1, mods: *mut *mut LDAPModA) -> u32 @@ -1013,7 +1013,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_modify_sA(ld : *mut LDAP, dn : windows_core::PCSTR, mods : *mut *mut LDAPModA) -> u32); - unsafe { ldap_modify_sA(core::mem::transmute(ld), dn.param().abi(), core::mem::transmute(mods)) } + unsafe { ldap_modify_sA(ld as _, dn.param().abi(), mods as _) } } #[inline] pub unsafe fn ldap_modify_sW(ld: *mut LDAP, dn: P1, mods: *mut *mut LDAPModW) -> u32 @@ -1021,7 +1021,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_modify_sW(ld : *mut LDAP, dn : windows_core::PCWSTR, mods : *mut *mut LDAPModW) -> u32); - unsafe { ldap_modify_sW(core::mem::transmute(ld), dn.param().abi(), core::mem::transmute(mods)) } + unsafe { ldap_modify_sW(ld as _, dn.param().abi(), mods as _) } } #[inline] pub unsafe fn ldap_modrdn(externalhandle: *mut LDAP, distinguishedname: P1, newdistinguishedname: P2) -> u32 @@ -1030,7 +1030,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_modrdn(externalhandle : *mut LDAP, distinguishedname : windows_core::PCSTR, newdistinguishedname : windows_core::PCSTR) -> u32); - unsafe { ldap_modrdn(core::mem::transmute(externalhandle), distinguishedname.param().abi(), newdistinguishedname.param().abi()) } + unsafe { ldap_modrdn(externalhandle as _, distinguishedname.param().abi(), newdistinguishedname.param().abi()) } } #[inline] pub unsafe fn ldap_modrdn2(externalhandle: *mut LDAP, distinguishedname: P1, newdistinguishedname: P2, deleteoldrdn: i32) -> u32 @@ -1039,7 +1039,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_modrdn2(externalhandle : *mut LDAP, distinguishedname : windows_core::PCSTR, newdistinguishedname : windows_core::PCSTR, deleteoldrdn : i32) -> u32); - unsafe { ldap_modrdn2(core::mem::transmute(externalhandle), distinguishedname.param().abi(), newdistinguishedname.param().abi(), deleteoldrdn) } + unsafe { ldap_modrdn2(externalhandle as _, distinguishedname.param().abi(), newdistinguishedname.param().abi(), deleteoldrdn) } } #[inline] pub unsafe fn ldap_modrdn2A(externalhandle: *mut LDAP, distinguishedname: P1, newdistinguishedname: P2, deleteoldrdn: i32) -> u32 @@ -1048,7 +1048,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_modrdn2A(externalhandle : *mut LDAP, distinguishedname : windows_core::PCSTR, newdistinguishedname : windows_core::PCSTR, deleteoldrdn : i32) -> u32); - unsafe { ldap_modrdn2A(core::mem::transmute(externalhandle), distinguishedname.param().abi(), newdistinguishedname.param().abi(), deleteoldrdn) } + unsafe { ldap_modrdn2A(externalhandle as _, distinguishedname.param().abi(), newdistinguishedname.param().abi(), deleteoldrdn) } } #[inline] pub unsafe fn ldap_modrdn2W(externalhandle: *mut LDAP, distinguishedname: P1, newdistinguishedname: P2, deleteoldrdn: i32) -> u32 @@ -1057,7 +1057,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_modrdn2W(externalhandle : *mut LDAP, distinguishedname : windows_core::PCWSTR, newdistinguishedname : windows_core::PCWSTR, deleteoldrdn : i32) -> u32); - unsafe { ldap_modrdn2W(core::mem::transmute(externalhandle), distinguishedname.param().abi(), newdistinguishedname.param().abi(), deleteoldrdn) } + unsafe { ldap_modrdn2W(externalhandle as _, distinguishedname.param().abi(), newdistinguishedname.param().abi(), deleteoldrdn) } } #[inline] pub unsafe fn ldap_modrdn2_s(externalhandle: *mut LDAP, distinguishedname: P1, newdistinguishedname: P2, deleteoldrdn: i32) -> u32 @@ -1066,7 +1066,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_modrdn2_s(externalhandle : *mut LDAP, distinguishedname : windows_core::PCSTR, newdistinguishedname : windows_core::PCSTR, deleteoldrdn : i32) -> u32); - unsafe { ldap_modrdn2_s(core::mem::transmute(externalhandle), distinguishedname.param().abi(), newdistinguishedname.param().abi(), deleteoldrdn) } + unsafe { ldap_modrdn2_s(externalhandle as _, distinguishedname.param().abi(), newdistinguishedname.param().abi(), deleteoldrdn) } } #[inline] pub unsafe fn ldap_modrdn2_sA(externalhandle: *mut LDAP, distinguishedname: P1, newdistinguishedname: P2, deleteoldrdn: i32) -> u32 @@ -1075,7 +1075,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_modrdn2_sA(externalhandle : *mut LDAP, distinguishedname : windows_core::PCSTR, newdistinguishedname : windows_core::PCSTR, deleteoldrdn : i32) -> u32); - unsafe { ldap_modrdn2_sA(core::mem::transmute(externalhandle), distinguishedname.param().abi(), newdistinguishedname.param().abi(), deleteoldrdn) } + unsafe { ldap_modrdn2_sA(externalhandle as _, distinguishedname.param().abi(), newdistinguishedname.param().abi(), deleteoldrdn) } } #[inline] pub unsafe fn ldap_modrdn2_sW(externalhandle: *mut LDAP, distinguishedname: P1, newdistinguishedname: P2, deleteoldrdn: i32) -> u32 @@ -1084,7 +1084,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_modrdn2_sW(externalhandle : *mut LDAP, distinguishedname : windows_core::PCWSTR, newdistinguishedname : windows_core::PCWSTR, deleteoldrdn : i32) -> u32); - unsafe { ldap_modrdn2_sW(core::mem::transmute(externalhandle), distinguishedname.param().abi(), newdistinguishedname.param().abi(), deleteoldrdn) } + unsafe { ldap_modrdn2_sW(externalhandle as _, distinguishedname.param().abi(), newdistinguishedname.param().abi(), deleteoldrdn) } } #[inline] pub unsafe fn ldap_modrdnA(externalhandle: *mut LDAP, distinguishedname: P1, newdistinguishedname: P2) -> u32 @@ -1093,7 +1093,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_modrdnA(externalhandle : *mut LDAP, distinguishedname : windows_core::PCSTR, newdistinguishedname : windows_core::PCSTR) -> u32); - unsafe { ldap_modrdnA(core::mem::transmute(externalhandle), distinguishedname.param().abi(), newdistinguishedname.param().abi()) } + unsafe { ldap_modrdnA(externalhandle as _, distinguishedname.param().abi(), newdistinguishedname.param().abi()) } } #[inline] pub unsafe fn ldap_modrdnW(externalhandle: *mut LDAP, distinguishedname: P1, newdistinguishedname: P2) -> u32 @@ -1102,7 +1102,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_modrdnW(externalhandle : *mut LDAP, distinguishedname : windows_core::PCWSTR, newdistinguishedname : windows_core::PCWSTR) -> u32); - unsafe { ldap_modrdnW(core::mem::transmute(externalhandle), distinguishedname.param().abi(), newdistinguishedname.param().abi()) } + unsafe { ldap_modrdnW(externalhandle as _, distinguishedname.param().abi(), newdistinguishedname.param().abi()) } } #[inline] pub unsafe fn ldap_modrdn_s(externalhandle: *mut LDAP, distinguishedname: P1, newdistinguishedname: P2) -> u32 @@ -1111,7 +1111,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_modrdn_s(externalhandle : *mut LDAP, distinguishedname : windows_core::PCSTR, newdistinguishedname : windows_core::PCSTR) -> u32); - unsafe { ldap_modrdn_s(core::mem::transmute(externalhandle), distinguishedname.param().abi(), newdistinguishedname.param().abi()) } + unsafe { ldap_modrdn_s(externalhandle as _, distinguishedname.param().abi(), newdistinguishedname.param().abi()) } } #[inline] pub unsafe fn ldap_modrdn_sA(externalhandle: *mut LDAP, distinguishedname: P1, newdistinguishedname: P2) -> u32 @@ -1120,7 +1120,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_modrdn_sA(externalhandle : *mut LDAP, distinguishedname : windows_core::PCSTR, newdistinguishedname : windows_core::PCSTR) -> u32); - unsafe { ldap_modrdn_sA(core::mem::transmute(externalhandle), distinguishedname.param().abi(), newdistinguishedname.param().abi()) } + unsafe { ldap_modrdn_sA(externalhandle as _, distinguishedname.param().abi(), newdistinguishedname.param().abi()) } } #[inline] pub unsafe fn ldap_modrdn_sW(externalhandle: *mut LDAP, distinguishedname: P1, newdistinguishedname: P2) -> u32 @@ -1129,37 +1129,37 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_modrdn_sW(externalhandle : *mut LDAP, distinguishedname : windows_core::PCWSTR, newdistinguishedname : windows_core::PCWSTR) -> u32); - unsafe { ldap_modrdn_sW(core::mem::transmute(externalhandle), distinguishedname.param().abi(), newdistinguishedname.param().abi()) } + unsafe { ldap_modrdn_sW(externalhandle as _, distinguishedname.param().abi(), newdistinguishedname.param().abi()) } } #[inline] pub unsafe fn ldap_msgfree(res: *mut LDAPMessage) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_msgfree(res : *mut LDAPMessage) -> u32); - unsafe { ldap_msgfree(core::mem::transmute(res)) } + unsafe { ldap_msgfree(res as _) } } #[inline] pub unsafe fn ldap_next_attribute(ld: *mut LDAP, entry: *mut LDAPMessage, ptr: *mut BerElement) -> windows_core::PSTR { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_next_attribute(ld : *mut LDAP, entry : *mut LDAPMessage, ptr : *mut BerElement) -> windows_core::PSTR); - unsafe { ldap_next_attribute(core::mem::transmute(ld), core::mem::transmute(entry), core::mem::transmute(ptr)) } + unsafe { ldap_next_attribute(ld as _, entry as _, ptr as _) } } #[inline] pub unsafe fn ldap_next_attributeA(ld: *mut LDAP, entry: *mut LDAPMessage, ptr: *mut BerElement) -> windows_core::PSTR { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_next_attributeA(ld : *mut LDAP, entry : *mut LDAPMessage, ptr : *mut BerElement) -> windows_core::PSTR); - unsafe { ldap_next_attributeA(core::mem::transmute(ld), core::mem::transmute(entry), core::mem::transmute(ptr)) } + unsafe { ldap_next_attributeA(ld as _, entry as _, ptr as _) } } #[inline] pub unsafe fn ldap_next_attributeW(ld: *mut LDAP, entry: *mut LDAPMessage, ptr: *mut BerElement) -> windows_core::PWSTR { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_next_attributeW(ld : *mut LDAP, entry : *mut LDAPMessage, ptr : *mut BerElement) -> windows_core::PWSTR); - unsafe { ldap_next_attributeW(core::mem::transmute(ld), core::mem::transmute(entry), core::mem::transmute(ptr)) } + unsafe { ldap_next_attributeW(ld as _, entry as _, ptr as _) } } #[inline] pub unsafe fn ldap_next_entry(ld: *mut LDAP, entry: *mut LDAPMessage) -> *mut LDAPMessage { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_next_entry(ld : *mut LDAP, entry : *mut LDAPMessage) -> *mut LDAPMessage); - unsafe { ldap_next_entry(core::mem::transmute(ld), core::mem::transmute(entry)) } + unsafe { ldap_next_entry(ld as _, entry as _) } } #[inline] pub unsafe fn ldap_next_reference(ld: *mut LDAP, entry: *mut LDAPMessage) -> *mut LDAPMessage { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_next_reference(ld : *mut LDAP, entry : *mut LDAPMessage) -> *mut LDAPMessage); - unsafe { ldap_next_reference(core::mem::transmute(ld), core::mem::transmute(entry)) } + unsafe { ldap_next_reference(ld as _, entry as _) } } #[inline] pub unsafe fn ldap_open(hostname: P0, portnumber: u32) -> *mut LDAP @@ -1188,82 +1188,82 @@ where #[inline] pub unsafe fn ldap_parse_extended_resultA(connection: *mut LDAP, resultmessage: *mut LDAPMessage, resultoid: Option<*mut windows_core::PSTR>, resultdata: *mut *mut LDAP_BERVAL, freeit: bool) -> u32 { 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 : bool) -> u32); - unsafe { 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) } + unsafe { ldap_parse_extended_resultA(connection as _, resultmessage as _, resultoid.unwrap_or(core::mem::zeroed()) as _, resultdata as _, freeit) } } #[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: bool) -> u32 { 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 : bool) -> u32); - unsafe { 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) } + unsafe { ldap_parse_extended_resultW(connection as _, resultmessage as _, resultoid.unwrap_or(core::mem::zeroed()) as _, resultdata as _, freeit) } } #[inline] pub unsafe fn ldap_parse_page_control(externalhandle: *mut LDAP, servercontrols: *mut *mut LDAPControlA, totalcount: *mut u32, cookie: *mut *mut LDAP_BERVAL) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_parse_page_control(externalhandle : *mut LDAP, servercontrols : *mut *mut LDAPControlA, totalcount : *mut u32, cookie : *mut *mut LDAP_BERVAL) -> u32); - unsafe { ldap_parse_page_control(core::mem::transmute(externalhandle), core::mem::transmute(servercontrols), core::mem::transmute(totalcount), core::mem::transmute(cookie)) } + unsafe { ldap_parse_page_control(externalhandle as _, servercontrols as _, totalcount as _, cookie as _) } } #[inline] pub unsafe fn ldap_parse_page_controlA(externalhandle: *mut LDAP, servercontrols: *mut *mut LDAPControlA, totalcount: *mut u32, cookie: *mut *mut LDAP_BERVAL) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_parse_page_controlA(externalhandle : *mut LDAP, servercontrols : *mut *mut LDAPControlA, totalcount : *mut u32, cookie : *mut *mut LDAP_BERVAL) -> u32); - unsafe { ldap_parse_page_controlA(core::mem::transmute(externalhandle), core::mem::transmute(servercontrols), core::mem::transmute(totalcount), core::mem::transmute(cookie)) } + unsafe { ldap_parse_page_controlA(externalhandle as _, servercontrols as _, totalcount as _, cookie as _) } } #[inline] pub unsafe fn ldap_parse_page_controlW(externalhandle: *mut LDAP, servercontrols: *mut *mut LDAPControlW, totalcount: *mut u32, cookie: *mut *mut LDAP_BERVAL) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_parse_page_controlW(externalhandle : *mut LDAP, servercontrols : *mut *mut LDAPControlW, totalcount : *mut u32, cookie : *mut *mut LDAP_BERVAL) -> u32); - unsafe { ldap_parse_page_controlW(core::mem::transmute(externalhandle), core::mem::transmute(servercontrols), core::mem::transmute(totalcount), core::mem::transmute(cookie)) } + unsafe { ldap_parse_page_controlW(externalhandle as _, servercontrols as _, totalcount as _, cookie as _) } } #[inline] pub unsafe fn ldap_parse_reference(connection: *mut LDAP, resultmessage: *mut LDAPMessage, referrals: *mut *mut windows_core::PSTR) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_parse_reference(connection : *mut LDAP, resultmessage : *mut LDAPMessage, referrals : *mut *mut windows_core::PSTR) -> u32); - unsafe { ldap_parse_reference(core::mem::transmute(connection), core::mem::transmute(resultmessage), core::mem::transmute(referrals)) } + unsafe { ldap_parse_reference(connection as _, resultmessage as _, referrals as _) } } #[inline] pub unsafe fn ldap_parse_referenceA(connection: *mut LDAP, resultmessage: *mut LDAPMessage, referrals: *mut *mut windows_core::PSTR) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_parse_referenceA(connection : *mut LDAP, resultmessage : *mut LDAPMessage, referrals : *mut *mut windows_core::PSTR) -> u32); - unsafe { ldap_parse_referenceA(core::mem::transmute(connection), core::mem::transmute(resultmessage), core::mem::transmute(referrals)) } + unsafe { ldap_parse_referenceA(connection as _, resultmessage as _, referrals as _) } } #[inline] pub unsafe fn ldap_parse_referenceW(connection: *mut LDAP, resultmessage: *mut LDAPMessage, referrals: *mut *mut windows_core::PWSTR) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_parse_referenceW(connection : *mut LDAP, resultmessage : *mut LDAPMessage, referrals : *mut *mut windows_core::PWSTR) -> u32); - unsafe { ldap_parse_referenceW(core::mem::transmute(connection), core::mem::transmute(resultmessage), core::mem::transmute(referrals)) } + unsafe { ldap_parse_referenceW(connection as _, resultmessage as _, referrals as _) } } #[inline] pub unsafe fn ldap_parse_result(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 windows_core::PSTR>, servercontrols: *mut *mut *mut LDAPControlA, freeit: bool) -> u32 { 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 : bool) -> u32); - unsafe { 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) } + unsafe { ldap_parse_result(connection as _, resultmessage as _, returncode as _, matcheddns.unwrap_or(core::mem::zeroed()) as _, errormessage.unwrap_or(core::mem::zeroed()) as _, referrals.unwrap_or(core::mem::zeroed()) as _, servercontrols as _, freeit) } } #[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: bool) -> u32 { 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 : bool) -> u32); - unsafe { 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) } + unsafe { ldap_parse_resultA(connection as _, resultmessage as _, returncode as _, matcheddns.unwrap_or(core::mem::zeroed()) as _, errormessage.unwrap_or(core::mem::zeroed()) as _, referrals.unwrap_or(core::mem::zeroed()) as _, servercontrols as _, freeit) } } #[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: bool) -> u32 { 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 : bool) -> u32); - unsafe { 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) } + unsafe { ldap_parse_resultW(connection as _, resultmessage as _, returncode as _, matcheddns.unwrap_or(core::mem::zeroed()) as _, errormessage.unwrap_or(core::mem::zeroed()) as _, referrals.unwrap_or(core::mem::zeroed()) as _, servercontrols as _, freeit) } } #[inline] pub unsafe fn ldap_parse_sort_control(externalhandle: *mut LDAP, control: *mut *mut LDAPControlA, result: *mut u32, attribute: *mut windows_core::PSTR) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_parse_sort_control(externalhandle : *mut LDAP, control : *mut *mut LDAPControlA, result : *mut u32, attribute : *mut windows_core::PSTR) -> u32); - unsafe { ldap_parse_sort_control(core::mem::transmute(externalhandle), core::mem::transmute(control), core::mem::transmute(result), core::mem::transmute(attribute)) } + unsafe { ldap_parse_sort_control(externalhandle as _, control as _, result as _, attribute as _) } } #[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); - unsafe { 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()))) } + unsafe { ldap_parse_sort_controlA(externalhandle as _, control as _, result as _, attribute.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { 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()))) } + unsafe { ldap_parse_sort_controlW(externalhandle as _, control as _, result as _, attribute.unwrap_or(core::mem::zeroed()) as _) } } #[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 { windows_targets::link!("wldap32.dll" "cdecl" 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); - unsafe { ldap_parse_vlv_controlA(core::mem::transmute(externalhandle), core::mem::transmute(control), core::mem::transmute(targetpos), core::mem::transmute(listcount), core::mem::transmute(context), core::mem::transmute(errcode)) } + unsafe { ldap_parse_vlv_controlA(externalhandle as _, control as _, targetpos as _, listcount as _, context as _, errcode as _) } } #[inline] pub unsafe fn ldap_parse_vlv_controlW(externalhandle: *mut LDAP, control: *mut *mut LDAPControlW, targetpos: *mut u32, listcount: *mut u32, context: *mut *mut LDAP_BERVAL, errcode: *mut i32) -> i32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_parse_vlv_controlW(externalhandle : *mut LDAP, control : *mut *mut LDAPControlW, targetpos : *mut u32, listcount : *mut u32, context : *mut *mut LDAP_BERVAL, errcode : *mut i32) -> i32); - unsafe { ldap_parse_vlv_controlW(core::mem::transmute(externalhandle), core::mem::transmute(control), core::mem::transmute(targetpos), core::mem::transmute(listcount), core::mem::transmute(context), core::mem::transmute(errcode)) } + unsafe { ldap_parse_vlv_controlW(externalhandle as _, control as _, targetpos as _, listcount as _, context as _, errcode as _) } } #[inline] pub unsafe fn ldap_perror(ld: *mut LDAP, msg: P1) @@ -1271,7 +1271,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_perror(ld : *mut LDAP, msg : windows_core::PCSTR)); - unsafe { ldap_perror(core::mem::transmute(ld), msg.param().abi()) } + unsafe { ldap_perror(ld as _, msg.param().abi()) } } #[inline] pub unsafe fn ldap_rename_ext(ld: *mut LDAP, dn: P1, newrdn: P2, newparent: P3, deleteoldrdn: i32, servercontrols: *mut *mut LDAPControlA, clientcontrols: *mut *mut LDAPControlA, messagenumber: *mut u32) -> u32 @@ -1281,7 +1281,7 @@ where P3: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_rename_ext(ld : *mut LDAP, dn : windows_core::PCSTR, newrdn : windows_core::PCSTR, newparent : windows_core::PCSTR, deleteoldrdn : i32, servercontrols : *mut *mut LDAPControlA, clientcontrols : *mut *mut LDAPControlA, messagenumber : *mut u32) -> u32); - unsafe { ldap_rename_ext(core::mem::transmute(ld), dn.param().abi(), newrdn.param().abi(), newparent.param().abi(), deleteoldrdn, core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols), core::mem::transmute(messagenumber)) } + unsafe { ldap_rename_ext(ld as _, dn.param().abi(), newrdn.param().abi(), newparent.param().abi(), deleteoldrdn, servercontrols as _, clientcontrols as _, messagenumber as _) } } #[inline] pub unsafe fn ldap_rename_extA(ld: *mut LDAP, dn: P1, newrdn: P2, newparent: P3, deleteoldrdn: i32, servercontrols: *mut *mut LDAPControlA, clientcontrols: *mut *mut LDAPControlA, messagenumber: *mut u32) -> u32 @@ -1291,7 +1291,7 @@ where P3: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_rename_extA(ld : *mut LDAP, dn : windows_core::PCSTR, newrdn : windows_core::PCSTR, newparent : windows_core::PCSTR, deleteoldrdn : i32, servercontrols : *mut *mut LDAPControlA, clientcontrols : *mut *mut LDAPControlA, messagenumber : *mut u32) -> u32); - unsafe { ldap_rename_extA(core::mem::transmute(ld), dn.param().abi(), newrdn.param().abi(), newparent.param().abi(), deleteoldrdn, core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols), core::mem::transmute(messagenumber)) } + unsafe { ldap_rename_extA(ld as _, dn.param().abi(), newrdn.param().abi(), newparent.param().abi(), deleteoldrdn, servercontrols as _, clientcontrols as _, messagenumber as _) } } #[inline] pub unsafe fn ldap_rename_extW(ld: *mut LDAP, dn: P1, newrdn: P2, newparent: P3, deleteoldrdn: i32, servercontrols: *mut *mut LDAPControlW, clientcontrols: *mut *mut LDAPControlW, messagenumber: *mut u32) -> u32 @@ -1301,7 +1301,7 @@ where P3: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_rename_extW(ld : *mut LDAP, dn : windows_core::PCWSTR, newrdn : windows_core::PCWSTR, newparent : windows_core::PCWSTR, deleteoldrdn : i32, servercontrols : *mut *mut LDAPControlW, clientcontrols : *mut *mut LDAPControlW, messagenumber : *mut u32) -> u32); - unsafe { ldap_rename_extW(core::mem::transmute(ld), dn.param().abi(), newrdn.param().abi(), newparent.param().abi(), deleteoldrdn, core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols), core::mem::transmute(messagenumber)) } + unsafe { ldap_rename_extW(ld as _, dn.param().abi(), newrdn.param().abi(), newparent.param().abi(), deleteoldrdn, servercontrols as _, clientcontrols as _, messagenumber as _) } } #[inline] pub unsafe fn ldap_rename_ext_s(ld: *mut LDAP, dn: P1, newrdn: P2, newparent: P3, deleteoldrdn: i32, servercontrols: *mut *mut LDAPControlA, clientcontrols: *mut *mut LDAPControlA) -> u32 @@ -1311,7 +1311,7 @@ where P3: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_rename_ext_s(ld : *mut LDAP, dn : windows_core::PCSTR, newrdn : windows_core::PCSTR, newparent : windows_core::PCSTR, deleteoldrdn : i32, servercontrols : *mut *mut LDAPControlA, clientcontrols : *mut *mut LDAPControlA) -> u32); - unsafe { ldap_rename_ext_s(core::mem::transmute(ld), dn.param().abi(), newrdn.param().abi(), newparent.param().abi(), deleteoldrdn, core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols)) } + unsafe { ldap_rename_ext_s(ld as _, dn.param().abi(), newrdn.param().abi(), newparent.param().abi(), deleteoldrdn, servercontrols as _, clientcontrols as _) } } #[inline] pub unsafe fn ldap_rename_ext_sA(ld: *mut LDAP, dn: P1, newrdn: P2, newparent: P3, deleteoldrdn: i32, servercontrols: *mut *mut LDAPControlA, clientcontrols: *mut *mut LDAPControlA) -> u32 @@ -1321,7 +1321,7 @@ where P3: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_rename_ext_sA(ld : *mut LDAP, dn : windows_core::PCSTR, newrdn : windows_core::PCSTR, newparent : windows_core::PCSTR, deleteoldrdn : i32, servercontrols : *mut *mut LDAPControlA, clientcontrols : *mut *mut LDAPControlA) -> u32); - unsafe { ldap_rename_ext_sA(core::mem::transmute(ld), dn.param().abi(), newrdn.param().abi(), newparent.param().abi(), deleteoldrdn, core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols)) } + unsafe { ldap_rename_ext_sA(ld as _, dn.param().abi(), newrdn.param().abi(), newparent.param().abi(), deleteoldrdn, servercontrols as _, clientcontrols as _) } } #[inline] pub unsafe fn ldap_rename_ext_sW(ld: *mut LDAP, dn: P1, newrdn: P2, newparent: P3, deleteoldrdn: i32, servercontrols: *mut *mut LDAPControlW, clientcontrols: *mut *mut LDAPControlW) -> u32 @@ -1331,17 +1331,17 @@ where P3: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_rename_ext_sW(ld : *mut LDAP, dn : windows_core::PCWSTR, newrdn : windows_core::PCWSTR, newparent : windows_core::PCWSTR, deleteoldrdn : i32, servercontrols : *mut *mut LDAPControlW, clientcontrols : *mut *mut LDAPControlW) -> u32); - unsafe { ldap_rename_ext_sW(core::mem::transmute(ld), dn.param().abi(), newrdn.param().abi(), newparent.param().abi(), deleteoldrdn, core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols)) } + unsafe { ldap_rename_ext_sW(ld as _, dn.param().abi(), newrdn.param().abi(), newparent.param().abi(), deleteoldrdn, servercontrols as _, clientcontrols as _) } } #[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); - unsafe { ldap_result(core::mem::transmute(ld), msgid, all, core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), core::mem::transmute(res)) } + unsafe { ldap_result(ld as _, msgid, all, timeout.unwrap_or(core::mem::zeroed()) as _, res as _) } } #[inline] pub unsafe fn ldap_result2error(ld: *mut LDAP, res: *mut LDAPMessage, freeit: u32) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_result2error(ld : *mut LDAP, res : *mut LDAPMessage, freeit : u32) -> u32); - unsafe { ldap_result2error(core::mem::transmute(ld), core::mem::transmute(res), freeit) } + unsafe { ldap_result2error(ld as _, res as _, freeit) } } #[inline] pub unsafe fn ldap_sasl_bindA(externalhandle: *mut LDAP, distname: P1, authmechanism: P2, cred: *const LDAP_BERVAL, serverctrls: *mut *mut LDAPControlA, clientctrls: *mut *mut LDAPControlA, messagenumber: *mut i32) -> i32 @@ -1350,7 +1350,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_sasl_bindA(externalhandle : *mut LDAP, distname : windows_core::PCSTR, authmechanism : windows_core::PCSTR, cred : *const LDAP_BERVAL, serverctrls : *mut *mut LDAPControlA, clientctrls : *mut *mut LDAPControlA, messagenumber : *mut i32) -> i32); - unsafe { ldap_sasl_bindA(core::mem::transmute(externalhandle), distname.param().abi(), authmechanism.param().abi(), cred, core::mem::transmute(serverctrls), core::mem::transmute(clientctrls), core::mem::transmute(messagenumber)) } + unsafe { ldap_sasl_bindA(externalhandle as _, distname.param().abi(), authmechanism.param().abi(), cred, serverctrls as _, clientctrls as _, messagenumber as _) } } #[inline] pub unsafe fn ldap_sasl_bindW(externalhandle: *mut LDAP, distname: P1, authmechanism: P2, cred: *const LDAP_BERVAL, serverctrls: *mut *mut LDAPControlW, clientctrls: *mut *mut LDAPControlW, messagenumber: *mut i32) -> i32 @@ -1359,7 +1359,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_sasl_bindW(externalhandle : *mut LDAP, distname : windows_core::PCWSTR, authmechanism : windows_core::PCWSTR, cred : *const LDAP_BERVAL, serverctrls : *mut *mut LDAPControlW, clientctrls : *mut *mut LDAPControlW, messagenumber : *mut i32) -> i32); - unsafe { ldap_sasl_bindW(core::mem::transmute(externalhandle), distname.param().abi(), authmechanism.param().abi(), cred, core::mem::transmute(serverctrls), core::mem::transmute(clientctrls), core::mem::transmute(messagenumber)) } + unsafe { ldap_sasl_bindW(externalhandle as _, distname.param().abi(), authmechanism.param().abi(), cred, serverctrls as _, clientctrls as _, messagenumber as _) } } #[inline] pub unsafe fn ldap_sasl_bind_sA(externalhandle: *mut LDAP, distname: P1, authmechanism: P2, cred: *const LDAP_BERVAL, serverctrls: *mut *mut LDAPControlA, clientctrls: *mut *mut LDAPControlA, serverdata: *mut *mut LDAP_BERVAL) -> i32 @@ -1368,7 +1368,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_sasl_bind_sA(externalhandle : *mut LDAP, distname : windows_core::PCSTR, authmechanism : windows_core::PCSTR, cred : *const LDAP_BERVAL, serverctrls : *mut *mut LDAPControlA, clientctrls : *mut *mut LDAPControlA, serverdata : *mut *mut LDAP_BERVAL) -> i32); - unsafe { ldap_sasl_bind_sA(core::mem::transmute(externalhandle), distname.param().abi(), authmechanism.param().abi(), cred, core::mem::transmute(serverctrls), core::mem::transmute(clientctrls), core::mem::transmute(serverdata)) } + unsafe { ldap_sasl_bind_sA(externalhandle as _, distname.param().abi(), authmechanism.param().abi(), cred, serverctrls as _, clientctrls as _, serverdata as _) } } #[inline] pub unsafe fn ldap_sasl_bind_sW(externalhandle: *mut LDAP, distname: P1, authmechanism: P2, cred: *const LDAP_BERVAL, serverctrls: *mut *mut LDAPControlW, clientctrls: *mut *mut LDAPControlW, serverdata: *mut *mut LDAP_BERVAL) -> i32 @@ -1377,7 +1377,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_sasl_bind_sW(externalhandle : *mut LDAP, distname : windows_core::PCWSTR, authmechanism : windows_core::PCWSTR, cred : *const LDAP_BERVAL, serverctrls : *mut *mut LDAPControlW, clientctrls : *mut *mut LDAPControlW, serverdata : *mut *mut LDAP_BERVAL) -> i32); - unsafe { ldap_sasl_bind_sW(core::mem::transmute(externalhandle), distname.param().abi(), authmechanism.param().abi(), cred, core::mem::transmute(serverctrls), core::mem::transmute(clientctrls), core::mem::transmute(serverdata)) } + unsafe { ldap_sasl_bind_sW(externalhandle as _, distname.param().abi(), authmechanism.param().abi(), cred, serverctrls as _, clientctrls as _, serverdata as _) } } #[inline] pub unsafe fn ldap_search(ld: *mut LDAP, base: P1, scope: u32, filter: P3, attrs: *const *const i8, attrsonly: u32) -> u32 @@ -1386,7 +1386,7 @@ where P3: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_search(ld : *mut LDAP, base : windows_core::PCSTR, scope : u32, filter : windows_core::PCSTR, attrs : *const *const i8, attrsonly : u32) -> u32); - unsafe { ldap_search(core::mem::transmute(ld), base.param().abi(), scope, filter.param().abi(), attrs, attrsonly) } + unsafe { ldap_search(ld as _, base.param().abi(), scope, filter.param().abi(), attrs, attrsonly) } } #[inline] pub unsafe fn ldap_searchA(ld: *mut LDAP, base: P1, scope: u32, filter: P3, attrs: *const *const i8, attrsonly: u32) -> u32 @@ -1395,7 +1395,7 @@ where P3: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_searchA(ld : *mut LDAP, base : windows_core::PCSTR, scope : u32, filter : windows_core::PCSTR, attrs : *const *const i8, attrsonly : u32) -> u32); - unsafe { ldap_searchA(core::mem::transmute(ld), base.param().abi(), scope, filter.param().abi(), attrs, attrsonly) } + unsafe { ldap_searchA(ld as _, base.param().abi(), scope, filter.param().abi(), attrs, attrsonly) } } #[inline] pub unsafe fn ldap_searchW(ld: *mut LDAP, base: P1, scope: u32, filter: P3, attrs: *const *const u16, attrsonly: u32) -> u32 @@ -1404,12 +1404,12 @@ where P3: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_searchW(ld : *mut LDAP, base : windows_core::PCWSTR, scope : u32, filter : windows_core::PCWSTR, attrs : *const *const u16, attrsonly : u32) -> u32); - unsafe { ldap_searchW(core::mem::transmute(ld), base.param().abi(), scope, filter.param().abi(), attrs, attrsonly) } + unsafe { ldap_searchW(ld as _, base.param().abi(), scope, filter.param().abi(), attrs, attrsonly) } } #[inline] 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); - unsafe { ldap_search_abandon_page(core::mem::transmute(externalhandle), searchblock) } + unsafe { ldap_search_abandon_page(externalhandle as _, 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 @@ -1418,7 +1418,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); - unsafe { ldap_search_ext(core::mem::transmute(ld), base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, core::mem::transmute(servercontrols.unwrap_or(core::mem::zeroed())), core::mem::transmute(clientcontrols.unwrap_or(core::mem::zeroed())), timelimit, sizelimit, core::mem::transmute(messagenumber)) } + unsafe { ldap_search_ext(ld as _, base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, servercontrols.unwrap_or(core::mem::zeroed()) as _, clientcontrols.unwrap_or(core::mem::zeroed()) as _, timelimit, sizelimit, messagenumber as _) } } #[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 @@ -1427,7 +1427,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); - unsafe { ldap_search_extA(core::mem::transmute(ld), base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, core::mem::transmute(servercontrols.unwrap_or(core::mem::zeroed())), core::mem::transmute(clientcontrols.unwrap_or(core::mem::zeroed())), timelimit, sizelimit, core::mem::transmute(messagenumber)) } + unsafe { ldap_search_extA(ld as _, base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, servercontrols.unwrap_or(core::mem::zeroed()) as _, clientcontrols.unwrap_or(core::mem::zeroed()) as _, timelimit, sizelimit, messagenumber as _) } } #[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 @@ -1436,7 +1436,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); - unsafe { ldap_search_extW(core::mem::transmute(ld), base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, core::mem::transmute(servercontrols.unwrap_or(core::mem::zeroed())), core::mem::transmute(clientcontrols.unwrap_or(core::mem::zeroed())), timelimit, sizelimit, core::mem::transmute(messagenumber)) } + unsafe { ldap_search_extW(ld as _, base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, servercontrols.unwrap_or(core::mem::zeroed()) as _, clientcontrols.unwrap_or(core::mem::zeroed()) as _, timelimit, sizelimit, messagenumber as _) } } #[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 @@ -1445,7 +1445,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); - unsafe { ldap_search_ext_s(core::mem::transmute(ld), base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, core::mem::transmute(servercontrols.unwrap_or(core::mem::zeroed())), core::mem::transmute(clientcontrols.unwrap_or(core::mem::zeroed())), core::mem::transmute(timeout), sizelimit, core::mem::transmute(res)) } + unsafe { ldap_search_ext_s(ld as _, base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, servercontrols.unwrap_or(core::mem::zeroed()) as _, clientcontrols.unwrap_or(core::mem::zeroed()) as _, timeout as _, sizelimit, res as _) } } #[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 @@ -1454,7 +1454,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); - unsafe { ldap_search_ext_sA(core::mem::transmute(ld), base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, core::mem::transmute(servercontrols.unwrap_or(core::mem::zeroed())), core::mem::transmute(clientcontrols.unwrap_or(core::mem::zeroed())), core::mem::transmute(timeout), sizelimit, core::mem::transmute(res)) } + unsafe { ldap_search_ext_sA(ld as _, base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, servercontrols.unwrap_or(core::mem::zeroed()) as _, clientcontrols.unwrap_or(core::mem::zeroed()) as _, timeout as _, sizelimit, res as _) } } #[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 @@ -1463,7 +1463,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); - unsafe { ldap_search_ext_sW(core::mem::transmute(ld), base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, core::mem::transmute(servercontrols.unwrap_or(core::mem::zeroed())), core::mem::transmute(clientcontrols.unwrap_or(core::mem::zeroed())), core::mem::transmute(timeout), sizelimit, core::mem::transmute(res)) } + unsafe { ldap_search_ext_sW(ld as _, base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, servercontrols.unwrap_or(core::mem::zeroed()) as _, clientcontrols.unwrap_or(core::mem::zeroed()) as _, timeout as _, sizelimit, res as _) } } #[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 @@ -1472,7 +1472,7 @@ where P3: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_search_init_page(externalhandle : *mut LDAP, distinguishedname : windows_core::PCSTR, scopeofsearch : u32, searchfilter : windows_core::PCSTR, attributelist : *mut *mut i8, attributesonly : u32, servercontrols : *mut *mut LDAPControlA, clientcontrols : *mut *mut LDAPControlA, pagetimelimit : u32, totalsizelimit : u32, sortkeys : *mut *mut LDAPSortKeyA) -> PLDAPSearch); - unsafe { ldap_search_init_page(core::mem::transmute(externalhandle), distinguishedname.param().abi(), scopeofsearch, searchfilter.param().abi(), core::mem::transmute(attributelist), attributesonly, core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols), pagetimelimit, totalsizelimit, core::mem::transmute(sortkeys)) } + unsafe { ldap_search_init_page(externalhandle as _, distinguishedname.param().abi(), scopeofsearch, searchfilter.param().abi(), attributelist as _, attributesonly, servercontrols as _, clientcontrols as _, pagetimelimit, totalsizelimit, sortkeys as _) } } #[inline] pub unsafe fn ldap_search_init_pageA(externalhandle: *mut LDAP, distinguishedname: P1, scopeofsearch: u32, searchfilter: P3, attributelist: *const *const i8, attributesonly: u32, servercontrols: *mut *mut LDAPControlA, clientcontrols: *mut *mut LDAPControlA, pagetimelimit: u32, totalsizelimit: u32, sortkeys: *mut *mut LDAPSortKeyA) -> PLDAPSearch @@ -1481,7 +1481,7 @@ where P3: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_search_init_pageA(externalhandle : *mut LDAP, distinguishedname : windows_core::PCSTR, scopeofsearch : u32, searchfilter : windows_core::PCSTR, attributelist : *const *const i8, attributesonly : u32, servercontrols : *mut *mut LDAPControlA, clientcontrols : *mut *mut LDAPControlA, pagetimelimit : u32, totalsizelimit : u32, sortkeys : *mut *mut LDAPSortKeyA) -> PLDAPSearch); - unsafe { ldap_search_init_pageA(core::mem::transmute(externalhandle), distinguishedname.param().abi(), scopeofsearch, searchfilter.param().abi(), attributelist, attributesonly, core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols), pagetimelimit, totalsizelimit, core::mem::transmute(sortkeys)) } + unsafe { ldap_search_init_pageA(externalhandle as _, distinguishedname.param().abi(), scopeofsearch, searchfilter.param().abi(), attributelist, attributesonly, servercontrols as _, clientcontrols as _, pagetimelimit, totalsizelimit, sortkeys as _) } } #[inline] pub unsafe fn ldap_search_init_pageW(externalhandle: *mut LDAP, distinguishedname: P1, scopeofsearch: u32, searchfilter: P3, attributelist: *const *const u16, attributesonly: u32, servercontrols: *mut *mut LDAPControlW, clientcontrols: *mut *mut LDAPControlW, pagetimelimit: u32, totalsizelimit: u32, sortkeys: *mut *mut LDAPSortKeyW) -> PLDAPSearch @@ -1490,7 +1490,7 @@ where P3: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_search_init_pageW(externalhandle : *mut LDAP, distinguishedname : windows_core::PCWSTR, scopeofsearch : u32, searchfilter : windows_core::PCWSTR, attributelist : *const *const u16, attributesonly : u32, servercontrols : *mut *mut LDAPControlW, clientcontrols : *mut *mut LDAPControlW, pagetimelimit : u32, totalsizelimit : u32, sortkeys : *mut *mut LDAPSortKeyW) -> PLDAPSearch); - unsafe { ldap_search_init_pageW(core::mem::transmute(externalhandle), distinguishedname.param().abi(), scopeofsearch, searchfilter.param().abi(), attributelist, attributesonly, core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols), pagetimelimit, totalsizelimit, core::mem::transmute(sortkeys)) } + unsafe { ldap_search_init_pageW(externalhandle as _, distinguishedname.param().abi(), scopeofsearch, searchfilter.param().abi(), attributelist, attributesonly, servercontrols as _, clientcontrols as _, pagetimelimit, totalsizelimit, sortkeys as _) } } #[inline] pub unsafe fn ldap_search_s(ld: *mut LDAP, base: P1, scope: u32, filter: P3, attrs: *const *const i8, attrsonly: u32, res: *mut *mut LDAPMessage) -> u32 @@ -1499,7 +1499,7 @@ where P3: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_search_s(ld : *mut LDAP, base : windows_core::PCSTR, scope : u32, filter : windows_core::PCSTR, attrs : *const *const i8, attrsonly : u32, res : *mut *mut LDAPMessage) -> u32); - unsafe { ldap_search_s(core::mem::transmute(ld), base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, core::mem::transmute(res)) } + unsafe { ldap_search_s(ld as _, base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, res as _) } } #[inline] pub unsafe fn ldap_search_sA(ld: *mut LDAP, base: P1, scope: u32, filter: P3, attrs: *const *const i8, attrsonly: u32, res: *mut *mut LDAPMessage) -> u32 @@ -1508,7 +1508,7 @@ where P3: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_search_sA(ld : *mut LDAP, base : windows_core::PCSTR, scope : u32, filter : windows_core::PCSTR, attrs : *const *const i8, attrsonly : u32, res : *mut *mut LDAPMessage) -> u32); - unsafe { ldap_search_sA(core::mem::transmute(ld), base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, core::mem::transmute(res)) } + unsafe { ldap_search_sA(ld as _, base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, res as _) } } #[inline] pub unsafe fn ldap_search_sW(ld: *mut LDAP, base: P1, scope: u32, filter: P3, attrs: *const *const u16, attrsonly: u32, res: *mut *mut LDAPMessage) -> u32 @@ -1517,7 +1517,7 @@ where P3: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_search_sW(ld : *mut LDAP, base : windows_core::PCWSTR, scope : u32, filter : windows_core::PCWSTR, attrs : *const *const u16, attrsonly : u32, res : *mut *mut LDAPMessage) -> u32); - unsafe { ldap_search_sW(core::mem::transmute(ld), base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, core::mem::transmute(res)) } + unsafe { ldap_search_sW(ld as _, base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, res as _) } } #[inline] pub unsafe fn ldap_search_st(ld: *mut LDAP, base: P1, scope: u32, filter: P3, attrs: *const *const i8, attrsonly: u32, timeout: *mut LDAP_TIMEVAL, res: *mut *mut LDAPMessage) -> u32 @@ -1526,7 +1526,7 @@ where P3: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_search_st(ld : *mut LDAP, base : windows_core::PCSTR, scope : u32, filter : windows_core::PCSTR, attrs : *const *const i8, attrsonly : u32, timeout : *mut LDAP_TIMEVAL, res : *mut *mut LDAPMessage) -> u32); - unsafe { ldap_search_st(core::mem::transmute(ld), base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, core::mem::transmute(timeout), core::mem::transmute(res)) } + unsafe { ldap_search_st(ld as _, base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, timeout as _, res as _) } } #[inline] pub unsafe fn ldap_search_stA(ld: *mut LDAP, base: P1, scope: u32, filter: P3, attrs: *const *const i8, attrsonly: u32, timeout: *mut LDAP_TIMEVAL, res: *mut *mut LDAPMessage) -> u32 @@ -1535,7 +1535,7 @@ where P3: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_search_stA(ld : *mut LDAP, base : windows_core::PCSTR, scope : u32, filter : windows_core::PCSTR, attrs : *const *const i8, attrsonly : u32, timeout : *mut LDAP_TIMEVAL, res : *mut *mut LDAPMessage) -> u32); - unsafe { ldap_search_stA(core::mem::transmute(ld), base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, core::mem::transmute(timeout), core::mem::transmute(res)) } + unsafe { ldap_search_stA(ld as _, base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, timeout as _, res as _) } } #[inline] pub unsafe fn ldap_search_stW(ld: *mut LDAP, base: P1, scope: u32, filter: P3, attrs: *const *const u16, attrsonly: u32, timeout: *mut LDAP_TIMEVAL, res: *mut *mut LDAPMessage) -> u32 @@ -1544,7 +1544,7 @@ where P3: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_search_stW(ld : *mut LDAP, base : windows_core::PCWSTR, scope : u32, filter : windows_core::PCWSTR, attrs : *const *const u16, attrsonly : u32, timeout : *mut LDAP_TIMEVAL, res : *mut *mut LDAPMessage) -> u32); - unsafe { ldap_search_stW(core::mem::transmute(ld), base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, core::mem::transmute(timeout), core::mem::transmute(res)) } + unsafe { ldap_search_stW(ld as _, base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, timeout as _, res as _) } } #[inline] pub unsafe fn ldap_set_dbg_flags(newflags: u32) -> u32 { @@ -1559,12 +1559,12 @@ pub unsafe fn ldap_set_dbg_routine(debugprintroutine: DBGPRINT) { #[inline] pub unsafe fn ldap_set_option(ld: *mut LDAP, option: i32, invalue: *const core::ffi::c_void) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_set_option(ld : *mut LDAP, option : i32, invalue : *const core::ffi::c_void) -> u32); - unsafe { ldap_set_option(core::mem::transmute(ld), option, invalue) } + unsafe { ldap_set_option(ld as _, option, invalue) } } #[inline] pub unsafe fn ldap_set_optionW(ld: *mut LDAP, option: i32, invalue: *const core::ffi::c_void) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_set_optionW(ld : *mut LDAP, option : i32, invalue : *const core::ffi::c_void) -> u32); - unsafe { ldap_set_optionW(core::mem::transmute(ld), option, invalue) } + unsafe { ldap_set_optionW(ld as _, option, invalue) } } #[inline] pub unsafe fn ldap_simple_bind(ld: *mut LDAP, dn: P1, passwd: P2) -> u32 @@ -1573,7 +1573,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_simple_bind(ld : *mut LDAP, dn : windows_core::PCSTR, passwd : windows_core::PCSTR) -> u32); - unsafe { ldap_simple_bind(core::mem::transmute(ld), dn.param().abi(), passwd.param().abi()) } + unsafe { ldap_simple_bind(ld as _, dn.param().abi(), passwd.param().abi()) } } #[inline] pub unsafe fn ldap_simple_bindA(ld: *mut LDAP, dn: P1, passwd: P2) -> u32 @@ -1582,7 +1582,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_simple_bindA(ld : *mut LDAP, dn : windows_core::PCSTR, passwd : windows_core::PCSTR) -> u32); - unsafe { ldap_simple_bindA(core::mem::transmute(ld), dn.param().abi(), passwd.param().abi()) } + unsafe { ldap_simple_bindA(ld as _, dn.param().abi(), passwd.param().abi()) } } #[inline] pub unsafe fn ldap_simple_bindW(ld: *mut LDAP, dn: P1, passwd: P2) -> u32 @@ -1591,7 +1591,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_simple_bindW(ld : *mut LDAP, dn : windows_core::PCWSTR, passwd : windows_core::PCWSTR) -> u32); - unsafe { ldap_simple_bindW(core::mem::transmute(ld), dn.param().abi(), passwd.param().abi()) } + unsafe { ldap_simple_bindW(ld as _, dn.param().abi(), passwd.param().abi()) } } #[inline] pub unsafe fn ldap_simple_bind_s(ld: *mut LDAP, dn: P1, passwd: P2) -> u32 @@ -1600,7 +1600,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_simple_bind_s(ld : *mut LDAP, dn : windows_core::PCSTR, passwd : windows_core::PCSTR) -> u32); - unsafe { ldap_simple_bind_s(core::mem::transmute(ld), dn.param().abi(), passwd.param().abi()) } + unsafe { ldap_simple_bind_s(ld as _, dn.param().abi(), passwd.param().abi()) } } #[inline] pub unsafe fn ldap_simple_bind_sA(ld: *mut LDAP, dn: P1, passwd: P2) -> u32 @@ -1609,7 +1609,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_simple_bind_sA(ld : *mut LDAP, dn : windows_core::PCSTR, passwd : windows_core::PCSTR) -> u32); - unsafe { ldap_simple_bind_sA(core::mem::transmute(ld), dn.param().abi(), passwd.param().abi()) } + unsafe { ldap_simple_bind_sA(ld as _, dn.param().abi(), passwd.param().abi()) } } #[inline] pub unsafe fn ldap_simple_bind_sW(ld: *mut LDAP, dn: P1, passwd: P2) -> u32 @@ -1618,7 +1618,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_simple_bind_sW(ld : *mut LDAP, dn : windows_core::PCWSTR, passwd : windows_core::PCWSTR) -> u32); - unsafe { ldap_simple_bind_sW(core::mem::transmute(ld), dn.param().abi(), passwd.param().abi()) } + unsafe { ldap_simple_bind_sW(ld as _, dn.param().abi(), passwd.param().abi()) } } #[inline] pub unsafe fn ldap_sslinit(hostname: P0, portnumber: u32, secure: i32) -> *mut LDAP @@ -1647,22 +1647,22 @@ where #[inline] pub unsafe fn ldap_start_tls_sA(externalhandle: *mut LDAP, serverreturnvalue: *mut u32, result: *mut *mut LDAPMessage, servercontrols: *mut *mut LDAPControlA, clientcontrols: *mut *mut LDAPControlA) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_start_tls_sA(externalhandle : *mut LDAP, serverreturnvalue : *mut u32, result : *mut *mut LDAPMessage, servercontrols : *mut *mut LDAPControlA, clientcontrols : *mut *mut LDAPControlA) -> u32); - unsafe { ldap_start_tls_sA(core::mem::transmute(externalhandle), core::mem::transmute(serverreturnvalue), core::mem::transmute(result), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols)) } + unsafe { ldap_start_tls_sA(externalhandle as _, serverreturnvalue as _, result as _, servercontrols as _, clientcontrols as _) } } #[inline] pub unsafe fn ldap_start_tls_sW(externalhandle: *mut LDAP, serverreturnvalue: *mut u32, result: *mut *mut LDAPMessage, servercontrols: *mut *mut LDAPControlW, clientcontrols: *mut *mut LDAPControlW) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_start_tls_sW(externalhandle : *mut LDAP, serverreturnvalue : *mut u32, result : *mut *mut LDAPMessage, servercontrols : *mut *mut LDAPControlW, clientcontrols : *mut *mut LDAPControlW) -> u32); - unsafe { ldap_start_tls_sW(core::mem::transmute(externalhandle), core::mem::transmute(serverreturnvalue), core::mem::transmute(result), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols)) } + unsafe { ldap_start_tls_sW(externalhandle as _, serverreturnvalue as _, result as _, servercontrols as _, clientcontrols as _) } } #[inline] pub unsafe fn ldap_startup(version: *mut LDAP_VERSION_INFO, instance: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_startup(version : *mut LDAP_VERSION_INFO, instance : *mut super::super::Foundation:: HANDLE) -> u32); - unsafe { ldap_startup(core::mem::transmute(version), core::mem::transmute(instance)) } + unsafe { ldap_startup(version as _, instance as _) } } #[inline] pub unsafe fn ldap_stop_tls_s(externalhandle: *mut LDAP) -> bool { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_stop_tls_s(externalhandle : *mut LDAP) -> bool); - unsafe { ldap_stop_tls_s(core::mem::transmute(externalhandle)) } + unsafe { ldap_stop_tls_s(externalhandle as _) } } #[inline] pub unsafe fn ldap_ufn2dn(ufn: P0, pdn: *mut windows_core::PSTR) -> u32 @@ -1670,7 +1670,7 @@ where P0: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_ufn2dn(ufn : windows_core::PCSTR, pdn : *mut windows_core::PSTR) -> u32); - unsafe { ldap_ufn2dn(ufn.param().abi(), core::mem::transmute(pdn)) } + unsafe { ldap_ufn2dn(ufn.param().abi(), pdn as _) } } #[inline] pub unsafe fn ldap_ufn2dnA(ufn: P0, pdn: *mut windows_core::PSTR) -> u32 @@ -1678,7 +1678,7 @@ where P0: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_ufn2dnA(ufn : windows_core::PCSTR, pdn : *mut windows_core::PSTR) -> u32); - unsafe { ldap_ufn2dnA(ufn.param().abi(), core::mem::transmute(pdn)) } + unsafe { ldap_ufn2dnA(ufn.param().abi(), pdn as _) } } #[inline] pub unsafe fn ldap_ufn2dnW(ufn: P0, pdn: *mut windows_core::PWSTR) -> u32 @@ -1686,37 +1686,37 @@ where P0: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_ufn2dnW(ufn : windows_core::PCWSTR, pdn : *mut windows_core::PWSTR) -> u32); - unsafe { ldap_ufn2dnW(ufn.param().abi(), core::mem::transmute(pdn)) } + unsafe { ldap_ufn2dnW(ufn.param().abi(), pdn as _) } } #[inline] pub unsafe fn ldap_unbind(ld: *mut LDAP) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_unbind(ld : *mut LDAP) -> u32); - unsafe { ldap_unbind(core::mem::transmute(ld)) } + unsafe { ldap_unbind(ld as _) } } #[inline] pub unsafe fn ldap_unbind_s(ld: *mut LDAP) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_unbind_s(ld : *mut LDAP) -> u32); - unsafe { ldap_unbind_s(core::mem::transmute(ld)) } + unsafe { ldap_unbind_s(ld as _) } } #[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); - unsafe { ldap_value_free(core::mem::transmute(vals.unwrap_or(core::mem::zeroed()))) } + unsafe { ldap_value_free(vals.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { ldap_value_freeA(core::mem::transmute(vals.unwrap_or(core::mem::zeroed()))) } + unsafe { ldap_value_freeA(vals.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { ldap_value_freeW(core::mem::transmute(vals.unwrap_or(core::mem::zeroed()))) } + unsafe { ldap_value_freeW(vals.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ldap_value_free_len(vals: *mut *mut LDAP_BERVAL) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_value_free_len(vals : *mut *mut LDAP_BERVAL) -> u32); - unsafe { ldap_value_free_len(core::mem::transmute(vals)) } + unsafe { ldap_value_free_len(vals as _) } } #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] 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 fa879a5026..76b6e45a47 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/NetworkListManager/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/NetworkListManager/mod.rs @@ -19,7 +19,7 @@ impl IEnumNetworkConnections { } } pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -136,7 +136,7 @@ impl IEnumNetworks { } } pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -282,7 +282,7 @@ impl INetwork { } } pub unsafe fn GetTimeCreatedAndConnected(&self, pdwlowdatetimecreated: *mut u32, pdwhighdatetimecreated: *mut u32, pdwlowdatetimeconnected: *mut u32, pdwhighdatetimeconnected: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTimeCreatedAndConnected)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwlowdatetimecreated), core::mem::transmute(pdwhighdatetimecreated), core::mem::transmute(pdwlowdatetimeconnected), core::mem::transmute(pdwhighdatetimeconnected)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTimeCreatedAndConnected)(windows_core::Interface::as_raw(self), pdwlowdatetimecreated as _, pdwhighdatetimecreated as _, pdwlowdatetimeconnected as _, pdwhighdatetimeconnected as _).ok() } } pub unsafe fn IsConnectedToInternet(&self) -> windows_core::Result { unsafe { @@ -802,7 +802,7 @@ impl INetworkConnectionCost { } } pub unsafe fn GetDataPlanStatus(&self, pdataplanstatus: *mut NLM_DATAPLAN_STATUS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDataPlanStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pdataplanstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDataPlanStatus)(windows_core::Interface::as_raw(self), pdataplanstatus as _).ok() } } } #[repr(C)] @@ -940,10 +940,10 @@ windows_core::imp::define_interface!(INetworkCostManager, INetworkCostManager_Vt windows_core::imp::interface_hierarchy!(INetworkCostManager, windows_core::IUnknown); impl INetworkCostManager { pub unsafe fn GetCost(&self, pcost: *mut u32, pdestipaddr: *const NLM_SOCKADDR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCost)(windows_core::Interface::as_raw(self), core::mem::transmute(pcost), pdestipaddr).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCost)(windows_core::Interface::as_raw(self), pcost as _, pdestipaddr).ok() } } pub unsafe fn GetDataPlanStatus(&self, pdataplanstatus: *mut NLM_DATAPLAN_STATUS, pdestipaddr: *const NLM_SOCKADDR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDataPlanStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pdataplanstatus), pdestipaddr).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDataPlanStatus)(windows_core::Interface::as_raw(self), pdataplanstatus as _, pdestipaddr).ok() } } pub unsafe fn SetDestinationAddresses(&self, pdestipaddrlist: &[NLM_SOCKADDR], bappend: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetDestinationAddresses)(windows_core::Interface::as_raw(self), pdestipaddrlist.len().try_into().unwrap(), core::mem::transmute(pdestipaddrlist.as_ptr()), bappend).ok() } diff --git a/crates/libs/windows/src/Windows/Win32/Networking/RemoteDifferentialCompression/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/RemoteDifferentialCompression/mod.rs index 403a4a7e32..e220bb69fe 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/RemoteDifferentialCompression/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/RemoteDifferentialCompression/mod.rs @@ -23,7 +23,7 @@ impl IFindSimilarResults { } } pub unsafe fn GetNextFileId(&self, numtraitsmatched: *mut u32, similarityfileid: *mut SimilarityFileId) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNextFileId)(windows_core::Interface::as_raw(self), core::mem::transmute(numtraitsmatched), core::mem::transmute(similarityfileid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNextFileId)(windows_core::Interface::as_raw(self), numtraitsmatched as _, similarityfileid as _).ok() } } } #[repr(C)] @@ -71,7 +71,7 @@ windows_core::imp::define_interface!(IRdcComparator, IRdcComparator_Vtbl, 0x9623 windows_core::imp::interface_hierarchy!(IRdcComparator, windows_core::IUnknown); impl IRdcComparator { pub unsafe fn Process(&self, endofinput: bool, endofoutput: *mut super::super::Foundation::BOOL, inputbuffer: *mut RdcBufferPointer, outputbuffer: *mut RdcNeedPointer, rdc_errorcode: *mut RDC_ErrorCode) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Process)(windows_core::Interface::as_raw(self), endofinput.into(), core::mem::transmute(endofoutput), core::mem::transmute(inputbuffer), core::mem::transmute(outputbuffer), core::mem::transmute(rdc_errorcode)).ok() } + unsafe { (windows_core::Interface::vtable(self).Process)(windows_core::Interface::as_raw(self), endofinput.into(), endofoutput as _, inputbuffer as _, outputbuffer as _, rdc_errorcode as _).ok() } } } #[repr(C)] @@ -107,7 +107,7 @@ impl IRdcFileReader { } } pub unsafe fn Read(&self, offsetfilestart: u64, bytestoread: u32, bytesactuallyread: *mut u32, buffer: *mut u8, eof: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), offsetfilestart, bytestoread, core::mem::transmute(bytesactuallyread), core::mem::transmute(buffer), core::mem::transmute(eof)).ok() } + unsafe { (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), offsetfilestart, bytestoread, bytesactuallyread as _, buffer as _, eof as _).ok() } } pub unsafe fn GetFilePosition(&self) -> windows_core::Result { unsafe { @@ -254,7 +254,7 @@ impl IRdcGenerator { } } pub unsafe fn Process(&self, endofinput: bool, endofoutput: *mut super::super::Foundation::BOOL, inputbuffer: *mut RdcBufferPointer, outputbuffers: &mut [*mut RdcBufferPointer], rdc_errorcode: *mut RDC_ErrorCode) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Process)(windows_core::Interface::as_raw(self), endofinput.into(), core::mem::transmute(endofoutput), core::mem::transmute(inputbuffer), outputbuffers.len().try_into().unwrap(), core::mem::transmute(outputbuffers.as_ptr()), core::mem::transmute(rdc_errorcode)).ok() } + unsafe { (windows_core::Interface::vtable(self).Process)(windows_core::Interface::as_raw(self), endofinput.into(), endofoutput as _, inputbuffer as _, outputbuffers.len().try_into().unwrap(), core::mem::transmute(outputbuffers.as_ptr()), rdc_errorcode as _).ok() } } } #[repr(C)] @@ -395,7 +395,7 @@ impl IRdcGeneratorParameters { } } pub unsafe fn GetParametersVersion(&self, currentversion: *mut u32, minimumcompatibleappversion: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetParametersVersion)(windows_core::Interface::as_raw(self), core::mem::transmute(currentversion), core::mem::transmute(minimumcompatibleappversion)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetParametersVersion)(windows_core::Interface::as_raw(self), currentversion as _, minimumcompatibleappversion as _).ok() } } pub unsafe fn GetSerializeSize(&self) -> windows_core::Result { unsafe { @@ -404,7 +404,7 @@ impl IRdcGeneratorParameters { } } pub unsafe fn Serialize(&self, size: u32, parametersblob: *mut u8, byteswritten: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Serialize)(windows_core::Interface::as_raw(self), size, core::mem::transmute(parametersblob), core::mem::transmute(byteswritten)).ok() } + unsafe { (windows_core::Interface::vtable(self).Serialize)(windows_core::Interface::as_raw(self), size, parametersblob as _, byteswritten as _).ok() } } } #[repr(C)] @@ -518,7 +518,7 @@ impl IRdcLibrary { } } pub unsafe fn GetRDCVersion(&self, currentversion: *mut u32, minimumcompatibleappversion: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRDCVersion)(windows_core::Interface::as_raw(self), core::mem::transmute(currentversion), core::mem::transmute(minimumcompatibleappversion)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRDCVersion)(windows_core::Interface::as_raw(self), currentversion as _, minimumcompatibleappversion as _).ok() } } } #[repr(C)] @@ -647,7 +647,7 @@ impl IRdcSignatureReader { } } pub unsafe fn ReadSignatures(&self, rdcsignaturepointer: *mut RdcSignaturePointer, endofoutput: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadSignatures)(windows_core::Interface::as_raw(self), core::mem::transmute(rdcsignaturepointer), core::mem::transmute(endofoutput)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadSignatures)(windows_core::Interface::as_raw(self), rdcsignaturepointer as _, endofoutput as _).ok() } } } #[repr(C)] @@ -928,7 +928,7 @@ impl ISimilarityFileIdTable { } } pub unsafe fn Lookup(&self, similarityfileindex: u32, similarityfileid: *mut SimilarityFileId) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Lookup)(windows_core::Interface::as_raw(self), similarityfileindex, core::mem::transmute(similarityfileid)).ok() } + unsafe { (windows_core::Interface::vtable(self).Lookup)(windows_core::Interface::as_raw(self), similarityfileindex, similarityfileid as _).ok() } } pub unsafe fn Invalidate(&self, similarityfileindex: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Invalidate)(windows_core::Interface::as_raw(self), similarityfileindex).ok() } @@ -1078,7 +1078,7 @@ windows_core::imp::define_interface!(ISimilarityTableDumpState, ISimilarityTable windows_core::imp::interface_hierarchy!(ISimilarityTableDumpState, windows_core::IUnknown); impl ISimilarityTableDumpState { pub unsafe fn GetNextData(&self, resultssize: u32, resultsused: *mut u32, eof: *mut super::super::Foundation::BOOL, results: *mut SimilarityDumpData) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNextData)(windows_core::Interface::as_raw(self), resultssize, core::mem::transmute(resultsused), core::mem::transmute(eof), core::mem::transmute(results)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNextData)(windows_core::Interface::as_raw(self), resultssize, resultsused as _, eof as _, results as _).ok() } } } #[repr(C)] @@ -1120,7 +1120,7 @@ impl ISimilarityTraitsMappedView { } } pub unsafe fn GetView(&self, mappedpagebegin: *mut *mut u8, mappedpageend: *mut *mut u8) { - unsafe { (windows_core::Interface::vtable(self).GetView)(windows_core::Interface::as_raw(self), core::mem::transmute(mappedpagebegin), core::mem::transmute(mappedpageend)) } + unsafe { (windows_core::Interface::vtable(self).GetView)(windows_core::Interface::as_raw(self), mappedpagebegin as _, mappedpageend as _) } } } #[repr(C)] @@ -1355,7 +1355,7 @@ impl ISimilarityTraitsTable { unsafe { (windows_core::Interface::vtable(self).Append)(windows_core::Interface::as_raw(self), data, fileindex).ok() } } pub unsafe fn FindSimilarFileIndex(&self, similaritydata: *const SimilarityData, numberofmatchesrequired: u16, findsimilarfileindexresults: *mut FindSimilarFileIndexResults, resultssize: u32, resultsused: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).FindSimilarFileIndex)(windows_core::Interface::as_raw(self), similaritydata, numberofmatchesrequired, core::mem::transmute(findsimilarfileindexresults), resultssize, core::mem::transmute(resultsused)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindSimilarFileIndex)(windows_core::Interface::as_raw(self), similaritydata, numberofmatchesrequired, findsimilarfileindexresults as _, resultssize, resultsused as _).ok() } } pub unsafe fn BeginDump(&self) -> windows_core::Result { unsafe { 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 6fc09648fc..9ce312699f 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/WebSocket/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/WebSocket/mod.rs @@ -15,8 +15,8 @@ pub unsafe fn WebSocketBeginClientHandshake(hwebsocket: WEB_SOCKET_HANDLE, pszsu pszextensions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pinitialheaders.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pinitialheaders.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(padditionalheaders), - core::mem::transmute(puladditionalheadercount), + padditionalheaders as _, + puladditionalheadercount as _, ) .ok() } @@ -27,7 +27,7 @@ where 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); - unsafe { WebSocketBeginServerHandshake(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() } + unsafe { WebSocketBeginServerHandshake(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(), presponseheaders as _, pulresponseheadercount as _).ok() } } #[inline] pub unsafe fn WebSocketCompleteAction(hwebsocket: WEB_SOCKET_HANDLE, pvactioncontext: *const core::ffi::c_void, ulbytestransferred: u32) { @@ -58,7 +58,7 @@ pub unsafe fn WebSocketDeleteHandle(hwebsocket: WEB_SOCKET_HANDLE) { #[inline] 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); - unsafe { WebSocketEndClientHandshake(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() } + unsafe { WebSocketEndClientHandshake(hwebsocket, core::mem::transmute(presponseheaders.as_ptr()), presponseheaders.len().try_into().unwrap(), pulselectedextensions.unwrap_or(core::mem::zeroed()) as _, pulselectedextensioncount.unwrap_or(core::mem::zeroed()) as _, pulselectedsubprotocol.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WebSocketEndServerHandshake(hwebsocket: WEB_SOCKET_HANDLE) -> windows_core::Result<()> { @@ -68,22 +68,22 @@ pub unsafe fn WebSocketEndServerHandshake(hwebsocket: WEB_SOCKET_HANDLE) -> wind #[inline] 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); - unsafe { WebSocketGetAction(hwebsocket, 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() } + unsafe { WebSocketGetAction(hwebsocket, eactionqueue, pdatabuffers as _, puldatabuffercount as _, paction as _, pbuffertype as _, pvapplicationcontext.unwrap_or(core::mem::zeroed()) as _, pvactioncontext as _).ok() } } #[inline] pub unsafe fn WebSocketGetGlobalProperty(etype: WEB_SOCKET_PROPERTY_TYPE, pvvalue: *mut core::ffi::c_void, ulsize: *mut u32) -> windows_core::Result<()> { windows_targets::link!("websocket.dll" "system" fn WebSocketGetGlobalProperty(etype : WEB_SOCKET_PROPERTY_TYPE, pvvalue : *mut core::ffi::c_void, ulsize : *mut u32) -> windows_core::HRESULT); - unsafe { WebSocketGetGlobalProperty(etype, core::mem::transmute(pvvalue), core::mem::transmute(ulsize)).ok() } + unsafe { WebSocketGetGlobalProperty(etype, pvvalue as _, ulsize as _).ok() } } #[inline] 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); - unsafe { WebSocketReceive(hwebsocket, core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WebSocketReceive(hwebsocket, pbuffer.unwrap_or(core::mem::zeroed()) as _, pvcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { WebSocketSend(hwebsocket, buffertype, core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WebSocketSend(hwebsocket, buffertype, pbuffer.unwrap_or(core::mem::zeroed()) as _, context.unwrap_or(core::mem::zeroed()) as _).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 e3ff6ffba6..bd3576a2bb 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/WinHttp/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/WinHttp/mod.rs @@ -1,12 +1,12 @@ #[inline] pub unsafe fn WinHttpAddRequestHeaders(hrequest: *mut core::ffi::c_void, lpszheaders: &[u16], dwmodifiers: u32) -> windows_core::Result<()> { windows_targets::link!("winhttp.dll" "system" fn WinHttpAddRequestHeaders(hrequest : *mut core::ffi::c_void, lpszheaders : windows_core::PCWSTR, dwheaderslength : u32, dwmodifiers : u32) -> super::super::Foundation:: BOOL); - unsafe { WinHttpAddRequestHeaders(core::mem::transmute(hrequest), core::mem::transmute(lpszheaders.as_ptr()), lpszheaders.len().try_into().unwrap(), dwmodifiers).ok() } + unsafe { WinHttpAddRequestHeaders(hrequest as _, core::mem::transmute(lpszheaders.as_ptr()), lpszheaders.len().try_into().unwrap(), dwmodifiers).ok() } } #[inline] pub unsafe fn WinHttpAddRequestHeadersEx(hrequest: *mut core::ffi::c_void, dwmodifiers: u32, ullflags: u64, ullextra: u64, pheaders: &[WINHTTP_EXTENDED_HEADER]) -> u32 { windows_targets::link!("winhttp.dll" "system" fn WinHttpAddRequestHeadersEx(hrequest : *mut core::ffi::c_void, dwmodifiers : u32, ullflags : u64, ullextra : u64, cheaders : u32, pheaders : *const WINHTTP_EXTENDED_HEADER) -> u32); - unsafe { WinHttpAddRequestHeadersEx(core::mem::transmute(hrequest), dwmodifiers, ullflags, ullextra, pheaders.len().try_into().unwrap(), core::mem::transmute(pheaders.as_ptr())) } + unsafe { WinHttpAddRequestHeadersEx(hrequest as _, dwmodifiers, ullflags, ullextra, pheaders.len().try_into().unwrap(), core::mem::transmute(pheaders.as_ptr())) } } #[inline] pub unsafe fn WinHttpCheckPlatform() -> windows_core::Result<()> { @@ -16,7 +16,7 @@ pub unsafe fn WinHttpCheckPlatform() -> windows_core::Result<()> { #[inline] pub unsafe fn WinHttpCloseHandle(hinternet: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("winhttp.dll" "system" fn WinHttpCloseHandle(hinternet : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { WinHttpCloseHandle(core::mem::transmute(hinternet)).ok() } + unsafe { WinHttpCloseHandle(hinternet as _).ok() } } #[inline] pub unsafe fn WinHttpConnect(hsession: *mut core::ffi::c_void, pswzservername: P1, nserverport: u16, dwreserved: u32) -> *mut core::ffi::c_void @@ -24,37 +24,37 @@ where P1: windows_core::Param, { windows_targets::link!("winhttp.dll" "system" fn WinHttpConnect(hsession : *mut core::ffi::c_void, pswzservername : windows_core::PCWSTR, nserverport : u16, dwreserved : u32) -> *mut core::ffi::c_void); - unsafe { WinHttpConnect(core::mem::transmute(hsession), pswzservername.param().abi(), nserverport, dwreserved) } + unsafe { WinHttpConnect(hsession as _, pswzservername.param().abi(), nserverport, dwreserved) } } #[inline] pub unsafe fn WinHttpCrackUrl(pwszurl: &[u16], dwflags: u32, lpurlcomponents: *mut URL_COMPONENTS) -> windows_core::Result<()> { windows_targets::link!("winhttp.dll" "system" fn WinHttpCrackUrl(pwszurl : windows_core::PCWSTR, dwurllength : u32, dwflags : u32, lpurlcomponents : *mut URL_COMPONENTS) -> super::super::Foundation:: BOOL); - unsafe { WinHttpCrackUrl(core::mem::transmute(pwszurl.as_ptr()), pwszurl.len().try_into().unwrap(), dwflags, core::mem::transmute(lpurlcomponents)).ok() } + unsafe { WinHttpCrackUrl(core::mem::transmute(pwszurl.as_ptr()), pwszurl.len().try_into().unwrap(), dwflags, lpurlcomponents as _).ok() } } #[inline] pub unsafe fn WinHttpCreateProxyResolver(hsession: *const core::ffi::c_void, phresolver: *mut *mut core::ffi::c_void) -> u32 { windows_targets::link!("winhttp.dll" "system" fn WinHttpCreateProxyResolver(hsession : *const core::ffi::c_void, phresolver : *mut *mut core::ffi::c_void) -> u32); - unsafe { WinHttpCreateProxyResolver(hsession, core::mem::transmute(phresolver)) } + unsafe { WinHttpCreateProxyResolver(hsession, phresolver as _) } } #[inline] 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); - unsafe { WinHttpCreateUrl(lpurlcomponents, dwflags, core::mem::transmute(pwszurl.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwurllength)).ok() } + unsafe { WinHttpCreateUrl(lpurlcomponents, dwflags, pwszurl.unwrap_or(core::mem::zeroed()) as _, pdwurllength as _).ok() } } #[inline] pub unsafe fn WinHttpDetectAutoProxyConfigUrl(dwautodetectflags: u32, ppwstrautoconfigurl: *mut windows_core::PWSTR) -> windows_core::Result<()> { windows_targets::link!("winhttp.dll" "system" fn WinHttpDetectAutoProxyConfigUrl(dwautodetectflags : u32, ppwstrautoconfigurl : *mut windows_core::PWSTR) -> super::super::Foundation:: BOOL); - unsafe { WinHttpDetectAutoProxyConfigUrl(dwautodetectflags, core::mem::transmute(ppwstrautoconfigurl)).ok() } + unsafe { WinHttpDetectAutoProxyConfigUrl(dwautodetectflags, ppwstrautoconfigurl as _).ok() } } #[inline] pub unsafe fn WinHttpFreeProxyResult(pproxyresult: *mut WINHTTP_PROXY_RESULT) { windows_targets::link!("winhttp.dll" "system" fn WinHttpFreeProxyResult(pproxyresult : *mut WINHTTP_PROXY_RESULT)); - unsafe { WinHttpFreeProxyResult(core::mem::transmute(pproxyresult)) } + unsafe { WinHttpFreeProxyResult(pproxyresult as _) } } #[inline] pub unsafe fn WinHttpFreeProxyResultEx(pproxyresultex: *mut WINHTTP_PROXY_RESULT_EX) { windows_targets::link!("winhttp.dll" "system" fn WinHttpFreeProxyResultEx(pproxyresultex : *mut WINHTTP_PROXY_RESULT_EX)); - unsafe { WinHttpFreeProxyResultEx(core::mem::transmute(pproxyresultex)) } + unsafe { WinHttpFreeProxyResultEx(pproxyresultex as _) } } #[inline] pub unsafe fn WinHttpFreeProxySettings(pwinhttpproxysettings: *const WINHTTP_PROXY_SETTINGS) { @@ -69,17 +69,17 @@ pub unsafe fn WinHttpFreeProxySettingsEx(proxysettingstype: WINHTTP_PROXY_SETTIN #[inline] pub unsafe fn WinHttpFreeQueryConnectionGroupResult(presult: *mut WINHTTP_QUERY_CONNECTION_GROUP_RESULT) { windows_targets::link!("winhttp.dll" "system" fn WinHttpFreeQueryConnectionGroupResult(presult : *mut WINHTTP_QUERY_CONNECTION_GROUP_RESULT)); - unsafe { WinHttpFreeQueryConnectionGroupResult(core::mem::transmute(presult)) } + unsafe { WinHttpFreeQueryConnectionGroupResult(presult as _) } } #[inline] pub unsafe fn WinHttpGetDefaultProxyConfiguration(pproxyinfo: *mut WINHTTP_PROXY_INFO) -> windows_core::Result<()> { windows_targets::link!("winhttp.dll" "system" fn WinHttpGetDefaultProxyConfiguration(pproxyinfo : *mut WINHTTP_PROXY_INFO) -> super::super::Foundation:: BOOL); - unsafe { WinHttpGetDefaultProxyConfiguration(core::mem::transmute(pproxyinfo)).ok() } + unsafe { WinHttpGetDefaultProxyConfiguration(pproxyinfo as _).ok() } } #[inline] pub unsafe fn WinHttpGetIEProxyConfigForCurrentUser(pproxyconfig: *mut WINHTTP_CURRENT_USER_IE_PROXY_CONFIG) -> windows_core::Result<()> { windows_targets::link!("winhttp.dll" "system" fn WinHttpGetIEProxyConfigForCurrentUser(pproxyconfig : *mut WINHTTP_CURRENT_USER_IE_PROXY_CONFIG) -> super::super::Foundation:: BOOL); - unsafe { WinHttpGetIEProxyConfigForCurrentUser(core::mem::transmute(pproxyconfig)).ok() } + unsafe { WinHttpGetIEProxyConfigForCurrentUser(pproxyconfig as _).ok() } } #[inline] pub unsafe fn WinHttpGetProxyForUrl(hsession: *mut core::ffi::c_void, lpcwszurl: P1, pautoproxyoptions: *mut WINHTTP_AUTOPROXY_OPTIONS, pproxyinfo: *mut WINHTTP_PROXY_INFO) -> windows_core::Result<()> @@ -87,7 +87,7 @@ where P1: windows_core::Param, { windows_targets::link!("winhttp.dll" "system" fn WinHttpGetProxyForUrl(hsession : *mut core::ffi::c_void, lpcwszurl : windows_core::PCWSTR, pautoproxyoptions : *mut WINHTTP_AUTOPROXY_OPTIONS, pproxyinfo : *mut WINHTTP_PROXY_INFO) -> super::super::Foundation:: BOOL); - unsafe { WinHttpGetProxyForUrl(core::mem::transmute(hsession), lpcwszurl.param().abi(), core::mem::transmute(pautoproxyoptions), core::mem::transmute(pproxyinfo)).ok() } + unsafe { WinHttpGetProxyForUrl(hsession as _, lpcwszurl.param().abi(), pautoproxyoptions as _, pproxyinfo as _).ok() } } #[inline] pub unsafe fn WinHttpGetProxyForUrlEx(hresolver: *const core::ffi::c_void, pcwszurl: P1, pautoproxyoptions: *const WINHTTP_AUTOPROXY_OPTIONS, pcontext: Option) -> u32 @@ -95,7 +95,7 @@ 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); - unsafe { WinHttpGetProxyForUrlEx(hresolver, pcwszurl.param().abi(), pautoproxyoptions, core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { WinHttpGetProxyForUrlEx(hresolver, pcwszurl.param().abi(), pautoproxyoptions, pcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn WinHttpGetProxyForUrlEx2(hresolver: *const core::ffi::c_void, pcwszurl: P1, pautoproxyoptions: *const WINHTTP_AUTOPROXY_OPTIONS, pinterfaceselectioncontext: Option<&[u8]>, pcontext: Option) -> u32 @@ -103,32 +103,32 @@ 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); - unsafe { WinHttpGetProxyForUrlEx2(hresolver, pcwszurl.param().abi(), 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()))) } + unsafe { WinHttpGetProxyForUrlEx2(hresolver, pcwszurl.param().abi(), 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())), pcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn WinHttpGetProxyResult(hresolver: *const core::ffi::c_void, pproxyresult: *mut WINHTTP_PROXY_RESULT) -> u32 { windows_targets::link!("winhttp.dll" "system" fn WinHttpGetProxyResult(hresolver : *const core::ffi::c_void, pproxyresult : *mut WINHTTP_PROXY_RESULT) -> u32); - unsafe { WinHttpGetProxyResult(hresolver, core::mem::transmute(pproxyresult)) } + unsafe { WinHttpGetProxyResult(hresolver, pproxyresult as _) } } #[inline] pub unsafe fn WinHttpGetProxyResultEx(hresolver: *const core::ffi::c_void, pproxyresultex: *mut WINHTTP_PROXY_RESULT_EX) -> u32 { windows_targets::link!("winhttp.dll" "system" fn WinHttpGetProxyResultEx(hresolver : *const core::ffi::c_void, pproxyresultex : *mut WINHTTP_PROXY_RESULT_EX) -> u32); - unsafe { WinHttpGetProxyResultEx(hresolver, core::mem::transmute(pproxyresultex)) } + unsafe { WinHttpGetProxyResultEx(hresolver, pproxyresultex as _) } } #[inline] 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); - unsafe { WinHttpGetProxySettingsEx(hresolver, proxysettingstype, core::mem::transmute(pproxysettingsparam.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { WinHttpGetProxySettingsEx(hresolver, proxysettingstype, pproxysettingsparam.unwrap_or(core::mem::zeroed()) as _, pcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn WinHttpGetProxySettingsResultEx(hresolver: *const core::ffi::c_void, pproxysettingsex: *mut core::ffi::c_void) -> u32 { windows_targets::link!("winhttp.dll" "system" fn WinHttpGetProxySettingsResultEx(hresolver : *const core::ffi::c_void, pproxysettingsex : *mut core::ffi::c_void) -> u32); - unsafe { WinHttpGetProxySettingsResultEx(hresolver, core::mem::transmute(pproxysettingsex)) } + unsafe { WinHttpGetProxySettingsResultEx(hresolver, pproxysettingsex as _) } } #[inline] pub unsafe fn WinHttpGetProxySettingsVersion(hsession: *const core::ffi::c_void, pdwproxysettingsversion: *mut u32) -> u32 { windows_targets::link!("winhttp.dll" "system" fn WinHttpGetProxySettingsVersion(hsession : *const core::ffi::c_void, pdwproxysettingsversion : *mut u32) -> u32); - unsafe { WinHttpGetProxySettingsVersion(hsession, core::mem::transmute(pdwproxysettingsversion)) } + unsafe { WinHttpGetProxySettingsVersion(hsession, pdwproxysettingsversion as _) } } #[inline] pub unsafe fn WinHttpOpen(pszagentw: P0, dwaccesstype: WINHTTP_ACCESS_TYPE, pszproxyw: P2, pszproxybypassw: P3, dwflags: u32) -> *mut core::ffi::c_void @@ -149,22 +149,22 @@ where P4: windows_core::Param, { windows_targets::link!("winhttp.dll" "system" fn WinHttpOpenRequest(hconnect : *mut core::ffi::c_void, pwszverb : windows_core::PCWSTR, pwszobjectname : windows_core::PCWSTR, pwszversion : windows_core::PCWSTR, pwszreferrer : windows_core::PCWSTR, ppwszaccepttypes : *const windows_core::PCWSTR, dwflags : WINHTTP_OPEN_REQUEST_FLAGS) -> *mut core::ffi::c_void); - unsafe { WinHttpOpenRequest(core::mem::transmute(hconnect), pwszverb.param().abi(), pwszobjectname.param().abi(), pwszversion.param().abi(), pwszreferrer.param().abi(), ppwszaccepttypes, dwflags) } + unsafe { WinHttpOpenRequest(hconnect as _, pwszverb.param().abi(), pwszobjectname.param().abi(), pwszversion.param().abi(), pwszreferrer.param().abi(), ppwszaccepttypes, dwflags) } } #[inline] pub unsafe fn WinHttpQueryAuthSchemes(hrequest: *mut core::ffi::c_void, lpdwsupportedschemes: *mut u32, lpdwfirstscheme: *mut u32, pdwauthtarget: *mut u32) -> windows_core::Result<()> { windows_targets::link!("winhttp.dll" "system" fn WinHttpQueryAuthSchemes(hrequest : *mut core::ffi::c_void, lpdwsupportedschemes : *mut u32, lpdwfirstscheme : *mut u32, pdwauthtarget : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { WinHttpQueryAuthSchemes(core::mem::transmute(hrequest), core::mem::transmute(lpdwsupportedschemes), core::mem::transmute(lpdwfirstscheme), core::mem::transmute(pdwauthtarget)).ok() } + unsafe { WinHttpQueryAuthSchemes(hrequest as _, lpdwsupportedschemes as _, lpdwfirstscheme as _, pdwauthtarget as _).ok() } } #[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); - unsafe { WinHttpQueryConnectionGroup(hinternet, core::mem::transmute(pguidconnection.unwrap_or(core::mem::zeroed())), ullflags, core::mem::transmute(ppresult)) } + unsafe { WinHttpQueryConnectionGroup(hinternet, pguidconnection.unwrap_or(core::mem::zeroed()) as _, ullflags, ppresult as _) } } #[inline] pub unsafe fn WinHttpQueryDataAvailable(hrequest: *mut core::ffi::c_void, lpdwnumberofbytesavailable: *mut u32) -> windows_core::Result<()> { windows_targets::link!("winhttp.dll" "system" fn WinHttpQueryDataAvailable(hrequest : *mut core::ffi::c_void, lpdwnumberofbytesavailable : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { WinHttpQueryDataAvailable(core::mem::transmute(hrequest), core::mem::transmute(lpdwnumberofbytesavailable)).ok() } + unsafe { WinHttpQueryDataAvailable(hrequest as _, lpdwnumberofbytesavailable as _).ok() } } #[inline] pub unsafe fn WinHttpQueryHeaders(hrequest: *mut core::ffi::c_void, dwinfolevel: u32, pwszname: P2, lpbuffer: Option<*mut core::ffi::c_void>, lpdwbufferlength: *mut u32, lpdwindex: *mut u32) -> windows_core::Result<()> @@ -172,27 +172,27 @@ 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); - unsafe { WinHttpQueryHeaders(core::mem::transmute(hrequest), dwinfolevel, pwszname.param().abi(), core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwbufferlength), core::mem::transmute(lpdwindex)).ok() } + unsafe { WinHttpQueryHeaders(hrequest as _, dwinfolevel, pwszname.param().abi(), lpbuffer.unwrap_or(core::mem::zeroed()) as _, lpdwbufferlength as _, lpdwindex as _).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); - unsafe { WinHttpQueryHeadersEx(hrequest, dwinfolevel, ullflags, 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)) } + unsafe { WinHttpQueryHeadersEx(hrequest, dwinfolevel, ullflags, uicodepage, pdwindex.unwrap_or(core::mem::zeroed()) as _, pheadername.unwrap_or(core::mem::zeroed()) as _, pbuffer.unwrap_or(core::mem::zeroed()) as _, pdwbufferlength as _, ppheaders.unwrap_or(core::mem::zeroed()) as _, pdwheaderscount as _) } } #[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); - unsafe { WinHttpQueryOption(core::mem::transmute(hinternet), dwoption, core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwbufferlength)).ok() } + unsafe { WinHttpQueryOption(hinternet as _, dwoption, lpbuffer.unwrap_or(core::mem::zeroed()) as _, lpdwbufferlength as _).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<()> { windows_targets::link!("winhttp.dll" "system" fn WinHttpReadData(hrequest : *mut core::ffi::c_void, lpbuffer : *mut core::ffi::c_void, dwnumberofbytestoread : u32, lpdwnumberofbytesread : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { WinHttpReadData(core::mem::transmute(hrequest), core::mem::transmute(lpbuffer), dwnumberofbytestoread, core::mem::transmute(lpdwnumberofbytesread)).ok() } + unsafe { WinHttpReadData(hrequest as _, lpbuffer as _, dwnumberofbytestoread, lpdwnumberofbytesread as _).ok() } } #[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); - unsafe { WinHttpReadDataEx(core::mem::transmute(hrequest), core::mem::transmute(lpbuffer), dwnumberofbytestoread, core::mem::transmute(lpdwnumberofbytesread), ullflags, cbproperty, core::mem::transmute(pvproperty.unwrap_or(core::mem::zeroed()))) } + unsafe { WinHttpReadDataEx(hrequest as _, lpbuffer as _, dwnumberofbytestoread, lpdwnumberofbytesread as _, ullflags, cbproperty, pvproperty.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn WinHttpReadProxySettings(hsession: *const core::ffi::c_void, pcwszconnectionname: P1, ffallbacktodefaultsettings: bool, fsetautodiscoverfordefaultsettings: bool, pdwsettingsversion: *mut u32, pfdefaultsettingsarereturned: *mut super::super::Foundation::BOOL, pwinhttpproxysettings: *mut WINHTTP_PROXY_SETTINGS) -> u32 @@ -200,17 +200,17 @@ where P1: windows_core::Param, { windows_targets::link!("winhttp.dll" "system" fn WinHttpReadProxySettings(hsession : *const core::ffi::c_void, pcwszconnectionname : windows_core::PCWSTR, ffallbacktodefaultsettings : super::super::Foundation:: BOOL, fsetautodiscoverfordefaultsettings : super::super::Foundation:: BOOL, pdwsettingsversion : *mut u32, pfdefaultsettingsarereturned : *mut super::super::Foundation:: BOOL, pwinhttpproxysettings : *mut WINHTTP_PROXY_SETTINGS) -> u32); - unsafe { WinHttpReadProxySettings(hsession, pcwszconnectionname.param().abi(), ffallbacktodefaultsettings.into(), fsetautodiscoverfordefaultsettings.into(), core::mem::transmute(pdwsettingsversion), core::mem::transmute(pfdefaultsettingsarereturned), core::mem::transmute(pwinhttpproxysettings)) } + unsafe { WinHttpReadProxySettings(hsession, pcwszconnectionname.param().abi(), ffallbacktodefaultsettings.into(), fsetautodiscoverfordefaultsettings.into(), pdwsettingsversion as _, pfdefaultsettingsarereturned as _, pwinhttpproxysettings as _) } } #[inline] pub unsafe fn WinHttpReceiveResponse(hrequest: *mut core::ffi::c_void, lpreserved: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("winhttp.dll" "system" fn WinHttpReceiveResponse(hrequest : *mut core::ffi::c_void, lpreserved : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { WinHttpReceiveResponse(core::mem::transmute(hrequest), core::mem::transmute(lpreserved)).ok() } + unsafe { WinHttpReceiveResponse(hrequest as _, lpreserved as _).ok() } } #[inline] pub unsafe fn WinHttpRegisterProxyChangeNotification(ullflags: u64, pfncallback: WINHTTP_PROXY_CHANGE_CALLBACK, pvcontext: *const core::ffi::c_void, hregistration: *mut *mut core::ffi::c_void) -> u32 { windows_targets::link!("winhttp.dll" "system" fn WinHttpRegisterProxyChangeNotification(ullflags : u64, pfncallback : WINHTTP_PROXY_CHANGE_CALLBACK, pvcontext : *const core::ffi::c_void, hregistration : *mut *mut core::ffi::c_void) -> u32); - unsafe { WinHttpRegisterProxyChangeNotification(ullflags, pfncallback, pvcontext, core::mem::transmute(hregistration)) } + unsafe { WinHttpRegisterProxyChangeNotification(ullflags, pfncallback, pvcontext, hregistration as _) } } #[inline] pub unsafe fn WinHttpResetAutoProxy(hsession: *const core::ffi::c_void, dwflags: u32) -> u32 { @@ -220,7 +220,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); - unsafe { 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())), dwoptionallength, dwtotallength, dwcontext).ok() } + unsafe { WinHttpSendRequest(hrequest as _, 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()), lpoptional.unwrap_or(core::mem::zeroed()) as _, dwoptionallength, dwtotallength, 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<()> @@ -229,17 +229,17 @@ where P4: windows_core::Param, { windows_targets::link!("winhttp.dll" "system" fn WinHttpSetCredentials(hrequest : *mut core::ffi::c_void, authtargets : u32, authscheme : u32, pwszusername : windows_core::PCWSTR, pwszpassword : windows_core::PCWSTR, pauthparams : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { WinHttpSetCredentials(core::mem::transmute(hrequest), authtargets, authscheme, pwszusername.param().abi(), pwszpassword.param().abi(), core::mem::transmute(pauthparams)).ok() } + unsafe { WinHttpSetCredentials(hrequest as _, authtargets, authscheme, pwszusername.param().abi(), pwszpassword.param().abi(), pauthparams as _).ok() } } #[inline] pub unsafe fn WinHttpSetDefaultProxyConfiguration(pproxyinfo: *mut WINHTTP_PROXY_INFO) -> windows_core::Result<()> { windows_targets::link!("winhttp.dll" "system" fn WinHttpSetDefaultProxyConfiguration(pproxyinfo : *mut WINHTTP_PROXY_INFO) -> super::super::Foundation:: BOOL); - unsafe { WinHttpSetDefaultProxyConfiguration(core::mem::transmute(pproxyinfo)).ok() } + unsafe { WinHttpSetDefaultProxyConfiguration(pproxyinfo as _).ok() } } #[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); - unsafe { WinHttpSetOption(core::mem::transmute(hinternet.unwrap_or(core::mem::zeroed())), 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() } + unsafe { WinHttpSetOption(hinternet.unwrap_or(core::mem::zeroed()) as _, 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: bool) -> u32 { @@ -249,12 +249,12 @@ pub unsafe fn WinHttpSetProxySettingsPerUser(fproxysettingsperuser: bool) -> u32 #[inline] pub unsafe fn WinHttpSetStatusCallback(hinternet: *mut core::ffi::c_void, lpfninternetcallback: WINHTTP_STATUS_CALLBACK, dwnotificationflags: u32, dwreserved: usize) -> WINHTTP_STATUS_CALLBACK { windows_targets::link!("winhttp.dll" "system" fn WinHttpSetStatusCallback(hinternet : *mut core::ffi::c_void, lpfninternetcallback : WINHTTP_STATUS_CALLBACK, dwnotificationflags : u32, dwreserved : usize) -> WINHTTP_STATUS_CALLBACK); - unsafe { WinHttpSetStatusCallback(core::mem::transmute(hinternet), lpfninternetcallback, dwnotificationflags, dwreserved) } + unsafe { WinHttpSetStatusCallback(hinternet as _, lpfninternetcallback, dwnotificationflags, dwreserved) } } #[inline] pub unsafe fn WinHttpSetTimeouts(hinternet: *mut core::ffi::c_void, nresolvetimeout: i32, nconnecttimeout: i32, nsendtimeout: i32, nreceivetimeout: i32) -> windows_core::Result<()> { windows_targets::link!("winhttp.dll" "system" fn WinHttpSetTimeouts(hinternet : *mut core::ffi::c_void, nresolvetimeout : i32, nconnecttimeout : i32, nsendtimeout : i32, nreceivetimeout : i32) -> super::super::Foundation:: BOOL); - unsafe { WinHttpSetTimeouts(core::mem::transmute(hinternet), nresolvetimeout, nconnecttimeout, nsendtimeout, nreceivetimeout).ok() } + unsafe { WinHttpSetTimeouts(hinternet as _, nresolvetimeout, nconnecttimeout, nsendtimeout, nreceivetimeout).ok() } } #[inline] pub unsafe fn WinHttpTimeFromSystemTime(pst: *const super::super::Foundation::SYSTEMTIME, pwsztime: &mut [u16; 62]) -> windows_core::Result<()> { @@ -267,7 +267,7 @@ where P0: windows_core::Param, { windows_targets::link!("winhttp.dll" "system" fn WinHttpTimeToSystemTime(pwsztime : windows_core::PCWSTR, pst : *mut super::super::Foundation:: SYSTEMTIME) -> super::super::Foundation:: BOOL); - unsafe { WinHttpTimeToSystemTime(pwsztime.param().abi(), core::mem::transmute(pst)).ok() } + unsafe { WinHttpTimeToSystemTime(pwsztime.param().abi(), pst as _).ok() } } #[inline] pub unsafe fn WinHttpUnregisterProxyChangeNotification(hregistration: *const core::ffi::c_void) -> u32 { @@ -277,22 +277,22 @@ 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); - unsafe { WinHttpWebSocketClose(hwebsocket, usstatus, core::mem::transmute(pvreason.unwrap_or(core::mem::zeroed())), dwreasonlength) } + unsafe { WinHttpWebSocketClose(hwebsocket, usstatus, pvreason.unwrap_or(core::mem::zeroed()) as _, dwreasonlength) } } #[inline] 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); - unsafe { WinHttpWebSocketCompleteUpgrade(hrequest, core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { WinHttpWebSocketCompleteUpgrade(hrequest, pcontext.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { WinHttpWebSocketQueryCloseStatus(hwebsocket, core::mem::transmute(pusstatus), core::mem::transmute(pvreason.unwrap_or(core::mem::zeroed())), dwreasonlength, core::mem::transmute(pdwreasonlengthconsumed)) } + unsafe { WinHttpWebSocketQueryCloseStatus(hwebsocket, pusstatus as _, pvreason.unwrap_or(core::mem::zeroed()) as _, dwreasonlength, pdwreasonlengthconsumed as _) } } #[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 { windows_targets::link!("winhttp.dll" "system" 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); - unsafe { WinHttpWebSocketReceive(hwebsocket, core::mem::transmute(pvbuffer), dwbufferlength, core::mem::transmute(pdwbytesread), core::mem::transmute(pebuffertype)) } + unsafe { WinHttpWebSocketReceive(hwebsocket, pvbuffer as _, dwbufferlength, pdwbytesread as _, pebuffertype as _) } } #[inline] pub unsafe fn WinHttpWebSocketSend(hwebsocket: *const core::ffi::c_void, ebuffertype: WINHTTP_WEB_SOCKET_BUFFER_TYPE, pvbuffer: Option<&[u8]>) -> u32 { @@ -302,12 +302,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); - unsafe { WinHttpWebSocketShutdown(hwebsocket, usstatus, core::mem::transmute(pvreason.unwrap_or(core::mem::zeroed())), dwreasonlength) } + unsafe { WinHttpWebSocketShutdown(hwebsocket, usstatus, pvreason.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { WinHttpWriteData(core::mem::transmute(hrequest), core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), dwnumberofbytestowrite, core::mem::transmute(lpdwnumberofbyteswritten)).ok() } + unsafe { WinHttpWriteData(hrequest as _, lpbuffer.unwrap_or(core::mem::zeroed()) as _, dwnumberofbytestowrite, lpdwnumberofbyteswritten as _).ok() } } #[inline] pub unsafe fn WinHttpWriteProxySettings(hsession: *const core::ffi::c_void, fforceupdate: bool, 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 fbce6292b7..6c199cb2fd 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/WinInet/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/WinInet/mod.rs @@ -5,7 +5,7 @@ where P1: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn AppCacheCheckManifest(pwszmasterurl : windows_core::PCWSTR, pwszmanifesturl : windows_core::PCWSTR, pbmanifestdata : *const u8, dwmanifestdatasize : u32, pbmanifestresponseheaders : *const u8, dwmanifestresponseheaderssize : u32, pestate : *mut APP_CACHE_STATE, phnewappcache : *mut *mut core::ffi::c_void) -> u32); - unsafe { AppCacheCheckManifest(pwszmasterurl.param().abi(), pwszmanifesturl.param().abi(), core::mem::transmute(pbmanifestdata.as_ptr()), pbmanifestdata.len().try_into().unwrap(), core::mem::transmute(pbmanifestresponseheaders.as_ptr()), pbmanifestresponseheaders.len().try_into().unwrap(), core::mem::transmute(pestate), core::mem::transmute(phnewappcache)) } + unsafe { AppCacheCheckManifest(pwszmasterurl.param().abi(), pwszmanifesturl.param().abi(), core::mem::transmute(pbmanifestdata.as_ptr()), pbmanifestdata.len().try_into().unwrap(), core::mem::transmute(pbmanifestresponseheaders.as_ptr()), pbmanifestresponseheaders.len().try_into().unwrap(), pestate as _, phnewappcache as _) } } #[inline] pub unsafe fn AppCacheCloseHandle(happcache: *const core::ffi::c_void) { @@ -40,22 +40,22 @@ where #[inline] pub unsafe fn AppCacheDuplicateHandle(happcache: *const core::ffi::c_void, phduplicatedappcache: *mut *mut core::ffi::c_void) -> u32 { windows_targets::link!("wininet.dll" "system" fn AppCacheDuplicateHandle(happcache : *const core::ffi::c_void, phduplicatedappcache : *mut *mut core::ffi::c_void) -> u32); - unsafe { AppCacheDuplicateHandle(happcache, core::mem::transmute(phduplicatedappcache)) } + unsafe { AppCacheDuplicateHandle(happcache, phduplicatedappcache as _) } } #[inline] pub unsafe fn AppCacheFinalize(happcache: *const core::ffi::c_void, pbmanifestdata: &[u8], pestate: *mut APP_CACHE_FINALIZE_STATE) -> u32 { windows_targets::link!("wininet.dll" "system" fn AppCacheFinalize(happcache : *const core::ffi::c_void, pbmanifestdata : *const u8, dwmanifestdatasize : u32, pestate : *mut APP_CACHE_FINALIZE_STATE) -> u32); - unsafe { AppCacheFinalize(happcache, core::mem::transmute(pbmanifestdata.as_ptr()), pbmanifestdata.len().try_into().unwrap(), core::mem::transmute(pestate)) } + unsafe { AppCacheFinalize(happcache, core::mem::transmute(pbmanifestdata.as_ptr()), pbmanifestdata.len().try_into().unwrap(), pestate as _) } } #[inline] pub unsafe fn AppCacheFreeDownloadList(pdownloadlist: *mut APP_CACHE_DOWNLOAD_LIST) { windows_targets::link!("wininet.dll" "system" fn AppCacheFreeDownloadList(pdownloadlist : *mut APP_CACHE_DOWNLOAD_LIST)); - unsafe { AppCacheFreeDownloadList(core::mem::transmute(pdownloadlist)) } + unsafe { AppCacheFreeDownloadList(pdownloadlist as _) } } #[inline] pub unsafe fn AppCacheFreeGroupList(pappcachegrouplist: *mut APP_CACHE_GROUP_LIST) { windows_targets::link!("wininet.dll" "system" fn AppCacheFreeGroupList(pappcachegrouplist : *mut APP_CACHE_GROUP_LIST)); - unsafe { AppCacheFreeGroupList(core::mem::transmute(pappcachegrouplist)) } + unsafe { AppCacheFreeGroupList(pappcachegrouplist as _) } } #[inline] pub unsafe fn AppCacheFreeIESpace(ftcutoff: super::super::Foundation::FILETIME) -> u32 { @@ -70,7 +70,7 @@ pub unsafe fn AppCacheFreeSpace(ftcutoff: super::super::Foundation::FILETIME) -> #[inline] pub unsafe fn AppCacheGetDownloadList(happcache: *const core::ffi::c_void, pdownloadlist: *mut APP_CACHE_DOWNLOAD_LIST) -> u32 { windows_targets::link!("wininet.dll" "system" fn AppCacheGetDownloadList(happcache : *const core::ffi::c_void, pdownloadlist : *mut APP_CACHE_DOWNLOAD_LIST) -> u32); - unsafe { AppCacheGetDownloadList(happcache, core::mem::transmute(pdownloadlist)) } + unsafe { AppCacheGetDownloadList(happcache, pdownloadlist as _) } } #[inline] pub unsafe fn AppCacheGetFallbackUrl(happcache: *const core::ffi::c_void, pwszurl: P1, ppwszfallbackurl: *mut windows_core::PWSTR) -> u32 @@ -78,27 +78,27 @@ where P1: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn AppCacheGetFallbackUrl(happcache : *const core::ffi::c_void, pwszurl : windows_core::PCWSTR, ppwszfallbackurl : *mut windows_core::PWSTR) -> u32); - unsafe { AppCacheGetFallbackUrl(happcache, pwszurl.param().abi(), core::mem::transmute(ppwszfallbackurl)) } + unsafe { AppCacheGetFallbackUrl(happcache, pwszurl.param().abi(), ppwszfallbackurl as _) } } #[inline] pub unsafe fn AppCacheGetGroupList(pappcachegrouplist: *mut APP_CACHE_GROUP_LIST) -> u32 { windows_targets::link!("wininet.dll" "system" fn AppCacheGetGroupList(pappcachegrouplist : *mut APP_CACHE_GROUP_LIST) -> u32); - unsafe { AppCacheGetGroupList(core::mem::transmute(pappcachegrouplist)) } + unsafe { AppCacheGetGroupList(pappcachegrouplist as _) } } #[inline] pub unsafe fn AppCacheGetIEGroupList(pappcachegrouplist: *mut APP_CACHE_GROUP_LIST) -> u32 { windows_targets::link!("wininet.dll" "system" fn AppCacheGetIEGroupList(pappcachegrouplist : *mut APP_CACHE_GROUP_LIST) -> u32); - unsafe { AppCacheGetIEGroupList(core::mem::transmute(pappcachegrouplist)) } + unsafe { AppCacheGetIEGroupList(pappcachegrouplist as _) } } #[inline] pub unsafe fn AppCacheGetInfo(happcache: *const core::ffi::c_void, pappcacheinfo: *mut APP_CACHE_GROUP_INFO) -> u32 { windows_targets::link!("wininet.dll" "system" fn AppCacheGetInfo(happcache : *const core::ffi::c_void, pappcacheinfo : *mut APP_CACHE_GROUP_INFO) -> u32); - unsafe { AppCacheGetInfo(happcache, core::mem::transmute(pappcacheinfo)) } + unsafe { AppCacheGetInfo(happcache, pappcacheinfo as _) } } #[inline] pub unsafe fn AppCacheGetManifestUrl(happcache: *const core::ffi::c_void, ppwszmanifesturl: *mut windows_core::PWSTR) -> u32 { windows_targets::link!("wininet.dll" "system" fn AppCacheGetManifestUrl(happcache : *const core::ffi::c_void, ppwszmanifesturl : *mut windows_core::PWSTR) -> u32); - unsafe { AppCacheGetManifestUrl(happcache, core::mem::transmute(ppwszmanifesturl)) } + unsafe { AppCacheGetManifestUrl(happcache, ppwszmanifesturl as _) } } #[inline] pub unsafe fn AppCacheLookup(pwszurl: P0, dwflags: u32, phappcache: *mut *mut core::ffi::c_void) -> u32 @@ -106,7 +106,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn AppCacheLookup(pwszurl : windows_core::PCWSTR, dwflags : u32, phappcache : *mut *mut core::ffi::c_void) -> u32); - unsafe { AppCacheLookup(pwszurl.param().abi(), dwflags, core::mem::transmute(phappcache)) } + unsafe { AppCacheLookup(pwszurl.param().abi(), dwflags, phappcache as _) } } #[inline] pub unsafe fn CommitUrlCacheEntryA(lpszurlname: P0, lpszlocalfilename: P1, expiretime: super::super::Foundation::FILETIME, lastmodifiedtime: super::super::Foundation::FILETIME, cacheentrytype: u32, lpheaderinfo: Option<&[u8]>, lpszfileextension: P7, lpszoriginalurl: P8) -> windows_core::Result<()> @@ -146,7 +146,7 @@ where P2: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn CreateMD5SSOHash(pszchallengeinfo : windows_core::PCWSTR, pwszrealm : windows_core::PCWSTR, pwsztarget : windows_core::PCWSTR, pbhexhash : *mut u8) -> super::super::Foundation:: BOOL); - unsafe { CreateMD5SSOHash(pszchallengeinfo.param().abi(), pwszrealm.param().abi(), pwsztarget.param().abi(), core::mem::transmute(pbhexhash)) } + unsafe { CreateMD5SSOHash(pszchallengeinfo.param().abi(), pwszrealm.param().abi(), pwsztarget.param().abi(), pbhexhash as _) } } #[inline] pub unsafe fn CreateUrlCacheContainerA(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<()> @@ -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); - unsafe { CreateUrlCacheContainerA(name.param().abi(), lpcacheprefix.param().abi(), lpszcachepath.param().abi(), kbcachelimit, dwcontainertype, dwoptions, core::mem::transmute(pvbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbbuffer.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CreateUrlCacheContainerA(name.param().abi(), lpcacheprefix.param().abi(), lpszcachepath.param().abi(), kbcachelimit, dwcontainertype, dwoptions, pvbuffer.unwrap_or(core::mem::zeroed()) as _, cbbuffer.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { CreateUrlCacheContainerW(name.param().abi(), lpcacheprefix.param().abi(), lpszcachepath.param().abi(), kbcachelimit, dwcontainertype, dwoptions, core::mem::transmute(pvbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbbuffer.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CreateUrlCacheContainerW(name.param().abi(), lpcacheprefix.param().abi(), lpszcachepath.param().abi(), kbcachelimit, dwcontainertype, dwoptions, pvbuffer.unwrap_or(core::mem::zeroed()) as _, cbbuffer.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CreateUrlCacheEntryA(lpszurlname: P0, dwexpectedfilesize: u32, lpszfileextension: P2, lpszfilename: &mut [u8; 260], dwreserved: u32) -> windows_core::Result<()> @@ -198,7 +198,7 @@ where #[inline] pub unsafe fn CreateUrlCacheGroup(dwflags: u32, lpreserved: Option<*const core::ffi::c_void>) -> i64 { windows_targets::link!("wininet.dll" "system" fn CreateUrlCacheGroup(dwflags : u32, lpreserved : *const core::ffi::c_void) -> i64); - unsafe { CreateUrlCacheGroup(dwflags, core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { CreateUrlCacheGroup(dwflags, lpreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn DeleteIE3Cache(hwnd: super::super::Foundation::HWND, hinst: super::super::Foundation::HINSTANCE, lpszcmd: P2, ncmdshow: i32) -> u32 @@ -251,7 +251,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); - unsafe { DeleteUrlCacheGroup(groupid, dwflags, core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DeleteUrlCacheGroup(groupid, dwflags, lpreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn DeleteWpadCacheForNetworks(param0: WPAD_CACHE_DELETE) -> super::super::Foundation::BOOL { @@ -292,12 +292,12 @@ pub unsafe fn FindCloseUrlCache(henumhandle: super::super::Foundation::HANDLE) - #[inline] pub unsafe fn FindFirstUrlCacheContainerA(pdwmodified: *mut u32, lpcontainerinfo: *mut INTERNET_CACHE_CONTAINER_INFOA, lpcbcontainerinfo: *mut u32, dwoptions: u32) -> super::super::Foundation::HANDLE { windows_targets::link!("wininet.dll" "system" fn FindFirstUrlCacheContainerA(pdwmodified : *mut u32, lpcontainerinfo : *mut INTERNET_CACHE_CONTAINER_INFOA, lpcbcontainerinfo : *mut u32, dwoptions : u32) -> super::super::Foundation:: HANDLE); - unsafe { FindFirstUrlCacheContainerA(core::mem::transmute(pdwmodified), core::mem::transmute(lpcontainerinfo), core::mem::transmute(lpcbcontainerinfo), dwoptions) } + unsafe { FindFirstUrlCacheContainerA(pdwmodified as _, lpcontainerinfo as _, lpcbcontainerinfo as _, dwoptions) } } #[inline] pub unsafe fn FindFirstUrlCacheContainerW(pdwmodified: *mut u32, lpcontainerinfo: *mut INTERNET_CACHE_CONTAINER_INFOW, lpcbcontainerinfo: *mut u32, dwoptions: u32) -> super::super::Foundation::HANDLE { windows_targets::link!("wininet.dll" "system" fn FindFirstUrlCacheContainerW(pdwmodified : *mut u32, lpcontainerinfo : *mut INTERNET_CACHE_CONTAINER_INFOW, lpcbcontainerinfo : *mut u32, dwoptions : u32) -> super::super::Foundation:: HANDLE); - unsafe { FindFirstUrlCacheContainerW(core::mem::transmute(pdwmodified), core::mem::transmute(lpcontainerinfo), core::mem::transmute(lpcbcontainerinfo), dwoptions) } + unsafe { FindFirstUrlCacheContainerW(pdwmodified as _, lpcontainerinfo as _, lpcbcontainerinfo as _, dwoptions) } } #[inline] pub unsafe fn FindFirstUrlCacheEntryA(lpszurlsearchpattern: P0, lpfirstcacheentryinfo: Option<*mut INTERNET_CACHE_ENTRY_INFOA>, lpcbcacheentryinfo: *mut u32) -> windows_core::Result @@ -305,7 +305,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__ = unsafe { FindFirstUrlCacheEntryA(lpszurlsearchpattern.param().abi(), core::mem::transmute(lpfirstcacheentryinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbcacheentryinfo)) }; + let result__ = unsafe { FindFirstUrlCacheEntryA(lpszurlsearchpattern.param().abi(), lpfirstcacheentryinfo.unwrap_or(core::mem::zeroed()) as _, lpcbcacheentryinfo as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -314,7 +314,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__ = unsafe { FindFirstUrlCacheEntryExA(lpszurlsearchpattern.param().abi(), dwflags, dwfilter, 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()))) }; + let result__ = unsafe { FindFirstUrlCacheEntryExA(lpszurlsearchpattern.param().abi(), dwflags, dwfilter, groupid, lpfirstcacheentryinfo.unwrap_or(core::mem::zeroed()) as _, lpcbcacheentryinfo as _, lpgroupattributes.unwrap_or(core::mem::zeroed()) as _, lpcbgroupattributes.unwrap_or(core::mem::zeroed()) as _, lpreserved.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -323,7 +323,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__ = unsafe { FindFirstUrlCacheEntryExW(lpszurlsearchpattern.param().abi(), dwflags, dwfilter, 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()))) }; + let result__ = unsafe { FindFirstUrlCacheEntryExW(lpszurlsearchpattern.param().abi(), dwflags, dwfilter, groupid, lpfirstcacheentryinfo.unwrap_or(core::mem::zeroed()) as _, lpcbcacheentryinfo as _, lpgroupattributes.unwrap_or(core::mem::zeroed()) as _, lpcbgroupattributes.unwrap_or(core::mem::zeroed()) as _, lpreserved.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -332,49 +332,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__ = unsafe { FindFirstUrlCacheEntryW(lpszurlsearchpattern.param().abi(), core::mem::transmute(lpfirstcacheentryinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbcacheentryinfo)) }; + let result__ = unsafe { FindFirstUrlCacheEntryW(lpszurlsearchpattern.param().abi(), lpfirstcacheentryinfo.unwrap_or(core::mem::zeroed()) as _, lpcbcacheentryinfo as _) }; (!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: 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__ = unsafe { FindFirstUrlCacheGroup(dwflags, 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()))) }; + let result__ = unsafe { FindFirstUrlCacheGroup(dwflags, dwfilter, lpsearchcondition.unwrap_or(core::mem::zeroed()) as _, dwsearchcondition.unwrap_or(core::mem::zeroed()) as _, lpgroupid as _, lpreserved.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] 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); - unsafe { FindNextUrlCacheContainerA(henumhandle, core::mem::transmute(lpcontainerinfo), core::mem::transmute(lpcbcontainerinfo)) } + unsafe { FindNextUrlCacheContainerA(henumhandle, lpcontainerinfo as _, lpcbcontainerinfo as _) } } #[inline] 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); - unsafe { FindNextUrlCacheContainerW(henumhandle, core::mem::transmute(lpcontainerinfo), core::mem::transmute(lpcbcontainerinfo)) } + unsafe { FindNextUrlCacheContainerW(henumhandle, lpcontainerinfo as _, lpcbcontainerinfo as _) } } #[inline] 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); - unsafe { FindNextUrlCacheEntryA(henumhandle, core::mem::transmute(lpnextcacheentryinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbcacheentryinfo)).ok() } + unsafe { FindNextUrlCacheEntryA(henumhandle, lpnextcacheentryinfo.unwrap_or(core::mem::zeroed()) as _, lpcbcacheentryinfo as _).ok() } } #[inline] 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); - unsafe { FindNextUrlCacheEntryExA(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() } + unsafe { FindNextUrlCacheEntryExA(henumhandle, lpnextcacheentryinfo.unwrap_or(core::mem::zeroed()) as _, lpcbcacheentryinfo as _, lpgroupattributes.unwrap_or(core::mem::zeroed()) as _, lpcbgroupattributes.unwrap_or(core::mem::zeroed()) as _, lpreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { FindNextUrlCacheEntryExW(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() } + unsafe { FindNextUrlCacheEntryExW(henumhandle, lpnextcacheentryinfo.unwrap_or(core::mem::zeroed()) as _, lpcbcacheentryinfo as _, lpgroupattributes.unwrap_or(core::mem::zeroed()) as _, lpcbgroupattributes.unwrap_or(core::mem::zeroed()) as _, lpreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { FindNextUrlCacheEntryW(henumhandle, core::mem::transmute(lpnextcacheentryinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbcacheentryinfo)).ok() } + unsafe { FindNextUrlCacheEntryW(henumhandle, lpnextcacheentryinfo.unwrap_or(core::mem::zeroed()) as _, lpcbcacheentryinfo as _).ok() } } #[inline] 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); - unsafe { FindNextUrlCacheGroup(hfind, core::mem::transmute(lpgroupid), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { FindNextUrlCacheGroup(hfind, lpgroupid as _, lpreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn FindP3PPolicySymbol(pszsymbol: P0) -> i32 @@ -406,7 +406,7 @@ where 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); - unsafe { FtpCommandA(hconnect, fexpectresponse.into(), dwflags, lpszcommand.param().abi(), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(phftpcommand.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { FtpCommandA(hconnect, fexpectresponse.into(), dwflags, lpszcommand.param().abi(), dwcontext.unwrap_or(core::mem::zeroed()) as _, phftpcommand.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn FtpCommandW(hconnect: *const core::ffi::c_void, fexpectresponse: bool, dwflags: FTP_FLAGS, lpszcommand: P3, dwcontext: Option, phftpcommand: Option<*mut *mut core::ffi::c_void>) -> windows_core::Result<()> @@ -414,7 +414,7 @@ where 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); - unsafe { FtpCommandW(hconnect, fexpectresponse.into(), dwflags, lpszcommand.param().abi(), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(phftpcommand.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { FtpCommandW(hconnect, fexpectresponse.into(), dwflags, lpszcommand.param().abi(), dwcontext.unwrap_or(core::mem::zeroed()) as _, phftpcommand.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn FtpCreateDirectoryA(hconnect: *const core::ffi::c_void, lpszdirectory: P1) -> windows_core::Result<()> @@ -455,7 +455,7 @@ 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); - unsafe { FtpFindFirstFileA(hconnect, lpszsearchfile.param().abi(), core::mem::transmute(lpfindfiledata.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { FtpFindFirstFileA(hconnect, lpszsearchfile.param().abi(), lpfindfiledata.unwrap_or(core::mem::zeroed()) as _, dwflags, dwcontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Storage_FileSystem")] #[inline] @@ -464,17 +464,17 @@ 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); - unsafe { FtpFindFirstFileW(hconnect, lpszsearchfile.param().abi(), core::mem::transmute(lpfindfiledata.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { FtpFindFirstFileW(hconnect, lpszsearchfile.param().abi(), lpfindfiledata.unwrap_or(core::mem::zeroed()) as _, dwflags, dwcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FtpGetCurrentDirectoryA(hconnect: *const core::ffi::c_void, lpszcurrentdirectory: windows_core::PSTR, lpdwcurrentdirectory: *mut u32) -> windows_core::Result<()> { windows_targets::link!("wininet.dll" "system" fn FtpGetCurrentDirectoryA(hconnect : *const core::ffi::c_void, lpszcurrentdirectory : windows_core::PSTR, lpdwcurrentdirectory : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { FtpGetCurrentDirectoryA(hconnect, core::mem::transmute(lpszcurrentdirectory), core::mem::transmute(lpdwcurrentdirectory)).ok() } + unsafe { FtpGetCurrentDirectoryA(hconnect, core::mem::transmute(lpszcurrentdirectory), lpdwcurrentdirectory as _).ok() } } #[inline] pub unsafe fn FtpGetCurrentDirectoryW(hconnect: *const core::ffi::c_void, lpszcurrentdirectory: windows_core::PWSTR, lpdwcurrentdirectory: *mut u32) -> windows_core::Result<()> { windows_targets::link!("wininet.dll" "system" fn FtpGetCurrentDirectoryW(hconnect : *const core::ffi::c_void, lpszcurrentdirectory : windows_core::PWSTR, lpdwcurrentdirectory : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { FtpGetCurrentDirectoryW(hconnect, core::mem::transmute(lpszcurrentdirectory), core::mem::transmute(lpdwcurrentdirectory)).ok() } + unsafe { FtpGetCurrentDirectoryW(hconnect, core::mem::transmute(lpszcurrentdirectory), lpdwcurrentdirectory as _).ok() } } #[inline] pub unsafe fn FtpGetFileA(hconnect: *const core::ffi::c_void, lpszremotefile: P1, lpsznewfile: P2, ffailifexists: bool, dwflagsandattributes: u32, dwflags: u32, dwcontext: Option) -> windows_core::Result<()> @@ -483,7 +483,7 @@ where P2: 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); - unsafe { FtpGetFileA(hconnect, lpszremotefile.param().abi(), lpsznewfile.param().abi(), ffailifexists.into(), dwflagsandattributes, dwflags, core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { FtpGetFileA(hconnect, lpszremotefile.param().abi(), lpsznewfile.param().abi(), ffailifexists.into(), dwflagsandattributes, dwflags, dwcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn FtpGetFileEx(hftpsession: *const core::ffi::c_void, lpszremotefile: P1, lpsznewfile: P2, ffailifexists: bool, dwflagsandattributes: u32, dwflags: u32, dwcontext: Option) -> super::super::Foundation::BOOL @@ -492,12 +492,12 @@ where P2: 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); - unsafe { FtpGetFileEx(hftpsession, lpszremotefile.param().abi(), lpsznewfile.param().abi(), ffailifexists.into(), dwflagsandattributes, dwflags, core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { FtpGetFileEx(hftpsession, lpszremotefile.param().abi(), lpsznewfile.param().abi(), ffailifexists.into(), dwflagsandattributes, dwflags, dwcontext.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { FtpGetFileSize(hfile, core::mem::transmute(lpdwfilesizehigh.unwrap_or(core::mem::zeroed()))) } + unsafe { FtpGetFileSize(hfile, lpdwfilesizehigh.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FtpGetFileW(hconnect: *const core::ffi::c_void, lpszremotefile: P1, lpsznewfile: P2, ffailifexists: bool, dwflagsandattributes: u32, dwflags: u32, dwcontext: Option) -> windows_core::Result<()> @@ -506,7 +506,7 @@ where P2: 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); - unsafe { FtpGetFileW(hconnect, lpszremotefile.param().abi(), lpsznewfile.param().abi(), ffailifexists.into(), dwflagsandattributes, dwflags, core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { FtpGetFileW(hconnect, lpszremotefile.param().abi(), lpsznewfile.param().abi(), ffailifexists.into(), dwflagsandattributes, dwflags, dwcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn FtpOpenFileA(hconnect: *const core::ffi::c_void, lpszfilename: P1, dwaccess: u32, dwflags: FTP_FLAGS, dwcontext: Option) -> *mut core::ffi::c_void @@ -514,7 +514,7 @@ 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); - unsafe { FtpOpenFileA(hconnect, lpszfilename.param().abi(), dwaccess, dwflags, core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { FtpOpenFileA(hconnect, lpszfilename.param().abi(), dwaccess, dwflags, dwcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FtpOpenFileW(hconnect: *const core::ffi::c_void, lpszfilename: P1, dwaccess: u32, dwflags: FTP_FLAGS, dwcontext: Option) -> *mut core::ffi::c_void @@ -522,7 +522,7 @@ 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); - unsafe { FtpOpenFileW(hconnect, lpszfilename.param().abi(), dwaccess, dwflags, core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { FtpOpenFileW(hconnect, lpszfilename.param().abi(), dwaccess, dwflags, dwcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FtpPutFileA(hconnect: *const core::ffi::c_void, lpszlocalfile: P1, lpsznewremotefile: P2, dwflags: FTP_FLAGS, dwcontext: Option) -> windows_core::Result<()> @@ -531,7 +531,7 @@ where 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); - unsafe { FtpPutFileA(hconnect, lpszlocalfile.param().abi(), lpsznewremotefile.param().abi(), dwflags, core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { FtpPutFileA(hconnect, lpszlocalfile.param().abi(), lpsznewremotefile.param().abi(), dwflags, dwcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn FtpPutFileEx(hftpsession: *const core::ffi::c_void, lpszlocalfile: P1, lpsznewremotefile: P2, dwflags: u32, dwcontext: Option) -> super::super::Foundation::BOOL @@ -540,7 +540,7 @@ where 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); - unsafe { FtpPutFileEx(hftpsession, lpszlocalfile.param().abi(), lpsznewremotefile.param().abi(), dwflags, core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { FtpPutFileEx(hftpsession, lpszlocalfile.param().abi(), lpsznewremotefile.param().abi(), dwflags, dwcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FtpPutFileW(hconnect: *const core::ffi::c_void, lpszlocalfile: P1, lpsznewremotefile: P2, dwflags: FTP_FLAGS, dwcontext: Option) -> windows_core::Result<()> @@ -549,7 +549,7 @@ where 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); - unsafe { FtpPutFileW(hconnect, lpszlocalfile.param().abi(), lpsznewremotefile.param().abi(), dwflags, core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { FtpPutFileW(hconnect, lpszlocalfile.param().abi(), lpsznewremotefile.param().abi(), dwflags, dwcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn FtpRemoveDirectoryA(hconnect: *const core::ffi::c_void, lpszdirectory: P1) -> windows_core::Result<()> @@ -607,17 +607,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); - unsafe { 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()))) } + unsafe { GetDiskInfoA(pszpath.param().abi(), pdwclustersize.unwrap_or(core::mem::zeroed()) as _, pdlavail.unwrap_or(core::mem::zeroed()) as _, pdltotal.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { GetUrlCacheConfigInfoA(core::mem::transmute(lpcacheconfiginfo), core::mem::transmute(lpcbcacheconfiginfo.unwrap_or(core::mem::zeroed())), dwfieldcontrol).ok() } + unsafe { GetUrlCacheConfigInfoA(lpcacheconfiginfo as _, lpcbcacheconfiginfo.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { GetUrlCacheConfigInfoW(core::mem::transmute(lpcacheconfiginfo), core::mem::transmute(lpcbcacheconfiginfo.unwrap_or(core::mem::zeroed())), dwfieldcontrol).ok() } + unsafe { GetUrlCacheConfigInfoW(lpcacheconfiginfo as _, lpcbcacheconfiginfo.unwrap_or(core::mem::zeroed()) as _, 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 @@ -625,7 +625,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn GetUrlCacheEntryBinaryBlob(pwszurlname : windows_core::PCWSTR, 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); - unsafe { GetUrlCacheEntryBinaryBlob(pwszurlname.param().abi(), core::mem::transmute(dwtype), core::mem::transmute(pftexpiretime), core::mem::transmute(pftaccesstime), core::mem::transmute(pftmodifiedtime), core::mem::transmute(ppbblob), core::mem::transmute(pcbblob)) } + unsafe { GetUrlCacheEntryBinaryBlob(pwszurlname.param().abi(), dwtype as _, pftexpiretime as _, pftaccesstime as _, pftmodifiedtime as _, ppbblob as _, pcbblob as _) } } #[inline] pub unsafe fn GetUrlCacheEntryInfoA(lpszurlname: P0, lpcacheentryinfo: Option<*mut INTERNET_CACHE_ENTRY_INFOA>, lpcbcacheentryinfo: Option<*mut u32>) -> windows_core::Result<()> @@ -633,7 +633,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); - unsafe { GetUrlCacheEntryInfoA(lpszurlname.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbcacheentryinfo.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { GetUrlCacheEntryInfoA(lpszurlname.param().abi(), lpcacheentryinfo.unwrap_or(core::mem::zeroed()) as _, lpcbcacheentryinfo.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -642,7 +642,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); - unsafe { 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())), dwflags).ok() } + unsafe { GetUrlCacheEntryInfoExA(lpszurl.param().abi(), lpcacheentryinfo.unwrap_or(core::mem::zeroed()) as _, lpcbcacheentryinfo.unwrap_or(core::mem::zeroed()) as _, lpszredirecturl.param().abi(), lpcbredirecturl.unwrap_or(core::mem::zeroed()) as _, lpreserved.unwrap_or(core::mem::zeroed()) as _, 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<()> @@ -651,7 +651,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); - unsafe { 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())), dwflags).ok() } + unsafe { GetUrlCacheEntryInfoExW(lpszurl.param().abi(), lpcacheentryinfo.unwrap_or(core::mem::zeroed()) as _, lpcbcacheentryinfo.unwrap_or(core::mem::zeroed()) as _, lpszredirecturl.param().abi(), lpcbredirecturl.unwrap_or(core::mem::zeroed()) as _, lpreserved.unwrap_or(core::mem::zeroed()) as _, dwflags).ok() } } #[inline] pub unsafe fn GetUrlCacheEntryInfoW(lpszurlname: P0, lpcacheentryinfo: Option<*mut INTERNET_CACHE_ENTRY_INFOW>, lpcbcacheentryinfo: Option<*mut u32>) -> windows_core::Result<()> @@ -659,22 +659,22 @@ 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); - unsafe { GetUrlCacheEntryInfoW(lpszurlname.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbcacheentryinfo.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { GetUrlCacheEntryInfoW(lpszurlname.param().abi(), lpcacheentryinfo.unwrap_or(core::mem::zeroed()) as _, lpcbcacheentryinfo.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { GetUrlCacheGroupAttributeA(gid, core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), dwattributes, core::mem::transmute(lpgroupinfo), core::mem::transmute(lpcbgroupinfo), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { GetUrlCacheGroupAttributeA(gid, dwflags.unwrap_or(core::mem::zeroed()) as _, dwattributes, lpgroupinfo as _, lpcbgroupinfo as _, lpreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { GetUrlCacheGroupAttributeW(gid, core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), dwattributes, core::mem::transmute(lpgroupinfo), core::mem::transmute(lpcbgroupinfo), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { GetUrlCacheGroupAttributeW(gid, dwflags.unwrap_or(core::mem::zeroed()) as _, dwattributes, lpgroupinfo as _, lpcbgroupinfo as _, lpreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn GetUrlCacheHeaderData(nidx: u32, lpdwdata: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("wininet.dll" "system" fn GetUrlCacheHeaderData(nidx : u32, lpdwdata : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetUrlCacheHeaderData(nidx, core::mem::transmute(lpdwdata)) } + unsafe { GetUrlCacheHeaderData(nidx, lpdwdata as _) } } #[inline] pub unsafe fn GopherCreateLocatorA(lpszhost: P0, nserverport: u16, lpszdisplaystring: P2, lpszselectorstring: P3, dwgophertype: u32, lpszlocator: Option, lpdwbufferlength: *mut u32) -> windows_core::Result<()> @@ -684,7 +684,7 @@ where 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); - unsafe { GopherCreateLocatorA(lpszhost.param().abi(), nserverport, lpszdisplaystring.param().abi(), lpszselectorstring.param().abi(), dwgophertype, core::mem::transmute(lpszlocator.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwbufferlength)).ok() } + unsafe { GopherCreateLocatorA(lpszhost.param().abi(), nserverport, lpszdisplaystring.param().abi(), lpszselectorstring.param().abi(), dwgophertype, lpszlocator.unwrap_or(core::mem::zeroed()) as _, lpdwbufferlength as _).ok() } } #[inline] pub unsafe fn GopherCreateLocatorW(lpszhost: P0, nserverport: u16, lpszdisplaystring: P2, lpszselectorstring: P3, dwgophertype: u32, lpszlocator: Option, lpdwbufferlength: *mut u32) -> windows_core::Result<()> @@ -694,7 +694,7 @@ where 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); - unsafe { GopherCreateLocatorW(lpszhost.param().abi(), nserverport, lpszdisplaystring.param().abi(), lpszselectorstring.param().abi(), dwgophertype, core::mem::transmute(lpszlocator.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwbufferlength)).ok() } + unsafe { GopherCreateLocatorW(lpszhost.param().abi(), nserverport, lpszdisplaystring.param().abi(), lpszselectorstring.param().abi(), dwgophertype, lpszlocator.unwrap_or(core::mem::zeroed()) as _, lpdwbufferlength as _).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: Option) -> *mut core::ffi::c_void @@ -703,7 +703,7 @@ where 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); - unsafe { GopherFindFirstFileA(hconnect, lpszlocator.param().abi(), lpszsearchstring.param().abi(), core::mem::transmute(lpfinddata.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { GopherFindFirstFileA(hconnect, lpszlocator.param().abi(), lpszsearchstring.param().abi(), lpfinddata.unwrap_or(core::mem::zeroed()) as _, dwflags, dwcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -712,7 +712,7 @@ where 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); - unsafe { GopherFindFirstFileW(hconnect, lpszlocator.param().abi(), lpszsearchstring.param().abi(), core::mem::transmute(lpfinddata.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { GopherFindFirstFileW(hconnect, lpszlocator.param().abi(), lpszsearchstring.param().abi(), lpfinddata.unwrap_or(core::mem::zeroed()) as _, dwflags, dwcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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<()> @@ -721,7 +721,7 @@ where 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); - unsafe { GopherGetAttributeA(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() } + unsafe { GopherGetAttributeA(hconnect, lpszlocator.param().abi(), lpszattributename.param().abi(), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), lpdwcharactersreturned as _, lpfnenumerator.unwrap_or(core::mem::zeroed()) as _, dwcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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<()> @@ -730,7 +730,7 @@ where 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); - unsafe { GopherGetAttributeW(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() } + unsafe { GopherGetAttributeW(hconnect, lpszlocator.param().abi(), lpszattributename.param().abi(), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), lpdwcharactersreturned as _, lpfnenumerator.unwrap_or(core::mem::zeroed()) as _, dwcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn GopherGetLocatorTypeA(lpszlocator: P0, lpdwgophertype: *mut u32) -> windows_core::Result<()> @@ -738,7 +738,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn GopherGetLocatorTypeA(lpszlocator : windows_core::PCSTR, lpdwgophertype : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GopherGetLocatorTypeA(lpszlocator.param().abi(), core::mem::transmute(lpdwgophertype)).ok() } + unsafe { GopherGetLocatorTypeA(lpszlocator.param().abi(), lpdwgophertype as _).ok() } } #[inline] pub unsafe fn GopherGetLocatorTypeW(lpszlocator: P0, lpdwgophertype: *mut u32) -> windows_core::Result<()> @@ -746,7 +746,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn GopherGetLocatorTypeW(lpszlocator : windows_core::PCWSTR, lpdwgophertype : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GopherGetLocatorTypeW(lpszlocator.param().abi(), core::mem::transmute(lpdwgophertype)).ok() } + unsafe { GopherGetLocatorTypeW(lpszlocator.param().abi(), lpdwgophertype as _).ok() } } #[inline] pub unsafe fn GopherOpenFileA(hconnect: *const core::ffi::c_void, lpszlocator: P1, lpszview: P2, dwflags: u32, dwcontext: Option) -> *mut core::ffi::c_void @@ -755,7 +755,7 @@ where 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); - unsafe { GopherOpenFileA(hconnect, lpszlocator.param().abi(), lpszview.param().abi(), dwflags, core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { GopherOpenFileA(hconnect, lpszlocator.param().abi(), lpszview.param().abi(), dwflags, dwcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GopherOpenFileW(hconnect: *const core::ffi::c_void, lpszlocator: P1, lpszview: P2, dwflags: u32, dwcontext: Option) -> *mut core::ffi::c_void @@ -764,7 +764,7 @@ where 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); - unsafe { GopherOpenFileW(hconnect, lpszlocator.param().abi(), lpszview.param().abi(), dwflags, core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { GopherOpenFileW(hconnect, lpszlocator.param().abi(), lpszview.param().abi(), dwflags, dwcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn HttpAddRequestHeadersA(hrequest: *const core::ffi::c_void, lpszheaders: &[u8], dwmodifiers: HTTP_ADDREQ_FLAG) -> windows_core::Result<()> { @@ -783,7 +783,7 @@ where P1: 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); - unsafe { HttpCheckDavComplianceA(lpszurl.param().abi(), lpszcompliancetoken.param().abi(), core::mem::transmute(lpffound), hwnd, lpvreserved) } + unsafe { HttpCheckDavComplianceA(lpszurl.param().abi(), lpszcompliancetoken.param().abi(), lpffound as _, hwnd, lpvreserved) } } #[inline] 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 @@ -792,7 +792,7 @@ where P1: 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); - unsafe { HttpCheckDavComplianceW(lpszurl.param().abi(), lpszcompliancetoken.param().abi(), core::mem::transmute(lpffound), hwnd, lpvreserved) } + unsafe { HttpCheckDavComplianceW(lpszurl.param().abi(), lpszcompliancetoken.param().abi(), lpffound as _, hwnd, lpvreserved) } } #[inline] pub unsafe fn HttpCloseDependencyHandle(hdependencyhandle: *const core::ffi::c_void) { @@ -802,17 +802,17 @@ pub unsafe fn HttpCloseDependencyHandle(hdependencyhandle: *const core::ffi::c_v #[inline] pub unsafe fn HttpDuplicateDependencyHandle(hdependencyhandle: *const core::ffi::c_void, phduplicateddependencyhandle: *mut *mut core::ffi::c_void) -> u32 { windows_targets::link!("wininet.dll" "system" fn HttpDuplicateDependencyHandle(hdependencyhandle : *const core::ffi::c_void, phduplicateddependencyhandle : *mut *mut core::ffi::c_void) -> u32); - unsafe { HttpDuplicateDependencyHandle(hdependencyhandle, core::mem::transmute(phduplicateddependencyhandle)) } + unsafe { HttpDuplicateDependencyHandle(hdependencyhandle, phduplicateddependencyhandle as _) } } #[inline] 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); - unsafe { HttpEndRequestA(hrequest, core::mem::transmute(lpbuffersout.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HttpEndRequestA(hrequest, lpbuffersout.unwrap_or(core::mem::zeroed()) as _, dwflags, dwcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { HttpEndRequestW(hrequest, core::mem::transmute(lpbuffersout.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HttpEndRequestW(hrequest, lpbuffersout.unwrap_or(core::mem::zeroed()) as _, dwflags, dwcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn HttpGetServerCredentials(pwszurl: P0, ppwszusername: *mut windows_core::PWSTR, ppwszpassword: *mut windows_core::PWSTR) -> u32 @@ -820,7 +820,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn HttpGetServerCredentials(pwszurl : windows_core::PCWSTR, ppwszusername : *mut windows_core::PWSTR, ppwszpassword : *mut windows_core::PWSTR) -> u32); - unsafe { HttpGetServerCredentials(pwszurl.param().abi(), core::mem::transmute(ppwszusername), core::mem::transmute(ppwszpassword)) } + unsafe { HttpGetServerCredentials(pwszurl.param().abi(), ppwszusername as _, ppwszpassword as _) } } #[inline] pub unsafe fn HttpIndicatePageLoadComplete(hdependencyhandle: *const core::ffi::c_void) -> u32 { @@ -833,12 +833,12 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn HttpIsHostHstsEnabled(pcwszurl : windows_core::PCWSTR, pfishsts : *mut super::super::Foundation:: BOOL) -> u32); - unsafe { HttpIsHostHstsEnabled(pcwszurl.param().abi(), core::mem::transmute(pfishsts)) } + unsafe { HttpIsHostHstsEnabled(pcwszurl.param().abi(), pfishsts as _) } } #[inline] pub unsafe fn HttpOpenDependencyHandle(hrequesthandle: *const core::ffi::c_void, fbackground: bool, phdependencyhandle: *mut *mut core::ffi::c_void) -> u32 { windows_targets::link!("wininet.dll" "system" fn HttpOpenDependencyHandle(hrequesthandle : *const core::ffi::c_void, fbackground : super::super::Foundation:: BOOL, phdependencyhandle : *mut *mut core::ffi::c_void) -> u32); - unsafe { HttpOpenDependencyHandle(hrequesthandle, fbackground.into(), core::mem::transmute(phdependencyhandle)) } + unsafe { HttpOpenDependencyHandle(hrequesthandle, fbackground.into(), phdependencyhandle as _) } } #[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: Option) -> *mut core::ffi::c_void @@ -849,7 +849,7 @@ 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); - unsafe { HttpOpenRequestA(hconnect, lpszverb.param().abi(), lpszobjectname.param().abi(), lpszversion.param().abi(), lpszreferrer.param().abi(), core::mem::transmute(lplpszaccepttypes.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { HttpOpenRequestA(hconnect, lpszverb.param().abi(), lpszobjectname.param().abi(), lpszversion.param().abi(), lpszreferrer.param().abi(), lplpszaccepttypes.unwrap_or(core::mem::zeroed()) as _, dwflags, dwcontext.unwrap_or(core::mem::zeroed()) as _) } } #[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: Option) -> *mut core::ffi::c_void @@ -860,7 +860,7 @@ 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); - unsafe { HttpOpenRequestW(hconnect, lpszverb.param().abi(), lpszobjectname.param().abi(), lpszversion.param().abi(), lpszreferrer.param().abi(), core::mem::transmute(lplpszaccepttypes.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { HttpOpenRequestW(hconnect, lpszverb.param().abi(), lpszobjectname.param().abi(), lpszversion.param().abi(), lpszreferrer.param().abi(), lplpszaccepttypes.unwrap_or(core::mem::zeroed()) as _, dwflags, dwcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn HttpPushClose(hwait: HTTP_PUSH_WAIT_HANDLE) { @@ -870,47 +870,47 @@ pub unsafe fn HttpPushClose(hwait: HTTP_PUSH_WAIT_HANDLE) { #[inline] pub unsafe fn HttpPushEnable(hrequest: *const core::ffi::c_void, ptransportsetting: *const HTTP_PUSH_TRANSPORT_SETTING, phwait: *mut HTTP_PUSH_WAIT_HANDLE) -> u32 { windows_targets::link!("wininet.dll" "system" fn HttpPushEnable(hrequest : *const core::ffi::c_void, ptransportsetting : *const HTTP_PUSH_TRANSPORT_SETTING, phwait : *mut HTTP_PUSH_WAIT_HANDLE) -> u32); - unsafe { HttpPushEnable(hrequest, ptransportsetting, core::mem::transmute(phwait)) } + unsafe { HttpPushEnable(hrequest, ptransportsetting, phwait as _) } } #[inline] 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); - unsafe { HttpPushWait(hwait, etype, core::mem::transmute(pnotificationstatus.unwrap_or(core::mem::zeroed()))) } + unsafe { HttpPushWait(hwait, etype, pnotificationstatus.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { HttpQueryInfoA(hrequest, dwinfolevel, core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwbufferlength), core::mem::transmute(lpdwindex.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HttpQueryInfoA(hrequest, dwinfolevel, lpbuffer.unwrap_or(core::mem::zeroed()) as _, lpdwbufferlength as _, lpdwindex.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { HttpQueryInfoW(hrequest, dwinfolevel, core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwbufferlength), core::mem::transmute(lpdwindex.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HttpQueryInfoW(hrequest, dwinfolevel, lpbuffer.unwrap_or(core::mem::zeroed()) as _, lpdwbufferlength as _, lpdwindex.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { HttpSendRequestA(hrequest, core::mem::transmute(lpszheaders.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpszheaders.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpoptional.unwrap_or(core::mem::zeroed())), dwoptionallength).ok() } + unsafe { HttpSendRequestA(hrequest, core::mem::transmute(lpszheaders.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpszheaders.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpoptional.unwrap_or(core::mem::zeroed()) as _, 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: 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); - unsafe { HttpSendRequestExA(hrequest, core::mem::transmute(lpbuffersin.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpbuffersout.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HttpSendRequestExA(hrequest, lpbuffersin.unwrap_or(core::mem::zeroed()) as _, lpbuffersout.unwrap_or(core::mem::zeroed()) as _, dwflags, dwcontext.unwrap_or(core::mem::zeroed()) as _).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: 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); - unsafe { HttpSendRequestExW(hrequest, core::mem::transmute(lpbuffersin.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpbuffersout.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HttpSendRequestExW(hrequest, lpbuffersin.unwrap_or(core::mem::zeroed()) as _, lpbuffersout.unwrap_or(core::mem::zeroed()) as _, dwflags, dwcontext.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { HttpSendRequestW(hrequest, core::mem::transmute(lpszheaders.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpszheaders.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpoptional.unwrap_or(core::mem::zeroed())), dwoptionallength).ok() } + unsafe { HttpSendRequestW(hrequest, core::mem::transmute(lpszheaders.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpszheaders.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpoptional.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { HttpWebSocketClose(hwebsocket, usstatus, core::mem::transmute(pvreason.unwrap_or(core::mem::zeroed())), dwreasonlength) } + unsafe { HttpWebSocketClose(hwebsocket, usstatus, pvreason.unwrap_or(core::mem::zeroed()) as _, dwreasonlength) } } #[inline] pub unsafe fn HttpWebSocketCompleteUpgrade(hrequest: *const core::ffi::c_void, dwcontext: usize) -> *mut core::ffi::c_void { @@ -920,22 +920,22 @@ 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); - unsafe { HttpWebSocketQueryCloseStatus(hwebsocket, core::mem::transmute(pusstatus), core::mem::transmute(pvreason.unwrap_or(core::mem::zeroed())), dwreasonlength, core::mem::transmute(pdwreasonlengthconsumed)) } + unsafe { HttpWebSocketQueryCloseStatus(hwebsocket, pusstatus as _, pvreason.unwrap_or(core::mem::zeroed()) as _, dwreasonlength, pdwreasonlengthconsumed as _) } } #[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 { windows_targets::link!("wininet.dll" "system" 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); - unsafe { HttpWebSocketReceive(hwebsocket, core::mem::transmute(pvbuffer), dwbufferlength, core::mem::transmute(pdwbytesread), core::mem::transmute(pbuffertype)) } + unsafe { HttpWebSocketReceive(hwebsocket, pvbuffer as _, dwbufferlength, pdwbytesread as _, pbuffertype as _) } } #[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); - unsafe { HttpWebSocketSend(hwebsocket, buffertype, core::mem::transmute(pvbuffer.unwrap_or(core::mem::zeroed())), dwbufferlength) } + unsafe { HttpWebSocketSend(hwebsocket, buffertype, pvbuffer.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { HttpWebSocketShutdown(hwebsocket, usstatus, core::mem::transmute(pvreason.unwrap_or(core::mem::zeroed())), dwreasonlength) } + unsafe { HttpWebSocketShutdown(hwebsocket, usstatus, pvreason.unwrap_or(core::mem::zeroed()) as _, dwreasonlength) } } #[inline] pub unsafe fn ImportCookieFileA(szfilename: P0) -> super::super::Foundation::BOOL @@ -956,7 +956,7 @@ where #[inline] pub unsafe fn IncrementUrlCacheHeaderData(nidx: u32, lpdwdata: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("wininet.dll" "system" fn IncrementUrlCacheHeaderData(nidx : u32, lpdwdata : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { IncrementUrlCacheHeaderData(nidx, core::mem::transmute(lpdwdata)) } + unsafe { IncrementUrlCacheHeaderData(nidx, lpdwdata as _) } } #[inline] pub unsafe fn InternalInternetGetCookie(lpszurl: P0, lpszcookiedata: windows_core::PSTR, lpdwdatasize: *mut u32) -> u32 @@ -964,19 +964,19 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternalInternetGetCookie(lpszurl : windows_core::PCSTR, lpszcookiedata : windows_core::PSTR, lpdwdatasize : *mut u32) -> u32); - unsafe { InternalInternetGetCookie(lpszurl.param().abi(), core::mem::transmute(lpszcookiedata), core::mem::transmute(lpdwdatasize)) } + unsafe { InternalInternetGetCookie(lpszurl.param().abi(), core::mem::transmute(lpszcookiedata), lpdwdatasize as _) } } #[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: 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); - unsafe { InternetAlgIdToStringA(ai, core::mem::transmute(lpstr), core::mem::transmute(lpdwstrlength), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { InternetAlgIdToStringA(ai, core::mem::transmute(lpstr), lpdwstrlength as _, dwreserved.unwrap_or(core::mem::zeroed()) as _) } } #[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: 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); - unsafe { InternetAlgIdToStringW(ai, core::mem::transmute(lpstr), core::mem::transmute(lpdwstrlength), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { InternetAlgIdToStringW(ai, core::mem::transmute(lpstr), lpdwstrlength as _, dwreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn InternetAttemptConnect(dwreserved: u32) -> u32 { @@ -986,12 +986,12 @@ pub unsafe fn InternetAttemptConnect(dwreserved: u32) -> u32 { #[inline] 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); - unsafe { InternetAutodial(dwflags, core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { InternetAutodial(dwflags, hwndparent.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn InternetAutodialHangup(dwreserved: Option) -> windows_core::Result<()> { windows_targets::link!("wininet.dll" "system" fn InternetAutodialHangup(dwreserved : u32) -> super::super::Foundation:: BOOL); - unsafe { InternetAutodialHangup(core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { InternetAutodialHangup(dwreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn InternetCanonicalizeUrlA(lpszurl: P0, lpszbuffer: windows_core::PSTR, lpdwbufferlength: *mut u32, dwflags: u32) -> windows_core::Result<()> @@ -999,7 +999,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetCanonicalizeUrlA(lpszurl : windows_core::PCSTR, lpszbuffer : windows_core::PSTR, lpdwbufferlength : *mut u32, dwflags : u32) -> super::super::Foundation:: BOOL); - unsafe { InternetCanonicalizeUrlA(lpszurl.param().abi(), core::mem::transmute(lpszbuffer), core::mem::transmute(lpdwbufferlength), dwflags).ok() } + unsafe { InternetCanonicalizeUrlA(lpszurl.param().abi(), core::mem::transmute(lpszbuffer), lpdwbufferlength as _, dwflags).ok() } } #[inline] pub unsafe fn InternetCanonicalizeUrlW(lpszurl: P0, lpszbuffer: windows_core::PWSTR, lpdwbufferlength: *mut u32, dwflags: u32) -> windows_core::Result<()> @@ -1007,7 +1007,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetCanonicalizeUrlW(lpszurl : windows_core::PCWSTR, lpszbuffer : windows_core::PWSTR, lpdwbufferlength : *mut u32, dwflags : u32) -> super::super::Foundation:: BOOL); - unsafe { InternetCanonicalizeUrlW(lpszurl.param().abi(), core::mem::transmute(lpszbuffer), core::mem::transmute(lpdwbufferlength), dwflags).ok() } + unsafe { InternetCanonicalizeUrlW(lpszurl.param().abi(), core::mem::transmute(lpszbuffer), lpdwbufferlength as _, dwflags).ok() } } #[inline] pub unsafe fn InternetCheckConnectionA(lpszurl: P0, dwflags: u32, dwreserved: u32) -> windows_core::Result<()> @@ -1042,7 +1042,7 @@ where P1: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetCombineUrlA(lpszbaseurl : windows_core::PCSTR, lpszrelativeurl : windows_core::PCSTR, lpszbuffer : windows_core::PSTR, lpdwbufferlength : *mut u32, dwflags : u32) -> super::super::Foundation:: BOOL); - unsafe { InternetCombineUrlA(lpszbaseurl.param().abi(), lpszrelativeurl.param().abi(), core::mem::transmute(lpszbuffer), core::mem::transmute(lpdwbufferlength), dwflags).ok() } + unsafe { InternetCombineUrlA(lpszbaseurl.param().abi(), lpszrelativeurl.param().abi(), core::mem::transmute(lpszbuffer), lpdwbufferlength as _, dwflags).ok() } } #[inline] pub unsafe fn InternetCombineUrlW(lpszbaseurl: P0, lpszrelativeurl: P1, lpszbuffer: windows_core::PWSTR, lpdwbufferlength: *mut u32, dwflags: u32) -> windows_core::Result<()> @@ -1051,7 +1051,7 @@ where P1: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetCombineUrlW(lpszbaseurl : windows_core::PCWSTR, lpszrelativeurl : windows_core::PCWSTR, lpszbuffer : windows_core::PWSTR, lpdwbufferlength : *mut u32, dwflags : u32) -> super::super::Foundation:: BOOL); - unsafe { InternetCombineUrlW(lpszbaseurl.param().abi(), lpszrelativeurl.param().abi(), core::mem::transmute(lpszbuffer), core::mem::transmute(lpdwbufferlength), dwflags).ok() } + unsafe { InternetCombineUrlW(lpszbaseurl.param().abi(), lpszrelativeurl.param().abi(), core::mem::transmute(lpszbuffer), lpdwbufferlength as _, dwflags).ok() } } #[inline] pub unsafe fn InternetConfirmZoneCrossing(hwnd: super::super::Foundation::HWND, szurlprev: P1, szurlnew: P2, bpost: bool) -> u32 @@ -1088,7 +1088,7 @@ where 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); - unsafe { InternetConnectA(hinternet, lpszservername.param().abi(), nserverport, lpszusername.param().abi(), lpszpassword.param().abi(), dwservice, dwflags, core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { InternetConnectA(hinternet, lpszservername.param().abi(), nserverport, lpszusername.param().abi(), lpszpassword.param().abi(), dwservice, dwflags, dwcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -1098,7 +1098,7 @@ where 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); - unsafe { InternetConnectW(hinternet, lpszservername.param().abi(), nserverport, lpszusername.param().abi(), lpszpassword.param().abi(), dwservice, dwflags, core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { InternetConnectW(hinternet, lpszservername.param().abi(), nserverport, lpszusername.param().abi(), lpszpassword.param().abi(), dwservice, dwflags, dwcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn InternetConvertUrlFromWireToWideChar(pcszurl: &[u8], pcwszbaseurl: P2, dwcodepagehost: u32, dwcodepagepath: u32, fencodepathextra: bool, dwcodepageextra: u32, ppwszconvertedurl: *mut windows_core::PWSTR) -> u32 @@ -1106,29 +1106,29 @@ where P2: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetConvertUrlFromWireToWideChar(pcszurl : windows_core::PCSTR, cchurl : u32, pcwszbaseurl : windows_core::PCWSTR, dwcodepagehost : u32, dwcodepagepath : u32, fencodepathextra : super::super::Foundation:: BOOL, dwcodepageextra : u32, ppwszconvertedurl : *mut windows_core::PWSTR) -> u32); - unsafe { InternetConvertUrlFromWireToWideChar(core::mem::transmute(pcszurl.as_ptr()), pcszurl.len().try_into().unwrap(), pcwszbaseurl.param().abi(), dwcodepagehost, dwcodepagepath, fencodepathextra.into(), dwcodepageextra, core::mem::transmute(ppwszconvertedurl)) } + unsafe { InternetConvertUrlFromWireToWideChar(core::mem::transmute(pcszurl.as_ptr()), pcszurl.len().try_into().unwrap(), pcwszbaseurl.param().abi(), dwcodepagehost, dwcodepagepath, fencodepathextra.into(), dwcodepageextra, ppwszconvertedurl as _) } } #[cfg(feature = "Win32_Networking_WinHttp")] #[inline] pub unsafe fn InternetCrackUrlA(lpszurl: &[u8], dwflags: super::WinHttp::WIN_HTTP_CREATE_URL_FLAGS, lpurlcomponents: *mut URL_COMPONENTSA) -> windows_core::Result<()> { windows_targets::link!("wininet.dll" "system" fn InternetCrackUrlA(lpszurl : windows_core::PCSTR, dwurllength : u32, dwflags : super::WinHttp:: WIN_HTTP_CREATE_URL_FLAGS, lpurlcomponents : *mut URL_COMPONENTSA) -> super::super::Foundation:: BOOL); - unsafe { InternetCrackUrlA(core::mem::transmute(lpszurl.as_ptr()), lpszurl.len().try_into().unwrap(), dwflags, core::mem::transmute(lpurlcomponents)).ok() } + unsafe { InternetCrackUrlA(core::mem::transmute(lpszurl.as_ptr()), lpszurl.len().try_into().unwrap(), dwflags, lpurlcomponents as _).ok() } } #[cfg(feature = "Win32_Networking_WinHttp")] #[inline] pub unsafe fn InternetCrackUrlW(lpszurl: &[u16], dwflags: super::WinHttp::WIN_HTTP_CREATE_URL_FLAGS, lpurlcomponents: *mut URL_COMPONENTSW) -> windows_core::Result<()> { windows_targets::link!("wininet.dll" "system" fn InternetCrackUrlW(lpszurl : windows_core::PCWSTR, dwurllength : u32, dwflags : super::WinHttp:: WIN_HTTP_CREATE_URL_FLAGS, lpurlcomponents : *mut URL_COMPONENTSW) -> super::super::Foundation:: BOOL); - unsafe { InternetCrackUrlW(core::mem::transmute(lpszurl.as_ptr()), lpszurl.len().try_into().unwrap(), dwflags, core::mem::transmute(lpurlcomponents)).ok() } + unsafe { InternetCrackUrlW(core::mem::transmute(lpszurl.as_ptr()), lpszurl.len().try_into().unwrap(), dwflags, lpurlcomponents as _).ok() } } #[inline] 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); - unsafe { InternetCreateUrlA(lpurlcomponents, dwflags, core::mem::transmute(lpszurl.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwurllength)).ok() } + unsafe { InternetCreateUrlA(lpurlcomponents, dwflags, lpszurl.unwrap_or(core::mem::zeroed()) as _, lpdwurllength as _).ok() } } #[inline] 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); - unsafe { InternetCreateUrlW(lpurlcomponents, dwflags, core::mem::transmute(lpszurl.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwurllength)).ok() } + unsafe { InternetCreateUrlW(lpurlcomponents, dwflags, lpszurl.unwrap_or(core::mem::zeroed()) as _, lpdwurllength as _).ok() } } #[inline] pub unsafe fn InternetDial(hwndparent: super::super::Foundation::HWND, lpszconnectoid: P1, dwflags: u32, lpdwconnection: *mut u32, dwreserved: u32) -> u32 @@ -1136,7 +1136,7 @@ where 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); - unsafe { InternetDial(hwndparent, lpszconnectoid.param().abi(), dwflags, core::mem::transmute(lpdwconnection), dwreserved) } + unsafe { InternetDial(hwndparent, lpszconnectoid.param().abi(), dwflags, lpdwconnection as _, dwreserved) } } #[inline] pub unsafe fn InternetDialA(hwndparent: super::super::Foundation::HWND, lpszconnectoid: P1, dwflags: u32, lpdwconnection: *mut usize, dwreserved: Option) -> u32 @@ -1144,7 +1144,7 @@ where 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); - unsafe { InternetDialA(hwndparent, lpszconnectoid.param().abi(), dwflags, core::mem::transmute(lpdwconnection), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { InternetDialA(hwndparent, lpszconnectoid.param().abi(), dwflags, lpdwconnection as _, dwreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn InternetDialW(hwndparent: super::super::Foundation::HWND, lpszconnectoid: P1, dwflags: u32, lpdwconnection: *mut usize, dwreserved: Option) -> u32 @@ -1152,67 +1152,67 @@ where 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); - unsafe { InternetDialW(hwndparent, lpszconnectoid.param().abi(), dwflags, core::mem::transmute(lpdwconnection), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { InternetDialW(hwndparent, lpszconnectoid.param().abi(), dwflags, lpdwconnection as _, dwreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn InternetEnumPerSiteCookieDecisionA(pszsitename: windows_core::PSTR, pcsitenamesize: *mut u32, pdwdecision: *mut u32, dwindex: u32) -> super::super::Foundation::BOOL { windows_targets::link!("wininet.dll" "system" fn InternetEnumPerSiteCookieDecisionA(pszsitename : windows_core::PSTR, pcsitenamesize : *mut u32, pdwdecision : *mut u32, dwindex : u32) -> super::super::Foundation:: BOOL); - unsafe { InternetEnumPerSiteCookieDecisionA(core::mem::transmute(pszsitename), core::mem::transmute(pcsitenamesize), core::mem::transmute(pdwdecision), dwindex) } + unsafe { InternetEnumPerSiteCookieDecisionA(core::mem::transmute(pszsitename), pcsitenamesize as _, pdwdecision as _, dwindex) } } #[inline] pub unsafe fn InternetEnumPerSiteCookieDecisionW(pszsitename: windows_core::PWSTR, pcsitenamesize: *mut u32, pdwdecision: *mut u32, dwindex: u32) -> super::super::Foundation::BOOL { windows_targets::link!("wininet.dll" "system" fn InternetEnumPerSiteCookieDecisionW(pszsitename : windows_core::PWSTR, pcsitenamesize : *mut u32, pdwdecision : *mut u32, dwindex : u32) -> super::super::Foundation:: BOOL); - unsafe { InternetEnumPerSiteCookieDecisionW(core::mem::transmute(pszsitename), core::mem::transmute(pcsitenamesize), core::mem::transmute(pdwdecision), dwindex) } + unsafe { InternetEnumPerSiteCookieDecisionW(core::mem::transmute(pszsitename), pcsitenamesize as _, pdwdecision as _, dwindex) } } #[inline] 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); - unsafe { InternetErrorDlg(hwnd, core::mem::transmute(hrequest.unwrap_or(core::mem::zeroed())), dwerror, dwflags, core::mem::transmute(lppvdata.unwrap_or(core::mem::zeroed()))) } + unsafe { InternetErrorDlg(hwnd, hrequest.unwrap_or(core::mem::zeroed()) as _, dwerror, dwflags, lppvdata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn InternetFindNextFileA(hfind: *const core::ffi::c_void, lpvfinddata: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("wininet.dll" "system" fn InternetFindNextFileA(hfind : *const core::ffi::c_void, lpvfinddata : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { InternetFindNextFileA(hfind, core::mem::transmute(lpvfinddata)).ok() } + unsafe { InternetFindNextFileA(hfind, lpvfinddata as _).ok() } } #[inline] pub unsafe fn InternetFindNextFileW(hfind: *const core::ffi::c_void, lpvfinddata: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("wininet.dll" "system" fn InternetFindNextFileW(hfind : *const core::ffi::c_void, lpvfinddata : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { InternetFindNextFileW(hfind, core::mem::transmute(lpvfinddata)).ok() } + unsafe { InternetFindNextFileW(hfind, lpvfinddata as _).ok() } } #[inline] 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); - unsafe { InternetFortezzaCommand(dwcommand, hwnd, core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { InternetFortezzaCommand(dwcommand, hwnd, dwreserved.unwrap_or(core::mem::zeroed()) as _) } } #[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)); - unsafe { InternetFreeCookies(core::mem::transmute(pcookies.unwrap_or(core::mem::zeroed())), dwcookiecount) } + unsafe { InternetFreeCookies(pcookies.unwrap_or(core::mem::zeroed()) as _, dwcookiecount) } } #[inline] pub unsafe fn InternetFreeProxyInfoList(pproxyinfolist: *mut WININET_PROXY_INFO_LIST) { windows_targets::link!("wininet.dll" "system" fn InternetFreeProxyInfoList(pproxyinfolist : *mut WININET_PROXY_INFO_LIST)); - unsafe { InternetFreeProxyInfoList(core::mem::transmute(pproxyinfolist)) } + unsafe { InternetFreeProxyInfoList(pproxyinfolist as _) } } #[inline] 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); - unsafe { InternetGetConnectedState(core::mem::transmute(lpdwflags), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { InternetGetConnectedState(lpdwflags as _, dwreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn InternetGetConnectedStateEx(lpdwflags: *mut INTERNET_CONNECTION, lpszconnectionname: Option<&mut [u8]>, dwreserved: u32) -> windows_core::Result<()> { windows_targets::link!("wininet.dll" "system" fn InternetGetConnectedStateEx(lpdwflags : *mut INTERNET_CONNECTION, lpszconnectionname : windows_core::PSTR, dwnamelen : u32, dwreserved : u32) -> super::super::Foundation:: BOOL); - unsafe { 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()), dwreserved).ok() } + unsafe { InternetGetConnectedStateEx(lpdwflags as _, core::mem::transmute(lpszconnectionname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpszconnectionname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dwreserved).ok() } } #[inline] pub unsafe fn 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); - unsafe { 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() } + unsafe { InternetGetConnectedStateExA(lpdwflags.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(lpszconnectionname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpszconnectionname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dwreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { 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() } + unsafe { InternetGetConnectedStateExW(lpdwflags.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(lpszconnectionname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpszconnectionname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dwreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn InternetGetCookieA(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: Option, lpdwsize: *mut u32) -> windows_core::Result<()> @@ -1221,7 +1221,7 @@ where 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); - unsafe { InternetGetCookieA(lpszurl.param().abi(), lpszcookiename.param().abi(), core::mem::transmute(lpszcookiedata.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwsize)).ok() } + unsafe { InternetGetCookieA(lpszurl.param().abi(), lpszcookiename.param().abi(), lpszcookiedata.unwrap_or(core::mem::zeroed()) as _, lpdwsize as _).ok() } } #[inline] pub unsafe fn InternetGetCookieEx2(pcwszurl: P0, pcwszcookiename: P1, dwflags: u32, ppcookies: *mut *mut INTERNET_COOKIE2, pdwcookiecount: *mut u32) -> u32 @@ -1230,7 +1230,7 @@ where P1: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetGetCookieEx2(pcwszurl : windows_core::PCWSTR, pcwszcookiename : windows_core::PCWSTR, dwflags : u32, ppcookies : *mut *mut INTERNET_COOKIE2, pdwcookiecount : *mut u32) -> u32); - unsafe { InternetGetCookieEx2(pcwszurl.param().abi(), pcwszcookiename.param().abi(), dwflags, core::mem::transmute(ppcookies), core::mem::transmute(pdwcookiecount)) } + unsafe { InternetGetCookieEx2(pcwszurl.param().abi(), pcwszcookiename.param().abi(), dwflags, ppcookies as _, pdwcookiecount as _) } } #[inline] pub unsafe fn InternetGetCookieExA(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: P2, lpdwsize: *mut u32, dwflags: INTERNET_COOKIE_FLAGS, lpreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1240,7 +1240,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); - unsafe { InternetGetCookieExA(lpszurl.param().abi(), lpszcookiename.param().abi(), lpszcookiedata.param().abi(), core::mem::transmute(lpdwsize), dwflags, core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { InternetGetCookieExA(lpszurl.param().abi(), lpszcookiename.param().abi(), lpszcookiedata.param().abi(), lpdwsize as _, dwflags, lpreserved.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -1250,7 +1250,7 @@ where P2: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetGetCookieExW(lpszurl : windows_core::PCWSTR, lpszcookiename : windows_core::PCWSTR, lpszcookiedata : windows_core::PCWSTR, lpdwsize : *mut u32, dwflags : INTERNET_COOKIE_FLAGS, lpreserved : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { InternetGetCookieExW(lpszurl.param().abi(), lpszcookiename.param().abi(), lpszcookiedata.param().abi(), core::mem::transmute(lpdwsize), dwflags, core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { InternetGetCookieExW(lpszurl.param().abi(), lpszcookiename.param().abi(), lpszcookiedata.param().abi(), lpdwsize as _, dwflags, lpreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn InternetGetCookieW(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: Option, lpdwsize: *mut u32) -> windows_core::Result<()> @@ -1259,17 +1259,17 @@ where 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); - unsafe { InternetGetCookieW(lpszurl.param().abi(), lpszcookiename.param().abi(), core::mem::transmute(lpszcookiedata.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwsize)).ok() } + unsafe { InternetGetCookieW(lpszurl.param().abi(), lpszcookiename.param().abi(), lpszcookiedata.unwrap_or(core::mem::zeroed()) as _, lpdwsize as _).ok() } } #[inline] 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); - unsafe { InternetGetLastResponseInfoA(core::mem::transmute(lpdwerror), core::mem::transmute(lpszbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwbufferlength)).ok() } + unsafe { InternetGetLastResponseInfoA(lpdwerror as _, lpszbuffer.unwrap_or(core::mem::zeroed()) as _, lpdwbufferlength as _).ok() } } #[inline] 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); - unsafe { InternetGetLastResponseInfoW(core::mem::transmute(lpdwerror), core::mem::transmute(lpszbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwbufferlength)).ok() } + unsafe { InternetGetLastResponseInfoW(lpdwerror as _, lpszbuffer.unwrap_or(core::mem::zeroed()) as _, lpdwbufferlength as _).ok() } } #[inline] pub unsafe fn InternetGetPerSiteCookieDecisionA(pchhostname: P0, presult: *mut u32) -> super::super::Foundation::BOOL @@ -1277,7 +1277,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetGetPerSiteCookieDecisionA(pchhostname : windows_core::PCSTR, presult : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { InternetGetPerSiteCookieDecisionA(pchhostname.param().abi(), core::mem::transmute(presult)) } + unsafe { InternetGetPerSiteCookieDecisionA(pchhostname.param().abi(), presult as _) } } #[inline] pub unsafe fn InternetGetPerSiteCookieDecisionW(pchhostname: P0, presult: *mut u32) -> super::super::Foundation::BOOL @@ -1285,7 +1285,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetGetPerSiteCookieDecisionW(pchhostname : windows_core::PCWSTR, presult : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { InternetGetPerSiteCookieDecisionW(pchhostname.param().abi(), core::mem::transmute(presult)) } + unsafe { InternetGetPerSiteCookieDecisionW(pchhostname.param().abi(), presult as _) } } #[inline] pub unsafe fn InternetGetProxyForUrl(hinternet: *const core::ffi::c_void, pcwszurl: P1, pproxyinfolist: *mut WININET_PROXY_INFO_LIST) -> u32 @@ -1293,7 +1293,7 @@ where P1: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetGetProxyForUrl(hinternet : *const core::ffi::c_void, pcwszurl : windows_core::PCWSTR, pproxyinfolist : *mut WININET_PROXY_INFO_LIST) -> u32); - unsafe { InternetGetProxyForUrl(hinternet, pcwszurl.param().abi(), core::mem::transmute(pproxyinfolist)) } + unsafe { InternetGetProxyForUrl(hinternet, pcwszurl.param().abi(), pproxyinfolist as _) } } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] @@ -1302,7 +1302,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetGetSecurityInfoByURL(lpszurl : windows_core::PCSTR, ppcertchain : *mut *mut super::super::Security::Cryptography:: CERT_CHAIN_CONTEXT, pdwsecureflags : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { InternetGetSecurityInfoByURL(lpszurl.param().abi(), core::mem::transmute(ppcertchain), core::mem::transmute(pdwsecureflags)) } + unsafe { InternetGetSecurityInfoByURL(lpszurl.param().abi(), ppcertchain as _, pdwsecureflags as _) } } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] @@ -1311,7 +1311,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetGetSecurityInfoByURLA(lpszurl : windows_core::PCSTR, ppcertchain : *mut *mut super::super::Security::Cryptography:: CERT_CHAIN_CONTEXT, pdwsecureflags : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { InternetGetSecurityInfoByURLA(lpszurl.param().abi(), core::mem::transmute(ppcertchain), core::mem::transmute(pdwsecureflags)) } + unsafe { InternetGetSecurityInfoByURLA(lpszurl.param().abi(), ppcertchain as _, pdwsecureflags as _) } } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] @@ -1320,7 +1320,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetGetSecurityInfoByURLW(lpszurl : windows_core::PCWSTR, ppcertchain : *mut *mut super::super::Security::Cryptography:: CERT_CHAIN_CONTEXT, pdwsecureflags : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { InternetGetSecurityInfoByURLW(lpszurl.param().abi(), core::mem::transmute(ppcertchain), core::mem::transmute(pdwsecureflags)) } + unsafe { InternetGetSecurityInfoByURLW(lpszurl.param().abi(), ppcertchain as _, pdwsecureflags as _) } } #[inline] pub unsafe fn InternetGoOnline(lpszurl: P0, hwndparent: super::super::Foundation::HWND, dwflags: u32) -> windows_core::Result<()> @@ -1349,7 +1349,7 @@ where #[inline] pub unsafe fn InternetHangUp(dwconnection: usize, dwreserved: Option) -> u32 { windows_targets::link!("wininet.dll" "system" fn InternetHangUp(dwconnection : usize, dwreserved : u32) -> u32); - unsafe { InternetHangUp(dwconnection, core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { InternetHangUp(dwconnection, dwreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn InternetInitializeAutoProxyDll(dwreserved: u32) -> windows_core::Result<()> { @@ -1359,7 +1359,7 @@ pub unsafe fn InternetInitializeAutoProxyDll(dwreserved: u32) -> windows_core::R #[inline] pub unsafe fn InternetLockRequestFile(hinternet: *const core::ffi::c_void, lphlockrequestinfo: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("wininet.dll" "system" fn InternetLockRequestFile(hinternet : *const core::ffi::c_void, lphlockrequestinfo : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - unsafe { InternetLockRequestFile(hinternet, core::mem::transmute(lphlockrequestinfo)).ok() } + unsafe { InternetLockRequestFile(hinternet, lphlockrequestinfo as _).ok() } } #[inline] pub unsafe fn InternetOpenA(lpszagent: P0, dwaccesstype: u32, lpszproxy: P2, lpszproxybypass: P3, dwflags: u32) -> *mut core::ffi::c_void @@ -1377,7 +1377,7 @@ 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); - unsafe { InternetOpenUrlA(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()), dwflags, core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { InternetOpenUrlA(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()), dwflags, dwcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn InternetOpenUrlW(hinternet: *const core::ffi::c_void, lpszurl: P1, lpszheaders: Option<&[u16]>, dwflags: u32, dwcontext: Option) -> *mut core::ffi::c_void @@ -1385,7 +1385,7 @@ 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); - unsafe { InternetOpenUrlW(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()), dwflags, core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { InternetOpenUrlW(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()), dwflags, dwcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn InternetOpenW(lpszagent: P0, dwaccesstype: u32, lpszproxy: P2, lpszproxybypass: P3, dwflags: u32) -> *mut core::ffi::c_void @@ -1400,47 +1400,47 @@ where #[inline] 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); - unsafe { InternetQueryDataAvailable(hfile, core::mem::transmute(lpdwnumberofbytesavailable.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { InternetQueryDataAvailable(hfile, lpdwnumberofbytesavailable.unwrap_or(core::mem::zeroed()) as _, dwflags, dwcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { InternetQueryFortezzaStatus(core::mem::transmute(pdwstatus), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { InternetQueryFortezzaStatus(pdwstatus as _, dwreserved.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { InternetQueryOptionA(core::mem::transmute(hinternet.unwrap_or(core::mem::zeroed())), dwoption, core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwbufferlength)).ok() } + unsafe { InternetQueryOptionA(hinternet.unwrap_or(core::mem::zeroed()) as _, dwoption, lpbuffer.unwrap_or(core::mem::zeroed()) as _, lpdwbufferlength as _).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); - unsafe { InternetQueryOptionW(core::mem::transmute(hinternet.unwrap_or(core::mem::zeroed())), dwoption, core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwbufferlength)).ok() } + unsafe { InternetQueryOptionW(hinternet.unwrap_or(core::mem::zeroed()) as _, dwoption, lpbuffer.unwrap_or(core::mem::zeroed()) as _, lpdwbufferlength as _).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<()> { windows_targets::link!("wininet.dll" "system" fn InternetReadFile(hfile : *const core::ffi::c_void, lpbuffer : *mut core::ffi::c_void, dwnumberofbytestoread : u32, lpdwnumberofbytesread : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { InternetReadFile(hfile, core::mem::transmute(lpbuffer), dwnumberofbytestoread, core::mem::transmute(lpdwnumberofbytesread)).ok() } + unsafe { InternetReadFile(hfile, lpbuffer as _, dwnumberofbytestoread, lpdwnumberofbytesread as _).ok() } } #[inline] 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); - unsafe { InternetReadFileExA(hfile, core::mem::transmute(lpbuffersout), dwflags, core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { InternetReadFileExA(hfile, lpbuffersout as _, dwflags, dwcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { InternetReadFileExW(hfile, core::mem::transmute(lpbuffersout), dwflags, core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { InternetReadFileExW(hfile, lpbuffersout as _, dwflags, dwcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { InternetSecurityProtocolToStringA(dwprotocol, core::mem::transmute(lpstr.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwstrlength), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { InternetSecurityProtocolToStringA(dwprotocol, lpstr.unwrap_or(core::mem::zeroed()) as _, lpdwstrlength as _, dwreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { InternetSecurityProtocolToStringW(dwprotocol, core::mem::transmute(lpstr.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwstrlength), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { InternetSecurityProtocolToStringW(dwprotocol, lpstr.unwrap_or(core::mem::zeroed()) as _, lpdwstrlength as _, dwreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn InternetSetCookieA(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: P2) -> windows_core::Result<()> @@ -1459,7 +1459,7 @@ where P2: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetSetCookieEx2(pcwszurl : windows_core::PCWSTR, pcookie : *const INTERNET_COOKIE2, pcwszp3ppolicy : windows_core::PCWSTR, dwflags : u32, pdwcookiestate : *mut u32) -> u32); - unsafe { InternetSetCookieEx2(pcwszurl.param().abi(), pcookie, pcwszp3ppolicy.param().abi(), dwflags, core::mem::transmute(pdwcookiestate)) } + unsafe { InternetSetCookieEx2(pcwszurl.param().abi(), pcookie, pcwszp3ppolicy.param().abi(), dwflags, pdwcookiestate as _) } } #[inline] pub unsafe fn InternetSetCookieExA(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: P2, dwflags: u32, dwreserved: Option) -> u32 @@ -1469,7 +1469,7 @@ where 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); - unsafe { InternetSetCookieExA(lpszurl.param().abi(), lpszcookiename.param().abi(), lpszcookiedata.param().abi(), dwflags, core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { InternetSetCookieExA(lpszurl.param().abi(), lpszcookiename.param().abi(), lpszcookiedata.param().abi(), dwflags, dwreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn InternetSetCookieExW(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: P2, dwflags: u32, dwreserved: Option) -> u32 @@ -1479,7 +1479,7 @@ where 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); - unsafe { InternetSetCookieExW(lpszurl.param().abi(), lpszcookiename.param().abi(), lpszcookiedata.param().abi(), dwflags, core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { InternetSetCookieExW(lpszurl.param().abi(), lpszcookiename.param().abi(), lpszcookiedata.param().abi(), dwflags, dwreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn InternetSetCookieW(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: P2) -> windows_core::Result<()> @@ -1505,7 +1505,7 @@ 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); - unsafe { InternetSetDialStateA(lpszconnectoid.param().abi(), dwstate, core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { InternetSetDialStateA(lpszconnectoid.param().abi(), dwstate, dwreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn InternetSetDialStateW(lpszconnectoid: P0, dwstate: u32, dwreserved: Option) -> super::super::Foundation::BOOL @@ -1513,32 +1513,32 @@ 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); - unsafe { InternetSetDialStateW(lpszconnectoid.param().abi(), dwstate, core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { InternetSetDialStateW(lpszconnectoid.param().abi(), dwstate, dwreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { InternetSetFilePointer(hfile, ldistancetomove, core::mem::transmute(lpdistancetomovehigh.unwrap_or(core::mem::zeroed())), dwmovemethod, core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { InternetSetFilePointer(hfile, ldistancetomove, lpdistancetomovehigh.unwrap_or(core::mem::zeroed()) as _, dwmovemethod, dwcontext.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { InternetSetOptionA(core::mem::transmute(hinternet.unwrap_or(core::mem::zeroed())), dwoption, core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), dwbufferlength).ok() } + unsafe { InternetSetOptionA(hinternet.unwrap_or(core::mem::zeroed()) as _, dwoption, lpbuffer.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { InternetSetOptionExA(core::mem::transmute(hinternet.unwrap_or(core::mem::zeroed())), dwoption, core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), dwbufferlength, dwflags) } + unsafe { InternetSetOptionExA(hinternet.unwrap_or(core::mem::zeroed()) as _, dwoption, lpbuffer.unwrap_or(core::mem::zeroed()) as _, dwbufferlength, dwflags) } } #[inline] pub unsafe fn InternetSetOptionExW(hinternet: Option<*const core::ffi::c_void>, dwoption: u32, lpbuffer: Option<*const core::ffi::c_void>, dwbufferlength: u32, dwflags: u32) -> super::super::Foundation::BOOL { windows_targets::link!("wininet.dll" "system" fn InternetSetOptionExW(hinternet : *const core::ffi::c_void, dwoption : u32, lpbuffer : *const core::ffi::c_void, dwbufferlength : u32, dwflags : u32) -> super::super::Foundation:: BOOL); - unsafe { InternetSetOptionExW(core::mem::transmute(hinternet.unwrap_or(core::mem::zeroed())), dwoption, core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), dwbufferlength, dwflags) } + unsafe { InternetSetOptionExW(hinternet.unwrap_or(core::mem::zeroed()) as _, dwoption, lpbuffer.unwrap_or(core::mem::zeroed()) as _, dwbufferlength, dwflags) } } #[inline] pub unsafe fn InternetSetOptionW(hinternet: Option<*const core::ffi::c_void>, dwoption: u32, lpbuffer: Option<*const core::ffi::c_void>, dwbufferlength: u32) -> windows_core::Result<()> { windows_targets::link!("wininet.dll" "system" fn InternetSetOptionW(hinternet : *const core::ffi::c_void, dwoption : u32, lpbuffer : *const core::ffi::c_void, dwbufferlength : u32) -> super::super::Foundation:: BOOL); - unsafe { InternetSetOptionW(core::mem::transmute(hinternet.unwrap_or(core::mem::zeroed())), dwoption, core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), dwbufferlength).ok() } + unsafe { InternetSetOptionW(hinternet.unwrap_or(core::mem::zeroed()) as _, dwoption, lpbuffer.unwrap_or(core::mem::zeroed()) as _, dwbufferlength).ok() } } #[inline] pub unsafe fn InternetSetPerSiteCookieDecisionA(pchhostname: P0, dwdecision: u32) -> super::super::Foundation::BOOL @@ -1559,17 +1559,17 @@ where #[inline] 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); - unsafe { InternetSetStatusCallback(hinternet, core::mem::transmute(lpfninternetcallback.unwrap_or(core::mem::zeroed()))) } + unsafe { InternetSetStatusCallback(hinternet, lpfninternetcallback.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { InternetSetStatusCallbackA(hinternet, core::mem::transmute(lpfninternetcallback.unwrap_or(core::mem::zeroed()))) } + unsafe { InternetSetStatusCallbackA(hinternet, lpfninternetcallback.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { InternetSetStatusCallbackW(hinternet, core::mem::transmute(lpfninternetcallback.unwrap_or(core::mem::zeroed()))) } + unsafe { InternetSetStatusCallbackW(hinternet, lpfninternetcallback.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn InternetShowSecurityInfoByURL(lpszurl: P0, hwndparent: super::super::Foundation::HWND) -> super::super::Foundation::BOOL @@ -1616,7 +1616,7 @@ 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); - unsafe { InternetTimeToSystemTime(lpsztime.param().abi(), core::mem::transmute(pst), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { InternetTimeToSystemTime(lpsztime.param().abi(), pst as _, dwreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn InternetTimeToSystemTimeA(lpsztime: P0, pst: *mut super::super::Foundation::SYSTEMTIME, dwreserved: Option) -> windows_core::Result<()> @@ -1624,7 +1624,7 @@ 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); - unsafe { InternetTimeToSystemTimeA(lpsztime.param().abi(), core::mem::transmute(pst), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { InternetTimeToSystemTimeA(lpsztime.param().abi(), pst as _, dwreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn InternetTimeToSystemTimeW(lpsztime: P0, pst: *mut super::super::Foundation::SYSTEMTIME, dwreserved: Option) -> windows_core::Result<()> @@ -1632,27 +1632,27 @@ 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); - unsafe { InternetTimeToSystemTimeW(lpsztime.param().abi(), core::mem::transmute(pst), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { InternetTimeToSystemTimeW(lpsztime.param().abi(), pst as _, dwreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn InternetUnlockRequestFile(hlockrequestinfo: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("wininet.dll" "system" fn InternetUnlockRequestFile(hlockrequestinfo : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - unsafe { InternetUnlockRequestFile(core::mem::transmute(hlockrequestinfo)).ok() } + unsafe { InternetUnlockRequestFile(hlockrequestinfo as _).ok() } } #[inline] pub unsafe fn InternetWriteFile(hfile: *const core::ffi::c_void, lpbuffer: *const core::ffi::c_void, dwnumberofbytestowrite: u32, lpdwnumberofbyteswritten: *mut u32) -> windows_core::Result<()> { windows_targets::link!("wininet.dll" "system" fn InternetWriteFile(hfile : *const core::ffi::c_void, lpbuffer : *const core::ffi::c_void, dwnumberofbytestowrite : u32, lpdwnumberofbyteswritten : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { InternetWriteFile(hfile, lpbuffer, dwnumberofbytestowrite, core::mem::transmute(lpdwnumberofbyteswritten)).ok() } + unsafe { InternetWriteFile(hfile, lpbuffer, dwnumberofbytestowrite, lpdwnumberofbyteswritten as _).ok() } } #[inline] 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); - unsafe { InternetWriteFileExA(hfile, lpbuffersin, dwflags, core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { InternetWriteFileExA(hfile, lpbuffersin, dwflags, dwcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { InternetWriteFileExW(hfile, lpbuffersin, dwflags, core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { InternetWriteFileExW(hfile, lpbuffersin, dwflags, dwcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn IsDomainLegalCookieDomainA(pchdomain: P0, pchfulldomain: P1) -> super::super::Foundation::BOOL @@ -1688,7 +1688,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn IsUrlCacheEntryExpiredA(lpszurlname : windows_core::PCSTR, dwflags : u32, pftlastmodified : *mut super::super::Foundation:: FILETIME) -> super::super::Foundation:: BOOL); - unsafe { IsUrlCacheEntryExpiredA(lpszurlname.param().abi(), dwflags, core::mem::transmute(pftlastmodified)) } + unsafe { IsUrlCacheEntryExpiredA(lpszurlname.param().abi(), dwflags, pftlastmodified as _) } } #[inline] pub unsafe fn IsUrlCacheEntryExpiredW(lpszurlname: P0, dwflags: u32, pftlastmodified: *mut super::super::Foundation::FILETIME) -> super::super::Foundation::BOOL @@ -1696,7 +1696,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn IsUrlCacheEntryExpiredW(lpszurlname : windows_core::PCWSTR, dwflags : u32, pftlastmodified : *mut super::super::Foundation:: FILETIME) -> super::super::Foundation:: BOOL); - unsafe { IsUrlCacheEntryExpiredW(lpszurlname.param().abi(), dwflags, core::mem::transmute(pftlastmodified)) } + unsafe { IsUrlCacheEntryExpiredW(lpszurlname.param().abi(), dwflags, pftlastmodified as _) } } #[inline] pub unsafe fn LoadUrlCacheContent() -> super::super::Foundation::BOOL { @@ -1706,7 +1706,7 @@ pub unsafe fn LoadUrlCacheContent() -> super::super::Foundation::BOOL { #[inline] 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); - unsafe { 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)) } + unsafe { ParseX509EncodedCertificateForListBoxEntry(core::mem::transmute(lpcert.as_ptr()), lpcert.len().try_into().unwrap(), lpszlistboxentry.unwrap_or(core::mem::zeroed()) as _, lpdwlistboxentry as _) } } #[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 @@ -1714,12 +1714,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); - unsafe { PerformOperationOverUrlCacheA(pszurlsearchpattern.param().abi(), dwflags, dwfilter, 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())), op, core::mem::transmute(poperatordata)) } + unsafe { PerformOperationOverUrlCacheA(pszurlsearchpattern.param().abi(), dwflags, dwfilter, groupid, preserved1.unwrap_or(core::mem::zeroed()) as _, pdwreserved2.unwrap_or(core::mem::zeroed()) as _, preserved3.unwrap_or(core::mem::zeroed()) as _, op, poperatordata as _) } } #[inline] 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); - unsafe { PrivacyGetZonePreferenceW(dwzone, 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()))) } + unsafe { PrivacyGetZonePreferenceW(dwzone, dwtype, pdwtemplate.unwrap_or(core::mem::zeroed()) as _, pszbuffer.unwrap_or(core::mem::zeroed()) as _, pdwbufferlength.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn PrivacySetZonePreferenceW(dwzone: u32, dwtype: u32, dwtemplate: u32, pszpreference: P3) -> u32 @@ -1732,22 +1732,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); - unsafe { 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()))) } + unsafe { ReadGuidsForConnectedNetworks(pcnetworks.unwrap_or(core::mem::zeroed()) as _, pppwsznetworkguids.unwrap_or(core::mem::zeroed()) as _, pppbstrnetworknames.unwrap_or(core::mem::zeroed()) as _, pppwszgwmacs.unwrap_or(core::mem::zeroed()) as _, pcgatewaymacs.unwrap_or(core::mem::zeroed()) as _, pdwflags.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { ReadUrlCacheEntryStream(hurlcachestream, dwlocation, core::mem::transmute(lpbuffer), core::mem::transmute(lpdwlen), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ReadUrlCacheEntryStream(hurlcachestream, dwlocation, lpbuffer as _, lpdwlen as _, reserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { ReadUrlCacheEntryStreamEx(hurlcachestream, qwlocation, core::mem::transmute(lpbuffer), core::mem::transmute(lpdwlen)) } + unsafe { ReadUrlCacheEntryStreamEx(hurlcachestream, qwlocation, lpbuffer as _, lpdwlen as _) } } #[inline] 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); - unsafe { RegisterUrlCacheNotification(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), umsg, gid, dwopsfilter, dwreserved) } + unsafe { RegisterUrlCacheNotification(hwnd.unwrap_or(core::mem::zeroed()) as _, umsg, gid, dwopsfilter, dwreserved) } } #[inline] pub unsafe fn ResumeSuspendedDownload(hrequest: *const core::ffi::c_void, dwresultcode: u32) -> windows_core::Result<()> { @@ -1760,7 +1760,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn RetrieveUrlCacheEntryFileA(lpszurlname : windows_core::PCSTR, lpcacheentryinfo : *mut INTERNET_CACHE_ENTRY_INFOA, lpcbcacheentryinfo : *mut u32, dwreserved : u32) -> super::super::Foundation:: BOOL); - unsafe { 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() } + unsafe { RetrieveUrlCacheEntryFileA(lpszurlname.param().abi(), lpcacheentryinfo.unwrap_or(core::mem::zeroed()) as _, lpcbcacheentryinfo as _, dwreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn RetrieveUrlCacheEntryFileW(lpszurlname: P0, lpcacheentryinfo: Option<*mut INTERNET_CACHE_ENTRY_INFOW>, lpcbcacheentryinfo: *mut u32, dwreserved: Option) -> windows_core::Result<()> @@ -1768,7 +1768,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn RetrieveUrlCacheEntryFileW(lpszurlname : windows_core::PCWSTR, lpcacheentryinfo : *mut INTERNET_CACHE_ENTRY_INFOW, lpcbcacheentryinfo : *mut u32, dwreserved : u32) -> super::super::Foundation:: BOOL); - unsafe { 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() } + unsafe { RetrieveUrlCacheEntryFileW(lpszurlname.param().abi(), lpcacheentryinfo.unwrap_or(core::mem::zeroed()) as _, lpcbcacheentryinfo as _, dwreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn RetrieveUrlCacheEntryStreamA(lpszurlname: P0, lpcacheentryinfo: Option<*mut INTERNET_CACHE_ENTRY_INFOA>, lpcbcacheentryinfo: *mut u32, frandomread: bool, dwreserved: Option) -> windows_core::Result @@ -1776,7 +1776,7 @@ where P0: 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__ = unsafe { RetrieveUrlCacheEntryStreamA(lpszurlname.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbcacheentryinfo), frandomread.into(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { RetrieveUrlCacheEntryStreamA(lpszurlname.param().abi(), lpcacheentryinfo.unwrap_or(core::mem::zeroed()) as _, lpcbcacheentryinfo as _, frandomread.into(), dwreserved.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1785,7 +1785,7 @@ where P0: 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__ = unsafe { RetrieveUrlCacheEntryStreamW(lpszurlname.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbcacheentryinfo), frandomread.into(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { RetrieveUrlCacheEntryStreamW(lpszurlname.param().abi(), lpcacheentryinfo.unwrap_or(core::mem::zeroed()) as _, lpcbcacheentryinfo as _, frandomread.into(), dwreserved.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1812,7 +1812,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn SetUrlCacheEntryGroup(lpszurlname : windows_core::PCSTR, dwflags : u32, groupid : i64, pbgroupattributes : *const u8, cbgroupattributes : u32, lpreserved : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { SetUrlCacheEntryGroup(lpszurlname.param().abi(), dwflags, 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()))) } + unsafe { SetUrlCacheEntryGroup(lpszurlname.param().abi(), dwflags, groupid, pbgroupattributes.unwrap_or(core::mem::zeroed()) as _, cbgroupattributes.unwrap_or(core::mem::zeroed()) as _, lpreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -1820,7 +1820,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn SetUrlCacheEntryGroupA(lpszurlname : windows_core::PCSTR, dwflags : u32, groupid : i64, pbgroupattributes : *const u8, cbgroupattributes : u32, lpreserved : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { SetUrlCacheEntryGroupA(lpszurlname.param().abi(), dwflags, 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()))) } + unsafe { SetUrlCacheEntryGroupA(lpszurlname.param().abi(), dwflags, groupid, pbgroupattributes.unwrap_or(core::mem::zeroed()) as _, cbgroupattributes.unwrap_or(core::mem::zeroed()) as _, lpreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -1828,7 +1828,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn SetUrlCacheEntryGroupW(lpszurlname : windows_core::PCWSTR, dwflags : u32, groupid : i64, pbgroupattributes : *const u8, cbgroupattributes : u32, lpreserved : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { SetUrlCacheEntryGroupW(lpszurlname.param().abi(), dwflags, 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()))) } + unsafe { SetUrlCacheEntryGroupW(lpszurlname.param().abi(), dwflags, groupid, pbgroupattributes.unwrap_or(core::mem::zeroed()) as _, cbgroupattributes.unwrap_or(core::mem::zeroed()) as _, lpreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SetUrlCacheEntryInfoA(lpszurlname: P0, lpcacheentryinfo: *const INTERNET_CACHE_ENTRY_INFOA, dwfieldcontrol: u32) -> windows_core::Result<()> @@ -1849,12 +1849,12 @@ where #[inline] 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); - unsafe { SetUrlCacheGroupAttributeA(gid, core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), dwattributes, lpgroupinfo, core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetUrlCacheGroupAttributeA(gid, dwflags.unwrap_or(core::mem::zeroed()) as _, dwattributes, lpgroupinfo, lpreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SetUrlCacheGroupAttributeW(gid, core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), dwattributes, lpgroupinfo, core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetUrlCacheGroupAttributeW(gid, dwflags.unwrap_or(core::mem::zeroed()) as _, dwattributes, lpgroupinfo, lpreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetUrlCacheHeaderData(nidx: u32, dwdata: u32) -> super::super::Foundation::BOOL { @@ -1883,7 +1883,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn UnlockUrlCacheEntryFile(lpszurlname : windows_core::PCSTR, dwreserved : u32) -> super::super::Foundation:: BOOL); - unsafe { UnlockUrlCacheEntryFile(lpszurlname.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { UnlockUrlCacheEntryFile(lpszurlname.param().abi(), dwreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn UnlockUrlCacheEntryFileA(lpszurlname: P0, dwreserved: Option) -> windows_core::Result<()> @@ -1891,7 +1891,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn UnlockUrlCacheEntryFileA(lpszurlname : windows_core::PCSTR, dwreserved : u32) -> super::super::Foundation:: BOOL); - unsafe { UnlockUrlCacheEntryFileA(lpszurlname.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { UnlockUrlCacheEntryFileA(lpszurlname.param().abi(), dwreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn UnlockUrlCacheEntryFileW(lpszurlname: P0, dwreserved: Option) -> windows_core::Result<()> @@ -1899,12 +1899,12 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn UnlockUrlCacheEntryFileW(lpszurlname : windows_core::PCWSTR, dwreserved : u32) -> super::super::Foundation:: BOOL); - unsafe { UnlockUrlCacheEntryFileW(lpszurlname.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { UnlockUrlCacheEntryFileW(lpszurlname.param().abi(), dwreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { UnlockUrlCacheEntryStream(hurlcachestream, core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { UnlockUrlCacheEntryStream(hurlcachestream, reserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn UpdateUrlCacheContentPath(sznewpath: P0) -> super::super::Foundation::BOOL @@ -1917,7 +1917,7 @@ where #[inline] pub unsafe fn UrlCacheCheckEntriesExist(rgpwszurls: *const windows_core::PCWSTR, centries: u32, rgfexist: *mut super::super::Foundation::BOOL) -> u32 { windows_targets::link!("wininet.dll" "system" fn UrlCacheCheckEntriesExist(rgpwszurls : *const windows_core::PCWSTR, centries : u32, rgfexist : *mut super::super::Foundation:: BOOL) -> u32); - unsafe { UrlCacheCheckEntriesExist(rgpwszurls, centries, core::mem::transmute(rgfexist)) } + unsafe { UrlCacheCheckEntriesExist(rgpwszurls, centries, rgfexist as _) } } #[inline] pub unsafe fn UrlCacheCloseEntryHandle(hentryfile: *const core::ffi::c_void) { @@ -1948,17 +1948,17 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn UrlCacheFindFirstEntry(pwszprefix : windows_core::PCWSTR, dwflags : u32, dwfilter : u32, groupid : i64, pcacheentryinfo : *mut URLCACHE_ENTRY_INFO, phfind : *mut super::super::Foundation:: HANDLE) -> u32); - unsafe { UrlCacheFindFirstEntry(pwszprefix.param().abi(), dwflags, dwfilter, groupid, core::mem::transmute(pcacheentryinfo), core::mem::transmute(phfind)) } + unsafe { UrlCacheFindFirstEntry(pwszprefix.param().abi(), dwflags, dwfilter, groupid, pcacheentryinfo as _, phfind as _) } } #[inline] 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); - unsafe { UrlCacheFindNextEntry(hfind, core::mem::transmute(pcacheentryinfo)) } + unsafe { UrlCacheFindNextEntry(hfind, pcacheentryinfo as _) } } #[inline] pub unsafe fn UrlCacheFreeEntryInfo(pcacheentryinfo: *mut URLCACHE_ENTRY_INFO) { windows_targets::link!("wininet.dll" "system" fn UrlCacheFreeEntryInfo(pcacheentryinfo : *mut URLCACHE_ENTRY_INFO)); - unsafe { UrlCacheFreeEntryInfo(core::mem::transmute(pcacheentryinfo)) } + unsafe { UrlCacheFreeEntryInfo(pcacheentryinfo as _) } } #[inline] pub unsafe fn UrlCacheFreeGlobalSpace(ulltargetsize: u64, dwfilter: u32) -> u32 { @@ -1968,7 +1968,7 @@ pub unsafe fn UrlCacheFreeGlobalSpace(ulltargetsize: u64, dwfilter: u32) -> u32 #[inline] pub unsafe fn UrlCacheGetContentPaths(pppwszdirectories: *mut *mut windows_core::PWSTR, pcdirectories: *mut u32) -> u32 { windows_targets::link!("wininet.dll" "system" fn UrlCacheGetContentPaths(pppwszdirectories : *mut *mut windows_core::PWSTR, pcdirectories : *mut u32) -> u32); - unsafe { UrlCacheGetContentPaths(core::mem::transmute(pppwszdirectories), core::mem::transmute(pcdirectories)) } + unsafe { UrlCacheGetContentPaths(pppwszdirectories as _, pcdirectories as _) } } #[inline] pub unsafe fn UrlCacheGetEntryInfo(happcache: Option<*const core::ffi::c_void>, pcwszurl: P1, pcacheentryinfo: Option<*mut URLCACHE_ENTRY_INFO>) -> u32 @@ -1976,22 +1976,22 @@ 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); - unsafe { UrlCacheGetEntryInfo(core::mem::transmute(happcache.unwrap_or(core::mem::zeroed())), pcwszurl.param().abi(), core::mem::transmute(pcacheentryinfo.unwrap_or(core::mem::zeroed()))) } + unsafe { UrlCacheGetEntryInfo(happcache.unwrap_or(core::mem::zeroed()) as _, pcwszurl.param().abi(), pcacheentryinfo.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn UrlCacheGetGlobalCacheSize(dwfilter: u32, pullsize: *mut u64, pulllimit: *mut u64) -> u32 { windows_targets::link!("wininet.dll" "system" fn UrlCacheGetGlobalCacheSize(dwfilter : u32, pullsize : *mut u64, pulllimit : *mut u64) -> u32); - unsafe { UrlCacheGetGlobalCacheSize(dwfilter, core::mem::transmute(pullsize), core::mem::transmute(pulllimit)) } + unsafe { UrlCacheGetGlobalCacheSize(dwfilter, pullsize as _, pulllimit as _) } } #[inline] pub unsafe fn UrlCacheGetGlobalLimit(limittype: URL_CACHE_LIMIT_TYPE, pulllimit: *mut u64) -> u32 { windows_targets::link!("wininet.dll" "system" fn UrlCacheGetGlobalLimit(limittype : URL_CACHE_LIMIT_TYPE, pulllimit : *mut u64) -> u32); - unsafe { UrlCacheGetGlobalLimit(limittype, core::mem::transmute(pulllimit)) } + unsafe { UrlCacheGetGlobalLimit(limittype, pulllimit as _) } } #[inline] pub unsafe fn UrlCacheReadEntryStream(hurlcachestream: *const core::ffi::c_void, ulllocation: u64, pbuffer: *mut core::ffi::c_void, dwbufferlen: u32, pdwbufferlen: *mut u32) -> u32 { windows_targets::link!("wininet.dll" "system" fn UrlCacheReadEntryStream(hurlcachestream : *const core::ffi::c_void, ulllocation : u64, pbuffer : *mut core::ffi::c_void, dwbufferlen : u32, pdwbufferlen : *mut u32) -> u32); - unsafe { UrlCacheReadEntryStream(hurlcachestream, ulllocation, core::mem::transmute(pbuffer), dwbufferlen, core::mem::transmute(pdwbufferlen)) } + unsafe { UrlCacheReadEntryStream(hurlcachestream, ulllocation, pbuffer as _, dwbufferlen, pdwbufferlen as _) } } #[inline] pub unsafe fn UrlCacheReloadSettings() -> u32 { @@ -2004,7 +2004,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); - unsafe { UrlCacheRetrieveEntryFile(core::mem::transmute(happcache.unwrap_or(core::mem::zeroed())), pcwszurl.param().abi(), core::mem::transmute(pcacheentryinfo), core::mem::transmute(phentryfile)) } + unsafe { UrlCacheRetrieveEntryFile(happcache.unwrap_or(core::mem::zeroed()) as _, pcwszurl.param().abi(), pcacheentryinfo as _, phentryfile as _) } } #[inline] pub unsafe fn UrlCacheRetrieveEntryStream(happcache: Option<*const core::ffi::c_void>, pcwszurl: P1, frandomread: bool, pcacheentryinfo: *mut URLCACHE_ENTRY_INFO, phentrystream: *mut *mut core::ffi::c_void) -> u32 @@ -2012,7 +2012,7 @@ where P1: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn UrlCacheRetrieveEntryStream(happcache : *const core::ffi::c_void, pcwszurl : windows_core::PCWSTR, frandomread : super::super::Foundation:: BOOL, pcacheentryinfo : *mut URLCACHE_ENTRY_INFO, phentrystream : *mut *mut core::ffi::c_void) -> u32); - unsafe { UrlCacheRetrieveEntryStream(core::mem::transmute(happcache.unwrap_or(core::mem::zeroed())), pcwszurl.param().abi(), frandomread.into(), core::mem::transmute(pcacheentryinfo), core::mem::transmute(phentrystream)) } + unsafe { UrlCacheRetrieveEntryStream(happcache.unwrap_or(core::mem::zeroed()) as _, pcwszurl.param().abi(), frandomread.into(), pcacheentryinfo as _, phentrystream as _) } } #[inline] pub unsafe fn UrlCacheServer() -> u32 { @@ -2030,7 +2030,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); - unsafe { UrlCacheUpdateEntryExtraData(core::mem::transmute(happcache.unwrap_or(core::mem::zeroed())), pcwszurl.param().abi(), core::mem::transmute(pbextradata.as_ptr()), pbextradata.len().try_into().unwrap()) } + unsafe { UrlCacheUpdateEntryExtraData(happcache.unwrap_or(core::mem::zeroed()) as _, pcwszurl.param().abi(), core::mem::transmute(pbextradata.as_ptr()), pbextradata.len().try_into().unwrap()) } } pub const ANY_CACHE_ENTRY: u32 = 4294967295u32; #[repr(C)] @@ -4428,7 +4428,7 @@ impl IProofOfPossessionCookieInfoManager { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetCookieInfoForUri)(windows_core::Interface::as_raw(self), uri.param().abi(), core::mem::transmute(cookieinfocount), core::mem::transmute(cookieinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCookieInfoForUri)(windows_core::Interface::as_raw(self), uri.param().abi(), cookieinfocount as _, cookieinfo as _).ok() } } } #[repr(C)] @@ -4462,7 +4462,7 @@ impl IProofOfPossessionCookieInfoManager2 { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetCookieInfoWithUriForAccount)(windows_core::Interface::as_raw(self), webaccount.param().abi(), uri.param().abi(), core::mem::transmute(cookieinfocount), core::mem::transmute(cookieinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCookieInfoWithUriForAccount)(windows_core::Interface::as_raw(self), webaccount.param().abi(), uri.param().abi(), cookieinfocount as _, cookieinfo as _).ok() } } } #[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 2e14c28fdc..ca4dac8909 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/WinSock/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/WinSock/mod.rs @@ -2,37 +2,37 @@ #[inline] 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); - unsafe { AcceptEx(slistensocket, sacceptsocket, core::mem::transmute(lpoutputbuffer), dwreceivedatalength, dwlocaladdresslength, dwremoteaddresslength, core::mem::transmute(lpdwbytesreceived), core::mem::transmute(lpoverlapped)) } + unsafe { AcceptEx(slistensocket, sacceptsocket, lpoutputbuffer as _, dwreceivedatalength, dwlocaladdresslength, dwremoteaddresslength, lpdwbytesreceived as _, lpoverlapped as _) } } #[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); - unsafe { EnumProtocolsA(core::mem::transmute(lpiprotocols.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpprotocolbuffer), core::mem::transmute(lpdwbufferlength)) } + unsafe { EnumProtocolsA(lpiprotocols.unwrap_or(core::mem::zeroed()) as _, lpprotocolbuffer as _, lpdwbufferlength as _) } } #[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); - unsafe { EnumProtocolsW(core::mem::transmute(lpiprotocols.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpprotocolbuffer), core::mem::transmute(lpdwbufferlength)) } + unsafe { EnumProtocolsW(lpiprotocols.unwrap_or(core::mem::zeroed()) as _, lpprotocolbuffer as _, lpdwbufferlength as _) } } #[inline] pub unsafe fn FreeAddrInfoEx(paddrinfoex: Option<*const ADDRINFOEXA>) { windows_targets::link!("ws2_32.dll" "system" fn FreeAddrInfoEx(paddrinfoex : *const ADDRINFOEXA)); - unsafe { FreeAddrInfoEx(core::mem::transmute(paddrinfoex.unwrap_or(core::mem::zeroed()))) } + unsafe { FreeAddrInfoEx(paddrinfoex.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FreeAddrInfoExW(paddrinfoex: Option<*const ADDRINFOEXW>) { windows_targets::link!("ws2_32.dll" "system" fn FreeAddrInfoExW(paddrinfoex : *const ADDRINFOEXW)); - unsafe { FreeAddrInfoExW(core::mem::transmute(paddrinfoex.unwrap_or(core::mem::zeroed()))) } + unsafe { FreeAddrInfoExW(paddrinfoex.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FreeAddrInfoW(paddrinfo: Option<*const ADDRINFOW>) { windows_targets::link!("ws2_32.dll" "system" fn FreeAddrInfoW(paddrinfo : *const ADDRINFOW)); - unsafe { FreeAddrInfoW(core::mem::transmute(paddrinfo.unwrap_or(core::mem::zeroed()))) } + unsafe { FreeAddrInfoW(paddrinfo.unwrap_or(core::mem::zeroed()) as _) } } #[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) { windows_targets::link!("mswsock.dll" "system" 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)); - unsafe { GetAcceptExSockaddrs(lpoutputbuffer, dwreceivedatalength, dwlocaladdresslength, dwremoteaddresslength, core::mem::transmute(localsockaddr), core::mem::transmute(localsockaddrlength), core::mem::transmute(remotesockaddr), core::mem::transmute(remotesockaddrlength)) } + unsafe { GetAcceptExSockaddrs(lpoutputbuffer, dwreceivedatalength, dwlocaladdresslength, dwremoteaddresslength, localsockaddr as _, localsockaddrlength as _, remotesockaddr as _, remotesockaddrlength as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -42,20 +42,7 @@ where P1: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn GetAddrInfoExA(pname : windows_core::PCSTR, pservicename : windows_core::PCSTR, dwnamespace : u32, lpnspid : *const windows_core::GUID, hints : *const ADDRINFOEXA, ppresult : *mut *mut ADDRINFOEXA, timeout : *const TIMEVAL, lpoverlapped : *const super::super::System::IO:: OVERLAPPED, lpcompletionroutine : LPLOOKUPSERVICE_COMPLETION_ROUTINE, lpnamehandle : *mut super::super::Foundation:: HANDLE) -> i32); - unsafe { - GetAddrInfoExA( - pname.param().abi(), - pservicename.param().abi(), - 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())), - ) - } + unsafe { GetAddrInfoExA(pname.param().abi(), pservicename.param().abi(), dwnamespace, lpnspid.unwrap_or(core::mem::zeroed()) as _, hints.unwrap_or(core::mem::zeroed()) as _, ppresult as _, timeout.unwrap_or(core::mem::zeroed()) as _, lpoverlapped.unwrap_or(core::mem::zeroed()) as _, lpcompletionroutine.unwrap_or(core::mem::zeroed()) as _, lpnamehandle.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GetAddrInfoExCancel(lphandle: *const super::super::Foundation::HANDLE) -> i32 { @@ -76,7 +63,7 @@ where P1: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn GetAddrInfoExW(pname : windows_core::PCWSTR, pservicename : windows_core::PCWSTR, dwnamespace : u32, lpnspid : *const windows_core::GUID, hints : *const ADDRINFOEXW, ppresult : *mut *mut ADDRINFOEXW, timeout : *const TIMEVAL, lpoverlapped : *const super::super::System::IO:: OVERLAPPED, lpcompletionroutine : LPLOOKUPSERVICE_COMPLETION_ROUTINE, lphandle : *mut super::super::Foundation:: HANDLE) -> i32); - unsafe { GetAddrInfoExW(pname.param().abi(), pservicename.param().abi(), 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()))) } + unsafe { GetAddrInfoExW(pname.param().abi(), pservicename.param().abi(), dwnamespace, lpnspid.unwrap_or(core::mem::zeroed()) as _, hints.unwrap_or(core::mem::zeroed()) as _, ppresult as _, timeout.unwrap_or(core::mem::zeroed()) as _, lpoverlapped.unwrap_or(core::mem::zeroed()) as _, lpcompletionroutine.unwrap_or(core::mem::zeroed()) as _, lphandle.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GetAddrInfoW(pnodename: P0, pservicename: P1, phints: Option<*const ADDRINFOW>, ppresult: *mut *mut ADDRINFOW) -> i32 @@ -85,7 +72,7 @@ where P1: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn GetAddrInfoW(pnodename : windows_core::PCWSTR, pservicename : windows_core::PCWSTR, phints : *const ADDRINFOW, ppresult : *mut *mut ADDRINFOW) -> i32); - unsafe { GetAddrInfoW(pnodename.param().abi(), pservicename.param().abi(), core::mem::transmute(phints.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppresult)) } + unsafe { GetAddrInfoW(pnodename.param().abi(), pservicename.param().abi(), phints.unwrap_or(core::mem::zeroed()) as _, ppresult as _) } } #[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: Option, lpdwaliasbufferlength: *mut u32) -> i32 @@ -93,7 +80,7 @@ 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); - unsafe { GetAddressByNameA(dwnamespace, lpservicetype, lpservicename.param().abi(), core::mem::transmute(lpiprotocols.unwrap_or(core::mem::zeroed())), 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)) } + unsafe { GetAddressByNameA(dwnamespace, lpservicetype, lpservicename.param().abi(), lpiprotocols.unwrap_or(core::mem::zeroed()) as _, dwresolution, lpserviceasyncinfo.unwrap_or(core::mem::zeroed()) as _, lpcsaddrbuffer as _, lpdwbufferlength as _, lpaliasbuffer.unwrap_or(core::mem::zeroed()) as _, lpdwaliasbufferlength as _) } } #[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: Option, lpdwaliasbufferlength: *mut u32) -> i32 @@ -101,7 +88,7 @@ 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); - unsafe { GetAddressByNameW(dwnamespace, lpservicetype, lpservicename.param().abi(), core::mem::transmute(lpiprotocols.unwrap_or(core::mem::zeroed())), 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)) } + unsafe { GetAddressByNameW(dwnamespace, lpservicetype, lpservicename.param().abi(), lpiprotocols.unwrap_or(core::mem::zeroed()) as _, dwresolution, lpserviceasyncinfo.unwrap_or(core::mem::zeroed()) as _, lpcsaddrbuffer as _, lpdwbufferlength as _, lpaliasbuffer.unwrap_or(core::mem::zeroed()) as _, lpdwaliasbufferlength as _) } } #[inline] pub unsafe fn GetHostNameW(name: &mut [u16]) -> i32 { @@ -129,7 +116,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); - unsafe { GetServiceA(dwnamespace, lpguid, lpservicename.param().abi(), dwproperties, core::mem::transmute(lpbuffer), core::mem::transmute(lpdwbuffersize), core::mem::transmute(lpserviceasyncinfo.unwrap_or(core::mem::zeroed()))) } + unsafe { GetServiceA(dwnamespace, lpguid, lpservicename.param().abi(), dwproperties, lpbuffer as _, lpdwbuffersize as _, lpserviceasyncinfo.unwrap_or(core::mem::zeroed()) as _) } } #[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 @@ -137,7 +124,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); - unsafe { GetServiceW(dwnamespace, lpguid, lpservicename.param().abi(), dwproperties, core::mem::transmute(lpbuffer), core::mem::transmute(lpdwbuffersize), core::mem::transmute(lpserviceasyncinfo.unwrap_or(core::mem::zeroed()))) } + unsafe { GetServiceW(dwnamespace, lpguid, lpservicename.param().abi(), dwproperties, lpbuffer as _, lpdwbuffersize as _, lpserviceasyncinfo.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GetTypeByNameA(lpservicename: P0, lpservicetype: *mut windows_core::GUID) -> i32 @@ -145,7 +132,7 @@ where P0: windows_core::Param, { windows_targets::link!("mswsock.dll" "system" fn GetTypeByNameA(lpservicename : windows_core::PCSTR, lpservicetype : *mut windows_core::GUID) -> i32); - unsafe { GetTypeByNameA(lpservicename.param().abi(), core::mem::transmute(lpservicetype)) } + unsafe { GetTypeByNameA(lpservicename.param().abi(), lpservicetype as _) } } #[inline] pub unsafe fn GetTypeByNameW(lpservicename: P0, lpservicetype: *mut windows_core::GUID) -> i32 @@ -153,7 +140,7 @@ where P0: windows_core::Param, { windows_targets::link!("mswsock.dll" "system" fn GetTypeByNameW(lpservicename : windows_core::PCWSTR, lpservicetype : *mut windows_core::GUID) -> i32); - unsafe { GetTypeByNameW(lpservicename.param().abi(), core::mem::transmute(lpservicetype)) } + unsafe { GetTypeByNameW(lpservicename.param().abi(), lpservicetype as _) } } #[inline] pub unsafe fn InetNtopW(family: i32, paddr: *const core::ffi::c_void, pstringbuf: &mut [u16]) -> windows_core::PCWSTR { @@ -166,13 +153,13 @@ where P1: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn InetPtonW(family : i32, pszaddrstring : windows_core::PCWSTR, paddrbuf : *mut core::ffi::c_void) -> i32); - unsafe { InetPtonW(family, pszaddrstring.param().abi(), core::mem::transmute(paddrbuf)) } + unsafe { InetPtonW(family, pszaddrstring.param().abi(), paddrbuf as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { ProcessSocketNotifications(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())), 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::mem::zeroed()))) } + unsafe { ProcessSocketNotifications(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())), 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())), receivedentrycount.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RtlEthernetAddressToStringA(addr: *const DL_EUI48, s: &mut [u8; 18]) -> windows_core::PSTR { @@ -190,7 +177,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlEthernetStringToAddressA(s : windows_core::PCSTR, terminator : *mut windows_core::PCSTR, addr : *mut DL_EUI48) -> i32); - unsafe { RtlEthernetStringToAddressA(s.param().abi(), core::mem::transmute(terminator), core::mem::transmute(addr)) } + unsafe { RtlEthernetStringToAddressA(s.param().abi(), terminator as _, addr as _) } } #[inline] pub unsafe fn RtlEthernetStringToAddressW(s: P0, terminator: *mut windows_core::PCWSTR, addr: *mut DL_EUI48) -> i32 @@ -198,7 +185,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlEthernetStringToAddressW(s : windows_core::PCWSTR, terminator : *mut windows_core::PCWSTR, addr : *mut DL_EUI48) -> i32); - unsafe { RtlEthernetStringToAddressW(s.param().abi(), core::mem::transmute(terminator), core::mem::transmute(addr)) } + unsafe { RtlEthernetStringToAddressW(s.param().abi(), terminator as _, addr as _) } } #[inline] pub unsafe fn RtlIpv4AddressToStringA(addr: *const IN_ADDR, s: &mut [u8; 16]) -> windows_core::PSTR { @@ -208,12 +195,12 @@ pub unsafe fn RtlIpv4AddressToStringA(addr: *const IN_ADDR, s: &mut [u8; 16]) -> #[inline] pub unsafe fn RtlIpv4AddressToStringExA(address: *const IN_ADDR, port: u16, addressstring: windows_core::PSTR, addressstringlength: *mut u32) -> i32 { windows_targets::link!("ntdll.dll" "system" fn RtlIpv4AddressToStringExA(address : *const IN_ADDR, port : u16, addressstring : windows_core::PSTR, addressstringlength : *mut u32) -> i32); - unsafe { RtlIpv4AddressToStringExA(address, port, core::mem::transmute(addressstring), core::mem::transmute(addressstringlength)) } + unsafe { RtlIpv4AddressToStringExA(address, port, core::mem::transmute(addressstring), addressstringlength as _) } } #[inline] pub unsafe fn RtlIpv4AddressToStringExW(address: *const IN_ADDR, port: u16, addressstring: windows_core::PWSTR, addressstringlength: *mut u32) -> i32 { windows_targets::link!("ntdll.dll" "system" fn RtlIpv4AddressToStringExW(address : *const IN_ADDR, port : u16, addressstring : windows_core::PWSTR, addressstringlength : *mut u32) -> i32); - unsafe { RtlIpv4AddressToStringExW(address, port, core::mem::transmute(addressstring), core::mem::transmute(addressstringlength)) } + unsafe { RtlIpv4AddressToStringExW(address, port, core::mem::transmute(addressstring), addressstringlength as _) } } #[inline] pub unsafe fn RtlIpv4AddressToStringW(addr: *const IN_ADDR, s: &mut [u16; 16]) -> windows_core::PWSTR { @@ -226,7 +213,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlIpv4StringToAddressA(s : windows_core::PCSTR, strict : bool, terminator : *mut windows_core::PCSTR, addr : *mut IN_ADDR) -> i32); - unsafe { RtlIpv4StringToAddressA(s.param().abi(), strict, core::mem::transmute(terminator), core::mem::transmute(addr)) } + unsafe { RtlIpv4StringToAddressA(s.param().abi(), strict, terminator as _, addr as _) } } #[inline] pub unsafe fn RtlIpv4StringToAddressExA(addressstring: P0, strict: bool, address: *mut IN_ADDR, port: *mut u16) -> i32 @@ -234,7 +221,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlIpv4StringToAddressExA(addressstring : windows_core::PCSTR, strict : bool, address : *mut IN_ADDR, port : *mut u16) -> i32); - unsafe { RtlIpv4StringToAddressExA(addressstring.param().abi(), strict, core::mem::transmute(address), core::mem::transmute(port)) } + unsafe { RtlIpv4StringToAddressExA(addressstring.param().abi(), strict, address as _, port as _) } } #[inline] pub unsafe fn RtlIpv4StringToAddressExW(addressstring: P0, strict: bool, address: *mut IN_ADDR, port: *mut u16) -> i32 @@ -242,7 +229,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlIpv4StringToAddressExW(addressstring : windows_core::PCWSTR, strict : bool, address : *mut IN_ADDR, port : *mut u16) -> i32); - unsafe { RtlIpv4StringToAddressExW(addressstring.param().abi(), strict, core::mem::transmute(address), core::mem::transmute(port)) } + unsafe { RtlIpv4StringToAddressExW(addressstring.param().abi(), strict, address as _, port as _) } } #[inline] pub unsafe fn RtlIpv4StringToAddressW(s: P0, strict: bool, terminator: *mut windows_core::PCWSTR, addr: *mut IN_ADDR) -> i32 @@ -250,7 +237,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlIpv4StringToAddressW(s : windows_core::PCWSTR, strict : bool, terminator : *mut windows_core::PCWSTR, addr : *mut IN_ADDR) -> i32); - unsafe { RtlIpv4StringToAddressW(s.param().abi(), strict, core::mem::transmute(terminator), core::mem::transmute(addr)) } + unsafe { RtlIpv4StringToAddressW(s.param().abi(), strict, terminator as _, addr as _) } } #[inline] pub unsafe fn RtlIpv6AddressToStringA(addr: *const IN6_ADDR, s: &mut [u8; 46]) -> windows_core::PSTR { @@ -260,12 +247,12 @@ pub unsafe fn RtlIpv6AddressToStringA(addr: *const IN6_ADDR, s: &mut [u8; 46]) - #[inline] pub unsafe fn RtlIpv6AddressToStringExA(address: *const IN6_ADDR, scopeid: u32, port: u16, addressstring: windows_core::PSTR, addressstringlength: *mut u32) -> i32 { windows_targets::link!("ntdll.dll" "system" fn RtlIpv6AddressToStringExA(address : *const IN6_ADDR, scopeid : u32, port : u16, addressstring : windows_core::PSTR, addressstringlength : *mut u32) -> i32); - unsafe { RtlIpv6AddressToStringExA(address, scopeid, port, core::mem::transmute(addressstring), core::mem::transmute(addressstringlength)) } + unsafe { RtlIpv6AddressToStringExA(address, scopeid, port, core::mem::transmute(addressstring), addressstringlength as _) } } #[inline] pub unsafe fn RtlIpv6AddressToStringExW(address: *const IN6_ADDR, scopeid: u32, port: u16, addressstring: windows_core::PWSTR, addressstringlength: *mut u32) -> i32 { windows_targets::link!("ntdll.dll" "system" fn RtlIpv6AddressToStringExW(address : *const IN6_ADDR, scopeid : u32, port : u16, addressstring : windows_core::PWSTR, addressstringlength : *mut u32) -> i32); - unsafe { RtlIpv6AddressToStringExW(address, scopeid, port, core::mem::transmute(addressstring), core::mem::transmute(addressstringlength)) } + unsafe { RtlIpv6AddressToStringExW(address, scopeid, port, core::mem::transmute(addressstring), addressstringlength as _) } } #[inline] pub unsafe fn RtlIpv6AddressToStringW(addr: *const IN6_ADDR, s: &mut [u16; 46]) -> windows_core::PWSTR { @@ -278,7 +265,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlIpv6StringToAddressA(s : windows_core::PCSTR, terminator : *mut windows_core::PCSTR, addr : *mut IN6_ADDR) -> i32); - unsafe { RtlIpv6StringToAddressA(s.param().abi(), core::mem::transmute(terminator), core::mem::transmute(addr)) } + unsafe { RtlIpv6StringToAddressA(s.param().abi(), terminator as _, addr as _) } } #[inline] pub unsafe fn RtlIpv6StringToAddressExA(addressstring: P0, address: *mut IN6_ADDR, scopeid: *mut u32, port: *mut u16) -> i32 @@ -286,7 +273,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlIpv6StringToAddressExA(addressstring : windows_core::PCSTR, address : *mut IN6_ADDR, scopeid : *mut u32, port : *mut u16) -> i32); - unsafe { RtlIpv6StringToAddressExA(addressstring.param().abi(), core::mem::transmute(address), core::mem::transmute(scopeid), core::mem::transmute(port)) } + unsafe { RtlIpv6StringToAddressExA(addressstring.param().abi(), address as _, scopeid as _, port as _) } } #[inline] pub unsafe fn RtlIpv6StringToAddressExW(addressstring: P0, address: *mut IN6_ADDR, scopeid: *mut u32, port: *mut u16) -> i32 @@ -294,7 +281,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlIpv6StringToAddressExW(addressstring : windows_core::PCWSTR, address : *mut IN6_ADDR, scopeid : *mut u32, port : *mut u16) -> i32); - unsafe { RtlIpv6StringToAddressExW(addressstring.param().abi(), core::mem::transmute(address), core::mem::transmute(scopeid), core::mem::transmute(port)) } + unsafe { RtlIpv6StringToAddressExW(addressstring.param().abi(), address as _, scopeid as _, port as _) } } #[inline] pub unsafe fn RtlIpv6StringToAddressW(s: P0, terminator: *mut windows_core::PCWSTR, addr: *mut IN6_ADDR) -> i32 @@ -302,7 +289,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlIpv6StringToAddressW(s : windows_core::PCWSTR, terminator : *mut windows_core::PCWSTR, addr : *mut IN6_ADDR) -> i32); - unsafe { RtlIpv6StringToAddressW(s.param().abi(), core::mem::transmute(terminator), core::mem::transmute(addr)) } + unsafe { RtlIpv6StringToAddressW(s.param().abi(), terminator as _, addr as _) } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_IO"))] #[inline] @@ -312,22 +299,7 @@ where P1: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn SetAddrInfoExA(pname : windows_core::PCSTR, pservicename : windows_core::PCSTR, paddresses : *const SOCKET_ADDRESS, dwaddresscount : u32, lpblob : *const super::super::System::Com:: BLOB, dwflags : u32, dwnamespace : u32, lpnspid : *const windows_core::GUID, timeout : *const TIMEVAL, lpoverlapped : *const super::super::System::IO:: OVERLAPPED, lpcompletionroutine : LPLOOKUPSERVICE_COMPLETION_ROUTINE, lpnamehandle : *mut super::super::Foundation:: HANDLE) -> i32); - unsafe { - SetAddrInfoExA( - pname.param().abi(), - pservicename.param().abi(), - core::mem::transmute(paddresses.unwrap_or(core::mem::zeroed())), - dwaddresscount, - core::mem::transmute(lpblob.unwrap_or(core::mem::zeroed())), - dwflags, - dwnamespace, - 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())), - ) - } + unsafe { SetAddrInfoExA(pname.param().abi(), pservicename.param().abi(), paddresses.unwrap_or(core::mem::zeroed()) as _, dwaddresscount, lpblob.unwrap_or(core::mem::zeroed()) as _, dwflags, dwnamespace, lpnspid.unwrap_or(core::mem::zeroed()) as _, timeout.unwrap_or(core::mem::zeroed()) as _, lpoverlapped.unwrap_or(core::mem::zeroed()) as _, lpcompletionroutine.unwrap_or(core::mem::zeroed()) as _, lpnamehandle.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_IO"))] #[inline] @@ -337,34 +309,19 @@ where P1: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn SetAddrInfoExW(pname : windows_core::PCWSTR, pservicename : windows_core::PCWSTR, paddresses : *const SOCKET_ADDRESS, dwaddresscount : u32, lpblob : *const super::super::System::Com:: BLOB, dwflags : u32, dwnamespace : u32, lpnspid : *const windows_core::GUID, timeout : *const TIMEVAL, lpoverlapped : *const super::super::System::IO:: OVERLAPPED, lpcompletionroutine : LPLOOKUPSERVICE_COMPLETION_ROUTINE, lpnamehandle : *mut super::super::Foundation:: HANDLE) -> i32); - unsafe { - SetAddrInfoExW( - pname.param().abi(), - pservicename.param().abi(), - core::mem::transmute(paddresses.unwrap_or(core::mem::zeroed())), - dwaddresscount, - core::mem::transmute(lpblob.unwrap_or(core::mem::zeroed())), - dwflags, - dwnamespace, - 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())), - ) - } + unsafe { SetAddrInfoExW(pname.param().abi(), pservicename.param().abi(), paddresses.unwrap_or(core::mem::zeroed()) as _, dwaddresscount, lpblob.unwrap_or(core::mem::zeroed()) as _, dwflags, dwnamespace, lpnspid.unwrap_or(core::mem::zeroed()) as _, timeout.unwrap_or(core::mem::zeroed()) as _, lpoverlapped.unwrap_or(core::mem::zeroed()) as _, lpcompletionroutine.unwrap_or(core::mem::zeroed()) as _, lpnamehandle.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { SetServiceA(dwnamespace, dwoperation, dwflags, lpserviceinfo, core::mem::transmute(lpserviceasyncinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwstatusflags)) } + unsafe { SetServiceA(dwnamespace, dwoperation, dwflags, lpserviceinfo, lpserviceasyncinfo.unwrap_or(core::mem::zeroed()) as _, lpdwstatusflags as _) } } #[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); - unsafe { SetServiceW(dwnamespace, dwoperation, dwflags, lpserviceinfo, core::mem::transmute(lpserviceasyncinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwstatusflags)) } + unsafe { SetServiceW(dwnamespace, dwoperation, dwflags, lpserviceinfo, lpserviceasyncinfo.unwrap_or(core::mem::zeroed()) as _, lpdwstatusflags as _) } } #[inline] pub unsafe fn SetSocketMediaStreamingMode(value: bool) -> windows_core::Result<()> { @@ -375,29 +332,29 @@ pub unsafe fn SetSocketMediaStreamingMode(value: bool) -> windows_core::Result<( #[inline] 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); - unsafe { TransmitFile(hsocket, hfile, nnumberofbytestowrite, nnumberofbytespersend, core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed())), core::mem::transmute(lptransmitbuffers.unwrap_or(core::mem::zeroed())), dwreserved) } + unsafe { TransmitFile(hsocket, hfile, nnumberofbytestowrite, nnumberofbytespersend, lpoverlapped.unwrap_or(core::mem::zeroed()) as _, lptransmitbuffers.unwrap_or(core::mem::zeroed()) as _, dwreserved) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { WPUCompleteOverlappedRequest(s, core::mem::transmute(lpoverlapped), dwerror, cbtransferred, core::mem::transmute(lperrno)) } + unsafe { WPUCompleteOverlappedRequest(s, lpoverlapped as _, dwerror, cbtransferred, lperrno as _) } } #[inline] 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__ = unsafe { WSAAccept(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()))) }; + let result__ = unsafe { WSAAccept(s, addr.unwrap_or(core::mem::zeroed()) as _, addrlen.unwrap_or(core::mem::zeroed()) as _, lpfncondition.unwrap_or(core::mem::zeroed()) as _, dwcallbackdata.unwrap_or(core::mem::zeroed()) as _) }; (!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); - unsafe { WSAAddressToStringA(lpsaaddress, dwaddresslength, core::mem::transmute(lpprotocolinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpszaddressstring), core::mem::transmute(lpdwaddressstringlength)) } + unsafe { WSAAddressToStringA(lpsaaddress, dwaddresslength, lpprotocolinfo.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(lpszaddressstring), lpdwaddressstringlength as _) } } #[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); - unsafe { WSAAddressToStringW(lpsaaddress, dwaddresslength, core::mem::transmute(lpprotocolinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpszaddressstring), core::mem::transmute(lpdwaddressstringlength)) } + unsafe { WSAAddressToStringW(lpsaaddress, dwaddresslength, lpprotocolinfo.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(lpszaddressstring), lpdwaddressstringlength as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -482,13 +439,13 @@ pub unsafe fn WSACloseEvent(hevent: WSAEVENT) -> windows_core::Result<()> { #[inline] 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); - unsafe { WSAConnect(s, name, 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()))) } + unsafe { WSAConnect(s, name, namelen, lpcallerdata.unwrap_or(core::mem::zeroed()) as _, lpcalleedata.unwrap_or(core::mem::zeroed()) as _, lpsqos.unwrap_or(core::mem::zeroed()) as _, lpgqos.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { WSAConnectByList(s, 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() } + unsafe { WSAConnectByList(s, socketaddress, localaddresslength.unwrap_or(core::mem::zeroed()) as _, localaddress.unwrap_or(core::mem::zeroed()) as _, remoteaddresslength.unwrap_or(core::mem::zeroed()) as _, remoteaddress.unwrap_or(core::mem::zeroed()) as _, timeout.unwrap_or(core::mem::zeroed()) as _, reserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -498,7 +455,7 @@ where P2: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn WSAConnectByNameA(s : SOCKET, nodename : windows_core::PCSTR, servicename : windows_core::PCSTR, localaddresslength : *mut u32, localaddress : *mut SOCKADDR, remoteaddresslength : *mut u32, remoteaddress : *mut SOCKADDR, timeout : *const TIMEVAL, reserved : *const super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - unsafe { WSAConnectByNameA(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() } + unsafe { WSAConnectByNameA(s, nodename.param().abi(), servicename.param().abi(), localaddresslength.unwrap_or(core::mem::zeroed()) as _, localaddress.unwrap_or(core::mem::zeroed()) as _, remoteaddresslength.unwrap_or(core::mem::zeroed()) as _, remoteaddress.unwrap_or(core::mem::zeroed()) as _, timeout.unwrap_or(core::mem::zeroed()) as _, reserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -508,7 +465,7 @@ where P2: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn WSAConnectByNameW(s : SOCKET, nodename : windows_core::PCWSTR, servicename : windows_core::PCWSTR, localaddresslength : *mut u32, localaddress : *mut SOCKADDR, remoteaddresslength : *mut u32, remoteaddress : *mut SOCKADDR, timeout : *const TIMEVAL, reserved : *const super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - unsafe { WSAConnectByNameW(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() } + unsafe { WSAConnectByNameW(s, nodename.param().abi(), servicename.param().abi(), localaddresslength.unwrap_or(core::mem::zeroed()) as _, localaddress.unwrap_or(core::mem::zeroed()) as _, remoteaddresslength.unwrap_or(core::mem::zeroed()) as _, remoteaddress.unwrap_or(core::mem::zeroed()) as _, timeout.unwrap_or(core::mem::zeroed()) as _, reserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WSACreateEvent() -> windows_core::Result { @@ -520,59 +477,59 @@ pub unsafe fn WSACreateEvent() -> windows_core::Result { #[inline] 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); - unsafe { WSADeleteSocketPeerTargetName(socket, peeraddr, peeraddrlen, core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed())), core::mem::transmute(completionroutine.unwrap_or(core::mem::zeroed()))) } + unsafe { WSADeleteSocketPeerTargetName(socket, peeraddr, peeraddrlen, overlapped.unwrap_or(core::mem::zeroed()) as _, completionroutine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { WSADuplicateSocketA(s, dwprocessid, core::mem::transmute(lpprotocolinfo)) } + unsafe { WSADuplicateSocketA(s, dwprocessid, lpprotocolinfo as _) } } #[inline] 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); - unsafe { WSADuplicateSocketW(s, dwprocessid, core::mem::transmute(lpprotocolinfo)) } + unsafe { WSADuplicateSocketW(s, dwprocessid, lpprotocolinfo as _) } } #[inline] pub unsafe fn WSAEnumNameSpaceProvidersA(lpdwbufferlength: *mut u32, lpnspbuffer: *mut WSANAMESPACE_INFOA) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSAEnumNameSpaceProvidersA(lpdwbufferlength : *mut u32, lpnspbuffer : *mut WSANAMESPACE_INFOA) -> i32); - unsafe { WSAEnumNameSpaceProvidersA(core::mem::transmute(lpdwbufferlength), core::mem::transmute(lpnspbuffer)) } + unsafe { WSAEnumNameSpaceProvidersA(lpdwbufferlength as _, lpnspbuffer as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn WSAEnumNameSpaceProvidersExA(lpdwbufferlength: *mut u32, lpnspbuffer: *mut WSANAMESPACE_INFOEXA) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSAEnumNameSpaceProvidersExA(lpdwbufferlength : *mut u32, lpnspbuffer : *mut WSANAMESPACE_INFOEXA) -> i32); - unsafe { WSAEnumNameSpaceProvidersExA(core::mem::transmute(lpdwbufferlength), core::mem::transmute(lpnspbuffer)) } + unsafe { WSAEnumNameSpaceProvidersExA(lpdwbufferlength as _, lpnspbuffer as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn WSAEnumNameSpaceProvidersExW(lpdwbufferlength: *mut u32, lpnspbuffer: *mut WSANAMESPACE_INFOEXW) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSAEnumNameSpaceProvidersExW(lpdwbufferlength : *mut u32, lpnspbuffer : *mut WSANAMESPACE_INFOEXW) -> i32); - unsafe { WSAEnumNameSpaceProvidersExW(core::mem::transmute(lpdwbufferlength), core::mem::transmute(lpnspbuffer)) } + unsafe { WSAEnumNameSpaceProvidersExW(lpdwbufferlength as _, lpnspbuffer as _) } } #[inline] pub unsafe fn WSAEnumNameSpaceProvidersW(lpdwbufferlength: *mut u32, lpnspbuffer: *mut WSANAMESPACE_INFOW) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSAEnumNameSpaceProvidersW(lpdwbufferlength : *mut u32, lpnspbuffer : *mut WSANAMESPACE_INFOW) -> i32); - unsafe { WSAEnumNameSpaceProvidersW(core::mem::transmute(lpdwbufferlength), core::mem::transmute(lpnspbuffer)) } + unsafe { WSAEnumNameSpaceProvidersW(lpdwbufferlength as _, lpnspbuffer as _) } } #[inline] 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); - unsafe { WSAEnumNetworkEvents(s, heventobject, core::mem::transmute(lpnetworkevents)) } + unsafe { WSAEnumNetworkEvents(s, heventobject, lpnetworkevents as _) } } #[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); - unsafe { WSAEnumProtocolsA(core::mem::transmute(lpiprotocols.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpprotocolbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwbufferlength)) } + unsafe { WSAEnumProtocolsA(lpiprotocols.unwrap_or(core::mem::zeroed()) as _, lpprotocolbuffer.unwrap_or(core::mem::zeroed()) as _, lpdwbufferlength as _) } } #[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); - unsafe { WSAEnumProtocolsW(core::mem::transmute(lpiprotocols.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpprotocolbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwbufferlength)) } + unsafe { WSAEnumProtocolsW(lpiprotocols.unwrap_or(core::mem::zeroed()) as _, lpprotocolbuffer.unwrap_or(core::mem::zeroed()) as _, lpdwbufferlength as _) } } #[inline] 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); - unsafe { WSAEventSelect(s, core::mem::transmute(heventobject.unwrap_or(core::mem::zeroed())), lnetworkevents) } + unsafe { WSAEventSelect(s, heventobject.unwrap_or(core::mem::zeroed()) as _, lnetworkevents) } } #[inline] pub unsafe fn WSAGetLastError() -> WSA_ERROR { @@ -583,47 +540,47 @@ pub unsafe fn WSAGetLastError() -> WSA_ERROR { #[inline] pub unsafe fn WSAGetOverlappedResult(s: SOCKET, lpoverlapped: *const super::super::System::IO::OVERLAPPED, lpcbtransfer: *mut u32, fwait: bool, lpdwflags: *mut u32) -> windows_core::Result<()> { 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); - unsafe { WSAGetOverlappedResult(s, lpoverlapped, core::mem::transmute(lpcbtransfer), fwait.into(), core::mem::transmute(lpdwflags)).ok() } + unsafe { WSAGetOverlappedResult(s, lpoverlapped, lpcbtransfer as _, fwait.into(), lpdwflags as _).ok() } } #[inline] 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); - unsafe { WSAGetQOSByName(s, lpqosname, core::mem::transmute(lpqos)).ok() } + unsafe { WSAGetQOSByName(s, lpqosname, lpqos as _).ok() } } #[inline] pub unsafe fn WSAGetServiceClassInfoA(lpproviderid: *const windows_core::GUID, lpserviceclassid: *const windows_core::GUID, lpdwbufsize: *mut u32, lpserviceclassinfo: *mut WSASERVICECLASSINFOA) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSAGetServiceClassInfoA(lpproviderid : *const windows_core::GUID, lpserviceclassid : *const windows_core::GUID, lpdwbufsize : *mut u32, lpserviceclassinfo : *mut WSASERVICECLASSINFOA) -> i32); - unsafe { WSAGetServiceClassInfoA(lpproviderid, lpserviceclassid, core::mem::transmute(lpdwbufsize), core::mem::transmute(lpserviceclassinfo)) } + unsafe { WSAGetServiceClassInfoA(lpproviderid, lpserviceclassid, lpdwbufsize as _, lpserviceclassinfo as _) } } #[inline] pub unsafe fn WSAGetServiceClassInfoW(lpproviderid: *const windows_core::GUID, lpserviceclassid: *const windows_core::GUID, lpdwbufsize: *mut u32, lpserviceclassinfo: *mut WSASERVICECLASSINFOW) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSAGetServiceClassInfoW(lpproviderid : *const windows_core::GUID, lpserviceclassid : *const windows_core::GUID, lpdwbufsize : *mut u32, lpserviceclassinfo : *mut WSASERVICECLASSINFOW) -> i32); - unsafe { WSAGetServiceClassInfoW(lpproviderid, lpserviceclassid, core::mem::transmute(lpdwbufsize), core::mem::transmute(lpserviceclassinfo)) } + unsafe { WSAGetServiceClassInfoW(lpproviderid, lpserviceclassid, lpdwbufsize as _, lpserviceclassinfo as _) } } #[inline] pub unsafe fn WSAGetServiceClassNameByClassIdA(lpserviceclassid: *const windows_core::GUID, lpszserviceclassname: windows_core::PSTR, lpdwbufferlength: *mut u32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSAGetServiceClassNameByClassIdA(lpserviceclassid : *const windows_core::GUID, lpszserviceclassname : windows_core::PSTR, lpdwbufferlength : *mut u32) -> i32); - unsafe { WSAGetServiceClassNameByClassIdA(lpserviceclassid, core::mem::transmute(lpszserviceclassname), core::mem::transmute(lpdwbufferlength)) } + unsafe { WSAGetServiceClassNameByClassIdA(lpserviceclassid, core::mem::transmute(lpszserviceclassname), lpdwbufferlength as _) } } #[inline] pub unsafe fn WSAGetServiceClassNameByClassIdW(lpserviceclassid: *const windows_core::GUID, lpszserviceclassname: windows_core::PWSTR, lpdwbufferlength: *mut u32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSAGetServiceClassNameByClassIdW(lpserviceclassid : *const windows_core::GUID, lpszserviceclassname : windows_core::PWSTR, lpdwbufferlength : *mut u32) -> i32); - unsafe { WSAGetServiceClassNameByClassIdW(lpserviceclassid, core::mem::transmute(lpszserviceclassname), core::mem::transmute(lpdwbufferlength)) } + unsafe { WSAGetServiceClassNameByClassIdW(lpserviceclassid, core::mem::transmute(lpszserviceclassname), lpdwbufferlength as _) } } #[inline] 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); - unsafe { WSAHtonl(s, hostlong, core::mem::transmute(lpnetlong)) } + unsafe { WSAHtonl(s, hostlong, lpnetlong as _) } } #[inline] 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); - unsafe { WSAHtons(s, hostshort, core::mem::transmute(lpnetshort)) } + unsafe { WSAHtons(s, hostshort, lpnetshort as _) } } #[inline] 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); - unsafe { WSAImpersonateSocketPeer(socket, core::mem::transmute(peeraddr.unwrap_or(core::mem::zeroed())), peeraddrlen) } + unsafe { WSAImpersonateSocketPeer(socket, peeraddr.unwrap_or(core::mem::zeroed()) as _, peeraddrlen) } } #[inline] pub unsafe fn WSAInstallServiceClassA(lpserviceclassinfo: *const WSASERVICECLASSINFOA) -> i32 { @@ -639,7 +596,7 @@ pub unsafe fn WSAInstallServiceClassW(lpserviceclassinfo: *const WSASERVICECLASS #[inline] 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); - unsafe { WSAIoctl(s, dwiocontrolcode, core::mem::transmute(lpvinbuffer.unwrap_or(core::mem::zeroed())), cbinbuffer, core::mem::transmute(lpvoutbuffer.unwrap_or(core::mem::zeroed())), cboutbuffer, core::mem::transmute(lpcbbytesreturned), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcompletionroutine.unwrap_or(core::mem::zeroed()))) } + unsafe { WSAIoctl(s, dwiocontrolcode, lpvinbuffer.unwrap_or(core::mem::zeroed()) as _, cbinbuffer, lpvoutbuffer.unwrap_or(core::mem::zeroed()) as _, cboutbuffer, lpcbbytesreturned as _, lpoverlapped.unwrap_or(core::mem::zeroed()) as _, lpcompletionroutine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn WSAIsBlocking() -> windows_core::Result<()> { @@ -649,20 +606,20 @@ pub unsafe fn WSAIsBlocking() -> windows_core::Result<()> { #[inline] 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__ = unsafe { WSAJoinLeaf(s, name, 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())), dwflags) }; + let result__ = unsafe { WSAJoinLeaf(s, name, namelen, lpcallerdata.unwrap_or(core::mem::zeroed()) as _, lpcalleedata.unwrap_or(core::mem::zeroed()) as _, lpsqos.unwrap_or(core::mem::zeroed()) as _, lpgqos.unwrap_or(core::mem::zeroed()) as _, dwflags) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn WSALookupServiceBeginA(lpqsrestrictions: *const WSAQUERYSETA, dwcontrolflags: u32, lphlookup: *mut super::super::Foundation::HANDLE) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSALookupServiceBeginA(lpqsrestrictions : *const WSAQUERYSETA, dwcontrolflags : u32, lphlookup : *mut super::super::Foundation:: HANDLE) -> i32); - unsafe { WSALookupServiceBeginA(lpqsrestrictions, dwcontrolflags, core::mem::transmute(lphlookup)) } + unsafe { WSALookupServiceBeginA(lpqsrestrictions, dwcontrolflags, lphlookup as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn WSALookupServiceBeginW(lpqsrestrictions: *const WSAQUERYSETW, dwcontrolflags: u32, lphlookup: *mut super::super::Foundation::HANDLE) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSALookupServiceBeginW(lpqsrestrictions : *const WSAQUERYSETW, dwcontrolflags : u32, lphlookup : *mut super::super::Foundation:: HANDLE) -> i32); - unsafe { WSALookupServiceBeginW(lpqsrestrictions, dwcontrolflags, core::mem::transmute(lphlookup)) } + unsafe { WSALookupServiceBeginW(lpqsrestrictions, dwcontrolflags, lphlookup as _) } } #[inline] pub unsafe fn WSALookupServiceEnd(hlookup: super::super::Foundation::HANDLE) -> i32 { @@ -673,34 +630,34 @@ pub unsafe fn WSALookupServiceEnd(hlookup: super::super::Foundation::HANDLE) -> #[inline] 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); - unsafe { WSALookupServiceNextA(hlookup, dwcontrolflags, core::mem::transmute(lpdwbufferlength), core::mem::transmute(lpqsresults)) } + unsafe { WSALookupServiceNextA(hlookup, dwcontrolflags, lpdwbufferlength as _, lpqsresults as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] 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); - unsafe { WSALookupServiceNextW(hlookup, dwcontrolflags, core::mem::transmute(lpdwbufferlength), core::mem::transmute(lpqsresults.unwrap_or(core::mem::zeroed()))) } + unsafe { WSALookupServiceNextW(hlookup, dwcontrolflags, lpdwbufferlength as _, lpqsresults.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { WSANSPIoctl(hlookup, dwcontrolcode, core::mem::transmute(lpvinbuffer.unwrap_or(core::mem::zeroed())), cbinbuffer, core::mem::transmute(lpvoutbuffer.unwrap_or(core::mem::zeroed())), cboutbuffer, core::mem::transmute(lpcbbytesreturned), core::mem::transmute(lpcompletion.unwrap_or(core::mem::zeroed()))) } + unsafe { WSANSPIoctl(hlookup, dwcontrolcode, lpvinbuffer.unwrap_or(core::mem::zeroed()) as _, cbinbuffer, lpvoutbuffer.unwrap_or(core::mem::zeroed()) as _, cboutbuffer, lpcbbytesreturned as _, lpcompletion.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { WSANtohl(s, netlong, core::mem::transmute(lphostlong)) } + unsafe { WSANtohl(s, netlong, lphostlong as _) } } #[inline] 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); - unsafe { WSANtohs(s, netshort, core::mem::transmute(lphostshort)) } + unsafe { WSANtohs(s, netshort, lphostshort as _) } } #[inline] pub unsafe fn WSAPoll(fdarray: *mut WSAPOLLFD, fds: u32, timeout: i32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSAPoll(fdarray : *mut WSAPOLLFD, fds : u32, timeout : i32) -> i32); - unsafe { WSAPoll(core::mem::transmute(fdarray), fds, timeout) } + unsafe { WSAPoll(fdarray as _, fds, timeout) } } #[inline] pub unsafe fn WSAProviderCompleteAsyncCall(hasynccall: super::super::Foundation::HANDLE, iretcode: i32) -> i32 { @@ -711,35 +668,35 @@ pub unsafe fn WSAProviderCompleteAsyncCall(hasynccall: super::super::Foundation: #[inline] 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); - unsafe { WSAProviderConfigChange(core::mem::transmute(lpnotificationhandle), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcompletionroutine.unwrap_or(core::mem::zeroed()))) } + unsafe { WSAProviderConfigChange(lpnotificationhandle as _, lpoverlapped.unwrap_or(core::mem::zeroed()) as _, lpcompletionroutine.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { WSAQuerySocketSecurity(socket, core::mem::transmute(securityquerytemplate.unwrap_or(core::mem::zeroed())), 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()))) } + unsafe { WSAQuerySocketSecurity(socket, securityquerytemplate.unwrap_or(core::mem::zeroed()) as _, securityquerytemplatelen, securityqueryinfo.unwrap_or(core::mem::zeroed()) as _, securityqueryinfolen as _, overlapped.unwrap_or(core::mem::zeroed()) as _, completionroutine.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { WSARecv(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()))) } + unsafe { WSARecv(s, core::mem::transmute(lpbuffers.as_ptr()), lpbuffers.len().try_into().unwrap(), lpnumberofbytesrecvd.unwrap_or(core::mem::zeroed()) as _, lpflags as _, lpoverlapped.unwrap_or(core::mem::zeroed()) as _, lpcompletionroutine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { WSARecvDisconnect(s, core::mem::transmute(lpinbounddisconnectdata.unwrap_or(core::mem::zeroed()))) } + unsafe { WSARecvDisconnect(s, lpinbounddisconnectdata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { WSARecvEx(s, core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap(), core::mem::transmute(flags)) } + unsafe { WSARecvEx(s, core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap(), flags as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { WSARecvFrom(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()))) } + unsafe { WSARecvFrom(s, core::mem::transmute(lpbuffers.as_ptr()), lpbuffers.len().try_into().unwrap(), lpnumberofbytesrecvd.unwrap_or(core::mem::zeroed()) as _, lpflags as _, lpfrom.unwrap_or(core::mem::zeroed()) as _, lpfromlen.unwrap_or(core::mem::zeroed()) as _, lpoverlapped.unwrap_or(core::mem::zeroed()) as _, lpcompletionroutine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn WSARemoveServiceClass(lpserviceclassid: *const windows_core::GUID) -> i32 { @@ -760,24 +717,24 @@ pub unsafe fn WSARevertImpersonation() -> i32 { #[inline] 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); - unsafe { WSASend(s, core::mem::transmute(lpbuffers.as_ptr()), lpbuffers.len().try_into().unwrap(), core::mem::transmute(lpnumberofbytessent.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcompletionroutine.unwrap_or(core::mem::zeroed()))) } + unsafe { WSASend(s, core::mem::transmute(lpbuffers.as_ptr()), lpbuffers.len().try_into().unwrap(), lpnumberofbytessent.unwrap_or(core::mem::zeroed()) as _, dwflags, lpoverlapped.unwrap_or(core::mem::zeroed()) as _, lpcompletionroutine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { WSASendDisconnect(s, core::mem::transmute(lpoutbounddisconnectdata.unwrap_or(core::mem::zeroed()))) } + unsafe { WSASendDisconnect(s, lpoutbounddisconnectdata.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { WSASendMsg(handle, lpmsg, 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()))) } + unsafe { WSASendMsg(handle, lpmsg, dwflags, lpnumberofbytessent.unwrap_or(core::mem::zeroed()) as _, lpoverlapped.unwrap_or(core::mem::zeroed()) as _, lpcompletionroutine.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { WSASendTo(s, core::mem::transmute(lpbuffers.as_ptr()), lpbuffers.len().try_into().unwrap(), core::mem::transmute(lpnumberofbytessent.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(lpto.unwrap_or(core::mem::zeroed())), itolen, core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcompletionroutine.unwrap_or(core::mem::zeroed()))) } + unsafe { WSASendTo(s, core::mem::transmute(lpbuffers.as_ptr()), lpbuffers.len().try_into().unwrap(), lpnumberofbytessent.unwrap_or(core::mem::zeroed()) as _, dwflags, lpto.unwrap_or(core::mem::zeroed()) as _, itolen, lpoverlapped.unwrap_or(core::mem::zeroed()) as _, lpcompletionroutine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn WSASetBlockingHook(lpblockfunc: super::super::Foundation::FARPROC) -> super::super::Foundation::FARPROC { @@ -810,30 +767,30 @@ pub unsafe fn WSASetServiceW(lpqsreginfo: *const WSAQUERYSETW, essoperation: WSA #[inline] 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); - unsafe { WSASetSocketPeerTargetName(socket, peertargetname, peertargetnamelen, core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed())), core::mem::transmute(completionroutine.unwrap_or(core::mem::zeroed()))) } + unsafe { WSASetSocketPeerTargetName(socket, peertargetname, peertargetnamelen, overlapped.unwrap_or(core::mem::zeroed()) as _, completionroutine.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { WSASetSocketSecurity(socket, core::mem::transmute(securitysettings.unwrap_or(core::mem::zeroed())), securitysettingslen, core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed())), core::mem::transmute(completionroutine.unwrap_or(core::mem::zeroed()))) } + unsafe { WSASetSocketSecurity(socket, securitysettings.unwrap_or(core::mem::zeroed()) as _, securitysettingslen, overlapped.unwrap_or(core::mem::zeroed()) as _, completionroutine.unwrap_or(core::mem::zeroed()) as _) } } #[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__ = unsafe { WSASocketA(af, r#type, protocol, core::mem::transmute(lpprotocolinfo.unwrap_or(core::mem::zeroed())), g, dwflags) }; + let result__ = unsafe { WSASocketA(af, r#type, protocol, lpprotocolinfo.unwrap_or(core::mem::zeroed()) as _, g, dwflags) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] pub unsafe fn WSASocketW(af: i32, r#type: i32, protocol: i32, lpprotocolinfo: Option<*const WSAPROTOCOL_INFOW>, g: u32, dwflags: u32) -> windows_core::Result { windows_targets::link!("ws2_32.dll" "system" fn WSASocketW(af : i32, r#type : i32, protocol : i32, lpprotocolinfo : *const WSAPROTOCOL_INFOW, g : u32, dwflags : u32) -> SOCKET); - let result__ = unsafe { WSASocketW(af, r#type, protocol, core::mem::transmute(lpprotocolinfo.unwrap_or(core::mem::zeroed())), g, dwflags) }; + let result__ = unsafe { WSASocketW(af, r#type, protocol, lpprotocolinfo.unwrap_or(core::mem::zeroed()) as _, g, dwflags) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] pub unsafe fn WSAStartup(wversionrequested: u16, lpwsadata: *mut WSADATA) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSAStartup(wversionrequested : u16, lpwsadata : *mut WSADATA) -> i32); - unsafe { WSAStartup(wversionrequested, core::mem::transmute(lpwsadata)) } + unsafe { WSAStartup(wversionrequested, lpwsadata as _) } } #[inline] pub unsafe fn WSAStringToAddressA(addressstring: P0, addressfamily: i32, lpprotocolinfo: Option<*const WSAPROTOCOL_INFOA>, lpaddress: *mut SOCKADDR, lpaddresslength: *mut i32) -> i32 @@ -841,7 +798,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); - unsafe { WSAStringToAddressA(addressstring.param().abi(), addressfamily, core::mem::transmute(lpprotocolinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpaddress), core::mem::transmute(lpaddresslength)) } + unsafe { WSAStringToAddressA(addressstring.param().abi(), addressfamily, lpprotocolinfo.unwrap_or(core::mem::zeroed()) as _, lpaddress as _, lpaddresslength as _) } } #[inline] pub unsafe fn WSAStringToAddressW(addressstring: P0, addressfamily: i32, lpprotocolinfo: Option<*const WSAPROTOCOL_INFOW>, lpaddress: *mut SOCKADDR, lpaddresslength: *mut i32) -> i32 @@ -849,7 +806,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); - unsafe { WSAStringToAddressW(addressstring.param().abi(), addressfamily, core::mem::transmute(lpprotocolinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpaddress), core::mem::transmute(lpaddresslength)) } + unsafe { WSAStringToAddressW(addressstring.param().abi(), addressfamily, lpprotocolinfo.unwrap_or(core::mem::zeroed()) as _, lpaddress as _, lpaddresslength as _) } } #[inline] pub unsafe fn WSAUnadvertiseProvider(puuidproviderid: *const windows_core::GUID) -> i32 { @@ -869,13 +826,13 @@ pub unsafe fn WSAWaitForMultipleEvents(lphevents: &[super::super::Foundation::HA #[inline] pub unsafe fn WSCDeinstallProvider(lpproviderid: *const windows_core::GUID, lperrno: *mut i32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSCDeinstallProvider(lpproviderid : *const windows_core::GUID, lperrno : *mut i32) -> i32); - unsafe { WSCDeinstallProvider(lpproviderid, core::mem::transmute(lperrno)) } + unsafe { WSCDeinstallProvider(lpproviderid, lperrno as _) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] pub unsafe fn WSCDeinstallProvider32(lpproviderid: *const windows_core::GUID, lperrno: *mut i32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSCDeinstallProvider32(lpproviderid : *const windows_core::GUID, lperrno : *mut i32) -> i32); - unsafe { WSCDeinstallProvider32(lpproviderid, core::mem::transmute(lperrno)) } + unsafe { WSCDeinstallProvider32(lpproviderid, lperrno as _) } } #[inline] pub unsafe fn WSCEnableNSProvider(lpproviderid: *const windows_core::GUID, fenable: bool) -> i32 { @@ -892,52 +849,52 @@ pub unsafe fn WSCEnableNSProvider32(lpproviderid: *const windows_core::GUID, fen #[inline] pub unsafe fn WSCEnumNameSpaceProviders32(lpdwbufferlength: *mut u32, lpnspbuffer: *mut WSANAMESPACE_INFOW) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSCEnumNameSpaceProviders32(lpdwbufferlength : *mut u32, lpnspbuffer : *mut WSANAMESPACE_INFOW) -> i32); - unsafe { WSCEnumNameSpaceProviders32(core::mem::transmute(lpdwbufferlength), core::mem::transmute(lpnspbuffer)) } + unsafe { WSCEnumNameSpaceProviders32(lpdwbufferlength as _, lpnspbuffer as _) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn WSCEnumNameSpaceProvidersEx32(lpdwbufferlength: *mut u32, lpnspbuffer: *mut WSANAMESPACE_INFOEXW) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSCEnumNameSpaceProvidersEx32(lpdwbufferlength : *mut u32, lpnspbuffer : *mut WSANAMESPACE_INFOEXW) -> i32); - unsafe { WSCEnumNameSpaceProvidersEx32(core::mem::transmute(lpdwbufferlength), core::mem::transmute(lpnspbuffer)) } + unsafe { WSCEnumNameSpaceProvidersEx32(lpdwbufferlength as _, lpnspbuffer as _) } } #[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); - unsafe { 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)) } + unsafe { WSCEnumProtocols(lpiprotocols.unwrap_or(core::mem::zeroed()) as _, lpprotocolbuffer.unwrap_or(core::mem::zeroed()) as _, lpdwbufferlength as _, lperrno as _) } } #[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); - unsafe { WSCEnumProtocols32(core::mem::transmute(lpiprotocols.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpprotocolbuffer), core::mem::transmute(lpdwbufferlength), core::mem::transmute(lperrno)) } + unsafe { WSCEnumProtocols32(lpiprotocols.unwrap_or(core::mem::zeroed()) as _, lpprotocolbuffer as _, lpdwbufferlength as _, lperrno as _) } } #[inline] pub unsafe fn WSCGetApplicationCategory(path: &[u16], extra: Option<&[u16]>, ppermittedlspcategories: *mut u32, lperrno: *mut i32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSCGetApplicationCategory(path : windows_core::PCWSTR, pathlength : u32, extra : windows_core::PCWSTR, extralength : u32, ppermittedlspcategories : *mut u32, lperrno : *mut i32) -> i32); - unsafe { WSCGetApplicationCategory(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(ppermittedlspcategories), core::mem::transmute(lperrno)) } + unsafe { WSCGetApplicationCategory(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()), ppermittedlspcategories as _, lperrno as _) } } #[inline] pub unsafe fn WSCGetProviderInfo(lpproviderid: *const windows_core::GUID, infotype: WSC_PROVIDER_INFO_TYPE, info: *mut u8, infosize: *mut usize, flags: u32, lperrno: *mut i32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSCGetProviderInfo(lpproviderid : *const windows_core::GUID, infotype : WSC_PROVIDER_INFO_TYPE, info : *mut u8, infosize : *mut usize, flags : u32, lperrno : *mut i32) -> i32); - unsafe { WSCGetProviderInfo(lpproviderid, infotype, core::mem::transmute(info), core::mem::transmute(infosize), flags, core::mem::transmute(lperrno)) } + unsafe { WSCGetProviderInfo(lpproviderid, infotype, info as _, infosize as _, flags, lperrno as _) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] pub unsafe fn WSCGetProviderInfo32(lpproviderid: *const windows_core::GUID, infotype: WSC_PROVIDER_INFO_TYPE, info: *mut u8, infosize: *mut usize, flags: u32, lperrno: *mut i32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSCGetProviderInfo32(lpproviderid : *const windows_core::GUID, infotype : WSC_PROVIDER_INFO_TYPE, info : *mut u8, infosize : *mut usize, flags : u32, lperrno : *mut i32) -> i32); - unsafe { WSCGetProviderInfo32(lpproviderid, infotype, core::mem::transmute(info), core::mem::transmute(infosize), flags, core::mem::transmute(lperrno)) } + unsafe { WSCGetProviderInfo32(lpproviderid, infotype, info as _, infosize as _, flags, lperrno as _) } } #[inline] pub unsafe fn WSCGetProviderPath(lpproviderid: *const windows_core::GUID, lpszproviderdllpath: windows_core::PWSTR, lpproviderdllpathlen: *mut i32, lperrno: *mut i32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSCGetProviderPath(lpproviderid : *const windows_core::GUID, lpszproviderdllpath : windows_core::PWSTR, lpproviderdllpathlen : *mut i32, lperrno : *mut i32) -> i32); - unsafe { WSCGetProviderPath(lpproviderid, core::mem::transmute(lpszproviderdllpath), core::mem::transmute(lpproviderdllpathlen), core::mem::transmute(lperrno)) } + unsafe { WSCGetProviderPath(lpproviderid, core::mem::transmute(lpszproviderdllpath), lpproviderdllpathlen as _, lperrno as _) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] pub unsafe fn WSCGetProviderPath32(lpproviderid: *const windows_core::GUID, lpszproviderdllpath: windows_core::PWSTR, lpproviderdllpathlen: *mut i32, lperrno: *mut i32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSCGetProviderPath32(lpproviderid : *const windows_core::GUID, lpszproviderdllpath : windows_core::PWSTR, lpproviderdllpathlen : *mut i32, lperrno : *mut i32) -> i32); - unsafe { WSCGetProviderPath32(lpproviderid, core::mem::transmute(lpszproviderdllpath), core::mem::transmute(lpproviderdllpathlen), core::mem::transmute(lperrno)) } + unsafe { WSCGetProviderPath32(lpproviderid, core::mem::transmute(lpszproviderdllpath), lpproviderdllpathlen as _, lperrno as _) } } #[inline] pub unsafe fn WSCInstallNameSpace(lpszidentifier: P0, lpszpathname: P1, dwnamespace: u32, dwversion: u32, lpproviderid: *const windows_core::GUID) -> i32 @@ -985,7 +942,7 @@ where P1: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn WSCInstallProvider(lpproviderid : *const windows_core::GUID, lpszproviderdllpath : windows_core::PCWSTR, lpprotocolinfolist : *const WSAPROTOCOL_INFOW, dwnumberofentries : u32, lperrno : *mut i32) -> i32); - unsafe { WSCInstallProvider(lpproviderid, lpszproviderdllpath.param().abi(), core::mem::transmute(lpprotocolinfolist.as_ptr()), lpprotocolinfolist.len().try_into().unwrap(), core::mem::transmute(lperrno)) } + unsafe { WSCInstallProvider(lpproviderid, lpszproviderdllpath.param().abi(), core::mem::transmute(lpprotocolinfolist.as_ptr()), lpprotocolinfolist.len().try_into().unwrap(), lperrno as _) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] @@ -994,7 +951,7 @@ where P1: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn WSCInstallProvider64_32(lpproviderid : *const windows_core::GUID, lpszproviderdllpath : windows_core::PCWSTR, lpprotocolinfolist : *const WSAPROTOCOL_INFOW, dwnumberofentries : u32, lperrno : *mut i32) -> i32); - unsafe { WSCInstallProvider64_32(lpproviderid, lpszproviderdllpath.param().abi(), core::mem::transmute(lpprotocolinfolist.as_ptr()), lpprotocolinfolist.len().try_into().unwrap(), core::mem::transmute(lperrno)) } + unsafe { WSCInstallProvider64_32(lpproviderid, lpszproviderdllpath.param().abi(), core::mem::transmute(lpprotocolinfolist.as_ptr()), lpprotocolinfolist.len().try_into().unwrap(), lperrno as _) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] @@ -1005,23 +962,23 @@ 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); - unsafe { WSCInstallProviderAndChains64_32(lpproviderid, lpszproviderdllpath.param().abi(), lpszproviderdllpath32.param().abi(), lpszlspname.param().abi(), dwserviceflags, core::mem::transmute(lpprotocolinfolist.as_ptr()), lpprotocolinfolist.len().try_into().unwrap(), core::mem::transmute(lpdwcatalogentryid.unwrap_or(core::mem::zeroed())), core::mem::transmute(lperrno)) } + unsafe { WSCInstallProviderAndChains64_32(lpproviderid, lpszproviderdllpath.param().abi(), lpszproviderdllpath32.param().abi(), lpszlspname.param().abi(), dwserviceflags, core::mem::transmute(lpprotocolinfolist.as_ptr()), lpprotocolinfolist.len().try_into().unwrap(), lpdwcatalogentryid.unwrap_or(core::mem::zeroed()) as _, lperrno as _) } } #[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); - unsafe { WSCSetApplicationCategory(core::mem::transmute(path.as_ptr()), path.len().try_into().unwrap(), core::mem::transmute(extra.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extra.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), permittedlspcategories, core::mem::transmute(pprevpermlspcat.unwrap_or(core::mem::zeroed())), core::mem::transmute(lperrno)) } + unsafe { WSCSetApplicationCategory(core::mem::transmute(path.as_ptr()), path.len().try_into().unwrap(), core::mem::transmute(extra.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extra.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), permittedlspcategories, pprevpermlspcat.unwrap_or(core::mem::zeroed()) as _, lperrno as _) } } #[inline] pub unsafe fn WSCSetProviderInfo(lpproviderid: *const windows_core::GUID, infotype: WSC_PROVIDER_INFO_TYPE, info: &[u8], flags: u32, lperrno: *mut i32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSCSetProviderInfo(lpproviderid : *const windows_core::GUID, infotype : WSC_PROVIDER_INFO_TYPE, info : *const u8, infosize : usize, flags : u32, lperrno : *mut i32) -> i32); - unsafe { WSCSetProviderInfo(lpproviderid, infotype, core::mem::transmute(info.as_ptr()), info.len().try_into().unwrap(), flags, core::mem::transmute(lperrno)) } + unsafe { WSCSetProviderInfo(lpproviderid, infotype, core::mem::transmute(info.as_ptr()), info.len().try_into().unwrap(), flags, lperrno as _) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] pub unsafe fn WSCSetProviderInfo32(lpproviderid: *const windows_core::GUID, infotype: WSC_PROVIDER_INFO_TYPE, info: &[u8], flags: u32, lperrno: *mut i32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSCSetProviderInfo32(lpproviderid : *const windows_core::GUID, infotype : WSC_PROVIDER_INFO_TYPE, info : *const u8, infosize : usize, flags : u32, lperrno : *mut i32) -> i32); - unsafe { WSCSetProviderInfo32(lpproviderid, infotype, core::mem::transmute(info.as_ptr()), info.len().try_into().unwrap(), flags, core::mem::transmute(lperrno)) } + unsafe { WSCSetProviderInfo32(lpproviderid, infotype, core::mem::transmute(info.as_ptr()), info.len().try_into().unwrap(), flags, lperrno as _) } } #[inline] pub unsafe fn WSCUnInstallNameSpace(lpproviderid: *const windows_core::GUID) -> i32 { @@ -1040,7 +997,7 @@ where P1: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn WSCUpdateProvider(lpproviderid : *const windows_core::GUID, lpszproviderdllpath : windows_core::PCWSTR, lpprotocolinfolist : *const WSAPROTOCOL_INFOW, dwnumberofentries : u32, lperrno : *mut i32) -> i32); - unsafe { WSCUpdateProvider(lpproviderid, lpszproviderdllpath.param().abi(), core::mem::transmute(lpprotocolinfolist.as_ptr()), lpprotocolinfolist.len().try_into().unwrap(), core::mem::transmute(lperrno)) } + unsafe { WSCUpdateProvider(lpproviderid, lpszproviderdllpath.param().abi(), core::mem::transmute(lpprotocolinfolist.as_ptr()), lpprotocolinfolist.len().try_into().unwrap(), lperrno as _) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] @@ -1049,39 +1006,39 @@ where P1: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn WSCUpdateProvider32(lpproviderid : *const windows_core::GUID, lpszproviderdllpath : windows_core::PCWSTR, lpprotocolinfolist : *const WSAPROTOCOL_INFOW, dwnumberofentries : u32, lperrno : *mut i32) -> i32); - unsafe { WSCUpdateProvider32(lpproviderid, lpszproviderdllpath.param().abi(), core::mem::transmute(lpprotocolinfolist.as_ptr()), lpprotocolinfolist.len().try_into().unwrap(), core::mem::transmute(lperrno)) } + unsafe { WSCUpdateProvider32(lpproviderid, lpszproviderdllpath.param().abi(), core::mem::transmute(lpprotocolinfolist.as_ptr()), lpprotocolinfolist.len().try_into().unwrap(), lperrno as _) } } #[inline] pub unsafe fn WSCWriteNameSpaceOrder(lpproviderid: *mut windows_core::GUID, dwnumberofentries: u32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSCWriteNameSpaceOrder(lpproviderid : *mut windows_core::GUID, dwnumberofentries : u32) -> i32); - unsafe { WSCWriteNameSpaceOrder(core::mem::transmute(lpproviderid), dwnumberofentries) } + unsafe { WSCWriteNameSpaceOrder(lpproviderid as _, dwnumberofentries) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] pub unsafe fn WSCWriteNameSpaceOrder32(lpproviderid: *mut windows_core::GUID, dwnumberofentries: u32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSCWriteNameSpaceOrder32(lpproviderid : *mut windows_core::GUID, dwnumberofentries : u32) -> i32); - unsafe { WSCWriteNameSpaceOrder32(core::mem::transmute(lpproviderid), dwnumberofentries) } + unsafe { WSCWriteNameSpaceOrder32(lpproviderid as _, dwnumberofentries) } } #[inline] pub unsafe fn WSCWriteProviderOrder(lpwdcatalogentryid: *mut u32, dwnumberofentries: u32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSCWriteProviderOrder(lpwdcatalogentryid : *mut u32, dwnumberofentries : u32) -> i32); - unsafe { WSCWriteProviderOrder(core::mem::transmute(lpwdcatalogentryid), dwnumberofentries) } + unsafe { WSCWriteProviderOrder(lpwdcatalogentryid as _, dwnumberofentries) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] pub unsafe fn WSCWriteProviderOrder32(lpwdcatalogentryid: *mut u32, dwnumberofentries: u32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSCWriteProviderOrder32(lpwdcatalogentryid : *mut u32, dwnumberofentries : u32) -> i32); - unsafe { WSCWriteProviderOrder32(core::mem::transmute(lpwdcatalogentryid), dwnumberofentries) } + unsafe { WSCWriteProviderOrder32(lpwdcatalogentryid as _, dwnumberofentries) } } #[inline] 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); - unsafe { __WSAFDIsSet(fd, core::mem::transmute(param1)) } + unsafe { __WSAFDIsSet(fd, param1 as _) } } #[inline] 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__ = unsafe { accept(s, core::mem::transmute(addr.unwrap_or(core::mem::zeroed())), core::mem::transmute(addrlen.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { accept(s, addr.unwrap_or(core::mem::zeroed()) as _, addrlen.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1102,7 +1059,7 @@ pub unsafe fn connect(s: SOCKET, name: *const SOCKADDR, namelen: i32) -> i32 { #[inline] pub unsafe fn freeaddrinfo(paddrinfo: Option<*const ADDRINFOA>) { windows_targets::link!("ws2_32.dll" "system" fn freeaddrinfo(paddrinfo : *const ADDRINFOA)); - unsafe { freeaddrinfo(core::mem::transmute(paddrinfo.unwrap_or(core::mem::zeroed()))) } + unsafe { freeaddrinfo(paddrinfo.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn getaddrinfo(pnodename: P0, pservicename: P1, phints: Option<*const ADDRINFOA>, ppresult: *mut *mut ADDRINFOA) -> i32 @@ -1111,7 +1068,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); - unsafe { getaddrinfo(pnodename.param().abi(), pservicename.param().abi(), core::mem::transmute(phints.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppresult)) } + unsafe { getaddrinfo(pnodename.param().abi(), pservicename.param().abi(), phints.unwrap_or(core::mem::zeroed()) as _, ppresult as _) } } #[inline] pub unsafe fn gethostbyaddr(addr: &[u8], r#type: i32) -> *mut HOSTENT { @@ -1139,7 +1096,7 @@ pub unsafe fn getnameinfo(psockaddr: *const SOCKADDR, sockaddrlength: socklen_t, #[inline] 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); - unsafe { getpeername(s, core::mem::transmute(name), core::mem::transmute(namelen)) } + unsafe { getpeername(s, name as _, namelen as _) } } #[inline] pub unsafe fn getprotobyname(name: P0) -> *mut PROTOENT @@ -1174,12 +1131,12 @@ where #[inline] 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); - unsafe { getsockname(s, core::mem::transmute(name), core::mem::transmute(namelen)) } + unsafe { getsockname(s, name as _, namelen as _) } } #[inline] 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); - unsafe { getsockopt(s, level, optname, core::mem::transmute(optval), core::mem::transmute(optlen)) } + unsafe { getsockopt(s, level, optname, core::mem::transmute(optval), optlen as _) } } #[inline] pub unsafe fn htonl(hostlong: u32) -> u32 { @@ -1215,12 +1172,12 @@ where P1: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn inet_pton(family : i32, pszaddrstring : windows_core::PCSTR, paddrbuf : *mut core::ffi::c_void) -> i32); - unsafe { inet_pton(family, pszaddrstring.param().abi(), core::mem::transmute(paddrbuf)) } + unsafe { inet_pton(family, pszaddrstring.param().abi(), paddrbuf as _) } } #[inline] 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); - unsafe { ioctlsocket(s, cmd, core::mem::transmute(argp)) } + unsafe { ioctlsocket(s, cmd, argp as _) } } #[inline] pub unsafe fn listen(s: SOCKET, backlog: i32) -> i32 { @@ -1245,12 +1202,12 @@ pub unsafe fn recv(s: SOCKET, buf: &mut [u8], flags: SEND_RECV_FLAGS) -> i32 { #[inline] 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); - unsafe { recvfrom(s, core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap(), flags, core::mem::transmute(from.unwrap_or(core::mem::zeroed())), core::mem::transmute(fromlen.unwrap_or(core::mem::zeroed()))) } + unsafe { recvfrom(s, core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap(), flags, from.unwrap_or(core::mem::zeroed()) as _, fromlen.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { select(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()))) } + unsafe { select(nfds, readfds.unwrap_or(core::mem::zeroed()) as _, writefds.unwrap_or(core::mem::zeroed()) as _, exceptfds.unwrap_or(core::mem::zeroed()) as _, timeout.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn send(s: SOCKET, buf: &[u8], flags: SEND_RECV_FLAGS) -> i32 { diff --git a/crates/libs/windows/src/Windows/Win32/Networking/WindowsWebServices/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/WindowsWebServices/mod.rs index a15fbf1df8..9915edf0fd 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/WindowsWebServices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/WindowsWebServices/mod.rs @@ -6,7 +6,7 @@ where windows_targets::link!("webauthn.dll" "system" fn WebAuthNAuthenticatorGetAssertion(hwnd : super::super::Foundation:: HWND, pwszrpid : windows_core::PCWSTR, pwebauthnclientdata : *const WEBAUTHN_CLIENT_DATA, pwebauthngetassertionoptions : *const WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS, ppwebauthnassertion : *mut *mut WEBAUTHN_ASSERTION) -> windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - WebAuthNAuthenticatorGetAssertion(hwnd, pwszrpid.param().abi(), pwebauthnclientdata, core::mem::transmute(pwebauthngetassertionoptions.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + WebAuthNAuthenticatorGetAssertion(hwnd, pwszrpid.param().abi(), pwebauthnclientdata, pwebauthngetassertionoptions.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -14,7 +14,7 @@ pub unsafe fn WebAuthNAuthenticatorMakeCredential(hwnd: super::super::Foundation 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); unsafe { let mut result__ = core::mem::zeroed(); - WebAuthNAuthenticatorMakeCredential(hwnd, prpinformation, puserinformation, ppubkeycredparams, pwebauthnclientdata, core::mem::transmute(pwebauthnmakecredentialoptions.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + WebAuthNAuthenticatorMakeCredential(hwnd, prpinformation, puserinformation, ppubkeycredparams, pwebauthnclientdata, pwebauthnmakecredentialoptions.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -35,7 +35,7 @@ pub unsafe fn WebAuthNFreeAssertion(pwebauthnassertion: *const WEBAUTHN_ASSERTIO #[inline] pub unsafe fn WebAuthNFreeCredentialAttestation(pwebauthncredentialattestation: Option<*const WEBAUTHN_CREDENTIAL_ATTESTATION>) { windows_targets::link!("webauthn.dll" "system" fn WebAuthNFreeCredentialAttestation(pwebauthncredentialattestation : *const WEBAUTHN_CREDENTIAL_ATTESTATION)); - unsafe { WebAuthNFreeCredentialAttestation(core::mem::transmute(pwebauthncredentialattestation.unwrap_or(core::mem::zeroed()))) } + unsafe { WebAuthNFreeCredentialAttestation(pwebauthncredentialattestation.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn WebAuthNFreePlatformCredentialList(pcredentialdetailslist: *const WEBAUTHN_CREDENTIAL_DETAILS_LIST) { @@ -84,42 +84,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); - unsafe { WsAbandonCall(serviceproxy, callid, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsAbandonCall(serviceproxy, callid, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsAbandonMessage(channel, message, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsAbandonMessage(channel, message, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsAbortChannel(channel, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsAbortChannel(channel, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsAbortListener(listener, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsAbortListener(listener, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsAbortServiceHost(servicehost, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsAbortServiceHost(servicehost, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsAbortServiceProxy(serviceproxy, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsAbortServiceProxy(serviceproxy, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsAcceptChannel(listener, channel, core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsAcceptChannel(listener, channel, asynccontext.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsAddCustomHeader(message, headerdescription, writeoption, value, valuesize, headerattributes, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsAddCustomHeader(message, headerdescription, writeoption, value, valuesize, headerattributes, error.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WsAddErrorString(error: *const WS_ERROR, string: *const WS_STRING) -> windows_core::Result<()> { @@ -129,57 +129,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); - unsafe { WsAddMappedHeader(message, headername, valuetype, writeoption, value, valuesize, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsAddMappedHeader(message, headername, valuetype, writeoption, value, valuesize, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsAddressMessage(message, core::mem::transmute(address.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsAddressMessage(message, address.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsAlloc(heap, size, core::mem::transmute(ptr), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsAlloc(heap, size, ptr as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsAsyncExecute(asyncstate, operation, 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() } + unsafe { WsAsyncExecute(asyncstate, operation, callbackmodel, callbackstate.unwrap_or(core::mem::zeroed()) as _, asynccontext.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsCall(serviceproxy, operation, core::mem::transmute(arguments.unwrap_or(core::mem::zeroed())), 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() } + unsafe { WsCall(serviceproxy, operation, arguments.unwrap_or(core::mem::zeroed()) as _, 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()), asynccontext.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsCheckMustUnderstandHeaders(message, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsCheckMustUnderstandHeaders(message, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsCloseChannel(channel, core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsCloseChannel(channel, asynccontext.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsCloseListener(listener, core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsCloseListener(listener, asynccontext.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsCloseServiceHost(servicehost, core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsCloseServiceHost(servicehost, asynccontext.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsCloseServiceProxy(serviceproxy, core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsCloseServiceProxy(serviceproxy, asynccontext.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsCombineUrl(baseurl, referenceurl, flags, heap, core::mem::transmute(resulturl), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsCombineUrl(baseurl, referenceurl, flags, heap, resulturl as _, error.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WsCopyError(source: *const WS_ERROR, destination: *const WS_ERROR) -> windows_core::Result<()> { @@ -189,17 +189,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); - unsafe { WsCopyNode(writer, reader, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsCopyNode(writer, reader, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsCreateChannel(channeltype, channelbinding, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(securitydescription.unwrap_or(core::mem::zeroed())), core::mem::transmute(channel), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsCreateChannel(channeltype, channelbinding, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), securitydescription.unwrap_or(core::mem::zeroed()) as _, channel as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsCreateChannelForListener(listener, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(channel), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsCreateChannelForListener(listener, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), channel as _, error.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WsCreateError(properties: Option<&[WS_ERROR_PROPERTY]>) -> windows_core::Result<*mut WS_ERROR> { @@ -212,37 +212,37 @@ pub unsafe fn WsCreateError(properties: Option<&[WS_ERROR_PROPERTY]>) -> windows #[inline] pub unsafe fn WsCreateFaultFromError(error: *const WS_ERROR, faulterrorcode: windows_core::HRESULT, faultdisclosure: WS_FAULT_DISCLOSURE, heap: *const WS_HEAP, fault: *mut WS_FAULT) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsCreateFaultFromError(error : *const WS_ERROR, faulterrorcode : windows_core::HRESULT, faultdisclosure : WS_FAULT_DISCLOSURE, heap : *const WS_HEAP, fault : *mut WS_FAULT) -> windows_core::HRESULT); - unsafe { WsCreateFaultFromError(error, faulterrorcode, faultdisclosure, heap, core::mem::transmute(fault)).ok() } + unsafe { WsCreateFaultFromError(error, faulterrorcode, faultdisclosure, heap, fault as _).ok() } } #[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); - unsafe { WsCreateHeap(maxsize, trimsize, core::mem::transmute(properties.unwrap_or(core::mem::zeroed())), propertycount, core::mem::transmute(heap), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsCreateHeap(maxsize, trimsize, properties.unwrap_or(core::mem::zeroed()) as _, propertycount, heap as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsCreateListener(channeltype, channelbinding, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(securitydescription.unwrap_or(core::mem::zeroed())), core::mem::transmute(listener), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsCreateListener(channeltype, channelbinding, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), securitydescription.unwrap_or(core::mem::zeroed()) as _, listener as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsCreateMessage(envelopeversion, addressingversion, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(message), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsCreateMessage(envelopeversion, addressingversion, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), message as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsCreateMessageForChannel(channel, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(message), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsCreateMessageForChannel(channel, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), message as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { 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() } + unsafe { WsCreateMetadata(core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), metadata as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { 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() } + unsafe { WsCreateReader(core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), reader as _, error.unwrap_or(core::mem::zeroed()) as _).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: 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<()> { @@ -252,17 +252,17 @@ pub unsafe fn WsCreateServiceEndpointFromTemplate(channeltype: WS_CHANNEL_TYPE, channeltype, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(addressurl.unwrap_or(core::mem::zeroed())), + addressurl.unwrap_or(core::mem::zeroed()) as _, contract, - core::mem::transmute(authorizationcallback.unwrap_or(core::mem::zeroed())), + authorizationcallback.unwrap_or(core::mem::zeroed()) as _, heap, templatetype, - core::mem::transmute(templatevalue.unwrap_or(core::mem::zeroed())), + templatevalue.unwrap_or(core::mem::zeroed()) as _, templatesize, templatedescription, templatedescriptionsize, - core::mem::transmute(serviceendpoint), - core::mem::transmute(error.unwrap_or(core::mem::zeroed())), + serviceendpoint as _, + error.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -270,7 +270,7 @@ pub unsafe fn WsCreateServiceEndpointFromTemplate(channeltype: WS_CHANNEL_TYPE, #[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); - unsafe { 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() } + unsafe { WsCreateServiceHost(core::mem::transmute(endpoints.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), endpoints.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(serviceproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), serviceproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), servicehost as _, error.unwrap_or(core::mem::zeroed()) as _).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<()> { @@ -279,13 +279,13 @@ pub unsafe fn WsCreateServiceProxy(channeltype: WS_CHANNEL_TYPE, channelbinding: WsCreateServiceProxy( channeltype, channelbinding, - core::mem::transmute(securitydescription.unwrap_or(core::mem::zeroed())), + securitydescription.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + serviceproxy as _, + error.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -293,77 +293,77 @@ pub unsafe fn WsCreateServiceProxy(channeltype: WS_CHANNEL_TYPE, channelbinding: #[inline] pub unsafe fn WsCreateServiceProxyFromTemplate(channeltype: WS_CHANNEL_TYPE, properties: Option<&[WS_PROXY_PROPERTY]>, templatetype: WS_BINDING_TEMPLATE_TYPE, templatevalue: Option<*const core::ffi::c_void>, templatesize: u32, templatedescription: *const core::ffi::c_void, templatedescriptionsize: u32, serviceproxy: *mut *mut WS_SERVICE_PROXY, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsCreateServiceProxyFromTemplate(channeltype : WS_CHANNEL_TYPE, properties : *const WS_PROXY_PROPERTY, propertycount : u32, templatetype : WS_BINDING_TEMPLATE_TYPE, templatevalue : *const core::ffi::c_void, templatesize : u32, templatedescription : *const core::ffi::c_void, templatedescriptionsize : u32, serviceproxy : *mut *mut WS_SERVICE_PROXY, error : *const WS_ERROR) -> windows_core::HRESULT); - unsafe { WsCreateServiceProxyFromTemplate(channeltype, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), templatetype, core::mem::transmute(templatevalue.unwrap_or(core::mem::zeroed())), templatesize, templatedescription, templatedescriptionsize, core::mem::transmute(serviceproxy), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsCreateServiceProxyFromTemplate(channeltype, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), templatetype, templatevalue.unwrap_or(core::mem::zeroed()) as _, templatesize, templatedescription, templatedescriptionsize, serviceproxy as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { 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() } + unsafe { WsCreateWriter(core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), writer as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsCreateXmlBuffer(heap, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(buffer), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsCreateXmlBuffer(heap, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), buffer as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { 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() } + unsafe { WsCreateXmlSecurityToken(tokenxml.unwrap_or(core::mem::zeroed()) as _, tokenkey.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), token as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsDateTimeToFileTime(datetime, core::mem::transmute(filetime), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsDateTimeToFileTime(datetime, filetime as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsDecodeUrl(url, flags, heap, core::mem::transmute(outurl), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsDecodeUrl(url, flags, heap, outurl as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsEncodeUrl(url, flags, heap, core::mem::transmute(outurl), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsEncodeUrl(url, flags, heap, outurl as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsEndReaderCanonicalization(reader, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsEndReaderCanonicalization(reader, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsEndWriterCanonicalization(writer, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsEndWriterCanonicalization(writer, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsFileTimeToDateTime(filetime, core::mem::transmute(datetime), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsFileTimeToDateTime(filetime, datetime as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsFillBody(message, minsize, core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsFillBody(message, minsize, asynccontext.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsFillReader(reader, minsize, core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsFillReader(reader, minsize, asynccontext.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WsFindAttribute(reader: *const WS_XML_READER, localname: *const WS_XML_STRING, ns: *const WS_XML_STRING, required: bool, attributeindex: *mut u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { 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); - unsafe { WsFindAttribute(reader, localname, ns, required.into(), core::mem::transmute(attributeindex), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsFindAttribute(reader, localname, ns, required.into(), attributeindex as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsFlushBody(message, minsize, core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsFlushBody(message, minsize, asynccontext.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsFlushWriter(writer, minsize, core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsFlushWriter(writer, minsize, asynccontext.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WsFreeChannel(channel: *const WS_CHANNEL) { @@ -423,22 +423,22 @@ 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); - unsafe { WsGetChannelProperty(channel, id, core::mem::transmute(value), valuesize, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsGetChannelProperty(channel, id, value as _, valuesize, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsGetCustomHeader(message, customheaderdescription, repeatingoption, headerindex, readoption, core::mem::transmute(heap.unwrap_or(core::mem::zeroed())), core::mem::transmute(value), valuesize, core::mem::transmute(headerattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsGetCustomHeader(message, customheaderdescription, repeatingoption, headerindex, readoption, heap.unwrap_or(core::mem::zeroed()) as _, value as _, valuesize, headerattributes.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsGetDictionary(encoding, core::mem::transmute(dictionary), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsGetDictionary(encoding, dictionary as _, error.unwrap_or(core::mem::zeroed()) as _).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<()> { windows_targets::link!("webservices.dll" "system" fn WsGetErrorProperty(error : *const WS_ERROR, id : WS_ERROR_PROPERTY_ID, buffer : *mut core::ffi::c_void, buffersize : u32) -> windows_core::HRESULT); - unsafe { WsGetErrorProperty(error, id, core::mem::transmute(buffer), buffersize).ok() } + unsafe { WsGetErrorProperty(error, id, buffer as _, buffersize).ok() } } #[inline] pub unsafe fn WsGetErrorString(error: *const WS_ERROR, index: u32) -> windows_core::Result { @@ -451,352 +451,352 @@ 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); - unsafe { WsGetFaultErrorDetail(error, faultdetaildescription, readoption, core::mem::transmute(heap.unwrap_or(core::mem::zeroed())), core::mem::transmute(value), valuesize).ok() } + unsafe { WsGetFaultErrorDetail(error, faultdetaildescription, readoption, heap.unwrap_or(core::mem::zeroed()) as _, value as _, 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<()> { windows_targets::link!("webservices.dll" "system" fn WsGetFaultErrorProperty(error : *const WS_ERROR, id : WS_FAULT_ERROR_PROPERTY_ID, buffer : *mut core::ffi::c_void, buffersize : u32) -> windows_core::HRESULT); - unsafe { WsGetFaultErrorProperty(error, id, core::mem::transmute(buffer), buffersize).ok() } + unsafe { WsGetFaultErrorProperty(error, id, buffer as _, buffersize).ok() } } #[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); - unsafe { WsGetHeader(message, headertype, valuetype, readoption, core::mem::transmute(heap.unwrap_or(core::mem::zeroed())), core::mem::transmute(value), valuesize, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsGetHeader(message, headertype, valuetype, readoption, heap.unwrap_or(core::mem::zeroed()) as _, value as _, valuesize, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsGetHeaderAttributes(message, reader, core::mem::transmute(headerattributes), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsGetHeaderAttributes(message, reader, headerattributes as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsGetHeapProperty(heap, id, core::mem::transmute(value), valuesize, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsGetHeapProperty(heap, id, value as _, valuesize, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsGetListenerProperty(listener, id, core::mem::transmute(value), valuesize, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsGetListenerProperty(listener, id, value as _, valuesize, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsGetMappedHeader(message, headername, repeatingoption, headerindex, valuetype, readoption, core::mem::transmute(heap.unwrap_or(core::mem::zeroed())), core::mem::transmute(value), valuesize, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsGetMappedHeader(message, headername, repeatingoption, headerindex, valuetype, readoption, heap.unwrap_or(core::mem::zeroed()) as _, value as _, valuesize, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsGetMessageProperty(message, id, core::mem::transmute(value), valuesize, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsGetMessageProperty(message, id, value as _, valuesize, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsGetMetadataEndpoints(metadata, core::mem::transmute(endpoints), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsGetMetadataEndpoints(metadata, endpoints as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsGetMetadataProperty(metadata, id, core::mem::transmute(value), valuesize, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsGetMetadataProperty(metadata, id, value as _, valuesize, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsGetMissingMetadataDocumentAddress(metadata, core::mem::transmute(address), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsGetMissingMetadataDocumentAddress(metadata, address as _, error.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WsGetNamespaceFromPrefix(reader: *const WS_XML_READER, prefix: *const WS_XML_STRING, required: bool, ns: *mut *mut WS_XML_STRING, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { 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); - unsafe { WsGetNamespaceFromPrefix(reader, prefix, required.into(), core::mem::transmute(ns), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsGetNamespaceFromPrefix(reader, prefix, required.into(), ns as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsGetOperationContextProperty(context, id, core::mem::transmute(value), valuesize, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsGetOperationContextProperty(context, id, value as _, valuesize, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsGetPolicyAlternativeCount(policy, core::mem::transmute(count), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsGetPolicyAlternativeCount(policy, count as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsGetPolicyProperty(policy, id, core::mem::transmute(value), valuesize, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsGetPolicyProperty(policy, id, value as _, valuesize, error.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WsGetPrefixFromNamespace(writer: *const WS_XML_WRITER, ns: *const WS_XML_STRING, required: bool, prefix: *mut *mut WS_XML_STRING, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { 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); - unsafe { WsGetPrefixFromNamespace(writer, ns, required.into(), core::mem::transmute(prefix), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsGetPrefixFromNamespace(writer, ns, required.into(), prefix as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsGetReaderNode(xmlreader, core::mem::transmute(node), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsGetReaderNode(xmlreader, node as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsGetReaderPosition(reader, core::mem::transmute(nodeposition), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsGetReaderPosition(reader, nodeposition as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsGetReaderProperty(reader, id, core::mem::transmute(value), valuesize, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsGetReaderProperty(reader, id, value as _, valuesize, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsGetSecurityContextProperty(securitycontext, id, core::mem::transmute(value), valuesize, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsGetSecurityContextProperty(securitycontext, id, value as _, valuesize, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsGetSecurityTokenProperty(securitytoken, id, core::mem::transmute(value), valuesize, core::mem::transmute(heap.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsGetSecurityTokenProperty(securitytoken, id, value as _, valuesize, heap.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsGetServiceHostProperty(servicehost, id, core::mem::transmute(value), valuesize, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsGetServiceHostProperty(servicehost, id, value as _, valuesize, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsGetServiceProxyProperty(serviceproxy, id, core::mem::transmute(value), valuesize, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsGetServiceProxyProperty(serviceproxy, id, value as _, valuesize, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsGetWriterPosition(writer, core::mem::transmute(nodeposition), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsGetWriterPosition(writer, nodeposition as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsGetWriterProperty(writer, id, core::mem::transmute(value), valuesize, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsGetWriterProperty(writer, id, value as _, valuesize, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsGetXmlAttribute(reader, localname, heap, core::mem::transmute(valuechars.unwrap_or(core::mem::zeroed())), core::mem::transmute(valuecharcount), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsGetXmlAttribute(reader, localname, heap, valuechars.unwrap_or(core::mem::zeroed()) as _, valuecharcount as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsInitializeMessage(message, initialization, core::mem::transmute(sourcemessage.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsInitializeMessage(message, initialization, sourcemessage.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsMarkHeaderAsUnderstood(message, headerposition, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsMarkHeaderAsUnderstood(message, headerposition, error.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WsMatchPolicyAlternative(policy: *const WS_POLICY, alternativeindex: u32, policyconstraints: *const WS_POLICY_CONSTRAINTS, matchrequired: bool, heap: *const WS_HEAP, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { 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); - unsafe { WsMatchPolicyAlternative(policy, alternativeindex, policyconstraints, matchrequired.into(), heap, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsMatchPolicyAlternative(policy, alternativeindex, policyconstraints, matchrequired.into(), heap, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsMoveReader(reader, moveto, core::mem::transmute(found.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsMoveReader(reader, moveto, found.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsMoveWriter(writer, moveto, core::mem::transmute(found.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsMoveWriter(writer, moveto, found.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsOpenChannel(channel, endpointaddress, core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsOpenChannel(channel, endpointaddress, asynccontext.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsOpenListener(listener, url, core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsOpenListener(listener, url, asynccontext.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsOpenServiceHost(servicehost, core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsOpenServiceHost(servicehost, asynccontext.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsOpenServiceProxy(serviceproxy, address, core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsOpenServiceProxy(serviceproxy, address, asynccontext.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsPullBytes(writer, callback, core::mem::transmute(callbackstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsPullBytes(writer, callback, callbackstate.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsPushBytes(writer, callback, core::mem::transmute(callbackstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsPushBytes(writer, callback, callbackstate.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsReadArray(reader, localname, ns, valuetype, core::mem::transmute(array.unwrap_or(core::mem::zeroed())), arraysize, itemoffset, itemcount, core::mem::transmute(actualitemcount), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsReadArray(reader, localname, ns, valuetype, array.unwrap_or(core::mem::zeroed()) as _, arraysize, itemoffset, itemcount, actualitemcount as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsReadAttribute(reader, attributedescription, readoption, core::mem::transmute(heap.unwrap_or(core::mem::zeroed())), core::mem::transmute(value), valuesize, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsReadAttribute(reader, attributedescription, readoption, heap.unwrap_or(core::mem::zeroed()) as _, value as _, valuesize, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsReadBody(message, bodydescription, readoption, core::mem::transmute(heap.unwrap_or(core::mem::zeroed())), core::mem::transmute(value), valuesize, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsReadBody(message, bodydescription, readoption, heap.unwrap_or(core::mem::zeroed()) as _, value as _, valuesize, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsReadBytes(reader, core::mem::transmute(bytes), maxbytecount, core::mem::transmute(actualbytecount), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsReadBytes(reader, bytes as _, maxbytecount, actualbytecount as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsReadChars(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() } + unsafe { WsReadChars(reader, core::mem::transmute(chars.as_ptr()), chars.len().try_into().unwrap(), actualcharcount as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsReadCharsUtf8(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() } + unsafe { WsReadCharsUtf8(reader, core::mem::transmute(bytes.as_ptr()), bytes.len().try_into().unwrap(), actualbytecount as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsReadElement(reader, elementdescription, readoption, core::mem::transmute(heap.unwrap_or(core::mem::zeroed())), core::mem::transmute(value), valuesize, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsReadElement(reader, elementdescription, readoption, heap.unwrap_or(core::mem::zeroed()) as _, value as _, valuesize, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsReadEndAttribute(reader, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsReadEndAttribute(reader, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsReadEndElement(reader, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsReadEndElement(reader, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsReadEndpointAddressExtension(reader, endpointaddress, extensiontype, readoption, heap, core::mem::transmute(value), valuesize, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsReadEndpointAddressExtension(reader, endpointaddress, extensiontype, readoption, heap, value as _, valuesize, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsReadEnvelopeEnd(message, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsReadEnvelopeEnd(message, error.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { WsReadEnvelopeStart(message, 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() } + unsafe { WsReadEnvelopeStart(message, reader, donecallback.unwrap_or(core::mem::zeroed()) as _, donecallbackstate.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsReadMessageEnd(channel, message, core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsReadMessageEnd(channel, message, asynccontext.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsReadMessageStart(channel, message, core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsReadMessageStart(channel, message, asynccontext.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsReadMetadata(metadata, reader, url, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsReadMetadata(metadata, reader, url, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsReadNode(reader, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsReadNode(reader, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsReadQualifiedName(reader, 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() } + unsafe { WsReadQualifiedName(reader, heap, prefix.unwrap_or(core::mem::zeroed()) as _, localname as _, ns.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsReadStartAttribute(reader, attributeindex, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsReadStartAttribute(reader, attributeindex, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsReadStartElement(reader, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsReadStartElement(reader, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsReadToStartElement(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() } + unsafe { WsReadToStartElement(reader, localname.unwrap_or(core::mem::zeroed()) as _, ns.unwrap_or(core::mem::zeroed()) as _, found.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsReadType(reader, typemapping, r#type, core::mem::transmute(typedescription.unwrap_or(core::mem::zeroed())), readoption, core::mem::transmute(heap.unwrap_or(core::mem::zeroed())), core::mem::transmute(value), valuesize, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsReadType(reader, typemapping, r#type, typedescription.unwrap_or(core::mem::zeroed()) as _, readoption, heap.unwrap_or(core::mem::zeroed()) as _, value as _, valuesize, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsReadValue(reader, valuetype, core::mem::transmute(value), valuesize, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsReadValue(reader, valuetype, value as _, valuesize, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsReadXmlBuffer(reader, heap, core::mem::transmute(xmlbuffer), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsReadXmlBuffer(reader, heap, xmlbuffer as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsReadXmlBufferFromBytes(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()), bytes, bytecount, heap, core::mem::transmute(xmlbuffer), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsReadXmlBufferFromBytes(reader, encoding.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), bytes, bytecount, heap, xmlbuffer as _, error.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WsReceiveMessage(channel: *const WS_CHANNEL, message: *const WS_MESSAGE, messagedescriptions: &[*const WS_MESSAGE_DESCRIPTION], receiveoption: WS_RECEIVE_OPTION, readbodyoption: WS_READ_OPTION, heap: Option<*const WS_HEAP>, value: *mut core::ffi::c_void, valuesize: u32, index: Option<*mut u32>, asynccontext: Option<*const WS_ASYNC_CONTEXT>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsReceiveMessage(channel : *const WS_CHANNEL, message : *const WS_MESSAGE, messagedescriptions : *const *const WS_MESSAGE_DESCRIPTION, messagedescriptioncount : u32, receiveoption : WS_RECEIVE_OPTION, readbodyoption : WS_READ_OPTION, heap : *const WS_HEAP, value : *mut core::ffi::c_void, valuesize : u32, index : *mut u32, asynccontext : *const WS_ASYNC_CONTEXT, error : *const WS_ERROR) -> windows_core::HRESULT); - unsafe { WsReceiveMessage(channel, message, core::mem::transmute(messagedescriptions.as_ptr()), messagedescriptions.len().try_into().unwrap(), receiveoption, readbodyoption, core::mem::transmute(heap.unwrap_or(core::mem::zeroed())), core::mem::transmute(value), valuesize, 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() } + unsafe { WsReceiveMessage(channel, message, core::mem::transmute(messagedescriptions.as_ptr()), messagedescriptions.len().try_into().unwrap(), receiveoption, readbodyoption, heap.unwrap_or(core::mem::zeroed()) as _, value as _, valuesize, index.unwrap_or(core::mem::zeroed()) as _, asynccontext.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { WsRegisterOperationForCancel(context, 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() } + unsafe { WsRegisterOperationForCancel(context, cancelcallback, freestatecallback.unwrap_or(core::mem::zeroed()) as _, userstate.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsRemoveCustomHeader(message, headername, headerns, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsRemoveCustomHeader(message, headername, headerns, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsRemoveHeader(message, headertype, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsRemoveHeader(message, headertype, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsRemoveMappedHeader(message, headername, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsRemoveMappedHeader(message, headername, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsRemoveNode(nodeposition, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsRemoveNode(nodeposition, error.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WsRequestReply(channel: *const WS_CHANNEL, requestmessage: *const WS_MESSAGE, requestmessagedescription: *const WS_MESSAGE_DESCRIPTION, writeoption: WS_WRITE_OPTION, requestbodyvalue: Option<*const core::ffi::c_void>, requestbodyvaluesize: u32, replymessage: *const WS_MESSAGE, replymessagedescription: *const WS_MESSAGE_DESCRIPTION, readoption: WS_READ_OPTION, heap: Option<*const WS_HEAP>, value: Option<*mut core::ffi::c_void>, valuesize: u32, asynccontext: Option<*const WS_ASYNC_CONTEXT>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsRequestReply(channel : *const WS_CHANNEL, requestmessage : *const WS_MESSAGE, requestmessagedescription : *const WS_MESSAGE_DESCRIPTION, writeoption : WS_WRITE_OPTION, requestbodyvalue : *const core::ffi::c_void, requestbodyvaluesize : u32, replymessage : *const WS_MESSAGE, replymessagedescription : *const WS_MESSAGE_DESCRIPTION, readoption : WS_READ_OPTION, heap : *const WS_HEAP, value : *mut core::ffi::c_void, valuesize : u32, asynccontext : *const WS_ASYNC_CONTEXT, error : *const WS_ERROR) -> windows_core::HRESULT); - unsafe { WsRequestReply(channel, requestmessage, requestmessagedescription, writeoption, core::mem::transmute(requestbodyvalue.unwrap_or(core::mem::zeroed())), requestbodyvaluesize, replymessage, replymessagedescription, readoption, core::mem::transmute(heap.unwrap_or(core::mem::zeroed())), core::mem::transmute(value.unwrap_or(core::mem::zeroed())), valuesize, core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsRequestReply(channel, requestmessage, requestmessagedescription, writeoption, requestbodyvalue.unwrap_or(core::mem::zeroed()) as _, requestbodyvaluesize, replymessage, replymessagedescription, readoption, heap.unwrap_or(core::mem::zeroed()) as _, value.unwrap_or(core::mem::zeroed()) as _, valuesize, asynccontext.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsRequestSecurityToken(channel, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(token), core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsRequestSecurityToken(channel, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), token as _, asynccontext.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsResetChannel(channel, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsResetChannel(channel, error.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WsResetError(error: *const WS_ERROR) -> windows_core::Result<()> { @@ -806,57 +806,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); - unsafe { WsResetHeap(heap, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsResetHeap(heap, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsResetListener(listener, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsResetListener(listener, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsResetMessage(message, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsResetMessage(message, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsResetMetadata(metadata, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsResetMetadata(metadata, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsResetServiceHost(servicehost, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsResetServiceHost(servicehost, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsResetServiceProxy(serviceproxy, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsResetServiceProxy(serviceproxy, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsRevokeSecurityContext(securitycontext, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsRevokeSecurityContext(securitycontext, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsSendFaultMessageForError(channel, replymessage, faulterror, faulterrorcode, faultdisclosure, requestmessage, core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsSendFaultMessageForError(channel, replymessage, faulterror, faulterrorcode, faultdisclosure, requestmessage, asynccontext.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsSendMessage(channel, message, messagedescription, writeoption, core::mem::transmute(bodyvalue.unwrap_or(core::mem::zeroed())), bodyvaluesize, core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsSendMessage(channel, message, messagedescription, writeoption, bodyvalue.unwrap_or(core::mem::zeroed()) as _, bodyvaluesize, asynccontext.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsSendReplyMessage(channel, replymessage, replymessagedescription, writeoption, core::mem::transmute(replybodyvalue.unwrap_or(core::mem::zeroed())), replybodyvaluesize, requestmessage, core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsSendReplyMessage(channel, replymessage, replymessagedescription, writeoption, replybodyvalue.unwrap_or(core::mem::zeroed()) as _, replybodyvaluesize, requestmessage, asynccontext.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsSetChannelProperty(channel, id, value, valuesize, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsSetChannelProperty(channel, id, value, valuesize, error.unwrap_or(core::mem::zeroed()) as _).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<()> { @@ -866,7 +866,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); - unsafe { WsSetFaultErrorDetail(error, faultdetaildescription, writeoption, core::mem::transmute(value.unwrap_or(core::mem::zeroed())), valuesize).ok() } + unsafe { WsSetFaultErrorDetail(error, faultdetaildescription, writeoption, value.unwrap_or(core::mem::zeroed()) as _, 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<()> { @@ -876,212 +876,212 @@ 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); - unsafe { WsSetHeader(message, headertype, valuetype, writeoption, value, valuesize, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsSetHeader(message, headertype, valuetype, writeoption, value, valuesize, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsSetInput(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() } + unsafe { WsSetInput(reader, encoding.unwrap_or(core::mem::zeroed()) as _, input.unwrap_or(core::mem::zeroed()) as _, 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()), error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsSetInputToBuffer(reader, buffer, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsSetInputToBuffer(reader, buffer, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsSetListenerProperty(listener, id, value, valuesize, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsSetListenerProperty(listener, id, value, valuesize, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsSetMessageProperty(message, id, value, valuesize, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsSetMessageProperty(message, id, value, valuesize, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsSetOutput(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() } + unsafe { WsSetOutput(writer, encoding.unwrap_or(core::mem::zeroed()) as _, output.unwrap_or(core::mem::zeroed()) as _, 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()), error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsSetOutputToBuffer(writer, buffer, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsSetOutputToBuffer(writer, buffer, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsSetReaderPosition(reader, nodeposition, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsSetReaderPosition(reader, nodeposition, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsSetWriterPosition(writer, nodeposition, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsSetWriterPosition(writer, nodeposition, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsShutdownSessionChannel(channel, core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsShutdownSessionChannel(channel, asynccontext.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsSkipNode(reader, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsSkipNode(reader, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsStartReaderCanonicalization(reader, 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() } + unsafe { WsStartReaderCanonicalization(reader, writecallback, writecallbackstate.unwrap_or(core::mem::zeroed()) as _, 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()), error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsStartWriterCanonicalization(writer, 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() } + unsafe { WsStartWriterCanonicalization(writer, writecallback, writecallbackstate.unwrap_or(core::mem::zeroed()) as _, 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()), error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { 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() } + unsafe { WsTrimXmlWhitespace(core::mem::transmute(chars.as_ptr()), chars.len().try_into().unwrap(), trimmedchars as _, trimmedcount as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsVerifyXmlNCName(core::mem::transmute(ncnamechars.as_ptr()), ncnamechars.len().try_into().unwrap(), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsVerifyXmlNCName(core::mem::transmute(ncnamechars.as_ptr()), ncnamechars.len().try_into().unwrap(), error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsWriteArray(writer, localname, ns, valuetype, core::mem::transmute(array.unwrap_or(core::mem::zeroed())), arraysize, itemoffset, itemcount, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsWriteArray(writer, localname, ns, valuetype, array.unwrap_or(core::mem::zeroed()) as _, arraysize, itemoffset, itemcount, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsWriteAttribute(writer, attributedescription, writeoption, core::mem::transmute(value.unwrap_or(core::mem::zeroed())), valuesize, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsWriteAttribute(writer, attributedescription, writeoption, value.unwrap_or(core::mem::zeroed()) as _, valuesize, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsWriteBody(message, bodydescription, writeoption, value, valuesize, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsWriteBody(message, bodydescription, writeoption, value, valuesize, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsWriteBytes(writer, bytes, bytecount, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsWriteBytes(writer, bytes, bytecount, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsWriteChars(writer, core::mem::transmute(chars.as_ptr()), chars.len().try_into().unwrap(), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsWriteChars(writer, core::mem::transmute(chars.as_ptr()), chars.len().try_into().unwrap(), error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsWriteCharsUtf8(writer, core::mem::transmute(bytes.as_ptr()), bytes.len().try_into().unwrap(), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsWriteCharsUtf8(writer, core::mem::transmute(bytes.as_ptr()), bytes.len().try_into().unwrap(), error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsWriteElement(writer, elementdescription, writeoption, core::mem::transmute(value.unwrap_or(core::mem::zeroed())), valuesize, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsWriteElement(writer, elementdescription, writeoption, value.unwrap_or(core::mem::zeroed()) as _, valuesize, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsWriteEndAttribute(writer, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsWriteEndAttribute(writer, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsWriteEndCData(writer, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsWriteEndCData(writer, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsWriteEndElement(writer, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsWriteEndElement(writer, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsWriteEndStartElement(writer, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsWriteEndStartElement(writer, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsWriteEnvelopeEnd(message, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsWriteEnvelopeEnd(message, error.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { WsWriteEnvelopeStart(message, 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() } + unsafe { WsWriteEnvelopeStart(message, writer, donecallback.unwrap_or(core::mem::zeroed()) as _, donecallbackstate.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsWriteMessageEnd(channel, message, core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsWriteMessageEnd(channel, message, asynccontext.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsWriteMessageStart(channel, message, core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsWriteMessageStart(channel, message, asynccontext.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsWriteNode(writer, node, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsWriteNode(writer, node, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsWriteQualifiedName(writer, core::mem::transmute(prefix.unwrap_or(core::mem::zeroed())), localname, core::mem::transmute(ns.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsWriteQualifiedName(writer, prefix.unwrap_or(core::mem::zeroed()) as _, localname, ns.unwrap_or(core::mem::zeroed()) as _, error.unwrap_or(core::mem::zeroed()) as _).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: bool, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { 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); - unsafe { WsWriteStartAttribute(writer, core::mem::transmute(prefix.unwrap_or(core::mem::zeroed())), localname, ns, singlequote.into(), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsWriteStartAttribute(writer, prefix.unwrap_or(core::mem::zeroed()) as _, localname, ns, singlequote.into(), error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsWriteStartCData(writer, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsWriteStartCData(writer, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsWriteStartElement(writer, core::mem::transmute(prefix.unwrap_or(core::mem::zeroed())), localname, ns, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsWriteStartElement(writer, prefix.unwrap_or(core::mem::zeroed()) as _, localname, ns, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsWriteText(writer, text, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsWriteText(writer, text, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsWriteType(writer, typemapping, r#type, core::mem::transmute(typedescription.unwrap_or(core::mem::zeroed())), writeoption, core::mem::transmute(value.unwrap_or(core::mem::zeroed())), valuesize, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsWriteType(writer, typemapping, r#type, typedescription.unwrap_or(core::mem::zeroed()) as _, writeoption, value.unwrap_or(core::mem::zeroed()) as _, valuesize, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsWriteValue(writer, valuetype, value, valuesize, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsWriteValue(writer, valuetype, value, valuesize, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsWriteXmlBuffer(writer, xmlbuffer, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsWriteXmlBuffer(writer, xmlbuffer, error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsWriteXmlBufferToBytes(writer, 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()), heap, core::mem::transmute(bytes), core::mem::transmute(bytecount), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsWriteXmlBufferToBytes(writer, xmlbuffer, encoding.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), heap, bytes as _, bytecount as _, error.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WsWriteXmlnsAttribute(writer: *const WS_XML_WRITER, prefix: Option<*const WS_XML_STRING>, ns: *const WS_XML_STRING, singlequote: bool, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { 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); - unsafe { WsWriteXmlnsAttribute(writer, core::mem::transmute(prefix.unwrap_or(core::mem::zeroed())), ns, singlequote.into(), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsWriteXmlnsAttribute(writer, prefix.unwrap_or(core::mem::zeroed()) as _, ns, singlequote.into(), error.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { WsXmlStringEquals(string1, string2, core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WsXmlStringEquals(string1, string2, error.unwrap_or(core::mem::zeroed()) as _).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 6d2aa892d0..952b500cdc 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/AppLocker/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/AppLocker/mod.rs @@ -6,28 +6,28 @@ pub unsafe fn SaferCloseLevel(hlevelhandle: super::SAFER_LEVEL_HANDLE) -> window #[inline] 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); - unsafe { SaferComputeTokenFromLevel(levelhandle, core::mem::transmute(inaccesstoken.unwrap_or(core::mem::zeroed())), core::mem::transmute(outaccesstoken), dwflags, core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SaferComputeTokenFromLevel(levelhandle, inaccesstoken.unwrap_or(core::mem::zeroed()) as _, outaccesstoken as _, dwflags, lpreserved.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { SaferCreateLevel(dwscopeid, dwlevelid, openflags, core::mem::transmute(plevelhandle), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SaferCreateLevel(dwscopeid, dwlevelid, openflags, plevelhandle as _, lpreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SaferGetLevelInformation(levelhandle, dwinfotype, core::mem::transmute(lpquerybuffer.unwrap_or(core::mem::zeroed())), dwinbuffersize, core::mem::transmute(lpdwoutbuffersize)).ok() } + unsafe { SaferGetLevelInformation(levelhandle, dwinfotype, lpquerybuffer.unwrap_or(core::mem::zeroed()) as _, dwinbuffersize, lpdwoutbuffersize as _).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); - unsafe { SaferGetPolicyInformation(dwscopeid, saferpolicyinfoclass, infobuffersize, core::mem::transmute(infobuffer), core::mem::transmute(infobufferretsize), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SaferGetPolicyInformation(dwscopeid, saferpolicyinfoclass, infobuffersize, infobuffer as _, infobufferretsize as _, lpreserved.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { 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() } + unsafe { SaferIdentifyLevel(pcodeproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcodeproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), plevelhandle as _, lpreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SaferRecordEventLogEntry(hlevel: super::SAFER_LEVEL_HANDLE, sztargetpath: P1, lpreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -35,7 +35,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn SaferRecordEventLogEntry(hlevel : super:: SAFER_LEVEL_HANDLE, sztargetpath : windows_core::PCWSTR, lpreserved : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { SaferRecordEventLogEntry(hlevel, sztargetpath.param().abi(), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SaferRecordEventLogEntry(hlevel, sztargetpath.param().abi(), lpreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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<()> { @@ -45,7 +45,7 @@ pub unsafe fn SaferSetLevelInformation(levelhandle: super::SAFER_LEVEL_HANDLE, d #[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); - unsafe { SaferSetPolicyInformation(dwscopeid, saferpolicyinfoclass, infobuffersize, infobuffer, core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SaferSetPolicyInformation(dwscopeid, saferpolicyinfoclass, infobuffersize, infobuffer, lpreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SaferiIsExecutableFileType(szfullpathname: P0, bfromshellexecute: bool) -> 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 7524c1351c..f39abc2577 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 @@ -149,7 +149,7 @@ impl AsyncIConnectedIdentityProvider { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn Finish_GetUrl(&self, postdata: *mut super::super::super::super::System::Variant::VARIANT, url: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Finish_GetUrl)(windows_core::Interface::as_raw(self), core::mem::transmute(postdata), core::mem::transmute(url)).ok() } + unsafe { (windows_core::Interface::vtable(self).Finish_GetUrl)(windows_core::Interface::as_raw(self), core::mem::transmute(postdata), url as _).ok() } } pub unsafe fn Begin_GetAccountState(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Begin_GetAccountState)(windows_core::Interface::as_raw(self)).ok() } @@ -348,11 +348,11 @@ impl AsyncIIdentityAuthentication { } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn Begin_ValidateIdentityCredential(&self, credbuffer: &[u8], ppidentityproperties: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Begin_ValidateIdentityCredential)(windows_core::Interface::as_raw(self), core::mem::transmute(credbuffer.as_ptr()), credbuffer.len().try_into().unwrap(), ppidentityproperties.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn Finish_ValidateIdentityCredential(&self, ppidentityproperties: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Finish_ValidateIdentityCredential)(windows_core::Interface::as_raw(self), core::mem::transmute(ppidentityproperties.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Finish_ValidateIdentityCredential)(windows_core::Interface::as_raw(self), ppidentityproperties.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -422,7 +422,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<()> { - unsafe { (windows_core::Interface::vtable(self).Begin_GetIdentityEnum)(windows_core::Interface::as_raw(self), eidentitytype, core::mem::transmute(pfilterkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfilterpropvarvalue.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Begin_GetIdentityEnum)(windows_core::Interface::as_raw(self), eidentitytype, pfilterkey.unwrap_or(core::mem::zeroed()) as _, pfilterpropvarvalue.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Finish_GetIdentityEnum(&self) -> windows_core::Result { @@ -738,10 +738,10 @@ impl AsyncIIdentityStore { } } pub unsafe fn Begin_GetAt(&self, dwprovider: u32, pprovguid: Option<*mut windows_core::GUID>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Begin_GetAt)(windows_core::Interface::as_raw(self), dwprovider, core::mem::transmute(pprovguid.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Begin_GetAt)(windows_core::Interface::as_raw(self), dwprovider, pprovguid.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Finish_GetAt(&self, pprovguid: Option<*mut windows_core::GUID>, ppidentityprovider: *mut Option) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Finish_GetAt)(windows_core::Interface::as_raw(self), pprovguid.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(ppidentityprovider)).ok() } } pub unsafe fn Begin_AddToCache(&self, lpszuniqueid: P0, providerguid: *const windows_core::GUID) -> windows_core::Result<()> where @@ -756,14 +756,14 @@ impl AsyncIIdentityStore { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Begin_ConvertToSid)(windows_core::Interface::as_raw(self), lpszuniqueid.param().abi(), providerguid, cbsid, core::mem::transmute(psid.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Begin_ConvertToSid)(windows_core::Interface::as_raw(self), lpszuniqueid.param().abi(), providerguid, cbsid, psid.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Finish_ConvertToSid(&self, psid: Option<*mut u8>, pcbrequiredsid: *mut u16) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Finish_ConvertToSid)(windows_core::Interface::as_raw(self), psid.unwrap_or(core::mem::zeroed()) as _, pcbrequiredsid as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).Begin_EnumerateIdentities)(windows_core::Interface::as_raw(self), eidentitytype, core::mem::transmute(pfilterkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfilterpropvarvalue.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Begin_EnumerateIdentities)(windows_core::Interface::as_raw(self), eidentitytype, pfilterkey.unwrap_or(core::mem::zeroed()) as _, pfilterpropvarvalue.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Finish_EnumerateIdentities(&self) -> windows_core::Result { @@ -1104,7 +1104,7 @@ impl IConnectedIdentityProvider { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetUrl)(windows_core::Interface::as_raw(self), identifier, context.param().abi(), core::mem::transmute(postdata), core::mem::transmute(url)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUrl)(windows_core::Interface::as_raw(self), identifier, context.param().abi(), core::mem::transmute(postdata), url as _).ok() } } pub unsafe fn GetAccountState(&self) -> windows_core::Result { unsafe { @@ -1261,7 +1261,7 @@ impl IIdentityAuthentication { } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn ValidateIdentityCredential(&self, credbuffer: &[u8], ppidentityproperties: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).ValidateIdentityCredential)(windows_core::Interface::as_raw(self), core::mem::transmute(credbuffer.as_ptr()), credbuffer.len().try_into().unwrap(), ppidentityproperties.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -1312,7 +1312,7 @@ impl IIdentityProvider { 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 { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetIdentityEnum)(windows_core::Interface::as_raw(self), eidentitytype, core::mem::transmute(pfilterkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfilterpropvarvalue.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetIdentityEnum)(windows_core::Interface::as_raw(self), eidentitytype, pfilterkey.unwrap_or(core::mem::zeroed()) as _, pfilterpropvarvalue.unwrap_or(core::mem::zeroed()) as _, &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"))] @@ -1510,7 +1510,7 @@ impl IIdentityStore { } } pub unsafe fn GetAt(&self, dwprovider: u32, pprovguid: Option<*mut windows_core::GUID>, ppidentityprovider: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAt)(windows_core::Interface::as_raw(self), dwprovider, core::mem::transmute(pprovguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppidentityprovider)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAt)(windows_core::Interface::as_raw(self), dwprovider, pprovguid.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(ppidentityprovider)).ok() } } pub unsafe fn AddToCache(&self, lpszuniqueid: P0, providerguid: *const windows_core::GUID) -> windows_core::Result<()> where @@ -1522,13 +1522,13 @@ impl IIdentityStore { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ConvertToSid)(windows_core::Interface::as_raw(self), lpszuniqueid.param().abi(), providerguid, psid.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(psid.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pcbrequiredsid)).ok() } + unsafe { (windows_core::Interface::vtable(self).ConvertToSid)(windows_core::Interface::as_raw(self), lpszuniqueid.param().abi(), providerguid, psid.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(psid.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcbrequiredsid as _).ok() } } #[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 { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).EnumerateIdentities)(windows_core::Interface::as_raw(self), eidentitytype, core::mem::transmute(pfilterkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfilterpropvarvalue.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).EnumerateIdentities)(windows_core::Interface::as_raw(self), eidentitytype, pfilterkey.unwrap_or(core::mem::zeroed()) as _, pfilterpropvarvalue.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { 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 55b10ac628..d316784dc8 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Authentication/Identity/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Authentication/Identity/mod.rs @@ -4,7 +4,7 @@ pub mod Provider; #[inline] pub unsafe fn AcceptSecurityContext(phcredential: Option<*const super::super::Credentials::SecHandle>, phcontext: Option<*const super::super::Credentials::SecHandle>, pinput: Option<*const SecBufferDesc>, fcontextreq: ASC_REQ_FLAGS, targetdatarep: u32, phnewcontext: Option<*mut super::super::Credentials::SecHandle>, poutput: Option<*mut SecBufferDesc>, pfcontextattr: *mut u32, ptsexpiry: Option<*mut i64>) -> windows_core::HRESULT { windows_targets::link!("secur32.dll" "system" fn AcceptSecurityContext(phcredential : *const super::super::Credentials:: SecHandle, phcontext : *const super::super::Credentials:: SecHandle, pinput : *const SecBufferDesc, fcontextreq : ASC_REQ_FLAGS, targetdatarep : u32, phnewcontext : *mut super::super::Credentials:: SecHandle, poutput : *mut SecBufferDesc, pfcontextattr : *mut u32, ptsexpiry : *mut i64) -> windows_core::HRESULT); - unsafe { AcceptSecurityContext(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())), fcontextreq, targetdatarep, 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::mem::zeroed()))) } + unsafe { AcceptSecurityContext(phcredential.unwrap_or(core::mem::zeroed()) as _, phcontext.unwrap_or(core::mem::zeroed()) as _, pinput.unwrap_or(core::mem::zeroed()) as _, fcontextreq, targetdatarep, phnewcontext.unwrap_or(core::mem::zeroed()) as _, poutput.unwrap_or(core::mem::zeroed()) as _, pfcontextattr as _, ptsexpiry.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security_Credentials")] #[inline] @@ -14,7 +14,7 @@ where P1: windows_core::Param, { windows_targets::link!("secur32.dll" "system" fn AcquireCredentialsHandleA(pszprincipal : windows_core::PCSTR, pszpackage : windows_core::PCSTR, fcredentialuse : SECPKG_CRED, pvlogonid : *const core::ffi::c_void, pauthdata : *const core::ffi::c_void, pgetkeyfn : SEC_GET_KEY_FN, pvgetkeyargument : *const core::ffi::c_void, phcredential : *mut super::super::Credentials:: SecHandle, ptsexpiry : *mut i64) -> windows_core::HRESULT); - unsafe { AcquireCredentialsHandleA(pszprincipal.param().abi(), pszpackage.param().abi(), 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() } + unsafe { AcquireCredentialsHandleA(pszprincipal.param().abi(), pszpackage.param().abi(), fcredentialuse, pvlogonid.unwrap_or(core::mem::zeroed()) as _, pauthdata.unwrap_or(core::mem::zeroed()) as _, pgetkeyfn.unwrap_or(core::mem::zeroed()) as _, pvgetkeyargument.unwrap_or(core::mem::zeroed()) as _, phcredential as _, ptsexpiry.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Security_Credentials")] #[inline] @@ -24,7 +24,7 @@ where P1: windows_core::Param, { windows_targets::link!("secur32.dll" "system" fn AcquireCredentialsHandleW(pszprincipal : windows_core::PCWSTR, pszpackage : windows_core::PCWSTR, fcredentialuse : SECPKG_CRED, pvlogonid : *const core::ffi::c_void, pauthdata : *const core::ffi::c_void, pgetkeyfn : SEC_GET_KEY_FN, pvgetkeyargument : *const core::ffi::c_void, phcredential : *mut super::super::Credentials:: SecHandle, ptsexpiry : *mut i64) -> windows_core::HRESULT); - unsafe { AcquireCredentialsHandleW(pszprincipal.param().abi(), pszpackage.param().abi(), 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() } + unsafe { AcquireCredentialsHandleW(pszprincipal.param().abi(), pszpackage.param().abi(), fcredentialuse, pvlogonid.unwrap_or(core::mem::zeroed()) as _, pauthdata.unwrap_or(core::mem::zeroed()) as _, pgetkeyfn.unwrap_or(core::mem::zeroed()) as _, pvgetkeyargument.unwrap_or(core::mem::zeroed()) as _, phcredential as _, ptsexpiry.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Security_Credentials")] #[inline] @@ -34,7 +34,7 @@ where 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); - unsafe { AddCredentialsA(hcredentials, pszprincipal.param().abi(), pszpackage.param().abi(), 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() } + unsafe { AddCredentialsA(hcredentials, pszprincipal.param().abi(), pszpackage.param().abi(), fcredentialuse, pauthdata.unwrap_or(core::mem::zeroed()) as _, pgetkeyfn.unwrap_or(core::mem::zeroed()) as _, pvgetkeyargument.unwrap_or(core::mem::zeroed()) as _, ptsexpiry.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Security_Credentials")] #[inline] @@ -44,7 +44,7 @@ where 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); - unsafe { AddCredentialsW(hcredentials, pszprincipal.param().abi(), pszpackage.param().abi(), 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() } + unsafe { AddCredentialsW(hcredentials, pszprincipal.param().abi(), pszpackage.param().abi(), fcredentialuse, pauthdata.unwrap_or(core::mem::zeroed()) as _, pgetkeyfn.unwrap_or(core::mem::zeroed()) as _, pvgetkeyargument.unwrap_or(core::mem::zeroed()) as _, ptsexpiry.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn AddSecurityPackageA(pszpackagename: P0, poptions: Option<*const SECURITY_PACKAGE_OPTIONS>) -> windows_core::Result<()> @@ -52,7 +52,7 @@ where P0: windows_core::Param, { windows_targets::link!("secur32.dll" "system" fn AddSecurityPackageA(pszpackagename : windows_core::PCSTR, poptions : *const SECURITY_PACKAGE_OPTIONS) -> windows_core::HRESULT); - unsafe { AddSecurityPackageA(pszpackagename.param().abi(), core::mem::transmute(poptions.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { AddSecurityPackageA(pszpackagename.param().abi(), poptions.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn AddSecurityPackageW(pszpackagename: P0, poptions: Option<*const SECURITY_PACKAGE_OPTIONS>) -> windows_core::Result<()> @@ -60,7 +60,7 @@ where P0: windows_core::Param, { windows_targets::link!("secur32.dll" "system" fn AddSecurityPackageW(pszpackagename : windows_core::PCWSTR, poptions : *const SECURITY_PACKAGE_OPTIONS) -> windows_core::HRESULT); - unsafe { AddSecurityPackageW(pszpackagename.param().abi(), core::mem::transmute(poptions.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { AddSecurityPackageW(pszpackagename.param().abi(), poptions.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Security_Credentials")] #[inline] @@ -71,27 +71,27 @@ pub unsafe fn ApplyControlToken(phcontext: *const super::super::Credentials::Sec #[inline] pub unsafe fn AuditComputeEffectivePolicyBySid(psid: super::super::PSID, psubcategoryguids: &[windows_core::GUID], ppauditpolicy: *mut *mut AUDIT_POLICY_INFORMATION) -> bool { 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) -> bool); - unsafe { AuditComputeEffectivePolicyBySid(psid, core::mem::transmute(psubcategoryguids.as_ptr()), psubcategoryguids.len().try_into().unwrap(), core::mem::transmute(ppauditpolicy)) } + unsafe { AuditComputeEffectivePolicyBySid(psid, core::mem::transmute(psubcategoryguids.as_ptr()), psubcategoryguids.len().try_into().unwrap(), ppauditpolicy as _) } } #[inline] pub unsafe fn AuditComputeEffectivePolicyByToken(htokenhandle: super::super::super::Foundation::HANDLE, psubcategoryguids: &[windows_core::GUID], ppauditpolicy: *mut *mut AUDIT_POLICY_INFORMATION) -> bool { 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) -> bool); - unsafe { AuditComputeEffectivePolicyByToken(htokenhandle, core::mem::transmute(psubcategoryguids.as_ptr()), psubcategoryguids.len().try_into().unwrap(), core::mem::transmute(ppauditpolicy)) } + unsafe { AuditComputeEffectivePolicyByToken(htokenhandle, core::mem::transmute(psubcategoryguids.as_ptr()), psubcategoryguids.len().try_into().unwrap(), ppauditpolicy as _) } } #[inline] pub unsafe fn AuditEnumerateCategories(ppauditcategoriesarray: *mut *mut windows_core::GUID, pdwcountreturned: *mut u32) -> bool { windows_targets::link!("advapi32.dll" "system" fn AuditEnumerateCategories(ppauditcategoriesarray : *mut *mut windows_core::GUID, pdwcountreturned : *mut u32) -> bool); - unsafe { AuditEnumerateCategories(core::mem::transmute(ppauditcategoriesarray), core::mem::transmute(pdwcountreturned)) } + unsafe { AuditEnumerateCategories(ppauditcategoriesarray as _, pdwcountreturned as _) } } #[inline] pub unsafe fn AuditEnumeratePerUserPolicy(ppauditsidarray: *mut *mut POLICY_AUDIT_SID_ARRAY) -> bool { windows_targets::link!("advapi32.dll" "system" fn AuditEnumeratePerUserPolicy(ppauditsidarray : *mut *mut POLICY_AUDIT_SID_ARRAY) -> bool); - unsafe { AuditEnumeratePerUserPolicy(core::mem::transmute(ppauditsidarray)) } + unsafe { AuditEnumeratePerUserPolicy(ppauditsidarray as _) } } #[inline] pub unsafe fn AuditEnumerateSubCategories(pauditcategoryguid: Option<*const windows_core::GUID>, bretrieveallsubcategories: bool, ppauditsubcategoriesarray: *mut *mut windows_core::GUID, pdwcountreturned: *mut u32) -> bool { windows_targets::link!("advapi32.dll" "system" fn AuditEnumerateSubCategories(pauditcategoryguid : *const windows_core::GUID, bretrieveallsubcategories : bool, ppauditsubcategoriesarray : *mut *mut windows_core::GUID, pdwcountreturned : *mut u32) -> bool); - unsafe { AuditEnumerateSubCategories(core::mem::transmute(pauditcategoryguid.unwrap_or(core::mem::zeroed())), bretrieveallsubcategories, core::mem::transmute(ppauditsubcategoriesarray), core::mem::transmute(pdwcountreturned)) } + unsafe { AuditEnumerateSubCategories(pauditcategoryguid.unwrap_or(core::mem::zeroed()) as _, bretrieveallsubcategories, ppauditsubcategoriesarray as _, pdwcountreturned as _) } } #[inline] pub unsafe fn AuditFree(buffer: *const core::ffi::c_void) { @@ -101,32 +101,32 @@ pub unsafe fn AuditFree(buffer: *const core::ffi::c_void) { #[inline] pub unsafe fn AuditLookupCategoryGuidFromCategoryId(auditcategoryid: POLICY_AUDIT_EVENT_TYPE, pauditcategoryguid: *mut windows_core::GUID) -> bool { windows_targets::link!("advapi32.dll" "system" fn AuditLookupCategoryGuidFromCategoryId(auditcategoryid : POLICY_AUDIT_EVENT_TYPE, pauditcategoryguid : *mut windows_core::GUID) -> bool); - unsafe { AuditLookupCategoryGuidFromCategoryId(auditcategoryid, core::mem::transmute(pauditcategoryguid)) } + unsafe { AuditLookupCategoryGuidFromCategoryId(auditcategoryid, pauditcategoryguid as _) } } #[inline] pub unsafe fn AuditLookupCategoryIdFromCategoryGuid(pauditcategoryguid: *const windows_core::GUID, pauditcategoryid: *mut POLICY_AUDIT_EVENT_TYPE) -> bool { windows_targets::link!("advapi32.dll" "system" fn AuditLookupCategoryIdFromCategoryGuid(pauditcategoryguid : *const windows_core::GUID, pauditcategoryid : *mut POLICY_AUDIT_EVENT_TYPE) -> bool); - unsafe { AuditLookupCategoryIdFromCategoryGuid(pauditcategoryguid, core::mem::transmute(pauditcategoryid)) } + unsafe { AuditLookupCategoryIdFromCategoryGuid(pauditcategoryguid, pauditcategoryid as _) } } #[inline] pub unsafe fn AuditLookupCategoryNameA(pauditcategoryguid: *const windows_core::GUID, ppszcategoryname: *mut windows_core::PSTR) -> bool { windows_targets::link!("advapi32.dll" "system" fn AuditLookupCategoryNameA(pauditcategoryguid : *const windows_core::GUID, ppszcategoryname : *mut windows_core::PSTR) -> bool); - unsafe { AuditLookupCategoryNameA(pauditcategoryguid, core::mem::transmute(ppszcategoryname)) } + unsafe { AuditLookupCategoryNameA(pauditcategoryguid, ppszcategoryname as _) } } #[inline] pub unsafe fn AuditLookupCategoryNameW(pauditcategoryguid: *const windows_core::GUID, ppszcategoryname: *mut windows_core::PWSTR) -> bool { windows_targets::link!("advapi32.dll" "system" fn AuditLookupCategoryNameW(pauditcategoryguid : *const windows_core::GUID, ppszcategoryname : *mut windows_core::PWSTR) -> bool); - unsafe { AuditLookupCategoryNameW(pauditcategoryguid, core::mem::transmute(ppszcategoryname)) } + unsafe { AuditLookupCategoryNameW(pauditcategoryguid, ppszcategoryname as _) } } #[inline] pub unsafe fn AuditLookupSubCategoryNameA(pauditsubcategoryguid: *const windows_core::GUID, ppszsubcategoryname: *mut windows_core::PSTR) -> bool { windows_targets::link!("advapi32.dll" "system" fn AuditLookupSubCategoryNameA(pauditsubcategoryguid : *const windows_core::GUID, ppszsubcategoryname : *mut windows_core::PSTR) -> bool); - unsafe { AuditLookupSubCategoryNameA(pauditsubcategoryguid, core::mem::transmute(ppszsubcategoryname)) } + unsafe { AuditLookupSubCategoryNameA(pauditsubcategoryguid, ppszsubcategoryname as _) } } #[inline] pub unsafe fn AuditLookupSubCategoryNameW(pauditsubcategoryguid: *const windows_core::GUID, ppszsubcategoryname: *mut windows_core::PWSTR) -> bool { windows_targets::link!("advapi32.dll" "system" fn AuditLookupSubCategoryNameW(pauditsubcategoryguid : *const windows_core::GUID, ppszsubcategoryname : *mut windows_core::PWSTR) -> bool); - unsafe { AuditLookupSubCategoryNameW(pauditsubcategoryguid, core::mem::transmute(ppszsubcategoryname)) } + unsafe { AuditLookupSubCategoryNameW(pauditsubcategoryguid, ppszsubcategoryname as _) } } #[inline] pub unsafe fn AuditQueryGlobalSaclA(objecttypename: P0, acl: *mut *mut super::super::ACL) -> bool @@ -134,7 +134,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn AuditQueryGlobalSaclA(objecttypename : windows_core::PCSTR, acl : *mut *mut super::super:: ACL) -> bool); - unsafe { AuditQueryGlobalSaclA(objecttypename.param().abi(), core::mem::transmute(acl)) } + unsafe { AuditQueryGlobalSaclA(objecttypename.param().abi(), acl as _) } } #[inline] pub unsafe fn AuditQueryGlobalSaclW(objecttypename: P0, acl: *mut *mut super::super::ACL) -> bool @@ -142,22 +142,22 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn AuditQueryGlobalSaclW(objecttypename : windows_core::PCWSTR, acl : *mut *mut super::super:: ACL) -> bool); - unsafe { AuditQueryGlobalSaclW(objecttypename.param().abi(), core::mem::transmute(acl)) } + unsafe { AuditQueryGlobalSaclW(objecttypename.param().abi(), acl as _) } } #[inline] pub unsafe fn AuditQueryPerUserPolicy(psid: super::super::PSID, psubcategoryguids: &[windows_core::GUID], ppauditpolicy: *mut *mut AUDIT_POLICY_INFORMATION) -> bool { 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) -> bool); - unsafe { AuditQueryPerUserPolicy(psid, core::mem::transmute(psubcategoryguids.as_ptr()), psubcategoryguids.len().try_into().unwrap(), core::mem::transmute(ppauditpolicy)) } + unsafe { AuditQueryPerUserPolicy(psid, core::mem::transmute(psubcategoryguids.as_ptr()), psubcategoryguids.len().try_into().unwrap(), ppauditpolicy as _) } } #[inline] pub unsafe fn AuditQuerySecurity(securityinformation: super::super::OBJECT_SECURITY_INFORMATION, ppsecuritydescriptor: *mut super::super::PSECURITY_DESCRIPTOR) -> bool { windows_targets::link!("advapi32.dll" "system" fn AuditQuerySecurity(securityinformation : super::super:: OBJECT_SECURITY_INFORMATION, ppsecuritydescriptor : *mut super::super:: PSECURITY_DESCRIPTOR) -> bool); - unsafe { AuditQuerySecurity(securityinformation, core::mem::transmute(ppsecuritydescriptor)) } + unsafe { AuditQuerySecurity(securityinformation, ppsecuritydescriptor as _) } } #[inline] pub unsafe fn AuditQuerySystemPolicy(psubcategoryguids: &[windows_core::GUID], ppauditpolicy: *mut *mut AUDIT_POLICY_INFORMATION) -> bool { windows_targets::link!("advapi32.dll" "system" fn AuditQuerySystemPolicy(psubcategoryguids : *const windows_core::GUID, dwpolicycount : u32, ppauditpolicy : *mut *mut AUDIT_POLICY_INFORMATION) -> bool); - unsafe { AuditQuerySystemPolicy(core::mem::transmute(psubcategoryguids.as_ptr()), psubcategoryguids.len().try_into().unwrap(), core::mem::transmute(ppauditpolicy)) } + unsafe { AuditQuerySystemPolicy(core::mem::transmute(psubcategoryguids.as_ptr()), psubcategoryguids.len().try_into().unwrap(), ppauditpolicy as _) } } #[inline] pub unsafe fn AuditSetGlobalSaclA(objecttypename: P0, acl: Option<*const super::super::ACL>) -> bool @@ -165,7 +165,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn AuditSetGlobalSaclA(objecttypename : windows_core::PCSTR, acl : *const super::super:: ACL) -> bool); - unsafe { AuditSetGlobalSaclA(objecttypename.param().abi(), core::mem::transmute(acl.unwrap_or(core::mem::zeroed()))) } + unsafe { AuditSetGlobalSaclA(objecttypename.param().abi(), acl.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn AuditSetGlobalSaclW(objecttypename: P0, acl: Option<*const super::super::ACL>) -> bool @@ -173,7 +173,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn AuditSetGlobalSaclW(objecttypename : windows_core::PCWSTR, acl : *const super::super:: ACL) -> bool); - unsafe { AuditSetGlobalSaclW(objecttypename.param().abi(), core::mem::transmute(acl.unwrap_or(core::mem::zeroed()))) } + unsafe { AuditSetGlobalSaclW(objecttypename.param().abi(), acl.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn AuditSetPerUserPolicy(psid: super::super::PSID, pauditpolicy: &[AUDIT_POLICY_INFORMATION]) -> bool { @@ -193,12 +193,12 @@ pub unsafe fn AuditSetSystemPolicy(pauditpolicy: &[AUDIT_POLICY_INFORMATION]) -> #[inline] pub unsafe fn ChangeAccountPasswordA(pszpackagename: *const i8, pszdomainname: *const i8, pszaccountname: *const i8, pszoldpassword: *const i8, psznewpassword: *const i8, bimpersonating: bool, dwreserved: u32, poutput: *mut SecBufferDesc) -> windows_core::Result<()> { windows_targets::link!("secur32.dll" "system" fn ChangeAccountPasswordA(pszpackagename : *const i8, pszdomainname : *const i8, pszaccountname : *const i8, pszoldpassword : *const i8, psznewpassword : *const i8, bimpersonating : bool, dwreserved : u32, poutput : *mut SecBufferDesc) -> windows_core::HRESULT); - unsafe { ChangeAccountPasswordA(pszpackagename, pszdomainname, pszaccountname, pszoldpassword, psznewpassword, bimpersonating, dwreserved, core::mem::transmute(poutput)).ok() } + unsafe { ChangeAccountPasswordA(pszpackagename, pszdomainname, pszaccountname, pszoldpassword, psznewpassword, bimpersonating, dwreserved, poutput as _).ok() } } #[inline] pub unsafe fn ChangeAccountPasswordW(pszpackagename: *const u16, pszdomainname: *const u16, pszaccountname: *const u16, pszoldpassword: *const u16, psznewpassword: *const u16, bimpersonating: bool, dwreserved: u32, poutput: *mut SecBufferDesc) -> windows_core::Result<()> { windows_targets::link!("secur32.dll" "system" fn ChangeAccountPasswordW(pszpackagename : *const u16, pszdomainname : *const u16, pszaccountname : *const u16, pszoldpassword : *const u16, psznewpassword : *const u16, bimpersonating : bool, dwreserved : u32, poutput : *mut SecBufferDesc) -> windows_core::HRESULT); - unsafe { ChangeAccountPasswordW(pszpackagename, pszdomainname, pszaccountname, pszoldpassword, psznewpassword, bimpersonating, dwreserved, core::mem::transmute(poutput)).ok() } + unsafe { ChangeAccountPasswordW(pszpackagename, pszdomainname, pszaccountname, pszoldpassword, psznewpassword, bimpersonating, dwreserved, poutput as _).ok() } } #[cfg(feature = "Win32_Security_Credentials")] #[inline] @@ -210,19 +210,19 @@ pub unsafe fn CompleteAuthToken(phcontext: *const super::super::Credentials::Sec #[inline] pub unsafe fn CredMarshalTargetInfo(intargetinfo: *const super::super::Credentials::CREDENTIAL_TARGET_INFORMATIONW, buffer: *mut *mut u16, buffersize: *mut u32) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("secur32.dll" "system" fn CredMarshalTargetInfo(intargetinfo : *const super::super::Credentials:: CREDENTIAL_TARGET_INFORMATIONW, buffer : *mut *mut u16, buffersize : *mut u32) -> super::super::super::Foundation:: NTSTATUS); - unsafe { CredMarshalTargetInfo(intargetinfo, core::mem::transmute(buffer), core::mem::transmute(buffersize)) } + unsafe { CredMarshalTargetInfo(intargetinfo, buffer as _, buffersize as _) } } #[cfg(feature = "Win32_Security_Credentials")] #[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); - unsafe { CredUnmarshalTargetInfo(buffer, buffersize, core::mem::transmute(rettargetinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(retactualsize.unwrap_or(core::mem::zeroed()))) } + unsafe { CredUnmarshalTargetInfo(buffer, buffersize, rettargetinfo.unwrap_or(core::mem::zeroed()) as _, retactualsize.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { DecryptMessage(phcontext, pmessage, messageseqno, core::mem::transmute(pfqop.unwrap_or(core::mem::zeroed()))) } + unsafe { DecryptMessage(phcontext, pmessage, messageseqno, pfqop.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security_Credentials")] #[inline] @@ -255,23 +255,23 @@ pub unsafe fn EncryptMessage(phcontext: *const super::super::Credentials::SecHan #[inline] pub unsafe fn EnumerateSecurityPackagesA(pcpackages: *mut u32, pppackageinfo: *mut *mut SecPkgInfoA) -> windows_core::Result<()> { windows_targets::link!("secur32.dll" "system" fn EnumerateSecurityPackagesA(pcpackages : *mut u32, pppackageinfo : *mut *mut SecPkgInfoA) -> windows_core::HRESULT); - unsafe { EnumerateSecurityPackagesA(core::mem::transmute(pcpackages), core::mem::transmute(pppackageinfo)).ok() } + unsafe { EnumerateSecurityPackagesA(pcpackages as _, pppackageinfo as _).ok() } } #[inline] pub unsafe fn EnumerateSecurityPackagesW(pcpackages: *mut u32, pppackageinfo: *mut *mut SecPkgInfoW) -> windows_core::Result<()> { windows_targets::link!("secur32.dll" "system" fn EnumerateSecurityPackagesW(pcpackages : *mut u32, pppackageinfo : *mut *mut SecPkgInfoW) -> windows_core::HRESULT); - unsafe { EnumerateSecurityPackagesW(core::mem::transmute(pcpackages), core::mem::transmute(pppackageinfo)).ok() } + unsafe { EnumerateSecurityPackagesW(pcpackages as _, pppackageinfo as _).ok() } } #[cfg(feature = "Win32_Security_Credentials")] #[inline] pub unsafe fn ExportSecurityContext(phcontext: *const super::super::Credentials::SecHandle, fflags: EXPORT_SECURITY_CONTEXT_FLAGS, ppackedcontext: *mut SecBuffer, ptoken: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("secur32.dll" "system" fn ExportSecurityContext(phcontext : *const super::super::Credentials:: SecHandle, fflags : EXPORT_SECURITY_CONTEXT_FLAGS, ppackedcontext : *mut SecBuffer, ptoken : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { ExportSecurityContext(phcontext, fflags, core::mem::transmute(ppackedcontext), core::mem::transmute(ptoken)).ok() } + unsafe { ExportSecurityContext(phcontext, fflags, ppackedcontext as _, ptoken as _).ok() } } #[inline] pub unsafe fn FreeContextBuffer(pvcontextbuffer: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("secur32.dll" "system" fn FreeContextBuffer(pvcontextbuffer : *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { FreeContextBuffer(core::mem::transmute(pvcontextbuffer)).ok() } + unsafe { FreeContextBuffer(pvcontextbuffer as _).ok() } } #[cfg(feature = "Win32_Security_Credentials")] #[inline] @@ -282,22 +282,22 @@ pub unsafe fn FreeCredentialsHandle(phcredential: *const super::super::Credentia #[inline] pub unsafe fn GetComputerObjectNameA(nameformat: EXTENDED_NAME_FORMAT, lpnamebuffer: Option, nsize: *mut u32) -> bool { windows_targets::link!("secur32.dll" "system" fn GetComputerObjectNameA(nameformat : EXTENDED_NAME_FORMAT, lpnamebuffer : windows_core::PSTR, nsize : *mut u32) -> bool); - unsafe { GetComputerObjectNameA(nameformat, core::mem::transmute(lpnamebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize)) } + unsafe { GetComputerObjectNameA(nameformat, lpnamebuffer.unwrap_or(core::mem::zeroed()) as _, nsize as _) } } #[inline] pub unsafe fn GetComputerObjectNameW(nameformat: EXTENDED_NAME_FORMAT, lpnamebuffer: Option, nsize: *mut u32) -> bool { windows_targets::link!("secur32.dll" "system" fn GetComputerObjectNameW(nameformat : EXTENDED_NAME_FORMAT, lpnamebuffer : windows_core::PWSTR, nsize : *mut u32) -> bool); - unsafe { GetComputerObjectNameW(nameformat, core::mem::transmute(lpnamebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize)) } + unsafe { GetComputerObjectNameW(nameformat, lpnamebuffer.unwrap_or(core::mem::zeroed()) as _, nsize as _) } } #[inline] pub unsafe fn GetUserNameExA(nameformat: EXTENDED_NAME_FORMAT, lpnamebuffer: Option, nsize: *mut u32) -> bool { windows_targets::link!("secur32.dll" "system" fn GetUserNameExA(nameformat : EXTENDED_NAME_FORMAT, lpnamebuffer : windows_core::PSTR, nsize : *mut u32) -> bool); - unsafe { GetUserNameExA(nameformat, core::mem::transmute(lpnamebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize)) } + unsafe { GetUserNameExA(nameformat, lpnamebuffer.unwrap_or(core::mem::zeroed()) as _, nsize as _) } } #[inline] pub unsafe fn GetUserNameExW(nameformat: EXTENDED_NAME_FORMAT, lpnamebuffer: Option, nsize: *mut u32) -> bool { windows_targets::link!("secur32.dll" "system" fn GetUserNameExW(nameformat : EXTENDED_NAME_FORMAT, lpnamebuffer : windows_core::PWSTR, nsize : *mut u32) -> bool); - unsafe { GetUserNameExW(nameformat, core::mem::transmute(lpnamebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize)) } + unsafe { GetUserNameExW(nameformat, lpnamebuffer.unwrap_or(core::mem::zeroed()) as _, nsize as _) } } #[cfg(feature = "Win32_Security_Credentials")] #[inline] @@ -345,43 +345,13 @@ pub unsafe fn InitSecurityInterfaceW() -> *mut SecurityFunctionTableW { #[inline] 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); - unsafe { - InitializeSecurityContextA( - 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())), - fcontextreq, - reserved1, - targetdatarep, - core::mem::transmute(pinput.unwrap_or(core::mem::zeroed())), - reserved2, - 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::mem::zeroed())), - ) - } + unsafe { InitializeSecurityContextA(phcredential.unwrap_or(core::mem::zeroed()) as _, phcontext.unwrap_or(core::mem::zeroed()) as _, psztargetname.unwrap_or(core::mem::zeroed()) as _, fcontextreq, reserved1, targetdatarep, pinput.unwrap_or(core::mem::zeroed()) as _, reserved2, phnewcontext.unwrap_or(core::mem::zeroed()) as _, poutput.unwrap_or(core::mem::zeroed()) as _, pfcontextattr as _, ptsexpiry.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security_Credentials")] #[inline] 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); - unsafe { - InitializeSecurityContextW( - 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())), - fcontextreq, - reserved1, - targetdatarep, - core::mem::transmute(pinput.unwrap_or(core::mem::zeroed())), - reserved2, - 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::mem::zeroed())), - ) - } + unsafe { InitializeSecurityContextW(phcredential.unwrap_or(core::mem::zeroed()) as _, phcontext.unwrap_or(core::mem::zeroed()) as _, psztargetname.unwrap_or(core::mem::zeroed()) as _, fcontextreq, reserved1, targetdatarep, pinput.unwrap_or(core::mem::zeroed()) as _, reserved2, phnewcontext.unwrap_or(core::mem::zeroed()) as _, poutput.unwrap_or(core::mem::zeroed()) as _, pfcontextattr as _, ptsexpiry.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn LsaAddAccountRights(policyhandle: LSA_HANDLE, accountsid: super::super::PSID, userrights: &[LSA_UNICODE_STRING]) -> super::super::super::Foundation::NTSTATUS { @@ -391,7 +361,7 @@ pub unsafe fn LsaAddAccountRights(policyhandle: LSA_HANDLE, accountsid: super::s #[inline] 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); - unsafe { LsaCallAuthenticationPackage(lsahandle, authenticationpackage, protocolsubmitbuffer, 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()))) } + unsafe { LsaCallAuthenticationPackage(lsahandle, authenticationpackage, protocolsubmitbuffer, submitbufferlength, protocolreturnbuffer.unwrap_or(core::mem::zeroed()) as _, returnbufferlength.unwrap_or(core::mem::zeroed()) as _, protocolstatus.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn LsaClose(objecthandle: LSA_HANDLE) -> super::super::super::Foundation::NTSTATUS { @@ -401,12 +371,12 @@ pub unsafe fn LsaClose(objecthandle: LSA_HANDLE) -> super::super::super::Foundat #[inline] pub unsafe fn LsaConnectUntrusted(lsahandle: *mut super::super::super::Foundation::HANDLE) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("secur32.dll" "system" fn LsaConnectUntrusted(lsahandle : *mut super::super::super::Foundation:: HANDLE) -> super::super::super::Foundation:: NTSTATUS); - unsafe { LsaConnectUntrusted(core::mem::transmute(lsahandle)) } + unsafe { LsaConnectUntrusted(lsahandle as _) } } #[inline] 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); - unsafe { LsaCreateTrustedDomainEx(policyhandle, trusteddomaininformation, authenticationinformation, desiredaccess, core::mem::transmute(trusteddomainhandle)) } + unsafe { LsaCreateTrustedDomainEx(policyhandle, trusteddomaininformation, authenticationinformation, desiredaccess, trusteddomainhandle as _) } } #[inline] pub unsafe fn LsaDeleteTrustedDomain(policyhandle: LSA_HANDLE, trusteddomainsid: super::super::PSID) -> super::super::super::Foundation::NTSTATUS { @@ -421,32 +391,32 @@ pub unsafe fn LsaDeregisterLogonProcess(lsahandle: super::super::super::Foundati #[inline] 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); - unsafe { LsaEnumerateAccountRights(policyhandle, accountsid, core::mem::transmute(userrights), core::mem::transmute(countofrights)) } + unsafe { LsaEnumerateAccountRights(policyhandle, accountsid, userrights as _, countofrights as _) } } #[inline] 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); - unsafe { LsaEnumerateAccountsWithUserRight(policyhandle, core::mem::transmute(userright.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer), core::mem::transmute(countreturned)) } + unsafe { LsaEnumerateAccountsWithUserRight(policyhandle, userright.unwrap_or(core::mem::zeroed()) as _, buffer as _, countreturned as _) } } #[inline] pub unsafe fn LsaEnumerateLogonSessions(logonsessioncount: *mut u32, logonsessionlist: *mut *mut super::super::super::Foundation::LUID) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("secur32.dll" "system" fn LsaEnumerateLogonSessions(logonsessioncount : *mut u32, logonsessionlist : *mut *mut super::super::super::Foundation:: LUID) -> super::super::super::Foundation:: NTSTATUS); - unsafe { LsaEnumerateLogonSessions(core::mem::transmute(logonsessioncount), core::mem::transmute(logonsessionlist)) } + unsafe { LsaEnumerateLogonSessions(logonsessioncount as _, logonsessionlist as _) } } #[inline] 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); - unsafe { LsaEnumerateTrustedDomains(policyhandle, core::mem::transmute(enumerationcontext), core::mem::transmute(buffer), preferedmaximumlength, core::mem::transmute(countreturned)) } + unsafe { LsaEnumerateTrustedDomains(policyhandle, enumerationcontext as _, buffer as _, preferedmaximumlength, countreturned as _) } } #[inline] 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); - unsafe { LsaEnumerateTrustedDomainsEx(policyhandle, core::mem::transmute(enumerationcontext), core::mem::transmute(buffer), preferedmaximumlength, core::mem::transmute(countreturned)) } + unsafe { LsaEnumerateTrustedDomainsEx(policyhandle, enumerationcontext as _, buffer as _, preferedmaximumlength, countreturned as _) } } #[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); - unsafe { LsaFreeMemory(core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } + unsafe { LsaFreeMemory(buffer.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn LsaFreeReturnBuffer(buffer: *const core::ffi::c_void) -> super::super::super::Foundation::NTSTATUS { @@ -456,42 +426,42 @@ 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); - unsafe { LsaGetAppliedCAPIDs(core::mem::transmute(systemname.unwrap_or(core::mem::zeroed())), core::mem::transmute(capids), core::mem::transmute(capidcount)) } + unsafe { LsaGetAppliedCAPIDs(systemname.unwrap_or(core::mem::zeroed()) as _, capids as _, capidcount as _) } } #[inline] pub unsafe fn LsaGetLogonSessionData(logonid: *const super::super::super::Foundation::LUID, pplogonsessiondata: *mut *mut SECURITY_LOGON_SESSION_DATA) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("secur32.dll" "system" fn LsaGetLogonSessionData(logonid : *const super::super::super::Foundation:: LUID, pplogonsessiondata : *mut *mut SECURITY_LOGON_SESSION_DATA) -> super::super::super::Foundation:: NTSTATUS); - unsafe { LsaGetLogonSessionData(logonid, core::mem::transmute(pplogonsessiondata)) } + unsafe { LsaGetLogonSessionData(logonid, pplogonsessiondata as _) } } #[inline] 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); - unsafe { LsaLogonUser(lsahandle, originname, logontype, authenticationpackage, authenticationinformation, authenticationinformationlength, core::mem::transmute(localgroups.unwrap_or(core::mem::zeroed())), sourcecontext, core::mem::transmute(profilebuffer), core::mem::transmute(profilebufferlength), core::mem::transmute(logonid), core::mem::transmute(token), core::mem::transmute(quotas), core::mem::transmute(substatus)) } + unsafe { LsaLogonUser(lsahandle, originname, logontype, authenticationpackage, authenticationinformation, authenticationinformationlength, localgroups.unwrap_or(core::mem::zeroed()) as _, sourcecontext, profilebuffer as _, profilebufferlength as _, logonid as _, token as _, quotas as _, substatus as _) } } #[inline] 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); - unsafe { LsaLookupAuthenticationPackage(lsahandle, packagename, core::mem::transmute(authenticationpackage)) } + unsafe { LsaLookupAuthenticationPackage(lsahandle, packagename, authenticationpackage as _) } } #[inline] 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); - unsafe { LsaLookupNames(policyhandle, count, names, core::mem::transmute(referenceddomains), core::mem::transmute(sids)) } + unsafe { LsaLookupNames(policyhandle, count, names, referenceddomains as _, sids as _) } } #[inline] 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); - unsafe { LsaLookupNames2(policyhandle, flags, count, names, core::mem::transmute(referenceddomains), core::mem::transmute(sids)) } + unsafe { LsaLookupNames2(policyhandle, flags, count, names, referenceddomains as _, sids as _) } } #[inline] 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); - unsafe { LsaLookupSids(policyhandle, count, sids, core::mem::transmute(referenceddomains), core::mem::transmute(names)) } + unsafe { LsaLookupSids(policyhandle, count, sids, referenceddomains as _, names as _) } } #[inline] 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); - unsafe { LsaLookupSids2(policyhandle, lookupoptions, count, sids, core::mem::transmute(referenceddomains), core::mem::transmute(names)) } + unsafe { LsaLookupSids2(policyhandle, lookupoptions, count, sids, referenceddomains as _, names as _) } } #[inline] pub unsafe fn LsaNtStatusToWinError(status: super::super::super::Foundation::NTSTATUS) -> u32 { @@ -501,52 +471,52 @@ pub unsafe fn LsaNtStatusToWinError(status: super::super::super::Foundation::NTS #[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); - unsafe { LsaOpenPolicy(core::mem::transmute(systemname.unwrap_or(core::mem::zeroed())), objectattributes, desiredaccess, core::mem::transmute(policyhandle)) } + unsafe { LsaOpenPolicy(systemname.unwrap_or(core::mem::zeroed()) as _, objectattributes, desiredaccess, policyhandle as _) } } #[inline] 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); - unsafe { LsaOpenTrustedDomainByName(policyhandle, trusteddomainname, desiredaccess, core::mem::transmute(trusteddomainhandle)) } + unsafe { LsaOpenTrustedDomainByName(policyhandle, trusteddomainname, desiredaccess, trusteddomainhandle as _) } } #[inline] pub unsafe fn LsaQueryCAPs(capids: Option<&[super::super::PSID]>, caps: *mut *mut CENTRAL_ACCESS_POLICY, capcount: *mut u32) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" fn LsaQueryCAPs(capids : *const super::super:: PSID, capidcount : u32, caps : *mut *mut CENTRAL_ACCESS_POLICY, capcount : *mut u32) -> super::super::super::Foundation:: NTSTATUS); - unsafe { 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)) } + unsafe { 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()), caps as _, capcount as _) } } #[inline] 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); - unsafe { LsaQueryDomainInformationPolicy(policyhandle, informationclass, core::mem::transmute(buffer)) } + unsafe { LsaQueryDomainInformationPolicy(policyhandle, informationclass, buffer as _) } } #[inline] 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); - unsafe { LsaQueryForestTrustInformation(policyhandle, trusteddomainname, core::mem::transmute(foresttrustinfo)) } + unsafe { LsaQueryForestTrustInformation(policyhandle, trusteddomainname, foresttrustinfo as _) } } #[inline] 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); - unsafe { LsaQueryForestTrustInformation2(policyhandle, trusteddomainname, highestrecordtype, core::mem::transmute(foresttrustinfo)) } + unsafe { LsaQueryForestTrustInformation2(policyhandle, trusteddomainname, highestrecordtype, foresttrustinfo as _) } } #[inline] 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); - unsafe { LsaQueryInformationPolicy(policyhandle, informationclass, core::mem::transmute(buffer)) } + unsafe { LsaQueryInformationPolicy(policyhandle, informationclass, buffer as _) } } #[inline] 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); - unsafe { LsaQueryTrustedDomainInfo(policyhandle, trusteddomainsid, informationclass, core::mem::transmute(buffer)) } + unsafe { LsaQueryTrustedDomainInfo(policyhandle, trusteddomainsid, informationclass, buffer as _) } } #[inline] 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); - unsafe { LsaQueryTrustedDomainInfoByName(policyhandle, trusteddomainname, informationclass, core::mem::transmute(buffer)) } + unsafe { LsaQueryTrustedDomainInfoByName(policyhandle, trusteddomainname, informationclass, buffer as _) } } #[inline] pub unsafe fn LsaRegisterLogonProcess(logonprocessname: *const LSA_STRING, lsahandle: *mut super::super::super::Foundation::HANDLE, securitymode: *mut u32) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("secur32.dll" "system" fn LsaRegisterLogonProcess(logonprocessname : *const LSA_STRING, lsahandle : *mut super::super::super::Foundation:: HANDLE, securitymode : *mut u32) -> super::super::super::Foundation:: NTSTATUS); - unsafe { LsaRegisterLogonProcess(logonprocessname, core::mem::transmute(lsahandle), core::mem::transmute(securitymode)) } + unsafe { LsaRegisterLogonProcess(logonprocessname, lsahandle as _, securitymode as _) } } #[inline] pub unsafe fn LsaRegisterPolicyChangeNotification(informationclass: POLICY_NOTIFICATION_INFORMATION_CLASS, notificationeventhandle: super::super::super::Foundation::HANDLE) -> super::super::super::Foundation::NTSTATUS { @@ -561,7 +531,7 @@ pub unsafe fn LsaRemoveAccountRights(policyhandle: LSA_HANDLE, accountsid: super #[inline] 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); - unsafe { LsaRetrievePrivateData(policyhandle, keyname, core::mem::transmute(privatedata)) } + unsafe { LsaRetrievePrivateData(policyhandle, keyname, privatedata as _) } } #[inline] pub unsafe fn LsaSetCAPs(capdns: Option<&[LSA_UNICODE_STRING]>, flags: u32) -> super::super::super::Foundation::NTSTATUS { @@ -571,17 +541,17 @@ pub unsafe fn LsaSetCAPs(capdns: Option<&[LSA_UNICODE_STRING]>, flags: u32) -> s #[inline] 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); - unsafe { LsaSetDomainInformationPolicy(policyhandle, informationclass, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } + unsafe { LsaSetDomainInformationPolicy(policyhandle, informationclass, buffer.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn LsaSetForestTrustInformation(policyhandle: LSA_HANDLE, trusteddomainname: *const LSA_UNICODE_STRING, foresttrustinfo: *const LSA_FOREST_TRUST_INFORMATION, checkonly: bool, collisioninfo: *mut *mut LSA_FOREST_TRUST_COLLISION_INFORMATION) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" fn LsaSetForestTrustInformation(policyhandle : LSA_HANDLE, trusteddomainname : *const LSA_UNICODE_STRING, foresttrustinfo : *const LSA_FOREST_TRUST_INFORMATION, checkonly : bool, collisioninfo : *mut *mut LSA_FOREST_TRUST_COLLISION_INFORMATION) -> super::super::super::Foundation:: NTSTATUS); - unsafe { LsaSetForestTrustInformation(policyhandle, trusteddomainname, foresttrustinfo, checkonly, core::mem::transmute(collisioninfo)) } + unsafe { LsaSetForestTrustInformation(policyhandle, trusteddomainname, foresttrustinfo, checkonly, collisioninfo as _) } } #[inline] 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: bool, collisioninfo: *mut *mut LSA_FOREST_TRUST_COLLISION_INFORMATION) -> super::super::super::Foundation::NTSTATUS { 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 : bool, collisioninfo : *mut *mut LSA_FOREST_TRUST_COLLISION_INFORMATION) -> super::super::super::Foundation:: NTSTATUS); - unsafe { LsaSetForestTrustInformation2(policyhandle, trusteddomainname, highestrecordtype, foresttrustinfo, checkonly, core::mem::transmute(collisioninfo)) } + unsafe { LsaSetForestTrustInformation2(policyhandle, trusteddomainname, highestrecordtype, foresttrustinfo, checkonly, collisioninfo as _) } } #[inline] pub unsafe fn LsaSetInformationPolicy(policyhandle: LSA_HANDLE, informationclass: POLICY_INFORMATION_CLASS, buffer: *const core::ffi::c_void) -> super::super::super::Foundation::NTSTATUS { @@ -601,7 +571,7 @@ pub unsafe fn LsaSetTrustedDomainInformation(policyhandle: LSA_HANDLE, trusteddo #[inline] 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); - unsafe { LsaStorePrivateData(policyhandle, keyname, core::mem::transmute(privatedata.unwrap_or(core::mem::zeroed()))) } + unsafe { LsaStorePrivateData(policyhandle, keyname, privatedata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn LsaUnregisterPolicyChangeNotification(informationclass: POLICY_NOTIFICATION_INFORMATION_CLASS, notificationeventhandle: super::super::super::Foundation::HANDLE) -> super::super::super::Foundation::NTSTATUS { @@ -618,55 +588,55 @@ pub unsafe fn MakeSignature(phcontext: *const super::super::Credentials::SecHand #[inline] pub unsafe fn QueryContextAttributesA(phcontext: *const super::super::Credentials::SecHandle, ulattribute: SECPKG_ATTR, pbuffer: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("secur32.dll" "system" fn QueryContextAttributesA(phcontext : *const super::super::Credentials:: SecHandle, ulattribute : SECPKG_ATTR, pbuffer : *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { QueryContextAttributesA(phcontext, ulattribute, core::mem::transmute(pbuffer)).ok() } + unsafe { QueryContextAttributesA(phcontext, ulattribute, pbuffer as _).ok() } } #[cfg(feature = "Win32_Security_Credentials")] #[inline] pub unsafe fn QueryContextAttributesExA(phcontext: *const super::super::Credentials::SecHandle, ulattribute: SECPKG_ATTR, pbuffer: *mut core::ffi::c_void, cbbuffer: u32) -> windows_core::Result<()> { windows_targets::link!("sspicli.dll" "system" fn QueryContextAttributesExA(phcontext : *const super::super::Credentials:: SecHandle, ulattribute : SECPKG_ATTR, pbuffer : *mut core::ffi::c_void, cbbuffer : u32) -> windows_core::HRESULT); - unsafe { QueryContextAttributesExA(phcontext, ulattribute, core::mem::transmute(pbuffer), cbbuffer).ok() } + unsafe { QueryContextAttributesExA(phcontext, ulattribute, pbuffer as _, cbbuffer).ok() } } #[cfg(feature = "Win32_Security_Credentials")] #[inline] pub unsafe fn QueryContextAttributesExW(phcontext: *const super::super::Credentials::SecHandle, ulattribute: SECPKG_ATTR, pbuffer: *mut core::ffi::c_void, cbbuffer: u32) -> windows_core::Result<()> { windows_targets::link!("sspicli.dll" "system" fn QueryContextAttributesExW(phcontext : *const super::super::Credentials:: SecHandle, ulattribute : SECPKG_ATTR, pbuffer : *mut core::ffi::c_void, cbbuffer : u32) -> windows_core::HRESULT); - unsafe { QueryContextAttributesExW(phcontext, ulattribute, core::mem::transmute(pbuffer), cbbuffer).ok() } + unsafe { QueryContextAttributesExW(phcontext, ulattribute, pbuffer as _, cbbuffer).ok() } } #[cfg(feature = "Win32_Security_Credentials")] #[inline] pub unsafe fn QueryContextAttributesW(phcontext: *const super::super::Credentials::SecHandle, ulattribute: SECPKG_ATTR, pbuffer: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("secur32.dll" "system" fn QueryContextAttributesW(phcontext : *const super::super::Credentials:: SecHandle, ulattribute : SECPKG_ATTR, pbuffer : *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { QueryContextAttributesW(phcontext, ulattribute, core::mem::transmute(pbuffer)).ok() } + unsafe { QueryContextAttributesW(phcontext, ulattribute, pbuffer as _).ok() } } #[cfg(feature = "Win32_Security_Credentials")] #[inline] pub unsafe fn QueryCredentialsAttributesA(phcredential: *const super::super::Credentials::SecHandle, ulattribute: u32, pbuffer: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("secur32.dll" "system" fn QueryCredentialsAttributesA(phcredential : *const super::super::Credentials:: SecHandle, ulattribute : u32, pbuffer : *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { QueryCredentialsAttributesA(phcredential, ulattribute, core::mem::transmute(pbuffer)).ok() } + unsafe { QueryCredentialsAttributesA(phcredential, ulattribute, pbuffer as _).ok() } } #[cfg(feature = "Win32_Security_Credentials")] #[inline] pub unsafe fn QueryCredentialsAttributesExA(phcredential: *const super::super::Credentials::SecHandle, ulattribute: u32, pbuffer: *mut core::ffi::c_void, cbbuffer: u32) -> windows_core::Result<()> { windows_targets::link!("sspicli.dll" "system" fn QueryCredentialsAttributesExA(phcredential : *const super::super::Credentials:: SecHandle, ulattribute : u32, pbuffer : *mut core::ffi::c_void, cbbuffer : u32) -> windows_core::HRESULT); - unsafe { QueryCredentialsAttributesExA(phcredential, ulattribute, core::mem::transmute(pbuffer), cbbuffer).ok() } + unsafe { QueryCredentialsAttributesExA(phcredential, ulattribute, pbuffer as _, cbbuffer).ok() } } #[cfg(feature = "Win32_Security_Credentials")] #[inline] pub unsafe fn QueryCredentialsAttributesExW(phcredential: *const super::super::Credentials::SecHandle, ulattribute: u32, pbuffer: *mut core::ffi::c_void, cbbuffer: u32) -> windows_core::Result<()> { windows_targets::link!("sspicli.dll" "system" fn QueryCredentialsAttributesExW(phcredential : *const super::super::Credentials:: SecHandle, ulattribute : u32, pbuffer : *mut core::ffi::c_void, cbbuffer : u32) -> windows_core::HRESULT); - unsafe { QueryCredentialsAttributesExW(phcredential, ulattribute, core::mem::transmute(pbuffer), cbbuffer).ok() } + unsafe { QueryCredentialsAttributesExW(phcredential, ulattribute, pbuffer as _, cbbuffer).ok() } } #[cfg(feature = "Win32_Security_Credentials")] #[inline] pub unsafe fn QueryCredentialsAttributesW(phcredential: *const super::super::Credentials::SecHandle, ulattribute: u32, pbuffer: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("secur32.dll" "system" fn QueryCredentialsAttributesW(phcredential : *const super::super::Credentials:: SecHandle, ulattribute : u32, pbuffer : *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { QueryCredentialsAttributesW(phcredential, ulattribute, core::mem::transmute(pbuffer)).ok() } + unsafe { QueryCredentialsAttributesW(phcredential, ulattribute, pbuffer as _).ok() } } #[cfg(feature = "Win32_Security_Credentials")] #[inline] pub unsafe fn QuerySecurityContextToken(phcontext: *const super::super::Credentials::SecHandle, token: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("secur32.dll" "system" fn QuerySecurityContextToken(phcontext : *const super::super::Credentials:: SecHandle, token : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { QuerySecurityContextToken(phcontext, core::mem::transmute(token)).ok() } + unsafe { QuerySecurityContextToken(phcontext, token as _).ok() } } #[inline] pub unsafe fn QuerySecurityPackageInfoA(pszpackagename: P0) -> windows_core::Result<*mut SecPkgInfoA> @@ -699,17 +669,17 @@ pub unsafe fn RevertSecurityContext(phcontext: *const super::super::Credentials: #[inline] pub unsafe fn RtlDecryptMemory(memory: *mut core::ffi::c_void, memorysize: u32, optionflags: u32) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" "SystemFunction041" fn RtlDecryptMemory(memory : *mut core::ffi::c_void, memorysize : u32, optionflags : u32) -> super::super::super::Foundation:: NTSTATUS); - unsafe { RtlDecryptMemory(core::mem::transmute(memory), memorysize, optionflags) } + unsafe { RtlDecryptMemory(memory as _, memorysize, optionflags) } } #[inline] pub unsafe fn RtlEncryptMemory(memory: *mut core::ffi::c_void, memorysize: u32, optionflags: u32) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" "SystemFunction040" fn RtlEncryptMemory(memory : *mut core::ffi::c_void, memorysize : u32, optionflags : u32) -> super::super::super::Foundation:: NTSTATUS); - unsafe { RtlEncryptMemory(core::mem::transmute(memory), memorysize, optionflags) } + unsafe { RtlEncryptMemory(memory as _, memorysize, optionflags) } } #[inline] pub unsafe fn RtlGenRandom(randombuffer: *mut core::ffi::c_void, randombufferlength: u32) -> bool { windows_targets::link!("advapi32.dll" "system" "SystemFunction036" fn RtlGenRandom(randombuffer : *mut core::ffi::c_void, randombufferlength : u32) -> bool); - unsafe { RtlGenRandom(core::mem::transmute(randombuffer), randombufferlength) } + unsafe { RtlGenRandom(randombuffer as _, randombufferlength) } } #[inline] pub unsafe fn SLAcquireGenuineTicket(ppticketblob: *mut *mut core::ffi::c_void, pcbticketblob: *mut u32, pwsztemplateid: P2, pwszserverurl: P3, pwszclienttoken: P4) -> windows_core::Result<()> @@ -719,7 +689,7 @@ where P4: windows_core::Param, { windows_targets::link!("slcext.dll" "system" fn SLAcquireGenuineTicket(ppticketblob : *mut *mut core::ffi::c_void, pcbticketblob : *mut u32, pwsztemplateid : windows_core::PCWSTR, pwszserverurl : windows_core::PCWSTR, pwszclienttoken : windows_core::PCWSTR) -> windows_core::HRESULT); - unsafe { SLAcquireGenuineTicket(core::mem::transmute(ppticketblob), core::mem::transmute(pcbticketblob), pwsztemplateid.param().abi(), pwszserverurl.param().abi(), pwszclienttoken.param().abi()).ok() } + unsafe { SLAcquireGenuineTicket(ppticketblob as _, pcbticketblob as _, 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: Option, pvappspecificdata: Option<*const core::ffi::c_void>, pactivationinfo: Option<*const SL_ACTIVATION_INFO_HEADER>, pwszproxyserver: P5, wproxyport: Option) -> windows_core::Result<()> @@ -727,7 +697,7 @@ 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); - unsafe { SLActivateProduct(hslc, 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() } + unsafe { SLActivateProduct(hslc, pproductskuid, cbappspecificdata.unwrap_or(core::mem::zeroed()) as _, pvappspecificdata.unwrap_or(core::mem::zeroed()) as _, pactivationinfo.unwrap_or(core::mem::zeroed()) as _, pwszproxyserver.param().abi(), wproxyport.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SLClose(hslc: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -740,7 +710,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); - unsafe { SLConsumeRight(hslc, pappid, core::mem::transmute(pproductskuid.unwrap_or(core::mem::zeroed())), pwszrightname.param().abi(), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SLConsumeRight(hslc, pappid, pproductskuid.unwrap_or(core::mem::zeroed()) as _, pwszrightname.param().abi(), pvreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SLDepositOfflineConfirmationId(hslc: *const core::ffi::c_void, pproductskuid: *const windows_core::GUID, pwszinstallationid: P2, pwszconfirmationid: P3) -> windows_core::Result<()> @@ -758,7 +728,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); - unsafe { SLDepositOfflineConfirmationIdEx(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() } + unsafe { SLDepositOfflineConfirmationIdEx(hslc, pproductskuid.unwrap_or(core::mem::zeroed()) as _, pactivationinfo.unwrap_or(core::mem::zeroed()) as _, 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<()> @@ -781,7 +751,7 @@ pub unsafe fn SLGenerateOfflineInstallationIdEx(hslc: *const core::ffi::c_void, 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); unsafe { let mut result__ = core::mem::zeroed(); - SLGenerateOfflineInstallationIdEx(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__)) + SLGenerateOfflineInstallationIdEx(hslc, pproductskuid.unwrap_or(core::mem::zeroed()) as _, pactivationinfo.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -790,7 +760,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); - unsafe { SLGetApplicationInformation(hslc, papplicationid, pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbvalue), core::mem::transmute(ppbvalue)).ok() } + unsafe { SLGetApplicationInformation(hslc, papplicationid, pwszvaluename.param().abi(), pedatatype.unwrap_or(core::mem::zeroed()) as _, pcbvalue as _, ppbvalue as _).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<()> @@ -798,17 +768,17 @@ 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); - unsafe { SLGetGenuineInformation(pqueryid, pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbvalue), core::mem::transmute(ppbvalue)).ok() } + unsafe { SLGetGenuineInformation(pqueryid, pwszvaluename.param().abi(), pedatatype.unwrap_or(core::mem::zeroed()) as _, pcbvalue as _, ppbvalue as _).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<()> { windows_targets::link!("slc.dll" "system" fn SLGetInstalledProductKeyIds(hslc : *const core::ffi::c_void, pproductskuid : *const windows_core::GUID, pnproductkeyids : *mut u32, ppproductkeyids : *mut *mut windows_core::GUID) -> windows_core::HRESULT); - unsafe { SLGetInstalledProductKeyIds(hslc, pproductskuid, core::mem::transmute(pnproductkeyids), core::mem::transmute(ppproductkeyids)).ok() } + unsafe { SLGetInstalledProductKeyIds(hslc, pproductskuid, pnproductkeyids as _, ppproductkeyids as _).ok() } } #[inline] pub unsafe fn SLGetLicense(hslc: *const core::ffi::c_void, plicensefileid: *const windows_core::GUID, pcblicensefile: *mut u32, ppblicensefile: *mut *mut u8) -> windows_core::Result<()> { windows_targets::link!("slc.dll" "system" fn SLGetLicense(hslc : *const core::ffi::c_void, plicensefileid : *const windows_core::GUID, pcblicensefile : *mut u32, ppblicensefile : *mut *mut u8) -> windows_core::HRESULT); - unsafe { SLGetLicense(hslc, plicensefileid, core::mem::transmute(pcblicensefile), core::mem::transmute(ppblicensefile)).ok() } + unsafe { SLGetLicense(hslc, plicensefileid, pcblicensefile as _, ppblicensefile as _).ok() } } #[inline] pub unsafe fn SLGetLicenseFileId(hslc: *const core::ffi::c_void, pblicenseblob: &[u8]) -> windows_core::Result { @@ -824,7 +794,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); - unsafe { SLGetLicenseInformation(hslc, psllicenseid, pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbvalue), core::mem::transmute(ppbvalue)).ok() } + unsafe { SLGetLicenseInformation(hslc, psllicenseid, pwszvaluename.param().abi(), pedatatype.unwrap_or(core::mem::zeroed()) as _, pcbvalue as _, ppbvalue as _).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<()> @@ -832,7 +802,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); - unsafe { SLGetLicensingStatusInformation(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() } + unsafe { SLGetLicensingStatusInformation(hslc, pappid.unwrap_or(core::mem::zeroed()) as _, pproductskuid.unwrap_or(core::mem::zeroed()) as _, pwszrightname.param().abi(), pnstatuscount as _, pplicensingstatus as _).ok() } } #[inline] pub unsafe fn SLGetPKeyId(hslc: *const core::ffi::c_void, pwszpkeyalgorithm: P1, pwszpkeystring: P2, pbpkeyspecificdata: Option<&[u8]>) -> windows_core::Result @@ -852,7 +822,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); - unsafe { SLGetPKeyInformation(hslc, ppkeyid, pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbvalue), core::mem::transmute(ppbvalue)).ok() } + unsafe { SLGetPKeyInformation(hslc, ppkeyid, pwszvaluename.param().abi(), pedatatype.unwrap_or(core::mem::zeroed()) as _, pcbvalue as _, ppbvalue as _).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<()> @@ -860,7 +830,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); - unsafe { SLGetPolicyInformation(hslc, pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbvalue), core::mem::transmute(ppbvalue)).ok() } + unsafe { SLGetPolicyInformation(hslc, pwszvaluename.param().abi(), pedatatype.unwrap_or(core::mem::zeroed()) as _, pcbvalue as _, ppbvalue as _).ok() } } #[inline] pub unsafe fn SLGetPolicyInformationDWORD(hslc: *const core::ffi::c_void, pwszvaluename: P1) -> windows_core::Result @@ -879,7 +849,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); - unsafe { SLGetProductSkuInformation(hslc, pproductskuid, pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbvalue), core::mem::transmute(ppbvalue)).ok() } + unsafe { SLGetProductSkuInformation(hslc, pproductskuid, pwszvaluename.param().abi(), pedatatype.unwrap_or(core::mem::zeroed()) as _, pcbvalue as _, ppbvalue as _).ok() } } #[inline] pub unsafe fn SLGetReferralInformation(hslc: *const core::ffi::c_void, ereferraltype: SLREFERRALTYPE, pskuorappid: *const windows_core::GUID, pwszvaluename: P3) -> windows_core::Result @@ -895,7 +865,7 @@ where #[inline] pub unsafe fn SLGetSLIDList(hslc: *const core::ffi::c_void, equeryidtype: SLIDTYPE, pqueryid: Option<*const windows_core::GUID>, ereturnidtype: SLIDTYPE, pnreturnids: *mut u32, ppreturnids: *mut *mut windows_core::GUID) -> windows_core::Result<()> { windows_targets::link!("slc.dll" "system" fn SLGetSLIDList(hslc : *const core::ffi::c_void, equeryidtype : SLIDTYPE, pqueryid : *const windows_core::GUID, ereturnidtype : SLIDTYPE, pnreturnids : *mut u32, ppreturnids : *mut *mut windows_core::GUID) -> windows_core::HRESULT); - unsafe { SLGetSLIDList(hslc, equeryidtype, core::mem::transmute(pqueryid.unwrap_or(core::mem::zeroed())), ereturnidtype, core::mem::transmute(pnreturnids), core::mem::transmute(ppreturnids)).ok() } + unsafe { SLGetSLIDList(hslc, equeryidtype, pqueryid.unwrap_or(core::mem::zeroed()) as _, ereturnidtype, pnreturnids as _, ppreturnids as _).ok() } } #[inline] pub unsafe fn SLGetServerStatus(pwszserverurl: P0, pwszacquisitiontype: P1, pwszproxyserver: P2, wproxyport: Option) -> windows_core::Result @@ -907,7 +877,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); unsafe { let mut result__ = core::mem::zeroed(); - 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__)) + SLGetServerStatus(pwszserverurl.param().abi(), pwszacquisitiontype.param().abi(), pwszproxyserver.param().abi(), wproxyport.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -916,7 +886,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); - unsafe { SLGetServiceInformation(hslc, pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbvalue), core::mem::transmute(ppbvalue)).ok() } + unsafe { SLGetServiceInformation(hslc, pwszvaluename.param().abi(), pedatatype.unwrap_or(core::mem::zeroed()) as _, pcbvalue as _, ppbvalue as _).ok() } } #[inline] pub unsafe fn SLGetWindowsInformation(pwszvaluename: P0, pedatatype: Option<*mut SLDATATYPE>, pcbvalue: *mut u32, ppbvalue: *mut *mut u8) -> windows_core::Result<()> @@ -924,7 +894,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); - unsafe { SLGetWindowsInformation(pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbvalue), core::mem::transmute(ppbvalue)).ok() } + unsafe { SLGetWindowsInformation(pwszvaluename.param().abi(), pedatatype.unwrap_or(core::mem::zeroed()) as _, pcbvalue as _, ppbvalue as _).ok() } } #[inline] pub unsafe fn SLGetWindowsInformationDWORD(pwszvaluename: P0) -> windows_core::Result @@ -960,12 +930,12 @@ 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); - unsafe { SLIsGenuineLocal(pappid, core::mem::transmute(pgenuinestate), core::mem::transmute(puioptions.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SLIsGenuineLocal(pappid, pgenuinestate as _, puioptions.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SLOpen(phslc: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("slc.dll" "system" fn SLOpen(phslc : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { SLOpen(core::mem::transmute(phslc)).ok() } + unsafe { SLOpen(phslc as _).ok() } } #[inline] pub unsafe fn SLQueryLicenseValueFromApp(valuename: P0, valuetype: Option<*mut u32>, databuffer: Option<*mut core::ffi::c_void>, datasize: u32, resultdatasize: *mut u32) -> windows_core::Result<()> @@ -973,7 +943,7 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-core-slapi-l1-1-0.dll" "system" fn SLQueryLicenseValueFromApp(valuename : windows_core::PCWSTR, valuetype : *mut u32, databuffer : *mut core::ffi::c_void, datasize : u32, resultdatasize : *mut u32) -> windows_core::HRESULT); - unsafe { SLQueryLicenseValueFromApp(valuename.param().abi(), core::mem::transmute(valuetype.unwrap_or(core::mem::zeroed())), core::mem::transmute(databuffer.unwrap_or(core::mem::zeroed())), datasize, core::mem::transmute(resultdatasize)).ok() } + unsafe { SLQueryLicenseValueFromApp(valuename.param().abi(), valuetype.unwrap_or(core::mem::zeroed()) as _, databuffer.unwrap_or(core::mem::zeroed()) as _, datasize, resultdatasize as _).ok() } } #[inline] 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<()> @@ -981,7 +951,7 @@ where P1: windows_core::Param, { windows_targets::link!("slc.dll" "system" fn SLRegisterEvent(hslc : *const core::ffi::c_void, pwszeventid : windows_core::PCWSTR, papplicationid : *const windows_core::GUID, hevent : super::super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - unsafe { SLRegisterEvent(core::mem::transmute(hslc.unwrap_or(core::mem::zeroed())), pwszeventid.param().abi(), papplicationid, hevent).ok() } + unsafe { SLRegisterEvent(hslc.unwrap_or(core::mem::zeroed()) as _, pwszeventid.param().abi(), papplicationid, 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<()> { @@ -1012,29 +982,29 @@ where P1: windows_core::Param, { windows_targets::link!("slc.dll" "system" fn SLUnregisterEvent(hslc : *const core::ffi::c_void, pwszeventid : windows_core::PCWSTR, papplicationid : *const windows_core::GUID, hevent : super::super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - unsafe { SLUnregisterEvent(core::mem::transmute(hslc.unwrap_or(core::mem::zeroed())), pwszeventid.param().abi(), papplicationid, hevent).ok() } + unsafe { SLUnregisterEvent(hslc.unwrap_or(core::mem::zeroed()) as _, pwszeventid.param().abi(), papplicationid, 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); - unsafe { SaslAcceptSecurityContext(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())), fcontextreq, targetdatarep, 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::mem::zeroed()))) } + unsafe { SaslAcceptSecurityContext(phcredential.unwrap_or(core::mem::zeroed()) as _, phcontext.unwrap_or(core::mem::zeroed()) as _, pinput.unwrap_or(core::mem::zeroed()) as _, fcontextreq, targetdatarep, phnewcontext.unwrap_or(core::mem::zeroed()) as _, poutput.unwrap_or(core::mem::zeroed()) as _, pfcontextattr as _, ptsexpiry.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SaslEnumerateProfilesA(profilelist: *mut windows_core::PSTR, profilecount: *mut u32) -> windows_core::Result<()> { windows_targets::link!("secur32.dll" "system" fn SaslEnumerateProfilesA(profilelist : *mut windows_core::PSTR, profilecount : *mut u32) -> windows_core::HRESULT); - unsafe { SaslEnumerateProfilesA(core::mem::transmute(profilelist), core::mem::transmute(profilecount)).ok() } + unsafe { SaslEnumerateProfilesA(profilelist as _, profilecount as _).ok() } } #[inline] pub unsafe fn SaslEnumerateProfilesW(profilelist: *mut windows_core::PWSTR, profilecount: *mut u32) -> windows_core::Result<()> { windows_targets::link!("secur32.dll" "system" fn SaslEnumerateProfilesW(profilelist : *mut windows_core::PWSTR, profilecount : *mut u32) -> windows_core::HRESULT); - unsafe { SaslEnumerateProfilesW(core::mem::transmute(profilelist), core::mem::transmute(profilecount)).ok() } + unsafe { SaslEnumerateProfilesW(profilelist as _, profilecount as _).ok() } } #[cfg(feature = "Win32_Security_Credentials")] #[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); - unsafe { SaslGetContextOption(contexthandle, option, core::mem::transmute(value), size, core::mem::transmute(needed.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SaslGetContextOption(contexthandle, option, value as _, size, needed.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SaslGetProfilePackageA(profilename: P0) -> windows_core::Result<*mut SecPkgInfoA> @@ -1081,22 +1051,7 @@ where P2: windows_core::Param, { windows_targets::link!("secur32.dll" "system" fn SaslInitializeSecurityContextA(phcredential : *const super::super::Credentials:: SecHandle, phcontext : *const super::super::Credentials:: SecHandle, psztargetname : windows_core::PCSTR, fcontextreq : ISC_REQ_FLAGS, reserved1 : u32, targetdatarep : u32, pinput : *const SecBufferDesc, reserved2 : u32, phnewcontext : *mut super::super::Credentials:: SecHandle, poutput : *mut SecBufferDesc, pfcontextattr : *mut u32, ptsexpiry : *mut i64) -> windows_core::HRESULT); - unsafe { - SaslInitializeSecurityContextA( - core::mem::transmute(phcredential.unwrap_or(core::mem::zeroed())), - core::mem::transmute(phcontext.unwrap_or(core::mem::zeroed())), - psztargetname.param().abi(), - fcontextreq, - reserved1, - targetdatarep, - core::mem::transmute(pinput.unwrap_or(core::mem::zeroed())), - reserved2, - 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::mem::zeroed())), - ) - } + unsafe { SaslInitializeSecurityContextA(phcredential.unwrap_or(core::mem::zeroed()) as _, phcontext.unwrap_or(core::mem::zeroed()) as _, psztargetname.param().abi(), fcontextreq, reserved1, targetdatarep, pinput.unwrap_or(core::mem::zeroed()) as _, reserved2, phnewcontext.unwrap_or(core::mem::zeroed()) as _, poutput.unwrap_or(core::mem::zeroed()) as _, pfcontextattr as _, ptsexpiry.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security_Credentials")] #[inline] @@ -1105,22 +1060,7 @@ where P2: windows_core::Param, { windows_targets::link!("secur32.dll" "system" fn SaslInitializeSecurityContextW(phcredential : *const super::super::Credentials:: SecHandle, phcontext : *const super::super::Credentials:: SecHandle, psztargetname : windows_core::PCWSTR, fcontextreq : ISC_REQ_FLAGS, reserved1 : u32, targetdatarep : u32, pinput : *const SecBufferDesc, reserved2 : u32, phnewcontext : *mut super::super::Credentials:: SecHandle, poutput : *mut SecBufferDesc, pfcontextattr : *mut u32, ptsexpiry : *mut i64) -> windows_core::HRESULT); - unsafe { - SaslInitializeSecurityContextW( - core::mem::transmute(phcredential.unwrap_or(core::mem::zeroed())), - core::mem::transmute(phcontext.unwrap_or(core::mem::zeroed())), - psztargetname.param().abi(), - fcontextreq, - reserved1, - targetdatarep, - core::mem::transmute(pinput.unwrap_or(core::mem::zeroed())), - reserved2, - 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::mem::zeroed())), - ) - } + unsafe { SaslInitializeSecurityContextW(phcredential.unwrap_or(core::mem::zeroed()) as _, phcontext.unwrap_or(core::mem::zeroed()) as _, psztargetname.param().abi(), fcontextreq, reserved1, targetdatarep, pinput.unwrap_or(core::mem::zeroed()) as _, reserved2, phnewcontext.unwrap_or(core::mem::zeroed()) as _, poutput.unwrap_or(core::mem::zeroed()) as _, pfcontextattr as _, ptsexpiry.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security_Credentials")] #[inline] @@ -1161,7 +1101,7 @@ pub unsafe fn SetCredentialsAttributesW(phcredential: *const super::super::Crede #[inline] pub unsafe fn SslCrackCertificate(pbcertificate: *mut u8, cbcertificate: u32, dwflags: u32, ppcertificate: *mut *mut X509Certificate) -> super::super::super::Foundation::BOOL { windows_targets::link!("schannel.dll" "system" fn SslCrackCertificate(pbcertificate : *mut u8, cbcertificate : u32, dwflags : u32, ppcertificate : *mut *mut X509Certificate) -> super::super::super::Foundation:: BOOL); - unsafe { SslCrackCertificate(core::mem::transmute(pbcertificate), cbcertificate, dwflags, core::mem::transmute(ppcertificate)) } + unsafe { SslCrackCertificate(pbcertificate as _, cbcertificate, dwflags, ppcertificate as _) } } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] @@ -1192,17 +1132,17 @@ where #[inline] pub unsafe fn SslFreeCertificate(pcertificate: *mut X509Certificate) { windows_targets::link!("schannel.dll" "system" fn SslFreeCertificate(pcertificate : *mut X509Certificate)); - unsafe { SslFreeCertificate(core::mem::transmute(pcertificate)) } + unsafe { SslFreeCertificate(pcertificate as _) } } #[inline] pub unsafe fn SslGenerateRandomBits(prandomdata: *mut u8, crandomdata: i32) { windows_targets::link!("schannel.dll" "system" fn SslGenerateRandomBits(prandomdata : *mut u8, crandomdata : i32)); - unsafe { SslGenerateRandomBits(core::mem::transmute(prandomdata), crandomdata) } + unsafe { SslGenerateRandomBits(prandomdata as _, crandomdata) } } #[inline] pub unsafe fn SslGetExtensions(clienthello: &[u8], genericextensions: &mut [SCH_EXTENSION_DATA], bytestoread: *mut u32, flags: SchGetExtensionsOptions) -> windows_core::Result<()> { windows_targets::link!("schannel.dll" "system" fn SslGetExtensions(clienthello : *const u8, clienthellobytesize : u32, genericextensions : *mut SCH_EXTENSION_DATA, genericextensionscount : u8, bytestoread : *mut u32, flags : SchGetExtensionsOptions) -> windows_core::HRESULT); - unsafe { SslGetExtensions(core::mem::transmute(clienthello.as_ptr()), clienthello.len().try_into().unwrap(), core::mem::transmute(genericextensions.as_ptr()), genericextensions.len().try_into().unwrap(), core::mem::transmute(bytestoread), flags).ok() } + unsafe { SslGetExtensions(core::mem::transmute(clienthello.as_ptr()), clienthello.len().try_into().unwrap(), core::mem::transmute(genericextensions.as_ptr()), genericextensions.len().try_into().unwrap(), bytestoread as _, flags).ok() } } #[inline] pub unsafe fn SslGetMaximumKeySize(reserved: u32) -> u32 { @@ -1212,32 +1152,32 @@ pub unsafe fn SslGetMaximumKeySize(reserved: u32) -> u32 { #[inline] pub unsafe fn SslGetServerIdentity(clienthello: &[u8], serveridentity: *mut *mut u8, serveridentitysize: *mut u32, flags: u32) -> windows_core::Result<()> { windows_targets::link!("schannel.dll" "system" fn SslGetServerIdentity(clienthello : *const u8, clienthellosize : u32, serveridentity : *mut *mut u8, serveridentitysize : *mut u32, flags : u32) -> windows_core::HRESULT); - unsafe { SslGetServerIdentity(core::mem::transmute(clienthello.as_ptr()), clienthello.len().try_into().unwrap(), core::mem::transmute(serveridentity), core::mem::transmute(serveridentitysize), flags).ok() } + unsafe { SslGetServerIdentity(core::mem::transmute(clienthello.as_ptr()), clienthello.len().try_into().unwrap(), serveridentity as _, serveridentitysize as _, flags).ok() } } #[inline] pub unsafe fn SspiCompareAuthIdentities(authidentity1: Option<*const core::ffi::c_void>, authidentity2: Option<*const core::ffi::c_void>, samesupplieduser: Option<*mut bool>, samesuppliedidentity: Option<*mut bool>) -> 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 bool, samesuppliedidentity : *mut bool) -> windows_core::HRESULT); - unsafe { 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() } + unsafe { SspiCompareAuthIdentities(authidentity1.unwrap_or(core::mem::zeroed()) as _, authidentity2.unwrap_or(core::mem::zeroed()) as _, samesupplieduser.unwrap_or(core::mem::zeroed()) as _, samesuppliedidentity.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SspiCopyAuthIdentity(authdata: *const core::ffi::c_void, authdatacopy: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("secur32.dll" "system" fn SspiCopyAuthIdentity(authdata : *const core::ffi::c_void, authdatacopy : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { SspiCopyAuthIdentity(authdata, core::mem::transmute(authdatacopy)).ok() } + unsafe { SspiCopyAuthIdentity(authdata, authdatacopy as _).ok() } } #[inline] pub unsafe fn SspiDecryptAuthIdentity(encryptedauthdata: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("secur32.dll" "system" fn SspiDecryptAuthIdentity(encryptedauthdata : *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { SspiDecryptAuthIdentity(core::mem::transmute(encryptedauthdata)).ok() } + unsafe { SspiDecryptAuthIdentity(encryptedauthdata as _).ok() } } #[inline] pub unsafe fn SspiDecryptAuthIdentityEx(options: u32, encryptedauthdata: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("sspicli.dll" "system" fn SspiDecryptAuthIdentityEx(options : u32, encryptedauthdata : *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { SspiDecryptAuthIdentityEx(options, core::mem::transmute(encryptedauthdata)).ok() } + unsafe { SspiDecryptAuthIdentityEx(options, encryptedauthdata as _).ok() } } #[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); - unsafe { SspiEncodeAuthIdentityAsStrings(pauthidentity, core::mem::transmute(ppszusername), core::mem::transmute(ppszdomainname), core::mem::transmute(ppszpackedcredentialsstring.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SspiEncodeAuthIdentityAsStrings(pauthidentity, ppszusername as _, ppszdomainname as _, ppszpackedcredentialsstring.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SspiEncodeStringsAsAuthIdentity(pszusername: P0, pszdomainname: P1, pszpackedcredentialsstring: P2, ppauthidentity: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -1247,17 +1187,17 @@ where P2: windows_core::Param, { windows_targets::link!("secur32.dll" "system" fn SspiEncodeStringsAsAuthIdentity(pszusername : windows_core::PCWSTR, pszdomainname : windows_core::PCWSTR, pszpackedcredentialsstring : windows_core::PCWSTR, ppauthidentity : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { SspiEncodeStringsAsAuthIdentity(pszusername.param().abi(), pszdomainname.param().abi(), pszpackedcredentialsstring.param().abi(), core::mem::transmute(ppauthidentity)).ok() } + unsafe { SspiEncodeStringsAsAuthIdentity(pszusername.param().abi(), pszdomainname.param().abi(), pszpackedcredentialsstring.param().abi(), ppauthidentity as _).ok() } } #[inline] pub unsafe fn SspiEncryptAuthIdentity(authdata: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("secur32.dll" "system" fn SspiEncryptAuthIdentity(authdata : *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { SspiEncryptAuthIdentity(core::mem::transmute(authdata)).ok() } + unsafe { SspiEncryptAuthIdentity(authdata as _).ok() } } #[inline] pub unsafe fn SspiEncryptAuthIdentityEx(options: u32, authdata: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("sspicli.dll" "system" fn SspiEncryptAuthIdentityEx(options : u32, authdata : *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { SspiEncryptAuthIdentityEx(options, core::mem::transmute(authdata)).ok() } + unsafe { SspiEncryptAuthIdentityEx(options, authdata as _).ok() } } #[inline] pub unsafe fn SspiExcludePackage(authidentity: Option<*const core::ffi::c_void>, pszpackagename: P1, ppnewauthidentity: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -1265,12 +1205,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); - unsafe { SspiExcludePackage(core::mem::transmute(authidentity.unwrap_or(core::mem::zeroed())), pszpackagename.param().abi(), core::mem::transmute(ppnewauthidentity)).ok() } + unsafe { SspiExcludePackage(authidentity.unwrap_or(core::mem::zeroed()) as _, pszpackagename.param().abi(), ppnewauthidentity as _).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)); - unsafe { SspiFreeAuthIdentity(core::mem::transmute(authdata.unwrap_or(core::mem::zeroed()))) } + unsafe { SspiFreeAuthIdentity(authdata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SspiGetTargetHostName(psztargetname: P0) -> windows_core::Result @@ -1296,12 +1236,12 @@ pub unsafe fn SspiIsPromptingNeeded(errororntstatus: u32) -> bool { #[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)); - unsafe { SspiLocalFree(core::mem::transmute(databuffer.unwrap_or(core::mem::zeroed()))) } + unsafe { SspiLocalFree(databuffer.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SspiMarshalAuthIdentity(authidentity: *const core::ffi::c_void, authidentitylength: *mut u32, authidentitybytearray: *mut *mut i8) -> windows_core::Result<()> { windows_targets::link!("secur32.dll" "system" fn SspiMarshalAuthIdentity(authidentity : *const core::ffi::c_void, authidentitylength : *mut u32, authidentitybytearray : *mut *mut i8) -> windows_core::HRESULT); - unsafe { SspiMarshalAuthIdentity(authidentity, core::mem::transmute(authidentitylength), core::mem::transmute(authidentitybytearray)).ok() } + unsafe { SspiMarshalAuthIdentity(authidentity, authidentitylength as _, authidentitybytearray as _).ok() } } #[inline] pub unsafe fn SspiPrepareForCredRead(authidentity: *const core::ffi::c_void, psztargetname: P1, pcredmancredentialtype: *mut u32, ppszcredmantargetname: *mut windows_core::PCWSTR) -> windows_core::Result<()> @@ -1309,7 +1249,7 @@ where P1: windows_core::Param, { windows_targets::link!("secur32.dll" "system" fn SspiPrepareForCredRead(authidentity : *const core::ffi::c_void, psztargetname : windows_core::PCWSTR, pcredmancredentialtype : *mut u32, ppszcredmantargetname : *mut windows_core::PCWSTR) -> windows_core::HRESULT); - unsafe { SspiPrepareForCredRead(authidentity, psztargetname.param().abi(), core::mem::transmute(pcredmancredentialtype), core::mem::transmute(ppszcredmantargetname)).ok() } + unsafe { SspiPrepareForCredRead(authidentity, psztargetname.param().abi(), pcredmancredentialtype as _, ppszcredmantargetname as _).ok() } } #[inline] pub unsafe fn SspiPrepareForCredWrite(authidentity: *const core::ffi::c_void, psztargetname: P1, pcredmancredentialtype: *mut u32, ppszcredmantargetname: *mut windows_core::PCWSTR, ppszcredmanusername: *mut windows_core::PCWSTR, ppcredentialblob: *mut *mut u8, pcredentialblobsize: *mut u32) -> windows_core::Result<()> @@ -1317,7 +1257,7 @@ where P1: windows_core::Param, { windows_targets::link!("secur32.dll" "system" fn SspiPrepareForCredWrite(authidentity : *const core::ffi::c_void, psztargetname : windows_core::PCWSTR, pcredmancredentialtype : *mut u32, ppszcredmantargetname : *mut windows_core::PCWSTR, ppszcredmanusername : *mut windows_core::PCWSTR, ppcredentialblob : *mut *mut u8, pcredentialblobsize : *mut u32) -> windows_core::HRESULT); - unsafe { SspiPrepareForCredWrite(authidentity, psztargetname.param().abi(), core::mem::transmute(pcredmancredentialtype), core::mem::transmute(ppszcredmantargetname), core::mem::transmute(ppszcredmanusername), core::mem::transmute(ppcredentialblob), core::mem::transmute(pcredentialblobsize)).ok() } + unsafe { SspiPrepareForCredWrite(authidentity, psztargetname.param().abi(), pcredmancredentialtype as _, ppszcredmantargetname as _, ppszcredmanusername as _, ppcredentialblob as _, pcredentialblobsize as _).ok() } } #[inline] pub unsafe fn SspiPromptForCredentialsA(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 @@ -1326,7 +1266,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); - unsafe { SspiPromptForCredentialsA(psztargetname.param().abi(), core::mem::transmute(puiinfo.unwrap_or(core::mem::zeroed())), 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())), dwflags) } + unsafe { SspiPromptForCredentialsA(psztargetname.param().abi(), puiinfo.unwrap_or(core::mem::zeroed()) as _, dwautherror, pszpackage.param().abi(), pinputauthidentity.unwrap_or(core::mem::zeroed()) as _, ppauthidentity as _, pfsave.unwrap_or(core::mem::zeroed()) as _, 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 @@ -1335,17 +1275,17 @@ 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); - unsafe { SspiPromptForCredentialsW(psztargetname.param().abi(), core::mem::transmute(puiinfo.unwrap_or(core::mem::zeroed())), 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())), dwflags) } + unsafe { SspiPromptForCredentialsW(psztargetname.param().abi(), puiinfo.unwrap_or(core::mem::zeroed()) as _, dwautherror, pszpackage.param().abi(), pinputauthidentity.unwrap_or(core::mem::zeroed()) as _, ppauthidentity as _, pfsave.unwrap_or(core::mem::zeroed()) as _, dwflags) } } #[inline] pub unsafe fn SspiSetChannelBindingFlags(pbindings: *mut SecPkgContext_Bindings, flags: u32) -> windows_core::Result<()> { windows_targets::link!("sspicli.dll" "system" fn SspiSetChannelBindingFlags(pbindings : *mut SecPkgContext_Bindings, flags : u32) -> windows_core::HRESULT); - unsafe { SspiSetChannelBindingFlags(core::mem::transmute(pbindings), flags).ok() } + unsafe { SspiSetChannelBindingFlags(pbindings as _, flags).ok() } } #[inline] pub unsafe fn SspiUnmarshalAuthIdentity(authidentitybytearray: &[u8], ppauthidentity: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("secur32.dll" "system" fn SspiUnmarshalAuthIdentity(authidentitylength : u32, authidentitybytearray : windows_core::PCSTR, ppauthidentity : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { SspiUnmarshalAuthIdentity(authidentitybytearray.len().try_into().unwrap(), core::mem::transmute(authidentitybytearray.as_ptr()), core::mem::transmute(ppauthidentity)).ok() } + unsafe { SspiUnmarshalAuthIdentity(authidentitybytearray.len().try_into().unwrap(), core::mem::transmute(authidentitybytearray.as_ptr()), ppauthidentity as _).ok() } } #[inline] pub unsafe fn SspiValidateAuthIdentity(authdata: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -1355,7 +1295,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)); - unsafe { SspiZeroAuthIdentity(core::mem::transmute(authdata.unwrap_or(core::mem::zeroed()))) } + unsafe { SspiZeroAuthIdentity(authdata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn TokenBindingDeleteAllBindings() -> windows_core::Result<()> { @@ -1376,7 +1316,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); - unsafe { TokenBindingGenerateBinding(keytype, targeturl.param().abi(), bindingtype, tlsekm, tlsekmsize, extensionformat, extensiondata, core::mem::transmute(tokenbinding), core::mem::transmute(tokenbindingsize), core::mem::transmute(resultdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { TokenBindingGenerateBinding(keytype, targeturl.param().abi(), bindingtype, tlsekm, tlsekmsize, extensionformat, extensiondata, tokenbinding as _, tokenbindingsize as _, resultdata.unwrap_or(core::mem::zeroed()) as _).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> { @@ -1400,12 +1340,12 @@ where #[inline] pub unsafe fn TokenBindingGenerateMessage(tokenbindings: *const *const core::ffi::c_void, tokenbindingssize: *const u32, tokenbindingscount: u32, tokenbindingmessage: *mut *mut core::ffi::c_void, tokenbindingmessagesize: *mut u32) -> windows_core::Result<()> { windows_targets::link!("tokenbinding.dll" "system" fn TokenBindingGenerateMessage(tokenbindings : *const *const core::ffi::c_void, tokenbindingssize : *const u32, tokenbindingscount : u32, tokenbindingmessage : *mut *mut core::ffi::c_void, tokenbindingmessagesize : *mut u32) -> windows_core::HRESULT); - unsafe { TokenBindingGenerateMessage(tokenbindings, tokenbindingssize, tokenbindingscount, core::mem::transmute(tokenbindingmessage), core::mem::transmute(tokenbindingmessagesize)).ok() } + unsafe { TokenBindingGenerateMessage(tokenbindings, tokenbindingssize, tokenbindingscount, tokenbindingmessage as _, tokenbindingmessagesize as _).ok() } } #[inline] pub unsafe fn TokenBindingGetHighestSupportedVersion(majorversion: *mut u8, minorversion: *mut u8) -> windows_core::Result<()> { windows_targets::link!("tokenbinding.dll" "system" fn TokenBindingGetHighestSupportedVersion(majorversion : *mut u8, minorversion : *mut u8) -> windows_core::HRESULT); - unsafe { TokenBindingGetHighestSupportedVersion(core::mem::transmute(majorversion), core::mem::transmute(minorversion)).ok() } + unsafe { TokenBindingGetHighestSupportedVersion(majorversion as _, minorversion as _).ok() } } #[inline] pub unsafe fn TokenBindingGetKeyTypesClient() -> windows_core::Result<*mut TOKENBINDING_KEY_TYPES> { @@ -1437,7 +1377,7 @@ 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) -> bool); - unsafe { TranslateNameA(lpaccountname.param().abi(), accountnameformat, desirednameformat, core::mem::transmute(lptranslatedname.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize)) } + unsafe { TranslateNameA(lpaccountname.param().abi(), accountnameformat, desirednameformat, lptranslatedname.unwrap_or(core::mem::zeroed()) as _, nsize as _) } } #[inline] pub unsafe fn TranslateNameW(lpaccountname: P0, accountnameformat: EXTENDED_NAME_FORMAT, desirednameformat: EXTENDED_NAME_FORMAT, lptranslatedname: Option, nsize: *mut u32) -> bool @@ -1445,7 +1385,7 @@ 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) -> bool); - unsafe { TranslateNameW(lpaccountname.param().abi(), accountnameformat, desirednameformat, core::mem::transmute(lptranslatedname.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize)) } + unsafe { TranslateNameW(lpaccountname.param().abi(), accountnameformat, desirednameformat, lptranslatedname.unwrap_or(core::mem::zeroed()) as _, nsize as _) } } #[cfg(feature = "Win32_Security_Credentials")] #[inline] @@ -1951,7 +1891,7 @@ impl ICcgDomainAuthCredentials { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetPasswordCredentials)(windows_core::Interface::as_raw(self), plugininput.param().abi(), core::mem::transmute(domainname), core::mem::transmute(username), core::mem::transmute(password)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPasswordCredentials)(windows_core::Interface::as_raw(self), plugininput.param().abi(), domainname as _, username as _, password as _).ok() } } } #[repr(C)] 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 a4a0532097..bb18ac1880 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 @@ -50,7 +50,7 @@ impl IEffectivePermission { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetEffectivePermission)(windows_core::Interface::as_raw(self), pguidobjecttype, pusersid, pszservername.param().abi(), psd, core::mem::transmute(ppobjecttypelist), core::mem::transmute(pcobjecttypelistlength), core::mem::transmute(ppgrantedaccesslist), core::mem::transmute(pcgrantedaccesslistlength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEffectivePermission)(windows_core::Interface::as_raw(self), pguidobjecttype, pusersid, pszservername.param().abi(), psd, ppobjecttypelist as _, pcobjecttypelistlength as _, ppgrantedaccesslist as _, pcgrantedaccesslistlength as _).ok() } } } #[repr(C)] @@ -103,19 +103,19 @@ impl IEffectivePermission2 { (windows_core::Interface::vtable(self).ComputeEffectivePermissionWithSecondarySecurity)( windows_core::Interface::as_raw(self), psid, - core::mem::transmute(pdevicesid.unwrap_or(core::mem::zeroed())), + pdevicesid.unwrap_or(core::mem::zeroed()) as _, pszservername.param().abi(), - core::mem::transmute(psecurityobjects), + psecurityobjects as _, dwsecurityobjectcount, - 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), + pusergroups.unwrap_or(core::mem::zeroed()) as _, + pauthzusergroupsoperations.unwrap_or(core::mem::zeroed()) as _, + pdevicegroups.unwrap_or(core::mem::zeroed()) as _, + pauthzdevicegroupsoperations.unwrap_or(core::mem::zeroed()) as _, + pauthzuserclaims.unwrap_or(core::mem::zeroed()) as _, + pauthzuserclaimsoperations.unwrap_or(core::mem::zeroed()) as _, + pauthzdeviceclaims.unwrap_or(core::mem::zeroed()) as _, + pauthzdeviceclaimsoperations.unwrap_or(core::mem::zeroed()) as _, + peffpermresultlists as _, ) .ok() } @@ -200,22 +200,22 @@ windows_core::imp::define_interface!(ISecurityInformation, ISecurityInformation_ windows_core::imp::interface_hierarchy!(ISecurityInformation, windows_core::IUnknown); impl ISecurityInformation { pub unsafe fn GetObjectInformation(&self, pobjectinfo: *mut SI_OBJECT_INFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetObjectInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(pobjectinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetObjectInformation)(windows_core::Interface::as_raw(self), pobjectinfo as _).ok() } } pub unsafe fn GetSecurity(&self, requestedinformation: super::super::OBJECT_SECURITY_INFORMATION, ppsecuritydescriptor: *mut super::super::PSECURITY_DESCRIPTOR, fdefault: bool) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSecurity)(windows_core::Interface::as_raw(self), requestedinformation, core::mem::transmute(ppsecuritydescriptor), fdefault.into()).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSecurity)(windows_core::Interface::as_raw(self), requestedinformation, ppsecuritydescriptor as _, fdefault.into()).ok() } } pub unsafe fn SetSecurity(&self, securityinformation: super::super::OBJECT_SECURITY_INFORMATION, psecuritydescriptor: super::super::PSECURITY_DESCRIPTOR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSecurity)(windows_core::Interface::as_raw(self), securityinformation, 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetAccessRights)(windows_core::Interface::as_raw(self), pguidobjecttype, dwflags, core::mem::transmute(ppaccess), core::mem::transmute(pcaccesses), core::mem::transmute(pidefaultaccess)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAccessRights)(windows_core::Interface::as_raw(self), pguidobjecttype, dwflags, ppaccess as _, pcaccesses as _, pidefaultaccess as _).ok() } } pub unsafe fn MapGeneric(&self, pguidobjecttype: *const windows_core::GUID, paceflags: *mut u8, pmask: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).MapGeneric)(windows_core::Interface::as_raw(self), pguidobjecttype, core::mem::transmute(paceflags), core::mem::transmute(pmask)).ok() } + unsafe { (windows_core::Interface::vtable(self).MapGeneric)(windows_core::Interface::as_raw(self), pguidobjecttype, paceflags as _, pmask as _).ok() } } pub unsafe fn GetInheritTypes(&self, ppinherittypes: *mut *mut SI_INHERIT_TYPE, pcinherittypes: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInheritTypes)(windows_core::Interface::as_raw(self), core::mem::transmute(ppinherittypes), core::mem::transmute(pcinherittypes)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInheritTypes)(windows_core::Interface::as_raw(self), ppinherittypes as _, pcinherittypes as _).ok() } } #[cfg(feature = "Win32_UI_Controls")] 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<()> { @@ -427,7 +427,7 @@ windows_core::imp::define_interface!(ISecurityInformation4, ISecurityInformation windows_core::imp::interface_hierarchy!(ISecurityInformation4, windows_core::IUnknown); impl ISecurityInformation4 { pub unsafe fn GetSecondarySecurity(&self, psecurityobjects: *mut *mut SECURITY_OBJECT, psecurityobjectcount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSecondarySecurity)(windows_core::Interface::as_raw(self), core::mem::transmute(psecurityobjects), core::mem::transmute(psecurityobjectcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSecondarySecurity)(windows_core::Interface::as_raw(self), psecurityobjects as _, psecurityobjectcount as _).ok() } } } #[repr(C)] @@ -457,7 +457,7 @@ windows_core::imp::define_interface!(ISecurityObjectTypeInfo, ISecurityObjectTyp windows_core::imp::interface_hierarchy!(ISecurityObjectTypeInfo, windows_core::IUnknown); impl ISecurityObjectTypeInfo { pub unsafe fn GetInheritSource(&self, si: u32, pacl: *mut super::super::ACL, ppinheritarray: *mut *mut super::INHERITED_FROMA) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInheritSource)(windows_core::Interface::as_raw(self), si, core::mem::transmute(pacl), core::mem::transmute(ppinheritarray)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInheritSource)(windows_core::Interface::as_raw(self), si, pacl as _, ppinheritarray as _).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 d0470967b6..6c38f48761 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Authorization/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Authorization/mod.rs @@ -3,27 +3,27 @@ pub mod UI; #[inline] 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); - unsafe { AuthzAccessCheck(flags, hauthzclientcontext, prequest, core::mem::transmute(hauditevent.unwrap_or(core::mem::zeroed())), 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() } + unsafe { AuthzAccessCheck(flags, hauthzclientcontext, prequest, hauditevent.unwrap_or(core::mem::zeroed()) as _, 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()), preply as _, phaccesscheckresults.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { AuthzAddSidsToContext(hauthzclientcontext, core::mem::transmute(sids.unwrap_or(core::mem::zeroed())), sidcount, core::mem::transmute(restrictedsids.unwrap_or(core::mem::zeroed())), restrictedsidcount, core::mem::transmute(phnewauthzclientcontext)).ok() } + unsafe { AuthzAddSidsToContext(hauthzclientcontext, sids.unwrap_or(core::mem::zeroed()) as _, sidcount, restrictedsids.unwrap_or(core::mem::zeroed()) as _, restrictedsidcount, phnewauthzclientcontext as _).ok() } } #[inline] 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); - unsafe { AuthzCachedAccessCheck(flags, haccesscheckresults, prequest, core::mem::transmute(hauditevent.unwrap_or(core::mem::zeroed())), core::mem::transmute(preply)).ok() } + unsafe { AuthzCachedAccessCheck(flags, haccesscheckresults, prequest, hauditevent.unwrap_or(core::mem::zeroed()) as _, preply as _).ok() } } #[inline] pub unsafe fn AuthzEnumerateSecurityEventSources(dwflags: u32, buffer: *mut AUTHZ_SOURCE_SCHEMA_REGISTRATION, pdwcount: *mut u32, pdwlength: *mut u32) -> windows_core::Result<()> { windows_targets::link!("authz.dll" "system" fn AuthzEnumerateSecurityEventSources(dwflags : u32, buffer : *mut AUTHZ_SOURCE_SCHEMA_REGISTRATION, pdwcount : *mut u32, pdwlength : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { AuthzEnumerateSecurityEventSources(dwflags, core::mem::transmute(buffer), core::mem::transmute(pdwcount), core::mem::transmute(pdwlength)).ok() } + unsafe { AuthzEnumerateSecurityEventSources(dwflags, buffer as _, pdwcount as _, pdwlength as _).ok() } } #[inline] pub unsafe fn AuthzEvaluateSacl(authzclientcontext: AUTHZ_CLIENT_CONTEXT_HANDLE, prequest: *const AUTHZ_ACCESS_REQUEST, sacl: *const super::ACL, grantedaccess: u32, accessgranted: bool, pbgenerateaudit: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL { 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); - unsafe { AuthzEvaluateSacl(authzclientcontext, prequest, sacl, grantedaccess, accessgranted.into(), core::mem::transmute(pbgenerateaudit)) } + unsafe { AuthzEvaluateSacl(authzclientcontext, prequest, sacl, grantedaccess, accessgranted.into(), pbgenerateaudit as _) } } #[inline] pub unsafe fn AuthzFreeAuditEvent(hauditevent: AUTHZ_AUDIT_EVENT_HANDLE) -> windows_core::Result<()> { @@ -43,7 +43,7 @@ pub unsafe fn AuthzFreeContext(hauthzclientcontext: AUTHZ_CLIENT_CONTEXT_HANDLE) #[inline] pub unsafe fn AuthzFreeHandle(haccesscheckresults: AUTHZ_ACCESS_CHECK_RESULTS_HANDLE) -> windows_core::Result<()> { windows_targets::link!("authz.dll" "system" fn AuthzFreeHandle(haccesscheckresults : AUTHZ_ACCESS_CHECK_RESULTS_HANDLE) -> super::super::Foundation:: BOOL); - unsafe { AuthzFreeHandle(core::mem::transmute(haccesscheckresults)).ok() } + unsafe { AuthzFreeHandle(haccesscheckresults as _).ok() } } #[inline] pub unsafe fn AuthzFreeResourceManager(hauthzresourcemanager: AUTHZ_RESOURCE_MANAGER_HANDLE) -> windows_core::Result<()> { @@ -53,27 +53,27 @@ pub unsafe fn AuthzFreeResourceManager(hauthzresourcemanager: AUTHZ_RESOURCE_MAN #[inline] 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); - unsafe { AuthzGetInformationFromContext(hauthzclientcontext, infoclass, buffersize, core::mem::transmute(psizerequired), core::mem::transmute(buffer)).ok() } + unsafe { AuthzGetInformationFromContext(hauthzclientcontext, infoclass, buffersize, psizerequired as _, buffer as _).ok() } } #[inline] 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); - unsafe { AuthzInitializeCompoundContext(usercontext, devicecontext, core::mem::transmute(phcompoundcontext)).ok() } + unsafe { AuthzInitializeCompoundContext(usercontext, devicecontext, phcompoundcontext as _).ok() } } #[inline] 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); - unsafe { AuthzInitializeContextFromAuthzContext(flags, hauthzclientcontext, core::mem::transmute(pexpirationtime.unwrap_or(core::mem::zeroed())), core::mem::transmute(identifier), dynamicgroupargs, core::mem::transmute(phnewauthzclientcontext)).ok() } + unsafe { AuthzInitializeContextFromAuthzContext(flags, hauthzclientcontext, pexpirationtime.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(identifier), dynamicgroupargs, phnewauthzclientcontext as _).ok() } } #[inline] 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); - unsafe { AuthzInitializeContextFromSid(flags, usersid, 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() } + unsafe { AuthzInitializeContextFromSid(flags, usersid, hauthzresourcemanager, pexpirationtime.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(identifier), dynamicgroupargs.unwrap_or(core::mem::zeroed()) as _, phauthzclientcontext as _).ok() } } #[inline] 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); - unsafe { AuthzInitializeContextFromToken(flags, tokenhandle, 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() } + unsafe { AuthzInitializeContextFromToken(flags, tokenhandle, hauthzresourcemanager, pexpirationtime.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(identifier), dynamicgroupargs.unwrap_or(core::mem::zeroed()) as _, phauthzclientcontext as _).ok() } } #[inline] 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<()> @@ -84,7 +84,7 @@ where 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); - unsafe { AuthzInitializeObjectAccessAuditEvent(flags, hauditeventtype, szoperationtype.param().abi(), szobjecttype.param().abi(), szobjectname.param().abi(), szadditionalinfo.param().abi(), core::mem::transmute(phauditevent), dwadditionalparametercount).ok() } + unsafe { AuthzInitializeObjectAccessAuditEvent(flags, hauditeventtype, szoperationtype.param().abi(), szobjecttype.param().abi(), szobjectname.param().abi(), szadditionalinfo.param().abi(), phauditevent as _, dwadditionalparametercount).ok() } } #[inline] 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<()> @@ -96,12 +96,12 @@ 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); - unsafe { AuthzInitializeObjectAccessAuditEvent2(flags, hauditeventtype, szoperationtype.param().abi(), szobjecttype.param().abi(), szobjectname.param().abi(), szadditionalinfo.param().abi(), szadditionalinfo2.param().abi(), core::mem::transmute(phauditevent), dwadditionalparametercount).ok() } + unsafe { AuthzInitializeObjectAccessAuditEvent2(flags, hauditeventtype, szoperationtype.param().abi(), szobjecttype.param().abi(), szobjectname.param().abi(), szadditionalinfo.param().abi(), szadditionalinfo2.param().abi(), phauditevent as _, dwadditionalparametercount).ok() } } #[inline] pub unsafe fn AuthzInitializeRemoteResourceManager(prpcinitinfo: *const AUTHZ_RPC_INIT_INFO_CLIENT, phauthzresourcemanager: *mut AUTHZ_RESOURCE_MANAGER_HANDLE) -> windows_core::Result<()> { windows_targets::link!("authz.dll" "system" fn AuthzInitializeRemoteResourceManager(prpcinitinfo : *const AUTHZ_RPC_INIT_INFO_CLIENT, phauthzresourcemanager : *mut AUTHZ_RESOURCE_MANAGER_HANDLE) -> super::super::Foundation:: BOOL); - unsafe { AuthzInitializeRemoteResourceManager(prpcinitinfo, core::mem::transmute(phauthzresourcemanager)).ok() } + unsafe { AuthzInitializeRemoteResourceManager(prpcinitinfo, phauthzresourcemanager as _).ok() } } #[inline] pub unsafe fn AuthzInitializeResourceManager(flags: u32, pfndynamicaccesscheck: Option, pfncomputedynamicgroups: Option, pfnfreedynamicgroups: Option, szresourcemanagername: P4, phauthzresourcemanager: *mut AUTHZ_RESOURCE_MANAGER_HANDLE) -> windows_core::Result<()> @@ -109,12 +109,12 @@ 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); - unsafe { AuthzInitializeResourceManager(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() } + unsafe { AuthzInitializeResourceManager(flags, pfndynamicaccesscheck.unwrap_or(core::mem::zeroed()) as _, pfncomputedynamicgroups.unwrap_or(core::mem::zeroed()) as _, pfnfreedynamicgroups.unwrap_or(core::mem::zeroed()) as _, szresourcemanagername.param().abi(), phauthzresourcemanager as _).ok() } } #[inline] 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); - unsafe { AuthzInitializeResourceManagerEx(core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(pauthzinitinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(phauthzresourcemanager)).ok() } + unsafe { AuthzInitializeResourceManagerEx(flags.unwrap_or(core::mem::zeroed()) as _, pauthzinitinfo.unwrap_or(core::mem::zeroed()) as _, phauthzresourcemanager as _).ok() } } #[inline] pub unsafe fn AuthzInstallSecurityEventSource(dwflags: u32, pregistration: *const AUTHZ_SOURCE_SCHEMA_REGISTRATION) -> windows_core::Result<()> { @@ -124,17 +124,17 @@ pub unsafe fn AuthzInstallSecurityEventSource(dwflags: u32, pregistration: *cons #[inline] 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); - unsafe { AuthzModifyClaims(hauthzclientcontext, claimclass, pclaimoperations, core::mem::transmute(pclaims.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { AuthzModifyClaims(hauthzclientcontext, claimclass, pclaimoperations, pclaims.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { AuthzModifySecurityAttributes(hauthzclientcontext, poperations, core::mem::transmute(pattributes.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { AuthzModifySecurityAttributes(hauthzclientcontext, poperations, pattributes.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { AuthzModifySids(hauthzclientcontext, sidclass, psidoperations, core::mem::transmute(psids.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { AuthzModifySids(hauthzclientcontext, sidclass, psidoperations, psids.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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<()> { @@ -145,7 +145,7 @@ pub unsafe fn AuthzOpenObjectAudit(flags: u32, hauthzclientcontext: AUTHZ_CLIENT #[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); - unsafe { AuthzRegisterCapChangeNotification(core::mem::transmute(phcapchangesubscription), pfncapchangecallback, core::mem::transmute(pcallbackcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { AuthzRegisterCapChangeNotification(phcapchangesubscription as _, pfncapchangecallback, pcallbackcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn AuthzRegisterSecurityEventSource(dwflags: u32, szeventsourcename: P1, pheventprovider: *mut AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE) -> windows_core::Result<()> @@ -153,17 +153,17 @@ where P1: windows_core::Param, { windows_targets::link!("authz.dll" "system" fn AuthzRegisterSecurityEventSource(dwflags : u32, szeventsourcename : windows_core::PCWSTR, pheventprovider : *mut AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE) -> super::super::Foundation:: BOOL); - unsafe { AuthzRegisterSecurityEventSource(dwflags, szeventsourcename.param().abi(), core::mem::transmute(pheventprovider)).ok() } + unsafe { AuthzRegisterSecurityEventSource(dwflags, szeventsourcename.param().abi(), pheventprovider as _).ok() } } #[inline] 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); - unsafe { AuthzReportSecurityEvent(dwflags, core::mem::transmute(heventprovider), dwauditid, core::mem::transmute(pusersid.unwrap_or(core::mem::zeroed())), dwcount).ok() } + unsafe { AuthzReportSecurityEvent(dwflags, heventprovider as _, dwauditid, pusersid.unwrap_or(core::mem::zeroed()) as _, dwcount).ok() } } #[inline] 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); - unsafe { AuthzReportSecurityEventFromParams(dwflags, core::mem::transmute(heventprovider), dwauditid, core::mem::transmute(pusersid.unwrap_or(core::mem::zeroed())), pparams).ok() } + unsafe { AuthzReportSecurityEventFromParams(dwflags, heventprovider as _, dwauditid, pusersid.unwrap_or(core::mem::zeroed()) as _, pparams).ok() } } #[inline] pub unsafe fn AuthzSetAppContainerInformation(hauthzclientcontext: AUTHZ_CLIENT_CONTEXT_HANDLE, pappcontainersid: super::PSID, pcapabilitysids: Option<&[super::SID_AND_ATTRIBUTES]>) -> windows_core::Result<()> { @@ -186,7 +186,7 @@ pub unsafe fn AuthzUnregisterCapChangeNotification(hcapchangesubscription: AUTHZ #[inline] pub unsafe fn AuthzUnregisterSecurityEventSource(dwflags: u32, pheventprovider: *mut AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE) -> windows_core::Result<()> { windows_targets::link!("authz.dll" "system" fn AuthzUnregisterSecurityEventSource(dwflags : u32, pheventprovider : *mut AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE) -> super::super::Foundation:: BOOL); - unsafe { AuthzUnregisterSecurityEventSource(dwflags, core::mem::transmute(pheventprovider)).ok() } + unsafe { AuthzUnregisterSecurityEventSource(dwflags, pheventprovider as _).ok() } } #[inline] pub unsafe fn BuildExplicitAccessWithNameA(pexplicitaccess: *mut EXPLICIT_ACCESS_A, ptrusteename: P1, accesspermissions: u32, accessmode: ACCESS_MODE, inheritance: super::ACE_FLAGS) @@ -194,7 +194,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn BuildExplicitAccessWithNameA(pexplicitaccess : *mut EXPLICIT_ACCESS_A, ptrusteename : windows_core::PCSTR, accesspermissions : u32, accessmode : ACCESS_MODE, inheritance : super:: ACE_FLAGS)); - unsafe { BuildExplicitAccessWithNameA(core::mem::transmute(pexplicitaccess), ptrusteename.param().abi(), accesspermissions, accessmode, inheritance) } + unsafe { BuildExplicitAccessWithNameA(pexplicitaccess as _, ptrusteename.param().abi(), accesspermissions, accessmode, inheritance) } } #[inline] pub unsafe fn BuildExplicitAccessWithNameW(pexplicitaccess: *mut EXPLICIT_ACCESS_W, ptrusteename: P1, accesspermissions: u32, accessmode: ACCESS_MODE, inheritance: super::ACE_FLAGS) @@ -202,7 +202,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn BuildExplicitAccessWithNameW(pexplicitaccess : *mut EXPLICIT_ACCESS_W, ptrusteename : windows_core::PCWSTR, accesspermissions : u32, accessmode : ACCESS_MODE, inheritance : super:: ACE_FLAGS)); - unsafe { BuildExplicitAccessWithNameW(core::mem::transmute(pexplicitaccess), ptrusteename.param().abi(), accesspermissions, accessmode, inheritance) } + unsafe { BuildExplicitAccessWithNameW(pexplicitaccess as _, ptrusteename.param().abi(), accesspermissions, accessmode, inheritance) } } #[inline] pub unsafe fn BuildImpersonateExplicitAccessWithNameA(pexplicitaccess: *mut EXPLICIT_ACCESS_A, ptrusteename: P1, ptrustee: Option<*const TRUSTEE_A>, accesspermissions: u32, accessmode: ACCESS_MODE, inheritance: u32) @@ -210,7 +210,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)); - unsafe { BuildImpersonateExplicitAccessWithNameA(core::mem::transmute(pexplicitaccess), ptrusteename.param().abi(), core::mem::transmute(ptrustee.unwrap_or(core::mem::zeroed())), accesspermissions, accessmode, inheritance) } + unsafe { BuildImpersonateExplicitAccessWithNameA(pexplicitaccess as _, ptrusteename.param().abi(), ptrustee.unwrap_or(core::mem::zeroed()) as _, accesspermissions, accessmode, 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) @@ -218,32 +218,32 @@ 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)); - unsafe { BuildImpersonateExplicitAccessWithNameW(core::mem::transmute(pexplicitaccess), ptrusteename.param().abi(), core::mem::transmute(ptrustee.unwrap_or(core::mem::zeroed())), accesspermissions, accessmode, inheritance) } + unsafe { BuildImpersonateExplicitAccessWithNameW(pexplicitaccess as _, ptrusteename.param().abi(), ptrustee.unwrap_or(core::mem::zeroed()) as _, accesspermissions, accessmode, inheritance) } } #[inline] pub unsafe fn BuildImpersonateTrusteeA(ptrustee: *mut TRUSTEE_A, pimpersonatetrustee: Option<*const TRUSTEE_A>) { windows_targets::link!("advapi32.dll" "system" fn BuildImpersonateTrusteeA(ptrustee : *mut TRUSTEE_A, pimpersonatetrustee : *const TRUSTEE_A)); - unsafe { BuildImpersonateTrusteeA(core::mem::transmute(ptrustee), core::mem::transmute(pimpersonatetrustee.unwrap_or(core::mem::zeroed()))) } + unsafe { BuildImpersonateTrusteeA(ptrustee as _, pimpersonatetrustee.unwrap_or(core::mem::zeroed()) as _) } } #[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)); - unsafe { BuildImpersonateTrusteeW(core::mem::transmute(ptrustee), core::mem::transmute(pimpersonatetrustee.unwrap_or(core::mem::zeroed()))) } + unsafe { BuildImpersonateTrusteeW(ptrustee as _, pimpersonatetrustee.unwrap_or(core::mem::zeroed()) as _) } } #[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: 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); unsafe { BuildSecurityDescriptorA( - core::mem::transmute(powner.unwrap_or(core::mem::zeroed())), - core::mem::transmute(pgroup.unwrap_or(core::mem::zeroed())), + powner.unwrap_or(core::mem::zeroed()) as _, + pgroup.unwrap_or(core::mem::zeroed()) as _, 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())), - core::mem::transmute(poldsd.unwrap_or(core::mem::zeroed())), - core::mem::transmute(psizenewsd), - core::mem::transmute(pnewsd), + poldsd.unwrap_or(core::mem::zeroed()) as _, + psizenewsd as _, + pnewsd as _, ) } } @@ -252,15 +252,15 @@ pub unsafe fn BuildSecurityDescriptorW(powner: Option<*const TRUSTEE_W>, pgroup: 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); unsafe { BuildSecurityDescriptorW( - core::mem::transmute(powner.unwrap_or(core::mem::zeroed())), - core::mem::transmute(pgroup.unwrap_or(core::mem::zeroed())), + powner.unwrap_or(core::mem::zeroed()) as _, + pgroup.unwrap_or(core::mem::zeroed()) as _, 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())), - core::mem::transmute(poldsd.unwrap_or(core::mem::zeroed())), - core::mem::transmute(psizenewsd), - core::mem::transmute(pnewsd), + poldsd.unwrap_or(core::mem::zeroed()) as _, + psizenewsd as _, + pnewsd as _, ) } } @@ -270,7 +270,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn BuildTrusteeWithNameA(ptrustee : *mut TRUSTEE_A, pname : windows_core::PCSTR)); - unsafe { BuildTrusteeWithNameA(core::mem::transmute(ptrustee), pname.param().abi()) } + unsafe { BuildTrusteeWithNameA(ptrustee as _, pname.param().abi()) } } #[inline] pub unsafe fn BuildTrusteeWithNameW(ptrustee: *mut TRUSTEE_W, pname: P1) @@ -278,7 +278,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn BuildTrusteeWithNameW(ptrustee : *mut TRUSTEE_W, pname : windows_core::PCWSTR)); - unsafe { BuildTrusteeWithNameW(core::mem::transmute(ptrustee), pname.param().abi()) } + unsafe { BuildTrusteeWithNameW(ptrustee as _, pname.param().abi()) } } #[inline] pub unsafe fn BuildTrusteeWithObjectsAndNameA(ptrustee: *mut TRUSTEE_A, pobjname: Option<*const OBJECTS_AND_NAME_A>, objecttype: Option, objecttypename: P3, inheritedobjecttypename: P4, name: P5) @@ -288,7 +288,7 @@ where 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)); - unsafe { 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()) } + unsafe { BuildTrusteeWithObjectsAndNameA(ptrustee as _, pobjname.unwrap_or(core::mem::zeroed()) as _, objecttype.unwrap_or(core::mem::zeroed()) as _, 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: Option, objecttypename: P3, inheritedobjecttypename: P4, name: P5) @@ -298,47 +298,47 @@ where 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)); - unsafe { 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()) } + unsafe { BuildTrusteeWithObjectsAndNameW(ptrustee as _, pobjname.unwrap_or(core::mem::zeroed()) as _, objecttype.unwrap_or(core::mem::zeroed()) as _, 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: 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)); - unsafe { 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()))) } + unsafe { BuildTrusteeWithObjectsAndSidA(ptrustee as _, pobjsid.unwrap_or(core::mem::zeroed()) as _, pobjectguid.unwrap_or(core::mem::zeroed()) as _, pinheritedobjectguid.unwrap_or(core::mem::zeroed()) as _, psid.unwrap_or(core::mem::zeroed()) as _) } } #[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: 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)); - unsafe { 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()))) } + unsafe { BuildTrusteeWithObjectsAndSidW(ptrustee as _, pobjsid.unwrap_or(core::mem::zeroed()) as _, pobjectguid.unwrap_or(core::mem::zeroed()) as _, pinheritedobjectguid.unwrap_or(core::mem::zeroed()) as _, psid.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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)); - unsafe { BuildTrusteeWithSidA(core::mem::transmute(ptrustee), core::mem::transmute(psid.unwrap_or(core::mem::zeroed()))) } + unsafe { BuildTrusteeWithSidA(ptrustee as _, psid.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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)); - unsafe { BuildTrusteeWithSidW(core::mem::transmute(ptrustee), core::mem::transmute(psid.unwrap_or(core::mem::zeroed()))) } + unsafe { BuildTrusteeWithSidW(ptrustee as _, psid.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { ConvertSecurityDescriptorToStringSecurityDescriptorA(securitydescriptor, requestedstringsdrevision, securityinformation, core::mem::transmute(stringsecuritydescriptor), core::mem::transmute(stringsecuritydescriptorlen.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ConvertSecurityDescriptorToStringSecurityDescriptorA(securitydescriptor, requestedstringsdrevision, securityinformation, stringsecuritydescriptor as _, stringsecuritydescriptorlen.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { ConvertSecurityDescriptorToStringSecurityDescriptorW(securitydescriptor, requestedstringsdrevision, securityinformation, core::mem::transmute(stringsecuritydescriptor), core::mem::transmute(stringsecuritydescriptorlen.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ConvertSecurityDescriptorToStringSecurityDescriptorW(securitydescriptor, requestedstringsdrevision, securityinformation, stringsecuritydescriptor as _, stringsecuritydescriptorlen.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { ConvertSidToStringSidA(sid, core::mem::transmute(stringsid)).ok() } + unsafe { ConvertSidToStringSidA(sid, stringsid as _).ok() } } #[inline] 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); - unsafe { ConvertSidToStringSidW(sid, core::mem::transmute(stringsid)).ok() } + unsafe { ConvertSidToStringSidW(sid, stringsid as _).ok() } } #[inline] pub unsafe fn ConvertStringSecurityDescriptorToSecurityDescriptorA(stringsecuritydescriptor: P0, stringsdrevision: u32, securitydescriptor: *mut super::PSECURITY_DESCRIPTOR, securitydescriptorsize: Option<*mut u32>) -> windows_core::Result<()> @@ -346,7 +346,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); - unsafe { ConvertStringSecurityDescriptorToSecurityDescriptorA(stringsecuritydescriptor.param().abi(), stringsdrevision, core::mem::transmute(securitydescriptor), core::mem::transmute(securitydescriptorsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ConvertStringSecurityDescriptorToSecurityDescriptorA(stringsecuritydescriptor.param().abi(), stringsdrevision, securitydescriptor as _, securitydescriptorsize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn ConvertStringSecurityDescriptorToSecurityDescriptorW(stringsecuritydescriptor: P0, stringsdrevision: u32, securitydescriptor: *mut super::PSECURITY_DESCRIPTOR, securitydescriptorsize: Option<*mut u32>) -> windows_core::Result<()> @@ -354,7 +354,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); - unsafe { ConvertStringSecurityDescriptorToSecurityDescriptorW(stringsecuritydescriptor.param().abi(), stringsdrevision, core::mem::transmute(securitydescriptor), core::mem::transmute(securitydescriptorsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ConvertStringSecurityDescriptorToSecurityDescriptorW(stringsecuritydescriptor.param().abi(), stringsdrevision, securitydescriptor as _, securitydescriptorsize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn ConvertStringSidToSidA(stringsid: P0, sid: *mut super::PSID) -> windows_core::Result<()> @@ -362,7 +362,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn ConvertStringSidToSidA(stringsid : windows_core::PCSTR, sid : *mut super:: PSID) -> super::super::Foundation:: BOOL); - unsafe { ConvertStringSidToSidA(stringsid.param().abi(), core::mem::transmute(sid)).ok() } + unsafe { ConvertStringSidToSidA(stringsid.param().abi(), sid as _).ok() } } #[inline] pub unsafe fn ConvertStringSidToSidW(stringsid: P0, sid: *mut super::PSID) -> windows_core::Result<()> @@ -370,42 +370,42 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn ConvertStringSidToSidW(stringsid : windows_core::PCWSTR, sid : *mut super:: PSID) -> super::super::Foundation:: BOOL); - unsafe { ConvertStringSidToSidW(stringsid.param().abi(), core::mem::transmute(sid)).ok() } + unsafe { ConvertStringSidToSidW(stringsid.param().abi(), sid as _).ok() } } #[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); - unsafe { FreeInheritedFromArray(core::mem::transmute(pinheritarray.as_ptr()), pinheritarray.len().try_into().unwrap(), core::mem::transmute(pfnarray.unwrap_or(core::mem::zeroed()))) } + unsafe { FreeInheritedFromArray(core::mem::transmute(pinheritarray.as_ptr()), pinheritarray.len().try_into().unwrap(), pfnarray.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GetAuditedPermissionsFromAclA(pacl: *const super::ACL, ptrustee: *const TRUSTEE_A, psuccessfulauditedrights: *mut u32, pfailedauditrights: *mut u32) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("advapi32.dll" "system" fn GetAuditedPermissionsFromAclA(pacl : *const super:: ACL, ptrustee : *const TRUSTEE_A, psuccessfulauditedrights : *mut u32, pfailedauditrights : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetAuditedPermissionsFromAclA(pacl, ptrustee, core::mem::transmute(psuccessfulauditedrights), core::mem::transmute(pfailedauditrights)) } + unsafe { GetAuditedPermissionsFromAclA(pacl, ptrustee, psuccessfulauditedrights as _, pfailedauditrights as _) } } #[inline] pub unsafe fn GetAuditedPermissionsFromAclW(pacl: *const super::ACL, ptrustee: *const TRUSTEE_W, psuccessfulauditedrights: *mut u32, pfailedauditrights: *mut u32) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("advapi32.dll" "system" fn GetAuditedPermissionsFromAclW(pacl : *const super:: ACL, ptrustee : *const TRUSTEE_W, psuccessfulauditedrights : *mut u32, pfailedauditrights : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetAuditedPermissionsFromAclW(pacl, ptrustee, core::mem::transmute(psuccessfulauditedrights), core::mem::transmute(pfailedauditrights)) } + unsafe { GetAuditedPermissionsFromAclW(pacl, ptrustee, psuccessfulauditedrights as _, pfailedauditrights as _) } } #[inline] pub unsafe fn GetEffectiveRightsFromAclA(pacl: *const super::ACL, ptrustee: *const TRUSTEE_A, paccessrights: *mut u32) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("advapi32.dll" "system" fn GetEffectiveRightsFromAclA(pacl : *const super:: ACL, ptrustee : *const TRUSTEE_A, paccessrights : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetEffectiveRightsFromAclA(pacl, ptrustee, core::mem::transmute(paccessrights)) } + unsafe { GetEffectiveRightsFromAclA(pacl, ptrustee, paccessrights as _) } } #[inline] pub unsafe fn GetEffectiveRightsFromAclW(pacl: *const super::ACL, ptrustee: *const TRUSTEE_W, paccessrights: *mut u32) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("advapi32.dll" "system" fn GetEffectiveRightsFromAclW(pacl : *const super:: ACL, ptrustee : *const TRUSTEE_W, paccessrights : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetEffectiveRightsFromAclW(pacl, ptrustee, core::mem::transmute(paccessrights)) } + unsafe { GetEffectiveRightsFromAclW(pacl, ptrustee, paccessrights as _) } } #[inline] pub unsafe fn GetExplicitEntriesFromAclA(pacl: *const super::ACL, pccountofexplicitentries: *mut u32, plistofexplicitentries: *mut *mut EXPLICIT_ACCESS_A) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("advapi32.dll" "system" fn GetExplicitEntriesFromAclA(pacl : *const super:: ACL, pccountofexplicitentries : *mut u32, plistofexplicitentries : *mut *mut EXPLICIT_ACCESS_A) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetExplicitEntriesFromAclA(pacl, core::mem::transmute(pccountofexplicitentries), core::mem::transmute(plistofexplicitentries)) } + unsafe { GetExplicitEntriesFromAclA(pacl, pccountofexplicitentries as _, plistofexplicitentries as _) } } #[inline] pub unsafe fn GetExplicitEntriesFromAclW(pacl: *const super::ACL, pccountofexplicitentries: *mut u32, plistofexplicitentries: *mut *mut EXPLICIT_ACCESS_W) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("advapi32.dll" "system" fn GetExplicitEntriesFromAclW(pacl : *const super:: ACL, pccountofexplicitentries : *mut u32, plistofexplicitentries : *mut *mut EXPLICIT_ACCESS_W) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetExplicitEntriesFromAclW(pacl, core::mem::transmute(pccountofexplicitentries), core::mem::transmute(plistofexplicitentries)) } + unsafe { GetExplicitEntriesFromAclW(pacl, pccountofexplicitentries as _, plistofexplicitentries as _) } } #[inline] pub unsafe fn GetInheritanceSourceA(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, container: bool, 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_FROMA) -> super::super::Foundation::WIN32_ERROR @@ -413,7 +413,7 @@ where P0: 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); - unsafe { GetInheritanceSourceA(pobjectname.param().abi(), objecttype, securityinfo, container.into(), core::mem::transmute(pobjectclassguids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pobjectclassguids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pacl, core::mem::transmute(pfnarray.unwrap_or(core::mem::zeroed())), pgenericmapping, core::mem::transmute(pinheritarray)) } + unsafe { GetInheritanceSourceA(pobjectname.param().abi(), objecttype, securityinfo, container.into(), core::mem::transmute(pobjectclassguids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pobjectclassguids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pacl, pfnarray.unwrap_or(core::mem::zeroed()) as _, pgenericmapping, pinheritarray as _) } } #[inline] pub unsafe fn GetInheritanceSourceW(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, container: bool, 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 @@ -421,27 +421,27 @@ where P0: 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); - unsafe { GetInheritanceSourceW(pobjectname.param().abi(), objecttype, securityinfo, container.into(), core::mem::transmute(pobjectclassguids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pobjectclassguids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pacl, core::mem::transmute(pfnarray.unwrap_or(core::mem::zeroed())), pgenericmapping, core::mem::transmute(pinheritarray)) } + unsafe { GetInheritanceSourceW(pobjectname.param().abi(), objecttype, securityinfo, container.into(), core::mem::transmute(pobjectclassguids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pobjectclassguids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pacl, pfnarray.unwrap_or(core::mem::zeroed()) as _, pgenericmapping, pinheritarray as _) } } #[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); - unsafe { GetMultipleTrusteeA(core::mem::transmute(ptrustee.unwrap_or(core::mem::zeroed()))) } + unsafe { GetMultipleTrusteeA(ptrustee.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { GetMultipleTrusteeOperationA(core::mem::transmute(ptrustee.unwrap_or(core::mem::zeroed()))) } + unsafe { GetMultipleTrusteeOperationA(ptrustee.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { GetMultipleTrusteeOperationW(core::mem::transmute(ptrustee.unwrap_or(core::mem::zeroed()))) } + unsafe { GetMultipleTrusteeOperationW(ptrustee.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { GetMultipleTrusteeW(core::mem::transmute(ptrustee.unwrap_or(core::mem::zeroed()))) } + unsafe { GetMultipleTrusteeW(ptrustee.unwrap_or(core::mem::zeroed()) as _) } } #[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 @@ -449,7 +449,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); - unsafe { GetNamedSecurityInfoA(pobjectname.param().abi(), objecttype, 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)) } + unsafe { GetNamedSecurityInfoA(pobjectname.param().abi(), objecttype, securityinfo, ppsidowner.unwrap_or(core::mem::zeroed()) as _, ppsidgroup.unwrap_or(core::mem::zeroed()) as _, ppdacl.unwrap_or(core::mem::zeroed()) as _, ppsacl.unwrap_or(core::mem::zeroed()) as _, ppsecuritydescriptor as _) } } #[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 @@ -457,12 +457,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); - unsafe { GetNamedSecurityInfoW(pobjectname.param().abi(), objecttype, 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)) } + unsafe { GetNamedSecurityInfoW(pobjectname.param().abi(), objecttype, securityinfo, ppsidowner.unwrap_or(core::mem::zeroed()) as _, ppsidgroup.unwrap_or(core::mem::zeroed()) as _, ppdacl.unwrap_or(core::mem::zeroed()) as _, ppsacl.unwrap_or(core::mem::zeroed()) as _, ppsecuritydescriptor as _) } } #[inline] 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); - unsafe { GetSecurityInfo(handle, objecttype, 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()))) } + unsafe { GetSecurityInfo(handle, objecttype, securityinfo, ppsidowner.unwrap_or(core::mem::zeroed()) as _, ppsidgroup.unwrap_or(core::mem::zeroed()) as _, ppdacl.unwrap_or(core::mem::zeroed()) as _, ppsacl.unwrap_or(core::mem::zeroed()) as _, ppsecuritydescriptor.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GetTrusteeFormA(ptrustee: *const TRUSTEE_A) -> TRUSTEE_FORM { @@ -487,32 +487,32 @@ 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); - unsafe { GetTrusteeTypeA(core::mem::transmute(ptrustee.unwrap_or(core::mem::zeroed()))) } + unsafe { GetTrusteeTypeA(ptrustee.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { GetTrusteeTypeW(core::mem::transmute(ptrustee.unwrap_or(core::mem::zeroed()))) } + unsafe { GetTrusteeTypeW(ptrustee.unwrap_or(core::mem::zeroed()) as _) } } #[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: 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); - unsafe { 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), psd) } + unsafe { LookupSecurityDescriptorPartsA(ppowner.unwrap_or(core::mem::zeroed()) as _, ppgroup.unwrap_or(core::mem::zeroed()) as _, pccountofaccessentries.unwrap_or(core::mem::zeroed()) as _, pplistofaccessentries as _, pccountofauditentries.unwrap_or(core::mem::zeroed()) as _, pplistofauditentries as _, 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: 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); - unsafe { 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), psd) } + unsafe { LookupSecurityDescriptorPartsW(ppowner.unwrap_or(core::mem::zeroed()) as _, ppgroup.unwrap_or(core::mem::zeroed()) as _, pccountofaccessentries.unwrap_or(core::mem::zeroed()) as _, pplistofaccessentries as _, pccountofauditentries.unwrap_or(core::mem::zeroed()) as _, pplistofauditentries as _, 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); - unsafe { 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)) } + unsafe { 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())), oldacl.unwrap_or(core::mem::zeroed()) as _, newacl as _) } } #[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); - unsafe { 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)) } + unsafe { 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())), oldacl.unwrap_or(core::mem::zeroed()) as _, newacl as _) } } #[inline] 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 @@ -520,7 +520,7 @@ where P0: 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); - unsafe { SetNamedSecurityInfoA(pobjectname.param().abi(), objecttype, 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()))) } + unsafe { SetNamedSecurityInfoA(pobjectname.param().abi(), objecttype, securityinfo, psidowner.unwrap_or(core::mem::zeroed()) as _, psidgroup.unwrap_or(core::mem::zeroed()) as _, pdacl.unwrap_or(core::mem::zeroed()) as _, psacl.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -528,12 +528,12 @@ where P0: 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); - unsafe { SetNamedSecurityInfoW(pobjectname.param().abi(), objecttype, 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()))) } + unsafe { SetNamedSecurityInfoW(pobjectname.param().abi(), objecttype, securityinfo, psidowner.unwrap_or(core::mem::zeroed()) as _, psidgroup.unwrap_or(core::mem::zeroed()) as _, pdacl.unwrap_or(core::mem::zeroed()) as _, psacl.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { SetSecurityInfo(handle, objecttype, 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()))) } + unsafe { SetSecurityInfo(handle, objecttype, securityinfo, psidowner.unwrap_or(core::mem::zeroed()) as _, psidgroup.unwrap_or(core::mem::zeroed()) as _, pdacl.unwrap_or(core::mem::zeroed()) as _, psacl.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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: bool, fnprogress: Option, progressinvokesetting: PROG_INVOKE_SETTING, args: Option<*const core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR @@ -541,7 +541,7 @@ where P0: 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); - unsafe { TreeResetNamedSecurityInfoA(pobjectname.param().abi(), objecttype, 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.into(), core::mem::transmute(fnprogress.unwrap_or(core::mem::zeroed())), progressinvokesetting, core::mem::transmute(args.unwrap_or(core::mem::zeroed()))) } + unsafe { TreeResetNamedSecurityInfoA(pobjectname.param().abi(), objecttype, securityinfo, powner.unwrap_or(core::mem::zeroed()) as _, pgroup.unwrap_or(core::mem::zeroed()) as _, pdacl.unwrap_or(core::mem::zeroed()) as _, psacl.unwrap_or(core::mem::zeroed()) as _, keepexplicit.into(), fnprogress.unwrap_or(core::mem::zeroed()) as _, progressinvokesetting, args.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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: bool, fnprogress: Option, progressinvokesetting: PROG_INVOKE_SETTING, args: Option<*const core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR @@ -549,7 +549,7 @@ where P0: 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); - unsafe { TreeResetNamedSecurityInfoW(pobjectname.param().abi(), objecttype, 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.into(), core::mem::transmute(fnprogress.unwrap_or(core::mem::zeroed())), progressinvokesetting, core::mem::transmute(args.unwrap_or(core::mem::zeroed()))) } + unsafe { TreeResetNamedSecurityInfoW(pobjectname.param().abi(), objecttype, securityinfo, powner.unwrap_or(core::mem::zeroed()) as _, pgroup.unwrap_or(core::mem::zeroed()) as _, pdacl.unwrap_or(core::mem::zeroed()) as _, psacl.unwrap_or(core::mem::zeroed()) as _, keepexplicit.into(), fnprogress.unwrap_or(core::mem::zeroed()) as _, progressinvokesetting, args.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -557,7 +557,7 @@ where P0: 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); - unsafe { TreeSetNamedSecurityInfoA(pobjectname.param().abi(), objecttype, 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())), dwaction, core::mem::transmute(fnprogress.unwrap_or(core::mem::zeroed())), progressinvokesetting, core::mem::transmute(args.unwrap_or(core::mem::zeroed()))) } + unsafe { TreeSetNamedSecurityInfoA(pobjectname.param().abi(), objecttype, securityinfo, powner.unwrap_or(core::mem::zeroed()) as _, pgroup.unwrap_or(core::mem::zeroed()) as _, pdacl.unwrap_or(core::mem::zeroed()) as _, psacl.unwrap_or(core::mem::zeroed()) as _, dwaction, fnprogress.unwrap_or(core::mem::zeroed()) as _, progressinvokesetting, args.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -565,7 +565,7 @@ where P0: 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); - unsafe { TreeSetNamedSecurityInfoW(pobjectname.param().abi(), objecttype, 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())), dwaction, core::mem::transmute(fnprogress.unwrap_or(core::mem::zeroed())), progressinvokesetting, core::mem::transmute(args.unwrap_or(core::mem::zeroed()))) } + unsafe { TreeSetNamedSecurityInfoW(pobjectname.param().abi(), objecttype, securityinfo, powner.unwrap_or(core::mem::zeroed()) as _, pgroup.unwrap_or(core::mem::zeroed()) as _, pdacl.unwrap_or(core::mem::zeroed()) as _, psacl.unwrap_or(core::mem::zeroed()) as _, dwaction, fnprogress.unwrap_or(core::mem::zeroed()) as _, progressinvokesetting, args.unwrap_or(core::mem::zeroed()) as _) } } 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"); @@ -5280,7 +5280,7 @@ impl IAzAuthorizationStore3 { } } pub unsafe fn GetSchemaVersion(&self, plmajorversion: *mut i32, plminorversion: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSchemaVersion)(windows_core::Interface::as_raw(self), core::mem::transmute(plmajorversion), core::mem::transmute(plminorversion)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSchemaVersion)(windows_core::Interface::as_raw(self), plmajorversion as _, plminorversion as _).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -5495,7 +5495,7 @@ impl IAzBizRuleInterfaces { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetInterfaceValue(&self, bstrinterfacename: &windows_core::BSTR, linterfaceflag: *mut i32, varinterface: *mut super::super::System::Variant::VARIANT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInterfaceValue)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrinterfacename), core::mem::transmute(linterfaceflag), core::mem::transmute(varinterface)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInterfaceValue)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrinterfacename), linterfaceflag as _, core::mem::transmute(varinterface)).ok() } } pub unsafe fn Remove(&self, bstrinterfacename: &windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Remove)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrinterfacename)).ok() } @@ -6405,7 +6405,7 @@ windows_core::imp::interface_hierarchy!(IAzNameResolver, windows_core::IUnknown, #[cfg(feature = "Win32_System_Com")] impl IAzNameResolver { pub unsafe fn NameFromSid(&self, bstrsid: &windows_core::BSTR, psidtype: *mut i32, pbstrname: *mut windows_core::BSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).NameFromSid)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrsid), core::mem::transmute(psidtype), core::mem::transmute(pbstrname)).ok() } + unsafe { (windows_core::Interface::vtable(self).NameFromSid)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrsid), psidtype as _, core::mem::transmute(pbstrname)).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn NamesFromSids(&self, vsids: &super::super::System::Variant::VARIANT, pvsidtypes: *mut super::super::System::Variant::VARIANT, pvnames: *mut super::super::System::Variant::VARIANT) -> windows_core::Result<()> { diff --git a/crates/libs/windows/src/Windows/Win32/Security/ConfigurationSnapin/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/ConfigurationSnapin/mod.rs index 74c6b6c9d0..5652ddbbca 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/ConfigurationSnapin/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/ConfigurationSnapin/mod.rs @@ -4,19 +4,19 @@ windows_core::imp::define_interface!(ISceSvcAttachmentData, ISceSvcAttachmentDat windows_core::imp::interface_hierarchy!(ISceSvcAttachmentData, windows_core::IUnknown); impl ISceSvcAttachmentData { pub unsafe fn GetData(&self, scesvchandle: *mut core::ffi::c_void, scetype: SCESVC_INFO_TYPE, ppvdata: *mut *mut core::ffi::c_void, psceenumhandle: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), core::mem::transmute(scesvchandle), scetype, core::mem::transmute(ppvdata), core::mem::transmute(psceenumhandle)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), scesvchandle as _, scetype, ppvdata as _, psceenumhandle as _).ok() } } pub unsafe fn Initialize(&self, lpservicename: *mut i8, lptemplatename: *mut i8, lpscesvcpersistinfo: P2, pscesvchandle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(lpservicename), core::mem::transmute(lptemplatename), lpscesvcpersistinfo.param().abi(), core::mem::transmute(pscesvchandle)).ok() } + unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), lpservicename as _, lptemplatename as _, lpscesvcpersistinfo.param().abi(), pscesvchandle as _).ok() } } pub unsafe fn FreeBuffer(&self, pvdata: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).FreeBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(pvdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).FreeBuffer)(windows_core::Interface::as_raw(self), pvdata as _).ok() } } pub unsafe fn CloseHandle(&self, scesvchandle: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CloseHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(scesvchandle)).ok() } + unsafe { (windows_core::Interface::vtable(self).CloseHandle)(windows_core::Interface::as_raw(self), scesvchandle as _).ok() } } } #[repr(C)] @@ -76,13 +76,13 @@ windows_core::imp::define_interface!(ISceSvcAttachmentPersistInfo, ISceSvcAttach windows_core::imp::interface_hierarchy!(ISceSvcAttachmentPersistInfo, windows_core::IUnknown); impl ISceSvcAttachmentPersistInfo { pub unsafe fn Save(&self, lptemplatename: *mut i8, scesvchandle: *mut *mut core::ffi::c_void, ppvdata: *mut *mut core::ffi::c_void, pboverwriteall: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self), core::mem::transmute(lptemplatename), core::mem::transmute(scesvchandle), core::mem::transmute(ppvdata), core::mem::transmute(pboverwriteall)).ok() } + unsafe { (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self), lptemplatename as _, scesvchandle as _, ppvdata as _, pboverwriteall as _).ok() } } pub unsafe fn IsDirty(&self, lptemplatename: *mut i8) -> windows_core::HRESULT { - unsafe { (windows_core::Interface::vtable(self).IsDirty)(windows_core::Interface::as_raw(self), core::mem::transmute(lptemplatename)) } + unsafe { (windows_core::Interface::vtable(self).IsDirty)(windows_core::Interface::as_raw(self), lptemplatename as _) } } pub unsafe fn FreeBuffer(&self, pvdata: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).FreeBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(pvdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).FreeBuffer)(windows_core::Interface::as_raw(self), pvdata as _).ok() } } } #[repr(C)] 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 c99d3ba979..4527334946 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Credentials/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Credentials/mod.rs @@ -4,7 +4,7 @@ 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); - unsafe { CredDeleteA(targetname.param().abi(), r#type, core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CredDeleteA(targetname.param().abi(), r#type, flags.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CredDeleteW(targetname: P0, r#type: CRED_TYPE, flags: Option) -> windows_core::Result<()> @@ -12,7 +12,7 @@ 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); - unsafe { CredDeleteW(targetname.param().abi(), r#type, core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CredDeleteW(targetname.param().abi(), r#type, flags.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CredEnumerateA(filter: P0, flags: Option, count: *mut u32, credential: *mut *mut *mut CREDENTIALA) -> windows_core::Result<()> @@ -20,7 +20,7 @@ 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); - unsafe { CredEnumerateA(filter.param().abi(), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(count), core::mem::transmute(credential)).ok() } + unsafe { CredEnumerateA(filter.param().abi(), flags.unwrap_or(core::mem::zeroed()) as _, count as _, credential as _).ok() } } #[inline] pub unsafe fn CredEnumerateW(filter: P0, flags: Option, count: *mut u32, credential: *mut *mut *mut CREDENTIALW) -> windows_core::Result<()> @@ -28,7 +28,7 @@ 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); - unsafe { CredEnumerateW(filter.param().abi(), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(count), core::mem::transmute(credential)).ok() } + unsafe { CredEnumerateW(filter.param().abi(), flags.unwrap_or(core::mem::zeroed()) as _, count as _, credential as _).ok() } } #[inline] pub unsafe fn CredFindBestCredentialA(targetname: P0, r#type: u32, flags: u32, credential: *mut *mut CREDENTIALA) -> windows_core::Result<()> @@ -36,7 +36,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn CredFindBestCredentialA(targetname : windows_core::PCSTR, r#type : u32, flags : u32, credential : *mut *mut CREDENTIALA) -> super::super::Foundation:: BOOL); - unsafe { CredFindBestCredentialA(targetname.param().abi(), r#type, flags, core::mem::transmute(credential)).ok() } + unsafe { CredFindBestCredentialA(targetname.param().abi(), r#type, flags, credential as _).ok() } } #[inline] pub unsafe fn CredFindBestCredentialW(targetname: P0, r#type: u32, flags: u32, credential: *mut *mut CREDENTIALW) -> windows_core::Result<()> @@ -44,7 +44,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn CredFindBestCredentialW(targetname : windows_core::PCWSTR, r#type : u32, flags : u32, credential : *mut *mut CREDENTIALW) -> super::super::Foundation:: BOOL); - unsafe { CredFindBestCredentialW(targetname.param().abi(), r#type, flags, core::mem::transmute(credential)).ok() } + unsafe { CredFindBestCredentialW(targetname.param().abi(), r#type, flags, credential as _).ok() } } #[inline] pub unsafe fn CredFree(buffer: *const core::ffi::c_void) { @@ -62,7 +62,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn CredGetTargetInfoA(targetname : windows_core::PCSTR, flags : u32, targetinfo : *mut *mut CREDENTIAL_TARGET_INFORMATIONA) -> super::super::Foundation:: BOOL); - unsafe { CredGetTargetInfoA(targetname.param().abi(), flags, core::mem::transmute(targetinfo)).ok() } + unsafe { CredGetTargetInfoA(targetname.param().abi(), flags, targetinfo as _).ok() } } #[inline] pub unsafe fn CredGetTargetInfoW(targetname: P0, flags: u32, targetinfo: *mut *mut CREDENTIAL_TARGET_INFORMATIONW) -> windows_core::Result<()> @@ -70,7 +70,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn CredGetTargetInfoW(targetname : windows_core::PCWSTR, flags : u32, targetinfo : *mut *mut CREDENTIAL_TARGET_INFORMATIONW) -> super::super::Foundation:: BOOL); - unsafe { CredGetTargetInfoW(targetname.param().abi(), flags, core::mem::transmute(targetinfo)).ok() } + unsafe { CredGetTargetInfoW(targetname.param().abi(), flags, targetinfo as _).ok() } } #[inline] pub unsafe fn CredIsMarshaledCredentialA(marshaledcredential: P0) -> super::super::Foundation::BOOL @@ -94,7 +94,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn CredIsProtectedA(pszprotectedcredentials : windows_core::PCSTR, pprotectiontype : *mut CRED_PROTECTION_TYPE) -> super::super::Foundation:: BOOL); - unsafe { CredIsProtectedA(pszprotectedcredentials.param().abi(), core::mem::transmute(pprotectiontype)).ok() } + unsafe { CredIsProtectedA(pszprotectedcredentials.param().abi(), pprotectiontype as _).ok() } } #[inline] pub unsafe fn CredIsProtectedW(pszprotectedcredentials: P0, pprotectiontype: *mut CRED_PROTECTION_TYPE) -> windows_core::Result<()> @@ -102,17 +102,17 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn CredIsProtectedW(pszprotectedcredentials : windows_core::PCWSTR, pprotectiontype : *mut CRED_PROTECTION_TYPE) -> super::super::Foundation:: BOOL); - unsafe { CredIsProtectedW(pszprotectedcredentials.param().abi(), core::mem::transmute(pprotectiontype)).ok() } + unsafe { CredIsProtectedW(pszprotectedcredentials.param().abi(), pprotectiontype as _).ok() } } #[inline] pub unsafe fn CredMarshalCredentialA(credtype: CRED_MARSHAL_TYPE, credential: *const core::ffi::c_void, marshaledcredential: *mut windows_core::PSTR) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn CredMarshalCredentialA(credtype : CRED_MARSHAL_TYPE, credential : *const core::ffi::c_void, marshaledcredential : *mut windows_core::PSTR) -> super::super::Foundation:: BOOL); - unsafe { CredMarshalCredentialA(credtype, credential, core::mem::transmute(marshaledcredential)).ok() } + unsafe { CredMarshalCredentialA(credtype, credential, marshaledcredential as _).ok() } } #[inline] pub unsafe fn CredMarshalCredentialW(credtype: CRED_MARSHAL_TYPE, credential: *const core::ffi::c_void, marshaledcredential: *mut windows_core::PWSTR) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn CredMarshalCredentialW(credtype : CRED_MARSHAL_TYPE, credential : *const core::ffi::c_void, marshaledcredential : *mut windows_core::PWSTR) -> super::super::Foundation:: BOOL); - unsafe { CredMarshalCredentialW(credtype, credential, core::mem::transmute(marshaledcredential)).ok() } + unsafe { CredMarshalCredentialW(credtype, credential, marshaledcredential as _).ok() } } #[inline] pub unsafe fn CredPackAuthenticationBufferA(dwflags: CRED_PACK_FLAGS, pszusername: P1, pszpassword: P2, ppackedcredentials: Option<*mut u8>, pcbpackedcredentials: *mut u32) -> 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); - unsafe { CredPackAuthenticationBufferA(dwflags, pszusername.param().abi(), pszpassword.param().abi(), core::mem::transmute(ppackedcredentials.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbpackedcredentials)).ok() } + unsafe { CredPackAuthenticationBufferA(dwflags, pszusername.param().abi(), pszpassword.param().abi(), ppackedcredentials.unwrap_or(core::mem::zeroed()) as _, pcbpackedcredentials as _).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,17 +130,17 @@ 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); - unsafe { CredPackAuthenticationBufferW(dwflags, pszusername.param().abi(), pszpassword.param().abi(), core::mem::transmute(ppackedcredentials.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbpackedcredentials)).ok() } + unsafe { CredPackAuthenticationBufferW(dwflags, pszusername.param().abi(), pszpassword.param().abi(), ppackedcredentials.unwrap_or(core::mem::zeroed()) as _, pcbpackedcredentials as _).ok() } } #[inline] pub unsafe fn CredProtectA(fasself: bool, pszcredentials: &[u8], pszprotectedcredentials: windows_core::PSTR, pcchmaxchars: *mut u32, protectiontype: Option<*mut CRED_PROTECTION_TYPE>) -> windows_core::Result<()> { 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); - unsafe { CredProtectA(fasself.into(), 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() } + unsafe { CredProtectA(fasself.into(), core::mem::transmute(pszcredentials.as_ptr()), pszcredentials.len().try_into().unwrap(), core::mem::transmute(pszprotectedcredentials), pcchmaxchars as _, protectiontype.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CredProtectW(fasself: bool, pszcredentials: &[u16], pszprotectedcredentials: windows_core::PWSTR, pcchmaxchars: *mut u32, protectiontype: Option<*mut CRED_PROTECTION_TYPE>) -> windows_core::Result<()> { 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); - unsafe { CredProtectW(fasself.into(), 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() } + unsafe { CredProtectW(fasself.into(), core::mem::transmute(pszcredentials.as_ptr()), pszcredentials.len().try_into().unwrap(), core::mem::transmute(pszprotectedcredentials), pcchmaxchars as _, protectiontype.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CredReadA(targetname: P0, r#type: CRED_TYPE, flags: Option, credential: *mut *mut CREDENTIALA) -> windows_core::Result<()> @@ -148,17 +148,17 @@ 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); - unsafe { CredReadA(targetname.param().abi(), r#type, core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(credential)).ok() } + unsafe { CredReadA(targetname.param().abi(), r#type, flags.unwrap_or(core::mem::zeroed()) as _, credential as _).ok() } } #[inline] pub unsafe fn CredReadDomainCredentialsA(targetinfo: *const CREDENTIAL_TARGET_INFORMATIONA, flags: u32, count: *mut u32, credential: *mut *mut *mut CREDENTIALA) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn CredReadDomainCredentialsA(targetinfo : *const CREDENTIAL_TARGET_INFORMATIONA, flags : u32, count : *mut u32, credential : *mut *mut *mut CREDENTIALA) -> super::super::Foundation:: BOOL); - unsafe { CredReadDomainCredentialsA(targetinfo, flags, core::mem::transmute(count), core::mem::transmute(credential)).ok() } + unsafe { CredReadDomainCredentialsA(targetinfo, flags, count as _, credential as _).ok() } } #[inline] pub unsafe fn CredReadDomainCredentialsW(targetinfo: *const CREDENTIAL_TARGET_INFORMATIONW, flags: u32, count: *mut u32, credential: *mut *mut *mut CREDENTIALW) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn CredReadDomainCredentialsW(targetinfo : *const CREDENTIAL_TARGET_INFORMATIONW, flags : u32, count : *mut u32, credential : *mut *mut *mut CREDENTIALW) -> super::super::Foundation:: BOOL); - unsafe { CredReadDomainCredentialsW(targetinfo, flags, core::mem::transmute(count), core::mem::transmute(credential)).ok() } + unsafe { CredReadDomainCredentialsW(targetinfo, flags, count as _, credential as _).ok() } } #[inline] pub unsafe fn CredReadW(targetname: P0, r#type: CRED_TYPE, flags: Option, credential: *mut *mut CREDENTIALW) -> windows_core::Result<()> @@ -166,7 +166,7 @@ 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); - unsafe { CredReadW(targetname.param().abi(), r#type, core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(credential)).ok() } + unsafe { CredReadW(targetname.param().abi(), r#type, flags.unwrap_or(core::mem::zeroed()) as _, credential as _).ok() } } #[inline] pub unsafe fn CredRenameA(oldtargetname: P0, newtargetname: P1, r#type: CRED_TYPE, flags: Option) -> windows_core::Result<()> @@ -175,7 +175,7 @@ where 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); - unsafe { CredRenameA(oldtargetname.param().abi(), newtargetname.param().abi(), r#type, core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CredRenameA(oldtargetname.param().abi(), newtargetname.param().abi(), r#type, flags.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CredRenameW(oldtargetname: P0, newtargetname: P1, r#type: CRED_TYPE, flags: Option) -> windows_core::Result<()> @@ -184,7 +184,7 @@ where 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); - unsafe { CredRenameW(oldtargetname.param().abi(), newtargetname.param().abi(), r#type, core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CredRenameW(oldtargetname.param().abi(), newtargetname.param().abi(), r#type, flags.unwrap_or(core::mem::zeroed()) as _).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 @@ -192,7 +192,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); - unsafe { CredUICmdLinePromptForCredentialsA(psztargetname.param().abi(), core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed())), 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())), dwflags) } + unsafe { CredUICmdLinePromptForCredentialsA(psztargetname.param().abi(), pcontext.unwrap_or(core::mem::zeroed()) as _, dwautherror, core::mem::transmute(username.as_ptr()), username.len().try_into().unwrap(), core::mem::transmute(pszpassword.as_ptr()), pszpassword.len().try_into().unwrap(), pfsave.unwrap_or(core::mem::zeroed()) as _, 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 @@ -200,7 +200,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); - unsafe { CredUICmdLinePromptForCredentialsW(psztargetname.param().abi(), core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed())), 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())), dwflags) } + unsafe { CredUICmdLinePromptForCredentialsW(psztargetname.param().abi(), pcontext.unwrap_or(core::mem::zeroed()) as _, dwautherror, core::mem::transmute(username.as_ptr()), username.len().try_into().unwrap(), core::mem::transmute(pszpassword.as_ptr()), pszpassword.len().try_into().unwrap(), pfsave.unwrap_or(core::mem::zeroed()) as _, dwflags) } } #[inline] pub unsafe fn CredUIConfirmCredentialsA(psztargetname: P0, bconfirm: bool) -> u32 @@ -241,7 +241,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); - unsafe { CredUIPromptForCredentialsA(core::mem::transmute(puiinfo.unwrap_or(core::mem::zeroed())), psztargetname.param().abi(), core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed())), 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())), dwflags) } + unsafe { CredUIPromptForCredentialsA(puiinfo.unwrap_or(core::mem::zeroed()) as _, psztargetname.param().abi(), pcontext.unwrap_or(core::mem::zeroed()) as _, dwautherror, core::mem::transmute(pszusername.as_ptr()), pszusername.len().try_into().unwrap(), core::mem::transmute(pszpassword.as_ptr()), pszpassword.len().try_into().unwrap(), save.unwrap_or(core::mem::zeroed()) as _, dwflags) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -250,19 +250,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); - unsafe { CredUIPromptForCredentialsW(core::mem::transmute(puiinfo.unwrap_or(core::mem::zeroed())), psztargetname.param().abi(), core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed())), 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())), dwflags) } + unsafe { CredUIPromptForCredentialsW(puiinfo.unwrap_or(core::mem::zeroed()) as _, psztargetname.param().abi(), pcontext.unwrap_or(core::mem::zeroed()) as _, dwautherror, core::mem::transmute(pszusername.as_ptr()), pszusername.len().try_into().unwrap(), core::mem::transmute(pszpassword.as_ptr()), pszpassword.len().try_into().unwrap(), save.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { CredUIPromptForWindowsCredentialsA(core::mem::transmute(puiinfo.unwrap_or(core::mem::zeroed())), dwautherror, core::mem::transmute(pulauthpackage), core::mem::transmute(pvinauthbuffer.unwrap_or(core::mem::zeroed())), ulinauthbuffersize, core::mem::transmute(ppvoutauthbuffer), core::mem::transmute(puloutauthbuffersize), core::mem::transmute(pfsave.unwrap_or(core::mem::zeroed())), dwflags) } + unsafe { CredUIPromptForWindowsCredentialsA(puiinfo.unwrap_or(core::mem::zeroed()) as _, dwautherror, pulauthpackage as _, pvinauthbuffer.unwrap_or(core::mem::zeroed()) as _, ulinauthbuffersize, ppvoutauthbuffer as _, puloutauthbuffersize as _, pfsave.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { CredUIPromptForWindowsCredentialsW(core::mem::transmute(puiinfo.unwrap_or(core::mem::zeroed())), dwautherror, core::mem::transmute(pulauthpackage), core::mem::transmute(pvinauthbuffer.unwrap_or(core::mem::zeroed())), ulinauthbuffersize, core::mem::transmute(ppvoutauthbuffer), core::mem::transmute(puloutauthbuffersize), core::mem::transmute(pfsave.unwrap_or(core::mem::zeroed())), dwflags) } + unsafe { CredUIPromptForWindowsCredentialsW(puiinfo.unwrap_or(core::mem::zeroed()) as _, dwautherror, pulauthpackage as _, pvinauthbuffer.unwrap_or(core::mem::zeroed()) as _, ulinauthbuffersize, ppvoutauthbuffer as _, puloutauthbuffersize as _, pfsave.unwrap_or(core::mem::zeroed()) as _, dwflags) } } #[inline] pub unsafe fn CredUIReadSSOCredW(pszrealm: P0, ppszusername: *mut windows_core::PWSTR) -> u32 @@ -270,7 +270,7 @@ where P0: windows_core::Param, { windows_targets::link!("credui.dll" "system" fn CredUIReadSSOCredW(pszrealm : windows_core::PCWSTR, ppszusername : *mut windows_core::PWSTR) -> u32); - unsafe { CredUIReadSSOCredW(pszrealm.param().abi(), core::mem::transmute(ppszusername)) } + unsafe { CredUIReadSSOCredW(pszrealm.param().abi(), ppszusername as _) } } #[inline] pub unsafe fn CredUIStoreSSOCredW(pszrealm: P0, pszusername: P1, pszpassword: P2, bpersist: bool) -> u32 @@ -285,12 +285,12 @@ where #[inline] 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); - unsafe { CredUnPackAuthenticationBufferA(dwflags, pauthbuffer, 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() } + unsafe { CredUnPackAuthenticationBufferA(dwflags, pauthbuffer, cbauthbuffer, pszusername.unwrap_or(core::mem::zeroed()) as _, pcchlmaxusername as _, pszdomainname.unwrap_or(core::mem::zeroed()) as _, pcchmaxdomainname.unwrap_or(core::mem::zeroed()) as _, pszpassword.unwrap_or(core::mem::zeroed()) as _, pcchmaxpassword as _).ok() } } #[inline] 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); - unsafe { CredUnPackAuthenticationBufferW(dwflags, pauthbuffer, 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() } + unsafe { CredUnPackAuthenticationBufferW(dwflags, pauthbuffer, cbauthbuffer, pszusername.unwrap_or(core::mem::zeroed()) as _, pcchmaxusername as _, pszdomainname.unwrap_or(core::mem::zeroed()) as _, pcchmaxdomainname.unwrap_or(core::mem::zeroed()) as _, pszpassword.unwrap_or(core::mem::zeroed()) as _, pcchmaxpassword as _).ok() } } #[inline] pub unsafe fn CredUnmarshalCredentialA(marshaledcredential: P0, credtype: *mut CRED_MARSHAL_TYPE, credential: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -298,7 +298,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn CredUnmarshalCredentialA(marshaledcredential : windows_core::PCSTR, credtype : *mut CRED_MARSHAL_TYPE, credential : *mut *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { CredUnmarshalCredentialA(marshaledcredential.param().abi(), core::mem::transmute(credtype), core::mem::transmute(credential)).ok() } + unsafe { CredUnmarshalCredentialA(marshaledcredential.param().abi(), credtype as _, credential as _).ok() } } #[inline] pub unsafe fn CredUnmarshalCredentialW(marshaledcredential: P0, credtype: *mut CRED_MARSHAL_TYPE, credential: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -306,17 +306,17 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn CredUnmarshalCredentialW(marshaledcredential : windows_core::PCWSTR, credtype : *mut CRED_MARSHAL_TYPE, credential : *mut *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { CredUnmarshalCredentialW(marshaledcredential.param().abi(), core::mem::transmute(credtype), core::mem::transmute(credential)).ok() } + unsafe { CredUnmarshalCredentialW(marshaledcredential.param().abi(), credtype as _, credential as _).ok() } } #[inline] pub unsafe fn CredUnprotectA(fasself: bool, pszprotectedcredentials: &[u8], pszcredentials: Option, pcchmaxchars: *mut u32) -> windows_core::Result<()> { 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); - unsafe { CredUnprotectA(fasself.into(), 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() } + unsafe { CredUnprotectA(fasself.into(), core::mem::transmute(pszprotectedcredentials.as_ptr()), pszprotectedcredentials.len().try_into().unwrap(), pszcredentials.unwrap_or(core::mem::zeroed()) as _, pcchmaxchars as _).ok() } } #[inline] pub unsafe fn CredUnprotectW(fasself: bool, pszprotectedcredentials: &[u16], pszcredentials: Option, pcchmaxchars: *mut u32) -> windows_core::Result<()> { 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); - unsafe { CredUnprotectW(fasself.into(), 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() } + unsafe { CredUnprotectW(fasself.into(), core::mem::transmute(pszprotectedcredentials.as_ptr()), pszprotectedcredentials.len().try_into().unwrap(), pszcredentials.unwrap_or(core::mem::zeroed()) as _, pcchmaxchars as _).ok() } } #[inline] pub unsafe fn CredWriteA(credential: *const CREDENTIALA, flags: u32) -> windows_core::Result<()> { @@ -341,12 +341,12 @@ pub unsafe fn CredWriteW(credential: *const CREDENTIALW, flags: u32) -> windows_ #[inline] pub unsafe fn GetOpenCardNameA(param0: *mut OPENCARDNAMEA) -> i32 { windows_targets::link!("scarddlg.dll" "system" fn GetOpenCardNameA(param0 : *mut OPENCARDNAMEA) -> i32); - unsafe { GetOpenCardNameA(core::mem::transmute(param0)) } + unsafe { GetOpenCardNameA(param0 as _) } } #[inline] pub unsafe fn GetOpenCardNameW(param0: *mut OPENCARDNAMEW) -> i32 { windows_targets::link!("scarddlg.dll" "system" fn GetOpenCardNameW(param0 : *mut OPENCARDNAMEW) -> i32); - unsafe { GetOpenCardNameW(core::mem::transmute(param0)) } + unsafe { GetOpenCardNameW(param0 as _) } } #[inline] pub unsafe fn KeyCredentialManagerFreeInformation(keycredentialmanagerinfo: *const KeyCredentialManagerInfo) { @@ -364,7 +364,7 @@ pub unsafe fn KeyCredentialManagerGetInformation() -> windows_core::Result<*mut #[inline] pub unsafe fn KeyCredentialManagerGetOperationErrorStates(keycredentialmanageroperationtype: KeyCredentialManagerOperationType, isready: *mut super::super::Foundation::BOOL, keycredentialmanageroperationerrorstates: *mut KeyCredentialManagerOperationErrorStates) -> windows_core::Result<()> { windows_targets::link!("keycredmgr.dll" "system" fn KeyCredentialManagerGetOperationErrorStates(keycredentialmanageroperationtype : KeyCredentialManagerOperationType, isready : *mut super::super::Foundation:: BOOL, keycredentialmanageroperationerrorstates : *mut KeyCredentialManagerOperationErrorStates) -> windows_core::HRESULT); - unsafe { KeyCredentialManagerGetOperationErrorStates(keycredentialmanageroperationtype, core::mem::transmute(isready), core::mem::transmute(keycredentialmanageroperationerrorstates)).ok() } + unsafe { KeyCredentialManagerGetOperationErrorStates(keycredentialmanageroperationtype, isready as _, keycredentialmanageroperationerrorstates as _).ok() } } #[inline] pub unsafe fn KeyCredentialManagerShowUIOperation(hwndowner: super::super::Foundation::HWND, keycredentialmanageroperationtype: KeyCredentialManagerOperationType) -> windows_core::Result<()> { @@ -416,7 +416,7 @@ where P1: windows_core::Param, { windows_targets::link!("winscard.dll" "system" fn SCardConnectA(hcontext : usize, szreader : windows_core::PCSTR, dwsharemode : u32, dwpreferredprotocols : u32, phcard : *mut usize, pdwactiveprotocol : *mut u32) -> i32); - unsafe { SCardConnectA(hcontext, szreader.param().abi(), dwsharemode, dwpreferredprotocols, core::mem::transmute(phcard), core::mem::transmute(pdwactiveprotocol)) } + unsafe { SCardConnectA(hcontext, szreader.param().abi(), dwsharemode, dwpreferredprotocols, phcard as _, pdwactiveprotocol as _) } } #[inline] pub unsafe fn SCardConnectW(hcontext: usize, szreader: P1, dwsharemode: u32, dwpreferredprotocols: u32, phcard: *mut usize, pdwactiveprotocol: *mut u32) -> i32 @@ -424,12 +424,12 @@ where P1: windows_core::Param, { windows_targets::link!("winscard.dll" "system" fn SCardConnectW(hcontext : usize, szreader : windows_core::PCWSTR, dwsharemode : u32, dwpreferredprotocols : u32, phcard : *mut usize, pdwactiveprotocol : *mut u32) -> i32); - unsafe { SCardConnectW(hcontext, szreader.param().abi(), dwsharemode, dwpreferredprotocols, core::mem::transmute(phcard), core::mem::transmute(pdwactiveprotocol)) } + unsafe { SCardConnectW(hcontext, szreader.param().abi(), dwsharemode, dwpreferredprotocols, phcard as _, pdwactiveprotocol as _) } } #[inline] pub unsafe fn SCardControl(hcard: usize, dwcontrolcode: u32, lpinbuffer: *const core::ffi::c_void, cbinbuffersize: u32, lpoutbuffer: *mut core::ffi::c_void, cboutbuffersize: u32, lpbytesreturned: *mut u32) -> i32 { windows_targets::link!("winscard.dll" "system" fn SCardControl(hcard : usize, dwcontrolcode : u32, lpinbuffer : *const core::ffi::c_void, cbinbuffersize : u32, lpoutbuffer : *mut core::ffi::c_void, cboutbuffersize : u32, lpbytesreturned : *mut u32) -> i32); - unsafe { SCardControl(hcard, dwcontrolcode, lpinbuffer, cbinbuffersize, core::mem::transmute(lpoutbuffer), cboutbuffersize, core::mem::transmute(lpbytesreturned)) } + unsafe { SCardControl(hcard, dwcontrolcode, lpinbuffer, cbinbuffersize, lpoutbuffer as _, cboutbuffersize, lpbytesreturned as _) } } #[inline] pub unsafe fn SCardDisconnect(hcard: usize, dwdisposition: u32) -> i32 { @@ -449,7 +449,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); - unsafe { SCardEstablishContext(dwscope, core::mem::transmute(pvreserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved2.unwrap_or(core::mem::zeroed())), core::mem::transmute(phcontext)) } + unsafe { SCardEstablishContext(dwscope, pvreserved1.unwrap_or(core::mem::zeroed()) as _, pvreserved2.unwrap_or(core::mem::zeroed()) as _, phcontext as _) } } #[inline] pub unsafe fn SCardForgetCardTypeA(hcontext: usize, szcardname: P1) -> i32 @@ -507,7 +507,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); - unsafe { SCardGetAttrib(hcard, dwattrid, core::mem::transmute(pbattr.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbattrlen)) } + unsafe { SCardGetAttrib(hcard, dwattrid, pbattr.unwrap_or(core::mem::zeroed()) as _, pcbattrlen as _) } } #[inline] pub unsafe fn SCardGetCardTypeProviderNameA(hcontext: usize, szcardname: P1, dwproviderid: u32, szprovider: windows_core::PSTR, pcchprovider: *mut u32) -> i32 @@ -515,7 +515,7 @@ where P1: windows_core::Param, { windows_targets::link!("winscard.dll" "system" fn SCardGetCardTypeProviderNameA(hcontext : usize, szcardname : windows_core::PCSTR, dwproviderid : u32, szprovider : windows_core::PSTR, pcchprovider : *mut u32) -> i32); - unsafe { SCardGetCardTypeProviderNameA(hcontext, szcardname.param().abi(), dwproviderid, core::mem::transmute(szprovider), core::mem::transmute(pcchprovider)) } + unsafe { SCardGetCardTypeProviderNameA(hcontext, szcardname.param().abi(), dwproviderid, core::mem::transmute(szprovider), pcchprovider as _) } } #[inline] pub unsafe fn SCardGetCardTypeProviderNameW(hcontext: usize, szcardname: P1, dwproviderid: u32, szprovider: windows_core::PWSTR, pcchprovider: *mut u32) -> i32 @@ -523,7 +523,7 @@ where P1: windows_core::Param, { windows_targets::link!("winscard.dll" "system" fn SCardGetCardTypeProviderNameW(hcontext : usize, szcardname : windows_core::PCWSTR, dwproviderid : u32, szprovider : windows_core::PWSTR, pcchprovider : *mut u32) -> i32); - unsafe { SCardGetCardTypeProviderNameW(hcontext, szcardname.param().abi(), dwproviderid, core::mem::transmute(szprovider), core::mem::transmute(pcchprovider)) } + unsafe { SCardGetCardTypeProviderNameW(hcontext, szcardname.param().abi(), dwproviderid, core::mem::transmute(szprovider), pcchprovider as _) } } #[inline] pub unsafe fn SCardGetDeviceTypeIdA(hcontext: usize, szreadername: P1, pdwdevicetypeid: *mut u32) -> i32 @@ -531,7 +531,7 @@ where P1: windows_core::Param, { windows_targets::link!("winscard.dll" "system" fn SCardGetDeviceTypeIdA(hcontext : usize, szreadername : windows_core::PCSTR, pdwdevicetypeid : *mut u32) -> i32); - unsafe { SCardGetDeviceTypeIdA(hcontext, szreadername.param().abi(), core::mem::transmute(pdwdevicetypeid)) } + unsafe { SCardGetDeviceTypeIdA(hcontext, szreadername.param().abi(), pdwdevicetypeid as _) } } #[inline] pub unsafe fn SCardGetDeviceTypeIdW(hcontext: usize, szreadername: P1, pdwdevicetypeid: *mut u32) -> i32 @@ -539,7 +539,7 @@ where P1: windows_core::Param, { windows_targets::link!("winscard.dll" "system" fn SCardGetDeviceTypeIdW(hcontext : usize, szreadername : windows_core::PCWSTR, pdwdevicetypeid : *mut u32) -> i32); - unsafe { SCardGetDeviceTypeIdW(hcontext, szreadername.param().abi(), core::mem::transmute(pdwdevicetypeid)) } + unsafe { SCardGetDeviceTypeIdW(hcontext, szreadername.param().abi(), pdwdevicetypeid as _) } } #[inline] pub unsafe fn SCardGetProviderIdA(hcontext: usize, szcard: P1, pguidproviderid: *mut windows_core::GUID) -> i32 @@ -547,7 +547,7 @@ where P1: windows_core::Param, { windows_targets::link!("winscard.dll" "system" fn SCardGetProviderIdA(hcontext : usize, szcard : windows_core::PCSTR, pguidproviderid : *mut windows_core::GUID) -> i32); - unsafe { SCardGetProviderIdA(hcontext, szcard.param().abi(), core::mem::transmute(pguidproviderid)) } + unsafe { SCardGetProviderIdA(hcontext, szcard.param().abi(), pguidproviderid as _) } } #[inline] pub unsafe fn SCardGetProviderIdW(hcontext: usize, szcard: P1, pguidproviderid: *mut windows_core::GUID) -> i32 @@ -555,7 +555,7 @@ where P1: windows_core::Param, { windows_targets::link!("winscard.dll" "system" fn SCardGetProviderIdW(hcontext : usize, szcard : windows_core::PCWSTR, pguidproviderid : *mut windows_core::GUID) -> i32); - unsafe { SCardGetProviderIdW(hcontext, szcard.param().abi(), core::mem::transmute(pguidproviderid)) } + unsafe { SCardGetProviderIdW(hcontext, szcard.param().abi(), pguidproviderid as _) } } #[inline] pub unsafe fn SCardGetReaderDeviceInstanceIdA(hcontext: usize, szreadername: P1, szdeviceinstanceid: Option, pcchdeviceinstanceid: *mut u32) -> i32 @@ -563,7 +563,7 @@ 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); - unsafe { SCardGetReaderDeviceInstanceIdA(hcontext, szreadername.param().abi(), core::mem::transmute(szdeviceinstanceid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchdeviceinstanceid)) } + unsafe { SCardGetReaderDeviceInstanceIdA(hcontext, szreadername.param().abi(), szdeviceinstanceid.unwrap_or(core::mem::zeroed()) as _, pcchdeviceinstanceid as _) } } #[inline] pub unsafe fn SCardGetReaderDeviceInstanceIdW(hcontext: usize, szreadername: P1, szdeviceinstanceid: Option, pcchdeviceinstanceid: *mut u32) -> i32 @@ -571,7 +571,7 @@ 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); - unsafe { SCardGetReaderDeviceInstanceIdW(hcontext, szreadername.param().abi(), core::mem::transmute(szdeviceinstanceid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchdeviceinstanceid)) } + unsafe { SCardGetReaderDeviceInstanceIdW(hcontext, szreadername.param().abi(), szdeviceinstanceid.unwrap_or(core::mem::zeroed()) as _, pcchdeviceinstanceid as _) } } #[inline] pub unsafe fn SCardGetReaderIconA(hcontext: usize, szreadername: P1, pbicon: *mut u8, pcbicon: *mut u32) -> i32 @@ -579,7 +579,7 @@ where P1: windows_core::Param, { windows_targets::link!("winscard.dll" "system" fn SCardGetReaderIconA(hcontext : usize, szreadername : windows_core::PCSTR, pbicon : *mut u8, pcbicon : *mut u32) -> i32); - unsafe { SCardGetReaderIconA(hcontext, szreadername.param().abi(), core::mem::transmute(pbicon), core::mem::transmute(pcbicon)) } + unsafe { SCardGetReaderIconA(hcontext, szreadername.param().abi(), pbicon as _, pcbicon as _) } } #[inline] pub unsafe fn SCardGetReaderIconW(hcontext: usize, szreadername: P1, pbicon: *mut u8, pcbicon: *mut u32) -> i32 @@ -587,22 +587,22 @@ where P1: windows_core::Param, { windows_targets::link!("winscard.dll" "system" fn SCardGetReaderIconW(hcontext : usize, szreadername : windows_core::PCWSTR, pbicon : *mut u8, pcbicon : *mut u32) -> i32); - unsafe { SCardGetReaderIconW(hcontext, szreadername.param().abi(), core::mem::transmute(pbicon), core::mem::transmute(pcbicon)) } + unsafe { SCardGetReaderIconW(hcontext, szreadername.param().abi(), pbicon as _, pcbicon as _) } } #[inline] pub unsafe fn SCardGetStatusChangeA(hcontext: usize, dwtimeout: u32, rgreaderstates: *mut SCARD_READERSTATEA, creaders: u32) -> i32 { windows_targets::link!("winscard.dll" "system" fn SCardGetStatusChangeA(hcontext : usize, dwtimeout : u32, rgreaderstates : *mut SCARD_READERSTATEA, creaders : u32) -> i32); - unsafe { SCardGetStatusChangeA(hcontext, dwtimeout, core::mem::transmute(rgreaderstates), creaders) } + unsafe { SCardGetStatusChangeA(hcontext, dwtimeout, rgreaderstates as _, creaders) } } #[inline] pub unsafe fn SCardGetStatusChangeW(hcontext: usize, dwtimeout: u32, rgreaderstates: *mut SCARD_READERSTATEW, creaders: u32) -> i32 { windows_targets::link!("winscard.dll" "system" fn SCardGetStatusChangeW(hcontext : usize, dwtimeout : u32, rgreaderstates : *mut SCARD_READERSTATEW, creaders : u32) -> i32); - unsafe { SCardGetStatusChangeW(hcontext, dwtimeout, core::mem::transmute(rgreaderstates), creaders) } + unsafe { SCardGetStatusChangeW(hcontext, dwtimeout, rgreaderstates as _, creaders) } } #[inline] pub unsafe fn SCardGetTransmitCount(hcard: usize, pctransmitcount: *mut u32) -> i32 { windows_targets::link!("winscard.dll" "system" fn SCardGetTransmitCount(hcard : usize, pctransmitcount : *mut u32) -> i32); - unsafe { SCardGetTransmitCount(hcard, core::mem::transmute(pctransmitcount)) } + unsafe { SCardGetTransmitCount(hcard, pctransmitcount as _) } } #[inline] pub unsafe fn SCardIntroduceCardTypeA(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 @@ -610,7 +610,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); - unsafe { SCardIntroduceCardTypeA(hcontext, szcardname.param().abi(), core::mem::transmute(pguidprimaryprovider.unwrap_or(core::mem::zeroed())), core::mem::transmute(rgguidinterfaces.unwrap_or(core::mem::zeroed())), dwinterfacecount, pbatr, pbatrmask, cbatrlen) } + unsafe { SCardIntroduceCardTypeA(hcontext, szcardname.param().abi(), pguidprimaryprovider.unwrap_or(core::mem::zeroed()) as _, rgguidinterfaces.unwrap_or(core::mem::zeroed()) as _, dwinterfacecount, pbatr, pbatrmask, 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 @@ -618,7 +618,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); - unsafe { SCardIntroduceCardTypeW(hcontext, szcardname.param().abi(), core::mem::transmute(pguidprimaryprovider.unwrap_or(core::mem::zeroed())), core::mem::transmute(rgguidinterfaces.unwrap_or(core::mem::zeroed())), dwinterfacecount, pbatr, pbatrmask, cbatrlen) } + unsafe { SCardIntroduceCardTypeW(hcontext, szcardname.param().abi(), pguidprimaryprovider.unwrap_or(core::mem::zeroed()) as _, rgguidinterfaces.unwrap_or(core::mem::zeroed()) as _, dwinterfacecount, pbatr, pbatrmask, cbatrlen) } } #[inline] pub unsafe fn SCardIntroduceReaderA(hcontext: usize, szreadername: P1, szdevicename: P2) -> i32 @@ -662,12 +662,12 @@ pub unsafe fn SCardIsValidContext(hcontext: usize) -> i32 { #[inline] pub unsafe fn SCardListCardsA(hcontext: usize, pbatr: Option<*const u8>, rgquidinterfaces: Option<&[windows_core::GUID]>, mszcards: 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); - unsafe { SCardListCardsA(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)) } + unsafe { SCardListCardsA(hcontext, pbatr.unwrap_or(core::mem::zeroed()) as _, 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()), mszcards.unwrap_or(core::mem::zeroed()) as _, pcchcards as _) } } #[inline] 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); - unsafe { SCardListCardsW(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)) } + unsafe { SCardListCardsW(hcontext, pbatr.unwrap_or(core::mem::zeroed()) as _, 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()), mszcards.unwrap_or(core::mem::zeroed()) as _, pcchcards as _) } } #[inline] pub unsafe fn SCardListInterfacesA(hcontext: usize, szcard: P1, pguidinterfaces: *mut windows_core::GUID, pcguidinterfaces: *mut u32) -> i32 @@ -675,7 +675,7 @@ where P1: windows_core::Param, { windows_targets::link!("winscard.dll" "system" fn SCardListInterfacesA(hcontext : usize, szcard : windows_core::PCSTR, pguidinterfaces : *mut windows_core::GUID, pcguidinterfaces : *mut u32) -> i32); - unsafe { SCardListInterfacesA(hcontext, szcard.param().abi(), core::mem::transmute(pguidinterfaces), core::mem::transmute(pcguidinterfaces)) } + unsafe { SCardListInterfacesA(hcontext, szcard.param().abi(), pguidinterfaces as _, pcguidinterfaces as _) } } #[inline] pub unsafe fn SCardListInterfacesW(hcontext: usize, szcard: P1, pguidinterfaces: *mut windows_core::GUID, pcguidinterfaces: *mut u32) -> i32 @@ -683,17 +683,17 @@ where P1: windows_core::Param, { windows_targets::link!("winscard.dll" "system" fn SCardListInterfacesW(hcontext : usize, szcard : windows_core::PCWSTR, pguidinterfaces : *mut windows_core::GUID, pcguidinterfaces : *mut u32) -> i32); - unsafe { SCardListInterfacesW(hcontext, szcard.param().abi(), core::mem::transmute(pguidinterfaces), core::mem::transmute(pcguidinterfaces)) } + unsafe { SCardListInterfacesW(hcontext, szcard.param().abi(), pguidinterfaces as _, pcguidinterfaces as _) } } #[inline] 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); - unsafe { SCardListReaderGroupsA(hcontext, core::mem::transmute(mszgroups.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchgroups)) } + unsafe { SCardListReaderGroupsA(hcontext, mszgroups.unwrap_or(core::mem::zeroed()) as _, pcchgroups as _) } } #[inline] 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); - unsafe { SCardListReaderGroupsW(hcontext, core::mem::transmute(mszgroups.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchgroups)) } + unsafe { SCardListReaderGroupsW(hcontext, mszgroups.unwrap_or(core::mem::zeroed()) as _, pcchgroups as _) } } #[inline] pub unsafe fn SCardListReadersA(hcontext: usize, mszgroups: P1, mszreaders: Option, pcchreaders: *mut u32) -> i32 @@ -701,7 +701,7 @@ 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); - unsafe { SCardListReadersA(hcontext, mszgroups.param().abi(), core::mem::transmute(mszreaders.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchreaders)) } + unsafe { SCardListReadersA(hcontext, mszgroups.param().abi(), mszreaders.unwrap_or(core::mem::zeroed()) as _, pcchreaders as _) } } #[inline] pub unsafe fn SCardListReadersW(hcontext: usize, mszgroups: P1, mszreaders: Option, pcchreaders: *mut u32) -> i32 @@ -709,7 +709,7 @@ 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); - unsafe { SCardListReadersW(hcontext, mszgroups.param().abi(), core::mem::transmute(mszreaders.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchreaders)) } + unsafe { SCardListReadersW(hcontext, mszgroups.param().abi(), mszreaders.unwrap_or(core::mem::zeroed()) as _, pcchreaders as _) } } #[inline] pub unsafe fn SCardListReadersWithDeviceInstanceIdA(hcontext: usize, szdeviceinstanceid: P1, mszreaders: Option, pcchreaders: *mut u32) -> i32 @@ -717,7 +717,7 @@ 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); - unsafe { SCardListReadersWithDeviceInstanceIdA(hcontext, szdeviceinstanceid.param().abi(), core::mem::transmute(mszreaders.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchreaders)) } + unsafe { SCardListReadersWithDeviceInstanceIdA(hcontext, szdeviceinstanceid.param().abi(), mszreaders.unwrap_or(core::mem::zeroed()) as _, pcchreaders as _) } } #[inline] pub unsafe fn SCardListReadersWithDeviceInstanceIdW(hcontext: usize, szdeviceinstanceid: P1, mszreaders: Option, pcchreaders: *mut u32) -> i32 @@ -725,7 +725,7 @@ 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); - unsafe { SCardListReadersWithDeviceInstanceIdW(hcontext, szdeviceinstanceid.param().abi(), core::mem::transmute(mszreaders.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchreaders)) } + unsafe { SCardListReadersWithDeviceInstanceIdW(hcontext, szdeviceinstanceid.param().abi(), mszreaders.unwrap_or(core::mem::zeroed()) as _, pcchreaders as _) } } #[inline] pub unsafe fn SCardLocateCardsA(hcontext: usize, mszcards: P1, rgreaderstates: *mut SCARD_READERSTATEA, creaders: u32) -> i32 @@ -733,17 +733,17 @@ where P1: windows_core::Param, { windows_targets::link!("winscard.dll" "system" fn SCardLocateCardsA(hcontext : usize, mszcards : windows_core::PCSTR, rgreaderstates : *mut SCARD_READERSTATEA, creaders : u32) -> i32); - unsafe { SCardLocateCardsA(hcontext, mszcards.param().abi(), core::mem::transmute(rgreaderstates), creaders) } + unsafe { SCardLocateCardsA(hcontext, mszcards.param().abi(), rgreaderstates as _, creaders) } } #[inline] pub unsafe fn SCardLocateCardsByATRA(hcontext: usize, rgatrmasks: *const SCARD_ATRMASK, catrs: u32, rgreaderstates: *mut SCARD_READERSTATEA, creaders: u32) -> i32 { windows_targets::link!("winscard.dll" "system" fn SCardLocateCardsByATRA(hcontext : usize, rgatrmasks : *const SCARD_ATRMASK, catrs : u32, rgreaderstates : *mut SCARD_READERSTATEA, creaders : u32) -> i32); - unsafe { SCardLocateCardsByATRA(hcontext, rgatrmasks, catrs, core::mem::transmute(rgreaderstates), creaders) } + unsafe { SCardLocateCardsByATRA(hcontext, rgatrmasks, catrs, rgreaderstates as _, creaders) } } #[inline] pub unsafe fn SCardLocateCardsByATRW(hcontext: usize, rgatrmasks: *const SCARD_ATRMASK, catrs: u32, rgreaderstates: *mut SCARD_READERSTATEW, creaders: u32) -> i32 { windows_targets::link!("winscard.dll" "system" fn SCardLocateCardsByATRW(hcontext : usize, rgatrmasks : *const SCARD_ATRMASK, catrs : u32, rgreaderstates : *mut SCARD_READERSTATEW, creaders : u32) -> i32); - unsafe { SCardLocateCardsByATRW(hcontext, rgatrmasks, catrs, core::mem::transmute(rgreaderstates), creaders) } + unsafe { SCardLocateCardsByATRW(hcontext, rgatrmasks, catrs, rgreaderstates as _, creaders) } } #[inline] pub unsafe fn SCardLocateCardsW(hcontext: usize, mszcards: P1, rgreaderstates: *mut SCARD_READERSTATEW, creaders: u32) -> i32 @@ -751,7 +751,7 @@ where P1: windows_core::Param, { windows_targets::link!("winscard.dll" "system" fn SCardLocateCardsW(hcontext : usize, mszcards : windows_core::PCWSTR, rgreaderstates : *mut SCARD_READERSTATEW, creaders : u32) -> i32); - unsafe { SCardLocateCardsW(hcontext, mszcards.param().abi(), core::mem::transmute(rgreaderstates), creaders) } + unsafe { SCardLocateCardsW(hcontext, mszcards.param().abi(), rgreaderstates as _, creaders) } } #[inline] pub unsafe fn SCardReadCacheA(hcontext: usize, cardidentifier: *const windows_core::GUID, freshnesscounter: u32, lookupname: P3, data: *mut u8, datalen: *mut u32) -> i32 @@ -759,7 +759,7 @@ where P3: windows_core::Param, { windows_targets::link!("winscard.dll" "system" fn SCardReadCacheA(hcontext : usize, cardidentifier : *const windows_core::GUID, freshnesscounter : u32, lookupname : windows_core::PCSTR, data : *mut u8, datalen : *mut u32) -> i32); - unsafe { SCardReadCacheA(hcontext, cardidentifier, freshnesscounter, lookupname.param().abi(), core::mem::transmute(data), core::mem::transmute(datalen)) } + unsafe { SCardReadCacheA(hcontext, cardidentifier, freshnesscounter, lookupname.param().abi(), data as _, datalen as _) } } #[inline] pub unsafe fn SCardReadCacheW(hcontext: usize, cardidentifier: *const windows_core::GUID, freshnesscounter: u32, lookupname: P3, data: *mut u8, datalen: *mut u32) -> i32 @@ -767,12 +767,12 @@ where P3: windows_core::Param, { windows_targets::link!("winscard.dll" "system" fn SCardReadCacheW(hcontext : usize, cardidentifier : *const windows_core::GUID, freshnesscounter : u32, lookupname : windows_core::PCWSTR, data : *mut u8, datalen : *mut u32) -> i32); - unsafe { SCardReadCacheW(hcontext, cardidentifier, freshnesscounter, lookupname.param().abi(), core::mem::transmute(data), core::mem::transmute(datalen)) } + unsafe { SCardReadCacheW(hcontext, cardidentifier, freshnesscounter, lookupname.param().abi(), data as _, datalen as _) } } #[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); - unsafe { SCardReconnect(hcard, dwsharemode, dwpreferredprotocols, dwinitialization, core::mem::transmute(pdwactiveprotocol.unwrap_or(core::mem::zeroed()))) } + unsafe { SCardReconnect(hcard, dwsharemode, dwpreferredprotocols, dwinitialization, pdwactiveprotocol.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SCardReleaseContext(hcontext: usize) -> i32 { @@ -828,34 +828,34 @@ where #[inline] pub unsafe fn SCardState(hcard: usize, pdwstate: *mut u32, pdwprotocol: *mut u32, pbatr: *mut u8, pcbatrlen: *mut u32) -> i32 { windows_targets::link!("winscard.dll" "system" fn SCardState(hcard : usize, pdwstate : *mut u32, pdwprotocol : *mut u32, pbatr : *mut u8, pcbatrlen : *mut u32) -> i32); - unsafe { SCardState(hcard, core::mem::transmute(pdwstate), core::mem::transmute(pdwprotocol), core::mem::transmute(pbatr), core::mem::transmute(pcbatrlen)) } + unsafe { SCardState(hcard, pdwstate as _, pdwprotocol as _, pbatr as _, pcbatrlen as _) } } #[inline] 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); - unsafe { SCardStatusA(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()))) } + unsafe { SCardStatusA(hcard, mszreadernames.unwrap_or(core::mem::zeroed()) as _, pcchreaderlen.unwrap_or(core::mem::zeroed()) as _, pdwstate.unwrap_or(core::mem::zeroed()) as _, pdwprotocol.unwrap_or(core::mem::zeroed()) as _, pbatr.unwrap_or(core::mem::zeroed()) as _, pcbatrlen.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { SCardStatusW(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()))) } + unsafe { SCardStatusW(hcard, mszreadernames.unwrap_or(core::mem::zeroed()) as _, pcchreaderlen.unwrap_or(core::mem::zeroed()) as _, pdwstate.unwrap_or(core::mem::zeroed()) as _, pdwprotocol.unwrap_or(core::mem::zeroed()) as _, pbatr.unwrap_or(core::mem::zeroed()) as _, pcbatrlen.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { SCardTransmit(hcard, 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)) } + unsafe { SCardTransmit(hcard, piosendpci, core::mem::transmute(pbsendbuffer.as_ptr()), pbsendbuffer.len().try_into().unwrap(), piorecvpci.unwrap_or(core::mem::zeroed()) as _, pbrecvbuffer as _, pcbrecvlength as _) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] pub unsafe fn SCardUIDlgSelectCardA(param0: *mut OPENCARDNAME_EXA) -> i32 { windows_targets::link!("scarddlg.dll" "system" fn SCardUIDlgSelectCardA(param0 : *mut OPENCARDNAME_EXA) -> i32); - unsafe { SCardUIDlgSelectCardA(core::mem::transmute(param0)) } + unsafe { SCardUIDlgSelectCardA(param0 as _) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] pub unsafe fn SCardUIDlgSelectCardW(param0: *mut OPENCARDNAME_EXW) -> i32 { windows_targets::link!("scarddlg.dll" "system" fn SCardUIDlgSelectCardW(param0 : *mut OPENCARDNAME_EXW) -> i32); - unsafe { SCardUIDlgSelectCardW(core::mem::transmute(param0)) } + unsafe { SCardUIDlgSelectCardW(param0 as _) } } #[inline] pub unsafe fn SCardWriteCacheA(hcontext: usize, cardidentifier: *const windows_core::GUID, freshnesscounter: u32, lookupname: P3, data: &[u8]) -> i32 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 4371f6c26a..3b17f9ae25 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Cryptography/Catalog/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Cryptography/Catalog/mod.rs @@ -1,7 +1,7 @@ #[inline] pub unsafe fn CryptCATAdminAcquireContext(phcatadmin: *mut isize, pgsubsystem: Option<*const windows_core::GUID>, dwflags: 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); - unsafe { CryptCATAdminAcquireContext(core::mem::transmute(phcatadmin), core::mem::transmute(pgsubsystem.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CryptCATAdminAcquireContext(phcatadmin as _, pgsubsystem.unwrap_or(core::mem::zeroed()) as _, dwflags.unwrap_or(core::mem::zeroed()) as _).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: Option) -> windows_core::Result<()> @@ -9,7 +9,7 @@ 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); - unsafe { 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() } + unsafe { CryptCATAdminAcquireContext2(phcatadmin as _, pgsubsystem.unwrap_or(core::mem::zeroed()) as _, pwszhashalgorithm.param().abi(), pstronghashpolicy.unwrap_or(core::mem::zeroed()) as _, dwflags.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CryptCATAdminAddCatalog(hcatadmin: isize, pwszcatalogfile: P1, pwszselectbasename: P2, dwflags: u32) -> isize @@ -23,17 +23,17 @@ where #[inline] 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); - unsafe { CryptCATAdminCalcHashFromFileHandle(hfile, core::mem::transmute(pcbhash), core::mem::transmute(pbhash.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed()))) } + unsafe { CryptCATAdminCalcHashFromFileHandle(hfile, pcbhash as _, pbhash.unwrap_or(core::mem::zeroed()) as _, dwflags.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { CryptCATAdminCalcHashFromFileHandle2(hcatadmin, hfile, core::mem::transmute(pcbhash), core::mem::transmute(pbhash.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CryptCATAdminCalcHashFromFileHandle2(hcatadmin, hfile, pcbhash as _, pbhash.unwrap_or(core::mem::zeroed()) as _, dwflags.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { CryptCATAdminEnumCatalogFromHash(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()))) } + unsafe { CryptCATAdminEnumCatalogFromHash(hcatadmin, core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap(), dwflags.unwrap_or(core::mem::zeroed()) as _, phprevcatinfo.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CryptCATAdminPauseServiceForBackup(dwflags: u32, fresume: bool) -> super::super::super::Foundation::BOOL { @@ -64,7 +64,7 @@ where P1: windows_core::Param, { windows_targets::link!("wintrust.dll" "system" fn CryptCATAdminResolveCatalogPath(hcatadmin : isize, pwszcatalogfile : windows_core::PCWSTR, pscatinfo : *mut CATALOG_INFO, dwflags : u32) -> super::super::super::Foundation:: BOOL); - unsafe { CryptCATAdminResolveCatalogPath(hcatadmin, pwszcatalogfile.param().abi(), core::mem::transmute(pscatinfo), dwflags).ok() } + unsafe { CryptCATAdminResolveCatalogPath(hcatadmin, pwszcatalogfile.param().abi(), pscatinfo as _, dwflags).ok() } } #[cfg(feature = "Win32_Security_Cryptography_Sip")] #[inline] @@ -78,13 +78,13 @@ where #[inline] pub unsafe fn CryptCATCDFClose(pcdf: *mut CRYPTCATCDF) -> super::super::super::Foundation::BOOL { windows_targets::link!("wintrust.dll" "system" fn CryptCATCDFClose(pcdf : *mut CRYPTCATCDF) -> super::super::super::Foundation:: BOOL); - unsafe { CryptCATCDFClose(core::mem::transmute(pcdf)) } + unsafe { CryptCATCDFClose(pcdf as _) } } #[cfg(feature = "Win32_Security_Cryptography_Sip")] #[inline] pub unsafe fn CryptCATCDFEnumAttributes(pcdf: *mut CRYPTCATCDF, pmember: *mut CRYPTCATMEMBER, pprevattr: *mut CRYPTCATATTRIBUTE, pfnparseerror: PFN_CDF_PARSE_ERROR_CALLBACK) -> *mut CRYPTCATATTRIBUTE { windows_targets::link!("wintrust.dll" "system" fn CryptCATCDFEnumAttributes(pcdf : *mut CRYPTCATCDF, pmember : *mut CRYPTCATMEMBER, pprevattr : *mut CRYPTCATATTRIBUTE, pfnparseerror : PFN_CDF_PARSE_ERROR_CALLBACK) -> *mut CRYPTCATATTRIBUTE); - unsafe { CryptCATCDFEnumAttributes(core::mem::transmute(pcdf), core::mem::transmute(pmember), core::mem::transmute(pprevattr), pfnparseerror) } + unsafe { CryptCATCDFEnumAttributes(pcdf as _, pmember as _, pprevattr as _, pfnparseerror) } } #[cfg(feature = "Win32_Security_Cryptography_Sip")] #[inline] @@ -98,13 +98,13 @@ where #[inline] pub unsafe fn CryptCATCDFEnumCatAttributes(pcdf: *mut CRYPTCATCDF, pprevattr: *mut CRYPTCATATTRIBUTE, pfnparseerror: PFN_CDF_PARSE_ERROR_CALLBACK) -> *mut CRYPTCATATTRIBUTE { windows_targets::link!("wintrust.dll" "system" fn CryptCATCDFEnumCatAttributes(pcdf : *mut CRYPTCATCDF, pprevattr : *mut CRYPTCATATTRIBUTE, pfnparseerror : PFN_CDF_PARSE_ERROR_CALLBACK) -> *mut CRYPTCATATTRIBUTE); - unsafe { CryptCATCDFEnumCatAttributes(core::mem::transmute(pcdf), core::mem::transmute(pprevattr), pfnparseerror) } + unsafe { CryptCATCDFEnumCatAttributes(pcdf as _, pprevattr as _, pfnparseerror) } } #[cfg(feature = "Win32_Security_Cryptography_Sip")] #[inline] pub unsafe fn CryptCATCDFEnumMembers(pcdf: *mut CRYPTCATCDF, pprevmember: *mut CRYPTCATMEMBER, pfnparseerror: PFN_CDF_PARSE_ERROR_CALLBACK) -> *mut CRYPTCATMEMBER { windows_targets::link!("wintrust.dll" "system" fn CryptCATCDFEnumMembers(pcdf : *mut CRYPTCATCDF, pprevmember : *mut CRYPTCATMEMBER, pfnparseerror : PFN_CDF_PARSE_ERROR_CALLBACK) -> *mut CRYPTCATMEMBER); - unsafe { CryptCATCDFEnumMembers(core::mem::transmute(pcdf), core::mem::transmute(pprevmember), pfnparseerror) } + unsafe { CryptCATCDFEnumMembers(pcdf as _, pprevmember as _, pfnparseerror) } } #[cfg(feature = "Win32_Security_Cryptography_Sip")] #[inline] @@ -118,12 +118,12 @@ 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); - unsafe { CryptCATCDFOpen(pwszfilepath.param().abi(), core::mem::transmute(pfnparseerror.unwrap_or(core::mem::zeroed()))) } + unsafe { CryptCATCDFOpen(pwszfilepath.param().abi(), pfnparseerror.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CryptCATCatalogInfoFromContext(hcatinfo: isize, pscatinfo: *mut CATALOG_INFO, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("wintrust.dll" "system" fn CryptCATCatalogInfoFromContext(hcatinfo : isize, pscatinfo : *mut CATALOG_INFO, dwflags : u32) -> super::super::super::Foundation:: BOOL); - unsafe { CryptCATCatalogInfoFromContext(hcatinfo, core::mem::transmute(pscatinfo), dwflags).ok() } + unsafe { CryptCATCatalogInfoFromContext(hcatinfo, pscatinfo as _, dwflags).ok() } } #[inline] pub unsafe fn CryptCATClose(hcatalog: super::super::super::Foundation::HANDLE) -> super::super::super::Foundation::BOOL { @@ -134,24 +134,24 @@ pub unsafe fn CryptCATClose(hcatalog: super::super::super::Foundation::HANDLE) - #[inline] 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); - unsafe { CryptCATEnumerateAttr(hcatalog, core::mem::transmute(pcatmember), core::mem::transmute(pprevattr)) } + unsafe { CryptCATEnumerateAttr(hcatalog, pcatmember as _, pprevattr as _) } } #[inline] 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); - unsafe { CryptCATEnumerateCatAttr(hcatalog, core::mem::transmute(pprevattr)) } + unsafe { CryptCATEnumerateCatAttr(hcatalog, pprevattr as _) } } #[cfg(feature = "Win32_Security_Cryptography_Sip")] #[inline] 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); - unsafe { CryptCATEnumerateMember(hcatalog, core::mem::transmute(pprevmember)) } + unsafe { CryptCATEnumerateMember(hcatalog, pprevmember as _) } } #[cfg(feature = "Win32_Security_Cryptography_Sip")] #[inline] 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)); - unsafe { CryptCATFreeSortedMemberInfo(hcatalog, core::mem::transmute(pcatmember)) } + unsafe { CryptCATFreeSortedMemberInfo(hcatalog, pcatmember as _) } } #[cfg(feature = "Win32_Security_Cryptography_Sip")] #[inline] @@ -160,7 +160,7 @@ where 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); - unsafe { CryptCATGetAttrInfo(hcatalog, core::mem::transmute(pcatmember), pwszreferencetag.param().abi()) } + unsafe { CryptCATGetAttrInfo(hcatalog, pcatmember as _, pwszreferencetag.param().abi()) } } #[inline] pub unsafe fn CryptCATGetCatAttrInfo(hcatalog: super::super::super::Foundation::HANDLE, pwszreferencetag: P1) -> *mut CRYPTCATATTRIBUTE @@ -182,7 +182,7 @@ where #[inline] pub unsafe fn CryptCATHandleFromStore(pcatstore: *mut CRYPTCATSTORE) -> super::super::super::Foundation::HANDLE { windows_targets::link!("wintrust.dll" "system" fn CryptCATHandleFromStore(pcatstore : *mut CRYPTCATSTORE) -> super::super::super::Foundation:: HANDLE); - unsafe { CryptCATHandleFromStore(core::mem::transmute(pcatstore)) } + unsafe { CryptCATHandleFromStore(pcatstore as _) } } #[inline] pub unsafe fn CryptCATOpen(pwszfilename: P0, fdwopenflags: CRYPTCAT_OPEN_FLAGS, hprov: usize, dwpublicversion: CRYPTCAT_VERSION, dwencodingtype: u32) -> super::super::super::Foundation::HANDLE @@ -204,7 +204,7 @@ where 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); - unsafe { CryptCATPutAttrInfo(hcatalog, core::mem::transmute(pcatmember), pwszreferencetag.param().abi(), dwattrtypeandaction, cbdata, core::mem::transmute(pbdata)) } + unsafe { CryptCATPutAttrInfo(hcatalog, pcatmember as _, pwszreferencetag.param().abi(), dwattrtypeandaction, cbdata, pbdata as _) } } #[inline] pub unsafe fn CryptCATPutCatAttrInfo(hcatalog: super::super::super::Foundation::HANDLE, pwszreferencetag: P1, dwattrtypeandaction: u32, cbdata: u32, pbdata: *mut u8) -> *mut CRYPTCATATTRIBUTE @@ -212,7 +212,7 @@ where 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); - unsafe { CryptCATPutCatAttrInfo(hcatalog, pwszreferencetag.param().abi(), dwattrtypeandaction, cbdata, core::mem::transmute(pbdata)) } + unsafe { CryptCATPutCatAttrInfo(hcatalog, pwszreferencetag.param().abi(), dwattrtypeandaction, cbdata, pbdata as _) } } #[cfg(feature = "Win32_Security_Cryptography_Sip")] #[inline] @@ -222,7 +222,7 @@ where 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); - unsafe { CryptCATPutMemberInfo(hcatalog, pwszfilename.param().abi(), pwszreferencetag.param().abi(), core::mem::transmute(pgsubjecttype), dwcertversion, cbsipindirectdata, core::mem::transmute(pbsipindirectdata)) } + unsafe { CryptCATPutMemberInfo(hcatalog, pwszfilename.param().abi(), pwszreferencetag.param().abi(), pgsubjecttype as _, dwcertversion, cbsipindirectdata, pbsipindirectdata as _) } } #[inline] pub unsafe fn CryptCATStoreFromHandle(hcatalog: super::super::super::Foundation::HANDLE) -> *mut CRYPTCATSTORE { 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 f125bb7f1c..120d9ffc91 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 @@ -1,32 +1,32 @@ #[inline] pub unsafe fn CertSrvBackupClose(hbc: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("certadm.dll" "system" fn CertSrvBackupClose(hbc : *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { CertSrvBackupClose(core::mem::transmute(hbc)).ok() } + unsafe { CertSrvBackupClose(hbc as _).ok() } } #[inline] pub unsafe fn CertSrvBackupEnd(hbc: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("certadm.dll" "system" fn CertSrvBackupEnd(hbc : *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { CertSrvBackupEnd(core::mem::transmute(hbc)).ok() } + unsafe { CertSrvBackupEnd(hbc as _).ok() } } #[inline] pub unsafe fn CertSrvBackupFree(pv: *mut core::ffi::c_void) { windows_targets::link!("certadm.dll" "system" fn CertSrvBackupFree(pv : *mut core::ffi::c_void)); - unsafe { CertSrvBackupFree(core::mem::transmute(pv)) } + unsafe { CertSrvBackupFree(pv as _) } } #[inline] pub unsafe fn CertSrvBackupGetBackupLogsW(hbc: *const core::ffi::c_void, ppwszzbackuplogfiles: *mut windows_core::PWSTR, pcbsize: *mut u32) -> windows_core::Result<()> { windows_targets::link!("certadm.dll" "system" fn CertSrvBackupGetBackupLogsW(hbc : *const core::ffi::c_void, ppwszzbackuplogfiles : *mut windows_core::PWSTR, pcbsize : *mut u32) -> windows_core::HRESULT); - unsafe { CertSrvBackupGetBackupLogsW(hbc, core::mem::transmute(ppwszzbackuplogfiles), core::mem::transmute(pcbsize)).ok() } + unsafe { CertSrvBackupGetBackupLogsW(hbc, ppwszzbackuplogfiles as _, pcbsize as _).ok() } } #[inline] pub unsafe fn CertSrvBackupGetDatabaseNamesW(hbc: *const core::ffi::c_void, ppwszzattachmentinformation: *mut windows_core::PWSTR, pcbsize: *mut u32) -> windows_core::Result<()> { windows_targets::link!("certadm.dll" "system" fn CertSrvBackupGetDatabaseNamesW(hbc : *const core::ffi::c_void, ppwszzattachmentinformation : *mut windows_core::PWSTR, pcbsize : *mut u32) -> windows_core::HRESULT); - unsafe { CertSrvBackupGetDatabaseNamesW(hbc, core::mem::transmute(ppwszzattachmentinformation), core::mem::transmute(pcbsize)).ok() } + unsafe { CertSrvBackupGetDatabaseNamesW(hbc, ppwszzattachmentinformation as _, pcbsize as _).ok() } } #[inline] pub unsafe fn CertSrvBackupGetDynamicFileListW(hbc: *const core::ffi::c_void, ppwszzfilelist: *mut windows_core::PWSTR, pcbsize: *mut u32) -> windows_core::Result<()> { windows_targets::link!("certadm.dll" "system" fn CertSrvBackupGetDynamicFileListW(hbc : *const core::ffi::c_void, ppwszzfilelist : *mut windows_core::PWSTR, pcbsize : *mut u32) -> windows_core::HRESULT); - unsafe { CertSrvBackupGetDynamicFileListW(hbc, core::mem::transmute(ppwszzfilelist), core::mem::transmute(pcbsize)).ok() } + unsafe { CertSrvBackupGetDynamicFileListW(hbc, ppwszzfilelist as _, pcbsize as _).ok() } } #[inline] pub unsafe fn CertSrvBackupOpenFileW(hbc: *mut core::ffi::c_void, pwszattachmentname: P1, cbreadhintsize: u32, plifilesize: *mut i64) -> windows_core::Result<()> @@ -34,7 +34,7 @@ where P1: windows_core::Param, { windows_targets::link!("certadm.dll" "system" fn CertSrvBackupOpenFileW(hbc : *mut core::ffi::c_void, pwszattachmentname : windows_core::PCWSTR, cbreadhintsize : u32, plifilesize : *mut i64) -> windows_core::HRESULT); - unsafe { CertSrvBackupOpenFileW(core::mem::transmute(hbc), pwszattachmentname.param().abi(), cbreadhintsize, core::mem::transmute(plifilesize)).ok() } + unsafe { CertSrvBackupOpenFileW(hbc as _, pwszattachmentname.param().abi(), cbreadhintsize, plifilesize as _).ok() } } #[inline] pub unsafe fn CertSrvBackupPrepareW(pwszservername: P0, grbitjet: u32, dwbackupflags: CSBACKUP_TYPE, phbc: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -42,17 +42,17 @@ where P0: windows_core::Param, { windows_targets::link!("certadm.dll" "system" fn CertSrvBackupPrepareW(pwszservername : windows_core::PCWSTR, grbitjet : u32, dwbackupflags : CSBACKUP_TYPE, phbc : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { CertSrvBackupPrepareW(pwszservername.param().abi(), grbitjet, dwbackupflags, core::mem::transmute(phbc)).ok() } + unsafe { CertSrvBackupPrepareW(pwszservername.param().abi(), grbitjet, dwbackupflags, phbc as _).ok() } } #[inline] pub unsafe fn CertSrvBackupRead(hbc: *mut core::ffi::c_void, pvbuffer: *mut core::ffi::c_void, cbbuffer: u32, pcbread: *mut u32) -> windows_core::Result<()> { windows_targets::link!("certadm.dll" "system" fn CertSrvBackupRead(hbc : *mut core::ffi::c_void, pvbuffer : *mut core::ffi::c_void, cbbuffer : u32, pcbread : *mut u32) -> windows_core::HRESULT); - unsafe { CertSrvBackupRead(core::mem::transmute(hbc), core::mem::transmute(pvbuffer), cbbuffer, core::mem::transmute(pcbread)).ok() } + unsafe { CertSrvBackupRead(hbc as _, pvbuffer as _, cbbuffer, pcbread as _).ok() } } #[inline] pub unsafe fn CertSrvBackupTruncateLogs(hbc: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("certadm.dll" "system" fn CertSrvBackupTruncateLogs(hbc : *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { CertSrvBackupTruncateLogs(core::mem::transmute(hbc)).ok() } + unsafe { CertSrvBackupTruncateLogs(hbc as _).ok() } } #[inline] pub unsafe fn CertSrvIsServerOnlineW(pwszservername: P0, pfserveronline: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> @@ -60,17 +60,17 @@ where P0: windows_core::Param, { windows_targets::link!("certadm.dll" "system" fn CertSrvIsServerOnlineW(pwszservername : windows_core::PCWSTR, pfserveronline : *mut super::super::super::Foundation:: BOOL) -> windows_core::HRESULT); - unsafe { CertSrvIsServerOnlineW(pwszservername.param().abi(), core::mem::transmute(pfserveronline)).ok() } + unsafe { CertSrvIsServerOnlineW(pwszservername.param().abi(), pfserveronline as _).ok() } } #[inline] pub unsafe fn CertSrvRestoreEnd(hbc: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("certadm.dll" "system" fn CertSrvRestoreEnd(hbc : *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { CertSrvRestoreEnd(core::mem::transmute(hbc)).ok() } + unsafe { CertSrvRestoreEnd(hbc as _).ok() } } #[inline] pub unsafe fn CertSrvRestoreGetDatabaseLocationsW(hbc: *const core::ffi::c_void, ppwszzdatabaselocationlist: *mut windows_core::PWSTR, pcbsize: *mut u32) -> windows_core::Result<()> { windows_targets::link!("certadm.dll" "system" fn CertSrvRestoreGetDatabaseLocationsW(hbc : *const core::ffi::c_void, ppwszzdatabaselocationlist : *mut windows_core::PWSTR, pcbsize : *mut u32) -> windows_core::HRESULT); - unsafe { CertSrvRestoreGetDatabaseLocationsW(hbc, core::mem::transmute(ppwszzdatabaselocationlist), core::mem::transmute(pcbsize)).ok() } + unsafe { CertSrvRestoreGetDatabaseLocationsW(hbc, ppwszzdatabaselocationlist as _, pcbsize as _).ok() } } #[inline] pub unsafe fn CertSrvRestorePrepareW(pwszservername: P0, dwrestoreflags: u32, phbc: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -78,12 +78,12 @@ where P0: windows_core::Param, { windows_targets::link!("certadm.dll" "system" fn CertSrvRestorePrepareW(pwszservername : windows_core::PCWSTR, dwrestoreflags : u32, phbc : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { CertSrvRestorePrepareW(pwszservername.param().abi(), dwrestoreflags, core::mem::transmute(phbc)).ok() } + unsafe { CertSrvRestorePrepareW(pwszservername.param().abi(), dwrestoreflags, phbc as _).ok() } } #[inline] pub unsafe fn CertSrvRestoreRegisterComplete(hbc: *mut core::ffi::c_void, hrrestorestate: windows_core::HRESULT) -> windows_core::Result<()> { windows_targets::link!("certadm.dll" "system" fn CertSrvRestoreRegisterComplete(hbc : *mut core::ffi::c_void, hrrestorestate : windows_core::HRESULT) -> windows_core::HRESULT); - unsafe { CertSrvRestoreRegisterComplete(core::mem::transmute(hbc), hrrestorestate).ok() } + unsafe { CertSrvRestoreRegisterComplete(hbc as _, hrrestorestate).ok() } } #[inline] pub unsafe fn CertSrvRestoreRegisterThroughFile(hbc: *mut core::ffi::c_void, pwszcheckpointfilepath: P1, pwszlogpath: P2, rgrstmap: *mut CSEDB_RSTMAPW, crstmap: i32, pwszbackuplogpath: P5, genlow: u32, genhigh: u32) -> windows_core::Result<()> @@ -93,7 +93,7 @@ where P5: windows_core::Param, { windows_targets::link!("certadm.dll" "system" fn CertSrvRestoreRegisterThroughFile(hbc : *mut core::ffi::c_void, pwszcheckpointfilepath : windows_core::PCWSTR, pwszlogpath : windows_core::PCWSTR, rgrstmap : *mut CSEDB_RSTMAPW, crstmap : i32, pwszbackuplogpath : windows_core::PCWSTR, genlow : u32, genhigh : u32) -> windows_core::HRESULT); - unsafe { CertSrvRestoreRegisterThroughFile(core::mem::transmute(hbc), pwszcheckpointfilepath.param().abi(), pwszlogpath.param().abi(), core::mem::transmute(rgrstmap), crstmap, pwszbackuplogpath.param().abi(), genlow, genhigh).ok() } + unsafe { CertSrvRestoreRegisterThroughFile(hbc as _, pwszcheckpointfilepath.param().abi(), pwszlogpath.param().abi(), rgrstmap as _, crstmap, pwszbackuplogpath.param().abi(), genlow, genhigh).ok() } } #[inline] pub unsafe fn CertSrvRestoreRegisterW(hbc: *mut core::ffi::c_void, pwszcheckpointfilepath: P1, pwszlogpath: P2, rgrstmap: *mut CSEDB_RSTMAPW, crstmap: i32, pwszbackuplogpath: P5, genlow: u32, genhigh: u32) -> windows_core::Result<()> @@ -103,7 +103,7 @@ where P5: windows_core::Param, { windows_targets::link!("certadm.dll" "system" fn CertSrvRestoreRegisterW(hbc : *mut core::ffi::c_void, pwszcheckpointfilepath : windows_core::PCWSTR, pwszlogpath : windows_core::PCWSTR, rgrstmap : *mut CSEDB_RSTMAPW, crstmap : i32, pwszbackuplogpath : windows_core::PCWSTR, genlow : u32, genhigh : u32) -> windows_core::HRESULT); - unsafe { CertSrvRestoreRegisterW(core::mem::transmute(hbc), pwszcheckpointfilepath.param().abi(), pwszlogpath.param().abi(), core::mem::transmute(rgrstmap), crstmap, pwszbackuplogpath.param().abi(), genlow, genhigh).ok() } + unsafe { CertSrvRestoreRegisterW(hbc as _, pwszcheckpointfilepath.param().abi(), pwszlogpath.param().abi(), rgrstmap as _, crstmap, pwszbackuplogpath.param().abi(), genlow, genhigh).ok() } } #[inline] pub unsafe fn CertSrvServerControlW(pwszservername: P0, dwcontrolflags: u32, pcbout: *mut u32, ppbout: *mut *mut u8) -> windows_core::Result<()> @@ -111,7 +111,7 @@ where P0: windows_core::Param, { windows_targets::link!("certadm.dll" "system" fn CertSrvServerControlW(pwszservername : windows_core::PCWSTR, dwcontrolflags : u32, pcbout : *mut u32, ppbout : *mut *mut u8) -> windows_core::HRESULT); - unsafe { CertSrvServerControlW(pwszservername.param().abi(), dwcontrolflags, core::mem::transmute(pcbout), core::mem::transmute(ppbout)).ok() } + unsafe { CertSrvServerControlW(pwszservername.param().abi(), dwcontrolflags, pcbout as _, ppbout as _).ok() } } #[inline] pub unsafe fn PstAcquirePrivateKey(pcert: *const super::CERT_CONTEXT) -> super::super::super::Foundation::NTSTATUS { @@ -122,40 +122,40 @@ pub unsafe fn PstAcquirePrivateKey(pcert: *const super::CERT_CONTEXT) -> super:: #[inline] pub unsafe fn PstGetCertificateChain(pcert: *const super::CERT_CONTEXT, ptrustedissuers: *const super::super::Authentication::Identity::SecPkgContext_IssuerListInfoEx, ppcertchaincontext: *mut *mut super::CERT_CHAIN_CONTEXT) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("certpoleng.dll" "system" fn PstGetCertificateChain(pcert : *const super:: CERT_CONTEXT, ptrustedissuers : *const super::super::Authentication::Identity:: SecPkgContext_IssuerListInfoEx, ppcertchaincontext : *mut *mut super:: CERT_CHAIN_CONTEXT) -> super::super::super::Foundation:: NTSTATUS); - unsafe { PstGetCertificateChain(pcert, ptrustedissuers, core::mem::transmute(ppcertchaincontext)) } + unsafe { PstGetCertificateChain(pcert, ptrustedissuers, ppcertchaincontext as _) } } #[inline] pub unsafe fn PstGetCertificates(ptargetname: *const super::super::super::Foundation::UNICODE_STRING, rgpcriteria: Option<&[super::CERT_SELECT_CRITERIA]>, bisclient: bool, pdwcertchaincontextcount: *mut u32, ppcertchaincontexts: *mut *mut *mut super::CERT_CHAIN_CONTEXT) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("certpoleng.dll" "system" fn PstGetCertificates(ptargetname : *const super::super::super::Foundation:: UNICODE_STRING, ccriteria : u32, rgpcriteria : *const super:: CERT_SELECT_CRITERIA, bisclient : super::super::super::Foundation:: BOOL, pdwcertchaincontextcount : *mut u32, ppcertchaincontexts : *mut *mut *mut super:: CERT_CHAIN_CONTEXT) -> super::super::super::Foundation:: NTSTATUS); - unsafe { PstGetCertificates(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())), bisclient.into(), core::mem::transmute(pdwcertchaincontextcount), core::mem::transmute(ppcertchaincontexts)) } + unsafe { PstGetCertificates(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())), bisclient.into(), pdwcertchaincontextcount as _, ppcertchaincontexts as _) } } #[cfg(feature = "Win32_Security_Authentication_Identity")] #[inline] pub unsafe fn PstGetTrustAnchors(ptargetname: *const super::super::super::Foundation::UNICODE_STRING, rgpcriteria: Option<&[super::CERT_SELECT_CRITERIA]>, pptrustedissuers: *mut *mut super::super::Authentication::Identity::SecPkgContext_IssuerListInfoEx) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("certpoleng.dll" "system" fn PstGetTrustAnchors(ptargetname : *const super::super::super::Foundation:: UNICODE_STRING, ccriteria : u32, rgpcriteria : *const super:: CERT_SELECT_CRITERIA, pptrustedissuers : *mut *mut super::super::Authentication::Identity:: SecPkgContext_IssuerListInfoEx) -> super::super::super::Foundation:: NTSTATUS); - unsafe { PstGetTrustAnchors(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(pptrustedissuers)) } + unsafe { PstGetTrustAnchors(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())), pptrustedissuers as _) } } #[cfg(feature = "Win32_Security_Authentication_Identity")] #[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); - unsafe { PstGetTrustAnchorsEx(ptargetname, rgpcriteria.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgpcriteria.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pcertcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(pptrustedissuers)) } + unsafe { PstGetTrustAnchorsEx(ptargetname, rgpcriteria.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgpcriteria.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcertcontext.unwrap_or(core::mem::zeroed()) as _, pptrustedissuers as _) } } #[inline] pub unsafe fn PstGetUserNameForCertificate(pcertcontext: *const super::CERT_CONTEXT, username: *mut super::super::super::Foundation::UNICODE_STRING) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("certpoleng.dll" "system" fn PstGetUserNameForCertificate(pcertcontext : *const super:: CERT_CONTEXT, username : *mut super::super::super::Foundation:: UNICODE_STRING) -> super::super::super::Foundation:: NTSTATUS); - unsafe { PstGetUserNameForCertificate(pcertcontext, core::mem::transmute(username)) } + unsafe { PstGetUserNameForCertificate(pcertcontext, username as _) } } #[cfg(feature = "Win32_Security_Authentication_Identity")] #[inline] pub unsafe fn PstMapCertificate(pcert: *const super::CERT_CONTEXT, ptokeninformationtype: *mut super::super::Authentication::Identity::LSA_TOKEN_INFORMATION_TYPE, pptokeninformation: *mut *mut core::ffi::c_void) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("certpoleng.dll" "system" fn PstMapCertificate(pcert : *const super:: CERT_CONTEXT, ptokeninformationtype : *mut super::super::Authentication::Identity:: LSA_TOKEN_INFORMATION_TYPE, pptokeninformation : *mut *mut core::ffi::c_void) -> super::super::super::Foundation:: NTSTATUS); - unsafe { PstMapCertificate(pcert, core::mem::transmute(ptokeninformationtype), core::mem::transmute(pptokeninformation)) } + unsafe { PstMapCertificate(pcert, ptokeninformationtype as _, pptokeninformation as _) } } #[inline] pub unsafe fn PstValidate(ptargetname: Option<*const super::super::super::Foundation::UNICODE_STRING>, bisclient: bool, prequestedissuancepolicy: Option<*const super::CERT_USAGE_MATCH>, phadditionalcertstore: Option<*const super::HCERTSTORE>, pcert: *const super::CERT_CONTEXT, pprovguid: Option<*mut windows_core::GUID>) -> super::super::super::Foundation::NTSTATUS { 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); - unsafe { PstValidate(core::mem::transmute(ptargetname.unwrap_or(core::mem::zeroed())), bisclient.into(), core::mem::transmute(prequestedissuancepolicy.unwrap_or(core::mem::zeroed())), core::mem::transmute(phadditionalcertstore.unwrap_or(core::mem::zeroed())), pcert, core::mem::transmute(pprovguid.unwrap_or(core::mem::zeroed()))) } + unsafe { PstValidate(ptargetname.unwrap_or(core::mem::zeroed()) as _, bisclient.into(), prequestedissuancepolicy.unwrap_or(core::mem::zeroed()) as _, phadditionalcertstore.unwrap_or(core::mem::zeroed()) as _, pcert, pprovguid.unwrap_or(core::mem::zeroed()) as _) } } #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] @@ -7602,7 +7602,7 @@ impl ICertRequestD { P1: windows_core::Param, P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Request)(windows_core::Interface::as_raw(self), dwflags, pwszauthority.param().abi(), core::mem::transmute(pdwrequestid), core::mem::transmute(pdwdisposition), pwszattributes.param().abi(), pctbrequest, core::mem::transmute(pctbcertchain), core::mem::transmute(pctbencodedcert), core::mem::transmute(pctbdispositionmessage)).ok() } + unsafe { (windows_core::Interface::vtable(self).Request)(windows_core::Interface::as_raw(self), dwflags, pwszauthority.param().abi(), pdwrequestid as _, pdwdisposition as _, pwszattributes.param().abi(), pctbrequest, pctbcertchain as _, pctbencodedcert as _, pctbdispositionmessage as _).ok() } } pub unsafe fn GetCACert(&self, fchain: u32, pwszauthority: P1) -> windows_core::Result where @@ -7685,7 +7685,7 @@ impl ICertRequestD2 { P2: windows_core::Param, P5: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Request2)(windows_core::Interface::as_raw(self), pwszauthority.param().abi(), dwflags, pwszserialnumber.param().abi(), core::mem::transmute(pdwrequestid), core::mem::transmute(pdwdisposition), pwszattributes.param().abi(), pctbrequest, core::mem::transmute(pctbfullresponse), core::mem::transmute(pctbencodedcert), core::mem::transmute(pctbdispositionmessage)).ok() } + unsafe { (windows_core::Interface::vtable(self).Request2)(windows_core::Interface::as_raw(self), pwszauthority.param().abi(), dwflags, pwszserialnumber.param().abi(), pdwrequestid as _, pdwdisposition as _, pwszattributes.param().abi(), pctbrequest, pctbfullresponse as _, pctbencodedcert as _, pctbdispositionmessage as _).ok() } } pub unsafe fn GetCAProperty(&self, pwszauthority: P0, propid: i32, propindex: i32, proptype: i32) -> windows_core::Result where @@ -7700,7 +7700,7 @@ impl ICertRequestD2 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetCAPropertyInfo)(windows_core::Interface::as_raw(self), pwszauthority.param().abi(), core::mem::transmute(pcproperty), core::mem::transmute(pctbpropinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCAPropertyInfo)(windows_core::Interface::as_raw(self), pwszauthority.param().abi(), pcproperty as _, pctbpropinfo as _).ok() } } pub unsafe fn Ping2(&self, pwszauthority: P0) -> windows_core::Result<()> where @@ -8331,10 +8331,10 @@ impl ICertView { } } pub unsafe fn GetColumnCount(&self, fresultcolumn: CVRC_COLUMN, pccolumn: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetColumnCount)(windows_core::Interface::as_raw(self), fresultcolumn, core::mem::transmute(pccolumn)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetColumnCount)(windows_core::Interface::as_raw(self), fresultcolumn, pccolumn as _).ok() } } pub unsafe fn GetColumnIndex(&self, fresultcolumn: CVRC_COLUMN, strcolumnname: &windows_core::BSTR, pcolumnindex: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetColumnIndex)(windows_core::Interface::as_raw(self), fresultcolumn, core::mem::transmute_copy(strcolumnname), core::mem::transmute(pcolumnindex)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetColumnIndex)(windows_core::Interface::as_raw(self), fresultcolumn, core::mem::transmute_copy(strcolumnname), pcolumnindex as _).ok() } } pub unsafe fn SetResultColumnCount(&self, cresultcolumn: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetResultColumnCount)(windows_core::Interface::as_raw(self), cresultcolumn).ok() } @@ -10876,13 +10876,13 @@ impl IEnroll { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).createPKCS10WStr)(windows_core::Interface::as_raw(self), dnname.param().abi(), usage.param().abi(), core::mem::transmute(ppkcs10blob)).ok() } + unsafe { (windows_core::Interface::vtable(self).createPKCS10WStr)(windows_core::Interface::as_raw(self), dnname.param().abi(), usage.param().abi(), ppkcs10blob as _).ok() } } pub unsafe fn acceptPKCS7Blob(&self, pblobpkcs7: *mut super::CRYPT_INTEGER_BLOB) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).acceptPKCS7Blob)(windows_core::Interface::as_raw(self), core::mem::transmute(pblobpkcs7)).ok() } + unsafe { (windows_core::Interface::vtable(self).acceptPKCS7Blob)(windows_core::Interface::as_raw(self), pblobpkcs7 as _).ok() } } pub unsafe fn getCertContextFromPKCS7(&self, pblobpkcs7: *mut super::CRYPT_INTEGER_BLOB) -> *mut super::CERT_CONTEXT { - unsafe { (windows_core::Interface::vtable(self).getCertContextFromPKCS7)(windows_core::Interface::as_raw(self), core::mem::transmute(pblobpkcs7)) } + unsafe { (windows_core::Interface::vtable(self).getCertContextFromPKCS7)(windows_core::Interface::as_raw(self), pblobpkcs7 as _) } } pub unsafe fn getMyStore(&self) -> super::HCERTSTORE { unsafe { (windows_core::Interface::vtable(self).getMyStore)(windows_core::Interface::as_raw(self)) } @@ -10894,16 +10894,16 @@ impl IEnroll { unsafe { (windows_core::Interface::vtable(self).getROOTHStore)(windows_core::Interface::as_raw(self)) } } pub unsafe fn enumProvidersWStr(&self, dwindex: i32, dwflags: i32, pbstrprovname: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).enumProvidersWStr)(windows_core::Interface::as_raw(self), dwindex, dwflags, core::mem::transmute(pbstrprovname)).ok() } + unsafe { (windows_core::Interface::vtable(self).enumProvidersWStr)(windows_core::Interface::as_raw(self), dwindex, dwflags, pbstrprovname as _).ok() } } pub unsafe fn enumContainersWStr(&self, dwindex: i32, pbstr: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).enumContainersWStr)(windows_core::Interface::as_raw(self), dwindex, core::mem::transmute(pbstr)).ok() } + unsafe { (windows_core::Interface::vtable(self).enumContainersWStr)(windows_core::Interface::as_raw(self), dwindex, pbstr as _).ok() } } pub unsafe fn freeRequestInfoBlob(&self, pkcs7orpkcs10: super::CRYPT_INTEGER_BLOB) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).freeRequestInfoBlob)(windows_core::Interface::as_raw(self), core::mem::transmute(pkcs7orpkcs10)).ok() } } pub unsafe fn MyStoreNameWStr(&self, szwname: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).MyStoreNameWStr)(windows_core::Interface::as_raw(self), core::mem::transmute(szwname)).ok() } + unsafe { (windows_core::Interface::vtable(self).MyStoreNameWStr)(windows_core::Interface::as_raw(self), szwname as _).ok() } } pub unsafe fn SetMyStoreNameWStr(&self, szwname: P0) -> windows_core::Result<()> where @@ -10912,7 +10912,7 @@ impl IEnroll { unsafe { (windows_core::Interface::vtable(self).SetMyStoreNameWStr)(windows_core::Interface::as_raw(self), szwname.param().abi()).ok() } } pub unsafe fn MyStoreTypeWStr(&self, szwtype: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).MyStoreTypeWStr)(windows_core::Interface::as_raw(self), core::mem::transmute(szwtype)).ok() } + unsafe { (windows_core::Interface::vtable(self).MyStoreTypeWStr)(windows_core::Interface::as_raw(self), szwtype as _).ok() } } pub unsafe fn SetMyStoreTypeWStr(&self, szwtype: P0) -> windows_core::Result<()> where @@ -10921,13 +10921,13 @@ impl IEnroll { unsafe { (windows_core::Interface::vtable(self).SetMyStoreTypeWStr)(windows_core::Interface::as_raw(self), szwtype.param().abi()).ok() } } pub unsafe fn MyStoreFlags(&self, pdwflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).MyStoreFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).MyStoreFlags)(windows_core::Interface::as_raw(self), pdwflags as _).ok() } } pub unsafe fn SetMyStoreFlags(&self, dwflags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetMyStoreFlags)(windows_core::Interface::as_raw(self), dwflags).ok() } } pub unsafe fn CAStoreNameWStr(&self, szwname: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CAStoreNameWStr)(windows_core::Interface::as_raw(self), core::mem::transmute(szwname)).ok() } + unsafe { (windows_core::Interface::vtable(self).CAStoreNameWStr)(windows_core::Interface::as_raw(self), szwname as _).ok() } } pub unsafe fn SetCAStoreNameWStr(&self, szwname: P0) -> windows_core::Result<()> where @@ -10936,7 +10936,7 @@ impl IEnroll { unsafe { (windows_core::Interface::vtable(self).SetCAStoreNameWStr)(windows_core::Interface::as_raw(self), szwname.param().abi()).ok() } } pub unsafe fn CAStoreTypeWStr(&self, szwtype: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CAStoreTypeWStr)(windows_core::Interface::as_raw(self), core::mem::transmute(szwtype)).ok() } + unsafe { (windows_core::Interface::vtable(self).CAStoreTypeWStr)(windows_core::Interface::as_raw(self), szwtype as _).ok() } } pub unsafe fn SetCAStoreTypeWStr(&self, szwtype: P0) -> windows_core::Result<()> where @@ -10945,13 +10945,13 @@ impl IEnroll { unsafe { (windows_core::Interface::vtable(self).SetCAStoreTypeWStr)(windows_core::Interface::as_raw(self), szwtype.param().abi()).ok() } } pub unsafe fn CAStoreFlags(&self, pdwflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CAStoreFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).CAStoreFlags)(windows_core::Interface::as_raw(self), pdwflags as _).ok() } } pub unsafe fn SetCAStoreFlags(&self, dwflags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetCAStoreFlags)(windows_core::Interface::as_raw(self), dwflags).ok() } } pub unsafe fn RootStoreNameWStr(&self, szwname: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RootStoreNameWStr)(windows_core::Interface::as_raw(self), core::mem::transmute(szwname)).ok() } + unsafe { (windows_core::Interface::vtable(self).RootStoreNameWStr)(windows_core::Interface::as_raw(self), szwname as _).ok() } } pub unsafe fn SetRootStoreNameWStr(&self, szwname: P0) -> windows_core::Result<()> where @@ -10960,7 +10960,7 @@ impl IEnroll { unsafe { (windows_core::Interface::vtable(self).SetRootStoreNameWStr)(windows_core::Interface::as_raw(self), szwname.param().abi()).ok() } } pub unsafe fn RootStoreTypeWStr(&self, szwtype: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RootStoreTypeWStr)(windows_core::Interface::as_raw(self), core::mem::transmute(szwtype)).ok() } + unsafe { (windows_core::Interface::vtable(self).RootStoreTypeWStr)(windows_core::Interface::as_raw(self), szwtype as _).ok() } } pub unsafe fn SetRootStoreTypeWStr(&self, szwtype: P0) -> windows_core::Result<()> where @@ -10969,13 +10969,13 @@ impl IEnroll { unsafe { (windows_core::Interface::vtable(self).SetRootStoreTypeWStr)(windows_core::Interface::as_raw(self), szwtype.param().abi()).ok() } } pub unsafe fn RootStoreFlags(&self, pdwflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RootStoreFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).RootStoreFlags)(windows_core::Interface::as_raw(self), pdwflags as _).ok() } } pub unsafe fn SetRootStoreFlags(&self, dwflags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetRootStoreFlags)(windows_core::Interface::as_raw(self), dwflags).ok() } } pub unsafe fn RequestStoreNameWStr(&self, szwname: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RequestStoreNameWStr)(windows_core::Interface::as_raw(self), core::mem::transmute(szwname)).ok() } + unsafe { (windows_core::Interface::vtable(self).RequestStoreNameWStr)(windows_core::Interface::as_raw(self), szwname as _).ok() } } pub unsafe fn SetRequestStoreNameWStr(&self, szwname: P0) -> windows_core::Result<()> where @@ -10984,7 +10984,7 @@ impl IEnroll { unsafe { (windows_core::Interface::vtable(self).SetRequestStoreNameWStr)(windows_core::Interface::as_raw(self), szwname.param().abi()).ok() } } pub unsafe fn RequestStoreTypeWStr(&self, szwtype: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RequestStoreTypeWStr)(windows_core::Interface::as_raw(self), core::mem::transmute(szwtype)).ok() } + unsafe { (windows_core::Interface::vtable(self).RequestStoreTypeWStr)(windows_core::Interface::as_raw(self), szwtype as _).ok() } } pub unsafe fn SetRequestStoreTypeWStr(&self, szwtype: P0) -> windows_core::Result<()> where @@ -10993,13 +10993,13 @@ impl IEnroll { unsafe { (windows_core::Interface::vtable(self).SetRequestStoreTypeWStr)(windows_core::Interface::as_raw(self), szwtype.param().abi()).ok() } } pub unsafe fn RequestStoreFlags(&self, pdwflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RequestStoreFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).RequestStoreFlags)(windows_core::Interface::as_raw(self), pdwflags as _).ok() } } pub unsafe fn SetRequestStoreFlags(&self, dwflags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetRequestStoreFlags)(windows_core::Interface::as_raw(self), dwflags).ok() } } pub unsafe fn ContainerNameWStr(&self, szwcontainer: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ContainerNameWStr)(windows_core::Interface::as_raw(self), core::mem::transmute(szwcontainer)).ok() } + unsafe { (windows_core::Interface::vtable(self).ContainerNameWStr)(windows_core::Interface::as_raw(self), szwcontainer as _).ok() } } pub unsafe fn SetContainerNameWStr(&self, szwcontainer: P0) -> windows_core::Result<()> where @@ -11008,7 +11008,7 @@ impl IEnroll { unsafe { (windows_core::Interface::vtable(self).SetContainerNameWStr)(windows_core::Interface::as_raw(self), szwcontainer.param().abi()).ok() } } pub unsafe fn ProviderNameWStr(&self, szwprovider: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ProviderNameWStr)(windows_core::Interface::as_raw(self), core::mem::transmute(szwprovider)).ok() } + unsafe { (windows_core::Interface::vtable(self).ProviderNameWStr)(windows_core::Interface::as_raw(self), szwprovider as _).ok() } } pub unsafe fn SetProviderNameWStr(&self, szwprovider: P0) -> windows_core::Result<()> where @@ -11017,61 +11017,61 @@ impl IEnroll { unsafe { (windows_core::Interface::vtable(self).SetProviderNameWStr)(windows_core::Interface::as_raw(self), szwprovider.param().abi()).ok() } } pub unsafe fn ProviderType(&self, pdwtype: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ProviderType)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwtype)).ok() } + unsafe { (windows_core::Interface::vtable(self).ProviderType)(windows_core::Interface::as_raw(self), pdwtype as _).ok() } } pub unsafe fn SetProviderType(&self, dwtype: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetProviderType)(windows_core::Interface::as_raw(self), dwtype).ok() } } pub unsafe fn KeySpec(&self, pdw: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).KeySpec)(windows_core::Interface::as_raw(self), core::mem::transmute(pdw)).ok() } + unsafe { (windows_core::Interface::vtable(self).KeySpec)(windows_core::Interface::as_raw(self), pdw as _).ok() } } pub unsafe fn SetKeySpec(&self, dw: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetKeySpec)(windows_core::Interface::as_raw(self), dw).ok() } } pub unsafe fn ProviderFlags(&self, pdwflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ProviderFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).ProviderFlags)(windows_core::Interface::as_raw(self), pdwflags as _).ok() } } pub unsafe fn SetProviderFlags(&self, dwflags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetProviderFlags)(windows_core::Interface::as_raw(self), dwflags).ok() } } pub unsafe fn UseExistingKeySet(&self, fuseexistingkeys: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).UseExistingKeySet)(windows_core::Interface::as_raw(self), core::mem::transmute(fuseexistingkeys)).ok() } + unsafe { (windows_core::Interface::vtable(self).UseExistingKeySet)(windows_core::Interface::as_raw(self), fuseexistingkeys as _).ok() } } pub unsafe fn SetUseExistingKeySet(&self, fuseexistingkeys: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetUseExistingKeySet)(windows_core::Interface::as_raw(self), fuseexistingkeys.into()).ok() } } pub unsafe fn GenKeyFlags(&self, pdwflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GenKeyFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GenKeyFlags)(windows_core::Interface::as_raw(self), pdwflags as _).ok() } } pub unsafe fn SetGenKeyFlags(&self, dwflags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetGenKeyFlags)(windows_core::Interface::as_raw(self), dwflags).ok() } } pub unsafe fn DeleteRequestCert(&self, fdelete: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DeleteRequestCert)(windows_core::Interface::as_raw(self), core::mem::transmute(fdelete)).ok() } + unsafe { (windows_core::Interface::vtable(self).DeleteRequestCert)(windows_core::Interface::as_raw(self), fdelete as _).ok() } } pub unsafe fn SetDeleteRequestCert(&self, fdelete: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetDeleteRequestCert)(windows_core::Interface::as_raw(self), fdelete.into()).ok() } } pub unsafe fn WriteCertToUserDS(&self, fbool: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).WriteCertToUserDS)(windows_core::Interface::as_raw(self), core::mem::transmute(fbool)).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteCertToUserDS)(windows_core::Interface::as_raw(self), fbool as _).ok() } } pub unsafe fn SetWriteCertToUserDS(&self, fbool: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetWriteCertToUserDS)(windows_core::Interface::as_raw(self), fbool.into()).ok() } } pub unsafe fn EnableT61DNEncoding(&self, fbool: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnableT61DNEncoding)(windows_core::Interface::as_raw(self), core::mem::transmute(fbool)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnableT61DNEncoding)(windows_core::Interface::as_raw(self), fbool as _).ok() } } pub unsafe fn SetEnableT61DNEncoding(&self, fbool: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetEnableT61DNEncoding)(windows_core::Interface::as_raw(self), fbool.into()).ok() } } pub unsafe fn WriteCertToCSP(&self, fbool: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).WriteCertToCSP)(windows_core::Interface::as_raw(self), core::mem::transmute(fbool)).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteCertToCSP)(windows_core::Interface::as_raw(self), fbool as _).ok() } } pub unsafe fn SetWriteCertToCSP(&self, fbool: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetWriteCertToCSP)(windows_core::Interface::as_raw(self), fbool.into()).ok() } } pub unsafe fn SPCFileNameWStr(&self, szw: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SPCFileNameWStr)(windows_core::Interface::as_raw(self), core::mem::transmute(szw)).ok() } + unsafe { (windows_core::Interface::vtable(self).SPCFileNameWStr)(windows_core::Interface::as_raw(self), szw as _).ok() } } pub unsafe fn SetSPCFileNameWStr(&self, szw: P0) -> windows_core::Result<()> where @@ -11080,7 +11080,7 @@ impl IEnroll { unsafe { (windows_core::Interface::vtable(self).SetSPCFileNameWStr)(windows_core::Interface::as_raw(self), szw.param().abi()).ok() } } pub unsafe fn PVKFileNameWStr(&self, szw: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).PVKFileNameWStr)(windows_core::Interface::as_raw(self), core::mem::transmute(szw)).ok() } + unsafe { (windows_core::Interface::vtable(self).PVKFileNameWStr)(windows_core::Interface::as_raw(self), szw as _).ok() } } pub unsafe fn SetPVKFileNameWStr(&self, szw: P0) -> windows_core::Result<()> where @@ -11089,7 +11089,7 @@ impl IEnroll { unsafe { (windows_core::Interface::vtable(self).SetPVKFileNameWStr)(windows_core::Interface::as_raw(self), szw.param().abi()).ok() } } pub unsafe fn HashAlgorithmWStr(&self, szw: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).HashAlgorithmWStr)(windows_core::Interface::as_raw(self), core::mem::transmute(szw)).ok() } + unsafe { (windows_core::Interface::vtable(self).HashAlgorithmWStr)(windows_core::Interface::as_raw(self), szw as _).ok() } } pub unsafe fn SetHashAlgorithmWStr(&self, szw: P0) -> windows_core::Result<()> where @@ -11098,7 +11098,7 @@ impl IEnroll { unsafe { (windows_core::Interface::vtable(self).SetHashAlgorithmWStr)(windows_core::Interface::as_raw(self), szw.param().abi()).ok() } } pub unsafe fn RenewalCertificate(&self, ppcertcontext: *mut *mut super::CERT_CONTEXT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RenewalCertificate)(windows_core::Interface::as_raw(self), core::mem::transmute(ppcertcontext)).ok() } + unsafe { (windows_core::Interface::vtable(self).RenewalCertificate)(windows_core::Interface::as_raw(self), ppcertcontext as _).ok() } } pub unsafe fn SetRenewalCertificate(&self, pcertcontext: *const super::CERT_CONTEXT) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetRenewalCertificate)(windows_core::Interface::as_raw(self), pcertcontext).ok() } @@ -11117,13 +11117,13 @@ impl IEnroll { unsafe { (windows_core::Interface::vtable(self).AddNameValuePairToSignatureWStr)(windows_core::Interface::as_raw(self), name.param().abi(), value.param().abi()).ok() } } pub unsafe fn AddExtensionsToRequest(&self, pcertextensions: *mut super::CERT_EXTENSIONS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AddExtensionsToRequest)(windows_core::Interface::as_raw(self), core::mem::transmute(pcertextensions)).ok() } + unsafe { (windows_core::Interface::vtable(self).AddExtensionsToRequest)(windows_core::Interface::as_raw(self), pcertextensions as _).ok() } } pub unsafe fn AddAuthenticatedAttributesToPKCS7Request(&self, pattributes: *mut super::CRYPT_ATTRIBUTES) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AddAuthenticatedAttributesToPKCS7Request)(windows_core::Interface::as_raw(self), core::mem::transmute(pattributes)).ok() } + unsafe { (windows_core::Interface::vtable(self).AddAuthenticatedAttributesToPKCS7Request)(windows_core::Interface::as_raw(self), pattributes as _).ok() } } pub unsafe fn CreatePKCS7RequestFromRequest(&self, prequest: *mut super::CRYPT_INTEGER_BLOB, psigningcertcontext: *const super::CERT_CONTEXT, ppkcs7blob: *mut super::CRYPT_INTEGER_BLOB) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreatePKCS7RequestFromRequest)(windows_core::Interface::as_raw(self), core::mem::transmute(prequest), psigningcertcontext, core::mem::transmute(ppkcs7blob)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreatePKCS7RequestFromRequest)(windows_core::Interface::as_raw(self), prequest as _, psigningcertcontext, ppkcs7blob as _).ok() } } } #[repr(C)] @@ -11783,34 +11783,34 @@ impl core::ops::Deref for IEnroll2 { windows_core::imp::interface_hierarchy!(IEnroll2, windows_core::IUnknown, IEnroll); impl IEnroll2 { pub unsafe fn InstallPKCS7Blob(&self, pblobpkcs7: *mut super::CRYPT_INTEGER_BLOB) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).InstallPKCS7Blob)(windows_core::Interface::as_raw(self), core::mem::transmute(pblobpkcs7)).ok() } + unsafe { (windows_core::Interface::vtable(self).InstallPKCS7Blob)(windows_core::Interface::as_raw(self), pblobpkcs7 as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetSupportedKeySpec(&self, pdwkeyspec: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSupportedKeySpec)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwkeyspec)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSupportedKeySpec)(windows_core::Interface::as_raw(self), pdwkeyspec as _).ok() } } pub unsafe fn GetKeyLen(&self, fmin: bool, fexchange: bool, pdwkeysize: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetKeyLen)(windows_core::Interface::as_raw(self), fmin.into(), fexchange.into(), core::mem::transmute(pdwkeysize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetKeyLen)(windows_core::Interface::as_raw(self), fmin.into(), fexchange.into(), pdwkeysize as _).ok() } } pub unsafe fn EnumAlgs(&self, dwindex: i32, algclass: i32, pdwalgid: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumAlgs)(windows_core::Interface::as_raw(self), dwindex, algclass, core::mem::transmute(pdwalgid)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumAlgs)(windows_core::Interface::as_raw(self), dwindex, algclass, pdwalgid as _).ok() } } pub unsafe fn GetAlgNameWStr(&self, algid: i32, ppwsz: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAlgNameWStr)(windows_core::Interface::as_raw(self), algid, core::mem::transmute(ppwsz)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAlgNameWStr)(windows_core::Interface::as_raw(self), algid, ppwsz as _).ok() } } pub unsafe fn SetReuseHardwareKeyIfUnableToGenNew(&self, freusehardwarekeyifunabletogennew: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetReuseHardwareKeyIfUnableToGenNew)(windows_core::Interface::as_raw(self), freusehardwarekeyifunabletogennew.into()).ok() } } pub unsafe fn ReuseHardwareKeyIfUnableToGenNew(&self, freusehardwarekeyifunabletogennew: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReuseHardwareKeyIfUnableToGenNew)(windows_core::Interface::as_raw(self), core::mem::transmute(freusehardwarekeyifunabletogennew)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReuseHardwareKeyIfUnableToGenNew)(windows_core::Interface::as_raw(self), freusehardwarekeyifunabletogennew as _).ok() } } pub unsafe fn SetHashAlgID(&self, hashalgid: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetHashAlgID)(windows_core::Interface::as_raw(self), hashalgid).ok() } } pub unsafe fn HashAlgID(&self, hashalgid: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).HashAlgID)(windows_core::Interface::as_raw(self), core::mem::transmute(hashalgid)).ok() } + unsafe { (windows_core::Interface::vtable(self).HashAlgID)(windows_core::Interface::as_raw(self), hashalgid as _).ok() } } pub unsafe fn SetHStoreMy(&self, hstore: super::HCERTSTORE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetHStoreMy)(windows_core::Interface::as_raw(self), hstore).ok() } @@ -11828,13 +11828,13 @@ impl IEnroll2 { unsafe { (windows_core::Interface::vtable(self).SetLimitExchangeKeyToEncipherment)(windows_core::Interface::as_raw(self), flimitexchangekeytoencipherment.into()).ok() } } pub unsafe fn LimitExchangeKeyToEncipherment(&self, flimitexchangekeytoencipherment: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).LimitExchangeKeyToEncipherment)(windows_core::Interface::as_raw(self), core::mem::transmute(flimitexchangekeytoencipherment)).ok() } + unsafe { (windows_core::Interface::vtable(self).LimitExchangeKeyToEncipherment)(windows_core::Interface::as_raw(self), flimitexchangekeytoencipherment as _).ok() } } pub unsafe fn SetEnableSMIMECapabilities(&self, fenablesmimecapabilities: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetEnableSMIMECapabilities)(windows_core::Interface::as_raw(self), fenablesmimecapabilities.into()).ok() } } pub unsafe fn EnableSMIMECapabilities(&self, fenablesmimecapabilities: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnableSMIMECapabilities)(windows_core::Interface::as_raw(self), core::mem::transmute(fenablesmimecapabilities)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnableSMIMECapabilities)(windows_core::Interface::as_raw(self), fenablesmimecapabilities as _).ok() } } } #[repr(C)] @@ -12029,7 +12029,7 @@ impl IEnroll4 { unsafe { (windows_core::Interface::vtable(self).SetThumbPrintWStr)(windows_core::Interface::as_raw(self), core::mem::transmute(thumbprintblob)).ok() } } pub unsafe fn ThumbPrintWStr(&self, thumbprintblob: *mut super::CRYPT_INTEGER_BLOB) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ThumbPrintWStr)(windows_core::Interface::as_raw(self), core::mem::transmute(thumbprintblob)).ok() } + unsafe { (windows_core::Interface::vtable(self).ThumbPrintWStr)(windows_core::Interface::as_raw(self), thumbprintblob as _).ok() } } pub unsafe fn SetPrivateKeyArchiveCertificate(&self, pprivatekeyarchivecert: *const super::CERT_CONTEXT) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetPrivateKeyArchiveCertificate)(windows_core::Interface::as_raw(self), pprivatekeyarchivecert).ok() } @@ -12038,25 +12038,25 @@ impl IEnroll4 { unsafe { (windows_core::Interface::vtable(self).GetPrivateKeyArchiveCertificate)(windows_core::Interface::as_raw(self)) } } pub unsafe fn binaryBlobToString(&self, flags: i32, pblobbinary: *mut super::CRYPT_INTEGER_BLOB, ppwszstring: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).binaryBlobToString)(windows_core::Interface::as_raw(self), flags, core::mem::transmute(pblobbinary), core::mem::transmute(ppwszstring)).ok() } + unsafe { (windows_core::Interface::vtable(self).binaryBlobToString)(windows_core::Interface::as_raw(self), flags, pblobbinary as _, ppwszstring as _).ok() } } pub unsafe fn stringToBinaryBlob(&self, flags: i32, pwszstring: P1, pblobbinary: *mut super::CRYPT_INTEGER_BLOB, pdwskip: *mut i32, pdwflags: *mut i32) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).stringToBinaryBlob)(windows_core::Interface::as_raw(self), flags, pwszstring.param().abi(), core::mem::transmute(pblobbinary), core::mem::transmute(pdwskip), core::mem::transmute(pdwflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).stringToBinaryBlob)(windows_core::Interface::as_raw(self), flags, pwszstring.param().abi(), pblobbinary as _, pdwskip as _, pdwflags as _).ok() } } pub unsafe fn addExtensionToRequestWStr(&self, flags: i32, pwszname: P1, pblobvalue: *mut super::CRYPT_INTEGER_BLOB) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).addExtensionToRequestWStr)(windows_core::Interface::as_raw(self), flags, pwszname.param().abi(), core::mem::transmute(pblobvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).addExtensionToRequestWStr)(windows_core::Interface::as_raw(self), flags, pwszname.param().abi(), pblobvalue as _).ok() } } pub unsafe fn addAttributeToRequestWStr(&self, flags: i32, pwszname: P1, pblobvalue: *mut super::CRYPT_INTEGER_BLOB) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).addAttributeToRequestWStr)(windows_core::Interface::as_raw(self), flags, pwszname.param().abi(), core::mem::transmute(pblobvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).addAttributeToRequestWStr)(windows_core::Interface::as_raw(self), flags, pwszname.param().abi(), pblobvalue as _).ok() } } pub unsafe fn addNameValuePairToRequestWStr(&self, flags: i32, pwszname: P1, pwszvalue: P2) -> windows_core::Result<()> where @@ -12076,7 +12076,7 @@ impl IEnroll4 { P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).createRequestWStr)(windows_core::Interface::as_raw(self), flags, pwszdnname.param().abi(), pwszusage.param().abi(), core::mem::transmute(pblobrequest)).ok() } + unsafe { (windows_core::Interface::vtable(self).createRequestWStr)(windows_core::Interface::as_raw(self), flags, pwszdnname.param().abi(), pwszusage.param().abi(), pblobrequest as _).ok() } } pub unsafe fn createFileRequestWStr(&self, flags: CERT_CREATE_REQUEST_FLAGS, pwszdnname: P1, pwszusage: P2, pwszrequestfilename: P3) -> windows_core::Result<()> where @@ -12087,7 +12087,7 @@ impl IEnroll4 { unsafe { (windows_core::Interface::vtable(self).createFileRequestWStr)(windows_core::Interface::as_raw(self), flags, pwszdnname.param().abi(), pwszusage.param().abi(), pwszrequestfilename.param().abi()).ok() } } pub unsafe fn acceptResponseBlob(&self, pblobresponse: *mut super::CRYPT_INTEGER_BLOB) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).acceptResponseBlob)(windows_core::Interface::as_raw(self), core::mem::transmute(pblobresponse)).ok() } + unsafe { (windows_core::Interface::vtable(self).acceptResponseBlob)(windows_core::Interface::as_raw(self), pblobresponse as _).ok() } } pub unsafe fn acceptFileResponseWStr(&self, pwszresponsefilename: P0) -> windows_core::Result<()> where @@ -12096,19 +12096,19 @@ impl IEnroll4 { unsafe { (windows_core::Interface::vtable(self).acceptFileResponseWStr)(windows_core::Interface::as_raw(self), pwszresponsefilename.param().abi()).ok() } } pub unsafe fn getCertContextFromResponseBlob(&self, pblobresponse: *mut super::CRYPT_INTEGER_BLOB, ppcertcontext: *mut *mut super::CERT_CONTEXT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).getCertContextFromResponseBlob)(windows_core::Interface::as_raw(self), core::mem::transmute(pblobresponse), core::mem::transmute(ppcertcontext)).ok() } + unsafe { (windows_core::Interface::vtable(self).getCertContextFromResponseBlob)(windows_core::Interface::as_raw(self), pblobresponse as _, ppcertcontext as _).ok() } } pub unsafe fn getCertContextFromFileResponseWStr(&self, pwszresponsefilename: P0, ppcertcontext: *mut *mut super::CERT_CONTEXT) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).getCertContextFromFileResponseWStr)(windows_core::Interface::as_raw(self), pwszresponsefilename.param().abi(), core::mem::transmute(ppcertcontext)).ok() } + unsafe { (windows_core::Interface::vtable(self).getCertContextFromFileResponseWStr)(windows_core::Interface::as_raw(self), pwszresponsefilename.param().abi(), ppcertcontext as _).ok() } } pub unsafe fn createPFXWStr(&self, pwszpassword: P0, pblobpfx: *mut super::CRYPT_INTEGER_BLOB) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).createPFXWStr)(windows_core::Interface::as_raw(self), pwszpassword.param().abi(), core::mem::transmute(pblobpfx)).ok() } + unsafe { (windows_core::Interface::vtable(self).createPFXWStr)(windows_core::Interface::as_raw(self), pwszpassword.param().abi(), pblobpfx as _).ok() } } pub unsafe fn createFilePFXWStr(&self, pwszpassword: P0, pwszpfxfilename: P1) -> windows_core::Result<()> where @@ -12126,16 +12126,16 @@ impl IEnroll4 { unsafe { (windows_core::Interface::vtable(self).setPendingRequestInfoWStr)(windows_core::Interface::as_raw(self), lrequestid, pwszcadns.param().abi(), pwszcaname.param().abi(), pwszfriendlyname.param().abi()).ok() } } pub unsafe fn enumPendingRequestWStr(&self, lindex: i32, ldesiredproperty: PENDING_REQUEST_DESIRED_PROPERTY, ppproperty: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).enumPendingRequestWStr)(windows_core::Interface::as_raw(self), lindex, ldesiredproperty, core::mem::transmute(ppproperty)).ok() } + unsafe { (windows_core::Interface::vtable(self).enumPendingRequestWStr)(windows_core::Interface::as_raw(self), lindex, ldesiredproperty, ppproperty as _).ok() } } pub unsafe fn removePendingRequestWStr(&self, thumbprintblob: super::CRYPT_INTEGER_BLOB) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).removePendingRequestWStr)(windows_core::Interface::as_raw(self), core::mem::transmute(thumbprintblob)).ok() } } pub unsafe fn GetKeyLenEx(&self, lsizespec: XEKL_KEYSIZE, lkeyspec: XEKL_KEYSPEC, pdwkeysize: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetKeyLenEx)(windows_core::Interface::as_raw(self), lsizespec, lkeyspec, core::mem::transmute(pdwkeysize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetKeyLenEx)(windows_core::Interface::as_raw(self), lsizespec, lkeyspec, pdwkeysize as _).ok() } } pub unsafe fn InstallPKCS7BlobEx(&self, pblobpkcs7: *mut super::CRYPT_INTEGER_BLOB, plcertinstalled: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).InstallPKCS7BlobEx)(windows_core::Interface::as_raw(self), core::mem::transmute(pblobpkcs7), core::mem::transmute(plcertinstalled)).ok() } + unsafe { (windows_core::Interface::vtable(self).InstallPKCS7BlobEx)(windows_core::Interface::as_raw(self), pblobpkcs7 as _, plcertinstalled as _).ok() } } pub unsafe fn AddCertTypeToRequestWStrEx(&self, ltype: ADDED_CERT_TYPE, pwszoidorname: P1, lmajorversion: i32, fminorversion: bool, lminorversion: i32) -> windows_core::Result<()> where @@ -12147,10 +12147,10 @@ impl IEnroll4 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).getProviderTypeWStr)(windows_core::Interface::as_raw(self), pwszprovname.param().abi(), core::mem::transmute(plprovtype)).ok() } + unsafe { (windows_core::Interface::vtable(self).getProviderTypeWStr)(windows_core::Interface::as_raw(self), pwszprovname.param().abi(), plprovtype as _).ok() } } pub unsafe fn addBlobPropertyToCertificateWStr(&self, lpropertyid: i32, lreserved: i32, pblobproperty: *mut super::CRYPT_INTEGER_BLOB) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).addBlobPropertyToCertificateWStr)(windows_core::Interface::as_raw(self), lpropertyid, lreserved, core::mem::transmute(pblobproperty)).ok() } + unsafe { (windows_core::Interface::vtable(self).addBlobPropertyToCertificateWStr)(windows_core::Interface::as_raw(self), lpropertyid, lreserved, pblobproperty as _).ok() } } pub unsafe fn SetSignerCertificate(&self, psignercert: *const super::CERT_CONTEXT) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSignerCertificate)(windows_core::Interface::as_raw(self), psignercert).ok() } @@ -12159,13 +12159,13 @@ impl IEnroll4 { unsafe { (windows_core::Interface::vtable(self).SetClientId)(windows_core::Interface::as_raw(self), lclientid).ok() } } pub unsafe fn ClientId(&self, plclientid: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ClientId)(windows_core::Interface::as_raw(self), core::mem::transmute(plclientid)).ok() } + unsafe { (windows_core::Interface::vtable(self).ClientId)(windows_core::Interface::as_raw(self), plclientid as _).ok() } } pub unsafe fn SetIncludeSubjectKeyID(&self, finclude: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetIncludeSubjectKeyID)(windows_core::Interface::as_raw(self), finclude.into()).ok() } } pub unsafe fn IncludeSubjectKeyID(&self, pfinclude: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IncludeSubjectKeyID)(windows_core::Interface::as_raw(self), core::mem::transmute(pfinclude)).ok() } + unsafe { (windows_core::Interface::vtable(self).IncludeSubjectKeyID)(windows_core::Interface::as_raw(self), pfinclude as _).ok() } } } #[repr(C)] @@ -12487,7 +12487,7 @@ windows_core::imp::interface_hierarchy!(IEnumCERTVIEWATTRIBUTE, windows_core::IU #[cfg(feature = "Win32_System_Com")] impl IEnumCERTVIEWATTRIBUTE { pub unsafe fn Next(&self, pindex: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), core::mem::transmute(pindex)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pindex as _).ok() } } pub unsafe fn GetName(&self, pstrout: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetName)(windows_core::Interface::as_raw(self), core::mem::transmute(pstrout)).ok() } @@ -12603,7 +12603,7 @@ windows_core::imp::interface_hierarchy!(IEnumCERTVIEWCOLUMN, windows_core::IUnkn #[cfg(feature = "Win32_System_Com")] impl IEnumCERTVIEWCOLUMN { pub unsafe fn Next(&self, pindex: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), core::mem::transmute(pindex)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pindex as _).ok() } } pub unsafe fn GetName(&self, pstrout: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetName)(windows_core::Interface::as_raw(self), core::mem::transmute(pstrout)).ok() } @@ -12612,13 +12612,13 @@ impl IEnumCERTVIEWCOLUMN { unsafe { (windows_core::Interface::vtable(self).GetDisplayName)(windows_core::Interface::as_raw(self), core::mem::transmute(pstrout)).ok() } } pub unsafe fn GetType(&self, ptype: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetType)(windows_core::Interface::as_raw(self), core::mem::transmute(ptype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetType)(windows_core::Interface::as_raw(self), ptype as _).ok() } } pub unsafe fn IsIndexed(&self, pindexed: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsIndexed)(windows_core::Interface::as_raw(self), core::mem::transmute(pindexed)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsIndexed)(windows_core::Interface::as_raw(self), pindexed as _).ok() } } pub unsafe fn GetMaxLength(&self, pmaxlength: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMaxLength)(windows_core::Interface::as_raw(self), core::mem::transmute(pmaxlength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMaxLength)(windows_core::Interface::as_raw(self), pmaxlength as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetValue(&self, flags: ENUM_CERT_COLUMN_VALUE_FLAGS, pvarvalue: *mut super::super::super::System::Variant::VARIANT) -> windows_core::Result<()> { @@ -12771,13 +12771,13 @@ windows_core::imp::interface_hierarchy!(IEnumCERTVIEWEXTENSION, windows_core::IU #[cfg(feature = "Win32_System_Com")] impl IEnumCERTVIEWEXTENSION { pub unsafe fn Next(&self, pindex: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), core::mem::transmute(pindex)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pindex as _).ok() } } pub unsafe fn GetName(&self, pstrout: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetName)(windows_core::Interface::as_raw(self), core::mem::transmute(pstrout)).ok() } } pub unsafe fn GetFlags(&self, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFlags)(windows_core::Interface::as_raw(self), pflags as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetValue(&self, r#type: CERT_PROPERTY_TYPE, flags: ENUM_CERT_COLUMN_VALUE_FLAGS, pvarvalue: *mut super::super::super::System::Variant::VARIANT) -> windows_core::Result<()> { @@ -12903,7 +12903,7 @@ windows_core::imp::interface_hierarchy!(IEnumCERTVIEWROW, windows_core::IUnknown #[cfg(feature = "Win32_System_Com")] impl IEnumCERTVIEWROW { pub unsafe fn Next(&self, pindex: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), core::mem::transmute(pindex)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pindex as _).ok() } } pub unsafe fn EnumCertViewColumn(&self) -> windows_core::Result { unsafe { @@ -12936,7 +12936,7 @@ impl IEnumCERTVIEWROW { } } pub unsafe fn GetMaxIndex(&self, pindex: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMaxIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(pindex)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMaxIndex)(windows_core::Interface::as_raw(self), pindex as _).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -13096,7 +13096,7 @@ impl INDESPolicy { { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).VerifyRequest)(windows_core::Interface::as_raw(self), core::mem::transmute(pctbrequest), core::mem::transmute(pctbsigningcertencoded), pwsztemplate.param().abi(), pwsztransactionid.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).VerifyRequest)(windows_core::Interface::as_raw(self), pctbrequest as _, pctbsigningcertencoded as _, pwsztemplate.param().abi(), pwsztransactionid.param().abi(), &mut result__).map(|| result__) } } pub unsafe fn Notify(&self, pwszchallenge: P0, pwsztransactionid: P1, disposition: X509SCEPDisposition, lasthresult: i32, pctbissuedcertencoded: *mut CERTTRANSBLOB) -> windows_core::Result<()> @@ -13104,7 +13104,7 @@ impl INDESPolicy { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Notify)(windows_core::Interface::as_raw(self), pwszchallenge.param().abi(), pwsztransactionid.param().abi(), disposition, lasthresult, core::mem::transmute(pctbissuedcertencoded)).ok() } + unsafe { (windows_core::Interface::vtable(self).Notify)(windows_core::Interface::as_raw(self), pwszchallenge.param().abi(), pwsztransactionid.param().abi(), disposition, lasthresult, pctbissuedcertencoded as _).ok() } } } #[repr(C)] 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 fb21978450..ebc94d9467 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Cryptography/Sip/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Cryptography/Sip/mod.rs @@ -1,54 +1,54 @@ #[inline] pub unsafe fn CryptSIPAddProvider(psnewprov: *mut SIP_ADD_NEWPROVIDER) -> windows_core::Result<()> { windows_targets::link!("crypt32.dll" "system" fn CryptSIPAddProvider(psnewprov : *mut SIP_ADD_NEWPROVIDER) -> super::super::super::Foundation:: BOOL); - unsafe { CryptSIPAddProvider(core::mem::transmute(psnewprov)).ok() } + unsafe { CryptSIPAddProvider(psnewprov as _).ok() } } #[cfg(feature = "Win32_Security_Cryptography_Catalog")] #[inline] pub unsafe fn CryptSIPCreateIndirectData(psubjectinfo: *mut SIP_SUBJECTINFO, pcbindirectdata: *mut u32, pindirectdata: *mut SIP_INDIRECT_DATA) -> windows_core::Result<()> { windows_targets::link!("wintrust.dll" "system" fn CryptSIPCreateIndirectData(psubjectinfo : *mut SIP_SUBJECTINFO, pcbindirectdata : *mut u32, pindirectdata : *mut SIP_INDIRECT_DATA) -> super::super::super::Foundation:: BOOL); - unsafe { CryptSIPCreateIndirectData(core::mem::transmute(psubjectinfo), core::mem::transmute(pcbindirectdata), core::mem::transmute(pindirectdata)).ok() } + unsafe { CryptSIPCreateIndirectData(psubjectinfo as _, pcbindirectdata as _, pindirectdata as _).ok() } } #[cfg(feature = "Win32_Security_Cryptography_Catalog")] #[inline] pub unsafe fn CryptSIPGetCaps(psubjinfo: *const SIP_SUBJECTINFO, pcaps: *mut SIP_CAP_SET_V3) -> super::super::super::Foundation::BOOL { windows_targets::link!("wintrust.dll" "system" fn CryptSIPGetCaps(psubjinfo : *const SIP_SUBJECTINFO, pcaps : *mut SIP_CAP_SET_V3) -> super::super::super::Foundation:: BOOL); - unsafe { CryptSIPGetCaps(psubjinfo, core::mem::transmute(pcaps)) } + unsafe { CryptSIPGetCaps(psubjinfo, pcaps as _) } } #[cfg(feature = "Win32_Security_Cryptography_Catalog")] #[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); - unsafe { CryptSIPGetSealedDigest(psubjectinfo, core::mem::transmute(psig.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), psig.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pbdigest.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdigest)) } + unsafe { CryptSIPGetSealedDigest(psubjectinfo, core::mem::transmute(psig.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), psig.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pbdigest.unwrap_or(core::mem::zeroed()) as _, pcbdigest as _) } } #[cfg(feature = "Win32_Security_Cryptography_Catalog")] #[inline] pub unsafe fn CryptSIPGetSignedDataMsg(psubjectinfo: *mut SIP_SUBJECTINFO, pdwencodingtype: *mut super::CERT_QUERY_ENCODING_TYPE, dwindex: u32, pcbsigneddatamsg: *mut u32, pbsigneddatamsg: *mut u8) -> windows_core::Result<()> { windows_targets::link!("wintrust.dll" "system" fn CryptSIPGetSignedDataMsg(psubjectinfo : *mut SIP_SUBJECTINFO, pdwencodingtype : *mut super:: CERT_QUERY_ENCODING_TYPE, dwindex : u32, pcbsigneddatamsg : *mut u32, pbsigneddatamsg : *mut u8) -> super::super::super::Foundation:: BOOL); - unsafe { CryptSIPGetSignedDataMsg(core::mem::transmute(psubjectinfo), core::mem::transmute(pdwencodingtype), dwindex, core::mem::transmute(pcbsigneddatamsg), core::mem::transmute(pbsigneddatamsg)).ok() } + unsafe { CryptSIPGetSignedDataMsg(psubjectinfo as _, pdwencodingtype as _, dwindex, pcbsigneddatamsg as _, pbsigneddatamsg as _).ok() } } #[cfg(feature = "Win32_Security_Cryptography_Catalog")] #[inline] pub unsafe fn CryptSIPLoad(pgsubject: *const windows_core::GUID, dwflags: u32, psipdispatch: *mut SIP_DISPATCH_INFO) -> windows_core::Result<()> { windows_targets::link!("crypt32.dll" "system" fn CryptSIPLoad(pgsubject : *const windows_core::GUID, dwflags : u32, psipdispatch : *mut SIP_DISPATCH_INFO) -> super::super::super::Foundation:: BOOL); - unsafe { CryptSIPLoad(pgsubject, dwflags, core::mem::transmute(psipdispatch)).ok() } + unsafe { CryptSIPLoad(pgsubject, dwflags, psipdispatch as _).ok() } } #[cfg(feature = "Win32_Security_Cryptography_Catalog")] #[inline] pub unsafe fn CryptSIPPutSignedDataMsg(psubjectinfo: *mut SIP_SUBJECTINFO, dwencodingtype: super::CERT_QUERY_ENCODING_TYPE, pdwindex: *mut u32, cbsigneddatamsg: u32, pbsigneddatamsg: *mut u8) -> windows_core::Result<()> { windows_targets::link!("wintrust.dll" "system" fn CryptSIPPutSignedDataMsg(psubjectinfo : *mut SIP_SUBJECTINFO, dwencodingtype : super:: CERT_QUERY_ENCODING_TYPE, pdwindex : *mut u32, cbsigneddatamsg : u32, pbsigneddatamsg : *mut u8) -> super::super::super::Foundation:: BOOL); - unsafe { CryptSIPPutSignedDataMsg(core::mem::transmute(psubjectinfo), dwencodingtype, core::mem::transmute(pdwindex), cbsigneddatamsg, core::mem::transmute(pbsigneddatamsg)).ok() } + unsafe { CryptSIPPutSignedDataMsg(psubjectinfo as _, dwencodingtype, pdwindex as _, cbsigneddatamsg, pbsigneddatamsg as _).ok() } } #[inline] pub unsafe fn CryptSIPRemoveProvider(pgprov: *mut windows_core::GUID) -> windows_core::Result<()> { windows_targets::link!("crypt32.dll" "system" fn CryptSIPRemoveProvider(pgprov : *mut windows_core::GUID) -> super::super::super::Foundation:: BOOL); - unsafe { CryptSIPRemoveProvider(core::mem::transmute(pgprov)).ok() } + unsafe { CryptSIPRemoveProvider(pgprov as _).ok() } } #[cfg(feature = "Win32_Security_Cryptography_Catalog")] #[inline] pub unsafe fn CryptSIPRemoveSignedDataMsg(psubjectinfo: *mut SIP_SUBJECTINFO, dwindex: u32) -> windows_core::Result<()> { windows_targets::link!("wintrust.dll" "system" fn CryptSIPRemoveSignedDataMsg(psubjectinfo : *mut SIP_SUBJECTINFO, dwindex : u32) -> super::super::super::Foundation:: BOOL); - unsafe { CryptSIPRemoveSignedDataMsg(core::mem::transmute(psubjectinfo), dwindex).ok() } + unsafe { CryptSIPRemoveSignedDataMsg(psubjectinfo as _, dwindex).ok() } } #[inline] pub unsafe fn CryptSIPRetrieveSubjectGuid(filename: P0, hfilein: super::super::super::Foundation::HANDLE, pgsubject: *mut windows_core::GUID) -> windows_core::Result<()> @@ -56,7 +56,7 @@ where P0: 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); - unsafe { CryptSIPRetrieveSubjectGuid(filename.param().abi(), hfilein, core::mem::transmute(pgsubject)).ok() } + unsafe { CryptSIPRetrieveSubjectGuid(filename.param().abi(), hfilein, pgsubject as _).ok() } } #[inline] pub unsafe fn CryptSIPRetrieveSubjectGuidForCatalogFile(filename: P0, hfilein: super::super::super::Foundation::HANDLE, pgsubject: *mut windows_core::GUID) -> windows_core::Result<()> @@ -64,13 +64,13 @@ where P0: 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); - unsafe { CryptSIPRetrieveSubjectGuidForCatalogFile(filename.param().abi(), hfilein, core::mem::transmute(pgsubject)).ok() } + unsafe { CryptSIPRetrieveSubjectGuidForCatalogFile(filename.param().abi(), hfilein, pgsubject as _).ok() } } #[cfg(feature = "Win32_Security_Cryptography_Catalog")] #[inline] pub unsafe fn CryptSIPVerifyIndirectData(psubjectinfo: *mut SIP_SUBJECTINFO, pindirectdata: *mut SIP_INDIRECT_DATA) -> windows_core::Result<()> { windows_targets::link!("wintrust.dll" "system" fn CryptSIPVerifyIndirectData(psubjectinfo : *mut SIP_SUBJECTINFO, pindirectdata : *mut SIP_INDIRECT_DATA) -> super::super::super::Foundation:: BOOL); - unsafe { CryptSIPVerifyIndirectData(core::mem::transmute(psubjectinfo), core::mem::transmute(pindirectdata)).ok() } + unsafe { CryptSIPVerifyIndirectData(psubjectinfo as _, pindirectdata as _).ok() } } pub const MSSIP_ADDINFO_BLOB: u32 = 3u32; pub const MSSIP_ADDINFO_CATMEMBER: u32 = 2u32; 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 32b6604bf5..9911c78b91 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 @@ -1,7 +1,7 @@ #[inline] pub unsafe fn CertSelectionGetSerializedBlob(pcsi: *const CERT_SELECTUI_INPUT, ppoutbuffer: *mut *mut core::ffi::c_void, puloutbuffersize: *mut u32) -> windows_core::Result<()> { windows_targets::link!("cryptui.dll" "system" fn CertSelectionGetSerializedBlob(pcsi : *const CERT_SELECTUI_INPUT, ppoutbuffer : *mut *mut core::ffi::c_void, puloutbuffersize : *mut u32) -> windows_core::HRESULT); - unsafe { CertSelectionGetSerializedBlob(pcsi, core::mem::transmute(ppoutbuffer), core::mem::transmute(puloutbuffersize)).ok() } + unsafe { CertSelectionGetSerializedBlob(pcsi, ppoutbuffer as _, puloutbuffersize as _).ok() } } #[inline] pub unsafe fn CryptUIDlgCertMgr(pcryptuicertmgr: *const CRYPTUI_CERT_MGR_STRUCT) -> super::super::super::Foundation::BOOL { @@ -15,19 +15,19 @@ where 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); - unsafe { CryptUIDlgSelectCertificateFromStore(hcertstore, core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pwsztitle.param().abi(), pwszdisplaystring.param().abi(), dwdontusecolumn, dwflags, pvreserved) } + unsafe { CryptUIDlgSelectCertificateFromStore(hcertstore, hwnd.unwrap_or(core::mem::zeroed()) as _, pwsztitle.param().abi(), pwszdisplaystring.param().abi(), dwdontusecolumn, dwflags, 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] pub unsafe fn CryptUIDlgViewCertificateA(pcertviewinfo: *const CRYPTUI_VIEWCERTIFICATE_STRUCTA, pfpropertieschanged: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("cryptui.dll" "system" fn CryptUIDlgViewCertificateA(pcertviewinfo : *const CRYPTUI_VIEWCERTIFICATE_STRUCTA, pfpropertieschanged : *mut super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - unsafe { CryptUIDlgViewCertificateA(pcertviewinfo, core::mem::transmute(pfpropertieschanged)).ok() } + unsafe { CryptUIDlgViewCertificateA(pcertviewinfo, pfpropertieschanged as _).ok() } } #[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] pub unsafe fn CryptUIDlgViewCertificateW(pcertviewinfo: *const CRYPTUI_VIEWCERTIFICATE_STRUCTW, pfpropertieschanged: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("cryptui.dll" "system" fn CryptUIDlgViewCertificateW(pcertviewinfo : *const CRYPTUI_VIEWCERTIFICATE_STRUCTW, pfpropertieschanged : *mut super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - unsafe { CryptUIDlgViewCertificateW(pcertviewinfo, core::mem::transmute(pfpropertieschanged)).ok() } + unsafe { CryptUIDlgViewCertificateW(pcertviewinfo, pfpropertieschanged as _).ok() } } #[inline] 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 @@ -35,7 +35,7 @@ where 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); - unsafe { CryptUIDlgViewContext(dwcontexttype, pvcontext, core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pwsztitle.param().abi(), dwflags, pvreserved) } + unsafe { CryptUIDlgViewContext(dwcontexttype, pvcontext, hwnd.unwrap_or(core::mem::zeroed()) as _, pwsztitle.param().abi(), dwflags, pvreserved) } } #[inline] 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 @@ -43,7 +43,7 @@ where 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); - unsafe { CryptUIWizDigitalSign(dwflags, core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), pwszwizardtitle.param().abi(), pdigitalsigninfo, core::mem::transmute(ppsigncontext.unwrap_or(core::mem::zeroed()))) } + unsafe { CryptUIWizDigitalSign(dwflags, hwndparent.unwrap_or(core::mem::zeroed()) as _, pwszwizardtitle.param().abi(), pdigitalsigninfo, ppsigncontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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<()> @@ -51,7 +51,7 @@ where 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); - unsafe { CryptUIWizExport(dwflags, core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), pwszwizardtitle.param().abi(), pexportinfo, core::mem::transmute(pvoid.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CryptUIWizExport(dwflags, hwndparent.unwrap_or(core::mem::zeroed()) as _, pwszwizardtitle.param().abi(), pexportinfo, pvoid.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CryptUIWizFreeDigitalSignContext(psigncontext: *const CRYPTUI_WIZ_DIGITAL_SIGN_CONTEXT) -> super::super::super::Foundation::BOOL { @@ -64,7 +64,7 @@ where P2: windows_core::Param, { windows_targets::link!("cryptui.dll" "system" fn CryptUIWizImport(dwflags : CRYPTUI_WIZ_FLAGS, hwndparent : super::super::super::Foundation:: HWND, pwszwizardtitle : windows_core::PCWSTR, pimportsrc : *const CRYPTUI_WIZ_IMPORT_SRC_INFO, hdestcertstore : super:: HCERTSTORE) -> super::super::super::Foundation:: BOOL); - unsafe { CryptUIWizImport(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() } + unsafe { CryptUIWizImport(dwflags, hwndparent.unwrap_or(core::mem::zeroed()) as _, pwszwizardtitle.param().abi(), pimportsrc.unwrap_or(core::mem::zeroed()) as _, hdestcertstore.unwrap_or(core::mem::zeroed()) as _).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 3eeb9d5553..49074c5ddc 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Cryptography/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Cryptography/mod.rs @@ -28,7 +28,7 @@ where #[inline] pub unsafe fn BCryptCloseAlgorithmProvider(halgorithm: BCRYPT_ALG_HANDLE, dwflags: u32) -> super::super::Foundation::NTSTATUS { windows_targets::link!("bcrypt.dll" "system" fn BCryptCloseAlgorithmProvider(halgorithm : BCRYPT_ALG_HANDLE, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - unsafe { BCryptCloseAlgorithmProvider(core::mem::transmute(halgorithm), dwflags) } + unsafe { BCryptCloseAlgorithmProvider(halgorithm as _, dwflags) } } #[inline] pub unsafe fn BCryptConfigureContext(dwtable: BCRYPT_TABLE, pszcontext: P1, pconfig: *const CRYPT_CONTEXT_CONFIG) -> super::super::Foundation::NTSTATUS @@ -53,32 +53,32 @@ 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); - unsafe { BCryptCreateContext(dwtable, pszcontext.param().abi(), core::mem::transmute(pconfig.unwrap_or(core::mem::zeroed()))) } + unsafe { BCryptCreateContext(dwtable, pszcontext.param().abi(), pconfig.unwrap_or(core::mem::zeroed()) as _) } } #[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 { windows_targets::link!("bcrypt.dll" "system" fn BCryptCreateHash(halgorithm : BCRYPT_ALG_HANDLE, phhash : *mut BCRYPT_HASH_HANDLE, pbhashobject : *mut u8, cbhashobject : u32, pbsecret : *const u8, cbsecret : u32, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - unsafe { BCryptCreateHash(core::mem::transmute(halgorithm), core::mem::transmute(phhash), 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(pbsecret.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbsecret.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dwflags) } + unsafe { BCryptCreateHash(halgorithm as _, phhash as _, 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(pbsecret.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbsecret.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dwflags) } } #[inline] pub unsafe fn BCryptCreateMultiHash(halgorithm: BCRYPT_ALG_HANDLE, phhash: *mut BCRYPT_HASH_HANDLE, nhashes: u32, pbhashobject: Option<&mut [u8]>, pbsecret: Option<&[u8]>, dwflags: u32) -> super::super::Foundation::NTSTATUS { windows_targets::link!("bcrypt.dll" "system" fn BCryptCreateMultiHash(halgorithm : BCRYPT_ALG_HANDLE, phhash : *mut BCRYPT_HASH_HANDLE, nhashes : u32, pbhashobject : *mut u8, cbhashobject : u32, pbsecret : *const u8, cbsecret : u32, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - unsafe { BCryptCreateMultiHash(core::mem::transmute(halgorithm), core::mem::transmute(phhash), nhashes, 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(pbsecret.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbsecret.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dwflags) } + unsafe { BCryptCreateMultiHash(halgorithm as _, phhash as _, nhashes, 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(pbsecret.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbsecret.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dwflags) } } #[inline] pub unsafe fn BCryptDecrypt(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 { windows_targets::link!("bcrypt.dll" "system" fn BCryptDecrypt(hkey : BCRYPT_KEY_HANDLE, pbinput : *const u8, cbinput : u32, ppaddinginfo : *const core::ffi::c_void, pbiv : *mut u8, cbiv : u32, pboutput : *mut u8, cboutput : u32, pcbresult : *mut u32, dwflags : BCRYPT_FLAGS) -> super::super::Foundation:: NTSTATUS); unsafe { BCryptDecrypt( - core::mem::transmute(hkey), + hkey as _, 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())), + ppaddinginfo.unwrap_or(core::mem::zeroed()) as _, 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())), pboutput.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(pcbresult), + pcbresult as _, dwflags, ) } @@ -97,12 +97,12 @@ where P1: windows_core::Param, { windows_targets::link!("bcrypt.dll" "system" fn BCryptDeriveKey(hsharedsecret : BCRYPT_SECRET_HANDLE, pwszkdf : windows_core::PCWSTR, pparameterlist : *const BCryptBufferDesc, pbderivedkey : *mut u8, cbderivedkey : u32, pcbresult : *mut u32, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - unsafe { BCryptDeriveKey(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), dwflags) } + unsafe { BCryptDeriveKey(hsharedsecret, pwszkdf.param().abi(), pparameterlist.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pbderivedkey.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbderivedkey.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult as _, dwflags) } } #[inline] 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); - unsafe { BCryptDeriveKeyCapi(hhash, core::mem::transmute(htargetalg.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbderivedkey.as_ptr()), pbderivedkey.len().try_into().unwrap(), dwflags) } + unsafe { BCryptDeriveKeyCapi(hhash, htargetalg.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pbderivedkey.as_ptr()), pbderivedkey.len().try_into().unwrap(), dwflags) } } #[inline] 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 { @@ -112,42 +112,42 @@ pub unsafe fn BCryptDeriveKeyPBKDF2(hprf: BCRYPT_ALG_HANDLE, pbpassword: Option< #[inline] pub unsafe fn BCryptDestroyHash(hhash: BCRYPT_HASH_HANDLE) -> super::super::Foundation::NTSTATUS { windows_targets::link!("bcrypt.dll" "system" fn BCryptDestroyHash(hhash : BCRYPT_HASH_HANDLE) -> super::super::Foundation:: NTSTATUS); - unsafe { BCryptDestroyHash(core::mem::transmute(hhash)) } + unsafe { BCryptDestroyHash(hhash as _) } } #[inline] pub unsafe fn BCryptDestroyKey(hkey: BCRYPT_KEY_HANDLE) -> super::super::Foundation::NTSTATUS { windows_targets::link!("bcrypt.dll" "system" fn BCryptDestroyKey(hkey : BCRYPT_KEY_HANDLE) -> super::super::Foundation:: NTSTATUS); - unsafe { BCryptDestroyKey(core::mem::transmute(hkey)) } + unsafe { BCryptDestroyKey(hkey as _) } } #[inline] pub unsafe fn BCryptDestroySecret(hsecret: BCRYPT_SECRET_HANDLE) -> super::super::Foundation::NTSTATUS { windows_targets::link!("bcrypt.dll" "system" fn BCryptDestroySecret(hsecret : BCRYPT_SECRET_HANDLE) -> super::super::Foundation:: NTSTATUS); - unsafe { BCryptDestroySecret(core::mem::transmute(hsecret)) } + unsafe { BCryptDestroySecret(hsecret as _) } } #[inline] 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); - unsafe { BCryptDuplicateHash(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()), dwflags) } + unsafe { BCryptDuplicateHash(hhash, phnewhash as _, 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()), dwflags) } } #[inline] 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); - unsafe { BCryptDuplicateKey(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()), dwflags) } + unsafe { BCryptDuplicateKey(hkey, phnewkey as _, 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()), 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 { windows_targets::link!("bcrypt.dll" "system" fn BCryptEncrypt(hkey : BCRYPT_KEY_HANDLE, pbinput : *const u8, cbinput : u32, ppaddinginfo : *const core::ffi::c_void, pbiv : *mut u8, cbiv : u32, pboutput : *mut u8, cboutput : u32, pcbresult : *mut u32, dwflags : BCRYPT_FLAGS) -> super::super::Foundation:: NTSTATUS); unsafe { BCryptEncrypt( - core::mem::transmute(hkey), + hkey as _, 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())), + ppaddinginfo.unwrap_or(core::mem::zeroed()) as _, 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())), pboutput.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(pcbresult), + pcbresult as _, dwflags, ) } @@ -155,7 +155,7 @@ pub unsafe fn BCryptEncrypt(hkey: BCRYPT_KEY_HANDLE, pbinput: Option<&[u8]>, ppa #[inline] pub unsafe fn BCryptEnumAlgorithms(dwalgoperations: BCRYPT_OPERATION, palgcount: *mut u32, ppalglist: *mut *mut BCRYPT_ALGORITHM_IDENTIFIER, dwflags: u32) -> super::super::Foundation::NTSTATUS { windows_targets::link!("bcrypt.dll" "system" fn BCryptEnumAlgorithms(dwalgoperations : BCRYPT_OPERATION, palgcount : *mut u32, ppalglist : *mut *mut BCRYPT_ALGORITHM_IDENTIFIER, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - unsafe { BCryptEnumAlgorithms(dwalgoperations, core::mem::transmute(palgcount), core::mem::transmute(ppalglist), dwflags) } + unsafe { BCryptEnumAlgorithms(dwalgoperations, palgcount as _, ppalglist as _, dwflags) } } #[inline] pub unsafe fn BCryptEnumContextFunctionProviders(dwtable: BCRYPT_TABLE, pszcontext: P1, dwinterface: BCRYPT_INTERFACE, pszfunction: P3, pcbbuffer: *mut u32, ppbuffer: Option<*mut *mut CRYPT_CONTEXT_FUNCTION_PROVIDERS>) -> super::super::Foundation::NTSTATUS @@ -164,7 +164,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); - unsafe { BCryptEnumContextFunctionProviders(dwtable, pszcontext.param().abi(), dwinterface, pszfunction.param().abi(), core::mem::transmute(pcbbuffer), core::mem::transmute(ppbuffer.unwrap_or(core::mem::zeroed()))) } + unsafe { BCryptEnumContextFunctionProviders(dwtable, pszcontext.param().abi(), dwinterface, pszfunction.param().abi(), pcbbuffer as _, ppbuffer.unwrap_or(core::mem::zeroed()) as _) } } #[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 @@ -172,12 +172,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); - unsafe { BCryptEnumContextFunctions(dwtable, pszcontext.param().abi(), dwinterface, core::mem::transmute(pcbbuffer), core::mem::transmute(ppbuffer.unwrap_or(core::mem::zeroed()))) } + unsafe { BCryptEnumContextFunctions(dwtable, pszcontext.param().abi(), dwinterface, pcbbuffer as _, ppbuffer.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { BCryptEnumContexts(dwtable, core::mem::transmute(pcbbuffer), core::mem::transmute(ppbuffer.unwrap_or(core::mem::zeroed()))) } + unsafe { BCryptEnumContexts(dwtable, pcbbuffer as _, ppbuffer.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn BCryptEnumProviders(pszalgid: P0, pimplcount: *mut u32, ppimpllist: *mut *mut BCRYPT_PROVIDER_NAME, dwflags: u32) -> super::super::Foundation::NTSTATUS @@ -185,12 +185,12 @@ where P0: windows_core::Param, { windows_targets::link!("bcrypt.dll" "system" fn BCryptEnumProviders(pszalgid : windows_core::PCWSTR, pimplcount : *mut u32, ppimpllist : *mut *mut BCRYPT_PROVIDER_NAME, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - unsafe { BCryptEnumProviders(pszalgid.param().abi(), core::mem::transmute(pimplcount), core::mem::transmute(ppimpllist), dwflags) } + unsafe { BCryptEnumProviders(pszalgid.param().abi(), pimplcount as _, ppimpllist as _, dwflags) } } #[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); - unsafe { BCryptEnumRegisteredProviders(core::mem::transmute(pcbbuffer), core::mem::transmute(ppbuffer.unwrap_or(core::mem::zeroed()))) } + unsafe { BCryptEnumRegisteredProviders(pcbbuffer as _, ppbuffer.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -198,17 +198,17 @@ where 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); - unsafe { BCryptExportKey(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), dwflags) } + unsafe { BCryptExportKey(hkey, hexportkey.unwrap_or(core::mem::zeroed()) as _, 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()), pcbresult as _, dwflags) } } #[inline] pub unsafe fn BCryptFinalizeKeyPair(hkey: BCRYPT_KEY_HANDLE, dwflags: u32) -> super::super::Foundation::NTSTATUS { windows_targets::link!("bcrypt.dll" "system" fn BCryptFinalizeKeyPair(hkey : BCRYPT_KEY_HANDLE, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - unsafe { BCryptFinalizeKeyPair(core::mem::transmute(hkey), dwflags) } + unsafe { BCryptFinalizeKeyPair(hkey as _, dwflags) } } #[inline] pub unsafe fn BCryptFinishHash(hhash: BCRYPT_HASH_HANDLE, pboutput: &mut [u8], dwflags: u32) -> super::super::Foundation::NTSTATUS { windows_targets::link!("bcrypt.dll" "system" fn BCryptFinishHash(hhash : BCRYPT_HASH_HANDLE, pboutput : *mut u8, cboutput : u32, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - unsafe { BCryptFinishHash(core::mem::transmute(hhash), core::mem::transmute(pboutput.as_ptr()), pboutput.len().try_into().unwrap(), dwflags) } + unsafe { BCryptFinishHash(hhash as _, core::mem::transmute(pboutput.as_ptr()), pboutput.len().try_into().unwrap(), dwflags) } } #[inline] pub unsafe fn BCryptFreeBuffer(pvbuffer: *const core::ffi::c_void) { @@ -218,22 +218,22 @@ pub unsafe fn BCryptFreeBuffer(pvbuffer: *const core::ffi::c_void) { #[inline] 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); - unsafe { BCryptGenRandom(core::mem::transmute(halgorithm.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbbuffer.as_ptr()), pbbuffer.len().try_into().unwrap(), dwflags) } + unsafe { BCryptGenRandom(halgorithm.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pbbuffer.as_ptr()), pbbuffer.len().try_into().unwrap(), dwflags) } } #[inline] pub unsafe fn BCryptGenerateKeyPair(halgorithm: BCRYPT_ALG_HANDLE, phkey: *mut BCRYPT_KEY_HANDLE, dwlength: u32, dwflags: u32) -> super::super::Foundation::NTSTATUS { windows_targets::link!("bcrypt.dll" "system" fn BCryptGenerateKeyPair(halgorithm : BCRYPT_ALG_HANDLE, phkey : *mut BCRYPT_KEY_HANDLE, dwlength : u32, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - unsafe { BCryptGenerateKeyPair(core::mem::transmute(halgorithm), core::mem::transmute(phkey), dwlength, dwflags) } + unsafe { BCryptGenerateKeyPair(halgorithm as _, phkey as _, dwlength, dwflags) } } #[inline] pub unsafe fn BCryptGenerateSymmetricKey(halgorithm: BCRYPT_ALG_HANDLE, phkey: *mut BCRYPT_KEY_HANDLE, pbkeyobject: Option<&mut [u8]>, pbsecret: &[u8], dwflags: u32) -> super::super::Foundation::NTSTATUS { windows_targets::link!("bcrypt.dll" "system" fn BCryptGenerateSymmetricKey(halgorithm : BCRYPT_ALG_HANDLE, phkey : *mut BCRYPT_KEY_HANDLE, pbkeyobject : *mut u8, cbkeyobject : u32, pbsecret : *const u8, cbsecret : u32, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - unsafe { BCryptGenerateSymmetricKey(core::mem::transmute(halgorithm), 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(pbsecret.as_ptr()), pbsecret.len().try_into().unwrap(), dwflags) } + unsafe { BCryptGenerateSymmetricKey(halgorithm as _, phkey as _, 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(pbsecret.as_ptr()), pbsecret.len().try_into().unwrap(), dwflags) } } #[inline] pub unsafe fn BCryptGetFipsAlgorithmMode(pfenabled: *mut u8) -> super::super::Foundation::NTSTATUS { windows_targets::link!("bcrypt.dll" "system" fn BCryptGetFipsAlgorithmMode(pfenabled : *mut u8) -> super::super::Foundation:: NTSTATUS); - unsafe { BCryptGetFipsAlgorithmMode(core::mem::transmute(pfenabled)) } + unsafe { BCryptGetFipsAlgorithmMode(pfenabled as _) } } #[inline] pub unsafe fn BCryptGetProperty(hobject: BCRYPT_HANDLE, pszproperty: P1, pboutput: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: u32) -> super::super::Foundation::NTSTATUS @@ -241,17 +241,17 @@ where 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); - unsafe { BCryptGetProperty(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), dwflags) } + unsafe { BCryptGetProperty(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()), pcbresult as _, dwflags) } } #[inline] pub unsafe fn BCryptHash(halgorithm: BCRYPT_ALG_HANDLE, pbsecret: Option<&[u8]>, pbinput: &[u8], pboutput: &mut [u8]) -> super::super::Foundation::NTSTATUS { windows_targets::link!("bcrypt.dll" "system" fn BCryptHash(halgorithm : BCRYPT_ALG_HANDLE, pbsecret : *const u8, cbsecret : u32, pbinput : *const u8, cbinput : u32, pboutput : *mut u8, cboutput : u32) -> super::super::Foundation:: NTSTATUS); - unsafe { BCryptHash(core::mem::transmute(halgorithm), core::mem::transmute(pbsecret.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbsecret.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(pboutput.as_ptr()), pboutput.len().try_into().unwrap()) } + unsafe { BCryptHash(halgorithm as _, core::mem::transmute(pbsecret.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbsecret.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(pboutput.as_ptr()), pboutput.len().try_into().unwrap()) } } #[inline] pub unsafe fn BCryptHashData(hhash: BCRYPT_HASH_HANDLE, pbinput: &[u8], dwflags: u32) -> super::super::Foundation::NTSTATUS { windows_targets::link!("bcrypt.dll" "system" fn BCryptHashData(hhash : BCRYPT_HASH_HANDLE, pbinput : *const u8, cbinput : u32, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - unsafe { BCryptHashData(core::mem::transmute(hhash), core::mem::transmute(pbinput.as_ptr()), pbinput.len().try_into().unwrap(), dwflags) } + unsafe { BCryptHashData(hhash as _, core::mem::transmute(pbinput.as_ptr()), pbinput.len().try_into().unwrap(), dwflags) } } #[inline] 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 @@ -259,7 +259,7 @@ where 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); - unsafe { BCryptImportKey(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(), dwflags) } + unsafe { BCryptImportKey(halgorithm, himportkey.unwrap_or(core::mem::zeroed()) as _, pszblobtype.param().abi(), phkey as _, 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(), dwflags) } } #[inline] 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 @@ -267,12 +267,12 @@ where 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); - unsafe { BCryptImportKeyPair(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(), dwflags) } + unsafe { BCryptImportKeyPair(halgorithm, himportkey.unwrap_or(core::mem::zeroed()) as _, pszblobtype.param().abi(), phkey as _, core::mem::transmute(pbinput.as_ptr()), pbinput.len().try_into().unwrap(), dwflags) } } #[inline] 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); - unsafe { BCryptKeyDerivation(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), dwflags) } + unsafe { BCryptKeyDerivation(hkey, pparameterlist.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pbderivedkey.as_ptr()), pbderivedkey.len().try_into().unwrap(), pcbresult as _, 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 @@ -281,12 +281,12 @@ where P2: windows_core::Param, { windows_targets::link!("bcrypt.dll" "system" fn BCryptOpenAlgorithmProvider(phalgorithm : *mut BCRYPT_ALG_HANDLE, pszalgid : windows_core::PCWSTR, pszimplementation : windows_core::PCWSTR, dwflags : BCRYPT_OPEN_ALGORITHM_PROVIDER_FLAGS) -> super::super::Foundation:: NTSTATUS); - unsafe { BCryptOpenAlgorithmProvider(core::mem::transmute(phalgorithm), pszalgid.param().abi(), pszimplementation.param().abi(), dwflags) } + unsafe { BCryptOpenAlgorithmProvider(phalgorithm as _, pszalgid.param().abi(), pszimplementation.param().abi(), dwflags) } } #[inline] pub unsafe fn BCryptProcessMultiOperations(hobject: BCRYPT_HANDLE, operationtype: BCRYPT_MULTI_OPERATION_TYPE, poperations: *const core::ffi::c_void, cboperations: u32, dwflags: u32) -> super::super::Foundation::NTSTATUS { windows_targets::link!("bcrypt.dll" "system" fn BCryptProcessMultiOperations(hobject : BCRYPT_HANDLE, operationtype : BCRYPT_MULTI_OPERATION_TYPE, poperations : *const core::ffi::c_void, cboperations : u32, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - unsafe { BCryptProcessMultiOperations(core::mem::transmute(hobject), operationtype, poperations, cboperations, dwflags) } + unsafe { BCryptProcessMultiOperations(hobject as _, operationtype, poperations, cboperations, dwflags) } } #[inline] pub unsafe fn BCryptQueryContextConfiguration(dwtable: BCRYPT_TABLE, pszcontext: P1, pcbbuffer: *mut u32, ppbuffer: Option<*mut *mut CRYPT_CONTEXT_CONFIG>) -> super::super::Foundation::NTSTATUS @@ -294,7 +294,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); - unsafe { BCryptQueryContextConfiguration(dwtable, pszcontext.param().abi(), core::mem::transmute(pcbbuffer), core::mem::transmute(ppbuffer.unwrap_or(core::mem::zeroed()))) } + unsafe { BCryptQueryContextConfiguration(dwtable, pszcontext.param().abi(), pcbbuffer as _, ppbuffer.unwrap_or(core::mem::zeroed()) as _) } } #[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 @@ -303,7 +303,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); - unsafe { BCryptQueryContextFunctionConfiguration(dwtable, pszcontext.param().abi(), dwinterface, pszfunction.param().abi(), core::mem::transmute(pcbbuffer), core::mem::transmute(ppbuffer.unwrap_or(core::mem::zeroed()))) } + unsafe { BCryptQueryContextFunctionConfiguration(dwtable, pszcontext.param().abi(), dwinterface, pszfunction.param().abi(), pcbbuffer as _, ppbuffer.unwrap_or(core::mem::zeroed()) as _) } } #[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 @@ -313,7 +313,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); - unsafe { BCryptQueryContextFunctionProperty(dwtable, pszcontext.param().abi(), dwinterface, pszfunction.param().abi(), pszproperty.param().abi(), core::mem::transmute(pcbvalue), core::mem::transmute(ppbvalue.unwrap_or(core::mem::zeroed()))) } + unsafe { BCryptQueryContextFunctionProperty(dwtable, pszcontext.param().abi(), dwinterface, pszfunction.param().abi(), pszproperty.param().abi(), pcbvalue as _, ppbvalue.unwrap_or(core::mem::zeroed()) as _) } } #[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 @@ -321,12 +321,12 @@ 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); - unsafe { BCryptQueryProviderRegistration(pszprovider.param().abi(), dwmode, dwinterface, core::mem::transmute(pcbbuffer), core::mem::transmute(ppbuffer.unwrap_or(core::mem::zeroed()))) } + unsafe { BCryptQueryProviderRegistration(pszprovider.param().abi(), dwmode, dwinterface, pcbbuffer as _, ppbuffer.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn BCryptRegisterConfigChangeNotify(phevent: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::NTSTATUS { windows_targets::link!("bcrypt.dll" "system" fn BCryptRegisterConfigChangeNotify(phevent : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: NTSTATUS); - unsafe { BCryptRegisterConfigChangeNotify(core::mem::transmute(phevent)) } + unsafe { BCryptRegisterConfigChangeNotify(phevent as _) } } #[inline] pub unsafe fn BCryptRegisterProvider(pszprovider: P0, dwflags: u32, preg: *const CRYPT_PROVIDER_REG) -> super::super::Foundation::NTSTATUS @@ -363,12 +363,12 @@ where 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); - unsafe { BCryptResolveProviders(pszcontext.param().abi(), core::mem::transmute(dwinterface.unwrap_or(core::mem::zeroed())), pszfunction.param().abi(), pszprovider.param().abi(), dwmode, dwflags, core::mem::transmute(pcbbuffer), core::mem::transmute(ppbuffer.unwrap_or(core::mem::zeroed()))) } + unsafe { BCryptResolveProviders(pszcontext.param().abi(), dwinterface.unwrap_or(core::mem::zeroed()) as _, pszfunction.param().abi(), pszprovider.param().abi(), dwmode, dwflags, pcbbuffer as _, ppbuffer.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { BCryptSecretAgreement(hprivkey, hpubkey, core::mem::transmute(phagreedsecret), dwflags) } + unsafe { BCryptSecretAgreement(hprivkey, hpubkey, phagreedsecret as _, 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 @@ -386,12 +386,12 @@ where P1: windows_core::Param, { windows_targets::link!("bcrypt.dll" "system" fn BCryptSetProperty(hobject : BCRYPT_HANDLE, pszproperty : windows_core::PCWSTR, pbinput : *const u8, cbinput : u32, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - unsafe { BCryptSetProperty(core::mem::transmute(hobject), pszproperty.param().abi(), core::mem::transmute(pbinput.as_ptr()), pbinput.len().try_into().unwrap(), dwflags) } + unsafe { BCryptSetProperty(hobject as _, pszproperty.param().abi(), core::mem::transmute(pbinput.as_ptr()), pbinput.len().try_into().unwrap(), dwflags) } } #[inline] 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); - unsafe { BCryptSignHash(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), dwflags) } + unsafe { BCryptSignHash(hkey, ppaddinginfo.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pbinput.as_ptr()), pbinput.len().try_into().unwrap(), core::mem::transmute(pboutput.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pboutput.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult as _, dwflags) } } #[inline] pub unsafe fn BCryptUnregisterConfigChangeNotify(hevent: super::super::Foundation::HANDLE) -> super::super::Foundation::NTSTATUS { @@ -409,52 +409,52 @@ where #[inline] 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); - unsafe { BCryptVerifySignature(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(), dwflags) } + unsafe { BCryptVerifySignature(hkey, ppaddinginfo.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap(), core::mem::transmute(pbsignature.as_ptr()), pbsignature.len().try_into().unwrap(), dwflags) } } #[inline] pub unsafe fn CertAddCRLContextToStore(hcertstore: 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); - unsafe { CertAddCRLContextToStore(core::mem::transmute(hcertstore.unwrap_or(core::mem::zeroed())), pcrlcontext, dwadddisposition, core::mem::transmute(ppstorecontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CertAddCRLContextToStore(hcertstore.unwrap_or(core::mem::zeroed()) as _, pcrlcontext, dwadddisposition, ppstorecontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { CertAddCRLLinkToStore(hcertstore, pcrlcontext, dwadddisposition, core::mem::transmute(ppstorecontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CertAddCRLLinkToStore(hcertstore, pcrlcontext, dwadddisposition, ppstorecontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { CertAddCTLContextToStore(core::mem::transmute(hcertstore.unwrap_or(core::mem::zeroed())), pctlcontext, dwadddisposition, core::mem::transmute(ppstorecontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CertAddCTLContextToStore(hcertstore.unwrap_or(core::mem::zeroed()) as _, pctlcontext, dwadddisposition, ppstorecontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { CertAddCTLLinkToStore(hcertstore, pctlcontext, dwadddisposition, core::mem::transmute(ppstorecontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CertAddCTLLinkToStore(hcertstore, pctlcontext, dwadddisposition, ppstorecontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { CertAddCertificateContextToStore(core::mem::transmute(hcertstore.unwrap_or(core::mem::zeroed())), pcertcontext, dwadddisposition, core::mem::transmute(ppstorecontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CertAddCertificateContextToStore(hcertstore.unwrap_or(core::mem::zeroed()) as _, pcertcontext, dwadddisposition, ppstorecontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { CertAddCertificateLinkToStore(hcertstore, pcertcontext, dwadddisposition, core::mem::transmute(ppstorecontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CertAddCertificateLinkToStore(hcertstore, pcertcontext, dwadddisposition, ppstorecontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { CertAddEncodedCRLToStore(core::mem::transmute(hcertstore.unwrap_or(core::mem::zeroed())), dwcertencodingtype, core::mem::transmute(pbcrlencoded.as_ptr()), pbcrlencoded.len().try_into().unwrap(), dwadddisposition, core::mem::transmute(ppcrlcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CertAddEncodedCRLToStore(hcertstore.unwrap_or(core::mem::zeroed()) as _, dwcertencodingtype, core::mem::transmute(pbcrlencoded.as_ptr()), pbcrlencoded.len().try_into().unwrap(), dwadddisposition, ppcrlcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { CertAddEncodedCTLToStore(core::mem::transmute(hcertstore.unwrap_or(core::mem::zeroed())), dwmsgandcertencodingtype, core::mem::transmute(pbctlencoded.as_ptr()), pbctlencoded.len().try_into().unwrap(), dwadddisposition, core::mem::transmute(ppctlcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CertAddEncodedCTLToStore(hcertstore.unwrap_or(core::mem::zeroed()) as _, dwmsgandcertencodingtype, core::mem::transmute(pbctlencoded.as_ptr()), pbctlencoded.len().try_into().unwrap(), dwadddisposition, ppctlcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { CertAddEncodedCertificateToStore(core::mem::transmute(hcertstore.unwrap_or(core::mem::zeroed())), dwcertencodingtype, core::mem::transmute(pbcertencoded.as_ptr()), pbcertencoded.len().try_into().unwrap(), dwadddisposition, core::mem::transmute(ppcertcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CertAddEncodedCertificateToStore(hcertstore.unwrap_or(core::mem::zeroed()) as _, dwcertencodingtype, core::mem::transmute(pbcertencoded.as_ptr()), pbcertencoded.len().try_into().unwrap(), dwadddisposition, ppcertcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CertAddEncodedCertificateToSystemStoreA(szcertstorename: P0, pbcertencoded: &[u8]) -> windows_core::Result<()> @@ -483,22 +483,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)); - unsafe { CertAddRefServerOcspResponse(core::mem::transmute(hserverocspresponse.unwrap_or(core::mem::zeroed()))) } + unsafe { CertAddRefServerOcspResponse(hserverocspresponse.unwrap_or(core::mem::zeroed()) as _) } } #[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)); - unsafe { CertAddRefServerOcspResponseContext(core::mem::transmute(pserverocspresponsecontext.unwrap_or(core::mem::zeroed()))) } + unsafe { CertAddRefServerOcspResponseContext(pserverocspresponsecontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { CertAddSerializedElementToStore(core::mem::transmute(hcertstore.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbelement.as_ptr()), pbelement.len().try_into().unwrap(), dwadddisposition, dwflags, dwcontexttypeflags, core::mem::transmute(pdwcontexttype.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppvcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CertAddSerializedElementToStore(hcertstore.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pbelement.as_ptr()), pbelement.len().try_into().unwrap(), dwadddisposition, dwflags, dwcontexttypeflags, pdwcontexttype.unwrap_or(core::mem::zeroed()) as _, ppvcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { CertAddStoreToCollection(hcollectionstore, core::mem::transmute(hsiblingstore.unwrap_or(core::mem::zeroed())), dwupdateflags, dwpriority) } + unsafe { CertAddStoreToCollection(hcollectionstore, hsiblingstore.unwrap_or(core::mem::zeroed()) as _, dwupdateflags, dwpriority) } } #[inline] pub unsafe fn CertAlgIdToOID(dwalgid: u32) -> windows_core::PCSTR { @@ -508,12 +508,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)); - unsafe { CertCloseServerOcspResponse(core::mem::transmute(hserverocspresponse.unwrap_or(core::mem::zeroed())), dwflags) } + unsafe { CertCloseServerOcspResponse(hserverocspresponse.unwrap_or(core::mem::zeroed()) as _, dwflags) } } #[inline] 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); - unsafe { CertCloseStore(core::mem::transmute(hcertstore.unwrap_or(core::mem::zeroed())), dwflags).ok() } + unsafe { CertCloseStore(hcertstore.unwrap_or(core::mem::zeroed()) as _, dwflags).ok() } } #[inline] pub unsafe fn CertCompareCertificate(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pcertid1: *const CERT_INFO, pcertid2: *const CERT_INFO) -> super::super::Foundation::BOOL { @@ -538,7 +538,7 @@ pub unsafe fn CertComparePublicKeyInfo(dwcertencodingtype: CERT_QUERY_ENCODING_T #[inline] 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); - unsafe { CertControlStore(hcertstore, dwflags, dwctrltype, core::mem::transmute(pvctrlpara.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CertControlStore(hcertstore, dwflags, dwctrltype, pvctrlpara.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CertCreateCRLContext(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pbcrlencoded: &[u8]) -> *mut CRL_CONTEXT { @@ -553,12 +553,12 @@ 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); - unsafe { CertCreateCTLEntryFromCertificateContextProperties(pcertcontext, rgoptattr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgoptattr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), dwflags, core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pctlentry.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbctlentry)).ok() } + unsafe { CertCreateCTLEntryFromCertificateContextProperties(pcertcontext, rgoptattr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgoptattr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), dwflags, pvreserved.unwrap_or(core::mem::zeroed()) as _, pctlentry.unwrap_or(core::mem::zeroed()) as _, pcbctlentry as _).ok() } } #[inline] pub unsafe fn CertCreateCertificateChainEngine(pconfig: *const CERT_CHAIN_ENGINE_CONFIG, phchainengine: *mut HCERTCHAINENGINE) -> windows_core::Result<()> { windows_targets::link!("crypt32.dll" "system" fn CertCreateCertificateChainEngine(pconfig : *const CERT_CHAIN_ENGINE_CONFIG, phchainengine : *mut HCERTCHAINENGINE) -> super::super::Foundation:: BOOL); - unsafe { CertCreateCertificateChainEngine(pconfig, core::mem::transmute(phchainengine)).ok() } + unsafe { CertCreateCertificateChainEngine(pconfig, phchainengine as _).ok() } } #[inline] pub unsafe fn CertCreateCertificateContext(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pbcertencoded: &[u8]) -> *mut CERT_CONTEXT { @@ -568,12 +568,12 @@ 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); - unsafe { CertCreateContext(dwcontexttype, dwencodingtype, core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), dwflags, core::mem::transmute(pcreatepara.unwrap_or(core::mem::zeroed()))) } + unsafe { CertCreateContext(dwcontexttype, dwencodingtype, core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), dwflags, pcreatepara.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { CertCreateSelfSignCertificate(core::mem::transmute(hcryptprovorncryptkey.unwrap_or(core::mem::zeroed())), psubjectissuerblob, 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()))) } + unsafe { CertCreateSelfSignCertificate(hcryptprovorncryptkey.unwrap_or(core::mem::zeroed()) as _, psubjectissuerblob, dwflags, pkeyprovinfo.unwrap_or(core::mem::zeroed()) as _, psignaturealgorithm.unwrap_or(core::mem::zeroed()) as _, pstarttime.unwrap_or(core::mem::zeroed()) as _, pendtime.unwrap_or(core::mem::zeroed()) as _, pextensions.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CertDeleteCRLFromStore(pcrlcontext: *const CRL_CONTEXT) -> windows_core::Result<()> { @@ -593,12 +593,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); - unsafe { CertDuplicateCRLContext(core::mem::transmute(pcrlcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { CertDuplicateCRLContext(pcrlcontext.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CertDuplicateCTLContext(core::mem::transmute(pctlcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { CertDuplicateCTLContext(pctlcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CertDuplicateCertificateChain(pchaincontext: *const CERT_CHAIN_CONTEXT) -> *mut CERT_CHAIN_CONTEXT { @@ -608,7 +608,7 @@ pub unsafe fn CertDuplicateCertificateChain(pchaincontext: *const CERT_CHAIN_CON #[inline] pub unsafe fn CertDuplicateCertificateContext(pcertcontext: Option<*const CERT_CONTEXT>) -> *mut CERT_CONTEXT { windows_targets::link!("crypt32.dll" "system" fn CertDuplicateCertificateContext(pcertcontext : *const CERT_CONTEXT) -> *mut CERT_CONTEXT); - unsafe { CertDuplicateCertificateContext(core::mem::transmute(pcertcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { CertDuplicateCertificateContext(pcertcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CertDuplicateStore(hcertstore: HCERTSTORE) -> HCERTSTORE { @@ -623,7 +623,7 @@ pub unsafe fn CertEnumCRLContextProperties(pcrlcontext: *const CRL_CONTEXT, dwpr #[inline] 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); - unsafe { CertEnumCRLsInStore(hcertstore, core::mem::transmute(pprevcrlcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { CertEnumCRLsInStore(hcertstore, pprevcrlcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CertEnumCTLContextProperties(pctlcontext: *const CTL_CONTEXT, dwpropid: u32) -> u32 { @@ -633,7 +633,7 @@ pub unsafe fn CertEnumCTLContextProperties(pctlcontext: *const CTL_CONTEXT, dwpr #[inline] 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); - unsafe { CertEnumCTLsInStore(hcertstore, core::mem::transmute(pprevctlcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { CertEnumCTLsInStore(hcertstore, pprevctlcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CertEnumCertificateContextProperties(pcertcontext: *const CERT_CONTEXT, dwpropid: u32) -> u32 { @@ -643,27 +643,27 @@ pub unsafe fn CertEnumCertificateContextProperties(pcertcontext: *const CERT_CON #[inline] 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); - unsafe { CertEnumCertificatesInStore(hcertstore, core::mem::transmute(pprevcertcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { CertEnumCertificatesInStore(hcertstore, pprevcertcontext.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CertEnumPhysicalStore(pvsystemstore, dwflags, core::mem::transmute(pvarg.unwrap_or(core::mem::zeroed())), pfnenum).ok() } + unsafe { CertEnumPhysicalStore(pvsystemstore, dwflags, pvarg.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { CertEnumSubjectInSortedCTL(pctlcontext, core::mem::transmute(ppvnextsubject), core::mem::transmute(psubjectidentifier.unwrap_or(core::mem::zeroed())), core::mem::transmute(pencodedattributes.unwrap_or(core::mem::zeroed()))) } + unsafe { CertEnumSubjectInSortedCTL(pctlcontext, ppvnextsubject as _, psubjectidentifier.unwrap_or(core::mem::zeroed()) as _, pencodedattributes.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CertEnumSystemStore(dwflags, core::mem::transmute(pvsystemstorelocationpara.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvarg.unwrap_or(core::mem::zeroed())), pfnenum) } + unsafe { CertEnumSystemStore(dwflags, pvsystemstorelocationpara.unwrap_or(core::mem::zeroed()) as _, pvarg.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { CertEnumSystemStoreLocation(dwflags, core::mem::transmute(pvarg.unwrap_or(core::mem::zeroed())), pfnenum) } + unsafe { CertEnumSystemStoreLocation(dwflags, pvarg.unwrap_or(core::mem::zeroed()) as _, pfnenum) } } #[inline] pub unsafe fn CertFindAttribute(pszobjid: P0, rgattr: &[CRYPT_ATTRIBUTE]) -> *mut CRYPT_ATTRIBUTE @@ -676,27 +676,27 @@ where #[inline] 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); - unsafe { CertFindCRLInStore(hcertstore, dwcertencodingtype, dwfindflags, dwfindtype, core::mem::transmute(pvfindpara.unwrap_or(core::mem::zeroed())), core::mem::transmute(pprevcrlcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { CertFindCRLInStore(hcertstore, dwcertencodingtype, dwfindflags, dwfindtype, pvfindpara.unwrap_or(core::mem::zeroed()) as _, pprevcrlcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { CertFindCTLInStore(hcertstore, dwmsgandcertencodingtype, dwfindflags, dwfindtype, core::mem::transmute(pvfindpara.unwrap_or(core::mem::zeroed())), core::mem::transmute(pprevctlcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { CertFindCTLInStore(hcertstore, dwmsgandcertencodingtype, dwfindflags, dwfindtype, pvfindpara.unwrap_or(core::mem::zeroed()) as _, pprevctlcontext.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CertFindCertificateInCRL(pcert, pcrlcontext, dwflags, core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppcrlentry)) } + unsafe { CertFindCertificateInCRL(pcert, pcrlcontext, dwflags, pvreserved.unwrap_or(core::mem::zeroed()) as _, ppcrlentry as _) } } #[inline] 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); - unsafe { CertFindCertificateInStore(hcertstore, dwcertencodingtype, dwfindflags, dwfindtype, core::mem::transmute(pvfindpara.unwrap_or(core::mem::zeroed())), core::mem::transmute(pprevcertcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { CertFindCertificateInStore(hcertstore, dwcertencodingtype, dwfindflags, dwfindtype, pvfindpara.unwrap_or(core::mem::zeroed()) as _, pprevcertcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { CertFindChainInStore(hcertstore, dwcertencodingtype, dwfindflags, dwfindtype, core::mem::transmute(pvfindpara.unwrap_or(core::mem::zeroed())), core::mem::transmute(pprevchaincontext.unwrap_or(core::mem::zeroed()))) } + unsafe { CertFindChainInStore(hcertstore, dwcertencodingtype, dwfindflags, dwfindtype, pvfindpara.unwrap_or(core::mem::zeroed()) as _, pprevchaincontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CertFindExtension(pszobjid: P0, rgextensions: &[CERT_EXTENSION]) -> *mut CERT_EXTENSION @@ -722,17 +722,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); - unsafe { CertFindSubjectInSortedCTL(psubjectidentifier, pctlcontext, dwflags, core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pencodedattributes.unwrap_or(core::mem::zeroed()))) } + unsafe { CertFindSubjectInSortedCTL(psubjectidentifier, pctlcontext, dwflags, pvreserved.unwrap_or(core::mem::zeroed()) as _, pencodedattributes.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CertFreeCRLContext(core::mem::transmute(pcrlcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { CertFreeCRLContext(pcrlcontext.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CertFreeCTLContext(core::mem::transmute(pctlcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { CertFreeCTLContext(pctlcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CertFreeCertificateChain(pchaincontext: *const CERT_CHAIN_CONTEXT) { @@ -742,7 +742,7 @@ pub unsafe fn CertFreeCertificateChain(pchaincontext: *const CERT_CHAIN_CONTEXT) #[inline] pub unsafe fn CertFreeCertificateChainEngine(hchainengine: Option) { windows_targets::link!("crypt32.dll" "system" fn CertFreeCertificateChainEngine(hchainengine : HCERTCHAINENGINE)); - unsafe { CertFreeCertificateChainEngine(core::mem::transmute(hchainengine.unwrap_or(core::mem::zeroed()))) } + unsafe { CertFreeCertificateChainEngine(hchainengine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CertFreeCertificateChainList(prgpselection: *const *const CERT_CHAIN_CONTEXT) { @@ -752,42 +752,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); - unsafe { CertFreeCertificateContext(core::mem::transmute(pcertcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { CertFreeCertificateContext(pcertcontext.unwrap_or(core::mem::zeroed()) as _) } } #[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)); - unsafe { CertFreeServerOcspResponseContext(core::mem::transmute(pserverocspresponsecontext.unwrap_or(core::mem::zeroed()))) } + unsafe { CertFreeServerOcspResponseContext(pserverocspresponsecontext.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CertGetCRLContextProperty(pcrlcontext, dwpropid, core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata)).ok() } + unsafe { CertGetCRLContextProperty(pcrlcontext, dwpropid, pvdata.unwrap_or(core::mem::zeroed()) as _, pcbdata as _).ok() } } #[inline] 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); - unsafe { CertGetCRLFromStore(hcertstore, core::mem::transmute(pissuercontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(pprevcrlcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwflags)) } + unsafe { CertGetCRLFromStore(hcertstore, pissuercontext.unwrap_or(core::mem::zeroed()) as _, pprevcrlcontext.unwrap_or(core::mem::zeroed()) as _, pdwflags as _) } } #[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); - unsafe { CertGetCTLContextProperty(pctlcontext, dwpropid, core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata)).ok() } + unsafe { CertGetCTLContextProperty(pctlcontext, dwpropid, pvdata.unwrap_or(core::mem::zeroed()) as _, pcbdata as _).ok() } } #[inline] 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); - unsafe { CertGetCertificateChain(core::mem::transmute(hchainengine.unwrap_or(core::mem::zeroed())), pcertcontext, core::mem::transmute(ptime.unwrap_or(core::mem::zeroed())), core::mem::transmute(hadditionalstore.unwrap_or(core::mem::zeroed())), pchainpara, dwflags, core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppchaincontext)).ok() } + unsafe { CertGetCertificateChain(hchainengine.unwrap_or(core::mem::zeroed()) as _, pcertcontext, ptime.unwrap_or(core::mem::zeroed()) as _, hadditionalstore.unwrap_or(core::mem::zeroed()) as _, pchainpara, dwflags, pvreserved.unwrap_or(core::mem::zeroed()) as _, ppchaincontext as _).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); - unsafe { CertGetCertificateContextProperty(pcertcontext, dwpropid, core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata)).ok() } + unsafe { CertGetCertificateContextProperty(pcertcontext, dwpropid, pvdata.unwrap_or(core::mem::zeroed()) as _, pcbdata as _).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); - unsafe { CertGetEnhancedKeyUsage(pcertcontext, dwflags, core::mem::transmute(pusage.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbusage)).ok() } + unsafe { CertGetEnhancedKeyUsage(pcertcontext, dwflags, pusage.unwrap_or(core::mem::zeroed()) as _, pcbusage as _).ok() } } #[inline] pub unsafe fn CertGetIntendedKeyUsage(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pcertinfo: *const CERT_INFO, pbkeyusage: &mut [u8]) -> windows_core::Result<()> { @@ -797,17 +797,17 @@ pub unsafe fn CertGetIntendedKeyUsage(dwcertencodingtype: CERT_QUERY_ENCODING_TY #[inline] 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); - unsafe { CertGetIssuerCertificateFromStore(hcertstore, psubjectcontext, core::mem::transmute(pprevissuercontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwflags)) } + unsafe { CertGetIssuerCertificateFromStore(hcertstore, psubjectcontext, pprevissuercontext.unwrap_or(core::mem::zeroed()) as _, pdwflags as _) } } #[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); - unsafe { CertGetNameStringA(pcertcontext, dwtype, 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())) } + unsafe { CertGetNameStringA(pcertcontext, dwtype, dwflags, pvtypepara.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { CertGetNameStringW(pcertcontext, dwtype, 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())) } + unsafe { CertGetNameStringW(pcertcontext, dwtype, dwflags, pvtypepara.unwrap_or(core::mem::zeroed()) as _, 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 { @@ -817,12 +817,12 @@ 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); - unsafe { CertGetServerOcspResponseContext(hserverocspresponse, dwflags, core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { CertGetServerOcspResponseContext(hserverocspresponse, dwflags, pvreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { CertGetStoreProperty(hcertstore, dwpropid, core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata)).ok() } + unsafe { CertGetStoreProperty(hcertstore, dwpropid, pvdata.unwrap_or(core::mem::zeroed()) as _, pcbdata as _).ok() } } #[inline] pub unsafe fn CertGetSubjectCertificateFromStore(hcertstore: HCERTSTORE, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pcertid: *const CERT_INFO) -> *mut CERT_CONTEXT { @@ -832,7 +832,7 @@ pub unsafe fn CertGetSubjectCertificateFromStore(hcertstore: HCERTSTORE, dwcerte #[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); - unsafe { 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() } + unsafe { CertGetValidUsages(rghcerts.len().try_into().unwrap(), core::mem::transmute(rghcerts.as_ptr()), cnumoids as _, rghoids.unwrap_or(core::mem::zeroed()) as _, pcboids as _).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<()> { @@ -845,12 +845,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); - unsafe { CertIsStrongHashToSign(pstrongsignpara, pwszcnghashalgid.param().abi(), core::mem::transmute(psigningcert.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CertIsStrongHashToSign(pstrongsignpara, pwszcnghashalgid.param().abi(), psigningcert.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { CertIsValidCRLForCertificate(pcert, pcrl, dwflags, core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { CertIsValidCRLForCertificate(pcert, pcrl, dwflags, pvreserved.unwrap_or(core::mem::zeroed()) as _) } } #[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 @@ -859,7 +859,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); - unsafe { CertIsWeakHash(dwhashusetype, pwszcnghashalgid.param().abi(), dwchainflags, core::mem::transmute(psignerchaincontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(ptimestamp.unwrap_or(core::mem::zeroed())), pwszfilename.param().abi()) } + unsafe { CertIsWeakHash(dwhashusetype, pwszcnghashalgid.param().abi(), dwchainflags, psignerchaincontext.unwrap_or(core::mem::zeroed()) as _, ptimestamp.unwrap_or(core::mem::zeroed()) as _, 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 { @@ -882,7 +882,7 @@ where #[inline] pub unsafe fn CertOpenServerOcspResponse(pchaincontext: *const CERT_CHAIN_CONTEXT, dwflags: u32, popenpara: Option<*const CERT_SERVER_OCSP_RESPONSE_OPEN_PARA>) -> *mut core::ffi::c_void { windows_targets::link!("crypt32.dll" "system" fn CertOpenServerOcspResponse(pchaincontext : *const CERT_CHAIN_CONTEXT, dwflags : u32, popenpara : *const CERT_SERVER_OCSP_RESPONSE_OPEN_PARA) -> *mut core::ffi::c_void); - unsafe { CertOpenServerOcspResponse(pchaincontext, dwflags, core::mem::transmute(popenpara.unwrap_or(core::mem::zeroed()))) } + unsafe { CertOpenServerOcspResponse(pchaincontext, dwflags, popenpara.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -890,7 +890,7 @@ where P0: 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__ = unsafe { CertOpenStore(lpszstoreprovider.param().abi(), dwencodingtype, core::mem::transmute(hcryptprov.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(pvpara.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { CertOpenStore(lpszstoreprovider.param().abi(), dwencodingtype, hcryptprov.unwrap_or(core::mem::zeroed()) as _, dwflags, pvpara.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -899,7 +899,7 @@ where P1: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CertOpenSystemStoreA(hprov : HCRYPTPROV_LEGACY, szsubsystemprotocol : windows_core::PCSTR) -> HCERTSTORE); - let result__ = unsafe { CertOpenSystemStoreA(core::mem::transmute(hprov.unwrap_or(core::mem::zeroed())), szsubsystemprotocol.param().abi()) }; + let result__ = unsafe { CertOpenSystemStoreA(hprov.unwrap_or(core::mem::zeroed()) as _, szsubsystemprotocol.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -908,7 +908,7 @@ where P1: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CertOpenSystemStoreW(hprov : HCRYPTPROV_LEGACY, szsubsystemprotocol : windows_core::PCWSTR) -> HCERTSTORE); - let result__ = unsafe { CertOpenSystemStoreW(core::mem::transmute(hprov.unwrap_or(core::mem::zeroed())), szsubsystemprotocol.param().abi()) }; + let result__ = unsafe { CertOpenSystemStoreW(hprov.unwrap_or(core::mem::zeroed()) as _, szsubsystemprotocol.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -927,12 +927,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); - unsafe { CertRegisterPhysicalStore(pvsystemstore, dwflags, pwszstorename.param().abi(), pstoreinfo, core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { CertRegisterPhysicalStore(pvsystemstore, dwflags, pwszstorename.param().abi(), pstoreinfo, pvreserved.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CertRegisterSystemStore(pvsystemstore, dwflags, core::mem::transmute(pstoreinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { CertRegisterSystemStore(pvsystemstore, dwflags, pstoreinfo.unwrap_or(core::mem::zeroed()) as _, pvreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CertRemoveEnhancedKeyUsageIdentifier(pcertcontext: *const CERT_CONTEXT, pszusageidentifier: P1) -> windows_core::Result<()> @@ -950,7 +950,7 @@ pub unsafe fn CertRemoveStoreFromCollection(hcollectionstore: HCERTSTORE, hsibli #[inline] pub unsafe fn CertResyncCertificateChainEngine(hchainengine: Option) -> windows_core::Result<()> { windows_targets::link!("crypt32.dll" "system" fn CertResyncCertificateChainEngine(hchainengine : HCERTCHAINENGINE) -> super::super::Foundation:: BOOL); - unsafe { CertResyncCertificateChainEngine(core::mem::transmute(hchainengine.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CertResyncCertificateChainEngine(hchainengine.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -958,42 +958,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); - unsafe { CertRetrieveLogoOrBiometricInfo(pcertcontext, lpszlogoorbiometrictype.param().abi(), dwretrievalflags, dwtimeout, 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() } + unsafe { CertRetrieveLogoOrBiometricInfo(pcertcontext, lpszlogoorbiometrictype.param().abi(), dwretrievalflags, dwtimeout, dwflags, pvreserved.unwrap_or(core::mem::zeroed()) as _, ppbdata as _, pcbdata as _, ppwszmimetype.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { CertSaveStore(hcertstore, dwencodingtype, dwsaveas, dwsaveto, core::mem::transmute(pvsavetopara), dwflags).ok() } + unsafe { CertSaveStore(hcertstore, dwencodingtype, dwsaveas, dwsaveto, pvsavetopara as _, 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: 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); - unsafe { CertSelectCertificateChains(core::mem::transmute(pselectioncontext.unwrap_or(core::mem::zeroed())), 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())), hstore, core::mem::transmute(pcselection), core::mem::transmute(pprgpselection)).ok() } + unsafe { CertSelectCertificateChains(pselectioncontext.unwrap_or(core::mem::zeroed()) as _, dwflags, pchainparameters.unwrap_or(core::mem::zeroed()) as _, 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, pcselection as _, pprgpselection as _).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); - unsafe { CertSerializeCRLStoreElement(pcrlcontext, dwflags, core::mem::transmute(pbelement.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbelement)).ok() } + unsafe { CertSerializeCRLStoreElement(pcrlcontext, dwflags, pbelement.unwrap_or(core::mem::zeroed()) as _, pcbelement as _).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); - unsafe { CertSerializeCTLStoreElement(pctlcontext, dwflags, core::mem::transmute(pbelement.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbelement)).ok() } + unsafe { CertSerializeCTLStoreElement(pctlcontext, dwflags, pbelement.unwrap_or(core::mem::zeroed()) as _, pcbelement as _).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); - unsafe { CertSerializeCertificateStoreElement(pcertcontext, dwflags, core::mem::transmute(pbelement.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbelement)).ok() } + unsafe { CertSerializeCertificateStoreElement(pcertcontext, dwflags, pbelement.unwrap_or(core::mem::zeroed()) as _, pcbelement as _).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); - unsafe { CertSetCRLContextProperty(pcrlcontext, dwpropid, dwflags, core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CertSetCRLContextProperty(pcrlcontext, dwpropid, dwflags, pvdata.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { CertSetCTLContextProperty(pctlcontext, dwpropid, dwflags, core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CertSetCTLContextProperty(pctlcontext, dwpropid, dwflags, pvdata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CertSetCertificateContextPropertiesFromCTLEntry(pcertcontext: *const CERT_CONTEXT, pctlentry: *const CTL_ENTRY, dwflags: u32) -> windows_core::Result<()> { @@ -1003,17 +1003,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); - unsafe { CertSetCertificateContextProperty(pcertcontext, dwpropid, dwflags, core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CertSetCertificateContextProperty(pcertcontext, dwpropid, dwflags, pvdata.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { CertSetEnhancedKeyUsage(pcertcontext, core::mem::transmute(pusage.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CertSetEnhancedKeyUsage(pcertcontext, pusage.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { CertSetStoreProperty(hcertstore, dwpropid, dwflags, core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed()))) } + unsafe { CertSetStoreProperty(hcertstore, dwpropid, dwflags, pvdata.unwrap_or(core::mem::zeroed()) as _) } } #[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<()> @@ -1021,7 +1021,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); - unsafe { CertStrToNameA(dwcertencodingtype, pszx500.param().abi(), 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() } + unsafe { CertStrToNameA(dwcertencodingtype, pszx500.param().abi(), dwstrtype, pvreserved.unwrap_or(core::mem::zeroed()) as _, pbencoded.unwrap_or(core::mem::zeroed()) as _, pcbencoded as _, ppszerror.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -1029,7 +1029,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); - unsafe { CertStrToNameW(dwcertencodingtype, pszx500.param().abi(), 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() } + unsafe { CertStrToNameW(dwcertencodingtype, pszx500.param().abi(), dwstrtype, pvreserved.unwrap_or(core::mem::zeroed()) as _, pbencoded.unwrap_or(core::mem::zeroed()) as _, pcbencoded as _, ppszerror.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CertUnregisterPhysicalStore(pvsystemstore: *const core::ffi::c_void, dwflags: u32, pwszstorename: P2) -> super::super::Foundation::BOOL @@ -1052,12 +1052,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); - unsafe { CertVerifyCRLTimeValidity(core::mem::transmute(ptimetoverify.unwrap_or(core::mem::zeroed())), pcrlinfo) } + unsafe { CertVerifyCRLTimeValidity(ptimetoverify.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { CertVerifyCTLUsage(dwencodingtype, dwsubjecttype, pvsubject, psubjectusage, dwflags, core::mem::transmute(pverifyusagepara.unwrap_or(core::mem::zeroed())), core::mem::transmute(pverifyusagestatus)).ok() } + unsafe { CertVerifyCTLUsage(dwencodingtype, dwsubjecttype, pvsubject, psubjectusage, dwflags, pverifyusagepara.unwrap_or(core::mem::zeroed()) as _, pverifyusagestatus as _).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 @@ -1065,22 +1065,22 @@ where P0: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CertVerifyCertificateChainPolicy(pszpolicyoid : windows_core::PCSTR, pchaincontext : *const CERT_CHAIN_CONTEXT, ppolicypara : *const CERT_CHAIN_POLICY_PARA, ppolicystatus : *mut CERT_CHAIN_POLICY_STATUS) -> super::super::Foundation:: BOOL); - unsafe { CertVerifyCertificateChainPolicy(pszpolicyoid.param().abi(), pchaincontext, ppolicypara, core::mem::transmute(ppolicystatus)) } + unsafe { CertVerifyCertificateChainPolicy(pszpolicyoid.param().abi(), pchaincontext, ppolicypara, ppolicystatus as _) } } #[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); - unsafe { CertVerifyRevocation(dwencodingtype, dwrevtype, rgpvcontext.len().try_into().unwrap(), core::mem::transmute(rgpvcontext.as_ptr()), dwflags, core::mem::transmute(prevpara.unwrap_or(core::mem::zeroed())), core::mem::transmute(prevstatus)).ok() } + unsafe { CertVerifyRevocation(dwencodingtype, dwrevtype, rgpvcontext.len().try_into().unwrap(), core::mem::transmute(rgpvcontext.as_ptr()), dwflags, prevpara.unwrap_or(core::mem::zeroed()) as _, prevstatus as _).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); - unsafe { CertVerifySubjectCertificateContext(psubject, core::mem::transmute(pissuer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwflags)).ok() } + unsafe { CertVerifySubjectCertificateContext(psubject, pissuer.unwrap_or(core::mem::zeroed()) as _, pdwflags as _).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); - unsafe { CertVerifyTimeValidity(core::mem::transmute(ptimetoverify.unwrap_or(core::mem::zeroed())), pcertinfo) } + unsafe { CertVerifyTimeValidity(ptimetoverify.unwrap_or(core::mem::zeroed()) as _, pcertinfo) } } #[inline] pub unsafe fn CertVerifyValidityNesting(psubjectinfo: *const CERT_INFO, pissuerinfo: *const CERT_INFO) -> super::super::Foundation::BOOL { @@ -1095,7 +1095,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); - unsafe { CryptAcquireCertificatePrivateKey(pcert, 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() } + unsafe { CryptAcquireCertificatePrivateKey(pcert, dwflags, pvparameters.unwrap_or(core::mem::zeroed()) as _, phcryptprovorncryptkey as _, pdwkeyspec.unwrap_or(core::mem::zeroed()) as _, pfcallerfreeprovorncryptkey.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CryptAcquireContextA(phprov: *mut usize, szcontainer: P1, szprovider: P2, dwprovtype: u32, dwflags: u32) -> windows_core::Result<()> @@ -1104,7 +1104,7 @@ where P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn CryptAcquireContextA(phprov : *mut usize, szcontainer : windows_core::PCSTR, szprovider : windows_core::PCSTR, dwprovtype : u32, dwflags : u32) -> super::super::Foundation:: BOOL); - unsafe { CryptAcquireContextA(core::mem::transmute(phprov), szcontainer.param().abi(), szprovider.param().abi(), dwprovtype, dwflags).ok() } + unsafe { CryptAcquireContextA(phprov as _, szcontainer.param().abi(), szprovider.param().abi(), dwprovtype, dwflags).ok() } } #[inline] pub unsafe fn CryptAcquireContextW(phprov: *mut usize, szcontainer: P1, szprovider: P2, dwprovtype: u32, dwflags: u32) -> windows_core::Result<()> @@ -1113,37 +1113,37 @@ where P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn CryptAcquireContextW(phprov : *mut usize, szcontainer : windows_core::PCWSTR, szprovider : windows_core::PCWSTR, dwprovtype : u32, dwflags : u32) -> super::super::Foundation:: BOOL); - unsafe { CryptAcquireContextW(core::mem::transmute(phprov), szcontainer.param().abi(), szprovider.param().abi(), dwprovtype, dwflags).ok() } + unsafe { CryptAcquireContextW(phprov as _, szcontainer.param().abi(), szprovider.param().abi(), dwprovtype, dwflags).ok() } } #[inline] 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); - unsafe { CryptBinaryToStringA(core::mem::transmute(pbbinary.as_ptr()), pbbinary.len().try_into().unwrap(), dwflags, core::mem::transmute(pszstring.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchstring)) } + unsafe { CryptBinaryToStringA(core::mem::transmute(pbbinary.as_ptr()), pbbinary.len().try_into().unwrap(), dwflags, pszstring.unwrap_or(core::mem::zeroed()) as _, pcchstring as _) } } #[inline] 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); - unsafe { CryptBinaryToStringW(core::mem::transmute(pbbinary.as_ptr()), pbbinary.len().try_into().unwrap(), dwflags, core::mem::transmute(pszstring.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchstring)) } + unsafe { CryptBinaryToStringW(core::mem::transmute(pbbinary.as_ptr()), pbbinary.len().try_into().unwrap(), dwflags, pszstring.unwrap_or(core::mem::zeroed()) as _, pcchstring as _) } } #[inline] pub unsafe fn CryptCloseAsyncHandle(hasync: Option) -> super::super::Foundation::BOOL { windows_targets::link!("crypt32.dll" "system" fn CryptCloseAsyncHandle(hasync : HCRYPTASYNC) -> super::super::Foundation:: BOOL); - unsafe { CryptCloseAsyncHandle(core::mem::transmute(hasync.unwrap_or(core::mem::zeroed()))) } + unsafe { CryptCloseAsyncHandle(hasync.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CryptContextAddRef(hprov, core::mem::transmute(pdwreserved.unwrap_or(core::mem::zeroed())), dwflags).ok() } + unsafe { CryptContextAddRef(hprov, pdwreserved.unwrap_or(core::mem::zeroed()) as _, dwflags).ok() } } #[inline] pub unsafe fn CryptCreateAsyncHandle(dwflags: u32, phasync: *mut HCRYPTASYNC) -> super::super::Foundation::BOOL { windows_targets::link!("crypt32.dll" "system" fn CryptCreateAsyncHandle(dwflags : u32, phasync : *mut HCRYPTASYNC) -> super::super::Foundation:: BOOL); - unsafe { CryptCreateAsyncHandle(dwflags, core::mem::transmute(phasync)) } + unsafe { CryptCreateAsyncHandle(dwflags, phasync as _) } } #[inline] pub unsafe fn CryptCreateHash(hprov: usize, algid: ALG_ID, hkey: usize, dwflags: u32, phhash: *mut usize) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn CryptCreateHash(hprov : usize, algid : ALG_ID, hkey : usize, dwflags : u32, phhash : *mut usize) -> super::super::Foundation:: BOOL); - unsafe { CryptCreateHash(hprov, algid, hkey, dwflags, core::mem::transmute(phhash)).ok() } + unsafe { CryptCreateHash(hprov, algid, hkey, dwflags, phhash as _).ok() } } #[inline] pub unsafe fn CryptCreateKeyIdentifierFromCSP(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pszpubkeyoid: P1, ppubkeystruc: *const PUBLICKEYSTRUC, cbpubkeystruc: u32, dwflags: u32, pvreserved: Option<*const core::ffi::c_void>, pbhash: Option<*mut u8>, pcbhash: *mut u32) -> windows_core::Result<()> @@ -1151,7 +1151,7 @@ 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); - unsafe { CryptCreateKeyIdentifierFromCSP(dwcertencodingtype, pszpubkeyoid.param().abi(), ppubkeystruc, cbpubkeystruc, dwflags, core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbhash.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbhash)).ok() } + unsafe { CryptCreateKeyIdentifierFromCSP(dwcertencodingtype, pszpubkeyoid.param().abi(), ppubkeystruc, cbpubkeystruc, dwflags, pvreserved.unwrap_or(core::mem::zeroed()) as _, pbhash.unwrap_or(core::mem::zeroed()) as _, pcbhash as _).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<()> { @@ -1159,18 +1159,18 @@ pub unsafe fn CryptDecodeMessage(dwmsgtypeflags: u32, pdecryptpara: Option<*cons unsafe { CryptDecodeMessage( dwmsgtypeflags, - core::mem::transmute(pdecryptpara.unwrap_or(core::mem::zeroed())), - core::mem::transmute(pverifypara.unwrap_or(core::mem::zeroed())), + pdecryptpara.unwrap_or(core::mem::zeroed()) as _, + pverifypara.unwrap_or(core::mem::zeroed()) as _, dwsignerindex, core::mem::transmute(pbencodedblob.as_ptr()), pbencodedblob.len().try_into().unwrap(), dwprevinnercontenttype, - 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())), + pdwmsgtype.unwrap_or(core::mem::zeroed()) as _, + pdwinnercontenttype.unwrap_or(core::mem::zeroed()) as _, + pbdecoded.unwrap_or(core::mem::zeroed()) as _, + pcbdecoded.unwrap_or(core::mem::zeroed()) as _, + ppxchgcert.unwrap_or(core::mem::zeroed()) as _, + ppsignercert.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -1181,7 +1181,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); - unsafe { CryptDecodeObject(dwcertencodingtype, lpszstructtype.param().abi(), core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), dwflags, core::mem::transmute(pvstructinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbstructinfo)).ok() } + unsafe { CryptDecodeObject(dwcertencodingtype, lpszstructtype.param().abi(), core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), dwflags, pvstructinfo.unwrap_or(core::mem::zeroed()) as _, pcbstructinfo as _).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<()> @@ -1189,27 +1189,27 @@ 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); - unsafe { CryptDecodeObjectEx(dwcertencodingtype, lpszstructtype.param().abi(), core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), dwflags, core::mem::transmute(pdecodepara.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvstructinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbstructinfo)).ok() } + unsafe { CryptDecodeObjectEx(dwcertencodingtype, lpszstructtype.param().abi(), core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), dwflags, pdecodepara.unwrap_or(core::mem::zeroed()) as _, pvstructinfo.unwrap_or(core::mem::zeroed()) as _, pcbstructinfo as _).ok() } } #[inline] pub unsafe fn CryptDecrypt(hkey: usize, hhash: usize, r#final: bool, dwflags: u32, pbdata: *mut u8, pdwdatalen: *mut u32) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn CryptDecrypt(hkey : usize, hhash : usize, r#final : super::super::Foundation:: BOOL, dwflags : u32, pbdata : *mut u8, pdwdatalen : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { CryptDecrypt(hkey, hhash, r#final.into(), dwflags, core::mem::transmute(pbdata), core::mem::transmute(pdwdatalen)).ok() } + unsafe { CryptDecrypt(hkey, hhash, r#final.into(), dwflags, pbdata as _, pdwdatalen as _).ok() } } #[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); - unsafe { CryptDecryptAndVerifyMessageSignature(pdecryptpara, pverifypara, 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() } + unsafe { CryptDecryptAndVerifyMessageSignature(pdecryptpara, pverifypara, dwsignerindex, core::mem::transmute(pbencryptedblob.as_ptr()), pbencryptedblob.len().try_into().unwrap(), pbdecrypted.unwrap_or(core::mem::zeroed()) as _, pcbdecrypted.unwrap_or(core::mem::zeroed()) as _, ppxchgcert.unwrap_or(core::mem::zeroed()) as _, ppsignercert.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { CryptDecryptMessage(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() } + unsafe { CryptDecryptMessage(pdecryptpara, core::mem::transmute(pbencryptedblob.as_ptr()), pbencryptedblob.len().try_into().unwrap(), pbdecrypted.unwrap_or(core::mem::zeroed()) as _, pcbdecrypted.unwrap_or(core::mem::zeroed()) as _, ppxchgcert.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CryptDeriveKey(hprov: usize, algid: ALG_ID, hbasedata: usize, dwflags: u32, phkey: *mut usize) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn CryptDeriveKey(hprov : usize, algid : ALG_ID, hbasedata : usize, dwflags : u32, phkey : *mut usize) -> super::super::Foundation:: BOOL); - unsafe { CryptDeriveKey(hprov, algid, hbasedata, dwflags, core::mem::transmute(phkey)).ok() } + unsafe { CryptDeriveKey(hprov, algid, hbasedata, dwflags, phkey as _).ok() } } #[inline] pub unsafe fn CryptDestroyHash(hhash: usize) -> windows_core::Result<()> { @@ -1224,12 +1224,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); - unsafe { CryptDuplicateHash(hhash, core::mem::transmute(pdwreserved.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(phhash)).ok() } + unsafe { CryptDuplicateHash(hhash, pdwreserved.unwrap_or(core::mem::zeroed()) as _, dwflags, phhash as _).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); - unsafe { CryptDuplicateKey(hkey, core::mem::transmute(pdwreserved.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(phkey)).ok() } + unsafe { CryptDuplicateKey(hkey, pdwreserved.unwrap_or(core::mem::zeroed()) as _, dwflags, phkey as _).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<()> @@ -1237,7 +1237,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); - unsafe { CryptEncodeObject(dwcertencodingtype, lpszstructtype.param().abi(), pvstructinfo, core::mem::transmute(pbencoded.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbencoded)).ok() } + unsafe { CryptEncodeObject(dwcertencodingtype, lpszstructtype.param().abi(), pvstructinfo, pbencoded.unwrap_or(core::mem::zeroed()) as _, pcbencoded as _).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<()> @@ -1245,17 +1245,17 @@ 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); - unsafe { CryptEncodeObjectEx(dwcertencodingtype, lpszstructtype.param().abi(), pvstructinfo, dwflags, core::mem::transmute(pencodepara.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvencoded.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbencoded)).ok() } + unsafe { CryptEncodeObjectEx(dwcertencodingtype, lpszstructtype.param().abi(), pvstructinfo, dwflags, pencodepara.unwrap_or(core::mem::zeroed()) as _, pvencoded.unwrap_or(core::mem::zeroed()) as _, pcbencoded as _).ok() } } #[inline] pub unsafe fn CryptEncrypt(hkey: usize, hhash: usize, r#final: bool, dwflags: u32, pbdata: Option<&mut [u8]>, pdwdatalen: *mut u32) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn CryptEncrypt(hkey : usize, hhash : usize, r#final : super::super::Foundation:: BOOL, dwflags : u32, pbdata : *mut u8, pdwdatalen : *mut u32, dwbuflen : u32) -> super::super::Foundation:: BOOL); - unsafe { CryptEncrypt(hkey, hhash, r#final.into(), dwflags, core::mem::transmute(pbdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwdatalen), pbdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } + unsafe { CryptEncrypt(hkey, hhash, r#final.into(), dwflags, core::mem::transmute(pbdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdwdatalen as _, pbdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } } #[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); - unsafe { CryptEncryptMessage(pencryptpara, rgprecipientcert.len().try_into().unwrap(), core::mem::transmute(rgprecipientcert.as_ptr()), core::mem::transmute(pbtobeencrypted.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbtobeencrypted.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pbencryptedblob.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbencryptedblob)).ok() } + unsafe { CryptEncryptMessage(pencryptpara, rgprecipientcert.len().try_into().unwrap(), core::mem::transmute(rgprecipientcert.as_ptr()), core::mem::transmute(pbtobeencrypted.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbtobeencrypted.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pbencryptedblob.unwrap_or(core::mem::zeroed()) as _, pcbencryptedblob as _).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<()> @@ -1263,7 +1263,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); - unsafe { CryptEnumKeyIdentifierProperties(core::mem::transmute(pkeyidentifier.unwrap_or(core::mem::zeroed())), dwpropid, dwflags, pwszcomputername.param().abi(), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvarg.unwrap_or(core::mem::zeroed())), pfnenum).ok() } + unsafe { CryptEnumKeyIdentifierProperties(pkeyidentifier.unwrap_or(core::mem::zeroed()) as _, dwpropid, dwflags, pwszcomputername.param().abi(), pvreserved.unwrap_or(core::mem::zeroed()) as _, pvarg.unwrap_or(core::mem::zeroed()) as _, 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<()> @@ -1272,37 +1272,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); - unsafe { CryptEnumOIDFunction(dwencodingtype, pszfuncname.param().abi(), pszoid.param().abi(), dwflags, core::mem::transmute(pvarg.unwrap_or(core::mem::zeroed())), pfnenumoidfunc).ok() } + unsafe { CryptEnumOIDFunction(dwencodingtype, pszfuncname.param().abi(), pszoid.param().abi(), dwflags, pvarg.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { CryptEnumOIDInfo(dwgroupid, dwflags, core::mem::transmute(pvarg.unwrap_or(core::mem::zeroed())), pfnenumoidinfo) } + unsafe { CryptEnumOIDInfo(dwgroupid, dwflags, pvarg.unwrap_or(core::mem::zeroed()) as _, pfnenumoidinfo) } } #[inline] 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); - unsafe { CryptEnumProviderTypesA(dwindex, core::mem::transmute(pdwreserved.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(pdwprovtype), core::mem::transmute(sztypename.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbtypename)).ok() } + unsafe { CryptEnumProviderTypesA(dwindex, pdwreserved.unwrap_or(core::mem::zeroed()) as _, dwflags, pdwprovtype as _, sztypename.unwrap_or(core::mem::zeroed()) as _, pcbtypename as _).ok() } } #[inline] 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); - unsafe { CryptEnumProviderTypesW(dwindex, core::mem::transmute(pdwreserved.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(pdwprovtype), core::mem::transmute(sztypename.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbtypename)).ok() } + unsafe { CryptEnumProviderTypesW(dwindex, pdwreserved.unwrap_or(core::mem::zeroed()) as _, dwflags, pdwprovtype as _, sztypename.unwrap_or(core::mem::zeroed()) as _, pcbtypename as _).ok() } } #[inline] 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); - unsafe { CryptEnumProvidersA(dwindex, core::mem::transmute(pdwreserved.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(pdwprovtype), core::mem::transmute(szprovname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbprovname)).ok() } + unsafe { CryptEnumProvidersA(dwindex, pdwreserved.unwrap_or(core::mem::zeroed()) as _, dwflags, pdwprovtype as _, szprovname.unwrap_or(core::mem::zeroed()) as _, pcbprovname as _).ok() } } #[inline] 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); - unsafe { CryptEnumProvidersW(dwindex, core::mem::transmute(pdwreserved.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(pdwprovtype), core::mem::transmute(szprovname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbprovname)).ok() } + unsafe { CryptEnumProvidersW(dwindex, pdwreserved.unwrap_or(core::mem::zeroed()) as _, dwflags, pdwprovtype as _, szprovname.unwrap_or(core::mem::zeroed()) as _, pcbprovname as _).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); - unsafe { CryptExportKey(hkey, hexpkey, dwblobtype, dwflags, core::mem::transmute(pbdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwdatalen)).ok() } + unsafe { CryptExportKey(hkey, hexpkey, dwblobtype, dwflags, pbdata.unwrap_or(core::mem::zeroed()) as _, pdwdatalen as _).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<()> @@ -1310,12 +1310,12 @@ 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); - unsafe { CryptExportPKCS8(hcryptprov, dwkeyspec, pszprivatekeyobjid.param().abi(), dwflags, core::mem::transmute(pvauxinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbprivatekeyblob.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbprivatekeyblob)).ok() } + unsafe { CryptExportPKCS8(hcryptprov, dwkeyspec, pszprivatekeyobjid.param().abi(), dwflags, pvauxinfo.unwrap_or(core::mem::zeroed()) as _, pbprivatekeyblob.unwrap_or(core::mem::zeroed()) as _, pcbprivatekeyblob as _).ok() } } #[inline] 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); - unsafe { CryptExportPublicKeyInfo(hcryptprovorncryptkey, core::mem::transmute(dwkeyspec.unwrap_or(core::mem::zeroed())), dwcertencodingtype, core::mem::transmute(pinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbinfo)).ok() } + unsafe { CryptExportPublicKeyInfo(hcryptprovorncryptkey, dwkeyspec.unwrap_or(core::mem::zeroed()) as _, dwcertencodingtype, pinfo.unwrap_or(core::mem::zeroed()) as _, pcbinfo as _).ok() } } #[inline] 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<()> @@ -1323,7 +1323,7 @@ where 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); - unsafe { CryptExportPublicKeyInfoEx(hcryptprovorncryptkey, core::mem::transmute(dwkeyspec.unwrap_or(core::mem::zeroed())), dwcertencodingtype, pszpublickeyobjid.param().abi(), dwflags, core::mem::transmute(pvauxinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbinfo)).ok() } + unsafe { CryptExportPublicKeyInfoEx(hcryptprovorncryptkey, dwkeyspec.unwrap_or(core::mem::zeroed()) as _, dwcertencodingtype, pszpublickeyobjid.param().abi(), dwflags, pvauxinfo.unwrap_or(core::mem::zeroed()) as _, pinfo.unwrap_or(core::mem::zeroed()) as _, pcbinfo as _).ok() } } #[inline] 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 @@ -1331,12 +1331,12 @@ where 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); - unsafe { CryptExportPublicKeyInfoFromBCryptKeyHandle(hbcryptkey, dwcertencodingtype, pszpublickeyobjid.param().abi(), dwflags, core::mem::transmute(pvauxinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbinfo)) } + unsafe { CryptExportPublicKeyInfoFromBCryptKeyHandle(hbcryptkey, dwcertencodingtype, pszpublickeyobjid.param().abi(), dwflags, pvauxinfo.unwrap_or(core::mem::zeroed()) as _, pinfo.unwrap_or(core::mem::zeroed()) as _, pcbinfo as _) } } #[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); - unsafe { CryptFindCertificateKeyProvInfo(pcert, dwflags, core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CryptFindCertificateKeyProvInfo(pcert, dwflags, pvreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CryptFindLocalizedName(pwszcryptname: P0) -> windows_core::PCWSTR @@ -1357,7 +1357,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); - unsafe { CryptFormatObject(dwcertencodingtype, dwformattype, 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() } + unsafe { CryptFormatObject(dwcertencodingtype, dwformattype, dwformatstrtype, pformatstruct.unwrap_or(core::mem::zeroed()) as _, lpszstructtype.param().abi(), core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), pbformat.unwrap_or(core::mem::zeroed()) as _, pcbformat as _).ok() } } #[inline] pub unsafe fn CryptFreeOIDFunctionAddress(hfuncaddr: *const core::ffi::c_void, dwflags: u32) -> super::super::Foundation::BOOL { @@ -1367,7 +1367,7 @@ pub unsafe fn CryptFreeOIDFunctionAddress(hfuncaddr: *const core::ffi::c_void, d #[inline] pub unsafe fn CryptGenKey(hprov: usize, algid: ALG_ID, dwflags: CRYPT_KEY_FLAGS, phkey: *mut usize) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn CryptGenKey(hprov : usize, algid : ALG_ID, dwflags : CRYPT_KEY_FLAGS, phkey : *mut usize) -> super::super::Foundation:: BOOL); - unsafe { CryptGenKey(hprov, algid, dwflags, core::mem::transmute(phkey)).ok() } + unsafe { CryptGenKey(hprov, algid, dwflags, phkey as _).ok() } } #[inline] pub unsafe fn CryptGenRandom(hprov: usize, pbbuffer: &mut [u8]) -> windows_core::Result<()> { @@ -1380,12 +1380,12 @@ where P1: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CryptGetAsyncParam(hasync : HCRYPTASYNC, pszparamoid : windows_core::PCSTR, ppvparam : *mut *mut core::ffi::c_void, ppfnfree : *mut PFN_CRYPT_ASYNC_PARAM_FREE_FUNC) -> super::super::Foundation:: BOOL); - unsafe { CryptGetAsyncParam(hasync, pszparamoid.param().abi(), core::mem::transmute(ppvparam.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppfnfree.unwrap_or(core::mem::zeroed()))) } + unsafe { CryptGetAsyncParam(hasync, pszparamoid.param().abi(), ppvparam.unwrap_or(core::mem::zeroed()) as _, ppfnfree.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { CryptGetDefaultOIDDllList(hfuncset, dwencodingtype, core::mem::transmute(pwszdlllist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchdlllist)).ok() } + unsafe { CryptGetDefaultOIDDllList(hfuncset, dwencodingtype, pwszdlllist.unwrap_or(core::mem::zeroed()) as _, pcchdlllist as _).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 @@ -1393,22 +1393,22 @@ where P2: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CryptGetDefaultOIDFunctionAddress(hfuncset : *const core::ffi::c_void, dwencodingtype : u32, pwszdll : windows_core::PCWSTR, dwflags : u32, ppvfuncaddr : *mut *mut core::ffi::c_void, phfuncaddr : *mut *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { CryptGetDefaultOIDFunctionAddress(hfuncset, dwencodingtype, pwszdll.param().abi(), dwflags, core::mem::transmute(ppvfuncaddr), core::mem::transmute(phfuncaddr)) } + unsafe { CryptGetDefaultOIDFunctionAddress(hfuncset, dwencodingtype, pwszdll.param().abi(), dwflags, ppvfuncaddr as _, phfuncaddr as _) } } #[inline] 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); - unsafe { CryptGetDefaultProviderA(dwprovtype, core::mem::transmute(pdwreserved.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(pszprovname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbprovname)).ok() } + unsafe { CryptGetDefaultProviderA(dwprovtype, pdwreserved.unwrap_or(core::mem::zeroed()) as _, dwflags, pszprovname.unwrap_or(core::mem::zeroed()) as _, pcbprovname as _).ok() } } #[inline] 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); - unsafe { CryptGetDefaultProviderW(dwprovtype, core::mem::transmute(pdwreserved.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(pszprovname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbprovname)).ok() } + unsafe { CryptGetDefaultProviderW(dwprovtype, pdwreserved.unwrap_or(core::mem::zeroed()) as _, dwflags, pszprovname.unwrap_or(core::mem::zeroed()) as _, pcbprovname as _).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); - unsafe { CryptGetHashParam(hhash, dwparam, core::mem::transmute(pbdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwdatalen), dwflags).ok() } + unsafe { CryptGetHashParam(hhash, dwparam, pbdata.unwrap_or(core::mem::zeroed()) as _, pdwdatalen as _, 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<()> @@ -1416,17 +1416,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); - unsafe { CryptGetKeyIdentifierProperty(pkeyidentifier, dwpropid, 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() } + unsafe { CryptGetKeyIdentifierProperty(pkeyidentifier, dwpropid, dwflags, pwszcomputername.param().abi(), pvreserved.unwrap_or(core::mem::zeroed()) as _, pvdata.unwrap_or(core::mem::zeroed()) as _, pcbdata as _).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); - unsafe { CryptGetKeyParam(hkey, dwparam, core::mem::transmute(pbdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwdatalen), dwflags).ok() } + unsafe { CryptGetKeyParam(hkey, dwparam, pbdata.unwrap_or(core::mem::zeroed()) as _, pdwdatalen as _, dwflags).ok() } } #[inline] 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__ = unsafe { CryptGetMessageCertificates(dwmsgandcertencodingtype, core::mem::transmute(hcryptprov.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(pbsignedblob.as_ptr()), pbsignedblob.len().try_into().unwrap()) }; + let result__ = unsafe { CryptGetMessageCertificates(dwmsgandcertencodingtype, hcryptprov.unwrap_or(core::mem::zeroed()) as _, 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] @@ -1440,7 +1440,7 @@ where P2: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CryptGetOIDFunctionAddress(hfuncset : *const core::ffi::c_void, dwencodingtype : u32, pszoid : windows_core::PCSTR, dwflags : u32, ppvfuncaddr : *mut *mut core::ffi::c_void, phfuncaddr : *mut *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { CryptGetOIDFunctionAddress(hfuncset, dwencodingtype, pszoid.param().abi(), dwflags, core::mem::transmute(ppvfuncaddr), core::mem::transmute(phfuncaddr)).ok() } + unsafe { CryptGetOIDFunctionAddress(hfuncset, dwencodingtype, pszoid.param().abi(), dwflags, ppvfuncaddr as _, phfuncaddr as _).ok() } } #[inline] pub unsafe fn CryptGetOIDFunctionValue(dwencodingtype: u32, pszfuncname: P1, pszoid: P2, pwszvaluename: P3, pdwvaluetype: Option<*mut u32>, pbvaluedata: Option<*mut u8>, pcbvaluedata: Option<*mut u32>) -> windows_core::Result<()> @@ -1450,7 +1450,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); - unsafe { CryptGetOIDFunctionValue(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() } + unsafe { CryptGetOIDFunctionValue(dwencodingtype, pszfuncname.param().abi(), pszoid.param().abi(), pwszvaluename.param().abi(), pdwvaluetype.unwrap_or(core::mem::zeroed()) as _, pbvaluedata.unwrap_or(core::mem::zeroed()) as _, pcbvaluedata.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -1458,22 +1458,22 @@ 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); - unsafe { CryptGetObjectUrl(pszurloid.param().abi(), pvpara, 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() } + unsafe { CryptGetObjectUrl(pszurloid.param().abi(), pvpara, dwflags, purlarray.unwrap_or(core::mem::zeroed()) as _, pcburlarray as _, purlinfo.unwrap_or(core::mem::zeroed()) as _, pcburlinfo.unwrap_or(core::mem::zeroed()) as _, pvreserved.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { CryptGetProvParam(hprov, dwparam, core::mem::transmute(pbdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwdatalen), dwflags).ok() } + unsafe { CryptGetProvParam(hprov, dwparam, pbdata.unwrap_or(core::mem::zeroed()) as _, pdwdatalen as _, dwflags).ok() } } #[inline] pub unsafe fn CryptGetUserKey(hprov: usize, dwkeyspec: u32, phuserkey: *mut usize) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn CryptGetUserKey(hprov : usize, dwkeyspec : u32, phuserkey : *mut usize) -> super::super::Foundation:: BOOL); - unsafe { CryptGetUserKey(hprov, dwkeyspec, core::mem::transmute(phuserkey)).ok() } + unsafe { CryptGetUserKey(hprov, dwkeyspec, phuserkey as _).ok() } } #[inline] 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); - unsafe { CryptHashCertificate(core::mem::transmute(hcryptprov.unwrap_or(core::mem::zeroed())), algid, 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() } + unsafe { CryptHashCertificate(hcryptprov.unwrap_or(core::mem::zeroed()) as _, algid, dwflags, core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), pbcomputedhash.unwrap_or(core::mem::zeroed()) as _, pcbcomputedhash as _).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<()> @@ -1481,7 +1481,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); - unsafe { CryptHashCertificate2(pwszcnghashalgid.param().abi(), 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() } + unsafe { CryptHashCertificate2(pwszcnghashalgid.param().abi(), dwflags, pvreserved.unwrap_or(core::mem::zeroed()) as _, 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()), pbcomputedhash.unwrap_or(core::mem::zeroed()) as _, pcbcomputedhash as _).ok() } } #[inline] pub unsafe fn CryptHashData(hhash: usize, pbdata: &[u8], dwflags: u32) -> windows_core::Result<()> { @@ -1491,12 +1491,12 @@ pub unsafe fn CryptHashData(hhash: usize, pbdata: &[u8], dwflags: u32) -> window #[inline] pub unsafe fn CryptHashMessage(phashpara: *const CRYPT_HASH_MESSAGE_PARA, fdetachedhash: bool, ctobehashed: u32, rgpbtobehashed: *const *const u8, rgcbtobehashed: *const u32, pbhashedblob: Option<*mut u8>, pcbhashedblob: Option<*mut u32>, pbcomputedhash: Option<*mut u8>, pcbcomputedhash: Option<*mut u32>) -> windows_core::Result<()> { 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); - unsafe { CryptHashMessage(phashpara, fdetachedhash.into(), ctobehashed, rgpbtobehashed, 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() } + unsafe { CryptHashMessage(phashpara, fdetachedhash.into(), ctobehashed, rgpbtobehashed, rgcbtobehashed, pbhashedblob.unwrap_or(core::mem::zeroed()) as _, pcbhashedblob.unwrap_or(core::mem::zeroed()) as _, pbcomputedhash.unwrap_or(core::mem::zeroed()) as _, pcbcomputedhash.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { CryptHashPublicKeyInfo(core::mem::transmute(hcryptprov.unwrap_or(core::mem::zeroed())), algid, dwflags, dwcertencodingtype, pinfo, core::mem::transmute(pbcomputedhash.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbcomputedhash)).ok() } + unsafe { CryptHashPublicKeyInfo(hcryptprov.unwrap_or(core::mem::zeroed()) as _, algid, dwflags, dwcertencodingtype, pinfo, pbcomputedhash.unwrap_or(core::mem::zeroed()) as _, pcbcomputedhash as _).ok() } } #[inline] pub unsafe fn CryptHashSessionKey(hhash: usize, hkey: usize, dwflags: u32) -> windows_core::Result<()> { @@ -1506,32 +1506,32 @@ pub unsafe fn CryptHashSessionKey(hhash: usize, hkey: usize, dwflags: u32) -> wi #[inline] 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); - unsafe { CryptHashToBeSigned(core::mem::transmute(hcryptprov.unwrap_or(core::mem::zeroed())), 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() } + unsafe { CryptHashToBeSigned(hcryptprov.unwrap_or(core::mem::zeroed()) as _, dwcertencodingtype, core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), pbcomputedhash.unwrap_or(core::mem::zeroed()) as _, pcbcomputedhash as _).ok() } } #[inline] pub unsafe fn CryptImportKey(hprov: usize, pbdata: &[u8], hpubkey: usize, dwflags: CRYPT_KEY_FLAGS, phkey: *mut usize) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn CryptImportKey(hprov : usize, pbdata : *const u8, dwdatalen : u32, hpubkey : usize, dwflags : CRYPT_KEY_FLAGS, phkey : *mut usize) -> super::super::Foundation:: BOOL); - unsafe { CryptImportKey(hprov, core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), hpubkey, dwflags, core::mem::transmute(phkey)).ok() } + unsafe { CryptImportKey(hprov, core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), hpubkey, dwflags, phkey as _).ok() } } #[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); - unsafe { CryptImportPKCS8(core::mem::transmute(sprivatekeyandparams), dwflags, core::mem::transmute(phcryptprov.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvauxinfo.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CryptImportPKCS8(core::mem::transmute(sprivatekeyandparams), dwflags, phcryptprov.unwrap_or(core::mem::zeroed()) as _, pvauxinfo.unwrap_or(core::mem::zeroed()) as _).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<()> { windows_targets::link!("crypt32.dll" "system" fn CryptImportPublicKeyInfo(hcryptprov : usize, dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, pinfo : *const CERT_PUBLIC_KEY_INFO, phkey : *mut usize) -> super::super::Foundation:: BOOL); - unsafe { CryptImportPublicKeyInfo(hcryptprov, dwcertencodingtype, pinfo, core::mem::transmute(phkey)).ok() } + unsafe { CryptImportPublicKeyInfo(hcryptprov, dwcertencodingtype, pinfo, phkey as _).ok() } } #[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); - unsafe { CryptImportPublicKeyInfoEx(hcryptprov, dwcertencodingtype, pinfo, aikeyalg, dwflags, core::mem::transmute(pvauxinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(phkey)).ok() } + unsafe { CryptImportPublicKeyInfoEx(hcryptprov, dwcertencodingtype, pinfo, aikeyalg, dwflags, pvauxinfo.unwrap_or(core::mem::zeroed()) as _, phkey as _).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); - unsafe { CryptImportPublicKeyInfoEx2(dwcertencodingtype, pinfo, dwflags, core::mem::transmute(pvauxinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(phkey)).ok() } + unsafe { CryptImportPublicKeyInfoEx2(dwcertencodingtype, pinfo, dwflags, pvauxinfo.unwrap_or(core::mem::zeroed()) as _, phkey as _).ok() } } #[inline] pub unsafe fn CryptInitOIDFunctionSet(pszfuncname: P0, dwflags: u32) -> *mut core::ffi::c_void @@ -1544,12 +1544,12 @@ where #[inline] pub unsafe fn CryptInstallCancelRetrieval(pfncancel: PFN_CRYPT_CANCEL_RETRIEVAL, pvarg: Option<*const core::ffi::c_void>, dwflags: u32, pvreserved: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL { windows_targets::link!("cryptnet.dll" "system" fn CryptInstallCancelRetrieval(pfncancel : PFN_CRYPT_CANCEL_RETRIEVAL, pvarg : *const core::ffi::c_void, dwflags : u32, pvreserved : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { CryptInstallCancelRetrieval(pfncancel, core::mem::transmute(pvarg.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { CryptInstallCancelRetrieval(pfncancel, pvarg.unwrap_or(core::mem::zeroed()) as _, dwflags, pvreserved.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CryptInstallDefaultContext(hcryptprov, dwdefaulttype, core::mem::transmute(pvdefaultpara.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(phdefaultcontext)).ok() } + unsafe { CryptInstallDefaultContext(hcryptprov, dwdefaulttype, pvdefaultpara.unwrap_or(core::mem::zeroed()) as _, dwflags, pvreserved.unwrap_or(core::mem::zeroed()) as _, phdefaultcontext as _).ok() } } #[inline] pub unsafe fn CryptInstallOIDFunctionAddress(hmodule: Option, dwencodingtype: u32, pszfuncname: P2, rgfuncentry: &[CRYPT_OID_FUNC_ENTRY], dwflags: u32) -> super::super::Foundation::BOOL @@ -1557,7 +1557,7 @@ where 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); - unsafe { CryptInstallOIDFunctionAddress(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), dwencodingtype, pszfuncname.param().abi(), rgfuncentry.len().try_into().unwrap(), core::mem::transmute(rgfuncentry.as_ptr()), dwflags) } + unsafe { CryptInstallOIDFunctionAddress(hmodule.unwrap_or(core::mem::zeroed()) as _, dwencodingtype, pszfuncname.param().abi(), rgfuncentry.len().try_into().unwrap(), core::mem::transmute(rgfuncentry.as_ptr()), dwflags) } } #[inline] pub unsafe fn CryptMemAlloc(cbsize: u32) -> *mut core::ffi::c_void { @@ -1567,12 +1567,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)); - unsafe { CryptMemFree(core::mem::transmute(pv.unwrap_or(core::mem::zeroed()))) } + unsafe { CryptMemFree(pv.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CryptMemRealloc(core::mem::transmute(pv.unwrap_or(core::mem::zeroed())), cbsize) } + unsafe { CryptMemRealloc(pv.unwrap_or(core::mem::zeroed()) as _, cbsize) } } #[inline] pub unsafe fn CryptMsgCalculateEncodedLength(dwmsgencodingtype: u32, dwflags: u32, dwmsgtype: u32, pvmsgencodeinfo: *const core::ffi::c_void, pszinnercontentobjid: P4, cbdata: u32) -> u32 @@ -1585,12 +1585,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); - unsafe { CryptMsgClose(core::mem::transmute(hcryptmsg.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CryptMsgClose(hcryptmsg.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { CryptMsgControl(hcryptmsg, dwflags, dwctrltype, core::mem::transmute(pvctrlpara.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CryptMsgControl(hcryptmsg, dwflags, dwctrltype, pvctrlpara.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CryptMsgCountersign(hcryptmsg: *const core::ffi::c_void, dwindex: u32, rgcountersigners: &[CMSG_SIGNER_ENCODE_INFO]) -> windows_core::Result<()> { @@ -1600,32 +1600,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); - unsafe { CryptMsgCountersignEncoded(dwencodingtype, core::mem::transmute(pbsignerinfo.as_ptr()), pbsignerinfo.len().try_into().unwrap(), rgcountersigners.len().try_into().unwrap(), core::mem::transmute(rgcountersigners.as_ptr()), core::mem::transmute(pbcountersignature.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbcountersignature)).ok() } + unsafe { CryptMsgCountersignEncoded(dwencodingtype, core::mem::transmute(pbsignerinfo.as_ptr()), pbsignerinfo.len().try_into().unwrap(), rgcountersigners.len().try_into().unwrap(), core::mem::transmute(rgcountersigners.as_ptr()), pbcountersignature.unwrap_or(core::mem::zeroed()) as _, pcbcountersignature as _).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); - unsafe { CryptMsgDuplicate(core::mem::transmute(hcryptmsg.unwrap_or(core::mem::zeroed()))) } + unsafe { CryptMsgDuplicate(hcryptmsg.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CryptMsgEncodeAndSignCTL(dwmsgencodingtype, pctlinfo, psigninfo, dwflags, core::mem::transmute(pbencoded.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbencoded)).ok() } + unsafe { CryptMsgEncodeAndSignCTL(dwmsgencodingtype, pctlinfo, psigninfo, dwflags, pbencoded.unwrap_or(core::mem::zeroed()) as _, pcbencoded as _).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); - unsafe { CryptMsgGetAndVerifySigner(hcryptmsg, rghsignerstore.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rghsignerstore.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), dwflags, core::mem::transmute(ppsigner.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsignerindex.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CryptMsgGetAndVerifySigner(hcryptmsg, rghsignerstore.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rghsignerstore.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), dwflags, ppsigner.unwrap_or(core::mem::zeroed()) as _, pdwsignerindex.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { CryptMsgGetParam(hcryptmsg, dwparamtype, dwindex, core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata)).ok() } + unsafe { CryptMsgGetParam(hcryptmsg, dwparamtype, dwindex, pvdata.unwrap_or(core::mem::zeroed()) as _, pcbdata as _).ok() } } #[inline] 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); - unsafe { CryptMsgOpenToDecode(dwmsgencodingtype, dwflags, 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()))) } + unsafe { CryptMsgOpenToDecode(dwmsgencodingtype, dwflags, dwmsgtype, hcryptprov.unwrap_or(core::mem::zeroed()) as _, precipientinfo.unwrap_or(core::mem::zeroed()) as _, pstreaminfo.unwrap_or(core::mem::zeroed()) as _) } } #[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 @@ -1633,12 +1633,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); - unsafe { CryptMsgOpenToEncode(dwmsgencodingtype, dwflags, dwmsgtype, pvmsgencodeinfo, pszinnercontentobjid.param().abi(), core::mem::transmute(pstreaminfo.unwrap_or(core::mem::zeroed()))) } + unsafe { CryptMsgOpenToEncode(dwmsgencodingtype, dwflags, dwmsgtype, pvmsgencodeinfo, pszinnercontentobjid.param().abi(), pstreaminfo.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CryptMsgSignCTL(dwmsgencodingtype, core::mem::transmute(pbctlcontent.as_ptr()), pbctlcontent.len().try_into().unwrap(), psigninfo, dwflags, core::mem::transmute(pbencoded.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbencoded)).ok() } + unsafe { CryptMsgSignCTL(dwmsgencodingtype, core::mem::transmute(pbctlcontent.as_ptr()), pbctlcontent.len().try_into().unwrap(), psigninfo, dwflags, pbencoded.unwrap_or(core::mem::zeroed()) as _, pcbencoded as _).ok() } } #[inline] pub unsafe fn CryptMsgUpdate(hcryptmsg: *const core::ffi::c_void, pbdata: Option<&[u8]>, ffinal: bool) -> windows_core::Result<()> { @@ -1648,12 +1648,12 @@ pub unsafe fn CryptMsgUpdate(hcryptmsg: *const core::ffi::c_void, pbdata: Option #[inline] 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); - unsafe { CryptMsgVerifyCountersignatureEncoded(core::mem::transmute(hcryptprov.unwrap_or(core::mem::zeroed())), dwencodingtype, core::mem::transmute(pbsignerinfo.as_ptr()), pbsignerinfo.len().try_into().unwrap(), core::mem::transmute(pbsignerinfocountersignature.as_ptr()), pbsignerinfocountersignature.len().try_into().unwrap(), pcicountersigner).ok() } + unsafe { CryptMsgVerifyCountersignatureEncoded(hcryptprov.unwrap_or(core::mem::zeroed()) as _, dwencodingtype, core::mem::transmute(pbsignerinfo.as_ptr()), pbsignerinfo.len().try_into().unwrap(), core::mem::transmute(pbsignerinfocountersignature.as_ptr()), pbsignerinfocountersignature.len().try_into().unwrap(), pcicountersigner).ok() } } #[inline] 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); - unsafe { CryptMsgVerifyCountersignatureEncodedEx(core::mem::transmute(hcryptprov.unwrap_or(core::mem::zeroed())), dwencodingtype, core::mem::transmute(pbsignerinfo.as_ptr()), pbsignerinfo.len().try_into().unwrap(), core::mem::transmute(pbsignerinfocountersignature.as_ptr()), pbsignerinfocountersignature.len().try_into().unwrap(), dwsignertype, pvsigner, dwflags, core::mem::transmute(pvextra.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CryptMsgVerifyCountersignatureEncodedEx(hcryptprov.unwrap_or(core::mem::zeroed()) as _, dwencodingtype, core::mem::transmute(pbsignerinfo.as_ptr()), pbsignerinfo.len().try_into().unwrap(), core::mem::transmute(pbsignerinfocountersignature.as_ptr()), pbsignerinfocountersignature.len().try_into().unwrap(), dwsignertype, pvsigner, dwflags, pvextra.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -1661,32 +1661,17 @@ 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); - unsafe { CryptProtectData(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())), dwflags, core::mem::transmute(pdataout)).ok() } + unsafe { CryptProtectData(pdatain, szdatadescr.param().abi(), poptionalentropy.unwrap_or(core::mem::zeroed()) as _, pvreserved.unwrap_or(core::mem::zeroed()) as _, ppromptstruct.unwrap_or(core::mem::zeroed()) as _, dwflags, pdataout as _).ok() } } #[inline] pub unsafe fn CryptProtectMemory(pdatain: *mut core::ffi::c_void, cbdatain: u32, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("crypt32.dll" "system" fn CryptProtectMemory(pdatain : *mut core::ffi::c_void, cbdatain : u32, dwflags : u32) -> super::super::Foundation:: BOOL); - unsafe { CryptProtectMemory(core::mem::transmute(pdatain), cbdatain, dwflags).ok() } + unsafe { CryptProtectMemory(pdatain as _, cbdatain, dwflags).ok() } } #[inline] pub unsafe fn CryptQueryObject(dwobjecttype: CERT_QUERY_OBJECT_TYPE, pvobject: *const core::ffi::c_void, dwexpectedcontenttypeflags: CERT_QUERY_CONTENT_TYPE_FLAGS, dwexpectedformattypeflags: CERT_QUERY_FORMAT_TYPE_FLAGS, dwflags: u32, pdwmsgandcertencodingtype: Option<*mut CERT_QUERY_ENCODING_TYPE>, pdwcontenttype: Option<*mut CERT_QUERY_CONTENT_TYPE>, pdwformattype: Option<*mut CERT_QUERY_FORMAT_TYPE>, phcertstore: Option<*mut HCERTSTORE>, phmsg: Option<*mut *mut core::ffi::c_void>, ppvcontext: Option<*mut *mut core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("crypt32.dll" "system" fn CryptQueryObject(dwobjecttype : CERT_QUERY_OBJECT_TYPE, pvobject : *const core::ffi::c_void, dwexpectedcontenttypeflags : CERT_QUERY_CONTENT_TYPE_FLAGS, dwexpectedformattypeflags : CERT_QUERY_FORMAT_TYPE_FLAGS, dwflags : u32, pdwmsgandcertencodingtype : *mut CERT_QUERY_ENCODING_TYPE, pdwcontenttype : *mut CERT_QUERY_CONTENT_TYPE, pdwformattype : *mut CERT_QUERY_FORMAT_TYPE, phcertstore : *mut HCERTSTORE, phmsg : *mut *mut core::ffi::c_void, ppvcontext : *mut *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { - CryptQueryObject( - dwobjecttype, - pvobject, - dwexpectedcontenttypeflags, - dwexpectedformattypeflags, - dwflags, - 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() - } + unsafe { CryptQueryObject(dwobjecttype, pvobject, dwexpectedcontenttypeflags, dwexpectedformattypeflags, dwflags, pdwmsgandcertencodingtype.unwrap_or(core::mem::zeroed()) as _, pdwcontenttype.unwrap_or(core::mem::zeroed()) as _, pdwformattype.unwrap_or(core::mem::zeroed()) as _, phcertstore.unwrap_or(core::mem::zeroed()) as _, phmsg.unwrap_or(core::mem::zeroed()) as _, ppvcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CryptRegisterDefaultOIDFunction(dwencodingtype: u32, pszfuncname: P1, dwindex: u32, pwszdll: P3) -> super::super::Foundation::BOOL @@ -1725,7 +1710,7 @@ where P1: 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); - unsafe { CryptRetrieveObjectByUrlA(pszurl.param().abi(), pszobjectoid.param().abi(), dwretrievalflags, 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()))) } + unsafe { CryptRetrieveObjectByUrlA(pszurl.param().abi(), pszobjectoid.param().abi(), dwretrievalflags, dwtimeout, ppvobject as _, hasyncretrieve.unwrap_or(core::mem::zeroed()) as _, pcredentials.unwrap_or(core::mem::zeroed()) as _, pvverify.unwrap_or(core::mem::zeroed()) as _, pauxinfo.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -1734,7 +1719,7 @@ where P1: 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); - unsafe { CryptRetrieveObjectByUrlW(pszurl.param().abi(), pszobjectoid.param().abi(), dwretrievalflags, 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()))) } + unsafe { CryptRetrieveObjectByUrlW(pszurl.param().abi(), pszobjectoid.param().abi(), dwretrievalflags, dwtimeout, ppvobject as _, hasyncretrieve.unwrap_or(core::mem::zeroed()) as _, pcredentials.unwrap_or(core::mem::zeroed()) as _, pvverify.unwrap_or(core::mem::zeroed()) as _, pauxinfo.unwrap_or(core::mem::zeroed()) as _) } } #[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<()> @@ -1743,7 +1728,7 @@ 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); - unsafe { CryptRetrieveTimeStamp(wszurl.param().abi(), dwretrievalflags, 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() } + unsafe { CryptRetrieveTimeStamp(wszurl.param().abi(), dwretrievalflags, dwtimeout, pszhashid.param().abi(), ppara.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), pptscontext as _, pptssigner as _, phstore.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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 @@ -1751,7 +1736,7 @@ where P1: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CryptSetAsyncParam(hasync : HCRYPTASYNC, pszparamoid : windows_core::PCSTR, pvparam : *const core::ffi::c_void, pfnfree : PFN_CRYPT_ASYNC_PARAM_FREE_FUNC) -> super::super::Foundation:: BOOL); - unsafe { CryptSetAsyncParam(hasync, pszparamoid.param().abi(), core::mem::transmute(pvparam.unwrap_or(core::mem::zeroed())), pfnfree) } + unsafe { CryptSetAsyncParam(hasync, pszparamoid.param().abi(), pvparam.unwrap_or(core::mem::zeroed()) as _, pfnfree) } } #[inline] pub unsafe fn CryptSetHashParam(hhash: usize, dwparam: CRYPT_SET_HASH_PARAM, pbdata: *const u8, dwflags: u32) -> windows_core::Result<()> { @@ -1764,7 +1749,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); - unsafe { CryptSetKeyIdentifierProperty(pkeyidentifier, dwpropid, dwflags, pwszcomputername.param().abi(), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CryptSetKeyIdentifierProperty(pkeyidentifier, dwpropid, dwflags, pwszcomputername.param().abi(), pvreserved.unwrap_or(core::mem::zeroed()) as _, pvdata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CryptSetKeyParam(hkey: usize, dwparam: CRYPT_KEY_PARAM_ID, pbdata: *const u8, dwflags: u32) -> windows_core::Result<()> { @@ -1801,7 +1786,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); - unsafe { CryptSetProviderExA(pszprovname.param().abi(), dwprovtype, core::mem::transmute(pdwreserved.unwrap_or(core::mem::zeroed())), dwflags).ok() } + unsafe { CryptSetProviderExA(pszprovname.param().abi(), dwprovtype, pdwreserved.unwrap_or(core::mem::zeroed()) as _, dwflags).ok() } } #[inline] pub unsafe fn CryptSetProviderExW(pszprovname: P0, dwprovtype: u32, pdwreserved: Option<*const u32>, dwflags: u32) -> windows_core::Result<()> @@ -1809,7 +1794,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); - unsafe { CryptSetProviderExW(pszprovname.param().abi(), dwprovtype, core::mem::transmute(pdwreserved.unwrap_or(core::mem::zeroed())), dwflags).ok() } + unsafe { CryptSetProviderExW(pszprovname.param().abi(), dwprovtype, pdwreserved.unwrap_or(core::mem::zeroed()) as _, dwflags).ok() } } #[inline] pub unsafe fn CryptSetProviderW(pszprovname: P0, dwprovtype: u32) -> windows_core::Result<()> @@ -1825,17 +1810,17 @@ where 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); - unsafe { CryptSignAndEncodeCertificate(core::mem::transmute(hcryptprovorncryptkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwkeyspec.unwrap_or(core::mem::zeroed())), dwcertencodingtype, lpszstructtype.param().abi(), pvstructinfo, psignaturealgorithm, core::mem::transmute(pvhashauxinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbencoded.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbencoded)).ok() } + unsafe { CryptSignAndEncodeCertificate(hcryptprovorncryptkey.unwrap_or(core::mem::zeroed()) as _, dwkeyspec.unwrap_or(core::mem::zeroed()) as _, dwcertencodingtype, lpszstructtype.param().abi(), pvstructinfo, psignaturealgorithm, pvhashauxinfo.unwrap_or(core::mem::zeroed()) as _, pbencoded.unwrap_or(core::mem::zeroed()) as _, pcbencoded as _).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); - unsafe { CryptSignAndEncryptMessage(psignpara, pencryptpara, rgprecipientcert.len().try_into().unwrap(), core::mem::transmute(rgprecipientcert.as_ptr()), core::mem::transmute(pbtobesignedandencrypted.as_ptr()), pbtobesignedandencrypted.len().try_into().unwrap(), core::mem::transmute(pbsignedandencryptedblob.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbsignedandencryptedblob)).ok() } + unsafe { CryptSignAndEncryptMessage(psignpara, pencryptpara, rgprecipientcert.len().try_into().unwrap(), core::mem::transmute(rgprecipientcert.as_ptr()), core::mem::transmute(pbtobesignedandencrypted.as_ptr()), pbtobesignedandencrypted.len().try_into().unwrap(), pbsignedandencryptedblob.unwrap_or(core::mem::zeroed()) as _, pcbsignedandencryptedblob as _).ok() } } #[inline] 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); - unsafe { CryptSignCertificate(core::mem::transmute(hcryptprovorncryptkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwkeyspec.unwrap_or(core::mem::zeroed())), dwcertencodingtype, core::mem::transmute(pbencodedtobesigned.as_ptr()), pbencodedtobesigned.len().try_into().unwrap(), psignaturealgorithm, core::mem::transmute(pvhashauxinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbsignature.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbsignature)).ok() } + unsafe { CryptSignCertificate(hcryptprovorncryptkey.unwrap_or(core::mem::zeroed()) as _, dwkeyspec.unwrap_or(core::mem::zeroed()) as _, dwcertencodingtype, core::mem::transmute(pbencodedtobesigned.as_ptr()), pbencodedtobesigned.len().try_into().unwrap(), psignaturealgorithm, pvhashauxinfo.unwrap_or(core::mem::zeroed()) as _, pbsignature.unwrap_or(core::mem::zeroed()) as _, pcbsignature as _).ok() } } #[inline] pub unsafe fn CryptSignHashA(hhash: usize, dwkeyspec: u32, szdescription: P2, dwflags: u32, pbsignature: Option<*mut u8>, pdwsiglen: *mut u32) -> windows_core::Result<()> @@ -1843,7 +1828,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); - unsafe { CryptSignHashA(hhash, dwkeyspec, szdescription.param().abi(), dwflags, core::mem::transmute(pbsignature.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsiglen)).ok() } + unsafe { CryptSignHashA(hhash, dwkeyspec, szdescription.param().abi(), dwflags, pbsignature.unwrap_or(core::mem::zeroed()) as _, pdwsiglen as _).ok() } } #[inline] pub unsafe fn CryptSignHashW(hhash: usize, dwkeyspec: u32, szdescription: P2, dwflags: u32, pbsignature: Option<*mut u8>, pdwsiglen: *mut u32) -> windows_core::Result<()> @@ -1851,47 +1836,47 @@ 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); - unsafe { CryptSignHashW(hhash, dwkeyspec, szdescription.param().abi(), dwflags, core::mem::transmute(pbsignature.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsiglen)).ok() } + unsafe { CryptSignHashW(hhash, dwkeyspec, szdescription.param().abi(), dwflags, pbsignature.unwrap_or(core::mem::zeroed()) as _, pdwsiglen as _).ok() } } #[inline] pub unsafe fn CryptSignMessage(psignpara: *const CRYPT_SIGN_MESSAGE_PARA, fdetachedsignature: bool, ctobesigned: u32, rgpbtobesigned: Option<*const *const u8>, rgcbtobesigned: *const u32, pbsignedblob: Option<*mut u8>, pcbsignedblob: *mut u32) -> windows_core::Result<()> { 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); - unsafe { CryptSignMessage(psignpara, fdetachedsignature.into(), ctobesigned, core::mem::transmute(rgpbtobesigned.unwrap_or(core::mem::zeroed())), rgcbtobesigned, core::mem::transmute(pbsignedblob.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbsignedblob)).ok() } + unsafe { CryptSignMessage(psignpara, fdetachedsignature.into(), ctobesigned, rgpbtobesigned.unwrap_or(core::mem::zeroed()) as _, rgcbtobesigned, pbsignedblob.unwrap_or(core::mem::zeroed()) as _, pcbsignedblob as _).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); - unsafe { CryptSignMessageWithKey(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() } + unsafe { CryptSignMessageWithKey(psignpara, core::mem::transmute(pbtobesigned.as_ptr()), pbtobesigned.len().try_into().unwrap(), pbsignedblob.unwrap_or(core::mem::zeroed()) as _, pcbsignedblob as _).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); - unsafe { CryptStringToBinaryA(core::mem::transmute(pszstring.as_ptr()), pszstring.len().try_into().unwrap(), 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() } + unsafe { CryptStringToBinaryA(core::mem::transmute(pszstring.as_ptr()), pszstring.len().try_into().unwrap(), dwflags, pbbinary.unwrap_or(core::mem::zeroed()) as _, pcbbinary as _, pdwskip.unwrap_or(core::mem::zeroed()) as _, pdwflags.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { CryptStringToBinaryW(core::mem::transmute(pszstring.as_ptr()), pszstring.len().try_into().unwrap(), 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() } + unsafe { CryptStringToBinaryW(core::mem::transmute(pszstring.as_ptr()), pszstring.len().try_into().unwrap(), dwflags, pbbinary.unwrap_or(core::mem::zeroed()) as _, pcbbinary as _, pdwskip.unwrap_or(core::mem::zeroed()) as _, pdwflags.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { CryptUninstallCancelRetrieval(dwflags, core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { CryptUninstallCancelRetrieval(dwflags, pvreserved.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CryptUninstallDefaultContext(core::mem::transmute(hdefaultcontext.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CryptUninstallDefaultContext(hdefaultcontext.unwrap_or(core::mem::zeroed()) as _, dwflags, pvreserved.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { CryptUnprotectData(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())), dwflags, core::mem::transmute(pdataout)).ok() } + unsafe { CryptUnprotectData(pdatain, ppszdatadescr.unwrap_or(core::mem::zeroed()) as _, poptionalentropy.unwrap_or(core::mem::zeroed()) as _, pvreserved.unwrap_or(core::mem::zeroed()) as _, ppromptstruct.unwrap_or(core::mem::zeroed()) as _, dwflags, pdataout as _).ok() } } #[inline] pub unsafe fn CryptUnprotectMemory(pdatain: *mut core::ffi::c_void, cbdatain: u32, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("crypt32.dll" "system" fn CryptUnprotectMemory(pdatain : *mut core::ffi::c_void, cbdatain : u32, dwflags : u32) -> super::super::Foundation:: BOOL); - unsafe { CryptUnprotectMemory(core::mem::transmute(pdatain), cbdatain, dwflags).ok() } + unsafe { CryptUnprotectMemory(pdatain as _, cbdatain, dwflags).ok() } } #[inline] pub unsafe fn CryptUnregisterDefaultOIDFunction(dwencodingtype: u32, pszfuncname: P1, pwszdll: P2) -> super::super::Foundation::BOOL @@ -1922,42 +1907,42 @@ where P1: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CryptUpdateProtectedState(poldsid : super:: PSID, pwszoldpassword : windows_core::PCWSTR, dwflags : u32, pdwsuccesscount : *mut u32, pdwfailurecount : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { CryptUpdateProtectedState(core::mem::transmute(poldsid.unwrap_or(core::mem::zeroed())), pwszoldpassword.param().abi(), dwflags, core::mem::transmute(pdwsuccesscount.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwfailurecount.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CryptUpdateProtectedState(poldsid.unwrap_or(core::mem::zeroed()) as _, pwszoldpassword.param().abi(), dwflags, pdwsuccesscount.unwrap_or(core::mem::zeroed()) as _, pdwfailurecount.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { CryptVerifyCertificateSignature(core::mem::transmute(hcryptprov.unwrap_or(core::mem::zeroed())), dwcertencodingtype, core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), ppublickey).ok() } + unsafe { CryptVerifyCertificateSignature(hcryptprov.unwrap_or(core::mem::zeroed()) as _, dwcertencodingtype, core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), ppublickey).ok() } } #[inline] 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); - unsafe { CryptVerifyCertificateSignatureEx(core::mem::transmute(hcryptprov.unwrap_or(core::mem::zeroed())), dwcertencodingtype, dwsubjecttype, pvsubject, dwissuertype, core::mem::transmute(pvissuer.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(pvextra.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CryptVerifyCertificateSignatureEx(hcryptprov.unwrap_or(core::mem::zeroed()) as _, dwcertencodingtype, dwsubjecttype, pvsubject, dwissuertype, pvissuer.unwrap_or(core::mem::zeroed()) as _, dwflags, pvextra.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { CryptVerifyDetachedMessageHash(phashpara, core::mem::transmute(pbdetachedhashblob.as_ptr()), pbdetachedhashblob.len().try_into().unwrap(), ctobehashed, rgpbtobehashed, rgcbtobehashed, core::mem::transmute(pbcomputedhash.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbcomputedhash.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CryptVerifyDetachedMessageHash(phashpara, core::mem::transmute(pbdetachedhashblob.as_ptr()), pbdetachedhashblob.len().try_into().unwrap(), ctobehashed, rgpbtobehashed, rgcbtobehashed, pbcomputedhash.unwrap_or(core::mem::zeroed()) as _, pcbcomputedhash.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { CryptVerifyDetachedMessageSignature(pverifypara, dwsignerindex, core::mem::transmute(pbdetachedsignblob.as_ptr()), pbdetachedsignblob.len().try_into().unwrap(), ctobesigned, rgpbtobesigned, rgcbtobesigned, core::mem::transmute(ppsignercert.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CryptVerifyDetachedMessageSignature(pverifypara, dwsignerindex, core::mem::transmute(pbdetachedsignblob.as_ptr()), pbdetachedsignblob.len().try_into().unwrap(), ctobesigned, rgpbtobesigned, rgcbtobesigned, ppsignercert.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { CryptVerifyMessageHash(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() } + unsafe { CryptVerifyMessageHash(phashpara, core::mem::transmute(pbhashedblob.as_ptr()), pbhashedblob.len().try_into().unwrap(), pbtobehashed.unwrap_or(core::mem::zeroed()) as _, pcbtobehashed.unwrap_or(core::mem::zeroed()) as _, pbcomputedhash.unwrap_or(core::mem::zeroed()) as _, pcbcomputedhash.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { CryptVerifyMessageSignature(pverifypara, 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() } + unsafe { CryptVerifyMessageSignature(pverifypara, dwsignerindex, core::mem::transmute(pbsignedblob.as_ptr()), pbsignedblob.len().try_into().unwrap(), pbdecoded.unwrap_or(core::mem::zeroed()) as _, pcbdecoded.unwrap_or(core::mem::zeroed()) as _, ppsignercert.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { CryptVerifyMessageSignatureWithKey(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() } + unsafe { CryptVerifyMessageSignatureWithKey(pverifypara, ppublickeyinfo.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pbsignedblob.as_ptr()), pbsignedblob.len().try_into().unwrap(), pbdecoded.unwrap_or(core::mem::zeroed()) as _, pcbdecoded.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CryptVerifySignatureA(hhash: usize, pbsignature: &[u8], hpubkey: usize, szdescription: P4, dwflags: u32) -> windows_core::Result<()> @@ -1978,7 +1963,7 @@ where #[inline] 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); - unsafe { 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() } + unsafe { 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.unwrap_or(core::mem::zeroed()) as _, pptscontext as _, pptssigner as _, phstore.unwrap_or(core::mem::zeroed()) as _).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> { @@ -2001,7 +1986,7 @@ where P4: windows_core::Param, { windows_targets::link!("cryptxml.dll" "system" fn CryptXmlCreateReference(hcryptxml : *const core::ffi::c_void, dwflags : u32, wszid : windows_core::PCWSTR, wszuri : windows_core::PCWSTR, wsztype : windows_core::PCWSTR, pdigestmethod : *const CRYPT_XML_ALGORITHM, ctransform : u32, rgtransform : *const CRYPT_XML_ALGORITHM, phreference : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { CryptXmlCreateReference(hcryptxml, dwflags, wszid.param().abi(), wszuri.param().abi(), wsztype.param().abi(), pdigestmethod, rgtransform.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgtransform.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(phreference)).ok() } + unsafe { CryptXmlCreateReference(hcryptxml, dwflags, wszid.param().abi(), wszuri.param().abi(), wsztype.param().abi(), pdigestmethod, rgtransform.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgtransform.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), phreference as _).ok() } } #[inline] pub unsafe fn CryptXmlDigestReference(hreference: *const core::ffi::c_void, dwflags: u32, pdataproviderin: *const CRYPT_XML_DATA_PROVIDER) -> windows_core::Result<()> { @@ -2011,12 +1996,12 @@ pub unsafe fn CryptXmlDigestReference(hreference: *const core::ffi::c_void, dwfl #[inline] pub unsafe fn CryptXmlEncode(hcryptxml: *const core::ffi::c_void, dwcharset: CRYPT_XML_CHARSET, rgproperty: Option<&[CRYPT_XML_PROPERTY]>, pvcallbackstate: *mut core::ffi::c_void, pfnwrite: PFN_CRYPT_XML_WRITE_CALLBACK) -> windows_core::Result<()> { windows_targets::link!("cryptxml.dll" "system" fn CryptXmlEncode(hcryptxml : *const core::ffi::c_void, dwcharset : CRYPT_XML_CHARSET, rgproperty : *const CRYPT_XML_PROPERTY, cproperty : u32, pvcallbackstate : *mut core::ffi::c_void, pfnwrite : PFN_CRYPT_XML_WRITE_CALLBACK) -> windows_core::HRESULT); - unsafe { CryptXmlEncode(hcryptxml, dwcharset, 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(pvcallbackstate), pfnwrite).ok() } + unsafe { CryptXmlEncode(hcryptxml, dwcharset, 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()), pvcallbackstate as _, pfnwrite).ok() } } #[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); - unsafe { CryptXmlEnumAlgorithmInfo(dwgroupid, dwflags, core::mem::transmute(pvarg.unwrap_or(core::mem::zeroed())), pfnenumalginfo).ok() } + unsafe { CryptXmlEnumAlgorithmInfo(dwgroupid, dwflags, pvarg.unwrap_or(core::mem::zeroed()) as _, pfnenumalginfo).ok() } } #[inline] pub unsafe fn CryptXmlFindAlgorithmInfo(dwfindbytype: u32, pvfindby: *const core::ffi::c_void, dwgroupid: u32, dwflags: u32) -> *mut CRYPT_XML_ALGORITHM_INFO { @@ -2082,7 +2067,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); - unsafe { CryptXmlOpenToDecode(core::mem::transmute(pconfig.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(rgproperty.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), rgproperty.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pencoded, core::mem::transmute(phcryptxml)).ok() } + unsafe { CryptXmlOpenToDecode(pconfig.unwrap_or(core::mem::zeroed()) as _, dwflags, core::mem::transmute(rgproperty.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), rgproperty.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pencoded, phcryptxml as _).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<()> @@ -2090,7 +2075,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); - unsafe { CryptXmlOpenToEncode(core::mem::transmute(pconfig.unwrap_or(core::mem::zeroed())), 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() } + unsafe { CryptXmlOpenToEncode(pconfig.unwrap_or(core::mem::zeroed()) as _, 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()), pencoded.unwrap_or(core::mem::zeroed()) as _, phsignature as _).ok() } } #[inline] pub unsafe fn CryptXmlSetHMACSecret(hsignature: *const core::ffi::c_void, pbsecret: &[u8]) -> windows_core::Result<()> { @@ -2100,22 +2085,22 @@ pub unsafe fn CryptXmlSetHMACSecret(hsignature: *const core::ffi::c_void, pbsecr #[inline] 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); - unsafe { CryptXmlSign(hsignature, core::mem::transmute(hkey.unwrap_or(core::mem::zeroed())), dwkeyspec, dwflags, dwkeyinfospec, core::mem::transmute(pvkeyinfospec.unwrap_or(core::mem::zeroed())), psignaturemethod, pcanonicalization).ok() } + unsafe { CryptXmlSign(hsignature, hkey.unwrap_or(core::mem::zeroed()) as _, dwkeyspec, dwflags, dwkeyinfospec, pvkeyinfospec.unwrap_or(core::mem::zeroed()) as _, psignaturemethod, pcanonicalization).ok() } } #[inline] 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); - unsafe { CryptXmlVerifySignature(hsignature, core::mem::transmute(hkey.unwrap_or(core::mem::zeroed())), dwflags).ok() } + unsafe { CryptXmlVerifySignature(hsignature, hkey.unwrap_or(core::mem::zeroed()) as _, dwflags).ok() } } #[inline] pub unsafe fn Decrypt(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, foaep: bool, pindata: &[u8], pcboutdata: *mut u32, ppoutdata: *mut *mut u8) -> windows_core::Result<()> { windows_targets::link!("infocardapi.dll" "system" fn Decrypt(hcrypto : *const INFORMATIONCARD_CRYPTO_HANDLE, foaep : super::super::Foundation:: BOOL, cbindata : u32, pindata : *const u8, pcboutdata : *mut u32, ppoutdata : *mut *mut u8) -> windows_core::HRESULT); - unsafe { Decrypt(hcrypto, foaep.into(), pindata.len().try_into().unwrap(), core::mem::transmute(pindata.as_ptr()), core::mem::transmute(pcboutdata), core::mem::transmute(ppoutdata)).ok() } + unsafe { Decrypt(hcrypto, foaep.into(), pindata.len().try_into().unwrap(), core::mem::transmute(pindata.as_ptr()), pcboutdata as _, ppoutdata as _).ok() } } #[inline] pub unsafe fn Encrypt(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, foaep: bool, pindata: &[u8], pcboutdata: *mut u32, ppoutdata: *mut *mut u8) -> windows_core::Result<()> { windows_targets::link!("infocardapi.dll" "system" fn Encrypt(hcrypto : *const INFORMATIONCARD_CRYPTO_HANDLE, foaep : super::super::Foundation:: BOOL, cbindata : u32, pindata : *const u8, pcboutdata : *mut u32, ppoutdata : *mut *mut u8) -> windows_core::HRESULT); - unsafe { Encrypt(hcrypto, foaep.into(), pindata.len().try_into().unwrap(), core::mem::transmute(pindata.as_ptr()), core::mem::transmute(pcboutdata), core::mem::transmute(ppoutdata)).ok() } + unsafe { Encrypt(hcrypto, foaep.into(), pindata.len().try_into().unwrap(), core::mem::transmute(pindata.as_ptr()), pcboutdata as _, ppoutdata as _).ok() } } #[inline] pub unsafe fn FindCertsByIssuer(pcertchains: Option<*mut CERT_CHAIN>, pcbcertchains: *mut u32, pccertchains: *mut u32, pbencodedissuername: Option<&[u8]>, pwszpurpose: P5, dwkeyspec: u32) -> windows_core::Result<()> @@ -2123,7 +2108,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); - unsafe { 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(), dwkeyspec).ok() } + unsafe { FindCertsByIssuer(pcertchains.unwrap_or(core::mem::zeroed()) as _, pcbcertchains as _, pccertchains as _, core::mem::transmute(pbencodedissuername.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbencodedissuername.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pwszpurpose.param().abi(), dwkeyspec).ok() } } #[inline] pub unsafe fn FreeToken(pallocmemory: *const GENERIC_XML_TOKEN) -> super::super::Foundation::BOOL { @@ -2136,7 +2121,7 @@ where P7: windows_core::Param, { windows_targets::link!("infocardapi.dll" "system" fn GenerateDerivedKey(hcrypto : *const INFORMATIONCARD_CRYPTO_HANDLE, cblabel : u32, plabel : *const u8, cbnonce : u32, pnonce : *const u8, derivedkeylength : u32, offset : u32, algid : windows_core::PCWSTR, pcbkey : *mut u32, ppkey : *mut *mut u8) -> windows_core::HRESULT); - unsafe { GenerateDerivedKey(hcrypto, plabel.len().try_into().unwrap(), core::mem::transmute(plabel.as_ptr()), pnonce.len().try_into().unwrap(), core::mem::transmute(pnonce.as_ptr()), derivedkeylength, offset, algid.param().abi(), core::mem::transmute(pcbkey), core::mem::transmute(ppkey)).ok() } + unsafe { GenerateDerivedKey(hcrypto, plabel.len().try_into().unwrap(), core::mem::transmute(plabel.as_ptr()), pnonce.len().try_into().unwrap(), core::mem::transmute(pnonce.as_ptr()), derivedkeylength, offset, algid.param().abi(), pcbkey as _, ppkey as _).ok() } } #[inline] pub unsafe fn GetAsymmetricEncryptionInterface(pszprovidername: P0, pszalgid: P1, ppfunctiontable: *mut *mut BCRYPT_ASYMMETRIC_ENCRYPTION_FUNCTION_TABLE, dwflags: u32) -> super::super::Foundation::NTSTATUS @@ -2145,12 +2130,12 @@ where P1: windows_core::Param, { windows_targets::link!("bcryptprimitives.dll" "system" fn GetAsymmetricEncryptionInterface(pszprovidername : windows_core::PCWSTR, pszalgid : windows_core::PCWSTR, ppfunctiontable : *mut *mut BCRYPT_ASYMMETRIC_ENCRYPTION_FUNCTION_TABLE, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - unsafe { GetAsymmetricEncryptionInterface(pszprovidername.param().abi(), pszalgid.param().abi(), core::mem::transmute(ppfunctiontable), dwflags) } + unsafe { GetAsymmetricEncryptionInterface(pszprovidername.param().abi(), pszalgid.param().abi(), ppfunctiontable as _, dwflags) } } #[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); - unsafe { GetBrowserToken(dwparamtype, pparam, core::mem::transmute(pcbtoken.unwrap_or(core::mem::zeroed())), core::mem::transmute(pptoken.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { GetBrowserToken(dwparamtype, pparam, pcbtoken.unwrap_or(core::mem::zeroed()) as _, pptoken.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn GetCipherInterface(pszprovidername: P0, pszalgid: P1, ppfunctiontable: *mut *mut BCRYPT_CIPHER_FUNCTION_TABLE, dwflags: u32) -> super::super::Foundation::NTSTATUS @@ -2159,7 +2144,7 @@ where P1: windows_core::Param, { windows_targets::link!("bcryptprimitives.dll" "system" fn GetCipherInterface(pszprovidername : windows_core::PCWSTR, pszalgid : windows_core::PCWSTR, ppfunctiontable : *mut *mut BCRYPT_CIPHER_FUNCTION_TABLE, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - unsafe { GetCipherInterface(pszprovidername.param().abi(), pszalgid.param().abi(), core::mem::transmute(ppfunctiontable), dwflags) } + unsafe { GetCipherInterface(pszprovidername.param().abi(), pszalgid.param().abi(), ppfunctiontable as _, dwflags) } } #[inline] pub unsafe fn GetCryptoTransform(hsymmetriccrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, mode: u32, padding: PaddingMode, feedbacksize: u32, direction: Direction, piv: &[u8]) -> windows_core::Result<*mut INFORMATIONCARD_CRYPTO_HANDLE> { @@ -2176,7 +2161,7 @@ where P1: windows_core::Param, { windows_targets::link!("bcryptprimitives.dll" "system" fn GetHashInterface(pszprovidername : windows_core::PCWSTR, pszalgid : windows_core::PCWSTR, ppfunctiontable : *mut *mut BCRYPT_HASH_FUNCTION_TABLE, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - unsafe { GetHashInterface(pszprovidername.param().abi(), pszalgid.param().abi(), core::mem::transmute(ppfunctiontable), dwflags) } + unsafe { GetHashInterface(pszprovidername.param().abi(), pszalgid.param().abi(), ppfunctiontable as _, dwflags) } } #[inline] pub unsafe fn GetKeyDerivationInterface(pszprovidername: P0, pszalgid: P1, ppfunctiontable: *mut *mut BCRYPT_KEY_DERIVATION_FUNCTION_TABLE, dwflags: u32) -> super::super::Foundation::NTSTATUS @@ -2185,7 +2170,7 @@ where P1: windows_core::Param, { windows_targets::link!("bcryptprimitives.dll" "system" fn GetKeyDerivationInterface(pszprovidername : windows_core::PCWSTR, pszalgid : windows_core::PCWSTR, ppfunctiontable : *mut *mut BCRYPT_KEY_DERIVATION_FUNCTION_TABLE, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - unsafe { GetKeyDerivationInterface(pszprovidername.param().abi(), pszalgid.param().abi(), core::mem::transmute(ppfunctiontable), dwflags) } + unsafe { GetKeyDerivationInterface(pszprovidername.param().abi(), pszalgid.param().abi(), ppfunctiontable as _, dwflags) } } #[inline] pub unsafe fn GetKeyStorageInterface(pszprovidername: P0, ppfunctiontable: *mut *mut NCRYPT_KEY_STORAGE_FUNCTION_TABLE, dwflags: u32) -> super::super::Foundation::NTSTATUS @@ -2193,7 +2178,7 @@ where P0: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn GetKeyStorageInterface(pszprovidername : windows_core::PCWSTR, ppfunctiontable : *mut *mut NCRYPT_KEY_STORAGE_FUNCTION_TABLE, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - unsafe { GetKeyStorageInterface(pszprovidername.param().abi(), core::mem::transmute(ppfunctiontable), dwflags) } + unsafe { GetKeyStorageInterface(pszprovidername.param().abi(), ppfunctiontable as _, dwflags) } } #[inline] pub unsafe fn GetKeyedHash(hsymmetriccrypto: *const INFORMATIONCARD_CRYPTO_HANDLE) -> windows_core::Result<*mut INFORMATIONCARD_CRYPTO_HANDLE> { @@ -2209,7 +2194,7 @@ where P0: windows_core::Param, { windows_targets::link!("bcryptprimitives.dll" "system" fn GetRngInterface(pszprovidername : windows_core::PCWSTR, ppfunctiontable : *mut *mut BCRYPT_RNG_FUNCTION_TABLE, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - unsafe { GetRngInterface(pszprovidername.param().abi(), core::mem::transmute(ppfunctiontable), dwflags) } + unsafe { GetRngInterface(pszprovidername.param().abi(), ppfunctiontable as _, dwflags) } } #[inline] pub unsafe fn GetSChannelInterface(pszprovidername: P0, ppfunctiontable: *mut *mut NCRYPT_SSL_FUNCTION_TABLE, dwflags: u32) -> super::super::Foundation::NTSTATUS @@ -2217,7 +2202,7 @@ where P0: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn GetSChannelInterface(pszprovidername : windows_core::PCWSTR, ppfunctiontable : *mut *mut NCRYPT_SSL_FUNCTION_TABLE, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - unsafe { GetSChannelInterface(pszprovidername.param().abi(), core::mem::transmute(ppfunctiontable), dwflags) } + unsafe { GetSChannelInterface(pszprovidername.param().abi(), ppfunctiontable as _, dwflags) } } #[inline] pub unsafe fn GetSecretAgreementInterface(pszprovidername: P0, pszalgid: P1, ppfunctiontable: *mut *mut BCRYPT_SECRET_AGREEMENT_FUNCTION_TABLE, dwflags: u32) -> super::super::Foundation::NTSTATUS @@ -2226,7 +2211,7 @@ where P1: windows_core::Param, { windows_targets::link!("bcryptprimitives.dll" "system" fn GetSecretAgreementInterface(pszprovidername : windows_core::PCWSTR, pszalgid : windows_core::PCWSTR, ppfunctiontable : *mut *mut BCRYPT_SECRET_AGREEMENT_FUNCTION_TABLE, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - unsafe { GetSecretAgreementInterface(pszprovidername.param().abi(), pszalgid.param().abi(), core::mem::transmute(ppfunctiontable), dwflags) } + unsafe { GetSecretAgreementInterface(pszprovidername.param().abi(), pszalgid.param().abi(), ppfunctiontable as _, dwflags) } } #[inline] pub unsafe fn GetSignatureInterface(pszprovidername: P0, pszalgid: P1, ppfunctiontable: *mut *mut BCRYPT_SIGNATURE_FUNCTION_TABLE, dwflags: u32) -> super::super::Foundation::NTSTATUS @@ -2235,12 +2220,12 @@ where P1: windows_core::Param, { windows_targets::link!("bcryptprimitives.dll" "system" fn GetSignatureInterface(pszprovidername : windows_core::PCWSTR, pszalgid : windows_core::PCWSTR, ppfunctiontable : *mut *mut BCRYPT_SIGNATURE_FUNCTION_TABLE, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - unsafe { GetSignatureInterface(pszprovidername.param().abi(), pszalgid.param().abi(), core::mem::transmute(ppfunctiontable), dwflags) } + unsafe { GetSignatureInterface(pszprovidername.param().abi(), pszalgid.param().abi(), ppfunctiontable as _, dwflags) } } #[inline] pub unsafe fn GetToken(ppolicychain: &[POLICY_ELEMENT], securitytoken: *mut *mut GENERIC_XML_TOKEN, phprooftokencrypto: *mut *mut INFORMATIONCARD_CRYPTO_HANDLE) -> windows_core::Result<()> { windows_targets::link!("infocardapi.dll" "system" fn GetToken(cpolicychain : u32, ppolicychain : *const POLICY_ELEMENT, securitytoken : *mut *mut GENERIC_XML_TOKEN, phprooftokencrypto : *mut *mut INFORMATIONCARD_CRYPTO_HANDLE) -> windows_core::HRESULT); - unsafe { GetToken(ppolicychain.len().try_into().unwrap(), core::mem::transmute(ppolicychain.as_ptr()), core::mem::transmute(securitytoken), core::mem::transmute(phprooftokencrypto)).ok() } + unsafe { GetToken(ppolicychain.len().try_into().unwrap(), core::mem::transmute(ppolicychain.as_ptr()), securitytoken as _, phprooftokencrypto as _).ok() } } #[inline] pub unsafe fn HashCore(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, pindata: &[u8]) -> windows_core::Result<()> { @@ -2250,7 +2235,7 @@ pub unsafe fn HashCore(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, pindata: & #[inline] pub unsafe fn HashFinal(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, pindata: &[u8], pcboutdata: *mut u32, ppoutdata: *mut *mut u8) -> windows_core::Result<()> { windows_targets::link!("infocardapi.dll" "system" fn HashFinal(hcrypto : *const INFORMATIONCARD_CRYPTO_HANDLE, cbindata : u32, pindata : *const u8, pcboutdata : *mut u32, ppoutdata : *mut *mut u8) -> windows_core::HRESULT); - unsafe { HashFinal(hcrypto, pindata.len().try_into().unwrap(), core::mem::transmute(pindata.as_ptr()), core::mem::transmute(pcboutdata), core::mem::transmute(ppoutdata)).ok() } + unsafe { HashFinal(hcrypto, pindata.len().try_into().unwrap(), core::mem::transmute(pindata.as_ptr()), pcboutdata as _, ppoutdata as _).ok() } } #[inline] pub unsafe fn ImportInformationCard(filename: P0) -> windows_core::Result<()> @@ -2273,7 +2258,7 @@ pub unsafe fn NCryptCloseProtectionDescriptor(hdescriptor: super::NCRYPT_DESCRIP #[inline] 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); - unsafe { NCryptCreateClaim(core::mem::transmute(hsubjectkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(hauthoritykey.unwrap_or(core::mem::zeroed())), 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), dwflags).ok() } + unsafe { NCryptCreateClaim(hsubjectkey.unwrap_or(core::mem::zeroed()) as _, hauthoritykey.unwrap_or(core::mem::zeroed()) as _, dwclaimtype, pparameterlist.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pbclaimblob.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbclaimblob.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult as _, dwflags).ok() } } #[inline] 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<()> @@ -2282,7 +2267,7 @@ where 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); - unsafe { NCryptCreatePersistedKey(hprovider, core::mem::transmute(phkey), pszalgid.param().abi(), pszkeyname.param().abi(), dwlegacykeyspec, dwflags).ok() } + unsafe { NCryptCreatePersistedKey(hprovider, phkey as _, pszalgid.param().abi(), pszkeyname.param().abi(), dwlegacykeyspec, dwflags).ok() } } #[inline] pub unsafe fn NCryptCreateProtectionDescriptor(pwszdescriptorstring: P0, dwflags: u32) -> windows_core::Result @@ -2298,7 +2283,7 @@ where #[inline] 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); - unsafe { NCryptDecrypt(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), dwflags).ok() } + unsafe { NCryptDecrypt(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()), ppaddinginfo.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pboutput.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pboutput.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult as _, dwflags).ok() } } #[inline] pub unsafe fn NCryptDeleteKey(hkey: NCRYPT_KEY_HANDLE, dwflags: u32) -> windows_core::Result<()> { @@ -2311,17 +2296,17 @@ where P1: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn NCryptDeriveKey(hsharedsecret : NCRYPT_SECRET_HANDLE, pwszkdf : windows_core::PCWSTR, pparameterlist : *const BCryptBufferDesc, pbderivedkey : *mut u8, cbderivedkey : u32, pcbresult : *mut u32, dwflags : u32) -> windows_core::HRESULT); - unsafe { NCryptDeriveKey(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), dwflags).ok() } + unsafe { NCryptDeriveKey(hsharedsecret, pwszkdf.param().abi(), pparameterlist.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pbderivedkey.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbderivedkey.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult as _, dwflags).ok() } } #[inline] 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); - unsafe { NCryptEncrypt(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), dwflags).ok() } + unsafe { NCryptEncrypt(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()), ppaddinginfo.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pboutput.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pboutput.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult as _, dwflags).ok() } } #[inline] 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); - unsafe { NCryptEnumAlgorithms(hprovider, dwalgoperations, core::mem::transmute(pdwalgcount), core::mem::transmute(ppalglist), dwflags).ok() } + unsafe { NCryptEnumAlgorithms(hprovider, dwalgoperations, pdwalgcount as _, ppalglist as _, dwflags).ok() } } #[inline] 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<()> @@ -2329,12 +2314,12 @@ where 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); - unsafe { NCryptEnumKeys(hprovider, pszscope.param().abi(), core::mem::transmute(ppkeyname), core::mem::transmute(ppenumstate), dwflags).ok() } + unsafe { NCryptEnumKeys(hprovider, pszscope.param().abi(), ppkeyname as _, ppenumstate as _, dwflags).ok() } } #[inline] pub unsafe fn NCryptEnumStorageProviders(pdwprovidercount: *mut u32, ppproviderlist: *mut *mut NCryptProviderName, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn NCryptEnumStorageProviders(pdwprovidercount : *mut u32, ppproviderlist : *mut *mut NCryptProviderName, dwflags : u32) -> windows_core::HRESULT); - unsafe { NCryptEnumStorageProviders(core::mem::transmute(pdwprovidercount), core::mem::transmute(ppproviderlist), dwflags).ok() } + unsafe { NCryptEnumStorageProviders(pdwprovidercount as _, ppproviderlist as _, dwflags).ok() } } #[inline] 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<()> @@ -2342,7 +2327,7 @@ where P2: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn NCryptExportKey(hkey : NCRYPT_KEY_HANDLE, hexportkey : NCRYPT_KEY_HANDLE, pszblobtype : windows_core::PCWSTR, pparameterlist : *const BCryptBufferDesc, pboutput : *mut u8, cboutput : u32, pcbresult : *mut u32, dwflags : NCRYPT_FLAGS) -> windows_core::HRESULT); - unsafe { NCryptExportKey(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), dwflags).ok() } + unsafe { NCryptExportKey(hkey, hexportkey.unwrap_or(core::mem::zeroed()) as _, pszblobtype.param().abi(), pparameterlist.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pboutput.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pboutput.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult as _, dwflags).ok() } } #[inline] pub unsafe fn NCryptFinalizeKey(hkey: NCRYPT_KEY_HANDLE, dwflags: NCRYPT_FLAGS) -> windows_core::Result<()> { @@ -2352,7 +2337,7 @@ pub unsafe fn NCryptFinalizeKey(hkey: NCRYPT_KEY_HANDLE, dwflags: NCRYPT_FLAGS) #[inline] pub unsafe fn NCryptFreeBuffer(pvinput: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn NCryptFreeBuffer(pvinput : *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { NCryptFreeBuffer(core::mem::transmute(pvinput)).ok() } + unsafe { NCryptFreeBuffer(pvinput as _).ok() } } #[inline] pub unsafe fn NCryptFreeObject(hobject: NCRYPT_HANDLE) -> windows_core::Result<()> { @@ -2365,12 +2350,12 @@ where 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); - unsafe { NCryptGetProperty(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), dwflags).ok() } + unsafe { NCryptGetProperty(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()), pcbresult as _, dwflags).ok() } } #[inline] 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); - unsafe { NCryptGetProtectionDescriptorInfo(hdescriptor, core::mem::transmute(pmempara.unwrap_or(core::mem::zeroed())), dwinfotype, core::mem::transmute(ppvinfo)).ok() } + unsafe { NCryptGetProtectionDescriptorInfo(hdescriptor, pmempara.unwrap_or(core::mem::zeroed()) as _, dwinfotype, ppvinfo as _).ok() } } #[inline] 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<()> @@ -2378,7 +2363,7 @@ where P2: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn NCryptImportKey(hprovider : NCRYPT_PROV_HANDLE, himportkey : NCRYPT_KEY_HANDLE, pszblobtype : windows_core::PCWSTR, pparameterlist : *const BCryptBufferDesc, phkey : *mut NCRYPT_KEY_HANDLE, pbdata : *const u8, cbdata : u32, dwflags : NCRYPT_FLAGS) -> windows_core::HRESULT); - unsafe { NCryptImportKey(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(), dwflags).ok() } + unsafe { NCryptImportKey(hprovider, himportkey.unwrap_or(core::mem::zeroed()) as _, pszblobtype.param().abi(), pparameterlist.unwrap_or(core::mem::zeroed()) as _, phkey as _, core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), dwflags).ok() } } #[inline] pub unsafe fn NCryptIsAlgSupported(hprovider: NCRYPT_PROV_HANDLE, pszalgid: P1, dwflags: u32) -> windows_core::Result<()> @@ -2396,12 +2381,12 @@ pub unsafe fn NCryptIsKeyHandle(hkey: NCRYPT_KEY_HANDLE) -> super::super::Founda #[inline] 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); - unsafe { NCryptKeyDerivation(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), dwflags).ok() } + unsafe { NCryptKeyDerivation(hkey, pparameterlist.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pbderivedkey.as_ptr()), pbderivedkey.len().try_into().unwrap(), pcbresult as _, dwflags).ok() } } #[inline] 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); - unsafe { NCryptNotifyChangeKey(hprovider, core::mem::transmute(phevent), dwflags).ok() } + unsafe { NCryptNotifyChangeKey(hprovider, phevent as _, dwflags).ok() } } #[inline] 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<()> @@ -2409,7 +2394,7 @@ where 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); - unsafe { NCryptOpenKey(hprovider, core::mem::transmute(phkey), pszkeyname.param().abi(), dwlegacykeyspec, dwflags).ok() } + unsafe { NCryptOpenKey(hprovider, phkey as _, pszkeyname.param().abi(), dwlegacykeyspec, dwflags).ok() } } #[inline] pub unsafe fn NCryptOpenStorageProvider(phprovider: *mut NCRYPT_PROV_HANDLE, pszprovidername: P1, dwflags: u32) -> windows_core::Result<()> @@ -2417,12 +2402,12 @@ where P1: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn NCryptOpenStorageProvider(phprovider : *mut NCRYPT_PROV_HANDLE, pszprovidername : windows_core::PCWSTR, dwflags : u32) -> windows_core::HRESULT); - unsafe { NCryptOpenStorageProvider(core::mem::transmute(phprovider), pszprovidername.param().abi(), dwflags).ok() } + unsafe { NCryptOpenStorageProvider(phprovider as _, pszprovidername.param().abi(), dwflags).ok() } } #[inline] 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); - unsafe { NCryptProtectSecret(hdescriptor, 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() } + unsafe { NCryptProtectSecret(hdescriptor, dwflags, core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), pmempara.unwrap_or(core::mem::zeroed()) as _, hwnd.unwrap_or(core::mem::zeroed()) as _, ppbprotectedblob as _, pcbprotectedblob as _).ok() } } #[inline] pub unsafe fn NCryptQueryProtectionDescriptorName(pwszname: P0, pwszdescriptorstring: Option, pcdescriptorstring: *mut usize, dwflags: u32) -> windows_core::Result<()> @@ -2430,7 +2415,7 @@ 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); - unsafe { NCryptQueryProtectionDescriptorName(pwszname.param().abi(), core::mem::transmute(pwszdescriptorstring.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcdescriptorstring), dwflags).ok() } + unsafe { NCryptQueryProtectionDescriptorName(pwszname.param().abi(), pwszdescriptorstring.unwrap_or(core::mem::zeroed()) as _, pcdescriptorstring as _, dwflags).ok() } } #[inline] pub unsafe fn NCryptRegisterProtectionDescriptorName(pwszname: P0, pwszdescriptorstring: P1, dwflags: u32) -> windows_core::Result<()> @@ -2444,7 +2429,7 @@ where #[inline] 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); - unsafe { NCryptSecretAgreement(hprivkey, hpubkey, core::mem::transmute(phagreedsecret), dwflags).ok() } + unsafe { NCryptSecretAgreement(hprivkey, hpubkey, phagreedsecret as _, dwflags).ok() } } #[inline] pub unsafe fn NCryptSetProperty(hobject: NCRYPT_HANDLE, pszproperty: P1, pbinput: &[u8], dwflags: NCRYPT_FLAGS) -> windows_core::Result<()> @@ -2457,7 +2442,7 @@ where #[inline] 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); - unsafe { NCryptSignHash(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), dwflags).ok() } + unsafe { NCryptSignHash(hkey, ppaddinginfo.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pbhashvalue.as_ptr()), pbhashvalue.len().try_into().unwrap(), core::mem::transmute(pbsignature.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbsignature.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult as _, dwflags).ok() } } #[inline] pub unsafe fn NCryptStreamClose(hstream: super::NCRYPT_STREAM_HANDLE) -> windows_core::Result<()> { @@ -2469,7 +2454,7 @@ pub unsafe fn NCryptStreamOpenToProtect(hdescriptor: super::NCRYPT_DESCRIPTOR_HA 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); unsafe { let mut result__ = core::mem::zeroed(); - NCryptStreamOpenToProtect(hdescriptor, dwflags, core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pstreaminfo, &mut result__).map(|| core::mem::transmute(result__)) + NCryptStreamOpenToProtect(hdescriptor, dwflags, hwnd.unwrap_or(core::mem::zeroed()) as _, pstreaminfo, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -2477,7 +2462,7 @@ pub unsafe fn NCryptStreamOpenToUnprotect(pstreaminfo: *const NCRYPT_PROTECT_STR 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); unsafe { let mut result__ = core::mem::zeroed(); - NCryptStreamOpenToUnprotect(pstreaminfo, dwflags, core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + NCryptStreamOpenToUnprotect(pstreaminfo, dwflags, hwnd.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -2485,7 +2470,7 @@ pub unsafe fn NCryptStreamOpenToUnprotectEx(pstreaminfo: *const NCRYPT_PROTECT_S 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); unsafe { let mut result__ = core::mem::zeroed(); - NCryptStreamOpenToUnprotectEx(pstreaminfo, dwflags, core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + NCryptStreamOpenToUnprotectEx(pstreaminfo, dwflags, hwnd.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -2496,22 +2481,22 @@ pub unsafe fn NCryptStreamUpdate(hstream: super::NCRYPT_STREAM_HANDLE, pbdata: & #[inline] 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); - unsafe { NCryptTranslateHandle(core::mem::transmute(phprovider.unwrap_or(core::mem::zeroed())), core::mem::transmute(phkey), hlegacyprov, core::mem::transmute(hlegacykey.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwlegacykeyspec.unwrap_or(core::mem::zeroed())), dwflags).ok() } + unsafe { NCryptTranslateHandle(phprovider.unwrap_or(core::mem::zeroed()) as _, phkey as _, hlegacyprov, hlegacykey.unwrap_or(core::mem::zeroed()) as _, dwlegacykeyspec.unwrap_or(core::mem::zeroed()) as _, 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: 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); - unsafe { NCryptUnprotectSecret(core::mem::transmute(phdescriptor.unwrap_or(core::mem::zeroed())), 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() } + unsafe { NCryptUnprotectSecret(phdescriptor.unwrap_or(core::mem::zeroed()) as _, dwflags, core::mem::transmute(pbprotectedblob.as_ptr()), pbprotectedblob.len().try_into().unwrap(), pmempara.unwrap_or(core::mem::zeroed()) as _, hwnd.unwrap_or(core::mem::zeroed()) as _, ppbdata as _, pcbdata as _).ok() } } #[inline] 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); - unsafe { NCryptVerifyClaim(hsubjectkey, core::mem::transmute(hauthoritykey.unwrap_or(core::mem::zeroed())), 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), dwflags).ok() } + unsafe { NCryptVerifyClaim(hsubjectkey, hauthoritykey.unwrap_or(core::mem::zeroed()) as _, dwclaimtype, pparameterlist.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pbclaimblob.as_ptr()), pbclaimblob.len().try_into().unwrap(), poutput as _, dwflags).ok() } } #[inline] 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); - unsafe { NCryptVerifySignature(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(), dwflags).ok() } + unsafe { NCryptVerifySignature(hkey, ppaddinginfo.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pbhashvalue.as_ptr()), pbhashvalue.len().try_into().unwrap(), core::mem::transmute(pbsignature.as_ptr()), pbsignature.len().try_into().unwrap(), dwflags).ok() } } #[inline] pub unsafe fn PFXExportCertStore(hstore: HCERTSTORE, ppfx: *mut CRYPT_INTEGER_BLOB, szpassword: P2, dwflags: u32) -> windows_core::Result<()> @@ -2519,7 +2504,7 @@ where 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); - unsafe { PFXExportCertStore(hstore, core::mem::transmute(ppfx), szpassword.param().abi(), dwflags).ok() } + unsafe { PFXExportCertStore(hstore, ppfx as _, szpassword.param().abi(), dwflags).ok() } } #[inline] pub unsafe fn PFXExportCertStoreEx(hstore: HCERTSTORE, ppfx: *mut CRYPT_INTEGER_BLOB, szpassword: P2, pvpara: *const core::ffi::c_void, dwflags: u32) -> windows_core::Result<()> @@ -2527,7 +2512,7 @@ where 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); - unsafe { PFXExportCertStoreEx(hstore, core::mem::transmute(ppfx), szpassword.param().abi(), pvpara, dwflags).ok() } + unsafe { PFXExportCertStoreEx(hstore, ppfx as _, szpassword.param().abi(), pvpara, dwflags).ok() } } #[inline] pub unsafe fn PFXImportCertStore(ppfx: *const CRYPT_INTEGER_BLOB, szpassword: P1, dwflags: CRYPT_KEY_FLAGS) -> windows_core::Result @@ -2567,7 +2552,7 @@ where P3: windows_core::Param, { windows_targets::link!("infocardapi.dll" "system" fn SignHash(hcrypto : *const INFORMATIONCARD_CRYPTO_HANDLE, cbhash : u32, phash : *const u8, hashalgoid : windows_core::PCWSTR, pcbsig : *mut u32, ppsig : *mut *mut u8) -> windows_core::HRESULT); - unsafe { SignHash(hcrypto, phash.len().try_into().unwrap(), core::mem::transmute(phash.as_ptr()), hashalgoid.param().abi(), core::mem::transmute(pcbsig), core::mem::transmute(ppsig)).ok() } + unsafe { SignHash(hcrypto, phash.len().try_into().unwrap(), core::mem::transmute(phash.as_ptr()), hashalgoid.param().abi(), pcbsig as _, ppsig as _).ok() } } #[inline] pub unsafe fn SignerFreeSignerContext(psignercontext: *const SIGNER_CONTEXT) -> windows_core::Result<()> { @@ -2580,7 +2565,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); - unsafe { SignerSign(psubjectinfo, psignercert, 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() } + unsafe { SignerSign(psubjectinfo, psignercert, psignatureinfo, pproviderinfo.unwrap_or(core::mem::zeroed()) as _, pwszhttptimestamp.param().abi(), psrequest.unwrap_or(core::mem::zeroed()) as _, psipdata.unwrap_or(core::mem::zeroed()) as _).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> @@ -2590,7 +2575,7 @@ where windows_targets::link!("mssign32.dll" "system" fn SignerSignEx(dwflags : SIGNER_SIGN_FLAGS, psubjectinfo : *const SIGNER_SUBJECT_INFO, psignercert : *const SIGNER_CERT, psignatureinfo : *const SIGNER_SIGNATURE_INFO, pproviderinfo : *const SIGNER_PROVIDER_INFO, pwszhttptimestamp : windows_core::PCWSTR, psrequest : *const CRYPT_ATTRIBUTES, psipdata : *const core::ffi::c_void, ppsignercontext : *mut *mut SIGNER_CONTEXT) -> windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - SignerSignEx(dwflags, psubjectinfo, psignercert, 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__)) + SignerSignEx(dwflags, psubjectinfo, psignercert, psignatureinfo, pproviderinfo.unwrap_or(core::mem::zeroed()) as _, pwszhttptimestamp.param().abi(), psrequest.unwrap_or(core::mem::zeroed()) as _, psipdata.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -2600,24 +2585,7 @@ where P7: windows_core::Param, { windows_targets::link!("mssign32.dll" "system" fn SignerSignEx2(dwflags : SIGNER_SIGN_FLAGS, psubjectinfo : *const SIGNER_SUBJECT_INFO, psignercert : *const SIGNER_CERT, psignatureinfo : *const SIGNER_SIGNATURE_INFO, pproviderinfo : *const SIGNER_PROVIDER_INFO, dwtimestampflags : SIGNER_TIMESTAMP_FLAGS, psztimestampalgorithmoid : windows_core::PCSTR, pwszhttptimestamp : windows_core::PCWSTR, psrequest : *const CRYPT_ATTRIBUTES, psipdata : *const core::ffi::c_void, ppsignercontext : *mut *mut SIGNER_CONTEXT, pcryptopolicy : *const CERT_STRONG_SIGN_PARA, preserved : *const core::ffi::c_void) -> windows_core::HRESULT); - unsafe { - SignerSignEx2( - dwflags, - psubjectinfo, - psignercert, - psignatureinfo, - 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::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() - } + unsafe { SignerSignEx2(dwflags, psubjectinfo, psignercert, psignatureinfo, pproviderinfo.unwrap_or(core::mem::zeroed()) as _, dwtimestampflags.unwrap_or(core::mem::zeroed()) as _, psztimestampalgorithmoid.param().abi(), pwszhttptimestamp.param().abi(), psrequest.unwrap_or(core::mem::zeroed()) as _, psipdata.unwrap_or(core::mem::zeroed()) as _, ppsignercontext as _, pcryptopolicy.unwrap_or(core::mem::zeroed()) as _, preserved.unwrap_or(core::mem::zeroed()) as _).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: 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<()> @@ -2632,16 +2600,16 @@ where psubjectinfo, psignercert, psignatureinfo, - core::mem::transmute(pproviderinfo.unwrap_or(core::mem::zeroed())), - core::mem::transmute(dwtimestampflags.unwrap_or(core::mem::zeroed())), + pproviderinfo.unwrap_or(core::mem::zeroed()) as _, + dwtimestampflags.unwrap_or(core::mem::zeroed()) as _, psztimestampalgorithmoid.param().abi(), pwszhttptimestamp.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(pdigestsigninfo.unwrap_or(core::mem::zeroed())), - core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), + psrequest.unwrap_or(core::mem::zeroed()) as _, + psipdata.unwrap_or(core::mem::zeroed()) as _, + ppsignercontext as _, + pcryptopolicy.unwrap_or(core::mem::zeroed()) as _, + pdigestsigninfo.unwrap_or(core::mem::zeroed()) as _, + preserved.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -2652,7 +2620,7 @@ 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); - unsafe { SignerTimeStamp(psubjectinfo, pwszhttptimestamp.param().abi(), core::mem::transmute(psrequest.unwrap_or(core::mem::zeroed())), core::mem::transmute(psipdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SignerTimeStamp(psubjectinfo, pwszhttptimestamp.param().abi(), psrequest.unwrap_or(core::mem::zeroed()) as _, psipdata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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> @@ -2662,7 +2630,7 @@ where 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); unsafe { let mut result__ = core::mem::zeroed(); - SignerTimeStampEx(core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), psubjectinfo, pwszhttptimestamp.param().abi(), psrequest, psipdata, &mut result__).map(|| core::mem::transmute(result__)) + SignerTimeStampEx(dwflags.unwrap_or(core::mem::zeroed()) as _, psubjectinfo, pwszhttptimestamp.param().abi(), psrequest, psipdata, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -2673,7 +2641,7 @@ where 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); unsafe { let mut result__ = core::mem::zeroed(); - SignerTimeStampEx2(core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), psubjectinfo, pwszhttptimestamp.param().abi(), dwalgid, psrequest, psipdata, &mut result__).map(|| core::mem::transmute(result__)) + SignerTimeStampEx2(dwflags.unwrap_or(core::mem::zeroed()) as _, psubjectinfo, pwszhttptimestamp.param().abi(), dwalgid, psrequest, psipdata, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -2683,7 +2651,7 @@ 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); - unsafe { SignerTimeStampEx3(dwflags, dwindex, 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() } + unsafe { SignerTimeStampEx3(dwflags, dwindex, psubjectinfo, pwszhttptimestamp.param().abi(), pszalgorithmoid.param().abi(), psrequest.unwrap_or(core::mem::zeroed()) as _, psipdata.unwrap_or(core::mem::zeroed()) as _, ppsignercontext as _, pcryptopolicy.unwrap_or(core::mem::zeroed()) as _, preserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SslChangeNotify(hevent: super::super::Foundation::HANDLE, dwflags: u32) -> windows_core::Result<()> { @@ -2696,12 +2664,12 @@ where 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); - unsafe { SslComputeClientAuthHash(hsslprovider, hmasterkey, 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), dwflags).ok() } + unsafe { SslComputeClientAuthHash(hsslprovider, hmasterkey, 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()), pcbresult as _, dwflags).ok() } } #[inline] 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); - unsafe { SslComputeEapKeyBlock(hsslprovider, 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), dwflags).ok() } + unsafe { SslComputeEapKeyBlock(hsslprovider, 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()), pcbresult as _, dwflags).ok() } } #[inline] pub unsafe fn SslComputeFinishedHash(hsslprovider: NCRYPT_PROV_HANDLE, hmasterkey: NCRYPT_KEY_HANDLE, hhandshakehash: NCRYPT_HASH_HANDLE, pboutput: &mut [u8], dwflags: u32) -> windows_core::Result<()> { @@ -2711,7 +2679,7 @@ pub unsafe fn SslComputeFinishedHash(hsslprovider: NCRYPT_PROV_HANDLE, hmasterke #[inline] 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); - unsafe { SslComputeSessionHash(hsslprovider, hhandshakehash, 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), dwflags).ok() } + unsafe { SslComputeSessionHash(hsslprovider, hhandshakehash, 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()), pcbresult as _, dwflags).ok() } } #[inline] pub unsafe fn SslCreateClientAuthHash(hsslprovider: NCRYPT_PROV_HANDLE, phhandshakehash: *mut NCRYPT_HASH_HANDLE, dwprotocol: u32, dwciphersuite: u32, pszhashalgid: P4, dwflags: u32) -> windows_core::Result<()> @@ -2719,17 +2687,17 @@ where 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); - unsafe { SslCreateClientAuthHash(hsslprovider, core::mem::transmute(phhandshakehash), dwprotocol, dwciphersuite, pszhashalgid.param().abi(), dwflags).ok() } + unsafe { SslCreateClientAuthHash(hsslprovider, phhandshakehash as _, dwprotocol, dwciphersuite, pszhashalgid.param().abi(), dwflags).ok() } } #[inline] 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); - unsafe { SslCreateEphemeralKey(hsslprovider, core::mem::transmute(phephemeralkey), dwprotocol, dwciphersuite, dwkeytype, 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()), dwflags).ok() } + unsafe { SslCreateEphemeralKey(hsslprovider, phephemeralkey as _, dwprotocol, dwciphersuite, dwkeytype, 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()), dwflags).ok() } } #[inline] 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); - unsafe { SslCreateHandshakeHash(hsslprovider, core::mem::transmute(phhandshakehash), dwprotocol, dwciphersuite, dwflags).ok() } + unsafe { SslCreateHandshakeHash(hsslprovider, phhandshakehash as _, dwprotocol, dwciphersuite, dwflags).ok() } } #[inline] pub unsafe fn SslDecrementProviderReferenceCount(hsslprovider: NCRYPT_PROV_HANDLE) -> windows_core::Result<()> { @@ -2739,67 +2707,67 @@ pub unsafe fn SslDecrementProviderReferenceCount(hsslprovider: NCRYPT_PROV_HANDL #[inline] 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); - unsafe { SslDecryptPacket(hsslprovider, 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), sequencenumber, dwflags).ok() } + unsafe { SslDecryptPacket(hsslprovider, 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()), pcbresult as _, sequencenumber, dwflags).ok() } } #[inline] 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); - unsafe { SslDuplicateTranscriptHash(hsslprovider, htranscripthash, core::mem::transmute(phtranscripthash), dwflags).ok() } + unsafe { SslDuplicateTranscriptHash(hsslprovider, htranscripthash, phtranscripthash as _, dwflags).ok() } } #[inline] 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); - unsafe { SslEncryptPacket(hsslprovider, 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), sequencenumber, dwcontenttype, dwflags).ok() } + unsafe { SslEncryptPacket(hsslprovider, 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()), pcbresult as _, sequencenumber, dwcontenttype, dwflags).ok() } } #[inline] 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); - unsafe { SslEnumCipherSuites(hsslprovider, core::mem::transmute(hprivatekey.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppciphersuite), core::mem::transmute(ppenumstate), dwflags).ok() } + unsafe { SslEnumCipherSuites(hsslprovider, hprivatekey.unwrap_or(core::mem::zeroed()) as _, ppciphersuite as _, ppenumstate as _, dwflags).ok() } } #[inline] 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); - unsafe { SslEnumCipherSuitesEx(hsslprovider, core::mem::transmute(hprivatekey.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppciphersuite), core::mem::transmute(ppenumstate), dwflags).ok() } + unsafe { SslEnumCipherSuitesEx(hsslprovider, hprivatekey.unwrap_or(core::mem::zeroed()) as _, ppciphersuite as _, ppenumstate as _, dwflags).ok() } } #[inline] 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); - unsafe { SslEnumEccCurves(hsslprovider, core::mem::transmute(pecccurvecount), core::mem::transmute(ppecccurve), dwflags).ok() } + unsafe { SslEnumEccCurves(hsslprovider, pecccurvecount as _, ppecccurve as _, dwflags).ok() } } #[inline] pub unsafe fn SslEnumProtocolProviders(pdwprovidercount: *mut u32, ppproviderlist: *mut *mut NCryptProviderName, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn SslEnumProtocolProviders(pdwprovidercount : *mut u32, ppproviderlist : *mut *mut NCryptProviderName, dwflags : u32) -> windows_core::HRESULT); - unsafe { SslEnumProtocolProviders(core::mem::transmute(pdwprovidercount), core::mem::transmute(ppproviderlist), dwflags).ok() } + unsafe { SslEnumProtocolProviders(pdwprovidercount as _, ppproviderlist as _, dwflags).ok() } } #[inline] 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); - unsafe { SslExpandBinderKey(hsslprovider, hearlykey, core::mem::transmute(phbinderkey), core::mem::transmute(pparameterlist.unwrap_or(core::mem::zeroed())), dwflags).ok() } + unsafe { SslExpandBinderKey(hsslprovider, hearlykey, phbinderkey as _, pparameterlist.unwrap_or(core::mem::zeroed()) as _, dwflags).ok() } } #[inline] 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); - unsafe { SslExpandExporterMasterKey(hsslprovider, hbasekey, hhashvalue, core::mem::transmute(phexportermasterkey), core::mem::transmute(pparameterlist.unwrap_or(core::mem::zeroed())), dwflags).ok() } + unsafe { SslExpandExporterMasterKey(hsslprovider, hbasekey, hhashvalue, phexportermasterkey as _, pparameterlist.unwrap_or(core::mem::zeroed()) as _, dwflags).ok() } } #[inline] 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); - unsafe { SslExpandPreSharedKey(hsslprovider, 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())), dwflags).ok() } + unsafe { SslExpandPreSharedKey(hsslprovider, 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()), phpresharedkey as _, pparameterlist.unwrap_or(core::mem::zeroed()) as _, dwflags).ok() } } #[inline] 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); - unsafe { SslExpandResumptionMasterKey(hsslprovider, hmasterkey, hhashvalue, core::mem::transmute(phresumptionmasterkey), core::mem::transmute(pparameterlist.unwrap_or(core::mem::zeroed())), dwflags).ok() } + unsafe { SslExpandResumptionMasterKey(hsslprovider, hmasterkey, hhashvalue, phresumptionmasterkey as _, pparameterlist.unwrap_or(core::mem::zeroed()) as _, dwflags).ok() } } #[inline] 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); - unsafe { SslExpandTrafficKeys(hsslprovider, hbasekey, 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())), dwflags).ok() } + unsafe { SslExpandTrafficKeys(hsslprovider, hbasekey, hhashvalue, phclienttraffickey.unwrap_or(core::mem::zeroed()) as _, phservertraffickey.unwrap_or(core::mem::zeroed()) as _, pparameterlist.unwrap_or(core::mem::zeroed()) as _, dwflags).ok() } } #[inline] 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); - unsafe { SslExpandWriteKey(hsslprovider, hbasetraffickey, core::mem::transmute(phwritekey), core::mem::transmute(pparameterlist.unwrap_or(core::mem::zeroed())), dwflags).ok() } + unsafe { SslExpandWriteKey(hsslprovider, hbasetraffickey, phwritekey as _, pparameterlist.unwrap_or(core::mem::zeroed()) as _, dwflags).ok() } } #[inline] 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<()> @@ -2807,7 +2775,7 @@ where 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); - unsafe { SslExportKey(hsslprovider, 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), dwflags).ok() } + unsafe { SslExportKey(hsslprovider, 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()), pcbresult as _, dwflags).ok() } } #[inline] 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<()> @@ -2820,22 +2788,22 @@ where #[inline] 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); - unsafe { SslExtractEarlyKey(hsslprovider, core::mem::transmute(hpresharedkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(phearlykey), dwprotocol, dwciphersuite, core::mem::transmute(pparameterlist.unwrap_or(core::mem::zeroed())), dwflags).ok() } + unsafe { SslExtractEarlyKey(hsslprovider, hpresharedkey.unwrap_or(core::mem::zeroed()) as _, phearlykey as _, dwprotocol, dwciphersuite, pparameterlist.unwrap_or(core::mem::zeroed()) as _, dwflags).ok() } } #[inline] 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); - unsafe { SslExtractHandshakeKey(hsslprovider, hprivatekey, hpublickey, hearlykey, core::mem::transmute(phhandshakekey), core::mem::transmute(pparameterlist.unwrap_or(core::mem::zeroed())), dwflags).ok() } + unsafe { SslExtractHandshakeKey(hsslprovider, hprivatekey, hpublickey, hearlykey, phhandshakekey as _, pparameterlist.unwrap_or(core::mem::zeroed()) as _, dwflags).ok() } } #[inline] 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); - unsafe { SslExtractMasterKey(hsslprovider, hhandshakekey, core::mem::transmute(phmasterkey), core::mem::transmute(pparameterlist.unwrap_or(core::mem::zeroed())), dwflags).ok() } + unsafe { SslExtractMasterKey(hsslprovider, hhandshakekey, phmasterkey as _, pparameterlist.unwrap_or(core::mem::zeroed()) as _, dwflags).ok() } } #[inline] pub unsafe fn SslFreeBuffer(pvinput: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn SslFreeBuffer(pvinput : *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { SslFreeBuffer(core::mem::transmute(pvinput)).ok() } + unsafe { SslFreeBuffer(pvinput as _).ok() } } #[inline] pub unsafe fn SslFreeObject(hobject: NCRYPT_HANDLE, dwflags: u32) -> windows_core::Result<()> { @@ -2845,17 +2813,17 @@ pub unsafe fn SslFreeObject(hobject: NCRYPT_HANDLE, dwflags: u32) -> windows_cor #[inline] 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); - unsafe { SslGenerateMasterKey(hsslprovider, core::mem::transmute(hprivatekey.unwrap_or(core::mem::zeroed())), hpublickey, core::mem::transmute(phmasterkey), dwprotocol, dwciphersuite, 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), dwflags).ok() } + unsafe { SslGenerateMasterKey(hsslprovider, hprivatekey.unwrap_or(core::mem::zeroed()) as _, hpublickey, phmasterkey as _, dwprotocol, dwciphersuite, 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()), pcbresult as _, dwflags).ok() } } #[inline] 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); - unsafe { SslGeneratePreMasterKey(hsslprovider, hpublickey, core::mem::transmute(phpremasterkey), dwprotocol, dwciphersuite, 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), dwflags).ok() } + unsafe { SslGeneratePreMasterKey(hsslprovider, hpublickey, phpremasterkey as _, dwprotocol, dwciphersuite, 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()), pcbresult as _, dwflags).ok() } } #[inline] 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); - unsafe { SslGenerateSessionKeys(hsslprovider, hmasterkey, core::mem::transmute(phreadkey), core::mem::transmute(phwritekey), pparameterlist, dwflags).ok() } + unsafe { SslGenerateSessionKeys(hsslprovider, hmasterkey, phreadkey as _, phwritekey as _, pparameterlist, dwflags).ok() } } #[inline] pub unsafe fn SslGetCipherSuitePRFHashAlgorithm(hsslprovider: NCRYPT_PROV_HANDLE, dwprotocol: u32, dwciphersuite: u32, dwkeytype: u32, szprfhash: &mut [u16; 64], dwflags: u32) -> windows_core::Result<()> { @@ -2868,7 +2836,7 @@ where 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); - unsafe { SslGetKeyProperty(hkey, pszproperty.param().abi(), core::mem::transmute(ppboutput), core::mem::transmute(pcboutput), dwflags).ok() } + unsafe { SslGetKeyProperty(hkey, pszproperty.param().abi(), ppboutput as _, pcboutput as _, dwflags).ok() } } #[inline] 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<()> @@ -2876,7 +2844,7 @@ where P1: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn SslGetProviderProperty(hsslprovider : NCRYPT_PROV_HANDLE, pszproperty : windows_core::PCWSTR, ppboutput : *mut *mut u8, pcboutput : *mut u32, ppenumstate : *mut *mut core::ffi::c_void, dwflags : u32) -> windows_core::HRESULT); - unsafe { SslGetProviderProperty(hsslprovider, pszproperty.param().abi(), core::mem::transmute(ppboutput), core::mem::transmute(pcboutput), core::mem::transmute(ppenumstate.unwrap_or(core::mem::zeroed())), dwflags).ok() } + unsafe { SslGetProviderProperty(hsslprovider, pszproperty.param().abi(), ppboutput as _, pcboutput as _, ppenumstate.unwrap_or(core::mem::zeroed()) as _, dwflags).ok() } } #[inline] pub unsafe fn SslHashHandshake(hsslprovider: NCRYPT_PROV_HANDLE, hhandshakehash: NCRYPT_HASH_HANDLE, pbinput: &[u8], dwflags: u32) -> windows_core::Result<()> { @@ -2889,12 +2857,12 @@ where 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); - unsafe { SslImportKey(hsslprovider, core::mem::transmute(phkey), pszblobtype.param().abi(), core::mem::transmute(pbkeyblob.as_ptr()), pbkeyblob.len().try_into().unwrap(), dwflags).ok() } + unsafe { SslImportKey(hsslprovider, phkey as _, pszblobtype.param().abi(), core::mem::transmute(pbkeyblob.as_ptr()), pbkeyblob.len().try_into().unwrap(), dwflags).ok() } } #[inline] 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); - unsafe { SslImportMasterKey(hsslprovider, hprivatekey, core::mem::transmute(phmasterkey), dwprotocol, dwciphersuite, pparameterlist, core::mem::transmute(pbencryptedkey.as_ptr()), pbencryptedkey.len().try_into().unwrap(), dwflags).ok() } + unsafe { SslImportMasterKey(hsslprovider, hprivatekey, phmasterkey as _, dwprotocol, dwciphersuite, pparameterlist, core::mem::transmute(pbencryptedkey.as_ptr()), pbencryptedkey.len().try_into().unwrap(), dwflags).ok() } } #[inline] pub unsafe fn SslIncrementProviderReferenceCount(hsslprovider: NCRYPT_PROV_HANDLE) -> windows_core::Result<()> { @@ -2904,17 +2872,17 @@ pub unsafe fn SslIncrementProviderReferenceCount(hsslprovider: NCRYPT_PROV_HANDL #[inline] 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); - unsafe { SslLookupCipherLengths(hsslprovider, dwprotocol, dwciphersuite, dwkeytype, core::mem::transmute(pcipherlengths), cbcipherlengths, dwflags).ok() } + unsafe { SslLookupCipherLengths(hsslprovider, dwprotocol, dwciphersuite, dwkeytype, pcipherlengths as _, cbcipherlengths, dwflags).ok() } } #[inline] 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); - unsafe { SslLookupCipherSuiteInfo(hsslprovider, dwprotocol, dwciphersuite, dwkeytype, core::mem::transmute(pciphersuite), dwflags).ok() } + unsafe { SslLookupCipherSuiteInfo(hsslprovider, dwprotocol, dwciphersuite, dwkeytype, pciphersuite as _, dwflags).ok() } } #[inline] 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); - unsafe { SslOpenPrivateKey(hsslprovider, core::mem::transmute(phprivatekey), pcertcontext, dwflags).ok() } + unsafe { SslOpenPrivateKey(hsslprovider, phprivatekey as _, pcertcontext, dwflags).ok() } } #[inline] pub unsafe fn SslOpenProvider(phsslprovider: *mut NCRYPT_PROV_HANDLE, pszprovidername: P1, dwflags: u32) -> windows_core::Result<()> @@ -2922,12 +2890,12 @@ where P1: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn SslOpenProvider(phsslprovider : *mut NCRYPT_PROV_HANDLE, pszprovidername : windows_core::PCWSTR, dwflags : u32) -> windows_core::HRESULT); - unsafe { SslOpenProvider(core::mem::transmute(phsslprovider), pszprovidername.param().abi(), dwflags).ok() } + unsafe { SslOpenProvider(phsslprovider as _, pszprovidername.param().abi(), dwflags).ok() } } #[inline] 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); - unsafe { SslSignHash(hsslprovider, 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), dwflags).ok() } + unsafe { SslSignHash(hsslprovider, 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()), pcbresult as _, dwflags).ok() } } #[inline] pub unsafe fn SslVerifySignature(hsslprovider: NCRYPT_PROV_HANDLE, hpublickey: NCRYPT_KEY_HANDLE, pbhashvalue: &[u8], pbsignature: &[u8], dwflags: u32) -> windows_core::Result<()> { @@ -2942,12 +2910,12 @@ pub unsafe fn SystemPrng(pbrandomdata: &mut [u8]) -> super::super::Foundation::B #[inline] pub unsafe fn TransformBlock(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, pindata: &[u8], pcboutdata: *mut u32, ppoutdata: *mut *mut u8) -> windows_core::Result<()> { windows_targets::link!("infocardapi.dll" "system" fn TransformBlock(hcrypto : *const INFORMATIONCARD_CRYPTO_HANDLE, cbindata : u32, pindata : *const u8, pcboutdata : *mut u32, ppoutdata : *mut *mut u8) -> windows_core::HRESULT); - unsafe { TransformBlock(hcrypto, pindata.len().try_into().unwrap(), core::mem::transmute(pindata.as_ptr()), core::mem::transmute(pcboutdata), core::mem::transmute(ppoutdata)).ok() } + unsafe { TransformBlock(hcrypto, pindata.len().try_into().unwrap(), core::mem::transmute(pindata.as_ptr()), pcboutdata as _, ppoutdata as _).ok() } } #[inline] pub unsafe fn TransformFinalBlock(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, pindata: &[u8], pcboutdata: *mut u32, ppoutdata: *mut *mut u8) -> windows_core::Result<()> { windows_targets::link!("infocardapi.dll" "system" fn TransformFinalBlock(hcrypto : *const INFORMATIONCARD_CRYPTO_HANDLE, cbindata : u32, pindata : *const u8, pcboutdata : *mut u32, ppoutdata : *mut *mut u8) -> windows_core::HRESULT); - unsafe { TransformFinalBlock(hcrypto, pindata.len().try_into().unwrap(), core::mem::transmute(pindata.as_ptr()), core::mem::transmute(pcboutdata), core::mem::transmute(ppoutdata)).ok() } + unsafe { TransformFinalBlock(hcrypto, pindata.len().try_into().unwrap(), core::mem::transmute(pindata.as_ptr()), pcboutdata as _, ppoutdata as _).ok() } } #[inline] pub unsafe fn VerifyHash(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, phash: &[u8], hashalgoid: P3, psig: &[u8]) -> windows_core::Result diff --git a/crates/libs/windows/src/Windows/Win32/Security/DiagnosticDataQuery/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/DiagnosticDataQuery/mod.rs index 185fc6ad77..4e0de6a584 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/DiagnosticDataQuery/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/DiagnosticDataQuery/mod.rs @@ -61,12 +61,12 @@ pub unsafe fn DdqGetDiagnosticDataAccessLevelAllowed() -> windows_core::Result windows_core::Result<()> { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqGetDiagnosticRecordAtIndex(hrecord : HDIAGNOSTIC_RECORD, index : u32, record : *mut DIAGNOSTIC_DATA_RECORD) -> windows_core::HRESULT); - unsafe { DdqGetDiagnosticRecordAtIndex(hrecord, index, core::mem::transmute(record)).ok() } + unsafe { DdqGetDiagnosticRecordAtIndex(hrecord, index, record as _).ok() } } #[inline] 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); - unsafe { DdqGetDiagnosticRecordBinaryDistribution(hsession, core::mem::transmute(producernames.as_ptr()), producernames.len().try_into().unwrap(), topnbinaries, core::mem::transmute(binarystats), core::mem::transmute(statcount)).ok() } + unsafe { DdqGetDiagnosticRecordBinaryDistribution(hsession, core::mem::transmute(producernames.as_ptr()), producernames.len().try_into().unwrap(), topnbinaries, binarystats as _, statcount as _).ok() } } #[inline] pub unsafe fn DdqGetDiagnosticRecordCategoryAtIndex(hcategorydescription: HDIAGNOSTIC_EVENT_CATEGORY_DESCRIPTION, index: u32) -> windows_core::Result { @@ -173,17 +173,17 @@ pub unsafe fn DdqGetDiagnosticRecordProducers(hsession: HDIAGNOSTIC_DATA_QUERY_S #[inline] 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); - unsafe { DdqGetDiagnosticRecordStats(hsession, searchcriteria, core::mem::transmute(recordcount), core::mem::transmute(minrowid), core::mem::transmute(maxrowid)).ok() } + unsafe { DdqGetDiagnosticRecordStats(hsession, searchcriteria, recordcount as _, minrowid as _, maxrowid as _).ok() } } #[inline] 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); - unsafe { DdqGetDiagnosticRecordSummary(hsession, core::mem::transmute(producernames.as_ptr()), producernames.len().try_into().unwrap(), core::mem::transmute(generalstats)).ok() } + unsafe { DdqGetDiagnosticRecordSummary(hsession, core::mem::transmute(producernames.as_ptr()), producernames.len().try_into().unwrap(), generalstats as _).ok() } } #[inline] 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); - unsafe { DdqGetDiagnosticRecordTagDistribution(hsession, core::mem::transmute(producernames.as_ptr()), producernames.len().try_into().unwrap(), core::mem::transmute(tagstats), core::mem::transmute(statcount)).ok() } + unsafe { DdqGetDiagnosticRecordTagDistribution(hsession, core::mem::transmute(producernames.as_ptr()), producernames.len().try_into().unwrap(), tagstats as _, statcount as _).ok() } } #[inline] pub unsafe fn DdqGetDiagnosticReport(hsession: HDIAGNOSTIC_DATA_QUERY_SESSION, reportstoretype: u32) -> windows_core::Result { @@ -196,7 +196,7 @@ pub unsafe fn DdqGetDiagnosticReport(hsession: HDIAGNOSTIC_DATA_QUERY_SESSION, r #[inline] 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); - unsafe { DdqGetDiagnosticReportAtIndex(hreport, index, core::mem::transmute(report)).ok() } + unsafe { DdqGetDiagnosticReportAtIndex(hreport, index, report as _).ok() } } #[inline] pub unsafe fn DdqGetDiagnosticReportCount(hreport: HDIAGNOSTIC_REPORT) -> windows_core::Result { @@ -239,7 +239,7 @@ where windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqIsDiagnosticRecordSampledIn(hsession : HDIAGNOSTIC_DATA_QUERY_SESSION, providergroup : *const windows_core::GUID, providerid : *const windows_core::GUID, providername : windows_core::PCWSTR, eventid : *const u32, eventname : windows_core::PCWSTR, eventversion : *const u32, eventkeywords : *const u64, issampledin : *mut super::super::Foundation:: BOOL) -> windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - DdqIsDiagnosticRecordSampledIn(hsession, 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__)) + DdqIsDiagnosticRecordSampledIn(hsession, providergroup, providerid.unwrap_or(core::mem::zeroed()) as _, providername.param().abi(), eventid.unwrap_or(core::mem::zeroed()) as _, eventname.param().abi(), eventversion.unwrap_or(core::mem::zeroed()) as _, eventkeywords.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] 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 132db8f081..1e83ec2f04 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/DirectoryServices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/DirectoryServices/mod.rs @@ -6,7 +6,7 @@ where P1: 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); - unsafe { DSCreateISecurityInfoObject(pwszobjectpath.param().abi(), pwszobjectclass.param().abi(), dwflags, core::mem::transmute(ppsi), core::mem::transmute(pfnreadsd.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfnwritesd.unwrap_or(core::mem::zeroed())), lpcontext).ok() } + unsafe { DSCreateISecurityInfoObject(pwszobjectpath.param().abi(), pwszobjectclass.param().abi(), dwflags, core::mem::transmute(ppsi), pfnreadsd.unwrap_or(core::mem::zeroed()) as _, pfnwritesd.unwrap_or(core::mem::zeroed()) as _, lpcontext).ok() } } #[cfg(feature = "Win32_Security_Authorization_UI")] #[inline] @@ -19,7 +19,7 @@ where P4: 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); - unsafe { DSCreateISecurityInfoObjectEx(pwszobjectpath.param().abi(), pwszobjectclass.param().abi(), pwszserver.param().abi(), pwszusername.param().abi(), pwszpassword.param().abi(), dwflags, core::mem::transmute(ppsi), core::mem::transmute(pfnreadsd.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfnwritesd.unwrap_or(core::mem::zeroed())), lpcontext).ok() } + unsafe { DSCreateISecurityInfoObjectEx(pwszobjectpath.param().abi(), pwszobjectclass.param().abi(), pwszserver.param().abi(), pwszusername.param().abi(), pwszpassword.param().abi(), dwflags, core::mem::transmute(ppsi), pfnreadsd.unwrap_or(core::mem::zeroed()) as _, pfnwritesd.unwrap_or(core::mem::zeroed()) as _, lpcontext).ok() } } #[cfg(feature = "Win32_UI_Controls")] #[inline] @@ -29,7 +29,7 @@ where P1: 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); - unsafe { DSCreateSecurityPage(pwszobjectpath.param().abi(), pwszobjectclass.param().abi(), dwflags, core::mem::transmute(phpage), core::mem::transmute(pfnreadsd.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfnwritesd.unwrap_or(core::mem::zeroed())), lpcontext).ok() } + unsafe { DSCreateSecurityPage(pwszobjectpath.param().abi(), pwszobjectclass.param().abi(), dwflags, phpage as _, pfnreadsd.unwrap_or(core::mem::zeroed()) as _, pfnwritesd.unwrap_or(core::mem::zeroed()) as _, lpcontext).ok() } } #[inline] 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<()> @@ -39,7 +39,7 @@ where P4: 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); - unsafe { DSEditSecurity(hwndowner, pwszobjectpath.param().abi(), pwszobjectclass.param().abi(), dwflags, pwszcaption.param().abi(), core::mem::transmute(pfnreadsd.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfnwritesd.unwrap_or(core::mem::zeroed())), lpcontext).ok() } + unsafe { DSEditSecurity(hwndowner, pwszobjectpath.param().abi(), pwszobjectclass.param().abi(), dwflags, pwszcaption.param().abi(), pfnreadsd.unwrap_or(core::mem::zeroed()) as _, pfnwritesd.unwrap_or(core::mem::zeroed()) as _, 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 d6856024c7..f8b3ebb1f6 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/EnterpriseData/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/EnterpriseData/mod.rs @@ -10,7 +10,7 @@ where #[inline] pub unsafe fn SrpCloseThreadNetworkContext(threadnetworkcontext: *mut HTHREAD_NETWORK_CONTEXT) -> windows_core::Result<()> { windows_targets::link!("srpapi.dll" "system" fn SrpCloseThreadNetworkContext(threadnetworkcontext : *mut HTHREAD_NETWORK_CONTEXT) -> windows_core::HRESULT); - unsafe { SrpCloseThreadNetworkContext(core::mem::transmute(threadnetworkcontext)).ok() } + unsafe { SrpCloseThreadNetworkContext(threadnetworkcontext as _).ok() } } #[inline] pub unsafe fn SrpCreateThreadNetworkContext(enterpriseid: P0) -> windows_core::Result @@ -48,7 +48,7 @@ where #[inline] 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); - unsafe { SrpGetEnterpriseIds(tokenhandle, core::mem::transmute(numberofbytes.unwrap_or(core::mem::zeroed())), core::mem::transmute(enterpriseids.unwrap_or(core::mem::zeroed())), core::mem::transmute(enterpriseidcount)).ok() } + unsafe { SrpGetEnterpriseIds(tokenhandle, numberofbytes.unwrap_or(core::mem::zeroed()) as _, enterpriseids.unwrap_or(core::mem::zeroed()) as _, enterpriseidcount as _).ok() } } #[inline] pub unsafe fn SrpGetEnterprisePolicy(tokenhandle: super::super::Foundation::HANDLE) -> windows_core::Result { @@ -71,7 +71,7 @@ pub unsafe fn SrpHostingTerminate(r#type: SRPHOSTING_TYPE) { #[inline] 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); - unsafe { SrpIsTokenService(tokenhandle, core::mem::transmute(istokenservice)) } + unsafe { SrpIsTokenService(tokenhandle, istokenservice as _) } } #[inline] pub unsafe fn SrpSetTokenEnterpriseId(tokenhandle: super::super::Foundation::HANDLE, enterpriseid: P1) -> windows_core::Result<()> @@ -87,7 +87,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); - unsafe { UnprotectFile(fileorfolderpath.param().abi(), core::mem::transmute(options.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { UnprotectFile(fileorfolderpath.param().abi(), options.unwrap_or(core::mem::zeroed()) as _).ok() } } #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] 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 69e2b2a997..9040a290f9 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/ExtensibleAuthenticationProtocol/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/ExtensibleAuthenticationProtocol/mod.rs @@ -1,18 +1,18 @@ #[inline] 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); - unsafe { EapHostPeerBeginSession(dwflags, core::mem::transmute(eaptype), pattributearray, htokenimpersonateuser, dwsizeofconnectiondata, pconnectiondata, dwsizeofuserdata, puserdata, dwmaxsendpacketsize, pconnectionid, func, core::mem::transmute(pcontextdata), core::mem::transmute(psessionid), core::mem::transmute(ppeaperror)) } + unsafe { EapHostPeerBeginSession(dwflags, core::mem::transmute(eaptype), pattributearray, htokenimpersonateuser, dwsizeofconnectiondata, pconnectiondata, dwsizeofuserdata, puserdata, dwmaxsendpacketsize, pconnectionid, func, pcontextdata as _, psessionid as _, ppeaperror as _) } } #[inline] pub unsafe fn EapHostPeerClearConnection(pconnectionid: *mut windows_core::GUID, ppeaperror: *mut *mut EAP_ERROR) -> u32 { windows_targets::link!("eappprxy.dll" "system" fn EapHostPeerClearConnection(pconnectionid : *mut windows_core::GUID, ppeaperror : *mut *mut EAP_ERROR) -> u32); - unsafe { EapHostPeerClearConnection(core::mem::transmute(pconnectionid), core::mem::transmute(ppeaperror)) } + unsafe { EapHostPeerClearConnection(pconnectionid as _, ppeaperror as _) } } #[cfg(all(feature = "Win32_Data_Xml_MsXml", feature = "Win32_System_Com"))] #[inline] pub unsafe fn EapHostPeerConfigBlob2Xml(dwflags: u32, eapmethodtype: EAP_METHOD_TYPE, pconfigin: &[u8], ppconfigdoc: *mut Option, ppeaperror: *mut *mut EAP_ERROR) -> u32 { windows_targets::link!("eappcfg.dll" "system" fn EapHostPeerConfigBlob2Xml(dwflags : u32, eapmethodtype : EAP_METHOD_TYPE, dwsizeofconfigin : u32, pconfigin : *const u8, ppconfigdoc : *mut * mut core::ffi::c_void, ppeaperror : *mut *mut EAP_ERROR) -> u32); - unsafe { EapHostPeerConfigBlob2Xml(dwflags, core::mem::transmute(eapmethodtype), pconfigin.len().try_into().unwrap(), core::mem::transmute(pconfigin.as_ptr()), core::mem::transmute(ppconfigdoc), core::mem::transmute(ppeaperror)) } + unsafe { EapHostPeerConfigBlob2Xml(dwflags, core::mem::transmute(eapmethodtype), pconfigin.len().try_into().unwrap(), core::mem::transmute(pconfigin.as_ptr()), core::mem::transmute(ppconfigdoc), ppeaperror as _) } } #[cfg(all(feature = "Win32_Data_Xml_MsXml", feature = "Win32_System_Com"))] #[inline] @@ -21,7 +21,7 @@ where P1: windows_core::Param, { windows_targets::link!("eappcfg.dll" "system" fn EapHostPeerConfigXml2Blob(dwflags : u32, pconfigdoc : * mut core::ffi::c_void, pdwsizeofconfigout : *mut u32, ppconfigout : *mut *mut u8, peapmethodtype : *mut EAP_METHOD_TYPE, ppeaperror : *mut *mut EAP_ERROR) -> u32); - unsafe { EapHostPeerConfigXml2Blob(dwflags, pconfigdoc.param().abi(), core::mem::transmute(pdwsizeofconfigout), core::mem::transmute(ppconfigout), core::mem::transmute(peapmethodtype), core::mem::transmute(ppeaperror)) } + unsafe { EapHostPeerConfigXml2Blob(dwflags, pconfigdoc.param().abi(), pdwsizeofconfigout as _, ppconfigout as _, peapmethodtype as _, ppeaperror as _) } } #[cfg(all(feature = "Win32_Data_Xml_MsXml", feature = "Win32_System_Com"))] #[inline] @@ -30,42 +30,42 @@ where P1: windows_core::Param, { windows_targets::link!("eappcfg.dll" "system" fn EapHostPeerCredentialsXml2Blob(dwflags : u32, pcredentialsdoc : * mut core::ffi::c_void, dwsizeofconfigin : u32, pconfigin : *const u8, pdwsizeofcredentialsout : *mut u32, ppcredentialsout : *mut *mut u8, peapmethodtype : *mut EAP_METHOD_TYPE, ppeaperror : *mut *mut EAP_ERROR) -> u32); - unsafe { EapHostPeerCredentialsXml2Blob(dwflags, pcredentialsdoc.param().abi(), pconfigin.len().try_into().unwrap(), core::mem::transmute(pconfigin.as_ptr()), core::mem::transmute(pdwsizeofcredentialsout), core::mem::transmute(ppcredentialsout), core::mem::transmute(peapmethodtype), core::mem::transmute(ppeaperror)) } + unsafe { EapHostPeerCredentialsXml2Blob(dwflags, pcredentialsdoc.param().abi(), pconfigin.len().try_into().unwrap(), core::mem::transmute(pconfigin.as_ptr()), pdwsizeofcredentialsout as _, ppcredentialsout as _, peapmethodtype as _, ppeaperror as _) } } #[inline] pub unsafe fn EapHostPeerEndSession(sessionhandle: u32, ppeaperror: *mut *mut EAP_ERROR) -> u32 { windows_targets::link!("eappprxy.dll" "system" fn EapHostPeerEndSession(sessionhandle : u32, ppeaperror : *mut *mut EAP_ERROR) -> u32); - unsafe { EapHostPeerEndSession(sessionhandle, core::mem::transmute(ppeaperror)) } + unsafe { EapHostPeerEndSession(sessionhandle, ppeaperror as _) } } #[inline] pub unsafe fn EapHostPeerFreeEapError(peaperror: *mut EAP_ERROR) { windows_targets::link!("eappprxy.dll" "system" fn EapHostPeerFreeEapError(peaperror : *mut EAP_ERROR)); - unsafe { EapHostPeerFreeEapError(core::mem::transmute(peaperror)) } + unsafe { EapHostPeerFreeEapError(peaperror as _) } } #[inline] pub unsafe fn EapHostPeerFreeErrorMemory(peaperror: *mut EAP_ERROR) { windows_targets::link!("eappcfg.dll" "system" fn EapHostPeerFreeErrorMemory(peaperror : *mut EAP_ERROR)); - unsafe { EapHostPeerFreeErrorMemory(core::mem::transmute(peaperror)) } + unsafe { EapHostPeerFreeErrorMemory(peaperror as _) } } #[inline] pub unsafe fn EapHostPeerFreeMemory(pdata: *mut u8) { windows_targets::link!("eappcfg.dll" "system" fn EapHostPeerFreeMemory(pdata : *mut u8)); - unsafe { EapHostPeerFreeMemory(core::mem::transmute(pdata)) } + unsafe { EapHostPeerFreeMemory(pdata as _) } } #[inline] pub unsafe fn EapHostPeerFreeRuntimeMemory(pdata: *mut u8) { windows_targets::link!("eappprxy.dll" "system" fn EapHostPeerFreeRuntimeMemory(pdata : *mut u8)); - unsafe { EapHostPeerFreeRuntimeMemory(core::mem::transmute(pdata)) } + unsafe { EapHostPeerFreeRuntimeMemory(pdata as _) } } #[inline] pub unsafe fn EapHostPeerGetAuthStatus(sessionhandle: u32, authparam: EapHostPeerAuthParams, pcbauthdata: *mut u32, ppauthdata: *mut *mut u8, ppeaperror: *mut *mut EAP_ERROR) -> u32 { windows_targets::link!("eappprxy.dll" "system" fn EapHostPeerGetAuthStatus(sessionhandle : u32, authparam : EapHostPeerAuthParams, pcbauthdata : *mut u32, ppauthdata : *mut *mut u8, ppeaperror : *mut *mut EAP_ERROR) -> u32); - unsafe { EapHostPeerGetAuthStatus(sessionhandle, authparam, core::mem::transmute(pcbauthdata), core::mem::transmute(ppauthdata), core::mem::transmute(ppeaperror)) } + unsafe { EapHostPeerGetAuthStatus(sessionhandle, authparam, pcbauthdata as _, ppauthdata as _, ppeaperror as _) } } #[inline] pub unsafe fn EapHostPeerGetDataToUnplumbCredentials(pconnectionidthatlastsavedcreds: *mut windows_core::GUID, phcredentialimpersonationtoken: *mut isize, sessionhandle: u32, ppeaperror: *mut *mut EAP_ERROR, fsavetocredman: *mut super::super::Foundation::BOOL) -> u32 { windows_targets::link!("eappprxy.dll" "system" fn EapHostPeerGetDataToUnplumbCredentials(pconnectionidthatlastsavedcreds : *mut windows_core::GUID, phcredentialimpersonationtoken : *mut isize, sessionhandle : u32, ppeaperror : *mut *mut EAP_ERROR, fsavetocredman : *mut super::super::Foundation:: BOOL) -> u32); - unsafe { EapHostPeerGetDataToUnplumbCredentials(core::mem::transmute(pconnectionidthatlastsavedcreds), core::mem::transmute(phcredentialimpersonationtoken), sessionhandle, core::mem::transmute(ppeaperror), core::mem::transmute(fsavetocredman)) } + unsafe { EapHostPeerGetDataToUnplumbCredentials(pconnectionidthatlastsavedcreds as _, phcredentialimpersonationtoken as _, sessionhandle, ppeaperror as _, fsavetocredman as _) } } #[inline] pub unsafe fn EapHostPeerGetEncryptedPassword(dwsizeofpassword: u32, szpassword: P1, ppszencpassword: *mut windows_core::PWSTR) -> u32 @@ -73,59 +73,42 @@ where P1: windows_core::Param, { windows_targets::link!("eappprxy.dll" "system" fn EapHostPeerGetEncryptedPassword(dwsizeofpassword : u32, szpassword : windows_core::PCWSTR, ppszencpassword : *mut windows_core::PWSTR) -> u32); - unsafe { EapHostPeerGetEncryptedPassword(dwsizeofpassword, szpassword.param().abi(), core::mem::transmute(ppszencpassword)) } + unsafe { EapHostPeerGetEncryptedPassword(dwsizeofpassword, szpassword.param().abi(), ppszencpassword as _) } } #[inline] 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); - unsafe { - EapHostPeerGetIdentity( - dwversion, - dwflags, - core::mem::transmute(eapmethodtype), - pconnectiondata.len().try_into().unwrap(), - 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, - core::mem::transmute(pfinvokeui), - core::mem::transmute(pdwsizeofuserdataout), - core::mem::transmute(ppuserdataout), - core::mem::transmute(ppwszidentity), - core::mem::transmute(ppeaperror), - core::mem::transmute(ppvreserved), - ) - } + unsafe { EapHostPeerGetIdentity(dwversion, dwflags, core::mem::transmute(eapmethodtype), pconnectiondata.len().try_into().unwrap(), 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, pfinvokeui as _, pdwsizeofuserdataout as _, ppuserdataout as _, ppwszidentity as _, ppeaperror as _, ppvreserved as _) } } #[inline] 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); - unsafe { EapHostPeerGetMethodProperties(dwversion, dwflags, core::mem::transmute(eapmethodtype), 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)) } + unsafe { EapHostPeerGetMethodProperties(dwversion, dwflags, core::mem::transmute(eapmethodtype), huserimpersonationtoken, pbeapconndata.len().try_into().unwrap(), core::mem::transmute(pbeapconndata.as_ptr()), pbuserdata.len().try_into().unwrap(), core::mem::transmute(pbuserdata.as_ptr()), pmethodpropertyarray as _, ppeaperror as _) } } #[inline] pub unsafe fn EapHostPeerGetMethods(peapmethodinfoarray: *mut EAP_METHOD_INFO_ARRAY, ppeaperror: *mut *mut EAP_ERROR) -> u32 { windows_targets::link!("eappcfg.dll" "system" fn EapHostPeerGetMethods(peapmethodinfoarray : *mut EAP_METHOD_INFO_ARRAY, ppeaperror : *mut *mut EAP_ERROR) -> u32); - unsafe { EapHostPeerGetMethods(core::mem::transmute(peapmethodinfoarray), core::mem::transmute(ppeaperror)) } + unsafe { EapHostPeerGetMethods(peapmethodinfoarray as _, ppeaperror as _) } } #[inline] pub unsafe fn EapHostPeerGetResponseAttributes(sessionhandle: u32, pattribs: *mut EAP_ATTRIBUTES, ppeaperror: *mut *mut EAP_ERROR) -> u32 { windows_targets::link!("eappprxy.dll" "system" fn EapHostPeerGetResponseAttributes(sessionhandle : u32, pattribs : *mut EAP_ATTRIBUTES, ppeaperror : *mut *mut EAP_ERROR) -> u32); - unsafe { EapHostPeerGetResponseAttributes(sessionhandle, core::mem::transmute(pattribs), core::mem::transmute(ppeaperror)) } + unsafe { EapHostPeerGetResponseAttributes(sessionhandle, pattribs as _, ppeaperror as _) } } #[inline] pub unsafe fn EapHostPeerGetResult(sessionhandle: u32, reason: EapHostPeerMethodResultReason, ppresult: *mut EapHostPeerMethodResult, ppeaperror: *mut *mut EAP_ERROR) -> u32 { windows_targets::link!("eappprxy.dll" "system" fn EapHostPeerGetResult(sessionhandle : u32, reason : EapHostPeerMethodResultReason, ppresult : *mut EapHostPeerMethodResult, ppeaperror : *mut *mut EAP_ERROR) -> u32); - unsafe { EapHostPeerGetResult(sessionhandle, reason, core::mem::transmute(ppresult), core::mem::transmute(ppeaperror)) } + unsafe { EapHostPeerGetResult(sessionhandle, reason, ppresult as _, ppeaperror as _) } } #[inline] pub unsafe fn EapHostPeerGetSendPacket(sessionhandle: u32, pcbsendpacket: *mut u32, ppsendpacket: *mut *mut u8, ppeaperror: *mut *mut EAP_ERROR) -> u32 { windows_targets::link!("eappprxy.dll" "system" fn EapHostPeerGetSendPacket(sessionhandle : u32, pcbsendpacket : *mut u32, ppsendpacket : *mut *mut u8, ppeaperror : *mut *mut EAP_ERROR) -> u32); - unsafe { EapHostPeerGetSendPacket(sessionhandle, core::mem::transmute(pcbsendpacket), core::mem::transmute(ppsendpacket), core::mem::transmute(ppeaperror)) } + unsafe { EapHostPeerGetSendPacket(sessionhandle, pcbsendpacket as _, ppsendpacket as _, ppeaperror as _) } } #[inline] pub unsafe fn EapHostPeerGetUIContext(sessionhandle: u32, pdwsizeofuicontextdata: *mut u32, ppuicontextdata: *mut *mut u8, ppeaperror: *mut *mut EAP_ERROR) -> u32 { windows_targets::link!("eappprxy.dll" "system" fn EapHostPeerGetUIContext(sessionhandle : u32, pdwsizeofuicontextdata : *mut u32, ppuicontextdata : *mut *mut u8, ppeaperror : *mut *mut EAP_ERROR) -> u32); - unsafe { EapHostPeerGetUIContext(sessionhandle, core::mem::transmute(pdwsizeofuicontextdata), core::mem::transmute(ppuicontextdata), core::mem::transmute(ppeaperror)) } + unsafe { EapHostPeerGetUIContext(sessionhandle, pdwsizeofuicontextdata as _, ppuicontextdata as _, ppeaperror as _) } } #[inline] pub unsafe fn EapHostPeerInitialize() -> u32 { @@ -135,68 +118,52 @@ pub unsafe fn EapHostPeerInitialize() -> u32 { #[inline] 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); - unsafe { EapHostPeerInvokeConfigUI(hwndparent, 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)) } + unsafe { EapHostPeerInvokeConfigUI(hwndparent, 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())), pdwsizeofconfigout as _, ppconfigout as _, ppeaperror as _) } } #[inline] 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); - unsafe { - EapHostPeerInvokeIdentityUI( - dwversion, - core::mem::transmute(eapmethodtype), - dwflags, - hwndparent, - pconnectiondata.len().try_into().unwrap(), - 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())), - core::mem::transmute(pdwsizeofuserdataout), - core::mem::transmute(ppuserdataout), - core::mem::transmute(ppwszidentity), - core::mem::transmute(ppeaperror), - core::mem::transmute(ppvreserved), - ) - } + unsafe { EapHostPeerInvokeIdentityUI(dwversion, core::mem::transmute(eapmethodtype), dwflags, hwndparent, pconnectiondata.len().try_into().unwrap(), 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())), pdwsizeofuserdataout as _, ppuserdataout as _, ppwszidentity as _, ppeaperror as _, ppvreserved as _) } } #[inline] 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); - unsafe { EapHostPeerInvokeInteractiveUI(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)) } + unsafe { EapHostPeerInvokeInteractiveUI(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())), pdwsizeofdatafrominteractiveui as _, ppdatafrominteractiveui as _, ppeaperror as _) } } #[inline] pub unsafe fn EapHostPeerProcessReceivedPacket(sessionhandle: u32, cbreceivepacket: u32, preceivepacket: *const u8, peapoutput: *mut EapHostPeerResponseAction, ppeaperror: *mut *mut EAP_ERROR) -> u32 { windows_targets::link!("eappprxy.dll" "system" fn EapHostPeerProcessReceivedPacket(sessionhandle : u32, cbreceivepacket : u32, preceivepacket : *const u8, peapoutput : *mut EapHostPeerResponseAction, ppeaperror : *mut *mut EAP_ERROR) -> u32); - unsafe { EapHostPeerProcessReceivedPacket(sessionhandle, cbreceivepacket, preceivepacket, core::mem::transmute(peapoutput), core::mem::transmute(ppeaperror)) } + unsafe { EapHostPeerProcessReceivedPacket(sessionhandle, cbreceivepacket, preceivepacket, peapoutput as _, ppeaperror as _) } } #[inline] 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); - unsafe { EapHostPeerQueryCredentialInputFields(huserimpersonationtoken, core::mem::transmute(eapmethodtype), dwflags, pbeapconndata.len().try_into().unwrap(), core::mem::transmute(pbeapconndata.as_ptr()), core::mem::transmute(peapconfiginputfieldarray), core::mem::transmute(ppeaperror)) } + unsafe { EapHostPeerQueryCredentialInputFields(huserimpersonationtoken, core::mem::transmute(eapmethodtype), dwflags, pbeapconndata.len().try_into().unwrap(), core::mem::transmute(pbeapconndata.as_ptr()), peapconfiginputfieldarray as _, ppeaperror as _) } } #[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 { windows_targets::link!("eappcfg.dll" "system" fn EapHostPeerQueryInteractiveUIInputFields(dwversion : u32, dwflags : u32, dwsizeofuicontextdata : u32, puicontextdata : *const u8, peapinteractiveuidata : *mut EAP_INTERACTIVE_UI_DATA, ppeaperror : *mut *mut EAP_ERROR, ppvreserved : *mut *mut core::ffi::c_void) -> u32); - unsafe { EapHostPeerQueryInteractiveUIInputFields(dwversion, dwflags, puicontextdata.len().try_into().unwrap(), core::mem::transmute(puicontextdata.as_ptr()), core::mem::transmute(peapinteractiveuidata), core::mem::transmute(ppeaperror), core::mem::transmute(ppvreserved)) } + unsafe { EapHostPeerQueryInteractiveUIInputFields(dwversion, dwflags, puicontextdata.len().try_into().unwrap(), core::mem::transmute(puicontextdata.as_ptr()), peapinteractiveuidata as _, ppeaperror as _, ppvreserved as _) } } #[inline] pub unsafe fn EapHostPeerQueryUIBlobFromInteractiveUIInputFields(dwversion: u32, dwflags: u32, puicontextdata: &[u8], peapinteractiveuidata: *const EAP_INTERACTIVE_UI_DATA, pdwsizeofdatafrominteractiveui: *mut u32, ppdatafrominteractiveui: *mut *mut u8, ppeaperror: *mut *mut EAP_ERROR, ppvreserved: *mut *mut core::ffi::c_void) -> u32 { windows_targets::link!("eappcfg.dll" "system" fn EapHostPeerQueryUIBlobFromInteractiveUIInputFields(dwversion : u32, dwflags : u32, dwsizeofuicontextdata : u32, puicontextdata : *const u8, peapinteractiveuidata : *const EAP_INTERACTIVE_UI_DATA, pdwsizeofdatafrominteractiveui : *mut u32, ppdatafrominteractiveui : *mut *mut u8, ppeaperror : *mut *mut EAP_ERROR, ppvreserved : *mut *mut core::ffi::c_void) -> u32); - unsafe { EapHostPeerQueryUIBlobFromInteractiveUIInputFields(dwversion, dwflags, puicontextdata.len().try_into().unwrap(), core::mem::transmute(puicontextdata.as_ptr()), peapinteractiveuidata, core::mem::transmute(pdwsizeofdatafrominteractiveui), core::mem::transmute(ppdatafrominteractiveui), core::mem::transmute(ppeaperror), core::mem::transmute(ppvreserved)) } + unsafe { EapHostPeerQueryUIBlobFromInteractiveUIInputFields(dwversion, dwflags, puicontextdata.len().try_into().unwrap(), core::mem::transmute(puicontextdata.as_ptr()), peapinteractiveuidata, pdwsizeofdatafrominteractiveui as _, ppdatafrominteractiveui as _, ppeaperror as _, ppvreserved as _) } } #[inline] 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); - unsafe { EapHostPeerQueryUserBlobFromCredentialInputFields(huserimpersonationtoken, core::mem::transmute(eapmethodtype), dwflags, pbeapconndata.len().try_into().unwrap(), core::mem::transmute(pbeapconndata.as_ptr()), peapconfiginputfieldarray, core::mem::transmute(pdwuserblobsize), core::mem::transmute(ppbuserblob), core::mem::transmute(ppeaperror)) } + unsafe { EapHostPeerQueryUserBlobFromCredentialInputFields(huserimpersonationtoken, core::mem::transmute(eapmethodtype), dwflags, pbeapconndata.len().try_into().unwrap(), core::mem::transmute(pbeapconndata.as_ptr()), peapconfiginputfieldarray, pdwuserblobsize as _, ppbuserblob as _, ppeaperror as _) } } #[inline] pub unsafe fn EapHostPeerSetResponseAttributes(sessionhandle: u32, pattribs: *const EAP_ATTRIBUTES, peapoutput: *mut EapHostPeerResponseAction, ppeaperror: *mut *mut EAP_ERROR) -> u32 { windows_targets::link!("eappprxy.dll" "system" fn EapHostPeerSetResponseAttributes(sessionhandle : u32, pattribs : *const EAP_ATTRIBUTES, peapoutput : *mut EapHostPeerResponseAction, ppeaperror : *mut *mut EAP_ERROR) -> u32); - unsafe { EapHostPeerSetResponseAttributes(sessionhandle, pattribs, core::mem::transmute(peapoutput), core::mem::transmute(ppeaperror)) } + unsafe { EapHostPeerSetResponseAttributes(sessionhandle, pattribs, peapoutput as _, ppeaperror as _) } } #[inline] pub unsafe fn EapHostPeerSetUIContext(sessionhandle: u32, dwsizeofuicontextdata: u32, puicontextdata: *const u8, peapoutput: *mut EapHostPeerResponseAction, ppeaperror: *mut *mut EAP_ERROR) -> u32 { windows_targets::link!("eappprxy.dll" "system" fn EapHostPeerSetUIContext(sessionhandle : u32, dwsizeofuicontextdata : u32, puicontextdata : *const u8, peapoutput : *mut EapHostPeerResponseAction, ppeaperror : *mut *mut EAP_ERROR) -> u32); - unsafe { EapHostPeerSetUIContext(sessionhandle, dwsizeofuicontextdata, puicontextdata, core::mem::transmute(peapoutput), core::mem::transmute(ppeaperror)) } + unsafe { EapHostPeerSetUIContext(sessionhandle, dwsizeofuicontextdata, puicontextdata, peapoutput as _, ppeaperror as _) } } #[inline] pub unsafe fn EapHostPeerUninitialize() { @@ -1164,10 +1131,10 @@ impl IEAPProviderConfig { unsafe { (windows_core::Interface::vtable(self).ServerInvokeConfigUI)(windows_core::Interface::as_raw(self), dweaptypeid, uconnectionparam, hwnd, ureserved1, ureserved2).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<()> { - unsafe { (windows_core::Interface::vtable(self).RouterInvokeConfigUI)(windows_core::Interface::as_raw(self), dweaptypeid, uconnectionparam, hwndparent, dwflags, core::mem::transmute(pconnectiondatain.as_ptr()), pconnectiondatain.len().try_into().unwrap(), core::mem::transmute(ppconnectiondataout), core::mem::transmute(pdwsizeofconnectiondataout)).ok() } + unsafe { (windows_core::Interface::vtable(self).RouterInvokeConfigUI)(windows_core::Interface::as_raw(self), dweaptypeid, uconnectionparam, hwndparent, dwflags, core::mem::transmute(pconnectiondatain.as_ptr()), pconnectiondatain.len().try_into().unwrap(), ppconnectiondataout as _, pdwsizeofconnectiondataout as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).RouterInvokeCredentialsUI)(windows_core::Interface::as_raw(self), dweaptypeid, uconnectionparam, hwndparent, 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() } + unsafe { (windows_core::Interface::vtable(self).RouterInvokeCredentialsUI)(windows_core::Interface::as_raw(self), dweaptypeid, uconnectionparam, hwndparent, dwflags, core::mem::transmute(pconnectiondatain.as_ptr()), pconnectiondatain.len().try_into().unwrap(), core::mem::transmute(puserdatain.as_ptr()), puserdatain.len().try_into().unwrap(), ppuserdataout as _, pdwsizeofuserdataout as _).ok() } } } #[repr(C)] @@ -1248,10 +1215,10 @@ 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: super::super::Foundation::HWND, pconfigdatain: *const u8, dwsizeofconfigdatain: u32, ppconfigdataout: *mut *mut u8, pdwsizeofconfigdataout: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ServerInvokeConfigUI2)(windows_core::Interface::as_raw(self), dweaptypeid, uconnectionparam, hwnd, pconfigdatain, dwsizeofconfigdatain, core::mem::transmute(ppconfigdataout), core::mem::transmute(pdwsizeofconfigdataout)).ok() } + unsafe { (windows_core::Interface::vtable(self).ServerInvokeConfigUI2)(windows_core::Interface::as_raw(self), dweaptypeid, uconnectionparam, hwnd, pconfigdatain, dwsizeofconfigdatain, ppconfigdataout as _, pdwsizeofconfigdataout as _).ok() } } pub unsafe fn GetGlobalConfig(&self, dweaptypeid: u32, ppconfigdataout: *mut *mut u8, pdwsizeofconfigdataout: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGlobalConfig)(windows_core::Interface::as_raw(self), dweaptypeid, core::mem::transmute(ppconfigdataout), core::mem::transmute(pdwsizeofconfigdataout)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGlobalConfig)(windows_core::Interface::as_raw(self), dweaptypeid, ppconfigdataout as _, pdwsizeofconfigdataout as _).ok() } } } #[repr(C)] @@ -1299,7 +1266,7 @@ 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: super::super::Foundation::HWND, pconfigdatain: *const u8, dwsizeofconfigdatain: u32, ppconfigdataout: *mut *mut u8, pdwsizeofconfigdataout: *mut u32, ureserved: usize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ServerInvokeCertificateConfigUI)(windows_core::Interface::as_raw(self), dweaptypeid, uconnectionparam, hwnd, pconfigdatain, dwsizeofconfigdatain, core::mem::transmute(ppconfigdataout), core::mem::transmute(pdwsizeofconfigdataout), ureserved).ok() } + unsafe { (windows_core::Interface::vtable(self).ServerInvokeCertificateConfigUI)(windows_core::Interface::as_raw(self), dweaptypeid, uconnectionparam, hwnd, pconfigdatain, dwsizeofconfigdatain, ppconfigdataout as _, pdwsizeofconfigdataout as _, ureserved).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 64a3c7e59f..c1c2fb25a2 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Isolation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Isolation/mod.rs @@ -55,7 +55,7 @@ where #[inline] 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); - unsafe { 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() } + unsafe { GetAppContainerNamedObjectPath(token.unwrap_or(core::mem::zeroed()) as _, appcontainersid.unwrap_or(core::mem::zeroed()) as _, 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())), returnlength as _).ok() } } #[cfg(feature = "Win32_System_Registry")] #[inline] diff --git a/crates/libs/windows/src/Windows/Win32/Security/LicenseProtection/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/LicenseProtection/mod.rs index 2c9d7e040c..5ed3c47e3d 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/LicenseProtection/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/LicenseProtection/mod.rs @@ -15,7 +15,7 @@ where P0: windows_core::Param, { windows_targets::link!("licenseprotection.dll" "system" fn ValidateLicenseKeyProtection(licensekey : windows_core::PCWSTR, notvalidbefore : *mut super::super::Foundation:: FILETIME, notvalidafter : *mut super::super::Foundation:: FILETIME, status : *mut LicenseProtectionStatus) -> windows_core::HRESULT); - unsafe { ValidateLicenseKeyProtection(licensekey.param().abi(), core::mem::transmute(notvalidbefore), core::mem::transmute(notvalidafter), core::mem::transmute(status)).ok() } + unsafe { ValidateLicenseKeyProtection(licensekey.param().abi(), notvalidbefore as _, notvalidafter as _, status as _).ok() } } pub const LicenseKeyAlreadyExists: LicenseProtectionStatus = LicenseProtectionStatus(4i32); pub const LicenseKeyCorrupted: LicenseProtectionStatus = LicenseProtectionStatus(3i32); diff --git a/crates/libs/windows/src/Windows/Win32/Security/Tpm/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/Tpm/mod.rs index 81d060e5e7..a1274662d7 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Tpm/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Tpm/mod.rs @@ -6,26 +6,7 @@ impl ITpmVirtualSmartCardManager { P0: windows_core::Param, P11: windows_core::Param, { - unsafe { - (windows_core::Interface::vtable(self).CreateVirtualSmartCard)( - windows_core::Interface::as_raw(self), - pszfriendlyname.param().abi(), - badminalgid, - core::mem::transmute(pbadminkey.as_ptr()), - pbadminkey.len().try_into().unwrap(), - core::mem::transmute(pbadminkcv.as_ptr()), - pbadminkcv.len().try_into().unwrap(), - core::mem::transmute(pbpuk.as_ptr()), - pbpuk.len().try_into().unwrap(), - core::mem::transmute(pbpin.as_ptr()), - pbpin.len().try_into().unwrap(), - fgenerate.into(), - pstatuscallback.param().abi(), - core::mem::transmute(ppszinstanceid), - core::mem::transmute(pfneedreboot), - ) - .ok() - } + unsafe { (windows_core::Interface::vtable(self).CreateVirtualSmartCard)(windows_core::Interface::as_raw(self), pszfriendlyname.param().abi(), badminalgid, core::mem::transmute(pbadminkey.as_ptr()), pbadminkey.len().try_into().unwrap(), core::mem::transmute(pbadminkcv.as_ptr()), pbadminkcv.len().try_into().unwrap(), core::mem::transmute(pbpuk.as_ptr()), pbpuk.len().try_into().unwrap(), core::mem::transmute(pbpin.as_ptr()), pbpin.len().try_into().unwrap(), fgenerate.into(), pstatuscallback.param().abi(), ppszinstanceid as _, pfneedreboot as _).ok() } } pub unsafe fn DestroyVirtualSmartCard(&self, pszinstanceid: P0, pstatuscallback: P1) -> windows_core::Result where @@ -127,8 +108,8 @@ impl ITpmVirtualSmartCardManager2 { pbpinpolicy.len().try_into().unwrap(), fgenerate.into(), pstatuscallback.param().abi(), - core::mem::transmute(ppszinstanceid), - core::mem::transmute(pfneedreboot), + ppszinstanceid as _, + pfneedreboot as _, ) .ok() } 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 fe8a9875a8..08f1f5d3e1 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/WinTrust/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/WinTrust/mod.rs @@ -1,42 +1,42 @@ #[inline] 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); - unsafe { OpenPersonalTrustDBDialog(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed()))) } + unsafe { OpenPersonalTrustDBDialog(hwndparent.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { OpenPersonalTrustDBDialogEx(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { OpenPersonalTrustDBDialogEx(hwndparent.unwrap_or(core::mem::zeroed()) as _, dwflags, pvreserved.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Win32_Security_Cryptography_Catalog", feature = "Win32_Security_Cryptography_Sip"))] #[inline] pub unsafe fn WTHelperCertCheckValidSignature(pprovdata: *mut CRYPT_PROVIDER_DATA) -> windows_core::Result<()> { windows_targets::link!("wintrust.dll" "system" fn WTHelperCertCheckValidSignature(pprovdata : *mut CRYPT_PROVIDER_DATA) -> windows_core::HRESULT); - unsafe { WTHelperCertCheckValidSignature(core::mem::transmute(pprovdata)).ok() } + unsafe { WTHelperCertCheckValidSignature(pprovdata as _).ok() } } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] pub unsafe fn WTHelperCertIsSelfSigned(dwencoding: u32, pcert: *mut super::Cryptography::CERT_INFO) -> super::super::Foundation::BOOL { windows_targets::link!("wintrust.dll" "system" fn WTHelperCertIsSelfSigned(dwencoding : u32, pcert : *mut super::Cryptography:: CERT_INFO) -> super::super::Foundation:: BOOL); - unsafe { WTHelperCertIsSelfSigned(dwencoding, core::mem::transmute(pcert)) } + unsafe { WTHelperCertIsSelfSigned(dwencoding, pcert as _) } } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] pub unsafe fn WTHelperGetProvCertFromChain(psgnr: *mut CRYPT_PROVIDER_SGNR, idxcert: u32) -> *mut CRYPT_PROVIDER_CERT { windows_targets::link!("wintrust.dll" "system" fn WTHelperGetProvCertFromChain(psgnr : *mut CRYPT_PROVIDER_SGNR, idxcert : u32) -> *mut CRYPT_PROVIDER_CERT); - unsafe { WTHelperGetProvCertFromChain(core::mem::transmute(psgnr), idxcert) } + unsafe { WTHelperGetProvCertFromChain(psgnr as _, idxcert) } } #[cfg(all(feature = "Win32_Security_Cryptography_Catalog", feature = "Win32_Security_Cryptography_Sip"))] #[inline] pub unsafe fn WTHelperGetProvPrivateDataFromChain(pprovdata: *mut CRYPT_PROVIDER_DATA, pgproviderid: *mut windows_core::GUID) -> *mut CRYPT_PROVIDER_PRIVDATA { windows_targets::link!("wintrust.dll" "system" fn WTHelperGetProvPrivateDataFromChain(pprovdata : *mut CRYPT_PROVIDER_DATA, pgproviderid : *mut windows_core::GUID) -> *mut CRYPT_PROVIDER_PRIVDATA); - unsafe { WTHelperGetProvPrivateDataFromChain(core::mem::transmute(pprovdata), core::mem::transmute(pgproviderid)) } + unsafe { WTHelperGetProvPrivateDataFromChain(pprovdata as _, pgproviderid as _) } } #[cfg(all(feature = "Win32_Security_Cryptography_Catalog", feature = "Win32_Security_Cryptography_Sip"))] #[inline] pub unsafe fn WTHelperGetProvSignerFromChain(pprovdata: *mut CRYPT_PROVIDER_DATA, idxsigner: u32, fcountersigner: bool, idxcountersigner: u32) -> *mut CRYPT_PROVIDER_SGNR { windows_targets::link!("wintrust.dll" "system" fn WTHelperGetProvSignerFromChain(pprovdata : *mut CRYPT_PROVIDER_DATA, idxsigner : u32, fcountersigner : super::super::Foundation:: BOOL, idxcountersigner : u32) -> *mut CRYPT_PROVIDER_SGNR); - unsafe { WTHelperGetProvSignerFromChain(core::mem::transmute(pprovdata), idxsigner, fcountersigner.into(), idxcountersigner) } + unsafe { WTHelperGetProvSignerFromChain(pprovdata as _, idxsigner, fcountersigner.into(), idxcountersigner) } } #[cfg(all(feature = "Win32_Security_Cryptography_Catalog", feature = "Win32_Security_Cryptography_Sip"))] #[inline] @@ -47,13 +47,13 @@ pub unsafe fn WTHelperProvDataFromStateData(hstatedata: super::super::Foundation #[inline] 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); - unsafe { WinVerifyTrust(hwnd, core::mem::transmute(pgactionid), core::mem::transmute(pwvtdata)) } + unsafe { WinVerifyTrust(hwnd, pgactionid as _, pwvtdata as _) } } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] 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); - unsafe { WinVerifyTrustEx(hwnd, core::mem::transmute(pgactionid), core::mem::transmute(pwintrustdata)) } + unsafe { WinVerifyTrustEx(hwnd, pgactionid as _, pwintrustdata as _) } } #[inline] pub unsafe fn WintrustAddActionID(pgactionid: *const windows_core::GUID, fdwflags: u32, psprovinfo: *const CRYPT_REGISTER_ACTIONID) -> windows_core::Result<()> { @@ -74,18 +74,18 @@ where P1: windows_core::Param, { windows_targets::link!("wintrust.dll" "system" fn WintrustGetDefaultForUsage(dwaction : WINTRUST_GET_DEFAULT_FOR_USAGE_ACTION, pszusageoid : windows_core::PCSTR, psusage : *mut CRYPT_PROVIDER_DEFUSAGE) -> super::super::Foundation:: BOOL); - unsafe { WintrustGetDefaultForUsage(dwaction, pszusageoid.param().abi(), core::mem::transmute(psusage)).ok() } + unsafe { WintrustGetDefaultForUsage(dwaction, pszusageoid.param().abi(), psusage as _).ok() } } #[inline] pub unsafe fn WintrustGetRegPolicyFlags(pdwpolicyflags: *mut WINTRUST_POLICY_FLAGS) { windows_targets::link!("wintrust.dll" "system" fn WintrustGetRegPolicyFlags(pdwpolicyflags : *mut WINTRUST_POLICY_FLAGS)); - unsafe { WintrustGetRegPolicyFlags(core::mem::transmute(pdwpolicyflags)) } + unsafe { WintrustGetRegPolicyFlags(pdwpolicyflags as _) } } #[cfg(all(feature = "Win32_Security_Cryptography_Catalog", feature = "Win32_Security_Cryptography_Sip"))] #[inline] pub unsafe fn WintrustLoadFunctionPointers(pgactionid: *mut windows_core::GUID, ppfns: *mut CRYPT_PROVIDER_FUNCTIONS) -> super::super::Foundation::BOOL { windows_targets::link!("wintrust.dll" "system" fn WintrustLoadFunctionPointers(pgactionid : *mut windows_core::GUID, ppfns : *mut CRYPT_PROVIDER_FUNCTIONS) -> super::super::Foundation:: BOOL); - unsafe { WintrustLoadFunctionPointers(core::mem::transmute(pgactionid), core::mem::transmute(ppfns)) } + unsafe { WintrustLoadFunctionPointers(pgactionid as _, ppfns as _) } } #[inline] pub unsafe fn WintrustRemoveActionID(pgactionid: *const windows_core::GUID) -> super::super::Foundation::BOOL { diff --git a/crates/libs/windows/src/Windows/Win32/Security/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/mod.rs index 342e9a1131..50e41f63c4 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/mod.rs @@ -33,7 +33,7 @@ pub mod WinWlx; #[inline] 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); - unsafe { AccessCheck(psecuritydescriptor, clienttoken, desiredaccess, genericmapping, core::mem::transmute(privilegeset.unwrap_or(core::mem::zeroed())), core::mem::transmute(privilegesetlength), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus)).ok() } + unsafe { AccessCheck(psecuritydescriptor, clienttoken, desiredaccess, genericmapping, privilegeset.unwrap_or(core::mem::zeroed()) as _, privilegesetlength as _, grantedaccess as _, accessstatus as _).ok() } } #[inline] 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: bool, grantedaccess: *mut u32, accessstatus: *mut super::Foundation::BOOL, pfgenerateonclose: *mut super::Foundation::BOOL) -> windows_core::Result<()> @@ -43,7 +43,7 @@ where P3: 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); - unsafe { AccessCheckAndAuditAlarmA(subsystemname.param().abi(), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), objecttypename.param().abi(), objectname.param().abi(), securitydescriptor, desiredaccess, genericmapping, objectcreation.into(), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(pfgenerateonclose)).ok() } + unsafe { AccessCheckAndAuditAlarmA(subsystemname.param().abi(), handleid.unwrap_or(core::mem::zeroed()) as _, objecttypename.param().abi(), objectname.param().abi(), securitydescriptor, desiredaccess, genericmapping, objectcreation.into(), grantedaccess as _, accessstatus as _, pfgenerateonclose as _).ok() } } #[inline] 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: bool, grantedaccess: *mut u32, accessstatus: *mut super::Foundation::BOOL, pfgenerateonclose: *mut super::Foundation::BOOL) -> super::Foundation::BOOL @@ -53,27 +53,12 @@ where P3: 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); - unsafe { AccessCheckAndAuditAlarmW(subsystemname.param().abi(), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), objecttypename.param().abi(), objectname.param().abi(), securitydescriptor, desiredaccess, genericmapping, objectcreation.into(), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(pfgenerateonclose)) } + unsafe { AccessCheckAndAuditAlarmW(subsystemname.param().abi(), handleid.unwrap_or(core::mem::zeroed()) as _, objecttypename.param().abi(), objectname.param().abi(), securitydescriptor, desiredaccess, genericmapping, objectcreation.into(), grantedaccess as _, accessstatus as _, pfgenerateonclose as _) } } #[inline] 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); - unsafe { - AccessCheckByType( - psecuritydescriptor, - core::mem::transmute(principalselfsid.unwrap_or(core::mem::zeroed())), - clienttoken, - desiredaccess, - core::mem::transmute(objecttypelist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - objecttypelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - genericmapping, - core::mem::transmute(privilegeset.unwrap_or(core::mem::zeroed())), - core::mem::transmute(privilegesetlength), - core::mem::transmute(grantedaccess), - core::mem::transmute(accessstatus), - ) - .ok() - } + unsafe { AccessCheckByType(psecuritydescriptor, principalselfsid.unwrap_or(core::mem::zeroed()) as _, clienttoken, desiredaccess, core::mem::transmute(objecttypelist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), objecttypelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), genericmapping, privilegeset.unwrap_or(core::mem::zeroed()) as _, privilegesetlength as _, grantedaccess as _, accessstatus as _).ok() } } #[inline] 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: bool, grantedaccess: *mut u32, accessstatus: *mut super::Foundation::BOOL, pfgenerateonclose: *mut super::Foundation::BOOL) -> windows_core::Result<()> @@ -83,27 +68,7 @@ where P3: 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); - unsafe { - AccessCheckByTypeAndAuditAlarmA( - subsystemname.param().abi(), - handleid, - objecttypename.param().abi(), - objectname.param().abi(), - securitydescriptor, - core::mem::transmute(principalselfsid.unwrap_or(core::mem::zeroed())), - desiredaccess, - audittype, - flags, - core::mem::transmute(objecttypelist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - objecttypelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - genericmapping, - objectcreation.into(), - core::mem::transmute(grantedaccess), - core::mem::transmute(accessstatus), - core::mem::transmute(pfgenerateonclose), - ) - .ok() - } + unsafe { AccessCheckByTypeAndAuditAlarmA(subsystemname.param().abi(), handleid, objecttypename.param().abi(), objectname.param().abi(), securitydescriptor, principalselfsid.unwrap_or(core::mem::zeroed()) as _, desiredaccess, audittype, flags, core::mem::transmute(objecttypelist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), objecttypelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), genericmapping, objectcreation.into(), grantedaccess as _, accessstatus as _, pfgenerateonclose as _).ok() } } #[inline] 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: bool, grantedaccess: *mut u32, accessstatus: *mut super::Foundation::BOOL, pfgenerateonclose: *mut super::Foundation::BOOL) -> super::Foundation::BOOL @@ -113,31 +78,12 @@ where P3: 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); - unsafe { - AccessCheckByTypeAndAuditAlarmW( - subsystemname.param().abi(), - handleid, - objecttypename.param().abi(), - objectname.param().abi(), - securitydescriptor, - core::mem::transmute(principalselfsid.unwrap_or(core::mem::zeroed())), - desiredaccess, - audittype, - flags, - core::mem::transmute(objecttypelist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - objecttypelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - genericmapping, - objectcreation.into(), - core::mem::transmute(grantedaccess), - core::mem::transmute(accessstatus), - core::mem::transmute(pfgenerateonclose), - ) - } + unsafe { AccessCheckByTypeAndAuditAlarmW(subsystemname.param().abi(), handleid, objecttypename.param().abi(), objectname.param().abi(), securitydescriptor, principalselfsid.unwrap_or(core::mem::zeroed()) as _, desiredaccess, audittype, flags, core::mem::transmute(objecttypelist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), objecttypelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), genericmapping, objectcreation.into(), grantedaccess as _, accessstatus as _, pfgenerateonclose as _) } } #[inline] 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); - unsafe { AccessCheckByTypeResultList(psecuritydescriptor, core::mem::transmute(principalselfsid.unwrap_or(core::mem::zeroed())), clienttoken, desiredaccess, core::mem::transmute(objecttypelist.unwrap_or(core::mem::zeroed())), objecttypelistlength, genericmapping, core::mem::transmute(privilegeset.unwrap_or(core::mem::zeroed())), core::mem::transmute(privilegesetlength), core::mem::transmute(grantedaccesslist), core::mem::transmute(accessstatuslist)).ok() } + unsafe { AccessCheckByTypeResultList(psecuritydescriptor, principalselfsid.unwrap_or(core::mem::zeroed()) as _, clienttoken, desiredaccess, objecttypelist.unwrap_or(core::mem::zeroed()) as _, objecttypelistlength, genericmapping, privilegeset.unwrap_or(core::mem::zeroed()) as _, privilegesetlength as _, grantedaccesslist as _, accessstatuslist as _).ok() } } #[inline] 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: bool, grantedaccess: *mut u32, accessstatuslist: *mut u32, pfgenerateonclose: *mut super::Foundation::BOOL) -> windows_core::Result<()> @@ -147,7 +93,7 @@ where P3: 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); - unsafe { AccessCheckByTypeResultListAndAuditAlarmA(subsystemname.param().abi(), handleid, objecttypename.param().abi(), objectname.param().abi(), securitydescriptor, core::mem::transmute(principalselfsid.unwrap_or(core::mem::zeroed())), desiredaccess, audittype, flags, core::mem::transmute(objecttypelist.unwrap_or(core::mem::zeroed())), objecttypelistlength, genericmapping, objectcreation.into(), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatuslist), core::mem::transmute(pfgenerateonclose)).ok() } + unsafe { AccessCheckByTypeResultListAndAuditAlarmA(subsystemname.param().abi(), handleid, objecttypename.param().abi(), objectname.param().abi(), securitydescriptor, principalselfsid.unwrap_or(core::mem::zeroed()) as _, desiredaccess, audittype, flags, objecttypelist.unwrap_or(core::mem::zeroed()) as _, objecttypelistlength, genericmapping, objectcreation.into(), grantedaccess as _, accessstatuslist as _, pfgenerateonclose as _).ok() } } #[inline] 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: bool, grantedaccess: *mut u32, accessstatuslist: *mut u32, pfgenerateonclose: *mut super::Foundation::BOOL) -> windows_core::Result<()> @@ -157,7 +103,7 @@ where P4: 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); - unsafe { AccessCheckByTypeResultListAndAuditAlarmByHandleA(subsystemname.param().abi(), handleid, clienttoken, objecttypename.param().abi(), objectname.param().abi(), securitydescriptor, core::mem::transmute(principalselfsid.unwrap_or(core::mem::zeroed())), desiredaccess, audittype, flags, core::mem::transmute(objecttypelist.unwrap_or(core::mem::zeroed())), objecttypelistlength, genericmapping, objectcreation.into(), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatuslist), core::mem::transmute(pfgenerateonclose)).ok() } + unsafe { AccessCheckByTypeResultListAndAuditAlarmByHandleA(subsystemname.param().abi(), handleid, clienttoken, objecttypename.param().abi(), objectname.param().abi(), securitydescriptor, principalselfsid.unwrap_or(core::mem::zeroed()) as _, desiredaccess, audittype, flags, objecttypelist.unwrap_or(core::mem::zeroed()) as _, objecttypelistlength, genericmapping, objectcreation.into(), grantedaccess as _, accessstatuslist as _, pfgenerateonclose as _).ok() } } #[inline] 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: bool, grantedaccesslist: *mut u32, accessstatuslist: *mut u32, pfgenerateonclose: *mut super::Foundation::BOOL) -> super::Foundation::BOOL @@ -167,27 +113,7 @@ where P4: 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); - unsafe { - AccessCheckByTypeResultListAndAuditAlarmByHandleW( - subsystemname.param().abi(), - handleid, - clienttoken, - objecttypename.param().abi(), - objectname.param().abi(), - securitydescriptor, - core::mem::transmute(principalselfsid.unwrap_or(core::mem::zeroed())), - desiredaccess, - audittype, - flags, - core::mem::transmute(objecttypelist.unwrap_or(core::mem::zeroed())), - objecttypelistlength, - genericmapping, - objectcreation.into(), - core::mem::transmute(grantedaccesslist), - core::mem::transmute(accessstatuslist), - core::mem::transmute(pfgenerateonclose), - ) - } + unsafe { AccessCheckByTypeResultListAndAuditAlarmByHandleW(subsystemname.param().abi(), handleid, clienttoken, objecttypename.param().abi(), objectname.param().abi(), securitydescriptor, principalselfsid.unwrap_or(core::mem::zeroed()) as _, desiredaccess, audittype, flags, objecttypelist.unwrap_or(core::mem::zeroed()) as _, objecttypelistlength, genericmapping, objectcreation.into(), grantedaccesslist as _, accessstatuslist as _, pfgenerateonclose as _) } } #[inline] 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: bool, grantedaccesslist: *mut u32, accessstatuslist: *mut u32, pfgenerateonclose: *mut super::Foundation::BOOL) -> super::Foundation::BOOL @@ -197,57 +123,57 @@ where P3: 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); - unsafe { AccessCheckByTypeResultListAndAuditAlarmW(subsystemname.param().abi(), handleid, objecttypename.param().abi(), objectname.param().abi(), securitydescriptor, core::mem::transmute(principalselfsid.unwrap_or(core::mem::zeroed())), desiredaccess, audittype, flags, core::mem::transmute(objecttypelist.unwrap_or(core::mem::zeroed())), objecttypelistlength, genericmapping, objectcreation.into(), core::mem::transmute(grantedaccesslist), core::mem::transmute(accessstatuslist), core::mem::transmute(pfgenerateonclose)) } + unsafe { AccessCheckByTypeResultListAndAuditAlarmW(subsystemname.param().abi(), handleid, objecttypename.param().abi(), objectname.param().abi(), securitydescriptor, principalselfsid.unwrap_or(core::mem::zeroed()) as _, desiredaccess, audittype, flags, objecttypelist.unwrap_or(core::mem::zeroed()) as _, objecttypelistlength, genericmapping, objectcreation.into(), grantedaccesslist as _, accessstatuslist as _, pfgenerateonclose as _) } } #[inline] 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); - unsafe { AddAccessAllowedAce(core::mem::transmute(pacl), dwacerevision, accessmask, psid).ok() } + unsafe { AddAccessAllowedAce(pacl as _, dwacerevision, accessmask, psid).ok() } } #[inline] 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); - unsafe { AddAccessAllowedAceEx(core::mem::transmute(pacl), dwacerevision, aceflags, accessmask, psid).ok() } + unsafe { AddAccessAllowedAceEx(pacl as _, dwacerevision, aceflags, accessmask, 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: 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); - unsafe { AddAccessAllowedObjectAce(core::mem::transmute(pacl), dwacerevision, aceflags, accessmask, core::mem::transmute(objecttypeguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(inheritedobjecttypeguid.unwrap_or(core::mem::zeroed())), psid).ok() } + unsafe { AddAccessAllowedObjectAce(pacl as _, dwacerevision, aceflags, accessmask, objecttypeguid.unwrap_or(core::mem::zeroed()) as _, inheritedobjecttypeguid.unwrap_or(core::mem::zeroed()) as _, psid).ok() } } #[inline] 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); - unsafe { AddAccessDeniedAce(core::mem::transmute(pacl), dwacerevision, accessmask, psid).ok() } + unsafe { AddAccessDeniedAce(pacl as _, dwacerevision, accessmask, psid).ok() } } #[inline] 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); - unsafe { AddAccessDeniedAceEx(core::mem::transmute(pacl), dwacerevision, aceflags, accessmask, psid).ok() } + unsafe { AddAccessDeniedAceEx(pacl as _, dwacerevision, aceflags, accessmask, 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: 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); - unsafe { AddAccessDeniedObjectAce(core::mem::transmute(pacl), dwacerevision, aceflags, accessmask, core::mem::transmute(objecttypeguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(inheritedobjecttypeguid.unwrap_or(core::mem::zeroed())), psid).ok() } + unsafe { AddAccessDeniedObjectAce(pacl as _, dwacerevision, aceflags, accessmask, objecttypeguid.unwrap_or(core::mem::zeroed()) as _, inheritedobjecttypeguid.unwrap_or(core::mem::zeroed()) as _, 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<()> { windows_targets::link!("advapi32.dll" "system" fn AddAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, dwstartingaceindex : u32, pacelist : *const core::ffi::c_void, nacelistlength : u32) -> super::Foundation:: BOOL); - unsafe { AddAce(core::mem::transmute(pacl), dwacerevision, dwstartingaceindex, pacelist, nacelistlength).ok() } + unsafe { AddAce(pacl as _, dwacerevision, dwstartingaceindex, pacelist, nacelistlength).ok() } } #[inline] pub unsafe fn AddAuditAccessAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, dwaccessmask: u32, psid: PSID, bauditsuccess: bool, bauditfailure: bool) -> windows_core::Result<()> { 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); - unsafe { AddAuditAccessAce(core::mem::transmute(pacl), dwacerevision, dwaccessmask, psid, bauditsuccess.into(), bauditfailure.into()).ok() } + unsafe { AddAuditAccessAce(pacl as _, dwacerevision, dwaccessmask, psid, bauditsuccess.into(), bauditfailure.into()).ok() } } #[inline] pub unsafe fn AddAuditAccessAceEx(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, dwaccessmask: u32, psid: PSID, bauditsuccess: bool, bauditfailure: bool) -> windows_core::Result<()> { 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); - unsafe { AddAuditAccessAceEx(core::mem::transmute(pacl), dwacerevision, aceflags, dwaccessmask, psid, bauditsuccess.into(), bauditfailure.into()).ok() } + unsafe { AddAuditAccessAceEx(pacl as _, dwacerevision, aceflags, dwaccessmask, psid, bauditsuccess.into(), bauditfailure.into()).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: PSID, bauditsuccess: bool, bauditfailure: bool) -> windows_core::Result<()> { 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); - unsafe { AddAuditAccessObjectAce(core::mem::transmute(pacl), dwacerevision, aceflags, accessmask, core::mem::transmute(objecttypeguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(inheritedobjecttypeguid.unwrap_or(core::mem::zeroed())), psid, bauditsuccess.into(), bauditfailure.into()).ok() } + unsafe { AddAuditAccessObjectAce(pacl as _, dwacerevision, aceflags, accessmask, objecttypeguid.unwrap_or(core::mem::zeroed()) as _, inheritedobjecttypeguid.unwrap_or(core::mem::zeroed()) as _, psid, bauditsuccess.into(), bauditfailure.into()).ok() } } #[inline] 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<()> @@ -255,42 +181,42 @@ where 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); - unsafe { AddConditionalAce(core::mem::transmute(pacl), dwacerevision, aceflags, acetype, accessmask, psid, conditionstr.param().abi(), core::mem::transmute(returnlength)).ok() } + unsafe { AddConditionalAce(pacl as _, dwacerevision, aceflags, acetype, accessmask, psid, conditionstr.param().abi(), returnlength as _).ok() } } #[inline] 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); - unsafe { AddMandatoryAce(core::mem::transmute(pacl), dwacerevision, aceflags, mandatorypolicy, plabelsid).ok() } + unsafe { AddMandatoryAce(pacl as _, dwacerevision, aceflags, mandatorypolicy, plabelsid).ok() } } #[inline] 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); - unsafe { AddResourceAttributeAce(core::mem::transmute(pacl), dwacerevision, aceflags, accessmask, psid, pattributeinfo, core::mem::transmute(preturnlength)).ok() } + unsafe { AddResourceAttributeAce(pacl as _, dwacerevision, aceflags, accessmask, psid, pattributeinfo, preturnlength as _).ok() } } #[inline] 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); - unsafe { AddScopedPolicyIDAce(core::mem::transmute(pacl), dwacerevision, aceflags, accessmask, psid).ok() } + unsafe { AddScopedPolicyIDAce(pacl as _, dwacerevision, aceflags, accessmask, psid).ok() } } #[inline] pub unsafe fn AdjustTokenGroups(tokenhandle: super::Foundation::HANDLE, resettodefault: bool, newstate: Option<*const TOKEN_GROUPS>, bufferlength: u32, previousstate: Option<*mut TOKEN_GROUPS>, returnlength: Option<*mut u32>) -> windows_core::Result<()> { 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); - unsafe { AdjustTokenGroups(tokenhandle, resettodefault.into(), core::mem::transmute(newstate.unwrap_or(core::mem::zeroed())), bufferlength, core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { AdjustTokenGroups(tokenhandle, resettodefault.into(), newstate.unwrap_or(core::mem::zeroed()) as _, bufferlength, previousstate.unwrap_or(core::mem::zeroed()) as _, returnlength.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn AdjustTokenPrivileges(tokenhandle: super::Foundation::HANDLE, disableallprivileges: bool, newstate: Option<*const TOKEN_PRIVILEGES>, bufferlength: u32, previousstate: Option<*mut TOKEN_PRIVILEGES>, returnlength: Option<*mut u32>) -> windows_core::Result<()> { 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); - unsafe { AdjustTokenPrivileges(tokenhandle, disableallprivileges.into(), core::mem::transmute(newstate.unwrap_or(core::mem::zeroed())), bufferlength, core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { AdjustTokenPrivileges(tokenhandle, disableallprivileges.into(), newstate.unwrap_or(core::mem::zeroed()) as _, bufferlength, previousstate.unwrap_or(core::mem::zeroed()) as _, returnlength.unwrap_or(core::mem::zeroed()) as _).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<()> { windows_targets::link!("advapi32.dll" "system" fn AllocateAndInitializeSid(pidentifierauthority : *const SID_IDENTIFIER_AUTHORITY, nsubauthoritycount : u8, nsubauthority0 : u32, nsubauthority1 : u32, nsubauthority2 : u32, nsubauthority3 : u32, nsubauthority4 : u32, nsubauthority5 : u32, nsubauthority6 : u32, nsubauthority7 : u32, psid : *mut PSID) -> super::Foundation:: BOOL); - unsafe { AllocateAndInitializeSid(pidentifierauthority, nsubauthoritycount, nsubauthority0, nsubauthority1, nsubauthority2, nsubauthority3, nsubauthority4, nsubauthority5, nsubauthority6, nsubauthority7, core::mem::transmute(psid)).ok() } + unsafe { AllocateAndInitializeSid(pidentifierauthority, nsubauthoritycount, nsubauthority0, nsubauthority1, nsubauthority2, nsubauthority3, nsubauthority4, nsubauthority5, nsubauthority6, nsubauthority7, psid as _).ok() } } #[inline] pub unsafe fn AllocateLocallyUniqueId(luid: *mut super::Foundation::LUID) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn AllocateLocallyUniqueId(luid : *mut super::Foundation:: LUID) -> super::Foundation:: BOOL); - unsafe { AllocateLocallyUniqueId(core::mem::transmute(luid)).ok() } + unsafe { AllocateLocallyUniqueId(luid as _).ok() } } #[inline] pub unsafe fn AreAllAccessesGranted(grantedaccess: u32, desiredaccess: u32) -> super::Foundation::BOOL { @@ -305,42 +231,42 @@ pub unsafe fn AreAnyAccessesGranted(grantedaccess: u32, desiredaccess: u32) -> s #[inline] 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); - unsafe { CheckTokenCapability(core::mem::transmute(tokenhandle.unwrap_or(core::mem::zeroed())), capabilitysidtocheck, core::mem::transmute(hascapability)).ok() } + unsafe { CheckTokenCapability(tokenhandle.unwrap_or(core::mem::zeroed()) as _, capabilitysidtocheck, hascapability as _).ok() } } #[inline] 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); - unsafe { CheckTokenMembership(core::mem::transmute(tokenhandle.unwrap_or(core::mem::zeroed())), sidtocheck, core::mem::transmute(ismember)).ok() } + unsafe { CheckTokenMembership(tokenhandle.unwrap_or(core::mem::zeroed()) as _, sidtocheck, ismember as _).ok() } } #[inline] 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); - unsafe { CheckTokenMembershipEx(core::mem::transmute(tokenhandle.unwrap_or(core::mem::zeroed())), sidtocheck, flags, core::mem::transmute(ismember)).ok() } + unsafe { CheckTokenMembershipEx(tokenhandle.unwrap_or(core::mem::zeroed()) as _, sidtocheck, flags, ismember as _).ok() } } #[inline] pub unsafe fn ConvertToAutoInheritPrivateObjectSecurity(parentdescriptor: Option, currentsecuritydescriptor: PSECURITY_DESCRIPTOR, newsecuritydescriptor: *mut PSECURITY_DESCRIPTOR, objecttype: Option<*const windows_core::GUID>, isdirectoryobject: bool, genericmapping: *const GENERIC_MAPPING) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn ConvertToAutoInheritPrivateObjectSecurity(parentdescriptor : PSECURITY_DESCRIPTOR, currentsecuritydescriptor : PSECURITY_DESCRIPTOR, newsecuritydescriptor : *mut PSECURITY_DESCRIPTOR, objecttype : *const windows_core::GUID, isdirectoryobject : bool, genericmapping : *const GENERIC_MAPPING) -> super::Foundation:: BOOL); - unsafe { ConvertToAutoInheritPrivateObjectSecurity(core::mem::transmute(parentdescriptor.unwrap_or(core::mem::zeroed())), currentsecuritydescriptor, core::mem::transmute(newsecuritydescriptor), core::mem::transmute(objecttype.unwrap_or(core::mem::zeroed())), isdirectoryobject, genericmapping).ok() } + unsafe { ConvertToAutoInheritPrivateObjectSecurity(parentdescriptor.unwrap_or(core::mem::zeroed()) as _, currentsecuritydescriptor, newsecuritydescriptor as _, objecttype.unwrap_or(core::mem::zeroed()) as _, isdirectoryobject, genericmapping).ok() } } #[inline] 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); - unsafe { CopySid(ndestinationsidlength, core::mem::transmute(pdestinationsid), psourcesid).ok() } + unsafe { CopySid(ndestinationsidlength, pdestinationsid as _, psourcesid).ok() } } #[inline] pub unsafe fn CreatePrivateObjectSecurity(parentdescriptor: Option, creatordescriptor: Option, newdescriptor: *mut PSECURITY_DESCRIPTOR, isdirectoryobject: bool, token: Option, genericmapping: *const GENERIC_MAPPING) -> windows_core::Result<()> { 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); - unsafe { CreatePrivateObjectSecurity(core::mem::transmute(parentdescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(creatordescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(newdescriptor), isdirectoryobject.into(), core::mem::transmute(token.unwrap_or(core::mem::zeroed())), genericmapping).ok() } + unsafe { CreatePrivateObjectSecurity(parentdescriptor.unwrap_or(core::mem::zeroed()) as _, creatordescriptor.unwrap_or(core::mem::zeroed()) as _, newdescriptor as _, isdirectoryobject.into(), token.unwrap_or(core::mem::zeroed()) as _, genericmapping).ok() } } #[inline] pub unsafe fn CreatePrivateObjectSecurityEx(parentdescriptor: Option, creatordescriptor: Option, newdescriptor: *mut PSECURITY_DESCRIPTOR, objecttype: Option<*const windows_core::GUID>, iscontainerobject: bool, autoinheritflags: SECURITY_AUTO_INHERIT_FLAGS, token: Option, genericmapping: *const GENERIC_MAPPING) -> windows_core::Result<()> { 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); - unsafe { 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.into(), autoinheritflags, core::mem::transmute(token.unwrap_or(core::mem::zeroed())), genericmapping).ok() } + unsafe { CreatePrivateObjectSecurityEx(parentdescriptor.unwrap_or(core::mem::zeroed()) as _, creatordescriptor.unwrap_or(core::mem::zeroed()) as _, newdescriptor as _, objecttype.unwrap_or(core::mem::zeroed()) as _, iscontainerobject.into(), autoinheritflags, token.unwrap_or(core::mem::zeroed()) as _, genericmapping).ok() } } #[inline] pub unsafe fn CreatePrivateObjectSecurityWithMultipleInheritance(parentdescriptor: Option, creatordescriptor: Option, newdescriptor: *mut PSECURITY_DESCRIPTOR, objecttypes: Option<&[*const windows_core::GUID]>, iscontainerobject: bool, autoinheritflags: SECURITY_AUTO_INHERIT_FLAGS, token: Option, genericmapping: *const GENERIC_MAPPING) -> windows_core::Result<()> { 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); - unsafe { 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.into(), autoinheritflags, core::mem::transmute(token.unwrap_or(core::mem::zeroed())), genericmapping).ok() } + unsafe { CreatePrivateObjectSecurityWithMultipleInheritance(parentdescriptor.unwrap_or(core::mem::zeroed()) as _, creatordescriptor.unwrap_or(core::mem::zeroed()) as _, newdescriptor as _, 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.into(), autoinheritflags, token.unwrap_or(core::mem::zeroed()) as _, genericmapping).ok() } } #[inline] 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<()> { @@ -355,7 +281,7 @@ pub unsafe fn CreateRestrictedToken(existingtokenhandle: super::Foundation::HAND core::mem::transmute(privilegestodelete.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), sidstorestrict.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(sidstorestrict.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - core::mem::transmute(newtokenhandle), + newtokenhandle as _, ) .ok() } @@ -363,12 +289,12 @@ pub unsafe fn CreateRestrictedToken(existingtokenhandle: super::Foundation::HAND #[inline] 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); - unsafe { CreateWellKnownSid(wellknownsidtype, core::mem::transmute(domainsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(psid.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbsid)).ok() } + unsafe { CreateWellKnownSid(wellknownsidtype, domainsid.unwrap_or(core::mem::zeroed()) as _, psid.unwrap_or(core::mem::zeroed()) as _, cbsid as _).ok() } } #[inline] pub unsafe fn DeleteAce(pacl: *mut ACL, dwaceindex: u32) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn DeleteAce(pacl : *mut ACL, dwaceindex : u32) -> super::Foundation:: BOOL); - unsafe { DeleteAce(core::mem::transmute(pacl), dwaceindex).ok() } + unsafe { DeleteAce(pacl as _, dwaceindex).ok() } } #[inline] pub unsafe fn DeriveCapabilitySidsFromName(capname: P0, capabilitygroupsids: *mut *mut PSID, capabilitygroupsidcount: *mut u32, capabilitysids: *mut *mut PSID, capabilitysidcount: *mut u32) -> windows_core::Result<()> @@ -376,7 +302,7 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-security-base-l1-2-2.dll" "system" fn DeriveCapabilitySidsFromName(capname : windows_core::PCWSTR, capabilitygroupsids : *mut *mut PSID, capabilitygroupsidcount : *mut u32, capabilitysids : *mut *mut PSID, capabilitysidcount : *mut u32) -> super::Foundation:: BOOL); - unsafe { DeriveCapabilitySidsFromName(capname.param().abi(), core::mem::transmute(capabilitygroupsids), core::mem::transmute(capabilitygroupsidcount), core::mem::transmute(capabilitysids), core::mem::transmute(capabilitysidcount)).ok() } + unsafe { DeriveCapabilitySidsFromName(capname.param().abi(), capabilitygroupsids as _, capabilitygroupsidcount as _, capabilitysids as _, capabilitysidcount as _).ok() } } #[inline] pub unsafe fn DestroyPrivateObjectSecurity(objectdescriptor: *const PSECURITY_DESCRIPTOR) -> windows_core::Result<()> { @@ -386,17 +312,17 @@ pub unsafe fn DestroyPrivateObjectSecurity(objectdescriptor: *const PSECURITY_DE #[inline] 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); - unsafe { DuplicateToken(existingtokenhandle, impersonationlevel, core::mem::transmute(duplicatetokenhandle)).ok() } + unsafe { DuplicateToken(existingtokenhandle, impersonationlevel, duplicatetokenhandle as _).ok() } } #[inline] 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); - unsafe { DuplicateTokenEx(hexistingtoken, dwdesiredaccess, core::mem::transmute(lptokenattributes.unwrap_or(core::mem::zeroed())), impersonationlevel, tokentype, core::mem::transmute(phnewtoken)).ok() } + unsafe { DuplicateTokenEx(hexistingtoken, dwdesiredaccess, lptokenattributes.unwrap_or(core::mem::zeroed()) as _, impersonationlevel, tokentype, phnewtoken as _).ok() } } #[inline] 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); - unsafe { EqualDomainSid(psid1, psid2, core::mem::transmute(pfequal)).ok() } + unsafe { EqualDomainSid(psid1, psid2, pfequal as _).ok() } } #[inline] pub unsafe fn EqualPrefixSid(psid1: PSID, psid2: PSID) -> windows_core::Result<()> { @@ -411,7 +337,7 @@ pub unsafe fn EqualSid(psid1: PSID, psid2: PSID) -> windows_core::Result<()> { #[inline] pub unsafe fn FindFirstFreeAce(pacl: *const ACL, pace: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn FindFirstFreeAce(pacl : *const ACL, pace : *mut *mut core::ffi::c_void) -> super::Foundation:: BOOL); - unsafe { FindFirstFreeAce(pacl, core::mem::transmute(pace)).ok() } + unsafe { FindFirstFreeAce(pacl, pace as _).ok() } } #[inline] pub unsafe fn FreeSid(psid: PSID) -> *mut core::ffi::c_void { @@ -421,22 +347,22 @@ pub unsafe fn FreeSid(psid: PSID) -> *mut core::ffi::c_void { #[inline] pub unsafe fn GetAce(pacl: *const ACL, dwaceindex: u32, pace: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn GetAce(pacl : *const ACL, dwaceindex : u32, pace : *mut *mut core::ffi::c_void) -> super::Foundation:: BOOL); - unsafe { GetAce(pacl, dwaceindex, core::mem::transmute(pace)).ok() } + unsafe { GetAce(pacl, dwaceindex, pace as _).ok() } } #[inline] pub unsafe fn GetAclInformation(pacl: *const ACL, paclinformation: *mut core::ffi::c_void, naclinformationlength: u32, dwaclinformationclass: ACL_INFORMATION_CLASS) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn GetAclInformation(pacl : *const ACL, paclinformation : *mut core::ffi::c_void, naclinformationlength : u32, dwaclinformationclass : ACL_INFORMATION_CLASS) -> super::Foundation:: BOOL); - unsafe { GetAclInformation(pacl, core::mem::transmute(paclinformation), naclinformationlength, dwaclinformationclass).ok() } + unsafe { GetAclInformation(pacl, paclinformation as _, naclinformationlength, dwaclinformationclass).ok() } } #[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); - unsafe { GetAppContainerAce(acl, startingaceindex, core::mem::transmute(appcontainerace), core::mem::transmute(appcontaineraceindex.unwrap_or(core::mem::zeroed()))) } + unsafe { GetAppContainerAce(acl, startingaceindex, appcontainerace as _, appcontaineraceindex.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { GetCachedSigningLevel(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()))) } + unsafe { GetCachedSigningLevel(file, flags as _, signinglevel as _, thumbprint.unwrap_or(core::mem::zeroed()) as _, thumbprintsize.unwrap_or(core::mem::zeroed()) as _, thumbprintalgorithm.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GetFileSecurityA(lpfilename: P0, requestedinformation: u32, psecuritydescriptor: Option, nlength: u32, lpnlengthneeded: *mut u32) -> windows_core::Result<()> @@ -444,7 +370,7 @@ 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); - unsafe { GetFileSecurityA(lpfilename.param().abi(), requestedinformation, core::mem::transmute(psecuritydescriptor.unwrap_or(core::mem::zeroed())), nlength, core::mem::transmute(lpnlengthneeded)).ok() } + unsafe { GetFileSecurityA(lpfilename.param().abi(), requestedinformation, psecuritydescriptor.unwrap_or(core::mem::zeroed()) as _, nlength, lpnlengthneeded as _).ok() } } #[inline] pub unsafe fn GetFileSecurityW(lpfilename: P0, requestedinformation: u32, psecuritydescriptor: Option, nlength: u32, lpnlengthneeded: *mut u32) -> super::Foundation::BOOL @@ -452,37 +378,37 @@ 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); - unsafe { GetFileSecurityW(lpfilename.param().abi(), requestedinformation, core::mem::transmute(psecuritydescriptor.unwrap_or(core::mem::zeroed())), nlength, core::mem::transmute(lpnlengthneeded)) } + unsafe { GetFileSecurityW(lpfilename.param().abi(), requestedinformation, psecuritydescriptor.unwrap_or(core::mem::zeroed()) as _, nlength, lpnlengthneeded as _) } } #[inline] 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); - unsafe { GetKernelObjectSecurity(handle, requestedinformation, core::mem::transmute(psecuritydescriptor.unwrap_or(core::mem::zeroed())), nlength, core::mem::transmute(lpnlengthneeded)).ok() } + unsafe { GetKernelObjectSecurity(handle, requestedinformation, psecuritydescriptor.unwrap_or(core::mem::zeroed()) as _, nlength, lpnlengthneeded as _).ok() } } #[inline] pub unsafe fn GetLengthSid(psid: PSID) -> u32 { windows_targets::link!("advapi32.dll" "system" fn GetLengthSid(psid : PSID) -> u32); - unsafe { GetLengthSid(core::mem::transmute(psid)) } + unsafe { GetLengthSid(psid as _) } } #[inline] 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); - unsafe { GetPrivateObjectSecurity(objectdescriptor, securityinformation, core::mem::transmute(resultantdescriptor.unwrap_or(core::mem::zeroed())), descriptorlength, core::mem::transmute(returnlength)).ok() } + unsafe { GetPrivateObjectSecurity(objectdescriptor, securityinformation, resultantdescriptor.unwrap_or(core::mem::zeroed()) as _, descriptorlength, returnlength as _).ok() } } #[inline] 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); - unsafe { GetSecurityDescriptorControl(psecuritydescriptor, core::mem::transmute(pcontrol), core::mem::transmute(lpdwrevision)).ok() } + unsafe { GetSecurityDescriptorControl(psecuritydescriptor, pcontrol as _, lpdwrevision as _).ok() } } #[inline] 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); - unsafe { GetSecurityDescriptorDacl(psecuritydescriptor, core::mem::transmute(lpbdaclpresent), core::mem::transmute(pdacl), core::mem::transmute(lpbdacldefaulted)).ok() } + unsafe { GetSecurityDescriptorDacl(psecuritydescriptor, lpbdaclpresent as _, pdacl as _, lpbdacldefaulted as _).ok() } } #[inline] 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); - unsafe { GetSecurityDescriptorGroup(psecuritydescriptor, core::mem::transmute(pgroup), core::mem::transmute(lpbgroupdefaulted)).ok() } + unsafe { GetSecurityDescriptorGroup(psecuritydescriptor, pgroup as _, lpbgroupdefaulted as _).ok() } } #[inline] pub unsafe fn GetSecurityDescriptorLength(psecuritydescriptor: PSECURITY_DESCRIPTOR) -> u32 { @@ -492,17 +418,17 @@ pub unsafe fn GetSecurityDescriptorLength(psecuritydescriptor: PSECURITY_DESCRIP #[inline] 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); - unsafe { GetSecurityDescriptorOwner(psecuritydescriptor, core::mem::transmute(powner), core::mem::transmute(lpbownerdefaulted)).ok() } + unsafe { GetSecurityDescriptorOwner(psecuritydescriptor, powner as _, lpbownerdefaulted as _).ok() } } #[inline] 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); - unsafe { GetSecurityDescriptorRMControl(securitydescriptor, core::mem::transmute(rmcontrol)) } + unsafe { GetSecurityDescriptorRMControl(securitydescriptor, rmcontrol as _) } } #[inline] 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); - unsafe { GetSecurityDescriptorSacl(psecuritydescriptor, core::mem::transmute(lpbsaclpresent), core::mem::transmute(psacl), core::mem::transmute(lpbsacldefaulted)).ok() } + unsafe { GetSecurityDescriptorSacl(psecuritydescriptor, lpbsaclpresent as _, psacl as _, lpbsacldefaulted as _).ok() } } #[inline] pub unsafe fn GetSidIdentifierAuthority(psid: PSID) -> *mut SID_IDENTIFIER_AUTHORITY { @@ -527,17 +453,17 @@ pub unsafe fn GetSidSubAuthorityCount(psid: PSID) -> *mut u8 { #[inline] 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); - unsafe { GetTokenInformation(tokenhandle, tokeninformationclass, core::mem::transmute(tokeninformation.unwrap_or(core::mem::zeroed())), tokeninformationlength, core::mem::transmute(returnlength)).ok() } + unsafe { GetTokenInformation(tokenhandle, tokeninformationclass, tokeninformation.unwrap_or(core::mem::zeroed()) as _, tokeninformationlength, returnlength as _).ok() } } #[inline] 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); - unsafe { GetUserObjectSecurity(hobj, psirequested, core::mem::transmute(psid.unwrap_or(core::mem::zeroed())), nlength, core::mem::transmute(lpnlengthneeded)).ok() } + unsafe { GetUserObjectSecurity(hobj, psirequested, psid.unwrap_or(core::mem::zeroed()) as _, nlength, lpnlengthneeded as _).ok() } } #[inline] 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); - unsafe { GetWindowsAccountDomainSid(psid, core::mem::transmute(pdomainsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbdomainsid)).ok() } + unsafe { GetWindowsAccountDomainSid(psid, pdomainsid.unwrap_or(core::mem::zeroed()) as _, cbdomainsid as _).ok() } } #[inline] pub unsafe fn ImpersonateAnonymousToken(threadhandle: super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -557,17 +483,17 @@ pub unsafe fn ImpersonateSelf(impersonationlevel: SECURITY_IMPERSONATION_LEVEL) #[inline] pub unsafe fn InitializeAcl(pacl: *mut ACL, nacllength: u32, dwaclrevision: ACE_REVISION) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn InitializeAcl(pacl : *mut ACL, nacllength : u32, dwaclrevision : ACE_REVISION) -> super::Foundation:: BOOL); - unsafe { InitializeAcl(core::mem::transmute(pacl), nacllength, dwaclrevision).ok() } + unsafe { InitializeAcl(pacl as _, nacllength, dwaclrevision).ok() } } #[inline] pub unsafe fn InitializeSecurityDescriptor(psecuritydescriptor: PSECURITY_DESCRIPTOR, dwrevision: u32) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn InitializeSecurityDescriptor(psecuritydescriptor : PSECURITY_DESCRIPTOR, dwrevision : u32) -> super::Foundation:: BOOL); - unsafe { InitializeSecurityDescriptor(core::mem::transmute(psecuritydescriptor), dwrevision).ok() } + unsafe { InitializeSecurityDescriptor(psecuritydescriptor as _, dwrevision).ok() } } #[inline] pub unsafe fn InitializeSid(sid: PSID, pidentifierauthority: *const SID_IDENTIFIER_AUTHORITY, nsubauthoritycount: u8) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn InitializeSid(sid : PSID, pidentifierauthority : *const SID_IDENTIFIER_AUTHORITY, nsubauthoritycount : u8) -> super::Foundation:: BOOL); - unsafe { InitializeSid(core::mem::transmute(sid), pidentifierauthority, nsubauthoritycount).ok() } + unsafe { InitializeSid(sid as _, pidentifierauthority, nsubauthoritycount).ok() } } #[inline] pub unsafe fn IsTokenRestricted(tokenhandle: super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -602,7 +528,7 @@ where P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn LogonUserA(lpszusername : windows_core::PCSTR, lpszdomain : windows_core::PCSTR, lpszpassword : windows_core::PCSTR, dwlogontype : LOGON32_LOGON, dwlogonprovider : LOGON32_PROVIDER, phtoken : *mut super::Foundation:: HANDLE) -> super::Foundation:: BOOL); - unsafe { LogonUserA(lpszusername.param().abi(), lpszdomain.param().abi(), lpszpassword.param().abi(), dwlogontype, dwlogonprovider, core::mem::transmute(phtoken)).ok() } + unsafe { LogonUserA(lpszusername.param().abi(), lpszdomain.param().abi(), lpszpassword.param().abi(), dwlogontype, dwlogonprovider, phtoken as _).ok() } } #[inline] pub unsafe fn LogonUserExA(lpszusername: P0, lpszdomain: P1, lpszpassword: P2, dwlogontype: LOGON32_LOGON, dwlogonprovider: LOGON32_PROVIDER, phtoken: Option<*mut super::Foundation::HANDLE>, pplogonsid: Option<*mut PSID>, ppprofilebuffer: Option<*mut *mut core::ffi::c_void>, pdwprofilelength: Option<*mut u32>, pquotalimits: Option<*mut QUOTA_LIMITS>) -> windows_core::Result<()> @@ -612,7 +538,7 @@ where P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn LogonUserExA(lpszusername : windows_core::PCSTR, lpszdomain : windows_core::PCSTR, lpszpassword : windows_core::PCSTR, dwlogontype : LOGON32_LOGON, dwlogonprovider : LOGON32_PROVIDER, phtoken : *mut super::Foundation:: HANDLE, pplogonsid : *mut PSID, ppprofilebuffer : *mut *mut core::ffi::c_void, pdwprofilelength : *mut u32, pquotalimits : *mut QUOTA_LIMITS) -> super::Foundation:: BOOL); - unsafe { LogonUserExA(lpszusername.param().abi(), lpszdomain.param().abi(), lpszpassword.param().abi(), dwlogontype, dwlogonprovider, 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() } + unsafe { LogonUserExA(lpszusername.param().abi(), lpszdomain.param().abi(), lpszpassword.param().abi(), dwlogontype, dwlogonprovider, phtoken.unwrap_or(core::mem::zeroed()) as _, pplogonsid.unwrap_or(core::mem::zeroed()) as _, ppprofilebuffer.unwrap_or(core::mem::zeroed()) as _, pdwprofilelength.unwrap_or(core::mem::zeroed()) as _, pquotalimits.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn LogonUserExW(lpszusername: P0, lpszdomain: P1, lpszpassword: P2, dwlogontype: LOGON32_LOGON, dwlogonprovider: LOGON32_PROVIDER, phtoken: Option<*mut super::Foundation::HANDLE>, pplogonsid: Option<*mut PSID>, ppprofilebuffer: Option<*mut *mut core::ffi::c_void>, pdwprofilelength: Option<*mut u32>, pquotalimits: Option<*mut QUOTA_LIMITS>) -> windows_core::Result<()> @@ -622,7 +548,7 @@ where P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn LogonUserExW(lpszusername : windows_core::PCWSTR, lpszdomain : windows_core::PCWSTR, lpszpassword : windows_core::PCWSTR, dwlogontype : LOGON32_LOGON, dwlogonprovider : LOGON32_PROVIDER, phtoken : *mut super::Foundation:: HANDLE, pplogonsid : *mut PSID, ppprofilebuffer : *mut *mut core::ffi::c_void, pdwprofilelength : *mut u32, pquotalimits : *mut QUOTA_LIMITS) -> super::Foundation:: BOOL); - unsafe { LogonUserExW(lpszusername.param().abi(), lpszdomain.param().abi(), lpszpassword.param().abi(), dwlogontype, dwlogonprovider, 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() } + unsafe { LogonUserExW(lpszusername.param().abi(), lpszdomain.param().abi(), lpszpassword.param().abi(), dwlogontype, dwlogonprovider, phtoken.unwrap_or(core::mem::zeroed()) as _, pplogonsid.unwrap_or(core::mem::zeroed()) as _, ppprofilebuffer.unwrap_or(core::mem::zeroed()) as _, pdwprofilelength.unwrap_or(core::mem::zeroed()) as _, pquotalimits.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn LogonUserW(lpszusername: P0, lpszdomain: P1, lpszpassword: P2, dwlogontype: LOGON32_LOGON, dwlogonprovider: LOGON32_PROVIDER, phtoken: *mut super::Foundation::HANDLE) -> windows_core::Result<()> @@ -632,7 +558,7 @@ where P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn LogonUserW(lpszusername : windows_core::PCWSTR, lpszdomain : windows_core::PCWSTR, lpszpassword : windows_core::PCWSTR, dwlogontype : LOGON32_LOGON, dwlogonprovider : LOGON32_PROVIDER, phtoken : *mut super::Foundation:: HANDLE) -> super::Foundation:: BOOL); - unsafe { LogonUserW(lpszusername.param().abi(), lpszdomain.param().abi(), lpszpassword.param().abi(), dwlogontype, dwlogonprovider, core::mem::transmute(phtoken)).ok() } + unsafe { LogonUserW(lpszusername.param().abi(), lpszdomain.param().abi(), lpszpassword.param().abi(), dwlogontype, dwlogonprovider, phtoken as _).ok() } } #[inline] 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<()> @@ -641,7 +567,7 @@ where 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); - unsafe { 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() } + unsafe { LookupAccountNameA(lpsystemname.param().abi(), lpaccountname.param().abi(), sid.unwrap_or(core::mem::zeroed()) as _, cbsid as _, referenceddomainname.unwrap_or(core::mem::zeroed()) as _, cchreferenceddomainname as _, peuse as _).ok() } } #[inline] 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<()> @@ -650,7 +576,7 @@ where 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); - unsafe { 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() } + unsafe { LookupAccountNameW(lpsystemname.param().abi(), lpaccountname.param().abi(), sid.unwrap_or(core::mem::zeroed()) as _, cbsid as _, referenceddomainname.unwrap_or(core::mem::zeroed()) as _, cchreferenceddomainname as _, peuse as _).ok() } } #[inline] 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<()> @@ -658,7 +584,7 @@ where P0: 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); - unsafe { LookupAccountSidA(lpsystemname.param().abi(), 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() } + unsafe { LookupAccountSidA(lpsystemname.param().abi(), sid, name.unwrap_or(core::mem::zeroed()) as _, cchname as _, referenceddomainname.unwrap_or(core::mem::zeroed()) as _, cchreferenceddomainname as _, peuse as _).ok() } } #[inline] 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<()> @@ -666,7 +592,7 @@ where P0: 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); - unsafe { LookupAccountSidW(lpsystemname.param().abi(), 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() } + unsafe { LookupAccountSidW(lpsystemname.param().abi(), sid, name.unwrap_or(core::mem::zeroed()) as _, cchname as _, referenceddomainname.unwrap_or(core::mem::zeroed()) as _, cchreferenceddomainname as _, peuse as _).ok() } } #[inline] pub unsafe fn LookupPrivilegeDisplayNameA(lpsystemname: P0, lpname: P1, lpdisplayname: Option, cchdisplayname: *mut u32, lplanguageid: *mut u32) -> windows_core::Result<()> @@ -675,7 +601,7 @@ where 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); - unsafe { 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() } + unsafe { LookupPrivilegeDisplayNameA(lpsystemname.param().abi(), lpname.param().abi(), lpdisplayname.unwrap_or(core::mem::zeroed()) as _, cchdisplayname as _, lplanguageid as _).ok() } } #[inline] pub unsafe fn LookupPrivilegeDisplayNameW(lpsystemname: P0, lpname: P1, lpdisplayname: Option, cchdisplayname: *mut u32, lplanguageid: *mut u32) -> windows_core::Result<()> @@ -684,7 +610,7 @@ where 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); - unsafe { 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() } + unsafe { LookupPrivilegeDisplayNameW(lpsystemname.param().abi(), lpname.param().abi(), lpdisplayname.unwrap_or(core::mem::zeroed()) as _, cchdisplayname as _, lplanguageid as _).ok() } } #[inline] pub unsafe fn LookupPrivilegeNameA(lpsystemname: P0, lpluid: *const super::Foundation::LUID, lpname: Option, cchname: *mut u32) -> windows_core::Result<()> @@ -692,7 +618,7 @@ 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); - unsafe { LookupPrivilegeNameA(lpsystemname.param().abi(), lpluid, core::mem::transmute(lpname.unwrap_or(core::mem::zeroed())), core::mem::transmute(cchname)).ok() } + unsafe { LookupPrivilegeNameA(lpsystemname.param().abi(), lpluid, lpname.unwrap_or(core::mem::zeroed()) as _, cchname as _).ok() } } #[inline] pub unsafe fn LookupPrivilegeNameW(lpsystemname: P0, lpluid: *const super::Foundation::LUID, lpname: Option, cchname: *mut u32) -> windows_core::Result<()> @@ -700,7 +626,7 @@ 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); - unsafe { LookupPrivilegeNameW(lpsystemname.param().abi(), lpluid, core::mem::transmute(lpname.unwrap_or(core::mem::zeroed())), core::mem::transmute(cchname)).ok() } + unsafe { LookupPrivilegeNameW(lpsystemname.param().abi(), lpluid, lpname.unwrap_or(core::mem::zeroed()) as _, cchname as _).ok() } } #[inline] pub unsafe fn LookupPrivilegeValueA(lpsystemname: P0, lpname: P1, lpluid: *mut super::Foundation::LUID) -> windows_core::Result<()> @@ -709,7 +635,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn LookupPrivilegeValueA(lpsystemname : windows_core::PCSTR, lpname : windows_core::PCSTR, lpluid : *mut super::Foundation:: LUID) -> super::Foundation:: BOOL); - unsafe { LookupPrivilegeValueA(lpsystemname.param().abi(), lpname.param().abi(), core::mem::transmute(lpluid)).ok() } + unsafe { LookupPrivilegeValueA(lpsystemname.param().abi(), lpname.param().abi(), lpluid as _).ok() } } #[inline] pub unsafe fn LookupPrivilegeValueW(lpsystemname: P0, lpname: P1, lpluid: *mut super::Foundation::LUID) -> windows_core::Result<()> @@ -718,37 +644,22 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn LookupPrivilegeValueW(lpsystemname : windows_core::PCWSTR, lpname : windows_core::PCWSTR, lpluid : *mut super::Foundation:: LUID) -> super::Foundation:: BOOL); - unsafe { LookupPrivilegeValueW(lpsystemname.param().abi(), lpname.param().abi(), core::mem::transmute(lpluid)).ok() } + unsafe { LookupPrivilegeValueW(lpsystemname.param().abi(), lpname.param().abi(), lpluid as _).ok() } } #[inline] 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); - unsafe { - MakeAbsoluteSD( - pselfrelativesecuritydescriptor, - core::mem::transmute(pabsolutesecuritydescriptor.unwrap_or(core::mem::zeroed())), - core::mem::transmute(lpdwabsolutesecuritydescriptorsize), - core::mem::transmute(pdacl.unwrap_or(core::mem::zeroed())), - core::mem::transmute(lpdwdaclsize), - core::mem::transmute(psacl.unwrap_or(core::mem::zeroed())), - core::mem::transmute(lpdwsaclsize), - core::mem::transmute(powner.unwrap_or(core::mem::zeroed())), - core::mem::transmute(lpdwownersize), - core::mem::transmute(pprimarygroup.unwrap_or(core::mem::zeroed())), - core::mem::transmute(lpdwprimarygroupsize), - ) - .ok() - } + unsafe { MakeAbsoluteSD(pselfrelativesecuritydescriptor, pabsolutesecuritydescriptor.unwrap_or(core::mem::zeroed()) as _, lpdwabsolutesecuritydescriptorsize as _, pdacl.unwrap_or(core::mem::zeroed()) as _, lpdwdaclsize as _, psacl.unwrap_or(core::mem::zeroed()) as _, lpdwsaclsize as _, powner.unwrap_or(core::mem::zeroed()) as _, lpdwownersize as _, pprimarygroup.unwrap_or(core::mem::zeroed()) as _, lpdwprimarygroupsize as _).ok() } } #[inline] 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); - unsafe { MakeSelfRelativeSD(pabsolutesecuritydescriptor, core::mem::transmute(pselfrelativesecuritydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwbufferlength)).ok() } + unsafe { MakeSelfRelativeSD(pabsolutesecuritydescriptor, pselfrelativesecuritydescriptor.unwrap_or(core::mem::zeroed()) as _, lpdwbufferlength as _).ok() } } #[inline] pub unsafe fn MapGenericMask(accessmask: *mut u32, genericmapping: *const GENERIC_MAPPING) { windows_targets::link!("advapi32.dll" "system" fn MapGenericMask(accessmask : *mut u32, genericmapping : *const GENERIC_MAPPING)); - unsafe { MapGenericMask(core::mem::transmute(accessmask), genericmapping) } + unsafe { MapGenericMask(accessmask as _, genericmapping) } } #[inline] pub unsafe fn ObjectCloseAuditAlarmA(subsystemname: P0, handleid: *const core::ffi::c_void, generateonclose: bool) -> windows_core::Result<()> @@ -790,7 +701,7 @@ where P3: 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); - unsafe { ObjectOpenAuditAlarmA(subsystemname.param().abi(), handleid, objecttypename.param().abi(), objectname.param().abi(), psecuritydescriptor, clienttoken, desiredaccess, grantedaccess, core::mem::transmute(privileges.unwrap_or(core::mem::zeroed())), objectcreation.into(), accessgranted.into(), core::mem::transmute(generateonclose)).ok() } + unsafe { ObjectOpenAuditAlarmA(subsystemname.param().abi(), handleid, objecttypename.param().abi(), objectname.param().abi(), psecuritydescriptor, clienttoken, desiredaccess, grantedaccess, privileges.unwrap_or(core::mem::zeroed()) as _, objectcreation.into(), accessgranted.into(), generateonclose as _).ok() } } #[inline] 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: bool, accessgranted: bool, generateonclose: *mut super::Foundation::BOOL) -> super::Foundation::BOOL @@ -800,7 +711,7 @@ where P3: 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); - unsafe { ObjectOpenAuditAlarmW(subsystemname.param().abi(), handleid, objecttypename.param().abi(), objectname.param().abi(), psecuritydescriptor, clienttoken, desiredaccess, grantedaccess, core::mem::transmute(privileges.unwrap_or(core::mem::zeroed())), objectcreation.into(), accessgranted.into(), core::mem::transmute(generateonclose)) } + unsafe { ObjectOpenAuditAlarmW(subsystemname.param().abi(), handleid, objecttypename.param().abi(), objectname.param().abi(), psecuritydescriptor, clienttoken, desiredaccess, grantedaccess, privileges.unwrap_or(core::mem::zeroed()) as _, objectcreation.into(), accessgranted.into(), generateonclose as _) } } #[inline] pub unsafe fn ObjectPrivilegeAuditAlarmA(subsystemname: P0, handleid: *const core::ffi::c_void, clienttoken: super::Foundation::HANDLE, desiredaccess: u32, privileges: *const PRIVILEGE_SET, accessgranted: bool) -> windows_core::Result<()> @@ -821,7 +732,7 @@ where #[inline] 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); - unsafe { PrivilegeCheck(clienttoken, core::mem::transmute(requiredprivileges), core::mem::transmute(pfresult)).ok() } + unsafe { PrivilegeCheck(clienttoken, requiredprivileges as _, pfresult as _).ok() } } #[inline] pub unsafe fn PrivilegedServiceAuditAlarmA(subsystemname: P0, servicename: P1, clienttoken: super::Foundation::HANDLE, privileges: *const PRIVILEGE_SET, accessgranted: bool) -> windows_core::Result<()> @@ -858,22 +769,22 @@ pub unsafe fn RevertToSelf() -> windows_core::Result<()> { #[inline] pub unsafe fn RtlConvertSidToUnicodeString(unicodestring: *mut super::Foundation::UNICODE_STRING, sid: PSID, allocatedestinationstring: bool) -> super::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlConvertSidToUnicodeString(unicodestring : *mut super::Foundation:: UNICODE_STRING, sid : PSID, allocatedestinationstring : bool) -> super::Foundation:: NTSTATUS); - unsafe { RtlConvertSidToUnicodeString(core::mem::transmute(unicodestring), sid, allocatedestinationstring) } + unsafe { RtlConvertSidToUnicodeString(unicodestring as _, sid, allocatedestinationstring) } } #[inline] pub unsafe fn RtlNormalizeSecurityDescriptor(securitydescriptor: *mut PSECURITY_DESCRIPTOR, securitydescriptorlength: u32, newsecuritydescriptor: Option<*mut PSECURITY_DESCRIPTOR>, newsecuritydescriptorlength: Option<*mut u32>, checkonly: bool) -> bool { windows_targets::link!("ntdll.dll" "system" fn RtlNormalizeSecurityDescriptor(securitydescriptor : *mut PSECURITY_DESCRIPTOR, securitydescriptorlength : u32, newsecuritydescriptor : *mut PSECURITY_DESCRIPTOR, newsecuritydescriptorlength : *mut u32, checkonly : bool) -> bool); - unsafe { RtlNormalizeSecurityDescriptor(core::mem::transmute(securitydescriptor), securitydescriptorlength, core::mem::transmute(newsecuritydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(newsecuritydescriptorlength.unwrap_or(core::mem::zeroed())), checkonly) } + unsafe { RtlNormalizeSecurityDescriptor(securitydescriptor as _, securitydescriptorlength, newsecuritydescriptor.unwrap_or(core::mem::zeroed()) as _, newsecuritydescriptorlength.unwrap_or(core::mem::zeroed()) as _, checkonly) } } #[inline] pub unsafe fn SetAclInformation(pacl: *mut ACL, paclinformation: *const core::ffi::c_void, naclinformationlength: u32, dwaclinformationclass: ACL_INFORMATION_CLASS) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn SetAclInformation(pacl : *mut ACL, paclinformation : *const core::ffi::c_void, naclinformationlength : u32, dwaclinformationclass : ACL_INFORMATION_CLASS) -> super::Foundation:: BOOL); - unsafe { SetAclInformation(core::mem::transmute(pacl), paclinformation, naclinformationlength, dwaclinformationclass).ok() } + unsafe { SetAclInformation(pacl as _, paclinformation, naclinformationlength, dwaclinformationclass).ok() } } #[inline] 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); - unsafe { SetCachedSigningLevel(core::mem::transmute(sourcefiles.as_ptr()), sourcefiles.len().try_into().unwrap(), flags, core::mem::transmute(targetfile.unwrap_or(core::mem::zeroed()))) } + unsafe { SetCachedSigningLevel(core::mem::transmute(sourcefiles.as_ptr()), sourcefiles.len().try_into().unwrap(), flags, targetfile.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SetFileSecurityA(lpfilename: P0, securityinformation: OBJECT_SECURITY_INFORMATION, psecuritydescriptor: PSECURITY_DESCRIPTOR) -> windows_core::Result<()> @@ -899,12 +810,12 @@ pub unsafe fn SetKernelObjectSecurity(handle: super::Foundation::HANDLE, securit #[inline] 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); - unsafe { SetPrivateObjectSecurity(securityinformation, modificationdescriptor, core::mem::transmute(objectssecuritydescriptor), genericmapping, core::mem::transmute(token.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetPrivateObjectSecurity(securityinformation, modificationdescriptor, objectssecuritydescriptor as _, genericmapping, token.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SetPrivateObjectSecurityEx(securityinformation, modificationdescriptor, core::mem::transmute(objectssecuritydescriptor), autoinheritflags, genericmapping, core::mem::transmute(token.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetPrivateObjectSecurityEx(securityinformation, modificationdescriptor, objectssecuritydescriptor as _, autoinheritflags, genericmapping, token.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetSecurityAccessMask(securityinformation: OBJECT_SECURITY_INFORMATION) -> u32 { @@ -923,27 +834,27 @@ pub unsafe fn SetSecurityDescriptorControl(psecuritydescriptor: PSECURITY_DESCRI #[inline] pub unsafe fn SetSecurityDescriptorDacl(psecuritydescriptor: PSECURITY_DESCRIPTOR, bdaclpresent: bool, pdacl: Option<*const ACL>, bdacldefaulted: bool) -> windows_core::Result<()> { 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); - unsafe { SetSecurityDescriptorDacl(core::mem::transmute(psecuritydescriptor), bdaclpresent.into(), core::mem::transmute(pdacl.unwrap_or(core::mem::zeroed())), bdacldefaulted.into()).ok() } + unsafe { SetSecurityDescriptorDacl(psecuritydescriptor as _, bdaclpresent.into(), pdacl.unwrap_or(core::mem::zeroed()) as _, bdacldefaulted.into()).ok() } } #[inline] pub unsafe fn SetSecurityDescriptorGroup(psecuritydescriptor: PSECURITY_DESCRIPTOR, pgroup: Option, bgroupdefaulted: bool) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn SetSecurityDescriptorGroup(psecuritydescriptor : PSECURITY_DESCRIPTOR, pgroup : PSID, bgroupdefaulted : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - unsafe { SetSecurityDescriptorGroup(core::mem::transmute(psecuritydescriptor), core::mem::transmute(pgroup.unwrap_or(core::mem::zeroed())), bgroupdefaulted.into()).ok() } + unsafe { SetSecurityDescriptorGroup(psecuritydescriptor as _, pgroup.unwrap_or(core::mem::zeroed()) as _, bgroupdefaulted.into()).ok() } } #[inline] pub unsafe fn SetSecurityDescriptorOwner(psecuritydescriptor: PSECURITY_DESCRIPTOR, powner: Option, bownerdefaulted: bool) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn SetSecurityDescriptorOwner(psecuritydescriptor : PSECURITY_DESCRIPTOR, powner : PSID, bownerdefaulted : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - unsafe { SetSecurityDescriptorOwner(core::mem::transmute(psecuritydescriptor), core::mem::transmute(powner.unwrap_or(core::mem::zeroed())), bownerdefaulted.into()).ok() } + unsafe { SetSecurityDescriptorOwner(psecuritydescriptor as _, powner.unwrap_or(core::mem::zeroed()) as _, bownerdefaulted.into()).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); - unsafe { SetSecurityDescriptorRMControl(core::mem::transmute(securitydescriptor), core::mem::transmute(rmcontrol.unwrap_or(core::mem::zeroed()))) } + unsafe { SetSecurityDescriptorRMControl(securitydescriptor as _, rmcontrol.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SetSecurityDescriptorSacl(psecuritydescriptor: PSECURITY_DESCRIPTOR, bsaclpresent: bool, psacl: Option<*const ACL>, bsacldefaulted: bool) -> windows_core::Result<()> { 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); - unsafe { SetSecurityDescriptorSacl(core::mem::transmute(psecuritydescriptor), bsaclpresent.into(), core::mem::transmute(psacl.unwrap_or(core::mem::zeroed())), bsacldefaulted.into()).ok() } + unsafe { SetSecurityDescriptorSacl(psecuritydescriptor as _, bsaclpresent.into(), psacl.unwrap_or(core::mem::zeroed()) as _, bsacldefaulted.into()).ok() } } #[inline] pub unsafe fn SetTokenInformation(tokenhandle: super::Foundation::HANDLE, tokeninformationclass: TOKEN_INFORMATION_CLASS, tokeninformation: *const core::ffi::c_void, tokeninformationlength: u32) -> windows_core::Result<()> { diff --git a/crates/libs/windows/src/Windows/Win32/Storage/Cabinets/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/Cabinets/mod.rs index 4f7a639732..f61a403f41 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Cabinets/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Cabinets/mod.rs @@ -10,7 +10,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); - unsafe { FCICreate(perf, pfnfcifp, pfna, pfnf, pfnopen, pfnread, pfnwrite, pfnclose, pfnseek, pfndelete, pfnfcigtf, pccab, core::mem::transmute(pv.unwrap_or(core::mem::zeroed()))) } + unsafe { FCICreate(perf, pfnfcifp, pfna, pfnf, pfnopen, pfnread, pfnwrite, pfnclose, pfnseek, pfndelete, pfnfcigtf, pccab, pv.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FCIDestroy(hfci: *const core::ffi::c_void) -> super::super::Foundation::BOOL { @@ -34,12 +34,12 @@ 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); - unsafe { FDICopy(hfdi, pszcabinet.param().abi(), pszcabpath.param().abi(), flags, pfnfdin, pfnfdid, core::mem::transmute(pvuser.unwrap_or(core::mem::zeroed()))) } + unsafe { FDICopy(hfdi, pszcabinet.param().abi(), pszcabpath.param().abi(), flags, pfnfdin, pfnfdid, pvuser.unwrap_or(core::mem::zeroed()) as _) } } #[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 { windows_targets::link!("cabinet.dll" "cdecl" 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); - unsafe { FDICreate(pfnalloc, pfnfree, pfnopen, pfnread, pfnwrite, pfnclose, pfnseek, cputype, core::mem::transmute(perf)) } + unsafe { FDICreate(pfnalloc, pfnfree, pfnopen, pfnread, pfnwrite, pfnclose, pfnseek, cputype, perf as _) } } #[inline] pub unsafe fn FDIDestroy(hfdi: *const core::ffi::c_void) -> super::super::Foundation::BOOL { @@ -49,7 +49,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); - unsafe { FDIIsCabinet(hfdi, hf, core::mem::transmute(pfdici.unwrap_or(core::mem::zeroed()))) } + unsafe { FDIIsCabinet(hfdi, hf, pfdici.unwrap_or(core::mem::zeroed()) as _) } } #[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 c3553af5e5..d0b9ae1f66 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/CloudFilters/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/CloudFilters/mod.rs @@ -12,14 +12,14 @@ 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); unsafe { let mut result__ = core::mem::zeroed(); - CfConnectSyncRoot(syncrootpath.param().abi(), callbacktable, core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed())), connectflags, &mut result__).map(|| core::mem::transmute(result__)) + CfConnectSyncRoot(syncrootpath.param().abi(), callbacktable, callbackcontext.unwrap_or(core::mem::zeroed()) as _, connectflags, &mut result__).map(|| core::mem::transmute(result__)) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { CfConvertToPlaceholder(filehandle, core::mem::transmute(fileidentity.unwrap_or(core::mem::zeroed())), fileidentitylength, convertflags, core::mem::transmute(convertusn.unwrap_or(core::mem::zeroed())), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CfConvertToPlaceholder(filehandle, fileidentity.unwrap_or(core::mem::zeroed()) as _, fileidentitylength, convertflags, convertusn.unwrap_or(core::mem::zeroed()) as _, overlapped.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Storage_FileSystem")] #[inline] @@ -28,13 +28,13 @@ 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); - unsafe { CfCreatePlaceholders(basedirectorypath.param().abi(), core::mem::transmute(placeholderarray.as_ptr()), placeholderarray.len().try_into().unwrap(), createflags, core::mem::transmute(entriesprocessed.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CfCreatePlaceholders(basedirectorypath.param().abi(), core::mem::transmute(placeholderarray.as_ptr()), placeholderarray.len().try_into().unwrap(), createflags, entriesprocessed.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { CfDehydratePlaceholder(filehandle, startingoffset, length, dehydrateflags, core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CfDehydratePlaceholder(filehandle, startingoffset, length, dehydrateflags, overlapped.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CfDisconnectSyncRoot(connectionkey: CF_CONNECTION_KEY) -> windows_core::Result<()> { @@ -45,28 +45,28 @@ pub unsafe fn CfDisconnectSyncRoot(connectionkey: CF_CONNECTION_KEY) -> windows_ #[inline] pub unsafe fn CfExecute(opinfo: *const CF_OPERATION_INFO, opparams: *mut CF_OPERATION_PARAMETERS) -> windows_core::Result<()> { windows_targets::link!("cldapi.dll" "system" fn CfExecute(opinfo : *const CF_OPERATION_INFO, opparams : *mut CF_OPERATION_PARAMETERS) -> windows_core::HRESULT); - unsafe { CfExecute(opinfo, core::mem::transmute(opparams)).ok() } + unsafe { CfExecute(opinfo, opparams as _).ok() } } #[cfg(feature = "Win32_System_CorrelationVector")] #[inline] 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); - unsafe { CfGetCorrelationVector(filehandle, core::mem::transmute(correlationvector)).ok() } + unsafe { CfGetCorrelationVector(filehandle, correlationvector as _).ok() } } #[inline] 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); - unsafe { CfGetPlaceholderInfo(filehandle, infoclass, core::mem::transmute(infobuffer), infobufferlength, core::mem::transmute(returnedlength.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CfGetPlaceholderInfo(filehandle, infoclass, infobuffer as _, infobufferlength, returnedlength.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { CfGetPlaceholderRangeInfo(filehandle, infoclass, startingoffset, length, core::mem::transmute(infobuffer), infobufferlength, core::mem::transmute(returnedlength.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CfGetPlaceholderRangeInfo(filehandle, infoclass, startingoffset, length, infobuffer as _, infobufferlength, returnedlength.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { CfGetPlaceholderRangeInfoForHydration(connectionkey, transferkey, fileid, infoclass, startingoffset, rangelength, core::mem::transmute(infobuffer), infobuffersize, core::mem::transmute(infobufferwritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CfGetPlaceholderRangeInfoForHydration(connectionkey, transferkey, fileid, infoclass, startingoffset, rangelength, infobuffer as _, infobuffersize, infobufferwritten.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CfGetPlaceholderStateFromAttributeTag(fileattributes: u32, reparsetag: u32) -> CF_PLACEHOLDER_STATE { @@ -96,7 +96,7 @@ pub unsafe fn CfGetPlatformInfo() -> windows_core::Result { #[inline] 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); - unsafe { CfGetSyncRootInfoByHandle(filehandle, infoclass, core::mem::transmute(infobuffer), infobufferlength, core::mem::transmute(returnedlength.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CfGetSyncRootInfoByHandle(filehandle, infoclass, infobuffer as _, infobufferlength, returnedlength.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -104,7 +104,7 @@ where P0: windows_core::Param, { windows_targets::link!("cldapi.dll" "system" fn CfGetSyncRootInfoByPath(filepath : windows_core::PCWSTR, infoclass : CF_SYNC_ROOT_INFO_CLASS, infobuffer : *mut core::ffi::c_void, infobufferlength : u32, returnedlength : *mut u32) -> windows_core::HRESULT); - unsafe { CfGetSyncRootInfoByPath(filepath.param().abi(), infoclass, core::mem::transmute(infobuffer), infobufferlength, core::mem::transmute(returnedlength.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CfGetSyncRootInfoByPath(filepath.param().abi(), infoclass, infobuffer as _, infobufferlength, returnedlength.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CfGetTransferKey(filehandle: super::super::Foundation::HANDLE) -> windows_core::Result { @@ -123,7 +123,7 @@ pub unsafe fn CfGetWin32HandleFromProtectedHandle(protectedhandle: super::super: #[inline] 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); - unsafe { CfHydratePlaceholder(filehandle, startingoffset, length, hydrateflags, core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CfHydratePlaceholder(filehandle, startingoffset, length, hydrateflags, overlapped.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CfOpenFileWithOplock(filepath: P0, flags: CF_OPEN_FILE_FLAGS) -> windows_core::Result @@ -183,13 +183,13 @@ 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); - unsafe { CfReportSyncStatus(syncrootpath.param().abi(), core::mem::transmute(syncstatus.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CfReportSyncStatus(syncrootpath.param().abi(), syncstatus.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { CfRevertPlaceholder(filehandle, revertflags, core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CfRevertPlaceholder(filehandle, revertflags, overlapped.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_CorrelationVector")] #[inline] @@ -200,13 +200,13 @@ pub unsafe fn CfSetCorrelationVector(filehandle: super::super::Foundation::HANDL #[inline] 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); - unsafe { CfSetInSyncState(filehandle, insyncstate, insyncflags, core::mem::transmute(insyncusn.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CfSetInSyncState(filehandle, insyncstate, insyncflags, insyncusn.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { CfSetPinState(filehandle, pinstate, pinflags, core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CfSetPinState(filehandle, pinstate, pinflags, overlapped.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CfUnregisterSyncRoot(syncrootpath: P0) -> windows_core::Result<()> @@ -220,20 +220,7 @@ where #[inline] 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); - unsafe { - CfUpdatePlaceholder( - filehandle, - core::mem::transmute(fsmetadata.unwrap_or(core::mem::zeroed())), - core::mem::transmute(fileidentity.unwrap_or(core::mem::zeroed())), - fileidentitylength, - core::mem::transmute(dehydraterangearray.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - dehydraterangearray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - updateflags, - core::mem::transmute(updateusn.unwrap_or(core::mem::zeroed())), - core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed())), - ) - .ok() - } + unsafe { CfUpdatePlaceholder(filehandle, fsmetadata.unwrap_or(core::mem::zeroed()) as _, fileidentity.unwrap_or(core::mem::zeroed()) as _, fileidentitylength, core::mem::transmute(dehydraterangearray.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), dehydraterangearray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), updateflags, updateusn.unwrap_or(core::mem::zeroed()) as _, overlapped.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CfUpdateSyncProviderStatus(connectionkey: CF_CONNECTION_KEY, providerstatus: CF_SYNC_PROVIDER_STATUS) -> windows_core::Result<()> { 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 1bb2643706..b2d199c3e9 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Compression/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Compression/mod.rs @@ -11,32 +11,32 @@ pub unsafe fn CloseDecompressor(decompressorhandle: DECOMPRESSOR_HANDLE) -> wind #[inline] 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); - unsafe { Compress(compressorhandle, core::mem::transmute(uncompresseddata.unwrap_or(core::mem::zeroed())), uncompresseddatasize, core::mem::transmute(compressedbuffer.unwrap_or(core::mem::zeroed())), compressedbuffersize, core::mem::transmute(compresseddatasize)).ok() } + unsafe { Compress(compressorhandle, uncompresseddata.unwrap_or(core::mem::zeroed()) as _, uncompresseddatasize, compressedbuffer.unwrap_or(core::mem::zeroed()) as _, compressedbuffersize, compresseddatasize as _).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); - unsafe { CreateCompressor(algorithm, core::mem::transmute(allocationroutines.unwrap_or(core::mem::zeroed())), core::mem::transmute(compressorhandle)).ok() } + unsafe { CreateCompressor(algorithm, allocationroutines.unwrap_or(core::mem::zeroed()) as _, compressorhandle as _).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); - unsafe { CreateDecompressor(algorithm, core::mem::transmute(allocationroutines.unwrap_or(core::mem::zeroed())), core::mem::transmute(decompressorhandle)).ok() } + unsafe { CreateDecompressor(algorithm, allocationroutines.unwrap_or(core::mem::zeroed()) as _, decompressorhandle as _).ok() } } #[inline] 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); - unsafe { Decompress(decompressorhandle, core::mem::transmute(compresseddata.unwrap_or(core::mem::zeroed())), compresseddatasize, core::mem::transmute(uncompressedbuffer.unwrap_or(core::mem::zeroed())), uncompressedbuffersize, core::mem::transmute(uncompresseddatasize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { Decompress(decompressorhandle, compresseddata.unwrap_or(core::mem::zeroed()) as _, compresseddatasize, uncompressedbuffer.unwrap_or(core::mem::zeroed()) as _, uncompressedbuffersize, uncompresseddatasize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { QueryCompressorInformation(compressorhandle, compressinformationclass, core::mem::transmute(compressinformation), compressinformationsize).ok() } + unsafe { QueryCompressorInformation(compressorhandle, compressinformationclass, compressinformation as _, compressinformationsize).ok() } } #[inline] 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); - unsafe { QueryDecompressorInformation(decompressorhandle, compressinformationclass, core::mem::transmute(compressinformation), compressinformationsize).ok() } + unsafe { QueryDecompressorInformation(decompressorhandle, compressinformationclass, compressinformation as _, compressinformationsize).ok() } } #[inline] pub unsafe fn ResetCompressor(compressorhandle: COMPRESSOR_HANDLE) -> windows_core::Result<()> { diff --git a/crates/libs/windows/src/Windows/Win32/Storage/DataDeduplication/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/DataDeduplication/mod.rs index 02c3b19bc9..4cb36032b4 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/DataDeduplication/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/DataDeduplication/mod.rs @@ -150,7 +150,7 @@ impl IDedupBackupSupport { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).RestoreFiles)(windows_core::Interface::as_raw(self), numberoffiles, core::mem::transmute(filefullpaths), store.param().abi(), flags, core::mem::transmute(fileresults)).ok() } + unsafe { (windows_core::Interface::vtable(self).RestoreFiles)(windows_core::Interface::as_raw(self), numberoffiles, core::mem::transmute(filefullpaths), store.param().abi(), flags, fileresults as _).ok() } } } #[repr(C)] @@ -265,7 +265,7 @@ windows_core::imp::define_interface!(IDedupDataPort, IDedupDataPort_Vtbl, 0x7963 windows_core::imp::interface_hierarchy!(IDedupDataPort, windows_core::IUnknown); impl IDedupDataPort { pub unsafe fn GetStatus(&self, pstatus: *mut DedupDataPortVolumeStatus, pdataheadroommb: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pstatus), core::mem::transmute(pdataheadroommb)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), pstatus as _, pdataheadroommb as _).ok() } } pub unsafe fn LookupChunks(&self, phashes: &[DedupHash]) -> windows_core::Result { unsafe { @@ -312,7 +312,7 @@ impl IDedupDataPort { } } pub unsafe fn GetStreamsResults(&self, requestid: windows_core::GUID, maxwaitms: u32, streamentryindex: u32, pstreamcount: *mut u32, ppstreams: *mut *mut DedupStream, pentrycount: *mut u32, ppentries: *mut *mut DedupStreamEntry, pstatus: *mut DedupDataPortRequestStatus, ppitemresults: *mut *mut windows_core::HRESULT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStreamsResults)(windows_core::Interface::as_raw(self), core::mem::transmute(requestid), maxwaitms, streamentryindex, core::mem::transmute(pstreamcount), core::mem::transmute(ppstreams), core::mem::transmute(pentrycount), core::mem::transmute(ppentries), core::mem::transmute(pstatus), core::mem::transmute(ppitemresults)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStreamsResults)(windows_core::Interface::as_raw(self), core::mem::transmute(requestid), maxwaitms, streamentryindex, pstreamcount as _, ppstreams as _, pentrycount as _, ppentries as _, pstatus as _, ppitemresults as _).ok() } } pub unsafe fn GetChunks(&self, phashes: &[DedupHash]) -> windows_core::Result { unsafe { @@ -321,7 +321,7 @@ impl IDedupDataPort { } } pub unsafe fn GetChunksResults(&self, requestid: windows_core::GUID, maxwaitms: u32, chunkindex: u32, pchunkcount: *mut u32, ppchunkmetadata: *mut *mut DedupChunk, pdatabytecount: *mut u32, ppchunkdata: *mut *mut u8, pstatus: *mut DedupDataPortRequestStatus, ppitemresults: *mut *mut windows_core::HRESULT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetChunksResults)(windows_core::Interface::as_raw(self), core::mem::transmute(requestid), maxwaitms, chunkindex, core::mem::transmute(pchunkcount), core::mem::transmute(ppchunkmetadata), core::mem::transmute(pdatabytecount), core::mem::transmute(ppchunkdata), core::mem::transmute(pstatus), core::mem::transmute(ppitemresults)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetChunksResults)(windows_core::Interface::as_raw(self), core::mem::transmute(requestid), maxwaitms, chunkindex, pchunkcount as _, ppchunkmetadata as _, pdatabytecount as _, ppchunkdata as _, pstatus as _, ppitemresults as _).ok() } } pub unsafe fn GetRequestStatus(&self, requestid: windows_core::GUID) -> windows_core::Result { unsafe { @@ -330,7 +330,7 @@ impl IDedupDataPort { } } pub unsafe fn GetRequestResults(&self, requestid: windows_core::GUID, maxwaitms: u32, pbatchresult: *mut windows_core::HRESULT, pbatchcount: *mut u32, pstatus: *mut DedupDataPortRequestStatus, ppitemresults: *mut *mut windows_core::HRESULT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRequestResults)(windows_core::Interface::as_raw(self), core::mem::transmute(requestid), maxwaitms, core::mem::transmute(pbatchresult), core::mem::transmute(pbatchcount), core::mem::transmute(pstatus), core::mem::transmute(ppitemresults)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRequestResults)(windows_core::Interface::as_raw(self), core::mem::transmute(requestid), maxwaitms, pbatchresult as _, pbatchcount as _, pstatus as _, ppitemresults as _).ok() } } } #[repr(C)] @@ -519,7 +519,7 @@ windows_core::imp::define_interface!(IDedupDataPortManager, IDedupDataPortManage windows_core::imp::interface_hierarchy!(IDedupDataPortManager, windows_core::IUnknown); impl IDedupDataPortManager { pub unsafe fn GetConfiguration(&self, pminchunksize: *mut u32, pmaxchunksize: *mut u32, pchunkingalgorithm: *mut DedupChunkingAlgorithm, phashingalgorithm: *mut DedupHashingAlgorithm, pcompressionalgorithm: *mut DedupCompressionAlgorithm) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetConfiguration)(windows_core::Interface::as_raw(self), core::mem::transmute(pminchunksize), core::mem::transmute(pmaxchunksize), core::mem::transmute(pchunkingalgorithm), core::mem::transmute(phashingalgorithm), core::mem::transmute(pcompressionalgorithm)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConfiguration)(windows_core::Interface::as_raw(self), pminchunksize as _, pmaxchunksize as _, pchunkingalgorithm as _, phashingalgorithm as _, pcompressionalgorithm as _).ok() } } pub unsafe fn GetVolumeStatus(&self, options: u32, path: &windows_core::BSTR) -> windows_core::Result { unsafe { @@ -597,7 +597,7 @@ impl IDedupIterateChunksHash32 { unsafe { (windows_core::Interface::vtable(self).PushBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap()).ok() } } pub unsafe fn Next(&self, parrchunks: &mut [DEDUP_CHUNK_INFO_HASH32], pulfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), parrchunks.len().try_into().unwrap(), core::mem::transmute(parrchunks.as_ptr()), core::mem::transmute(pulfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), parrchunks.len().try_into().unwrap(), core::mem::transmute(parrchunks.as_ptr()), pulfetched as _).ok() } } pub unsafe fn Drain(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Drain)(windows_core::Interface::as_raw(self)).ok() } @@ -663,10 +663,10 @@ windows_core::imp::define_interface!(IDedupReadFileCallback, IDedupReadFileCallb windows_core::imp::interface_hierarchy!(IDedupReadFileCallback, windows_core::IUnknown); impl IDedupReadFileCallback { pub unsafe fn ReadBackupFile(&self, filefullpath: &windows_core::BSTR, fileoffset: i64, filebuffer: &mut [u8], returnedsize: *mut u32, flags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadBackupFile)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(filefullpath), fileoffset, filebuffer.len().try_into().unwrap(), core::mem::transmute(filebuffer.as_ptr()), core::mem::transmute(returnedsize), flags).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadBackupFile)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(filefullpath), fileoffset, filebuffer.len().try_into().unwrap(), core::mem::transmute(filebuffer.as_ptr()), returnedsize as _, flags).ok() } } pub unsafe fn OrderContainersRestore(&self, containerpaths: &[windows_core::BSTR], readplanentries: *mut u32, readplan: *mut *mut DEDUP_CONTAINER_EXTENT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OrderContainersRestore)(windows_core::Interface::as_raw(self), containerpaths.len().try_into().unwrap(), core::mem::transmute(containerpaths.as_ptr()), core::mem::transmute(readplanentries), core::mem::transmute(readplan)).ok() } + unsafe { (windows_core::Interface::vtable(self).OrderContainersRestore)(windows_core::Interface::as_raw(self), containerpaths.len().try_into().unwrap(), core::mem::transmute(containerpaths.as_ptr()), readplanentries as _, readplan as _).ok() } } pub unsafe fn PreviewContainerRead(&self, filefullpath: &windows_core::BSTR, readoffsets: &[DDP_FILE_EXTENT]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).PreviewContainerRead)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(filefullpath), readoffsets.len().try_into().unwrap(), core::mem::transmute(readoffsets.as_ptr())).ok() } 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 55f4c3cf9b..bb6989694b 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/DistributedFileSystem/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/DistributedFileSystem/mod.rs @@ -46,7 +46,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetDfsEnum(dfsname : windows_core::PCWSTR, level : u32, prefmaxlen : u32, buffer : *mut *mut u8, entriesread : *mut u32, resumehandle : *mut u32) -> u32); - unsafe { NetDfsEnum(dfsname.param().abi(), level, prefmaxlen, core::mem::transmute(buffer), core::mem::transmute(entriesread), core::mem::transmute(resumehandle)) } + unsafe { NetDfsEnum(dfsname.param().abi(), level, prefmaxlen, buffer as _, entriesread as _, resumehandle as _) } } #[inline] pub unsafe fn NetDfsGetClientInfo(dfsentrypath: P0, servername: P1, sharename: P2, level: u32, buffer: *mut *mut u8) -> u32 @@ -56,7 +56,7 @@ where P2: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetDfsGetClientInfo(dfsentrypath : windows_core::PCWSTR, servername : windows_core::PCWSTR, sharename : windows_core::PCWSTR, level : u32, buffer : *mut *mut u8) -> u32); - unsafe { NetDfsGetClientInfo(dfsentrypath.param().abi(), servername.param().abi(), sharename.param().abi(), level, core::mem::transmute(buffer)) } + unsafe { NetDfsGetClientInfo(dfsentrypath.param().abi(), servername.param().abi(), sharename.param().abi(), level, buffer as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -65,7 +65,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetDfsGetFtContainerSecurity(domainname : windows_core::PCWSTR, securityinformation : u32, ppsecuritydescriptor : *mut super::super::Security:: PSECURITY_DESCRIPTOR, lpcbsecuritydescriptor : *mut u32) -> u32); - unsafe { NetDfsGetFtContainerSecurity(domainname.param().abi(), securityinformation, core::mem::transmute(ppsecuritydescriptor), core::mem::transmute(lpcbsecuritydescriptor)) } + unsafe { NetDfsGetFtContainerSecurity(domainname.param().abi(), securityinformation, ppsecuritydescriptor as _, lpcbsecuritydescriptor as _) } } #[inline] pub unsafe fn NetDfsGetInfo(dfsentrypath: P0, servername: P1, sharename: P2, level: u32, buffer: *mut *mut u8) -> u32 @@ -75,7 +75,7 @@ where P2: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetDfsGetInfo(dfsentrypath : windows_core::PCWSTR, servername : windows_core::PCWSTR, sharename : windows_core::PCWSTR, level : u32, buffer : *mut *mut u8) -> u32); - unsafe { NetDfsGetInfo(dfsentrypath.param().abi(), servername.param().abi(), sharename.param().abi(), level, core::mem::transmute(buffer)) } + unsafe { NetDfsGetInfo(dfsentrypath.param().abi(), servername.param().abi(), sharename.param().abi(), level, buffer as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -84,7 +84,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetDfsGetSecurity(dfsentrypath : windows_core::PCWSTR, securityinformation : u32, ppsecuritydescriptor : *mut super::super::Security:: PSECURITY_DESCRIPTOR, lpcbsecuritydescriptor : *mut u32) -> u32); - unsafe { NetDfsGetSecurity(dfsentrypath.param().abi(), securityinformation, core::mem::transmute(ppsecuritydescriptor), core::mem::transmute(lpcbsecuritydescriptor)) } + unsafe { NetDfsGetSecurity(dfsentrypath.param().abi(), securityinformation, ppsecuritydescriptor as _, lpcbsecuritydescriptor as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -93,7 +93,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetDfsGetStdContainerSecurity(machinename : windows_core::PCWSTR, securityinformation : u32, ppsecuritydescriptor : *mut super::super::Security:: PSECURITY_DESCRIPTOR, lpcbsecuritydescriptor : *mut u32) -> u32); - unsafe { NetDfsGetStdContainerSecurity(machinename.param().abi(), securityinformation, core::mem::transmute(ppsecuritydescriptor), core::mem::transmute(lpcbsecuritydescriptor)) } + unsafe { NetDfsGetStdContainerSecurity(machinename.param().abi(), securityinformation, ppsecuritydescriptor as _, lpcbsecuritydescriptor as _) } } #[inline] pub unsafe fn NetDfsGetSupportedNamespaceVersion(origin: DFS_NAMESPACE_VERSION_ORIGIN, pname: P1, ppversioninfo: *mut *mut DFS_SUPPORTED_NAMESPACE_VERSION_INFO) -> u32 @@ -101,7 +101,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetDfsGetSupportedNamespaceVersion(origin : DFS_NAMESPACE_VERSION_ORIGIN, pname : windows_core::PCWSTR, ppversioninfo : *mut *mut DFS_SUPPORTED_NAMESPACE_VERSION_INFO) -> u32); - unsafe { NetDfsGetSupportedNamespaceVersion(origin, pname.param().abi(), core::mem::transmute(ppversioninfo)) } + unsafe { NetDfsGetSupportedNamespaceVersion(origin, pname.param().abi(), ppversioninfo as _) } } #[inline] pub unsafe fn NetDfsMove(olddfsentrypath: P0, newdfsentrypath: P1, flags: u32) -> u32 @@ -130,7 +130,7 @@ where 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); - unsafe { NetDfsRemoveFtRoot(servername.param().abi(), rootshare.param().abi(), ftdfsname.param().abi(), core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))) } + unsafe { NetDfsRemoveFtRoot(servername.param().abi(), rootshare.param().abi(), ftdfsname.param().abi(), flags.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetDfsRemoveFtRootForced(domainname: P0, servername: P1, rootshare: P2, ftdfsname: P3, flags: Option) -> u32 @@ -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); - unsafe { NetDfsRemoveFtRootForced(domainname.param().abi(), servername.param().abi(), rootshare.param().abi(), ftdfsname.param().abi(), core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))) } + unsafe { NetDfsRemoveFtRootForced(domainname.param().abi(), servername.param().abi(), rootshare.param().abi(), ftdfsname.param().abi(), flags.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetDfsRemoveRootTarget(pdfspath: P0, ptargetpath: P1, flags: u32) -> u32 @@ -159,7 +159,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetDfsRemoveStdRoot(servername : windows_core::PCWSTR, rootshare : windows_core::PCWSTR, flags : u32) -> u32); - unsafe { NetDfsRemoveStdRoot(servername.param().abi(), rootshare.param().abi(), core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))) } + unsafe { NetDfsRemoveStdRoot(servername.param().abi(), rootshare.param().abi(), flags.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetDfsSetClientInfo(dfsentrypath: P0, servername: P1, sharename: P2, level: u32, buffer: *const u8) -> u32 diff --git a/crates/libs/windows/src/Windows/Win32/Storage/EnhancedStorage/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/EnhancedStorage/mod.rs index 853b369962..9285682193 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/EnhancedStorage/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/EnhancedStorage/mod.rs @@ -245,7 +245,7 @@ impl IEnhancedStorageACT { } } pub unsafe fn GetSilos(&self, pppienhancedstoragesilos: *mut *mut Option, pcenhancedstoragesilos: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSilos)(windows_core::Interface::as_raw(self), core::mem::transmute(pppienhancedstoragesilos), core::mem::transmute(pcenhancedstoragesilos)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSilos)(windows_core::Interface::as_raw(self), pppienhancedstoragesilos as _, pcenhancedstoragesilos as _).ok() } } } #[repr(C)] @@ -497,10 +497,10 @@ impl IEnhancedStorageSilo { } } pub unsafe fn GetActions(&self, pppienhancedstoragesiloactions: *mut *mut Option, pcenhancedstoragesiloactions: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetActions)(windows_core::Interface::as_raw(self), core::mem::transmute(pppienhancedstoragesiloactions), core::mem::transmute(pcenhancedstoragesiloactions)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetActions)(windows_core::Interface::as_raw(self), pppienhancedstoragesiloactions as _, pcenhancedstoragesiloactions as _).ok() } } pub unsafe fn SendCommand(&self, command: u8, pbcommandbuffer: &[u8], pbresponsebuffer: *mut u8, pcbresponsebuffer: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SendCommand)(windows_core::Interface::as_raw(self), command, core::mem::transmute(pbcommandbuffer.as_ptr()), pbcommandbuffer.len().try_into().unwrap(), core::mem::transmute(pbresponsebuffer), core::mem::transmute(pcbresponsebuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).SendCommand)(windows_core::Interface::as_raw(self), command, core::mem::transmute(pbcommandbuffer.as_ptr()), pbcommandbuffer.len().try_into().unwrap(), pbresponsebuffer as _, pcbresponsebuffer as _).ok() } } #[cfg(feature = "Win32_Devices_PortableDevices")] pub unsafe fn GetPortableDevice(&self) -> windows_core::Result { @@ -681,7 +681,7 @@ windows_core::imp::define_interface!(IEnumEnhancedStorageACT, IEnumEnhancedStora windows_core::imp::interface_hierarchy!(IEnumEnhancedStorageACT, windows_core::IUnknown); impl IEnumEnhancedStorageACT { pub unsafe fn GetACTs(&self, pppienhancedstorageacts: *mut *mut Option, pcenhancedstorageacts: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetACTs)(windows_core::Interface::as_raw(self), core::mem::transmute(pppienhancedstorageacts), core::mem::transmute(pcenhancedstorageacts)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetACTs)(windows_core::Interface::as_raw(self), pppienhancedstorageacts as _, pcenhancedstorageacts as _).ok() } } pub unsafe fn GetMatchingACT(&self, szvolume: P0) -> windows_core::Result where 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 5f7937657a..024ba157eb 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/FileHistory/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/FileHistory/mod.rs @@ -217,7 +217,7 @@ impl IFhConfigMgr { unsafe { (windows_core::Interface::vtable(self).ChangeDefaultTargetRecommendation)(windows_core::Interface::as_raw(self), recommend.into()).ok() } } pub unsafe fn QueryProtectionStatus(&self, protectionstate: *mut u32, protecteduntiltime: *mut windows_core::BSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryProtectionStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(protectionstate), core::mem::transmute(protecteduntiltime)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryProtectionStatus)(windows_core::Interface::as_raw(self), protectionstate as _, core::mem::transmute(protecteduntiltime)).ok() } } } #[repr(C)] @@ -406,7 +406,7 @@ impl IFhReassociation { unsafe { (windows_core::Interface::vtable(self).ScanTargetForConfigurations)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(targeturl)).ok() } } pub unsafe fn GetConfigurationDetails(&self, index: u32, username: *mut windows_core::BSTR, pcname: *mut windows_core::BSTR, backuptime: *mut super::super::Foundation::FILETIME) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetConfigurationDetails)(windows_core::Interface::as_raw(self), index, core::mem::transmute(username), core::mem::transmute(pcname), core::mem::transmute(backuptime)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConfigurationDetails)(windows_core::Interface::as_raw(self), index, core::mem::transmute(username), core::mem::transmute(pcname), backuptime as _).ok() } } pub unsafe fn SelectConfiguration(&self, index: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SelectConfiguration)(windows_core::Interface::as_raw(self), index).ok() } 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 c58232ecb3..69583b515c 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/FileServerResourceManager/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/FileServerResourceManager/mod.rs @@ -2511,7 +2511,7 @@ impl IFsrmClassifierModuleImplementation { unsafe { (windows_core::Interface::vtable(self).OnBeginFile)(windows_core::Interface::as_raw(self), propertybag.param().abi(), arrayruleids).ok() } } pub unsafe fn DoesPropertyValueApply(&self, property: &windows_core::BSTR, value: &windows_core::BSTR, applyvalue: *mut super::super::Foundation::VARIANT_BOOL, idrule: windows_core::GUID, idpropdef: windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DoesPropertyValueApply)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(property), core::mem::transmute_copy(value), core::mem::transmute(applyvalue), core::mem::transmute(idrule), core::mem::transmute(idpropdef)).ok() } + unsafe { (windows_core::Interface::vtable(self).DoesPropertyValueApply)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(property), core::mem::transmute_copy(value), applyvalue as _, core::mem::transmute(idrule), core::mem::transmute(idpropdef)).ok() } } pub unsafe fn GetPropertyValueToApply(&self, property: &windows_core::BSTR, value: *mut windows_core::BSTR, idrule: windows_core::GUID, idpropdef: windows_core::GUID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetPropertyValueToApply)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(property), core::mem::transmute(value), core::mem::transmute(idrule), core::mem::transmute(idpropdef)).ok() } 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 fcac99a633..3aa55d206f 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/FileSystem/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/FileSystem/mod.rs @@ -4,12 +4,12 @@ where 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); - unsafe { AddLogContainer(hlog, core::mem::transmute(pcbcontainer.unwrap_or(core::mem::zeroed())), pwszcontainerpath.param().abi(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { AddLogContainer(hlog, pcbcontainer.unwrap_or(core::mem::zeroed()) as _, pwszcontainerpath.param().abi(), preserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { AddLogContainerSet(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() } + unsafe { AddLogContainerSet(hlog, rgwszcontainerpath.len().try_into().unwrap(), pcbcontainer.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(rgwszcontainerpath.as_ptr()), preserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Security")] #[inline] @@ -24,17 +24,17 @@ where #[inline] pub unsafe fn AdvanceLogBase(pvmarshal: *mut core::ffi::c_void, plsnbase: *mut CLS_LSN, fflags: u32, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn AdvanceLogBase(pvmarshal : *mut core::ffi::c_void, plsnbase : *mut CLS_LSN, fflags : u32, poverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - unsafe { AdvanceLogBase(core::mem::transmute(pvmarshal), core::mem::transmute(plsnbase), fflags, core::mem::transmute(poverlapped)).ok() } + unsafe { AdvanceLogBase(pvmarshal as _, plsnbase as _, fflags, poverlapped as _).ok() } } #[inline] pub unsafe fn AlignReservedLog(pvmarshal: *mut core::ffi::c_void, creservedrecords: u32, rgcbreservation: *mut i64, pcbalignreservation: *mut i64) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn AlignReservedLog(pvmarshal : *mut core::ffi::c_void, creservedrecords : u32, rgcbreservation : *mut i64, pcbalignreservation : *mut i64) -> super::super::Foundation:: BOOL); - unsafe { AlignReservedLog(core::mem::transmute(pvmarshal), creservedrecords, core::mem::transmute(rgcbreservation), core::mem::transmute(pcbalignreservation)).ok() } + unsafe { AlignReservedLog(pvmarshal as _, creservedrecords, rgcbreservation as _, pcbalignreservation as _).ok() } } #[inline] pub unsafe fn AllocReservedLog(pvmarshal: *mut core::ffi::c_void, creservedrecords: u32, pcbadjustment: *mut i64) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn AllocReservedLog(pvmarshal : *mut core::ffi::c_void, creservedrecords : u32, pcbadjustment : *mut i64) -> super::super::Foundation:: BOOL); - unsafe { AllocReservedLog(core::mem::transmute(pvmarshal), creservedrecords, core::mem::transmute(pcbadjustment)).ok() } + unsafe { AllocReservedLog(pvmarshal as _, creservedrecords, pcbadjustment as _).ok() } } #[inline] pub unsafe fn AreFileApisANSI() -> super::super::Foundation::BOOL { @@ -44,22 +44,22 @@ pub unsafe fn AreFileApisANSI() -> super::super::Foundation::BOOL { #[inline] 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); - unsafe { AreShortNamesEnabled(handle, core::mem::transmute(enabled)) } + unsafe { AreShortNamesEnabled(handle, enabled as _) } } #[inline] pub unsafe fn BackupRead(hfile: super::super::Foundation::HANDLE, lpbuffer: &mut [u8], lpnumberofbytesread: *mut u32, babort: bool, bprocesssecurity: bool, lpcontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { 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); - unsafe { BackupRead(hfile, core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofbytesread), babort.into(), bprocesssecurity.into(), core::mem::transmute(lpcontext)).ok() } + unsafe { BackupRead(hfile, core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), lpnumberofbytesread as _, babort.into(), bprocesssecurity.into(), lpcontext as _).ok() } } #[inline] 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); - unsafe { BackupSeek(hfile, dwlowbytestoseek, dwhighbytestoseek, core::mem::transmute(lpdwlowbyteseeked), core::mem::transmute(lpdwhighbyteseeked), core::mem::transmute(lpcontext)).ok() } + unsafe { BackupSeek(hfile, dwlowbytestoseek, dwhighbytestoseek, lpdwlowbyteseeked as _, lpdwhighbyteseeked as _, lpcontext as _).ok() } } #[inline] pub unsafe fn BackupWrite(hfile: super::super::Foundation::HANDLE, lpbuffer: &[u8], lpnumberofbyteswritten: *mut u32, babort: bool, bprocesssecurity: bool, lpcontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { 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); - unsafe { BackupWrite(hfile, core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofbyteswritten), babort.into(), bprocesssecurity.into(), core::mem::transmute(lpcontext)).ok() } + unsafe { BackupWrite(hfile, core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), lpnumberofbyteswritten as _, babort.into(), bprocesssecurity.into(), lpcontext as _).ok() } } #[inline] pub unsafe fn BuildIoRingCancelRequest(ioring: HIORING, file: IORING_HANDLE_REF, optocancel: usize, userdata: usize) -> windows_core::Result<()> { @@ -97,7 +97,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); - unsafe { 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() } + unsafe { 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()), pbnamecontainsspaces.unwrap_or(core::mem::zeroed()) as _, pbnamelegal as _).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<()> @@ -105,7 +105,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CheckNameLegalDOS8Dot3W(lpname : windows_core::PCWSTR, lpoemname : windows_core::PSTR, oemnamesize : u32, pbnamecontainsspaces : *mut super::super::Foundation:: BOOL, pbnamelegal : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - unsafe { 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() } + unsafe { 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()), pbnamecontainsspaces.unwrap_or(core::mem::zeroed()) as _, pbnamelegal as _).ok() } } #[inline] pub unsafe fn CloseAndResetLogFile(hlog: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -125,12 +125,12 @@ pub unsafe fn CloseIoRing(ioring: HIORING) -> windows_core::Result<()> { #[inline] 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); - unsafe { CommitComplete(enlistmenthandle, core::mem::transmute(tmvirtualclock)).ok() } + unsafe { CommitComplete(enlistmenthandle, tmvirtualclock as _).ok() } } #[inline] 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); - unsafe { CommitEnlistment(enlistmenthandle, core::mem::transmute(tmvirtualclock)).ok() } + unsafe { CommitEnlistment(enlistmenthandle, tmvirtualclock as _).ok() } } #[inline] pub unsafe fn CommitTransaction(transactionhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -154,7 +154,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); - unsafe { CopyFile2(pwszexistingfilename.param().abi(), pwsznewfilename.param().abi(), core::mem::transmute(pextendedparameters.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CopyFile2(pwszexistingfilename.param().abi(), pwsznewfilename.param().abi(), pextendedparameters.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CopyFileA(lpexistingfilename: P0, lpnewfilename: P1, bfailifexists: bool) -> windows_core::Result<()> @@ -172,7 +172,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CopyFileExA(lpexistingfilename : windows_core::PCSTR, lpnewfilename : windows_core::PCSTR, lpprogressroutine : LPPROGRESS_ROUTINE, lpdata : *const core::ffi::c_void, pbcancel : *mut super::super::Foundation:: BOOL, dwcopyflags : COPYFILE_FLAGS) -> super::super::Foundation:: BOOL); - unsafe { 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())), dwcopyflags).ok() } + unsafe { CopyFileExA(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), lpprogressroutine.unwrap_or(core::mem::zeroed()) as _, lpdata.unwrap_or(core::mem::zeroed()) as _, pbcancel.unwrap_or(core::mem::zeroed()) as _, dwcopyflags).ok() } } #[inline] 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<()> @@ -181,7 +181,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CopyFileExW(lpexistingfilename : windows_core::PCWSTR, lpnewfilename : windows_core::PCWSTR, lpprogressroutine : LPPROGRESS_ROUTINE, lpdata : *const core::ffi::c_void, pbcancel : *mut super::super::Foundation:: BOOL, dwcopyflags : COPYFILE_FLAGS) -> super::super::Foundation:: BOOL); - unsafe { 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())), dwcopyflags).ok() } + unsafe { CopyFileExW(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), lpprogressroutine.unwrap_or(core::mem::zeroed()) as _, lpdata.unwrap_or(core::mem::zeroed()) as _, pbcancel.unwrap_or(core::mem::zeroed()) as _, dwcopyflags).ok() } } #[inline] pub unsafe fn CopyFileFromAppW(lpexistingfilename: P0, lpnewfilename: P1, bfailifexists: bool) -> super::super::Foundation::BOOL @@ -199,7 +199,7 @@ where P1: 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); - unsafe { 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())), dwcopyflags, htransaction).ok() } + unsafe { CopyFileTransactedA(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), lpprogressroutine.unwrap_or(core::mem::zeroed()) as _, lpdata.unwrap_or(core::mem::zeroed()) as _, pbcancel.unwrap_or(core::mem::zeroed()) as _, dwcopyflags, htransaction).ok() } } #[inline] 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<()> @@ -208,7 +208,7 @@ where P1: 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); - unsafe { 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())), dwcopyflags, htransaction).ok() } + unsafe { CopyFileTransactedW(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), lpprogressroutine.unwrap_or(core::mem::zeroed()) as _, lpdata.unwrap_or(core::mem::zeroed()) as _, pbcancel.unwrap_or(core::mem::zeroed()) as _, dwcopyflags, htransaction).ok() } } #[inline] pub unsafe fn CopyFileW(lpexistingfilename: P0, lpnewfilename: P1, bfailifexists: bool) -> windows_core::Result<()> @@ -231,7 +231,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); - unsafe { CreateDirectoryA(lppathname.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CreateDirectoryA(lppathname.param().abi(), lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Security")] #[inline] @@ -241,7 +241,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); - unsafe { CreateDirectoryExA(lptemplatedirectory.param().abi(), lpnewdirectory.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CreateDirectoryExA(lptemplatedirectory.param().abi(), lpnewdirectory.param().abi(), lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Security")] #[inline] @@ -251,7 +251,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); - unsafe { CreateDirectoryExW(lptemplatedirectory.param().abi(), lpnewdirectory.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CreateDirectoryExW(lptemplatedirectory.param().abi(), lpnewdirectory.param().abi(), lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Security")] #[inline] @@ -260,7 +260,7 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-core-file-fromapp-l1-1-0.dll" "system" fn CreateDirectoryFromAppW(lppathname : windows_core::PCWSTR, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES) -> super::super::Foundation:: BOOL); - unsafe { CreateDirectoryFromAppW(lppathname.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed()))) } + unsafe { CreateDirectoryFromAppW(lppathname.param().abi(), lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -270,7 +270,7 @@ where P1: 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); - unsafe { CreateDirectoryTransactedA(lptemplatedirectory.param().abi(), lpnewdirectory.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), htransaction).ok() } + unsafe { CreateDirectoryTransactedA(lptemplatedirectory.param().abi(), lpnewdirectory.param().abi(), lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _, htransaction).ok() } } #[cfg(feature = "Win32_Security")] #[inline] @@ -280,7 +280,7 @@ where P1: 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); - unsafe { CreateDirectoryTransactedW(lptemplatedirectory.param().abi(), lpnewdirectory.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), htransaction).ok() } + unsafe { CreateDirectoryTransactedW(lptemplatedirectory.param().abi(), lpnewdirectory.param().abi(), lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _, htransaction).ok() } } #[cfg(feature = "Win32_Security")] #[inline] @@ -289,13 +289,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); - unsafe { CreateDirectoryW(lppathname.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CreateDirectoryW(lppathname.param().abi(), lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Security")] #[inline] 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__ = unsafe { CreateEnlistment(core::mem::transmute(lpenlistmentattributes), resourcemanagerhandle, transactionhandle, notificationmask, createoptions, core::mem::transmute(enlistmentkey)) }; + let result__ = unsafe { CreateEnlistment(lpenlistmentattributes as _, resourcemanagerhandle, transactionhandle, notificationmask, createoptions, enlistmentkey as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -305,7 +305,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__ = unsafe { CreateFile2(lpfilename.param().abi(), dwdesiredaccess, dwsharemode, dwcreationdisposition, core::mem::transmute(pcreateexparams.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { CreateFile2(lpfilename.param().abi(), dwdesiredaccess, dwsharemode, dwcreationdisposition, pcreateexparams.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -315,7 +315,7 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-core-file-fromapp-l1-1-0.dll" "system" fn CreateFile2FromAppW(lpfilename : windows_core::PCWSTR, dwdesiredaccess : u32, dwsharemode : u32, dwcreationdisposition : u32, pcreateexparams : *const CREATEFILE2_EXTENDED_PARAMETERS) -> super::super::Foundation:: HANDLE); - unsafe { CreateFile2FromAppW(lpfilename.param().abi(), dwdesiredaccess, dwsharemode, dwcreationdisposition, core::mem::transmute(pcreateexparams.unwrap_or(core::mem::zeroed()))) } + unsafe { CreateFile2FromAppW(lpfilename.param().abi(), dwdesiredaccess, dwsharemode, dwcreationdisposition, pcreateexparams.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -324,7 +324,7 @@ where P0: 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__ = unsafe { CreateFileA(lpfilename.param().abi(), dwdesiredaccess, dwsharemode, core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), dwcreationdisposition, dwflagsandattributes, core::mem::transmute(htemplatefile.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { CreateFileA(lpfilename.param().abi(), dwdesiredaccess, dwsharemode, lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _, dwcreationdisposition, dwflagsandattributes, htemplatefile.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -334,7 +334,7 @@ where P0: 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); - unsafe { CreateFileFromAppW(lpfilename.param().abi(), dwdesiredaccess, dwsharemode, core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), dwcreationdisposition, dwflagsandattributes, core::mem::transmute(htemplatefile.unwrap_or(core::mem::zeroed()))) } + unsafe { CreateFileFromAppW(lpfilename.param().abi(), dwdesiredaccess, dwsharemode, lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _, dwcreationdisposition, dwflagsandattributes, htemplatefile.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -343,7 +343,7 @@ where P0: 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__ = unsafe { CreateFileTransactedA(lpfilename.param().abi(), dwdesiredaccess, dwsharemode, core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), dwcreationdisposition, dwflagsandattributes, core::mem::transmute(htemplatefile.unwrap_or(core::mem::zeroed())), htransaction, core::mem::transmute(pusminiversion.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpextendedparameter.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { CreateFileTransactedA(lpfilename.param().abi(), dwdesiredaccess, dwsharemode, lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _, dwcreationdisposition, dwflagsandattributes, htemplatefile.unwrap_or(core::mem::zeroed()) as _, htransaction, pusminiversion.unwrap_or(core::mem::zeroed()) as _, lpextendedparameter.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -353,7 +353,7 @@ where P0: 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__ = unsafe { CreateFileTransactedW(lpfilename.param().abi(), dwdesiredaccess, dwsharemode, core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), dwcreationdisposition, dwflagsandattributes, core::mem::transmute(htemplatefile.unwrap_or(core::mem::zeroed())), htransaction, core::mem::transmute(pusminiversion.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpextendedparameter.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { CreateFileTransactedW(lpfilename.param().abi(), dwdesiredaccess, dwsharemode, lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _, dwcreationdisposition, dwflagsandattributes, htemplatefile.unwrap_or(core::mem::zeroed()) as _, htransaction, pusminiversion.unwrap_or(core::mem::zeroed()) as _, lpextendedparameter.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -363,7 +363,7 @@ where P0: 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__ = unsafe { CreateFileW(lpfilename.param().abi(), dwdesiredaccess, dwsharemode, core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), dwcreationdisposition, dwflagsandattributes, core::mem::transmute(htemplatefile.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { CreateFileW(lpfilename.param().abi(), dwdesiredaccess, dwsharemode, lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _, dwcreationdisposition, dwflagsandattributes, htemplatefile.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -374,7 +374,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateHardLinkA(lpfilename : windows_core::PCSTR, lpexistingfilename : windows_core::PCSTR, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES) -> super::super::Foundation:: BOOL); - unsafe { CreateHardLinkA(lpfilename.param().abi(), lpexistingfilename.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CreateHardLinkA(lpfilename.param().abi(), lpexistingfilename.param().abi(), lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Security")] #[inline] @@ -384,7 +384,7 @@ where P1: 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); - unsafe { CreateHardLinkTransactedA(lpfilename.param().abi(), lpexistingfilename.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), htransaction).ok() } + unsafe { CreateHardLinkTransactedA(lpfilename.param().abi(), lpexistingfilename.param().abi(), lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _, htransaction).ok() } } #[cfg(feature = "Win32_Security")] #[inline] @@ -394,7 +394,7 @@ where P1: 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); - unsafe { CreateHardLinkTransactedW(lpfilename.param().abi(), lpexistingfilename.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), htransaction).ok() } + unsafe { CreateHardLinkTransactedW(lpfilename.param().abi(), lpexistingfilename.param().abi(), lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _, htransaction).ok() } } #[cfg(feature = "Win32_Security")] #[inline] @@ -404,7 +404,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); - unsafe { CreateHardLinkW(lpfilename.param().abi(), lpexistingfilename.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CreateHardLinkW(lpfilename.param().abi(), lpexistingfilename.param().abi(), lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CreateIoRing(ioringversion: IORING_VERSION, flags: IORING_CREATE_FLAGS, submissionqueuesize: u32, completionqueuesize: u32) -> windows_core::Result { @@ -418,7 +418,7 @@ pub unsafe fn CreateIoRing(ioringversion: IORING_VERSION, flags: IORING_CREATE_F #[inline] 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); - unsafe { CreateLogContainerScanContext(hlog, cfromcontainer, ccontainers, escanmode, core::mem::transmute(pcxscan), core::mem::transmute(poverlapped)).ok() } + unsafe { CreateLogContainerScanContext(hlog, cfromcontainer, ccontainers, escanmode, pcxscan as _, poverlapped as _).ok() } } #[cfg(feature = "Win32_Security")] #[inline] @@ -427,13 +427,13 @@ where P0: windows_core::Param, { windows_targets::link!("clfsw32.dll" "system" fn CreateLogFile(pszlogfilename : windows_core::PCWSTR, fdesiredaccess : u32, dwsharemode : FILE_SHARE_MODE, psalogfile : *mut super::super::Security:: SECURITY_ATTRIBUTES, fcreatedisposition : FILE_CREATION_DISPOSITION, fflagsandattributes : FILE_FLAGS_AND_ATTRIBUTES) -> super::super::Foundation:: HANDLE); - let result__ = unsafe { CreateLogFile(pszlogfilename.param().abi(), fdesiredaccess, dwsharemode, core::mem::transmute(psalogfile), fcreatedisposition, fflagsandattributes) }; + let result__ = unsafe { CreateLogFile(pszlogfilename.param().abi(), fdesiredaccess, dwsharemode, psalogfile as _, fcreatedisposition, fflagsandattributes) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] 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); - unsafe { CreateLogMarshallingArea(hlog, pfnallocbuffer, pfnfreebuffer, core::mem::transmute(pvblockalloccontext), cbmarshallingbuffer, cmaxwritebuffers, cmaxreadbuffers, core::mem::transmute(ppvmarshal)).ok() } + unsafe { CreateLogMarshallingArea(hlog, pfnallocbuffer, pfnfreebuffer, pvblockalloccontext as _, cbmarshallingbuffer, cmaxwritebuffers, cmaxreadbuffers, ppvmarshal as _).ok() } } #[cfg(feature = "Win32_Security")] #[inline] @@ -442,7 +442,7 @@ where 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__ = unsafe { CreateResourceManager(core::mem::transmute(lpresourcemanagerattributes), core::mem::transmute(resourcemanagerid), createoptions, tmhandle, description.param().abi()) }; + let result__ = unsafe { CreateResourceManager(lpresourcemanagerattributes as _, resourcemanagerid as _, createoptions, tmhandle, description.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -493,7 +493,7 @@ where P6: windows_core::Param, { windows_targets::link!("ktmw32.dll" "system" fn CreateTransaction(lptransactionattributes : *mut super::super::Security:: SECURITY_ATTRIBUTES, uow : *mut windows_core::GUID, createoptions : u32, isolationlevel : u32, isolationflags : u32, timeout : u32, description : windows_core::PCWSTR) -> super::super::Foundation:: HANDLE); - let result__ = unsafe { CreateTransaction(core::mem::transmute(lptransactionattributes), core::mem::transmute(uow), createoptions, isolationlevel, isolationflags, timeout, description.param().abi()) }; + let result__ = unsafe { CreateTransaction(lptransactionattributes as _, uow as _, createoptions, isolationlevel, isolationflags, timeout, description.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -503,7 +503,7 @@ where P1: windows_core::Param, { windows_targets::link!("ktmw32.dll" "system" fn CreateTransactionManager(lptransactionattributes : *mut super::super::Security:: SECURITY_ATTRIBUTES, logfilename : windows_core::PCWSTR, createoptions : u32, commitstrength : u32) -> super::super::Foundation:: HANDLE); - let result__ = unsafe { CreateTransactionManager(core::mem::transmute(lptransactionattributes), logfilename.param().abi(), createoptions, commitstrength) }; + let result__ = unsafe { CreateTransactionManager(lptransactionattributes as _, logfilename.param().abi(), createoptions, commitstrength) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -512,7 +512,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn DecryptFileA(lpfilename : windows_core::PCSTR, dwreserved : u32) -> super::super::Foundation:: BOOL); - unsafe { DecryptFileA(lpfilename.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DecryptFileA(lpfilename.param().abi(), dwreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn DecryptFileW(lpfilename: P0, dwreserved: Option) -> windows_core::Result<()> @@ -520,7 +520,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn DecryptFileW(lpfilename : windows_core::PCWSTR, dwreserved : u32) -> super::super::Foundation:: BOOL); - unsafe { DecryptFileW(lpfilename.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DecryptFileW(lpfilename.param().abi(), dwreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn DefineDosDeviceA(dwflags: DEFINE_DOS_DEVICE_FLAGS, lpdevicename: P1, lptargetpath: P2) -> windows_core::Result<()> @@ -591,12 +591,12 @@ where P0: windows_core::Param, { windows_targets::link!("clfsw32.dll" "system" fn DeleteLogFile(pszlogfilename : windows_core::PCWSTR, pvreserved : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { DeleteLogFile(pszlogfilename.param().abi(), core::mem::transmute(pvreserved)).ok() } + unsafe { DeleteLogFile(pszlogfilename.param().abi(), pvreserved as _).ok() } } #[inline] pub unsafe fn DeleteLogMarshallingArea(pvmarshal: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn DeleteLogMarshallingArea(pvmarshal : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { DeleteLogMarshallingArea(core::mem::transmute(pvmarshal)).ok() } + unsafe { DeleteLogMarshallingArea(pvmarshal as _).ok() } } #[inline] pub unsafe fn DeleteVolumeMountPointA(lpszvolumemountpoint: P0) -> windows_core::Result<()> @@ -627,7 +627,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); - unsafe { DuplicateEncryptionInfoFile(srcfilename.param().abi(), dstfilename.param().abi(), dwcreationdistribution, dwattributes, core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed()))) } + unsafe { DuplicateEncryptionInfoFile(srcfilename.param().abi(), dstfilename.param().abi(), dwcreationdistribution, dwattributes, lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn EncryptFileA(lpfilename: P0) -> windows_core::Result<()> @@ -664,7 +664,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn FileEncryptionStatusA(lpfilename : windows_core::PCSTR, lpstatus : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { FileEncryptionStatusA(lpfilename.param().abi(), core::mem::transmute(lpstatus)).ok() } + unsafe { FileEncryptionStatusA(lpfilename.param().abi(), lpstatus as _).ok() } } #[inline] pub unsafe fn FileEncryptionStatusW(lpfilename: P0, lpstatus: *mut u32) -> windows_core::Result<()> @@ -672,17 +672,17 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn FileEncryptionStatusW(lpfilename : windows_core::PCWSTR, lpstatus : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { FileEncryptionStatusW(lpfilename.param().abi(), core::mem::transmute(lpstatus)).ok() } + unsafe { FileEncryptionStatusW(lpfilename.param().abi(), lpstatus as _).ok() } } #[inline] pub unsafe fn FileTimeToLocalFileTime(lpfiletime: *const super::super::Foundation::FILETIME, lplocalfiletime: *mut super::super::Foundation::FILETIME) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn FileTimeToLocalFileTime(lpfiletime : *const super::super::Foundation:: FILETIME, lplocalfiletime : *mut super::super::Foundation:: FILETIME) -> super::super::Foundation:: BOOL); - unsafe { FileTimeToLocalFileTime(lpfiletime, core::mem::transmute(lplocalfiletime)).ok() } + unsafe { FileTimeToLocalFileTime(lpfiletime, lplocalfiletime as _).ok() } } #[inline] pub unsafe fn FindClose(hfindfile: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn FindClose(hfindfile : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - unsafe { FindClose(core::mem::transmute(hfindfile)).ok() } + unsafe { FindClose(hfindfile as _).ok() } } #[inline] pub unsafe fn FindCloseChangeNotification(hchangehandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -713,7 +713,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn FindFirstFileA(lpfilename : windows_core::PCSTR, lpfindfiledata : *mut WIN32_FIND_DATAA) -> super::super::Foundation:: HANDLE); - let result__ = unsafe { FindFirstFileA(lpfilename.param().abi(), core::mem::transmute(lpfindfiledata)) }; + let result__ = unsafe { FindFirstFileA(lpfilename.param().abi(), lpfindfiledata as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -722,7 +722,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__ = unsafe { FindFirstFileExA(lpfilename.param().abi(), finfolevelid, core::mem::transmute(lpfindfiledata), fsearchop, core::mem::transmute(lpsearchfilter.unwrap_or(core::mem::zeroed())), dwadditionalflags) }; + let result__ = unsafe { FindFirstFileExA(lpfilename.param().abi(), finfolevelid, lpfindfiledata as _, fsearchop, lpsearchfilter.unwrap_or(core::mem::zeroed()) as _, dwadditionalflags) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -731,7 +731,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); - unsafe { FindFirstFileExFromAppW(lpfilename.param().abi(), finfolevelid, core::mem::transmute(lpfindfiledata), fsearchop, core::mem::transmute(lpsearchfilter.unwrap_or(core::mem::zeroed())), dwadditionalflags) } + unsafe { FindFirstFileExFromAppW(lpfilename.param().abi(), finfolevelid, lpfindfiledata as _, fsearchop, lpsearchfilter.unwrap_or(core::mem::zeroed()) as _, 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 @@ -739,7 +739,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn FindFirstFileExW(lpfilename : windows_core::PCWSTR, finfolevelid : FINDEX_INFO_LEVELS, lpfindfiledata : *mut core::ffi::c_void, fsearchop : FINDEX_SEARCH_OPS, lpsearchfilter : *const core::ffi::c_void, dwadditionalflags : FIND_FIRST_EX_FLAGS) -> super::super::Foundation:: HANDLE); - let result__ = unsafe { FindFirstFileExW(lpfilename.param().abi(), finfolevelid, core::mem::transmute(lpfindfiledata), fsearchop, core::mem::transmute(lpsearchfilter.unwrap_or(core::mem::zeroed())), dwadditionalflags) }; + let result__ = unsafe { FindFirstFileExW(lpfilename.param().abi(), finfolevelid, lpfindfiledata as _, fsearchop, lpsearchfilter.unwrap_or(core::mem::zeroed()) as _, dwadditionalflags) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -748,7 +748,7 @@ where P0: 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__ = unsafe { FindFirstFileNameTransactedW(lpfilename.param().abi(), dwflags, core::mem::transmute(stringlength), core::mem::transmute(linkname), core::mem::transmute(htransaction.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { FindFirstFileNameTransactedW(lpfilename.param().abi(), dwflags, stringlength as _, core::mem::transmute(linkname), htransaction.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -757,7 +757,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn FindFirstFileNameW(lpfilename : windows_core::PCWSTR, dwflags : u32, stringlength : *mut u32, linkname : windows_core::PWSTR) -> super::super::Foundation:: HANDLE); - let result__ = unsafe { FindFirstFileNameW(lpfilename.param().abi(), dwflags, core::mem::transmute(stringlength), core::mem::transmute(linkname)) }; + let result__ = unsafe { FindFirstFileNameW(lpfilename.param().abi(), dwflags, stringlength as _, core::mem::transmute(linkname)) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -766,7 +766,7 @@ where P0: 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__ = unsafe { FindFirstFileTransactedA(lpfilename.param().abi(), finfolevelid, core::mem::transmute(lpfindfiledata), fsearchop, core::mem::transmute(lpsearchfilter.unwrap_or(core::mem::zeroed())), dwadditionalflags, htransaction) }; + let result__ = unsafe { FindFirstFileTransactedA(lpfilename.param().abi(), finfolevelid, lpfindfiledata as _, fsearchop, lpsearchfilter.unwrap_or(core::mem::zeroed()) as _, dwadditionalflags, htransaction) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -775,7 +775,7 @@ where P0: 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__ = unsafe { FindFirstFileTransactedW(lpfilename.param().abi(), finfolevelid, core::mem::transmute(lpfindfiledata), fsearchop, core::mem::transmute(lpsearchfilter.unwrap_or(core::mem::zeroed())), dwadditionalflags, htransaction) }; + let result__ = unsafe { FindFirstFileTransactedW(lpfilename.param().abi(), finfolevelid, lpfindfiledata as _, fsearchop, lpsearchfilter.unwrap_or(core::mem::zeroed()) as _, dwadditionalflags, htransaction) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -784,7 +784,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn FindFirstFileW(lpfilename : windows_core::PCWSTR, lpfindfiledata : *mut WIN32_FIND_DATAW) -> super::super::Foundation:: HANDLE); - let result__ = unsafe { FindFirstFileW(lpfilename.param().abi(), core::mem::transmute(lpfindfiledata)) }; + let result__ = unsafe { FindFirstFileW(lpfilename.param().abi(), lpfindfiledata as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -793,7 +793,7 @@ where P0: 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__ = unsafe { FindFirstStreamTransactedW(lpfilename.param().abi(), infolevel, core::mem::transmute(lpfindstreamdata), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), htransaction) }; + let result__ = unsafe { FindFirstStreamTransactedW(lpfilename.param().abi(), infolevel, lpfindstreamdata as _, dwflags.unwrap_or(core::mem::zeroed()) as _, htransaction) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -802,7 +802,7 @@ 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__ = unsafe { FindFirstStreamW(lpfilename.param().abi(), infolevel, core::mem::transmute(lpfindstreamdata), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { FindFirstStreamW(lpfilename.param().abi(), infolevel, lpfindstreamdata as _, dwflags.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -843,27 +843,27 @@ pub unsafe fn FindNextChangeNotification(hchangehandle: super::super::Foundation #[inline] 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); - unsafe { FindNextFileA(hfindfile, core::mem::transmute(lpfindfiledata)).ok() } + unsafe { FindNextFileA(hfindfile, lpfindfiledata as _).ok() } } #[inline] 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); - unsafe { FindNextFileNameW(hfindstream, core::mem::transmute(stringlength), core::mem::transmute(linkname)).ok() } + unsafe { FindNextFileNameW(hfindstream, stringlength as _, core::mem::transmute(linkname)).ok() } } #[inline] 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); - unsafe { FindNextFileW(hfindfile, core::mem::transmute(lpfindfiledata)).ok() } + unsafe { FindNextFileW(hfindfile, lpfindfiledata as _).ok() } } #[inline] 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); - unsafe { FindNextStreamW(hfindstream, core::mem::transmute(lpfindstreamdata)).ok() } + unsafe { FindNextStreamW(hfindstream, lpfindstreamdata as _).ok() } } #[inline] pub unsafe fn FindNextVolumeA(hfindvolume: super::super::Foundation::HANDLE, lpszvolumename: &mut [u8]) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn FindNextVolumeA(hfindvolume : super::super::Foundation:: HANDLE, lpszvolumename : windows_core::PSTR, cchbufferlength : u32) -> super::super::Foundation:: BOOL); - unsafe { FindNextVolumeA(core::mem::transmute(hfindvolume), core::mem::transmute(lpszvolumename.as_ptr()), lpszvolumename.len().try_into().unwrap()).ok() } + unsafe { FindNextVolumeA(hfindvolume as _, core::mem::transmute(lpszvolumename.as_ptr()), lpszvolumename.len().try_into().unwrap()).ok() } } #[inline] pub unsafe fn FindNextVolumeMountPointA(hfindvolumemountpoint: super::super::Foundation::HANDLE, lpszvolumemountpoint: &mut [u8]) -> windows_core::Result<()> { @@ -878,7 +878,7 @@ pub unsafe fn FindNextVolumeMountPointW(hfindvolumemountpoint: super::super::Fou #[inline] pub unsafe fn FindNextVolumeW(hfindvolume: super::super::Foundation::HANDLE, lpszvolumename: &mut [u16]) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn FindNextVolumeW(hfindvolume : super::super::Foundation:: HANDLE, lpszvolumename : windows_core::PWSTR, cchbufferlength : u32) -> super::super::Foundation:: BOOL); - unsafe { FindNextVolumeW(core::mem::transmute(hfindvolume), core::mem::transmute(lpszvolumename.as_ptr()), lpszvolumename.len().try_into().unwrap()).ok() } + unsafe { FindNextVolumeW(hfindvolume as _, core::mem::transmute(lpszvolumename.as_ptr()), lpszvolumename.len().try_into().unwrap()).ok() } } #[inline] pub unsafe fn FindVolumeClose(hfindvolume: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -899,13 +899,13 @@ pub unsafe fn FlushFileBuffers(hfile: super::super::Foundation::HANDLE) -> windo #[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); - unsafe { FlushLogBuffers(pvmarshal, core::mem::transmute(poverlapped.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { FlushLogBuffers(pvmarshal, poverlapped.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_IO")] #[inline] pub unsafe fn FlushLogToLsn(pvmarshalcontext: *mut core::ffi::c_void, plsnflush: *mut CLS_LSN, plsnlastflushed: *mut CLS_LSN, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn FlushLogToLsn(pvmarshalcontext : *mut core::ffi::c_void, plsnflush : *mut CLS_LSN, plsnlastflushed : *mut CLS_LSN, poverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - unsafe { FlushLogToLsn(core::mem::transmute(pvmarshalcontext), core::mem::transmute(plsnflush), core::mem::transmute(plsnlastflushed), core::mem::transmute(poverlapped)).ok() } + unsafe { FlushLogToLsn(pvmarshalcontext as _, plsnflush as _, plsnlastflushed as _, poverlapped as _).ok() } } #[inline] pub unsafe fn FreeEncryptedFileMetadata(pbmetadata: *const u8) { @@ -921,7 +921,7 @@ pub unsafe fn FreeEncryptionCertificateHashList(pusers: *const ENCRYPTION_CERTIF #[inline] pub unsafe fn FreeReservedLog(pvmarshal: *mut core::ffi::c_void, creservedrecords: u32, pcbadjustment: *mut i64) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn FreeReservedLog(pvmarshal : *mut core::ffi::c_void, creservedrecords : u32, pcbadjustment : *mut i64) -> super::super::Foundation:: BOOL); - unsafe { FreeReservedLog(core::mem::transmute(pvmarshal), creservedrecords, core::mem::transmute(pcbadjustment)).ok() } + unsafe { FreeReservedLog(pvmarshal as _, creservedrecords, pcbadjustment as _).ok() } } #[inline] pub unsafe fn GetBinaryTypeA(lpapplicationname: P0, lpbinarytype: *mut u32) -> windows_core::Result<()> @@ -929,7 +929,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetBinaryTypeA(lpapplicationname : windows_core::PCSTR, lpbinarytype : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetBinaryTypeA(lpapplicationname.param().abi(), core::mem::transmute(lpbinarytype)).ok() } + unsafe { GetBinaryTypeA(lpapplicationname.param().abi(), lpbinarytype as _).ok() } } #[inline] pub unsafe fn GetBinaryTypeW(lpapplicationname: P0, lpbinarytype: *mut u32) -> windows_core::Result<()> @@ -937,7 +937,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetBinaryTypeW(lpapplicationname : windows_core::PCWSTR, lpbinarytype : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetBinaryTypeW(lpapplicationname.param().abi(), core::mem::transmute(lpbinarytype)).ok() } + unsafe { GetBinaryTypeW(lpapplicationname.param().abi(), lpbinarytype as _).ok() } } #[inline] pub unsafe fn GetCompressedFileSizeA(lpfilename: P0, lpfilesizehigh: Option<*mut u32>) -> u32 @@ -945,7 +945,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetCompressedFileSizeA(lpfilename : windows_core::PCSTR, lpfilesizehigh : *mut u32) -> u32); - unsafe { GetCompressedFileSizeA(lpfilename.param().abi(), core::mem::transmute(lpfilesizehigh.unwrap_or(core::mem::zeroed()))) } + unsafe { GetCompressedFileSizeA(lpfilename.param().abi(), lpfilesizehigh.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GetCompressedFileSizeTransactedA(lpfilename: P0, lpfilesizehigh: Option<*mut u32>, htransaction: super::super::Foundation::HANDLE) -> u32 @@ -953,7 +953,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetCompressedFileSizeTransactedA(lpfilename : windows_core::PCSTR, lpfilesizehigh : *mut u32, htransaction : super::super::Foundation:: HANDLE) -> u32); - unsafe { GetCompressedFileSizeTransactedA(lpfilename.param().abi(), core::mem::transmute(lpfilesizehigh.unwrap_or(core::mem::zeroed())), htransaction) } + unsafe { GetCompressedFileSizeTransactedA(lpfilename.param().abi(), lpfilesizehigh.unwrap_or(core::mem::zeroed()) as _, htransaction) } } #[inline] pub unsafe fn GetCompressedFileSizeTransactedW(lpfilename: P0, lpfilesizehigh: Option<*mut u32>, htransaction: super::super::Foundation::HANDLE) -> u32 @@ -961,7 +961,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetCompressedFileSizeTransactedW(lpfilename : windows_core::PCWSTR, lpfilesizehigh : *mut u32, htransaction : super::super::Foundation:: HANDLE) -> u32); - unsafe { GetCompressedFileSizeTransactedW(lpfilename.param().abi(), core::mem::transmute(lpfilesizehigh.unwrap_or(core::mem::zeroed())), htransaction) } + unsafe { GetCompressedFileSizeTransactedW(lpfilename.param().abi(), lpfilesizehigh.unwrap_or(core::mem::zeroed()) as _, htransaction) } } #[inline] pub unsafe fn GetCompressedFileSizeW(lpfilename: P0, lpfilesizehigh: Option<*mut u32>) -> u32 @@ -969,12 +969,12 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetCompressedFileSizeW(lpfilename : windows_core::PCWSTR, lpfilesizehigh : *mut u32) -> u32); - unsafe { GetCompressedFileSizeW(lpfilename.param().abi(), core::mem::transmute(lpfilesizehigh.unwrap_or(core::mem::zeroed()))) } + unsafe { GetCompressedFileSizeW(lpfilename.param().abi(), lpfilesizehigh.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { GetCurrentClockTransactionManager(transactionmanagerhandle, core::mem::transmute(tmvirtualclock)).ok() } + unsafe { GetCurrentClockTransactionManager(transactionmanagerhandle, tmvirtualclock as _).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<()> @@ -982,7 +982,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); - unsafe { 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() } + unsafe { GetDiskFreeSpaceA(lprootpathname.param().abi(), lpsectorspercluster.unwrap_or(core::mem::zeroed()) as _, lpbytespersector.unwrap_or(core::mem::zeroed()) as _, lpnumberoffreeclusters.unwrap_or(core::mem::zeroed()) as _, lptotalnumberofclusters.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn GetDiskFreeSpaceExA(lpdirectoryname: P0, lpfreebytesavailabletocaller: Option<*mut u64>, lptotalnumberofbytes: Option<*mut u64>, lptotalnumberoffreebytes: Option<*mut u64>) -> windows_core::Result<()> @@ -990,7 +990,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); - unsafe { 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() } + unsafe { GetDiskFreeSpaceExA(lpdirectoryname.param().abi(), lpfreebytesavailabletocaller.unwrap_or(core::mem::zeroed()) as _, lptotalnumberofbytes.unwrap_or(core::mem::zeroed()) as _, lptotalnumberoffreebytes.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn GetDiskFreeSpaceExW(lpdirectoryname: P0, lpfreebytesavailabletocaller: Option<*mut u64>, lptotalnumberofbytes: Option<*mut u64>, lptotalnumberoffreebytes: Option<*mut u64>) -> windows_core::Result<()> @@ -998,7 +998,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); - unsafe { 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() } + unsafe { GetDiskFreeSpaceExW(lpdirectoryname.param().abi(), lpfreebytesavailabletocaller.unwrap_or(core::mem::zeroed()) as _, lptotalnumberofbytes.unwrap_or(core::mem::zeroed()) as _, lptotalnumberoffreebytes.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -1006,7 +1006,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); - unsafe { 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() } + unsafe { GetDiskFreeSpaceW(lprootpathname.param().abi(), lpsectorspercluster.unwrap_or(core::mem::zeroed()) as _, lpbytespersector.unwrap_or(core::mem::zeroed()) as _, lpnumberoffreeclusters.unwrap_or(core::mem::zeroed()) as _, lptotalnumberofclusters.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn GetDiskSpaceInformationA(rootpath: P0, diskspaceinfo: *mut DISK_SPACE_INFORMATION) -> windows_core::Result<()> @@ -1014,7 +1014,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetDiskSpaceInformationA(rootpath : windows_core::PCSTR, diskspaceinfo : *mut DISK_SPACE_INFORMATION) -> windows_core::HRESULT); - unsafe { GetDiskSpaceInformationA(rootpath.param().abi(), core::mem::transmute(diskspaceinfo)).ok() } + unsafe { GetDiskSpaceInformationA(rootpath.param().abi(), diskspaceinfo as _).ok() } } #[inline] pub unsafe fn GetDiskSpaceInformationW(rootpath: P0, diskspaceinfo: *mut DISK_SPACE_INFORMATION) -> windows_core::Result<()> @@ -1022,7 +1022,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetDiskSpaceInformationW(rootpath : windows_core::PCWSTR, diskspaceinfo : *mut DISK_SPACE_INFORMATION) -> windows_core::HRESULT); - unsafe { GetDiskSpaceInformationW(rootpath.param().abi(), core::mem::transmute(diskspaceinfo)).ok() } + unsafe { GetDiskSpaceInformationW(rootpath.param().abi(), diskspaceinfo as _).ok() } } #[inline] pub unsafe fn GetDriveTypeA(lprootpathname: P0) -> u32 @@ -1046,17 +1046,17 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn GetEncryptedFileMetadata(lpfilename : windows_core::PCWSTR, pcbmetadata : *mut u32, ppbmetadata : *mut *mut u8) -> u32); - unsafe { GetEncryptedFileMetadata(lpfilename.param().abi(), core::mem::transmute(pcbmetadata), core::mem::transmute(ppbmetadata)) } + unsafe { GetEncryptedFileMetadata(lpfilename.param().abi(), pcbmetadata as _, ppbmetadata as _) } } #[inline] 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); - unsafe { GetEnlistmentId(enlistmenthandle, core::mem::transmute(enlistmentid)).ok() } + unsafe { GetEnlistmentId(enlistmenthandle, enlistmentid as _).ok() } } #[inline] 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); - unsafe { GetEnlistmentRecoveryInformation(enlistmenthandle, buffersize, core::mem::transmute(buffer), core::mem::transmute(bufferused)).ok() } + unsafe { GetEnlistmentRecoveryInformation(enlistmenthandle, buffersize, buffer as _, bufferused as _).ok() } } #[inline] pub unsafe fn GetExpandedNameA(lpszsource: P0, lpszbuffer: &mut [u8; 260]) -> i32 @@ -1088,7 +1088,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetFileAttributesExA(lpfilename : windows_core::PCSTR, finfolevelid : GET_FILEEX_INFO_LEVELS, lpfileinformation : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { GetFileAttributesExA(lpfilename.param().abi(), finfolevelid, core::mem::transmute(lpfileinformation)).ok() } + unsafe { GetFileAttributesExA(lpfilename.param().abi(), finfolevelid, lpfileinformation as _).ok() } } #[inline] pub unsafe fn GetFileAttributesExFromAppW(lpfilename: P0, finfolevelid: GET_FILEEX_INFO_LEVELS, lpfileinformation: *mut core::ffi::c_void) -> super::super::Foundation::BOOL @@ -1096,7 +1096,7 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-core-file-fromapp-l1-1-0.dll" "system" fn GetFileAttributesExFromAppW(lpfilename : windows_core::PCWSTR, finfolevelid : GET_FILEEX_INFO_LEVELS, lpfileinformation : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { GetFileAttributesExFromAppW(lpfilename.param().abi(), finfolevelid, core::mem::transmute(lpfileinformation)) } + unsafe { GetFileAttributesExFromAppW(lpfilename.param().abi(), finfolevelid, lpfileinformation as _) } } #[inline] pub unsafe fn GetFileAttributesExW(lpfilename: P0, finfolevelid: GET_FILEEX_INFO_LEVELS, lpfileinformation: *mut core::ffi::c_void) -> windows_core::Result<()> @@ -1104,7 +1104,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetFileAttributesExW(lpfilename : windows_core::PCWSTR, finfolevelid : GET_FILEEX_INFO_LEVELS, lpfileinformation : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { GetFileAttributesExW(lpfilename.param().abi(), finfolevelid, core::mem::transmute(lpfileinformation)).ok() } + unsafe { GetFileAttributesExW(lpfilename.param().abi(), finfolevelid, lpfileinformation as _).ok() } } #[inline] 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<()> @@ -1112,7 +1112,7 @@ where P0: 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); - unsafe { GetFileAttributesTransactedA(lpfilename.param().abi(), finfolevelid, core::mem::transmute(lpfileinformation), htransaction).ok() } + unsafe { GetFileAttributesTransactedA(lpfilename.param().abi(), finfolevelid, lpfileinformation as _, htransaction).ok() } } #[inline] 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<()> @@ -1120,7 +1120,7 @@ where P0: 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); - unsafe { GetFileAttributesTransactedW(lpfilename.param().abi(), finfolevelid, core::mem::transmute(lpfileinformation), htransaction).ok() } + unsafe { GetFileAttributesTransactedW(lpfilename.param().abi(), finfolevelid, lpfileinformation as _, htransaction).ok() } } #[inline] pub unsafe fn GetFileAttributesW(lpfilename: P0) -> u32 @@ -1133,32 +1133,32 @@ where #[inline] 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); - unsafe { GetFileBandwidthReservation(hfile, core::mem::transmute(lpperiodmilliseconds), core::mem::transmute(lpbytesperperiod), core::mem::transmute(pdiscardable), core::mem::transmute(lptransfersize), core::mem::transmute(lpnumoutstandingrequests)).ok() } + unsafe { GetFileBandwidthReservation(hfile, lpperiodmilliseconds as _, lpbytesperperiod as _, pdiscardable as _, lptransfersize as _, lpnumoutstandingrequests as _).ok() } } #[inline] 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); - unsafe { GetFileInformationByHandle(hfile, core::mem::transmute(lpfileinformation)).ok() } + unsafe { GetFileInformationByHandle(hfile, lpfileinformation as _).ok() } } #[inline] 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); - unsafe { GetFileInformationByHandleEx(hfile, fileinformationclass, core::mem::transmute(lpfileinformation), dwbuffersize).ok() } + unsafe { GetFileInformationByHandleEx(hfile, fileinformationclass, lpfileinformation as _, dwbuffersize).ok() } } #[inline] 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); - unsafe { GetFileSize(hfile, core::mem::transmute(lpfilesizehigh.unwrap_or(core::mem::zeroed()))) } + unsafe { GetFileSize(hfile, lpfilesizehigh.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { GetFileSizeEx(hfile, core::mem::transmute(lpfilesize)).ok() } + unsafe { GetFileSizeEx(hfile, lpfilesize as _).ok() } } #[inline] 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); - unsafe { GetFileTime(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() } + unsafe { GetFileTime(hfile, lpcreationtime.unwrap_or(core::mem::zeroed()) as _, lplastaccesstime.unwrap_or(core::mem::zeroed()) as _, lplastwritetime.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn GetFileType(hfile: super::super::Foundation::HANDLE) -> FILE_TYPE { @@ -1171,7 +1171,7 @@ 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); - unsafe { GetFileVersionInfoA(lptstrfilename.param().abi(), core::mem::transmute(dwhandle.unwrap_or(core::mem::zeroed())), dwlen, core::mem::transmute(lpdata)).ok() } + unsafe { GetFileVersionInfoA(lptstrfilename.param().abi(), dwhandle.unwrap_or(core::mem::zeroed()) as _, dwlen, lpdata as _).ok() } } #[inline] 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<()> @@ -1179,7 +1179,7 @@ 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); - unsafe { GetFileVersionInfoExA(dwflags, lpwstrfilename.param().abi(), core::mem::transmute(dwhandle.unwrap_or(core::mem::zeroed())), dwlen, core::mem::transmute(lpdata)).ok() } + unsafe { GetFileVersionInfoExA(dwflags, lpwstrfilename.param().abi(), dwhandle.unwrap_or(core::mem::zeroed()) as _, dwlen, lpdata as _).ok() } } #[inline] 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<()> @@ -1187,7 +1187,7 @@ 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); - unsafe { GetFileVersionInfoExW(dwflags, lpwstrfilename.param().abi(), core::mem::transmute(dwhandle.unwrap_or(core::mem::zeroed())), dwlen, core::mem::transmute(lpdata)).ok() } + unsafe { GetFileVersionInfoExW(dwflags, lpwstrfilename.param().abi(), dwhandle.unwrap_or(core::mem::zeroed()) as _, dwlen, lpdata as _).ok() } } #[inline] pub unsafe fn GetFileVersionInfoSizeA(lptstrfilename: P0, lpdwhandle: Option<*mut u32>) -> u32 @@ -1195,7 +1195,7 @@ where P0: windows_core::Param, { windows_targets::link!("version.dll" "system" fn GetFileVersionInfoSizeA(lptstrfilename : windows_core::PCSTR, lpdwhandle : *mut u32) -> u32); - unsafe { GetFileVersionInfoSizeA(lptstrfilename.param().abi(), core::mem::transmute(lpdwhandle.unwrap_or(core::mem::zeroed()))) } + unsafe { GetFileVersionInfoSizeA(lptstrfilename.param().abi(), lpdwhandle.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GetFileVersionInfoSizeExA(dwflags: GET_FILE_VERSION_INFO_FLAGS, lpwstrfilename: P1, lpdwhandle: *mut u32) -> u32 @@ -1203,7 +1203,7 @@ where P1: windows_core::Param, { windows_targets::link!("version.dll" "system" fn GetFileVersionInfoSizeExA(dwflags : GET_FILE_VERSION_INFO_FLAGS, lpwstrfilename : windows_core::PCSTR, lpdwhandle : *mut u32) -> u32); - unsafe { GetFileVersionInfoSizeExA(dwflags, lpwstrfilename.param().abi(), core::mem::transmute(lpdwhandle)) } + unsafe { GetFileVersionInfoSizeExA(dwflags, lpwstrfilename.param().abi(), lpdwhandle as _) } } #[inline] pub unsafe fn GetFileVersionInfoSizeExW(dwflags: GET_FILE_VERSION_INFO_FLAGS, lpwstrfilename: P1, lpdwhandle: *mut u32) -> u32 @@ -1211,7 +1211,7 @@ where P1: windows_core::Param, { windows_targets::link!("version.dll" "system" fn GetFileVersionInfoSizeExW(dwflags : GET_FILE_VERSION_INFO_FLAGS, lpwstrfilename : windows_core::PCWSTR, lpdwhandle : *mut u32) -> u32); - unsafe { GetFileVersionInfoSizeExW(dwflags, lpwstrfilename.param().abi(), core::mem::transmute(lpdwhandle)) } + unsafe { GetFileVersionInfoSizeExW(dwflags, lpwstrfilename.param().abi(), lpdwhandle as _) } } #[inline] pub unsafe fn GetFileVersionInfoSizeW(lptstrfilename: P0, lpdwhandle: Option<*mut u32>) -> u32 @@ -1219,7 +1219,7 @@ where P0: windows_core::Param, { windows_targets::link!("version.dll" "system" fn GetFileVersionInfoSizeW(lptstrfilename : windows_core::PCWSTR, lpdwhandle : *mut u32) -> u32); - unsafe { GetFileVersionInfoSizeW(lptstrfilename.param().abi(), core::mem::transmute(lpdwhandle.unwrap_or(core::mem::zeroed()))) } + unsafe { GetFileVersionInfoSizeW(lptstrfilename.param().abi(), lpdwhandle.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GetFileVersionInfoW(lptstrfilename: P0, dwhandle: Option, dwlen: u32, lpdata: *mut core::ffi::c_void) -> windows_core::Result<()> @@ -1227,7 +1227,7 @@ 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); - unsafe { GetFileVersionInfoW(lptstrfilename.param().abi(), core::mem::transmute(dwhandle.unwrap_or(core::mem::zeroed())), dwlen, core::mem::transmute(lpdata)).ok() } + unsafe { GetFileVersionInfoW(lptstrfilename.param().abi(), dwhandle.unwrap_or(core::mem::zeroed()) as _, dwlen, lpdata as _).ok() } } #[inline] pub unsafe fn GetFinalPathNameByHandleA(hfile: super::super::Foundation::HANDLE, lpszfilepath: &mut [u8], dwflags: GETFINALPATHNAMEBYHANDLE_FLAGS) -> u32 { @@ -1245,7 +1245,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetFullPathNameA(lpfilename : windows_core::PCSTR, nbufferlength : u32, lpbuffer : windows_core::PSTR, lpfilepart : *mut windows_core::PSTR) -> u32); - unsafe { 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()))) } + unsafe { 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())), lpfilepart.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GetFullPathNameTransactedA(lpfilename: P0, lpbuffer: Option<&mut [u8]>, lpfilepart: Option<*mut windows_core::PSTR>, htransaction: super::super::Foundation::HANDLE) -> u32 @@ -1253,7 +1253,7 @@ where P0: 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); - unsafe { 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())), htransaction) } + unsafe { 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())), lpfilepart.unwrap_or(core::mem::zeroed()) as _, htransaction) } } #[inline] pub unsafe fn GetFullPathNameTransactedW(lpfilename: P0, lpbuffer: Option<&mut [u16]>, lpfilepart: Option<*mut windows_core::PWSTR>, htransaction: super::super::Foundation::HANDLE) -> u32 @@ -1261,7 +1261,7 @@ where P0: 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); - unsafe { 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())), htransaction) } + unsafe { 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())), lpfilepart.unwrap_or(core::mem::zeroed()) as _, htransaction) } } #[inline] pub unsafe fn GetFullPathNameW(lpfilename: P0, lpbuffer: Option<&mut [u16]>, lpfilepart: Option<*mut windows_core::PWSTR>) -> u32 @@ -1269,12 +1269,12 @@ 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); - unsafe { 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()))) } + unsafe { 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())), lpfilepart.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { GetIoRingInfo(ioring, core::mem::transmute(info)).ok() } + unsafe { GetIoRingInfo(ioring, info as _).ok() } } #[inline] pub unsafe fn GetLogContainerName(hlog: super::super::Foundation::HANDLE, cidlogicalcontainer: u32, pwstrcontainername: P2, clencontainername: u32, pcactuallencontainername: *mut u32) -> windows_core::Result<()> @@ -1282,22 +1282,22 @@ where 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); - unsafe { GetLogContainerName(hlog, cidlogicalcontainer, pwstrcontainername.param().abi(), clencontainername, core::mem::transmute(pcactuallencontainername)).ok() } + unsafe { GetLogContainerName(hlog, cidlogicalcontainer, pwstrcontainername.param().abi(), clencontainername, pcactuallencontainername as _).ok() } } #[inline] 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); - unsafe { GetLogFileInformation(hlog, core::mem::transmute(pinfobuffer), core::mem::transmute(cbbuffer)).ok() } + unsafe { GetLogFileInformation(hlog, pinfobuffer as _, cbbuffer as _).ok() } } #[inline] 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); - unsafe { GetLogIoStatistics(hlog, core::mem::transmute(pvstatsbuffer), cbstatsbuffer, estatsclass, core::mem::transmute(pcbstatswritten)).ok() } + unsafe { GetLogIoStatistics(hlog, pvstatsbuffer as _, cbstatsbuffer, estatsclass, pcbstatswritten as _).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 { windows_targets::link!("clfsw32.dll" "system" fn GetLogReservationInfo(pvmarshal : *const core::ffi::c_void, pcbrecordnumber : *mut u32, pcbuserreservation : *mut i64, pcbcommitreservation : *mut i64) -> super::super::Foundation:: BOOL); - unsafe { GetLogReservationInfo(pvmarshal, core::mem::transmute(pcbrecordnumber), core::mem::transmute(pcbuserreservation), core::mem::transmute(pcbcommitreservation)) } + unsafe { GetLogReservationInfo(pvmarshal, pcbrecordnumber as _, pcbuserreservation as _, pcbcommitreservation as _) } } #[inline] pub unsafe fn GetLogicalDriveStringsA(lpbuffer: Option<&mut [u8]>) -> u32 { @@ -1349,18 +1349,18 @@ where #[inline] pub unsafe fn GetNextLogArchiveExtent(pvarchivecontext: *mut core::ffi::c_void, rgadextent: *mut CLS_ARCHIVE_DESCRIPTOR, cdescriptors: u32, pcdescriptorsreturned: *mut u32) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn GetNextLogArchiveExtent(pvarchivecontext : *mut core::ffi::c_void, rgadextent : *mut CLS_ARCHIVE_DESCRIPTOR, cdescriptors : u32, pcdescriptorsreturned : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetNextLogArchiveExtent(core::mem::transmute(pvarchivecontext), core::mem::transmute(rgadextent), cdescriptors, core::mem::transmute(pcdescriptorsreturned)).ok() } + unsafe { GetNextLogArchiveExtent(pvarchivecontext as _, rgadextent as _, cdescriptors, pcdescriptorsreturned as _).ok() } } #[inline] 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); - unsafe { GetNotificationResourceManager(resourcemanagerhandle, core::mem::transmute(transactionnotification), notificationlength, dwmilliseconds, core::mem::transmute(returnlength)).ok() } + unsafe { GetNotificationResourceManager(resourcemanagerhandle, transactionnotification as _, notificationlength, dwmilliseconds, returnlength as _).ok() } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { GetNotificationResourceManagerAsync(resourcemanagerhandle, core::mem::transmute(transactionnotification), transactionnotificationlength, core::mem::transmute(returnlength), core::mem::transmute(lpoverlapped)).ok() } + unsafe { GetNotificationResourceManagerAsync(resourcemanagerhandle, transactionnotification as _, transactionnotificationlength, returnlength as _, lpoverlapped as _).ok() } } #[inline] pub unsafe fn GetShortPathNameA(lpszlongpath: P0, lpszshortpath: Option<&mut [u8]>) -> u32 @@ -1381,12 +1381,12 @@ where #[inline] 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); - unsafe { GetTapeParameters(hdevice, dwoperation, core::mem::transmute(lpdwsize), core::mem::transmute(lptapeinformation)) } + unsafe { GetTapeParameters(hdevice, dwoperation, lpdwsize as _, lptapeinformation as _) } } #[inline] 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); - unsafe { GetTapePosition(hdevice, dwpositiontype, core::mem::transmute(lpdwpartition), core::mem::transmute(lpdwoffsetlow), core::mem::transmute(lpdwoffsethigh)) } + unsafe { GetTapePosition(hdevice, dwpositiontype, lpdwpartition as _, lpdwoffsetlow as _, lpdwoffsethigh as _) } } #[inline] pub unsafe fn GetTapeStatus(hdevice: super::super::Foundation::HANDLE) -> u32 { @@ -1434,17 +1434,17 @@ pub unsafe fn GetTempPathW(lpbuffer: Option<&mut [u16]>) -> u32 { #[inline] 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); - unsafe { GetTransactionId(transactionhandle, core::mem::transmute(transactionid)).ok() } + unsafe { GetTransactionId(transactionhandle, transactionid as _).ok() } } #[inline] 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); - unsafe { GetTransactionInformation(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() } + unsafe { GetTransactionInformation(transactionhandle, outcome as _, isolationlevel as _, isolationflags as _, timeout as _, 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: 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); - unsafe { GetTransactionManagerId(transactionmanagerhandle, core::mem::transmute(transactionmanagerid)).ok() } + unsafe { GetTransactionManagerId(transactionmanagerhandle, transactionmanagerid as _).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<()> @@ -1457,9 +1457,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::mem::zeroed())), - core::mem::transmute(lpmaximumcomponentlength.unwrap_or(core::mem::zeroed())), - core::mem::transmute(lpfilesystemflags.unwrap_or(core::mem::zeroed())), + lpvolumeserialnumber.unwrap_or(core::mem::zeroed()) as _, + lpmaximumcomponentlength.unwrap_or(core::mem::zeroed()) as _, + lpfilesystemflags.unwrap_or(core::mem::zeroed()) as _, 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()), ) @@ -1474,9 +1474,9 @@ pub unsafe fn GetVolumeInformationByHandleW(hfile: super::super::Foundation::HAN 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::mem::zeroed())), - core::mem::transmute(lpmaximumcomponentlength.unwrap_or(core::mem::zeroed())), - core::mem::transmute(lpfilesystemflags.unwrap_or(core::mem::zeroed())), + lpvolumeserialnumber.unwrap_or(core::mem::zeroed()) as _, + lpmaximumcomponentlength.unwrap_or(core::mem::zeroed()) as _, + lpfilesystemflags.unwrap_or(core::mem::zeroed()) as _, 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()), ) @@ -1494,9 +1494,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::mem::zeroed())), - core::mem::transmute(lpmaximumcomponentlength.unwrap_or(core::mem::zeroed())), - core::mem::transmute(lpfilesystemflags.unwrap_or(core::mem::zeroed())), + lpvolumeserialnumber.unwrap_or(core::mem::zeroed()) as _, + lpmaximumcomponentlength.unwrap_or(core::mem::zeroed()) as _, + lpfilesystemflags.unwrap_or(core::mem::zeroed()) as _, 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()), ) @@ -1541,7 +1541,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetVolumePathNamesForVolumeNameA(lpszvolumename : windows_core::PCSTR, lpszvolumepathnames : windows_core::PSTR, cchbufferlength : u32, lpcchreturnlength : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetVolumePathNamesForVolumeNameA(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() } + unsafe { GetVolumePathNamesForVolumeNameA(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()), lpcchreturnlength as _).ok() } } #[inline] pub unsafe fn GetVolumePathNamesForVolumeNameW(lpszvolumename: P0, lpszvolumepathnames: Option<&mut [u16]>, lpcchreturnlength: *mut u32) -> windows_core::Result<()> @@ -1549,7 +1549,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetVolumePathNamesForVolumeNameW(lpszvolumename : windows_core::PCWSTR, lpszvolumepathnames : windows_core::PWSTR, cchbufferlength : u32, lpcchreturnlength : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { 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() } + unsafe { 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()), lpcchreturnlength as _).ok() } } #[inline] pub unsafe fn HandleLogFull(hlog: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -1559,7 +1559,7 @@ pub unsafe fn HandleLogFull(hlog: super::super::Foundation::HANDLE) -> windows_c #[inline] 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); - unsafe { InstallLogPolicy(hlog, core::mem::transmute(ppolicy)).ok() } + unsafe { InstallLogPolicy(hlog, ppolicy as _).ok() } } #[inline] pub unsafe fn IsIoRingOpSupported(ioring: HIORING, op: IORING_OP_CODE) -> super::super::Foundation::BOOL { @@ -1592,7 +1592,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn LZOpenFileA(lpfilename : windows_core::PCSTR, lpreopenbuf : *mut OFSTRUCT, wstyle : LZOPENFILE_STYLE) -> i32); - unsafe { LZOpenFileA(lpfilename.param().abi(), core::mem::transmute(lpreopenbuf), wstyle) } + unsafe { LZOpenFileA(lpfilename.param().abi(), lpreopenbuf as _, wstyle) } } #[inline] pub unsafe fn LZOpenFileW(lpfilename: P0, lpreopenbuf: *mut OFSTRUCT, wstyle: LZOPENFILE_STYLE) -> i32 @@ -1600,7 +1600,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn LZOpenFileW(lpfilename : windows_core::PCWSTR, lpreopenbuf : *mut OFSTRUCT, wstyle : LZOPENFILE_STYLE) -> i32); - unsafe { LZOpenFileW(lpfilename.param().abi(), core::mem::transmute(lpreopenbuf), wstyle) } + unsafe { LZOpenFileW(lpfilename.param().abi(), lpreopenbuf as _, wstyle) } } #[inline] pub unsafe fn LZRead(hfile: i32, lpbuffer: &mut [u8]) -> i32 { @@ -1620,7 +1620,7 @@ pub unsafe fn LZStart() -> i32 { #[inline] pub unsafe fn LocalFileTimeToFileTime(lplocalfiletime: *const super::super::Foundation::FILETIME, lpfiletime: *mut super::super::Foundation::FILETIME) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn LocalFileTimeToFileTime(lplocalfiletime : *const super::super::Foundation:: FILETIME, lpfiletime : *mut super::super::Foundation:: FILETIME) -> super::super::Foundation:: BOOL); - unsafe { LocalFileTimeToFileTime(lplocalfiletime, core::mem::transmute(lpfiletime)).ok() } + unsafe { LocalFileTimeToFileTime(lplocalfiletime, lpfiletime as _).ok() } } #[inline] pub unsafe fn LockFile(hfile: super::super::Foundation::HANDLE, dwfileoffsetlow: u32, dwfileoffsethigh: u32, nnumberofbytestolocklow: u32, nnumberofbytestolockhigh: u32) -> windows_core::Result<()> { @@ -1631,7 +1631,7 @@ pub unsafe fn LockFile(hfile: super::super::Foundation::HANDLE, dwfileoffsetlow: #[inline] 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); - unsafe { LockFileEx(hfile, dwflags, core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), nnumberofbytestolocklow, nnumberofbytestolockhigh, core::mem::transmute(lpoverlapped)).ok() } + unsafe { LockFileEx(hfile, dwflags, dwreserved.unwrap_or(core::mem::zeroed()) as _, nnumberofbytestolocklow, nnumberofbytestolockhigh, lpoverlapped as _).ok() } } #[inline] pub unsafe fn LogTailAdvanceFailure(hlog: super::super::Foundation::HANDLE, dwreason: u32) -> windows_core::Result<()> { @@ -1731,7 +1731,7 @@ where P1: 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); - unsafe { 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())), dwflags, htransaction).ok() } + unsafe { MoveFileTransactedA(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), lpprogressroutine.unwrap_or(core::mem::zeroed()) as _, lpdata.unwrap_or(core::mem::zeroed()) as _, dwflags, htransaction).ok() } } #[inline] 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<()> @@ -1740,7 +1740,7 @@ where P1: 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); - unsafe { 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())), dwflags, htransaction).ok() } + unsafe { MoveFileTransactedW(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), lpprogressroutine.unwrap_or(core::mem::zeroed()) as _, lpdata.unwrap_or(core::mem::zeroed()) as _, dwflags, htransaction).ok() } } #[inline] pub unsafe fn MoveFileW(lpexistingfilename: P0, lpnewfilename: P1) -> windows_core::Result<()> @@ -1758,7 +1758,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn MoveFileWithProgressA(lpexistingfilename : windows_core::PCSTR, lpnewfilename : windows_core::PCSTR, lpprogressroutine : LPPROGRESS_ROUTINE, lpdata : *const core::ffi::c_void, dwflags : MOVE_FILE_FLAGS) -> super::super::Foundation:: BOOL); - unsafe { 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())), dwflags).ok() } + unsafe { MoveFileWithProgressA(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), lpprogressroutine.unwrap_or(core::mem::zeroed()) as _, lpdata.unwrap_or(core::mem::zeroed()) as _, dwflags).ok() } } #[inline] pub unsafe fn MoveFileWithProgressW(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: Option, lpdata: Option<*const core::ffi::c_void>, dwflags: MOVE_FILE_FLAGS) -> windows_core::Result<()> @@ -1767,7 +1767,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn MoveFileWithProgressW(lpexistingfilename : windows_core::PCWSTR, lpnewfilename : windows_core::PCWSTR, lpprogressroutine : LPPROGRESS_ROUTINE, lpdata : *const core::ffi::c_void, dwflags : MOVE_FILE_FLAGS) -> super::super::Foundation:: BOOL); - unsafe { 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())), dwflags).ok() } + unsafe { MoveFileWithProgressW(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), lpprogressroutine.unwrap_or(core::mem::zeroed()) as _, lpdata.unwrap_or(core::mem::zeroed()) as _, 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 @@ -1776,7 +1776,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); - unsafe { NetConnectionEnum(servername.param().abi(), qualifier.param().abi(), level, core::mem::transmute(bufptr), prefmaxlen, core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::mem::zeroed()))) } + unsafe { NetConnectionEnum(servername.param().abi(), qualifier.param().abi(), level, bufptr as _, prefmaxlen, entriesread as _, totalentries as _, resume_handle.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetFileClose(servername: P0, fileid: u32) -> u32 @@ -1794,7 +1794,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); - unsafe { NetFileEnum(servername.param().abi(), basepath.param().abi(), username.param().abi(), level, core::mem::transmute(bufptr), prefmaxlen, core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::mem::zeroed()))) } + unsafe { NetFileEnum(servername.param().abi(), basepath.param().abi(), username.param().abi(), level, bufptr as _, prefmaxlen, entriesread as _, totalentries as _, resume_handle.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetFileGetInfo(servername: P0, fileid: u32, level: u32, bufptr: *mut *mut u8) -> u32 @@ -1802,7 +1802,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetFileGetInfo(servername : windows_core::PCWSTR, fileid : u32, level : u32, bufptr : *mut *mut u8) -> u32); - unsafe { NetFileGetInfo(servername.param().abi(), fileid, level, core::mem::transmute(bufptr)) } + unsafe { NetFileGetInfo(servername.param().abi(), fileid, level, bufptr as _) } } #[inline] pub unsafe fn NetServerAliasAdd(servername: P0, level: u32, buf: *const u8) -> u32 @@ -1826,7 +1826,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); - unsafe { NetServerAliasEnum(servername.param().abi(), level, core::mem::transmute(bufptr), prefmaxlen, core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resumehandle.unwrap_or(core::mem::zeroed()))) } + unsafe { NetServerAliasEnum(servername.param().abi(), level, bufptr as _, prefmaxlen, entriesread as _, totalentries as _, resumehandle.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetSessionDel(servername: P0, uncclientname: P1, username: P2) -> u32 @@ -1846,7 +1846,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); - unsafe { NetSessionEnum(servername.param().abi(), uncclientname.param().abi(), username.param().abi(), level, core::mem::transmute(bufptr), prefmaxlen, core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::mem::zeroed()))) } + unsafe { NetSessionEnum(servername.param().abi(), uncclientname.param().abi(), username.param().abi(), level, bufptr as _, prefmaxlen, entriesread as _, totalentries as _, resume_handle.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetSessionGetInfo(servername: P0, uncclientname: P1, username: P2, level: u32, bufptr: *mut *mut u8) -> u32 @@ -1856,7 +1856,7 @@ where P2: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetSessionGetInfo(servername : windows_core::PCWSTR, uncclientname : windows_core::PCWSTR, username : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8) -> u32); - unsafe { NetSessionGetInfo(servername.param().abi(), uncclientname.param().abi(), username.param().abi(), level, core::mem::transmute(bufptr)) } + unsafe { NetSessionGetInfo(servername.param().abi(), uncclientname.param().abi(), username.param().abi(), level, bufptr as _) } } #[inline] pub unsafe fn NetShareAdd(servername: P0, level: u32, buf: *const u8, parm_err: Option<*mut u32>) -> u32 @@ -1864,7 +1864,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); - unsafe { NetShareAdd(servername.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(core::mem::zeroed()))) } + unsafe { NetShareAdd(servername.param().abi(), level, buf, parm_err.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetShareCheck(servername: P0, device: P1, r#type: *mut u32) -> u32 @@ -1873,7 +1873,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetShareCheck(servername : windows_core::PCWSTR, device : windows_core::PCWSTR, r#type : *mut u32) -> u32); - unsafe { NetShareCheck(servername.param().abi(), device.param().abi(), core::mem::transmute(r#type)) } + unsafe { NetShareCheck(servername.param().abi(), device.param().abi(), r#type as _) } } #[inline] pub unsafe fn NetShareDel(servername: P0, netname: P1, reserved: Option) -> u32 @@ -1882,7 +1882,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetShareDel(servername : windows_core::PCWSTR, netname : windows_core::PCWSTR, reserved : u32) -> u32); - unsafe { NetShareDel(servername.param().abi(), netname.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } + unsafe { NetShareDel(servername.param().abi(), netname.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetShareDelEx(servername: P0, level: u32, buf: *const u8) -> u32 @@ -1899,7 +1899,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetShareDelSticky(servername : windows_core::PCWSTR, netname : windows_core::PCWSTR, reserved : u32) -> u32); - unsafe { NetShareDelSticky(servername.param().abi(), netname.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } + unsafe { NetShareDelSticky(servername.param().abi(), netname.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _) } } #[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 @@ -1907,7 +1907,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); - unsafe { NetShareEnum(servername.param().abi(), level, core::mem::transmute(bufptr), prefmaxlen, core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::mem::zeroed()))) } + unsafe { NetShareEnum(servername.param().abi(), level, bufptr as _, prefmaxlen, entriesread as _, totalentries as _, resume_handle.unwrap_or(core::mem::zeroed()) as _) } } #[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 @@ -1915,7 +1915,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); - unsafe { NetShareEnumSticky(servername.param().abi(), level, core::mem::transmute(bufptr), prefmaxlen, core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::mem::zeroed()))) } + unsafe { NetShareEnumSticky(servername.param().abi(), level, bufptr as _, prefmaxlen, entriesread as _, totalentries as _, resume_handle.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetShareGetInfo(servername: P0, netname: P1, level: u32, bufptr: *mut *mut u8) -> u32 @@ -1924,7 +1924,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetShareGetInfo(servername : windows_core::PCWSTR, netname : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8) -> u32); - unsafe { NetShareGetInfo(servername.param().abi(), netname.param().abi(), level, core::mem::transmute(bufptr)) } + unsafe { NetShareGetInfo(servername.param().abi(), netname.param().abi(), level, bufptr as _) } } #[inline] pub unsafe fn NetShareSetInfo(servername: P0, netname: P1, level: u32, buf: *const u8, parm_err: Option<*mut u32>) -> u32 @@ -1933,12 +1933,12 @@ 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); - unsafe { NetShareSetInfo(servername.param().abi(), netname.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(core::mem::zeroed()))) } + unsafe { NetShareSetInfo(servername.param().abi(), netname.param().abi(), level, buf, parm_err.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn NetStatisticsGet(servername: *const i8, service: *const i8, level: u32, options: u32, buffer: *mut *mut u8) -> u32 { windows_targets::link!("netapi32.dll" "system" fn NetStatisticsGet(servername : *const i8, service : *const i8, level : u32, options : u32, buffer : *mut *mut u8) -> u32); - unsafe { NetStatisticsGet(servername, service, level, options, core::mem::transmute(buffer)) } + unsafe { NetStatisticsGet(servername, service, level, options, buffer as _) } } #[inline] pub unsafe fn OpenEncryptedFileRawA(lpfilename: P0, ulflags: u32, pvcontext: *mut *mut core::ffi::c_void) -> u32 @@ -1946,7 +1946,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn OpenEncryptedFileRawA(lpfilename : windows_core::PCSTR, ulflags : u32, pvcontext : *mut *mut core::ffi::c_void) -> u32); - unsafe { OpenEncryptedFileRawA(lpfilename.param().abi(), ulflags, core::mem::transmute(pvcontext)) } + unsafe { OpenEncryptedFileRawA(lpfilename.param().abi(), ulflags, pvcontext as _) } } #[inline] pub unsafe fn OpenEncryptedFileRawW(lpfilename: P0, ulflags: u32, pvcontext: *mut *mut core::ffi::c_void) -> u32 @@ -1954,12 +1954,12 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn OpenEncryptedFileRawW(lpfilename : windows_core::PCWSTR, ulflags : u32, pvcontext : *mut *mut core::ffi::c_void) -> u32); - unsafe { OpenEncryptedFileRawW(lpfilename.param().abi(), ulflags, core::mem::transmute(pvcontext)) } + unsafe { OpenEncryptedFileRawW(lpfilename.param().abi(), ulflags, pvcontext as _) } } #[inline] 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__ = unsafe { OpenEnlistment(dwdesiredaccess, resourcemanagerhandle, core::mem::transmute(enlistmentid)) }; + let result__ = unsafe { OpenEnlistment(dwdesiredaccess, resourcemanagerhandle, enlistmentid as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1968,25 +1968,25 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn OpenFile(lpfilename : windows_core::PCSTR, lpreopenbuff : *mut OFSTRUCT, ustyle : u32) -> i32); - unsafe { OpenFile(lpfilename.param().abi(), core::mem::transmute(lpreopenbuff), ustyle) } + unsafe { OpenFile(lpfilename.param().abi(), lpreopenbuff as _, ustyle) } } #[cfg(feature = "Win32_Security")] #[inline] 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__ = unsafe { OpenFileById(hvolumehint, lpfileid, dwdesiredaccess, dwsharemode, core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), dwflagsandattributes) }; + let result__ = unsafe { OpenFileById(hvolumehint, lpfileid, dwdesiredaccess, dwsharemode, lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _, dwflagsandattributes) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] 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__ = unsafe { OpenResourceManager(dwdesiredaccess, tmhandle, core::mem::transmute(resourcemanagerid)) }; + let result__ = unsafe { OpenResourceManager(dwdesiredaccess, tmhandle, resourcemanagerid as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] pub unsafe fn OpenTransaction(dwdesiredaccess: u32, transactionid: *mut windows_core::GUID) -> windows_core::Result { windows_targets::link!("ktmw32.dll" "system" fn OpenTransaction(dwdesiredaccess : u32, transactionid : *mut windows_core::GUID) -> super::super::Foundation:: HANDLE); - let result__ = unsafe { OpenTransaction(dwdesiredaccess, core::mem::transmute(transactionid)) }; + let result__ = unsafe { OpenTransaction(dwdesiredaccess, transactionid as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -2007,48 +2007,32 @@ pub unsafe fn OpenTransactionManagerById(transactionmanagerid: *const windows_co #[inline] 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); - unsafe { PopIoRingCompletion(ioring, core::mem::transmute(cqe)) } + unsafe { PopIoRingCompletion(ioring, cqe as _) } } #[inline] 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); - unsafe { PrePrepareComplete(enlistmenthandle, core::mem::transmute(tmvirtualclock)).ok() } + unsafe { PrePrepareComplete(enlistmenthandle, tmvirtualclock as _).ok() } } #[inline] 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); - unsafe { PrePrepareEnlistment(enlistmenthandle, core::mem::transmute(tmvirtualclock)).ok() } + unsafe { PrePrepareEnlistment(enlistmenthandle, tmvirtualclock as _).ok() } } #[inline] 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); - unsafe { PrepareComplete(enlistmenthandle, core::mem::transmute(tmvirtualclock)).ok() } + unsafe { PrepareComplete(enlistmenthandle, tmvirtualclock as _).ok() } } #[inline] 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); - unsafe { PrepareEnlistment(enlistmenthandle, core::mem::transmute(tmvirtualclock)).ok() } + unsafe { PrepareEnlistment(enlistmenthandle, tmvirtualclock as _).ok() } } #[inline] 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); - unsafe { - PrepareLogArchive( - hlog, - core::mem::transmute(pszbaselogfilename.as_ptr()), - pszbaselogfilename.len().try_into().unwrap(), - 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), - core::mem::transmute(plsnlast), - core::mem::transmute(plsncurrentarchivetail), - core::mem::transmute(ppvarchivecontext), - ) - .ok() - } + unsafe { PrepareLogArchive(hlog, core::mem::transmute(pszbaselogfilename.as_ptr()), pszbaselogfilename.len().try_into().unwrap(), plsnlow.unwrap_or(core::mem::zeroed()) as _, plsnhigh.unwrap_or(core::mem::zeroed()) as _, pcactuallength.unwrap_or(core::mem::zeroed()) as _, poffbaselogfiledata as _, pcbbaselogfilelength as _, plsnbase as _, plsnlast as _, plsncurrentarchivetail as _, ppvarchivecontext as _).ok() } } #[inline] pub unsafe fn PrepareTape(hdevice: super::super::Foundation::HANDLE, dwoperation: PREPARE_TAPE_OPERATION, bimmediate: bool) -> u32 { @@ -2082,7 +2066,7 @@ pub unsafe fn QueryIoRingCapabilities() -> windows_core::Result 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); - unsafe { QueryLogPolicy(hlog, epolicytype, core::mem::transmute(ppolicybuffer), core::mem::transmute(pcbpolicybuffer)).ok() } + unsafe { QueryLogPolicy(hlog, epolicytype, ppolicybuffer as _, pcbpolicybuffer as _).ok() } } #[cfg(feature = "Win32_Security")] #[inline] @@ -2091,7 +2075,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn QueryRecoveryAgentsOnEncryptedFile(lpfilename : windows_core::PCWSTR, precoveryagents : *mut *mut ENCRYPTION_CERTIFICATE_HASH_LIST) -> u32); - unsafe { QueryRecoveryAgentsOnEncryptedFile(lpfilename.param().abi(), core::mem::transmute(precoveryagents)) } + unsafe { QueryRecoveryAgentsOnEncryptedFile(lpfilename.param().abi(), precoveryagents as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -2100,7 +2084,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn QueryUsersOnEncryptedFile(lpfilename : windows_core::PCWSTR, pusers : *mut *mut ENCRYPTION_CERTIFICATE_HASH_LIST) -> u32); - unsafe { QueryUsersOnEncryptedFile(lpfilename.param().abi(), core::mem::transmute(pusers)) } + unsafe { QueryUsersOnEncryptedFile(lpfilename.param().abi(), pusers as _) } } #[inline] pub unsafe fn ReOpenFile(horiginalfile: super::super::Foundation::HANDLE, dwdesiredaccess: u32, dwsharemode: FILE_SHARE_MODE, dwflagsandattributes: FILE_FLAGS_AND_ATTRIBUTES) -> windows_core::Result { @@ -2112,81 +2096,81 @@ pub unsafe fn ReOpenFile(horiginalfile: super::super::Foundation::HANDLE, dwdesi #[inline] pub unsafe fn ReadDirectoryChangesExW(hdirectory: super::super::Foundation::HANDLE, lpbuffer: *mut core::ffi::c_void, nbufferlength: u32, bwatchsubtree: bool, 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<()> { 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); - unsafe { ReadDirectoryChangesExW(hdirectory, core::mem::transmute(lpbuffer), nbufferlength, bwatchsubtree.into(), 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())), readdirectorynotifyinformationclass).ok() } + unsafe { ReadDirectoryChangesExW(hdirectory, lpbuffer as _, nbufferlength, bwatchsubtree.into(), dwnotifyfilter, lpbytesreturned.unwrap_or(core::mem::zeroed()) as _, lpoverlapped.unwrap_or(core::mem::zeroed()) as _, lpcompletionroutine.unwrap_or(core::mem::zeroed()) as _, readdirectorynotifyinformationclass).ok() } } #[cfg(feature = "Win32_System_IO")] #[inline] pub unsafe fn ReadDirectoryChangesW(hdirectory: super::super::Foundation::HANDLE, lpbuffer: *mut core::ffi::c_void, nbufferlength: u32, bwatchsubtree: bool, dwnotifyfilter: FILE_NOTIFY_CHANGE, lpbytesreturned: Option<*mut u32>, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>, lpcompletionroutine: Option) -> windows_core::Result<()> { 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); - unsafe { ReadDirectoryChangesW(hdirectory, core::mem::transmute(lpbuffer), nbufferlength, bwatchsubtree.into(), 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() } + unsafe { ReadDirectoryChangesW(hdirectory, lpbuffer as _, nbufferlength, bwatchsubtree.into(), dwnotifyfilter, lpbytesreturned.unwrap_or(core::mem::zeroed()) as _, lpoverlapped.unwrap_or(core::mem::zeroed()) as _, lpcompletionroutine.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { ReadEncryptedFileRaw(pfexportcallback, core::mem::transmute(pvcallbackcontext.unwrap_or(core::mem::zeroed())), pvcontext) } + unsafe { ReadEncryptedFileRaw(pfexportcallback, pvcallbackcontext.unwrap_or(core::mem::zeroed()) as _, pvcontext) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { ReadFile(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() } + unsafe { ReadFile(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()), lpnumberofbytesread.unwrap_or(core::mem::zeroed()) as _, lpoverlapped.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { ReadFileEx(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), lpcompletionroutine).ok() } + unsafe { ReadFileEx(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()), lpoverlapped as _, lpcompletionroutine).ok() } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { ReadFileScatter(hfile, asegmentarray, nnumberofbytestoread, core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpoverlapped)).ok() } + unsafe { ReadFileScatter(hfile, asegmentarray, nnumberofbytestoread, lpreserved.unwrap_or(core::mem::zeroed()) as _, lpoverlapped as _).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<()> { windows_targets::link!("clfsw32.dll" "system" fn ReadLogArchiveMetadata(pvarchivecontext : *mut core::ffi::c_void, cboffset : u32, cbbytestoread : u32, pbreadbuffer : *mut u8, pcbbytesread : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { ReadLogArchiveMetadata(core::mem::transmute(pvarchivecontext), cboffset, cbbytestoread, core::mem::transmute(pbreadbuffer), core::mem::transmute(pcbbytesread)).ok() } + unsafe { ReadLogArchiveMetadata(pvarchivecontext as _, cboffset, cbbytestoread, pbreadbuffer as _, pcbbytesread as _).ok() } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { ReadLogNotification(hlog, core::mem::transmute(pnotification), core::mem::transmute(lpoverlapped)).ok() } + unsafe { ReadLogNotification(hlog, pnotification as _, lpoverlapped as _).ok() } } #[cfg(feature = "Win32_System_IO")] #[inline] pub unsafe fn ReadLogRecord(pvmarshal: *mut core::ffi::c_void, plsnfirst: *mut CLS_LSN, econtextmode: CLFS_CONTEXT_MODE, ppvreadbuffer: *mut *mut core::ffi::c_void, pcbreadbuffer: *mut u32, perecordtype: *mut u8, plsnundonext: *mut CLS_LSN, plsnprevious: *mut CLS_LSN, ppvreadcontext: *mut *mut core::ffi::c_void, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn ReadLogRecord(pvmarshal : *mut core::ffi::c_void, plsnfirst : *mut CLS_LSN, econtextmode : CLFS_CONTEXT_MODE, ppvreadbuffer : *mut *mut core::ffi::c_void, pcbreadbuffer : *mut u32, perecordtype : *mut u8, plsnundonext : *mut CLS_LSN, plsnprevious : *mut CLS_LSN, ppvreadcontext : *mut *mut core::ffi::c_void, poverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - unsafe { ReadLogRecord(core::mem::transmute(pvmarshal), core::mem::transmute(plsnfirst), econtextmode, core::mem::transmute(ppvreadbuffer), core::mem::transmute(pcbreadbuffer), core::mem::transmute(perecordtype), core::mem::transmute(plsnundonext), core::mem::transmute(plsnprevious), core::mem::transmute(ppvreadcontext), core::mem::transmute(poverlapped)).ok() } + unsafe { ReadLogRecord(pvmarshal as _, plsnfirst as _, econtextmode, ppvreadbuffer as _, pcbreadbuffer as _, perecordtype as _, plsnundonext as _, plsnprevious as _, ppvreadcontext as _, poverlapped as _).ok() } } #[cfg(feature = "Win32_System_IO")] #[inline] pub unsafe fn ReadLogRestartArea(pvmarshal: *mut core::ffi::c_void, ppvrestartbuffer: *mut *mut core::ffi::c_void, pcbrestartbuffer: *mut u32, plsn: *mut CLS_LSN, ppvcontext: *mut *mut core::ffi::c_void, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn ReadLogRestartArea(pvmarshal : *mut core::ffi::c_void, ppvrestartbuffer : *mut *mut core::ffi::c_void, pcbrestartbuffer : *mut u32, plsn : *mut CLS_LSN, ppvcontext : *mut *mut core::ffi::c_void, poverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - unsafe { ReadLogRestartArea(core::mem::transmute(pvmarshal), core::mem::transmute(ppvrestartbuffer), core::mem::transmute(pcbrestartbuffer), core::mem::transmute(plsn), core::mem::transmute(ppvcontext), core::mem::transmute(poverlapped)).ok() } + unsafe { ReadLogRestartArea(pvmarshal as _, ppvrestartbuffer as _, pcbrestartbuffer as _, plsn as _, ppvcontext as _, poverlapped as _).ok() } } #[cfg(feature = "Win32_System_IO")] #[inline] pub unsafe fn ReadNextLogRecord(pvreadcontext: *mut core::ffi::c_void, ppvbuffer: *mut *mut core::ffi::c_void, pcbbuffer: *mut u32, perecordtype: *mut u8, plsnuser: *mut CLS_LSN, plsnundonext: *mut CLS_LSN, plsnprevious: *mut CLS_LSN, plsnrecord: *mut CLS_LSN, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn ReadNextLogRecord(pvreadcontext : *mut core::ffi::c_void, ppvbuffer : *mut *mut core::ffi::c_void, pcbbuffer : *mut u32, perecordtype : *mut u8, plsnuser : *mut CLS_LSN, plsnundonext : *mut CLS_LSN, plsnprevious : *mut CLS_LSN, plsnrecord : *mut CLS_LSN, poverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - unsafe { 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() } + unsafe { ReadNextLogRecord(pvreadcontext as _, ppvbuffer as _, pcbbuffer as _, perecordtype as _, plsnuser as _, plsnundonext as _, plsnprevious as _, plsnrecord as _, poverlapped as _).ok() } } #[inline] 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); - unsafe { ReadOnlyEnlistment(enlistmenthandle, core::mem::transmute(tmvirtualclock)).ok() } + unsafe { ReadOnlyEnlistment(enlistmenthandle, tmvirtualclock as _).ok() } } #[cfg(feature = "Win32_System_IO")] #[inline] pub unsafe fn ReadPreviousLogRestartArea(pvreadcontext: *mut core::ffi::c_void, ppvrestartbuffer: *mut *mut core::ffi::c_void, pcbrestartbuffer: *mut u32, plsnrestart: *mut CLS_LSN, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn ReadPreviousLogRestartArea(pvreadcontext : *mut core::ffi::c_void, ppvrestartbuffer : *mut *mut core::ffi::c_void, pcbrestartbuffer : *mut u32, plsnrestart : *mut CLS_LSN, poverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - unsafe { ReadPreviousLogRestartArea(core::mem::transmute(pvreadcontext), core::mem::transmute(ppvrestartbuffer), core::mem::transmute(pcbrestartbuffer), core::mem::transmute(plsnrestart), core::mem::transmute(poverlapped)).ok() } + unsafe { ReadPreviousLogRestartArea(pvreadcontext as _, ppvrestartbuffer as _, pcbrestartbuffer as _, plsnrestart as _, poverlapped as _).ok() } } #[inline] 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); - unsafe { RecoverEnlistment(enlistmenthandle, core::mem::transmute(enlistmentkey)).ok() } + unsafe { RecoverEnlistment(enlistmenthandle, enlistmentkey as _).ok() } } #[inline] pub unsafe fn RecoverResourceManager(resourcemanagerhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -2206,7 +2190,7 @@ pub unsafe fn RegisterForLogWriteNotification(hlog: super::super::Foundation::HA #[inline] 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); - unsafe { RegisterManageableLogClient(hlog, core::mem::transmute(pcallbacks)).ok() } + unsafe { RegisterManageableLogClient(hlog, pcallbacks as _).ok() } } #[inline] pub unsafe fn RemoveDirectoryA(lppathname: P0) -> windows_core::Result<()> @@ -2254,12 +2238,12 @@ where P1: 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); - unsafe { RemoveLogContainer(hlog, pwszcontainerpath.param().abi(), fforce.into(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { RemoveLogContainer(hlog, pwszcontainerpath.param().abi(), fforce.into(), preserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn RemoveLogContainerSet(hlog: super::super::Foundation::HANDLE, rgwszcontainerpath: &[windows_core::PCWSTR], fforce: bool, preserved: Option<*mut core::ffi::c_void>) -> windows_core::Result<()> { 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); - unsafe { RemoveLogContainerSet(hlog, rgwszcontainerpath.len().try_into().unwrap(), core::mem::transmute(rgwszcontainerpath.as_ptr()), fforce.into(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { RemoveLogContainerSet(hlog, rgwszcontainerpath.len().try_into().unwrap(), core::mem::transmute(rgwszcontainerpath.as_ptr()), fforce.into(), preserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn RemoveLogPolicy(hlog: super::super::Foundation::HANDLE, epolicytype: CLFS_MGMT_POLICY_TYPE) -> windows_core::Result<()> { @@ -2281,7 +2265,7 @@ where P0: windows_core::Param, { windows_targets::link!("ktmw32.dll" "system" fn RenameTransactionManager(logfilename : windows_core::PCWSTR, existingtransactionmanagerguid : *mut windows_core::GUID) -> super::super::Foundation:: BOOL); - unsafe { RenameTransactionManager(logfilename.param().abi(), core::mem::transmute(existingtransactionmanagerguid)).ok() } + unsafe { RenameTransactionManager(logfilename.param().abi(), existingtransactionmanagerguid as _).ok() } } #[inline] pub unsafe fn ReplaceFileA(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<()> @@ -2291,7 +2275,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); - unsafe { ReplaceFileA(lpreplacedfilename.param().abi(), lpreplacementfilename.param().abi(), lpbackupfilename.param().abi(), dwreplaceflags, core::mem::transmute(lpexclude.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ReplaceFileA(lpreplacedfilename.param().abi(), lpreplacementfilename.param().abi(), lpbackupfilename.param().abi(), dwreplaceflags, lpexclude.unwrap_or(core::mem::zeroed()) as _, lpreserved.unwrap_or(core::mem::zeroed()) as _).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 @@ -2301,7 +2285,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); - unsafe { ReplaceFileFromAppW(lpreplacedfilename.param().abi(), lpreplacementfilename.param().abi(), lpbackupfilename.param().abi(), dwreplaceflags, core::mem::transmute(lpexclude.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { ReplaceFileFromAppW(lpreplacedfilename.param().abi(), lpreplacementfilename.param().abi(), lpbackupfilename.param().abi(), dwreplaceflags, lpexclude.unwrap_or(core::mem::zeroed()) as _, lpreserved.unwrap_or(core::mem::zeroed()) as _) } } #[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<()> @@ -2311,29 +2295,29 @@ 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); - unsafe { ReplaceFileW(lpreplacedfilename.param().abi(), lpreplacementfilename.param().abi(), lpbackupfilename.param().abi(), dwreplaceflags, core::mem::transmute(lpexclude.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ReplaceFileW(lpreplacedfilename.param().abi(), lpreplacementfilename.param().abi(), lpbackupfilename.param().abi(), dwreplaceflags, lpexclude.unwrap_or(core::mem::zeroed()) as _, lpreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_IO")] #[inline] pub unsafe fn ReserveAndAppendLog(pvmarshal: *mut core::ffi::c_void, rgwriteentries: *mut CLS_WRITE_ENTRY, cwriteentries: u32, plsnundonext: *mut CLS_LSN, plsnprevious: *mut CLS_LSN, creserverecords: u32, rgcbreservation: *mut i64, fflags: CLFS_FLAG, plsn: *mut CLS_LSN, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn ReserveAndAppendLog(pvmarshal : *mut core::ffi::c_void, rgwriteentries : *mut CLS_WRITE_ENTRY, cwriteentries : u32, plsnundonext : *mut CLS_LSN, plsnprevious : *mut CLS_LSN, creserverecords : u32, rgcbreservation : *mut i64, fflags : CLFS_FLAG, plsn : *mut CLS_LSN, poverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - unsafe { ReserveAndAppendLog(core::mem::transmute(pvmarshal), core::mem::transmute(rgwriteentries), cwriteentries, core::mem::transmute(plsnundonext), core::mem::transmute(plsnprevious), creserverecords, core::mem::transmute(rgcbreservation), fflags, core::mem::transmute(plsn), core::mem::transmute(poverlapped)).ok() } + unsafe { ReserveAndAppendLog(pvmarshal as _, rgwriteentries as _, cwriteentries, plsnundonext as _, plsnprevious as _, creserverecords, rgcbreservation as _, fflags, plsn as _, poverlapped as _).ok() } } #[cfg(feature = "Win32_System_IO")] #[inline] pub unsafe fn ReserveAndAppendLogAligned(pvmarshal: *mut core::ffi::c_void, rgwriteentries: *mut CLS_WRITE_ENTRY, cwriteentries: u32, cbentryalignment: u32, plsnundonext: *mut CLS_LSN, plsnprevious: *mut CLS_LSN, creserverecords: u32, rgcbreservation: *mut i64, fflags: CLFS_FLAG, plsn: *mut CLS_LSN, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn ReserveAndAppendLogAligned(pvmarshal : *mut core::ffi::c_void, rgwriteentries : *mut CLS_WRITE_ENTRY, cwriteentries : u32, cbentryalignment : u32, plsnundonext : *mut CLS_LSN, plsnprevious : *mut CLS_LSN, creserverecords : u32, rgcbreservation : *mut i64, fflags : CLFS_FLAG, plsn : *mut CLS_LSN, poverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - unsafe { ReserveAndAppendLogAligned(core::mem::transmute(pvmarshal), core::mem::transmute(rgwriteentries), cwriteentries, cbentryalignment, core::mem::transmute(plsnundonext), core::mem::transmute(plsnprevious), creserverecords, core::mem::transmute(rgcbreservation), fflags, core::mem::transmute(plsn), core::mem::transmute(poverlapped)).ok() } + unsafe { ReserveAndAppendLogAligned(pvmarshal as _, rgwriteentries as _, cwriteentries, cbentryalignment, plsnundonext as _, plsnprevious as _, creserverecords, rgcbreservation as _, fflags, plsn as _, poverlapped as _).ok() } } #[inline] 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); - unsafe { RollbackComplete(enlistmenthandle, core::mem::transmute(tmvirtualclock)).ok() } + unsafe { RollbackComplete(enlistmenthandle, tmvirtualclock as _).ok() } } #[inline] 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); - unsafe { RollbackEnlistment(enlistmenthandle, core::mem::transmute(tmvirtualclock)).ok() } + unsafe { RollbackEnlistment(enlistmenthandle, tmvirtualclock as _).ok() } } #[inline] pub unsafe fn RollbackTransaction(transactionhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -2348,12 +2332,12 @@ pub unsafe fn RollbackTransactionAsync(transactionhandle: super::super::Foundati #[inline] 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); - unsafe { RollforwardTransactionManager(transactionmanagerhandle, core::mem::transmute(tmvirtualclock)).ok() } + unsafe { RollforwardTransactionManager(transactionmanagerhandle, tmvirtualclock as _).ok() } } #[inline] pub unsafe fn ScanLogContainers(pcxscan: *mut CLS_SCAN_CONTEXT, escanmode: u8, preserved: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn ScanLogContainers(pcxscan : *mut CLS_SCAN_CONTEXT, escanmode : u8, preserved : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { ScanLogContainers(core::mem::transmute(pcxscan), escanmode, core::mem::transmute(preserved)).ok() } + unsafe { ScanLogContainers(pcxscan as _, escanmode, preserved as _).ok() } } #[inline] pub unsafe fn SearchPathA(lppath: P0, lpfilename: P1, lpextension: P2, lpbuffer: Option<&mut [u8]>, lpfilepart: Option<*mut windows_core::PSTR>) -> u32 @@ -2363,7 +2347,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); - unsafe { 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()))) } + unsafe { 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())), lpfilepart.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SearchPathW(lppath: P0, lpfilename: P1, lpextension: P2, lpbuffer: Option<&mut [u16]>, lpfilepart: Option<*mut windows_core::PWSTR>) -> u32 @@ -2373,7 +2357,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); - unsafe { 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()))) } + unsafe { 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())), lpfilepart.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -2382,7 +2366,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn SetEncryptedFileMetadata(lpfilename : windows_core::PCWSTR, pboldmetadata : *const u8, pbnewmetadata : *const u8, pownerhash : *const ENCRYPTION_CERTIFICATE_HASH, dwoperation : u32, pcertificatesadded : *const ENCRYPTION_CERTIFICATE_HASH_LIST) -> u32); - unsafe { SetEncryptedFileMetadata(lpfilename.param().abi(), core::mem::transmute(pboldmetadata.unwrap_or(core::mem::zeroed())), pbnewmetadata, pownerhash, dwoperation, core::mem::transmute(pcertificatesadded.unwrap_or(core::mem::zeroed()))) } + unsafe { SetEncryptedFileMetadata(lpfilename.param().abi(), pboldmetadata.unwrap_or(core::mem::zeroed()) as _, pbnewmetadata, pownerhash, dwoperation, pcertificatesadded.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SetEndOfFile(hfile: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -2393,12 +2377,12 @@ pub unsafe fn SetEndOfFile(hfile: super::super::Foundation::HANDLE) -> windows_c #[inline] 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); - unsafe { SetEndOfLog(hlog, core::mem::transmute(plsnend), core::mem::transmute(lpoverlapped)).ok() } + unsafe { SetEndOfLog(hlog, plsnend as _, lpoverlapped as _).ok() } } #[inline] 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); - unsafe { SetEnlistmentRecoveryInformation(enlistmenthandle, buffersize, core::mem::transmute(buffer)).ok() } + unsafe { SetEnlistmentRecoveryInformation(enlistmenthandle, buffersize, buffer as _).ok() } } #[inline] pub unsafe fn SetFileApisToANSI() { @@ -2453,7 +2437,7 @@ where #[inline] pub unsafe fn SetFileBandwidthReservation(hfile: super::super::Foundation::HANDLE, nperiodmilliseconds: u32, nbytesperperiod: u32, bdiscardable: bool, lptransfersize: *mut u32, lpnumoutstandingrequests: *mut u32) -> windows_core::Result<()> { 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); - unsafe { SetFileBandwidthReservation(hfile, nperiodmilliseconds, nbytesperperiod, bdiscardable.into(), core::mem::transmute(lptransfersize), core::mem::transmute(lpnumoutstandingrequests)).ok() } + unsafe { SetFileBandwidthReservation(hfile, nperiodmilliseconds, nbytesperperiod, bdiscardable.into(), lptransfersize as _, lpnumoutstandingrequests as _).ok() } } #[inline] pub unsafe fn SetFileCompletionNotificationModes(filehandle: super::super::Foundation::HANDLE, flags: u8) -> windows_core::Result<()> { @@ -2473,12 +2457,12 @@ pub unsafe fn SetFileIoOverlappedRange(filehandle: super::super::Foundation::HAN #[inline] 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); - unsafe { SetFilePointer(hfile, ldistancetomove, core::mem::transmute(lpdistancetomovehigh.unwrap_or(core::mem::zeroed())), dwmovemethod) } + unsafe { SetFilePointer(hfile, ldistancetomove, lpdistancetomovehigh.unwrap_or(core::mem::zeroed()) as _, dwmovemethod) } } #[inline] 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); - unsafe { SetFilePointerEx(hfile, lidistancetomove, core::mem::transmute(lpnewfilepointer.unwrap_or(core::mem::zeroed())), dwmovemethod).ok() } + unsafe { SetFilePointerEx(hfile, lidistancetomove, lpnewfilepointer.unwrap_or(core::mem::zeroed()) as _, dwmovemethod).ok() } } #[inline] pub unsafe fn SetFileShortNameA(hfile: super::super::Foundation::HANDLE, lpshortname: P1) -> windows_core::Result<()> @@ -2499,7 +2483,7 @@ where #[inline] 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); - unsafe { SetFileTime(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() } + unsafe { SetFileTime(hfile, lpcreationtime.unwrap_or(core::mem::zeroed()) as _, lplastaccesstime.unwrap_or(core::mem::zeroed()) as _, lplastwritetime.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetFileValidData(hfile: super::super::Foundation::HANDLE, validdatalength: i64) -> windows_core::Result<()> { @@ -2519,12 +2503,12 @@ pub unsafe fn SetLogArchiveMode(hlog: super::super::Foundation::HANDLE, emode: C #[inline] 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); - unsafe { SetLogArchiveTail(hlog, core::mem::transmute(plsnarchivetail), core::mem::transmute(preserved)).ok() } + unsafe { SetLogArchiveTail(hlog, plsnarchivetail as _, preserved as _).ok() } } #[inline] 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); - unsafe { SetLogFileSizeWithPolicy(hlog, pdesiredsize, core::mem::transmute(presultingsize)).ok() } + unsafe { SetLogFileSizeWithPolicy(hlog, pdesiredsize, presultingsize as _).ok() } } #[inline] pub unsafe fn SetResourceManagerCompletionPort(resourcemanagerhandle: super::super::Foundation::HANDLE, iocompletionporthandle: super::super::Foundation::HANDLE, completionkey: usize) -> windows_core::Result<()> { @@ -2558,13 +2542,13 @@ where #[inline] pub unsafe fn SetUserFileEncryptionKey(pencryptioncertificate: Option<*const ENCRYPTION_CERTIFICATE>) -> u32 { windows_targets::link!("advapi32.dll" "system" fn SetUserFileEncryptionKey(pencryptioncertificate : *const ENCRYPTION_CERTIFICATE) -> u32); - unsafe { SetUserFileEncryptionKey(core::mem::transmute(pencryptioncertificate.unwrap_or(core::mem::zeroed()))) } + unsafe { SetUserFileEncryptionKey(pencryptioncertificate.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { SetUserFileEncryptionKeyEx(core::mem::transmute(pencryptioncertificate.unwrap_or(core::mem::zeroed())), dwcapabilities, dwflags, core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { SetUserFileEncryptionKeyEx(pencryptioncertificate.unwrap_or(core::mem::zeroed()) as _, dwcapabilities, dwflags, pvreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SetVolumeLabelA(lprootpathname: P0, lpvolumename: P1) -> windows_core::Result<()> @@ -2605,28 +2589,28 @@ where #[inline] 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); - unsafe { SinglePhaseReject(enlistmenthandle, core::mem::transmute(tmvirtualclock)).ok() } + unsafe { SinglePhaseReject(enlistmenthandle, tmvirtualclock as _).ok() } } #[inline] 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); - unsafe { SubmitIoRing(ioring, waitoperations, milliseconds, core::mem::transmute(submittedentries.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SubmitIoRing(ioring, waitoperations, milliseconds, submittedentries.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn TerminateLogArchive(pvarchivecontext: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn TerminateLogArchive(pvarchivecontext : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { TerminateLogArchive(core::mem::transmute(pvarchivecontext)).ok() } + unsafe { TerminateLogArchive(pvarchivecontext as _).ok() } } #[inline] pub unsafe fn TerminateReadLog(pvcursorcontext: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn TerminateReadLog(pvcursorcontext : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { TerminateReadLog(core::mem::transmute(pvcursorcontext)).ok() } + unsafe { TerminateReadLog(pvcursorcontext as _).ok() } } #[cfg(feature = "Win32_System_IO")] #[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); - unsafe { TruncateLog(pvmarshal, plsnend, core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { TruncateLog(pvmarshal, plsnend, lpoverlapped.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn TxfGetThreadMiniVersionForCreate() -> u16 { @@ -2643,7 +2627,7 @@ where P0: windows_core::Param, { windows_targets::link!("txfw32.dll" "system" fn TxfLogCreateFileReadContext(logpath : windows_core::PCWSTR, beginninglsn : CLS_LSN, endinglsn : CLS_LSN, txffileid : *const TXF_ID, txflogcontext : *mut *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { TxfLogCreateFileReadContext(logpath.param().abi(), core::mem::transmute(beginninglsn), core::mem::transmute(endinglsn), txffileid, core::mem::transmute(txflogcontext)).ok() } + unsafe { TxfLogCreateFileReadContext(logpath.param().abi(), core::mem::transmute(beginninglsn), core::mem::transmute(endinglsn), txffileid, txflogcontext as _).ok() } } #[inline] pub unsafe fn TxfLogCreateRangeReadContext(logpath: P0, beginninglsn: CLS_LSN, endinglsn: CLS_LSN, beginningvirtualclock: *const i64, endingvirtualclock: *const i64, recordtypemask: u32, txflogcontext: *mut *mut core::ffi::c_void) -> super::super::Foundation::BOOL @@ -2651,7 +2635,7 @@ where P0: windows_core::Param, { windows_targets::link!("txfw32.dll" "system" fn TxfLogCreateRangeReadContext(logpath : windows_core::PCWSTR, beginninglsn : CLS_LSN, endinglsn : CLS_LSN, beginningvirtualclock : *const i64, endingvirtualclock : *const i64, recordtypemask : u32, txflogcontext : *mut *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { TxfLogCreateRangeReadContext(logpath.param().abi(), core::mem::transmute(beginninglsn), core::mem::transmute(endinglsn), beginningvirtualclock, endingvirtualclock, recordtypemask, core::mem::transmute(txflogcontext)) } + unsafe { TxfLogCreateRangeReadContext(logpath.param().abi(), core::mem::transmute(beginninglsn), core::mem::transmute(endinglsn), beginningvirtualclock, endingvirtualclock, recordtypemask, txflogcontext as _) } } #[inline] pub unsafe fn TxfLogDestroyReadContext(txflogcontext: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -2661,22 +2645,22 @@ pub unsafe fn TxfLogDestroyReadContext(txflogcontext: *const core::ffi::c_void) #[inline] pub unsafe fn TxfLogReadRecords(txflogcontext: *const core::ffi::c_void, bufferlength: u32, buffer: *mut core::ffi::c_void, bytesused: *mut u32, recordcount: *mut u32) -> windows_core::Result<()> { windows_targets::link!("txfw32.dll" "system" fn TxfLogReadRecords(txflogcontext : *const core::ffi::c_void, bufferlength : u32, buffer : *mut core::ffi::c_void, bytesused : *mut u32, recordcount : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { TxfLogReadRecords(txflogcontext, bufferlength, core::mem::transmute(buffer), core::mem::transmute(bytesused), core::mem::transmute(recordcount)).ok() } + unsafe { TxfLogReadRecords(txflogcontext, bufferlength, buffer as _, bytesused as _, recordcount as _).ok() } } #[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); - unsafe { TxfLogRecordGetFileName(recordbuffer, recordbufferlengthinbytes, core::mem::transmute(namebuffer), core::mem::transmute(namebufferlengthinbytes), core::mem::transmute(txfid.unwrap_or(core::mem::zeroed()))) } + unsafe { TxfLogRecordGetFileName(recordbuffer, recordbufferlengthinbytes, core::mem::transmute(namebuffer), namebufferlengthinbytes as _, txfid.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { TxfLogRecordGetGenericType(recordbuffer, recordbufferlengthinbytes, core::mem::transmute(generictype), core::mem::transmute(virtualclock.unwrap_or(core::mem::zeroed()))) } + unsafe { TxfLogRecordGetGenericType(recordbuffer, recordbufferlengthinbytes, generictype as _, virtualclock.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { TxfReadMetadataInfo(filehandle, core::mem::transmute(txffileid), core::mem::transmute(lastlsn), core::mem::transmute(transactionstate), core::mem::transmute(lockingtransaction)) } + unsafe { TxfReadMetadataInfo(filehandle, txffileid as _, lastlsn as _, transactionstate as _, lockingtransaction as _) } } #[inline] pub unsafe fn TxfSetThreadMiniVersionForCreate(miniversion: u16) { @@ -2692,7 +2676,7 @@ pub unsafe fn UnlockFile(hfile: super::super::Foundation::HANDLE, dwfileoffsetlo #[inline] 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); - unsafe { UnlockFileEx(hfile, core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), nnumberofbytestounlocklow, nnumberofbytestounlockhigh, core::mem::transmute(lpoverlapped)).ok() } + unsafe { UnlockFileEx(hfile, dwreserved.unwrap_or(core::mem::zeroed()) as _, nnumberofbytestounlocklow, nnumberofbytestounlockhigh, lpoverlapped as _).ok() } } #[cfg(feature = "Win32_Security")] #[inline] @@ -2701,7 +2685,7 @@ where P0: windows_core::Param, { windows_targets::link!("clfsw32.dll" "system" fn ValidateLog(pszlogfilename : windows_core::PCWSTR, psalogfile : *mut super::super::Security:: SECURITY_ATTRIBUTES, pinfobuffer : *mut CLS_INFORMATION, pcbbuffer : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { ValidateLog(pszlogfilename.param().abi(), core::mem::transmute(psalogfile), core::mem::transmute(pinfobuffer), core::mem::transmute(pcbbuffer)).ok() } + unsafe { ValidateLog(pszlogfilename.param().abi(), psalogfile as _, pinfobuffer as _, pcbbuffer as _).ok() } } #[inline] pub unsafe fn VerFindFileA(uflags: VER_FIND_FILE_FLAGS, szfilename: P1, szwindir: P2, szappdir: P3, szcurdir: windows_core::PSTR, pucurdirlen: *mut u32, szdestdir: windows_core::PSTR, pudestdirlen: *mut u32) -> VER_FIND_FILE_STATUS @@ -2711,7 +2695,7 @@ where P3: windows_core::Param, { windows_targets::link!("version.dll" "system" fn VerFindFileA(uflags : VER_FIND_FILE_FLAGS, szfilename : windows_core::PCSTR, szwindir : windows_core::PCSTR, szappdir : windows_core::PCSTR, szcurdir : windows_core::PSTR, pucurdirlen : *mut u32, szdestdir : windows_core::PSTR, pudestdirlen : *mut u32) -> VER_FIND_FILE_STATUS); - unsafe { VerFindFileA(uflags, szfilename.param().abi(), szwindir.param().abi(), szappdir.param().abi(), core::mem::transmute(szcurdir), core::mem::transmute(pucurdirlen), core::mem::transmute(szdestdir), core::mem::transmute(pudestdirlen)) } + unsafe { VerFindFileA(uflags, szfilename.param().abi(), szwindir.param().abi(), szappdir.param().abi(), core::mem::transmute(szcurdir), pucurdirlen as _, core::mem::transmute(szdestdir), pudestdirlen as _) } } #[inline] pub unsafe fn VerFindFileW(uflags: VER_FIND_FILE_FLAGS, szfilename: P1, szwindir: P2, szappdir: P3, szcurdir: windows_core::PWSTR, pucurdirlen: *mut u32, szdestdir: windows_core::PWSTR, pudestdirlen: *mut u32) -> VER_FIND_FILE_STATUS @@ -2721,7 +2705,7 @@ where P3: windows_core::Param, { windows_targets::link!("version.dll" "system" fn VerFindFileW(uflags : VER_FIND_FILE_FLAGS, szfilename : windows_core::PCWSTR, szwindir : windows_core::PCWSTR, szappdir : windows_core::PCWSTR, szcurdir : windows_core::PWSTR, pucurdirlen : *mut u32, szdestdir : windows_core::PWSTR, pudestdirlen : *mut u32) -> VER_FIND_FILE_STATUS); - unsafe { VerFindFileW(uflags, szfilename.param().abi(), szwindir.param().abi(), szappdir.param().abi(), core::mem::transmute(szcurdir), core::mem::transmute(pucurdirlen), core::mem::transmute(szdestdir), core::mem::transmute(pudestdirlen)) } + unsafe { VerFindFileW(uflags, szfilename.param().abi(), szwindir.param().abi(), szappdir.param().abi(), core::mem::transmute(szcurdir), pucurdirlen as _, core::mem::transmute(szdestdir), pudestdirlen as _) } } #[inline] pub unsafe fn VerInstallFileA(uflags: VER_INSTALL_FILE_FLAGS, szsrcfilename: P1, szdestfilename: P2, szsrcdir: P3, szdestdir: P4, szcurdir: P5, sztmpfile: windows_core::PSTR, putmpfilelen: *mut u32) -> VER_INSTALL_FILE_STATUS @@ -2733,7 +2717,7 @@ where P5: windows_core::Param, { windows_targets::link!("version.dll" "system" fn VerInstallFileA(uflags : VER_INSTALL_FILE_FLAGS, szsrcfilename : windows_core::PCSTR, szdestfilename : windows_core::PCSTR, szsrcdir : windows_core::PCSTR, szdestdir : windows_core::PCSTR, szcurdir : windows_core::PCSTR, sztmpfile : windows_core::PSTR, putmpfilelen : *mut u32) -> VER_INSTALL_FILE_STATUS); - unsafe { VerInstallFileA(uflags, szsrcfilename.param().abi(), szdestfilename.param().abi(), szsrcdir.param().abi(), szdestdir.param().abi(), szcurdir.param().abi(), core::mem::transmute(sztmpfile), core::mem::transmute(putmpfilelen)) } + unsafe { VerInstallFileA(uflags, szsrcfilename.param().abi(), szdestfilename.param().abi(), szsrcdir.param().abi(), szdestdir.param().abi(), szcurdir.param().abi(), core::mem::transmute(sztmpfile), putmpfilelen as _) } } #[inline] pub unsafe fn VerInstallFileW(uflags: VER_INSTALL_FILE_FLAGS, szsrcfilename: P1, szdestfilename: P2, szsrcdir: P3, szdestdir: P4, szcurdir: P5, sztmpfile: windows_core::PWSTR, putmpfilelen: *mut u32) -> VER_INSTALL_FILE_STATUS @@ -2745,7 +2729,7 @@ where P5: windows_core::Param, { windows_targets::link!("version.dll" "system" fn VerInstallFileW(uflags : VER_INSTALL_FILE_FLAGS, szsrcfilename : windows_core::PCWSTR, szdestfilename : windows_core::PCWSTR, szsrcdir : windows_core::PCWSTR, szdestdir : windows_core::PCWSTR, szcurdir : windows_core::PCWSTR, sztmpfile : windows_core::PWSTR, putmpfilelen : *mut u32) -> VER_INSTALL_FILE_STATUS); - unsafe { VerInstallFileW(uflags, szsrcfilename.param().abi(), szdestfilename.param().abi(), szsrcdir.param().abi(), szdestdir.param().abi(), szcurdir.param().abi(), core::mem::transmute(sztmpfile), core::mem::transmute(putmpfilelen)) } + unsafe { VerInstallFileW(uflags, szsrcfilename.param().abi(), szdestfilename.param().abi(), szsrcdir.param().abi(), szdestdir.param().abi(), szcurdir.param().abi(), core::mem::transmute(sztmpfile), putmpfilelen as _) } } #[inline] pub unsafe fn VerLanguageNameA(wlang: u32, szlang: &mut [u8]) -> u32 { @@ -2763,7 +2747,7 @@ where P1: windows_core::Param, { windows_targets::link!("version.dll" "system" fn VerQueryValueA(pblock : *const core::ffi::c_void, lpsubblock : windows_core::PCSTR, lplpbuffer : *mut *mut core::ffi::c_void, pulen : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { VerQueryValueA(pblock, lpsubblock.param().abi(), core::mem::transmute(lplpbuffer), core::mem::transmute(pulen)) } + unsafe { VerQueryValueA(pblock, lpsubblock.param().abi(), lplpbuffer as _, pulen as _) } } #[inline] pub unsafe fn VerQueryValueW(pblock: *const core::ffi::c_void, lpsubblock: P1, lplpbuffer: *mut *mut core::ffi::c_void, pulen: *mut u32) -> super::super::Foundation::BOOL @@ -2771,7 +2755,7 @@ where P1: windows_core::Param, { windows_targets::link!("version.dll" "system" fn VerQueryValueW(pblock : *const core::ffi::c_void, lpsubblock : windows_core::PCWSTR, lplpbuffer : *mut *mut core::ffi::c_void, pulen : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { VerQueryValueW(pblock, lpsubblock.param().abi(), core::mem::transmute(lplpbuffer), core::mem::transmute(pulen)) } + unsafe { VerQueryValueW(pblock, lpsubblock.param().abi(), lplpbuffer as _, pulen as _) } } #[inline] pub unsafe fn WofEnumEntries(volumename: P0, provider: u32, enumproc: WofEnumEntryProc, userdata: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2779,7 +2763,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); - unsafe { WofEnumEntries(volumename.param().abi(), provider, enumproc, core::mem::transmute(userdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WofEnumEntries(volumename.param().abi(), provider, enumproc, userdata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WofFileEnumFiles(volumename: P0, algorithm: u32, enumproc: WofEnumFilesProc, userdata: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2787,7 +2771,7 @@ where P0: windows_core::Param, { windows_targets::link!("wofutil.dll" "system" fn WofFileEnumFiles(volumename : windows_core::PCWSTR, algorithm : u32, enumproc : WofEnumFilesProc, userdata : *const core::ffi::c_void) -> windows_core::HRESULT); - unsafe { WofFileEnumFiles(volumename.param().abi(), algorithm, enumproc, core::mem::transmute(userdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WofFileEnumFiles(volumename.param().abi(), algorithm, enumproc, userdata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WofGetDriverVersion(fileorvolumehandle: super::super::Foundation::HANDLE, provider: u32) -> windows_core::Result { @@ -2803,7 +2787,7 @@ where P0: windows_core::Param, { windows_targets::link!("wofutil.dll" "system" fn WofIsExternalFile(filepath : windows_core::PCWSTR, isexternalfile : *mut super::super::Foundation:: BOOL, provider : *mut u32, externalfileinfo : *mut core::ffi::c_void, bufferlength : *mut u32) -> windows_core::HRESULT); - unsafe { 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() } + unsafe { WofIsExternalFile(filepath.param().abi(), isexternalfile.unwrap_or(core::mem::zeroed()) as _, provider.unwrap_or(core::mem::zeroed()) as _, externalfileinfo.unwrap_or(core::mem::zeroed()) as _, bufferlength.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WofSetFileDataLocation(filehandle: super::super::Foundation::HANDLE, provider: u32, externalfileinfo: *const core::ffi::c_void, length: u32) -> windows_core::Result<()> { @@ -2816,7 +2800,7 @@ where P0: windows_core::Param, { windows_targets::link!("wofutil.dll" "system" fn WofShouldCompressBinaries(volume : windows_core::PCWSTR, algorithm : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { WofShouldCompressBinaries(volume.param().abi(), core::mem::transmute(algorithm)) } + unsafe { WofShouldCompressBinaries(volume.param().abi(), algorithm as _) } } #[inline] pub unsafe fn WofWimAddEntry(volumename: P0, wimpath: P1, wimtype: u32, wimindex: u32) -> windows_core::Result @@ -2836,7 +2820,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); - unsafe { WofWimEnumFiles(volumename.param().abi(), datasourceid, enumproc, core::mem::transmute(userdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WofWimEnumFiles(volumename.param().abi(), datasourceid, enumproc, userdata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WofWimRemoveEntry(volumename: P0, datasourceid: i64) -> windows_core::Result<()> @@ -2866,7 +2850,7 @@ where #[inline] pub unsafe fn Wow64DisableWow64FsRedirection(oldvalue: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn Wow64DisableWow64FsRedirection(oldvalue : *mut *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { Wow64DisableWow64FsRedirection(core::mem::transmute(oldvalue)).ok() } + unsafe { Wow64DisableWow64FsRedirection(oldvalue as _).ok() } } #[inline] pub unsafe fn Wow64EnableWow64FsRedirection(wow64fsenableredirection: bool) -> bool { @@ -2881,31 +2865,31 @@ 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); - unsafe { WriteEncryptedFileRaw(pfimportcallback, core::mem::transmute(pvcallbackcontext.unwrap_or(core::mem::zeroed())), pvcontext) } + unsafe { WriteEncryptedFileRaw(pfimportcallback, pvcallbackcontext.unwrap_or(core::mem::zeroed()) as _, pvcontext) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { WriteFile(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() } + unsafe { WriteFile(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()), lpnumberofbyteswritten.unwrap_or(core::mem::zeroed()) as _, lpoverlapped.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { WriteFileEx(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), lpcompletionroutine).ok() } + unsafe { WriteFileEx(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()), lpoverlapped as _, lpcompletionroutine).ok() } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { WriteFileGather(hfile, asegmentarray, nnumberofbytestowrite, core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpoverlapped)).ok() } + unsafe { WriteFileGather(hfile, asegmentarray, nnumberofbytestowrite, lpreserved.unwrap_or(core::mem::zeroed()) as _, lpoverlapped as _).ok() } } #[cfg(feature = "Win32_System_IO")] #[inline] pub unsafe fn WriteLogRestartArea(pvmarshal: *mut core::ffi::c_void, pvrestartbuffer: *mut core::ffi::c_void, cbrestartbuffer: u32, plsnbase: *mut CLS_LSN, fflags: CLFS_FLAG, pcbwritten: *mut u32, plsnnext: *mut CLS_LSN, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn WriteLogRestartArea(pvmarshal : *mut core::ffi::c_void, pvrestartbuffer : *mut core::ffi::c_void, cbrestartbuffer : u32, plsnbase : *mut CLS_LSN, fflags : CLFS_FLAG, pcbwritten : *mut u32, plsnnext : *mut CLS_LSN, poverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - unsafe { WriteLogRestartArea(core::mem::transmute(pvmarshal), core::mem::transmute(pvrestartbuffer), cbrestartbuffer, core::mem::transmute(plsnbase), fflags, core::mem::transmute(pcbwritten), core::mem::transmute(plsnnext), core::mem::transmute(poverlapped)).ok() } + unsafe { WriteLogRestartArea(pvmarshal as _, pvrestartbuffer as _, cbrestartbuffer, plsnbase as _, fflags, pcbwritten as _, plsnnext as _, poverlapped as _).ok() } } #[inline] pub unsafe fn WriteTapemark(hdevice: super::super::Foundation::HANDLE, dwtapemarktype: TAPEMARK_TYPE, dwtapemarkcount: u32, bimmediate: bool) -> u32 { @@ -5162,19 +5146,19 @@ impl IDiskQuotaControl { unsafe { (windows_core::Interface::vtable(self).SetQuotaState)(windows_core::Interface::as_raw(self), dwstate).ok() } } pub unsafe fn GetQuotaState(&self, pdwstate: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetQuotaState)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwstate)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetQuotaState)(windows_core::Interface::as_raw(self), pdwstate as _).ok() } } pub unsafe fn SetQuotaLogFlags(&self, dwflags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetQuotaLogFlags)(windows_core::Interface::as_raw(self), dwflags).ok() } } pub unsafe fn GetQuotaLogFlags(&self, pdwflags: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetQuotaLogFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetQuotaLogFlags)(windows_core::Interface::as_raw(self), pdwflags as _).ok() } } pub unsafe fn SetDefaultQuotaThreshold(&self, llthreshold: i64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetDefaultQuotaThreshold)(windows_core::Interface::as_raw(self), llthreshold).ok() } } pub unsafe fn GetDefaultQuotaThreshold(&self, pllthreshold: *mut i64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDefaultQuotaThreshold)(windows_core::Interface::as_raw(self), core::mem::transmute(pllthreshold)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDefaultQuotaThreshold)(windows_core::Interface::as_raw(self), pllthreshold as _).ok() } } pub unsafe fn GetDefaultQuotaThresholdText(&self, psztext: P0, cchtext: u32) -> windows_core::Result<()> where @@ -5186,7 +5170,7 @@ impl IDiskQuotaControl { unsafe { (windows_core::Interface::vtable(self).SetDefaultQuotaLimit)(windows_core::Interface::as_raw(self), lllimit).ok() } } pub unsafe fn GetDefaultQuotaLimit(&self, plllimit: *mut i64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDefaultQuotaLimit)(windows_core::Interface::as_raw(self), core::mem::transmute(plllimit)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDefaultQuotaLimit)(windows_core::Interface::as_raw(self), plllimit as _).ok() } } pub unsafe fn GetDefaultQuotaLimitText(&self, psztext: P0, cchtext: u32) -> windows_core::Result<()> where @@ -5234,7 +5218,7 @@ impl IDiskQuotaControl { } #[cfg(feature = "Win32_Security")] pub unsafe fn CreateEnumUsers(&self, rgpusersids: *mut super::super::Security::PSID, cpsids: u32, fnameresolution: DISKQUOTA_USERNAME_RESOLVE, ppenum: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateEnumUsers)(windows_core::Interface::as_raw(self), core::mem::transmute(rgpusersids), cpsids, fnameresolution, core::mem::transmute(ppenum)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateEnumUsers)(windows_core::Interface::as_raw(self), rgpusersids as _, cpsids, fnameresolution, core::mem::transmute(ppenum)).ok() } } pub unsafe fn CreateUserBatch(&self) -> windows_core::Result { unsafe { @@ -5541,7 +5525,7 @@ windows_core::imp::define_interface!(IDiskQuotaUser, IDiskQuotaUser_Vtbl, 0x7988 windows_core::imp::interface_hierarchy!(IDiskQuotaUser, windows_core::IUnknown); impl IDiskQuotaUser { pub unsafe fn GetID(&self, pulid: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetID)(windows_core::Interface::as_raw(self), core::mem::transmute(pulid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetID)(windows_core::Interface::as_raw(self), pulid as _).ok() } } pub unsafe fn GetName(&self, pszaccountcontainer: P0, cchaccountcontainer: u32, pszlogonname: P2, cchlogonname: u32, pszdisplayname: P4, cchdisplayname: u32) -> windows_core::Result<()> where @@ -5552,13 +5536,13 @@ impl IDiskQuotaUser { unsafe { (windows_core::Interface::vtable(self).GetName)(windows_core::Interface::as_raw(self), pszaccountcontainer.param().abi(), cchaccountcontainer, pszlogonname.param().abi(), cchlogonname, pszdisplayname.param().abi(), cchdisplayname).ok() } } pub unsafe fn GetSidLength(&self, pdwlength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSidLength)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwlength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSidLength)(windows_core::Interface::as_raw(self), pdwlength as _).ok() } } pub unsafe fn GetSid(&self, pbsidbuffer: *mut u8, cbsidbuffer: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSid)(windows_core::Interface::as_raw(self), core::mem::transmute(pbsidbuffer), cbsidbuffer).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSid)(windows_core::Interface::as_raw(self), pbsidbuffer as _, cbsidbuffer).ok() } } pub unsafe fn GetQuotaThreshold(&self, pllthreshold: *mut i64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetQuotaThreshold)(windows_core::Interface::as_raw(self), core::mem::transmute(pllthreshold)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetQuotaThreshold)(windows_core::Interface::as_raw(self), pllthreshold as _).ok() } } pub unsafe fn GetQuotaThresholdText(&self, psztext: P0, cchtext: u32) -> windows_core::Result<()> where @@ -5567,7 +5551,7 @@ impl IDiskQuotaUser { unsafe { (windows_core::Interface::vtable(self).GetQuotaThresholdText)(windows_core::Interface::as_raw(self), psztext.param().abi(), cchtext).ok() } } pub unsafe fn GetQuotaLimit(&self, plllimit: *mut i64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetQuotaLimit)(windows_core::Interface::as_raw(self), core::mem::transmute(plllimit)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetQuotaLimit)(windows_core::Interface::as_raw(self), plllimit as _).ok() } } pub unsafe fn GetQuotaLimitText(&self, psztext: P0, cchtext: u32) -> windows_core::Result<()> where @@ -5576,7 +5560,7 @@ impl IDiskQuotaUser { unsafe { (windows_core::Interface::vtable(self).GetQuotaLimitText)(windows_core::Interface::as_raw(self), psztext.param().abi(), cchtext).ok() } } pub unsafe fn GetQuotaUsed(&self, pllused: *mut i64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetQuotaUsed)(windows_core::Interface::as_raw(self), core::mem::transmute(pllused)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetQuotaUsed)(windows_core::Interface::as_raw(self), pllused as _).ok() } } pub unsafe fn GetQuotaUsedText(&self, psztext: P0, cchtext: u32) -> windows_core::Result<()> where @@ -5585,7 +5569,7 @@ impl IDiskQuotaUser { unsafe { (windows_core::Interface::vtable(self).GetQuotaUsedText)(windows_core::Interface::as_raw(self), psztext.param().abi(), cchtext).ok() } } pub unsafe fn GetQuotaInformation(&self, pbquotainfo: *mut core::ffi::c_void, cbquotainfo: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetQuotaInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(pbquotainfo), cbquotainfo).ok() } + unsafe { (windows_core::Interface::vtable(self).GetQuotaInformation)(windows_core::Interface::as_raw(self), pbquotainfo as _, cbquotainfo).ok() } } pub unsafe fn SetQuotaThreshold(&self, llthreshold: i64, fwritethrough: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetQuotaThreshold)(windows_core::Interface::as_raw(self), llthreshold, fwritethrough.into()).ok() } @@ -5597,7 +5581,7 @@ impl IDiskQuotaUser { unsafe { (windows_core::Interface::vtable(self).Invalidate)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetAccountStatus(&self, pdwstatus: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAccountStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAccountStatus)(windows_core::Interface::as_raw(self), pdwstatus as _).ok() } } } #[repr(C)] @@ -5831,7 +5815,7 @@ windows_core::imp::define_interface!(IEnumDiskQuotaUsers, IEnumDiskQuotaUsers_Vt windows_core::imp::interface_hierarchy!(IEnumDiskQuotaUsers, windows_core::IUnknown); impl IEnumDiskQuotaUsers { pub unsafe fn Next(&self, cusers: u32, rgusers: *mut Option, pcusersfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), cusers, core::mem::transmute(rgusers), core::mem::transmute(pcusersfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), cusers, core::mem::transmute(rgusers), pcusersfetched as _).ok() } } pub unsafe fn Skip(&self, cusers: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), cusers).ok() } 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 c1c95a2afe..fb8c2b520a 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Imapi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Imapi/mod.rs @@ -7,7 +7,7 @@ pub unsafe fn CloseIMsgSession(lpmsgsess: LPMSGSESS) { #[inline] pub unsafe fn GetAttribIMsgOnIStg(lpobject: *mut core::ffi::c_void, lpproptagarray: *mut super::super::System::AddressBook::SPropTagArray, lpppropattrarray: *mut *mut SPropAttrArray) -> windows_core::Result<()> { windows_targets::link!("mapi32.dll" "system" fn GetAttribIMsgOnIStg(lpobject : *mut core::ffi::c_void, lpproptagarray : *mut super::super::System::AddressBook:: SPropTagArray, lpppropattrarray : *mut *mut SPropAttrArray) -> windows_core::HRESULT); - unsafe { GetAttribIMsgOnIStg(core::mem::transmute(lpobject), core::mem::transmute(lpproptagarray), core::mem::transmute(lpppropattrarray)).ok() } + unsafe { GetAttribIMsgOnIStg(lpobject as _, lpproptagarray as _, lpppropattrarray as _).ok() } } #[inline] pub unsafe fn MapStorageSCode(stgscode: i32) -> i32 { @@ -22,7 +22,7 @@ where 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); - unsafe { OpenIMsgOnIStg(lpmsgsess, lpallocatebuffer, lpallocatemore, lpfreebuffer, lpmalloc.param().abi(), core::mem::transmute(lpmapisup), lpstg.param().abi(), core::mem::transmute(lpfmsgcallrelease), ulcallerdata, ulflags, core::mem::transmute(lppmsg)) } + unsafe { OpenIMsgOnIStg(lpmsgsess, lpallocatebuffer, lpallocatemore, lpfreebuffer, lpmalloc.param().abi(), lpmapisup as _, lpstg.param().abi(), lpfmsgcallrelease as _, ulcallerdata, ulflags, core::mem::transmute(lppmsg)) } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -31,13 +31,13 @@ where P0: windows_core::Param, { windows_targets::link!("mapi32.dll" "system" fn OpenIMsgSession(lpmalloc : * mut core::ffi::c_void, ulflags : u32, lppmsgsess : *mut LPMSGSESS) -> i32); - unsafe { OpenIMsgSession(lpmalloc.param().abi(), ulflags, core::mem::transmute(lppmsgsess)) } + unsafe { OpenIMsgSession(lpmalloc.param().abi(), ulflags, lppmsgsess as _) } } #[cfg(feature = "Win32_System_AddressBook")] #[inline] pub unsafe fn SetAttribIMsgOnIStg(lpobject: *mut core::ffi::c_void, lpproptags: *mut super::super::System::AddressBook::SPropTagArray, lppropattrs: *mut SPropAttrArray, lpppropproblems: *mut *mut super::super::System::AddressBook::SPropProblemArray) -> windows_core::Result<()> { windows_targets::link!("mapi32.dll" "system" fn SetAttribIMsgOnIStg(lpobject : *mut core::ffi::c_void, lpproptags : *mut super::super::System::AddressBook:: SPropTagArray, lppropattrs : *mut SPropAttrArray, lpppropproblems : *mut *mut super::super::System::AddressBook:: SPropProblemArray) -> windows_core::HRESULT); - unsafe { SetAttribIMsgOnIStg(core::mem::transmute(lpobject), core::mem::transmute(lpproptags), core::mem::transmute(lppropattrs), core::mem::transmute(lpppropproblems)).ok() } + unsafe { SetAttribIMsgOnIStg(lpobject as _, lpproptags as _, lppropattrs as _, lpppropproblems as _).ok() } } pub const BlockRange: windows_core::GUID = windows_core::GUID::from_u128(0xb507ca27_2204_11dd_966a_001aa01bbc58); pub const BlockRangeList: windows_core::GUID = windows_core::GUID::from_u128(0xb507ca28_2204_11dd_966a_001aa01bbc58); @@ -3346,7 +3346,7 @@ impl IDiscMaster { } } pub unsafe fn SetActiveDiscMasterFormat(&self, riid: *const windows_core::GUID, ppunk: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetActiveDiscMasterFormat)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(ppunk)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetActiveDiscMasterFormat)(windows_core::Interface::as_raw(self), riid, ppunk as _).ok() } } pub unsafe fn EnumDiscRecorders(&self) -> windows_core::Result { unsafe { @@ -3811,7 +3811,7 @@ impl IDiscRecorder { unsafe { (windows_core::Interface::vtable(self).Init)(windows_core::Interface::as_raw(self), core::mem::transmute(pbyuniqueid.as_ptr()), pbyuniqueid.len().try_into().unwrap(), nuldrivenumber).ok() } } pub unsafe fn GetRecorderGUID(&self, pbyuniqueid: Option<&mut [u8]>, pulreturnsizerequired: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRecorderGUID)(windows_core::Interface::as_raw(self), core::mem::transmute(pbyuniqueid.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbyuniqueid.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pulreturnsizerequired)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecorderGUID)(windows_core::Interface::as_raw(self), core::mem::transmute(pbyuniqueid.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbyuniqueid.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pulreturnsizerequired as _).ok() } } pub unsafe fn GetRecorderType(&self) -> windows_core::Result { unsafe { @@ -3820,7 +3820,7 @@ impl IDiscRecorder { } } 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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetDisplayNames)(windows_core::Interface::as_raw(self), pbstrvendorid.unwrap_or(core::mem::zeroed()) as _, pbstrproductid.unwrap_or(core::mem::zeroed()) as _, pbstrrevision.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetBasePnPID(&self) -> windows_core::Result { unsafe { @@ -3858,10 +3858,10 @@ impl IDiscRecorder { unsafe { (windows_core::Interface::vtable(self).OpenExclusive)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn QueryMediaType(&self, fmediatype: *mut MEDIA_TYPES, fmediaflags: *mut MEDIA_FLAGS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryMediaType)(windows_core::Interface::as_raw(self), core::mem::transmute(fmediatype), core::mem::transmute(fmediaflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryMediaType)(windows_core::Interface::as_raw(self), fmediatype as _, fmediaflags as _).ok() } } pub unsafe fn QueryMediaInfo(&self, pbsessions: *mut u8, pblasttrack: *mut u8, ulstartaddress: *mut u32, ulnextwritable: *mut u32, ulfreeblocks: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryMediaInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pbsessions), core::mem::transmute(pblasttrack), core::mem::transmute(ulstartaddress), core::mem::transmute(ulnextwritable), core::mem::transmute(ulfreeblocks)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryMediaInfo)(windows_core::Interface::as_raw(self), pbsessions as _, pblasttrack as _, ulstartaddress as _, ulnextwritable as _, ulfreeblocks as _).ok() } } pub unsafe fn Eject(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Eject)(windows_core::Interface::as_raw(self)).ok() } @@ -4511,43 +4511,43 @@ impl IDiscRecorder2Ex { unsafe { (windows_core::Interface::vtable(self).SendCommandSendDataToDevice)(windows_core::Interface::as_raw(self), core::mem::transmute(cdb.as_ptr()), cdb.len().try_into().unwrap(), core::mem::transmute(sensebuffer.as_ptr()), timeout, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()).ok() } } pub unsafe fn SendCommandGetDataFromDevice(&self, cdb: &[u8], sensebuffer: &mut [u8; 18], timeout: u32, buffer: &mut [u8], bufferfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SendCommandGetDataFromDevice)(windows_core::Interface::as_raw(self), core::mem::transmute(cdb.as_ptr()), cdb.len().try_into().unwrap(), core::mem::transmute(sensebuffer.as_ptr()), timeout, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(bufferfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).SendCommandGetDataFromDevice)(windows_core::Interface::as_raw(self), core::mem::transmute(cdb.as_ptr()), cdb.len().try_into().unwrap(), core::mem::transmute(sensebuffer.as_ptr()), timeout, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), bufferfetched as _).ok() } } pub unsafe fn ReadDvdStructure(&self, format: u32, address: u32, layer: u32, agid: u32, data: *mut *mut u8, count: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadDvdStructure)(windows_core::Interface::as_raw(self), format, address, layer, agid, core::mem::transmute(data), core::mem::transmute(count)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadDvdStructure)(windows_core::Interface::as_raw(self), format, address, layer, agid, data as _, count as _).ok() } } pub unsafe fn SendDvdStructure(&self, format: u32, data: &[u8]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SendDvdStructure)(windows_core::Interface::as_raw(self), format, core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap()).ok() } } pub unsafe fn GetAdapterDescriptor(&self, data: *mut *mut u8, bytesize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAdapterDescriptor)(windows_core::Interface::as_raw(self), core::mem::transmute(data), core::mem::transmute(bytesize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAdapterDescriptor)(windows_core::Interface::as_raw(self), data as _, bytesize as _).ok() } } pub unsafe fn GetDeviceDescriptor(&self, data: *mut *mut u8, bytesize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeviceDescriptor)(windows_core::Interface::as_raw(self), core::mem::transmute(data), core::mem::transmute(bytesize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeviceDescriptor)(windows_core::Interface::as_raw(self), data as _, bytesize as _).ok() } } pub unsafe fn GetDiscInformation(&self, discinformation: *mut *mut u8, bytesize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDiscInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(discinformation), core::mem::transmute(bytesize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDiscInformation)(windows_core::Interface::as_raw(self), discinformation as _, bytesize as _).ok() } } pub unsafe fn GetTrackInformation(&self, address: u32, addresstype: IMAPI_READ_TRACK_ADDRESS_TYPE, trackinformation: *mut *mut u8, bytesize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTrackInformation)(windows_core::Interface::as_raw(self), address, addresstype, core::mem::transmute(trackinformation), core::mem::transmute(bytesize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTrackInformation)(windows_core::Interface::as_raw(self), address, addresstype, trackinformation as _, bytesize as _).ok() } } pub unsafe fn GetFeaturePage(&self, requestedfeature: IMAPI_FEATURE_PAGE_TYPE, currentfeatureonly: bool, featuredata: *mut *mut u8, bytesize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFeaturePage)(windows_core::Interface::as_raw(self), requestedfeature, currentfeatureonly, core::mem::transmute(featuredata), core::mem::transmute(bytesize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFeaturePage)(windows_core::Interface::as_raw(self), requestedfeature, currentfeatureonly, featuredata as _, bytesize as _).ok() } } pub unsafe fn GetModePage(&self, requestedmodepage: IMAPI_MODE_PAGE_TYPE, requesttype: IMAPI_MODE_PAGE_REQUEST_TYPE, modepagedata: *mut *mut u8, bytesize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetModePage)(windows_core::Interface::as_raw(self), requestedmodepage, requesttype, core::mem::transmute(modepagedata), core::mem::transmute(bytesize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModePage)(windows_core::Interface::as_raw(self), requestedmodepage, requesttype, modepagedata as _, bytesize as _).ok() } } pub unsafe fn SetModePage(&self, requesttype: IMAPI_MODE_PAGE_REQUEST_TYPE, data: &[u8]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetModePage)(windows_core::Interface::as_raw(self), requesttype, core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap()).ok() } } pub unsafe fn GetSupportedFeaturePages(&self, currentfeatureonly: bool, featuredata: *mut *mut IMAPI_FEATURE_PAGE_TYPE, bytesize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSupportedFeaturePages)(windows_core::Interface::as_raw(self), currentfeatureonly, core::mem::transmute(featuredata), core::mem::transmute(bytesize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSupportedFeaturePages)(windows_core::Interface::as_raw(self), currentfeatureonly, featuredata as _, bytesize as _).ok() } } pub unsafe fn GetSupportedProfiles(&self, currentonly: bool, profiletypes: *mut *mut IMAPI_PROFILE_TYPE, validprofiles: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSupportedProfiles)(windows_core::Interface::as_raw(self), currentonly, core::mem::transmute(profiletypes), core::mem::transmute(validprofiles)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSupportedProfiles)(windows_core::Interface::as_raw(self), currentonly, profiletypes as _, validprofiles as _).ok() } } pub unsafe fn GetSupportedModePages(&self, requesttype: IMAPI_MODE_PAGE_REQUEST_TYPE, modepagetypes: *mut *mut IMAPI_MODE_PAGE_TYPE, validpages: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSupportedModePages)(windows_core::Interface::as_raw(self), requesttype, core::mem::transmute(modepagetypes), core::mem::transmute(validpages)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSupportedModePages)(windows_core::Interface::as_raw(self), requesttype, modepagetypes as _, validpages as _).ok() } } pub unsafe fn GetByteAlignmentMask(&self) -> windows_core::Result { unsafe { @@ -4769,7 +4769,7 @@ windows_core::imp::define_interface!(IEnumDiscMasterFormats, IEnumDiscMasterForm windows_core::imp::interface_hierarchy!(IEnumDiscMasterFormats, windows_core::IUnknown); impl IEnumDiscMasterFormats { pub unsafe fn Next(&self, lpiidformatid: &mut [windows_core::GUID], pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), lpiidformatid.len().try_into().unwrap(), core::mem::transmute(lpiidformatid.as_ptr()), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), lpiidformatid.len().try_into().unwrap(), core::mem::transmute(lpiidformatid.as_ptr()), pcfetched as _).ok() } } pub unsafe fn Skip(&self, cformats: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), cformats).ok() } @@ -4847,7 +4847,7 @@ windows_core::imp::define_interface!(IEnumDiscRecorders, IEnumDiscRecorders_Vtbl windows_core::imp::interface_hierarchy!(IEnumDiscRecorders, windows_core::IUnknown); impl IEnumDiscRecorders { pub unsafe fn Next(&self, pprecorder: &mut [Option], pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pprecorder.len().try_into().unwrap(), core::mem::transmute(pprecorder.as_ptr()), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pprecorder.len().try_into().unwrap(), core::mem::transmute(pprecorder.as_ptr()), pcfetched as _).ok() } } pub unsafe fn Skip(&self, crecorders: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), crecorders).ok() } @@ -4926,7 +4926,7 @@ windows_core::imp::interface_hierarchy!(IEnumFsiItems, windows_core::IUnknown); impl IEnumFsiItems { #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -5011,7 +5011,7 @@ windows_core::imp::interface_hierarchy!(IEnumProgressItems, windows_core::IUnkno impl IEnumProgressItems { #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -9664,7 +9664,7 @@ impl IStreamPseudoRandomBased { unsafe { (windows_core::Interface::vtable(self).put_ExtendedSeed)(windows_core::Interface::as_raw(self), core::mem::transmute(values.as_ptr()), values.len().try_into().unwrap()).ok() } } pub unsafe fn get_ExtendedSeed(&self, values: *mut *mut u32, ecount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_ExtendedSeed)(windows_core::Interface::as_raw(self), core::mem::transmute(values), core::mem::transmute(ecount)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_ExtendedSeed)(windows_core::Interface::as_raw(self), values as _, ecount as _).ok() } } } #[cfg(feature = "Win32_System_Com")] diff --git a/crates/libs/windows/src/Windows/Win32/Storage/IndexServer/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/IndexServer/mod.rs index 8f58317c9b..29f0f656cf 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/IndexServer/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/IndexServer/mod.rs @@ -6,7 +6,7 @@ where P1: windows_core::Param, { windows_targets::link!("query.dll" "system" fn BindIFilterFromStorage(pstg : * mut core::ffi::c_void, punkouter : * mut core::ffi::c_void, ppiunk : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { BindIFilterFromStorage(pstg.param().abi(), punkouter.param().abi(), core::mem::transmute(ppiunk)).ok() } + unsafe { BindIFilterFromStorage(pstg.param().abi(), punkouter.param().abi(), ppiunk as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -16,7 +16,7 @@ where P1: windows_core::Param, { windows_targets::link!("query.dll" "system" fn BindIFilterFromStream(pstm : * mut core::ffi::c_void, punkouter : * mut core::ffi::c_void, ppiunk : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { BindIFilterFromStream(pstm.param().abi(), punkouter.param().abi(), core::mem::transmute(ppiunk)).ok() } + unsafe { BindIFilterFromStream(pstm.param().abi(), punkouter.param().abi(), ppiunk as _).ok() } } #[inline] pub unsafe fn LoadIFilter(pwcspath: P0, punkouter: P1, ppiunk: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -25,7 +25,7 @@ where P1: windows_core::Param, { windows_targets::link!("query.dll" "system" fn LoadIFilter(pwcspath : windows_core::PCWSTR, punkouter : * mut core::ffi::c_void, ppiunk : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { LoadIFilter(pwcspath.param().abi(), punkouter.param().abi(), core::mem::transmute(ppiunk)).ok() } + unsafe { LoadIFilter(pwcspath.param().abi(), punkouter.param().abi(), ppiunk as _).ok() } } #[inline] pub unsafe fn LoadIFilterEx(pwcspath: P0, dwflags: u32, riid: *const windows_core::GUID, ppiunk: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -33,7 +33,7 @@ where P0: windows_core::Param, { windows_targets::link!("query.dll" "system" fn LoadIFilterEx(pwcspath : windows_core::PCWSTR, dwflags : u32, riid : *const windows_core::GUID, ppiunk : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { LoadIFilterEx(pwcspath.param().abi(), dwflags, riid, core::mem::transmute(ppiunk)).ok() } + unsafe { LoadIFilterEx(pwcspath.param().abi(), dwflags, riid, ppiunk as _).ok() } } #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] @@ -297,21 +297,21 @@ windows_core::imp::interface_hierarchy!(IFilter, windows_core::IUnknown); impl IFilter { #[cfg(feature = "Win32_System_Com_StructuredStorage")] pub unsafe fn Init(&self, grfflags: u32, aattributes: &[FULLPROPSPEC], pflags: *mut u32) -> i32 { - unsafe { (windows_core::Interface::vtable(self).Init)(windows_core::Interface::as_raw(self), grfflags, aattributes.len().try_into().unwrap(), core::mem::transmute(aattributes.as_ptr()), core::mem::transmute(pflags)) } + unsafe { (windows_core::Interface::vtable(self).Init)(windows_core::Interface::as_raw(self), grfflags, aattributes.len().try_into().unwrap(), core::mem::transmute(aattributes.as_ptr()), pflags as _) } } #[cfg(feature = "Win32_System_Com_StructuredStorage")] pub unsafe fn GetChunk(&self, pstat: *mut STAT_CHUNK) -> i32 { - unsafe { (windows_core::Interface::vtable(self).GetChunk)(windows_core::Interface::as_raw(self), core::mem::transmute(pstat)) } + unsafe { (windows_core::Interface::vtable(self).GetChunk)(windows_core::Interface::as_raw(self), pstat as _) } } pub unsafe fn GetText(&self, pcwcbuffer: *mut u32, awcbuffer: windows_core::PWSTR) -> i32 { - unsafe { (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), core::mem::transmute(pcwcbuffer), core::mem::transmute(awcbuffer)) } + unsafe { (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), pcwcbuffer as _, core::mem::transmute(awcbuffer)) } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn GetValue(&self, pppropvalue: *mut *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> i32 { - unsafe { (windows_core::Interface::vtable(self).GetValue)(windows_core::Interface::as_raw(self), core::mem::transmute(pppropvalue)) } + unsafe { (windows_core::Interface::vtable(self).GetValue)(windows_core::Interface::as_raw(self), pppropvalue as _) } } pub unsafe fn BindRegion(&self, origpos: FILTERREGION, riid: *const windows_core::GUID, ppunk: *mut *mut core::ffi::c_void) -> i32 { - unsafe { (windows_core::Interface::vtable(self).BindRegion)(windows_core::Interface::as_raw(self), core::mem::transmute(origpos), riid, core::mem::transmute(ppunk)) } + unsafe { (windows_core::Interface::vtable(self).BindRegion)(windows_core::Interface::as_raw(self), core::mem::transmute(origpos), riid, ppunk as _) } } } #[repr(C)] 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 d48d6e33c4..b2a81612e2 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/InstallableFileSystems/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/InstallableFileSystems/mod.rs @@ -6,7 +6,7 @@ where 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); - unsafe { 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() } + unsafe { FilterAttach(lpfiltername.param().abi(), lpvolumename.param().abi(), lpinstancename.param().abi(), dwcreatedinstancenamelength.unwrap_or(core::mem::zeroed()) as _, lpcreatedinstancename.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn FilterAttachAtAltitude(lpfiltername: P0, lpvolumename: P1, lpaltitude: P2, lpinstancename: P3, dwcreatedinstancenamelength: Option, lpcreatedinstancename: Option) -> windows_core::Result<()> @@ -17,7 +17,7 @@ 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); - unsafe { 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() } + unsafe { FilterAttachAtAltitude(lpfiltername.param().abi(), lpvolumename.param().abi(), lpaltitude.param().abi(), lpinstancename.param().abi(), dwcreatedinstancenamelength.unwrap_or(core::mem::zeroed()) as _, lpcreatedinstancename.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn FilterClose(hfilter: HFILTER) -> windows_core::Result<()> { @@ -33,7 +33,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); unsafe { let mut result__ = core::mem::zeroed(); - FilterConnectCommunicationPort(lpportname.param().abi(), dwoptions, core::mem::transmute(lpcontext.unwrap_or(core::mem::zeroed())), wsizeofcontext, core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + FilterConnectCommunicationPort(lpportname.param().abi(), dwoptions, lpcontext.unwrap_or(core::mem::zeroed()) as _, wsizeofcontext, lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -65,12 +65,12 @@ pub unsafe fn FilterFindClose(hfilterfind: super::super::Foundation::HANDLE) -> #[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<()> { windows_targets::link!("fltlib.dll" "system" 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::HRESULT); - unsafe { FilterFindFirst(dwinformationclass, core::mem::transmute(lpbuffer), dwbuffersize, core::mem::transmute(lpbytesreturned), core::mem::transmute(lpfilterfind)).ok() } + unsafe { FilterFindFirst(dwinformationclass, lpbuffer as _, dwbuffersize, lpbytesreturned as _, lpfilterfind as _).ok() } } #[inline] 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); - unsafe { FilterFindNext(hfilterfind, dwinformationclass, core::mem::transmute(lpbuffer), dwbuffersize, core::mem::transmute(lpbytesreturned)).ok() } + unsafe { FilterFindNext(hfilterfind, dwinformationclass, lpbuffer as _, dwbuffersize, lpbytesreturned as _).ok() } } #[inline] pub unsafe fn FilterGetDosName(lpvolumename: P0, lpdosname: &mut [u16]) -> windows_core::Result<()> @@ -83,13 +83,13 @@ where #[inline] 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); - unsafe { FilterGetInformation(hfilter, dwinformationclass, core::mem::transmute(lpbuffer), dwbuffersize, core::mem::transmute(lpbytesreturned)).ok() } + unsafe { FilterGetInformation(hfilter, dwinformationclass, lpbuffer as _, dwbuffersize, lpbytesreturned as _).ok() } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { FilterGetMessage(hport, core::mem::transmute(lpmessagebuffer), dwmessagebuffersize, core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { FilterGetMessage(hport, lpmessagebuffer as _, dwmessagebuffersize, lpoverlapped.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn FilterInstanceClose(hinstance: HFILTER_INSTANCE) -> windows_core::Result<()> { @@ -120,17 +120,17 @@ where P0: windows_core::Param, { windows_targets::link!("fltlib.dll" "system" fn FilterInstanceFindFirst(lpfiltername : windows_core::PCWSTR, dwinformationclass : INSTANCE_INFORMATION_CLASS, lpbuffer : *mut core::ffi::c_void, dwbuffersize : u32, lpbytesreturned : *mut u32, lpfilterinstancefind : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - unsafe { FilterInstanceFindFirst(lpfiltername.param().abi(), dwinformationclass, core::mem::transmute(lpbuffer), dwbuffersize, core::mem::transmute(lpbytesreturned), core::mem::transmute(lpfilterinstancefind)).ok() } + unsafe { FilterInstanceFindFirst(lpfiltername.param().abi(), dwinformationclass, lpbuffer as _, dwbuffersize, lpbytesreturned as _, lpfilterinstancefind as _).ok() } } #[inline] 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); - unsafe { FilterInstanceFindNext(hfilterinstancefind, dwinformationclass, core::mem::transmute(lpbuffer), dwbuffersize, core::mem::transmute(lpbytesreturned)).ok() } + unsafe { FilterInstanceFindNext(hfilterinstancefind, dwinformationclass, lpbuffer as _, dwbuffersize, lpbytesreturned as _).ok() } } #[inline] 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); - unsafe { FilterInstanceGetInformation(hinstance, dwinformationclass, core::mem::transmute(lpbuffer), dwbuffersize, core::mem::transmute(lpbytesreturned)).ok() } + unsafe { FilterInstanceGetInformation(hinstance, dwinformationclass, lpbuffer as _, dwbuffersize, lpbytesreturned as _).ok() } } #[inline] pub unsafe fn FilterLoad(lpfiltername: P0) -> windows_core::Result<()> @@ -148,7 +148,7 @@ pub unsafe fn FilterReplyMessage(hport: super::super::Foundation::HANDLE, lprepl #[inline] 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); - unsafe { FilterSendMessage(hport, lpinbuffer, dwinbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), dwoutbuffersize, core::mem::transmute(lpbytesreturned)).ok() } + unsafe { FilterSendMessage(hport, lpinbuffer, dwinbuffersize, lpoutbuffer.unwrap_or(core::mem::zeroed()) as _, dwoutbuffersize, lpbytesreturned as _).ok() } } #[inline] pub unsafe fn FilterUnload(lpfiltername: P0) -> windows_core::Result<()> @@ -166,12 +166,12 @@ pub unsafe fn FilterVolumeFindClose(hvolumefind: super::super::Foundation::HANDL #[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<()> { windows_targets::link!("fltlib.dll" "system" 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::HRESULT); - unsafe { FilterVolumeFindFirst(dwinformationclass, core::mem::transmute(lpbuffer), dwbuffersize, core::mem::transmute(lpbytesreturned), core::mem::transmute(lpvolumefind)).ok() } + unsafe { FilterVolumeFindFirst(dwinformationclass, lpbuffer as _, dwbuffersize, lpbytesreturned as _, lpvolumefind as _).ok() } } #[inline] 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); - unsafe { FilterVolumeFindNext(hvolumefind, dwinformationclass, core::mem::transmute(lpbuffer), dwbuffersize, core::mem::transmute(lpbytesreturned)).ok() } + unsafe { FilterVolumeFindNext(hvolumefind, dwinformationclass, lpbuffer as _, dwbuffersize, lpbytesreturned as _).ok() } } #[inline] pub unsafe fn FilterVolumeInstanceFindClose(hvolumeinstancefind: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -184,12 +184,12 @@ where P0: windows_core::Param, { windows_targets::link!("fltlib.dll" "system" fn FilterVolumeInstanceFindFirst(lpvolumename : windows_core::PCWSTR, dwinformationclass : INSTANCE_INFORMATION_CLASS, lpbuffer : *mut core::ffi::c_void, dwbuffersize : u32, lpbytesreturned : *mut u32, lpvolumeinstancefind : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - unsafe { FilterVolumeInstanceFindFirst(lpvolumename.param().abi(), dwinformationclass, core::mem::transmute(lpbuffer), dwbuffersize, core::mem::transmute(lpbytesreturned), core::mem::transmute(lpvolumeinstancefind)).ok() } + unsafe { FilterVolumeInstanceFindFirst(lpvolumename.param().abi(), dwinformationclass, lpbuffer as _, dwbuffersize, lpbytesreturned as _, lpvolumeinstancefind as _).ok() } } #[inline] 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); - unsafe { FilterVolumeInstanceFindNext(hvolumeinstancefind, dwinformationclass, core::mem::transmute(lpbuffer), dwbuffersize, core::mem::transmute(lpbytesreturned)).ok() } + unsafe { FilterVolumeInstanceFindNext(hvolumeinstancefind, dwinformationclass, lpbuffer as _, dwbuffersize, lpbytesreturned as _).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 51851bbfae..3a87ec04c6 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/IscsiDisc/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/IscsiDisc/mod.rs @@ -17,12 +17,12 @@ where #[inline] pub unsafe fn AddIScsiConnectionA(uniquesessionid: *mut ISCSI_UNIQUE_SESSION_ID, reserved: *mut core::ffi::c_void, initiatorportnumber: u32, targetportal: *mut ISCSI_TARGET_PORTALA, securityflags: u64, loginoptions: *mut ISCSI_LOGIN_OPTIONS, key: Option<&[u8]>, connectionid: *mut ISCSI_UNIQUE_SESSION_ID) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn AddIScsiConnectionA(uniquesessionid : *mut ISCSI_UNIQUE_SESSION_ID, reserved : *mut core::ffi::c_void, initiatorportnumber : u32, targetportal : *mut ISCSI_TARGET_PORTALA, securityflags : u64, loginoptions : *mut ISCSI_LOGIN_OPTIONS, keysize : u32, key : windows_core::PCSTR, connectionid : *mut ISCSI_UNIQUE_SESSION_ID) -> u32); - unsafe { AddIScsiConnectionA(core::mem::transmute(uniquesessionid), core::mem::transmute(reserved), initiatorportnumber, core::mem::transmute(targetportal), securityflags, core::mem::transmute(loginoptions), key.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(key.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(connectionid)) } + unsafe { AddIScsiConnectionA(uniquesessionid as _, reserved as _, initiatorportnumber, targetportal as _, securityflags, loginoptions as _, key.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(key.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), connectionid as _) } } #[inline] pub unsafe fn AddIScsiConnectionW(uniquesessionid: *mut ISCSI_UNIQUE_SESSION_ID, reserved: *mut core::ffi::c_void, initiatorportnumber: u32, targetportal: *mut ISCSI_TARGET_PORTALW, securityflags: u64, loginoptions: *mut ISCSI_LOGIN_OPTIONS, key: Option<&[u8]>, connectionid: *mut ISCSI_UNIQUE_SESSION_ID) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn AddIScsiConnectionW(uniquesessionid : *mut ISCSI_UNIQUE_SESSION_ID, reserved : *mut core::ffi::c_void, initiatorportnumber : u32, targetportal : *mut ISCSI_TARGET_PORTALW, securityflags : u64, loginoptions : *mut ISCSI_LOGIN_OPTIONS, keysize : u32, key : windows_core::PCSTR, connectionid : *mut ISCSI_UNIQUE_SESSION_ID) -> u32); - unsafe { AddIScsiConnectionW(core::mem::transmute(uniquesessionid), core::mem::transmute(reserved), initiatorportnumber, core::mem::transmute(targetportal), securityflags, core::mem::transmute(loginoptions), key.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(key.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(connectionid)) } + unsafe { AddIScsiConnectionW(uniquesessionid as _, reserved as _, initiatorportnumber, targetportal as _, securityflags, loginoptions as _, key.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(key.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), connectionid as _) } } #[inline] pub unsafe fn AddIScsiSendTargetPortalA(initiatorinstance: P0, initiatorportnumber: u32, loginoptions: *mut ISCSI_LOGIN_OPTIONS, securityflags: u64, portal: *mut ISCSI_TARGET_PORTALA) -> u32 @@ -30,7 +30,7 @@ where P0: windows_core::Param, { windows_targets::link!("iscsidsc.dll" "system" fn AddIScsiSendTargetPortalA(initiatorinstance : windows_core::PCSTR, initiatorportnumber : u32, loginoptions : *mut ISCSI_LOGIN_OPTIONS, securityflags : u64, portal : *mut ISCSI_TARGET_PORTALA) -> u32); - unsafe { AddIScsiSendTargetPortalA(initiatorinstance.param().abi(), initiatorportnumber, core::mem::transmute(loginoptions), securityflags, core::mem::transmute(portal)) } + unsafe { AddIScsiSendTargetPortalA(initiatorinstance.param().abi(), initiatorportnumber, loginoptions as _, securityflags, portal as _) } } #[inline] pub unsafe fn AddIScsiSendTargetPortalW(initiatorinstance: P0, initiatorportnumber: u32, loginoptions: *mut ISCSI_LOGIN_OPTIONS, securityflags: u64, portal: *mut ISCSI_TARGET_PORTALW) -> u32 @@ -38,7 +38,7 @@ where P0: windows_core::Param, { windows_targets::link!("iscsidsc.dll" "system" fn AddIScsiSendTargetPortalW(initiatorinstance : windows_core::PCWSTR, initiatorportnumber : u32, loginoptions : *mut ISCSI_LOGIN_OPTIONS, securityflags : u64, portal : *mut ISCSI_TARGET_PORTALW) -> u32); - unsafe { AddIScsiSendTargetPortalW(initiatorinstance.param().abi(), initiatorportnumber, core::mem::transmute(loginoptions), securityflags, core::mem::transmute(portal)) } + unsafe { AddIScsiSendTargetPortalW(initiatorinstance.param().abi(), initiatorportnumber, loginoptions as _, securityflags, portal as _) } } #[inline] pub unsafe fn AddIScsiStaticTargetA(targetname: P0, targetalias: P1, targetflags: u32, persist: bool, mappings: *mut ISCSI_TARGET_MAPPINGA, loginoptions: *mut ISCSI_LOGIN_OPTIONS, portalgroup: *mut ISCSI_TARGET_PORTAL_GROUPA) -> u32 @@ -47,7 +47,7 @@ where P1: windows_core::Param, { windows_targets::link!("iscsidsc.dll" "system" fn AddIScsiStaticTargetA(targetname : windows_core::PCSTR, targetalias : windows_core::PCSTR, targetflags : u32, persist : bool, mappings : *mut ISCSI_TARGET_MAPPINGA, loginoptions : *mut ISCSI_LOGIN_OPTIONS, portalgroup : *mut ISCSI_TARGET_PORTAL_GROUPA) -> u32); - unsafe { AddIScsiStaticTargetA(targetname.param().abi(), targetalias.param().abi(), targetflags, persist, core::mem::transmute(mappings), core::mem::transmute(loginoptions), core::mem::transmute(portalgroup)) } + unsafe { AddIScsiStaticTargetA(targetname.param().abi(), targetalias.param().abi(), targetflags, persist, mappings as _, loginoptions as _, portalgroup as _) } } #[inline] pub unsafe fn AddIScsiStaticTargetW(targetname: P0, targetalias: P1, targetflags: u32, persist: bool, mappings: *mut ISCSI_TARGET_MAPPINGW, loginoptions: *mut ISCSI_LOGIN_OPTIONS, portalgroup: *mut ISCSI_TARGET_PORTAL_GROUPW) -> u32 @@ -56,7 +56,7 @@ where P1: windows_core::Param, { windows_targets::link!("iscsidsc.dll" "system" fn AddIScsiStaticTargetW(targetname : windows_core::PCWSTR, targetalias : windows_core::PCWSTR, targetflags : u32, persist : bool, mappings : *mut ISCSI_TARGET_MAPPINGW, loginoptions : *mut ISCSI_LOGIN_OPTIONS, portalgroup : *mut ISCSI_TARGET_PORTAL_GROUPW) -> u32); - unsafe { AddIScsiStaticTargetW(targetname.param().abi(), targetalias.param().abi(), targetflags, persist, core::mem::transmute(mappings), core::mem::transmute(loginoptions), core::mem::transmute(portalgroup)) } + unsafe { AddIScsiStaticTargetW(targetname.param().abi(), targetalias.param().abi(), targetflags, persist, mappings as _, loginoptions as _, portalgroup as _) } } #[inline] pub unsafe fn AddPersistentIScsiDeviceA(devicepath: P0) -> u32 @@ -99,13 +99,13 @@ pub unsafe fn ClearPersistentIScsiDevices() -> u32 { #[inline] pub unsafe fn GetDevicesForIScsiSessionA(uniquesessionid: *mut ISCSI_UNIQUE_SESSION_ID, devicecount: *mut u32, devices: *mut ISCSI_DEVICE_ON_SESSIONA) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn GetDevicesForIScsiSessionA(uniquesessionid : *mut ISCSI_UNIQUE_SESSION_ID, devicecount : *mut u32, devices : *mut ISCSI_DEVICE_ON_SESSIONA) -> u32); - unsafe { GetDevicesForIScsiSessionA(core::mem::transmute(uniquesessionid), core::mem::transmute(devicecount), core::mem::transmute(devices)) } + unsafe { GetDevicesForIScsiSessionA(uniquesessionid as _, devicecount as _, devices as _) } } #[cfg(feature = "Win32_System_Ioctl")] #[inline] pub unsafe fn GetDevicesForIScsiSessionW(uniquesessionid: *mut ISCSI_UNIQUE_SESSION_ID, devicecount: *mut u32, devices: *mut ISCSI_DEVICE_ON_SESSIONW) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn GetDevicesForIScsiSessionW(uniquesessionid : *mut ISCSI_UNIQUE_SESSION_ID, devicecount : *mut u32, devices : *mut ISCSI_DEVICE_ON_SESSIONW) -> u32); - unsafe { GetDevicesForIScsiSessionW(core::mem::transmute(uniquesessionid), core::mem::transmute(devicecount), core::mem::transmute(devices)) } + unsafe { GetDevicesForIScsiSessionW(uniquesessionid as _, devicecount as _, devices as _) } } #[inline] pub unsafe fn GetIScsiIKEInfoA(initiatorname: P0, initiatorportnumber: u32, reserved: *mut u32, authinfo: *mut IKE_AUTHENTICATION_INFORMATION) -> u32 @@ -113,7 +113,7 @@ where P0: windows_core::Param, { windows_targets::link!("iscsidsc.dll" "system" fn GetIScsiIKEInfoA(initiatorname : windows_core::PCSTR, initiatorportnumber : u32, reserved : *mut u32, authinfo : *mut IKE_AUTHENTICATION_INFORMATION) -> u32); - unsafe { GetIScsiIKEInfoA(initiatorname.param().abi(), initiatorportnumber, core::mem::transmute(reserved), core::mem::transmute(authinfo)) } + unsafe { GetIScsiIKEInfoA(initiatorname.param().abi(), initiatorportnumber, reserved as _, authinfo as _) } } #[inline] pub unsafe fn GetIScsiIKEInfoW(initiatorname: P0, initiatorportnumber: u32, reserved: *mut u32, authinfo: *mut IKE_AUTHENTICATION_INFORMATION) -> u32 @@ -121,7 +121,7 @@ where P0: windows_core::Param, { windows_targets::link!("iscsidsc.dll" "system" fn GetIScsiIKEInfoW(initiatorname : windows_core::PCWSTR, initiatorportnumber : u32, reserved : *mut u32, authinfo : *mut IKE_AUTHENTICATION_INFORMATION) -> u32); - unsafe { GetIScsiIKEInfoW(initiatorname.param().abi(), initiatorportnumber, core::mem::transmute(reserved), core::mem::transmute(authinfo)) } + unsafe { GetIScsiIKEInfoW(initiatorname.param().abi(), initiatorportnumber, reserved as _, authinfo as _) } } #[inline] pub unsafe fn GetIScsiInitiatorNodeNameA(initiatornodename: windows_core::PSTR) -> u32 { @@ -136,17 +136,17 @@ pub unsafe fn GetIScsiInitiatorNodeNameW(initiatornodename: windows_core::PWSTR) #[inline] pub unsafe fn GetIScsiSessionListA(buffersize: *mut u32, sessioncount: *mut u32, sessioninfo: *mut ISCSI_SESSION_INFOA) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn GetIScsiSessionListA(buffersize : *mut u32, sessioncount : *mut u32, sessioninfo : *mut ISCSI_SESSION_INFOA) -> u32); - unsafe { GetIScsiSessionListA(core::mem::transmute(buffersize), core::mem::transmute(sessioncount), core::mem::transmute(sessioninfo)) } + unsafe { GetIScsiSessionListA(buffersize as _, sessioncount as _, sessioninfo as _) } } #[inline] pub unsafe fn GetIScsiSessionListEx(buffersize: *mut u32, sessioncountptr: *mut u32, sessioninfo: *mut ISCSI_SESSION_INFO_EX) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn GetIScsiSessionListEx(buffersize : *mut u32, sessioncountptr : *mut u32, sessioninfo : *mut ISCSI_SESSION_INFO_EX) -> u32); - unsafe { GetIScsiSessionListEx(core::mem::transmute(buffersize), core::mem::transmute(sessioncountptr), core::mem::transmute(sessioninfo)) } + unsafe { GetIScsiSessionListEx(buffersize as _, sessioncountptr as _, sessioninfo as _) } } #[inline] pub unsafe fn GetIScsiSessionListW(buffersize: *mut u32, sessioncount: *mut u32, sessioninfo: *mut ISCSI_SESSION_INFOW) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn GetIScsiSessionListW(buffersize : *mut u32, sessioncount : *mut u32, sessioninfo : *mut ISCSI_SESSION_INFOW) -> u32); - unsafe { GetIScsiSessionListW(core::mem::transmute(buffersize), core::mem::transmute(sessioncount), core::mem::transmute(sessioninfo)) } + unsafe { GetIScsiSessionListW(buffersize as _, sessioncount as _, sessioninfo as _) } } #[inline] pub unsafe fn GetIScsiTargetInformationA(targetname: P0, discoverymechanism: P1, infoclass: TARGET_INFORMATION_CLASS, buffersize: *mut u32, buffer: *mut core::ffi::c_void) -> u32 @@ -155,7 +155,7 @@ where P1: windows_core::Param, { windows_targets::link!("iscsidsc.dll" "system" fn GetIScsiTargetInformationA(targetname : windows_core::PCSTR, discoverymechanism : windows_core::PCSTR, infoclass : TARGET_INFORMATION_CLASS, buffersize : *mut u32, buffer : *mut core::ffi::c_void) -> u32); - unsafe { GetIScsiTargetInformationA(targetname.param().abi(), discoverymechanism.param().abi(), infoclass, core::mem::transmute(buffersize), core::mem::transmute(buffer)) } + unsafe { GetIScsiTargetInformationA(targetname.param().abi(), discoverymechanism.param().abi(), infoclass, buffersize as _, buffer as _) } } #[inline] pub unsafe fn GetIScsiTargetInformationW(targetname: P0, discoverymechanism: P1, infoclass: TARGET_INFORMATION_CLASS, buffersize: *mut u32, buffer: *mut core::ffi::c_void) -> u32 @@ -164,12 +164,12 @@ where P1: windows_core::Param, { windows_targets::link!("iscsidsc.dll" "system" fn GetIScsiTargetInformationW(targetname : windows_core::PCWSTR, discoverymechanism : windows_core::PCWSTR, infoclass : TARGET_INFORMATION_CLASS, buffersize : *mut u32, buffer : *mut core::ffi::c_void) -> u32); - unsafe { GetIScsiTargetInformationW(targetname.param().abi(), discoverymechanism.param().abi(), infoclass, core::mem::transmute(buffersize), core::mem::transmute(buffer)) } + unsafe { GetIScsiTargetInformationW(targetname.param().abi(), discoverymechanism.param().abi(), infoclass, buffersize as _, buffer as _) } } #[inline] pub unsafe fn GetIScsiVersionInformation(versioninfo: *mut ISCSI_VERSION_INFO) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn GetIScsiVersionInformation(versioninfo : *mut ISCSI_VERSION_INFO) -> u32); - unsafe { GetIScsiVersionInformation(core::mem::transmute(versioninfo)) } + unsafe { GetIScsiVersionInformation(versioninfo as _) } } #[inline] pub unsafe fn LoginIScsiTargetA(targetname: P0, isinformationalsession: bool, initiatorinstance: P2, initiatorportnumber: u32, targetportal: *mut ISCSI_TARGET_PORTALA, securityflags: u64, mappings: *mut ISCSI_TARGET_MAPPINGA, loginoptions: *mut ISCSI_LOGIN_OPTIONS, key: Option<&[u8]>, ispersistent: bool, uniquesessionid: *mut ISCSI_UNIQUE_SESSION_ID, uniqueconnectionid: *mut ISCSI_UNIQUE_SESSION_ID) -> u32 @@ -178,7 +178,7 @@ where P2: windows_core::Param, { windows_targets::link!("iscsidsc.dll" "system" fn LoginIScsiTargetA(targetname : windows_core::PCSTR, isinformationalsession : bool, initiatorinstance : windows_core::PCSTR, initiatorportnumber : u32, targetportal : *mut ISCSI_TARGET_PORTALA, securityflags : u64, mappings : *mut ISCSI_TARGET_MAPPINGA, loginoptions : *mut ISCSI_LOGIN_OPTIONS, keysize : u32, key : windows_core::PCSTR, ispersistent : bool, uniquesessionid : *mut ISCSI_UNIQUE_SESSION_ID, uniqueconnectionid : *mut ISCSI_UNIQUE_SESSION_ID) -> u32); - unsafe { LoginIScsiTargetA(targetname.param().abi(), isinformationalsession, initiatorinstance.param().abi(), initiatorportnumber, core::mem::transmute(targetportal), securityflags, core::mem::transmute(mappings), core::mem::transmute(loginoptions), key.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(key.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ispersistent, core::mem::transmute(uniquesessionid), core::mem::transmute(uniqueconnectionid)) } + unsafe { LoginIScsiTargetA(targetname.param().abi(), isinformationalsession, initiatorinstance.param().abi(), initiatorportnumber, targetportal as _, securityflags, mappings as _, loginoptions as _, key.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(key.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ispersistent, uniquesessionid as _, uniqueconnectionid as _) } } #[inline] pub unsafe fn LoginIScsiTargetW(targetname: P0, isinformationalsession: bool, initiatorinstance: P2, initiatorportnumber: u32, targetportal: *mut ISCSI_TARGET_PORTALW, securityflags: u64, mappings: *mut ISCSI_TARGET_MAPPINGW, loginoptions: *mut ISCSI_LOGIN_OPTIONS, key: Option<&[u8]>, ispersistent: bool, uniquesessionid: *mut ISCSI_UNIQUE_SESSION_ID, uniqueconnectionid: *mut ISCSI_UNIQUE_SESSION_ID) -> u32 @@ -187,12 +187,12 @@ where P2: windows_core::Param, { windows_targets::link!("iscsidsc.dll" "system" fn LoginIScsiTargetW(targetname : windows_core::PCWSTR, isinformationalsession : bool, initiatorinstance : windows_core::PCWSTR, initiatorportnumber : u32, targetportal : *mut ISCSI_TARGET_PORTALW, securityflags : u64, mappings : *mut ISCSI_TARGET_MAPPINGW, loginoptions : *mut ISCSI_LOGIN_OPTIONS, keysize : u32, key : windows_core::PCSTR, ispersistent : bool, uniquesessionid : *mut ISCSI_UNIQUE_SESSION_ID, uniqueconnectionid : *mut ISCSI_UNIQUE_SESSION_ID) -> u32); - unsafe { LoginIScsiTargetW(targetname.param().abi(), isinformationalsession, initiatorinstance.param().abi(), initiatorportnumber, core::mem::transmute(targetportal), securityflags, core::mem::transmute(mappings), core::mem::transmute(loginoptions), key.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(key.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ispersistent, core::mem::transmute(uniquesessionid), core::mem::transmute(uniqueconnectionid)) } + unsafe { LoginIScsiTargetW(targetname.param().abi(), isinformationalsession, initiatorinstance.param().abi(), initiatorportnumber, targetportal as _, securityflags, mappings as _, loginoptions as _, key.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(key.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ispersistent, uniquesessionid as _, uniqueconnectionid as _) } } #[inline] pub unsafe fn LogoutIScsiTarget(uniquesessionid: *mut ISCSI_UNIQUE_SESSION_ID) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn LogoutIScsiTarget(uniquesessionid : *mut ISCSI_UNIQUE_SESSION_ID) -> u32); - unsafe { LogoutIScsiTarget(core::mem::transmute(uniquesessionid)) } + unsafe { LogoutIScsiTarget(uniquesessionid as _) } } #[inline] pub unsafe fn RefreshISNSServerA(address: P0) -> u32 @@ -216,7 +216,7 @@ where P0: windows_core::Param, { windows_targets::link!("iscsidsc.dll" "system" fn RefreshIScsiSendTargetPortalA(initiatorinstance : windows_core::PCSTR, initiatorportnumber : u32, portal : *mut ISCSI_TARGET_PORTALA) -> u32); - unsafe { RefreshIScsiSendTargetPortalA(initiatorinstance.param().abi(), initiatorportnumber, core::mem::transmute(portal)) } + unsafe { RefreshIScsiSendTargetPortalA(initiatorinstance.param().abi(), initiatorportnumber, portal as _) } } #[inline] pub unsafe fn RefreshIScsiSendTargetPortalW(initiatorinstance: P0, initiatorportnumber: u32, portal: *mut ISCSI_TARGET_PORTALW) -> u32 @@ -224,7 +224,7 @@ where P0: windows_core::Param, { windows_targets::link!("iscsidsc.dll" "system" fn RefreshIScsiSendTargetPortalW(initiatorinstance : windows_core::PCWSTR, initiatorportnumber : u32, portal : *mut ISCSI_TARGET_PORTALW) -> u32); - unsafe { RefreshIScsiSendTargetPortalW(initiatorinstance.param().abi(), initiatorportnumber, core::mem::transmute(portal)) } + unsafe { RefreshIScsiSendTargetPortalW(initiatorinstance.param().abi(), initiatorportnumber, portal as _) } } #[inline] pub unsafe fn RemoveISNSServerA(address: P0) -> u32 @@ -245,7 +245,7 @@ where #[inline] pub unsafe fn RemoveIScsiConnection(uniquesessionid: *mut ISCSI_UNIQUE_SESSION_ID, connectionid: *mut ISCSI_UNIQUE_SESSION_ID) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn RemoveIScsiConnection(uniquesessionid : *mut ISCSI_UNIQUE_SESSION_ID, connectionid : *mut ISCSI_UNIQUE_SESSION_ID) -> u32); - unsafe { RemoveIScsiConnection(core::mem::transmute(uniquesessionid), core::mem::transmute(connectionid)) } + unsafe { RemoveIScsiConnection(uniquesessionid as _, connectionid as _) } } #[inline] pub unsafe fn RemoveIScsiPersistentTargetA(initiatorinstance: P0, initiatorportnumber: u32, targetname: P2, portal: *mut ISCSI_TARGET_PORTALA) -> u32 @@ -254,7 +254,7 @@ where P2: windows_core::Param, { windows_targets::link!("iscsidsc.dll" "system" fn RemoveIScsiPersistentTargetA(initiatorinstance : windows_core::PCSTR, initiatorportnumber : u32, targetname : windows_core::PCSTR, portal : *mut ISCSI_TARGET_PORTALA) -> u32); - unsafe { RemoveIScsiPersistentTargetA(initiatorinstance.param().abi(), initiatorportnumber, targetname.param().abi(), core::mem::transmute(portal)) } + unsafe { RemoveIScsiPersistentTargetA(initiatorinstance.param().abi(), initiatorportnumber, targetname.param().abi(), portal as _) } } #[inline] pub unsafe fn RemoveIScsiPersistentTargetW(initiatorinstance: P0, initiatorportnumber: u32, targetname: P2, portal: *mut ISCSI_TARGET_PORTALW) -> u32 @@ -263,7 +263,7 @@ where P2: windows_core::Param, { windows_targets::link!("iscsidsc.dll" "system" fn RemoveIScsiPersistentTargetW(initiatorinstance : windows_core::PCWSTR, initiatorportnumber : u32, targetname : windows_core::PCWSTR, portal : *mut ISCSI_TARGET_PORTALW) -> u32); - unsafe { RemoveIScsiPersistentTargetW(initiatorinstance.param().abi(), initiatorportnumber, targetname.param().abi(), core::mem::transmute(portal)) } + unsafe { RemoveIScsiPersistentTargetW(initiatorinstance.param().abi(), initiatorportnumber, targetname.param().abi(), portal as _) } } #[inline] pub unsafe fn RemoveIScsiSendTargetPortalA(initiatorinstance: P0, initiatorportnumber: u32, portal: *mut ISCSI_TARGET_PORTALA) -> u32 @@ -271,7 +271,7 @@ where P0: windows_core::Param, { windows_targets::link!("iscsidsc.dll" "system" fn RemoveIScsiSendTargetPortalA(initiatorinstance : windows_core::PCSTR, initiatorportnumber : u32, portal : *mut ISCSI_TARGET_PORTALA) -> u32); - unsafe { RemoveIScsiSendTargetPortalA(initiatorinstance.param().abi(), initiatorportnumber, core::mem::transmute(portal)) } + unsafe { RemoveIScsiSendTargetPortalA(initiatorinstance.param().abi(), initiatorportnumber, portal as _) } } #[inline] pub unsafe fn RemoveIScsiSendTargetPortalW(initiatorinstance: P0, initiatorportnumber: u32, portal: *mut ISCSI_TARGET_PORTALW) -> u32 @@ -279,7 +279,7 @@ where P0: windows_core::Param, { windows_targets::link!("iscsidsc.dll" "system" fn RemoveIScsiSendTargetPortalW(initiatorinstance : windows_core::PCWSTR, initiatorportnumber : u32, portal : *mut ISCSI_TARGET_PORTALW) -> u32); - unsafe { RemoveIScsiSendTargetPortalW(initiatorinstance.param().abi(), initiatorportnumber, core::mem::transmute(portal)) } + unsafe { RemoveIScsiSendTargetPortalW(initiatorinstance.param().abi(), initiatorportnumber, portal as _) } } #[inline] pub unsafe fn RemoveIScsiStaticTargetA(targetname: P0) -> u32 @@ -332,62 +332,62 @@ where #[inline] pub unsafe fn ReportActiveIScsiTargetMappingsA(buffersize: *mut u32, mappingcount: *mut u32, mappings: *mut ISCSI_TARGET_MAPPINGA) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn ReportActiveIScsiTargetMappingsA(buffersize : *mut u32, mappingcount : *mut u32, mappings : *mut ISCSI_TARGET_MAPPINGA) -> u32); - unsafe { ReportActiveIScsiTargetMappingsA(core::mem::transmute(buffersize), core::mem::transmute(mappingcount), core::mem::transmute(mappings)) } + unsafe { ReportActiveIScsiTargetMappingsA(buffersize as _, mappingcount as _, mappings as _) } } #[inline] pub unsafe fn ReportActiveIScsiTargetMappingsW(buffersize: *mut u32, mappingcount: *mut u32, mappings: *mut ISCSI_TARGET_MAPPINGW) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn ReportActiveIScsiTargetMappingsW(buffersize : *mut u32, mappingcount : *mut u32, mappings : *mut ISCSI_TARGET_MAPPINGW) -> u32); - unsafe { ReportActiveIScsiTargetMappingsW(core::mem::transmute(buffersize), core::mem::transmute(mappingcount), core::mem::transmute(mappings)) } + unsafe { ReportActiveIScsiTargetMappingsW(buffersize as _, mappingcount as _, mappings as _) } } #[inline] 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); - unsafe { ReportISNSServerListA(core::mem::transmute(buffersizeinchar), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } + unsafe { ReportISNSServerListA(buffersizeinchar as _, buffer.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { ReportISNSServerListW(core::mem::transmute(buffersizeinchar), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } + unsafe { ReportISNSServerListW(buffersizeinchar as _, buffer.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { ReportIScsiInitiatorListA(core::mem::transmute(buffersize), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } + unsafe { ReportIScsiInitiatorListA(buffersize as _, buffer.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { ReportIScsiInitiatorListW(core::mem::transmute(buffersize), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } + unsafe { ReportIScsiInitiatorListW(buffersize as _, buffer.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ReportIScsiPersistentLoginsA(count: *mut u32, persistentlogininfo: *mut PERSISTENT_ISCSI_LOGIN_INFOA, buffersizeinbytes: *mut u32) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn ReportIScsiPersistentLoginsA(count : *mut u32, persistentlogininfo : *mut PERSISTENT_ISCSI_LOGIN_INFOA, buffersizeinbytes : *mut u32) -> u32); - unsafe { ReportIScsiPersistentLoginsA(core::mem::transmute(count), core::mem::transmute(persistentlogininfo), core::mem::transmute(buffersizeinbytes)) } + unsafe { ReportIScsiPersistentLoginsA(count as _, persistentlogininfo as _, buffersizeinbytes as _) } } #[inline] pub unsafe fn ReportIScsiPersistentLoginsW(count: *mut u32, persistentlogininfo: *mut PERSISTENT_ISCSI_LOGIN_INFOW, buffersizeinbytes: *mut u32) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn ReportIScsiPersistentLoginsW(count : *mut u32, persistentlogininfo : *mut PERSISTENT_ISCSI_LOGIN_INFOW, buffersizeinbytes : *mut u32) -> u32); - unsafe { ReportIScsiPersistentLoginsW(core::mem::transmute(count), core::mem::transmute(persistentlogininfo), core::mem::transmute(buffersizeinbytes)) } + unsafe { ReportIScsiPersistentLoginsW(count as _, persistentlogininfo as _, buffersizeinbytes as _) } } #[inline] pub unsafe fn ReportIScsiSendTargetPortalsA(portalcount: *mut u32, portalinfo: *mut ISCSI_TARGET_PORTAL_INFOA) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn ReportIScsiSendTargetPortalsA(portalcount : *mut u32, portalinfo : *mut ISCSI_TARGET_PORTAL_INFOA) -> u32); - unsafe { ReportIScsiSendTargetPortalsA(core::mem::transmute(portalcount), core::mem::transmute(portalinfo)) } + unsafe { ReportIScsiSendTargetPortalsA(portalcount as _, portalinfo as _) } } #[inline] pub unsafe fn ReportIScsiSendTargetPortalsExA(portalcount: *mut u32, portalinfosize: *mut u32, portalinfo: *mut ISCSI_TARGET_PORTAL_INFO_EXA) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn ReportIScsiSendTargetPortalsExA(portalcount : *mut u32, portalinfosize : *mut u32, portalinfo : *mut ISCSI_TARGET_PORTAL_INFO_EXA) -> u32); - unsafe { ReportIScsiSendTargetPortalsExA(core::mem::transmute(portalcount), core::mem::transmute(portalinfosize), core::mem::transmute(portalinfo)) } + unsafe { ReportIScsiSendTargetPortalsExA(portalcount as _, portalinfosize as _, portalinfo as _) } } #[inline] pub unsafe fn ReportIScsiSendTargetPortalsExW(portalcount: *mut u32, portalinfosize: *mut u32, portalinfo: *mut ISCSI_TARGET_PORTAL_INFO_EXW) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn ReportIScsiSendTargetPortalsExW(portalcount : *mut u32, portalinfosize : *mut u32, portalinfo : *mut ISCSI_TARGET_PORTAL_INFO_EXW) -> u32); - unsafe { ReportIScsiSendTargetPortalsExW(core::mem::transmute(portalcount), core::mem::transmute(portalinfosize), core::mem::transmute(portalinfo)) } + unsafe { ReportIScsiSendTargetPortalsExW(portalcount as _, portalinfosize as _, portalinfo as _) } } #[inline] pub unsafe fn ReportIScsiSendTargetPortalsW(portalcount: *mut u32, portalinfo: *mut ISCSI_TARGET_PORTAL_INFOW) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn ReportIScsiSendTargetPortalsW(portalcount : *mut u32, portalinfo : *mut ISCSI_TARGET_PORTAL_INFOW) -> u32); - unsafe { ReportIScsiSendTargetPortalsW(core::mem::transmute(portalcount), core::mem::transmute(portalinfo)) } + unsafe { ReportIScsiSendTargetPortalsW(portalcount as _, portalinfo as _) } } #[inline] pub unsafe fn ReportIScsiTargetPortalsA(initiatorname: P0, targetname: P1, targetportaltag: *mut u16, elementcount: *mut u32, portals: *mut ISCSI_TARGET_PORTALA) -> u32 @@ -396,7 +396,7 @@ where P1: windows_core::Param, { windows_targets::link!("iscsidsc.dll" "system" fn ReportIScsiTargetPortalsA(initiatorname : windows_core::PCSTR, targetname : windows_core::PCSTR, targetportaltag : *mut u16, elementcount : *mut u32, portals : *mut ISCSI_TARGET_PORTALA) -> u32); - unsafe { ReportIScsiTargetPortalsA(initiatorname.param().abi(), targetname.param().abi(), core::mem::transmute(targetportaltag), core::mem::transmute(elementcount), core::mem::transmute(portals)) } + unsafe { ReportIScsiTargetPortalsA(initiatorname.param().abi(), targetname.param().abi(), targetportaltag as _, elementcount as _, portals as _) } } #[inline] pub unsafe fn ReportIScsiTargetPortalsW(initiatorname: P0, targetname: P1, targetportaltag: *mut u16, elementcount: *mut u32, portals: *mut ISCSI_TARGET_PORTALW) -> u32 @@ -405,57 +405,57 @@ where P1: windows_core::Param, { windows_targets::link!("iscsidsc.dll" "system" fn ReportIScsiTargetPortalsW(initiatorname : windows_core::PCWSTR, targetname : windows_core::PCWSTR, targetportaltag : *mut u16, elementcount : *mut u32, portals : *mut ISCSI_TARGET_PORTALW) -> u32); - unsafe { ReportIScsiTargetPortalsW(initiatorname.param().abi(), targetname.param().abi(), core::mem::transmute(targetportaltag), core::mem::transmute(elementcount), core::mem::transmute(portals)) } + unsafe { ReportIScsiTargetPortalsW(initiatorname.param().abi(), targetname.param().abi(), targetportaltag as _, elementcount as _, portals as _) } } #[inline] pub unsafe fn ReportIScsiTargetsA(forceupdate: bool, buffersize: *mut u32, buffer: Option) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn ReportIScsiTargetsA(forceupdate : bool, buffersize : *mut u32, buffer : windows_core::PSTR) -> u32); - unsafe { ReportIScsiTargetsA(forceupdate, core::mem::transmute(buffersize), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } + unsafe { ReportIScsiTargetsA(forceupdate, buffersize as _, buffer.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ReportIScsiTargetsW(forceupdate: bool, buffersize: *mut u32, buffer: Option) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn ReportIScsiTargetsW(forceupdate : bool, buffersize : *mut u32, buffer : windows_core::PWSTR) -> u32); - unsafe { ReportIScsiTargetsW(forceupdate, core::mem::transmute(buffersize), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } + unsafe { ReportIScsiTargetsW(forceupdate, buffersize as _, buffer.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { ReportPersistentIScsiDevicesA(core::mem::transmute(buffersizeinchar), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } + unsafe { ReportPersistentIScsiDevicesA(buffersizeinchar as _, buffer.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { ReportPersistentIScsiDevicesW(core::mem::transmute(buffersizeinchar), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } + unsafe { ReportPersistentIScsiDevicesW(buffersizeinchar as _, buffer.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { ReportRadiusServerListA(core::mem::transmute(buffersizeinchar), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } + unsafe { ReportRadiusServerListA(buffersizeinchar as _, buffer.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { ReportRadiusServerListW(core::mem::transmute(buffersizeinchar), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } + unsafe { ReportRadiusServerListW(buffersizeinchar as _, buffer.unwrap_or(core::mem::zeroed()) as _) } } #[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 { windows_targets::link!("iscsidsc.dll" "system" 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); - unsafe { SendScsiInquiry(core::mem::transmute(uniquesessionid), lun, evpdcmddt, pagecode, core::mem::transmute(scsistatus), core::mem::transmute(responsesize), core::mem::transmute(responsebuffer), core::mem::transmute(sensesize), core::mem::transmute(sensebuffer)) } + unsafe { SendScsiInquiry(uniquesessionid as _, lun, evpdcmddt, pagecode, scsistatus as _, responsesize as _, responsebuffer as _, sensesize as _, sensebuffer as _) } } #[inline] pub unsafe fn SendScsiReadCapacity(uniquesessionid: *mut ISCSI_UNIQUE_SESSION_ID, lun: u64, scsistatus: *mut u8, responsesize: *mut u32, responsebuffer: *mut u8, sensesize: *mut u32, sensebuffer: *mut u8) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn SendScsiReadCapacity(uniquesessionid : *mut ISCSI_UNIQUE_SESSION_ID, lun : u64, scsistatus : *mut u8, responsesize : *mut u32, responsebuffer : *mut u8, sensesize : *mut u32, sensebuffer : *mut u8) -> u32); - unsafe { SendScsiReadCapacity(core::mem::transmute(uniquesessionid), lun, core::mem::transmute(scsistatus), core::mem::transmute(responsesize), core::mem::transmute(responsebuffer), core::mem::transmute(sensesize), core::mem::transmute(sensebuffer)) } + unsafe { SendScsiReadCapacity(uniquesessionid as _, lun, scsistatus as _, responsesize as _, responsebuffer as _, sensesize as _, sensebuffer as _) } } #[inline] pub unsafe fn SendScsiReportLuns(uniquesessionid: *mut ISCSI_UNIQUE_SESSION_ID, scsistatus: *mut u8, responsesize: *mut u32, responsebuffer: *mut u8, sensesize: *mut u32, sensebuffer: *mut u8) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn SendScsiReportLuns(uniquesessionid : *mut ISCSI_UNIQUE_SESSION_ID, scsistatus : *mut u8, responsesize : *mut u32, responsebuffer : *mut u8, sensesize : *mut u32, sensebuffer : *mut u8) -> u32); - unsafe { SendScsiReportLuns(core::mem::transmute(uniquesessionid), core::mem::transmute(scsistatus), core::mem::transmute(responsesize), core::mem::transmute(responsebuffer), core::mem::transmute(sensesize), core::mem::transmute(sensebuffer)) } + unsafe { SendScsiReportLuns(uniquesessionid as _, scsistatus as _, responsesize as _, responsebuffer as _, sensesize as _, sensebuffer as _) } } #[inline] pub unsafe fn SetIScsiGroupPresharedKey(keylength: u32, key: *mut u8, persist: bool) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn SetIScsiGroupPresharedKey(keylength : u32, key : *mut u8, persist : bool) -> u32); - unsafe { SetIScsiGroupPresharedKey(keylength, core::mem::transmute(key), persist) } + unsafe { SetIScsiGroupPresharedKey(keylength, key as _, persist) } } #[inline] pub unsafe fn SetIScsiIKEInfoA(initiatorname: P0, initiatorportnumber: u32, authinfo: *mut IKE_AUTHENTICATION_INFORMATION, persist: bool) -> u32 @@ -463,7 +463,7 @@ where P0: windows_core::Param, { windows_targets::link!("iscsidsc.dll" "system" fn SetIScsiIKEInfoA(initiatorname : windows_core::PCSTR, initiatorportnumber : u32, authinfo : *mut IKE_AUTHENTICATION_INFORMATION, persist : bool) -> u32); - unsafe { SetIScsiIKEInfoA(initiatorname.param().abi(), initiatorportnumber, core::mem::transmute(authinfo), persist) } + unsafe { SetIScsiIKEInfoA(initiatorname.param().abi(), initiatorportnumber, authinfo as _, persist) } } #[inline] pub unsafe fn SetIScsiIKEInfoW(initiatorname: P0, initiatorportnumber: u32, authinfo: *mut IKE_AUTHENTICATION_INFORMATION, persist: bool) -> u32 @@ -471,12 +471,12 @@ where P0: windows_core::Param, { windows_targets::link!("iscsidsc.dll" "system" fn SetIScsiIKEInfoW(initiatorname : windows_core::PCWSTR, initiatorportnumber : u32, authinfo : *mut IKE_AUTHENTICATION_INFORMATION, persist : bool) -> u32); - unsafe { SetIScsiIKEInfoW(initiatorname.param().abi(), initiatorportnumber, core::mem::transmute(authinfo), persist) } + unsafe { SetIScsiIKEInfoW(initiatorname.param().abi(), initiatorportnumber, authinfo as _, persist) } } #[inline] pub unsafe fn SetIScsiInitiatorCHAPSharedSecret(sharedsecretlength: u32, sharedsecret: *mut u8) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn SetIScsiInitiatorCHAPSharedSecret(sharedsecretlength : u32, sharedsecret : *mut u8) -> u32); - unsafe { SetIScsiInitiatorCHAPSharedSecret(sharedsecretlength, core::mem::transmute(sharedsecret)) } + unsafe { SetIScsiInitiatorCHAPSharedSecret(sharedsecretlength, sharedsecret as _) } } #[inline] pub unsafe fn SetIScsiInitiatorNodeNameA(initiatornodename: P0) -> u32 @@ -497,7 +497,7 @@ where #[inline] pub unsafe fn SetIScsiInitiatorRADIUSSharedSecret(sharedsecretlength: u32, sharedsecret: *mut u8) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn SetIScsiInitiatorRADIUSSharedSecret(sharedsecretlength : u32, sharedsecret : *mut u8) -> u32); - unsafe { SetIScsiInitiatorRADIUSSharedSecret(sharedsecretlength, core::mem::transmute(sharedsecret)) } + unsafe { SetIScsiInitiatorRADIUSSharedSecret(sharedsecretlength, sharedsecret as _) } } #[inline] pub unsafe fn SetIScsiTunnelModeOuterAddressA(initiatorname: P0, initiatorportnumber: u32, destinationaddress: P2, outermodeaddress: P3, persist: bool) -> 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 c70677da9f..c3a9dbf9df 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Jet/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Jet/mod.rs @@ -2,13 +2,13 @@ #[inline] 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); - unsafe { JetAddColumnA(sesid, tableid, szcolumnname, pcolumndef, core::mem::transmute(pvdefault.unwrap_or(core::mem::zeroed())), cbdefault, core::mem::transmute(pcolumnid.unwrap_or(core::mem::zeroed()))) } + unsafe { JetAddColumnA(sesid, tableid, szcolumnname, pcolumndef, pvdefault.unwrap_or(core::mem::zeroed()) as _, cbdefault, pcolumnid.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetAddColumnW(sesid, tableid, szcolumnname, pcolumndef, core::mem::transmute(pvdefault.unwrap_or(core::mem::zeroed())), cbdefault, core::mem::transmute(pcolumnid.unwrap_or(core::mem::zeroed()))) } + unsafe { JetAddColumnW(sesid, tableid, szcolumnname, pcolumndef, pvdefault.unwrap_or(core::mem::zeroed()) as _, cbdefault, pcolumnid.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn JetAttachDatabase2A(sesid: JET_SESID, szfilename: *const i8, cpgdatabasesizemax: u32, grbit: u32) -> i32 { @@ -33,22 +33,22 @@ pub unsafe fn JetAttachDatabaseW(sesid: JET_SESID, szfilename: *const u16, grbit #[inline] 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); - unsafe { JetBackupA(szbackuppath, grbit, core::mem::transmute(pfnstatus.unwrap_or(core::mem::zeroed()))) } + unsafe { JetBackupA(szbackuppath, grbit, pfnstatus.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { JetBackupInstanceA(instance, szbackuppath, grbit, core::mem::transmute(pfnstatus.unwrap_or(core::mem::zeroed()))) } + unsafe { JetBackupInstanceA(instance, szbackuppath, grbit, pfnstatus.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { JetBackupInstanceW(instance, szbackuppath, grbit, core::mem::transmute(pfnstatus.unwrap_or(core::mem::zeroed()))) } + unsafe { JetBackupInstanceW(instance, szbackuppath, grbit, pfnstatus.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { JetBackupW(szbackuppath, grbit, core::mem::transmute(pfnstatus.unwrap_or(core::mem::zeroed()))) } + unsafe { JetBackupW(szbackuppath, grbit, pfnstatus.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn JetBeginExternalBackup(grbit: u32) -> i32 { @@ -63,12 +63,12 @@ pub unsafe fn JetBeginExternalBackupInstance(instance: JET_INSTANCE, grbit: u32) #[inline] 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); - unsafe { JetBeginSessionA(instance, core::mem::transmute(psesid), core::mem::transmute(szusername.unwrap_or(core::mem::zeroed())), core::mem::transmute(szpassword.unwrap_or(core::mem::zeroed()))) } + unsafe { JetBeginSessionA(instance, psesid as _, szusername.unwrap_or(core::mem::zeroed()) as _, szpassword.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { JetBeginSessionW(instance, core::mem::transmute(psesid), core::mem::transmute(szusername.unwrap_or(core::mem::zeroed())), core::mem::transmute(szpassword.unwrap_or(core::mem::zeroed()))) } + unsafe { JetBeginSessionW(instance, psesid as _, szusername.unwrap_or(core::mem::zeroed()) as _, szpassword.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn JetBeginTransaction(sesid: JET_SESID) -> i32 { @@ -116,17 +116,17 @@ pub unsafe fn JetCommitTransaction(sesid: JET_SESID, grbit: u32) -> i32 { #[inline] 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); - unsafe { JetCommitTransaction2(sesid, grbit, cmsecdurablecommit, core::mem::transmute(pcommitid.unwrap_or(core::mem::zeroed()))) } + unsafe { JetCommitTransaction2(sesid, grbit, cmsecdurablecommit, pcommitid.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { JetCompactA(sesid, szdatabasesrc, szdatabasedest, pfnstatus, core::mem::transmute(pconvert.unwrap_or(core::mem::zeroed())), grbit) } + unsafe { JetCompactA(sesid, szdatabasesrc, szdatabasedest, pfnstatus, pconvert.unwrap_or(core::mem::zeroed()) as _, grbit) } } #[inline] 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); - unsafe { JetCompactW(sesid, szdatabasesrc, szdatabasedest, pfnstatus, core::mem::transmute(pconvert.unwrap_or(core::mem::zeroed())), grbit) } + unsafe { JetCompactW(sesid, szdatabasesrc, szdatabasedest, pfnstatus, pconvert.unwrap_or(core::mem::zeroed()) as _, grbit) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -142,22 +142,22 @@ pub unsafe fn JetConfigureProcessForCrashDump(grbit: u32) -> i32 { #[inline] 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); - unsafe { JetCreateDatabase2A(sesid, szfilename, cpgdatabasesizemax, core::mem::transmute(pdbid), grbit) } + unsafe { JetCreateDatabase2A(sesid, szfilename, cpgdatabasesizemax, pdbid as _, grbit) } } #[inline] 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); - unsafe { JetCreateDatabase2W(sesid, szfilename, cpgdatabasesizemax, core::mem::transmute(pdbid), grbit) } + unsafe { JetCreateDatabase2W(sesid, szfilename, cpgdatabasesizemax, pdbid as _, grbit) } } #[inline] 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); - unsafe { JetCreateDatabaseA(sesid, szfilename, core::mem::transmute(szconnect.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdbid), grbit) } + unsafe { JetCreateDatabaseA(sesid, szfilename, szconnect.unwrap_or(core::mem::zeroed()) as _, pdbid as _, grbit) } } #[inline] 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); - unsafe { JetCreateDatabaseW(sesid, szfilename, core::mem::transmute(szconnect.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdbid), grbit) } + unsafe { JetCreateDatabaseW(sesid, szfilename, szconnect.unwrap_or(core::mem::zeroed()) as _, pdbid as _, grbit) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -213,116 +213,116 @@ where #[inline] pub unsafe fn JetCreateInstance2A(pinstance: *mut JET_INSTANCE, szinstancename: Option<*const i8>, szdisplayname: Option<*const i8>, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetCreateInstance2A(pinstance : *mut JET_INSTANCE, szinstancename : *const i8, szdisplayname : *const i8, grbit : u32) -> i32); - unsafe { JetCreateInstance2A(core::mem::transmute(pinstance), core::mem::transmute(szinstancename.unwrap_or(core::mem::zeroed())), core::mem::transmute(szdisplayname.unwrap_or(core::mem::zeroed())), grbit) } + unsafe { JetCreateInstance2A(pinstance as _, szinstancename.unwrap_or(core::mem::zeroed()) as _, szdisplayname.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { JetCreateInstance2W(core::mem::transmute(pinstance), core::mem::transmute(szinstancename.unwrap_or(core::mem::zeroed())), core::mem::transmute(szdisplayname.unwrap_or(core::mem::zeroed())), grbit) } + unsafe { JetCreateInstance2W(pinstance as _, szinstancename.unwrap_or(core::mem::zeroed()) as _, szdisplayname.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { JetCreateInstanceA(core::mem::transmute(pinstance), core::mem::transmute(szinstancename.unwrap_or(core::mem::zeroed()))) } + unsafe { JetCreateInstanceA(pinstance as _, szinstancename.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { JetCreateInstanceW(core::mem::transmute(pinstance), core::mem::transmute(szinstancename.unwrap_or(core::mem::zeroed()))) } + unsafe { JetCreateInstanceW(pinstance as _, szinstancename.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetCreateTableA(sesid, dbid, sztablename, lpages, ldensity, core::mem::transmute(ptableid)) } + unsafe { JetCreateTableA(sesid, dbid, sztablename, lpages, ldensity, ptableid as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetCreateTableColumnIndex2A(sesid, dbid, core::mem::transmute(ptablecreate)) } + unsafe { JetCreateTableColumnIndex2A(sesid, dbid, ptablecreate as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetCreateTableColumnIndex2W(sesid, dbid, core::mem::transmute(ptablecreate)) } + unsafe { JetCreateTableColumnIndex2W(sesid, dbid, ptablecreate as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetCreateTableColumnIndex3A(sesid, dbid, core::mem::transmute(ptablecreate)) } + unsafe { JetCreateTableColumnIndex3A(sesid, dbid, ptablecreate as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetCreateTableColumnIndex3W(sesid, dbid, core::mem::transmute(ptablecreate)) } + unsafe { JetCreateTableColumnIndex3W(sesid, dbid, ptablecreate as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetCreateTableColumnIndex4A(sesid, dbid, core::mem::transmute(ptablecreate)) } + unsafe { JetCreateTableColumnIndex4A(sesid, dbid, ptablecreate as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetCreateTableColumnIndex4W(sesid, dbid, core::mem::transmute(ptablecreate)) } + unsafe { JetCreateTableColumnIndex4W(sesid, dbid, ptablecreate as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetCreateTableColumnIndexA(sesid, dbid, core::mem::transmute(ptablecreate)) } + unsafe { JetCreateTableColumnIndexA(sesid, dbid, ptablecreate as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetCreateTableColumnIndexW(sesid, dbid, core::mem::transmute(ptablecreate)) } + unsafe { JetCreateTableColumnIndexW(sesid, dbid, ptablecreate as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetCreateTableW(sesid, dbid, sztablename, lpages, ldensity, core::mem::transmute(ptableid)) } + unsafe { JetCreateTableW(sesid, dbid, sztablename, lpages, ldensity, ptableid as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetDefragment2A(sesid, 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())), callback, grbit) } + unsafe { JetDefragment2A(sesid, dbid, sztablename.unwrap_or(core::mem::zeroed()) as _, pcpasses.unwrap_or(core::mem::zeroed()) as _, pcseconds.unwrap_or(core::mem::zeroed()) as _, callback, grbit) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetDefragment2W(sesid, 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())), callback, grbit) } + unsafe { JetDefragment2W(sesid, dbid, sztablename.unwrap_or(core::mem::zeroed()) as _, pcpasses.unwrap_or(core::mem::zeroed()) as _, pcseconds.unwrap_or(core::mem::zeroed()) as _, callback, grbit) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetDefragment3A(sesid, 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())), callback, pvcontext, grbit) } + unsafe { JetDefragment3A(sesid, szdatabasename, sztablename.unwrap_or(core::mem::zeroed()) as _, pcpasses.unwrap_or(core::mem::zeroed()) as _, pcseconds.unwrap_or(core::mem::zeroed()) as _, callback, pvcontext, grbit) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetDefragment3W(sesid, 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())), callback, pvcontext, grbit) } + unsafe { JetDefragment3W(sesid, szdatabasename, sztablename.unwrap_or(core::mem::zeroed()) as _, pcpasses.unwrap_or(core::mem::zeroed()) as _, pcseconds.unwrap_or(core::mem::zeroed()) as _, callback, pvcontext, grbit) } } #[inline] 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); - unsafe { JetDefragmentA(sesid, 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())), grbit) } + unsafe { JetDefragmentA(sesid, dbid, sztablename.unwrap_or(core::mem::zeroed()) as _, pcpasses.unwrap_or(core::mem::zeroed()) as _, pcseconds.unwrap_or(core::mem::zeroed()) as _, grbit) } } #[inline] 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); - unsafe { JetDefragmentW(sesid, 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())), grbit) } + unsafe { JetDefragmentW(sesid, dbid, sztablename.unwrap_or(core::mem::zeroed()) as _, pcpasses.unwrap_or(core::mem::zeroed()) as _, pcseconds.unwrap_or(core::mem::zeroed()) as _, grbit) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -379,45 +379,45 @@ pub unsafe fn JetDeleteTableW(sesid: JET_SESID, dbid: u32, sztablename: *const u #[inline] 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); - unsafe { JetDetachDatabase2A(sesid, core::mem::transmute(szfilename.unwrap_or(core::mem::zeroed())), grbit) } + unsafe { JetDetachDatabase2A(sesid, szfilename.unwrap_or(core::mem::zeroed()) as _, grbit) } } #[inline] 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); - unsafe { JetDetachDatabase2W(sesid, core::mem::transmute(szfilename.unwrap_or(core::mem::zeroed())), grbit) } + unsafe { JetDetachDatabase2W(sesid, szfilename.unwrap_or(core::mem::zeroed()) as _, grbit) } } #[inline] 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); - unsafe { JetDetachDatabaseA(sesid, core::mem::transmute(szfilename.unwrap_or(core::mem::zeroed()))) } + unsafe { JetDetachDatabaseA(sesid, szfilename.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { JetDetachDatabaseW(sesid, core::mem::transmute(szfilename.unwrap_or(core::mem::zeroed()))) } + unsafe { JetDetachDatabaseW(sesid, szfilename.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetDupCursor(sesid, tableid, core::mem::transmute(ptableid), grbit) } + unsafe { JetDupCursor(sesid, tableid, ptableid as _, grbit) } } #[inline] 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); - unsafe { JetDupSession(sesid, core::mem::transmute(psesid)) } + unsafe { JetDupSession(sesid, psesid as _) } } #[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); - unsafe { 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()))) } + unsafe { 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()), pcsetsucceed.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { 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()))) } + unsafe { 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()), pcsetsucceed.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn JetEndExternalBackup() -> i32 { @@ -443,49 +443,23 @@ pub unsafe fn JetEndSession(sesid: JET_SESID, grbit: u32) -> i32 { #[inline] 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); - unsafe { JetEnumerateColumns(sesid, 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), pfnrealloc, core::mem::transmute(pvrealloccontext.unwrap_or(core::mem::zeroed())), cbdatamost, grbit) } + unsafe { JetEnumerateColumns(sesid, 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())), pcenumcolumn as _, prgenumcolumn as _, pfnrealloc, pvrealloccontext.unwrap_or(core::mem::zeroed()) as _, cbdatamost, grbit) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetEscrowUpdate(sesid, tableid, columnid, pv, cbmax, core::mem::transmute(pvold.unwrap_or(core::mem::zeroed())), cboldmax, core::mem::transmute(pcboldactual.unwrap_or(core::mem::zeroed())), grbit) } + unsafe { JetEscrowUpdate(sesid, tableid, columnid, pv, cbmax, pvold.unwrap_or(core::mem::zeroed()) as _, cboldmax, pcboldactual.unwrap_or(core::mem::zeroed()) as _, grbit) } } #[inline] pub unsafe fn JetExternalRestore2A(szcheckpointfilepath: *const i8, szlogpath: *const i8, rgrstmap: Option<&[JET_RSTMAP_A]>, szbackuplogpath: *const i8, ploginfo: *mut JET_LOGINFO_A, sztargetinstancename: Option<*const i8>, sztargetinstancelogpath: Option<*const i8>, sztargetinstancecheckpointpath: Option<*const i8>, pfn: JET_PFNSTATUS) -> i32 { windows_targets::link!("esent.dll" "system" fn JetExternalRestore2A(szcheckpointfilepath : *const i8, szlogpath : *const i8, rgrstmap : *const JET_RSTMAP_A, crstfilemap : i32, szbackuplogpath : *const i8, ploginfo : *mut JET_LOGINFO_A, sztargetinstancename : *const i8, sztargetinstancelogpath : *const i8, sztargetinstancecheckpointpath : *const i8, pfn : JET_PFNSTATUS) -> i32); - unsafe { - JetExternalRestore2A( - szcheckpointfilepath, - szlogpath, - core::mem::transmute(rgrstmap.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - rgrstmap.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - szbackuplogpath, - core::mem::transmute(ploginfo), - 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())), - pfn, - ) - } + unsafe { JetExternalRestore2A(szcheckpointfilepath, szlogpath, core::mem::transmute(rgrstmap.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), rgrstmap.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), szbackuplogpath, ploginfo as _, sztargetinstancename.unwrap_or(core::mem::zeroed()) as _, sztargetinstancelogpath.unwrap_or(core::mem::zeroed()) as _, sztargetinstancecheckpointpath.unwrap_or(core::mem::zeroed()) as _, pfn) } } #[inline] pub unsafe fn JetExternalRestore2W(szcheckpointfilepath: *const u16, szlogpath: *const u16, rgrstmap: Option<&[JET_RSTMAP_W]>, szbackuplogpath: *const u16, ploginfo: *mut JET_LOGINFO_W, sztargetinstancename: Option<*const u16>, sztargetinstancelogpath: Option<*const u16>, sztargetinstancecheckpointpath: Option<*const u16>, pfn: JET_PFNSTATUS) -> i32 { windows_targets::link!("esent.dll" "system" fn JetExternalRestore2W(szcheckpointfilepath : *const u16, szlogpath : *const u16, rgrstmap : *const JET_RSTMAP_W, crstfilemap : i32, szbackuplogpath : *const u16, ploginfo : *mut JET_LOGINFO_W, sztargetinstancename : *const u16, sztargetinstancelogpath : *const u16, sztargetinstancecheckpointpath : *const u16, pfn : JET_PFNSTATUS) -> i32); - unsafe { - JetExternalRestore2W( - szcheckpointfilepath, - szlogpath, - core::mem::transmute(rgrstmap.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - rgrstmap.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - szbackuplogpath, - core::mem::transmute(ploginfo), - 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())), - pfn, - ) - } + unsafe { JetExternalRestore2W(szcheckpointfilepath, szlogpath, core::mem::transmute(rgrstmap.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), rgrstmap.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), szbackuplogpath, ploginfo as _, sztargetinstancename.unwrap_or(core::mem::zeroed()) as _, sztargetinstancelogpath.unwrap_or(core::mem::zeroed()) as _, sztargetinstancecheckpointpath.unwrap_or(core::mem::zeroed()) as _, pfn) } } #[inline] pub unsafe fn JetExternalRestoreA(szcheckpointfilepath: *const i8, szlogpath: *const i8, rgrstmap: Option<&[JET_RSTMAP_A]>, szbackuplogpath: *const i8, genlow: i32, genhigh: i32, pfn: JET_PFNSTATUS) -> i32 { @@ -508,38 +482,38 @@ 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); - unsafe { 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()))) } + unsafe { 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()), pcbactual.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { JetGetAttachInfoInstanceA(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()))) } + unsafe { JetGetAttachInfoInstanceA(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()), pcbactual.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { JetGetAttachInfoInstanceW(instance, core::mem::transmute(szzdatabases.unwrap_or(core::mem::zeroed())), cbmax, core::mem::transmute(pcbactual.unwrap_or(core::mem::zeroed()))) } + unsafe { JetGetAttachInfoInstanceW(instance, szzdatabases.unwrap_or(core::mem::zeroed()) as _, cbmax, pcbactual.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { JetGetAttachInfoW(core::mem::transmute(wszzdatabases.unwrap_or(core::mem::zeroed())), cbmax, core::mem::transmute(pcbactual.unwrap_or(core::mem::zeroed()))) } + unsafe { JetGetAttachInfoW(wszzdatabases.unwrap_or(core::mem::zeroed()) as _, cbmax, pcbactual.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetGetBookmark(sesid, tableid, core::mem::transmute(pvbookmark.unwrap_or(core::mem::zeroed())), cbmax, core::mem::transmute(pcbactual.unwrap_or(core::mem::zeroed()))) } + unsafe { JetGetBookmark(sesid, tableid, pvbookmark.unwrap_or(core::mem::zeroed()) as _, cbmax, pcbactual.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { JetGetColumnInfoA(sesid, dbid, sztablename, core::mem::transmute(pcolumnnameorid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvresult), cbmax, infolevel) } + unsafe { JetGetColumnInfoA(sesid, dbid, sztablename, pcolumnnameorid.unwrap_or(core::mem::zeroed()) as _, pvresult as _, cbmax, infolevel) } } #[inline] 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); - unsafe { JetGetColumnInfoW(sesid, dbid, sztablename, core::mem::transmute(pwcolumnnameorid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvresult), cbmax, infolevel) } + unsafe { JetGetColumnInfoW(sesid, dbid, sztablename, pwcolumnnameorid.unwrap_or(core::mem::zeroed()) as _, pvresult as _, cbmax, infolevel) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -551,71 +525,71 @@ pub unsafe fn JetGetCurrentIndexA(sesid: JET_SESID, tableid: super::StructuredSt #[inline] 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); - unsafe { JetGetCurrentIndexW(sesid, tableid, core::mem::transmute(szindexname), cbindexname) } + unsafe { JetGetCurrentIndexW(sesid, tableid, szindexname as _, cbindexname) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetGetCursorInfo(sesid, tableid, core::mem::transmute(pvresult), cbmax, infolevel) } + unsafe { JetGetCursorInfo(sesid, tableid, pvresult as _, cbmax, infolevel) } } #[inline] pub unsafe fn JetGetDatabaseFileInfoA(szdatabasename: *const i8, pvresult: *mut core::ffi::c_void, cbmax: u32, infolevel: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetGetDatabaseFileInfoA(szdatabasename : *const i8, pvresult : *mut core::ffi::c_void, cbmax : u32, infolevel : u32) -> i32); - unsafe { JetGetDatabaseFileInfoA(szdatabasename, core::mem::transmute(pvresult), cbmax, infolevel) } + unsafe { JetGetDatabaseFileInfoA(szdatabasename, pvresult as _, cbmax, infolevel) } } #[inline] pub unsafe fn JetGetDatabaseFileInfoW(szdatabasename: *const u16, pvresult: *mut core::ffi::c_void, cbmax: u32, infolevel: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetGetDatabaseFileInfoW(szdatabasename : *const u16, pvresult : *mut core::ffi::c_void, cbmax : u32, infolevel : u32) -> i32); - unsafe { JetGetDatabaseFileInfoW(szdatabasename, core::mem::transmute(pvresult), cbmax, infolevel) } + unsafe { JetGetDatabaseFileInfoW(szdatabasename, pvresult as _, cbmax, infolevel) } } #[inline] 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); - unsafe { JetGetDatabaseInfoA(sesid, dbid, core::mem::transmute(pvresult), cbmax, infolevel) } + unsafe { JetGetDatabaseInfoA(sesid, dbid, pvresult as _, cbmax, infolevel) } } #[inline] 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); - unsafe { JetGetDatabaseInfoW(sesid, dbid, core::mem::transmute(pvresult), cbmax, infolevel) } + unsafe { JetGetDatabaseInfoW(sesid, dbid, pvresult as _, cbmax, 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); - unsafe { JetGetErrorInfoW(core::mem::transmute(pvcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvresult), cbmax, infolevel, grbit) } + unsafe { JetGetErrorInfoW(pvcontext.unwrap_or(core::mem::zeroed()) as _, pvresult as _, cbmax, infolevel, grbit) } } #[inline] 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); - unsafe { JetGetIndexInfoA(sesid, dbid, sztablename, core::mem::transmute(szindexname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvresult), cbresult, infolevel) } + unsafe { JetGetIndexInfoA(sesid, dbid, sztablename, szindexname.unwrap_or(core::mem::zeroed()) as _, pvresult as _, cbresult, infolevel) } } #[inline] 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); - unsafe { JetGetIndexInfoW(sesid, dbid, sztablename, core::mem::transmute(szindexname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvresult), cbresult, infolevel) } + unsafe { JetGetIndexInfoW(sesid, dbid, sztablename, szindexname.unwrap_or(core::mem::zeroed()) as _, pvresult as _, cbresult, infolevel) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] pub unsafe fn JetGetInstanceInfoA(pcinstanceinfo: *mut u32, painstanceinfo: *mut *mut JET_INSTANCE_INFO_A) -> i32 { windows_targets::link!("esent.dll" "system" fn JetGetInstanceInfoA(pcinstanceinfo : *mut u32, painstanceinfo : *mut *mut JET_INSTANCE_INFO_A) -> i32); - unsafe { JetGetInstanceInfoA(core::mem::transmute(pcinstanceinfo), core::mem::transmute(painstanceinfo)) } + unsafe { JetGetInstanceInfoA(pcinstanceinfo as _, painstanceinfo as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] pub unsafe fn JetGetInstanceInfoW(pcinstanceinfo: *mut u32, painstanceinfo: *mut *mut JET_INSTANCE_INFO_W) -> i32 { windows_targets::link!("esent.dll" "system" fn JetGetInstanceInfoW(pcinstanceinfo : *mut u32, painstanceinfo : *mut *mut JET_INSTANCE_INFO_W) -> i32); - unsafe { JetGetInstanceInfoW(core::mem::transmute(pcinstanceinfo), core::mem::transmute(painstanceinfo)) } + unsafe { JetGetInstanceInfoW(pcinstanceinfo as _, painstanceinfo as _) } } #[inline] 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); - unsafe { JetGetInstanceMiscInfo(instance, core::mem::transmute(pvresult), cbmax, infolevel) } + unsafe { JetGetInstanceMiscInfo(instance, pvresult as _, cbmax, infolevel) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetGetLS(sesid, tableid, core::mem::transmute(pls), grbit) } + unsafe { JetGetLS(sesid, tableid, pls as _, grbit) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -626,139 +600,139 @@ pub unsafe fn JetGetLock(sesid: JET_SESID, tableid: super::StructuredStorage::JE #[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); - unsafe { 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()))) } + unsafe { 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()), pcbactual.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { JetGetLogInfoInstance2A(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()))) } + unsafe { JetGetLogInfoInstance2A(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()), pcbactual.unwrap_or(core::mem::zeroed()) as _, ploginfo.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { JetGetLogInfoInstance2W(instance, core::mem::transmute(wszzlogs.unwrap_or(core::mem::zeroed())), cbmax, core::mem::transmute(pcbactual.unwrap_or(core::mem::zeroed())), core::mem::transmute(ploginfo.unwrap_or(core::mem::zeroed()))) } + unsafe { JetGetLogInfoInstance2W(instance, wszzlogs.unwrap_or(core::mem::zeroed()) as _, cbmax, pcbactual.unwrap_or(core::mem::zeroed()) as _, ploginfo.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { JetGetLogInfoInstanceA(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()))) } + unsafe { JetGetLogInfoInstanceA(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()), pcbactual.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { JetGetLogInfoInstanceW(instance, core::mem::transmute(wszzlogs.unwrap_or(core::mem::zeroed())), cbmax, core::mem::transmute(pcbactual.unwrap_or(core::mem::zeroed()))) } + unsafe { JetGetLogInfoInstanceW(instance, wszzlogs.unwrap_or(core::mem::zeroed()) as _, cbmax, pcbactual.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { JetGetLogInfoW(core::mem::transmute(szzlogs.unwrap_or(core::mem::zeroed())), cbmax, core::mem::transmute(pcbactual.unwrap_or(core::mem::zeroed()))) } + unsafe { JetGetLogInfoW(szzlogs.unwrap_or(core::mem::zeroed()) as _, cbmax, pcbactual.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { JetGetObjectInfoA(sesid, dbid, objtyp, core::mem::transmute(szcontainername.unwrap_or(core::mem::zeroed())), core::mem::transmute(szobjectname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvresult), cbmax, infolevel) } + unsafe { JetGetObjectInfoA(sesid, dbid, objtyp, szcontainername.unwrap_or(core::mem::zeroed()) as _, szobjectname.unwrap_or(core::mem::zeroed()) as _, pvresult as _, cbmax, infolevel) } } #[inline] 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); - unsafe { JetGetObjectInfoW(sesid, dbid, objtyp, core::mem::transmute(szcontainername.unwrap_or(core::mem::zeroed())), core::mem::transmute(szobjectname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvresult), cbmax, infolevel) } + unsafe { JetGetObjectInfoW(sesid, dbid, objtyp, szcontainername.unwrap_or(core::mem::zeroed()) as _, szobjectname.unwrap_or(core::mem::zeroed()) as _, pvresult as _, cbmax, infolevel) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetGetRecordPosition(sesid, tableid, core::mem::transmute(precpos), cbrecpos) } + unsafe { JetGetRecordPosition(sesid, tableid, precpos as _, cbrecpos) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetGetRecordSize(sesid, tableid, core::mem::transmute(precsize), grbit) } + unsafe { JetGetRecordSize(sesid, tableid, precsize as _, grbit) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetGetRecordSize2(sesid, tableid, core::mem::transmute(precsize), grbit) } + unsafe { JetGetRecordSize2(sesid, tableid, precsize as _, grbit) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetGetSecondaryIndexBookmark(sesid, tableid, core::mem::transmute(pvsecondarykey.unwrap_or(core::mem::zeroed())), cbsecondarykeymax, core::mem::transmute(pcbsecondarykeyactual.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvprimarybookmark.unwrap_or(core::mem::zeroed())), cbprimarybookmarkmax, core::mem::transmute(pcbprimarybookmarkactual.unwrap_or(core::mem::zeroed())), grbit) } + unsafe { JetGetSecondaryIndexBookmark(sesid, tableid, pvsecondarykey.unwrap_or(core::mem::zeroed()) as _, cbsecondarykeymax, pcbsecondarykeyactual.unwrap_or(core::mem::zeroed()) as _, pvprimarybookmark.unwrap_or(core::mem::zeroed()) as _, cbprimarybookmarkmax, pcbprimarybookmarkactual.unwrap_or(core::mem::zeroed()) as _, grbit) } } #[inline] 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); - unsafe { JetGetSessionParameter(core::mem::transmute(sesid.unwrap_or(core::mem::zeroed())), sesparamid, core::mem::transmute(pvparam.as_ptr()), pvparam.len().try_into().unwrap(), core::mem::transmute(pcbparamactual.unwrap_or(core::mem::zeroed()))) } + unsafe { JetGetSessionParameter(sesid.unwrap_or(core::mem::zeroed()) as _, sesparamid, core::mem::transmute(pvparam.as_ptr()), pvparam.len().try_into().unwrap(), pcbparamactual.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetGetSystemParameterA(instance, core::mem::transmute(sesid.unwrap_or(core::mem::zeroed())), 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())) } + unsafe { JetGetSystemParameterA(instance, sesid.unwrap_or(core::mem::zeroed()) as _, paramid, plparam.unwrap_or(core::mem::zeroed()) as _, 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: 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); - unsafe { JetGetSystemParameterW(instance, core::mem::transmute(sesid.unwrap_or(core::mem::zeroed())), paramid, core::mem::transmute(plparam.unwrap_or(core::mem::zeroed())), core::mem::transmute(szparam.unwrap_or(core::mem::zeroed())), cbmax) } + unsafe { JetGetSystemParameterW(instance, sesid.unwrap_or(core::mem::zeroed()) as _, paramid, plparam.unwrap_or(core::mem::zeroed()) as _, szparam.unwrap_or(core::mem::zeroed()) as _, cbmax) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetGetTableColumnInfoA(sesid, tableid, core::mem::transmute(szcolumnname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvresult), cbmax, infolevel) } + unsafe { JetGetTableColumnInfoA(sesid, tableid, szcolumnname.unwrap_or(core::mem::zeroed()) as _, pvresult as _, cbmax, infolevel) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetGetTableColumnInfoW(sesid, tableid, core::mem::transmute(szcolumnname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvresult), cbmax, infolevel) } + unsafe { JetGetTableColumnInfoW(sesid, tableid, szcolumnname.unwrap_or(core::mem::zeroed()) as _, pvresult as _, cbmax, infolevel) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetGetTableIndexInfoA(sesid, tableid, core::mem::transmute(szindexname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvresult), cbresult, infolevel) } + unsafe { JetGetTableIndexInfoA(sesid, tableid, szindexname.unwrap_or(core::mem::zeroed()) as _, pvresult as _, cbresult, infolevel) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetGetTableIndexInfoW(sesid, tableid, core::mem::transmute(szindexname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvresult), cbresult, infolevel) } + unsafe { JetGetTableIndexInfoW(sesid, tableid, szindexname.unwrap_or(core::mem::zeroed()) as _, pvresult as _, cbresult, infolevel) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetGetTableInfoA(sesid, tableid, core::mem::transmute(pvresult), cbmax, infolevel) } + unsafe { JetGetTableInfoA(sesid, tableid, pvresult as _, cbmax, infolevel) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetGetTableInfoW(sesid, tableid, core::mem::transmute(pvresult), cbmax, infolevel) } + unsafe { JetGetTableInfoW(sesid, tableid, pvresult as _, cbmax, infolevel) } } #[inline] pub unsafe fn JetGetThreadStats(pvresult: *mut core::ffi::c_void, cbmax: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetGetThreadStats(pvresult : *mut core::ffi::c_void, cbmax : u32) -> i32); - unsafe { JetGetThreadStats(core::mem::transmute(pvresult), cbmax) } + unsafe { JetGetThreadStats(pvresult as _, cbmax) } } #[inline] 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); - unsafe { JetGetTruncateLogInfoInstanceA(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()))) } + unsafe { JetGetTruncateLogInfoInstanceA(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()), pcbactual.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { JetGetTruncateLogInfoInstanceW(instance, core::mem::transmute(wszzlogs.unwrap_or(core::mem::zeroed())), cbmax, core::mem::transmute(pcbactual.unwrap_or(core::mem::zeroed()))) } + unsafe { JetGetTruncateLogInfoInstanceW(instance, wszzlogs.unwrap_or(core::mem::zeroed()) as _, cbmax, pcbactual.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { JetGetVersion(sesid, core::mem::transmute(pwversion)) } + unsafe { JetGetVersion(sesid, pwversion as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -776,7 +750,7 @@ pub unsafe fn JetGotoPosition(sesid: JET_SESID, tableid: super::StructuredStorag #[inline] 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); - unsafe { JetGotoSecondaryIndexBookmark(sesid, tableid, pvsecondarykey, cbsecondarykey, core::mem::transmute(pvprimarybookmark.unwrap_or(core::mem::zeroed())), cbprimarybookmark, grbit) } + unsafe { JetGotoSecondaryIndexBookmark(sesid, tableid, pvsecondarykey, cbsecondarykey, pvprimarybookmark.unwrap_or(core::mem::zeroed()) as _, cbprimarybookmark, grbit) } } #[inline] pub unsafe fn JetGrowDatabase(sesid: JET_SESID, dbid: u32, cpg: u32, pcpgreal: *const u32) -> i32 { @@ -792,39 +766,39 @@ pub unsafe fn JetIdle(sesid: JET_SESID, grbit: u32) -> i32 { #[inline] 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); - unsafe { JetIndexRecordCount(sesid, tableid, core::mem::transmute(pcrec), crecmax) } + unsafe { JetIndexRecordCount(sesid, tableid, pcrec as _, 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); - unsafe { JetInit(core::mem::transmute(pinstance.unwrap_or(core::mem::zeroed()))) } + unsafe { JetInit(pinstance.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { JetInit2(core::mem::transmute(pinstance.unwrap_or(core::mem::zeroed())), grbit) } + unsafe { JetInit2(pinstance.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { JetInit3A(core::mem::transmute(pinstance.unwrap_or(core::mem::zeroed())), core::mem::transmute(prstinfo.unwrap_or(core::mem::zeroed())), grbit) } + unsafe { JetInit3A(pinstance.unwrap_or(core::mem::zeroed()) as _, prstinfo.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { JetInit3W(core::mem::transmute(pinstance.unwrap_or(core::mem::zeroed())), core::mem::transmute(prstinfo.unwrap_or(core::mem::zeroed())), grbit) } + unsafe { JetInit3W(pinstance.unwrap_or(core::mem::zeroed()) as _, prstinfo.unwrap_or(core::mem::zeroed()) as _, grbit) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetIntersectIndexes(sesid, core::mem::transmute(rgindexrange.as_ptr()), rgindexrange.len().try_into().unwrap(), core::mem::transmute(precordlist), grbit) } + unsafe { JetIntersectIndexes(sesid, core::mem::transmute(rgindexrange.as_ptr()), rgindexrange.len().try_into().unwrap(), precordlist as _, grbit) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetMakeKey(sesid, tableid, core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), cbdata, grbit) } + unsafe { JetMakeKey(sesid, tableid, pvdata.unwrap_or(core::mem::zeroed()) as _, cbdata, grbit) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -846,30 +820,30 @@ pub unsafe fn JetOSSnapshotEnd(snapid: JET_OSSNAPID, grbit: u32) -> i32 { #[inline] 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); - unsafe { JetOSSnapshotFreezeA(snapid, core::mem::transmute(pcinstanceinfo), core::mem::transmute(painstanceinfo), grbit) } + unsafe { JetOSSnapshotFreezeA(snapid, pcinstanceinfo as _, painstanceinfo as _, grbit) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetOSSnapshotFreezeW(snapid, core::mem::transmute(pcinstanceinfo), core::mem::transmute(painstanceinfo), grbit) } + unsafe { JetOSSnapshotFreezeW(snapid, pcinstanceinfo as _, painstanceinfo as _, grbit) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetOSSnapshotGetFreezeInfoA(snapid, core::mem::transmute(pcinstanceinfo), core::mem::transmute(painstanceinfo), grbit) } + unsafe { JetOSSnapshotGetFreezeInfoA(snapid, pcinstanceinfo as _, painstanceinfo as _, grbit) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetOSSnapshotGetFreezeInfoW(snapid, core::mem::transmute(pcinstanceinfo), core::mem::transmute(painstanceinfo), grbit) } + unsafe { JetOSSnapshotGetFreezeInfoW(snapid, pcinstanceinfo as _, painstanceinfo as _, grbit) } } #[inline] pub unsafe fn JetOSSnapshotPrepare(psnapid: *mut JET_OSSNAPID, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetOSSnapshotPrepare(psnapid : *mut JET_OSSNAPID, grbit : u32) -> i32); - unsafe { JetOSSnapshotPrepare(core::mem::transmute(psnapid), grbit) } + unsafe { JetOSSnapshotPrepare(psnapid as _, grbit) } } #[inline] pub unsafe fn JetOSSnapshotPrepareInstance(snapid: JET_OSSNAPID, instance: JET_INSTANCE, grbit: u32) -> i32 { @@ -894,66 +868,66 @@ pub unsafe fn JetOSSnapshotTruncateLogInstance(snapid: JET_OSSNAPID, instance: J #[inline] 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); - unsafe { JetOpenDatabaseA(sesid, szfilename, core::mem::transmute(szconnect.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdbid), grbit) } + unsafe { JetOpenDatabaseA(sesid, szfilename, szconnect.unwrap_or(core::mem::zeroed()) as _, pdbid as _, grbit) } } #[inline] 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); - unsafe { JetOpenDatabaseW(sesid, szfilename, core::mem::transmute(szconnect.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdbid), grbit) } + unsafe { JetOpenDatabaseW(sesid, szfilename, szconnect.unwrap_or(core::mem::zeroed()) as _, pdbid as _, grbit) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] pub unsafe fn JetOpenFileA(szfilename: *const i8, phffile: *mut super::StructuredStorage::JET_HANDLE, pulfilesizelow: *mut u32, pulfilesizehigh: *mut u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetOpenFileA(szfilename : *const i8, phffile : *mut super::StructuredStorage:: JET_HANDLE, pulfilesizelow : *mut u32, pulfilesizehigh : *mut u32) -> i32); - unsafe { JetOpenFileA(szfilename, core::mem::transmute(phffile), core::mem::transmute(pulfilesizelow), core::mem::transmute(pulfilesizehigh)) } + unsafe { JetOpenFileA(szfilename, phffile as _, pulfilesizelow as _, pulfilesizehigh as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetOpenFileInstanceA(instance, szfilename, core::mem::transmute(phffile), core::mem::transmute(pulfilesizelow), core::mem::transmute(pulfilesizehigh)) } + unsafe { JetOpenFileInstanceA(instance, szfilename, phffile as _, pulfilesizelow as _, pulfilesizehigh as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetOpenFileInstanceW(instance, szfilename, core::mem::transmute(phffile), core::mem::transmute(pulfilesizelow), core::mem::transmute(pulfilesizehigh)) } + unsafe { JetOpenFileInstanceW(instance, szfilename, phffile as _, pulfilesizelow as _, pulfilesizehigh as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] pub unsafe fn JetOpenFileW(szfilename: *const u16, phffile: *mut super::StructuredStorage::JET_HANDLE, pulfilesizelow: *mut u32, pulfilesizehigh: *mut u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetOpenFileW(szfilename : *const u16, phffile : *mut super::StructuredStorage:: JET_HANDLE, pulfilesizelow : *mut u32, pulfilesizehigh : *mut u32) -> i32); - unsafe { JetOpenFileW(szfilename, core::mem::transmute(phffile), core::mem::transmute(pulfilesizelow), core::mem::transmute(pulfilesizehigh)) } + unsafe { JetOpenFileW(szfilename, phffile as _, pulfilesizelow as _, pulfilesizehigh as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetOpenTableA(sesid, dbid, sztablename, core::mem::transmute(pvparameters.unwrap_or(core::mem::zeroed())), cbparameters, grbit, core::mem::transmute(ptableid)) } + unsafe { JetOpenTableA(sesid, dbid, sztablename, pvparameters.unwrap_or(core::mem::zeroed()) as _, cbparameters, grbit, ptableid as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetOpenTableW(sesid, dbid, sztablename, core::mem::transmute(pvparameters.unwrap_or(core::mem::zeroed())), cbparameters, grbit, core::mem::transmute(ptableid)) } + unsafe { JetOpenTableW(sesid, dbid, sztablename, pvparameters.unwrap_or(core::mem::zeroed()) as _, cbparameters, grbit, ptableid as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetOpenTempTable(sesid, prgcolumndef, ccolumn, grbit, core::mem::transmute(ptableid), core::mem::transmute(prgcolumnid)) } + unsafe { JetOpenTempTable(sesid, prgcolumndef, ccolumn, grbit, ptableid as _, prgcolumnid as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetOpenTempTable2(sesid, prgcolumndef, ccolumn, lcid, grbit, core::mem::transmute(ptableid), core::mem::transmute(prgcolumnid)) } + unsafe { JetOpenTempTable2(sesid, prgcolumndef, ccolumn, lcid, grbit, ptableid as _, prgcolumnid as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetOpenTempTable3(sesid, prgcolumndef, ccolumn, core::mem::transmute(pidxunicode.unwrap_or(core::mem::zeroed())), grbit, core::mem::transmute(ptableid), core::mem::transmute(prgcolumnid)) } + unsafe { JetOpenTempTable3(sesid, prgcolumndef, ccolumn, pidxunicode.unwrap_or(core::mem::zeroed()) as _, grbit, ptableid as _, prgcolumnid as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -977,31 +951,31 @@ pub unsafe fn JetPrepareUpdate(sesid: JET_SESID, tableid: super::StructuredStora #[inline] 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); - unsafe { JetPrereadIndexRanges(sesid, 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(), grbit) } + unsafe { JetPrereadIndexRanges(sesid, tableid, core::mem::transmute(rgindexranges.as_ptr()), rgindexranges.len().try_into().unwrap(), pcrangespreread.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(rgcolumnidpreread.as_ptr()), rgcolumnidpreread.len().try_into().unwrap(), grbit) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetPrereadKeys(sesid, tableid, rgpvkeys, rgcbkeys, ckeys, core::mem::transmute(pckeyspreread.unwrap_or(core::mem::zeroed())), grbit) } + unsafe { JetPrereadKeys(sesid, tableid, rgpvkeys, rgcbkeys, ckeys, pckeyspreread.unwrap_or(core::mem::zeroed()) as _, grbit) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetReadFile(hffile, core::mem::transmute(pv), cb, core::mem::transmute(pcbactual.unwrap_or(core::mem::zeroed()))) } + unsafe { JetReadFile(hffile, pv as _, cb, pcbactual.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetReadFileInstance(instance, hffile, core::mem::transmute(pv), cb, core::mem::transmute(pcbactual.unwrap_or(core::mem::zeroed()))) } + unsafe { JetReadFileInstance(instance, hffile, pv as _, cb, pcbactual.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetRegisterCallback(sesid, tableid, cbtyp, pcallback, core::mem::transmute(pvcontext.unwrap_or(core::mem::zeroed())), phcallbackid) } + unsafe { JetRegisterCallback(sesid, tableid, cbtyp, pcallback, pvcontext.unwrap_or(core::mem::zeroed()) as _, phcallbackid) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1039,43 +1013,43 @@ pub unsafe fn JetResetTableSequential(sesid: JET_SESID, tableid: super::Structur #[inline] 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); - unsafe { JetResizeDatabase(sesid, dbid, cpgtarget, core::mem::transmute(pcpgactual), grbit) } + unsafe { JetResizeDatabase(sesid, dbid, cpgtarget, pcpgactual as _, grbit) } } #[inline] 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); - unsafe { JetRestore2A(sz, core::mem::transmute(szdest.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfn.unwrap_or(core::mem::zeroed()))) } + unsafe { JetRestore2A(sz, szdest.unwrap_or(core::mem::zeroed()) as _, pfn.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { JetRestore2W(sz, core::mem::transmute(szdest.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfn.unwrap_or(core::mem::zeroed()))) } + unsafe { JetRestore2W(sz, szdest.unwrap_or(core::mem::zeroed()) as _, pfn.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { JetRestoreA(szsource, core::mem::transmute(pfn.unwrap_or(core::mem::zeroed()))) } + unsafe { JetRestoreA(szsource, pfn.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { JetRestoreInstanceA(instance, sz, core::mem::transmute(szdest.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfn.unwrap_or(core::mem::zeroed()))) } + unsafe { JetRestoreInstanceA(instance, sz, szdest.unwrap_or(core::mem::zeroed()) as _, pfn.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { JetRestoreInstanceW(instance, sz, core::mem::transmute(szdest.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfn.unwrap_or(core::mem::zeroed()))) } + unsafe { JetRestoreInstanceW(instance, sz, szdest.unwrap_or(core::mem::zeroed()) as _, pfn.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { JetRestoreW(szsource, core::mem::transmute(pfn.unwrap_or(core::mem::zeroed()))) } + unsafe { JetRestoreW(szsource, pfn.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetRetrieveColumn(sesid, tableid, columnid, core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), cbdata, core::mem::transmute(pcbactual.unwrap_or(core::mem::zeroed())), grbit, core::mem::transmute(pretinfo.unwrap_or(core::mem::zeroed()))) } + unsafe { JetRetrieveColumn(sesid, tableid, columnid, pvdata.unwrap_or(core::mem::zeroed()) as _, cbdata, pcbactual.unwrap_or(core::mem::zeroed()) as _, grbit, pretinfo.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1087,7 +1061,7 @@ pub unsafe fn JetRetrieveColumns(sesid: JET_SESID, tableid: super::StructuredSto #[inline] 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); - unsafe { JetRetrieveKey(sesid, tableid, core::mem::transmute(pvkey.unwrap_or(core::mem::zeroed())), cbmax, core::mem::transmute(pcbactual.unwrap_or(core::mem::zeroed())), grbit) } + unsafe { JetRetrieveKey(sesid, tableid, pvkey.unwrap_or(core::mem::zeroed()) as _, cbmax, pcbactual.unwrap_or(core::mem::zeroed()) as _, grbit) } } #[inline] pub unsafe fn JetRollback(sesid: JET_SESID, grbit: u32) -> i32 { @@ -1104,7 +1078,7 @@ pub unsafe fn JetSeek(sesid: JET_SESID, tableid: super::StructuredStorage::JET_T #[inline] 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); - unsafe { JetSetColumn(sesid, tableid, columnid, core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), cbdata, grbit, core::mem::transmute(psetinfo.unwrap_or(core::mem::zeroed()))) } + unsafe { JetSetColumn(sesid, tableid, columnid, pvdata.unwrap_or(core::mem::zeroed()) as _, cbdata, grbit, psetinfo.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 { @@ -1126,49 +1100,49 @@ pub unsafe fn JetSetColumns(sesid: JET_SESID, tableid: super::StructuredStorage: #[inline] 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); - unsafe { JetSetCurrentIndex2A(sesid, tableid, core::mem::transmute(szindexname.unwrap_or(core::mem::zeroed())), grbit) } + unsafe { JetSetCurrentIndex2A(sesid, tableid, szindexname.unwrap_or(core::mem::zeroed()) as _, grbit) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetSetCurrentIndex2W(sesid, tableid, core::mem::transmute(szindexname.unwrap_or(core::mem::zeroed())), grbit) } + unsafe { JetSetCurrentIndex2W(sesid, tableid, szindexname.unwrap_or(core::mem::zeroed()) as _, grbit) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetSetCurrentIndex3A(sesid, tableid, core::mem::transmute(szindexname.unwrap_or(core::mem::zeroed())), grbit, itagsequence) } + unsafe { JetSetCurrentIndex3A(sesid, tableid, szindexname.unwrap_or(core::mem::zeroed()) as _, grbit, itagsequence) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetSetCurrentIndex3W(sesid, tableid, core::mem::transmute(szindexname.unwrap_or(core::mem::zeroed())), grbit, itagsequence) } + unsafe { JetSetCurrentIndex3W(sesid, tableid, szindexname.unwrap_or(core::mem::zeroed()) as _, grbit, itagsequence) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetSetCurrentIndex4A(sesid, tableid, core::mem::transmute(szindexname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pindexid.unwrap_or(core::mem::zeroed())), grbit, itagsequence) } + unsafe { JetSetCurrentIndex4A(sesid, tableid, szindexname.unwrap_or(core::mem::zeroed()) as _, pindexid.unwrap_or(core::mem::zeroed()) as _, grbit, itagsequence) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetSetCurrentIndex4W(sesid, tableid, core::mem::transmute(szindexname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pindexid.unwrap_or(core::mem::zeroed())), grbit, itagsequence) } + unsafe { JetSetCurrentIndex4W(sesid, tableid, szindexname.unwrap_or(core::mem::zeroed()) as _, pindexid.unwrap_or(core::mem::zeroed()) as _, grbit, itagsequence) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetSetCurrentIndexA(sesid, tableid, core::mem::transmute(szindexname.unwrap_or(core::mem::zeroed()))) } + unsafe { JetSetCurrentIndexA(sesid, tableid, szindexname.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetSetCurrentIndexW(sesid, tableid, core::mem::transmute(szindexname.unwrap_or(core::mem::zeroed()))) } + unsafe { JetSetCurrentIndexW(sesid, tableid, szindexname.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1179,12 +1153,12 @@ pub unsafe fn JetSetCursorFilter(sesid: JET_SESID, tableid: super::StructuredSto #[inline] 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); - unsafe { JetSetDatabaseSizeA(sesid, szdatabasename, cpg, core::mem::transmute(pcpgreal)) } + unsafe { JetSetDatabaseSizeA(sesid, szdatabasename, cpg, pcpgreal as _) } } #[inline] 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); - unsafe { JetSetDatabaseSizeW(sesid, szdatabasename, cpg, core::mem::transmute(pcpgreal)) } + unsafe { JetSetDatabaseSizeW(sesid, szdatabasename, cpg, pcpgreal as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1207,19 +1181,19 @@ pub unsafe fn JetSetSessionContext(sesid: JET_SESID, ulcontext: super::Structure #[inline] 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); - unsafe { JetSetSessionParameter(core::mem::transmute(sesid.unwrap_or(core::mem::zeroed())), sesparamid, core::mem::transmute(pvparam.unwrap_or(core::mem::zeroed())), cbparam) } + unsafe { JetSetSessionParameter(sesid.unwrap_or(core::mem::zeroed()) as _, sesparamid, pvparam.unwrap_or(core::mem::zeroed()) as _, cbparam) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetSetSystemParameterA(core::mem::transmute(pinstance.unwrap_or(core::mem::zeroed())), core::mem::transmute(sesid.unwrap_or(core::mem::zeroed())), paramid, core::mem::transmute(lparam.unwrap_or(core::mem::zeroed())), core::mem::transmute(szparam.unwrap_or(core::mem::zeroed()))) } + unsafe { JetSetSystemParameterA(pinstance.unwrap_or(core::mem::zeroed()) as _, sesid.unwrap_or(core::mem::zeroed()) as _, paramid, lparam.unwrap_or(core::mem::zeroed()) as _, szparam.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetSetSystemParameterW(core::mem::transmute(pinstance.unwrap_or(core::mem::zeroed())), core::mem::transmute(sesid.unwrap_or(core::mem::zeroed())), paramid, core::mem::transmute(lparam.unwrap_or(core::mem::zeroed())), core::mem::transmute(szparam.unwrap_or(core::mem::zeroed()))) } + unsafe { JetSetSystemParameterW(pinstance.unwrap_or(core::mem::zeroed()) as _, sesid.unwrap_or(core::mem::zeroed()) as _, paramid, lparam.unwrap_or(core::mem::zeroed()) as _, szparam.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1282,13 +1256,13 @@ pub unsafe fn JetUnregisterCallback(sesid: JET_SESID, tableid: super::Structured #[inline] 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); - unsafe { JetUpdate(sesid, tableid, core::mem::transmute(pvbookmark.unwrap_or(core::mem::zeroed())), cbbookmark, core::mem::transmute(pcbactual.unwrap_or(core::mem::zeroed()))) } + unsafe { JetUpdate(sesid, tableid, pvbookmark.unwrap_or(core::mem::zeroed()) as _, cbbookmark, pcbactual.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] 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); - unsafe { JetUpdate2(sesid, tableid, core::mem::transmute(pvbookmark.unwrap_or(core::mem::zeroed())), cbbookmark, core::mem::transmute(pcbactual.unwrap_or(core::mem::zeroed())), grbit) } + unsafe { JetUpdate2(sesid, tableid, pvbookmark.unwrap_or(core::mem::zeroed()) as _, cbbookmark, pcbactual.unwrap_or(core::mem::zeroed()) as _, 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 288a81f3be..4ff038cacb 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/OfflineFiles/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/OfflineFiles/mod.rs @@ -1,17 +1,17 @@ #[inline] pub unsafe fn OfflineFilesEnable(benable: bool, pbrebootrequired: *mut super::super::Foundation::BOOL) -> u32 { windows_targets::link!("cscapi.dll" "system" fn OfflineFilesEnable(benable : super::super::Foundation:: BOOL, pbrebootrequired : *mut super::super::Foundation:: BOOL) -> u32); - unsafe { OfflineFilesEnable(benable.into(), core::mem::transmute(pbrebootrequired)) } + unsafe { OfflineFilesEnable(benable.into(), pbrebootrequired as _) } } #[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); - unsafe { OfflineFilesQueryStatus(core::mem::transmute(pbactive.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbenabled.unwrap_or(core::mem::zeroed()))) } + unsafe { OfflineFilesQueryStatus(pbactive.unwrap_or(core::mem::zeroed()) as _, pbenabled.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { 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()))) } + unsafe { OfflineFilesQueryStatusEx(pbactive.unwrap_or(core::mem::zeroed()) as _, pbenabled.unwrap_or(core::mem::zeroed()) as _, pbavailable.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn OfflineFilesStart() -> u32 { @@ -22,7 +22,7 @@ windows_core::imp::define_interface!(IEnumOfflineFilesItems, IEnumOfflineFilesIt windows_core::imp::interface_hierarchy!(IEnumOfflineFilesItems, windows_core::IUnknown); impl IEnumOfflineFilesItems { pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -100,7 +100,7 @@ windows_core::imp::define_interface!(IEnumOfflineFilesSettings, IEnumOfflineFile windows_core::imp::interface_hierarchy!(IEnumOfflineFilesSettings, windows_core::IUnknown); impl IEnumOfflineFilesSettings { pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -182,7 +182,7 @@ impl IOfflineFilesCache { P5: windows_core::Param, P6: windows_core::Param, { - unsafe { (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.into(), dwsynccontrol, pisyncconflicthandler.param().abi(), piprogress.param().abi(), core::mem::transmute(psyncid.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Synchronize)(windows_core::Interface::as_raw(self), hwndparent.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len().try_into().unwrap(), basync.into(), dwsynccontrol, pisyncconflicthandler.param().abi(), piprogress.param().abi(), psyncid.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn DeleteItems(&self, rgpszpaths: &[windows_core::PCWSTR], dwflags: u32, basync: bool, piprogress: P4) -> windows_core::Result<()> where @@ -201,22 +201,22 @@ impl IOfflineFilesCache { where P6: windows_core::Param, { - unsafe { (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.into(), basync.into(), dwpincontrolflags, piprogress.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).Pin)(windows_core::Interface::as_raw(self), hwndparent.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len().try_into().unwrap(), bdeep.into(), basync.into(), dwpincontrolflags, piprogress.param().abi()).ok() } } pub unsafe fn Unpin(&self, hwndparent: Option, rgpszpaths: &[windows_core::PCWSTR], bdeep: bool, basync: bool, dwpincontrolflags: u32, piprogress: P6) -> windows_core::Result<()> where P6: windows_core::Param, { - unsafe { (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.into(), basync.into(), dwpincontrolflags, piprogress.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).Unpin)(windows_core::Interface::as_raw(self), hwndparent.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len().try_into().unwrap(), bdeep.into(), basync.into(), 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetEncryptionStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pbencrypted), core::mem::transmute(pbpartial)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEncryptionStatus)(windows_core::Interface::as_raw(self), pbencrypted as _, pbpartial as _).ok() } } pub unsafe fn Encrypt(&self, hwndparent: Option, bencrypt: bool, dwencryptioncontrolflags: u32, basync: bool, piprogress: P4) -> windows_core::Result<()> where P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Encrypt)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), bencrypt.into(), dwencryptioncontrolflags, basync.into(), piprogress.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).Encrypt)(windows_core::Interface::as_raw(self), hwndparent.unwrap_or(core::mem::zeroed()) as _, bencrypt.into(), dwencryptioncontrolflags, basync.into(), piprogress.param().abi()).ok() } } pub unsafe fn FindItem(&self, pszpath: P0, dwqueryflags: u32) -> windows_core::Result where @@ -254,7 +254,7 @@ impl IOfflineFilesCache { } } pub unsafe fn GetDiskSpaceInformation(&self, pcbvolumetotal: *mut u64, pcblimit: *mut u64, pcbused: *mut u64, pcbunpinnedlimit: *mut u64, pcbunpinnedused: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDiskSpaceInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(pcbvolumetotal), core::mem::transmute(pcblimit), core::mem::transmute(pcbused), core::mem::transmute(pcbunpinnedlimit), core::mem::transmute(pcbunpinnedused)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDiskSpaceInformation)(windows_core::Interface::as_raw(self), pcbvolumetotal as _, pcblimit as _, pcbused as _, pcbunpinnedlimit as _, pcbunpinnedused as _).ok() } } pub unsafe fn SetDiskSpaceLimits(&self, cblimit: u64, cbunpinnedlimit: u64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetDiskSpaceLimits)(windows_core::Interface::as_raw(self), cblimit, cbunpinnedlimit).ok() } @@ -285,7 +285,7 @@ impl IOfflineFilesCache { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).IsPathCacheable)(windows_core::Interface::as_raw(self), pszpath.param().abi(), core::mem::transmute(pbcacheable), core::mem::transmute(psharecachingmode)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsPathCacheable)(windows_core::Interface::as_raw(self), pszpath.param().abi(), pbcacheable as _, psharecachingmode as _).ok() } } } #[repr(C)] @@ -532,7 +532,7 @@ windows_core::imp::define_interface!(IOfflineFilesChangeInfo, IOfflineFilesChang windows_core::imp::interface_hierarchy!(IOfflineFilesChangeInfo, windows_core::IUnknown); impl IOfflineFilesChangeInfo { pub unsafe fn IsDirty(&self, pbdirty: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { - unsafe { (windows_core::Interface::vtable(self).IsDirty)(windows_core::Interface::as_raw(self), core::mem::transmute(pbdirty)) } + unsafe { (windows_core::Interface::vtable(self).IsDirty)(windows_core::Interface::as_raw(self), pbdirty as _) } } pub unsafe fn IsDeletedOffline(&self) -> windows_core::Result { unsafe { @@ -670,18 +670,18 @@ windows_core::imp::define_interface!(IOfflineFilesConnectionInfo, IOfflineFilesC windows_core::imp::interface_hierarchy!(IOfflineFilesConnectionInfo, windows_core::IUnknown); impl IOfflineFilesConnectionInfo { pub unsafe fn GetConnectState(&self, pconnectstate: *mut OFFLINEFILES_CONNECT_STATE, pofflinereason: *mut OFFLINEFILES_OFFLINE_REASON) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetConnectState)(windows_core::Interface::as_raw(self), core::mem::transmute(pconnectstate), core::mem::transmute(pofflinereason)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConnectState)(windows_core::Interface::as_raw(self), pconnectstate as _, pofflinereason as _).ok() } } pub unsafe fn SetConnectState(&self, hwndparent: Option, dwflags: u32, connectstate: OFFLINEFILES_CONNECT_STATE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetConnectState)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), dwflags, connectstate).ok() } + unsafe { (windows_core::Interface::vtable(self).SetConnectState)(windows_core::Interface::as_raw(self), hwndparent.unwrap_or(core::mem::zeroed()) as _, dwflags, connectstate).ok() } } pub unsafe fn TransitionOnline(&self, hwndparent: Option, dwflags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TransitionOnline)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), dwflags).ok() } + unsafe { (windows_core::Interface::vtable(self).TransitionOnline)(windows_core::Interface::as_raw(self), hwndparent.unwrap_or(core::mem::zeroed()) as _, dwflags).ok() } } pub unsafe fn TransitionOffline(&self, hwndparent: Option, dwflags: u32, bforceopenfilesclosed: bool) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).TransitionOffline)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), dwflags, bforceopenfilesclosed.into(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).TransitionOffline)(windows_core::Interface::as_raw(self), hwndparent.unwrap_or(core::mem::zeroed()) as _, dwflags, bforceopenfilesclosed.into(), &mut result__).map(|| result__) } } } @@ -1530,13 +1530,13 @@ windows_core::imp::define_interface!(IOfflineFilesEventsFilter, IOfflineFilesEve windows_core::imp::interface_hierarchy!(IOfflineFilesEventsFilter, windows_core::IUnknown); impl IOfflineFilesEventsFilter { pub unsafe fn GetPathFilter(&self, ppszfilter: *mut windows_core::PWSTR, pmatch: *mut OFFLINEFILES_PATHFILTER_MATCH) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPathFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszfilter), core::mem::transmute(pmatch)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPathFilter)(windows_core::Interface::as_raw(self), ppszfilter as _, pmatch as _).ok() } } pub unsafe fn GetIncludedEvents(&self, prgevents: &mut [OFFLINEFILES_EVENTS], pcevents: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIncludedEvents)(windows_core::Interface::as_raw(self), prgevents.len().try_into().unwrap(), core::mem::transmute(prgevents.as_ptr()), core::mem::transmute(pcevents)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIncludedEvents)(windows_core::Interface::as_raw(self), prgevents.len().try_into().unwrap(), core::mem::transmute(prgevents.as_ptr()), pcevents as _).ok() } } pub unsafe fn GetExcludedEvents(&self, prgevents: &mut [OFFLINEFILES_EVENTS], pcevents: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetExcludedEvents)(windows_core::Interface::as_raw(self), prgevents.len().try_into().unwrap(), core::mem::transmute(prgevents.as_ptr()), core::mem::transmute(pcevents)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetExcludedEvents)(windows_core::Interface::as_raw(self), prgevents.len().try_into().unwrap(), core::mem::transmute(prgevents.as_ptr()), pcevents as _).ok() } } } #[repr(C)] @@ -1658,7 +1658,7 @@ impl IOfflineFilesFileSysInfo { } } pub unsafe fn GetTimes(&self, copy: OFFLINEFILES_ITEM_COPY, pftcreationtime: *mut super::super::Foundation::FILETIME, pftlastwritetime: *mut super::super::Foundation::FILETIME, pftchangetime: *mut super::super::Foundation::FILETIME, pftlastaccesstime: *mut super::super::Foundation::FILETIME) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTimes)(windows_core::Interface::as_raw(self), copy, core::mem::transmute(pftcreationtime), core::mem::transmute(pftlastwritetime), core::mem::transmute(pftchangetime), core::mem::transmute(pftlastaccesstime)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTimes)(windows_core::Interface::as_raw(self), copy, pftcreationtime as _, pftlastwritetime as _, pftchangetime as _, pftlastaccesstime as _).ok() } } pub unsafe fn GetFileSize(&self, copy: OFFLINEFILES_ITEM_COPY) -> windows_core::Result { unsafe { @@ -1952,10 +1952,10 @@ windows_core::imp::define_interface!(IOfflineFilesItemFilter, IOfflineFilesItemF windows_core::imp::interface_hierarchy!(IOfflineFilesItemFilter, windows_core::IUnknown); impl IOfflineFilesItemFilter { pub unsafe fn GetFilterFlags(&self, pullflags: *mut u64, pullmask: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFilterFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(pullflags), core::mem::transmute(pullmask)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFilterFlags)(windows_core::Interface::as_raw(self), pullflags as _, pullmask as _).ok() } } pub unsafe fn GetTimeFilter(&self, pfttime: *mut super::super::Foundation::FILETIME, pbevaltimeofday: *mut super::super::Foundation::BOOL, ptimetype: *mut OFFLINEFILES_ITEM_TIME, pcompare: *mut OFFLINEFILES_COMPARE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTimeFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(pfttime), core::mem::transmute(pbevaltimeofday), core::mem::transmute(ptimetype), core::mem::transmute(pcompare)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTimeFilter)(windows_core::Interface::as_raw(self), pfttime as _, pbevaltimeofday as _, ptimetype as _, pcompare as _).ok() } } pub unsafe fn GetPatternFilter(&self, pszpattern: &mut [u16]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetPatternFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(pszpattern.as_ptr()), pszpattern.len().try_into().unwrap()).ok() } @@ -2015,16 +2015,16 @@ impl IOfflineFilesPinInfo { } } pub unsafe fn IsPinnedForUser(&self, pbpinnedforuser: *mut super::super::Foundation::BOOL, pbinherit: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsPinnedForUser)(windows_core::Interface::as_raw(self), core::mem::transmute(pbpinnedforuser), core::mem::transmute(pbinherit)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsPinnedForUser)(windows_core::Interface::as_raw(self), pbpinnedforuser as _, pbinherit as _).ok() } } pub unsafe fn IsPinnedForUserByPolicy(&self, pbpinnedforuser: *mut super::super::Foundation::BOOL, pbinherit: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsPinnedForUserByPolicy)(windows_core::Interface::as_raw(self), core::mem::transmute(pbpinnedforuser), core::mem::transmute(pbinherit)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsPinnedForUserByPolicy)(windows_core::Interface::as_raw(self), pbpinnedforuser as _, pbinherit as _).ok() } } pub unsafe fn IsPinnedForComputer(&self, pbpinnedforcomputer: *mut super::super::Foundation::BOOL, pbinherit: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsPinnedForComputer)(windows_core::Interface::as_raw(self), core::mem::transmute(pbpinnedforcomputer), core::mem::transmute(pbinherit)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsPinnedForComputer)(windows_core::Interface::as_raw(self), pbpinnedforcomputer as _, pbinherit as _).ok() } } pub unsafe fn IsPinnedForFolderRedirection(&self, pbpinnedforfolderredirection: *mut super::super::Foundation::BOOL, pbinherit: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsPinnedForFolderRedirection)(windows_core::Interface::as_raw(self), core::mem::transmute(pbpinnedforfolderredirection), core::mem::transmute(pbinherit)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsPinnedForFolderRedirection)(windows_core::Interface::as_raw(self), pbpinnedforfolderredirection as _, pbinherit as _).ok() } } } #[repr(C)] @@ -2281,7 +2281,7 @@ impl IOfflineFilesSetting { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetValue(&self, pvarvalue: *mut super::super::System::Variant::VARIANT, pbsetbypolicy: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetValue)(windows_core::Interface::as_raw(self), core::mem::transmute(pvarvalue), core::mem::transmute(pbsetbypolicy)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetValue)(windows_core::Interface::as_raw(self), core::mem::transmute(pvarvalue), pbsetbypolicy as _).ok() } } } #[repr(C)] @@ -2636,7 +2636,7 @@ windows_core::imp::define_interface!(IOfflineFilesSuspendInfo, IOfflineFilesSusp windows_core::imp::interface_hierarchy!(IOfflineFilesSuspendInfo, windows_core::IUnknown); impl IOfflineFilesSuspendInfo { pub unsafe fn IsSuspended(&self, pbsuspended: *mut super::super::Foundation::BOOL, pbsuspendedroot: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsSuspended)(windows_core::Interface::as_raw(self), core::mem::transmute(pbsuspended), core::mem::transmute(pbsuspendedroot)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsSuspended)(windows_core::Interface::as_raw(self), pbsuspended as _, pbsuspendedroot as _).ok() } } } #[repr(C)] @@ -2669,7 +2669,7 @@ impl IOfflineFilesSyncConflictHandler { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ResolveConflict)(windows_core::Interface::as_raw(self), pszpath.param().abi(), fstateknown, state, fchangedetails, core::mem::transmute(pconflictresolution), core::mem::transmute(ppsznewname)).ok() } + unsafe { (windows_core::Interface::vtable(self).ResolveConflict)(windows_core::Interface::as_raw(self), pszpath.param().abi(), fstateknown, state, fchangedetails, pconflictresolution as _, ppsznewname as _).ok() } } } #[repr(C)] @@ -2717,10 +2717,10 @@ impl IOfflineFilesSyncErrorInfo { } } pub unsafe fn InfoEnumerated(&self, pblocalenumerated: *mut super::super::Foundation::BOOL, pbremoteenumerated: *mut super::super::Foundation::BOOL, pboriginalenumerated: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).InfoEnumerated)(windows_core::Interface::as_raw(self), core::mem::transmute(pblocalenumerated), core::mem::transmute(pbremoteenumerated), core::mem::transmute(pboriginalenumerated)).ok() } + unsafe { (windows_core::Interface::vtable(self).InfoEnumerated)(windows_core::Interface::as_raw(self), pblocalenumerated as _, pbremoteenumerated as _, pboriginalenumerated as _).ok() } } pub unsafe fn InfoAvailable(&self, pblocalinfo: *mut super::super::Foundation::BOOL, pbremoteinfo: *mut super::super::Foundation::BOOL, pboriginalinfo: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).InfoAvailable)(windows_core::Interface::as_raw(self), core::mem::transmute(pblocalinfo), core::mem::transmute(pbremoteinfo), core::mem::transmute(pboriginalinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).InfoAvailable)(windows_core::Interface::as_raw(self), pblocalinfo as _, pbremoteinfo as _, pboriginalinfo as _).ok() } } pub unsafe fn GetLocalInfo(&self) -> windows_core::Result { unsafe { @@ -2864,7 +2864,7 @@ impl IOfflineFilesSyncErrorItemInfo { } } pub unsafe fn GetFileTimes(&self, pftlastwrite: *mut super::super::Foundation::FILETIME, pftchange: *mut super::super::Foundation::FILETIME) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFileTimes)(windows_core::Interface::as_raw(self), core::mem::transmute(pftlastwrite), core::mem::transmute(pftchange)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFileTimes)(windows_core::Interface::as_raw(self), pftlastwrite as _, pftchange as _).ok() } } pub unsafe fn GetFileSize(&self) -> windows_core::Result { unsafe { 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 0e7fde418f..1f61d2c1f4 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 @@ -12,47 +12,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); - unsafe { AddPackageDependency(packagedependencyid.param().abi(), rank, options, core::mem::transmute(packagedependencycontext), core::mem::transmute(packagefullname.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { AddPackageDependency(packagedependencyid.param().abi(), rank, options, packagedependencycontext as _, packagefullname.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { AppPolicyGetClrCompat(processtoken, core::mem::transmute(policy)) } + unsafe { AppPolicyGetClrCompat(processtoken, policy as _) } } #[inline] 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); - unsafe { AppPolicyGetCreateFileAccess(processtoken, core::mem::transmute(policy)) } + unsafe { AppPolicyGetCreateFileAccess(processtoken, policy as _) } } #[inline] 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); - unsafe { AppPolicyGetLifecycleManagement(processtoken, core::mem::transmute(policy)) } + unsafe { AppPolicyGetLifecycleManagement(processtoken, policy as _) } } #[inline] 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); - unsafe { AppPolicyGetMediaFoundationCodecLoading(processtoken, core::mem::transmute(policy)) } + unsafe { AppPolicyGetMediaFoundationCodecLoading(processtoken, policy as _) } } #[inline] 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); - unsafe { AppPolicyGetProcessTerminationMethod(processtoken, core::mem::transmute(policy)) } + unsafe { AppPolicyGetProcessTerminationMethod(processtoken, policy as _) } } #[inline] 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); - unsafe { AppPolicyGetShowDeveloperDiagnostic(processtoken, core::mem::transmute(policy)) } + unsafe { AppPolicyGetShowDeveloperDiagnostic(processtoken, policy as _) } } #[inline] 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); - unsafe { AppPolicyGetThreadInitializationType(processtoken, core::mem::transmute(policy)) } + unsafe { AppPolicyGetThreadInitializationType(processtoken, policy as _) } } #[inline] 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); - unsafe { AppPolicyGetWindowingModel(processtoken, core::mem::transmute(policy)) } + unsafe { AppPolicyGetWindowingModel(processtoken, policy as _) } } #[inline] pub unsafe fn CheckIsMSIXPackage(packagefullname: P0) -> windows_core::Result @@ -108,7 +108,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn FindPackagesByPackageFamily(packagefamilyname : windows_core::PCWSTR, packagefilters : u32, count : *mut u32, packagefullnames : *mut windows_core::PWSTR, bufferlength : *mut u32, buffer : windows_core::PWSTR, packageproperties : *mut u32) -> super::super::super::Foundation:: WIN32_ERROR); - unsafe { FindPackagesByPackageFamily(packagefamilyname.param().abi(), 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()))) } + unsafe { FindPackagesByPackageFamily(packagefamilyname.param().abi(), packagefilters, count as _, packagefullnames.unwrap_or(core::mem::zeroed()) as _, bufferlength as _, buffer.unwrap_or(core::mem::zeroed()) as _, packageproperties.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FormatApplicationUserModelId(packagefamilyname: P0, packagerelativeapplicationid: P1, applicationusermodelidlength: *mut u32, applicationusermodelid: Option) -> super::super::super::Foundation::WIN32_ERROR @@ -117,62 +117,62 @@ where 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); - unsafe { FormatApplicationUserModelId(packagefamilyname.param().abi(), packagerelativeapplicationid.param().abi(), core::mem::transmute(applicationusermodelidlength), core::mem::transmute(applicationusermodelid.unwrap_or(core::mem::zeroed()))) } + unsafe { FormatApplicationUserModelId(packagefamilyname.param().abi(), packagerelativeapplicationid.param().abi(), applicationusermodelidlength as _, applicationusermodelid.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { GetApplicationUserModelId(hprocess, core::mem::transmute(applicationusermodelidlength), core::mem::transmute(applicationusermodelid.unwrap_or(core::mem::zeroed()))) } + unsafe { GetApplicationUserModelId(hprocess, applicationusermodelidlength as _, applicationusermodelid.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { GetApplicationUserModelIdFromToken(token, core::mem::transmute(applicationusermodelidlength), core::mem::transmute(applicationusermodelid.unwrap_or(core::mem::zeroed()))) } + unsafe { GetApplicationUserModelIdFromToken(token, applicationusermodelidlength as _, applicationusermodelid.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { GetCurrentApplicationUserModelId(core::mem::transmute(applicationusermodelidlength), core::mem::transmute(applicationusermodelid.unwrap_or(core::mem::zeroed()))) } + unsafe { GetCurrentApplicationUserModelId(applicationusermodelidlength as _, applicationusermodelid.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { GetCurrentPackageFamilyName(core::mem::transmute(packagefamilynamelength), core::mem::transmute(packagefamilyname.unwrap_or(core::mem::zeroed()))) } + unsafe { GetCurrentPackageFamilyName(packagefamilynamelength as _, packagefamilyname.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { GetCurrentPackageFullName(core::mem::transmute(packagefullnamelength), core::mem::transmute(packagefullname.unwrap_or(core::mem::zeroed()))) } + unsafe { GetCurrentPackageFullName(packagefullnamelength as _, packagefullname.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { GetCurrentPackageId(core::mem::transmute(bufferlength), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } + unsafe { GetCurrentPackageId(bufferlength as _, buffer.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { GetCurrentPackageInfo(flags, core::mem::transmute(bufferlength), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(count.unwrap_or(core::mem::zeroed()))) } + unsafe { GetCurrentPackageInfo(flags, bufferlength as _, buffer.unwrap_or(core::mem::zeroed()) as _, count.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { GetCurrentPackageInfo2(flags, packagepathtype, core::mem::transmute(bufferlength), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(count.unwrap_or(core::mem::zeroed()))) } + unsafe { GetCurrentPackageInfo2(flags, packagepathtype, bufferlength as _, buffer.unwrap_or(core::mem::zeroed()) as _, count.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { GetCurrentPackageInfo3(flags, packageinfotype, core::mem::transmute(bufferlength), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(count.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { GetCurrentPackageInfo3(flags, packageinfotype, bufferlength as _, buffer.unwrap_or(core::mem::zeroed()) as _, count.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { GetCurrentPackagePath(core::mem::transmute(pathlength), core::mem::transmute(path.unwrap_or(core::mem::zeroed()))) } + unsafe { GetCurrentPackagePath(pathlength as _, path.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { GetCurrentPackagePath2(packagepathtype, core::mem::transmute(pathlength), core::mem::transmute(path.unwrap_or(core::mem::zeroed()))) } + unsafe { GetCurrentPackagePath2(packagepathtype, pathlength as _, path.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GetCurrentPackageVirtualizationContext() -> PACKAGE_VIRTUALIZATION_CONTEXT_HANDLE { @@ -190,27 +190,27 @@ pub unsafe fn GetIdForPackageDependencyContext(packagedependencycontext: PACKAGE #[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); - unsafe { GetPackageApplicationIds(packageinforeference, core::mem::transmute(bufferlength), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(count.unwrap_or(core::mem::zeroed()))) } + unsafe { GetPackageApplicationIds(packageinforeference, bufferlength as _, buffer.unwrap_or(core::mem::zeroed()) as _, count.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { GetPackageFamilyName(hprocess, core::mem::transmute(packagefamilynamelength), core::mem::transmute(packagefamilyname.unwrap_or(core::mem::zeroed()))) } + unsafe { GetPackageFamilyName(hprocess, packagefamilynamelength as _, packagefamilyname.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { GetPackageFamilyNameFromToken(token, core::mem::transmute(packagefamilynamelength), core::mem::transmute(packagefamilyname.unwrap_or(core::mem::zeroed()))) } + unsafe { GetPackageFamilyNameFromToken(token, packagefamilynamelength as _, packagefamilyname.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { GetPackageFullName(hprocess, core::mem::transmute(packagefullnamelength), core::mem::transmute(packagefullname.unwrap_or(core::mem::zeroed()))) } + unsafe { GetPackageFullName(hprocess, packagefullnamelength as _, packagefullname.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { GetPackageFullNameFromToken(token, core::mem::transmute(packagefullnamelength), core::mem::transmute(packagefullname.unwrap_or(core::mem::zeroed()))) } + unsafe { GetPackageFullNameFromToken(token, packagefullnamelength as _, packagefullname.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GetPackageGraphRevisionId() -> u32 { @@ -220,22 +220,22 @@ pub unsafe fn GetPackageGraphRevisionId() -> u32 { #[inline] 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); - unsafe { GetPackageId(hprocess, core::mem::transmute(bufferlength), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } + unsafe { GetPackageId(hprocess, bufferlength as _, buffer.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { GetPackageInfo(packageinforeference, flags, core::mem::transmute(bufferlength), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(count.unwrap_or(core::mem::zeroed()))) } + unsafe { GetPackageInfo(packageinforeference, flags, bufferlength as _, buffer.unwrap_or(core::mem::zeroed()) as _, count.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { GetPackageInfo2(packageinforeference, flags, packagepathtype, core::mem::transmute(bufferlength), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(count.unwrap_or(core::mem::zeroed()))) } + unsafe { GetPackageInfo2(packageinforeference, flags, packagepathtype, bufferlength as _, buffer.unwrap_or(core::mem::zeroed()) as _, count.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { GetPackagePath(packageid, core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pathlength), core::mem::transmute(path.unwrap_or(core::mem::zeroed()))) } + unsafe { GetPackagePath(packageid, reserved.unwrap_or(core::mem::zeroed()) as _, pathlength as _, path.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GetPackagePathByFullName(packagefullname: P0, pathlength: *mut u32, path: Option) -> super::super::super::Foundation::WIN32_ERROR @@ -243,7 +243,7 @@ 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); - unsafe { GetPackagePathByFullName(packagefullname.param().abi(), core::mem::transmute(pathlength), core::mem::transmute(path.unwrap_or(core::mem::zeroed()))) } + unsafe { GetPackagePathByFullName(packagefullname.param().abi(), pathlength as _, path.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GetPackagePathByFullName2(packagefullname: P0, packagepathtype: PackagePathType, pathlength: *mut u32, path: Option) -> super::super::super::Foundation::WIN32_ERROR @@ -251,7 +251,7 @@ 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); - unsafe { GetPackagePathByFullName2(packagefullname.param().abi(), packagepathtype, core::mem::transmute(pathlength), core::mem::transmute(path.unwrap_or(core::mem::zeroed()))) } + unsafe { GetPackagePathByFullName2(packagefullname.param().abi(), packagepathtype, pathlength as _, path.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -259,7 +259,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetPackagesByPackageFamily(packagefamilyname : windows_core::PCWSTR, count : *mut u32, packagefullnames : *mut windows_core::PWSTR, bufferlength : *mut u32, buffer : windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - unsafe { 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()))) } + unsafe { GetPackagesByPackageFamily(packagefamilyname.param().abi(), count as _, packagefullnames.unwrap_or(core::mem::zeroed()) as _, bufferlength as _, buffer.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GetProcessesInVirtualizationContext(packagefamilyname: P0, count: *mut u32, processes: *mut *mut super::super::super::Foundation::HANDLE) -> windows_core::Result<()> @@ -267,7 +267,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetProcessesInVirtualizationContext(packagefamilyname : windows_core::PCWSTR, count : *mut u32, processes : *mut *mut super::super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - unsafe { GetProcessesInVirtualizationContext(packagefamilyname.param().abi(), core::mem::transmute(count), core::mem::transmute(processes)).ok() } + unsafe { GetProcessesInVirtualizationContext(packagefamilyname.param().abi(), count as _, processes as _).ok() } } #[inline] pub unsafe fn GetResolvedPackageFullNameForPackageDependency(packagedependencyid: P0) -> windows_core::Result @@ -286,7 +286,7 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-appmodel-runtime-l1-1-1.dll" "system" fn GetStagedPackageOrigin(packagefullname : windows_core::PCWSTR, origin : *mut PackageOrigin) -> super::super::super::Foundation:: WIN32_ERROR); - unsafe { GetStagedPackageOrigin(packagefullname.param().abi(), core::mem::transmute(origin)) } + unsafe { GetStagedPackageOrigin(packagefullname.param().abi(), origin as _) } } #[inline] pub unsafe fn GetStagedPackagePathByFullName(packagefullname: P0, pathlength: *mut u32, path: Option) -> super::super::super::Foundation::WIN32_ERROR @@ -294,7 +294,7 @@ 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); - unsafe { GetStagedPackagePathByFullName(packagefullname.param().abi(), core::mem::transmute(pathlength), core::mem::transmute(path.unwrap_or(core::mem::zeroed()))) } + unsafe { GetStagedPackagePathByFullName(packagefullname.param().abi(), pathlength as _, path.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GetStagedPackagePathByFullName2(packagefullname: P0, packagepathtype: PackagePathType, pathlength: *mut u32, path: Option) -> super::super::super::Foundation::WIN32_ERROR @@ -302,7 +302,7 @@ 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); - unsafe { GetStagedPackagePathByFullName2(packagefullname.param().abi(), packagepathtype, core::mem::transmute(pathlength), core::mem::transmute(path.unwrap_or(core::mem::zeroed()))) } + unsafe { GetStagedPackagePathByFullName2(packagefullname.param().abi(), packagepathtype, pathlength as _, path.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn OpenPackageInfoByFullName(packagefullname: P0, reserved: Option, packageinforeference: *mut *mut _PACKAGE_INFO_REFERENCE) -> super::super::super::Foundation::WIN32_ERROR @@ -310,7 +310,7 @@ 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); - unsafe { OpenPackageInfoByFullName(packagefullname.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(packageinforeference)) } + unsafe { OpenPackageInfoByFullName(packagefullname.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _, packageinforeference as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -319,7 +319,7 @@ where 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); - unsafe { 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)) } + unsafe { OpenPackageInfoByFullNameForUser(usersid.unwrap_or(core::mem::zeroed()) as _, packagefullname.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _, packageinforeference as _) } } #[inline] pub unsafe fn PackageFamilyNameFromFullName(packagefullname: P0, packagefamilynamelength: *mut u32, packagefamilyname: Option) -> super::super::super::Foundation::WIN32_ERROR @@ -327,17 +327,17 @@ 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); - unsafe { PackageFamilyNameFromFullName(packagefullname.param().abi(), core::mem::transmute(packagefamilynamelength), core::mem::transmute(packagefamilyname.unwrap_or(core::mem::zeroed()))) } + unsafe { PackageFamilyNameFromFullName(packagefullname.param().abi(), packagefamilynamelength as _, packagefamilyname.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { PackageFamilyNameFromId(packageid, core::mem::transmute(packagefamilynamelength), core::mem::transmute(packagefamilyname.unwrap_or(core::mem::zeroed()))) } + unsafe { PackageFamilyNameFromId(packageid, packagefamilynamelength as _, packagefamilyname.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { PackageFullNameFromId(packageid, core::mem::transmute(packagefullnamelength), core::mem::transmute(packagefullname.unwrap_or(core::mem::zeroed()))) } + unsafe { PackageFullNameFromId(packageid, packagefullnamelength as _, packagefullname.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn PackageIdFromFullName(packagefullname: P0, flags: u32, bufferlength: *mut u32, buffer: Option<*mut u8>) -> super::super::super::Foundation::WIN32_ERROR @@ -345,7 +345,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn PackageIdFromFullName(packagefullname : windows_core::PCWSTR, flags : u32, bufferlength : *mut u32, buffer : *mut u8) -> super::super::super::Foundation:: WIN32_ERROR); - unsafe { PackageIdFromFullName(packagefullname.param().abi(), flags, core::mem::transmute(bufferlength), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } + unsafe { PackageIdFromFullName(packagefullname.param().abi(), flags, bufferlength as _, buffer.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn PackageNameAndPublisherIdFromFamilyName(packagefamilyname: P0, packagenamelength: *mut u32, packagename: Option, packagepublisheridlength: *mut u32, packagepublisherid: Option) -> super::super::super::Foundation::WIN32_ERROR @@ -353,7 +353,7 @@ 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); - unsafe { 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()))) } + unsafe { PackageNameAndPublisherIdFromFamilyName(packagefamilyname.param().abi(), packagenamelength as _, packagename.unwrap_or(core::mem::zeroed()) as _, packagepublisheridlength as _, packagepublisherid.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ParseApplicationUserModelId(applicationusermodelid: P0, packagefamilynamelength: *mut u32, packagefamilyname: Option, packagerelativeapplicationidlength: *mut u32, packagerelativeapplicationid: Option) -> super::super::super::Foundation::WIN32_ERROR @@ -361,7 +361,7 @@ 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); - unsafe { 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()))) } + unsafe { ParseApplicationUserModelId(applicationusermodelid.param().abi(), packagefamilynamelength as _, packagefamilyname.unwrap_or(core::mem::zeroed()) as _, packagerelativeapplicationidlength as _, packagerelativeapplicationid.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ReleasePackageVirtualizationContext(context: PACKAGE_VIRTUALIZATION_CONTEXT_HANDLE) { @@ -885,7 +885,7 @@ impl IAppxBlockMapBlock { pub unsafe fn GetHash(&self, buffersize: *mut u32) -> windows_core::Result<*mut u8> { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetHash)(windows_core::Interface::as_raw(self), core::mem::transmute(buffersize), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetHash)(windows_core::Interface::as_raw(self), buffersize as _, &mut result__).map(|| result__) } } pub unsafe fn GetCompressedSize(&self) -> windows_core::Result { diff --git a/crates/libs/windows/src/Windows/Win32/Storage/Packaging/Opc/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/Packaging/Opc/mod.rs index d49b87232c..4f72fed11f 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Packaging/Opc/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Packaging/Opc/mod.rs @@ -191,7 +191,7 @@ windows_core::imp::define_interface!(IOpcDigitalSignature, IOpcDigitalSignature_ windows_core::imp::interface_hierarchy!(IOpcDigitalSignature, windows_core::IUnknown); impl IOpcDigitalSignature { pub unsafe fn GetNamespaces(&self, prefixes: *mut *mut windows_core::PWSTR, namespaces: *mut *mut windows_core::PWSTR, count: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNamespaces)(windows_core::Interface::as_raw(self), core::mem::transmute(prefixes), core::mem::transmute(namespaces), core::mem::transmute(count)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNamespaces)(windows_core::Interface::as_raw(self), prefixes as _, namespaces as _, count as _).ok() } } pub unsafe fn GetSignatureId(&self) -> windows_core::Result { unsafe { @@ -219,7 +219,7 @@ impl IOpcDigitalSignature { } } pub unsafe fn GetSignatureValue(&self, signaturevalue: *mut *mut u8, count: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSignatureValue)(windows_core::Interface::as_raw(self), core::mem::transmute(signaturevalue), core::mem::transmute(count)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSignatureValue)(windows_core::Interface::as_raw(self), signaturevalue as _, count as _).ok() } } pub unsafe fn GetSignaturePartReferenceEnumerator(&self) -> windows_core::Result { unsafe { @@ -270,7 +270,7 @@ impl IOpcDigitalSignature { } } pub unsafe fn GetSignatureXml(&self, signaturexml: *mut *mut u8, count: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSignatureXml)(windows_core::Interface::as_raw(self), core::mem::transmute(signaturexml), core::mem::transmute(count)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSignatureXml)(windows_core::Interface::as_raw(self), signaturexml as _, count as _).ok() } } } #[repr(C)] @@ -2256,7 +2256,7 @@ windows_core::imp::define_interface!(IOpcSignatureCustomObject, IOpcSignatureCus windows_core::imp::interface_hierarchy!(IOpcSignatureCustomObject, windows_core::IUnknown); impl IOpcSignatureCustomObject { pub unsafe fn GetXml(&self, xmlmarkup: *mut *mut u8, count: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetXml)(windows_core::Interface::as_raw(self), core::mem::transmute(xmlmarkup), core::mem::transmute(count)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetXml)(windows_core::Interface::as_raw(self), xmlmarkup as _, count as _).ok() } } } #[repr(C)] @@ -2488,7 +2488,7 @@ impl IOpcSignaturePartReference { } } pub unsafe fn GetDigestValue(&self, digestvalue: *mut *mut u8, count: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDigestValue)(windows_core::Interface::as_raw(self), core::mem::transmute(digestvalue), core::mem::transmute(count)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDigestValue)(windows_core::Interface::as_raw(self), digestvalue as _, count as _).ok() } } pub unsafe fn GetTransformMethod(&self) -> windows_core::Result { unsafe { @@ -2818,7 +2818,7 @@ impl IOpcSignatureReference { } } pub unsafe fn GetDigestValue(&self, digestvalue: *mut *mut u8, count: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDigestValue)(windows_core::Interface::as_raw(self), core::mem::transmute(digestvalue), core::mem::transmute(count)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDigestValue)(windows_core::Interface::as_raw(self), digestvalue as _, count as _).ok() } } } #[repr(C)] @@ -3141,7 +3141,7 @@ impl IOpcSignatureRelationshipReference { } } pub unsafe fn GetDigestValue(&self, digestvalue: *mut *mut u8, count: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDigestValue)(windows_core::Interface::as_raw(self), core::mem::transmute(digestvalue), core::mem::transmute(count)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDigestValue)(windows_core::Interface::as_raw(self), digestvalue as _, count as _).ok() } } pub unsafe fn GetTransformMethod(&self) -> windows_core::Result { unsafe { 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 d7719696be..338c84c0bc 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/ProjectedFileSystem/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/ProjectedFileSystem/mod.rs @@ -6,12 +6,12 @@ pub unsafe fn PrjAllocateAlignedBuffer(namespacevirtualizationcontext: PRJ_NAMES #[inline] 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); - unsafe { PrjClearNegativePathCache(namespacevirtualizationcontext, core::mem::transmute(totalentrynumber.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { PrjClearNegativePathCache(namespacevirtualizationcontext, totalentrynumber.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { PrjCompleteCommand(namespacevirtualizationcontext, commandid, completionresult, core::mem::transmute(extendedparameters.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { PrjCompleteCommand(namespacevirtualizationcontext, commandid, completionresult, extendedparameters.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn PrjDeleteFile(namespacevirtualizationcontext: PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT, destinationfilename: P1, updateflags: Option, failurereason: Option<*mut PRJ_UPDATE_FAILURE_CAUSES>) -> windows_core::Result<()> @@ -19,7 +19,7 @@ where P1: windows_core::Param, { windows_targets::link!("projectedfslib.dll" "system" fn PrjDeleteFile(namespacevirtualizationcontext : PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT, destinationfilename : windows_core::PCWSTR, updateflags : PRJ_UPDATE_TYPES, failurereason : *mut PRJ_UPDATE_FAILURE_CAUSES) -> windows_core::HRESULT); - unsafe { PrjDeleteFile(namespacevirtualizationcontext, destinationfilename.param().abi(), core::mem::transmute(updateflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(failurereason.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { PrjDeleteFile(namespacevirtualizationcontext, destinationfilename.param().abi(), updateflags.unwrap_or(core::mem::zeroed()) as _, failurereason.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn PrjDoesNameContainWildCards(filename: P0) -> bool @@ -53,7 +53,7 @@ where P0: 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); - unsafe { PrjFillDirEntryBuffer(filename.param().abi(), core::mem::transmute(filebasicinfo.unwrap_or(core::mem::zeroed())), direntrybufferhandle).ok() } + unsafe { PrjFillDirEntryBuffer(filename.param().abi(), filebasicinfo.unwrap_or(core::mem::zeroed()) as _, direntrybufferhandle).ok() } } #[inline] 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<()> @@ -61,7 +61,7 @@ where P1: windows_core::Param, { windows_targets::link!("projectedfslib.dll" "system" fn PrjFillDirEntryBuffer2(direntrybufferhandle : PRJ_DIR_ENTRY_BUFFER_HANDLE, filename : windows_core::PCWSTR, filebasicinfo : *const PRJ_FILE_BASIC_INFO, extendedinfo : *const PRJ_EXTENDED_INFO) -> windows_core::HRESULT); - unsafe { PrjFillDirEntryBuffer2(direntrybufferhandle, filename.param().abi(), core::mem::transmute(filebasicinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(extendedinfo.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { PrjFillDirEntryBuffer2(direntrybufferhandle, filename.param().abi(), filebasicinfo.unwrap_or(core::mem::zeroed()) as _, extendedinfo.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn PrjFreeAlignedBuffer(buffer: *const core::ffi::c_void) { @@ -82,7 +82,7 @@ where #[inline] 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); - unsafe { PrjGetVirtualizationInstanceInfo(namespacevirtualizationcontext, core::mem::transmute(virtualizationinstanceinfo)).ok() } + unsafe { PrjGetVirtualizationInstanceInfo(namespacevirtualizationcontext, virtualizationinstanceinfo as _).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<()> @@ -91,7 +91,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); - unsafe { PrjMarkDirectoryAsPlaceholder(rootpathname.param().abi(), targetpathname.param().abi(), core::mem::transmute(versioninfo.unwrap_or(core::mem::zeroed())), virtualizationinstanceid).ok() } + unsafe { PrjMarkDirectoryAsPlaceholder(rootpathname.param().abi(), targetpathname.param().abi(), versioninfo.unwrap_or(core::mem::zeroed()) as _, 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 @@ -101,7 +101,7 @@ where windows_targets::link!("projectedfslib.dll" "system" fn PrjStartVirtualizing(virtualizationrootpath : windows_core::PCWSTR, callbacks : *const PRJ_CALLBACKS, instancecontext : *const core::ffi::c_void, options : *const PRJ_STARTVIRTUALIZING_OPTIONS, namespacevirtualizationcontext : *mut PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT) -> windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - PrjStartVirtualizing(virtualizationrootpath.param().abi(), 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__)) + PrjStartVirtualizing(virtualizationrootpath.param().abi(), callbacks, instancecontext.unwrap_or(core::mem::zeroed()) as _, options.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -115,7 +115,7 @@ where P1: windows_core::Param, { windows_targets::link!("projectedfslib.dll" "system" fn PrjUpdateFileIfNeeded(namespacevirtualizationcontext : PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT, destinationfilename : windows_core::PCWSTR, placeholderinfo : *const PRJ_PLACEHOLDER_INFO, placeholderinfosize : u32, updateflags : PRJ_UPDATE_TYPES, failurereason : *mut PRJ_UPDATE_FAILURE_CAUSES) -> windows_core::HRESULT); - unsafe { PrjUpdateFileIfNeeded(namespacevirtualizationcontext, destinationfilename.param().abi(), placeholderinfo, placeholderinfosize, core::mem::transmute(updateflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(failurereason.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { PrjUpdateFileIfNeeded(namespacevirtualizationcontext, destinationfilename.param().abi(), placeholderinfo, placeholderinfosize, updateflags.unwrap_or(core::mem::zeroed()) as _, failurereason.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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<()> { @@ -136,7 +136,7 @@ where P1: windows_core::Param, { windows_targets::link!("projectedfslib.dll" "system" fn PrjWritePlaceholderInfo2(namespacevirtualizationcontext : PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT, destinationfilename : windows_core::PCWSTR, placeholderinfo : *const PRJ_PLACEHOLDER_INFO, placeholderinfosize : u32, extendedinfo : *const PRJ_EXTENDED_INFO) -> windows_core::HRESULT); - unsafe { PrjWritePlaceholderInfo2(namespacevirtualizationcontext, destinationfilename.param().abi(), placeholderinfo, placeholderinfosize, core::mem::transmute(extendedinfo.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { PrjWritePlaceholderInfo2(namespacevirtualizationcontext, destinationfilename.param().abi(), placeholderinfo, placeholderinfosize, extendedinfo.unwrap_or(core::mem::zeroed()) as _).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 a3aa4799bb..eb6a18f611 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Vhd/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Vhd/mod.rs @@ -15,7 +15,7 @@ pub unsafe fn ApplySnapshotVhdSet(virtualdiskhandle: super::super::Foundation::H #[inline] 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); - unsafe { AttachVirtualDisk(virtualdiskhandle, core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), flags, providerspecificflags, core::mem::transmute(parameters.unwrap_or(core::mem::zeroed())), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } + unsafe { AttachVirtualDisk(virtualdiskhandle, securitydescriptor.unwrap_or(core::mem::zeroed()) as _, flags, providerspecificflags, parameters.unwrap_or(core::mem::zeroed()) as _, overlapped.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn BreakMirrorVirtualDisk(virtualdiskhandle: super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR { @@ -26,7 +26,7 @@ pub unsafe fn BreakMirrorVirtualDisk(virtualdiskhandle: super::super::Foundation #[inline] 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); - unsafe { CompactVirtualDisk(virtualdiskhandle, flags, core::mem::transmute(parameters.unwrap_or(core::mem::zeroed())), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } + unsafe { CompactVirtualDisk(virtualdiskhandle, flags, parameters.unwrap_or(core::mem::zeroed()) as _, overlapped.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CompleteForkVirtualDisk(virtualdiskhandle: super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR { @@ -40,7 +40,7 @@ where P1: windows_core::Param, { windows_targets::link!("virtdisk.dll" "system" fn CreateVirtualDisk(virtualstoragetype : *const VIRTUAL_STORAGE_TYPE, path : windows_core::PCWSTR, virtualdiskaccessmask : VIRTUAL_DISK_ACCESS_MASK, securitydescriptor : super::super::Security:: PSECURITY_DESCRIPTOR, flags : CREATE_VIRTUAL_DISK_FLAG, providerspecificflags : u32, parameters : *const CREATE_VIRTUAL_DISK_PARAMETERS, overlapped : *const super::super::System::IO:: OVERLAPPED, handle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: WIN32_ERROR); - unsafe { CreateVirtualDisk(virtualstoragetype, path.param().abi(), virtualdiskaccessmask, core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), flags, providerspecificflags, parameters, core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed())), core::mem::transmute(handle)) } + unsafe { CreateVirtualDisk(virtualstoragetype, path.param().abi(), virtualdiskaccessmask, securitydescriptor.unwrap_or(core::mem::zeroed()) as _, flags, providerspecificflags, parameters, overlapped.unwrap_or(core::mem::zeroed()) as _, handle as _) } } #[inline] 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 { @@ -60,56 +60,56 @@ pub unsafe fn DetachVirtualDisk(virtualdiskhandle: super::super::Foundation::HAN #[inline] 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); - unsafe { EnumerateVirtualDiskMetadata(virtualdiskhandle, core::mem::transmute(numberofitems), core::mem::transmute(items)) } + unsafe { EnumerateVirtualDiskMetadata(virtualdiskhandle, numberofitems as _, items as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { ExpandVirtualDisk(virtualdiskhandle, flags, parameters, core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } + unsafe { ExpandVirtualDisk(virtualdiskhandle, flags, parameters, overlapped.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { ForkVirtualDisk(virtualdiskhandle, flags, parameters, core::mem::transmute(overlapped)) } + unsafe { ForkVirtualDisk(virtualdiskhandle, flags, parameters, overlapped as _) } } #[inline] pub unsafe fn GetAllAttachedVirtualDiskPhysicalPaths(pathsbuffersizeinbytes: *mut u32, pathsbuffer: windows_core::PWSTR) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("virtdisk.dll" "system" fn GetAllAttachedVirtualDiskPhysicalPaths(pathsbuffersizeinbytes : *mut u32, pathsbuffer : windows_core::PWSTR) -> super::super::Foundation:: WIN32_ERROR); - unsafe { GetAllAttachedVirtualDiskPhysicalPaths(core::mem::transmute(pathsbuffersizeinbytes), core::mem::transmute(pathsbuffer)) } + unsafe { GetAllAttachedVirtualDiskPhysicalPaths(pathsbuffersizeinbytes as _, core::mem::transmute(pathsbuffer)) } } #[inline] 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); - unsafe { GetStorageDependencyInformation(objecthandle, flags, storagedependencyinfosize, core::mem::transmute(storagedependencyinfo), core::mem::transmute(sizeused.unwrap_or(core::mem::zeroed()))) } + unsafe { GetStorageDependencyInformation(objecthandle, flags, storagedependencyinfosize, storagedependencyinfo as _, sizeused.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { GetVirtualDiskInformation(virtualdiskhandle, core::mem::transmute(virtualdiskinfosize), core::mem::transmute(virtualdiskinfo), core::mem::transmute(sizeused.unwrap_or(core::mem::zeroed()))) } + unsafe { GetVirtualDiskInformation(virtualdiskhandle, virtualdiskinfosize as _, virtualdiskinfo as _, sizeused.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { GetVirtualDiskMetadata(virtualdiskhandle, item, core::mem::transmute(metadatasize), core::mem::transmute(metadata)) } + unsafe { GetVirtualDiskMetadata(virtualdiskhandle, item, metadatasize as _, metadata as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { GetVirtualDiskOperationProgress(virtualdiskhandle, overlapped, core::mem::transmute(progress)) } + unsafe { GetVirtualDiskOperationProgress(virtualdiskhandle, overlapped, progress as _) } } #[inline] 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); - unsafe { GetVirtualDiskPhysicalPath(virtualdiskhandle, core::mem::transmute(diskpathsizeinbytes), core::mem::transmute(diskpath)) } + unsafe { GetVirtualDiskPhysicalPath(virtualdiskhandle, diskpathsizeinbytes as _, core::mem::transmute(diskpath)) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { MergeVirtualDisk(virtualdiskhandle, flags, parameters, core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } + unsafe { MergeVirtualDisk(virtualdiskhandle, flags, parameters, overlapped.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -128,7 +128,7 @@ 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); - unsafe { OpenVirtualDisk(virtualstoragetype, path.param().abi(), virtualdiskaccessmask, flags, core::mem::transmute(parameters.unwrap_or(core::mem::zeroed())), core::mem::transmute(handle)) } + unsafe { OpenVirtualDisk(virtualstoragetype, path.param().abi(), virtualdiskaccessmask, flags, parameters.unwrap_or(core::mem::zeroed()) as _, handle as _) } } #[inline] 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 @@ -136,18 +136,18 @@ where 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); - unsafe { QueryChangesVirtualDisk(virtualdiskhandle, changetrackingid.param().abi(), byteoffset, bytelength, flags, core::mem::transmute(ranges), core::mem::transmute(rangecount), core::mem::transmute(processedlength)) } + unsafe { QueryChangesVirtualDisk(virtualdiskhandle, changetrackingid.param().abi(), byteoffset, bytelength, flags, ranges as _, rangecount as _, processedlength as _) } } #[inline] 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); - unsafe { RawSCSIVirtualDisk(virtualdiskhandle, parameters, flags, core::mem::transmute(response)) } + unsafe { RawSCSIVirtualDisk(virtualdiskhandle, parameters, flags, response as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { ResizeVirtualDisk(virtualdiskhandle, flags, parameters, core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } + unsafe { ResizeVirtualDisk(virtualdiskhandle, flags, parameters, overlapped.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SetVirtualDiskInformation(virtualdiskhandle: super::super::Foundation::HANDLE, virtualdiskinfo: *const SET_VIRTUAL_DISK_INFO) -> super::super::Foundation::WIN32_ERROR { diff --git a/crates/libs/windows/src/Windows/Win32/Storage/VirtualDiskService/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/VirtualDiskService/mod.rs index dd3509b648..1a44004281 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/VirtualDiskService/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/VirtualDiskService/mod.rs @@ -137,7 +137,7 @@ windows_core::imp::define_interface!(IEnumVdsObject, IEnumVdsObject_Vtbl, 0x1186 windows_core::imp::interface_hierarchy!(IEnumVdsObject, windows_core::IUnknown); impl IEnumVdsObject { pub unsafe fn Next(&self, ppobjectarray: &mut [Option], pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppobjectarray.len().try_into().unwrap(), core::mem::transmute(ppobjectarray.as_ptr()), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppobjectarray.len().try_into().unwrap(), core::mem::transmute(ppobjectarray.as_ptr()), pcfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -265,10 +265,10 @@ windows_core::imp::define_interface!(IVdsAdvancedDisk, IVdsAdvancedDisk_Vtbl, 0x windows_core::imp::interface_hierarchy!(IVdsAdvancedDisk, windows_core::IUnknown); impl IVdsAdvancedDisk { pub unsafe fn GetPartitionProperties(&self, ulloffset: u64, ppartitionprop: *mut VDS_PARTITION_PROP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPartitionProperties)(windows_core::Interface::as_raw(self), ulloffset, core::mem::transmute(ppartitionprop)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPartitionProperties)(windows_core::Interface::as_raw(self), ulloffset, ppartitionprop as _).ok() } } pub unsafe fn QueryPartitions(&self, pppartitionproparray: *mut *mut VDS_PARTITION_PROP, plnumberofpartitions: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryPartitions)(windows_core::Interface::as_raw(self), core::mem::transmute(pppartitionproparray), core::mem::transmute(plnumberofpartitions)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryPartitions)(windows_core::Interface::as_raw(self), pppartitionproparray as _, plnumberofpartitions as _).ok() } } pub unsafe fn CreatePartition(&self, ulloffset: u64, ullsize: u64, para: *const CREATE_PARTITION_PARAMETERS) -> windows_core::Result { unsafe { @@ -466,7 +466,7 @@ windows_core::imp::define_interface!(IVdsAdvancedDisk3, IVdsAdvancedDisk3_Vtbl, windows_core::imp::interface_hierarchy!(IVdsAdvancedDisk3, windows_core::IUnknown); impl IVdsAdvancedDisk3 { pub unsafe fn GetProperties(&self, padvdiskprop: *mut VDS_ADVANCEDDISK_PROP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(padvdiskprop)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), padvdiskprop as _).ok() } } pub unsafe fn GetUniqueId(&self) -> windows_core::Result { unsafe { @@ -553,10 +553,10 @@ impl IVdsAsync { unsafe { (windows_core::Interface::vtable(self).Cancel)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn Wait(&self, phrresult: *mut windows_core::HRESULT, pasyncout: *mut VDS_ASYNC_OUTPUT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Wait)(windows_core::Interface::as_raw(self), core::mem::transmute(phrresult), core::mem::transmute(pasyncout)).ok() } + unsafe { (windows_core::Interface::vtable(self).Wait)(windows_core::Interface::as_raw(self), phrresult as _, core::mem::transmute(pasyncout)).ok() } } pub unsafe fn QueryStatus(&self, phrresult: *mut windows_core::HRESULT, pulpercentcompleted: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(phrresult), core::mem::transmute(pulpercentcompleted)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryStatus)(windows_core::Interface::as_raw(self), phrresult as _, pulpercentcompleted as _).ok() } } } #[repr(C)] @@ -607,7 +607,7 @@ windows_core::imp::define_interface!(IVdsController, IVdsController_Vtbl, 0xcb53 windows_core::imp::interface_hierarchy!(IVdsController, windows_core::IUnknown); impl IVdsController { pub unsafe fn GetProperties(&self, pcontrollerprop: *mut VDS_CONTROLLER_PROP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(pcontrollerprop)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), pcontrollerprop as _).ok() } } pub unsafe fn GetSubSystem(&self) -> windows_core::Result { unsafe { @@ -616,7 +616,7 @@ impl IVdsController { } } pub unsafe fn GetPortProperties(&self, sportnumber: i16, pportprop: *mut VDS_PORT_PROP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPortProperties)(windows_core::Interface::as_raw(self), sportnumber, core::mem::transmute(pportprop)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPortProperties)(windows_core::Interface::as_raw(self), sportnumber, pportprop as _).ok() } } pub unsafe fn FlushCache(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).FlushCache)(windows_core::Interface::as_raw(self)).ok() } @@ -781,7 +781,7 @@ windows_core::imp::define_interface!(IVdsControllerPort, IVdsControllerPort_Vtbl windows_core::imp::interface_hierarchy!(IVdsControllerPort, windows_core::IUnknown); impl IVdsControllerPort { pub unsafe fn GetProperties(&self, pportprop: *mut VDS_PORT_PROP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(pportprop)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), pportprop as _).ok() } } pub unsafe fn GetController(&self) -> windows_core::Result { unsafe { @@ -919,7 +919,7 @@ windows_core::imp::define_interface!(IVdsDisk, IVdsDisk_Vtbl, 0x07e5c822_f00c_47 windows_core::imp::interface_hierarchy!(IVdsDisk, windows_core::IUnknown); impl IVdsDisk { pub unsafe fn GetProperties(&self, pdiskproperties: *mut VDS_DISK_PROP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(pdiskproperties)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), pdiskproperties as _).ok() } } pub unsafe fn GetPack(&self) -> windows_core::Result { unsafe { @@ -928,10 +928,10 @@ impl IVdsDisk { } } pub unsafe fn GetIdentificationData(&self, pluninfo: *mut VDS_LUN_INFORMATION) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIdentificationData)(windows_core::Interface::as_raw(self), core::mem::transmute(pluninfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIdentificationData)(windows_core::Interface::as_raw(self), pluninfo as _).ok() } } pub unsafe fn QueryExtents(&self, ppextentarray: *mut *mut VDS_DISK_EXTENT, plnumberofextents: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryExtents)(windows_core::Interface::as_raw(self), core::mem::transmute(ppextentarray), core::mem::transmute(plnumberofextents)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryExtents)(windows_core::Interface::as_raw(self), ppextentarray as _, plnumberofextents as _).ok() } } pub unsafe fn ConvertStyle(&self, newstyle: VDS_PARTITION_STYLE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ConvertStyle)(windows_core::Interface::as_raw(self), newstyle).ok() } @@ -1063,10 +1063,10 @@ windows_core::imp::define_interface!(IVdsDisk3, IVdsDisk3_Vtbl, 0x8f4b2f5d_ec15_ windows_core::imp::interface_hierarchy!(IVdsDisk3, windows_core::IUnknown); impl IVdsDisk3 { pub unsafe fn GetProperties2(&self, pdiskproperties: *mut VDS_DISK_PROP2) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperties2)(windows_core::Interface::as_raw(self), core::mem::transmute(pdiskproperties)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperties2)(windows_core::Interface::as_raw(self), pdiskproperties as _).ok() } } pub unsafe fn QueryFreeExtents(&self, ulalign: u32, ppfreeextentarray: *mut *mut VDS_DISK_FREE_EXTENT, plnumberoffreeextents: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryFreeExtents)(windows_core::Interface::as_raw(self), ulalign, core::mem::transmute(ppfreeextentarray), core::mem::transmute(plnumberoffreeextents)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryFreeExtents)(windows_core::Interface::as_raw(self), ulalign, ppfreeextentarray as _, plnumberoffreeextents as _).ok() } } } #[repr(C)] @@ -1149,7 +1149,7 @@ windows_core::imp::define_interface!(IVdsDiskPartitionMF, IVdsDiskPartitionMF_Vt windows_core::imp::interface_hierarchy!(IVdsDiskPartitionMF, windows_core::IUnknown); impl IVdsDiskPartitionMF { pub unsafe fn GetPartitionFileSystemProperties(&self, ulloffset: u64, pfilesystemprop: *mut VDS_FILE_SYSTEM_PROP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPartitionFileSystemProperties)(windows_core::Interface::as_raw(self), ulloffset, core::mem::transmute(pfilesystemprop)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPartitionFileSystemProperties)(windows_core::Interface::as_raw(self), ulloffset, pfilesystemprop as _).ok() } } pub unsafe fn GetPartitionFileSystemTypeName(&self, ulloffset: u64) -> windows_core::Result { unsafe { @@ -1158,7 +1158,7 @@ impl IVdsDiskPartitionMF { } } pub unsafe fn QueryPartitionFileSystemFormatSupport(&self, ulloffset: u64, ppfilesystemsupportprops: *mut *mut VDS_FILE_SYSTEM_FORMAT_SUPPORT_PROP, plnumberoffilesystems: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryPartitionFileSystemFormatSupport)(windows_core::Interface::as_raw(self), ulloffset, core::mem::transmute(ppfilesystemsupportprops), core::mem::transmute(plnumberoffilesystems)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryPartitionFileSystemFormatSupport)(windows_core::Interface::as_raw(self), ulloffset, ppfilesystemsupportprops as _, plnumberoffilesystems as _).ok() } } pub unsafe fn FormatPartitionEx(&self, ulloffset: u64, pwszfilesystemtypename: P1, usfilesystemrevision: u16, uldesiredunitallocationsize: u32, pwszlabel: P4, bforce: bool, bquickformat: bool, benablecompression: bool) -> windows_core::Result where @@ -1283,7 +1283,7 @@ windows_core::imp::define_interface!(IVdsDrive, IVdsDrive_Vtbl, 0xff24efa4_aade_ windows_core::imp::interface_hierarchy!(IVdsDrive, windows_core::IUnknown); impl IVdsDrive { pub unsafe fn GetProperties(&self, pdriveprop: *mut VDS_DRIVE_PROP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(pdriveprop)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), pdriveprop as _).ok() } } pub unsafe fn GetSubSystem(&self) -> windows_core::Result { unsafe { @@ -1292,7 +1292,7 @@ impl IVdsDrive { } } pub unsafe fn QueryExtents(&self, ppextentarray: *mut *mut VDS_DRIVE_EXTENT, plnumberofextents: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryExtents)(windows_core::Interface::as_raw(self), core::mem::transmute(ppextentarray), core::mem::transmute(plnumberofextents)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryExtents)(windows_core::Interface::as_raw(self), ppextentarray as _, plnumberofextents as _).ok() } } pub unsafe fn SetFlags(&self, ulflags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetFlags)(windows_core::Interface::as_raw(self), ulflags).ok() } @@ -1385,7 +1385,7 @@ windows_core::imp::define_interface!(IVdsDrive2, IVdsDrive2_Vtbl, 0x60b5a730_add windows_core::imp::interface_hierarchy!(IVdsDrive2, windows_core::IUnknown); impl IVdsDrive2 { pub unsafe fn GetProperties2(&self, pdriveprop2: *mut VDS_DRIVE_PROP2) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperties2)(windows_core::Interface::as_raw(self), core::mem::transmute(pdriveprop2)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperties2)(windows_core::Interface::as_raw(self), pdriveprop2 as _).ok() } } } #[repr(C)] @@ -1415,7 +1415,7 @@ windows_core::imp::define_interface!(IVdsHbaPort, IVdsHbaPort_Vtbl, 0x2abd757f_2 windows_core::imp::interface_hierarchy!(IVdsHbaPort, windows_core::IUnknown); impl IVdsHbaPort { pub unsafe fn GetProperties(&self, phbaportprop: *mut VDS_HBAPORT_PROP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(phbaportprop)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), phbaportprop as _).ok() } } pub unsafe fn SetAllPathStatuses(&self, status: VDS_PATH_STATUS) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetAllPathStatuses)(windows_core::Interface::as_raw(self), status).ok() } @@ -1763,7 +1763,7 @@ windows_core::imp::define_interface!(IVdsIscsiInitiatorAdapter, IVdsIscsiInitiat windows_core::imp::interface_hierarchy!(IVdsIscsiInitiatorAdapter, windows_core::IUnknown); impl IVdsIscsiInitiatorAdapter { pub unsafe fn GetProperties(&self, pinitiatoradapterprop: *mut VDS_ISCSI_INITIATOR_ADAPTER_PROP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(pinitiatoradapterprop)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), pinitiatoradapterprop as _).ok() } } pub unsafe fn QueryInitiatorPortals(&self) -> windows_core::Result { unsafe { @@ -1859,7 +1859,7 @@ windows_core::imp::define_interface!(IVdsIscsiInitiatorPortal, IVdsIscsiInitiato windows_core::imp::interface_hierarchy!(IVdsIscsiInitiatorPortal, windows_core::IUnknown); impl IVdsIscsiInitiatorPortal { pub unsafe fn GetProperties(&self, pinitiatorportalprop: *mut VDS_ISCSI_INITIATOR_PORTAL_PROP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(pinitiatorportalprop)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), pinitiatorportalprop as _).ok() } } pub unsafe fn GetInitiatorAdapter(&self) -> windows_core::Result { unsafe { @@ -1958,7 +1958,7 @@ windows_core::imp::define_interface!(IVdsIscsiPortal, IVdsIscsiPortal_Vtbl, 0x7f windows_core::imp::interface_hierarchy!(IVdsIscsiPortal, windows_core::IUnknown); impl IVdsIscsiPortal { pub unsafe fn GetProperties(&self, pportalprop: *mut VDS_ISCSI_PORTAL_PROP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(pportalprop)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), pportalprop as _).ok() } } pub unsafe fn GetSubSystem(&self) -> windows_core::Result { unsafe { @@ -2090,7 +2090,7 @@ windows_core::imp::define_interface!(IVdsIscsiPortalGroup, IVdsIscsiPortalGroup_ windows_core::imp::interface_hierarchy!(IVdsIscsiPortalGroup, windows_core::IUnknown); impl IVdsIscsiPortalGroup { pub unsafe fn GetProperties(&self, pportalgroupprop: *mut VDS_ISCSI_PORTALGROUP_PROP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(pportalgroupprop)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), pportalgroupprop as _).ok() } } pub unsafe fn GetTarget(&self) -> windows_core::Result { unsafe { @@ -2258,7 +2258,7 @@ windows_core::imp::define_interface!(IVdsIscsiTarget, IVdsIscsiTarget_Vtbl, 0xaa windows_core::imp::interface_hierarchy!(IVdsIscsiTarget, windows_core::IUnknown); impl IVdsIscsiTarget { pub unsafe fn GetProperties(&self, ptargetprop: *mut VDS_ISCSI_TARGET_PROP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(ptargetprop)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), ptargetprop as _).ok() } } pub unsafe fn GetSubSystem(&self) -> windows_core::Result { unsafe { @@ -2309,7 +2309,7 @@ impl IVdsIscsiTarget { unsafe { (windows_core::Interface::vtable(self).RememberInitiatorSharedSecret)(windows_core::Interface::as_raw(self), pwszinitiatorname.param().abi(), pinitiatorsharedsecret).ok() } } pub unsafe fn GetConnectedInitiators(&self, pppwszinitiatorlist: *mut *mut windows_core::PWSTR, plnumberofinitiators: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetConnectedInitiators)(windows_core::Interface::as_raw(self), core::mem::transmute(pppwszinitiatorlist), core::mem::transmute(plnumberofinitiators)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConnectedInitiators)(windows_core::Interface::as_raw(self), pppwszinitiatorlist as _, plnumberofinitiators as _).ok() } } } #[repr(C)] @@ -2453,7 +2453,7 @@ windows_core::imp::define_interface!(IVdsLun, IVdsLun_Vtbl, 0x3540a9c7_e60f_4111 windows_core::imp::interface_hierarchy!(IVdsLun, windows_core::IUnknown); impl IVdsLun { pub unsafe fn GetProperties(&self, plunprop: *mut VDS_LUN_PROP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(plunprop)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), plunprop as _).ok() } } pub unsafe fn GetSubSystem(&self) -> windows_core::Result { unsafe { @@ -2462,7 +2462,7 @@ impl IVdsLun { } } pub unsafe fn GetIdentificationData(&self, pluninfo: *mut VDS_LUN_INFORMATION) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIdentificationData)(windows_core::Interface::as_raw(self), core::mem::transmute(pluninfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIdentificationData)(windows_core::Interface::as_raw(self), pluninfo as _).ok() } } pub unsafe fn QueryActiveControllers(&self) -> windows_core::Result { unsafe { @@ -2519,7 +2519,7 @@ impl IVdsLun { unsafe { (windows_core::Interface::vtable(self).AssociateControllers)(windows_core::Interface::as_raw(self), core::mem::transmute(pactivecontrolleridarray.as_ptr()), pactivecontrolleridarray.len().try_into().unwrap(), core::mem::transmute(pinactivecontrolleridarray.as_ptr()), pinactivecontrolleridarray.len().try_into().unwrap()).ok() } } pub unsafe fn QueryHints(&self, phints: *mut VDS_HINTS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryHints)(windows_core::Interface::as_raw(self), core::mem::transmute(phints)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryHints)(windows_core::Interface::as_raw(self), phints as _).ok() } } pub unsafe fn ApplyHints(&self, phints: *const VDS_HINTS) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ApplyHints)(windows_core::Interface::as_raw(self), phints).ok() } @@ -2762,7 +2762,7 @@ windows_core::imp::define_interface!(IVdsLun2, IVdsLun2_Vtbl, 0xe5b3a735_9efb_49 windows_core::imp::interface_hierarchy!(IVdsLun2, windows_core::IUnknown); impl IVdsLun2 { pub unsafe fn QueryHints2(&self, phints2: *mut VDS_HINTS2) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryHints2)(windows_core::Interface::as_raw(self), core::mem::transmute(phints2)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryHints2)(windows_core::Interface::as_raw(self), phints2 as _).ok() } } pub unsafe fn ApplyHints2(&self, phints2: *const VDS_HINTS2) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ApplyHints2)(windows_core::Interface::as_raw(self), phints2).ok() } @@ -2915,10 +2915,10 @@ windows_core::imp::define_interface!(IVdsLunMpio, IVdsLunMpio_Vtbl, 0x7c5fbae3_3 windows_core::imp::interface_hierarchy!(IVdsLunMpio, windows_core::IUnknown); impl IVdsLunMpio { pub unsafe fn GetPathInfo(&self, pppaths: *mut *mut VDS_PATH_INFO, plnumberofpaths: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPathInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pppaths), core::mem::transmute(plnumberofpaths)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPathInfo)(windows_core::Interface::as_raw(self), pppaths as _, plnumberofpaths as _).ok() } } pub unsafe fn GetLoadBalancePolicy(&self, ppolicy: *mut VDS_LOADBALANCE_POLICY_ENUM, pppaths: *mut *mut VDS_PATH_POLICY, plnumberofpaths: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLoadBalancePolicy)(windows_core::Interface::as_raw(self), core::mem::transmute(ppolicy), core::mem::transmute(pppaths), core::mem::transmute(plnumberofpaths)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLoadBalancePolicy)(windows_core::Interface::as_raw(self), ppolicy as _, pppaths as _, plnumberofpaths as _).ok() } } pub unsafe fn SetLoadBalancePolicy(&self, policy: VDS_LOADBALANCE_POLICY_ENUM, ppaths: &[VDS_PATH_POLICY]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetLoadBalancePolicy)(windows_core::Interface::as_raw(self), policy, core::mem::transmute(ppaths.as_ptr()), ppaths.len().try_into().unwrap()).ok() } @@ -3065,7 +3065,7 @@ windows_core::imp::define_interface!(IVdsLunPlex, IVdsLunPlex_Vtbl, 0x0ee1a790_5 windows_core::imp::interface_hierarchy!(IVdsLunPlex, windows_core::IUnknown); impl IVdsLunPlex { pub unsafe fn GetProperties(&self, pplexprop: *mut VDS_LUN_PLEX_PROP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(pplexprop)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), pplexprop as _).ok() } } pub unsafe fn GetLun(&self) -> windows_core::Result { unsafe { @@ -3074,10 +3074,10 @@ impl IVdsLunPlex { } } pub unsafe fn QueryExtents(&self, ppextentarray: *mut *mut VDS_DRIVE_EXTENT, plnumberofextents: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryExtents)(windows_core::Interface::as_raw(self), core::mem::transmute(ppextentarray), core::mem::transmute(plnumberofextents)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryExtents)(windows_core::Interface::as_raw(self), ppextentarray as _, plnumberofextents as _).ok() } } pub unsafe fn QueryHints(&self, phints: *mut VDS_HINTS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryHints)(windows_core::Interface::as_raw(self), core::mem::transmute(phints)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryHints)(windows_core::Interface::as_raw(self), phints as _).ok() } } pub unsafe fn ApplyHints(&self, phints: *const VDS_HINTS) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ApplyHints)(windows_core::Interface::as_raw(self), phints).ok() } @@ -3371,7 +3371,7 @@ windows_core::imp::define_interface!(IVdsPack, IVdsPack_Vtbl, 0x3b69d7f5_9d94_46 windows_core::imp::interface_hierarchy!(IVdsPack, windows_core::IUnknown); impl IVdsPack { pub unsafe fn GetProperties(&self, ppackprop: *mut VDS_PACK_PROP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(ppackprop)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), ppackprop as _).ok() } } pub unsafe fn GetProvider(&self) -> windows_core::Result { unsafe { @@ -3401,7 +3401,7 @@ impl IVdsPack { unsafe { (windows_core::Interface::vtable(self).AddDisk)(windows_core::Interface::as_raw(self), core::mem::transmute(diskid), partitionstyle, bashotspare.into()).ok() } } pub unsafe fn MigrateDisks(&self, pdiskarray: *const windows_core::GUID, lnumberofdisks: i32, targetpack: windows_core::GUID, bforce: bool, bqueryonly: bool, presults: *mut windows_core::HRESULT, pbrebootneeded: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).MigrateDisks)(windows_core::Interface::as_raw(self), pdiskarray, lnumberofdisks, core::mem::transmute(targetpack), bforce.into(), bqueryonly.into(), core::mem::transmute(presults), core::mem::transmute(pbrebootneeded)).ok() } + unsafe { (windows_core::Interface::vtable(self).MigrateDisks)(windows_core::Interface::as_raw(self), pdiskarray, lnumberofdisks, core::mem::transmute(targetpack), bforce.into(), bqueryonly.into(), presults as _, pbrebootneeded as _).ok() } } pub unsafe fn ReplaceDisk(&self, olddiskid: windows_core::GUID, newdiskid: windows_core::GUID) -> windows_core::Result { unsafe { @@ -3605,7 +3605,7 @@ windows_core::imp::define_interface!(IVdsProvider, IVdsProvider_Vtbl, 0x10c5e575 windows_core::imp::interface_hierarchy!(IVdsProvider, windows_core::IUnknown); impl IVdsProvider { pub unsafe fn GetProperties(&self, pproviderprop: *mut VDS_PROVIDER_PROP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(pproviderprop)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), pproviderprop as _).ok() } } } #[repr(C)] @@ -3824,7 +3824,7 @@ impl IVdsService { unsafe { (windows_core::Interface::vtable(self).QueryDriveLetters)(windows_core::Interface::as_raw(self), wcfirstletter, pdriveletterproparray.len().try_into().unwrap(), core::mem::transmute(pdriveletterproparray.as_ptr())).ok() } } pub unsafe fn QueryFileSystemTypes(&self, ppfilesystemtypeprops: *mut *mut VDS_FILE_SYSTEM_TYPE_PROP, plnumberoffilesystems: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryFileSystemTypes)(windows_core::Interface::as_raw(self), core::mem::transmute(ppfilesystemtypeprops), core::mem::transmute(plnumberoffilesystems)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryFileSystemTypes)(windows_core::Interface::as_raw(self), ppfilesystemtypeprops as _, plnumberoffilesystems as _).ok() } } pub unsafe fn Reenumerate(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reenumerate)(windows_core::Interface::as_raw(self)).ok() } @@ -4406,7 +4406,7 @@ impl IVdsServiceUninstallDisk { } } pub unsafe fn UninstallDisks(&self, pdiskidarray: *const windows_core::GUID, ulcount: u32, bforce: bool, pbreboot: *mut u8, presults: *mut windows_core::HRESULT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).UninstallDisks)(windows_core::Interface::as_raw(self), pdiskidarray, ulcount, bforce, core::mem::transmute(pbreboot), core::mem::transmute(presults)).ok() } + unsafe { (windows_core::Interface::vtable(self).UninstallDisks)(windows_core::Interface::as_raw(self), pdiskidarray, ulcount, bforce, pbreboot as _, presults as _).ok() } } } #[repr(C)] @@ -4460,13 +4460,13 @@ impl IVdsStoragePool { } } pub unsafe fn GetProperties(&self, pstoragepoolprop: *mut VDS_STORAGE_POOL_PROP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(pstoragepoolprop)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), pstoragepoolprop as _).ok() } } pub unsafe fn GetAttributes(&self, pstoragepoolattributes: *mut VDS_POOL_ATTRIBUTES) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAttributes)(windows_core::Interface::as_raw(self), core::mem::transmute(pstoragepoolattributes)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAttributes)(windows_core::Interface::as_raw(self), pstoragepoolattributes as _).ok() } } pub unsafe fn QueryDriveExtents(&self, ppextentarray: *mut *mut VDS_STORAGE_POOL_DRIVE_EXTENT, plnumberofextents: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryDriveExtents)(windows_core::Interface::as_raw(self), core::mem::transmute(ppextentarray), core::mem::transmute(plnumberofextents)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryDriveExtents)(windows_core::Interface::as_raw(self), ppextentarray as _, plnumberofextents as _).ok() } } pub unsafe fn QueryAllocatedLuns(&self) -> windows_core::Result { unsafe { @@ -4574,7 +4574,7 @@ windows_core::imp::define_interface!(IVdsSubSystem, IVdsSubSystem_Vtbl, 0x6fcee2 windows_core::imp::interface_hierarchy!(IVdsSubSystem, windows_core::IUnknown); impl IVdsSubSystem { pub unsafe fn GetProperties(&self, psubsystemprop: *mut VDS_SUB_SYSTEM_PROP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(psubsystemprop)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), psubsystemprop as _).ok() } } pub unsafe fn GetProvider(&self) -> windows_core::Result { unsafe { @@ -4805,7 +4805,7 @@ windows_core::imp::define_interface!(IVdsSubSystem2, IVdsSubSystem2_Vtbl, 0xbe66 windows_core::imp::interface_hierarchy!(IVdsSubSystem2, windows_core::IUnknown); impl IVdsSubSystem2 { pub unsafe fn GetProperties2(&self, psubsystemprop2: *mut VDS_SUB_SYSTEM_PROP2) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperties2)(windows_core::Interface::as_raw(self), core::mem::transmute(psubsystemprop2)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperties2)(windows_core::Interface::as_raw(self), psubsystemprop2 as _).ok() } } pub unsafe fn GetDrive2(&self, sbusnumber: i16, sslotnumber: i16, ulenclosurenumber: u32) -> windows_core::Result { unsafe { @@ -5204,7 +5204,7 @@ impl IVdsVDisk { } #[cfg(feature = "Win32_Storage_Vhd")] pub unsafe fn GetProperties(&self, pdiskproperties: *mut VDS_VDISK_PROPERTIES) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(pdiskproperties)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), pdiskproperties as _).ok() } } pub unsafe fn GetHostVolume(&self) -> windows_core::Result { unsafe { @@ -5435,7 +5435,7 @@ windows_core::imp::define_interface!(IVdsVolume, IVdsVolume_Vtbl, 0x88306bb2_e71 windows_core::imp::interface_hierarchy!(IVdsVolume, windows_core::IUnknown); impl IVdsVolume { pub unsafe fn GetProperties(&self, pvolumeproperties: *mut VDS_VOLUME_PROP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(pvolumeproperties)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), pvolumeproperties as _).ok() } } pub unsafe fn GetPack(&self) -> windows_core::Result { unsafe { @@ -5651,7 +5651,7 @@ windows_core::imp::define_interface!(IVdsVolume2, IVdsVolume2_Vtbl, 0x72ae6713_d windows_core::imp::interface_hierarchy!(IVdsVolume2, windows_core::IUnknown); impl IVdsVolume2 { pub unsafe fn GetProperties2(&self, pvolumeproperties: *mut VDS_VOLUME_PROP2) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperties2)(windows_core::Interface::as_raw(self), core::mem::transmute(pvolumeproperties)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperties2)(windows_core::Interface::as_raw(self), pvolumeproperties as _).ok() } } } #[repr(C)] @@ -5681,7 +5681,7 @@ windows_core::imp::define_interface!(IVdsVolumeMF, IVdsVolumeMF_Vtbl, 0xee2d5ded windows_core::imp::interface_hierarchy!(IVdsVolumeMF, windows_core::IUnknown); impl IVdsVolumeMF { pub unsafe fn GetFileSystemProperties(&self, pfilesystemprop: *mut VDS_FILE_SYSTEM_PROP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFileSystemProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(pfilesystemprop)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFileSystemProperties)(windows_core::Interface::as_raw(self), pfilesystemprop as _).ok() } } pub unsafe fn Format(&self, r#type: VDS_FILE_SYSTEM_TYPE, pwszlabel: P1, dwunitallocationsize: u32, bforce: bool, bquickformat: bool, benablecompression: bool) -> windows_core::Result where @@ -5699,10 +5699,10 @@ impl IVdsVolumeMF { unsafe { (windows_core::Interface::vtable(self).AddAccessPath)(windows_core::Interface::as_raw(self), pwszpath.param().abi()).ok() } } pub unsafe fn QueryAccessPaths(&self, pwszpatharray: *mut *mut windows_core::PWSTR, plnumberofaccesspaths: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryAccessPaths)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszpatharray), core::mem::transmute(plnumberofaccesspaths)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryAccessPaths)(windows_core::Interface::as_raw(self), pwszpatharray as _, plnumberofaccesspaths as _).ok() } } pub unsafe fn QueryReparsePoints(&self, ppreparsepointprops: *mut *mut VDS_REPARSE_POINT_PROP, plnumberofreparsepointprops: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryReparsePoints)(windows_core::Interface::as_raw(self), core::mem::transmute(ppreparsepointprops), core::mem::transmute(plnumberofreparsepointprops)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryReparsePoints)(windows_core::Interface::as_raw(self), ppreparsepointprops as _, plnumberofreparsepointprops as _).ok() } } pub unsafe fn DeleteAccessPath(&self, pwszpath: P0, bforce: bool) -> windows_core::Result<()> where @@ -5846,7 +5846,7 @@ impl IVdsVolumeMF2 { } } pub unsafe fn QueryFileSystemFormatSupport(&self, ppfilesystemsupportprops: *mut *mut VDS_FILE_SYSTEM_FORMAT_SUPPORT_PROP, plnumberoffilesystems: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryFileSystemFormatSupport)(windows_core::Interface::as_raw(self), core::mem::transmute(ppfilesystemsupportprops), core::mem::transmute(plnumberoffilesystems)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryFileSystemFormatSupport)(windows_core::Interface::as_raw(self), ppfilesystemsupportprops as _, plnumberoffilesystems as _).ok() } } pub unsafe fn FormatEx(&self, pwszfilesystemtypename: P0, usfilesystemrevision: u16, uldesiredunitallocationsize: u32, pwszlabel: P3, bforce: bool, bquickformat: bool, benablecompression: bool) -> windows_core::Result where @@ -5919,7 +5919,7 @@ windows_core::imp::define_interface!(IVdsVolumeMF3, IVdsVolumeMF3_Vtbl, 0x6788fa windows_core::imp::interface_hierarchy!(IVdsVolumeMF3, windows_core::IUnknown); impl IVdsVolumeMF3 { pub unsafe fn QueryVolumeGuidPathnames(&self, pwszpatharray: *mut *mut windows_core::PWSTR, pulnumberofpaths: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryVolumeGuidPathnames)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszpatharray), core::mem::transmute(pulnumberofpaths)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryVolumeGuidPathnames)(windows_core::Interface::as_raw(self), pwszpatharray as _, pulnumberofpaths as _).ok() } } pub unsafe fn FormatEx2(&self, pwszfilesystemtypename: P0, usfilesystemrevision: u16, uldesiredunitallocationsize: u32, pwszlabel: P3, options: u32) -> windows_core::Result where @@ -6019,7 +6019,7 @@ windows_core::imp::define_interface!(IVdsVolumePlex, IVdsVolumePlex_Vtbl, 0x4daa windows_core::imp::interface_hierarchy!(IVdsVolumePlex, windows_core::IUnknown); impl IVdsVolumePlex { pub unsafe fn GetProperties(&self, pplexproperties: *mut VDS_VOLUME_PLEX_PROP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(pplexproperties)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), pplexproperties as _).ok() } } pub unsafe fn GetVolume(&self) -> windows_core::Result { unsafe { @@ -6028,7 +6028,7 @@ impl IVdsVolumePlex { } } pub unsafe fn QueryExtents(&self, ppextentarray: *mut *mut VDS_DISK_EXTENT, plnumberofextents: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryExtents)(windows_core::Interface::as_raw(self), core::mem::transmute(ppextentarray), core::mem::transmute(plnumberofextents)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryExtents)(windows_core::Interface::as_raw(self), ppextentarray as _, plnumberofextents as _).ok() } } pub unsafe fn Repair(&self, pinputdiskarray: &[VDS_INPUT_DISK]) -> windows_core::Result { unsafe { diff --git a/crates/libs/windows/src/Windows/Win32/Storage/Vss/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/Vss/mod.rs index acda7a7024..a767a19a37 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Vss/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Vss/mod.rs @@ -175,7 +175,7 @@ impl IVssAsync { unsafe { (windows_core::Interface::vtable(self).Wait)(windows_core::Interface::as_raw(self), dwmilliseconds).ok() } } pub unsafe fn QueryStatus(&self, phrresult: *mut windows_core::HRESULT, preserved: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(phrresult), core::mem::transmute(preserved)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryStatus)(windows_core::Interface::as_raw(self), phrresult as _, preserved as _).ok() } } } #[repr(C)] @@ -229,16 +229,16 @@ impl IVssComponent { unsafe { (windows_core::Interface::vtable(self).GetLogicalPath)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrpath)).ok() } } pub unsafe fn GetComponentType(&self, pct: *mut VSS_COMPONENT_TYPE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetComponentType)(windows_core::Interface::as_raw(self), core::mem::transmute(pct)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetComponentType)(windows_core::Interface::as_raw(self), pct as _).ok() } } pub unsafe fn GetComponentName(&self, pbstrname: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetComponentName)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrname)).ok() } } pub unsafe fn GetBackupSucceeded(&self, pbsucceeded: *mut bool) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBackupSucceeded)(windows_core::Interface::as_raw(self), core::mem::transmute(pbsucceeded)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBackupSucceeded)(windows_core::Interface::as_raw(self), pbsucceeded as _).ok() } } pub unsafe fn GetAlternateLocationMappingCount(&self, pcmappings: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAlternateLocationMappingCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pcmappings)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAlternateLocationMappingCount)(windows_core::Interface::as_raw(self), pcmappings as _).ok() } } pub unsafe fn GetAlternateLocationMapping(&self, imapping: u32) -> windows_core::Result { unsafe { @@ -265,19 +265,19 @@ impl IVssComponent { unsafe { (windows_core::Interface::vtable(self).AddPartialFile)(windows_core::Interface::as_raw(self), wszpath.param().abi(), wszfilename.param().abi(), wszranges.param().abi(), wszmetadata.param().abi()).ok() } } pub unsafe fn GetPartialFileCount(&self, pcpartialfiles: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPartialFileCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pcpartialfiles)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPartialFileCount)(windows_core::Interface::as_raw(self), pcpartialfiles as _).ok() } } pub unsafe fn GetPartialFile(&self, ipartialfile: u32, pbstrpath: *mut windows_core::BSTR, pbstrfilename: *mut windows_core::BSTR, pbstrrange: *mut windows_core::BSTR, pbstrmetadata: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetPartialFile)(windows_core::Interface::as_raw(self), ipartialfile, core::mem::transmute(pbstrpath), core::mem::transmute(pbstrfilename), core::mem::transmute(pbstrrange), core::mem::transmute(pbstrmetadata)).ok() } } pub unsafe fn IsSelectedForRestore(&self, pbselectedforrestore: *mut bool) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsSelectedForRestore)(windows_core::Interface::as_raw(self), core::mem::transmute(pbselectedforrestore)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsSelectedForRestore)(windows_core::Interface::as_raw(self), pbselectedforrestore as _).ok() } } pub unsafe fn GetAdditionalRestores(&self, pbadditionalrestores: *mut bool) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAdditionalRestores)(windows_core::Interface::as_raw(self), core::mem::transmute(pbadditionalrestores)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAdditionalRestores)(windows_core::Interface::as_raw(self), pbadditionalrestores as _).ok() } } pub unsafe fn GetNewTargetCount(&self, pcnewtarget: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNewTargetCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pcnewtarget)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNewTargetCount)(windows_core::Interface::as_raw(self), pcnewtarget as _).ok() } } pub unsafe fn GetNewTarget(&self, inewtarget: u32) -> windows_core::Result { unsafe { @@ -297,7 +297,7 @@ impl IVssComponent { unsafe { (windows_core::Interface::vtable(self).AddDirectedTarget)(windows_core::Interface::as_raw(self), wszsourcepath.param().abi(), wszsourcefilename.param().abi(), wszsourcerangelist.param().abi(), wszdestinationpath.param().abi(), wszdestinationfilename.param().abi(), wszdestinationrangelist.param().abi()).ok() } } pub unsafe fn GetDirectedTargetCount(&self, pcdirectedtarget: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDirectedTargetCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pcdirectedtarget)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDirectedTargetCount)(windows_core::Interface::as_raw(self), pcdirectedtarget as _).ok() } } pub unsafe fn GetDirectedTarget(&self, idirectedtarget: u32, pbstrsourcepath: *mut windows_core::BSTR, pbstrsourcefilename: *mut windows_core::BSTR, pbstrsourcerangelist: *mut windows_core::BSTR, pbstrdestinationpath: *mut windows_core::BSTR, pbstrdestinationfilename: *mut windows_core::BSTR, pbstrdestinationrangelist: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetDirectedTarget)(windows_core::Interface::as_raw(self), idirectedtarget, core::mem::transmute(pbstrsourcepath), core::mem::transmute(pbstrsourcefilename), core::mem::transmute(pbstrsourcerangelist), core::mem::transmute(pbstrdestinationpath), core::mem::transmute(pbstrdestinationfilename), core::mem::transmute(pbstrdestinationrangelist)).ok() } @@ -315,7 +315,7 @@ impl IVssComponent { unsafe { (windows_core::Interface::vtable(self).SetRestoreTarget)(windows_core::Interface::as_raw(self), target).ok() } } pub unsafe fn GetRestoreTarget(&self, ptarget: *mut VSS_RESTORE_TARGET) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRestoreTarget)(windows_core::Interface::as_raw(self), core::mem::transmute(ptarget)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRestoreTarget)(windows_core::Interface::as_raw(self), ptarget as _).ok() } } pub unsafe fn SetPreRestoreFailureMsg(&self, wszprerestorefailuremsg: P0) -> windows_core::Result<()> where @@ -354,13 +354,13 @@ impl IVssComponent { unsafe { (windows_core::Interface::vtable(self).GetRestoreOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrrestoreoptions)).ok() } } pub unsafe fn GetRestoreSubcomponentCount(&self, pcrestoresubcomponent: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRestoreSubcomponentCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pcrestoresubcomponent)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRestoreSubcomponentCount)(windows_core::Interface::as_raw(self), pcrestoresubcomponent as _).ok() } } pub unsafe fn GetRestoreSubcomponent(&self, icomponent: u32, pbstrlogicalpath: *mut windows_core::BSTR, pbstrcomponentname: *mut windows_core::BSTR, pbrepair: *mut bool) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRestoreSubcomponent)(windows_core::Interface::as_raw(self), icomponent, core::mem::transmute(pbstrlogicalpath), core::mem::transmute(pbstrcomponentname), core::mem::transmute(pbrepair)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRestoreSubcomponent)(windows_core::Interface::as_raw(self), icomponent, core::mem::transmute(pbstrlogicalpath), core::mem::transmute(pbstrcomponentname), pbrepair as _).ok() } } pub unsafe fn GetFileRestoreStatus(&self, pstatus: *mut VSS_FILE_RESTORE_STATUS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFileRestoreStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFileRestoreStatus)(windows_core::Interface::as_raw(self), pstatus as _).ok() } } pub unsafe fn AddDifferencedFilesByLastModifyTime(&self, wszpath: P0, wszfilespec: P1, brecursive: bool, ftlastmodifytime: super::super::Foundation::FILETIME) -> windows_core::Result<()> where @@ -377,10 +377,10 @@ impl IVssComponent { unsafe { (windows_core::Interface::vtable(self).AddDifferencedFilesByLastModifyLSN)(windows_core::Interface::as_raw(self), wszpath.param().abi(), wszfilespec.param().abi(), brecursive.into(), core::mem::transmute_copy(bstrlsnstring)).ok() } } pub unsafe fn GetDifferencedFilesCount(&self, pcdifferencedfiles: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDifferencedFilesCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pcdifferencedfiles)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDifferencedFilesCount)(windows_core::Interface::as_raw(self), pcdifferencedfiles as _).ok() } } pub unsafe fn GetDifferencedFile(&self, idifferencedfile: u32, pbstrpath: *mut windows_core::BSTR, pbstrfilespec: *mut windows_core::BSTR, pbrecursive: *mut super::super::Foundation::BOOL, pbstrlsnstring: *mut windows_core::BSTR, pftlastmodifytime: *mut super::super::Foundation::FILETIME) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDifferencedFile)(windows_core::Interface::as_raw(self), idifferencedfile, core::mem::transmute(pbstrpath), core::mem::transmute(pbstrfilespec), core::mem::transmute(pbrecursive), core::mem::transmute(pbstrlsnstring), core::mem::transmute(pftlastmodifytime)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDifferencedFile)(windows_core::Interface::as_raw(self), idifferencedfile, core::mem::transmute(pbstrpath), core::mem::transmute(pbstrfilespec), pbrecursive as _, core::mem::transmute(pbstrlsnstring), pftlastmodifytime as _).ok() } } } #[repr(C)] @@ -794,7 +794,7 @@ impl IVssComponentEx { } } pub unsafe fn GetRollForward(&self, prolltype: *mut VSS_ROLLFORWARD_TYPE, pbstrpoint: *mut windows_core::BSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRollForward)(windows_core::Interface::as_raw(self), core::mem::transmute(prolltype), core::mem::transmute(pbstrpoint)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRollForward)(windows_core::Interface::as_raw(self), prolltype as _, core::mem::transmute(pbstrpoint)).ok() } } pub unsafe fn GetRestoreName(&self) -> windows_core::Result { unsafe { @@ -923,7 +923,7 @@ impl IVssComponentEx2 { unsafe { (windows_core::Interface::vtable(self).SetFailure)(windows_core::Interface::as_raw(self), hr, hrapplication, wszapplicationmessage.param().abi(), dwreserved).ok() } } pub unsafe fn GetFailure(&self, phr: *mut windows_core::HRESULT, phrapplication: *mut windows_core::HRESULT, pbstrapplicationmessage: *mut windows_core::BSTR, pdwreserved: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFailure)(windows_core::Interface::as_raw(self), core::mem::transmute(phr), core::mem::transmute(phrapplication), core::mem::transmute(pbstrapplicationmessage), core::mem::transmute(pdwreserved)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFailure)(windows_core::Interface::as_raw(self), phr as _, phrapplication as _, core::mem::transmute(pbstrapplicationmessage), pdwreserved as _).ok() } } } #[repr(C)] @@ -1570,7 +1570,7 @@ impl IVssDifferentialSoftwareSnapshotMgmt3 { unsafe { (windows_core::Interface::vtable(self).SetVolumeProtectLevel)(windows_core::Interface::as_raw(self), pwszvolumename, protectionlevel).ok() } } pub unsafe fn GetVolumeProtectLevel(&self, pwszvolumename: *const u16, protectionlevel: *mut VSS_VOLUME_PROTECTION_INFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVolumeProtectLevel)(windows_core::Interface::as_raw(self), pwszvolumename, core::mem::transmute(protectionlevel)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVolumeProtectLevel)(windows_core::Interface::as_raw(self), pwszvolumename, protectionlevel as _).ok() } } pub unsafe fn ClearVolumeProtectFault(&self, pwszvolumename: *const u16) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ClearVolumeProtectFault)(windows_core::Interface::as_raw(self), pwszvolumename).ok() } @@ -1579,7 +1579,7 @@ impl IVssDifferentialSoftwareSnapshotMgmt3 { unsafe { (windows_core::Interface::vtable(self).DeleteUnusedDiffAreas)(windows_core::Interface::as_raw(self), pwszdiffareavolumename).ok() } } pub unsafe fn QuerySnapshotDeltaBitmap(&self, idsnapshotolder: windows_core::GUID, idsnapshotyounger: windows_core::GUID, pcblocksizeperbit: *mut u32, pcbitmaplength: *mut u32, ppbbitmap: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QuerySnapshotDeltaBitmap)(windows_core::Interface::as_raw(self), core::mem::transmute(idsnapshotolder), core::mem::transmute(idsnapshotyounger), core::mem::transmute(pcblocksizeperbit), core::mem::transmute(pcbitmaplength), core::mem::transmute(ppbbitmap)).ok() } + unsafe { (windows_core::Interface::vtable(self).QuerySnapshotDeltaBitmap)(windows_core::Interface::as_raw(self), core::mem::transmute(idsnapshotolder), core::mem::transmute(idsnapshotyounger), pcblocksizeperbit as _, pcbitmaplength as _, ppbbitmap as _).ok() } } } #[repr(C)] @@ -1648,7 +1648,7 @@ windows_core::imp::define_interface!(IVssEnumMgmtObject, IVssEnumMgmtObject_Vtbl windows_core::imp::interface_hierarchy!(IVssEnumMgmtObject, windows_core::IUnknown); impl IVssEnumMgmtObject { pub unsafe fn Next(&self, rgelt: &mut [VSS_MGMT_OBJECT_PROP], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -1717,7 +1717,7 @@ windows_core::imp::define_interface!(IVssEnumObject, IVssEnumObject_Vtbl, 0xae1c windows_core::imp::interface_hierarchy!(IVssEnumObject, windows_core::IUnknown); impl IVssEnumObject { pub unsafe fn Next(&self, rgelt: &mut [VSS_OBJECT_PROP], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -1873,7 +1873,7 @@ impl IVssFileShareSnapshotProvider { unsafe { (windows_core::Interface::vtable(self).SetContext)(windows_core::Interface::as_raw(self), lcontext).ok() } } pub unsafe fn GetSnapshotProperties(&self, snapshotid: windows_core::GUID, pprop: *mut VSS_SNAPSHOT_PROP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSnapshotProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(snapshotid), core::mem::transmute(pprop)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSnapshotProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(snapshotid), pprop as _).ok() } } pub unsafe fn Query(&self, queriedobjectid: windows_core::GUID, equeriedobjecttype: VSS_OBJECT_TYPE, ereturnedobjectstype: VSS_OBJECT_TYPE) -> windows_core::Result { unsafe { @@ -1882,7 +1882,7 @@ impl IVssFileShareSnapshotProvider { } } pub unsafe fn DeleteSnapshots(&self, sourceobjectid: windows_core::GUID, esourceobjecttype: VSS_OBJECT_TYPE, bforcedelete: bool, pldeletedsnapshots: *mut i32, pnondeletedsnapshotid: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DeleteSnapshots)(windows_core::Interface::as_raw(self), core::mem::transmute(sourceobjectid), esourceobjecttype, bforcedelete.into(), core::mem::transmute(pldeletedsnapshots), core::mem::transmute(pnondeletedsnapshotid)).ok() } + unsafe { (windows_core::Interface::vtable(self).DeleteSnapshots)(windows_core::Interface::as_raw(self), core::mem::transmute(sourceobjectid), esourceobjecttype, bforcedelete.into(), pldeletedsnapshots as _, pnondeletedsnapshotid as _).ok() } } pub unsafe fn BeginPrepareSnapshot(&self, snapshotsetid: windows_core::GUID, snapshotid: windows_core::GUID, pwszsharepath: *const u16, lnewcontext: i32, providerid: windows_core::GUID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).BeginPrepareSnapshot)(windows_core::Interface::as_raw(self), core::mem::transmute(snapshotsetid), core::mem::transmute(snapshotid), pwszsharepath, lnewcontext, core::mem::transmute(providerid)).ok() } @@ -1894,7 +1894,7 @@ impl IVssFileShareSnapshotProvider { } } pub unsafe fn IsPathSnapshotted(&self, pwszsharepath: *const u16, pbsnapshotspresent: *mut super::super::Foundation::BOOL, plsnapshotcompatibility: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsPathSnapshotted)(windows_core::Interface::as_raw(self), pwszsharepath, core::mem::transmute(pbsnapshotspresent), core::mem::transmute(plsnapshotcompatibility)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsPathSnapshotted)(windows_core::Interface::as_raw(self), pwszsharepath, pbsnapshotspresent as _, plsnapshotcompatibility as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn SetSnapshotProperty(&self, snapshotid: windows_core::GUID, esnapshotpropertyid: VSS_SNAPSHOT_PROPERTY_ID, vproperty: &super::super::System::Variant::VARIANT) -> windows_core::Result<()> { @@ -2013,19 +2013,19 @@ windows_core::imp::interface_hierarchy!(IVssHardwareSnapshotProvider, windows_co impl IVssHardwareSnapshotProvider { #[cfg(feature = "Win32_Storage_VirtualDiskService")] pub unsafe fn AreLunsSupported(&self, lluncount: i32, lcontext: i32, rgwszdevices: *const *const u16, pluninformation: *mut super::VirtualDiskService::VDS_LUN_INFORMATION, pbissupported: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AreLunsSupported)(windows_core::Interface::as_raw(self), lluncount, lcontext, rgwszdevices, core::mem::transmute(pluninformation), core::mem::transmute(pbissupported)).ok() } + unsafe { (windows_core::Interface::vtable(self).AreLunsSupported)(windows_core::Interface::as_raw(self), lluncount, lcontext, rgwszdevices, pluninformation as _, pbissupported as _).ok() } } #[cfg(feature = "Win32_Storage_VirtualDiskService")] pub unsafe fn FillInLunInfo(&self, wszdevicename: *const u16, pluninfo: *mut super::VirtualDiskService::VDS_LUN_INFORMATION, pbissupported: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).FillInLunInfo)(windows_core::Interface::as_raw(self), wszdevicename, core::mem::transmute(pluninfo), core::mem::transmute(pbissupported)).ok() } + unsafe { (windows_core::Interface::vtable(self).FillInLunInfo)(windows_core::Interface::as_raw(self), wszdevicename, pluninfo as _, pbissupported as _).ok() } } #[cfg(feature = "Win32_Storage_VirtualDiskService")] pub unsafe fn BeginPrepareSnapshot(&self, snapshotsetid: windows_core::GUID, snapshotid: windows_core::GUID, lcontext: i32, lluncount: i32, rgdevicenames: *const *const u16, rgluninformation: *mut super::VirtualDiskService::VDS_LUN_INFORMATION) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).BeginPrepareSnapshot)(windows_core::Interface::as_raw(self), core::mem::transmute(snapshotsetid), core::mem::transmute(snapshotid), lcontext, lluncount, rgdevicenames, core::mem::transmute(rgluninformation)).ok() } + unsafe { (windows_core::Interface::vtable(self).BeginPrepareSnapshot)(windows_core::Interface::as_raw(self), core::mem::transmute(snapshotsetid), core::mem::transmute(snapshotid), lcontext, lluncount, rgdevicenames, rgluninformation as _).ok() } } #[cfg(feature = "Win32_Storage_VirtualDiskService")] pub unsafe fn GetTargetLuns(&self, lluncount: i32, rgdevicenames: *const *const u16, rgsourceluns: *const super::VirtualDiskService::VDS_LUN_INFORMATION, rgdestinationluns: *mut super::VirtualDiskService::VDS_LUN_INFORMATION) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTargetLuns)(windows_core::Interface::as_raw(self), lluncount, rgdevicenames, rgsourceluns, core::mem::transmute(rgdestinationluns)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTargetLuns)(windows_core::Interface::as_raw(self), lluncount, rgdevicenames, rgsourceluns, rgdestinationluns as _).ok() } } #[cfg(feature = "Win32_Storage_VirtualDiskService")] pub unsafe fn LocateLuns(&self, rgsourceluns: &[super::VirtualDiskService::VDS_LUN_INFORMATION]) -> windows_core::Result<()> { @@ -2515,7 +2515,7 @@ impl IVssSoftwareSnapshotProvider { unsafe { (windows_core::Interface::vtable(self).SetContext)(windows_core::Interface::as_raw(self), lcontext).ok() } } pub unsafe fn GetSnapshotProperties(&self, snapshotid: windows_core::GUID, pprop: *mut VSS_SNAPSHOT_PROP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSnapshotProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(snapshotid), core::mem::transmute(pprop)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSnapshotProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(snapshotid), pprop as _).ok() } } pub unsafe fn Query(&self, queriedobjectid: windows_core::GUID, equeriedobjecttype: VSS_OBJECT_TYPE, ereturnedobjectstype: VSS_OBJECT_TYPE) -> windows_core::Result { unsafe { @@ -2524,7 +2524,7 @@ impl IVssSoftwareSnapshotProvider { } } pub unsafe fn DeleteSnapshots(&self, sourceobjectid: windows_core::GUID, esourceobjecttype: VSS_OBJECT_TYPE, bforcedelete: bool, pldeletedsnapshots: *mut i32, pnondeletedsnapshotid: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DeleteSnapshots)(windows_core::Interface::as_raw(self), core::mem::transmute(sourceobjectid), esourceobjecttype, bforcedelete.into(), core::mem::transmute(pldeletedsnapshots), core::mem::transmute(pnondeletedsnapshotid)).ok() } + unsafe { (windows_core::Interface::vtable(self).DeleteSnapshots)(windows_core::Interface::as_raw(self), core::mem::transmute(sourceobjectid), esourceobjecttype, bforcedelete.into(), pldeletedsnapshots as _, pnondeletedsnapshotid as _).ok() } } pub unsafe fn BeginPrepareSnapshot(&self, snapshotsetid: windows_core::GUID, snapshotid: windows_core::GUID, pwszvolumename: *const u16, lnewcontext: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).BeginPrepareSnapshot)(windows_core::Interface::as_raw(self), core::mem::transmute(snapshotsetid), core::mem::transmute(snapshotid), pwszvolumename, lnewcontext).ok() } @@ -2536,7 +2536,7 @@ impl IVssSoftwareSnapshotProvider { } } pub unsafe fn IsVolumeSnapshotted(&self, pwszvolumename: *const u16, pbsnapshotspresent: *mut super::super::Foundation::BOOL, plsnapshotcompatibility: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsVolumeSnapshotted)(windows_core::Interface::as_raw(self), pwszvolumename, core::mem::transmute(pbsnapshotspresent), core::mem::transmute(plsnapshotcompatibility)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsVolumeSnapshotted)(windows_core::Interface::as_raw(self), pwszvolumename, pbsnapshotspresent as _, plsnapshotcompatibility as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn SetSnapshotProperty(&self, snapshotid: windows_core::GUID, esnapshotpropertyid: VSS_SNAPSHOT_PROPERTY_ID, vproperty: &super::super::System::Variant::VARIANT) -> windows_core::Result<()> { @@ -2687,7 +2687,7 @@ windows_core::imp::define_interface!(IVssWMDependency, IVssWMDependency_Vtbl, 0) windows_core::imp::interface_hierarchy!(IVssWMDependency, windows_core::IUnknown); impl IVssWMDependency { pub unsafe fn GetWriterId(&self, pwriterid: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWriterId)(windows_core::Interface::as_raw(self), core::mem::transmute(pwriterid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWriterId)(windows_core::Interface::as_raw(self), pwriterid as _).ok() } } pub unsafe fn GetLogicalPath(&self, pbstrlogicalpath: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetLogicalPath)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrlogicalpath)).ok() } @@ -2869,10 +2869,10 @@ impl windows_core::RuntimeName for IVssWMFiledesc {} windows_core::imp::define_interface!(IVssWriterComponents, IVssWriterComponents_Vtbl); impl IVssWriterComponents { pub unsafe fn GetComponentCount(&self, pccomponents: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetComponentCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pccomponents)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetComponentCount)(windows_core::Interface::as_raw(self), pccomponents as _).ok() } } pub unsafe fn GetWriterInfo(&self, pidinstance: *mut windows_core::GUID, pidwriter: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWriterInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pidinstance), core::mem::transmute(pidwriter)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWriterInfo)(windows_core::Interface::as_raw(self), pidinstance as _, pidwriter as _).ok() } } pub unsafe fn GetComponent(&self, icomponent: u32) -> windows_core::Result { unsafe { 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 35a8f0cc43..216a2800d0 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 @@ -73,7 +73,7 @@ windows_core::imp::define_interface!(IPrintDocumentPackageTarget, IPrintDocument windows_core::imp::interface_hierarchy!(IPrintDocumentPackageTarget, windows_core::IUnknown); impl IPrintDocumentPackageTarget { pub unsafe fn GetPackageTargetTypes(&self, targetcount: *mut u32, targettypes: *mut *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPackageTargetTypes)(windows_core::Interface::as_raw(self), core::mem::transmute(targetcount), core::mem::transmute(targettypes)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPackageTargetTypes)(windows_core::Interface::as_raw(self), targetcount as _, targettypes as _).ok() } } pub unsafe fn GetPackageTarget(&self, guidtargettype: *const windows_core::GUID) -> windows_core::Result where @@ -250,7 +250,7 @@ impl IXpsPrintJob { unsafe { (windows_core::Interface::vtable(self).Cancel)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetJobStatus(&self, jobstatus: *mut XPS_JOB_STATUS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetJobStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(jobstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetJobStatus)(windows_core::Interface::as_raw(self), jobstatus as _).ok() } } } #[repr(C)] 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 c87d380abe..9e363364c3 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Xps/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Xps/mod.rs @@ -14,7 +14,7 @@ where P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn DeviceCapabilitiesA(pdevice : windows_core::PCSTR, pport : windows_core::PCSTR, fwcapability : PRINTER_DEVICE_CAPABILITIES, poutput : windows_core::PSTR, pdevmode : *const super::super::Graphics::Gdi:: DEVMODEA) -> i32); - unsafe { DeviceCapabilitiesA(pdevice.param().abi(), pport.param().abi(), fwcapability, core::mem::transmute(poutput.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdevmode.unwrap_or(core::mem::zeroed()))) } + unsafe { DeviceCapabilitiesA(pdevice.param().abi(), pport.param().abi(), fwcapability, poutput.unwrap_or(core::mem::zeroed()) as _, pdevmode.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -24,7 +24,7 @@ where P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn DeviceCapabilitiesW(pdevice : windows_core::PCWSTR, pport : windows_core::PCWSTR, fwcapability : PRINTER_DEVICE_CAPABILITIES, poutput : windows_core::PWSTR, pdevmode : *const super::super::Graphics::Gdi:: DEVMODEW) -> i32); - unsafe { DeviceCapabilitiesW(pdevice.param().abi(), pport.param().abi(), fwcapability, core::mem::transmute(poutput.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdevmode.unwrap_or(core::mem::zeroed()))) } + unsafe { DeviceCapabilitiesW(pdevice.param().abi(), pport.param().abi(), fwcapability, poutput.unwrap_or(core::mem::zeroed()) as _, pdevmode.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -42,7 +42,7 @@ pub unsafe fn EndPage(hdc: super::super::Graphics::Gdi::HDC) -> i32 { #[inline] 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); - unsafe { Escape(hdc, 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()))) } + unsafe { Escape(hdc, 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())), pvout.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1640,7 +1640,7 @@ impl IXpsOMDictionary { pub unsafe fn GetAt(&self, index: u32, key: *mut windows_core::PWSTR) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetAt)(windows_core::Interface::as_raw(self), index, core::mem::transmute(key), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetAt)(windows_core::Interface::as_raw(self), index, key as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn GetByKey(&self, key: P0, beforeentry: P1) -> windows_core::Result @@ -2798,13 +2798,13 @@ impl IXpsOMGeometryFigure { } } pub unsafe fn GetSegmentData(&self, datacount: *mut u32, segmentdata: *mut f32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSegmentData)(windows_core::Interface::as_raw(self), core::mem::transmute(datacount), core::mem::transmute(segmentdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSegmentData)(windows_core::Interface::as_raw(self), datacount as _, segmentdata as _).ok() } } pub unsafe fn GetSegmentTypes(&self, segmentcount: *mut u32, segmenttypes: *mut XPS_SEGMENT_TYPE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSegmentTypes)(windows_core::Interface::as_raw(self), core::mem::transmute(segmentcount), core::mem::transmute(segmenttypes)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSegmentTypes)(windows_core::Interface::as_raw(self), segmentcount as _, segmenttypes as _).ok() } } pub unsafe fn GetSegmentStrokes(&self, segmentcount: *mut u32, segmentstrokes: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSegmentStrokes)(windows_core::Interface::as_raw(self), core::mem::transmute(segmentcount), core::mem::transmute(segmentstrokes)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSegmentStrokes)(windows_core::Interface::as_raw(self), segmentcount as _, segmentstrokes as _).ok() } } pub unsafe fn SetSegments(&self, segmentcount: u32, segmentdatacount: u32, segmenttypes: *const XPS_SEGMENT_TYPE, segmentdata: *const f32, segmentstrokes: *const super::super::Foundation::BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSegments)(windows_core::Interface::as_raw(self), segmentcount, segmentdatacount, segmenttypes, segmentdata, segmentstrokes).ok() } @@ -3203,7 +3203,7 @@ impl IXpsOMGlyphs { } } pub unsafe fn GetGlyphIndices(&self, indexcount: *mut u32, glyphindices: *mut XPS_GLYPH_INDEX) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGlyphIndices)(windows_core::Interface::as_raw(self), core::mem::transmute(indexcount), core::mem::transmute(glyphindices)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGlyphIndices)(windows_core::Interface::as_raw(self), indexcount as _, glyphindices as _).ok() } } pub unsafe fn GetGlyphMappingCount(&self) -> windows_core::Result { unsafe { @@ -3212,7 +3212,7 @@ impl IXpsOMGlyphs { } } pub unsafe fn GetGlyphMappings(&self, glyphmappingcount: *mut u32, glyphmappings: *mut XPS_GLYPH_MAPPING) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGlyphMappings)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphmappingcount), core::mem::transmute(glyphmappings)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGlyphMappings)(windows_core::Interface::as_raw(self), glyphmappingcount as _, glyphmappings as _).ok() } } pub unsafe fn GetProhibitedCaretStopCount(&self) -> windows_core::Result { unsafe { @@ -3221,7 +3221,7 @@ impl IXpsOMGlyphs { } } pub unsafe fn GetProhibitedCaretStops(&self, prohibitedcaretstopcount: *mut u32, prohibitedcaretstops: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProhibitedCaretStops)(windows_core::Interface::as_raw(self), core::mem::transmute(prohibitedcaretstopcount), core::mem::transmute(prohibitedcaretstops)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProhibitedCaretStops)(windows_core::Interface::as_raw(self), prohibitedcaretstopcount as _, prohibitedcaretstops as _).ok() } } pub unsafe fn GetBidiLevel(&self) -> windows_core::Result { unsafe { @@ -3722,7 +3722,7 @@ impl IXpsOMGlyphsEditor { } } pub unsafe fn GetGlyphIndices(&self, indexcount: *mut u32, glyphindices: *mut XPS_GLYPH_INDEX) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGlyphIndices)(windows_core::Interface::as_raw(self), core::mem::transmute(indexcount), core::mem::transmute(glyphindices)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGlyphIndices)(windows_core::Interface::as_raw(self), indexcount as _, glyphindices as _).ok() } } pub unsafe fn SetGlyphIndices(&self, indexcount: u32, glyphindices: *const XPS_GLYPH_INDEX) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetGlyphIndices)(windows_core::Interface::as_raw(self), indexcount, glyphindices).ok() } @@ -3734,7 +3734,7 @@ impl IXpsOMGlyphsEditor { } } pub unsafe fn GetGlyphMappings(&self, glyphmappingcount: *mut u32, glyphmappings: *mut XPS_GLYPH_MAPPING) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGlyphMappings)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphmappingcount), core::mem::transmute(glyphmappings)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGlyphMappings)(windows_core::Interface::as_raw(self), glyphmappingcount as _, glyphmappings as _).ok() } } pub unsafe fn SetGlyphMappings(&self, glyphmappingcount: u32, glyphmappings: *const XPS_GLYPH_MAPPING) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetGlyphMappings)(windows_core::Interface::as_raw(self), glyphmappingcount, glyphmappings).ok() } @@ -3746,7 +3746,7 @@ impl IXpsOMGlyphsEditor { } } pub unsafe fn GetProhibitedCaretStops(&self, count: *mut u32, prohibitedcaretstops: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProhibitedCaretStops)(windows_core::Interface::as_raw(self), core::mem::transmute(count), core::mem::transmute(prohibitedcaretstops)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProhibitedCaretStops)(windows_core::Interface::as_raw(self), count as _, prohibitedcaretstops as _).ok() } } pub unsafe fn SetProhibitedCaretStops(&self, count: u32, prohibitedcaretstops: *const u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetProhibitedCaretStops)(windows_core::Interface::as_raw(self), count, prohibitedcaretstops).ok() } @@ -4231,7 +4231,7 @@ impl IXpsOMGradientStop { pub unsafe fn GetColor(&self, color: *mut XPS_COLOR) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetColor)(windows_core::Interface::as_raw(self), core::mem::transmute(color), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetColor)(windows_core::Interface::as_raw(self), color as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn SetColor(&self, color: *const XPS_COLOR, colorprofile: P1) -> windows_core::Result<()> @@ -9753,7 +9753,7 @@ impl IXpsOMSolidColorBrush { pub unsafe fn GetColor(&self, color: *mut XPS_COLOR) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetColor)(windows_core::Interface::as_raw(self), core::mem::transmute(color), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetColor)(windows_core::Interface::as_raw(self), color as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn SetColor(&self, color: *const XPS_COLOR, colorprofile: P1) -> windows_core::Result<()> @@ -10952,7 +10952,7 @@ impl IXpsSignature { } } pub unsafe fn GetSignatureValue(&self, signaturehashvalue: *mut *mut u8, count: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSignatureValue)(windows_core::Interface::as_raw(self), core::mem::transmute(signaturehashvalue), core::mem::transmute(count)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSignatureValue)(windows_core::Interface::as_raw(self), signaturehashvalue as _, count as _).ok() } } #[cfg(feature = "Win32_Storage_Packaging_Opc")] pub unsafe fn GetCertificateEnumerator(&self) -> windows_core::Result { @@ -11009,7 +11009,7 @@ impl IXpsSignature { } } pub unsafe fn GetSignatureXml(&self, signaturexml: *mut *mut u8, count: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSignatureXml)(windows_core::Interface::as_raw(self), core::mem::transmute(signaturexml), core::mem::transmute(count)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSignatureXml)(windows_core::Interface::as_raw(self), signaturexml as _, count as _).ok() } } pub unsafe fn SetSignatureXml(&self, signaturexml: &[u8]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSignatureXml)(windows_core::Interface::as_raw(self), core::mem::transmute(signaturexml.as_ptr()), signaturexml.len().try_into().unwrap()).ok() } @@ -11817,7 +11817,7 @@ impl IXpsSignatureRequest { } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] pub unsafe fn GetSpotLocation(&self, pageindex: *mut i32, pagepartname: *mut Option, x: *mut f32, y: *mut f32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSpotLocation)(windows_core::Interface::as_raw(self), core::mem::transmute(pageindex), core::mem::transmute(pagepartname), core::mem::transmute(x), core::mem::transmute(y)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSpotLocation)(windows_core::Interface::as_raw(self), pageindex as _, core::mem::transmute(pagepartname), x as _, y as _).ok() } } pub unsafe fn SetSpotLocation(&self, pageindex: i32, x: f32, y: f32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSpotLocation)(windows_core::Interface::as_raw(self), pageindex, x, y).ok() } 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 3ba3bfb29c..edadde41a1 100644 --- a/crates/libs/windows/src/Windows/Win32/System/AddressBook/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/AddressBook/mod.rs @@ -5,22 +5,22 @@ where P3: 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); - unsafe { BuildDisplayTable(lpallocatebuffer, lpallocatemore, lpfreebuffer, lpmalloc.param().abi(), hinstance, cpages, core::mem::transmute(lppage), ulflags, core::mem::transmute(lpptable), core::mem::transmute(lpptbldata)).ok() } + unsafe { BuildDisplayTable(lpallocatebuffer, lpallocatemore, lpfreebuffer, lpmalloc.param().abi(), hinstance, cpages, lppage as _, 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) { windows_targets::link!("mapi32.dll" "system" fn ChangeIdleRoutine(ftg : *mut core::ffi::c_void, lpfnidle : PFNIDLE, lpvidleparam : *mut core::ffi::c_void, priidle : i16, csecidle : u32, iroidle : u16, ircidle : u16)); - unsafe { ChangeIdleRoutine(core::mem::transmute(ftg), lpfnidle, core::mem::transmute(lpvidleparam), priidle, csecidle, iroidle, ircidle) } + unsafe { ChangeIdleRoutine(ftg as _, lpfnidle, lpvidleparam as _, priidle, csecidle, iroidle, ircidle) } } #[inline] pub unsafe fn CreateIProp(lpinterface: *mut windows_core::GUID, lpallocatebuffer: LPALLOCATEBUFFER, lpallocatemore: LPALLOCATEMORE, lpfreebuffer: LPFREEBUFFER, lpvreserved: *mut core::ffi::c_void, lpppropdata: *mut Option) -> i32 { windows_targets::link!("mapi32.dll" "system" fn CreateIProp(lpinterface : *mut windows_core::GUID, lpallocatebuffer : LPALLOCATEBUFFER, lpallocatemore : LPALLOCATEMORE, lpfreebuffer : LPFREEBUFFER, lpvreserved : *mut core::ffi::c_void, lpppropdata : *mut * mut core::ffi::c_void) -> i32); - unsafe { CreateIProp(core::mem::transmute(lpinterface), lpallocatebuffer, lpallocatemore, lpfreebuffer, core::mem::transmute(lpvreserved), core::mem::transmute(lpppropdata)) } + unsafe { CreateIProp(lpinterface as _, lpallocatebuffer, lpallocatemore, lpfreebuffer, lpvreserved as _, core::mem::transmute(lpppropdata)) } } #[inline] pub unsafe fn CreateTable(lpinterface: *mut windows_core::GUID, lpallocatebuffer: LPALLOCATEBUFFER, lpallocatemore: LPALLOCATEMORE, lpfreebuffer: LPFREEBUFFER, lpvreserved: *mut core::ffi::c_void, ultabletype: u32, ulproptagindexcolumn: u32, lpsproptagarraycolumns: *mut SPropTagArray, lpptabledata: *mut Option) -> i32 { windows_targets::link!("rtm.dll" "system" fn CreateTable(lpinterface : *mut windows_core::GUID, lpallocatebuffer : LPALLOCATEBUFFER, lpallocatemore : LPALLOCATEMORE, lpfreebuffer : LPFREEBUFFER, lpvreserved : *mut core::ffi::c_void, ultabletype : u32, ulproptagindexcolumn : u32, lpsproptagarraycolumns : *mut SPropTagArray, lpptabledata : *mut * mut core::ffi::c_void) -> i32); - unsafe { CreateTable(core::mem::transmute(lpinterface), lpallocatebuffer, lpallocatemore, lpfreebuffer, core::mem::transmute(lpvreserved), ultabletype, ulproptagindexcolumn, core::mem::transmute(lpsproptagarraycolumns), core::mem::transmute(lpptabledata)) } + unsafe { CreateTable(lpinterface as _, lpallocatebuffer, lpallocatemore, lpfreebuffer, lpvreserved as _, ultabletype, ulproptagindexcolumn, lpsproptagarraycolumns as _, core::mem::transmute(lpptabledata)) } } #[inline] pub unsafe fn DeinitMapiUtil() { @@ -30,29 +30,29 @@ pub unsafe fn DeinitMapiUtil() { #[inline] pub unsafe fn DeregisterIdleRoutine(ftg: *mut core::ffi::c_void) { windows_targets::link!("mapi32.dll" "system" fn DeregisterIdleRoutine(ftg : *mut core::ffi::c_void)); - unsafe { DeregisterIdleRoutine(core::mem::transmute(ftg)) } + unsafe { DeregisterIdleRoutine(ftg as _) } } #[inline] pub unsafe fn EnableIdleRoutine(ftg: *mut core::ffi::c_void, fenable: bool) { windows_targets::link!("mapi32.dll" "system" fn EnableIdleRoutine(ftg : *mut core::ffi::c_void, fenable : super::super::Foundation:: BOOL)); - unsafe { EnableIdleRoutine(core::mem::transmute(ftg), fenable.into()) } + unsafe { EnableIdleRoutine(ftg as _, fenable.into()) } } #[inline] pub unsafe fn FEqualNames(lpname1: *mut MAPINAMEID, lpname2: *mut MAPINAMEID) -> super::super::Foundation::BOOL { windows_targets::link!("mapi32.dll" "system" fn FEqualNames(lpname1 : *mut MAPINAMEID, lpname2 : *mut MAPINAMEID) -> super::super::Foundation:: BOOL); - unsafe { FEqualNames(core::mem::transmute(lpname1), core::mem::transmute(lpname2)) } + unsafe { FEqualNames(lpname1 as _, lpname2 as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn FPropCompareProp(lpspropvalue1: *mut SPropValue, ulrelop: u32, lpspropvalue2: *mut SPropValue) -> super::super::Foundation::BOOL { windows_targets::link!("mapi32.dll" "system" fn FPropCompareProp(lpspropvalue1 : *mut SPropValue, ulrelop : u32, lpspropvalue2 : *mut SPropValue) -> super::super::Foundation:: BOOL); - unsafe { FPropCompareProp(core::mem::transmute(lpspropvalue1), ulrelop, core::mem::transmute(lpspropvalue2)) } + unsafe { FPropCompareProp(lpspropvalue1 as _, ulrelop, lpspropvalue2 as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn FPropContainsProp(lpspropvaluedst: *mut SPropValue, lpspropvaluesrc: *mut SPropValue, ulfuzzylevel: u32) -> super::super::Foundation::BOOL { windows_targets::link!("mapi32.dll" "system" fn FPropContainsProp(lpspropvaluedst : *mut SPropValue, lpspropvaluesrc : *mut SPropValue, ulfuzzylevel : u32) -> super::super::Foundation:: BOOL); - unsafe { FPropContainsProp(core::mem::transmute(lpspropvaluedst), core::mem::transmute(lpspropvaluesrc), ulfuzzylevel) } + unsafe { FPropContainsProp(lpspropvaluedst as _, lpspropvaluesrc as _, ulfuzzylevel) } } #[inline] pub unsafe fn FPropExists(lpmapiprop: P0, ulproptag: u32) -> super::super::Foundation::BOOL @@ -66,13 +66,13 @@ where #[inline] pub unsafe fn FreePadrlist(lpadrlist: *mut ADRLIST) { windows_targets::link!("mapi32.dll" "system" fn FreePadrlist(lpadrlist : *mut ADRLIST)); - unsafe { FreePadrlist(core::mem::transmute(lpadrlist)) } + unsafe { FreePadrlist(lpadrlist as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn FreeProws(lprows: *mut SRowSet) { windows_targets::link!("mapi32.dll" "system" fn FreeProws(lprows : *mut SRowSet)); - unsafe { FreeProws(core::mem::transmute(lprows)) } + unsafe { FreeProws(lprows as _) } } #[inline] pub unsafe fn FtAddFt(ftaddend1: super::super::Foundation::FILETIME, ftaddend2: super::super::Foundation::FILETIME) -> super::super::Foundation::FILETIME { @@ -102,7 +102,7 @@ pub unsafe fn FtSubFt(ftminuend: super::super::Foundation::FILETIME, ftsubtrahen #[inline] pub unsafe fn FtgRegisterIdleRoutine(lpfnidle: PFNIDLE, lpvidleparam: *mut core::ffi::c_void, priidle: i16, csecidle: u32, iroidle: u16) -> *mut core::ffi::c_void { windows_targets::link!("mapi32.dll" "system" fn FtgRegisterIdleRoutine(lpfnidle : PFNIDLE, lpvidleparam : *mut core::ffi::c_void, priidle : i16, csecidle : u32, iroidle : u16) -> *mut core::ffi::c_void); - unsafe { FtgRegisterIdleRoutine(lpfnidle, core::mem::transmute(lpvidleparam), priidle, csecidle, iroidle) } + unsafe { FtgRegisterIdleRoutine(lpfnidle, lpvidleparam as _, priidle, csecidle, iroidle) } } #[inline] pub unsafe fn HrAddColumns(lptbl: P0, lpproptagcolumnsnew: *mut SPropTagArray, lpallocatebuffer: LPALLOCATEBUFFER, lpfreebuffer: LPFREEBUFFER) -> windows_core::Result<()> @@ -110,7 +110,7 @@ where P0: windows_core::Param, { windows_targets::link!("mapi32.dll" "system" fn HrAddColumns(lptbl : * mut core::ffi::c_void, lpproptagcolumnsnew : *mut SPropTagArray, lpallocatebuffer : LPALLOCATEBUFFER, lpfreebuffer : LPFREEBUFFER) -> windows_core::HRESULT); - unsafe { HrAddColumns(lptbl.param().abi(), core::mem::transmute(lpproptagcolumnsnew), lpallocatebuffer, lpfreebuffer).ok() } + unsafe { HrAddColumns(lptbl.param().abi(), lpproptagcolumnsnew as _, lpallocatebuffer, lpfreebuffer).ok() } } #[inline] pub unsafe fn HrAddColumnsEx(lptbl: P0, lpproptagcolumnsnew: *mut SPropTagArray, lpallocatebuffer: LPALLOCATEBUFFER, lpfreebuffer: LPFREEBUFFER, lpfnfiltercolumns: isize) -> windows_core::Result<()> @@ -118,13 +118,13 @@ where P0: windows_core::Param, { windows_targets::link!("mapi32.dll" "system" fn HrAddColumnsEx(lptbl : * mut core::ffi::c_void, lpproptagcolumnsnew : *mut SPropTagArray, lpallocatebuffer : LPALLOCATEBUFFER, lpfreebuffer : LPFREEBUFFER, lpfnfiltercolumns : isize) -> windows_core::HRESULT); - unsafe { HrAddColumnsEx(lptbl.param().abi(), core::mem::transmute(lpproptagcolumnsnew), lpallocatebuffer, lpfreebuffer, lpfnfiltercolumns).ok() } + unsafe { HrAddColumnsEx(lptbl.param().abi(), lpproptagcolumnsnew as _, lpallocatebuffer, lpfreebuffer, lpfnfiltercolumns).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn HrAllocAdviseSink(lpfncallback: LPNOTIFCALLBACK, lpvcontext: *mut core::ffi::c_void, lppadvisesink: *mut Option) -> windows_core::Result<()> { windows_targets::link!("mapi32.dll" "system" fn HrAllocAdviseSink(lpfncallback : LPNOTIFCALLBACK, lpvcontext : *mut core::ffi::c_void, lppadvisesink : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { HrAllocAdviseSink(lpfncallback, core::mem::transmute(lpvcontext), core::mem::transmute(lppadvisesink)).ok() } + unsafe { HrAllocAdviseSink(lpfncallback, lpvcontext as _, core::mem::transmute(lppadvisesink)).ok() } } #[inline] pub unsafe fn HrDispatchNotifications(ulflags: u32) -> windows_core::Result<()> { @@ -138,7 +138,7 @@ where P0: windows_core::Param, { windows_targets::link!("mapi32.dll" "system" fn HrGetOneProp(lpmapiprop : * mut core::ffi::c_void, ulproptag : u32, lppprop : *mut *mut SPropValue) -> windows_core::HRESULT); - unsafe { HrGetOneProp(lpmapiprop.param().abi(), ulproptag, core::mem::transmute(lppprop)).ok() } + unsafe { HrGetOneProp(lpmapiprop.param().abi(), ulproptag, lppprop as _).ok() } } #[cfg(feature = "Win32_System_Com_StructuredStorage")] #[inline] @@ -147,7 +147,7 @@ where P0: windows_core::Param, { windows_targets::link!("mapi32.dll" "system" fn HrIStorageFromStream(lpunkin : * mut core::ffi::c_void, lpinterface : *mut windows_core::GUID, ulflags : u32, lppstorageout : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { HrIStorageFromStream(lpunkin.param().abi(), core::mem::transmute(lpinterface), ulflags, core::mem::transmute(lppstorageout)).ok() } + unsafe { HrIStorageFromStream(lpunkin.param().abi(), lpinterface as _, ulflags, core::mem::transmute(lppstorageout)).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -156,7 +156,7 @@ where P0: windows_core::Param, { windows_targets::link!("mapi32.dll" "system" fn HrQueryAllRows(lptable : * mut core::ffi::c_void, lpproptags : *mut SPropTagArray, lprestriction : *mut SRestriction, lpsortorderset : *mut SSortOrderSet, crowsmax : i32, lpprows : *mut *mut SRowSet) -> windows_core::HRESULT); - unsafe { HrQueryAllRows(lptable.param().abi(), core::mem::transmute(lpproptags), core::mem::transmute(lprestriction), core::mem::transmute(lpsortorderset), crowsmax, core::mem::transmute(lpprows)).ok() } + unsafe { HrQueryAllRows(lptable.param().abi(), lpproptags as _, lprestriction as _, lpsortorderset as _, crowsmax, lpprows as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -165,7 +165,7 @@ where P0: windows_core::Param, { windows_targets::link!("mapi32.dll" "system" fn HrSetOneProp(lpmapiprop : * mut core::ffi::c_void, lpprop : *mut SPropValue) -> windows_core::HRESULT); - unsafe { HrSetOneProp(lpmapiprop.param().abi(), core::mem::transmute(lpprop)).ok() } + unsafe { HrSetOneProp(lpmapiprop.param().abi(), lpprop as _).ok() } } #[inline] pub unsafe fn HrThisThreadAdviseSink(lpadvisesink: P0) -> windows_core::Result @@ -182,13 +182,13 @@ where #[inline] pub unsafe fn LPropCompareProp(lpspropvaluea: *mut SPropValue, lpspropvalueb: *mut SPropValue) -> i32 { windows_targets::link!("mapi32.dll" "system" fn LPropCompareProp(lpspropvaluea : *mut SPropValue, lpspropvalueb : *mut SPropValue) -> i32); - unsafe { LPropCompareProp(core::mem::transmute(lpspropvaluea), core::mem::transmute(lpspropvalueb)) } + unsafe { LPropCompareProp(lpspropvaluea as _, lpspropvalueb as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn LpValFindProp(ulproptag: u32, cvalues: u32, lpproparray: *mut SPropValue) -> *mut SPropValue { windows_targets::link!("mapi32.dll" "system" fn LpValFindProp(ulproptag : u32, cvalues : u32, lpproparray : *mut SPropValue) -> *mut SPropValue); - unsafe { LpValFindProp(ulproptag, cvalues, core::mem::transmute(lpproparray)) } + unsafe { LpValFindProp(ulproptag, cvalues, lpproparray as _) } } #[inline] pub unsafe fn MAPIDeinitIdle() { @@ -204,7 +204,7 @@ pub unsafe fn MAPIGetDefaultMalloc() -> Option { #[inline] pub unsafe fn MAPIInitIdle(lpvreserved: *mut core::ffi::c_void) -> i32 { windows_targets::link!("mapi32.dll" "system" fn MAPIInitIdle(lpvreserved : *mut core::ffi::c_void) -> i32); - unsafe { MAPIInitIdle(core::mem::transmute(lpvreserved)) } + unsafe { MAPIInitIdle(lpvreserved as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -212,20 +212,20 @@ pub unsafe fn OpenStreamOnFile(lpallocatebuffer: LPALLOCATEBUFFER, lpfreebuffer: 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); unsafe { let mut result__ = core::mem::zeroed(); - OpenStreamOnFile(lpallocatebuffer, lpfreebuffer, ulflags, lpszfilename, core::mem::transmute(lpszprefix.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + OpenStreamOnFile(lpallocatebuffer, lpfreebuffer, ulflags, lpszfilename, lpszprefix.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn PpropFindProp(lpproparray: *mut SPropValue, cvalues: u32, ulproptag: u32) -> *mut SPropValue { windows_targets::link!("mapi32.dll" "system" fn PpropFindProp(lpproparray : *mut SPropValue, cvalues : u32, ulproptag : u32) -> *mut SPropValue); - unsafe { PpropFindProp(core::mem::transmute(lpproparray), cvalues, ulproptag) } + unsafe { PpropFindProp(lpproparray as _, cvalues, ulproptag) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn PropCopyMore(lpspropvaluedest: *mut SPropValue, lpspropvaluesrc: *mut SPropValue, lpfallocmore: LPALLOCATEMORE, lpvobject: *mut core::ffi::c_void) -> i32 { windows_targets::link!("mapi32.dll" "system" fn PropCopyMore(lpspropvaluedest : *mut SPropValue, lpspropvaluesrc : *mut SPropValue, lpfallocmore : LPALLOCATEMORE, lpvobject : *mut core::ffi::c_void) -> i32); - unsafe { PropCopyMore(core::mem::transmute(lpspropvaluedest), core::mem::transmute(lpspropvaluesrc), lpfallocmore, core::mem::transmute(lpvobject)) } + unsafe { PropCopyMore(lpspropvaluedest as _, lpspropvaluesrc as _, lpfallocmore, lpvobject as _) } } #[inline] pub unsafe fn RTFSync(lpmessage: P0, ulflags: u32, lpfmessageupdated: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> @@ -233,42 +233,42 @@ where P0: windows_core::Param, { windows_targets::link!("mapi32.dll" "system" fn RTFSync(lpmessage : * mut core::ffi::c_void, ulflags : u32, lpfmessageupdated : *mut super::super::Foundation:: BOOL) -> windows_core::HRESULT); - unsafe { RTFSync(lpmessage.param().abi(), ulflags, core::mem::transmute(lpfmessageupdated)).ok() } + unsafe { RTFSync(lpmessage.param().abi(), ulflags, lpfmessageupdated as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn ScCopyNotifications(cnotification: i32, lpnotifications: *mut NOTIFICATION, lpvdst: *mut core::ffi::c_void, lpcb: *mut u32) -> i32 { windows_targets::link!("mapi32.dll" "system" fn ScCopyNotifications(cnotification : i32, lpnotifications : *mut NOTIFICATION, lpvdst : *mut core::ffi::c_void, lpcb : *mut u32) -> i32); - unsafe { ScCopyNotifications(cnotification, core::mem::transmute(lpnotifications), core::mem::transmute(lpvdst), core::mem::transmute(lpcb)) } + unsafe { ScCopyNotifications(cnotification, lpnotifications as _, lpvdst as _, lpcb as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn ScCopyProps(cvalues: i32, lpproparray: *mut SPropValue, lpvdst: *mut core::ffi::c_void, lpcb: *mut u32) -> i32 { windows_targets::link!("mapi32.dll" "system" fn ScCopyProps(cvalues : i32, lpproparray : *mut SPropValue, lpvdst : *mut core::ffi::c_void, lpcb : *mut u32) -> i32); - unsafe { ScCopyProps(cvalues, core::mem::transmute(lpproparray), core::mem::transmute(lpvdst), core::mem::transmute(lpcb)) } + unsafe { ScCopyProps(cvalues, lpproparray as _, lpvdst as _, lpcb as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn ScCountNotifications(cnotifications: i32, lpnotifications: *mut NOTIFICATION, lpcb: *mut u32) -> i32 { windows_targets::link!("mapi32.dll" "system" fn ScCountNotifications(cnotifications : i32, lpnotifications : *mut NOTIFICATION, lpcb : *mut u32) -> i32); - unsafe { ScCountNotifications(cnotifications, core::mem::transmute(lpnotifications), core::mem::transmute(lpcb)) } + unsafe { ScCountNotifications(cnotifications, lpnotifications as _, lpcb as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn ScCountProps(cvalues: i32, lpproparray: *mut SPropValue, lpcb: *mut u32) -> i32 { windows_targets::link!("mapi32.dll" "system" fn ScCountProps(cvalues : i32, lpproparray : *mut SPropValue, lpcb : *mut u32) -> i32); - unsafe { ScCountProps(cvalues, core::mem::transmute(lpproparray), core::mem::transmute(lpcb)) } + unsafe { ScCountProps(cvalues, lpproparray as _, lpcb as _) } } #[inline] pub unsafe fn ScCreateConversationIndex(cbparent: u32, lpbparent: *mut u8, lpcbconvindex: *mut u32, lppbconvindex: *mut *mut u8) -> i32 { windows_targets::link!("mapi32.dll" "system" fn ScCreateConversationIndex(cbparent : u32, lpbparent : *mut u8, lpcbconvindex : *mut u32, lppbconvindex : *mut *mut u8) -> i32); - unsafe { ScCreateConversationIndex(cbparent, core::mem::transmute(lpbparent), core::mem::transmute(lpcbconvindex), core::mem::transmute(lppbconvindex)) } + unsafe { ScCreateConversationIndex(cbparent, lpbparent as _, lpcbconvindex as _, lppbconvindex as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn ScDupPropset(cvalues: i32, lpproparray: *mut SPropValue, lpallocatebuffer: LPALLOCATEBUFFER, lppproparray: *mut *mut SPropValue) -> i32 { windows_targets::link!("mapi32.dll" "system" fn ScDupPropset(cvalues : i32, lpproparray : *mut SPropValue, lpallocatebuffer : LPALLOCATEBUFFER, lppproparray : *mut *mut SPropValue) -> i32); - unsafe { ScDupPropset(cvalues, core::mem::transmute(lpproparray), lpallocatebuffer, core::mem::transmute(lppproparray)) } + unsafe { ScDupPropset(cvalues, lpproparray as _, lpallocatebuffer, lppproparray as _) } } #[inline] pub unsafe fn ScInitMapiUtil(ulflags: u32) -> i32 { @@ -287,13 +287,13 @@ where #[inline] pub unsafe fn ScRelocNotifications(cnotification: i32, lpnotifications: *mut NOTIFICATION, lpvbaseold: *mut core::ffi::c_void, lpvbasenew: *mut core::ffi::c_void, lpcb: *mut u32) -> i32 { windows_targets::link!("mapi32.dll" "system" fn ScRelocNotifications(cnotification : i32, lpnotifications : *mut NOTIFICATION, lpvbaseold : *mut core::ffi::c_void, lpvbasenew : *mut core::ffi::c_void, lpcb : *mut u32) -> i32); - unsafe { ScRelocNotifications(cnotification, core::mem::transmute(lpnotifications), core::mem::transmute(lpvbaseold), core::mem::transmute(lpvbasenew), core::mem::transmute(lpcb)) } + unsafe { ScRelocNotifications(cnotification, lpnotifications as _, lpvbaseold as _, lpvbasenew as _, lpcb as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn ScRelocProps(cvalues: i32, lpproparray: *mut SPropValue, lpvbaseold: *mut core::ffi::c_void, lpvbasenew: *mut core::ffi::c_void, lpcb: *mut u32) -> i32 { windows_targets::link!("mapi32.dll" "system" fn ScRelocProps(cvalues : i32, lpproparray : *mut SPropValue, lpvbaseold : *mut core::ffi::c_void, lpvbasenew : *mut core::ffi::c_void, lpcb : *mut u32) -> i32); - unsafe { ScRelocProps(cvalues, core::mem::transmute(lpproparray), core::mem::transmute(lpvbaseold), core::mem::transmute(lpvbasenew), core::mem::transmute(lpcb)) } + unsafe { ScRelocProps(cvalues, lpproparray as _, lpvbaseold as _, lpvbasenew as _, lpcb as _) } } #[inline] pub unsafe fn ScUNCFromLocalPath(lpszlocal: P0, lpszunc: &[u8]) -> i32 @@ -306,38 +306,38 @@ where #[inline] pub unsafe fn SzFindCh(lpsz: *mut i8, ch: u16) -> *mut i8 { windows_targets::link!("mapi32.dll" "system" fn SzFindCh(lpsz : *mut i8, ch : u16) -> *mut i8); - unsafe { SzFindCh(core::mem::transmute(lpsz), ch) } + unsafe { SzFindCh(lpsz as _, ch) } } #[inline] pub unsafe fn SzFindLastCh(lpsz: *mut i8, ch: u16) -> *mut i8 { windows_targets::link!("mapi32.dll" "system" fn SzFindLastCh(lpsz : *mut i8, ch : u16) -> *mut i8); - unsafe { SzFindLastCh(core::mem::transmute(lpsz), ch) } + unsafe { SzFindLastCh(lpsz as _, ch) } } #[inline] pub unsafe fn SzFindSz(lpsz: *mut i8, lpszkey: *mut i8) -> *mut i8 { windows_targets::link!("mapi32.dll" "system" fn SzFindSz(lpsz : *mut i8, lpszkey : *mut i8) -> *mut i8); - unsafe { SzFindSz(core::mem::transmute(lpsz), core::mem::transmute(lpszkey)) } + unsafe { SzFindSz(lpsz as _, lpszkey as _) } } #[inline] pub unsafe fn UFromSz(lpsz: *mut i8) -> u32 { windows_targets::link!("mapi32.dll" "system" fn UFromSz(lpsz : *mut i8) -> u32); - unsafe { UFromSz(core::mem::transmute(lpsz)) } + unsafe { UFromSz(lpsz as _) } } #[inline] pub unsafe fn UlAddRef(lpunk: *mut core::ffi::c_void) -> u32 { windows_targets::link!("mapi32.dll" "system" fn UlAddRef(lpunk : *mut core::ffi::c_void) -> u32); - unsafe { UlAddRef(core::mem::transmute(lpunk)) } + unsafe { UlAddRef(lpunk as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn UlPropSize(lpspropvalue: *mut SPropValue) -> u32 { windows_targets::link!("mapi32.dll" "system" fn UlPropSize(lpspropvalue : *mut SPropValue) -> u32); - unsafe { UlPropSize(core::mem::transmute(lpspropvalue)) } + unsafe { UlPropSize(lpspropvalue as _) } } #[inline] pub unsafe fn UlRelease(lpunk: *mut core::ffi::c_void) -> u32 { windows_targets::link!("mapi32.dll" "system" fn UlRelease(lpunk : *mut core::ffi::c_void) -> u32); - unsafe { UlRelease(core::mem::transmute(lpunk)) } + unsafe { UlRelease(lpunk as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -354,7 +354,7 @@ where #[inline] pub unsafe fn WrapStoreEntryID(ulflags: u32, lpszdllname: *const i8, cborigentry: u32, lporigentry: *const ENTRYID, lpcbwrappedentry: *mut u32, lppwrappedentry: *mut *mut ENTRYID) -> windows_core::Result<()> { windows_targets::link!("mapi32.dll" "system" fn WrapStoreEntryID(ulflags : u32, lpszdllname : *const i8, cborigentry : u32, lporigentry : *const ENTRYID, lpcbwrappedentry : *mut u32, lppwrappedentry : *mut *mut ENTRYID) -> windows_core::HRESULT); - unsafe { WrapStoreEntryID(ulflags, lpszdllname, cborigentry, lporigentry, core::mem::transmute(lpcbwrappedentry), core::mem::transmute(lppwrappedentry)).ok() } + unsafe { WrapStoreEntryID(ulflags, lpszdllname, cborigentry, lporigentry, lpcbwrappedentry as _, lppwrappedentry as _).ok() } } #[repr(C)] #[cfg(feature = "Win32_System_Com")] @@ -812,7 +812,7 @@ impl IABContainer { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CopyEntries)(windows_core::Interface::as_raw(self), lpentries, core::mem::transmute(uluiparam.unwrap_or(core::mem::zeroed())), lpprogress.param().abi(), ulflags).ok() } + unsafe { (windows_core::Interface::vtable(self).CopyEntries)(windows_core::Interface::as_raw(self), lpentries, uluiparam.unwrap_or(core::mem::zeroed()) as _, lpprogress.param().abi(), ulflags).ok() } } pub unsafe fn DeleteEntries(&self, lpentries: *const SBinaryArray, ulflags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DeleteEntries)(windows_core::Interface::as_raw(self), lpentries, ulflags).ok() } @@ -821,7 +821,7 @@ impl IABContainer { pub unsafe fn ResolveNames(&self, lpproptagarray: Option<*const SPropTagArray>, ulflags: u32, lpadrlist: *const ADRLIST) -> windows_core::Result { unsafe { 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::mem::zeroed())), ulflags, lpadrlist, &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).ResolveNames)(windows_core::Interface::as_raw(self), lpproptagarray.unwrap_or(core::mem::zeroed()) as _, ulflags, lpadrlist, &mut result__).map(|| result__) } } } @@ -906,68 +906,68 @@ impl core::ops::Deref for IAddrBook { windows_core::imp::interface_hierarchy!(IAddrBook, windows_core::IUnknown, IMAPIProp); impl IAddrBook { pub unsafe fn OpenEntry(&self, cbentryid: u32, lpentryid: *mut ENTRYID, lpinterface: *mut windows_core::GUID, ulflags: u32, lpulobjtype: *mut u32, lppunk: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OpenEntry)(windows_core::Interface::as_raw(self), cbentryid, core::mem::transmute(lpentryid), core::mem::transmute(lpinterface), ulflags, core::mem::transmute(lpulobjtype), core::mem::transmute(lppunk)).ok() } + unsafe { (windows_core::Interface::vtable(self).OpenEntry)(windows_core::Interface::as_raw(self), cbentryid, lpentryid as _, lpinterface as _, ulflags, lpulobjtype as _, core::mem::transmute(lppunk)).ok() } } pub unsafe fn CompareEntryIDs(&self, cbentryid1: u32, lpentryid1: *mut ENTRYID, cbentryid2: u32, lpentryid2: *mut ENTRYID, ulflags: u32, lpulresult: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CompareEntryIDs)(windows_core::Interface::as_raw(self), cbentryid1, core::mem::transmute(lpentryid1), cbentryid2, core::mem::transmute(lpentryid2), ulflags, core::mem::transmute(lpulresult)).ok() } + unsafe { (windows_core::Interface::vtable(self).CompareEntryIDs)(windows_core::Interface::as_raw(self), cbentryid1, lpentryid1 as _, cbentryid2, lpentryid2 as _, ulflags, lpulresult as _).ok() } } pub unsafe fn Advise(&self, cbentryid: u32, lpentryid: *mut ENTRYID, uleventmask: u32, lpadvisesink: P3, lpulconnection: *mut u32) -> windows_core::Result<()> where P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Advise)(windows_core::Interface::as_raw(self), cbentryid, core::mem::transmute(lpentryid), uleventmask, lpadvisesink.param().abi(), core::mem::transmute(lpulconnection)).ok() } + unsafe { (windows_core::Interface::vtable(self).Advise)(windows_core::Interface::as_raw(self), cbentryid, lpentryid as _, uleventmask, lpadvisesink.param().abi(), lpulconnection as _).ok() } } pub unsafe fn Unadvise(&self, ulconnection: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Unadvise)(windows_core::Interface::as_raw(self), ulconnection).ok() } } pub unsafe fn CreateOneOff(&self, lpszname: *mut i8, lpszadrtype: *mut i8, lpszaddress: *mut i8, ulflags: u32, lpcbentryid: *mut u32, lppentryid: *mut *mut ENTRYID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateOneOff)(windows_core::Interface::as_raw(self), core::mem::transmute(lpszname), core::mem::transmute(lpszadrtype), core::mem::transmute(lpszaddress), ulflags, core::mem::transmute(lpcbentryid), core::mem::transmute(lppentryid)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateOneOff)(windows_core::Interface::as_raw(self), lpszname as _, lpszadrtype as _, lpszaddress as _, ulflags, lpcbentryid as _, lppentryid as _).ok() } } pub unsafe fn NewEntry(&self, uluiparam: u32, ulflags: u32, cbeidcontainer: u32, lpeidcontainer: *mut ENTRYID, cbeidnewentrytpl: u32, lpeidnewentrytpl: *mut ENTRYID, lpcbeidnewentry: *mut u32, lppeidnewentry: *mut *mut ENTRYID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).NewEntry)(windows_core::Interface::as_raw(self), uluiparam, ulflags, cbeidcontainer, core::mem::transmute(lpeidcontainer), cbeidnewentrytpl, core::mem::transmute(lpeidnewentrytpl), core::mem::transmute(lpcbeidnewentry), core::mem::transmute(lppeidnewentry)).ok() } + unsafe { (windows_core::Interface::vtable(self).NewEntry)(windows_core::Interface::as_raw(self), uluiparam, ulflags, cbeidcontainer, lpeidcontainer as _, cbeidnewentrytpl, lpeidnewentrytpl as _, lpcbeidnewentry as _, lppeidnewentry as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn ResolveName(&self, uluiparam: usize, ulflags: u32, lpsznewentrytitle: *mut i8, lpadrlist: *mut ADRLIST) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ResolveName)(windows_core::Interface::as_raw(self), uluiparam, ulflags, core::mem::transmute(lpsznewentrytitle), core::mem::transmute(lpadrlist)).ok() } + unsafe { (windows_core::Interface::vtable(self).ResolveName)(windows_core::Interface::as_raw(self), uluiparam, ulflags, lpsznewentrytitle as _, lpadrlist as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Address(&self, lpuluiparam: *mut u32, lpadrparms: *mut ADRPARM, lppadrlist: *mut *mut ADRLIST) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Address)(windows_core::Interface::as_raw(self), core::mem::transmute(lpuluiparam), core::mem::transmute(lpadrparms), core::mem::transmute(lppadrlist)).ok() } + unsafe { (windows_core::Interface::vtable(self).Address)(windows_core::Interface::as_raw(self), lpuluiparam as _, lpadrparms as _, lppadrlist as _).ok() } } pub unsafe fn Details(&self, lpuluiparam: *mut usize, lpfndismiss: LPFNDISMISS, lpvdismisscontext: *mut core::ffi::c_void, cbentryid: u32, lpentryid: *mut ENTRYID, lpfbuttoncallback: LPFNBUTTON, lpvbuttoncontext: *mut core::ffi::c_void, lpszbuttontext: *mut i8, ulflags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Details)(windows_core::Interface::as_raw(self), core::mem::transmute(lpuluiparam), lpfndismiss, core::mem::transmute(lpvdismisscontext), cbentryid, core::mem::transmute(lpentryid), lpfbuttoncallback, core::mem::transmute(lpvbuttoncontext), core::mem::transmute(lpszbuttontext), ulflags).ok() } + unsafe { (windows_core::Interface::vtable(self).Details)(windows_core::Interface::as_raw(self), lpuluiparam as _, lpfndismiss, lpvdismisscontext as _, cbentryid, lpentryid as _, lpfbuttoncallback, lpvbuttoncontext as _, lpszbuttontext as _, ulflags).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn RecipOptions(&self, uluiparam: u32, ulflags: u32, lprecip: *mut ADRENTRY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RecipOptions)(windows_core::Interface::as_raw(self), uluiparam, ulflags, core::mem::transmute(lprecip)).ok() } + unsafe { (windows_core::Interface::vtable(self).RecipOptions)(windows_core::Interface::as_raw(self), uluiparam, ulflags, lprecip as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn QueryDefaultRecipOpt(&self, lpszadrtype: *mut i8, ulflags: u32, lpcvalues: *mut u32, lppoptions: *mut *mut SPropValue) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryDefaultRecipOpt)(windows_core::Interface::as_raw(self), core::mem::transmute(lpszadrtype), ulflags, core::mem::transmute(lpcvalues), core::mem::transmute(lppoptions)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryDefaultRecipOpt)(windows_core::Interface::as_raw(self), lpszadrtype as _, ulflags, lpcvalues as _, lppoptions as _).ok() } } pub unsafe fn GetPAB(&self, lpcbentryid: *mut u32, lppentryid: *mut *mut ENTRYID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPAB)(windows_core::Interface::as_raw(self), core::mem::transmute(lpcbentryid), core::mem::transmute(lppentryid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPAB)(windows_core::Interface::as_raw(self), lpcbentryid as _, lppentryid as _).ok() } } pub unsafe fn SetPAB(&self, cbentryid: u32, lpentryid: *mut ENTRYID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetPAB)(windows_core::Interface::as_raw(self), cbentryid, core::mem::transmute(lpentryid)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetPAB)(windows_core::Interface::as_raw(self), cbentryid, lpentryid as _).ok() } } pub unsafe fn GetDefaultDir(&self, lpcbentryid: *mut u32, lppentryid: *mut *mut ENTRYID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDefaultDir)(windows_core::Interface::as_raw(self), core::mem::transmute(lpcbentryid), core::mem::transmute(lppentryid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDefaultDir)(windows_core::Interface::as_raw(self), lpcbentryid as _, lppentryid as _).ok() } } pub unsafe fn SetDefaultDir(&self, cbentryid: u32, lpentryid: *mut ENTRYID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetDefaultDir)(windows_core::Interface::as_raw(self), cbentryid, core::mem::transmute(lpentryid)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetDefaultDir)(windows_core::Interface::as_raw(self), cbentryid, lpentryid as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetSearchPath(&self, ulflags: u32, lppsearchpath: *mut *mut SRowSet) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSearchPath)(windows_core::Interface::as_raw(self), ulflags, core::mem::transmute(lppsearchpath)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSearchPath)(windows_core::Interface::as_raw(self), ulflags, lppsearchpath as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn SetSearchPath(&self, ulflags: u32, lpsearchpath: *mut SRowSet) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetSearchPath)(windows_core::Interface::as_raw(self), ulflags, core::mem::transmute(lpsearchpath)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetSearchPath)(windows_core::Interface::as_raw(self), ulflags, lpsearchpath as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn PrepareRecips(&self, ulflags: u32, lpproptagarray: *mut SPropTagArray, lpreciplist: *mut ADRLIST) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).PrepareRecips)(windows_core::Interface::as_raw(self), ulflags, core::mem::transmute(lpproptagarray), core::mem::transmute(lpreciplist)).ok() } + unsafe { (windows_core::Interface::vtable(self).PrepareRecips)(windows_core::Interface::as_raw(self), ulflags, lpproptagarray as _, lpreciplist as _).ok() } } } #[repr(C)] @@ -1217,7 +1217,7 @@ impl IDistList { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CopyEntries)(windows_core::Interface::as_raw(self), lpentries, core::mem::transmute(uluiparam.unwrap_or(core::mem::zeroed())), lpprogress.param().abi(), ulflags).ok() } + unsafe { (windows_core::Interface::vtable(self).CopyEntries)(windows_core::Interface::as_raw(self), lpentries, uluiparam.unwrap_or(core::mem::zeroed()) as _, lpprogress.param().abi(), ulflags).ok() } } pub unsafe fn DeleteEntries(&self, lpentries: *const SBinaryArray, ulflags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DeleteEntries)(windows_core::Interface::as_raw(self), lpentries, ulflags).ok() } @@ -1226,7 +1226,7 @@ impl IDistList { pub unsafe fn ResolveNames(&self, lpproptagarray: Option<*const SPropTagArray>, ulflags: u32, lpadrlist: *const ADRLIST) -> windows_core::Result { unsafe { 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::mem::zeroed())), ulflags, lpadrlist, &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).ResolveNames)(windows_core::Interface::as_raw(self), lpproptagarray.unwrap_or(core::mem::zeroed()) as _, ulflags, lpadrlist, &mut result__).map(|| result__) } } } @@ -1306,7 +1306,7 @@ windows_core::imp::interface_hierarchy!(IMAPIAdviseSink, windows_core::IUnknown) impl IMAPIAdviseSink { #[cfg(feature = "Win32_System_Com")] pub unsafe fn OnNotify(&self, cnotif: u32, lpnotifications: *mut NOTIFICATION) -> u32 { - unsafe { (windows_core::Interface::vtable(self).OnNotify)(windows_core::Interface::as_raw(self), cnotif, core::mem::transmute(lpnotifications)) } + unsafe { (windows_core::Interface::vtable(self).OnNotify)(windows_core::Interface::as_raw(self), cnotif, lpnotifications as _) } } } #[repr(C)] @@ -1360,15 +1360,15 @@ impl IMAPIContainer { } } pub unsafe fn OpenEntry(&self, cbentryid: u32, lpentryid: *const ENTRYID, lpinterface: *mut windows_core::GUID, ulflags: u32, lpulobjtype: *mut u32, lppunk: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OpenEntry)(windows_core::Interface::as_raw(self), cbentryid, lpentryid, core::mem::transmute(lpinterface), ulflags, core::mem::transmute(lpulobjtype), core::mem::transmute(lppunk)).ok() } + unsafe { (windows_core::Interface::vtable(self).OpenEntry)(windows_core::Interface::as_raw(self), cbentryid, lpentryid, lpinterface as _, ulflags, lpulobjtype as _, core::mem::transmute(lppunk)).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn SetSearchCriteria(&self, lprestriction: Option<*const SRestriction>, lpcontainerlist: Option<*const SBinaryArray>, ulsearchflags: u32) -> windows_core::Result<()> { - unsafe { (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())), ulsearchflags).ok() } + unsafe { (windows_core::Interface::vtable(self).SetSearchCriteria)(windows_core::Interface::as_raw(self), lprestriction.unwrap_or(core::mem::zeroed()) as _, lpcontainerlist.unwrap_or(core::mem::zeroed()) as _, 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetSearchCriteria)(windows_core::Interface::as_raw(self), ulflags, core::mem::transmute(lpprestriction), core::mem::transmute(lppcontainerlist), core::mem::transmute(lpulsearchstate.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSearchCriteria)(windows_core::Interface::as_raw(self), ulflags, lpprestriction as _, lppcontainerlist as _, lpulsearchstate.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -1464,10 +1464,10 @@ impl IMAPIControl { } } pub unsafe fn Activate(&self, ulflags: u32, uluiparam: Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), ulflags, core::mem::transmute(uluiparam.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), ulflags, uluiparam.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetState(&self, ulflags: u32, lpulstate: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetState)(windows_core::Interface::as_raw(self), ulflags, core::mem::transmute(lpulstate)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetState)(windows_core::Interface::as_raw(self), ulflags, lpulstate as _).ok() } } } #[repr(C)] @@ -1530,43 +1530,43 @@ impl core::ops::Deref for IMAPIFolder { windows_core::imp::interface_hierarchy!(IMAPIFolder, windows_core::IUnknown, IMAPIProp, IMAPIContainer); impl IMAPIFolder { pub unsafe fn CreateMessage(&self, lpinterface: *mut windows_core::GUID, ulflags: u32, lppmessage: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(lpinterface), ulflags, core::mem::transmute(lppmessage)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateMessage)(windows_core::Interface::as_raw(self), lpinterface as _, 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: Option, lpprogress: P4, ulflags: u32) -> windows_core::Result<()> where P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CopyMessages)(windows_core::Interface::as_raw(self), lpmsglist, core::mem::transmute(lpinterface.unwrap_or(core::mem::zeroed())), lpdestfolder, core::mem::transmute(uluiparam.unwrap_or(core::mem::zeroed())), lpprogress.param().abi(), ulflags).ok() } + unsafe { (windows_core::Interface::vtable(self).CopyMessages)(windows_core::Interface::as_raw(self), lpmsglist, lpinterface.unwrap_or(core::mem::zeroed()) as _, lpdestfolder, uluiparam.unwrap_or(core::mem::zeroed()) as _, lpprogress.param().abi(), ulflags).ok() } } pub unsafe fn DeleteMessages(&self, lpmsglist: *const SBinaryArray, uluiparam: Option, lpprogress: P2, ulflags: u32) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DeleteMessages)(windows_core::Interface::as_raw(self), lpmsglist, core::mem::transmute(uluiparam.unwrap_or(core::mem::zeroed())), lpprogress.param().abi(), ulflags).ok() } + unsafe { (windows_core::Interface::vtable(self).DeleteMessages)(windows_core::Interface::as_raw(self), lpmsglist, uluiparam.unwrap_or(core::mem::zeroed()) as _, lpprogress.param().abi(), 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 { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateFolder)(windows_core::Interface::as_raw(self), ulfoldertype, lpszfoldername, core::mem::transmute(lpszfoldercomment.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpinterface.unwrap_or(core::mem::zeroed())), ulflags, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateFolder)(windows_core::Interface::as_raw(self), ulfoldertype, lpszfoldername, lpszfoldercomment.unwrap_or(core::mem::zeroed()) as _, lpinterface.unwrap_or(core::mem::zeroed()) as _, 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: Option, lpprogress: P6, ulflags: u32) -> windows_core::Result<()> where P6: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CopyFolder)(windows_core::Interface::as_raw(self), cbentryid, lpentryid, core::mem::transmute(lpinterface.unwrap_or(core::mem::zeroed())), lpdestfolder, lpsznewfoldername, core::mem::transmute(uluiparam.unwrap_or(core::mem::zeroed())), lpprogress.param().abi(), ulflags).ok() } + unsafe { (windows_core::Interface::vtable(self).CopyFolder)(windows_core::Interface::as_raw(self), cbentryid, lpentryid, lpinterface.unwrap_or(core::mem::zeroed()) as _, lpdestfolder, lpsznewfoldername, uluiparam.unwrap_or(core::mem::zeroed()) as _, lpprogress.param().abi(), ulflags).ok() } } pub unsafe fn DeleteFolder(&self, cbentryid: u32, lpentryid: *const ENTRYID, uluiparam: Option, lpprogress: P3, ulflags: u32) -> windows_core::Result<()> where P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DeleteFolder)(windows_core::Interface::as_raw(self), cbentryid, lpentryid, core::mem::transmute(uluiparam.unwrap_or(core::mem::zeroed())), lpprogress.param().abi(), ulflags).ok() } + unsafe { (windows_core::Interface::vtable(self).DeleteFolder)(windows_core::Interface::as_raw(self), cbentryid, lpentryid, uluiparam.unwrap_or(core::mem::zeroed()) as _, lpprogress.param().abi(), ulflags).ok() } } pub unsafe fn SetReadFlags(&self, lpmsglist: *const SBinaryArray, uluiparam: Option, lpprogress: P2, ulflags: u32) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SetReadFlags)(windows_core::Interface::as_raw(self), lpmsglist, core::mem::transmute(uluiparam.unwrap_or(core::mem::zeroed())), lpprogress.param().abi(), ulflags).ok() } + unsafe { (windows_core::Interface::vtable(self).SetReadFlags)(windows_core::Interface::as_raw(self), lpmsglist, uluiparam.unwrap_or(core::mem::zeroed()) as _, lpprogress.param().abi(), ulflags).ok() } } pub unsafe fn GetMessageStatus(&self, cbentryid: u32, lpentryid: *const ENTRYID, ulflags: u32) -> windows_core::Result { unsafe { @@ -1587,7 +1587,7 @@ impl IMAPIFolder { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EmptyFolder)(windows_core::Interface::as_raw(self), core::mem::transmute(uluiparam.unwrap_or(core::mem::zeroed())), lpprogress.param().abi(), ulflags).ok() } + unsafe { (windows_core::Interface::vtable(self).EmptyFolder)(windows_core::Interface::as_raw(self), uluiparam.unwrap_or(core::mem::zeroed()) as _, lpprogress.param().abi(), ulflags).ok() } } } #[repr(C)] @@ -1734,16 +1734,16 @@ impl IMAPIProgress { unsafe { (windows_core::Interface::vtable(self).Progress)(windows_core::Interface::as_raw(self), ulvalue, ulcount, ultotal).ok() } } pub unsafe fn GetFlags(&self, lpulflags: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(lpulflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFlags)(windows_core::Interface::as_raw(self), lpulflags as _).ok() } } pub unsafe fn GetMax(&self, lpulmax: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMax)(windows_core::Interface::as_raw(self), core::mem::transmute(lpulmax)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMax)(windows_core::Interface::as_raw(self), lpulmax as _).ok() } } pub unsafe fn GetMin(&self, lpulmin: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMin)(windows_core::Interface::as_raw(self), core::mem::transmute(lpulmin)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMin)(windows_core::Interface::as_raw(self), lpulmin as _).ok() } } pub unsafe fn SetLimits(&self, lpulmin: *mut u32, lpulmax: *mut u32, lpulflags: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetLimits)(windows_core::Interface::as_raw(self), core::mem::transmute(lpulmin), core::mem::transmute(lpulmax), core::mem::transmute(lpulflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetLimits)(windows_core::Interface::as_raw(self), lpulmin as _, lpulmax as _, lpulflags as _).ok() } } } #[repr(C)] @@ -1812,45 +1812,45 @@ windows_core::imp::define_interface!(IMAPIProp, IMAPIProp_Vtbl, 0); windows_core::imp::interface_hierarchy!(IMAPIProp, windows_core::IUnknown); impl IMAPIProp { pub unsafe fn GetLastError(&self, hresult: windows_core::HRESULT, ulflags: u32, lppmapierror: *mut *mut MAPIERROR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLastError)(windows_core::Interface::as_raw(self), hresult, ulflags, core::mem::transmute(lppmapierror)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLastError)(windows_core::Interface::as_raw(self), hresult, ulflags, lppmapierror as _).ok() } } pub unsafe fn SaveChanges(&self, ulflags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SaveChanges)(windows_core::Interface::as_raw(self), ulflags).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetProps(&self, lpproptagarray: *mut SPropTagArray, ulflags: u32, lpcvalues: *mut u32, lppproparray: *mut *mut SPropValue) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProps)(windows_core::Interface::as_raw(self), core::mem::transmute(lpproptagarray), ulflags, core::mem::transmute(lpcvalues), core::mem::transmute(lppproparray)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProps)(windows_core::Interface::as_raw(self), lpproptagarray as _, ulflags, lpcvalues as _, lppproparray as _).ok() } } pub unsafe fn GetPropList(&self, ulflags: u32, lppproptagarray: *mut *mut SPropTagArray) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPropList)(windows_core::Interface::as_raw(self), ulflags, core::mem::transmute(lppproptagarray)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropList)(windows_core::Interface::as_raw(self), ulflags, lppproptagarray as _).ok() } } pub unsafe fn OpenProperty(&self, ulproptag: u32, lpiid: *mut windows_core::GUID, ulinterfaceoptions: u32, ulflags: u32, lppunk: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OpenProperty)(windows_core::Interface::as_raw(self), ulproptag, core::mem::transmute(lpiid), ulinterfaceoptions, ulflags, core::mem::transmute(lppunk)).ok() } + unsafe { (windows_core::Interface::vtable(self).OpenProperty)(windows_core::Interface::as_raw(self), ulproptag, lpiid as _, ulinterfaceoptions, ulflags, core::mem::transmute(lppunk)).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn SetProps(&self, cvalues: u32, lpproparray: *mut SPropValue, lppproblems: *mut *mut SPropProblemArray) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetProps)(windows_core::Interface::as_raw(self), cvalues, core::mem::transmute(lpproparray), core::mem::transmute(lppproblems)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetProps)(windows_core::Interface::as_raw(self), cvalues, lpproparray as _, lppproblems as _).ok() } } pub unsafe fn DeleteProps(&self, lpproptagarray: *mut SPropTagArray, lppproblems: *mut *mut SPropProblemArray) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DeleteProps)(windows_core::Interface::as_raw(self), core::mem::transmute(lpproptagarray), core::mem::transmute(lppproblems)).ok() } + unsafe { (windows_core::Interface::vtable(self).DeleteProps)(windows_core::Interface::as_raw(self), lpproptagarray as _, lppproblems as _).ok() } } pub unsafe fn CopyTo(&self, ciidexclude: u32, rgiidexclude: *mut windows_core::GUID, lpexcludeprops: *mut SPropTagArray, uluiparam: usize, lpprogress: P4, lpinterface: *mut windows_core::GUID, lpdestobj: *mut core::ffi::c_void, ulflags: u32, lppproblems: *mut *mut SPropProblemArray) -> windows_core::Result<()> where P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CopyTo)(windows_core::Interface::as_raw(self), ciidexclude, core::mem::transmute(rgiidexclude), core::mem::transmute(lpexcludeprops), uluiparam, lpprogress.param().abi(), core::mem::transmute(lpinterface), core::mem::transmute(lpdestobj), ulflags, core::mem::transmute(lppproblems)).ok() } + unsafe { (windows_core::Interface::vtable(self).CopyTo)(windows_core::Interface::as_raw(self), ciidexclude, rgiidexclude as _, lpexcludeprops as _, uluiparam, lpprogress.param().abi(), lpinterface as _, lpdestobj as _, ulflags, lppproblems as _).ok() } } pub unsafe fn CopyProps(&self, lpincludeprops: *mut SPropTagArray, uluiparam: usize, lpprogress: P2, lpinterface: *mut windows_core::GUID, lpdestobj: *mut core::ffi::c_void, ulflags: u32, lppproblems: *mut *mut SPropProblemArray) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CopyProps)(windows_core::Interface::as_raw(self), core::mem::transmute(lpincludeprops), uluiparam, lpprogress.param().abi(), core::mem::transmute(lpinterface), core::mem::transmute(lpdestobj), ulflags, core::mem::transmute(lppproblems)).ok() } + unsafe { (windows_core::Interface::vtable(self).CopyProps)(windows_core::Interface::as_raw(self), lpincludeprops as _, uluiparam, lpprogress.param().abi(), lpinterface as _, lpdestobj as _, ulflags, lppproblems as _).ok() } } pub unsafe fn GetNamesFromIDs(&self, lppproptags: *mut *mut SPropTagArray, lppropsetguid: *mut windows_core::GUID, ulflags: u32, lpcpropnames: *mut u32, lppppropnames: *mut *mut *mut MAPINAMEID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNamesFromIDs)(windows_core::Interface::as_raw(self), core::mem::transmute(lppproptags), core::mem::transmute(lppropsetguid), ulflags, core::mem::transmute(lpcpropnames), core::mem::transmute(lppppropnames)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNamesFromIDs)(windows_core::Interface::as_raw(self), lppproptags as _, lppropsetguid as _, ulflags, lpcpropnames as _, lppppropnames as _).ok() } } pub unsafe fn GetIDsFromNames(&self, cpropnames: u32, lpppropnames: *mut *mut MAPINAMEID, ulflags: u32, lppproptags: *mut *mut SPropTagArray) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIDsFromNames)(windows_core::Interface::as_raw(self), cpropnames, core::mem::transmute(lpppropnames), ulflags, core::mem::transmute(lppproptags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIDsFromNames)(windows_core::Interface::as_raw(self), cpropnames, lpppropnames as _, ulflags, lppproptags as _).ok() } } } #[repr(C)] @@ -1988,16 +1988,16 @@ impl core::ops::Deref for IMAPIStatus { windows_core::imp::interface_hierarchy!(IMAPIStatus, windows_core::IUnknown, IMAPIProp); impl IMAPIStatus { pub unsafe fn ValidateState(&self, uluiparam: Option, ulflags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ValidateState)(windows_core::Interface::as_raw(self), core::mem::transmute(uluiparam.unwrap_or(core::mem::zeroed())), ulflags).ok() } + unsafe { (windows_core::Interface::vtable(self).ValidateState)(windows_core::Interface::as_raw(self), uluiparam.unwrap_or(core::mem::zeroed()) as _, ulflags).ok() } } pub unsafe fn SettingsDialog(&self, uluiparam: Option, ulflags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SettingsDialog)(windows_core::Interface::as_raw(self), core::mem::transmute(uluiparam.unwrap_or(core::mem::zeroed())), ulflags).ok() } + unsafe { (windows_core::Interface::vtable(self).SettingsDialog)(windows_core::Interface::as_raw(self), uluiparam.unwrap_or(core::mem::zeroed()) as _, ulflags).ok() } } pub unsafe fn ChangePassword(&self, lpoldpass: *const i8, lpnewpass: *const i8, ulflags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ChangePassword)(windows_core::Interface::as_raw(self), lpoldpass, lpnewpass, ulflags).ok() } } pub unsafe fn FlushQueues(&self, uluiparam: Option, lptargettransport: Option<&[ENTRYID]>, ulflags: u32) -> windows_core::Result<()> { - unsafe { (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())), ulflags).ok() } + unsafe { (windows_core::Interface::vtable(self).FlushQueues)(windows_core::Interface::as_raw(self), uluiparam.unwrap_or(core::mem::zeroed()) as _, 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())), ulflags).ok() } } } #[repr(C)] @@ -2060,80 +2060,80 @@ windows_core::imp::define_interface!(IMAPITable, IMAPITable_Vtbl, 0); windows_core::imp::interface_hierarchy!(IMAPITable, windows_core::IUnknown); impl IMAPITable { pub unsafe fn GetLastError(&self, hresult: windows_core::HRESULT, ulflags: u32, lppmapierror: *mut *mut MAPIERROR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLastError)(windows_core::Interface::as_raw(self), hresult, ulflags, core::mem::transmute(lppmapierror)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLastError)(windows_core::Interface::as_raw(self), hresult, ulflags, lppmapierror as _).ok() } } pub unsafe fn Advise(&self, uleventmask: u32, lpadvisesink: P1, lpulconnection: *mut u32) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Advise)(windows_core::Interface::as_raw(self), uleventmask, lpadvisesink.param().abi(), core::mem::transmute(lpulconnection)).ok() } + unsafe { (windows_core::Interface::vtable(self).Advise)(windows_core::Interface::as_raw(self), uleventmask, lpadvisesink.param().abi(), lpulconnection as _).ok() } } pub unsafe fn Unadvise(&self, ulconnection: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Unadvise)(windows_core::Interface::as_raw(self), ulconnection).ok() } } pub unsafe fn GetStatus(&self, lpultablestatus: *mut u32, lpultabletype: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(lpultablestatus), core::mem::transmute(lpultabletype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), lpultablestatus as _, lpultabletype as _).ok() } } pub unsafe fn SetColumns(&self, lpproptagarray: *mut SPropTagArray, ulflags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetColumns)(windows_core::Interface::as_raw(self), core::mem::transmute(lpproptagarray), ulflags).ok() } + unsafe { (windows_core::Interface::vtable(self).SetColumns)(windows_core::Interface::as_raw(self), lpproptagarray as _, ulflags).ok() } } pub unsafe fn QueryColumns(&self, ulflags: u32, lpproptagarray: *mut *mut SPropTagArray) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryColumns)(windows_core::Interface::as_raw(self), ulflags, core::mem::transmute(lpproptagarray)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryColumns)(windows_core::Interface::as_raw(self), ulflags, lpproptagarray as _).ok() } } pub unsafe fn GetRowCount(&self, ulflags: u32, lpulcount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRowCount)(windows_core::Interface::as_raw(self), ulflags, core::mem::transmute(lpulcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRowCount)(windows_core::Interface::as_raw(self), ulflags, lpulcount as _).ok() } } pub unsafe fn SeekRow(&self, bkorigin: u32, lrowcount: i32, lplrowssought: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SeekRow)(windows_core::Interface::as_raw(self), bkorigin, lrowcount, core::mem::transmute(lplrowssought)).ok() } + unsafe { (windows_core::Interface::vtable(self).SeekRow)(windows_core::Interface::as_raw(self), bkorigin, lrowcount, lplrowssought as _).ok() } } pub unsafe fn SeekRowApprox(&self, ulnumerator: u32, uldenominator: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SeekRowApprox)(windows_core::Interface::as_raw(self), ulnumerator, uldenominator).ok() } } pub unsafe fn QueryPosition(&self, lpulrow: *mut u32, lpulnumerator: *mut u32, lpuldenominator: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(lpulrow), core::mem::transmute(lpulnumerator), core::mem::transmute(lpuldenominator)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryPosition)(windows_core::Interface::as_raw(self), lpulrow as _, lpulnumerator as _, lpuldenominator as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn FindRow(&self, lprestriction: *mut SRestriction, bkorigin: u32, ulflags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).FindRow)(windows_core::Interface::as_raw(self), core::mem::transmute(lprestriction), bkorigin, ulflags).ok() } + unsafe { (windows_core::Interface::vtable(self).FindRow)(windows_core::Interface::as_raw(self), lprestriction as _, bkorigin, ulflags).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Restrict(&self, lprestriction: *mut SRestriction, ulflags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Restrict)(windows_core::Interface::as_raw(self), core::mem::transmute(lprestriction), ulflags).ok() } + unsafe { (windows_core::Interface::vtable(self).Restrict)(windows_core::Interface::as_raw(self), lprestriction as _, ulflags).ok() } } pub unsafe fn CreateBookmark(&self, lpbkposition: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateBookmark)(windows_core::Interface::as_raw(self), core::mem::transmute(lpbkposition)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateBookmark)(windows_core::Interface::as_raw(self), lpbkposition as _).ok() } } pub unsafe fn FreeBookmark(&self, bkposition: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).FreeBookmark)(windows_core::Interface::as_raw(self), bkposition).ok() } } pub unsafe fn SortTable(&self, lpsortcriteria: *mut SSortOrderSet, ulflags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SortTable)(windows_core::Interface::as_raw(self), core::mem::transmute(lpsortcriteria), ulflags).ok() } + unsafe { (windows_core::Interface::vtable(self).SortTable)(windows_core::Interface::as_raw(self), lpsortcriteria as _, ulflags).ok() } } pub unsafe fn QuerySortOrder(&self, lppsortcriteria: *mut *mut SSortOrderSet) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QuerySortOrder)(windows_core::Interface::as_raw(self), core::mem::transmute(lppsortcriteria)).ok() } + unsafe { (windows_core::Interface::vtable(self).QuerySortOrder)(windows_core::Interface::as_raw(self), lppsortcriteria as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn QueryRows(&self, lrowcount: i32, ulflags: u32, lpprows: *mut *mut SRowSet) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryRows)(windows_core::Interface::as_raw(self), lrowcount, ulflags, core::mem::transmute(lpprows)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryRows)(windows_core::Interface::as_raw(self), lrowcount, ulflags, lpprows as _).ok() } } pub unsafe fn Abort(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Abort)(windows_core::Interface::as_raw(self)).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn ExpandRow(&self, cbinstancekey: u32, pbinstancekey: *mut u8, ulrowcount: u32, ulflags: u32, lpprows: *mut *mut SRowSet, lpulmorerows: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ExpandRow)(windows_core::Interface::as_raw(self), cbinstancekey, core::mem::transmute(pbinstancekey), ulrowcount, ulflags, core::mem::transmute(lpprows), core::mem::transmute(lpulmorerows)).ok() } + unsafe { (windows_core::Interface::vtable(self).ExpandRow)(windows_core::Interface::as_raw(self), cbinstancekey, pbinstancekey as _, ulrowcount, ulflags, lpprows as _, lpulmorerows as _).ok() } } pub unsafe fn CollapseRow(&self, cbinstancekey: u32, pbinstancekey: *mut u8, ulflags: u32, lpulrowcount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CollapseRow)(windows_core::Interface::as_raw(self), cbinstancekey, core::mem::transmute(pbinstancekey), ulflags, core::mem::transmute(lpulrowcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).CollapseRow)(windows_core::Interface::as_raw(self), cbinstancekey, pbinstancekey as _, ulflags, lpulrowcount as _).ok() } } pub unsafe fn WaitForCompletion(&self, ulflags: u32, ultimeout: u32, lpultablestatus: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).WaitForCompletion)(windows_core::Interface::as_raw(self), ulflags, ultimeout, core::mem::transmute(lpultablestatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).WaitForCompletion)(windows_core::Interface::as_raw(self), ulflags, ultimeout, lpultablestatus as _).ok() } } pub unsafe fn GetCollapseState(&self, ulflags: u32, cbinstancekey: u32, lpbinstancekey: *mut u8, lpcbcollapsestate: *mut u32, lppbcollapsestate: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCollapseState)(windows_core::Interface::as_raw(self), ulflags, cbinstancekey, core::mem::transmute(lpbinstancekey), core::mem::transmute(lpcbcollapsestate), core::mem::transmute(lppbcollapsestate)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCollapseState)(windows_core::Interface::as_raw(self), ulflags, cbinstancekey, lpbinstancekey as _, lpcbcollapsestate as _, lppbcollapsestate as _).ok() } } pub unsafe fn SetCollapseState(&self, ulflags: u32, cbcollapsestate: u32, pbcollapsestate: *mut u8, lpbklocation: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetCollapseState)(windows_core::Interface::as_raw(self), ulflags, cbcollapsestate, core::mem::transmute(pbcollapsestate), core::mem::transmute(lpbklocation)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetCollapseState)(windows_core::Interface::as_raw(self), ulflags, cbcollapsestate, pbcollapsestate as _, lpbklocation as _).ok() } } } #[repr(C)] @@ -2480,17 +2480,17 @@ impl IMessage { pub unsafe fn OpenAttach(&self, ulattachmentnum: u32, lpinterface: Option<*const windows_core::GUID>, ulflags: u32) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).OpenAttach)(windows_core::Interface::as_raw(self), ulattachmentnum, core::mem::transmute(lpinterface.unwrap_or(core::mem::zeroed())), ulflags, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).OpenAttach)(windows_core::Interface::as_raw(self), ulattachmentnum, lpinterface.unwrap_or(core::mem::zeroed()) as _, 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<()> { - unsafe { (windows_core::Interface::vtable(self).CreateAttach)(windows_core::Interface::as_raw(self), core::mem::transmute(lpinterface.unwrap_or(core::mem::zeroed())), ulflags, core::mem::transmute(lpulattachmentnum), core::mem::transmute(lppattach)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateAttach)(windows_core::Interface::as_raw(self), lpinterface.unwrap_or(core::mem::zeroed()) as _, ulflags, lpulattachmentnum as _, core::mem::transmute(lppattach)).ok() } } pub unsafe fn DeleteAttach(&self, ulattachmentnum: u32, uluiparam: Option, lpprogress: P2, ulflags: u32) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DeleteAttach)(windows_core::Interface::as_raw(self), ulattachmentnum, core::mem::transmute(uluiparam.unwrap_or(core::mem::zeroed())), lpprogress.param().abi(), ulflags).ok() } + unsafe { (windows_core::Interface::vtable(self).DeleteAttach)(windows_core::Interface::as_raw(self), ulattachmentnum, uluiparam.unwrap_or(core::mem::zeroed()) as _, lpprogress.param().abi(), ulflags).ok() } } pub unsafe fn GetRecipientTable(&self, ulflags: u32) -> windows_core::Result { unsafe { @@ -2637,7 +2637,7 @@ impl IMsgStore { { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).Advise)(windows_core::Interface::as_raw(self), cbentryid, core::mem::transmute(lpentryid.unwrap_or(core::mem::zeroed())), uleventmask, lpadvisesink.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).Advise)(windows_core::Interface::as_raw(self), cbentryid, lpentryid.unwrap_or(core::mem::zeroed()) as _, uleventmask, lpadvisesink.param().abi(), &mut result__).map(|| result__) } } pub unsafe fn Unadvise(&self, ulconnection: u32) -> windows_core::Result<()> { @@ -2650,13 +2650,13 @@ impl IMsgStore { } } 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<()> { - unsafe { (windows_core::Interface::vtable(self).OpenEntry)(windows_core::Interface::as_raw(self), cbentryid, lpentryid, core::mem::transmute(lpinterface.unwrap_or(core::mem::zeroed())), ulflags, core::mem::transmute(lpulobjtype), core::mem::transmute(ppunk)).ok() } + unsafe { (windows_core::Interface::vtable(self).OpenEntry)(windows_core::Interface::as_raw(self), cbentryid, lpentryid, lpinterface.unwrap_or(core::mem::zeroed()) as _, ulflags, lpulobjtype as _, core::mem::transmute(ppunk)).ok() } } pub unsafe fn SetReceiveFolder(&self, lpszmessageclass: Option<*const i8>, ulflags: u32, cbentryid: u32, lpentryid: *const ENTRYID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetReceiveFolder)(windows_core::Interface::as_raw(self), core::mem::transmute(lpszmessageclass.unwrap_or(core::mem::zeroed())), ulflags, cbentryid, lpentryid).ok() } + unsafe { (windows_core::Interface::vtable(self).SetReceiveFolder)(windows_core::Interface::as_raw(self), lpszmessageclass.unwrap_or(core::mem::zeroed()) as _, ulflags, cbentryid, lpentryid).ok() } } pub unsafe fn GetReceiveFolder(&self, lpszmessageclass: Option<*const i8>, ulflags: u32, lpcbentryid: *mut u32, lppentryid: *mut *mut ENTRYID, lppszexplicitclass: *mut *mut i8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetReceiveFolder)(windows_core::Interface::as_raw(self), core::mem::transmute(lpszmessageclass.unwrap_or(core::mem::zeroed())), ulflags, core::mem::transmute(lpcbentryid), core::mem::transmute(lppentryid), core::mem::transmute(lppszexplicitclass)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetReceiveFolder)(windows_core::Interface::as_raw(self), lpszmessageclass.unwrap_or(core::mem::zeroed()) as _, ulflags, lpcbentryid as _, lppentryid as _, lppszexplicitclass as _).ok() } } pub unsafe fn GetReceiveFolderTable(&self, ulflags: u32) -> windows_core::Result { unsafe { @@ -2665,7 +2665,7 @@ impl IMsgStore { } } pub unsafe fn StoreLogoff(&self, lpulflags: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).StoreLogoff)(windows_core::Interface::as_raw(self), core::mem::transmute(lpulflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).StoreLogoff)(windows_core::Interface::as_raw(self), lpulflags as _).ok() } } pub unsafe fn AbortSubmit(&self, cbentryid: u32, lpentryid: *const ENTRYID, ulflags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).AbortSubmit)(windows_core::Interface::as_raw(self), cbentryid, lpentryid, ulflags).ok() } @@ -2892,13 +2892,13 @@ impl IPropData { unsafe { (windows_core::Interface::vtable(self).HrSetObjAccess)(windows_core::Interface::as_raw(self), ulaccess).ok() } } pub unsafe fn HrSetPropAccess(&self, lpproptagarray: *mut SPropTagArray, rgulaccess: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).HrSetPropAccess)(windows_core::Interface::as_raw(self), core::mem::transmute(lpproptagarray), core::mem::transmute(rgulaccess)).ok() } + unsafe { (windows_core::Interface::vtable(self).HrSetPropAccess)(windows_core::Interface::as_raw(self), lpproptagarray as _, rgulaccess as _).ok() } } pub unsafe fn HrGetPropAccess(&self, lppproptagarray: *mut *mut SPropTagArray, lprgulaccess: *mut *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).HrGetPropAccess)(windows_core::Interface::as_raw(self), core::mem::transmute(lppproptagarray), core::mem::transmute(lprgulaccess)).ok() } + unsafe { (windows_core::Interface::vtable(self).HrGetPropAccess)(windows_core::Interface::as_raw(self), lppproptagarray as _, lprgulaccess as _).ok() } } pub unsafe fn HrAddObjProps(&self, lppproptagarray: *mut SPropTagArray, lprgulaccess: *mut *mut SPropProblemArray) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).HrAddObjProps)(windows_core::Interface::as_raw(self), core::mem::transmute(lppproptagarray), core::mem::transmute(lprgulaccess)).ok() } + unsafe { (windows_core::Interface::vtable(self).HrAddObjProps)(windows_core::Interface::as_raw(self), lppproptagarray as _, lprgulaccess as _).ok() } } } #[repr(C)] @@ -2976,7 +2976,7 @@ impl IProviderAdmin { pub unsafe fn CreateProvider(&self, lpszprovider: *const i8, lpprops: &[SPropValue], uluiparam: Option, ulflags: u32) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateProvider)(windows_core::Interface::as_raw(self), lpszprovider, lpprops.len().try_into().unwrap(), core::mem::transmute(lpprops.as_ptr()), core::mem::transmute(uluiparam.unwrap_or(core::mem::zeroed())), ulflags, &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).CreateProvider)(windows_core::Interface::as_raw(self), lpszprovider, lpprops.len().try_into().unwrap(), core::mem::transmute(lpprops.as_ptr()), uluiparam.unwrap_or(core::mem::zeroed()) as _, ulflags, &mut result__).map(|| result__) } } pub unsafe fn DeleteProvider(&self, lpuid: *const MAPIUID) -> windows_core::Result<()> { @@ -2985,7 +2985,7 @@ impl IProviderAdmin { pub unsafe fn OpenProfileSection(&self, lpuid: Option<*const MAPIUID>, lpinterface: Option<*const windows_core::GUID>, ulflags: u32) -> windows_core::Result { unsafe { 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::mem::zeroed())), core::mem::transmute(lpinterface.unwrap_or(core::mem::zeroed())), ulflags, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).OpenProfileSection)(windows_core::Interface::as_raw(self), lpuid.unwrap_or(core::mem::zeroed()) as _, lpinterface.unwrap_or(core::mem::zeroed()) as _, ulflags, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } } @@ -3085,39 +3085,39 @@ windows_core::imp::define_interface!(ITableData, ITableData_Vtbl, 0); windows_core::imp::interface_hierarchy!(ITableData, windows_core::IUnknown); impl ITableData { pub unsafe fn HrGetView(&self, lpssortorderset: *mut SSortOrderSet, lpfcallerrelease: *mut CALLERRELEASE, ulcallerdata: u32, lppmapitable: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).HrGetView)(windows_core::Interface::as_raw(self), core::mem::transmute(lpssortorderset), core::mem::transmute(lpfcallerrelease), ulcallerdata, core::mem::transmute(lppmapitable)).ok() } + unsafe { (windows_core::Interface::vtable(self).HrGetView)(windows_core::Interface::as_raw(self), lpssortorderset as _, lpfcallerrelease as _, ulcallerdata, core::mem::transmute(lppmapitable)).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn HrModifyRow(&self, param0: *mut SRow) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).HrModifyRow)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).HrModifyRow)(windows_core::Interface::as_raw(self), param0 as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn HrDeleteRow(&self, lpspropvalue: *mut SPropValue) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).HrDeleteRow)(windows_core::Interface::as_raw(self), core::mem::transmute(lpspropvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).HrDeleteRow)(windows_core::Interface::as_raw(self), lpspropvalue as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn HrQueryRow(&self, lpspropvalue: *mut SPropValue, lppsrow: *mut *mut SRow, lpulirow: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).HrQueryRow)(windows_core::Interface::as_raw(self), core::mem::transmute(lpspropvalue), core::mem::transmute(lppsrow), core::mem::transmute(lpulirow)).ok() } + unsafe { (windows_core::Interface::vtable(self).HrQueryRow)(windows_core::Interface::as_raw(self), lpspropvalue as _, lppsrow as _, lpulirow as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn HrEnumRow(&self, ulrownumber: u32, lppsrow: *mut *mut SRow) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).HrEnumRow)(windows_core::Interface::as_raw(self), ulrownumber, core::mem::transmute(lppsrow)).ok() } + unsafe { (windows_core::Interface::vtable(self).HrEnumRow)(windows_core::Interface::as_raw(self), ulrownumber, lppsrow as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn HrNotify(&self, ulflags: u32, cvalues: u32, lpspropvalue: *mut SPropValue) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).HrNotify)(windows_core::Interface::as_raw(self), ulflags, cvalues, core::mem::transmute(lpspropvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).HrNotify)(windows_core::Interface::as_raw(self), ulflags, cvalues, lpspropvalue as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn HrInsertRow(&self, ulirow: u32, lpsrow: *mut SRow) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).HrInsertRow)(windows_core::Interface::as_raw(self), ulirow, core::mem::transmute(lpsrow)).ok() } + unsafe { (windows_core::Interface::vtable(self).HrInsertRow)(windows_core::Interface::as_raw(self), ulirow, lpsrow as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn HrModifyRows(&self, ulflags: u32, lpsrowset: *mut SRowSet) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).HrModifyRows)(windows_core::Interface::as_raw(self), ulflags, core::mem::transmute(lpsrowset)).ok() } + unsafe { (windows_core::Interface::vtable(self).HrModifyRows)(windows_core::Interface::as_raw(self), ulflags, lpsrowset as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn HrDeleteRows(&self, ulflags: u32, lprowsettodelete: *mut SRowSet, crowsdeleted: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).HrDeleteRows)(windows_core::Interface::as_raw(self), ulflags, core::mem::transmute(lprowsettodelete), core::mem::transmute(crowsdeleted)).ok() } + unsafe { (windows_core::Interface::vtable(self).HrDeleteRows)(windows_core::Interface::as_raw(self), ulflags, lprowsettodelete as _, crowsdeleted as _).ok() } } } #[repr(C)] @@ -3279,13 +3279,13 @@ windows_core::imp::define_interface!(IWABObject, IWABObject_Vtbl, 0); windows_core::imp::interface_hierarchy!(IWABObject, windows_core::IUnknown); impl IWABObject { pub unsafe fn GetLastError(&self, hresult: windows_core::HRESULT, ulflags: u32, lppmapierror: *mut *mut MAPIERROR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLastError)(windows_core::Interface::as_raw(self), hresult, ulflags, core::mem::transmute(lppmapierror)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLastError)(windows_core::Interface::as_raw(self), hresult, ulflags, lppmapierror as _).ok() } } pub unsafe fn AllocateBuffer(&self, cbsize: u32, lppbuffer: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AllocateBuffer)(windows_core::Interface::as_raw(self), cbsize, core::mem::transmute(lppbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).AllocateBuffer)(windows_core::Interface::as_raw(self), cbsize, lppbuffer as _).ok() } } pub unsafe fn AllocateMore(&self, cbsize: u32, lpobject: *const core::ffi::c_void, lppbuffer: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AllocateMore)(windows_core::Interface::as_raw(self), cbsize, lpobject, core::mem::transmute(lppbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).AllocateMore)(windows_core::Interface::as_raw(self), cbsize, lpobject, lppbuffer as _).ok() } } pub unsafe fn FreeBuffer(&self, lpbuffer: *const core::ffi::c_void) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).FreeBuffer)(windows_core::Interface::as_raw(self), lpbuffer).ok() } @@ -3306,14 +3306,14 @@ impl IWABObject { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Find)(windows_core::Interface::as_raw(self), lpiab.param().abi(), hwnd.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn VCardDisplay(&self, lpiab: P0, hwnd: Option, lpszfilename: P2) -> windows_core::Result<()> where P0: windows_core::Param, P2: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).VCardDisplay)(windows_core::Interface::as_raw(self), lpiab.param().abi(), hwnd.unwrap_or(core::mem::zeroed()) as _, lpszfilename.param().abi()).ok() } } pub unsafe fn LDAPUrl(&self, lpiab: P0, hwnd: Option, ulflags: u32, lpszurl: P3) -> windows_core::Result where @@ -3322,7 +3322,7 @@ impl IWABObject { { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).LDAPUrl)(windows_core::Interface::as_raw(self), lpiab.param().abi(), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), 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(), hwnd.unwrap_or(core::mem::zeroed()) as _, 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<()> @@ -3347,13 +3347,13 @@ impl IWABObject { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetMe)(windows_core::Interface::as_raw(self), lpiab.param().abi(), ulflags, core::mem::transmute(lpdwaction), core::mem::transmute(lpsbeid), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMe)(windows_core::Interface::as_raw(self), lpiab.param().abi(), ulflags, lpdwaction as _, lpsbeid as _, hwnd.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetMe(&self, lpiab: P0, ulflags: u32, sbeid: SBinary, hwnd: Option) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SetMe)(windows_core::Interface::as_raw(self), lpiab.param().abi(), ulflags, core::mem::transmute(sbeid), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetMe)(windows_core::Interface::as_raw(self), lpiab.param().abi(), ulflags, core::mem::transmute(sbeid), hwnd.unwrap_or(core::mem::zeroed()) as _).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 c279c78c2b..bed26409b3 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Antimalware/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Antimalware/mod.rs @@ -41,7 +41,7 @@ where 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); unsafe { let mut result__ = core::mem::zeroed(); - AmsiScanBuffer(amsicontext, buffer, length, contentname.param().abi(), core::mem::transmute(amsisession.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + AmsiScanBuffer(amsicontext, buffer, length, contentname.param().abi(), amsisession.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -53,7 +53,7 @@ where 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); unsafe { let mut result__ = core::mem::zeroed(); - AmsiScanString(amsicontext, string.param().abi(), contentname.param().abi(), core::mem::transmute(amsisession.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + AmsiScanString(amsicontext, string.param().abi(), contentname.param().abi(), amsisession.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -243,10 +243,10 @@ windows_core::imp::define_interface!(IAmsiStream, IAmsiStream_Vtbl, 0x3e47f2e5_8 windows_core::imp::interface_hierarchy!(IAmsiStream, windows_core::IUnknown); impl IAmsiStream { pub unsafe fn GetAttribute(&self, attribute: AMSI_ATTRIBUTE, data: &mut [u8], retdata: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAttribute)(windows_core::Interface::as_raw(self), attribute, data.len().try_into().unwrap(), core::mem::transmute(data.as_ptr()), core::mem::transmute(retdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAttribute)(windows_core::Interface::as_raw(self), attribute, data.len().try_into().unwrap(), core::mem::transmute(data.as_ptr()), retdata as _).ok() } } pub unsafe fn Read(&self, position: u64, buffer: &mut [u8], readsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), position, buffer.len().try_into().unwrap(), core::mem::transmute(buffer.as_ptr()), core::mem::transmute(readsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), position, buffer.len().try_into().unwrap(), core::mem::transmute(buffer.as_ptr()), readsize as _).ok() } } } #[repr(C)] @@ -287,7 +287,7 @@ impl IAntimalware { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Scan)(windows_core::Interface::as_raw(self), stream.param().abi(), core::mem::transmute(result), core::mem::transmute(provider)).ok() } + unsafe { (windows_core::Interface::vtable(self).Scan)(windows_core::Interface::as_raw(self), stream.param().abi(), result as _, core::mem::transmute(provider)).ok() } } pub unsafe fn CloseSession(&self, session: u64) { unsafe { (windows_core::Interface::vtable(self).CloseSession)(windows_core::Interface::as_raw(self), session) } 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 8e3c285549..9862563a35 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ApplicationInstallationAndServicing/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ApplicationInstallationAndServicing/mod.rs @@ -1,12 +1,12 @@ #[inline] 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); - unsafe { ActivateActCtx(core::mem::transmute(hactctx.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcookie)).ok() } + unsafe { ActivateActCtx(hactctx.unwrap_or(core::mem::zeroed()) as _, lpcookie as _).ok() } } #[inline] pub unsafe fn AddRefActCtx(hactctx: super::super::Foundation::HANDLE) { windows_targets::link!("kernel32.dll" "system" fn AddRefActCtx(hactctx : super::super::Foundation:: HANDLE)); - unsafe { AddRefActCtx(core::mem::transmute(hactctx)) } + unsafe { AddRefActCtx(hactctx as _) } } #[inline] pub unsafe fn ApplyDeltaA(applyflags: i64, lpsourcename: P1, lpdeltaname: P2, lptargetname: P3) -> super::super::Foundation::BOOL @@ -21,17 +21,17 @@ where #[inline] pub unsafe fn ApplyDeltaB(applyflags: i64, source: DELTA_INPUT, delta: DELTA_INPUT, lptarget: *mut DELTA_OUTPUT) -> super::super::Foundation::BOOL { windows_targets::link!("msdelta.dll" "system" fn ApplyDeltaB(applyflags : i64, source : DELTA_INPUT, delta : DELTA_INPUT, lptarget : *mut DELTA_OUTPUT) -> super::super::Foundation:: BOOL); - unsafe { ApplyDeltaB(applyflags, core::mem::transmute(source), core::mem::transmute(delta), core::mem::transmute(lptarget)) } + unsafe { ApplyDeltaB(applyflags, core::mem::transmute(source), core::mem::transmute(delta), lptarget as _) } } #[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); - unsafe { ApplyDeltaGetReverseB(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)) } + unsafe { ApplyDeltaGetReverseB(applyflags, core::mem::transmute(source), core::mem::transmute(delta), lpreversefiletime.unwrap_or(core::mem::zeroed()) as _, lptarget as _, lptargetreverse as _) } } #[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 { windows_targets::link!("msdelta.dll" "system" fn ApplyDeltaProvidedB(applyflags : i64, source : DELTA_INPUT, delta : DELTA_INPUT, lptarget : *mut core::ffi::c_void, utargetsize : usize) -> super::super::Foundation:: BOOL); - unsafe { ApplyDeltaProvidedB(applyflags, core::mem::transmute(source), core::mem::transmute(delta), core::mem::transmute(lptarget), utargetsize) } + unsafe { ApplyDeltaProvidedB(applyflags, core::mem::transmute(source), core::mem::transmute(delta), lptarget as _, utargetsize) } } #[inline] pub unsafe fn ApplyDeltaW(applyflags: i64, lpsourcename: P1, lpdeltaname: P2, lptargetname: P3) -> super::super::Foundation::BOOL @@ -64,23 +64,23 @@ 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::mem::zeroed())), - core::mem::transmute(newfiletime.unwrap_or(core::mem::zeroed())), + newfileactualsize.unwrap_or(core::mem::zeroed()) as _, + newfiletime.unwrap_or(core::mem::zeroed()) as _, applyoptionflags, - core::mem::transmute(progresscallback.unwrap_or(core::mem::zeroed())), - core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed())), + progresscallback.unwrap_or(core::mem::zeroed()) as _, + callbackcontext.unwrap_or(core::mem::zeroed()) as _, ) } } #[inline] 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); - unsafe { ApplyPatchToFileByHandles(patchfilehandle, core::mem::transmute(oldfilehandle.unwrap_or(core::mem::zeroed())), newfilehandle, applyoptionflags) } + unsafe { ApplyPatchToFileByHandles(patchfilehandle, oldfilehandle.unwrap_or(core::mem::zeroed()) as _, newfilehandle, applyoptionflags) } } #[inline] 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); - unsafe { ApplyPatchToFileByHandlesEx(patchfilehandle, core::mem::transmute(oldfilehandle.unwrap_or(core::mem::zeroed())), newfilehandle, applyoptionflags, core::mem::transmute(progresscallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { ApplyPatchToFileByHandlesEx(patchfilehandle, oldfilehandle.unwrap_or(core::mem::zeroed()) as _, newfilehandle, applyoptionflags, progresscallback.unwrap_or(core::mem::zeroed()) as _, callbackcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -90,7 +90,7 @@ where P2: windows_core::Param, { windows_targets::link!("mspatcha.dll" "system" fn ApplyPatchToFileExA(patchfilename : windows_core::PCSTR, oldfilename : windows_core::PCSTR, newfilename : windows_core::PCSTR, applyoptionflags : u32, progresscallback : PPATCH_PROGRESS_CALLBACK, callbackcontext : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { ApplyPatchToFileExA(patchfilename.param().abi(), oldfilename.param().abi(), newfilename.param().abi(), applyoptionflags, core::mem::transmute(progresscallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { ApplyPatchToFileExA(patchfilename.param().abi(), oldfilename.param().abi(), newfilename.param().abi(), applyoptionflags, progresscallback.unwrap_or(core::mem::zeroed()) as _, callbackcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -100,7 +100,7 @@ where P2: windows_core::Param, { windows_targets::link!("mspatcha.dll" "system" fn ApplyPatchToFileExW(patchfilename : windows_core::PCWSTR, oldfilename : windows_core::PCWSTR, newfilename : windows_core::PCWSTR, applyoptionflags : u32, progresscallback : PPATCH_PROGRESS_CALLBACK, callbackcontext : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { ApplyPatchToFileExW(patchfilename.param().abi(), oldfilename.param().abi(), newfilename.param().abi(), applyoptionflags, core::mem::transmute(progresscallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { ApplyPatchToFileExW(patchfilename.param().abi(), oldfilename.param().abi(), newfilename.param().abi(), applyoptionflags, progresscallback.unwrap_or(core::mem::zeroed()) as _, callbackcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ApplyPatchToFileW(patchfilename: P0, oldfilename: P1, newfilename: P2, applyoptionflags: u32) -> super::super::Foundation::BOOL @@ -135,13 +135,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); - unsafe { CreateDeltaA(filetypeset, setflags, resetflags, lpsourcename.param().abi(), lptargetname.param().abi(), lpsourceoptionsname.param().abi(), lptargetoptionsname.param().abi(), core::mem::transmute(globaloptions), core::mem::transmute(lptargetfiletime.unwrap_or(core::mem::zeroed())), hashalgid, lpdeltaname.param().abi()) } + unsafe { CreateDeltaA(filetypeset, setflags, resetflags, lpsourcename.param().abi(), lptargetname.param().abi(), lpsourceoptionsname.param().abi(), lptargetoptionsname.param().abi(), core::mem::transmute(globaloptions), lptargetfiletime.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { CreateDeltaB(filetypeset, setflags, resetflags, core::mem::transmute(source), core::mem::transmute(target), core::mem::transmute(sourceoptions), core::mem::transmute(targetoptions), core::mem::transmute(globaloptions), core::mem::transmute(lptargetfiletime.unwrap_or(core::mem::zeroed())), hashalgid, core::mem::transmute(lpdelta)) } + unsafe { CreateDeltaB(filetypeset, setflags, resetflags, core::mem::transmute(source), core::mem::transmute(target), core::mem::transmute(sourceoptions), core::mem::transmute(targetoptions), core::mem::transmute(globaloptions), lptargetfiletime.unwrap_or(core::mem::zeroed()) as _, hashalgid, lpdelta as _) } } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] @@ -154,7 +154,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); - unsafe { CreateDeltaW(filetypeset, setflags, resetflags, lpsourcename.param().abi(), lptargetname.param().abi(), lpsourceoptionsname.param().abi(), lptargetoptionsname.param().abi(), core::mem::transmute(globaloptions), core::mem::transmute(lptargetfiletime.unwrap_or(core::mem::zeroed())), hashalgid, lpdeltaname.param().abi()) } + unsafe { CreateDeltaW(filetypeset, setflags, resetflags, lpsourcename.param().abi(), lptargetname.param().abi(), lpsourceoptionsname.param().abi(), lptargetoptionsname.param().abi(), core::mem::transmute(globaloptions), lptargetfiletime.unwrap_or(core::mem::zeroed()) as _, 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 @@ -164,17 +164,17 @@ 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); - unsafe { CreatePatchFileA(oldfilename.param().abi(), newfilename.param().abi(), patchfilename.param().abi(), optionflags, core::mem::transmute(optiondata.unwrap_or(core::mem::zeroed()))) } + unsafe { CreatePatchFileA(oldfilename.param().abi(), newfilename.param().abi(), patchfilename.param().abi(), optionflags, optiondata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { CreatePatchFileByHandles(core::mem::transmute(oldfilehandle.unwrap_or(core::mem::zeroed())), newfilehandle, patchfilehandle, optionflags, core::mem::transmute(optiondata.unwrap_or(core::mem::zeroed()))) } + unsafe { CreatePatchFileByHandles(oldfilehandle.unwrap_or(core::mem::zeroed()) as _, newfilehandle, patchfilehandle, optionflags, optiondata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { CreatePatchFileByHandlesEx(oldfileinfoarray.len().try_into().unwrap(), core::mem::transmute(oldfileinfoarray.as_ptr()), newfilehandle, patchfilehandle, 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()))) } + unsafe { CreatePatchFileByHandlesEx(oldfileinfoarray.len().try_into().unwrap(), core::mem::transmute(oldfileinfoarray.as_ptr()), newfilehandle, patchfilehandle, optionflags, optiondata.unwrap_or(core::mem::zeroed()) as _, progresscallback.unwrap_or(core::mem::zeroed()) as _, callbackcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -183,7 +183,7 @@ where 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); - unsafe { CreatePatchFileExA(oldfileinfoarray.len().try_into().unwrap(), core::mem::transmute(oldfileinfoarray.as_ptr()), newfilename.param().abi(), patchfilename.param().abi(), optionflags, core::mem::transmute(optiondata.unwrap_or(core::mem::zeroed())), core::mem::transmute(progresscallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { CreatePatchFileExA(oldfileinfoarray.len().try_into().unwrap(), core::mem::transmute(oldfileinfoarray.as_ptr()), newfilename.param().abi(), patchfilename.param().abi(), optionflags, optiondata.unwrap_or(core::mem::zeroed()) as _, progresscallback.unwrap_or(core::mem::zeroed()) as _, callbackcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -192,7 +192,7 @@ where 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); - unsafe { CreatePatchFileExW(oldfileinfoarray.len().try_into().unwrap(), core::mem::transmute(oldfileinfoarray.as_ptr()), newfilename.param().abi(), patchfilename.param().abi(), optionflags, core::mem::transmute(optiondata.unwrap_or(core::mem::zeroed())), core::mem::transmute(progresscallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { CreatePatchFileExW(oldfileinfoarray.len().try_into().unwrap(), core::mem::transmute(oldfileinfoarray.as_ptr()), newfilename.param().abi(), patchfilename.param().abi(), optionflags, optiondata.unwrap_or(core::mem::zeroed()) as _, progresscallback.unwrap_or(core::mem::zeroed()) as _, callbackcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CreatePatchFileW(oldfilename: P0, newfilename: P1, patchfilename: P2, optionflags: u32, optiondata: Option<*const PATCH_OPTION_DATA>) -> super::super::Foundation::BOOL @@ -202,7 +202,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); - unsafe { CreatePatchFileW(oldfilename.param().abi(), newfilename.param().abi(), patchfilename.param().abi(), optionflags, core::mem::transmute(optiondata.unwrap_or(core::mem::zeroed()))) } + unsafe { CreatePatchFileW(oldfilename.param().abi(), newfilename.param().abi(), patchfilename.param().abi(), optionflags, optiondata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn DeactivateActCtx(dwflags: u32, ulcookie: usize) -> windows_core::Result<()> { @@ -217,7 +217,7 @@ pub unsafe fn DeltaFree(lpmemory: *const core::ffi::c_void) -> super::super::Fou #[inline] pub unsafe fn DeltaNormalizeProvidedB(filetypeset: i64, normalizeflags: i64, normalizeoptions: DELTA_INPUT, lpsource: *mut core::ffi::c_void, usourcesize: usize) -> super::super::Foundation::BOOL { windows_targets::link!("msdelta.dll" "system" fn DeltaNormalizeProvidedB(filetypeset : i64, normalizeflags : i64, normalizeoptions : DELTA_INPUT, lpsource : *mut core::ffi::c_void, usourcesize : usize) -> super::super::Foundation:: BOOL); - unsafe { DeltaNormalizeProvidedB(filetypeset, normalizeflags, core::mem::transmute(normalizeoptions), core::mem::transmute(lpsource), usourcesize) } + unsafe { DeltaNormalizeProvidedB(filetypeset, normalizeflags, core::mem::transmute(normalizeoptions), lpsource as _, usourcesize) } } #[inline] pub unsafe fn ExtractPatchHeaderToFileA(patchfilename: P0, patchheaderfilename: P1) -> super::super::Foundation::BOOL @@ -246,7 +246,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); - unsafe { FindActCtxSectionGuid(dwflags, core::mem::transmute(lpextensionguid.unwrap_or(core::mem::zeroed())), ulsectionid, core::mem::transmute(lpguidtofind.unwrap_or(core::mem::zeroed())), core::mem::transmute(returneddata)).ok() } + unsafe { FindActCtxSectionGuid(dwflags, lpextensionguid.unwrap_or(core::mem::zeroed()) as _, ulsectionid, lpguidtofind.unwrap_or(core::mem::zeroed()) as _, returneddata as _).ok() } } #[cfg(feature = "Win32_System_WindowsProgramming")] #[inline] @@ -255,7 +255,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); - unsafe { FindActCtxSectionStringA(dwflags, core::mem::transmute(lpextensionguid.unwrap_or(core::mem::zeroed())), ulsectionid, lpstringtofind.param().abi(), core::mem::transmute(returneddata)).ok() } + unsafe { FindActCtxSectionStringA(dwflags, lpextensionguid.unwrap_or(core::mem::zeroed()) as _, ulsectionid, lpstringtofind.param().abi(), returneddata as _).ok() } } #[cfg(feature = "Win32_System_WindowsProgramming")] #[inline] @@ -264,12 +264,12 @@ 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); - unsafe { FindActCtxSectionStringW(dwflags, core::mem::transmute(lpextensionguid.unwrap_or(core::mem::zeroed())), ulsectionid, lpstringtofind.param().abi(), core::mem::transmute(returneddata)).ok() } + unsafe { FindActCtxSectionStringW(dwflags, lpextensionguid.unwrap_or(core::mem::zeroed()) as _, ulsectionid, lpstringtofind.param().abi(), returneddata as _).ok() } } #[inline] pub unsafe fn GetCurrentActCtx(lphactctx: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetCurrentActCtx(lphactctx : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - unsafe { GetCurrentActCtx(core::mem::transmute(lphactctx)).ok() } + unsafe { GetCurrentActCtx(lphactctx as _).ok() } } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] @@ -278,13 +278,13 @@ where P0: windows_core::Param, { windows_targets::link!("msdelta.dll" "system" fn GetDeltaInfoA(lpdeltaname : windows_core::PCSTR, lpheaderinfo : *mut DELTA_HEADER_INFO) -> super::super::Foundation:: BOOL); - unsafe { GetDeltaInfoA(lpdeltaname.param().abi(), core::mem::transmute(lpheaderinfo)) } + unsafe { GetDeltaInfoA(lpdeltaname.param().abi(), lpheaderinfo as _) } } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] pub unsafe fn GetDeltaInfoB(delta: DELTA_INPUT, lpheaderinfo: *mut DELTA_HEADER_INFO) -> super::super::Foundation::BOOL { windows_targets::link!("msdelta.dll" "system" fn GetDeltaInfoB(delta : DELTA_INPUT, lpheaderinfo : *mut DELTA_HEADER_INFO) -> super::super::Foundation:: BOOL); - unsafe { GetDeltaInfoB(core::mem::transmute(delta), core::mem::transmute(lpheaderinfo)) } + unsafe { GetDeltaInfoB(core::mem::transmute(delta), lpheaderinfo as _) } } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] @@ -293,7 +293,7 @@ where P0: windows_core::Param, { windows_targets::link!("msdelta.dll" "system" fn GetDeltaInfoW(lpdeltaname : windows_core::PCWSTR, lpheaderinfo : *mut DELTA_HEADER_INFO) -> super::super::Foundation:: BOOL); - unsafe { GetDeltaInfoW(lpdeltaname.param().abi(), core::mem::transmute(lpheaderinfo)) } + unsafe { GetDeltaInfoW(lpdeltaname.param().abi(), lpheaderinfo as _) } } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] @@ -302,13 +302,13 @@ where P2: windows_core::Param, { windows_targets::link!("msdelta.dll" "system" fn GetDeltaSignatureA(filetypeset : i64, hashalgid : super::super::Security::Cryptography:: ALG_ID, lpsourcename : windows_core::PCSTR, lphash : *mut DELTA_HASH) -> super::super::Foundation:: BOOL); - unsafe { GetDeltaSignatureA(filetypeset, hashalgid, lpsourcename.param().abi(), core::mem::transmute(lphash)) } + unsafe { GetDeltaSignatureA(filetypeset, hashalgid, lpsourcename.param().abi(), lphash as _) } } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] pub unsafe fn GetDeltaSignatureB(filetypeset: i64, hashalgid: super::super::Security::Cryptography::ALG_ID, source: DELTA_INPUT, lphash: *mut DELTA_HASH) -> super::super::Foundation::BOOL { windows_targets::link!("msdelta.dll" "system" fn GetDeltaSignatureB(filetypeset : i64, hashalgid : super::super::Security::Cryptography:: ALG_ID, source : DELTA_INPUT, lphash : *mut DELTA_HASH) -> super::super::Foundation:: BOOL); - unsafe { GetDeltaSignatureB(filetypeset, hashalgid, core::mem::transmute(source), core::mem::transmute(lphash)) } + unsafe { GetDeltaSignatureB(filetypeset, hashalgid, core::mem::transmute(source), lphash as _) } } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] @@ -317,7 +317,7 @@ where P2: windows_core::Param, { windows_targets::link!("msdelta.dll" "system" fn GetDeltaSignatureW(filetypeset : i64, hashalgid : super::super::Security::Cryptography:: ALG_ID, lpsourcename : windows_core::PCWSTR, lphash : *mut DELTA_HASH) -> super::super::Foundation:: BOOL); - unsafe { GetDeltaSignatureW(filetypeset, hashalgid, lpsourcename.param().abi(), core::mem::transmute(lphash)) } + unsafe { GetDeltaSignatureW(filetypeset, hashalgid, lpsourcename.param().abi(), lphash as _) } } #[inline] pub unsafe fn GetFilePatchSignatureA(filename: 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 @@ -329,7 +329,7 @@ where GetFilePatchSignatureA( filename.param().abi(), optionflags, - core::mem::transmute(optiondata.unwrap_or(core::mem::zeroed())), + optiondata.unwrap_or(core::mem::zeroed()) as _, 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()), @@ -347,7 +347,7 @@ pub unsafe fn GetFilePatchSignatureByBuffer(filebufferwritable: &mut [u8], optio core::mem::transmute(filebufferwritable.as_ptr()), filebufferwritable.len().try_into().unwrap(), optionflags, - core::mem::transmute(optiondata.unwrap_or(core::mem::zeroed())), + optiondata.unwrap_or(core::mem::zeroed()) as _, 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()), @@ -364,7 +364,7 @@ pub unsafe fn GetFilePatchSignatureByHandle(filehandle: super::super::Foundation GetFilePatchSignatureByHandle( filehandle, optionflags, - core::mem::transmute(optiondata.unwrap_or(core::mem::zeroed())), + optiondata.unwrap_or(core::mem::zeroed()) as _, 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()), @@ -384,7 +384,7 @@ where GetFilePatchSignatureW( filename.param().abi(), optionflags, - core::mem::transmute(optiondata.unwrap_or(core::mem::zeroed())), + optiondata.unwrap_or(core::mem::zeroed()) as _, 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()), @@ -441,7 +441,7 @@ where P0: 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); - unsafe { MsiAdvertiseScriptA(szscriptfile.param().abi(), dwflags, core::mem::transmute(phregdata.unwrap_or(core::mem::zeroed())), fremoveitems.into()) } + unsafe { MsiAdvertiseScriptA(szscriptfile.param().abi(), dwflags, phregdata.unwrap_or(core::mem::zeroed()) as _, fremoveitems.into()) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -450,7 +450,7 @@ where P0: 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); - unsafe { MsiAdvertiseScriptW(szscriptfile.param().abi(), dwflags, core::mem::transmute(phregdata.unwrap_or(core::mem::zeroed())), fremoveitems.into()) } + unsafe { MsiAdvertiseScriptW(szscriptfile.param().abi(), dwflags, phregdata.unwrap_or(core::mem::zeroed()) as _, fremoveitems.into()) } } #[inline] pub unsafe fn MsiApplyMultiplePatchesA(szpatchpackages: P0, szproductcode: P1, szpropertieslist: P2) -> u32 @@ -498,7 +498,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiBeginTransactionA(szname : windows_core::PCSTR, dwtransactionattributes : u32, phtransactionhandle : *mut MSIHANDLE, phchangeofownerevent : *mut super::super::Foundation:: HANDLE) -> u32); - unsafe { MsiBeginTransactionA(szname.param().abi(), dwtransactionattributes, core::mem::transmute(phtransactionhandle), core::mem::transmute(phchangeofownerevent)) } + unsafe { MsiBeginTransactionA(szname.param().abi(), dwtransactionattributes, phtransactionhandle as _, phchangeofownerevent as _) } } #[inline] pub unsafe fn MsiBeginTransactionW(szname: P0, dwtransactionattributes: u32, phtransactionhandle: *mut MSIHANDLE, phchangeofownerevent: *mut super::super::Foundation::HANDLE) -> u32 @@ -506,7 +506,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiBeginTransactionW(szname : windows_core::PCWSTR, dwtransactionattributes : u32, phtransactionhandle : *mut MSIHANDLE, phchangeofownerevent : *mut super::super::Foundation:: HANDLE) -> u32); - unsafe { MsiBeginTransactionW(szname.param().abi(), dwtransactionattributes, core::mem::transmute(phtransactionhandle), core::mem::transmute(phchangeofownerevent)) } + unsafe { MsiBeginTransactionW(szname.param().abi(), dwtransactionattributes, phtransactionhandle as _, phchangeofownerevent as _) } } #[inline] pub unsafe fn MsiCloseAllHandles() -> u32 { @@ -670,7 +670,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiDatabaseGetPrimaryKeysA(hdatabase : MSIHANDLE, sztablename : windows_core::PCSTR, phrecord : *mut MSIHANDLE) -> u32); - unsafe { MsiDatabaseGetPrimaryKeysA(hdatabase, sztablename.param().abi(), core::mem::transmute(phrecord)) } + unsafe { MsiDatabaseGetPrimaryKeysA(hdatabase, sztablename.param().abi(), phrecord as _) } } #[inline] pub unsafe fn MsiDatabaseGetPrimaryKeysW(hdatabase: MSIHANDLE, sztablename: P1, phrecord: *mut MSIHANDLE) -> u32 @@ -678,7 +678,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiDatabaseGetPrimaryKeysW(hdatabase : MSIHANDLE, sztablename : windows_core::PCWSTR, phrecord : *mut MSIHANDLE) -> u32); - unsafe { MsiDatabaseGetPrimaryKeysW(hdatabase, sztablename.param().abi(), core::mem::transmute(phrecord)) } + unsafe { MsiDatabaseGetPrimaryKeysW(hdatabase, sztablename.param().abi(), phrecord as _) } } #[inline] pub unsafe fn MsiDatabaseImportA(hdatabase: MSIHANDLE, szfolderpath: P1, szfilename: P2) -> u32 @@ -736,7 +736,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiDatabaseOpenViewA(hdatabase : MSIHANDLE, szquery : windows_core::PCSTR, phview : *mut MSIHANDLE) -> u32); - unsafe { MsiDatabaseOpenViewA(hdatabase, szquery.param().abi(), core::mem::transmute(phview)) } + unsafe { MsiDatabaseOpenViewA(hdatabase, szquery.param().abi(), phview as _) } } #[inline] pub unsafe fn MsiDatabaseOpenViewW(hdatabase: MSIHANDLE, szquery: P1, phview: *mut MSIHANDLE) -> u32 @@ -744,7 +744,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiDatabaseOpenViewW(hdatabase : MSIHANDLE, szquery : windows_core::PCWSTR, phview : *mut MSIHANDLE) -> u32); - unsafe { MsiDatabaseOpenViewW(hdatabase, szquery.param().abi(), core::mem::transmute(phview)) } + unsafe { MsiDatabaseOpenViewW(hdatabase, szquery.param().abi(), phview as _) } } #[inline] pub unsafe fn MsiDetermineApplicablePatchesA(szproductpackagepath: P0, ppatchinfo: &mut [MSIPATCHSEQUENCEINFOA]) -> u32 @@ -815,7 +815,7 @@ where #[inline] pub unsafe fn MsiEnableUIPreview(hdatabase: MSIHANDLE, phpreview: *mut MSIHANDLE) -> u32 { windows_targets::link!("msi.dll" "system" fn MsiEnableUIPreview(hdatabase : MSIHANDLE, phpreview : *mut MSIHANDLE) -> u32); - unsafe { MsiEnableUIPreview(hdatabase, core::mem::transmute(phpreview)) } + unsafe { MsiEnableUIPreview(hdatabase, phpreview as _) } } #[inline] pub unsafe fn MsiEndTransaction(dwtransactionstate: MSITRANSACTIONSTATE) -> u32 { @@ -837,7 +837,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiEnumClientsExA(szcomponent : windows_core::PCSTR, szusersid : windows_core::PCSTR, dwcontext : u32, dwproductindex : u32, szproductbuf : windows_core::PSTR, pdwinstalledcontext : *mut MSIINSTALLCONTEXT, szsid : windows_core::PSTR, pcchsid : *mut u32) -> u32); - unsafe { MsiEnumClientsExA(szcomponent.param().abi(), szusersid.param().abi(), dwcontext.0 as _, dwproductindex, core::mem::transmute(szproductbuf.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwinstalledcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(szsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchsid.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiEnumClientsExA(szcomponent.param().abi(), szusersid.param().abi(), dwcontext.0 as _, dwproductindex, core::mem::transmute(szproductbuf.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdwinstalledcontext.unwrap_or(core::mem::zeroed()) as _, szsid.unwrap_or(core::mem::zeroed()) as _, pcchsid.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -846,7 +846,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiEnumClientsExW(szcomponent : windows_core::PCWSTR, szusersid : windows_core::PCWSTR, dwcontext : u32, dwproductindex : u32, szproductbuf : windows_core::PWSTR, pdwinstalledcontext : *mut MSIINSTALLCONTEXT, szsid : windows_core::PWSTR, pcchsid : *mut u32) -> u32); - unsafe { MsiEnumClientsExW(szcomponent.param().abi(), szusersid.param().abi(), dwcontext.0 as _, dwproductindex, core::mem::transmute(szproductbuf.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwinstalledcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(szsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchsid.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiEnumClientsExW(szcomponent.param().abi(), szusersid.param().abi(), dwcontext.0 as _, dwproductindex, core::mem::transmute(szproductbuf.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdwinstalledcontext.unwrap_or(core::mem::zeroed()) as _, szsid.unwrap_or(core::mem::zeroed()) as _, pcchsid.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiEnumClientsW(szcomponent: P0, iproductindex: u32, lpproductbuf: windows_core::PWSTR) -> u32 @@ -862,7 +862,7 @@ where 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); - unsafe { MsiEnumComponentCostsA(hinstall, szcomponent.param().abi(), dwindex, istate, core::mem::transmute(szdrivebuf), core::mem::transmute(pcchdrivebuf), core::mem::transmute(picost), core::mem::transmute(pitempcost)) } + unsafe { MsiEnumComponentCostsA(hinstall, szcomponent.param().abi(), dwindex, istate, core::mem::transmute(szdrivebuf), pcchdrivebuf as _, picost as _, pitempcost as _) } } #[inline] 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 @@ -870,7 +870,7 @@ where 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); - unsafe { MsiEnumComponentCostsW(hinstall, szcomponent.param().abi(), dwindex, istate, core::mem::transmute(szdrivebuf), core::mem::transmute(pcchdrivebuf), core::mem::transmute(picost), core::mem::transmute(pitempcost)) } + unsafe { MsiEnumComponentCostsW(hinstall, szcomponent.param().abi(), dwindex, istate, core::mem::transmute(szdrivebuf), pcchdrivebuf as _, picost as _, pitempcost as _) } } #[inline] pub unsafe fn MsiEnumComponentQualifiersA(szcomponent: P0, iindex: u32, lpqualifierbuf: windows_core::PSTR, pcchqualifierbuf: *mut u32, lpapplicationdatabuf: Option, pcchapplicationdatabuf: Option<*mut u32>) -> u32 @@ -878,7 +878,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiEnumComponentQualifiersA(szcomponent : windows_core::PCSTR, iindex : u32, lpqualifierbuf : windows_core::PSTR, pcchqualifierbuf : *mut u32, lpapplicationdatabuf : windows_core::PSTR, pcchapplicationdatabuf : *mut u32) -> u32); - unsafe { MsiEnumComponentQualifiersA(szcomponent.param().abi(), 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()))) } + unsafe { MsiEnumComponentQualifiersA(szcomponent.param().abi(), iindex, core::mem::transmute(lpqualifierbuf), pcchqualifierbuf as _, lpapplicationdatabuf.unwrap_or(core::mem::zeroed()) as _, pcchapplicationdatabuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiEnumComponentQualifiersW(szcomponent: P0, iindex: u32, lpqualifierbuf: windows_core::PWSTR, pcchqualifierbuf: *mut u32, lpapplicationdatabuf: Option, pcchapplicationdatabuf: Option<*mut u32>) -> u32 @@ -886,7 +886,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiEnumComponentQualifiersW(szcomponent : windows_core::PCWSTR, iindex : u32, lpqualifierbuf : windows_core::PWSTR, pcchqualifierbuf : *mut u32, lpapplicationdatabuf : windows_core::PWSTR, pcchapplicationdatabuf : *mut u32) -> u32); - unsafe { MsiEnumComponentQualifiersW(szcomponent.param().abi(), 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()))) } + unsafe { MsiEnumComponentQualifiersW(szcomponent.param().abi(), iindex, core::mem::transmute(lpqualifierbuf), pcchqualifierbuf as _, lpapplicationdatabuf.unwrap_or(core::mem::zeroed()) as _, pcchapplicationdatabuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiEnumComponentsA(icomponentindex: u32, lpcomponentbuf: windows_core::PSTR) -> u32 { @@ -899,7 +899,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiEnumComponentsExA(szusersid : windows_core::PCSTR, dwcontext : u32, dwindex : u32, szinstalledcomponentcode : windows_core::PSTR, pdwinstalledcontext : *mut MSIINSTALLCONTEXT, szsid : windows_core::PSTR, pcchsid : *mut u32) -> u32); - unsafe { MsiEnumComponentsExA(szusersid.param().abi(), dwcontext, dwindex, core::mem::transmute(szinstalledcomponentcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwinstalledcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(szsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchsid.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiEnumComponentsExA(szusersid.param().abi(), dwcontext, dwindex, core::mem::transmute(szinstalledcomponentcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdwinstalledcontext.unwrap_or(core::mem::zeroed()) as _, szsid.unwrap_or(core::mem::zeroed()) as _, pcchsid.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -907,7 +907,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiEnumComponentsExW(szusersid : windows_core::PCWSTR, dwcontext : u32, dwindex : u32, szinstalledcomponentcode : windows_core::PWSTR, pdwinstalledcontext : *mut MSIINSTALLCONTEXT, szsid : windows_core::PWSTR, pcchsid : *mut u32) -> u32); - unsafe { MsiEnumComponentsExW(szusersid.param().abi(), dwcontext, dwindex, core::mem::transmute(szinstalledcomponentcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwinstalledcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(szsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchsid.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiEnumComponentsExW(szusersid.param().abi(), dwcontext, dwindex, core::mem::transmute(szinstalledcomponentcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdwinstalledcontext.unwrap_or(core::mem::zeroed()) as _, szsid.unwrap_or(core::mem::zeroed()) as _, pcchsid.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiEnumComponentsW(icomponentindex: u32, lpcomponentbuf: windows_core::PWSTR) -> u32 { @@ -920,7 +920,7 @@ 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); - unsafe { MsiEnumFeaturesA(szproduct.param().abi(), ifeatureindex, core::mem::transmute(lpfeaturebuf), core::mem::transmute(lpparentbuf.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiEnumFeaturesA(szproduct.param().abi(), ifeatureindex, core::mem::transmute(lpfeaturebuf), lpparentbuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiEnumFeaturesW(szproduct: P0, ifeatureindex: u32, lpfeaturebuf: windows_core::PWSTR, lpparentbuf: Option) -> u32 @@ -928,7 +928,7 @@ 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); - unsafe { MsiEnumFeaturesW(szproduct.param().abi(), ifeatureindex, core::mem::transmute(lpfeaturebuf), core::mem::transmute(lpparentbuf.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiEnumFeaturesW(szproduct.param().abi(), ifeatureindex, core::mem::transmute(lpfeaturebuf), lpparentbuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiEnumPatchesA(szproduct: P0, ipatchindex: u32, lppatchbuf: windows_core::PSTR, lptransformsbuf: windows_core::PSTR, pcchtransformsbuf: *mut u32) -> u32 @@ -936,7 +936,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiEnumPatchesA(szproduct : windows_core::PCSTR, ipatchindex : u32, lppatchbuf : windows_core::PSTR, lptransformsbuf : windows_core::PSTR, pcchtransformsbuf : *mut u32) -> u32); - unsafe { MsiEnumPatchesA(szproduct.param().abi(), ipatchindex, core::mem::transmute(lppatchbuf), core::mem::transmute(lptransformsbuf), core::mem::transmute(pcchtransformsbuf)) } + unsafe { MsiEnumPatchesA(szproduct.param().abi(), ipatchindex, core::mem::transmute(lppatchbuf), core::mem::transmute(lptransformsbuf), pcchtransformsbuf as _) } } #[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: Option, pcchtargetusersid: Option<*mut u32>) -> u32 @@ -945,20 +945,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiEnumPatchesExA(szproductcode : windows_core::PCSTR, szusersid : windows_core::PCSTR, dwcontext : u32, dwfilter : u32, dwindex : u32, szpatchcode : windows_core::PSTR, sztargetproductcode : windows_core::PSTR, pdwtargetproductcontext : *mut MSIINSTALLCONTEXT, sztargetusersid : windows_core::PSTR, pcchtargetusersid : *mut u32) -> u32); - unsafe { - MsiEnumPatchesExA( - szproductcode.param().abi(), - szusersid.param().abi(), - dwcontext, - dwfilter, - dwindex, - core::mem::transmute(szpatchcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - core::mem::transmute(sztargetproductcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - core::mem::transmute(pdwtargetproductcontext.unwrap_or(core::mem::zeroed())), - core::mem::transmute(sztargetusersid.unwrap_or(core::mem::zeroed())), - core::mem::transmute(pcchtargetusersid.unwrap_or(core::mem::zeroed())), - ) - } + unsafe { MsiEnumPatchesExA(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, dwfilter, dwindex, core::mem::transmute(szpatchcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(sztargetproductcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdwtargetproductcontext.unwrap_or(core::mem::zeroed()) as _, sztargetusersid.unwrap_or(core::mem::zeroed()) as _, pcchtargetusersid.unwrap_or(core::mem::zeroed()) as _) } } #[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: Option, pcchtargetusersid: Option<*mut u32>) -> u32 @@ -967,20 +954,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiEnumPatchesExW(szproductcode : windows_core::PCWSTR, szusersid : windows_core::PCWSTR, dwcontext : u32, dwfilter : u32, dwindex : u32, szpatchcode : windows_core::PWSTR, sztargetproductcode : windows_core::PWSTR, pdwtargetproductcontext : *mut MSIINSTALLCONTEXT, sztargetusersid : windows_core::PWSTR, pcchtargetusersid : *mut u32) -> u32); - unsafe { - MsiEnumPatchesExW( - szproductcode.param().abi(), - szusersid.param().abi(), - dwcontext, - dwfilter, - dwindex, - core::mem::transmute(szpatchcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - core::mem::transmute(sztargetproductcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - core::mem::transmute(pdwtargetproductcontext.unwrap_or(core::mem::zeroed())), - core::mem::transmute(sztargetusersid.unwrap_or(core::mem::zeroed())), - core::mem::transmute(pcchtargetusersid.unwrap_or(core::mem::zeroed())), - ) - } + unsafe { MsiEnumPatchesExW(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, dwfilter, dwindex, core::mem::transmute(szpatchcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(sztargetproductcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdwtargetproductcontext.unwrap_or(core::mem::zeroed()) as _, sztargetusersid.unwrap_or(core::mem::zeroed()) as _, pcchtargetusersid.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiEnumPatchesW(szproduct: P0, ipatchindex: u32, lppatchbuf: windows_core::PWSTR, lptransformsbuf: windows_core::PWSTR, pcchtransformsbuf: *mut u32) -> u32 @@ -988,7 +962,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiEnumPatchesW(szproduct : windows_core::PCWSTR, ipatchindex : u32, lppatchbuf : windows_core::PWSTR, lptransformsbuf : windows_core::PWSTR, pcchtransformsbuf : *mut u32) -> u32); - unsafe { MsiEnumPatchesW(szproduct.param().abi(), ipatchindex, core::mem::transmute(lppatchbuf), core::mem::transmute(lptransformsbuf), core::mem::transmute(pcchtransformsbuf)) } + unsafe { MsiEnumPatchesW(szproduct.param().abi(), ipatchindex, core::mem::transmute(lppatchbuf), core::mem::transmute(lptransformsbuf), pcchtransformsbuf as _) } } #[inline] pub unsafe fn MsiEnumProductsA(iproductindex: u32, lpproductbuf: windows_core::PSTR) -> u32 { @@ -1002,7 +976,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiEnumProductsExA(szproductcode : windows_core::PCSTR, szusersid : windows_core::PCSTR, dwcontext : u32, dwindex : u32, szinstalledproductcode : windows_core::PSTR, pdwinstalledcontext : *mut MSIINSTALLCONTEXT, szsid : windows_core::PSTR, pcchsid : *mut u32) -> u32); - unsafe { MsiEnumProductsExA(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, dwindex, core::mem::transmute(szinstalledproductcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwinstalledcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(szsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchsid.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiEnumProductsExA(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, dwindex, core::mem::transmute(szinstalledproductcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdwinstalledcontext.unwrap_or(core::mem::zeroed()) as _, szsid.unwrap_or(core::mem::zeroed()) as _, pcchsid.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -1011,7 +985,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiEnumProductsExW(szproductcode : windows_core::PCWSTR, szusersid : windows_core::PCWSTR, dwcontext : u32, dwindex : u32, szinstalledproductcode : windows_core::PWSTR, pdwinstalledcontext : *mut MSIINSTALLCONTEXT, szsid : windows_core::PWSTR, pcchsid : *mut u32) -> u32); - unsafe { MsiEnumProductsExW(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, dwindex, core::mem::transmute(szinstalledproductcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwinstalledcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(szsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchsid.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiEnumProductsExW(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, dwindex, core::mem::transmute(szinstalledproductcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdwinstalledcontext.unwrap_or(core::mem::zeroed()) as _, szsid.unwrap_or(core::mem::zeroed()) as _, pcchsid.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiEnumProductsW(iproductindex: u32, lpproductbuf: windows_core::PWSTR) -> u32 { @@ -1024,7 +998,7 @@ 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); - unsafe { MsiEnumRelatedProductsA(lpupgradecode.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), iproductindex, core::mem::transmute(lpproductbuf)) } + unsafe { MsiEnumRelatedProductsA(lpupgradecode.param().abi(), dwreserved.unwrap_or(core::mem::zeroed()) as _, iproductindex, core::mem::transmute(lpproductbuf)) } } #[inline] pub unsafe fn MsiEnumRelatedProductsW(lpupgradecode: P0, dwreserved: Option, iproductindex: u32, lpproductbuf: windows_core::PWSTR) -> u32 @@ -1032,7 +1006,7 @@ 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); - unsafe { MsiEnumRelatedProductsW(lpupgradecode.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), iproductindex, core::mem::transmute(lpproductbuf)) } + unsafe { MsiEnumRelatedProductsW(lpupgradecode.param().abi(), dwreserved.unwrap_or(core::mem::zeroed()) as _, iproductindex, core::mem::transmute(lpproductbuf)) } } #[inline] pub unsafe fn MsiEvaluateConditionA(hinstall: MSIHANDLE, szcondition: P1) -> MSICONDITION @@ -1056,7 +1030,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiExtractPatchXMLDataA(szpatchpath : windows_core::PCSTR, dwreserved : u32, szxmldata : windows_core::PSTR, pcchxmldata : *mut u32) -> u32); - unsafe { 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()))) } + unsafe { MsiExtractPatchXMLDataA(szpatchpath.param().abi(), dwreserved.unwrap_or(core::mem::zeroed()) as _, szxmldata.unwrap_or(core::mem::zeroed()) as _, pcchxmldata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiExtractPatchXMLDataW(szpatchpath: P0, dwreserved: Option, szxmldata: Option, pcchxmldata: Option<*mut u32>) -> u32 @@ -1064,17 +1038,17 @@ 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); - unsafe { 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()))) } + unsafe { MsiExtractPatchXMLDataW(szpatchpath.param().abi(), dwreserved.unwrap_or(core::mem::zeroed()) as _, szxmldata.unwrap_or(core::mem::zeroed()) as _, pcchxmldata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { MsiFormatRecordA(hinstall, hrecord, core::mem::transmute(szresultbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchresultbuf.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiFormatRecordA(hinstall, hrecord, szresultbuf.unwrap_or(core::mem::zeroed()) as _, pcchresultbuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { MsiFormatRecordW(hinstall, hrecord, core::mem::transmute(szresultbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchresultbuf.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiFormatRecordW(hinstall, hrecord, szresultbuf.unwrap_or(core::mem::zeroed()) as _, pcchresultbuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiGetActiveDatabase(hinstall: MSIHANDLE) -> MSIHANDLE { @@ -1088,7 +1062,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetComponentPathA(szproduct : windows_core::PCSTR, szcomponent : windows_core::PCSTR, lppathbuf : windows_core::PSTR, pcchbuf : *mut u32) -> INSTALLSTATE); - unsafe { 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()))) } + unsafe { MsiGetComponentPathA(szproduct.param().abi(), szcomponent.param().abi(), lppathbuf.unwrap_or(core::mem::zeroed()) as _, pcchbuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiGetComponentPathExA(szproductcode: P0, szcomponentcode: P1, szusersid: P2, dwcontext: Option, lpoutpathbuffer: Option, pcchoutpathbuffer: Option<*mut u32>) -> INSTALLSTATE @@ -1098,7 +1072,7 @@ where P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetComponentPathExA(szproductcode : windows_core::PCSTR, szcomponentcode : windows_core::PCSTR, szusersid : windows_core::PCSTR, dwcontext : MSIINSTALLCONTEXT, lpoutpathbuffer : windows_core::PSTR, pcchoutpathbuffer : *mut u32) -> INSTALLSTATE); - unsafe { 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()))) } + unsafe { MsiGetComponentPathExA(szproductcode.param().abi(), szcomponentcode.param().abi(), szusersid.param().abi(), dwcontext.unwrap_or(core::mem::zeroed()) as _, lpoutpathbuffer.unwrap_or(core::mem::zeroed()) as _, pcchoutpathbuffer.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiGetComponentPathExW(szproductcode: P0, szcomponentcode: P1, szusersid: P2, dwcontext: Option, lpoutpathbuffer: Option, pcchoutpathbuffer: Option<*mut u32>) -> INSTALLSTATE @@ -1108,7 +1082,7 @@ where P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetComponentPathExW(szproductcode : windows_core::PCWSTR, szcomponentcode : windows_core::PCWSTR, szusersid : windows_core::PCWSTR, dwcontext : MSIINSTALLCONTEXT, lpoutpathbuffer : windows_core::PWSTR, pcchoutpathbuffer : *mut u32) -> INSTALLSTATE); - unsafe { 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()))) } + unsafe { MsiGetComponentPathExW(szproductcode.param().abi(), szcomponentcode.param().abi(), szusersid.param().abi(), dwcontext.unwrap_or(core::mem::zeroed()) as _, lpoutpathbuffer.unwrap_or(core::mem::zeroed()) as _, pcchoutpathbuffer.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiGetComponentPathW(szproduct: P0, szcomponent: P1, lppathbuf: Option, pcchbuf: Option<*mut u32>) -> INSTALLSTATE @@ -1117,7 +1091,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetComponentPathW(szproduct : windows_core::PCWSTR, szcomponent : windows_core::PCWSTR, lppathbuf : windows_core::PWSTR, pcchbuf : *mut u32) -> INSTALLSTATE); - unsafe { 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()))) } + unsafe { MsiGetComponentPathW(szproduct.param().abi(), szcomponent.param().abi(), lppathbuf.unwrap_or(core::mem::zeroed()) as _, pcchbuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiGetComponentStateA(hinstall: MSIHANDLE, szcomponent: P1, piinstalled: *mut INSTALLSTATE, piaction: *mut INSTALLSTATE) -> u32 @@ -1125,7 +1099,7 @@ where 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); - unsafe { MsiGetComponentStateA(hinstall, szcomponent.param().abi(), core::mem::transmute(piinstalled), core::mem::transmute(piaction)) } + unsafe { MsiGetComponentStateA(hinstall, szcomponent.param().abi(), piinstalled as _, piaction as _) } } #[inline] pub unsafe fn MsiGetComponentStateW(hinstall: MSIHANDLE, szcomponent: P1, piinstalled: *mut INSTALLSTATE, piaction: *mut INSTALLSTATE) -> u32 @@ -1133,7 +1107,7 @@ where 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); - unsafe { MsiGetComponentStateW(hinstall, szcomponent.param().abi(), core::mem::transmute(piinstalled), core::mem::transmute(piaction)) } + unsafe { MsiGetComponentStateW(hinstall, szcomponent.param().abi(), piinstalled as _, piaction as _) } } #[inline] pub unsafe fn MsiGetDatabaseState(hdatabase: MSIHANDLE) -> MSIDBSTATE { @@ -1146,7 +1120,7 @@ where 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); - unsafe { MsiGetFeatureCostA(hinstall, szfeature.param().abi(), icosttree, istate, core::mem::transmute(picost)) } + unsafe { MsiGetFeatureCostA(hinstall, szfeature.param().abi(), icosttree, istate, picost as _) } } #[inline] pub unsafe fn MsiGetFeatureCostW(hinstall: MSIHANDLE, szfeature: P1, icosttree: MSICOSTTREE, istate: INSTALLSTATE, picost: *mut i32) -> u32 @@ -1154,7 +1128,7 @@ where 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); - unsafe { MsiGetFeatureCostW(hinstall, szfeature.param().abi(), icosttree, istate, core::mem::transmute(picost)) } + unsafe { MsiGetFeatureCostW(hinstall, szfeature.param().abi(), icosttree, istate, picost as _) } } #[inline] 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 @@ -1162,7 +1136,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetFeatureInfoA(hproduct : MSIHANDLE, szfeature : windows_core::PCSTR, lpattributes : *mut u32, lptitlebuf : windows_core::PSTR, pcchtitlebuf : *mut u32, lphelpbuf : windows_core::PSTR, pcchhelpbuf : *mut u32) -> u32); - unsafe { MsiGetFeatureInfoA(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()))) } + unsafe { MsiGetFeatureInfoA(hproduct, szfeature.param().abi(), lpattributes.unwrap_or(core::mem::zeroed()) as _, lptitlebuf.unwrap_or(core::mem::zeroed()) as _, pcchtitlebuf.unwrap_or(core::mem::zeroed()) as _, lphelpbuf.unwrap_or(core::mem::zeroed()) as _, pcchhelpbuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -1170,7 +1144,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetFeatureInfoW(hproduct : MSIHANDLE, szfeature : windows_core::PCWSTR, lpattributes : *mut u32, lptitlebuf : windows_core::PWSTR, pcchtitlebuf : *mut u32, lphelpbuf : windows_core::PWSTR, pcchhelpbuf : *mut u32) -> u32); - unsafe { MsiGetFeatureInfoW(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()))) } + unsafe { MsiGetFeatureInfoW(hproduct, szfeature.param().abi(), lpattributes.unwrap_or(core::mem::zeroed()) as _, lptitlebuf.unwrap_or(core::mem::zeroed()) as _, pcchtitlebuf.unwrap_or(core::mem::zeroed()) as _, lphelpbuf.unwrap_or(core::mem::zeroed()) as _, pcchhelpbuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiGetFeatureStateA(hinstall: MSIHANDLE, szfeature: P1, piinstalled: *mut INSTALLSTATE, piaction: *mut INSTALLSTATE) -> u32 @@ -1178,7 +1152,7 @@ where 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); - unsafe { MsiGetFeatureStateA(hinstall, szfeature.param().abi(), core::mem::transmute(piinstalled), core::mem::transmute(piaction)) } + unsafe { MsiGetFeatureStateA(hinstall, szfeature.param().abi(), piinstalled as _, piaction as _) } } #[inline] pub unsafe fn MsiGetFeatureStateW(hinstall: MSIHANDLE, szfeature: P1, piinstalled: *mut INSTALLSTATE, piaction: *mut INSTALLSTATE) -> u32 @@ -1186,7 +1160,7 @@ where 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); - unsafe { MsiGetFeatureStateW(hinstall, szfeature.param().abi(), core::mem::transmute(piinstalled), core::mem::transmute(piaction)) } + unsafe { MsiGetFeatureStateW(hinstall, szfeature.param().abi(), piinstalled as _, piaction as _) } } #[inline] pub unsafe fn MsiGetFeatureUsageA(szproduct: P0, szfeature: P1, pdwusecount: Option<*mut u32>, pwdateused: Option<*mut u16>) -> u32 @@ -1195,7 +1169,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); - unsafe { 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()))) } + unsafe { MsiGetFeatureUsageA(szproduct.param().abi(), szfeature.param().abi(), pdwusecount.unwrap_or(core::mem::zeroed()) as _, pwdateused.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiGetFeatureUsageW(szproduct: P0, szfeature: P1, pdwusecount: Option<*mut u32>, pwdateused: Option<*mut u16>) -> u32 @@ -1204,7 +1178,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetFeatureUsageW(szproduct : windows_core::PCWSTR, szfeature : windows_core::PCWSTR, pdwusecount : *mut u32, pwdateused : *mut u16) -> u32); - unsafe { 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()))) } + unsafe { MsiGetFeatureUsageW(szproduct.param().abi(), szfeature.param().abi(), pdwusecount.unwrap_or(core::mem::zeroed()) as _, pwdateused.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiGetFeatureValidStatesA(hinstall: MSIHANDLE, szfeature: P1, lpinstallstates: *mut u32) -> u32 @@ -1212,7 +1186,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetFeatureValidStatesA(hinstall : MSIHANDLE, szfeature : windows_core::PCSTR, lpinstallstates : *mut u32) -> u32); - unsafe { MsiGetFeatureValidStatesA(hinstall, szfeature.param().abi(), core::mem::transmute(lpinstallstates)) } + unsafe { MsiGetFeatureValidStatesA(hinstall, szfeature.param().abi(), lpinstallstates as _) } } #[inline] pub unsafe fn MsiGetFeatureValidStatesW(hinstall: MSIHANDLE, szfeature: P1, lpinstallstates: *mut u32) -> u32 @@ -1220,7 +1194,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetFeatureValidStatesW(hinstall : MSIHANDLE, szfeature : windows_core::PCWSTR, lpinstallstates : *mut u32) -> u32); - unsafe { MsiGetFeatureValidStatesW(hinstall, szfeature.param().abi(), core::mem::transmute(lpinstallstates)) } + unsafe { MsiGetFeatureValidStatesW(hinstall, szfeature.param().abi(), lpinstallstates as _) } } #[inline] pub unsafe fn MsiGetFileHashA(szfilepath: P0, dwoptions: u32, phash: *mut MSIFILEHASHINFO) -> u32 @@ -1228,7 +1202,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetFileHashA(szfilepath : windows_core::PCSTR, dwoptions : u32, phash : *mut MSIFILEHASHINFO) -> u32); - unsafe { MsiGetFileHashA(szfilepath.param().abi(), dwoptions, core::mem::transmute(phash)) } + unsafe { MsiGetFileHashA(szfilepath.param().abi(), dwoptions, phash as _) } } #[inline] pub unsafe fn MsiGetFileHashW(szfilepath: P0, dwoptions: u32, phash: *mut MSIFILEHASHINFO) -> u32 @@ -1236,7 +1210,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetFileHashW(szfilepath : windows_core::PCWSTR, dwoptions : u32, phash : *mut MSIFILEHASHINFO) -> u32); - unsafe { MsiGetFileHashW(szfilepath.param().abi(), dwoptions, core::mem::transmute(phash)) } + unsafe { MsiGetFileHashW(szfilepath.param().abi(), dwoptions, phash as _) } } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] @@ -1245,7 +1219,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); - unsafe { MsiGetFileSignatureInformationA(szsignedobjectpath.param().abi(), dwflags, core::mem::transmute(ppccertcontext), core::mem::transmute(pbhashdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbhashdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { MsiGetFileSignatureInformationA(szsignedobjectpath.param().abi(), dwflags, ppccertcontext as _, pbhashdata.unwrap_or(core::mem::zeroed()) as _, pcbhashdata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] @@ -1254,7 +1228,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetFileSignatureInformationW(szsignedobjectpath : windows_core::PCWSTR, dwflags : u32, ppccertcontext : *mut *mut super::super::Security::Cryptography:: CERT_CONTEXT, pbhashdata : *mut u8, pcbhashdata : *mut u32) -> windows_core::HRESULT); - unsafe { MsiGetFileSignatureInformationW(szsignedobjectpath.param().abi(), dwflags, core::mem::transmute(ppccertcontext), core::mem::transmute(pbhashdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbhashdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { MsiGetFileSignatureInformationW(szsignedobjectpath.param().abi(), dwflags, ppccertcontext as _, pbhashdata.unwrap_or(core::mem::zeroed()) as _, pcbhashdata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn MsiGetFileVersionA(szfilepath: P0, lpversionbuf: Option, pcchversionbuf: Option<*mut u32>, lplangbuf: Option, pcchlangbuf: Option<*mut u32>) -> u32 @@ -1262,7 +1236,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetFileVersionA(szfilepath : windows_core::PCSTR, lpversionbuf : windows_core::PSTR, pcchversionbuf : *mut u32, lplangbuf : windows_core::PSTR, pcchlangbuf : *mut u32) -> u32); - unsafe { 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()))) } + unsafe { MsiGetFileVersionA(szfilepath.param().abi(), lpversionbuf.unwrap_or(core::mem::zeroed()) as _, pcchversionbuf.unwrap_or(core::mem::zeroed()) as _, lplangbuf.unwrap_or(core::mem::zeroed()) as _, pcchlangbuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiGetFileVersionW(szfilepath: P0, lpversionbuf: Option, pcchversionbuf: Option<*mut u32>, lplangbuf: Option, pcchlangbuf: Option<*mut u32>) -> u32 @@ -1270,7 +1244,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetFileVersionW(szfilepath : windows_core::PCWSTR, lpversionbuf : windows_core::PWSTR, pcchversionbuf : *mut u32, lplangbuf : windows_core::PWSTR, pcchlangbuf : *mut u32) -> u32); - unsafe { 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()))) } + unsafe { MsiGetFileVersionW(szfilepath.param().abi(), lpversionbuf.unwrap_or(core::mem::zeroed()) as _, pcchversionbuf.unwrap_or(core::mem::zeroed()) as _, lplangbuf.unwrap_or(core::mem::zeroed()) as _, pcchlangbuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiGetLanguage(hinstall: MSIHANDLE) -> u16 { @@ -1294,7 +1268,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetPatchFileListA(szproductcode : windows_core::PCSTR, szpatchpackages : windows_core::PCSTR, pcfiles : *mut u32, pphfilerecords : *mut *mut MSIHANDLE) -> u32); - unsafe { MsiGetPatchFileListA(szproductcode.param().abi(), szpatchpackages.param().abi(), core::mem::transmute(pcfiles), core::mem::transmute(pphfilerecords)) } + unsafe { MsiGetPatchFileListA(szproductcode.param().abi(), szpatchpackages.param().abi(), pcfiles as _, pphfilerecords as _) } } #[inline] pub unsafe fn MsiGetPatchFileListW(szproductcode: P0, szpatchpackages: P1, pcfiles: *mut u32, pphfilerecords: *mut *mut MSIHANDLE) -> u32 @@ -1303,7 +1277,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetPatchFileListW(szproductcode : windows_core::PCWSTR, szpatchpackages : windows_core::PCWSTR, pcfiles : *mut u32, pphfilerecords : *mut *mut MSIHANDLE) -> u32); - unsafe { MsiGetPatchFileListW(szproductcode.param().abi(), szpatchpackages.param().abi(), core::mem::transmute(pcfiles), core::mem::transmute(pphfilerecords)) } + unsafe { MsiGetPatchFileListW(szproductcode.param().abi(), szpatchpackages.param().abi(), pcfiles as _, pphfilerecords as _) } } #[inline] pub unsafe fn MsiGetPatchInfoA(szpatch: P0, szattribute: P1, lpvaluebuf: Option, pcchvaluebuf: Option<*mut u32>) -> u32 @@ -1312,7 +1286,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetPatchInfoA(szpatch : windows_core::PCSTR, szattribute : windows_core::PCSTR, lpvaluebuf : windows_core::PSTR, pcchvaluebuf : *mut u32) -> u32); - unsafe { 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()))) } + unsafe { MsiGetPatchInfoA(szpatch.param().abi(), szattribute.param().abi(), lpvaluebuf.unwrap_or(core::mem::zeroed()) as _, pcchvaluebuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiGetPatchInfoExA(szpatchcode: P0, szproductcode: P1, szusersid: P2, dwcontext: MSIINSTALLCONTEXT, szproperty: P4, lpvalue: Option, pcchvalue: Option<*mut u32>) -> u32 @@ -1323,7 +1297,7 @@ 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); - unsafe { MsiGetPatchInfoExA(szpatchcode.param().abi(), szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szproperty.param().abi(), core::mem::transmute(lpvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvalue.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiGetPatchInfoExA(szpatchcode.param().abi(), szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szproperty.param().abi(), lpvalue.unwrap_or(core::mem::zeroed()) as _, pcchvalue.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiGetPatchInfoExW(szpatchcode: P0, szproductcode: P1, szusersid: P2, dwcontext: MSIINSTALLCONTEXT, szproperty: P4, lpvalue: Option, pcchvalue: Option<*mut u32>) -> u32 @@ -1334,7 +1308,7 @@ 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); - unsafe { MsiGetPatchInfoExW(szpatchcode.param().abi(), szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szproperty.param().abi(), core::mem::transmute(lpvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvalue.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiGetPatchInfoExW(szpatchcode.param().abi(), szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szproperty.param().abi(), lpvalue.unwrap_or(core::mem::zeroed()) as _, pcchvalue.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiGetPatchInfoW(szpatch: P0, szattribute: P1, lpvaluebuf: Option, pcchvaluebuf: Option<*mut u32>) -> u32 @@ -1343,7 +1317,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetPatchInfoW(szpatch : windows_core::PCWSTR, szattribute : windows_core::PCWSTR, lpvaluebuf : windows_core::PWSTR, pcchvaluebuf : *mut u32) -> u32); - unsafe { 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()))) } + unsafe { MsiGetPatchInfoW(szpatch.param().abi(), szattribute.param().abi(), lpvaluebuf.unwrap_or(core::mem::zeroed()) as _, pcchvaluebuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiGetProductCodeA(szcomponent: P0, lpbuf39: windows_core::PSTR) -> u32 @@ -1368,7 +1342,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetProductInfoA(szproduct : windows_core::PCSTR, szattribute : windows_core::PCSTR, lpvaluebuf : windows_core::PSTR, pcchvaluebuf : *mut u32) -> u32); - unsafe { 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()))) } + unsafe { MsiGetProductInfoA(szproduct.param().abi(), szattribute.param().abi(), lpvaluebuf.unwrap_or(core::mem::zeroed()) as _, pcchvaluebuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiGetProductInfoExA(szproductcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, szproperty: P3, szvalue: Option, pcchvalue: Option<*mut u32>) -> u32 @@ -1378,7 +1352,7 @@ where 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); - unsafe { MsiGetProductInfoExA(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szproperty.param().abi(), core::mem::transmute(szvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvalue.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiGetProductInfoExA(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szproperty.param().abi(), szvalue.unwrap_or(core::mem::zeroed()) as _, pcchvalue.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiGetProductInfoExW(szproductcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, szproperty: P3, szvalue: Option, pcchvalue: Option<*mut u32>) -> u32 @@ -1388,7 +1362,7 @@ where 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); - unsafe { MsiGetProductInfoExW(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szproperty.param().abi(), core::mem::transmute(szvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvalue.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiGetProductInfoExW(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szproperty.param().abi(), szvalue.unwrap_or(core::mem::zeroed()) as _, pcchvalue.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -1396,18 +1370,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetProductInfoFromScriptA(szscriptfile : windows_core::PCSTR, lpproductbuf39 : windows_core::PSTR, plgidlanguage : *mut u16, pdwversion : *mut u32, lpnamebuf : windows_core::PSTR, pcchnamebuf : *mut u32, lppackagebuf : windows_core::PSTR, pcchpackagebuf : *mut u32) -> u32); - unsafe { - 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())), - ) - } + unsafe { MsiGetProductInfoFromScriptA(szscriptfile.param().abi(), lpproductbuf39.unwrap_or(core::mem::zeroed()) as _, plgidlanguage.unwrap_or(core::mem::zeroed()) as _, pdwversion.unwrap_or(core::mem::zeroed()) as _, lpnamebuf.unwrap_or(core::mem::zeroed()) as _, pcchnamebuf.unwrap_or(core::mem::zeroed()) as _, lppackagebuf.unwrap_or(core::mem::zeroed()) as _, pcchpackagebuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -1415,18 +1378,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetProductInfoFromScriptW(szscriptfile : windows_core::PCWSTR, lpproductbuf39 : windows_core::PWSTR, plgidlanguage : *mut u16, pdwversion : *mut u32, lpnamebuf : windows_core::PWSTR, pcchnamebuf : *mut u32, lppackagebuf : windows_core::PWSTR, pcchpackagebuf : *mut u32) -> u32); - unsafe { - 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())), - ) - } + unsafe { MsiGetProductInfoFromScriptW(szscriptfile.param().abi(), lpproductbuf39.unwrap_or(core::mem::zeroed()) as _, plgidlanguage.unwrap_or(core::mem::zeroed()) as _, pdwversion.unwrap_or(core::mem::zeroed()) as _, lpnamebuf.unwrap_or(core::mem::zeroed()) as _, pcchnamebuf.unwrap_or(core::mem::zeroed()) as _, lppackagebuf.unwrap_or(core::mem::zeroed()) as _, pcchpackagebuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiGetProductInfoW(szproduct: P0, szattribute: P1, lpvaluebuf: Option, pcchvaluebuf: Option<*mut u32>) -> u32 @@ -1435,7 +1387,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetProductInfoW(szproduct : windows_core::PCWSTR, szattribute : windows_core::PCWSTR, lpvaluebuf : windows_core::PWSTR, pcchvaluebuf : *mut u32) -> u32); - unsafe { 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()))) } + unsafe { MsiGetProductInfoW(szproduct.param().abi(), szattribute.param().abi(), lpvaluebuf.unwrap_or(core::mem::zeroed()) as _, pcchvaluebuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiGetProductPropertyA(hproduct: MSIHANDLE, szproperty: P1, lpvaluebuf: Option, pcchvaluebuf: Option<*mut u32>) -> u32 @@ -1443,7 +1395,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetProductPropertyA(hproduct : MSIHANDLE, szproperty : windows_core::PCSTR, lpvaluebuf : windows_core::PSTR, pcchvaluebuf : *mut u32) -> u32); - unsafe { MsiGetProductPropertyA(hproduct, szproperty.param().abi(), core::mem::transmute(lpvaluebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvaluebuf.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiGetProductPropertyA(hproduct, szproperty.param().abi(), lpvaluebuf.unwrap_or(core::mem::zeroed()) as _, pcchvaluebuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiGetProductPropertyW(hproduct: MSIHANDLE, szproperty: P1, lpvaluebuf: Option, pcchvaluebuf: Option<*mut u32>) -> u32 @@ -1451,7 +1403,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetProductPropertyW(hproduct : MSIHANDLE, szproperty : windows_core::PCWSTR, lpvaluebuf : windows_core::PWSTR, pcchvaluebuf : *mut u32) -> u32); - unsafe { MsiGetProductPropertyW(hproduct, szproperty.param().abi(), core::mem::transmute(lpvaluebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvaluebuf.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiGetProductPropertyW(hproduct, szproperty.param().abi(), lpvaluebuf.unwrap_or(core::mem::zeroed()) as _, pcchvaluebuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiGetPropertyA(hinstall: MSIHANDLE, szname: P1, szvaluebuf: Option, pcchvaluebuf: Option<*mut u32>) -> u32 @@ -1459,7 +1411,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetPropertyA(hinstall : MSIHANDLE, szname : windows_core::PCSTR, szvaluebuf : windows_core::PSTR, pcchvaluebuf : *mut u32) -> u32); - unsafe { MsiGetPropertyA(hinstall, szname.param().abi(), core::mem::transmute(szvaluebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvaluebuf.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiGetPropertyA(hinstall, szname.param().abi(), szvaluebuf.unwrap_or(core::mem::zeroed()) as _, pcchvaluebuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiGetPropertyW(hinstall: MSIHANDLE, szname: P1, szvaluebuf: Option, pcchvaluebuf: Option<*mut u32>) -> u32 @@ -1467,7 +1419,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetPropertyW(hinstall : MSIHANDLE, szname : windows_core::PCWSTR, szvaluebuf : windows_core::PWSTR, pcchvaluebuf : *mut u32) -> u32); - unsafe { MsiGetPropertyW(hinstall, szname.param().abi(), core::mem::transmute(szvaluebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvaluebuf.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiGetPropertyW(hinstall, szname.param().abi(), szvaluebuf.unwrap_or(core::mem::zeroed()) as _, pcchvaluebuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiGetShortcutTargetA(szshortcutpath: P0, szproductcode: Option, szfeatureid: Option, szcomponentcode: Option) -> u32 @@ -1475,7 +1427,7 @@ 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); - unsafe { 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()))) } + unsafe { MsiGetShortcutTargetA(szshortcutpath.param().abi(), szproductcode.unwrap_or(core::mem::zeroed()) as _, szfeatureid.unwrap_or(core::mem::zeroed()) as _, szcomponentcode.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiGetShortcutTargetW(szshortcutpath: P0, szproductcode: Option, szfeatureid: Option, szcomponentcode: Option) -> u32 @@ -1483,7 +1435,7 @@ 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); - unsafe { 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()))) } + unsafe { MsiGetShortcutTargetW(szshortcutpath.param().abi(), szproductcode.unwrap_or(core::mem::zeroed()) as _, szfeatureid.unwrap_or(core::mem::zeroed()) as _, szcomponentcode.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiGetSourcePathA(hinstall: MSIHANDLE, szfolder: P1, szpathbuf: Option, pcchpathbuf: Option<*mut u32>) -> u32 @@ -1491,7 +1443,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetSourcePathA(hinstall : MSIHANDLE, szfolder : windows_core::PCSTR, szpathbuf : windows_core::PSTR, pcchpathbuf : *mut u32) -> u32); - unsafe { MsiGetSourcePathA(hinstall, szfolder.param().abi(), core::mem::transmute(szpathbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchpathbuf.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiGetSourcePathA(hinstall, szfolder.param().abi(), szpathbuf.unwrap_or(core::mem::zeroed()) as _, pcchpathbuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiGetSourcePathW(hinstall: MSIHANDLE, szfolder: P1, szpathbuf: Option, pcchpathbuf: Option<*mut u32>) -> u32 @@ -1499,7 +1451,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetSourcePathW(hinstall : MSIHANDLE, szfolder : windows_core::PCWSTR, szpathbuf : windows_core::PWSTR, pcchpathbuf : *mut u32) -> u32); - unsafe { MsiGetSourcePathW(hinstall, szfolder.param().abi(), core::mem::transmute(szpathbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchpathbuf.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiGetSourcePathW(hinstall, szfolder.param().abi(), szpathbuf.unwrap_or(core::mem::zeroed()) as _, pcchpathbuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiGetSummaryInformationA(hdatabase: MSIHANDLE, szdatabasepath: P1, uiupdatecount: u32, phsummaryinfo: *mut MSIHANDLE) -> u32 @@ -1507,7 +1459,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetSummaryInformationA(hdatabase : MSIHANDLE, szdatabasepath : windows_core::PCSTR, uiupdatecount : u32, phsummaryinfo : *mut MSIHANDLE) -> u32); - unsafe { MsiGetSummaryInformationA(hdatabase, szdatabasepath.param().abi(), uiupdatecount, core::mem::transmute(phsummaryinfo)) } + unsafe { MsiGetSummaryInformationA(hdatabase, szdatabasepath.param().abi(), uiupdatecount, phsummaryinfo as _) } } #[inline] pub unsafe fn MsiGetSummaryInformationW(hdatabase: MSIHANDLE, szdatabasepath: P1, uiupdatecount: u32, phsummaryinfo: *mut MSIHANDLE) -> u32 @@ -1515,7 +1467,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetSummaryInformationW(hdatabase : MSIHANDLE, szdatabasepath : windows_core::PCWSTR, uiupdatecount : u32, phsummaryinfo : *mut MSIHANDLE) -> u32); - unsafe { MsiGetSummaryInformationW(hdatabase, szdatabasepath.param().abi(), uiupdatecount, core::mem::transmute(phsummaryinfo)) } + unsafe { MsiGetSummaryInformationW(hdatabase, szdatabasepath.param().abi(), uiupdatecount, phsummaryinfo as _) } } #[inline] pub unsafe fn MsiGetTargetPathA(hinstall: MSIHANDLE, szfolder: P1, szpathbuf: Option, pcchpathbuf: Option<*mut u32>) -> u32 @@ -1523,7 +1475,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetTargetPathA(hinstall : MSIHANDLE, szfolder : windows_core::PCSTR, szpathbuf : windows_core::PSTR, pcchpathbuf : *mut u32) -> u32); - unsafe { MsiGetTargetPathA(hinstall, szfolder.param().abi(), core::mem::transmute(szpathbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchpathbuf.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiGetTargetPathA(hinstall, szfolder.param().abi(), szpathbuf.unwrap_or(core::mem::zeroed()) as _, pcchpathbuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiGetTargetPathW(hinstall: MSIHANDLE, szfolder: P1, szpathbuf: Option, pcchpathbuf: Option<*mut u32>) -> u32 @@ -1531,7 +1483,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetTargetPathW(hinstall : MSIHANDLE, szfolder : windows_core::PCWSTR, szpathbuf : windows_core::PWSTR, pcchpathbuf : *mut u32) -> u32); - unsafe { MsiGetTargetPathW(hinstall, szfolder.param().abi(), core::mem::transmute(szpathbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchpathbuf.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiGetTargetPathW(hinstall, szfolder.param().abi(), szpathbuf.unwrap_or(core::mem::zeroed()) as _, pcchpathbuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -1539,7 +1491,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetUserInfoA(szproduct : windows_core::PCSTR, lpusernamebuf : windows_core::PSTR, pcchusernamebuf : *mut u32, lporgnamebuf : windows_core::PSTR, pcchorgnamebuf : *mut u32, lpserialbuf : windows_core::PSTR, pcchserialbuf : *mut u32) -> USERINFOSTATE); - unsafe { 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()))) } + unsafe { MsiGetUserInfoA(szproduct.param().abi(), lpusernamebuf.unwrap_or(core::mem::zeroed()) as _, pcchusernamebuf.unwrap_or(core::mem::zeroed()) as _, lporgnamebuf.unwrap_or(core::mem::zeroed()) as _, pcchorgnamebuf.unwrap_or(core::mem::zeroed()) as _, lpserialbuf.unwrap_or(core::mem::zeroed()) as _, pcchserialbuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -1547,7 +1499,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetUserInfoW(szproduct : windows_core::PCWSTR, lpusernamebuf : windows_core::PWSTR, pcchusernamebuf : *mut u32, lporgnamebuf : windows_core::PWSTR, pcchorgnamebuf : *mut u32, lpserialbuf : windows_core::PWSTR, pcchserialbuf : *mut u32) -> USERINFOSTATE); - unsafe { 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()))) } + unsafe { MsiGetUserInfoW(szproduct.param().abi(), lpusernamebuf.unwrap_or(core::mem::zeroed()) as _, pcchusernamebuf.unwrap_or(core::mem::zeroed()) as _, lporgnamebuf.unwrap_or(core::mem::zeroed()) as _, pcchorgnamebuf.unwrap_or(core::mem::zeroed()) as _, lpserialbuf.unwrap_or(core::mem::zeroed()) as _, pcchserialbuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiInstallMissingComponentA(szproduct: P0, szcomponent: P1, einstallstate: INSTALLSTATE) -> u32 @@ -1609,7 +1561,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiIsProductElevatedA(szproduct : windows_core::PCSTR, pfelevated : *mut super::super::Foundation:: BOOL) -> u32); - unsafe { MsiIsProductElevatedA(szproduct.param().abi(), core::mem::transmute(pfelevated)) } + unsafe { MsiIsProductElevatedA(szproduct.param().abi(), pfelevated as _) } } #[inline] pub unsafe fn MsiIsProductElevatedW(szproduct: P0, pfelevated: *mut super::super::Foundation::BOOL) -> u32 @@ -1617,12 +1569,12 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiIsProductElevatedW(szproduct : windows_core::PCWSTR, pfelevated : *mut super::super::Foundation:: BOOL) -> u32); - unsafe { MsiIsProductElevatedW(szproduct.param().abi(), core::mem::transmute(pfelevated)) } + unsafe { MsiIsProductElevatedW(szproduct.param().abi(), pfelevated as _) } } #[inline] 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); - unsafe { MsiJoinTransaction(htransactionhandle, dwtransactionattributes, core::mem::transmute(phchangeofownerevent)) } + unsafe { MsiJoinTransaction(htransactionhandle, dwtransactionattributes, phchangeofownerevent as _) } } #[inline] pub unsafe fn MsiLocateComponentA(szcomponent: P0, lppathbuf: Option, pcchbuf: Option<*mut u32>) -> INSTALLSTATE @@ -1630,7 +1582,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiLocateComponentA(szcomponent : windows_core::PCSTR, lppathbuf : windows_core::PSTR, pcchbuf : *mut u32) -> INSTALLSTATE); - unsafe { MsiLocateComponentA(szcomponent.param().abi(), core::mem::transmute(lppathbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuf.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiLocateComponentA(szcomponent.param().abi(), lppathbuf.unwrap_or(core::mem::zeroed()) as _, pcchbuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiLocateComponentW(szcomponent: P0, lppathbuf: Option, pcchbuf: Option<*mut u32>) -> INSTALLSTATE @@ -1638,7 +1590,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiLocateComponentW(szcomponent : windows_core::PCWSTR, lppathbuf : windows_core::PWSTR, pcchbuf : *mut u32) -> INSTALLSTATE); - unsafe { MsiLocateComponentW(szcomponent.param().abi(), core::mem::transmute(lppathbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuf.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiLocateComponentW(szcomponent.param().abi(), lppathbuf.unwrap_or(core::mem::zeroed()) as _, pcchbuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiNotifySidChangeA(poldsid: P0, pnewsid: P1) -> u32 @@ -1665,7 +1617,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiOpenDatabaseA(szdatabasepath : windows_core::PCSTR, szpersist : windows_core::PCSTR, phdatabase : *mut MSIHANDLE) -> u32); - unsafe { MsiOpenDatabaseA(szdatabasepath.param().abi(), szpersist.param().abi(), core::mem::transmute(phdatabase)) } + unsafe { MsiOpenDatabaseA(szdatabasepath.param().abi(), szpersist.param().abi(), phdatabase as _) } } #[inline] pub unsafe fn MsiOpenDatabaseW(szdatabasepath: P0, szpersist: P1, phdatabase: *mut MSIHANDLE) -> u32 @@ -1674,7 +1626,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiOpenDatabaseW(szdatabasepath : windows_core::PCWSTR, szpersist : windows_core::PCWSTR, phdatabase : *mut MSIHANDLE) -> u32); - unsafe { MsiOpenDatabaseW(szdatabasepath.param().abi(), szpersist.param().abi(), core::mem::transmute(phdatabase)) } + unsafe { MsiOpenDatabaseW(szdatabasepath.param().abi(), szpersist.param().abi(), phdatabase as _) } } #[inline] pub unsafe fn MsiOpenPackageA(szpackagepath: P0, hproduct: *mut MSIHANDLE) -> u32 @@ -1682,7 +1634,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiOpenPackageA(szpackagepath : windows_core::PCSTR, hproduct : *mut MSIHANDLE) -> u32); - unsafe { MsiOpenPackageA(szpackagepath.param().abi(), core::mem::transmute(hproduct)) } + unsafe { MsiOpenPackageA(szpackagepath.param().abi(), hproduct as _) } } #[inline] pub unsafe fn MsiOpenPackageExA(szpackagepath: P0, dwoptions: u32, hproduct: *mut MSIHANDLE) -> u32 @@ -1690,7 +1642,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiOpenPackageExA(szpackagepath : windows_core::PCSTR, dwoptions : u32, hproduct : *mut MSIHANDLE) -> u32); - unsafe { MsiOpenPackageExA(szpackagepath.param().abi(), dwoptions, core::mem::transmute(hproduct)) } + unsafe { MsiOpenPackageExA(szpackagepath.param().abi(), dwoptions, hproduct as _) } } #[inline] pub unsafe fn MsiOpenPackageExW(szpackagepath: P0, dwoptions: u32, hproduct: *mut MSIHANDLE) -> u32 @@ -1698,7 +1650,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiOpenPackageExW(szpackagepath : windows_core::PCWSTR, dwoptions : u32, hproduct : *mut MSIHANDLE) -> u32); - unsafe { MsiOpenPackageExW(szpackagepath.param().abi(), dwoptions, core::mem::transmute(hproduct)) } + unsafe { MsiOpenPackageExW(szpackagepath.param().abi(), dwoptions, hproduct as _) } } #[inline] pub unsafe fn MsiOpenPackageW(szpackagepath: P0, hproduct: *mut MSIHANDLE) -> u32 @@ -1706,7 +1658,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiOpenPackageW(szpackagepath : windows_core::PCWSTR, hproduct : *mut MSIHANDLE) -> u32); - unsafe { MsiOpenPackageW(szpackagepath.param().abi(), core::mem::transmute(hproduct)) } + unsafe { MsiOpenPackageW(szpackagepath.param().abi(), hproduct as _) } } #[inline] pub unsafe fn MsiOpenProductA(szproduct: P0, hproduct: *mut MSIHANDLE) -> u32 @@ -1714,7 +1666,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiOpenProductA(szproduct : windows_core::PCSTR, hproduct : *mut MSIHANDLE) -> u32); - unsafe { MsiOpenProductA(szproduct.param().abi(), core::mem::transmute(hproduct)) } + unsafe { MsiOpenProductA(szproduct.param().abi(), hproduct as _) } } #[inline] pub unsafe fn MsiOpenProductW(szproduct: P0, hproduct: *mut MSIHANDLE) -> u32 @@ -1722,7 +1674,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiOpenProductW(szproduct : windows_core::PCWSTR, hproduct : *mut MSIHANDLE) -> u32); - unsafe { MsiOpenProductW(szproduct.param().abi(), core::mem::transmute(hproduct)) } + unsafe { MsiOpenProductW(szproduct.param().abi(), hproduct as _) } } #[inline] pub unsafe fn MsiPreviewBillboardA(hpreview: MSIHANDLE, szcontrolname: P1, szbillboard: P2) -> u32 @@ -1766,7 +1718,7 @@ where P1: 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); - unsafe { MsiProcessAdvertiseScriptA(szscriptfile.param().abi(), sziconfolder.param().abi(), core::mem::transmute(hregdata.unwrap_or(core::mem::zeroed())), fshortcuts.into(), fremoveitems.into()) } + unsafe { MsiProcessAdvertiseScriptA(szscriptfile.param().abi(), sziconfolder.param().abi(), hregdata.unwrap_or(core::mem::zeroed()) as _, fshortcuts.into(), fremoveitems.into()) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -1776,7 +1728,7 @@ where P1: 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); - unsafe { MsiProcessAdvertiseScriptW(szscriptfile.param().abi(), sziconfolder.param().abi(), core::mem::transmute(hregdata.unwrap_or(core::mem::zeroed())), fshortcuts.into(), fremoveitems.into()) } + unsafe { MsiProcessAdvertiseScriptW(szscriptfile.param().abi(), sziconfolder.param().abi(), hregdata.unwrap_or(core::mem::zeroed()) as _, fshortcuts.into(), fremoveitems.into()) } } #[inline] pub unsafe fn MsiProcessMessage(hinstall: MSIHANDLE, emessagetype: INSTALLMESSAGE, hrecord: MSIHANDLE) -> i32 { @@ -1790,7 +1742,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiProvideAssemblyA(szassemblyname : windows_core::PCSTR, szappcontext : windows_core::PCSTR, dwinstallmode : u32, dwassemblyinfo : MSIASSEMBLYINFO, lppathbuf : windows_core::PSTR, pcchpathbuf : *mut u32) -> u32); - unsafe { MsiProvideAssemblyA(szassemblyname.param().abi(), szappcontext.param().abi(), dwinstallmode.0 as _, dwassemblyinfo, core::mem::transmute(lppathbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchpathbuf.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiProvideAssemblyA(szassemblyname.param().abi(), szappcontext.param().abi(), dwinstallmode.0 as _, dwassemblyinfo, lppathbuf.unwrap_or(core::mem::zeroed()) as _, pcchpathbuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiProvideAssemblyW(szassemblyname: P0, szappcontext: P1, dwinstallmode: INSTALLMODE, dwassemblyinfo: MSIASSEMBLYINFO, lppathbuf: Option, pcchpathbuf: Option<*mut u32>) -> u32 @@ -1799,7 +1751,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiProvideAssemblyW(szassemblyname : windows_core::PCWSTR, szappcontext : windows_core::PCWSTR, dwinstallmode : u32, dwassemblyinfo : MSIASSEMBLYINFO, lppathbuf : windows_core::PWSTR, pcchpathbuf : *mut u32) -> u32); - unsafe { MsiProvideAssemblyW(szassemblyname.param().abi(), szappcontext.param().abi(), dwinstallmode.0 as _, dwassemblyinfo, core::mem::transmute(lppathbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchpathbuf.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiProvideAssemblyW(szassemblyname.param().abi(), szappcontext.param().abi(), dwinstallmode.0 as _, dwassemblyinfo, lppathbuf.unwrap_or(core::mem::zeroed()) as _, pcchpathbuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiProvideComponentA(szproduct: P0, szfeature: P1, szcomponent: P2, dwinstallmode: INSTALLMODE, lppathbuf: Option, pcchpathbuf: Option<*mut u32>) -> u32 @@ -1809,7 +1761,7 @@ where P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiProvideComponentA(szproduct : windows_core::PCSTR, szfeature : windows_core::PCSTR, szcomponent : windows_core::PCSTR, dwinstallmode : u32, lppathbuf : windows_core::PSTR, pcchpathbuf : *mut u32) -> u32); - unsafe { 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()))) } + unsafe { MsiProvideComponentA(szproduct.param().abi(), szfeature.param().abi(), szcomponent.param().abi(), dwinstallmode.0 as _, lppathbuf.unwrap_or(core::mem::zeroed()) as _, pcchpathbuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiProvideComponentW(szproduct: P0, szfeature: P1, szcomponent: P2, dwinstallmode: INSTALLMODE, lppathbuf: Option, pcchpathbuf: Option<*mut u32>) -> u32 @@ -1819,7 +1771,7 @@ where P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiProvideComponentW(szproduct : windows_core::PCWSTR, szfeature : windows_core::PCWSTR, szcomponent : windows_core::PCWSTR, dwinstallmode : u32, lppathbuf : windows_core::PWSTR, pcchpathbuf : *mut u32) -> u32); - unsafe { 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()))) } + unsafe { MsiProvideComponentW(szproduct.param().abi(), szfeature.param().abi(), szcomponent.param().abi(), dwinstallmode.0 as _, lppathbuf.unwrap_or(core::mem::zeroed()) as _, pcchpathbuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiProvideQualifiedComponentA(szcategory: P0, szqualifier: P1, dwinstallmode: INSTALLMODE, lppathbuf: Option, pcchpathbuf: Option<*mut u32>) -> u32 @@ -1828,7 +1780,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiProvideQualifiedComponentA(szcategory : windows_core::PCSTR, szqualifier : windows_core::PCSTR, dwinstallmode : u32, lppathbuf : windows_core::PSTR, pcchpathbuf : *mut u32) -> u32); - unsafe { 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()))) } + unsafe { MsiProvideQualifiedComponentA(szcategory.param().abi(), szqualifier.param().abi(), dwinstallmode.0 as _, lppathbuf.unwrap_or(core::mem::zeroed()) as _, pcchpathbuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiProvideQualifiedComponentExA(szcategory: P0, szqualifier: P1, dwinstallmode: INSTALLMODE, szproduct: P3, dwunused1: Option, dwunused2: Option, lppathbuf: Option, pcchpathbuf: Option<*mut u32>) -> u32 @@ -1838,7 +1790,7 @@ where 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); - unsafe { 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()))) } + unsafe { MsiProvideQualifiedComponentExA(szcategory.param().abi(), szqualifier.param().abi(), dwinstallmode.0 as _, szproduct.param().abi(), dwunused1.unwrap_or(core::mem::zeroed()) as _, dwunused2.unwrap_or(core::mem::zeroed()) as _, lppathbuf.unwrap_or(core::mem::zeroed()) as _, pcchpathbuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiProvideQualifiedComponentExW(szcategory: P0, szqualifier: P1, dwinstallmode: INSTALLMODE, szproduct: P3, dwunused1: Option, dwunused2: Option, lppathbuf: Option, pcchpathbuf: Option<*mut u32>) -> u32 @@ -1848,7 +1800,7 @@ where 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); - unsafe { 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()))) } + unsafe { MsiProvideQualifiedComponentExW(szcategory.param().abi(), szqualifier.param().abi(), dwinstallmode.0 as _, szproduct.param().abi(), dwunused1.unwrap_or(core::mem::zeroed()) as _, dwunused2.unwrap_or(core::mem::zeroed()) as _, lppathbuf.unwrap_or(core::mem::zeroed()) as _, pcchpathbuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiProvideQualifiedComponentW(szcategory: P0, szqualifier: P1, dwinstallmode: INSTALLMODE, lppathbuf: Option, pcchpathbuf: Option<*mut u32>) -> u32 @@ -1857,7 +1809,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiProvideQualifiedComponentW(szcategory : windows_core::PCWSTR, szqualifier : windows_core::PCWSTR, dwinstallmode : u32, lppathbuf : windows_core::PWSTR, pcchpathbuf : *mut u32) -> u32); - unsafe { 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()))) } + unsafe { MsiProvideQualifiedComponentW(szcategory.param().abi(), szqualifier.param().abi(), dwinstallmode.0 as _, lppathbuf.unwrap_or(core::mem::zeroed()) as _, pcchpathbuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiQueryComponentStateA(szproductcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, szcomponentcode: P3, pdwstate: Option<*mut INSTALLSTATE>) -> u32 @@ -1867,7 +1819,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); - unsafe { MsiQueryComponentStateA(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szcomponentcode.param().abi(), core::mem::transmute(pdwstate.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiQueryComponentStateA(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szcomponentcode.param().abi(), pdwstate.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiQueryComponentStateW(szproductcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, szcomponentcode: P3, pdwstate: Option<*mut INSTALLSTATE>) -> u32 @@ -1877,7 +1829,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); - unsafe { MsiQueryComponentStateW(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szcomponentcode.param().abi(), core::mem::transmute(pdwstate.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiQueryComponentStateW(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szcomponentcode.param().abi(), pdwstate.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiQueryFeatureStateA(szproduct: P0, szfeature: P1) -> INSTALLSTATE @@ -1896,7 +1848,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); - unsafe { MsiQueryFeatureStateExA(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szfeature.param().abi(), core::mem::transmute(pdwstate.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiQueryFeatureStateExA(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szfeature.param().abi(), pdwstate.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiQueryFeatureStateExW(szproductcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, szfeature: P3, pdwstate: Option<*mut INSTALLSTATE>) -> u32 @@ -1906,7 +1858,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); - unsafe { MsiQueryFeatureStateExW(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szfeature.param().abi(), core::mem::transmute(pdwstate.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiQueryFeatureStateExW(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szfeature.param().abi(), pdwstate.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiQueryFeatureStateW(szproduct: P0, szfeature: P1) -> INSTALLSTATE @@ -1956,12 +1908,12 @@ pub unsafe fn MsiRecordGetInteger(hrecord: MSIHANDLE, ifield: u32) -> i32 { #[inline] 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); - unsafe { MsiRecordGetStringA(hrecord, ifield, core::mem::transmute(szvaluebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvaluebuf.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiRecordGetStringA(hrecord, ifield, szvaluebuf.unwrap_or(core::mem::zeroed()) as _, pcchvaluebuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { MsiRecordGetStringW(hrecord, ifield, core::mem::transmute(szvaluebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvaluebuf.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiRecordGetStringW(hrecord, ifield, szvaluebuf.unwrap_or(core::mem::zeroed()) as _, pcchvaluebuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiRecordIsNull(hrecord: MSIHANDLE, ifield: u32) -> super::super::Foundation::BOOL { @@ -1971,7 +1923,7 @@ pub unsafe fn MsiRecordIsNull(hrecord: MSIHANDLE, ifield: u32) -> super::super:: #[inline] 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); - unsafe { MsiRecordReadStream(hrecord, ifield, core::mem::transmute(szdatabuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdatabuf)) } + unsafe { MsiRecordReadStream(hrecord, ifield, szdatabuf.unwrap_or(core::mem::zeroed()) as _, pcbdatabuf as _) } } #[inline] pub unsafe fn MsiRecordSetInteger(hrecord: MSIHANDLE, ifield: u32, ivalue: i32) -> u32 { @@ -2099,17 +2051,17 @@ where #[inline] 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); - unsafe { MsiSetExternalUIA(core::mem::transmute(puihandler.unwrap_or(core::mem::zeroed())), dwmessagefilter, core::mem::transmute(pvcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiSetExternalUIA(puihandler.unwrap_or(core::mem::zeroed()) as _, dwmessagefilter, pvcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { MsiSetExternalUIRecord(core::mem::transmute(puihandler.unwrap_or(core::mem::zeroed())), dwmessagefilter, core::mem::transmute(pvcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppuiprevhandler.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiSetExternalUIRecord(puihandler.unwrap_or(core::mem::zeroed()) as _, dwmessagefilter, pvcontext.unwrap_or(core::mem::zeroed()) as _, ppuiprevhandler.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { MsiSetExternalUIW(core::mem::transmute(puihandler.unwrap_or(core::mem::zeroed())), dwmessagefilter, core::mem::transmute(pvcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiSetExternalUIW(puihandler.unwrap_or(core::mem::zeroed()) as _, dwmessagefilter, pvcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiSetFeatureAttributesA(hinstall: MSIHANDLE, szfeature: P1, dwattributes: u32) -> u32 @@ -2151,7 +2103,7 @@ pub unsafe fn MsiSetInstallLevel(hinstall: MSIHANDLE, iinstalllevel: i32) -> u32 #[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); - unsafe { MsiSetInternalUI(dwuilevel, core::mem::transmute(phwnd.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiSetInternalUI(dwuilevel, phwnd.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiSetMode(hinstall: MSIHANDLE, erunmode: MSIRUNMODE, fstate: bool) -> u32 { @@ -2224,7 +2176,7 @@ where 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); - unsafe { MsiSourceListAddSourceA(szproduct.param().abi(), szusername.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), szsource.param().abi()) } + unsafe { MsiSourceListAddSourceA(szproduct.param().abi(), szusername.param().abi(), dwreserved.unwrap_or(core::mem::zeroed()) as _, szsource.param().abi()) } } #[inline] pub unsafe fn MsiSourceListAddSourceExA(szproductcodeorpatchcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwoptions: u32, szsource: P4, dwindex: u32) -> u32 @@ -2254,7 +2206,7 @@ where 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); - unsafe { MsiSourceListAddSourceW(szproduct.param().abi(), szusername.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), szsource.param().abi()) } + unsafe { MsiSourceListAddSourceW(szproduct.param().abi(), szusername.param().abi(), dwreserved.unwrap_or(core::mem::zeroed()) as _, szsource.param().abi()) } } #[inline] pub unsafe fn MsiSourceListClearAllA(szproduct: P0, szusername: P1, dwreserved: Option) -> u32 @@ -2263,7 +2215,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSourceListClearAllA(szproduct : windows_core::PCSTR, szusername : windows_core::PCSTR, dwreserved : u32) -> u32); - unsafe { MsiSourceListClearAllA(szproduct.param().abi(), szusername.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiSourceListClearAllA(szproduct.param().abi(), szusername.param().abi(), dwreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiSourceListClearAllExA(szproductcodeorpatchcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwoptions: u32) -> u32 @@ -2290,7 +2242,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSourceListClearAllW(szproduct : windows_core::PCWSTR, szusername : windows_core::PCWSTR, dwreserved : u32) -> u32); - unsafe { MsiSourceListClearAllW(szproduct.param().abi(), szusername.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiSourceListClearAllW(szproduct.param().abi(), szusername.param().abi(), dwreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiSourceListClearMediaDiskA(szproductcodeorpatchcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwoptions: u32, dwdiskid: u32) -> u32 @@ -2337,7 +2289,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSourceListEnumMediaDisksA(szproductcodeorpatchcode : windows_core::PCSTR, szusersid : windows_core::PCSTR, dwcontext : MSIINSTALLCONTEXT, dwoptions : u32, dwindex : u32, pdwdiskid : *mut u32, szvolumelabel : windows_core::PSTR, pcchvolumelabel : *mut u32, szdiskprompt : windows_core::PSTR, pcchdiskprompt : *mut u32) -> u32); - unsafe { MsiSourceListEnumMediaDisksA(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), dwcontext, dwoptions, 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()))) } + unsafe { MsiSourceListEnumMediaDisksA(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), dwcontext, dwoptions, dwindex, pdwdiskid.unwrap_or(core::mem::zeroed()) as _, szvolumelabel.unwrap_or(core::mem::zeroed()) as _, pcchvolumelabel.unwrap_or(core::mem::zeroed()) as _, szdiskprompt.unwrap_or(core::mem::zeroed()) as _, pcchdiskprompt.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -2346,7 +2298,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSourceListEnumMediaDisksW(szproductcodeorpatchcode : windows_core::PCWSTR, szusersid : windows_core::PCWSTR, dwcontext : MSIINSTALLCONTEXT, dwoptions : u32, dwindex : u32, pdwdiskid : *mut u32, szvolumelabel : windows_core::PWSTR, pcchvolumelabel : *mut u32, szdiskprompt : windows_core::PWSTR, pcchdiskprompt : *mut u32) -> u32); - unsafe { MsiSourceListEnumMediaDisksW(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), dwcontext, dwoptions, 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()))) } + unsafe { MsiSourceListEnumMediaDisksW(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), dwcontext, dwoptions, dwindex, pdwdiskid.unwrap_or(core::mem::zeroed()) as _, szvolumelabel.unwrap_or(core::mem::zeroed()) as _, pcchvolumelabel.unwrap_or(core::mem::zeroed()) as _, szdiskprompt.unwrap_or(core::mem::zeroed()) as _, pcchdiskprompt.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiSourceListEnumSourcesA(szproductcodeorpatchcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwoptions: u32, dwindex: u32, szsource: Option, pcchsource: Option<*mut u32>) -> u32 @@ -2355,7 +2307,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSourceListEnumSourcesA(szproductcodeorpatchcode : windows_core::PCSTR, szusersid : windows_core::PCSTR, dwcontext : MSIINSTALLCONTEXT, dwoptions : u32, dwindex : u32, szsource : windows_core::PSTR, pcchsource : *mut u32) -> u32); - unsafe { MsiSourceListEnumSourcesA(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), dwcontext, dwoptions, dwindex, core::mem::transmute(szsource.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchsource.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiSourceListEnumSourcesA(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), dwcontext, dwoptions, dwindex, szsource.unwrap_or(core::mem::zeroed()) as _, pcchsource.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiSourceListEnumSourcesW(szproductcodeorpatchcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwoptions: u32, dwindex: u32, szsource: Option, pcchsource: Option<*mut u32>) -> u32 @@ -2364,7 +2316,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSourceListEnumSourcesW(szproductcodeorpatchcode : windows_core::PCWSTR, szusersid : windows_core::PCWSTR, dwcontext : MSIINSTALLCONTEXT, dwoptions : u32, dwindex : u32, szsource : windows_core::PWSTR, pcchsource : *mut u32) -> u32); - unsafe { MsiSourceListEnumSourcesW(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), dwcontext, dwoptions, dwindex, core::mem::transmute(szsource.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchsource.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiSourceListEnumSourcesW(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), dwcontext, dwoptions, dwindex, szsource.unwrap_or(core::mem::zeroed()) as _, pcchsource.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiSourceListForceResolutionA(szproduct: P0, szusername: P1, dwreserved: Option) -> u32 @@ -2373,7 +2325,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSourceListForceResolutionA(szproduct : windows_core::PCSTR, szusername : windows_core::PCSTR, dwreserved : u32) -> u32); - unsafe { MsiSourceListForceResolutionA(szproduct.param().abi(), szusername.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiSourceListForceResolutionA(szproduct.param().abi(), szusername.param().abi(), dwreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiSourceListForceResolutionExA(szproductcodeorpatchcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwoptions: u32) -> u32 @@ -2400,7 +2352,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSourceListForceResolutionW(szproduct : windows_core::PCWSTR, szusername : windows_core::PCWSTR, dwreserved : u32) -> u32); - unsafe { MsiSourceListForceResolutionW(szproduct.param().abi(), szusername.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiSourceListForceResolutionW(szproduct.param().abi(), szusername.param().abi(), dwreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiSourceListGetInfoA(szproductcodeorpatchcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwoptions: u32, szproperty: P4, szvalue: Option, pcchvalue: Option<*mut u32>) -> u32 @@ -2410,7 +2362,7 @@ where 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); - unsafe { MsiSourceListGetInfoA(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), dwcontext, dwoptions, szproperty.param().abi(), core::mem::transmute(szvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvalue.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiSourceListGetInfoA(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), dwcontext, dwoptions, szproperty.param().abi(), szvalue.unwrap_or(core::mem::zeroed()) as _, pcchvalue.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiSourceListGetInfoW(szproductcodeorpatchcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwoptions: u32, szproperty: P4, szvalue: Option, pcchvalue: Option<*mut u32>) -> u32 @@ -2420,7 +2372,7 @@ where 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); - unsafe { MsiSourceListGetInfoW(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), dwcontext, dwoptions, szproperty.param().abi(), core::mem::transmute(szvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvalue.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiSourceListGetInfoW(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), dwcontext, dwoptions, szproperty.param().abi(), szvalue.unwrap_or(core::mem::zeroed()) as _, pcchvalue.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiSourceListSetInfoA(szproductcodeorpatchcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwoptions: u32, szproperty: P4, szvalue: P5) -> u32 @@ -2447,17 +2399,17 @@ where #[inline] 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); - unsafe { MsiSummaryInfoGetPropertyA(hsummaryinfo, 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()))) } + unsafe { MsiSummaryInfoGetPropertyA(hsummaryinfo, uiproperty, puidatatype as _, pivalue as _, pftvalue.unwrap_or(core::mem::zeroed()) as _, szvaluebuf.unwrap_or(core::mem::zeroed()) as _, pcchvaluebuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiSummaryInfoGetPropertyCount(hsummaryinfo: MSIHANDLE, puipropertycount: *mut u32) -> u32 { windows_targets::link!("msi.dll" "system" fn MsiSummaryInfoGetPropertyCount(hsummaryinfo : MSIHANDLE, puipropertycount : *mut u32) -> u32); - unsafe { MsiSummaryInfoGetPropertyCount(hsummaryinfo, core::mem::transmute(puipropertycount)) } + unsafe { MsiSummaryInfoGetPropertyCount(hsummaryinfo, puipropertycount as _) } } #[inline] 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); - unsafe { MsiSummaryInfoGetPropertyW(hsummaryinfo, 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()))) } + unsafe { MsiSummaryInfoGetPropertyW(hsummaryinfo, uiproperty, puidatatype as _, pivalue as _, pftvalue.unwrap_or(core::mem::zeroed()) as _, szvaluebuf.unwrap_or(core::mem::zeroed()) as _, pcchvaluebuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiSummaryInfoPersist(hsummaryinfo: MSIHANDLE) -> u32 { @@ -2470,7 +2422,7 @@ where 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); - unsafe { MsiSummaryInfoSetPropertyA(hsummaryinfo, uiproperty, uidatatype, ivalue, core::mem::transmute(pftvalue), szvalue.param().abi()) } + unsafe { MsiSummaryInfoSetPropertyA(hsummaryinfo, uiproperty, uidatatype, ivalue, pftvalue as _, szvalue.param().abi()) } } #[inline] pub unsafe fn MsiSummaryInfoSetPropertyW(hsummaryinfo: MSIHANDLE, uiproperty: u32, uidatatype: u32, ivalue: i32, pftvalue: *mut super::super::Foundation::FILETIME, szvalue: P5) -> u32 @@ -2478,7 +2430,7 @@ where 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); - unsafe { MsiSummaryInfoSetPropertyW(hsummaryinfo, uiproperty, uidatatype, ivalue, core::mem::transmute(pftvalue), szvalue.param().abi()) } + unsafe { MsiSummaryInfoSetPropertyW(hsummaryinfo, uiproperty, uidatatype, ivalue, pftvalue as _, szvalue.param().abi()) } } #[inline] pub unsafe fn MsiUseFeatureA(szproduct: P0, szfeature: P1) -> INSTALLSTATE @@ -2496,7 +2448,7 @@ where 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); - unsafe { MsiUseFeatureExA(szproduct.param().abi(), szfeature.param().abi(), dwinstallmode, core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiUseFeatureExA(szproduct.param().abi(), szfeature.param().abi(), dwinstallmode, dwreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiUseFeatureExW(szproduct: P0, szfeature: P1, dwinstallmode: u32, dwreserved: Option) -> INSTALLSTATE @@ -2505,7 +2457,7 @@ where 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); - unsafe { MsiUseFeatureExW(szproduct.param().abi(), szfeature.param().abi(), dwinstallmode, core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiUseFeatureExW(szproduct.param().abi(), szfeature.param().abi(), dwinstallmode, dwreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiUseFeatureW(szproduct: P0, szfeature: P1) -> INSTALLSTATE @@ -2550,22 +2502,22 @@ pub unsafe fn MsiViewExecute(hview: MSIHANDLE, hrecord: MSIHANDLE) -> u32 { #[inline] pub unsafe fn MsiViewFetch(hview: MSIHANDLE, phrecord: *mut MSIHANDLE) -> u32 { windows_targets::link!("msi.dll" "system" fn MsiViewFetch(hview : MSIHANDLE, phrecord : *mut MSIHANDLE) -> u32); - unsafe { MsiViewFetch(hview, core::mem::transmute(phrecord)) } + unsafe { MsiViewFetch(hview, phrecord as _) } } #[inline] 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); - unsafe { MsiViewGetColumnInfo(hview, ecolumninfo, core::mem::transmute(phrecord)) } + unsafe { MsiViewGetColumnInfo(hview, ecolumninfo, phrecord as _) } } #[inline] 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); - unsafe { MsiViewGetErrorA(hview, core::mem::transmute(szcolumnnamebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuf.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiViewGetErrorA(hview, szcolumnnamebuffer.unwrap_or(core::mem::zeroed()) as _, pcchbuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { MsiViewGetErrorW(hview, core::mem::transmute(szcolumnnamebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuf.unwrap_or(core::mem::zeroed()))) } + unsafe { MsiViewGetErrorW(hview, szcolumnnamebuffer.unwrap_or(core::mem::zeroed()) as _, pcchbuf.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MsiViewModify(hview: MSIHANDLE, emodifymode: MSIMODIFY, hrecord: MSIHANDLE) -> u32 { @@ -2577,10 +2529,10 @@ pub unsafe fn NormalizeFileForPatchSignature(filebuffer: *mut core::ffi::c_void, windows_targets::link!("mspatcha.dll" "system" fn NormalizeFileForPatchSignature(filebuffer : *mut core::ffi::c_void, filesize : u32, optionflags : u32, optiondata : *const PATCH_OPTION_DATA, newfilecoffbase : u32, newfilecofftime : u32, ignorerangecount : u32, ignorerangearray : *const PATCH_IGNORE_RANGE, retainrangecount : u32, retainrangearray : *const PATCH_RETAIN_RANGE) -> i32); unsafe { NormalizeFileForPatchSignature( - core::mem::transmute(filebuffer), + filebuffer as _, filesize, optionflags, - core::mem::transmute(optiondata.unwrap_or(core::mem::zeroed())), + optiondata.unwrap_or(core::mem::zeroed()) as _, newfilecoffbase, newfilecofftime, ignorerangearray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), @@ -2597,22 +2549,22 @@ where 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); - unsafe { 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())), dwbuffer, core::mem::transmute(pdwwrittenorrequired.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { QueryActCtxSettingsW(dwflags.unwrap_or(core::mem::zeroed()) as _, hactctx.unwrap_or(core::mem::zeroed()) as _, settingsnamespace.param().abi(), settingname.param().abi(), pvbuffer.unwrap_or(core::mem::zeroed()) as _, dwbuffer, pdwwrittenorrequired.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { QueryActCtxW(dwflags, hactctx, core::mem::transmute(pvsubinstance.unwrap_or(core::mem::zeroed())), ulinfoclass, core::mem::transmute(pvbuffer.unwrap_or(core::mem::zeroed())), cbbuffer, core::mem::transmute(pcbwrittenorrequired.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { QueryActCtxW(dwflags, hactctx, pvsubinstance.unwrap_or(core::mem::zeroed()) as _, ulinfoclass, pvbuffer.unwrap_or(core::mem::zeroed()) as _, cbbuffer, pcbwrittenorrequired.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn ReleaseActCtx(hactctx: super::super::Foundation::HANDLE) { windows_targets::link!("kernel32.dll" "system" fn ReleaseActCtx(hactctx : super::super::Foundation:: HANDLE)); - unsafe { ReleaseActCtx(core::mem::transmute(hactctx)) } + unsafe { ReleaseActCtx(hactctx as _) } } #[inline] 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); - unsafe { SfcGetNextProtectedFile(rpchandle, core::mem::transmute(protfiledata)).ok() } + unsafe { SfcGetNextProtectedFile(rpchandle, protfiledata as _).ok() } } #[inline] pub unsafe fn SfcIsFileProtected(rpchandle: super::super::Foundation::HANDLE, protfilename: P1) -> super::super::Foundation::BOOL @@ -2651,7 +2603,7 @@ where #[inline] pub unsafe fn TestApplyPatchToFileByBuffers(patchfilebuffer: &[u8], oldfilebuffer: Option<&[u8]>, newfilesize: Option<*mut u32>, applyoptionflags: u32) -> super::super::Foundation::BOOL { windows_targets::link!("mspatcha.dll" "system" fn TestApplyPatchToFileByBuffers(patchfilebuffer : *const u8, patchfilesize : u32, oldfilebuffer : *const u8, oldfilesize : u32, newfilesize : *mut u32, applyoptionflags : u32) -> super::super::Foundation:: BOOL); - unsafe { 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())), applyoptionflags) } + unsafe { 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()), newfilesize.unwrap_or(core::mem::zeroed()) as _, applyoptionflags) } } #[inline] pub unsafe fn TestApplyPatchToFileByHandles(patchfilehandle: super::super::Foundation::HANDLE, oldfilehandle: super::super::Foundation::HANDLE, applyoptionflags: u32) -> super::super::Foundation::BOOL { @@ -2670,7 +2622,7 @@ where #[inline] pub unsafe fn ZombifyActCtx(hactctx: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn ZombifyActCtx(hactctx : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - unsafe { ZombifyActCtx(core::mem::transmute(hactctx)).ok() } + unsafe { ZombifyActCtx(hactctx as _).ok() } } #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] @@ -3265,19 +3217,19 @@ impl IAssemblyCache { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).UninstallAssembly)(windows_core::Interface::as_raw(self), dwflags, pszassemblyname.param().abi(), core::mem::transmute(prefdata), core::mem::transmute(puldisposition)).ok() } + unsafe { (windows_core::Interface::vtable(self).UninstallAssembly)(windows_core::Interface::as_raw(self), dwflags, pszassemblyname.param().abi(), prefdata as _, puldisposition as _).ok() } } pub unsafe fn QueryAssemblyInfo(&self, dwflags: QUERYASMINFO_FLAGS, pszassemblyname: P1, pasminfo: *mut ASSEMBLY_INFO) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).QueryAssemblyInfo)(windows_core::Interface::as_raw(self), dwflags, pszassemblyname.param().abi(), core::mem::transmute(pasminfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryAssemblyInfo)(windows_core::Interface::as_raw(self), dwflags, pszassemblyname.param().abi(), pasminfo as _).ok() } } pub unsafe fn CreateAssemblyCacheItem(&self, dwflags: u32, pvreserved: *mut core::ffi::c_void, ppasmitem: *mut Option, pszassemblyname: P3) -> windows_core::Result<()> where P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateAssemblyCacheItem)(windows_core::Interface::as_raw(self), dwflags, core::mem::transmute(pvreserved), core::mem::transmute(ppasmitem), pszassemblyname.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateAssemblyCacheItem)(windows_core::Interface::as_raw(self), dwflags, pvreserved as _, core::mem::transmute(ppasmitem), pszassemblyname.param().abi()).ok() } } pub unsafe fn Reserved(&self) -> windows_core::Result { unsafe { @@ -3289,7 +3241,7 @@ impl IAssemblyCache { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).InstallAssembly)(windows_core::Interface::as_raw(self), dwflags, pszmanifestfilepath.param().abi(), core::mem::transmute(prefdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).InstallAssembly)(windows_core::Interface::as_raw(self), dwflags, pszmanifestfilepath.param().abi(), prefdata as _).ok() } } } #[repr(C)] @@ -3368,10 +3320,10 @@ impl IAssemblyCacheItem { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateStream)(windows_core::Interface::as_raw(self), dwflags, pszstreamname.param().abi(), dwformat, dwformatflags, core::mem::transmute(ppistream), core::mem::transmute(pulimaxsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateStream)(windows_core::Interface::as_raw(self), dwflags, pszstreamname.param().abi(), dwformat, dwformatflags, core::mem::transmute(ppistream), pulimaxsize as _).ok() } } pub unsafe fn Commit(&self, dwflags: u32, puldisposition: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Commit)(windows_core::Interface::as_raw(self), dwflags, core::mem::transmute(puldisposition)).ok() } + unsafe { (windows_core::Interface::vtable(self).Commit)(windows_core::Interface::as_raw(self), dwflags, puldisposition as _).ok() } } pub unsafe fn AbortItem(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).AbortItem)(windows_core::Interface::as_raw(self)).ok() } @@ -3431,16 +3383,16 @@ windows_core::imp::define_interface!(IAssemblyName, IAssemblyName_Vtbl, 0xcd193b windows_core::imp::interface_hierarchy!(IAssemblyName, windows_core::IUnknown); impl IAssemblyName { pub unsafe fn SetProperty(&self, propertyid: u32, pvproperty: *mut core::ffi::c_void, cbproperty: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetProperty)(windows_core::Interface::as_raw(self), propertyid, core::mem::transmute(pvproperty), cbproperty).ok() } + unsafe { (windows_core::Interface::vtable(self).SetProperty)(windows_core::Interface::as_raw(self), propertyid, pvproperty as _, cbproperty).ok() } } pub unsafe fn GetProperty(&self, propertyid: u32, pvproperty: *mut core::ffi::c_void, pcbproperty: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), propertyid, core::mem::transmute(pvproperty), core::mem::transmute(pcbproperty)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), propertyid, pvproperty as _, pcbproperty as _).ok() } } pub unsafe fn Finalize(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Finalize)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetDisplayName(&self, szdisplayname: Option, pccdisplayname: *mut u32, dwdisplayflags: u32) -> windows_core::Result<()> { - unsafe { (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), dwdisplayflags).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDisplayName)(windows_core::Interface::as_raw(self), szdisplayname.unwrap_or(core::mem::zeroed()) as _, pccdisplayname as _, 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 @@ -3448,13 +3400,13 @@ impl IAssemblyName { P2: windows_core::Param, P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Reserved)(windows_core::Interface::as_raw(self), refiid, punkreserved1.param().abi(), punkreserved2.param().abi(), szreserved.param().abi(), llreserved, core::mem::transmute(pvreserved), cbreserved, core::mem::transmute(ppreserved)).ok() } + unsafe { (windows_core::Interface::vtable(self).Reserved)(windows_core::Interface::as_raw(self), refiid, punkreserved1.param().abi(), punkreserved2.param().abi(), szreserved.param().abi(), llreserved, pvreserved as _, cbreserved, ppreserved as _).ok() } } pub unsafe fn GetName(&self, lpcwbuffer: *mut u32, pwzname: Option) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetName)(windows_core::Interface::as_raw(self), lpcwbuffer as _, pwzname.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetVersion(&self, pdwversionhi: *mut u32, pdwversionlow: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVersion)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwversionhi), core::mem::transmute(pdwversionlow)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVersion)(windows_core::Interface::as_raw(self), pdwversionhi as _, pdwversionlow as _).ok() } } pub unsafe fn IsEqual(&self, pname: P0, dwcmpflags: u32) -> windows_core::Result<()> where @@ -3578,7 +3530,7 @@ windows_core::imp::interface_hierarchy!(IEnumMsmDependency, windows_core::IUnkno impl IEnumMsmDependency { #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, cfetch: u32, rgmsmdependencies: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), cfetch, core::mem::transmute(rgmsmdependencies), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), cfetch, core::mem::transmute(rgmsmdependencies), pcfetched as _).ok() } } pub unsafe fn Skip(&self, cskip: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), cskip).ok() } @@ -3663,7 +3615,7 @@ windows_core::imp::interface_hierarchy!(IEnumMsmError, windows_core::IUnknown); impl IEnumMsmError { #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, cfetch: u32, rgmsmerrors: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), cfetch, core::mem::transmute(rgmsmerrors), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), cfetch, core::mem::transmute(rgmsmerrors), pcfetched as _).ok() } } pub unsafe fn Skip(&self, cskip: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), cskip).ok() } @@ -3747,7 +3699,7 @@ windows_core::imp::define_interface!(IEnumMsmString, IEnumMsmString_Vtbl, 0x0add windows_core::imp::interface_hierarchy!(IEnumMsmString, windows_core::IUnknown); impl IEnumMsmString { pub unsafe fn Next(&self, cfetch: u32, rgbstrstrings: *mut windows_core::BSTR, pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), cfetch, core::mem::transmute(rgbstrstrings), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), cfetch, core::mem::transmute(rgbstrstrings), pcfetched as _).ok() } } pub unsafe fn Skip(&self, cskip: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), cskip).ok() } @@ -3841,7 +3793,7 @@ impl IMsmDependencies { } } pub unsafe fn Count(&self, count: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Count)(windows_core::Interface::as_raw(self), core::mem::transmute(count)).ok() } + unsafe { (windows_core::Interface::vtable(self).Count)(windows_core::Interface::as_raw(self), count as _).ok() } } pub unsafe fn _NewEnum(&self) -> windows_core::Result { unsafe { @@ -3927,7 +3879,7 @@ impl IMsmDependency { unsafe { (windows_core::Interface::vtable(self).Module)(windows_core::Interface::as_raw(self), core::mem::transmute(module)).ok() } } pub unsafe fn Language(&self, language: *mut i16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Language)(windows_core::Interface::as_raw(self), core::mem::transmute(language)).ok() } + unsafe { (windows_core::Interface::vtable(self).Language)(windows_core::Interface::as_raw(self), language as _).ok() } } pub unsafe fn Version(&self, version: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Version)(windows_core::Interface::as_raw(self), core::mem::transmute(version)).ok() } @@ -3995,13 +3947,13 @@ windows_core::imp::interface_hierarchy!(IMsmError, windows_core::IUnknown, super #[cfg(feature = "Win32_System_Com")] impl IMsmError { pub unsafe fn Type(&self, errortype: *mut msmErrorType) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Type)(windows_core::Interface::as_raw(self), core::mem::transmute(errortype)).ok() } + unsafe { (windows_core::Interface::vtable(self).Type)(windows_core::Interface::as_raw(self), errortype as _).ok() } } pub unsafe fn Path(&self, errorpath: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Path)(windows_core::Interface::as_raw(self), core::mem::transmute(errorpath)).ok() } } pub unsafe fn Language(&self, errorlanguage: *mut i16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Language)(windows_core::Interface::as_raw(self), core::mem::transmute(errorlanguage)).ok() } + unsafe { (windows_core::Interface::vtable(self).Language)(windows_core::Interface::as_raw(self), errorlanguage as _).ok() } } pub unsafe fn DatabaseTable(&self, errortable: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DatabaseTable)(windows_core::Interface::as_raw(self), core::mem::transmute(errortable)).ok() } @@ -4138,7 +4090,7 @@ impl IMsmErrors { } } pub unsafe fn Count(&self, count: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Count)(windows_core::Interface::as_raw(self), core::mem::transmute(count)).ok() } + unsafe { (windows_core::Interface::vtable(self).Count)(windows_core::Interface::as_raw(self), count as _).ok() } } pub unsafe fn _NewEnum(&self) -> windows_core::Result { unsafe { @@ -4486,7 +4438,7 @@ impl IMsmStrings { unsafe { (windows_core::Interface::vtable(self).get_Item)(windows_core::Interface::as_raw(self), item, core::mem::transmute(r#return)).ok() } } pub unsafe fn Count(&self, count: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Count)(windows_core::Interface::as_raw(self), core::mem::transmute(count)).ok() } + unsafe { (windows_core::Interface::vtable(self).Count)(windows_core::Interface::as_raw(self), count as _).ok() } } pub unsafe fn _NewEnum(&self) -> windows_core::Result { unsafe { @@ -6248,38 +6200,38 @@ impl IPMDeploymentManager { (windows_core::Interface::vtable(self).GetLicenseChallenge)( windows_core::Interface::as_raw(self), core::mem::transmute_copy(packagepath), - core::mem::transmute(ppbchallenge), - core::mem::transmute(pcbchallenge), - 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())), + ppbchallenge as _, + pcbchallenge as _, + ppbkid.unwrap_or(core::mem::zeroed()) as _, + pcbkid.unwrap_or(core::mem::zeroed()) as _, + ppbdeviceid.unwrap_or(core::mem::zeroed()) as _, + pcbdeviceid.unwrap_or(core::mem::zeroed()) as _, + ppbsaltvalue.unwrap_or(core::mem::zeroed()) as _, + pcbsaltvalue.unwrap_or(core::mem::zeroed()) as _, + ppbkgvvalue.unwrap_or(core::mem::zeroed()) as _, + pcbkgvvalue.unwrap_or(core::mem::zeroed()) as _, ) .ok() } } pub unsafe fn GetLicenseChallengeByProductID(&self, productid: windows_core::GUID, ppbchallenge: *mut *mut u8, pcblicense: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLicenseChallengeByProductID)(windows_core::Interface::as_raw(self), core::mem::transmute(productid), core::mem::transmute(ppbchallenge), core::mem::transmute(pcblicense)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLicenseChallengeByProductID)(windows_core::Interface::as_raw(self), core::mem::transmute(productid), ppbchallenge as _, pcblicense as _).ok() } } pub unsafe fn GetLicenseChallengeByProductID2(&self, productid: windows_core::GUID, ppbchallenge: *mut *mut u8, pcblicense: *mut u32, ppbkid: Option<*mut *mut u8>, pcbkid: Option<*mut u32>, ppbdeviceid: Option<*mut *mut u8>, pcbdeviceid: Option<*mut u32>, ppbsaltvalue: Option<*mut *mut u8>, pcbsaltvalue: Option<*mut u32>, ppbkgvvalue: Option<*mut *mut u8>, pcbkgvvalue: Option<*mut u32>) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetLicenseChallengeByProductID2)( windows_core::Interface::as_raw(self), core::mem::transmute(productid), - core::mem::transmute(ppbchallenge), - core::mem::transmute(pcblicense), - 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())), + ppbchallenge as _, + pcblicense as _, + ppbkid.unwrap_or(core::mem::zeroed()) as _, + pcbkid.unwrap_or(core::mem::zeroed()) as _, + ppbdeviceid.unwrap_or(core::mem::zeroed()) as _, + pcbdeviceid.unwrap_or(core::mem::zeroed()) as _, + ppbsaltvalue.unwrap_or(core::mem::zeroed()) as _, + pcbsaltvalue.unwrap_or(core::mem::zeroed()) as _, + ppbkgvvalue.unwrap_or(core::mem::zeroed()) as _, + pcbkgvvalue.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -6797,10 +6749,10 @@ impl IPMEnumerationManager { } } pub unsafe fn get_StartTileEnumeratorBlob(&self, filter: &PM_ENUM_FILTER, pctiles: *mut u32, pptileblobs: *mut *mut PM_STARTTILEBLOB) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_StartTileEnumeratorBlob)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(filter), core::mem::transmute(pctiles), core::mem::transmute(pptileblobs)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_StartTileEnumeratorBlob)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(filter), pctiles as _, pptileblobs as _).ok() } } pub unsafe fn get_StartAppEnumeratorBlob(&self, filter: &PM_ENUM_FILTER, pcapps: *mut u32, ppappblobs: *mut *mut PM_STARTAPPBLOB) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_StartAppEnumeratorBlob)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(filter), core::mem::transmute(pcapps), core::mem::transmute(ppappblobs)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_StartAppEnumeratorBlob)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(filter), pcapps as _, ppappblobs as _).ok() } } } #[repr(C)] @@ -7127,7 +7079,7 @@ impl IPMExtensionFileExtensionInfo { unsafe { (windows_core::Interface::vtable(self).get_InvocationInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pimageurn), core::mem::transmute(pparameters)).ok() } } pub unsafe fn get_AllFileTypes(&self, pcbtypes: *mut u32, pptypes: *mut *mut windows_core::BSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_AllFileTypes)(windows_core::Interface::as_raw(self), core::mem::transmute(pcbtypes), core::mem::transmute(pptypes)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_AllFileTypes)(windows_core::Interface::as_raw(self), pcbtypes as _, pptypes as _).ok() } } } #[repr(C)] @@ -7214,7 +7166,7 @@ windows_core::imp::define_interface!(IPMExtensionFileOpenPickerInfo, IPMExtensio windows_core::imp::interface_hierarchy!(IPMExtensionFileOpenPickerInfo, windows_core::IUnknown); impl IPMExtensionFileOpenPickerInfo { pub unsafe fn get_AllFileTypes(&self, pctypes: *mut u32, pptypes: *mut *mut windows_core::BSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_AllFileTypes)(windows_core::Interface::as_raw(self), core::mem::transmute(pctypes), core::mem::transmute(pptypes)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_AllFileTypes)(windows_core::Interface::as_raw(self), pctypes as _, pptypes as _).ok() } } pub unsafe fn SupportsAllFileTypes(&self) -> windows_core::Result { unsafe { @@ -7268,7 +7220,7 @@ windows_core::imp::define_interface!(IPMExtensionFileSavePickerInfo, IPMExtensio windows_core::imp::interface_hierarchy!(IPMExtensionFileSavePickerInfo, windows_core::IUnknown); impl IPMExtensionFileSavePickerInfo { pub unsafe fn get_AllFileTypes(&self, pctypes: *mut u32, pptypes: *mut *mut windows_core::BSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_AllFileTypes)(windows_core::Interface::as_raw(self), core::mem::transmute(pctypes), core::mem::transmute(pptypes)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_AllFileTypes)(windows_core::Interface::as_raw(self), pctypes as _, pptypes as _).ok() } } pub unsafe fn SupportsAllFileTypes(&self) -> windows_core::Result { unsafe { @@ -7508,10 +7460,10 @@ windows_core::imp::define_interface!(IPMExtensionShareTargetInfo, IPMExtensionSh windows_core::imp::interface_hierarchy!(IPMExtensionShareTargetInfo, windows_core::IUnknown); impl IPMExtensionShareTargetInfo { pub unsafe fn get_AllFileTypes(&self, pctypes: *mut u32, pptypes: *mut *mut windows_core::BSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_AllFileTypes)(windows_core::Interface::as_raw(self), core::mem::transmute(pctypes), core::mem::transmute(pptypes)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_AllFileTypes)(windows_core::Interface::as_raw(self), pctypes as _, pptypes as _).ok() } } pub unsafe fn get_AllDataFormats(&self, pcdataformats: *mut u32, ppdataformats: *mut *mut windows_core::BSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_AllDataFormats)(windows_core::Interface::as_raw(self), core::mem::transmute(pcdataformats), core::mem::transmute(ppdataformats)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_AllDataFormats)(windows_core::Interface::as_raw(self), pcdataformats as _, ppdataformats as _).ok() } } pub unsafe fn SupportsAllFileTypes(&self) -> windows_core::Result { unsafe { @@ -7646,13 +7598,13 @@ impl IPMLiveTileJobInfo { unsafe { (windows_core::Interface::vtable(self).set_RecurrenceType)(windows_core::Interface::as_raw(self), ulrecurrencetype).ok() } } pub unsafe fn get_TileXML(&self, ptilexml: *mut *mut u8, pcbtilexml: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_TileXML)(windows_core::Interface::as_raw(self), core::mem::transmute(ptilexml), core::mem::transmute(pcbtilexml)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_TileXML)(windows_core::Interface::as_raw(self), ptilexml as _, pcbtilexml as _).ok() } } pub unsafe fn set_TileXML(&self, ptilexml: &[u8]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).set_TileXML)(windows_core::Interface::as_raw(self), core::mem::transmute(ptilexml.as_ptr()), ptilexml.len().try_into().unwrap()).ok() } } pub unsafe fn get_UrlXML(&self, purlxml: *mut *mut u8, pcburlxml: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_UrlXML)(windows_core::Interface::as_raw(self), core::mem::transmute(purlxml), core::mem::transmute(pcburlxml)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_UrlXML)(windows_core::Interface::as_raw(self), purlxml as _, pcburlxml as _).ok() } } pub unsafe fn set_UrlXML(&self, purlxml: &[u8]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).set_UrlXML)(windows_core::Interface::as_raw(self), core::mem::transmute(purlxml.as_ptr()), purlxml.len().try_into().unwrap()).ok() } @@ -8087,7 +8039,7 @@ impl IPMTaskInfo { } } pub unsafe fn get_Version(&self, ptargetmajorversion: *mut u8, ptargetminorversion: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_Version)(windows_core::Interface::as_raw(self), core::mem::transmute(ptargetmajorversion), core::mem::transmute(ptargetminorversion)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_Version)(windows_core::Interface::as_raw(self), ptargetmajorversion as _, ptargetminorversion as _).ok() } } pub unsafe fn BitsPerPixel(&self) -> windows_core::Result { unsafe { @@ -9239,10 +9191,10 @@ impl IValidate { unsafe { (windows_core::Interface::vtable(self).CloseCUB)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn SetDisplay(&self, pdisplayfunction: LPDISPLAYVAL, pcontext: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetDisplay)(windows_core::Interface::as_raw(self), pdisplayfunction, core::mem::transmute(pcontext)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetDisplay)(windows_core::Interface::as_raw(self), pdisplayfunction, pcontext as _).ok() } } pub unsafe fn SetStatus(&self, pstatusfunction: LPEVALCOMCALLBACK, pcontext: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetStatus)(windows_core::Interface::as_raw(self), pstatusfunction, core::mem::transmute(pcontext)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetStatus)(windows_core::Interface::as_raw(self), pstatusfunction, pcontext as _).ok() } } pub unsafe fn Validate(&self, wzices: P0) -> windows_core::Result<()> where 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 e429322f92..42889da237 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ApplicationVerifier/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ApplicationVerifier/mod.rs @@ -1,7 +1,7 @@ #[inline] 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); - unsafe { VerifierEnumerateResource(process, flags, resourcetype.0 as _, resourcecallback, core::mem::transmute(enumerationcontext)) } + unsafe { VerifierEnumerateResource(process, flags, resourcetype.0 as _, resourcecallback, enumerationcontext as _) } } #[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 4ba3b64e14..57ba7c40a9 100644 --- a/crates/libs/windows/src/Windows/Win32/System/AssessmentTool/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/AssessmentTool/mod.rs @@ -64,13 +64,13 @@ impl IInitiateWinSATAssessment { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).InitiateAssessment)(windows_core::Interface::as_raw(self), cmdline.param().abi(), pcallbacks.param().abi(), callerhwnd.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn InitiateFormalAssessment(&self, pcallbacks: P0, callerhwnd: Option) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).InitiateFormalAssessment)(windows_core::Interface::as_raw(self), pcallbacks.param().abi(), callerhwnd.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CancelAssessment(&self) -> windows_core::Result<()> { unsafe { (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 8876751351..5f2ec83695 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ClrHosting/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ClrHosting/mod.rs @@ -15,7 +15,7 @@ where P4: windows_core::Param, { windows_targets::link!("mscoree.dll" "system" fn CallFunctionShim(szdllname : windows_core::PCWSTR, szfunctionname : windows_core::PCSTR, lpvargument1 : *mut core::ffi::c_void, lpvargument2 : *mut core::ffi::c_void, szversion : windows_core::PCWSTR, pvreserved : *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { CallFunctionShim(szdllname.param().abi(), szfunctionname.param().abi(), core::mem::transmute(lpvargument1), core::mem::transmute(lpvargument2), szversion.param().abi(), core::mem::transmute(pvreserved)).ok() } + unsafe { CallFunctionShim(szdllname.param().abi(), szfunctionname.param().abi(), lpvargument1 as _, lpvargument2 as _, szversion.param().abi(), pvreserved as _).ok() } } #[inline] pub unsafe fn ClrCreateManagedInstance(ptypename: P0, riid: *const windows_core::GUID, ppobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -23,7 +23,7 @@ where P0: windows_core::Param, { windows_targets::link!("mscoree.dll" "system" fn ClrCreateManagedInstance(ptypename : windows_core::PCWSTR, riid : *const windows_core::GUID, ppobject : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { ClrCreateManagedInstance(ptypename.param().abi(), riid, core::mem::transmute(ppobject)).ok() } + unsafe { ClrCreateManagedInstance(ptypename.param().abi(), riid, ppobject as _).ok() } } #[inline] pub unsafe fn CorBindToCurrentRuntime(pwszfilename: P0, rclsid: *const windows_core::GUID, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -31,7 +31,7 @@ where P0: windows_core::Param, { windows_targets::link!("mscoree.dll" "system" fn CorBindToCurrentRuntime(pwszfilename : windows_core::PCWSTR, rclsid : *const windows_core::GUID, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { CorBindToCurrentRuntime(pwszfilename.param().abi(), rclsid, riid, core::mem::transmute(ppv)).ok() } + unsafe { CorBindToCurrentRuntime(pwszfilename.param().abi(), rclsid, riid, ppv as _).ok() } } #[inline] pub unsafe fn CorBindToRuntime(pwszversion: P0, pwszbuildflavor: P1, rclsid: *const windows_core::GUID, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -40,7 +40,7 @@ where P1: windows_core::Param, { windows_targets::link!("mscoree.dll" "system" fn CorBindToRuntime(pwszversion : windows_core::PCWSTR, pwszbuildflavor : windows_core::PCWSTR, rclsid : *const windows_core::GUID, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { CorBindToRuntime(pwszversion.param().abi(), pwszbuildflavor.param().abi(), rclsid, riid, core::mem::transmute(ppv)).ok() } + unsafe { CorBindToRuntime(pwszversion.param().abi(), pwszbuildflavor.param().abi(), rclsid, riid, ppv as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -49,7 +49,7 @@ where P0: windows_core::Param, { windows_targets::link!("mscoree.dll" "system" fn CorBindToRuntimeByCfg(pcfgstream : * mut core::ffi::c_void, reserved : u32, startupflags : u32, rclsid : *const windows_core::GUID, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { CorBindToRuntimeByCfg(pcfgstream.param().abi(), reserved, startupflags, rclsid, riid, core::mem::transmute(ppv)).ok() } + unsafe { CorBindToRuntimeByCfg(pcfgstream.param().abi(), reserved, startupflags, rclsid, riid, ppv as _).ok() } } #[inline] pub unsafe fn CorBindToRuntimeEx(pwszversion: P0, pwszbuildflavor: P1, startupflags: u32, rclsid: *const windows_core::GUID, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -58,7 +58,7 @@ where P1: windows_core::Param, { windows_targets::link!("mscoree.dll" "system" fn CorBindToRuntimeEx(pwszversion : windows_core::PCWSTR, pwszbuildflavor : windows_core::PCWSTR, startupflags : u32, rclsid : *const windows_core::GUID, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { CorBindToRuntimeEx(pwszversion.param().abi(), pwszbuildflavor.param().abi(), startupflags, rclsid, riid, core::mem::transmute(ppv)).ok() } + unsafe { CorBindToRuntimeEx(pwszversion.param().abi(), pwszbuildflavor.param().abi(), startupflags, rclsid, riid, ppv as _).ok() } } #[inline] pub unsafe fn CorBindToRuntimeHost(pwszversion: P0, pwszbuildflavor: P1, pwszhostconfigfile: P2, preserved: *mut core::ffi::c_void, startupflags: u32, rclsid: *const windows_core::GUID, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -68,7 +68,7 @@ where P2: windows_core::Param, { windows_targets::link!("mscoree.dll" "system" fn CorBindToRuntimeHost(pwszversion : windows_core::PCWSTR, pwszbuildflavor : windows_core::PCWSTR, pwszhostconfigfile : windows_core::PCWSTR, preserved : *mut core::ffi::c_void, startupflags : u32, rclsid : *const windows_core::GUID, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { CorBindToRuntimeHost(pwszversion.param().abi(), pwszbuildflavor.param().abi(), pwszhostconfigfile.param().abi(), core::mem::transmute(preserved), startupflags, rclsid, riid, core::mem::transmute(ppv)).ok() } + unsafe { CorBindToRuntimeHost(pwszversion.param().abi(), pwszbuildflavor.param().abi(), pwszhostconfigfile.param().abi(), preserved as _, startupflags, rclsid, riid, ppv as _).ok() } } #[inline] pub unsafe fn CorExitProcess(exitcode: i32) { @@ -82,7 +82,7 @@ where P1: windows_core::Param, { windows_targets::link!("mscoree.dll" "system" fn CorLaunchApplication(dwclickoncehost : HOST_TYPE, pwzappfullname : windows_core::PCWSTR, dwmanifestpaths : u32, ppwzmanifestpaths : *const windows_core::PCWSTR, dwactivationdata : u32, ppwzactivationdata : *const windows_core::PCWSTR, lpprocessinformation : *mut super::Threading:: PROCESS_INFORMATION) -> windows_core::HRESULT); - unsafe { CorLaunchApplication(dwclickoncehost, pwzappfullname.param().abi(), dwmanifestpaths, ppwzmanifestpaths, dwactivationdata, ppwzactivationdata, core::mem::transmute(lpprocessinformation)).ok() } + unsafe { CorLaunchApplication(dwclickoncehost, pwzappfullname.param().abi(), dwmanifestpaths, ppwzmanifestpaths, dwactivationdata, ppwzactivationdata, lpprocessinformation as _).ok() } } #[inline] pub unsafe fn CorMarkThreadInThreadPool() { @@ -111,17 +111,17 @@ pub unsafe fn GetCLRIdentityManager(riid: *const windows_core::GUID) -> windows_ #[inline] pub unsafe fn GetCORRequiredVersion(pbuffer: &mut [u16], dwlength: *mut u32) -> windows_core::Result<()> { windows_targets::link!("mscoree.dll" "system" fn GetCORRequiredVersion(pbuffer : windows_core::PWSTR, cchbuffer : u32, dwlength : *mut u32) -> windows_core::HRESULT); - unsafe { GetCORRequiredVersion(core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), core::mem::transmute(dwlength)).ok() } + unsafe { GetCORRequiredVersion(core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), dwlength as _).ok() } } #[inline] pub unsafe fn GetCORSystemDirectory(pbuffer: &mut [u16], dwlength: *mut u32) -> windows_core::Result<()> { windows_targets::link!("mscoree.dll" "system" fn GetCORSystemDirectory(pbuffer : windows_core::PWSTR, cchbuffer : u32, dwlength : *mut u32) -> windows_core::HRESULT); - unsafe { GetCORSystemDirectory(core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), core::mem::transmute(dwlength)).ok() } + unsafe { GetCORSystemDirectory(core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), dwlength as _).ok() } } #[inline] pub unsafe fn GetCORVersion(pbbuffer: &mut [u16], dwlength: *mut u32) -> windows_core::Result<()> { windows_targets::link!("mscoree.dll" "system" fn GetCORVersion(pbbuffer : windows_core::PWSTR, cchbuffer : u32, dwlength : *mut u32) -> windows_core::HRESULT); - unsafe { GetCORVersion(core::mem::transmute(pbbuffer.as_ptr()), pbbuffer.len().try_into().unwrap(), core::mem::transmute(dwlength)).ok() } + unsafe { GetCORVersion(core::mem::transmute(pbbuffer.as_ptr()), pbbuffer.len().try_into().unwrap(), dwlength as _).ok() } } #[inline] pub unsafe fn GetFileVersion(szfilename: P0, szbuffer: Option<&mut [u16]>, dwlength: *mut u32) -> windows_core::Result<()> @@ -129,7 +129,7 @@ where P0: windows_core::Param, { windows_targets::link!("mscoree.dll" "system" fn GetFileVersion(szfilename : windows_core::PCWSTR, szbuffer : windows_core::PWSTR, cchbuffer : u32, dwlength : *mut u32) -> windows_core::HRESULT); - unsafe { GetFileVersion(szfilename.param().abi(), core::mem::transmute(szbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(dwlength)).ok() } + unsafe { GetFileVersion(szfilename.param().abi(), core::mem::transmute(szbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dwlength as _).ok() } } #[inline] pub unsafe fn GetRealProcAddress(pwszprocname: P0, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -137,7 +137,7 @@ where P0: windows_core::Param, { windows_targets::link!("mscoree.dll" "system" fn GetRealProcAddress(pwszprocname : windows_core::PCSTR, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { GetRealProcAddress(pwszprocname.param().abi(), core::mem::transmute(ppv)).ok() } + unsafe { GetRealProcAddress(pwszprocname.param().abi(), ppv as _).ok() } } #[inline] pub unsafe fn GetRequestedRuntimeInfo(pexe: P0, pwszversion: P1, pconfigurationfile: P2, startupflags: u32, runtimeinfoflags: u32, pdirectory: Option<&mut [u16]>, dwdirectorylength: Option<*mut u32>, pversion: Option<&mut [u16]>, dwlength: Option<*mut u32>) -> windows_core::Result<()> @@ -156,10 +156,10 @@ where runtimeinfoflags, core::mem::transmute(pdirectory.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdirectory.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(dwdirectorylength.unwrap_or(core::mem::zeroed())), + dwdirectorylength.unwrap_or(core::mem::zeroed()) as _, 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())), + dwlength.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -170,17 +170,17 @@ where P0: windows_core::Param, { windows_targets::link!("mscoree.dll" "system" fn GetRequestedRuntimeVersion(pexe : windows_core::PCWSTR, pversion : windows_core::PWSTR, cchbuffer : u32, dwlength : *mut u32) -> windows_core::HRESULT); - unsafe { GetRequestedRuntimeVersion(pexe.param().abi(), core::mem::transmute(pversion.as_ptr()), pversion.len().try_into().unwrap(), core::mem::transmute(dwlength)).ok() } + unsafe { GetRequestedRuntimeVersion(pexe.param().abi(), core::mem::transmute(pversion.as_ptr()), pversion.len().try_into().unwrap(), dwlength as _).ok() } } #[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); - unsafe { GetRequestedRuntimeVersionForCLSID(rclsid, core::mem::transmute(pversion.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pversion.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(dwlength.unwrap_or(core::mem::zeroed())), dwresolutionflags).ok() } + unsafe { GetRequestedRuntimeVersionForCLSID(rclsid, core::mem::transmute(pversion.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pversion.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dwlength.unwrap_or(core::mem::zeroed()) as _, dwresolutionflags).ok() } } #[inline] 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); - unsafe { GetVersionFromProcess(hprocess, core::mem::transmute(pversion.as_ptr()), pversion.len().try_into().unwrap(), core::mem::transmute(dwlength)).ok() } + unsafe { GetVersionFromProcess(hprocess, core::mem::transmute(pversion.as_ptr()), pversion.len().try_into().unwrap(), dwlength as _).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<()> @@ -189,7 +189,7 @@ where P1: windows_core::Param, { windows_targets::link!("mscoree.dll" "system" fn LoadLibraryShim(szdllname : windows_core::PCWSTR, szversion : windows_core::PCWSTR, pvreserved : *mut core::ffi::c_void, phmoddll : *mut super::super::Foundation:: HMODULE) -> windows_core::HRESULT); - unsafe { LoadLibraryShim(szdllname.param().abi(), szversion.param().abi(), core::mem::transmute(pvreserved), core::mem::transmute(phmoddll)).ok() } + unsafe { LoadLibraryShim(szdllname.param().abi(), szversion.param().abi(), pvreserved as _, phmoddll as _).ok() } } #[inline] pub unsafe fn LoadStringRC(iresouceid: u32, szbuffer: &mut [u16], bquiet: i32) -> windows_core::Result<()> { @@ -199,12 +199,12 @@ pub unsafe fn LoadStringRC(iresouceid: u32, szbuffer: &mut [u16], bquiet: i32) - #[inline] pub unsafe fn LoadStringRCEx(lcid: u32, iresouceid: u32, szbuffer: &mut [u16], bquiet: i32, pcwchused: *mut i32) -> windows_core::Result<()> { windows_targets::link!("mscoree.dll" "system" fn LoadStringRCEx(lcid : u32, iresouceid : u32, szbuffer : windows_core::PWSTR, imax : i32, bquiet : i32, pcwchused : *mut i32) -> windows_core::HRESULT); - unsafe { LoadStringRCEx(lcid, iresouceid, core::mem::transmute(szbuffer.as_ptr()), szbuffer.len().try_into().unwrap(), bquiet, core::mem::transmute(pcwchused)).ok() } + unsafe { LoadStringRCEx(lcid, iresouceid, core::mem::transmute(szbuffer.as_ptr()), szbuffer.len().try_into().unwrap(), bquiet, pcwchused as _).ok() } } #[inline] pub unsafe fn LockClrVersion(hostcallback: FLockClrVersionCallback, pbeginhostsetup: *mut FLockClrVersionCallback, pendhostsetup: *mut FLockClrVersionCallback) -> windows_core::Result<()> { windows_targets::link!("mscoree.dll" "system" fn LockClrVersion(hostcallback : FLockClrVersionCallback, pbeginhostsetup : *mut FLockClrVersionCallback, pendhostsetup : *mut FLockClrVersionCallback) -> windows_core::HRESULT); - unsafe { LockClrVersion(hostcallback, core::mem::transmute(pbeginhostsetup), core::mem::transmute(pendhostsetup)).ok() } + unsafe { LockClrVersion(hostcallback, pbeginhostsetup as _, pendhostsetup as _).ok() } } #[inline] pub unsafe fn RunDll32ShimW(hwnd: super::super::Foundation::HWND, hinst: super::super::Foundation::HINSTANCE, lpszcmdline: P2, ncmdshow: i32) -> windows_core::Result<()> @@ -538,13 +538,13 @@ windows_core::imp::define_interface!(ICLRAppDomainResourceMonitor, ICLRAppDomain windows_core::imp::interface_hierarchy!(ICLRAppDomainResourceMonitor, windows_core::IUnknown); impl ICLRAppDomainResourceMonitor { pub unsafe fn GetCurrentAllocated(&self, dwappdomainid: u32, pbytesallocated: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrentAllocated)(windows_core::Interface::as_raw(self), dwappdomainid, core::mem::transmute(pbytesallocated)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentAllocated)(windows_core::Interface::as_raw(self), dwappdomainid, pbytesallocated as _).ok() } } pub unsafe fn GetCurrentSurvived(&self, dwappdomainid: u32, pappdomainbytessurvived: *mut u64, ptotalbytessurvived: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrentSurvived)(windows_core::Interface::as_raw(self), dwappdomainid, core::mem::transmute(pappdomainbytessurvived), core::mem::transmute(ptotalbytessurvived)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentSurvived)(windows_core::Interface::as_raw(self), dwappdomainid, pappdomainbytessurvived as _, ptotalbytessurvived as _).ok() } } pub unsafe fn GetCurrentCpuTime(&self, dwappdomainid: u32, pmilliseconds: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrentCpuTime)(windows_core::Interface::as_raw(self), dwappdomainid, core::mem::transmute(pmilliseconds)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentCpuTime)(windows_core::Interface::as_raw(self), dwappdomainid, pmilliseconds as _).ok() } } } #[repr(C)] @@ -604,14 +604,14 @@ impl ICLRAssemblyIdentityManager { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetBindingIdentityFromFile)(windows_core::Interface::as_raw(self), pwzfilepath.param().abi(), dwflags, core::mem::transmute(pwzbuffer), core::mem::transmute(pcchbuffersize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBindingIdentityFromFile)(windows_core::Interface::as_raw(self), pwzfilepath.param().abi(), dwflags, core::mem::transmute(pwzbuffer), pcchbuffersize as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetBindingIdentityFromStream(&self, pstream: P0, dwflags: u32, pwzbuffer: windows_core::PWSTR, pcchbuffersize: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetBindingIdentityFromStream)(windows_core::Interface::as_raw(self), pstream.param().abi(), dwflags, core::mem::transmute(pwzbuffer), core::mem::transmute(pcchbuffersize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBindingIdentityFromStream)(windows_core::Interface::as_raw(self), pstream.param().abi(), dwflags, core::mem::transmute(pwzbuffer), pcchbuffersize as _).ok() } } pub unsafe fn GetReferencedAssembliesFromFile(&self, pwzfilepath: P0, dwflags: u32, pexcludeassemblieslist: P2) -> windows_core::Result where @@ -827,7 +827,7 @@ windows_core::imp::define_interface!(ICLRControl, ICLRControl_Vtbl, 0x9065597e_d windows_core::imp::interface_hierarchy!(ICLRControl, windows_core::IUnknown); impl ICLRControl { pub unsafe fn GetCLRManager(&self, riid: *const windows_core::GUID, ppobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCLRManager)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(ppobject)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCLRManager)(windows_core::Interface::as_raw(self), riid, ppobject as _).ok() } } pub unsafe fn SetAppDomainManagerType(&self, pwzappdomainmanagerassembly: P0, pwzappdomainmanagertype: P1) -> windows_core::Result<()> where @@ -1017,7 +1017,7 @@ impl ICLRDebugging { P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).OpenVirtualProcess)(windows_core::Interface::as_raw(self), modulebaseaddress, pdatatarget.param().abi(), plibraryprovider.param().abi(), pmaxdebuggersupportedversion, riidprocess, core::mem::transmute(ppprocess), core::mem::transmute(pversion), core::mem::transmute(pdwflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).OpenVirtualProcess)(windows_core::Interface::as_raw(self), modulebaseaddress, pdatatarget.param().abi(), plibraryprovider.param().abi(), pmaxdebuggersupportedversion, riidprocess, core::mem::transmute(ppprocess), pversion as _, pdwflags as _).ok() } } pub unsafe fn CanUnloadNow(&self, hmodule: super::super::Foundation::HMODULE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).CanUnloadNow)(windows_core::Interface::as_raw(self), hmodule).ok() } @@ -1153,7 +1153,7 @@ windows_core::imp::define_interface!(ICLRErrorReportingManager, ICLRErrorReporti windows_core::imp::interface_hierarchy!(ICLRErrorReportingManager, windows_core::IUnknown); impl ICLRErrorReportingManager { pub unsafe fn GetBucketParametersForCurrentException(&self, pparams: *mut BucketParameters) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBucketParametersForCurrentException)(windows_core::Interface::as_raw(self), core::mem::transmute(pparams)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBucketParametersForCurrentException)(windows_core::Interface::as_raw(self), pparams as _).ok() } } pub unsafe fn BeginCustomDump(&self, dwflavor: ECustomDumpFlavor, items: &[CustomDumpItem], dwreserved: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).BeginCustomDump)(windows_core::Interface::as_raw(self), dwflavor, items.len().try_into().unwrap(), core::mem::transmute(items.as_ptr()), dwreserved).ok() } @@ -1213,7 +1213,7 @@ impl ICLRGCManager { unsafe { (windows_core::Interface::vtable(self).Collect)(windows_core::Interface::as_raw(self), generation).ok() } } pub unsafe fn GetStats(&self, pstats: *mut COR_GC_STATS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStats)(windows_core::Interface::as_raw(self), core::mem::transmute(pstats)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStats)(windows_core::Interface::as_raw(self), pstats as _).ok() } } pub unsafe fn SetGCStartupLimits(&self, segmentsize: u32, maxgen0size: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetGCStartupLimits)(windows_core::Interface::as_raw(self), segmentsize, maxgen0size).ok() } @@ -1307,13 +1307,13 @@ impl ICLRHostBindingPolicyManager { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ModifyApplicationPolicy)(windows_core::Interface::as_raw(self), pwzsourceassemblyidentity.param().abi(), pwztargetassemblyidentity.param().abi(), pbapplicationpolicy, cbapppolicysize, dwpolicymodifyflags, core::mem::transmute(pbnewapplicationpolicy), core::mem::transmute(pcbnewapppolicysize)).ok() } + unsafe { (windows_core::Interface::vtable(self).ModifyApplicationPolicy)(windows_core::Interface::as_raw(self), pwzsourceassemblyidentity.param().abi(), pwztargetassemblyidentity.param().abi(), pbapplicationpolicy, cbapppolicysize, dwpolicymodifyflags, pbnewapplicationpolicy as _, pcbnewapppolicysize as _).ok() } } pub unsafe fn EvaluatePolicy(&self, pwzreferenceidentity: P0, pbapplicationpolicy: *const u8, cbapppolicysize: u32, pwzpostpolicyreferenceidentity: windows_core::PWSTR, pcchpostpolicyreferenceidentity: *mut u32, pdwpoliciesapplied: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EvaluatePolicy)(windows_core::Interface::as_raw(self), pwzreferenceidentity.param().abi(), pbapplicationpolicy, cbapppolicysize, core::mem::transmute(pwzpostpolicyreferenceidentity), core::mem::transmute(pcchpostpolicyreferenceidentity), core::mem::transmute(pdwpoliciesapplied)).ok() } + unsafe { (windows_core::Interface::vtable(self).EvaluatePolicy)(windows_core::Interface::as_raw(self), pwzreferenceidentity.param().abi(), pbapplicationpolicy, cbapppolicysize, core::mem::transmute(pwzpostpolicyreferenceidentity), pcchpostpolicyreferenceidentity as _, pdwpoliciesapplied as _).ok() } } } #[repr(C)] @@ -1471,7 +1471,7 @@ impl ICLRMetaHost { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetVersionFromFile)(windows_core::Interface::as_raw(self), pwzfilepath.param().abi(), core::mem::transmute(pwzbuffer), core::mem::transmute(pcchbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVersionFromFile)(windows_core::Interface::as_raw(self), pwzfilepath.param().abi(), core::mem::transmute(pwzbuffer), pcchbuffer as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn EnumerateInstalledRuntimes(&self) -> windows_core::Result { @@ -1613,7 +1613,7 @@ impl ICLRMetaHostPolicy { T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - unsafe { (windows_core::Interface::vtable(self).GetRequestedRuntime)(windows_core::Interface::as_raw(self), 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__)) } + unsafe { (windows_core::Interface::vtable(self).GetRequestedRuntime)(windows_core::Interface::as_raw(self), dwpolicyflags, pwzbinary.param().abi(), pcfgstream.param().abi(), pwzversion.unwrap_or(core::mem::zeroed()) as _, pcchversion as _, pwzimageversion.unwrap_or(core::mem::zeroed()) as _, pcchimageversion as _, pdwconfigflags as _, &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } } #[repr(C)] @@ -1793,7 +1793,7 @@ windows_core::imp::define_interface!(ICLRProbingAssemblyEnum, ICLRProbingAssembl windows_core::imp::interface_hierarchy!(ICLRProbingAssemblyEnum, windows_core::IUnknown); impl ICLRProbingAssemblyEnum { pub unsafe fn Get(&self, dwindex: u32, pwzbuffer: windows_core::PWSTR, pcchbuffersize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Get)(windows_core::Interface::as_raw(self), dwindex, core::mem::transmute(pwzbuffer), core::mem::transmute(pcchbuffersize)).ok() } + unsafe { (windows_core::Interface::vtable(self).Get)(windows_core::Interface::as_raw(self), dwindex, core::mem::transmute(pwzbuffer), pcchbuffersize as _).ok() } } } #[repr(C)] @@ -1856,7 +1856,7 @@ windows_core::imp::define_interface!(ICLRReferenceAssemblyEnum, ICLRReferenceAss windows_core::imp::interface_hierarchy!(ICLRReferenceAssemblyEnum, windows_core::IUnknown); impl ICLRReferenceAssemblyEnum { pub unsafe fn Get(&self, dwindex: u32, pwzbuffer: windows_core::PWSTR, pcchbuffersize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Get)(windows_core::Interface::as_raw(self), dwindex, core::mem::transmute(pwzbuffer), core::mem::transmute(pcchbuffersize)).ok() } + unsafe { (windows_core::Interface::vtable(self).Get)(windows_core::Interface::as_raw(self), dwindex, core::mem::transmute(pwzbuffer), pcchbuffersize as _).ok() } } } #[repr(C)] @@ -2063,10 +2063,10 @@ windows_core::imp::define_interface!(ICLRRuntimeInfo, ICLRRuntimeInfo_Vtbl, 0xbd windows_core::imp::interface_hierarchy!(ICLRRuntimeInfo, windows_core::IUnknown); impl ICLRRuntimeInfo { pub unsafe fn GetVersionString(&self, pwzbuffer: Option, pcchbuffer: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetVersionString)(windows_core::Interface::as_raw(self), pwzbuffer.unwrap_or(core::mem::zeroed()) as _, pcchbuffer as _).ok() } } pub unsafe fn GetRuntimeDirectory(&self, pwzbuffer: windows_core::PWSTR, pcchbuffer: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRuntimeDirectory)(windows_core::Interface::as_raw(self), core::mem::transmute(pwzbuffer), core::mem::transmute(pcchbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRuntimeDirectory)(windows_core::Interface::as_raw(self), core::mem::transmute(pwzbuffer), pcchbuffer as _).ok() } } pub unsafe fn IsLoaded(&self, hndprocess: super::super::Foundation::HANDLE) -> windows_core::Result { unsafe { @@ -2075,7 +2075,7 @@ impl ICLRRuntimeInfo { } } pub unsafe fn LoadErrorString(&self, iresourceid: u32, pwzbuffer: windows_core::PWSTR, pcchbuffer: *mut u32, ilocaleid: i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).LoadErrorString)(windows_core::Interface::as_raw(self), iresourceid, core::mem::transmute(pwzbuffer), core::mem::transmute(pcchbuffer), ilocaleid).ok() } + unsafe { (windows_core::Interface::vtable(self).LoadErrorString)(windows_core::Interface::as_raw(self), iresourceid, core::mem::transmute(pwzbuffer), pcchbuffer as _, ilocaleid).ok() } } pub unsafe fn LoadLibraryA(&self, pwzdllname: P0) -> windows_core::Result where @@ -2115,13 +2115,13 @@ impl ICLRRuntimeInfo { unsafe { (windows_core::Interface::vtable(self).SetDefaultStartupFlags)(windows_core::Interface::as_raw(self), dwstartupflags, pwzhostconfigfile.param().abi()).ok() } } pub unsafe fn GetDefaultStartupFlags(&self, pdwstartupflags: *mut u32, pwzhostconfigfile: Option, pcchhostconfigfile: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetDefaultStartupFlags)(windows_core::Interface::as_raw(self), pdwstartupflags as _, pwzhostconfigfile.unwrap_or(core::mem::zeroed()) as _, pcchhostconfigfile as _).ok() } } pub unsafe fn BindAsLegacyV2Runtime(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).BindAsLegacyV2Runtime)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn IsStarted(&self, pbstarted: *mut super::super::Foundation::BOOL, pdwstartupflags: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsStarted)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstarted), core::mem::transmute(pdwstartupflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsStarted)(windows_core::Interface::as_raw(self), pbstarted as _, pdwstartupflags as _).ok() } } } #[repr(C)] @@ -2280,31 +2280,31 @@ impl ICLRStrongName { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetHashFromAssemblyFile)(windows_core::Interface::as_raw(self), pszfilepath.param().abi(), core::mem::transmute(pihashalg), core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap(), core::mem::transmute(pchhash)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetHashFromAssemblyFile)(windows_core::Interface::as_raw(self), pszfilepath.param().abi(), pihashalg as _, core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap(), pchhash as _).ok() } } pub unsafe fn GetHashFromAssemblyFileW(&self, pwzfilepath: P0, pihashalg: *mut u32, pbhash: &mut [u8], pchhash: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetHashFromAssemblyFileW)(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() } + unsafe { (windows_core::Interface::vtable(self).GetHashFromAssemblyFileW)(windows_core::Interface::as_raw(self), pwzfilepath.param().abi(), pihashalg as _, core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap(), pchhash as _).ok() } } pub unsafe fn GetHashFromBlob(&self, pbblob: *const u8, cchblob: u32, pihashalg: *mut u32, pbhash: &mut [u8], pchhash: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetHashFromBlob)(windows_core::Interface::as_raw(self), pbblob, cchblob, core::mem::transmute(pihashalg), core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap(), core::mem::transmute(pchhash)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetHashFromBlob)(windows_core::Interface::as_raw(self), pbblob, cchblob, pihashalg as _, core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap(), pchhash as _).ok() } } pub unsafe fn GetHashFromFile(&self, pszfilepath: P0, pihashalg: *mut u32, pbhash: &mut [u8], pchhash: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetHashFromFile)(windows_core::Interface::as_raw(self), pszfilepath.param().abi(), core::mem::transmute(pihashalg), core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap(), core::mem::transmute(pchhash)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetHashFromFile)(windows_core::Interface::as_raw(self), pszfilepath.param().abi(), pihashalg as _, core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap(), pchhash as _).ok() } } pub unsafe fn GetHashFromFileW(&self, pwzfilepath: P0, pihashalg: *mut u32, pbhash: &mut [u8], pchhash: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetHashFromFileW)(windows_core::Interface::as_raw(self), pwzfilepath.param().abi(), pihashalg as _, core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap(), pchhash as _).ok() } } pub unsafe fn GetHashFromHandle(&self, hfile: super::super::Foundation::HANDLE, pihashalg: *mut u32, pbhash: &mut [u8], pchhash: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetHashFromHandle)(windows_core::Interface::as_raw(self), hfile, core::mem::transmute(pihashalg), core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap(), core::mem::transmute(pchhash)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetHashFromHandle)(windows_core::Interface::as_raw(self), hfile, pihashalg as _, core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap(), pchhash as _).ok() } } pub unsafe fn StrongNameCompareAssemblies(&self, pwzassembly1: P0, pwzassembly2: P1) -> windows_core::Result where @@ -2323,16 +2323,16 @@ impl ICLRStrongName { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).StrongNameGetBlob)(windows_core::Interface::as_raw(self), pwzfilepath.param().abi(), core::mem::transmute(pbblob), core::mem::transmute(pcbblob)).ok() } + unsafe { (windows_core::Interface::vtable(self).StrongNameGetBlob)(windows_core::Interface::as_raw(self), pwzfilepath.param().abi(), pbblob as _, pcbblob as _).ok() } } pub unsafe fn StrongNameGetBlobFromImage(&self, pbbase: &[u8], pbblob: *mut u8, pcbblob: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).StrongNameGetBlobFromImage)(windows_core::Interface::as_raw(self), core::mem::transmute(pbbase.as_ptr()), pbbase.len().try_into().unwrap(), core::mem::transmute(pbblob), core::mem::transmute(pcbblob)).ok() } + unsafe { (windows_core::Interface::vtable(self).StrongNameGetBlobFromImage)(windows_core::Interface::as_raw(self), core::mem::transmute(pbbase.as_ptr()), pbbase.len().try_into().unwrap(), pbblob as _, pcbblob as _).ok() } } pub unsafe fn StrongNameGetPublicKey(&self, pwzkeycontainer: P0, pbkeyblob: *const u8, cbkeyblob: u32, ppbpublickeyblob: *mut *mut u8, pcbpublickeyblob: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).StrongNameGetPublicKey)(windows_core::Interface::as_raw(self), pwzkeycontainer.param().abi(), pbkeyblob, cbkeyblob, core::mem::transmute(ppbpublickeyblob), core::mem::transmute(pcbpublickeyblob)).ok() } + unsafe { (windows_core::Interface::vtable(self).StrongNameGetPublicKey)(windows_core::Interface::as_raw(self), pwzkeycontainer.param().abi(), pbkeyblob, cbkeyblob, ppbpublickeyblob as _, pcbpublickeyblob as _).ok() } } pub unsafe fn StrongNameHashSize(&self, ulhashalg: u32) -> windows_core::Result { unsafe { @@ -2350,13 +2350,13 @@ impl ICLRStrongName { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).StrongNameKeyGen)(windows_core::Interface::as_raw(self), pwzkeycontainer.param().abi(), dwflags, core::mem::transmute(ppbkeyblob), core::mem::transmute(pcbkeyblob)).ok() } + unsafe { (windows_core::Interface::vtable(self).StrongNameKeyGen)(windows_core::Interface::as_raw(self), pwzkeycontainer.param().abi(), dwflags, ppbkeyblob as _, pcbkeyblob as _).ok() } } pub unsafe fn StrongNameKeyGenEx(&self, pwzkeycontainer: P0, dwflags: u32, dwkeysize: u32, ppbkeyblob: *mut *mut u8, pcbkeyblob: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).StrongNameKeyGenEx)(windows_core::Interface::as_raw(self), pwzkeycontainer.param().abi(), dwflags, dwkeysize, core::mem::transmute(ppbkeyblob), core::mem::transmute(pcbkeyblob)).ok() } + unsafe { (windows_core::Interface::vtable(self).StrongNameKeyGenEx)(windows_core::Interface::as_raw(self), pwzkeycontainer.param().abi(), dwflags, dwkeysize, ppbkeyblob as _, pcbkeyblob as _).ok() } } pub unsafe fn StrongNameKeyInstall(&self, pwzkeycontainer: P0, pbkeyblob: *const u8, cbkeyblob: u32) -> windows_core::Result<()> where @@ -2369,14 +2369,14 @@ impl ICLRStrongName { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).StrongNameSignatureGeneration)(windows_core::Interface::as_raw(self), pwzfilepath.param().abi(), pwzkeycontainer.param().abi(), pbkeyblob, cbkeyblob, core::mem::transmute(ppbsignatureblob), core::mem::transmute(pcbsignatureblob)).ok() } + unsafe { (windows_core::Interface::vtable(self).StrongNameSignatureGeneration)(windows_core::Interface::as_raw(self), pwzfilepath.param().abi(), pwzkeycontainer.param().abi(), pbkeyblob, cbkeyblob, ppbsignatureblob as _, pcbsignatureblob as _).ok() } } pub unsafe fn StrongNameSignatureGenerationEx(&self, wszfilepath: P0, wszkeycontainer: P1, pbkeyblob: *const u8, cbkeyblob: u32, ppbsignatureblob: *mut *mut u8, pcbsignatureblob: *mut u32, dwflags: u32) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).StrongNameSignatureGenerationEx)(windows_core::Interface::as_raw(self), wszfilepath.param().abi(), wszkeycontainer.param().abi(), pbkeyblob, cbkeyblob, core::mem::transmute(ppbsignatureblob), core::mem::transmute(pcbsignatureblob), dwflags).ok() } + unsafe { (windows_core::Interface::vtable(self).StrongNameSignatureGenerationEx)(windows_core::Interface::as_raw(self), wszfilepath.param().abi(), wszkeycontainer.param().abi(), pbkeyblob, cbkeyblob, ppbsignatureblob as _, pcbsignatureblob as _, dwflags).ok() } } pub unsafe fn StrongNameSignatureSize(&self, pbpublickeyblob: *const u8, cbpublickeyblob: u32, pcbsize: *const u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).StrongNameSignatureSize)(windows_core::Interface::as_raw(self), pbpublickeyblob, cbpublickeyblob, pcbsize).ok() } @@ -2409,16 +2409,16 @@ impl ICLRStrongName { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).StrongNameTokenFromAssembly)(windows_core::Interface::as_raw(self), pwzfilepath.param().abi(), core::mem::transmute(ppbstrongnametoken), core::mem::transmute(pcbstrongnametoken)).ok() } + unsafe { (windows_core::Interface::vtable(self).StrongNameTokenFromAssembly)(windows_core::Interface::as_raw(self), pwzfilepath.param().abi(), ppbstrongnametoken as _, pcbstrongnametoken as _).ok() } } pub unsafe fn StrongNameTokenFromAssemblyEx(&self, pwzfilepath: P0, ppbstrongnametoken: *mut *mut u8, pcbstrongnametoken: *mut u32, ppbpublickeyblob: *mut *mut u8, pcbpublickeyblob: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).StrongNameTokenFromAssemblyEx)(windows_core::Interface::as_raw(self), pwzfilepath.param().abi(), core::mem::transmute(ppbstrongnametoken), core::mem::transmute(pcbstrongnametoken), core::mem::transmute(ppbpublickeyblob), core::mem::transmute(pcbpublickeyblob)).ok() } + unsafe { (windows_core::Interface::vtable(self).StrongNameTokenFromAssemblyEx)(windows_core::Interface::as_raw(self), pwzfilepath.param().abi(), ppbstrongnametoken as _, pcbstrongnametoken as _, ppbpublickeyblob as _, pcbpublickeyblob as _).ok() } } pub unsafe fn StrongNameTokenFromPublicKey(&self, pbpublickeyblob: *const u8, cbpublickeyblob: u32, ppbstrongnametoken: *mut *mut u8, pcbstrongnametoken: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).StrongNameTokenFromPublicKey)(windows_core::Interface::as_raw(self), pbpublickeyblob, cbpublickeyblob, core::mem::transmute(ppbstrongnametoken), core::mem::transmute(pcbstrongnametoken)).ok() } + unsafe { (windows_core::Interface::vtable(self).StrongNameTokenFromPublicKey)(windows_core::Interface::as_raw(self), pbpublickeyblob, cbpublickeyblob, ppbstrongnametoken as _, pcbstrongnametoken as _).ok() } } } #[repr(C)] @@ -2700,7 +2700,7 @@ impl ICLRStrongName2 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).StrongNameGetPublicKeyEx)(windows_core::Interface::as_raw(self), pwzkeycontainer.param().abi(), pbkeyblob, cbkeyblob, core::mem::transmute(ppbpublickeyblob), core::mem::transmute(pcbpublickeyblob), uhashalgid, ureserved).ok() } + unsafe { (windows_core::Interface::vtable(self).StrongNameGetPublicKeyEx)(windows_core::Interface::as_raw(self), pwzkeycontainer.param().abi(), pbkeyblob, cbkeyblob, ppbpublickeyblob as _, pcbpublickeyblob as _, uhashalgid, ureserved).ok() } } pub unsafe fn StrongNameSignatureVerificationEx2(&self, wszfilepath: P0, fforceverification: bool, pbecmapublickey: *const u8, cbecmapublickey: u32) -> windows_core::Result where @@ -2760,13 +2760,13 @@ impl ICLRStrongName3 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).StrongNameDigestGenerate)(windows_core::Interface::as_raw(self), wszfilepath.param().abi(), core::mem::transmute(ppbdigestblob), core::mem::transmute(pcbdigestblob), dwflags).ok() } + unsafe { (windows_core::Interface::vtable(self).StrongNameDigestGenerate)(windows_core::Interface::as_raw(self), wszfilepath.param().abi(), ppbdigestblob as _, pcbdigestblob as _, dwflags).ok() } } pub unsafe fn StrongNameDigestSign(&self, wszkeycontainer: P0, pbkeyblob: &[u8], pbdigestblob: &[u8], hashalgid: u32, ppbsignatureblob: *mut *mut u8, pcbsignatureblob: *mut u32, dwflags: u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).StrongNameDigestSign)(windows_core::Interface::as_raw(self), wszkeycontainer.param().abi(), core::mem::transmute(pbkeyblob.as_ptr()), pbkeyblob.len().try_into().unwrap(), core::mem::transmute(pbdigestblob.as_ptr()), pbdigestblob.len().try_into().unwrap(), hashalgid, core::mem::transmute(ppbsignatureblob), core::mem::transmute(pcbsignatureblob), dwflags).ok() } + unsafe { (windows_core::Interface::vtable(self).StrongNameDigestSign)(windows_core::Interface::as_raw(self), wszkeycontainer.param().abi(), core::mem::transmute(pbkeyblob.as_ptr()), pbkeyblob.len().try_into().unwrap(), core::mem::transmute(pbdigestblob.as_ptr()), pbdigestblob.len().try_into().unwrap(), hashalgid, ppbsignatureblob as _, pcbsignatureblob as _, dwflags).ok() } } pub unsafe fn StrongNameDigestEmbed(&self, wszfilepath: P0, pbsignatureblob: &[u8]) -> windows_core::Result<()> where @@ -3436,7 +3436,7 @@ impl ICorRuntimeHost { } } pub unsafe fn EnumDomains(&self, henum: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumDomains)(windows_core::Interface::as_raw(self), core::mem::transmute(henum)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumDomains)(windows_core::Interface::as_raw(self), henum as _).ok() } } pub unsafe fn NextDomain(&self, henum: *const core::ffi::c_void) -> windows_core::Result { unsafe { @@ -3794,10 +3794,10 @@ impl ICorThreadpool { unsafe { (windows_core::Interface::vtable(self).CorSetMaxThreads)(windows_core::Interface::as_raw(self), maxworkerthreads, maxiocompletionthreads).ok() } } pub unsafe fn CorGetMaxThreads(&self, maxworkerthreads: *mut u32, maxiocompletionthreads: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CorGetMaxThreads)(windows_core::Interface::as_raw(self), core::mem::transmute(maxworkerthreads), core::mem::transmute(maxiocompletionthreads)).ok() } + unsafe { (windows_core::Interface::vtable(self).CorGetMaxThreads)(windows_core::Interface::as_raw(self), maxworkerthreads as _, maxiocompletionthreads as _).ok() } } pub unsafe fn CorGetAvailableThreads(&self, availableworkerthreads: *mut u32, availableiocompletionthreads: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CorGetAvailableThreads)(windows_core::Interface::as_raw(self), core::mem::transmute(availableworkerthreads), core::mem::transmute(availableiocompletionthreads)).ok() } + unsafe { (windows_core::Interface::vtable(self).CorGetAvailableThreads)(windows_core::Interface::as_raw(self), availableworkerthreads as _, availableiocompletionthreads as _).ok() } } } #[repr(C)] @@ -4082,10 +4082,10 @@ impl IGCHost { unsafe { (windows_core::Interface::vtable(self).Collect)(windows_core::Interface::as_raw(self), generation).ok() } } pub unsafe fn GetStats(&self, pstats: *mut COR_GC_STATS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStats)(windows_core::Interface::as_raw(self), core::mem::transmute(pstats)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStats)(windows_core::Interface::as_raw(self), pstats as _).ok() } } pub unsafe fn GetThreadStats(&self, pfibercookie: *const u32, pstats: *mut COR_GC_THREAD_STATS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetThreadStats)(windows_core::Interface::as_raw(self), pfibercookie, core::mem::transmute(pstats)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetThreadStats)(windows_core::Interface::as_raw(self), pfibercookie, pstats as _).ok() } } pub unsafe fn SetVirtualMemLimit(&self, sztmaxvirtualmemmb: usize) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetVirtualMemLimit)(windows_core::Interface::as_raw(self), sztmaxvirtualmemmb).ok() } @@ -4193,7 +4193,7 @@ windows_core::imp::define_interface!(IGCHostControl, IGCHostControl_Vtbl, 0x5513 windows_core::imp::interface_hierarchy!(IGCHostControl, windows_core::IUnknown); impl IGCHostControl { pub unsafe fn RequestVirtualMemLimit(&self, sztmaxvirtualmemmb: usize, psztnewmaxvirtualmemmb: *mut usize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RequestVirtualMemLimit)(windows_core::Interface::as_raw(self), sztmaxvirtualmemmb, core::mem::transmute(psztnewmaxvirtualmemmb)).ok() } + unsafe { (windows_core::Interface::vtable(self).RequestVirtualMemLimit)(windows_core::Interface::as_raw(self), sztmaxvirtualmemmb, psztnewmaxvirtualmemmb as _).ok() } } } #[repr(C)] @@ -4344,11 +4344,11 @@ windows_core::imp::interface_hierarchy!(IHostAssemblyStore, windows_core::IUnkno impl IHostAssemblyStore { #[cfg(feature = "Win32_System_Com")] pub unsafe fn ProvideAssembly(&self, pbindinfo: *const AssemblyBindInfo, passemblyid: *mut u64, pcontext: *mut u64, ppstmassemblyimage: *mut Option, ppstmpdb: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ProvideAssembly)(windows_core::Interface::as_raw(self), pbindinfo, core::mem::transmute(passemblyid), core::mem::transmute(pcontext), core::mem::transmute(ppstmassemblyimage), core::mem::transmute(ppstmpdb)).ok() } + unsafe { (windows_core::Interface::vtable(self).ProvideAssembly)(windows_core::Interface::as_raw(self), pbindinfo, passemblyid as _, pcontext as _, core::mem::transmute(ppstmassemblyimage), core::mem::transmute(ppstmpdb)).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn ProvideModule(&self, pbindinfo: *const ModuleBindInfo, pdwmoduleid: *mut u32, ppstmmoduleimage: *mut Option, ppstmpdb: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ProvideModule)(windows_core::Interface::as_raw(self), pbindinfo, core::mem::transmute(pdwmoduleid), core::mem::transmute(ppstmmoduleimage), core::mem::transmute(ppstmpdb)).ok() } + unsafe { (windows_core::Interface::vtable(self).ProvideModule)(windows_core::Interface::as_raw(self), pbindinfo, pdwmoduleid as _, core::mem::transmute(ppstmmoduleimage), core::mem::transmute(ppstmpdb)).ok() } } } #[repr(C)] @@ -4440,7 +4440,7 @@ windows_core::imp::define_interface!(IHostControl, IHostControl_Vtbl, 0x02ca073c windows_core::imp::interface_hierarchy!(IHostControl, windows_core::IUnknown); impl IHostControl { pub unsafe fn GetHostManager(&self, riid: *const windows_core::GUID, ppobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetHostManager)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(ppobject)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetHostManager)(windows_core::Interface::as_raw(self), riid, ppobject as _).ok() } } pub unsafe fn SetAppDomainManager(&self, dwappdomainid: u32, punkappdomainmanager: P1) -> windows_core::Result<()> where @@ -4824,10 +4824,10 @@ windows_core::imp::define_interface!(IHostMalloc, IHostMalloc_Vtbl, 0x1831991c_c windows_core::imp::interface_hierarchy!(IHostMalloc, windows_core::IUnknown); impl IHostMalloc { pub unsafe fn Alloc(&self, cbsize: usize, ecriticallevel: EMemoryCriticalLevel, ppmem: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Alloc)(windows_core::Interface::as_raw(self), cbsize, ecriticallevel, core::mem::transmute(ppmem)).ok() } + unsafe { (windows_core::Interface::vtable(self).Alloc)(windows_core::Interface::as_raw(self), cbsize, ecriticallevel, ppmem as _).ok() } } pub unsafe fn DebugAlloc(&self, cbsize: usize, ecriticallevel: EMemoryCriticalLevel, pszfilename: *const u8, ilineno: i32, ppmem: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DebugAlloc)(windows_core::Interface::as_raw(self), cbsize, ecriticallevel, pszfilename, ilineno, core::mem::transmute(ppmem)).ok() } + unsafe { (windows_core::Interface::vtable(self).DebugAlloc)(windows_core::Interface::as_raw(self), cbsize, ecriticallevel, pszfilename, ilineno, ppmem as _).ok() } } pub unsafe fn Free(&self, pmem: *const core::ffi::c_void) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Free)(windows_core::Interface::as_raw(self), pmem).ok() } @@ -4944,13 +4944,13 @@ impl IHostMemoryManager { } } pub unsafe fn VirtualAlloc(&self, paddress: *const core::ffi::c_void, dwsize: usize, flallocationtype: u32, flprotect: u32, ecriticallevel: EMemoryCriticalLevel, ppmem: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).VirtualAlloc)(windows_core::Interface::as_raw(self), paddress, dwsize, flallocationtype, flprotect, ecriticallevel, core::mem::transmute(ppmem)).ok() } + unsafe { (windows_core::Interface::vtable(self).VirtualAlloc)(windows_core::Interface::as_raw(self), paddress, dwsize, flallocationtype, flprotect, ecriticallevel, ppmem as _).ok() } } pub unsafe fn VirtualFree(&self, lpaddress: *const core::ffi::c_void, dwsize: usize, dwfreetype: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).VirtualFree)(windows_core::Interface::as_raw(self), lpaddress, dwsize, dwfreetype).ok() } } pub unsafe fn VirtualQuery(&self, lpaddress: *const core::ffi::c_void, lpbuffer: *mut core::ffi::c_void, dwlength: usize, presult: *mut usize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).VirtualQuery)(windows_core::Interface::as_raw(self), lpaddress, core::mem::transmute(lpbuffer), dwlength, core::mem::transmute(presult)).ok() } + unsafe { (windows_core::Interface::vtable(self).VirtualQuery)(windows_core::Interface::as_raw(self), lpaddress, lpbuffer as _, dwlength, presult as _).ok() } } pub unsafe fn VirtualProtect(&self, lpaddress: *const core::ffi::c_void, dwsize: usize, flnewprotect: u32) -> windows_core::Result { unsafe { @@ -4959,7 +4959,7 @@ impl IHostMemoryManager { } } pub unsafe fn GetMemoryLoad(&self, pmemoryload: *mut u32, pavailablebytes: *mut usize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMemoryLoad)(windows_core::Interface::as_raw(self), core::mem::transmute(pmemoryload), core::mem::transmute(pavailablebytes)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMemoryLoad)(windows_core::Interface::as_raw(self), pmemoryload as _, pavailablebytes as _).ok() } } pub unsafe fn RegisterMemoryNotificationCallback(&self, pcallback: P0) -> windows_core::Result<()> where @@ -6089,7 +6089,7 @@ impl IManagedObject { } } pub unsafe fn GetObjectIdentity(&self, pbstrguid: *mut windows_core::BSTR, appdomainid: *mut i32, pccw: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetObjectIdentity)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrguid), core::mem::transmute(appdomainid), core::mem::transmute(pccw)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetObjectIdentity)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrguid), appdomainid as _, pccw as _).ok() } } } #[repr(C)] @@ -6215,7 +6215,7 @@ impl ITypeName { pub unsafe fn GetModifiers(&self, count: u32, rgmodifiers: *mut u32) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetModifiers)(windows_core::Interface::as_raw(self), count, core::mem::transmute(rgmodifiers), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetModifiers)(windows_core::Interface::as_raw(self), count, rgmodifiers as _, &mut result__).map(|| result__) } } pub unsafe fn GetAssemblyName(&self) -> windows_core::Result { @@ -6536,7 +6536,7 @@ impl ITypeNameFactory { { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).ParseTypeName)(windows_core::Interface::as_raw(self), szname.param().abi(), core::mem::transmute(perror), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).ParseTypeName)(windows_core::Interface::as_raw(self), szname.param().abi(), perror as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn GetTypeNameBuilder(&self) -> windows_core::Result { diff --git a/crates/libs/windows/src/Windows/Win32/System/Com/CallObj/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Com/CallObj/mod.rs index 623ec48bfb..244ecd9a98 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 @@ -4,7 +4,7 @@ where P1: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn CoGetInterceptor(iidintercepted : *const windows_core::GUID, punkouter : * mut core::ffi::c_void, iid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { CoGetInterceptor(iidintercepted, punkouter.param().abi(), iid, core::mem::transmute(ppv)).ok() } + unsafe { CoGetInterceptor(iidintercepted, punkouter.param().abi(), iid, ppv as _).ok() } } #[inline] pub unsafe fn CoGetInterceptorFromTypeInfo(iidintercepted: *const windows_core::GUID, punkouter: P1, typeinfo: P2, iid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -13,7 +13,7 @@ where P2: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn CoGetInterceptorFromTypeInfo(iidintercepted : *const windows_core::GUID, punkouter : * mut core::ffi::c_void, typeinfo : * mut core::ffi::c_void, iid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { CoGetInterceptorFromTypeInfo(iidintercepted, punkouter.param().abi(), typeinfo.param().abi(), iid, core::mem::transmute(ppv)).ok() } + unsafe { CoGetInterceptorFromTypeInfo(iidintercepted, punkouter.param().abi(), typeinfo.param().abi(), iid, ppv as _).ok() } } #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] @@ -95,13 +95,13 @@ windows_core::imp::define_interface!(ICallFrame, ICallFrame_Vtbl, 0xd573b4b0_894 windows_core::imp::interface_hierarchy!(ICallFrame, windows_core::IUnknown); impl ICallFrame { pub unsafe fn GetInfo(&self, pinfo: *mut CALLFRAMEINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInfo)(windows_core::Interface::as_raw(self), pinfo as _).ok() } } pub unsafe fn GetIIDAndMethod(&self, piid: *mut windows_core::GUID, pimethod: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIIDAndMethod)(windows_core::Interface::as_raw(self), core::mem::transmute(piid), core::mem::transmute(pimethod)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIIDAndMethod)(windows_core::Interface::as_raw(self), piid as _, pimethod as _).ok() } } pub unsafe fn GetNames(&self, pwszinterface: *mut windows_core::PWSTR, pwszmethod: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNames)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszinterface), core::mem::transmute(pwszmethod)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNames)(windows_core::Interface::as_raw(self), pwszinterface as _, pwszmethod as _).ok() } } pub unsafe fn GetStackLocation(&self) -> *mut core::ffi::c_void { unsafe { (windows_core::Interface::vtable(self).GetStackLocation)(windows_core::Interface::as_raw(self)) } @@ -169,7 +169,7 @@ impl ICallFrame { } } pub unsafe fn Marshal(&self, pmshlcontext: *const CALLFRAME_MARSHALCONTEXT, mshlflags: super::MSHLFLAGS, pbuffer: &[u8], pcbbufferused: *mut u32, pdatarep: *mut u32, prpcflags: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Marshal)(windows_core::Interface::as_raw(self), core::mem::transmute(pmshlcontext), mshlflags, core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), core::mem::transmute(pcbbufferused), core::mem::transmute(pdatarep), core::mem::transmute(prpcflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).Marshal)(windows_core::Interface::as_raw(self), core::mem::transmute(pmshlcontext), mshlflags, core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), pcbbufferused as _, pdatarep as _, prpcflags as _).ok() } } pub unsafe fn Unmarshal(&self, pbuffer: &[u8], datarep: u32, pcontext: *const CALLFRAME_MARSHALCONTEXT) -> windows_core::Result { unsafe { @@ -478,10 +478,10 @@ windows_core::imp::define_interface!(ICallIndirect, ICallIndirect_Vtbl, 0xd573b4 windows_core::imp::interface_hierarchy!(ICallIndirect, windows_core::IUnknown); impl ICallIndirect { pub unsafe fn CallIndirect(&self, phrreturn: *mut windows_core::HRESULT, imethod: u32, pvargs: *const core::ffi::c_void, cbargs: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CallIndirect)(windows_core::Interface::as_raw(self), core::mem::transmute(phrreturn), imethod, pvargs, core::mem::transmute(cbargs)).ok() } + unsafe { (windows_core::Interface::vtable(self).CallIndirect)(windows_core::Interface::as_raw(self), phrreturn as _, imethod, pvargs, cbargs as _).ok() } } pub unsafe fn GetMethodInfo(&self, imethod: u32, pinfo: *mut CALLFRAMEINFO, pwszmethod: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMethodInfo)(windows_core::Interface::as_raw(self), imethod, core::mem::transmute(pinfo), core::mem::transmute(pwszmethod)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMethodInfo)(windows_core::Interface::as_raw(self), imethod, pinfo as _, pwszmethod as _).ok() } } pub unsafe fn GetStackSize(&self, imethod: u32) -> windows_core::Result { unsafe { @@ -490,7 +490,7 @@ impl ICallIndirect { } } 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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetIID)(windows_core::Interface::as_raw(self), piid.unwrap_or(core::mem::zeroed()) as _, pfderivesfromidispatch.unwrap_or(core::mem::zeroed()) as _, pcmethod.unwrap_or(core::mem::zeroed()) as _, pwszinterface as _).ok() } } } #[repr(C)] @@ -619,7 +619,7 @@ windows_core::imp::define_interface!(ICallUnmarshal, ICallUnmarshal_Vtbl, 0x5333 windows_core::imp::interface_hierarchy!(ICallUnmarshal, windows_core::IUnknown); impl ICallUnmarshal { pub unsafe fn Unmarshal(&self, imethod: u32, pbuffer: &[u8], fforcebuffercopy: bool, datarep: u32, pcontext: *const CALLFRAME_MARSHALCONTEXT, pcbunmarshalled: *mut u32, ppframe: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Unmarshal)(windows_core::Interface::as_raw(self), imethod, core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), fforcebuffercopy.into(), datarep, core::mem::transmute(pcontext), core::mem::transmute(pcbunmarshalled), core::mem::transmute(ppframe)).ok() } + unsafe { (windows_core::Interface::vtable(self).Unmarshal)(windows_core::Interface::as_raw(self), imethod, core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), fforcebuffercopy.into(), datarep, core::mem::transmute(pcontext), pcbunmarshalled as _, core::mem::transmute(ppframe)).ok() } } pub unsafe fn ReleaseMarshalData(&self, imethod: u32, pbuffer: &[u8], ibfirstrelease: u32, datarep: u32, pcontext: *const CALLFRAME_MARSHALCONTEXT) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ReleaseMarshalData)(windows_core::Interface::as_raw(self), imethod, core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), ibfirstrelease, datarep, core::mem::transmute(pcontext)).ok() } diff --git a/crates/libs/windows/src/Windows/Win32/System/Com/Events/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Com/Events/mod.rs index 6109c9ce36..9938900928 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Com/Events/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Com/Events/mod.rs @@ -51,7 +51,7 @@ impl IEnumEventObject { } } pub unsafe fn Next(&self, ppinterface: &mut [Option], cretelem: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppinterface.len().try_into().unwrap(), core::mem::transmute(ppinterface.as_ptr()), core::mem::transmute(cretelem)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppinterface.len().try_into().unwrap(), core::mem::transmute(ppinterface.as_ptr()), cretelem as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)) } @@ -1905,7 +1905,7 @@ impl IEventSystem { pub unsafe fn Query(&self, progid: &windows_core::BSTR, querycriteria: &windows_core::BSTR, errorindex: *mut i32) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).Query)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(progid), core::mem::transmute_copy(querycriteria), core::mem::transmute(errorindex), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).Query)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(progid), core::mem::transmute_copy(querycriteria), errorindex as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn Store(&self, progid: &windows_core::BSTR, pinterface: P1) -> windows_core::Result<()> 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 894bffd205..de394ef672 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 @@ -11,12 +11,12 @@ pub unsafe fn BSTR_UserFree64(param0: *const u32, param1: *const windows_core::B #[inline] pub unsafe fn BSTR_UserMarshal(param0: *const u32, param1: *mut u8, param2: *const windows_core::BSTR) -> *mut u8 { windows_targets::link!("oleaut32.dll" "system" fn BSTR_UserMarshal(param0 : *const u32, param1 : *mut u8, param2 : *const * mut core::ffi::c_void) -> *mut u8); - unsafe { BSTR_UserMarshal(param0, core::mem::transmute(param1), core::mem::transmute(param2)) } + unsafe { BSTR_UserMarshal(param0, param1 as _, core::mem::transmute(param2)) } } #[inline] pub unsafe fn BSTR_UserMarshal64(param0: *const u32, param1: *mut u8, param2: *const windows_core::BSTR) -> *mut u8 { windows_targets::link!("oleaut32.dll" "system" fn BSTR_UserMarshal64(param0 : *const u32, param1 : *mut u8, param2 : *const * mut core::ffi::c_void) -> *mut u8); - unsafe { BSTR_UserMarshal64(param0, core::mem::transmute(param1), core::mem::transmute(param2)) } + unsafe { BSTR_UserMarshal64(param0, param1 as _, core::mem::transmute(param2)) } } #[inline] pub unsafe fn BSTR_UserSize(param0: *const u32, param1: u32, param2: *const windows_core::BSTR) -> u32 { @@ -51,12 +51,12 @@ pub unsafe fn CLIPFORMAT_UserFree64(param0: *const u32, param1: *const u16) { #[inline] pub unsafe fn CLIPFORMAT_UserMarshal(param0: *const u32, param1: *mut u8, param2: *const u16) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn CLIPFORMAT_UserMarshal(param0 : *const u32, param1 : *mut u8, param2 : *const u16) -> *mut u8); - unsafe { CLIPFORMAT_UserMarshal(param0, core::mem::transmute(param1), param2) } + unsafe { CLIPFORMAT_UserMarshal(param0, param1 as _, param2) } } #[inline] pub unsafe fn CLIPFORMAT_UserMarshal64(param0: *const u32, param1: *mut u8, param2: *const u16) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn CLIPFORMAT_UserMarshal64(param0 : *const u32, param1 : *mut u8, param2 : *const u16) -> *mut u8); - unsafe { CLIPFORMAT_UserMarshal64(param0, core::mem::transmute(param1), param2) } + unsafe { CLIPFORMAT_UserMarshal64(param0, param1 as _, param2) } } #[inline] pub unsafe fn CLIPFORMAT_UserSize(param0: *const u32, param1: u32, param2: *const u16) -> u32 { @@ -71,12 +71,12 @@ pub unsafe fn CLIPFORMAT_UserSize64(param0: *const u32, param1: u32, param2: *co #[inline] pub unsafe fn CLIPFORMAT_UserUnmarshal(param0: *const u32, param1: *const u8, param2: *mut u16) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn CLIPFORMAT_UserUnmarshal(param0 : *const u32, param1 : *const u8, param2 : *mut u16) -> *mut u8); - unsafe { CLIPFORMAT_UserUnmarshal(param0, param1, core::mem::transmute(param2)) } + unsafe { CLIPFORMAT_UserUnmarshal(param0, param1, param2 as _) } } #[inline] pub unsafe fn CLIPFORMAT_UserUnmarshal64(param0: *const u32, param1: *const u8, param2: *mut u16) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn CLIPFORMAT_UserUnmarshal64(param0 : *const u32, param1 : *const u8, param2 : *mut u16) -> *mut u8); - unsafe { CLIPFORMAT_UserUnmarshal64(param0, param1, core::mem::transmute(param2)) } + unsafe { CLIPFORMAT_UserUnmarshal64(param0, param1, param2 as _) } } #[inline] pub unsafe fn CoGetMarshalSizeMax(pulsize: *mut u32, riid: *const windows_core::GUID, punk: P2, dwdestcontext: u32, pvdestcontext: Option<*const core::ffi::c_void>, mshlflags: u32) -> windows_core::Result<()> @@ -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); - unsafe { CoGetMarshalSizeMax(core::mem::transmute(pulsize), riid, punk.param().abi(), dwdestcontext, core::mem::transmute(pvdestcontext.unwrap_or(core::mem::zeroed())), mshlflags).ok() } + unsafe { CoGetMarshalSizeMax(pulsize as _, riid, punk.param().abi(), dwdestcontext, pvdestcontext.unwrap_or(core::mem::zeroed()) as _, 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 @@ -94,7 +94,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); unsafe { let mut result__ = core::mem::zeroed(); - CoGetStandardMarshal(riid, punk.param().abi(), dwdestcontext, core::mem::transmute(pvdestcontext.unwrap_or(core::mem::zeroed())), mshlflags, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + CoGetStandardMarshal(riid, punk.param().abi(), dwdestcontext, pvdestcontext.unwrap_or(core::mem::zeroed()) as _, mshlflags, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[inline] @@ -134,7 +134,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); - unsafe { CoMarshalInterface(pstm.param().abi(), riid, punk.param().abi(), dwdestcontext, core::mem::transmute(pvdestcontext.unwrap_or(core::mem::zeroed())), mshlflags).ok() } + unsafe { CoMarshalInterface(pstm.param().abi(), riid, punk.param().abi(), dwdestcontext, pvdestcontext.unwrap_or(core::mem::zeroed()) as _, mshlflags).ok() } } #[inline] pub unsafe fn CoReleaseMarshalData(pstm: P0) -> windows_core::Result<()> @@ -181,13 +181,13 @@ pub unsafe fn HACCEL_UserFree64(param0: *const u32, param1: *const super::super: #[inline] pub unsafe fn HACCEL_UserMarshal(param0: *const u32, param1: *mut u8, param2: *const super::super::super::UI::WindowsAndMessaging::HACCEL) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HACCEL_UserMarshal(param0 : *const u32, param1 : *mut u8, param2 : *const super::super::super::UI::WindowsAndMessaging:: HACCEL) -> *mut u8); - unsafe { HACCEL_UserMarshal(param0, core::mem::transmute(param1), param2) } + unsafe { HACCEL_UserMarshal(param0, param1 as _, param2) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] pub unsafe fn HACCEL_UserMarshal64(param0: *const u32, param1: *mut u8, param2: *const super::super::super::UI::WindowsAndMessaging::HACCEL) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HACCEL_UserMarshal64(param0 : *const u32, param1 : *mut u8, param2 : *const super::super::super::UI::WindowsAndMessaging:: HACCEL) -> *mut u8); - unsafe { HACCEL_UserMarshal64(param0, core::mem::transmute(param1), param2) } + unsafe { HACCEL_UserMarshal64(param0, param1 as _, param2) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -205,13 +205,13 @@ pub unsafe fn HACCEL_UserSize64(param0: *const u32, param1: u32, param2: *const #[inline] pub unsafe fn HACCEL_UserUnmarshal(param0: *const u32, param1: *const u8, param2: *mut super::super::super::UI::WindowsAndMessaging::HACCEL) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HACCEL_UserUnmarshal(param0 : *const u32, param1 : *const u8, param2 : *mut super::super::super::UI::WindowsAndMessaging:: HACCEL) -> *mut u8); - unsafe { HACCEL_UserUnmarshal(param0, param1, core::mem::transmute(param2)) } + unsafe { HACCEL_UserUnmarshal(param0, param1, param2 as _) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] pub unsafe fn HACCEL_UserUnmarshal64(param0: *const u32, param1: *const u8, param2: *mut super::super::super::UI::WindowsAndMessaging::HACCEL) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HACCEL_UserUnmarshal64(param0 : *const u32, param1 : *const u8, param2 : *mut super::super::super::UI::WindowsAndMessaging:: HACCEL) -> *mut u8); - unsafe { HACCEL_UserUnmarshal64(param0, param1, core::mem::transmute(param2)) } + unsafe { HACCEL_UserUnmarshal64(param0, param1, param2 as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -229,13 +229,13 @@ pub unsafe fn HBITMAP_UserFree64(param0: *const u32, param1: *const super::super #[inline] pub unsafe fn HBITMAP_UserMarshal(param0: *const u32, param1: *mut u8, param2: *const super::super::super::Graphics::Gdi::HBITMAP) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HBITMAP_UserMarshal(param0 : *const u32, param1 : *mut u8, param2 : *const super::super::super::Graphics::Gdi:: HBITMAP) -> *mut u8); - unsafe { HBITMAP_UserMarshal(param0, core::mem::transmute(param1), param2) } + unsafe { HBITMAP_UserMarshal(param0, param1 as _, param2) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn HBITMAP_UserMarshal64(param0: *const u32, param1: *mut u8, param2: *const super::super::super::Graphics::Gdi::HBITMAP) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HBITMAP_UserMarshal64(param0 : *const u32, param1 : *mut u8, param2 : *const super::super::super::Graphics::Gdi:: HBITMAP) -> *mut u8); - unsafe { HBITMAP_UserMarshal64(param0, core::mem::transmute(param1), param2) } + unsafe { HBITMAP_UserMarshal64(param0, param1 as _, param2) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -253,13 +253,13 @@ pub unsafe fn HBITMAP_UserSize64(param0: *const u32, param1: u32, param2: *const #[inline] pub unsafe fn HBITMAP_UserUnmarshal(param0: *const u32, param1: *const u8, param2: *mut super::super::super::Graphics::Gdi::HBITMAP) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HBITMAP_UserUnmarshal(param0 : *const u32, param1 : *const u8, param2 : *mut super::super::super::Graphics::Gdi:: HBITMAP) -> *mut u8); - unsafe { HBITMAP_UserUnmarshal(param0, param1, core::mem::transmute(param2)) } + unsafe { HBITMAP_UserUnmarshal(param0, param1, param2 as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn HBITMAP_UserUnmarshal64(param0: *const u32, param1: *const u8, param2: *mut super::super::super::Graphics::Gdi::HBITMAP) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HBITMAP_UserUnmarshal64(param0 : *const u32, param1 : *const u8, param2 : *mut super::super::super::Graphics::Gdi:: HBITMAP) -> *mut u8); - unsafe { HBITMAP_UserUnmarshal64(param0, param1, core::mem::transmute(param2)) } + unsafe { HBITMAP_UserUnmarshal64(param0, param1, param2 as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -277,13 +277,13 @@ pub unsafe fn HDC_UserFree64(param0: *const u32, param1: *const super::super::su #[inline] pub unsafe fn HDC_UserMarshal(param0: *const u32, param1: *mut u8, param2: *const super::super::super::Graphics::Gdi::HDC) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HDC_UserMarshal(param0 : *const u32, param1 : *mut u8, param2 : *const super::super::super::Graphics::Gdi:: HDC) -> *mut u8); - unsafe { HDC_UserMarshal(param0, core::mem::transmute(param1), param2) } + unsafe { HDC_UserMarshal(param0, param1 as _, param2) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn HDC_UserMarshal64(param0: *const u32, param1: *mut u8, param2: *const super::super::super::Graphics::Gdi::HDC) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HDC_UserMarshal64(param0 : *const u32, param1 : *mut u8, param2 : *const super::super::super::Graphics::Gdi:: HDC) -> *mut u8); - unsafe { HDC_UserMarshal64(param0, core::mem::transmute(param1), param2) } + unsafe { HDC_UserMarshal64(param0, param1 as _, param2) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -301,13 +301,13 @@ pub unsafe fn HDC_UserSize64(param0: *const u32, param1: u32, param2: *const sup #[inline] pub unsafe fn HDC_UserUnmarshal(param0: *const u32, param1: *const u8, param2: *mut super::super::super::Graphics::Gdi::HDC) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HDC_UserUnmarshal(param0 : *const u32, param1 : *const u8, param2 : *mut super::super::super::Graphics::Gdi:: HDC) -> *mut u8); - unsafe { HDC_UserUnmarshal(param0, param1, core::mem::transmute(param2)) } + unsafe { HDC_UserUnmarshal(param0, param1, param2 as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn HDC_UserUnmarshal64(param0: *const u32, param1: *const u8, param2: *mut super::super::super::Graphics::Gdi::HDC) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HDC_UserUnmarshal64(param0 : *const u32, param1 : *const u8, param2 : *mut super::super::super::Graphics::Gdi:: HDC) -> *mut u8); - unsafe { HDC_UserUnmarshal64(param0, param1, core::mem::transmute(param2)) } + unsafe { HDC_UserUnmarshal64(param0, param1, param2 as _) } } #[inline] pub unsafe fn HGLOBAL_UserFree(param0: *const u32, param1: *const super::super::super::Foundation::HGLOBAL) { @@ -322,12 +322,12 @@ pub unsafe fn HGLOBAL_UserFree64(param0: *const u32, param1: *const super::super #[inline] pub unsafe fn HGLOBAL_UserMarshal(param0: *const u32, param1: *mut u8, param2: *const super::super::super::Foundation::HGLOBAL) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HGLOBAL_UserMarshal(param0 : *const u32, param1 : *mut u8, param2 : *const super::super::super::Foundation:: HGLOBAL) -> *mut u8); - unsafe { HGLOBAL_UserMarshal(param0, core::mem::transmute(param1), param2) } + unsafe { HGLOBAL_UserMarshal(param0, param1 as _, param2) } } #[inline] pub unsafe fn HGLOBAL_UserMarshal64(param0: *const u32, param1: *mut u8, param2: *const super::super::super::Foundation::HGLOBAL) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HGLOBAL_UserMarshal64(param0 : *const u32, param1 : *mut u8, param2 : *const super::super::super::Foundation:: HGLOBAL) -> *mut u8); - unsafe { HGLOBAL_UserMarshal64(param0, core::mem::transmute(param1), param2) } + unsafe { HGLOBAL_UserMarshal64(param0, param1 as _, param2) } } #[inline] pub unsafe fn HGLOBAL_UserSize(param0: *const u32, param1: u32, param2: *const super::super::super::Foundation::HGLOBAL) -> u32 { @@ -342,12 +342,12 @@ pub unsafe fn HGLOBAL_UserSize64(param0: *const u32, param1: u32, param2: *const #[inline] pub unsafe fn HGLOBAL_UserUnmarshal(param0: *const u32, param1: *const u8, param2: *mut super::super::super::Foundation::HGLOBAL) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HGLOBAL_UserUnmarshal(param0 : *const u32, param1 : *const u8, param2 : *mut super::super::super::Foundation:: HGLOBAL) -> *mut u8); - unsafe { HGLOBAL_UserUnmarshal(param0, param1, core::mem::transmute(param2)) } + unsafe { HGLOBAL_UserUnmarshal(param0, param1, param2 as _) } } #[inline] pub unsafe fn HGLOBAL_UserUnmarshal64(param0: *const u32, param1: *const u8, param2: *mut super::super::super::Foundation::HGLOBAL) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HGLOBAL_UserUnmarshal64(param0 : *const u32, param1 : *const u8, param2 : *mut super::super::super::Foundation:: HGLOBAL) -> *mut u8); - unsafe { HGLOBAL_UserUnmarshal64(param0, param1, core::mem::transmute(param2)) } + unsafe { HGLOBAL_UserUnmarshal64(param0, param1, param2 as _) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -365,13 +365,13 @@ pub unsafe fn HICON_UserFree64(param0: *const u32, param1: *const super::super:: #[inline] pub unsafe fn HICON_UserMarshal(param0: *const u32, param1: *mut u8, param2: *const super::super::super::UI::WindowsAndMessaging::HICON) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HICON_UserMarshal(param0 : *const u32, param1 : *mut u8, param2 : *const super::super::super::UI::WindowsAndMessaging:: HICON) -> *mut u8); - unsafe { HICON_UserMarshal(param0, core::mem::transmute(param1), param2) } + unsafe { HICON_UserMarshal(param0, param1 as _, param2) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] pub unsafe fn HICON_UserMarshal64(param0: *const u32, param1: *mut u8, param2: *const super::super::super::UI::WindowsAndMessaging::HICON) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HICON_UserMarshal64(param0 : *const u32, param1 : *mut u8, param2 : *const super::super::super::UI::WindowsAndMessaging:: HICON) -> *mut u8); - unsafe { HICON_UserMarshal64(param0, core::mem::transmute(param1), param2) } + unsafe { HICON_UserMarshal64(param0, param1 as _, param2) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -389,13 +389,13 @@ pub unsafe fn HICON_UserSize64(param0: *const u32, param1: u32, param2: *const s #[inline] pub unsafe fn HICON_UserUnmarshal(param0: *const u32, param1: *const u8, param2: *mut super::super::super::UI::WindowsAndMessaging::HICON) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HICON_UserUnmarshal(param0 : *const u32, param1 : *const u8, param2 : *mut super::super::super::UI::WindowsAndMessaging:: HICON) -> *mut u8); - unsafe { HICON_UserUnmarshal(param0, param1, core::mem::transmute(param2)) } + unsafe { HICON_UserUnmarshal(param0, param1, param2 as _) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] pub unsafe fn HICON_UserUnmarshal64(param0: *const u32, param1: *const u8, param2: *mut super::super::super::UI::WindowsAndMessaging::HICON) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HICON_UserUnmarshal64(param0 : *const u32, param1 : *const u8, param2 : *mut super::super::super::UI::WindowsAndMessaging:: HICON) -> *mut u8); - unsafe { HICON_UserUnmarshal64(param0, param1, core::mem::transmute(param2)) } + unsafe { HICON_UserUnmarshal64(param0, param1, param2 as _) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -413,13 +413,13 @@ pub unsafe fn HMENU_UserFree64(param0: *const u32, param1: *const super::super:: #[inline] pub unsafe fn HMENU_UserMarshal(param0: *const u32, param1: *mut u8, param2: *const super::super::super::UI::WindowsAndMessaging::HMENU) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HMENU_UserMarshal(param0 : *const u32, param1 : *mut u8, param2 : *const super::super::super::UI::WindowsAndMessaging:: HMENU) -> *mut u8); - unsafe { HMENU_UserMarshal(param0, core::mem::transmute(param1), param2) } + unsafe { HMENU_UserMarshal(param0, param1 as _, param2) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] pub unsafe fn HMENU_UserMarshal64(param0: *const u32, param1: *mut u8, param2: *const super::super::super::UI::WindowsAndMessaging::HMENU) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HMENU_UserMarshal64(param0 : *const u32, param1 : *mut u8, param2 : *const super::super::super::UI::WindowsAndMessaging:: HMENU) -> *mut u8); - unsafe { HMENU_UserMarshal64(param0, core::mem::transmute(param1), param2) } + unsafe { HMENU_UserMarshal64(param0, param1 as _, param2) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -437,13 +437,13 @@ pub unsafe fn HMENU_UserSize64(param0: *const u32, param1: u32, param2: *const s #[inline] pub unsafe fn HMENU_UserUnmarshal(param0: *const u32, param1: *const u8, param2: *mut super::super::super::UI::WindowsAndMessaging::HMENU) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HMENU_UserUnmarshal(param0 : *const u32, param1 : *const u8, param2 : *mut super::super::super::UI::WindowsAndMessaging:: HMENU) -> *mut u8); - unsafe { HMENU_UserUnmarshal(param0, param1, core::mem::transmute(param2)) } + unsafe { HMENU_UserUnmarshal(param0, param1, param2 as _) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] pub unsafe fn HMENU_UserUnmarshal64(param0: *const u32, param1: *const u8, param2: *mut super::super::super::UI::WindowsAndMessaging::HMENU) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HMENU_UserUnmarshal64(param0 : *const u32, param1 : *const u8, param2 : *mut super::super::super::UI::WindowsAndMessaging:: HMENU) -> *mut u8); - unsafe { HMENU_UserUnmarshal64(param0, param1, core::mem::transmute(param2)) } + unsafe { HMENU_UserUnmarshal64(param0, param1, param2 as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -461,13 +461,13 @@ pub unsafe fn HPALETTE_UserFree64(param0: *const u32, param1: *const super::supe #[inline] pub unsafe fn HPALETTE_UserMarshal(param0: *const u32, param1: *mut u8, param2: *const super::super::super::Graphics::Gdi::HPALETTE) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HPALETTE_UserMarshal(param0 : *const u32, param1 : *mut u8, param2 : *const super::super::super::Graphics::Gdi:: HPALETTE) -> *mut u8); - unsafe { HPALETTE_UserMarshal(param0, core::mem::transmute(param1), param2) } + unsafe { HPALETTE_UserMarshal(param0, param1 as _, param2) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn HPALETTE_UserMarshal64(param0: *const u32, param1: *mut u8, param2: *const super::super::super::Graphics::Gdi::HPALETTE) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HPALETTE_UserMarshal64(param0 : *const u32, param1 : *mut u8, param2 : *const super::super::super::Graphics::Gdi:: HPALETTE) -> *mut u8); - unsafe { HPALETTE_UserMarshal64(param0, core::mem::transmute(param1), param2) } + unsafe { HPALETTE_UserMarshal64(param0, param1 as _, param2) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -485,13 +485,13 @@ pub unsafe fn HPALETTE_UserSize64(param0: *const u32, param1: u32, param2: *cons #[inline] pub unsafe fn HPALETTE_UserUnmarshal(param0: *const u32, param1: *const u8, param2: *mut super::super::super::Graphics::Gdi::HPALETTE) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HPALETTE_UserUnmarshal(param0 : *const u32, param1 : *const u8, param2 : *mut super::super::super::Graphics::Gdi:: HPALETTE) -> *mut u8); - unsafe { HPALETTE_UserUnmarshal(param0, param1, core::mem::transmute(param2)) } + unsafe { HPALETTE_UserUnmarshal(param0, param1, param2 as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn HPALETTE_UserUnmarshal64(param0: *const u32, param1: *const u8, param2: *mut super::super::super::Graphics::Gdi::HPALETTE) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HPALETTE_UserUnmarshal64(param0 : *const u32, param1 : *const u8, param2 : *mut super::super::super::Graphics::Gdi:: HPALETTE) -> *mut u8); - unsafe { HPALETTE_UserUnmarshal64(param0, param1, core::mem::transmute(param2)) } + unsafe { HPALETTE_UserUnmarshal64(param0, param1, param2 as _) } } #[inline] pub unsafe fn HWND_UserFree(param0: *const u32, param1: *const super::super::super::Foundation::HWND) { @@ -506,12 +506,12 @@ pub unsafe fn HWND_UserFree64(param0: *const u32, param1: *const super::super::s #[inline] pub unsafe fn HWND_UserMarshal(param0: *const u32, param1: *mut u8, param2: *const super::super::super::Foundation::HWND) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HWND_UserMarshal(param0 : *const u32, param1 : *mut u8, param2 : *const super::super::super::Foundation:: HWND) -> *mut u8); - unsafe { HWND_UserMarshal(param0, core::mem::transmute(param1), param2) } + unsafe { HWND_UserMarshal(param0, param1 as _, param2) } } #[inline] pub unsafe fn HWND_UserMarshal64(param0: *const u32, param1: *mut u8, param2: *const super::super::super::Foundation::HWND) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HWND_UserMarshal64(param0 : *const u32, param1 : *mut u8, param2 : *const super::super::super::Foundation:: HWND) -> *mut u8); - unsafe { HWND_UserMarshal64(param0, core::mem::transmute(param1), param2) } + unsafe { HWND_UserMarshal64(param0, param1 as _, param2) } } #[inline] pub unsafe fn HWND_UserSize(param0: *const u32, param1: u32, param2: *const super::super::super::Foundation::HWND) -> u32 { @@ -526,12 +526,12 @@ pub unsafe fn HWND_UserSize64(param0: *const u32, param1: u32, param2: *const su #[inline] pub unsafe fn HWND_UserUnmarshal(param0: *const u32, param1: *const u8, param2: *mut super::super::super::Foundation::HWND) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HWND_UserUnmarshal(param0 : *const u32, param1 : *const u8, param2 : *mut super::super::super::Foundation:: HWND) -> *mut u8); - unsafe { HWND_UserUnmarshal(param0, param1, core::mem::transmute(param2)) } + unsafe { HWND_UserUnmarshal(param0, param1, param2 as _) } } #[inline] pub unsafe fn HWND_UserUnmarshal64(param0: *const u32, param1: *const u8, param2: *mut super::super::super::Foundation::HWND) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HWND_UserUnmarshal64(param0 : *const u32, param1 : *const u8, param2 : *mut super::super::super::Foundation:: HWND) -> *mut u8); - unsafe { HWND_UserUnmarshal64(param0, param1, core::mem::transmute(param2)) } + unsafe { HWND_UserUnmarshal64(param0, param1, param2 as _) } } #[inline] pub unsafe fn LPSAFEARRAY_UserFree(param0: *const u32, param1: *const *const super::SAFEARRAY) { @@ -546,12 +546,12 @@ pub unsafe fn LPSAFEARRAY_UserFree64(param0: *const u32, param1: *const *const s #[inline] pub unsafe fn LPSAFEARRAY_UserMarshal(param0: *const u32, param1: *mut u8, param2: *const *const super::SAFEARRAY) -> *mut u8 { windows_targets::link!("oleaut32.dll" "system" fn LPSAFEARRAY_UserMarshal(param0 : *const u32, param1 : *mut u8, param2 : *const *const super:: SAFEARRAY) -> *mut u8); - unsafe { LPSAFEARRAY_UserMarshal(param0, core::mem::transmute(param1), param2) } + unsafe { LPSAFEARRAY_UserMarshal(param0, param1 as _, param2) } } #[inline] pub unsafe fn LPSAFEARRAY_UserMarshal64(param0: *const u32, param1: *mut u8, param2: *const *const super::SAFEARRAY) -> *mut u8 { windows_targets::link!("oleaut32.dll" "system" fn LPSAFEARRAY_UserMarshal64(param0 : *const u32, param1 : *mut u8, param2 : *const *const super:: SAFEARRAY) -> *mut u8); - unsafe { LPSAFEARRAY_UserMarshal64(param0, core::mem::transmute(param1), param2) } + unsafe { LPSAFEARRAY_UserMarshal64(param0, param1 as _, param2) } } #[inline] pub unsafe fn LPSAFEARRAY_UserSize(param0: *const u32, param1: u32, param2: *const *const super::SAFEARRAY) -> u32 { @@ -566,12 +566,12 @@ pub unsafe fn LPSAFEARRAY_UserSize64(param0: *const u32, param1: u32, param2: *c #[inline] pub unsafe fn LPSAFEARRAY_UserUnmarshal(param0: *const u32, param1: *const u8, param2: *mut *mut super::SAFEARRAY) -> *mut u8 { windows_targets::link!("oleaut32.dll" "system" fn LPSAFEARRAY_UserUnmarshal(param0 : *const u32, param1 : *const u8, param2 : *mut *mut super:: SAFEARRAY) -> *mut u8); - unsafe { LPSAFEARRAY_UserUnmarshal(param0, param1, core::mem::transmute(param2)) } + unsafe { LPSAFEARRAY_UserUnmarshal(param0, param1, param2 as _) } } #[inline] pub unsafe fn LPSAFEARRAY_UserUnmarshal64(param0: *const u32, param1: *const u8, param2: *mut *mut super::SAFEARRAY) -> *mut u8 { windows_targets::link!("oleaut32.dll" "system" fn LPSAFEARRAY_UserUnmarshal64(param0 : *const u32, param1 : *const u8, param2 : *mut *mut super:: SAFEARRAY) -> *mut u8); - unsafe { LPSAFEARRAY_UserUnmarshal64(param0, param1, core::mem::transmute(param2)) } + unsafe { LPSAFEARRAY_UserUnmarshal64(param0, param1, param2 as _) } } #[inline] pub unsafe fn SNB_UserFree(param0: *const u32, param1: *const *const *const u16) { @@ -586,12 +586,12 @@ pub unsafe fn SNB_UserFree64(param0: *const u32, param1: *const *const *const u1 #[inline] pub unsafe fn SNB_UserMarshal(param0: *const u32, param1: *mut u8, param2: *const *const *const u16) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn SNB_UserMarshal(param0 : *const u32, param1 : *mut u8, param2 : *const *const *const u16) -> *mut u8); - unsafe { SNB_UserMarshal(param0, core::mem::transmute(param1), param2) } + unsafe { SNB_UserMarshal(param0, param1 as _, param2) } } #[inline] pub unsafe fn SNB_UserMarshal64(param0: *const u32, param1: *mut u8, param2: *const *const *const u16) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn SNB_UserMarshal64(param0 : *const u32, param1 : *mut u8, param2 : *const *const *const u16) -> *mut u8); - unsafe { SNB_UserMarshal64(param0, core::mem::transmute(param1), param2) } + unsafe { SNB_UserMarshal64(param0, param1 as _, param2) } } #[inline] pub unsafe fn SNB_UserSize(param0: *const u32, param1: u32, param2: *const *const *const u16) -> u32 { @@ -606,12 +606,12 @@ pub unsafe fn SNB_UserSize64(param0: *const u32, param1: u32, param2: *const *co #[inline] pub unsafe fn SNB_UserUnmarshal(param0: *const u32, param1: *const u8, param2: *mut *mut *mut u16) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn SNB_UserUnmarshal(param0 : *const u32, param1 : *const u8, param2 : *mut *mut *mut u16) -> *mut u8); - unsafe { SNB_UserUnmarshal(param0, param1, core::mem::transmute(param2)) } + unsafe { SNB_UserUnmarshal(param0, param1, param2 as _) } } #[inline] pub unsafe fn SNB_UserUnmarshal64(param0: *const u32, param1: *const u8, param2: *mut *mut *mut u16) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn SNB_UserUnmarshal64(param0 : *const u32, param1 : *const u8, param2 : *mut *mut *mut u16) -> *mut u8); - unsafe { SNB_UserUnmarshal64(param0, param1, core::mem::transmute(param2)) } + unsafe { SNB_UserUnmarshal64(param0, param1, param2 as _) } } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com_StructuredStorage"))] #[inline] @@ -629,13 +629,13 @@ pub unsafe fn STGMEDIUM_UserFree64(param0: *const u32, param1: *const super::STG #[inline] pub unsafe fn STGMEDIUM_UserMarshal(param0: *const u32, param1: *mut u8, param2: *const super::STGMEDIUM) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn STGMEDIUM_UserMarshal(param0 : *const u32, param1 : *mut u8, param2 : *const super:: STGMEDIUM) -> *mut u8); - unsafe { STGMEDIUM_UserMarshal(param0, core::mem::transmute(param1), core::mem::transmute(param2)) } + unsafe { STGMEDIUM_UserMarshal(param0, param1 as _, core::mem::transmute(param2)) } } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com_StructuredStorage"))] #[inline] pub unsafe fn STGMEDIUM_UserMarshal64(param0: *const u32, param1: *mut u8, param2: *const super::STGMEDIUM) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn STGMEDIUM_UserMarshal64(param0 : *const u32, param1 : *mut u8, param2 : *const super:: STGMEDIUM) -> *mut u8); - unsafe { STGMEDIUM_UserMarshal64(param0, core::mem::transmute(param1), core::mem::transmute(param2)) } + unsafe { STGMEDIUM_UserMarshal64(param0, param1 as _, core::mem::transmute(param2)) } } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com_StructuredStorage"))] #[inline] @@ -667,26 +667,26 @@ 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 { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetUnmarshalClass)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(pv.unwrap_or(core::mem::zeroed())), dwdestcontext, core::mem::transmute(pvdestcontext.unwrap_or(core::mem::zeroed())), mshlflags, &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetUnmarshalClass)(windows_core::Interface::as_raw(self), riid, pv.unwrap_or(core::mem::zeroed()) as _, dwdestcontext, pvdestcontext.unwrap_or(core::mem::zeroed()) as _, 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 { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetMarshalSizeMax)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(pv.unwrap_or(core::mem::zeroed())), dwdestcontext, core::mem::transmute(pvdestcontext.unwrap_or(core::mem::zeroed())), mshlflags, &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetMarshalSizeMax)(windows_core::Interface::as_raw(self), riid, pv.unwrap_or(core::mem::zeroed()) as _, dwdestcontext, pvdestcontext.unwrap_or(core::mem::zeroed()) as _, 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, { - unsafe { (windows_core::Interface::vtable(self).MarshalInterface)(windows_core::Interface::as_raw(self), pstm.param().abi(), riid, core::mem::transmute(pv.unwrap_or(core::mem::zeroed())), dwdestcontext, core::mem::transmute(pvdestcontext.unwrap_or(core::mem::zeroed())), mshlflags).ok() } + unsafe { (windows_core::Interface::vtable(self).MarshalInterface)(windows_core::Interface::as_raw(self), pstm.param().abi(), riid, pv.unwrap_or(core::mem::zeroed()) as _, dwdestcontext, pvdestcontext.unwrap_or(core::mem::zeroed()) as _, 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 P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).UnmarshalInterface)(windows_core::Interface::as_raw(self), pstm.param().abi(), riid, core::mem::transmute(ppv)).ok() } + unsafe { (windows_core::Interface::vtable(self).UnmarshalInterface)(windows_core::Interface::as_raw(self), pstm.param().abi(), riid, ppv as _).ok() } } pub unsafe fn ReleaseMarshalData(&self, pstm: P0) -> 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 d1e156bb98..70b5588866 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); - unsafe { CoGetInstanceFromFile(core::mem::transmute(pserverinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pclsid.unwrap_or(core::mem::zeroed())), punkouter.param().abi(), dwclsctx, grfmode, pwszname.param().abi(), presults.len().try_into().unwrap(), core::mem::transmute(presults.as_ptr())).ok() } + unsafe { CoGetInstanceFromFile(pserverinfo.unwrap_or(core::mem::zeroed()) as _, pclsid.unwrap_or(core::mem::zeroed()) as _, punkouter.param().abi(), dwclsctx, grfmode, pwszname.param().abi(), presults.len().try_into().unwrap(), core::mem::transmute(presults.as_ptr())).ok() } } #[inline] pub unsafe fn CoGetInstanceFromIStorage(pserverinfo: Option<*const super::COSERVERINFO>, pclsid: Option<*const windows_core::GUID>, punkouter: 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); - unsafe { CoGetInstanceFromIStorage(core::mem::transmute(pserverinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pclsid.unwrap_or(core::mem::zeroed())), punkouter.param().abi(), dwclsctx, pstg.param().abi(), presults.len().try_into().unwrap(), core::mem::transmute(presults.as_ptr())).ok() } + unsafe { CoGetInstanceFromIStorage(pserverinfo.unwrap_or(core::mem::zeroed()) as _, pclsid.unwrap_or(core::mem::zeroed()) as _, punkouter.param().abi(), dwclsctx, pstg.param().abi(), presults.len().try_into().unwrap(), core::mem::transmute(presults.as_ptr())).ok() } } #[inline] pub unsafe fn CoGetInterfaceAndReleaseStream(pstm: P0) -> windows_core::Result @@ -37,7 +37,7 @@ pub unsafe fn CreateILockBytesOnHGlobal(hglobal: Option windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - CreateILockBytesOnHGlobal(core::mem::transmute(hglobal.unwrap_or(core::mem::zeroed())), fdeleteonrelease.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + CreateILockBytesOnHGlobal(hglobal.unwrap_or(core::mem::zeroed()) as _, fdeleteonrelease.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[inline] @@ -292,7 +292,7 @@ where P1: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn OleConvertOLESTREAMToIStorageEx(polestm : *const OLESTREAM, pstg : * mut core::ffi::c_void, pcfformat : *mut u16, plwwidth : *mut i32, plheight : *mut i32, pdwsize : *mut u32, pmedium : *mut super:: STGMEDIUM) -> windows_core::HRESULT); - unsafe { OleConvertOLESTREAMToIStorageEx(polestm, pstg.param().abi(), core::mem::transmute(pcfformat), core::mem::transmute(plwwidth), core::mem::transmute(plheight), core::mem::transmute(pdwsize), core::mem::transmute(pmedium)).ok() } + unsafe { OleConvertOLESTREAMToIStorageEx(polestm, pstg.param().abi(), pcfformat as _, plwwidth as _, plheight as _, pdwsize as _, core::mem::transmute(pmedium)).ok() } } #[inline] pub unsafe fn PropStgNameToFmtId(oszname: P0) -> windows_core::Result @@ -447,13 +447,13 @@ pub unsafe fn PropVariantToBoolean(propvarin: *const PROPVARIANT) -> windows_cor #[inline] pub unsafe fn PropVariantToBooleanVector(propvar: *const PROPVARIANT, prgf: &mut [super::super::super::Foundation::BOOL], pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn PropVariantToBooleanVector(propvar : *const PROPVARIANT, prgf : *mut super::super::super::Foundation:: BOOL, crgf : u32, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { PropVariantToBooleanVector(core::mem::transmute(propvar), core::mem::transmute(prgf.as_ptr()), prgf.len().try_into().unwrap(), core::mem::transmute(pcelem)).ok() } + unsafe { PropVariantToBooleanVector(core::mem::transmute(propvar), core::mem::transmute(prgf.as_ptr()), prgf.len().try_into().unwrap(), pcelem as _).ok() } } #[cfg(feature = "Win32_System_Variant")] #[inline] pub unsafe fn PropVariantToBooleanVectorAlloc(propvar: *const PROPVARIANT, pprgf: *mut *mut super::super::super::Foundation::BOOL, pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn PropVariantToBooleanVectorAlloc(propvar : *const PROPVARIANT, pprgf : *mut *mut super::super::super::Foundation:: BOOL, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { PropVariantToBooleanVectorAlloc(core::mem::transmute(propvar), core::mem::transmute(pprgf), core::mem::transmute(pcelem)).ok() } + unsafe { PropVariantToBooleanVectorAlloc(core::mem::transmute(propvar), pprgf as _, pcelem as _).ok() } } #[cfg(feature = "Win32_System_Variant")] #[inline] @@ -465,7 +465,7 @@ pub unsafe fn PropVariantToBooleanWithDefault(propvarin: *const PROPVARIANT, fde #[inline] pub unsafe fn PropVariantToBuffer(propvar: *const PROPVARIANT, pv: *mut core::ffi::c_void, cb: u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn PropVariantToBuffer(propvar : *const PROPVARIANT, pv : *mut core::ffi::c_void, cb : u32) -> windows_core::HRESULT); - unsafe { PropVariantToBuffer(core::mem::transmute(propvar), core::mem::transmute(pv), cb).ok() } + unsafe { PropVariantToBuffer(core::mem::transmute(propvar), pv as _, cb).ok() } } #[cfg(feature = "Win32_System_Variant")] #[inline] @@ -480,13 +480,13 @@ pub unsafe fn PropVariantToDouble(propvarin: *const PROPVARIANT) -> windows_core #[inline] pub unsafe fn PropVariantToDoubleVector(propvar: *const PROPVARIANT, prgn: &mut [f64], pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn PropVariantToDoubleVector(propvar : *const PROPVARIANT, prgn : *mut f64, crgn : u32, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { PropVariantToDoubleVector(core::mem::transmute(propvar), core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), core::mem::transmute(pcelem)).ok() } + unsafe { PropVariantToDoubleVector(core::mem::transmute(propvar), core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), pcelem as _).ok() } } #[cfg(feature = "Win32_System_Variant")] #[inline] pub unsafe fn PropVariantToDoubleVectorAlloc(propvar: *const PROPVARIANT, pprgn: *mut *mut f64, pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn PropVariantToDoubleVectorAlloc(propvar : *const PROPVARIANT, pprgn : *mut *mut f64, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { PropVariantToDoubleVectorAlloc(core::mem::transmute(propvar), core::mem::transmute(pprgn), core::mem::transmute(pcelem)).ok() } + unsafe { PropVariantToDoubleVectorAlloc(core::mem::transmute(propvar), pprgn as _, pcelem as _).ok() } } #[cfg(feature = "Win32_System_Variant")] #[inline] @@ -507,13 +507,13 @@ pub unsafe fn PropVariantToFileTime(propvar: *const PROPVARIANT, pstfout: super: #[inline] pub unsafe fn PropVariantToFileTimeVector(propvar: *const PROPVARIANT, prgft: &mut [super::super::super::Foundation::FILETIME], pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn PropVariantToFileTimeVector(propvar : *const PROPVARIANT, prgft : *mut super::super::super::Foundation:: FILETIME, crgft : u32, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { PropVariantToFileTimeVector(core::mem::transmute(propvar), core::mem::transmute(prgft.as_ptr()), prgft.len().try_into().unwrap(), core::mem::transmute(pcelem)).ok() } + unsafe { PropVariantToFileTimeVector(core::mem::transmute(propvar), core::mem::transmute(prgft.as_ptr()), prgft.len().try_into().unwrap(), pcelem as _).ok() } } #[cfg(feature = "Win32_System_Variant")] #[inline] pub unsafe fn PropVariantToFileTimeVectorAlloc(propvar: *const PROPVARIANT, pprgft: *mut *mut super::super::super::Foundation::FILETIME, pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn PropVariantToFileTimeVectorAlloc(propvar : *const PROPVARIANT, pprgft : *mut *mut super::super::super::Foundation:: FILETIME, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { PropVariantToFileTimeVectorAlloc(core::mem::transmute(propvar), core::mem::transmute(pprgft), core::mem::transmute(pcelem)).ok() } + unsafe { PropVariantToFileTimeVectorAlloc(core::mem::transmute(propvar), pprgft as _, pcelem as _).ok() } } #[cfg(feature = "Win32_System_Variant")] #[inline] @@ -537,13 +537,13 @@ pub unsafe fn PropVariantToInt16(propvarin: *const PROPVARIANT) -> windows_core: #[inline] pub unsafe fn PropVariantToInt16Vector(propvar: *const PROPVARIANT, prgn: &mut [i16], pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn PropVariantToInt16Vector(propvar : *const PROPVARIANT, prgn : *mut i16, crgn : u32, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { PropVariantToInt16Vector(core::mem::transmute(propvar), core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), core::mem::transmute(pcelem)).ok() } + unsafe { PropVariantToInt16Vector(core::mem::transmute(propvar), core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), pcelem as _).ok() } } #[cfg(feature = "Win32_System_Variant")] #[inline] pub unsafe fn PropVariantToInt16VectorAlloc(propvar: *const PROPVARIANT, pprgn: *mut *mut i16, pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn PropVariantToInt16VectorAlloc(propvar : *const PROPVARIANT, pprgn : *mut *mut i16, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { PropVariantToInt16VectorAlloc(core::mem::transmute(propvar), core::mem::transmute(pprgn), core::mem::transmute(pcelem)).ok() } + unsafe { PropVariantToInt16VectorAlloc(core::mem::transmute(propvar), pprgn as _, pcelem as _).ok() } } #[cfg(feature = "Win32_System_Variant")] #[inline] @@ -564,13 +564,13 @@ pub unsafe fn PropVariantToInt32(propvarin: *const PROPVARIANT) -> windows_core: #[inline] pub unsafe fn PropVariantToInt32Vector(propvar: *const PROPVARIANT, prgn: &mut [i32], pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn PropVariantToInt32Vector(propvar : *const PROPVARIANT, prgn : *mut i32, crgn : u32, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { PropVariantToInt32Vector(core::mem::transmute(propvar), core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), core::mem::transmute(pcelem)).ok() } + unsafe { PropVariantToInt32Vector(core::mem::transmute(propvar), core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), pcelem as _).ok() } } #[cfg(feature = "Win32_System_Variant")] #[inline] pub unsafe fn PropVariantToInt32VectorAlloc(propvar: *const PROPVARIANT, pprgn: *mut *mut i32, pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn PropVariantToInt32VectorAlloc(propvar : *const PROPVARIANT, pprgn : *mut *mut i32, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { PropVariantToInt32VectorAlloc(core::mem::transmute(propvar), core::mem::transmute(pprgn), core::mem::transmute(pcelem)).ok() } + unsafe { PropVariantToInt32VectorAlloc(core::mem::transmute(propvar), pprgn as _, pcelem as _).ok() } } #[cfg(feature = "Win32_System_Variant")] #[inline] @@ -591,13 +591,13 @@ pub unsafe fn PropVariantToInt64(propvarin: *const PROPVARIANT) -> windows_core: #[inline] pub unsafe fn PropVariantToInt64Vector(propvar: *const PROPVARIANT, prgn: &mut [i64], pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn PropVariantToInt64Vector(propvar : *const PROPVARIANT, prgn : *mut i64, crgn : u32, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { PropVariantToInt64Vector(core::mem::transmute(propvar), core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), core::mem::transmute(pcelem)).ok() } + unsafe { PropVariantToInt64Vector(core::mem::transmute(propvar), core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), pcelem as _).ok() } } #[cfg(feature = "Win32_System_Variant")] #[inline] pub unsafe fn PropVariantToInt64VectorAlloc(propvar: *const PROPVARIANT, pprgn: *mut *mut i64, pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn PropVariantToInt64VectorAlloc(propvar : *const PROPVARIANT, pprgn : *mut *mut i64, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { PropVariantToInt64VectorAlloc(core::mem::transmute(propvar), core::mem::transmute(pprgn), core::mem::transmute(pcelem)).ok() } + unsafe { PropVariantToInt64VectorAlloc(core::mem::transmute(propvar), pprgn as _, pcelem as _).ok() } } #[cfg(feature = "Win32_System_Variant")] #[inline] @@ -624,13 +624,13 @@ pub unsafe fn PropVariantToStringAlloc(propvar: *const PROPVARIANT) -> windows_c #[inline] pub unsafe fn PropVariantToStringVector(propvar: *const PROPVARIANT, prgsz: &mut [windows_core::PWSTR], pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn PropVariantToStringVector(propvar : *const PROPVARIANT, prgsz : *mut windows_core::PWSTR, crgsz : u32, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { PropVariantToStringVector(core::mem::transmute(propvar), core::mem::transmute(prgsz.as_ptr()), prgsz.len().try_into().unwrap(), core::mem::transmute(pcelem)).ok() } + unsafe { PropVariantToStringVector(core::mem::transmute(propvar), core::mem::transmute(prgsz.as_ptr()), prgsz.len().try_into().unwrap(), pcelem as _).ok() } } #[cfg(feature = "Win32_System_Variant")] #[inline] pub unsafe fn PropVariantToStringVectorAlloc(propvar: *const PROPVARIANT, pprgsz: *mut *mut windows_core::PWSTR, pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn PropVariantToStringVectorAlloc(propvar : *const PROPVARIANT, pprgsz : *mut *mut windows_core::PWSTR, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { PropVariantToStringVectorAlloc(core::mem::transmute(propvar), core::mem::transmute(pprgsz), core::mem::transmute(pcelem)).ok() } + unsafe { PropVariantToStringVectorAlloc(core::mem::transmute(propvar), pprgsz as _, pcelem as _).ok() } } #[cfg(feature = "Win32_System_Variant")] #[inline] @@ -654,13 +654,13 @@ pub unsafe fn PropVariantToUInt16(propvarin: *const PROPVARIANT) -> windows_core #[inline] pub unsafe fn PropVariantToUInt16Vector(propvar: *const PROPVARIANT, prgn: &mut [u16], pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn PropVariantToUInt16Vector(propvar : *const PROPVARIANT, prgn : *mut u16, crgn : u32, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { PropVariantToUInt16Vector(core::mem::transmute(propvar), core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), core::mem::transmute(pcelem)).ok() } + unsafe { PropVariantToUInt16Vector(core::mem::transmute(propvar), core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), pcelem as _).ok() } } #[cfg(feature = "Win32_System_Variant")] #[inline] pub unsafe fn PropVariantToUInt16VectorAlloc(propvar: *const PROPVARIANT, pprgn: *mut *mut u16, pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn PropVariantToUInt16VectorAlloc(propvar : *const PROPVARIANT, pprgn : *mut *mut u16, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { PropVariantToUInt16VectorAlloc(core::mem::transmute(propvar), core::mem::transmute(pprgn), core::mem::transmute(pcelem)).ok() } + unsafe { PropVariantToUInt16VectorAlloc(core::mem::transmute(propvar), pprgn as _, pcelem as _).ok() } } #[cfg(feature = "Win32_System_Variant")] #[inline] @@ -681,13 +681,13 @@ pub unsafe fn PropVariantToUInt32(propvarin: *const PROPVARIANT) -> windows_core #[inline] pub unsafe fn PropVariantToUInt32Vector(propvar: *const PROPVARIANT, prgn: &mut [u32], pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn PropVariantToUInt32Vector(propvar : *const PROPVARIANT, prgn : *mut u32, crgn : u32, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { PropVariantToUInt32Vector(core::mem::transmute(propvar), core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), core::mem::transmute(pcelem)).ok() } + unsafe { PropVariantToUInt32Vector(core::mem::transmute(propvar), core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), pcelem as _).ok() } } #[cfg(feature = "Win32_System_Variant")] #[inline] pub unsafe fn PropVariantToUInt32VectorAlloc(propvar: *const PROPVARIANT, pprgn: *mut *mut u32, pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn PropVariantToUInt32VectorAlloc(propvar : *const PROPVARIANT, pprgn : *mut *mut u32, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { PropVariantToUInt32VectorAlloc(core::mem::transmute(propvar), core::mem::transmute(pprgn), core::mem::transmute(pcelem)).ok() } + unsafe { PropVariantToUInt32VectorAlloc(core::mem::transmute(propvar), pprgn as _, pcelem as _).ok() } } #[cfg(feature = "Win32_System_Variant")] #[inline] @@ -708,13 +708,13 @@ pub unsafe fn PropVariantToUInt64(propvarin: *const PROPVARIANT) -> windows_core #[inline] pub unsafe fn PropVariantToUInt64Vector(propvar: *const PROPVARIANT, prgn: &mut [u64], pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn PropVariantToUInt64Vector(propvar : *const PROPVARIANT, prgn : *mut u64, crgn : u32, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { PropVariantToUInt64Vector(core::mem::transmute(propvar), core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), core::mem::transmute(pcelem)).ok() } + unsafe { PropVariantToUInt64Vector(core::mem::transmute(propvar), core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), pcelem as _).ok() } } #[cfg(feature = "Win32_System_Variant")] #[inline] pub unsafe fn PropVariantToUInt64VectorAlloc(propvar: *const PROPVARIANT, pprgn: *mut *mut u64, pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn PropVariantToUInt64VectorAlloc(propvar : *const PROPVARIANT, pprgn : *mut *mut u64, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { PropVariantToUInt64VectorAlloc(core::mem::transmute(propvar), core::mem::transmute(pprgn), core::mem::transmute(pcelem)).ok() } + unsafe { PropVariantToUInt64VectorAlloc(core::mem::transmute(propvar), pprgn as _, pcelem as _).ok() } } #[cfg(feature = "Win32_System_Variant")] #[inline] @@ -769,7 +769,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); - unsafe { ReadFmtUserTypeStg(pstg.param().abi(), core::mem::transmute(pcf), core::mem::transmute(lplpszusertype.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ReadFmtUserTypeStg(pstg.param().abi(), pcf as _, lplpszusertype.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetConvertStg(pstg: P0, fconvert: bool) -> windows_core::Result<()> @@ -792,7 +792,7 @@ where #[inline] pub unsafe fn StgConvertVariantToProperty(pvar: *const PROPVARIANT, codepage: u16, pprop: Option<*mut SERIALIZEDPROPERTYVALUE>, pcb: *mut u32, pid: u32, freserved: Option, pcindirect: Option<*mut u32>) -> *mut SERIALIZEDPROPERTYVALUE { windows_targets::link!("ole32.dll" "system" fn StgConvertVariantToProperty(pvar : *const PROPVARIANT, codepage : u16, pprop : *mut SERIALIZEDPROPERTYVALUE, pcb : *mut u32, pid : u32, freserved : bool, pcindirect : *mut u32) -> *mut SERIALIZEDPROPERTYVALUE); - unsafe { StgConvertVariantToProperty(core::mem::transmute(pvar), codepage, core::mem::transmute(pprop.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcb), pid, core::mem::transmute(freserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcindirect.unwrap_or(core::mem::zeroed()))) } + unsafe { StgConvertVariantToProperty(core::mem::transmute(pvar), codepage, pprop.unwrap_or(core::mem::zeroed()) as _, pcb as _, pid, freserved.unwrap_or(core::mem::zeroed()) as _, pcindirect.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn StgCreateDocfile(pwcsname: P0, grfmode: super::STGM, reserved: Option) -> windows_core::Result @@ -802,7 +802,7 @@ where 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); unsafe { let mut result__ = core::mem::zeroed(); - StgCreateDocfile(pwcsname.param().abi(), grfmode, core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + StgCreateDocfile(pwcsname.param().abi(), grfmode, reserved.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[inline] @@ -824,7 +824,7 @@ where 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); unsafe { let mut result__ = core::mem::zeroed(); - StgCreatePropSetStg(pstorage.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + StgCreatePropSetStg(pstorage.param().abi(), dwreserved.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[inline] @@ -835,7 +835,7 @@ where 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); unsafe { let mut result__ = core::mem::zeroed(); - StgCreatePropStg(punk.param().abi(), fmtid, pclsid, grfflags, core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + StgCreatePropStg(punk.param().abi(), fmtid, pclsid, grfflags, dwreserved.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_Security")] @@ -845,7 +845,7 @@ where P0: 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); - unsafe { StgCreateStorageEx(pwcsname.param().abi(), grfmode, stgfmt, grfattrs, core::mem::transmute(pstgoptions.unwrap_or(core::mem::zeroed())), core::mem::transmute(psecuritydescriptor.unwrap_or(core::mem::zeroed())), riid, core::mem::transmute(ppobjectopen)).ok() } + unsafe { StgCreateStorageEx(pwcsname.param().abi(), grfmode, stgfmt, grfattrs, pstgoptions.unwrap_or(core::mem::zeroed()) as _, psecuritydescriptor.unwrap_or(core::mem::zeroed()) as _, riid, ppobjectopen as _).ok() } } #[cfg(feature = "Win32_System_Variant")] #[inline] @@ -924,7 +924,7 @@ where 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); unsafe { let mut result__ = core::mem::zeroed(); - StgOpenPropStg(punk.param().abi(), fmtid, grfflags, core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + StgOpenPropStg(punk.param().abi(), fmtid, grfflags, dwreserved.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[inline] @@ -936,7 +936,7 @@ where windows_targets::link!("ole32.dll" "system" fn StgOpenStorage(pwcsname : windows_core::PCWSTR, pstgpriority : * mut core::ffi::c_void, grfmode : super:: STGM, snbexclude : *const *const u16, reserved : u32, ppstgopen : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - StgOpenStorage(pwcsname.param().abi(), pstgpriority.param().abi(), grfmode, core::mem::transmute(snbexclude.unwrap_or(core::mem::zeroed())), reserved, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + StgOpenStorage(pwcsname.param().abi(), pstgpriority.param().abi(), grfmode, snbexclude.unwrap_or(core::mem::zeroed()) as _, reserved, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_Security")] @@ -946,7 +946,7 @@ where P0: 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); - unsafe { StgOpenStorageEx(pwcsname.param().abi(), grfmode, stgfmt, grfattrs, core::mem::transmute(pstgoptions.unwrap_or(core::mem::zeroed())), core::mem::transmute(psecuritydescriptor.unwrap_or(core::mem::zeroed())), riid, core::mem::transmute(ppobjectopen)).ok() } + unsafe { StgOpenStorageEx(pwcsname.param().abi(), grfmode, stgfmt, grfattrs, pstgoptions.unwrap_or(core::mem::zeroed()) as _, psecuritydescriptor.unwrap_or(core::mem::zeroed()) as _, riid, ppobjectopen as _).ok() } } #[inline] pub unsafe fn StgOpenStorageOnILockBytes(plkbyt: P0, pstgpriority: P1, grfmode: super::STGM, snbexclude: Option<*const *const u16>, reserved: Option) -> windows_core::Result @@ -957,19 +957,19 @@ where windows_targets::link!("ole32.dll" "system" fn StgOpenStorageOnILockBytes(plkbyt : * mut core::ffi::c_void, pstgpriority : * mut core::ffi::c_void, grfmode : super:: STGM, snbexclude : *const *const u16, reserved : u32, ppstgopen : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - StgOpenStorageOnILockBytes(plkbyt.param().abi(), pstgpriority.param().abi(), 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__)) + StgOpenStorageOnILockBytes(plkbyt.param().abi(), pstgpriority.param().abi(), grfmode, snbexclude.unwrap_or(core::mem::zeroed()) as _, reserved.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[inline] 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); - unsafe { StgPropertyLengthAsVariant(pprop, cbprop, codepage, core::mem::transmute(breserved.unwrap_or(core::mem::zeroed()))) } + unsafe { StgPropertyLengthAsVariant(pprop, cbprop, codepage, breserved.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Variant")] #[inline] pub unsafe fn StgSerializePropVariant(ppropvar: *const PROPVARIANT, ppprop: *mut *mut SERIALIZEDPROPERTYVALUE, pcb: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn StgSerializePropVariant(ppropvar : *const PROPVARIANT, ppprop : *mut *mut SERIALIZEDPROPERTYVALUE, pcb : *mut u32) -> windows_core::HRESULT); - unsafe { StgSerializePropVariant(core::mem::transmute(ppropvar), core::mem::transmute(ppprop), core::mem::transmute(pcb)).ok() } + unsafe { StgSerializePropVariant(core::mem::transmute(ppropvar), ppprop as _, pcb as _).ok() } } #[inline] pub unsafe fn StgSetTimes(lpszname: P0, pctime: Option<*const super::super::super::Foundation::FILETIME>, patime: Option<*const super::super::super::Foundation::FILETIME>, pmtime: Option<*const super::super::super::Foundation::FILETIME>) -> windows_core::Result<()> @@ -977,7 +977,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); - unsafe { 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() } + unsafe { StgSetTimes(lpszname.param().abi(), pctime.unwrap_or(core::mem::zeroed()) as _, patime.unwrap_or(core::mem::zeroed()) as _, pmtime.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] #[inline] @@ -1355,7 +1355,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 { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt) } @@ -1434,7 +1434,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 { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt) } @@ -1518,7 +1518,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -1683,7 +1683,7 @@ windows_core::imp::define_interface!(ILayoutStorage, ILayoutStorage_Vtbl, 0x0e6d windows_core::imp::interface_hierarchy!(ILayoutStorage, windows_core::IUnknown); impl ILayoutStorage { pub unsafe fn LayoutScript(&self, pstoragelayout: &[super::StorageLayout], glfinterleavedflag: Option) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).LayoutScript)(windows_core::Interface::as_raw(self), core::mem::transmute(pstoragelayout.as_ptr()), pstoragelayout.len().try_into().unwrap(), glfinterleavedflag.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn BeginMonitor(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).BeginMonitor)(windows_core::Interface::as_raw(self)).ok() } @@ -1770,10 +1770,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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadAt)(windows_core::Interface::as_raw(self), uloffset, core::mem::transmute(pv), cb, core::mem::transmute(pcbread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadAt)(windows_core::Interface::as_raw(self), uloffset, pv as _, cb, pcbread.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn WriteAt(&self, uloffset: u64, pv: *const core::ffi::c_void, cb: u32, pcbwritten: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).WriteAt)(windows_core::Interface::as_raw(self), uloffset, pv, cb, core::mem::transmute(pcbwritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteAt)(windows_core::Interface::as_raw(self), uloffset, pv, cb, pcbwritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Flush(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Flush)(windows_core::Interface::as_raw(self)).ok() } @@ -1788,7 +1788,7 @@ impl ILockBytes { unsafe { (windows_core::Interface::vtable(self).UnlockRegion)(windows_core::Interface::as_raw(self), liboffset, cb, dwlocktype).ok() } } pub unsafe fn Stat(&self, pstatstg: *mut super::STATSTG, grfstatflag: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Stat)(windows_core::Interface::as_raw(self), core::mem::transmute(pstatstg), grfstatflag).ok() } + unsafe { (windows_core::Interface::vtable(self).Stat)(windows_core::Interface::as_raw(self), pstatstg as _, grfstatflag).ok() } } } #[repr(C)] @@ -1877,7 +1877,7 @@ impl IMemoryAllocator { unsafe { (windows_core::Interface::vtable(self).Allocate)(windows_core::Interface::as_raw(self), cbsize) } } pub unsafe fn Free(&self, pv: *mut core::ffi::c_void) { - unsafe { (windows_core::Interface::vtable(self).Free)(windows_core::Interface::as_raw(self), core::mem::transmute(pv)) } + unsafe { (windows_core::Interface::vtable(self).Free)(windows_core::Interface::as_raw(self), pv as _) } } } #[repr(C)] @@ -2097,7 +2097,7 @@ impl IPropertyBag2 { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), cproperties, ppropbag, perrlog.param().abi(), core::mem::transmute(pvarvalue), core::mem::transmute(phrerror)).ok() } + unsafe { (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), cproperties, ppropbag, perrlog.param().abi(), core::mem::transmute(pvarvalue), phrerror as _).ok() } } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn Write(&self, cproperties: u32, ppropbag: *const PROPBAG2, pvarvalue: *const super::super::Variant::VARIANT) -> windows_core::Result<()> { @@ -2111,7 +2111,7 @@ impl IPropertyBag2 { } #[cfg(feature = "Win32_System_Variant")] pub unsafe fn GetPropertyInfo(&self, iproperty: u32, ppropbag: &mut [PROPBAG2], pcproperties: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPropertyInfo)(windows_core::Interface::as_raw(self), iproperty, ppropbag.len().try_into().unwrap(), core::mem::transmute(ppropbag.as_ptr()), core::mem::transmute(pcproperties)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropertyInfo)(windows_core::Interface::as_raw(self), iproperty, ppropbag.len().try_into().unwrap(), core::mem::transmute(ppropbag.as_ptr()), pcproperties as _).ok() } } pub unsafe fn LoadObject(&self, pstrname: P0, dwhint: u32, punkobject: P2, perrlog: P3) -> windows_core::Result<()> where @@ -2313,7 +2313,7 @@ impl IPropertyStorage { unsafe { (windows_core::Interface::vtable(self).DeleteMultiple)(windows_core::Interface::as_raw(self), rgpspec.len().try_into().unwrap(), core::mem::transmute(rgpspec.as_ptr())).ok() } } pub unsafe fn ReadPropertyNames(&self, cpropid: u32, rgpropid: *const u32, rglpwstrname: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadPropertyNames)(windows_core::Interface::as_raw(self), cpropid, rgpropid, core::mem::transmute(rglpwstrname)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadPropertyNames)(windows_core::Interface::as_raw(self), cpropid, rgpropid, rglpwstrname as _).ok() } } pub unsafe fn WritePropertyNames(&self, cpropid: u32, rgpropid: *const u32, rglpwstrname: *const windows_core::PCWSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).WritePropertyNames)(windows_core::Interface::as_raw(self), cpropid, rgpropid, rglpwstrname).ok() } @@ -2340,7 +2340,7 @@ impl IPropertyStorage { unsafe { (windows_core::Interface::vtable(self).SetClass)(windows_core::Interface::as_raw(self), clsid).ok() } } pub unsafe fn Stat(&self, pstatpsstg: *mut STATPROPSETSTG) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Stat)(windows_core::Interface::as_raw(self), core::mem::transmute(pstatpsstg)).ok() } + unsafe { (windows_core::Interface::vtable(self).Stat)(windows_core::Interface::as_raw(self), pstatpsstg as _).ok() } } } #[repr(C)] @@ -2534,7 +2534,7 @@ impl IStorage { { unsafe { 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::mem::zeroed())), grfmode, reserved2, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).OpenStream)(windows_core::Interface::as_raw(self), pwcsname.param().abi(), reserved1.unwrap_or(core::mem::zeroed()) as _, grfmode, reserved2, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn CreateStorage(&self, pwcsname: P0, grfmode: super::STGM, reserved1: u32, reserved2: u32) -> windows_core::Result @@ -2560,7 +2560,7 @@ impl IStorage { where P3: windows_core::Param, { - unsafe { (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() } + unsafe { (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())), snbexclude.unwrap_or(core::mem::zeroed()) as _, pstgdest.param().abi()).ok() } } pub unsafe fn MoveElementTo(&self, pwcsname: P0, pstgdest: P1, pwcsnewname: P2, grfflags: STGMOVE) -> windows_core::Result<()> where @@ -2579,7 +2579,7 @@ impl IStorage { pub unsafe fn EnumElements(&self, reserved1: Option, reserved2: Option<*const core::ffi::c_void>, reserved3: Option) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (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__)) + (windows_core::Interface::vtable(self).EnumElements)(windows_core::Interface::as_raw(self), reserved1.unwrap_or(core::mem::zeroed()) as _, reserved2.unwrap_or(core::mem::zeroed()) as _, reserved3.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn DestroyElement(&self, pwcsname: P0) -> windows_core::Result<()> @@ -2608,7 +2608,7 @@ impl IStorage { unsafe { (windows_core::Interface::vtable(self).SetStateBits)(windows_core::Interface::as_raw(self), grfstatebits, grfmask).ok() } } pub unsafe fn Stat(&self, pstatstg: *mut super::STATSTG, grfstatflag: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Stat)(windows_core::Interface::as_raw(self), core::mem::transmute(pstatstg), grfstatflag).ok() } + unsafe { (windows_core::Interface::vtable(self).Stat)(windows_core::Interface::as_raw(self), pstatstg as _, grfstatflag).ok() } } } #[repr(C)] 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 5cf344d9d5..23d144fa94 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 @@ -43,7 +43,7 @@ impl IThumbnailExtractor { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ExtractThumbnail)(windows_core::Interface::as_raw(self), pstg.param().abi(), ullength, ulheight, core::mem::transmute(puloutputlength), core::mem::transmute(puloutputheight), core::mem::transmute(phoutputbitmap)).ok() } + unsafe { (windows_core::Interface::vtable(self).ExtractThumbnail)(windows_core::Interface::as_raw(self), pstg.param().abi(), ullength, ulheight, puloutputlength as _, puloutputheight as _, phoutputbitmap as _).ok() } } #[cfg(feature = "Win32_System_Com_StructuredStorage")] pub unsafe fn OnFileUpdated(&self, pstg: P0) -> windows_core::Result<()> 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 029b968151..cb9a293f37 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Com/Urlmon/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Com/Urlmon/mod.rs @@ -6,7 +6,7 @@ where 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); - unsafe { CoGetClassObjectFromURL(rclassid, szcode.param().abi(), dwfileversionms, dwfileversionls, sztype.param().abi(), pbindctx.param().abi(), dwclscontext, core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), riid, core::mem::transmute(ppv)).ok() } + unsafe { CoGetClassObjectFromURL(rclassid, szcode.param().abi(), dwfileversionms, dwfileversionls, sztype.param().abi(), pbindctx.param().abi(), dwclscontext, pvreserved.unwrap_or(core::mem::zeroed()) as _, riid, ppv as _).ok() } } #[inline] pub unsafe fn CoInternetCombineIUri(pbaseuri: P0, prelativeuri: P1, dwcombineflags: u32, ppcombineduri: *mut Option, dwreserved: Option) -> windows_core::Result<()> @@ -15,7 +15,7 @@ where 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); - unsafe { CoInternetCombineIUri(pbaseuri.param().abi(), prelativeuri.param().abi(), dwcombineflags, core::mem::transmute(ppcombineduri), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CoInternetCombineIUri(pbaseuri.param().abi(), prelativeuri.param().abi(), dwcombineflags, core::mem::transmute(ppcombineduri), dwreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CoInternetCombineUrl(pwzbaseurl: P0, pwzrelativeurl: P1, dwcombineflags: u32, pszresult: &mut [u16], pcchresult: Option<*mut u32>, dwreserved: Option) -> windows_core::Result<()> @@ -24,7 +24,7 @@ where P1: windows_core::Param, { windows_targets::link!("urlmon.dll" "system" fn CoInternetCombineUrl(pwzbaseurl : windows_core::PCWSTR, pwzrelativeurl : windows_core::PCWSTR, dwcombineflags : u32, pszresult : windows_core::PWSTR, cchresult : u32, pcchresult : *mut u32, dwreserved : u32) -> windows_core::HRESULT); - unsafe { CoInternetCombineUrl(pwzbaseurl.param().abi(), pwzrelativeurl.param().abi(), dwcombineflags, core::mem::transmute(pszresult.as_ptr()), pszresult.len().try_into().unwrap(), core::mem::transmute(pcchresult.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CoInternetCombineUrl(pwzbaseurl.param().abi(), pwzrelativeurl.param().abi(), dwcombineflags, core::mem::transmute(pszresult.as_ptr()), pszresult.len().try_into().unwrap(), pcchresult.unwrap_or(core::mem::zeroed()) as _, dwreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CoInternetCombineUrlEx(pbaseuri: P0, pwzrelativeurl: P1, dwcombineflags: u32, ppcombineduri: *mut Option, dwreserved: Option) -> windows_core::Result<()> @@ -33,7 +33,7 @@ where 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); - unsafe { CoInternetCombineUrlEx(pbaseuri.param().abi(), pwzrelativeurl.param().abi(), dwcombineflags, core::mem::transmute(ppcombineduri), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CoInternetCombineUrlEx(pbaseuri.param().abi(), pwzrelativeurl.param().abi(), dwcombineflags, core::mem::transmute(ppcombineduri), dwreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CoInternetCompareUrl(pwzurl1: P0, pwzurl2: P1, dwflags: u32) -> windows_core::Result<()> @@ -66,7 +66,7 @@ where P0: windows_core::Param, { windows_targets::link!("urlmon.dll" "system" fn CoInternetGetProtocolFlags(pwzurl : windows_core::PCWSTR, pdwflags : *mut u32, dwreserved : u32) -> windows_core::HRESULT); - unsafe { CoInternetGetProtocolFlags(pwzurl.param().abi(), core::mem::transmute(pdwflags), dwreserved).ok() } + unsafe { CoInternetGetProtocolFlags(pwzurl.param().abi(), pdwflags as _, dwreserved).ok() } } #[inline] pub unsafe fn CoInternetGetSecurityUrl(pwszurl: P0, ppwszsecurl: *mut windows_core::PWSTR, psuaction: PSUACTION, dwreserved: Option) -> windows_core::Result<()> @@ -74,7 +74,7 @@ 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); - unsafe { CoInternetGetSecurityUrl(pwszurl.param().abi(), core::mem::transmute(ppwszsecurl), psuaction, core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CoInternetGetSecurityUrl(pwszurl.param().abi(), ppwszsecurl as _, psuaction, dwreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CoInternetGetSecurityUrlEx(puri: P0, ppsecuri: *mut Option, psuaction: PSUACTION, dwreserved: Option) -> windows_core::Result<()> @@ -82,7 +82,7 @@ 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); - unsafe { CoInternetGetSecurityUrlEx(puri.param().abi(), core::mem::transmute(ppsecuri), psuaction, core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CoInternetGetSecurityUrlEx(puri.param().abi(), core::mem::transmute(ppsecuri), psuaction, dwreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CoInternetGetSession(dwsessionmode: u32, ppiinternetsession: *mut Option, dwreserved: u32) -> windows_core::Result<()> { @@ -128,7 +128,7 @@ 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); - unsafe { CoInternetParseIUri(piuri.param().abi(), parseaction, 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() } + unsafe { CoInternetParseIUri(piuri.param().abi(), parseaction, dwflags, core::mem::transmute(pwzresult.as_ptr()), pwzresult.len().try_into().unwrap(), pcchresult as _, dwreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CoInternetParseUrl(pwzurl: P0, parseaction: PARSEACTION, dwflags: u32, pszresult: &mut [u16], pcchresult: *mut u32, dwreserved: u32) -> windows_core::Result<()> @@ -136,7 +136,7 @@ where P0: windows_core::Param, { windows_targets::link!("urlmon.dll" "system" fn CoInternetParseUrl(pwzurl : windows_core::PCWSTR, parseaction : PARSEACTION, dwflags : u32, pszresult : windows_core::PWSTR, cchresult : u32, pcchresult : *mut u32, dwreserved : u32) -> windows_core::HRESULT); - unsafe { CoInternetParseUrl(pwzurl.param().abi(), parseaction, dwflags, core::mem::transmute(pszresult.as_ptr()), pszresult.len().try_into().unwrap(), core::mem::transmute(pcchresult), dwreserved).ok() } + unsafe { CoInternetParseUrl(pwzurl.param().abi(), parseaction, dwflags, core::mem::transmute(pszresult.as_ptr()), pszresult.len().try_into().unwrap(), pcchresult as _, dwreserved).ok() } } #[inline] pub unsafe fn CoInternetQueryInfo(pwzurl: P0, queryoptions: QUERYOPTION, dwqueryflags: u32, pvbuffer: *mut core::ffi::c_void, cbbuffer: u32, pcbbuffer: Option<*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); - unsafe { CoInternetQueryInfo(pwzurl.param().abi(), queryoptions, dwqueryflags, core::mem::transmute(pvbuffer), cbbuffer, core::mem::transmute(pcbbuffer.unwrap_or(core::mem::zeroed())), dwreserved).ok() } + unsafe { CoInternetQueryInfo(pwzurl.param().abi(), queryoptions, dwqueryflags, pvbuffer as _, cbbuffer, pcbbuffer.unwrap_or(core::mem::zeroed()) as _, dwreserved).ok() } } #[inline] pub unsafe fn CoInternetSetFeatureEnabled(featureentry: INTERNETFEATURELIST, dwflags: u32, fenable: bool) -> windows_core::Result<()> { @@ -159,7 +159,7 @@ pub unsafe fn CompareSecurityIds(pbsecurityid1: &[u8], pbsecurityid2: &[u8], dwr #[inline] pub unsafe fn CompatFlagsFromClsid(pclsid: *const windows_core::GUID, pdwcompatflags: *mut u32, pdwmiscstatusflags: *mut u32) -> windows_core::Result<()> { windows_targets::link!("urlmon.dll" "system" fn CompatFlagsFromClsid(pclsid : *const windows_core::GUID, pdwcompatflags : *mut u32, pdwmiscstatusflags : *mut u32) -> windows_core::HRESULT); - unsafe { CompatFlagsFromClsid(pclsid, core::mem::transmute(pdwcompatflags), core::mem::transmute(pdwmiscstatusflags)).ok() } + unsafe { CompatFlagsFromClsid(pclsid, pdwcompatflags as _, pdwmiscstatusflags as _).ok() } } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Security", feature = "Win32_System_Com_StructuredStorage"))] #[inline] @@ -239,7 +239,7 @@ where #[inline] 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); - unsafe { FaultInIEFeature(hwnd, pclassspec, core::mem::transmute(pquery.unwrap_or(core::mem::zeroed())), dwflags).ok() } + unsafe { FaultInIEFeature(hwnd, pclassspec, pquery.unwrap_or(core::mem::zeroed()) as _, dwflags).ok() } } #[inline] pub unsafe fn FindMediaType(rgsztypes: P0) -> windows_core::Result @@ -259,7 +259,7 @@ where P1: windows_core::Param, { windows_targets::link!("urlmon.dll" "system" fn FindMediaTypeClass(pbc : * mut core::ffi::c_void, sztype : windows_core::PCSTR, pclsid : *mut windows_core::GUID, reserved : u32) -> windows_core::HRESULT); - unsafe { FindMediaTypeClass(pbc.param().abi(), sztype.param().abi(), core::mem::transmute(pclsid), reserved).ok() } + unsafe { FindMediaTypeClass(pbc.param().abi(), sztype.param().abi(), pclsid as _, 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: Option) -> windows_core::Result<()> @@ -269,7 +269,7 @@ where 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); - unsafe { FindMimeFromData(pbc.param().abi(), pwzurl.param().abi(), core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), cbsize, pwzmimeproposed.param().abi(), dwmimeflags, core::mem::transmute(ppwzmimeout), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { FindMimeFromData(pbc.param().abi(), pwzurl.param().abi(), pbuffer.unwrap_or(core::mem::zeroed()) as _, cbsize, pwzmimeproposed.param().abi(), dwmimeflags, ppwzmimeout as _, dwreserved.unwrap_or(core::mem::zeroed()) as _).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 @@ -281,7 +281,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); unsafe { let mut result__ = core::mem::zeroed(); - GetClassFileOrMime(pbc.param().abi(), szfilename.param().abi(), core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), cbsize, szmime.param().abi(), dwreserved, &mut result__).map(|| core::mem::transmute(result__)) + GetClassFileOrMime(pbc.param().abi(), szfilename.param().abi(), pbuffer.unwrap_or(core::mem::zeroed()) as _, cbsize, szmime.param().abi(), dwreserved, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -309,7 +309,7 @@ where P0: windows_core::Param, { windows_targets::link!("urlmon.dll" "system" fn GetSoftwareUpdateInfo(szdistunit : windows_core::PCWSTR, psdi : *mut SOFTDISTINFO) -> windows_core::HRESULT); - unsafe { GetSoftwareUpdateInfo(szdistunit.param().abi(), core::mem::transmute(psdi)).ok() } + unsafe { GetSoftwareUpdateInfo(szdistunit.param().abi(), psdi as _).ok() } } #[inline] pub unsafe fn HlinkGoBack(punk: P0) -> windows_core::Result<()> @@ -424,12 +424,12 @@ where P1: windows_core::Param, { windows_targets::link!("urlmon.dll" "system" fn MkParseDisplayNameEx(pbc : * mut core::ffi::c_void, szdisplayname : windows_core::PCWSTR, pcheaten : *mut u32, ppmk : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { MkParseDisplayNameEx(pbc.param().abi(), szdisplayname.param().abi(), core::mem::transmute(pcheaten), core::mem::transmute(ppmk)).ok() } + unsafe { MkParseDisplayNameEx(pbc.param().abi(), szdisplayname.param().abi(), pcheaten as _, core::mem::transmute(ppmk)).ok() } } #[inline] pub unsafe fn ObtainUserAgentString(dwoption: u32, pszuaout: windows_core::PSTR, cbsize: *mut u32) -> windows_core::Result<()> { windows_targets::link!("urlmon.dll" "system" fn ObtainUserAgentString(dwoption : u32, pszuaout : windows_core::PSTR, cbsize : *mut u32) -> windows_core::HRESULT); - unsafe { ObtainUserAgentString(dwoption, core::mem::transmute(pszuaout), core::mem::transmute(cbsize)).ok() } + unsafe { ObtainUserAgentString(dwoption, core::mem::transmute(pszuaout), cbsize as _).ok() } } #[inline] pub unsafe fn RegisterBindStatusCallback(pbc: P0, pbscb: P1, ppbscbprev: *mut Option, dwreserved: u32) -> windows_core::Result<()> @@ -460,7 +460,7 @@ where #[inline] pub unsafe fn RegisterMediaTypes(ctypes: u32, rgsztypes: *const windows_core::PCSTR, rgcftypes: *mut u16) -> windows_core::Result<()> { windows_targets::link!("urlmon.dll" "system" fn RegisterMediaTypes(ctypes : u32, rgsztypes : *const windows_core::PCSTR, rgcftypes : *mut u16) -> windows_core::HRESULT); - unsafe { RegisterMediaTypes(ctypes, rgsztypes, core::mem::transmute(rgcftypes)).ok() } + unsafe { RegisterMediaTypes(ctypes, rgsztypes, rgcftypes as _).ok() } } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Security", feature = "Win32_System_Com_StructuredStorage"))] #[inline] @@ -604,12 +604,12 @@ where #[inline] 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); - unsafe { UrlMkGetSessionOption(dwoption, core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), dwbufferlength, core::mem::transmute(pdwbufferlengthout), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { UrlMkGetSessionOption(dwoption, pbuffer.unwrap_or(core::mem::zeroed()) as _, dwbufferlength, pdwbufferlengthout as _, dwreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { UrlMkSetSessionOption(dwoption, core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), dwbufferlength, core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { UrlMkSetSessionOption(dwoption, pbuffer.unwrap_or(core::mem::zeroed()) as _, dwbufferlength, dwreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WriteHitLogging(lplogginginfo: *const HIT_LOGGING_INFO) -> super::super::super::Foundation::BOOL { @@ -1098,7 +1098,7 @@ impl ICatalogFileInfo { } } pub unsafe fn GetJavaTrust(&self, ppjavatrust: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetJavaTrust)(windows_core::Interface::as_raw(self), core::mem::transmute(ppjavatrust)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetJavaTrust)(windows_core::Interface::as_raw(self), ppjavatrust as _).ok() } } } #[repr(C)] @@ -1186,10 +1186,10 @@ windows_core::imp::define_interface!(IDataFilter, IDataFilter_Vtbl, 0x69d14c80_c windows_core::imp::interface_hierarchy!(IDataFilter, windows_core::IUnknown); impl IDataFilter { pub unsafe fn DoEncode(&self, dwflags: u32, pbinbuffer: &[u8], pboutbuffer: &mut [u8], linbytesavailable: i32, plinbytesread: *mut i32, ploutbyteswritten: *mut i32, dwreserved: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DoEncode)(windows_core::Interface::as_raw(self), dwflags, pbinbuffer.len().try_into().unwrap(), core::mem::transmute(pbinbuffer.as_ptr()), pboutbuffer.len().try_into().unwrap(), core::mem::transmute(pboutbuffer.as_ptr()), linbytesavailable, core::mem::transmute(plinbytesread), core::mem::transmute(ploutbyteswritten), dwreserved).ok() } + unsafe { (windows_core::Interface::vtable(self).DoEncode)(windows_core::Interface::as_raw(self), dwflags, pbinbuffer.len().try_into().unwrap(), core::mem::transmute(pbinbuffer.as_ptr()), pboutbuffer.len().try_into().unwrap(), core::mem::transmute(pboutbuffer.as_ptr()), linbytesavailable, plinbytesread as _, ploutbyteswritten as _, dwreserved).ok() } } pub unsafe fn DoDecode(&self, dwflags: u32, pbinbuffer: &[u8], pboutbuffer: &mut [u8], linbytesavailable: i32, plinbytesread: *mut i32, ploutbyteswritten: *mut i32, dwreserved: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DoDecode)(windows_core::Interface::as_raw(self), dwflags, pbinbuffer.len().try_into().unwrap(), core::mem::transmute(pbinbuffer.as_ptr()), pboutbuffer.len().try_into().unwrap(), core::mem::transmute(pboutbuffer.as_ptr()), linbytesavailable, core::mem::transmute(plinbytesread), core::mem::transmute(ploutbyteswritten), dwreserved).ok() } + unsafe { (windows_core::Interface::vtable(self).DoDecode)(windows_core::Interface::as_raw(self), dwflags, pbinbuffer.len().try_into().unwrap(), core::mem::transmute(pbinbuffer.as_ptr()), pboutbuffer.len().try_into().unwrap(), core::mem::transmute(pboutbuffer.as_ptr()), linbytesavailable, plinbytesread as _, ploutbyteswritten as _, dwreserved).ok() } } pub unsafe fn SetEncodingLevel(&self, dwenclevel: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetEncodingLevel)(windows_core::Interface::as_raw(self), dwenclevel).ok() } @@ -1441,7 +1441,7 @@ impl core::ops::Deref for IHttpNegotiate2 { windows_core::imp::interface_hierarchy!(IHttpNegotiate2, windows_core::IUnknown, IHttpNegotiate); impl IHttpNegotiate2 { pub unsafe fn GetRootSecurityId(&self, pbsecurityid: *mut u8, pcbsecurityid: *mut u32, dwreserved: usize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRootSecurityId)(windows_core::Interface::as_raw(self), core::mem::transmute(pbsecurityid), core::mem::transmute(pcbsecurityid), dwreserved).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRootSecurityId)(windows_core::Interface::as_raw(self), pbsecurityid as _, pcbsecurityid as _, dwreserved).ok() } } } #[repr(C)] @@ -1477,7 +1477,7 @@ impl core::ops::Deref for IHttpNegotiate3 { windows_core::imp::interface_hierarchy!(IHttpNegotiate3, windows_core::IUnknown, IHttpNegotiate, IHttpNegotiate2); impl IHttpNegotiate3 { pub unsafe fn GetSerializedClientCertContext(&self, ppbcert: *mut *mut u8, pcbcert: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSerializedClientCertContext)(windows_core::Interface::as_raw(self), core::mem::transmute(ppbcert), core::mem::transmute(pcbcert)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSerializedClientCertContext)(windows_core::Interface::as_raw(self), ppbcert as _, pcbcert as _).ok() } } } #[repr(C)] @@ -1560,10 +1560,10 @@ windows_core::imp::interface_hierarchy!(IInternetBindInfo, windows_core::IUnknow impl IInternetBindInfo { #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Security", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe fn GetBindInfo(&self, grfbindf: *mut u32, pbindinfo: *mut super::BINDINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBindInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(grfbindf), core::mem::transmute(pbindinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBindInfo)(windows_core::Interface::as_raw(self), grfbindf as _, core::mem::transmute(pbindinfo)).ok() } } pub unsafe fn GetBindString(&self, ulstringtype: u32, ppwzstr: *mut windows_core::PWSTR, cel: u32, pcelfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBindString)(windows_core::Interface::as_raw(self), ulstringtype, core::mem::transmute(ppwzstr), cel, core::mem::transmute(pcelfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBindString)(windows_core::Interface::as_raw(self), ulstringtype, ppwzstr as _, cel, pcelfetched as _).ok() } } } #[repr(C)] @@ -1618,7 +1618,7 @@ windows_core::imp::interface_hierarchy!(IInternetBindInfoEx, windows_core::IUnkn impl IInternetBindInfoEx { #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Security", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe fn GetBindInfoEx(&self, grfbindf: *mut u32, pbindinfo: *mut super::BINDINFO, grfbindf2: *mut u32, pdwreserved: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBindInfoEx)(windows_core::Interface::as_raw(self), core::mem::transmute(grfbindf), core::mem::transmute(pbindinfo), core::mem::transmute(grfbindf2), core::mem::transmute(pdwreserved)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBindInfoEx)(windows_core::Interface::as_raw(self), grfbindf as _, core::mem::transmute(pbindinfo), grfbindf2 as _, pdwreserved as _).ok() } } } #[repr(C)] @@ -1654,13 +1654,13 @@ windows_core::imp::define_interface!(IInternetHostSecurityManager, IInternetHost windows_core::imp::interface_hierarchy!(IInternetHostSecurityManager, windows_core::IUnknown); impl IInternetHostSecurityManager { pub unsafe fn GetSecurityId(&self, pbsecurityid: *mut u8, pcbsecurityid: *mut u32, dwreserved: usize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSecurityId)(windows_core::Interface::as_raw(self), core::mem::transmute(pbsecurityid), core::mem::transmute(pcbsecurityid), dwreserved).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSecurityId)(windows_core::Interface::as_raw(self), pbsecurityid as _, pcbsecurityid as _, dwreserved).ok() } } pub unsafe fn ProcessUrlAction(&self, dwaction: u32, ppolicy: &mut [u8], pcontext: Option<&[u8]>, dwflags: u32, dwreserved: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ProcessUrlAction)(windows_core::Interface::as_raw(self), dwaction, core::mem::transmute(ppolicy.as_ptr()), ppolicy.len().try_into().unwrap(), core::mem::transmute(pcontext.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcontext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dwflags, dwreserved).ok() } } pub unsafe fn QueryCustomPolicy(&self, guidkey: *const windows_core::GUID, pppolicy: *mut *mut u8, pcbpolicy: *mut u32, pcontext: &[u8], dwreserved: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryCustomPolicy)(windows_core::Interface::as_raw(self), guidkey, core::mem::transmute(pppolicy), core::mem::transmute(pcbpolicy), core::mem::transmute(pcontext.as_ptr()), pcontext.len().try_into().unwrap(), dwreserved).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryCustomPolicy)(windows_core::Interface::as_raw(self), guidkey, pppolicy as _, pcbpolicy as _, core::mem::transmute(pcontext.as_ptr()), pcontext.len().try_into().unwrap(), dwreserved).ok() } } } #[repr(C)] @@ -1771,7 +1771,7 @@ impl core::ops::Deref for IInternetProtocol { windows_core::imp::interface_hierarchy!(IInternetProtocol, windows_core::IUnknown, IInternetProtocolRoot); impl IInternetProtocol { pub unsafe fn Read(&self, pv: &mut [u8], pcbread: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), core::mem::transmute(pv.as_ptr()), pv.len().try_into().unwrap(), core::mem::transmute(pcbread)).ok() } + unsafe { (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), core::mem::transmute(pv.as_ptr()), pv.len().try_into().unwrap(), pcbread as _).ok() } } pub unsafe fn Seek(&self, dlibmove: i64, dworigin: u32) -> windows_core::Result { unsafe { @@ -1893,7 +1893,7 @@ impl IInternetProtocolInfo { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ParseUrl)(windows_core::Interface::as_raw(self), pwzurl.param().abi(), parseaction, dwparseflags, core::mem::transmute(pwzresult), cchresult, core::mem::transmute(pcchresult), dwreserved).ok() } + unsafe { (windows_core::Interface::vtable(self).ParseUrl)(windows_core::Interface::as_raw(self), pwzurl.param().abi(), parseaction, dwparseflags, core::mem::transmute(pwzresult), cchresult, pcchresult as _, dwreserved).ok() } } pub unsafe fn CombineUrl(&self, pwzbaseurl: P0, pwzrelativeurl: P1, dwcombineflags: u32, pwzresult: P3, cchresult: u32, pcchresult: *mut u32, dwreserved: u32) -> windows_core::Result<()> where @@ -1901,7 +1901,7 @@ impl IInternetProtocolInfo { P1: windows_core::Param, P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CombineUrl)(windows_core::Interface::as_raw(self), pwzbaseurl.param().abi(), pwzrelativeurl.param().abi(), dwcombineflags, pwzresult.param().abi(), cchresult, core::mem::transmute(pcchresult), dwreserved).ok() } + unsafe { (windows_core::Interface::vtable(self).CombineUrl)(windows_core::Interface::as_raw(self), pwzbaseurl.param().abi(), pwzrelativeurl.param().abi(), dwcombineflags, pwzresult.param().abi(), cchresult, pcchresult as _, dwreserved).ok() } } pub unsafe fn CompareUrl(&self, pwzurl1: P0, pwzurl2: P1, dwcompareflags: u32) -> windows_core::Result<()> where @@ -1914,7 +1914,7 @@ impl IInternetProtocolInfo { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).QueryInfo)(windows_core::Interface::as_raw(self), pwzurl.param().abi(), oueryoption, dwqueryflags, core::mem::transmute(pbuffer), cbbuffer, core::mem::transmute(pcbbuf), dwreserved).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryInfo)(windows_core::Interface::as_raw(self), pwzurl.param().abi(), oueryoption, dwqueryflags, pbuffer as _, cbbuffer, pcbbuf as _, dwreserved).ok() } } } #[repr(C)] @@ -2222,13 +2222,13 @@ impl IInternetSecurityManager { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).MapUrlToZone)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), core::mem::transmute(pdwzone), dwflags).ok() } + unsafe { (windows_core::Interface::vtable(self).MapUrlToZone)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), pdwzone as _, dwflags).ok() } } pub unsafe fn GetSecurityId(&self, pwszurl: P0, pbsecurityid: &mut [u8; 512], pcbsecurityid: *mut u32, dwreserved: usize) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetSecurityId)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), core::mem::transmute(pbsecurityid.as_ptr()), core::mem::transmute(pcbsecurityid), dwreserved).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSecurityId)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), core::mem::transmute(pbsecurityid.as_ptr()), pcbsecurityid as _, dwreserved).ok() } } pub unsafe fn ProcessUrlAction(&self, pwszurl: P0, dwaction: u32, ppolicy: &mut [u8], pcontext: *const u8, cbcontext: u32, dwflags: u32, dwreserved: u32) -> windows_core::Result<()> where @@ -2240,7 +2240,7 @@ impl IInternetSecurityManager { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).QueryCustomPolicy)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), guidkey, core::mem::transmute(pppolicy), core::mem::transmute(pcbpolicy), pcontext, cbcontext, dwreserved).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryCustomPolicy)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), guidkey, pppolicy as _, pcbpolicy as _, pcontext, cbcontext, dwreserved).ok() } } pub unsafe fn SetZoneMapping(&self, dwzone: u32, lpszpattern: P1, dwflags: u32) -> windows_core::Result<()> where @@ -2360,7 +2360,7 @@ impl IInternetSecurityManagerEx { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ProcessUrlActionEx)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), dwaction, core::mem::transmute(ppolicy.as_ptr()), ppolicy.len().try_into().unwrap(), pcontext, cbcontext, dwflags, dwreserved, core::mem::transmute(pdwoutflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).ProcessUrlActionEx)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), dwaction, core::mem::transmute(ppolicy.as_ptr()), ppolicy.len().try_into().unwrap(), pcontext, cbcontext, dwflags, dwreserved, pdwoutflags as _).ok() } } } #[repr(C)] @@ -2399,25 +2399,25 @@ impl IInternetSecurityManagerEx2 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).MapUrlToZoneEx2)(windows_core::Interface::as_raw(self), puri.param().abi(), core::mem::transmute(pdwzone), dwflags, core::mem::transmute(ppwszmappedurl.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwoutflags.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).MapUrlToZoneEx2)(windows_core::Interface::as_raw(self), puri.param().abi(), pdwzone as _, dwflags, ppwszmappedurl.unwrap_or(core::mem::zeroed()) as _, pdwoutflags.unwrap_or(core::mem::zeroed()) as _).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 P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ProcessUrlActionEx2)(windows_core::Interface::as_raw(self), puri.param().abi(), dwaction, core::mem::transmute(ppolicy.as_ptr()), ppolicy.len().try_into().unwrap(), pcontext, cbcontext, dwflags, dwreserved, core::mem::transmute(pdwoutflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).ProcessUrlActionEx2)(windows_core::Interface::as_raw(self), puri.param().abi(), dwaction, core::mem::transmute(ppolicy.as_ptr()), ppolicy.len().try_into().unwrap(), pcontext, cbcontext, dwflags, dwreserved, pdwoutflags as _).ok() } } pub unsafe fn GetSecurityIdEx2(&self, puri: P0, pbsecurityid: &mut [u8; 512], pcbsecurityid: *mut u32, dwreserved: usize) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetSecurityIdEx2)(windows_core::Interface::as_raw(self), puri.param().abi(), core::mem::transmute(pbsecurityid.as_ptr()), core::mem::transmute(pcbsecurityid), dwreserved).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSecurityIdEx2)(windows_core::Interface::as_raw(self), puri.param().abi(), core::mem::transmute(pbsecurityid.as_ptr()), pcbsecurityid as _, dwreserved).ok() } } pub unsafe fn QueryCustomPolicyEx2(&self, puri: P0, guidkey: *const windows_core::GUID, pppolicy: *mut *mut u8, pcbpolicy: *mut u32, pcontext: *const u8, cbcontext: u32, dwreserved: usize) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).QueryCustomPolicyEx2)(windows_core::Interface::as_raw(self), puri.param().abi(), guidkey, core::mem::transmute(pppolicy), core::mem::transmute(pcbpolicy), pcontext, cbcontext, dwreserved).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryCustomPolicyEx2)(windows_core::Interface::as_raw(self), puri.param().abi(), guidkey, pppolicy as _, pcbpolicy as _, pcontext, cbcontext, dwreserved).ok() } } } #[repr(C)] @@ -2570,7 +2570,7 @@ impl IInternetSession { unsafe { (windows_core::Interface::vtable(self).SetSessionOption)(windows_core::Interface::as_raw(self), dwoption, pbuffer, dwbufferlength, dwreserved).ok() } } pub unsafe fn GetSessionOption(&self, dwoption: u32, pbuffer: *mut core::ffi::c_void, pdwbufferlength: *mut u32, dwreserved: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSessionOption)(windows_core::Interface::as_raw(self), dwoption, core::mem::transmute(pbuffer), core::mem::transmute(pdwbufferlength), dwreserved).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSessionOption)(windows_core::Interface::as_raw(self), dwoption, pbuffer as _, pdwbufferlength as _, dwreserved).ok() } } } #[repr(C)] @@ -2698,13 +2698,13 @@ windows_core::imp::define_interface!(IInternetZoneManager, IInternetZoneManager_ windows_core::imp::interface_hierarchy!(IInternetZoneManager, windows_core::IUnknown); impl IInternetZoneManager { pub unsafe fn GetZoneAttributes(&self, dwzone: u32, pzoneattributes: *mut ZONEATTRIBUTES) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetZoneAttributes)(windows_core::Interface::as_raw(self), dwzone, core::mem::transmute(pzoneattributes)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetZoneAttributes)(windows_core::Interface::as_raw(self), dwzone, pzoneattributes as _).ok() } } pub unsafe fn SetZoneAttributes(&self, dwzone: u32, pzoneattributes: *const ZONEATTRIBUTES) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetZoneAttributes)(windows_core::Interface::as_raw(self), dwzone, pzoneattributes).ok() } } pub unsafe fn GetZoneCustomPolicy(&self, dwzone: u32, guidkey: *const windows_core::GUID, pppolicy: *mut *mut u8, pcbpolicy: *mut u32, urlzonereg: URLZONEREG) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetZoneCustomPolicy)(windows_core::Interface::as_raw(self), dwzone, guidkey, core::mem::transmute(pppolicy), core::mem::transmute(pcbpolicy), urlzonereg).ok() } + unsafe { (windows_core::Interface::vtable(self).GetZoneCustomPolicy)(windows_core::Interface::as_raw(self), dwzone, guidkey, pppolicy as _, pcbpolicy as _, urlzonereg).ok() } } pub unsafe fn SetZoneCustomPolicy(&self, dwzone: u32, guidkey: *const windows_core::GUID, ppolicy: &[u8], urlzonereg: URLZONEREG) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetZoneCustomPolicy)(windows_core::Interface::as_raw(self), dwzone, guidkey, core::mem::transmute(ppolicy.as_ptr()), ppolicy.len().try_into().unwrap(), urlzonereg).ok() } @@ -2730,7 +2730,7 @@ impl IInternetZoneManager { unsafe { (windows_core::Interface::vtable(self).LogAction)(windows_core::Interface::as_raw(self), dwaction, pwszurl.param().abi(), pwsztext.param().abi(), dwlogflags).ok() } } pub unsafe fn CreateZoneEnumerator(&self, pdwenum: *mut u32, pdwcount: *mut u32, dwflags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateZoneEnumerator)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwenum), core::mem::transmute(pdwcount), dwflags).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateZoneEnumerator)(windows_core::Interface::as_raw(self), pdwenum as _, pdwcount as _, dwflags).ok() } } pub unsafe fn GetZoneAt(&self, dwenum: u32, dwindex: u32) -> windows_core::Result { unsafe { @@ -2937,13 +2937,13 @@ impl core::ops::Deref for IInternetZoneManagerEx2 { windows_core::imp::interface_hierarchy!(IInternetZoneManagerEx2, windows_core::IUnknown, IInternetZoneManager, IInternetZoneManagerEx); impl IInternetZoneManagerEx2 { pub unsafe fn GetZoneAttributesEx(&self, dwzone: u32, pzoneattributes: *mut ZONEATTRIBUTES, dwflags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetZoneAttributesEx)(windows_core::Interface::as_raw(self), dwzone, core::mem::transmute(pzoneattributes), dwflags).ok() } + unsafe { (windows_core::Interface::vtable(self).GetZoneAttributesEx)(windows_core::Interface::as_raw(self), dwzone, pzoneattributes as _, dwflags).ok() } } pub unsafe fn GetZoneSecurityState(&self, dwzoneindex: u32, frespectpolicy: bool, pdwstate: *mut u32, pfpolicyencountered: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetZoneSecurityState)(windows_core::Interface::as_raw(self), dwzoneindex, frespectpolicy.into(), core::mem::transmute(pdwstate), core::mem::transmute(pfpolicyencountered)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetZoneSecurityState)(windows_core::Interface::as_raw(self), dwzoneindex, frespectpolicy.into(), pdwstate as _, pfpolicyencountered as _).ok() } } pub unsafe fn GetIESecurityState(&self, frespectpolicy: bool, pdwstate: *mut u32, pfpolicyencountered: *mut super::super::super::Foundation::BOOL, fnocache: bool) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIESecurityState)(windows_core::Interface::as_raw(self), frespectpolicy.into(), core::mem::transmute(pdwstate), core::mem::transmute(pfpolicyencountered), fnocache.into()).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIESecurityState)(windows_core::Interface::as_raw(self), frespectpolicy.into(), pdwstate as _, pfpolicyencountered as _, fnocache.into()).ok() } } pub unsafe fn FixUnsecureSettings(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).FixUnsecureSettings)(windows_core::Interface::as_raw(self)).ok() } @@ -3223,7 +3223,7 @@ impl ISoftDistExt { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ProcessSoftDist)(windows_core::Interface::as_raw(self), szcdfurl.param().abi(), psoftdistelement.param().abi(), core::mem::transmute(lpsdi)).ok() } + unsafe { (windows_core::Interface::vtable(self).ProcessSoftDist)(windows_core::Interface::as_raw(self), szcdfurl.param().abi(), psoftdistelement.param().abi(), lpsdi as _).ok() } } pub unsafe fn GetFirstCodeBase(&self, szcodebase: *const windows_core::PCWSTR, dwmaxsize: *const u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetFirstCodeBase)(windows_core::Interface::as_raw(self), szcodebase, dwmaxsize).ok() } @@ -3406,7 +3406,7 @@ impl IWinInetCacheHints { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SetCacheExtension)(windows_core::Interface::as_raw(self), pwzext.param().abi(), core::mem::transmute(pszcachefile), core::mem::transmute(pcbcachefile), core::mem::transmute(pdwwinineterror), core::mem::transmute(pdwreserved)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetCacheExtension)(windows_core::Interface::as_raw(self), pwzext.param().abi(), pszcachefile as _, pcbcachefile as _, pdwwinineterror as _, pdwreserved as _).ok() } } } #[repr(C)] @@ -3445,7 +3445,7 @@ impl IWinInetCacheHints2 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SetCacheExtension2)(windows_core::Interface::as_raw(self), pwzext.param().abi(), core::mem::transmute(pwzcachefile), core::mem::transmute(pcchcachefile), core::mem::transmute(pdwwinineterror), core::mem::transmute(pdwreserved)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetCacheExtension2)(windows_core::Interface::as_raw(self), pwzext.param().abi(), core::mem::transmute(pwzcachefile), pcchcachefile as _, pdwwinineterror as _, pdwreserved as _).ok() } } } #[repr(C)] @@ -3526,7 +3526,7 @@ impl core::ops::Deref for IWinInetHttpInfo { windows_core::imp::interface_hierarchy!(IWinInetHttpInfo, windows_core::IUnknown, IWinInetInfo); impl IWinInetHttpInfo { pub unsafe fn QueryInfo(&self, dwoption: u32, pbuffer: *mut core::ffi::c_void, pcbbuf: *mut u32, pdwflags: *mut u32, pdwreserved: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryInfo)(windows_core::Interface::as_raw(self), dwoption, core::mem::transmute(pbuffer), core::mem::transmute(pcbbuf), core::mem::transmute(pdwflags), core::mem::transmute(pdwreserved)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryInfo)(windows_core::Interface::as_raw(self), dwoption, pbuffer as _, pcbbuf as _, pdwflags as _, pdwreserved as _).ok() } } } #[repr(C)] @@ -3556,7 +3556,7 @@ windows_core::imp::define_interface!(IWinInetHttpTimeouts, IWinInetHttpTimeouts_ windows_core::imp::interface_hierarchy!(IWinInetHttpTimeouts, windows_core::IUnknown); impl IWinInetHttpTimeouts { pub unsafe fn GetRequestTimeouts(&self, pdwconnecttimeout: *mut u32, pdwsendtimeout: *mut u32, pdwreceivetimeout: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRequestTimeouts)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwconnecttimeout), core::mem::transmute(pdwsendtimeout), core::mem::transmute(pdwreceivetimeout)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRequestTimeouts)(windows_core::Interface::as_raw(self), pdwconnecttimeout as _, pdwsendtimeout as _, pdwreceivetimeout as _).ok() } } } #[repr(C)] @@ -3586,7 +3586,7 @@ windows_core::imp::define_interface!(IWinInetInfo, IWinInetInfo_Vtbl, 0x79eac9d6 windows_core::imp::interface_hierarchy!(IWinInetInfo, windows_core::IUnknown); impl IWinInetInfo { pub unsafe fn QueryOption(&self, dwoption: u32, pbuffer: *mut core::ffi::c_void, pcbbuf: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryOption)(windows_core::Interface::as_raw(self), dwoption, core::mem::transmute(pbuffer), core::mem::transmute(pcbbuf)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryOption)(windows_core::Interface::as_raw(self), dwoption, pbuffer as _, pcbbuf as _).ok() } } } #[repr(C)] @@ -3655,7 +3655,7 @@ windows_core::imp::define_interface!(IWrappedProtocol, IWrappedProtocol_Vtbl, 0x windows_core::imp::interface_hierarchy!(IWrappedProtocol, windows_core::IUnknown); impl IWrappedProtocol { pub unsafe fn GetWrapperCode(&self, pncode: *mut i32, dwreserved: usize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWrapperCode)(windows_core::Interface::as_raw(self), core::mem::transmute(pncode), dwreserved).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWrapperCode)(windows_core::Interface::as_raw(self), pncode as _, dwreserved).ok() } } } #[repr(C)] 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 7f15158d8e..6125a58353 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Com/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Com/mod.rs @@ -66,7 +66,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); - unsafe { CoAllowSetForegroundWindow(punk.param().abi(), core::mem::transmute(lpvreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CoAllowSetForegroundWindow(punk.param().abi(), lpvreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CoAllowUnmarshalerCLSID(clsid: *const windows_core::GUID) -> windows_core::Result<()> { @@ -129,7 +129,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); - unsafe { CoCreateInstanceEx(clsid, punkouter.param().abi(), dwclsctx, core::mem::transmute(pserverinfo.unwrap_or(core::mem::zeroed())), presults.len().try_into().unwrap(), core::mem::transmute(presults.as_ptr())).ok() } + unsafe { CoCreateInstanceEx(clsid, punkouter.param().abi(), dwclsctx, pserverinfo.unwrap_or(core::mem::zeroed()) as _, 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<()> @@ -137,7 +137,7 @@ 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); - unsafe { CoCreateInstanceFromApp(clsid, punkouter.param().abi(), dwclsctx, core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), presults.len().try_into().unwrap(), core::mem::transmute(presults.as_ptr())).ok() } + unsafe { CoCreateInstanceFromApp(clsid, punkouter.param().abi(), dwclsctx, reserved.unwrap_or(core::mem::zeroed()) as _, presults.len().try_into().unwrap(), core::mem::transmute(presults.as_ptr())).ok() } } #[inline] pub unsafe fn CoDecrementMTAUsage(cookie: CO_MTA_USAGE_COOKIE) -> windows_core::Result<()> { @@ -147,7 +147,7 @@ pub unsafe fn CoDecrementMTAUsage(cookie: CO_MTA_USAGE_COOKIE) -> windows_core:: #[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); - unsafe { CoDisableCallCancellation(core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CoDisableCallCancellation(preserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CoDisconnectContext(dwtimeout: u32) -> windows_core::Result<()> { @@ -160,17 +160,17 @@ where P0: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn CoDisconnectObject(punk : * mut core::ffi::c_void, dwreserved : u32) -> windows_core::HRESULT); - unsafe { CoDisconnectObject(punk.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CoDisconnectObject(punk.param().abi(), dwreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CoDosDateTimeToFileTime(ndosdate: u16, ndostime: u16, lpfiletime: *mut super::super::Foundation::FILETIME) -> super::super::Foundation::BOOL { windows_targets::link!("ole32.dll" "system" fn CoDosDateTimeToFileTime(ndosdate : u16, ndostime : u16, lpfiletime : *mut super::super::Foundation:: FILETIME) -> super::super::Foundation:: BOOL); - unsafe { CoDosDateTimeToFileTime(ndosdate, ndostime, core::mem::transmute(lpfiletime)) } + unsafe { CoDosDateTimeToFileTime(ndosdate, ndostime, lpfiletime as _) } } #[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); - unsafe { CoEnableCallCancellation(core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CoEnableCallCancellation(preserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CoFileTimeNow() -> windows_core::Result { @@ -183,7 +183,7 @@ pub unsafe fn CoFileTimeNow() -> windows_core::Result super::super::Foundation::BOOL { windows_targets::link!("ole32.dll" "system" fn CoFileTimeToDosDateTime(lpfiletime : *const super::super::Foundation:: FILETIME, lpdosdate : *mut u16, lpdostime : *mut u16) -> super::super::Foundation:: BOOL); - unsafe { CoFileTimeToDosDateTime(lpfiletime, core::mem::transmute(lpdosdate), core::mem::transmute(lpdostime)) } + unsafe { CoFileTimeToDosDateTime(lpfiletime, lpdosdate as _, lpdostime as _) } } #[inline] pub unsafe fn CoFreeAllLibraries() { @@ -203,12 +203,12 @@ pub unsafe fn CoFreeUnusedLibraries() { #[inline] pub unsafe fn CoFreeUnusedLibrariesEx(dwunloaddelay: u32, dwreserved: Option) { windows_targets::link!("ole32.dll" "system" fn CoFreeUnusedLibrariesEx(dwunloaddelay : u32, dwreserved : u32)); - unsafe { CoFreeUnusedLibrariesEx(dwunloaddelay, core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { CoFreeUnusedLibrariesEx(dwunloaddelay, dwreserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CoGetApartmentType(papttype: *mut APTTYPE, paptqualifier: *mut APTTYPEQUALIFIER) -> windows_core::Result<()> { windows_targets::link!("ole32.dll" "system" fn CoGetApartmentType(papttype : *mut APTTYPE, paptqualifier : *mut APTTYPEQUALIFIER) -> windows_core::HRESULT); - unsafe { CoGetApartmentType(core::mem::transmute(papttype), core::mem::transmute(paptqualifier)).ok() } + unsafe { CoGetApartmentType(papttype as _, paptqualifier as _).ok() } } #[inline] pub unsafe fn CoGetCallContext() -> windows_core::Result @@ -243,7 +243,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(); - unsafe { CoGetClassObject(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__)) } + unsafe { CoGetClassObject(rclsid, dwclscontext.0 as _, pvreserved.unwrap_or(core::mem::zeroed()) as _, &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[inline] pub unsafe fn CoGetContextToken() -> windows_core::Result { @@ -282,7 +282,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(); - unsafe { 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__)) } + unsafe { CoGetObject(pszname.param().abi(), pbindoptions.unwrap_or(core::mem::zeroed()) as _, &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[inline] pub unsafe fn CoGetObjectContext() -> windows_core::Result @@ -305,12 +305,12 @@ pub unsafe fn CoGetPSClsid(riid: *const windows_core::GUID) -> windows_core::Res #[inline] pub unsafe fn CoGetSystemSecurityPermissions(comsdtype: COMSD, ppsd: *mut super::super::Security::PSECURITY_DESCRIPTOR) -> windows_core::Result<()> { windows_targets::link!("ole32.dll" "system" fn CoGetSystemSecurityPermissions(comsdtype : COMSD, ppsd : *mut super::super::Security:: PSECURITY_DESCRIPTOR) -> windows_core::HRESULT); - unsafe { CoGetSystemSecurityPermissions(comsdtype, core::mem::transmute(ppsd)).ok() } + unsafe { CoGetSystemSecurityPermissions(comsdtype, ppsd as _).ok() } } #[inline] pub unsafe fn CoGetTreatAsClass(clsidold: *const windows_core::GUID, pclsidnew: *mut windows_core::GUID) -> windows_core::HRESULT { windows_targets::link!("ole32.dll" "system" fn CoGetTreatAsClass(clsidold : *const windows_core::GUID, pclsidnew : *mut windows_core::GUID) -> windows_core::HRESULT); - unsafe { CoGetTreatAsClass(clsidold, core::mem::transmute(pclsidnew)) } + unsafe { CoGetTreatAsClass(clsidold, pclsidnew as _) } } #[inline] pub unsafe fn CoImpersonateClient() -> windows_core::Result<()> { @@ -328,18 +328,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); - unsafe { CoInitialize(core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { CoInitialize(pvreserved.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CoInitializeEx(core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), dwcoinit.0 as _) } + unsafe { CoInitializeEx(pvreserved.unwrap_or(core::mem::zeroed()) as _, dwcoinit.0 as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { CoInitializeSecurity(core::mem::transmute(psecdesc.unwrap_or(core::mem::zeroed())), cauthsvc, core::mem::transmute(asauthsvc.unwrap_or(core::mem::zeroed())), core::mem::transmute(preserved1.unwrap_or(core::mem::zeroed())), dwauthnlevel, dwimplevel, core::mem::transmute(pauthlist.unwrap_or(core::mem::zeroed())), dwcapabilities.0 as _, core::mem::transmute(preserved3.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CoInitializeSecurity(psecdesc.unwrap_or(core::mem::zeroed()) as _, cauthsvc, asauthsvc.unwrap_or(core::mem::zeroed()) as _, preserved1.unwrap_or(core::mem::zeroed()) as _, dwauthnlevel, dwimplevel, pauthlist.unwrap_or(core::mem::zeroed()) as _, dwcapabilities.0 as _, preserved3.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CoInstall(pbc: P0, dwflags: u32, pclassspec: *const uCLSSPEC, pquery: *const QUERYCONTEXT, pszcodebase: P4) -> windows_core::Result<()> @@ -390,12 +390,12 @@ where #[inline] pub unsafe fn CoQueryAuthenticationServices(pcauthsvc: *mut u32, asauthsvc: *mut *mut SOLE_AUTHENTICATION_SERVICE) -> windows_core::Result<()> { windows_targets::link!("ole32.dll" "system" fn CoQueryAuthenticationServices(pcauthsvc : *mut u32, asauthsvc : *mut *mut SOLE_AUTHENTICATION_SERVICE) -> windows_core::HRESULT); - unsafe { CoQueryAuthenticationServices(core::mem::transmute(pcauthsvc), core::mem::transmute(asauthsvc)).ok() } + unsafe { CoQueryAuthenticationServices(pcauthsvc as _, asauthsvc as _).ok() } } #[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); - unsafe { 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() } + unsafe { CoQueryClientBlanket(pauthnsvc.unwrap_or(core::mem::zeroed()) as _, pauthzsvc.unwrap_or(core::mem::zeroed()) as _, pserverprincname.unwrap_or(core::mem::zeroed()) as _, pauthnlevel.unwrap_or(core::mem::zeroed()) as _, pimplevel.unwrap_or(core::mem::zeroed()) as _, pprivs.unwrap_or(core::mem::zeroed()) as _, pcapabilities.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -403,19 +403,7 @@ where P0: windows_core::Param, { 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); - unsafe { - CoQueryProxyBlanket( - pproxy.param().abi(), - 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() - } + unsafe { CoQueryProxyBlanket(pproxy.param().abi(), pwauthnsvc.unwrap_or(core::mem::zeroed()) as _, pauthzsvc.unwrap_or(core::mem::zeroed()) as _, pserverprincname.unwrap_or(core::mem::zeroed()) as _, pauthnlevel.unwrap_or(core::mem::zeroed()) as _, pimplevel.unwrap_or(core::mem::zeroed()) as _, pauthinfo.unwrap_or(core::mem::zeroed()) as _, pcapabilites.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CoRegisterActivationFilter(pactivationfilter: P0) -> windows_core::Result<()> @@ -537,7 +525,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); - unsafe { CoSetProxyBlanket(pproxy.param().abi(), dwauthnsvc, dwauthzsvc, pserverprincname.param().abi(), dwauthnlevel, dwimplevel, core::mem::transmute(pauthinfo.unwrap_or(core::mem::zeroed())), dwcapabilities.0 as _).ok() } + unsafe { CoSetProxyBlanket(pproxy.param().abi(), dwauthnsvc, dwauthzsvc, pserverprincname.param().abi(), dwauthnlevel, dwimplevel, pauthinfo.unwrap_or(core::mem::zeroed()) as _, dwcapabilities.0 as _).ok() } } #[inline] pub unsafe fn CoSuspendClassObjects() -> windows_core::Result<()> { @@ -563,12 +551,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)); - unsafe { CoTaskMemFree(core::mem::transmute(pv.unwrap_or(core::mem::zeroed()))) } + unsafe { CoTaskMemFree(pv.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CoTaskMemRealloc(core::mem::transmute(pv.unwrap_or(core::mem::zeroed())), cb) } + unsafe { CoTaskMemRealloc(pv.unwrap_or(core::mem::zeroed()) as _, cb) } } #[inline] pub unsafe fn CoTestCancel() -> windows_core::Result<()> { @@ -731,7 +719,7 @@ where 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); unsafe { let mut result__ = core::mem::zeroed(); - CreateUri(pwzuri.param().abi(), dwflags, core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + CreateUri(pwzuri.param().abi(), dwflags, dwreserved.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[inline] @@ -742,7 +730,7 @@ where 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); unsafe { let mut result__ = core::mem::zeroed(); - CreateUriFromMultiByteString(pszansiinputuri.param().abi(), dwencodingflags, dwcodepage, dwcreateflags, core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + CreateUriFromMultiByteString(pszansiinputuri.param().abi(), dwencodingflags, dwcodepage, dwcreateflags, dwreserved.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[inline] @@ -754,13 +742,13 @@ where 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); unsafe { let mut result__ = core::mem::zeroed(); - CreateUriWithFragment(pwzuri.param().abi(), pwzfragment.param().abi(), dwflags, core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + CreateUriWithFragment(pwzuri.param().abi(), pwzfragment.param().abi(), dwflags, dwreserved.unwrap_or(core::mem::zeroed()) as _, &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); - unsafe { DcomChannelSetHResult(core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pulreserved.unwrap_or(core::mem::zeroed())), appshr).ok() } + unsafe { DcomChannelSetHResult(pvreserved.unwrap_or(core::mem::zeroed()) as _, pulreserved.unwrap_or(core::mem::zeroed()) as _, appshr).ok() } } #[inline] pub unsafe fn GetClassFile(szfilename: P0) -> windows_core::Result @@ -807,7 +795,7 @@ where P1: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn MkParseDisplayName(pbc : * mut core::ffi::c_void, szusername : windows_core::PCWSTR, pcheaten : *mut u32, ppmk : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { MkParseDisplayName(pbc.param().abi(), szusername.param().abi(), core::mem::transmute(pcheaten), core::mem::transmute(ppmk)).ok() } + unsafe { MkParseDisplayName(pbc.param().abi(), szusername.param().abi(), pcheaten as _, core::mem::transmute(ppmk)).ok() } } #[inline] pub unsafe fn MonikerCommonPrefixWith(pmkthis: P0, pmkother: P1) -> windows_core::Result @@ -1223,7 +1211,7 @@ impl AsyncIPipeByte { unsafe { (windows_core::Interface::vtable(self).Begin_Pull)(windows_core::Interface::as_raw(self), crequest).ok() } } pub unsafe fn Finish_Pull(&self, buf: *mut u8, pcreturned: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Finish_Pull)(windows_core::Interface::as_raw(self), core::mem::transmute(buf), core::mem::transmute(pcreturned)).ok() } + unsafe { (windows_core::Interface::vtable(self).Finish_Pull)(windows_core::Interface::as_raw(self), buf as _, pcreturned as _).ok() } } pub unsafe fn Begin_Push(&self, buf: &[u8]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Begin_Push)(windows_core::Interface::as_raw(self), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap()).ok() } @@ -1292,7 +1280,7 @@ impl AsyncIPipeDouble { unsafe { (windows_core::Interface::vtable(self).Begin_Pull)(windows_core::Interface::as_raw(self), crequest).ok() } } pub unsafe fn Finish_Pull(&self, buf: *mut f64, pcreturned: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Finish_Pull)(windows_core::Interface::as_raw(self), core::mem::transmute(buf), core::mem::transmute(pcreturned)).ok() } + unsafe { (windows_core::Interface::vtable(self).Finish_Pull)(windows_core::Interface::as_raw(self), buf as _, pcreturned as _).ok() } } pub unsafe fn Begin_Push(&self, buf: &[f64]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Begin_Push)(windows_core::Interface::as_raw(self), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap()).ok() } @@ -1361,7 +1349,7 @@ impl AsyncIPipeLong { unsafe { (windows_core::Interface::vtable(self).Begin_Pull)(windows_core::Interface::as_raw(self), crequest).ok() } } pub unsafe fn Finish_Pull(&self, buf: *mut i32, pcreturned: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Finish_Pull)(windows_core::Interface::as_raw(self), core::mem::transmute(buf), core::mem::transmute(pcreturned)).ok() } + unsafe { (windows_core::Interface::vtable(self).Finish_Pull)(windows_core::Interface::as_raw(self), buf as _, pcreturned as _).ok() } } pub unsafe fn Begin_Push(&self, buf: &[i32]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Begin_Push)(windows_core::Interface::as_raw(self), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap()).ok() } @@ -1430,7 +1418,7 @@ impl AsyncIUnknown { unsafe { (windows_core::Interface::vtable(self).Begin_QueryInterface)(windows_core::Interface::as_raw(self), riid).ok() } } pub unsafe fn Finish_QueryInterface(&self, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Finish_QueryInterface)(windows_core::Interface::as_raw(self), core::mem::transmute(ppvobject)).ok() } + unsafe { (windows_core::Interface::vtable(self).Finish_QueryInterface)(windows_core::Interface::as_raw(self), ppvobject as _).ok() } } pub unsafe fn Begin_AddRef(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Begin_AddRef)(windows_core::Interface::as_raw(self)).ok() } @@ -2545,7 +2533,7 @@ windows_core::imp::define_interface!(IAddrExclusionControl, IAddrExclusionContro windows_core::imp::interface_hierarchy!(IAddrExclusionControl, windows_core::IUnknown); impl IAddrExclusionControl { pub unsafe fn GetCurrentAddrExclusionList(&self, riid: *const windows_core::GUID, ppenumerator: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrentAddrExclusionList)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(ppenumerator)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentAddrExclusionList)(windows_core::Interface::as_raw(self), riid, ppenumerator as _).ok() } } pub unsafe fn UpdateAddrExclusionList(&self, penumerator: P0) -> windows_core::Result<()> where @@ -2790,7 +2778,7 @@ impl IAsyncManager { unsafe { (windows_core::Interface::vtable(self).CompleteCall)(windows_core::Interface::as_raw(self), result).ok() } } pub unsafe fn GetCallContext(&self, riid: *const windows_core::GUID, pinterface: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCallContext)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(pinterface)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCallContext)(windows_core::Interface::as_raw(self), riid, pinterface as _).ok() } } pub unsafe fn GetState(&self) -> windows_core::Result { unsafe { @@ -2862,13 +2850,13 @@ impl IAsyncRpcChannelBuffer { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Send)(windows_core::Interface::as_raw(self), core::mem::transmute(pmsg), psync.param().abi(), core::mem::transmute(pulstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).Send)(windows_core::Interface::as_raw(self), pmsg as _, psync.param().abi(), pulstatus as _).ok() } } pub unsafe fn Receive(&self, pmsg: *mut RPCOLEMESSAGE, pulstatus: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Receive)(windows_core::Interface::as_raw(self), core::mem::transmute(pmsg), core::mem::transmute(pulstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).Receive)(windows_core::Interface::as_raw(self), pmsg as _, pulstatus as _).ok() } } pub unsafe fn GetDestCtxEx(&self, pmsg: *const RPCOLEMESSAGE, pdwdestcontext: *mut u32, ppvdestcontext: Option<*mut *mut core::ffi::c_void>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDestCtxEx)(windows_core::Interface::as_raw(self), pmsg, core::mem::transmute(pdwdestcontext), core::mem::transmute(ppvdestcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDestCtxEx)(windows_core::Interface::as_raw(self), pmsg, pdwdestcontext as _, ppvdestcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -2919,7 +2907,7 @@ windows_core::imp::define_interface!(IAuthenticate, IAuthenticate_Vtbl, 0x79eac9 windows_core::imp::interface_hierarchy!(IAuthenticate, windows_core::IUnknown); impl IAuthenticate { pub unsafe fn Authenticate(&self, phwnd: *mut super::super::Foundation::HWND, pszusername: *mut windows_core::PWSTR, pszpassword: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Authenticate)(windows_core::Interface::as_raw(self), core::mem::transmute(phwnd), core::mem::transmute(pszusername), core::mem::transmute(pszpassword)).ok() } + unsafe { (windows_core::Interface::vtable(self).Authenticate)(windows_core::Interface::as_raw(self), phwnd as _, pszusername as _, pszpassword as _).ok() } } } #[repr(C)] @@ -2955,7 +2943,7 @@ impl core::ops::Deref for IAuthenticateEx { windows_core::imp::interface_hierarchy!(IAuthenticateEx, windows_core::IUnknown, IAuthenticate); impl IAuthenticateEx { pub unsafe fn AuthenticateEx(&self, phwnd: *mut super::super::Foundation::HWND, pszusername: *mut windows_core::PWSTR, pszpassword: *mut windows_core::PWSTR, pauthinfo: *const AUTHENTICATEINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AuthenticateEx)(windows_core::Interface::as_raw(self), core::mem::transmute(phwnd), core::mem::transmute(pszusername), core::mem::transmute(pszpassword), pauthinfo).ok() } + unsafe { (windows_core::Interface::vtable(self).AuthenticateEx)(windows_core::Interface::as_raw(self), phwnd as _, pszusername as _, pszpassword as _, pauthinfo).ok() } } } #[repr(C)] @@ -3003,7 +2991,7 @@ impl IBindCtx { unsafe { (windows_core::Interface::vtable(self).SetBindOptions)(windows_core::Interface::as_raw(self), pbindopts).ok() } } pub unsafe fn GetBindOptions(&self, pbindopts: *mut BIND_OPTS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBindOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(pbindopts)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBindOptions)(windows_core::Interface::as_raw(self), pbindopts as _).ok() } } pub unsafe fn GetRunningObjectTable(&self) -> windows_core::Result { unsafe { @@ -3181,7 +3169,7 @@ impl IBindHost { P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).MonikerBindToStorage)(windows_core::Interface::as_raw(self), pmk.param().abi(), pbc.param().abi(), pbsc.param().abi(), riid, core::mem::transmute(ppvobj)).ok() } + unsafe { (windows_core::Interface::vtable(self).MonikerBindToStorage)(windows_core::Interface::as_raw(self), pmk.param().abi(), pbc.param().abi(), pbsc.param().abi(), riid, ppvobj as _).ok() } } pub unsafe fn MonikerBindToObject(&self, pmk: P0, pbc: P1, pbsc: P2, riid: *const windows_core::GUID, ppvobj: *mut *mut core::ffi::c_void) -> windows_core::Result<()> where @@ -3189,7 +3177,7 @@ impl IBindHost { P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).MonikerBindToObject)(windows_core::Interface::as_raw(self), pmk.param().abi(), pbc.param().abi(), pbsc.param().abi(), riid, core::mem::transmute(ppvobj)).ok() } + unsafe { (windows_core::Interface::vtable(self).MonikerBindToObject)(windows_core::Interface::as_raw(self), pmk.param().abi(), pbc.param().abi(), pbsc.param().abi(), riid, ppvobj as _).ok() } } } #[repr(C)] @@ -3268,7 +3256,7 @@ impl IBindStatusCallback { } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Security", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe fn GetBindInfo(&self, grfbindf: *mut u32, pbindinfo: *mut BINDINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBindInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(grfbindf), core::mem::transmute(pbindinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBindInfo)(windows_core::Interface::as_raw(self), grfbindf as _, core::mem::transmute(pbindinfo)).ok() } } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe fn OnDataAvailable(&self, grfbscf: u32, dwsize: u32, pformatetc: *const FORMATETC, pstgmed: *const STGMEDIUM) -> windows_core::Result<()> { @@ -3396,7 +3384,7 @@ windows_core::imp::interface_hierarchy!(IBindStatusCallbackEx, windows_core::IUn impl IBindStatusCallbackEx { #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Security", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe fn GetBindInfoEx(&self, grfbindf: *mut u32, pbindinfo: *mut BINDINFO, grfbindf2: *mut u32, pdwreserved: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBindInfoEx)(windows_core::Interface::as_raw(self), core::mem::transmute(grfbindf), core::mem::transmute(pbindinfo), core::mem::transmute(grfbindf2), core::mem::transmute(pdwreserved)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBindInfoEx)(windows_core::Interface::as_raw(self), grfbindf as _, core::mem::transmute(pbindinfo), grfbindf2 as _, pdwreserved as _).ok() } } } #[repr(C)] @@ -3450,7 +3438,7 @@ impl IBinding { } } pub unsafe fn GetBindResult(&self, pclsidprotocol: *mut windows_core::GUID, pdwresult: *mut u32, pszresult: *mut windows_core::PWSTR, pdwreserved: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBindResult)(windows_core::Interface::as_raw(self), core::mem::transmute(pclsidprotocol), core::mem::transmute(pdwresult), core::mem::transmute(pszresult), core::mem::transmute(pdwreserved)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBindResult)(windows_core::Interface::as_raw(self), pclsidprotocol as _, pdwresult as _, pszresult as _, pdwreserved as _).ok() } } } #[repr(C)] @@ -3896,7 +3884,7 @@ impl IChannelHook { } } pub unsafe fn ClientFillBuffer(&self, uextent: *const windows_core::GUID, riid: *const windows_core::GUID, pdatasize: *mut u32, pdatabuffer: *const core::ffi::c_void) { - unsafe { (windows_core::Interface::vtable(self).ClientFillBuffer)(windows_core::Interface::as_raw(self), uextent, riid, core::mem::transmute(pdatasize), pdatabuffer) } + unsafe { (windows_core::Interface::vtable(self).ClientFillBuffer)(windows_core::Interface::as_raw(self), uextent, riid, pdatasize as _, pdatabuffer) } } pub unsafe fn ClientNotify(&self, uextent: *const windows_core::GUID, riid: *const windows_core::GUID, cbdatasize: u32, pdatabuffer: *const core::ffi::c_void, ldatarep: u32, hrfault: windows_core::HRESULT) { unsafe { (windows_core::Interface::vtable(self).ClientNotify)(windows_core::Interface::as_raw(self), uextent, riid, cbdatasize, pdatabuffer, ldatarep, hrfault) } @@ -3912,7 +3900,7 @@ impl IChannelHook { } } pub unsafe fn ServerFillBuffer(&self, uextent: *const windows_core::GUID, riid: *const windows_core::GUID, pdatasize: *mut u32, pdatabuffer: *const core::ffi::c_void, hrfault: windows_core::HRESULT) { - unsafe { (windows_core::Interface::vtable(self).ServerFillBuffer)(windows_core::Interface::as_raw(self), uextent, riid, core::mem::transmute(pdatasize), pdatabuffer, hrfault) } + unsafe { (windows_core::Interface::vtable(self).ServerFillBuffer)(windows_core::Interface::as_raw(self), uextent, riid, pdatasize as _, pdatabuffer, hrfault) } } } #[repr(C)] @@ -4077,14 +4065,14 @@ impl IClientSecurity { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).QueryBlanket)(windows_core::Interface::as_raw(self), pproxy.param().abi(), pauthnsvc as _, pauthzsvc.unwrap_or(core::mem::zeroed()) as _, pserverprincname as _, pauthnlevel.unwrap_or(core::mem::zeroed()) as _, pimplevel.unwrap_or(core::mem::zeroed()) as _, pauthinfo as _, pcapabilites.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).SetBlanket)(windows_core::Interface::as_raw(self), pproxy.param().abi(), dwauthnsvc, dwauthzsvc, pserverprincname.param().abi(), dwauthnlevel, dwimplevel, core::mem::transmute(pauthinfo.unwrap_or(core::mem::zeroed())), dwcapabilities.0 as _).ok() } + unsafe { (windows_core::Interface::vtable(self).SetBlanket)(windows_core::Interface::as_raw(self), pproxy.param().abi(), dwauthnsvc, dwauthzsvc, pserverprincname.param().abi(), dwauthnlevel, dwimplevel, pauthinfo.unwrap_or(core::mem::zeroed()) as _, dwcapabilities.0 as _).ok() } } pub unsafe fn CopyProxy(&self, pproxy: P0) -> windows_core::Result where @@ -4438,7 +4426,7 @@ impl IContext { unsafe { (windows_core::Interface::vtable(self).RemoveProperty)(windows_core::Interface::as_raw(self), rpolicyid).ok() } } pub unsafe fn GetProperty(&self, rguid: *const windows_core::GUID, pflags: *mut u32, ppunk: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), rguid, core::mem::transmute(pflags), core::mem::transmute(ppunk)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), rguid, pflags as _, core::mem::transmute(ppunk)).ok() } } pub unsafe fn EnumContextProps(&self) -> windows_core::Result { unsafe { @@ -4617,7 +4605,7 @@ impl IDataAdviseHolder { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SendOnDataChange)(windows_core::Interface::as_raw(self), pdataobject.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), advf).ok() } + unsafe { (windows_core::Interface::vtable(self).SendOnDataChange)(windows_core::Interface::as_raw(self), pdataobject.param().abi(), dwreserved.unwrap_or(core::mem::zeroed()) as _, advf).ok() } } } #[repr(C)] @@ -4703,7 +4691,7 @@ impl IDataObject { unsafe { (windows_core::Interface::vtable(self).QueryGetData)(windows_core::Interface::as_raw(self), pformatetc) } } pub unsafe fn GetCanonicalFormatEtc(&self, pformatectin: *const FORMATETC, pformatetcout: *mut FORMATETC) -> windows_core::HRESULT { - unsafe { (windows_core::Interface::vtable(self).GetCanonicalFormatEtc)(windows_core::Interface::as_raw(self), pformatectin, core::mem::transmute(pformatetcout)) } + unsafe { (windows_core::Interface::vtable(self).GetCanonicalFormatEtc)(windows_core::Interface::as_raw(self), pformatectin, pformatetcout as _) } } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe fn SetData(&self, pformatetc: *const FORMATETC, pmedium: *const STGMEDIUM, frelease: bool) -> windows_core::Result<()> { @@ -4884,11 +4872,11 @@ impl IDispatch { } } pub unsafe fn GetIDsOfNames(&self, riid: *const windows_core::GUID, rgsznames: *const windows_core::PCWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIDsOfNames)(windows_core::Interface::as_raw(self), riid, rgsznames, cnames, lcid, core::mem::transmute(rgdispid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIDsOfNames)(windows_core::Interface::as_raw(self), riid, rgsznames, cnames, lcid, rgdispid as _).ok() } } #[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<()> { - unsafe { (windows_core::Interface::vtable(self).Invoke)(windows_core::Interface::as_raw(self), dispidmember, riid, lcid, wflags, 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() } + unsafe { (windows_core::Interface::vtable(self).Invoke)(windows_core::Interface::as_raw(self), dispidmember, riid, lcid, wflags, pdispparams, pvarresult.unwrap_or(core::mem::zeroed()) as _, pexcepinfo.unwrap_or(core::mem::zeroed()) as _, puargerr.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -4966,7 +4954,7 @@ windows_core::imp::define_interface!(IEnumCATEGORYINFO, IEnumCATEGORYINFO_Vtbl, windows_core::imp::interface_hierarchy!(IEnumCATEGORYINFO, windows_core::IUnknown); impl IEnumCATEGORYINFO { pub unsafe fn Next(&self, rgelt: &mut [CATEGORYINFO], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -5044,7 +5032,7 @@ windows_core::imp::define_interface!(IEnumConnectionPoints, IEnumConnectionPoint windows_core::imp::interface_hierarchy!(IEnumConnectionPoints, windows_core::IUnknown); impl IEnumConnectionPoints { pub unsafe fn Next(&self, ppcp: &mut [Option], pcfetched: *mut u32) -> windows_core::HRESULT { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppcp.len().try_into().unwrap(), core::mem::transmute(ppcp.as_ptr()), core::mem::transmute(pcfetched)) } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppcp.len().try_into().unwrap(), core::mem::transmute(ppcp.as_ptr()), pcfetched as _) } } pub unsafe fn Skip(&self, cconnections: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), cconnections).ok() } @@ -5122,7 +5110,7 @@ windows_core::imp::define_interface!(IEnumConnections, IEnumConnections_Vtbl, 0x windows_core::imp::interface_hierarchy!(IEnumConnections, windows_core::IUnknown); impl IEnumConnections { pub unsafe fn Next(&self, rgcd: &mut [CONNECTDATA], pcfetched: *mut u32) -> windows_core::HRESULT { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgcd.len().try_into().unwrap(), core::mem::transmute(rgcd.as_ptr()), core::mem::transmute(pcfetched)) } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgcd.len().try_into().unwrap(), core::mem::transmute(rgcd.as_ptr()), pcfetched as _) } } pub unsafe fn Skip(&self, cconnections: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), cconnections).ok() } @@ -5200,7 +5188,7 @@ windows_core::imp::define_interface!(IEnumContextProps, IEnumContextProps_Vtbl, windows_core::imp::interface_hierarchy!(IEnumContextProps, windows_core::IUnknown); impl IEnumContextProps { pub unsafe fn Next(&self, pcontextproperties: &mut [ContextProperty], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pcontextproperties.len().try_into().unwrap(), core::mem::transmute(pcontextproperties.as_ptr()), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pcontextproperties.len().try_into().unwrap(), core::mem::transmute(pcontextproperties.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -5299,7 +5287,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 { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -5377,7 +5365,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 { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt) } @@ -5455,7 +5443,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 { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt) } @@ -5533,7 +5521,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -5611,7 +5599,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 { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt) } @@ -5689,7 +5677,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 { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -5987,7 +5975,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<()> { - unsafe { (windows_core::Interface::vtable(self).AllowForegroundTransfer)(windows_core::Interface::as_raw(self), core::mem::transmute(lpvreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).AllowForegroundTransfer)(windows_core::Interface::as_raw(self), lpvreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -6029,7 +6017,7 @@ impl IGlobalInterfaceTable { unsafe { (windows_core::Interface::vtable(self).RevokeInterfaceFromGlobal)(windows_core::Interface::as_raw(self), dwcookie).ok() } } pub unsafe fn GetInterfaceFromGlobal(&self, dwcookie: u32, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInterfaceFromGlobal)(windows_core::Interface::as_raw(self), dwcookie, riid, core::mem::transmute(ppv)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInterfaceFromGlobal)(windows_core::Interface::as_raw(self), dwcookie, riid, ppv as _).ok() } } } #[repr(C)] @@ -6205,7 +6193,7 @@ windows_core::imp::define_interface!(IInternalUnknown, IInternalUnknown_Vtbl, 0x windows_core::imp::interface_hierarchy!(IInternalUnknown, windows_core::IUnknown); impl IInternalUnknown { pub unsafe fn QueryInternalInterface(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryInternalInterface)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(ppv)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryInternalInterface)(windows_core::Interface::as_raw(self), riid, ppv as _).ok() } } } #[repr(C)] @@ -6353,16 +6341,16 @@ impl IMalloc { unsafe { (windows_core::Interface::vtable(self).Alloc)(windows_core::Interface::as_raw(self), cb) } } pub unsafe fn Realloc(&self, pv: Option<*const core::ffi::c_void>, cb: usize) -> *mut core::ffi::c_void { - unsafe { (windows_core::Interface::vtable(self).Realloc)(windows_core::Interface::as_raw(self), core::mem::transmute(pv.unwrap_or(core::mem::zeroed())), cb) } + unsafe { (windows_core::Interface::vtable(self).Realloc)(windows_core::Interface::as_raw(self), pv.unwrap_or(core::mem::zeroed()) as _, cb) } } pub unsafe fn Free(&self, pv: Option<*const core::ffi::c_void>) { - unsafe { (windows_core::Interface::vtable(self).Free)(windows_core::Interface::as_raw(self), core::mem::transmute(pv.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).Free)(windows_core::Interface::as_raw(self), pv.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn GetSize(&self, pv: Option<*const core::ffi::c_void>) -> usize { - unsafe { (windows_core::Interface::vtable(self).GetSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pv.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).GetSize)(windows_core::Interface::as_raw(self), pv.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn DidAlloc(&self, pv: Option<*const core::ffi::c_void>) -> i32 { - unsafe { (windows_core::Interface::vtable(self).DidAlloc)(windows_core::Interface::as_raw(self), core::mem::transmute(pv.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).DidAlloc)(windows_core::Interface::as_raw(self), pv.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn HeapMinimize(&self) { unsafe { (windows_core::Interface::vtable(self).HeapMinimize)(windows_core::Interface::as_raw(self)) } @@ -6455,7 +6443,7 @@ impl IMallocSpy { unsafe { (windows_core::Interface::vtable(self).PostFree)(windows_core::Interface::as_raw(self), fspyed.into()) } } pub unsafe fn PreRealloc(&self, prequest: *const core::ffi::c_void, cbrequest: usize, ppnewrequest: *mut *mut core::ffi::c_void, fspyed: bool) -> usize { - unsafe { (windows_core::Interface::vtable(self).PreRealloc)(windows_core::Interface::as_raw(self), prequest, cbrequest, core::mem::transmute(ppnewrequest), fspyed.into()) } + unsafe { (windows_core::Interface::vtable(self).PreRealloc)(windows_core::Interface::as_raw(self), prequest, cbrequest, ppnewrequest as _, fspyed.into()) } } pub unsafe fn PostRealloc(&self, pactual: *const core::ffi::c_void, fspyed: bool) -> *mut core::ffi::c_void { unsafe { (windows_core::Interface::vtable(self).PostRealloc)(windows_core::Interface::as_raw(self), pactual, fspyed.into()) } @@ -6722,7 +6710,7 @@ impl IMoniker { P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ParseDisplayName)(windows_core::Interface::as_raw(self), pbc.param().abi(), pmktoleft.param().abi(), pszdisplayname.param().abi(), core::mem::transmute(pcheaten), core::mem::transmute(ppmkout)).ok() } + unsafe { (windows_core::Interface::vtable(self).ParseDisplayName)(windows_core::Interface::as_raw(self), pbc.param().abi(), pmktoleft.param().abi(), pszdisplayname.param().abi(), pcheaten as _, core::mem::transmute(ppmkout)).ok() } } pub unsafe fn IsSystemMoniker(&self) -> windows_core::Result { unsafe { @@ -7064,7 +7052,7 @@ impl IPSFactoryBuffer { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateProxy)(windows_core::Interface::as_raw(self), punkouter.param().abi(), riid, core::mem::transmute(ppproxy), core::mem::transmute(ppv)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateProxy)(windows_core::Interface::as_raw(self), punkouter.param().abi(), riid, core::mem::transmute(ppproxy), ppv as _).ok() } } pub unsafe fn CreateStub(&self, riid: *const windows_core::GUID, punkserver: P1) -> windows_core::Result where @@ -7553,7 +7541,7 @@ windows_core::imp::define_interface!(IPipeByte, IPipeByte_Vtbl, 0xdb2f3aca_2f86_ windows_core::imp::interface_hierarchy!(IPipeByte, windows_core::IUnknown); impl IPipeByte { pub unsafe fn Pull(&self, buf: &mut [u8], pcreturned: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Pull)(windows_core::Interface::as_raw(self), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap(), core::mem::transmute(pcreturned)).ok() } + unsafe { (windows_core::Interface::vtable(self).Pull)(windows_core::Interface::as_raw(self), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap(), pcreturned as _).ok() } } pub unsafe fn Push(&self, buf: &[u8]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Push)(windows_core::Interface::as_raw(self), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap()).ok() } @@ -7594,7 +7582,7 @@ windows_core::imp::define_interface!(IPipeDouble, IPipeDouble_Vtbl, 0xdb2f3ace_2 windows_core::imp::interface_hierarchy!(IPipeDouble, windows_core::IUnknown); impl IPipeDouble { pub unsafe fn Pull(&self, buf: &mut [f64], pcreturned: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Pull)(windows_core::Interface::as_raw(self), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap(), core::mem::transmute(pcreturned)).ok() } + unsafe { (windows_core::Interface::vtable(self).Pull)(windows_core::Interface::as_raw(self), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap(), pcreturned as _).ok() } } pub unsafe fn Push(&self, buf: &[f64]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Push)(windows_core::Interface::as_raw(self), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap()).ok() } @@ -7635,7 +7623,7 @@ windows_core::imp::define_interface!(IPipeLong, IPipeLong_Vtbl, 0xdb2f3acc_2f86_ windows_core::imp::interface_hierarchy!(IPipeLong, windows_core::IUnknown); impl IPipeLong { pub unsafe fn Pull(&self, buf: &mut [i32], pcreturned: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Pull)(windows_core::Interface::as_raw(self), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap(), core::mem::transmute(pcreturned)).ok() } + unsafe { (windows_core::Interface::vtable(self).Pull)(windows_core::Interface::as_raw(self), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap(), pcreturned as _).ok() } } pub unsafe fn Push(&self, buf: &[i32]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Push)(windows_core::Interface::as_raw(self), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap()).ok() } @@ -7781,7 +7769,7 @@ windows_core::imp::define_interface!(IROTData, IROTData_Vtbl, 0xf29f6bc0_5021_11 windows_core::imp::interface_hierarchy!(IROTData, windows_core::IUnknown); impl IROTData { pub unsafe fn GetComparisonData(&self, pbdata: &mut [u8], pcbdata: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetComparisonData)(windows_core::Interface::as_raw(self), core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), core::mem::transmute(pcbdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetComparisonData)(windows_core::Interface::as_raw(self), core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), pcbdata as _).ok() } } } #[repr(C)] @@ -7814,7 +7802,7 @@ impl IReleaseMarshalBuffers { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ReleaseMarshalBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(pmsg), dwflags, pchnl.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).ReleaseMarshalBuffer)(windows_core::Interface::as_raw(self), pmsg as _, dwflags, pchnl.param().abi()).ok() } } } #[repr(C)] @@ -7844,16 +7832,16 @@ windows_core::imp::define_interface!(IRpcChannelBuffer, IRpcChannelBuffer_Vtbl, windows_core::imp::interface_hierarchy!(IRpcChannelBuffer, windows_core::IUnknown); impl IRpcChannelBuffer { pub unsafe fn GetBuffer(&self, pmessage: *mut RPCOLEMESSAGE, riid: *const windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(pmessage), riid).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), pmessage as _, riid).ok() } } pub unsafe fn SendReceive(&self, pmessage: *mut RPCOLEMESSAGE, pstatus: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).SendReceive)(windows_core::Interface::as_raw(self), pmessage as _, pstatus.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn FreeBuffer(&self, pmessage: *mut RPCOLEMESSAGE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).FreeBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(pmessage)).ok() } + unsafe { (windows_core::Interface::vtable(self).FreeBuffer)(windows_core::Interface::as_raw(self), pmessage as _).ok() } } pub unsafe fn GetDestCtx(&self, pdwdestcontext: *mut u32, ppvdestcontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDestCtx)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwdestcontext), core::mem::transmute(ppvdestcontext)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDestCtx)(windows_core::Interface::as_raw(self), pdwdestcontext as _, ppvdestcontext as _).ok() } } pub unsafe fn IsConnected(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).IsConnected)(windows_core::Interface::as_raw(self)).ok() } @@ -7976,19 +7964,19 @@ impl core::ops::Deref for IRpcChannelBuffer3 { windows_core::imp::interface_hierarchy!(IRpcChannelBuffer3, windows_core::IUnknown, IRpcChannelBuffer, IRpcChannelBuffer2); impl IRpcChannelBuffer3 { pub unsafe fn Send(&self, pmsg: *mut RPCOLEMESSAGE, pulstatus: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Send)(windows_core::Interface::as_raw(self), core::mem::transmute(pmsg), core::mem::transmute(pulstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).Send)(windows_core::Interface::as_raw(self), pmsg as _, pulstatus as _).ok() } } pub unsafe fn Receive(&self, pmsg: *mut RPCOLEMESSAGE, ulsize: u32, pulstatus: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Receive)(windows_core::Interface::as_raw(self), core::mem::transmute(pmsg), ulsize, core::mem::transmute(pulstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).Receive)(windows_core::Interface::as_raw(self), pmsg as _, ulsize, pulstatus as _).ok() } } pub unsafe fn Cancel(&self, pmsg: *mut RPCOLEMESSAGE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Cancel)(windows_core::Interface::as_raw(self), core::mem::transmute(pmsg)).ok() } + unsafe { (windows_core::Interface::vtable(self).Cancel)(windows_core::Interface::as_raw(self), pmsg as _).ok() } } pub unsafe fn GetCallContext(&self, pmsg: *const RPCOLEMESSAGE, riid: *const windows_core::GUID, pinterface: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCallContext)(windows_core::Interface::as_raw(self), pmsg, riid, core::mem::transmute(pinterface)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCallContext)(windows_core::Interface::as_raw(self), pmsg, riid, pinterface as _).ok() } } pub unsafe fn GetDestCtxEx(&self, pmsg: *const RPCOLEMESSAGE, pdwdestcontext: *mut u32, ppvdestcontext: Option<*mut *mut core::ffi::c_void>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDestCtxEx)(windows_core::Interface::as_raw(self), pmsg, core::mem::transmute(pdwdestcontext), core::mem::transmute(ppvdestcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDestCtxEx)(windows_core::Interface::as_raw(self), pmsg, pdwdestcontext as _, ppvdestcontext.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetState(&self, pmsg: *const RPCOLEMESSAGE) -> windows_core::Result { unsafe { @@ -8000,7 +7988,7 @@ impl IRpcChannelBuffer3 { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).RegisterAsync)(windows_core::Interface::as_raw(self), core::mem::transmute(pmsg), pasyncmgr.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).RegisterAsync)(windows_core::Interface::as_raw(self), pmsg as _, pasyncmgr.param().abi()).ok() } } } #[repr(C)] @@ -8268,7 +8256,7 @@ impl IRpcStubBuffer { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Invoke)(windows_core::Interface::as_raw(self), core::mem::transmute(_prpcmsg), _prpcchannelbuffer.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).Invoke)(windows_core::Interface::as_raw(self), _prpcmsg as _, _prpcchannelbuffer.param().abi()).ok() } } pub unsafe fn IsIIDSupported(&self, riid: *const windows_core::GUID) -> Option { unsafe { (windows_core::Interface::vtable(self).IsIIDSupported)(windows_core::Interface::as_raw(self), riid) } @@ -8277,7 +8265,7 @@ impl IRpcStubBuffer { unsafe { (windows_core::Interface::vtable(self).CountRefs)(windows_core::Interface::as_raw(self)) } } pub unsafe fn DebugServerQueryInterface(&self, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DebugServerQueryInterface)(windows_core::Interface::as_raw(self), core::mem::transmute(ppv)).ok() } + unsafe { (windows_core::Interface::vtable(self).DebugServerQueryInterface)(windows_core::Interface::as_raw(self), ppv as _).ok() } } pub unsafe fn DebugServerRelease(&self, pv: *const core::ffi::c_void) { unsafe { (windows_core::Interface::vtable(self).DebugServerRelease)(windows_core::Interface::as_raw(self), pv) } @@ -8367,7 +8355,7 @@ windows_core::imp::define_interface!(IRpcSyntaxNegotiate, IRpcSyntaxNegotiate_Vt windows_core::imp::interface_hierarchy!(IRpcSyntaxNegotiate, windows_core::IUnknown); impl IRpcSyntaxNegotiate { pub unsafe fn NegotiateSyntax(&self, pmsg: *mut RPCOLEMESSAGE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).NegotiateSyntax)(windows_core::Interface::as_raw(self), core::mem::transmute(pmsg)).ok() } + unsafe { (windows_core::Interface::vtable(self).NegotiateSyntax)(windows_core::Interface::as_raw(self), pmsg as _).ok() } } } #[repr(C)] @@ -8644,10 +8632,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 { - unsafe { (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), core::mem::transmute(pv), cb, core::mem::transmute(pcbread.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), pv as _, cb, pcbread.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn Write(&self, pv: *const core::ffi::c_void, cb: u32, pcbwritten: Option<*mut u32>) -> windows_core::HRESULT { - unsafe { (windows_core::Interface::vtable(self).Write)(windows_core::Interface::as_raw(self), pv, cb, core::mem::transmute(pcbwritten.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).Write)(windows_core::Interface::as_raw(self), pv, cb, pcbwritten.unwrap_or(core::mem::zeroed()) as _) } } } #[repr(C)] @@ -8685,7 +8673,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).QueryBlanket)(windows_core::Interface::as_raw(self), pauthnsvc.unwrap_or(core::mem::zeroed()) as _, pauthzsvc.unwrap_or(core::mem::zeroed()) as _, pserverprincname as _, pauthnlevel.unwrap_or(core::mem::zeroed()) as _, pimplevel.unwrap_or(core::mem::zeroed()) as _, pprivs as _, pcapabilities.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ImpersonateClient(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ImpersonateClient)(windows_core::Interface::as_raw(self)).ok() } @@ -8790,7 +8778,7 @@ impl IStdMarshalInfo { pub unsafe fn GetClassForHandler(&self, dwdestcontext: u32, pvdestcontext: Option<*const core::ffi::c_void>) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetClassForHandler)(windows_core::Interface::as_raw(self), dwdestcontext, core::mem::transmute(pvdestcontext.unwrap_or(core::mem::zeroed())), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetClassForHandler)(windows_core::Interface::as_raw(self), dwdestcontext, pvdestcontext.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| result__) } } } @@ -8833,7 +8821,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<()> { - unsafe { (windows_core::Interface::vtable(self).Seek)(windows_core::Interface::as_raw(self), dlibmove, dworigin, core::mem::transmute(plibnewposition.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Seek)(windows_core::Interface::as_raw(self), dlibmove, dworigin, plibnewposition.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetSize(&self, libnewsize: u64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSize)(windows_core::Interface::as_raw(self), libnewsize).ok() } @@ -8842,7 +8830,7 @@ impl IStream { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CopyTo)(windows_core::Interface::as_raw(self), pstm.param().abi(), cb, core::mem::transmute(pcbread.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbwritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CopyTo)(windows_core::Interface::as_raw(self), pstm.param().abi(), cb, pcbread.unwrap_or(core::mem::zeroed()) as _, pcbwritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Commit(&self, grfcommitflags: STGC) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Commit)(windows_core::Interface::as_raw(self), grfcommitflags.0 as _).ok() } @@ -8857,7 +8845,7 @@ impl IStream { unsafe { (windows_core::Interface::vtable(self).UnlockRegion)(windows_core::Interface::as_raw(self), liboffset, cb, dwlocktype).ok() } } pub unsafe fn Stat(&self, pstatstg: *mut STATSTG, grfstatflag: STATFLAG) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Stat)(windows_core::Interface::as_raw(self), core::mem::transmute(pstatstg), grfstatflag.0 as _).ok() } + unsafe { (windows_core::Interface::vtable(self).Stat)(windows_core::Interface::as_raw(self), pstatstg as _, grfstatflag.0 as _).ok() } } pub unsafe fn Clone(&self) -> windows_core::Result { unsafe { @@ -9080,7 +9068,7 @@ impl ISurrogateService { unsafe { (windows_core::Interface::vtable(self).ApplicationFree)(windows_core::Interface::as_raw(self), rguidapplid).ok() } } pub unsafe fn CatalogRefresh(&self, ulreserved: Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CatalogRefresh)(windows_core::Interface::as_raw(self), core::mem::transmute(ulreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CatalogRefresh)(windows_core::Interface::as_raw(self), ulreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ProcessShutdown(&self, shutdowntype: ShutdownType) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ProcessShutdown)(windows_core::Interface::as_raw(self), shutdowntype).ok() } @@ -9417,7 +9405,7 @@ impl ITypeComp { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Bind)(windows_core::Interface::as_raw(self), szname.param().abi(), lhashval, wflags, core::mem::transmute(pptinfo), core::mem::transmute(pdesckind), core::mem::transmute(pbindptr)).ok() } + unsafe { (windows_core::Interface::vtable(self).Bind)(windows_core::Interface::as_raw(self), szname.param().abi(), lhashval, wflags, core::mem::transmute(pptinfo), pdesckind as _, core::mem::transmute(pbindptr)).ok() } } pub unsafe fn BindType(&self, szname: P0, lhashval: u32, pptinfo: *mut Option, pptcomp: *mut Option) -> windows_core::Result<()> where @@ -9494,7 +9482,7 @@ impl ITypeInfo { } } pub unsafe fn GetNames(&self, memid: i32, rgbstrnames: &mut [windows_core::BSTR], pcnames: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNames)(windows_core::Interface::as_raw(self), memid, core::mem::transmute(rgbstrnames.as_ptr()), rgbstrnames.len().try_into().unwrap(), core::mem::transmute(pcnames)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNames)(windows_core::Interface::as_raw(self), memid, core::mem::transmute(rgbstrnames.as_ptr()), rgbstrnames.len().try_into().unwrap(), pcnames as _).ok() } } pub unsafe fn GetRefTypeOfImplType(&self, index: u32) -> windows_core::Result { unsafe { @@ -9509,17 +9497,17 @@ impl ITypeInfo { } } pub unsafe fn GetIDsOfNames(&self, rgsznames: *const windows_core::PCWSTR, cnames: u32, pmemid: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIDsOfNames)(windows_core::Interface::as_raw(self), rgsznames, cnames, core::mem::transmute(pmemid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIDsOfNames)(windows_core::Interface::as_raw(self), rgsznames, cnames, pmemid as _).ok() } } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn Invoke(&self, pvinstance: *const core::ffi::c_void, memid: i32, wflags: DISPATCH_FLAGS, pdispparams: *mut DISPPARAMS, pvarresult: *mut super::Variant::VARIANT, pexcepinfo: *mut EXCEPINFO, puargerr: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Invoke)(windows_core::Interface::as_raw(self), pvinstance, memid, wflags, core::mem::transmute(pdispparams), core::mem::transmute(pvarresult), core::mem::transmute(pexcepinfo), core::mem::transmute(puargerr)).ok() } + unsafe { (windows_core::Interface::vtable(self).Invoke)(windows_core::Interface::as_raw(self), pvinstance, memid, wflags, pdispparams as _, core::mem::transmute(pvarresult), core::mem::transmute(pexcepinfo), puargerr as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetDocumentation)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).GetDocumentation)(windows_core::Interface::as_raw(self), memid, pbstrname.unwrap_or(core::mem::zeroed()) as _, pbstrdocstring.unwrap_or(core::mem::zeroed()) as _, pdwhelpcontext as _, pbstrhelpfile.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetDllEntry)(windows_core::Interface::as_raw(self), memid, invkind, core::mem::transmute(pbstrdllname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbstrname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pwordinal)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDllEntry)(windows_core::Interface::as_raw(self), memid, invkind, pbstrdllname.unwrap_or(core::mem::zeroed()) as _, pbstrname.unwrap_or(core::mem::zeroed()) as _, pwordinal as _).ok() } } pub unsafe fn GetRefTypeInfo(&self, hreftype: u32) -> windows_core::Result { unsafe { @@ -9528,7 +9516,7 @@ impl ITypeInfo { } } pub unsafe fn AddressOfMember(&self, memid: i32, invkind: INVOKEKIND, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AddressOfMember)(windows_core::Interface::as_raw(self), memid, invkind, core::mem::transmute(ppv)).ok() } + unsafe { (windows_core::Interface::vtable(self).AddressOfMember)(windows_core::Interface::as_raw(self), memid, invkind, ppv as _).ok() } } pub unsafe fn CreateInstance(&self, punkouter: P0) -> windows_core::Result where @@ -9545,7 +9533,7 @@ impl ITypeInfo { } } pub unsafe fn GetContainingTypeLib(&self, pptlib: *mut Option, pindex: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetContainingTypeLib)(windows_core::Interface::as_raw(self), core::mem::transmute(pptlib), core::mem::transmute(pindex)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetContainingTypeLib)(windows_core::Interface::as_raw(self), core::mem::transmute(pptlib), pindex as _).ok() } } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn ReleaseTypeAttr(&self, ptypeattr: *const TYPEATTR) { @@ -9889,7 +9877,7 @@ impl ITypeInfo2 { } } 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetDocumentation2)(windows_core::Interface::as_raw(self), memid, lcid, core::mem::transmute(pbstrhelpstring.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwhelpstringcontext), core::mem::transmute(pbstrhelpstringdll.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDocumentation2)(windows_core::Interface::as_raw(self), memid, lcid, pbstrhelpstring.unwrap_or(core::mem::zeroed()) as _, pdwhelpstringcontext as _, pbstrhelpstringdll.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetAllCustData(&self) -> windows_core::Result { @@ -10233,13 +10221,13 @@ impl ITypeLib { } } 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetDocumentation)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).GetDocumentation)(windows_core::Interface::as_raw(self), index, pbstrname.unwrap_or(core::mem::zeroed()) as _, pbstrdocstring.unwrap_or(core::mem::zeroed()) as _, pdwhelpcontext as _, pbstrhelpfile.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn IsName(&self, sznamebuf: windows_core::PWSTR, lhashval: u32, pfname: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsName)(windows_core::Interface::as_raw(self), core::mem::transmute(sznamebuf), lhashval, core::mem::transmute(pfname)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsName)(windows_core::Interface::as_raw(self), core::mem::transmute(sznamebuf), lhashval, pfname as _).ok() } } pub unsafe fn FindName(&self, sznamebuf: windows_core::PWSTR, lhashval: u32, pptinfo: *mut Option, rgmemid: *mut i32, pcfound: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).FindName)(windows_core::Interface::as_raw(self), core::mem::transmute(sznamebuf), lhashval, core::mem::transmute(pptinfo), core::mem::transmute(rgmemid), core::mem::transmute(pcfound)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindName)(windows_core::Interface::as_raw(self), core::mem::transmute(sznamebuf), lhashval, core::mem::transmute(pptinfo), rgmemid as _, pcfound as _).ok() } } pub unsafe fn ReleaseTLibAttr(&self, ptlibattr: *const TLIBATTR) { unsafe { (windows_core::Interface::vtable(self).ReleaseTLibAttr)(windows_core::Interface::as_raw(self), ptlibattr) } @@ -10399,10 +10387,10 @@ impl ITypeLib2 { } } pub unsafe fn GetLibStatistics(&self, pcuniquenames: *mut u32, pcchuniquenames: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLibStatistics)(windows_core::Interface::as_raw(self), core::mem::transmute(pcuniquenames), core::mem::transmute(pcchuniquenames)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLibStatistics)(windows_core::Interface::as_raw(self), pcuniquenames as _, pcchuniquenames as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetDocumentation2)(windows_core::Interface::as_raw(self), index, lcid, core::mem::transmute(pbstrhelpstring.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwhelpstringcontext), core::mem::transmute(pbstrhelpstringdll.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDocumentation2)(windows_core::Interface::as_raw(self), index, lcid, pbstrhelpstring.unwrap_or(core::mem::zeroed()) as _, pdwhelpstringcontext as _, pbstrhelpstringdll.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetAllCustData(&self) -> windows_core::Result { @@ -10721,10 +10709,10 @@ impl IUri { unsafe { (windows_core::Interface::vtable(self).GetPropertyBSTR)(windows_core::Interface::as_raw(self), uriprop, core::mem::transmute(pbstrproperty), dwflags).ok() } } pub unsafe fn GetPropertyLength(&self, uriprop: Uri_PROPERTY, pcchproperty: *mut u32, dwflags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPropertyLength)(windows_core::Interface::as_raw(self), uriprop, core::mem::transmute(pcchproperty), dwflags).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropertyLength)(windows_core::Interface::as_raw(self), uriprop, pcchproperty as _, dwflags).ok() } } pub unsafe fn GetPropertyDWORD(&self, uriprop: Uri_PROPERTY, pdwproperty: *mut u32, dwflags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPropertyDWORD)(windows_core::Interface::as_raw(self), uriprop, core::mem::transmute(pdwproperty), dwflags).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropertyDWORD)(windows_core::Interface::as_raw(self), uriprop, pdwproperty as _, dwflags).ok() } } pub unsafe fn HasProperty(&self, uriprop: Uri_PROPERTY) -> windows_core::Result { unsafe { @@ -11270,28 +11258,28 @@ impl IUriBuilder { unsafe { (windows_core::Interface::vtable(self).SetIUri)(windows_core::Interface::as_raw(self), piuri.param().abi()).ok() } } pub unsafe fn GetFragment(&self, pcchfragment: *mut u32, ppwzfragment: *mut windows_core::PCWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFragment)(windows_core::Interface::as_raw(self), core::mem::transmute(pcchfragment), core::mem::transmute(ppwzfragment)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFragment)(windows_core::Interface::as_raw(self), pcchfragment as _, ppwzfragment as _).ok() } } pub unsafe fn GetHost(&self, pcchhost: *mut u32, ppwzhost: *mut windows_core::PCWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetHost)(windows_core::Interface::as_raw(self), core::mem::transmute(pcchhost), core::mem::transmute(ppwzhost)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetHost)(windows_core::Interface::as_raw(self), pcchhost as _, ppwzhost as _).ok() } } pub unsafe fn GetPassword(&self, pcchpassword: *mut u32, ppwzpassword: *mut windows_core::PCWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPassword)(windows_core::Interface::as_raw(self), core::mem::transmute(pcchpassword), core::mem::transmute(ppwzpassword)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPassword)(windows_core::Interface::as_raw(self), pcchpassword as _, ppwzpassword as _).ok() } } pub unsafe fn GetPath(&self, pcchpath: *mut u32, ppwzpath: *mut windows_core::PCWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPath)(windows_core::Interface::as_raw(self), core::mem::transmute(pcchpath), core::mem::transmute(ppwzpath)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPath)(windows_core::Interface::as_raw(self), pcchpath as _, ppwzpath as _).ok() } } pub unsafe fn GetPort(&self, pfhasport: *mut super::super::Foundation::BOOL, pdwport: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPort)(windows_core::Interface::as_raw(self), core::mem::transmute(pfhasport), core::mem::transmute(pdwport)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPort)(windows_core::Interface::as_raw(self), pfhasport as _, pdwport as _).ok() } } pub unsafe fn GetQuery(&self, pcchquery: *mut u32, ppwzquery: *mut windows_core::PCWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetQuery)(windows_core::Interface::as_raw(self), core::mem::transmute(pcchquery), core::mem::transmute(ppwzquery)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetQuery)(windows_core::Interface::as_raw(self), pcchquery as _, ppwzquery as _).ok() } } pub unsafe fn GetSchemeName(&self, pcchschemename: *mut u32, ppwzschemename: *mut windows_core::PCWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSchemeName)(windows_core::Interface::as_raw(self), core::mem::transmute(pcchschemename), core::mem::transmute(ppwzschemename)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSchemeName)(windows_core::Interface::as_raw(self), pcchschemename as _, ppwzschemename as _).ok() } } pub unsafe fn GetUserName(&self, pcchusername: *mut u32, ppwzusername: *mut windows_core::PCWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetUserName)(windows_core::Interface::as_raw(self), core::mem::transmute(pcchusername), core::mem::transmute(ppwzusername)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUserName)(windows_core::Interface::as_raw(self), pcchusername as _, ppwzusername as _).ok() } } pub unsafe fn SetFragment(&self, pwznewvalue: P0) -> windows_core::Result<()> where 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 70c0a2b5dd..df1e7d62f7 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ComponentServices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ComponentServices/mod.rs @@ -4,7 +4,7 @@ where P0: windows_core::Param, { windows_targets::link!("comsvcs.dll" "system" fn CoCreateActivity(piunknown : * mut core::ffi::c_void, riid : *const windows_core::GUID, ppobj : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { CoCreateActivity(piunknown.param().abi(), riid, core::mem::transmute(ppobj)).ok() } + unsafe { CoCreateActivity(piunknown.param().abi(), riid, ppobj as _).ok() } } #[inline] pub unsafe fn CoEnterServiceDomain(pconfigobject: P0) -> windows_core::Result<()> @@ -18,7 +18,7 @@ where #[inline] pub unsafe fn CoGetDefaultContext(apttype: super::Com::APTTYPE, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("ole32.dll" "system" fn CoGetDefaultContext(apttype : super::Com:: APTTYPE, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { CoGetDefaultContext(apttype, riid, core::mem::transmute(ppv)).ok() } + unsafe { CoGetDefaultContext(apttype, riid, ppv as _).ok() } } #[inline] pub unsafe fn CoLeaveServiceDomain(punkstatus: P0) @@ -39,12 +39,12 @@ pub unsafe fn GetDispenserManager() -> windows_core::Result { #[inline] pub unsafe fn GetManagedExtensions(dwexts: *mut u32) -> windows_core::Result<()> { windows_targets::link!("comsvcs.dll" "system" fn GetManagedExtensions(dwexts : *mut u32) -> windows_core::HRESULT); - unsafe { GetManagedExtensions(core::mem::transmute(dwexts)).ok() } + unsafe { GetManagedExtensions(dwexts as _).ok() } } #[inline] pub unsafe fn MTSCreateActivity(riid: *const windows_core::GUID, ppobj: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("comsvcs.dll" "system" fn MTSCreateActivity(riid : *const windows_core::GUID, ppobj : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { MTSCreateActivity(riid, core::mem::transmute(ppobj)).ok() } + unsafe { MTSCreateActivity(riid, ppobj as _).ok() } } #[inline] pub unsafe fn RecycleSurrogate(lreasoncode: i32) -> windows_core::Result<()> { @@ -953,13 +953,13 @@ impl IAppDomainHelper { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), punkad.param().abi(), __midl__iappdomainhelper0000, core::mem::transmute(ppool)).ok() } + unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), punkad.param().abi(), __midl__iappdomainhelper0000, ppool as _).ok() } } pub unsafe fn DoCallback(&self, punkad: P0, __midl__iappdomainhelper0001: isize, ppool: *mut core::ffi::c_void) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DoCallback)(windows_core::Interface::as_raw(self), punkad.param().abi(), __midl__iappdomainhelper0001, core::mem::transmute(ppool)).ok() } + unsafe { (windows_core::Interface::vtable(self).DoCallback)(windows_core::Interface::as_raw(self), punkad.param().abi(), __midl__iappdomainhelper0001, ppool as _).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -1168,7 +1168,7 @@ impl ICOMAdminCatalog { } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetMultipleComponentsInfo(&self, bstrapplidorname: &windows_core::BSTR, ppsavarfilenames: *const *const super::Com::SAFEARRAY, ppsavarclsids: *mut *mut super::Com::SAFEARRAY, ppsavarclassnames: *mut *mut super::Com::SAFEARRAY, ppsavarfileflags: *mut *mut super::Com::SAFEARRAY, ppsavarcomponentflags: *mut *mut super::Com::SAFEARRAY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMultipleComponentsInfo)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrapplidorname), ppsavarfilenames, core::mem::transmute(ppsavarclsids), core::mem::transmute(ppsavarclassnames), core::mem::transmute(ppsavarfileflags), core::mem::transmute(ppsavarcomponentflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMultipleComponentsInfo)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrapplidorname), ppsavarfilenames, ppsavarclsids as _, ppsavarclassnames as _, ppsavarfileflags as _, ppsavarcomponentflags as _).ok() } } pub unsafe fn RefreshComponents(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RefreshComponents)(windows_core::Interface::as_raw(self)).ok() } @@ -1181,7 +1181,7 @@ impl ICOMAdminCatalog { } #[cfg(feature = "Win32_System_Com")] pub unsafe fn QueryApplicationFile(&self, bstrapplicationfile: &windows_core::BSTR, pbstrapplicationname: *mut windows_core::BSTR, pbstrapplicationdescription: *mut windows_core::BSTR, pbhasusers: *mut super::super::Foundation::VARIANT_BOOL, pbisproxy: *mut super::super::Foundation::VARIANT_BOOL, ppsavarfilenames: *mut *mut super::Com::SAFEARRAY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryApplicationFile)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrapplicationfile), core::mem::transmute(pbstrapplicationname), core::mem::transmute(pbstrapplicationdescription), core::mem::transmute(pbhasusers), core::mem::transmute(pbisproxy), core::mem::transmute(ppsavarfilenames)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryApplicationFile)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrapplicationfile), core::mem::transmute(pbstrapplicationname), core::mem::transmute(pbstrapplicationdescription), pbhasusers as _, pbisproxy as _, ppsavarfilenames as _).ok() } } pub unsafe fn StartApplication(&self, bstrapplidorname: &windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).StartApplication)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrapplidorname)).ok() } @@ -1201,7 +1201,7 @@ impl ICOMAdminCatalog { } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetEventClassesForIID(&self, bstriid: &windows_core::BSTR, ppsavarclsids: *mut *mut super::Com::SAFEARRAY, ppsavarprogids: *mut *mut super::Com::SAFEARRAY, ppsavardescriptions: *mut *mut super::Com::SAFEARRAY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEventClassesForIID)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstriid), core::mem::transmute(ppsavarclsids), core::mem::transmute(ppsavarprogids), core::mem::transmute(ppsavardescriptions)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventClassesForIID)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstriid), ppsavarclsids as _, ppsavarprogids as _, ppsavardescriptions as _).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -2098,10 +2098,10 @@ windows_core::imp::define_interface!(ICOMLBArguments, ICOMLBArguments_Vtbl, 0x3a windows_core::imp::interface_hierarchy!(ICOMLBArguments, windows_core::IUnknown); impl ICOMLBArguments { pub unsafe fn GetCLSID(&self, pclsid: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCLSID)(windows_core::Interface::as_raw(self), core::mem::transmute(pclsid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCLSID)(windows_core::Interface::as_raw(self), pclsid as _).ok() } } pub unsafe fn SetCLSID(&self, pclsid: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetCLSID)(windows_core::Interface::as_raw(self), core::mem::transmute(pclsid)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetCLSID)(windows_core::Interface::as_raw(self), pclsid as _).ok() } } pub unsafe fn GetMachineName(&self, szservername: &mut [u16]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetMachineName)(windows_core::Interface::as_raw(self), szservername.len().try_into().unwrap(), core::mem::transmute(szservername.as_ptr())).ok() } @@ -4810,7 +4810,7 @@ impl IComTrackingInfoCollection { } } pub unsafe fn Item(&self, ulindex: u32, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Item)(windows_core::Interface::as_raw(self), ulindex, riid, core::mem::transmute(ppv)).ok() } + unsafe { (windows_core::Interface::vtable(self).Item)(windows_core::Interface::as_raw(self), ulindex, riid, ppv as _).ok() } } } #[repr(C)] @@ -5193,7 +5193,7 @@ windows_core::imp::define_interface!(IContextProperties, IContextProperties_Vtbl windows_core::imp::interface_hierarchy!(IContextProperties, windows_core::IUnknown); impl IContextProperties { pub unsafe fn Count(&self, plcount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Count)(windows_core::Interface::as_raw(self), core::mem::transmute(plcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).Count)(windows_core::Interface::as_raw(self), plcount as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetProperty(&self, name: &windows_core::BSTR, pproperty: *mut super::Variant::VARIANT) -> windows_core::Result<()> { @@ -5294,7 +5294,7 @@ windows_core::imp::define_interface!(IContextSecurityPerimeter, IContextSecurity windows_core::imp::interface_hierarchy!(IContextSecurityPerimeter, windows_core::IUnknown); impl IContextSecurityPerimeter { pub unsafe fn GetPerimeterFlag(&self, pflag: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPerimeterFlag)(windows_core::Interface::as_raw(self), core::mem::transmute(pflag)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPerimeterFlag)(windows_core::Interface::as_raw(self), pflag as _).ok() } } pub unsafe fn SetPerimeterFlag(&self, fflag: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetPerimeterFlag)(windows_core::Interface::as_raw(self), fflag.into()).ok() } @@ -5342,13 +5342,13 @@ impl IContextState { unsafe { (windows_core::Interface::vtable(self).SetDeactivateOnReturn)(windows_core::Interface::as_raw(self), bdeactivate).ok() } } pub unsafe fn GetDeactivateOnReturn(&self, pbdeactivate: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeactivateOnReturn)(windows_core::Interface::as_raw(self), core::mem::transmute(pbdeactivate)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeactivateOnReturn)(windows_core::Interface::as_raw(self), pbdeactivate as _).ok() } } pub unsafe fn SetMyTransactionVote(&self, txvote: TransactionVote) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetMyTransactionVote)(windows_core::Interface::as_raw(self), txvote).ok() } } pub unsafe fn GetMyTransactionVote(&self, ptxvote: *mut TransactionVote) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMyTransactionVote)(windows_core::Interface::as_raw(self), core::mem::transmute(ptxvote)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMyTransactionVote)(windows_core::Interface::as_raw(self), ptxvote as _).ok() } } } #[repr(C)] @@ -5411,7 +5411,7 @@ impl ICreateWithLocalTransaction { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateInstanceWithSysTx)(windows_core::Interface::as_raw(self), ptransaction.param().abi(), rclsid, riid, core::mem::transmute(pobject)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateInstanceWithSysTx)(windows_core::Interface::as_raw(self), ptransaction.param().abi(), rclsid, riid, pobject as _).ok() } } } #[repr(C)] @@ -6451,7 +6451,7 @@ impl ICrmMonitorLogRecords { } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetLogRecord(&self, dwindex: u32, pcrmlogrec: *mut CrmLogRecordRead) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLogRecord)(windows_core::Interface::as_raw(self), dwindex, core::mem::transmute(pcrmlogrec)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLogRecord)(windows_core::Interface::as_raw(self), dwindex, pcrmlogrec as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetLogRecordVariants(&self, indexnumber: &super::Variant::VARIANT) -> windows_core::Result { @@ -6560,10 +6560,10 @@ windows_core::imp::define_interface!(IDispenserDriver, IDispenserDriver_Vtbl, 0x windows_core::imp::interface_hierarchy!(IDispenserDriver, windows_core::IUnknown); impl IDispenserDriver { pub unsafe fn CreateResource(&self, restypid: usize, presid: *mut usize, psecsfreebeforedestroy: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateResource)(windows_core::Interface::as_raw(self), restypid, core::mem::transmute(presid), core::mem::transmute(psecsfreebeforedestroy)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateResource)(windows_core::Interface::as_raw(self), restypid, presid as _, psecsfreebeforedestroy as _).ok() } } pub unsafe fn RateResource(&self, restypid: usize, resid: usize, frequirestransactionenlistment: bool, prating: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RateResource)(windows_core::Interface::as_raw(self), restypid, resid, frequirestransactionenlistment.into(), core::mem::transmute(prating)).ok() } + unsafe { (windows_core::Interface::vtable(self).RateResource)(windows_core::Interface::as_raw(self), restypid, resid, frequirestransactionenlistment.into(), prating as _).ok() } } pub unsafe fn EnlistResource(&self, resid: usize, transid: usize) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).EnlistResource)(windows_core::Interface::as_raw(self), resid, transid).ok() } @@ -6575,7 +6575,7 @@ impl IDispenserDriver { unsafe { (windows_core::Interface::vtable(self).DestroyResource)(windows_core::Interface::as_raw(self), resid).ok() } } pub unsafe fn DestroyResourceS(&self, resid: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DestroyResourceS)(windows_core::Interface::as_raw(self), core::mem::transmute(resid)).ok() } + unsafe { (windows_core::Interface::vtable(self).DestroyResourceS)(windows_core::Interface::as_raw(self), resid as _).ok() } } } #[repr(C)] @@ -6663,7 +6663,7 @@ impl IDispenserManager { } } pub unsafe fn GetContext(&self, __midl__idispensermanager0002: *mut usize, __midl__idispensermanager0003: *mut usize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetContext)(windows_core::Interface::as_raw(self), core::mem::transmute(__midl__idispensermanager0002), core::mem::transmute(__midl__idispensermanager0003)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetContext)(windows_core::Interface::as_raw(self), __midl__idispensermanager0002 as _, __midl__idispensermanager0003 as _).ok() } } } #[repr(C)] @@ -6711,7 +6711,7 @@ windows_core::imp::define_interface!(IEnumNames, IEnumNames_Vtbl, 0x51372af2_cae windows_core::imp::interface_hierarchy!(IEnumNames, windows_core::IUnknown); impl IEnumNames { pub unsafe fn Next(&self, celt: u32, rgname: *mut windows_core::BSTR, pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(rgname), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(rgname), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -6805,7 +6805,7 @@ impl IEventServerTrace { unsafe { (windows_core::Interface::vtable(self).StopTraceGuid)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrguidevent), core::mem::transmute_copy(bstrguidfilter), lpidfilter).ok() } } pub unsafe fn EnumTraceGuid(&self, plcntguids: *mut i32, pbstrguidlist: *mut windows_core::BSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumTraceGuid)(windows_core::Interface::as_raw(self), core::mem::transmute(plcntguids), core::mem::transmute(pbstrguidlist)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumTraceGuid)(windows_core::Interface::as_raw(self), plcntguids as _, core::mem::transmute(pbstrguidlist)).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -6860,19 +6860,19 @@ windows_core::imp::define_interface!(IGetAppTrackerData, IGetAppTrackerData_Vtbl windows_core::imp::interface_hierarchy!(IGetAppTrackerData, windows_core::IUnknown); impl IGetAppTrackerData { pub unsafe fn GetApplicationProcesses(&self, partitionid: *const windows_core::GUID, applicationid: *const windows_core::GUID, flags: u32, numapplicationprocesses: *mut u32, applicationprocesses: *mut *mut ApplicationProcessSummary) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetApplicationProcesses)(windows_core::Interface::as_raw(self), partitionid, applicationid, flags, core::mem::transmute(numapplicationprocesses), core::mem::transmute(applicationprocesses)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetApplicationProcesses)(windows_core::Interface::as_raw(self), partitionid, applicationid, flags, numapplicationprocesses as _, applicationprocesses as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetApplicationProcessDetails)(windows_core::Interface::as_raw(self), applicationinstanceid, processid, 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() } + unsafe { (windows_core::Interface::vtable(self).GetApplicationProcessDetails)(windows_core::Interface::as_raw(self), applicationinstanceid, processid, flags, summary.unwrap_or(core::mem::zeroed()) as _, statistics.unwrap_or(core::mem::zeroed()) as _, recycleinfo.unwrap_or(core::mem::zeroed()) as _, anycomponentshangmonitored.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetApplicationsInProcess)(windows_core::Interface::as_raw(self), applicationinstanceid, processid, partitionid, flags, core::mem::transmute(numapplicationsinprocess), core::mem::transmute(applications)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetApplicationsInProcess)(windows_core::Interface::as_raw(self), applicationinstanceid, processid, partitionid, flags, numapplicationsinprocess as _, applications as _).ok() } } pub unsafe fn GetComponentsInProcess(&self, applicationinstanceid: *const windows_core::GUID, processid: u32, partitionid: *const windows_core::GUID, applicationid: *const windows_core::GUID, flags: u32, numcomponentsinprocess: *mut u32, components: *mut *mut ComponentSummary) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetComponentsInProcess)(windows_core::Interface::as_raw(self), applicationinstanceid, processid, partitionid, applicationid, flags, core::mem::transmute(numcomponentsinprocess), core::mem::transmute(components)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetComponentsInProcess)(windows_core::Interface::as_raw(self), applicationinstanceid, processid, partitionid, applicationid, flags, numcomponentsinprocess as _, components as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetComponentDetails)(windows_core::Interface::as_raw(self), applicationinstanceid, processid, clsid, 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() } + unsafe { (windows_core::Interface::vtable(self).GetComponentDetails)(windows_core::Interface::as_raw(self), applicationinstanceid, processid, clsid, flags, summary.unwrap_or(core::mem::zeroed()) as _, statistics.unwrap_or(core::mem::zeroed()) as _, hangmonitorinfo.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetTrackerDataAsCollectionObject(&self) -> windows_core::Result { unsafe { @@ -6983,7 +6983,7 @@ windows_core::imp::define_interface!(IGetContextProperties, IGetContextPropertie windows_core::imp::interface_hierarchy!(IGetContextProperties, windows_core::IUnknown); impl IGetContextProperties { pub unsafe fn Count(&self, plcount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Count)(windows_core::Interface::as_raw(self), core::mem::transmute(plcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).Count)(windows_core::Interface::as_raw(self), plcount as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetProperty(&self, name: &windows_core::BSTR, pproperty: *mut super::Variant::VARIANT) -> windows_core::Result<()> { @@ -7109,7 +7109,7 @@ windows_core::imp::define_interface!(IHolder, IHolder_Vtbl, 0xbf6a1850_2b45_11cf windows_core::imp::interface_hierarchy!(IHolder, windows_core::IUnknown); impl IHolder { pub unsafe fn AllocResource(&self, __midl__iholder0000: usize, __midl__iholder0001: *mut usize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AllocResource)(windows_core::Interface::as_raw(self), __midl__iholder0000, core::mem::transmute(__midl__iholder0001)).ok() } + unsafe { (windows_core::Interface::vtable(self).AllocResource)(windows_core::Interface::as_raw(self), __midl__iholder0000, __midl__iholder0001 as _).ok() } } pub unsafe fn FreeResource(&self, __midl__iholder0002: usize) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).FreeResource)(windows_core::Interface::as_raw(self), __midl__iholder0002).ok() } @@ -7118,13 +7118,13 @@ impl IHolder { unsafe { (windows_core::Interface::vtable(self).TrackResource)(windows_core::Interface::as_raw(self), __midl__iholder0003).ok() } } pub unsafe fn TrackResourceS(&self, __midl__iholder0004: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TrackResourceS)(windows_core::Interface::as_raw(self), core::mem::transmute(__midl__iholder0004)).ok() } + unsafe { (windows_core::Interface::vtable(self).TrackResourceS)(windows_core::Interface::as_raw(self), __midl__iholder0004 as _).ok() } } pub unsafe fn UntrackResource(&self, __midl__iholder0005: usize, __midl__iholder0006: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UntrackResource)(windows_core::Interface::as_raw(self), __midl__iholder0005, __midl__iholder0006.into()).ok() } } pub unsafe fn UntrackResourceS(&self, __midl__iholder0007: *mut u16, __midl__iholder0008: bool) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).UntrackResourceS)(windows_core::Interface::as_raw(self), core::mem::transmute(__midl__iholder0007), __midl__iholder0008.into()).ok() } + unsafe { (windows_core::Interface::vtable(self).UntrackResourceS)(windows_core::Interface::as_raw(self), __midl__iholder0007 as _, __midl__iholder0008.into()).ok() } } pub unsafe fn Close(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() } @@ -8376,7 +8376,7 @@ windows_core::imp::define_interface!(IObjectContext, IObjectContext_Vtbl, 0x5137 windows_core::imp::interface_hierarchy!(IObjectContext, windows_core::IUnknown); impl IObjectContext { pub unsafe fn CreateInstance(&self, rclsid: *const windows_core::GUID, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateInstance)(windows_core::Interface::as_raw(self), rclsid, riid, core::mem::transmute(ppv)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateInstance)(windows_core::Interface::as_raw(self), rclsid, riid, ppv as _).ok() } } pub unsafe fn SetComplete(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetComplete)(windows_core::Interface::as_raw(self)).ok() } @@ -8397,7 +8397,7 @@ impl IObjectContext { unsafe { (windows_core::Interface::vtable(self).IsSecurityEnabled)(windows_core::Interface::as_raw(self)) } } pub unsafe fn IsCallerInRole(&self, bstrrole: &windows_core::BSTR, pfisinrole: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsCallerInRole)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrrole), core::mem::transmute(pfisinrole)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsCallerInRole)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrrole), pfisinrole as _).ok() } } } #[repr(C)] @@ -8493,7 +8493,7 @@ windows_core::imp::define_interface!(IObjectContextActivity, IObjectContextActiv windows_core::imp::interface_hierarchy!(IObjectContextActivity, windows_core::IUnknown); impl IObjectContextActivity { pub unsafe fn GetActivityId(&self, pguid: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetActivityId)(windows_core::Interface::as_raw(self), core::mem::transmute(pguid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetActivityId)(windows_core::Interface::as_raw(self), pguid as _).ok() } } } #[repr(C)] @@ -8532,13 +8532,13 @@ impl IObjectContextInfo { } } pub unsafe fn GetTransactionId(&self, pguid: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTransactionId)(windows_core::Interface::as_raw(self), core::mem::transmute(pguid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTransactionId)(windows_core::Interface::as_raw(self), pguid as _).ok() } } pub unsafe fn GetActivityId(&self, pguid: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetActivityId)(windows_core::Interface::as_raw(self), core::mem::transmute(pguid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetActivityId)(windows_core::Interface::as_raw(self), pguid as _).ok() } } pub unsafe fn GetContextId(&self, pguid: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetContextId)(windows_core::Interface::as_raw(self), core::mem::transmute(pguid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetContextId)(windows_core::Interface::as_raw(self), pguid as _).ok() } } } #[repr(C)] @@ -8619,13 +8619,13 @@ impl core::ops::Deref for IObjectContextInfo2 { windows_core::imp::interface_hierarchy!(IObjectContextInfo2, windows_core::IUnknown, IObjectContextInfo); impl IObjectContextInfo2 { pub unsafe fn GetPartitionId(&self, pguid: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPartitionId)(windows_core::Interface::as_raw(self), core::mem::transmute(pguid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPartitionId)(windows_core::Interface::as_raw(self), pguid as _).ok() } } pub unsafe fn GetApplicationId(&self, pguid: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetApplicationId)(windows_core::Interface::as_raw(self), core::mem::transmute(pguid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetApplicationId)(windows_core::Interface::as_raw(self), pguid as _).ok() } } pub unsafe fn GetApplicationInstanceId(&self, pguid: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetApplicationInstanceId)(windows_core::Interface::as_raw(self), core::mem::transmute(pguid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetApplicationInstanceId)(windows_core::Interface::as_raw(self), pguid as _).ok() } } } #[repr(C)] @@ -9266,19 +9266,19 @@ windows_core::imp::interface_hierarchy!(ISecurityProperty, windows_core::IUnknow impl ISecurityProperty { #[cfg(feature = "Win32_Security")] pub unsafe fn GetDirectCreatorSID(&self, psid: *mut super::super::Security::PSID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDirectCreatorSID)(windows_core::Interface::as_raw(self), core::mem::transmute(psid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDirectCreatorSID)(windows_core::Interface::as_raw(self), psid as _).ok() } } #[cfg(feature = "Win32_Security")] pub unsafe fn GetOriginalCreatorSID(&self, psid: *mut super::super::Security::PSID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOriginalCreatorSID)(windows_core::Interface::as_raw(self), core::mem::transmute(psid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOriginalCreatorSID)(windows_core::Interface::as_raw(self), psid as _).ok() } } #[cfg(feature = "Win32_Security")] pub unsafe fn GetDirectCallerSID(&self, psid: *mut super::super::Security::PSID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDirectCallerSID)(windows_core::Interface::as_raw(self), core::mem::transmute(psid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDirectCallerSID)(windows_core::Interface::as_raw(self), psid as _).ok() } } #[cfg(feature = "Win32_Security")] pub unsafe fn GetOriginalCallerSID(&self, psid: *mut super::super::Security::PSID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOriginalCallerSID)(windows_core::Interface::as_raw(self), core::mem::transmute(psid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOriginalCallerSID)(windows_core::Interface::as_raw(self), psid as _).ok() } } #[cfg(feature = "Win32_Security")] pub unsafe fn ReleaseSID(&self, psid: super::super::Security::PSID) -> windows_core::Result<()> { @@ -9704,7 +9704,7 @@ impl IServicePool { unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), ppoolconfig.param().abi()).ok() } } pub unsafe fn GetObject(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetObject)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(ppv)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetObject)(windows_core::Interface::as_raw(self), riid, ppv as _).ok() } } pub unsafe fn Shutdown(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Shutdown)(windows_core::Interface::as_raw(self)).ok() } @@ -9761,25 +9761,25 @@ impl IServicePoolConfig { unsafe { (windows_core::Interface::vtable(self).SetMaxPoolSize)(windows_core::Interface::as_raw(self), dwmaxpool).ok() } } pub unsafe fn MaxPoolSize(&self, pdwmaxpool: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).MaxPoolSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmaxpool)).ok() } + unsafe { (windows_core::Interface::vtable(self).MaxPoolSize)(windows_core::Interface::as_raw(self), pdwmaxpool as _).ok() } } pub unsafe fn SetMinPoolSize(&self, dwminpool: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetMinPoolSize)(windows_core::Interface::as_raw(self), dwminpool).ok() } } pub unsafe fn MinPoolSize(&self, pdwminpool: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).MinPoolSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwminpool)).ok() } + unsafe { (windows_core::Interface::vtable(self).MinPoolSize)(windows_core::Interface::as_raw(self), pdwminpool as _).ok() } } pub unsafe fn SetCreationTimeout(&self, dwcreationtimeout: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetCreationTimeout)(windows_core::Interface::as_raw(self), dwcreationtimeout).ok() } } pub unsafe fn CreationTimeout(&self, pdwcreationtimeout: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreationTimeout)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwcreationtimeout)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreationTimeout)(windows_core::Interface::as_raw(self), pdwcreationtimeout as _).ok() } } pub unsafe fn SetTransactionAffinity(&self, ftxaffinity: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetTransactionAffinity)(windows_core::Interface::as_raw(self), ftxaffinity.into()).ok() } } pub unsafe fn TransactionAffinity(&self, pftxaffinity: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TransactionAffinity)(windows_core::Interface::as_raw(self), core::mem::transmute(pftxaffinity)).ok() } + unsafe { (windows_core::Interface::vtable(self).TransactionAffinity)(windows_core::Interface::as_raw(self), pftxaffinity as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn SetClassFactory(&self, pfactory: P0) -> windows_core::Result<()> @@ -10351,7 +10351,7 @@ windows_core::imp::interface_hierarchy!(ISharedPropertyGroup, windows_core::IUnk #[cfg(feature = "Win32_System_Com")] impl ISharedPropertyGroup { pub unsafe fn CreatePropertyByPosition(&self, index: i32, fexists: *mut super::super::Foundation::VARIANT_BOOL, ppprop: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreatePropertyByPosition)(windows_core::Interface::as_raw(self), index, core::mem::transmute(fexists), core::mem::transmute(ppprop)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreatePropertyByPosition)(windows_core::Interface::as_raw(self), index, fexists as _, core::mem::transmute(ppprop)).ok() } } pub unsafe fn get_PropertyByPosition(&self, index: i32) -> windows_core::Result { unsafe { @@ -10360,7 +10360,7 @@ impl ISharedPropertyGroup { } } pub unsafe fn CreateProperty(&self, name: &windows_core::BSTR, fexists: *mut super::super::Foundation::VARIANT_BOOL, ppprop: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateProperty)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(name), core::mem::transmute(fexists), core::mem::transmute(ppprop)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateProperty)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(name), fexists as _, core::mem::transmute(ppprop)).ok() } } pub unsafe fn get_Property(&self, name: &windows_core::BSTR) -> windows_core::Result { unsafe { @@ -10452,7 +10452,7 @@ windows_core::imp::interface_hierarchy!(ISharedPropertyGroupManager, windows_cor #[cfg(feature = "Win32_System_Com")] impl ISharedPropertyGroupManager { pub unsafe fn CreatePropertyGroup(&self, name: &windows_core::BSTR, dwisomode: *mut i32, dwrelmode: *mut i32, fexists: *mut super::super::Foundation::VARIANT_BOOL, ppgroup: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreatePropertyGroup)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(name), core::mem::transmute(dwisomode), core::mem::transmute(dwrelmode), core::mem::transmute(fexists), core::mem::transmute(ppgroup)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreatePropertyGroup)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(name), dwisomode as _, dwrelmode as _, fexists as _, core::mem::transmute(ppgroup)).ok() } } pub unsafe fn get_Group(&self, name: &windows_core::BSTR) -> windows_core::Result { unsafe { @@ -10576,25 +10576,25 @@ windows_core::imp::define_interface!(IThreadPoolKnobs, IThreadPoolKnobs_Vtbl, 0x windows_core::imp::interface_hierarchy!(IThreadPoolKnobs, windows_core::IUnknown); impl IThreadPoolKnobs { pub unsafe fn GetMaxThreads(&self, plcmaxthreads: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMaxThreads)(windows_core::Interface::as_raw(self), core::mem::transmute(plcmaxthreads)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMaxThreads)(windows_core::Interface::as_raw(self), plcmaxthreads as _).ok() } } pub unsafe fn GetCurrentThreads(&self, plccurrentthreads: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrentThreads)(windows_core::Interface::as_raw(self), core::mem::transmute(plccurrentthreads)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentThreads)(windows_core::Interface::as_raw(self), plccurrentthreads as _).ok() } } pub unsafe fn SetMaxThreads(&self, lcmaxthreads: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetMaxThreads)(windows_core::Interface::as_raw(self), lcmaxthreads).ok() } } pub unsafe fn GetDeleteDelay(&self, pmsecdeletedelay: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeleteDelay)(windows_core::Interface::as_raw(self), core::mem::transmute(pmsecdeletedelay)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeleteDelay)(windows_core::Interface::as_raw(self), pmsecdeletedelay as _).ok() } } pub unsafe fn SetDeleteDelay(&self, msecdeletedelay: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetDeleteDelay)(windows_core::Interface::as_raw(self), msecdeletedelay).ok() } } pub unsafe fn GetMaxQueuedRequests(&self, plcmaxqueuedrequests: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMaxQueuedRequests)(windows_core::Interface::as_raw(self), core::mem::transmute(plcmaxqueuedrequests)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMaxQueuedRequests)(windows_core::Interface::as_raw(self), plcmaxqueuedrequests as _).ok() } } pub unsafe fn GetCurrentQueuedRequests(&self, plccurrentqueuedrequests: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrentQueuedRequests)(windows_core::Interface::as_raw(self), core::mem::transmute(plccurrentqueuedrequests)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentQueuedRequests)(windows_core::Interface::as_raw(self), plccurrentqueuedrequests as _).ok() } } pub unsafe fn SetMaxQueuedRequests(&self, lcmaxqueuedrequests: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetMaxQueuedRequests)(windows_core::Interface::as_raw(self), lcmaxqueuedrequests).ok() } @@ -11131,13 +11131,13 @@ impl ITransactionProxy { } } pub unsafe fn GetIsolationLevel(&self, __midl__itransactionproxy0000: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIsolationLevel)(windows_core::Interface::as_raw(self), core::mem::transmute(__midl__itransactionproxy0000)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIsolationLevel)(windows_core::Interface::as_raw(self), __midl__itransactionproxy0000 as _).ok() } } pub unsafe fn GetIdentifier(&self, pbstridentifier: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIdentifier)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstridentifier)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIdentifier)(windows_core::Interface::as_raw(self), pbstridentifier as _).ok() } } pub unsafe fn IsReusable(&self, pfisreusable: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsReusable)(windows_core::Interface::as_raw(self), core::mem::transmute(pfisreusable)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsReusable)(windows_core::Interface::as_raw(self), pfisreusable as _).ok() } } } #[repr(C)] @@ -11309,7 +11309,7 @@ impl ITransactionStatus { unsafe { (windows_core::Interface::vtable(self).SetTransactionStatus)(windows_core::Interface::as_raw(self), hrstatus).ok() } } pub unsafe fn GetTransactionStatus(&self, phrstatus: *mut windows_core::HRESULT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTransactionStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(phrstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTransactionStatus)(windows_core::Interface::as_raw(self), phrstatus as _).ok() } } } #[repr(C)] @@ -11351,7 +11351,7 @@ windows_core::imp::define_interface!(ITxProxyHolder, ITxProxyHolder_Vtbl, 0x13d8 windows_core::imp::interface_hierarchy!(ITxProxyHolder, windows_core::IUnknown); impl ITxProxyHolder { pub unsafe fn GetIdentifier(&self, pguidltx: *mut windows_core::GUID) { - unsafe { (windows_core::Interface::vtable(self).GetIdentifier)(windows_core::Interface::as_raw(self), core::mem::transmute(pguidltx)) } + unsafe { (windows_core::Interface::vtable(self).GetIdentifier)(windows_core::Interface::as_raw(self), pguidltx as _) } } } #[repr(C)] @@ -11676,7 +11676,7 @@ impl ObjectControl { unsafe { (windows_core::Interface::vtable(self).Deactivate)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn CanBePooled(&self, pbpoolable: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CanBePooled)(windows_core::Interface::as_raw(self), core::mem::transmute(pbpoolable)).ok() } + unsafe { (windows_core::Interface::vtable(self).CanBePooled)(windows_core::Interface::as_raw(self), pbpoolable as _).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 50d74805cc..5f679a62c4 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Console/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Console/mod.rs @@ -42,7 +42,7 @@ pub unsafe fn ConsoleControl(command: CONSOLECONTROL, consoleinformation: *const #[inline] pub unsafe fn CreateConsoleScreenBuffer(dwdesiredaccess: u32, dwsharemode: u32, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, dwflags: u32, lpscreenbufferdata: Option<*const core::ffi::c_void>) -> windows_core::Result { windows_targets::link!("kernel32.dll" "system" fn CreateConsoleScreenBuffer(dwdesiredaccess : u32, dwsharemode : u32, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, dwflags : u32, lpscreenbufferdata : *const core::ffi::c_void) -> super::super::Foundation:: HANDLE); - let result__ = unsafe { CreateConsoleScreenBuffer(dwdesiredaccess, dwsharemode, core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(lpscreenbufferdata.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { CreateConsoleScreenBuffer(dwdesiredaccess, dwsharemode, lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _, dwflags, lpscreenbufferdata.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -72,17 +72,17 @@ where #[inline] 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); - unsafe { FillConsoleOutputAttribute(hconsoleoutput, wattribute, nlength, core::mem::transmute(dwwritecoord), core::mem::transmute(lpnumberofattrswritten)).ok() } + unsafe { FillConsoleOutputAttribute(hconsoleoutput, wattribute, nlength, core::mem::transmute(dwwritecoord), lpnumberofattrswritten as _).ok() } } #[inline] 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); - unsafe { FillConsoleOutputCharacterA(hconsoleoutput, ccharacter, nlength, core::mem::transmute(dwwritecoord), core::mem::transmute(lpnumberofcharswritten)).ok() } + unsafe { FillConsoleOutputCharacterA(hconsoleoutput, ccharacter, nlength, core::mem::transmute(dwwritecoord), lpnumberofcharswritten as _).ok() } } #[inline] 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); - unsafe { FillConsoleOutputCharacterW(hconsoleoutput, ccharacter, nlength, core::mem::transmute(dwwritecoord), core::mem::transmute(lpnumberofcharswritten)).ok() } + unsafe { FillConsoleOutputCharacterW(hconsoleoutput, ccharacter, nlength, core::mem::transmute(dwwritecoord), lpnumberofcharswritten as _).ok() } } #[inline] pub unsafe fn FlushConsoleInputBuffer(hconsoleinput: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -209,12 +209,12 @@ where #[inline] 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); - unsafe { GetConsoleCursorInfo(hconsoleoutput, core::mem::transmute(lpconsolecursorinfo)).ok() } + unsafe { GetConsoleCursorInfo(hconsoleoutput, lpconsolecursorinfo as _).ok() } } #[inline] pub unsafe fn GetConsoleDisplayMode(lpmodeflags: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetConsoleDisplayMode(lpmodeflags : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetConsoleDisplayMode(core::mem::transmute(lpmodeflags)).ok() } + unsafe { GetConsoleDisplayMode(lpmodeflags as _).ok() } } #[inline] pub unsafe fn GetConsoleFontSize(hconsoleoutput: super::super::Foundation::HANDLE, nfont: u32) -> COORD { @@ -224,12 +224,12 @@ pub unsafe fn GetConsoleFontSize(hconsoleoutput: super::super::Foundation::HANDL #[inline] pub unsafe fn GetConsoleHistoryInfo(lpconsolehistoryinfo: *mut CONSOLE_HISTORY_INFO) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetConsoleHistoryInfo(lpconsolehistoryinfo : *mut CONSOLE_HISTORY_INFO) -> super::super::Foundation:: BOOL); - unsafe { GetConsoleHistoryInfo(core::mem::transmute(lpconsolehistoryinfo)).ok() } + unsafe { GetConsoleHistoryInfo(lpconsolehistoryinfo as _).ok() } } #[inline] 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); - unsafe { GetConsoleMode(hconsolehandle, core::mem::transmute(lpmode)).ok() } + unsafe { GetConsoleMode(hconsolehandle, lpmode as _).ok() } } #[inline] pub unsafe fn GetConsoleOriginalTitleA(lpconsoletitle: &mut [u8]) -> u32 { @@ -254,17 +254,17 @@ pub unsafe fn GetConsoleProcessList(lpdwprocesslist: &mut [u32]) -> u32 { #[inline] 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); - unsafe { GetConsoleScreenBufferInfo(hconsoleoutput, core::mem::transmute(lpconsolescreenbufferinfo)).ok() } + unsafe { GetConsoleScreenBufferInfo(hconsoleoutput, lpconsolescreenbufferinfo as _).ok() } } #[inline] 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); - unsafe { GetConsoleScreenBufferInfoEx(hconsoleoutput, core::mem::transmute(lpconsolescreenbufferinfoex)).ok() } + unsafe { GetConsoleScreenBufferInfoEx(hconsoleoutput, lpconsolescreenbufferinfoex as _).ok() } } #[inline] pub unsafe fn GetConsoleSelectionInfo(lpconsoleselectioninfo: *mut CONSOLE_SELECTION_INFO) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetConsoleSelectionInfo(lpconsoleselectioninfo : *mut CONSOLE_SELECTION_INFO) -> super::super::Foundation:: BOOL); - unsafe { GetConsoleSelectionInfo(core::mem::transmute(lpconsoleselectioninfo)).ok() } + unsafe { GetConsoleSelectionInfo(lpconsoleselectioninfo as _).ok() } } #[inline] pub unsafe fn GetConsoleTitleA(lpconsoletitle: &mut [u8]) -> u32 { @@ -284,12 +284,12 @@ pub unsafe fn GetConsoleWindow() -> super::super::Foundation::HWND { #[inline] pub unsafe fn GetCurrentConsoleFont(hconsoleoutput: super::super::Foundation::HANDLE, bmaximumwindow: bool, lpconsolecurrentfont: *mut CONSOLE_FONT_INFO) -> windows_core::Result<()> { 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); - unsafe { GetCurrentConsoleFont(hconsoleoutput, bmaximumwindow.into(), core::mem::transmute(lpconsolecurrentfont)).ok() } + unsafe { GetCurrentConsoleFont(hconsoleoutput, bmaximumwindow.into(), lpconsolecurrentfont as _).ok() } } #[inline] pub unsafe fn GetCurrentConsoleFontEx(hconsoleoutput: super::super::Foundation::HANDLE, bmaximumwindow: bool, lpconsolecurrentfontex: *mut CONSOLE_FONT_INFOEX) -> windows_core::Result<()> { 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); - unsafe { GetCurrentConsoleFontEx(hconsoleoutput, bmaximumwindow.into(), core::mem::transmute(lpconsolecurrentfontex)).ok() } + unsafe { GetCurrentConsoleFontEx(hconsoleoutput, bmaximumwindow.into(), lpconsolecurrentfontex as _).ok() } } #[inline] pub unsafe fn GetLargestConsoleWindowSize(hconsoleoutput: super::super::Foundation::HANDLE) -> COORD { @@ -299,12 +299,12 @@ pub unsafe fn GetLargestConsoleWindowSize(hconsoleoutput: super::super::Foundati #[inline] 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); - unsafe { GetNumberOfConsoleInputEvents(hconsoleinput, core::mem::transmute(lpnumberofevents)).ok() } + unsafe { GetNumberOfConsoleInputEvents(hconsoleinput, lpnumberofevents as _).ok() } } #[inline] pub unsafe fn GetNumberOfConsoleMouseButtons(lpnumberofmousebuttons: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetNumberOfConsoleMouseButtons(lpnumberofmousebuttons : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetNumberOfConsoleMouseButtons(core::mem::transmute(lpnumberofmousebuttons)).ok() } + unsafe { GetNumberOfConsoleMouseButtons(lpnumberofmousebuttons as _).ok() } } #[inline] pub unsafe fn GetStdHandle(nstdhandle: STD_HANDLE) -> windows_core::Result { @@ -315,57 +315,57 @@ pub unsafe fn GetStdHandle(nstdhandle: STD_HANDLE) -> windows_core::Result 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); - unsafe { PeekConsoleInputA(hconsoleinput, core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofeventsread)).ok() } + unsafe { PeekConsoleInputA(hconsoleinput, core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), lpnumberofeventsread as _).ok() } } #[inline] 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); - unsafe { PeekConsoleInputW(hconsoleinput, core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofeventsread)).ok() } + unsafe { PeekConsoleInputW(hconsoleinput, core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), lpnumberofeventsread as _).ok() } } #[inline] 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); - unsafe { ReadConsoleA(hconsoleinput, core::mem::transmute(lpbuffer), nnumberofcharstoread, core::mem::transmute(lpnumberofcharsread), core::mem::transmute(pinputcontrol.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ReadConsoleA(hconsoleinput, lpbuffer as _, nnumberofcharstoread, lpnumberofcharsread as _, pinputcontrol.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { ReadConsoleInputA(hconsoleinput, core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofeventsread)).ok() } + unsafe { ReadConsoleInputA(hconsoleinput, core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), lpnumberofeventsread as _).ok() } } #[inline] 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); - unsafe { ReadConsoleInputW(hconsoleinput, core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofeventsread)).ok() } + unsafe { ReadConsoleInputW(hconsoleinput, core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), lpnumberofeventsread as _).ok() } } #[inline] 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); - unsafe { ReadConsoleOutputA(hconsoleoutput, core::mem::transmute(lpbuffer), core::mem::transmute(dwbuffersize), core::mem::transmute(dwbuffercoord), core::mem::transmute(lpreadregion)).ok() } + unsafe { ReadConsoleOutputA(hconsoleoutput, lpbuffer as _, core::mem::transmute(dwbuffersize), core::mem::transmute(dwbuffercoord), lpreadregion as _).ok() } } #[inline] 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); - unsafe { ReadConsoleOutputAttribute(hconsoleoutput, core::mem::transmute(lpattribute.as_ptr()), lpattribute.len().try_into().unwrap(), core::mem::transmute(dwreadcoord), core::mem::transmute(lpnumberofattrsread)).ok() } + unsafe { ReadConsoleOutputAttribute(hconsoleoutput, core::mem::transmute(lpattribute.as_ptr()), lpattribute.len().try_into().unwrap(), core::mem::transmute(dwreadcoord), lpnumberofattrsread as _).ok() } } #[inline] 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); - unsafe { ReadConsoleOutputCharacterA(hconsoleoutput, core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len().try_into().unwrap(), core::mem::transmute(dwreadcoord), core::mem::transmute(lpnumberofcharsread)).ok() } + unsafe { ReadConsoleOutputCharacterA(hconsoleoutput, core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len().try_into().unwrap(), core::mem::transmute(dwreadcoord), lpnumberofcharsread as _).ok() } } #[inline] 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); - unsafe { ReadConsoleOutputCharacterW(hconsoleoutput, core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len().try_into().unwrap(), core::mem::transmute(dwreadcoord), core::mem::transmute(lpnumberofcharsread)).ok() } + unsafe { ReadConsoleOutputCharacterW(hconsoleoutput, core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len().try_into().unwrap(), core::mem::transmute(dwreadcoord), lpnumberofcharsread as _).ok() } } #[inline] 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); - unsafe { ReadConsoleOutputW(hconsoleoutput, core::mem::transmute(lpbuffer), core::mem::transmute(dwbuffersize), core::mem::transmute(dwbuffercoord), core::mem::transmute(lpreadregion)).ok() } + unsafe { ReadConsoleOutputW(hconsoleoutput, lpbuffer as _, core::mem::transmute(dwbuffersize), core::mem::transmute(dwbuffercoord), lpreadregion as _).ok() } } #[inline] 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); - unsafe { ReadConsoleW(hconsoleinput, core::mem::transmute(lpbuffer), nnumberofcharstoread, core::mem::transmute(lpnumberofcharsread), core::mem::transmute(pinputcontrol.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ReadConsoleW(hconsoleinput, lpbuffer as _, nnumberofcharstoread, lpnumberofcharsread as _, pinputcontrol.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn ResizePseudoConsole(hpc: HPCON, size: COORD) -> windows_core::Result<()> { @@ -375,12 +375,12 @@ pub unsafe fn ResizePseudoConsole(hpc: HPCON, size: COORD) -> windows_core::Resu #[inline] 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); - unsafe { ScrollConsoleScreenBufferA(hconsoleoutput, lpscrollrectangle, core::mem::transmute(lpcliprectangle.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwdestinationorigin), lpfill).ok() } + unsafe { ScrollConsoleScreenBufferA(hconsoleoutput, lpscrollrectangle, lpcliprectangle.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(dwdestinationorigin), lpfill).ok() } } #[inline] 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); - unsafe { ScrollConsoleScreenBufferW(hconsoleoutput, lpscrollrectangle, core::mem::transmute(lpcliprectangle.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwdestinationorigin), lpfill).ok() } + unsafe { ScrollConsoleScreenBufferW(hconsoleoutput, lpscrollrectangle, lpcliprectangle.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(dwdestinationorigin), lpfill).ok() } } #[inline] pub unsafe fn SetConsoleActiveScreenBuffer(hconsoleoutput: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -395,7 +395,7 @@ pub unsafe fn SetConsoleCP(wcodepageid: u32) -> windows_core::Result<()> { #[inline] pub unsafe fn SetConsoleCtrlHandler(handlerroutine: Option, add: bool) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetConsoleCtrlHandler(handlerroutine : PHANDLER_ROUTINE, add : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - unsafe { SetConsoleCtrlHandler(core::mem::transmute(handlerroutine.unwrap_or(core::mem::zeroed())), add.into()).ok() } + unsafe { SetConsoleCtrlHandler(handlerroutine.unwrap_or(core::mem::zeroed()) as _, add.into()).ok() } } #[inline] pub unsafe fn SetConsoleCursorInfo(hconsoleoutput: super::super::Foundation::HANDLE, lpconsolecursorinfo: *const CONSOLE_CURSOR_INFO) -> windows_core::Result<()> { @@ -410,7 +410,7 @@ pub unsafe fn SetConsoleCursorPosition(hconsoleoutput: super::super::Foundation: #[inline] 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); - unsafe { SetConsoleDisplayMode(hconsoleoutput, dwflags, core::mem::transmute(lpnewscreenbufferdimensions.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetConsoleDisplayMode(hconsoleoutput, dwflags, lpnewscreenbufferdimensions.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetConsoleHistoryInfo(lpconsolehistoryinfo: *const CONSOLE_HISTORY_INFO) -> windows_core::Result<()> { @@ -492,52 +492,52 @@ pub unsafe fn SetStdHandle(nstdhandle: STD_HANDLE, hhandle: super::super::Founda #[inline] 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); - unsafe { SetStdHandleEx(nstdhandle, hhandle, core::mem::transmute(phprevvalue.unwrap_or(core::mem::zeroed()))) } + unsafe { SetStdHandleEx(nstdhandle, hhandle, phprevvalue.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { WriteConsoleA(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() } + unsafe { WriteConsoleA(hconsoleoutput, core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), lpnumberofcharswritten.unwrap_or(core::mem::zeroed()) as _, lpreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { WriteConsoleInputA(hconsoleinput, core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofeventswritten)).ok() } + unsafe { WriteConsoleInputA(hconsoleinput, core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), lpnumberofeventswritten as _).ok() } } #[inline] 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); - unsafe { WriteConsoleInputW(hconsoleinput, core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofeventswritten)).ok() } + unsafe { WriteConsoleInputW(hconsoleinput, core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), lpnumberofeventswritten as _).ok() } } #[inline] 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); - unsafe { WriteConsoleOutputA(hconsoleoutput, lpbuffer, core::mem::transmute(dwbuffersize), core::mem::transmute(dwbuffercoord), core::mem::transmute(lpwriteregion)).ok() } + unsafe { WriteConsoleOutputA(hconsoleoutput, lpbuffer, core::mem::transmute(dwbuffersize), core::mem::transmute(dwbuffercoord), lpwriteregion as _).ok() } } #[inline] 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); - unsafe { WriteConsoleOutputAttribute(hconsoleoutput, core::mem::transmute(lpattribute.as_ptr()), lpattribute.len().try_into().unwrap(), core::mem::transmute(dwwritecoord), core::mem::transmute(lpnumberofattrswritten)).ok() } + unsafe { WriteConsoleOutputAttribute(hconsoleoutput, core::mem::transmute(lpattribute.as_ptr()), lpattribute.len().try_into().unwrap(), core::mem::transmute(dwwritecoord), lpnumberofattrswritten as _).ok() } } #[inline] 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); - unsafe { WriteConsoleOutputCharacterA(hconsoleoutput, core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len().try_into().unwrap(), core::mem::transmute(dwwritecoord), core::mem::transmute(lpnumberofcharswritten)).ok() } + unsafe { WriteConsoleOutputCharacterA(hconsoleoutput, core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len().try_into().unwrap(), core::mem::transmute(dwwritecoord), lpnumberofcharswritten as _).ok() } } #[inline] 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); - unsafe { WriteConsoleOutputCharacterW(hconsoleoutput, core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len().try_into().unwrap(), core::mem::transmute(dwwritecoord), core::mem::transmute(lpnumberofcharswritten)).ok() } + unsafe { WriteConsoleOutputCharacterW(hconsoleoutput, core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len().try_into().unwrap(), core::mem::transmute(dwwritecoord), lpnumberofcharswritten as _).ok() } } #[inline] 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); - unsafe { WriteConsoleOutputW(hconsoleoutput, lpbuffer, core::mem::transmute(dwbuffersize), core::mem::transmute(dwbuffercoord), core::mem::transmute(lpwriteregion)).ok() } + unsafe { WriteConsoleOutputW(hconsoleoutput, lpbuffer, core::mem::transmute(dwbuffersize), core::mem::transmute(dwbuffercoord), lpwriteregion as _).ok() } } #[inline] 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); - unsafe { WriteConsoleW(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() } + unsafe { WriteConsoleW(hconsoleoutput, core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), lpnumberofcharswritten.unwrap_or(core::mem::zeroed()) as _, lpreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } pub const ALTNUMPAD_BIT: u32 = 67108864u32; pub const ATTACH_PARENT_PROCESS: u32 = 4294967295u32; diff --git a/crates/libs/windows/src/Windows/Win32/System/Contacts/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Contacts/mod.rs index 29ea46c5ab..6049535583 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Contacts/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Contacts/mod.rs @@ -131,10 +131,10 @@ windows_core::imp::define_interface!(IContact, IContact_Vtbl, 0xf941b671_bda7_4f windows_core::imp::interface_hierarchy!(IContact, windows_core::IUnknown); impl IContact { pub unsafe fn GetContactID(&self, pszcontactid: &mut [u16], pdwcchcontactidrequired: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetContactID)(windows_core::Interface::as_raw(self), core::mem::transmute(pszcontactid.as_ptr()), pszcontactid.len().try_into().unwrap(), core::mem::transmute(pdwcchcontactidrequired)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetContactID)(windows_core::Interface::as_raw(self), core::mem::transmute(pszcontactid.as_ptr()), pszcontactid.len().try_into().unwrap(), pdwcchcontactidrequired as _).ok() } } pub unsafe fn GetPath(&self, pszpath: &mut [u16], pdwcchpathrequired: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPath)(windows_core::Interface::as_raw(self), core::mem::transmute(pszpath.as_ptr()), pszpath.len().try_into().unwrap(), core::mem::transmute(pdwcchpathrequired)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPath)(windows_core::Interface::as_raw(self), core::mem::transmute(pszpath.as_ptr()), pszpath.len().try_into().unwrap(), pdwcchpathrequired as _).ok() } } pub unsafe fn CommitChanges(&self, dwcommitflags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).CommitChanges)(windows_core::Interface::as_raw(self), dwcommitflags).ok() } @@ -1646,7 +1646,7 @@ windows_core::imp::define_interface!(IContactAggregationManager, IContactAggrega windows_core::imp::interface_hierarchy!(IContactAggregationManager, windows_core::IUnknown); impl IContactAggregationManager { pub unsafe fn GetVersionInfo(&self, plmajorversion: *mut i32, plminorversion: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVersionInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(plmajorversion), core::mem::transmute(plminorversion)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVersionInfo)(windows_core::Interface::as_raw(self), plmajorversion as _, plminorversion as _).ok() } } pub unsafe fn CreateOrOpenGroup(&self, pgroupname: P0, options: CONTACT_AGGREGATION_CREATE_OR_OPEN_OPTIONS, pcreatedgroup: *mut super::super::Foundation::BOOL) -> windows_core::Result where @@ -1654,7 +1654,7 @@ impl IContactAggregationManager { { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateOrOpenGroup)(windows_core::Interface::as_raw(self), pgroupname.param().abi(), options, core::mem::transmute(pcreatedgroup), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateOrOpenGroup)(windows_core::Interface::as_raw(self), pgroupname.param().abi(), options, pcreatedgroup as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn CreateExternalContact(&self) -> windows_core::Result { @@ -2752,26 +2752,26 @@ impl IContactProperties { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetString)(windows_core::Interface::as_raw(self), pszpropertyname.param().abi(), dwflags, core::mem::transmute(pszvalue.as_ptr()), pszvalue.len().try_into().unwrap(), core::mem::transmute(pdwcchpropertyvaluerequired)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetString)(windows_core::Interface::as_raw(self), pszpropertyname.param().abi(), dwflags, core::mem::transmute(pszvalue.as_ptr()), pszvalue.len().try_into().unwrap(), pdwcchpropertyvaluerequired as _).ok() } } pub unsafe fn GetDate(&self, pszpropertyname: P0, dwflags: u32, pftdatetime: *mut super::super::Foundation::FILETIME) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetDate)(windows_core::Interface::as_raw(self), pszpropertyname.param().abi(), dwflags, core::mem::transmute(pftdatetime)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDate)(windows_core::Interface::as_raw(self), pszpropertyname.param().abi(), dwflags, pftdatetime as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetBinary(&self, pszpropertyname: P0, dwflags: u32, pszcontenttype: &mut [u16], pdwcchcontenttyperequired: *mut u32, ppstream: *mut Option) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetBinary)(windows_core::Interface::as_raw(self), pszpropertyname.param().abi(), dwflags, core::mem::transmute(pszcontenttype.as_ptr()), pszcontenttype.len().try_into().unwrap(), core::mem::transmute(pdwcchcontenttyperequired), core::mem::transmute(ppstream)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBinary)(windows_core::Interface::as_raw(self), pszpropertyname.param().abi(), dwflags, core::mem::transmute(pszcontenttype.as_ptr()), pszcontenttype.len().try_into().unwrap(), pdwcchcontenttyperequired as _, core::mem::transmute(ppstream)).ok() } } pub unsafe fn GetLabels(&self, pszarrayelementname: P0, dwflags: u32, pszlabels: &mut [u16], pdwcchlabelsrequired: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetLabels)(windows_core::Interface::as_raw(self), pszarrayelementname.param().abi(), dwflags, core::mem::transmute(pszlabels.as_ptr()), pszlabels.len().try_into().unwrap(), core::mem::transmute(pdwcchlabelsrequired)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLabels)(windows_core::Interface::as_raw(self), pszarrayelementname.param().abi(), dwflags, core::mem::transmute(pszlabels.as_ptr()), pszlabels.len().try_into().unwrap(), pdwcchlabelsrequired as _).ok() } } pub unsafe fn SetString(&self, pszpropertyname: P0, dwflags: u32, pszvalue: P2) -> windows_core::Result<()> where @@ -2805,7 +2805,7 @@ impl IContactProperties { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateArrayNode)(windows_core::Interface::as_raw(self), pszarrayname.param().abi(), dwflags, fappend.into(), core::mem::transmute(psznewarrayelementname.as_ptr()), psznewarrayelementname.len().try_into().unwrap(), core::mem::transmute(pdwcchnewarrayelementnamerequired)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateArrayNode)(windows_core::Interface::as_raw(self), pszarrayname.param().abi(), dwflags, fappend.into(), core::mem::transmute(psznewarrayelementname.as_ptr()), psznewarrayelementname.len().try_into().unwrap(), pdwcchnewarrayelementnamerequired as _).ok() } } pub unsafe fn DeleteProperty(&self, pszpropertyname: P0, dwflags: u32) -> windows_core::Result<()> where @@ -2985,19 +2985,19 @@ impl IContactPropertyCollection { unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetPropertyName(&self, pszpropertyname: &mut [u16], pdwcchpropertynamerequired: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPropertyName)(windows_core::Interface::as_raw(self), core::mem::transmute(pszpropertyname.as_ptr()), pszpropertyname.len().try_into().unwrap(), core::mem::transmute(pdwcchpropertynamerequired)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropertyName)(windows_core::Interface::as_raw(self), core::mem::transmute(pszpropertyname.as_ptr()), pszpropertyname.len().try_into().unwrap(), pdwcchpropertynamerequired as _).ok() } } pub unsafe fn GetPropertyType(&self, pdwtype: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPropertyType)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwtype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropertyType)(windows_core::Interface::as_raw(self), pdwtype as _).ok() } } pub unsafe fn GetPropertyVersion(&self, pdwversion: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPropertyVersion)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwversion)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropertyVersion)(windows_core::Interface::as_raw(self), pdwversion as _).ok() } } pub unsafe fn GetPropertyModificationDate(&self, pftmodificationdate: *mut super::super::Foundation::FILETIME) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPropertyModificationDate)(windows_core::Interface::as_raw(self), core::mem::transmute(pftmodificationdate)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropertyModificationDate)(windows_core::Interface::as_raw(self), pftmodificationdate as _).ok() } } pub unsafe fn GetPropertyArrayElementID(&self, pszarrayelementid: &mut [u16], pdwccharrayelementidrequired: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPropertyArrayElementID)(windows_core::Interface::as_raw(self), core::mem::transmute(pszarrayelementid.as_ptr()), pszarrayelementid.len().try_into().unwrap(), core::mem::transmute(pdwccharrayelementidrequired)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropertyArrayElementID)(windows_core::Interface::as_raw(self), core::mem::transmute(pszarrayelementid.as_ptr()), pszarrayelementid.len().try_into().unwrap(), pdwccharrayelementidrequired as _).ok() } } } #[repr(C)] 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 93ff4fada1..ca8333d3ce 100644 --- a/crates/libs/windows/src/Windows/Win32/System/CorrelationVector/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/CorrelationVector/mod.rs @@ -1,17 +1,17 @@ #[inline] pub unsafe fn RtlExtendCorrelationVector(correlationvector: *mut CORRELATION_VECTOR) -> u32 { windows_targets::link!("ntdll.dll" "system" fn RtlExtendCorrelationVector(correlationvector : *mut CORRELATION_VECTOR) -> u32); - unsafe { RtlExtendCorrelationVector(core::mem::transmute(correlationvector)) } + unsafe { RtlExtendCorrelationVector(correlationvector as _) } } #[inline] pub unsafe fn RtlIncrementCorrelationVector(correlationvector: *mut CORRELATION_VECTOR) -> u32 { windows_targets::link!("ntdll.dll" "system" fn RtlIncrementCorrelationVector(correlationvector : *mut CORRELATION_VECTOR) -> u32); - unsafe { RtlIncrementCorrelationVector(core::mem::transmute(correlationvector)) } + unsafe { RtlIncrementCorrelationVector(correlationvector as _) } } #[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); - unsafe { RtlInitializeCorrelationVector(core::mem::transmute(correlationvector), version, core::mem::transmute(guid.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlInitializeCorrelationVector(correlationvector as _, version, guid.unwrap_or(core::mem::zeroed()) as _) } } #[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 6bffb08047..e1a9f1bc4d 100644 --- a/crates/libs/windows/src/Windows/Win32/System/DataExchange/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/DataExchange/mod.rs @@ -42,7 +42,7 @@ pub unsafe fn DdeAbandonTransaction(idinst: u32, hconv: HCONV, idtransaction: u3 #[inline] 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); - unsafe { DdeAccessData(hdata, core::mem::transmute(pcbdatasize.unwrap_or(core::mem::zeroed()))) } + unsafe { DdeAccessData(hdata, pcbdatasize.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn DdeAddData(hdata: HDDEDATA, psrc: &[u8], cboff: u32) -> HDDEDATA { @@ -52,7 +52,7 @@ pub unsafe fn DdeAddData(hdata: HDDEDATA, psrc: &[u8], cboff: u32) -> HDDEDATA { #[inline] 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); - unsafe { DdeClientTransaction(core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), cbdata, hconv, core::mem::transmute(hszitem.unwrap_or(core::mem::zeroed())), wfmt, wtype, dwtimeout, core::mem::transmute(pdwresult.unwrap_or(core::mem::zeroed()))) } + unsafe { DdeClientTransaction(pdata.unwrap_or(core::mem::zeroed()) as _, cbdata, hconv, hszitem.unwrap_or(core::mem::zeroed()) as _, wfmt, wtype, dwtimeout, pdwresult.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn DdeCmpStringHandles(hsz1: HSZ, hsz2: HSZ) -> i32 { @@ -63,18 +63,18 @@ pub unsafe fn DdeCmpStringHandles(hsz1: HSZ, hsz2: HSZ) -> i32 { #[inline] 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); - unsafe { DdeConnect(idinst, hszservice, hsztopic, core::mem::transmute(pcc.unwrap_or(core::mem::zeroed()))) } + unsafe { DdeConnect(idinst, hszservice, hsztopic, pcc.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { DdeConnectList(idinst, hszservice, hsztopic, hconvlist, core::mem::transmute(pcc.unwrap_or(core::mem::zeroed()))) } + unsafe { DdeConnectList(idinst, hszservice, hsztopic, hconvlist, pcc.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { DdeCreateDataHandle(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()), cboff, core::mem::transmute(hszitem.unwrap_or(core::mem::zeroed())), wfmt, afcmd) } + unsafe { DdeCreateDataHandle(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()), cboff, hszitem.unwrap_or(core::mem::zeroed()) as _, wfmt, afcmd) } } #[inline] pub unsafe fn DdeCreateStringHandleA(idinst: u32, psz: P1, icodepage: i32) -> HSZ @@ -135,12 +135,12 @@ pub unsafe fn DdeImpersonateClient(hconv: HCONV) -> windows_core::Result<()> { #[inline] 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); - unsafe { DdeInitializeA(core::mem::transmute(pidinst), pfncallback, afcmd, core::mem::transmute(ulres.unwrap_or(core::mem::zeroed()))) } + unsafe { DdeInitializeA(pidinst as _, pfncallback, afcmd, ulres.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { DdeInitializeW(core::mem::transmute(pidinst), pfncallback, afcmd, core::mem::transmute(ulres.unwrap_or(core::mem::zeroed()))) } + unsafe { DdeInitializeW(pidinst as _, pfncallback, afcmd, ulres.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn DdeKeepStringHandle(idinst: u32, hsz: HSZ) -> super::super::Foundation::BOOL { @@ -150,7 +150,7 @@ pub unsafe fn DdeKeepStringHandle(idinst: u32, hsz: HSZ) -> super::super::Founda #[inline] 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); - unsafe { DdeNameService(idinst, core::mem::transmute(hsz1.unwrap_or(core::mem::zeroed())), core::mem::transmute(hsz2.unwrap_or(core::mem::zeroed())), afcmd) } + unsafe { DdeNameService(idinst, hsz1.unwrap_or(core::mem::zeroed()) as _, hsz2.unwrap_or(core::mem::zeroed()) as _, afcmd) } } #[inline] pub unsafe fn DdePostAdvise(idinst: u32, hsztopic: HSZ, hszitem: HSZ) -> super::super::Foundation::BOOL { @@ -161,7 +161,7 @@ pub unsafe fn DdePostAdvise(idinst: u32, hsztopic: HSZ, hszitem: HSZ) -> super:: #[inline] 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); - unsafe { DdeQueryConvInfo(hconv, idtransaction, core::mem::transmute(pconvinfo)) } + unsafe { DdeQueryConvInfo(hconv, idtransaction, pconvinfo as _) } } #[inline] pub unsafe fn DdeQueryNextServer(hconvlist: HCONVLIST, hconvprev: HCONV) -> HCONV { @@ -187,7 +187,7 @@ pub unsafe fn DdeReconnect(hconv: HCONV) -> HCONV { #[inline] 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); - unsafe { DdeSetQualityOfService(hwndclient, pqosnew, core::mem::transmute(pqosprev)).ok() } + unsafe { DdeSetQualityOfService(hwndclient, pqosnew, pqosprev as _).ok() } } #[inline] pub unsafe fn DdeSetUserHandle(hconv: HCONV, id: u32, huser: usize) -> super::super::Foundation::BOOL { @@ -297,7 +297,7 @@ pub unsafe fn GetPriorityClipboardFormat(paformatprioritylist: &[u32]) -> i32 { #[inline] pub unsafe fn GetUpdatedClipboardFormats(lpuiformats: &mut [u32], pcformatsout: *mut u32) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetUpdatedClipboardFormats(lpuiformats : *mut u32, cformats : u32, pcformatsout : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetUpdatedClipboardFormats(core::mem::transmute(lpuiformats.as_ptr()), lpuiformats.len().try_into().unwrap(), core::mem::transmute(pcformatsout)).ok() } + unsafe { GetUpdatedClipboardFormats(core::mem::transmute(lpuiformats.as_ptr()), lpuiformats.len().try_into().unwrap(), pcformatsout as _).ok() } } #[inline] pub unsafe fn GlobalAddAtomA(lpstring: P0) -> u16 @@ -380,7 +380,7 @@ pub unsafe fn IsClipboardFormatAvailable(format: u32) -> windows_core::Result<() #[inline] 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); - unsafe { OpenClipboard(core::mem::transmute(hwndnewowner.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { OpenClipboard(hwndnewowner.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn PackDDElParam(msg: u32, uilo: usize, uihi: usize) -> super::super::Foundation::LPARAM { @@ -416,7 +416,7 @@ pub unsafe fn ReuseDDElParam(lparam: super::super::Foundation::LPARAM, msgin: u3 #[inline] 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__ = unsafe { SetClipboardData(uformat, core::mem::transmute(hmem.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { SetClipboardData(uformat, hmem.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -429,12 +429,12 @@ pub unsafe fn SetClipboardViewer(hwndnewviewer: super::super::Foundation::HWND) #[inline] 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); - unsafe { 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()))) } + unsafe { SetWinMetaFileBits(lpmeta16data.len().try_into().unwrap(), core::mem::transmute(lpmeta16data.as_ptr()), hdcref.unwrap_or(core::mem::zeroed()) as _, lpmfp.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { UnpackDDElParam(msg, lparam, core::mem::transmute(puilo), core::mem::transmute(puihi)) } + unsafe { UnpackDDElParam(msg, lparam, puilo as _, puihi as _) } } 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 2e67100b5e..47a96238d3 100644 --- a/crates/libs/windows/src/Windows/Win32/System/DeploymentServices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/DeploymentServices/mod.rs @@ -6,82 +6,82 @@ pub unsafe fn PxeAsyncRecvDone(hclientrequest: super::super::Foundation::HANDLE, #[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); - unsafe { PxeDhcpAppendOption(core::mem::transmute(preplypacket), umaxreplypacketlen, core::mem::transmute(pureplypacketlen), boption, boptionlen, core::mem::transmute(pvalue.unwrap_or(core::mem::zeroed()))) } + unsafe { PxeDhcpAppendOption(preplypacket as _, umaxreplypacketlen, pureplypacketlen as _, boption, boptionlen, pvalue.unwrap_or(core::mem::zeroed()) as _) } } #[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 { windows_targets::link!("wdspxe.dll" "system" fn PxeDhcpAppendOptionRaw(preplypacket : *mut core::ffi::c_void, umaxreplypacketlen : u32, pureplypacketlen : *mut u32, ubufferlen : u16, pbuffer : *const core::ffi::c_void) -> u32); - unsafe { PxeDhcpAppendOptionRaw(core::mem::transmute(preplypacket), umaxreplypacketlen, core::mem::transmute(pureplypacketlen), ubufferlen, pbuffer) } + unsafe { PxeDhcpAppendOptionRaw(preplypacket as _, umaxreplypacketlen, pureplypacketlen as _, ubufferlen, pbuffer) } } #[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); - unsafe { PxeDhcpGetOptionValue(ppacket, upacketlen, uinstance, boption, core::mem::transmute(pboptionlen.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppoptionvalue.unwrap_or(core::mem::zeroed()))) } + unsafe { PxeDhcpGetOptionValue(ppacket, upacketlen, uinstance, boption, pboptionlen.unwrap_or(core::mem::zeroed()) as _, ppoptionvalue.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { PxeDhcpGetVendorOptionValue(ppacket, upacketlen, boption, uinstance, core::mem::transmute(pboptionlen.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppoptionvalue.unwrap_or(core::mem::zeroed()))) } + unsafe { PxeDhcpGetVendorOptionValue(ppacket, upacketlen, boption, uinstance, pboptionlen.unwrap_or(core::mem::zeroed()) as _, ppoptionvalue.unwrap_or(core::mem::zeroed()) as _) } } #[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 { windows_targets::link!("wdspxe.dll" "system" fn PxeDhcpInitialize(precvpacket : *const core::ffi::c_void, urecvpacketlen : u32, preplypacket : *mut core::ffi::c_void, umaxreplypacketlen : u32, pureplypacketlen : *mut u32) -> u32); - unsafe { PxeDhcpInitialize(precvpacket, urecvpacketlen, core::mem::transmute(preplypacket), umaxreplypacketlen, core::mem::transmute(pureplypacketlen)) } + unsafe { PxeDhcpInitialize(precvpacket, urecvpacketlen, preplypacket as _, umaxreplypacketlen, pureplypacketlen as _) } } #[inline] pub unsafe fn PxeDhcpIsValid(ppacket: *const core::ffi::c_void, upacketlen: u32, brequestpacket: bool, pbpxeoptionpresent: Option<*mut super::super::Foundation::BOOL>) -> u32 { 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); - unsafe { PxeDhcpIsValid(ppacket, upacketlen, brequestpacket.into(), core::mem::transmute(pbpxeoptionpresent.unwrap_or(core::mem::zeroed()))) } + unsafe { PxeDhcpIsValid(ppacket, upacketlen, brequestpacket.into(), pbpxeoptionpresent.unwrap_or(core::mem::zeroed()) as _) } } #[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 { windows_targets::link!("wdspxe.dll" "system" fn PxeDhcpv6AppendOption(preply : *mut core::ffi::c_void, cbreply : u32, pcbreplyused : *mut u32, woptiontype : u16, cboption : u16, poption : *const core::ffi::c_void) -> u32); - unsafe { PxeDhcpv6AppendOption(core::mem::transmute(preply), cbreply, core::mem::transmute(pcbreplyused), woptiontype, cboption, poption) } + unsafe { PxeDhcpv6AppendOption(preply as _, cbreply, pcbreplyused as _, woptiontype, cboption, poption) } } #[inline] pub unsafe fn PxeDhcpv6AppendOptionRaw(preply: *mut core::ffi::c_void, cbreply: u32, pcbreplyused: *mut u32, cbbuffer: u16, pbuffer: *const core::ffi::c_void) -> u32 { windows_targets::link!("wdspxe.dll" "system" fn PxeDhcpv6AppendOptionRaw(preply : *mut core::ffi::c_void, cbreply : u32, pcbreplyused : *mut u32, cbbuffer : u16, pbuffer : *const core::ffi::c_void) -> u32); - unsafe { PxeDhcpv6AppendOptionRaw(core::mem::transmute(preply), cbreply, core::mem::transmute(pcbreplyused), cbbuffer, pbuffer) } + unsafe { PxeDhcpv6AppendOptionRaw(preply as _, cbreply, pcbreplyused as _, cbbuffer, pbuffer) } } #[inline] pub unsafe fn PxeDhcpv6CreateRelayRepl(prelaymessages: &[PXE_DHCPV6_NESTED_RELAY_MESSAGE], pinnerpacket: &[u8], preplybuffer: *mut core::ffi::c_void, cbreplybuffer: u32, pcbreplybuffer: *mut u32) -> u32 { windows_targets::link!("wdspxe.dll" "system" fn PxeDhcpv6CreateRelayRepl(prelaymessages : *const PXE_DHCPV6_NESTED_RELAY_MESSAGE, nrelaymessages : u32, pinnerpacket : *const u8, cbinnerpacket : u32, preplybuffer : *mut core::ffi::c_void, cbreplybuffer : u32, pcbreplybuffer : *mut u32) -> u32); - unsafe { PxeDhcpv6CreateRelayRepl(core::mem::transmute(prelaymessages.as_ptr()), prelaymessages.len().try_into().unwrap(), core::mem::transmute(pinnerpacket.as_ptr()), pinnerpacket.len().try_into().unwrap(), core::mem::transmute(preplybuffer), cbreplybuffer, core::mem::transmute(pcbreplybuffer)) } + unsafe { PxeDhcpv6CreateRelayRepl(core::mem::transmute(prelaymessages.as_ptr()), prelaymessages.len().try_into().unwrap(), core::mem::transmute(pinnerpacket.as_ptr()), pinnerpacket.len().try_into().unwrap(), preplybuffer as _, cbreplybuffer, pcbreplybuffer as _) } } #[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); - unsafe { PxeDhcpv6GetOptionValue(ppacket, upacketlen, uinstance, woption, core::mem::transmute(pwoptionlen.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppoptionvalue.unwrap_or(core::mem::zeroed()))) } + unsafe { PxeDhcpv6GetOptionValue(ppacket, upacketlen, uinstance, woption, pwoptionlen.unwrap_or(core::mem::zeroed()) as _, ppoptionvalue.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { PxeDhcpv6GetVendorOptionValue(ppacket, upacketlen, dwenterprisenumber, woption, uinstance, core::mem::transmute(pwoptionlen.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppoptionvalue.unwrap_or(core::mem::zeroed()))) } + unsafe { PxeDhcpv6GetVendorOptionValue(ppacket, upacketlen, dwenterprisenumber, woption, uinstance, pwoptionlen.unwrap_or(core::mem::zeroed()) as _, ppoptionvalue.unwrap_or(core::mem::zeroed()) as _) } } #[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 { windows_targets::link!("wdspxe.dll" "system" fn PxeDhcpv6Initialize(prequest : *const core::ffi::c_void, cbrequest : u32, preply : *mut core::ffi::c_void, cbreply : u32, pcbreplyused : *mut u32) -> u32); - unsafe { PxeDhcpv6Initialize(prequest, cbrequest, core::mem::transmute(preply), cbreply, core::mem::transmute(pcbreplyused)) } + unsafe { PxeDhcpv6Initialize(prequest, cbrequest, preply as _, cbreply, pcbreplyused as _) } } #[inline] pub unsafe fn PxeDhcpv6IsValid(ppacket: *const core::ffi::c_void, upacketlen: u32, brequestpacket: bool, pbpxeoptionpresent: Option<*mut super::super::Foundation::BOOL>) -> u32 { 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); - unsafe { PxeDhcpv6IsValid(ppacket, upacketlen, brequestpacket.into(), core::mem::transmute(pbpxeoptionpresent.unwrap_or(core::mem::zeroed()))) } + unsafe { PxeDhcpv6IsValid(ppacket, upacketlen, brequestpacket.into(), pbpxeoptionpresent.unwrap_or(core::mem::zeroed()) as _) } } #[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 { windows_targets::link!("wdspxe.dll" "system" fn PxeDhcpv6ParseRelayForw(prelayforwpacket : *const core::ffi::c_void, urelayforwpacketlen : u32, prelaymessages : *mut PXE_DHCPV6_NESTED_RELAY_MESSAGE, nrelaymessages : u32, pnrelaymessages : *mut u32, ppinnerpacket : *mut *mut u8, pcbinnerpacket : *mut u32) -> u32); - unsafe { PxeDhcpv6ParseRelayForw(prelayforwpacket, urelayforwpacketlen, core::mem::transmute(prelaymessages.as_ptr()), prelaymessages.len().try_into().unwrap(), core::mem::transmute(pnrelaymessages), core::mem::transmute(ppinnerpacket), core::mem::transmute(pcbinnerpacket)) } + unsafe { PxeDhcpv6ParseRelayForw(prelayforwpacket, urelayforwpacketlen, core::mem::transmute(prelaymessages.as_ptr()), prelaymessages.len().try_into().unwrap(), pnrelaymessages as _, ppinnerpacket as _, pcbinnerpacket as _) } } #[inline] pub unsafe fn PxeGetServerInfo(uinfotype: u32, pbuffer: *mut core::ffi::c_void, ubufferlen: u32) -> u32 { windows_targets::link!("wdspxe.dll" "system" fn PxeGetServerInfo(uinfotype : u32, pbuffer : *mut core::ffi::c_void, ubufferlen : u32) -> u32); - unsafe { PxeGetServerInfo(uinfotype, core::mem::transmute(pbuffer), ubufferlen) } + unsafe { PxeGetServerInfo(uinfotype, pbuffer as _, ubufferlen) } } #[inline] pub unsafe fn PxeGetServerInfoEx(uinfotype: u32, pbuffer: *mut core::ffi::c_void, ubufferlen: u32, pubufferused: *mut u32) -> u32 { windows_targets::link!("wdspxe.dll" "system" fn PxeGetServerInfoEx(uinfotype : u32, pbuffer : *mut core::ffi::c_void, ubufferlen : u32, pubufferused : *mut u32) -> u32); - unsafe { PxeGetServerInfoEx(uinfotype, core::mem::transmute(pbuffer), ubufferlen, core::mem::transmute(pubufferused)) } + unsafe { PxeGetServerInfoEx(uinfotype, pbuffer as _, ubufferlen, pubufferused as _) } } #[inline] pub unsafe fn PxePacketAllocate(hprovider: super::super::Foundation::HANDLE, hclientrequest: super::super::Foundation::HANDLE, usize: u32) -> *mut core::ffi::c_void { @@ -101,12 +101,12 @@ pub unsafe fn PxeProviderEnumClose(henum: super::super::Foundation::HANDLE) -> u #[inline] pub unsafe fn PxeProviderEnumFirst(phenum: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("wdspxe.dll" "system" fn PxeProviderEnumFirst(phenum : *mut super::super::Foundation:: HANDLE) -> u32); - unsafe { PxeProviderEnumFirst(core::mem::transmute(phenum)) } + unsafe { PxeProviderEnumFirst(phenum as _) } } #[inline] 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); - unsafe { PxeProviderEnumNext(henum, core::mem::transmute(ppprovider)) } + unsafe { PxeProviderEnumNext(henum, ppprovider as _) } } #[inline] pub unsafe fn PxeProviderFreeInfo(pprovider: *const PXE_PROVIDER) -> u32 { @@ -119,7 +119,7 @@ where P0: windows_core::Param, { windows_targets::link!("wdspxe.dll" "system" fn PxeProviderQueryIndex(pszprovidername : windows_core::PCWSTR, puindex : *mut u32) -> u32); - unsafe { PxeProviderQueryIndex(pszprovidername.param().abi(), core::mem::transmute(puindex)) } + unsafe { PxeProviderQueryIndex(pszprovidername.param().abi(), puindex as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -129,7 +129,7 @@ where P1: 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); - unsafe { PxeProviderRegister(pszprovidername.param().abi(), pszmodulepath.param().abi(), index, biscritical.into(), core::mem::transmute(phproviderkey.unwrap_or(core::mem::zeroed()))) } + unsafe { PxeProviderRegister(pszprovidername.param().abi(), pszmodulepath.param().abi(), index, biscritical.into(), phproviderkey.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn PxeProviderSetAttribute(hprovider: super::super::Foundation::HANDLE, attribute: u32, pparameterbuffer: *const core::ffi::c_void, uparamlen: u32) -> u32 { @@ -147,7 +147,7 @@ where #[inline] 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); - unsafe { PxeRegisterCallback(hprovider, callbacktype, pcallbackfunction, core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { PxeRegisterCallback(hprovider, callbacktype, pcallbackfunction, pcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn PxeSendReply(hclientrequest: super::super::Foundation::HANDLE, ppacket: *const core::ffi::c_void, upacketlen: u32, paddress: *const PXE_ADDRESS) -> u32 { @@ -183,32 +183,32 @@ pub unsafe fn WdsBpCloseHandle(hhandle: super::super::Foundation::HANDLE) -> u32 #[inline] 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); - unsafe { WdsBpGetOptionBuffer(hhandle, ubufferlen, core::mem::transmute(pbuffer), core::mem::transmute(pubytes)) } + unsafe { WdsBpGetOptionBuffer(hhandle, ubufferlen, pbuffer as _, pubytes as _) } } #[inline] pub unsafe fn WdsBpInitialize(bpackettype: u8, phhandle: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("wdsbp.dll" "system" fn WdsBpInitialize(bpackettype : u8, phhandle : *mut super::super::Foundation:: HANDLE) -> u32); - unsafe { WdsBpInitialize(bpackettype, core::mem::transmute(phhandle)) } + unsafe { WdsBpInitialize(bpackettype, phhandle as _) } } #[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); - unsafe { WdsBpParseInitialize(ppacket, upacketlen, core::mem::transmute(pbpackettype.unwrap_or(core::mem::zeroed())), core::mem::transmute(phhandle)) } + unsafe { WdsBpParseInitialize(ppacket, upacketlen, pbpackettype.unwrap_or(core::mem::zeroed()) as _, phhandle as _) } } #[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); - unsafe { WdsBpParseInitializev6(ppacket, upacketlen, core::mem::transmute(pbpackettype.unwrap_or(core::mem::zeroed())), core::mem::transmute(phhandle)) } + unsafe { WdsBpParseInitializev6(ppacket, upacketlen, pbpackettype.unwrap_or(core::mem::zeroed()) as _, phhandle as _) } } #[inline] 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); - unsafe { WdsBpQueryOption(hhandle, uoption, uvaluelen, core::mem::transmute(pvalue), core::mem::transmute(pubytes.unwrap_or(core::mem::zeroed()))) } + unsafe { WdsBpQueryOption(hhandle, uoption, uvaluelen, pvalue as _, pubytes.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { WdsCliAuthorizeSession(core::mem::transmute(hsession), core::mem::transmute(pcred.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WdsCliAuthorizeSession(hsession as _, pcred.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WdsCliCancelTransfer(htransfer: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -228,7 +228,7 @@ where windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliCreateSession(pwszserver : windows_core::PCWSTR, pcred : *const WDS_CLI_CRED, phsession : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - WdsCliCreateSession(pwszserver.param().abi(), core::mem::transmute(pcred.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + WdsCliCreateSession(pwszserver.param().abi(), pcred.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -287,7 +287,7 @@ pub unsafe fn WdsCliGetImageDescription(hifh: super::super::Foundation::HANDLE) #[inline] 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); - unsafe { WdsCliGetImageFiles(hifh, core::mem::transmute(pppwszfiles), core::mem::transmute(pdwcount)).ok() } + unsafe { WdsCliGetImageFiles(hifh, pppwszfiles as _, pdwcount as _).ok() } } #[inline] pub unsafe fn WdsCliGetImageGroup(hifh: super::super::Foundation::HANDLE) -> windows_core::Result { @@ -340,7 +340,7 @@ pub unsafe fn WdsCliGetImageLanguage(hifh: super::super::Foundation::HANDLE) -> #[inline] 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); - unsafe { WdsCliGetImageLanguages(hifh, core::mem::transmute(pppszvalues), core::mem::transmute(pdwnumvalues)).ok() } + unsafe { WdsCliGetImageLanguages(hifh, pppszvalues as _, pdwnumvalues as _).ok() } } #[inline] pub unsafe fn WdsCliGetImageLastModifiedTime(hifh: super::super::Foundation::HANDLE) -> windows_core::Result<*mut super::super::Foundation::SYSTEMTIME> { @@ -369,7 +369,7 @@ pub unsafe fn WdsCliGetImageNamespace(hifh: super::super::Foundation::HANDLE) -> #[inline] 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); - unsafe { WdsCliGetImageParameter(hifh, paramtype, core::mem::transmute(presponse), uresponselen).ok() } + unsafe { WdsCliGetImageParameter(hifh, paramtype, presponse as _, uresponselen).ok() } } #[inline] pub unsafe fn WdsCliGetImagePath(hifh: super::super::Foundation::HANDLE) -> windows_core::Result { @@ -428,7 +428,7 @@ pub unsafe fn WdsCliLog(hsession: super::super::Foundation::HANDLE, ulloglevel: #[inline] 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); - unsafe { WdsCliObtainDriverPackages(himage, core::mem::transmute(ppwszservername), core::mem::transmute(pppwszdriverpackages), core::mem::transmute(pulcount)).ok() } + unsafe { WdsCliObtainDriverPackages(himage, ppwszservername as _, pppwszdriverpackages as _, pulcount as _).ok() } } #[inline] 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<()> @@ -436,12 +436,12 @@ where 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); - unsafe { WdsCliObtainDriverPackagesEx(hsession, pwszmachineinfo.param().abi(), core::mem::transmute(ppwszservername), core::mem::transmute(pppwszdriverpackages), core::mem::transmute(pulcount)).ok() } + unsafe { WdsCliObtainDriverPackagesEx(hsession, pwszmachineinfo.param().abi(), ppwszservername as _, pppwszdriverpackages as _, pulcount as _).ok() } } #[inline] pub unsafe fn WdsCliRegisterTrace(pfn: Option) -> windows_core::Result<()> { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliRegisterTrace(pfn : PFN_WdsCliTraceFunction) -> windows_core::HRESULT); - unsafe { WdsCliRegisterTrace(core::mem::transmute(pfn.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WdsCliRegisterTrace(pfn.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WdsCliSetTransferBufferSize(ulsizeinbytes: u32) { @@ -459,7 +459,7 @@ where windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliTransferFile(pwszserver : windows_core::PCWSTR, pwsznamespace : windows_core::PCWSTR, pwszremotefilepath : windows_core::PCWSTR, pwszlocalfilepath : windows_core::PCWSTR, dwflags : u32, dwreserved : u32, pfnwdsclicallback : PFN_WdsCliCallback, pvuserdata : *const core::ffi::c_void, phtransfer : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - WdsCliTransferFile(pwszserver.param().abi(), pwsznamespace.param().abi(), pwszremotefilepath.param().abi(), pwszlocalfilepath.param().abi(), dwflags, 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__)) + WdsCliTransferFile(pwszserver.param().abi(), pwsznamespace.param().abi(), pwszremotefilepath.param().abi(), pwszlocalfilepath.param().abi(), dwflags, dwreserved, pfnwdsclicallback.unwrap_or(core::mem::zeroed()) as _, pvuserdata.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -470,7 +470,7 @@ where windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliTransferImage(himage : super::super::Foundation:: HANDLE, pwszlocalpath : windows_core::PCWSTR, dwflags : u32, dwreserved : u32, pfnwdsclicallback : PFN_WdsCliCallback, pvuserdata : *const core::ffi::c_void, phtransfer : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - WdsCliTransferImage(himage, pwszlocalpath.param().abi(), dwflags, 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__)) + WdsCliTransferImage(himage, pwszlocalpath.param().abi(), dwflags, dwreserved, pfnwdsclicallback.unwrap_or(core::mem::zeroed()) as _, pvuserdata.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -511,12 +511,12 @@ pub unsafe fn WdsTransportClientInitialize() -> u32 { #[inline] pub unsafe fn WdsTransportClientInitializeSession(psessionrequest: *const WDS_TRANSPORTCLIENT_REQUEST, pcallerdata: *const core::ffi::c_void, hsessionkey: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("wdstptc.dll" "system" fn WdsTransportClientInitializeSession(psessionrequest : *const WDS_TRANSPORTCLIENT_REQUEST, pcallerdata : *const core::ffi::c_void, hsessionkey : *mut super::super::Foundation:: HANDLE) -> u32); - unsafe { WdsTransportClientInitializeSession(psessionrequest, pcallerdata, core::mem::transmute(hsessionkey)) } + unsafe { WdsTransportClientInitializeSession(psessionrequest, pcallerdata, hsessionkey as _) } } #[inline] 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); - unsafe { WdsTransportClientQueryStatus(hsessionkey, core::mem::transmute(pustatus), core::mem::transmute(puerrorcode)) } + unsafe { WdsTransportClientQueryStatus(hsessionkey, pustatus as _, puerrorcode as _) } } #[inline] pub unsafe fn WdsTransportClientRegisterCallback(hsessionkey: super::super::Foundation::HANDLE, callbackid: TRANSPORTCLIENT_CALLBACK_ID, pfncallback: *const core::ffi::c_void) -> u32 { 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 ad6bd7d58d..c23c72c981 100644 --- a/crates/libs/windows/src/Windows/Win32/System/DesktopSharing/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/DesktopSharing/mod.rs @@ -874,7 +874,7 @@ impl IRDPSRAPIAudioStream { unsafe { (windows_core::Interface::vtable(self).Stop)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetBuffer(&self, ppbdata: *mut *mut u8, pcbdata: *mut u32, ptimestamp: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(ppbdata), core::mem::transmute(pcbdata), core::mem::transmute(ptimestamp)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), ppbdata as _, pcbdata as _, ptimestamp as _).ok() } } pub unsafe fn FreeBuffer(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).FreeBuffer)(windows_core::Interface::as_raw(self)).ok() } @@ -1677,7 +1677,7 @@ impl IRDPSRAPISharingSession { unsafe { (windows_core::Interface::vtable(self).SetDesktopSharedRect)(windows_core::Interface::as_raw(self), left, top, right, bottom).ok() } } pub unsafe fn GetDesktopSharedRect(&self, pleft: *mut i32, ptop: *mut i32, pright: *mut i32, pbottom: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesktopSharedRect)(windows_core::Interface::as_raw(self), core::mem::transmute(pleft), core::mem::transmute(ptop), core::mem::transmute(pright), core::mem::transmute(pbottom)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesktopSharedRect)(windows_core::Interface::as_raw(self), pleft as _, ptop as _, pright as _, pbottom as _).ok() } } } #[cfg(feature = "Win32_System_Com")] 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 490c0226d2..4ef5f81171 100644 --- a/crates/libs/windows/src/Windows/Win32/System/DeveloperLicensing/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/DeveloperLicensing/mod.rs @@ -3,7 +3,7 @@ pub unsafe fn AcquireDeveloperLicense(hwndparent: Option windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - AcquireDeveloperLicense(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + AcquireDeveloperLicense(hwndparent.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -17,5 +17,5 @@ pub unsafe fn CheckDeveloperLicense() -> windows_core::Result) -> windows_core::Result<()> { windows_targets::link!("wsclient.dll" "system" fn RemoveDeveloperLicense(hwndparent : super::super::Foundation:: HWND) -> windows_core::HRESULT); - unsafe { RemoveDeveloperLicense(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { RemoveDeveloperLicense(hwndparent.unwrap_or(core::mem::zeroed()) as _).ok() } } diff --git a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/ClrProfiling/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/ClrProfiling/mod.rs index bb59812d96..4ae9c5c0d9 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/ClrProfiling/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/ClrProfiling/mod.rs @@ -1393,7 +1393,7 @@ impl core::ops::Deref for ICorProfilerCallback11 { windows_core::imp::interface_hierarchy!(ICorProfilerCallback11, windows_core::IUnknown, ICorProfilerCallback, ICorProfilerCallback2, ICorProfilerCallback3, ICorProfilerCallback4, ICorProfilerCallback5, ICorProfilerCallback6, ICorProfilerCallback7, ICorProfilerCallback8, ICorProfilerCallback9, ICorProfilerCallback10); impl ICorProfilerCallback11 { pub unsafe fn LoadAsNotificationOnly(&self, pbnotificationonly: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).LoadAsNotificationOnly)(windows_core::Interface::as_raw(self), core::mem::transmute(pbnotificationonly)).ok() } + unsafe { (windows_core::Interface::vtable(self).LoadAsNotificationOnly)(windows_core::Interface::as_raw(self), pbnotificationonly as _).ok() } } } #[repr(C)] @@ -1991,7 +1991,7 @@ impl ICorProfilerFunctionEnum { } } pub unsafe fn Next(&self, ids: &mut [COR_PRF_FUNCTION], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ids.len().try_into().unwrap(), core::mem::transmute(ids.as_ptr()), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ids.len().try_into().unwrap(), core::mem::transmute(ids.as_ptr()), pceltfetched as _).ok() } } } #[repr(C)] @@ -2084,7 +2084,7 @@ impl ICorProfilerInfo { } } pub unsafe fn GetCodeInfo(&self, functionid: usize, pstart: *mut *mut u8, pcsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCodeInfo)(windows_core::Interface::as_raw(self), functionid, core::mem::transmute(pstart), core::mem::transmute(pcsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCodeInfo)(windows_core::Interface::as_raw(self), functionid, pstart as _, pcsize as _).ok() } } pub unsafe fn GetEventMask(&self) -> windows_core::Result { unsafe { @@ -2118,7 +2118,7 @@ impl ICorProfilerInfo { } #[cfg(feature = "Win32_System_WinRT_Metadata")] pub unsafe fn IsArrayClass(&self, classid: usize, pbaseelemtype: *mut super::super::WinRT::Metadata::CorElementType, pbaseclassid: *mut usize, pcrank: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsArrayClass)(windows_core::Interface::as_raw(self), classid, core::mem::transmute(pbaseelemtype), core::mem::transmute(pbaseclassid), core::mem::transmute(pcrank)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsArrayClass)(windows_core::Interface::as_raw(self), classid, pbaseelemtype as _, pbaseclassid as _, pcrank as _).ok() } } pub unsafe fn GetThreadInfo(&self, threadid: usize) -> windows_core::Result { unsafe { @@ -2133,10 +2133,10 @@ impl ICorProfilerInfo { } } pub unsafe fn GetClassIDInfo(&self, classid: usize, pmoduleid: *mut usize, ptypedeftoken: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClassIDInfo)(windows_core::Interface::as_raw(self), classid, core::mem::transmute(pmoduleid), core::mem::transmute(ptypedeftoken)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClassIDInfo)(windows_core::Interface::as_raw(self), classid, pmoduleid as _, ptypedeftoken as _).ok() } } pub unsafe fn GetFunctionInfo(&self, functionid: usize, pclassid: *mut usize, pmoduleid: *mut usize, ptoken: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFunctionInfo)(windows_core::Interface::as_raw(self), functionid, core::mem::transmute(pclassid), core::mem::transmute(pmoduleid), core::mem::transmute(ptoken)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFunctionInfo)(windows_core::Interface::as_raw(self), functionid, pclassid as _, pmoduleid as _, ptoken as _).ok() } } pub unsafe fn SetEventMask(&self, dwevents: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetEventMask)(windows_core::Interface::as_raw(self), dwevents).ok() } @@ -2148,10 +2148,10 @@ impl ICorProfilerInfo { unsafe { (windows_core::Interface::vtable(self).SetFunctionIDMapper)(windows_core::Interface::as_raw(self), pfunc).ok() } } pub unsafe fn GetTokenAndMetaDataFromFunction(&self, functionid: usize, riid: *const windows_core::GUID, ppimport: *mut Option, ptoken: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTokenAndMetaDataFromFunction)(windows_core::Interface::as_raw(self), functionid, riid, core::mem::transmute(ppimport), core::mem::transmute(ptoken)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTokenAndMetaDataFromFunction)(windows_core::Interface::as_raw(self), functionid, riid, core::mem::transmute(ppimport), ptoken as _).ok() } } pub unsafe fn GetModuleInfo(&self, moduleid: usize, ppbaseloadaddress: *mut *mut u8, pcchname: *mut u32, szname: &mut [u16], passemblyid: *mut usize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetModuleInfo)(windows_core::Interface::as_raw(self), moduleid, core::mem::transmute(ppbaseloadaddress), szname.len().try_into().unwrap(), core::mem::transmute(pcchname), core::mem::transmute(szname.as_ptr()), core::mem::transmute(passemblyid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleInfo)(windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress as _, szname.len().try_into().unwrap(), pcchname as _, core::mem::transmute(szname.as_ptr()), passemblyid as _).ok() } } pub unsafe fn GetModuleMetaData(&self, moduleid: usize, dwopenflags: u32, riid: *const windows_core::GUID) -> windows_core::Result { unsafe { @@ -2160,7 +2160,7 @@ impl ICorProfilerInfo { } } pub unsafe fn GetILFunctionBody(&self, moduleid: usize, methodid: u32, ppmethodheader: *mut *mut u8, pcbmethodsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetILFunctionBody)(windows_core::Interface::as_raw(self), moduleid, methodid, core::mem::transmute(ppmethodheader), core::mem::transmute(pcbmethodsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetILFunctionBody)(windows_core::Interface::as_raw(self), moduleid, methodid, ppmethodheader as _, pcbmethodsize as _).ok() } } pub unsafe fn GetILFunctionBodyAllocator(&self, moduleid: usize) -> windows_core::Result { unsafe { @@ -2172,10 +2172,10 @@ impl ICorProfilerInfo { unsafe { (windows_core::Interface::vtable(self).SetILFunctionBody)(windows_core::Interface::as_raw(self), moduleid, methodid, pbnewilmethodheader).ok() } } pub unsafe fn GetAppDomainInfo(&self, appdomainid: usize, pcchname: *mut u32, szname: &mut [u16], pprocessid: *mut usize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAppDomainInfo)(windows_core::Interface::as_raw(self), appdomainid, szname.len().try_into().unwrap(), core::mem::transmute(pcchname), core::mem::transmute(szname.as_ptr()), core::mem::transmute(pprocessid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAppDomainInfo)(windows_core::Interface::as_raw(self), appdomainid, szname.len().try_into().unwrap(), pcchname as _, core::mem::transmute(szname.as_ptr()), pprocessid as _).ok() } } pub unsafe fn GetAssemblyInfo(&self, assemblyid: usize, pcchname: *mut u32, szname: &mut [u16], pappdomainid: *mut usize, pmoduleid: *mut usize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAssemblyInfo)(windows_core::Interface::as_raw(self), assemblyid, szname.len().try_into().unwrap(), core::mem::transmute(pcchname), core::mem::transmute(szname.as_ptr()), core::mem::transmute(pappdomainid), core::mem::transmute(pmoduleid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAssemblyInfo)(windows_core::Interface::as_raw(self), assemblyid, szname.len().try_into().unwrap(), pcchname as _, core::mem::transmute(szname.as_ptr()), pappdomainid as _, pmoduleid as _).ok() } } pub unsafe fn SetFunctionReJIT(&self, functionid: usize) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetFunctionReJIT)(windows_core::Interface::as_raw(self), functionid).ok() } @@ -2214,7 +2214,7 @@ impl ICorProfilerInfo { unsafe { (windows_core::Interface::vtable(self).EndInprocDebugging)(windows_core::Interface::as_raw(self), dwprofilercontext).ok() } } pub unsafe fn GetILToNativeMapping(&self, functionid: usize, pcmap: *mut u32, map: &mut [COR_DEBUG_IL_TO_NATIVE_MAP]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetILToNativeMapping)(windows_core::Interface::as_raw(self), functionid, map.len().try_into().unwrap(), core::mem::transmute(pcmap), core::mem::transmute(map.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).GetILToNativeMapping)(windows_core::Interface::as_raw(self), functionid, map.len().try_into().unwrap(), pcmap as _, core::mem::transmute(map.as_ptr())).ok() } } } #[repr(C)] @@ -2637,13 +2637,13 @@ impl core::ops::Deref for ICorProfilerInfo10 { windows_core::imp::interface_hierarchy!(ICorProfilerInfo10, windows_core::IUnknown, ICorProfilerInfo, ICorProfilerInfo2, ICorProfilerInfo3, ICorProfilerInfo4, ICorProfilerInfo5, ICorProfilerInfo6, ICorProfilerInfo7, ICorProfilerInfo8, ICorProfilerInfo9); impl ICorProfilerInfo10 { pub unsafe fn EnumerateObjectReferences(&self, objectid: usize, callback: ObjectReferenceCallback, clientdata: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumerateObjectReferences)(windows_core::Interface::as_raw(self), objectid, callback, core::mem::transmute(clientdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumerateObjectReferences)(windows_core::Interface::as_raw(self), objectid, callback, clientdata as _).ok() } } pub unsafe fn IsFrozenObject(&self, objectid: usize, pbfrozen: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsFrozenObject)(windows_core::Interface::as_raw(self), objectid, core::mem::transmute(pbfrozen)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsFrozenObject)(windows_core::Interface::as_raw(self), objectid, pbfrozen as _).ok() } } pub unsafe fn GetLOHObjectSizeThreshold(&self, pthreshold: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLOHObjectSizeThreshold)(windows_core::Interface::as_raw(self), core::mem::transmute(pthreshold)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLOHObjectSizeThreshold)(windows_core::Interface::as_raw(self), pthreshold as _).ok() } } pub unsafe fn RequestReJITWithInliners(&self, dwrejitflags: u32, cfunctions: u32, moduleids: *const usize, methodids: *const u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RequestReJITWithInliners)(windows_core::Interface::as_raw(self), dwrejitflags, cfunctions, moduleids, methodids).ok() } @@ -2742,7 +2742,7 @@ impl ICorProfilerInfo11 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetEnvironmentVariableA)(windows_core::Interface::as_raw(self), szname.param().abi(), szvalue.len().try_into().unwrap(), core::mem::transmute(pcchvalue), core::mem::transmute(szvalue.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEnvironmentVariableA)(windows_core::Interface::as_raw(self), szname.param().abi(), szvalue.len().try_into().unwrap(), pcchvalue as _, core::mem::transmute(szvalue.as_ptr())).ok() } } pub unsafe fn SetEnvironmentVariable(&self, szname: P0, szvalue: P1) -> windows_core::Result<()> where @@ -2821,7 +2821,7 @@ impl ICorProfilerInfo12 { } } pub unsafe fn EventPipeGetProviderInfo(&self, provider: usize, pcchname: *mut u32, providername: &mut [u16]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EventPipeGetProviderInfo)(windows_core::Interface::as_raw(self), provider, providername.len().try_into().unwrap(), core::mem::transmute(pcchname), core::mem::transmute(providername.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).EventPipeGetProviderInfo)(windows_core::Interface::as_raw(self), provider, providername.len().try_into().unwrap(), pcchname as _, core::mem::transmute(providername.as_ptr())).ok() } } pub unsafe fn EventPipeDefineEvent(&self, provider: usize, eventname: P1, eventid: u32, keywords: u64, eventversion: u32, level: u32, opcode: u8, needstack: bool, pparamdescs: &[COR_PRF_EVENTPIPE_PARAM_DESC]) -> windows_core::Result where @@ -2947,7 +2947,7 @@ impl core::ops::Deref for ICorProfilerInfo13 { windows_core::imp::interface_hierarchy!(ICorProfilerInfo13, windows_core::IUnknown, ICorProfilerInfo, ICorProfilerInfo2, ICorProfilerInfo3, ICorProfilerInfo4, ICorProfilerInfo5, ICorProfilerInfo6, ICorProfilerInfo7, ICorProfilerInfo8, ICorProfilerInfo9, ICorProfilerInfo10, ICorProfilerInfo11, ICorProfilerInfo12); impl ICorProfilerInfo13 { pub unsafe fn CreateHandle(&self, object: usize, r#type: COR_PRF_HANDLE_TYPE, phandle: *mut *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateHandle)(windows_core::Interface::as_raw(self), object, r#type, core::mem::transmute(phandle)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateHandle)(windows_core::Interface::as_raw(self), object, r#type, phandle as _).ok() } } pub unsafe fn DestroyHandle(&self, handle: *const *const core::ffi::c_void) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DestroyHandle)(windows_core::Interface::as_raw(self), handle).ok() } @@ -3040,7 +3040,7 @@ impl ICorProfilerInfo14 { } } pub unsafe fn GetNonGCHeapBounds(&self, pcobjectranges: *mut u32, ranges: &mut [COR_PRF_NONGC_HEAP_RANGE]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNonGCHeapBounds)(windows_core::Interface::as_raw(self), ranges.len().try_into().unwrap(), core::mem::transmute(pcobjectranges), core::mem::transmute(ranges.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNonGCHeapBounds)(windows_core::Interface::as_raw(self), ranges.len().try_into().unwrap(), pcobjectranges as _, core::mem::transmute(ranges.as_ptr())).ok() } } pub unsafe fn EventPipeCreateProvider2(&self, providername: P0, pcallback: *const EventPipeProviderCallback) -> windows_core::Result where @@ -3140,20 +3140,20 @@ impl ICorProfilerInfo2 { unsafe { (windows_core::Interface::vtable(self).SetEnterLeaveFunctionHooks2)(windows_core::Interface::as_raw(self), pfuncenter, pfuncleave, pfunctailcall).ok() } } pub unsafe fn GetFunctionInfo2(&self, funcid: usize, frameinfo: usize, pclassid: *mut usize, pmoduleid: *mut usize, ptoken: *mut u32, ctypeargs: u32, pctypeargs: *mut u32, typeargs: *mut usize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFunctionInfo2)(windows_core::Interface::as_raw(self), funcid, frameinfo, core::mem::transmute(pclassid), core::mem::transmute(pmoduleid), core::mem::transmute(ptoken), ctypeargs, core::mem::transmute(pctypeargs), core::mem::transmute(typeargs)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFunctionInfo2)(windows_core::Interface::as_raw(self), funcid, frameinfo, pclassid as _, pmoduleid as _, ptoken as _, ctypeargs, pctypeargs as _, typeargs as _).ok() } } pub unsafe fn GetStringLayout(&self, pbufferlengthoffset: *mut u32, pstringlengthoffset: *mut u32, pbufferoffset: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStringLayout)(windows_core::Interface::as_raw(self), core::mem::transmute(pbufferlengthoffset), core::mem::transmute(pstringlengthoffset), core::mem::transmute(pbufferoffset)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStringLayout)(windows_core::Interface::as_raw(self), pbufferlengthoffset as _, pstringlengthoffset as _, pbufferoffset as _).ok() } } #[cfg(feature = "Win32_System_WinRT_Metadata")] pub unsafe fn GetClassLayout(&self, classid: usize, rfieldoffset: *mut super::super::WinRT::Metadata::COR_FIELD_OFFSET, cfieldoffset: u32, pcfieldoffset: *mut u32, pulclasssize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClassLayout)(windows_core::Interface::as_raw(self), classid, core::mem::transmute(rfieldoffset), cfieldoffset, core::mem::transmute(pcfieldoffset), core::mem::transmute(pulclasssize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClassLayout)(windows_core::Interface::as_raw(self), classid, rfieldoffset as _, cfieldoffset, pcfieldoffset as _, pulclasssize as _).ok() } } pub unsafe fn GetClassIDInfo2(&self, classid: usize, pmoduleid: *mut usize, ptypedeftoken: *mut u32, pparentclassid: *mut usize, cnumtypeargs: u32, pcnumtypeargs: *mut u32, typeargs: *mut usize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClassIDInfo2)(windows_core::Interface::as_raw(self), classid, core::mem::transmute(pmoduleid), core::mem::transmute(ptypedeftoken), core::mem::transmute(pparentclassid), cnumtypeargs, core::mem::transmute(pcnumtypeargs), core::mem::transmute(typeargs)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClassIDInfo2)(windows_core::Interface::as_raw(self), classid, pmoduleid as _, ptypedeftoken as _, pparentclassid as _, cnumtypeargs, pcnumtypeargs as _, typeargs as _).ok() } } pub unsafe fn GetCodeInfo2(&self, functionid: usize, pccodeinfos: *mut u32, codeinfos: &mut [COR_PRF_CODE_INFO]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCodeInfo2)(windows_core::Interface::as_raw(self), functionid, codeinfos.len().try_into().unwrap(), core::mem::transmute(pccodeinfos), core::mem::transmute(codeinfos.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCodeInfo2)(windows_core::Interface::as_raw(self), functionid, codeinfos.len().try_into().unwrap(), pccodeinfos as _, core::mem::transmute(codeinfos.as_ptr())).ok() } } pub unsafe fn GetClassFromTokenAndTypeArgs(&self, moduleid: usize, typedef: u32, typeargs: &[usize]) -> windows_core::Result { unsafe { @@ -3174,7 +3174,7 @@ impl ICorProfilerInfo2 { } } pub unsafe fn GetArrayObjectInfo(&self, objectid: usize, cdimensions: u32, pdimensionsizes: *mut u32, pdimensionlowerbounds: *mut i32, ppdata: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetArrayObjectInfo)(windows_core::Interface::as_raw(self), objectid, cdimensions, core::mem::transmute(pdimensionsizes), core::mem::transmute(pdimensionlowerbounds), core::mem::transmute(ppdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetArrayObjectInfo)(windows_core::Interface::as_raw(self), objectid, cdimensions, pdimensionsizes as _, pdimensionlowerbounds as _, ppdata as _).ok() } } pub unsafe fn GetBoxClassLayout(&self, classid: usize) -> windows_core::Result { unsafe { @@ -3189,16 +3189,16 @@ impl ICorProfilerInfo2 { } } pub unsafe fn GetRVAStaticAddress(&self, classid: usize, fieldtoken: u32, ppaddress: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRVAStaticAddress)(windows_core::Interface::as_raw(self), classid, fieldtoken, core::mem::transmute(ppaddress)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRVAStaticAddress)(windows_core::Interface::as_raw(self), classid, fieldtoken, ppaddress as _).ok() } } pub unsafe fn GetAppDomainStaticAddress(&self, classid: usize, fieldtoken: u32, appdomainid: usize, ppaddress: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAppDomainStaticAddress)(windows_core::Interface::as_raw(self), classid, fieldtoken, appdomainid, core::mem::transmute(ppaddress)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAppDomainStaticAddress)(windows_core::Interface::as_raw(self), classid, fieldtoken, appdomainid, ppaddress as _).ok() } } pub unsafe fn GetThreadStaticAddress(&self, classid: usize, fieldtoken: u32, threadid: usize, ppaddress: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetThreadStaticAddress)(windows_core::Interface::as_raw(self), classid, fieldtoken, threadid, core::mem::transmute(ppaddress)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetThreadStaticAddress)(windows_core::Interface::as_raw(self), classid, fieldtoken, threadid, ppaddress as _).ok() } } pub unsafe fn GetContextStaticAddress(&self, classid: usize, fieldtoken: u32, contextid: usize, ppaddress: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetContextStaticAddress)(windows_core::Interface::as_raw(self), classid, fieldtoken, contextid, core::mem::transmute(ppaddress)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetContextStaticAddress)(windows_core::Interface::as_raw(self), classid, fieldtoken, contextid, ppaddress as _).ok() } } pub unsafe fn GetStaticFieldInfo(&self, classid: usize, fieldtoken: u32) -> windows_core::Result { unsafe { @@ -3207,7 +3207,7 @@ impl ICorProfilerInfo2 { } } pub unsafe fn GetGenerationBounds(&self, pcobjectranges: *mut u32, ranges: &mut [COR_PRF_GC_GENERATION_RANGE]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGenerationBounds)(windows_core::Interface::as_raw(self), ranges.len().try_into().unwrap(), core::mem::transmute(pcobjectranges), core::mem::transmute(ranges.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGenerationBounds)(windows_core::Interface::as_raw(self), ranges.len().try_into().unwrap(), pcobjectranges as _, core::mem::transmute(ranges.as_ptr())).ok() } } pub unsafe fn GetObjectGeneration(&self, objectid: usize) -> windows_core::Result { unsafe { @@ -3504,7 +3504,7 @@ impl ICorProfilerInfo3 { unsafe { (windows_core::Interface::vtable(self).SetFunctionIDMapper2)(windows_core::Interface::as_raw(self), pfunc, clientdata).ok() } } pub unsafe fn GetStringLayout2(&self, pstringlengthoffset: *mut u32, pbufferoffset: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStringLayout2)(windows_core::Interface::as_raw(self), core::mem::transmute(pstringlengthoffset), core::mem::transmute(pbufferoffset)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStringLayout2)(windows_core::Interface::as_raw(self), pstringlengthoffset as _, pbufferoffset as _).ok() } } pub unsafe fn SetEnterLeaveFunctionHooks3(&self, pfuncenter3: *const FunctionEnter3, pfuncleave3: *const FunctionLeave3, pfunctailcall3: *const FunctionTailcall3) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetEnterLeaveFunctionHooks3)(windows_core::Interface::as_raw(self), pfuncenter3, pfuncleave3, pfunctailcall3).ok() } @@ -3513,10 +3513,10 @@ impl ICorProfilerInfo3 { unsafe { (windows_core::Interface::vtable(self).SetEnterLeaveFunctionHooks3WithInfo)(windows_core::Interface::as_raw(self), pfuncenter3withinfo, pfuncleave3withinfo, pfunctailcall3withinfo).ok() } } pub unsafe fn GetFunctionEnter3Info(&self, functionid: usize, eltinfo: usize, pframeinfo: *mut usize, pcbargumentinfo: *mut u32, pargumentinfo: *mut COR_PRF_FUNCTION_ARGUMENT_INFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFunctionEnter3Info)(windows_core::Interface::as_raw(self), functionid, eltinfo, core::mem::transmute(pframeinfo), core::mem::transmute(pcbargumentinfo), core::mem::transmute(pargumentinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFunctionEnter3Info)(windows_core::Interface::as_raw(self), functionid, eltinfo, pframeinfo as _, pcbargumentinfo as _, pargumentinfo as _).ok() } } pub unsafe fn GetFunctionLeave3Info(&self, functionid: usize, eltinfo: usize, pframeinfo: *mut usize, pretvalrange: *mut COR_PRF_FUNCTION_ARGUMENT_RANGE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFunctionLeave3Info)(windows_core::Interface::as_raw(self), functionid, eltinfo, core::mem::transmute(pframeinfo), core::mem::transmute(pretvalrange)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFunctionLeave3Info)(windows_core::Interface::as_raw(self), functionid, eltinfo, pframeinfo as _, pretvalrange as _).ok() } } pub unsafe fn GetFunctionTailcall3Info(&self, functionid: usize, eltinfo: usize) -> windows_core::Result { unsafe { @@ -3531,16 +3531,16 @@ impl ICorProfilerInfo3 { } } pub unsafe fn GetRuntimeInformation(&self, pclrinstanceid: *mut u16, pruntimetype: *mut COR_PRF_RUNTIME_TYPE, pmajorversion: *mut u16, pminorversion: *mut u16, pbuildnumber: *mut u16, pqfeversion: *mut u16, pcchversionstring: *mut u32, szversionstring: &mut [u16]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRuntimeInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(pclrinstanceid), core::mem::transmute(pruntimetype), core::mem::transmute(pmajorversion), core::mem::transmute(pminorversion), core::mem::transmute(pbuildnumber), core::mem::transmute(pqfeversion), szversionstring.len().try_into().unwrap(), core::mem::transmute(pcchversionstring), core::mem::transmute(szversionstring.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRuntimeInformation)(windows_core::Interface::as_raw(self), pclrinstanceid as _, pruntimetype as _, pmajorversion as _, pminorversion as _, pbuildnumber as _, pqfeversion as _, szversionstring.len().try_into().unwrap(), pcchversionstring as _, core::mem::transmute(szversionstring.as_ptr())).ok() } } pub unsafe fn GetThreadStaticAddress2(&self, classid: usize, fieldtoken: u32, appdomainid: usize, threadid: usize, ppaddress: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetThreadStaticAddress2)(windows_core::Interface::as_raw(self), classid, fieldtoken, appdomainid, threadid, core::mem::transmute(ppaddress)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetThreadStaticAddress2)(windows_core::Interface::as_raw(self), classid, fieldtoken, appdomainid, threadid, ppaddress as _).ok() } } pub unsafe fn GetAppDomainsContainingModule(&self, moduleid: usize, pcappdomainids: *mut u32, appdomainids: &mut [usize]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAppDomainsContainingModule)(windows_core::Interface::as_raw(self), moduleid, appdomainids.len().try_into().unwrap(), core::mem::transmute(pcappdomainids), core::mem::transmute(appdomainids.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAppDomainsContainingModule)(windows_core::Interface::as_raw(self), moduleid, appdomainids.len().try_into().unwrap(), pcappdomainids as _, core::mem::transmute(appdomainids.as_ptr())).ok() } } pub unsafe fn GetModuleInfo2(&self, moduleid: usize, ppbaseloadaddress: *mut *mut u8, pcchname: *mut u32, szname: &mut [u16], passemblyid: *mut usize, pdwmoduleflags: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetModuleInfo2)(windows_core::Interface::as_raw(self), moduleid, core::mem::transmute(ppbaseloadaddress), szname.len().try_into().unwrap(), core::mem::transmute(pcchname), core::mem::transmute(szname.as_ptr()), core::mem::transmute(passemblyid), core::mem::transmute(pdwmoduleflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleInfo2)(windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress as _, szname.len().try_into().unwrap(), pcchname as _, core::mem::transmute(szname.as_ptr()), passemblyid as _, pdwmoduleflags as _).ok() } } } #[repr(C)] @@ -3729,19 +3729,19 @@ impl ICorProfilerInfo4 { unsafe { (windows_core::Interface::vtable(self).RequestReJIT)(windows_core::Interface::as_raw(self), cfunctions, moduleids, methodids).ok() } } pub unsafe fn RequestRevert(&self, cfunctions: u32, moduleids: *const usize, methodids: *const u32, status: *mut windows_core::HRESULT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RequestRevert)(windows_core::Interface::as_raw(self), cfunctions, moduleids, methodids, core::mem::transmute(status)).ok() } + unsafe { (windows_core::Interface::vtable(self).RequestRevert)(windows_core::Interface::as_raw(self), cfunctions, moduleids, methodids, status as _).ok() } } pub unsafe fn GetCodeInfo3(&self, functionid: usize, rejitid: usize, pccodeinfos: *mut u32, codeinfos: &mut [COR_PRF_CODE_INFO]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCodeInfo3)(windows_core::Interface::as_raw(self), functionid, rejitid, codeinfos.len().try_into().unwrap(), core::mem::transmute(pccodeinfos), core::mem::transmute(codeinfos.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCodeInfo3)(windows_core::Interface::as_raw(self), functionid, rejitid, codeinfos.len().try_into().unwrap(), pccodeinfos as _, core::mem::transmute(codeinfos.as_ptr())).ok() } } pub unsafe fn GetFunctionFromIP2(&self, ip: *const u8, pfunctionid: *mut usize, prejitid: *mut usize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFunctionFromIP2)(windows_core::Interface::as_raw(self), ip, core::mem::transmute(pfunctionid), core::mem::transmute(prejitid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFunctionFromIP2)(windows_core::Interface::as_raw(self), ip, pfunctionid as _, prejitid as _).ok() } } pub unsafe fn GetReJITIDs(&self, functionid: usize, pcrejitids: *mut u32, rejitids: &mut [usize]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetReJITIDs)(windows_core::Interface::as_raw(self), functionid, rejitids.len().try_into().unwrap(), core::mem::transmute(pcrejitids), core::mem::transmute(rejitids.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).GetReJITIDs)(windows_core::Interface::as_raw(self), functionid, rejitids.len().try_into().unwrap(), pcrejitids as _, core::mem::transmute(rejitids.as_ptr())).ok() } } pub unsafe fn GetILToNativeMapping2(&self, functionid: usize, rejitid: usize, pcmap: *mut u32, map: &mut [COR_DEBUG_IL_TO_NATIVE_MAP]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetILToNativeMapping2)(windows_core::Interface::as_raw(self), functionid, rejitid, map.len().try_into().unwrap(), core::mem::transmute(pcmap), core::mem::transmute(map.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).GetILToNativeMapping2)(windows_core::Interface::as_raw(self), functionid, rejitid, map.len().try_into().unwrap(), pcmap as _, core::mem::transmute(map.as_ptr())).ok() } } pub unsafe fn EnumJITedFunctions2(&self) -> windows_core::Result { unsafe { @@ -3894,7 +3894,7 @@ impl core::ops::Deref for ICorProfilerInfo5 { windows_core::imp::interface_hierarchy!(ICorProfilerInfo5, windows_core::IUnknown, ICorProfilerInfo, ICorProfilerInfo2, ICorProfilerInfo3, ICorProfilerInfo4); impl ICorProfilerInfo5 { pub unsafe fn GetEventMask2(&self, pdweventslow: *mut u32, pdweventshigh: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEventMask2)(windows_core::Interface::as_raw(self), core::mem::transmute(pdweventslow), core::mem::transmute(pdweventshigh)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventMask2)(windows_core::Interface::as_raw(self), pdweventslow as _, pdweventshigh as _).ok() } } pub unsafe fn SetEventMask2(&self, dweventslow: u32, dweventshigh: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetEventMask2)(windows_core::Interface::as_raw(self), dweventslow, dweventshigh).ok() } @@ -3948,7 +3948,7 @@ impl core::ops::Deref for ICorProfilerInfo6 { windows_core::imp::interface_hierarchy!(ICorProfilerInfo6, windows_core::IUnknown, ICorProfilerInfo, ICorProfilerInfo2, ICorProfilerInfo3, ICorProfilerInfo4, ICorProfilerInfo5); impl ICorProfilerInfo6 { pub unsafe fn EnumNgenModuleMethodsInliningThisMethod(&self, inlinersmoduleid: usize, inlineemoduleid: usize, inlineemethodid: u32, incompletedata: *mut super::super::super::Foundation::BOOL, ppenum: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumNgenModuleMethodsInliningThisMethod)(windows_core::Interface::as_raw(self), inlinersmoduleid, inlineemoduleid, inlineemethodid, core::mem::transmute(incompletedata), core::mem::transmute(ppenum)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumNgenModuleMethodsInliningThisMethod)(windows_core::Interface::as_raw(self), inlinersmoduleid, inlineemoduleid, inlineemethodid, incompletedata as _, core::mem::transmute(ppenum)).ok() } } } #[repr(C)] @@ -3999,7 +3999,7 @@ impl ICorProfilerInfo7 { } } pub unsafe fn ReadInMemorySymbols(&self, moduleid: usize, symbolsreadoffset: u32, psymbolbytes: *mut u8, countsymbolbytes: u32, pcountsymbolbytesread: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadInMemorySymbols)(windows_core::Interface::as_raw(self), moduleid, symbolsreadoffset, core::mem::transmute(psymbolbytes), countsymbolbytes, core::mem::transmute(pcountsymbolbytesread)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadInMemorySymbols)(windows_core::Interface::as_raw(self), moduleid, symbolsreadoffset, psymbolbytes as _, countsymbolbytes, pcountsymbolbytesread as _).ok() } } } #[repr(C)] @@ -4071,10 +4071,10 @@ impl ICorProfilerInfo8 { } } pub unsafe fn GetFunctionFromIP3(&self, ip: *const u8, functionid: *mut usize, prejitid: *mut usize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFunctionFromIP3)(windows_core::Interface::as_raw(self), ip, core::mem::transmute(functionid), core::mem::transmute(prejitid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFunctionFromIP3)(windows_core::Interface::as_raw(self), ip, functionid as _, prejitid as _).ok() } } pub unsafe fn GetDynamicFunctionInfo(&self, functionid: usize, moduleid: *mut usize, ppvsig: *mut *mut u8, pbsig: *mut u32, cchname: u32, pcchname: *mut u32, wszname: windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDynamicFunctionInfo)(windows_core::Interface::as_raw(self), functionid, core::mem::transmute(moduleid), core::mem::transmute(ppvsig), core::mem::transmute(pbsig), cchname, core::mem::transmute(pcchname), core::mem::transmute(wszname)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDynamicFunctionInfo)(windows_core::Interface::as_raw(self), functionid, moduleid as _, ppvsig as _, pbsig as _, cchname, pcchname as _, core::mem::transmute(wszname)).ok() } } } #[repr(C)] @@ -4140,13 +4140,13 @@ impl core::ops::Deref for ICorProfilerInfo9 { windows_core::imp::interface_hierarchy!(ICorProfilerInfo9, windows_core::IUnknown, ICorProfilerInfo, ICorProfilerInfo2, ICorProfilerInfo3, ICorProfilerInfo4, ICorProfilerInfo5, ICorProfilerInfo6, ICorProfilerInfo7, ICorProfilerInfo8); impl ICorProfilerInfo9 { pub unsafe fn GetNativeCodeStartAddresses(&self, functionid: usize, rejitid: usize, ccodestartaddresses: u32, pccodestartaddresses: *mut u32, codestartaddresses: *mut usize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNativeCodeStartAddresses)(windows_core::Interface::as_raw(self), functionid, rejitid, ccodestartaddresses, core::mem::transmute(pccodestartaddresses), core::mem::transmute(codestartaddresses)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNativeCodeStartAddresses)(windows_core::Interface::as_raw(self), functionid, rejitid, ccodestartaddresses, pccodestartaddresses as _, codestartaddresses as _).ok() } } pub unsafe fn GetILToNativeMapping3(&self, pnativecodestartaddress: usize, cmap: u32, pcmap: *mut u32, map: *mut COR_DEBUG_IL_TO_NATIVE_MAP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetILToNativeMapping3)(windows_core::Interface::as_raw(self), pnativecodestartaddress, cmap, core::mem::transmute(pcmap), core::mem::transmute(map)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetILToNativeMapping3)(windows_core::Interface::as_raw(self), pnativecodestartaddress, cmap, pcmap as _, map as _).ok() } } pub unsafe fn GetCodeInfo4(&self, pnativecodestartaddress: usize, ccodeinfos: u32, pccodeinfos: *mut u32, codeinfos: *mut COR_PRF_CODE_INFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCodeInfo4)(windows_core::Interface::as_raw(self), pnativecodestartaddress, ccodeinfos, core::mem::transmute(pccodeinfos), core::mem::transmute(codeinfos)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCodeInfo4)(windows_core::Interface::as_raw(self), pnativecodestartaddress, ccodeinfos, pccodeinfos as _, codeinfos as _).ok() } } } #[repr(C)] @@ -4218,7 +4218,7 @@ impl ICorProfilerMethodEnum { } } pub unsafe fn Next(&self, elements: &mut [COR_PRF_METHOD], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), elements.len().try_into().unwrap(), core::mem::transmute(elements.as_ptr()), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), elements.len().try_into().unwrap(), core::mem::transmute(elements.as_ptr()), pceltfetched as _).ok() } } } #[repr(C)] @@ -4317,7 +4317,7 @@ impl ICorProfilerModuleEnum { } } pub unsafe fn Next(&self, ids: &mut [usize], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ids.len().try_into().unwrap(), core::mem::transmute(ids.as_ptr()), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ids.len().try_into().unwrap(), core::mem::transmute(ids.as_ptr()), pceltfetched as _).ok() } } } #[repr(C)] @@ -4416,7 +4416,7 @@ impl ICorProfilerObjectEnum { } } pub unsafe fn Next(&self, objects: &mut [usize], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), objects.len().try_into().unwrap(), core::mem::transmute(objects.as_ptr()), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), objects.len().try_into().unwrap(), core::mem::transmute(objects.as_ptr()), pceltfetched as _).ok() } } } #[repr(C)] @@ -4515,7 +4515,7 @@ impl ICorProfilerThreadEnum { } } pub unsafe fn Next(&self, ids: &mut [usize], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ids.len().try_into().unwrap(), core::mem::transmute(ids.as_ptr()), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ids.len().try_into().unwrap(), core::mem::transmute(ids.as_ptr()), pceltfetched as _).ok() } } } #[repr(C)] 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 806dc8348f..492d0e9d65 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 @@ -544,14 +544,14 @@ impl IActiveScriptAuthor { P0: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetScriptTextAttributes)(windows_core::Interface::as_raw(self), pszcode.param().abi(), cch, pszdelimiter.param().abi(), dwflags, core::mem::transmute(pattr)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScriptTextAttributes)(windows_core::Interface::as_raw(self), pszcode.param().abi(), cch, pszdelimiter.param().abi(), dwflags, pattr as _).ok() } } pub unsafe fn GetScriptletTextAttributes(&self, pszcode: P0, cch: u32, pszdelimiter: P2, dwflags: u32, pattr: *mut u16) -> windows_core::Result<()> where P0: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetScriptletTextAttributes)(windows_core::Interface::as_raw(self), pszcode.param().abi(), cch, pszdelimiter.param().abi(), dwflags, core::mem::transmute(pattr)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScriptletTextAttributes)(windows_core::Interface::as_raw(self), pszcode.param().abi(), cch, pszdelimiter.param().abi(), dwflags, pattr as _).ok() } } pub unsafe fn GetRoot(&self) -> windows_core::Result { unsafe { @@ -600,7 +600,7 @@ impl IActiveScriptAuthor { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetInfoFromContext)(windows_core::Interface::as_raw(self), pszcode.param().abi(), cchcode, ichcurrentposition, dwlisttypesrequested, core::mem::transmute(pdwlisttypesprovided), core::mem::transmute(pichlistanchorposition), core::mem::transmute(pichfuncanchorposition), core::mem::transmute(pmemid), core::mem::transmute(picurrentparameter), core::mem::transmute(ppunk)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInfoFromContext)(windows_core::Interface::as_raw(self), pszcode.param().abi(), cchcode, ichcurrentposition, dwlisttypesrequested, pdwlisttypesprovided as _, pichlistanchorposition as _, pichfuncanchorposition as _, pmemid as _, picurrentparameter as _, core::mem::transmute(ppunk)).ok() } } pub unsafe fn IsCommitChar(&self, ch: u16) -> windows_core::Result { unsafe { @@ -844,14 +844,14 @@ impl IActiveScriptDebug32 { P0: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetScriptTextAttributes)(windows_core::Interface::as_raw(self), pstrcode.param().abi(), unumcodechars, pstrdelimiter.param().abi(), dwflags, core::mem::transmute(pattr)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScriptTextAttributes)(windows_core::Interface::as_raw(self), pstrcode.param().abi(), unumcodechars, pstrdelimiter.param().abi(), dwflags, pattr as _).ok() } } pub unsafe fn GetScriptletTextAttributes(&self, pstrcode: P0, unumcodechars: u32, pstrdelimiter: P2, dwflags: u32, pattr: *mut u16) -> windows_core::Result<()> where P0: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetScriptletTextAttributes)(windows_core::Interface::as_raw(self), pstrcode.param().abi(), unumcodechars, pstrdelimiter.param().abi(), dwflags, core::mem::transmute(pattr)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScriptletTextAttributes)(windows_core::Interface::as_raw(self), pstrcode.param().abi(), unumcodechars, pstrdelimiter.param().abi(), dwflags, pattr as _).ok() } } pub unsafe fn EnumCodeContextsOfPosition(&self, dwsourcecontext: u32, ucharacteroffset: u32, unumchars: u32) -> windows_core::Result { unsafe { @@ -918,14 +918,14 @@ impl IActiveScriptDebug64 { P0: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetScriptTextAttributes)(windows_core::Interface::as_raw(self), pstrcode.param().abi(), unumcodechars, pstrdelimiter.param().abi(), dwflags, core::mem::transmute(pattr)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScriptTextAttributes)(windows_core::Interface::as_raw(self), pstrcode.param().abi(), unumcodechars, pstrdelimiter.param().abi(), dwflags, pattr as _).ok() } } pub unsafe fn GetScriptletTextAttributes(&self, pstrcode: P0, unumcodechars: u32, pstrdelimiter: P2, dwflags: u32, pattr: *mut u16) -> windows_core::Result<()> where P0: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetScriptletTextAttributes)(windows_core::Interface::as_raw(self), pstrcode.param().abi(), unumcodechars, pstrdelimiter.param().abi(), dwflags, core::mem::transmute(pattr)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScriptletTextAttributes)(windows_core::Interface::as_raw(self), pstrcode.param().abi(), unumcodechars, pstrdelimiter.param().abi(), dwflags, pattr as _).ok() } } pub unsafe fn EnumCodeContextsOfPosition(&self, dwsourcecontext: u64, ucharacteroffset: u32, unumchars: u32) -> windows_core::Result { unsafe { @@ -991,13 +991,13 @@ impl IActiveScriptEncode { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EncodeSection)(windows_core::Interface::as_raw(self), pchin.param().abi(), cchin, core::mem::transmute(pchout), cchout, core::mem::transmute(pcchret)).ok() } + unsafe { (windows_core::Interface::vtable(self).EncodeSection)(windows_core::Interface::as_raw(self), pchin.param().abi(), cchin, core::mem::transmute(pchout), cchout, pcchret as _).ok() } } pub unsafe fn DecodeScript(&self, pchin: P0, cchin: u32, pchout: windows_core::PWSTR, cchout: u32, pcchret: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DecodeScript)(windows_core::Interface::as_raw(self), pchin.param().abi(), cchin, core::mem::transmute(pchout), cchout, core::mem::transmute(pcchret)).ok() } + unsafe { (windows_core::Interface::vtable(self).DecodeScript)(windows_core::Interface::as_raw(self), pchin.param().abi(), cchin, core::mem::transmute(pchout), cchout, pcchret as _).ok() } } pub unsafe fn GetEncodeProgId(&self, pbstrout: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetEncodeProgId)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrout)).ok() } @@ -1055,7 +1055,7 @@ impl IActiveScriptError { unsafe { (windows_core::Interface::vtable(self).GetExceptionInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pexcepinfo)).ok() } } pub unsafe fn GetSourcePosition(&self, pdwsourcecontext: *mut u32, pullinenumber: *mut u32, plcharacterposition: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSourcePosition)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwsourcecontext), core::mem::transmute(pullinenumber), core::mem::transmute(plcharacterposition)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourcePosition)(windows_core::Interface::as_raw(self), pdwsourcecontext as _, pullinenumber as _, plcharacterposition as _).ok() } } pub unsafe fn GetSourceLineText(&self) -> windows_core::Result { unsafe { @@ -1130,7 +1130,7 @@ impl core::ops::Deref for IActiveScriptError64 { windows_core::imp::interface_hierarchy!(IActiveScriptError64, windows_core::IUnknown, IActiveScriptError); impl IActiveScriptError64 { pub unsafe fn GetSourcePosition64(&self, pdwsourcecontext: *mut u64, pullinenumber: *mut u32, plcharacterposition: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSourcePosition64)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwsourcecontext), core::mem::transmute(pullinenumber), core::mem::transmute(plcharacterposition)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourcePosition64)(windows_core::Interface::as_raw(self), pdwsourcecontext as _, pullinenumber as _, plcharacterposition as _).ok() } } } #[repr(C)] @@ -2115,7 +2115,7 @@ impl core::ops::Deref for IActiveScriptProfilerControl4 { windows_core::imp::interface_hierarchy!(IActiveScriptProfilerControl4, windows_core::IUnknown, IActiveScriptProfilerControl, IActiveScriptProfilerControl2, IActiveScriptProfilerControl3); impl IActiveScriptProfilerControl4 { pub unsafe fn SummarizeHeap(&self, heapsummary: *mut PROFILER_HEAP_SUMMARY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SummarizeHeap)(windows_core::Interface::as_raw(self), core::mem::transmute(heapsummary)).ok() } + unsafe { (windows_core::Interface::vtable(self).SummarizeHeap)(windows_core::Interface::as_raw(self), heapsummary as _).ok() } } } #[repr(C)] @@ -2190,7 +2190,7 @@ windows_core::imp::define_interface!(IActiveScriptProfilerHeapEnum, IActiveScrip windows_core::imp::interface_hierarchy!(IActiveScriptProfilerHeapEnum, windows_core::IUnknown); impl IActiveScriptProfilerHeapEnum { pub unsafe fn Next(&self, heapobjects: &mut [*mut PROFILER_HEAP_OBJECT], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), heapobjects.len().try_into().unwrap(), core::mem::transmute(heapobjects.as_ptr()), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), heapobjects.len().try_into().unwrap(), core::mem::transmute(heapobjects.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn GetOptionalInfo(&self, heapobject: *const PROFILER_HEAP_OBJECT, optionalinfo: &mut [PROFILER_HEAP_OBJECT_OPTIONAL_INFO]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetOptionalInfo)(windows_core::Interface::as_raw(self), heapobject, optionalinfo.len().try_into().unwrap(), core::mem::transmute(optionalinfo.as_ptr())).ok() } @@ -2199,7 +2199,7 @@ impl IActiveScriptProfilerHeapEnum { unsafe { (windows_core::Interface::vtable(self).FreeObjectAndOptionalInfo)(windows_core::Interface::as_raw(self), heapobjects.len().try_into().unwrap(), core::mem::transmute(heapobjects.as_ptr())).ok() } } pub unsafe fn GetNameIdMap(&self, pnamelist: *mut *mut *mut windows_core::PCWSTR, pcelt: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNameIdMap)(windows_core::Interface::as_raw(self), core::mem::transmute(pnamelist), core::mem::transmute(pcelt)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNameIdMap)(windows_core::Interface::as_raw(self), pnamelist as _, pcelt as _).ok() } } } #[repr(C)] @@ -2536,7 +2536,7 @@ impl IActiveScriptSiteDebug32 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).OnScriptErrorDebug)(windows_core::Interface::as_raw(self), perrordebug.param().abi(), core::mem::transmute(pfenterdebugger), core::mem::transmute(pfcallonscripterrorwhencontinuing)).ok() } + unsafe { (windows_core::Interface::vtable(self).OnScriptErrorDebug)(windows_core::Interface::as_raw(self), perrordebug.param().abi(), pfenterdebugger as _, pfcallonscripterrorwhencontinuing as _).ok() } } } #[repr(C)] @@ -2635,7 +2635,7 @@ impl IActiveScriptSiteDebug64 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).OnScriptErrorDebug)(windows_core::Interface::as_raw(self), perrordebug.param().abi(), core::mem::transmute(pfenterdebugger), core::mem::transmute(pfcallonscripterrorwhencontinuing)).ok() } + unsafe { (windows_core::Interface::vtable(self).OnScriptErrorDebug)(windows_core::Interface::as_raw(self), perrordebug.param().abi(), pfenterdebugger as _, pfcallonscripterrorwhencontinuing as _).ok() } } } #[repr(C)] @@ -2908,10 +2908,10 @@ windows_core::imp::define_interface!(IActiveScriptStats, IActiveScriptStats_Vtbl windows_core::imp::interface_hierarchy!(IActiveScriptStats, windows_core::IUnknown); impl IActiveScriptStats { pub unsafe fn GetStat(&self, stid: u32, pluhi: *mut u32, plulo: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStat)(windows_core::Interface::as_raw(self), stid, core::mem::transmute(pluhi), core::mem::transmute(plulo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStat)(windows_core::Interface::as_raw(self), stid, pluhi as _, plulo as _).ok() } } pub unsafe fn GetStatEx(&self, guid: *const windows_core::GUID, pluhi: *mut u32, plulo: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStatEx)(windows_core::Interface::as_raw(self), guid, core::mem::transmute(pluhi), core::mem::transmute(plulo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStatEx)(windows_core::Interface::as_raw(self), guid, pluhi as _, plulo as _).ok() } } pub unsafe fn ResetStats(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ResetStats)(windows_core::Interface::as_raw(self)).ok() } @@ -3541,7 +3541,7 @@ impl IDebugApplication32 { unsafe { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetBreakFlags(&self, pabf: *mut u32, pprdatsteppingthread: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBreakFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(pabf), core::mem::transmute(pprdatsteppingthread)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBreakFlags)(windows_core::Interface::as_raw(self), pabf as _, core::mem::transmute(pprdatsteppingthread)).ok() } } pub unsafe fn GetCurrentThread(&self) -> windows_core::Result { unsafe { @@ -3596,7 +3596,7 @@ impl IDebugApplication32 { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).HandleRuntimeError)(windows_core::Interface::as_raw(self), perrordebug.param().abi(), pscriptsite.param().abi(), core::mem::transmute(pbra), core::mem::transmute(perra), core::mem::transmute(pfcallonscripterror)).ok() } + unsafe { (windows_core::Interface::vtable(self).HandleRuntimeError)(windows_core::Interface::as_raw(self), perrordebug.param().abi(), pscriptsite.param().abi(), pbra as _, perra as _, pfcallonscripterror as _).ok() } } pub unsafe fn FCanJitDebug(&self) -> super::super::super::super::Foundation::BOOL { unsafe { (windows_core::Interface::vtable(self).FCanJitDebug)(windows_core::Interface::as_raw(self)) } @@ -3887,7 +3887,7 @@ impl IDebugApplication64 { unsafe { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetBreakFlags(&self, pabf: *mut u32, pprdatsteppingthread: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBreakFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(pabf), core::mem::transmute(pprdatsteppingthread)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBreakFlags)(windows_core::Interface::as_raw(self), pabf as _, core::mem::transmute(pprdatsteppingthread)).ok() } } pub unsafe fn GetCurrentThread(&self) -> windows_core::Result { unsafe { @@ -3942,7 +3942,7 @@ impl IDebugApplication64 { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).HandleRuntimeError)(windows_core::Interface::as_raw(self), perrordebug.param().abi(), pscriptsite.param().abi(), core::mem::transmute(pbra), core::mem::transmute(perra), core::mem::transmute(pfcallonscripterror)).ok() } + unsafe { (windows_core::Interface::vtable(self).HandleRuntimeError)(windows_core::Interface::as_raw(self), perrordebug.param().abi(), pscriptsite.param().abi(), pbra as _, perra as _, pfcallonscripterror as _).ok() } } pub unsafe fn FCanJitDebug(&self) -> super::super::super::super::Foundation::BOOL { unsafe { (windows_core::Interface::vtable(self).FCanJitDebug)(windows_core::Interface::as_raw(self)) } @@ -4890,7 +4890,7 @@ impl IDebugAsyncOperation { unsafe { (windows_core::Interface::vtable(self).QueryIsComplete)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetResult(&self, phrresult: *mut windows_core::HRESULT, ppunkresult: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetResult)(windows_core::Interface::as_raw(self), core::mem::transmute(phrresult), core::mem::transmute(ppunkresult)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetResult)(windows_core::Interface::as_raw(self), phrresult as _, core::mem::transmute(ppunkresult)).ok() } } } #[repr(C)] @@ -5238,7 +5238,7 @@ impl IDebugDocumentHelper32 { } } pub unsafe fn GetScriptBlockInfo(&self, dwsourcecontext: u32, ppasd: *mut Option, picharpos: *mut u32, pcchars: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetScriptBlockInfo)(windows_core::Interface::as_raw(self), dwsourcecontext, core::mem::transmute(ppasd), core::mem::transmute(picharpos), core::mem::transmute(pcchars)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScriptBlockInfo)(windows_core::Interface::as_raw(self), dwsourcecontext, core::mem::transmute(ppasd), picharpos as _, pcchars as _).ok() } } pub unsafe fn CreateDebugDocumentContext(&self, icharpos: u32, cchars: u32) -> windows_core::Result { unsafe { @@ -5531,7 +5531,7 @@ impl IDebugDocumentHelper64 { } } pub unsafe fn GetScriptBlockInfo(&self, dwsourcecontext: u64, ppasd: *mut Option, picharpos: *mut u32, pcchars: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetScriptBlockInfo)(windows_core::Interface::as_raw(self), dwsourcecontext, core::mem::transmute(ppasd), core::mem::transmute(picharpos), core::mem::transmute(pcchars)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScriptBlockInfo)(windows_core::Interface::as_raw(self), dwsourcecontext, core::mem::transmute(ppasd), picharpos as _, pcchars as _).ok() } } pub unsafe fn CreateDebugDocumentContext(&self, icharpos: u32, cchars: u32) -> windows_core::Result { unsafe { @@ -5750,14 +5750,14 @@ windows_core::imp::define_interface!(IDebugDocumentHost, IDebugDocumentHost_Vtbl windows_core::imp::interface_hierarchy!(IDebugDocumentHost, windows_core::IUnknown); impl IDebugDocumentHost { pub unsafe fn GetDeferredText(&self, dwtextstartcookie: u32, pchartext: windows_core::PWSTR, pstatextattr: *mut u16, pcnumchars: *mut u32, cmaxchars: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeferredText)(windows_core::Interface::as_raw(self), dwtextstartcookie, core::mem::transmute(pchartext), core::mem::transmute(pstatextattr), core::mem::transmute(pcnumchars), cmaxchars).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeferredText)(windows_core::Interface::as_raw(self), dwtextstartcookie, core::mem::transmute(pchartext), pstatextattr as _, pcnumchars as _, cmaxchars).ok() } } pub unsafe fn GetScriptTextAttributes(&self, pstrcode: P0, unumcodechars: u32, pstrdelimiter: P2, dwflags: u32, pattr: *mut u16) -> windows_core::Result<()> where P0: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetScriptTextAttributes)(windows_core::Interface::as_raw(self), pstrcode.param().abi(), unumcodechars, pstrdelimiter.param().abi(), dwflags, core::mem::transmute(pattr)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScriptTextAttributes)(windows_core::Interface::as_raw(self), pstrcode.param().abi(), unumcodechars, pstrdelimiter.param().abi(), dwflags, pattr as _).ok() } } pub unsafe fn OnCreateDocumentContext(&self) -> windows_core::Result { unsafe { @@ -5766,7 +5766,7 @@ impl IDebugDocumentHost { } } pub unsafe fn GetPathName(&self, pbstrlongname: *mut windows_core::BSTR, pfisoriginalfile: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPathName)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrlongname), core::mem::transmute(pfisoriginalfile)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPathName)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrlongname), pfisoriginalfile as _).ok() } } pub unsafe fn GetFileName(&self) -> windows_core::Result { unsafe { @@ -5985,7 +5985,7 @@ impl IDebugDocumentText { } } pub unsafe fn GetSize(&self, pcnumlines: *mut u32, pcnumchars: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pcnumlines), core::mem::transmute(pcnumchars)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSize)(windows_core::Interface::as_raw(self), pcnumlines as _, pcnumchars as _).ok() } } pub unsafe fn GetPositionOfLine(&self, clinenumber: u32) -> windows_core::Result { unsafe { @@ -5994,16 +5994,16 @@ impl IDebugDocumentText { } } pub unsafe fn GetLineOfPosition(&self, ccharacterposition: u32, pclinenumber: *mut u32, pccharacteroffsetinline: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLineOfPosition)(windows_core::Interface::as_raw(self), ccharacterposition, core::mem::transmute(pclinenumber), core::mem::transmute(pccharacteroffsetinline)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLineOfPosition)(windows_core::Interface::as_raw(self), ccharacterposition, pclinenumber as _, pccharacteroffsetinline as _).ok() } } pub unsafe fn GetText(&self, ccharacterposition: u32, pchartext: windows_core::PWSTR, pstatextattr: Option<*mut u16>, pcnumchars: *mut u32, cmaxchars: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), ccharacterposition, core::mem::transmute(pchartext), core::mem::transmute(pstatextattr.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcnumchars), cmaxchars).ok() } + unsafe { (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), ccharacterposition, core::mem::transmute(pchartext), pstatextattr.unwrap_or(core::mem::zeroed()) as _, pcnumchars as _, cmaxchars).ok() } } pub unsafe fn GetPositionOfContext(&self, psc: P0, pccharacterposition: *mut u32, cnumchars: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetPositionOfContext)(windows_core::Interface::as_raw(self), psc.param().abi(), core::mem::transmute(pccharacterposition), core::mem::transmute(cnumchars)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPositionOfContext)(windows_core::Interface::as_raw(self), psc.param().abi(), pccharacterposition as _, cnumchars as _).ok() } } pub unsafe fn GetContextOfPosition(&self, ccharacterposition: u32, cnumchars: u32) -> windows_core::Result { unsafe { @@ -6270,7 +6270,7 @@ windows_core::imp::define_interface!(IDebugDocumentTextExternalAuthor, IDebugDoc windows_core::imp::interface_hierarchy!(IDebugDocumentTextExternalAuthor, windows_core::IUnknown); impl IDebugDocumentTextExternalAuthor { pub unsafe fn GetPathName(&self, pbstrlongname: *mut windows_core::BSTR, pfisoriginalfile: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPathName)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrlongname), core::mem::transmute(pfisoriginalfile)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPathName)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrlongname), pfisoriginalfile as _).ok() } } pub unsafe fn GetFileName(&self) -> windows_core::Result { unsafe { @@ -6348,10 +6348,10 @@ impl IDebugExpression { unsafe { (windows_core::Interface::vtable(self).QueryIsComplete)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetResultAsString(&self, phrresult: *mut windows_core::HRESULT, pbstrresult: *mut windows_core::BSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetResultAsString)(windows_core::Interface::as_raw(self), core::mem::transmute(phrresult), core::mem::transmute(pbstrresult)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetResultAsString)(windows_core::Interface::as_raw(self), phrresult as _, core::mem::transmute(pbstrresult)).ok() } } pub unsafe fn GetResultAsDebugProperty(&self, phrresult: *mut windows_core::HRESULT, ppdp: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetResultAsDebugProperty)(windows_core::Interface::as_raw(self), core::mem::transmute(phrresult), core::mem::transmute(ppdp)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetResultAsDebugProperty)(windows_core::Interface::as_raw(self), phrresult as _, core::mem::transmute(ppdp)).ok() } } } #[repr(C)] @@ -6460,7 +6460,7 @@ impl IDebugExpressionContext { } } pub unsafe fn GetLanguageInfo(&self, pbstrlanguagename: *mut windows_core::BSTR, planguageid: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLanguageInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrlanguagename), core::mem::transmute(planguageid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLanguageInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrlanguagename), planguageid as _).ok() } } } #[repr(C)] @@ -7213,7 +7213,7 @@ windows_core::imp::define_interface!(IEnumDebugApplicationNodes, IEnumDebugAppli windows_core::imp::interface_hierarchy!(IEnumDebugApplicationNodes, windows_core::IUnknown); impl IEnumDebugApplicationNodes { pub unsafe fn Next(&self, celt: u32, pprddp: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(pprddp), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(pprddp), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -7291,7 +7291,7 @@ windows_core::imp::define_interface!(IEnumDebugCodeContexts, IEnumDebugCodeConte windows_core::imp::interface_hierarchy!(IEnumDebugCodeContexts, windows_core::IUnknown); impl IEnumDebugCodeContexts { pub unsafe fn Next(&self, celt: u32, pscc: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(pscc), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(pscc), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -7369,7 +7369,7 @@ windows_core::imp::define_interface!(IEnumDebugExpressionContexts, IEnumDebugExp windows_core::imp::interface_hierarchy!(IEnumDebugExpressionContexts, windows_core::IUnknown); impl IEnumDebugExpressionContexts { pub unsafe fn Next(&self, celt: u32, ppdec: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppdec), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppdec), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -7447,7 +7447,7 @@ windows_core::imp::define_interface!(IEnumDebugStackFrames, IEnumDebugStackFrame windows_core::imp::interface_hierarchy!(IEnumDebugStackFrames, windows_core::IUnknown); impl IEnumDebugStackFrames { pub unsafe fn Next(&self, celt: u32, prgdsfd: *mut DebugStackFrameDescriptor, pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(prgdsfd), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(prgdsfd), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -7531,7 +7531,7 @@ impl core::ops::Deref for IEnumDebugStackFrames64 { windows_core::imp::interface_hierarchy!(IEnumDebugStackFrames64, windows_core::IUnknown, IEnumDebugStackFrames); impl IEnumDebugStackFrames64 { pub unsafe fn Next64(&self, celt: u32, prgdsfd: *mut DebugStackFrameDescriptor64, pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next64)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(prgdsfd), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next64)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(prgdsfd), pceltfetched as _).ok() } } } #[repr(C)] @@ -7561,7 +7561,7 @@ windows_core::imp::define_interface!(IEnumJsStackFrames, IEnumJsStackFrames_Vtbl windows_core::imp::interface_hierarchy!(IEnumJsStackFrames, windows_core::IUnknown); impl IEnumJsStackFrames { pub unsafe fn Next(&self, pframes: &mut [JS_NATIVE_FRAME], pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pframes.len().try_into().unwrap(), core::mem::transmute(pframes.as_ptr()), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pframes.len().try_into().unwrap(), core::mem::transmute(pframes.as_ptr()), pcfetched as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -7602,7 +7602,7 @@ windows_core::imp::define_interface!(IEnumRemoteDebugApplicationThreads, IEnumRe windows_core::imp::interface_hierarchy!(IEnumRemoteDebugApplicationThreads, windows_core::IUnknown); impl IEnumRemoteDebugApplicationThreads { pub unsafe fn Next(&self, celt: u32, pprdat: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(pprdat), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(pprdat), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -7680,7 +7680,7 @@ windows_core::imp::define_interface!(IEnumRemoteDebugApplications, IEnumRemoteDe windows_core::imp::interface_hierarchy!(IEnumRemoteDebugApplications, windows_core::IUnknown); impl IEnumRemoteDebugApplications { pub unsafe fn Next(&self, celt: u32, ppda: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppda), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppda), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -7815,7 +7815,7 @@ impl IJsDebugBreakPoint { unsafe { (windows_core::Interface::vtable(self).Delete)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetDocumentPosition(&self, pdocumentid: *mut u64, pcharacteroffset: *mut u32, pstatementcharcount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDocumentPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(pdocumentid), core::mem::transmute(pcharacteroffset), core::mem::transmute(pstatementcharcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDocumentPosition)(windows_core::Interface::as_raw(self), pdocumentid as _, pcharacteroffset as _, pstatementcharcount as _).ok() } } } #[repr(C)] @@ -7890,7 +7890,7 @@ windows_core::imp::define_interface!(IJsDebugDataTarget, IJsDebugDataTarget_Vtbl windows_core::imp::interface_hierarchy!(IJsDebugDataTarget, windows_core::IUnknown); impl IJsDebugDataTarget { pub unsafe fn ReadMemory(&self, address: u64, flags: JsDebugReadMemoryFlags, pbuffer: &mut [u8], pbytesread: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadMemory)(windows_core::Interface::as_raw(self), address, flags, core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), core::mem::transmute(pbytesread)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadMemory)(windows_core::Interface::as_raw(self), address, flags, core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), pbytesread as _).ok() } } pub unsafe fn WriteMemory(&self, address: u64, pmemory: &[u8]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).WriteMemory)(windows_core::Interface::as_raw(self), address, core::mem::transmute(pmemory.as_ptr()), pmemory.len().try_into().unwrap()).ok() } @@ -8064,7 +8064,7 @@ windows_core::imp::define_interface!(IJsDebugFrame, IJsDebugFrame_Vtbl, 0xc91966 windows_core::imp::interface_hierarchy!(IJsDebugFrame, windows_core::IUnknown); impl IJsDebugFrame { pub unsafe fn GetStackRange(&self, pstart: *mut u64, pend: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStackRange)(windows_core::Interface::as_raw(self), core::mem::transmute(pstart), core::mem::transmute(pend)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStackRange)(windows_core::Interface::as_raw(self), pstart as _, pend as _).ok() } } pub unsafe fn GetName(&self) -> windows_core::Result { unsafe { @@ -8073,10 +8073,10 @@ impl IJsDebugFrame { } } pub unsafe fn GetDocumentPositionWithId(&self, pdocumentid: *mut u64, pcharacteroffset: *mut u32, pstatementcharcount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDocumentPositionWithId)(windows_core::Interface::as_raw(self), core::mem::transmute(pdocumentid), core::mem::transmute(pcharacteroffset), core::mem::transmute(pstatementcharcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDocumentPositionWithId)(windows_core::Interface::as_raw(self), pdocumentid as _, pcharacteroffset as _, pstatementcharcount as _).ok() } } pub unsafe fn GetDocumentPositionWithName(&self, pdocumentname: *mut windows_core::BSTR, pline: *mut u32, pcolumn: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDocumentPositionWithName)(windows_core::Interface::as_raw(self), core::mem::transmute(pdocumentname), core::mem::transmute(pline), core::mem::transmute(pcolumn)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDocumentPositionWithName)(windows_core::Interface::as_raw(self), core::mem::transmute(pdocumentname), pline as _, pcolumn as _).ok() } } pub unsafe fn GetDebugProperty(&self) -> windows_core::Result { unsafe { @@ -8388,7 +8388,7 @@ windows_core::imp::define_interface!(IJsEnumDebugProperty, IJsEnumDebugProperty_ windows_core::imp::interface_hierarchy!(IJsEnumDebugProperty, windows_core::IUnknown); impl IJsEnumDebugProperty { pub unsafe fn Next(&self, ppdebugproperty: &mut [Option], pactualcount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppdebugproperty.len().try_into().unwrap(), core::mem::transmute(ppdebugproperty.as_ptr()), core::mem::transmute(pactualcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppdebugproperty.len().try_into().unwrap(), core::mem::transmute(ppdebugproperty.as_ptr()), pactualcount as _).ok() } } pub unsafe fn GetCount(&self) -> windows_core::Result { unsafe { @@ -9582,7 +9582,7 @@ windows_core::imp::define_interface!(IRemoteDebugCriticalErrorEvent110, IRemoteD windows_core::imp::interface_hierarchy!(IRemoteDebugCriticalErrorEvent110, windows_core::IUnknown); impl IRemoteDebugCriticalErrorEvent110 { pub unsafe fn GetErrorInfo(&self, pbstrsource: *mut windows_core::BSTR, pmessageid: *mut i32, pbstrmessage: *mut windows_core::BSTR, pplocation: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetErrorInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrsource), core::mem::transmute(pmessageid), core::mem::transmute(pbstrmessage), core::mem::transmute(pplocation)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetErrorInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrsource), pmessageid as _, core::mem::transmute(pbstrmessage), core::mem::transmute(pplocation)).ok() } } } #[repr(C)] @@ -9612,7 +9612,7 @@ windows_core::imp::define_interface!(IRemoteDebugInfoEvent110, IRemoteDebugInfoE windows_core::imp::interface_hierarchy!(IRemoteDebugInfoEvent110, windows_core::IUnknown); impl IRemoteDebugInfoEvent110 { pub unsafe fn GetEventInfo(&self, pmessagetype: *mut DEBUG_EVENT_INFO_TYPE, pbstrmessage: *mut windows_core::BSTR, pbstrurl: *mut windows_core::BSTR, pplocation: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEventInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pmessagetype), core::mem::transmute(pbstrmessage), core::mem::transmute(pbstrurl), core::mem::transmute(pplocation)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventInfo)(windows_core::Interface::as_raw(self), pmessagetype as _, core::mem::transmute(pbstrmessage), core::mem::transmute(pbstrurl), core::mem::transmute(pplocation)).ok() } } } #[repr(C)] @@ -9697,7 +9697,7 @@ impl IScriptEntry { } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetSignature(&self, ppti: *mut Option, pimethod: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSignature)(windows_core::Interface::as_raw(self), core::mem::transmute(ppti), core::mem::transmute(pimethod)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSignature)(windows_core::Interface::as_raw(self), core::mem::transmute(ppti), pimethod as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn SetSignature(&self, pti: P0, imethod: u32) -> windows_core::Result<()> @@ -9707,7 +9707,7 @@ impl IScriptEntry { unsafe { (windows_core::Interface::vtable(self).SetSignature)(windows_core::Interface::as_raw(self), pti.param().abi(), imethod).ok() } } pub unsafe fn GetRange(&self, pichmin: *mut u32, pcch: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRange)(windows_core::Interface::as_raw(self), core::mem::transmute(pichmin), core::mem::transmute(pcch)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRange)(windows_core::Interface::as_raw(self), pichmin as _, pcch as _).ok() } } } #[repr(C)] @@ -10320,7 +10320,7 @@ impl ISimpleConnectionPoint { } } pub unsafe fn DescribeEvents(&self, ievent: u32, cevents: u32, prgid: *mut i32, prgbstr: *mut windows_core::BSTR, pceventsfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DescribeEvents)(windows_core::Interface::as_raw(self), ievent, cevents, core::mem::transmute(prgid), core::mem::transmute(prgbstr), core::mem::transmute(pceventsfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).DescribeEvents)(windows_core::Interface::as_raw(self), ievent, cevents, prgid as _, core::mem::transmute(prgbstr), pceventsfetched as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Advise(&self, pdisp: P0) -> windows_core::Result 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 3fa38d8353..e64e2a6f58 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 @@ -15,7 +15,7 @@ where P0: windows_core::Param, { windows_targets::link!("dbgeng.dll" "system" fn DebugConnect(remoteoptions : windows_core::PCSTR, interfaceid : *const windows_core::GUID, interface : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { DebugConnect(remoteoptions.param().abi(), interfaceid, core::mem::transmute(interface)).ok() } + unsafe { DebugConnect(remoteoptions.param().abi(), interfaceid, interface as _).ok() } } #[inline] pub unsafe fn DebugConnectWide(remoteoptions: P0, interfaceid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -23,7 +23,7 @@ where P0: windows_core::Param, { windows_targets::link!("dbgeng.dll" "system" fn DebugConnectWide(remoteoptions : windows_core::PCWSTR, interfaceid : *const windows_core::GUID, interface : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { DebugConnectWide(remoteoptions.param().abi(), interfaceid, core::mem::transmute(interface)).ok() } + unsafe { DebugConnectWide(remoteoptions.param().abi(), interfaceid, interface as _).ok() } } #[inline] pub unsafe fn DebugCreate() -> windows_core::Result @@ -3424,7 +3424,7 @@ impl IDataModelManager { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetModelForType)(windows_core::Interface::as_raw(self), r#type.param().abi(), core::mem::transmute(datamodel), typesignature.unwrap_or(core::mem::zeroed()) as _, wildcardmatches.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn RegisterModelForTypeSignature(&self, typesignature: P0, datamodel: P1) -> windows_core::Result<()> where @@ -3864,14 +3864,14 @@ impl IDataModelNameBinder { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).BindValue)(windows_core::Interface::as_raw(self), contextobject.param().abi(), name.param().abi(), core::mem::transmute(value), metadata.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).BindReference)(windows_core::Interface::as_raw(self), contextobject.param().abi(), name.param().abi(), core::mem::transmute(reference), metadata.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn EnumerateValues(&self, contextobject: P0) -> windows_core::Result where @@ -4139,7 +4139,7 @@ impl IDataModelScriptDebug { unsafe { (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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentPosition)(windows_core::Interface::as_raw(self), currentposition as _, positionspanend.unwrap_or(core::mem::zeroed()) as _, linetext.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetStack(&self) -> windows_core::Result { unsafe { @@ -4391,7 +4391,7 @@ impl IDataModelScriptDebugBreakpoint { unsafe { (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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetPosition)(windows_core::Interface::as_raw(self), position as _, positionspanend.unwrap_or(core::mem::zeroed()) as _, linetext.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -4523,7 +4523,7 @@ impl IDataModelScriptDebugClient { P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).NotifyDebugEvent)(windows_core::Interface::as_raw(self), peventinfo, pscript.param().abi(), peventdataobject.param().abi(), core::mem::transmute(resumeeventkind)).ok() } + unsafe { (windows_core::Interface::vtable(self).NotifyDebugEvent)(windows_core::Interface::as_raw(self), peventinfo, pscript.param().abi(), peventdataobject.param().abi(), resumeeventkind as _).ok() } } } #[repr(C)] @@ -4613,7 +4613,7 @@ impl IDataModelScriptDebugStackFrame { } } pub unsafe fn GetPosition(&self, position: *mut ScriptDebugPosition, positionspanend: Option<*mut ScriptDebugPosition>, linetext: Option<*mut windows_core::BSTR>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetPosition)(windows_core::Interface::as_raw(self), position as _, positionspanend.unwrap_or(core::mem::zeroed()) as _, linetext.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn IsTransitionPoint(&self) -> windows_core::Result { unsafe { @@ -4622,7 +4622,7 @@ impl IDataModelScriptDebugStackFrame { } } pub unsafe fn GetTransition(&self, transitionscript: *mut Option, istransitioncontiguous: *mut bool) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTransition)(windows_core::Interface::as_raw(self), core::mem::transmute(transitionscript), core::mem::transmute(istransitioncontiguous)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTransition)(windows_core::Interface::as_raw(self), core::mem::transmute(transitionscript), istransitioncontiguous as _).ok() } } pub unsafe fn Evaluate(&self, pwszexpression: P0) -> windows_core::Result where @@ -4763,7 +4763,7 @@ impl IDataModelScriptDebugVariableSetEnumerator { unsafe { (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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetNext)(windows_core::Interface::as_raw(self), core::mem::transmute(variablename), variablevalue.unwrap_or(core::mem::zeroed()) as _, variablemetadata.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -5316,7 +5316,7 @@ windows_core::imp::define_interface!(IDebugAdvanced, IDebugAdvanced_Vtbl, 0xf2df windows_core::imp::interface_hierarchy!(IDebugAdvanced, windows_core::IUnknown); impl IDebugAdvanced { pub unsafe fn GetThreadContext(&self, context: *mut core::ffi::c_void, contextsize: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetThreadContext)(windows_core::Interface::as_raw(self), core::mem::transmute(context), contextsize).ok() } + unsafe { (windows_core::Interface::vtable(self).GetThreadContext)(windows_core::Interface::as_raw(self), context as _, contextsize).ok() } } pub unsafe fn SetThreadContext(&self, context: *const core::ffi::c_void, contextsize: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetThreadContext)(windows_core::Interface::as_raw(self), context, contextsize).ok() } @@ -5361,31 +5361,31 @@ windows_core::imp::define_interface!(IDebugAdvanced2, IDebugAdvanced2_Vtbl, 0x71 windows_core::imp::interface_hierarchy!(IDebugAdvanced2, windows_core::IUnknown); impl IDebugAdvanced2 { pub unsafe fn GetThreadContext(&self, context: *mut core::ffi::c_void, contextsize: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetThreadContext)(windows_core::Interface::as_raw(self), core::mem::transmute(context), contextsize).ok() } + unsafe { (windows_core::Interface::vtable(self).GetThreadContext)(windows_core::Interface::as_raw(self), context as _, contextsize).ok() } } pub unsafe fn SetThreadContext(&self, context: *const core::ffi::c_void, contextsize: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetThreadContext)(windows_core::Interface::as_raw(self), context, contextsize).ok() } } pub unsafe fn Request(&self, request: u32, inbuffer: Option<*const core::ffi::c_void>, inbuffersize: u32, outbuffer: Option<*mut core::ffi::c_void>, outbuffersize: u32, outsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Request)(windows_core::Interface::as_raw(self), request, core::mem::transmute(inbuffer.unwrap_or(core::mem::zeroed())), inbuffersize, core::mem::transmute(outbuffer.unwrap_or(core::mem::zeroed())), outbuffersize, core::mem::transmute(outsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Request)(windows_core::Interface::as_raw(self), request, inbuffer.unwrap_or(core::mem::zeroed()) as _, inbuffersize, outbuffer.unwrap_or(core::mem::zeroed()) as _, outbuffersize, outsize.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetSourceFileInformation)(windows_core::Interface::as_raw(self), which, sourcefile.param().abi(), arg64, arg32, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(infosize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourceFileInformation)(windows_core::Interface::as_raw(self), which, sourcefile.param().abi(), arg64, arg32, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, infosize.unwrap_or(core::mem::zeroed()) as _).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 P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindSourceFileAndToken)(windows_core::Interface::as_raw(self), startelement, modaddr, file.param().abi(), flags, core::mem::transmute(filetoken.unwrap_or(core::mem::zeroed())), filetokensize, 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() } + unsafe { (windows_core::Interface::vtable(self).FindSourceFileAndToken)(windows_core::Interface::as_raw(self), startelement, modaddr, file.param().abi(), flags, filetoken.unwrap_or(core::mem::zeroed()) as _, filetokensize, foundelement.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), foundsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSymbolInformation(&self, which: u32, arg64: u64, arg32: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, infosize: Option<*mut u32>, stringbuffer: Option<&mut [u8]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSymbolInformation)(windows_core::Interface::as_raw(self), which, arg64, arg32, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, 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::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolInformation)(windows_core::Interface::as_raw(self), which, arg64, arg32, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, infosize.unwrap_or(core::mem::zeroed()) as _, 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()), stringsize.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetSystemObjectInformation)(windows_core::Interface::as_raw(self), which, arg64, arg32, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(infosize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSystemObjectInformation)(windows_core::Interface::as_raw(self), which, arg64, arg32, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, infosize.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -5472,46 +5472,46 @@ windows_core::imp::define_interface!(IDebugAdvanced3, IDebugAdvanced3_Vtbl, 0xcb windows_core::imp::interface_hierarchy!(IDebugAdvanced3, windows_core::IUnknown); impl IDebugAdvanced3 { pub unsafe fn GetThreadContext(&self, context: *mut core::ffi::c_void, contextsize: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetThreadContext)(windows_core::Interface::as_raw(self), core::mem::transmute(context), contextsize).ok() } + unsafe { (windows_core::Interface::vtable(self).GetThreadContext)(windows_core::Interface::as_raw(self), context as _, contextsize).ok() } } pub unsafe fn SetThreadContext(&self, context: *const core::ffi::c_void, contextsize: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetThreadContext)(windows_core::Interface::as_raw(self), context, contextsize).ok() } } pub unsafe fn Request(&self, request: u32, inbuffer: Option<*const core::ffi::c_void>, inbuffersize: u32, outbuffer: Option<*mut core::ffi::c_void>, outbuffersize: u32, outsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Request)(windows_core::Interface::as_raw(self), request, core::mem::transmute(inbuffer.unwrap_or(core::mem::zeroed())), inbuffersize, core::mem::transmute(outbuffer.unwrap_or(core::mem::zeroed())), outbuffersize, core::mem::transmute(outsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Request)(windows_core::Interface::as_raw(self), request, inbuffer.unwrap_or(core::mem::zeroed()) as _, inbuffersize, outbuffer.unwrap_or(core::mem::zeroed()) as _, outbuffersize, outsize.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetSourceFileInformation)(windows_core::Interface::as_raw(self), which, sourcefile.param().abi(), arg64, arg32, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(infosize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourceFileInformation)(windows_core::Interface::as_raw(self), which, sourcefile.param().abi(), arg64, arg32, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, infosize.unwrap_or(core::mem::zeroed()) as _).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 P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindSourceFileAndToken)(windows_core::Interface::as_raw(self), startelement, modaddr, file.param().abi(), flags, core::mem::transmute(filetoken.unwrap_or(core::mem::zeroed())), filetokensize, 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() } + unsafe { (windows_core::Interface::vtable(self).FindSourceFileAndToken)(windows_core::Interface::as_raw(self), startelement, modaddr, file.param().abi(), flags, filetoken.unwrap_or(core::mem::zeroed()) as _, filetokensize, foundelement.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), foundsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSymbolInformation(&self, which: u32, arg64: u64, arg32: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, infosize: Option<*mut u32>, stringbuffer: Option<&mut [u8]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSymbolInformation)(windows_core::Interface::as_raw(self), which, arg64, arg32, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, 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::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolInformation)(windows_core::Interface::as_raw(self), which, arg64, arg32, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, infosize.unwrap_or(core::mem::zeroed()) as _, 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()), stringsize.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetSystemObjectInformation)(windows_core::Interface::as_raw(self), which, arg64, arg32, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(infosize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSystemObjectInformation)(windows_core::Interface::as_raw(self), which, arg64, arg32, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, infosize.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetSourceFileInformationWide)(windows_core::Interface::as_raw(self), which, sourcefile.param().abi(), arg64, arg32, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(infosize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourceFileInformationWide)(windows_core::Interface::as_raw(self), which, sourcefile.param().abi(), arg64, arg32, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, infosize.unwrap_or(core::mem::zeroed()) as _).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 P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindSourceFileAndTokenWide)(windows_core::Interface::as_raw(self), startelement, modaddr, file.param().abi(), flags, core::mem::transmute(filetoken.unwrap_or(core::mem::zeroed())), filetokensize, 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() } + unsafe { (windows_core::Interface::vtable(self).FindSourceFileAndTokenWide)(windows_core::Interface::as_raw(self), startelement, modaddr, file.param().abi(), flags, filetoken.unwrap_or(core::mem::zeroed()) as _, filetokensize, foundelement.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), foundsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSymbolInformationWide(&self, which: u32, arg64: u64, arg32: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, infosize: Option<*mut u32>, stringbuffer: Option<&mut [u16]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSymbolInformationWide)(windows_core::Interface::as_raw(self), which, arg64, arg32, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, 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::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolInformationWide)(windows_core::Interface::as_raw(self), which, arg64, arg32, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, infosize.unwrap_or(core::mem::zeroed()) as _, 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()), stringsize.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -5625,64 +5625,49 @@ windows_core::imp::define_interface!(IDebugAdvanced4, IDebugAdvanced4_Vtbl, 0xd1 windows_core::imp::interface_hierarchy!(IDebugAdvanced4, windows_core::IUnknown); impl IDebugAdvanced4 { pub unsafe fn GetThreadContext(&self, context: *mut core::ffi::c_void, contextsize: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetThreadContext)(windows_core::Interface::as_raw(self), core::mem::transmute(context), contextsize).ok() } + unsafe { (windows_core::Interface::vtable(self).GetThreadContext)(windows_core::Interface::as_raw(self), context as _, contextsize).ok() } } pub unsafe fn SetThreadContext(&self, context: *const core::ffi::c_void, contextsize: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetThreadContext)(windows_core::Interface::as_raw(self), context, contextsize).ok() } } pub unsafe fn Request(&self, request: u32, inbuffer: Option<*const core::ffi::c_void>, inbuffersize: u32, outbuffer: Option<*mut core::ffi::c_void>, outbuffersize: u32, outsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Request)(windows_core::Interface::as_raw(self), request, core::mem::transmute(inbuffer.unwrap_or(core::mem::zeroed())), inbuffersize, core::mem::transmute(outbuffer.unwrap_or(core::mem::zeroed())), outbuffersize, core::mem::transmute(outsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Request)(windows_core::Interface::as_raw(self), request, inbuffer.unwrap_or(core::mem::zeroed()) as _, inbuffersize, outbuffer.unwrap_or(core::mem::zeroed()) as _, outbuffersize, outsize.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetSourceFileInformation)(windows_core::Interface::as_raw(self), which, sourcefile.param().abi(), arg64, arg32, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(infosize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourceFileInformation)(windows_core::Interface::as_raw(self), which, sourcefile.param().abi(), arg64, arg32, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, infosize.unwrap_or(core::mem::zeroed()) as _).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 P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindSourceFileAndToken)(windows_core::Interface::as_raw(self), startelement, modaddr, file.param().abi(), flags, core::mem::transmute(filetoken.unwrap_or(core::mem::zeroed())), filetokensize, 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() } + unsafe { (windows_core::Interface::vtable(self).FindSourceFileAndToken)(windows_core::Interface::as_raw(self), startelement, modaddr, file.param().abi(), flags, filetoken.unwrap_or(core::mem::zeroed()) as _, filetokensize, foundelement.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), foundsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSymbolInformation(&self, which: u32, arg64: u64, arg32: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, infosize: Option<*mut u32>, stringbuffer: Option<&mut [u8]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSymbolInformation)(windows_core::Interface::as_raw(self), which, arg64, arg32, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, 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::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolInformation)(windows_core::Interface::as_raw(self), which, arg64, arg32, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, infosize.unwrap_or(core::mem::zeroed()) as _, 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()), stringsize.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetSystemObjectInformation)(windows_core::Interface::as_raw(self), which, arg64, arg32, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(infosize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSystemObjectInformation)(windows_core::Interface::as_raw(self), which, arg64, arg32, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, infosize.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetSourceFileInformationWide)(windows_core::Interface::as_raw(self), which, sourcefile.param().abi(), arg64, arg32, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(infosize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourceFileInformationWide)(windows_core::Interface::as_raw(self), which, sourcefile.param().abi(), arg64, arg32, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, infosize.unwrap_or(core::mem::zeroed()) as _).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 P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindSourceFileAndTokenWide)(windows_core::Interface::as_raw(self), startelement, modaddr, file.param().abi(), flags, core::mem::transmute(filetoken.unwrap_or(core::mem::zeroed())), filetokensize, 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() } + unsafe { (windows_core::Interface::vtable(self).FindSourceFileAndTokenWide)(windows_core::Interface::as_raw(self), startelement, modaddr, file.param().abi(), flags, filetoken.unwrap_or(core::mem::zeroed()) as _, filetokensize, foundelement.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), foundsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSymbolInformationWide(&self, which: u32, arg64: u64, arg32: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, infosize: Option<*mut u32>, stringbuffer: Option<&mut [u16]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSymbolInformationWide)(windows_core::Interface::as_raw(self), which, arg64, arg32, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, 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::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolInformationWide)(windows_core::Interface::as_raw(self), which, arg64, arg32, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, infosize.unwrap_or(core::mem::zeroed()) as _, 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()), stringsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSymbolInformationWideEx(&self, which: u32, arg64: u64, arg32: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, infosize: Option<*mut u32>, stringbuffer: Option<&mut [u16]>, stringsize: Option<*mut u32>, pinfoex: Option<*mut SYMBOL_INFO_EX>) -> windows_core::Result<()> { - unsafe { - (windows_core::Interface::vtable(self).GetSymbolInformationWideEx)( - windows_core::Interface::as_raw(self), - which, - arg64, - arg32, - core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), - buffersize, - 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::mem::zeroed())), - core::mem::transmute(pinfoex.unwrap_or(core::mem::zeroed())), - ) - .ok() - } + unsafe { (windows_core::Interface::vtable(self).GetSymbolInformationWideEx)(windows_core::Interface::as_raw(self), which, arg64, arg32, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, infosize.unwrap_or(core::mem::zeroed()) as _, 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()), stringsize.unwrap_or(core::mem::zeroed()) as _, pinfoex.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -5811,7 +5796,7 @@ impl IDebugBreakpoint { } } pub unsafe fn GetType(&self, breaktype: *mut u32, proctype: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetType)(windows_core::Interface::as_raw(self), core::mem::transmute(breaktype), core::mem::transmute(proctype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetType)(windows_core::Interface::as_raw(self), breaktype as _, proctype as _).ok() } } pub unsafe fn GetAdder(&self) -> windows_core::Result { unsafe { @@ -5844,7 +5829,7 @@ impl IDebugBreakpoint { unsafe { (windows_core::Interface::vtable(self).SetOffset)(windows_core::Interface::as_raw(self), offset).ok() } } pub unsafe fn GetDataParameters(&self, size: *mut u32, accesstype: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDataParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(size), core::mem::transmute(accesstype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDataParameters)(windows_core::Interface::as_raw(self), size as _, accesstype as _).ok() } } pub unsafe fn SetDataParameters(&self, size: u32, accesstype: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetDataParameters)(windows_core::Interface::as_raw(self), size, accesstype).ok() } @@ -5874,7 +5859,7 @@ impl IDebugBreakpoint { unsafe { (windows_core::Interface::vtable(self).SetMatchThreadId)(windows_core::Interface::as_raw(self), thread).ok() } } pub unsafe fn GetCommand(&self, buffer: Option<&mut [u8]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), commandsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetCommand(&self, command: P0) -> windows_core::Result<()> where @@ -5883,7 +5868,7 @@ impl IDebugBreakpoint { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), expressionsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetOffsetExpression(&self, expression: P0) -> windows_core::Result<()> where @@ -5892,7 +5877,7 @@ impl IDebugBreakpoint { unsafe { (windows_core::Interface::vtable(self).SetOffsetExpression)(windows_core::Interface::as_raw(self), expression.param().abi()).ok() } } pub unsafe fn GetParameters(&self, params: *mut DEBUG_BREAKPOINT_PARAMETERS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(params)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetParameters)(windows_core::Interface::as_raw(self), params as _).ok() } } } #[repr(C)] @@ -6153,7 +6138,7 @@ impl IDebugBreakpoint2 { } } pub unsafe fn GetType(&self, breaktype: *mut u32, proctype: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetType)(windows_core::Interface::as_raw(self), core::mem::transmute(breaktype), core::mem::transmute(proctype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetType)(windows_core::Interface::as_raw(self), breaktype as _, proctype as _).ok() } } pub unsafe fn GetAdder(&self) -> windows_core::Result { unsafe { @@ -6186,7 +6171,7 @@ impl IDebugBreakpoint2 { unsafe { (windows_core::Interface::vtable(self).SetOffset)(windows_core::Interface::as_raw(self), offset).ok() } } pub unsafe fn GetDataParameters(&self, size: *mut u32, accesstype: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDataParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(size), core::mem::transmute(accesstype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDataParameters)(windows_core::Interface::as_raw(self), size as _, accesstype as _).ok() } } pub unsafe fn SetDataParameters(&self, size: u32, accesstype: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetDataParameters)(windows_core::Interface::as_raw(self), size, accesstype).ok() } @@ -6216,7 +6201,7 @@ impl IDebugBreakpoint2 { unsafe { (windows_core::Interface::vtable(self).SetMatchThreadId)(windows_core::Interface::as_raw(self), thread).ok() } } pub unsafe fn GetCommand(&self, buffer: Option<&mut [u8]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), commandsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetCommand(&self, command: P0) -> windows_core::Result<()> where @@ -6225,7 +6210,7 @@ impl IDebugBreakpoint2 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), expressionsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetOffsetExpression(&self, expression: P0) -> windows_core::Result<()> where @@ -6234,10 +6219,10 @@ impl IDebugBreakpoint2 { unsafe { (windows_core::Interface::vtable(self).SetOffsetExpression)(windows_core::Interface::as_raw(self), expression.param().abi()).ok() } } pub unsafe fn GetParameters(&self, params: *mut DEBUG_BREAKPOINT_PARAMETERS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(params)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetParameters)(windows_core::Interface::as_raw(self), params as _).ok() } } pub unsafe fn GetCommandWide(&self, buffer: Option<&mut [u16]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), commandsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetCommandWide(&self, command: P0) -> windows_core::Result<()> where @@ -6246,7 +6231,7 @@ impl IDebugBreakpoint2 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), expressionsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetOffsetExpressionWide(&self, expression: P0) -> windows_core::Result<()> where @@ -6549,7 +6534,7 @@ impl IDebugBreakpoint3 { } } pub unsafe fn GetType(&self, breaktype: *mut u32, proctype: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetType)(windows_core::Interface::as_raw(self), core::mem::transmute(breaktype), core::mem::transmute(proctype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetType)(windows_core::Interface::as_raw(self), breaktype as _, proctype as _).ok() } } pub unsafe fn GetAdder(&self) -> windows_core::Result { unsafe { @@ -6582,7 +6567,7 @@ impl IDebugBreakpoint3 { unsafe { (windows_core::Interface::vtable(self).SetOffset)(windows_core::Interface::as_raw(self), offset).ok() } } pub unsafe fn GetDataParameters(&self, size: *mut u32, accesstype: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDataParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(size), core::mem::transmute(accesstype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDataParameters)(windows_core::Interface::as_raw(self), size as _, accesstype as _).ok() } } pub unsafe fn SetDataParameters(&self, size: u32, accesstype: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetDataParameters)(windows_core::Interface::as_raw(self), size, accesstype).ok() } @@ -6612,7 +6597,7 @@ impl IDebugBreakpoint3 { unsafe { (windows_core::Interface::vtable(self).SetMatchThreadId)(windows_core::Interface::as_raw(self), thread).ok() } } pub unsafe fn GetCommand(&self, buffer: Option<&mut [u8]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), commandsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetCommand(&self, command: P0) -> windows_core::Result<()> where @@ -6621,7 +6606,7 @@ impl IDebugBreakpoint3 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), expressionsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetOffsetExpression(&self, expression: P0) -> windows_core::Result<()> where @@ -6630,10 +6615,10 @@ impl IDebugBreakpoint3 { unsafe { (windows_core::Interface::vtable(self).SetOffsetExpression)(windows_core::Interface::as_raw(self), expression.param().abi()).ok() } } pub unsafe fn GetParameters(&self, params: *mut DEBUG_BREAKPOINT_PARAMETERS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(params)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetParameters)(windows_core::Interface::as_raw(self), params as _).ok() } } pub unsafe fn GetCommandWide(&self, buffer: Option<&mut [u16]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), commandsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetCommandWide(&self, command: P0) -> windows_core::Result<()> where @@ -6642,7 +6627,7 @@ impl IDebugBreakpoint3 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), expressionsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetOffsetExpressionWide(&self, expression: P0) -> windows_core::Result<()> where @@ -6966,7 +6951,7 @@ impl IDebugClient { unsafe { (windows_core::Interface::vtable(self).AttachKernel)(windows_core::Interface::as_raw(self), flags, connectoptions.param().abi()).ok() } } pub unsafe fn GetKernelConnectionOptions(&self, buffer: Option<&mut [u8]>, optionssize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), optionssize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> windows_core::Result<()> where @@ -6978,7 +6963,7 @@ impl IDebugClient { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ConnectProcessServer(&self, remoteoptions: P0) -> windows_core::Result where @@ -6993,7 +6978,7 @@ impl IDebugClient { unsafe { (windows_core::Interface::vtable(self).DisconnectProcessServer)(windows_core::Interface::as_raw(self), server).ok() } } pub unsafe fn GetRunningProcessSystemIds(&self, server: u64, ids: Option<&mut [u32]>, actualcount: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(actualcount.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), actualcount.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P1, flags: u32) -> windows_core::Result where @@ -7013,10 +6998,10 @@ impl IDebugClient { flags, core::mem::transmute(exename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualexenamesize.unwrap_or(core::mem::zeroed())), + actualexenamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + actualdescriptionsize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -7166,7 +7151,7 @@ impl IDebugClient { unsafe { (windows_core::Interface::vtable(self).SetOutputWidth)(windows_core::Interface::as_raw(self), columns).ok() } } pub unsafe fn GetOutputLinePrefix(&self, buffer: Option<&mut [u8]>, prefixsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), prefixsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> windows_core::Result<()> where @@ -7175,7 +7160,7 @@ impl IDebugClient { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), identitysize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P2) -> windows_core::Result<()> where @@ -7697,7 +7682,7 @@ impl IDebugClient2 { unsafe { (windows_core::Interface::vtable(self).AttachKernel)(windows_core::Interface::as_raw(self), flags, connectoptions.param().abi()).ok() } } pub unsafe fn GetKernelConnectionOptions(&self, buffer: Option<&mut [u8]>, optionssize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), optionssize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> windows_core::Result<()> where @@ -7709,7 +7694,7 @@ impl IDebugClient2 { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ConnectProcessServer(&self, remoteoptions: P0) -> windows_core::Result where @@ -7724,7 +7709,7 @@ impl IDebugClient2 { unsafe { (windows_core::Interface::vtable(self).DisconnectProcessServer)(windows_core::Interface::as_raw(self), server).ok() } } pub unsafe fn GetRunningProcessSystemIds(&self, server: u64, ids: Option<&mut [u32]>, actualcount: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(actualcount.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), actualcount.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P1, flags: u32) -> windows_core::Result where @@ -7744,10 +7729,10 @@ impl IDebugClient2 { flags, core::mem::transmute(exename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualexenamesize.unwrap_or(core::mem::zeroed())), + actualexenamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + actualdescriptionsize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -7897,7 +7882,7 @@ impl IDebugClient2 { unsafe { (windows_core::Interface::vtable(self).SetOutputWidth)(windows_core::Interface::as_raw(self), columns).ok() } } pub unsafe fn GetOutputLinePrefix(&self, buffer: Option<&mut [u8]>, prefixsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), prefixsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> windows_core::Result<()> where @@ -7906,7 +7891,7 @@ impl IDebugClient2 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), identitysize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P2) -> windows_core::Result<()> where @@ -8531,7 +8516,7 @@ impl IDebugClient3 { unsafe { (windows_core::Interface::vtable(self).AttachKernel)(windows_core::Interface::as_raw(self), flags, connectoptions.param().abi()).ok() } } pub unsafe fn GetKernelConnectionOptions(&self, buffer: Option<&mut [u8]>, optionssize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), optionssize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> windows_core::Result<()> where @@ -8543,7 +8528,7 @@ impl IDebugClient3 { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ConnectProcessServer(&self, remoteoptions: P0) -> windows_core::Result where @@ -8558,7 +8543,7 @@ impl IDebugClient3 { unsafe { (windows_core::Interface::vtable(self).DisconnectProcessServer)(windows_core::Interface::as_raw(self), server).ok() } } pub unsafe fn GetRunningProcessSystemIds(&self, server: u64, ids: Option<&mut [u32]>, actualcount: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(actualcount.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), actualcount.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P1, flags: u32) -> windows_core::Result where @@ -8578,10 +8563,10 @@ impl IDebugClient3 { flags, core::mem::transmute(exename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualexenamesize.unwrap_or(core::mem::zeroed())), + actualexenamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + actualdescriptionsize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -8731,7 +8716,7 @@ impl IDebugClient3 { unsafe { (windows_core::Interface::vtable(self).SetOutputWidth)(windows_core::Interface::as_raw(self), columns).ok() } } pub unsafe fn GetOutputLinePrefix(&self, buffer: Option<&mut [u8]>, prefixsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), prefixsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> windows_core::Result<()> where @@ -8740,7 +8725,7 @@ impl IDebugClient3 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), identitysize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P2) -> windows_core::Result<()> where @@ -8812,10 +8797,10 @@ impl IDebugClient3 { flags, core::mem::transmute(exename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualexenamesize.unwrap_or(core::mem::zeroed())), + actualexenamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + actualdescriptionsize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -9445,7 +9430,7 @@ impl IDebugClient4 { unsafe { (windows_core::Interface::vtable(self).AttachKernel)(windows_core::Interface::as_raw(self), flags, connectoptions.param().abi()).ok() } } pub unsafe fn GetKernelConnectionOptions(&self, buffer: Option<&mut [u8]>, optionssize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), optionssize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> windows_core::Result<()> where @@ -9457,7 +9442,7 @@ impl IDebugClient4 { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ConnectProcessServer(&self, remoteoptions: P0) -> windows_core::Result where @@ -9472,7 +9457,7 @@ impl IDebugClient4 { unsafe { (windows_core::Interface::vtable(self).DisconnectProcessServer)(windows_core::Interface::as_raw(self), server).ok() } } pub unsafe fn GetRunningProcessSystemIds(&self, server: u64, ids: Option<&mut [u32]>, actualcount: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(actualcount.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), actualcount.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P1, flags: u32) -> windows_core::Result where @@ -9492,10 +9477,10 @@ impl IDebugClient4 { flags, core::mem::transmute(exename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualexenamesize.unwrap_or(core::mem::zeroed())), + actualexenamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + actualdescriptionsize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -9645,7 +9630,7 @@ impl IDebugClient4 { unsafe { (windows_core::Interface::vtable(self).SetOutputWidth)(windows_core::Interface::as_raw(self), columns).ok() } } pub unsafe fn GetOutputLinePrefix(&self, buffer: Option<&mut [u8]>, prefixsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), prefixsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> windows_core::Result<()> where @@ -9654,7 +9639,7 @@ impl IDebugClient4 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), identitysize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P2) -> windows_core::Result<()> where @@ -9726,10 +9711,10 @@ impl IDebugClient4 { flags, core::mem::transmute(exename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualexenamesize.unwrap_or(core::mem::zeroed())), + actualexenamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + actualdescriptionsize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -9772,10 +9757,10 @@ impl IDebugClient4 { } } 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetDumpFile)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(handle.unwrap_or(core::mem::zeroed())), core::mem::transmute(r#type)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDumpFile)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, handle.unwrap_or(core::mem::zeroed()) as _, r#type as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetDumpFileWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(handle.unwrap_or(core::mem::zeroed())), core::mem::transmute(r#type)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDumpFileWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, handle.unwrap_or(core::mem::zeroed()) as _, r#type as _).ok() } } } #[repr(C)] @@ -10450,7 +10435,7 @@ impl IDebugClient5 { unsafe { (windows_core::Interface::vtable(self).AttachKernel)(windows_core::Interface::as_raw(self), flags, connectoptions.param().abi()).ok() } } pub unsafe fn GetKernelConnectionOptions(&self, buffer: Option<&mut [u8]>, optionssize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), optionssize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> windows_core::Result<()> where @@ -10462,7 +10447,7 @@ impl IDebugClient5 { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ConnectProcessServer(&self, remoteoptions: P0) -> windows_core::Result where @@ -10477,7 +10462,7 @@ impl IDebugClient5 { unsafe { (windows_core::Interface::vtable(self).DisconnectProcessServer)(windows_core::Interface::as_raw(self), server).ok() } } pub unsafe fn GetRunningProcessSystemIds(&self, server: u64, ids: Option<&mut [u32]>, actualcount: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(actualcount.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), actualcount.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P1, flags: u32) -> windows_core::Result where @@ -10497,10 +10482,10 @@ impl IDebugClient5 { flags, core::mem::transmute(exename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualexenamesize.unwrap_or(core::mem::zeroed())), + actualexenamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + actualdescriptionsize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -10650,7 +10635,7 @@ impl IDebugClient5 { unsafe { (windows_core::Interface::vtable(self).SetOutputWidth)(windows_core::Interface::as_raw(self), columns).ok() } } pub unsafe fn GetOutputLinePrefix(&self, buffer: Option<&mut [u8]>, prefixsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), prefixsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> windows_core::Result<()> where @@ -10659,7 +10644,7 @@ impl IDebugClient5 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), identitysize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P2) -> windows_core::Result<()> where @@ -10731,10 +10716,10 @@ impl IDebugClient5 { flags, core::mem::transmute(exename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualexenamesize.unwrap_or(core::mem::zeroed())), + actualexenamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + actualdescriptionsize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -10777,10 +10762,10 @@ impl IDebugClient5 { } } 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetDumpFile)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(handle.unwrap_or(core::mem::zeroed())), core::mem::transmute(r#type)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDumpFile)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, handle.unwrap_or(core::mem::zeroed()) as _, r#type as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetDumpFileWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(handle.unwrap_or(core::mem::zeroed())), core::mem::transmute(r#type)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDumpFileWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, handle.unwrap_or(core::mem::zeroed()) as _, r#type as _).ok() } } pub unsafe fn AttachKernelWide(&self, flags: u32, connectoptions: P1) -> windows_core::Result<()> where @@ -10789,7 +10774,7 @@ impl IDebugClient5 { unsafe { (windows_core::Interface::vtable(self).AttachKernelWide)(windows_core::Interface::as_raw(self), flags, connectoptions.param().abi()).ok() } } pub unsafe fn GetKernelConnectionOptionsWide(&self, buffer: Option<&mut [u16]>, optionssize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), optionssize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetKernelConnectionOptionsWide(&self, options: P0) -> windows_core::Result<()> where @@ -10801,7 +10786,7 @@ impl IDebugClient5 { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).StartProcessServerWide)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).StartProcessServerWide)(windows_core::Interface::as_raw(self), flags, options.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ConnectProcessServerWide(&self, remoteoptions: P0) -> windows_core::Result where @@ -10837,7 +10822,7 @@ impl IDebugClient5 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), prefixsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetOutputLinePrefixWide(&self, prefix: P0) -> windows_core::Result<()> where @@ -10846,7 +10831,7 @@ impl IDebugClient5 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), identitysize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputIdentityWide(&self, outputcontrol: u32, flags: u32, format: P2) -> windows_core::Result<()> where @@ -10938,7 +10923,7 @@ impl IDebugClient5 { } } pub unsafe fn GetQuitLockString(&self, buffer: Option<&mut [u8]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), stringsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetQuitLockString(&self, string: P0) -> windows_core::Result<()> where @@ -10947,7 +10932,7 @@ impl IDebugClient5 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), stringsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetQuitLockStringWide(&self, string: P0) -> windows_core::Result<()> where @@ -11937,7 +11922,7 @@ impl IDebugClient6 { unsafe { (windows_core::Interface::vtable(self).AttachKernel)(windows_core::Interface::as_raw(self), flags, connectoptions.param().abi()).ok() } } pub unsafe fn GetKernelConnectionOptions(&self, buffer: Option<&mut [u8]>, optionssize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), optionssize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> windows_core::Result<()> where @@ -11949,7 +11934,7 @@ impl IDebugClient6 { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ConnectProcessServer(&self, remoteoptions: P0) -> windows_core::Result where @@ -11964,7 +11949,7 @@ impl IDebugClient6 { unsafe { (windows_core::Interface::vtable(self).DisconnectProcessServer)(windows_core::Interface::as_raw(self), server).ok() } } pub unsafe fn GetRunningProcessSystemIds(&self, server: u64, ids: Option<&mut [u32]>, actualcount: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(actualcount.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), actualcount.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P1, flags: u32) -> windows_core::Result where @@ -11984,10 +11969,10 @@ impl IDebugClient6 { flags, core::mem::transmute(exename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualexenamesize.unwrap_or(core::mem::zeroed())), + actualexenamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + actualdescriptionsize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -12137,7 +12122,7 @@ impl IDebugClient6 { unsafe { (windows_core::Interface::vtable(self).SetOutputWidth)(windows_core::Interface::as_raw(self), columns).ok() } } pub unsafe fn GetOutputLinePrefix(&self, buffer: Option<&mut [u8]>, prefixsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), prefixsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> windows_core::Result<()> where @@ -12146,7 +12131,7 @@ impl IDebugClient6 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), identitysize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P2) -> windows_core::Result<()> where @@ -12218,10 +12203,10 @@ impl IDebugClient6 { flags, core::mem::transmute(exename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualexenamesize.unwrap_or(core::mem::zeroed())), + actualexenamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + actualdescriptionsize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -12264,10 +12249,10 @@ impl IDebugClient6 { } } 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetDumpFile)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(handle.unwrap_or(core::mem::zeroed())), core::mem::transmute(r#type)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDumpFile)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, handle.unwrap_or(core::mem::zeroed()) as _, r#type as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetDumpFileWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(handle.unwrap_or(core::mem::zeroed())), core::mem::transmute(r#type)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDumpFileWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, handle.unwrap_or(core::mem::zeroed()) as _, r#type as _).ok() } } pub unsafe fn AttachKernelWide(&self, flags: u32, connectoptions: P1) -> windows_core::Result<()> where @@ -12276,7 +12261,7 @@ impl IDebugClient6 { unsafe { (windows_core::Interface::vtable(self).AttachKernelWide)(windows_core::Interface::as_raw(self), flags, connectoptions.param().abi()).ok() } } pub unsafe fn GetKernelConnectionOptionsWide(&self, buffer: Option<&mut [u16]>, optionssize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), optionssize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetKernelConnectionOptionsWide(&self, options: P0) -> windows_core::Result<()> where @@ -12288,7 +12273,7 @@ impl IDebugClient6 { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).StartProcessServerWide)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).StartProcessServerWide)(windows_core::Interface::as_raw(self), flags, options.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ConnectProcessServerWide(&self, remoteoptions: P0) -> windows_core::Result where @@ -12324,7 +12309,7 @@ impl IDebugClient6 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), prefixsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetOutputLinePrefixWide(&self, prefix: P0) -> windows_core::Result<()> where @@ -12333,7 +12318,7 @@ impl IDebugClient6 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), identitysize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputIdentityWide(&self, outputcontrol: u32, flags: u32, format: P2) -> windows_core::Result<()> where @@ -12425,7 +12410,7 @@ impl IDebugClient6 { } } pub unsafe fn GetQuitLockString(&self, buffer: Option<&mut [u8]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), stringsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetQuitLockString(&self, string: P0) -> windows_core::Result<()> where @@ -12434,7 +12419,7 @@ impl IDebugClient6 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), stringsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetQuitLockStringWide(&self, string: P0) -> windows_core::Result<()> where @@ -13439,7 +13424,7 @@ impl IDebugClient7 { unsafe { (windows_core::Interface::vtable(self).AttachKernel)(windows_core::Interface::as_raw(self), flags, connectoptions.param().abi()).ok() } } pub unsafe fn GetKernelConnectionOptions(&self, buffer: Option<&mut [u8]>, optionssize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), optionssize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> windows_core::Result<()> where @@ -13451,7 +13436,7 @@ impl IDebugClient7 { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ConnectProcessServer(&self, remoteoptions: P0) -> windows_core::Result where @@ -13466,7 +13451,7 @@ impl IDebugClient7 { unsafe { (windows_core::Interface::vtable(self).DisconnectProcessServer)(windows_core::Interface::as_raw(self), server).ok() } } pub unsafe fn GetRunningProcessSystemIds(&self, server: u64, ids: Option<&mut [u32]>, actualcount: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(actualcount.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), actualcount.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P1, flags: u32) -> windows_core::Result where @@ -13486,10 +13471,10 @@ impl IDebugClient7 { flags, core::mem::transmute(exename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualexenamesize.unwrap_or(core::mem::zeroed())), + actualexenamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + actualdescriptionsize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -13639,7 +13624,7 @@ impl IDebugClient7 { unsafe { (windows_core::Interface::vtable(self).SetOutputWidth)(windows_core::Interface::as_raw(self), columns).ok() } } pub unsafe fn GetOutputLinePrefix(&self, buffer: Option<&mut [u8]>, prefixsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), prefixsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> windows_core::Result<()> where @@ -13648,7 +13633,7 @@ impl IDebugClient7 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), identitysize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P2) -> windows_core::Result<()> where @@ -13720,10 +13705,10 @@ impl IDebugClient7 { flags, core::mem::transmute(exename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualexenamesize.unwrap_or(core::mem::zeroed())), + actualexenamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + actualdescriptionsize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -13766,10 +13751,10 @@ impl IDebugClient7 { } } 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetDumpFile)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(handle.unwrap_or(core::mem::zeroed())), core::mem::transmute(r#type)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDumpFile)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, handle.unwrap_or(core::mem::zeroed()) as _, r#type as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetDumpFileWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(handle.unwrap_or(core::mem::zeroed())), core::mem::transmute(r#type)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDumpFileWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, handle.unwrap_or(core::mem::zeroed()) as _, r#type as _).ok() } } pub unsafe fn AttachKernelWide(&self, flags: u32, connectoptions: P1) -> windows_core::Result<()> where @@ -13778,7 +13763,7 @@ impl IDebugClient7 { unsafe { (windows_core::Interface::vtable(self).AttachKernelWide)(windows_core::Interface::as_raw(self), flags, connectoptions.param().abi()).ok() } } pub unsafe fn GetKernelConnectionOptionsWide(&self, buffer: Option<&mut [u16]>, optionssize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), optionssize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetKernelConnectionOptionsWide(&self, options: P0) -> windows_core::Result<()> where @@ -13790,7 +13775,7 @@ impl IDebugClient7 { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).StartProcessServerWide)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).StartProcessServerWide)(windows_core::Interface::as_raw(self), flags, options.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ConnectProcessServerWide(&self, remoteoptions: P0) -> windows_core::Result where @@ -13826,7 +13811,7 @@ impl IDebugClient7 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), prefixsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetOutputLinePrefixWide(&self, prefix: P0) -> windows_core::Result<()> where @@ -13835,7 +13820,7 @@ impl IDebugClient7 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), identitysize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputIdentityWide(&self, outputcontrol: u32, flags: u32, format: P2) -> windows_core::Result<()> where @@ -13927,7 +13912,7 @@ impl IDebugClient7 { } } pub unsafe fn GetQuitLockString(&self, buffer: Option<&mut [u8]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), stringsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetQuitLockString(&self, string: P0) -> windows_core::Result<()> where @@ -13936,7 +13921,7 @@ impl IDebugClient7 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), stringsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetQuitLockStringWide(&self, string: P0) -> windows_core::Result<()> where @@ -14953,7 +14938,7 @@ impl IDebugClient8 { unsafe { (windows_core::Interface::vtable(self).AttachKernel)(windows_core::Interface::as_raw(self), flags, connectoptions.param().abi()).ok() } } pub unsafe fn GetKernelConnectionOptions(&self, buffer: Option<&mut [u8]>, optionssize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), optionssize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> windows_core::Result<()> where @@ -14965,7 +14950,7 @@ impl IDebugClient8 { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ConnectProcessServer(&self, remoteoptions: P0) -> windows_core::Result where @@ -14980,7 +14965,7 @@ impl IDebugClient8 { unsafe { (windows_core::Interface::vtable(self).DisconnectProcessServer)(windows_core::Interface::as_raw(self), server).ok() } } pub unsafe fn GetRunningProcessSystemIds(&self, server: u64, ids: Option<&mut [u32]>, actualcount: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(actualcount.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), actualcount.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P1, flags: u32) -> windows_core::Result where @@ -15000,10 +14985,10 @@ impl IDebugClient8 { flags, core::mem::transmute(exename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualexenamesize.unwrap_or(core::mem::zeroed())), + actualexenamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + actualdescriptionsize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -15153,7 +15138,7 @@ impl IDebugClient8 { unsafe { (windows_core::Interface::vtable(self).SetOutputWidth)(windows_core::Interface::as_raw(self), columns).ok() } } pub unsafe fn GetOutputLinePrefix(&self, buffer: Option<&mut [u8]>, prefixsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), prefixsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> windows_core::Result<()> where @@ -15162,7 +15147,7 @@ impl IDebugClient8 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), identitysize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P2) -> windows_core::Result<()> where @@ -15234,10 +15219,10 @@ impl IDebugClient8 { flags, core::mem::transmute(exename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualexenamesize.unwrap_or(core::mem::zeroed())), + actualexenamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + actualdescriptionsize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -15280,10 +15265,10 @@ impl IDebugClient8 { } } 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetDumpFile)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(handle.unwrap_or(core::mem::zeroed())), core::mem::transmute(r#type)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDumpFile)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, handle.unwrap_or(core::mem::zeroed()) as _, r#type as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetDumpFileWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(handle.unwrap_or(core::mem::zeroed())), core::mem::transmute(r#type)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDumpFileWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, handle.unwrap_or(core::mem::zeroed()) as _, r#type as _).ok() } } pub unsafe fn AttachKernelWide(&self, flags: u32, connectoptions: P1) -> windows_core::Result<()> where @@ -15292,7 +15277,7 @@ impl IDebugClient8 { unsafe { (windows_core::Interface::vtable(self).AttachKernelWide)(windows_core::Interface::as_raw(self), flags, connectoptions.param().abi()).ok() } } pub unsafe fn GetKernelConnectionOptionsWide(&self, buffer: Option<&mut [u16]>, optionssize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), optionssize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetKernelConnectionOptionsWide(&self, options: P0) -> windows_core::Result<()> where @@ -15304,7 +15289,7 @@ impl IDebugClient8 { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).StartProcessServerWide)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).StartProcessServerWide)(windows_core::Interface::as_raw(self), flags, options.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ConnectProcessServerWide(&self, remoteoptions: P0) -> windows_core::Result where @@ -15340,7 +15325,7 @@ impl IDebugClient8 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), prefixsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetOutputLinePrefixWide(&self, prefix: P0) -> windows_core::Result<()> where @@ -15349,7 +15334,7 @@ impl IDebugClient8 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), identitysize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputIdentityWide(&self, outputcontrol: u32, flags: u32, format: P2) -> windows_core::Result<()> where @@ -15441,7 +15426,7 @@ impl IDebugClient8 { } } pub unsafe fn GetQuitLockString(&self, buffer: Option<&mut [u8]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), stringsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetQuitLockString(&self, string: P0) -> windows_core::Result<()> where @@ -15450,7 +15435,7 @@ impl IDebugClient8 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), stringsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetQuitLockStringWide(&self, string: P0) -> windows_core::Result<()> where @@ -16491,7 +16476,7 @@ impl IDebugControl { unsafe { (windows_core::Interface::vtable(self).SetInterruptTimeout)(windows_core::Interface::as_raw(self), seconds).ok() } } pub unsafe fn GetLogFile(&self, buffer: Option<&mut [u8]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), filesize.unwrap_or(core::mem::zeroed()) as _, append as _).ok() } } pub unsafe fn OpenLogFile(&self, file: P0, append: bool) -> windows_core::Result<()> where @@ -16512,7 +16497,7 @@ impl IDebugControl { unsafe { (windows_core::Interface::vtable(self).SetLogMask)(windows_core::Interface::as_raw(self), mask).ok() } } pub unsafe fn Input(&self, buffer: &mut [u8], inputsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Input)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), inputsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReturnInput(&self, buffer: P0) -> windows_core::Result<()> where @@ -16557,7 +16542,7 @@ impl IDebugControl { unsafe { (windows_core::Interface::vtable(self).OutputPromptVaList)(windows_core::Interface::as_raw(self), outputcontrol, format.param().abi(), args).ok() } } pub unsafe fn GetPromptText(&self, buffer: Option<&mut [u8]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), textsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputCurrentState(&self, outputcontrol: u32, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputCurrentState)(windows_core::Interface::as_raw(self), outputcontrol, flags).ok() } @@ -16584,7 +16569,7 @@ impl IDebugControl { } } pub unsafe fn Disassemble(&self, offset: u64, flags: u32, buffer: Option<&mut [u8]>, disassemblysize: Option<*mut u32>, endoffset: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(core::mem::zeroed())), core::mem::transmute(endoffset)).ok() } + unsafe { (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), disassemblysize.unwrap_or(core::mem::zeroed()) as _, endoffset as _).ok() } } pub unsafe fn GetDisassembleEffectiveOffset(&self) -> windows_core::Result { unsafe { @@ -16599,7 +16584,7 @@ impl IDebugControl { } } pub unsafe fn OutputDisassemblyLines(&self, outputcontrol: u32, previouslines: u32, offset: u64, flags: u32, offsetline: Option<*mut u32>, startoffset: Option<*mut u64>, endoffset: Option<*mut u64>, lineoffsets: Option<&mut [u64]>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OutputDisassemblyLines)(windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, core::mem::transmute(offsetline.unwrap_or(core::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() } + unsafe { (windows_core::Interface::vtable(self).OutputDisassemblyLines)(windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, offsetline.unwrap_or(core::mem::zeroed()) as _, startoffset.unwrap_or(core::mem::zeroed()) as _, endoffset.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(lineoffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() } } pub unsafe fn GetNearInstruction(&self, offset: u64, delta: i32) -> windows_core::Result { unsafe { @@ -16608,7 +16593,7 @@ impl IDebugControl { } } pub unsafe fn GetStackTrace(&self, frameoffset: u64, stackoffset: u64, instructionoffset: u64, frames: &mut [DEBUG_STACK_FRAME], framesfilled: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), framesfilled.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetReturnOffset(&self) -> windows_core::Result { unsafe { @@ -16620,7 +16605,7 @@ impl IDebugControl { unsafe { (windows_core::Interface::vtable(self).OutputStackTrace)(windows_core::Interface::as_raw(self), outputcontrol, core::mem::transmute(frames.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags).ok() } } pub unsafe fn GetDebuggeeType(&self, class: *mut u32, qualifier: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDebuggeeType)(windows_core::Interface::as_raw(self), core::mem::transmute(class), core::mem::transmute(qualifier)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDebuggeeType)(windows_core::Interface::as_raw(self), class as _, qualifier as _).ok() } } pub unsafe fn GetActualProcessorType(&self) -> windows_core::Result { unsafe { @@ -16653,16 +16638,16 @@ impl IDebugControl { unsafe { (windows_core::Interface::vtable(self).GetSystemVersion)( windows_core::Interface::as_raw(self), - core::mem::transmute(platformid), - core::mem::transmute(major), - core::mem::transmute(minor), + platformid as _, + major as _, + minor as _, 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::mem::zeroed())), - core::mem::transmute(servicepacknumber), + servicepackstringused.unwrap_or(core::mem::zeroed()) as _, + servicepacknumber as _, 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::mem::zeroed())), + buildstringused.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -16677,7 +16662,7 @@ impl IDebugControl { unsafe { (windows_core::Interface::vtable(self).IsPointer64Bit)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn ReadBugCheckData(&self, code: *mut u32, arg1: *mut u64, arg2: *mut u64, arg3: *mut u64, arg4: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadBugCheckData)(windows_core::Interface::as_raw(self), core::mem::transmute(code), core::mem::transmute(arg1), core::mem::transmute(arg2), core::mem::transmute(arg3), core::mem::transmute(arg4)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadBugCheckData)(windows_core::Interface::as_raw(self), code as _, arg1 as _, arg2 as _, arg3 as _, arg4 as _).ok() } } pub unsafe fn GetNumberSupportedProcessorTypes(&self) -> windows_core::Result { unsafe { @@ -16695,10 +16680,10 @@ impl IDebugControl { r#type, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), + fullnamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + abbrevnamesize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -16746,13 +16731,13 @@ impl IDebugControl { unsafe { (windows_core::Interface::vtable(self).SetEngineOptions)(windows_core::Interface::as_raw(self), options).ok() } } pub unsafe fn GetSystemErrorControl(&self, outputlevel: *mut u32, breaklevel: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSystemErrorControl)(windows_core::Interface::as_raw(self), core::mem::transmute(outputlevel), core::mem::transmute(breaklevel)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSystemErrorControl)(windows_core::Interface::as_raw(self), outputlevel as _, breaklevel as _).ok() } } pub unsafe fn SetSystemErrorControl(&self, outputlevel: u32, breaklevel: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSystemErrorControl)(windows_core::Interface::as_raw(self), outputlevel, breaklevel).ok() } } pub unsafe fn GetTextMacro(&self, slot: u32, buffer: Option<&mut [u8]>, macrosize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), macrosize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetTextMacro(&self, slot: u32, r#macro: P1) -> windows_core::Result<()> where @@ -16773,13 +16758,13 @@ impl IDebugControl { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value as _, remainderindex.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CoerceValue(&self, r#in: *const DEBUG_VALUE, outtype: u32, out: *mut DEBUG_VALUE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CoerceValue)(windows_core::Interface::as_raw(self), r#in, outtype, core::mem::transmute(out)).ok() } + unsafe { (windows_core::Interface::vtable(self).CoerceValue)(windows_core::Interface::as_raw(self), r#in, outtype, out as _).ok() } } pub unsafe fn CoerceValues(&self, count: u32, r#in: *const DEBUG_VALUE, outtypes: *const u32, out: *mut DEBUG_VALUE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CoerceValues)(windows_core::Interface::as_raw(self), count, r#in, outtypes, core::mem::transmute(out)).ok() } + unsafe { (windows_core::Interface::vtable(self).CoerceValues)(windows_core::Interface::as_raw(self), count, r#in, outtypes, out as _).ok() } } pub unsafe fn Execute(&self, outputcontrol: u32, command: P1, flags: u32) -> windows_core::Result<()> where @@ -16812,7 +16797,7 @@ impl IDebugControl { } } pub unsafe fn GetBreakpointParameters(&self, count: u32, ids: Option<*const u32>, start: u32, params: *mut DEBUG_BREAKPOINT_PARAMETERS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), start, core::mem::transmute(params)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), count, ids.unwrap_or(core::mem::zeroed()) as _, start, params as _).ok() } } pub unsafe fn AddBreakpoint(&self, r#type: u32, desiredid: u32) -> windows_core::Result { unsafe { @@ -16865,20 +16850,20 @@ impl IDebugControl { } #[cfg(feature = "Win32_System_Kernel")] pub unsafe fn GetWindbgExtensionApis32(&self, api: *mut WINDBG_EXTENSION_APIS32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWindbgExtensionApis32)(windows_core::Interface::as_raw(self), core::mem::transmute(api)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWindbgExtensionApis32)(windows_core::Interface::as_raw(self), api as _).ok() } } #[cfg(feature = "Win32_System_Kernel")] pub unsafe fn GetWindbgExtensionApis64(&self, api: *mut WINDBG_EXTENSION_APIS64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWindbgExtensionApis64)(windows_core::Interface::as_raw(self), core::mem::transmute(api)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWindbgExtensionApis64)(windows_core::Interface::as_raw(self), api as _).ok() } } pub unsafe fn GetNumberEventFilters(&self, specificevents: *mut u32, specificexceptions: *mut u32, arbitraryexceptions: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetNumberEventFilters)(windows_core::Interface::as_raw(self), specificevents as _, specificexceptions as _, arbitraryexceptions as _).ok() } } pub unsafe fn GetEventFilterText(&self, index: u32, buffer: Option<&mut [u8]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), textsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetEventFilterCommand(&self, index: u32, buffer: Option<&mut [u8]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), commandsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetEventFilterCommand(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -16893,7 +16878,7 @@ impl IDebugControl { unsafe { (windows_core::Interface::vtable(self).SetSpecificFilterParameters)(windows_core::Interface::as_raw(self), start, params.len().try_into().unwrap(), core::mem::transmute(params.as_ptr())).ok() } } pub unsafe fn GetSpecificFilterArgument(&self, index: u32, buffer: Option<&mut [u8]>, argumentsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), argumentsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetSpecificFilterArgument(&self, index: u32, argument: P1) -> windows_core::Result<()> where @@ -16902,13 +16887,13 @@ impl IDebugControl { unsafe { (windows_core::Interface::vtable(self).SetSpecificFilterArgument)(windows_core::Interface::as_raw(self), index, argument.param().abi()).ok() } } pub unsafe fn GetExceptionFilterParameters(&self, count: u32, codes: Option<*const u32>, start: u32, params: *mut DEBUG_EXCEPTION_FILTER_PARAMETERS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(codes.unwrap_or(core::mem::zeroed())), start, core::mem::transmute(params)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), count, codes.unwrap_or(core::mem::zeroed()) as _, start, params as _).ok() } } pub unsafe fn SetExceptionFilterParameters(&self, params: &[DEBUG_EXCEPTION_FILTER_PARAMETERS]) -> windows_core::Result<()> { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), commandsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetExceptionFilterSecondCommand(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -16920,21 +16905,7 @@ impl IDebugControl { unsafe { (windows_core::Interface::vtable(self).WaitForEvent)(windows_core::Interface::as_raw(self), flags, timeout).ok() } } pub unsafe fn GetLastEventInformation(&self, r#type: *mut u32, processid: *mut u32, threadid: *mut u32, extrainformation: Option<*mut core::ffi::c_void>, extrainformationsize: u32, extrainformationused: Option<*mut u32>, description: Option<&mut [u8]>, descriptionused: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { - (windows_core::Interface::vtable(self).GetLastEventInformation)( - windows_core::Interface::as_raw(self), - core::mem::transmute(r#type), - core::mem::transmute(processid), - core::mem::transmute(threadid), - core::mem::transmute(extrainformation.unwrap_or(core::mem::zeroed())), - extrainformationsize, - 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::mem::zeroed())), - ) - .ok() - } + unsafe { (windows_core::Interface::vtable(self).GetLastEventInformation)(windows_core::Interface::as_raw(self), r#type as _, processid as _, threadid as _, extrainformation.unwrap_or(core::mem::zeroed()) as _, extrainformationsize, extrainformationused.unwrap_or(core::mem::zeroed()) as _, 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()), descriptionused.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -17966,7 +17937,7 @@ impl IDebugControl2 { unsafe { (windows_core::Interface::vtable(self).SetInterruptTimeout)(windows_core::Interface::as_raw(self), seconds).ok() } } pub unsafe fn GetLogFile(&self, buffer: Option<&mut [u8]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), filesize.unwrap_or(core::mem::zeroed()) as _, append as _).ok() } } pub unsafe fn OpenLogFile(&self, file: P0, append: bool) -> windows_core::Result<()> where @@ -17987,7 +17958,7 @@ impl IDebugControl2 { unsafe { (windows_core::Interface::vtable(self).SetLogMask)(windows_core::Interface::as_raw(self), mask).ok() } } pub unsafe fn Input(&self, buffer: &mut [u8], inputsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Input)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), inputsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReturnInput(&self, buffer: P0) -> windows_core::Result<()> where @@ -18032,7 +18003,7 @@ impl IDebugControl2 { unsafe { (windows_core::Interface::vtable(self).OutputPromptVaList)(windows_core::Interface::as_raw(self), outputcontrol, format.param().abi(), args).ok() } } pub unsafe fn GetPromptText(&self, buffer: Option<&mut [u8]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), textsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputCurrentState(&self, outputcontrol: u32, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputCurrentState)(windows_core::Interface::as_raw(self), outputcontrol, flags).ok() } @@ -18059,7 +18030,7 @@ impl IDebugControl2 { } } pub unsafe fn Disassemble(&self, offset: u64, flags: u32, buffer: Option<&mut [u8]>, disassemblysize: Option<*mut u32>, endoffset: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(core::mem::zeroed())), core::mem::transmute(endoffset)).ok() } + unsafe { (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), disassemblysize.unwrap_or(core::mem::zeroed()) as _, endoffset as _).ok() } } pub unsafe fn GetDisassembleEffectiveOffset(&self) -> windows_core::Result { unsafe { @@ -18074,7 +18045,7 @@ impl IDebugControl2 { } } pub unsafe fn OutputDisassemblyLines(&self, outputcontrol: u32, previouslines: u32, offset: u64, flags: u32, offsetline: Option<*mut u32>, startoffset: Option<*mut u64>, endoffset: Option<*mut u64>, lineoffsets: Option<&mut [u64]>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OutputDisassemblyLines)(windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, core::mem::transmute(offsetline.unwrap_or(core::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() } + unsafe { (windows_core::Interface::vtable(self).OutputDisassemblyLines)(windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, offsetline.unwrap_or(core::mem::zeroed()) as _, startoffset.unwrap_or(core::mem::zeroed()) as _, endoffset.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(lineoffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() } } pub unsafe fn GetNearInstruction(&self, offset: u64, delta: i32) -> windows_core::Result { unsafe { @@ -18083,7 +18054,7 @@ impl IDebugControl2 { } } pub unsafe fn GetStackTrace(&self, frameoffset: u64, stackoffset: u64, instructionoffset: u64, frames: &mut [DEBUG_STACK_FRAME], framesfilled: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), framesfilled.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetReturnOffset(&self) -> windows_core::Result { unsafe { @@ -18095,7 +18066,7 @@ impl IDebugControl2 { unsafe { (windows_core::Interface::vtable(self).OutputStackTrace)(windows_core::Interface::as_raw(self), outputcontrol, core::mem::transmute(frames.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags).ok() } } pub unsafe fn GetDebuggeeType(&self, class: *mut u32, qualifier: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDebuggeeType)(windows_core::Interface::as_raw(self), core::mem::transmute(class), core::mem::transmute(qualifier)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDebuggeeType)(windows_core::Interface::as_raw(self), class as _, qualifier as _).ok() } } pub unsafe fn GetActualProcessorType(&self) -> windows_core::Result { unsafe { @@ -18128,16 +18099,16 @@ impl IDebugControl2 { unsafe { (windows_core::Interface::vtable(self).GetSystemVersion)( windows_core::Interface::as_raw(self), - core::mem::transmute(platformid), - core::mem::transmute(major), - core::mem::transmute(minor), + platformid as _, + major as _, + minor as _, 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::mem::zeroed())), - core::mem::transmute(servicepacknumber), + servicepackstringused.unwrap_or(core::mem::zeroed()) as _, + servicepacknumber as _, 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::mem::zeroed())), + buildstringused.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -18152,7 +18123,7 @@ impl IDebugControl2 { unsafe { (windows_core::Interface::vtable(self).IsPointer64Bit)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn ReadBugCheckData(&self, code: *mut u32, arg1: *mut u64, arg2: *mut u64, arg3: *mut u64, arg4: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadBugCheckData)(windows_core::Interface::as_raw(self), core::mem::transmute(code), core::mem::transmute(arg1), core::mem::transmute(arg2), core::mem::transmute(arg3), core::mem::transmute(arg4)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadBugCheckData)(windows_core::Interface::as_raw(self), code as _, arg1 as _, arg2 as _, arg3 as _, arg4 as _).ok() } } pub unsafe fn GetNumberSupportedProcessorTypes(&self) -> windows_core::Result { unsafe { @@ -18170,10 +18141,10 @@ impl IDebugControl2 { r#type, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), + fullnamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + abbrevnamesize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -18221,13 +18192,13 @@ impl IDebugControl2 { unsafe { (windows_core::Interface::vtable(self).SetEngineOptions)(windows_core::Interface::as_raw(self), options).ok() } } pub unsafe fn GetSystemErrorControl(&self, outputlevel: *mut u32, breaklevel: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSystemErrorControl)(windows_core::Interface::as_raw(self), core::mem::transmute(outputlevel), core::mem::transmute(breaklevel)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSystemErrorControl)(windows_core::Interface::as_raw(self), outputlevel as _, breaklevel as _).ok() } } pub unsafe fn SetSystemErrorControl(&self, outputlevel: u32, breaklevel: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSystemErrorControl)(windows_core::Interface::as_raw(self), outputlevel, breaklevel).ok() } } pub unsafe fn GetTextMacro(&self, slot: u32, buffer: Option<&mut [u8]>, macrosize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), macrosize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetTextMacro(&self, slot: u32, r#macro: P1) -> windows_core::Result<()> where @@ -18248,13 +18219,13 @@ impl IDebugControl2 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value as _, remainderindex.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CoerceValue(&self, r#in: *const DEBUG_VALUE, outtype: u32, out: *mut DEBUG_VALUE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CoerceValue)(windows_core::Interface::as_raw(self), r#in, outtype, core::mem::transmute(out)).ok() } + unsafe { (windows_core::Interface::vtable(self).CoerceValue)(windows_core::Interface::as_raw(self), r#in, outtype, out as _).ok() } } pub unsafe fn CoerceValues(&self, count: u32, r#in: *const DEBUG_VALUE, outtypes: *const u32, out: *mut DEBUG_VALUE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CoerceValues)(windows_core::Interface::as_raw(self), count, r#in, outtypes, core::mem::transmute(out)).ok() } + unsafe { (windows_core::Interface::vtable(self).CoerceValues)(windows_core::Interface::as_raw(self), count, r#in, outtypes, out as _).ok() } } pub unsafe fn Execute(&self, outputcontrol: u32, command: P1, flags: u32) -> windows_core::Result<()> where @@ -18287,7 +18258,7 @@ impl IDebugControl2 { } } pub unsafe fn GetBreakpointParameters(&self, count: u32, ids: Option<*const u32>, start: u32, params: *mut DEBUG_BREAKPOINT_PARAMETERS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), start, core::mem::transmute(params)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), count, ids.unwrap_or(core::mem::zeroed()) as _, start, params as _).ok() } } pub unsafe fn AddBreakpoint(&self, r#type: u32, desiredid: u32) -> windows_core::Result { unsafe { @@ -18340,20 +18311,20 @@ impl IDebugControl2 { } #[cfg(feature = "Win32_System_Kernel")] pub unsafe fn GetWindbgExtensionApis32(&self, api: *mut WINDBG_EXTENSION_APIS32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWindbgExtensionApis32)(windows_core::Interface::as_raw(self), core::mem::transmute(api)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWindbgExtensionApis32)(windows_core::Interface::as_raw(self), api as _).ok() } } #[cfg(feature = "Win32_System_Kernel")] pub unsafe fn GetWindbgExtensionApis64(&self, api: *mut WINDBG_EXTENSION_APIS64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWindbgExtensionApis64)(windows_core::Interface::as_raw(self), core::mem::transmute(api)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWindbgExtensionApis64)(windows_core::Interface::as_raw(self), api as _).ok() } } pub unsafe fn GetNumberEventFilters(&self, specificevents: *mut u32, specificexceptions: *mut u32, arbitraryexceptions: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetNumberEventFilters)(windows_core::Interface::as_raw(self), specificevents as _, specificexceptions as _, arbitraryexceptions as _).ok() } } pub unsafe fn GetEventFilterText(&self, index: u32, buffer: Option<&mut [u8]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), textsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetEventFilterCommand(&self, index: u32, buffer: Option<&mut [u8]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), commandsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetEventFilterCommand(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -18368,7 +18339,7 @@ impl IDebugControl2 { unsafe { (windows_core::Interface::vtable(self).SetSpecificFilterParameters)(windows_core::Interface::as_raw(self), start, params.len().try_into().unwrap(), core::mem::transmute(params.as_ptr())).ok() } } pub unsafe fn GetSpecificFilterArgument(&self, index: u32, buffer: Option<&mut [u8]>, argumentsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), argumentsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetSpecificFilterArgument(&self, index: u32, argument: P1) -> windows_core::Result<()> where @@ -18377,13 +18348,13 @@ impl IDebugControl2 { unsafe { (windows_core::Interface::vtable(self).SetSpecificFilterArgument)(windows_core::Interface::as_raw(self), index, argument.param().abi()).ok() } } pub unsafe fn GetExceptionFilterParameters(&self, count: u32, codes: Option<*const u32>, start: u32, params: *mut DEBUG_EXCEPTION_FILTER_PARAMETERS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(codes.unwrap_or(core::mem::zeroed())), start, core::mem::transmute(params)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), count, codes.unwrap_or(core::mem::zeroed()) as _, start, params as _).ok() } } pub unsafe fn SetExceptionFilterParameters(&self, params: &[DEBUG_EXCEPTION_FILTER_PARAMETERS]) -> windows_core::Result<()> { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), commandsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetExceptionFilterSecondCommand(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -18395,21 +18366,7 @@ impl IDebugControl2 { unsafe { (windows_core::Interface::vtable(self).WaitForEvent)(windows_core::Interface::as_raw(self), flags, timeout).ok() } } pub unsafe fn GetLastEventInformation(&self, r#type: *mut u32, processid: *mut u32, threadid: *mut u32, extrainformation: Option<*mut core::ffi::c_void>, extrainformationsize: u32, extrainformationused: Option<*mut u32>, description: Option<&mut [u8]>, descriptionused: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { - (windows_core::Interface::vtable(self).GetLastEventInformation)( - windows_core::Interface::as_raw(self), - core::mem::transmute(r#type), - core::mem::transmute(processid), - core::mem::transmute(threadid), - core::mem::transmute(extrainformation.unwrap_or(core::mem::zeroed())), - extrainformationsize, - 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::mem::zeroed())), - ) - .ok() - } + unsafe { (windows_core::Interface::vtable(self).GetLastEventInformation)(windows_core::Interface::as_raw(self), r#type as _, processid as _, threadid as _, extrainformation.unwrap_or(core::mem::zeroed()) as _, extrainformationsize, extrainformationused.unwrap_or(core::mem::zeroed()) as _, 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()), descriptionused.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetCurrentTimeDate(&self) -> windows_core::Result { unsafe { @@ -18446,10 +18403,10 @@ impl IDebugControl2 { index, core::mem::transmute(srcbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), srcbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(srcsize.unwrap_or(core::mem::zeroed())), + srcsize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + dstsize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -19593,7 +19550,7 @@ impl IDebugControl3 { unsafe { (windows_core::Interface::vtable(self).SetInterruptTimeout)(windows_core::Interface::as_raw(self), seconds).ok() } } pub unsafe fn GetLogFile(&self, buffer: Option<&mut [u8]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), filesize.unwrap_or(core::mem::zeroed()) as _, append as _).ok() } } pub unsafe fn OpenLogFile(&self, file: P0, append: bool) -> windows_core::Result<()> where @@ -19614,7 +19571,7 @@ impl IDebugControl3 { unsafe { (windows_core::Interface::vtable(self).SetLogMask)(windows_core::Interface::as_raw(self), mask).ok() } } pub unsafe fn Input(&self, buffer: &mut [u8], inputsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Input)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), inputsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReturnInput(&self, buffer: P0) -> windows_core::Result<()> where @@ -19659,7 +19616,7 @@ impl IDebugControl3 { unsafe { (windows_core::Interface::vtable(self).OutputPromptVaList)(windows_core::Interface::as_raw(self), outputcontrol, format.param().abi(), args).ok() } } pub unsafe fn GetPromptText(&self, buffer: Option<&mut [u8]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), textsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputCurrentState(&self, outputcontrol: u32, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputCurrentState)(windows_core::Interface::as_raw(self), outputcontrol, flags).ok() } @@ -19686,7 +19643,7 @@ impl IDebugControl3 { } } pub unsafe fn Disassemble(&self, offset: u64, flags: u32, buffer: Option<&mut [u8]>, disassemblysize: Option<*mut u32>, endoffset: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(core::mem::zeroed())), core::mem::transmute(endoffset)).ok() } + unsafe { (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), disassemblysize.unwrap_or(core::mem::zeroed()) as _, endoffset as _).ok() } } pub unsafe fn GetDisassembleEffectiveOffset(&self) -> windows_core::Result { unsafe { @@ -19701,7 +19658,7 @@ impl IDebugControl3 { } } pub unsafe fn OutputDisassemblyLines(&self, outputcontrol: u32, previouslines: u32, offset: u64, flags: u32, offsetline: Option<*mut u32>, startoffset: Option<*mut u64>, endoffset: Option<*mut u64>, lineoffsets: Option<&mut [u64]>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OutputDisassemblyLines)(windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, core::mem::transmute(offsetline.unwrap_or(core::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() } + unsafe { (windows_core::Interface::vtable(self).OutputDisassemblyLines)(windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, offsetline.unwrap_or(core::mem::zeroed()) as _, startoffset.unwrap_or(core::mem::zeroed()) as _, endoffset.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(lineoffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() } } pub unsafe fn GetNearInstruction(&self, offset: u64, delta: i32) -> windows_core::Result { unsafe { @@ -19710,7 +19667,7 @@ impl IDebugControl3 { } } pub unsafe fn GetStackTrace(&self, frameoffset: u64, stackoffset: u64, instructionoffset: u64, frames: &mut [DEBUG_STACK_FRAME], framesfilled: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), framesfilled.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetReturnOffset(&self) -> windows_core::Result { unsafe { @@ -19722,7 +19679,7 @@ impl IDebugControl3 { unsafe { (windows_core::Interface::vtable(self).OutputStackTrace)(windows_core::Interface::as_raw(self), outputcontrol, core::mem::transmute(frames.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags).ok() } } pub unsafe fn GetDebuggeeType(&self, class: *mut u32, qualifier: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDebuggeeType)(windows_core::Interface::as_raw(self), core::mem::transmute(class), core::mem::transmute(qualifier)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDebuggeeType)(windows_core::Interface::as_raw(self), class as _, qualifier as _).ok() } } pub unsafe fn GetActualProcessorType(&self) -> windows_core::Result { unsafe { @@ -19755,16 +19712,16 @@ impl IDebugControl3 { unsafe { (windows_core::Interface::vtable(self).GetSystemVersion)( windows_core::Interface::as_raw(self), - core::mem::transmute(platformid), - core::mem::transmute(major), - core::mem::transmute(minor), + platformid as _, + major as _, + minor as _, 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::mem::zeroed())), - core::mem::transmute(servicepacknumber), + servicepackstringused.unwrap_or(core::mem::zeroed()) as _, + servicepacknumber as _, 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::mem::zeroed())), + buildstringused.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -19779,7 +19736,7 @@ impl IDebugControl3 { unsafe { (windows_core::Interface::vtable(self).IsPointer64Bit)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn ReadBugCheckData(&self, code: *mut u32, arg1: *mut u64, arg2: *mut u64, arg3: *mut u64, arg4: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadBugCheckData)(windows_core::Interface::as_raw(self), core::mem::transmute(code), core::mem::transmute(arg1), core::mem::transmute(arg2), core::mem::transmute(arg3), core::mem::transmute(arg4)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadBugCheckData)(windows_core::Interface::as_raw(self), code as _, arg1 as _, arg2 as _, arg3 as _, arg4 as _).ok() } } pub unsafe fn GetNumberSupportedProcessorTypes(&self) -> windows_core::Result { unsafe { @@ -19797,10 +19754,10 @@ impl IDebugControl3 { r#type, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), + fullnamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + abbrevnamesize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -19848,13 +19805,13 @@ impl IDebugControl3 { unsafe { (windows_core::Interface::vtable(self).SetEngineOptions)(windows_core::Interface::as_raw(self), options).ok() } } pub unsafe fn GetSystemErrorControl(&self, outputlevel: *mut u32, breaklevel: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSystemErrorControl)(windows_core::Interface::as_raw(self), core::mem::transmute(outputlevel), core::mem::transmute(breaklevel)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSystemErrorControl)(windows_core::Interface::as_raw(self), outputlevel as _, breaklevel as _).ok() } } pub unsafe fn SetSystemErrorControl(&self, outputlevel: u32, breaklevel: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSystemErrorControl)(windows_core::Interface::as_raw(self), outputlevel, breaklevel).ok() } } pub unsafe fn GetTextMacro(&self, slot: u32, buffer: Option<&mut [u8]>, macrosize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), macrosize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetTextMacro(&self, slot: u32, r#macro: P1) -> windows_core::Result<()> where @@ -19875,13 +19832,13 @@ impl IDebugControl3 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value as _, remainderindex.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CoerceValue(&self, r#in: *const DEBUG_VALUE, outtype: u32, out: *mut DEBUG_VALUE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CoerceValue)(windows_core::Interface::as_raw(self), r#in, outtype, core::mem::transmute(out)).ok() } + unsafe { (windows_core::Interface::vtable(self).CoerceValue)(windows_core::Interface::as_raw(self), r#in, outtype, out as _).ok() } } pub unsafe fn CoerceValues(&self, count: u32, r#in: *const DEBUG_VALUE, outtypes: *const u32, out: *mut DEBUG_VALUE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CoerceValues)(windows_core::Interface::as_raw(self), count, r#in, outtypes, core::mem::transmute(out)).ok() } + unsafe { (windows_core::Interface::vtable(self).CoerceValues)(windows_core::Interface::as_raw(self), count, r#in, outtypes, out as _).ok() } } pub unsafe fn Execute(&self, outputcontrol: u32, command: P1, flags: u32) -> windows_core::Result<()> where @@ -19914,7 +19871,7 @@ impl IDebugControl3 { } } pub unsafe fn GetBreakpointParameters(&self, count: u32, ids: Option<*const u32>, start: u32, params: *mut DEBUG_BREAKPOINT_PARAMETERS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), start, core::mem::transmute(params)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), count, ids.unwrap_or(core::mem::zeroed()) as _, start, params as _).ok() } } pub unsafe fn AddBreakpoint(&self, r#type: u32, desiredid: u32) -> windows_core::Result { unsafe { @@ -19967,20 +19924,20 @@ impl IDebugControl3 { } #[cfg(feature = "Win32_System_Kernel")] pub unsafe fn GetWindbgExtensionApis32(&self, api: *mut WINDBG_EXTENSION_APIS32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWindbgExtensionApis32)(windows_core::Interface::as_raw(self), core::mem::transmute(api)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWindbgExtensionApis32)(windows_core::Interface::as_raw(self), api as _).ok() } } #[cfg(feature = "Win32_System_Kernel")] pub unsafe fn GetWindbgExtensionApis64(&self, api: *mut WINDBG_EXTENSION_APIS64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWindbgExtensionApis64)(windows_core::Interface::as_raw(self), core::mem::transmute(api)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWindbgExtensionApis64)(windows_core::Interface::as_raw(self), api as _).ok() } } pub unsafe fn GetNumberEventFilters(&self, specificevents: *mut u32, specificexceptions: *mut u32, arbitraryexceptions: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetNumberEventFilters)(windows_core::Interface::as_raw(self), specificevents as _, specificexceptions as _, arbitraryexceptions as _).ok() } } pub unsafe fn GetEventFilterText(&self, index: u32, buffer: Option<&mut [u8]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), textsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetEventFilterCommand(&self, index: u32, buffer: Option<&mut [u8]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), commandsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetEventFilterCommand(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -19995,7 +19952,7 @@ impl IDebugControl3 { unsafe { (windows_core::Interface::vtable(self).SetSpecificFilterParameters)(windows_core::Interface::as_raw(self), start, params.len().try_into().unwrap(), core::mem::transmute(params.as_ptr())).ok() } } pub unsafe fn GetSpecificFilterArgument(&self, index: u32, buffer: Option<&mut [u8]>, argumentsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), argumentsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetSpecificFilterArgument(&self, index: u32, argument: P1) -> windows_core::Result<()> where @@ -20004,13 +19961,13 @@ impl IDebugControl3 { unsafe { (windows_core::Interface::vtable(self).SetSpecificFilterArgument)(windows_core::Interface::as_raw(self), index, argument.param().abi()).ok() } } pub unsafe fn GetExceptionFilterParameters(&self, count: u32, codes: Option<*const u32>, start: u32, params: *mut DEBUG_EXCEPTION_FILTER_PARAMETERS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(codes.unwrap_or(core::mem::zeroed())), start, core::mem::transmute(params)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), count, codes.unwrap_or(core::mem::zeroed()) as _, start, params as _).ok() } } pub unsafe fn SetExceptionFilterParameters(&self, params: &[DEBUG_EXCEPTION_FILTER_PARAMETERS]) -> windows_core::Result<()> { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), commandsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetExceptionFilterSecondCommand(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -20022,21 +19979,7 @@ impl IDebugControl3 { unsafe { (windows_core::Interface::vtable(self).WaitForEvent)(windows_core::Interface::as_raw(self), flags, timeout).ok() } } pub unsafe fn GetLastEventInformation(&self, r#type: *mut u32, processid: *mut u32, threadid: *mut u32, extrainformation: Option<*mut core::ffi::c_void>, extrainformationsize: u32, extrainformationused: Option<*mut u32>, description: Option<&mut [u8]>, descriptionused: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { - (windows_core::Interface::vtable(self).GetLastEventInformation)( - windows_core::Interface::as_raw(self), - core::mem::transmute(r#type), - core::mem::transmute(processid), - core::mem::transmute(threadid), - core::mem::transmute(extrainformation.unwrap_or(core::mem::zeroed())), - extrainformationsize, - 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::mem::zeroed())), - ) - .ok() - } + unsafe { (windows_core::Interface::vtable(self).GetLastEventInformation)(windows_core::Interface::as_raw(self), r#type as _, processid as _, threadid as _, extrainformation.unwrap_or(core::mem::zeroed()) as _, extrainformationsize, extrainformationused.unwrap_or(core::mem::zeroed()) as _, 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()), descriptionused.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetCurrentTimeDate(&self) -> windows_core::Result { unsafe { @@ -20073,10 +20016,10 @@ impl IDebugControl3 { index, core::mem::transmute(srcbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), srcbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(srcsize.unwrap_or(core::mem::zeroed())), + srcsize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + dstsize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -20137,10 +20080,10 @@ impl IDebugControl3 { index, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), + fullnamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + abbrevnamesize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -20155,7 +20098,7 @@ impl IDebugControl3 { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetEventIndexDescription)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, core::mem::transmute(descsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventIndexDescription)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, descsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetCurrentEventIndex(&self) -> windows_core::Result { unsafe { @@ -21448,7 +21391,7 @@ impl IDebugControl4 { unsafe { (windows_core::Interface::vtable(self).SetInterruptTimeout)(windows_core::Interface::as_raw(self), seconds).ok() } } pub unsafe fn GetLogFile(&self, buffer: Option<&mut [u8]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), filesize.unwrap_or(core::mem::zeroed()) as _, append as _).ok() } } pub unsafe fn OpenLogFile(&self, file: P0, append: bool) -> windows_core::Result<()> where @@ -21469,7 +21412,7 @@ impl IDebugControl4 { unsafe { (windows_core::Interface::vtable(self).SetLogMask)(windows_core::Interface::as_raw(self), mask).ok() } } pub unsafe fn Input(&self, buffer: &mut [u8], inputsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Input)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), inputsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReturnInput(&self, buffer: P0) -> windows_core::Result<()> where @@ -21514,7 +21457,7 @@ impl IDebugControl4 { unsafe { (windows_core::Interface::vtable(self).OutputPromptVaList)(windows_core::Interface::as_raw(self), outputcontrol, format.param().abi(), args).ok() } } pub unsafe fn GetPromptText(&self, buffer: Option<&mut [u8]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), textsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputCurrentState(&self, outputcontrol: u32, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputCurrentState)(windows_core::Interface::as_raw(self), outputcontrol, flags).ok() } @@ -21541,7 +21484,7 @@ impl IDebugControl4 { } } pub unsafe fn Disassemble(&self, offset: u64, flags: u32, buffer: Option<&mut [u8]>, disassemblysize: Option<*mut u32>, endoffset: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(core::mem::zeroed())), core::mem::transmute(endoffset)).ok() } + unsafe { (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), disassemblysize.unwrap_or(core::mem::zeroed()) as _, endoffset as _).ok() } } pub unsafe fn GetDisassembleEffectiveOffset(&self) -> windows_core::Result { unsafe { @@ -21556,7 +21499,7 @@ impl IDebugControl4 { } } pub unsafe fn OutputDisassemblyLines(&self, outputcontrol: u32, previouslines: u32, offset: u64, flags: u32, offsetline: Option<*mut u32>, startoffset: Option<*mut u64>, endoffset: Option<*mut u64>, lineoffsets: Option<&mut [u64]>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OutputDisassemblyLines)(windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, core::mem::transmute(offsetline.unwrap_or(core::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() } + unsafe { (windows_core::Interface::vtable(self).OutputDisassemblyLines)(windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, offsetline.unwrap_or(core::mem::zeroed()) as _, startoffset.unwrap_or(core::mem::zeroed()) as _, endoffset.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(lineoffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() } } pub unsafe fn GetNearInstruction(&self, offset: u64, delta: i32) -> windows_core::Result { unsafe { @@ -21565,7 +21508,7 @@ impl IDebugControl4 { } } pub unsafe fn GetStackTrace(&self, frameoffset: u64, stackoffset: u64, instructionoffset: u64, frames: &mut [DEBUG_STACK_FRAME], framesfilled: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), framesfilled.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetReturnOffset(&self) -> windows_core::Result { unsafe { @@ -21577,7 +21520,7 @@ impl IDebugControl4 { unsafe { (windows_core::Interface::vtable(self).OutputStackTrace)(windows_core::Interface::as_raw(self), outputcontrol, core::mem::transmute(frames.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags).ok() } } pub unsafe fn GetDebuggeeType(&self, class: *mut u32, qualifier: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDebuggeeType)(windows_core::Interface::as_raw(self), core::mem::transmute(class), core::mem::transmute(qualifier)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDebuggeeType)(windows_core::Interface::as_raw(self), class as _, qualifier as _).ok() } } pub unsafe fn GetActualProcessorType(&self) -> windows_core::Result { unsafe { @@ -21610,16 +21553,16 @@ impl IDebugControl4 { unsafe { (windows_core::Interface::vtable(self).GetSystemVersion)( windows_core::Interface::as_raw(self), - core::mem::transmute(platformid), - core::mem::transmute(major), - core::mem::transmute(minor), + platformid as _, + major as _, + minor as _, 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::mem::zeroed())), - core::mem::transmute(servicepacknumber), + servicepackstringused.unwrap_or(core::mem::zeroed()) as _, + servicepacknumber as _, 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::mem::zeroed())), + buildstringused.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -21634,7 +21577,7 @@ impl IDebugControl4 { unsafe { (windows_core::Interface::vtable(self).IsPointer64Bit)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn ReadBugCheckData(&self, code: *mut u32, arg1: *mut u64, arg2: *mut u64, arg3: *mut u64, arg4: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadBugCheckData)(windows_core::Interface::as_raw(self), core::mem::transmute(code), core::mem::transmute(arg1), core::mem::transmute(arg2), core::mem::transmute(arg3), core::mem::transmute(arg4)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadBugCheckData)(windows_core::Interface::as_raw(self), code as _, arg1 as _, arg2 as _, arg3 as _, arg4 as _).ok() } } pub unsafe fn GetNumberSupportedProcessorTypes(&self) -> windows_core::Result { unsafe { @@ -21652,10 +21595,10 @@ impl IDebugControl4 { r#type, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), + fullnamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + abbrevnamesize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -21703,13 +21646,13 @@ impl IDebugControl4 { unsafe { (windows_core::Interface::vtable(self).SetEngineOptions)(windows_core::Interface::as_raw(self), options).ok() } } pub unsafe fn GetSystemErrorControl(&self, outputlevel: *mut u32, breaklevel: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSystemErrorControl)(windows_core::Interface::as_raw(self), core::mem::transmute(outputlevel), core::mem::transmute(breaklevel)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSystemErrorControl)(windows_core::Interface::as_raw(self), outputlevel as _, breaklevel as _).ok() } } pub unsafe fn SetSystemErrorControl(&self, outputlevel: u32, breaklevel: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSystemErrorControl)(windows_core::Interface::as_raw(self), outputlevel, breaklevel).ok() } } pub unsafe fn GetTextMacro(&self, slot: u32, buffer: Option<&mut [u8]>, macrosize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), macrosize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetTextMacro(&self, slot: u32, r#macro: P1) -> windows_core::Result<()> where @@ -21730,13 +21673,13 @@ impl IDebugControl4 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value as _, remainderindex.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CoerceValue(&self, r#in: *const DEBUG_VALUE, outtype: u32, out: *mut DEBUG_VALUE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CoerceValue)(windows_core::Interface::as_raw(self), r#in, outtype, core::mem::transmute(out)).ok() } + unsafe { (windows_core::Interface::vtable(self).CoerceValue)(windows_core::Interface::as_raw(self), r#in, outtype, out as _).ok() } } pub unsafe fn CoerceValues(&self, count: u32, r#in: *const DEBUG_VALUE, outtypes: *const u32, out: *mut DEBUG_VALUE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CoerceValues)(windows_core::Interface::as_raw(self), count, r#in, outtypes, core::mem::transmute(out)).ok() } + unsafe { (windows_core::Interface::vtable(self).CoerceValues)(windows_core::Interface::as_raw(self), count, r#in, outtypes, out as _).ok() } } pub unsafe fn Execute(&self, outputcontrol: u32, command: P1, flags: u32) -> windows_core::Result<()> where @@ -21769,7 +21712,7 @@ impl IDebugControl4 { } } pub unsafe fn GetBreakpointParameters(&self, count: u32, ids: Option<*const u32>, start: u32, params: *mut DEBUG_BREAKPOINT_PARAMETERS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), start, core::mem::transmute(params)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), count, ids.unwrap_or(core::mem::zeroed()) as _, start, params as _).ok() } } pub unsafe fn AddBreakpoint(&self, r#type: u32, desiredid: u32) -> windows_core::Result { unsafe { @@ -21822,20 +21765,20 @@ impl IDebugControl4 { } #[cfg(feature = "Win32_System_Kernel")] pub unsafe fn GetWindbgExtensionApis32(&self, api: *mut WINDBG_EXTENSION_APIS32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWindbgExtensionApis32)(windows_core::Interface::as_raw(self), core::mem::transmute(api)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWindbgExtensionApis32)(windows_core::Interface::as_raw(self), api as _).ok() } } #[cfg(feature = "Win32_System_Kernel")] pub unsafe fn GetWindbgExtensionApis64(&self, api: *mut WINDBG_EXTENSION_APIS64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWindbgExtensionApis64)(windows_core::Interface::as_raw(self), core::mem::transmute(api)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWindbgExtensionApis64)(windows_core::Interface::as_raw(self), api as _).ok() } } pub unsafe fn GetNumberEventFilters(&self, specificevents: *mut u32, specificexceptions: *mut u32, arbitraryexceptions: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetNumberEventFilters)(windows_core::Interface::as_raw(self), specificevents as _, specificexceptions as _, arbitraryexceptions as _).ok() } } pub unsafe fn GetEventFilterText(&self, index: u32, buffer: Option<&mut [u8]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), textsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetEventFilterCommand(&self, index: u32, buffer: Option<&mut [u8]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), commandsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetEventFilterCommand(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -21850,7 +21793,7 @@ impl IDebugControl4 { unsafe { (windows_core::Interface::vtable(self).SetSpecificFilterParameters)(windows_core::Interface::as_raw(self), start, params.len().try_into().unwrap(), core::mem::transmute(params.as_ptr())).ok() } } pub unsafe fn GetSpecificFilterArgument(&self, index: u32, buffer: Option<&mut [u8]>, argumentsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), argumentsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetSpecificFilterArgument(&self, index: u32, argument: P1) -> windows_core::Result<()> where @@ -21859,13 +21802,13 @@ impl IDebugControl4 { unsafe { (windows_core::Interface::vtable(self).SetSpecificFilterArgument)(windows_core::Interface::as_raw(self), index, argument.param().abi()).ok() } } pub unsafe fn GetExceptionFilterParameters(&self, count: u32, codes: Option<*const u32>, start: u32, params: *mut DEBUG_EXCEPTION_FILTER_PARAMETERS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(codes.unwrap_or(core::mem::zeroed())), start, core::mem::transmute(params)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), count, codes.unwrap_or(core::mem::zeroed()) as _, start, params as _).ok() } } pub unsafe fn SetExceptionFilterParameters(&self, params: &[DEBUG_EXCEPTION_FILTER_PARAMETERS]) -> windows_core::Result<()> { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), commandsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetExceptionFilterSecondCommand(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -21877,21 +21820,7 @@ impl IDebugControl4 { unsafe { (windows_core::Interface::vtable(self).WaitForEvent)(windows_core::Interface::as_raw(self), flags, timeout).ok() } } pub unsafe fn GetLastEventInformation(&self, r#type: *mut u32, processid: *mut u32, threadid: *mut u32, extrainformation: Option<*mut core::ffi::c_void>, extrainformationsize: u32, extrainformationused: Option<*mut u32>, description: Option<&mut [u8]>, descriptionused: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { - (windows_core::Interface::vtable(self).GetLastEventInformation)( - windows_core::Interface::as_raw(self), - core::mem::transmute(r#type), - core::mem::transmute(processid), - core::mem::transmute(threadid), - core::mem::transmute(extrainformation.unwrap_or(core::mem::zeroed())), - extrainformationsize, - 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::mem::zeroed())), - ) - .ok() - } + unsafe { (windows_core::Interface::vtable(self).GetLastEventInformation)(windows_core::Interface::as_raw(self), r#type as _, processid as _, threadid as _, extrainformation.unwrap_or(core::mem::zeroed()) as _, extrainformationsize, extrainformationused.unwrap_or(core::mem::zeroed()) as _, 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()), descriptionused.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetCurrentTimeDate(&self) -> windows_core::Result { unsafe { @@ -21928,10 +21857,10 @@ impl IDebugControl4 { index, core::mem::transmute(srcbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), srcbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(srcsize.unwrap_or(core::mem::zeroed())), + srcsize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + dstsize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -21992,10 +21921,10 @@ impl IDebugControl4 { index, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), + fullnamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + abbrevnamesize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -22010,7 +21939,7 @@ impl IDebugControl4 { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetEventIndexDescription)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, core::mem::transmute(descsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventIndexDescription)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, descsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetCurrentEventIndex(&self) -> windows_core::Result { unsafe { @@ -22025,7 +21954,7 @@ impl IDebugControl4 { } } pub unsafe fn GetLogFileWide(&self, buffer: Option<&mut [u16]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), filesize.unwrap_or(core::mem::zeroed()) as _, append as _).ok() } } pub unsafe fn OpenLogFileWide(&self, file: P0, append: bool) -> windows_core::Result<()> where @@ -22034,7 +21963,7 @@ impl IDebugControl4 { unsafe { (windows_core::Interface::vtable(self).OpenLogFileWide)(windows_core::Interface::as_raw(self), file.param().abi(), append.into()).ok() } } pub unsafe fn InputWide(&self, buffer: &mut [u16], inputsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).InputWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), inputsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReturnInputWide(&self, buffer: P0) -> windows_core::Result<()> where @@ -22079,7 +22008,7 @@ impl IDebugControl4 { unsafe { (windows_core::Interface::vtable(self).OutputPromptVaListWide)(windows_core::Interface::as_raw(self), outputcontrol, format.param().abi(), args).ok() } } pub unsafe fn GetPromptTextWide(&self, buffer: Option<&mut [u16]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), textsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn AssembleWide(&self, offset: u64, instr: P1) -> windows_core::Result where @@ -22091,7 +22020,7 @@ impl IDebugControl4 { } } pub unsafe fn DisassembleWide(&self, offset: u64, flags: u32, buffer: Option<&mut [u16]>, disassemblysize: Option<*mut u32>, endoffset: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DisassembleWide)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(core::mem::zeroed())), core::mem::transmute(endoffset)).ok() } + unsafe { (windows_core::Interface::vtable(self).DisassembleWide)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), disassemblysize.unwrap_or(core::mem::zeroed()) as _, endoffset as _).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<()> { unsafe { @@ -22100,16 +22029,16 @@ impl IDebugControl4 { r#type, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), + fullnamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + abbrevnamesize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } } pub unsafe fn GetTextMacroWide(&self, slot: u32, buffer: Option<&mut [u16]>, macrosize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTextMacroWide)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTextMacroWide)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), macrosize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetTextMacroWide(&self, slot: u32, r#macro: P1) -> windows_core::Result<()> where @@ -22121,7 +22050,7 @@ impl IDebugControl4 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EvaluateWide)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).EvaluateWide)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value as _, remainderindex.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ExecuteWide(&self, outputcontrol: u32, command: P1, flags: u32) -> windows_core::Result<()> where @@ -22194,10 +22123,10 @@ impl IDebugControl4 { } } pub unsafe fn GetEventFilterTextWide(&self, index: u32, buffer: Option<&mut [u16]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEventFilterTextWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventFilterTextWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), textsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetEventFilterCommandWide(&self, index: u32, buffer: Option<&mut [u16]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEventFilterCommandWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventFilterCommandWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), commandsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetEventFilterCommandWide(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -22206,7 +22135,7 @@ impl IDebugControl4 { unsafe { (windows_core::Interface::vtable(self).SetEventFilterCommandWide)(windows_core::Interface::as_raw(self), index, command.param().abi()).ok() } } pub unsafe fn GetSpecificFilterArgumentWide(&self, index: u32, buffer: Option<&mut [u16]>, argumentsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), argumentsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetSpecificFilterArgumentWide(&self, index: u32, argument: P1) -> windows_core::Result<()> where @@ -22215,7 +22144,7 @@ impl IDebugControl4 { unsafe { (windows_core::Interface::vtable(self).SetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), index, argument.param().abi()).ok() } } pub unsafe fn GetExceptionFilterSecondCommandWide(&self, index: u32, buffer: Option<&mut [u16]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommandWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommandWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), commandsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetExceptionFilterSecondCommandWide(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -22224,21 +22153,7 @@ impl IDebugControl4 { unsafe { (windows_core::Interface::vtable(self).SetExceptionFilterSecondCommandWide)(windows_core::Interface::as_raw(self), index, command.param().abi()).ok() } } pub unsafe fn GetLastEventInformationWide(&self, r#type: *mut u32, processid: *mut u32, threadid: *mut u32, extrainformation: Option<*mut core::ffi::c_void>, extrainformationsize: u32, extrainformationused: Option<*mut u32>, description: Option<&mut [u16]>, descriptionused: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { - (windows_core::Interface::vtable(self).GetLastEventInformationWide)( - windows_core::Interface::as_raw(self), - core::mem::transmute(r#type), - core::mem::transmute(processid), - core::mem::transmute(threadid), - core::mem::transmute(extrainformation.unwrap_or(core::mem::zeroed())), - extrainformationsize, - 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::mem::zeroed())), - ) - .ok() - } + unsafe { (windows_core::Interface::vtable(self).GetLastEventInformationWide)(windows_core::Interface::as_raw(self), r#type as _, processid as _, threadid as _, extrainformation.unwrap_or(core::mem::zeroed()) as _, extrainformationsize, extrainformationused.unwrap_or(core::mem::zeroed()) as _, 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()), descriptionused.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetTextReplacementWide(&self, srctext: P0, index: u32, srcbuffer: Option<&mut [u16]>, srcsize: Option<*mut u32>, dstbuffer: Option<&mut [u16]>, dstsize: Option<*mut u32>) -> windows_core::Result<()> where @@ -22251,10 +22166,10 @@ impl IDebugControl4 { index, core::mem::transmute(srcbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), srcbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(srcsize.unwrap_or(core::mem::zeroed())), + srcsize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + dstsize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -22279,10 +22194,10 @@ impl IDebugControl4 { index, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), + fullnamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + abbrevnamesize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -22291,10 +22206,10 @@ impl IDebugControl4 { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetEventIndexDescriptionWide)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, core::mem::transmute(descsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventIndexDescriptionWide)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, descsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetLogFile2(&self, buffer: Option<&mut [u8]>, filesize: Option<*mut u32>, flags: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), filesize.unwrap_or(core::mem::zeroed()) as _, flags as _).ok() } } pub unsafe fn OpenLogFile2(&self, file: P0, flags: u32) -> windows_core::Result<()> where @@ -22303,7 +22218,7 @@ impl IDebugControl4 { unsafe { (windows_core::Interface::vtable(self).OpenLogFile2)(windows_core::Interface::as_raw(self), file.param().abi(), flags).ok() } } pub unsafe fn GetLogFile2Wide(&self, buffer: Option<&mut [u16]>, filesize: Option<*mut u32>, flags: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), filesize.unwrap_or(core::mem::zeroed()) as _, flags as _).ok() } } pub unsafe fn OpenLogFile2Wide(&self, file: P0, flags: u32) -> windows_core::Result<()> where @@ -22312,28 +22227,28 @@ impl IDebugControl4 { unsafe { (windows_core::Interface::vtable(self).OpenLogFile2Wide)(windows_core::Interface::as_raw(self), file.param().abi(), flags).ok() } } pub unsafe fn GetSystemVersionValues(&self, platformid: *mut u32, win32major: *mut u32, win32minor: *mut u32, kdmajor: Option<*mut u32>, kdminor: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetSystemVersionValues)(windows_core::Interface::as_raw(self), platformid as _, win32major as _, win32minor as _, kdmajor.unwrap_or(core::mem::zeroed()) as _, kdminor.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSystemVersionString(&self, which: u32, buffer: Option<&mut [u8]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSystemVersionString)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSystemVersionString)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), stringsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSystemVersionStringWide(&self, which: u32, buffer: Option<&mut [u16]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSystemVersionStringWide)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSystemVersionStringWide)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), stringsize.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetContextStackTrace)(windows_core::Interface::as_raw(self), core::mem::transmute(startcontext.unwrap_or(core::mem::zeroed())), 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::mem::zeroed())), framecontextssize, framecontextsentrysize, core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetContextStackTrace)(windows_core::Interface::as_raw(self), startcontext.unwrap_or(core::mem::zeroed()) as _, 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()), framecontexts.unwrap_or(core::mem::zeroed()) as _, framecontextssize, framecontextsentrysize, framesfilled.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputContextStackTrace(&self, outputcontrol: u32, frames: &[DEBUG_STACK_FRAME], framecontexts: *const core::ffi::c_void, framecontextssize: u32, framecontextsentrysize: u32, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputContextStackTrace)(windows_core::Interface::as_raw(self), outputcontrol, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), framecontexts, framecontextssize, framecontextsentrysize, flags).ok() } } pub unsafe fn GetStoredEventInformation(&self, r#type: *mut u32, processid: *mut u32, threadid: *mut u32, context: Option<*mut core::ffi::c_void>, contextsize: u32, contextused: Option<*mut u32>, extrainformation: Option<*mut core::ffi::c_void>, extrainformationsize: u32, extrainformationused: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStoredEventInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(r#type), core::mem::transmute(processid), core::mem::transmute(threadid), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), contextsize, core::mem::transmute(contextused.unwrap_or(core::mem::zeroed())), core::mem::transmute(extrainformation.unwrap_or(core::mem::zeroed())), extrainformationsize, core::mem::transmute(extrainformationused.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStoredEventInformation)(windows_core::Interface::as_raw(self), r#type as _, processid as _, threadid as _, context.unwrap_or(core::mem::zeroed()) as _, contextsize, contextused.unwrap_or(core::mem::zeroed()) as _, extrainformation.unwrap_or(core::mem::zeroed()) as _, extrainformationsize, extrainformationused.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetManagedStatus(&self, flags: Option<*mut u32>, whichstring: u32, string: Option<&mut [u8]>, stringneeded: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetManagedStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), 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() } + unsafe { (windows_core::Interface::vtable(self).GetManagedStatus)(windows_core::Interface::as_raw(self), flags.unwrap_or(core::mem::zeroed()) as _, 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()), stringneeded.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetManagedStatusWide(&self, flags: Option<*mut u32>, whichstring: u32, string: Option<&mut [u16]>, stringneeded: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetManagedStatusWide)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), 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() } + unsafe { (windows_core::Interface::vtable(self).GetManagedStatusWide)(windows_core::Interface::as_raw(self), flags.unwrap_or(core::mem::zeroed()) as _, 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()), stringneeded.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ResetManagedStatus(&self, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ResetManagedStatus)(windows_core::Interface::as_raw(self), flags).ok() } @@ -24136,7 +24051,7 @@ impl IDebugControl5 { unsafe { (windows_core::Interface::vtable(self).SetInterruptTimeout)(windows_core::Interface::as_raw(self), seconds).ok() } } pub unsafe fn GetLogFile(&self, buffer: Option<&mut [u8]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), filesize.unwrap_or(core::mem::zeroed()) as _, append as _).ok() } } pub unsafe fn OpenLogFile(&self, file: P0, append: bool) -> windows_core::Result<()> where @@ -24157,7 +24072,7 @@ impl IDebugControl5 { unsafe { (windows_core::Interface::vtable(self).SetLogMask)(windows_core::Interface::as_raw(self), mask).ok() } } pub unsafe fn Input(&self, buffer: &mut [u8], inputsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Input)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), inputsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReturnInput(&self, buffer: P0) -> windows_core::Result<()> where @@ -24202,7 +24117,7 @@ impl IDebugControl5 { unsafe { (windows_core::Interface::vtable(self).OutputPromptVaList)(windows_core::Interface::as_raw(self), outputcontrol, format.param().abi(), args).ok() } } pub unsafe fn GetPromptText(&self, buffer: Option<&mut [u8]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), textsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputCurrentState(&self, outputcontrol: u32, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputCurrentState)(windows_core::Interface::as_raw(self), outputcontrol, flags).ok() } @@ -24229,7 +24144,7 @@ impl IDebugControl5 { } } pub unsafe fn Disassemble(&self, offset: u64, flags: u32, buffer: Option<&mut [u8]>, disassemblysize: Option<*mut u32>, endoffset: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(core::mem::zeroed())), core::mem::transmute(endoffset)).ok() } + unsafe { (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), disassemblysize.unwrap_or(core::mem::zeroed()) as _, endoffset as _).ok() } } pub unsafe fn GetDisassembleEffectiveOffset(&self) -> windows_core::Result { unsafe { @@ -24244,7 +24159,7 @@ impl IDebugControl5 { } } pub unsafe fn OutputDisassemblyLines(&self, outputcontrol: u32, previouslines: u32, offset: u64, flags: u32, offsetline: Option<*mut u32>, startoffset: Option<*mut u64>, endoffset: Option<*mut u64>, lineoffsets: Option<&mut [u64]>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OutputDisassemblyLines)(windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, core::mem::transmute(offsetline.unwrap_or(core::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() } + unsafe { (windows_core::Interface::vtable(self).OutputDisassemblyLines)(windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, offsetline.unwrap_or(core::mem::zeroed()) as _, startoffset.unwrap_or(core::mem::zeroed()) as _, endoffset.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(lineoffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() } } pub unsafe fn GetNearInstruction(&self, offset: u64, delta: i32) -> windows_core::Result { unsafe { @@ -24253,7 +24168,7 @@ impl IDebugControl5 { } } pub unsafe fn GetStackTrace(&self, frameoffset: u64, stackoffset: u64, instructionoffset: u64, frames: &mut [DEBUG_STACK_FRAME], framesfilled: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), framesfilled.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetReturnOffset(&self) -> windows_core::Result { unsafe { @@ -24265,7 +24180,7 @@ impl IDebugControl5 { unsafe { (windows_core::Interface::vtable(self).OutputStackTrace)(windows_core::Interface::as_raw(self), outputcontrol, core::mem::transmute(frames.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags).ok() } } pub unsafe fn GetDebuggeeType(&self, class: *mut u32, qualifier: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDebuggeeType)(windows_core::Interface::as_raw(self), core::mem::transmute(class), core::mem::transmute(qualifier)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDebuggeeType)(windows_core::Interface::as_raw(self), class as _, qualifier as _).ok() } } pub unsafe fn GetActualProcessorType(&self) -> windows_core::Result { unsafe { @@ -24298,16 +24213,16 @@ impl IDebugControl5 { unsafe { (windows_core::Interface::vtable(self).GetSystemVersion)( windows_core::Interface::as_raw(self), - core::mem::transmute(platformid), - core::mem::transmute(major), - core::mem::transmute(minor), + platformid as _, + major as _, + minor as _, 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::mem::zeroed())), - core::mem::transmute(servicepacknumber), + servicepackstringused.unwrap_or(core::mem::zeroed()) as _, + servicepacknumber as _, 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::mem::zeroed())), + buildstringused.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -24322,7 +24237,7 @@ impl IDebugControl5 { unsafe { (windows_core::Interface::vtable(self).IsPointer64Bit)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn ReadBugCheckData(&self, code: *mut u32, arg1: *mut u64, arg2: *mut u64, arg3: *mut u64, arg4: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadBugCheckData)(windows_core::Interface::as_raw(self), core::mem::transmute(code), core::mem::transmute(arg1), core::mem::transmute(arg2), core::mem::transmute(arg3), core::mem::transmute(arg4)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadBugCheckData)(windows_core::Interface::as_raw(self), code as _, arg1 as _, arg2 as _, arg3 as _, arg4 as _).ok() } } pub unsafe fn GetNumberSupportedProcessorTypes(&self) -> windows_core::Result { unsafe { @@ -24340,10 +24255,10 @@ impl IDebugControl5 { r#type, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), + fullnamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + abbrevnamesize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -24391,13 +24306,13 @@ impl IDebugControl5 { unsafe { (windows_core::Interface::vtable(self).SetEngineOptions)(windows_core::Interface::as_raw(self), options).ok() } } pub unsafe fn GetSystemErrorControl(&self, outputlevel: *mut u32, breaklevel: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSystemErrorControl)(windows_core::Interface::as_raw(self), core::mem::transmute(outputlevel), core::mem::transmute(breaklevel)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSystemErrorControl)(windows_core::Interface::as_raw(self), outputlevel as _, breaklevel as _).ok() } } pub unsafe fn SetSystemErrorControl(&self, outputlevel: u32, breaklevel: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSystemErrorControl)(windows_core::Interface::as_raw(self), outputlevel, breaklevel).ok() } } pub unsafe fn GetTextMacro(&self, slot: u32, buffer: Option<&mut [u8]>, macrosize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), macrosize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetTextMacro(&self, slot: u32, r#macro: P1) -> windows_core::Result<()> where @@ -24418,13 +24333,13 @@ impl IDebugControl5 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value as _, remainderindex.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CoerceValue(&self, r#in: *const DEBUG_VALUE, outtype: u32, out: *mut DEBUG_VALUE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CoerceValue)(windows_core::Interface::as_raw(self), r#in, outtype, core::mem::transmute(out)).ok() } + unsafe { (windows_core::Interface::vtable(self).CoerceValue)(windows_core::Interface::as_raw(self), r#in, outtype, out as _).ok() } } pub unsafe fn CoerceValues(&self, count: u32, r#in: *const DEBUG_VALUE, outtypes: *const u32, out: *mut DEBUG_VALUE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CoerceValues)(windows_core::Interface::as_raw(self), count, r#in, outtypes, core::mem::transmute(out)).ok() } + unsafe { (windows_core::Interface::vtable(self).CoerceValues)(windows_core::Interface::as_raw(self), count, r#in, outtypes, out as _).ok() } } pub unsafe fn Execute(&self, outputcontrol: u32, command: P1, flags: u32) -> windows_core::Result<()> where @@ -24457,7 +24372,7 @@ impl IDebugControl5 { } } pub unsafe fn GetBreakpointParameters(&self, count: u32, ids: Option<*const u32>, start: u32, params: *mut DEBUG_BREAKPOINT_PARAMETERS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), start, core::mem::transmute(params)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), count, ids.unwrap_or(core::mem::zeroed()) as _, start, params as _).ok() } } pub unsafe fn AddBreakpoint(&self, r#type: u32, desiredid: u32) -> windows_core::Result { unsafe { @@ -24510,20 +24425,20 @@ impl IDebugControl5 { } #[cfg(feature = "Win32_System_Kernel")] pub unsafe fn GetWindbgExtensionApis32(&self, api: *mut WINDBG_EXTENSION_APIS32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWindbgExtensionApis32)(windows_core::Interface::as_raw(self), core::mem::transmute(api)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWindbgExtensionApis32)(windows_core::Interface::as_raw(self), api as _).ok() } } #[cfg(feature = "Win32_System_Kernel")] pub unsafe fn GetWindbgExtensionApis64(&self, api: *mut WINDBG_EXTENSION_APIS64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWindbgExtensionApis64)(windows_core::Interface::as_raw(self), core::mem::transmute(api)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWindbgExtensionApis64)(windows_core::Interface::as_raw(self), api as _).ok() } } pub unsafe fn GetNumberEventFilters(&self, specificevents: *mut u32, specificexceptions: *mut u32, arbitraryexceptions: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetNumberEventFilters)(windows_core::Interface::as_raw(self), specificevents as _, specificexceptions as _, arbitraryexceptions as _).ok() } } pub unsafe fn GetEventFilterText(&self, index: u32, buffer: Option<&mut [u8]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), textsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetEventFilterCommand(&self, index: u32, buffer: Option<&mut [u8]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), commandsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetEventFilterCommand(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -24538,7 +24453,7 @@ impl IDebugControl5 { unsafe { (windows_core::Interface::vtable(self).SetSpecificFilterParameters)(windows_core::Interface::as_raw(self), start, params.len().try_into().unwrap(), core::mem::transmute(params.as_ptr())).ok() } } pub unsafe fn GetSpecificFilterArgument(&self, index: u32, buffer: Option<&mut [u8]>, argumentsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), argumentsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetSpecificFilterArgument(&self, index: u32, argument: P1) -> windows_core::Result<()> where @@ -24547,13 +24462,13 @@ impl IDebugControl5 { unsafe { (windows_core::Interface::vtable(self).SetSpecificFilterArgument)(windows_core::Interface::as_raw(self), index, argument.param().abi()).ok() } } pub unsafe fn GetExceptionFilterParameters(&self, count: u32, codes: Option<*const u32>, start: u32, params: *mut DEBUG_EXCEPTION_FILTER_PARAMETERS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(codes.unwrap_or(core::mem::zeroed())), start, core::mem::transmute(params)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), count, codes.unwrap_or(core::mem::zeroed()) as _, start, params as _).ok() } } pub unsafe fn SetExceptionFilterParameters(&self, params: &[DEBUG_EXCEPTION_FILTER_PARAMETERS]) -> windows_core::Result<()> { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), commandsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetExceptionFilterSecondCommand(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -24565,21 +24480,7 @@ impl IDebugControl5 { unsafe { (windows_core::Interface::vtable(self).WaitForEvent)(windows_core::Interface::as_raw(self), flags, timeout).ok() } } pub unsafe fn GetLastEventInformation(&self, r#type: *mut u32, processid: *mut u32, threadid: *mut u32, extrainformation: Option<*mut core::ffi::c_void>, extrainformationsize: u32, extrainformationused: Option<*mut u32>, description: Option<&mut [u8]>, descriptionused: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { - (windows_core::Interface::vtable(self).GetLastEventInformation)( - windows_core::Interface::as_raw(self), - core::mem::transmute(r#type), - core::mem::transmute(processid), - core::mem::transmute(threadid), - core::mem::transmute(extrainformation.unwrap_or(core::mem::zeroed())), - extrainformationsize, - 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::mem::zeroed())), - ) - .ok() - } + unsafe { (windows_core::Interface::vtable(self).GetLastEventInformation)(windows_core::Interface::as_raw(self), r#type as _, processid as _, threadid as _, extrainformation.unwrap_or(core::mem::zeroed()) as _, extrainformationsize, extrainformationused.unwrap_or(core::mem::zeroed()) as _, 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()), descriptionused.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetCurrentTimeDate(&self) -> windows_core::Result { unsafe { @@ -24616,10 +24517,10 @@ impl IDebugControl5 { index, core::mem::transmute(srcbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), srcbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(srcsize.unwrap_or(core::mem::zeroed())), + srcsize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + dstsize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -24680,10 +24581,10 @@ impl IDebugControl5 { index, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), + fullnamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + abbrevnamesize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -24698,7 +24599,7 @@ impl IDebugControl5 { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetEventIndexDescription)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, core::mem::transmute(descsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventIndexDescription)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, descsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetCurrentEventIndex(&self) -> windows_core::Result { unsafe { @@ -24713,7 +24614,7 @@ impl IDebugControl5 { } } pub unsafe fn GetLogFileWide(&self, buffer: Option<&mut [u16]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), filesize.unwrap_or(core::mem::zeroed()) as _, append as _).ok() } } pub unsafe fn OpenLogFileWide(&self, file: P0, append: bool) -> windows_core::Result<()> where @@ -24722,7 +24623,7 @@ impl IDebugControl5 { unsafe { (windows_core::Interface::vtable(self).OpenLogFileWide)(windows_core::Interface::as_raw(self), file.param().abi(), append.into()).ok() } } pub unsafe fn InputWide(&self, buffer: &mut [u16], inputsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).InputWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), inputsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReturnInputWide(&self, buffer: P0) -> windows_core::Result<()> where @@ -24767,7 +24668,7 @@ impl IDebugControl5 { unsafe { (windows_core::Interface::vtable(self).OutputPromptVaListWide)(windows_core::Interface::as_raw(self), outputcontrol, format.param().abi(), args).ok() } } pub unsafe fn GetPromptTextWide(&self, buffer: Option<&mut [u16]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), textsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn AssembleWide(&self, offset: u64, instr: P1) -> windows_core::Result where @@ -24779,7 +24680,7 @@ impl IDebugControl5 { } } pub unsafe fn DisassembleWide(&self, offset: u64, flags: u32, buffer: Option<&mut [u16]>, disassemblysize: Option<*mut u32>, endoffset: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DisassembleWide)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(core::mem::zeroed())), core::mem::transmute(endoffset)).ok() } + unsafe { (windows_core::Interface::vtable(self).DisassembleWide)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), disassemblysize.unwrap_or(core::mem::zeroed()) as _, endoffset as _).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<()> { unsafe { @@ -24788,16 +24689,16 @@ impl IDebugControl5 { r#type, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), + fullnamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + abbrevnamesize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } } pub unsafe fn GetTextMacroWide(&self, slot: u32, buffer: Option<&mut [u16]>, macrosize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTextMacroWide)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTextMacroWide)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), macrosize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetTextMacroWide(&self, slot: u32, r#macro: P1) -> windows_core::Result<()> where @@ -24809,7 +24710,7 @@ impl IDebugControl5 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EvaluateWide)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).EvaluateWide)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value as _, remainderindex.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ExecuteWide(&self, outputcontrol: u32, command: P1, flags: u32) -> windows_core::Result<()> where @@ -24882,10 +24783,10 @@ impl IDebugControl5 { } } pub unsafe fn GetEventFilterTextWide(&self, index: u32, buffer: Option<&mut [u16]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEventFilterTextWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventFilterTextWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), textsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetEventFilterCommandWide(&self, index: u32, buffer: Option<&mut [u16]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEventFilterCommandWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventFilterCommandWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), commandsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetEventFilterCommandWide(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -24894,7 +24795,7 @@ impl IDebugControl5 { unsafe { (windows_core::Interface::vtable(self).SetEventFilterCommandWide)(windows_core::Interface::as_raw(self), index, command.param().abi()).ok() } } pub unsafe fn GetSpecificFilterArgumentWide(&self, index: u32, buffer: Option<&mut [u16]>, argumentsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), argumentsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetSpecificFilterArgumentWide(&self, index: u32, argument: P1) -> windows_core::Result<()> where @@ -24903,7 +24804,7 @@ impl IDebugControl5 { unsafe { (windows_core::Interface::vtable(self).SetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), index, argument.param().abi()).ok() } } pub unsafe fn GetExceptionFilterSecondCommandWide(&self, index: u32, buffer: Option<&mut [u16]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommandWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommandWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), commandsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetExceptionFilterSecondCommandWide(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -24912,21 +24813,7 @@ impl IDebugControl5 { unsafe { (windows_core::Interface::vtable(self).SetExceptionFilterSecondCommandWide)(windows_core::Interface::as_raw(self), index, command.param().abi()).ok() } } pub unsafe fn GetLastEventInformationWide(&self, r#type: *mut u32, processid: *mut u32, threadid: *mut u32, extrainformation: Option<*mut core::ffi::c_void>, extrainformationsize: u32, extrainformationused: Option<*mut u32>, description: Option<&mut [u16]>, descriptionused: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { - (windows_core::Interface::vtable(self).GetLastEventInformationWide)( - windows_core::Interface::as_raw(self), - core::mem::transmute(r#type), - core::mem::transmute(processid), - core::mem::transmute(threadid), - core::mem::transmute(extrainformation.unwrap_or(core::mem::zeroed())), - extrainformationsize, - 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::mem::zeroed())), - ) - .ok() - } + unsafe { (windows_core::Interface::vtable(self).GetLastEventInformationWide)(windows_core::Interface::as_raw(self), r#type as _, processid as _, threadid as _, extrainformation.unwrap_or(core::mem::zeroed()) as _, extrainformationsize, extrainformationused.unwrap_or(core::mem::zeroed()) as _, 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()), descriptionused.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetTextReplacementWide(&self, srctext: P0, index: u32, srcbuffer: Option<&mut [u16]>, srcsize: Option<*mut u32>, dstbuffer: Option<&mut [u16]>, dstsize: Option<*mut u32>) -> windows_core::Result<()> where @@ -24939,10 +24826,10 @@ impl IDebugControl5 { index, core::mem::transmute(srcbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), srcbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(srcsize.unwrap_or(core::mem::zeroed())), + srcsize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + dstsize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -24967,10 +24854,10 @@ impl IDebugControl5 { index, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), + fullnamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + abbrevnamesize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -24979,10 +24866,10 @@ impl IDebugControl5 { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetEventIndexDescriptionWide)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, core::mem::transmute(descsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventIndexDescriptionWide)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, descsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetLogFile2(&self, buffer: Option<&mut [u8]>, filesize: Option<*mut u32>, flags: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), filesize.unwrap_or(core::mem::zeroed()) as _, flags as _).ok() } } pub unsafe fn OpenLogFile2(&self, file: P0, flags: u32) -> windows_core::Result<()> where @@ -24991,7 +24878,7 @@ impl IDebugControl5 { unsafe { (windows_core::Interface::vtable(self).OpenLogFile2)(windows_core::Interface::as_raw(self), file.param().abi(), flags).ok() } } pub unsafe fn GetLogFile2Wide(&self, buffer: Option<&mut [u16]>, filesize: Option<*mut u32>, flags: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), filesize.unwrap_or(core::mem::zeroed()) as _, flags as _).ok() } } pub unsafe fn OpenLogFile2Wide(&self, file: P0, flags: u32) -> windows_core::Result<()> where @@ -25000,40 +24887,40 @@ impl IDebugControl5 { unsafe { (windows_core::Interface::vtable(self).OpenLogFile2Wide)(windows_core::Interface::as_raw(self), file.param().abi(), flags).ok() } } pub unsafe fn GetSystemVersionValues(&self, platformid: *mut u32, win32major: *mut u32, win32minor: *mut u32, kdmajor: Option<*mut u32>, kdminor: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetSystemVersionValues)(windows_core::Interface::as_raw(self), platformid as _, win32major as _, win32minor as _, kdmajor.unwrap_or(core::mem::zeroed()) as _, kdminor.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSystemVersionString(&self, which: u32, buffer: Option<&mut [u8]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSystemVersionString)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSystemVersionString)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), stringsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSystemVersionStringWide(&self, which: u32, buffer: Option<&mut [u16]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSystemVersionStringWide)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSystemVersionStringWide)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), stringsize.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetContextStackTrace)(windows_core::Interface::as_raw(self), core::mem::transmute(startcontext.unwrap_or(core::mem::zeroed())), 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::mem::zeroed())), framecontextssize, framecontextsentrysize, core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetContextStackTrace)(windows_core::Interface::as_raw(self), startcontext.unwrap_or(core::mem::zeroed()) as _, 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()), framecontexts.unwrap_or(core::mem::zeroed()) as _, framecontextssize, framecontextsentrysize, framesfilled.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputContextStackTrace(&self, outputcontrol: u32, frames: &[DEBUG_STACK_FRAME], framecontexts: *const core::ffi::c_void, framecontextssize: u32, framecontextsentrysize: u32, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputContextStackTrace)(windows_core::Interface::as_raw(self), outputcontrol, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), framecontexts, framecontextssize, framecontextsentrysize, flags).ok() } } pub unsafe fn GetStoredEventInformation(&self, r#type: *mut u32, processid: *mut u32, threadid: *mut u32, context: Option<*mut core::ffi::c_void>, contextsize: u32, contextused: Option<*mut u32>, extrainformation: Option<*mut core::ffi::c_void>, extrainformationsize: u32, extrainformationused: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStoredEventInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(r#type), core::mem::transmute(processid), core::mem::transmute(threadid), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), contextsize, core::mem::transmute(contextused.unwrap_or(core::mem::zeroed())), core::mem::transmute(extrainformation.unwrap_or(core::mem::zeroed())), extrainformationsize, core::mem::transmute(extrainformationused.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStoredEventInformation)(windows_core::Interface::as_raw(self), r#type as _, processid as _, threadid as _, context.unwrap_or(core::mem::zeroed()) as _, contextsize, contextused.unwrap_or(core::mem::zeroed()) as _, extrainformation.unwrap_or(core::mem::zeroed()) as _, extrainformationsize, extrainformationused.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetManagedStatus(&self, flags: Option<*mut u32>, whichstring: u32, string: Option<&mut [u8]>, stringneeded: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetManagedStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), 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() } + unsafe { (windows_core::Interface::vtable(self).GetManagedStatus)(windows_core::Interface::as_raw(self), flags.unwrap_or(core::mem::zeroed()) as _, 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()), stringneeded.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetManagedStatusWide(&self, flags: Option<*mut u32>, whichstring: u32, string: Option<&mut [u16]>, stringneeded: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetManagedStatusWide)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), 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() } + unsafe { (windows_core::Interface::vtable(self).GetManagedStatusWide)(windows_core::Interface::as_raw(self), flags.unwrap_or(core::mem::zeroed()) as _, 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()), stringneeded.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ResetManagedStatus(&self, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ResetManagedStatus)(windows_core::Interface::as_raw(self), flags).ok() } } pub unsafe fn GetStackTraceEx(&self, frameoffset: u64, stackoffset: u64, instructionoffset: u64, frames: &mut [DEBUG_STACK_FRAME_EX], framesfilled: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStackTraceEx)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStackTraceEx)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), framesfilled.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputStackTraceEx(&self, outputcontrol: u32, frames: Option<&[DEBUG_STACK_FRAME_EX]>, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputStackTraceEx)(windows_core::Interface::as_raw(self), outputcontrol, core::mem::transmute(frames.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags).ok() } } pub unsafe fn GetContextStackTraceEx(&self, startcontext: Option<*const core::ffi::c_void>, startcontextsize: u32, frames: Option<&mut [DEBUG_STACK_FRAME_EX]>, framecontexts: Option<*mut core::ffi::c_void>, framecontextssize: u32, framecontextsentrysize: u32, framesfilled: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetContextStackTraceEx)(windows_core::Interface::as_raw(self), core::mem::transmute(startcontext.unwrap_or(core::mem::zeroed())), 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::mem::zeroed())), framecontextssize, framecontextsentrysize, core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetContextStackTraceEx)(windows_core::Interface::as_raw(self), startcontext.unwrap_or(core::mem::zeroed()) as _, 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()), framecontexts.unwrap_or(core::mem::zeroed()) as _, framecontextssize, framecontextsentrysize, framesfilled.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputContextStackTraceEx(&self, outputcontrol: u32, frames: &[DEBUG_STACK_FRAME_EX], framecontexts: *const core::ffi::c_void, framecontextssize: u32, framecontextsentrysize: u32, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputContextStackTraceEx)(windows_core::Interface::as_raw(self), outputcontrol, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), framecontexts, framecontextssize, framecontextsentrysize, flags).ok() } @@ -26893,7 +26780,7 @@ impl IDebugControl6 { unsafe { (windows_core::Interface::vtable(self).SetInterruptTimeout)(windows_core::Interface::as_raw(self), seconds).ok() } } pub unsafe fn GetLogFile(&self, buffer: Option<&mut [u8]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), filesize.unwrap_or(core::mem::zeroed()) as _, append as _).ok() } } pub unsafe fn OpenLogFile(&self, file: P0, append: bool) -> windows_core::Result<()> where @@ -26914,7 +26801,7 @@ impl IDebugControl6 { unsafe { (windows_core::Interface::vtable(self).SetLogMask)(windows_core::Interface::as_raw(self), mask).ok() } } pub unsafe fn Input(&self, buffer: &mut [u8], inputsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Input)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), inputsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReturnInput(&self, buffer: P0) -> windows_core::Result<()> where @@ -26959,7 +26846,7 @@ impl IDebugControl6 { unsafe { (windows_core::Interface::vtable(self).OutputPromptVaList)(windows_core::Interface::as_raw(self), outputcontrol, format.param().abi(), args).ok() } } pub unsafe fn GetPromptText(&self, buffer: Option<&mut [u8]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), textsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputCurrentState(&self, outputcontrol: u32, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputCurrentState)(windows_core::Interface::as_raw(self), outputcontrol, flags).ok() } @@ -26986,7 +26873,7 @@ impl IDebugControl6 { } } pub unsafe fn Disassemble(&self, offset: u64, flags: u32, buffer: Option<&mut [u8]>, disassemblysize: Option<*mut u32>, endoffset: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(core::mem::zeroed())), core::mem::transmute(endoffset)).ok() } + unsafe { (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), disassemblysize.unwrap_or(core::mem::zeroed()) as _, endoffset as _).ok() } } pub unsafe fn GetDisassembleEffectiveOffset(&self) -> windows_core::Result { unsafe { @@ -27001,7 +26888,7 @@ impl IDebugControl6 { } } pub unsafe fn OutputDisassemblyLines(&self, outputcontrol: u32, previouslines: u32, offset: u64, flags: u32, offsetline: Option<*mut u32>, startoffset: Option<*mut u64>, endoffset: Option<*mut u64>, lineoffsets: Option<&mut [u64]>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OutputDisassemblyLines)(windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, core::mem::transmute(offsetline.unwrap_or(core::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() } + unsafe { (windows_core::Interface::vtable(self).OutputDisassemblyLines)(windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, offsetline.unwrap_or(core::mem::zeroed()) as _, startoffset.unwrap_or(core::mem::zeroed()) as _, endoffset.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(lineoffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() } } pub unsafe fn GetNearInstruction(&self, offset: u64, delta: i32) -> windows_core::Result { unsafe { @@ -27010,7 +26897,7 @@ impl IDebugControl6 { } } pub unsafe fn GetStackTrace(&self, frameoffset: u64, stackoffset: u64, instructionoffset: u64, frames: &mut [DEBUG_STACK_FRAME], framesfilled: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), framesfilled.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetReturnOffset(&self) -> windows_core::Result { unsafe { @@ -27022,7 +26909,7 @@ impl IDebugControl6 { unsafe { (windows_core::Interface::vtable(self).OutputStackTrace)(windows_core::Interface::as_raw(self), outputcontrol, core::mem::transmute(frames.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags).ok() } } pub unsafe fn GetDebuggeeType(&self, class: *mut u32, qualifier: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDebuggeeType)(windows_core::Interface::as_raw(self), core::mem::transmute(class), core::mem::transmute(qualifier)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDebuggeeType)(windows_core::Interface::as_raw(self), class as _, qualifier as _).ok() } } pub unsafe fn GetActualProcessorType(&self) -> windows_core::Result { unsafe { @@ -27055,16 +26942,16 @@ impl IDebugControl6 { unsafe { (windows_core::Interface::vtable(self).GetSystemVersion)( windows_core::Interface::as_raw(self), - core::mem::transmute(platformid), - core::mem::transmute(major), - core::mem::transmute(minor), + platformid as _, + major as _, + minor as _, 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::mem::zeroed())), - core::mem::transmute(servicepacknumber), + servicepackstringused.unwrap_or(core::mem::zeroed()) as _, + servicepacknumber as _, 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::mem::zeroed())), + buildstringused.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -27079,7 +26966,7 @@ impl IDebugControl6 { unsafe { (windows_core::Interface::vtable(self).IsPointer64Bit)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn ReadBugCheckData(&self, code: *mut u32, arg1: *mut u64, arg2: *mut u64, arg3: *mut u64, arg4: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadBugCheckData)(windows_core::Interface::as_raw(self), core::mem::transmute(code), core::mem::transmute(arg1), core::mem::transmute(arg2), core::mem::transmute(arg3), core::mem::transmute(arg4)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadBugCheckData)(windows_core::Interface::as_raw(self), code as _, arg1 as _, arg2 as _, arg3 as _, arg4 as _).ok() } } pub unsafe fn GetNumberSupportedProcessorTypes(&self) -> windows_core::Result { unsafe { @@ -27097,10 +26984,10 @@ impl IDebugControl6 { r#type, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), + fullnamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + abbrevnamesize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -27148,13 +27035,13 @@ impl IDebugControl6 { unsafe { (windows_core::Interface::vtable(self).SetEngineOptions)(windows_core::Interface::as_raw(self), options).ok() } } pub unsafe fn GetSystemErrorControl(&self, outputlevel: *mut u32, breaklevel: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSystemErrorControl)(windows_core::Interface::as_raw(self), core::mem::transmute(outputlevel), core::mem::transmute(breaklevel)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSystemErrorControl)(windows_core::Interface::as_raw(self), outputlevel as _, breaklevel as _).ok() } } pub unsafe fn SetSystemErrorControl(&self, outputlevel: u32, breaklevel: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSystemErrorControl)(windows_core::Interface::as_raw(self), outputlevel, breaklevel).ok() } } pub unsafe fn GetTextMacro(&self, slot: u32, buffer: Option<&mut [u8]>, macrosize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), macrosize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetTextMacro(&self, slot: u32, r#macro: P1) -> windows_core::Result<()> where @@ -27175,13 +27062,13 @@ impl IDebugControl6 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value as _, remainderindex.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CoerceValue(&self, r#in: *const DEBUG_VALUE, outtype: u32, out: *mut DEBUG_VALUE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CoerceValue)(windows_core::Interface::as_raw(self), r#in, outtype, core::mem::transmute(out)).ok() } + unsafe { (windows_core::Interface::vtable(self).CoerceValue)(windows_core::Interface::as_raw(self), r#in, outtype, out as _).ok() } } pub unsafe fn CoerceValues(&self, count: u32, r#in: *const DEBUG_VALUE, outtypes: *const u32, out: *mut DEBUG_VALUE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CoerceValues)(windows_core::Interface::as_raw(self), count, r#in, outtypes, core::mem::transmute(out)).ok() } + unsafe { (windows_core::Interface::vtable(self).CoerceValues)(windows_core::Interface::as_raw(self), count, r#in, outtypes, out as _).ok() } } pub unsafe fn Execute(&self, outputcontrol: u32, command: P1, flags: u32) -> windows_core::Result<()> where @@ -27214,7 +27101,7 @@ impl IDebugControl6 { } } pub unsafe fn GetBreakpointParameters(&self, count: u32, ids: Option<*const u32>, start: u32, params: *mut DEBUG_BREAKPOINT_PARAMETERS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), start, core::mem::transmute(params)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), count, ids.unwrap_or(core::mem::zeroed()) as _, start, params as _).ok() } } pub unsafe fn AddBreakpoint(&self, r#type: u32, desiredid: u32) -> windows_core::Result { unsafe { @@ -27267,20 +27154,20 @@ impl IDebugControl6 { } #[cfg(feature = "Win32_System_Kernel")] pub unsafe fn GetWindbgExtensionApis32(&self, api: *mut WINDBG_EXTENSION_APIS32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWindbgExtensionApis32)(windows_core::Interface::as_raw(self), core::mem::transmute(api)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWindbgExtensionApis32)(windows_core::Interface::as_raw(self), api as _).ok() } } #[cfg(feature = "Win32_System_Kernel")] pub unsafe fn GetWindbgExtensionApis64(&self, api: *mut WINDBG_EXTENSION_APIS64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWindbgExtensionApis64)(windows_core::Interface::as_raw(self), core::mem::transmute(api)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWindbgExtensionApis64)(windows_core::Interface::as_raw(self), api as _).ok() } } pub unsafe fn GetNumberEventFilters(&self, specificevents: *mut u32, specificexceptions: *mut u32, arbitraryexceptions: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetNumberEventFilters)(windows_core::Interface::as_raw(self), specificevents as _, specificexceptions as _, arbitraryexceptions as _).ok() } } pub unsafe fn GetEventFilterText(&self, index: u32, buffer: Option<&mut [u8]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), textsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetEventFilterCommand(&self, index: u32, buffer: Option<&mut [u8]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), commandsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetEventFilterCommand(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -27295,7 +27182,7 @@ impl IDebugControl6 { unsafe { (windows_core::Interface::vtable(self).SetSpecificFilterParameters)(windows_core::Interface::as_raw(self), start, params.len().try_into().unwrap(), core::mem::transmute(params.as_ptr())).ok() } } pub unsafe fn GetSpecificFilterArgument(&self, index: u32, buffer: Option<&mut [u8]>, argumentsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), argumentsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetSpecificFilterArgument(&self, index: u32, argument: P1) -> windows_core::Result<()> where @@ -27304,13 +27191,13 @@ impl IDebugControl6 { unsafe { (windows_core::Interface::vtable(self).SetSpecificFilterArgument)(windows_core::Interface::as_raw(self), index, argument.param().abi()).ok() } } pub unsafe fn GetExceptionFilterParameters(&self, count: u32, codes: Option<*const u32>, start: u32, params: *mut DEBUG_EXCEPTION_FILTER_PARAMETERS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(codes.unwrap_or(core::mem::zeroed())), start, core::mem::transmute(params)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), count, codes.unwrap_or(core::mem::zeroed()) as _, start, params as _).ok() } } pub unsafe fn SetExceptionFilterParameters(&self, params: &[DEBUG_EXCEPTION_FILTER_PARAMETERS]) -> windows_core::Result<()> { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), commandsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetExceptionFilterSecondCommand(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -27322,21 +27209,7 @@ impl IDebugControl6 { unsafe { (windows_core::Interface::vtable(self).WaitForEvent)(windows_core::Interface::as_raw(self), flags, timeout).ok() } } pub unsafe fn GetLastEventInformation(&self, r#type: *mut u32, processid: *mut u32, threadid: *mut u32, extrainformation: Option<*mut core::ffi::c_void>, extrainformationsize: u32, extrainformationused: Option<*mut u32>, description: Option<&mut [u8]>, descriptionused: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { - (windows_core::Interface::vtable(self).GetLastEventInformation)( - windows_core::Interface::as_raw(self), - core::mem::transmute(r#type), - core::mem::transmute(processid), - core::mem::transmute(threadid), - core::mem::transmute(extrainformation.unwrap_or(core::mem::zeroed())), - extrainformationsize, - 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::mem::zeroed())), - ) - .ok() - } + unsafe { (windows_core::Interface::vtable(self).GetLastEventInformation)(windows_core::Interface::as_raw(self), r#type as _, processid as _, threadid as _, extrainformation.unwrap_or(core::mem::zeroed()) as _, extrainformationsize, extrainformationused.unwrap_or(core::mem::zeroed()) as _, 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()), descriptionused.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetCurrentTimeDate(&self) -> windows_core::Result { unsafe { @@ -27373,10 +27246,10 @@ impl IDebugControl6 { index, core::mem::transmute(srcbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), srcbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(srcsize.unwrap_or(core::mem::zeroed())), + srcsize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + dstsize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -27437,10 +27310,10 @@ impl IDebugControl6 { index, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), + fullnamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + abbrevnamesize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -27455,7 +27328,7 @@ impl IDebugControl6 { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetEventIndexDescription)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, core::mem::transmute(descsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventIndexDescription)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, descsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetCurrentEventIndex(&self) -> windows_core::Result { unsafe { @@ -27470,7 +27343,7 @@ impl IDebugControl6 { } } pub unsafe fn GetLogFileWide(&self, buffer: Option<&mut [u16]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), filesize.unwrap_or(core::mem::zeroed()) as _, append as _).ok() } } pub unsafe fn OpenLogFileWide(&self, file: P0, append: bool) -> windows_core::Result<()> where @@ -27479,7 +27352,7 @@ impl IDebugControl6 { unsafe { (windows_core::Interface::vtable(self).OpenLogFileWide)(windows_core::Interface::as_raw(self), file.param().abi(), append.into()).ok() } } pub unsafe fn InputWide(&self, buffer: &mut [u16], inputsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).InputWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), inputsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReturnInputWide(&self, buffer: P0) -> windows_core::Result<()> where @@ -27524,7 +27397,7 @@ impl IDebugControl6 { unsafe { (windows_core::Interface::vtable(self).OutputPromptVaListWide)(windows_core::Interface::as_raw(self), outputcontrol, format.param().abi(), args).ok() } } pub unsafe fn GetPromptTextWide(&self, buffer: Option<&mut [u16]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), textsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn AssembleWide(&self, offset: u64, instr: P1) -> windows_core::Result where @@ -27536,7 +27409,7 @@ impl IDebugControl6 { } } pub unsafe fn DisassembleWide(&self, offset: u64, flags: u32, buffer: Option<&mut [u16]>, disassemblysize: Option<*mut u32>, endoffset: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DisassembleWide)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(core::mem::zeroed())), core::mem::transmute(endoffset)).ok() } + unsafe { (windows_core::Interface::vtable(self).DisassembleWide)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), disassemblysize.unwrap_or(core::mem::zeroed()) as _, endoffset as _).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<()> { unsafe { @@ -27545,16 +27418,16 @@ impl IDebugControl6 { r#type, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), + fullnamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + abbrevnamesize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } } pub unsafe fn GetTextMacroWide(&self, slot: u32, buffer: Option<&mut [u16]>, macrosize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTextMacroWide)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTextMacroWide)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), macrosize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetTextMacroWide(&self, slot: u32, r#macro: P1) -> windows_core::Result<()> where @@ -27566,7 +27439,7 @@ impl IDebugControl6 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EvaluateWide)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).EvaluateWide)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value as _, remainderindex.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ExecuteWide(&self, outputcontrol: u32, command: P1, flags: u32) -> windows_core::Result<()> where @@ -27639,10 +27512,10 @@ impl IDebugControl6 { } } pub unsafe fn GetEventFilterTextWide(&self, index: u32, buffer: Option<&mut [u16]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEventFilterTextWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventFilterTextWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), textsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetEventFilterCommandWide(&self, index: u32, buffer: Option<&mut [u16]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEventFilterCommandWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventFilterCommandWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), commandsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetEventFilterCommandWide(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -27651,7 +27524,7 @@ impl IDebugControl6 { unsafe { (windows_core::Interface::vtable(self).SetEventFilterCommandWide)(windows_core::Interface::as_raw(self), index, command.param().abi()).ok() } } pub unsafe fn GetSpecificFilterArgumentWide(&self, index: u32, buffer: Option<&mut [u16]>, argumentsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), argumentsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetSpecificFilterArgumentWide(&self, index: u32, argument: P1) -> windows_core::Result<()> where @@ -27660,7 +27533,7 @@ impl IDebugControl6 { unsafe { (windows_core::Interface::vtable(self).SetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), index, argument.param().abi()).ok() } } pub unsafe fn GetExceptionFilterSecondCommandWide(&self, index: u32, buffer: Option<&mut [u16]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommandWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommandWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), commandsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetExceptionFilterSecondCommandWide(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -27669,21 +27542,7 @@ impl IDebugControl6 { unsafe { (windows_core::Interface::vtable(self).SetExceptionFilterSecondCommandWide)(windows_core::Interface::as_raw(self), index, command.param().abi()).ok() } } pub unsafe fn GetLastEventInformationWide(&self, r#type: *mut u32, processid: *mut u32, threadid: *mut u32, extrainformation: Option<*mut core::ffi::c_void>, extrainformationsize: u32, extrainformationused: Option<*mut u32>, description: Option<&mut [u16]>, descriptionused: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { - (windows_core::Interface::vtable(self).GetLastEventInformationWide)( - windows_core::Interface::as_raw(self), - core::mem::transmute(r#type), - core::mem::transmute(processid), - core::mem::transmute(threadid), - core::mem::transmute(extrainformation.unwrap_or(core::mem::zeroed())), - extrainformationsize, - 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::mem::zeroed())), - ) - .ok() - } + unsafe { (windows_core::Interface::vtable(self).GetLastEventInformationWide)(windows_core::Interface::as_raw(self), r#type as _, processid as _, threadid as _, extrainformation.unwrap_or(core::mem::zeroed()) as _, extrainformationsize, extrainformationused.unwrap_or(core::mem::zeroed()) as _, 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()), descriptionused.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetTextReplacementWide(&self, srctext: P0, index: u32, srcbuffer: Option<&mut [u16]>, srcsize: Option<*mut u32>, dstbuffer: Option<&mut [u16]>, dstsize: Option<*mut u32>) -> windows_core::Result<()> where @@ -27696,10 +27555,10 @@ impl IDebugControl6 { index, core::mem::transmute(srcbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), srcbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(srcsize.unwrap_or(core::mem::zeroed())), + srcsize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + dstsize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -27724,10 +27583,10 @@ impl IDebugControl6 { index, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), + fullnamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + abbrevnamesize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -27736,10 +27595,10 @@ impl IDebugControl6 { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetEventIndexDescriptionWide)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, core::mem::transmute(descsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventIndexDescriptionWide)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, descsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetLogFile2(&self, buffer: Option<&mut [u8]>, filesize: Option<*mut u32>, flags: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), filesize.unwrap_or(core::mem::zeroed()) as _, flags as _).ok() } } pub unsafe fn OpenLogFile2(&self, file: P0, flags: u32) -> windows_core::Result<()> where @@ -27748,7 +27607,7 @@ impl IDebugControl6 { unsafe { (windows_core::Interface::vtable(self).OpenLogFile2)(windows_core::Interface::as_raw(self), file.param().abi(), flags).ok() } } pub unsafe fn GetLogFile2Wide(&self, buffer: Option<&mut [u16]>, filesize: Option<*mut u32>, flags: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), filesize.unwrap_or(core::mem::zeroed()) as _, flags as _).ok() } } pub unsafe fn OpenLogFile2Wide(&self, file: P0, flags: u32) -> windows_core::Result<()> where @@ -27757,40 +27616,40 @@ impl IDebugControl6 { unsafe { (windows_core::Interface::vtable(self).OpenLogFile2Wide)(windows_core::Interface::as_raw(self), file.param().abi(), flags).ok() } } pub unsafe fn GetSystemVersionValues(&self, platformid: *mut u32, win32major: *mut u32, win32minor: *mut u32, kdmajor: Option<*mut u32>, kdminor: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetSystemVersionValues)(windows_core::Interface::as_raw(self), platformid as _, win32major as _, win32minor as _, kdmajor.unwrap_or(core::mem::zeroed()) as _, kdminor.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSystemVersionString(&self, which: u32, buffer: Option<&mut [u8]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSystemVersionString)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSystemVersionString)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), stringsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSystemVersionStringWide(&self, which: u32, buffer: Option<&mut [u16]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSystemVersionStringWide)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSystemVersionStringWide)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), stringsize.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetContextStackTrace)(windows_core::Interface::as_raw(self), core::mem::transmute(startcontext.unwrap_or(core::mem::zeroed())), 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::mem::zeroed())), framecontextssize, framecontextsentrysize, core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetContextStackTrace)(windows_core::Interface::as_raw(self), startcontext.unwrap_or(core::mem::zeroed()) as _, 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()), framecontexts.unwrap_or(core::mem::zeroed()) as _, framecontextssize, framecontextsentrysize, framesfilled.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputContextStackTrace(&self, outputcontrol: u32, frames: &[DEBUG_STACK_FRAME], framecontexts: *const core::ffi::c_void, framecontextssize: u32, framecontextsentrysize: u32, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputContextStackTrace)(windows_core::Interface::as_raw(self), outputcontrol, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), framecontexts, framecontextssize, framecontextsentrysize, flags).ok() } } pub unsafe fn GetStoredEventInformation(&self, r#type: *mut u32, processid: *mut u32, threadid: *mut u32, context: Option<*mut core::ffi::c_void>, contextsize: u32, contextused: Option<*mut u32>, extrainformation: Option<*mut core::ffi::c_void>, extrainformationsize: u32, extrainformationused: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStoredEventInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(r#type), core::mem::transmute(processid), core::mem::transmute(threadid), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), contextsize, core::mem::transmute(contextused.unwrap_or(core::mem::zeroed())), core::mem::transmute(extrainformation.unwrap_or(core::mem::zeroed())), extrainformationsize, core::mem::transmute(extrainformationused.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStoredEventInformation)(windows_core::Interface::as_raw(self), r#type as _, processid as _, threadid as _, context.unwrap_or(core::mem::zeroed()) as _, contextsize, contextused.unwrap_or(core::mem::zeroed()) as _, extrainformation.unwrap_or(core::mem::zeroed()) as _, extrainformationsize, extrainformationused.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetManagedStatus(&self, flags: Option<*mut u32>, whichstring: u32, string: Option<&mut [u8]>, stringneeded: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetManagedStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), 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() } + unsafe { (windows_core::Interface::vtable(self).GetManagedStatus)(windows_core::Interface::as_raw(self), flags.unwrap_or(core::mem::zeroed()) as _, 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()), stringneeded.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetManagedStatusWide(&self, flags: Option<*mut u32>, whichstring: u32, string: Option<&mut [u16]>, stringneeded: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetManagedStatusWide)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), 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() } + unsafe { (windows_core::Interface::vtable(self).GetManagedStatusWide)(windows_core::Interface::as_raw(self), flags.unwrap_or(core::mem::zeroed()) as _, 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()), stringneeded.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ResetManagedStatus(&self, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ResetManagedStatus)(windows_core::Interface::as_raw(self), flags).ok() } } pub unsafe fn GetStackTraceEx(&self, frameoffset: u64, stackoffset: u64, instructionoffset: u64, frames: &mut [DEBUG_STACK_FRAME_EX], framesfilled: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStackTraceEx)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStackTraceEx)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), framesfilled.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputStackTraceEx(&self, outputcontrol: u32, frames: Option<&[DEBUG_STACK_FRAME_EX]>, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputStackTraceEx)(windows_core::Interface::as_raw(self), outputcontrol, core::mem::transmute(frames.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags).ok() } } pub unsafe fn GetContextStackTraceEx(&self, startcontext: Option<*const core::ffi::c_void>, startcontextsize: u32, frames: Option<&mut [DEBUG_STACK_FRAME_EX]>, framecontexts: Option<*mut core::ffi::c_void>, framecontextssize: u32, framecontextsentrysize: u32, framesfilled: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetContextStackTraceEx)(windows_core::Interface::as_raw(self), core::mem::transmute(startcontext.unwrap_or(core::mem::zeroed())), 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::mem::zeroed())), framecontextssize, framecontextsentrysize, core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetContextStackTraceEx)(windows_core::Interface::as_raw(self), startcontext.unwrap_or(core::mem::zeroed()) as _, 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()), framecontexts.unwrap_or(core::mem::zeroed()) as _, framecontextssize, framecontextsentrysize, framesfilled.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputContextStackTraceEx(&self, outputcontrol: u32, frames: &[DEBUG_STACK_FRAME_EX], framecontexts: *const core::ffi::c_void, framecontextssize: u32, framecontextsentrysize: u32, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputContextStackTraceEx)(windows_core::Interface::as_raw(self), outputcontrol, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), framecontexts, framecontextssize, framecontextsentrysize, flags).ok() } @@ -27808,7 +27667,7 @@ impl IDebugControl6 { } } pub unsafe fn GetSynchronizationStatus(&self, sendsattempted: *mut u32, secondssincelastresponse: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSynchronizationStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(sendsattempted), core::mem::transmute(secondssincelastresponse)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSynchronizationStatus)(windows_core::Interface::as_raw(self), sendsattempted as _, secondssincelastresponse as _).ok() } } } #[repr(C)] @@ -29683,7 +29542,7 @@ impl IDebugControl7 { unsafe { (windows_core::Interface::vtable(self).SetInterruptTimeout)(windows_core::Interface::as_raw(self), seconds).ok() } } pub unsafe fn GetLogFile(&self, buffer: Option<&mut [u8]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), filesize.unwrap_or(core::mem::zeroed()) as _, append as _).ok() } } pub unsafe fn OpenLogFile(&self, file: P0, append: bool) -> windows_core::Result<()> where @@ -29704,7 +29563,7 @@ impl IDebugControl7 { unsafe { (windows_core::Interface::vtable(self).SetLogMask)(windows_core::Interface::as_raw(self), mask).ok() } } pub unsafe fn Input(&self, buffer: &mut [u8], inputsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Input)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), inputsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReturnInput(&self, buffer: P0) -> windows_core::Result<()> where @@ -29749,7 +29608,7 @@ impl IDebugControl7 { unsafe { (windows_core::Interface::vtable(self).OutputPromptVaList)(windows_core::Interface::as_raw(self), outputcontrol, format.param().abi(), args).ok() } } pub unsafe fn GetPromptText(&self, buffer: Option<&mut [u8]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), textsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputCurrentState(&self, outputcontrol: u32, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputCurrentState)(windows_core::Interface::as_raw(self), outputcontrol, flags).ok() } @@ -29776,7 +29635,7 @@ impl IDebugControl7 { } } pub unsafe fn Disassemble(&self, offset: u64, flags: u32, buffer: Option<&mut [u8]>, disassemblysize: Option<*mut u32>, endoffset: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(core::mem::zeroed())), core::mem::transmute(endoffset)).ok() } + unsafe { (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), disassemblysize.unwrap_or(core::mem::zeroed()) as _, endoffset as _).ok() } } pub unsafe fn GetDisassembleEffectiveOffset(&self) -> windows_core::Result { unsafe { @@ -29791,7 +29650,7 @@ impl IDebugControl7 { } } pub unsafe fn OutputDisassemblyLines(&self, outputcontrol: u32, previouslines: u32, offset: u64, flags: u32, offsetline: Option<*mut u32>, startoffset: Option<*mut u64>, endoffset: Option<*mut u64>, lineoffsets: Option<&mut [u64]>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OutputDisassemblyLines)(windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, core::mem::transmute(offsetline.unwrap_or(core::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() } + unsafe { (windows_core::Interface::vtable(self).OutputDisassemblyLines)(windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, offsetline.unwrap_or(core::mem::zeroed()) as _, startoffset.unwrap_or(core::mem::zeroed()) as _, endoffset.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(lineoffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() } } pub unsafe fn GetNearInstruction(&self, offset: u64, delta: i32) -> windows_core::Result { unsafe { @@ -29800,7 +29659,7 @@ impl IDebugControl7 { } } pub unsafe fn GetStackTrace(&self, frameoffset: u64, stackoffset: u64, instructionoffset: u64, frames: &mut [DEBUG_STACK_FRAME], framesfilled: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), framesfilled.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetReturnOffset(&self) -> windows_core::Result { unsafe { @@ -29812,7 +29671,7 @@ impl IDebugControl7 { unsafe { (windows_core::Interface::vtable(self).OutputStackTrace)(windows_core::Interface::as_raw(self), outputcontrol, core::mem::transmute(frames.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags).ok() } } pub unsafe fn GetDebuggeeType(&self, class: *mut u32, qualifier: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDebuggeeType)(windows_core::Interface::as_raw(self), core::mem::transmute(class), core::mem::transmute(qualifier)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDebuggeeType)(windows_core::Interface::as_raw(self), class as _, qualifier as _).ok() } } pub unsafe fn GetActualProcessorType(&self) -> windows_core::Result { unsafe { @@ -29845,16 +29704,16 @@ impl IDebugControl7 { unsafe { (windows_core::Interface::vtable(self).GetSystemVersion)( windows_core::Interface::as_raw(self), - core::mem::transmute(platformid), - core::mem::transmute(major), - core::mem::transmute(minor), + platformid as _, + major as _, + minor as _, 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::mem::zeroed())), - core::mem::transmute(servicepacknumber), + servicepackstringused.unwrap_or(core::mem::zeroed()) as _, + servicepacknumber as _, 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::mem::zeroed())), + buildstringused.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -29869,7 +29728,7 @@ impl IDebugControl7 { unsafe { (windows_core::Interface::vtable(self).IsPointer64Bit)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn ReadBugCheckData(&self, code: *mut u32, arg1: *mut u64, arg2: *mut u64, arg3: *mut u64, arg4: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadBugCheckData)(windows_core::Interface::as_raw(self), core::mem::transmute(code), core::mem::transmute(arg1), core::mem::transmute(arg2), core::mem::transmute(arg3), core::mem::transmute(arg4)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadBugCheckData)(windows_core::Interface::as_raw(self), code as _, arg1 as _, arg2 as _, arg3 as _, arg4 as _).ok() } } pub unsafe fn GetNumberSupportedProcessorTypes(&self) -> windows_core::Result { unsafe { @@ -29887,10 +29746,10 @@ impl IDebugControl7 { r#type, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), + fullnamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + abbrevnamesize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -29938,13 +29797,13 @@ impl IDebugControl7 { unsafe { (windows_core::Interface::vtable(self).SetEngineOptions)(windows_core::Interface::as_raw(self), options).ok() } } pub unsafe fn GetSystemErrorControl(&self, outputlevel: *mut u32, breaklevel: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSystemErrorControl)(windows_core::Interface::as_raw(self), core::mem::transmute(outputlevel), core::mem::transmute(breaklevel)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSystemErrorControl)(windows_core::Interface::as_raw(self), outputlevel as _, breaklevel as _).ok() } } pub unsafe fn SetSystemErrorControl(&self, outputlevel: u32, breaklevel: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSystemErrorControl)(windows_core::Interface::as_raw(self), outputlevel, breaklevel).ok() } } pub unsafe fn GetTextMacro(&self, slot: u32, buffer: Option<&mut [u8]>, macrosize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), macrosize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetTextMacro(&self, slot: u32, r#macro: P1) -> windows_core::Result<()> where @@ -29965,13 +29824,13 @@ impl IDebugControl7 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value as _, remainderindex.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CoerceValue(&self, r#in: *const DEBUG_VALUE, outtype: u32, out: *mut DEBUG_VALUE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CoerceValue)(windows_core::Interface::as_raw(self), r#in, outtype, core::mem::transmute(out)).ok() } + unsafe { (windows_core::Interface::vtable(self).CoerceValue)(windows_core::Interface::as_raw(self), r#in, outtype, out as _).ok() } } pub unsafe fn CoerceValues(&self, count: u32, r#in: *const DEBUG_VALUE, outtypes: *const u32, out: *mut DEBUG_VALUE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CoerceValues)(windows_core::Interface::as_raw(self), count, r#in, outtypes, core::mem::transmute(out)).ok() } + unsafe { (windows_core::Interface::vtable(self).CoerceValues)(windows_core::Interface::as_raw(self), count, r#in, outtypes, out as _).ok() } } pub unsafe fn Execute(&self, outputcontrol: u32, command: P1, flags: u32) -> windows_core::Result<()> where @@ -30004,7 +29863,7 @@ impl IDebugControl7 { } } pub unsafe fn GetBreakpointParameters(&self, count: u32, ids: Option<*const u32>, start: u32, params: *mut DEBUG_BREAKPOINT_PARAMETERS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), start, core::mem::transmute(params)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), count, ids.unwrap_or(core::mem::zeroed()) as _, start, params as _).ok() } } pub unsafe fn AddBreakpoint(&self, r#type: u32, desiredid: u32) -> windows_core::Result { unsafe { @@ -30057,20 +29916,20 @@ impl IDebugControl7 { } #[cfg(feature = "Win32_System_Kernel")] pub unsafe fn GetWindbgExtensionApis32(&self, api: *mut WINDBG_EXTENSION_APIS32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWindbgExtensionApis32)(windows_core::Interface::as_raw(self), core::mem::transmute(api)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWindbgExtensionApis32)(windows_core::Interface::as_raw(self), api as _).ok() } } #[cfg(feature = "Win32_System_Kernel")] pub unsafe fn GetWindbgExtensionApis64(&self, api: *mut WINDBG_EXTENSION_APIS64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWindbgExtensionApis64)(windows_core::Interface::as_raw(self), core::mem::transmute(api)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWindbgExtensionApis64)(windows_core::Interface::as_raw(self), api as _).ok() } } pub unsafe fn GetNumberEventFilters(&self, specificevents: *mut u32, specificexceptions: *mut u32, arbitraryexceptions: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetNumberEventFilters)(windows_core::Interface::as_raw(self), specificevents as _, specificexceptions as _, arbitraryexceptions as _).ok() } } pub unsafe fn GetEventFilterText(&self, index: u32, buffer: Option<&mut [u8]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), textsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetEventFilterCommand(&self, index: u32, buffer: Option<&mut [u8]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), commandsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetEventFilterCommand(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -30085,7 +29944,7 @@ impl IDebugControl7 { unsafe { (windows_core::Interface::vtable(self).SetSpecificFilterParameters)(windows_core::Interface::as_raw(self), start, params.len().try_into().unwrap(), core::mem::transmute(params.as_ptr())).ok() } } pub unsafe fn GetSpecificFilterArgument(&self, index: u32, buffer: Option<&mut [u8]>, argumentsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), argumentsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetSpecificFilterArgument(&self, index: u32, argument: P1) -> windows_core::Result<()> where @@ -30094,13 +29953,13 @@ impl IDebugControl7 { unsafe { (windows_core::Interface::vtable(self).SetSpecificFilterArgument)(windows_core::Interface::as_raw(self), index, argument.param().abi()).ok() } } pub unsafe fn GetExceptionFilterParameters(&self, count: u32, codes: Option<*const u32>, start: u32, params: *mut DEBUG_EXCEPTION_FILTER_PARAMETERS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(codes.unwrap_or(core::mem::zeroed())), start, core::mem::transmute(params)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), count, codes.unwrap_or(core::mem::zeroed()) as _, start, params as _).ok() } } pub unsafe fn SetExceptionFilterParameters(&self, params: &[DEBUG_EXCEPTION_FILTER_PARAMETERS]) -> windows_core::Result<()> { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), commandsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetExceptionFilterSecondCommand(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -30112,21 +29971,7 @@ impl IDebugControl7 { unsafe { (windows_core::Interface::vtable(self).WaitForEvent)(windows_core::Interface::as_raw(self), flags, timeout).ok() } } pub unsafe fn GetLastEventInformation(&self, r#type: *mut u32, processid: *mut u32, threadid: *mut u32, extrainformation: Option<*mut core::ffi::c_void>, extrainformationsize: u32, extrainformationused: Option<*mut u32>, description: Option<&mut [u8]>, descriptionused: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { - (windows_core::Interface::vtable(self).GetLastEventInformation)( - windows_core::Interface::as_raw(self), - core::mem::transmute(r#type), - core::mem::transmute(processid), - core::mem::transmute(threadid), - core::mem::transmute(extrainformation.unwrap_or(core::mem::zeroed())), - extrainformationsize, - 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::mem::zeroed())), - ) - .ok() - } + unsafe { (windows_core::Interface::vtable(self).GetLastEventInformation)(windows_core::Interface::as_raw(self), r#type as _, processid as _, threadid as _, extrainformation.unwrap_or(core::mem::zeroed()) as _, extrainformationsize, extrainformationused.unwrap_or(core::mem::zeroed()) as _, 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()), descriptionused.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetCurrentTimeDate(&self) -> windows_core::Result { unsafe { @@ -30163,10 +30008,10 @@ impl IDebugControl7 { index, core::mem::transmute(srcbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), srcbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(srcsize.unwrap_or(core::mem::zeroed())), + srcsize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + dstsize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -30227,10 +30072,10 @@ impl IDebugControl7 { index, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), + fullnamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + abbrevnamesize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -30245,7 +30090,7 @@ impl IDebugControl7 { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetEventIndexDescription)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, core::mem::transmute(descsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventIndexDescription)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, descsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetCurrentEventIndex(&self) -> windows_core::Result { unsafe { @@ -30260,7 +30105,7 @@ impl IDebugControl7 { } } pub unsafe fn GetLogFileWide(&self, buffer: Option<&mut [u16]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), filesize.unwrap_or(core::mem::zeroed()) as _, append as _).ok() } } pub unsafe fn OpenLogFileWide(&self, file: P0, append: bool) -> windows_core::Result<()> where @@ -30269,7 +30114,7 @@ impl IDebugControl7 { unsafe { (windows_core::Interface::vtable(self).OpenLogFileWide)(windows_core::Interface::as_raw(self), file.param().abi(), append.into()).ok() } } pub unsafe fn InputWide(&self, buffer: &mut [u16], inputsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).InputWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), inputsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReturnInputWide(&self, buffer: P0) -> windows_core::Result<()> where @@ -30314,7 +30159,7 @@ impl IDebugControl7 { unsafe { (windows_core::Interface::vtable(self).OutputPromptVaListWide)(windows_core::Interface::as_raw(self), outputcontrol, format.param().abi(), args).ok() } } pub unsafe fn GetPromptTextWide(&self, buffer: Option<&mut [u16]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), textsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn AssembleWide(&self, offset: u64, instr: P1) -> windows_core::Result where @@ -30326,7 +30171,7 @@ impl IDebugControl7 { } } pub unsafe fn DisassembleWide(&self, offset: u64, flags: u32, buffer: Option<&mut [u16]>, disassemblysize: Option<*mut u32>, endoffset: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DisassembleWide)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(core::mem::zeroed())), core::mem::transmute(endoffset)).ok() } + unsafe { (windows_core::Interface::vtable(self).DisassembleWide)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), disassemblysize.unwrap_or(core::mem::zeroed()) as _, endoffset as _).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<()> { unsafe { @@ -30335,16 +30180,16 @@ impl IDebugControl7 { r#type, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), + fullnamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + abbrevnamesize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } } pub unsafe fn GetTextMacroWide(&self, slot: u32, buffer: Option<&mut [u16]>, macrosize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTextMacroWide)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTextMacroWide)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), macrosize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetTextMacroWide(&self, slot: u32, r#macro: P1) -> windows_core::Result<()> where @@ -30356,7 +30201,7 @@ impl IDebugControl7 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EvaluateWide)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).EvaluateWide)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value as _, remainderindex.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ExecuteWide(&self, outputcontrol: u32, command: P1, flags: u32) -> windows_core::Result<()> where @@ -30429,10 +30274,10 @@ impl IDebugControl7 { } } pub unsafe fn GetEventFilterTextWide(&self, index: u32, buffer: Option<&mut [u16]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEventFilterTextWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventFilterTextWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), textsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetEventFilterCommandWide(&self, index: u32, buffer: Option<&mut [u16]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEventFilterCommandWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventFilterCommandWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), commandsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetEventFilterCommandWide(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -30441,7 +30286,7 @@ impl IDebugControl7 { unsafe { (windows_core::Interface::vtable(self).SetEventFilterCommandWide)(windows_core::Interface::as_raw(self), index, command.param().abi()).ok() } } pub unsafe fn GetSpecificFilterArgumentWide(&self, index: u32, buffer: Option<&mut [u16]>, argumentsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), argumentsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetSpecificFilterArgumentWide(&self, index: u32, argument: P1) -> windows_core::Result<()> where @@ -30450,7 +30295,7 @@ impl IDebugControl7 { unsafe { (windows_core::Interface::vtable(self).SetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), index, argument.param().abi()).ok() } } pub unsafe fn GetExceptionFilterSecondCommandWide(&self, index: u32, buffer: Option<&mut [u16]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommandWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommandWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), commandsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetExceptionFilterSecondCommandWide(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -30459,21 +30304,7 @@ impl IDebugControl7 { unsafe { (windows_core::Interface::vtable(self).SetExceptionFilterSecondCommandWide)(windows_core::Interface::as_raw(self), index, command.param().abi()).ok() } } pub unsafe fn GetLastEventInformationWide(&self, r#type: *mut u32, processid: *mut u32, threadid: *mut u32, extrainformation: Option<*mut core::ffi::c_void>, extrainformationsize: u32, extrainformationused: Option<*mut u32>, description: Option<&mut [u16]>, descriptionused: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { - (windows_core::Interface::vtable(self).GetLastEventInformationWide)( - windows_core::Interface::as_raw(self), - core::mem::transmute(r#type), - core::mem::transmute(processid), - core::mem::transmute(threadid), - core::mem::transmute(extrainformation.unwrap_or(core::mem::zeroed())), - extrainformationsize, - 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::mem::zeroed())), - ) - .ok() - } + unsafe { (windows_core::Interface::vtable(self).GetLastEventInformationWide)(windows_core::Interface::as_raw(self), r#type as _, processid as _, threadid as _, extrainformation.unwrap_or(core::mem::zeroed()) as _, extrainformationsize, extrainformationused.unwrap_or(core::mem::zeroed()) as _, 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()), descriptionused.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetTextReplacementWide(&self, srctext: P0, index: u32, srcbuffer: Option<&mut [u16]>, srcsize: Option<*mut u32>, dstbuffer: Option<&mut [u16]>, dstsize: Option<*mut u32>) -> windows_core::Result<()> where @@ -30486,10 +30317,10 @@ impl IDebugControl7 { index, core::mem::transmute(srcbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), srcbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(srcsize.unwrap_or(core::mem::zeroed())), + srcsize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + dstsize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -30514,10 +30345,10 @@ impl IDebugControl7 { index, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), + fullnamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + abbrevnamesize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -30526,10 +30357,10 @@ impl IDebugControl7 { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetEventIndexDescriptionWide)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, core::mem::transmute(descsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventIndexDescriptionWide)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, descsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetLogFile2(&self, buffer: Option<&mut [u8]>, filesize: Option<*mut u32>, flags: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), filesize.unwrap_or(core::mem::zeroed()) as _, flags as _).ok() } } pub unsafe fn OpenLogFile2(&self, file: P0, flags: u32) -> windows_core::Result<()> where @@ -30538,7 +30369,7 @@ impl IDebugControl7 { unsafe { (windows_core::Interface::vtable(self).OpenLogFile2)(windows_core::Interface::as_raw(self), file.param().abi(), flags).ok() } } pub unsafe fn GetLogFile2Wide(&self, buffer: Option<&mut [u16]>, filesize: Option<*mut u32>, flags: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), filesize.unwrap_or(core::mem::zeroed()) as _, flags as _).ok() } } pub unsafe fn OpenLogFile2Wide(&self, file: P0, flags: u32) -> windows_core::Result<()> where @@ -30547,40 +30378,40 @@ impl IDebugControl7 { unsafe { (windows_core::Interface::vtable(self).OpenLogFile2Wide)(windows_core::Interface::as_raw(self), file.param().abi(), flags).ok() } } pub unsafe fn GetSystemVersionValues(&self, platformid: *mut u32, win32major: *mut u32, win32minor: *mut u32, kdmajor: Option<*mut u32>, kdminor: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetSystemVersionValues)(windows_core::Interface::as_raw(self), platformid as _, win32major as _, win32minor as _, kdmajor.unwrap_or(core::mem::zeroed()) as _, kdminor.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSystemVersionString(&self, which: u32, buffer: Option<&mut [u8]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSystemVersionString)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSystemVersionString)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), stringsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSystemVersionStringWide(&self, which: u32, buffer: Option<&mut [u16]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSystemVersionStringWide)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSystemVersionStringWide)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), stringsize.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetContextStackTrace)(windows_core::Interface::as_raw(self), core::mem::transmute(startcontext.unwrap_or(core::mem::zeroed())), 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::mem::zeroed())), framecontextssize, framecontextsentrysize, core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetContextStackTrace)(windows_core::Interface::as_raw(self), startcontext.unwrap_or(core::mem::zeroed()) as _, 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()), framecontexts.unwrap_or(core::mem::zeroed()) as _, framecontextssize, framecontextsentrysize, framesfilled.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputContextStackTrace(&self, outputcontrol: u32, frames: &[DEBUG_STACK_FRAME], framecontexts: *const core::ffi::c_void, framecontextssize: u32, framecontextsentrysize: u32, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputContextStackTrace)(windows_core::Interface::as_raw(self), outputcontrol, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), framecontexts, framecontextssize, framecontextsentrysize, flags).ok() } } pub unsafe fn GetStoredEventInformation(&self, r#type: *mut u32, processid: *mut u32, threadid: *mut u32, context: Option<*mut core::ffi::c_void>, contextsize: u32, contextused: Option<*mut u32>, extrainformation: Option<*mut core::ffi::c_void>, extrainformationsize: u32, extrainformationused: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStoredEventInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(r#type), core::mem::transmute(processid), core::mem::transmute(threadid), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), contextsize, core::mem::transmute(contextused.unwrap_or(core::mem::zeroed())), core::mem::transmute(extrainformation.unwrap_or(core::mem::zeroed())), extrainformationsize, core::mem::transmute(extrainformationused.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStoredEventInformation)(windows_core::Interface::as_raw(self), r#type as _, processid as _, threadid as _, context.unwrap_or(core::mem::zeroed()) as _, contextsize, contextused.unwrap_or(core::mem::zeroed()) as _, extrainformation.unwrap_or(core::mem::zeroed()) as _, extrainformationsize, extrainformationused.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetManagedStatus(&self, flags: Option<*mut u32>, whichstring: u32, string: Option<&mut [u8]>, stringneeded: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetManagedStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), 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() } + unsafe { (windows_core::Interface::vtable(self).GetManagedStatus)(windows_core::Interface::as_raw(self), flags.unwrap_or(core::mem::zeroed()) as _, 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()), stringneeded.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetManagedStatusWide(&self, flags: Option<*mut u32>, whichstring: u32, string: Option<&mut [u16]>, stringneeded: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetManagedStatusWide)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), 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() } + unsafe { (windows_core::Interface::vtable(self).GetManagedStatusWide)(windows_core::Interface::as_raw(self), flags.unwrap_or(core::mem::zeroed()) as _, 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()), stringneeded.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ResetManagedStatus(&self, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ResetManagedStatus)(windows_core::Interface::as_raw(self), flags).ok() } } pub unsafe fn GetStackTraceEx(&self, frameoffset: u64, stackoffset: u64, instructionoffset: u64, frames: &mut [DEBUG_STACK_FRAME_EX], framesfilled: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStackTraceEx)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStackTraceEx)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), framesfilled.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputStackTraceEx(&self, outputcontrol: u32, frames: Option<&[DEBUG_STACK_FRAME_EX]>, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputStackTraceEx)(windows_core::Interface::as_raw(self), outputcontrol, core::mem::transmute(frames.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags).ok() } } pub unsafe fn GetContextStackTraceEx(&self, startcontext: Option<*const core::ffi::c_void>, startcontextsize: u32, frames: Option<&mut [DEBUG_STACK_FRAME_EX]>, framecontexts: Option<*mut core::ffi::c_void>, framecontextssize: u32, framecontextsentrysize: u32, framesfilled: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetContextStackTraceEx)(windows_core::Interface::as_raw(self), core::mem::transmute(startcontext.unwrap_or(core::mem::zeroed())), 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::mem::zeroed())), framecontextssize, framecontextsentrysize, core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetContextStackTraceEx)(windows_core::Interface::as_raw(self), startcontext.unwrap_or(core::mem::zeroed()) as _, 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()), framecontexts.unwrap_or(core::mem::zeroed()) as _, framecontextssize, framecontextsentrysize, framesfilled.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputContextStackTraceEx(&self, outputcontrol: u32, frames: &[DEBUG_STACK_FRAME_EX], framecontexts: *const core::ffi::c_void, framecontextssize: u32, framecontextsentrysize: u32, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputContextStackTraceEx)(windows_core::Interface::as_raw(self), outputcontrol, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), framecontexts, framecontextssize, framecontextsentrysize, flags).ok() } @@ -30598,10 +30429,10 @@ impl IDebugControl7 { } } pub unsafe fn GetSynchronizationStatus(&self, sendsattempted: *mut u32, secondssincelastresponse: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSynchronizationStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(sendsattempted), core::mem::transmute(secondssincelastresponse)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSynchronizationStatus)(windows_core::Interface::as_raw(self), sendsattempted as _, secondssincelastresponse as _).ok() } } pub unsafe fn GetDebuggeeType2(&self, flags: u32, class: *mut u32, qualifier: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDebuggeeType2)(windows_core::Interface::as_raw(self), flags, core::mem::transmute(class), core::mem::transmute(qualifier)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDebuggeeType2)(windows_core::Interface::as_raw(self), flags, class as _, qualifier as _).ok() } } } #[repr(C)] @@ -32470,10 +32301,10 @@ 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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadVirtual)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadVirtual)(windows_core::Interface::as_raw(self), offset, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn WriteVirtual(&self, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).WriteVirtual)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteVirtual)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SearchVirtual(&self, offset: u64, length: u64, pattern: *const core::ffi::c_void, patternsize: u32, patterngranularity: u32) -> windows_core::Result { unsafe { @@ -32482,10 +32313,10 @@ impl IDebugDataSpaces { } } pub unsafe fn ReadVirtualUncached(&self, offset: u64, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadVirtualUncached)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadVirtualUncached)(windows_core::Interface::as_raw(self), offset, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn WriteVirtualUncached(&self, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).WriteVirtualUncached)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteVirtualUncached)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReadPointersVirtual(&self, offset: u64, ptrs: &mut [u64]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ReadPointersVirtual)(windows_core::Interface::as_raw(self), ptrs.len().try_into().unwrap(), offset, core::mem::transmute(ptrs.as_ptr())).ok() } @@ -32494,22 +32325,22 @@ impl IDebugDataSpaces { unsafe { (windows_core::Interface::vtable(self).WritePointersVirtual)(windows_core::Interface::as_raw(self), ptrs.len().try_into().unwrap(), offset, core::mem::transmute(ptrs.as_ptr())).ok() } } pub unsafe fn ReadPhysical(&self, offset: u64, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadPhysical)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadPhysical)(windows_core::Interface::as_raw(self), offset, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn WritePhysical(&self, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).WritePhysical)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WritePhysical)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadControl)(windows_core::Interface::as_raw(self), processor, offset, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadControl)(windows_core::Interface::as_raw(self), processor, offset, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).WriteControl)(windows_core::Interface::as_raw(self), processor, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteControl)(windows_core::Interface::as_raw(self), processor, offset, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).WriteIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReadMsr(&self, msr: u32) -> windows_core::Result { unsafe { @@ -32521,19 +32352,19 @@ impl IDebugDataSpaces { unsafe { (windows_core::Interface::vtable(self).WriteMsr)(windows_core::Interface::as_raw(self), msr, value).ok() } } pub unsafe fn ReadBusData(&self, busdatatype: u32, busnumber: u32, slotnumber: u32, offset: u32, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).WriteBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CheckLowMemory(&self) -> windows_core::Result<()> { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadDebuggerData)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer), buffersize, core::mem::transmute(datasize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadDebuggerData)(windows_core::Interface::as_raw(self), index, buffer as _, buffersize, datasize.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadProcessorSystemData)(windows_core::Interface::as_raw(self), processor, index, core::mem::transmute(buffer), buffersize, core::mem::transmute(datasize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadProcessorSystemData)(windows_core::Interface::as_raw(self), processor, index, buffer as _, buffersize, datasize.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -32749,10 +32580,10 @@ 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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadVirtual)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadVirtual)(windows_core::Interface::as_raw(self), offset, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn WriteVirtual(&self, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).WriteVirtual)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteVirtual)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SearchVirtual(&self, offset: u64, length: u64, pattern: *const core::ffi::c_void, patternsize: u32, patterngranularity: u32) -> windows_core::Result { unsafe { @@ -32761,10 +32592,10 @@ impl IDebugDataSpaces2 { } } pub unsafe fn ReadVirtualUncached(&self, offset: u64, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadVirtualUncached)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadVirtualUncached)(windows_core::Interface::as_raw(self), offset, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn WriteVirtualUncached(&self, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).WriteVirtualUncached)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteVirtualUncached)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReadPointersVirtual(&self, offset: u64, ptrs: &mut [u64]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ReadPointersVirtual)(windows_core::Interface::as_raw(self), ptrs.len().try_into().unwrap(), offset, core::mem::transmute(ptrs.as_ptr())).ok() } @@ -32773,22 +32604,22 @@ impl IDebugDataSpaces2 { unsafe { (windows_core::Interface::vtable(self).WritePointersVirtual)(windows_core::Interface::as_raw(self), ptrs.len().try_into().unwrap(), offset, core::mem::transmute(ptrs.as_ptr())).ok() } } pub unsafe fn ReadPhysical(&self, offset: u64, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadPhysical)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadPhysical)(windows_core::Interface::as_raw(self), offset, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn WritePhysical(&self, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).WritePhysical)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WritePhysical)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadControl)(windows_core::Interface::as_raw(self), processor, offset, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadControl)(windows_core::Interface::as_raw(self), processor, offset, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).WriteControl)(windows_core::Interface::as_raw(self), processor, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteControl)(windows_core::Interface::as_raw(self), processor, offset, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).WriteIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReadMsr(&self, msr: u32) -> windows_core::Result { unsafe { @@ -32800,19 +32631,19 @@ impl IDebugDataSpaces2 { unsafe { (windows_core::Interface::vtable(self).WriteMsr)(windows_core::Interface::as_raw(self), msr, value).ok() } } pub unsafe fn ReadBusData(&self, busdatatype: u32, busnumber: u32, slotnumber: u32, offset: u32, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).WriteBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CheckLowMemory(&self) -> windows_core::Result<()> { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadDebuggerData)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer), buffersize, core::mem::transmute(datasize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadDebuggerData)(windows_core::Interface::as_raw(self), index, buffer as _, buffersize, datasize.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadProcessorSystemData)(windows_core::Interface::as_raw(self), processor, index, core::mem::transmute(buffer), buffersize, core::mem::transmute(datasize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadProcessorSystemData)(windows_core::Interface::as_raw(self), processor, index, buffer as _, buffersize, datasize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn VirtualToPhysical(&self, r#virtual: u64) -> windows_core::Result { unsafe { @@ -32821,20 +32652,20 @@ impl IDebugDataSpaces2 { } } pub unsafe fn GetVirtualTranslationPhysicalOffsets(&self, r#virtual: u64, offsets: Option<&mut [u64]>, levels: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVirtualTranslationPhysicalOffsets)(windows_core::Interface::as_raw(self), r#virtual, core::mem::transmute(offsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), offsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(levels.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVirtualTranslationPhysicalOffsets)(windows_core::Interface::as_raw(self), r#virtual, core::mem::transmute(offsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), offsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), levels.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadHandleData)(windows_core::Interface::as_raw(self), handle, datatype, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(datasize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadHandleData)(windows_core::Interface::as_raw(self), handle, datatype, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, datasize.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).FillVirtual)(windows_core::Interface::as_raw(self), start, size, pattern, patternsize, core::mem::transmute(filled.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).FillVirtual)(windows_core::Interface::as_raw(self), start, size, pattern, patternsize, filled.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).FillPhysical)(windows_core::Interface::as_raw(self), start, size, pattern, patternsize, core::mem::transmute(filled.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).FillPhysical)(windows_core::Interface::as_raw(self), start, size, pattern, patternsize, filled.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).QueryVirtual)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(info)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryVirtual)(windows_core::Interface::as_raw(self), offset, info as _).ok() } } } #[repr(C)] @@ -33116,10 +32947,10 @@ 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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadVirtual)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadVirtual)(windows_core::Interface::as_raw(self), offset, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn WriteVirtual(&self, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).WriteVirtual)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteVirtual)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SearchVirtual(&self, offset: u64, length: u64, pattern: *const core::ffi::c_void, patternsize: u32, patterngranularity: u32) -> windows_core::Result { unsafe { @@ -33128,10 +32959,10 @@ impl IDebugDataSpaces3 { } } pub unsafe fn ReadVirtualUncached(&self, offset: u64, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadVirtualUncached)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadVirtualUncached)(windows_core::Interface::as_raw(self), offset, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn WriteVirtualUncached(&self, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).WriteVirtualUncached)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteVirtualUncached)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReadPointersVirtual(&self, offset: u64, ptrs: &mut [u64]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ReadPointersVirtual)(windows_core::Interface::as_raw(self), ptrs.len().try_into().unwrap(), offset, core::mem::transmute(ptrs.as_ptr())).ok() } @@ -33140,22 +32971,22 @@ impl IDebugDataSpaces3 { unsafe { (windows_core::Interface::vtable(self).WritePointersVirtual)(windows_core::Interface::as_raw(self), ptrs.len().try_into().unwrap(), offset, core::mem::transmute(ptrs.as_ptr())).ok() } } pub unsafe fn ReadPhysical(&self, offset: u64, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadPhysical)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadPhysical)(windows_core::Interface::as_raw(self), offset, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn WritePhysical(&self, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).WritePhysical)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WritePhysical)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadControl)(windows_core::Interface::as_raw(self), processor, offset, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadControl)(windows_core::Interface::as_raw(self), processor, offset, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).WriteControl)(windows_core::Interface::as_raw(self), processor, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteControl)(windows_core::Interface::as_raw(self), processor, offset, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).WriteIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReadMsr(&self, msr: u32) -> windows_core::Result { unsafe { @@ -33167,19 +32998,19 @@ impl IDebugDataSpaces3 { unsafe { (windows_core::Interface::vtable(self).WriteMsr)(windows_core::Interface::as_raw(self), msr, value).ok() } } pub unsafe fn ReadBusData(&self, busdatatype: u32, busnumber: u32, slotnumber: u32, offset: u32, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).WriteBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CheckLowMemory(&self) -> windows_core::Result<()> { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadDebuggerData)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer), buffersize, core::mem::transmute(datasize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadDebuggerData)(windows_core::Interface::as_raw(self), index, buffer as _, buffersize, datasize.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadProcessorSystemData)(windows_core::Interface::as_raw(self), processor, index, core::mem::transmute(buffer), buffersize, core::mem::transmute(datasize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadProcessorSystemData)(windows_core::Interface::as_raw(self), processor, index, buffer as _, buffersize, datasize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn VirtualToPhysical(&self, r#virtual: u64) -> windows_core::Result { unsafe { @@ -33188,27 +33019,27 @@ impl IDebugDataSpaces3 { } } pub unsafe fn GetVirtualTranslationPhysicalOffsets(&self, r#virtual: u64, offsets: Option<&mut [u64]>, levels: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVirtualTranslationPhysicalOffsets)(windows_core::Interface::as_raw(self), r#virtual, core::mem::transmute(offsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), offsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(levels.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVirtualTranslationPhysicalOffsets)(windows_core::Interface::as_raw(self), r#virtual, core::mem::transmute(offsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), offsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), levels.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadHandleData)(windows_core::Interface::as_raw(self), handle, datatype, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(datasize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadHandleData)(windows_core::Interface::as_raw(self), handle, datatype, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, datasize.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).FillVirtual)(windows_core::Interface::as_raw(self), start, size, pattern, patternsize, core::mem::transmute(filled.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).FillVirtual)(windows_core::Interface::as_raw(self), start, size, pattern, patternsize, filled.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).FillPhysical)(windows_core::Interface::as_raw(self), start, size, pattern, patternsize, core::mem::transmute(filled.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).FillPhysical)(windows_core::Interface::as_raw(self), start, size, pattern, patternsize, filled.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).QueryVirtual)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(info)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryVirtual)(windows_core::Interface::as_raw(self), offset, info as _).ok() } } #[cfg(feature = "Win32_System_SystemInformation")] pub unsafe fn ReadImageNtHeaders(&self, imagebase: u64, headers: *mut super::IMAGE_NT_HEADERS64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadImageNtHeaders)(windows_core::Interface::as_raw(self), imagebase, core::mem::transmute(headers)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadImageNtHeaders)(windows_core::Interface::as_raw(self), imagebase, headers as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadTagged)(windows_core::Interface::as_raw(self), tag, offset, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(totalsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadTagged)(windows_core::Interface::as_raw(self), tag, offset, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, totalsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn StartEnumTagged(&self) -> windows_core::Result { unsafe { @@ -33217,7 +33048,7 @@ impl IDebugDataSpaces3 { } } pub unsafe fn GetNextTagged(&self, handle: u64, tag: *mut windows_core::GUID, size: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNextTagged)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(tag), core::mem::transmute(size)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNextTagged)(windows_core::Interface::as_raw(self), handle, tag as _, size as _).ok() } } pub unsafe fn EndEnumTagged(&self, handle: u64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).EndEnumTagged)(windows_core::Interface::as_raw(self), handle).ok() } @@ -33556,10 +33387,10 @@ 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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadVirtual)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadVirtual)(windows_core::Interface::as_raw(self), offset, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn WriteVirtual(&self, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).WriteVirtual)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteVirtual)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SearchVirtual(&self, offset: u64, length: u64, pattern: *const core::ffi::c_void, patternsize: u32, patterngranularity: u32) -> windows_core::Result { unsafe { @@ -33568,10 +33399,10 @@ impl IDebugDataSpaces4 { } } pub unsafe fn ReadVirtualUncached(&self, offset: u64, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadVirtualUncached)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadVirtualUncached)(windows_core::Interface::as_raw(self), offset, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn WriteVirtualUncached(&self, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).WriteVirtualUncached)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteVirtualUncached)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReadPointersVirtual(&self, offset: u64, ptrs: &mut [u64]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ReadPointersVirtual)(windows_core::Interface::as_raw(self), ptrs.len().try_into().unwrap(), offset, core::mem::transmute(ptrs.as_ptr())).ok() } @@ -33580,22 +33411,22 @@ impl IDebugDataSpaces4 { unsafe { (windows_core::Interface::vtable(self).WritePointersVirtual)(windows_core::Interface::as_raw(self), ptrs.len().try_into().unwrap(), offset, core::mem::transmute(ptrs.as_ptr())).ok() } } pub unsafe fn ReadPhysical(&self, offset: u64, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadPhysical)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadPhysical)(windows_core::Interface::as_raw(self), offset, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn WritePhysical(&self, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).WritePhysical)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WritePhysical)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadControl)(windows_core::Interface::as_raw(self), processor, offset, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadControl)(windows_core::Interface::as_raw(self), processor, offset, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).WriteControl)(windows_core::Interface::as_raw(self), processor, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteControl)(windows_core::Interface::as_raw(self), processor, offset, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).WriteIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReadMsr(&self, msr: u32) -> windows_core::Result { unsafe { @@ -33607,19 +33438,19 @@ impl IDebugDataSpaces4 { unsafe { (windows_core::Interface::vtable(self).WriteMsr)(windows_core::Interface::as_raw(self), msr, value).ok() } } pub unsafe fn ReadBusData(&self, busdatatype: u32, busnumber: u32, slotnumber: u32, offset: u32, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).WriteBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CheckLowMemory(&self) -> windows_core::Result<()> { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadDebuggerData)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer), buffersize, core::mem::transmute(datasize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadDebuggerData)(windows_core::Interface::as_raw(self), index, buffer as _, buffersize, datasize.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadProcessorSystemData)(windows_core::Interface::as_raw(self), processor, index, core::mem::transmute(buffer), buffersize, core::mem::transmute(datasize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadProcessorSystemData)(windows_core::Interface::as_raw(self), processor, index, buffer as _, buffersize, datasize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn VirtualToPhysical(&self, r#virtual: u64) -> windows_core::Result { unsafe { @@ -33628,27 +33459,27 @@ impl IDebugDataSpaces4 { } } pub unsafe fn GetVirtualTranslationPhysicalOffsets(&self, r#virtual: u64, offsets: Option<&mut [u64]>, levels: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVirtualTranslationPhysicalOffsets)(windows_core::Interface::as_raw(self), r#virtual, core::mem::transmute(offsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), offsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(levels.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVirtualTranslationPhysicalOffsets)(windows_core::Interface::as_raw(self), r#virtual, core::mem::transmute(offsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), offsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), levels.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadHandleData)(windows_core::Interface::as_raw(self), handle, datatype, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(datasize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadHandleData)(windows_core::Interface::as_raw(self), handle, datatype, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, datasize.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).FillVirtual)(windows_core::Interface::as_raw(self), start, size, pattern, patternsize, core::mem::transmute(filled.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).FillVirtual)(windows_core::Interface::as_raw(self), start, size, pattern, patternsize, filled.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).FillPhysical)(windows_core::Interface::as_raw(self), start, size, pattern, patternsize, core::mem::transmute(filled.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).FillPhysical)(windows_core::Interface::as_raw(self), start, size, pattern, patternsize, filled.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).QueryVirtual)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(info)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryVirtual)(windows_core::Interface::as_raw(self), offset, info as _).ok() } } #[cfg(feature = "Win32_System_SystemInformation")] pub unsafe fn ReadImageNtHeaders(&self, imagebase: u64, headers: *mut super::IMAGE_NT_HEADERS64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadImageNtHeaders)(windows_core::Interface::as_raw(self), imagebase, core::mem::transmute(headers)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadImageNtHeaders)(windows_core::Interface::as_raw(self), imagebase, headers as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadTagged)(windows_core::Interface::as_raw(self), tag, offset, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(totalsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadTagged)(windows_core::Interface::as_raw(self), tag, offset, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, totalsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn StartEnumTagged(&self) -> windows_core::Result { unsafe { @@ -33657,13 +33488,13 @@ impl IDebugDataSpaces4 { } } pub unsafe fn GetNextTagged(&self, handle: u64, tag: *mut windows_core::GUID, size: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNextTagged)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(tag), core::mem::transmute(size)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNextTagged)(windows_core::Interface::as_raw(self), handle, tag as _, size as _).ok() } } pub unsafe fn EndEnumTagged(&self, handle: u64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).EndEnumTagged)(windows_core::Interface::as_raw(self), handle).ok() } } pub unsafe fn GetOffsetInformation(&self, space: u32, which: u32, offset: u64, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, infosize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOffsetInformation)(windows_core::Interface::as_raw(self), space, which, offset, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(infosize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOffsetInformation)(windows_core::Interface::as_raw(self), space, which, offset, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, infosize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetNextDifferentlyValidOffsetVirtual(&self, offset: u64) -> windows_core::Result { unsafe { @@ -33672,7 +33503,7 @@ impl IDebugDataSpaces4 { } } pub unsafe fn GetValidRegionVirtual(&self, base: u64, size: u32, validbase: *mut u64, validsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetValidRegionVirtual)(windows_core::Interface::as_raw(self), base, size, core::mem::transmute(validbase), core::mem::transmute(validsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetValidRegionVirtual)(windows_core::Interface::as_raw(self), base, size, validbase as _, validsize as _).ok() } } pub unsafe fn SearchVirtual2(&self, offset: u64, length: u64, flags: u32, pattern: *const core::ffi::c_void, patternsize: u32, patterngranularity: u32) -> windows_core::Result { unsafe { @@ -33681,22 +33512,22 @@ impl IDebugDataSpaces4 { } } pub unsafe fn ReadMultiByteStringVirtual(&self, offset: u64, maxbytes: u32, buffer: Option<&mut [u8]>, stringbytes: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadMultiByteStringVirtual)(windows_core::Interface::as_raw(self), offset, maxbytes, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringbytes.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadMultiByteStringVirtual)(windows_core::Interface::as_raw(self), offset, maxbytes, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), stringbytes.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReadMultiByteStringVirtualWide(&self, offset: u64, maxbytes: u32, codepage: u32, buffer: Option<&mut [u16]>, stringbytes: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadMultiByteStringVirtualWide)(windows_core::Interface::as_raw(self), offset, maxbytes, codepage, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringbytes.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadMultiByteStringVirtualWide)(windows_core::Interface::as_raw(self), offset, maxbytes, codepage, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), stringbytes.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReadUnicodeStringVirtual(&self, offset: u64, maxbytes: u32, codepage: u32, buffer: Option<&mut [u8]>, stringbytes: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadUnicodeStringVirtual)(windows_core::Interface::as_raw(self), offset, maxbytes, codepage, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringbytes.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadUnicodeStringVirtual)(windows_core::Interface::as_raw(self), offset, maxbytes, codepage, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), stringbytes.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReadUnicodeStringVirtualWide(&self, offset: u64, maxbytes: u32, buffer: Option<&mut [u16]>, stringbytes: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadUnicodeStringVirtualWide)(windows_core::Interface::as_raw(self), offset, maxbytes, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringbytes.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadUnicodeStringVirtualWide)(windows_core::Interface::as_raw(self), offset, maxbytes, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), stringbytes.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadPhysical2)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadPhysical2)(windows_core::Interface::as_raw(self), offset, flags, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).WritePhysical2)(windows_core::Interface::as_raw(self), offset, flags, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WritePhysical2)(windows_core::Interface::as_raw(self), offset, flags, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -34791,14 +34622,14 @@ impl IDebugFAEntryTags { unsafe { (windows_core::Interface::vtable(self).SetType)(windows_core::Interface::as_raw(self), tag, entrytype).ok() } } pub unsafe fn GetProperties(&self, tag: DEBUG_FLR_PARAM_TYPE, name: Option, namesize: Option<*mut u32>, description: Option, descsize: Option<*mut u32>, flags: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), tag, name.unwrap_or(core::mem::zeroed()) as _, namesize.unwrap_or(core::mem::zeroed()) as _, description.unwrap_or(core::mem::zeroed()) as _, descsize.unwrap_or(core::mem::zeroed()) as _, flags.unwrap_or(core::mem::zeroed()) as _).ok() } } 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, { - unsafe { (windows_core::Interface::vtable(self).SetProperties)(windows_core::Interface::as_raw(self), tag, name.param().abi(), description.param().abi(), core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetProperties)(windows_core::Interface::as_raw(self), tag, name.param().abi(), description.param().abi(), flags.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetTagByName(&self, pluginid: P0, tagname: P1) -> windows_core::Result where @@ -34918,22 +34749,22 @@ impl IDebugFailureAnalysis { unsafe { (windows_core::Interface::vtable(self).Get)(windows_core::Interface::as_raw(self), tag) } } pub unsafe fn GetNext(&self, entry: *mut FA_ENTRY, tag: DEBUG_FLR_PARAM_TYPE, tagmask: DEBUG_FLR_PARAM_TYPE) -> *mut FA_ENTRY { - unsafe { (windows_core::Interface::vtable(self).GetNext)(windows_core::Interface::as_raw(self), core::mem::transmute(entry), tag, tagmask) } + unsafe { (windows_core::Interface::vtable(self).GetNext)(windows_core::Interface::as_raw(self), entry as _, tag, tagmask) } } pub unsafe fn GetString(&self, tag: DEBUG_FLR_PARAM_TYPE, str: &mut [u8]) -> *mut FA_ENTRY { unsafe { (windows_core::Interface::vtable(self).GetString)(windows_core::Interface::as_raw(self), tag, core::mem::transmute(str.as_ptr()), str.len().try_into().unwrap()) } } pub unsafe fn GetBuffer(&self, tag: DEBUG_FLR_PARAM_TYPE, buf: *mut core::ffi::c_void, size: u32) -> *mut FA_ENTRY { - unsafe { (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), tag, core::mem::transmute(buf), size) } + unsafe { (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), tag, buf as _, size) } } pub unsafe fn GetUlong(&self, tag: DEBUG_FLR_PARAM_TYPE, value: *mut u32) -> *mut FA_ENTRY { - unsafe { (windows_core::Interface::vtable(self).GetUlong)(windows_core::Interface::as_raw(self), tag, core::mem::transmute(value)) } + unsafe { (windows_core::Interface::vtable(self).GetUlong)(windows_core::Interface::as_raw(self), tag, value as _) } } pub unsafe fn GetUlong64(&self, tag: DEBUG_FLR_PARAM_TYPE, value: *mut u64) -> *mut FA_ENTRY { - unsafe { (windows_core::Interface::vtable(self).GetUlong64)(windows_core::Interface::as_raw(self), tag, core::mem::transmute(value)) } + unsafe { (windows_core::Interface::vtable(self).GetUlong64)(windows_core::Interface::as_raw(self), tag, value as _) } } pub unsafe fn NextEntry(&self, entry: Option<*const FA_ENTRY>) -> *mut FA_ENTRY { - unsafe { (windows_core::Interface::vtable(self).NextEntry)(windows_core::Interface::as_raw(self), core::mem::transmute(entry.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).NextEntry)(windows_core::Interface::as_raw(self), entry.unwrap_or(core::mem::zeroed()) as _) } } } #[repr(C)] @@ -35065,16 +34896,16 @@ impl IDebugFailureAnalysis2 { unsafe { (windows_core::Interface::vtable(self).GetString)(windows_core::Interface::as_raw(self), tag, core::mem::transmute(str.as_ptr()), str.len().try_into().unwrap()) } } pub unsafe fn GetBuffer(&self, tag: DEBUG_FLR_PARAM_TYPE, buf: *mut core::ffi::c_void, size: u32) -> *mut FA_ENTRY { - unsafe { (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), tag, core::mem::transmute(buf), size) } + unsafe { (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), tag, buf as _, size) } } pub unsafe fn GetUlong(&self, tag: DEBUG_FLR_PARAM_TYPE, value: *mut u32) -> *mut FA_ENTRY { - unsafe { (windows_core::Interface::vtable(self).GetUlong)(windows_core::Interface::as_raw(self), tag, core::mem::transmute(value)) } + unsafe { (windows_core::Interface::vtable(self).GetUlong)(windows_core::Interface::as_raw(self), tag, value as _) } } pub unsafe fn GetUlong64(&self, tag: DEBUG_FLR_PARAM_TYPE, value: *mut u64) -> *mut FA_ENTRY { - unsafe { (windows_core::Interface::vtable(self).GetUlong64)(windows_core::Interface::as_raw(self), tag, core::mem::transmute(value)) } + unsafe { (windows_core::Interface::vtable(self).GetUlong64)(windows_core::Interface::as_raw(self), tag, value as _) } } pub unsafe fn NextEntry(&self, entry: Option<*const FA_ENTRY>) -> *mut FA_ENTRY { - unsafe { (windows_core::Interface::vtable(self).NextEntry)(windows_core::Interface::as_raw(self), core::mem::transmute(entry.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).NextEntry)(windows_core::Interface::as_raw(self), entry.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn SetString(&self, tag: DEBUG_FLR_PARAM_TYPE, str: P1) -> *mut FA_ENTRY where @@ -35402,16 +35233,16 @@ impl IDebugFailureAnalysis3 { unsafe { (windows_core::Interface::vtable(self).GetString)(windows_core::Interface::as_raw(self), tag, core::mem::transmute(str.as_ptr()), str.len().try_into().unwrap()) } } pub unsafe fn GetBuffer(&self, tag: DEBUG_FLR_PARAM_TYPE, buf: *mut core::ffi::c_void, size: u32) -> *mut FA_ENTRY { - unsafe { (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), tag, core::mem::transmute(buf), size) } + unsafe { (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), tag, buf as _, size) } } pub unsafe fn GetUlong(&self, tag: DEBUG_FLR_PARAM_TYPE, value: *mut u32) -> *mut FA_ENTRY { - unsafe { (windows_core::Interface::vtable(self).GetUlong)(windows_core::Interface::as_raw(self), tag, core::mem::transmute(value)) } + unsafe { (windows_core::Interface::vtable(self).GetUlong)(windows_core::Interface::as_raw(self), tag, value as _) } } pub unsafe fn GetUlong64(&self, tag: DEBUG_FLR_PARAM_TYPE, value: *mut u64) -> *mut FA_ENTRY { - unsafe { (windows_core::Interface::vtable(self).GetUlong64)(windows_core::Interface::as_raw(self), tag, core::mem::transmute(value)) } + unsafe { (windows_core::Interface::vtable(self).GetUlong64)(windows_core::Interface::as_raw(self), tag, value as _) } } pub unsafe fn NextEntry(&self, entry: Option<*const FA_ENTRY>) -> *mut FA_ENTRY { - unsafe { (windows_core::Interface::vtable(self).NextEntry)(windows_core::Interface::as_raw(self), core::mem::transmute(entry.unwrap_or(core::mem::zeroed()))) } + unsafe { (windows_core::Interface::vtable(self).NextEntry)(windows_core::Interface::as_raw(self), entry.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn SetString(&self, tag: DEBUG_FLR_PARAM_TYPE, str: P1) -> *mut FA_ENTRY where @@ -36339,7 +36170,7 @@ impl IDebugHostEvaluator { P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (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() } + unsafe { (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), metadata.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn EvaluateExtendedExpression(&self, context: P0, expression: P1, bindingcontext: P2, result: *mut Option, metadata: Option<*mut Option>) -> windows_core::Result<()> where @@ -36347,7 +36178,7 @@ impl IDebugHostEvaluator { P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (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() } + unsafe { (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), metadata.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -36399,7 +36230,7 @@ impl IDebugHostEvaluator2 { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).AssignTo)(windows_core::Interface::as_raw(self), assignmentreference.param().abi(), assignmentvalue.param().abi(), core::mem::transmute(assignmentresult), assignmentmetadata.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -36602,13 +36433,13 @@ impl IDebugHostMemory { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ReadBytes)(windows_core::Interface::as_raw(self), context.param().abi(), core::mem::transmute(location), core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadBytes)(windows_core::Interface::as_raw(self), context.param().abi(), core::mem::transmute(location), buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).WriteBytes)(windows_core::Interface::as_raw(self), context.param().abi(), core::mem::transmute(location), buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteBytes)(windows_core::Interface::as_raw(self), context.param().abi(), core::mem::transmute(location), buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReadPointers(&self, context: P0, location: Location, pointers: &mut [u64]) -> windows_core::Result<()> where @@ -36770,7 +36601,7 @@ impl IDebugHostModule { } } pub unsafe fn GetVersion(&self, fileversion: Option<*mut u64>, productversion: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetVersion)(windows_core::Interface::as_raw(self), fileversion.unwrap_or(core::mem::zeroed()) as _, productversion.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn FindTypeByName(&self, typename: P0) -> windows_core::Result where @@ -36908,7 +36739,7 @@ impl core::ops::Deref for IDebugHostModule2 { windows_core::imp::interface_hierarchy!(IDebugHostModule2, windows_core::IUnknown, IDebugHostSymbol, IDebugHostModule); impl IDebugHostModule2 { pub unsafe fn FindContainingSymbolByRVA(&self, rva: u64, symbol: *mut Option, offset: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).FindContainingSymbolByRVA)(windows_core::Interface::as_raw(self), rva, core::mem::transmute(symbol), core::mem::transmute(offset)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindContainingSymbolByRVA)(windows_core::Interface::as_raw(self), rva, core::mem::transmute(symbol), offset as _).ok() } } } #[repr(C)] @@ -37464,7 +37295,7 @@ impl IDebugHostSymbols { P0: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetMostDerivedObject)(windows_core::Interface::as_raw(self), pcontext.param().abi(), core::mem::transmute(location), objecttype.param().abi(), core::mem::transmute(derivedlocation), core::mem::transmute(derivedtype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMostDerivedObject)(windows_core::Interface::as_raw(self), pcontext.param().abi(), core::mem::transmute(location), objecttype.param().abi(), derivedlocation as _, core::mem::transmute(derivedtype)).ok() } } } #[repr(C)] @@ -37617,10 +37448,10 @@ impl IDebugHostType { } } pub unsafe fn GetIntrinsicType(&self, intrinsickind: Option<*mut IntrinsicKind>, carriertype: Option<*mut u16>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetIntrinsicType)(windows_core::Interface::as_raw(self), intrinsickind.unwrap_or(core::mem::zeroed()) as _, carriertype.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetBitField(&self, lsboffield: *mut u32, lengthoffield: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBitField)(windows_core::Interface::as_raw(self), core::mem::transmute(lsboffield), core::mem::transmute(lengthoffield)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBitField)(windows_core::Interface::as_raw(self), lsboffield as _, lengthoffield as _).ok() } } pub unsafe fn GetPointerKind(&self) -> windows_core::Result { unsafe { @@ -38127,7 +37958,7 @@ impl IDebugHostTypeSignature { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).IsMatch)(windows_core::Interface::as_raw(self), r#type.param().abi(), ismatch as _, wildcardmatches.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CompareAgainst(&self, typesignature: P0) -> windows_core::Result where @@ -38420,7 +38251,7 @@ impl IDebugPlmClient { P3: windows_core::Param, P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).LaunchPlmPackageForDebugWide)(windows_core::Interface::as_raw(self), server, timeout, packagefullname.param().abi(), appname.param().abi(), arguments.param().abi(), core::mem::transmute(processid), core::mem::transmute(threadid)).ok() } + unsafe { (windows_core::Interface::vtable(self).LaunchPlmPackageForDebugWide)(windows_core::Interface::as_raw(self), server, timeout, packagefullname.param().abi(), appname.param().abi(), arguments.param().abi(), processid as _, threadid as _).ok() } } } #[repr(C)] @@ -38455,14 +38286,14 @@ impl IDebugPlmClient2 { P3: windows_core::Param, P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).LaunchPlmPackageForDebugWide)(windows_core::Interface::as_raw(self), server, timeout, packagefullname.param().abi(), appname.param().abi(), arguments.param().abi(), core::mem::transmute(processid), core::mem::transmute(threadid)).ok() } + unsafe { (windows_core::Interface::vtable(self).LaunchPlmPackageForDebugWide)(windows_core::Interface::as_raw(self), server, timeout, packagefullname.param().abi(), appname.param().abi(), arguments.param().abi(), processid as _, threadid as _).ok() } } pub unsafe fn LaunchPlmBgTaskForDebugWide(&self, server: u64, timeout: u32, packagefullname: P2, backgroundtaskid: P3, processid: *mut u32, threadid: *mut u32) -> windows_core::Result<()> where P2: windows_core::Param, P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).LaunchPlmBgTaskForDebugWide)(windows_core::Interface::as_raw(self), server, timeout, packagefullname.param().abi(), backgroundtaskid.param().abi(), core::mem::transmute(processid), core::mem::transmute(threadid)).ok() } + unsafe { (windows_core::Interface::vtable(self).LaunchPlmBgTaskForDebugWide)(windows_core::Interface::as_raw(self), server, timeout, packagefullname.param().abi(), backgroundtaskid.param().abi(), processid as _, threadid as _).ok() } } } #[repr(C)] @@ -38509,14 +38340,14 @@ impl IDebugPlmClient3 { P3: windows_core::Param, P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).LaunchPlmPackageForDebugWide)(windows_core::Interface::as_raw(self), server, timeout, packagefullname.param().abi(), appname.param().abi(), arguments.param().abi(), core::mem::transmute(processid), core::mem::transmute(threadid)).ok() } + unsafe { (windows_core::Interface::vtable(self).LaunchPlmPackageForDebugWide)(windows_core::Interface::as_raw(self), server, timeout, packagefullname.param().abi(), appname.param().abi(), arguments.param().abi(), processid as _, threadid as _).ok() } } pub unsafe fn LaunchPlmBgTaskForDebugWide(&self, server: u64, timeout: u32, packagefullname: P2, backgroundtaskid: P3, processid: *mut u32, threadid: *mut u32) -> windows_core::Result<()> where P2: windows_core::Param, P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).LaunchPlmBgTaskForDebugWide)(windows_core::Interface::as_raw(self), server, timeout, packagefullname.param().abi(), backgroundtaskid.param().abi(), core::mem::transmute(processid), core::mem::transmute(threadid)).ok() } + unsafe { (windows_core::Interface::vtable(self).LaunchPlmBgTaskForDebugWide)(windows_core::Interface::as_raw(self), server, timeout, packagefullname.param().abi(), backgroundtaskid.param().abi(), processid as _, threadid as _).ok() } } pub unsafe fn QueryPlmPackageWide(&self, server: u64, packagefullname: P1, stream: P2) -> windows_core::Result<()> where @@ -38703,7 +38534,7 @@ impl IDebugRegisters { } } pub unsafe fn GetDescription(&self, register: u32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>, desc: Option<*mut DEBUG_REGISTER_DESCRIPTION>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDescription)(windows_core::Interface::as_raw(self), register, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(desc.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDescription)(windows_core::Interface::as_raw(self), register, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, desc.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetIndexByName(&self, name: P0) -> windows_core::Result where @@ -38715,16 +38546,16 @@ impl IDebugRegisters { } } pub unsafe fn GetValue(&self, register: u32, value: *mut DEBUG_VALUE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetValue)(windows_core::Interface::as_raw(self), register, core::mem::transmute(value)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetValue)(windows_core::Interface::as_raw(self), register, value as _).ok() } } pub unsafe fn SetValue(&self, register: u32, value: *const DEBUG_VALUE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetValue)(windows_core::Interface::as_raw(self), register, value).ok() } } pub unsafe fn GetValues(&self, count: u32, indices: Option<*const u32>, start: u32, values: *mut DEBUG_VALUE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetValues)(windows_core::Interface::as_raw(self), count, core::mem::transmute(indices.unwrap_or(core::mem::zeroed())), start, core::mem::transmute(values)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetValues)(windows_core::Interface::as_raw(self), count, indices.unwrap_or(core::mem::zeroed()) as _, start, values as _).ok() } } pub unsafe fn SetValues(&self, count: u32, indices: Option<*const u32>, start: u32, values: *const DEBUG_VALUE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetValues)(windows_core::Interface::as_raw(self), count, core::mem::transmute(indices.unwrap_or(core::mem::zeroed())), start, values).ok() } + unsafe { (windows_core::Interface::vtable(self).SetValues)(windows_core::Interface::as_raw(self), count, indices.unwrap_or(core::mem::zeroed()) as _, start, values).ok() } } pub unsafe fn OutputRegisters(&self, outputcontrol: u32, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputRegisters)(windows_core::Interface::as_raw(self), outputcontrol, flags).ok() } @@ -38904,7 +38735,7 @@ impl IDebugRegisters2 { } } pub unsafe fn GetDescription(&self, register: u32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>, desc: Option<*mut DEBUG_REGISTER_DESCRIPTION>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDescription)(windows_core::Interface::as_raw(self), register, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(desc.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDescription)(windows_core::Interface::as_raw(self), register, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, desc.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetIndexByName(&self, name: P0) -> windows_core::Result where @@ -38916,16 +38747,16 @@ impl IDebugRegisters2 { } } pub unsafe fn GetValue(&self, register: u32, value: *mut DEBUG_VALUE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetValue)(windows_core::Interface::as_raw(self), register, core::mem::transmute(value)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetValue)(windows_core::Interface::as_raw(self), register, value as _).ok() } } pub unsafe fn SetValue(&self, register: u32, value: *const DEBUG_VALUE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetValue)(windows_core::Interface::as_raw(self), register, value).ok() } } pub unsafe fn GetValues(&self, count: u32, indices: Option<*const u32>, start: u32, values: *mut DEBUG_VALUE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetValues)(windows_core::Interface::as_raw(self), count, core::mem::transmute(indices.unwrap_or(core::mem::zeroed())), start, core::mem::transmute(values)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetValues)(windows_core::Interface::as_raw(self), count, indices.unwrap_or(core::mem::zeroed()) as _, start, values as _).ok() } } pub unsafe fn SetValues(&self, count: u32, indices: Option<*const u32>, start: u32, values: *const DEBUG_VALUE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetValues)(windows_core::Interface::as_raw(self), count, core::mem::transmute(indices.unwrap_or(core::mem::zeroed())), start, values).ok() } + unsafe { (windows_core::Interface::vtable(self).SetValues)(windows_core::Interface::as_raw(self), count, indices.unwrap_or(core::mem::zeroed()) as _, start, values).ok() } } pub unsafe fn OutputRegisters(&self, outputcontrol: u32, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputRegisters)(windows_core::Interface::as_raw(self), outputcontrol, flags).ok() } @@ -38949,7 +38780,7 @@ impl IDebugRegisters2 { } } pub unsafe fn GetDescriptionWide(&self, register: u32, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>, desc: Option<*mut DEBUG_REGISTER_DESCRIPTION>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDescriptionWide)(windows_core::Interface::as_raw(self), register, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(desc.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDescriptionWide)(windows_core::Interface::as_raw(self), register, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, desc.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetIndexByNameWide(&self, name: P0) -> windows_core::Result where @@ -38967,10 +38798,10 @@ impl IDebugRegisters2 { } } 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetPseudoDescription)(windows_core::Interface::as_raw(self), register, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(typemodule.unwrap_or(core::mem::zeroed())), core::mem::transmute(typeid.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPseudoDescription)(windows_core::Interface::as_raw(self), register, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, typemodule.unwrap_or(core::mem::zeroed()) as _, typeid.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetPseudoDescriptionWide)(windows_core::Interface::as_raw(self), register, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(typemodule.unwrap_or(core::mem::zeroed())), core::mem::transmute(typeid.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPseudoDescriptionWide)(windows_core::Interface::as_raw(self), register, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, typemodule.unwrap_or(core::mem::zeroed()) as _, typeid.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetPseudoIndexByName(&self, name: P0) -> windows_core::Result where @@ -38991,16 +38822,16 @@ impl IDebugRegisters2 { } } pub unsafe fn GetPseudoValues(&self, source: u32, count: u32, indices: Option<*const u32>, start: u32, values: *mut DEBUG_VALUE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPseudoValues)(windows_core::Interface::as_raw(self), source, count, core::mem::transmute(indices.unwrap_or(core::mem::zeroed())), start, core::mem::transmute(values)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPseudoValues)(windows_core::Interface::as_raw(self), source, count, indices.unwrap_or(core::mem::zeroed()) as _, start, values as _).ok() } } pub unsafe fn SetPseudoValues(&self, source: u32, count: u32, indices: Option<*const u32>, start: u32, values: *const DEBUG_VALUE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetPseudoValues)(windows_core::Interface::as_raw(self), source, count, core::mem::transmute(indices.unwrap_or(core::mem::zeroed())), start, values).ok() } + unsafe { (windows_core::Interface::vtable(self).SetPseudoValues)(windows_core::Interface::as_raw(self), source, count, indices.unwrap_or(core::mem::zeroed()) as _, start, values).ok() } } pub unsafe fn GetValues2(&self, source: u32, count: u32, indices: Option<*const u32>, start: u32, values: *mut DEBUG_VALUE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetValues2)(windows_core::Interface::as_raw(self), source, count, core::mem::transmute(indices.unwrap_or(core::mem::zeroed())), start, core::mem::transmute(values)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetValues2)(windows_core::Interface::as_raw(self), source, count, indices.unwrap_or(core::mem::zeroed()) as _, start, values as _).ok() } } pub unsafe fn SetValues2(&self, source: u32, count: u32, indices: Option<*const u32>, start: u32, values: *const DEBUG_VALUE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetValues2)(windows_core::Interface::as_raw(self), source, count, core::mem::transmute(indices.unwrap_or(core::mem::zeroed())), start, values).ok() } + unsafe { (windows_core::Interface::vtable(self).SetValues2)(windows_core::Interface::as_raw(self), source, count, indices.unwrap_or(core::mem::zeroed()) as _, start, values).ok() } } pub unsafe fn OutputRegisters2(&self, outputcontrol: u32, source: u32, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputRegisters2)(windows_core::Interface::as_raw(self), outputcontrol, source, flags).ok() } @@ -39360,7 +39191,7 @@ impl IDebugSymbolGroup { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).AddSymbol)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(index)).ok() } + unsafe { (windows_core::Interface::vtable(self).AddSymbol)(windows_core::Interface::as_raw(self), name.param().abi(), index as _).ok() } } pub unsafe fn RemoveSymbolByName(&self, name: P0) -> windows_core::Result<()> where @@ -39372,7 +39203,7 @@ impl IDebugSymbolGroup { unsafe { (windows_core::Interface::vtable(self).RemoveSymbolByIndex)(windows_core::Interface::as_raw(self), index).ok() } } pub unsafe fn GetSymbolName(&self, index: u32, buffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSymbolName)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolName)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSymbolParameters(&self, start: u32, params: &mut [DEBUG_SYMBOL_PARAMETERS]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetSymbolParameters)(windows_core::Interface::as_raw(self), start, params.len().try_into().unwrap(), core::mem::transmute(params.as_ptr())).ok() } @@ -39522,7 +39353,7 @@ impl IDebugSymbolGroup2 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).AddSymbol)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(index)).ok() } + unsafe { (windows_core::Interface::vtable(self).AddSymbol)(windows_core::Interface::as_raw(self), name.param().abi(), index as _).ok() } } pub unsafe fn RemoveSymbolByName(&self, name: P0) -> windows_core::Result<()> where @@ -39534,7 +39365,7 @@ impl IDebugSymbolGroup2 { unsafe { (windows_core::Interface::vtable(self).RemoveSymbolByIndex)(windows_core::Interface::as_raw(self), index).ok() } } pub unsafe fn GetSymbolName(&self, index: u32, buffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSymbolName)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolName)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSymbolParameters(&self, start: u32, params: &mut [DEBUG_SYMBOL_PARAMETERS]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetSymbolParameters)(windows_core::Interface::as_raw(self), start, params.len().try_into().unwrap(), core::mem::transmute(params.as_ptr())).ok() } @@ -39561,7 +39392,7 @@ impl IDebugSymbolGroup2 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).AddSymbolWide)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(index)).ok() } + unsafe { (windows_core::Interface::vtable(self).AddSymbolWide)(windows_core::Interface::as_raw(self), name.param().abi(), index as _).ok() } } pub unsafe fn RemoveSymbolByNameWide(&self, name: P0) -> windows_core::Result<()> where @@ -39570,7 +39401,7 @@ impl IDebugSymbolGroup2 { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).GetSymbolNameWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolNameWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn WriteSymbolWide(&self, index: u32, value: P1) -> windows_core::Result<()> where @@ -39585,10 +39416,10 @@ impl IDebugSymbolGroup2 { unsafe { (windows_core::Interface::vtable(self).OutputAsTypeWide)(windows_core::Interface::as_raw(self), index, r#type.param().abi()).ok() } } pub unsafe fn GetSymbolTypeName(&self, index: u32, buffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSymbolTypeName)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolTypeName)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSymbolTypeNameWide(&self, index: u32, buffer: Option<&mut [u16]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSymbolTypeNameWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolTypeNameWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSymbolSize(&self, index: u32) -> windows_core::Result { unsafe { @@ -39609,13 +39440,13 @@ impl IDebugSymbolGroup2 { } } pub unsafe fn GetSymbolValueText(&self, index: u32, buffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSymbolValueText)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolValueText)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSymbolValueTextWide(&self, index: u32, buffer: Option<&mut [u16]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSymbolValueTextWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolValueTextWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSymbolEntryInformation(&self, index: u32, entry: *mut DEBUG_SYMBOL_ENTRY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSymbolEntryInformation)(windows_core::Interface::as_raw(self), index, core::mem::transmute(entry)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolEntryInformation)(windows_core::Interface::as_raw(self), index, entry as _).ok() } } } #[repr(C)] @@ -39885,7 +39716,7 @@ impl IDebugSymbols { unsafe { (windows_core::Interface::vtable(self).SetSymbolOptions)(windows_core::Interface::as_raw(self), options).ok() } } pub unsafe fn GetNameByOffset(&self, offset: u64, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNameByOffset)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNameByOffset)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetOffsetByName(&self, symbol: P0) -> windows_core::Result where @@ -39897,10 +39728,10 @@ impl IDebugSymbols { } } pub unsafe fn GetNearNameByOffset(&self, offset: u64, delta: i32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNearNameByOffset)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNearNameByOffset)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetLineByOffset)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).GetLineByOffset)(windows_core::Interface::as_raw(self), offset, line.unwrap_or(core::mem::zeroed()) as _, 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()), filesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetOffsetByLine(&self, line: u32, file: P1) -> windows_core::Result where @@ -39912,7 +39743,7 @@ impl IDebugSymbols { } } pub unsafe fn GetNumberModules(&self, loaded: *mut u32, unloaded: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNumberModules)(windows_core::Interface::as_raw(self), core::mem::transmute(loaded), core::mem::transmute(unloaded)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNumberModules)(windows_core::Interface::as_raw(self), loaded as _, unloaded as _).ok() } } pub unsafe fn GetModuleByIndex(&self, index: u32) -> windows_core::Result { unsafe { @@ -39924,10 +39755,10 @@ impl IDebugSymbols { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetModuleByModuleName)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleByModuleName)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, index.unwrap_or(core::mem::zeroed()) as _, base.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetModuleByOffset(&self, offset: u64, startindex: u32, index: Option<*mut u32>, base: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetModuleByOffset)(windows_core::Interface::as_raw(self), offset, startindex, core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleByOffset)(windows_core::Interface::as_raw(self), offset, startindex, index.unwrap_or(core::mem::zeroed()) as _, base.unwrap_or(core::mem::zeroed()) as _).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<()> { unsafe { @@ -39937,19 +39768,19 @@ impl IDebugSymbols { base, core::mem::transmute(imagenamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), imagenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(imagenamesize.unwrap_or(core::mem::zeroed())), + imagenamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + modulenamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + loadedimagenamesize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } } pub unsafe fn GetModuleParameters(&self, count: u32, bases: Option<*const u64>, start: u32, params: *mut DEBUG_MODULE_PARAMETERS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetModuleParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(bases.unwrap_or(core::mem::zeroed())), start, core::mem::transmute(params)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleParameters)(windows_core::Interface::as_raw(self), count, bases.unwrap_or(core::mem::zeroed()) as _, start, params as _).ok() } } pub unsafe fn GetSymbolModule(&self, symbol: P0) -> windows_core::Result where @@ -39961,7 +39792,7 @@ impl IDebugSymbols { } } pub unsafe fn GetTypeName(&self, module: u64, typeid: u32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTypeName)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTypeName)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetTypeId(&self, module: u64, name: P1) -> windows_core::Result where @@ -39991,34 +39822,34 @@ impl IDebugSymbols { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolTypeId)(windows_core::Interface::as_raw(self), symbol.param().abi(), typeid as _, module.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetOffsetTypeId(&self, offset: u64, typeid: *mut u32, module: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOffsetTypeId)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(typeid), core::mem::transmute(module.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOffsetTypeId)(windows_core::Interface::as_raw(self), offset, typeid as _, module.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).WriteTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputTypedDataVirtual(&self, outputcontrol: u32, offset: u64, module: u64, typeid: u32, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputTypedDataVirtual)(windows_core::Interface::as_raw(self), outputcontrol, offset, module, typeid, flags).ok() } } pub unsafe fn ReadTypedDataPhysical(&self, offset: u64, module: u64, typeid: u32, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).WriteTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputTypedDataPhysical(&self, outputcontrol: u32, offset: u64, module: u64, typeid: u32, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputTypedDataPhysical)(windows_core::Interface::as_raw(self), outputcontrol, offset, module, typeid, flags).ok() } } pub unsafe fn GetScope(&self, instructionoffset: Option<*mut u64>, scopeframe: Option<*mut DEBUG_STACK_FRAME>, scopecontext: Option<*mut core::ffi::c_void>, scopecontextsize: u32) -> windows_core::Result<()> { - unsafe { (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())), scopecontextsize).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScope)(windows_core::Interface::as_raw(self), instructionoffset.unwrap_or(core::mem::zeroed()) as _, scopeframe.unwrap_or(core::mem::zeroed()) as _, scopecontext.unwrap_or(core::mem::zeroed()) as _, 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<()> { - unsafe { (windows_core::Interface::vtable(self).SetScope)(windows_core::Interface::as_raw(self), instructionoffset, core::mem::transmute(scopeframe.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopecontext.unwrap_or(core::mem::zeroed())), scopecontextsize).ok() } + unsafe { (windows_core::Interface::vtable(self).SetScope)(windows_core::Interface::as_raw(self), instructionoffset, scopeframe.unwrap_or(core::mem::zeroed()) as _, scopecontext.unwrap_or(core::mem::zeroed()) as _, scopecontextsize).ok() } } pub unsafe fn ResetScope(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ResetScope)(windows_core::Interface::as_raw(self)).ok() } @@ -40048,7 +39879,7 @@ impl IDebugSymbols { } } pub unsafe fn GetNextSymbolMatch(&self, handle: u64, buffer: Option<&mut [u8]>, matchsize: Option<*mut u32>, offset: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNextSymbolMatch)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(matchsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(offset.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNextSymbolMatch)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), matchsize.unwrap_or(core::mem::zeroed()) as _, offset.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn EndSymbolMatch(&self, handle: u64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).EndSymbolMatch)(windows_core::Interface::as_raw(self), handle).ok() } @@ -40060,7 +39891,7 @@ impl IDebugSymbols { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), pathsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetSymbolPath(&self, path: P0) -> windows_core::Result<()> where @@ -40075,7 +39906,7 @@ impl IDebugSymbols { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), pathsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetImagePath(&self, path: P0) -> windows_core::Result<()> where @@ -40090,10 +39921,10 @@ impl IDebugSymbols { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), pathsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSourcePathElement(&self, index: u32, buffer: Option<&mut [u8]>, elementsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSourcePathElement)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(elementsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourcePathElement)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), elementsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetSourcePath(&self, path: P0) -> windows_core::Result<()> where @@ -40111,13 +39942,13 @@ impl IDebugSymbols { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindSourceFile)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), 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() } + unsafe { (windows_core::Interface::vtable(self).FindSourceFile)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), flags, foundelement.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), foundsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSourceFileLineOffsets(&self, file: P0, buffer: Option<&mut [u64]>, filelines: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (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()), filelines.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -40677,7 +40508,7 @@ impl IDebugSymbols2 { unsafe { (windows_core::Interface::vtable(self).SetSymbolOptions)(windows_core::Interface::as_raw(self), options).ok() } } pub unsafe fn GetNameByOffset(&self, offset: u64, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNameByOffset)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNameByOffset)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetOffsetByName(&self, symbol: P0) -> windows_core::Result where @@ -40689,10 +40520,10 @@ impl IDebugSymbols2 { } } pub unsafe fn GetNearNameByOffset(&self, offset: u64, delta: i32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNearNameByOffset)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNearNameByOffset)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetLineByOffset)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).GetLineByOffset)(windows_core::Interface::as_raw(self), offset, line.unwrap_or(core::mem::zeroed()) as _, 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()), filesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetOffsetByLine(&self, line: u32, file: P1) -> windows_core::Result where @@ -40704,7 +40535,7 @@ impl IDebugSymbols2 { } } pub unsafe fn GetNumberModules(&self, loaded: *mut u32, unloaded: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNumberModules)(windows_core::Interface::as_raw(self), core::mem::transmute(loaded), core::mem::transmute(unloaded)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNumberModules)(windows_core::Interface::as_raw(self), loaded as _, unloaded as _).ok() } } pub unsafe fn GetModuleByIndex(&self, index: u32) -> windows_core::Result { unsafe { @@ -40716,10 +40547,10 @@ impl IDebugSymbols2 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetModuleByModuleName)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleByModuleName)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, index.unwrap_or(core::mem::zeroed()) as _, base.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetModuleByOffset(&self, offset: u64, startindex: u32, index: Option<*mut u32>, base: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetModuleByOffset)(windows_core::Interface::as_raw(self), offset, startindex, core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleByOffset)(windows_core::Interface::as_raw(self), offset, startindex, index.unwrap_or(core::mem::zeroed()) as _, base.unwrap_or(core::mem::zeroed()) as _).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<()> { unsafe { @@ -40729,19 +40560,19 @@ impl IDebugSymbols2 { base, core::mem::transmute(imagenamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), imagenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(imagenamesize.unwrap_or(core::mem::zeroed())), + imagenamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + modulenamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + loadedimagenamesize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } } pub unsafe fn GetModuleParameters(&self, count: u32, bases: Option<*const u64>, start: u32, params: *mut DEBUG_MODULE_PARAMETERS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetModuleParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(bases.unwrap_or(core::mem::zeroed())), start, core::mem::transmute(params)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleParameters)(windows_core::Interface::as_raw(self), count, bases.unwrap_or(core::mem::zeroed()) as _, start, params as _).ok() } } pub unsafe fn GetSymbolModule(&self, symbol: P0) -> windows_core::Result where @@ -40753,7 +40584,7 @@ impl IDebugSymbols2 { } } pub unsafe fn GetTypeName(&self, module: u64, typeid: u32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTypeName)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTypeName)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetTypeId(&self, module: u64, name: P1) -> windows_core::Result where @@ -40783,34 +40614,34 @@ impl IDebugSymbols2 { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolTypeId)(windows_core::Interface::as_raw(self), symbol.param().abi(), typeid as _, module.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetOffsetTypeId(&self, offset: u64, typeid: *mut u32, module: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOffsetTypeId)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(typeid), core::mem::transmute(module.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOffsetTypeId)(windows_core::Interface::as_raw(self), offset, typeid as _, module.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).WriteTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputTypedDataVirtual(&self, outputcontrol: u32, offset: u64, module: u64, typeid: u32, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputTypedDataVirtual)(windows_core::Interface::as_raw(self), outputcontrol, offset, module, typeid, flags).ok() } } pub unsafe fn ReadTypedDataPhysical(&self, offset: u64, module: u64, typeid: u32, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).WriteTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputTypedDataPhysical(&self, outputcontrol: u32, offset: u64, module: u64, typeid: u32, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputTypedDataPhysical)(windows_core::Interface::as_raw(self), outputcontrol, offset, module, typeid, flags).ok() } } pub unsafe fn GetScope(&self, instructionoffset: Option<*mut u64>, scopeframe: Option<*mut DEBUG_STACK_FRAME>, scopecontext: Option<*mut core::ffi::c_void>, scopecontextsize: u32) -> windows_core::Result<()> { - unsafe { (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())), scopecontextsize).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScope)(windows_core::Interface::as_raw(self), instructionoffset.unwrap_or(core::mem::zeroed()) as _, scopeframe.unwrap_or(core::mem::zeroed()) as _, scopecontext.unwrap_or(core::mem::zeroed()) as _, 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<()> { - unsafe { (windows_core::Interface::vtable(self).SetScope)(windows_core::Interface::as_raw(self), instructionoffset, core::mem::transmute(scopeframe.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopecontext.unwrap_or(core::mem::zeroed())), scopecontextsize).ok() } + unsafe { (windows_core::Interface::vtable(self).SetScope)(windows_core::Interface::as_raw(self), instructionoffset, scopeframe.unwrap_or(core::mem::zeroed()) as _, scopecontext.unwrap_or(core::mem::zeroed()) as _, scopecontextsize).ok() } } pub unsafe fn ResetScope(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ResetScope)(windows_core::Interface::as_raw(self)).ok() } @@ -40840,7 +40671,7 @@ impl IDebugSymbols2 { } } pub unsafe fn GetNextSymbolMatch(&self, handle: u64, buffer: Option<&mut [u8]>, matchsize: Option<*mut u32>, offset: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNextSymbolMatch)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(matchsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(offset.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNextSymbolMatch)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), matchsize.unwrap_or(core::mem::zeroed()) as _, offset.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn EndSymbolMatch(&self, handle: u64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).EndSymbolMatch)(windows_core::Interface::as_raw(self), handle).ok() } @@ -40852,7 +40683,7 @@ impl IDebugSymbols2 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), pathsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetSymbolPath(&self, path: P0) -> windows_core::Result<()> where @@ -40867,7 +40698,7 @@ impl IDebugSymbols2 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), pathsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetImagePath(&self, path: P0) -> windows_core::Result<()> where @@ -40882,10 +40713,10 @@ impl IDebugSymbols2 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), pathsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSourcePathElement(&self, index: u32, buffer: Option<&mut [u8]>, elementsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSourcePathElement)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(elementsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourcePathElement)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), elementsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetSourcePath(&self, path: P0) -> windows_core::Result<()> where @@ -40903,28 +40734,28 @@ impl IDebugSymbols2 { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindSourceFile)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), 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() } + unsafe { (windows_core::Interface::vtable(self).FindSourceFile)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), flags, foundelement.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), foundsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSourceFileLineOffsets(&self, file: P0, buffer: Option<&mut [u64]>, filelines: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (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()), filelines.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetModuleVersionInformation)(windows_core::Interface::as_raw(self), index, base, item.param().abi(), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(verinfosize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleVersionInformation)(windows_core::Interface::as_raw(self), index, base, item.param().abi(), buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, verinfosize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetModuleNameString(&self, which: u32, index: u32, base: u64, buffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetModuleNameString)(windows_core::Interface::as_raw(self), which, index, base, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleNameString)(windows_core::Interface::as_raw(self), which, index, base, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetConstantName(&self, module: u64, typeid: u32, value: u64, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetConstantName)(windows_core::Interface::as_raw(self), module, typeid, value, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConstantName)(windows_core::Interface::as_raw(self), module, typeid, value, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetFieldName(&self, module: u64, typeid: u32, fieldindex: u32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFieldName)(windows_core::Interface::as_raw(self), module, typeid, fieldindex, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFieldName)(windows_core::Interface::as_raw(self), module, typeid, fieldindex, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetTypeOptions(&self) -> windows_core::Result { unsafe { @@ -41577,7 +41408,7 @@ impl IDebugSymbols3 { unsafe { (windows_core::Interface::vtable(self).SetSymbolOptions)(windows_core::Interface::as_raw(self), options).ok() } } pub unsafe fn GetNameByOffset(&self, offset: u64, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNameByOffset)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNameByOffset)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetOffsetByName(&self, symbol: P0) -> windows_core::Result where @@ -41589,10 +41420,10 @@ impl IDebugSymbols3 { } } pub unsafe fn GetNearNameByOffset(&self, offset: u64, delta: i32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNearNameByOffset)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNearNameByOffset)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetLineByOffset)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).GetLineByOffset)(windows_core::Interface::as_raw(self), offset, line.unwrap_or(core::mem::zeroed()) as _, 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()), filesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetOffsetByLine(&self, line: u32, file: P1) -> windows_core::Result where @@ -41604,7 +41435,7 @@ impl IDebugSymbols3 { } } pub unsafe fn GetNumberModules(&self, loaded: *mut u32, unloaded: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNumberModules)(windows_core::Interface::as_raw(self), core::mem::transmute(loaded), core::mem::transmute(unloaded)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNumberModules)(windows_core::Interface::as_raw(self), loaded as _, unloaded as _).ok() } } pub unsafe fn GetModuleByIndex(&self, index: u32) -> windows_core::Result { unsafe { @@ -41616,10 +41447,10 @@ impl IDebugSymbols3 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetModuleByModuleName)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleByModuleName)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, index.unwrap_or(core::mem::zeroed()) as _, base.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetModuleByOffset(&self, offset: u64, startindex: u32, index: Option<*mut u32>, base: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetModuleByOffset)(windows_core::Interface::as_raw(self), offset, startindex, core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleByOffset)(windows_core::Interface::as_raw(self), offset, startindex, index.unwrap_or(core::mem::zeroed()) as _, base.unwrap_or(core::mem::zeroed()) as _).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<()> { unsafe { @@ -41629,19 +41460,19 @@ impl IDebugSymbols3 { base, core::mem::transmute(imagenamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), imagenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(imagenamesize.unwrap_or(core::mem::zeroed())), + imagenamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + modulenamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + loadedimagenamesize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } } pub unsafe fn GetModuleParameters(&self, count: u32, bases: Option<*const u64>, start: u32, params: *mut DEBUG_MODULE_PARAMETERS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetModuleParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(bases.unwrap_or(core::mem::zeroed())), start, core::mem::transmute(params)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleParameters)(windows_core::Interface::as_raw(self), count, bases.unwrap_or(core::mem::zeroed()) as _, start, params as _).ok() } } pub unsafe fn GetSymbolModule(&self, symbol: P0) -> windows_core::Result where @@ -41653,7 +41484,7 @@ impl IDebugSymbols3 { } } pub unsafe fn GetTypeName(&self, module: u64, typeid: u32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTypeName)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTypeName)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetTypeId(&self, module: u64, name: P1) -> windows_core::Result where @@ -41683,34 +41514,34 @@ impl IDebugSymbols3 { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolTypeId)(windows_core::Interface::as_raw(self), symbol.param().abi(), typeid as _, module.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetOffsetTypeId(&self, offset: u64, typeid: *mut u32, module: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOffsetTypeId)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(typeid), core::mem::transmute(module.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOffsetTypeId)(windows_core::Interface::as_raw(self), offset, typeid as _, module.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).WriteTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputTypedDataVirtual(&self, outputcontrol: u32, offset: u64, module: u64, typeid: u32, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputTypedDataVirtual)(windows_core::Interface::as_raw(self), outputcontrol, offset, module, typeid, flags).ok() } } pub unsafe fn ReadTypedDataPhysical(&self, offset: u64, module: u64, typeid: u32, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).WriteTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputTypedDataPhysical(&self, outputcontrol: u32, offset: u64, module: u64, typeid: u32, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputTypedDataPhysical)(windows_core::Interface::as_raw(self), outputcontrol, offset, module, typeid, flags).ok() } } pub unsafe fn GetScope(&self, instructionoffset: Option<*mut u64>, scopeframe: Option<*mut DEBUG_STACK_FRAME>, scopecontext: Option<*mut core::ffi::c_void>, scopecontextsize: u32) -> windows_core::Result<()> { - unsafe { (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())), scopecontextsize).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScope)(windows_core::Interface::as_raw(self), instructionoffset.unwrap_or(core::mem::zeroed()) as _, scopeframe.unwrap_or(core::mem::zeroed()) as _, scopecontext.unwrap_or(core::mem::zeroed()) as _, 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<()> { - unsafe { (windows_core::Interface::vtable(self).SetScope)(windows_core::Interface::as_raw(self), instructionoffset, core::mem::transmute(scopeframe.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopecontext.unwrap_or(core::mem::zeroed())), scopecontextsize).ok() } + unsafe { (windows_core::Interface::vtable(self).SetScope)(windows_core::Interface::as_raw(self), instructionoffset, scopeframe.unwrap_or(core::mem::zeroed()) as _, scopecontext.unwrap_or(core::mem::zeroed()) as _, scopecontextsize).ok() } } pub unsafe fn ResetScope(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ResetScope)(windows_core::Interface::as_raw(self)).ok() } @@ -41740,7 +41571,7 @@ impl IDebugSymbols3 { } } pub unsafe fn GetNextSymbolMatch(&self, handle: u64, buffer: Option<&mut [u8]>, matchsize: Option<*mut u32>, offset: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNextSymbolMatch)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(matchsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(offset.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNextSymbolMatch)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), matchsize.unwrap_or(core::mem::zeroed()) as _, offset.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn EndSymbolMatch(&self, handle: u64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).EndSymbolMatch)(windows_core::Interface::as_raw(self), handle).ok() } @@ -41752,7 +41583,7 @@ impl IDebugSymbols3 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), pathsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetSymbolPath(&self, path: P0) -> windows_core::Result<()> where @@ -41767,7 +41598,7 @@ impl IDebugSymbols3 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), pathsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetImagePath(&self, path: P0) -> windows_core::Result<()> where @@ -41782,10 +41613,10 @@ impl IDebugSymbols3 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), pathsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSourcePathElement(&self, index: u32, buffer: Option<&mut [u8]>, elementsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSourcePathElement)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(elementsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourcePathElement)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), elementsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetSourcePath(&self, path: P0) -> windows_core::Result<()> where @@ -41803,28 +41634,28 @@ impl IDebugSymbols3 { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindSourceFile)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), 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() } + unsafe { (windows_core::Interface::vtable(self).FindSourceFile)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), flags, foundelement.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), foundsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSourceFileLineOffsets(&self, file: P0, buffer: Option<&mut [u64]>, filelines: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (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()), filelines.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetModuleVersionInformation)(windows_core::Interface::as_raw(self), index, base, item.param().abi(), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(verinfosize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleVersionInformation)(windows_core::Interface::as_raw(self), index, base, item.param().abi(), buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, verinfosize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetModuleNameString(&self, which: u32, index: u32, base: u64, buffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetModuleNameString)(windows_core::Interface::as_raw(self), which, index, base, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleNameString)(windows_core::Interface::as_raw(self), which, index, base, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetConstantName(&self, module: u64, typeid: u32, value: u64, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetConstantName)(windows_core::Interface::as_raw(self), module, typeid, value, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConstantName)(windows_core::Interface::as_raw(self), module, typeid, value, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetFieldName(&self, module: u64, typeid: u32, fieldindex: u32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFieldName)(windows_core::Interface::as_raw(self), module, typeid, fieldindex, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFieldName)(windows_core::Interface::as_raw(self), module, typeid, fieldindex, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetTypeOptions(&self) -> windows_core::Result { unsafe { @@ -41842,7 +41673,7 @@ impl IDebugSymbols3 { unsafe { (windows_core::Interface::vtable(self).SetTypeOptions)(windows_core::Interface::as_raw(self), options).ok() } } pub unsafe fn GetNameByOffsetWide(&self, offset: u64, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNameByOffsetWide)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNameByOffsetWide)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetOffsetByNameWide(&self, symbol: P0) -> windows_core::Result where @@ -41854,10 +41685,10 @@ impl IDebugSymbols3 { } } pub unsafe fn GetNearNameByOffsetWide(&self, offset: u64, delta: i32, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNearNameByOffsetWide)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNearNameByOffsetWide)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetLineByOffsetWide)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).GetLineByOffsetWide)(windows_core::Interface::as_raw(self), offset, line.unwrap_or(core::mem::zeroed()) as _, 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()), filesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetOffsetByLineWide(&self, line: u32, file: P1) -> windows_core::Result where @@ -41872,7 +41703,7 @@ impl IDebugSymbols3 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetModuleByModuleNameWide)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleByModuleNameWide)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, index.unwrap_or(core::mem::zeroed()) as _, base.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSymbolModuleWide(&self, symbol: P0) -> windows_core::Result where @@ -41884,7 +41715,7 @@ impl IDebugSymbols3 { } } pub unsafe fn GetTypeNameWide(&self, module: u64, typeid: u32, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTypeNameWide)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTypeNameWide)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetTypeIdWide(&self, module: u64, name: P1) -> windows_core::Result where @@ -41908,7 +41739,7 @@ impl IDebugSymbols3 { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolTypeIdWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), typeid as _, module.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetScopeSymbolGroup2(&self, flags: u32, update: P1) -> windows_core::Result where @@ -41935,7 +41766,7 @@ impl IDebugSymbols3 { } } pub unsafe fn GetNextSymbolMatchWide(&self, handle: u64, buffer: Option<&mut [u16]>, matchsize: Option<*mut u32>, offset: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNextSymbolMatchWide)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(matchsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(offset.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNextSymbolMatchWide)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), matchsize.unwrap_or(core::mem::zeroed()) as _, offset.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReloadWide(&self, module: P0) -> windows_core::Result<()> where @@ -41944,7 +41775,7 @@ impl IDebugSymbols3 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), pathsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetSymbolPathWide(&self, path: P0) -> windows_core::Result<()> where @@ -41959,7 +41790,7 @@ impl IDebugSymbols3 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), pathsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetImagePathWide(&self, path: P0) -> windows_core::Result<()> where @@ -41974,10 +41805,10 @@ impl IDebugSymbols3 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), pathsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSourcePathElementWide(&self, index: u32, buffer: Option<&mut [u16]>, elementsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSourcePathElementWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(elementsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourcePathElementWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), elementsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetSourcePathWide(&self, path: P0) -> windows_core::Result<()> where @@ -41995,28 +41826,28 @@ impl IDebugSymbols3 { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindSourceFileWide)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), 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() } + unsafe { (windows_core::Interface::vtable(self).FindSourceFileWide)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), flags, foundelement.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), foundsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSourceFileLineOffsetsWide(&self, file: P0, buffer: Option<&mut [u64]>, filelines: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (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()), filelines.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetModuleVersionInformationWide)(windows_core::Interface::as_raw(self), index, base, item.param().abi(), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(verinfosize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleVersionInformationWide)(windows_core::Interface::as_raw(self), index, base, item.param().abi(), buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, verinfosize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetModuleNameStringWide(&self, which: u32, index: u32, base: u64, buffer: Option<&mut [u16]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetModuleNameStringWide)(windows_core::Interface::as_raw(self), which, index, base, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleNameStringWide)(windows_core::Interface::as_raw(self), which, index, base, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetConstantNameWide(&self, module: u64, typeid: u32, value: u64, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetConstantNameWide)(windows_core::Interface::as_raw(self), module, typeid, value, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConstantNameWide)(windows_core::Interface::as_raw(self), module, typeid, value, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetFieldNameWide(&self, module: u64, typeid: u32, fieldindex: u32, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFieldNameWide)(windows_core::Interface::as_raw(self), module, typeid, fieldindex, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFieldNameWide)(windows_core::Interface::as_raw(self), module, typeid, fieldindex, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn IsManagedModule(&self, index: u32, base: u64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).IsManagedModule)(windows_core::Interface::as_raw(self), index, base).ok() } @@ -42025,16 +41856,16 @@ impl IDebugSymbols3 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetModuleByModuleName2)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, flags, core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleByModuleName2)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, flags, index.unwrap_or(core::mem::zeroed()) as _, base.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetModuleByModuleName2Wide)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, flags, core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleByModuleName2Wide)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, flags, index.unwrap_or(core::mem::zeroed()) as _, base.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetModuleByOffset2(&self, offset: u64, startindex: u32, flags: u32, index: Option<*mut u32>, base: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetModuleByOffset2)(windows_core::Interface::as_raw(self), offset, startindex, flags, core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleByOffset2)(windows_core::Interface::as_raw(self), offset, startindex, flags, index.unwrap_or(core::mem::zeroed()) as _, base.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn AddSyntheticModule(&self, base: u64, size: u32, imagepath: P2, modulename: P3, flags: u32) -> windows_core::Result<()> where @@ -42072,49 +41903,49 @@ impl IDebugSymbols3 { unsafe { (windows_core::Interface::vtable(self).OutputSymbolByOffset)(windows_core::Interface::as_raw(self), outputcontrol, flags, offset).ok() } } pub unsafe fn GetFunctionEntryByOffset(&self, offset: u64, flags: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, bufferneeded: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFunctionEntryByOffset)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(bufferneeded.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFunctionEntryByOffset)(windows_core::Interface::as_raw(self), offset, flags, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, bufferneeded.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetFieldTypeAndOffset)(windows_core::Interface::as_raw(self), module, containertypeid, field.param().abi(), core::mem::transmute(fieldtypeid.unwrap_or(core::mem::zeroed())), core::mem::transmute(offset.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFieldTypeAndOffset)(windows_core::Interface::as_raw(self), module, containertypeid, field.param().abi(), fieldtypeid.unwrap_or(core::mem::zeroed()) as _, offset.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetFieldTypeAndOffsetWide)(windows_core::Interface::as_raw(self), module, containertypeid, field.param().abi(), core::mem::transmute(fieldtypeid.unwrap_or(core::mem::zeroed())), core::mem::transmute(offset.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFieldTypeAndOffsetWide)(windows_core::Interface::as_raw(self), module, containertypeid, field.param().abi(), fieldtypeid.unwrap_or(core::mem::zeroed()) as _, offset.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).AddSyntheticSymbol)(windows_core::Interface::as_raw(self), offset, size, name.param().abi(), flags, core::mem::transmute(id.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).AddSyntheticSymbol)(windows_core::Interface::as_raw(self), offset, size, name.param().abi(), flags, id.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).AddSyntheticSymbolWide)(windows_core::Interface::as_raw(self), offset, size, name.param().abi(), flags, core::mem::transmute(id.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).AddSyntheticSymbolWide)(windows_core::Interface::as_raw(self), offset, size, name.param().abi(), flags, id.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn RemoveSyntheticSymbol(&self, id: *const DEBUG_MODULE_AND_ID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RemoveSyntheticSymbol)(windows_core::Interface::as_raw(self), id).ok() } } pub unsafe fn GetSymbolEntriesByOffset(&self, offset: u64, flags: u32, ids: Option<*mut DEBUG_MODULE_AND_ID>, displacements: Option<*mut u64>, idscount: u32, entries: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSymbolEntriesByOffset)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), core::mem::transmute(displacements.unwrap_or(core::mem::zeroed())), idscount, core::mem::transmute(entries.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolEntriesByOffset)(windows_core::Interface::as_raw(self), offset, flags, ids.unwrap_or(core::mem::zeroed()) as _, displacements.unwrap_or(core::mem::zeroed()) as _, idscount, entries.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetSymbolEntriesByName)(windows_core::Interface::as_raw(self), symbol.param().abi(), flags, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entries.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolEntriesByName)(windows_core::Interface::as_raw(self), symbol.param().abi(), flags, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), entries.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetSymbolEntriesByNameWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), flags, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entries.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolEntriesByNameWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), flags, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), entries.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSymbolEntryByToken(&self, modulebase: u64, token: u32) -> windows_core::Result { unsafe { @@ -42123,16 +41954,16 @@ impl IDebugSymbols3 { } } pub unsafe fn GetSymbolEntryInformation(&self, id: *const DEBUG_MODULE_AND_ID, info: *mut DEBUG_SYMBOL_ENTRY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSymbolEntryInformation)(windows_core::Interface::as_raw(self), id, core::mem::transmute(info)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolEntryInformation)(windows_core::Interface::as_raw(self), id, info as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetSymbolEntryString)(windows_core::Interface::as_raw(self), id, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolEntryString)(windows_core::Interface::as_raw(self), id, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), stringsize.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetSymbolEntryStringWide)(windows_core::Interface::as_raw(self), id, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolEntryStringWide)(windows_core::Interface::as_raw(self), id, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), stringsize.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetSymbolEntryOffsetRegions)(windows_core::Interface::as_raw(self), id, flags, core::mem::transmute(regions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(regionsavail.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolEntryOffsetRegions)(windows_core::Interface::as_raw(self), id, flags, core::mem::transmute(regions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), regionsavail.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSymbolEntryBySymbolEntry(&self, fromid: *const DEBUG_MODULE_AND_ID, flags: u32) -> windows_core::Result { unsafe { @@ -42141,31 +41972,31 @@ impl IDebugSymbols3 { } } pub unsafe fn GetSourceEntriesByOffset(&self, offset: u64, flags: u32, entries: Option<&mut [DEBUG_SYMBOL_SOURCE_ENTRY]>, entriesavail: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSourceEntriesByOffset)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entriesavail.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourceEntriesByOffset)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), entriesavail.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetSourceEntriesByLine)(windows_core::Interface::as_raw(self), line, file.param().abi(), flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entriesavail.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourceEntriesByLine)(windows_core::Interface::as_raw(self), line, file.param().abi(), flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), entriesavail.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetSourceEntriesByLineWide)(windows_core::Interface::as_raw(self), line, file.param().abi(), flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entriesavail.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourceEntriesByLineWide)(windows_core::Interface::as_raw(self), line, file.param().abi(), flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), entriesavail.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetSourceEntryString)(windows_core::Interface::as_raw(self), entry, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourceEntryString)(windows_core::Interface::as_raw(self), entry, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), stringsize.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetSourceEntryStringWide)(windows_core::Interface::as_raw(self), entry, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourceEntryStringWide)(windows_core::Interface::as_raw(self), entry, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), stringsize.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetSourceEntryOffsetRegions)(windows_core::Interface::as_raw(self), entry, flags, core::mem::transmute(regions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(regionsavail.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourceEntryOffsetRegions)(windows_core::Interface::as_raw(self), entry, flags, core::mem::transmute(regions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), regionsavail.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSourceEntryBySourceEntry(&self, fromentry: *const DEBUG_SYMBOL_SOURCE_ENTRY, flags: u32, toentry: *mut DEBUG_SYMBOL_SOURCE_ENTRY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSourceEntryBySourceEntry)(windows_core::Interface::as_raw(self), fromentry, flags, core::mem::transmute(toentry)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourceEntryBySourceEntry)(windows_core::Interface::as_raw(self), fromentry, flags, toentry as _).ok() } } } #[repr(C)] @@ -43463,7 +43294,7 @@ impl IDebugSymbols4 { unsafe { (windows_core::Interface::vtable(self).SetSymbolOptions)(windows_core::Interface::as_raw(self), options).ok() } } pub unsafe fn GetNameByOffset(&self, offset: u64, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNameByOffset)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNameByOffset)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetOffsetByName(&self, symbol: P0) -> windows_core::Result where @@ -43475,10 +43306,10 @@ impl IDebugSymbols4 { } } pub unsafe fn GetNearNameByOffset(&self, offset: u64, delta: i32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNearNameByOffset)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNearNameByOffset)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetLineByOffset)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).GetLineByOffset)(windows_core::Interface::as_raw(self), offset, line.unwrap_or(core::mem::zeroed()) as _, 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()), filesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetOffsetByLine(&self, line: u32, file: P1) -> windows_core::Result where @@ -43490,7 +43321,7 @@ impl IDebugSymbols4 { } } pub unsafe fn GetNumberModules(&self, loaded: *mut u32, unloaded: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNumberModules)(windows_core::Interface::as_raw(self), core::mem::transmute(loaded), core::mem::transmute(unloaded)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNumberModules)(windows_core::Interface::as_raw(self), loaded as _, unloaded as _).ok() } } pub unsafe fn GetModuleByIndex(&self, index: u32) -> windows_core::Result { unsafe { @@ -43502,10 +43333,10 @@ impl IDebugSymbols4 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetModuleByModuleName)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleByModuleName)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, index.unwrap_or(core::mem::zeroed()) as _, base.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetModuleByOffset(&self, offset: u64, startindex: u32, index: Option<*mut u32>, base: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetModuleByOffset)(windows_core::Interface::as_raw(self), offset, startindex, core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleByOffset)(windows_core::Interface::as_raw(self), offset, startindex, index.unwrap_or(core::mem::zeroed()) as _, base.unwrap_or(core::mem::zeroed()) as _).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<()> { unsafe { @@ -43515,19 +43346,19 @@ impl IDebugSymbols4 { base, core::mem::transmute(imagenamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), imagenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(imagenamesize.unwrap_or(core::mem::zeroed())), + imagenamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + modulenamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + loadedimagenamesize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } } pub unsafe fn GetModuleParameters(&self, count: u32, bases: Option<*const u64>, start: u32, params: *mut DEBUG_MODULE_PARAMETERS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetModuleParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(bases.unwrap_or(core::mem::zeroed())), start, core::mem::transmute(params)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleParameters)(windows_core::Interface::as_raw(self), count, bases.unwrap_or(core::mem::zeroed()) as _, start, params as _).ok() } } pub unsafe fn GetSymbolModule(&self, symbol: P0) -> windows_core::Result where @@ -43539,7 +43370,7 @@ impl IDebugSymbols4 { } } pub unsafe fn GetTypeName(&self, module: u64, typeid: u32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTypeName)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTypeName)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetTypeId(&self, module: u64, name: P1) -> windows_core::Result where @@ -43569,34 +43400,34 @@ impl IDebugSymbols4 { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolTypeId)(windows_core::Interface::as_raw(self), symbol.param().abi(), typeid as _, module.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetOffsetTypeId(&self, offset: u64, typeid: *mut u32, module: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOffsetTypeId)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(typeid), core::mem::transmute(module.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOffsetTypeId)(windows_core::Interface::as_raw(self), offset, typeid as _, module.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).WriteTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputTypedDataVirtual(&self, outputcontrol: u32, offset: u64, module: u64, typeid: u32, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputTypedDataVirtual)(windows_core::Interface::as_raw(self), outputcontrol, offset, module, typeid, flags).ok() } } pub unsafe fn ReadTypedDataPhysical(&self, offset: u64, module: u64, typeid: u32, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).WriteTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputTypedDataPhysical(&self, outputcontrol: u32, offset: u64, module: u64, typeid: u32, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputTypedDataPhysical)(windows_core::Interface::as_raw(self), outputcontrol, offset, module, typeid, flags).ok() } } pub unsafe fn GetScope(&self, instructionoffset: Option<*mut u64>, scopeframe: Option<*mut DEBUG_STACK_FRAME>, scopecontext: Option<*mut core::ffi::c_void>, scopecontextsize: u32) -> windows_core::Result<()> { - unsafe { (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())), scopecontextsize).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScope)(windows_core::Interface::as_raw(self), instructionoffset.unwrap_or(core::mem::zeroed()) as _, scopeframe.unwrap_or(core::mem::zeroed()) as _, scopecontext.unwrap_or(core::mem::zeroed()) as _, 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<()> { - unsafe { (windows_core::Interface::vtable(self).SetScope)(windows_core::Interface::as_raw(self), instructionoffset, core::mem::transmute(scopeframe.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopecontext.unwrap_or(core::mem::zeroed())), scopecontextsize).ok() } + unsafe { (windows_core::Interface::vtable(self).SetScope)(windows_core::Interface::as_raw(self), instructionoffset, scopeframe.unwrap_or(core::mem::zeroed()) as _, scopecontext.unwrap_or(core::mem::zeroed()) as _, scopecontextsize).ok() } } pub unsafe fn ResetScope(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ResetScope)(windows_core::Interface::as_raw(self)).ok() } @@ -43626,7 +43457,7 @@ impl IDebugSymbols4 { } } pub unsafe fn GetNextSymbolMatch(&self, handle: u64, buffer: Option<&mut [u8]>, matchsize: Option<*mut u32>, offset: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNextSymbolMatch)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(matchsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(offset.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNextSymbolMatch)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), matchsize.unwrap_or(core::mem::zeroed()) as _, offset.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn EndSymbolMatch(&self, handle: u64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).EndSymbolMatch)(windows_core::Interface::as_raw(self), handle).ok() } @@ -43638,7 +43469,7 @@ impl IDebugSymbols4 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), pathsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetSymbolPath(&self, path: P0) -> windows_core::Result<()> where @@ -43653,7 +43484,7 @@ impl IDebugSymbols4 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), pathsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetImagePath(&self, path: P0) -> windows_core::Result<()> where @@ -43668,10 +43499,10 @@ impl IDebugSymbols4 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), pathsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSourcePathElement(&self, index: u32, buffer: Option<&mut [u8]>, elementsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSourcePathElement)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(elementsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourcePathElement)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), elementsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetSourcePath(&self, path: P0) -> windows_core::Result<()> where @@ -43689,28 +43520,28 @@ impl IDebugSymbols4 { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindSourceFile)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), 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() } + unsafe { (windows_core::Interface::vtable(self).FindSourceFile)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), flags, foundelement.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), foundsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSourceFileLineOffsets(&self, file: P0, buffer: Option<&mut [u64]>, filelines: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (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()), filelines.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetModuleVersionInformation)(windows_core::Interface::as_raw(self), index, base, item.param().abi(), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(verinfosize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleVersionInformation)(windows_core::Interface::as_raw(self), index, base, item.param().abi(), buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, verinfosize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetModuleNameString(&self, which: u32, index: u32, base: u64, buffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetModuleNameString)(windows_core::Interface::as_raw(self), which, index, base, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleNameString)(windows_core::Interface::as_raw(self), which, index, base, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetConstantName(&self, module: u64, typeid: u32, value: u64, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetConstantName)(windows_core::Interface::as_raw(self), module, typeid, value, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConstantName)(windows_core::Interface::as_raw(self), module, typeid, value, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetFieldName(&self, module: u64, typeid: u32, fieldindex: u32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFieldName)(windows_core::Interface::as_raw(self), module, typeid, fieldindex, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFieldName)(windows_core::Interface::as_raw(self), module, typeid, fieldindex, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetTypeOptions(&self) -> windows_core::Result { unsafe { @@ -43728,7 +43559,7 @@ impl IDebugSymbols4 { unsafe { (windows_core::Interface::vtable(self).SetTypeOptions)(windows_core::Interface::as_raw(self), options).ok() } } pub unsafe fn GetNameByOffsetWide(&self, offset: u64, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNameByOffsetWide)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNameByOffsetWide)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetOffsetByNameWide(&self, symbol: P0) -> windows_core::Result where @@ -43740,10 +43571,10 @@ impl IDebugSymbols4 { } } pub unsafe fn GetNearNameByOffsetWide(&self, offset: u64, delta: i32, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNearNameByOffsetWide)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNearNameByOffsetWide)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetLineByOffsetWide)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).GetLineByOffsetWide)(windows_core::Interface::as_raw(self), offset, line.unwrap_or(core::mem::zeroed()) as _, 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()), filesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetOffsetByLineWide(&self, line: u32, file: P1) -> windows_core::Result where @@ -43758,7 +43589,7 @@ impl IDebugSymbols4 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetModuleByModuleNameWide)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleByModuleNameWide)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, index.unwrap_or(core::mem::zeroed()) as _, base.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSymbolModuleWide(&self, symbol: P0) -> windows_core::Result where @@ -43770,7 +43601,7 @@ impl IDebugSymbols4 { } } pub unsafe fn GetTypeNameWide(&self, module: u64, typeid: u32, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTypeNameWide)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTypeNameWide)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetTypeIdWide(&self, module: u64, name: P1) -> windows_core::Result where @@ -43794,7 +43625,7 @@ impl IDebugSymbols4 { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolTypeIdWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), typeid as _, module.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetScopeSymbolGroup2(&self, flags: u32, update: P1) -> windows_core::Result where @@ -43821,7 +43652,7 @@ impl IDebugSymbols4 { } } pub unsafe fn GetNextSymbolMatchWide(&self, handle: u64, buffer: Option<&mut [u16]>, matchsize: Option<*mut u32>, offset: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNextSymbolMatchWide)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(matchsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(offset.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNextSymbolMatchWide)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), matchsize.unwrap_or(core::mem::zeroed()) as _, offset.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReloadWide(&self, module: P0) -> windows_core::Result<()> where @@ -43830,7 +43661,7 @@ impl IDebugSymbols4 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), pathsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetSymbolPathWide(&self, path: P0) -> windows_core::Result<()> where @@ -43845,7 +43676,7 @@ impl IDebugSymbols4 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), pathsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetImagePathWide(&self, path: P0) -> windows_core::Result<()> where @@ -43860,10 +43691,10 @@ impl IDebugSymbols4 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), pathsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSourcePathElementWide(&self, index: u32, buffer: Option<&mut [u16]>, elementsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSourcePathElementWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(elementsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourcePathElementWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), elementsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetSourcePathWide(&self, path: P0) -> windows_core::Result<()> where @@ -43881,28 +43712,28 @@ impl IDebugSymbols4 { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindSourceFileWide)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), 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() } + unsafe { (windows_core::Interface::vtable(self).FindSourceFileWide)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), flags, foundelement.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), foundsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSourceFileLineOffsetsWide(&self, file: P0, buffer: Option<&mut [u64]>, filelines: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (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()), filelines.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetModuleVersionInformationWide)(windows_core::Interface::as_raw(self), index, base, item.param().abi(), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(verinfosize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleVersionInformationWide)(windows_core::Interface::as_raw(self), index, base, item.param().abi(), buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, verinfosize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetModuleNameStringWide(&self, which: u32, index: u32, base: u64, buffer: Option<&mut [u16]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetModuleNameStringWide)(windows_core::Interface::as_raw(self), which, index, base, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleNameStringWide)(windows_core::Interface::as_raw(self), which, index, base, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetConstantNameWide(&self, module: u64, typeid: u32, value: u64, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetConstantNameWide)(windows_core::Interface::as_raw(self), module, typeid, value, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConstantNameWide)(windows_core::Interface::as_raw(self), module, typeid, value, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetFieldNameWide(&self, module: u64, typeid: u32, fieldindex: u32, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFieldNameWide)(windows_core::Interface::as_raw(self), module, typeid, fieldindex, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFieldNameWide)(windows_core::Interface::as_raw(self), module, typeid, fieldindex, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn IsManagedModule(&self, index: u32, base: u64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).IsManagedModule)(windows_core::Interface::as_raw(self), index, base).ok() } @@ -43911,16 +43742,16 @@ impl IDebugSymbols4 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetModuleByModuleName2)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, flags, core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleByModuleName2)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, flags, index.unwrap_or(core::mem::zeroed()) as _, base.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetModuleByModuleName2Wide)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, flags, core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleByModuleName2Wide)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, flags, index.unwrap_or(core::mem::zeroed()) as _, base.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetModuleByOffset2(&self, offset: u64, startindex: u32, flags: u32, index: Option<*mut u32>, base: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetModuleByOffset2)(windows_core::Interface::as_raw(self), offset, startindex, flags, core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleByOffset2)(windows_core::Interface::as_raw(self), offset, startindex, flags, index.unwrap_or(core::mem::zeroed()) as _, base.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn AddSyntheticModule(&self, base: u64, size: u32, imagepath: P2, modulename: P3, flags: u32) -> windows_core::Result<()> where @@ -43958,49 +43789,49 @@ impl IDebugSymbols4 { unsafe { (windows_core::Interface::vtable(self).OutputSymbolByOffset)(windows_core::Interface::as_raw(self), outputcontrol, flags, offset).ok() } } pub unsafe fn GetFunctionEntryByOffset(&self, offset: u64, flags: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, bufferneeded: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFunctionEntryByOffset)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(bufferneeded.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFunctionEntryByOffset)(windows_core::Interface::as_raw(self), offset, flags, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, bufferneeded.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetFieldTypeAndOffset)(windows_core::Interface::as_raw(self), module, containertypeid, field.param().abi(), core::mem::transmute(fieldtypeid.unwrap_or(core::mem::zeroed())), core::mem::transmute(offset.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFieldTypeAndOffset)(windows_core::Interface::as_raw(self), module, containertypeid, field.param().abi(), fieldtypeid.unwrap_or(core::mem::zeroed()) as _, offset.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetFieldTypeAndOffsetWide)(windows_core::Interface::as_raw(self), module, containertypeid, field.param().abi(), core::mem::transmute(fieldtypeid.unwrap_or(core::mem::zeroed())), core::mem::transmute(offset.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFieldTypeAndOffsetWide)(windows_core::Interface::as_raw(self), module, containertypeid, field.param().abi(), fieldtypeid.unwrap_or(core::mem::zeroed()) as _, offset.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).AddSyntheticSymbol)(windows_core::Interface::as_raw(self), offset, size, name.param().abi(), flags, core::mem::transmute(id.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).AddSyntheticSymbol)(windows_core::Interface::as_raw(self), offset, size, name.param().abi(), flags, id.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).AddSyntheticSymbolWide)(windows_core::Interface::as_raw(self), offset, size, name.param().abi(), flags, core::mem::transmute(id.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).AddSyntheticSymbolWide)(windows_core::Interface::as_raw(self), offset, size, name.param().abi(), flags, id.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn RemoveSyntheticSymbol(&self, id: *const DEBUG_MODULE_AND_ID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RemoveSyntheticSymbol)(windows_core::Interface::as_raw(self), id).ok() } } pub unsafe fn GetSymbolEntriesByOffset(&self, offset: u64, flags: u32, ids: Option<*mut DEBUG_MODULE_AND_ID>, displacements: Option<*mut u64>, idscount: u32, entries: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSymbolEntriesByOffset)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), core::mem::transmute(displacements.unwrap_or(core::mem::zeroed())), idscount, core::mem::transmute(entries.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolEntriesByOffset)(windows_core::Interface::as_raw(self), offset, flags, ids.unwrap_or(core::mem::zeroed()) as _, displacements.unwrap_or(core::mem::zeroed()) as _, idscount, entries.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetSymbolEntriesByName)(windows_core::Interface::as_raw(self), symbol.param().abi(), flags, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entries.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolEntriesByName)(windows_core::Interface::as_raw(self), symbol.param().abi(), flags, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), entries.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetSymbolEntriesByNameWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), flags, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entries.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolEntriesByNameWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), flags, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), entries.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSymbolEntryByToken(&self, modulebase: u64, token: u32) -> windows_core::Result { unsafe { @@ -44009,16 +43840,16 @@ impl IDebugSymbols4 { } } pub unsafe fn GetSymbolEntryInformation(&self, id: *const DEBUG_MODULE_AND_ID, info: *mut DEBUG_SYMBOL_ENTRY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSymbolEntryInformation)(windows_core::Interface::as_raw(self), id, core::mem::transmute(info)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolEntryInformation)(windows_core::Interface::as_raw(self), id, info as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetSymbolEntryString)(windows_core::Interface::as_raw(self), id, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolEntryString)(windows_core::Interface::as_raw(self), id, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), stringsize.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetSymbolEntryStringWide)(windows_core::Interface::as_raw(self), id, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolEntryStringWide)(windows_core::Interface::as_raw(self), id, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), stringsize.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetSymbolEntryOffsetRegions)(windows_core::Interface::as_raw(self), id, flags, core::mem::transmute(regions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(regionsavail.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolEntryOffsetRegions)(windows_core::Interface::as_raw(self), id, flags, core::mem::transmute(regions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), regionsavail.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSymbolEntryBySymbolEntry(&self, fromid: *const DEBUG_MODULE_AND_ID, flags: u32) -> windows_core::Result { unsafe { @@ -44027,49 +43858,49 @@ impl IDebugSymbols4 { } } pub unsafe fn GetSourceEntriesByOffset(&self, offset: u64, flags: u32, entries: Option<&mut [DEBUG_SYMBOL_SOURCE_ENTRY]>, entriesavail: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSourceEntriesByOffset)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entriesavail.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourceEntriesByOffset)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), entriesavail.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetSourceEntriesByLine)(windows_core::Interface::as_raw(self), line, file.param().abi(), flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entriesavail.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourceEntriesByLine)(windows_core::Interface::as_raw(self), line, file.param().abi(), flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), entriesavail.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetSourceEntriesByLineWide)(windows_core::Interface::as_raw(self), line, file.param().abi(), flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entriesavail.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourceEntriesByLineWide)(windows_core::Interface::as_raw(self), line, file.param().abi(), flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), entriesavail.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetSourceEntryString)(windows_core::Interface::as_raw(self), entry, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourceEntryString)(windows_core::Interface::as_raw(self), entry, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), stringsize.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetSourceEntryStringWide)(windows_core::Interface::as_raw(self), entry, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourceEntryStringWide)(windows_core::Interface::as_raw(self), entry, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), stringsize.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetSourceEntryOffsetRegions)(windows_core::Interface::as_raw(self), entry, flags, core::mem::transmute(regions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(regionsavail.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourceEntryOffsetRegions)(windows_core::Interface::as_raw(self), entry, flags, core::mem::transmute(regions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), regionsavail.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSourceEntryBySourceEntry(&self, fromentry: *const DEBUG_SYMBOL_SOURCE_ENTRY, flags: u32, toentry: *mut DEBUG_SYMBOL_SOURCE_ENTRY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSourceEntryBySourceEntry)(windows_core::Interface::as_raw(self), fromentry, flags, core::mem::transmute(toentry)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourceEntryBySourceEntry)(windows_core::Interface::as_raw(self), fromentry, flags, toentry as _).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<()> { - unsafe { (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())), scopecontextsize).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScopeEx)(windows_core::Interface::as_raw(self), instructionoffset.unwrap_or(core::mem::zeroed()) as _, scopeframe.unwrap_or(core::mem::zeroed()) as _, scopecontext.unwrap_or(core::mem::zeroed()) as _, 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<()> { - unsafe { (windows_core::Interface::vtable(self).SetScopeEx)(windows_core::Interface::as_raw(self), instructionoffset, core::mem::transmute(scopeframe.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopecontext.unwrap_or(core::mem::zeroed())), scopecontextsize).ok() } + unsafe { (windows_core::Interface::vtable(self).SetScopeEx)(windows_core::Interface::as_raw(self), instructionoffset, scopeframe.unwrap_or(core::mem::zeroed()) as _, scopecontext.unwrap_or(core::mem::zeroed()) as _, 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetNameByInlineContext)(windows_core::Interface::as_raw(self), offset, inlinecontext, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNameByInlineContext)(windows_core::Interface::as_raw(self), offset, inlinecontext, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetNameByInlineContextWide)(windows_core::Interface::as_raw(self), offset, inlinecontext, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNameByInlineContextWide)(windows_core::Interface::as_raw(self), offset, inlinecontext, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetLineByInlineContext)(windows_core::Interface::as_raw(self), offset, 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() } + unsafe { (windows_core::Interface::vtable(self).GetLineByInlineContext)(windows_core::Interface::as_raw(self), offset, inlinecontext, line.unwrap_or(core::mem::zeroed()) as _, 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()), filesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetLineByInlineContextWide)(windows_core::Interface::as_raw(self), offset, 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() } + unsafe { (windows_core::Interface::vtable(self).GetLineByInlineContextWide)(windows_core::Interface::as_raw(self), offset, inlinecontext, line.unwrap_or(core::mem::zeroed()) as _, 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()), filesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputSymbolByInlineContext(&self, outputcontrol: u32, flags: u32, offset: u64, inlinecontext: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputSymbolByInlineContext)(windows_core::Interface::as_raw(self), outputcontrol, flags, offset, inlinecontext).ok() } @@ -45433,7 +45264,7 @@ impl IDebugSymbols5 { unsafe { (windows_core::Interface::vtable(self).SetSymbolOptions)(windows_core::Interface::as_raw(self), options).ok() } } pub unsafe fn GetNameByOffset(&self, offset: u64, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNameByOffset)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNameByOffset)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetOffsetByName(&self, symbol: P0) -> windows_core::Result where @@ -45445,10 +45276,10 @@ impl IDebugSymbols5 { } } pub unsafe fn GetNearNameByOffset(&self, offset: u64, delta: i32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNearNameByOffset)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNearNameByOffset)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetLineByOffset)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).GetLineByOffset)(windows_core::Interface::as_raw(self), offset, line.unwrap_or(core::mem::zeroed()) as _, 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()), filesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetOffsetByLine(&self, line: u32, file: P1) -> windows_core::Result where @@ -45460,7 +45291,7 @@ impl IDebugSymbols5 { } } pub unsafe fn GetNumberModules(&self, loaded: *mut u32, unloaded: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNumberModules)(windows_core::Interface::as_raw(self), core::mem::transmute(loaded), core::mem::transmute(unloaded)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNumberModules)(windows_core::Interface::as_raw(self), loaded as _, unloaded as _).ok() } } pub unsafe fn GetModuleByIndex(&self, index: u32) -> windows_core::Result { unsafe { @@ -45472,10 +45303,10 @@ impl IDebugSymbols5 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetModuleByModuleName)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleByModuleName)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, index.unwrap_or(core::mem::zeroed()) as _, base.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetModuleByOffset(&self, offset: u64, startindex: u32, index: Option<*mut u32>, base: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetModuleByOffset)(windows_core::Interface::as_raw(self), offset, startindex, core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleByOffset)(windows_core::Interface::as_raw(self), offset, startindex, index.unwrap_or(core::mem::zeroed()) as _, base.unwrap_or(core::mem::zeroed()) as _).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<()> { unsafe { @@ -45485,19 +45316,19 @@ impl IDebugSymbols5 { base, core::mem::transmute(imagenamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), imagenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(imagenamesize.unwrap_or(core::mem::zeroed())), + imagenamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + modulenamesize.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + loadedimagenamesize.unwrap_or(core::mem::zeroed()) as _, ) .ok() } } pub unsafe fn GetModuleParameters(&self, count: u32, bases: Option<*const u64>, start: u32, params: *mut DEBUG_MODULE_PARAMETERS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetModuleParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(bases.unwrap_or(core::mem::zeroed())), start, core::mem::transmute(params)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleParameters)(windows_core::Interface::as_raw(self), count, bases.unwrap_or(core::mem::zeroed()) as _, start, params as _).ok() } } pub unsafe fn GetSymbolModule(&self, symbol: P0) -> windows_core::Result where @@ -45509,7 +45340,7 @@ impl IDebugSymbols5 { } } pub unsafe fn GetTypeName(&self, module: u64, typeid: u32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTypeName)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTypeName)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetTypeId(&self, module: u64, name: P1) -> windows_core::Result where @@ -45539,34 +45370,34 @@ impl IDebugSymbols5 { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolTypeId)(windows_core::Interface::as_raw(self), symbol.param().abi(), typeid as _, module.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetOffsetTypeId(&self, offset: u64, typeid: *mut u32, module: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOffsetTypeId)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(typeid), core::mem::transmute(module.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOffsetTypeId)(windows_core::Interface::as_raw(self), offset, typeid as _, module.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).WriteTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputTypedDataVirtual(&self, outputcontrol: u32, offset: u64, module: u64, typeid: u32, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputTypedDataVirtual)(windows_core::Interface::as_raw(self), outputcontrol, offset, module, typeid, flags).ok() } } pub unsafe fn ReadTypedDataPhysical(&self, offset: u64, module: u64, typeid: u32, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).WriteTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputTypedDataPhysical(&self, outputcontrol: u32, offset: u64, module: u64, typeid: u32, flags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputTypedDataPhysical)(windows_core::Interface::as_raw(self), outputcontrol, offset, module, typeid, flags).ok() } } pub unsafe fn GetScope(&self, instructionoffset: Option<*mut u64>, scopeframe: Option<*mut DEBUG_STACK_FRAME>, scopecontext: Option<*mut core::ffi::c_void>, scopecontextsize: u32) -> windows_core::Result<()> { - unsafe { (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())), scopecontextsize).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScope)(windows_core::Interface::as_raw(self), instructionoffset.unwrap_or(core::mem::zeroed()) as _, scopeframe.unwrap_or(core::mem::zeroed()) as _, scopecontext.unwrap_or(core::mem::zeroed()) as _, 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<()> { - unsafe { (windows_core::Interface::vtable(self).SetScope)(windows_core::Interface::as_raw(self), instructionoffset, core::mem::transmute(scopeframe.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopecontext.unwrap_or(core::mem::zeroed())), scopecontextsize).ok() } + unsafe { (windows_core::Interface::vtable(self).SetScope)(windows_core::Interface::as_raw(self), instructionoffset, scopeframe.unwrap_or(core::mem::zeroed()) as _, scopecontext.unwrap_or(core::mem::zeroed()) as _, scopecontextsize).ok() } } pub unsafe fn ResetScope(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ResetScope)(windows_core::Interface::as_raw(self)).ok() } @@ -45596,7 +45427,7 @@ impl IDebugSymbols5 { } } pub unsafe fn GetNextSymbolMatch(&self, handle: u64, buffer: Option<&mut [u8]>, matchsize: Option<*mut u32>, offset: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNextSymbolMatch)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(matchsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(offset.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNextSymbolMatch)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), matchsize.unwrap_or(core::mem::zeroed()) as _, offset.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn EndSymbolMatch(&self, handle: u64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).EndSymbolMatch)(windows_core::Interface::as_raw(self), handle).ok() } @@ -45608,7 +45439,7 @@ impl IDebugSymbols5 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), pathsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetSymbolPath(&self, path: P0) -> windows_core::Result<()> where @@ -45623,7 +45454,7 @@ impl IDebugSymbols5 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), pathsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetImagePath(&self, path: P0) -> windows_core::Result<()> where @@ -45638,10 +45469,10 @@ impl IDebugSymbols5 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), pathsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSourcePathElement(&self, index: u32, buffer: Option<&mut [u8]>, elementsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSourcePathElement)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(elementsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourcePathElement)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), elementsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetSourcePath(&self, path: P0) -> windows_core::Result<()> where @@ -45659,28 +45490,28 @@ impl IDebugSymbols5 { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindSourceFile)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), 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() } + unsafe { (windows_core::Interface::vtable(self).FindSourceFile)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), flags, foundelement.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), foundsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSourceFileLineOffsets(&self, file: P0, buffer: Option<&mut [u64]>, filelines: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (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()), filelines.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetModuleVersionInformation)(windows_core::Interface::as_raw(self), index, base, item.param().abi(), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(verinfosize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleVersionInformation)(windows_core::Interface::as_raw(self), index, base, item.param().abi(), buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, verinfosize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetModuleNameString(&self, which: u32, index: u32, base: u64, buffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetModuleNameString)(windows_core::Interface::as_raw(self), which, index, base, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleNameString)(windows_core::Interface::as_raw(self), which, index, base, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetConstantName(&self, module: u64, typeid: u32, value: u64, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetConstantName)(windows_core::Interface::as_raw(self), module, typeid, value, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConstantName)(windows_core::Interface::as_raw(self), module, typeid, value, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetFieldName(&self, module: u64, typeid: u32, fieldindex: u32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFieldName)(windows_core::Interface::as_raw(self), module, typeid, fieldindex, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFieldName)(windows_core::Interface::as_raw(self), module, typeid, fieldindex, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetTypeOptions(&self) -> windows_core::Result { unsafe { @@ -45698,7 +45529,7 @@ impl IDebugSymbols5 { unsafe { (windows_core::Interface::vtable(self).SetTypeOptions)(windows_core::Interface::as_raw(self), options).ok() } } pub unsafe fn GetNameByOffsetWide(&self, offset: u64, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNameByOffsetWide)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNameByOffsetWide)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetOffsetByNameWide(&self, symbol: P0) -> windows_core::Result where @@ -45710,10 +45541,10 @@ impl IDebugSymbols5 { } } pub unsafe fn GetNearNameByOffsetWide(&self, offset: u64, delta: i32, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNearNameByOffsetWide)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNearNameByOffsetWide)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetLineByOffsetWide)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).GetLineByOffsetWide)(windows_core::Interface::as_raw(self), offset, line.unwrap_or(core::mem::zeroed()) as _, 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()), filesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetOffsetByLineWide(&self, line: u32, file: P1) -> windows_core::Result where @@ -45728,7 +45559,7 @@ impl IDebugSymbols5 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetModuleByModuleNameWide)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleByModuleNameWide)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, index.unwrap_or(core::mem::zeroed()) as _, base.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSymbolModuleWide(&self, symbol: P0) -> windows_core::Result where @@ -45740,7 +45571,7 @@ impl IDebugSymbols5 { } } pub unsafe fn GetTypeNameWide(&self, module: u64, typeid: u32, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTypeNameWide)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTypeNameWide)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetTypeIdWide(&self, module: u64, name: P1) -> windows_core::Result where @@ -45764,7 +45595,7 @@ impl IDebugSymbols5 { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolTypeIdWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), typeid as _, module.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetScopeSymbolGroup2(&self, flags: u32, update: P1) -> windows_core::Result where @@ -45791,7 +45622,7 @@ impl IDebugSymbols5 { } } pub unsafe fn GetNextSymbolMatchWide(&self, handle: u64, buffer: Option<&mut [u16]>, matchsize: Option<*mut u32>, offset: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNextSymbolMatchWide)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(matchsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(offset.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNextSymbolMatchWide)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), matchsize.unwrap_or(core::mem::zeroed()) as _, offset.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReloadWide(&self, module: P0) -> windows_core::Result<()> where @@ -45800,7 +45631,7 @@ impl IDebugSymbols5 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), pathsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetSymbolPathWide(&self, path: P0) -> windows_core::Result<()> where @@ -45815,7 +45646,7 @@ impl IDebugSymbols5 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), pathsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetImagePathWide(&self, path: P0) -> windows_core::Result<()> where @@ -45830,10 +45661,10 @@ impl IDebugSymbols5 { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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()), pathsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSourcePathElementWide(&self, index: u32, buffer: Option<&mut [u16]>, elementsize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSourcePathElementWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(elementsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourcePathElementWide)(windows_core::Interface::as_raw(self), index, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), elementsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetSourcePathWide(&self, path: P0) -> windows_core::Result<()> where @@ -45851,28 +45682,28 @@ impl IDebugSymbols5 { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindSourceFileWide)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), 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() } + unsafe { (windows_core::Interface::vtable(self).FindSourceFileWide)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), flags, foundelement.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), foundsize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSourceFileLineOffsetsWide(&self, file: P0, buffer: Option<&mut [u64]>, filelines: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (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()), filelines.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetModuleVersionInformationWide)(windows_core::Interface::as_raw(self), index, base, item.param().abi(), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(verinfosize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleVersionInformationWide)(windows_core::Interface::as_raw(self), index, base, item.param().abi(), buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, verinfosize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetModuleNameStringWide(&self, which: u32, index: u32, base: u64, buffer: Option<&mut [u16]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetModuleNameStringWide)(windows_core::Interface::as_raw(self), which, index, base, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleNameStringWide)(windows_core::Interface::as_raw(self), which, index, base, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetConstantNameWide(&self, module: u64, typeid: u32, value: u64, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetConstantNameWide)(windows_core::Interface::as_raw(self), module, typeid, value, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConstantNameWide)(windows_core::Interface::as_raw(self), module, typeid, value, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetFieldNameWide(&self, module: u64, typeid: u32, fieldindex: u32, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFieldNameWide)(windows_core::Interface::as_raw(self), module, typeid, fieldindex, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFieldNameWide)(windows_core::Interface::as_raw(self), module, typeid, fieldindex, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn IsManagedModule(&self, index: u32, base: u64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).IsManagedModule)(windows_core::Interface::as_raw(self), index, base).ok() } @@ -45881,16 +45712,16 @@ impl IDebugSymbols5 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetModuleByModuleName2)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, flags, core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleByModuleName2)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, flags, index.unwrap_or(core::mem::zeroed()) as _, base.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetModuleByModuleName2Wide)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, flags, core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleByModuleName2Wide)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, flags, index.unwrap_or(core::mem::zeroed()) as _, base.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetModuleByOffset2(&self, offset: u64, startindex: u32, flags: u32, index: Option<*mut u32>, base: Option<*mut u64>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetModuleByOffset2)(windows_core::Interface::as_raw(self), offset, startindex, flags, core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleByOffset2)(windows_core::Interface::as_raw(self), offset, startindex, flags, index.unwrap_or(core::mem::zeroed()) as _, base.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn AddSyntheticModule(&self, base: u64, size: u32, imagepath: P2, modulename: P3, flags: u32) -> windows_core::Result<()> where @@ -45928,49 +45759,49 @@ impl IDebugSymbols5 { unsafe { (windows_core::Interface::vtable(self).OutputSymbolByOffset)(windows_core::Interface::as_raw(self), outputcontrol, flags, offset).ok() } } pub unsafe fn GetFunctionEntryByOffset(&self, offset: u64, flags: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, bufferneeded: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFunctionEntryByOffset)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(bufferneeded.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFunctionEntryByOffset)(windows_core::Interface::as_raw(self), offset, flags, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, bufferneeded.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetFieldTypeAndOffset)(windows_core::Interface::as_raw(self), module, containertypeid, field.param().abi(), core::mem::transmute(fieldtypeid.unwrap_or(core::mem::zeroed())), core::mem::transmute(offset.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFieldTypeAndOffset)(windows_core::Interface::as_raw(self), module, containertypeid, field.param().abi(), fieldtypeid.unwrap_or(core::mem::zeroed()) as _, offset.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetFieldTypeAndOffsetWide)(windows_core::Interface::as_raw(self), module, containertypeid, field.param().abi(), core::mem::transmute(fieldtypeid.unwrap_or(core::mem::zeroed())), core::mem::transmute(offset.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFieldTypeAndOffsetWide)(windows_core::Interface::as_raw(self), module, containertypeid, field.param().abi(), fieldtypeid.unwrap_or(core::mem::zeroed()) as _, offset.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).AddSyntheticSymbol)(windows_core::Interface::as_raw(self), offset, size, name.param().abi(), flags, core::mem::transmute(id.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).AddSyntheticSymbol)(windows_core::Interface::as_raw(self), offset, size, name.param().abi(), flags, id.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).AddSyntheticSymbolWide)(windows_core::Interface::as_raw(self), offset, size, name.param().abi(), flags, core::mem::transmute(id.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).AddSyntheticSymbolWide)(windows_core::Interface::as_raw(self), offset, size, name.param().abi(), flags, id.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn RemoveSyntheticSymbol(&self, id: *const DEBUG_MODULE_AND_ID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RemoveSyntheticSymbol)(windows_core::Interface::as_raw(self), id).ok() } } pub unsafe fn GetSymbolEntriesByOffset(&self, offset: u64, flags: u32, ids: Option<*mut DEBUG_MODULE_AND_ID>, displacements: Option<*mut u64>, idscount: u32, entries: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSymbolEntriesByOffset)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), core::mem::transmute(displacements.unwrap_or(core::mem::zeroed())), idscount, core::mem::transmute(entries.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolEntriesByOffset)(windows_core::Interface::as_raw(self), offset, flags, ids.unwrap_or(core::mem::zeroed()) as _, displacements.unwrap_or(core::mem::zeroed()) as _, idscount, entries.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetSymbolEntriesByName)(windows_core::Interface::as_raw(self), symbol.param().abi(), flags, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entries.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolEntriesByName)(windows_core::Interface::as_raw(self), symbol.param().abi(), flags, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), entries.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetSymbolEntriesByNameWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), flags, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entries.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolEntriesByNameWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), flags, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), entries.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSymbolEntryByToken(&self, modulebase: u64, token: u32) -> windows_core::Result { unsafe { @@ -45979,16 +45810,16 @@ impl IDebugSymbols5 { } } pub unsafe fn GetSymbolEntryInformation(&self, id: *const DEBUG_MODULE_AND_ID, info: *mut DEBUG_SYMBOL_ENTRY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSymbolEntryInformation)(windows_core::Interface::as_raw(self), id, core::mem::transmute(info)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolEntryInformation)(windows_core::Interface::as_raw(self), id, info as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetSymbolEntryString)(windows_core::Interface::as_raw(self), id, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolEntryString)(windows_core::Interface::as_raw(self), id, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), stringsize.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetSymbolEntryStringWide)(windows_core::Interface::as_raw(self), id, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolEntryStringWide)(windows_core::Interface::as_raw(self), id, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), stringsize.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetSymbolEntryOffsetRegions)(windows_core::Interface::as_raw(self), id, flags, core::mem::transmute(regions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(regionsavail.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSymbolEntryOffsetRegions)(windows_core::Interface::as_raw(self), id, flags, core::mem::transmute(regions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), regionsavail.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSymbolEntryBySymbolEntry(&self, fromid: *const DEBUG_MODULE_AND_ID, flags: u32) -> windows_core::Result { unsafe { @@ -45997,49 +45828,49 @@ impl IDebugSymbols5 { } } pub unsafe fn GetSourceEntriesByOffset(&self, offset: u64, flags: u32, entries: Option<&mut [DEBUG_SYMBOL_SOURCE_ENTRY]>, entriesavail: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSourceEntriesByOffset)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entriesavail.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourceEntriesByOffset)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), entriesavail.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetSourceEntriesByLine)(windows_core::Interface::as_raw(self), line, file.param().abi(), flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entriesavail.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourceEntriesByLine)(windows_core::Interface::as_raw(self), line, file.param().abi(), flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), entriesavail.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).GetSourceEntriesByLineWide)(windows_core::Interface::as_raw(self), line, file.param().abi(), flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entriesavail.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourceEntriesByLineWide)(windows_core::Interface::as_raw(self), line, file.param().abi(), flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), entriesavail.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetSourceEntryString)(windows_core::Interface::as_raw(self), entry, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourceEntryString)(windows_core::Interface::as_raw(self), entry, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), stringsize.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetSourceEntryStringWide)(windows_core::Interface::as_raw(self), entry, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourceEntryStringWide)(windows_core::Interface::as_raw(self), entry, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), stringsize.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetSourceEntryOffsetRegions)(windows_core::Interface::as_raw(self), entry, flags, core::mem::transmute(regions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(regionsavail.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourceEntryOffsetRegions)(windows_core::Interface::as_raw(self), entry, flags, core::mem::transmute(regions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), regionsavail.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetSourceEntryBySourceEntry(&self, fromentry: *const DEBUG_SYMBOL_SOURCE_ENTRY, flags: u32, toentry: *mut DEBUG_SYMBOL_SOURCE_ENTRY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSourceEntryBySourceEntry)(windows_core::Interface::as_raw(self), fromentry, flags, core::mem::transmute(toentry)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourceEntryBySourceEntry)(windows_core::Interface::as_raw(self), fromentry, flags, toentry as _).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<()> { - unsafe { (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())), scopecontextsize).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScopeEx)(windows_core::Interface::as_raw(self), instructionoffset.unwrap_or(core::mem::zeroed()) as _, scopeframe.unwrap_or(core::mem::zeroed()) as _, scopecontext.unwrap_or(core::mem::zeroed()) as _, 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<()> { - unsafe { (windows_core::Interface::vtable(self).SetScopeEx)(windows_core::Interface::as_raw(self), instructionoffset, core::mem::transmute(scopeframe.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopecontext.unwrap_or(core::mem::zeroed())), scopecontextsize).ok() } + unsafe { (windows_core::Interface::vtable(self).SetScopeEx)(windows_core::Interface::as_raw(self), instructionoffset, scopeframe.unwrap_or(core::mem::zeroed()) as _, scopecontext.unwrap_or(core::mem::zeroed()) as _, 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetNameByInlineContext)(windows_core::Interface::as_raw(self), offset, inlinecontext, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNameByInlineContext)(windows_core::Interface::as_raw(self), offset, inlinecontext, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetNameByInlineContextWide)(windows_core::Interface::as_raw(self), offset, inlinecontext, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNameByInlineContextWide)(windows_core::Interface::as_raw(self), offset, inlinecontext, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), namesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetLineByInlineContext)(windows_core::Interface::as_raw(self), offset, 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() } + unsafe { (windows_core::Interface::vtable(self).GetLineByInlineContext)(windows_core::Interface::as_raw(self), offset, inlinecontext, line.unwrap_or(core::mem::zeroed()) as _, 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()), filesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetLineByInlineContextWide)(windows_core::Interface::as_raw(self), offset, 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() } + unsafe { (windows_core::Interface::vtable(self).GetLineByInlineContextWide)(windows_core::Interface::as_raw(self), offset, inlinecontext, line.unwrap_or(core::mem::zeroed()) as _, 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()), filesize.unwrap_or(core::mem::zeroed()) as _, displacement.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OutputSymbolByInlineContext(&self, outputcontrol: u32, flags: u32, offset: u64, inlinecontext: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OutputSymbolByInlineContext)(windows_core::Interface::as_raw(self), outputcontrol, flags, offset, inlinecontext).ok() } @@ -47457,10 +47288,10 @@ impl IDebugSystemObjects { } } pub unsafe fn GetTotalNumberThreads(&self, total: *mut u32, largestprocess: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTotalNumberThreads)(windows_core::Interface::as_raw(self), core::mem::transmute(total), core::mem::transmute(largestprocess)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTotalNumberThreads)(windows_core::Interface::as_raw(self), total as _, largestprocess as _).ok() } } pub unsafe fn GetThreadIdsByIndex(&self, start: u32, count: u32, ids: Option<*mut u32>, sysids: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetThreadIdsByIndex)(windows_core::Interface::as_raw(self), start, count, core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), core::mem::transmute(sysids.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetThreadIdsByIndex)(windows_core::Interface::as_raw(self), start, count, ids.unwrap_or(core::mem::zeroed()) as _, sysids.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetThreadIdByProcessor(&self, processor: u32) -> windows_core::Result { unsafe { @@ -47523,7 +47354,7 @@ impl IDebugSystemObjects { } } pub unsafe fn GetProcessIdsByIndex(&self, start: u32, count: u32, ids: Option<*mut u32>, sysids: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProcessIdsByIndex)(windows_core::Interface::as_raw(self), start, count, core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), core::mem::transmute(sysids.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProcessIdsByIndex)(windows_core::Interface::as_raw(self), start, count, ids.unwrap_or(core::mem::zeroed()) as _, sysids.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetCurrentProcessDataOffset(&self) -> windows_core::Result { unsafe { @@ -47574,7 +47405,7 @@ impl IDebugSystemObjects { } } pub unsafe fn GetCurrentProcessExecutableName(&self, buffer: Option<&mut [u8]>, exesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), exesize.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -48033,10 +47864,10 @@ impl IDebugSystemObjects2 { } } pub unsafe fn GetTotalNumberThreads(&self, total: *mut u32, largestprocess: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTotalNumberThreads)(windows_core::Interface::as_raw(self), core::mem::transmute(total), core::mem::transmute(largestprocess)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTotalNumberThreads)(windows_core::Interface::as_raw(self), total as _, largestprocess as _).ok() } } pub unsafe fn GetThreadIdsByIndex(&self, start: u32, count: u32, ids: Option<*mut u32>, sysids: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetThreadIdsByIndex)(windows_core::Interface::as_raw(self), start, count, core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), core::mem::transmute(sysids.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetThreadIdsByIndex)(windows_core::Interface::as_raw(self), start, count, ids.unwrap_or(core::mem::zeroed()) as _, sysids.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetThreadIdByProcessor(&self, processor: u32) -> windows_core::Result { unsafe { @@ -48099,7 +47930,7 @@ impl IDebugSystemObjects2 { } } pub unsafe fn GetProcessIdsByIndex(&self, start: u32, count: u32, ids: Option<*mut u32>, sysids: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProcessIdsByIndex)(windows_core::Interface::as_raw(self), start, count, core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), core::mem::transmute(sysids.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProcessIdsByIndex)(windows_core::Interface::as_raw(self), start, count, ids.unwrap_or(core::mem::zeroed()) as _, sysids.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetCurrentProcessDataOffset(&self) -> windows_core::Result { unsafe { @@ -48150,7 +47981,7 @@ impl IDebugSystemObjects2 { } } pub unsafe fn GetCurrentProcessExecutableName(&self, buffer: Option<&mut [u8]>, exesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), exesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetCurrentProcessUpTime(&self) -> windows_core::Result { unsafe { @@ -48696,10 +48527,10 @@ impl IDebugSystemObjects3 { } } pub unsafe fn GetTotalNumberThreads(&self, total: *mut u32, largestprocess: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTotalNumberThreads)(windows_core::Interface::as_raw(self), core::mem::transmute(total), core::mem::transmute(largestprocess)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTotalNumberThreads)(windows_core::Interface::as_raw(self), total as _, largestprocess as _).ok() } } pub unsafe fn GetThreadIdsByIndex(&self, start: u32, count: u32, ids: Option<*mut u32>, sysids: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetThreadIdsByIndex)(windows_core::Interface::as_raw(self), start, count, core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), core::mem::transmute(sysids.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetThreadIdsByIndex)(windows_core::Interface::as_raw(self), start, count, ids.unwrap_or(core::mem::zeroed()) as _, sysids.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetThreadIdByProcessor(&self, processor: u32) -> windows_core::Result { unsafe { @@ -48762,7 +48593,7 @@ impl IDebugSystemObjects3 { } } pub unsafe fn GetProcessIdsByIndex(&self, start: u32, count: u32, ids: Option<*mut u32>, sysids: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProcessIdsByIndex)(windows_core::Interface::as_raw(self), start, count, core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), core::mem::transmute(sysids.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProcessIdsByIndex)(windows_core::Interface::as_raw(self), start, count, ids.unwrap_or(core::mem::zeroed()) as _, sysids.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetCurrentProcessDataOffset(&self) -> windows_core::Result { unsafe { @@ -48813,7 +48644,7 @@ impl IDebugSystemObjects3 { } } pub unsafe fn GetCurrentProcessExecutableName(&self, buffer: Option<&mut [u8]>, exesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), exesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetCurrentProcessUpTime(&self) -> windows_core::Result { unsafe { @@ -48864,7 +48695,7 @@ impl IDebugSystemObjects3 { unsafe { (windows_core::Interface::vtable(self).GetSystemIdsByIndex)(windows_core::Interface::as_raw(self), start, ids.len().try_into().unwrap(), core::mem::transmute(ids.as_ptr())).ok() } } pub unsafe fn GetTotalNumberThreadsAndProcesses(&self, totalthreads: *mut u32, totalprocesses: *mut u32, largestprocessthreads: *mut u32, largestsystemthreads: *mut u32, largestsystemprocesses: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTotalNumberThreadsAndProcesses)(windows_core::Interface::as_raw(self), core::mem::transmute(totalthreads), core::mem::transmute(totalprocesses), core::mem::transmute(largestprocessthreads), core::mem::transmute(largestsystemthreads), core::mem::transmute(largestsystemprocesses)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTotalNumberThreadsAndProcesses)(windows_core::Interface::as_raw(self), totalthreads as _, totalprocesses as _, largestprocessthreads as _, largestsystemthreads as _, largestsystemprocesses as _).ok() } } pub unsafe fn GetCurrentSystemServer(&self) -> windows_core::Result { unsafe { @@ -48879,7 +48710,7 @@ impl IDebugSystemObjects3 { } } pub unsafe fn GetCurrentSystemServerName(&self, buffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -49512,10 +49343,10 @@ impl IDebugSystemObjects4 { } } pub unsafe fn GetTotalNumberThreads(&self, total: *mut u32, largestprocess: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTotalNumberThreads)(windows_core::Interface::as_raw(self), core::mem::transmute(total), core::mem::transmute(largestprocess)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTotalNumberThreads)(windows_core::Interface::as_raw(self), total as _, largestprocess as _).ok() } } pub unsafe fn GetThreadIdsByIndex(&self, start: u32, count: u32, ids: Option<*mut u32>, sysids: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetThreadIdsByIndex)(windows_core::Interface::as_raw(self), start, count, core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), core::mem::transmute(sysids.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetThreadIdsByIndex)(windows_core::Interface::as_raw(self), start, count, ids.unwrap_or(core::mem::zeroed()) as _, sysids.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetThreadIdByProcessor(&self, processor: u32) -> windows_core::Result { unsafe { @@ -49578,7 +49409,7 @@ impl IDebugSystemObjects4 { } } pub unsafe fn GetProcessIdsByIndex(&self, start: u32, count: u32, ids: Option<*mut u32>, sysids: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProcessIdsByIndex)(windows_core::Interface::as_raw(self), start, count, core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), core::mem::transmute(sysids.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProcessIdsByIndex)(windows_core::Interface::as_raw(self), start, count, ids.unwrap_or(core::mem::zeroed()) as _, sysids.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetCurrentProcessDataOffset(&self) -> windows_core::Result { unsafe { @@ -49629,7 +49460,7 @@ impl IDebugSystemObjects4 { } } pub unsafe fn GetCurrentProcessExecutableName(&self, buffer: Option<&mut [u8]>, exesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), exesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetCurrentProcessUpTime(&self) -> windows_core::Result { unsafe { @@ -49680,7 +49511,7 @@ impl IDebugSystemObjects4 { unsafe { (windows_core::Interface::vtable(self).GetSystemIdsByIndex)(windows_core::Interface::as_raw(self), start, ids.len().try_into().unwrap(), core::mem::transmute(ids.as_ptr())).ok() } } pub unsafe fn GetTotalNumberThreadsAndProcesses(&self, totalthreads: *mut u32, totalprocesses: *mut u32, largestprocessthreads: *mut u32, largestsystemthreads: *mut u32, largestsystemprocesses: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTotalNumberThreadsAndProcesses)(windows_core::Interface::as_raw(self), core::mem::transmute(totalthreads), core::mem::transmute(totalprocesses), core::mem::transmute(largestprocessthreads), core::mem::transmute(largestsystemthreads), core::mem::transmute(largestsystemprocesses)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTotalNumberThreadsAndProcesses)(windows_core::Interface::as_raw(self), totalthreads as _, totalprocesses as _, largestprocessthreads as _, largestsystemthreads as _, largestsystemprocesses as _).ok() } } pub unsafe fn GetCurrentSystemServer(&self) -> windows_core::Result { unsafe { @@ -49695,13 +49526,13 @@ impl IDebugSystemObjects4 { } } pub unsafe fn GetCurrentSystemServerName(&self, buffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetCurrentProcessExecutableNameWide(&self, buffer: Option<&mut [u16]>, exesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), exesize.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetCurrentSystemServerNameWide(&self, buffer: Option<&mut [u16]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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()), namesize.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -50319,7 +50150,7 @@ impl IDynamicConceptProviderConcept { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetConcept)(windows_core::Interface::as_raw(self), contextobject.param().abi(), conceptid, core::mem::transmute(conceptinterface), core::mem::transmute(conceptmetadata.unwrap_or(core::mem::zeroed())), core::mem::transmute(hasconcept)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConcept)(windows_core::Interface::as_raw(self), contextobject.param().abi(), conceptid, core::mem::transmute(conceptinterface), conceptmetadata.unwrap_or(core::mem::zeroed()) as _, hasconcept as _).ok() } } pub unsafe fn SetConcept(&self, contextobject: P0, conceptid: *const windows_core::GUID, conceptinterface: P2, conceptmetadata: P3) -> windows_core::Result<()> where @@ -50415,7 +50246,7 @@ impl IDynamicKeyProviderConcept { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetKey)(windows_core::Interface::as_raw(self), contextobject.param().abi(), key.param().abi(), keyvalue.unwrap_or(core::mem::zeroed()) as _, metadata.unwrap_or(core::mem::zeroed()) as _, haskey.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetKey(&self, contextobject: P0, key: P1, keyvalue: P2, metadata: P3) -> windows_core::Result<()> where @@ -50625,7 +50456,7 @@ impl IIndexableConcept { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (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), metadata.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetAt(&self, contextobject: P0, indexers: &[Option], value: P3) -> windows_core::Result<()> where @@ -50761,7 +50592,7 @@ impl IKeyEnumerator { unsafe { (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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetNext)(windows_core::Interface::as_raw(self), core::mem::transmute(key), value.unwrap_or(core::mem::zeroed()) as _, metadata.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -50802,7 +50633,7 @@ impl IKeyStore { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetKey)(windows_core::Interface::as_raw(self), key.param().abi(), object.unwrap_or(core::mem::zeroed()) as _, metadata.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetKey(&self, key: P0, object: P1, metadata: P2) -> windows_core::Result<()> where @@ -50816,7 +50647,7 @@ impl IKeyStore { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetKeyValue)(windows_core::Interface::as_raw(self), key.param().abi(), object.unwrap_or(core::mem::zeroed()) as _, metadata.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetKeyValue(&self, key: P0, object: P1) -> windows_core::Result<()> where @@ -50898,7 +50729,7 @@ impl IModelIterator { unsafe { (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<()> { - unsafe { (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() } + unsafe { (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())), metadata.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -50954,10 +50785,10 @@ impl IModelKeyReference { } } pub unsafe fn GetKey(&self, object: Option<*mut Option>, metadata: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetKey)(windows_core::Interface::as_raw(self), object.unwrap_or(core::mem::zeroed()) as _, metadata.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetKeyValue(&self, object: Option<*mut Option>, metadata: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetKeyValue)(windows_core::Interface::as_raw(self), object.unwrap_or(core::mem::zeroed()) as _, metadata.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetKey(&self, object: P0, metadata: P1) -> windows_core::Result<()> where @@ -51117,7 +50948,7 @@ impl IModelMethod { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (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), ppmetadata.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -51176,7 +51007,7 @@ impl IModelObject { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetKeyValue)(windows_core::Interface::as_raw(self), key.param().abi(), object.unwrap_or(core::mem::zeroed()) as _, metadata.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetKeyValue(&self, key: P0, object: P1) -> windows_core::Result<()> where @@ -51219,7 +51050,7 @@ impl IModelObject { } } pub unsafe fn GetConcept(&self, conceptid: *const windows_core::GUID, conceptinterface: *mut Option, conceptmetadata: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetConcept)(windows_core::Interface::as_raw(self), conceptid, core::mem::transmute(conceptinterface), core::mem::transmute(conceptmetadata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConcept)(windows_core::Interface::as_raw(self), conceptid, core::mem::transmute(conceptinterface), conceptmetadata.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetLocation(&self) -> windows_core::Result { unsafe { @@ -51234,7 +51065,7 @@ impl IModelObject { } } pub unsafe fn GetTargetInfo(&self, location: *mut Location, r#type: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTargetInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(location), core::mem::transmute(r#type)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTargetInfo)(windows_core::Interface::as_raw(self), location as _, core::mem::transmute(r#type)).ok() } } pub unsafe fn GetNumberOfParentModels(&self) -> windows_core::Result { unsafe { @@ -51262,13 +51093,13 @@ impl IModelObject { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetKey)(windows_core::Interface::as_raw(self), key.param().abi(), object.unwrap_or(core::mem::zeroed()) as _, metadata.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetKeyReference(&self, key: P0, objectreference: Option<*mut Option>, metadata: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetKeyReference)(windows_core::Interface::as_raw(self), key.param().abi(), objectreference.unwrap_or(core::mem::zeroed()) as _, metadata.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetKey(&self, key: P0, object: P1, metadata: P2) -> windows_core::Result<()> where @@ -51338,7 +51169,7 @@ impl IModelObject { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Compare)(windows_core::Interface::as_raw(self), other.param().abi(), ppresult.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn IsEqualTo(&self, other: P0) -> windows_core::Result where @@ -51995,7 +51826,7 @@ impl IRawEnumerator { unsafe { (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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetNext)(windows_core::Interface::as_raw(self), name.unwrap_or(core::mem::zeroed()) as _, kind.unwrap_or(core::mem::zeroed()) as _, value.unwrap_or(core::mem::zeroed()) as _).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 402d8cb1bc..d54307d017 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 @@ -37,26 +37,26 @@ where 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); - unsafe { BindImageEx(flags, imagename.param().abi(), dllpath.param().abi(), symbolpath.param().abi(), core::mem::transmute(statusroutine.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { BindImageEx(flags, imagename.param().abi(), dllpath.param().abi(), symbolpath.param().abi(), statusroutine.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { CheckRemoteDebuggerPresent(hprocess, core::mem::transmute(pbdebuggerpresent)).ok() } + unsafe { CheckRemoteDebuggerPresent(hprocess, pbdebuggerpresent as _).ok() } } #[cfg(target_arch = "x86")] #[cfg(feature = "Win32_System_SystemInformation")] #[inline] pub unsafe fn CheckSumMappedFile(baseaddress: *const core::ffi::c_void, filelength: u32, headersum: *mut u32, checksum: *mut u32) -> *mut IMAGE_NT_HEADERS32 { windows_targets::link!("imagehlp.dll" "system" fn CheckSumMappedFile(baseaddress : *const core::ffi::c_void, filelength : u32, headersum : *mut u32, checksum : *mut u32) -> *mut IMAGE_NT_HEADERS32); - unsafe { CheckSumMappedFile(baseaddress, filelength, core::mem::transmute(headersum), core::mem::transmute(checksum)) } + unsafe { CheckSumMappedFile(baseaddress, filelength, headersum as _, checksum as _) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[cfg(feature = "Win32_System_SystemInformation")] #[inline] pub unsafe fn CheckSumMappedFile(baseaddress: *const core::ffi::c_void, filelength: u32, headersum: *mut u32, checksum: *mut u32) -> *mut IMAGE_NT_HEADERS64 { windows_targets::link!("imagehlp.dll" "system" fn CheckSumMappedFile(baseaddress : *const core::ffi::c_void, filelength : u32, headersum : *mut u32, checksum : *mut u32) -> *mut IMAGE_NT_HEADERS64); - unsafe { CheckSumMappedFile(baseaddress, filelength, core::mem::transmute(headersum), core::mem::transmute(checksum)) } + unsafe { CheckSumMappedFile(baseaddress, filelength, headersum as _, checksum as _) } } #[inline] pub unsafe fn CloseThreadWaitChainSession(wcthandle: *const core::ffi::c_void) { @@ -72,7 +72,7 @@ pub unsafe fn ContinueDebugEvent(dwprocessid: u32, dwthreadid: u32, dwcontinuest #[inline] pub unsafe fn CopyContext(destination: *mut CONTEXT, contextflags: CONTEXT_FLAGS, source: *const CONTEXT) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn CopyContext(destination : *mut CONTEXT, contextflags : CONTEXT_FLAGS, source : *const CONTEXT) -> super::super::super::Foundation:: BOOL); - unsafe { CopyContext(core::mem::transmute(destination), contextflags, source).ok() } + unsafe { CopyContext(destination as _, contextflags, source).ok() } } #[inline] pub unsafe fn DbgHelpCreateUserDump(filename: P0, callback: PDBGHELP_CREATE_USER_DUMP_CALLBACK, userdata: Option<*const core::ffi::c_void>) -> super::super::super::Foundation::BOOL @@ -80,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); - unsafe { DbgHelpCreateUserDump(filename.param().abi(), callback, core::mem::transmute(userdata.unwrap_or(core::mem::zeroed()))) } + unsafe { DbgHelpCreateUserDump(filename.param().abi(), callback, userdata.unwrap_or(core::mem::zeroed()) as _) } } #[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 @@ -88,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); - unsafe { DbgHelpCreateUserDumpW(filename.param().abi(), callback, core::mem::transmute(userdata.unwrap_or(core::mem::zeroed()))) } + unsafe { DbgHelpCreateUserDumpW(filename.param().abi(), callback, userdata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn DebugActiveProcess(dwprocessid: u32) -> windows_core::Result<()> { @@ -118,32 +118,32 @@ pub unsafe fn DebugSetProcessKillOnExit(killonexit: bool) -> windows_core::Resul #[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); - unsafe { DecodePointer(core::mem::transmute(ptr.unwrap_or(core::mem::zeroed()))) } + unsafe { DecodePointer(ptr.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { DecodeRemotePointer(processhandle, core::mem::transmute(ptr.unwrap_or(core::mem::zeroed())), core::mem::transmute(decodedptr)).ok() } + unsafe { DecodeRemotePointer(processhandle, ptr.unwrap_or(core::mem::zeroed()) as _, decodedptr as _).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); - unsafe { DecodeSystemPointer(core::mem::transmute(ptr.unwrap_or(core::mem::zeroed()))) } + unsafe { DecodeSystemPointer(ptr.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { EncodePointer(core::mem::transmute(ptr.unwrap_or(core::mem::zeroed()))) } + unsafe { EncodePointer(ptr.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { EncodeRemotePointer(processhandle, core::mem::transmute(ptr.unwrap_or(core::mem::zeroed())), core::mem::transmute(encodedptr)).ok() } + unsafe { EncodeRemotePointer(processhandle, ptr.unwrap_or(core::mem::zeroed()) as _, encodedptr as _).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); - unsafe { EncodeSystemPointer(core::mem::transmute(ptr.unwrap_or(core::mem::zeroed()))) } + unsafe { EncodeSystemPointer(ptr.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn EnumDirTree(hprocess: Option, rootpath: P1, inputpathname: P2, outputpathbuffer: Option, cb: Option, data: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -152,7 +152,7 @@ where P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn EnumDirTree(hprocess : super::super::super::Foundation:: HANDLE, rootpath : windows_core::PCSTR, inputpathname : windows_core::PCSTR, outputpathbuffer : windows_core::PSTR, cb : PENUMDIRTREE_CALLBACK, data : *const core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - unsafe { 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() } + unsafe { EnumDirTree(hprocess.unwrap_or(core::mem::zeroed()) as _, rootpath.param().abi(), inputpathname.param().abi(), outputpathbuffer.unwrap_or(core::mem::zeroed()) as _, cb.unwrap_or(core::mem::zeroed()) as _, data.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn EnumDirTreeW(hprocess: Option, rootpath: P1, inputpathname: P2, outputpathbuffer: Option, cb: Option, data: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -161,33 +161,33 @@ where P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn EnumDirTreeW(hprocess : super::super::super::Foundation:: HANDLE, rootpath : windows_core::PCWSTR, inputpathname : windows_core::PCWSTR, outputpathbuffer : windows_core::PWSTR, cb : PENUMDIRTREE_CALLBACKW, data : *const core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - unsafe { 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() } + unsafe { EnumDirTreeW(hprocess.unwrap_or(core::mem::zeroed()) as _, rootpath.param().abi(), inputpathname.param().abi(), outputpathbuffer.unwrap_or(core::mem::zeroed()) as _, cb.unwrap_or(core::mem::zeroed()) as _, data.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(target_arch = "x86")] #[inline] 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); - unsafe { EnumerateLoadedModules(hprocess, enumloadedmodulescallback, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { EnumerateLoadedModules(hprocess, enumloadedmodulescallback, usercontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { EnumerateLoadedModules64(hprocess, enumloadedmodulescallback, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { EnumerateLoadedModules64(hprocess, enumloadedmodulescallback, usercontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { EnumerateLoadedModulesEx(hprocess, enumloadedmodulescallback, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { EnumerateLoadedModulesEx(hprocess, enumloadedmodulescallback, usercontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { EnumerateLoadedModulesExW(hprocess, enumloadedmodulescallback, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { EnumerateLoadedModulesExW(hprocess, enumloadedmodulescallback, usercontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { EnumerateLoadedModulesW64(hprocess, enumloadedmodulescallback, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { EnumerateLoadedModulesW64(hprocess, enumloadedmodulescallback, usercontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn FatalAppExitA(uaction: u32, lpmessagetext: P1) @@ -227,7 +227,7 @@ where P1: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn FindDebugInfoFileEx(filename : windows_core::PCSTR, symbolpath : windows_core::PCSTR, debugfilepath : windows_core::PSTR, callback : PFIND_DEBUG_FILE_CALLBACK, callerdata : *const core::ffi::c_void) -> super::super::super::Foundation:: HANDLE); - let result__ = unsafe { 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()))) }; + let result__ = unsafe { FindDebugInfoFileEx(filename.param().abi(), symbolpath.param().abi(), core::mem::transmute(debugfilepath), callback.unwrap_or(core::mem::zeroed()) as _, callerdata.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -237,7 +237,7 @@ where P1: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn FindDebugInfoFileExW(filename : windows_core::PCWSTR, symbolpath : windows_core::PCWSTR, debugfilepath : windows_core::PWSTR, callback : PFIND_DEBUG_FILE_CALLBACKW, callerdata : *const core::ffi::c_void) -> super::super::super::Foundation:: HANDLE); - let result__ = unsafe { 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()))) }; + let result__ = unsafe { FindDebugInfoFileExW(filename.param().abi(), symbolpath.param().abi(), core::mem::transmute(debugfilepath), callback.unwrap_or(core::mem::zeroed()) as _, callerdata.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -257,7 +257,7 @@ where P1: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn FindExecutableImageEx(filename : windows_core::PCSTR, symbolpath : windows_core::PCSTR, imagefilepath : windows_core::PSTR, callback : PFIND_EXE_FILE_CALLBACK, callerdata : *const core::ffi::c_void) -> super::super::super::Foundation:: HANDLE); - let result__ = unsafe { 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()))) }; + let result__ = unsafe { FindExecutableImageEx(filename.param().abi(), symbolpath.param().abi(), core::mem::transmute(imagefilepath), callback.unwrap_or(core::mem::zeroed()) as _, callerdata.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -267,7 +267,7 @@ where 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__ = unsafe { FindExecutableImageExW(filename.param().abi(), symbolpath.param().abi(), core::mem::transmute(imagefilepath), core::mem::transmute(callback.unwrap_or(core::mem::zeroed())), callerdata) }; + let result__ = unsafe { FindExecutableImageExW(filename.param().abi(), symbolpath.param().abi(), core::mem::transmute(imagefilepath), callback.unwrap_or(core::mem::zeroed()) as _, callerdata) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -291,17 +291,17 @@ where #[inline] 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); - unsafe { FlushInstructionCache(hprocess, core::mem::transmute(lpbaseaddress.unwrap_or(core::mem::zeroed())), dwsize).ok() } + unsafe { FlushInstructionCache(hprocess, lpbaseaddress.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { FormatMessageA(dwflags, core::mem::transmute(lpsource.unwrap_or(core::mem::zeroed())), dwmessageid, dwlanguageid, core::mem::transmute(lpbuffer), nsize, core::mem::transmute(arguments.unwrap_or(core::mem::zeroed()))) } + unsafe { FormatMessageA(dwflags, lpsource.unwrap_or(core::mem::zeroed()) as _, dwmessageid, dwlanguageid, core::mem::transmute(lpbuffer), nsize, arguments.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { FormatMessageW(dwflags, core::mem::transmute(lpsource.unwrap_or(core::mem::zeroed())), dwmessageid, dwlanguageid, core::mem::transmute(lpbuffer), nsize, core::mem::transmute(arguments.unwrap_or(core::mem::zeroed()))) } + unsafe { FormatMessageW(dwflags, lpsource.unwrap_or(core::mem::zeroed()) as _, dwmessageid, dwlanguageid, core::mem::transmute(lpbuffer), nsize, arguments.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(any(target_arch = "arm64ec", target_arch = "x86", target_arch = "x86_64"))] #[inline] @@ -319,20 +319,20 @@ pub unsafe fn GetErrorMode() -> u32 { #[inline] pub unsafe fn GetImageConfigInformation(loadedimage: *const LOADED_IMAGE, imageconfiginformation: *mut IMAGE_LOAD_CONFIG_DIRECTORY32) -> windows_core::Result<()> { windows_targets::link!("imagehlp.dll" "system" fn GetImageConfigInformation(loadedimage : *const LOADED_IMAGE, imageconfiginformation : *mut IMAGE_LOAD_CONFIG_DIRECTORY32) -> super::super::super::Foundation:: BOOL); - unsafe { GetImageConfigInformation(loadedimage, core::mem::transmute(imageconfiginformation)).ok() } + unsafe { GetImageConfigInformation(loadedimage, imageconfiginformation as _).ok() } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[cfg(all(feature = "Win32_System_Kernel", feature = "Win32_System_SystemInformation"))] #[inline] pub unsafe fn GetImageConfigInformation(loadedimage: *const LOADED_IMAGE, imageconfiginformation: *mut IMAGE_LOAD_CONFIG_DIRECTORY64) -> windows_core::Result<()> { windows_targets::link!("imagehlp.dll" "system" fn GetImageConfigInformation(loadedimage : *const LOADED_IMAGE, imageconfiginformation : *mut IMAGE_LOAD_CONFIG_DIRECTORY64) -> super::super::super::Foundation:: BOOL); - unsafe { GetImageConfigInformation(loadedimage, core::mem::transmute(imageconfiginformation)).ok() } + unsafe { GetImageConfigInformation(loadedimage, imageconfiginformation as _).ok() } } #[cfg(all(feature = "Win32_System_Kernel", feature = "Win32_System_SystemInformation"))] #[inline] pub unsafe fn GetImageUnusedHeaderBytes(loadedimage: *const LOADED_IMAGE, sizeunusedheaderbytes: *mut u32) -> u32 { windows_targets::link!("imagehlp.dll" "system" fn GetImageUnusedHeaderBytes(loadedimage : *const LOADED_IMAGE, sizeunusedheaderbytes : *mut u32) -> u32); - unsafe { GetImageUnusedHeaderBytes(loadedimage, core::mem::transmute(sizeunusedheaderbytes)) } + unsafe { GetImageUnusedHeaderBytes(loadedimage, sizeunusedheaderbytes as _) } } #[inline] pub unsafe fn GetSymLoadError() -> u32 { @@ -343,7 +343,7 @@ pub unsafe fn GetSymLoadError() -> u32 { #[inline] 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); - unsafe { GetThreadContext(hthread, core::mem::transmute(lpcontext)).ok() } + unsafe { GetThreadContext(hthread, lpcontext as _).ok() } } #[inline] pub unsafe fn GetThreadErrorMode() -> u32 { @@ -353,12 +353,12 @@ pub unsafe fn GetThreadErrorMode() -> u32 { #[inline] 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); - unsafe { GetThreadSelectorEntry(hthread, dwselector, core::mem::transmute(lpselectorentry)).ok() } + unsafe { GetThreadSelectorEntry(hthread, dwselector, lpselectorentry as _).ok() } } #[inline] 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); - unsafe { GetThreadWaitChain(wcthandle, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), flags, threadid, core::mem::transmute(nodecount), core::mem::transmute(nodeinfoarray), core::mem::transmute(iscycle)).ok() } + unsafe { GetThreadWaitChain(wcthandle, context.unwrap_or(core::mem::zeroed()) as _, flags, threadid, nodecount as _, nodeinfoarray as _, iscycle as _).ok() } } #[inline] pub unsafe fn GetTimestampForLoadedLibrary(module: super::super::super::Foundation::HMODULE) -> u32 { @@ -370,40 +370,40 @@ pub unsafe fn GetTimestampForLoadedLibrary(module: super::super::super::Foundati #[inline] pub unsafe fn GetXStateFeaturesMask(context: *const CONTEXT, featuremask: *mut u64) -> super::super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn GetXStateFeaturesMask(context : *const CONTEXT, featuremask : *mut u64) -> super::super::super::Foundation:: BOOL); - unsafe { GetXStateFeaturesMask(context, core::mem::transmute(featuremask)) } + unsafe { GetXStateFeaturesMask(context, featuremask as _) } } #[cfg(feature = "Win32_Security_WinTrust")] #[inline] 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); - unsafe { ImageAddCertificate(filehandle, certificate, core::mem::transmute(index)).ok() } + unsafe { ImageAddCertificate(filehandle, certificate, index as _).ok() } } #[inline] pub unsafe fn ImageDirectoryEntryToData(base: *const core::ffi::c_void, mappedasimage: bool, directoryentry: IMAGE_DIRECTORY_ENTRY, size: *mut u32) -> *mut core::ffi::c_void { windows_targets::link!("dbghelp.dll" "system" fn ImageDirectoryEntryToData(base : *const core::ffi::c_void, mappedasimage : bool, directoryentry : IMAGE_DIRECTORY_ENTRY, size : *mut u32) -> *mut core::ffi::c_void); - unsafe { ImageDirectoryEntryToData(base, mappedasimage, directoryentry, core::mem::transmute(size)) } + unsafe { ImageDirectoryEntryToData(base, mappedasimage, directoryentry, size as _) } } #[inline] pub unsafe fn ImageDirectoryEntryToDataEx(base: *const core::ffi::c_void, mappedasimage: bool, directoryentry: IMAGE_DIRECTORY_ENTRY, size: *mut u32, foundheader: Option<*mut *mut IMAGE_SECTION_HEADER>) -> *mut core::ffi::c_void { windows_targets::link!("dbghelp.dll" "system" fn ImageDirectoryEntryToDataEx(base : *const core::ffi::c_void, mappedasimage : bool, directoryentry : IMAGE_DIRECTORY_ENTRY, size : *mut u32, foundheader : *mut *mut IMAGE_SECTION_HEADER) -> *mut core::ffi::c_void); - unsafe { ImageDirectoryEntryToDataEx(base, mappedasimage, directoryentry, core::mem::transmute(size), core::mem::transmute(foundheader.unwrap_or(core::mem::zeroed()))) } + unsafe { ImageDirectoryEntryToDataEx(base, mappedasimage, directoryentry, size as _, foundheader.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { ImageEnumerateCertificates(filehandle, 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() } + unsafe { ImageEnumerateCertificates(filehandle, typefilter, certificatecount as _, 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: 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); - unsafe { ImageGetCertificateData(filehandle, certificateindex, core::mem::transmute(certificate), core::mem::transmute(requiredlength)).ok() } + unsafe { ImageGetCertificateData(filehandle, certificateindex, certificate as _, requiredlength as _).ok() } } #[cfg(feature = "Win32_Security_WinTrust")] #[inline] 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); - unsafe { ImageGetCertificateHeader(filehandle, certificateindex, core::mem::transmute(certificateheader)).ok() } + unsafe { ImageGetCertificateHeader(filehandle, certificateindex, certificateheader as _).ok() } } #[inline] pub unsafe fn ImageGetDigestStream(filehandle: super::super::super::Foundation::HANDLE, digestlevel: u32, digestfunction: DIGEST_FUNCTION, digesthandle: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -458,20 +458,20 @@ 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); - unsafe { ImageRvaToVa(ntheaders, base, rva, core::mem::transmute(lastrvasection.unwrap_or(core::mem::zeroed()))) } + unsafe { ImageRvaToVa(ntheaders, base, rva, lastrvasection.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { ImageRvaToVa(ntheaders, base, rva, core::mem::transmute(lastrvasection.unwrap_or(core::mem::zeroed()))) } + unsafe { ImageRvaToVa(ntheaders, base, rva, lastrvasection.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Win32_System_Kernel", feature = "Win32_System_SystemInformation"))] #[inline] pub unsafe fn ImageUnload(loadedimage: *mut LOADED_IMAGE) -> windows_core::Result<()> { windows_targets::link!("imagehlp.dll" "system" fn ImageUnload(loadedimage : *mut LOADED_IMAGE) -> super::super::super::Foundation:: BOOL); - unsafe { ImageUnload(core::mem::transmute(loadedimage)).ok() } + unsafe { ImageUnload(loadedimage as _).ok() } } #[inline] pub unsafe fn ImagehlpApiVersion() -> *mut API_VERSION { @@ -487,13 +487,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); - unsafe { InitializeContext(core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), contextflags, core::mem::transmute(context), core::mem::transmute(contextlength)).ok() } + unsafe { InitializeContext(buffer.unwrap_or(core::mem::zeroed()) as _, contextflags, context as _, contextlength as _).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); - unsafe { InitializeContext2(core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), contextflags, core::mem::transmute(context), core::mem::transmute(contextlength), xstatecompactionmask).ok() } + unsafe { InitializeContext2(buffer.unwrap_or(core::mem::zeroed()) as _, contextflags, context as _, contextlength as _, xstatecompactionmask).ok() } } #[inline] pub unsafe fn IsDebuggerPresent() -> super::super::super::Foundation::BOOL { @@ -505,7 +505,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); - unsafe { LocateXStateFeature(context, featureid, core::mem::transmute(length.unwrap_or(core::mem::zeroed()))) } + unsafe { LocateXStateFeature(context, featureid, length.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MakeSureDirectoryPathExists(dirpath: P0) -> windows_core::Result<()> @@ -523,7 +523,7 @@ where P1: windows_core::Param, { windows_targets::link!("imagehlp.dll" "system" fn MapAndLoad(imagename : windows_core::PCSTR, dllpath : windows_core::PCSTR, loadedimage : *mut LOADED_IMAGE, dotdll : super::super::super::Foundation:: BOOL, readonly : super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - unsafe { MapAndLoad(imagename.param().abi(), dllpath.param().abi(), core::mem::transmute(loadedimage), dotdll.into(), readonly.into()).ok() } + unsafe { MapAndLoad(imagename.param().abi(), dllpath.param().abi(), loadedimage as _, dotdll.into(), readonly.into()).ok() } } #[inline] pub unsafe fn MapFileAndCheckSumA(filename: P0, headersum: *mut u32, checksum: *mut u32) -> u32 @@ -531,7 +531,7 @@ where P0: windows_core::Param, { windows_targets::link!("imagehlp.dll" "system" fn MapFileAndCheckSumA(filename : windows_core::PCSTR, headersum : *mut u32, checksum : *mut u32) -> u32); - unsafe { MapFileAndCheckSumA(filename.param().abi(), core::mem::transmute(headersum), core::mem::transmute(checksum)) } + unsafe { MapFileAndCheckSumA(filename.param().abi(), headersum as _, checksum as _) } } #[inline] pub unsafe fn MapFileAndCheckSumW(filename: P0, headersum: *mut u32, checksum: *mut u32) -> u32 @@ -539,7 +539,7 @@ where P0: windows_core::Param, { windows_targets::link!("imagehlp.dll" "system" fn MapFileAndCheckSumW(filename : windows_core::PCWSTR, headersum : *mut u32, checksum : *mut u32) -> u32); - unsafe { MapFileAndCheckSumW(filename.param().abi(), core::mem::transmute(headersum), core::mem::transmute(checksum)) } + unsafe { MapFileAndCheckSumW(filename.param().abi(), headersum as _, checksum as _) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -550,18 +550,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); - unsafe { MiniDumpReadDumpStream(baseofdump, streamnumber, core::mem::transmute(dir), core::mem::transmute(streampointer), core::mem::transmute(streamsize.unwrap_or(core::mem::zeroed()))) } + unsafe { MiniDumpReadDumpStream(baseofdump, streamnumber, dir as _, streampointer as _, streamsize.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Win32_Storage_FileSystem", feature = "Win32_System_Kernel", feature = "Win32_System_Memory"))] #[inline] 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); - unsafe { MiniDumpWriteDump(hprocess, processid, hfile, 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() } + unsafe { MiniDumpWriteDump(hprocess, processid, hfile, dumptype, exceptionparam.unwrap_or(core::mem::zeroed()) as _, userstreamparam.unwrap_or(core::mem::zeroed()) as _, callbackparam.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { OpenThreadWaitChainSession(flags, core::mem::transmute(callback.unwrap_or(core::mem::zeroed()))) } + unsafe { OpenThreadWaitChainSession(flags, callback.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn OutputDebugStringA(lpoutputstring: P0) @@ -588,7 +588,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)); - unsafe { RaiseFailFastException(core::mem::transmute(pexceptionrecord.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcontextrecord.unwrap_or(core::mem::zeroed())), dwflags) } + unsafe { RaiseFailFastException(pexceptionrecord.unwrap_or(core::mem::zeroed()) as _, pcontextrecord.unwrap_or(core::mem::zeroed()) as _, 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 @@ -606,12 +606,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)); - unsafe { RangeMapFree(core::mem::transmute(rmaphandle.unwrap_or(core::mem::zeroed()))) } + unsafe { RangeMapFree(rmaphandle.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { RangeMapRead(rmaphandle, offset, core::mem::transmute(buffer), requestbytes, flags, core::mem::transmute(donebytes.unwrap_or(core::mem::zeroed()))) } + unsafe { RangeMapRead(rmaphandle, offset, buffer as _, requestbytes, flags, donebytes.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RangeMapRemove(rmaphandle: *const core::ffi::c_void, usertag: u64) -> super::super::super::Foundation::BOOL { @@ -621,7 +621,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); - unsafe { RangeMapWrite(rmaphandle, offset, buffer, requestbytes, flags, core::mem::transmute(donebytes.unwrap_or(core::mem::zeroed()))) } + unsafe { RangeMapWrite(rmaphandle, offset, buffer, requestbytes, flags, donebytes.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ReBaseImage(currentimagename: P0, symbolpath: P1, frebase: bool, frebasesysfileok: bool, fgoingdown: bool, checkimagesize: u32, oldimagesize: *mut u32, oldimagebase: *mut usize, newimagesize: *mut u32, newimagebase: *mut usize, timestamp: u32) -> windows_core::Result<()> @@ -630,7 +630,7 @@ where P1: windows_core::Param, { windows_targets::link!("imagehlp.dll" "system" fn ReBaseImage(currentimagename : windows_core::PCSTR, symbolpath : windows_core::PCSTR, frebase : super::super::super::Foundation:: BOOL, frebasesysfileok : super::super::super::Foundation:: BOOL, fgoingdown : super::super::super::Foundation:: BOOL, checkimagesize : u32, oldimagesize : *mut u32, oldimagebase : *mut usize, newimagesize : *mut u32, newimagebase : *mut usize, timestamp : u32) -> super::super::super::Foundation:: BOOL); - unsafe { ReBaseImage(currentimagename.param().abi(), symbolpath.param().abi(), frebase.into(), frebasesysfileok.into(), fgoingdown.into(), checkimagesize, core::mem::transmute(oldimagesize), core::mem::transmute(oldimagebase), core::mem::transmute(newimagesize), core::mem::transmute(newimagebase), timestamp).ok() } + unsafe { ReBaseImage(currentimagename.param().abi(), symbolpath.param().abi(), frebase.into(), frebasesysfileok.into(), fgoingdown.into(), checkimagesize, oldimagesize as _, oldimagebase as _, newimagesize as _, newimagebase as _, timestamp).ok() } } #[inline] pub unsafe fn ReBaseImage64(currentimagename: P0, symbolpath: P1, frebase: bool, frebasesysfileok: bool, fgoingdown: bool, checkimagesize: u32, oldimagesize: *mut u32, oldimagebase: *mut u64, newimagesize: *mut u32, newimagebase: *mut u64, timestamp: u32) -> windows_core::Result<()> @@ -639,12 +639,12 @@ where P1: windows_core::Param, { windows_targets::link!("imagehlp.dll" "system" fn ReBaseImage64(currentimagename : windows_core::PCSTR, symbolpath : windows_core::PCSTR, frebase : super::super::super::Foundation:: BOOL, frebasesysfileok : super::super::super::Foundation:: BOOL, fgoingdown : super::super::super::Foundation:: BOOL, checkimagesize : u32, oldimagesize : *mut u32, oldimagebase : *mut u64, newimagesize : *mut u32, newimagebase : *mut u64, timestamp : u32) -> super::super::super::Foundation:: BOOL); - unsafe { ReBaseImage64(currentimagename.param().abi(), symbolpath.param().abi(), frebase.into(), frebasesysfileok.into(), fgoingdown.into(), checkimagesize, core::mem::transmute(oldimagesize), core::mem::transmute(oldimagebase), core::mem::transmute(newimagesize), core::mem::transmute(newimagebase), timestamp).ok() } + unsafe { ReBaseImage64(currentimagename.param().abi(), symbolpath.param().abi(), frebase.into(), frebasesysfileok.into(), fgoingdown.into(), checkimagesize, oldimagesize as _, oldimagebase as _, newimagesize as _, newimagebase as _, timestamp).ok() } } #[inline] 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); - unsafe { ReadProcessMemory(hprocess, lpbaseaddress, core::mem::transmute(lpbuffer), nsize, core::mem::transmute(lpnumberofbytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ReadProcessMemory(hprocess, lpbaseaddress, lpbuffer as _, nsize, lpnumberofbytesread.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn RegisterWaitChainCOMCallback(callstatecallback: PCOGETCALLSTATE, activationstatecallback: PCOGETACTIVATIONSTATE) { @@ -690,31 +690,31 @@ pub unsafe fn RtlAddFunctionTable(functiontable: &[IMAGE_ARM64_RUNTIME_FUNCTION_ #[inline] pub unsafe fn RtlAddGrowableFunctionTable(dynamictable: *mut *mut core::ffi::c_void, functiontable: &[IMAGE_RUNTIME_FUNCTION_ENTRY], entrycount: u32, rangebase: usize, rangeend: usize) -> u32 { windows_targets::link!("ntdll.dll" "system" fn RtlAddGrowableFunctionTable(dynamictable : *mut *mut core::ffi::c_void, functiontable : *const IMAGE_RUNTIME_FUNCTION_ENTRY, entrycount : u32, maximumentrycount : u32, rangebase : usize, rangeend : usize) -> u32); - unsafe { RtlAddGrowableFunctionTable(core::mem::transmute(dynamictable), core::mem::transmute(functiontable.as_ptr()), entrycount, functiontable.len().try_into().unwrap(), rangebase, rangeend) } + unsafe { RtlAddGrowableFunctionTable(dynamictable as _, core::mem::transmute(functiontable.as_ptr()), entrycount, functiontable.len().try_into().unwrap(), rangebase, rangeend) } } #[cfg(target_arch = "aarch64")] #[inline] pub unsafe fn RtlAddGrowableFunctionTable(dynamictable: *mut *mut core::ffi::c_void, functiontable: &[IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY], entrycount: u32, rangebase: usize, rangeend: usize) -> u32 { windows_targets::link!("ntdll.dll" "system" fn RtlAddGrowableFunctionTable(dynamictable : *mut *mut core::ffi::c_void, functiontable : *const IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY, entrycount : u32, maximumentrycount : u32, rangebase : usize, rangeend : usize) -> u32); - unsafe { RtlAddGrowableFunctionTable(core::mem::transmute(dynamictable), core::mem::transmute(functiontable.as_ptr()), entrycount, functiontable.len().try_into().unwrap(), rangebase, rangeend) } + unsafe { RtlAddGrowableFunctionTable(dynamictable as _, core::mem::transmute(functiontable.as_ptr()), entrycount, functiontable.len().try_into().unwrap(), rangebase, rangeend) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn RtlCaptureContext(contextrecord: *mut CONTEXT) { windows_targets::link!("kernel32.dll" "system" fn RtlCaptureContext(contextrecord : *mut CONTEXT)); - unsafe { RtlCaptureContext(core::mem::transmute(contextrecord)) } + unsafe { RtlCaptureContext(contextrecord as _) } } #[cfg(any(target_arch = "arm64ec", target_arch = "x86_64"))] #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn RtlCaptureContext2(contextrecord: *mut CONTEXT) { windows_targets::link!("kernel32.dll" "system" fn RtlCaptureContext2(contextrecord : *mut CONTEXT)); - unsafe { RtlCaptureContext2(core::mem::transmute(contextrecord)) } + unsafe { RtlCaptureContext2(contextrecord as _) } } #[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); - unsafe { RtlCaptureStackBackTrace(framestoskip, backtrace.len().try_into().unwrap(), core::mem::transmute(backtrace.as_ptr()), core::mem::transmute(backtracehash.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlCaptureStackBackTrace(framestoskip, backtrace.len().try_into().unwrap(), core::mem::transmute(backtrace.as_ptr()), backtracehash.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(any(target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] @@ -738,7 +738,7 @@ pub unsafe fn RtlDeleteGrowableFunctionTable(dynamictable: *const core::ffi::c_v #[inline] pub unsafe fn RtlGrowFunctionTable(dynamictable: *mut core::ffi::c_void, newentrycount: u32) { windows_targets::link!("ntdll.dll" "system" fn RtlGrowFunctionTable(dynamictable : *mut core::ffi::c_void, newentrycount : u32)); - unsafe { RtlGrowFunctionTable(core::mem::transmute(dynamictable), newentrycount) } + unsafe { RtlGrowFunctionTable(dynamictable as _, newentrycount) } } #[cfg(any(target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] @@ -747,7 +747,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) -> bool); - unsafe { RtlInstallFunctionTableCallback(tableidentifier, baseaddress, length, callback, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), outofprocesscallbackdll.param().abi()) } + unsafe { RtlInstallFunctionTableCallback(tableidentifier, baseaddress, length, callback, context.unwrap_or(core::mem::zeroed()) as _, outofprocesscallbackdll.param().abi()) } } #[cfg(target_arch = "aarch64")] #[inline] @@ -756,24 +756,24 @@ 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) -> bool); - unsafe { RtlInstallFunctionTableCallback(tableidentifier, baseaddress, length, callback, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), outofprocesscallbackdll.param().abi()) } + unsafe { RtlInstallFunctionTableCallback(tableidentifier, baseaddress, length, callback, context.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { RtlLookupFunctionEntry(controlpc, core::mem::transmute(imagebase), core::mem::transmute(historytable.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlLookupFunctionEntry(controlpc, imagebase as _, historytable.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { RtlLookupFunctionEntry(controlpc, core::mem::transmute(imagebase), core::mem::transmute(historytable.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlLookupFunctionEntry(controlpc, imagebase as _, historytable.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RtlPcToFileHeader(pcvalue: *const core::ffi::c_void, baseofimage: *mut *mut core::ffi::c_void) -> *mut core::ffi::c_void { windows_targets::link!("kernel32.dll" "system" fn RtlPcToFileHeader(pcvalue : *const core::ffi::c_void, baseofimage : *mut *mut core::ffi::c_void) -> *mut core::ffi::c_void); - unsafe { RtlPcToFileHeader(pcvalue, core::mem::transmute(baseofimage)) } + unsafe { RtlPcToFileHeader(pcvalue, baseofimage as _) } } #[inline] pub unsafe fn RtlRaiseException(exceptionrecord: *const EXCEPTION_RECORD) { @@ -784,33 +784,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)); - unsafe { RtlRestoreContext(contextrecord, core::mem::transmute(exceptionrecord.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlRestoreContext(contextrecord, exceptionrecord.unwrap_or(core::mem::zeroed()) as _) } } #[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)); - unsafe { 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())), returnvalue) } + unsafe { RtlUnwind(targetframe.unwrap_or(core::mem::zeroed()) as _, targetip.unwrap_or(core::mem::zeroed()) as _, exceptionrecord.unwrap_or(core::mem::zeroed()) as _, 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)); - unsafe { 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())), returnvalue, contextrecord, core::mem::transmute(historytable.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlUnwindEx(targetframe.unwrap_or(core::mem::zeroed()) as _, targetip.unwrap_or(core::mem::zeroed()) as _, exceptionrecord.unwrap_or(core::mem::zeroed()) as _, returnvalue, contextrecord, historytable.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { RtlVirtualUnwind(handlertype, imagebase, controlpc, functionentry, core::mem::transmute(contextrecord), core::mem::transmute(handlerdata), core::mem::transmute(establisherframe), core::mem::transmute(contextpointers.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlVirtualUnwind(handlertype, imagebase, controlpc, functionentry, contextrecord as _, handlerdata as _, establisherframe as _, contextpointers.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { RtlVirtualUnwind(handlertype, imagebase, controlpc, functionentry, core::mem::transmute(contextrecord), core::mem::transmute(handlerdata), core::mem::transmute(establisherframe), core::mem::transmute(contextpointers.unwrap_or(core::mem::zeroed()))) } + unsafe { RtlVirtualUnwind(handlertype, imagebase, controlpc, functionentry, contextrecord as _, handlerdata as _, establisherframe as _, contextpointers.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SearchTreeForFile(rootpath: P0, inputpathname: P1, outputpathbuffer: windows_core::PSTR) -> windows_core::Result<()> @@ -845,14 +845,14 @@ pub unsafe fn SetErrorMode(umode: THREAD_ERROR_MODE) -> THREAD_ERROR_MODE { #[inline] pub unsafe fn SetImageConfigInformation(loadedimage: *mut LOADED_IMAGE, imageconfiginformation: *const IMAGE_LOAD_CONFIG_DIRECTORY32) -> windows_core::Result<()> { windows_targets::link!("imagehlp.dll" "system" fn SetImageConfigInformation(loadedimage : *mut LOADED_IMAGE, imageconfiginformation : *const IMAGE_LOAD_CONFIG_DIRECTORY32) -> super::super::super::Foundation:: BOOL); - unsafe { SetImageConfigInformation(core::mem::transmute(loadedimage), imageconfiginformation).ok() } + unsafe { SetImageConfigInformation(loadedimage as _, imageconfiginformation).ok() } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[cfg(all(feature = "Win32_System_Kernel", feature = "Win32_System_SystemInformation"))] #[inline] pub unsafe fn SetImageConfigInformation(loadedimage: *mut LOADED_IMAGE, imageconfiginformation: *const IMAGE_LOAD_CONFIG_DIRECTORY64) -> windows_core::Result<()> { windows_targets::link!("imagehlp.dll" "system" fn SetImageConfigInformation(loadedimage : *mut LOADED_IMAGE, imageconfiginformation : *const IMAGE_LOAD_CONFIG_DIRECTORY64) -> super::super::super::Foundation:: BOOL); - unsafe { SetImageConfigInformation(core::mem::transmute(loadedimage), imageconfiginformation).ok() } + unsafe { SetImageConfigInformation(loadedimage as _, imageconfiginformation).ok() } } #[inline] pub unsafe fn SetSymLoadError(error: u32) { @@ -868,55 +868,41 @@ pub unsafe fn SetThreadContext(hthread: super::super::super::Foundation::HANDLE, #[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); - unsafe { SetThreadErrorMode(dwnewmode, core::mem::transmute(lpoldmode.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetThreadErrorMode(dwnewmode, lpoldmode.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_Kernel")] #[inline] 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); - unsafe { SetUnhandledExceptionFilter(core::mem::transmute(lptoplevelexceptionfilter.unwrap_or(core::mem::zeroed()))) } + unsafe { SetUnhandledExceptionFilter(lptoplevelexceptionfilter.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(any(target_arch = "arm64ec", target_arch = "x86", target_arch = "x86_64"))] #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn SetXStateFeaturesMask(context: *mut CONTEXT, featuremask: u64) -> super::super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn SetXStateFeaturesMask(context : *mut CONTEXT, featuremask : u64) -> super::super::super::Foundation:: BOOL); - unsafe { SetXStateFeaturesMask(core::mem::transmute(context), featuremask) } + unsafe { SetXStateFeaturesMask(context as _, featuremask) } } #[cfg(target_arch = "x86")] #[inline] 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); - unsafe { StackWalk(machinetype, hprocess, 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()))) } + unsafe { StackWalk(machinetype, hprocess, hthread, stackframe as _, contextrecord as _, readmemoryroutine.unwrap_or(core::mem::zeroed()) as _, functiontableaccessroutine.unwrap_or(core::mem::zeroed()) as _, getmodulebaseroutine.unwrap_or(core::mem::zeroed()) as _, translateaddress.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { - StackWalk2( - machinetype, - hprocess, - 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())), - flags, - ) - } + unsafe { StackWalk2(machinetype, hprocess, hthread, stackframe as _, contextrecord as _, readmemoryroutine.unwrap_or(core::mem::zeroed()) as _, functiontableaccessroutine.unwrap_or(core::mem::zeroed()) as _, getmodulebaseroutine.unwrap_or(core::mem::zeroed()) as _, translateaddress.unwrap_or(core::mem::zeroed()) as _, gettargetattributevalue.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { StackWalk64(machinetype, hprocess, 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()))) } + unsafe { StackWalk64(machinetype, hprocess, hthread, stackframe as _, contextrecord as _, readmemoryroutine.unwrap_or(core::mem::zeroed()) as _, functiontableaccessroutine.unwrap_or(core::mem::zeroed()) as _, getmodulebaseroutine.unwrap_or(core::mem::zeroed()) as _, translateaddress.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { StackWalkEx(machinetype, hprocess, 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())), flags) } + unsafe { StackWalkEx(machinetype, hprocess, hthread, stackframe as _, contextrecord as _, readmemoryroutine.unwrap_or(core::mem::zeroed()) as _, functiontableaccessroutine.unwrap_or(core::mem::zeroed()) as _, getmodulebaseroutine.unwrap_or(core::mem::zeroed()) as _, translateaddress.unwrap_or(core::mem::zeroed()) as _, flags) } } #[inline] pub unsafe fn SymAddSourceStream(hprocess: super::super::super::Foundation::HANDLE, base: u64, streamfile: P2, buffer: Option<&[u8]>) -> windows_core::Result<()> @@ -996,7 +982,7 @@ where 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); - unsafe { SymEnumLines(hprocess, base, obj.param().abi(), file.param().abi(), enumlinescallback, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SymEnumLines(hprocess, base, obj.param().abi(), file.param().abi(), enumlinescallback, usercontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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<()> @@ -1005,7 +991,7 @@ where 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); - unsafe { SymEnumLinesW(hprocess, base, obj.param().abi(), file.param().abi(), enumlinescallback, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SymEnumLinesW(hprocess, base, obj.param().abi(), file.param().abi(), enumlinescallback, usercontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SymEnumProcesses(enumprocessescallback: PSYM_ENUMPROCESSES_CALLBACK, usercontext: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -1023,7 +1009,7 @@ where 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); - unsafe { SymEnumSourceFiles(hprocess, modbase, mask.param().abi(), cbsrcfiles, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SymEnumSourceFiles(hprocess, modbase, mask.param().abi(), cbsrcfiles, usercontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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<()> @@ -1031,7 +1017,7 @@ where 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); - unsafe { SymEnumSourceFilesW(hprocess, modbase, mask.param().abi(), cbsrcfiles, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SymEnumSourceFilesW(hprocess, modbase, mask.param().abi(), cbsrcfiles, usercontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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<()> @@ -1040,7 +1026,7 @@ where 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); - unsafe { SymEnumSourceLines(hprocess, base, obj.param().abi(), file.param().abi(), core::mem::transmute(line.unwrap_or(core::mem::zeroed())), flags, enumlinescallback, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SymEnumSourceLines(hprocess, base, obj.param().abi(), file.param().abi(), line.unwrap_or(core::mem::zeroed()) as _, flags, enumlinescallback, usercontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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<()> @@ -1049,12 +1035,12 @@ where 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); - unsafe { SymEnumSourceLinesW(hprocess, base, obj.param().abi(), file.param().abi(), core::mem::transmute(line.unwrap_or(core::mem::zeroed())), flags, enumlinescallback, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SymEnumSourceLinesW(hprocess, base, obj.param().abi(), file.param().abi(), line.unwrap_or(core::mem::zeroed()) as _, flags, enumlinescallback, usercontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SymEnumSym(hprocess, baseofdll, enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))) } + unsafe { SymEnumSym(hprocess, baseofdll, enumsymbolscallback, usercontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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<()> @@ -1062,7 +1048,7 @@ where 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); - unsafe { SymEnumSymbols(hprocess, baseofdll, mask.param().abi(), enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SymEnumSymbols(hprocess, baseofdll, mask.param().abi(), enumsymbolscallback, usercontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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<()> @@ -1070,7 +1056,7 @@ where 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); - unsafe { SymEnumSymbolsEx(hprocess, baseofdll, mask.param().abi(), enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed())), options).ok() } + unsafe { SymEnumSymbolsEx(hprocess, baseofdll, mask.param().abi(), enumsymbolscallback, usercontext.unwrap_or(core::mem::zeroed()) as _, options).ok() } } #[inline] 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<()> @@ -1078,17 +1064,17 @@ where 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); - unsafe { SymEnumSymbolsExW(hprocess, baseofdll, mask.param().abi(), enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed())), options).ok() } + unsafe { SymEnumSymbolsExW(hprocess, baseofdll, mask.param().abi(), enumsymbolscallback, usercontext.unwrap_or(core::mem::zeroed()) as _, options).ok() } } #[inline] 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); - unsafe { SymEnumSymbolsForAddr(hprocess, address, enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SymEnumSymbolsForAddr(hprocess, address, enumsymbolscallback, usercontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SymEnumSymbolsForAddrW(hprocess, address, enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SymEnumSymbolsForAddrW(hprocess, address, enumsymbolscallback, usercontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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<()> @@ -1096,12 +1082,12 @@ where 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); - unsafe { SymEnumSymbolsW(hprocess, baseofdll, mask.param().abi(), enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SymEnumSymbolsW(hprocess, baseofdll, mask.param().abi(), enumsymbolscallback, usercontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SymEnumTypes(hprocess, baseofdll, enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SymEnumTypes(hprocess, baseofdll, enumsymbolscallback, usercontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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<()> @@ -1109,7 +1095,7 @@ where 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); - unsafe { SymEnumTypesByName(hprocess, baseofdll, mask.param().abi(), enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SymEnumTypesByName(hprocess, baseofdll, mask.param().abi(), enumsymbolscallback, usercontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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<()> @@ -1117,50 +1103,50 @@ where 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); - unsafe { SymEnumTypesByNameW(hprocess, baseofdll, mask.param().abi(), enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SymEnumTypesByNameW(hprocess, baseofdll, mask.param().abi(), enumsymbolscallback, usercontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SymEnumTypesW(hprocess, baseofdll, enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SymEnumTypesW(hprocess, baseofdll, enumsymbolscallback, usercontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(target_arch = "x86")] #[inline] 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); - unsafe { SymEnumerateModules(hprocess, enummodulescallback, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SymEnumerateModules(hprocess, enummodulescallback, usercontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SymEnumerateModules64(hprocess, enummodulescallback, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SymEnumerateModules64(hprocess, enummodulescallback, usercontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SymEnumerateModulesW64(hprocess, enummodulescallback, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SymEnumerateModulesW64(hprocess, enummodulescallback, usercontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(target_arch = "x86")] #[inline] 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); - unsafe { SymEnumerateSymbols(hprocess, baseofdll, enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SymEnumerateSymbols(hprocess, baseofdll, enumsymbolscallback, usercontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SymEnumerateSymbols64(hprocess, baseofdll, enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SymEnumerateSymbols64(hprocess, baseofdll, enumsymbolscallback, usercontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(target_arch = "x86")] #[inline] 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); - unsafe { SymEnumerateSymbolsW(hprocess, baseofdll, enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SymEnumerateSymbolsW(hprocess, baseofdll, enumsymbolscallback, usercontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SymEnumerateSymbolsW64(hprocess, baseofdll, enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SymEnumerateSymbolsW64(hprocess, baseofdll, enumsymbolscallback, usercontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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 @@ -1168,7 +1154,7 @@ where P1: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymFindDebugInfoFile(hprocess : super::super::super::Foundation:: HANDLE, filename : windows_core::PCSTR, debugfilepath : windows_core::PSTR, callback : PFIND_DEBUG_FILE_CALLBACK, callerdata : *const core::ffi::c_void) -> super::super::super::Foundation:: HANDLE); - let result__ = unsafe { SymFindDebugInfoFile(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()))) }; + let result__ = unsafe { SymFindDebugInfoFile(hprocess, filename.param().abi(), core::mem::transmute(debugfilepath), callback.unwrap_or(core::mem::zeroed()) as _, callerdata.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1177,7 +1163,7 @@ where P1: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymFindDebugInfoFileW(hprocess : super::super::super::Foundation:: HANDLE, filename : windows_core::PCWSTR, debugfilepath : windows_core::PWSTR, callback : PFIND_DEBUG_FILE_CALLBACKW, callerdata : *const core::ffi::c_void) -> super::super::super::Foundation:: HANDLE); - let result__ = unsafe { SymFindDebugInfoFileW(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()))) }; + let result__ = unsafe { SymFindDebugInfoFileW(hprocess, filename.param().abi(), core::mem::transmute(debugfilepath), callback.unwrap_or(core::mem::zeroed()) as _, callerdata.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1205,7 +1191,7 @@ where P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymFindFileInPath(hprocess : super::super::super::Foundation:: HANDLE, searchpatha : windows_core::PCSTR, filename : windows_core::PCSTR, id : *const core::ffi::c_void, two : u32, three : u32, flags : SYM_FIND_ID_OPTION, foundfile : windows_core::PSTR, callback : PFINDFILEINPATHCALLBACK, context : *const core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - unsafe { SymFindFileInPath(hprocess, searchpatha.param().abi(), filename.param().abi(), core::mem::transmute(id.unwrap_or(core::mem::zeroed())), two, three, flags, core::mem::transmute(foundfile), core::mem::transmute(callback.unwrap_or(core::mem::zeroed())), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SymFindFileInPath(hprocess, searchpatha.param().abi(), filename.param().abi(), id.unwrap_or(core::mem::zeroed()) as _, two, three, flags, core::mem::transmute(foundfile), callback.unwrap_or(core::mem::zeroed()) as _, context.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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<()> @@ -1214,37 +1200,37 @@ where P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymFindFileInPathW(hprocess : super::super::super::Foundation:: HANDLE, searchpatha : windows_core::PCWSTR, filename : windows_core::PCWSTR, id : *const core::ffi::c_void, two : u32, three : u32, flags : SYM_FIND_ID_OPTION, foundfile : windows_core::PWSTR, callback : PFINDFILEINPATHCALLBACKW, context : *const core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - unsafe { SymFindFileInPathW(hprocess, searchpatha.param().abi(), filename.param().abi(), core::mem::transmute(id.unwrap_or(core::mem::zeroed())), two, three, flags, core::mem::transmute(foundfile), core::mem::transmute(callback.unwrap_or(core::mem::zeroed())), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SymFindFileInPathW(hprocess, searchpatha.param().abi(), filename.param().abi(), id.unwrap_or(core::mem::zeroed()) as _, two, three, flags, core::mem::transmute(foundfile), callback.unwrap_or(core::mem::zeroed()) as _, context.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SymFromAddr(hprocess, address, core::mem::transmute(displacement.unwrap_or(core::mem::zeroed())), core::mem::transmute(symbol)).ok() } + unsafe { SymFromAddr(hprocess, address, displacement.unwrap_or(core::mem::zeroed()) as _, symbol as _).ok() } } #[inline] 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); - unsafe { SymFromAddrW(hprocess, address, core::mem::transmute(displacement.unwrap_or(core::mem::zeroed())), core::mem::transmute(symbol)).ok() } + unsafe { SymFromAddrW(hprocess, address, displacement.unwrap_or(core::mem::zeroed()) as _, symbol as _).ok() } } #[inline] 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); - unsafe { SymFromIndex(hprocess, baseofdll, index, core::mem::transmute(symbol)).ok() } + unsafe { SymFromIndex(hprocess, baseofdll, index, symbol as _).ok() } } #[inline] 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); - unsafe { SymFromIndexW(hprocess, baseofdll, index, core::mem::transmute(symbol)).ok() } + unsafe { SymFromIndexW(hprocess, baseofdll, index, symbol as _).ok() } } #[inline] 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); - unsafe { SymFromInlineContext(hprocess, address, inlinecontext, core::mem::transmute(displacement.unwrap_or(core::mem::zeroed())), core::mem::transmute(symbol)).ok() } + unsafe { SymFromInlineContext(hprocess, address, inlinecontext, displacement.unwrap_or(core::mem::zeroed()) as _, symbol as _).ok() } } #[inline] 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); - unsafe { SymFromInlineContextW(hprocess, address, inlinecontext, core::mem::transmute(displacement.unwrap_or(core::mem::zeroed())), core::mem::transmute(symbol)).ok() } + unsafe { SymFromInlineContextW(hprocess, address, inlinecontext, displacement.unwrap_or(core::mem::zeroed()) as _, symbol as _).ok() } } #[inline] pub unsafe fn SymFromName(hprocess: super::super::super::Foundation::HANDLE, name: P1, symbol: *mut SYMBOL_INFO) -> windows_core::Result<()> @@ -1252,7 +1238,7 @@ where 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); - unsafe { SymFromName(hprocess, name.param().abi(), core::mem::transmute(symbol)).ok() } + unsafe { SymFromName(hprocess, name.param().abi(), symbol as _).ok() } } #[inline] pub unsafe fn SymFromNameW(hprocess: super::super::super::Foundation::HANDLE, name: P1, symbol: *mut SYMBOL_INFOW) -> windows_core::Result<()> @@ -1260,17 +1246,17 @@ where 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); - unsafe { SymFromNameW(hprocess, name.param().abi(), core::mem::transmute(symbol)).ok() } + unsafe { SymFromNameW(hprocess, name.param().abi(), symbol as _).ok() } } #[inline] 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); - unsafe { SymFromToken(hprocess, base, token, core::mem::transmute(symbol)).ok() } + unsafe { SymFromToken(hprocess, base, token, symbol as _).ok() } } #[inline] 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); - unsafe { SymFromTokenW(hprocess, base, token, core::mem::transmute(symbol)).ok() } + unsafe { SymFromTokenW(hprocess, base, token, symbol as _).ok() } } #[cfg(target_arch = "x86")] #[inline] @@ -1286,7 +1272,7 @@ pub unsafe fn SymFunctionTableAccess64(hprocess: super::super::super::Foundation #[inline] 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); - unsafe { SymFunctionTableAccess64AccessRoutines(hprocess, addrbase, core::mem::transmute(readmemoryroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(getmodulebaseroutine.unwrap_or(core::mem::zeroed()))) } + unsafe { SymFunctionTableAccess64AccessRoutines(hprocess, addrbase, readmemoryroutine.unwrap_or(core::mem::zeroed()) as _, getmodulebaseroutine.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SymGetExtendedOption(option: IMAGEHLP_EXTENDED_OPTIONS) -> super::super::super::Foundation::BOOL { @@ -1316,27 +1302,27 @@ pub unsafe fn SymGetHomeDirectoryW(r#type: IMAGEHLP_HD_TYPE, dir: &mut [u16]) -> #[inline] 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); - unsafe { SymGetLineFromAddr(hprocess, dwaddr, core::mem::transmute(pdwdisplacement), core::mem::transmute(line)).ok() } + unsafe { SymGetLineFromAddr(hprocess, dwaddr, pdwdisplacement as _, line as _).ok() } } #[inline] 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); - unsafe { SymGetLineFromAddr64(hprocess, qwaddr, core::mem::transmute(pdwdisplacement), core::mem::transmute(line64)).ok() } + unsafe { SymGetLineFromAddr64(hprocess, qwaddr, pdwdisplacement as _, line64 as _).ok() } } #[inline] 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); - unsafe { SymGetLineFromAddrW64(hprocess, dwaddr, core::mem::transmute(pdwdisplacement), core::mem::transmute(line)).ok() } + unsafe { SymGetLineFromAddrW64(hprocess, dwaddr, pdwdisplacement as _, line as _).ok() } } #[inline] 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); - unsafe { SymGetLineFromInlineContext(hprocess, qwaddr, inlinecontext, core::mem::transmute(qwmodulebaseaddress.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwdisplacement), core::mem::transmute(line64)).ok() } + unsafe { SymGetLineFromInlineContext(hprocess, qwaddr, inlinecontext, qwmodulebaseaddress.unwrap_or(core::mem::zeroed()) as _, pdwdisplacement as _, line64 as _).ok() } } #[inline] 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); - unsafe { SymGetLineFromInlineContextW(hprocess, dwaddr, inlinecontext, core::mem::transmute(qwmodulebaseaddress.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwdisplacement), core::mem::transmute(line)).ok() } + unsafe { SymGetLineFromInlineContextW(hprocess, dwaddr, inlinecontext, qwmodulebaseaddress.unwrap_or(core::mem::zeroed()) as _, pdwdisplacement as _, line as _).ok() } } #[cfg(target_arch = "x86")] #[inline] @@ -1346,7 +1332,7 @@ where 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); - unsafe { SymGetLineFromName(hprocess, modulename.param().abi(), filename.param().abi(), dwlinenumber, core::mem::transmute(pldisplacement), core::mem::transmute(line)).ok() } + unsafe { SymGetLineFromName(hprocess, modulename.param().abi(), filename.param().abi(), dwlinenumber, pldisplacement as _, line as _).ok() } } #[inline] 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<()> @@ -1355,7 +1341,7 @@ where 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); - unsafe { SymGetLineFromName64(hprocess, modulename.param().abi(), filename.param().abi(), dwlinenumber, core::mem::transmute(pldisplacement), core::mem::transmute(line)).ok() } + unsafe { SymGetLineFromName64(hprocess, modulename.param().abi(), filename.param().abi(), dwlinenumber, pldisplacement as _, line as _).ok() } } #[inline] 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<()> @@ -1364,39 +1350,39 @@ where 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); - unsafe { SymGetLineFromNameW64(hprocess, modulename.param().abi(), filename.param().abi(), dwlinenumber, core::mem::transmute(pldisplacement), core::mem::transmute(line)).ok() } + unsafe { SymGetLineFromNameW64(hprocess, modulename.param().abi(), filename.param().abi(), dwlinenumber, pldisplacement as _, line as _).ok() } } #[cfg(target_arch = "x86")] #[inline] 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); - unsafe { SymGetLineNext(hprocess, core::mem::transmute(line)).ok() } + unsafe { SymGetLineNext(hprocess, line as _).ok() } } #[inline] 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); - unsafe { SymGetLineNext64(hprocess, core::mem::transmute(line)).ok() } + unsafe { SymGetLineNext64(hprocess, line as _).ok() } } #[inline] 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); - unsafe { SymGetLineNextW64(hprocess, core::mem::transmute(line)).ok() } + unsafe { SymGetLineNextW64(hprocess, line as _).ok() } } #[cfg(target_arch = "x86")] #[inline] 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); - unsafe { SymGetLinePrev(hprocess, core::mem::transmute(line)).ok() } + unsafe { SymGetLinePrev(hprocess, line as _).ok() } } #[inline] 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); - unsafe { SymGetLinePrev64(hprocess, core::mem::transmute(line)).ok() } + unsafe { SymGetLinePrev64(hprocess, line as _).ok() } } #[inline] 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); - unsafe { SymGetLinePrevW64(hprocess, core::mem::transmute(line)).ok() } + unsafe { SymGetLinePrevW64(hprocess, line as _).ok() } } #[cfg(target_arch = "x86")] #[inline] @@ -1413,28 +1399,28 @@ pub unsafe fn SymGetModuleBase64(hprocess: super::super::super::Foundation::HAND #[inline] 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); - unsafe { SymGetModuleInfo(hprocess, dwaddr, core::mem::transmute(moduleinfo)).ok() } + unsafe { SymGetModuleInfo(hprocess, dwaddr, moduleinfo as _).ok() } } #[inline] 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); - unsafe { SymGetModuleInfo64(hprocess, qwaddr, core::mem::transmute(moduleinfo)).ok() } + unsafe { SymGetModuleInfo64(hprocess, qwaddr, moduleinfo as _).ok() } } #[cfg(target_arch = "x86")] #[inline] 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); - unsafe { SymGetModuleInfoW(hprocess, dwaddr, core::mem::transmute(moduleinfo)).ok() } + unsafe { SymGetModuleInfoW(hprocess, dwaddr, moduleinfo as _).ok() } } #[inline] 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); - unsafe { SymGetModuleInfoW64(hprocess, qwaddr, core::mem::transmute(moduleinfo)).ok() } + unsafe { SymGetModuleInfoW64(hprocess, qwaddr, moduleinfo as _).ok() } } #[inline] 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); - unsafe { SymGetOmaps(hprocess, baseofdll, core::mem::transmute(omapto), core::mem::transmute(comapto), core::mem::transmute(omapfrom), core::mem::transmute(comapfrom)).ok() } + unsafe { SymGetOmaps(hprocess, baseofdll, omapto as _, comapto as _, omapfrom as _, comapfrom as _).ok() } } #[inline] pub unsafe fn SymGetOptions() -> u32 { @@ -1444,12 +1430,12 @@ pub unsafe fn SymGetOptions() -> u32 { #[inline] 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); - unsafe { SymGetScope(hprocess, baseofdll, index, core::mem::transmute(symbol)).ok() } + unsafe { SymGetScope(hprocess, baseofdll, index, symbol as _).ok() } } #[inline] 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); - unsafe { SymGetScopeW(hprocess, baseofdll, index, core::mem::transmute(symbol)).ok() } + unsafe { SymGetScopeW(hprocess, baseofdll, index, symbol as _).ok() } } #[inline] pub unsafe fn SymGetSearchPath(hprocess: super::super::super::Foundation::HANDLE, searchpatha: &mut [u8]) -> windows_core::Result<()> { @@ -1476,7 +1462,7 @@ where 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); - unsafe { SymGetSourceFileChecksum(hprocess, base, filespec.param().abi(), core::mem::transmute(pchecksumtype), core::mem::transmute(pchecksum.as_ptr()), pchecksum.len().try_into().unwrap(), core::mem::transmute(pactualbyteswritten)).ok() } + unsafe { SymGetSourceFileChecksum(hprocess, base, filespec.param().abi(), pchecksumtype as _, core::mem::transmute(pchecksum.as_ptr()), pchecksum.len().try_into().unwrap(), pactualbyteswritten as _).ok() } } #[inline] 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<()> @@ -1484,7 +1470,7 @@ where 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); - unsafe { SymGetSourceFileChecksumW(hprocess, base, filespec.param().abi(), core::mem::transmute(pchecksumtype), core::mem::transmute(pchecksum.as_ptr()), pchecksum.len().try_into().unwrap(), core::mem::transmute(pactualbyteswritten)).ok() } + unsafe { SymGetSourceFileChecksumW(hprocess, base, filespec.param().abi(), pchecksumtype as _, core::mem::transmute(pchecksum.as_ptr()), pchecksum.len().try_into().unwrap(), pactualbyteswritten as _).ok() } } #[inline] pub unsafe fn SymGetSourceFileFromToken(hprocess: super::super::super::Foundation::HANDLE, token: *const core::ffi::c_void, params: P2, filepath: &mut [u8]) -> windows_core::Result<()> @@ -1526,7 +1512,7 @@ where 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); - unsafe { SymGetSourceFileToken(hprocess, base, filespec.param().abi(), core::mem::transmute(token), core::mem::transmute(size)).ok() } + unsafe { SymGetSourceFileToken(hprocess, base, filespec.param().abi(), token as _, size as _).ok() } } #[inline] 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 @@ -1536,7 +1522,7 @@ where 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); - unsafe { SymGetSourceFileTokenByTokenName(hprocess, base, filespec.param().abi(), tokenname.param().abi(), tokenparameters.param().abi(), core::mem::transmute(token), core::mem::transmute(size)) } + unsafe { SymGetSourceFileTokenByTokenName(hprocess, base, filespec.param().abi(), tokenname.param().abi(), tokenparameters.param().abi(), token as _, size as _) } } #[inline] 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 @@ -1546,7 +1532,7 @@ where 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); - unsafe { SymGetSourceFileTokenByTokenNameW(hprocess, base, filespec.param().abi(), tokenname.param().abi(), tokenparameters.param().abi(), core::mem::transmute(token), core::mem::transmute(size)) } + unsafe { SymGetSourceFileTokenByTokenNameW(hprocess, base, filespec.param().abi(), tokenname.param().abi(), tokenparameters.param().abi(), token as _, size as _) } } #[inline] 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<()> @@ -1554,7 +1540,7 @@ where 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); - unsafe { SymGetSourceFileTokenW(hprocess, base, filespec.param().abi(), core::mem::transmute(token), core::mem::transmute(size)).ok() } + unsafe { SymGetSourceFileTokenW(hprocess, base, filespec.param().abi(), token as _, size as _).ok() } } #[inline] pub unsafe fn SymGetSourceFileW(hprocess: super::super::super::Foundation::HANDLE, base: u64, params: P2, filespec: P3, filepath: &mut [u16]) -> windows_core::Result<()> @@ -1587,12 +1573,12 @@ where #[inline] 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); - unsafe { SymGetSymFromAddr(hprocess, dwaddr, core::mem::transmute(pdwdisplacement.unwrap_or(core::mem::zeroed())), core::mem::transmute(symbol)).ok() } + unsafe { SymGetSymFromAddr(hprocess, dwaddr, pdwdisplacement.unwrap_or(core::mem::zeroed()) as _, symbol as _).ok() } } #[inline] 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); - unsafe { SymGetSymFromAddr64(hprocess, qwaddr, core::mem::transmute(pdwdisplacement.unwrap_or(core::mem::zeroed())), core::mem::transmute(symbol)).ok() } + unsafe { SymGetSymFromAddr64(hprocess, qwaddr, pdwdisplacement.unwrap_or(core::mem::zeroed()) as _, symbol as _).ok() } } #[cfg(target_arch = "x86")] #[inline] @@ -1601,7 +1587,7 @@ where 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); - unsafe { SymGetSymFromName(hprocess, name.param().abi(), core::mem::transmute(symbol)).ok() } + unsafe { SymGetSymFromName(hprocess, name.param().abi(), symbol as _).ok() } } #[inline] pub unsafe fn SymGetSymFromName64(hprocess: super::super::super::Foundation::HANDLE, name: P1, symbol: *mut IMAGEHLP_SYMBOL64) -> windows_core::Result<()> @@ -1609,29 +1595,29 @@ where 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); - unsafe { SymGetSymFromName64(hprocess, name.param().abi(), core::mem::transmute(symbol)).ok() } + unsafe { SymGetSymFromName64(hprocess, name.param().abi(), symbol as _).ok() } } #[cfg(target_arch = "x86")] #[inline] 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); - unsafe { SymGetSymNext(hprocess, core::mem::transmute(symbol)).ok() } + unsafe { SymGetSymNext(hprocess, symbol as _).ok() } } #[inline] 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); - unsafe { SymGetSymNext64(hprocess, core::mem::transmute(symbol)).ok() } + unsafe { SymGetSymNext64(hprocess, symbol as _).ok() } } #[cfg(target_arch = "x86")] #[inline] 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); - unsafe { SymGetSymPrev(hprocess, core::mem::transmute(symbol)).ok() } + unsafe { SymGetSymPrev(hprocess, symbol as _).ok() } } #[inline] 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); - unsafe { SymGetSymPrev64(hprocess, core::mem::transmute(symbol)).ok() } + unsafe { SymGetSymPrev64(hprocess, symbol as _).ok() } } #[inline] pub unsafe fn SymGetSymbolFile(hprocess: Option, sympath: P1, imagefile: P2, r#type: IMAGEHLP_SF_TYPE, symbolfile: &mut [u8], dbgfile: &mut [u8]) -> windows_core::Result<()> @@ -1640,7 +1626,7 @@ where 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); - unsafe { 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() } + unsafe { SymGetSymbolFile(hprocess.unwrap_or(core::mem::zeroed()) as _, 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: Option, sympath: P1, imagefile: P2, r#type: IMAGEHLP_SF_TYPE, symbolfile: &mut [u16], dbgfile: &mut [u16]) -> windows_core::Result<()> @@ -1649,7 +1635,7 @@ where 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); - unsafe { 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() } + unsafe { SymGetSymbolFileW(hprocess.unwrap_or(core::mem::zeroed()) as _, 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: super::super::super::Foundation::HANDLE, baseofdll: u64, name: P2, symbol: *mut SYMBOL_INFO) -> windows_core::Result<()> @@ -1657,7 +1643,7 @@ where 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); - unsafe { SymGetTypeFromName(hprocess, baseofdll, name.param().abi(), core::mem::transmute(symbol)).ok() } + unsafe { SymGetTypeFromName(hprocess, baseofdll, name.param().abi(), symbol as _).ok() } } #[inline] pub unsafe fn SymGetTypeFromNameW(hprocess: super::super::super::Foundation::HANDLE, baseofdll: u64, name: P2, symbol: *mut SYMBOL_INFOW) -> windows_core::Result<()> @@ -1665,22 +1651,22 @@ where 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); - unsafe { SymGetTypeFromNameW(hprocess, baseofdll, name.param().abi(), core::mem::transmute(symbol)).ok() } + unsafe { SymGetTypeFromNameW(hprocess, baseofdll, name.param().abi(), symbol as _).ok() } } #[inline] 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); - unsafe { SymGetTypeInfo(hprocess, modbase, typeid, gettype, core::mem::transmute(pinfo)).ok() } + unsafe { SymGetTypeInfo(hprocess, modbase, typeid, gettype, pinfo as _).ok() } } #[inline] 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); - unsafe { SymGetTypeInfoEx(hprocess, modbase, core::mem::transmute(params)).ok() } + unsafe { SymGetTypeInfoEx(hprocess, modbase, params as _).ok() } } #[inline] 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); - unsafe { SymGetUnwindInfo(hprocess, address, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(size)) } + unsafe { SymGetUnwindInfo(hprocess, address, buffer.unwrap_or(core::mem::zeroed()) as _, size as _) } } #[inline] pub unsafe fn SymInitialize(hprocess: super::super::super::Foundation::HANDLE, usersearchpath: P1, finvadeprocess: bool) -> windows_core::Result<()> @@ -1706,7 +1692,7 @@ where 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); - unsafe { SymLoadModule(hprocess, core::mem::transmute(hfile.unwrap_or(core::mem::zeroed())), imagename.param().abi(), modulename.param().abi(), baseofdll, sizeofdll) } + unsafe { SymLoadModule(hprocess, hfile.unwrap_or(core::mem::zeroed()) as _, imagename.param().abi(), modulename.param().abi(), baseofdll, sizeofdll) } } #[inline] pub unsafe fn SymLoadModule64(hprocess: super::super::super::Foundation::HANDLE, hfile: Option, imagename: P2, modulename: P3, baseofdll: u64, sizeofdll: u32) -> u64 @@ -1715,7 +1701,7 @@ where 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); - unsafe { SymLoadModule64(hprocess, core::mem::transmute(hfile.unwrap_or(core::mem::zeroed())), imagename.param().abi(), modulename.param().abi(), baseofdll, sizeofdll) } + unsafe { SymLoadModule64(hprocess, hfile.unwrap_or(core::mem::zeroed()) as _, imagename.param().abi(), modulename.param().abi(), baseofdll, sizeofdll) } } #[inline] 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 @@ -1724,7 +1710,7 @@ where P3: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymLoadModuleEx(hprocess : super::super::super::Foundation:: HANDLE, hfile : super::super::super::Foundation:: HANDLE, imagename : windows_core::PCSTR, modulename : windows_core::PCSTR, baseofdll : u64, dllsize : u32, data : *const MODLOAD_DATA, flags : SYM_LOAD_FLAGS) -> u64); - unsafe { SymLoadModuleEx(hprocess, core::mem::transmute(hfile.unwrap_or(core::mem::zeroed())), imagename.param().abi(), modulename.param().abi(), baseofdll, dllsize, core::mem::transmute(data.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))) } + unsafe { SymLoadModuleEx(hprocess, hfile.unwrap_or(core::mem::zeroed()) as _, imagename.param().abi(), modulename.param().abi(), baseofdll, dllsize, data.unwrap_or(core::mem::zeroed()) as _, flags.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -1733,7 +1719,7 @@ where P3: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymLoadModuleExW(hprocess : super::super::super::Foundation:: HANDLE, hfile : super::super::super::Foundation:: HANDLE, imagename : windows_core::PCWSTR, modulename : windows_core::PCWSTR, baseofdll : u64, dllsize : u32, data : *const MODLOAD_DATA, flags : SYM_LOAD_FLAGS) -> u64); - unsafe { SymLoadModuleExW(hprocess, core::mem::transmute(hfile.unwrap_or(core::mem::zeroed())), imagename.param().abi(), modulename.param().abi(), baseofdll, dllsize, core::mem::transmute(data.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))) } + unsafe { SymLoadModuleExW(hprocess, hfile.unwrap_or(core::mem::zeroed()) as _, imagename.param().abi(), modulename.param().abi(), baseofdll, dllsize, data.unwrap_or(core::mem::zeroed()) as _, flags.unwrap_or(core::mem::zeroed()) as _) } } #[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<()> @@ -1742,7 +1728,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); - unsafe { 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() } + unsafe { SymMatchFileName(filename.param().abi(), r#match.param().abi(), filenamestop.unwrap_or(core::mem::zeroed()) as _, matchstop.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -1751,7 +1737,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); - unsafe { 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() } + unsafe { SymMatchFileNameW(filename.param().abi(), r#match.param().abi(), filenamestop.unwrap_or(core::mem::zeroed()) as _, matchstop.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SymMatchString(string: P0, expression: P1, fcase: bool) -> windows_core::Result<()> @@ -1783,27 +1769,27 @@ where #[inline] 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); - unsafe { SymNext(hprocess, core::mem::transmute(si)).ok() } + unsafe { SymNext(hprocess, si as _).ok() } } #[inline] 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); - unsafe { SymNextW(hprocess, core::mem::transmute(siw)).ok() } + unsafe { SymNextW(hprocess, siw as _).ok() } } #[inline] 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); - unsafe { SymPrev(hprocess, core::mem::transmute(si)).ok() } + unsafe { SymPrev(hprocess, si as _).ok() } } #[inline] 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); - unsafe { SymPrevW(hprocess, core::mem::transmute(siw)).ok() } + unsafe { SymPrevW(hprocess, siw as _).ok() } } #[inline] 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); - unsafe { SymQueryInlineTrace(hprocess, startaddress, startcontext, startretaddress, curaddress, core::mem::transmute(curcontext), core::mem::transmute(curframeindex)).ok() } + unsafe { SymQueryInlineTrace(hprocess, startaddress, startcontext, startretaddress, curaddress, curcontext as _, curframeindex as _).ok() } } #[inline] pub unsafe fn SymRefreshModuleList(hprocess: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -1814,7 +1800,7 @@ pub unsafe fn SymRefreshModuleList(hprocess: super::super::super::Foundation::HA #[inline] 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); - unsafe { SymRegisterCallback(hprocess, callbackfunction, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SymRegisterCallback(hprocess, callbackfunction, usercontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SymRegisterCallback64(hprocess: super::super::super::Foundation::HANDLE, callbackfunction: PSYMBOL_REGISTERED_CALLBACK64, usercontext: u64) -> windows_core::Result<()> { @@ -1830,7 +1816,7 @@ pub unsafe fn SymRegisterCallbackW64(hprocess: super::super::super::Foundation:: #[inline] 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); - unsafe { SymRegisterFunctionEntryCallback(hprocess, callbackfunction, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SymRegisterFunctionEntryCallback(hprocess, callbackfunction, usercontext.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SymRegisterFunctionEntryCallback64(hprocess: super::super::super::Foundation::HANDLE, callbackfunction: PSYMBOL_FUNCENTRY_CALLBACK64, usercontext: u64) -> windows_core::Result<()> { @@ -1843,7 +1829,7 @@ where 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); - unsafe { SymSearch(hprocess, 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())), enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed())), options).ok() } + unsafe { SymSearch(hprocess, baseofdll, index.unwrap_or(core::mem::zeroed()) as _, symtag.unwrap_or(core::mem::zeroed()) as _, mask.param().abi(), address.unwrap_or(core::mem::zeroed()) as _, enumsymbolscallback, usercontext.unwrap_or(core::mem::zeroed()) as _, options).ok() } } #[inline] 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<()> @@ -1851,12 +1837,12 @@ where 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); - unsafe { SymSearchW(hprocess, 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())), enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed())), options).ok() } + unsafe { SymSearchW(hprocess, baseofdll, index.unwrap_or(core::mem::zeroed()) as _, symtag.unwrap_or(core::mem::zeroed()) as _, mask.param().abi(), address.unwrap_or(core::mem::zeroed()) as _, enumsymbolscallback, usercontext.unwrap_or(core::mem::zeroed()) as _, options).ok() } } #[inline] 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); - unsafe { SymSetContext(hprocess, stackframe, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SymSetContext(hprocess, stackframe, context.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SymSetExtendedOption(option: IMAGEHLP_EXTENDED_OPTIONS, value: bool) -> super::super::super::Foundation::BOOL { @@ -1869,7 +1855,7 @@ where 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); - unsafe { SymSetHomeDirectory(core::mem::transmute(hprocess.unwrap_or(core::mem::zeroed())), dir.param().abi()) } + unsafe { SymSetHomeDirectory(hprocess.unwrap_or(core::mem::zeroed()) as _, dir.param().abi()) } } #[inline] pub unsafe fn SymSetHomeDirectoryW(hprocess: Option, dir: P1) -> windows_core::PWSTR @@ -1877,7 +1863,7 @@ where 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); - unsafe { SymSetHomeDirectoryW(core::mem::transmute(hprocess.unwrap_or(core::mem::zeroed())), dir.param().abi()) } + unsafe { SymSetHomeDirectoryW(hprocess.unwrap_or(core::mem::zeroed()) as _, dir.param().abi()) } } #[inline] pub unsafe fn SymSetOptions(symoptions: u32) -> u32 { @@ -1948,7 +1934,7 @@ where P0: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymSrvGetFileIndexInfo(file : windows_core::PCSTR, info : *mut SYMSRV_INDEX_INFO, flags : u32) -> super::super::super::Foundation:: BOOL); - unsafe { SymSrvGetFileIndexInfo(file.param().abi(), core::mem::transmute(info), flags).ok() } + unsafe { SymSrvGetFileIndexInfo(file.param().abi(), info as _, flags).ok() } } #[inline] pub unsafe fn SymSrvGetFileIndexInfoW(file: P0, info: *mut SYMSRV_INDEX_INFOW, flags: u32) -> windows_core::Result<()> @@ -1956,7 +1942,7 @@ where P0: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymSrvGetFileIndexInfoW(file : windows_core::PCWSTR, info : *mut SYMSRV_INDEX_INFOW, flags : u32) -> super::super::super::Foundation:: BOOL); - unsafe { SymSrvGetFileIndexInfoW(file.param().abi(), core::mem::transmute(info), flags).ok() } + unsafe { SymSrvGetFileIndexInfoW(file.param().abi(), info as _, flags).ok() } } #[inline] pub unsafe fn SymSrvGetFileIndexString(hprocess: super::super::super::Foundation::HANDLE, srvpath: P1, file: P2, index: &mut [u8], flags: u32) -> windows_core::Result<()> @@ -1982,7 +1968,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); - unsafe { SymSrvGetFileIndexes(file.param().abi(), core::mem::transmute(id), core::mem::transmute(val1), core::mem::transmute(val2.unwrap_or(core::mem::zeroed())), flags).ok() } + unsafe { SymSrvGetFileIndexes(file.param().abi(), id as _, val1 as _, val2.unwrap_or(core::mem::zeroed()) as _, 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<()> @@ -1990,7 +1976,7 @@ where P0: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymSrvGetFileIndexesW(file : windows_core::PCWSTR, id : *mut windows_core::GUID, val1 : *mut u32, val2 : *mut u32, flags : u32) -> super::super::super::Foundation:: BOOL); - unsafe { SymSrvGetFileIndexesW(file.param().abi(), core::mem::transmute(id), core::mem::transmute(val1), core::mem::transmute(val2.unwrap_or(core::mem::zeroed())), flags).ok() } + unsafe { SymSrvGetFileIndexesW(file.param().abi(), id as _, val1 as _, val2.unwrap_or(core::mem::zeroed()) as _, flags).ok() } } #[inline] pub unsafe fn SymSrvGetSupplement(hprocess: super::super::super::Foundation::HANDLE, sympath: P1, node: P2, file: P3) -> windows_core::PCSTR @@ -2018,7 +2004,7 @@ where 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); - unsafe { SymSrvIsStore(core::mem::transmute(hprocess.unwrap_or(core::mem::zeroed())), path.param().abi()).ok() } + unsafe { SymSrvIsStore(hprocess.unwrap_or(core::mem::zeroed()) as _, path.param().abi()).ok() } } #[inline] pub unsafe fn SymSrvIsStoreW(hprocess: Option, path: P1) -> windows_core::Result<()> @@ -2026,7 +2012,7 @@ where 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); - unsafe { SymSrvIsStoreW(core::mem::transmute(hprocess.unwrap_or(core::mem::zeroed())), path.param().abi()).ok() } + unsafe { SymSrvIsStoreW(hprocess.unwrap_or(core::mem::zeroed()) as _, path.param().abi()).ok() } } #[inline] pub unsafe fn SymSrvStoreFile(hprocess: super::super::super::Foundation::HANDLE, srvpath: P1, file: P2, flags: SYM_SRV_STORE_FILE_FLAGS) -> windows_core::PCSTR @@ -2096,7 +2082,7 @@ pub unsafe fn TerminateProcessOnMemoryExhaustion(failedallocationsize: usize) { #[inline] 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); - unsafe { TouchFileTimes(filehandle, core::mem::transmute(psystemtime.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { TouchFileTimes(filehandle, psystemtime.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn UnDecorateSymbolName(name: P0, outputstring: &mut [u8], flags: u32) -> u32 @@ -2118,7 +2104,7 @@ where #[inline] pub unsafe fn UnMapAndLoad(loadedimage: *mut LOADED_IMAGE) -> windows_core::Result<()> { windows_targets::link!("imagehlp.dll" "system" fn UnMapAndLoad(loadedimage : *mut LOADED_IMAGE) -> super::super::super::Foundation:: BOOL); - unsafe { UnMapAndLoad(core::mem::transmute(loadedimage)).ok() } + unsafe { UnMapAndLoad(loadedimage as _).ok() } } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -2150,23 +2136,23 @@ where #[inline] pub unsafe fn WaitForDebugEvent(lpdebugevent: *mut DEBUG_EVENT, dwmilliseconds: u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn WaitForDebugEvent(lpdebugevent : *mut DEBUG_EVENT, dwmilliseconds : u32) -> super::super::super::Foundation:: BOOL); - unsafe { WaitForDebugEvent(core::mem::transmute(lpdebugevent), dwmilliseconds).ok() } + unsafe { WaitForDebugEvent(lpdebugevent as _, dwmilliseconds).ok() } } #[cfg(feature = "Win32_System_Threading")] #[inline] pub unsafe fn WaitForDebugEventEx(lpdebugevent: *mut DEBUG_EVENT, dwmilliseconds: u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn WaitForDebugEventEx(lpdebugevent : *mut DEBUG_EVENT, dwmilliseconds : u32) -> super::super::super::Foundation:: BOOL); - unsafe { WaitForDebugEventEx(core::mem::transmute(lpdebugevent), dwmilliseconds).ok() } + unsafe { WaitForDebugEventEx(lpdebugevent as _, dwmilliseconds).ok() } } #[inline] 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); - unsafe { Wow64GetThreadContext(hthread, core::mem::transmute(lpcontext)).ok() } + unsafe { Wow64GetThreadContext(hthread, lpcontext as _).ok() } } #[inline] 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); - unsafe { Wow64GetThreadSelectorEntry(hthread, dwselector, core::mem::transmute(lpselectorentry)).ok() } + unsafe { Wow64GetThreadSelectorEntry(hthread, dwselector, lpselectorentry as _).ok() } } #[inline] pub unsafe fn Wow64SetThreadContext(hthread: super::super::super::Foundation::HANDLE, lpcontext: *const WOW64_CONTEXT) -> windows_core::Result<()> { @@ -2176,7 +2162,7 @@ pub unsafe fn Wow64SetThreadContext(hthread: super::super::super::Foundation::HA #[inline] 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); - unsafe { WriteProcessMemory(hprocess, lpbaseaddress, lpbuffer, nsize, core::mem::transmute(lpnumberofbyteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WriteProcessMemory(hprocess, lpbaseaddress, lpbuffer, nsize, lpnumberofbyteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } pub const ABNORMAL_RESET_DETECTED: BUGCHECK_ERROR = BUGCHECK_ERROR(327u32); pub const ACPI_BIOS_ERROR: BUGCHECK_ERROR = BUGCHECK_ERROR(165u32); @@ -4071,7 +4057,7 @@ windows_core::imp::interface_hierarchy!(IEnumDebugExtendedPropertyInfo, windows_ impl IEnumDebugExtendedPropertyInfo { #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn Next(&self, rgextendedpropertyinfo: &mut [ExtendedDebugPropertyInfo], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgextendedpropertyinfo.len().try_into().unwrap(), core::mem::transmute(rgextendedpropertyinfo.as_ptr()), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgextendedpropertyinfo.len().try_into().unwrap(), core::mem::transmute(rgextendedpropertyinfo.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -4176,7 +4162,7 @@ windows_core::imp::define_interface!(IEnumDebugPropertyInfo, IEnumDebugPropertyI windows_core::imp::interface_hierarchy!(IEnumDebugPropertyInfo, windows_core::IUnknown); impl IEnumDebugPropertyInfo { pub unsafe fn Next(&self, pi: &mut [DebugPropertyInfo], pceltsfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pi.len().try_into().unwrap(), core::mem::transmute(pi.as_ptr()), core::mem::transmute(pceltsfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pi.len().try_into().unwrap(), core::mem::transmute(pi.as_ptr()), pceltsfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -5675,7 +5661,7 @@ windows_core::imp::define_interface!(IObjectSafety, IObjectSafety_Vtbl, 0xcb5bdc windows_core::imp::interface_hierarchy!(IObjectSafety, windows_core::IUnknown); impl IObjectSafety { pub unsafe fn GetInterfaceSafetyOptions(&self, riid: *const windows_core::GUID, pdwsupportedoptions: *mut u32, pdwenabledoptions: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInterfaceSafetyOptions)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(pdwsupportedoptions), core::mem::transmute(pdwenabledoptions)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInterfaceSafetyOptions)(windows_core::Interface::as_raw(self), riid, pdwsupportedoptions as _, pdwenabledoptions as _).ok() } } pub unsafe fn SetInterfaceSafetyOptions(&self, riid: *const windows_core::GUID, dwoptionsetmask: u32, dwenabledoptions: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetInterfaceSafetyOptions)(windows_core::Interface::as_raw(self), riid, dwoptionsetmask, dwenabledoptions).ok() } @@ -5756,7 +5742,7 @@ impl IPerPropertyBrowsing2 { } #[cfg(feature = "Win32_System_Ole")] pub unsafe fn GetPredefinedStrings(&self, dispid: i32, pcastrings: *mut super::super::Ole::CALPOLESTR, pcacookies: *mut super::super::Ole::CADWORD) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPredefinedStrings)(windows_core::Interface::as_raw(self), dispid, core::mem::transmute(pcastrings), core::mem::transmute(pcacookies)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPredefinedStrings)(windows_core::Interface::as_raw(self), dispid, pcastrings as _, pcacookies as _).ok() } } pub unsafe fn SetPredefinedValue(&self, dispid: i32, dwcookie: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetPredefinedValue)(windows_core::Interface::as_raw(self), dispid, dwcookie).ok() } 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 faaca16514..b7d58de674 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 @@ -9,7 +9,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn ControlTraceA(tracehandle : CONTROLTRACE_HANDLE, instancename : windows_core::PCSTR, properties : *mut EVENT_TRACE_PROPERTIES, controlcode : EVENT_TRACE_CONTROL) -> super::super::super::Foundation:: WIN32_ERROR); - unsafe { ControlTraceA(core::mem::transmute(tracehandle), instancename.param().abi(), core::mem::transmute(properties), controlcode) } + unsafe { ControlTraceA(core::mem::transmute(tracehandle), instancename.param().abi(), properties as _, controlcode) } } #[inline] pub unsafe fn ControlTraceW(tracehandle: CONTROLTRACE_HANDLE, instancename: P1, properties: *mut EVENT_TRACE_PROPERTIES, controlcode: EVENT_TRACE_CONTROL) -> super::super::super::Foundation::WIN32_ERROR @@ -17,12 +17,12 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn ControlTraceW(tracehandle : CONTROLTRACE_HANDLE, instancename : windows_core::PCWSTR, properties : *mut EVENT_TRACE_PROPERTIES, controlcode : EVENT_TRACE_CONTROL) -> super::super::super::Foundation:: WIN32_ERROR); - unsafe { ControlTraceW(core::mem::transmute(tracehandle), instancename.param().abi(), core::mem::transmute(properties), controlcode) } + unsafe { ControlTraceW(core::mem::transmute(tracehandle), instancename.param().abi(), properties as _, controlcode) } } #[inline] 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); - unsafe { CreateTraceInstanceId(reghandle, core::mem::transmute(instinfo)) } + unsafe { CreateTraceInstanceId(reghandle, instinfo as _) } } #[inline] pub unsafe fn CveEventWrite(cveid: P0, additionaldetails: P1) -> i32 @@ -41,22 +41,22 @@ 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); - unsafe { EnableTraceEx(providerid, core::mem::transmute(sourceid.unwrap_or(core::mem::zeroed())), core::mem::transmute(tracehandle), isenabled, level, matchanykeyword, matchallkeyword, enableproperty, core::mem::transmute(enablefilterdesc.unwrap_or(core::mem::zeroed()))) } + unsafe { EnableTraceEx(providerid, sourceid.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(tracehandle), isenabled, level, matchanykeyword, matchallkeyword, enableproperty, enablefilterdesc.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { EnableTraceEx2(core::mem::transmute(tracehandle), providerid, controlcode, level, matchanykeyword, matchallkeyword, timeout, core::mem::transmute(enableparameters.unwrap_or(core::mem::zeroed()))) } + unsafe { EnableTraceEx2(core::mem::transmute(tracehandle), providerid, controlcode, level, matchanykeyword, matchallkeyword, timeout, enableparameters.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn EnumerateTraceGuids(guidpropertiesarray: &mut [*mut TRACE_GUID_PROPERTIES], guidcount: *mut u32) -> super::super::super::Foundation::WIN32_ERROR { windows_targets::link!("advapi32.dll" "system" fn EnumerateTraceGuids(guidpropertiesarray : *mut *mut TRACE_GUID_PROPERTIES, propertyarraycount : u32, guidcount : *mut u32) -> super::super::super::Foundation:: WIN32_ERROR); - unsafe { EnumerateTraceGuids(core::mem::transmute(guidpropertiesarray.as_ptr()), guidpropertiesarray.len().try_into().unwrap(), core::mem::transmute(guidcount)) } + unsafe { EnumerateTraceGuids(core::mem::transmute(guidpropertiesarray.as_ptr()), guidpropertiesarray.len().try_into().unwrap(), guidcount as _) } } #[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); - unsafe { EnumerateTraceGuidsEx(tracequeryinfoclass, core::mem::transmute(inbuffer.unwrap_or(core::mem::zeroed())), inbuffersize, core::mem::transmute(outbuffer.unwrap_or(core::mem::zeroed())), outbuffersize, core::mem::transmute(returnlength)) } + unsafe { EnumerateTraceGuidsEx(tracequeryinfoclass, inbuffer.unwrap_or(core::mem::zeroed()) as _, inbuffersize, outbuffer.unwrap_or(core::mem::zeroed()) as _, outbuffersize, returnlength as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -68,7 +68,7 @@ pub unsafe fn EventAccessControl(guid: *const windows_core::GUID, operation: u32 #[inline] 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); - unsafe { EventAccessQuery(guid, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize)) } + unsafe { EventAccessQuery(guid, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize as _) } } #[inline] pub unsafe fn EventAccessRemove(guid: *const windows_core::GUID) -> u32 { @@ -78,7 +78,7 @@ pub unsafe fn EventAccessRemove(guid: *const windows_core::GUID) -> u32 { #[inline] pub unsafe fn EventActivityIdControl(controlcode: u32, activityid: *mut windows_core::GUID) -> u32 { windows_targets::link!("advapi32.dll" "system" fn EventActivityIdControl(controlcode : u32, activityid : *mut windows_core::GUID) -> u32); - unsafe { EventActivityIdControl(controlcode, core::mem::transmute(activityid)) } + unsafe { EventActivityIdControl(controlcode, activityid as _) } } #[inline] pub unsafe fn EventEnabled(reghandle: REGHANDLE, eventdescriptor: *const EVENT_DESCRIPTOR) -> bool { @@ -93,7 +93,7 @@ pub unsafe fn EventProviderEnabled(reghandle: REGHANDLE, level: u8, keyword: u64 #[inline] 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); - unsafe { EventRegister(providerid, core::mem::transmute(enablecallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(reghandle)) } + unsafe { EventRegister(providerid, enablecallback.unwrap_or(core::mem::zeroed()) as _, callbackcontext.unwrap_or(core::mem::zeroed()) as _, reghandle as _) } } #[inline] pub unsafe fn EventSetInformation(reghandle: REGHANDLE, informationclass: EVENT_INFO_CLASS, eventinformation: *const core::ffi::c_void, informationlength: u32) -> u32 { @@ -113,7 +113,7 @@ pub unsafe fn EventWrite(reghandle: REGHANDLE, eventdescriptor: *const EVENT_DES #[inline] 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); - unsafe { EventWriteEx(reghandle, eventdescriptor, filter, 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()))) } + unsafe { EventWriteEx(reghandle, eventdescriptor, filter, flags, activityid.unwrap_or(core::mem::zeroed()) as _, relatedactivityid.unwrap_or(core::mem::zeroed()) as _, 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: REGHANDLE, level: u8, keyword: u64, string: P3) -> u32 @@ -126,7 +126,7 @@ where #[inline] 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); - unsafe { EventWriteTransfer(reghandle, 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()))) } + unsafe { EventWriteTransfer(reghandle, eventdescriptor, activityid.unwrap_or(core::mem::zeroed()) as _, relatedactivityid.unwrap_or(core::mem::zeroed()) as _, 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 @@ -134,7 +134,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn FlushTraceA(tracehandle : CONTROLTRACE_HANDLE, instancename : windows_core::PCSTR, properties : *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation:: WIN32_ERROR); - unsafe { FlushTraceA(core::mem::transmute(tracehandle), instancename.param().abi(), core::mem::transmute(properties)) } + unsafe { FlushTraceA(core::mem::transmute(tracehandle), instancename.param().abi(), properties as _) } } #[inline] pub unsafe fn FlushTraceW(tracehandle: CONTROLTRACE_HANDLE, instancename: P1, properties: *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation::WIN32_ERROR @@ -142,7 +142,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn FlushTraceW(tracehandle : CONTROLTRACE_HANDLE, instancename : windows_core::PCWSTR, properties : *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation:: WIN32_ERROR); - unsafe { FlushTraceW(core::mem::transmute(tracehandle), instancename.param().abi(), core::mem::transmute(properties)) } + unsafe { FlushTraceW(core::mem::transmute(tracehandle), instancename.param().abi(), properties as _) } } #[inline] pub unsafe fn GetTraceEnableFlags(tracehandle: u64) -> u32 { @@ -163,13 +163,13 @@ pub unsafe fn GetTraceLoggerHandle(buffer: *const core::ffi::c_void) -> u64 { #[inline] pub unsafe fn OpenTraceA(logfile: *mut EVENT_TRACE_LOGFILEA) -> PROCESSTRACE_HANDLE { windows_targets::link!("advapi32.dll" "system" fn OpenTraceA(logfile : *mut EVENT_TRACE_LOGFILEA) -> PROCESSTRACE_HANDLE); - unsafe { OpenTraceA(core::mem::transmute(logfile)) } + unsafe { OpenTraceA(logfile as _) } } #[cfg(feature = "Win32_System_Time")] #[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); - unsafe { OpenTraceFromBufferStream(options, buffercompletioncallback, core::mem::transmute(buffercompletioncontext.unwrap_or(core::mem::zeroed()))) } + unsafe { OpenTraceFromBufferStream(options, buffercompletioncallback, buffercompletioncontext.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Time")] #[inline] @@ -178,7 +178,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); - unsafe { OpenTraceFromFile(logfilename.param().abi(), options, core::mem::transmute(logfileheader.unwrap_or(core::mem::zeroed()))) } + unsafe { OpenTraceFromFile(logfilename.param().abi(), options, logfileheader.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Time")] #[inline] @@ -187,7 +187,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn OpenTraceFromRealTimeLogger(loggername : windows_core::PCWSTR, options : *const ETW_OPEN_TRACE_OPTIONS, logfileheader : *mut TRACE_LOGFILE_HEADER) -> u64); - unsafe { OpenTraceFromRealTimeLogger(loggername.param().abi(), options, core::mem::transmute(logfileheader.unwrap_or(core::mem::zeroed()))) } + unsafe { OpenTraceFromRealTimeLogger(loggername.param().abi(), options, logfileheader.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Time")] #[inline] @@ -196,18 +196,18 @@ where P0: 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); - unsafe { OpenTraceFromRealTimeLoggerWithAllocationOptions(loggername.param().abi(), options, allocationsize, core::mem::transmute(memorypartitionhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(logfileheader.unwrap_or(core::mem::zeroed()))) } + unsafe { OpenTraceFromRealTimeLoggerWithAllocationOptions(loggername.param().abi(), options, allocationsize, memorypartitionhandle.unwrap_or(core::mem::zeroed()) as _, logfileheader.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Time")] #[inline] pub unsafe fn OpenTraceW(logfile: *mut EVENT_TRACE_LOGFILEW) -> PROCESSTRACE_HANDLE { windows_targets::link!("advapi32.dll" "system" fn OpenTraceW(logfile : *mut EVENT_TRACE_LOGFILEW) -> PROCESSTRACE_HANDLE); - unsafe { OpenTraceW(core::mem::transmute(logfile)) } + unsafe { OpenTraceW(logfile as _) } } #[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); - unsafe { 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()))) } + unsafe { ProcessTrace(core::mem::transmute(handlearray.as_ptr()), handlearray.len().try_into().unwrap(), starttime.unwrap_or(core::mem::zeroed()) as _, endtime.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ProcessTraceAddBufferToBufferStream(tracehandle: u64, buffer: *const ETW_BUFFER_HEADER, buffersize: u32) -> u32 { @@ -227,12 +227,12 @@ pub unsafe fn ProcessTraceBufferIncrementReference(tracehandle: u64, buffer: *co #[inline] pub unsafe fn QueryAllTracesA(propertyarray: &mut [*mut EVENT_TRACE_PROPERTIES], loggercount: *mut u32) -> super::super::super::Foundation::WIN32_ERROR { windows_targets::link!("advapi32.dll" "system" fn QueryAllTracesA(propertyarray : *mut *mut EVENT_TRACE_PROPERTIES, propertyarraycount : u32, loggercount : *mut u32) -> super::super::super::Foundation:: WIN32_ERROR); - unsafe { QueryAllTracesA(core::mem::transmute(propertyarray.as_ptr()), propertyarray.len().try_into().unwrap(), core::mem::transmute(loggercount)) } + unsafe { QueryAllTracesA(core::mem::transmute(propertyarray.as_ptr()), propertyarray.len().try_into().unwrap(), loggercount as _) } } #[inline] pub unsafe fn QueryAllTracesW(propertyarray: &mut [*mut EVENT_TRACE_PROPERTIES], loggercount: *mut u32) -> super::super::super::Foundation::WIN32_ERROR { windows_targets::link!("advapi32.dll" "system" fn QueryAllTracesW(propertyarray : *mut *mut EVENT_TRACE_PROPERTIES, propertyarraycount : u32, loggercount : *mut u32) -> super::super::super::Foundation:: WIN32_ERROR); - unsafe { QueryAllTracesW(core::mem::transmute(propertyarray.as_ptr()), propertyarray.len().try_into().unwrap(), core::mem::transmute(loggercount)) } + unsafe { QueryAllTracesW(core::mem::transmute(propertyarray.as_ptr()), propertyarray.len().try_into().unwrap(), loggercount as _) } } #[inline] pub unsafe fn QueryTraceA(tracehandle: CONTROLTRACE_HANDLE, instancename: P1, properties: *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation::WIN32_ERROR @@ -240,12 +240,12 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn QueryTraceA(tracehandle : CONTROLTRACE_HANDLE, instancename : windows_core::PCSTR, properties : *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation:: WIN32_ERROR); - unsafe { QueryTraceA(core::mem::transmute(tracehandle), instancename.param().abi(), core::mem::transmute(properties)) } + unsafe { QueryTraceA(core::mem::transmute(tracehandle), instancename.param().abi(), properties as _) } } #[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); - unsafe { QueryTraceProcessingHandle(core::mem::transmute(processinghandle), informationclass, core::mem::transmute(inbuffer.unwrap_or(core::mem::zeroed())), inbuffersize, core::mem::transmute(outbuffer.unwrap_or(core::mem::zeroed())), outbuffersize, core::mem::transmute(returnlength)) } + unsafe { QueryTraceProcessingHandle(core::mem::transmute(processinghandle), informationclass, inbuffer.unwrap_or(core::mem::zeroed()) as _, inbuffersize, outbuffer.unwrap_or(core::mem::zeroed()) as _, outbuffersize, returnlength as _) } } #[inline] pub unsafe fn QueryTraceW(tracehandle: CONTROLTRACE_HANDLE, instancename: P1, properties: *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation::WIN32_ERROR @@ -253,7 +253,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn QueryTraceW(tracehandle : CONTROLTRACE_HANDLE, instancename : windows_core::PCWSTR, properties : *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation:: WIN32_ERROR); - unsafe { QueryTraceW(core::mem::transmute(tracehandle), instancename.param().abi(), core::mem::transmute(properties)) } + unsafe { QueryTraceW(core::mem::transmute(tracehandle), instancename.param().abi(), properties as _) } } #[inline] pub unsafe fn RegisterTraceGuidsA(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 @@ -262,7 +262,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); - unsafe { RegisterTraceGuidsA(requestaddress, core::mem::transmute(requestcontext.unwrap_or(core::mem::zeroed())), 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)) } + unsafe { RegisterTraceGuidsA(requestaddress, requestcontext.unwrap_or(core::mem::zeroed()) as _, controlguid, traceguidreg.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(traceguidreg.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), mofimagepath.param().abi(), mofresourcename.param().abi(), registrationhandle as _) } } #[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 @@ -271,7 +271,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); - unsafe { RegisterTraceGuidsW(requestaddress, core::mem::transmute(requestcontext.unwrap_or(core::mem::zeroed())), 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)) } + unsafe { RegisterTraceGuidsW(requestaddress, requestcontext.unwrap_or(core::mem::zeroed()) as _, controlguid, traceguidreg.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(traceguidreg.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), mofimagepath.param().abi(), mofresourcename.param().abi(), registrationhandle as _) } } #[inline] pub unsafe fn RemoveTraceCallback(pguid: *const windows_core::GUID) -> super::super::super::Foundation::WIN32_ERROR { @@ -289,7 +289,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn StartTraceA(tracehandle : *mut CONTROLTRACE_HANDLE, instancename : windows_core::PCSTR, properties : *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation:: WIN32_ERROR); - unsafe { StartTraceA(core::mem::transmute(tracehandle), instancename.param().abi(), core::mem::transmute(properties)) } + unsafe { StartTraceA(tracehandle as _, instancename.param().abi(), properties as _) } } #[inline] pub unsafe fn StartTraceW(tracehandle: *mut CONTROLTRACE_HANDLE, instancename: P1, properties: *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation::WIN32_ERROR @@ -297,7 +297,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn StartTraceW(tracehandle : *mut CONTROLTRACE_HANDLE, instancename : windows_core::PCWSTR, properties : *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation:: WIN32_ERROR); - unsafe { StartTraceW(core::mem::transmute(tracehandle), instancename.param().abi(), core::mem::transmute(properties)) } + unsafe { StartTraceW(tracehandle as _, instancename.param().abi(), properties as _) } } #[inline] pub unsafe fn StopTraceA(tracehandle: CONTROLTRACE_HANDLE, instancename: P1, properties: *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation::WIN32_ERROR @@ -305,7 +305,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn StopTraceA(tracehandle : CONTROLTRACE_HANDLE, instancename : windows_core::PCSTR, properties : *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation:: WIN32_ERROR); - unsafe { StopTraceA(core::mem::transmute(tracehandle), instancename.param().abi(), core::mem::transmute(properties)) } + unsafe { StopTraceA(core::mem::transmute(tracehandle), instancename.param().abi(), properties as _) } } #[inline] pub unsafe fn StopTraceW(tracehandle: CONTROLTRACE_HANDLE, instancename: P1, properties: *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation::WIN32_ERROR @@ -313,17 +313,17 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn StopTraceW(tracehandle : CONTROLTRACE_HANDLE, instancename : windows_core::PCWSTR, properties : *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation:: WIN32_ERROR); - unsafe { StopTraceW(core::mem::transmute(tracehandle), instancename.param().abi(), core::mem::transmute(properties)) } + unsafe { StopTraceW(core::mem::transmute(tracehandle), instancename.param().abi(), properties as _) } } #[inline] pub unsafe fn TdhAggregatePayloadFilters(payloadfiltercount: u32, payloadfilterptrs: *const *const core::ffi::c_void, eventmatchallflags: Option<*const bool>, 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 bool, eventfilterdescriptor : *mut EVENT_FILTER_DESCRIPTOR) -> u32); - unsafe { TdhAggregatePayloadFilters(payloadfiltercount, payloadfilterptrs, core::mem::transmute(eventmatchallflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(eventfilterdescriptor)) } + unsafe { TdhAggregatePayloadFilters(payloadfiltercount, payloadfilterptrs, eventmatchallflags.unwrap_or(core::mem::zeroed()) as _, eventfilterdescriptor as _) } } #[inline] pub unsafe fn TdhCleanupPayloadEventFilterDescriptor(eventfilterdescriptor: *mut EVENT_FILTER_DESCRIPTOR) -> u32 { windows_targets::link!("tdh.dll" "system" fn TdhCleanupPayloadEventFilterDescriptor(eventfilterdescriptor : *mut EVENT_FILTER_DESCRIPTOR) -> u32); - unsafe { TdhCleanupPayloadEventFilterDescriptor(core::mem::transmute(eventfilterdescriptor)) } + unsafe { TdhCleanupPayloadEventFilterDescriptor(eventfilterdescriptor as _) } } #[inline] pub unsafe fn TdhCloseDecodingHandle(handle: TDH_HANDLE) -> u32 { @@ -333,52 +333,52 @@ pub unsafe fn TdhCloseDecodingHandle(handle: TDH_HANDLE) -> u32 { #[inline] pub unsafe fn TdhCreatePayloadFilter(providerguid: *const windows_core::GUID, eventdescriptor: *const EVENT_DESCRIPTOR, eventmatchany: bool, payloadpredicates: &[PAYLOAD_FILTER_PREDICATE], payloadfilter: *mut *mut core::ffi::c_void) -> u32 { windows_targets::link!("tdh.dll" "system" fn TdhCreatePayloadFilter(providerguid : *const windows_core::GUID, eventdescriptor : *const EVENT_DESCRIPTOR, eventmatchany : bool, payloadpredicatecount : u32, payloadpredicates : *const PAYLOAD_FILTER_PREDICATE, payloadfilter : *mut *mut core::ffi::c_void) -> u32); - unsafe { TdhCreatePayloadFilter(providerguid, eventdescriptor, eventmatchany, payloadpredicates.len().try_into().unwrap(), core::mem::transmute(payloadpredicates.as_ptr()), core::mem::transmute(payloadfilter)) } + unsafe { TdhCreatePayloadFilter(providerguid, eventdescriptor, eventmatchany, payloadpredicates.len().try_into().unwrap(), core::mem::transmute(payloadpredicates.as_ptr()), payloadfilter as _) } } #[inline] pub unsafe fn TdhDeletePayloadFilter(payloadfilter: *mut *mut core::ffi::c_void) -> u32 { windows_targets::link!("tdh.dll" "system" fn TdhDeletePayloadFilter(payloadfilter : *mut *mut core::ffi::c_void) -> u32); - unsafe { TdhDeletePayloadFilter(core::mem::transmute(payloadfilter)) } + unsafe { TdhDeletePayloadFilter(payloadfilter as _) } } #[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); - unsafe { TdhEnumerateManifestProviderEvents(providerguid, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize)) } + unsafe { TdhEnumerateManifestProviderEvents(providerguid, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize as _) } } #[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); - unsafe { TdhEnumerateProviderFieldInformation(pguid, eventfieldtype, core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbuffersize)) } + unsafe { TdhEnumerateProviderFieldInformation(pguid, eventfieldtype, pbuffer.unwrap_or(core::mem::zeroed()) as _, pbuffersize as _) } } #[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); - unsafe { TdhEnumerateProviderFilters(guid, tdhcontext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(tdhcontext.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(filtercount), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize)) } + unsafe { TdhEnumerateProviderFilters(guid, tdhcontext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(tdhcontext.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), filtercount as _, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize as _) } } #[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); - unsafe { TdhEnumerateProviders(core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbuffersize)) } + unsafe { TdhEnumerateProviders(pbuffer.unwrap_or(core::mem::zeroed()) as _, pbuffersize as _) } } #[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); - unsafe { TdhEnumerateProvidersForDecodingSource(filter, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(bufferrequired)) } + unsafe { TdhEnumerateProvidersForDecodingSource(filter, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize, bufferrequired as _) } } #[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: 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); - unsafe { TdhFormatProperty(eventinfo, core::mem::transmute(mapinfo.unwrap_or(core::mem::zeroed())), pointersize, propertyintype, propertyouttype, 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)) } + unsafe { TdhFormatProperty(eventinfo, mapinfo.unwrap_or(core::mem::zeroed()) as _, pointersize, propertyintype, propertyouttype, propertylength, userdata.len().try_into().unwrap(), core::mem::transmute(userdata.as_ptr()), buffersize as _, buffer.unwrap_or(core::mem::zeroed()) as _, userdataconsumed as _) } } #[inline] 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); - unsafe { TdhGetDecodingParameter(handle, core::mem::transmute(tdhcontext)) } + unsafe { TdhGetDecodingParameter(handle, tdhcontext as _) } } #[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); - unsafe { TdhGetEventInformation(event, tdhcontext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(tdhcontext.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize)) } + unsafe { TdhGetEventInformation(event, tdhcontext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(tdhcontext.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.unwrap_or(core::mem::zeroed()) as _, buffersize as _) } } #[inline] pub unsafe fn TdhGetEventMapInformation(pevent: *const EVENT_RECORD, pmapname: P1, pbuffer: Option<*mut EVENT_MAP_INFO>, pbuffersize: *mut u32) -> u32 @@ -386,12 +386,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); - unsafe { TdhGetEventMapInformation(pevent, pmapname.param().abi(), core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbuffersize)) } + unsafe { TdhGetEventMapInformation(pevent, pmapname.param().abi(), pbuffer.unwrap_or(core::mem::zeroed()) as _, pbuffersize as _) } } #[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); - unsafe { TdhGetManifestEventInformation(providerguid, eventdescriptor, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize)) } + unsafe { TdhGetManifestEventInformation(providerguid, eventdescriptor, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize as _) } } #[inline] pub unsafe fn TdhGetProperty(pevent: *const EVENT_RECORD, ptdhcontext: Option<&[TDH_CONTEXT]>, ppropertydata: &[PROPERTY_DATA_DESCRIPTOR], pbuffer: &mut [u8]) -> u32 { @@ -401,12 +401,12 @@ pub unsafe fn TdhGetProperty(pevent: *const EVENT_RECORD, ptdhcontext: Option<&[ #[inline] pub unsafe fn TdhGetPropertySize(pevent: *const EVENT_RECORD, ptdhcontext: Option<&[TDH_CONTEXT]>, ppropertydata: &[PROPERTY_DATA_DESCRIPTOR], ppropertysize: *mut u32) -> u32 { windows_targets::link!("tdh.dll" "system" fn TdhGetPropertySize(pevent : *const EVENT_RECORD, tdhcontextcount : u32, ptdhcontext : *const TDH_CONTEXT, propertydatacount : u32, ppropertydata : *const PROPERTY_DATA_DESCRIPTOR, ppropertysize : *mut u32) -> u32); - unsafe { TdhGetPropertySize(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)) } + unsafe { TdhGetPropertySize(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()), ppropertysize as _) } } #[inline] 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); - unsafe { TdhGetWppMessage(handle, eventrecord, core::mem::transmute(buffersize), core::mem::transmute(buffer)) } + unsafe { TdhGetWppMessage(handle, eventrecord, buffersize as _, buffer as _) } } #[inline] pub unsafe fn TdhGetWppProperty(handle: TDH_HANDLE, eventrecord: *const EVENT_RECORD, propertyname: P2, buffersize: *mut u32, buffer: *mut u8) -> u32 @@ -414,7 +414,7 @@ where 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); - unsafe { TdhGetWppProperty(handle, eventrecord, propertyname.param().abi(), core::mem::transmute(buffersize), core::mem::transmute(buffer)) } + unsafe { TdhGetWppProperty(handle, eventrecord, propertyname.param().abi(), buffersize as _, buffer as _) } } #[inline] pub unsafe fn TdhLoadManifest(manifest: P0) -> u32 @@ -440,12 +440,12 @@ pub unsafe fn TdhLoadManifestFromMemory(pdata: *const core::ffi::c_void, cbdata: #[inline] pub unsafe fn TdhOpenDecodingHandle(handle: *mut TDH_HANDLE) -> u32 { windows_targets::link!("tdh.dll" "system" fn TdhOpenDecodingHandle(handle : *mut TDH_HANDLE) -> u32); - unsafe { TdhOpenDecodingHandle(core::mem::transmute(handle)) } + unsafe { TdhOpenDecodingHandle(handle as _) } } #[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); - unsafe { TdhQueryProviderFieldInformation(pguid, eventfieldvalue, eventfieldtype, core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbuffersize)) } + unsafe { TdhQueryProviderFieldInformation(pguid, eventfieldvalue, eventfieldtype, pbuffer.unwrap_or(core::mem::zeroed()) as _, pbuffersize as _) } } #[inline] pub unsafe fn TdhSetDecodingParameter(handle: TDH_HANDLE, tdhcontext: *const TDH_CONTEXT) -> u32 { @@ -473,7 +473,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); - unsafe { TraceEventInstance(tracehandle, eventtrace, instinfo, core::mem::transmute(parentinstinfo.unwrap_or(core::mem::zeroed()))) } + unsafe { TraceEventInstance(tracehandle, eventtrace, instinfo, parentinstinfo.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn TraceMessage(loggerhandle: u64, messageflags: TRACE_MESSAGE_FLAGS, messageguid: *const windows_core::GUID, messagenumber: u16) -> super::super::super::Foundation::WIN32_ERROR { @@ -488,7 +488,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); - unsafe { TraceQueryInformation(core::mem::transmute(sessionhandle), informationclass, core::mem::transmute(traceinformation), informationlength, core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } + unsafe { TraceQueryInformation(core::mem::transmute(sessionhandle), informationclass, traceinformation as _, informationlength, returnlength.unwrap_or(core::mem::zeroed()) as _) } } #[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 { @@ -506,7 +506,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn UpdateTraceA(tracehandle : CONTROLTRACE_HANDLE, instancename : windows_core::PCSTR, properties : *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation:: WIN32_ERROR); - unsafe { UpdateTraceA(core::mem::transmute(tracehandle), instancename.param().abi(), core::mem::transmute(properties)) } + unsafe { UpdateTraceA(core::mem::transmute(tracehandle), instancename.param().abi(), properties as _) } } #[inline] pub unsafe fn UpdateTraceW(tracehandle: CONTROLTRACE_HANDLE, instancename: P1, properties: *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation::WIN32_ERROR @@ -514,7 +514,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn UpdateTraceW(tracehandle : CONTROLTRACE_HANDLE, instancename : windows_core::PCWSTR, properties : *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation:: WIN32_ERROR); - unsafe { UpdateTraceW(core::mem::transmute(tracehandle), instancename.param().abi(), core::mem::transmute(properties)) } + unsafe { UpdateTraceW(core::mem::transmute(tracehandle), instancename.param().abi(), properties as _) } } pub const ALPCGuid: windows_core::GUID = windows_core::GUID::from_u128(0x45d8cccd_539f_4b72_a8b7_5c683142609a); #[repr(C)] 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 899f2eff19..93a6cb5a45 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,12 +1,12 @@ #[inline] 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); - unsafe { PssCaptureSnapshot(processhandle, captureflags, core::mem::transmute(threadcontextflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(snapshothandle)) } + unsafe { PssCaptureSnapshot(processhandle, captureflags, threadcontextflags.unwrap_or(core::mem::zeroed()) as _, snapshothandle as _) } } #[inline] 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); - unsafe { PssDuplicateSnapshot(sourceprocesshandle, snapshothandle, targetprocesshandle, core::mem::transmute(targetsnapshothandle), core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))) } + unsafe { PssDuplicateSnapshot(sourceprocesshandle, snapshothandle, targetprocesshandle, targetsnapshothandle as _, flags.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn PssFreeSnapshot(processhandle: super::super::super::Foundation::HANDLE, snapshothandle: HPSS) -> u32 { @@ -16,12 +16,12 @@ pub unsafe fn PssFreeSnapshot(processhandle: super::super::super::Foundation::HA #[inline] 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); - unsafe { PssQuerySnapshot(snapshothandle, informationclass, core::mem::transmute(buffer), bufferlength) } + unsafe { PssQuerySnapshot(snapshothandle, informationclass, buffer as _, 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); - unsafe { PssWalkMarkerCreate(core::mem::transmute(allocator.unwrap_or(core::mem::zeroed())), core::mem::transmute(walkmarkerhandle)) } + unsafe { PssWalkMarkerCreate(allocator.unwrap_or(core::mem::zeroed()) as _, walkmarkerhandle as _) } } #[inline] pub unsafe fn PssWalkMarkerFree(walkmarkerhandle: HPSSWALK) -> u32 { @@ -31,7 +31,7 @@ pub unsafe fn PssWalkMarkerFree(walkmarkerhandle: HPSSWALK) -> u32 { #[inline] pub unsafe fn PssWalkMarkerGetPosition(walkmarkerhandle: HPSSWALK, position: *mut usize) -> u32 { windows_targets::link!("kernel32.dll" "system" fn PssWalkMarkerGetPosition(walkmarkerhandle : HPSSWALK, position : *mut usize) -> u32); - unsafe { PssWalkMarkerGetPosition(walkmarkerhandle, core::mem::transmute(position)) } + unsafe { PssWalkMarkerGetPosition(walkmarkerhandle, position as _) } } #[inline] pub unsafe fn PssWalkMarkerSeekToBeginning(walkmarkerhandle: HPSSWALK) -> u32 { 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 5fa8f64d40..8ba28bf14b 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 @@ -7,77 +7,77 @@ pub unsafe fn CreateToolhelp32Snapshot(dwflags: CREATE_TOOLHELP_SNAPSHOT_FLAGS, #[inline] pub unsafe fn Heap32First(lphe: *mut HEAPENTRY32, th32processid: u32, th32heapid: usize) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn Heap32First(lphe : *mut HEAPENTRY32, th32processid : u32, th32heapid : usize) -> super::super::super::Foundation:: BOOL); - unsafe { Heap32First(core::mem::transmute(lphe), th32processid, th32heapid).ok() } + unsafe { Heap32First(lphe as _, th32processid, th32heapid).ok() } } #[inline] 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); - unsafe { Heap32ListFirst(hsnapshot, core::mem::transmute(lphl)).ok() } + unsafe { Heap32ListFirst(hsnapshot, lphl as _).ok() } } #[inline] 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); - unsafe { Heap32ListNext(hsnapshot, core::mem::transmute(lphl)).ok() } + unsafe { Heap32ListNext(hsnapshot, lphl as _).ok() } } #[inline] pub unsafe fn Heap32Next(lphe: *mut HEAPENTRY32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn Heap32Next(lphe : *mut HEAPENTRY32) -> super::super::super::Foundation:: BOOL); - unsafe { Heap32Next(core::mem::transmute(lphe)).ok() } + unsafe { Heap32Next(lphe as _).ok() } } #[inline] 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); - unsafe { Module32First(hsnapshot, core::mem::transmute(lpme)).ok() } + unsafe { Module32First(hsnapshot, lpme as _).ok() } } #[inline] 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); - unsafe { Module32FirstW(hsnapshot, core::mem::transmute(lpme)).ok() } + unsafe { Module32FirstW(hsnapshot, lpme as _).ok() } } #[inline] 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); - unsafe { Module32Next(hsnapshot, core::mem::transmute(lpme)).ok() } + unsafe { Module32Next(hsnapshot, lpme as _).ok() } } #[inline] 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); - unsafe { Module32NextW(hsnapshot, core::mem::transmute(lpme)).ok() } + unsafe { Module32NextW(hsnapshot, lpme as _).ok() } } #[inline] 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); - unsafe { Process32First(hsnapshot, core::mem::transmute(lppe)).ok() } + unsafe { Process32First(hsnapshot, lppe as _).ok() } } #[inline] 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); - unsafe { Process32FirstW(hsnapshot, core::mem::transmute(lppe)).ok() } + unsafe { Process32FirstW(hsnapshot, lppe as _).ok() } } #[inline] 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); - unsafe { Process32Next(hsnapshot, core::mem::transmute(lppe)).ok() } + unsafe { Process32Next(hsnapshot, lppe as _).ok() } } #[inline] 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); - unsafe { Process32NextW(hsnapshot, core::mem::transmute(lppe)).ok() } + unsafe { Process32NextW(hsnapshot, lppe as _).ok() } } #[inline] 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); - unsafe { Thread32First(hsnapshot, core::mem::transmute(lpte)).ok() } + unsafe { Thread32First(hsnapshot, lpte as _).ok() } } #[inline] 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); - unsafe { Thread32Next(hsnapshot, core::mem::transmute(lpte)).ok() } + unsafe { Thread32Next(hsnapshot, lpte as _).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 { windows_targets::link!("kernel32.dll" "system" 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); - unsafe { Toolhelp32ReadProcessMemory(th32processid, lpbaseaddress, core::mem::transmute(lpbuffer), cbread, core::mem::transmute(lpnumberofbytesread)) } + unsafe { Toolhelp32ReadProcessMemory(th32processid, lpbaseaddress, lpbuffer as _, cbread, lpnumberofbytesread as _) } } #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] 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 799ea2650e..f1b4cd8702 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); - unsafe { DtcGetTransactionManager(i_pszhost.param().abi(), i_psztmname.param().abi(), i_riid, i_dwreserved1, i_wcbreserved2, core::mem::transmute(i_pvreserved2.unwrap_or(core::mem::zeroed())), core::mem::transmute(o_ppvobject)).ok() } + unsafe { DtcGetTransactionManager(i_pszhost.param().abi(), i_psztmname.param().abi(), i_riid, i_dwreserved1, i_wcbreserved2, i_pvreserved2.unwrap_or(core::mem::zeroed()) as _, o_ppvobject as _).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); - unsafe { DtcGetTransactionManagerC(i_pszhost.param().abi(), i_psztmname.param().abi(), i_riid, i_dwreserved1, i_wcbreserved2, core::mem::transmute(i_pvreserved2.unwrap_or(core::mem::zeroed())), core::mem::transmute(o_ppvobject)).ok() } + unsafe { DtcGetTransactionManagerC(i_pszhost.param().abi(), i_psztmname.param().abi(), i_riid, i_dwreserved1, i_wcbreserved2, i_pvreserved2.unwrap_or(core::mem::zeroed()) as _, o_ppvobject as _).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<()> @@ -23,7 +23,7 @@ where P1: windows_core::Param, { windows_targets::link!("xolehlp.dll" "cdecl" fn DtcGetTransactionManagerExA(i_pszhost : windows_core::PCSTR, i_psztmname : windows_core::PCSTR, 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::HRESULT); - unsafe { DtcGetTransactionManagerExA(i_pszhost.param().abi(), i_psztmname.param().abi(), i_riid, i_grfoptions, core::mem::transmute(i_pvconfigparams), core::mem::transmute(o_ppvobject)).ok() } + unsafe { DtcGetTransactionManagerExA(i_pszhost.param().abi(), i_psztmname.param().abi(), i_riid, i_grfoptions, i_pvconfigparams as _, o_ppvobject as _).ok() } } #[inline] pub unsafe fn DtcGetTransactionManagerExW(i_pwszhost: P0, i_pwsztmname: 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<()> @@ -32,7 +32,7 @@ where P1: windows_core::Param, { windows_targets::link!("xolehlp.dll" "cdecl" fn DtcGetTransactionManagerExW(i_pwszhost : windows_core::PCWSTR, i_pwsztmname : windows_core::PCWSTR, 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::HRESULT); - unsafe { DtcGetTransactionManagerExW(i_pwszhost.param().abi(), i_pwsztmname.param().abi(), i_riid, i_grfoptions, core::mem::transmute(i_pvconfigparams), core::mem::transmute(o_ppvobject)).ok() } + unsafe { DtcGetTransactionManagerExW(i_pwszhost.param().abi(), i_pwsztmname.param().abi(), i_riid, i_grfoptions, i_pvconfigparams as _, o_ppvobject as _).ok() } } #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] @@ -228,7 +228,7 @@ windows_core::imp::define_interface!(IDtcLuRecoveryInitiatedByDtc, IDtcLuRecover windows_core::imp::interface_hierarchy!(IDtcLuRecoveryInitiatedByDtc, windows_core::IUnknown); impl IDtcLuRecoveryInitiatedByDtc { pub unsafe fn GetWork(&self, pwork: *mut DTCINITIATEDRECOVERYWORK, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWork)(windows_core::Interface::as_raw(self), core::mem::transmute(pwork), core::mem::transmute(ppv)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWork)(windows_core::Interface::as_raw(self), pwork as _, ppv as _).ok() } } } #[repr(C)] @@ -288,31 +288,31 @@ windows_core::imp::define_interface!(IDtcLuRecoveryInitiatedByDtcTransWork, IDtc windows_core::imp::interface_hierarchy!(IDtcLuRecoveryInitiatedByDtcTransWork, windows_core::IUnknown); impl IDtcLuRecoveryInitiatedByDtcTransWork { pub unsafe fn GetLogNameSizes(&self, pcbourlogname: *mut u32, pcbremotelogname: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLogNameSizes)(windows_core::Interface::as_raw(self), core::mem::transmute(pcbourlogname), core::mem::transmute(pcbremotelogname)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLogNameSizes)(windows_core::Interface::as_raw(self), pcbourlogname as _, pcbremotelogname as _).ok() } } pub unsafe fn GetOurXln(&self, pxln: *mut DTCLUXLN, pourlogname: *mut u8, premotelogname: *mut u8, pdwprotocol: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOurXln)(windows_core::Interface::as_raw(self), core::mem::transmute(pxln), core::mem::transmute(pourlogname), core::mem::transmute(premotelogname), core::mem::transmute(pdwprotocol)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOurXln)(windows_core::Interface::as_raw(self), pxln as _, pourlogname as _, premotelogname as _, pdwprotocol as _).ok() } } pub unsafe fn HandleConfirmationFromOurXln(&self, confirmation: DTCLUXLNCONFIRMATION) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).HandleConfirmationFromOurXln)(windows_core::Interface::as_raw(self), confirmation).ok() } } pub unsafe fn HandleTheirXlnResponse(&self, xln: DTCLUXLN, premotelogname: *mut u8, cbremotelogname: u32, dwprotocol: u32, pconfirmation: *mut DTCLUXLNCONFIRMATION) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).HandleTheirXlnResponse)(windows_core::Interface::as_raw(self), xln, core::mem::transmute(premotelogname), cbremotelogname, dwprotocol, core::mem::transmute(pconfirmation)).ok() } + unsafe { (windows_core::Interface::vtable(self).HandleTheirXlnResponse)(windows_core::Interface::as_raw(self), xln, premotelogname as _, cbremotelogname, dwprotocol, pconfirmation as _).ok() } } pub unsafe fn HandleErrorFromOurXln(&self, error: DTCLUXLNERROR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).HandleErrorFromOurXln)(windows_core::Interface::as_raw(self), error).ok() } } pub unsafe fn CheckForCompareStates(&self, fcomparestates: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CheckForCompareStates)(windows_core::Interface::as_raw(self), core::mem::transmute(fcomparestates)).ok() } + unsafe { (windows_core::Interface::vtable(self).CheckForCompareStates)(windows_core::Interface::as_raw(self), fcomparestates as _).ok() } } pub unsafe fn GetOurTransIdSize(&self, pcbourtransid: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOurTransIdSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pcbourtransid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOurTransIdSize)(windows_core::Interface::as_raw(self), pcbourtransid as _).ok() } } pub unsafe fn GetOurCompareStates(&self, pourtransid: *mut u8, pcomparestate: *mut DTCLUCOMPARESTATE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOurCompareStates)(windows_core::Interface::as_raw(self), core::mem::transmute(pourtransid), core::mem::transmute(pcomparestate)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOurCompareStates)(windows_core::Interface::as_raw(self), pourtransid as _, pcomparestate as _).ok() } } pub unsafe fn HandleTheirCompareStatesResponse(&self, comparestate: DTCLUCOMPARESTATE, pconfirmation: *mut DTCLUCOMPARESTATESCONFIRMATION) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).HandleTheirCompareStatesResponse)(windows_core::Interface::as_raw(self), comparestate, core::mem::transmute(pconfirmation)).ok() } + unsafe { (windows_core::Interface::vtable(self).HandleTheirCompareStatesResponse)(windows_core::Interface::as_raw(self), comparestate, pconfirmation as _).ok() } } pub unsafe fn HandleErrorFromOurCompareStates(&self, error: DTCLUCOMPARESTATESERROR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).HandleErrorFromOurCompareStates)(windows_core::Interface::as_raw(self), error).ok() } @@ -321,7 +321,7 @@ impl IDtcLuRecoveryInitiatedByDtcTransWork { unsafe { (windows_core::Interface::vtable(self).ConversationLost)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetRecoverySeqNum(&self, plrecoveryseqnum: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRecoverySeqNum)(windows_core::Interface::as_raw(self), core::mem::transmute(plrecoveryseqnum)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecoverySeqNum)(windows_core::Interface::as_raw(self), plrecoveryseqnum as _).ok() } } pub unsafe fn ObsoleteRecoverySeqNum(&self, lnewrecoveryseqnum: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ObsoleteRecoverySeqNum)(windows_core::Interface::as_raw(self), lnewrecoveryseqnum).ok() } @@ -504,19 +504,19 @@ windows_core::imp::define_interface!(IDtcLuRecoveryInitiatedByLuWork, IDtcLuReco windows_core::imp::interface_hierarchy!(IDtcLuRecoveryInitiatedByLuWork, windows_core::IUnknown); impl IDtcLuRecoveryInitiatedByLuWork { pub unsafe fn HandleTheirXln(&self, lrecoveryseqnum: i32, xln: DTCLUXLN, premotelogname: *mut u8, cbremotelogname: u32, pourlogname: *mut u8, cbourlogname: u32, dwprotocol: u32, presponse: *mut DTCLUXLNRESPONSE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).HandleTheirXln)(windows_core::Interface::as_raw(self), lrecoveryseqnum, xln, core::mem::transmute(premotelogname), cbremotelogname, core::mem::transmute(pourlogname), cbourlogname, dwprotocol, core::mem::transmute(presponse)).ok() } + unsafe { (windows_core::Interface::vtable(self).HandleTheirXln)(windows_core::Interface::as_raw(self), lrecoveryseqnum, xln, premotelogname as _, cbremotelogname, pourlogname as _, cbourlogname, dwprotocol, presponse as _).ok() } } pub unsafe fn GetOurLogNameSize(&self, pcbourlogname: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOurLogNameSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pcbourlogname)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOurLogNameSize)(windows_core::Interface::as_raw(self), pcbourlogname as _).ok() } } pub unsafe fn GetOurXln(&self, pxln: *mut DTCLUXLN, pourlogname: *mut u8, pdwprotocol: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOurXln)(windows_core::Interface::as_raw(self), core::mem::transmute(pxln), core::mem::transmute(pourlogname), core::mem::transmute(pdwprotocol)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOurXln)(windows_core::Interface::as_raw(self), pxln as _, pourlogname as _, pdwprotocol as _).ok() } } pub unsafe fn HandleConfirmationOfOurXln(&self, confirmation: DTCLUXLNCONFIRMATION) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).HandleConfirmationOfOurXln)(windows_core::Interface::as_raw(self), confirmation).ok() } } pub unsafe fn HandleTheirCompareStates(&self, premotetransid: *mut u8, cbremotetransid: u32, comparestate: DTCLUCOMPARESTATE, presponse: *mut DTCLUCOMPARESTATESRESPONSE, pcomparestate: *mut DTCLUCOMPARESTATE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).HandleTheirCompareStates)(windows_core::Interface::as_raw(self), core::mem::transmute(premotetransid), cbremotetransid, comparestate, core::mem::transmute(presponse), core::mem::transmute(pcomparestate)).ok() } + unsafe { (windows_core::Interface::vtable(self).HandleTheirCompareStates)(windows_core::Interface::as_raw(self), premotetransid as _, cbremotetransid, comparestate, presponse as _, pcomparestate as _).ok() } } pub unsafe fn HandleConfirmationOfOurCompareStates(&self, confirmation: DTCLUCOMPARESTATESCONFIRMATION) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).HandleConfirmationOfOurCompareStates)(windows_core::Interface::as_raw(self), confirmation).ok() } @@ -718,7 +718,7 @@ impl IDtcLuRmEnlistmentFactory { P2: windows_core::Param, P5: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Create)(windows_core::Interface::as_raw(self), core::mem::transmute(puclupair), cblupair, pitransaction.param().abi(), core::mem::transmute(ptransid), cbtransid, prmenlistmentsink.param().abi(), core::mem::transmute(pprmenlistment)).ok() } + unsafe { (windows_core::Interface::vtable(self).Create)(windows_core::Interface::as_raw(self), puclupair as _, cblupair, pitransaction.param().abi(), ptransid as _, cbtransid, prmenlistmentsink.param().abi(), core::mem::transmute(pprmenlistment)).ok() } } } #[repr(C)] @@ -987,7 +987,7 @@ impl IDtcLuSubordinateDtcFactory { P5: windows_core::Param, P9: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Create)(windows_core::Interface::as_raw(self), core::mem::transmute(puclupair), cblupair, punktransactionouter.param().abi(), isolevel, isoflags, poptions.param().abi(), core::mem::transmute(pptransaction), core::mem::transmute(ptransid), cbtransid, psubordinatedtcsink.param().abi(), core::mem::transmute(ppsubordinatedtc)).ok() } + unsafe { (windows_core::Interface::vtable(self).Create)(windows_core::Interface::as_raw(self), puclupair as _, cblupair, punktransactionouter.param().abi(), isolevel, isoflags, poptions.param().abi(), core::mem::transmute(pptransaction), ptransid as _, cbtransid, psubordinatedtcsink.param().abi(), core::mem::transmute(ppsubordinatedtc)).ok() } } } #[repr(C)] @@ -1557,7 +1557,7 @@ impl IDtcToXaHelper { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).TranslateTridToXid)(windows_core::Interface::as_raw(self), pitransaction.param().abi(), pguidbqual, core::mem::transmute(pxid)).ok() } + unsafe { (windows_core::Interface::vtable(self).TranslateTridToXid)(windows_core::Interface::as_raw(self), pitransaction.param().abi(), pguidbqual, pxid as _).ok() } } } #[repr(C)] @@ -1603,7 +1603,7 @@ impl IDtcToXaHelperFactory { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Create)(windows_core::Interface::as_raw(self), pszdsn.param().abi(), pszclientdllname.param().abi(), core::mem::transmute(pguidrm), core::mem::transmute(ppxahelper)).ok() } + unsafe { (windows_core::Interface::vtable(self).Create)(windows_core::Interface::as_raw(self), pszdsn.param().abi(), pszclientdllname.param().abi(), pguidrm as _, core::mem::transmute(ppxahelper)).ok() } } } #[repr(C)] @@ -1637,10 +1637,10 @@ impl IDtcToXaHelperSinglePipe { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).XARMCreate)(windows_core::Interface::as_raw(self), pszdsn.param().abi(), pszclientdll.param().abi(), core::mem::transmute(pdwrmcookie)).ok() } + unsafe { (windows_core::Interface::vtable(self).XARMCreate)(windows_core::Interface::as_raw(self), pszdsn.param().abi(), pszclientdll.param().abi(), pdwrmcookie as _).ok() } } pub unsafe fn ConvertTridToXID(&self, pdwitrans: *mut u32, dwrmcookie: u32, pxid: *mut XID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ConvertTridToXID)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwitrans), dwrmcookie, core::mem::transmute(pxid)).ok() } + unsafe { (windows_core::Interface::vtable(self).ConvertTridToXID)(windows_core::Interface::as_raw(self), pdwitrans as _, dwrmcookie, pxid as _).ok() } } pub unsafe fn EnlistWithRM(&self, dwrmcookie: u32, i_pitransaction: P1, i_pitransres: P2) -> windows_core::Result where @@ -1723,10 +1723,10 @@ impl IDtcToXaMapper { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).RequestNewResourceManager)(windows_core::Interface::as_raw(self), pszdsn.param().abi(), pszclientdllname.param().abi(), core::mem::transmute(pdwrmcookie)).ok() } + unsafe { (windows_core::Interface::vtable(self).RequestNewResourceManager)(windows_core::Interface::as_raw(self), pszdsn.param().abi(), pszclientdllname.param().abi(), pdwrmcookie as _).ok() } } pub unsafe fn TranslateTridToXid(&self, pdwitransaction: *const u32, dwrmcookie: u32, pxid: *mut XID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TranslateTridToXid)(windows_core::Interface::as_raw(self), pdwitransaction, dwrmcookie, core::mem::transmute(pxid)).ok() } + unsafe { (windows_core::Interface::vtable(self).TranslateTridToXid)(windows_core::Interface::as_raw(self), pdwitransaction, dwrmcookie, pxid as _).ok() } } pub unsafe fn EnlistResourceManager(&self, dwrmcookie: u32, pdwitransaction: *const u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).EnlistResourceManager)(windows_core::Interface::as_raw(self), dwrmcookie, pdwitransaction).ok() } @@ -1792,7 +1792,7 @@ windows_core::imp::define_interface!(IGetDispenser, IGetDispenser_Vtbl, 0xc23cc3 windows_core::imp::interface_hierarchy!(IGetDispenser, windows_core::IUnknown); impl IGetDispenser { pub unsafe fn GetDispenser(&self, iid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDispenser)(windows_core::Interface::as_raw(self), iid, core::mem::transmute(ppvobject)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDispenser)(windows_core::Interface::as_raw(self), iid, ppvobject as _).ok() } } } #[repr(C)] @@ -1907,10 +1907,10 @@ windows_core::imp::define_interface!(IPrepareInfo, IPrepareInfo_Vtbl, 0x80c7bfd0 windows_core::imp::interface_hierarchy!(IPrepareInfo, windows_core::IUnknown); impl IPrepareInfo { pub unsafe fn GetPrepareInfoSize(&self, pcbprepinfo: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPrepareInfoSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pcbprepinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPrepareInfoSize)(windows_core::Interface::as_raw(self), pcbprepinfo as _).ok() } } pub unsafe fn GetPrepareInfo(&self, pprepinfo: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPrepareInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pprepinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPrepareInfo)(windows_core::Interface::as_raw(self), pprepinfo as _).ok() } } } #[repr(C)] @@ -2013,7 +2013,7 @@ impl IRMHelper { P2: windows_core::Param, P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).RMInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pxa_switch), fcdeclcallingconv.into(), pszopenstring.param().abi(), pszclosestring.param().abi(), core::mem::transmute(guidrmrecovery)).ok() } + unsafe { (windows_core::Interface::vtable(self).RMInfo)(windows_core::Interface::as_raw(self), pxa_switch as _, fcdeclcallingconv.into(), pszopenstring.param().abi(), pszclosestring.param().abi(), core::mem::transmute(guidrmrecovery)).ok() } } } #[repr(C)] @@ -2055,7 +2055,7 @@ impl IResourceManager { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Enlist)(windows_core::Interface::as_raw(self), ptransaction.param().abi(), pres.param().abi(), core::mem::transmute(puow), core::mem::transmute(pisolevel), core::mem::transmute(ppenlist)).ok() } + unsafe { (windows_core::Interface::vtable(self).Enlist)(windows_core::Interface::as_raw(self), ptransaction.param().abi(), pres.param().abi(), puow as _, pisolevel as _, core::mem::transmute(ppenlist)).ok() } } pub unsafe fn Reenlist(&self, pprepinfo: &[u8], ltimeout: u32) -> windows_core::Result { unsafe { @@ -2067,7 +2067,7 @@ impl IResourceManager { unsafe { (windows_core::Interface::vtable(self).ReenlistmentComplete)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetDistributedTransactionManager(&self, iid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDistributedTransactionManager)(windows_core::Interface::as_raw(self), iid, core::mem::transmute(ppvobject)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDistributedTransactionManager)(windows_core::Interface::as_raw(self), iid, ppvobject as _).ok() } } } #[repr(C)] @@ -2143,7 +2143,7 @@ impl IResourceManager2 { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Enlist2)(windows_core::Interface::as_raw(self), ptransaction.param().abi(), presasync.param().abi(), core::mem::transmute(puow), core::mem::transmute(pisolevel), core::mem::transmute(pxid), core::mem::transmute(ppenlist)).ok() } + unsafe { (windows_core::Interface::vtable(self).Enlist2)(windows_core::Interface::as_raw(self), ptransaction.param().abi(), presasync.param().abi(), puow as _, pisolevel as _, pxid as _, core::mem::transmute(ppenlist)).ok() } } pub unsafe fn Reenlist2(&self, pxid: *const XID, dwtimeout: u32) -> windows_core::Result { unsafe { @@ -2246,7 +2246,7 @@ impl IResourceManagerFactory2 { P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateEx)(windows_core::Interface::as_raw(self), pguidrm, pszrmname.param().abi(), piresmgrsink.param().abi(), riidrequested, core::mem::transmute(ppvresmgr)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateEx)(windows_core::Interface::as_raw(self), pguidrm, pszrmname.param().abi(), piresmgrsink.param().abi(), riidrequested, ppvresmgr as _).ok() } } } #[repr(C)] @@ -2617,7 +2617,7 @@ impl ITransaction { unsafe { (windows_core::Interface::vtable(self).Abort)(windows_core::Interface::as_raw(self), pboidreason, fretaining.into(), fasync.into()).ok() } } pub unsafe fn GetTransactionInfo(&self, pinfo: *mut XACTTRANSINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTransactionInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTransactionInfo)(windows_core::Interface::as_raw(self), pinfo as _).ok() } } } #[repr(C)] @@ -2674,7 +2674,7 @@ impl core::ops::Deref for ITransaction2 { windows_core::imp::interface_hierarchy!(ITransaction2, windows_core::IUnknown, ITransaction, ITransactionCloner); impl ITransaction2 { pub unsafe fn GetTransactionInfo2(&self, pinfo: *mut XACTTRANSINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTransactionInfo2)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTransactionInfo2)(windows_core::Interface::as_raw(self), pinfo as _).ok() } } } #[repr(C)] @@ -2895,7 +2895,7 @@ impl ITransactionExport { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetTransactionCookie)(windows_core::Interface::as_raw(self), punktransaction.param().abi(), rgbtransactioncookie.len().try_into().unwrap(), core::mem::transmute(rgbtransactioncookie.as_ptr()), core::mem::transmute(pcbused)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTransactionCookie)(windows_core::Interface::as_raw(self), punktransaction.param().abi(), rgbtransactioncookie.len().try_into().unwrap(), core::mem::transmute(rgbtransactioncookie.as_ptr()), pcbused as _).ok() } } } #[repr(C)] @@ -3046,7 +3046,7 @@ impl ITransactionImportWhereabouts { } } pub unsafe fn GetWhereabouts(&self, rgbwhereabouts: &mut [u8], pcbused: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWhereabouts)(windows_core::Interface::as_raw(self), rgbwhereabouts.len().try_into().unwrap(), core::mem::transmute(rgbwhereabouts.as_ptr()), core::mem::transmute(pcbused)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWhereabouts)(windows_core::Interface::as_raw(self), rgbwhereabouts.len().try_into().unwrap(), core::mem::transmute(rgbwhereabouts.as_ptr()), pcbused as _).ok() } } } #[repr(C)] @@ -3172,7 +3172,7 @@ impl ITransactionOptions { unsafe { (windows_core::Interface::vtable(self).SetOptions)(windows_core::Interface::as_raw(self), poptions).ok() } } pub unsafe fn GetOptions(&self, poptions: *mut XACTOPT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(poptions)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOptions)(windows_core::Interface::as_raw(self), poptions as _).ok() } } } #[repr(C)] @@ -3472,7 +3472,7 @@ impl ITransactionReceiver { } } pub unsafe fn MarshalReturnToken(&self, rgbreturntoken: &mut [u8], pcbused: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).MarshalReturnToken)(windows_core::Interface::as_raw(self), rgbreturntoken.len().try_into().unwrap(), core::mem::transmute(rgbreturntoken.as_ptr()), core::mem::transmute(pcbused)).ok() } + unsafe { (windows_core::Interface::vtable(self).MarshalReturnToken)(windows_core::Interface::as_raw(self), rgbreturntoken.len().try_into().unwrap(), core::mem::transmute(rgbreturntoken.as_ptr()), pcbused as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -3736,7 +3736,7 @@ impl ITransactionTransmitter { } } pub unsafe fn MarshalPropagationToken(&self, rgbtoken: &mut [u8], pcbused: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).MarshalPropagationToken)(windows_core::Interface::as_raw(self), rgbtoken.len().try_into().unwrap(), core::mem::transmute(rgbtoken.as_ptr()), core::mem::transmute(pcbused)).ok() } + unsafe { (windows_core::Interface::vtable(self).MarshalPropagationToken)(windows_core::Interface::as_raw(self), rgbtoken.len().try_into().unwrap(), core::mem::transmute(rgbtoken.as_ptr()), pcbused as _).ok() } } pub unsafe fn UnmarshalReturnToken(&self, rgbreturntoken: &[u8]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UnmarshalReturnToken)(windows_core::Interface::as_raw(self), rgbreturntoken.len().try_into().unwrap(), core::mem::transmute(rgbreturntoken.as_ptr())).ok() } @@ -3856,7 +3856,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<()> { - unsafe { (windows_core::Interface::vtable(self).VoteRequestDone)(windows_core::Interface::as_raw(self), hr, core::mem::transmute(pboidreason.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).VoteRequestDone)(windows_core::Interface::as_raw(self), hr, pboidreason.unwrap_or(core::mem::zeroed()) as _).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 0566612051..113f512404 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Environment/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Environment/mod.rs @@ -1,17 +1,17 @@ #[inline] pub unsafe fn CallEnclave(lproutine: isize, lpparameter: *const core::ffi::c_void, fwaitforthread: bool, lpreturnvalue: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("vertdll.dll" "system" fn CallEnclave(lproutine : isize, lpparameter : *const core::ffi::c_void, fwaitforthread : super::super::Foundation:: BOOL, lpreturnvalue : *mut *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { CallEnclave(lproutine, lpparameter, fwaitforthread.into(), core::mem::transmute(lpreturnvalue)).ok() } + unsafe { CallEnclave(lproutine, lpparameter, fwaitforthread.into(), lpreturnvalue as _).ok() } } #[inline] 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); - unsafe { CreateEnclave(hprocess, core::mem::transmute(lpaddress.unwrap_or(core::mem::zeroed())), dwsize, dwinitialcommitment, flenclavetype, lpenclaveinformation, dwinfolength, core::mem::transmute(lpenclaveerror.unwrap_or(core::mem::zeroed()))) } + unsafe { CreateEnclave(hprocess, lpaddress.unwrap_or(core::mem::zeroed()) as _, dwsize, dwinitialcommitment, flenclavetype, lpenclaveinformation, dwinfolength, lpenclaveerror.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CreateEnvironmentBlock(lpenvironment: *mut *mut core::ffi::c_void, htoken: Option, binherit: bool) -> windows_core::Result<()> { 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); - unsafe { CreateEnvironmentBlock(core::mem::transmute(lpenvironment), core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), binherit.into()).ok() } + unsafe { CreateEnvironmentBlock(lpenvironment as _, htoken.unwrap_or(core::mem::zeroed()) as _, binherit.into()).ok() } } #[inline] pub unsafe fn DeleteEnclave(lpaddress: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -26,22 +26,22 @@ 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); - unsafe { 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())), buffersize, core::mem::transmute(outputsize)).ok() } + unsafe { EnclaveGetAttestationReport(core::mem::transmute(enclavedata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), report.unwrap_or(core::mem::zeroed()) as _, buffersize, outputsize as _).ok() } } #[inline] pub unsafe fn EnclaveGetEnclaveInformation(informationsize: u32, enclaveinformation: *mut ENCLAVE_INFORMATION) -> windows_core::Result<()> { windows_targets::link!("vertdll.dll" "system" fn EnclaveGetEnclaveInformation(informationsize : u32, enclaveinformation : *mut ENCLAVE_INFORMATION) -> windows_core::HRESULT); - unsafe { EnclaveGetEnclaveInformation(informationsize, core::mem::transmute(enclaveinformation)).ok() } + unsafe { EnclaveGetEnclaveInformation(informationsize, enclaveinformation as _).ok() } } #[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); - unsafe { EnclaveSealData(datatoencrypt, datatoencryptsize, identitypolicy, runtimepolicy, core::mem::transmute(protectedblob.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(protectedblobsize)).ok() } + unsafe { EnclaveSealData(datatoencrypt, datatoencryptsize, identitypolicy, runtimepolicy, protectedblob.unwrap_or(core::mem::zeroed()) as _, buffersize, protectedblobsize as _).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); - unsafe { EnclaveUnsealData(protectedblob, protectedblobsize, core::mem::transmute(decrypteddata.unwrap_or(core::mem::zeroed())), buffersize, core::mem::transmute(decrypteddatasize), core::mem::transmute(sealingidentity.unwrap_or(core::mem::zeroed())), core::mem::transmute(unsealingflags.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { EnclaveUnsealData(protectedblob, protectedblobsize, decrypteddata.unwrap_or(core::mem::zeroed()) as _, buffersize, decrypteddatasize as _, sealingidentity.unwrap_or(core::mem::zeroed()) as _, unsealingflags.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn EnclaveVerifyAttestationReport(enclavetype: u32, report: *const core::ffi::c_void, reportsize: u32) -> windows_core::Result<()> { @@ -62,7 +62,7 @@ where 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); - unsafe { 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() } + unsafe { ExpandEnvironmentStringsForUserA(htoken.unwrap_or(core::mem::zeroed()) as _, lpsrc.param().abi(), core::mem::transmute(lpdest.as_ptr()), lpdest.len().try_into().unwrap()).ok() } } #[inline] pub unsafe fn ExpandEnvironmentStringsForUserW(htoken: Option, lpsrc: P1, lpdest: &mut [u16]) -> windows_core::Result<()> @@ -70,7 +70,7 @@ where 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); - unsafe { 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() } + unsafe { ExpandEnvironmentStringsForUserW(htoken.unwrap_or(core::mem::zeroed()) as _, 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 @@ -145,7 +145,7 @@ where #[inline] 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); - unsafe { InitializeEnclave(hprocess, lpaddress, lpenclaveinformation, dwinfolength, core::mem::transmute(lpenclaveerror.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { InitializeEnclave(hprocess, lpaddress, lpenclaveinformation, dwinfolength, lpenclaveerror.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn IsEnclaveTypeSupported(flenclavetype: u32) -> windows_core::Result<()> { @@ -155,7 +155,7 @@ pub unsafe fn IsEnclaveTypeSupported(flenclavetype: u32) -> windows_core::Result #[inline] 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); - unsafe { LoadEnclaveData(hprocess, lpaddress, lpbuffer, nsize, flprotect, lppageinformation, dwinfolength, core::mem::transmute(lpnumberofbyteswritten), core::mem::transmute(lpenclaveerror.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { LoadEnclaveData(hprocess, lpaddress, lpbuffer, nsize, flprotect, lppageinformation, dwinfolength, lpnumberofbyteswritten as _, lpenclaveerror.unwrap_or(core::mem::zeroed()) as _).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 7b1e4a5aa2..5b47f98601 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ErrorReporting/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ErrorReporting/mod.rs @@ -104,7 +104,7 @@ where #[inline] 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); - unsafe { WerReportAddDump(hreporthandle, hprocess, core::mem::transmute(hthread.unwrap_or(core::mem::zeroed())), dumptype, core::mem::transmute(pexceptionparam.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdumpcustomoptions.unwrap_or(core::mem::zeroed())), dwflags).ok() } + unsafe { WerReportAddDump(hreporthandle, hprocess, hthread.unwrap_or(core::mem::zeroed()) as _, dumptype, pexceptionparam.unwrap_or(core::mem::zeroed()) as _, pdumpcustomoptions.unwrap_or(core::mem::zeroed()) as _, dwflags).ok() } } #[inline] pub unsafe fn WerReportAddFile(hreporthandle: HREPORT, pwzpath: P1, repfiletype: WER_FILE_TYPE, dwfileflags: WER_FILE) -> windows_core::Result<()> @@ -127,7 +127,7 @@ where windows_targets::link!("wer.dll" "system" fn WerReportCreate(pwzeventtype : windows_core::PCWSTR, reptype : WER_REPORT_TYPE, preportinformation : *const WER_REPORT_INFORMATION, phreporthandle : *mut HREPORT) -> windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - WerReportCreate(pwzeventtype.param().abi(), reptype, core::mem::transmute(preportinformation.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + WerReportCreate(pwzeventtype.param().abi(), reptype, preportinformation.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -158,7 +158,7 @@ where #[inline] 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); - unsafe { WerReportSubmit(hreporthandle, consent, dwflags, core::mem::transmute(psubmitresult.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WerReportSubmit(hreporthandle, consent, dwflags, psubmitresult.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WerSetFlags(dwflags: WER_FAULT_REPORTING) -> windows_core::Result<()> { @@ -168,17 +168,17 @@ pub unsafe fn WerSetFlags(dwflags: WER_FAULT_REPORTING) -> windows_core::Result< #[inline] pub unsafe fn WerStoreClose(hreportstore: Option) { windows_targets::link!("wer.dll" "system" fn WerStoreClose(hreportstore : HREPORTSTORE)); - unsafe { WerStoreClose(core::mem::transmute(hreportstore.unwrap_or(core::mem::zeroed()))) } + unsafe { WerStoreClose(hreportstore.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { WerStoreGetFirstReportKey(hreportstore, core::mem::transmute(ppszreportkey.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WerStoreGetFirstReportKey(hreportstore, ppszreportkey.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { WerStoreGetNextReportKey(hreportstore, core::mem::transmute(ppszreportkey.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WerStoreGetNextReportKey(hreportstore, ppszreportkey.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WerStoreGetReportCount(hreportstore: HREPORTSTORE) -> windows_core::Result { @@ -215,7 +215,7 @@ where 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); - unsafe { WerStoreQueryReportMetadataV1(hreportstore, pszreportkey.param().abi(), core::mem::transmute(preportmetadata)).ok() } + unsafe { WerStoreQueryReportMetadataV1(hreportstore, pszreportkey.param().abi(), preportmetadata as _).ok() } } #[inline] pub unsafe fn WerStoreQueryReportMetadataV2(hreportstore: HREPORTSTORE, pszreportkey: P1, preportmetadata: *mut WER_REPORT_METADATA_V2) -> windows_core::Result<()> @@ -223,7 +223,7 @@ where 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); - unsafe { WerStoreQueryReportMetadataV2(hreportstore, pszreportkey.param().abi(), core::mem::transmute(preportmetadata)).ok() } + unsafe { WerStoreQueryReportMetadataV2(hreportstore, pszreportkey.param().abi(), preportmetadata as _).ok() } } #[inline] pub unsafe fn WerStoreQueryReportMetadataV3(hreportstore: HREPORTSTORE, pszreportkey: P1, preportmetadata: *mut WER_REPORT_METADATA_V3) -> windows_core::Result<()> @@ -231,7 +231,7 @@ where 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); - unsafe { WerStoreQueryReportMetadataV3(hreportstore, pszreportkey.param().abi(), core::mem::transmute(preportmetadata)).ok() } + unsafe { WerStoreQueryReportMetadataV3(hreportstore, pszreportkey.param().abi(), preportmetadata as _).ok() } } #[inline] pub unsafe fn WerStoreUploadReport(hreportstore: HREPORTSTORE, pszreportkey: P1, dwflags: u32, psubmitresult: Option<*mut WER_SUBMIT_RESULT>) -> windows_core::Result<()> @@ -239,7 +239,7 @@ where P1: windows_core::Param, { windows_targets::link!("wer.dll" "system" fn WerStoreUploadReport(hreportstore : HREPORTSTORE, pszreportkey : windows_core::PCWSTR, dwflags : u32, psubmitresult : *mut WER_SUBMIT_RESULT) -> windows_core::HRESULT); - unsafe { WerStoreUploadReport(hreportstore, pszreportkey.param().abi(), dwflags, core::mem::transmute(psubmitresult.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WerStoreUploadReport(hreportstore, pszreportkey.param().abi(), dwflags, psubmitresult.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WerUnregisterAdditionalProcess(processid: u32) -> windows_core::Result<()> { diff --git a/crates/libs/windows/src/Windows/Win32/System/EventCollector/mod.rs b/crates/libs/windows/src/Windows/Win32/System/EventCollector/mod.rs index 9c72cb7d81..589ddd0ee8 100644 --- a/crates/libs/windows/src/Windows/Win32/System/EventCollector/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/EventCollector/mod.rs @@ -14,22 +14,22 @@ where #[inline] pub unsafe fn EcEnumNextSubscription(subscriptionenum: isize, subscriptionnamebuffer: Option<&mut [u16]>, subscriptionnamebufferused: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("wecapi.dll" "system" fn EcEnumNextSubscription(subscriptionenum : isize, subscriptionnamebuffersize : u32, subscriptionnamebuffer : windows_core::PWSTR, subscriptionnamebufferused : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { EcEnumNextSubscription(subscriptionenum, subscriptionnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(subscriptionnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(subscriptionnamebufferused)) } + unsafe { EcEnumNextSubscription(subscriptionenum, subscriptionnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(subscriptionnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), subscriptionnamebufferused as _) } } #[inline] pub unsafe fn EcGetObjectArrayProperty(objectarray: isize, propertyid: EC_SUBSCRIPTION_PROPERTY_ID, arrayindex: u32, flags: u32, propertyvaluebuffersize: u32, propertyvaluebuffer: *mut EC_VARIANT, propertyvaluebufferused: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("wecapi.dll" "system" fn EcGetObjectArrayProperty(objectarray : isize, propertyid : EC_SUBSCRIPTION_PROPERTY_ID, arrayindex : u32, flags : u32, propertyvaluebuffersize : u32, propertyvaluebuffer : *mut EC_VARIANT, propertyvaluebufferused : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { EcGetObjectArrayProperty(objectarray, propertyid, arrayindex, flags, propertyvaluebuffersize, core::mem::transmute(propertyvaluebuffer), core::mem::transmute(propertyvaluebufferused)) } + unsafe { EcGetObjectArrayProperty(objectarray, propertyid, arrayindex, flags, propertyvaluebuffersize, propertyvaluebuffer as _, propertyvaluebufferused as _) } } #[inline] pub unsafe fn EcGetObjectArraySize(objectarray: isize, objectarraysize: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("wecapi.dll" "system" fn EcGetObjectArraySize(objectarray : isize, objectarraysize : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { EcGetObjectArraySize(objectarray, core::mem::transmute(objectarraysize)) } + unsafe { EcGetObjectArraySize(objectarray, objectarraysize as _) } } #[inline] pub unsafe fn EcGetSubscriptionProperty(subscription: isize, propertyid: EC_SUBSCRIPTION_PROPERTY_ID, flags: u32, propertyvaluebuffersize: u32, propertyvaluebuffer: *mut EC_VARIANT, propertyvaluebufferused: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("wecapi.dll" "system" fn EcGetSubscriptionProperty(subscription : isize, propertyid : EC_SUBSCRIPTION_PROPERTY_ID, flags : u32, propertyvaluebuffersize : u32, propertyvaluebuffer : *mut EC_VARIANT, propertyvaluebufferused : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { EcGetSubscriptionProperty(subscription, propertyid, flags, propertyvaluebuffersize, core::mem::transmute(propertyvaluebuffer), core::mem::transmute(propertyvaluebufferused)) } + unsafe { EcGetSubscriptionProperty(subscription, propertyid, flags, propertyvaluebuffersize, propertyvaluebuffer as _, propertyvaluebufferused as _) } } #[inline] pub unsafe fn EcGetSubscriptionRunTimeStatus(subscriptionname: P0, statusinfoid: EC_SUBSCRIPTION_RUNTIME_STATUS_INFO_ID, eventsourcename: P2, flags: u32, statusvaluebuffersize: u32, statusvaluebuffer: *mut EC_VARIANT, statusvaluebufferused: *mut u32) -> super::super::Foundation::BOOL @@ -38,7 +38,7 @@ where P2: windows_core::Param, { windows_targets::link!("wecapi.dll" "system" fn EcGetSubscriptionRunTimeStatus(subscriptionname : windows_core::PCWSTR, statusinfoid : EC_SUBSCRIPTION_RUNTIME_STATUS_INFO_ID, eventsourcename : windows_core::PCWSTR, flags : u32, statusvaluebuffersize : u32, statusvaluebuffer : *mut EC_VARIANT, statusvaluebufferused : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { EcGetSubscriptionRunTimeStatus(subscriptionname.param().abi(), statusinfoid, eventsourcename.param().abi(), flags, statusvaluebuffersize, core::mem::transmute(statusvaluebuffer), core::mem::transmute(statusvaluebufferused)) } + unsafe { EcGetSubscriptionRunTimeStatus(subscriptionname.param().abi(), statusinfoid, eventsourcename.param().abi(), flags, statusvaluebuffersize, statusvaluebuffer as _, statusvaluebufferused as _) } } #[inline] pub unsafe fn EcInsertObjectArrayElement(objectarray: isize, arrayindex: u32) -> super::super::Foundation::BOOL { @@ -80,12 +80,12 @@ pub unsafe fn EcSaveSubscription(subscription: isize, flags: u32) -> super::supe #[inline] pub unsafe fn EcSetObjectArrayProperty(objectarray: isize, propertyid: EC_SUBSCRIPTION_PROPERTY_ID, arrayindex: u32, flags: u32, propertyvalue: *mut EC_VARIANT) -> super::super::Foundation::BOOL { windows_targets::link!("wecapi.dll" "system" fn EcSetObjectArrayProperty(objectarray : isize, propertyid : EC_SUBSCRIPTION_PROPERTY_ID, arrayindex : u32, flags : u32, propertyvalue : *mut EC_VARIANT) -> super::super::Foundation:: BOOL); - unsafe { EcSetObjectArrayProperty(objectarray, propertyid, arrayindex, flags, core::mem::transmute(propertyvalue)) } + unsafe { EcSetObjectArrayProperty(objectarray, propertyid, arrayindex, flags, propertyvalue as _) } } #[inline] pub unsafe fn EcSetSubscriptionProperty(subscription: isize, propertyid: EC_SUBSCRIPTION_PROPERTY_ID, flags: u32, propertyvalue: *mut EC_VARIANT) -> super::super::Foundation::BOOL { windows_targets::link!("wecapi.dll" "system" fn EcSetSubscriptionProperty(subscription : isize, propertyid : EC_SUBSCRIPTION_PROPERTY_ID, flags : u32, propertyvalue : *mut EC_VARIANT) -> super::super::Foundation:: BOOL); - unsafe { EcSetSubscriptionProperty(subscription, propertyid, flags, core::mem::transmute(propertyvalue)) } + unsafe { EcSetSubscriptionProperty(subscription, propertyid, flags, propertyvalue as _) } } pub const EC_CREATE_NEW: u32 = 1u32; pub const EC_OPEN_ALWAYS: u32 = 0u32; 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 17c90fccc8..70d770cec4 100644 --- a/crates/libs/windows/src/Windows/Win32/System/EventLog/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/EventLog/mod.rs @@ -46,12 +46,12 @@ where 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); - unsafe { EvtArchiveExportedLog(core::mem::transmute(session.unwrap_or(core::mem::zeroed())), logfilepath.param().abi(), locale, flags).ok() } + unsafe { EvtArchiveExportedLog(session.unwrap_or(core::mem::zeroed()) as _, logfilepath.param().abi(), locale, flags).ok() } } #[inline] pub unsafe fn EvtCancel(object: Option) -> windows_core::Result<()> { windows_targets::link!("wevtapi.dll" "system" fn EvtCancel(object : EVT_HANDLE) -> super::super::Foundation:: BOOL); - unsafe { EvtCancel(core::mem::transmute(object.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { EvtCancel(object.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn EvtClearLog(session: Option, channelpath: P1, targetfilepath: P2, flags: u32) -> windows_core::Result<()> @@ -60,7 +60,7 @@ where 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); - unsafe { EvtClearLog(core::mem::transmute(session.unwrap_or(core::mem::zeroed())), channelpath.param().abi(), targetfilepath.param().abi(), flags).ok() } + unsafe { EvtClearLog(session.unwrap_or(core::mem::zeroed()) as _, channelpath.param().abi(), targetfilepath.param().abi(), flags).ok() } } #[inline] pub unsafe fn EvtClose(object: EVT_HANDLE) -> windows_core::Result<()> { @@ -90,88 +90,75 @@ where 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); - unsafe { EvtExportLog(core::mem::transmute(session.unwrap_or(core::mem::zeroed())), path.param().abi(), query.param().abi(), targetfilepath.param().abi(), flags).ok() } + unsafe { EvtExportLog(session.unwrap_or(core::mem::zeroed()) as _, path.param().abi(), query.param().abi(), targetfilepath.param().abi(), flags).ok() } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { - EvtFormatMessage( - core::mem::transmute(publishermetadata.unwrap_or(core::mem::zeroed())), - core::mem::transmute(event.unwrap_or(core::mem::zeroed())), - 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())), - 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() - } + unsafe { EvtFormatMessage(publishermetadata.unwrap_or(core::mem::zeroed()) as _, event.unwrap_or(core::mem::zeroed()) as _, 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())), 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())), bufferused as _).ok() } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { EvtGetChannelConfigProperty(channelconfig, propertyid, flags, propertyvaluebuffersize, core::mem::transmute(propertyvaluebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertyvaluebufferused)).ok() } + unsafe { EvtGetChannelConfigProperty(channelconfig, propertyid, flags, propertyvaluebuffersize, propertyvaluebuffer.unwrap_or(core::mem::zeroed()) as _, propertyvaluebufferused as _).ok() } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { EvtGetEventInfo(event, propertyid, propertyvaluebuffersize, core::mem::transmute(propertyvaluebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertyvaluebufferused)).ok() } + unsafe { EvtGetEventInfo(event, propertyid, propertyvaluebuffersize, propertyvaluebuffer.unwrap_or(core::mem::zeroed()) as _, propertyvaluebufferused as _).ok() } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { EvtGetEventMetadataProperty(eventmetadata, propertyid, flags, eventmetadatapropertybuffersize, core::mem::transmute(eventmetadatapropertybuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(eventmetadatapropertybufferused)).ok() } + unsafe { EvtGetEventMetadataProperty(eventmetadata, propertyid, flags, eventmetadatapropertybuffersize, eventmetadatapropertybuffer.unwrap_or(core::mem::zeroed()) as _, eventmetadatapropertybufferused as _).ok() } } #[inline] pub unsafe fn EvtGetExtendedStatus(buffer: Option<&mut [u16]>, bufferused: *mut u32) -> u32 { windows_targets::link!("wevtapi.dll" "system" fn EvtGetExtendedStatus(buffersize : u32, buffer : windows_core::PWSTR, bufferused : *mut u32) -> u32); - unsafe { EvtGetExtendedStatus(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)) } + unsafe { EvtGetExtendedStatus(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())), bufferused as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { EvtGetLogInfo(log, propertyid, propertyvaluebuffersize, core::mem::transmute(propertyvaluebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertyvaluebufferused)).ok() } + unsafe { EvtGetLogInfo(log, propertyid, propertyvaluebuffersize, propertyvaluebuffer.unwrap_or(core::mem::zeroed()) as _, propertyvaluebufferused as _).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); - unsafe { EvtGetObjectArrayProperty(objectarray, propertyid, arrayindex, flags, propertyvaluebuffersize, core::mem::transmute(propertyvaluebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertyvaluebufferused)).ok() } + unsafe { EvtGetObjectArrayProperty(objectarray, propertyid, arrayindex, flags, propertyvaluebuffersize, propertyvaluebuffer.unwrap_or(core::mem::zeroed()) as _, propertyvaluebufferused as _).ok() } } #[inline] pub unsafe fn EvtGetObjectArraySize(objectarray: isize, objectarraysize: *mut u32) -> windows_core::Result<()> { windows_targets::link!("wevtapi.dll" "system" fn EvtGetObjectArraySize(objectarray : isize, objectarraysize : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { EvtGetObjectArraySize(objectarray, core::mem::transmute(objectarraysize)).ok() } + unsafe { EvtGetObjectArraySize(objectarray, objectarraysize as _).ok() } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { EvtGetPublisherMetadataProperty(publishermetadata, propertyid, flags, publishermetadatapropertybuffersize, core::mem::transmute(publishermetadatapropertybuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(publishermetadatapropertybufferused)).ok() } + unsafe { EvtGetPublisherMetadataProperty(publishermetadata, propertyid, flags, publishermetadatapropertybuffersize, publishermetadatapropertybuffer.unwrap_or(core::mem::zeroed()) as _, publishermetadatapropertybufferused as _).ok() } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { EvtGetQueryInfo(queryorsubscription, propertyid, propertyvaluebuffersize, core::mem::transmute(propertyvaluebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertyvaluebufferused)).ok() } + unsafe { EvtGetQueryInfo(queryorsubscription, propertyid, propertyvaluebuffersize, propertyvaluebuffer.unwrap_or(core::mem::zeroed()) as _, propertyvaluebufferused as _).ok() } } #[inline] 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); - unsafe { EvtNext(resultset, events.len().try_into().unwrap(), core::mem::transmute(events.as_ptr()), timeout, flags, core::mem::transmute(returned)).ok() } + unsafe { EvtNext(resultset, events.len().try_into().unwrap(), core::mem::transmute(events.as_ptr()), timeout, flags, returned as _).ok() } } #[inline] 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); - unsafe { EvtNextChannelPath(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() } + unsafe { EvtNextChannelPath(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())), channelpathbufferused as _).ok() } } #[inline] pub unsafe fn EvtNextEventMetadata(eventmetadataenum: EVT_HANDLE, flags: u32) -> windows_core::Result { @@ -182,7 +169,7 @@ pub unsafe fn EvtNextEventMetadata(eventmetadataenum: EVT_HANDLE, flags: u32) -> #[inline] 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); - unsafe { EvtNextPublisherId(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() } + unsafe { EvtNextPublisherId(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())), publisheridbufferused as _).ok() } } #[inline] pub unsafe fn EvtOpenChannelConfig(session: Option, channelpath: P1, flags: u32) -> windows_core::Result @@ -190,13 +177,13 @@ where 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__ = unsafe { EvtOpenChannelConfig(core::mem::transmute(session.unwrap_or(core::mem::zeroed())), channelpath.param().abi(), flags) }; + let result__ = unsafe { EvtOpenChannelConfig(session.unwrap_or(core::mem::zeroed()) as _, channelpath.param().abi(), flags) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] 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__ = unsafe { EvtOpenChannelEnum(core::mem::transmute(session.unwrap_or(core::mem::zeroed())), flags) }; + let result__ = unsafe { EvtOpenChannelEnum(session.unwrap_or(core::mem::zeroed()) as _, flags) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -211,13 +198,13 @@ where 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__ = unsafe { EvtOpenLog(core::mem::transmute(session.unwrap_or(core::mem::zeroed())), path.param().abi(), flags) }; + let result__ = unsafe { EvtOpenLog(session.unwrap_or(core::mem::zeroed()) as _, path.param().abi(), flags) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] 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__ = unsafe { EvtOpenPublisherEnum(core::mem::transmute(session.unwrap_or(core::mem::zeroed())), flags) }; + let result__ = unsafe { EvtOpenPublisherEnum(session.unwrap_or(core::mem::zeroed()) as _, flags) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -227,13 +214,13 @@ where 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__ = unsafe { EvtOpenPublisherMetadata(core::mem::transmute(session.unwrap_or(core::mem::zeroed())), publisherid.param().abi(), logfilepath.param().abi(), locale, flags) }; + let result__ = unsafe { EvtOpenPublisherMetadata(session.unwrap_or(core::mem::zeroed()) as _, publisherid.param().abi(), logfilepath.param().abi(), locale, 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: 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__ = unsafe { EvtOpenSession(loginclass, login, core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { EvtOpenSession(loginclass, login, timeout.unwrap_or(core::mem::zeroed()) as _, flags.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -243,13 +230,13 @@ where 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__ = unsafe { EvtQuery(core::mem::transmute(session.unwrap_or(core::mem::zeroed())), path.param().abi(), query.param().abi(), flags) }; + let result__ = unsafe { EvtQuery(session.unwrap_or(core::mem::zeroed()) as _, path.param().abi(), query.param().abi(), flags) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] 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); - unsafe { EvtRender(core::mem::transmute(context.unwrap_or(core::mem::zeroed())), fragment, flags, buffersize, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferused), core::mem::transmute(propertycount)).ok() } + unsafe { EvtRender(context.unwrap_or(core::mem::zeroed()) as _, fragment, flags, buffersize, buffer.unwrap_or(core::mem::zeroed()) as _, bufferused as _, propertycount as _).ok() } } #[inline] pub unsafe fn EvtSaveChannelConfig(channelconfig: EVT_HANDLE, flags: u32) -> windows_core::Result<()> { @@ -259,7 +246,7 @@ pub unsafe fn EvtSaveChannelConfig(channelconfig: EVT_HANDLE, flags: u32) -> win #[inline] 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); - unsafe { EvtSeek(resultset, position, core::mem::transmute(bookmark.unwrap_or(core::mem::zeroed())), core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), flags).ok() } + unsafe { EvtSeek(resultset, position, bookmark.unwrap_or(core::mem::zeroed()) as _, timeout.unwrap_or(core::mem::zeroed()) as _, flags).ok() } } #[cfg(feature = "Win32_Security")] #[inline] @@ -274,7 +261,7 @@ where P3: 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__ = unsafe { 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())), flags) }; + let result__ = unsafe { EvtSubscribe(session.unwrap_or(core::mem::zeroed()) as _, signalevent.unwrap_or(core::mem::zeroed()) as _, channelpath.param().abi(), query.param().abi(), bookmark.unwrap_or(core::mem::zeroed()) as _, context.unwrap_or(core::mem::zeroed()) as _, callback.unwrap_or(core::mem::zeroed()) as _, flags) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -285,17 +272,17 @@ pub unsafe fn EvtUpdateBookmark(bookmark: EVT_HANDLE, event: EVT_HANDLE) -> wind #[inline] 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); - unsafe { GetEventLogInformation(heventlog, dwinfolevel, core::mem::transmute(lpbuffer), cbbufsize, core::mem::transmute(pcbbytesneeded)).ok() } + unsafe { GetEventLogInformation(heventlog, dwinfolevel, lpbuffer as _, cbbufsize, pcbbytesneeded as _).ok() } } #[inline] 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); - unsafe { GetNumberOfEventLogRecords(heventlog, core::mem::transmute(numberofrecords)).ok() } + unsafe { GetNumberOfEventLogRecords(heventlog, numberofrecords as _).ok() } } #[inline] 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); - unsafe { GetOldestEventLogRecord(heventlog, core::mem::transmute(oldestrecord)).ok() } + unsafe { GetOldestEventLogRecord(heventlog, oldestrecord as _).ok() } } #[inline] pub unsafe fn NotifyChangeEventLog(heventlog: super::super::Foundation::HANDLE, hevent: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -345,12 +332,12 @@ where #[inline] 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); - unsafe { ReadEventLogA(heventlog, dwreadflags, dwrecordoffset, core::mem::transmute(lpbuffer), nnumberofbytestoread, core::mem::transmute(pnbytesread), core::mem::transmute(pnminnumberofbytesneeded)).ok() } + unsafe { ReadEventLogA(heventlog, dwreadflags, dwrecordoffset, lpbuffer as _, nnumberofbytestoread, pnbytesread as _, pnminnumberofbytesneeded as _).ok() } } #[inline] 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); - unsafe { ReadEventLogW(heventlog, dwreadflags, dwrecordoffset, core::mem::transmute(lpbuffer), nnumberofbytestoread, core::mem::transmute(pnbytesread), core::mem::transmute(pnminnumberofbytesneeded)).ok() } + unsafe { ReadEventLogW(heventlog, dwreadflags, dwrecordoffset, lpbuffer as _, nnumberofbytestoread, pnbytesread as _, pnminnumberofbytesneeded as _).ok() } } #[inline] pub unsafe fn RegisterEventSourceA(lpuncservername: P0, lpsourcename: P1) -> windows_core::Result @@ -376,13 +363,13 @@ where #[inline] 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); - unsafe { ReportEventA(heventlog, wtype, wcategory, dweventid, core::mem::transmute(lpusersid.unwrap_or(core::mem::zeroed())), lpstrings.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dwdatasize, core::mem::transmute(lpstrings.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(lprawdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ReportEventA(heventlog, wtype, wcategory, dweventid, lpusersid.unwrap_or(core::mem::zeroed()) as _, lpstrings.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dwdatasize, core::mem::transmute(lpstrings.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lprawdata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { ReportEventW(heventlog, wtype, wcategory, dweventid, core::mem::transmute(lpusersid.unwrap_or(core::mem::zeroed())), lpstrings.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dwdatasize, core::mem::transmute(lpstrings.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(lprawdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ReportEventW(heventlog, wtype, wcategory, dweventid, lpusersid.unwrap_or(core::mem::zeroed()) as _, lpstrings.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dwdatasize, core::mem::transmute(lpstrings.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lprawdata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] diff --git a/crates/libs/windows/src/Windows/Win32/System/EventNotificationService/mod.rs b/crates/libs/windows/src/Windows/Win32/System/EventNotificationService/mod.rs index ccf47fe472..7e71ed1327 100644 --- a/crates/libs/windows/src/Windows/Win32/System/EventNotificationService/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/EventNotificationService/mod.rs @@ -4,7 +4,7 @@ where P0: windows_core::Param, { windows_targets::link!("sensapi.dll" "system" fn IsDestinationReachableA(lpszdestination : windows_core::PCSTR, lpqocinfo : *mut QOCINFO) -> super::super::Foundation:: BOOL); - unsafe { IsDestinationReachableA(lpszdestination.param().abi(), core::mem::transmute(lpqocinfo)).ok() } + unsafe { IsDestinationReachableA(lpszdestination.param().abi(), lpqocinfo as _).ok() } } #[inline] pub unsafe fn IsDestinationReachableW(lpszdestination: P0, lpqocinfo: *mut QOCINFO) -> windows_core::Result<()> @@ -12,12 +12,12 @@ where P0: windows_core::Param, { windows_targets::link!("sensapi.dll" "system" fn IsDestinationReachableW(lpszdestination : windows_core::PCWSTR, lpqocinfo : *mut QOCINFO) -> super::super::Foundation:: BOOL); - unsafe { IsDestinationReachableW(lpszdestination.param().abi(), core::mem::transmute(lpqocinfo)).ok() } + unsafe { IsDestinationReachableW(lpszdestination.param().abi(), lpqocinfo as _).ok() } } #[inline] pub unsafe fn IsNetworkAlive(lpdwflags: *mut u32) -> windows_core::Result<()> { windows_targets::link!("sensapi.dll" "system" fn IsNetworkAlive(lpdwflags : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { IsNetworkAlive(core::mem::transmute(lpdwflags)).ok() } + unsafe { IsNetworkAlive(lpdwflags as _).ok() } } pub const CONNECTION_AOL: u32 = 4u32; pub const CONNECTION_LAN: SENS_CONNECTION_TYPE = SENS_CONNECTION_TYPE(0u32); 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 34483d5fe9..fdc45b5698 100644 --- a/crates/libs/windows/src/Windows/Win32/System/GroupPolicy/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/GroupPolicy/mod.rs @@ -1,7 +1,7 @@ #[inline] pub unsafe fn BrowseForGPO(lpbrowseinfo: *mut GPOBROWSEINFO) -> windows_core::Result<()> { windows_targets::link!("gpedit.dll" "system" fn BrowseForGPO(lpbrowseinfo : *mut GPOBROWSEINFO) -> windows_core::HRESULT); - unsafe { BrowseForGPO(core::mem::transmute(lpbrowseinfo)).ok() } + unsafe { BrowseForGPO(lpbrowseinfo as _).ok() } } #[inline] pub unsafe fn CommandLineFromMsiDescriptor(descriptor: P0, commandline: windows_core::PWSTR, commandlinelength: *mut u32) -> u32 @@ -9,7 +9,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn CommandLineFromMsiDescriptor(descriptor : windows_core::PCWSTR, commandline : windows_core::PWSTR, commandlinelength : *mut u32) -> u32); - unsafe { CommandLineFromMsiDescriptor(descriptor.param().abi(), core::mem::transmute(commandline), core::mem::transmute(commandlinelength)) } + unsafe { CommandLineFromMsiDescriptor(descriptor.param().abi(), core::mem::transmute(commandline), commandlinelength as _) } } #[inline] pub unsafe fn CreateGPOLink(lpgpo: P0, lpcontainer: P1, fhighpriority: bool) -> windows_core::Result<()> @@ -77,7 +77,7 @@ where P1: 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); - unsafe { GetAppliedGPOListA(dwflags, pmachinename.param().abi(), core::mem::transmute(psiduser.unwrap_or(core::mem::zeroed())), pguidextension, core::mem::transmute(ppgpolist)) } + unsafe { GetAppliedGPOListA(dwflags, pmachinename.param().abi(), psiduser.unwrap_or(core::mem::zeroed()) as _, pguidextension, ppgpolist as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -86,7 +86,7 @@ where P1: 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); - unsafe { GetAppliedGPOListW(dwflags, pmachinename.param().abi(), core::mem::transmute(psiduser.unwrap_or(core::mem::zeroed())), pguidextension, core::mem::transmute(ppgpolist)) } + unsafe { GetAppliedGPOListW(dwflags, pmachinename.param().abi(), psiduser.unwrap_or(core::mem::zeroed()) as _, pguidextension, ppgpolist as _) } } #[inline] pub unsafe fn GetGPOListA(htoken: Option, lpname: P1, lphostname: P2, lpcomputername: P3, dwflags: u32, pgpolist: *mut *mut GROUP_POLICY_OBJECTA) -> windows_core::Result<()> @@ -96,7 +96,7 @@ where 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); - unsafe { GetGPOListA(core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), lpname.param().abi(), lphostname.param().abi(), lpcomputername.param().abi(), dwflags, core::mem::transmute(pgpolist)).ok() } + unsafe { GetGPOListA(htoken.unwrap_or(core::mem::zeroed()) as _, lpname.param().abi(), lphostname.param().abi(), lpcomputername.param().abi(), dwflags, pgpolist as _).ok() } } #[inline] pub unsafe fn GetGPOListW(htoken: Option, lpname: P1, lphostname: P2, lpcomputername: P3, dwflags: u32, pgpolist: *mut *mut GROUP_POLICY_OBJECTW) -> windows_core::Result<()> @@ -106,7 +106,7 @@ where 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); - unsafe { GetGPOListW(core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), lpname.param().abi(), lphostname.param().abi(), lpcomputername.param().abi(), dwflags, core::mem::transmute(pgpolist)).ok() } + unsafe { GetGPOListW(htoken.unwrap_or(core::mem::zeroed()) as _, lpname.param().abi(), lphostname.param().abi(), lpcomputername.param().abi(), dwflags, pgpolist as _).ok() } } #[inline] pub unsafe fn GetLocalManagedApplicationData(productcode: P0, displayname: *mut windows_core::PWSTR, supporturl: *mut windows_core::PWSTR) @@ -114,23 +114,23 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn GetLocalManagedApplicationData(productcode : windows_core::PCWSTR, displayname : *mut windows_core::PWSTR, supporturl : *mut windows_core::PWSTR)); - unsafe { GetLocalManagedApplicationData(productcode.param().abi(), core::mem::transmute(displayname), core::mem::transmute(supporturl)) } + unsafe { GetLocalManagedApplicationData(productcode.param().abi(), displayname as _, supporturl as _) } } #[inline] pub unsafe fn GetLocalManagedApplications(buserapps: bool, pdwapps: *mut u32, prglocalapps: *mut *mut LOCALMANAGEDAPPLICATION) -> u32 { windows_targets::link!("advapi32.dll" "system" fn GetLocalManagedApplications(buserapps : super::super::Foundation:: BOOL, pdwapps : *mut u32, prglocalapps : *mut *mut LOCALMANAGEDAPPLICATION) -> u32); - unsafe { GetLocalManagedApplications(buserapps.into(), core::mem::transmute(pdwapps), core::mem::transmute(prglocalapps)) } + unsafe { GetLocalManagedApplications(buserapps.into(), pdwapps as _, prglocalapps as _) } } #[cfg(feature = "Win32_UI_Shell")] #[inline] 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); - unsafe { GetManagedApplicationCategories(core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pappcategory)) } + unsafe { GetManagedApplicationCategories(dwreserved.unwrap_or(core::mem::zeroed()) as _, pappcategory as _) } } #[inline] pub unsafe fn GetManagedApplications(pcategory: *const windows_core::GUID, dwqueryflags: u32, dwinfolevel: u32, pdwapps: *mut u32, prgmanagedapps: *mut *mut MANAGEDAPPLICATION) -> u32 { windows_targets::link!("advapi32.dll" "system" fn GetManagedApplications(pcategory : *const windows_core::GUID, dwqueryflags : u32, dwinfolevel : u32, pdwapps : *mut u32, prgmanagedapps : *mut *mut MANAGEDAPPLICATION) -> u32); - unsafe { GetManagedApplications(pcategory, dwqueryflags, dwinfolevel, core::mem::transmute(pdwapps), core::mem::transmute(prgmanagedapps)) } + unsafe { GetManagedApplications(pcategory, dwqueryflags, dwinfolevel, pdwapps as _, prgmanagedapps as _) } } #[inline] pub unsafe fn ImportRSoPData(lpnamespace: P0, lpfilename: P1) -> windows_core::Result<()> @@ -180,22 +180,7 @@ pub unsafe fn RegisterGPNotification(hevent: super::super::Foundation::HANDLE, b #[inline] 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); - unsafe { - RsopAccessCheckByType( - psecuritydescriptor, - core::mem::transmute(pprincipalselfsid.unwrap_or(core::mem::zeroed())), - prsoptoken, - dwdesiredaccessmask, - core::mem::transmute(pobjecttypelist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - pobjecttypelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - pgenericmapping, - core::mem::transmute(pprivilegeset.unwrap_or(core::mem::zeroed())), - core::mem::transmute(pdwprivilegesetlength.unwrap_or(core::mem::zeroed())), - core::mem::transmute(pdwgrantedaccessmask), - core::mem::transmute(pbaccessstatus), - ) - .ok() - } + unsafe { RsopAccessCheckByType(psecuritydescriptor, pprincipalselfsid.unwrap_or(core::mem::zeroed()) as _, prsoptoken, dwdesiredaccessmask, core::mem::transmute(pobjecttypelist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pobjecttypelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pgenericmapping, pprivilegeset.unwrap_or(core::mem::zeroed()) as _, pdwprivilegesetlength.unwrap_or(core::mem::zeroed()) as _, pdwgrantedaccessmask as _, pbaccessstatus as _).ok() } } #[inline] pub unsafe fn RsopFileAccessCheck(pszfilename: P0, prsoptoken: *const core::ffi::c_void, dwdesiredaccessmask: u32, pdwgrantedaccessmask: *mut u32, pbaccessstatus: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> @@ -203,7 +188,7 @@ where P0: windows_core::Param, { windows_targets::link!("userenv.dll" "system" fn RsopFileAccessCheck(pszfilename : windows_core::PCWSTR, prsoptoken : *const core::ffi::c_void, dwdesiredaccessmask : u32, pdwgrantedaccessmask : *mut u32, pbaccessstatus : *mut super::super::Foundation:: BOOL) -> windows_core::HRESULT); - unsafe { RsopFileAccessCheck(pszfilename.param().abi(), prsoptoken, dwdesiredaccessmask, core::mem::transmute(pdwgrantedaccessmask), core::mem::transmute(pbaccessstatus)).ok() } + unsafe { RsopFileAccessCheck(pszfilename.param().abi(), prsoptoken, dwdesiredaccessmask, pdwgrantedaccessmask as _, pbaccessstatus as _).ok() } } #[cfg(feature = "Win32_System_Wmi")] #[inline] @@ -519,7 +504,7 @@ impl IGPEInformation { } #[cfg(feature = "Win32_System_Registry")] pub unsafe fn GetRegistryKey(&self, dwsection: u32, hkey: *mut super::Registry::HKEY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRegistryKey)(windows_core::Interface::as_raw(self), dwsection, core::mem::transmute(hkey)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRegistryKey)(windows_core::Interface::as_raw(self), dwsection, hkey as _).ok() } } pub unsafe fn GetDSPath(&self, dwsection: u32, pszpath: &mut [u16]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetDSPath)(windows_core::Interface::as_raw(self), dwsection, core::mem::transmute(pszpath.as_ptr()), pszpath.len().try_into().unwrap()).ok() } @@ -528,16 +513,16 @@ impl IGPEInformation { unsafe { (windows_core::Interface::vtable(self).GetFileSysPath)(windows_core::Interface::as_raw(self), dwsection, core::mem::transmute(pszpath.as_ptr()), pszpath.len().try_into().unwrap()).ok() } } pub unsafe fn GetOptions(&self, dwoptions: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(dwoptions)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOptions)(windows_core::Interface::as_raw(self), dwoptions as _).ok() } } pub unsafe fn GetType(&self, gpotype: *mut GROUP_POLICY_OBJECT_TYPE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetType)(windows_core::Interface::as_raw(self), core::mem::transmute(gpotype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetType)(windows_core::Interface::as_raw(self), gpotype as _).ok() } } pub unsafe fn GetHint(&self, gphint: *mut GROUP_POLICY_HINT_TYPE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetHint)(windows_core::Interface::as_raw(self), core::mem::transmute(gphint)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetHint)(windows_core::Interface::as_raw(self), gphint as _).ok() } } pub unsafe fn PolicyChanged(&self, bmachine: bool, badd: bool, pguidextension: *mut windows_core::GUID, pguidsnapin: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).PolicyChanged)(windows_core::Interface::as_raw(self), bmachine.into(), badd.into(), core::mem::transmute(pguidextension), core::mem::transmute(pguidsnapin)).ok() } + unsafe { (windows_core::Interface::vtable(self).PolicyChanged)(windows_core::Interface::as_raw(self), bmachine.into(), badd.into(), pguidextension as _, pguidsnapin as _).ok() } } } #[repr(C)] @@ -8862,7 +8847,7 @@ impl IGroupPolicyObject { unsafe { (windows_core::Interface::vtable(self).OpenRemoteMachineGPO)(windows_core::Interface::as_raw(self), pszcomputername.param().abi(), dwflags).ok() } } pub unsafe fn Save(&self, bmachine: bool, badd: bool, pguidextension: *mut windows_core::GUID, pguid: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self), bmachine.into(), badd.into(), core::mem::transmute(pguidextension), core::mem::transmute(pguid)).ok() } + unsafe { (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self), bmachine.into(), badd.into(), pguidextension as _, pguid as _).ok() } } pub unsafe fn Delete(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Delete)(windows_core::Interface::as_raw(self)).ok() } @@ -8890,23 +8875,23 @@ impl IGroupPolicyObject { } #[cfg(feature = "Win32_System_Registry")] pub unsafe fn GetRegistryKey(&self, dwsection: GPO_SECTION, hkey: *mut super::Registry::HKEY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRegistryKey)(windows_core::Interface::as_raw(self), dwsection, core::mem::transmute(hkey)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRegistryKey)(windows_core::Interface::as_raw(self), dwsection, hkey as _).ok() } } pub unsafe fn GetOptions(&self, dwoptions: *mut GPO_OPTIONS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(dwoptions)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOptions)(windows_core::Interface::as_raw(self), dwoptions as _).ok() } } pub unsafe fn SetOptions(&self, dwoptions: GPO_OPTIONS, dwmask: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetOptions)(windows_core::Interface::as_raw(self), dwoptions, dwmask).ok() } } pub unsafe fn GetType(&self, gpotype: *mut GROUP_POLICY_OBJECT_TYPE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetType)(windows_core::Interface::as_raw(self), core::mem::transmute(gpotype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetType)(windows_core::Interface::as_raw(self), gpotype as _).ok() } } pub unsafe fn GetMachineName(&self, pszname: &mut [u16]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetMachineName)(windows_core::Interface::as_raw(self), core::mem::transmute(pszname.as_ptr()), pszname.len().try_into().unwrap()).ok() } } #[cfg(feature = "Win32_UI_Controls")] pub unsafe fn GetPropertySheetPages(&self, hpages: *mut *mut super::super::UI::Controls::HPROPSHEETPAGE, upagecount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPropertySheetPages)(windows_core::Interface::as_raw(self), core::mem::transmute(hpages), core::mem::transmute(upagecount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropertySheetPages)(windows_core::Interface::as_raw(self), hpages as _, upagecount as _).ok() } } } #[repr(C)] @@ -9153,7 +9138,7 @@ impl IRSOPInformation { unsafe { (windows_core::Interface::vtable(self).GetNamespace)(windows_core::Interface::as_raw(self), dwsection, core::mem::transmute(pszname.as_ptr()), pszname.len().try_into().unwrap()).ok() } } pub unsafe fn GetFlags(&self, pdwflags: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFlags)(windows_core::Interface::as_raw(self), pdwflags as _).ok() } } pub unsafe fn GetEventLogEntryText(&self, pszeventsource: P0, pszeventlogname: P1, pszeventtime: P2, dweventid: u32) -> windows_core::Result where 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 17210a4984..9a25f1b205 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); - unsafe { HcnCreateEndpoint(network, id, settings.param().abi(), core::mem::transmute(endpoint), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcnCreateEndpoint(network, id, settings.param().abi(), endpoint as _, errorrecord.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { HcnCreateGuestNetworkService(id, settings.param().abi(), core::mem::transmute(guestnetworkservice), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcnCreateGuestNetworkService(id, settings.param().abi(), guestnetworkservice as _, errorrecord.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { HcnCreateLoadBalancer(id, settings.param().abi(), core::mem::transmute(loadbalancer), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcnCreateLoadBalancer(id, settings.param().abi(), loadbalancer as _, errorrecord.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { HcnCreateNamespace(id, settings.param().abi(), core::mem::transmute(namespace), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcnCreateNamespace(id, settings.param().abi(), namespace as _, errorrecord.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { HcnCreateNetwork(id, settings.param().abi(), core::mem::transmute(network), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcnCreateNetwork(id, settings.param().abi(), network as _, errorrecord.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { HcnDeleteEndpoint(id, core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcnDeleteEndpoint(id, errorrecord.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { HcnDeleteGuestNetworkService(id, core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcnDeleteGuestNetworkService(id, errorrecord.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { HcnDeleteLoadBalancer(id, core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcnDeleteLoadBalancer(id, errorrecord.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { HcnDeleteNamespace(id, core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcnDeleteNamespace(id, errorrecord.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { HcnDeleteNetwork(id, core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcnDeleteNetwork(id, errorrecord.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn HcnEnumerateEndpoints(query: P0, endpoints: *mut windows_core::PWSTR, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -94,12 +94,12 @@ 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); - unsafe { HcnEnumerateEndpoints(query.param().abi(), core::mem::transmute(endpoints), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcnEnumerateEndpoints(query.param().abi(), endpoints as _, errorrecord.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn HcnEnumerateGuestNetworkPortReservations(returncount: *mut u32, portentries: *mut *mut HCN_PORT_RANGE_ENTRY) -> windows_core::Result<()> { windows_targets::link!("computenetwork.dll" "system" fn HcnEnumerateGuestNetworkPortReservations(returncount : *mut u32, portentries : *mut *mut HCN_PORT_RANGE_ENTRY) -> windows_core::HRESULT); - unsafe { HcnEnumerateGuestNetworkPortReservations(core::mem::transmute(returncount), core::mem::transmute(portentries)).ok() } + unsafe { HcnEnumerateGuestNetworkPortReservations(returncount as _, portentries as _).ok() } } #[inline] pub unsafe fn HcnEnumerateLoadBalancers(query: P0, loadbalancer: *mut windows_core::PWSTR, errorrecord: Option<*mut windows_core::PWSTR>) -> 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); - unsafe { HcnEnumerateLoadBalancers(query.param().abi(), core::mem::transmute(loadbalancer), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcnEnumerateLoadBalancers(query.param().abi(), loadbalancer as _, errorrecord.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { HcnEnumerateNamespaces(query.param().abi(), core::mem::transmute(namespaces), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcnEnumerateNamespaces(query.param().abi(), namespaces as _, errorrecord.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { HcnEnumerateNetworks(query.param().abi(), core::mem::transmute(networks), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcnEnumerateNetworks(query.param().abi(), networks as _, errorrecord.unwrap_or(core::mem::zeroed()) as _).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)); - unsafe { HcnFreeGuestNetworkPortReservations(core::mem::transmute(portentries.unwrap_or(core::mem::zeroed()))) } + unsafe { HcnFreeGuestNetworkPortReservations(portentries.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { HcnModifyEndpoint(endpoint, settings.param().abi(), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcnModifyEndpoint(endpoint, settings.param().abi(), errorrecord.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { HcnModifyGuestNetworkService(guestnetworkservice, settings.param().abi(), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcnModifyGuestNetworkService(guestnetworkservice, settings.param().abi(), errorrecord.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { HcnModifyLoadBalancer(loadbalancer, settings.param().abi(), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcnModifyLoadBalancer(loadbalancer, settings.param().abi(), errorrecord.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { HcnModifyNamespace(namespace, settings.param().abi(), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcnModifyNamespace(namespace, settings.param().abi(), errorrecord.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { HcnModifyNetwork(network, settings.param().abi(), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcnModifyNetwork(network, settings.param().abi(), errorrecord.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { HcnOpenEndpoint(id, core::mem::transmute(endpoint), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcnOpenEndpoint(id, endpoint as _, errorrecord.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { HcnOpenLoadBalancer(id, core::mem::transmute(loadbalancer), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcnOpenLoadBalancer(id, loadbalancer as _, errorrecord.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { HcnOpenNamespace(id, core::mem::transmute(namespace), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcnOpenNamespace(id, namespace as _, errorrecord.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { HcnOpenNetwork(id, core::mem::transmute(network), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcnOpenNetwork(id, network as _, errorrecord.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { HcnQueryEndpointAddresses(endpoint, query.param().abi(), core::mem::transmute(addresses), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcnQueryEndpointAddresses(endpoint, query.param().abi(), addresses as _, errorrecord.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { HcnQueryEndpointProperties(endpoint, query.param().abi(), core::mem::transmute(properties), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcnQueryEndpointProperties(endpoint, query.param().abi(), properties as _, errorrecord.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { HcnQueryEndpointStats(endpoint, query.param().abi(), core::mem::transmute(stats), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcnQueryEndpointStats(endpoint, query.param().abi(), stats as _, errorrecord.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { HcnQueryLoadBalancerProperties(loadbalancer, query.param().abi(), core::mem::transmute(properties), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcnQueryLoadBalancerProperties(loadbalancer, query.param().abi(), properties as _, errorrecord.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { HcnQueryNamespaceProperties(namespace, query.param().abi(), core::mem::transmute(properties), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcnQueryNamespaceProperties(namespace, query.param().abi(), properties as _, errorrecord.unwrap_or(core::mem::zeroed()) as _).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,17 +236,17 @@ 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); - unsafe { HcnQueryNetworkProperties(network, query.param().abi(), core::mem::transmute(properties), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcnQueryNetworkProperties(network, query.param().abi(), properties as _, errorrecord.unwrap_or(core::mem::zeroed()) as _).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<()> { windows_targets::link!("computenetwork.dll" "system" 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::HRESULT); - unsafe { HcnRegisterGuestNetworkServiceCallback(guestnetworkservice, callback, context, core::mem::transmute(callbackhandle)).ok() } + unsafe { HcnRegisterGuestNetworkServiceCallback(guestnetworkservice, callback, context, callbackhandle as _).ok() } } #[inline] pub unsafe fn HcnRegisterServiceCallback(callback: HCN_NOTIFICATION_CALLBACK, context: *const core::ffi::c_void, callbackhandle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("computenetwork.dll" "system" fn HcnRegisterServiceCallback(callback : HCN_NOTIFICATION_CALLBACK, context : *const core::ffi::c_void, callbackhandle : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { HcnRegisterServiceCallback(callback, context, core::mem::transmute(callbackhandle)).ok() } + unsafe { HcnRegisterServiceCallback(callback, context, callbackhandle as _).ok() } } #[inline] pub unsafe fn HcnReleaseGuestNetworkServicePortReservationHandle(portreservationhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -264,7 +264,7 @@ pub unsafe fn HcnReserveGuestNetworkServicePort(guestnetworkservice: *const core #[inline] pub unsafe fn HcnReserveGuestNetworkServicePortRange(guestnetworkservice: *const core::ffi::c_void, portcount: u16, portrangereservation: *mut HCN_PORT_RANGE_RESERVATION, portreservationhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("computenetwork.dll" "system" fn HcnReserveGuestNetworkServicePortRange(guestnetworkservice : *const core::ffi::c_void, portcount : u16, portrangereservation : *mut HCN_PORT_RANGE_RESERVATION, portreservationhandle : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - unsafe { HcnReserveGuestNetworkServicePortRange(guestnetworkservice, portcount, core::mem::transmute(portrangereservation), core::mem::transmute(portreservationhandle)).ok() } + unsafe { HcnReserveGuestNetworkServicePortRange(guestnetworkservice, portcount, portrangereservation as _, portreservationhandle as _).ok() } } #[inline] pub unsafe fn HcnUnregisterGuestNetworkServiceCallback(callbackhandle: *const core::ffi::c_void) -> windows_core::Result<()> { diff --git a/crates/libs/windows/src/Windows/Win32/System/HostComputeSystem/mod.rs b/crates/libs/windows/src/Windows/Win32/System/HostComputeSystem/mod.rs index 3ef73d092b..dbb1cf7520 100644 --- a/crates/libs/windows/src/Windows/Win32/System/HostComputeSystem/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/HostComputeSystem/mod.rs @@ -53,7 +53,7 @@ where windows_targets::link!("computecore.dll" "system" fn HcsCreateComputeSystem(id : windows_core::PCWSTR, configuration : windows_core::PCWSTR, operation : HCS_OPERATION, securitydescriptor : *const super::super::Security:: SECURITY_DESCRIPTOR, computesystem : *mut HCS_SYSTEM) -> windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - HcsCreateComputeSystem(id.param().abi(), configuration.param().abi(), operation, core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + HcsCreateComputeSystem(id.param().abi(), configuration.param().abi(), operation, securitydescriptor.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -66,7 +66,7 @@ where windows_targets::link!("computecore.dll" "system" fn HcsCreateComputeSystemInNamespace(idnamespace : windows_core::PCWSTR, id : windows_core::PCWSTR, configuration : windows_core::PCWSTR, operation : HCS_OPERATION, options : *const HCS_CREATE_OPTIONS, computesystem : *mut HCS_SYSTEM) -> windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - HcsCreateComputeSystemInNamespace(idnamespace.param().abi(), id.param().abi(), configuration.param().abi(), operation, core::mem::transmute(options.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + HcsCreateComputeSystemInNamespace(idnamespace.param().abi(), id.param().abi(), configuration.param().abi(), operation, options.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -88,12 +88,12 @@ where #[inline] 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); - unsafe { HcsCreateOperation(core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(callback.unwrap_or(core::mem::zeroed()))) } + unsafe { HcsCreateOperation(context.unwrap_or(core::mem::zeroed()) as _, callback.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { HcsCreateOperationWithNotifications(eventtypes, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), callback) } + unsafe { HcsCreateOperationWithNotifications(eventtypes, context.unwrap_or(core::mem::zeroed()) as _, callback) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -104,7 +104,7 @@ where windows_targets::link!("computecore.dll" "system" fn HcsCreateProcess(computesystem : HCS_SYSTEM, processparameters : windows_core::PCWSTR, operation : HCS_OPERATION, securitydescriptor : *const super::super::Security:: SECURITY_DESCRIPTOR, process : *mut HCS_PROCESS) -> windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - HcsCreateProcess(computesystem, processparameters.param().abi(), operation, core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + HcsCreateProcess(computesystem, processparameters.param().abi(), operation, securitydescriptor.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -201,12 +201,12 @@ pub unsafe fn HcsGetOperationId(operation: HCS_OPERATION) -> u64 { #[inline] 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); - unsafe { HcsGetOperationResult(operation, core::mem::transmute(resultdocument.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcsGetOperationResult(operation, resultdocument.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { HcsGetOperationResultAndProcessInfo(operation, core::mem::transmute(processinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(resultdocument.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcsGetOperationResultAndProcessInfo(operation, processinformation.unwrap_or(core::mem::zeroed()) as _, resultdocument.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn HcsGetOperationType(operation: HCS_OPERATION) -> HCS_OPERATION_TYPE { @@ -237,7 +237,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); - unsafe { HcsGetProcessorCompatibilityFromSavedState(runtimefilename.param().abi(), core::mem::transmute(processorfeaturesstring.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcsGetProcessorCompatibilityFromSavedState(runtimefilename.param().abi(), processorfeaturesstring.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn HcsGetServiceProperties(propertyquery: P0) -> windows_core::Result @@ -304,7 +304,7 @@ where P2: 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); - unsafe { HcsModifyComputeSystem(computesystem, operation, configuration.param().abi(), core::mem::transmute(identity.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcsModifyComputeSystem(computesystem, operation, configuration.param().abi(), identity.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn HcsModifyProcess(process: HCS_PROCESS, operation: HCS_OPERATION, settings: P2) -> windows_core::Result<()> @@ -320,7 +320,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); - unsafe { HcsModifyServiceSettings(settings.param().abi(), core::mem::transmute(result.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcsModifyServiceSettings(settings.param().abi(), result.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn HcsOpenComputeSystem(id: P0, requestedaccess: u32) -> windows_core::Result @@ -397,17 +397,17 @@ where #[inline] 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); - unsafe { HcsSetComputeSystemCallback(computesystem, callbackoptions, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), callback).ok() } + unsafe { HcsSetComputeSystemCallback(computesystem, callbackoptions, context.unwrap_or(core::mem::zeroed()) as _, callback).ok() } } #[inline] 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); - unsafe { HcsSetOperationCallback(operation, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), callback).ok() } + unsafe { HcsSetOperationCallback(operation, context.unwrap_or(core::mem::zeroed()) as _, callback).ok() } } #[inline] 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); - unsafe { HcsSetOperationContext(operation, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcsSetOperationContext(operation, context.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn HcsSetProcessCallback(process: HCS_PROCESS, callbackoptions: HCS_EVENT_OPTIONS, context: *const core::ffi::c_void, callback: HCS_EVENT_CALLBACK) -> windows_core::Result<()> { @@ -484,22 +484,22 @@ where #[inline] 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); - unsafe { HcsWaitForComputeSystemExit(computesystem, timeoutms, core::mem::transmute(result.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcsWaitForComputeSystemExit(computesystem, timeoutms, result.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { HcsWaitForOperationResult(operation, timeoutms, core::mem::transmute(resultdocument.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcsWaitForOperationResult(operation, timeoutms, resultdocument.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { HcsWaitForOperationResultAndProcessInfo(operation, timeoutms, core::mem::transmute(processinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(resultdocument.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcsWaitForOperationResultAndProcessInfo(operation, timeoutms, processinformation.unwrap_or(core::mem::zeroed()) as _, resultdocument.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { HcsWaitForProcessExit(computesystem, timeoutms, core::mem::transmute(result.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HcsWaitForProcessExit(computesystem, timeoutms, result.unwrap_or(core::mem::zeroed()) as _).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 d9b5fea174..664981360a 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Hypervisor/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Hypervisor/mod.rs @@ -1,7 +1,7 @@ #[inline] pub unsafe fn ApplyGuestMemoryFix(vmsavedstatedumphandle: *mut core::ffi::c_void, vpid: u32, virtualaddress: u64, fixbuffer: *const core::ffi::c_void, fixbuffersize: u32) -> windows_core::Result<()> { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn ApplyGuestMemoryFix(vmsavedstatedumphandle : *mut core::ffi::c_void, vpid : u32, virtualaddress : u64, fixbuffer : *const core::ffi::c_void, fixbuffersize : u32) -> windows_core::HRESULT); - unsafe { ApplyGuestMemoryFix(core::mem::transmute(vmsavedstatedumphandle), vpid, virtualaddress, fixbuffer, fixbuffersize).ok() } + unsafe { ApplyGuestMemoryFix(vmsavedstatedumphandle as _, vpid, virtualaddress, fixbuffer, fixbuffersize).ok() } } #[inline] pub unsafe fn ApplyPendingSavedStateFileReplayLog(vmrsfile: P0) -> windows_core::Result<()> @@ -14,7 +14,7 @@ where #[inline] pub unsafe fn CallStackUnwind(vmsavedstatedumphandle: *mut core::ffi::c_void, vpid: u32, imageinfo: *const MODULE_INFO, imageinfocount: u32, framecount: u32, callstack: *mut windows_core::PWSTR) -> windows_core::Result<()> { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn CallStackUnwind(vmsavedstatedumphandle : *mut core::ffi::c_void, vpid : u32, imageinfo : *const MODULE_INFO, imageinfocount : u32, framecount : u32, callstack : *mut windows_core::PWSTR) -> windows_core::HRESULT); - unsafe { CallStackUnwind(core::mem::transmute(vmsavedstatedumphandle), vpid, imageinfo, imageinfocount, framecount, core::mem::transmute(callstack)).ok() } + unsafe { CallStackUnwind(vmsavedstatedumphandle as _, vpid, imageinfo, imageinfocount, framecount, callstack as _).ok() } } #[inline] pub unsafe fn FindSavedStateSymbolFieldInType(vmsavedstatedumphandle: *mut core::ffi::c_void, vpid: u32, typename: P2, fieldname: P3, offset: *mut u32, found: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> @@ -23,82 +23,82 @@ where P3: windows_core::Param, { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn FindSavedStateSymbolFieldInType(vmsavedstatedumphandle : *mut core::ffi::c_void, vpid : u32, typename : windows_core::PCSTR, fieldname : windows_core::PCWSTR, offset : *mut u32, found : *mut super::super::Foundation:: BOOL) -> windows_core::HRESULT); - unsafe { FindSavedStateSymbolFieldInType(core::mem::transmute(vmsavedstatedumphandle), vpid, typename.param().abi(), fieldname.param().abi(), core::mem::transmute(offset), core::mem::transmute(found)).ok() } + unsafe { FindSavedStateSymbolFieldInType(vmsavedstatedumphandle as _, vpid, typename.param().abi(), fieldname.param().abi(), offset as _, found as _).ok() } } #[inline] pub unsafe fn ForceActiveVirtualTrustLevel(vmsavedstatedumphandle: *mut core::ffi::c_void, vpid: u32, virtualtrustlevel: u8) -> windows_core::Result<()> { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn ForceActiveVirtualTrustLevel(vmsavedstatedumphandle : *mut core::ffi::c_void, vpid : u32, virtualtrustlevel : u8) -> windows_core::HRESULT); - unsafe { ForceActiveVirtualTrustLevel(core::mem::transmute(vmsavedstatedumphandle), vpid, virtualtrustlevel).ok() } + unsafe { ForceActiveVirtualTrustLevel(vmsavedstatedumphandle as _, vpid, virtualtrustlevel).ok() } } #[inline] pub unsafe fn ForceArchitecture(vmsavedstatedumphandle: *mut core::ffi::c_void, vpid: u32, architecture: VIRTUAL_PROCESSOR_ARCH) -> windows_core::Result<()> { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn ForceArchitecture(vmsavedstatedumphandle : *mut core::ffi::c_void, vpid : u32, architecture : VIRTUAL_PROCESSOR_ARCH) -> windows_core::HRESULT); - unsafe { ForceArchitecture(core::mem::transmute(vmsavedstatedumphandle), vpid, architecture).ok() } + unsafe { ForceArchitecture(vmsavedstatedumphandle as _, vpid, architecture).ok() } } #[inline] pub unsafe fn ForceNestedHostMode(vmsavedstatedumphandle: *mut core::ffi::c_void, vpid: u32, hostmode: bool, oldmode: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> { 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); - unsafe { ForceNestedHostMode(core::mem::transmute(vmsavedstatedumphandle), vpid, hostmode.into(), core::mem::transmute(oldmode.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ForceNestedHostMode(vmsavedstatedumphandle as _, vpid, hostmode.into(), oldmode.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn ForcePagingMode(vmsavedstatedumphandle: *mut core::ffi::c_void, vpid: u32, pagingmode: PAGING_MODE) -> windows_core::Result<()> { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn ForcePagingMode(vmsavedstatedumphandle : *mut core::ffi::c_void, vpid : u32, pagingmode : PAGING_MODE) -> windows_core::HRESULT); - unsafe { ForcePagingMode(core::mem::transmute(vmsavedstatedumphandle), vpid, pagingmode).ok() } + unsafe { ForcePagingMode(vmsavedstatedumphandle as _, vpid, pagingmode).ok() } } #[inline] pub unsafe fn GetActiveVirtualTrustLevel(vmsavedstatedumphandle: *mut core::ffi::c_void, vpid: u32, virtualtrustlevel: *mut u8) -> windows_core::Result<()> { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn GetActiveVirtualTrustLevel(vmsavedstatedumphandle : *mut core::ffi::c_void, vpid : u32, virtualtrustlevel : *mut u8) -> windows_core::HRESULT); - unsafe { GetActiveVirtualTrustLevel(core::mem::transmute(vmsavedstatedumphandle), vpid, core::mem::transmute(virtualtrustlevel)).ok() } + unsafe { GetActiveVirtualTrustLevel(vmsavedstatedumphandle as _, vpid, virtualtrustlevel as _).ok() } } #[inline] pub unsafe fn GetArchitecture(vmsavedstatedumphandle: *mut core::ffi::c_void, vpid: u32, architecture: *mut VIRTUAL_PROCESSOR_ARCH) -> windows_core::Result<()> { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn GetArchitecture(vmsavedstatedumphandle : *mut core::ffi::c_void, vpid : u32, architecture : *mut VIRTUAL_PROCESSOR_ARCH) -> windows_core::HRESULT); - unsafe { GetArchitecture(core::mem::transmute(vmsavedstatedumphandle), vpid, core::mem::transmute(architecture)).ok() } + unsafe { GetArchitecture(vmsavedstatedumphandle as _, vpid, architecture as _).ok() } } #[inline] pub unsafe fn GetEnabledVirtualTrustLevels(vmsavedstatedumphandle: *mut core::ffi::c_void, vpid: u32, virtualtrustlevels: *mut u32) -> windows_core::Result<()> { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn GetEnabledVirtualTrustLevels(vmsavedstatedumphandle : *mut core::ffi::c_void, vpid : u32, virtualtrustlevels : *mut u32) -> windows_core::HRESULT); - unsafe { GetEnabledVirtualTrustLevels(core::mem::transmute(vmsavedstatedumphandle), vpid, core::mem::transmute(virtualtrustlevels)).ok() } + unsafe { GetEnabledVirtualTrustLevels(vmsavedstatedumphandle as _, vpid, virtualtrustlevels as _).ok() } } #[inline] pub unsafe fn GetGuestEnabledVirtualTrustLevels(vmsavedstatedumphandle: *mut core::ffi::c_void, virtualtrustlevels: *mut u32) -> windows_core::Result<()> { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn GetGuestEnabledVirtualTrustLevels(vmsavedstatedumphandle : *mut core::ffi::c_void, virtualtrustlevels : *mut u32) -> windows_core::HRESULT); - unsafe { GetGuestEnabledVirtualTrustLevels(core::mem::transmute(vmsavedstatedumphandle), core::mem::transmute(virtualtrustlevels)).ok() } + unsafe { GetGuestEnabledVirtualTrustLevels(vmsavedstatedumphandle as _, virtualtrustlevels as _).ok() } } #[inline] pub unsafe fn GetGuestOsInfo(vmsavedstatedumphandle: *mut core::ffi::c_void, virtualtrustlevel: u8, guestosinfo: *mut GUEST_OS_INFO) -> windows_core::Result<()> { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn GetGuestOsInfo(vmsavedstatedumphandle : *mut core::ffi::c_void, virtualtrustlevel : u8, guestosinfo : *mut GUEST_OS_INFO) -> windows_core::HRESULT); - unsafe { GetGuestOsInfo(core::mem::transmute(vmsavedstatedumphandle), virtualtrustlevel, core::mem::transmute(guestosinfo)).ok() } + unsafe { GetGuestOsInfo(vmsavedstatedumphandle as _, virtualtrustlevel, guestosinfo as _).ok() } } #[inline] pub unsafe fn GetGuestPhysicalMemoryChunks(vmsavedstatedumphandle: *mut core::ffi::c_void, memorychunkpagesize: *mut u64, memorychunks: *mut GPA_MEMORY_CHUNK, memorychunkcount: *mut u64) -> windows_core::Result<()> { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn GetGuestPhysicalMemoryChunks(vmsavedstatedumphandle : *mut core::ffi::c_void, memorychunkpagesize : *mut u64, memorychunks : *mut GPA_MEMORY_CHUNK, memorychunkcount : *mut u64) -> windows_core::HRESULT); - unsafe { GetGuestPhysicalMemoryChunks(core::mem::transmute(vmsavedstatedumphandle), core::mem::transmute(memorychunkpagesize), core::mem::transmute(memorychunks), core::mem::transmute(memorychunkcount)).ok() } + unsafe { GetGuestPhysicalMemoryChunks(vmsavedstatedumphandle as _, memorychunkpagesize as _, memorychunks as _, memorychunkcount as _).ok() } } #[inline] pub unsafe fn GetGuestRawSavedMemorySize(vmsavedstatedumphandle: *mut core::ffi::c_void, guestrawsavedmemorysize: *mut u64) -> windows_core::Result<()> { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn GetGuestRawSavedMemorySize(vmsavedstatedumphandle : *mut core::ffi::c_void, guestrawsavedmemorysize : *mut u64) -> windows_core::HRESULT); - unsafe { GetGuestRawSavedMemorySize(core::mem::transmute(vmsavedstatedumphandle), core::mem::transmute(guestrawsavedmemorysize)).ok() } + unsafe { GetGuestRawSavedMemorySize(vmsavedstatedumphandle as _, guestrawsavedmemorysize as _).ok() } } #[inline] pub unsafe fn GetMemoryBlockCacheLimit(vmsavedstatedumphandle: *mut core::ffi::c_void, memoryblockcachelimit: *mut u64) -> windows_core::Result<()> { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn GetMemoryBlockCacheLimit(vmsavedstatedumphandle : *mut core::ffi::c_void, memoryblockcachelimit : *mut u64) -> windows_core::HRESULT); - unsafe { GetMemoryBlockCacheLimit(core::mem::transmute(vmsavedstatedumphandle), core::mem::transmute(memoryblockcachelimit)).ok() } + unsafe { GetMemoryBlockCacheLimit(vmsavedstatedumphandle as _, memoryblockcachelimit as _).ok() } } #[inline] pub unsafe fn GetNestedVirtualizationMode(vmsavedstatedumphandle: *mut core::ffi::c_void, vpid: u32, enabled: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn GetNestedVirtualizationMode(vmsavedstatedumphandle : *mut core::ffi::c_void, vpid : u32, enabled : *mut super::super::Foundation:: BOOL) -> windows_core::HRESULT); - unsafe { GetNestedVirtualizationMode(core::mem::transmute(vmsavedstatedumphandle), vpid, core::mem::transmute(enabled)).ok() } + unsafe { GetNestedVirtualizationMode(vmsavedstatedumphandle as _, vpid, enabled as _).ok() } } #[inline] pub unsafe fn GetPagingMode(vmsavedstatedumphandle: *mut core::ffi::c_void, vpid: u32, pagingmode: *mut PAGING_MODE) -> windows_core::Result<()> { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn GetPagingMode(vmsavedstatedumphandle : *mut core::ffi::c_void, vpid : u32, pagingmode : *mut PAGING_MODE) -> windows_core::HRESULT); - unsafe { GetPagingMode(core::mem::transmute(vmsavedstatedumphandle), vpid, core::mem::transmute(pagingmode)).ok() } + unsafe { GetPagingMode(vmsavedstatedumphandle as _, vpid, pagingmode as _).ok() } } #[inline] pub unsafe fn GetRegisterValue(vmsavedstatedumphandle: *mut core::ffi::c_void, vpid: u32, registerid: u32, registervalue: *mut VIRTUAL_PROCESSOR_REGISTER) -> windows_core::Result<()> { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn GetRegisterValue(vmsavedstatedumphandle : *mut core::ffi::c_void, vpid : u32, registerid : u32, registervalue : *mut VIRTUAL_PROCESSOR_REGISTER) -> windows_core::HRESULT); - unsafe { GetRegisterValue(core::mem::transmute(vmsavedstatedumphandle), vpid, registerid, core::mem::transmute(registervalue)).ok() } + unsafe { GetRegisterValue(vmsavedstatedumphandle as _, vpid, registerid, registervalue as _).ok() } } #[inline] pub unsafe fn GetSavedStateSymbolFieldInfo(vmsavedstatedumphandle: *mut core::ffi::c_void, vpid: u32, typename: P2, typefieldinfomap: *mut windows_core::PWSTR) -> windows_core::Result<()> @@ -106,12 +106,12 @@ where P2: windows_core::Param, { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn GetSavedStateSymbolFieldInfo(vmsavedstatedumphandle : *mut core::ffi::c_void, vpid : u32, typename : windows_core::PCSTR, typefieldinfomap : *mut windows_core::PWSTR) -> windows_core::HRESULT); - unsafe { GetSavedStateSymbolFieldInfo(core::mem::transmute(vmsavedstatedumphandle), vpid, typename.param().abi(), core::mem::transmute(typefieldinfomap)).ok() } + unsafe { GetSavedStateSymbolFieldInfo(vmsavedstatedumphandle as _, vpid, typename.param().abi(), typefieldinfomap as _).ok() } } #[inline] pub unsafe fn GetSavedStateSymbolProviderHandle(vmsavedstatedumphandle: *mut core::ffi::c_void) -> super::super::Foundation::HANDLE { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn GetSavedStateSymbolProviderHandle(vmsavedstatedumphandle : *mut core::ffi::c_void) -> super::super::Foundation:: HANDLE); - unsafe { GetSavedStateSymbolProviderHandle(core::mem::transmute(vmsavedstatedumphandle)) } + unsafe { GetSavedStateSymbolProviderHandle(vmsavedstatedumphandle as _) } } #[inline] pub unsafe fn GetSavedStateSymbolTypeSize(vmsavedstatedumphandle: *mut core::ffi::c_void, vpid: u32, typename: P2, size: *mut u32) -> windows_core::Result<()> @@ -119,32 +119,32 @@ where P2: windows_core::Param, { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn GetSavedStateSymbolTypeSize(vmsavedstatedumphandle : *mut core::ffi::c_void, vpid : u32, typename : windows_core::PCSTR, size : *mut u32) -> windows_core::HRESULT); - unsafe { GetSavedStateSymbolTypeSize(core::mem::transmute(vmsavedstatedumphandle), vpid, typename.param().abi(), core::mem::transmute(size)).ok() } + unsafe { GetSavedStateSymbolTypeSize(vmsavedstatedumphandle as _, vpid, typename.param().abi(), size as _).ok() } } #[inline] pub unsafe fn GetVpCount(vmsavedstatedumphandle: *mut core::ffi::c_void, vpcount: *mut u32) -> windows_core::Result<()> { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn GetVpCount(vmsavedstatedumphandle : *mut core::ffi::c_void, vpcount : *mut u32) -> windows_core::HRESULT); - unsafe { GetVpCount(core::mem::transmute(vmsavedstatedumphandle), core::mem::transmute(vpcount)).ok() } + unsafe { GetVpCount(vmsavedstatedumphandle as _, vpcount as _).ok() } } #[inline] pub unsafe fn GuestPhysicalAddressToRawSavedMemoryOffset(vmsavedstatedumphandle: *mut core::ffi::c_void, physicaladdress: u64, rawsavedmemoryoffset: *mut u64) -> windows_core::Result<()> { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn GuestPhysicalAddressToRawSavedMemoryOffset(vmsavedstatedumphandle : *mut core::ffi::c_void, physicaladdress : u64, rawsavedmemoryoffset : *mut u64) -> windows_core::HRESULT); - unsafe { GuestPhysicalAddressToRawSavedMemoryOffset(core::mem::transmute(vmsavedstatedumphandle), physicaladdress, core::mem::transmute(rawsavedmemoryoffset)).ok() } + unsafe { GuestPhysicalAddressToRawSavedMemoryOffset(vmsavedstatedumphandle as _, physicaladdress, rawsavedmemoryoffset as _).ok() } } #[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); - unsafe { GuestVirtualAddressToPhysicalAddress(core::mem::transmute(vmsavedstatedumphandle), vpid, virtualaddress, core::mem::transmute(physicaladdress), core::mem::transmute(unmappedregionsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { GuestVirtualAddressToPhysicalAddress(vmsavedstatedumphandle as _, vpid, virtualaddress, physicaladdress as _, unmappedregionsize.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { HdvCreateDeviceInstance(devicehosthandle, devicetype, deviceclassid, deviceinstanceid, deviceinterface, core::mem::transmute(devicecontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(devicehandle)).ok() } + unsafe { HdvCreateDeviceInstance(devicehosthandle, devicetype, deviceclassid, deviceinstanceid, deviceinterface, devicecontext.unwrap_or(core::mem::zeroed()) as _, devicehandle as _).ok() } } #[inline] pub unsafe fn HdvCreateGuestMemoryAperture(requestor: *const core::ffi::c_void, guestphysicaladdress: u64, bytecount: u32, writeprotected: bool, mappedaddress: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("vmdevicehost.dll" "system" fn HdvCreateGuestMemoryAperture(requestor : *const core::ffi::c_void, guestphysicaladdress : u64, bytecount : u32, writeprotected : super::super::Foundation:: BOOL, mappedaddress : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { HdvCreateGuestMemoryAperture(requestor, guestphysicaladdress, bytecount, writeprotected.into(), core::mem::transmute(mappedaddress)).ok() } + unsafe { HdvCreateGuestMemoryAperture(requestor, guestphysicaladdress, bytecount, writeprotected.into(), mappedaddress as _).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: super::super::Foundation::HANDLE, sectionoffsetinpages: u64) -> windows_core::Result<()> { @@ -170,13 +170,13 @@ pub unsafe fn HdvDestroySectionBackedMmioRange(requestor: *const core::ffi::c_vo #[inline] 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); - unsafe { HdvInitializeDeviceHost(computesystem, core::mem::transmute(devicehosthandle)).ok() } + unsafe { HdvInitializeDeviceHost(computesystem, devicehosthandle as _).ok() } } #[cfg(feature = "Win32_System_HostComputeSystem")] #[inline] 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); - unsafe { HdvInitializeDeviceHostEx(computesystem, flags, core::mem::transmute(devicehosthandle)).ok() } + unsafe { HdvInitializeDeviceHostEx(computesystem, flags, devicehosthandle as _).ok() } } #[inline] pub unsafe fn HdvReadGuestMemory(requestor: *const core::ffi::c_void, guestphysicaladdress: u64, buffer: &mut [u8]) -> windows_core::Result<()> { @@ -206,17 +206,17 @@ pub unsafe fn HdvWriteGuestMemory(requestor: *const core::ffi::c_void, guestphys #[inline] pub unsafe fn InKernelSpace(vmsavedstatedumphandle: *mut core::ffi::c_void, vpid: u32, inkernelspace: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn InKernelSpace(vmsavedstatedumphandle : *mut core::ffi::c_void, vpid : u32, inkernelspace : *mut super::super::Foundation:: BOOL) -> windows_core::HRESULT); - unsafe { InKernelSpace(core::mem::transmute(vmsavedstatedumphandle), vpid, core::mem::transmute(inkernelspace)).ok() } + unsafe { InKernelSpace(vmsavedstatedumphandle as _, vpid, inkernelspace as _).ok() } } #[inline] pub unsafe fn IsActiveVirtualTrustLevelEnabled(vmsavedstatedumphandle: *mut core::ffi::c_void, vpid: u32, activevirtualtrustlevelenabled: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn IsActiveVirtualTrustLevelEnabled(vmsavedstatedumphandle : *mut core::ffi::c_void, vpid : u32, activevirtualtrustlevelenabled : *mut super::super::Foundation:: BOOL) -> windows_core::HRESULT); - unsafe { IsActiveVirtualTrustLevelEnabled(core::mem::transmute(vmsavedstatedumphandle), vpid, core::mem::transmute(activevirtualtrustlevelenabled)).ok() } + unsafe { IsActiveVirtualTrustLevelEnabled(vmsavedstatedumphandle as _, vpid, activevirtualtrustlevelenabled as _).ok() } } #[inline] pub unsafe fn IsNestedVirtualizationEnabled(vmsavedstatedumphandle: *mut core::ffi::c_void, enabled: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn IsNestedVirtualizationEnabled(vmsavedstatedumphandle : *mut core::ffi::c_void, enabled : *mut super::super::Foundation:: BOOL) -> windows_core::HRESULT); - unsafe { IsNestedVirtualizationEnabled(core::mem::transmute(vmsavedstatedumphandle), core::mem::transmute(enabled)).ok() } + unsafe { IsNestedVirtualizationEnabled(vmsavedstatedumphandle as _, enabled as _).ok() } } #[inline] pub unsafe fn LoadSavedStateFile(vmrsfile: P0, vmsavedstatedumphandle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -224,7 +224,7 @@ where P0: windows_core::Param, { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn LoadSavedStateFile(vmrsfile : windows_core::PCWSTR, vmsavedstatedumphandle : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { LoadSavedStateFile(vmrsfile.param().abi(), core::mem::transmute(vmsavedstatedumphandle)).ok() } + unsafe { LoadSavedStateFile(vmrsfile.param().abi(), vmsavedstatedumphandle as _).ok() } } #[inline] pub unsafe fn LoadSavedStateFiles(binfile: P0, vsvfile: P1, vmsavedstatedumphandle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -233,7 +233,7 @@ where P1: windows_core::Param, { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn LoadSavedStateFiles(binfile : windows_core::PCWSTR, vsvfile : windows_core::PCWSTR, vmsavedstatedumphandle : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { LoadSavedStateFiles(binfile.param().abi(), vsvfile.param().abi(), core::mem::transmute(vmsavedstatedumphandle)).ok() } + unsafe { LoadSavedStateFiles(binfile.param().abi(), vsvfile.param().abi(), vmsavedstatedumphandle as _).ok() } } #[inline] pub unsafe fn LoadSavedStateModuleSymbols(vmsavedstatedumphandle: *mut core::ffi::c_void, imagename: P1, modulename: P2, baseaddress: u64, sizeofbase: u32) -> windows_core::Result<()> @@ -242,7 +242,7 @@ where P2: windows_core::Param, { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn LoadSavedStateModuleSymbols(vmsavedstatedumphandle : *mut core::ffi::c_void, imagename : windows_core::PCSTR, modulename : windows_core::PCSTR, baseaddress : u64, sizeofbase : u32) -> windows_core::HRESULT); - unsafe { LoadSavedStateModuleSymbols(core::mem::transmute(vmsavedstatedumphandle), imagename.param().abi(), modulename.param().abi(), baseaddress, sizeofbase).ok() } + unsafe { LoadSavedStateModuleSymbols(vmsavedstatedumphandle as _, imagename.param().abi(), modulename.param().abi(), baseaddress, sizeofbase).ok() } } #[inline] pub unsafe fn LoadSavedStateModuleSymbolsEx(vmsavedstatedumphandle: *mut core::ffi::c_void, imagename: P1, imagetimestamp: u32, modulename: P3, baseaddress: u64, sizeofbase: u32) -> windows_core::Result<()> @@ -251,7 +251,7 @@ where P3: windows_core::Param, { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn LoadSavedStateModuleSymbolsEx(vmsavedstatedumphandle : *mut core::ffi::c_void, imagename : windows_core::PCSTR, imagetimestamp : u32, modulename : windows_core::PCSTR, baseaddress : u64, sizeofbase : u32) -> windows_core::HRESULT); - unsafe { LoadSavedStateModuleSymbolsEx(core::mem::transmute(vmsavedstatedumphandle), imagename.param().abi(), imagetimestamp, modulename.param().abi(), baseaddress, sizeofbase).ok() } + unsafe { LoadSavedStateModuleSymbolsEx(vmsavedstatedumphandle as _, imagename.param().abi(), imagetimestamp, modulename.param().abi(), baseaddress, sizeofbase).ok() } } #[inline] pub unsafe fn LoadSavedStateSymbolProvider(vmsavedstatedumphandle: *mut core::ffi::c_void, usersymbols: P1, force: bool) -> windows_core::Result<()> @@ -259,7 +259,7 @@ where P1: windows_core::Param, { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn LoadSavedStateSymbolProvider(vmsavedstatedumphandle : *mut core::ffi::c_void, usersymbols : windows_core::PCWSTR, force : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - unsafe { LoadSavedStateSymbolProvider(core::mem::transmute(vmsavedstatedumphandle), usersymbols.param().abi(), force.into()).ok() } + unsafe { LoadSavedStateSymbolProvider(vmsavedstatedumphandle as _, usersymbols.param().abi(), force.into()).ok() } } #[inline] pub unsafe fn LocateSavedStateFiles(vmname: P0, snapshotname: P1, binpath: *mut windows_core::PWSTR, vsvpath: *mut windows_core::PWSTR, vmrspath: *mut windows_core::PWSTR) -> windows_core::Result<()> @@ -268,17 +268,17 @@ where P1: windows_core::Param, { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn LocateSavedStateFiles(vmname : windows_core::PCWSTR, snapshotname : windows_core::PCWSTR, binpath : *mut windows_core::PWSTR, vsvpath : *mut windows_core::PWSTR, vmrspath : *mut windows_core::PWSTR) -> windows_core::HRESULT); - unsafe { LocateSavedStateFiles(vmname.param().abi(), snapshotname.param().abi(), core::mem::transmute(binpath), core::mem::transmute(vsvpath), core::mem::transmute(vmrspath)).ok() } + unsafe { LocateSavedStateFiles(vmname.param().abi(), snapshotname.param().abi(), binpath as _, vsvpath as _, vmrspath as _).ok() } } #[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); - unsafe { ReadGuestPhysicalAddress(core::mem::transmute(vmsavedstatedumphandle), physicaladdress, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ReadGuestPhysicalAddress(vmsavedstatedumphandle as _, physicaladdress, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { ReadGuestRawSavedMemory(core::mem::transmute(vmsavedstatedumphandle), rawsavedmemoryoffset, core::mem::transmute(buffer), buffersize, core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ReadGuestRawSavedMemory(vmsavedstatedumphandle as _, rawsavedmemoryoffset, buffer as _, buffersize, bytesread.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -286,17 +286,17 @@ where P2: windows_core::Param, { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn ReadSavedStateGlobalVariable(vmsavedstatedumphandle : *mut core::ffi::c_void, vpid : u32, globalname : windows_core::PCSTR, buffer : *mut core::ffi::c_void, buffersize : u32) -> windows_core::HRESULT); - unsafe { ReadSavedStateGlobalVariable(core::mem::transmute(vmsavedstatedumphandle), vpid, globalname.param().abi(), core::mem::transmute(buffer), buffersize).ok() } + unsafe { ReadSavedStateGlobalVariable(vmsavedstatedumphandle as _, vpid, globalname.param().abi(), buffer as _, buffersize).ok() } } #[inline] pub unsafe fn ReleaseSavedStateFiles(vmsavedstatedumphandle: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn ReleaseSavedStateFiles(vmsavedstatedumphandle : *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { ReleaseSavedStateFiles(core::mem::transmute(vmsavedstatedumphandle)).ok() } + unsafe { ReleaseSavedStateFiles(vmsavedstatedumphandle as _).ok() } } #[inline] pub unsafe fn ReleaseSavedStateSymbolProvider(vmsavedstatedumphandle: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn ReleaseSavedStateSymbolProvider(vmsavedstatedumphandle : *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { ReleaseSavedStateSymbolProvider(core::mem::transmute(vmsavedstatedumphandle)).ok() } + unsafe { ReleaseSavedStateSymbolProvider(vmsavedstatedumphandle as _).ok() } } #[inline] pub unsafe fn ResolveSavedStateGlobalVariableAddress(vmsavedstatedumphandle: *mut core::ffi::c_void, vpid: u32, globalname: P2, virtualaddress: *mut u64, size: Option<*mut u32>) -> windows_core::Result<()> @@ -304,22 +304,22 @@ 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); - unsafe { ResolveSavedStateGlobalVariableAddress(core::mem::transmute(vmsavedstatedumphandle), vpid, globalname.param().abi(), core::mem::transmute(virtualaddress), core::mem::transmute(size.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ResolveSavedStateGlobalVariableAddress(vmsavedstatedumphandle as _, vpid, globalname.param().abi(), virtualaddress as _, size.unwrap_or(core::mem::zeroed()) as _).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<()> { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" 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::HRESULT); - unsafe { ScanMemoryForDosImages(core::mem::transmute(vmsavedstatedumphandle), vpid, startaddress, endaddress, core::mem::transmute(callbackcontext), foundimagecallback, standaloneaddress, standaloneaddresscount).ok() } + unsafe { ScanMemoryForDosImages(vmsavedstatedumphandle as _, vpid, startaddress, endaddress, callbackcontext as _, foundimagecallback, standaloneaddress, standaloneaddresscount).ok() } } #[inline] pub unsafe fn SetMemoryBlockCacheLimit(vmsavedstatedumphandle: *mut core::ffi::c_void, memoryblockcachelimit: u64) -> windows_core::Result<()> { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn SetMemoryBlockCacheLimit(vmsavedstatedumphandle : *mut core::ffi::c_void, memoryblockcachelimit : u64) -> windows_core::HRESULT); - unsafe { SetMemoryBlockCacheLimit(core::mem::transmute(vmsavedstatedumphandle), memoryblockcachelimit).ok() } + unsafe { SetMemoryBlockCacheLimit(vmsavedstatedumphandle as _, memoryblockcachelimit).ok() } } #[inline] pub unsafe fn SetSavedStateSymbolProviderDebugInfoCallback(vmsavedstatedumphandle: *mut core::ffi::c_void, callback: GUEST_SYMBOLS_PROVIDER_DEBUG_INFO_CALLBACK) -> windows_core::Result<()> { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn SetSavedStateSymbolProviderDebugInfoCallback(vmsavedstatedumphandle : *mut core::ffi::c_void, callback : GUEST_SYMBOLS_PROVIDER_DEBUG_INFO_CALLBACK) -> windows_core::HRESULT); - unsafe { SetSavedStateSymbolProviderDebugInfoCallback(core::mem::transmute(vmsavedstatedumphandle), callback).ok() } + unsafe { SetSavedStateSymbolProviderDebugInfoCallback(vmsavedstatedumphandle as _, callback).ok() } } #[inline] pub unsafe fn WHvAcceptPartitionMigration(migrationhandle: super::super::Foundation::HANDLE) -> windows_core::Result { @@ -339,7 +339,7 @@ pub unsafe fn WHvAllocateVpciResource(providerid: Option<*const windows_core::GU 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); unsafe { let mut result__ = core::mem::zeroed(); - WHvAllocateVpciResource(core::mem::transmute(providerid.unwrap_or(core::mem::zeroed())), 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(providerid.unwrap_or(core::mem::zeroed()) as _, 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] @@ -360,7 +360,7 @@ pub unsafe fn WHvCompletePartitionMigration(partition: WHV_PARTITION_HANDLE) -> #[inline] 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); - unsafe { WHvCreateNotificationPort(partition, parameters, eventhandle, core::mem::transmute(porthandle)).ok() } + unsafe { WHvCreateNotificationPort(partition, parameters, eventhandle, porthandle as _).ok() } } #[inline] pub unsafe fn WHvCreatePartition() -> windows_core::Result { @@ -373,7 +373,7 @@ pub unsafe fn WHvCreatePartition() -> windows_core::Result #[inline] 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); - unsafe { WHvCreateTrigger(partition, parameters, core::mem::transmute(triggerhandle), core::mem::transmute(eventhandle)).ok() } + unsafe { WHvCreateTrigger(partition, parameters, triggerhandle as _, eventhandle as _).ok() } } #[inline] pub unsafe fn WHvCreateVirtualProcessor(partition: WHV_PARTITION_HANDLE, vpindex: u32, flags: u32) -> windows_core::Result<()> { @@ -388,7 +388,7 @@ pub unsafe fn WHvCreateVirtualProcessor2(partition: WHV_PARTITION_HANDLE, vpinde #[inline] 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); - unsafe { WHvCreateVpciDevice(partition, logicaldeviceid, vpciresource, flags, core::mem::transmute(notificationeventhandle.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WHvCreateVpciDevice(partition, logicaldeviceid, vpciresource, flags, notificationeventhandle.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WHvDeleteNotificationPort(partition: WHV_PARTITION_HANDLE, porthandle: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -418,7 +418,7 @@ pub unsafe fn WHvDeleteVpciDevice(partition: WHV_PARTITION_HANDLE, logicaldevice #[inline] pub unsafe fn WHvEmulatorCreateEmulator(callbacks: *const WHV_EMULATOR_CALLBACKS, emulator: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("winhvemulation.dll" "system" fn WHvEmulatorCreateEmulator(callbacks : *const WHV_EMULATOR_CALLBACKS, emulator : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { WHvEmulatorCreateEmulator(callbacks, core::mem::transmute(emulator)).ok() } + unsafe { WHvEmulatorCreateEmulator(callbacks, emulator as _).ok() } } #[inline] pub unsafe fn WHvEmulatorDestroyEmulator(emulator: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -444,27 +444,27 @@ 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); - unsafe { WHvGetCapability(capabilitycode, core::mem::transmute(capabilitybuffer), capabilitybuffersizeinbytes, core::mem::transmute(writtensizeinbytes.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WHvGetCapability(capabilitycode, capabilitybuffer as _, capabilitybuffersizeinbytes, writtensizeinbytes.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { WHvGetInterruptTargetVpSet(partition, destination, destinationmode, core::mem::transmute(targetvps.as_ptr()), targetvps.len().try_into().unwrap(), core::mem::transmute(targetvpcount)).ok() } + unsafe { WHvGetInterruptTargetVpSet(partition, destination, destinationmode, core::mem::transmute(targetvps.as_ptr()), targetvps.len().try_into().unwrap(), targetvpcount as _).ok() } } #[inline] 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); - unsafe { WHvGetPartitionCounters(partition, counterset, core::mem::transmute(buffer), buffersizeinbytes, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WHvGetPartitionCounters(partition, counterset, buffer as _, buffersizeinbytes, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { WHvGetPartitionProperty(partition, propertycode, core::mem::transmute(propertybuffer), propertybuffersizeinbytes, core::mem::transmute(writtensizeinbytes.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WHvGetPartitionProperty(partition, propertycode, propertybuffer as _, propertybuffersizeinbytes, writtensizeinbytes.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { WHvGetVirtualProcessorCounters(partition, vpindex, counterset, core::mem::transmute(buffer), buffersizeinbytes, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WHvGetVirtualProcessorCounters(partition, vpindex, counterset, buffer as _, buffersizeinbytes, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WHvGetVirtualProcessorCpuidOutput(partition: WHV_PARTITION_HANDLE, vpindex: u32, eax: u32, ecx: u32) -> windows_core::Result { @@ -477,42 +477,42 @@ pub unsafe fn WHvGetVirtualProcessorCpuidOutput(partition: WHV_PARTITION_HANDLE, #[inline] 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); - unsafe { WHvGetVirtualProcessorInterruptControllerState(partition, vpindex, core::mem::transmute(state), statesize, core::mem::transmute(writtensize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WHvGetVirtualProcessorInterruptControllerState(partition, vpindex, state as _, statesize, writtensize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { WHvGetVirtualProcessorInterruptControllerState2(partition, vpindex, core::mem::transmute(state), statesize, core::mem::transmute(writtensize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WHvGetVirtualProcessorInterruptControllerState2(partition, vpindex, state as _, statesize, writtensize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WHvGetVirtualProcessorRegisters(partition: WHV_PARTITION_HANDLE, vpindex: u32, registernames: *const WHV_REGISTER_NAME, registercount: u32, registervalues: *mut WHV_REGISTER_VALUE) -> 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); - unsafe { WHvGetVirtualProcessorRegisters(partition, vpindex, registernames, registercount, core::mem::transmute(registervalues)).ok() } + unsafe { WHvGetVirtualProcessorRegisters(partition, vpindex, registernames, registercount, registervalues as _).ok() } } #[inline] 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); - unsafe { WHvGetVirtualProcessorState(partition, vpindex, statetype, core::mem::transmute(buffer), buffersizeinbytes, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WHvGetVirtualProcessorState(partition, vpindex, statetype, buffer as _, buffersizeinbytes, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { WHvGetVirtualProcessorXsaveState(partition, vpindex, core::mem::transmute(buffer), buffersizeinbytes, core::mem::transmute(byteswritten)).ok() } + unsafe { WHvGetVirtualProcessorXsaveState(partition, vpindex, buffer as _, buffersizeinbytes, byteswritten as _).ok() } } #[inline] 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); - unsafe { WHvGetVpciDeviceInterruptTarget(partition, logicaldeviceid, index, multimessagenumber, core::mem::transmute(target), targetsizeinbytes, core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WHvGetVpciDeviceInterruptTarget(partition, logicaldeviceid, index, multimessagenumber, target as _, targetsizeinbytes, byteswritten.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { WHvGetVpciDeviceNotification(partition, logicaldeviceid, core::mem::transmute(notification), notificationsizeinbytes).ok() } + unsafe { WHvGetVpciDeviceNotification(partition, logicaldeviceid, notification as _, notificationsizeinbytes).ok() } } #[inline] 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); - unsafe { WHvGetVpciDeviceProperty(partition, logicaldeviceid, propertycode, core::mem::transmute(propertybuffer), propertybuffersizeinbytes, core::mem::transmute(writtensizeinbytes.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WHvGetVpciDeviceProperty(partition, logicaldeviceid, propertycode, propertybuffer as _, propertybuffersizeinbytes, writtensizeinbytes.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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<()> { @@ -527,12 +527,12 @@ pub unsafe fn WHvMapGpaRange2(partition: WHV_PARTITION_HANDLE, process: super::s #[inline] 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); - unsafe { WHvMapVpciDeviceInterrupt(partition, logicaldeviceid, index, messagecount, target, core::mem::transmute(msiaddress), core::mem::transmute(msidata)).ok() } + unsafe { WHvMapVpciDeviceInterrupt(partition, logicaldeviceid, index, messagecount, target, msiaddress as _, msidata as _).ok() } } #[inline] 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); - unsafe { WHvMapVpciDeviceMmioRanges(partition, logicaldeviceid, core::mem::transmute(mappingcount), core::mem::transmute(mappings)).ok() } + unsafe { WHvMapVpciDeviceMmioRanges(partition, logicaldeviceid, mappingcount as _, mappings as _).ok() } } #[inline] pub unsafe fn WHvPostVirtualProcessorSynicMessage(partition: WHV_PARTITION_HANDLE, vpindex: u32, sintindex: u32, message: *const core::ffi::c_void, messagesizeinbytes: u32) -> windows_core::Result<()> { @@ -542,17 +542,17 @@ pub unsafe fn WHvPostVirtualProcessorSynicMessage(partition: WHV_PARTITION_HANDL #[inline] 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); - unsafe { WHvQueryGpaRangeDirtyBitmap(partition, guestaddress, rangesizeinbytes, core::mem::transmute(bitmap.unwrap_or(core::mem::zeroed())), bitmapsizeinbytes).ok() } + unsafe { WHvQueryGpaRangeDirtyBitmap(partition, guestaddress, rangesizeinbytes, bitmap.unwrap_or(core::mem::zeroed()) as _, bitmapsizeinbytes).ok() } } #[inline] 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); - unsafe { WHvReadGpaRange(partition, vpindex, guestaddress, core::mem::transmute(controls), core::mem::transmute(data), datasizeinbytes).ok() } + unsafe { WHvReadGpaRange(partition, vpindex, guestaddress, core::mem::transmute(controls), data as _, datasizeinbytes).ok() } } #[inline] 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); - unsafe { WHvReadVpciDeviceRegister(partition, logicaldeviceid, register, core::mem::transmute(data)).ok() } + unsafe { WHvReadVpciDeviceRegister(partition, logicaldeviceid, register, data as _).ok() } } #[inline] pub unsafe fn WHvRegisterPartitionDoorbellEvent(partition: WHV_PARTITION_HANDLE, matchdata: *const WHV_DOORBELL_MATCH_DATA, eventhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -587,7 +587,7 @@ pub unsafe fn WHvRetargetVpciDeviceInterrupt(partition: WHV_PARTITION_HANDLE, lo #[inline] 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); - unsafe { WHvRunVirtualProcessor(partition, vpindex, core::mem::transmute(exitcontext), exitcontextsizeinbytes).ok() } + unsafe { WHvRunVirtualProcessor(partition, vpindex, exitcontext as _, exitcontextsizeinbytes).ok() } } #[inline] 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<()> { @@ -638,7 +638,7 @@ pub unsafe fn WHvSetupPartition(partition: WHV_PARTITION_HANDLE) -> windows_core #[inline] 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); - unsafe { WHvSignalVirtualProcessorSynicEvent(partition, core::mem::transmute(synicevent), core::mem::transmute(newlysignaled.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WHvSignalVirtualProcessorSynicEvent(partition, core::mem::transmute(synicevent), newlysignaled.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WHvStartPartitionMigration(partition: WHV_PARTITION_HANDLE) -> windows_core::Result { @@ -656,7 +656,7 @@ pub unsafe fn WHvSuspendPartitionTime(partition: WHV_PARTITION_HANDLE) -> window #[inline] 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); - unsafe { WHvTranslateGva(partition, vpindex, gva, translateflags, core::mem::transmute(translationresult), core::mem::transmute(gpa)).ok() } + unsafe { WHvTranslateGva(partition, vpindex, gva, translateflags, translationresult as _, gpa as _).ok() } } #[inline] pub unsafe fn WHvUnmapGpaRange(partition: WHV_PARTITION_HANDLE, guestaddress: u64, sizeinbytes: u64) -> windows_core::Result<()> { diff --git a/crates/libs/windows/src/Windows/Win32/System/IO/mod.rs b/crates/libs/windows/src/Windows/Win32/System/IO/mod.rs index 0ad441a07b..40b51aa279 100644 --- a/crates/libs/windows/src/Windows/Win32/System/IO/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/IO/mod.rs @@ -11,7 +11,7 @@ pub unsafe fn CancelIo(hfile: super::super::Foundation::HANDLE) -> windows_core: #[inline] 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); - unsafe { CancelIoEx(hfile, core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { CancelIoEx(hfile, lpoverlapped.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CancelSynchronousIo(hthread: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -21,38 +21,38 @@ pub unsafe fn CancelSynchronousIo(hthread: super::super::Foundation::HANDLE) -> #[inline] 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__ = unsafe { CreateIoCompletionPort(filehandle, core::mem::transmute(existingcompletionport.unwrap_or(core::mem::zeroed())), completionkey, numberofconcurrentthreads) }; + let result__ = unsafe { CreateIoCompletionPort(filehandle, existingcompletionport.unwrap_or(core::mem::zeroed()) as _, completionkey, numberofconcurrentthreads) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] 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); - unsafe { DeviceIoControl(hdevice, dwiocontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), noutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DeviceIoControl(hdevice, dwiocontrolcode, lpinbuffer.unwrap_or(core::mem::zeroed()) as _, ninbuffersize, lpoutbuffer.unwrap_or(core::mem::zeroed()) as _, noutbuffersize, lpbytesreturned.unwrap_or(core::mem::zeroed()) as _, lpoverlapped.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn GetOverlappedResult(hfile: super::super::Foundation::HANDLE, lpoverlapped: *const OVERLAPPED, lpnumberofbytestransferred: *mut u32, bwait: bool) -> windows_core::Result<()> { 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); - unsafe { GetOverlappedResult(hfile, lpoverlapped, core::mem::transmute(lpnumberofbytestransferred), bwait.into()).ok() } + unsafe { GetOverlappedResult(hfile, lpoverlapped, lpnumberofbytestransferred as _, bwait.into()).ok() } } #[inline] pub unsafe fn GetOverlappedResultEx(hfile: super::super::Foundation::HANDLE, lpoverlapped: *const OVERLAPPED, lpnumberofbytestransferred: *mut u32, dwmilliseconds: u32, balertable: bool) -> windows_core::Result<()> { 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); - unsafe { GetOverlappedResultEx(hfile, lpoverlapped, core::mem::transmute(lpnumberofbytestransferred), dwmilliseconds, balertable.into()).ok() } + unsafe { GetOverlappedResultEx(hfile, lpoverlapped, lpnumberofbytestransferred as _, dwmilliseconds, balertable.into()).ok() } } #[inline] 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); - unsafe { GetQueuedCompletionStatus(completionport, core::mem::transmute(lpnumberofbytestransferred), core::mem::transmute(lpcompletionkey), core::mem::transmute(lpoverlapped), dwmilliseconds).ok() } + unsafe { GetQueuedCompletionStatus(completionport, lpnumberofbytestransferred as _, lpcompletionkey as _, lpoverlapped as _, dwmilliseconds).ok() } } #[inline] pub unsafe fn GetQueuedCompletionStatusEx(completionport: super::super::Foundation::HANDLE, lpcompletionportentries: &mut [OVERLAPPED_ENTRY], ulnumentriesremoved: *mut u32, dwmilliseconds: u32, falertable: bool) -> windows_core::Result<()> { 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); - unsafe { GetQueuedCompletionStatusEx(completionport, core::mem::transmute(lpcompletionportentries.as_ptr()), lpcompletionportentries.len().try_into().unwrap(), core::mem::transmute(ulnumentriesremoved), dwmilliseconds, falertable.into()).ok() } + unsafe { GetQueuedCompletionStatusEx(completionport, core::mem::transmute(lpcompletionportentries.as_ptr()), lpcompletionportentries.len().try_into().unwrap(), ulnumentriesremoved as _, dwmilliseconds, falertable.into()).ok() } } #[inline] 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); - unsafe { PostQueuedCompletionStatus(completionport, dwnumberofbytestransferred, dwcompletionkey, core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { PostQueuedCompletionStatus(completionport, dwnumberofbytestransferred, dwcompletionkey, lpoverlapped.unwrap_or(core::mem::zeroed()) as _).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 bbc90b0655..44e50f7941 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Iis/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Iis/mod.rs @@ -1,12 +1,12 @@ #[inline] pub unsafe fn GetExtensionVersion(pver: *mut HSE_VERSION_INFO) -> super::super::Foundation::BOOL { windows_targets::link!("rpcproxy.dll" "system" fn GetExtensionVersion(pver : *mut HSE_VERSION_INFO) -> super::super::Foundation:: BOOL); - unsafe { GetExtensionVersion(core::mem::transmute(pver)) } + unsafe { GetExtensionVersion(pver as _) } } #[inline] pub unsafe fn GetFilterVersion(pver: *mut HTTP_FILTER_VERSION) -> super::super::Foundation::BOOL { windows_targets::link!("rpcproxy.dll" "system" fn GetFilterVersion(pver : *mut HTTP_FILTER_VERSION) -> super::super::Foundation:: BOOL); - unsafe { GetFilterVersion(core::mem::transmute(pver)) } + unsafe { GetFilterVersion(pver as _) } } #[inline] pub unsafe fn HttpExtensionProc(pecb: *const EXTENSION_CONTROL_BLOCK) -> u32 { @@ -16,7 +16,7 @@ pub unsafe fn HttpExtensionProc(pecb: *const EXTENSION_CONTROL_BLOCK) -> u32 { #[inline] pub unsafe fn HttpFilterProc(pfc: *mut HTTP_FILTER_CONTEXT, notificationtype: u32, pvnotification: *mut core::ffi::c_void) -> u32 { windows_targets::link!("rpcproxy.dll" "system" fn HttpFilterProc(pfc : *mut HTTP_FILTER_CONTEXT, notificationtype : u32, pvnotification : *mut core::ffi::c_void) -> u32); - unsafe { HttpFilterProc(core::mem::transmute(pfc), notificationtype, core::mem::transmute(pvnotification)) } + unsafe { HttpFilterProc(pfc as _, notificationtype, pvnotification as _) } } pub const ADMINDATA_MAX_NAME_LEN: u32 = 256u32; pub const ALL_METADATA: METADATATYPES = METADATATYPES(0i32); @@ -42,7 +42,7 @@ impl AsyncIFtpAuthenticationProvider { unsafe { (windows_core::Interface::vtable(self).Begin_AuthenticateUser)(windows_core::Interface::as_raw(self), pszsessionid.param().abi(), pszsitename.param().abi(), pszusername.param().abi(), pszpassword.param().abi()).ok() } } pub unsafe fn Finish_AuthenticateUser(&self, ppszcanonicalusername: *mut windows_core::PWSTR, pfauthenticated: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Finish_AuthenticateUser)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszcanonicalusername), core::mem::transmute(pfauthenticated)).ok() } + unsafe { (windows_core::Interface::vtable(self).Finish_AuthenticateUser)(windows_core::Interface::as_raw(self), ppszcanonicalusername as _, pfauthenticated as _).ok() } } } #[repr(C)] @@ -1113,7 +1113,7 @@ impl IADMEXT { unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn EnumDcomCLSIDs(&self, pclsiddcom: *mut windows_core::GUID, dwenumindex: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumDcomCLSIDs)(windows_core::Interface::as_raw(self), core::mem::transmute(pclsiddcom), dwenumindex).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumDcomCLSIDs)(windows_core::Interface::as_raw(self), pclsiddcom as _, dwenumindex).ok() } } pub unsafe fn Terminate(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Terminate)(windows_core::Interface::as_raw(self)).ok() } @@ -1173,7 +1173,7 @@ impl IFtpAuthenticationProvider { P2: windows_core::Param, P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).AuthenticateUser)(windows_core::Interface::as_raw(self), pszsessionid.param().abi(), pszsitename.param().abi(), pszusername.param().abi(), pszpassword.param().abi(), core::mem::transmute(ppszcanonicalusername), core::mem::transmute(pfauthenticated)).ok() } + unsafe { (windows_core::Interface::vtable(self).AuthenticateUser)(windows_core::Interface::as_raw(self), pszsessionid.param().abi(), pszsitename.param().abi(), pszusername.param().abi(), pszpassword.param().abi(), ppszcanonicalusername as _, pfauthenticated as _).ok() } } } #[repr(C)] @@ -1618,7 +1618,7 @@ impl IMSAdminBase2W { unsafe { (windows_core::Interface::vtable(self).RestoreHistory)(windows_core::Interface::as_raw(self), pszmdhistorylocation.param().abi(), dwmdmajorversion, dwmdminorversion, dwmdflags).ok() } } pub unsafe fn EnumHistory(&self, pszmdhistorylocation: &mut [u16; 256], pdwmdmajorversion: *mut u32, pdwmdminorversion: *mut u32, pftmdhistorytime: *mut super::super::Foundation::FILETIME, dwmdenumindex: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumHistory)(windows_core::Interface::as_raw(self), core::mem::transmute(pszmdhistorylocation.as_ptr()), core::mem::transmute(pdwmdmajorversion), core::mem::transmute(pdwmdminorversion), core::mem::transmute(pftmdhistorytime), dwmdenumindex).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumHistory)(windows_core::Interface::as_raw(self), core::mem::transmute(pszmdhistorylocation.as_ptr()), pdwmdmajorversion as _, pdwmdminorversion as _, pftmdhistorytime as _, dwmdenumindex).ok() } } } #[repr(C)] @@ -1705,7 +1705,7 @@ impl IMSAdminBase3W { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetChildPaths)(windows_core::Interface::as_raw(self), hmdhandle, pszmdpath.param().abi(), pszbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pszbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pcchmdrequiredbuffersize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetChildPaths)(windows_core::Interface::as_raw(self), hmdhandle, pszmdpath.param().abi(), pszbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pszbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcchmdrequiredbuffersize.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -1821,13 +1821,13 @@ impl IMSAdminBaseW { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SetData)(windows_core::Interface::as_raw(self), hmdhandle, pszmdpath.param().abi(), core::mem::transmute(pmdrmddata)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetData)(windows_core::Interface::as_raw(self), hmdhandle, pszmdpath.param().abi(), pmdrmddata as _).ok() } } pub unsafe fn GetData(&self, hmdhandle: u32, pszmdpath: P1, pmdrmddata: *mut METADATA_RECORD, pdwmdrequireddatalen: *mut u32) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), hmdhandle, pszmdpath.param().abi(), core::mem::transmute(pmdrmddata), core::mem::transmute(pdwmdrequireddatalen)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), hmdhandle, pszmdpath.param().abi(), pmdrmddata as _, pdwmdrequireddatalen as _).ok() } } pub unsafe fn DeleteData(&self, hmdhandle: u32, pszmdpath: P1, dwmdidentifier: u32, dwmddatatype: u32) -> windows_core::Result<()> where @@ -1839,13 +1839,13 @@ impl IMSAdminBaseW { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EnumData)(windows_core::Interface::as_raw(self), hmdhandle, pszmdpath.param().abi(), core::mem::transmute(pmdrmddata), dwmdenumdataindex, core::mem::transmute(pdwmdrequireddatalen)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumData)(windows_core::Interface::as_raw(self), hmdhandle, pszmdpath.param().abi(), pmdrmddata as _, dwmdenumdataindex, pdwmdrequireddatalen as _).ok() } } pub unsafe fn GetAllData(&self, hmdhandle: u32, pszmdpath: P1, dwmdattributes: u32, dwmdusertype: u32, dwmddatatype: u32, pdwmdnumdataentries: *mut u32, pdwmddatasetnumber: *mut u32, dwmdbuffersize: u32, pbmdbuffer: *mut u8, pdwmdrequiredbuffersize: *mut u32) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetAllData)(windows_core::Interface::as_raw(self), hmdhandle, pszmdpath.param().abi(), dwmdattributes, dwmdusertype, dwmddatatype, core::mem::transmute(pdwmdnumdataentries), core::mem::transmute(pdwmddatasetnumber), dwmdbuffersize, core::mem::transmute(pbmdbuffer), core::mem::transmute(pdwmdrequiredbuffersize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAllData)(windows_core::Interface::as_raw(self), hmdhandle, pszmdpath.param().abi(), dwmdattributes, dwmdusertype, dwmddatatype, pdwmdnumdataentries as _, pdwmddatasetnumber as _, dwmdbuffersize, pbmdbuffer as _, pdwmdrequiredbuffersize as _).ok() } } pub unsafe fn DeleteAllData(&self, hmdhandle: u32, pszmdpath: P1, dwmdusertype: u32, dwmddatatype: u32) -> windows_core::Result<()> where @@ -1864,7 +1864,7 @@ impl IMSAdminBaseW { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetDataPaths)(windows_core::Interface::as_raw(self), hmdhandle, pszmdpath.param().abi(), dwmdidentifier, dwmddatatype, pszbuffer.len().try_into().unwrap(), core::mem::transmute(pszbuffer.as_ptr()), core::mem::transmute(pdwmdrequiredbuffersize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDataPaths)(windows_core::Interface::as_raw(self), hmdhandle, pszmdpath.param().abi(), dwmdidentifier, dwmddatatype, pszbuffer.len().try_into().unwrap(), core::mem::transmute(pszbuffer.as_ptr()), pdwmdrequiredbuffersize as _).ok() } } pub unsafe fn OpenKey(&self, hmdhandle: u32, pszmdpath: P1, dwmdaccessrequested: u32, dwmdtimeout: u32) -> windows_core::Result where @@ -1915,7 +1915,7 @@ impl IMSAdminBaseW { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetLastChangeTime)(windows_core::Interface::as_raw(self), hmdhandle, pszmdpath.param().abi(), core::mem::transmute(pftmdlastchangetime), blocaltime.into()).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLastChangeTime)(windows_core::Interface::as_raw(self), hmdhandle, pszmdpath.param().abi(), pftmdlastchangetime as _, blocaltime.into()).ok() } } pub unsafe fn KeyExchangePhase1(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).KeyExchangePhase1)(windows_core::Interface::as_raw(self)).ok() } @@ -1936,7 +1936,7 @@ impl IMSAdminBaseW { unsafe { (windows_core::Interface::vtable(self).Restore)(windows_core::Interface::as_raw(self), pszmdbackuplocation.param().abi(), dwmdversion, dwmdflags).ok() } } pub unsafe fn EnumBackups(&self, pszmdbackuplocation: &mut [u16; 256], pdwmdversion: *mut u32, pftmdbackuptime: *mut super::super::Foundation::FILETIME, dwmdenumindex: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumBackups)(windows_core::Interface::as_raw(self), core::mem::transmute(pszmdbackuplocation.as_ptr()), core::mem::transmute(pdwmdversion), core::mem::transmute(pftmdbackuptime), dwmdenumindex).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumBackups)(windows_core::Interface::as_raw(self), core::mem::transmute(pszmdbackuplocation.as_ptr()), pdwmdversion as _, pftmdbackuptime as _, dwmdenumindex).ok() } } pub unsafe fn DeleteBackup(&self, pszmdbackuplocation: P0, dwmdversion: u32) -> windows_core::Result<()> where @@ -2288,7 +2288,7 @@ impl IMSImpExpHelpW { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EnumeratePathsInFile)(windows_core::Interface::as_raw(self), pszfilename.param().abi(), pszkeytype.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(pdwmdrequiredbuffersize)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumeratePathsInFile)(windows_core::Interface::as_raw(self), pszfilename.param().abi(), pszkeytype.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())), pdwmdrequiredbuffersize as _).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 99872f2c6c..a81597d9e7 100644 --- a/crates/libs/windows/src/Windows/Win32/System/JobObjects/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/JobObjects/mod.rs @@ -10,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__ = unsafe { CreateJobObjectA(core::mem::transmute(lpjobattributes.unwrap_or(core::mem::zeroed())), lpname.param().abi()) }; + let result__ = unsafe { CreateJobObjectA(lpjobattributes.unwrap_or(core::mem::zeroed()) as _, lpname.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -20,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__ = unsafe { CreateJobObjectW(core::mem::transmute(lpjobattributes.unwrap_or(core::mem::zeroed())), lpname.param().abi()) }; + let result__ = unsafe { CreateJobObjectW(lpjobattributes.unwrap_or(core::mem::zeroed()) as _, lpname.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -36,7 +36,7 @@ pub unsafe fn FreeMemoryJobObject(buffer: *const core::ffi::c_void) { #[inline] 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); - unsafe { IsProcessInJob(processhandle, core::mem::transmute(jobhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(result)).ok() } + unsafe { IsProcessInJob(processhandle, jobhandle.unwrap_or(core::mem::zeroed()) as _, result as _).ok() } } #[inline] pub unsafe fn OpenJobObjectA(dwdesiredaccess: u32, binherithandle: bool, lpname: P2) -> windows_core::Result @@ -59,7 +59,7 @@ where #[inline] 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); - unsafe { QueryInformationJobObject(core::mem::transmute(hjob.unwrap_or(core::mem::zeroed())), jobobjectinformationclass, core::mem::transmute(lpjobobjectinformation), cbjobobjectinformationlength, core::mem::transmute(lpreturnlength.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { QueryInformationJobObject(hjob.unwrap_or(core::mem::zeroed()) as _, jobobjectinformationclass, lpjobobjectinformation as _, cbjobobjectinformationlength, lpreturnlength.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn QueryIoRateControlInformationJobObject(hjob: Option, volumename: P1, infoblocks: *mut *mut JOBOBJECT_IO_RATE_CONTROL_INFORMATION, infoblockcount: *mut u32) -> u32 @@ -67,7 +67,7 @@ where 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); - unsafe { QueryIoRateControlInformationJobObject(core::mem::transmute(hjob.unwrap_or(core::mem::zeroed())), volumename.param().abi(), core::mem::transmute(infoblocks), core::mem::transmute(infoblockcount)) } + unsafe { QueryIoRateControlInformationJobObject(hjob.unwrap_or(core::mem::zeroed()) as _, volumename.param().abi(), infoblocks as _, infoblockcount as _) } } #[inline] pub unsafe fn SetInformationJobObject(hjob: super::super::Foundation::HANDLE, jobobjectinformationclass: JOBOBJECTINFOCLASS, lpjobobjectinformation: *const core::ffi::c_void, cbjobobjectinformationlength: u32) -> windows_core::Result<()> { 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 64e3646118..c58e6c35ba 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Js/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Js/mod.rs @@ -1,22 +1,22 @@ #[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); - unsafe { JsAddRef(r#ref, core::mem::transmute(count.unwrap_or(core::mem::zeroed()))) } + unsafe { JsAddRef(r#ref, count.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn JsBoolToBoolean(value: u8, booleanvalue: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsBoolToBoolean(value : u8, booleanvalue : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsBoolToBoolean(value, core::mem::transmute(booleanvalue)) } + unsafe { JsBoolToBoolean(value, booleanvalue as _) } } #[inline] pub unsafe fn JsBooleanToBool(value: *const core::ffi::c_void, boolvalue: *mut bool) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsBooleanToBool(value : *const core::ffi::c_void, boolvalue : *mut bool) -> JsErrorCode); - unsafe { JsBooleanToBool(value, core::mem::transmute(boolvalue)) } + unsafe { JsBooleanToBool(value, boolvalue as _) } } #[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); - unsafe { JsCallFunction(function, core::mem::transmute(arguments.as_ptr()), arguments.len().try_into().unwrap(), core::mem::transmute(result.unwrap_or(core::mem::zeroed()))) } + unsafe { JsCallFunction(function, core::mem::transmute(arguments.as_ptr()), arguments.len().try_into().unwrap(), result.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn JsCollectGarbage(runtime: *const core::ffi::c_void) -> JsErrorCode { @@ -26,32 +26,32 @@ pub unsafe fn JsCollectGarbage(runtime: *const core::ffi::c_void) -> JsErrorCode #[inline] pub unsafe fn JsConstructObject(function: *const core::ffi::c_void, arguments: &[*const core::ffi::c_void], result: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsConstructObject(function : *const core::ffi::c_void, arguments : *const *const core::ffi::c_void, argumentcount : u16, result : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsConstructObject(function, core::mem::transmute(arguments.as_ptr()), arguments.len().try_into().unwrap(), core::mem::transmute(result)) } + unsafe { JsConstructObject(function, core::mem::transmute(arguments.as_ptr()), arguments.len().try_into().unwrap(), result as _) } } #[inline] pub unsafe fn JsConvertValueToBoolean(value: *const core::ffi::c_void, booleanvalue: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsConvertValueToBoolean(value : *const core::ffi::c_void, booleanvalue : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsConvertValueToBoolean(value, core::mem::transmute(booleanvalue)) } + unsafe { JsConvertValueToBoolean(value, booleanvalue as _) } } #[inline] pub unsafe fn JsConvertValueToNumber(value: *const core::ffi::c_void, numbervalue: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsConvertValueToNumber(value : *const core::ffi::c_void, numbervalue : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsConvertValueToNumber(value, core::mem::transmute(numbervalue)) } + unsafe { JsConvertValueToNumber(value, numbervalue as _) } } #[inline] pub unsafe fn JsConvertValueToObject(value: *const core::ffi::c_void, object: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsConvertValueToObject(value : *const core::ffi::c_void, object : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsConvertValueToObject(value, core::mem::transmute(object)) } + unsafe { JsConvertValueToObject(value, object as _) } } #[inline] pub unsafe fn JsConvertValueToString(value: *const core::ffi::c_void, stringvalue: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsConvertValueToString(value : *const core::ffi::c_void, stringvalue : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsConvertValueToString(value, core::mem::transmute(stringvalue)) } + unsafe { JsConvertValueToString(value, stringvalue as _) } } #[inline] pub unsafe fn JsCreateArray(length: u32, result: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsCreateArray(length : u32, result : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsCreateArray(length, core::mem::transmute(result)) } + unsafe { JsCreateArray(length, result as _) } } #[cfg(target_arch = "x86")] #[cfg(feature = "Win32_System_Diagnostics_Debug_ActiveScript")] @@ -61,7 +61,7 @@ where P1: windows_core::Param, { windows_targets::link!("chakra.dll" "system" fn JsCreateContext(runtime : *const core::ffi::c_void, debugapplication : * mut core::ffi::c_void, newcontext : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsCreateContext(runtime, debugapplication.param().abi(), core::mem::transmute(newcontext)) } + unsafe { JsCreateContext(runtime, debugapplication.param().abi(), newcontext as _) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[cfg(feature = "Win32_System_Diagnostics_Debug_ActiveScript")] @@ -71,62 +71,62 @@ where P1: windows_core::Param, { windows_targets::link!("chakra.dll" "system" fn JsCreateContext(runtime : *const core::ffi::c_void, debugapplication : * mut core::ffi::c_void, newcontext : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsCreateContext(runtime, debugapplication.param().abi(), core::mem::transmute(newcontext)) } + unsafe { JsCreateContext(runtime, debugapplication.param().abi(), newcontext as _) } } #[inline] pub unsafe fn JsCreateError(message: *const core::ffi::c_void, error: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsCreateError(message : *const core::ffi::c_void, error : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsCreateError(message, core::mem::transmute(error)) } + unsafe { JsCreateError(message, error as _) } } #[inline] 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); - unsafe { JsCreateExternalObject(core::mem::transmute(data.unwrap_or(core::mem::zeroed())), core::mem::transmute(finalizecallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(object)) } + unsafe { JsCreateExternalObject(data.unwrap_or(core::mem::zeroed()) as _, finalizecallback.unwrap_or(core::mem::zeroed()) as _, object as _) } } #[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); - unsafe { JsCreateFunction(nativefunction, core::mem::transmute(callbackstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(function)) } + unsafe { JsCreateFunction(nativefunction, callbackstate.unwrap_or(core::mem::zeroed()) as _, function as _) } } #[inline] pub unsafe fn JsCreateObject(object: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsCreateObject(object : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsCreateObject(core::mem::transmute(object)) } + unsafe { JsCreateObject(object as _) } } #[inline] pub unsafe fn JsCreateRangeError(message: *const core::ffi::c_void, error: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsCreateRangeError(message : *const core::ffi::c_void, error : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsCreateRangeError(message, core::mem::transmute(error)) } + unsafe { JsCreateRangeError(message, error as _) } } #[inline] pub unsafe fn JsCreateReferenceError(message: *const core::ffi::c_void, error: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsCreateReferenceError(message : *const core::ffi::c_void, error : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsCreateReferenceError(message, core::mem::transmute(error)) } + unsafe { JsCreateReferenceError(message, error as _) } } #[inline] 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); - unsafe { JsCreateRuntime(attributes, runtimeversion, core::mem::transmute(threadservice.unwrap_or(core::mem::zeroed())), core::mem::transmute(runtime)) } + unsafe { JsCreateRuntime(attributes, runtimeversion, threadservice.unwrap_or(core::mem::zeroed()) as _, runtime as _) } } #[inline] pub unsafe fn JsCreateSyntaxError(message: *const core::ffi::c_void, error: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsCreateSyntaxError(message : *const core::ffi::c_void, error : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsCreateSyntaxError(message, core::mem::transmute(error)) } + unsafe { JsCreateSyntaxError(message, error as _) } } #[inline] pub unsafe fn JsCreateTypeError(message: *const core::ffi::c_void, error: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsCreateTypeError(message : *const core::ffi::c_void, error : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsCreateTypeError(message, core::mem::transmute(error)) } + unsafe { JsCreateTypeError(message, error as _) } } #[inline] pub unsafe fn JsCreateURIError(message: *const core::ffi::c_void, error: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsCreateURIError(message : *const core::ffi::c_void, error : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsCreateURIError(message, core::mem::transmute(error)) } + unsafe { JsCreateURIError(message, error as _) } } #[inline] pub unsafe fn JsDefineProperty(object: *const core::ffi::c_void, propertyid: *const core::ffi::c_void, propertydescriptor: *const core::ffi::c_void, result: *mut bool) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsDefineProperty(object : *const core::ffi::c_void, propertyid : *const core::ffi::c_void, propertydescriptor : *const core::ffi::c_void, result : *mut bool) -> JsErrorCode); - unsafe { JsDefineProperty(object, propertyid, propertydescriptor, core::mem::transmute(result)) } + unsafe { JsDefineProperty(object, propertyid, propertydescriptor, result as _) } } #[inline] pub unsafe fn JsDeleteIndexedProperty(object: *const core::ffi::c_void, index: *const core::ffi::c_void) -> JsErrorCode { @@ -136,7 +136,7 @@ pub unsafe fn JsDeleteIndexedProperty(object: *const core::ffi::c_void, index: * #[inline] pub unsafe fn JsDeleteProperty(object: *const core::ffi::c_void, propertyid: *const core::ffi::c_void, usestrictrules: u8, result: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsDeleteProperty(object : *const core::ffi::c_void, propertyid : *const core::ffi::c_void, usestrictrules : u8, result : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsDeleteProperty(object, propertyid, usestrictrules, core::mem::transmute(result)) } + unsafe { JsDeleteProperty(object, propertyid, usestrictrules, result as _) } } #[inline] pub unsafe fn JsDisableRuntimeExecution(runtime: *const core::ffi::c_void) -> JsErrorCode { @@ -151,7 +151,7 @@ pub unsafe fn JsDisposeRuntime(runtime: *const core::ffi::c_void) -> JsErrorCode #[inline] pub unsafe fn JsDoubleToNumber(doublevalue: f64, value: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsDoubleToNumber(doublevalue : f64, value : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsDoubleToNumber(doublevalue, core::mem::transmute(value)) } + unsafe { JsDoubleToNumber(doublevalue, value as _) } } #[inline] pub unsafe fn JsEnableRuntimeExecution(runtime: *const core::ffi::c_void) -> JsErrorCode { @@ -167,62 +167,62 @@ pub unsafe fn JsEnumerateHeap(enumerator: *mut Option JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsEquals(object1 : *const core::ffi::c_void, object2 : *const core::ffi::c_void, result : *mut bool) -> JsErrorCode); - unsafe { JsEquals(object1, object2, core::mem::transmute(result)) } + unsafe { JsEquals(object1, object2, result as _) } } #[inline] pub unsafe fn JsGetAndClearException(exception: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsGetAndClearException(exception : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsGetAndClearException(core::mem::transmute(exception)) } + unsafe { JsGetAndClearException(exception as _) } } #[inline] pub unsafe fn JsGetCurrentContext(currentcontext: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsGetCurrentContext(currentcontext : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsGetCurrentContext(core::mem::transmute(currentcontext)) } + unsafe { JsGetCurrentContext(currentcontext as _) } } #[inline] pub unsafe fn JsGetExtensionAllowed(object: *const core::ffi::c_void, value: *mut bool) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsGetExtensionAllowed(object : *const core::ffi::c_void, value : *mut bool) -> JsErrorCode); - unsafe { JsGetExtensionAllowed(object, core::mem::transmute(value)) } + unsafe { JsGetExtensionAllowed(object, value as _) } } #[inline] pub unsafe fn JsGetExternalData(object: *const core::ffi::c_void, externaldata: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsGetExternalData(object : *const core::ffi::c_void, externaldata : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsGetExternalData(object, core::mem::transmute(externaldata)) } + unsafe { JsGetExternalData(object, externaldata as _) } } #[inline] pub unsafe fn JsGetFalseValue(falsevalue: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsGetFalseValue(falsevalue : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsGetFalseValue(core::mem::transmute(falsevalue)) } + unsafe { JsGetFalseValue(falsevalue as _) } } #[inline] pub unsafe fn JsGetGlobalObject(globalobject: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsGetGlobalObject(globalobject : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsGetGlobalObject(core::mem::transmute(globalobject)) } + unsafe { JsGetGlobalObject(globalobject as _) } } #[inline] pub unsafe fn JsGetIndexedProperty(object: *const core::ffi::c_void, index: *const core::ffi::c_void, result: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsGetIndexedProperty(object : *const core::ffi::c_void, index : *const core::ffi::c_void, result : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsGetIndexedProperty(object, index, core::mem::transmute(result)) } + unsafe { JsGetIndexedProperty(object, index, result as _) } } #[inline] pub unsafe fn JsGetNullValue(nullvalue: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsGetNullValue(nullvalue : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsGetNullValue(core::mem::transmute(nullvalue)) } + unsafe { JsGetNullValue(nullvalue as _) } } #[inline] pub unsafe fn JsGetOwnPropertyDescriptor(object: *const core::ffi::c_void, propertyid: *const core::ffi::c_void, propertydescriptor: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsGetOwnPropertyDescriptor(object : *const core::ffi::c_void, propertyid : *const core::ffi::c_void, propertydescriptor : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsGetOwnPropertyDescriptor(object, propertyid, core::mem::transmute(propertydescriptor)) } + unsafe { JsGetOwnPropertyDescriptor(object, propertyid, propertydescriptor as _) } } #[inline] pub unsafe fn JsGetOwnPropertyNames(object: *const core::ffi::c_void, propertynames: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsGetOwnPropertyNames(object : *const core::ffi::c_void, propertynames : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsGetOwnPropertyNames(object, core::mem::transmute(propertynames)) } + unsafe { JsGetOwnPropertyNames(object, propertynames as _) } } #[inline] pub unsafe fn JsGetProperty(object: *const core::ffi::c_void, propertyid: *const core::ffi::c_void, value: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsGetProperty(object : *const core::ffi::c_void, propertyid : *const core::ffi::c_void, value : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsGetProperty(object, propertyid, core::mem::transmute(value)) } + unsafe { JsGetProperty(object, propertyid, value as _) } } #[inline] pub unsafe fn JsGetPropertyIdFromName(name: P0, propertyid: *mut *mut core::ffi::c_void) -> JsErrorCode @@ -230,97 +230,97 @@ where P0: windows_core::Param, { windows_targets::link!("chakra.dll" "system" fn JsGetPropertyIdFromName(name : windows_core::PCWSTR, propertyid : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsGetPropertyIdFromName(name.param().abi(), core::mem::transmute(propertyid)) } + unsafe { JsGetPropertyIdFromName(name.param().abi(), propertyid as _) } } #[inline] pub unsafe fn JsGetPropertyNameFromId(propertyid: *const core::ffi::c_void, name: *mut *mut u16) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsGetPropertyNameFromId(propertyid : *const core::ffi::c_void, name : *mut *mut u16) -> JsErrorCode); - unsafe { JsGetPropertyNameFromId(propertyid, core::mem::transmute(name)) } + unsafe { JsGetPropertyNameFromId(propertyid, name as _) } } #[inline] pub unsafe fn JsGetPrototype(object: *const core::ffi::c_void, prototypeobject: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsGetPrototype(object : *const core::ffi::c_void, prototypeobject : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsGetPrototype(object, core::mem::transmute(prototypeobject)) } + unsafe { JsGetPrototype(object, prototypeobject as _) } } #[inline] pub unsafe fn JsGetRuntime(context: *const core::ffi::c_void, runtime: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsGetRuntime(context : *const core::ffi::c_void, runtime : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsGetRuntime(context, core::mem::transmute(runtime)) } + unsafe { JsGetRuntime(context, runtime as _) } } #[inline] pub unsafe fn JsGetRuntimeMemoryLimit(runtime: *const core::ffi::c_void, memorylimit: *mut usize) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsGetRuntimeMemoryLimit(runtime : *const core::ffi::c_void, memorylimit : *mut usize) -> JsErrorCode); - unsafe { JsGetRuntimeMemoryLimit(runtime, core::mem::transmute(memorylimit)) } + unsafe { JsGetRuntimeMemoryLimit(runtime, memorylimit as _) } } #[inline] pub unsafe fn JsGetRuntimeMemoryUsage(runtime: *const core::ffi::c_void, memoryusage: *mut usize) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsGetRuntimeMemoryUsage(runtime : *const core::ffi::c_void, memoryusage : *mut usize) -> JsErrorCode); - unsafe { JsGetRuntimeMemoryUsage(runtime, core::mem::transmute(memoryusage)) } + unsafe { JsGetRuntimeMemoryUsage(runtime, memoryusage as _) } } #[inline] pub unsafe fn JsGetStringLength(stringvalue: *const core::ffi::c_void, length: *mut i32) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsGetStringLength(stringvalue : *const core::ffi::c_void, length : *mut i32) -> JsErrorCode); - unsafe { JsGetStringLength(stringvalue, core::mem::transmute(length)) } + unsafe { JsGetStringLength(stringvalue, length as _) } } #[inline] pub unsafe fn JsGetTrueValue(truevalue: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsGetTrueValue(truevalue : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsGetTrueValue(core::mem::transmute(truevalue)) } + unsafe { JsGetTrueValue(truevalue as _) } } #[inline] pub unsafe fn JsGetUndefinedValue(undefinedvalue: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsGetUndefinedValue(undefinedvalue : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsGetUndefinedValue(core::mem::transmute(undefinedvalue)) } + unsafe { JsGetUndefinedValue(undefinedvalue as _) } } #[inline] pub unsafe fn JsGetValueType(value: *const core::ffi::c_void, r#type: *mut JsValueType) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsGetValueType(value : *const core::ffi::c_void, r#type : *mut JsValueType) -> JsErrorCode); - unsafe { JsGetValueType(value, core::mem::transmute(r#type)) } + unsafe { JsGetValueType(value, r#type as _) } } #[inline] pub unsafe fn JsHasException(hasexception: *mut bool) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsHasException(hasexception : *mut bool) -> JsErrorCode); - unsafe { JsHasException(core::mem::transmute(hasexception)) } + unsafe { JsHasException(hasexception as _) } } #[inline] pub unsafe fn JsHasExternalData(object: *const core::ffi::c_void, value: *mut bool) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsHasExternalData(object : *const core::ffi::c_void, value : *mut bool) -> JsErrorCode); - unsafe { JsHasExternalData(object, core::mem::transmute(value)) } + unsafe { JsHasExternalData(object, value as _) } } #[inline] pub unsafe fn JsHasIndexedProperty(object: *const core::ffi::c_void, index: *const core::ffi::c_void, result: *mut bool) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsHasIndexedProperty(object : *const core::ffi::c_void, index : *const core::ffi::c_void, result : *mut bool) -> JsErrorCode); - unsafe { JsHasIndexedProperty(object, index, core::mem::transmute(result)) } + unsafe { JsHasIndexedProperty(object, index, result as _) } } #[inline] pub unsafe fn JsHasProperty(object: *const core::ffi::c_void, propertyid: *const core::ffi::c_void, hasproperty: *mut bool) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsHasProperty(object : *const core::ffi::c_void, propertyid : *const core::ffi::c_void, hasproperty : *mut bool) -> JsErrorCode); - unsafe { JsHasProperty(object, propertyid, core::mem::transmute(hasproperty)) } + unsafe { JsHasProperty(object, propertyid, hasproperty as _) } } #[inline] pub unsafe fn JsIdle(nextidletick: Option<*mut u32>) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsIdle(nextidletick : *mut u32) -> JsErrorCode); - unsafe { JsIdle(core::mem::transmute(nextidletick.unwrap_or(core::mem::zeroed()))) } + unsafe { JsIdle(nextidletick.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn JsIntToNumber(intvalue: i32, value: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsIntToNumber(intvalue : i32, value : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsIntToNumber(intvalue, core::mem::transmute(value)) } + unsafe { JsIntToNumber(intvalue, value as _) } } #[inline] pub unsafe fn JsIsEnumeratingHeap(isenumeratingheap: *mut bool) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsIsEnumeratingHeap(isenumeratingheap : *mut bool) -> JsErrorCode); - unsafe { JsIsEnumeratingHeap(core::mem::transmute(isenumeratingheap)) } + unsafe { JsIsEnumeratingHeap(isenumeratingheap as _) } } #[inline] pub unsafe fn JsIsRuntimeExecutionDisabled(runtime: *const core::ffi::c_void, isdisabled: *mut bool) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsIsRuntimeExecutionDisabled(runtime : *const core::ffi::c_void, isdisabled : *mut bool) -> JsErrorCode); - unsafe { JsIsRuntimeExecutionDisabled(runtime, core::mem::transmute(isdisabled)) } + unsafe { JsIsRuntimeExecutionDisabled(runtime, isdisabled as _) } } #[inline] pub unsafe fn JsNumberToDouble(value: *const core::ffi::c_void, doublevalue: *mut f64) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsNumberToDouble(value : *const core::ffi::c_void, doublevalue : *mut f64) -> JsErrorCode); - unsafe { JsNumberToDouble(value, core::mem::transmute(doublevalue)) } + unsafe { JsNumberToDouble(value, doublevalue as _) } } #[inline] pub unsafe fn JsParseScript(script: P0, sourcecontext: usize, sourceurl: P2, result: *mut *mut core::ffi::c_void) -> JsErrorCode @@ -329,7 +329,7 @@ where P2: windows_core::Param, { windows_targets::link!("chakra.dll" "system" fn JsParseScript(script : windows_core::PCWSTR, sourcecontext : usize, sourceurl : windows_core::PCWSTR, result : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsParseScript(script.param().abi(), sourcecontext, sourceurl.param().abi(), core::mem::transmute(result)) } + unsafe { JsParseScript(script.param().abi(), sourcecontext, sourceurl.param().abi(), result as _) } } #[inline] pub unsafe fn JsParseSerializedScript(script: P0, buffer: *const u8, sourcecontext: usize, sourceurl: P3, result: *mut *mut core::ffi::c_void) -> JsErrorCode @@ -338,12 +338,12 @@ where P3: windows_core::Param, { windows_targets::link!("chakra.dll" "system" fn JsParseSerializedScript(script : windows_core::PCWSTR, buffer : *const u8, sourcecontext : usize, sourceurl : windows_core::PCWSTR, result : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsParseSerializedScript(script.param().abi(), buffer, sourcecontext, sourceurl.param().abi(), core::mem::transmute(result)) } + unsafe { JsParseSerializedScript(script.param().abi(), buffer, sourcecontext, sourceurl.param().abi(), result as _) } } #[inline] pub unsafe fn JsPointerToString(stringvalue: &[u16], value: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsPointerToString(stringvalue : windows_core::PCWSTR, stringlength : usize, value : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsPointerToString(core::mem::transmute(stringvalue.as_ptr()), stringvalue.len().try_into().unwrap(), core::mem::transmute(value)) } + unsafe { JsPointerToString(core::mem::transmute(stringvalue.as_ptr()), stringvalue.len().try_into().unwrap(), value as _) } } #[inline] pub unsafe fn JsPreventExtension(object: *const 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); - unsafe { JsRelease(r#ref, core::mem::transmute(count.unwrap_or(core::mem::zeroed()))) } + unsafe { JsRelease(r#ref, count.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn JsRunScript(script: P0, sourcecontext: usize, sourceurl: P2, result: *mut *mut core::ffi::c_void) -> JsErrorCode @@ -362,7 +362,7 @@ where P2: windows_core::Param, { windows_targets::link!("chakra.dll" "system" fn JsRunScript(script : windows_core::PCWSTR, sourcecontext : usize, sourceurl : windows_core::PCWSTR, result : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsRunScript(script.param().abi(), sourcecontext, sourceurl.param().abi(), core::mem::transmute(result)) } + unsafe { JsRunScript(script.param().abi(), sourcecontext, sourceurl.param().abi(), result as _) } } #[inline] pub unsafe fn JsRunSerializedScript(script: P0, buffer: *const u8, sourcecontext: usize, sourceurl: P3, result: *mut *mut core::ffi::c_void) -> JsErrorCode @@ -371,7 +371,7 @@ where P3: windows_core::Param, { windows_targets::link!("chakra.dll" "system" fn JsRunSerializedScript(script : windows_core::PCWSTR, buffer : *const u8, sourcecontext : usize, sourceurl : windows_core::PCWSTR, result : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsRunSerializedScript(script.param().abi(), buffer, sourcecontext, sourceurl.param().abi(), core::mem::transmute(result)) } + unsafe { JsRunSerializedScript(script.param().abi(), buffer, sourcecontext, sourceurl.param().abi(), result as _) } } #[inline] pub unsafe fn JsSerializeScript(script: P0, buffer: Option<*mut u8>, buffersize: *mut u32) -> 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); - unsafe { JsSerializeScript(script.param().abi(), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize)) } + unsafe { JsSerializeScript(script.param().abi(), buffer.unwrap_or(core::mem::zeroed()) as _, buffersize as _) } } #[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); - unsafe { JsSetExternalData(object, core::mem::transmute(externaldata.unwrap_or(core::mem::zeroed()))) } + unsafe { JsSetExternalData(object, externaldata.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { JsSetRuntimeBeforeCollectCallback(runtime, core::mem::transmute(callbackstate.unwrap_or(core::mem::zeroed())), beforecollectcallback) } + unsafe { JsSetRuntimeBeforeCollectCallback(runtime, callbackstate.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { JsSetRuntimeMemoryAllocationCallback(runtime, core::mem::transmute(callbackstate.unwrap_or(core::mem::zeroed())), allocationcallback) } + unsafe { JsSetRuntimeMemoryAllocationCallback(runtime, callbackstate.unwrap_or(core::mem::zeroed()) as _, allocationcallback) } } #[inline] pub unsafe fn JsSetRuntimeMemoryLimit(runtime: *const core::ffi::c_void, memorylimit: usize) -> JsErrorCode { @@ -463,12 +463,12 @@ pub unsafe fn JsStopProfiling(reason: windows_core::HRESULT) -> JsErrorCode { #[inline] pub unsafe fn JsStrictEquals(object1: *const core::ffi::c_void, object2: *const core::ffi::c_void, result: *mut bool) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsStrictEquals(object1 : *const core::ffi::c_void, object2 : *const core::ffi::c_void, result : *mut bool) -> JsErrorCode); - unsafe { JsStrictEquals(object1, object2, core::mem::transmute(result)) } + unsafe { JsStrictEquals(object1, object2, result as _) } } #[inline] pub unsafe fn JsStringToPointer(value: *const core::ffi::c_void, stringvalue: *mut *mut u16, stringlength: *mut usize) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsStringToPointer(value : *const core::ffi::c_void, stringvalue : *mut *mut u16, stringlength : *mut usize) -> JsErrorCode); - unsafe { JsStringToPointer(value, core::mem::transmute(stringvalue), core::mem::transmute(stringlength)) } + unsafe { JsStringToPointer(value, stringvalue as _, stringlength as _) } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] #[inline] @@ -480,7 +480,7 @@ pub unsafe fn JsValueToVariant(object: *const core::ffi::c_void, variant: *mut s #[inline] pub unsafe fn JsVariantToValue(variant: *const super::Variant::VARIANT, value: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsVariantToValue(variant : *const super::Variant:: VARIANT, value : *mut *mut core::ffi::c_void) -> JsErrorCode); - unsafe { JsVariantToValue(core::mem::transmute(variant), core::mem::transmute(value)) } + unsafe { JsVariantToValue(core::mem::transmute(variant), value as _) } } pub const JS_SOURCE_CONTEXT_NONE: u64 = 18446744073709551615u64; pub const JsArray: JsValueType = JsValueType(8i32); diff --git a/crates/libs/windows/src/Windows/Win32/System/Kernel/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Kernel/mod.rs index 5a7b7eaf7a..d46a498cdb 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Kernel/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Kernel/mod.rs @@ -15,22 +15,22 @@ pub unsafe fn RtlInitializeSListHead() -> SLIST_HEADER { #[inline] pub unsafe fn RtlInterlockedFlushSList(listhead: *mut SLIST_HEADER) -> *mut SLIST_ENTRY { windows_targets::link!("ntdll.dll" "system" fn RtlInterlockedFlushSList(listhead : *mut SLIST_HEADER) -> *mut SLIST_ENTRY); - unsafe { RtlInterlockedFlushSList(core::mem::transmute(listhead)) } + unsafe { RtlInterlockedFlushSList(listhead as _) } } #[inline] pub unsafe fn RtlInterlockedPopEntrySList(listhead: *mut SLIST_HEADER) -> *mut SLIST_ENTRY { windows_targets::link!("ntdll.dll" "system" fn RtlInterlockedPopEntrySList(listhead : *mut SLIST_HEADER) -> *mut SLIST_ENTRY); - unsafe { RtlInterlockedPopEntrySList(core::mem::transmute(listhead)) } + unsafe { RtlInterlockedPopEntrySList(listhead as _) } } #[inline] pub unsafe fn RtlInterlockedPushEntrySList(listhead: *mut SLIST_HEADER, listentry: *mut SLIST_ENTRY) -> *mut SLIST_ENTRY { windows_targets::link!("ntdll.dll" "system" fn RtlInterlockedPushEntrySList(listhead : *mut SLIST_HEADER, listentry : *mut SLIST_ENTRY) -> *mut SLIST_ENTRY); - unsafe { RtlInterlockedPushEntrySList(core::mem::transmute(listhead), core::mem::transmute(listentry)) } + unsafe { RtlInterlockedPushEntrySList(listhead as _, listentry as _) } } #[inline] pub unsafe fn RtlInterlockedPushListSListEx(listhead: *mut SLIST_HEADER, list: *mut SLIST_ENTRY, listend: *mut SLIST_ENTRY, count: u32) -> *mut SLIST_ENTRY { windows_targets::link!("ntdll.dll" "system" fn RtlInterlockedPushListSListEx(listhead : *mut SLIST_HEADER, list : *mut SLIST_ENTRY, listend : *mut SLIST_ENTRY, count : u32) -> *mut SLIST_ENTRY); - unsafe { RtlInterlockedPushListSListEx(core::mem::transmute(listhead), core::mem::transmute(list), core::mem::transmute(listend), count) } + unsafe { RtlInterlockedPushListSListEx(listhead as _, list as _, listend as _, count) } } #[inline] pub unsafe fn RtlQueryDepthSList(listhead: *const SLIST_HEADER) -> u16 { 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 08e31f4454..14b7416b00 100644 --- a/crates/libs/windows/src/Windows/Win32/System/LibraryLoader/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/LibraryLoader/mod.rs @@ -46,7 +46,7 @@ where 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); - unsafe { EnumResourceLanguagesA(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), lptype.param().abi(), lpname.param().abi(), lpenumfunc, lparam).ok() } + unsafe { EnumResourceLanguagesA(hmodule.unwrap_or(core::mem::zeroed()) as _, lptype.param().abi(), lpname.param().abi(), lpenumfunc, lparam).ok() } } #[inline] pub unsafe fn EnumResourceLanguagesExA(hmodule: Option, lptype: P1, lpname: P2, lpenumfunc: ENUMRESLANGPROCA, lparam: Option, dwflags: u32, langid: u16) -> windows_core::Result<()> @@ -55,7 +55,7 @@ where 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); - unsafe { EnumResourceLanguagesExA(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), lptype.param().abi(), lpname.param().abi(), lpenumfunc, core::mem::transmute(lparam.unwrap_or(core::mem::zeroed())), dwflags, langid).ok() } + unsafe { EnumResourceLanguagesExA(hmodule.unwrap_or(core::mem::zeroed()) as _, lptype.param().abi(), lpname.param().abi(), lpenumfunc, lparam.unwrap_or(core::mem::zeroed()) as _, dwflags, langid).ok() } } #[inline] pub unsafe fn EnumResourceLanguagesExW(hmodule: Option, lptype: P1, lpname: P2, lpenumfunc: ENUMRESLANGPROCW, lparam: Option, dwflags: u32, langid: u16) -> windows_core::Result<()> @@ -64,7 +64,7 @@ where 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); - unsafe { EnumResourceLanguagesExW(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), lptype.param().abi(), lpname.param().abi(), lpenumfunc, core::mem::transmute(lparam.unwrap_or(core::mem::zeroed())), dwflags, langid).ok() } + unsafe { EnumResourceLanguagesExW(hmodule.unwrap_or(core::mem::zeroed()) as _, lptype.param().abi(), lpname.param().abi(), lpenumfunc, lparam.unwrap_or(core::mem::zeroed()) as _, dwflags, langid).ok() } } #[inline] pub unsafe fn EnumResourceLanguagesW(hmodule: Option, lptype: P1, lpname: P2, lpenumfunc: ENUMRESLANGPROCW, lparam: isize) -> windows_core::Result<()> @@ -73,7 +73,7 @@ where 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); - unsafe { EnumResourceLanguagesW(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), lptype.param().abi(), lpname.param().abi(), lpenumfunc, lparam).ok() } + unsafe { EnumResourceLanguagesW(hmodule.unwrap_or(core::mem::zeroed()) as _, lptype.param().abi(), lpname.param().abi(), lpenumfunc, lparam).ok() } } #[inline] pub unsafe fn EnumResourceNamesA(hmodule: Option, lptype: P1, lpenumfunc: ENUMRESNAMEPROCA, lparam: isize) -> windows_core::Result<()> @@ -81,7 +81,7 @@ where 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); - unsafe { EnumResourceNamesA(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), lptype.param().abi(), lpenumfunc, lparam).ok() } + unsafe { EnumResourceNamesA(hmodule.unwrap_or(core::mem::zeroed()) as _, lptype.param().abi(), lpenumfunc, lparam).ok() } } #[inline] pub unsafe fn EnumResourceNamesExA(hmodule: Option, lptype: P1, lpenumfunc: ENUMRESNAMEPROCA, lparam: isize, dwflags: u32, langid: u16) -> windows_core::Result<()> @@ -89,7 +89,7 @@ where 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); - unsafe { EnumResourceNamesExA(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), lptype.param().abi(), lpenumfunc, lparam, dwflags, langid).ok() } + unsafe { EnumResourceNamesExA(hmodule.unwrap_or(core::mem::zeroed()) as _, lptype.param().abi(), lpenumfunc, lparam, dwflags, langid).ok() } } #[inline] pub unsafe fn EnumResourceNamesExW(hmodule: Option, lptype: P1, lpenumfunc: ENUMRESNAMEPROCW, lparam: isize, dwflags: u32, langid: u16) -> windows_core::Result<()> @@ -97,7 +97,7 @@ where 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); - unsafe { EnumResourceNamesExW(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), lptype.param().abi(), lpenumfunc, lparam, dwflags, langid).ok() } + unsafe { EnumResourceNamesExW(hmodule.unwrap_or(core::mem::zeroed()) as _, lptype.param().abi(), lpenumfunc, lparam, dwflags, langid).ok() } } #[inline] pub unsafe fn EnumResourceNamesW(hmodule: Option, lptype: P1, lpenumfunc: ENUMRESNAMEPROCW, lparam: isize) -> super::super::Foundation::BOOL @@ -105,27 +105,27 @@ where 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); - unsafe { EnumResourceNamesW(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), lptype.param().abi(), lpenumfunc, lparam) } + unsafe { EnumResourceNamesW(hmodule.unwrap_or(core::mem::zeroed()) as _, lptype.param().abi(), lpenumfunc, lparam) } } #[inline] 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); - unsafe { EnumResourceTypesA(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), lpenumfunc, lparam).ok() } + unsafe { EnumResourceTypesA(hmodule.unwrap_or(core::mem::zeroed()) as _, lpenumfunc, lparam).ok() } } #[inline] 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); - unsafe { EnumResourceTypesExA(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), lpenumfunc, lparam, dwflags, langid).ok() } + unsafe { EnumResourceTypesExA(hmodule.unwrap_or(core::mem::zeroed()) as _, lpenumfunc, lparam, dwflags, langid).ok() } } #[inline] 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); - unsafe { EnumResourceTypesExW(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), lpenumfunc, lparam, dwflags, langid).ok() } + unsafe { EnumResourceTypesExW(hmodule.unwrap_or(core::mem::zeroed()) as _, lpenumfunc, lparam, dwflags, langid).ok() } } #[inline] 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); - unsafe { EnumResourceTypesW(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), lpenumfunc, lparam).ok() } + unsafe { EnumResourceTypesW(hmodule.unwrap_or(core::mem::zeroed()) as _, lpenumfunc, lparam).ok() } } #[inline] pub unsafe fn FindResourceA(hmodule: Option, lpname: P1, lptype: P2) -> windows_core::Result @@ -134,7 +134,7 @@ where 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__ = unsafe { FindResourceA(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), lpname.param().abi(), lptype.param().abi()) }; + let result__ = unsafe { FindResourceA(hmodule.unwrap_or(core::mem::zeroed()) as _, lpname.param().abi(), lptype.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -144,7 +144,7 @@ where 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__ = unsafe { FindResourceExA(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), lptype.param().abi(), lpname.param().abi(), wlanguage) }; + let result__ = unsafe { FindResourceExA(hmodule.unwrap_or(core::mem::zeroed()) as _, lptype.param().abi(), lpname.param().abi(), wlanguage) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -154,7 +154,7 @@ where 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); - unsafe { FindResourceExW(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), lptype.param().abi(), lpname.param().abi(), wlanguage) } + unsafe { FindResourceExW(hmodule.unwrap_or(core::mem::zeroed()) as _, lptype.param().abi(), lpname.param().abi(), wlanguage) } } #[inline] pub unsafe fn FindResourceW(hmodule: Option, lpname: P1, lptype: P2) -> super::super::Foundation::HRSRC @@ -163,7 +163,7 @@ where 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); - unsafe { FindResourceW(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), lpname.param().abi(), lptype.param().abi()) } + unsafe { FindResourceW(hmodule.unwrap_or(core::mem::zeroed()) as _, lpname.param().abi(), lptype.param().abi()) } } #[inline] pub unsafe fn FreeLibraryAndExitThread(hlibmodule: super::super::Foundation::HMODULE, dwexitcode: u32) -> ! { @@ -188,12 +188,12 @@ pub unsafe fn GetDllDirectoryW(lpbuffer: Option<&mut [u16]>) -> u32 { #[inline] 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); - unsafe { GetModuleFileNameA(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } + unsafe { GetModuleFileNameA(hmodule.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } } #[inline] 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); - unsafe { GetModuleFileNameW(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } + unsafe { GetModuleFileNameW(hmodule.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } } #[inline] pub unsafe fn GetModuleHandleA(lpmodulename: P0) -> windows_core::Result @@ -210,7 +210,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetModuleHandleExA(dwflags : u32, lpmodulename : windows_core::PCSTR, phmodule : *mut super::super::Foundation:: HMODULE) -> super::super::Foundation:: BOOL); - unsafe { GetModuleHandleExA(dwflags, lpmodulename.param().abi(), core::mem::transmute(phmodule)).ok() } + unsafe { GetModuleHandleExA(dwflags, lpmodulename.param().abi(), phmodule as _).ok() } } #[inline] pub unsafe fn GetModuleHandleExW(dwflags: u32, lpmodulename: P1, phmodule: *mut super::super::Foundation::HMODULE) -> windows_core::Result<()> @@ -218,7 +218,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetModuleHandleExW(dwflags : u32, lpmodulename : windows_core::PCWSTR, phmodule : *mut super::super::Foundation:: HMODULE) -> super::super::Foundation:: BOOL); - unsafe { GetModuleHandleExW(dwflags, lpmodulename.param().abi(), core::mem::transmute(phmodule)).ok() } + unsafe { GetModuleHandleExW(dwflags, lpmodulename.param().abi(), phmodule as _).ok() } } #[inline] pub unsafe fn GetModuleHandleW(lpmodulename: P0) -> windows_core::Result @@ -252,7 +252,7 @@ where P0: 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__ = unsafe { LoadLibraryExA(lplibfilename.param().abi(), core::mem::transmute(hfile.unwrap_or(core::mem::zeroed())), dwflags) }; + let result__ = unsafe { LoadLibraryExA(lplibfilename.param().abi(), hfile.unwrap_or(core::mem::zeroed()) as _, dwflags) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -261,7 +261,7 @@ where P0: 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__ = unsafe { LoadLibraryExW(lplibfilename.param().abi(), core::mem::transmute(hfile.unwrap_or(core::mem::zeroed())), dwflags) }; + let result__ = unsafe { LoadLibraryExW(lplibfilename.param().abi(), hfile.unwrap_or(core::mem::zeroed()) as _, dwflags) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -287,13 +287,13 @@ 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__ = unsafe { LoadPackagedLibrary(lpwlibfilename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { LoadPackagedLibrary(lpwlibfilename.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] 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__ = unsafe { LoadResource(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), hresinfo) }; + let result__ = unsafe { LoadResource(hmodule.unwrap_or(core::mem::zeroed()) as _, hresinfo) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -308,7 +308,7 @@ where 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); - unsafe { QueryOptionalDelayLoadedAPI(hparentmodule, lpdllname.param().abi(), lpprocname.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { QueryOptionalDelayLoadedAPI(hparentmodule, lpdllname.param().abi(), lpprocname.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn RemoveDllDirectory(cookie: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -339,7 +339,7 @@ where #[inline] 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); - unsafe { SizeofResource(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), hresinfo) } + unsafe { SizeofResource(hmodule.unwrap_or(core::mem::zeroed()) as _, hresinfo) } } #[inline] 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<()> @@ -348,7 +348,7 @@ where P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn UpdateResourceA(hupdate : super::super::Foundation:: HANDLE, lptype : windows_core::PCSTR, lpname : windows_core::PCSTR, wlanguage : u16, lpdata : *const core::ffi::c_void, cb : u32) -> super::super::Foundation:: BOOL); - unsafe { UpdateResourceA(hupdate, lptype.param().abi(), lpname.param().abi(), wlanguage, core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), cb).ok() } + unsafe { UpdateResourceA(hupdate, lptype.param().abi(), lpname.param().abi(), wlanguage, lpdata.unwrap_or(core::mem::zeroed()) as _, cb).ok() } } #[inline] 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<()> @@ -357,7 +357,7 @@ where P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn UpdateResourceW(hupdate : super::super::Foundation:: HANDLE, lptype : windows_core::PCWSTR, lpname : windows_core::PCWSTR, wlanguage : u16, lpdata : *const core::ffi::c_void, cb : u32) -> super::super::Foundation:: BOOL); - unsafe { UpdateResourceW(hupdate, lptype.param().abi(), lpname.param().abi(), wlanguage, core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), cb).ok() } + unsafe { UpdateResourceW(hupdate, lptype.param().abi(), lpname.param().abi(), wlanguage, lpdata.unwrap_or(core::mem::zeroed()) as _, 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 32547553f2..886d66a52c 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__ = unsafe { CreateMailslotA(lpname.param().abi(), nmaxmessagesize, lreadtimeout, core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { CreateMailslotA(lpname.param().abi(), nmaxmessagesize, lreadtimeout, lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -15,13 +15,13 @@ 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__ = unsafe { CreateMailslotW(lpname.param().abi(), nmaxmessagesize, lreadtimeout, core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { CreateMailslotW(lpname.param().abi(), nmaxmessagesize, lreadtimeout, lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] 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); - unsafe { GetMailslotInfo(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() } + unsafe { GetMailslotInfo(hmailslot, lpmaxmessagesize.unwrap_or(core::mem::zeroed()) as _, lpnextsize.unwrap_or(core::mem::zeroed()) as _, lpmessagecount.unwrap_or(core::mem::zeroed()) as _, lpreadtimeout.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetMailslotInfo(hmailslot: super::super::Foundation::HANDLE, lreadtimeout: u32) -> windows_core::Result<()> { diff --git a/crates/libs/windows/src/Windows/Win32/System/Mapi/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Mapi/mod.rs index 22f9ad7650..1014f5950b 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Mapi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Mapi/mod.rs @@ -1,7 +1,7 @@ #[inline] pub unsafe fn MAPIFreeBuffer(pv: *mut core::ffi::c_void) -> u32 { windows_targets::link!("mapi32.dll" "system" fn MAPIFreeBuffer(pv : *mut core::ffi::c_void) -> u32); - unsafe { MAPIFreeBuffer(core::mem::transmute(pv)) } + unsafe { MAPIFreeBuffer(pv as _) } } pub type LPMAPIADDRESS = Option u32>; pub type LPMAPIDELETEMAIL = Option u32>; diff --git a/crates/libs/windows/src/Windows/Win32/System/Memory/NonVolatile/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Memory/NonVolatile/mod.rs index 53d32a3ce3..3d4f96b68e 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Memory/NonVolatile/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Memory/NonVolatile/mod.rs @@ -8,7 +8,7 @@ pub unsafe fn RtlDrainNonVolatileFlush(nvtoken: *const core::ffi::c_void) -> u32 #[inline] pub unsafe fn RtlFillNonVolatileMemory(nvtoken: *const core::ffi::c_void, nvdestination: *mut core::ffi::c_void, size: usize, value: u8, flags: u32) -> u32 { windows_targets::link!("ntdll.dll" "system" fn RtlFillNonVolatileMemory(nvtoken : *const core::ffi::c_void, nvdestination : *mut core::ffi::c_void, size : usize, value : u8, flags : u32) -> u32); - unsafe { RtlFillNonVolatileMemory(nvtoken, core::mem::transmute(nvdestination), size, value, flags) } + unsafe { RtlFillNonVolatileMemory(nvtoken, nvdestination as _, size, value, flags) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] @@ -32,13 +32,13 @@ pub unsafe fn RtlFreeNonVolatileToken(nvtoken: *const core::ffi::c_void) -> u32 #[inline] pub unsafe fn RtlGetNonVolatileToken(nvbuffer: *const core::ffi::c_void, size: usize, nvtoken: *mut *mut core::ffi::c_void) -> u32 { windows_targets::link!("ntdll.dll" "system" fn RtlGetNonVolatileToken(nvbuffer : *const core::ffi::c_void, size : usize, nvtoken : *mut *mut core::ffi::c_void) -> u32); - unsafe { RtlGetNonVolatileToken(nvbuffer, size, core::mem::transmute(nvtoken)) } + unsafe { RtlGetNonVolatileToken(nvbuffer, size, nvtoken as _) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] pub unsafe fn RtlWriteNonVolatileMemory(nvtoken: *const core::ffi::c_void, nvdestination: *mut core::ffi::c_void, source: *const core::ffi::c_void, size: usize, flags: u32) -> u32 { windows_targets::link!("ntdll.dll" "system" fn RtlWriteNonVolatileMemory(nvtoken : *const core::ffi::c_void, nvdestination : *mut core::ffi::c_void, source : *const core::ffi::c_void, size : usize, flags : u32) -> u32); - unsafe { RtlWriteNonVolatileMemory(nvtoken, core::mem::transmute(nvdestination), source, size, flags) } + unsafe { RtlWriteNonVolatileMemory(nvtoken, nvdestination as _, source, size, flags) } } #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] 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 f818a4007a..7c56d5bfa6 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Memory/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Memory/mod.rs @@ -8,17 +8,17 @@ pub unsafe fn AddSecureMemoryCacheCallback(pfncallback: PSECURE_MEMORY_CACHE_CAL #[inline] 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); - unsafe { AllocateUserPhysicalPages(hprocess, core::mem::transmute(numberofpages), core::mem::transmute(pagearray)).ok() } + unsafe { AllocateUserPhysicalPages(hprocess, numberofpages as _, pagearray as _).ok() } } #[inline] 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); - unsafe { AllocateUserPhysicalPages2(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())) } + unsafe { AllocateUserPhysicalPages2(objecthandle, numberofpages as _, pagearray as _, 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: 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); - unsafe { AllocateUserPhysicalPagesNuma(hprocess, core::mem::transmute(numberofpages), core::mem::transmute(pagearray), nndpreferred).ok() } + unsafe { AllocateUserPhysicalPagesNuma(hprocess, numberofpages as _, pagearray as _, nndpreferred).ok() } } #[cfg(feature = "Win32_Security")] #[inline] @@ -27,7 +27,7 @@ where 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__ = unsafe { CreateFileMapping2(file, core::mem::transmute(securityattributes.unwrap_or(core::mem::zeroed())), desiredaccess, pageprotection, allocationattributes, maximumsize, name.param().abi(), core::mem::transmute(extendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) }; + let result__ = unsafe { CreateFileMapping2(file, securityattributes.unwrap_or(core::mem::zeroed()) as _, desiredaccess, pageprotection, allocationattributes, maximumsize, name.param().abi(), core::mem::transmute(extendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -37,7 +37,7 @@ where 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__ = unsafe { CreateFileMappingA(hfile, core::mem::transmute(lpfilemappingattributes.unwrap_or(core::mem::zeroed())), flprotect, dwmaximumsizehigh, dwmaximumsizelow, lpname.param().abi()) }; + let result__ = unsafe { CreateFileMappingA(hfile, lpfilemappingattributes.unwrap_or(core::mem::zeroed()) as _, flprotect, dwmaximumsizehigh, dwmaximumsizelow, lpname.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -47,7 +47,7 @@ where 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__ = unsafe { CreateFileMappingFromApp(hfile, core::mem::transmute(securityattributes.unwrap_or(core::mem::zeroed())), pageprotection, maximumsize, name.param().abi()) }; + let result__ = unsafe { CreateFileMappingFromApp(hfile, securityattributes.unwrap_or(core::mem::zeroed()) as _, pageprotection, maximumsize, name.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -57,7 +57,7 @@ where 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__ = unsafe { CreateFileMappingNumaA(hfile, core::mem::transmute(lpfilemappingattributes.unwrap_or(core::mem::zeroed())), flprotect, dwmaximumsizehigh, dwmaximumsizelow, lpname.param().abi(), nndpreferred) }; + let result__ = unsafe { CreateFileMappingNumaA(hfile, lpfilemappingattributes.unwrap_or(core::mem::zeroed()) as _, flprotect, dwmaximumsizehigh, dwmaximumsizelow, lpname.param().abi(), nndpreferred) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -67,7 +67,7 @@ where 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__ = unsafe { CreateFileMappingNumaW(hfile, core::mem::transmute(lpfilemappingattributes.unwrap_or(core::mem::zeroed())), flprotect, dwmaximumsizehigh, dwmaximumsizelow, lpname.param().abi(), nndpreferred) }; + let result__ = unsafe { CreateFileMappingNumaW(hfile, lpfilemappingattributes.unwrap_or(core::mem::zeroed()) as _, flprotect, dwmaximumsizehigh, dwmaximumsizelow, lpname.param().abi(), nndpreferred) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -77,7 +77,7 @@ where 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__ = unsafe { CreateFileMappingW(hfile, core::mem::transmute(lpfilemappingattributes.unwrap_or(core::mem::zeroed())), flprotect, dwmaximumsizehigh, dwmaximumsizelow, lpname.param().abi()) }; + let result__ = unsafe { CreateFileMappingW(hfile, lpfilemappingattributes.unwrap_or(core::mem::zeroed()) as _, flprotect, dwmaximumsizehigh, dwmaximumsizelow, lpname.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -99,7 +99,7 @@ pub unsafe fn FlushViewOfFile(lpbaseaddress: *const core::ffi::c_void, dwnumbero #[inline] 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); - unsafe { FreeUserPhysicalPages(hprocess, core::mem::transmute(numberofpages), pagearray).ok() } + unsafe { FreeUserPhysicalPages(hprocess, numberofpages as _, pagearray).ok() } } #[inline] pub unsafe fn GetLargePageMinimum() -> usize { @@ -109,7 +109,7 @@ pub unsafe fn GetLargePageMinimum() -> usize { #[inline] pub unsafe fn GetMemoryErrorHandlingCapabilities(capabilities: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetMemoryErrorHandlingCapabilities(capabilities : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetMemoryErrorHandlingCapabilities(core::mem::transmute(capabilities)).ok() } + unsafe { GetMemoryErrorHandlingCapabilities(capabilities as _).ok() } } #[inline] pub unsafe fn GetProcessHeap() -> windows_core::Result { @@ -125,17 +125,17 @@ pub unsafe fn GetProcessHeaps(processheaps: &mut [super::super::Foundation::HAND #[inline] 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); - unsafe { GetProcessWorkingSetSizeEx(hprocess, core::mem::transmute(lpminimumworkingsetsize), core::mem::transmute(lpmaximumworkingsetsize), core::mem::transmute(flags)) } + unsafe { GetProcessWorkingSetSizeEx(hprocess, lpminimumworkingsetsize as _, lpmaximumworkingsetsize as _, flags as _) } } #[inline] pub unsafe fn GetSystemFileCacheSize(lpminimumfilecachesize: *mut usize, lpmaximumfilecachesize: *mut usize, lpflags: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetSystemFileCacheSize(lpminimumfilecachesize : *mut usize, lpmaximumfilecachesize : *mut usize, lpflags : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetSystemFileCacheSize(core::mem::transmute(lpminimumfilecachesize), core::mem::transmute(lpmaximumfilecachesize), core::mem::transmute(lpflags)).ok() } + unsafe { GetSystemFileCacheSize(lpminimumfilecachesize as _, lpmaximumfilecachesize as _, lpflags as _).ok() } } #[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); - unsafe { GetWriteWatch(dwflags, lpbaseaddress, 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()))) } + unsafe { GetWriteWatch(dwflags, lpbaseaddress, dwregionsize, lpaddresses.unwrap_or(core::mem::zeroed()) as _, lpdwcount.unwrap_or(core::mem::zeroed()) as _, lpdwgranularity.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GlobalAlloc(uflags: GLOBAL_ALLOC_FLAGS, dwbytes: usize) -> windows_core::Result { @@ -199,7 +199,7 @@ pub unsafe fn HeapDestroy(hheap: super::super::Foundation::HANDLE) -> windows_co #[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); - unsafe { HeapFree(core::mem::transmute(hheap), dwflags, core::mem::transmute(lpmem.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HeapFree(hheap as _, dwflags, lpmem.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn HeapLock(hheap: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -209,17 +209,17 @@ pub unsafe fn HeapLock(hheap: super::super::Foundation::HANDLE) -> windows_core: #[inline] 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); - unsafe { HeapQueryInformation(core::mem::transmute(heaphandle.unwrap_or(core::mem::zeroed())), heapinformationclass, core::mem::transmute(heapinformation.unwrap_or(core::mem::zeroed())), heapinformationlength, core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HeapQueryInformation(heaphandle.unwrap_or(core::mem::zeroed()) as _, heapinformationclass, heapinformation.unwrap_or(core::mem::zeroed()) as _, heapinformationlength, returnlength.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { HeapReAlloc(core::mem::transmute(hheap), dwflags, core::mem::transmute(lpmem.unwrap_or(core::mem::zeroed())), dwbytes) } + unsafe { HeapReAlloc(hheap as _, dwflags, lpmem.unwrap_or(core::mem::zeroed()) as _, dwbytes) } } #[inline] 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); - unsafe { HeapSetInformation(core::mem::transmute(heaphandle.unwrap_or(core::mem::zeroed())), heapinformationclass, core::mem::transmute(heapinformation.unwrap_or(core::mem::zeroed())), heapinformationlength).ok() } + unsafe { HeapSetInformation(heaphandle.unwrap_or(core::mem::zeroed()) as _, heapinformationclass, heapinformation.unwrap_or(core::mem::zeroed()) as _, heapinformationlength).ok() } } #[inline] pub unsafe fn HeapSize(hheap: super::super::Foundation::HANDLE, dwflags: HEAP_FLAGS, lpmem: *const core::ffi::c_void) -> usize { @@ -229,7 +229,7 @@ pub unsafe fn HeapSize(hheap: super::super::Foundation::HANDLE, dwflags: HEAP_FL #[inline] 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); - unsafe { HeapSummary(hheap, dwflags, core::mem::transmute(lpsummary)) } + unsafe { HeapSummary(hheap, dwflags, lpsummary as _) } } #[inline] pub unsafe fn HeapUnlock(hheap: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -239,22 +239,22 @@ pub unsafe fn HeapUnlock(hheap: super::super::Foundation::HANDLE) -> windows_cor #[inline] 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); - unsafe { HeapValidate(hheap, dwflags, core::mem::transmute(lpmem.unwrap_or(core::mem::zeroed()))) } + unsafe { HeapValidate(hheap, dwflags, lpmem.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { HeapWalk(hheap, core::mem::transmute(lpentry)).ok() } + unsafe { HeapWalk(hheap, lpentry as _).ok() } } #[inline] 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); - unsafe { IsBadCodePtr(core::mem::transmute(lpfn.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { IsBadCodePtr(lpfn.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { IsBadReadPtr(core::mem::transmute(lp.unwrap_or(core::mem::zeroed())), ucb) } + unsafe { IsBadReadPtr(lp.unwrap_or(core::mem::zeroed()) as _, ucb) } } #[inline] pub unsafe fn IsBadStringPtrA(lpsz: P0, ucchmax: usize) -> super::super::Foundation::BOOL @@ -275,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); - unsafe { IsBadWritePtr(core::mem::transmute(lp.unwrap_or(core::mem::zeroed())), ucb) } + unsafe { IsBadWritePtr(lp.unwrap_or(core::mem::zeroed()) as _, ucb) } } #[inline] pub unsafe fn LocalAlloc(uflags: LOCAL_ALLOC_FLAGS, ubytes: usize) -> windows_core::Result { @@ -302,7 +302,7 @@ pub unsafe fn LocalLock(hmem: super::super::Foundation::HLOCAL) -> *mut core::ff #[inline] 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__ = unsafe { LocalReAlloc(core::mem::transmute(hmem.unwrap_or(core::mem::zeroed())), ubytes, uflags) }; + let result__ = unsafe { LocalReAlloc(hmem.unwrap_or(core::mem::zeroed()) as _, ubytes, uflags) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -323,7 +323,7 @@ pub unsafe fn MapUserPhysicalPages(virtualaddress: *const core::ffi::c_void, pag #[inline] pub unsafe fn MapUserPhysicalPagesScatter(virtualaddresses: *const *const core::ffi::c_void, numberofpages: usize, pagearray: Option<*const usize>) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn MapUserPhysicalPagesScatter(virtualaddresses : *const *const core::ffi::c_void, numberofpages : usize, pagearray : *const usize) -> super::super::Foundation:: BOOL); - unsafe { MapUserPhysicalPagesScatter(virtualaddresses, numberofpages, core::mem::transmute(pagearray.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { MapUserPhysicalPagesScatter(virtualaddresses, numberofpages, pagearray.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn MapViewOfFile(hfilemappingobject: super::super::Foundation::HANDLE, dwdesiredaccess: FILE_MAP, dwfileoffsethigh: u32, dwfileoffsetlow: u32, dwnumberofbytestomap: usize) -> MEMORY_MAPPED_VIEW_ADDRESS { @@ -333,22 +333,22 @@ pub unsafe fn MapViewOfFile(hfilemappingobject: super::super::Foundation::HANDLE #[inline] 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); - unsafe { MapViewOfFile3(filemapping, core::mem::transmute(process.unwrap_or(core::mem::zeroed())), core::mem::transmute(baseaddress.unwrap_or(core::mem::zeroed())), offset, viewsize, allocationtype, pageprotection, core::mem::transmute(extendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } + unsafe { MapViewOfFile3(filemapping, process.unwrap_or(core::mem::zeroed()) as _, baseaddress.unwrap_or(core::mem::zeroed()) as _, offset, viewsize, allocationtype, pageprotection, core::mem::transmute(extendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } } #[inline] pub unsafe fn MapViewOfFile3FromApp(filemapping: 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); - unsafe { MapViewOfFile3FromApp(filemapping, core::mem::transmute(process.unwrap_or(core::mem::zeroed())), core::mem::transmute(baseaddress.unwrap_or(core::mem::zeroed())), offset, viewsize, allocationtype, pageprotection, core::mem::transmute(extendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } + unsafe { MapViewOfFile3FromApp(filemapping, process.unwrap_or(core::mem::zeroed()) as _, baseaddress.unwrap_or(core::mem::zeroed()) as _, offset, viewsize, allocationtype, pageprotection, core::mem::transmute(extendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } } #[inline] pub unsafe fn MapViewOfFileEx(hfilemappingobject: 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); - unsafe { MapViewOfFileEx(hfilemappingobject, dwdesiredaccess, dwfileoffsethigh, dwfileoffsetlow, dwnumberofbytestomap, core::mem::transmute(lpbaseaddress.unwrap_or(core::mem::zeroed()))) } + unsafe { MapViewOfFileEx(hfilemappingobject, dwdesiredaccess, dwfileoffsethigh, dwfileoffsetlow, dwnumberofbytestomap, lpbaseaddress.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { MapViewOfFileExNuma(hfilemappingobject, dwdesiredaccess, dwfileoffsethigh, dwfileoffsetlow, dwnumberofbytestomap, core::mem::transmute(lpbaseaddress.unwrap_or(core::mem::zeroed())), nndpreferred) } + unsafe { MapViewOfFileExNuma(hfilemappingobject, dwdesiredaccess, dwfileoffsethigh, dwfileoffsetlow, dwnumberofbytestomap, lpbaseaddress.unwrap_or(core::mem::zeroed()) as _, nndpreferred) } } #[inline] pub unsafe fn MapViewOfFileFromApp(hfilemappingobject: super::super::Foundation::HANDLE, desiredaccess: FILE_MAP, fileoffset: u64, numberofbytestomap: usize) -> MEMORY_MAPPED_VIEW_ADDRESS { @@ -358,7 +358,7 @@ pub unsafe fn MapViewOfFileFromApp(hfilemappingobject: super::super::Foundation: #[inline] 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); - unsafe { MapViewOfFileNuma2(filemappinghandle, processhandle, offset, core::mem::transmute(baseaddress.unwrap_or(core::mem::zeroed())), viewsize, allocationtype, pageprotection, preferrednode) } + unsafe { MapViewOfFileNuma2(filemappinghandle, processhandle, offset, baseaddress.unwrap_or(core::mem::zeroed()) as _, viewsize, allocationtype, pageprotection, preferrednode) } } #[inline] pub unsafe fn OfferVirtualMemory(virtualaddress: &mut [u8], priority: OFFER_PRIORITY) -> u32 { @@ -405,17 +405,17 @@ pub unsafe fn PrefetchVirtualMemory(hprocess: super::super::Foundation::HANDLE, #[inline] 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); - unsafe { QueryMemoryResourceNotification(resourcenotificationhandle, core::mem::transmute(resourcestate)).ok() } + unsafe { QueryMemoryResourceNotification(resourcenotificationhandle, resourcestate as _).ok() } } #[inline] 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); - unsafe { QueryPartitionInformation(partition, partitioninformationclass, core::mem::transmute(partitioninformation), partitioninformationlength) } + unsafe { QueryPartitionInformation(partition, partitioninformationclass, partitioninformation as _, partitioninformationlength) } } #[inline] 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); - unsafe { QueryVirtualMemoryInformation(process, virtualaddress, memoryinformationclass, core::mem::transmute(memoryinformation), memoryinformationsize, core::mem::transmute(returnsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { QueryVirtualMemoryInformation(process, virtualaddress, memoryinformationclass, memoryinformation as _, memoryinformationsize, returnsize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn ReclaimVirtualMemory(virtualaddress: &[u8]) -> u32 { @@ -500,42 +500,42 @@ 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); - unsafe { VirtualAlloc(core::mem::transmute(lpaddress.unwrap_or(core::mem::zeroed())), dwsize, flallocationtype, flprotect) } + unsafe { VirtualAlloc(lpaddress.unwrap_or(core::mem::zeroed()) as _, dwsize, flallocationtype, flprotect) } } #[inline] 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); - unsafe { VirtualAlloc2(core::mem::transmute(process.unwrap_or(core::mem::zeroed())), core::mem::transmute(baseaddress.unwrap_or(core::mem::zeroed())), size, allocationtype, pageprotection, core::mem::transmute(extendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } + unsafe { VirtualAlloc2(process.unwrap_or(core::mem::zeroed()) as _, baseaddress.unwrap_or(core::mem::zeroed()) as _, size, allocationtype, pageprotection, core::mem::transmute(extendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } } #[inline] pub unsafe fn VirtualAlloc2FromApp(process: 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); - unsafe { VirtualAlloc2FromApp(core::mem::transmute(process.unwrap_or(core::mem::zeroed())), core::mem::transmute(baseaddress.unwrap_or(core::mem::zeroed())), size, allocationtype, pageprotection, core::mem::transmute(extendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } + unsafe { VirtualAlloc2FromApp(process.unwrap_or(core::mem::zeroed()) as _, baseaddress.unwrap_or(core::mem::zeroed()) as _, size, allocationtype, pageprotection, core::mem::transmute(extendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } } #[inline] pub unsafe fn VirtualAllocEx(hprocess: 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); - unsafe { VirtualAllocEx(hprocess, core::mem::transmute(lpaddress.unwrap_or(core::mem::zeroed())), dwsize, flallocationtype, flprotect) } + unsafe { VirtualAllocEx(hprocess, lpaddress.unwrap_or(core::mem::zeroed()) as _, dwsize, flallocationtype, flprotect) } } #[inline] 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); - unsafe { VirtualAllocExNuma(hprocess, core::mem::transmute(lpaddress.unwrap_or(core::mem::zeroed())), dwsize, flallocationtype, flprotect, nndpreferred) } + unsafe { VirtualAllocExNuma(hprocess, lpaddress.unwrap_or(core::mem::zeroed()) as _, dwsize, flallocationtype, flprotect, nndpreferred) } } #[inline] pub unsafe fn VirtualAllocFromApp(baseaddress: Option<*const core::ffi::c_void>, size: usize, allocationtype: VIRTUAL_ALLOCATION_TYPE, protection: u32) -> *mut core::ffi::c_void { windows_targets::link!("api-ms-win-core-memory-l1-1-3.dll" "system" fn VirtualAllocFromApp(baseaddress : *const core::ffi::c_void, size : usize, allocationtype : VIRTUAL_ALLOCATION_TYPE, protection : u32) -> *mut core::ffi::c_void); - unsafe { VirtualAllocFromApp(core::mem::transmute(baseaddress.unwrap_or(core::mem::zeroed())), size, allocationtype, protection) } + unsafe { VirtualAllocFromApp(baseaddress.unwrap_or(core::mem::zeroed()) as _, size, allocationtype, protection) } } #[inline] pub unsafe fn VirtualFree(lpaddress: *mut core::ffi::c_void, dwsize: usize, dwfreetype: VIRTUAL_FREE_TYPE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn VirtualFree(lpaddress : *mut core::ffi::c_void, dwsize : usize, dwfreetype : VIRTUAL_FREE_TYPE) -> super::super::Foundation:: BOOL); - unsafe { VirtualFree(core::mem::transmute(lpaddress), dwsize, dwfreetype).ok() } + unsafe { VirtualFree(lpaddress as _, dwsize, dwfreetype).ok() } } #[inline] 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); - unsafe { VirtualFreeEx(hprocess, core::mem::transmute(lpaddress), dwsize, dwfreetype).ok() } + unsafe { VirtualFreeEx(hprocess, lpaddress as _, dwsize, dwfreetype).ok() } } #[inline] pub unsafe fn VirtualLock(lpaddress: *const core::ffi::c_void, dwsize: usize) -> windows_core::Result<()> { @@ -545,27 +545,27 @@ pub unsafe fn VirtualLock(lpaddress: *const core::ffi::c_void, dwsize: usize) -> #[inline] pub unsafe fn VirtualProtect(lpaddress: *const core::ffi::c_void, dwsize: usize, flnewprotect: PAGE_PROTECTION_FLAGS, lpfloldprotect: *mut PAGE_PROTECTION_FLAGS) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn VirtualProtect(lpaddress : *const core::ffi::c_void, dwsize : usize, flnewprotect : PAGE_PROTECTION_FLAGS, lpfloldprotect : *mut PAGE_PROTECTION_FLAGS) -> super::super::Foundation:: BOOL); - unsafe { VirtualProtect(lpaddress, dwsize, flnewprotect, core::mem::transmute(lpfloldprotect)).ok() } + unsafe { VirtualProtect(lpaddress, dwsize, flnewprotect, lpfloldprotect as _).ok() } } #[inline] 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); - unsafe { VirtualProtectEx(hprocess, lpaddress, dwsize, flnewprotect, core::mem::transmute(lpfloldprotect)).ok() } + unsafe { VirtualProtectEx(hprocess, lpaddress, dwsize, flnewprotect, lpfloldprotect as _).ok() } } #[inline] pub unsafe fn VirtualProtectFromApp(address: *const core::ffi::c_void, size: usize, newprotection: u32, oldprotection: *mut u32) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-core-memory-l1-1-3.dll" "system" fn VirtualProtectFromApp(address : *const core::ffi::c_void, size : usize, newprotection : u32, oldprotection : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { VirtualProtectFromApp(address, size, newprotection, core::mem::transmute(oldprotection)).ok() } + unsafe { VirtualProtectFromApp(address, size, newprotection, oldprotection as _).ok() } } #[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); - unsafe { VirtualQuery(core::mem::transmute(lpaddress.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpbuffer), dwlength) } + unsafe { VirtualQuery(lpaddress.unwrap_or(core::mem::zeroed()) as _, lpbuffer as _, dwlength) } } #[inline] 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); - unsafe { VirtualQueryEx(hprocess, core::mem::transmute(lpaddress.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpbuffer), dwlength) } + unsafe { VirtualQueryEx(hprocess, lpaddress.unwrap_or(core::mem::zeroed()) as _, lpbuffer as _, dwlength) } } #[inline] pub unsafe fn VirtualUnlock(lpaddress: *const core::ffi::c_void, dwsize: usize) -> windows_core::Result<()> { @@ -575,7 +575,7 @@ pub unsafe fn VirtualUnlock(lpaddress: *const core::ffi::c_void, dwsize: usize) #[inline] 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); - unsafe { VirtualUnlockEx(core::mem::transmute(process.unwrap_or(core::mem::zeroed())), address, size) } + unsafe { VirtualUnlockEx(process.unwrap_or(core::mem::zeroed()) as _, address, 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 4a33c1c022..5651838996 100644 --- a/crates/libs/windows/src/Windows/Win32/System/MessageQueuing/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/MessageQueuing/mod.rs @@ -4,7 +4,7 @@ where P0: windows_core::Param, { windows_targets::link!("mqrt.dll" "system" fn MQADsPathToFormatName(lpwcsadspath : windows_core::PCWSTR, lpwcsformatname : windows_core::PWSTR, lpdwformatnamelength : *mut u32) -> windows_core::HRESULT); - unsafe { MQADsPathToFormatName(lpwcsadspath.param().abi(), core::mem::transmute(lpwcsformatname), core::mem::transmute(lpdwformatnamelength)).ok() } + unsafe { MQADsPathToFormatName(lpwcsadspath.param().abi(), core::mem::transmute(lpwcsformatname), lpdwformatnamelength as _).ok() } } #[cfg(feature = "Win32_System_DistributedTransactionCoordinator")] #[inline] @@ -37,7 +37,7 @@ pub unsafe fn MQCreateCursor(hqueue: isize) -> windows_core::Result, 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); - unsafe { 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() } + unsafe { MQCreateQueue(psecuritydescriptor.unwrap_or(core::mem::zeroed()) as _, pqueueprops as _, lpwcsformatname.unwrap_or(core::mem::zeroed()) as _, lpdwformatnamelength as _).ok() } } #[inline] pub unsafe fn MQDeleteQueue(lpwcsformatname: P0) -> windows_core::Result<()> @@ -64,7 +64,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); - unsafe { MQGetMachineProperties(lpwcsmachinename.param().abi(), core::mem::transmute(pguidmachineid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pqmprops)).ok() } + unsafe { MQGetMachineProperties(lpwcsmachinename.param().abi(), pguidmachineid.unwrap_or(core::mem::zeroed()) as _, pqmprops as _).ok() } } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -79,7 +79,7 @@ where P0: windows_core::Param, { windows_targets::link!("mqrt.dll" "system" fn MQGetPrivateComputerInformation(lpwcscomputername : windows_core::PCWSTR, pprivateprops : *mut MQPRIVATEPROPS) -> windows_core::HRESULT); - unsafe { MQGetPrivateComputerInformation(lpwcscomputername.param().abi(), core::mem::transmute(pprivateprops)).ok() } + unsafe { MQGetPrivateComputerInformation(lpwcscomputername.param().abi(), pprivateprops as _).ok() } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] @@ -88,7 +88,7 @@ where P0: windows_core::Param, { windows_targets::link!("mqrt.dll" "system" fn MQGetQueueProperties(lpwcsformatname : windows_core::PCWSTR, pqueueprops : *mut MQQUEUEPROPS) -> windows_core::HRESULT); - unsafe { MQGetQueueProperties(lpwcsformatname.param().abi(), core::mem::transmute(pqueueprops)).ok() } + unsafe { MQGetQueueProperties(lpwcsformatname.param().abi(), pqueueprops as _).ok() } } #[cfg(feature = "Win32_Security")] #[inline] @@ -97,14 +97,14 @@ where P0: windows_core::Param, { windows_targets::link!("mqrt.dll" "system" fn MQGetQueueSecurity(lpwcsformatname : windows_core::PCWSTR, requestedinformation : u32, psecuritydescriptor : super::super::Security:: PSECURITY_DESCRIPTOR, nlength : u32, lpnlengthneeded : *mut u32) -> windows_core::HRESULT); - unsafe { MQGetQueueSecurity(lpwcsformatname.param().abi(), requestedinformation, core::mem::transmute(psecuritydescriptor), nlength, core::mem::transmute(lpnlengthneeded)).ok() } + unsafe { MQGetQueueSecurity(lpwcsformatname.param().abi(), requestedinformation, psecuritydescriptor as _, nlength, lpnlengthneeded as _).ok() } } #[inline] 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); unsafe { let mut result__ = core::mem::zeroed(); - MQGetSecurityContext(core::mem::transmute(lpcertbuffer.unwrap_or(core::mem::zeroed())), dwcertbufferlength, &mut result__).map(|| core::mem::transmute(result__)) + MQGetSecurityContext(lpcertbuffer.unwrap_or(core::mem::zeroed()) as _, dwcertbufferlength, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -112,18 +112,18 @@ pub unsafe fn MQGetSecurityContextEx(lpcertbuffer: Option<*const core::ffi::c_vo 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); unsafe { let mut result__ = core::mem::zeroed(); - MQGetSecurityContextEx(core::mem::transmute(lpcertbuffer.unwrap_or(core::mem::zeroed())), dwcertbufferlength, &mut result__).map(|| core::mem::transmute(result__)) + MQGetSecurityContextEx(lpcertbuffer.unwrap_or(core::mem::zeroed()) as _, 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<()> { windows_targets::link!("mqrt.dll" "system" fn MQHandleToFormatName(hqueue : isize, lpwcsformatname : windows_core::PWSTR, lpdwformatnamelength : *mut u32) -> windows_core::HRESULT); - unsafe { MQHandleToFormatName(hqueue, core::mem::transmute(lpwcsformatname), core::mem::transmute(lpdwformatnamelength)).ok() } + unsafe { MQHandleToFormatName(hqueue, core::mem::transmute(lpwcsformatname), lpdwformatnamelength as _).ok() } } #[inline] pub unsafe fn MQInstanceToFormatName(pguid: *const windows_core::GUID, lpwcsformatname: windows_core::PWSTR, lpdwformatnamelength: *mut u32) -> windows_core::Result<()> { windows_targets::link!("mqrt.dll" "system" fn MQInstanceToFormatName(pguid : *const windows_core::GUID, lpwcsformatname : windows_core::PWSTR, lpdwformatnamelength : *mut u32) -> windows_core::HRESULT); - unsafe { MQInstanceToFormatName(pguid, core::mem::transmute(lpwcsformatname), core::mem::transmute(lpdwformatnamelength)).ok() } + unsafe { MQInstanceToFormatName(pguid, core::mem::transmute(lpwcsformatname), lpdwformatnamelength as _).ok() } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] @@ -134,7 +134,7 @@ where windows_targets::link!("mqrt.dll" "system" fn MQLocateBegin(lpwcscontext : windows_core::PCWSTR, prestriction : *const MQRESTRICTION, pcolumns : *const MQCOLUMNSET, psort : *const MQSORTSET, phenum : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - MQLocateBegin(lpwcscontext.param().abi(), core::mem::transmute(prestriction.unwrap_or(core::mem::zeroed())), pcolumns, psort, &mut result__).map(|| core::mem::transmute(result__)) + MQLocateBegin(lpwcscontext.param().abi(), prestriction.unwrap_or(core::mem::zeroed()) as _, pcolumns, psort, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -146,7 +146,7 @@ pub unsafe fn MQLocateEnd(henum: super::super::Foundation::HANDLE) -> windows_co #[inline] 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); - unsafe { MQLocateNext(henum, core::mem::transmute(pcprops), core::mem::transmute(apropvar)).ok() } + unsafe { MQLocateNext(henum, pcprops as _, core::mem::transmute(apropvar)).ok() } } #[inline] pub unsafe fn MQMarkMessageRejected(hqueue: super::super::Foundation::HANDLE, ulllookupid: u64) -> windows_core::Result<()> { @@ -171,7 +171,7 @@ where P1: windows_core::Param, { windows_targets::link!("mqrt.dll" "system" fn MQMgmtGetInfo(pcomputername : windows_core::PCWSTR, pobjectname : windows_core::PCWSTR, pmgmtprops : *mut MQMGMTPROPS) -> windows_core::HRESULT); - unsafe { MQMgmtGetInfo(pcomputername.param().abi(), pobjectname.param().abi(), core::mem::transmute(pmgmtprops)).ok() } + unsafe { MQMgmtGetInfo(pcomputername.param().abi(), pobjectname.param().abi(), pmgmtprops as _).ok() } } #[cfg(feature = "Win32_System_DistributedTransactionCoordinator")] #[inline] @@ -199,7 +199,7 @@ where P0: windows_core::Param, { windows_targets::link!("mqrt.dll" "system" fn MQPathNameToFormatName(lpwcspathname : windows_core::PCWSTR, lpwcsformatname : windows_core::PWSTR, lpdwformatnamelength : *mut u32) -> windows_core::HRESULT); - unsafe { MQPathNameToFormatName(lpwcspathname.param().abi(), core::mem::transmute(lpwcsformatname), core::mem::transmute(lpdwformatnamelength)).ok() } + unsafe { MQPathNameToFormatName(lpwcspathname.param().abi(), core::mem::transmute(lpwcsformatname), lpdwformatnamelength as _).ok() } } #[inline] pub unsafe fn MQPurgeQueue(hqueue: isize) -> windows_core::Result<()> { @@ -213,7 +213,7 @@ where 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); - unsafe { MQReceiveMessage(hsource, dwtimeout, 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() } + unsafe { MQReceiveMessage(hsource, dwtimeout, dwaction, pmessageprops.unwrap_or(core::mem::zeroed()) as _, lpoverlapped.unwrap_or(core::mem::zeroed()) as _, fnreceivecallback.unwrap_or(core::mem::zeroed()) as _, hcursor.unwrap_or(core::mem::zeroed()) as _, ptransaction.param().abi()).ok() } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_DistributedTransactionCoordinator", feature = "Win32_System_IO", feature = "Win32_System_Variant"))] #[inline] @@ -222,7 +222,7 @@ 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); - unsafe { MQReceiveMessageByLookupId(hsource, ulllookupid, 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() } + unsafe { MQReceiveMessageByLookupId(hsource, ulllookupid, dwlookupaction, pmessageprops.unwrap_or(core::mem::zeroed()) as _, lpoverlapped.unwrap_or(core::mem::zeroed()) as _, fnreceivecallback.unwrap_or(core::mem::zeroed()) as _, ptransaction.param().abi()).ok() } } #[inline] pub unsafe fn MQRegisterCertificate(dwflags: u32, lpcertbuffer: *const core::ffi::c_void, dwcertbufferlength: u32) -> windows_core::Result<()> { @@ -245,7 +245,7 @@ where P0: windows_core::Param, { windows_targets::link!("mqrt.dll" "system" fn MQSetQueueProperties(lpwcsformatname : windows_core::PCWSTR, pqueueprops : *mut MQQUEUEPROPS) -> windows_core::HRESULT); - unsafe { MQSetQueueProperties(lpwcsformatname.param().abi(), core::mem::transmute(pqueueprops)).ok() } + unsafe { MQSetQueueProperties(lpwcsformatname.param().abi(), pqueueprops as _).ok() } } #[cfg(feature = "Win32_Security")] #[inline] @@ -254,7 +254,7 @@ where P0: 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); - unsafe { MQSetQueueSecurity(lpwcsformatname.param().abi(), securityinformation, core::mem::transmute(psecuritydescriptor.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { MQSetQueueSecurity(lpwcsformatname.param().abi(), securityinformation, psecuritydescriptor.unwrap_or(core::mem::zeroed()) as _).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 49b9bff151..02c0ca9287 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Mmc/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Mmc/mod.rs @@ -1414,10 +1414,10 @@ impl IComponent { } } pub unsafe fn GetResultViewType(&self, cookie: isize, ppviewtype: *mut windows_core::PWSTR, pviewoptions: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetResultViewType)(windows_core::Interface::as_raw(self), cookie, core::mem::transmute(ppviewtype), core::mem::transmute(pviewoptions)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetResultViewType)(windows_core::Interface::as_raw(self), cookie, ppviewtype as _, pviewoptions as _).ok() } } pub unsafe fn GetDisplayInfo(&self, presultdataitem: *mut RESULTDATAITEM) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDisplayInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(presultdataitem)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDisplayInfo)(windows_core::Interface::as_raw(self), presultdataitem as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn CompareObjects(&self, lpdataobjecta: P0, lpdataobjectb: P1) -> windows_core::Result<()> @@ -1638,7 +1638,7 @@ impl IComponentData { } } pub unsafe fn GetDisplayInfo(&self, pscopedataitem: *mut SCOPEDATAITEM) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDisplayInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pscopedataitem)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDisplayInfo)(windows_core::Interface::as_raw(self), pscopedataitem as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn CompareObjects(&self, lpdataobjecta: P0, lpdataobjectb: P1) -> windows_core::Result<()> @@ -2144,7 +2144,7 @@ windows_core::imp::define_interface!(IConsoleNameSpace, IConsoleNameSpace_Vtbl, windows_core::imp::interface_hierarchy!(IConsoleNameSpace, windows_core::IUnknown); impl IConsoleNameSpace { pub unsafe fn InsertItem(&self, item: *mut SCOPEDATAITEM) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).InsertItem)(windows_core::Interface::as_raw(self), core::mem::transmute(item)).ok() } + unsafe { (windows_core::Interface::vtable(self).InsertItem)(windows_core::Interface::as_raw(self), item as _).ok() } } pub unsafe fn DeleteItem(&self, hitem: isize, fdeletethis: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DeleteItem)(windows_core::Interface::as_raw(self), hitem, fdeletethis).ok() } @@ -2153,16 +2153,16 @@ impl IConsoleNameSpace { unsafe { (windows_core::Interface::vtable(self).SetItem)(windows_core::Interface::as_raw(self), item).ok() } } pub unsafe fn GetItem(&self, item: *mut SCOPEDATAITEM) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetItem)(windows_core::Interface::as_raw(self), core::mem::transmute(item)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetItem)(windows_core::Interface::as_raw(self), item as _).ok() } } pub unsafe fn GetChildItem(&self, item: isize, pitemchild: *mut isize, pcookie: *mut isize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetChildItem)(windows_core::Interface::as_raw(self), item, core::mem::transmute(pitemchild), core::mem::transmute(pcookie)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetChildItem)(windows_core::Interface::as_raw(self), item, pitemchild as _, pcookie as _).ok() } } pub unsafe fn GetNextItem(&self, item: isize, pitemnext: *mut isize, pcookie: *mut isize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNextItem)(windows_core::Interface::as_raw(self), item, core::mem::transmute(pitemnext), core::mem::transmute(pcookie)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNextItem)(windows_core::Interface::as_raw(self), item, pitemnext as _, pcookie as _).ok() } } pub unsafe fn GetParentItem(&self, item: isize, pitemparent: *mut isize, pcookie: *mut isize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetParentItem)(windows_core::Interface::as_raw(self), item, core::mem::transmute(pitemparent), core::mem::transmute(pcookie)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetParentItem)(windows_core::Interface::as_raw(self), item, pitemparent as _, pcookie as _).ok() } } } #[repr(C)] @@ -2737,7 +2737,7 @@ windows_core::imp::define_interface!(IEnumTASK, IEnumTASK_Vtbl, 0x338698b1_5a02_ windows_core::imp::interface_hierarchy!(IEnumTASK, windows_core::IUnknown); impl IEnumTASK { pub unsafe fn Next(&self, rgelt: &mut [MMC_TASK], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -2820,7 +2820,7 @@ impl IExtendContextMenu { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).AddMenuItems)(windows_core::Interface::as_raw(self), pidataobject.param().abi(), picallback.param().abi(), core::mem::transmute(pinsertionallowed)).ok() } + unsafe { (windows_core::Interface::vtable(self).AddMenuItems)(windows_core::Interface::as_raw(self), pidataobject.param().abi(), picallback.param().abi(), pinsertionallowed as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Command(&self, lcommandid: i32, pidataobject: P1) -> windows_core::Result<()> @@ -2999,7 +2999,7 @@ impl IExtendPropertySheet2 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetWatermarks)(windows_core::Interface::as_raw(self), lpidataobject.param().abi(), core::mem::transmute(lphwatermark), core::mem::transmute(lphheader), core::mem::transmute(lphpalette), core::mem::transmute(bstretch)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWatermarks)(windows_core::Interface::as_raw(self), lpidataobject.param().abi(), lphwatermark as _, lphheader as _, lphpalette as _, bstretch as _).ok() } } } #[repr(C)] @@ -3373,7 +3373,7 @@ impl IHeaderCtrl2 { unsafe { (windows_core::Interface::vtable(self).SetColumnFilter)(windows_core::Interface::as_raw(self), ncolumn, dwtype, pfilterdata).ok() } } pub unsafe fn GetColumnFilter(&self, ncolumn: u32, pdwtype: *mut u32, pfilterdata: *mut MMC_FILTERDATA) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetColumnFilter)(windows_core::Interface::as_raw(self), ncolumn, core::mem::transmute(pdwtype), core::mem::transmute(pfilterdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetColumnFilter)(windows_core::Interface::as_raw(self), ncolumn, pdwtype as _, pfilterdata as _).ok() } } } #[repr(C)] @@ -3471,7 +3471,7 @@ windows_core::imp::define_interface!(IMMCVersionInfo, IMMCVersionInfo_Vtbl, 0xa8 windows_core::imp::interface_hierarchy!(IMMCVersionInfo, windows_core::IUnknown); impl IMMCVersionInfo { pub unsafe fn GetMMCVersion(&self, pversionmajor: *mut i32, pversionminor: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMMCVersion)(windows_core::Interface::as_raw(self), core::mem::transmute(pversionmajor), core::mem::transmute(pversionminor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMMCVersion)(windows_core::Interface::as_raw(self), pversionmajor as _, pversionminor as _).ok() } } } #[repr(C)] @@ -3921,7 +3921,7 @@ windows_core::imp::define_interface!(IResultData, IResultData_Vtbl, 0x31da5fa0_e windows_core::imp::interface_hierarchy!(IResultData, windows_core::IUnknown); impl IResultData { pub unsafe fn InsertItem(&self, item: *mut RESULTDATAITEM) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).InsertItem)(windows_core::Interface::as_raw(self), core::mem::transmute(item)).ok() } + unsafe { (windows_core::Interface::vtable(self).InsertItem)(windows_core::Interface::as_raw(self), item as _).ok() } } pub unsafe fn DeleteItem(&self, itemid: isize, ncol: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DeleteItem)(windows_core::Interface::as_raw(self), itemid, ncol).ok() } @@ -3939,10 +3939,10 @@ impl IResultData { unsafe { (windows_core::Interface::vtable(self).SetItem)(windows_core::Interface::as_raw(self), item).ok() } } pub unsafe fn GetItem(&self, item: *mut RESULTDATAITEM) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetItem)(windows_core::Interface::as_raw(self), core::mem::transmute(item)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetItem)(windows_core::Interface::as_raw(self), item as _).ok() } } pub unsafe fn GetNextItem(&self, item: *mut RESULTDATAITEM) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNextItem)(windows_core::Interface::as_raw(self), core::mem::transmute(item)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNextItem)(windows_core::Interface::as_raw(self), item as _).ok() } } pub unsafe fn ModifyItemState(&self, nindex: i32, itemid: isize, uadd: u32, uremove: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ModifyItemState)(windows_core::Interface::as_raw(self), nindex, itemid, uadd, uremove).ok() } @@ -4179,7 +4179,7 @@ windows_core::imp::define_interface!(IResultDataCompare, IResultDataCompare_Vtbl windows_core::imp::interface_hierarchy!(IResultDataCompare, windows_core::IUnknown); impl IResultDataCompare { pub unsafe fn Compare(&self, luserparam: super::super::Foundation::LPARAM, cookiea: isize, cookieb: isize, pnresult: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Compare)(windows_core::Interface::as_raw(self), luserparam, cookiea, cookieb, core::mem::transmute(pnresult)).ok() } + unsafe { (windows_core::Interface::vtable(self).Compare)(windows_core::Interface::as_raw(self), luserparam, cookiea, cookieb, pnresult as _).ok() } } } #[repr(C)] @@ -4340,7 +4340,7 @@ impl ISnapinAbout { } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetStaticFolderImage(&self, hsmallimage: *mut super::super::Graphics::Gdi::HBITMAP, hsmallimageopen: *mut super::super::Graphics::Gdi::HBITMAP, hlargeimage: *mut super::super::Graphics::Gdi::HBITMAP, cmask: *mut super::super::Foundation::COLORREF) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStaticFolderImage)(windows_core::Interface::as_raw(self), core::mem::transmute(hsmallimage), core::mem::transmute(hsmallimageopen), core::mem::transmute(hlargeimage), core::mem::transmute(cmask)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStaticFolderImage)(windows_core::Interface::as_raw(self), hsmallimage as _, hsmallimageopen as _, hlargeimage as _, cmask as _).ok() } } } #[repr(C)] @@ -4642,7 +4642,7 @@ impl IStringTable { } } pub unsafe fn GetString(&self, stringid: u32, lpbuffer: &mut [u16], pcchout: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetString)(windows_core::Interface::as_raw(self), stringid, lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpbuffer.as_ptr()), core::mem::transmute(pcchout)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetString)(windows_core::Interface::as_raw(self), stringid, lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpbuffer.as_ptr()), pcchout as _).ok() } } pub unsafe fn GetStringLength(&self, stringid: u32) -> windows_core::Result { unsafe { 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 2b3a861ec5..c90e8c61a3 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Ole/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Ole/mod.rs @@ -11,13 +11,13 @@ pub unsafe fn BstrFromVector(psa: *const super::Com::SAFEARRAY) -> windows_core: #[inline] pub unsafe fn ClearCustData(pcustdata: *mut super::Com::CUSTDATA) { windows_targets::link!("oleaut32.dll" "system" fn ClearCustData(pcustdata : *mut super::Com:: CUSTDATA)); - unsafe { ClearCustData(core::mem::transmute(pcustdata)) } + unsafe { ClearCustData(pcustdata as _) } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Variant"))] #[inline] pub unsafe fn CreateDispTypeInfo(pidata: *mut INTERFACEDATA, lcid: u32, pptinfo: *mut Option) -> windows_core::Result<()> { windows_targets::link!("oleaut32.dll" "system" fn CreateDispTypeInfo(pidata : *mut INTERFACEDATA, lcid : u32, pptinfo : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { CreateDispTypeInfo(core::mem::transmute(pidata), lcid, core::mem::transmute(pptinfo)).ok() } + unsafe { CreateDispTypeInfo(pidata as _, lcid, core::mem::transmute(pptinfo)).ok() } } #[inline] pub unsafe fn CreateErrorInfo() -> windows_core::Result { @@ -43,7 +43,7 @@ where P2: windows_core::Param, { windows_targets::link!("oleaut32.dll" "system" fn CreateStdDispatch(punkouter : * mut core::ffi::c_void, pvthis : *mut core::ffi::c_void, ptinfo : * mut core::ffi::c_void, ppunkstddisp : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { CreateStdDispatch(punkouter.param().abi(), core::mem::transmute(pvthis), ptinfo.param().abi(), core::mem::transmute(ppunkstddisp)).ok() } + unsafe { CreateStdDispatch(punkouter.param().abi(), pvthis as _, ptinfo.param().abi(), core::mem::transmute(ppunkstddisp)).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -75,7 +75,7 @@ pub unsafe fn DispCallFunc(pvinstance: Option<*const core::ffi::c_void>, ovft: u 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); unsafe { let mut result__ = core::mem::zeroed(); - DispCallFunc(core::mem::transmute(pvinstance.unwrap_or(core::mem::zeroed())), ovft, cc, vtreturn, cactuals, prgvt, prgpvarg, &mut result__).map(|| core::mem::transmute(result__)) + DispCallFunc(pvinstance.unwrap_or(core::mem::zeroed()) as _, ovft, cc, vtreturn, cactuals, prgvt, prgpvarg, &mut result__).map(|| core::mem::transmute(result__)) } } #[cfg(feature = "Win32_System_Com")] @@ -85,13 +85,13 @@ where P0: windows_core::Param, { windows_targets::link!("oleaut32.dll" "system" fn DispGetIDsOfNames(ptinfo : * mut core::ffi::c_void, rgsznames : *const windows_core::PCWSTR, cnames : u32, rgdispid : *mut i32) -> windows_core::HRESULT); - unsafe { DispGetIDsOfNames(ptinfo.param().abi(), rgsznames, cnames, core::mem::transmute(rgdispid)).ok() } + unsafe { DispGetIDsOfNames(ptinfo.param().abi(), rgsznames, cnames, rgdispid as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Variant"))] #[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); - unsafe { DispGetParam(pdispparams, position, vttarg, core::mem::transmute(pvarresult), core::mem::transmute(puargerr.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DispGetParam(pdispparams, position, vttarg, core::mem::transmute(pvarresult), puargerr.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Variant"))] #[inline] @@ -100,7 +100,7 @@ where P1: windows_core::Param, { windows_targets::link!("oleaut32.dll" "system" fn DispInvoke(_this : *mut core::ffi::c_void, ptinfo : * mut core::ffi::c_void, dispidmember : i32, wflags : u16, pparams : *mut super::Com:: DISPPARAMS, pvarresult : *mut super::Variant:: VARIANT, pexcepinfo : *mut super::Com:: EXCEPINFO, puargerr : *mut u32) -> windows_core::HRESULT); - unsafe { DispInvoke(core::mem::transmute(_this), ptinfo.param().abi(), dispidmember, wflags, core::mem::transmute(pparams), core::mem::transmute(pvarresult), core::mem::transmute(pexcepinfo), core::mem::transmute(puargerr)).ok() } + unsafe { DispInvoke(_this as _, ptinfo.param().abi(), dispidmember, wflags, pparams as _, core::mem::transmute(pvarresult), core::mem::transmute(pexcepinfo), puargerr as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -110,12 +110,12 @@ where P1: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn DoDragDrop(pdataobj : * mut core::ffi::c_void, pdropsource : * mut core::ffi::c_void, dwokeffects : DROPEFFECT, pdweffect : *mut DROPEFFECT) -> windows_core::HRESULT); - unsafe { DoDragDrop(pdataobj.param().abi(), pdropsource.param().abi(), dwokeffects, core::mem::transmute(pdweffect)) } + unsafe { DoDragDrop(pdataobj.param().abi(), pdropsource.param().abi(), dwokeffects, pdweffect as _) } } #[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); - unsafe { GetActiveObject(rclsid, core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppunk)).ok() } + unsafe { GetActiveObject(rclsid, pvreserved.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(ppunk)).ok() } } #[inline] pub unsafe fn GetAltMonthNames(lcid: u32) -> windows_core::Result<*mut windows_core::PWSTR> { @@ -161,13 +161,13 @@ pub unsafe fn HRGN_UserFree64(param0: *const u32, param1: *const super::super::G #[inline] pub unsafe fn HRGN_UserMarshal(param0: *const u32, param1: *mut u8, param2: *const super::super::Graphics::Gdi::HRGN) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HRGN_UserMarshal(param0 : *const u32, param1 : *mut u8, param2 : *const super::super::Graphics::Gdi:: HRGN) -> *mut u8); - unsafe { HRGN_UserMarshal(param0, core::mem::transmute(param1), param2) } + unsafe { HRGN_UserMarshal(param0, param1 as _, param2) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn HRGN_UserMarshal64(param0: *const u32, param1: *mut u8, param2: *const super::super::Graphics::Gdi::HRGN) -> *mut u8 { windows_targets::link!("api-ms-win-core-marshal-l1-1-0.dll" "system" fn HRGN_UserMarshal64(param0 : *const u32, param1 : *mut u8, param2 : *const super::super::Graphics::Gdi:: HRGN) -> *mut u8); - unsafe { HRGN_UserMarshal64(param0, core::mem::transmute(param1), param2) } + unsafe { HRGN_UserMarshal64(param0, param1 as _, param2) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -185,19 +185,19 @@ pub unsafe fn HRGN_UserSize64(param0: *const u32, param1: u32, param2: *const su #[inline] pub unsafe fn HRGN_UserUnmarshal(param0: *const u32, param1: *const u8, param2: *mut super::super::Graphics::Gdi::HRGN) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HRGN_UserUnmarshal(param0 : *const u32, param1 : *const u8, param2 : *mut super::super::Graphics::Gdi:: HRGN) -> *mut u8); - unsafe { HRGN_UserUnmarshal(param0, param1, core::mem::transmute(param2)) } + unsafe { HRGN_UserUnmarshal(param0, param1, param2 as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn HRGN_UserUnmarshal64(param0: *const u32, param1: *const u8, param2: *mut super::super::Graphics::Gdi::HRGN) -> *mut u8 { windows_targets::link!("api-ms-win-core-marshal-l1-1-0.dll" "system" fn HRGN_UserUnmarshal64(param0 : *const u32, param1 : *const u8, param2 : *mut super::super::Graphics::Gdi:: HRGN) -> *mut u8); - unsafe { HRGN_UserUnmarshal64(param0, param1, core::mem::transmute(param2)) } + unsafe { HRGN_UserUnmarshal64(param0, param1, param2 as _) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] 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); - unsafe { IsAccelerator(haccel, caccelentries, lpmsg, core::mem::transmute(lpwcmd)) } + unsafe { IsAccelerator(haccel, caccelentries, lpmsg, lpwcmd as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -272,7 +272,7 @@ 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); - unsafe { OleConvertOLESTREAMToIStorage2(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() } + unsafe { OleConvertOLESTREAMToIStorage2(lpolestream, pstg.param().abi(), ptd.unwrap_or(core::mem::zeroed()) as _, opt.unwrap_or(core::mem::zeroed()) as _, pvcallbackcontext.unwrap_or(core::mem::zeroed()) as _, pqueryconvertolelinkcallback.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com_StructuredStorage"))] #[inline] @@ -281,7 +281,7 @@ 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); - unsafe { OleConvertOLESTREAMToIStorageEx2(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() } + unsafe { OleConvertOLESTREAMToIStorageEx2(polestm, pstg.param().abi(), pcfformat as _, plwwidth as _, plheight as _, pdwsize as _, core::mem::transmute(pmedium), opt.unwrap_or(core::mem::zeroed()) as _, pvcallbackcontext.unwrap_or(core::mem::zeroed()) as _, pqueryconvertolelinkcallback.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_Com_StructuredStorage")] #[inline] @@ -291,7 +291,7 @@ where P5: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn OleCreate(rclsid : *const windows_core::GUID, riid : *const windows_core::GUID, renderopt : u32, pformatetc : *const super::Com:: FORMATETC, pclientsite : * mut core::ffi::c_void, pstg : * mut core::ffi::c_void, ppvobj : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { OleCreate(rclsid, riid, renderopt.0 as _, pformatetc, pclientsite.param().abi(), pstg.param().abi(), core::mem::transmute(ppvobj)).ok() } + unsafe { OleCreate(rclsid, riid, renderopt.0 as _, pformatetc, pclientsite.param().abi(), pstg.param().abi(), ppvobj as _).ok() } } #[inline] pub unsafe fn OleCreateDefaultHandler(clsid: *const windows_core::GUID, punkouter: P1, riid: *const windows_core::GUID, lplpobj: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -299,7 +299,7 @@ where P1: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn OleCreateDefaultHandler(clsid : *const windows_core::GUID, punkouter : * mut core::ffi::c_void, riid : *const windows_core::GUID, lplpobj : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { OleCreateDefaultHandler(clsid, punkouter.param().abi(), riid, core::mem::transmute(lplpobj)).ok() } + unsafe { OleCreateDefaultHandler(clsid, punkouter.param().abi(), riid, lplpobj as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -309,7 +309,7 @@ where P3: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn OleCreateEmbeddingHelper(clsid : *const windows_core::GUID, punkouter : * mut core::ffi::c_void, flags : EMBDHLP_FLAGS, pcf : * mut core::ffi::c_void, riid : *const windows_core::GUID, lplpobj : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { OleCreateEmbeddingHelper(clsid, punkouter.param().abi(), flags, pcf.param().abi(), riid, core::mem::transmute(lplpobj)).ok() } + unsafe { OleCreateEmbeddingHelper(clsid, punkouter.param().abi(), flags, pcf.param().abi(), riid, lplpobj as _).ok() } } #[cfg(feature = "Win32_System_Com_StructuredStorage")] #[inline] @@ -320,13 +320,13 @@ where P10: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn OleCreateEx(rclsid : *const windows_core::GUID, riid : *const windows_core::GUID, dwflags : OLECREATE, renderopt : u32, cformats : u32, rgadvf : *const u32, rgformatetc : *const super::Com:: FORMATETC, lpadvisesink : * mut core::ffi::c_void, rgdwconnection : *mut u32, pclientsite : * mut core::ffi::c_void, pstg : * mut core::ffi::c_void, ppvobj : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { OleCreateEx(rclsid, riid, dwflags, renderopt.0 as _, cformats, rgadvf, rgformatetc, lpadvisesink.param().abi(), core::mem::transmute(rgdwconnection), pclientsite.param().abi(), pstg.param().abi(), core::mem::transmute(ppvobj)).ok() } + unsafe { OleCreateEx(rclsid, riid, dwflags, renderopt.0 as _, cformats, rgadvf, rgformatetc, lpadvisesink.param().abi(), rgdwconnection as _, pclientsite.param().abi(), pstg.param().abi(), ppvobj as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn OleCreateFontIndirect(lpfontdesc: *const FONTDESC, riid: *const windows_core::GUID, lplpvobj: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("oleaut32.dll" "system" fn OleCreateFontIndirect(lpfontdesc : *const FONTDESC, riid : *const windows_core::GUID, lplpvobj : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { OleCreateFontIndirect(lpfontdesc, riid, core::mem::transmute(lplpvobj)).ok() } + unsafe { OleCreateFontIndirect(lpfontdesc, riid, lplpvobj as _).ok() } } #[cfg(feature = "Win32_System_Com_StructuredStorage")] #[inline] @@ -337,7 +337,7 @@ where P5: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn OleCreateFromData(psrcdataobj : * mut core::ffi::c_void, riid : *const windows_core::GUID, renderopt : u32, pformatetc : *const super::Com:: FORMATETC, pclientsite : * mut core::ffi::c_void, pstg : * mut core::ffi::c_void, ppvobj : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { OleCreateFromData(psrcdataobj.param().abi(), riid, renderopt.0 as _, pformatetc, pclientsite.param().abi(), pstg.param().abi(), core::mem::transmute(ppvobj)).ok() } + unsafe { OleCreateFromData(psrcdataobj.param().abi(), riid, renderopt.0 as _, pformatetc, pclientsite.param().abi(), pstg.param().abi(), ppvobj as _).ok() } } #[cfg(feature = "Win32_System_Com_StructuredStorage")] #[inline] @@ -349,7 +349,7 @@ where P10: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn OleCreateFromDataEx(psrcdataobj : * mut core::ffi::c_void, riid : *const windows_core::GUID, dwflags : OLECREATE, renderopt : u32, cformats : u32, rgadvf : *const u32, rgformatetc : *const super::Com:: FORMATETC, lpadvisesink : * mut core::ffi::c_void, rgdwconnection : *mut u32, pclientsite : * mut core::ffi::c_void, pstg : * mut core::ffi::c_void, ppvobj : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { OleCreateFromDataEx(psrcdataobj.param().abi(), riid, dwflags, renderopt.0 as _, cformats, rgadvf, rgformatetc, lpadvisesink.param().abi(), core::mem::transmute(rgdwconnection), pclientsite.param().abi(), pstg.param().abi(), core::mem::transmute(ppvobj)).ok() } + unsafe { OleCreateFromDataEx(psrcdataobj.param().abi(), riid, dwflags, renderopt.0 as _, cformats, rgadvf, rgformatetc, lpadvisesink.param().abi(), rgdwconnection as _, pclientsite.param().abi(), pstg.param().abi(), ppvobj as _).ok() } } #[cfg(feature = "Win32_System_Com_StructuredStorage")] #[inline] @@ -360,7 +360,7 @@ where P6: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn OleCreateFromFile(rclsid : *const windows_core::GUID, lpszfilename : windows_core::PCWSTR, riid : *const windows_core::GUID, renderopt : u32, lpformatetc : *const super::Com:: FORMATETC, pclientsite : * mut core::ffi::c_void, pstg : * mut core::ffi::c_void, ppvobj : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { OleCreateFromFile(rclsid, lpszfilename.param().abi(), riid, renderopt.0 as _, lpformatetc, pclientsite.param().abi(), pstg.param().abi(), core::mem::transmute(ppvobj)).ok() } + unsafe { OleCreateFromFile(rclsid, lpszfilename.param().abi(), riid, renderopt.0 as _, lpformatetc, pclientsite.param().abi(), pstg.param().abi(), ppvobj as _).ok() } } #[cfg(feature = "Win32_System_Com_StructuredStorage")] #[inline] @@ -372,7 +372,7 @@ where P11: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn OleCreateFromFileEx(rclsid : *const windows_core::GUID, lpszfilename : windows_core::PCWSTR, riid : *const windows_core::GUID, dwflags : OLECREATE, renderopt : u32, cformats : u32, rgadvf : *const u32, rgformatetc : *const super::Com:: FORMATETC, lpadvisesink : * mut core::ffi::c_void, rgdwconnection : *mut u32, pclientsite : * mut core::ffi::c_void, pstg : * mut core::ffi::c_void, ppvobj : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { OleCreateFromFileEx(rclsid, lpszfilename.param().abi(), riid, dwflags, renderopt.0 as _, cformats, rgadvf, rgformatetc, lpadvisesink.param().abi(), core::mem::transmute(rgdwconnection), pclientsite.param().abi(), pstg.param().abi(), core::mem::transmute(ppvobj)).ok() } + unsafe { OleCreateFromFileEx(rclsid, lpszfilename.param().abi(), riid, dwflags, renderopt.0 as _, cformats, rgadvf, rgformatetc, lpadvisesink.param().abi(), rgdwconnection as _, pclientsite.param().abi(), pstg.param().abi(), ppvobj as _).ok() } } #[cfg(feature = "Win32_System_Com_StructuredStorage")] #[inline] @@ -383,7 +383,7 @@ where P5: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn OleCreateLink(pmklinksrc : * mut core::ffi::c_void, riid : *const windows_core::GUID, renderopt : u32, lpformatetc : *const super::Com:: FORMATETC, pclientsite : * mut core::ffi::c_void, pstg : * mut core::ffi::c_void, ppvobj : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { OleCreateLink(pmklinksrc.param().abi(), riid, renderopt.0 as _, lpformatetc, pclientsite.param().abi(), pstg.param().abi(), core::mem::transmute(ppvobj)).ok() } + unsafe { OleCreateLink(pmklinksrc.param().abi(), riid, renderopt.0 as _, lpformatetc, pclientsite.param().abi(), pstg.param().abi(), ppvobj as _).ok() } } #[cfg(feature = "Win32_System_Com_StructuredStorage")] #[inline] @@ -395,7 +395,7 @@ where P10: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn OleCreateLinkEx(pmklinksrc : * mut core::ffi::c_void, riid : *const windows_core::GUID, dwflags : OLECREATE, renderopt : u32, cformats : u32, rgadvf : *const u32, rgformatetc : *const super::Com:: FORMATETC, lpadvisesink : * mut core::ffi::c_void, rgdwconnection : *mut u32, pclientsite : * mut core::ffi::c_void, pstg : * mut core::ffi::c_void, ppvobj : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { OleCreateLinkEx(pmklinksrc.param().abi(), riid, dwflags, renderopt.0 as _, cformats, rgadvf, rgformatetc, lpadvisesink.param().abi(), core::mem::transmute(rgdwconnection), pclientsite.param().abi(), pstg.param().abi(), core::mem::transmute(ppvobj)).ok() } + unsafe { OleCreateLinkEx(pmklinksrc.param().abi(), riid, dwflags, renderopt.0 as _, cformats, rgadvf, rgformatetc, lpadvisesink.param().abi(), rgdwconnection as _, pclientsite.param().abi(), pstg.param().abi(), ppvobj as _).ok() } } #[cfg(feature = "Win32_System_Com_StructuredStorage")] #[inline] @@ -406,7 +406,7 @@ where P5: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn OleCreateLinkFromData(psrcdataobj : * mut core::ffi::c_void, riid : *const windows_core::GUID, renderopt : u32, pformatetc : *const super::Com:: FORMATETC, pclientsite : * mut core::ffi::c_void, pstg : * mut core::ffi::c_void, ppvobj : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { OleCreateLinkFromData(psrcdataobj.param().abi(), riid, renderopt.0 as _, pformatetc, pclientsite.param().abi(), pstg.param().abi(), core::mem::transmute(ppvobj)).ok() } + unsafe { OleCreateLinkFromData(psrcdataobj.param().abi(), riid, renderopt.0 as _, pformatetc, pclientsite.param().abi(), pstg.param().abi(), ppvobj as _).ok() } } #[cfg(feature = "Win32_System_Com_StructuredStorage")] #[inline] @@ -418,7 +418,7 @@ where P10: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn OleCreateLinkFromDataEx(psrcdataobj : * mut core::ffi::c_void, riid : *const windows_core::GUID, dwflags : OLECREATE, renderopt : u32, cformats : u32, rgadvf : *const u32, rgformatetc : *const super::Com:: FORMATETC, lpadvisesink : * mut core::ffi::c_void, rgdwconnection : *mut u32, pclientsite : * mut core::ffi::c_void, pstg : * mut core::ffi::c_void, ppvobj : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { OleCreateLinkFromDataEx(psrcdataobj.param().abi(), riid, dwflags, renderopt.0 as _, cformats, rgadvf, rgformatetc, lpadvisesink.param().abi(), core::mem::transmute(rgdwconnection), pclientsite.param().abi(), pstg.param().abi(), core::mem::transmute(ppvobj)).ok() } + unsafe { OleCreateLinkFromDataEx(psrcdataobj.param().abi(), riid, dwflags, renderopt.0 as _, cformats, rgadvf, rgformatetc, lpadvisesink.param().abi(), rgdwconnection as _, pclientsite.param().abi(), pstg.param().abi(), ppvobj as _).ok() } } #[cfg(feature = "Win32_System_Com_StructuredStorage")] #[inline] @@ -429,7 +429,7 @@ where P5: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn OleCreateLinkToFile(lpszfilename : windows_core::PCWSTR, riid : *const windows_core::GUID, renderopt : u32, lpformatetc : *const super::Com:: FORMATETC, pclientsite : * mut core::ffi::c_void, pstg : * mut core::ffi::c_void, ppvobj : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { OleCreateLinkToFile(lpszfilename.param().abi(), riid, renderopt.0 as _, lpformatetc, pclientsite.param().abi(), pstg.param().abi(), core::mem::transmute(ppvobj)).ok() } + unsafe { OleCreateLinkToFile(lpszfilename.param().abi(), riid, renderopt.0 as _, lpformatetc, pclientsite.param().abi(), pstg.param().abi(), ppvobj as _).ok() } } #[cfg(feature = "Win32_System_Com_StructuredStorage")] #[inline] @@ -441,7 +441,7 @@ where P10: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn OleCreateLinkToFileEx(lpszfilename : windows_core::PCWSTR, riid : *const windows_core::GUID, dwflags : OLECREATE, renderopt : u32, cformats : u32, rgadvf : *const u32, rgformatetc : *const super::Com:: FORMATETC, lpadvisesink : * mut core::ffi::c_void, rgdwconnection : *mut u32, pclientsite : * mut core::ffi::c_void, pstg : * mut core::ffi::c_void, ppvobj : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { OleCreateLinkToFileEx(lpszfilename.param().abi(), riid, dwflags, renderopt.0 as _, cformats, rgadvf, rgformatetc, lpadvisesink.param().abi(), core::mem::transmute(rgdwconnection), pclientsite.param().abi(), pstg.param().abi(), core::mem::transmute(ppvobj)).ok() } + unsafe { OleCreateLinkToFileEx(lpszfilename.param().abi(), riid, dwflags, renderopt.0 as _, cformats, rgadvf, rgformatetc, lpadvisesink.param().abi(), rgdwconnection as _, pclientsite.param().abi(), pstg.param().abi(), ppvobj as _).ok() } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -465,7 +465,7 @@ where 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); - unsafe { OleCreatePropertyFrame(hwndowner, x, y, lpszcaption.param().abi(), cobjects, core::mem::transmute(ppunk), cpages, ppageclsid, lcid, core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { OleCreatePropertyFrame(hwndowner, x, y, lpszcaption.param().abi(), cobjects, core::mem::transmute(ppunk), cpages, ppageclsid, lcid, dwreserved.unwrap_or(core::mem::zeroed()) as _, pvreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn OleCreatePropertyFrameIndirect(lpparams: *const OCPFIPARAMS) -> windows_core::Result<()> { @@ -481,7 +481,7 @@ where P5: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn OleCreateStaticFromData(psrcdataobj : * mut core::ffi::c_void, iid : *const windows_core::GUID, renderopt : u32, pformatetc : *const super::Com:: FORMATETC, pclientsite : * mut core::ffi::c_void, pstg : * mut core::ffi::c_void, ppvobj : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { OleCreateStaticFromData(psrcdataobj.param().abi(), iid, renderopt.0 as _, pformatetc, pclientsite.param().abi(), pstg.param().abi(), core::mem::transmute(ppvobj)).ok() } + unsafe { OleCreateStaticFromData(psrcdataobj.param().abi(), iid, renderopt.0 as _, pformatetc, pclientsite.param().abi(), pstg.param().abi(), ppvobj as _).ok() } } #[inline] pub unsafe fn OleDestroyMenuDescriptor(holemenu: isize) -> windows_core::Result<()> { @@ -541,7 +541,7 @@ pub unsafe fn OleGetClipboard() -> windows_core::Result #[inline] pub unsafe fn OleGetClipboardWithEnterpriseInfo(dataobject: *mut Option, dataenterpriseid: *mut windows_core::PWSTR, sourcedescription: *mut windows_core::PWSTR, targetdescription: *mut windows_core::PWSTR, datadescription: *mut windows_core::PWSTR) -> windows_core::Result<()> { windows_targets::link!("ole32.dll" "system" fn OleGetClipboardWithEnterpriseInfo(dataobject : *mut * mut core::ffi::c_void, dataenterpriseid : *mut windows_core::PWSTR, sourcedescription : *mut windows_core::PWSTR, targetdescription : *mut windows_core::PWSTR, datadescription : *mut windows_core::PWSTR) -> windows_core::HRESULT); - unsafe { OleGetClipboardWithEnterpriseInfo(core::mem::transmute(dataobject), core::mem::transmute(dataenterpriseid), core::mem::transmute(sourcedescription), core::mem::transmute(targetdescription), core::mem::transmute(datadescription)).ok() } + unsafe { OleGetClipboardWithEnterpriseInfo(core::mem::transmute(dataobject), dataenterpriseid as _, sourcedescription as _, targetdescription as _, datadescription as _).ok() } } #[inline] pub unsafe fn OleGetIconOfClass(rclsid: *const windows_core::GUID, lpszlabel: P1, fusetypeaslabel: bool) -> super::super::Foundation::HGLOBAL @@ -568,7 +568,7 @@ pub unsafe fn OleIconToCursor(hinstexe: super::super::Foundation::HINSTANCE, hic #[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); - unsafe { OleInitialize(core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { OleInitialize(pvreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -595,7 +595,7 @@ where P2: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn OleLoad(pstg : * mut core::ffi::c_void, riid : *const windows_core::GUID, pclientsite : * mut core::ffi::c_void, ppvobj : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { OleLoad(pstg.param().abi(), riid, pclientsite.param().abi(), core::mem::transmute(ppvobj)).ok() } + unsafe { OleLoad(pstg.param().abi(), riid, pclientsite.param().abi(), ppvobj as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -604,7 +604,7 @@ where P0: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn OleLoadFromStream(pstm : * mut core::ffi::c_void, iidinterface : *const windows_core::GUID, ppvobj : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { OleLoadFromStream(pstm.param().abi(), iidinterface, core::mem::transmute(ppvobj)).ok() } + unsafe { OleLoadFromStream(pstm.param().abi(), iidinterface, ppvobj as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -613,7 +613,7 @@ where P0: windows_core::Param, { windows_targets::link!("oleaut32.dll" "system" fn OleLoadPicture(lpstream : * mut core::ffi::c_void, lsize : i32, frunmode : super::super::Foundation:: BOOL, riid : *const windows_core::GUID, lplpvobj : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { OleLoadPicture(lpstream.param().abi(), lsize, frunmode.into(), riid, core::mem::transmute(lplpvobj)).ok() } + unsafe { OleLoadPicture(lpstream.param().abi(), lsize, frunmode.into(), riid, lplpvobj as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -622,7 +622,7 @@ where P0: windows_core::Param, { windows_targets::link!("oleaut32.dll" "system" fn OleLoadPictureEx(lpstream : * mut core::ffi::c_void, lsize : i32, frunmode : super::super::Foundation:: BOOL, riid : *const windows_core::GUID, xsizedesired : u32, ysizedesired : u32, dwflags : LOAD_PICTURE_FLAGS, lplpvobj : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { OleLoadPictureEx(lpstream.param().abi(), lsize, frunmode.into(), riid, xsizedesired, ysizedesired, dwflags, core::mem::transmute(lplpvobj)).ok() } + unsafe { OleLoadPictureEx(lpstream.param().abi(), lsize, frunmode.into(), riid, xsizedesired, ysizedesired, dwflags, lplpvobj as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Variant"))] #[inline] @@ -649,7 +649,7 @@ where 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); - unsafe { OleLoadPicturePath(szurlorpath.param().abi(), punkcaller.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), clrreserved, riid, core::mem::transmute(ppvret)).ok() } + unsafe { OleLoadPicturePath(szurlorpath.param().abi(), punkcaller.param().abi(), dwreserved.unwrap_or(core::mem::zeroed()) as _, clrreserved, riid, ppvret as _).ok() } } #[inline] pub unsafe fn OleLockRunning(punknown: P0, flock: bool, flastunlockcloses: bool) -> windows_core::Result<()> @@ -823,7 +823,7 @@ where P1: 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); - unsafe { OleUIAddVerbMenuA(lpoleobj.param().abi(), lpszshorttype.param().abi(), hmenu, upos, uidverbmin, uidverbmax, baddconvert.into(), idconvert, core::mem::transmute(lphmenu)) } + unsafe { OleUIAddVerbMenuA(lpoleobj.param().abi(), lpszshorttype.param().abi(), hmenu, upos, uidverbmin, uidverbmax, baddconvert.into(), idconvert, lphmenu as _) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -833,7 +833,7 @@ where P1: 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); - unsafe { OleUIAddVerbMenuW(lpoleobj.param().abi(), lpszshorttype.param().abi(), hmenu, upos, uidverbmin, uidverbmax, baddconvert.into(), idconvert, core::mem::transmute(lphmenu)) } + unsafe { OleUIAddVerbMenuW(lpoleobj.param().abi(), lpszshorttype.param().abi(), hmenu, upos, uidverbmin, uidverbmax, baddconvert.into(), idconvert, lphmenu as _) } } #[cfg(feature = "Win32_Media")] #[inline] @@ -977,7 +977,7 @@ where P0: windows_core::Param, { windows_targets::link!("oleaut32.dll" "system" fn RegisterActiveObject(punk : * mut core::ffi::c_void, rclsid : *const windows_core::GUID, dwflags : ACTIVEOBJECT_FLAGS, pdwregister : *mut u32) -> windows_core::HRESULT); - unsafe { RegisterActiveObject(punk.param().abi(), rclsid, dwflags, core::mem::transmute(pdwregister)).ok() } + unsafe { RegisterActiveObject(punk.param().abi(), rclsid, dwflags, pdwregister as _).ok() } } #[inline] pub unsafe fn RegisterDragDrop(hwnd: super::super::Foundation::HWND, pdroptarget: P1) -> windows_core::Result<()> @@ -1018,7 +1018,7 @@ pub unsafe fn ReleaseStgMedium(param0: *mut super::Com::STGMEDIUM) { #[inline] pub unsafe fn RevokeActiveObject(dwregister: u32, pvreserved: Option<*mut core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("oleaut32.dll" "system" fn RevokeActiveObject(dwregister : u32, pvreserved : *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { RevokeActiveObject(dwregister, core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { RevokeActiveObject(dwregister, pvreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn RevokeDragDrop(hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { @@ -1029,13 +1029,13 @@ pub unsafe fn RevokeDragDrop(hwnd: super::super::Foundation::HWND) -> windows_co #[inline] pub unsafe fn SafeArrayAccessData(psa: *const super::Com::SAFEARRAY, ppvdata: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("oleaut32.dll" "system" fn SafeArrayAccessData(psa : *const super::Com:: SAFEARRAY, ppvdata : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { SafeArrayAccessData(psa, core::mem::transmute(ppvdata)).ok() } + unsafe { SafeArrayAccessData(psa, ppvdata as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn SafeArrayAddRef(psa: *const super::Com::SAFEARRAY, ppdatatorelease: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("oleaut32.dll" "system" fn SafeArrayAddRef(psa : *const super::Com:: SAFEARRAY, ppdatatorelease : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { SafeArrayAddRef(psa, core::mem::transmute(ppdatatorelease)).ok() } + unsafe { SafeArrayAddRef(psa, ppdatatorelease as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -1128,7 +1128,7 @@ pub unsafe fn SafeArrayGetDim(psa: *const super::Com::SAFEARRAY) -> u32 { #[inline] pub unsafe fn SafeArrayGetElement(psa: *const super::Com::SAFEARRAY, rgindices: *const i32, pv: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("oleaut32.dll" "system" fn SafeArrayGetElement(psa : *const super::Com:: SAFEARRAY, rgindices : *const i32, pv : *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { SafeArrayGetElement(psa, rgindices, core::mem::transmute(pv)).ok() } + unsafe { SafeArrayGetElement(psa, rgindices, pv as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -1191,7 +1191,7 @@ pub unsafe fn SafeArrayLock(psa: *const super::Com::SAFEARRAY) -> windows_core:: #[inline] pub unsafe fn SafeArrayPtrOfIndex(psa: *const super::Com::SAFEARRAY, rgindices: *const i32, ppvdata: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("oleaut32.dll" "system" fn SafeArrayPtrOfIndex(psa : *const super::Com:: SAFEARRAY, rgindices : *const i32, ppvdata : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { SafeArrayPtrOfIndex(psa, rgindices, core::mem::transmute(ppvdata)).ok() } + unsafe { SafeArrayPtrOfIndex(psa, rgindices, ppvdata as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -1203,7 +1203,7 @@ pub unsafe fn SafeArrayPutElement(psa: *const super::Com::SAFEARRAY, rgindices: #[inline] pub unsafe fn SafeArrayRedim(psa: *mut super::Com::SAFEARRAY, psaboundnew: *const super::Com::SAFEARRAYBOUND) -> windows_core::Result<()> { windows_targets::link!("oleaut32.dll" "system" fn SafeArrayRedim(psa : *mut super::Com:: SAFEARRAY, psaboundnew : *const super::Com:: SAFEARRAYBOUND) -> windows_core::HRESULT); - unsafe { SafeArrayRedim(core::mem::transmute(psa), psaboundnew).ok() } + unsafe { SafeArrayRedim(psa as _, psaboundnew).ok() } } #[inline] pub unsafe fn SafeArrayReleaseData(pdata: *const core::ffi::c_void) { @@ -2339,7 +2339,7 @@ pub unsafe fn VarI2FromBool(boolin: super::super::Foundation::VARIANT_BOOL) -> w #[inline] pub unsafe fn VarI2FromCy(cyin: super::Com::CY, psout: *mut i16) -> windows_core::Result<()> { windows_targets::link!("oleaut32.dll" "system" fn VarI2FromCy(cyin : super::Com:: CY, psout : *mut i16) -> windows_core::HRESULT); - unsafe { VarI2FromCy(core::mem::transmute(cyin), core::mem::transmute(psout)).ok() } + unsafe { VarI2FromCy(core::mem::transmute(cyin), psout as _).ok() } } #[inline] pub unsafe fn VarI2FromDate(datein: f64) -> windows_core::Result { @@ -2795,7 +2795,7 @@ where P0: windows_core::Param, { windows_targets::link!("oleaut32.dll" "system" fn VarParseNumFromStr(strin : windows_core::PCWSTR, lcid : u32, dwflags : u32, pnumprs : *mut NUMPARSE, rgbdig : *mut u8) -> windows_core::HRESULT); - unsafe { VarParseNumFromStr(strin.param().abi(), lcid, dwflags, core::mem::transmute(pnumprs), core::mem::transmute(rgbdig)).ok() } + unsafe { VarParseNumFromStr(strin.param().abi(), lcid, dwflags, pnumprs as _, rgbdig as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Variant"))] #[inline] @@ -2823,7 +2823,7 @@ pub unsafe fn VarR4FromBool(boolin: super::super::Foundation::VARIANT_BOOL) -> w #[inline] pub unsafe fn VarR4FromCy(cyin: super::Com::CY, pfltout: *mut f32) -> windows_core::Result<()> { windows_targets::link!("oleaut32.dll" "system" fn VarR4FromCy(cyin : super::Com:: CY, pfltout : *mut f32) -> windows_core::HRESULT); - unsafe { VarR4FromCy(core::mem::transmute(cyin), core::mem::transmute(pfltout)).ok() } + unsafe { VarR4FromCy(core::mem::transmute(cyin), pfltout as _).ok() } } #[inline] pub unsafe fn VarR4FromDate(datein: f64) -> windows_core::Result { @@ -2948,7 +2948,7 @@ pub unsafe fn VarR8FromBool(boolin: super::super::Foundation::VARIANT_BOOL) -> w #[inline] pub unsafe fn VarR8FromCy(cyin: super::Com::CY, pdblout: *mut f64) -> windows_core::Result<()> { windows_targets::link!("oleaut32.dll" "system" fn VarR8FromCy(cyin : super::Com:: CY, pdblout : *mut f64) -> windows_core::HRESULT); - unsafe { VarR8FromCy(core::mem::transmute(cyin), core::mem::transmute(pdblout)).ok() } + unsafe { VarR8FromCy(core::mem::transmute(cyin), pdblout as _).ok() } } #[inline] pub unsafe fn VarR8FromDate(datein: f64) -> windows_core::Result { @@ -2981,7 +2981,7 @@ where #[inline] pub unsafe fn VarR8FromI1(cin: i8, pdblout: *mut f64) -> windows_core::Result<()> { windows_targets::link!("oleaut32.dll" "system" fn VarR8FromI1(cin : i8, pdblout : *mut f64) -> windows_core::HRESULT); - unsafe { VarR8FromI1(cin, core::mem::transmute(pdblout)).ok() } + unsafe { VarR8FromI1(cin, pdblout as _).ok() } } #[inline] pub unsafe fn VarR8FromI2(sin: i16) -> windows_core::Result { @@ -3098,7 +3098,7 @@ where P0: windows_core::Param, { windows_targets::link!("oleaut32.dll" "system" fn VarTokenizeFormatString(pstrformat : windows_core::PCWSTR, rgbtok : *mut u8, cbtok : i32, ifirstday : VARFORMAT_FIRST_DAY, ifirstweek : VARFORMAT_FIRST_WEEK, lcid : u32, pcbactual : *const i32) -> windows_core::HRESULT); - unsafe { VarTokenizeFormatString(pstrformat.param().abi(), core::mem::transmute(rgbtok.as_ptr()), rgbtok.len().try_into().unwrap(), ifirstday, ifirstweek, lcid, core::mem::transmute(pcbactual.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { VarTokenizeFormatString(pstrformat.param().abi(), core::mem::transmute(rgbtok.as_ptr()), rgbtok.len().try_into().unwrap(), ifirstday, ifirstweek, lcid, pcbactual.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn VarUI1FromBool(boolin: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { @@ -3316,7 +3316,7 @@ pub unsafe fn VarUI2FromR4(fltin: f32) -> windows_core::Result { #[inline] pub unsafe fn VarUI2FromR8(dblin: f64, puiout: *mut u16) -> windows_core::Result<()> { windows_targets::link!("oleaut32.dll" "system" fn VarUI2FromR8(dblin : f64, puiout : *mut u16) -> windows_core::HRESULT); - unsafe { VarUI2FromR8(dblin, core::mem::transmute(puiout)).ok() } + unsafe { VarUI2FromR8(dblin, puiout as _).ok() } } #[inline] pub unsafe fn VarUI2FromStr(strin: P0, lcid: u32, dwflags: u32) -> windows_core::Result @@ -3604,7 +3604,7 @@ pub unsafe fn VarUI8FromUI4(ulin: u32) -> windows_core::Result { #[inline] pub unsafe fn VarUdateFromDate(datein: f64, dwflags: u32, pudateout: *mut UDATE) -> windows_core::Result<()> { windows_targets::link!("oleaut32.dll" "system" fn VarUdateFromDate(datein : f64, dwflags : u32, pudateout : *mut UDATE) -> windows_core::HRESULT); - unsafe { VarUdateFromDate(datein, dwflags, core::mem::transmute(pudateout)).ok() } + unsafe { VarUdateFromDate(datein, dwflags, pudateout as _).ok() } } #[inline] pub unsafe fn VarWeekdayName(iweekday: i32, fabbrev: i32, ifirstday: i32, dwflags: u32) -> windows_core::Result { @@ -4428,7 +4428,7 @@ windows_core::imp::interface_hierarchy!(IClassFactory2, windows_core::IUnknown, #[cfg(feature = "Win32_System_Com")] impl IClassFactory2 { pub unsafe fn GetLicInfo(&self, plicinfo: *mut LICINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLicInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(plicinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLicInfo)(windows_core::Interface::as_raw(self), plicinfo as _).ok() } } pub unsafe fn RequestLicKey(&self, dwreserved: u32) -> windows_core::Result { unsafe { @@ -5670,7 +5670,7 @@ impl IDispError { } } pub unsafe fn GetHelpInfo(&self, pbstrfilename: *mut windows_core::BSTR, pdwcontext: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetHelpInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrfilename), core::mem::transmute(pdwcontext)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetHelpInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrfilename), pdwcontext as _).ok() } } pub unsafe fn GetDescription(&self) -> windows_core::Result { unsafe { @@ -5804,7 +5804,7 @@ impl IDispatchEx { where P6: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).InvokeEx)(windows_core::Interface::as_raw(self), id, lcid, wflags, pdp, core::mem::transmute(pvarres.unwrap_or(core::mem::zeroed())), core::mem::transmute(pei.unwrap_or(core::mem::zeroed())), pspcaller.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).InvokeEx)(windows_core::Interface::as_raw(self), id, lcid, wflags, pdp, pvarres.unwrap_or(core::mem::zeroed()) as _, pei.unwrap_or(core::mem::zeroed()) as _, pspcaller.param().abi()).ok() } } pub unsafe fn DeleteMemberByName(&self, bstrname: &windows_core::BSTR, grfdex: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DeleteMemberByName)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrname), grfdex).ok() } @@ -6068,11 +6068,11 @@ impl IDropTarget { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DragEnter)(windows_core::Interface::as_raw(self), pdataobj.param().abi(), grfkeystate, core::mem::transmute(pt), core::mem::transmute(pdweffect)).ok() } + unsafe { (windows_core::Interface::vtable(self).DragEnter)(windows_core::Interface::as_raw(self), pdataobj.param().abi(), grfkeystate, core::mem::transmute(pt), pdweffect as _).ok() } } #[cfg(feature = "Win32_System_SystemServices")] pub unsafe fn DragOver(&self, grfkeystate: super::SystemServices::MODIFIERKEYS_FLAGS, pt: super::super::Foundation::POINTL, pdweffect: *mut DROPEFFECT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DragOver)(windows_core::Interface::as_raw(self), grfkeystate, core::mem::transmute(pt), core::mem::transmute(pdweffect)).ok() } + unsafe { (windows_core::Interface::vtable(self).DragOver)(windows_core::Interface::as_raw(self), grfkeystate, core::mem::transmute(pt), pdweffect as _).ok() } } pub unsafe fn DragLeave(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DragLeave)(windows_core::Interface::as_raw(self)).ok() } @@ -6082,7 +6082,7 @@ impl IDropTarget { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Drop)(windows_core::Interface::as_raw(self), pdataobj.param().abi(), grfkeystate, core::mem::transmute(pt), core::mem::transmute(pdweffect)).ok() } + unsafe { (windows_core::Interface::vtable(self).Drop)(windows_core::Interface::as_raw(self), pdataobj.param().abi(), grfkeystate, core::mem::transmute(pt), pdweffect as _).ok() } } } #[repr(C)] @@ -6212,7 +6212,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -6296,7 +6296,7 @@ windows_core::imp::define_interface!(IEnumOleDocumentViews, IEnumOleDocumentView windows_core::imp::interface_hierarchy!(IEnumOleDocumentViews, windows_core::IUnknown); impl IEnumOleDocumentViews { pub unsafe fn Next(&self, cviews: u32, rgpview: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), cviews, core::mem::transmute(rgpview), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), cviews, core::mem::transmute(rgpview), pcfetched as _).ok() } } pub unsafe fn Skip(&self, cviews: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), cviews).ok() } @@ -6374,7 +6374,7 @@ windows_core::imp::define_interface!(IEnumOleUndoUnits, IEnumOleUndoUnits_Vtbl, windows_core::imp::interface_hierarchy!(IEnumOleUndoUnits, windows_core::IUnknown); impl IEnumOleUndoUnits { pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: *mut u32) -> windows_core::HRESULT { - unsafe { (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)) } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _) } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -6453,7 +6453,7 @@ windows_core::imp::interface_hierarchy!(IEnumVARIANT, windows_core::IUnknown); impl IEnumVARIANT { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Variant"))] pub unsafe fn Next(&self, rgvar: &mut [super::Variant::VARIANT], pceltfetched: *mut u32) -> windows_core::HRESULT { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgvar.len().try_into().unwrap(), core::mem::transmute(rgvar.as_ptr()), core::mem::transmute(pceltfetched)) } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgvar.len().try_into().unwrap(), core::mem::transmute(rgvar.as_ptr()), pceltfetched as _) } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt) } @@ -6634,7 +6634,7 @@ impl IFont { } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn QueryTextMetrics(&self, ptm: *mut super::super::Graphics::Gdi::TEXTMETRICW) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryTextMetrics)(windows_core::Interface::as_raw(self), core::mem::transmute(ptm)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryTextMetrics)(windows_core::Interface::as_raw(self), ptm as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn AddRefHfont(&self, hfont: super::super::Graphics::Gdi::HFONT) -> windows_core::Result<()> { @@ -7033,7 +7033,7 @@ windows_core::imp::define_interface!(IGetOleObject, IGetOleObject_Vtbl, 0x8a701d windows_core::imp::interface_hierarchy!(IGetOleObject, windows_core::IUnknown); impl IGetOleObject { pub unsafe fn GetOleObject(&self, riid: *const windows_core::GUID, ppvobj: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOleObject)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(ppvobj)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOleObject)(windows_core::Interface::as_raw(self), riid, ppvobj as _).ok() } } } #[repr(C)] @@ -7063,7 +7063,7 @@ windows_core::imp::define_interface!(IGetVBAObject, IGetVBAObject_Vtbl, 0x91733a windows_core::imp::interface_hierarchy!(IGetVBAObject, windows_core::IUnknown); impl IGetVBAObject { pub unsafe fn GetObject(&self, riid: *const windows_core::GUID, ppvobj: *mut *mut core::ffi::c_void, dwreserved: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetObject)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(ppvobj), dwreserved).ok() } + unsafe { (windows_core::Interface::vtable(self).GetObject)(windows_core::Interface::as_raw(self), riid, ppvobj as _, dwreserved).ok() } } } #[repr(C)] @@ -7503,7 +7503,7 @@ impl IOleCache2 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).UpdateCache)(windows_core::Interface::as_raw(self), pdataobject.param().abi(), grfupdf, core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).UpdateCache)(windows_core::Interface::as_raw(self), pdataobject.param().abi(), grfupdf, preserved.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn DiscardCache(&self, dwdiscardoptions: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DiscardCache)(windows_core::Interface::as_raw(self), dwdiscardoptions).ok() } @@ -7719,7 +7719,7 @@ windows_core::imp::define_interface!(IOleCommandTarget, IOleCommandTarget_Vtbl, windows_core::imp::interface_hierarchy!(IOleCommandTarget, windows_core::IUnknown); impl IOleCommandTarget { pub unsafe fn QueryStatus(&self, pguidcmdgroup: *const windows_core::GUID, ccmds: u32, prgcmds: *mut OLECMD, pcmdtext: *mut OLECMDTEXT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryStatus)(windows_core::Interface::as_raw(self), pguidcmdgroup, ccmds, core::mem::transmute(prgcmds), core::mem::transmute(pcmdtext)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryStatus)(windows_core::Interface::as_raw(self), pguidcmdgroup, ccmds, prgcmds as _, pcmdtext as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Variant"))] pub unsafe fn Exec(&self, pguidcmdgroup: *const windows_core::GUID, ncmdid: u32, ncmdexecopt: u32, pvain: *const super::Variant::VARIANT, pvaout: *mut super::Variant::VARIANT) -> windows_core::Result<()> { @@ -7835,7 +7835,7 @@ windows_core::imp::interface_hierarchy!(IOleControl, windows_core::IUnknown); impl IOleControl { #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn GetControlInfo(&self, pci: *mut CONTROLINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetControlInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pci)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetControlInfo)(windows_core::Interface::as_raw(self), pci as _).ok() } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn OnMnemonic(&self, pmsg: *const super::super::UI::WindowsAndMessaging::MSG) -> windows_core::Result<()> { @@ -7927,7 +7927,7 @@ impl IOleControlSite { } } pub unsafe fn TransformCoords(&self, pptlhimetric: *mut super::super::Foundation::POINTL, pptfcontainer: *mut POINTF, dwflags: XFORMCOORDS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TransformCoords)(windows_core::Interface::as_raw(self), core::mem::transmute(pptlhimetric), core::mem::transmute(pptfcontainer), dwflags.0 as _).ok() } + unsafe { (windows_core::Interface::vtable(self).TransformCoords)(windows_core::Interface::as_raw(self), pptlhimetric as _, pptfcontainer as _, dwflags.0 as _).ok() } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn TranslateAccelerator(&self, pmsg: *const super::super::UI::WindowsAndMessaging::MSG, grfmodifiers: KEYMODIFIERS) -> windows_core::Result<()> { @@ -8401,7 +8401,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<()> { - unsafe { (windows_core::Interface::vtable(self).TranslateAccelerator)(windows_core::Interface::as_raw(self), core::mem::transmute(lpmsg.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).TranslateAccelerator)(windows_core::Interface::as_raw(self), lpmsg.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn OnFrameWindowActivate(&self, factivate: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OnFrameWindowActivate)(windows_core::Interface::as_raw(self), factivate.into()).ok() } @@ -8498,7 +8498,7 @@ windows_core::imp::interface_hierarchy!(IOleInPlaceFrame, windows_core::IUnknown impl IOleInPlaceFrame { #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn InsertMenus(&self, hmenushared: super::super::UI::WindowsAndMessaging::HMENU, lpmenuwidths: *mut OLEMENUGROUPWIDTHS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).InsertMenus)(windows_core::Interface::as_raw(self), hmenushared, core::mem::transmute(lpmenuwidths)).ok() } + unsafe { (windows_core::Interface::vtable(self).InsertMenus)(windows_core::Interface::as_raw(self), hmenushared, lpmenuwidths as _).ok() } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn SetMenu(&self, hmenushared: super::super::UI::WindowsAndMessaging::HMENU, holemenu: isize, hwndactiveobject: super::super::Foundation::HWND) -> windows_core::Result<()> { @@ -8772,7 +8772,7 @@ impl IOleInPlaceSite { } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn GetWindowContext(&self, ppframe: *mut Option, ppdoc: *mut Option, lprcposrect: *mut super::super::Foundation::RECT, lprccliprect: *mut super::super::Foundation::RECT, lpframeinfo: *mut OLEINPLACEFRAMEINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWindowContext)(windows_core::Interface::as_raw(self), core::mem::transmute(ppframe), core::mem::transmute(ppdoc), core::mem::transmute(lprcposrect), core::mem::transmute(lprccliprect), core::mem::transmute(lpframeinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWindowContext)(windows_core::Interface::as_raw(self), core::mem::transmute(ppframe), core::mem::transmute(ppdoc), lprcposrect as _, lprccliprect as _, lpframeinfo as _).ok() } } pub unsafe fn Scroll(&self, scrollextant: super::super::Foundation::SIZE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Scroll)(windows_core::Interface::as_raw(self), core::mem::transmute(scrollextant)).ok() } @@ -8916,7 +8916,7 @@ impl core::ops::Deref for IOleInPlaceSiteEx { windows_core::imp::interface_hierarchy!(IOleInPlaceSiteEx, windows_core::IUnknown, IOleWindow, IOleInPlaceSite); impl IOleInPlaceSiteEx { pub unsafe fn OnInPlaceActivateEx(&self, pfnoredraw: *mut super::super::Foundation::BOOL, dwflags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OnInPlaceActivateEx)(windows_core::Interface::as_raw(self), core::mem::transmute(pfnoredraw), dwflags).ok() } + unsafe { (windows_core::Interface::vtable(self).OnInPlaceActivateEx)(windows_core::Interface::as_raw(self), pfnoredraw as _, dwflags).ok() } } pub unsafe fn OnInPlaceDeactivateEx(&self, fnoredraw: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OnInPlaceDeactivateEx)(windows_core::Interface::as_raw(self), fnoredraw.into()).ok() } @@ -9018,7 +9018,7 @@ impl IOleInPlaceSiteWindowless { unsafe { (windows_core::Interface::vtable(self).ScrollRect)(windows_core::Interface::as_raw(self), dx, dy, prectscroll, prectclip).ok() } } pub unsafe fn AdjustRect(&self, prc: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AdjustRect)(windows_core::Interface::as_raw(self), core::mem::transmute(prc)).ok() } + unsafe { (windows_core::Interface::vtable(self).AdjustRect)(windows_core::Interface::as_raw(self), prc as _).ok() } } pub unsafe fn OnDefWindowMessage(&self, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result { unsafe { @@ -10129,10 +10129,10 @@ impl IOleUILinkContainerA { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SetLinkSource)(windows_core::Interface::as_raw(self), dwlink, lpszdisplayname.param().abi(), lenfilename, core::mem::transmute(pcheaten), fvalidatesource.into()).ok() } + unsafe { (windows_core::Interface::vtable(self).SetLinkSource)(windows_core::Interface::as_raw(self), dwlink, lpszdisplayname.param().abi(), lenfilename, pcheaten as _, fvalidatesource.into()).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetLinkSource)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).GetLinkSource)(windows_core::Interface::as_raw(self), dwlink, lplpszdisplayname.unwrap_or(core::mem::zeroed()) as _, lplenfilename as _, lplpszfulllinktype.unwrap_or(core::mem::zeroed()) as _, lplpszshortlinktype.unwrap_or(core::mem::zeroed()) as _, lpfsourceavailable as _, lpfisselected as _).ok() } } pub unsafe fn OpenLinkSource(&self, dwlink: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OpenLinkSource)(windows_core::Interface::as_raw(self), dwlink).ok() } @@ -10258,10 +10258,10 @@ impl IOleUILinkContainerW { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SetLinkSource)(windows_core::Interface::as_raw(self), dwlink, lpszdisplayname.param().abi(), lenfilename, core::mem::transmute(pcheaten), fvalidatesource.into()).ok() } + unsafe { (windows_core::Interface::vtable(self).SetLinkSource)(windows_core::Interface::as_raw(self), dwlink, lpszdisplayname.param().abi(), lenfilename, pcheaten as _, fvalidatesource.into()).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetLinkSource)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).GetLinkSource)(windows_core::Interface::as_raw(self), dwlink, lplpszdisplayname.unwrap_or(core::mem::zeroed()) as _, lplenfilename as _, lplpszfulllinktype.unwrap_or(core::mem::zeroed()) as _, lplpszshortlinktype.unwrap_or(core::mem::zeroed()) as _, lpfsourceavailable as _, lpfisselected as _).ok() } } pub unsafe fn OpenLinkSource(&self, dwlink: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OpenLinkSource)(windows_core::Interface::as_raw(self), dwlink).ok() } @@ -10462,16 +10462,16 @@ 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetObjectInfo)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).GetObjectInfo)(windows_core::Interface::as_raw(self), dwobject, lpdwobjsize as _, lplpszlabel.unwrap_or(core::mem::zeroed()) as _, lplpsztype.unwrap_or(core::mem::zeroed()) as _, lplpszshorttype.unwrap_or(core::mem::zeroed()) as _, lplpszlocation.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetConvertInfo)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).GetConvertInfo)(windows_core::Interface::as_raw(self), dwobject, lpclassid as _, lpwformat as _, lpconvertdefaultclassid as _, lplpclsidexclude as _, lpcclsidexclude.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ConvertObject(&self, dwobject: u32, clsidnew: *const windows_core::GUID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ConvertObject)(windows_core::Interface::as_raw(self), dwobject, clsidnew).ok() } } pub unsafe fn GetViewInfo(&self, dwobject: u32, phmetapict: Option<*const super::super::Foundation::HGLOBAL>, pdvaspect: Option<*const u32>, pncurrentscale: Option<*const i32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetViewInfo)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).GetViewInfo)(windows_core::Interface::as_raw(self), dwobject, phmetapict.unwrap_or(core::mem::zeroed()) as _, pdvaspect.unwrap_or(core::mem::zeroed()) as _, pncurrentscale.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetViewInfo(&self, dwobject: u32, hmetapict: super::super::Foundation::HGLOBAL, dvaspect: u32, ncurrentscale: i32, brelativetoorig: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetViewInfo)(windows_core::Interface::as_raw(self), dwobject, hmetapict, dvaspect, ncurrentscale, brelativetoorig.into()).ok() } @@ -10543,16 +10543,16 @@ 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetObjectInfo)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).GetObjectInfo)(windows_core::Interface::as_raw(self), dwobject, lpdwobjsize as _, lplpszlabel.unwrap_or(core::mem::zeroed()) as _, lplpsztype.unwrap_or(core::mem::zeroed()) as _, lplpszshorttype.unwrap_or(core::mem::zeroed()) as _, lplpszlocation.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetConvertInfo)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).GetConvertInfo)(windows_core::Interface::as_raw(self), dwobject, lpclassid as _, lpwformat as _, lpconvertdefaultclassid as _, lplpclsidexclude as _, lpcclsidexclude.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ConvertObject(&self, dwobject: u32, clsidnew: *const windows_core::GUID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ConvertObject)(windows_core::Interface::as_raw(self), dwobject, clsidnew).ok() } } pub unsafe fn GetViewInfo(&self, dwobject: u32, phmetapict: Option<*const super::super::Foundation::HGLOBAL>, pdvaspect: Option<*const u32>, pncurrentscale: Option<*const i32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetViewInfo)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).GetViewInfo)(windows_core::Interface::as_raw(self), dwobject, phmetapict.unwrap_or(core::mem::zeroed()) as _, pdvaspect.unwrap_or(core::mem::zeroed()) as _, pncurrentscale.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetViewInfo(&self, dwobject: u32, hmetapict: super::super::Foundation::HGLOBAL, dvaspect: u32, ncurrentscale: i32, brelativetoorig: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetViewInfo)(windows_core::Interface::as_raw(self), dwobject, hmetapict, dvaspect, ncurrentscale, brelativetoorig.into()).ok() } @@ -10864,7 +10864,7 @@ impl IOleUndoUnit { } } pub unsafe fn GetUnitType(&self, pclsid: *mut windows_core::GUID, plid: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetUnitType)(windows_core::Interface::as_raw(self), core::mem::transmute(pclsid), core::mem::transmute(plid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUnitType)(windows_core::Interface::as_raw(self), pclsid as _, plid as _).ok() } } pub unsafe fn OnNextAdd(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OnNextAdd)(windows_core::Interface::as_raw(self)).ok() } @@ -10992,7 +10992,7 @@ impl IParseDisplayName { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ParseDisplayName)(windows_core::Interface::as_raw(self), pbc.param().abi(), pszdisplayname.param().abi(), core::mem::transmute(pcheaten), core::mem::transmute(ppmkout)).ok() } + unsafe { (windows_core::Interface::vtable(self).ParseDisplayName)(windows_core::Interface::as_raw(self), pbc.param().abi(), pszdisplayname.param().abi(), pcheaten as _, core::mem::transmute(ppmkout)).ok() } } } #[repr(C)] @@ -11040,7 +11040,7 @@ impl IPerPropertyBrowsing { } } pub unsafe fn GetPredefinedStrings(&self, dispid: i32, pcastringsout: *mut CALPOLESTR, pcacookiesout: *mut CADWORD) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPredefinedStrings)(windows_core::Interface::as_raw(self), dispid, core::mem::transmute(pcastringsout), core::mem::transmute(pcacookiesout)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPredefinedStrings)(windows_core::Interface::as_raw(self), dispid, pcastringsout as _, pcacookiesout as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Variant"))] pub unsafe fn GetPredefinedValue(&self, dispid: i32, dwcookie: u32) -> windows_core::Result { @@ -11360,7 +11360,7 @@ impl IPicture { } #[cfg(feature = "Win32_Graphics_Gdi")] 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<()> { - unsafe { (windows_core::Interface::vtable(self).SelectPicture)(windows_core::Interface::as_raw(self), hdcin, core::mem::transmute(phdcout), core::mem::transmute(phbmpout)).ok() } + unsafe { (windows_core::Interface::vtable(self).SelectPicture)(windows_core::Interface::as_raw(self), hdcin, phdcout as _, phbmpout as _).ok() } } pub unsafe fn KeepOriginalFormat(&self) -> windows_core::Result { unsafe { @@ -11652,7 +11652,7 @@ impl IPicture2 { } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn SelectPicture(&self, hdcin: super::super::Graphics::Gdi::HDC, phdcout: *mut super::super::Graphics::Gdi::HDC, phbmpout: *mut usize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SelectPicture)(windows_core::Interface::as_raw(self), hdcin, core::mem::transmute(phdcout), core::mem::transmute(phbmpout)).ok() } + unsafe { (windows_core::Interface::vtable(self).SelectPicture)(windows_core::Interface::as_raw(self), hdcin, phdcout as _, phbmpout as _).ok() } } pub unsafe fn KeepOriginalFormat(&self) -> windows_core::Result { unsafe { @@ -11997,14 +11997,14 @@ impl IPrint { unsafe { (windows_core::Interface::vtable(self).SetInitialPageNum)(windows_core::Interface::as_raw(self), nfirstpage).ok() } } pub unsafe fn GetPageInfo(&self, pnfirstpage: *mut i32, pcpages: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPageInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pnfirstpage), core::mem::transmute(pcpages)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPageInfo)(windows_core::Interface::as_raw(self), pnfirstpage as _, pcpages as _).ok() } } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe fn Print(&self, grfflags: u32, pptd: *mut *mut super::Com::DVTARGETDEVICE, pppageset: *mut *mut PAGESET, pstgmoptions: *mut super::Com::STGMEDIUM, pcallback: P4, nfirstpage: i32, pcpagesprinted: *mut i32, pnlastpage: *mut i32) -> windows_core::Result<()> where P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Print)(windows_core::Interface::as_raw(self), grfflags, core::mem::transmute(pptd), core::mem::transmute(pppageset), core::mem::transmute(pstgmoptions), pcallback.param().abi(), nfirstpage, core::mem::transmute(pcpagesprinted), core::mem::transmute(pnlastpage)).ok() } + unsafe { (windows_core::Interface::vtable(self).Print)(windows_core::Interface::as_raw(self), grfflags, pptd as _, pppageset as _, core::mem::transmute(pstgmoptions), pcallback.param().abi(), nfirstpage, pcpagesprinted as _, pnlastpage as _).ok() } } } #[repr(C)] @@ -12118,7 +12118,7 @@ impl IPropertyPage { unsafe { (windows_core::Interface::vtable(self).Deactivate)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetPageInfo(&self, ppageinfo: *mut PROPPAGEINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPageInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(ppageinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPageInfo)(windows_core::Interface::as_raw(self), ppageinfo as _).ok() } } pub unsafe fn SetObjects(&self, ppunk: &[Option]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetObjects)(windows_core::Interface::as_raw(self), ppunk.len().try_into().unwrap(), core::mem::transmute(ppunk.as_ptr())).ok() } @@ -12657,7 +12657,7 @@ impl IProvideMultipleClassInfo { } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetInfoOfIndex(&self, iti: u32, dwflags: MULTICLASSINFO_FLAGS, ppticoclass: *mut Option, pdwtiflags: *mut u32, pcdispidreserved: *mut u32, piidprimary: *mut windows_core::GUID, piidsource: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInfoOfIndex)(windows_core::Interface::as_raw(self), iti, dwflags, core::mem::transmute(ppticoclass), core::mem::transmute(pdwtiflags), core::mem::transmute(pcdispidreserved), core::mem::transmute(piidprimary), core::mem::transmute(piidsource)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInfoOfIndex)(windows_core::Interface::as_raw(self), iti, dwflags, core::mem::transmute(ppticoclass), pdwtiflags as _, pcdispidreserved as _, piidprimary as _, piidsource as _).ok() } } } #[repr(C)] @@ -12711,7 +12711,7 @@ windows_core::imp::define_interface!(IProvideRuntimeContext, IProvideRuntimeCont windows_core::imp::interface_hierarchy!(IProvideRuntimeContext, windows_core::IUnknown); impl IProvideRuntimeContext { pub unsafe fn GetCurrentSourceContext(&self, pdwcontext: *mut usize, pfexecutingglobalcode: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrentSourceContext)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwcontext), core::mem::transmute(pfexecutingglobalcode)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentSourceContext)(windows_core::Interface::as_raw(self), pdwcontext as _, pfexecutingglobalcode as _).ok() } } } #[repr(C)] @@ -12742,7 +12742,7 @@ windows_core::imp::interface_hierarchy!(IQuickActivate, windows_core::IUnknown); impl IQuickActivate { #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] pub unsafe fn QuickActivate(&self, pqacontainer: *const QACONTAINER, pqacontrol: *mut QACONTROL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QuickActivate)(windows_core::Interface::as_raw(self), core::mem::transmute(pqacontainer), core::mem::transmute(pqacontrol)).ok() } + unsafe { (windows_core::Interface::vtable(self).QuickActivate)(windows_core::Interface::as_raw(self), core::mem::transmute(pqacontainer), pqacontrol as _).ok() } } pub unsafe fn SetContentExtent(&self, psizel: *const super::super::Foundation::SIZE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetContentExtent)(windows_core::Interface::as_raw(self), psizel).ok() } @@ -12814,13 +12814,13 @@ windows_core::imp::define_interface!(IRecordInfo, IRecordInfo_Vtbl, 0x0000002f_0 windows_core::imp::interface_hierarchy!(IRecordInfo, windows_core::IUnknown); impl IRecordInfo { pub unsafe fn RecordInit(&self, pvnew: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RecordInit)(windows_core::Interface::as_raw(self), core::mem::transmute(pvnew)).ok() } + unsafe { (windows_core::Interface::vtable(self).RecordInit)(windows_core::Interface::as_raw(self), pvnew as _).ok() } } pub unsafe fn RecordClear(&self, pvexisting: *const core::ffi::c_void) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RecordClear)(windows_core::Interface::as_raw(self), pvexisting).ok() } } pub unsafe fn RecordCopy(&self, pvexisting: *const core::ffi::c_void, pvnew: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RecordCopy)(windows_core::Interface::as_raw(self), pvexisting, core::mem::transmute(pvnew)).ok() } + unsafe { (windows_core::Interface::vtable(self).RecordCopy)(windows_core::Interface::as_raw(self), pvexisting, pvnew as _).ok() } } pub unsafe fn GetGuid(&self) -> windows_core::Result { unsafe { @@ -12862,24 +12862,24 @@ impl IRecordInfo { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetFieldNoCopy)(windows_core::Interface::as_raw(self), pvdata, szfieldname.param().abi(), core::mem::transmute(pvarfield), core::mem::transmute(ppvdatacarray)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFieldNoCopy)(windows_core::Interface::as_raw(self), pvdata, szfieldname.param().abi(), core::mem::transmute(pvarfield), ppvdatacarray as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Variant"))] pub unsafe fn PutField(&self, wflags: u32, pvdata: *mut core::ffi::c_void, szfieldname: P2, pvarfield: *const super::Variant::VARIANT) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).PutField)(windows_core::Interface::as_raw(self), wflags, core::mem::transmute(pvdata), szfieldname.param().abi(), core::mem::transmute(pvarfield)).ok() } + unsafe { (windows_core::Interface::vtable(self).PutField)(windows_core::Interface::as_raw(self), wflags, pvdata as _, szfieldname.param().abi(), core::mem::transmute(pvarfield)).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Variant"))] pub unsafe fn PutFieldNoCopy(&self, wflags: u32, pvdata: *mut core::ffi::c_void, szfieldname: P2, pvarfield: *const super::Variant::VARIANT) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).PutFieldNoCopy)(windows_core::Interface::as_raw(self), wflags, core::mem::transmute(pvdata), szfieldname.param().abi(), core::mem::transmute(pvarfield)).ok() } + unsafe { (windows_core::Interface::vtable(self).PutFieldNoCopy)(windows_core::Interface::as_raw(self), wflags, pvdata as _, szfieldname.param().abi(), core::mem::transmute(pvarfield)).ok() } } pub unsafe fn GetFieldNames(&self, pcnames: *mut u32, rgbstrnames: *mut windows_core::BSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFieldNames)(windows_core::Interface::as_raw(self), core::mem::transmute(pcnames), core::mem::transmute(rgbstrnames)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFieldNames)(windows_core::Interface::as_raw(self), pcnames as _, core::mem::transmute(rgbstrnames)).ok() } } pub unsafe fn IsMatchingType(&self, precordinfo: P0) -> super::super::Foundation::BOOL where @@ -12891,7 +12891,7 @@ impl IRecordInfo { unsafe { (windows_core::Interface::vtable(self).RecordCreate)(windows_core::Interface::as_raw(self)) } } pub unsafe fn RecordCreateCopy(&self, pvsource: *const core::ffi::c_void, ppvdest: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RecordCreateCopy)(windows_core::Interface::as_raw(self), pvsource, core::mem::transmute(ppvdest)).ok() } + unsafe { (windows_core::Interface::vtable(self).RecordCreateCopy)(windows_core::Interface::as_raw(self), pvsource, ppvdest as _).ok() } } pub unsafe fn RecordDestroy(&self, pvrecord: *const core::ffi::c_void) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RecordDestroy)(windows_core::Interface::as_raw(self), pvrecord).ok() } @@ -13110,10 +13110,10 @@ windows_core::imp::define_interface!(ISimpleFrameSite, ISimpleFrameSite_Vtbl, 0x windows_core::imp::interface_hierarchy!(ISimpleFrameSite, windows_core::IUnknown); impl ISimpleFrameSite { 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<()> { - unsafe { (windows_core::Interface::vtable(self).PreMessageFilter)(windows_core::Interface::as_raw(self), hwnd, msg, wp, lp, core::mem::transmute(plresult), core::mem::transmute(pdwcookie)).ok() } + unsafe { (windows_core::Interface::vtable(self).PreMessageFilter)(windows_core::Interface::as_raw(self), hwnd, msg, wp, lp, plresult as _, pdwcookie as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).PostMessageFilter)(windows_core::Interface::as_raw(self), hwnd, msg, wp, lp, core::mem::transmute(plresult), dwcookie).ok() } + unsafe { (windows_core::Interface::vtable(self).PostMessageFilter)(windows_core::Interface::as_raw(self), hwnd, msg, wp, lp, plresult as _, dwcookie).ok() } } } #[repr(C)] @@ -13322,10 +13322,10 @@ impl ITypeMarshal { } } pub unsafe fn Marshal(&self, pvtype: *const core::ffi::c_void, dwdestcontext: u32, pvdestcontext: *const core::ffi::c_void, pbuffer: &mut [u8], pcbwritten: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Marshal)(windows_core::Interface::as_raw(self), pvtype, dwdestcontext, pvdestcontext, pbuffer.len().try_into().unwrap(), core::mem::transmute(pbuffer.as_ptr()), core::mem::transmute(pcbwritten)).ok() } + unsafe { (windows_core::Interface::vtable(self).Marshal)(windows_core::Interface::as_raw(self), pvtype, dwdestcontext, pvdestcontext, pbuffer.len().try_into().unwrap(), core::mem::transmute(pbuffer.as_ptr()), pcbwritten as _).ok() } } pub unsafe fn Unmarshal(&self, pvtype: *mut core::ffi::c_void, dwflags: u32, pbuffer: &[u8], pcbread: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Unmarshal)(windows_core::Interface::as_raw(self), core::mem::transmute(pvtype), dwflags, pbuffer.len().try_into().unwrap(), core::mem::transmute(pbuffer.as_ptr()), core::mem::transmute(pcbread)).ok() } + unsafe { (windows_core::Interface::vtable(self).Unmarshal)(windows_core::Interface::as_raw(self), pvtype as _, dwflags, pbuffer.len().try_into().unwrap(), core::mem::transmute(pbuffer.as_ptr()), pcbread as _).ok() } } pub unsafe fn Free(&self, pvtype: *const core::ffi::c_void) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Free)(windows_core::Interface::as_raw(self), pvtype).ok() } @@ -13395,7 +13395,7 @@ windows_core::imp::interface_hierarchy!(IVBFormat, windows_core::IUnknown); impl IVBFormat { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Variant"))] pub unsafe fn Format(&self, vdata: *mut super::Variant::VARIANT, bstrformat: &windows_core::BSTR, lpbuffer: *mut core::ffi::c_void, cb: u16, lcid: i32, sfirstdayofweek: i16, sfirstweekofyear: u16, rcb: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Format)(windows_core::Interface::as_raw(self), core::mem::transmute(vdata), core::mem::transmute_copy(bstrformat), core::mem::transmute(lpbuffer), cb, lcid, sfirstdayofweek, sfirstweekofyear, core::mem::transmute(rcb)).ok() } + unsafe { (windows_core::Interface::vtable(self).Format)(windows_core::Interface::as_raw(self), core::mem::transmute(vdata), core::mem::transmute_copy(bstrformat), lpbuffer as _, cb, lcid, sfirstdayofweek, sfirstweekofyear, rcb as _).ok() } } } #[repr(C)] @@ -13515,15 +13515,15 @@ 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: 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<()> { - unsafe { (windows_core::Interface::vtable(self).Draw)(windows_core::Interface::as_raw(self), dwdrawaspect, lindex, core::mem::transmute(pvaspect), core::mem::transmute(ptd.unwrap_or(core::mem::zeroed())), core::mem::transmute(hdctargetdev.unwrap_or(core::mem::zeroed())), 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())), dwcontinue).ok() } + unsafe { (windows_core::Interface::vtable(self).Draw)(windows_core::Interface::as_raw(self), dwdrawaspect, lindex, pvaspect as _, ptd.unwrap_or(core::mem::zeroed()) as _, hdctargetdev.unwrap_or(core::mem::zeroed()) as _, hdcdraw, lprcbounds.unwrap_or(core::mem::zeroed()) as _, lprcwbounds.unwrap_or(core::mem::zeroed()) as _, pfncontinue.unwrap_or(core::mem::zeroed()) as _, 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: Option, ppcolorset: *mut *mut super::super::Graphics::Gdi::LOGPALETTE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetColorSet)(windows_core::Interface::as_raw(self), dwdrawaspect, 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() } + unsafe { (windows_core::Interface::vtable(self).GetColorSet)(windows_core::Interface::as_raw(self), dwdrawaspect, lindex, pvaspect as _, ptd.unwrap_or(core::mem::zeroed()) as _, hictargetdev.unwrap_or(core::mem::zeroed()) as _, ppcolorset as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).Freeze)(windows_core::Interface::as_raw(self), dwdrawaspect, lindex, core::mem::transmute(pvaspect), core::mem::transmute(pdwfreeze)).ok() } + unsafe { (windows_core::Interface::vtable(self).Freeze)(windows_core::Interface::as_raw(self), dwdrawaspect, lindex, pvaspect as _, pdwfreeze as _).ok() } } pub unsafe fn Unfreeze(&self, dwfreeze: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Unfreeze)(windows_core::Interface::as_raw(self), dwfreeze).ok() } @@ -13537,7 +13537,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetAdvise)(windows_core::Interface::as_raw(self), paspects.unwrap_or(core::mem::zeroed()) as _, padvf.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(ppadvsink)).ok() } } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/System/ParentalControls/mod.rs b/crates/libs/windows/src/Windows/Win32/System/ParentalControls/mod.rs index fb96e9a36b..673b4e242e 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ParentalControls/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ParentalControls/mod.rs @@ -55,10 +55,10 @@ impl IWPCProviderConfig { } } pub unsafe fn Configure(&self, hwnd: Option, bstrsid: &windows_core::BSTR) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Configure)(windows_core::Interface::as_raw(self), hwnd.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute_copy(bstrsid)).ok() } } pub unsafe fn RequestOverride(&self, hwnd: Option, bstrpath: &windows_core::BSTR, dwflags: WPCFLAG_RESTRICTION) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).RequestOverride)(windows_core::Interface::as_raw(self), hwnd.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute_copy(bstrpath), dwflags.0 as _).ok() } } } #[repr(C)] @@ -296,7 +296,7 @@ impl IWPCWebSettings { { unsafe { let mut result__ = core::mem::zeroed(); - (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__) + (windows_core::Interface::vtable(self).RequestURLOverride)(windows_core::Interface::as_raw(self), hwnd.unwrap_or(core::mem::zeroed()) as _, 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__) } } } @@ -423,7 +423,7 @@ impl IWindowsParentalControlsCore { } } pub unsafe fn GetWebFilterInfo(&self, pguidid: *mut windows_core::GUID, ppszname: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetWebFilterInfo)(windows_core::Interface::as_raw(self), pguidid as _, ppszname.unwrap_or(core::mem::zeroed()) as _).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 7455db9829..3b0ab250cf 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 @@ -6,17 +6,17 @@ pub unsafe fn DisableThreadProfiling(performancedatahandle: super::super::super: #[inline] 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); - unsafe { EnableThreadProfiling(threadhandle, flags, hardwarecounters, core::mem::transmute(performancedatahandle)) } + unsafe { EnableThreadProfiling(threadhandle, flags, hardwarecounters, performancedatahandle as _) } } #[inline] pub unsafe fn QueryThreadProfiling(threadhandle: super::super::super::Foundation::HANDLE, enabled: *mut bool) -> u32 { windows_targets::link!("kernel32.dll" "system" fn QueryThreadProfiling(threadhandle : super::super::super::Foundation:: HANDLE, enabled : *mut bool) -> u32); - unsafe { QueryThreadProfiling(threadhandle, core::mem::transmute(enabled)) } + unsafe { QueryThreadProfiling(threadhandle, enabled as _) } } #[inline] 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); - unsafe { ReadThreadProfilingData(performancedatahandle, flags, core::mem::transmute(performancedata)) } + unsafe { ReadThreadProfilingData(performancedatahandle, flags, performancedata as _) } } #[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 5a72bd0bfc..c841fdc124 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Performance/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Performance/mod.rs @@ -49,7 +49,7 @@ where 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); - unsafe { PdhAddCounterA(hquery, szfullcounterpath.param().abi(), dwuserdata, core::mem::transmute(phcounter)) } + unsafe { PdhAddCounterA(hquery, szfullcounterpath.param().abi(), dwuserdata, phcounter as _) } } #[inline] pub unsafe fn PdhAddCounterW(hquery: PDH_HQUERY, szfullcounterpath: P1, dwuserdata: usize, phcounter: *mut PDH_HCOUNTER) -> u32 @@ -57,7 +57,7 @@ where 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); - unsafe { PdhAddCounterW(hquery, szfullcounterpath.param().abi(), dwuserdata, core::mem::transmute(phcounter)) } + unsafe { PdhAddCounterW(hquery, szfullcounterpath.param().abi(), dwuserdata, phcounter as _) } } #[inline] pub unsafe fn PdhAddEnglishCounterA(hquery: PDH_HQUERY, szfullcounterpath: P1, dwuserdata: usize, phcounter: *mut PDH_HCOUNTER) -> u32 @@ -65,7 +65,7 @@ where 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); - unsafe { PdhAddEnglishCounterA(hquery, szfullcounterpath.param().abi(), dwuserdata, core::mem::transmute(phcounter)) } + unsafe { PdhAddEnglishCounterA(hquery, szfullcounterpath.param().abi(), dwuserdata, phcounter as _) } } #[inline] pub unsafe fn PdhAddEnglishCounterW(hquery: PDH_HQUERY, szfullcounterpath: P1, dwuserdata: usize, phcounter: *mut PDH_HCOUNTER) -> u32 @@ -73,7 +73,7 @@ where 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); - unsafe { PdhAddEnglishCounterW(hquery, szfullcounterpath.param().abi(), dwuserdata, core::mem::transmute(phcounter)) } + unsafe { PdhAddEnglishCounterW(hquery, szfullcounterpath.param().abi(), dwuserdata, phcounter as _) } } #[inline] pub unsafe fn PdhBindInputDataSourceA(phdatasource: *mut PDH_HLOG, logfilenamelist: P1) -> u32 @@ -81,7 +81,7 @@ where P1: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhBindInputDataSourceA(phdatasource : *mut PDH_HLOG, logfilenamelist : windows_core::PCSTR) -> u32); - unsafe { PdhBindInputDataSourceA(core::mem::transmute(phdatasource), logfilenamelist.param().abi()) } + unsafe { PdhBindInputDataSourceA(phdatasource as _, logfilenamelist.param().abi()) } } #[inline] pub unsafe fn PdhBindInputDataSourceW(phdatasource: *mut PDH_HLOG, logfilenamelist: P1) -> u32 @@ -89,7 +89,7 @@ where P1: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhBindInputDataSourceW(phdatasource : *mut PDH_HLOG, logfilenamelist : windows_core::PCWSTR) -> u32); - unsafe { PdhBindInputDataSourceW(core::mem::transmute(phdatasource), logfilenamelist.param().abi()) } + unsafe { PdhBindInputDataSourceW(phdatasource as _, logfilenamelist.param().abi()) } } #[inline] pub unsafe fn PdhBrowseCountersA(pbrowsedlgdata: *const PDH_BROWSE_DLG_CONFIG_A) -> u32 { @@ -114,7 +114,7 @@ pub unsafe fn PdhBrowseCountersW(pbrowsedlgdata: *const PDH_BROWSE_DLG_CONFIG_W) #[inline] 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); - unsafe { PdhCalculateCounterFromRawValue(hcounter, dwformat, rawvalue1, rawvalue2, core::mem::transmute(fmtvalue)) } + unsafe { PdhCalculateCounterFromRawValue(hcounter, dwformat, rawvalue1, rawvalue2, fmtvalue as _) } } #[inline] pub unsafe fn PdhCloseLog(hlog: PDH_HLOG, dwflags: u32) -> u32 { @@ -124,12 +124,12 @@ pub unsafe fn PdhCloseLog(hlog: PDH_HLOG, dwflags: u32) -> u32 { #[inline] pub unsafe fn PdhCloseQuery(hquery: PDH_HQUERY) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhCloseQuery(hquery : PDH_HQUERY) -> u32); - unsafe { PdhCloseQuery(core::mem::transmute(hquery)) } + unsafe { PdhCloseQuery(hquery as _) } } #[inline] pub unsafe fn PdhCollectQueryData(hquery: PDH_HQUERY) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhCollectQueryData(hquery : PDH_HQUERY) -> u32); - unsafe { PdhCollectQueryData(core::mem::transmute(hquery)) } + unsafe { PdhCollectQueryData(hquery as _) } } #[inline] pub unsafe fn PdhCollectQueryDataEx(hquery: PDH_HQUERY, dwintervaltime: u32, hnewdataevent: super::super::Foundation::HANDLE) -> u32 { @@ -139,12 +139,12 @@ pub unsafe fn PdhCollectQueryDataEx(hquery: PDH_HQUERY, dwintervaltime: u32, hne #[inline] pub unsafe fn PdhCollectQueryDataWithTime(hquery: PDH_HQUERY, plltimestamp: *mut i64) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhCollectQueryDataWithTime(hquery : PDH_HQUERY, plltimestamp : *mut i64) -> u32); - unsafe { PdhCollectQueryDataWithTime(core::mem::transmute(hquery), core::mem::transmute(plltimestamp)) } + unsafe { PdhCollectQueryDataWithTime(hquery as _, plltimestamp as _) } } #[inline] 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); - unsafe { PdhComputeCounterStatistics(hcounter, dwformat, dwfirstentry, dwnumentries, lprawvaluearray, core::mem::transmute(data)) } + unsafe { PdhComputeCounterStatistics(hcounter, dwformat, dwfirstentry, dwnumentries, lprawvaluearray, data as _) } } #[inline] pub unsafe fn PdhConnectMachineA(szmachinename: P0) -> u32 @@ -184,7 +184,7 @@ 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); - unsafe { PdhEnumLogSetNamesA(szdatasource.param().abi(), core::mem::transmute(mszdatasetnamelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbufferlength)) } + unsafe { PdhEnumLogSetNamesA(szdatasource.param().abi(), mszdatasetnamelist.unwrap_or(core::mem::zeroed()) as _, pcchbufferlength as _) } } #[inline] pub unsafe fn PdhEnumLogSetNamesW(szdatasource: P0, mszdatasetnamelist: Option, pcchbufferlength: *mut u32) -> u32 @@ -192,7 +192,7 @@ 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); - unsafe { PdhEnumLogSetNamesW(szdatasource.param().abi(), core::mem::transmute(mszdatasetnamelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbufferlength)) } + unsafe { PdhEnumLogSetNamesW(szdatasource.param().abi(), mszdatasetnamelist.unwrap_or(core::mem::zeroed()) as _, pcchbufferlength as _) } } #[inline] pub unsafe fn PdhEnumMachinesA(szdatasource: P0, mszmachinelist: Option, pcchbuffersize: *mut u32) -> u32 @@ -200,17 +200,17 @@ 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); - unsafe { PdhEnumMachinesA(szdatasource.param().abi(), core::mem::transmute(mszmachinelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize)) } + unsafe { PdhEnumMachinesA(szdatasource.param().abi(), mszmachinelist.unwrap_or(core::mem::zeroed()) as _, pcchbuffersize as _) } } #[inline] 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); - unsafe { PdhEnumMachinesHA(core::mem::transmute(hdatasource.unwrap_or(core::mem::zeroed())), core::mem::transmute(mszmachinelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize)) } + unsafe { PdhEnumMachinesHA(hdatasource.unwrap_or(core::mem::zeroed()) as _, mszmachinelist.unwrap_or(core::mem::zeroed()) as _, pcchbuffersize as _) } } #[inline] 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); - unsafe { PdhEnumMachinesHW(core::mem::transmute(hdatasource.unwrap_or(core::mem::zeroed())), core::mem::transmute(mszmachinelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize)) } + unsafe { PdhEnumMachinesHW(hdatasource.unwrap_or(core::mem::zeroed()) as _, mszmachinelist.unwrap_or(core::mem::zeroed()) as _, pcchbuffersize as _) } } #[inline] pub unsafe fn PdhEnumMachinesW(szdatasource: P0, mszmachinelist: Option, pcchbuffersize: *mut u32) -> u32 @@ -218,7 +218,7 @@ 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); - unsafe { PdhEnumMachinesW(szdatasource.param().abi(), core::mem::transmute(mszmachinelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize)) } + unsafe { PdhEnumMachinesW(szdatasource.param().abi(), mszmachinelist.unwrap_or(core::mem::zeroed()) as _, pcchbuffersize as _) } } #[inline] 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 @@ -228,7 +228,7 @@ where 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); - unsafe { 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), dwdetaillevel, dwflags) } + unsafe { PdhEnumObjectItemsA(szdatasource.param().abi(), szmachinename.param().abi(), szobjectname.param().abi(), mszcounterlist.unwrap_or(core::mem::zeroed()) as _, pcchcounterlistlength as _, mszinstancelist.unwrap_or(core::mem::zeroed()) as _, pcchinstancelistlength as _, dwdetaillevel, dwflags) } } #[inline] 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 @@ -237,7 +237,7 @@ where 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); - unsafe { 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), dwdetaillevel, dwflags) } + unsafe { PdhEnumObjectItemsHA(hdatasource.unwrap_or(core::mem::zeroed()) as _, szmachinename.param().abi(), szobjectname.param().abi(), mszcounterlist.unwrap_or(core::mem::zeroed()) as _, pcchcounterlistlength as _, mszinstancelist.unwrap_or(core::mem::zeroed()) as _, pcchinstancelistlength as _, dwdetaillevel, dwflags) } } #[inline] 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 @@ -246,7 +246,7 @@ where 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); - unsafe { 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), dwdetaillevel, dwflags) } + unsafe { PdhEnumObjectItemsHW(hdatasource.unwrap_or(core::mem::zeroed()) as _, szmachinename.param().abi(), szobjectname.param().abi(), mszcounterlist.unwrap_or(core::mem::zeroed()) as _, pcchcounterlistlength as _, mszinstancelist.unwrap_or(core::mem::zeroed()) as _, pcchinstancelistlength as _, dwdetaillevel, dwflags) } } #[inline] 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 @@ -256,7 +256,7 @@ where 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); - unsafe { 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), dwdetaillevel, dwflags) } + unsafe { PdhEnumObjectItemsW(szdatasource.param().abi(), szmachinename.param().abi(), szobjectname.param().abi(), mszcounterlist.unwrap_or(core::mem::zeroed()) as _, pcchcounterlistlength as _, mszinstancelist.unwrap_or(core::mem::zeroed()) as _, pcchinstancelistlength as _, dwdetaillevel, dwflags) } } #[inline] pub unsafe fn PdhEnumObjectsA(szdatasource: P0, szmachinename: P1, mszobjectlist: Option, pcchbuffersize: *mut u32, dwdetaillevel: PERF_DETAIL, brefresh: bool) -> u32 @@ -265,7 +265,7 @@ where P1: 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); - unsafe { PdhEnumObjectsA(szdatasource.param().abi(), szmachinename.param().abi(), core::mem::transmute(mszobjectlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize), dwdetaillevel, brefresh.into()) } + unsafe { PdhEnumObjectsA(szdatasource.param().abi(), szmachinename.param().abi(), mszobjectlist.unwrap_or(core::mem::zeroed()) as _, pcchbuffersize as _, dwdetaillevel, brefresh.into()) } } #[inline] pub unsafe fn PdhEnumObjectsHA(hdatasource: Option, szmachinename: P1, mszobjectlist: Option, pcchbuffersize: *mut u32, dwdetaillevel: PERF_DETAIL, brefresh: bool) -> u32 @@ -273,7 +273,7 @@ where P1: 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); - unsafe { 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), dwdetaillevel, brefresh.into()) } + unsafe { PdhEnumObjectsHA(hdatasource.unwrap_or(core::mem::zeroed()) as _, szmachinename.param().abi(), mszobjectlist.unwrap_or(core::mem::zeroed()) as _, pcchbuffersize as _, dwdetaillevel, brefresh.into()) } } #[inline] pub unsafe fn PdhEnumObjectsHW(hdatasource: Option, szmachinename: P1, mszobjectlist: Option, pcchbuffersize: *mut u32, dwdetaillevel: PERF_DETAIL, brefresh: bool) -> u32 @@ -281,7 +281,7 @@ where P1: 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); - unsafe { 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), dwdetaillevel, brefresh.into()) } + unsafe { PdhEnumObjectsHW(hdatasource.unwrap_or(core::mem::zeroed()) as _, szmachinename.param().abi(), mszobjectlist.unwrap_or(core::mem::zeroed()) as _, pcchbuffersize as _, dwdetaillevel, brefresh.into()) } } #[inline] pub unsafe fn PdhEnumObjectsW(szdatasource: P0, szmachinename: P1, mszobjectlist: Option, pcchbuffersize: *mut u32, dwdetaillevel: PERF_DETAIL, brefresh: bool) -> u32 @@ -290,7 +290,7 @@ where P1: 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); - unsafe { PdhEnumObjectsW(szdatasource.param().abi(), szmachinename.param().abi(), core::mem::transmute(mszobjectlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize), dwdetaillevel, brefresh.into()) } + unsafe { PdhEnumObjectsW(szdatasource.param().abi(), szmachinename.param().abi(), mszobjectlist.unwrap_or(core::mem::zeroed()) as _, pcchbuffersize as _, dwdetaillevel, brefresh.into()) } } #[inline] pub unsafe fn PdhExpandCounterPathA(szwildcardpath: P0, mszexpandedpathlist: Option, pcchpathlistlength: *mut u32) -> u32 @@ -298,7 +298,7 @@ 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); - unsafe { PdhExpandCounterPathA(szwildcardpath.param().abi(), core::mem::transmute(mszexpandedpathlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchpathlistlength)) } + unsafe { PdhExpandCounterPathA(szwildcardpath.param().abi(), mszexpandedpathlist.unwrap_or(core::mem::zeroed()) as _, pcchpathlistlength as _) } } #[inline] pub unsafe fn PdhExpandCounterPathW(szwildcardpath: P0, mszexpandedpathlist: Option, pcchpathlistlength: *mut u32) -> u32 @@ -306,7 +306,7 @@ 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); - unsafe { PdhExpandCounterPathW(szwildcardpath.param().abi(), core::mem::transmute(mszexpandedpathlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchpathlistlength)) } + unsafe { PdhExpandCounterPathW(szwildcardpath.param().abi(), mszexpandedpathlist.unwrap_or(core::mem::zeroed()) as _, pcchpathlistlength as _) } } #[inline] pub unsafe fn PdhExpandWildCardPathA(szdatasource: P0, szwildcardpath: P1, mszexpandedpathlist: Option, pcchpathlistlength: *mut u32, dwflags: u32) -> u32 @@ -315,7 +315,7 @@ where 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); - unsafe { PdhExpandWildCardPathA(szdatasource.param().abi(), szwildcardpath.param().abi(), core::mem::transmute(mszexpandedpathlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchpathlistlength), dwflags) } + unsafe { PdhExpandWildCardPathA(szdatasource.param().abi(), szwildcardpath.param().abi(), mszexpandedpathlist.unwrap_or(core::mem::zeroed()) as _, pcchpathlistlength as _, dwflags) } } #[inline] pub unsafe fn PdhExpandWildCardPathHA(hdatasource: Option, szwildcardpath: P1, mszexpandedpathlist: Option, pcchpathlistlength: *mut u32, dwflags: u32) -> u32 @@ -323,7 +323,7 @@ where 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); - unsafe { 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), dwflags) } + unsafe { PdhExpandWildCardPathHA(hdatasource.unwrap_or(core::mem::zeroed()) as _, szwildcardpath.param().abi(), mszexpandedpathlist.unwrap_or(core::mem::zeroed()) as _, pcchpathlistlength as _, dwflags) } } #[inline] pub unsafe fn PdhExpandWildCardPathHW(hdatasource: Option, szwildcardpath: P1, mszexpandedpathlist: Option, pcchpathlistlength: *mut u32, dwflags: u32) -> u32 @@ -331,7 +331,7 @@ where 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); - unsafe { 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), dwflags) } + unsafe { PdhExpandWildCardPathHW(hdatasource.unwrap_or(core::mem::zeroed()) as _, szwildcardpath.param().abi(), mszexpandedpathlist.unwrap_or(core::mem::zeroed()) as _, pcchpathlistlength as _, dwflags) } } #[inline] pub unsafe fn PdhExpandWildCardPathW(szdatasource: P0, szwildcardpath: P1, mszexpandedpathlist: Option, pcchpathlistlength: *mut u32, dwflags: u32) -> u32 @@ -340,27 +340,27 @@ where 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); - unsafe { PdhExpandWildCardPathW(szdatasource.param().abi(), szwildcardpath.param().abi(), core::mem::transmute(mszexpandedpathlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchpathlistlength), dwflags) } + unsafe { PdhExpandWildCardPathW(szdatasource.param().abi(), szwildcardpath.param().abi(), mszexpandedpathlist.unwrap_or(core::mem::zeroed()) as _, pcchpathlistlength as _, 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); - unsafe { PdhFormatFromRawValue(dwcountertype, dwformat, core::mem::transmute(ptimebase.unwrap_or(core::mem::zeroed())), prawvalue1, prawvalue2, core::mem::transmute(pfmtvalue)) } + unsafe { PdhFormatFromRawValue(dwcountertype, dwformat, ptimebase.unwrap_or(core::mem::zeroed()) as _, prawvalue1, prawvalue2, pfmtvalue as _) } } #[inline] pub unsafe fn PdhGetCounterInfoA(hcounter: PDH_HCOUNTER, bretrieveexplaintext: bool, pdwbuffersize: *mut u32, lpbuffer: Option<*mut PDH_COUNTER_INFO_A>) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhGetCounterInfoA(hcounter : PDH_HCOUNTER, bretrieveexplaintext : bool, pdwbuffersize : *mut u32, lpbuffer : *mut PDH_COUNTER_INFO_A) -> u32); - unsafe { PdhGetCounterInfoA(hcounter, bretrieveexplaintext, core::mem::transmute(pdwbuffersize), core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed()))) } + unsafe { PdhGetCounterInfoA(hcounter, bretrieveexplaintext, pdwbuffersize as _, lpbuffer.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn PdhGetCounterInfoW(hcounter: PDH_HCOUNTER, bretrieveexplaintext: bool, pdwbuffersize: *mut u32, lpbuffer: Option<*mut PDH_COUNTER_INFO_W>) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhGetCounterInfoW(hcounter : PDH_HCOUNTER, bretrieveexplaintext : bool, pdwbuffersize : *mut u32, lpbuffer : *mut PDH_COUNTER_INFO_W) -> u32); - unsafe { PdhGetCounterInfoW(hcounter, bretrieveexplaintext, core::mem::transmute(pdwbuffersize), core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed()))) } + unsafe { PdhGetCounterInfoW(hcounter, bretrieveexplaintext, pdwbuffersize as _, lpbuffer.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { PdhGetCounterTimeBase(hcounter, core::mem::transmute(ptimebase)) } + unsafe { PdhGetCounterTimeBase(hcounter, ptimebase as _) } } #[inline] pub unsafe fn PdhGetDataSourceTimeRangeA(szdatasource: P0, pdwnumentries: *mut u32, pinfo: *mut PDH_TIME_INFO, pdwbuffersize: *mut u32) -> u32 @@ -368,12 +368,12 @@ where P0: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhGetDataSourceTimeRangeA(szdatasource : windows_core::PCSTR, pdwnumentries : *mut u32, pinfo : *mut PDH_TIME_INFO, pdwbuffersize : *mut u32) -> u32); - unsafe { PdhGetDataSourceTimeRangeA(szdatasource.param().abi(), core::mem::transmute(pdwnumentries), core::mem::transmute(pinfo), core::mem::transmute(pdwbuffersize)) } + unsafe { PdhGetDataSourceTimeRangeA(szdatasource.param().abi(), pdwnumentries as _, pinfo as _, pdwbuffersize as _) } } #[inline] 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); - unsafe { PdhGetDataSourceTimeRangeH(core::mem::transmute(hdatasource.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwnumentries), core::mem::transmute(pinfo), core::mem::transmute(pdwbuffersize)) } + unsafe { PdhGetDataSourceTimeRangeH(hdatasource.unwrap_or(core::mem::zeroed()) as _, pdwnumentries as _, pinfo as _, pdwbuffersize as _) } } #[inline] pub unsafe fn PdhGetDataSourceTimeRangeW(szdatasource: P0, pdwnumentries: *mut u32, pinfo: *mut PDH_TIME_INFO, pdwbuffersize: *mut u32) -> u32 @@ -381,7 +381,7 @@ where P0: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhGetDataSourceTimeRangeW(szdatasource : windows_core::PCWSTR, pdwnumentries : *mut u32, pinfo : *mut PDH_TIME_INFO, pdwbuffersize : *mut u32) -> u32); - unsafe { PdhGetDataSourceTimeRangeW(szdatasource.param().abi(), core::mem::transmute(pdwnumentries), core::mem::transmute(pinfo), core::mem::transmute(pdwbuffersize)) } + unsafe { PdhGetDataSourceTimeRangeW(szdatasource.param().abi(), pdwnumentries as _, pinfo as _, pdwbuffersize as _) } } #[inline] pub unsafe fn PdhGetDefaultPerfCounterA(szdatasource: P0, szmachinename: P1, szobjectname: P2, szdefaultcountername: Option, pcchbuffersize: *mut u32) -> u32 @@ -391,7 +391,7 @@ where 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); - unsafe { PdhGetDefaultPerfCounterA(szdatasource.param().abi(), szmachinename.param().abi(), szobjectname.param().abi(), core::mem::transmute(szdefaultcountername.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize)) } + unsafe { PdhGetDefaultPerfCounterA(szdatasource.param().abi(), szmachinename.param().abi(), szobjectname.param().abi(), szdefaultcountername.unwrap_or(core::mem::zeroed()) as _, pcchbuffersize as _) } } #[inline] pub unsafe fn PdhGetDefaultPerfCounterHA(hdatasource: Option, szmachinename: P1, szobjectname: P2, szdefaultcountername: Option, pcchbuffersize: *mut u32) -> u32 @@ -400,7 +400,7 @@ where 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); - unsafe { 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)) } + unsafe { PdhGetDefaultPerfCounterHA(hdatasource.unwrap_or(core::mem::zeroed()) as _, szmachinename.param().abi(), szobjectname.param().abi(), szdefaultcountername.unwrap_or(core::mem::zeroed()) as _, pcchbuffersize as _) } } #[inline] pub unsafe fn PdhGetDefaultPerfCounterHW(hdatasource: Option, szmachinename: P1, szobjectname: P2, szdefaultcountername: Option, pcchbuffersize: *mut u32) -> u32 @@ -409,7 +409,7 @@ where 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); - unsafe { 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)) } + unsafe { PdhGetDefaultPerfCounterHW(hdatasource.unwrap_or(core::mem::zeroed()) as _, szmachinename.param().abi(), szobjectname.param().abi(), szdefaultcountername.unwrap_or(core::mem::zeroed()) as _, pcchbuffersize as _) } } #[inline] pub unsafe fn PdhGetDefaultPerfCounterW(szdatasource: P0, szmachinename: P1, szobjectname: P2, szdefaultcountername: Option, pcchbuffersize: *mut u32) -> u32 @@ -419,7 +419,7 @@ where 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); - unsafe { PdhGetDefaultPerfCounterW(szdatasource.param().abi(), szmachinename.param().abi(), szobjectname.param().abi(), core::mem::transmute(szdefaultcountername.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize)) } + unsafe { PdhGetDefaultPerfCounterW(szdatasource.param().abi(), szmachinename.param().abi(), szobjectname.param().abi(), szdefaultcountername.unwrap_or(core::mem::zeroed()) as _, pcchbuffersize as _) } } #[inline] pub unsafe fn PdhGetDefaultPerfObjectA(szdatasource: P0, szmachinename: P1, szdefaultobjectname: Option, pcchbuffersize: *mut u32) -> u32 @@ -428,7 +428,7 @@ where 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); - unsafe { PdhGetDefaultPerfObjectA(szdatasource.param().abi(), szmachinename.param().abi(), core::mem::transmute(szdefaultobjectname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize)) } + unsafe { PdhGetDefaultPerfObjectA(szdatasource.param().abi(), szmachinename.param().abi(), szdefaultobjectname.unwrap_or(core::mem::zeroed()) as _, pcchbuffersize as _) } } #[inline] pub unsafe fn PdhGetDefaultPerfObjectHA(hdatasource: Option, szmachinename: P1, szdefaultobjectname: Option, pcchbuffersize: *mut u32) -> u32 @@ -436,7 +436,7 @@ where 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); - unsafe { 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)) } + unsafe { PdhGetDefaultPerfObjectHA(hdatasource.unwrap_or(core::mem::zeroed()) as _, szmachinename.param().abi(), szdefaultobjectname.unwrap_or(core::mem::zeroed()) as _, pcchbuffersize as _) } } #[inline] pub unsafe fn PdhGetDefaultPerfObjectHW(hdatasource: Option, szmachinename: P1, szdefaultobjectname: Option, pcchbuffersize: *mut u32) -> u32 @@ -444,7 +444,7 @@ where 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); - unsafe { 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)) } + unsafe { PdhGetDefaultPerfObjectHW(hdatasource.unwrap_or(core::mem::zeroed()) as _, szmachinename.param().abi(), szdefaultobjectname.unwrap_or(core::mem::zeroed()) as _, pcchbuffersize as _) } } #[inline] pub unsafe fn PdhGetDefaultPerfObjectW(szdatasource: P0, szmachinename: P1, szdefaultobjectname: Option, pcchbuffersize: *mut u32) -> u32 @@ -453,52 +453,52 @@ where 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); - unsafe { PdhGetDefaultPerfObjectW(szdatasource.param().abi(), szmachinename.param().abi(), core::mem::transmute(szdefaultobjectname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize)) } + unsafe { PdhGetDefaultPerfObjectW(szdatasource.param().abi(), szmachinename.param().abi(), szdefaultobjectname.unwrap_or(core::mem::zeroed()) as _, pcchbuffersize as _) } } #[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); - unsafe { PdhGetDllVersion(core::mem::transmute(lpdwversion.unwrap_or(core::mem::zeroed()))) } + unsafe { PdhGetDllVersion(lpdwversion.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { PdhGetFormattedCounterArrayA(hcounter, dwformat, core::mem::transmute(lpdwbuffersize), core::mem::transmute(lpdwitemcount), core::mem::transmute(itembuffer.unwrap_or(core::mem::zeroed()))) } + unsafe { PdhGetFormattedCounterArrayA(hcounter, dwformat, lpdwbuffersize as _, lpdwitemcount as _, itembuffer.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { PdhGetFormattedCounterArrayW(hcounter, dwformat, core::mem::transmute(lpdwbuffersize), core::mem::transmute(lpdwitemcount), core::mem::transmute(itembuffer.unwrap_or(core::mem::zeroed()))) } + unsafe { PdhGetFormattedCounterArrayW(hcounter, dwformat, lpdwbuffersize as _, lpdwitemcount as _, itembuffer.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { PdhGetFormattedCounterValue(hcounter, dwformat, core::mem::transmute(lpdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvalue)) } + unsafe { PdhGetFormattedCounterValue(hcounter, dwformat, lpdwtype.unwrap_or(core::mem::zeroed()) as _, pvalue as _) } } #[inline] 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); - unsafe { PdhGetLogFileSize(hlog, core::mem::transmute(llsize)) } + unsafe { PdhGetLogFileSize(hlog, llsize as _) } } #[inline] 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); - unsafe { PdhGetLogSetGUID(hlog, core::mem::transmute(pguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(prunid.unwrap_or(core::mem::zeroed()))) } + unsafe { PdhGetLogSetGUID(hlog, pguid.unwrap_or(core::mem::zeroed()) as _, prunid.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { PdhGetRawCounterArrayA(hcounter, core::mem::transmute(lpdwbuffersize), core::mem::transmute(lpdwitemcount), core::mem::transmute(itembuffer.unwrap_or(core::mem::zeroed()))) } + unsafe { PdhGetRawCounterArrayA(hcounter, lpdwbuffersize as _, lpdwitemcount as _, itembuffer.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { PdhGetRawCounterArrayW(hcounter, core::mem::transmute(lpdwbuffersize), core::mem::transmute(lpdwitemcount), core::mem::transmute(itembuffer.unwrap_or(core::mem::zeroed()))) } + unsafe { PdhGetRawCounterArrayW(hcounter, lpdwbuffersize as _, lpdwitemcount as _, itembuffer.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { PdhGetRawCounterValue(hcounter, core::mem::transmute(lpdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvalue)) } + unsafe { PdhGetRawCounterValue(hcounter, lpdwtype.unwrap_or(core::mem::zeroed()) as _, pvalue as _) } } #[inline] pub unsafe fn PdhIsRealTimeQuery(hquery: PDH_HQUERY) -> super::super::Foundation::BOOL { @@ -512,7 +512,7 @@ where P1: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhLookupPerfIndexByNameA(szmachinename : windows_core::PCSTR, sznamebuffer : windows_core::PCSTR, pdwindex : *mut u32) -> u32); - unsafe { PdhLookupPerfIndexByNameA(szmachinename.param().abi(), sznamebuffer.param().abi(), core::mem::transmute(pdwindex)) } + unsafe { PdhLookupPerfIndexByNameA(szmachinename.param().abi(), sznamebuffer.param().abi(), pdwindex as _) } } #[inline] pub unsafe fn PdhLookupPerfIndexByNameW(szmachinename: P0, sznamebuffer: P1, pdwindex: *mut u32) -> u32 @@ -521,7 +521,7 @@ where P1: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhLookupPerfIndexByNameW(szmachinename : windows_core::PCWSTR, sznamebuffer : windows_core::PCWSTR, pdwindex : *mut u32) -> u32); - unsafe { PdhLookupPerfIndexByNameW(szmachinename.param().abi(), sznamebuffer.param().abi(), core::mem::transmute(pdwindex)) } + unsafe { PdhLookupPerfIndexByNameW(szmachinename.param().abi(), sznamebuffer.param().abi(), pdwindex as _) } } #[inline] pub unsafe fn PdhLookupPerfNameByIndexA(szmachinename: P0, dwnameindex: u32, sznamebuffer: Option, pcchnamebuffersize: *mut u32) -> u32 @@ -529,7 +529,7 @@ 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); - unsafe { PdhLookupPerfNameByIndexA(szmachinename.param().abi(), dwnameindex, core::mem::transmute(sznamebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchnamebuffersize)) } + unsafe { PdhLookupPerfNameByIndexA(szmachinename.param().abi(), dwnameindex, sznamebuffer.unwrap_or(core::mem::zeroed()) as _, pcchnamebuffersize as _) } } #[inline] pub unsafe fn PdhLookupPerfNameByIndexW(szmachinename: P0, dwnameindex: u32, sznamebuffer: Option, pcchnamebuffersize: *mut u32) -> u32 @@ -537,17 +537,17 @@ 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); - unsafe { PdhLookupPerfNameByIndexW(szmachinename.param().abi(), dwnameindex, core::mem::transmute(sznamebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchnamebuffersize)) } + unsafe { PdhLookupPerfNameByIndexW(szmachinename.param().abi(), dwnameindex, sznamebuffer.unwrap_or(core::mem::zeroed()) as _, pcchnamebuffersize as _) } } #[inline] 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); - unsafe { PdhMakeCounterPathA(pcounterpathelements, core::mem::transmute(szfullpathbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize), dwflags) } + unsafe { PdhMakeCounterPathA(pcounterpathelements, szfullpathbuffer.unwrap_or(core::mem::zeroed()) as _, pcchbuffersize as _, dwflags) } } #[inline] 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); - unsafe { PdhMakeCounterPathW(pcounterpathelements, core::mem::transmute(szfullpathbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize), dwflags) } + unsafe { PdhMakeCounterPathW(pcounterpathelements, szfullpathbuffer.unwrap_or(core::mem::zeroed()) as _, pcchbuffersize as _, dwflags) } } #[inline] 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 @@ -556,7 +556,7 @@ where 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); - unsafe { PdhOpenLogA(szlogfilename.param().abi(), dwaccessflags, core::mem::transmute(lpdwlogtype), core::mem::transmute(hquery.unwrap_or(core::mem::zeroed())), dwmaxsize, szusercaption.param().abi(), core::mem::transmute(phlog)) } + unsafe { PdhOpenLogA(szlogfilename.param().abi(), dwaccessflags, lpdwlogtype as _, hquery.unwrap_or(core::mem::zeroed()) as _, dwmaxsize, szusercaption.param().abi(), phlog as _) } } #[inline] 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 @@ -565,7 +565,7 @@ where 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); - unsafe { PdhOpenLogW(szlogfilename.param().abi(), dwaccessflags, core::mem::transmute(lpdwlogtype), core::mem::transmute(hquery.unwrap_or(core::mem::zeroed())), dwmaxsize, szusercaption.param().abi(), core::mem::transmute(phlog)) } + unsafe { PdhOpenLogW(szlogfilename.param().abi(), dwaccessflags, lpdwlogtype as _, hquery.unwrap_or(core::mem::zeroed()) as _, dwmaxsize, szusercaption.param().abi(), phlog as _) } } #[inline] pub unsafe fn PdhOpenQueryA(szdatasource: P0, dwuserdata: usize, phquery: *mut PDH_HQUERY) -> u32 @@ -573,12 +573,12 @@ where P0: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhOpenQueryA(szdatasource : windows_core::PCSTR, dwuserdata : usize, phquery : *mut PDH_HQUERY) -> u32); - unsafe { PdhOpenQueryA(szdatasource.param().abi(), dwuserdata, core::mem::transmute(phquery)) } + unsafe { PdhOpenQueryA(szdatasource.param().abi(), dwuserdata, phquery as _) } } #[inline] 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); - unsafe { PdhOpenQueryH(core::mem::transmute(hdatasource.unwrap_or(core::mem::zeroed())), dwuserdata, core::mem::transmute(phquery)) } + unsafe { PdhOpenQueryH(hdatasource.unwrap_or(core::mem::zeroed()) as _, dwuserdata, phquery as _) } } #[inline] pub unsafe fn PdhOpenQueryW(szdatasource: P0, dwuserdata: usize, phquery: *mut PDH_HQUERY) -> u32 @@ -586,7 +586,7 @@ where P0: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhOpenQueryW(szdatasource : windows_core::PCWSTR, dwuserdata : usize, phquery : *mut PDH_HQUERY) -> u32); - unsafe { PdhOpenQueryW(szdatasource.param().abi(), dwuserdata, core::mem::transmute(phquery)) } + unsafe { PdhOpenQueryW(szdatasource.param().abi(), dwuserdata, phquery as _) } } #[inline] pub unsafe fn PdhParseCounterPathA(szfullpathbuffer: P0, pcounterpathelements: Option<*mut PDH_COUNTER_PATH_ELEMENTS_A>, pdwbuffersize: *mut u32, dwflags: u32) -> u32 @@ -594,7 +594,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); - unsafe { PdhParseCounterPathA(szfullpathbuffer.param().abi(), core::mem::transmute(pcounterpathelements.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwbuffersize), dwflags) } + unsafe { PdhParseCounterPathA(szfullpathbuffer.param().abi(), pcounterpathelements.unwrap_or(core::mem::zeroed()) as _, pdwbuffersize as _, dwflags) } } #[inline] pub unsafe fn PdhParseCounterPathW(szfullpathbuffer: P0, pcounterpathelements: Option<*mut PDH_COUNTER_PATH_ELEMENTS_W>, pdwbuffersize: *mut u32, dwflags: u32) -> u32 @@ -602,7 +602,7 @@ where P0: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhParseCounterPathW(szfullpathbuffer : windows_core::PCWSTR, pcounterpathelements : *mut PDH_COUNTER_PATH_ELEMENTS_W, pdwbuffersize : *mut u32, dwflags : u32) -> u32); - unsafe { PdhParseCounterPathW(szfullpathbuffer.param().abi(), core::mem::transmute(pcounterpathelements.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwbuffersize), dwflags) } + unsafe { PdhParseCounterPathW(szfullpathbuffer.param().abi(), pcounterpathelements.unwrap_or(core::mem::zeroed()) as _, pdwbuffersize as _, dwflags) } } #[inline] pub unsafe fn PdhParseInstanceNameA(szinstancestring: P0, szinstancename: Option, pcchinstancenamelength: *mut u32, szparentname: Option, pcchparentnamelength: *mut u32, lpindex: *mut u32) -> u32 @@ -610,7 +610,7 @@ 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); - unsafe { 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)) } + unsafe { PdhParseInstanceNameA(szinstancestring.param().abi(), szinstancename.unwrap_or(core::mem::zeroed()) as _, pcchinstancenamelength as _, szparentname.unwrap_or(core::mem::zeroed()) as _, pcchparentnamelength as _, lpindex as _) } } #[inline] pub unsafe fn PdhParseInstanceNameW(szinstancestring: P0, szinstancename: Option, pcchinstancenamelength: *mut u32, szparentname: Option, pcchparentnamelength: *mut u32, lpindex: *mut u32) -> u32 @@ -618,12 +618,12 @@ 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); - unsafe { 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)) } + unsafe { PdhParseInstanceNameW(szinstancestring.param().abi(), szinstancename.unwrap_or(core::mem::zeroed()) as _, pcchinstancenamelength as _, szparentname.unwrap_or(core::mem::zeroed()) as _, pcchparentnamelength as _, lpindex as _) } } #[inline] 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); - unsafe { PdhReadRawLogRecord(hlog, core::mem::transmute(ftrecord), core::mem::transmute(prawlogrecord.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwbufferlength)) } + unsafe { PdhReadRawLogRecord(hlog, core::mem::transmute(ftrecord), prawlogrecord.unwrap_or(core::mem::zeroed()) as _, pdwbufferlength as _) } } #[inline] pub unsafe fn PdhRemoveCounter(hcounter: PDH_HCOUNTER) -> u32 { @@ -633,17 +633,17 @@ pub unsafe fn PdhRemoveCounter(hcounter: PDH_HCOUNTER) -> u32 { #[inline] 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); - unsafe { PdhSelectDataSourceA(hwndowner, dwflags, core::mem::transmute(szdatasource), core::mem::transmute(pcchbufferlength)) } + unsafe { PdhSelectDataSourceA(hwndowner, dwflags, core::mem::transmute(szdatasource), pcchbufferlength as _) } } #[inline] 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); - unsafe { PdhSelectDataSourceW(hwndowner, dwflags, core::mem::transmute(szdatasource), core::mem::transmute(pcchbufferlength)) } + unsafe { PdhSelectDataSourceW(hwndowner, dwflags, core::mem::transmute(szdatasource), pcchbufferlength as _) } } #[inline] pub unsafe fn PdhSetCounterScaleFactor(hcounter: PDH_HCOUNTER, lfactor: i32) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhSetCounterScaleFactor(hcounter : PDH_HCOUNTER, lfactor : i32) -> u32); - unsafe { PdhSetCounterScaleFactor(core::mem::transmute(hcounter), lfactor) } + unsafe { PdhSetCounterScaleFactor(hcounter as _, lfactor) } } #[inline] pub unsafe fn PdhSetDefaultRealTimeDataSource(dwdatasourceid: REAL_TIME_DATA_SOURCE_ID_FLAGS) -> u32 { @@ -653,7 +653,7 @@ pub unsafe fn PdhSetDefaultRealTimeDataSource(dwdatasourceid: REAL_TIME_DATA_SOU #[inline] pub unsafe fn PdhSetLogSetRunID(hlog: PDH_HLOG, runid: i32) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhSetLogSetRunID(hlog : PDH_HLOG, runid : i32) -> u32); - unsafe { PdhSetLogSetRunID(core::mem::transmute(hlog), runid) } + unsafe { PdhSetLogSetRunID(hlog as _, runid) } } #[inline] pub unsafe fn PdhSetQueryTimeRange(hquery: PDH_HQUERY, pinfo: *const PDH_TIME_INFO) -> u32 { @@ -695,7 +695,7 @@ where P1: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhValidatePathExA(hdatasource : PDH_HLOG, szfullpathbuffer : windows_core::PCSTR) -> u32); - unsafe { PdhValidatePathExA(core::mem::transmute(hdatasource.unwrap_or(core::mem::zeroed())), szfullpathbuffer.param().abi()) } + unsafe { PdhValidatePathExA(hdatasource.unwrap_or(core::mem::zeroed()) as _, szfullpathbuffer.param().abi()) } } #[inline] pub unsafe fn PdhValidatePathExW(hdatasource: Option, szfullpathbuffer: P1) -> u32 @@ -703,7 +703,7 @@ where P1: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhValidatePathExW(hdatasource : PDH_HLOG, szfullpathbuffer : windows_core::PCWSTR) -> u32); - unsafe { PdhValidatePathExW(core::mem::transmute(hdatasource.unwrap_or(core::mem::zeroed())), szfullpathbuffer.param().abi()) } + unsafe { PdhValidatePathExW(hdatasource.unwrap_or(core::mem::zeroed()) as _, szfullpathbuffer.param().abi()) } } #[inline] pub unsafe fn PdhValidatePathW(szfullpathbuffer: P0) -> u32 @@ -732,7 +732,7 @@ where #[inline] 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); - unsafe { PerfAddCounters(hquery, core::mem::transmute(pcounters), cbcounters) } + unsafe { PerfAddCounters(hquery, pcounters as _, cbcounters) } } #[inline] pub unsafe fn PerfCloseQueryHandle(hquery: super::super::Foundation::HANDLE) -> u32 { @@ -750,17 +750,17 @@ where #[inline] 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); - unsafe { PerfDecrementULongCounterValue(provider, core::mem::transmute(instance), counterid, value) } + unsafe { PerfDecrementULongCounterValue(provider, instance as _, counterid, value) } } #[inline] 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); - unsafe { PerfDecrementULongLongCounterValue(provider, core::mem::transmute(instance), counterid, value) } + unsafe { PerfDecrementULongLongCounterValue(provider, instance as _, counterid, value) } } #[inline] 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); - unsafe { PerfDeleteCounters(hquery, core::mem::transmute(pcounters), cbcounters) } + unsafe { PerfDeleteCounters(hquery, pcounters as _, cbcounters) } } #[inline] pub unsafe fn PerfDeleteInstance(provider: super::super::Foundation::HANDLE, instanceblock: *const PERF_COUNTERSET_INSTANCE) -> u32 { @@ -773,7 +773,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn PerfEnumerateCounterSet(szmachine : windows_core::PCWSTR, pcountersetids : *mut windows_core::GUID, ccountersetids : u32, pccountersetidsactual : *mut u32) -> u32); - unsafe { PerfEnumerateCounterSet(szmachine.param().abi(), core::mem::transmute(pcountersetids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcountersetids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pccountersetidsactual)) } + unsafe { PerfEnumerateCounterSet(szmachine.param().abi(), core::mem::transmute(pcountersetids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcountersetids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pccountersetidsactual as _) } } #[inline] pub unsafe fn PerfEnumerateCounterSetInstances(szmachine: P0, pcountersetid: *const windows_core::GUID, pinstances: Option<*mut PERF_INSTANCE_HEADER>, cbinstances: u32, pcbinstancesactual: *mut u32) -> u32 @@ -781,17 +781,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); - unsafe { PerfEnumerateCounterSetInstances(szmachine.param().abi(), pcountersetid, core::mem::transmute(pinstances.unwrap_or(core::mem::zeroed())), cbinstances, core::mem::transmute(pcbinstancesactual)) } + unsafe { PerfEnumerateCounterSetInstances(szmachine.param().abi(), pcountersetid, pinstances.unwrap_or(core::mem::zeroed()) as _, cbinstances, pcbinstancesactual as _) } } #[inline] 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); - unsafe { PerfIncrementULongCounterValue(provider, core::mem::transmute(instance), counterid, value) } + unsafe { PerfIncrementULongCounterValue(provider, instance as _, counterid, value) } } #[inline] 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); - unsafe { PerfIncrementULongLongCounterValue(provider, core::mem::transmute(instance), counterid, value) } + unsafe { PerfIncrementULongLongCounterValue(provider, instance as _, counterid, value) } } #[inline] pub unsafe fn PerfOpenQueryHandle(szmachine: P0, phquery: *mut super::super::Foundation::HANDLE) -> u32 @@ -799,17 +799,17 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn PerfOpenQueryHandle(szmachine : windows_core::PCWSTR, phquery : *mut super::super::Foundation:: HANDLE) -> u32); - unsafe { PerfOpenQueryHandle(szmachine.param().abi(), core::mem::transmute(phquery)) } + unsafe { PerfOpenQueryHandle(szmachine.param().abi(), phquery as _) } } #[inline] 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); - unsafe { PerfQueryCounterData(hquery, core::mem::transmute(pcounterblock.unwrap_or(core::mem::zeroed())), cbcounterblock, core::mem::transmute(pcbcounterblockactual)) } + unsafe { PerfQueryCounterData(hquery, pcounterblock.unwrap_or(core::mem::zeroed()) as _, cbcounterblock, pcbcounterblockactual as _) } } #[inline] 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); - unsafe { PerfQueryCounterInfo(hquery, core::mem::transmute(pcounters.unwrap_or(core::mem::zeroed())), cbcounters, core::mem::transmute(pcbcountersactual)) } + unsafe { PerfQueryCounterInfo(hquery, pcounters.unwrap_or(core::mem::zeroed()) as _, cbcounters, pcbcountersactual as _) } } #[inline] pub unsafe fn PerfQueryCounterSetRegistrationInfo(szmachine: P0, pcountersetid: *const windows_core::GUID, requestcode: PerfRegInfoType, requestlangid: u32, pbreginfo: Option<&mut [u8]>, pcbreginfoactual: *mut u32) -> u32 @@ -817,7 +817,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn PerfQueryCounterSetRegistrationInfo(szmachine : windows_core::PCWSTR, pcountersetid : *const windows_core::GUID, requestcode : PerfRegInfoType, requestlangid : u32, pbreginfo : *mut u8, cbreginfo : u32, pcbreginfoactual : *mut u32) -> u32); - unsafe { PerfQueryCounterSetRegistrationInfo(szmachine.param().abi(), pcountersetid, requestcode, 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)) } + unsafe { PerfQueryCounterSetRegistrationInfo(szmachine.param().abi(), pcountersetid, requestcode, 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()), pcbreginfoactual as _) } } #[inline] pub unsafe fn PerfQueryInstance(providerhandle: super::super::Foundation::HANDLE, countersetguid: *const windows_core::GUID, name: P2, id: u32) -> *mut PERF_COUNTERSET_INSTANCE @@ -830,32 +830,32 @@ where #[inline] 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); - unsafe { PerfSetCounterRefValue(provider, core::mem::transmute(instance), counterid, address) } + unsafe { PerfSetCounterRefValue(provider, instance as _, counterid, address) } } #[inline] 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); - unsafe { PerfSetCounterSetInfo(providerhandle, core::mem::transmute(template), templatesize) } + unsafe { PerfSetCounterSetInfo(providerhandle, template as _, templatesize) } } #[inline] 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); - unsafe { PerfSetULongCounterValue(provider, core::mem::transmute(instance), counterid, value) } + unsafe { PerfSetULongCounterValue(provider, instance as _, counterid, value) } } #[inline] 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); - unsafe { PerfSetULongLongCounterValue(provider, core::mem::transmute(instance), counterid, value) } + unsafe { PerfSetULongLongCounterValue(provider, instance as _, counterid, value) } } #[inline] 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); - unsafe { PerfStartProvider(providerguid, core::mem::transmute(controlcallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(phprovider)) } + unsafe { PerfStartProvider(providerguid, controlcallback.unwrap_or(core::mem::zeroed()) as _, phprovider as _) } } #[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); - unsafe { PerfStartProviderEx(providerguid, core::mem::transmute(providercontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(provider)) } + unsafe { PerfStartProviderEx(providerguid, providercontext.unwrap_or(core::mem::zeroed()) as _, provider as _) } } #[inline] pub unsafe fn PerfStopProvider(providerhandle: super::super::Foundation::HANDLE) -> u32 { @@ -865,12 +865,12 @@ pub unsafe fn PerfStopProvider(providerhandle: super::super::Foundation::HANDLE) #[inline] pub unsafe fn QueryPerformanceCounter(lpperformancecount: *mut i64) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn QueryPerformanceCounter(lpperformancecount : *mut i64) -> super::super::Foundation:: BOOL); - unsafe { QueryPerformanceCounter(core::mem::transmute(lpperformancecount)).ok() } + unsafe { QueryPerformanceCounter(lpperformancecount as _).ok() } } #[inline] pub unsafe fn QueryPerformanceFrequency(lpfrequency: *mut i64) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn QueryPerformanceFrequency(lpfrequency : *mut i64) -> super::super::Foundation:: BOOL); - unsafe { QueryPerformanceFrequency(core::mem::transmute(lpfrequency)).ok() } + unsafe { QueryPerformanceFrequency(lpfrequency as _).ok() } } #[inline] pub unsafe fn RestorePerfRegistryFromFileW(szfilename: P0, szlangid: P1) -> u32 @@ -2135,10 +2135,10 @@ impl ICounterItem { } } pub unsafe fn GetValue(&self, value: *mut f64, status: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetValue)(windows_core::Interface::as_raw(self), core::mem::transmute(value), core::mem::transmute(status)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetValue)(windows_core::Interface::as_raw(self), value as _, status as _).ok() } } pub unsafe fn GetStatistics(&self, max: *mut f64, min: *mut f64, avg: *mut f64, status: *mut i32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetStatistics)(windows_core::Interface::as_raw(self), max as _, min as _, avg as _, status as _).ok() } } } #[repr(C)] @@ -7391,7 +7391,7 @@ impl ISystemMonitor2 { unsafe { (windows_core::Interface::vtable(self).SetLogViewRange)(windows_core::Interface::as_raw(self), starttime, stoptime).ok() } } pub unsafe fn GetLogViewRange(&self, starttime: *mut f64, stoptime: *mut f64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLogViewRange)(windows_core::Interface::as_raw(self), core::mem::transmute(starttime), core::mem::transmute(stoptime)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLogViewRange)(windows_core::Interface::as_raw(self), starttime as _, stoptime as _).ok() } } pub unsafe fn BatchingLock(&self, flock: super::super::Foundation::VARIANT_BOOL, ebatchreason: SysmonBatchReason) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).BatchingLock)(windows_core::Interface::as_raw(self), flock, ebatchreason).ok() } @@ -10763,10 +10763,10 @@ impl _ICounterItemUnion { } } pub unsafe fn GetValue(&self, value: *mut f64, status: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetValue)(windows_core::Interface::as_raw(self), core::mem::transmute(value), core::mem::transmute(status)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetValue)(windows_core::Interface::as_raw(self), value as _, status as _).ok() } } pub unsafe fn GetStatistics(&self, max: *mut f64, min: *mut f64, avg: *mut f64, status: *mut i32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetStatistics)(windows_core::Interface::as_raw(self), max as _, min as _, avg as _, status as _).ok() } } pub unsafe fn SetSelected(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSelected)(windows_core::Interface::as_raw(self), bstate).ok() } @@ -11446,7 +11446,7 @@ impl _ISystemMonitorUnion { unsafe { (windows_core::Interface::vtable(self).SetLogViewRange)(windows_core::Interface::as_raw(self), starttime, stoptime).ok() } } pub unsafe fn GetLogViewRange(&self, starttime: *mut f64, stoptime: *mut f64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLogViewRange)(windows_core::Interface::as_raw(self), core::mem::transmute(starttime), core::mem::transmute(stoptime)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLogViewRange)(windows_core::Interface::as_raw(self), starttime as _, stoptime as _).ok() } } pub unsafe fn BatchingLock(&self, flock: super::super::Foundation::VARIANT_BOOL, ebatchreason: SysmonBatchReason) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).BatchingLock)(windows_core::Interface::as_raw(self), flock, ebatchreason).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 32f6b0295c..407ca5cf36 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); - unsafe { CallNamedPipeA(lpnamedpipename.param().abi(), core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), noutbuffersize, core::mem::transmute(lpbytesread), ntimeout).ok() } + unsafe { CallNamedPipeA(lpnamedpipename.param().abi(), lpinbuffer.unwrap_or(core::mem::zeroed()) as _, ninbuffersize, lpoutbuffer.unwrap_or(core::mem::zeroed()) as _, noutbuffersize, lpbytesread as _, 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,13 +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); - unsafe { CallNamedPipeW(lpnamedpipename.param().abi(), core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), noutbuffersize, core::mem::transmute(lpbytesread), ntimeout) } + unsafe { CallNamedPipeW(lpnamedpipename.param().abi(), lpinbuffer.unwrap_or(core::mem::zeroed()) as _, ninbuffersize, lpoutbuffer.unwrap_or(core::mem::zeroed()) as _, noutbuffersize, lpbytesread as _, ntimeout) } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { ConnectNamedPipe(hnamedpipe, core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ConnectNamedPipe(hnamedpipe, lpoverlapped.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(all(feature = "Win32_Security", feature = "Win32_Storage_FileSystem"))] #[inline] @@ -27,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__ = unsafe { CreateNamedPipeA(lpname.param().abi(), dwopenmode, dwpipemode, nmaxinstances, noutbuffersize, ninbuffersize, ndefaulttimeout, core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { CreateNamedPipeA(lpname.param().abi(), dwopenmode, dwpipemode, nmaxinstances, noutbuffersize, ninbuffersize, ndefaulttimeout, lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(all(feature = "Win32_Security", feature = "Win32_Storage_FileSystem"))] @@ -37,13 +37,13 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateNamedPipeW(lpname : windows_core::PCWSTR, dwopenmode : super::super::Storage::FileSystem:: FILE_FLAGS_AND_ATTRIBUTES, dwpipemode : NAMED_PIPE_MODE, nmaxinstances : u32, noutbuffersize : u32, ninbuffersize : u32, ndefaulttimeout : u32, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES) -> super::super::Foundation:: HANDLE); - unsafe { CreateNamedPipeW(lpname.param().abi(), dwopenmode, dwpipemode, nmaxinstances, noutbuffersize, ninbuffersize, ndefaulttimeout, core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed()))) } + unsafe { CreateNamedPipeW(lpname.param().abi(), dwopenmode, dwpipemode, nmaxinstances, noutbuffersize, ninbuffersize, ndefaulttimeout, lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CreatePipe(core::mem::transmute(hreadpipe), core::mem::transmute(hwritepipe), core::mem::transmute(lppipeattributes.unwrap_or(core::mem::zeroed())), nsize).ok() } + unsafe { CreatePipe(hreadpipe as _, hwritepipe as _, lppipeattributes.unwrap_or(core::mem::zeroed()) as _, nsize).ok() } } #[inline] pub unsafe fn DisconnectNamedPipe(hnamedpipe: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -63,37 +63,37 @@ pub unsafe fn GetNamedPipeClientComputerNameW(pipe: super::super::Foundation::HA #[inline] 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); - unsafe { GetNamedPipeClientProcessId(pipe, core::mem::transmute(clientprocessid)).ok() } + unsafe { GetNamedPipeClientProcessId(pipe, clientprocessid as _).ok() } } #[inline] 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); - unsafe { GetNamedPipeClientSessionId(pipe, core::mem::transmute(clientsessionid)).ok() } + unsafe { GetNamedPipeClientSessionId(pipe, clientsessionid as _).ok() } } #[inline] 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); - unsafe { GetNamedPipeHandleStateA(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() } + unsafe { GetNamedPipeHandleStateA(hnamedpipe, lpstate.unwrap_or(core::mem::zeroed()) as _, lpcurinstances.unwrap_or(core::mem::zeroed()) as _, lpmaxcollectioncount.unwrap_or(core::mem::zeroed()) as _, lpcollectdatatimeout.unwrap_or(core::mem::zeroed()) as _, 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: 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); - unsafe { GetNamedPipeHandleStateW(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())) } + unsafe { GetNamedPipeHandleStateW(hnamedpipe, lpstate.unwrap_or(core::mem::zeroed()) as _, lpcurinstances.unwrap_or(core::mem::zeroed()) as _, lpmaxcollectioncount.unwrap_or(core::mem::zeroed()) as _, lpcollectdatatimeout.unwrap_or(core::mem::zeroed()) as _, 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: 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); - unsafe { GetNamedPipeInfo(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() } + unsafe { GetNamedPipeInfo(hnamedpipe, lpflags.unwrap_or(core::mem::zeroed()) as _, lpoutbuffersize.unwrap_or(core::mem::zeroed()) as _, lpinbuffersize.unwrap_or(core::mem::zeroed()) as _, lpmaxinstances.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { GetNamedPipeServerProcessId(pipe, core::mem::transmute(serverprocessid)).ok() } + unsafe { GetNamedPipeServerProcessId(pipe, serverprocessid as _).ok() } } #[inline] 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); - unsafe { GetNamedPipeServerSessionId(pipe, core::mem::transmute(serversessionid)).ok() } + unsafe { GetNamedPipeServerSessionId(pipe, serversessionid as _).ok() } } #[inline] pub unsafe fn ImpersonateNamedPipeClient(hnamedpipe: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -103,18 +103,18 @@ pub unsafe fn ImpersonateNamedPipeClient(hnamedpipe: super::super::Foundation::H #[inline] 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); - unsafe { PeekNamedPipe(hnamedpipe, core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), 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() } + unsafe { PeekNamedPipe(hnamedpipe, lpbuffer.unwrap_or(core::mem::zeroed()) as _, nbuffersize, lpbytesread.unwrap_or(core::mem::zeroed()) as _, lptotalbytesavail.unwrap_or(core::mem::zeroed()) as _, lpbytesleftthismessage.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { SetNamedPipeHandleState(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() } + unsafe { SetNamedPipeHandleState(hnamedpipe, lpmode.unwrap_or(core::mem::zeroed()) as _, lpmaxcollectioncount.unwrap_or(core::mem::zeroed()) as _, lpcollectdatatimeout.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_IO")] #[inline] 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); - unsafe { TransactNamedPipe(hnamedpipe, core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), noutbuffersize, core::mem::transmute(lpbytesread), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { TransactNamedPipe(hnamedpipe, lpinbuffer.unwrap_or(core::mem::zeroed()) as _, ninbuffersize, lpoutbuffer.unwrap_or(core::mem::zeroed()) as _, noutbuffersize, lpbytesread as _, lpoverlapped.unwrap_or(core::mem::zeroed()) as _).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 d00ccb56e2..ab744852fc 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); - unsafe { CallNtPowerInformation(informationlevel, core::mem::transmute(inputbuffer.unwrap_or(core::mem::zeroed())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(core::mem::zeroed())), outputbufferlength) } + unsafe { CallNtPowerInformation(informationlevel, inputbuffer.unwrap_or(core::mem::zeroed()) as _, inputbufferlength, outputbuffer.unwrap_or(core::mem::zeroed()) as _, outputbufferlength) } } #[inline] pub unsafe fn CanUserWritePwrScheme() -> bool { @@ -21,12 +21,12 @@ pub unsafe fn DevicePowerClose() -> bool { #[inline] pub unsafe fn DevicePowerEnumDevices(queryindex: u32, queryinterpretationflags: u32, queryflags: u32, preturnbuffer: Option<*mut u8>, pbuffersize: *mut u32) -> bool { windows_targets::link!("powrprof.dll" "system" fn DevicePowerEnumDevices(queryindex : u32, queryinterpretationflags : u32, queryflags : u32, preturnbuffer : *mut u8, pbuffersize : *mut u32) -> bool); - unsafe { DevicePowerEnumDevices(queryindex, queryinterpretationflags, queryflags, core::mem::transmute(preturnbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbuffersize)) } + unsafe { DevicePowerEnumDevices(queryindex, queryinterpretationflags, queryflags, preturnbuffer.unwrap_or(core::mem::zeroed()) as _, pbuffersize as _) } } #[inline] pub unsafe fn DevicePowerOpen(debugmask: Option) -> bool { windows_targets::link!("powrprof.dll" "system" fn DevicePowerOpen(debugmask : u32) -> bool); - unsafe { DevicePowerOpen(core::mem::transmute(debugmask.unwrap_or(core::mem::zeroed()))) } + unsafe { DevicePowerOpen(debugmask.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn DevicePowerSetDeviceState(devicedescription: P0, setflags: u32, setdata: Option<*const core::ffi::c_void>) -> u32 @@ -34,7 +34,7 @@ where P0: windows_core::Param, { windows_targets::link!("powrprof.dll" "system" fn DevicePowerSetDeviceState(devicedescription : windows_core::PCWSTR, setflags : u32, setdata : *const core::ffi::c_void) -> u32); - unsafe { DevicePowerSetDeviceState(devicedescription.param().abi(), setflags, core::mem::transmute(setdata.unwrap_or(core::mem::zeroed()))) } + unsafe { DevicePowerSetDeviceState(devicedescription.param().abi(), setflags, setdata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn EnumPwrSchemes(lpfn: PWRSCHEMESENUMPROC, lparam: super::super::Foundation::LPARAM) -> bool { @@ -44,32 +44,32 @@ pub unsafe fn EnumPwrSchemes(lpfn: PWRSCHEMESENUMPROC, lparam: super::super::Fou #[inline] pub unsafe fn GetActivePwrScheme(puiid: *mut u32) -> bool { windows_targets::link!("powrprof.dll" "system" fn GetActivePwrScheme(puiid : *mut u32) -> bool); - unsafe { GetActivePwrScheme(core::mem::transmute(puiid)) } + unsafe { GetActivePwrScheme(puiid as _) } } #[inline] pub unsafe fn GetCurrentPowerPolicies(pglobalpowerpolicy: *mut GLOBAL_POWER_POLICY, ppowerpolicy: *mut POWER_POLICY) -> bool { windows_targets::link!("powrprof.dll" "system" fn GetCurrentPowerPolicies(pglobalpowerpolicy : *mut GLOBAL_POWER_POLICY, ppowerpolicy : *mut POWER_POLICY) -> bool); - unsafe { GetCurrentPowerPolicies(core::mem::transmute(pglobalpowerpolicy), core::mem::transmute(ppowerpolicy)) } + unsafe { GetCurrentPowerPolicies(pglobalpowerpolicy as _, ppowerpolicy as _) } } #[inline] 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); - unsafe { GetDevicePowerState(hdevice, core::mem::transmute(pfon)) } + unsafe { GetDevicePowerState(hdevice, pfon as _) } } #[inline] pub unsafe fn GetPwrCapabilities(lpspc: *mut SYSTEM_POWER_CAPABILITIES) -> bool { windows_targets::link!("powrprof.dll" "system" fn GetPwrCapabilities(lpspc : *mut SYSTEM_POWER_CAPABILITIES) -> bool); - unsafe { GetPwrCapabilities(core::mem::transmute(lpspc)) } + unsafe { GetPwrCapabilities(lpspc as _) } } #[inline] pub unsafe fn GetPwrDiskSpindownRange(puimax: *mut u32, puimin: *mut u32) -> bool { windows_targets::link!("powrprof.dll" "system" fn GetPwrDiskSpindownRange(puimax : *mut u32, puimin : *mut u32) -> bool); - unsafe { GetPwrDiskSpindownRange(core::mem::transmute(puimax), core::mem::transmute(puimin)) } + unsafe { GetPwrDiskSpindownRange(puimax as _, puimin as _) } } #[inline] pub unsafe fn GetSystemPowerStatus(lpsystempowerstatus: *mut SYSTEM_POWER_STATUS) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetSystemPowerStatus(lpsystempowerstatus : *mut SYSTEM_POWER_STATUS) -> super::super::Foundation:: BOOL); - unsafe { GetSystemPowerStatus(core::mem::transmute(lpsystempowerstatus)).ok() } + unsafe { GetSystemPowerStatus(lpsystempowerstatus as _).ok() } } #[inline] pub unsafe fn IsAdminOverrideActive(papp: *const ADMINISTRATOR_POWER_POLICY) -> bool { @@ -110,7 +110,7 @@ pub unsafe fn PowerClearRequest(powerrequest: super::super::Foundation::HANDLE, #[inline] 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); - unsafe { PowerCreatePossibleSetting(core::mem::transmute(rootsystempowerkey.unwrap_or(core::mem::zeroed())), subgroupofpowersettingsguid, powersettingguid, possiblesettingindex) } + unsafe { PowerCreatePossibleSetting(rootsystempowerkey.unwrap_or(core::mem::zeroed()) as _, subgroupofpowersettingsguid, powersettingguid, possiblesettingindex) } } #[cfg(feature = "Win32_System_Threading")] #[inline] @@ -123,13 +123,13 @@ pub unsafe fn PowerCreateRequest(context: *const super::Threading::REASON_CONTEX #[inline] 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); - unsafe { PowerCreateSetting(core::mem::transmute(rootsystempowerkey.unwrap_or(core::mem::zeroed())), subgroupofpowersettingsguid, powersettingguid) } + unsafe { PowerCreateSetting(rootsystempowerkey.unwrap_or(core::mem::zeroed()) as _, subgroupofpowersettingsguid, powersettingguid) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { PowerDeleteScheme(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), schemeguid) } + unsafe { PowerDeleteScheme(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, schemeguid) } } #[inline] pub unsafe fn PowerDeterminePlatformRole() -> POWER_PLATFORM_ROLE { @@ -145,19 +145,19 @@ pub unsafe fn PowerDeterminePlatformRoleEx(version: POWER_PLATFORM_ROLE_VERSION) #[inline] 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); - unsafe { PowerDuplicateScheme(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), sourceschemeguid, core::mem::transmute(destinationschemeguid)) } + unsafe { PowerDuplicateScheme(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, sourceschemeguid, destinationschemeguid as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { 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())), accessflags, index, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize)) } + unsafe { PowerEnumerate(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, schemeguid.unwrap_or(core::mem::zeroed()) as _, subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed()) as _, accessflags, index, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { PowerGetActiveScheme(core::mem::transmute(userrootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(activepolicyguid)) } + unsafe { PowerGetActiveScheme(userrootpowerkey.unwrap_or(core::mem::zeroed()) as _, activepolicyguid as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -166,136 +166,136 @@ where 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); - unsafe { PowerImportPowerScheme(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), importfilenamepath.param().abi(), core::mem::transmute(destinationschemeguid)) } + unsafe { PowerImportPowerScheme(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, importfilenamepath.param().abi(), destinationschemeguid as _) } } #[inline] pub unsafe fn PowerIsSettingRangeDefined(subkeyguid: Option<*const windows_core::GUID>, settingguid: Option<*const windows_core::GUID>) -> bool { windows_targets::link!("powrprof.dll" "system" fn PowerIsSettingRangeDefined(subkeyguid : *const windows_core::GUID, settingguid : *const windows_core::GUID) -> bool); - unsafe { PowerIsSettingRangeDefined(core::mem::transmute(subkeyguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(settingguid.unwrap_or(core::mem::zeroed()))) } + unsafe { PowerIsSettingRangeDefined(subkeyguid.unwrap_or(core::mem::zeroed()) as _, settingguid.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] pub unsafe fn PowerOpenSystemPowerKey(phsystempowerkey: *mut super::Registry::HKEY, access: u32, openexisting: bool) -> u32 { windows_targets::link!("powrprof.dll" "system" fn PowerOpenSystemPowerKey(phsystempowerkey : *mut super::Registry:: HKEY, access : u32, openexisting : super::super::Foundation:: BOOL) -> u32); - unsafe { PowerOpenSystemPowerKey(core::mem::transmute(phsystempowerkey), access, openexisting.into()) } + unsafe { PowerOpenSystemPowerKey(phsystempowerkey as _, access, openexisting.into()) } } #[cfg(feature = "Win32_System_Registry")] #[inline] pub unsafe fn PowerOpenUserPowerKey(phuserpowerkey: *mut super::Registry::HKEY, access: u32, openexisting: bool) -> u32 { windows_targets::link!("powrprof.dll" "system" fn PowerOpenUserPowerKey(phuserpowerkey : *mut super::Registry:: HKEY, access : u32, openexisting : super::super::Foundation:: BOOL) -> u32); - unsafe { PowerOpenUserPowerKey(core::mem::transmute(phuserpowerkey), access, openexisting.into()) } + unsafe { PowerOpenUserPowerKey(phuserpowerkey as _, access, openexisting.into()) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { PowerReadACDefaultIndex(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), schemepersonalityguid, core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), powersettingguid, core::mem::transmute(acdefaultindex)) } + unsafe { PowerReadACDefaultIndex(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, schemepersonalityguid, subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid, acdefaultindex as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { 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()))) } + unsafe { PowerReadACValue(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, schemeguid.unwrap_or(core::mem::zeroed()) as _, subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid.unwrap_or(core::mem::zeroed()) as _, r#type.unwrap_or(core::mem::zeroed()) as _, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { 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)) } + unsafe { PowerReadACValueIndex(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, schemeguid.unwrap_or(core::mem::zeroed()) as _, subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid.unwrap_or(core::mem::zeroed()) as _, acvalueindex as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { PowerReadDCDefaultIndex(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), schemepersonalityguid, core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), powersettingguid, core::mem::transmute(dcdefaultindex)) } + unsafe { PowerReadDCDefaultIndex(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, schemepersonalityguid, subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid, dcdefaultindex as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { 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)) } + unsafe { PowerReadDCValue(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, schemeguid.unwrap_or(core::mem::zeroed()) as _, subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid.unwrap_or(core::mem::zeroed()) as _, r#type.unwrap_or(core::mem::zeroed()) as _, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { 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)) } + unsafe { PowerReadDCValueIndex(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, schemeguid.unwrap_or(core::mem::zeroed()) as _, subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid.unwrap_or(core::mem::zeroed()) as _, dcvalueindex as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { 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)) } + unsafe { PowerReadDescription(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, schemeguid.unwrap_or(core::mem::zeroed()) as _, subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid.unwrap_or(core::mem::zeroed()) as _, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { 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)) } + unsafe { PowerReadFriendlyName(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, schemeguid.unwrap_or(core::mem::zeroed()) as _, subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid.unwrap_or(core::mem::zeroed()) as _, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { 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)) } + unsafe { PowerReadIconResourceSpecifier(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, schemeguid.unwrap_or(core::mem::zeroed()) as _, subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid.unwrap_or(core::mem::zeroed()) as _, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { 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())), possiblesettingindex, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize)) } + unsafe { PowerReadPossibleDescription(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid.unwrap_or(core::mem::zeroed()) as _, possiblesettingindex, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { 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())), possiblesettingindex, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize)) } + unsafe { PowerReadPossibleFriendlyName(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid.unwrap_or(core::mem::zeroed()) as _, possiblesettingindex, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { 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())), possiblesettingindex, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize)) } + unsafe { PowerReadPossibleValue(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid.unwrap_or(core::mem::zeroed()) as _, r#type.unwrap_or(core::mem::zeroed()) as _, possiblesettingindex, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize as _) } } #[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); - unsafe { PowerReadSettingAttributes(core::mem::transmute(subgroupguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed()))) } + unsafe { PowerReadSettingAttributes(subgroupguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { 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)) } + unsafe { PowerReadValueIncrement(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid.unwrap_or(core::mem::zeroed()) as _, valueincrement as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { 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)) } + unsafe { PowerReadValueMax(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid.unwrap_or(core::mem::zeroed()) as _, valuemaximum as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { 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)) } + unsafe { PowerReadValueMin(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid.unwrap_or(core::mem::zeroed()) as _, valueminimum as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { 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)) } + unsafe { PowerReadValueUnitsSpecifier(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid.unwrap_or(core::mem::zeroed()) as _, buffer.unwrap_or(core::mem::zeroed()) as _, buffersize as _) } } #[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); - unsafe { PowerRegisterForEffectivePowerModeNotifications(version, callback, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(registrationhandle)).ok() } + unsafe { PowerRegisterForEffectivePowerModeNotifications(version, callback, context.unwrap_or(core::mem::zeroed()) as _, registrationhandle as _).ok() } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] 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); - unsafe { PowerRegisterSuspendResumeNotification(flags, recipient, core::mem::transmute(registrationhandle)) } + unsafe { PowerRegisterSuspendResumeNotification(flags, recipient, registrationhandle as _) } } #[inline] pub unsafe fn PowerRemovePowerSetting(powersettingsubkeyguid: *const windows_core::GUID, powersettingguid: *const windows_core::GUID) -> super::super::Foundation::WIN32_ERROR { @@ -326,7 +326,7 @@ pub unsafe fn PowerRestoreIndividualDefaultPowerScheme(schemeguid: *const window #[inline] 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); - unsafe { PowerSetActiveScheme(core::mem::transmute(userrootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(schemeguid.unwrap_or(core::mem::zeroed()))) } + unsafe { PowerSetActiveScheme(userrootpowerkey.unwrap_or(core::mem::zeroed()) as _, schemeguid.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn PowerSetRequest(powerrequest: super::super::Foundation::HANDLE, requesttype: POWER_REQUEST_TYPE) -> windows_core::Result<()> { @@ -336,19 +336,19 @@ pub unsafe fn PowerSetRequest(powerrequest: super::super::Foundation::HANDLE, re #[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); - unsafe { PowerSettingAccessCheck(accessflags, core::mem::transmute(powerguid.unwrap_or(core::mem::zeroed()))) } + unsafe { PowerSettingAccessCheck(accessflags, powerguid.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { PowerSettingAccessCheckEx(accessflags, core::mem::transmute(powerguid.unwrap_or(core::mem::zeroed())), accesstype) } + unsafe { PowerSettingAccessCheckEx(accessflags, powerguid.unwrap_or(core::mem::zeroed()) as _, 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: 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); - unsafe { PowerSettingRegisterNotification(settingguid, flags, recipient, core::mem::transmute(registrationhandle)) } + unsafe { PowerSettingRegisterNotification(settingguid, flags, recipient, registrationhandle as _) } } #[inline] pub unsafe fn PowerSettingUnregisterNotification(registrationhandle: HPOWERNOTIFY) -> super::super::Foundation::WIN32_ERROR { @@ -369,90 +369,90 @@ pub unsafe fn PowerUnregisterSuspendResumeNotification(registrationhandle: HPOWE #[inline] 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); - unsafe { PowerWriteACDefaultIndex(core::mem::transmute(rootsystempowerkey.unwrap_or(core::mem::zeroed())), schemepersonalityguid, core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), powersettingguid, defaultacindex) } + unsafe { PowerWriteACDefaultIndex(rootsystempowerkey.unwrap_or(core::mem::zeroed()) as _, schemepersonalityguid, subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid, defaultacindex) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { PowerWriteACValueIndex(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), schemeguid, core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed())), acvalueindex) } + unsafe { PowerWriteACValueIndex(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, schemeguid, subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid.unwrap_or(core::mem::zeroed()) as _, acvalueindex) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { PowerWriteDCDefaultIndex(core::mem::transmute(rootsystempowerkey.unwrap_or(core::mem::zeroed())), schemepersonalityguid, core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), powersettingguid, defaultdcindex) } + unsafe { PowerWriteDCDefaultIndex(rootsystempowerkey.unwrap_or(core::mem::zeroed()) as _, schemepersonalityguid, subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid, defaultdcindex) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { PowerWriteDCValueIndex(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), schemeguid, core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed())), dcvalueindex) } + unsafe { PowerWriteDCValueIndex(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, schemeguid, subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid.unwrap_or(core::mem::zeroed()) as _, dcvalueindex) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { PowerWriteDescription(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), 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()) } + unsafe { PowerWriteDescription(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, schemeguid, subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { PowerWriteFriendlyName(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), 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()) } + unsafe { PowerWriteFriendlyName(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, schemeguid, subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { PowerWriteIconResourceSpecifier(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), 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()) } + unsafe { PowerWriteIconResourceSpecifier(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, schemeguid, subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { 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())), possiblesettingindex, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()) } + unsafe { PowerWritePossibleDescription(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid.unwrap_or(core::mem::zeroed()) as _, possiblesettingindex, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { 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())), possiblesettingindex, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()) } + unsafe { PowerWritePossibleFriendlyName(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid.unwrap_or(core::mem::zeroed()) as _, possiblesettingindex, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { 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())), r#type, possiblesettingindex, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()) } + unsafe { PowerWritePossibleValue(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid.unwrap_or(core::mem::zeroed()) as _, r#type, possiblesettingindex, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()) } } #[inline] pub unsafe fn PowerWriteSettingAttributes(subgroupguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, attributes: u32) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("powrprof.dll" "system" fn PowerWriteSettingAttributes(subgroupguid : *const windows_core::GUID, powersettingguid : *const windows_core::GUID, attributes : u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { PowerWriteSettingAttributes(core::mem::transmute(subgroupguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed())), attributes) } + unsafe { PowerWriteSettingAttributes(subgroupguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid.unwrap_or(core::mem::zeroed()) as _, attributes) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { 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())), valueincrement) } + unsafe { PowerWriteValueIncrement(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid.unwrap_or(core::mem::zeroed()) as _, valueincrement) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { 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())), valuemaximum) } + unsafe { PowerWriteValueMax(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid.unwrap_or(core::mem::zeroed()) as _, valuemaximum) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { 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())), valueminimum) } + unsafe { PowerWriteValueMin(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid.unwrap_or(core::mem::zeroed()) as _, valueminimum) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { 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()) } + unsafe { PowerWriteValueUnitsSpecifier(rootpowerkey.unwrap_or(core::mem::zeroed()) as _, subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed()) as _, powersettingguid.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()) } } #[inline] pub unsafe fn ReadGlobalPwrPolicy(pglobalpowerpolicy: *const GLOBAL_POWER_POLICY) -> bool { @@ -462,12 +462,12 @@ pub unsafe fn ReadGlobalPwrPolicy(pglobalpowerpolicy: *const GLOBAL_POWER_POLICY #[inline] pub unsafe fn ReadProcessorPwrScheme(uiid: u32, pmachineprocessorpowerpolicy: *mut MACHINE_PROCESSOR_POWER_POLICY) -> bool { windows_targets::link!("powrprof.dll" "system" fn ReadProcessorPwrScheme(uiid : u32, pmachineprocessorpowerpolicy : *mut MACHINE_PROCESSOR_POWER_POLICY) -> bool); - unsafe { ReadProcessorPwrScheme(uiid, core::mem::transmute(pmachineprocessorpowerpolicy)) } + unsafe { ReadProcessorPwrScheme(uiid, pmachineprocessorpowerpolicy as _) } } #[inline] pub unsafe fn ReadPwrScheme(uiid: u32, ppowerpolicy: *mut POWER_POLICY) -> bool { windows_targets::link!("powrprof.dll" "system" fn ReadPwrScheme(uiid : u32, ppowerpolicy : *mut POWER_POLICY) -> bool); - unsafe { ReadPwrScheme(uiid, core::mem::transmute(ppowerpolicy)) } + unsafe { ReadPwrScheme(uiid, ppowerpolicy as _) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -491,7 +491,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>) -> bool { windows_targets::link!("powrprof.dll" "system" fn SetActivePwrScheme(uiid : u32, pglobalpowerpolicy : *const GLOBAL_POWER_POLICY, ppowerpolicy : *const POWER_POLICY) -> bool); - unsafe { SetActivePwrScheme(uiid, core::mem::transmute(pglobalpowerpolicy.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppowerpolicy.unwrap_or(core::mem::zeroed()))) } + unsafe { SetActivePwrScheme(uiid, pglobalpowerpolicy.unwrap_or(core::mem::zeroed()) as _, ppowerpolicy.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SetSuspendState(bhibernate: bool, bforce: bool, bwakeupeventsdisabled: bool) -> bool { @@ -521,7 +521,7 @@ pub unsafe fn UnregisterSuspendResumeNotification(handle: HPOWERNOTIFY) -> windo #[inline] pub unsafe fn ValidatePowerPolicies(pglobalpowerpolicy: Option<*mut GLOBAL_POWER_POLICY>, ppowerpolicy: Option<*mut POWER_POLICY>) -> bool { windows_targets::link!("powrprof.dll" "system" fn ValidatePowerPolicies(pglobalpowerpolicy : *mut GLOBAL_POWER_POLICY, ppowerpolicy : *mut POWER_POLICY) -> bool); - unsafe { ValidatePowerPolicies(core::mem::transmute(pglobalpowerpolicy.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppowerpolicy.unwrap_or(core::mem::zeroed()))) } + unsafe { ValidatePowerPolicies(pglobalpowerpolicy.unwrap_or(core::mem::zeroed()) as _, ppowerpolicy.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn WriteGlobalPwrPolicy(pglobalpowerpolicy: *const GLOBAL_POWER_POLICY) -> bool { 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 54bf39d601..3b78f51d63 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ProcessStatus/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ProcessStatus/mod.rs @@ -6,32 +6,32 @@ pub unsafe fn EmptyWorkingSet(hprocess: super::super::Foundation::HANDLE) -> win #[inline] pub unsafe fn EnumDeviceDrivers(lpimagebase: *mut *mut core::ffi::c_void, cb: u32, lpcbneeded: *mut u32) -> windows_core::Result<()> { windows_targets::link!("psapi.dll" "system" fn EnumDeviceDrivers(lpimagebase : *mut *mut core::ffi::c_void, cb : u32, lpcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { EnumDeviceDrivers(core::mem::transmute(lpimagebase), cb, core::mem::transmute(lpcbneeded)).ok() } + unsafe { EnumDeviceDrivers(lpimagebase as _, cb, lpcbneeded as _).ok() } } #[inline] pub unsafe fn EnumPageFilesA(pcallbackroutine: PENUM_PAGE_FILE_CALLBACKA, pcontext: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("psapi.dll" "system" fn EnumPageFilesA(pcallbackroutine : PENUM_PAGE_FILE_CALLBACKA, pcontext : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { EnumPageFilesA(pcallbackroutine, core::mem::transmute(pcontext)).ok() } + unsafe { EnumPageFilesA(pcallbackroutine, pcontext as _).ok() } } #[inline] pub unsafe fn EnumPageFilesW(pcallbackroutine: PENUM_PAGE_FILE_CALLBACKW, pcontext: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("psapi.dll" "system" fn EnumPageFilesW(pcallbackroutine : PENUM_PAGE_FILE_CALLBACKW, pcontext : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { EnumPageFilesW(pcallbackroutine, core::mem::transmute(pcontext)).ok() } + unsafe { EnumPageFilesW(pcallbackroutine, pcontext as _).ok() } } #[inline] 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); - unsafe { EnumProcessModules(hprocess, core::mem::transmute(lphmodule), cb, core::mem::transmute(lpcbneeded)).ok() } + unsafe { EnumProcessModules(hprocess, lphmodule as _, cb, lpcbneeded as _).ok() } } #[inline] 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); - unsafe { EnumProcessModulesEx(hprocess, core::mem::transmute(lphmodule), cb, core::mem::transmute(lpcbneeded), dwfilterflag).ok() } + unsafe { EnumProcessModulesEx(hprocess, lphmodule as _, cb, lpcbneeded as _, dwfilterflag).ok() } } #[inline] pub unsafe fn EnumProcesses(lpidprocess: *mut u32, cb: u32, lpcbneeded: *mut u32) -> windows_core::Result<()> { windows_targets::link!("psapi.dll" "system" fn EnumProcesses(lpidprocess : *mut u32, cb : u32, lpcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { EnumProcesses(core::mem::transmute(lpidprocess), cb, core::mem::transmute(lpcbneeded)).ok() } + unsafe { EnumProcesses(lpidprocess as _, cb, lpcbneeded as _).ok() } } #[inline] pub unsafe fn GetDeviceDriverBaseNameA(imagebase: *const core::ffi::c_void, lpfilename: &mut [u8]) -> u32 { @@ -66,32 +66,32 @@ pub unsafe fn GetMappedFileNameW(hprocess: super::super::Foundation::HANDLE, lpv #[inline] 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); - unsafe { GetModuleBaseNameA(hprocess, core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpbasename.as_ptr()), lpbasename.len().try_into().unwrap()) } + unsafe { GetModuleBaseNameA(hprocess, hmodule.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(lpbasename.as_ptr()), lpbasename.len().try_into().unwrap()) } } #[inline] 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); - unsafe { GetModuleBaseNameW(hprocess, core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpbasename.as_ptr()), lpbasename.len().try_into().unwrap()) } + unsafe { GetModuleBaseNameW(hprocess, hmodule.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(lpbasename.as_ptr()), lpbasename.len().try_into().unwrap()) } } #[inline] 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); - unsafe { 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()) } + unsafe { GetModuleFileNameExA(hprocess.unwrap_or(core::mem::zeroed()) as _, hmodule.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } } #[inline] 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); - unsafe { 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()) } + unsafe { GetModuleFileNameExW(hprocess.unwrap_or(core::mem::zeroed()) as _, hmodule.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } } #[inline] 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); - unsafe { GetModuleInformation(hprocess, hmodule, core::mem::transmute(lpmodinfo), cb).ok() } + unsafe { GetModuleInformation(hprocess, hmodule, lpmodinfo as _, cb).ok() } } #[inline] pub unsafe fn GetPerformanceInfo(pperformanceinformation: *mut PERFORMANCE_INFORMATION, cb: u32) -> windows_core::Result<()> { windows_targets::link!("psapi.dll" "system" fn GetPerformanceInfo(pperformanceinformation : *mut PERFORMANCE_INFORMATION, cb : u32) -> super::super::Foundation:: BOOL); - unsafe { GetPerformanceInfo(core::mem::transmute(pperformanceinformation), cb).ok() } + unsafe { GetPerformanceInfo(pperformanceinformation as _, cb).ok() } } #[inline] pub unsafe fn GetProcessImageFileNameA(hprocess: super::super::Foundation::HANDLE, lpimagefilename: &mut [u8]) -> u32 { @@ -106,17 +106,17 @@ pub unsafe fn GetProcessImageFileNameW(hprocess: super::super::Foundation::HANDL #[inline] 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); - unsafe { GetProcessMemoryInfo(process, core::mem::transmute(ppsmemcounters), cb).ok() } + unsafe { GetProcessMemoryInfo(process, ppsmemcounters as _, cb).ok() } } #[inline] 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); - unsafe { GetWsChanges(hprocess, core::mem::transmute(lpwatchinfo), cb).ok() } + unsafe { GetWsChanges(hprocess, lpwatchinfo as _, cb).ok() } } #[inline] 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); - unsafe { GetWsChangesEx(hprocess, core::mem::transmute(lpwatchinfoex), core::mem::transmute(cb)).ok() } + unsafe { GetWsChangesEx(hprocess, lpwatchinfoex as _, cb as _).ok() } } #[inline] pub unsafe fn InitializeProcessForWsWatch(hprocess: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -131,32 +131,32 @@ pub unsafe fn K32EmptyWorkingSet(hprocess: super::super::Foundation::HANDLE) -> #[inline] pub unsafe fn K32EnumDeviceDrivers(lpimagebase: *mut *mut core::ffi::c_void, cb: u32, lpcbneeded: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn K32EnumDeviceDrivers(lpimagebase : *mut *mut core::ffi::c_void, cb : u32, lpcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { K32EnumDeviceDrivers(core::mem::transmute(lpimagebase), cb, core::mem::transmute(lpcbneeded)) } + unsafe { K32EnumDeviceDrivers(lpimagebase as _, cb, lpcbneeded as _) } } #[inline] pub unsafe fn K32EnumPageFilesA(pcallbackroutine: PENUM_PAGE_FILE_CALLBACKA, pcontext: *mut core::ffi::c_void) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn K32EnumPageFilesA(pcallbackroutine : PENUM_PAGE_FILE_CALLBACKA, pcontext : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { K32EnumPageFilesA(pcallbackroutine, core::mem::transmute(pcontext)) } + unsafe { K32EnumPageFilesA(pcallbackroutine, pcontext as _) } } #[inline] pub unsafe fn K32EnumPageFilesW(pcallbackroutine: PENUM_PAGE_FILE_CALLBACKW, pcontext: *mut core::ffi::c_void) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn K32EnumPageFilesW(pcallbackroutine : PENUM_PAGE_FILE_CALLBACKW, pcontext : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { K32EnumPageFilesW(pcallbackroutine, core::mem::transmute(pcontext)) } + unsafe { K32EnumPageFilesW(pcallbackroutine, pcontext as _) } } #[inline] 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); - unsafe { K32EnumProcessModules(hprocess, core::mem::transmute(lphmodule), cb, core::mem::transmute(lpcbneeded)) } + unsafe { K32EnumProcessModules(hprocess, lphmodule as _, cb, lpcbneeded as _) } } #[inline] 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); - unsafe { K32EnumProcessModulesEx(hprocess, core::mem::transmute(lphmodule), cb, core::mem::transmute(lpcbneeded), dwfilterflag) } + unsafe { K32EnumProcessModulesEx(hprocess, lphmodule as _, cb, lpcbneeded as _, dwfilterflag) } } #[inline] pub unsafe fn K32EnumProcesses(lpidprocess: *mut u32, cb: u32, lpcbneeded: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn K32EnumProcesses(lpidprocess : *mut u32, cb : u32, lpcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { K32EnumProcesses(core::mem::transmute(lpidprocess), cb, core::mem::transmute(lpcbneeded)) } + unsafe { K32EnumProcesses(lpidprocess as _, cb, lpcbneeded as _) } } #[inline] pub unsafe fn K32GetDeviceDriverBaseNameA(imagebase: *const core::ffi::c_void, lpfilename: &mut [u8]) -> u32 { @@ -191,32 +191,32 @@ pub unsafe fn K32GetMappedFileNameW(hprocess: super::super::Foundation::HANDLE, #[inline] 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); - unsafe { K32GetModuleBaseNameA(hprocess, core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpbasename.as_ptr()), lpbasename.len().try_into().unwrap()) } + unsafe { K32GetModuleBaseNameA(hprocess, hmodule.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(lpbasename.as_ptr()), lpbasename.len().try_into().unwrap()) } } #[inline] 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); - unsafe { K32GetModuleBaseNameW(hprocess, core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpbasename.as_ptr()), lpbasename.len().try_into().unwrap()) } + unsafe { K32GetModuleBaseNameW(hprocess, hmodule.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(lpbasename.as_ptr()), lpbasename.len().try_into().unwrap()) } } #[inline] 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); - unsafe { 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()) } + unsafe { K32GetModuleFileNameExA(hprocess.unwrap_or(core::mem::zeroed()) as _, hmodule.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } } #[inline] 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); - unsafe { 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()) } + unsafe { K32GetModuleFileNameExW(hprocess.unwrap_or(core::mem::zeroed()) as _, hmodule.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } } #[inline] 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); - unsafe { K32GetModuleInformation(hprocess, hmodule, core::mem::transmute(lpmodinfo), cb) } + unsafe { K32GetModuleInformation(hprocess, hmodule, lpmodinfo as _, cb) } } #[inline] pub unsafe fn K32GetPerformanceInfo(pperformanceinformation: *mut PERFORMANCE_INFORMATION, cb: u32) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn K32GetPerformanceInfo(pperformanceinformation : *mut PERFORMANCE_INFORMATION, cb : u32) -> super::super::Foundation:: BOOL); - unsafe { K32GetPerformanceInfo(core::mem::transmute(pperformanceinformation), cb) } + unsafe { K32GetPerformanceInfo(pperformanceinformation as _, cb) } } #[inline] pub unsafe fn K32GetProcessImageFileNameA(hprocess: super::super::Foundation::HANDLE, lpimagefilename: &mut [u8]) -> u32 { @@ -231,17 +231,17 @@ pub unsafe fn K32GetProcessImageFileNameW(hprocess: super::super::Foundation::HA #[inline] 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); - unsafe { K32GetProcessMemoryInfo(process, core::mem::transmute(ppsmemcounters), cb) } + unsafe { K32GetProcessMemoryInfo(process, ppsmemcounters as _, cb) } } #[inline] 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); - unsafe { K32GetWsChanges(hprocess, core::mem::transmute(lpwatchinfo), cb) } + unsafe { K32GetWsChanges(hprocess, lpwatchinfo as _, cb) } } #[inline] 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); - unsafe { K32GetWsChangesEx(hprocess, core::mem::transmute(lpwatchinfoex), core::mem::transmute(cb)) } + unsafe { K32GetWsChangesEx(hprocess, lpwatchinfoex as _, cb as _) } } #[inline] pub unsafe fn K32InitializeProcessForWsWatch(hprocess: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { @@ -251,22 +251,22 @@ pub unsafe fn K32InitializeProcessForWsWatch(hprocess: super::super::Foundation: #[inline] 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); - unsafe { K32QueryWorkingSet(hprocess, core::mem::transmute(pv), cb) } + unsafe { K32QueryWorkingSet(hprocess, pv as _, cb) } } #[inline] 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); - unsafe { K32QueryWorkingSetEx(hprocess, core::mem::transmute(pv), cb) } + unsafe { K32QueryWorkingSetEx(hprocess, pv as _, cb) } } #[inline] 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); - unsafe { QueryWorkingSet(hprocess, core::mem::transmute(pv), cb).ok() } + unsafe { QueryWorkingSet(hprocess, pv as _, cb).ok() } } #[inline] 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); - unsafe { QueryWorkingSetEx(hprocess, core::mem::transmute(pv), cb).ok() } + unsafe { QueryWorkingSetEx(hprocess, pv as _, 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 d7b0620fd3..531b4a1af4 100644 --- a/crates/libs/windows/src/Windows/Win32/System/RealTimeCommunications/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/RealTimeCommunications/mod.rs @@ -6,11 +6,11 @@ windows_core::imp::interface_hierarchy!(INetworkTransportSettings, windows_core: impl INetworkTransportSettings { #[cfg(feature = "Win32_Networking_WinSock")] pub unsafe fn ApplySetting(&self, settingid: *const super::super::Networking::WinSock::TRANSPORT_SETTING_ID, valuein: &[u8], lengthout: *mut u32, valueout: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ApplySetting)(windows_core::Interface::as_raw(self), settingid, valuein.len().try_into().unwrap(), core::mem::transmute(valuein.as_ptr()), core::mem::transmute(lengthout), core::mem::transmute(valueout)).ok() } + unsafe { (windows_core::Interface::vtable(self).ApplySetting)(windows_core::Interface::as_raw(self), settingid, valuein.len().try_into().unwrap(), core::mem::transmute(valuein.as_ptr()), lengthout as _, valueout as _).ok() } } #[cfg(feature = "Win32_Networking_WinSock")] pub unsafe fn QuerySetting(&self, settingid: *const super::super::Networking::WinSock::TRANSPORT_SETTING_ID, valuein: &[u8], lengthout: *mut u32, valueout: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QuerySetting)(windows_core::Interface::as_raw(self), settingid, valuein.len().try_into().unwrap(), core::mem::transmute(valuein.as_ptr()), core::mem::transmute(lengthout), core::mem::transmute(valueout)).ok() } + unsafe { (windows_core::Interface::vtable(self).QuerySetting)(windows_core::Interface::as_raw(self), settingid, valuein.len().try_into().unwrap(), core::mem::transmute(valuein.as_ptr()), lengthout as _, valueout as _).ok() } } } #[repr(C)] @@ -1869,7 +1869,7 @@ impl IRTCClientPortManagement { unsafe { (windows_core::Interface::vtable(self).StopListenAddressAndPort)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrinternallocaladdress), linternallocalport).ok() } } pub unsafe fn GetPortRange(&self, enporttype: RTC_PORT_TYPE, plminvalue: *mut i32, plmaxvalue: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPortRange)(windows_core::Interface::as_raw(self), enporttype, core::mem::transmute(plminvalue), core::mem::transmute(plmaxvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPortRange)(windows_core::Interface::as_raw(self), enporttype, plminvalue as _, plmaxvalue as _).ok() } } } #[repr(C)] @@ -2359,7 +2359,7 @@ impl IRTCClientPresence2 { unsafe { (windows_core::Interface::vtable(self).GetPresenceData)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrnamespace), core::mem::transmute(pbstrdata)).ok() } } pub unsafe fn GetLocalPresenceInfo(&self, penstatus: *mut RTC_PRESENCE_STATUS, pbstrnotes: *mut windows_core::BSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLocalPresenceInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(penstatus), core::mem::transmute(pbstrnotes)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLocalPresenceInfo)(windows_core::Interface::as_raw(self), penstatus as _, core::mem::transmute(pbstrnotes)).ok() } } 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 @@ -2911,7 +2911,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -2989,7 +2989,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -3067,7 +3067,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -3145,7 +3145,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -3223,7 +3223,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -3301,7 +3301,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -3379,7 +3379,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -4382,7 +4382,7 @@ windows_core::imp::define_interface!(IRTCPortManager, IRTCPortManager_Vtbl, 0xda windows_core::imp::interface_hierarchy!(IRTCPortManager, windows_core::IUnknown); impl IRTCPortManager { pub unsafe fn GetMapping(&self, bstrremoteaddress: &windows_core::BSTR, enporttype: RTC_PORT_TYPE, pbstrinternallocaladdress: *mut windows_core::BSTR, plinternallocalport: *mut i32, pbstrexternallocaladdress: *mut windows_core::BSTR, plexternallocalport: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMapping)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrremoteaddress), enporttype, core::mem::transmute(pbstrinternallocaladdress), core::mem::transmute(plinternallocalport), core::mem::transmute(pbstrexternallocaladdress), core::mem::transmute(plexternallocalport)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMapping)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrremoteaddress), enporttype, core::mem::transmute(pbstrinternallocaladdress), plinternallocalport as _, core::mem::transmute(pbstrexternallocaladdress), plexternallocalport as _).ok() } } pub unsafe fn UpdateRemoteAddress(&self, bstrremoteaddress: &windows_core::BSTR, bstrinternallocaladdress: &windows_core::BSTR, linternallocalport: i32, bstrexternallocaladdress: &windows_core::BSTR, lexternallocalport: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UpdateRemoteAddress)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrremoteaddress), core::mem::transmute_copy(bstrinternallocaladdress), linternallocalport, core::mem::transmute_copy(bstrexternallocaladdress), lexternallocalport).ok() } @@ -4918,7 +4918,7 @@ impl IRTCPresenceStatusEvent { } } pub unsafe fn GetLocalPresenceInfo(&self, penstatus: *mut RTC_PRESENCE_STATUS, pbstrnotes: *mut windows_core::BSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLocalPresenceInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(penstatus), core::mem::transmute(pbstrnotes)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLocalPresenceInfo)(windows_core::Interface::as_raw(self), penstatus as _, core::mem::transmute(pbstrnotes)).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -6610,7 +6610,7 @@ windows_core::imp::define_interface!(IRTCSessionDescriptionManager, IRTCSessionD windows_core::imp::interface_hierarchy!(IRTCSessionDescriptionManager, windows_core::IUnknown); impl IRTCSessionDescriptionManager { pub unsafe fn EvaluateSessionDescription(&self, bstrcontenttype: &windows_core::BSTR, bstrsessiondescription: &windows_core::BSTR, pfapplicationsession: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EvaluateSessionDescription)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrcontenttype), core::mem::transmute_copy(bstrsessiondescription), core::mem::transmute(pfapplicationsession)).ok() } + unsafe { (windows_core::Interface::vtable(self).EvaluateSessionDescription)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrcontenttype), core::mem::transmute_copy(bstrsessiondescription), pfapplicationsession as _).ok() } } } #[repr(C)] @@ -8031,11 +8031,11 @@ windows_core::imp::interface_hierarchy!(ITransportSettingsInternal, windows_core impl ITransportSettingsInternal { #[cfg(feature = "Win32_Networking_WinSock")] pub unsafe fn ApplySetting(&self, setting: *mut TRANSPORT_SETTING) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ApplySetting)(windows_core::Interface::as_raw(self), core::mem::transmute(setting)).ok() } + unsafe { (windows_core::Interface::vtable(self).ApplySetting)(windows_core::Interface::as_raw(self), setting as _).ok() } } #[cfg(feature = "Win32_Networking_WinSock")] pub unsafe fn QuerySetting(&self, setting: *mut TRANSPORT_SETTING) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QuerySetting)(windows_core::Interface::as_raw(self), core::mem::transmute(setting)).ok() } + unsafe { (windows_core::Interface::vtable(self).QuerySetting)(windows_core::Interface::as_raw(self), setting as _).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 8fb591a10a..077bff9439 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Recovery/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Recovery/mod.rs @@ -15,18 +15,18 @@ pub unsafe fn ApplicationRecoveryInProgress() -> windows_core::Result, 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); - unsafe { GetApplicationRecoveryCallback(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()))) } + unsafe { GetApplicationRecoveryCallback(hprocess, precoverycallback as _, ppvparameter.unwrap_or(core::mem::zeroed()) as _, pdwpinginterval.unwrap_or(core::mem::zeroed()) as _, pdwflags.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { GetApplicationRestartSettings(hprocess, core::mem::transmute(pwzcommandline.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchsize), core::mem::transmute(pdwflags.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { GetApplicationRestartSettings(hprocess, pwzcommandline.unwrap_or(core::mem::zeroed()) as _, pcchsize as _, pdwflags.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { RegisterApplicationRecoveryCallback(precoveycallback, core::mem::transmute(pvparameter.unwrap_or(core::mem::zeroed())), dwpinginterval, dwflags).ok() } + unsafe { RegisterApplicationRecoveryCallback(precoveycallback, pvparameter.unwrap_or(core::mem::zeroed()) as _, dwpinginterval, dwflags).ok() } } #[inline] pub unsafe fn RegisterApplicationRestart(pwzcommandline: P0, dwflags: REGISTER_APPLICATION_RESTART_FLAGS) -> windows_core::Result<()> diff --git a/crates/libs/windows/src/Windows/Win32/System/Registry/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Registry/mod.rs index 66fa605930..a06a0282ea 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Registry/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Registry/mod.rs @@ -6,7 +6,7 @@ where P4: windows_core::Param, { windows_targets::link!("api-ms-win-core-state-helpers-l1-1-0.dll" "system" fn GetRegistryValueWithFallbackW(hkeyprimary : HKEY, pwszprimarysubkey : windows_core::PCWSTR, hkeyfallback : HKEY, pwszfallbacksubkey : windows_core::PCWSTR, pwszvalue : windows_core::PCWSTR, dwflags : u32, pdwtype : *mut u32, pvdata : *mut core::ffi::c_void, cbdatain : u32, pcbdataout : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { 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(), dwflags, core::mem::transmute(pdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), cbdatain, core::mem::transmute(pcbdataout.unwrap_or(core::mem::zeroed()))) } + unsafe { GetRegistryValueWithFallbackW(hkeyprimary.unwrap_or(core::mem::zeroed()) as _, pwszprimarysubkey.param().abi(), hkeyfallback.unwrap_or(core::mem::zeroed()) as _, pwszfallbacksubkey.param().abi(), pwszvalue.param().abi(), dwflags, pdwtype.unwrap_or(core::mem::zeroed()) as _, pvdata.unwrap_or(core::mem::zeroed()) as _, cbdatain, pcbdataout.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RegCloseKey(hkey: HKEY) -> super::super::Foundation::WIN32_ERROR { @@ -19,7 +19,7 @@ where P0: 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); - unsafe { RegConnectRegistryA(lpmachinename.param().abi(), hkey, core::mem::transmute(phkresult)) } + unsafe { RegConnectRegistryA(lpmachinename.param().abi(), hkey, phkresult as _) } } #[inline] pub unsafe fn RegConnectRegistryExA(lpmachinename: P0, hkey: HKEY, flags: u32, phkresult: *mut HKEY) -> i32 @@ -27,7 +27,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegConnectRegistryExA(lpmachinename : windows_core::PCSTR, hkey : HKEY, flags : u32, phkresult : *mut HKEY) -> i32); - unsafe { RegConnectRegistryExA(lpmachinename.param().abi(), hkey, flags, core::mem::transmute(phkresult)) } + unsafe { RegConnectRegistryExA(lpmachinename.param().abi(), hkey, flags, phkresult as _) } } #[inline] pub unsafe fn RegConnectRegistryExW(lpmachinename: P0, hkey: HKEY, flags: u32, phkresult: *mut HKEY) -> i32 @@ -35,7 +35,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegConnectRegistryExW(lpmachinename : windows_core::PCWSTR, hkey : HKEY, flags : u32, phkresult : *mut HKEY) -> i32); - unsafe { RegConnectRegistryExW(lpmachinename.param().abi(), hkey, flags, core::mem::transmute(phkresult)) } + unsafe { RegConnectRegistryExW(lpmachinename.param().abi(), hkey, flags, phkresult as _) } } #[inline] pub unsafe fn RegConnectRegistryW(lpmachinename: P0, hkey: HKEY, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR @@ -43,7 +43,7 @@ where P0: 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); - unsafe { RegConnectRegistryW(lpmachinename.param().abi(), hkey, core::mem::transmute(phkresult)) } + unsafe { RegConnectRegistryW(lpmachinename.param().abi(), hkey, phkresult as _) } } #[inline] pub unsafe fn RegCopyTreeA(hkeysrc: HKEY, lpsubkey: P1, hkeydest: HKEY) -> super::super::Foundation::WIN32_ERROR @@ -67,7 +67,7 @@ where 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); - unsafe { RegCreateKeyA(hkey, lpsubkey.param().abi(), core::mem::transmute(phkresult)) } + unsafe { RegCreateKeyA(hkey, lpsubkey.param().abi(), phkresult as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -77,7 +77,7 @@ where 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); - unsafe { RegCreateKeyExA(hkey, lpsubkey.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), lpclass.param().abi(), dwoptions, samdesired, core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(phkresult), core::mem::transmute(lpdwdisposition.unwrap_or(core::mem::zeroed()))) } + unsafe { RegCreateKeyExA(hkey, lpsubkey.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _, lpclass.param().abi(), dwoptions, samdesired, lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _, phkresult as _, lpdwdisposition.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -87,7 +87,7 @@ where 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); - unsafe { RegCreateKeyExW(hkey, lpsubkey.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), lpclass.param().abi(), dwoptions, samdesired, core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(phkresult), core::mem::transmute(lpdwdisposition.unwrap_or(core::mem::zeroed()))) } + unsafe { RegCreateKeyExW(hkey, lpsubkey.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _, lpclass.param().abi(), dwoptions, samdesired, lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _, phkresult as _, lpdwdisposition.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -97,7 +97,7 @@ where P3: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegCreateKeyTransactedA(hkey : HKEY, lpsubkey : windows_core::PCSTR, reserved : u32, lpclass : windows_core::PCSTR, dwoptions : REG_OPEN_CREATE_OPTIONS, samdesired : REG_SAM_FLAGS, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, phkresult : *mut HKEY, lpdwdisposition : *mut REG_CREATE_KEY_DISPOSITION, htransaction : super::super::Foundation:: HANDLE, pextendedparemeter : *const core::ffi::c_void) -> super::super::Foundation:: WIN32_ERROR); - unsafe { RegCreateKeyTransactedA(hkey, lpsubkey.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), lpclass.param().abi(), dwoptions, samdesired, core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(phkresult), core::mem::transmute(lpdwdisposition.unwrap_or(core::mem::zeroed())), htransaction, core::mem::transmute(pextendedparemeter.unwrap_or(core::mem::zeroed()))) } + unsafe { RegCreateKeyTransactedA(hkey, lpsubkey.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _, lpclass.param().abi(), dwoptions, samdesired, lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _, phkresult as _, lpdwdisposition.unwrap_or(core::mem::zeroed()) as _, htransaction, pextendedparemeter.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -107,7 +107,7 @@ where P3: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegCreateKeyTransactedW(hkey : HKEY, lpsubkey : windows_core::PCWSTR, reserved : u32, lpclass : windows_core::PCWSTR, dwoptions : REG_OPEN_CREATE_OPTIONS, samdesired : REG_SAM_FLAGS, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, phkresult : *mut HKEY, lpdwdisposition : *mut REG_CREATE_KEY_DISPOSITION, htransaction : super::super::Foundation:: HANDLE, pextendedparemeter : *const core::ffi::c_void) -> super::super::Foundation:: WIN32_ERROR); - unsafe { RegCreateKeyTransactedW(hkey, lpsubkey.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), lpclass.param().abi(), dwoptions, samdesired, core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(phkresult), core::mem::transmute(lpdwdisposition.unwrap_or(core::mem::zeroed())), htransaction, core::mem::transmute(pextendedparemeter.unwrap_or(core::mem::zeroed()))) } + unsafe { RegCreateKeyTransactedW(hkey, lpsubkey.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _, lpclass.param().abi(), dwoptions, samdesired, lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _, phkresult as _, lpdwdisposition.unwrap_or(core::mem::zeroed()) as _, htransaction, pextendedparemeter.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RegCreateKeyW(hkey: HKEY, lpsubkey: P1, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR @@ -115,7 +115,7 @@ where 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); - unsafe { RegCreateKeyW(hkey, lpsubkey.param().abi(), core::mem::transmute(phkresult)) } + unsafe { RegCreateKeyW(hkey, lpsubkey.param().abi(), phkresult as _) } } #[inline] pub unsafe fn RegDeleteKeyA(hkey: HKEY, lpsubkey: P1) -> super::super::Foundation::WIN32_ERROR @@ -131,7 +131,7 @@ where 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); - unsafe { RegDeleteKeyExA(hkey, lpsubkey.param().abi(), samdesired, core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } + unsafe { RegDeleteKeyExA(hkey, lpsubkey.param().abi(), samdesired, reserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RegDeleteKeyExW(hkey: HKEY, lpsubkey: P1, samdesired: u32, reserved: Option) -> super::super::Foundation::WIN32_ERROR @@ -139,7 +139,7 @@ where 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); - unsafe { RegDeleteKeyExW(hkey, lpsubkey.param().abi(), samdesired, core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } + unsafe { RegDeleteKeyExW(hkey, lpsubkey.param().abi(), samdesired, reserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -147,7 +147,7 @@ where P1: 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); - unsafe { RegDeleteKeyTransactedA(hkey, lpsubkey.param().abi(), samdesired, core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), htransaction, core::mem::transmute(pextendedparameter.unwrap_or(core::mem::zeroed()))) } + unsafe { RegDeleteKeyTransactedA(hkey, lpsubkey.param().abi(), samdesired, reserved.unwrap_or(core::mem::zeroed()) as _, htransaction, pextendedparameter.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -155,7 +155,7 @@ where P1: 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); - unsafe { RegDeleteKeyTransactedW(hkey, lpsubkey.param().abi(), samdesired, core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), htransaction, core::mem::transmute(pextendedparameter.unwrap_or(core::mem::zeroed()))) } + unsafe { RegDeleteKeyTransactedW(hkey, lpsubkey.param().abi(), samdesired, reserved.unwrap_or(core::mem::zeroed()) as _, htransaction, pextendedparameter.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RegDeleteKeyValueA(hkey: HKEY, lpsubkey: P1, lpvaluename: P2) -> super::super::Foundation::WIN32_ERROR @@ -243,12 +243,12 @@ pub unsafe fn RegEnumKeyA(hkey: HKEY, dwindex: u32, lpname: Option<&mut [u8]>) - #[inline] 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); - unsafe { RegEnumKeyExA(hkey, 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()))) } + unsafe { RegEnumKeyExA(hkey, dwindex, lpname.unwrap_or(core::mem::zeroed()) as _, lpcchname as _, lpreserved.unwrap_or(core::mem::zeroed()) as _, lpclass.unwrap_or(core::mem::zeroed()) as _, lpcchclass.unwrap_or(core::mem::zeroed()) as _, lpftlastwritetime.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { RegEnumKeyExW(hkey, 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()))) } + unsafe { RegEnumKeyExW(hkey, dwindex, lpname.unwrap_or(core::mem::zeroed()) as _, lpcchname as _, lpreserved.unwrap_or(core::mem::zeroed()) as _, lpclass.unwrap_or(core::mem::zeroed()) as _, lpcchclass.unwrap_or(core::mem::zeroed()) as _, lpftlastwritetime.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RegEnumKeyW(hkey: HKEY, dwindex: u32, lpname: Option<&mut [u16]>) -> super::super::Foundation::WIN32_ERROR { @@ -258,12 +258,12 @@ pub unsafe fn RegEnumKeyW(hkey: HKEY, dwindex: u32, lpname: Option<&mut [u16]>) #[inline] 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); - unsafe { RegEnumValueA(hkey, 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()))) } + unsafe { RegEnumValueA(hkey, dwindex, lpvaluename.unwrap_or(core::mem::zeroed()) as _, lpcchvaluename as _, lpreserved.unwrap_or(core::mem::zeroed()) as _, lptype.unwrap_or(core::mem::zeroed()) as _, lpdata.unwrap_or(core::mem::zeroed()) as _, lpcbdata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { RegEnumValueW(hkey, 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()))) } + unsafe { RegEnumValueW(hkey, dwindex, lpvaluename.unwrap_or(core::mem::zeroed()) as _, lpcchvaluename as _, lpreserved.unwrap_or(core::mem::zeroed()) as _, lptype.unwrap_or(core::mem::zeroed()) as _, lpdata.unwrap_or(core::mem::zeroed()) as _, lpcbdata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RegFlushKey(hkey: HKEY) -> super::super::Foundation::WIN32_ERROR { @@ -274,7 +274,7 @@ pub unsafe fn RegFlushKey(hkey: HKEY) -> super::super::Foundation::WIN32_ERROR { #[inline] 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); - unsafe { RegGetKeySecurity(hkey, securityinformation, core::mem::transmute(psecuritydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbsecuritydescriptor)) } + unsafe { RegGetKeySecurity(hkey, securityinformation, psecuritydescriptor.unwrap_or(core::mem::zeroed()) as _, lpcbsecuritydescriptor as _) } } #[inline] 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 @@ -283,7 +283,7 @@ where P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegGetValueA(hkey : HKEY, lpsubkey : windows_core::PCSTR, lpvalue : windows_core::PCSTR, dwflags : REG_ROUTINE_FLAGS, pdwtype : *mut REG_VALUE_TYPE, pvdata : *mut core::ffi::c_void, pcbdata : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { RegGetValueA(hkey, lpsubkey.param().abi(), lpvalue.param().abi(), 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()))) } + unsafe { RegGetValueA(hkey, lpsubkey.param().abi(), lpvalue.param().abi(), dwflags, pdwtype.unwrap_or(core::mem::zeroed()) as _, pvdata.unwrap_or(core::mem::zeroed()) as _, pcbdata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -292,7 +292,7 @@ where P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegGetValueW(hkey : HKEY, lpsubkey : windows_core::PCWSTR, lpvalue : windows_core::PCWSTR, dwflags : REG_ROUTINE_FLAGS, pdwtype : *mut REG_VALUE_TYPE, pvdata : *mut core::ffi::c_void, pcbdata : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { RegGetValueW(hkey, lpsubkey.param().abi(), lpvalue.param().abi(), 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()))) } + unsafe { RegGetValueW(hkey, lpsubkey.param().abi(), lpvalue.param().abi(), dwflags, pdwtype.unwrap_or(core::mem::zeroed()) as _, pvdata.unwrap_or(core::mem::zeroed()) as _, pcbdata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RegLoadAppKeyA(lpfile: P0, phkresult: *mut HKEY, samdesired: u32, dwoptions: u32, reserved: Option) -> super::super::Foundation::WIN32_ERROR @@ -300,7 +300,7 @@ 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); - unsafe { RegLoadAppKeyA(lpfile.param().abi(), core::mem::transmute(phkresult), samdesired, dwoptions, core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } + unsafe { RegLoadAppKeyA(lpfile.param().abi(), phkresult as _, samdesired, dwoptions, reserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RegLoadAppKeyW(lpfile: P0, phkresult: *mut HKEY, samdesired: u32, dwoptions: u32, reserved: Option) -> super::super::Foundation::WIN32_ERROR @@ -308,7 +308,7 @@ 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); - unsafe { RegLoadAppKeyW(lpfile.param().abi(), core::mem::transmute(phkresult), samdesired, dwoptions, core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } + unsafe { RegLoadAppKeyW(lpfile.param().abi(), phkresult as _, samdesired, dwoptions, reserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RegLoadKeyA(hkey: HKEY, lpsubkey: P1, lpfile: P2) -> super::super::Foundation::WIN32_ERROR @@ -335,7 +335,7 @@ where 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); - unsafe { RegLoadMUIStringA(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())), flags, pszdirectory.param().abi()) } + unsafe { RegLoadMUIStringA(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()), pcbdata.unwrap_or(core::mem::zeroed()) as _, flags, pszdirectory.param().abi()) } } #[inline] 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 @@ -344,17 +344,17 @@ where 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); - unsafe { RegLoadMUIStringW(hkey, pszvalue.param().abi(), core::mem::transmute(pszoutbuf.unwrap_or(core::mem::zeroed())), cboutbuf, core::mem::transmute(pcbdata.unwrap_or(core::mem::zeroed())), flags, pszdirectory.param().abi()) } + unsafe { RegLoadMUIStringW(hkey, pszvalue.param().abi(), pszoutbuf.unwrap_or(core::mem::zeroed()) as _, cboutbuf, pcbdata.unwrap_or(core::mem::zeroed()) as _, flags, pszdirectory.param().abi()) } } #[inline] pub unsafe fn RegNotifyChangeKeyValue(hkey: HKEY, bwatchsubtree: bool, dwnotifyfilter: REG_NOTIFY_FILTER, hevent: Option, fasynchronous: bool) -> super::super::Foundation::WIN32_ERROR { 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); - unsafe { RegNotifyChangeKeyValue(hkey, bwatchsubtree.into(), dwnotifyfilter, core::mem::transmute(hevent.unwrap_or(core::mem::zeroed())), fasynchronous.into()) } + unsafe { RegNotifyChangeKeyValue(hkey, bwatchsubtree.into(), dwnotifyfilter, hevent.unwrap_or(core::mem::zeroed()) as _, fasynchronous.into()) } } #[inline] pub unsafe fn RegOpenCurrentUser(samdesired: u32, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("advapi32.dll" "system" fn RegOpenCurrentUser(samdesired : u32, phkresult : *mut HKEY) -> super::super::Foundation:: WIN32_ERROR); - unsafe { RegOpenCurrentUser(samdesired, core::mem::transmute(phkresult)) } + unsafe { RegOpenCurrentUser(samdesired, phkresult as _) } } #[inline] pub unsafe fn RegOpenKeyA(hkey: HKEY, lpsubkey: P1, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR @@ -362,7 +362,7 @@ where 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); - unsafe { RegOpenKeyA(hkey, lpsubkey.param().abi(), core::mem::transmute(phkresult)) } + unsafe { RegOpenKeyA(hkey, lpsubkey.param().abi(), phkresult as _) } } #[inline] pub unsafe fn RegOpenKeyExA(hkey: HKEY, lpsubkey: P1, uloptions: Option, samdesired: REG_SAM_FLAGS, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR @@ -370,7 +370,7 @@ where 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); - unsafe { RegOpenKeyExA(hkey, lpsubkey.param().abi(), core::mem::transmute(uloptions.unwrap_or(core::mem::zeroed())), samdesired, core::mem::transmute(phkresult)) } + unsafe { RegOpenKeyExA(hkey, lpsubkey.param().abi(), uloptions.unwrap_or(core::mem::zeroed()) as _, samdesired, phkresult as _) } } #[inline] pub unsafe fn RegOpenKeyExW(hkey: HKEY, lpsubkey: P1, uloptions: Option, samdesired: REG_SAM_FLAGS, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR @@ -378,7 +378,7 @@ where 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); - unsafe { RegOpenKeyExW(hkey, lpsubkey.param().abi(), core::mem::transmute(uloptions.unwrap_or(core::mem::zeroed())), samdesired, core::mem::transmute(phkresult)) } + unsafe { RegOpenKeyExW(hkey, lpsubkey.param().abi(), uloptions.unwrap_or(core::mem::zeroed()) as _, samdesired, phkresult as _) } } #[inline] 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 @@ -386,7 +386,7 @@ where P1: 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); - unsafe { RegOpenKeyTransactedA(hkey, lpsubkey.param().abi(), core::mem::transmute(uloptions.unwrap_or(core::mem::zeroed())), samdesired, core::mem::transmute(phkresult), htransaction, core::mem::transmute(pextendedparemeter.unwrap_or(core::mem::zeroed()))) } + unsafe { RegOpenKeyTransactedA(hkey, lpsubkey.param().abi(), uloptions.unwrap_or(core::mem::zeroed()) as _, samdesired, phkresult as _, htransaction, pextendedparemeter.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -394,7 +394,7 @@ where P1: 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); - unsafe { RegOpenKeyTransactedW(hkey, lpsubkey.param().abi(), core::mem::transmute(uloptions.unwrap_or(core::mem::zeroed())), samdesired, core::mem::transmute(phkresult), htransaction, core::mem::transmute(pextendedparemeter.unwrap_or(core::mem::zeroed()))) } + unsafe { RegOpenKeyTransactedW(hkey, lpsubkey.param().abi(), uloptions.unwrap_or(core::mem::zeroed()) as _, samdesired, phkresult as _, htransaction, pextendedparemeter.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RegOpenKeyW(hkey: HKEY, lpsubkey: P1, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR @@ -402,17 +402,17 @@ where 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); - unsafe { RegOpenKeyW(hkey, lpsubkey.param().abi(), core::mem::transmute(phkresult)) } + unsafe { RegOpenKeyW(hkey, lpsubkey.param().abi(), phkresult as _) } } #[inline] 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); - unsafe { RegOpenUserClassesRoot(htoken, core::mem::transmute(dwoptions.unwrap_or(core::mem::zeroed())), samdesired, core::mem::transmute(phkresult)) } + unsafe { RegOpenUserClassesRoot(htoken, dwoptions.unwrap_or(core::mem::zeroed()) as _, samdesired, phkresult as _) } } #[inline] 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); - unsafe { RegOverridePredefKey(hkey, core::mem::transmute(hnewhkey.unwrap_or(core::mem::zeroed()))) } + unsafe { RegOverridePredefKey(hkey, hnewhkey.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 { @@ -420,17 +420,17 @@ pub unsafe fn RegQueryInfoKeyA(hkey: HKEY, lpclass: Option, unsafe { RegQueryInfoKeyA( 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())), + lpclass.unwrap_or(core::mem::zeroed()) as _, + lpcchclass.unwrap_or(core::mem::zeroed()) as _, + lpreserved.unwrap_or(core::mem::zeroed()) as _, + lpcsubkeys.unwrap_or(core::mem::zeroed()) as _, + lpcbmaxsubkeylen.unwrap_or(core::mem::zeroed()) as _, + lpcbmaxclasslen.unwrap_or(core::mem::zeroed()) as _, + lpcvalues.unwrap_or(core::mem::zeroed()) as _, + lpcbmaxvaluenamelen.unwrap_or(core::mem::zeroed()) as _, + lpcbmaxvaluelen.unwrap_or(core::mem::zeroed()) as _, + lpcbsecuritydescriptor.unwrap_or(core::mem::zeroed()) as _, + lpftlastwritetime.unwrap_or(core::mem::zeroed()) as _, ) } } @@ -440,34 +440,34 @@ pub unsafe fn RegQueryInfoKeyW(hkey: HKEY, lpclass: Option, unsafe { RegQueryInfoKeyW( 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())), + lpclass.unwrap_or(core::mem::zeroed()) as _, + lpcchclass.unwrap_or(core::mem::zeroed()) as _, + lpreserved.unwrap_or(core::mem::zeroed()) as _, + lpcsubkeys.unwrap_or(core::mem::zeroed()) as _, + lpcbmaxsubkeylen.unwrap_or(core::mem::zeroed()) as _, + lpcbmaxclasslen.unwrap_or(core::mem::zeroed()) as _, + lpcvalues.unwrap_or(core::mem::zeroed()) as _, + lpcbmaxvaluenamelen.unwrap_or(core::mem::zeroed()) as _, + lpcbmaxvaluelen.unwrap_or(core::mem::zeroed()) as _, + lpcbsecuritydescriptor.unwrap_or(core::mem::zeroed()) as _, + lpftlastwritetime.unwrap_or(core::mem::zeroed()) as _, ) } } #[inline] 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); - unsafe { RegQueryMultipleValuesA(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()))) } + unsafe { RegQueryMultipleValuesA(hkey, core::mem::transmute(val_list.as_ptr()), val_list.len().try_into().unwrap(), lpvaluebuf.unwrap_or(core::mem::zeroed()) as _, ldwtotsize.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { RegQueryMultipleValuesW(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()))) } + unsafe { RegQueryMultipleValuesW(hkey, core::mem::transmute(val_list.as_ptr()), val_list.len().try_into().unwrap(), lpvaluebuf.unwrap_or(core::mem::zeroed()) as _, ldwtotsize.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { RegQueryReflectionKey(hbase, core::mem::transmute(bisreflectiondisabled)) } + unsafe { RegQueryReflectionKey(hbase, bisreflectiondisabled as _) } } #[inline] pub unsafe fn RegQueryValueA(hkey: HKEY, lpsubkey: P1, lpdata: Option, lpcbdata: Option<*mut i32>) -> super::super::Foundation::WIN32_ERROR @@ -475,7 +475,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegQueryValueA(hkey : HKEY, lpsubkey : windows_core::PCSTR, lpdata : windows_core::PSTR, lpcbdata : *mut i32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { RegQueryValueA(hkey, lpsubkey.param().abi(), core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbdata.unwrap_or(core::mem::zeroed()))) } + unsafe { RegQueryValueA(hkey, lpsubkey.param().abi(), lpdata.unwrap_or(core::mem::zeroed()) as _, lpcbdata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -483,7 +483,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegQueryValueExA(hkey : HKEY, lpvaluename : windows_core::PCSTR, lpreserved : *const u32, lptype : *mut REG_VALUE_TYPE, lpdata : *mut u8, lpcbdata : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { RegQueryValueExA(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()))) } + unsafe { RegQueryValueExA(hkey, lpvaluename.param().abi(), lpreserved.unwrap_or(core::mem::zeroed()) as _, lptype.unwrap_or(core::mem::zeroed()) as _, lpdata.unwrap_or(core::mem::zeroed()) as _, lpcbdata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -491,7 +491,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegQueryValueExW(hkey : HKEY, lpvaluename : windows_core::PCWSTR, lpreserved : *const u32, lptype : *mut REG_VALUE_TYPE, lpdata : *mut u8, lpcbdata : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { RegQueryValueExW(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()))) } + unsafe { RegQueryValueExW(hkey, lpvaluename.param().abi(), lpreserved.unwrap_or(core::mem::zeroed()) as _, lptype.unwrap_or(core::mem::zeroed()) as _, lpdata.unwrap_or(core::mem::zeroed()) as _, lpcbdata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RegQueryValueW(hkey: HKEY, lpsubkey: P1, lpdata: Option, lpcbdata: Option<*mut i32>) -> super::super::Foundation::WIN32_ERROR @@ -499,7 +499,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegQueryValueW(hkey : HKEY, lpsubkey : windows_core::PCWSTR, lpdata : windows_core::PWSTR, lpcbdata : *mut i32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { RegQueryValueW(hkey, lpsubkey.param().abi(), core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbdata.unwrap_or(core::mem::zeroed()))) } + unsafe { RegQueryValueW(hkey, lpsubkey.param().abi(), lpdata.unwrap_or(core::mem::zeroed()) as _, lpcbdata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RegRenameKey(hkey: HKEY, lpsubkeyname: P1, lpnewkeyname: P2) -> super::super::Foundation::WIN32_ERROR @@ -553,7 +553,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegSaveKeyA(hkey : HKEY, lpfile : windows_core::PCSTR, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES) -> super::super::Foundation:: WIN32_ERROR); - unsafe { RegSaveKeyA(hkey, lpfile.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed()))) } + unsafe { RegSaveKeyA(hkey, lpfile.param().abi(), lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -562,7 +562,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegSaveKeyExA(hkey : HKEY, lpfile : windows_core::PCSTR, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, flags : REG_SAVE_FORMAT) -> super::super::Foundation:: WIN32_ERROR); - unsafe { RegSaveKeyExA(hkey, lpfile.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), flags) } + unsafe { RegSaveKeyExA(hkey, lpfile.param().abi(), lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _, flags) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -571,7 +571,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegSaveKeyExW(hkey : HKEY, lpfile : windows_core::PCWSTR, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, flags : REG_SAVE_FORMAT) -> super::super::Foundation:: WIN32_ERROR); - unsafe { RegSaveKeyExW(hkey, lpfile.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), flags) } + unsafe { RegSaveKeyExW(hkey, lpfile.param().abi(), lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _, flags) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -580,7 +580,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegSaveKeyW(hkey : HKEY, lpfile : windows_core::PCWSTR, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES) -> super::super::Foundation:: WIN32_ERROR); - unsafe { RegSaveKeyW(hkey, lpfile.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed()))) } + unsafe { RegSaveKeyW(hkey, lpfile.param().abi(), lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -595,7 +595,7 @@ where P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegSetKeyValueA(hkey : HKEY, lpsubkey : windows_core::PCSTR, lpvaluename : windows_core::PCSTR, dwtype : u32, lpdata : *const core::ffi::c_void, cbdata : u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { RegSetKeyValueA(hkey, lpsubkey.param().abi(), lpvaluename.param().abi(), dwtype, core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), cbdata) } + unsafe { RegSetKeyValueA(hkey, lpsubkey.param().abi(), lpvaluename.param().abi(), dwtype, lpdata.unwrap_or(core::mem::zeroed()) as _, cbdata) } } #[inline] 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 @@ -604,7 +604,7 @@ where P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegSetKeyValueW(hkey : HKEY, lpsubkey : windows_core::PCWSTR, lpvaluename : windows_core::PCWSTR, dwtype : u32, lpdata : *const core::ffi::c_void, cbdata : u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { RegSetKeyValueW(hkey, lpsubkey.param().abi(), lpvaluename.param().abi(), dwtype, core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), cbdata) } + unsafe { RegSetKeyValueW(hkey, lpsubkey.param().abi(), lpvaluename.param().abi(), dwtype, lpdata.unwrap_or(core::mem::zeroed()) as _, cbdata) } } #[inline] pub unsafe fn RegSetValueA(hkey: HKEY, lpsubkey: P1, dwtype: REG_VALUE_TYPE, lpdata: Option<&[u8]>) -> super::super::Foundation::WIN32_ERROR @@ -620,7 +620,7 @@ where 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); - unsafe { RegSetValueExA(hkey, lpvaluename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), 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())) } + unsafe { RegSetValueExA(hkey, lpvaluename.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _, 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: HKEY, lpvaluename: P1, reserved: Option, dwtype: REG_VALUE_TYPE, lpdata: Option<&[u8]>) -> super::super::Foundation::WIN32_ERROR @@ -628,7 +628,7 @@ where 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); - unsafe { RegSetValueExW(hkey, lpvaluename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), 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())) } + unsafe { RegSetValueExW(hkey, lpvaluename.param().abi(), reserved.unwrap_or(core::mem::zeroed()) as _, 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: HKEY, lpsubkey: P1, dwtype: REG_VALUE_TYPE, lpdata: P3, cbdata: u32) -> super::super::Foundation::WIN32_ERROR diff --git a/crates/libs/windows/src/Windows/Win32/System/RemoteDesktop/mod.rs b/crates/libs/windows/src/Windows/Win32/System/RemoteDesktop/mod.rs index fbde905182..db82eafdef 100644 --- a/crates/libs/windows/src/Windows/Win32/System/RemoteDesktop/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/RemoteDesktop/mod.rs @@ -1,7 +1,7 @@ #[inline] pub unsafe fn ProcessIdToSessionId(dwprocessid: u32, psessionid: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn ProcessIdToSessionId(dwprocessid : u32, psessionid : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { ProcessIdToSessionId(dwprocessid, core::mem::transmute(psessionid)).ok() } + unsafe { ProcessIdToSessionId(dwprocessid, psessionid as _).ok() } } #[inline] pub unsafe fn WTSCloseServer(hserver: super::super::Foundation::HANDLE) { @@ -30,7 +30,7 @@ where 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); - unsafe { WTSCreateListenerA(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), preserved, reserved, plistenername.param().abi(), pbuffer, flag).ok() } + unsafe { WTSCreateListenerA(hserver.unwrap_or(core::mem::zeroed()) as _, preserved, reserved, plistenername.param().abi(), pbuffer, flag).ok() } } #[inline] pub unsafe fn WTSCreateListenerW(hserver: Option, preserved: *const core::ffi::c_void, reserved: u32, plistenername: P3, pbuffer: *const WTSLISTENERCONFIGW, flag: u32) -> windows_core::Result<()> @@ -38,12 +38,12 @@ where 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); - unsafe { WTSCreateListenerW(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), preserved, reserved, plistenername.param().abi(), pbuffer, flag).ok() } + unsafe { WTSCreateListenerW(hserver.unwrap_or(core::mem::zeroed()) as _, preserved, reserved, plistenername.param().abi(), pbuffer, flag).ok() } } #[inline] pub unsafe fn WTSDisconnectSession(hserver: Option, sessionid: u32, bwait: bool) -> windows_core::Result<()> { windows_targets::link!("wtsapi32.dll" "system" fn WTSDisconnectSession(hserver : super::super::Foundation:: HANDLE, sessionid : u32, bwait : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - unsafe { WTSDisconnectSession(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), sessionid, bwait.into()).ok() } + unsafe { WTSDisconnectSession(hserver.unwrap_or(core::mem::zeroed()) as _, sessionid, bwait.into()).ok() } } #[inline] pub unsafe fn WTSEnableChildSessions(benable: bool) -> super::super::Foundation::BOOL { @@ -53,34 +53,34 @@ pub unsafe fn WTSEnableChildSessions(benable: bool) -> super::super::Foundation: #[inline] 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); - unsafe { WTSEnumerateListenersA(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), preserved, reserved, core::mem::transmute(plisteners.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcount)).ok() } + unsafe { WTSEnumerateListenersA(hserver.unwrap_or(core::mem::zeroed()) as _, preserved, reserved, plisteners.unwrap_or(core::mem::zeroed()) as _, pcount as _).ok() } } #[inline] 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); - unsafe { WTSEnumerateListenersW(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), preserved, reserved, core::mem::transmute(plisteners.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcount)).ok() } + unsafe { WTSEnumerateListenersW(hserver.unwrap_or(core::mem::zeroed()) as _, preserved, reserved, plisteners.unwrap_or(core::mem::zeroed()) as _, pcount as _).ok() } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { WTSEnumerateProcessesA(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), reserved, version, core::mem::transmute(ppprocessinfo), core::mem::transmute(pcount)).ok() } + unsafe { WTSEnumerateProcessesA(hserver.unwrap_or(core::mem::zeroed()) as _, reserved, version, ppprocessinfo as _, pcount as _).ok() } } #[inline] 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); - unsafe { WTSEnumerateProcessesExA(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(plevel), sessionid, core::mem::transmute(ppprocessinfo), core::mem::transmute(pcount)).ok() } + unsafe { WTSEnumerateProcessesExA(hserver.unwrap_or(core::mem::zeroed()) as _, plevel as _, sessionid, ppprocessinfo as _, pcount as _).ok() } } #[inline] 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); - unsafe { WTSEnumerateProcessesExW(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(plevel), sessionid, core::mem::transmute(ppprocessinfo), core::mem::transmute(pcount)).ok() } + unsafe { WTSEnumerateProcessesExW(hserver.unwrap_or(core::mem::zeroed()) as _, plevel as _, sessionid, ppprocessinfo as _, pcount as _).ok() } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { WTSEnumerateProcessesW(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), reserved, version, core::mem::transmute(ppprocessinfo), core::mem::transmute(pcount)).ok() } + unsafe { WTSEnumerateProcessesW(hserver.unwrap_or(core::mem::zeroed()) as _, reserved, version, ppprocessinfo as _, pcount as _).ok() } } #[inline] pub unsafe fn WTSEnumerateServersA(pdomainname: P0, reserved: u32, version: u32, ppserverinfo: *mut *mut WTS_SERVER_INFOA, pcount: *mut u32) -> windows_core::Result<()> @@ -88,7 +88,7 @@ where P0: windows_core::Param, { windows_targets::link!("wtsapi32.dll" "system" fn WTSEnumerateServersA(pdomainname : windows_core::PCSTR, reserved : u32, version : u32, ppserverinfo : *mut *mut WTS_SERVER_INFOA, pcount : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { WTSEnumerateServersA(pdomainname.param().abi(), reserved, version, core::mem::transmute(ppserverinfo), core::mem::transmute(pcount)).ok() } + unsafe { WTSEnumerateServersA(pdomainname.param().abi(), reserved, version, ppserverinfo as _, pcount as _).ok() } } #[inline] pub unsafe fn WTSEnumerateServersW(pdomainname: P0, reserved: u32, version: u32, ppserverinfo: *mut *mut WTS_SERVER_INFOW, pcount: *mut u32) -> windows_core::Result<()> @@ -96,32 +96,32 @@ where P0: windows_core::Param, { windows_targets::link!("wtsapi32.dll" "system" fn WTSEnumerateServersW(pdomainname : windows_core::PCWSTR, reserved : u32, version : u32, ppserverinfo : *mut *mut WTS_SERVER_INFOW, pcount : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { WTSEnumerateServersW(pdomainname.param().abi(), reserved, version, core::mem::transmute(ppserverinfo), core::mem::transmute(pcount)).ok() } + unsafe { WTSEnumerateServersW(pdomainname.param().abi(), reserved, version, ppserverinfo as _, pcount as _).ok() } } #[inline] 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); - unsafe { WTSEnumerateSessionsA(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), reserved, version, core::mem::transmute(ppsessioninfo), core::mem::transmute(pcount)).ok() } + unsafe { WTSEnumerateSessionsA(hserver.unwrap_or(core::mem::zeroed()) as _, reserved, version, ppsessioninfo as _, pcount as _).ok() } } #[inline] 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); - unsafe { WTSEnumerateSessionsExA(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(plevel), filter, core::mem::transmute(ppsessioninfo), core::mem::transmute(pcount)).ok() } + unsafe { WTSEnumerateSessionsExA(hserver.unwrap_or(core::mem::zeroed()) as _, plevel as _, filter, ppsessioninfo as _, pcount as _).ok() } } #[inline] 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); - unsafe { WTSEnumerateSessionsExW(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(plevel), filter, core::mem::transmute(ppsessioninfo), core::mem::transmute(pcount)).ok() } + unsafe { WTSEnumerateSessionsExW(hserver.unwrap_or(core::mem::zeroed()) as _, plevel as _, filter, ppsessioninfo as _, pcount as _).ok() } } #[inline] 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); - unsafe { WTSEnumerateSessionsW(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), reserved, version, core::mem::transmute(ppsessioninfo), core::mem::transmute(pcount)).ok() } + unsafe { WTSEnumerateSessionsW(hserver.unwrap_or(core::mem::zeroed()) as _, reserved, version, ppsessioninfo as _, pcount as _).ok() } } #[inline] pub unsafe fn WTSFreeMemory(pmemory: *mut core::ffi::c_void) { windows_targets::link!("wtsapi32.dll" "system" fn WTSFreeMemory(pmemory : *mut core::ffi::c_void)); - unsafe { WTSFreeMemory(core::mem::transmute(pmemory)) } + unsafe { WTSFreeMemory(pmemory as _) } } #[inline] pub unsafe fn WTSFreeMemoryExA(wtstypeclass: WTS_TYPE_CLASS, pmemory: *const core::ffi::c_void, numberofentries: u32) -> windows_core::Result<()> { @@ -141,7 +141,7 @@ pub unsafe fn WTSGetActiveConsoleSessionId() -> u32 { #[inline] pub unsafe fn WTSGetChildSessionId(psessionid: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("wtsapi32.dll" "system" fn WTSGetChildSessionId(psessionid : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { WTSGetChildSessionId(core::mem::transmute(psessionid)) } + unsafe { WTSGetChildSessionId(psessionid as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -150,7 +150,7 @@ where 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); - unsafe { WTSGetListenerSecurityA(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), preserved, reserved, plistenername.param().abi(), securityinformation, core::mem::transmute(psecuritydescriptor.unwrap_or(core::mem::zeroed())), nlength, core::mem::transmute(lpnlengthneeded)).ok() } + unsafe { WTSGetListenerSecurityA(hserver.unwrap_or(core::mem::zeroed()) as _, preserved, reserved, plistenername.param().abi(), securityinformation, psecuritydescriptor.unwrap_or(core::mem::zeroed()) as _, nlength, lpnlengthneeded as _).ok() } } #[cfg(feature = "Win32_Security")] #[inline] @@ -159,17 +159,17 @@ where 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); - unsafe { WTSGetListenerSecurityW(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), preserved, reserved, plistenername.param().abi(), securityinformation, core::mem::transmute(psecuritydescriptor.unwrap_or(core::mem::zeroed())), nlength, core::mem::transmute(lpnlengthneeded)).ok() } + unsafe { WTSGetListenerSecurityW(hserver.unwrap_or(core::mem::zeroed()) as _, preserved, reserved, plistenername.param().abi(), securityinformation, psecuritydescriptor.unwrap_or(core::mem::zeroed()) as _, nlength, lpnlengthneeded as _).ok() } } #[inline] pub unsafe fn WTSIsChildSessionsEnabled(pbenabled: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL { windows_targets::link!("wtsapi32.dll" "system" fn WTSIsChildSessionsEnabled(pbenabled : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - unsafe { WTSIsChildSessionsEnabled(core::mem::transmute(pbenabled)) } + unsafe { WTSIsChildSessionsEnabled(pbenabled as _) } } #[inline] pub unsafe fn WTSLogoffSession(hserver: Option, sessionid: u32, bwait: bool) -> windows_core::Result<()> { windows_targets::link!("wtsapi32.dll" "system" fn WTSLogoffSession(hserver : super::super::Foundation:: HANDLE, sessionid : u32, bwait : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - unsafe { WTSLogoffSession(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), sessionid, bwait.into()).ok() } + unsafe { WTSLogoffSession(hserver.unwrap_or(core::mem::zeroed()) as _, sessionid, bwait.into()).ok() } } #[inline] pub unsafe fn WTSOpenServerA(pservername: P0) -> super::super::Foundation::HANDLE @@ -209,7 +209,7 @@ where 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); - unsafe { WTSQueryListenerConfigA(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), preserved, reserved, plistenername.param().abi(), core::mem::transmute(pbuffer)).ok() } + unsafe { WTSQueryListenerConfigA(hserver.unwrap_or(core::mem::zeroed()) as _, preserved, reserved, plistenername.param().abi(), pbuffer as _).ok() } } #[inline] pub unsafe fn WTSQueryListenerConfigW(hserver: Option, preserved: *const core::ffi::c_void, reserved: u32, plistenername: P3, pbuffer: *mut WTSLISTENERCONFIGW) -> windows_core::Result<()> @@ -217,17 +217,17 @@ where 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); - unsafe { WTSQueryListenerConfigW(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), preserved, reserved, plistenername.param().abi(), core::mem::transmute(pbuffer)).ok() } + unsafe { WTSQueryListenerConfigW(hserver.unwrap_or(core::mem::zeroed()) as _, preserved, reserved, plistenername.param().abi(), pbuffer as _).ok() } } #[inline] 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); - unsafe { WTSQuerySessionInformationA(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), sessionid, wtsinfoclass, core::mem::transmute(ppbuffer), core::mem::transmute(pbytesreturned)).ok() } + unsafe { WTSQuerySessionInformationA(hserver.unwrap_or(core::mem::zeroed()) as _, sessionid, wtsinfoclass, ppbuffer as _, pbytesreturned as _).ok() } } #[inline] 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); - unsafe { WTSQuerySessionInformationW(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), sessionid, wtsinfoclass, core::mem::transmute(ppbuffer), core::mem::transmute(pbytesreturned)).ok() } + unsafe { WTSQuerySessionInformationW(hserver.unwrap_or(core::mem::zeroed()) as _, sessionid, wtsinfoclass, ppbuffer as _, pbytesreturned as _).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<()> @@ -236,7 +236,7 @@ where P1: windows_core::Param, { windows_targets::link!("wtsapi32.dll" "system" fn WTSQueryUserConfigA(pservername : windows_core::PCSTR, pusername : windows_core::PCSTR, wtsconfigclass : WTS_CONFIG_CLASS, ppbuffer : *mut windows_core::PSTR, pbytesreturned : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { WTSQueryUserConfigA(pservername.param().abi(), pusername.param().abi(), wtsconfigclass, core::mem::transmute(ppbuffer), core::mem::transmute(pbytesreturned)).ok() } + unsafe { WTSQueryUserConfigA(pservername.param().abi(), pusername.param().abi(), wtsconfigclass, ppbuffer as _, pbytesreturned as _).ok() } } #[inline] pub unsafe fn WTSQueryUserConfigW(pservername: P0, pusername: P1, wtsconfigclass: WTS_CONFIG_CLASS, ppbuffer: *mut windows_core::PWSTR, pbytesreturned: *mut u32) -> windows_core::Result<()> @@ -245,12 +245,12 @@ where P1: windows_core::Param, { windows_targets::link!("wtsapi32.dll" "system" fn WTSQueryUserConfigW(pservername : windows_core::PCWSTR, pusername : windows_core::PCWSTR, wtsconfigclass : WTS_CONFIG_CLASS, ppbuffer : *mut windows_core::PWSTR, pbytesreturned : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { WTSQueryUserConfigW(pservername.param().abi(), pusername.param().abi(), wtsconfigclass, core::mem::transmute(ppbuffer), core::mem::transmute(pbytesreturned)).ok() } + unsafe { WTSQueryUserConfigW(pservername.param().abi(), pusername.param().abi(), wtsconfigclass, ppbuffer as _, pbytesreturned as _).ok() } } #[inline] pub unsafe fn WTSQueryUserToken(sessionid: u32, phtoken: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("wtsapi32.dll" "system" fn WTSQueryUserToken(sessionid : u32, phtoken : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - unsafe { WTSQueryUserToken(sessionid, core::mem::transmute(phtoken)).ok() } + unsafe { WTSQueryUserToken(sessionid, phtoken as _).ok() } } #[inline] pub unsafe fn WTSRegisterSessionNotification(hwnd: super::super::Foundation::HWND, dwflags: u32) -> windows_core::Result<()> { @@ -260,13 +260,13 @@ pub unsafe fn WTSRegisterSessionNotification(hwnd: super::super::Foundation::HWN #[inline] 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); - unsafe { WTSRegisterSessionNotificationEx(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), hwnd, dwflags).ok() } + unsafe { WTSRegisterSessionNotificationEx(hserver.unwrap_or(core::mem::zeroed()) as _, hwnd, dwflags).ok() } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] 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: bool) -> windows_core::Result<()> { 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); - unsafe { WTSSendMessageA(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), sessionid, core::mem::transmute(ptitle.as_ptr()), ptitle.len().try_into().unwrap(), core::mem::transmute(pmessage.as_ptr()), pmessage.len().try_into().unwrap(), style, timeout, core::mem::transmute(presponse), bwait.into()).ok() } + unsafe { WTSSendMessageA(hserver.unwrap_or(core::mem::zeroed()) as _, sessionid, core::mem::transmute(ptitle.as_ptr()), ptitle.len().try_into().unwrap(), core::mem::transmute(pmessage.as_ptr()), pmessage.len().try_into().unwrap(), style, timeout, presponse as _, bwait.into()).ok() } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -276,7 +276,7 @@ where P4: 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); - unsafe { WTSSendMessageW(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), sessionid, ptitle.param().abi(), titlelength, pmessage.param().abi(), messagelength, style, timeout, core::mem::transmute(presponse), bwait.into()).ok() } + unsafe { WTSSendMessageW(hserver.unwrap_or(core::mem::zeroed()) as _, sessionid, ptitle.param().abi(), titlelength, pmessage.param().abi(), messagelength, style, timeout, presponse as _, bwait.into()).ok() } } #[cfg(feature = "Win32_Security")] #[inline] @@ -285,7 +285,7 @@ where P3: 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); - unsafe { WTSSetListenerSecurityA(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), preserved, reserved, plistenername.param().abi(), securityinformation, psecuritydescriptor).ok() } + unsafe { WTSSetListenerSecurityA(hserver.unwrap_or(core::mem::zeroed()) as _, preserved, reserved, plistenername.param().abi(), securityinformation, psecuritydescriptor).ok() } } #[cfg(feature = "Win32_Security")] #[inline] @@ -294,12 +294,12 @@ where P3: 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); - unsafe { WTSSetListenerSecurityW(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), preserved, reserved, plistenername.param().abi(), securityinformation, psecuritydescriptor).ok() } + unsafe { WTSSetListenerSecurityW(hserver.unwrap_or(core::mem::zeroed()) as _, preserved, reserved, plistenername.param().abi(), securityinformation, psecuritydescriptor).ok() } } #[inline] 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); - unsafe { WTSSetRenderHint(core::mem::transmute(prenderhintid), hwndowner, 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() } + unsafe { WTSSetRenderHint(prenderhintid as _, hwndowner, 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<()> @@ -323,7 +323,7 @@ where #[inline] 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); - unsafe { WTSShutdownSystem(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), shutdownflag).ok() } + unsafe { WTSShutdownSystem(hserver.unwrap_or(core::mem::zeroed()) as _, shutdownflag).ok() } } #[inline] pub unsafe fn WTSStartRemoteControlSessionA(ptargetservername: P0, targetlogonid: u32, hotkeyvk: u8, hotkeymodifiers: u16) -> windows_core::Result<()> @@ -349,7 +349,7 @@ pub unsafe fn WTSStopRemoteControlSession(logonid: u32) -> windows_core::Result< #[inline] 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); - unsafe { WTSTerminateProcess(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), processid, exitcode).ok() } + unsafe { WTSTerminateProcess(hserver.unwrap_or(core::mem::zeroed()) as _, processid, exitcode).ok() } } #[inline] pub unsafe fn WTSUnRegisterSessionNotification(hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { @@ -359,7 +359,7 @@ pub unsafe fn WTSUnRegisterSessionNotification(hwnd: super::super::Foundation::H #[inline] 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); - unsafe { WTSUnRegisterSessionNotificationEx(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), hwnd).ok() } + unsafe { WTSUnRegisterSessionNotificationEx(hserver.unwrap_or(core::mem::zeroed()) as _, hwnd).ok() } } #[inline] pub unsafe fn WTSVirtualChannelClose(hchannelhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -372,7 +372,7 @@ where 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__ = unsafe { WTSVirtualChannelOpen(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), sessionid, pvirtualname.param().abi()) }; + let result__ = unsafe { WTSVirtualChannelOpen(hserver.unwrap_or(core::mem::zeroed()) as _, sessionid, pvirtualname.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -397,22 +397,22 @@ pub unsafe fn WTSVirtualChannelPurgeOutput(hchannelhandle: super::super::Foundat #[inline] 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); - unsafe { WTSVirtualChannelQuery(hchannelhandle, param1, core::mem::transmute(ppbuffer), core::mem::transmute(pbytesreturned)).ok() } + unsafe { WTSVirtualChannelQuery(hchannelhandle, param1, ppbuffer as _, pbytesreturned as _).ok() } } #[inline] 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); - unsafe { WTSVirtualChannelRead(hchannelhandle, timeout, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(pbytesread)).ok() } + unsafe { WTSVirtualChannelRead(hchannelhandle, timeout, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), pbytesread as _).ok() } } #[inline] 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); - unsafe { WTSVirtualChannelWrite(hchannelhandle, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(pbyteswritten)).ok() } + unsafe { WTSVirtualChannelWrite(hchannelhandle, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), pbyteswritten as _).ok() } } #[inline] 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); - unsafe { WTSWaitSystemEvent(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), eventmask, core::mem::transmute(peventflags)).ok() } + unsafe { WTSWaitSystemEvent(hserver.unwrap_or(core::mem::zeroed()) as _, eventmask, peventflags as _).ok() } } #[repr(C)] #[derive(Clone, Debug, PartialEq)] @@ -1206,7 +1206,7 @@ impl IAudioDeviceEndpoint { } } pub unsafe fn WriteExclusiveModeParametersToSharedMemory(&self, htargetprocess: usize, hnsperiod: i64, hnsbufferduration: i64, u32latencycoefficient: u32, pu32sharedmemorysize: *mut u32, phsharedmemory: *mut usize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).WriteExclusiveModeParametersToSharedMemory)(windows_core::Interface::as_raw(self), htargetprocess, hnsperiod, hnsbufferduration, u32latencycoefficient, core::mem::transmute(pu32sharedmemorysize), core::mem::transmute(phsharedmemory)).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteExclusiveModeParametersToSharedMemory)(windows_core::Interface::as_raw(self), htargetprocess, hnsperiod, hnsbufferduration, u32latencycoefficient, pu32sharedmemorysize as _, phsharedmemory as _).ok() } } } #[repr(C)] @@ -1450,7 +1450,7 @@ windows_core::imp::define_interface!(IAudioEndpointRT, IAudioEndpointRT_Vtbl, 0x windows_core::imp::interface_hierarchy!(IAudioEndpointRT, windows_core::IUnknown); impl IAudioEndpointRT { pub unsafe fn GetCurrentPadding(&self, ppadding: *mut i64, paecurrentposition: *mut AE_CURRENT_POSITION) { - unsafe { (windows_core::Interface::vtable(self).GetCurrentPadding)(windows_core::Interface::as_raw(self), core::mem::transmute(ppadding), core::mem::transmute(paecurrentposition)) } + unsafe { (windows_core::Interface::vtable(self).GetCurrentPadding)(windows_core::Interface::as_raw(self), ppadding as _, paecurrentposition as _) } } pub unsafe fn ProcessingComplete(&self) { unsafe { (windows_core::Interface::vtable(self).ProcessingComplete)(windows_core::Interface::as_raw(self)) } @@ -1520,7 +1520,7 @@ windows_core::imp::interface_hierarchy!(IAudioInputEndpointRT, windows_core::IUn impl IAudioInputEndpointRT { #[cfg(feature = "Win32_Media_Audio_Apo")] pub unsafe fn GetInputDataPointer(&self, pconnectionproperty: *mut super::super::Media::Audio::Apo::APO_CONNECTION_PROPERTY, paetimestamp: *mut AE_CURRENT_POSITION) { - unsafe { (windows_core::Interface::vtable(self).GetInputDataPointer)(windows_core::Interface::as_raw(self), core::mem::transmute(pconnectionproperty), core::mem::transmute(paetimestamp)) } + unsafe { (windows_core::Interface::vtable(self).GetInputDataPointer)(windows_core::Interface::as_raw(self), pconnectionproperty as _, paetimestamp as _) } } pub unsafe fn ReleaseInputDataPointer(&self, u32framecount: u32, pdatapointer: usize) { unsafe { (windows_core::Interface::vtable(self).ReleaseInputDataPointer)(windows_core::Interface::as_raw(self), u32framecount, pdatapointer) } @@ -2586,7 +2586,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).PutContext)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(contextid), core::mem::transmute_copy(context), existingcontext.unwrap_or(core::mem::zeroed()) as _).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 { @@ -3203,16 +3203,16 @@ impl ITsSbGlobalStore { } #[cfg(feature = "Win32_System_Com")] pub unsafe fn EnumerateFarms(&self, providername: &windows_core::BSTR, pdwcount: *mut u32, pval: *mut *mut super::Com::SAFEARRAY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumerateFarms)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(providername), core::mem::transmute(pdwcount), core::mem::transmute(pval)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumerateFarms)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(providername), pdwcount as _, pval as _).ok() } } pub unsafe fn EnumerateTargets(&self, providername: &windows_core::BSTR, farmname: &windows_core::BSTR, envname: &windows_core::BSTR, pdwcount: *mut u32, pval: *mut *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumerateTargets)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(providername), core::mem::transmute_copy(farmname), core::mem::transmute_copy(envname), core::mem::transmute(pdwcount), core::mem::transmute(pval)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumerateTargets)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(providername), core::mem::transmute_copy(farmname), core::mem::transmute_copy(envname), pdwcount as _, pval as _).ok() } } pub unsafe fn EnumerateEnvironmentsByProvider(&self, providername: &windows_core::BSTR, pdwcount: *mut u32, ppval: *mut *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumerateEnvironmentsByProvider)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(providername), core::mem::transmute(pdwcount), core::mem::transmute(ppval)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumerateEnvironmentsByProvider)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(providername), pdwcount as _, ppval as _).ok() } } pub unsafe fn EnumerateSessions(&self, providername: &windows_core::BSTR, targetname: &windows_core::BSTR, username: &windows_core::BSTR, userdomain: &windows_core::BSTR, poolname: &windows_core::BSTR, initialprogram: &windows_core::BSTR, psessionstate: *const TSSESSION_STATE, pdwcount: *mut u32, ppval: *mut *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumerateSessions)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(providername), core::mem::transmute_copy(targetname), core::mem::transmute_copy(username), core::mem::transmute_copy(userdomain), core::mem::transmute_copy(poolname), core::mem::transmute_copy(initialprogram), psessionstate, core::mem::transmute(pdwcount), core::mem::transmute(ppval)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumerateSessions)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(providername), core::mem::transmute_copy(targetname), core::mem::transmute_copy(username), core::mem::transmute_copy(userdomain), core::mem::transmute_copy(poolname), core::mem::transmute_copy(initialprogram), psessionstate, pdwcount as _, ppval as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetFarmProperty(&self, farmname: &windows_core::BSTR, propertyname: &windows_core::BSTR, pvarvalue: *const super::Variant::VARIANT) -> windows_core::Result<()> { @@ -4410,7 +4410,7 @@ impl ITsSbResourcePluginStore { } #[cfg(feature = "Win32_System_Com")] pub unsafe fn EnumerateFarms(&self, pdwcount: *mut u32, pval: *mut *mut super::Com::SAFEARRAY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumerateFarms)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwcount), core::mem::transmute(pval)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumerateFarms)(windows_core::Interface::as_raw(self), pdwcount as _, pval as _).ok() } } pub unsafe fn QueryEnvironment(&self, environmentname: &windows_core::BSTR) -> windows_core::Result { unsafe { @@ -4419,7 +4419,7 @@ impl ITsSbResourcePluginStore { } } pub unsafe fn EnumerateEnvironments(&self, pdwcount: *mut u32, pval: *mut *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumerateEnvironments)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwcount), core::mem::transmute(pval)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumerateEnvironments)(windows_core::Interface::as_raw(self), pdwcount as _, pval as _).ok() } } pub unsafe fn SaveTarget(&self, ptarget: P0, bforcewrite: bool) -> windows_core::Result<()> where @@ -4460,10 +4460,10 @@ impl ITsSbResourcePluginStore { unsafe { (windows_core::Interface::vtable(self).SetSessionState)(windows_core::Interface::as_raw(self), sbsession.param().abi()).ok() } } pub unsafe fn EnumerateTargets(&self, farmname: &windows_core::BSTR, envname: &windows_core::BSTR, sortbyfieldid: TS_SB_SORT_BY, sortybypropname: &windows_core::BSTR, pdwcount: *mut u32, pval: *mut *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumerateTargets)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(farmname), core::mem::transmute_copy(envname), sortbyfieldid, core::mem::transmute_copy(sortybypropname), core::mem::transmute(pdwcount), core::mem::transmute(pval)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumerateTargets)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(farmname), core::mem::transmute_copy(envname), sortbyfieldid, core::mem::transmute_copy(sortybypropname), pdwcount as _, pval as _).ok() } } pub unsafe fn EnumerateSessions(&self, targetname: &windows_core::BSTR, username: &windows_core::BSTR, userdomain: &windows_core::BSTR, poolname: &windows_core::BSTR, initialprogram: &windows_core::BSTR, psessionstate: *const TSSESSION_STATE, pdwcount: *mut u32, ppval: *mut *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumerateSessions)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(targetname), core::mem::transmute_copy(username), core::mem::transmute_copy(userdomain), core::mem::transmute_copy(poolname), core::mem::transmute_copy(initialprogram), psessionstate, core::mem::transmute(pdwcount), core::mem::transmute(ppval)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumerateSessions)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(targetname), core::mem::transmute_copy(username), core::mem::transmute_copy(userdomain), core::mem::transmute_copy(poolname), core::mem::transmute_copy(initialprogram), psessionstate, pdwcount as _, ppval as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetFarmProperty(&self, farmname: &windows_core::BSTR, propertyname: &windows_core::BSTR, pvarvalue: *const super::Variant::VARIANT) -> windows_core::Result<()> { @@ -5249,7 +5249,7 @@ impl ITsSbTarget { unsafe { (windows_core::Interface::vtable(self).SetTargetNetbios)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(val)).ok() } } pub unsafe fn get_IpAddresses(&self, sockaddr: *mut TSSD_ConnectionPoint, numaddresses: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).get_IpAddresses)(windows_core::Interface::as_raw(self), core::mem::transmute(sockaddr), core::mem::transmute(numaddresses)).ok() } + unsafe { (windows_core::Interface::vtable(self).get_IpAddresses)(windows_core::Interface::as_raw(self), sockaddr as _, numaddresses as _).ok() } } pub unsafe fn put_IpAddresses(&self, sockaddr: &[TSSD_ConnectionPoint]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).put_IpAddresses)(windows_core::Interface::as_raw(self), core::mem::transmute(sockaddr.as_ptr()), sockaddr.len().try_into().unwrap()).ok() } @@ -6192,13 +6192,13 @@ impl IWRdsProtocolConnection { unsafe { (windows_core::Interface::vtable(self).AcceptConnection)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetClientData(&self, pclientdata: *mut WTS_CLIENT_DATA) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClientData)(windows_core::Interface::as_raw(self), core::mem::transmute(pclientdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClientData)(windows_core::Interface::as_raw(self), pclientdata as _).ok() } } pub unsafe fn GetClientMonitorData(&self, pnummonitors: *mut u32, pprimarymonitor: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClientMonitorData)(windows_core::Interface::as_raw(self), core::mem::transmute(pnummonitors), core::mem::transmute(pprimarymonitor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClientMonitorData)(windows_core::Interface::as_raw(self), pnummonitors as _, pprimarymonitor as _).ok() } } pub unsafe fn GetUserCredentials(&self, pusercreds: *mut WTS_USER_CREDENTIAL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetUserCredentials)(windows_core::Interface::as_raw(self), core::mem::transmute(pusercreds)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUserCredentials)(windows_core::Interface::as_raw(self), pusercreds as _).ok() } } pub unsafe fn GetLicenseConnection(&self) -> windows_core::Result { unsafe { @@ -6207,13 +6207,13 @@ impl IWRdsProtocolConnection { } } pub unsafe fn AuthenticateClientToSession(&self, sessionid: *mut WTS_SESSION_ID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AuthenticateClientToSession)(windows_core::Interface::as_raw(self), core::mem::transmute(sessionid)).ok() } + unsafe { (windows_core::Interface::vtable(self).AuthenticateClientToSession)(windows_core::Interface::as_raw(self), sessionid as _).ok() } } pub unsafe fn NotifySessionId(&self, sessionid: *const WTS_SESSION_ID, sessionhandle: super::super::Foundation::HANDLE_PTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).NotifySessionId)(windows_core::Interface::as_raw(self), sessionid, 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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetInputHandles)(windows_core::Interface::as_raw(self), pkeyboardhandle as _, pmousehandle as _, pbeephandle as _).ok() } } pub unsafe fn GetVideoHandle(&self) -> windows_core::Result { unsafe { @@ -6232,14 +6232,14 @@ impl IWRdsProtocolConnection { unsafe { (windows_core::Interface::vtable(self).IsUserAllowedToLogon)(windows_core::Interface::as_raw(self), sessionid, usertoken, pdomainname.param().abi(), pusername.param().abi()).ok() } } pub unsafe fn SessionArbitrationEnumeration(&self, husertoken: super::super::Foundation::HANDLE_PTR, bsinglesessionperuserenabled: bool, psessionidarray: *mut u32, pdwsessionidentifiercount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SessionArbitrationEnumeration)(windows_core::Interface::as_raw(self), husertoken, bsinglesessionperuserenabled.into(), core::mem::transmute(psessionidarray), core::mem::transmute(pdwsessionidentifiercount)).ok() } + unsafe { (windows_core::Interface::vtable(self).SessionArbitrationEnumeration)(windows_core::Interface::as_raw(self), husertoken, bsinglesessionperuserenabled.into(), psessionidarray as _, pdwsessionidentifiercount as _).ok() } } 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 P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).LogonNotify)(windows_core::Interface::as_raw(self), hclienttoken, wszusername.param().abi(), wszdomainname.param().abi(), sessionid, core::mem::transmute(pwrdsconnectionsettings)).ok() } + unsafe { (windows_core::Interface::vtable(self).LogonNotify)(windows_core::Interface::as_raw(self), hclienttoken, wszusername.param().abi(), wszdomainname.param().abi(), sessionid, pwrdsconnectionsettings as _).ok() } } pub unsafe fn PreDisconnect(&self, disconnectreason: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).PreDisconnect)(windows_core::Interface::as_raw(self), disconnectreason).ok() } @@ -6251,7 +6251,7 @@ impl IWRdsProtocolConnection { unsafe { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetProtocolStatus(&self, pprotocolstatus: *mut WTS_PROTOCOL_STATUS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProtocolStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pprotocolstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProtocolStatus)(windows_core::Interface::as_raw(self), pprotocolstatus as _).ok() } } pub unsafe fn GetLastInputTime(&self) -> windows_core::Result { unsafe { @@ -6650,7 +6650,7 @@ impl IWRdsProtocolConnectionSettings { unsafe { (windows_core::Interface::vtable(self).SetConnectionSetting)(windows_core::Interface::as_raw(self), core::mem::transmute(propertyid), ppropertyentriesin).ok() } } pub unsafe fn GetConnectionSetting(&self, propertyid: windows_core::GUID, ppropertyentriesout: *mut WTS_PROPERTY_VALUE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetConnectionSetting)(windows_core::Interface::as_raw(self), core::mem::transmute(propertyid), core::mem::transmute(ppropertyentriesout)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConnectionSetting)(windows_core::Interface::as_raw(self), core::mem::transmute(propertyid), ppropertyentriesout as _).ok() } } } #[repr(C)] @@ -6692,13 +6692,13 @@ windows_core::imp::define_interface!(IWRdsProtocolLicenseConnection, IWRdsProtoc windows_core::imp::interface_hierarchy!(IWRdsProtocolLicenseConnection, windows_core::IUnknown); impl IWRdsProtocolLicenseConnection { pub unsafe fn RequestLicensingCapabilities(&self, pplicensecapabilities: *mut WTS_LICENSE_CAPABILITIES, pcblicensecapabilities: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RequestLicensingCapabilities)(windows_core::Interface::as_raw(self), core::mem::transmute(pplicensecapabilities), core::mem::transmute(pcblicensecapabilities)).ok() } + unsafe { (windows_core::Interface::vtable(self).RequestLicensingCapabilities)(windows_core::Interface::as_raw(self), pplicensecapabilities as _, pcblicensecapabilities as _).ok() } } pub unsafe fn SendClientLicense(&self, pclientlicense: &[u8]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SendClientLicense)(windows_core::Interface::as_raw(self), core::mem::transmute(pclientlicense.as_ptr()), pclientlicense.len().try_into().unwrap()).ok() } } pub unsafe fn RequestClientLicense(&self, reserve1: &[u8], ppclientlicense: *mut u8, pcbclientlicense: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RequestClientLicense)(windows_core::Interface::as_raw(self), core::mem::transmute(reserve1.as_ptr()), reserve1.len().try_into().unwrap(), core::mem::transmute(ppclientlicense), core::mem::transmute(pcbclientlicense)).ok() } + unsafe { (windows_core::Interface::vtable(self).RequestClientLicense)(windows_core::Interface::as_raw(self), core::mem::transmute(reserve1.as_ptr()), reserve1.len().try_into().unwrap(), ppclientlicense as _, pcbclientlicense as _).ok() } } pub unsafe fn ProtocolComplete(&self, ulcomplete: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ProtocolComplete)(windows_core::Interface::as_raw(self), ulcomplete).ok() } @@ -7111,10 +7111,10 @@ windows_core::imp::define_interface!(IWRdsProtocolSettings, IWRdsProtocolSetting windows_core::imp::interface_hierarchy!(IWRdsProtocolSettings, windows_core::IUnknown); impl IWRdsProtocolSettings { pub unsafe fn GetSettings(&self, wrdssettingtype: WRDS_SETTING_TYPE, wrdssettinglevel: WRDS_SETTING_LEVEL, pwrdssettings: *mut WRDS_SETTINGS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSettings)(windows_core::Interface::as_raw(self), wrdssettingtype, wrdssettinglevel, core::mem::transmute(pwrdssettings)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSettings)(windows_core::Interface::as_raw(self), wrdssettingtype, wrdssettinglevel, pwrdssettings as _).ok() } } pub unsafe fn MergeSettings(&self, pwrdssettings: *const WRDS_SETTINGS, wrdsconnectionsettinglevel: WRDS_CONNECTION_SETTING_LEVEL, pwrdsconnectionsettings: *mut WRDS_CONNECTION_SETTINGS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).MergeSettings)(windows_core::Interface::as_raw(self), pwrdssettings, wrdsconnectionsettinglevel, core::mem::transmute(pwrdsconnectionsettings)).ok() } + unsafe { (windows_core::Interface::vtable(self).MergeSettings)(windows_core::Interface::as_raw(self), pwrdssettings, wrdsconnectionsettinglevel, pwrdsconnectionsettings as _).ok() } } } #[repr(C)] @@ -7585,7 +7585,7 @@ impl IWTSListenerCallback { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).OnNewChannelConnection)(windows_core::Interface::as_raw(self), pchannel.param().abi(), core::mem::transmute_copy(data), core::mem::transmute(pbaccept), core::mem::transmute(ppcallback)).ok() } + unsafe { (windows_core::Interface::vtable(self).OnNewChannelConnection)(windows_core::Interface::as_raw(self), pchannel.param().abi(), core::mem::transmute_copy(data), pbaccept as _, core::mem::transmute(ppcallback)).ok() } } } #[repr(C)] @@ -7738,10 +7738,10 @@ impl IWTSProtocolConnection { unsafe { (windows_core::Interface::vtable(self).AcceptConnection)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetClientData(&self, pclientdata: *mut WTS_CLIENT_DATA) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClientData)(windows_core::Interface::as_raw(self), core::mem::transmute(pclientdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClientData)(windows_core::Interface::as_raw(self), pclientdata as _).ok() } } pub unsafe fn GetUserCredentials(&self, pusercreds: *mut WTS_USER_CREDENTIAL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetUserCredentials)(windows_core::Interface::as_raw(self), core::mem::transmute(pusercreds)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUserCredentials)(windows_core::Interface::as_raw(self), pusercreds as _).ok() } } pub unsafe fn GetLicenseConnection(&self) -> windows_core::Result { unsafe { @@ -7750,13 +7750,13 @@ impl IWTSProtocolConnection { } } pub unsafe fn AuthenticateClientToSession(&self, sessionid: *mut WTS_SESSION_ID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AuthenticateClientToSession)(windows_core::Interface::as_raw(self), core::mem::transmute(sessionid)).ok() } + unsafe { (windows_core::Interface::vtable(self).AuthenticateClientToSession)(windows_core::Interface::as_raw(self), sessionid as _).ok() } } pub unsafe fn NotifySessionId(&self, sessionid: *const WTS_SESSION_ID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).NotifySessionId)(windows_core::Interface::as_raw(self), sessionid).ok() } } pub unsafe fn GetProtocolHandles(&self, pkeyboardhandle: *mut super::super::Foundation::HANDLE_PTR, pmousehandle: *mut super::super::Foundation::HANDLE_PTR, pbeephandle: *mut super::super::Foundation::HANDLE_PTR, pvideohandle: *mut super::super::Foundation::HANDLE_PTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProtocolHandles)(windows_core::Interface::as_raw(self), core::mem::transmute(pkeyboardhandle), core::mem::transmute(pmousehandle), core::mem::transmute(pbeephandle), core::mem::transmute(pvideohandle)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProtocolHandles)(windows_core::Interface::as_raw(self), pkeyboardhandle as _, pmousehandle as _, pbeephandle as _, pvideohandle as _).ok() } } pub unsafe fn ConnectNotify(&self, sessionid: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ConnectNotify)(windows_core::Interface::as_raw(self), sessionid).ok() } @@ -7769,7 +7769,7 @@ impl IWTSProtocolConnection { unsafe { (windows_core::Interface::vtable(self).IsUserAllowedToLogon)(windows_core::Interface::as_raw(self), sessionid, usertoken, pdomainname.param().abi(), pusername.param().abi()).ok() } } pub unsafe fn SessionArbitrationEnumeration(&self, husertoken: super::super::Foundation::HANDLE_PTR, bsinglesessionperuserenabled: bool, psessionidarray: *mut u32, pdwsessionidentifiercount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SessionArbitrationEnumeration)(windows_core::Interface::as_raw(self), husertoken, bsinglesessionperuserenabled.into(), core::mem::transmute(psessionidarray), core::mem::transmute(pdwsessionidentifiercount)).ok() } + unsafe { (windows_core::Interface::vtable(self).SessionArbitrationEnumeration)(windows_core::Interface::as_raw(self), husertoken, bsinglesessionperuserenabled.into(), psessionidarray as _, pdwsessionidentifiercount as _).ok() } } pub unsafe fn LogonNotify(&self, hclienttoken: super::super::Foundation::HANDLE_PTR, wszusername: P1, wszdomainname: P2, sessionid: *const WTS_SESSION_ID) -> windows_core::Result<()> where @@ -7779,7 +7779,7 @@ impl IWTSProtocolConnection { unsafe { (windows_core::Interface::vtable(self).LogonNotify)(windows_core::Interface::as_raw(self), hclienttoken, wszusername.param().abi(), wszdomainname.param().abi(), sessionid).ok() } } pub unsafe fn GetUserData(&self, ppolicydata: *const WTS_POLICY_DATA, pclientdata: *mut WTS_USER_DATA) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetUserData)(windows_core::Interface::as_raw(self), ppolicydata, core::mem::transmute(pclientdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUserData)(windows_core::Interface::as_raw(self), ppolicydata, pclientdata as _).ok() } } pub unsafe fn DisconnectNotify(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DisconnectNotify)(windows_core::Interface::as_raw(self)).ok() } @@ -7788,7 +7788,7 @@ impl IWTSProtocolConnection { unsafe { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetProtocolStatus(&self, pprotocolstatus: *mut WTS_PROTOCOL_STATUS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProtocolStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pprotocolstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProtocolStatus)(windows_core::Interface::as_raw(self), pprotocolstatus as _).ok() } } pub unsafe fn GetLastInputTime(&self) -> windows_core::Result { unsafe { @@ -8160,13 +8160,13 @@ windows_core::imp::define_interface!(IWTSProtocolLicenseConnection, IWTSProtocol windows_core::imp::interface_hierarchy!(IWTSProtocolLicenseConnection, windows_core::IUnknown); impl IWTSProtocolLicenseConnection { pub unsafe fn RequestLicensingCapabilities(&self, pplicensecapabilities: *mut WTS_LICENSE_CAPABILITIES, pcblicensecapabilities: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RequestLicensingCapabilities)(windows_core::Interface::as_raw(self), core::mem::transmute(pplicensecapabilities), core::mem::transmute(pcblicensecapabilities)).ok() } + unsafe { (windows_core::Interface::vtable(self).RequestLicensingCapabilities)(windows_core::Interface::as_raw(self), pplicensecapabilities as _, pcblicensecapabilities as _).ok() } } pub unsafe fn SendClientLicense(&self, pclientlicense: &[u8]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SendClientLicense)(windows_core::Interface::as_raw(self), core::mem::transmute(pclientlicense.as_ptr()), pclientlicense.len().try_into().unwrap()).ok() } } pub unsafe fn RequestClientLicense(&self, reserve1: &[u8], ppclientlicense: *mut u8, pcbclientlicense: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RequestClientLicense)(windows_core::Interface::as_raw(self), core::mem::transmute(reserve1.as_ptr()), reserve1.len().try_into().unwrap(), core::mem::transmute(ppclientlicense), core::mem::transmute(pcbclientlicense)).ok() } + unsafe { (windows_core::Interface::vtable(self).RequestClientLicense)(windows_core::Interface::as_raw(self), core::mem::transmute(reserve1.as_ptr()), reserve1.len().try_into().unwrap(), ppclientlicense as _, pcbclientlicense as _).ok() } } pub unsafe fn ProtocolComplete(&self, ulcomplete: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ProtocolComplete)(windows_core::Interface::as_raw(self), ulcomplete).ok() } @@ -8650,7 +8650,7 @@ impl IWTSSBPlugin { P2: windows_core::Param, P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).WTSSBX_GetMostSuitableServer)(windows_core::Interface::as_raw(self), username.param().abi(), domainname.param().abi(), applicationtype.param().abi(), farmname.param().abi(), core::mem::transmute(pmachineid)).ok() } + unsafe { (windows_core::Interface::vtable(self).WTSSBX_GetMostSuitableServer)(windows_core::Interface::as_raw(self), username.param().abi(), domainname.param().abi(), applicationtype.param().abi(), farmname.param().abi(), pmachineid as _).ok() } } pub unsafe fn Terminated(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Terminated)(windows_core::Interface::as_raw(self)).ok() } @@ -8661,7 +8661,7 @@ impl IWTSSBPlugin { P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).WTSSBX_GetUserExternalSession)(windows_core::Interface::as_raw(self), username.param().abi(), domainname.param().abi(), applicationtype.param().abi(), redirectorinternalip, core::mem::transmute(psessionid), core::mem::transmute(pmachineconnectinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).WTSSBX_GetUserExternalSession)(windows_core::Interface::as_raw(self), username.param().abi(), domainname.param().abi(), applicationtype.param().abi(), redirectorinternalip, psessionid as _, pmachineconnectinfo as _).ok() } } } #[repr(C)] @@ -9210,7 +9210,7 @@ impl IWorkspaceRegistration2 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).AddResourceEx)(windows_core::Interface::as_raw(self), punk.param().abi(), core::mem::transmute_copy(bstreventloguploadaddress), core::mem::transmute(pdwcookie), core::mem::transmute(correlationid)).ok() } + unsafe { (windows_core::Interface::vtable(self).AddResourceEx)(windows_core::Interface::as_raw(self), punk.param().abi(), core::mem::transmute_copy(bstreventloguploadaddress), pdwcookie as _, core::mem::transmute(correlationid)).ok() } } pub unsafe fn RemoveResourceEx(&self, dwcookieconnection: u32, correlationid: windows_core::GUID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RemoveResourceEx)(windows_core::Interface::as_raw(self), dwcookieconnection, core::mem::transmute(correlationid)).ok() } @@ -9681,13 +9681,13 @@ impl ItsPubPlugin { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetResourceList)(windows_core::Interface::as_raw(self), userid.param().abi(), core::mem::transmute(pceapplistsize), core::mem::transmute(resourcelist)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetResourceList)(windows_core::Interface::as_raw(self), userid.param().abi(), pceapplistsize as _, resourcelist as _).ok() } } pub unsafe fn GetResource(&self, alias: P0, flags: i32, resource: *mut pluginResource) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetResource)(windows_core::Interface::as_raw(self), alias.param().abi(), flags, core::mem::transmute(resource)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetResource)(windows_core::Interface::as_raw(self), alias.param().abi(), flags, resource as _).ok() } } pub unsafe fn GetCacheLastUpdateTime(&self) -> windows_core::Result { unsafe { @@ -9712,7 +9712,7 @@ impl ItsPubPlugin { P3: windows_core::Param, P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ResolveResource)(windows_core::Interface::as_raw(self), core::mem::transmute(resourcetype), core::mem::transmute(resourcelocation.as_ptr()), core::mem::transmute(endpointname.as_ptr()), userid.param().abi(), alias.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).ResolveResource)(windows_core::Interface::as_raw(self), resourcetype as _, core::mem::transmute(resourcelocation.as_ptr()), core::mem::transmute(endpointname.as_ptr()), userid.param().abi(), alias.param().abi()).ok() } } } #[repr(C)] @@ -9817,20 +9817,20 @@ impl ItsPubPlugin2 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetResource2List)(windows_core::Interface::as_raw(self), userid.param().abi(), core::mem::transmute(pceapplistsize), core::mem::transmute(resourcelist)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetResource2List)(windows_core::Interface::as_raw(self), userid.param().abi(), pceapplistsize as _, resourcelist as _).ok() } } pub unsafe fn GetResource2(&self, alias: P0, flags: i32, resource: *mut pluginResource2) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetResource2)(windows_core::Interface::as_raw(self), alias.param().abi(), flags, core::mem::transmute(resource)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetResource2)(windows_core::Interface::as_raw(self), alias.param().abi(), flags, resource as _).ok() } } pub unsafe fn ResolvePersonalDesktop(&self, userid: P0, poolid: P1, epdresolutiontype: TSPUB_PLUGIN_PD_RESOLUTION_TYPE, ppdassignmenttype: *mut TSPUB_PLUGIN_PD_ASSIGNMENT_TYPE, endpointname: &mut [u16; 256]) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ResolvePersonalDesktop)(windows_core::Interface::as_raw(self), userid.param().abi(), poolid.param().abi(), epdresolutiontype, core::mem::transmute(ppdassignmenttype), core::mem::transmute(endpointname.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).ResolvePersonalDesktop)(windows_core::Interface::as_raw(self), userid.param().abi(), poolid.param().abi(), epdresolutiontype, ppdassignmenttype as _, core::mem::transmute(endpointname.as_ptr())).ok() } } pub unsafe fn DeletePersonalDesktopAssignment(&self, userid: P0, poolid: P1, endpointname: P2) -> windows_core::Result<()> where 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 64ab1a9fda..fcecad3bbd 100644 --- a/crates/libs/windows/src/Windows/Win32/System/RemoteManagement/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/RemoteManagement/mod.rs @@ -1,22 +1,22 @@ #[inline] 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)); - unsafe { WSManCloseCommand(core::mem::transmute(commandhandle.unwrap_or(core::mem::zeroed())), flags, r#async) } + unsafe { WSManCloseCommand(commandhandle.unwrap_or(core::mem::zeroed()) as _, flags, r#async) } } #[inline] pub unsafe fn WSManCloseOperation(operationhandle: Option, flags: u32) -> u32 { windows_targets::link!("wsmsvc.dll" "system" fn WSManCloseOperation(operationhandle : WSMAN_OPERATION_HANDLE, flags : u32) -> u32); - unsafe { WSManCloseOperation(core::mem::transmute(operationhandle.unwrap_or(core::mem::zeroed())), flags) } + unsafe { WSManCloseOperation(operationhandle.unwrap_or(core::mem::zeroed()) as _, flags) } } #[inline] pub unsafe fn WSManCloseSession(session: Option, flags: u32) -> u32 { windows_targets::link!("wsmsvc.dll" "system" fn WSManCloseSession(session : WSMAN_SESSION_HANDLE, flags : u32) -> u32); - unsafe { WSManCloseSession(core::mem::transmute(session.unwrap_or(core::mem::zeroed())), flags) } + unsafe { WSManCloseSession(session.unwrap_or(core::mem::zeroed()) as _, flags) } } #[inline] 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)); - unsafe { WSManCloseShell(core::mem::transmute(shellhandle.unwrap_or(core::mem::zeroed())), flags, r#async) } + unsafe { WSManCloseShell(shellhandle.unwrap_or(core::mem::zeroed()) as _, flags, r#async) } } #[inline] 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 @@ -27,7 +27,7 @@ where windows_targets::link!("wsmsvc.dll" "system" fn WSManConnectShell(session : WSMAN_SESSION_HANDLE, flags : u32, resourceuri : windows_core::PCWSTR, shellid : windows_core::PCWSTR, options : *const WSMAN_OPTION_SET, connectxml : *const WSMAN_DATA, r#async : *const WSMAN_SHELL_ASYNC, shell : *mut WSMAN_SHELL_HANDLE)); unsafe { let mut result__ = core::mem::zeroed(); - WSManConnectShell(session, 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())), r#async, &mut result__); + WSManConnectShell(session, flags, resourceuri.param().abi(), shellid.param().abi(), options.unwrap_or(core::mem::zeroed()) as _, connectxml.unwrap_or(core::mem::zeroed()) as _, r#async, &mut result__); result__ } } @@ -39,7 +39,7 @@ where windows_targets::link!("wsmsvc.dll" "system" fn WSManConnectShellCommand(shell : WSMAN_SHELL_HANDLE, flags : u32, commandid : windows_core::PCWSTR, options : *const WSMAN_OPTION_SET, connectxml : *const WSMAN_DATA, r#async : *const WSMAN_SHELL_ASYNC, command : *mut WSMAN_COMMAND_HANDLE)); unsafe { let mut result__ = core::mem::zeroed(); - WSManConnectShellCommand(shell, flags, commandid.param().abi(), core::mem::transmute(options.unwrap_or(core::mem::zeroed())), core::mem::transmute(connectxml.unwrap_or(core::mem::zeroed())), r#async, &mut result__); + WSManConnectShellCommand(shell, flags, commandid.param().abi(), options.unwrap_or(core::mem::zeroed()) as _, connectxml.unwrap_or(core::mem::zeroed()) as _, r#async, &mut result__); result__ } } @@ -49,7 +49,7 @@ where P1: windows_core::Param, { windows_targets::link!("wsmsvc.dll" "system" fn WSManCreateSession(apihandle : WSMAN_API_HANDLE, connection : windows_core::PCWSTR, flags : u32, serverauthenticationcredentials : *const WSMAN_AUTHENTICATION_CREDENTIALS, proxyinfo : *const WSMAN_PROXY_INFO, session : *mut WSMAN_SESSION_HANDLE) -> u32); - unsafe { WSManCreateSession(apihandle, connection.param().abi(), flags, core::mem::transmute(serverauthenticationcredentials.unwrap_or(core::mem::zeroed())), core::mem::transmute(proxyinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(session)) } + unsafe { WSManCreateSession(apihandle, connection.param().abi(), flags, serverauthenticationcredentials.unwrap_or(core::mem::zeroed()) as _, proxyinfo.unwrap_or(core::mem::zeroed()) as _, session as _) } } #[inline] 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 @@ -59,7 +59,7 @@ where windows_targets::link!("wsmsvc.dll" "system" fn WSManCreateShell(session : WSMAN_SESSION_HANDLE, flags : u32, resourceuri : windows_core::PCWSTR, startupinfo : *const WSMAN_SHELL_STARTUP_INFO_V11, options : *const WSMAN_OPTION_SET, createxml : *const WSMAN_DATA, r#async : *const WSMAN_SHELL_ASYNC, shell : *mut WSMAN_SHELL_HANDLE)); unsafe { let mut result__ = core::mem::zeroed(); - WSManCreateShell(session, 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())), r#async, &mut result__); + WSManCreateShell(session, flags, resourceuri.param().abi(), startupinfo.unwrap_or(core::mem::zeroed()) as _, options.unwrap_or(core::mem::zeroed()) as _, createxml.unwrap_or(core::mem::zeroed()) as _, r#async, &mut result__); result__ } } @@ -72,14 +72,14 @@ where windows_targets::link!("wsmsvc.dll" "system" fn WSManCreateShellEx(session : WSMAN_SESSION_HANDLE, flags : u32, resourceuri : windows_core::PCWSTR, shellid : windows_core::PCWSTR, startupinfo : *const WSMAN_SHELL_STARTUP_INFO_V11, options : *const WSMAN_OPTION_SET, createxml : *const WSMAN_DATA, r#async : *const WSMAN_SHELL_ASYNC, shell : *mut WSMAN_SHELL_HANDLE)); unsafe { let mut result__ = core::mem::zeroed(); - WSManCreateShellEx(session, 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())), r#async, &mut result__); + WSManCreateShellEx(session, flags, resourceuri.param().abi(), shellid.param().abi(), startupinfo.unwrap_or(core::mem::zeroed()) as _, options.unwrap_or(core::mem::zeroed()) as _, createxml.unwrap_or(core::mem::zeroed()) as _, r#async, &mut result__); result__ } } #[inline] pub unsafe fn WSManDeinitialize(apihandle: Option, flags: u32) -> u32 { windows_targets::link!("wsmsvc.dll" "system" fn WSManDeinitialize(apihandle : WSMAN_API_HANDLE, flags : u32) -> u32); - unsafe { WSManDeinitialize(core::mem::transmute(apihandle.unwrap_or(core::mem::zeroed())), flags) } + unsafe { WSManDeinitialize(apihandle.unwrap_or(core::mem::zeroed()) as _, flags) } } #[inline] pub unsafe fn WSManDisconnectShell(shell: WSMAN_SHELL_HANDLE, flags: u32, disconnectinfo: *const WSMAN_SHELL_DISCONNECT_INFO, r#async: *const WSMAN_SHELL_ASYNC) { @@ -92,22 +92,22 @@ where 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); - unsafe { WSManGetErrorMessage(apihandle, core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), languagecode.param().abi(), 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)) } + unsafe { WSManGetErrorMessage(apihandle, flags.unwrap_or(core::mem::zeroed()) as _, languagecode.param().abi(), 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())), messagelengthused as _) } } #[inline] 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); - unsafe { WSManGetSessionOptionAsDword(session, option, core::mem::transmute(value)) } + unsafe { WSManGetSessionOptionAsDword(session, option, value as _) } } #[inline] 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); - unsafe { WSManGetSessionOptionAsString(session, 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)) } + unsafe { WSManGetSessionOptionAsString(session, 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())), stringlengthused as _) } } #[inline] pub unsafe fn WSManInitialize(flags: u32, apihandle: *mut WSMAN_API_HANDLE) -> u32 { windows_targets::link!("wsmsvc.dll" "system" fn WSManInitialize(flags : u32, apihandle : *mut WSMAN_API_HANDLE) -> u32); - unsafe { WSManInitialize(flags, core::mem::transmute(apihandle)) } + unsafe { WSManInitialize(flags, apihandle as _) } } #[inline] pub unsafe fn WSManPluginAuthzOperationComplete(senderdetails: *const WSMAN_SENDER_DETAILS, flags: u32, userauthorizationcontext: Option<*const core::ffi::c_void>, errorcode: u32, extendederrorinformation: P4) -> u32 @@ -115,7 +115,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); - unsafe { WSManPluginAuthzOperationComplete(senderdetails, flags, core::mem::transmute(userauthorizationcontext.unwrap_or(core::mem::zeroed())), errorcode, extendederrorinformation.param().abi()) } + unsafe { WSManPluginAuthzOperationComplete(senderdetails, flags, userauthorizationcontext.unwrap_or(core::mem::zeroed()) as _, 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 @@ -123,7 +123,7 @@ 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); - unsafe { WSManPluginAuthzQueryQuotaComplete(senderdetails, flags, core::mem::transmute(quota.unwrap_or(core::mem::zeroed())), errorcode, extendederrorinformation.param().abi()) } + unsafe { WSManPluginAuthzQueryQuotaComplete(senderdetails, flags, quota.unwrap_or(core::mem::zeroed()) as _, errorcode, extendederrorinformation.param().abi()) } } #[inline] pub unsafe fn WSManPluginAuthzUserComplete(senderdetails: *const WSMAN_SENDER_DETAILS, flags: u32, userauthorizationcontext: Option<*const core::ffi::c_void>, impersonationtoken: Option, userisadministrator: bool, errorcode: u32, extendederrorinformation: P6) -> u32 @@ -131,7 +131,7 @@ where 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); - unsafe { WSManPluginAuthzUserComplete(senderdetails, flags, core::mem::transmute(userauthorizationcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(impersonationtoken.unwrap_or(core::mem::zeroed())), userisadministrator.into(), errorcode, extendederrorinformation.param().abi()) } + unsafe { WSManPluginAuthzUserComplete(senderdetails, flags, userauthorizationcontext.unwrap_or(core::mem::zeroed()) as _, impersonationtoken.unwrap_or(core::mem::zeroed()) as _, userisadministrator.into(), errorcode, extendederrorinformation.param().abi()) } } #[inline] pub unsafe fn WSManPluginFreeRequestDetails(requestdetails: *const WSMAN_PLUGIN_REQUEST) -> u32 { @@ -141,12 +141,12 @@ pub unsafe fn WSManPluginFreeRequestDetails(requestdetails: *const WSMAN_PLUGIN_ #[inline] pub unsafe fn WSManPluginGetConfiguration(plugincontext: *const core::ffi::c_void, flags: u32, data: *mut WSMAN_DATA) -> u32 { windows_targets::link!("wsmsvc.dll" "system" fn WSManPluginGetConfiguration(plugincontext : *const core::ffi::c_void, flags : u32, data : *mut WSMAN_DATA) -> u32); - unsafe { WSManPluginGetConfiguration(plugincontext, flags, core::mem::transmute(data)) } + unsafe { WSManPluginGetConfiguration(plugincontext, flags, data as _) } } #[inline] pub unsafe fn WSManPluginGetOperationParameters(requestdetails: *const WSMAN_PLUGIN_REQUEST, flags: u32, data: *mut WSMAN_DATA) -> u32 { windows_targets::link!("wsmsvc.dll" "system" fn WSManPluginGetOperationParameters(requestdetails : *const WSMAN_PLUGIN_REQUEST, flags : u32, data : *mut WSMAN_DATA) -> u32); - unsafe { WSManPluginGetOperationParameters(requestdetails, flags, core::mem::transmute(data)) } + unsafe { WSManPluginGetOperationParameters(requestdetails, flags, data as _) } } #[inline] pub unsafe fn WSManPluginOperationComplete(requestdetails: *const WSMAN_PLUGIN_REQUEST, flags: u32, errorcode: u32, extendedinformation: P3) -> u32 @@ -163,7 +163,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); - unsafe { WSManPluginReceiveResult(requestdetails, flags, stream.param().abi(), core::mem::transmute(streamresult.unwrap_or(core::mem::zeroed())), commandstate.param().abi(), exitcode) } + unsafe { WSManPluginReceiveResult(requestdetails, flags, stream.param().abi(), streamresult.unwrap_or(core::mem::zeroed()) as _, commandstate.param().abi(), exitcode) } } #[inline] pub unsafe fn WSManPluginReportCompletion(plugincontext: *const core::ffi::c_void, flags: u32) -> u32 { @@ -180,7 +180,7 @@ pub unsafe fn WSManReceiveShellOutput(shell: WSMAN_SHELL_HANDLE, command: Option 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)); unsafe { let mut result__ = core::mem::zeroed(); - WSManReceiveShellOutput(shell, core::mem::transmute(command.unwrap_or(core::mem::zeroed())), flags, core::mem::transmute(desiredstreamset.unwrap_or(core::mem::zeroed())), r#async, &mut result__); + WSManReceiveShellOutput(shell, command.unwrap_or(core::mem::zeroed()) as _, flags, desiredstreamset.unwrap_or(core::mem::zeroed()) as _, r#async, &mut result__); result__ } } @@ -202,7 +202,7 @@ where windows_targets::link!("wsmsvc.dll" "system" fn WSManRunShellCommand(shell : WSMAN_SHELL_HANDLE, flags : u32, commandline : windows_core::PCWSTR, args : *const WSMAN_COMMAND_ARG_SET, options : *const WSMAN_OPTION_SET, r#async : *const WSMAN_SHELL_ASYNC, command : *mut WSMAN_COMMAND_HANDLE)); unsafe { let mut result__ = core::mem::zeroed(); - WSManRunShellCommand(shell, flags, commandline.param().abi(), core::mem::transmute(args.unwrap_or(core::mem::zeroed())), core::mem::transmute(options.unwrap_or(core::mem::zeroed())), r#async, &mut result__); + WSManRunShellCommand(shell, flags, commandline.param().abi(), args.unwrap_or(core::mem::zeroed()) as _, options.unwrap_or(core::mem::zeroed()) as _, r#async, &mut result__); result__ } } @@ -215,7 +215,7 @@ where windows_targets::link!("wsmsvc.dll" "system" fn WSManRunShellCommandEx(shell : WSMAN_SHELL_HANDLE, flags : u32, commandid : windows_core::PCWSTR, commandline : windows_core::PCWSTR, args : *const WSMAN_COMMAND_ARG_SET, options : *const WSMAN_OPTION_SET, r#async : *const WSMAN_SHELL_ASYNC, command : *mut WSMAN_COMMAND_HANDLE)); unsafe { let mut result__ = core::mem::zeroed(); - WSManRunShellCommandEx(shell, 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())), r#async, &mut result__); + WSManRunShellCommandEx(shell, flags, commandid.param().abi(), commandline.param().abi(), args.unwrap_or(core::mem::zeroed()) as _, options.unwrap_or(core::mem::zeroed()) as _, r#async, &mut result__); result__ } } @@ -227,7 +227,7 @@ where 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)); unsafe { let mut result__ = core::mem::zeroed(); - WSManSendShellInput(shell, core::mem::transmute(command.unwrap_or(core::mem::zeroed())), flags, streamid.param().abi(), streamdata, endofstream.into(), r#async, &mut result__); + WSManSendShellInput(shell, command.unwrap_or(core::mem::zeroed()) as _, flags, streamid.param().abi(), streamdata, endofstream.into(), r#async, &mut result__); result__ } } @@ -244,7 +244,7 @@ where 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)); unsafe { let mut result__ = core::mem::zeroed(); - WSManSignalShell(shell, core::mem::transmute(command.unwrap_or(core::mem::zeroed())), flags, code.param().abi(), r#async, &mut result__); + WSManSignalShell(shell, command.unwrap_or(core::mem::zeroed()) as _, flags, code.param().abi(), r#async, &mut result__); result__ } } 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 ac50a571c8..268f9f10b5 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); - unsafe { RmAddFilter(dwsessionhandle, strmodulename.param().abi(), core::mem::transmute(pprocess.unwrap_or(core::mem::zeroed())), strserviceshortname.param().abi(), filteraction) } + unsafe { RmAddFilter(dwsessionhandle, strmodulename.param().abi(), pprocess.unwrap_or(core::mem::zeroed()) as _, strserviceshortname.param().abi(), filteraction) } } #[inline] pub unsafe fn RmCancelCurrentTask(dwsessionhandle: u32) -> super::super::Foundation::WIN32_ERROR { @@ -20,12 +20,12 @@ pub unsafe fn RmEndSession(dwsessionhandle: u32) -> super::super::Foundation::WI #[inline] pub unsafe fn RmGetFilterList(dwsessionhandle: u32, pbfilterbuf: Option<&mut [u8]>, cbfilterbufneeded: *mut u32) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("rstrtmgr.dll" "system" fn RmGetFilterList(dwsessionhandle : u32, pbfilterbuf : *mut u8, cbfilterbuf : u32, cbfilterbufneeded : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { RmGetFilterList(dwsessionhandle, core::mem::transmute(pbfilterbuf.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbfilterbuf.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(cbfilterbufneeded)) } + unsafe { RmGetFilterList(dwsessionhandle, core::mem::transmute(pbfilterbuf.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbfilterbuf.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), cbfilterbufneeded as _) } } #[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); - unsafe { RmGetList(dwsessionhandle, core::mem::transmute(pnprocinfoneeded), core::mem::transmute(pnprocinfo), core::mem::transmute(rgaffectedapps.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwrebootreasons)) } + unsafe { RmGetList(dwsessionhandle, pnprocinfoneeded as _, pnprocinfo as _, rgaffectedapps.unwrap_or(core::mem::zeroed()) as _, lpdwrebootreasons as _) } } #[inline] pub unsafe fn RmJoinSession(psessionhandle: *mut u32, strsessionkey: P1) -> super::super::Foundation::WIN32_ERROR @@ -33,7 +33,7 @@ where P1: windows_core::Param, { windows_targets::link!("rstrtmgr.dll" "system" fn RmJoinSession(psessionhandle : *mut u32, strsessionkey : windows_core::PCWSTR) -> super::super::Foundation:: WIN32_ERROR); - unsafe { RmJoinSession(core::mem::transmute(psessionhandle), strsessionkey.param().abi()) } + unsafe { RmJoinSession(psessionhandle as _, strsessionkey.param().abi()) } } #[inline] pub unsafe fn RmRegisterResources(dwsessionhandle: u32, rgsfilenames: Option<&[windows_core::PCWSTR]>, rgapplications: Option<&[RM_UNIQUE_PROCESS]>, rgsservicenames: Option<&[windows_core::PCWSTR]>) -> super::super::Foundation::WIN32_ERROR { @@ -57,22 +57,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); - unsafe { RmRemoveFilter(dwsessionhandle, strmodulename.param().abi(), core::mem::transmute(pprocess.unwrap_or(core::mem::zeroed())), strserviceshortname.param().abi()) } + unsafe { RmRemoveFilter(dwsessionhandle, strmodulename.param().abi(), pprocess.unwrap_or(core::mem::zeroed()) as _, strserviceshortname.param().abi()) } } #[inline] 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); - unsafe { RmRestart(dwsessionhandle, core::mem::transmute(dwrestartflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(fnstatus.unwrap_or(core::mem::zeroed()))) } + unsafe { RmRestart(dwsessionhandle, dwrestartflags.unwrap_or(core::mem::zeroed()) as _, fnstatus.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { RmShutdown(dwsessionhandle, lactionflags, core::mem::transmute(fnstatus.unwrap_or(core::mem::zeroed()))) } + unsafe { RmShutdown(dwsessionhandle, lactionflags, fnstatus.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { RmStartSession(core::mem::transmute(psessionhandle), core::mem::transmute(dwsessionflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(strsessionkey)) } + unsafe { RmStartSession(psessionhandle as _, dwsessionflags.unwrap_or(core::mem::zeroed()) as _, 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/Restore/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Restore/mod.rs index 615d1b7600..d70b0876f2 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Restore/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Restore/mod.rs @@ -6,12 +6,12 @@ pub unsafe fn SRRemoveRestorePoint(dwrpnum: u32) -> u32 { #[inline] pub unsafe fn SRSetRestorePointA(prestoreptspec: *const RESTOREPOINTINFOA, psmgrstatus: *mut STATEMGRSTATUS) -> super::super::Foundation::BOOL { windows_targets::link!("sfc.dll" "system" fn SRSetRestorePointA(prestoreptspec : *const RESTOREPOINTINFOA, psmgrstatus : *mut STATEMGRSTATUS) -> super::super::Foundation:: BOOL); - unsafe { SRSetRestorePointA(prestoreptspec, core::mem::transmute(psmgrstatus)) } + unsafe { SRSetRestorePointA(prestoreptspec, psmgrstatus as _) } } #[inline] pub unsafe fn SRSetRestorePointW(prestoreptspec: *const RESTOREPOINTINFOW, psmgrstatus: *mut STATEMGRSTATUS) -> super::super::Foundation::BOOL { windows_targets::link!("sfc.dll" "system" fn SRSetRestorePointW(prestoreptspec : *const RESTOREPOINTINFOW, psmgrstatus : *mut STATEMGRSTATUS) -> super::super::Foundation:: BOOL); - unsafe { SRSetRestorePointW(prestoreptspec, core::mem::transmute(psmgrstatus)) } + unsafe { SRSetRestorePointW(prestoreptspec, psmgrstatus as _) } } pub const ACCESSIBILITY_SETTING: u32 = 3u32; pub const APPLICATION_INSTALL: RESTOREPOINTINFO_TYPE = RESTOREPOINTINFO_TYPE(0u32); 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 e30493c62f..590d5ff271 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Rpc/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Rpc/mod.rs @@ -22,7 +22,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn IUnknown_QueryInterface_Proxy(this : * mut core::ffi::c_void, riid : *const windows_core::GUID, ppvobject : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { IUnknown_QueryInterface_Proxy(this.param().abi(), riid, core::mem::transmute(ppvobject)).ok() } + unsafe { IUnknown_QueryInterface_Proxy(this.param().abi(), riid, ppvobject as _).ok() } } #[inline] pub unsafe fn IUnknown_Release_Proxy(this: P0) -> u32 @@ -52,7 +52,7 @@ pub unsafe fn I_RpcAsyncSetHandle(message: *const RPC_MESSAGE, pasync: *const RP #[inline] pub unsafe fn I_RpcBindingCopy(sourcebinding: *mut core::ffi::c_void, destinationbinding: *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcBindingCopy(sourcebinding : *mut core::ffi::c_void, destinationbinding : *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { I_RpcBindingCopy(core::mem::transmute(sourcebinding), core::mem::transmute(destinationbinding)) } + unsafe { I_RpcBindingCopy(sourcebinding as _, destinationbinding as _) } } #[inline] pub unsafe fn I_RpcBindingCreateNP(servername: P0, servicename: P1, networkoptions: P2, binding: *mut *mut core::ffi::c_void) -> RPC_STATUS @@ -62,67 +62,67 @@ where P2: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcBindingCreateNP(servername : windows_core::PCWSTR, servicename : windows_core::PCWSTR, networkoptions : windows_core::PCWSTR, binding : *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { I_RpcBindingCreateNP(servername.param().abi(), servicename.param().abi(), networkoptions.param().abi(), core::mem::transmute(binding)) } + unsafe { I_RpcBindingCreateNP(servername.param().abi(), servicename.param().abi(), networkoptions.param().abi(), binding as _) } } #[inline] pub unsafe fn I_RpcBindingHandleToAsyncHandle(binding: *mut core::ffi::c_void, asynchandle: *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcBindingHandleToAsyncHandle(binding : *mut core::ffi::c_void, asynchandle : *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { I_RpcBindingHandleToAsyncHandle(core::mem::transmute(binding), core::mem::transmute(asynchandle)) } + unsafe { I_RpcBindingHandleToAsyncHandle(binding as _, asynchandle as _) } } #[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); - unsafe { I_RpcBindingInqClientTokenAttributes(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()))) } + unsafe { I_RpcBindingInqClientTokenAttributes(binding, tokenid.unwrap_or(core::mem::zeroed()) as _, authenticationid.unwrap_or(core::mem::zeroed()) as _, modifiedid.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn I_RpcBindingInqDynamicEndpointA(binding: *const core::ffi::c_void, dynamicendpoint: *mut windows_core::PSTR) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcBindingInqDynamicEndpointA(binding : *const core::ffi::c_void, dynamicendpoint : *mut windows_core::PSTR) -> RPC_STATUS); - unsafe { I_RpcBindingInqDynamicEndpointA(binding, core::mem::transmute(dynamicendpoint)) } + unsafe { I_RpcBindingInqDynamicEndpointA(binding, dynamicendpoint as _) } } #[inline] pub unsafe fn I_RpcBindingInqDynamicEndpointW(binding: *const core::ffi::c_void, dynamicendpoint: *mut windows_core::PWSTR) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcBindingInqDynamicEndpointW(binding : *const core::ffi::c_void, dynamicendpoint : *mut windows_core::PWSTR) -> RPC_STATUS); - unsafe { I_RpcBindingInqDynamicEndpointW(binding, core::mem::transmute(dynamicendpoint)) } + unsafe { I_RpcBindingInqDynamicEndpointW(binding, dynamicendpoint as _) } } #[inline] pub unsafe fn I_RpcBindingInqLocalClientPID(binding: *mut core::ffi::c_void, pid: *mut u32) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcBindingInqLocalClientPID(binding : *mut core::ffi::c_void, pid : *mut u32) -> RPC_STATUS); - unsafe { I_RpcBindingInqLocalClientPID(core::mem::transmute(binding), core::mem::transmute(pid)) } + unsafe { I_RpcBindingInqLocalClientPID(binding as _, pid as _) } } #[inline] pub unsafe fn I_RpcBindingInqMarshalledTargetInfo(binding: *const core::ffi::c_void, marshalledtargetinfosize: *mut u32, marshalledtargetinfo: *mut windows_core::PSTR) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcBindingInqMarshalledTargetInfo(binding : *const core::ffi::c_void, marshalledtargetinfosize : *mut u32, marshalledtargetinfo : *mut windows_core::PSTR) -> RPC_STATUS); - unsafe { I_RpcBindingInqMarshalledTargetInfo(binding, core::mem::transmute(marshalledtargetinfosize), core::mem::transmute(marshalledtargetinfo)) } + unsafe { I_RpcBindingInqMarshalledTargetInfo(binding, marshalledtargetinfosize as _, marshalledtargetinfo as _) } } #[inline] pub unsafe fn I_RpcBindingInqSecurityContext(binding: *mut core::ffi::c_void, securitycontexthandle: *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcBindingInqSecurityContext(binding : *mut core::ffi::c_void, securitycontexthandle : *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { I_RpcBindingInqSecurityContext(core::mem::transmute(binding), core::mem::transmute(securitycontexthandle)) } + unsafe { I_RpcBindingInqSecurityContext(binding as _, securitycontexthandle as _) } } #[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); - unsafe { I_RpcBindingInqSecurityContextKeyInfo(core::mem::transmute(binding.unwrap_or(core::mem::zeroed())), core::mem::transmute(keyinfo)) } + unsafe { I_RpcBindingInqSecurityContextKeyInfo(binding.unwrap_or(core::mem::zeroed()) as _, keyinfo as _) } } #[inline] pub unsafe fn I_RpcBindingInqTransportType(binding: *mut core::ffi::c_void, r#type: *mut u32) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcBindingInqTransportType(binding : *mut core::ffi::c_void, r#type : *mut u32) -> RPC_STATUS); - unsafe { I_RpcBindingInqTransportType(core::mem::transmute(binding), core::mem::transmute(r#type)) } + unsafe { I_RpcBindingInqTransportType(binding as _, r#type as _) } } #[inline] pub unsafe fn I_RpcBindingInqWireIdForSnego(binding: *const core::ffi::c_void, wireid: *mut u8) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcBindingInqWireIdForSnego(binding : *const core::ffi::c_void, wireid : *mut u8) -> RPC_STATUS); - unsafe { I_RpcBindingInqWireIdForSnego(binding, core::mem::transmute(wireid)) } + unsafe { I_RpcBindingInqWireIdForSnego(binding, wireid as _) } } #[inline] pub unsafe fn I_RpcBindingIsClientLocal(bindinghandle: *mut core::ffi::c_void, clientlocalflag: *mut u32) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcBindingIsClientLocal(bindinghandle : *mut core::ffi::c_void, clientlocalflag : *mut u32) -> RPC_STATUS); - unsafe { I_RpcBindingIsClientLocal(core::mem::transmute(bindinghandle), core::mem::transmute(clientlocalflag)) } + unsafe { I_RpcBindingIsClientLocal(bindinghandle as _, clientlocalflag as _) } } #[inline] pub unsafe fn I_RpcBindingIsServerLocal(binding: *const core::ffi::c_void, serverlocalflag: *mut u32) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcBindingIsServerLocal(binding : *const core::ffi::c_void, serverlocalflag : *mut u32) -> RPC_STATUS); - unsafe { I_RpcBindingIsServerLocal(binding, core::mem::transmute(serverlocalflag)) } + unsafe { I_RpcBindingIsServerLocal(binding, serverlocalflag as _) } } #[inline] pub unsafe fn I_RpcBindingSetPrivateOption(hbinding: *const core::ffi::c_void, option: u32, optionvalue: usize) -> RPC_STATUS { @@ -132,17 +132,17 @@ pub unsafe fn I_RpcBindingSetPrivateOption(hbinding: *const core::ffi::c_void, o #[inline] pub unsafe fn I_RpcBindingToStaticStringBindingW(binding: *mut core::ffi::c_void, stringbinding: *mut *mut u16) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcBindingToStaticStringBindingW(binding : *mut core::ffi::c_void, stringbinding : *mut *mut u16) -> RPC_STATUS); - unsafe { I_RpcBindingToStaticStringBindingW(core::mem::transmute(binding), core::mem::transmute(stringbinding)) } + unsafe { I_RpcBindingToStaticStringBindingW(binding as _, stringbinding as _) } } #[inline] pub unsafe fn I_RpcClearMutex(mutex: *mut core::ffi::c_void) { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcClearMutex(mutex : *mut core::ffi::c_void)); - unsafe { I_RpcClearMutex(core::mem::transmute(mutex)) } + unsafe { I_RpcClearMutex(mutex as _) } } #[inline] pub unsafe fn I_RpcDeleteMutex(mutex: *mut core::ffi::c_void) { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcDeleteMutex(mutex : *mut core::ffi::c_void)); - unsafe { I_RpcDeleteMutex(core::mem::transmute(mutex)) } + unsafe { I_RpcDeleteMutex(mutex as _) } } #[inline] pub unsafe fn I_RpcExceptionFilter(exceptioncode: u32) -> i32 { @@ -152,27 +152,27 @@ pub unsafe fn I_RpcExceptionFilter(exceptioncode: u32) -> i32 { #[inline] pub unsafe fn I_RpcFree(object: *mut core::ffi::c_void) { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcFree(object : *mut core::ffi::c_void)); - unsafe { I_RpcFree(core::mem::transmute(object)) } + unsafe { I_RpcFree(object as _) } } #[inline] pub unsafe fn I_RpcFreeBuffer(message: *mut RPC_MESSAGE) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcFreeBuffer(message : *mut RPC_MESSAGE) -> RPC_STATUS); - unsafe { I_RpcFreeBuffer(core::mem::transmute(message)) } + unsafe { I_RpcFreeBuffer(message as _) } } #[inline] pub unsafe fn I_RpcFreePipeBuffer(message: *mut RPC_MESSAGE) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcFreePipeBuffer(message : *mut RPC_MESSAGE) -> RPC_STATUS); - unsafe { I_RpcFreePipeBuffer(core::mem::transmute(message)) } + unsafe { I_RpcFreePipeBuffer(message as _) } } #[inline] pub unsafe fn I_RpcGetBuffer(message: *mut RPC_MESSAGE) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcGetBuffer(message : *mut RPC_MESSAGE) -> RPC_STATUS); - unsafe { I_RpcGetBuffer(core::mem::transmute(message)) } + unsafe { I_RpcGetBuffer(message as _) } } #[inline] pub unsafe fn I_RpcGetBufferWithObject(message: *mut RPC_MESSAGE, objectuuid: *mut windows_core::GUID) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcGetBufferWithObject(message : *mut RPC_MESSAGE, objectuuid : *mut windows_core::GUID) -> RPC_STATUS); - unsafe { I_RpcGetBufferWithObject(core::mem::transmute(message), core::mem::transmute(objectuuid)) } + unsafe { I_RpcGetBufferWithObject(message as _, objectuuid as _) } } #[inline] pub unsafe fn I_RpcGetCurrentCallHandle() -> *mut core::ffi::c_void { @@ -182,7 +182,7 @@ pub unsafe fn I_RpcGetCurrentCallHandle() -> *mut core::ffi::c_void { #[inline] pub unsafe fn I_RpcGetDefaultSD(ppsecuritydescriptor: *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcGetDefaultSD(ppsecuritydescriptor : *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { I_RpcGetDefaultSD(core::mem::transmute(ppsecuritydescriptor)) } + unsafe { I_RpcGetDefaultSD(ppsecuritydescriptor as _) } } #[inline] pub unsafe fn I_RpcGetExtendedError() -> RPC_STATUS { @@ -192,7 +192,7 @@ pub unsafe fn I_RpcGetExtendedError() -> RPC_STATUS { #[inline] pub unsafe fn I_RpcIfInqTransferSyntaxes(rpcifhandle: *mut core::ffi::c_void, transfersyntaxes: *mut RPC_TRANSFER_SYNTAX, transfersyntaxsize: u32, transfersyntaxcount: *mut u32) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcIfInqTransferSyntaxes(rpcifhandle : *mut core::ffi::c_void, transfersyntaxes : *mut RPC_TRANSFER_SYNTAX, transfersyntaxsize : u32, transfersyntaxcount : *mut u32) -> RPC_STATUS); - unsafe { I_RpcIfInqTransferSyntaxes(core::mem::transmute(rpcifhandle), core::mem::transmute(transfersyntaxes), transfersyntaxsize, core::mem::transmute(transfersyntaxcount)) } + unsafe { I_RpcIfInqTransferSyntaxes(rpcifhandle as _, transfersyntaxes as _, transfersyntaxsize, transfersyntaxcount as _) } } #[inline] pub unsafe fn I_RpcMapWin32Status(status: RPC_STATUS) -> i32 { @@ -207,7 +207,7 @@ pub unsafe fn I_RpcMgmtEnableDedicatedThreadPool() -> RPC_STATUS { #[inline] pub unsafe fn I_RpcNegotiateTransferSyntax(message: *mut RPC_MESSAGE) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcNegotiateTransferSyntax(message : *mut RPC_MESSAGE) -> RPC_STATUS); - unsafe { I_RpcNegotiateTransferSyntax(core::mem::transmute(message)) } + unsafe { I_RpcNegotiateTransferSyntax(message as _) } } #[inline] pub unsafe fn I_RpcNsBindingSetEntryNameA(binding: *const core::ffi::c_void, entrynamesyntax: u32, entryname: P2) -> RPC_STATUS @@ -228,7 +228,7 @@ where #[inline] pub unsafe fn I_RpcNsGetBuffer(message: *mut RPC_MESSAGE) -> RPC_STATUS { windows_targets::link!("rpcns4.dll" "system" fn I_RpcNsGetBuffer(message : *mut RPC_MESSAGE) -> RPC_STATUS); - unsafe { I_RpcNsGetBuffer(core::mem::transmute(message)) } + unsafe { I_RpcNsGetBuffer(message as _) } } #[inline] pub unsafe fn I_RpcNsInterfaceExported(entrynamesyntax: u32, entryname: *const u16, rpcinterfaceinformation: *const RPC_SERVER_INTERFACE) -> RPC_STATUS { @@ -238,22 +238,22 @@ pub unsafe fn I_RpcNsInterfaceExported(entrynamesyntax: u32, entryname: *const u #[inline] pub unsafe fn I_RpcNsInterfaceUnexported(entrynamesyntax: u32, entryname: *mut u16, rpcinterfaceinformation: *mut RPC_SERVER_INTERFACE) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcNsInterfaceUnexported(entrynamesyntax : u32, entryname : *mut u16, rpcinterfaceinformation : *mut RPC_SERVER_INTERFACE) -> RPC_STATUS); - unsafe { I_RpcNsInterfaceUnexported(entrynamesyntax, core::mem::transmute(entryname), core::mem::transmute(rpcinterfaceinformation)) } + unsafe { I_RpcNsInterfaceUnexported(entrynamesyntax, entryname as _, rpcinterfaceinformation as _) } } #[inline] pub unsafe fn I_RpcNsRaiseException(message: *mut RPC_MESSAGE, status: RPC_STATUS) { windows_targets::link!("rpcns4.dll" "system" fn I_RpcNsRaiseException(message : *mut RPC_MESSAGE, status : RPC_STATUS)); - unsafe { I_RpcNsRaiseException(core::mem::transmute(message), status) } + unsafe { I_RpcNsRaiseException(message as _, status) } } #[inline] pub unsafe fn I_RpcNsSendReceive(message: *mut RPC_MESSAGE, handle: *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcns4.dll" "system" fn I_RpcNsSendReceive(message : *mut RPC_MESSAGE, handle : *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { I_RpcNsSendReceive(core::mem::transmute(message), core::mem::transmute(handle)) } + unsafe { I_RpcNsSendReceive(message as _, handle as _) } } #[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); - unsafe { I_RpcOpenClientProcess(core::mem::transmute(binding.unwrap_or(core::mem::zeroed())), desiredaccess, core::mem::transmute(clientprocess)) } + unsafe { I_RpcOpenClientProcess(binding.unwrap_or(core::mem::zeroed()) as _, desiredaccess, clientprocess as _) } } #[inline] pub unsafe fn I_RpcPauseExecution(milliseconds: u32) { @@ -263,7 +263,7 @@ pub unsafe fn I_RpcPauseExecution(milliseconds: u32) { #[inline] pub unsafe fn I_RpcReBindBuffer(message: *mut RPC_MESSAGE) -> RPC_STATUS { windows_targets::link!("rpcns4.dll" "system" fn I_RpcReBindBuffer(message : *mut RPC_MESSAGE) -> RPC_STATUS); - unsafe { I_RpcReBindBuffer(core::mem::transmute(message)) } + unsafe { I_RpcReBindBuffer(message as _) } } #[inline] pub unsafe fn I_RpcReallocPipeBuffer(message: *const RPC_MESSAGE, newsize: u32) -> RPC_STATUS { @@ -273,32 +273,32 @@ pub unsafe fn I_RpcReallocPipeBuffer(message: *const RPC_MESSAGE, newsize: u32) #[inline] pub unsafe fn I_RpcReceive(message: *mut RPC_MESSAGE, size: u32) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcReceive(message : *mut RPC_MESSAGE, size : u32) -> RPC_STATUS); - unsafe { I_RpcReceive(core::mem::transmute(message), size) } + unsafe { I_RpcReceive(message as _, size) } } #[inline] pub unsafe fn I_RpcRecordCalloutFailure(rpcstatus: RPC_STATUS, calloutstate: *mut RDR_CALLOUT_STATE, dllname: *mut u16) { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcRecordCalloutFailure(rpcstatus : RPC_STATUS, calloutstate : *mut RDR_CALLOUT_STATE, dllname : *mut u16)); - unsafe { I_RpcRecordCalloutFailure(rpcstatus, core::mem::transmute(calloutstate), core::mem::transmute(dllname)) } + unsafe { I_RpcRecordCalloutFailure(rpcstatus, calloutstate as _, dllname as _) } } #[inline] pub unsafe fn I_RpcRequestMutex(mutex: *mut *mut core::ffi::c_void) { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcRequestMutex(mutex : *mut *mut core::ffi::c_void)); - unsafe { I_RpcRequestMutex(core::mem::transmute(mutex)) } + unsafe { I_RpcRequestMutex(mutex as _) } } #[inline] pub unsafe fn I_RpcSend(message: *mut RPC_MESSAGE) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcSend(message : *mut RPC_MESSAGE) -> RPC_STATUS); - unsafe { I_RpcSend(core::mem::transmute(message)) } + unsafe { I_RpcSend(message as _) } } #[inline] pub unsafe fn I_RpcSendReceive(message: *mut RPC_MESSAGE) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcSendReceive(message : *mut RPC_MESSAGE) -> RPC_STATUS); - unsafe { I_RpcSendReceive(core::mem::transmute(message)) } + unsafe { I_RpcSendReceive(message as _) } } #[inline] pub unsafe fn I_RpcServerCheckClientRestriction(context: *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcServerCheckClientRestriction(context : *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { I_RpcServerCheckClientRestriction(core::mem::transmute(context)) } + unsafe { I_RpcServerCheckClientRestriction(context as _) } } #[inline] pub unsafe fn I_RpcServerDisableExceptionFilter() -> i32 { @@ -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); - unsafe { I_RpcServerGetAssociationID(core::mem::transmute(binding.unwrap_or(core::mem::zeroed())), core::mem::transmute(associationid)) } + unsafe { I_RpcServerGetAssociationID(binding.unwrap_or(core::mem::zeroed()) as _, associationid as _) } } #[inline] pub unsafe fn I_RpcServerInqAddressChangeFn() -> *mut RPC_ADDRESS_CHANGE_FN { @@ -318,27 +318,27 @@ pub unsafe fn I_RpcServerInqAddressChangeFn() -> *mut RPC_ADDRESS_CHANGE_FN { #[inline] pub unsafe fn I_RpcServerInqLocalConnAddress(binding: *mut core::ffi::c_void, buffer: *mut core::ffi::c_void, buffersize: *mut u32, addressformat: *mut u32) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcServerInqLocalConnAddress(binding : *mut core::ffi::c_void, buffer : *mut core::ffi::c_void, buffersize : *mut u32, addressformat : *mut u32) -> RPC_STATUS); - unsafe { I_RpcServerInqLocalConnAddress(core::mem::transmute(binding), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(addressformat)) } + unsafe { I_RpcServerInqLocalConnAddress(binding as _, buffer as _, buffersize as _, addressformat as _) } } #[inline] pub unsafe fn I_RpcServerInqRemoteConnAddress(binding: *mut core::ffi::c_void, buffer: *mut core::ffi::c_void, buffersize: *mut u32, addressformat: *mut u32) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcServerInqRemoteConnAddress(binding : *mut core::ffi::c_void, buffer : *mut core::ffi::c_void, buffersize : *mut u32, addressformat : *mut u32) -> RPC_STATUS); - unsafe { I_RpcServerInqRemoteConnAddress(core::mem::transmute(binding), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(addressformat)) } + unsafe { I_RpcServerInqRemoteConnAddress(binding as _, buffer as _, buffersize as _, addressformat as _) } } #[inline] pub unsafe fn I_RpcServerInqTransportType(r#type: *mut u32) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcServerInqTransportType(r#type : *mut u32) -> RPC_STATUS); - unsafe { I_RpcServerInqTransportType(core::mem::transmute(r#type)) } + unsafe { I_RpcServerInqTransportType(r#type as _) } } #[inline] pub unsafe fn I_RpcServerRegisterForwardFunction(pforwardfunction: *mut RPC_FORWARD_FUNCTION) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcServerRegisterForwardFunction(pforwardfunction : *mut RPC_FORWARD_FUNCTION) -> RPC_STATUS); - unsafe { I_RpcServerRegisterForwardFunction(core::mem::transmute(pforwardfunction)) } + unsafe { I_RpcServerRegisterForwardFunction(pforwardfunction as _) } } #[inline] pub unsafe fn I_RpcServerSetAddressChangeFn(paddresschangefn: *mut RPC_ADDRESS_CHANGE_FN) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcServerSetAddressChangeFn(paddresschangefn : *mut RPC_ADDRESS_CHANGE_FN) -> RPC_STATUS); - unsafe { I_RpcServerSetAddressChangeFn(core::mem::transmute(paddresschangefn)) } + unsafe { I_RpcServerSetAddressChangeFn(paddresschangefn as _) } } #[inline] pub unsafe fn I_RpcServerStartService(protseq: P0, endpoint: P1, ifspec: *const core::ffi::c_void) -> RPC_STATUS @@ -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); - unsafe { I_RpcServerSubscribeForDisconnectNotification(core::mem::transmute(binding.unwrap_or(core::mem::zeroed())), core::mem::transmute(hevent.unwrap_or(core::mem::zeroed()))) } + unsafe { I_RpcServerSubscribeForDisconnectNotification(binding.unwrap_or(core::mem::zeroed()) as _, hevent.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { I_RpcServerSubscribeForDisconnectNotification2(core::mem::transmute(binding.unwrap_or(core::mem::zeroed())), hevent, core::mem::transmute(subscriptionid)) } + unsafe { I_RpcServerSubscribeForDisconnectNotification2(binding.unwrap_or(core::mem::zeroed()) as _, hevent, subscriptionid as _) } } #[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); - unsafe { I_RpcServerUnsubscribeForDisconnectNotification(core::mem::transmute(binding.unwrap_or(core::mem::zeroed())), core::mem::transmute(subscriptionid)) } + unsafe { I_RpcServerUnsubscribeForDisconnectNotification(binding.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { I_RpcServerUseProtseq2A(networkaddress.param().abi(), protseq.param().abi(), maxcalls, core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), policy) } + unsafe { I_RpcServerUseProtseq2A(networkaddress.param().abi(), protseq.param().abi(), maxcalls, securitydescriptor.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { I_RpcServerUseProtseq2W(networkaddress.param().abi(), protseq.param().abi(), maxcalls, core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), policy) } + unsafe { I_RpcServerUseProtseq2W(networkaddress.param().abi(), protseq.param().abi(), maxcalls, securitydescriptor.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { I_RpcServerUseProtseqEp2A(networkaddress.param().abi(), protseq.param().abi(), maxcalls, endpoint.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), policy) } + unsafe { I_RpcServerUseProtseqEp2A(networkaddress.param().abi(), protseq.param().abi(), maxcalls, endpoint.param().abi(), securitydescriptor.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { I_RpcServerUseProtseqEp2W(networkaddress.param().abi(), protseq.param().abi(), maxcalls, endpoint.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), policy) } + unsafe { I_RpcServerUseProtseqEp2W(networkaddress.param().abi(), protseq.param().abi(), maxcalls, endpoint.param().abi(), securitydescriptor.unwrap_or(core::mem::zeroed()) as _, policy) } } #[inline] pub unsafe fn I_RpcSessionStrictContextHandle() { @@ -415,7 +415,7 @@ pub unsafe fn I_RpcSsDontSerializeContext() { #[inline] pub unsafe fn I_RpcSystemHandleTypeSpecificWork(handle: *mut core::ffi::c_void, actualtype: u8, idltype: u8, marshaldirection: LRPC_SYSTEM_HANDLE_MARSHAL_DIRECTION) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcSystemHandleTypeSpecificWork(handle : *mut core::ffi::c_void, actualtype : u8, idltype : u8, marshaldirection : LRPC_SYSTEM_HANDLE_MARSHAL_DIRECTION) -> RPC_STATUS); - unsafe { I_RpcSystemHandleTypeSpecificWork(core::mem::transmute(handle), actualtype, idltype, marshaldirection) } + unsafe { I_RpcSystemHandleTypeSpecificWork(handle as _, actualtype, idltype, marshaldirection) } } #[inline] pub unsafe fn I_RpcTurnOnEEInfoPropagation() -> RPC_STATUS { @@ -425,52 +425,52 @@ pub unsafe fn I_RpcTurnOnEEInfoPropagation() -> RPC_STATUS { #[inline] pub unsafe fn I_UuidCreate(uuid: *mut windows_core::GUID) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_UuidCreate(uuid : *mut windows_core::GUID) -> RPC_STATUS); - unsafe { I_UuidCreate(core::mem::transmute(uuid)) } + unsafe { I_UuidCreate(uuid as _) } } #[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); - unsafe { MesBufferHandleReset(handle, handlestyle, operation, core::mem::transmute(pbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pencodedsize.unwrap_or(core::mem::zeroed()))) } + unsafe { MesBufferHandleReset(handle, handlestyle, operation, core::mem::transmute(pbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pencodedsize.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MesDecodeBufferHandleCreate(buffer: &[u8], phandle: *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn MesDecodeBufferHandleCreate(buffer : windows_core::PCSTR, buffersize : u32, phandle : *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { MesDecodeBufferHandleCreate(core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(phandle)) } + unsafe { MesDecodeBufferHandleCreate(core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), phandle as _) } } #[inline] pub unsafe fn MesDecodeIncrementalHandleCreate(userstate: *mut core::ffi::c_void, readfn: MIDL_ES_READ, phandle: *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn MesDecodeIncrementalHandleCreate(userstate : *mut core::ffi::c_void, readfn : MIDL_ES_READ, phandle : *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { MesDecodeIncrementalHandleCreate(core::mem::transmute(userstate), readfn, core::mem::transmute(phandle)) } + unsafe { MesDecodeIncrementalHandleCreate(userstate as _, readfn, phandle as _) } } #[inline] pub unsafe fn MesEncodeDynBufferHandleCreate(pbuffer: *mut *mut i8, pencodedsize: *mut u32, phandle: *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn MesEncodeDynBufferHandleCreate(pbuffer : *mut *mut i8, pencodedsize : *mut u32, phandle : *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { MesEncodeDynBufferHandleCreate(core::mem::transmute(pbuffer), core::mem::transmute(pencodedsize), core::mem::transmute(phandle)) } + unsafe { MesEncodeDynBufferHandleCreate(pbuffer as _, pencodedsize as _, phandle as _) } } #[inline] pub unsafe fn MesEncodeFixedBufferHandleCreate(pbuffer: &mut [u8], pencodedsize: *mut u32, phandle: *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn MesEncodeFixedBufferHandleCreate(pbuffer : windows_core::PSTR, buffersize : u32, pencodedsize : *mut u32, phandle : *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { MesEncodeFixedBufferHandleCreate(core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), core::mem::transmute(pencodedsize), core::mem::transmute(phandle)) } + unsafe { MesEncodeFixedBufferHandleCreate(core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), pencodedsize as _, phandle as _) } } #[inline] pub unsafe fn MesEncodeIncrementalHandleCreate(userstate: *mut core::ffi::c_void, allocfn: MIDL_ES_ALLOC, writefn: MIDL_ES_WRITE, phandle: *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn MesEncodeIncrementalHandleCreate(userstate : *mut core::ffi::c_void, allocfn : MIDL_ES_ALLOC, writefn : MIDL_ES_WRITE, phandle : *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { MesEncodeIncrementalHandleCreate(core::mem::transmute(userstate), allocfn, writefn, core::mem::transmute(phandle)) } + unsafe { MesEncodeIncrementalHandleCreate(userstate as _, allocfn, writefn, phandle as _) } } #[inline] pub unsafe fn MesHandleFree(handle: *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn MesHandleFree(handle : *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { MesHandleFree(core::mem::transmute(handle)) } + unsafe { MesHandleFree(handle as _) } } #[inline] pub unsafe fn MesIncrementalHandleReset(handle: *mut core::ffi::c_void, userstate: *mut core::ffi::c_void, allocfn: MIDL_ES_ALLOC, writefn: MIDL_ES_WRITE, readfn: MIDL_ES_READ, operation: MIDL_ES_CODE) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn MesIncrementalHandleReset(handle : *mut core::ffi::c_void, userstate : *mut core::ffi::c_void, allocfn : MIDL_ES_ALLOC, writefn : MIDL_ES_WRITE, readfn : MIDL_ES_READ, operation : MIDL_ES_CODE) -> RPC_STATUS); - unsafe { MesIncrementalHandleReset(core::mem::transmute(handle), core::mem::transmute(userstate), allocfn, writefn, readfn, operation) } + unsafe { MesIncrementalHandleReset(handle as _, userstate as _, allocfn, writefn, readfn, operation) } } #[inline] pub unsafe fn MesInqProcEncodingId(handle: *mut core::ffi::c_void, pinterfaceid: *mut RPC_SYNTAX_IDENTIFIER, pprocnum: *mut u32) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn MesInqProcEncodingId(handle : *mut core::ffi::c_void, pinterfaceid : *mut RPC_SYNTAX_IDENTIFIER, pprocnum : *mut u32) -> RPC_STATUS); - unsafe { MesInqProcEncodingId(core::mem::transmute(handle), core::mem::transmute(pinterfaceid), core::mem::transmute(pprocnum)) } + unsafe { MesInqProcEncodingId(handle as _, pinterfaceid as _, pprocnum as _) } } #[inline] pub unsafe fn NDRCContextBinding(ccontext: isize) -> *mut core::ffi::c_void { @@ -480,27 +480,27 @@ pub unsafe fn NDRCContextBinding(ccontext: isize) -> *mut core::ffi::c_void { #[inline] 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)); - unsafe { NDRCContextMarshall(core::mem::transmute(ccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbuff)) } + unsafe { NDRCContextMarshall(ccontext.unwrap_or(core::mem::zeroed()) as _, pbuff as _) } } #[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)); - unsafe { NDRCContextUnmarshall(core::mem::transmute(pccontext.unwrap_or(core::mem::zeroed())), hbinding, pbuff, datarepresentation) } + unsafe { NDRCContextUnmarshall(pccontext.unwrap_or(core::mem::zeroed()) as _, hbinding, pbuff, datarepresentation) } } #[inline] pub unsafe fn NDRSContextMarshall(ccontext: *const NDR_SCONTEXT, pbuff: *mut core::ffi::c_void, userrundownin: NDR_RUNDOWN) { windows_targets::link!("rpcrt4.dll" "system" fn NDRSContextMarshall(ccontext : *const NDR_SCONTEXT, pbuff : *mut core::ffi::c_void, userrundownin : NDR_RUNDOWN)); - unsafe { NDRSContextMarshall(ccontext, core::mem::transmute(pbuff), userrundownin) } + unsafe { NDRSContextMarshall(ccontext, pbuff as _, userrundownin) } } #[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)); - unsafe { NDRSContextMarshall2(bindinghandle, ccontext, core::mem::transmute(pbuff), userrundownin, core::mem::transmute(ctxguard.unwrap_or(core::mem::zeroed())), flags) } + unsafe { NDRSContextMarshall2(bindinghandle, ccontext, pbuff as _, userrundownin, ctxguard.unwrap_or(core::mem::zeroed()) as _, 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) { windows_targets::link!("rpcrt4.dll" "system" fn NDRSContextMarshallEx(bindinghandle : *const core::ffi::c_void, ccontext : *const NDR_SCONTEXT, pbuff : *mut core::ffi::c_void, userrundownin : NDR_RUNDOWN)); - unsafe { NDRSContextMarshallEx(bindinghandle, ccontext, core::mem::transmute(pbuff), userrundownin) } + unsafe { NDRSContextMarshallEx(bindinghandle, ccontext, pbuff as _, userrundownin) } } #[inline] pub unsafe fn NDRSContextUnmarshall(pbuff: *const core::ffi::c_void, datarepresentation: u32) -> *mut NDR_SCONTEXT { @@ -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); - unsafe { NDRSContextUnmarshall2(bindinghandle, core::mem::transmute(pbuff.unwrap_or(core::mem::zeroed())), datarepresentation, core::mem::transmute(ctxguard.unwrap_or(core::mem::zeroed())), flags) } + unsafe { NDRSContextUnmarshall2(bindinghandle, pbuff.unwrap_or(core::mem::zeroed()) as _, datarepresentation, ctxguard.unwrap_or(core::mem::zeroed()) as _, flags) } } #[inline] pub unsafe fn NDRSContextUnmarshallEx(bindinghandle: *const core::ffi::c_void, pbuff: *const core::ffi::c_void, datarepresentation: u32) -> *mut NDR_SCONTEXT { @@ -521,23 +521,23 @@ pub unsafe fn NDRSContextUnmarshallEx(bindinghandle: *const core::ffi::c_void, p #[inline] pub unsafe fn Ndr64AsyncClientCall(pproxyinfo: *mut MIDL_STUBLESS_PROXY_INFO, nprocnum: u32, preturnvalue: *mut core::ffi::c_void) -> CLIENT_CALL_RETURN { windows_targets::link!("rpcrt4.dll" "cdecl" fn Ndr64AsyncClientCall(pproxyinfo : *mut MIDL_STUBLESS_PROXY_INFO, nprocnum : u32, preturnvalue : *mut core::ffi::c_void) -> CLIENT_CALL_RETURN); - unsafe { Ndr64AsyncClientCall(core::mem::transmute(pproxyinfo), nprocnum, core::mem::transmute(preturnvalue)) } + unsafe { Ndr64AsyncClientCall(pproxyinfo as _, nprocnum, preturnvalue as _) } } #[inline] pub unsafe fn Ndr64AsyncServerCall64(prpcmsg: *mut RPC_MESSAGE) { windows_targets::link!("rpcrt4.dll" "system" fn Ndr64AsyncServerCall64(prpcmsg : *mut RPC_MESSAGE)); - unsafe { Ndr64AsyncServerCall64(core::mem::transmute(prpcmsg)) } + unsafe { Ndr64AsyncServerCall64(prpcmsg as _) } } #[inline] pub unsafe fn Ndr64AsyncServerCallAll(prpcmsg: *mut RPC_MESSAGE) { windows_targets::link!("rpcrt4.dll" "system" fn Ndr64AsyncServerCallAll(prpcmsg : *mut RPC_MESSAGE)); - unsafe { Ndr64AsyncServerCallAll(core::mem::transmute(prpcmsg)) } + unsafe { Ndr64AsyncServerCallAll(prpcmsg as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn Ndr64DcomAsyncClientCall(pproxyinfo: *mut MIDL_STUBLESS_PROXY_INFO, nprocnum: u32, preturnvalue: *mut core::ffi::c_void) -> CLIENT_CALL_RETURN { windows_targets::link!("rpcrt4.dll" "cdecl" fn Ndr64DcomAsyncClientCall(pproxyinfo : *mut MIDL_STUBLESS_PROXY_INFO, nprocnum : u32, preturnvalue : *mut core::ffi::c_void) -> CLIENT_CALL_RETURN); - unsafe { Ndr64DcomAsyncClientCall(core::mem::transmute(pproxyinfo), nprocnum, core::mem::transmute(preturnvalue)) } + unsafe { Ndr64DcomAsyncClientCall(pproxyinfo as _, nprocnum, preturnvalue as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -547,7 +547,7 @@ where P1: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn Ndr64DcomAsyncStubCall(pthis : * mut core::ffi::c_void, pchannel : * mut core::ffi::c_void, prpcmsg : *mut RPC_MESSAGE, pdwstubphase : *mut u32) -> i32); - unsafe { Ndr64DcomAsyncStubCall(pthis.param().abi(), pchannel.param().abi(), core::mem::transmute(prpcmsg), core::mem::transmute(pdwstubphase)) } + unsafe { Ndr64DcomAsyncStubCall(pthis.param().abi(), pchannel.param().abi(), prpcmsg as _, pdwstubphase as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -559,54 +559,54 @@ pub unsafe fn NdrAllocate(pstubmsg: *mut MIDL_STUB_MESSAGE, len: usize) -> *mut #[inline] pub unsafe fn NdrAsyncClientCall(pstubdescriptor: *mut MIDL_STUB_DESC, pformat: *mut u8) -> CLIENT_CALL_RETURN { windows_targets::link!("rpcrt4.dll" "cdecl" fn NdrAsyncClientCall(pstubdescriptor : *mut MIDL_STUB_DESC, pformat : *mut u8) -> CLIENT_CALL_RETURN); - unsafe { NdrAsyncClientCall(core::mem::transmute(pstubdescriptor), core::mem::transmute(pformat)) } + unsafe { NdrAsyncClientCall(pstubdescriptor as _, pformat as _) } } #[inline] pub unsafe fn NdrAsyncServerCall(prpcmsg: *mut RPC_MESSAGE) { windows_targets::link!("rpcrt4.dll" "system" fn NdrAsyncServerCall(prpcmsg : *mut RPC_MESSAGE)); - unsafe { NdrAsyncServerCall(core::mem::transmute(prpcmsg)) } + unsafe { NdrAsyncServerCall(prpcmsg as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrByteCountPointerBufferSize(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrByteCountPointerBufferSize(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrByteCountPointerBufferSize(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrByteCountPointerBufferSize(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrByteCountPointerFree(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrByteCountPointerFree(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrByteCountPointerFree(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrByteCountPointerFree(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrByteCountPointerMarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrByteCountPointerMarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8) -> *mut u8); - unsafe { NdrByteCountPointerMarshall(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrByteCountPointerMarshall(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrByteCountPointerUnmarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, ppmemory: *mut *mut u8, pformat: *mut u8, fmustalloc: u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrByteCountPointerUnmarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, ppmemory : *mut *mut u8, pformat : *mut u8, fmustalloc : u8) -> *mut u8); - unsafe { NdrByteCountPointerUnmarshall(core::mem::transmute(pstubmsg), core::mem::transmute(ppmemory), core::mem::transmute(pformat), fmustalloc) } + unsafe { NdrByteCountPointerUnmarshall(core::mem::transmute(pstubmsg), ppmemory as _, pformat as _, fmustalloc) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrClearOutParameters(pstubmsg: *mut MIDL_STUB_MESSAGE, pformat: *mut u8, argaddr: *mut core::ffi::c_void) { windows_targets::link!("rpcrt4.dll" "system" fn NdrClearOutParameters(pstubmsg : *mut MIDL_STUB_MESSAGE, pformat : *mut u8, argaddr : *mut core::ffi::c_void)); - unsafe { NdrClearOutParameters(core::mem::transmute(pstubmsg), core::mem::transmute(pformat), core::mem::transmute(argaddr)) } + unsafe { NdrClearOutParameters(core::mem::transmute(pstubmsg), pformat as _, argaddr as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrClientCall2(pstubdescriptor: *mut MIDL_STUB_DESC, pformat: *mut u8) -> CLIENT_CALL_RETURN { windows_targets::link!("rpcrt4.dll" "cdecl" fn NdrClientCall2(pstubdescriptor : *mut MIDL_STUB_DESC, pformat : *mut u8) -> CLIENT_CALL_RETURN); - unsafe { NdrClientCall2(core::mem::transmute(pstubdescriptor), core::mem::transmute(pformat)) } + unsafe { NdrClientCall2(pstubdescriptor as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrClientCall3(pproxyinfo: *mut MIDL_STUBLESS_PROXY_INFO, nprocnum: u32, preturnvalue: *mut core::ffi::c_void) -> CLIENT_CALL_RETURN { windows_targets::link!("rpcrt4.dll" "cdecl" fn NdrClientCall3(pproxyinfo : *mut MIDL_STUBLESS_PROXY_INFO, nprocnum : u32, preturnvalue : *mut core::ffi::c_void) -> CLIENT_CALL_RETURN); - unsafe { NdrClientCall3(core::mem::transmute(pproxyinfo), nprocnum, core::mem::transmute(preturnvalue)) } + unsafe { NdrClientCall3(pproxyinfo as _, nprocnum, preturnvalue as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -618,223 +618,223 @@ pub unsafe fn NdrClientContextMarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, context #[inline] pub unsafe fn NdrClientContextUnmarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, pcontexthandle: *mut isize, bindhandle: *mut core::ffi::c_void) { windows_targets::link!("rpcrt4.dll" "system" fn NdrClientContextUnmarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, pcontexthandle : *mut isize, bindhandle : *mut core::ffi::c_void)); - unsafe { NdrClientContextUnmarshall(core::mem::transmute(pstubmsg), core::mem::transmute(pcontexthandle), core::mem::transmute(bindhandle)) } + unsafe { NdrClientContextUnmarshall(core::mem::transmute(pstubmsg), pcontexthandle as _, bindhandle as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrClientInitialize(prpcmsg: *mut RPC_MESSAGE, pstubmsg: *mut MIDL_STUB_MESSAGE, pstubdescriptor: *mut MIDL_STUB_DESC, procnum: u32) { windows_targets::link!("rpcrt4.dll" "system" fn NdrClientInitialize(prpcmsg : *mut RPC_MESSAGE, pstubmsg : *mut MIDL_STUB_MESSAGE, pstubdescriptor : *mut MIDL_STUB_DESC, procnum : u32)); - unsafe { NdrClientInitialize(core::mem::transmute(prpcmsg), core::mem::transmute(pstubmsg), core::mem::transmute(pstubdescriptor), procnum) } + unsafe { NdrClientInitialize(prpcmsg as _, core::mem::transmute(pstubmsg), pstubdescriptor as _, procnum) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrClientInitializeNew(prpcmsg: *mut RPC_MESSAGE, pstubmsg: *mut MIDL_STUB_MESSAGE, pstubdescriptor: *mut MIDL_STUB_DESC, procnum: u32) { windows_targets::link!("rpcrt4.dll" "system" fn NdrClientInitializeNew(prpcmsg : *mut RPC_MESSAGE, pstubmsg : *mut MIDL_STUB_MESSAGE, pstubdescriptor : *mut MIDL_STUB_DESC, procnum : u32)); - unsafe { NdrClientInitializeNew(core::mem::transmute(prpcmsg), core::mem::transmute(pstubmsg), core::mem::transmute(pstubdescriptor), procnum) } + unsafe { NdrClientInitializeNew(prpcmsg as _, core::mem::transmute(pstubmsg), pstubdescriptor as _, procnum) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrComplexArrayBufferSize(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrComplexArrayBufferSize(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrComplexArrayBufferSize(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrComplexArrayBufferSize(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrComplexArrayFree(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrComplexArrayFree(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrComplexArrayFree(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrComplexArrayFree(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrComplexArrayMarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrComplexArrayMarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8) -> *mut u8); - unsafe { NdrComplexArrayMarshall(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrComplexArrayMarshall(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrComplexArrayMemorySize(pstubmsg: *mut MIDL_STUB_MESSAGE, pformat: *mut u8) -> u32 { windows_targets::link!("rpcrt4.dll" "system" fn NdrComplexArrayMemorySize(pstubmsg : *mut MIDL_STUB_MESSAGE, pformat : *mut u8) -> u32); - unsafe { NdrComplexArrayMemorySize(core::mem::transmute(pstubmsg), core::mem::transmute(pformat)) } + unsafe { NdrComplexArrayMemorySize(core::mem::transmute(pstubmsg), pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrComplexArrayUnmarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, ppmemory: *mut *mut u8, pformat: *mut u8, fmustalloc: u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrComplexArrayUnmarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, ppmemory : *mut *mut u8, pformat : *mut u8, fmustalloc : u8) -> *mut u8); - unsafe { NdrComplexArrayUnmarshall(core::mem::transmute(pstubmsg), core::mem::transmute(ppmemory), core::mem::transmute(pformat), fmustalloc) } + unsafe { NdrComplexArrayUnmarshall(core::mem::transmute(pstubmsg), ppmemory as _, pformat as _, fmustalloc) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrComplexStructBufferSize(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrComplexStructBufferSize(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrComplexStructBufferSize(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrComplexStructBufferSize(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrComplexStructFree(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrComplexStructFree(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrComplexStructFree(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrComplexStructFree(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrComplexStructMarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrComplexStructMarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8) -> *mut u8); - unsafe { NdrComplexStructMarshall(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrComplexStructMarshall(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrComplexStructMemorySize(pstubmsg: *mut MIDL_STUB_MESSAGE, pformat: *mut u8) -> u32 { windows_targets::link!("rpcrt4.dll" "system" fn NdrComplexStructMemorySize(pstubmsg : *mut MIDL_STUB_MESSAGE, pformat : *mut u8) -> u32); - unsafe { NdrComplexStructMemorySize(core::mem::transmute(pstubmsg), core::mem::transmute(pformat)) } + unsafe { NdrComplexStructMemorySize(core::mem::transmute(pstubmsg), pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrComplexStructUnmarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, ppmemory: *mut *mut u8, pformat: *mut u8, fmustalloc: u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrComplexStructUnmarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, ppmemory : *mut *mut u8, pformat : *mut u8, fmustalloc : u8) -> *mut u8); - unsafe { NdrComplexStructUnmarshall(core::mem::transmute(pstubmsg), core::mem::transmute(ppmemory), core::mem::transmute(pformat), fmustalloc) } + unsafe { NdrComplexStructUnmarshall(core::mem::transmute(pstubmsg), ppmemory as _, pformat as _, fmustalloc) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrConformantArrayBufferSize(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrConformantArrayBufferSize(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrConformantArrayBufferSize(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrConformantArrayBufferSize(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrConformantArrayFree(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrConformantArrayFree(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrConformantArrayFree(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrConformantArrayFree(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrConformantArrayMarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrConformantArrayMarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8) -> *mut u8); - unsafe { NdrConformantArrayMarshall(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrConformantArrayMarshall(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrConformantArrayMemorySize(pstubmsg: *mut MIDL_STUB_MESSAGE, pformat: *mut u8) -> u32 { windows_targets::link!("rpcrt4.dll" "system" fn NdrConformantArrayMemorySize(pstubmsg : *mut MIDL_STUB_MESSAGE, pformat : *mut u8) -> u32); - unsafe { NdrConformantArrayMemorySize(core::mem::transmute(pstubmsg), core::mem::transmute(pformat)) } + unsafe { NdrConformantArrayMemorySize(core::mem::transmute(pstubmsg), pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrConformantArrayUnmarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, ppmemory: *mut *mut u8, pformat: *mut u8, fmustalloc: u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrConformantArrayUnmarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, ppmemory : *mut *mut u8, pformat : *mut u8, fmustalloc : u8) -> *mut u8); - unsafe { NdrConformantArrayUnmarshall(core::mem::transmute(pstubmsg), core::mem::transmute(ppmemory), core::mem::transmute(pformat), fmustalloc) } + unsafe { NdrConformantArrayUnmarshall(core::mem::transmute(pstubmsg), ppmemory as _, pformat as _, fmustalloc) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrConformantStringBufferSize(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrConformantStringBufferSize(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrConformantStringBufferSize(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrConformantStringBufferSize(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrConformantStringMarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrConformantStringMarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8) -> *mut u8); - unsafe { NdrConformantStringMarshall(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrConformantStringMarshall(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrConformantStringMemorySize(pstubmsg: *mut MIDL_STUB_MESSAGE, pformat: *mut u8) -> u32 { windows_targets::link!("rpcrt4.dll" "system" fn NdrConformantStringMemorySize(pstubmsg : *mut MIDL_STUB_MESSAGE, pformat : *mut u8) -> u32); - unsafe { NdrConformantStringMemorySize(core::mem::transmute(pstubmsg), core::mem::transmute(pformat)) } + unsafe { NdrConformantStringMemorySize(core::mem::transmute(pstubmsg), pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrConformantStringUnmarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, ppmemory: *mut *mut u8, pformat: *mut u8, fmustalloc: u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrConformantStringUnmarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, ppmemory : *mut *mut u8, pformat : *mut u8, fmustalloc : u8) -> *mut u8); - unsafe { NdrConformantStringUnmarshall(core::mem::transmute(pstubmsg), core::mem::transmute(ppmemory), core::mem::transmute(pformat), fmustalloc) } + unsafe { NdrConformantStringUnmarshall(core::mem::transmute(pstubmsg), ppmemory as _, pformat as _, fmustalloc) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrConformantStructBufferSize(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrConformantStructBufferSize(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrConformantStructBufferSize(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrConformantStructBufferSize(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrConformantStructFree(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrConformantStructFree(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrConformantStructFree(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrConformantStructFree(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrConformantStructMarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrConformantStructMarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8) -> *mut u8); - unsafe { NdrConformantStructMarshall(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrConformantStructMarshall(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrConformantStructMemorySize(pstubmsg: *mut MIDL_STUB_MESSAGE, pformat: *mut u8) -> u32 { windows_targets::link!("rpcrt4.dll" "system" fn NdrConformantStructMemorySize(pstubmsg : *mut MIDL_STUB_MESSAGE, pformat : *mut u8) -> u32); - unsafe { NdrConformantStructMemorySize(core::mem::transmute(pstubmsg), core::mem::transmute(pformat)) } + unsafe { NdrConformantStructMemorySize(core::mem::transmute(pstubmsg), pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrConformantStructUnmarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, ppmemory: *mut *mut u8, pformat: *mut u8, fmustalloc: u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrConformantStructUnmarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, ppmemory : *mut *mut u8, pformat : *mut u8, fmustalloc : u8) -> *mut u8); - unsafe { NdrConformantStructUnmarshall(core::mem::transmute(pstubmsg), core::mem::transmute(ppmemory), core::mem::transmute(pformat), fmustalloc) } + unsafe { NdrConformantStructUnmarshall(core::mem::transmute(pstubmsg), ppmemory as _, pformat as _, fmustalloc) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrConformantVaryingArrayBufferSize(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrConformantVaryingArrayBufferSize(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrConformantVaryingArrayBufferSize(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrConformantVaryingArrayBufferSize(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrConformantVaryingArrayFree(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrConformantVaryingArrayFree(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrConformantVaryingArrayFree(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrConformantVaryingArrayFree(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrConformantVaryingArrayMarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrConformantVaryingArrayMarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8) -> *mut u8); - unsafe { NdrConformantVaryingArrayMarshall(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrConformantVaryingArrayMarshall(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrConformantVaryingArrayMemorySize(pstubmsg: *mut MIDL_STUB_MESSAGE, pformat: *mut u8) -> u32 { windows_targets::link!("rpcrt4.dll" "system" fn NdrConformantVaryingArrayMemorySize(pstubmsg : *mut MIDL_STUB_MESSAGE, pformat : *mut u8) -> u32); - unsafe { NdrConformantVaryingArrayMemorySize(core::mem::transmute(pstubmsg), core::mem::transmute(pformat)) } + unsafe { NdrConformantVaryingArrayMemorySize(core::mem::transmute(pstubmsg), pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrConformantVaryingArrayUnmarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, ppmemory: *mut *mut u8, pformat: *mut u8, fmustalloc: u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrConformantVaryingArrayUnmarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, ppmemory : *mut *mut u8, pformat : *mut u8, fmustalloc : u8) -> *mut u8); - unsafe { NdrConformantVaryingArrayUnmarshall(core::mem::transmute(pstubmsg), core::mem::transmute(ppmemory), core::mem::transmute(pformat), fmustalloc) } + unsafe { NdrConformantVaryingArrayUnmarshall(core::mem::transmute(pstubmsg), ppmemory as _, pformat as _, fmustalloc) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrConformantVaryingStructBufferSize(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrConformantVaryingStructBufferSize(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrConformantVaryingStructBufferSize(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrConformantVaryingStructBufferSize(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrConformantVaryingStructFree(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrConformantVaryingStructFree(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrConformantVaryingStructFree(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrConformantVaryingStructFree(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrConformantVaryingStructMarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrConformantVaryingStructMarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8) -> *mut u8); - unsafe { NdrConformantVaryingStructMarshall(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrConformantVaryingStructMarshall(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrConformantVaryingStructMemorySize(pstubmsg: *mut MIDL_STUB_MESSAGE, pformat: *mut u8) -> u32 { windows_targets::link!("rpcrt4.dll" "system" fn NdrConformantVaryingStructMemorySize(pstubmsg : *mut MIDL_STUB_MESSAGE, pformat : *mut u8) -> u32); - unsafe { NdrConformantVaryingStructMemorySize(core::mem::transmute(pstubmsg), core::mem::transmute(pformat)) } + unsafe { NdrConformantVaryingStructMemorySize(core::mem::transmute(pstubmsg), pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrConformantVaryingStructUnmarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, ppmemory: *mut *mut u8, pformat: *mut u8, fmustalloc: u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrConformantVaryingStructUnmarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, ppmemory : *mut *mut u8, pformat : *mut u8, fmustalloc : u8) -> *mut u8); - unsafe { NdrConformantVaryingStructUnmarshall(core::mem::transmute(pstubmsg), core::mem::transmute(ppmemory), core::mem::transmute(pformat), fmustalloc) } + unsafe { NdrConformantVaryingStructUnmarshall(core::mem::transmute(pstubmsg), ppmemory as _, pformat as _, fmustalloc) } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -846,19 +846,19 @@ pub unsafe fn NdrContextHandleInitialize(pstubmsg: *const MIDL_STUB_MESSAGE, pfo #[inline] pub unsafe fn NdrContextHandleSize(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrContextHandleSize(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrContextHandleSize(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrContextHandleSize(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrConvert(pstubmsg: *mut MIDL_STUB_MESSAGE, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrConvert(pstubmsg : *mut MIDL_STUB_MESSAGE, pformat : *mut u8)); - unsafe { NdrConvert(core::mem::transmute(pstubmsg), core::mem::transmute(pformat)) } + unsafe { NdrConvert(core::mem::transmute(pstubmsg), pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrConvert2(pstubmsg: *mut MIDL_STUB_MESSAGE, pformat: *mut u8, numberparams: i32) { windows_targets::link!("rpcrt4.dll" "system" fn NdrConvert2(pstubmsg : *mut MIDL_STUB_MESSAGE, pformat : *mut u8, numberparams : i32)); - unsafe { NdrConvert2(core::mem::transmute(pstubmsg), core::mem::transmute(pformat), numberparams) } + unsafe { NdrConvert2(core::mem::transmute(pstubmsg), pformat as _, numberparams) } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -870,7 +870,7 @@ pub unsafe fn NdrCorrelationFree(pstubmsg: *mut MIDL_STUB_MESSAGE) { #[inline] pub unsafe fn NdrCorrelationInitialize(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut core::ffi::c_void, cachesize: u32, flags: u32) { windows_targets::link!("rpcrt4.dll" "system" fn NdrCorrelationInitialize(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut core::ffi::c_void, cachesize : u32, flags : u32)); - unsafe { NdrCorrelationInitialize(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), cachesize, flags) } + unsafe { NdrCorrelationInitialize(core::mem::transmute(pstubmsg), pmemory as _, cachesize, flags) } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -885,13 +885,13 @@ where P0: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn NdrCreateServerInterfaceFromStub(pstub : * mut core::ffi::c_void, pserverif : *mut RPC_SERVER_INTERFACE) -> RPC_STATUS); - unsafe { NdrCreateServerInterfaceFromStub(pstub.param().abi(), core::mem::transmute(pserverif)) } + unsafe { NdrCreateServerInterfaceFromStub(pstub.param().abi(), pserverif as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrDcomAsyncClientCall(pstubdescriptor: *mut MIDL_STUB_DESC, pformat: *mut u8) -> CLIENT_CALL_RETURN { windows_targets::link!("rpcrt4.dll" "cdecl" fn NdrDcomAsyncClientCall(pstubdescriptor : *mut MIDL_STUB_DESC, pformat : *mut u8) -> CLIENT_CALL_RETURN); - unsafe { NdrDcomAsyncClientCall(core::mem::transmute(pstubdescriptor), core::mem::transmute(pformat)) } + unsafe { NdrDcomAsyncClientCall(pstubdescriptor as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -901,67 +901,67 @@ where P1: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn NdrDcomAsyncStubCall(pthis : * mut core::ffi::c_void, pchannel : * mut core::ffi::c_void, prpcmsg : *mut RPC_MESSAGE, pdwstubphase : *mut u32) -> i32); - unsafe { NdrDcomAsyncStubCall(pthis.param().abi(), pchannel.param().abi(), core::mem::transmute(prpcmsg), core::mem::transmute(pdwstubphase)) } + unsafe { NdrDcomAsyncStubCall(pthis.param().abi(), pchannel.param().abi(), prpcmsg as _, pdwstubphase as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrEncapsulatedUnionBufferSize(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrEncapsulatedUnionBufferSize(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrEncapsulatedUnionBufferSize(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrEncapsulatedUnionBufferSize(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrEncapsulatedUnionFree(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrEncapsulatedUnionFree(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrEncapsulatedUnionFree(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrEncapsulatedUnionFree(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrEncapsulatedUnionMarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrEncapsulatedUnionMarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8) -> *mut u8); - unsafe { NdrEncapsulatedUnionMarshall(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrEncapsulatedUnionMarshall(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrEncapsulatedUnionMemorySize(pstubmsg: *mut MIDL_STUB_MESSAGE, pformat: *mut u8) -> u32 { windows_targets::link!("rpcrt4.dll" "system" fn NdrEncapsulatedUnionMemorySize(pstubmsg : *mut MIDL_STUB_MESSAGE, pformat : *mut u8) -> u32); - unsafe { NdrEncapsulatedUnionMemorySize(core::mem::transmute(pstubmsg), core::mem::transmute(pformat)) } + unsafe { NdrEncapsulatedUnionMemorySize(core::mem::transmute(pstubmsg), pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrEncapsulatedUnionUnmarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, ppmemory: *mut *mut u8, pformat: *mut u8, fmustalloc: u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrEncapsulatedUnionUnmarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, ppmemory : *mut *mut u8, pformat : *mut u8, fmustalloc : u8) -> *mut u8); - unsafe { NdrEncapsulatedUnionUnmarshall(core::mem::transmute(pstubmsg), core::mem::transmute(ppmemory), core::mem::transmute(pformat), fmustalloc) } + unsafe { NdrEncapsulatedUnionUnmarshall(core::mem::transmute(pstubmsg), ppmemory as _, pformat as _, fmustalloc) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrFixedArrayBufferSize(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrFixedArrayBufferSize(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrFixedArrayBufferSize(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrFixedArrayBufferSize(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrFixedArrayFree(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrFixedArrayFree(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrFixedArrayFree(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrFixedArrayFree(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrFixedArrayMarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrFixedArrayMarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8) -> *mut u8); - unsafe { NdrFixedArrayMarshall(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrFixedArrayMarshall(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrFixedArrayMemorySize(pstubmsg: *mut MIDL_STUB_MESSAGE, pformat: *mut u8) -> u32 { windows_targets::link!("rpcrt4.dll" "system" fn NdrFixedArrayMemorySize(pstubmsg : *mut MIDL_STUB_MESSAGE, pformat : *mut u8) -> u32); - unsafe { NdrFixedArrayMemorySize(core::mem::transmute(pstubmsg), core::mem::transmute(pformat)) } + unsafe { NdrFixedArrayMemorySize(core::mem::transmute(pstubmsg), pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrFixedArrayUnmarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, ppmemory: *mut *mut u8, pformat: *mut u8, fmustalloc: u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrFixedArrayUnmarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, ppmemory : *mut *mut u8, pformat : *mut u8, fmustalloc : u8) -> *mut u8); - unsafe { NdrFixedArrayUnmarshall(core::mem::transmute(pstubmsg), core::mem::transmute(ppmemory), core::mem::transmute(pformat), fmustalloc) } + unsafe { NdrFixedArrayUnmarshall(core::mem::transmute(pstubmsg), ppmemory as _, pformat as _, fmustalloc) } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -972,7 +972,7 @@ pub unsafe fn NdrFreeBuffer(pstubmsg: *mut MIDL_STUB_MESSAGE) { #[inline] pub unsafe fn NdrFullPointerXlatFree(pxlattables: *mut FULL_PTR_XLAT_TABLES) { windows_targets::link!("rpcrt4.dll" "system" fn NdrFullPointerXlatFree(pxlattables : *mut FULL_PTR_XLAT_TABLES)); - unsafe { NdrFullPointerXlatFree(core::mem::transmute(pxlattables)) } + unsafe { NdrFullPointerXlatFree(pxlattables as _) } } #[inline] pub unsafe fn NdrFullPointerXlatInit(numberofpointers: u32, xlatside: XLAT_SIDE) -> *mut FULL_PTR_XLAT_TABLES { @@ -983,13 +983,13 @@ pub unsafe fn NdrFullPointerXlatInit(numberofpointers: u32, xlatside: XLAT_SIDE) #[inline] pub unsafe fn NdrGetBuffer(pstubmsg: *mut MIDL_STUB_MESSAGE, bufferlength: u32, handle: *mut core::ffi::c_void) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrGetBuffer(pstubmsg : *mut MIDL_STUB_MESSAGE, bufferlength : u32, handle : *mut core::ffi::c_void) -> *mut u8); - unsafe { NdrGetBuffer(core::mem::transmute(pstubmsg), bufferlength, core::mem::transmute(handle)) } + unsafe { NdrGetBuffer(core::mem::transmute(pstubmsg), bufferlength, handle as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrGetDcomProtocolVersion(pstubmsg: *mut MIDL_STUB_MESSAGE, pversion: *mut RPC_VERSION) -> windows_core::Result<()> { windows_targets::link!("rpcrt4.dll" "system" fn NdrGetDcomProtocolVersion(pstubmsg : *mut MIDL_STUB_MESSAGE, pversion : *mut RPC_VERSION) -> windows_core::HRESULT); - unsafe { NdrGetDcomProtocolVersion(core::mem::transmute(pstubmsg), core::mem::transmute(pversion)).ok() } + unsafe { NdrGetDcomProtocolVersion(core::mem::transmute(pstubmsg), pversion as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -1001,221 +1001,221 @@ pub unsafe fn NdrGetUserMarshalInfo(pflags: *const u32, informationlevel: u32, p #[inline] pub unsafe fn NdrInterfacePointerBufferSize(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrInterfacePointerBufferSize(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrInterfacePointerBufferSize(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrInterfacePointerBufferSize(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrInterfacePointerFree(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrInterfacePointerFree(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrInterfacePointerFree(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrInterfacePointerFree(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrInterfacePointerMarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrInterfacePointerMarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8) -> *mut u8); - unsafe { NdrInterfacePointerMarshall(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrInterfacePointerMarshall(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrInterfacePointerMemorySize(pstubmsg: *mut MIDL_STUB_MESSAGE, pformat: *mut u8) -> u32 { windows_targets::link!("rpcrt4.dll" "system" fn NdrInterfacePointerMemorySize(pstubmsg : *mut MIDL_STUB_MESSAGE, pformat : *mut u8) -> u32); - unsafe { NdrInterfacePointerMemorySize(core::mem::transmute(pstubmsg), core::mem::transmute(pformat)) } + unsafe { NdrInterfacePointerMemorySize(core::mem::transmute(pstubmsg), pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrInterfacePointerUnmarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, ppmemory: *mut *mut u8, pformat: *mut u8, fmustalloc: u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrInterfacePointerUnmarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, ppmemory : *mut *mut u8, pformat : *mut u8, fmustalloc : u8) -> *mut u8); - unsafe { NdrInterfacePointerUnmarshall(core::mem::transmute(pstubmsg), core::mem::transmute(ppmemory), core::mem::transmute(pformat), fmustalloc) } + unsafe { NdrInterfacePointerUnmarshall(core::mem::transmute(pstubmsg), ppmemory as _, pformat as _, fmustalloc) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrMapCommAndFaultStatus(pstubmsg: *mut MIDL_STUB_MESSAGE, pcommstatus: *mut u32, pfaultstatus: *mut u32, status: RPC_STATUS) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn NdrMapCommAndFaultStatus(pstubmsg : *mut MIDL_STUB_MESSAGE, pcommstatus : *mut u32, pfaultstatus : *mut u32, status : RPC_STATUS) -> RPC_STATUS); - unsafe { NdrMapCommAndFaultStatus(core::mem::transmute(pstubmsg), core::mem::transmute(pcommstatus), core::mem::transmute(pfaultstatus), status) } + unsafe { NdrMapCommAndFaultStatus(core::mem::transmute(pstubmsg), pcommstatus as _, pfaultstatus as _, status) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrMesProcEncodeDecode(handle: *mut core::ffi::c_void, pstubdesc: *const MIDL_STUB_DESC, pformatstring: *mut u8) { windows_targets::link!("rpcrt4.dll" "cdecl" fn NdrMesProcEncodeDecode(handle : *mut core::ffi::c_void, pstubdesc : *const MIDL_STUB_DESC, pformatstring : *mut u8)); - unsafe { NdrMesProcEncodeDecode(core::mem::transmute(handle), pstubdesc, core::mem::transmute(pformatstring)) } + unsafe { NdrMesProcEncodeDecode(handle as _, pstubdesc, pformatstring as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrMesProcEncodeDecode2(handle: *mut core::ffi::c_void, pstubdesc: *const MIDL_STUB_DESC, pformatstring: *mut u8) -> CLIENT_CALL_RETURN { windows_targets::link!("rpcrt4.dll" "cdecl" fn NdrMesProcEncodeDecode2(handle : *mut core::ffi::c_void, pstubdesc : *const MIDL_STUB_DESC, pformatstring : *mut u8) -> CLIENT_CALL_RETURN); - unsafe { NdrMesProcEncodeDecode2(core::mem::transmute(handle), pstubdesc, core::mem::transmute(pformatstring)) } + unsafe { NdrMesProcEncodeDecode2(handle as _, pstubdesc, pformatstring as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrMesProcEncodeDecode3(handle: *mut core::ffi::c_void, pproxyinfo: *const MIDL_STUBLESS_PROXY_INFO, nprocnum: u32, preturnvalue: *mut core::ffi::c_void) -> CLIENT_CALL_RETURN { windows_targets::link!("rpcrt4.dll" "cdecl" fn NdrMesProcEncodeDecode3(handle : *mut core::ffi::c_void, pproxyinfo : *const MIDL_STUBLESS_PROXY_INFO, nprocnum : u32, preturnvalue : *mut core::ffi::c_void) -> CLIENT_CALL_RETURN); - unsafe { NdrMesProcEncodeDecode3(core::mem::transmute(handle), pproxyinfo, nprocnum, core::mem::transmute(preturnvalue)) } + unsafe { NdrMesProcEncodeDecode3(handle as _, pproxyinfo, nprocnum, preturnvalue as _) } } #[inline] pub unsafe fn NdrMesSimpleTypeAlignSize(param0: *mut core::ffi::c_void) -> usize { windows_targets::link!("rpcrt4.dll" "system" fn NdrMesSimpleTypeAlignSize(param0 : *mut core::ffi::c_void) -> usize); - unsafe { NdrMesSimpleTypeAlignSize(core::mem::transmute(param0)) } + unsafe { NdrMesSimpleTypeAlignSize(param0 as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrMesSimpleTypeAlignSizeAll(handle: *mut core::ffi::c_void, pproxyinfo: *const MIDL_STUBLESS_PROXY_INFO) -> usize { windows_targets::link!("rpcrt4.dll" "system" fn NdrMesSimpleTypeAlignSizeAll(handle : *mut core::ffi::c_void, pproxyinfo : *const MIDL_STUBLESS_PROXY_INFO) -> usize); - unsafe { NdrMesSimpleTypeAlignSizeAll(core::mem::transmute(handle), pproxyinfo) } + unsafe { NdrMesSimpleTypeAlignSizeAll(handle as _, pproxyinfo) } } #[inline] pub unsafe fn NdrMesSimpleTypeDecode(handle: *mut core::ffi::c_void, pobject: *mut core::ffi::c_void, size: i16) { windows_targets::link!("rpcrt4.dll" "system" fn NdrMesSimpleTypeDecode(handle : *mut core::ffi::c_void, pobject : *mut core::ffi::c_void, size : i16)); - unsafe { NdrMesSimpleTypeDecode(core::mem::transmute(handle), core::mem::transmute(pobject), size) } + unsafe { NdrMesSimpleTypeDecode(handle as _, pobject as _, size) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrMesSimpleTypeDecodeAll(handle: *mut core::ffi::c_void, pproxyinfo: *const MIDL_STUBLESS_PROXY_INFO, pobject: *mut core::ffi::c_void, size: i16) { windows_targets::link!("rpcrt4.dll" "system" fn NdrMesSimpleTypeDecodeAll(handle : *mut core::ffi::c_void, pproxyinfo : *const MIDL_STUBLESS_PROXY_INFO, pobject : *mut core::ffi::c_void, size : i16)); - unsafe { NdrMesSimpleTypeDecodeAll(core::mem::transmute(handle), pproxyinfo, core::mem::transmute(pobject), size) } + unsafe { NdrMesSimpleTypeDecodeAll(handle as _, pproxyinfo, pobject as _, size) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrMesSimpleTypeEncode(handle: *mut core::ffi::c_void, pstubdesc: *const MIDL_STUB_DESC, pobject: *const core::ffi::c_void, size: i16) { windows_targets::link!("rpcrt4.dll" "system" fn NdrMesSimpleTypeEncode(handle : *mut core::ffi::c_void, pstubdesc : *const MIDL_STUB_DESC, pobject : *const core::ffi::c_void, size : i16)); - unsafe { NdrMesSimpleTypeEncode(core::mem::transmute(handle), pstubdesc, pobject, size) } + unsafe { NdrMesSimpleTypeEncode(handle as _, pstubdesc, pobject, size) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrMesSimpleTypeEncodeAll(handle: *mut core::ffi::c_void, pproxyinfo: *const MIDL_STUBLESS_PROXY_INFO, pobject: *const core::ffi::c_void, size: i16) { windows_targets::link!("rpcrt4.dll" "system" fn NdrMesSimpleTypeEncodeAll(handle : *mut core::ffi::c_void, pproxyinfo : *const MIDL_STUBLESS_PROXY_INFO, pobject : *const core::ffi::c_void, size : i16)); - unsafe { NdrMesSimpleTypeEncodeAll(core::mem::transmute(handle), pproxyinfo, pobject, size) } + unsafe { NdrMesSimpleTypeEncodeAll(handle as _, pproxyinfo, pobject, size) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrMesTypeAlignSize(handle: *mut core::ffi::c_void, pstubdesc: *const MIDL_STUB_DESC, pformatstring: *mut u8, pobject: *const core::ffi::c_void) -> usize { windows_targets::link!("rpcrt4.dll" "system" fn NdrMesTypeAlignSize(handle : *mut core::ffi::c_void, pstubdesc : *const MIDL_STUB_DESC, pformatstring : *mut u8, pobject : *const core::ffi::c_void) -> usize); - unsafe { NdrMesTypeAlignSize(core::mem::transmute(handle), pstubdesc, core::mem::transmute(pformatstring), pobject) } + unsafe { NdrMesTypeAlignSize(handle as _, pstubdesc, pformatstring as _, pobject) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrMesTypeAlignSize2(handle: *mut core::ffi::c_void, ppicklinginfo: *const MIDL_TYPE_PICKLING_INFO, pstubdesc: *const MIDL_STUB_DESC, pformatstring: *mut u8, pobject: *const core::ffi::c_void) -> usize { windows_targets::link!("rpcrt4.dll" "system" fn NdrMesTypeAlignSize2(handle : *mut core::ffi::c_void, ppicklinginfo : *const MIDL_TYPE_PICKLING_INFO, pstubdesc : *const MIDL_STUB_DESC, pformatstring : *mut u8, pobject : *const core::ffi::c_void) -> usize); - unsafe { NdrMesTypeAlignSize2(core::mem::transmute(handle), ppicklinginfo, pstubdesc, core::mem::transmute(pformatstring), pobject) } + unsafe { NdrMesTypeAlignSize2(handle as _, ppicklinginfo, pstubdesc, pformatstring as _, pobject) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrMesTypeAlignSize3(handle: *mut core::ffi::c_void, ppicklinginfo: *const MIDL_TYPE_PICKLING_INFO, pproxyinfo: *const MIDL_STUBLESS_PROXY_INFO, arrtypeoffset: *const *const u32, ntypeindex: u32, pobject: *const core::ffi::c_void) -> usize { windows_targets::link!("rpcrt4.dll" "system" fn NdrMesTypeAlignSize3(handle : *mut core::ffi::c_void, ppicklinginfo : *const MIDL_TYPE_PICKLING_INFO, pproxyinfo : *const MIDL_STUBLESS_PROXY_INFO, arrtypeoffset : *const *const u32, ntypeindex : u32, pobject : *const core::ffi::c_void) -> usize); - unsafe { NdrMesTypeAlignSize3(core::mem::transmute(handle), ppicklinginfo, pproxyinfo, arrtypeoffset, ntypeindex, pobject) } + unsafe { NdrMesTypeAlignSize3(handle as _, ppicklinginfo, pproxyinfo, arrtypeoffset, ntypeindex, pobject) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrMesTypeDecode(handle: *mut core::ffi::c_void, pstubdesc: *const MIDL_STUB_DESC, pformatstring: *mut u8, pobject: *mut core::ffi::c_void) { windows_targets::link!("rpcrt4.dll" "system" fn NdrMesTypeDecode(handle : *mut core::ffi::c_void, pstubdesc : *const MIDL_STUB_DESC, pformatstring : *mut u8, pobject : *mut core::ffi::c_void)); - unsafe { NdrMesTypeDecode(core::mem::transmute(handle), pstubdesc, core::mem::transmute(pformatstring), core::mem::transmute(pobject)) } + unsafe { NdrMesTypeDecode(handle as _, pstubdesc, pformatstring as _, pobject as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrMesTypeDecode2(handle: *mut core::ffi::c_void, ppicklinginfo: *const MIDL_TYPE_PICKLING_INFO, pstubdesc: *const MIDL_STUB_DESC, pformatstring: *mut u8, pobject: *mut core::ffi::c_void) { windows_targets::link!("rpcrt4.dll" "system" fn NdrMesTypeDecode2(handle : *mut core::ffi::c_void, ppicklinginfo : *const MIDL_TYPE_PICKLING_INFO, pstubdesc : *const MIDL_STUB_DESC, pformatstring : *mut u8, pobject : *mut core::ffi::c_void)); - unsafe { NdrMesTypeDecode2(core::mem::transmute(handle), ppicklinginfo, pstubdesc, core::mem::transmute(pformatstring), core::mem::transmute(pobject)) } + unsafe { NdrMesTypeDecode2(handle as _, ppicklinginfo, pstubdesc, pformatstring as _, pobject as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrMesTypeDecode3(handle: *mut core::ffi::c_void, ppicklinginfo: *const MIDL_TYPE_PICKLING_INFO, pproxyinfo: *const MIDL_STUBLESS_PROXY_INFO, arrtypeoffset: *const *const u32, ntypeindex: u32, pobject: *mut core::ffi::c_void) { windows_targets::link!("rpcrt4.dll" "system" fn NdrMesTypeDecode3(handle : *mut core::ffi::c_void, ppicklinginfo : *const MIDL_TYPE_PICKLING_INFO, pproxyinfo : *const MIDL_STUBLESS_PROXY_INFO, arrtypeoffset : *const *const u32, ntypeindex : u32, pobject : *mut core::ffi::c_void)); - unsafe { NdrMesTypeDecode3(core::mem::transmute(handle), ppicklinginfo, pproxyinfo, arrtypeoffset, ntypeindex, core::mem::transmute(pobject)) } + unsafe { NdrMesTypeDecode3(handle as _, ppicklinginfo, pproxyinfo, arrtypeoffset, ntypeindex, pobject as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrMesTypeEncode(handle: *mut core::ffi::c_void, pstubdesc: *const MIDL_STUB_DESC, pformatstring: *mut u8, pobject: *const core::ffi::c_void) { windows_targets::link!("rpcrt4.dll" "system" fn NdrMesTypeEncode(handle : *mut core::ffi::c_void, pstubdesc : *const MIDL_STUB_DESC, pformatstring : *mut u8, pobject : *const core::ffi::c_void)); - unsafe { NdrMesTypeEncode(core::mem::transmute(handle), pstubdesc, core::mem::transmute(pformatstring), pobject) } + unsafe { NdrMesTypeEncode(handle as _, pstubdesc, pformatstring as _, pobject) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrMesTypeEncode2(handle: *mut core::ffi::c_void, ppicklinginfo: *const MIDL_TYPE_PICKLING_INFO, pstubdesc: *const MIDL_STUB_DESC, pformatstring: *mut u8, pobject: *const core::ffi::c_void) { windows_targets::link!("rpcrt4.dll" "system" fn NdrMesTypeEncode2(handle : *mut core::ffi::c_void, ppicklinginfo : *const MIDL_TYPE_PICKLING_INFO, pstubdesc : *const MIDL_STUB_DESC, pformatstring : *mut u8, pobject : *const core::ffi::c_void)); - unsafe { NdrMesTypeEncode2(core::mem::transmute(handle), ppicklinginfo, pstubdesc, core::mem::transmute(pformatstring), pobject) } + unsafe { NdrMesTypeEncode2(handle as _, ppicklinginfo, pstubdesc, pformatstring as _, pobject) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrMesTypeEncode3(handle: *mut core::ffi::c_void, ppicklinginfo: *const MIDL_TYPE_PICKLING_INFO, pproxyinfo: *const MIDL_STUBLESS_PROXY_INFO, arrtypeoffset: *const *const u32, ntypeindex: u32, pobject: *const core::ffi::c_void) { windows_targets::link!("rpcrt4.dll" "system" fn NdrMesTypeEncode3(handle : *mut core::ffi::c_void, ppicklinginfo : *const MIDL_TYPE_PICKLING_INFO, pproxyinfo : *const MIDL_STUBLESS_PROXY_INFO, arrtypeoffset : *const *const u32, ntypeindex : u32, pobject : *const core::ffi::c_void)); - unsafe { NdrMesTypeEncode3(core::mem::transmute(handle), ppicklinginfo, pproxyinfo, arrtypeoffset, ntypeindex, pobject) } + unsafe { NdrMesTypeEncode3(handle as _, ppicklinginfo, pproxyinfo, arrtypeoffset, ntypeindex, pobject) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrMesTypeFree2(handle: *mut core::ffi::c_void, ppicklinginfo: *const MIDL_TYPE_PICKLING_INFO, pstubdesc: *const MIDL_STUB_DESC, pformatstring: *mut u8, pobject: *mut core::ffi::c_void) { windows_targets::link!("rpcrt4.dll" "system" fn NdrMesTypeFree2(handle : *mut core::ffi::c_void, ppicklinginfo : *const MIDL_TYPE_PICKLING_INFO, pstubdesc : *const MIDL_STUB_DESC, pformatstring : *mut u8, pobject : *mut core::ffi::c_void)); - unsafe { NdrMesTypeFree2(core::mem::transmute(handle), ppicklinginfo, pstubdesc, core::mem::transmute(pformatstring), core::mem::transmute(pobject)) } + unsafe { NdrMesTypeFree2(handle as _, ppicklinginfo, pstubdesc, pformatstring as _, pobject as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrMesTypeFree3(handle: *mut core::ffi::c_void, ppicklinginfo: *const MIDL_TYPE_PICKLING_INFO, pproxyinfo: *const MIDL_STUBLESS_PROXY_INFO, arrtypeoffset: *const *const u32, ntypeindex: u32, pobject: *mut core::ffi::c_void) { windows_targets::link!("rpcrt4.dll" "system" fn NdrMesTypeFree3(handle : *mut core::ffi::c_void, ppicklinginfo : *const MIDL_TYPE_PICKLING_INFO, pproxyinfo : *const MIDL_STUBLESS_PROXY_INFO, arrtypeoffset : *const *const u32, ntypeindex : u32, pobject : *mut core::ffi::c_void)); - unsafe { NdrMesTypeFree3(core::mem::transmute(handle), ppicklinginfo, pproxyinfo, arrtypeoffset, ntypeindex, core::mem::transmute(pobject)) } + unsafe { NdrMesTypeFree3(handle as _, ppicklinginfo, pproxyinfo, arrtypeoffset, ntypeindex, pobject as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrNonConformantStringBufferSize(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrNonConformantStringBufferSize(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrNonConformantStringBufferSize(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrNonConformantStringBufferSize(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrNonConformantStringMarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrNonConformantStringMarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8) -> *mut u8); - unsafe { NdrNonConformantStringMarshall(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrNonConformantStringMarshall(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrNonConformantStringMemorySize(pstubmsg: *mut MIDL_STUB_MESSAGE, pformat: *mut u8) -> u32 { windows_targets::link!("rpcrt4.dll" "system" fn NdrNonConformantStringMemorySize(pstubmsg : *mut MIDL_STUB_MESSAGE, pformat : *mut u8) -> u32); - unsafe { NdrNonConformantStringMemorySize(core::mem::transmute(pstubmsg), core::mem::transmute(pformat)) } + unsafe { NdrNonConformantStringMemorySize(core::mem::transmute(pstubmsg), pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrNonConformantStringUnmarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, ppmemory: *mut *mut u8, pformat: *mut u8, fmustalloc: u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrNonConformantStringUnmarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, ppmemory : *mut *mut u8, pformat : *mut u8, fmustalloc : u8) -> *mut u8); - unsafe { NdrNonConformantStringUnmarshall(core::mem::transmute(pstubmsg), core::mem::transmute(ppmemory), core::mem::transmute(pformat), fmustalloc) } + unsafe { NdrNonConformantStringUnmarshall(core::mem::transmute(pstubmsg), ppmemory as _, pformat as _, fmustalloc) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrNonEncapsulatedUnionBufferSize(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrNonEncapsulatedUnionBufferSize(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrNonEncapsulatedUnionBufferSize(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrNonEncapsulatedUnionBufferSize(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrNonEncapsulatedUnionFree(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrNonEncapsulatedUnionFree(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrNonEncapsulatedUnionFree(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrNonEncapsulatedUnionFree(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrNonEncapsulatedUnionMarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrNonEncapsulatedUnionMarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8) -> *mut u8); - unsafe { NdrNonEncapsulatedUnionMarshall(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrNonEncapsulatedUnionMarshall(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrNonEncapsulatedUnionMemorySize(pstubmsg: *mut MIDL_STUB_MESSAGE, pformat: *mut u8) -> u32 { windows_targets::link!("rpcrt4.dll" "system" fn NdrNonEncapsulatedUnionMemorySize(pstubmsg : *mut MIDL_STUB_MESSAGE, pformat : *mut u8) -> u32); - unsafe { NdrNonEncapsulatedUnionMemorySize(core::mem::transmute(pstubmsg), core::mem::transmute(pformat)) } + unsafe { NdrNonEncapsulatedUnionMemorySize(core::mem::transmute(pstubmsg), pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrNonEncapsulatedUnionUnmarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, ppmemory: *mut *mut u8, pformat: *mut u8, fmustalloc: u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrNonEncapsulatedUnionUnmarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, ppmemory : *mut *mut u8, pformat : *mut u8, fmustalloc : u8) -> *mut u8); - unsafe { NdrNonEncapsulatedUnionUnmarshall(core::mem::transmute(pstubmsg), core::mem::transmute(ppmemory), core::mem::transmute(pformat), fmustalloc) } + unsafe { NdrNonEncapsulatedUnionUnmarshall(core::mem::transmute(pstubmsg), ppmemory as _, pformat as _, fmustalloc) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrNsGetBuffer(pstubmsg: *mut MIDL_STUB_MESSAGE, bufferlength: u32, handle: *mut core::ffi::c_void) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrNsGetBuffer(pstubmsg : *mut MIDL_STUB_MESSAGE, bufferlength : u32, handle : *mut core::ffi::c_void) -> *mut u8); - unsafe { NdrNsGetBuffer(core::mem::transmute(pstubmsg), bufferlength, core::mem::transmute(handle)) } + unsafe { NdrNsGetBuffer(core::mem::transmute(pstubmsg), bufferlength, handle as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrNsSendReceive(pstubmsg: *mut MIDL_STUB_MESSAGE, pbufferend: *mut u8, pautohandle: *mut *mut core::ffi::c_void) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrNsSendReceive(pstubmsg : *mut MIDL_STUB_MESSAGE, pbufferend : *mut u8, pautohandle : *mut *mut core::ffi::c_void) -> *mut u8); - unsafe { NdrNsSendReceive(core::mem::transmute(pstubmsg), core::mem::transmute(pbufferend), core::mem::transmute(pautohandle)) } + unsafe { NdrNsSendReceive(core::mem::transmute(pstubmsg), pbufferend as _, pautohandle as _) } } #[inline] pub unsafe fn NdrOleAllocate(size: usize) -> *mut core::ffi::c_void { @@ -1231,61 +1231,61 @@ pub unsafe fn NdrOleFree(nodetofree: *const core::ffi::c_void) { #[inline] pub unsafe fn NdrPartialIgnoreClientBufferSize(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut core::ffi::c_void) { windows_targets::link!("rpcrt4.dll" "system" fn NdrPartialIgnoreClientBufferSize(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut core::ffi::c_void)); - unsafe { NdrPartialIgnoreClientBufferSize(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory)) } + unsafe { NdrPartialIgnoreClientBufferSize(core::mem::transmute(pstubmsg), pmemory as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrPartialIgnoreClientMarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut core::ffi::c_void) { windows_targets::link!("rpcrt4.dll" "system" fn NdrPartialIgnoreClientMarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut core::ffi::c_void)); - unsafe { NdrPartialIgnoreClientMarshall(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory)) } + unsafe { NdrPartialIgnoreClientMarshall(core::mem::transmute(pstubmsg), pmemory as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrPartialIgnoreServerInitialize(pstubmsg: *mut MIDL_STUB_MESSAGE, ppmemory: *mut *mut core::ffi::c_void, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrPartialIgnoreServerInitialize(pstubmsg : *mut MIDL_STUB_MESSAGE, ppmemory : *mut *mut core::ffi::c_void, pformat : *mut u8)); - unsafe { NdrPartialIgnoreServerInitialize(core::mem::transmute(pstubmsg), core::mem::transmute(ppmemory), core::mem::transmute(pformat)) } + unsafe { NdrPartialIgnoreServerInitialize(core::mem::transmute(pstubmsg), ppmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrPartialIgnoreServerUnmarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, ppmemory: *mut *mut core::ffi::c_void) { windows_targets::link!("rpcrt4.dll" "system" fn NdrPartialIgnoreServerUnmarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, ppmemory : *mut *mut core::ffi::c_void)); - unsafe { NdrPartialIgnoreServerUnmarshall(core::mem::transmute(pstubmsg), core::mem::transmute(ppmemory)) } + unsafe { NdrPartialIgnoreServerUnmarshall(core::mem::transmute(pstubmsg), ppmemory as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrPointerBufferSize(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrPointerBufferSize(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrPointerBufferSize(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrPointerBufferSize(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrPointerFree(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrPointerFree(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrPointerFree(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrPointerFree(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrPointerMarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrPointerMarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8) -> *mut u8); - unsafe { NdrPointerMarshall(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrPointerMarshall(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrPointerMemorySize(pstubmsg: *mut MIDL_STUB_MESSAGE, pformat: *mut u8) -> u32 { windows_targets::link!("rpcrt4.dll" "system" fn NdrPointerMemorySize(pstubmsg : *mut MIDL_STUB_MESSAGE, pformat : *mut u8) -> u32); - unsafe { NdrPointerMemorySize(core::mem::transmute(pstubmsg), core::mem::transmute(pformat)) } + unsafe { NdrPointerMemorySize(core::mem::transmute(pstubmsg), pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrPointerUnmarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, ppmemory: *mut *mut u8, pformat: *mut u8, fmustalloc: u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrPointerUnmarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, ppmemory : *mut *mut u8, pformat : *mut u8, fmustalloc : u8) -> *mut u8); - unsafe { NdrPointerUnmarshall(core::mem::transmute(pstubmsg), core::mem::transmute(ppmemory), core::mem::transmute(pformat), fmustalloc) } + unsafe { NdrPointerUnmarshall(core::mem::transmute(pstubmsg), ppmemory as _, pformat as _, fmustalloc) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrRangeUnmarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, ppmemory: *mut *mut u8, pformat: *mut u8, fmustalloc: u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrRangeUnmarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, ppmemory : *mut *mut u8, pformat : *mut u8, fmustalloc : u8) -> *mut u8); - unsafe { NdrRangeUnmarshall(core::mem::transmute(pstubmsg), core::mem::transmute(ppmemory), core::mem::transmute(pformat), fmustalloc) } + unsafe { NdrRangeUnmarshall(core::mem::transmute(pstubmsg), ppmemory as _, pformat as _, fmustalloc) } } #[inline] pub unsafe fn NdrRpcSmClientAllocate(size: usize) -> *mut core::ffi::c_void { @@ -1329,34 +1329,34 @@ pub unsafe fn NdrRpcSsEnableAllocate(pmessage: *mut MIDL_STUB_MESSAGE) { #[inline] pub unsafe fn NdrSendReceive(pstubmsg: *mut MIDL_STUB_MESSAGE, pbufferend: *mut u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrSendReceive(pstubmsg : *mut MIDL_STUB_MESSAGE, pbufferend : *mut u8) -> *mut u8); - unsafe { NdrSendReceive(core::mem::transmute(pstubmsg), core::mem::transmute(pbufferend)) } + unsafe { NdrSendReceive(core::mem::transmute(pstubmsg), pbufferend as _) } } #[inline] pub unsafe fn NdrServerCall2(prpcmsg: *mut RPC_MESSAGE) { windows_targets::link!("rpcrt4.dll" "system" fn NdrServerCall2(prpcmsg : *mut RPC_MESSAGE)); - unsafe { NdrServerCall2(core::mem::transmute(prpcmsg)) } + unsafe { NdrServerCall2(prpcmsg as _) } } #[inline] pub unsafe fn NdrServerCallAll(prpcmsg: *mut RPC_MESSAGE) { windows_targets::link!("rpcrt4.dll" "system" fn NdrServerCallAll(prpcmsg : *mut RPC_MESSAGE)); - unsafe { NdrServerCallAll(core::mem::transmute(prpcmsg)) } + unsafe { NdrServerCallAll(prpcmsg as _) } } #[inline] pub unsafe fn NdrServerCallNdr64(prpcmsg: *mut RPC_MESSAGE) { windows_targets::link!("rpcrt4.dll" "system" fn NdrServerCallNdr64(prpcmsg : *mut RPC_MESSAGE)); - unsafe { NdrServerCallNdr64(core::mem::transmute(prpcmsg)) } + unsafe { NdrServerCallNdr64(prpcmsg as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrServerContextMarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, contexthandle: *mut NDR_SCONTEXT, rundownroutine: NDR_RUNDOWN) { windows_targets::link!("rpcrt4.dll" "system" fn NdrServerContextMarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, contexthandle : *mut NDR_SCONTEXT, rundownroutine : NDR_RUNDOWN)); - unsafe { NdrServerContextMarshall(core::mem::transmute(pstubmsg), core::mem::transmute(contexthandle), rundownroutine) } + unsafe { NdrServerContextMarshall(core::mem::transmute(pstubmsg), contexthandle as _, rundownroutine) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrServerContextNewMarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, contexthandle: *mut NDR_SCONTEXT, rundownroutine: NDR_RUNDOWN, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrServerContextNewMarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, contexthandle : *mut NDR_SCONTEXT, rundownroutine : NDR_RUNDOWN, pformat : *mut u8)); - unsafe { NdrServerContextNewMarshall(core::mem::transmute(pstubmsg), core::mem::transmute(contexthandle), rundownroutine, core::mem::transmute(pformat)) } + unsafe { NdrServerContextNewMarshall(core::mem::transmute(pstubmsg), contexthandle as _, rundownroutine, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -1374,196 +1374,196 @@ pub unsafe fn NdrServerContextUnmarshall(pstubmsg: *mut MIDL_STUB_MESSAGE) -> *m #[inline] pub unsafe fn NdrServerInitialize(prpcmsg: *mut RPC_MESSAGE, pstubmsg: *mut MIDL_STUB_MESSAGE, pstubdescriptor: *mut MIDL_STUB_DESC) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrServerInitialize(prpcmsg : *mut RPC_MESSAGE, pstubmsg : *mut MIDL_STUB_MESSAGE, pstubdescriptor : *mut MIDL_STUB_DESC) -> *mut u8); - unsafe { NdrServerInitialize(core::mem::transmute(prpcmsg), core::mem::transmute(pstubmsg), core::mem::transmute(pstubdescriptor)) } + unsafe { NdrServerInitialize(prpcmsg as _, core::mem::transmute(pstubmsg), pstubdescriptor as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrServerInitializeMarshall(prpcmsg: *mut RPC_MESSAGE, pstubmsg: *mut MIDL_STUB_MESSAGE) { windows_targets::link!("rpcrt4.dll" "system" fn NdrServerInitializeMarshall(prpcmsg : *mut RPC_MESSAGE, pstubmsg : *mut MIDL_STUB_MESSAGE)); - unsafe { NdrServerInitializeMarshall(core::mem::transmute(prpcmsg), core::mem::transmute(pstubmsg)) } + unsafe { NdrServerInitializeMarshall(prpcmsg as _, core::mem::transmute(pstubmsg)) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrServerInitializeNew(prpcmsg: *mut RPC_MESSAGE, pstubmsg: *mut MIDL_STUB_MESSAGE, pstubdescriptor: *mut MIDL_STUB_DESC) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrServerInitializeNew(prpcmsg : *mut RPC_MESSAGE, pstubmsg : *mut MIDL_STUB_MESSAGE, pstubdescriptor : *mut MIDL_STUB_DESC) -> *mut u8); - unsafe { NdrServerInitializeNew(core::mem::transmute(prpcmsg), core::mem::transmute(pstubmsg), core::mem::transmute(pstubdescriptor)) } + unsafe { NdrServerInitializeNew(prpcmsg as _, core::mem::transmute(pstubmsg), pstubdescriptor as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrServerInitializePartial(prpcmsg: *mut RPC_MESSAGE, pstubmsg: *mut MIDL_STUB_MESSAGE, pstubdescriptor: *mut MIDL_STUB_DESC, requestedbuffersize: u32) { windows_targets::link!("rpcrt4.dll" "system" fn NdrServerInitializePartial(prpcmsg : *mut RPC_MESSAGE, pstubmsg : *mut MIDL_STUB_MESSAGE, pstubdescriptor : *mut MIDL_STUB_DESC, requestedbuffersize : u32)); - unsafe { NdrServerInitializePartial(core::mem::transmute(prpcmsg), core::mem::transmute(pstubmsg), core::mem::transmute(pstubdescriptor), requestedbuffersize) } + unsafe { NdrServerInitializePartial(prpcmsg as _, core::mem::transmute(pstubmsg), pstubdescriptor as _, requestedbuffersize) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrServerInitializeUnmarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, pstubdescriptor: *mut MIDL_STUB_DESC, prpcmsg: *mut RPC_MESSAGE) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrServerInitializeUnmarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, pstubdescriptor : *mut MIDL_STUB_DESC, prpcmsg : *mut RPC_MESSAGE) -> *mut u8); - unsafe { NdrServerInitializeUnmarshall(core::mem::transmute(pstubmsg), core::mem::transmute(pstubdescriptor), core::mem::transmute(prpcmsg)) } + unsafe { NdrServerInitializeUnmarshall(core::mem::transmute(pstubmsg), pstubdescriptor as _, prpcmsg as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrSimpleStructBufferSize(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrSimpleStructBufferSize(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrSimpleStructBufferSize(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrSimpleStructBufferSize(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrSimpleStructFree(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrSimpleStructFree(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrSimpleStructFree(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrSimpleStructFree(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrSimpleStructMarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrSimpleStructMarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8) -> *mut u8); - unsafe { NdrSimpleStructMarshall(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrSimpleStructMarshall(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrSimpleStructMemorySize(pstubmsg: *mut MIDL_STUB_MESSAGE, pformat: *mut u8) -> u32 { windows_targets::link!("rpcrt4.dll" "system" fn NdrSimpleStructMemorySize(pstubmsg : *mut MIDL_STUB_MESSAGE, pformat : *mut u8) -> u32); - unsafe { NdrSimpleStructMemorySize(core::mem::transmute(pstubmsg), core::mem::transmute(pformat)) } + unsafe { NdrSimpleStructMemorySize(core::mem::transmute(pstubmsg), pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrSimpleStructUnmarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, ppmemory: *mut *mut u8, pformat: *mut u8, fmustalloc: u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrSimpleStructUnmarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, ppmemory : *mut *mut u8, pformat : *mut u8, fmustalloc : u8) -> *mut u8); - unsafe { NdrSimpleStructUnmarshall(core::mem::transmute(pstubmsg), core::mem::transmute(ppmemory), core::mem::transmute(pformat), fmustalloc) } + unsafe { NdrSimpleStructUnmarshall(core::mem::transmute(pstubmsg), ppmemory as _, pformat as _, fmustalloc) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrSimpleTypeMarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, formatchar: u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrSimpleTypeMarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, formatchar : u8)); - unsafe { NdrSimpleTypeMarshall(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), formatchar) } + unsafe { NdrSimpleTypeMarshall(core::mem::transmute(pstubmsg), pmemory as _, formatchar) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrSimpleTypeUnmarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, formatchar: u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrSimpleTypeUnmarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, formatchar : u8)); - unsafe { NdrSimpleTypeUnmarshall(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), formatchar) } + unsafe { NdrSimpleTypeUnmarshall(core::mem::transmute(pstubmsg), pmemory as _, formatchar) } } #[inline] pub unsafe fn NdrStubCall2(pthis: *mut core::ffi::c_void, pchannel: *mut core::ffi::c_void, prpcmsg: *mut RPC_MESSAGE, pdwstubphase: *mut u32) -> i32 { windows_targets::link!("rpcrt4.dll" "system" fn NdrStubCall2(pthis : *mut core::ffi::c_void, pchannel : *mut core::ffi::c_void, prpcmsg : *mut RPC_MESSAGE, pdwstubphase : *mut u32) -> i32); - unsafe { NdrStubCall2(core::mem::transmute(pthis), core::mem::transmute(pchannel), core::mem::transmute(prpcmsg), core::mem::transmute(pdwstubphase)) } + unsafe { NdrStubCall2(pthis as _, pchannel as _, prpcmsg as _, pdwstubphase as _) } } #[inline] pub unsafe fn NdrStubCall3(pthis: *mut core::ffi::c_void, pchannel: *mut core::ffi::c_void, prpcmsg: *mut RPC_MESSAGE, pdwstubphase: *mut u32) -> i32 { windows_targets::link!("rpcrt4.dll" "system" fn NdrStubCall3(pthis : *mut core::ffi::c_void, pchannel : *mut core::ffi::c_void, prpcmsg : *mut RPC_MESSAGE, pdwstubphase : *mut u32) -> i32); - unsafe { NdrStubCall3(core::mem::transmute(pthis), core::mem::transmute(pchannel), core::mem::transmute(prpcmsg), core::mem::transmute(pdwstubphase)) } + unsafe { NdrStubCall3(pthis as _, pchannel as _, prpcmsg as _, pdwstubphase as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrUserMarshalBufferSize(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrUserMarshalBufferSize(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrUserMarshalBufferSize(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrUserMarshalBufferSize(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrUserMarshalFree(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrUserMarshalFree(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrUserMarshalFree(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrUserMarshalFree(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrUserMarshalMarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrUserMarshalMarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8) -> *mut u8); - unsafe { NdrUserMarshalMarshall(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrUserMarshalMarshall(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrUserMarshalMemorySize(pstubmsg: *mut MIDL_STUB_MESSAGE, pformat: *mut u8) -> u32 { windows_targets::link!("rpcrt4.dll" "system" fn NdrUserMarshalMemorySize(pstubmsg : *mut MIDL_STUB_MESSAGE, pformat : *mut u8) -> u32); - unsafe { NdrUserMarshalMemorySize(core::mem::transmute(pstubmsg), core::mem::transmute(pformat)) } + unsafe { NdrUserMarshalMemorySize(core::mem::transmute(pstubmsg), pformat as _) } } #[inline] pub unsafe fn NdrUserMarshalSimpleTypeConvert(pflags: *mut u32, pbuffer: *mut u8, formatchar: u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrUserMarshalSimpleTypeConvert(pflags : *mut u32, pbuffer : *mut u8, formatchar : u8) -> *mut u8); - unsafe { NdrUserMarshalSimpleTypeConvert(core::mem::transmute(pflags), core::mem::transmute(pbuffer), formatchar) } + unsafe { NdrUserMarshalSimpleTypeConvert(pflags as _, pbuffer as _, formatchar) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrUserMarshalUnmarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, ppmemory: *mut *mut u8, pformat: *mut u8, fmustalloc: u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrUserMarshalUnmarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, ppmemory : *mut *mut u8, pformat : *mut u8, fmustalloc : u8) -> *mut u8); - unsafe { NdrUserMarshalUnmarshall(core::mem::transmute(pstubmsg), core::mem::transmute(ppmemory), core::mem::transmute(pformat), fmustalloc) } + unsafe { NdrUserMarshalUnmarshall(core::mem::transmute(pstubmsg), ppmemory as _, pformat as _, fmustalloc) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrVaryingArrayBufferSize(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrVaryingArrayBufferSize(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrVaryingArrayBufferSize(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrVaryingArrayBufferSize(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrVaryingArrayFree(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrVaryingArrayFree(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrVaryingArrayFree(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrVaryingArrayFree(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrVaryingArrayMarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrVaryingArrayMarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8) -> *mut u8); - unsafe { NdrVaryingArrayMarshall(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrVaryingArrayMarshall(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrVaryingArrayMemorySize(pstubmsg: *mut MIDL_STUB_MESSAGE, pformat: *mut u8) -> u32 { windows_targets::link!("rpcrt4.dll" "system" fn NdrVaryingArrayMemorySize(pstubmsg : *mut MIDL_STUB_MESSAGE, pformat : *mut u8) -> u32); - unsafe { NdrVaryingArrayMemorySize(core::mem::transmute(pstubmsg), core::mem::transmute(pformat)) } + unsafe { NdrVaryingArrayMemorySize(core::mem::transmute(pstubmsg), pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrVaryingArrayUnmarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, ppmemory: *mut *mut u8, pformat: *mut u8, fmustalloc: u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrVaryingArrayUnmarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, ppmemory : *mut *mut u8, pformat : *mut u8, fmustalloc : u8) -> *mut u8); - unsafe { NdrVaryingArrayUnmarshall(core::mem::transmute(pstubmsg), core::mem::transmute(ppmemory), core::mem::transmute(pformat), fmustalloc) } + unsafe { NdrVaryingArrayUnmarshall(core::mem::transmute(pstubmsg), ppmemory as _, pformat as _, fmustalloc) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrXmitOrRepAsBufferSize(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrXmitOrRepAsBufferSize(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrXmitOrRepAsBufferSize(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrXmitOrRepAsBufferSize(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrXmitOrRepAsFree(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) { windows_targets::link!("rpcrt4.dll" "system" fn NdrXmitOrRepAsFree(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8)); - unsafe { NdrXmitOrRepAsFree(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrXmitOrRepAsFree(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrXmitOrRepAsMarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, pmemory: *mut u8, pformat: *mut u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrXmitOrRepAsMarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, pmemory : *mut u8, pformat : *mut u8) -> *mut u8); - unsafe { NdrXmitOrRepAsMarshall(core::mem::transmute(pstubmsg), core::mem::transmute(pmemory), core::mem::transmute(pformat)) } + unsafe { NdrXmitOrRepAsMarshall(core::mem::transmute(pstubmsg), pmemory as _, pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrXmitOrRepAsMemorySize(pstubmsg: *mut MIDL_STUB_MESSAGE, pformat: *mut u8) -> u32 { windows_targets::link!("rpcrt4.dll" "system" fn NdrXmitOrRepAsMemorySize(pstubmsg : *mut MIDL_STUB_MESSAGE, pformat : *mut u8) -> u32); - unsafe { NdrXmitOrRepAsMemorySize(core::mem::transmute(pstubmsg), core::mem::transmute(pformat)) } + unsafe { NdrXmitOrRepAsMemorySize(core::mem::transmute(pstubmsg), pformat as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn NdrXmitOrRepAsUnmarshall(pstubmsg: *mut MIDL_STUB_MESSAGE, ppmemory: *mut *mut u8, pformat: *mut u8, fmustalloc: u8) -> *mut u8 { windows_targets::link!("rpcrt4.dll" "system" fn NdrXmitOrRepAsUnmarshall(pstubmsg : *mut MIDL_STUB_MESSAGE, ppmemory : *mut *mut u8, pformat : *mut u8, fmustalloc : u8) -> *mut u8); - unsafe { NdrXmitOrRepAsUnmarshall(core::mem::transmute(pstubmsg), core::mem::transmute(ppmemory), core::mem::transmute(pformat), fmustalloc) } + unsafe { NdrXmitOrRepAsUnmarshall(core::mem::transmute(pstubmsg), ppmemory as _, pformat as _, fmustalloc) } } #[cfg(feature = "Win32_System_IO")] #[inline] pub unsafe fn RpcAsyncAbortCall(pasync: *mut RPC_ASYNC_STATE, exceptioncode: u32) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcAsyncAbortCall(pasync : *mut RPC_ASYNC_STATE, exceptioncode : u32) -> RPC_STATUS); - unsafe { RpcAsyncAbortCall(core::mem::transmute(pasync), exceptioncode) } + unsafe { RpcAsyncAbortCall(pasync as _, exceptioncode) } } #[cfg(feature = "Win32_System_IO")] #[inline] pub unsafe fn RpcAsyncCancelCall(pasync: *mut RPC_ASYNC_STATE, fabort: bool) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcAsyncCancelCall(pasync : *mut RPC_ASYNC_STATE, fabort : super::super::Foundation:: BOOL) -> RPC_STATUS); - unsafe { RpcAsyncCancelCall(core::mem::transmute(pasync), fabort.into()) } + unsafe { RpcAsyncCancelCall(pasync as _, fabort.into()) } } #[cfg(feature = "Win32_System_IO")] #[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); - unsafe { RpcAsyncCompleteCall(core::mem::transmute(pasync), core::mem::transmute(reply.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcAsyncCompleteCall(pasync as _, reply.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -1575,7 +1575,7 @@ pub unsafe fn RpcAsyncGetCallStatus(pasync: *const RPC_ASYNC_STATE) -> RPC_STATU #[inline] pub unsafe fn RpcAsyncInitializeHandle(pasync: *mut RPC_ASYNC_STATE, size: u32) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcAsyncInitializeHandle(pasync : *mut RPC_ASYNC_STATE, size : u32) -> RPC_STATUS); - unsafe { RpcAsyncInitializeHandle(core::mem::transmute(pasync), size) } + unsafe { RpcAsyncInitializeHandle(pasync as _, size) } } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -1587,29 +1587,29 @@ 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); - unsafe { RpcBindingBind(core::mem::transmute(pasync.unwrap_or(core::mem::zeroed())), binding, ifspec) } + unsafe { RpcBindingBind(pasync.unwrap_or(core::mem::zeroed()) as _, binding, ifspec) } } #[inline] pub unsafe fn RpcBindingCopy(sourcebinding: *const core::ffi::c_void, destinationbinding: *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcBindingCopy(sourcebinding : *const core::ffi::c_void, destinationbinding : *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { RpcBindingCopy(sourcebinding, core::mem::transmute(destinationbinding)) } + unsafe { RpcBindingCopy(sourcebinding, destinationbinding as _) } } #[cfg(feature = "Win32_System_Com")] #[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); - unsafe { RpcBindingCreateA(template, core::mem::transmute(security.unwrap_or(core::mem::zeroed())), core::mem::transmute(options.unwrap_or(core::mem::zeroed())), core::mem::transmute(binding)) } + unsafe { RpcBindingCreateA(template, security.unwrap_or(core::mem::zeroed()) as _, options.unwrap_or(core::mem::zeroed()) as _, binding as _) } } #[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); - unsafe { RpcBindingCreateW(template, core::mem::transmute(security.unwrap_or(core::mem::zeroed())), core::mem::transmute(options.unwrap_or(core::mem::zeroed())), core::mem::transmute(binding)) } + unsafe { RpcBindingCreateW(template, security.unwrap_or(core::mem::zeroed()) as _, options.unwrap_or(core::mem::zeroed()) as _, binding as _) } } #[inline] pub unsafe fn RpcBindingFree(binding: *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcBindingFree(binding : *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { RpcBindingFree(core::mem::transmute(binding)) } + unsafe { RpcBindingFree(binding as _) } } #[inline] pub unsafe fn RpcBindingFromStringBindingA(stringbinding: P0, binding: *mut *mut core::ffi::c_void) -> RPC_STATUS @@ -1617,7 +1617,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn RpcBindingFromStringBindingA(stringbinding : windows_core::PCSTR, binding : *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { RpcBindingFromStringBindingA(stringbinding.param().abi(), core::mem::transmute(binding)) } + unsafe { RpcBindingFromStringBindingA(stringbinding.param().abi(), binding as _) } } #[inline] pub unsafe fn RpcBindingFromStringBindingW(stringbinding: P0, binding: *mut *mut core::ffi::c_void) -> RPC_STATUS @@ -1625,64 +1625,64 @@ where P0: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn RpcBindingFromStringBindingW(stringbinding : windows_core::PCWSTR, binding : *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { RpcBindingFromStringBindingW(stringbinding.param().abi(), core::mem::transmute(binding)) } + unsafe { RpcBindingFromStringBindingW(stringbinding.param().abi(), binding as _) } } #[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); - unsafe { 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()))) } + unsafe { RpcBindingInqAuthClientA(clientbinding.unwrap_or(core::mem::zeroed()) as _, privs as _, serverprincname.unwrap_or(core::mem::zeroed()) as _, authnlevel.unwrap_or(core::mem::zeroed()) as _, authnsvc.unwrap_or(core::mem::zeroed()) as _, authzsvc.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { 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())), flags) } + unsafe { RpcBindingInqAuthClientExA(clientbinding.unwrap_or(core::mem::zeroed()) as _, privs as _, serverprincname.unwrap_or(core::mem::zeroed()) as _, authnlevel.unwrap_or(core::mem::zeroed()) as _, authnsvc.unwrap_or(core::mem::zeroed()) as _, authzsvc.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { 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())), flags) } + unsafe { RpcBindingInqAuthClientExW(clientbinding.unwrap_or(core::mem::zeroed()) as _, privs as _, serverprincname.unwrap_or(core::mem::zeroed()) as _, authnlevel.unwrap_or(core::mem::zeroed()) as _, authnsvc.unwrap_or(core::mem::zeroed()) as _, authzsvc.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { 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()))) } + unsafe { RpcBindingInqAuthClientW(clientbinding.unwrap_or(core::mem::zeroed()) as _, privs as _, serverprincname.unwrap_or(core::mem::zeroed()) as _, authnlevel.unwrap_or(core::mem::zeroed()) as _, authnsvc.unwrap_or(core::mem::zeroed()) as _, authzsvc.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { RpcBindingInqAuthInfoA(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()))) } + unsafe { RpcBindingInqAuthInfoA(binding, serverprincname.unwrap_or(core::mem::zeroed()) as _, authnlevel.unwrap_or(core::mem::zeroed()) as _, authnsvc.unwrap_or(core::mem::zeroed()) as _, authidentity.unwrap_or(core::mem::zeroed()) as _, authzsvc.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { RpcBindingInqAuthInfoExA(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())), rpcqosversion, core::mem::transmute(securityqos.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcBindingInqAuthInfoExA(binding, serverprincname.unwrap_or(core::mem::zeroed()) as _, authnlevel.unwrap_or(core::mem::zeroed()) as _, authnsvc.unwrap_or(core::mem::zeroed()) as _, authidentity.unwrap_or(core::mem::zeroed()) as _, authzsvc.unwrap_or(core::mem::zeroed()) as _, rpcqosversion, securityqos.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { RpcBindingInqAuthInfoExW(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())), rpcqosversion, core::mem::transmute(securityqos.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcBindingInqAuthInfoExW(binding, serverprincname.unwrap_or(core::mem::zeroed()) as _, authnlevel.unwrap_or(core::mem::zeroed()) as _, authnsvc.unwrap_or(core::mem::zeroed()) as _, authidentity.unwrap_or(core::mem::zeroed()) as _, authzsvc.unwrap_or(core::mem::zeroed()) as _, rpcqosversion, securityqos.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { RpcBindingInqAuthInfoW(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()))) } + unsafe { RpcBindingInqAuthInfoW(binding, serverprincname.unwrap_or(core::mem::zeroed()) as _, authnlevel.unwrap_or(core::mem::zeroed()) as _, authnsvc.unwrap_or(core::mem::zeroed()) as _, authidentity.unwrap_or(core::mem::zeroed()) as _, authzsvc.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RpcBindingInqMaxCalls(binding: *const core::ffi::c_void, maxcalls: *mut u32) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcBindingInqMaxCalls(binding : *const core::ffi::c_void, maxcalls : *mut u32) -> RPC_STATUS); - unsafe { RpcBindingInqMaxCalls(binding, core::mem::transmute(maxcalls)) } + unsafe { RpcBindingInqMaxCalls(binding, maxcalls as _) } } #[inline] pub unsafe fn RpcBindingInqObject(binding: *const core::ffi::c_void, objectuuid: *mut windows_core::GUID) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcBindingInqObject(binding : *const core::ffi::c_void, objectuuid : *mut windows_core::GUID) -> RPC_STATUS); - unsafe { RpcBindingInqObject(binding, core::mem::transmute(objectuuid)) } + unsafe { RpcBindingInqObject(binding, objectuuid as _) } } #[inline] pub unsafe fn RpcBindingInqOption(hbinding: *const core::ffi::c_void, option: u32, poptionvalue: *mut usize) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcBindingInqOption(hbinding : *const core::ffi::c_void, option : u32, poptionvalue : *mut usize) -> RPC_STATUS); - unsafe { RpcBindingInqOption(hbinding, option, core::mem::transmute(poptionvalue)) } + unsafe { RpcBindingInqOption(hbinding, option, poptionvalue as _) } } #[inline] pub unsafe fn RpcBindingReset(binding: *const core::ffi::c_void) -> RPC_STATUS { @@ -1692,7 +1692,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); - unsafe { RpcBindingServerFromClient(core::mem::transmute(clientbinding.unwrap_or(core::mem::zeroed())), core::mem::transmute(serverbinding)) } + unsafe { RpcBindingServerFromClient(clientbinding.unwrap_or(core::mem::zeroed()) as _, serverbinding as _) } } #[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 @@ -1700,7 +1700,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); - unsafe { RpcBindingSetAuthInfoA(binding, serverprincname.param().abi(), authnlevel, authnsvc, core::mem::transmute(authidentity.unwrap_or(core::mem::zeroed())), authzsvc) } + unsafe { RpcBindingSetAuthInfoA(binding, serverprincname.param().abi(), authnlevel, authnsvc, authidentity.unwrap_or(core::mem::zeroed()) as _, authzsvc) } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -1709,7 +1709,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); - unsafe { RpcBindingSetAuthInfoExA(binding, serverprincname.param().abi(), authnlevel, authnsvc, core::mem::transmute(authidentity.unwrap_or(core::mem::zeroed())), authzsvc, core::mem::transmute(securityqos.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcBindingSetAuthInfoExA(binding, serverprincname.param().abi(), authnlevel, authnsvc, authidentity.unwrap_or(core::mem::zeroed()) as _, authzsvc, securityqos.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -1718,7 +1718,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); - unsafe { RpcBindingSetAuthInfoExW(binding, serverprincname.param().abi(), authnlevel, authnsvc, core::mem::transmute(authidentity.unwrap_or(core::mem::zeroed())), authzsvc, core::mem::transmute(securityqos.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcBindingSetAuthInfoExW(binding, serverprincname.param().abi(), authnlevel, authnsvc, authidentity.unwrap_or(core::mem::zeroed()) as _, authzsvc, securityqos.unwrap_or(core::mem::zeroed()) as _) } } #[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 @@ -1726,7 +1726,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); - unsafe { RpcBindingSetAuthInfoW(binding, serverprincname.param().abi(), authnlevel, authnsvc, core::mem::transmute(authidentity.unwrap_or(core::mem::zeroed())), authzsvc) } + unsafe { RpcBindingSetAuthInfoW(binding, serverprincname.param().abi(), authnlevel, authnsvc, authidentity.unwrap_or(core::mem::zeroed()) as _, authzsvc) } } #[inline] pub unsafe fn RpcBindingSetObject(binding: *const core::ffi::c_void, objectuuid: *const windows_core::GUID) -> RPC_STATUS { @@ -1741,12 +1741,12 @@ pub unsafe fn RpcBindingSetOption(hbinding: *const core::ffi::c_void, option: u3 #[inline] pub unsafe fn RpcBindingToStringBindingA(binding: *const core::ffi::c_void, stringbinding: *mut windows_core::PSTR) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcBindingToStringBindingA(binding : *const core::ffi::c_void, stringbinding : *mut windows_core::PSTR) -> RPC_STATUS); - unsafe { RpcBindingToStringBindingA(binding, core::mem::transmute(stringbinding)) } + unsafe { RpcBindingToStringBindingA(binding, stringbinding as _) } } #[inline] pub unsafe fn RpcBindingToStringBindingW(binding: *const core::ffi::c_void, stringbinding: *mut windows_core::PWSTR) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcBindingToStringBindingW(binding : *const core::ffi::c_void, stringbinding : *mut windows_core::PWSTR) -> RPC_STATUS); - unsafe { RpcBindingToStringBindingW(binding, core::mem::transmute(stringbinding)) } + unsafe { RpcBindingToStringBindingW(binding, stringbinding as _) } } #[inline] pub unsafe fn RpcBindingUnbind(binding: *const core::ffi::c_void) -> RPC_STATUS { @@ -1756,7 +1756,7 @@ pub unsafe fn RpcBindingUnbind(binding: *const core::ffi::c_void) -> RPC_STATUS #[inline] pub unsafe fn RpcBindingVectorFree(bindingvector: *mut *mut RPC_BINDING_VECTOR) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcBindingVectorFree(bindingvector : *mut *mut RPC_BINDING_VECTOR) -> RPC_STATUS); - unsafe { RpcBindingVectorFree(core::mem::transmute(bindingvector)) } + unsafe { RpcBindingVectorFree(bindingvector as _) } } #[inline] pub unsafe fn RpcCancelThread(thread: *const core::ffi::c_void) -> RPC_STATUS { @@ -1772,13 +1772,13 @@ pub unsafe fn RpcCancelThreadEx(thread: *const core::ffi::c_void, timeout: i32) #[inline] pub unsafe fn RpcCertGeneratePrincipalNameA(context: *const super::super::Security::Cryptography::CERT_CONTEXT, flags: u32, pbuffer: *mut windows_core::PSTR) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcCertGeneratePrincipalNameA(context : *const super::super::Security::Cryptography:: CERT_CONTEXT, flags : u32, pbuffer : *mut windows_core::PSTR) -> RPC_STATUS); - unsafe { RpcCertGeneratePrincipalNameA(context, flags, core::mem::transmute(pbuffer)) } + unsafe { RpcCertGeneratePrincipalNameA(context, flags, pbuffer as _) } } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] pub unsafe fn RpcCertGeneratePrincipalNameW(context: *const super::super::Security::Cryptography::CERT_CONTEXT, flags: u32, pbuffer: *mut windows_core::PWSTR) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcCertGeneratePrincipalNameW(context : *const super::super::Security::Cryptography:: CERT_CONTEXT, flags : u32, pbuffer : *mut windows_core::PWSTR) -> RPC_STATUS); - unsafe { RpcCertGeneratePrincipalNameW(context, flags, core::mem::transmute(pbuffer)) } + unsafe { RpcCertGeneratePrincipalNameW(context, flags, pbuffer as _) } } #[inline] pub unsafe fn RpcEpRegisterA(ifspec: *const core::ffi::c_void, bindingvector: *const RPC_BINDING_VECTOR, uuidvector: Option<*const UUID_VECTOR>, annotation: P3) -> RPC_STATUS @@ -1786,7 +1786,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); - unsafe { RpcEpRegisterA(ifspec, bindingvector, core::mem::transmute(uuidvector.unwrap_or(core::mem::zeroed())), annotation.param().abi()) } + unsafe { RpcEpRegisterA(ifspec, bindingvector, uuidvector.unwrap_or(core::mem::zeroed()) as _, 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 @@ -1794,7 +1794,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); - unsafe { RpcEpRegisterNoReplaceA(ifspec, bindingvector, core::mem::transmute(uuidvector.unwrap_or(core::mem::zeroed())), annotation.param().abi()) } + unsafe { RpcEpRegisterNoReplaceA(ifspec, bindingvector, uuidvector.unwrap_or(core::mem::zeroed()) as _, 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 @@ -1802,7 +1802,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); - unsafe { RpcEpRegisterNoReplaceW(ifspec, bindingvector, core::mem::transmute(uuidvector.unwrap_or(core::mem::zeroed())), annotation.param().abi()) } + unsafe { RpcEpRegisterNoReplaceW(ifspec, bindingvector, uuidvector.unwrap_or(core::mem::zeroed()) as _, 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 @@ -1810,7 +1810,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); - unsafe { RpcEpRegisterW(ifspec, bindingvector, core::mem::transmute(uuidvector.unwrap_or(core::mem::zeroed())), annotation.param().abi()) } + unsafe { RpcEpRegisterW(ifspec, bindingvector, uuidvector.unwrap_or(core::mem::zeroed()) as _, annotation.param().abi()) } } #[inline] pub unsafe fn RpcEpResolveBinding(binding: *const core::ffi::c_void, ifspec: *const core::ffi::c_void) -> RPC_STATUS { @@ -1820,7 +1820,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); - unsafe { RpcEpUnregister(ifspec, bindingvector, core::mem::transmute(uuidvector.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcEpUnregister(ifspec, bindingvector, uuidvector.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RpcErrorAddRecord(errorinfo: *const RPC_EXTENDED_ERROR_INFO) -> RPC_STATUS { @@ -1835,37 +1835,37 @@ pub unsafe fn RpcErrorClearInformation() { #[inline] pub unsafe fn RpcErrorEndEnumeration(enumhandle: *mut RPC_ERROR_ENUM_HANDLE) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcErrorEndEnumeration(enumhandle : *mut RPC_ERROR_ENUM_HANDLE) -> RPC_STATUS); - unsafe { RpcErrorEndEnumeration(core::mem::transmute(enumhandle)) } + unsafe { RpcErrorEndEnumeration(enumhandle as _) } } #[inline] pub unsafe fn RpcErrorGetNextRecord(enumhandle: *const RPC_ERROR_ENUM_HANDLE, copystrings: bool, errorinfo: *mut RPC_EXTENDED_ERROR_INFO) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcErrorGetNextRecord(enumhandle : *const RPC_ERROR_ENUM_HANDLE, copystrings : super::super::Foundation:: BOOL, errorinfo : *mut RPC_EXTENDED_ERROR_INFO) -> RPC_STATUS); - unsafe { RpcErrorGetNextRecord(enumhandle, copystrings.into(), core::mem::transmute(errorinfo)) } + unsafe { RpcErrorGetNextRecord(enumhandle, copystrings.into(), errorinfo as _) } } #[inline] pub unsafe fn RpcErrorGetNumberOfRecords(enumhandle: *const RPC_ERROR_ENUM_HANDLE, records: *mut i32) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcErrorGetNumberOfRecords(enumhandle : *const RPC_ERROR_ENUM_HANDLE, records : *mut i32) -> RPC_STATUS); - unsafe { RpcErrorGetNumberOfRecords(enumhandle, core::mem::transmute(records)) } + unsafe { RpcErrorGetNumberOfRecords(enumhandle, records as _) } } #[inline] pub unsafe fn RpcErrorLoadErrorInfo(errorblob: *const core::ffi::c_void, blobsize: usize, enumhandle: *mut RPC_ERROR_ENUM_HANDLE) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcErrorLoadErrorInfo(errorblob : *const core::ffi::c_void, blobsize : usize, enumhandle : *mut RPC_ERROR_ENUM_HANDLE) -> RPC_STATUS); - unsafe { RpcErrorLoadErrorInfo(errorblob, blobsize, core::mem::transmute(enumhandle)) } + unsafe { RpcErrorLoadErrorInfo(errorblob, blobsize, enumhandle as _) } } #[inline] pub unsafe fn RpcErrorResetEnumeration(enumhandle: *mut RPC_ERROR_ENUM_HANDLE) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcErrorResetEnumeration(enumhandle : *mut RPC_ERROR_ENUM_HANDLE) -> RPC_STATUS); - unsafe { RpcErrorResetEnumeration(core::mem::transmute(enumhandle)) } + unsafe { RpcErrorResetEnumeration(enumhandle as _) } } #[inline] pub unsafe fn RpcErrorSaveErrorInfo(enumhandle: *const RPC_ERROR_ENUM_HANDLE, errorblob: *mut *mut core::ffi::c_void, blobsize: *mut usize) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcErrorSaveErrorInfo(enumhandle : *const RPC_ERROR_ENUM_HANDLE, errorblob : *mut *mut core::ffi::c_void, blobsize : *mut usize) -> RPC_STATUS); - unsafe { RpcErrorSaveErrorInfo(enumhandle, core::mem::transmute(errorblob), core::mem::transmute(blobsize)) } + unsafe { RpcErrorSaveErrorInfo(enumhandle, errorblob as _, blobsize as _) } } #[inline] pub unsafe fn RpcErrorStartEnumeration(enumhandle: *mut RPC_ERROR_ENUM_HANDLE) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcErrorStartEnumeration(enumhandle : *mut RPC_ERROR_ENUM_HANDLE) -> RPC_STATUS); - unsafe { RpcErrorStartEnumeration(core::mem::transmute(enumhandle)) } + unsafe { RpcErrorStartEnumeration(enumhandle as _) } } #[inline] pub unsafe fn RpcExceptionFilter(exceptioncode: u32) -> i32 { @@ -1875,37 +1875,37 @@ pub unsafe fn RpcExceptionFilter(exceptioncode: u32) -> i32 { #[inline] pub unsafe fn RpcFreeAuthorizationContext(pauthzclientcontext: *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcFreeAuthorizationContext(pauthzclientcontext : *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { RpcFreeAuthorizationContext(core::mem::transmute(pauthzclientcontext)) } + unsafe { RpcFreeAuthorizationContext(pauthzclientcontext as _) } } #[inline] pub unsafe fn RpcGetAuthorizationContextForClient(clientbinding: Option<*const core::ffi::c_void>, impersonateonreturn: bool, reserved1: Option<*const core::ffi::c_void>, pexpirationtime: Option<*const i64>, reserved2: super::super::Foundation::LUID, reserved3: u32, reserved4: Option<*const core::ffi::c_void>, pauthzclientcontext: *mut *mut core::ffi::c_void) -> RPC_STATUS { 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); - unsafe { RpcGetAuthorizationContextForClient(core::mem::transmute(clientbinding.unwrap_or(core::mem::zeroed())), impersonateonreturn.into(), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(pexpirationtime.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2), reserved3, core::mem::transmute(reserved4.unwrap_or(core::mem::zeroed())), core::mem::transmute(pauthzclientcontext)) } + unsafe { RpcGetAuthorizationContextForClient(clientbinding.unwrap_or(core::mem::zeroed()) as _, impersonateonreturn.into(), reserved1.unwrap_or(core::mem::zeroed()) as _, pexpirationtime.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(reserved2), reserved3, reserved4.unwrap_or(core::mem::zeroed()) as _, pauthzclientcontext as _) } } #[inline] pub unsafe fn RpcIfIdVectorFree(ifidvector: *mut *mut RPC_IF_ID_VECTOR) -> RPC_STATUS { windows_targets::link!("rpcns4.dll" "system" fn RpcIfIdVectorFree(ifidvector : *mut *mut RPC_IF_ID_VECTOR) -> RPC_STATUS); - unsafe { RpcIfIdVectorFree(core::mem::transmute(ifidvector)) } + unsafe { RpcIfIdVectorFree(ifidvector as _) } } #[inline] pub unsafe fn RpcIfInqId(rpcifhandle: *const core::ffi::c_void, rpcifid: *mut RPC_IF_ID) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcIfInqId(rpcifhandle : *const core::ffi::c_void, rpcifid : *mut RPC_IF_ID) -> RPC_STATUS); - unsafe { RpcIfInqId(rpcifhandle, core::mem::transmute(rpcifid)) } + unsafe { RpcIfInqId(rpcifhandle, rpcifid as _) } } #[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); - unsafe { RpcImpersonateClient(core::mem::transmute(bindinghandle.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcImpersonateClient(bindinghandle.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { RpcImpersonateClient2(core::mem::transmute(bindinghandle.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcImpersonateClient2(bindinghandle.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { RpcImpersonateClientContainer(core::mem::transmute(bindinghandle.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcImpersonateClientContainer(bindinghandle.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RpcMgmtEnableIdleCleanup() -> RPC_STATUS { @@ -1915,62 +1915,62 @@ pub unsafe fn RpcMgmtEnableIdleCleanup() -> RPC_STATUS { #[inline] pub unsafe fn RpcMgmtEpEltInqBegin(epbinding: Option<*const core::ffi::c_void>, inquirytype: u32, ifid: Option<*const RPC_IF_ID>, versoption: 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); - unsafe { RpcMgmtEpEltInqBegin(core::mem::transmute(epbinding.unwrap_or(core::mem::zeroed())), 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)) } + unsafe { RpcMgmtEpEltInqBegin(epbinding.unwrap_or(core::mem::zeroed()) as _, inquirytype, ifid.unwrap_or(core::mem::zeroed()) as _, versoption.unwrap_or(core::mem::zeroed()) as _, objectuuid.unwrap_or(core::mem::zeroed()) as _, inquirycontext as _) } } #[inline] pub unsafe fn RpcMgmtEpEltInqDone(inquirycontext: *mut *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcMgmtEpEltInqDone(inquirycontext : *mut *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { RpcMgmtEpEltInqDone(core::mem::transmute(inquirycontext)) } + unsafe { RpcMgmtEpEltInqDone(inquirycontext as _) } } #[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); - unsafe { RpcMgmtEpEltInqNextA(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()))) } + unsafe { RpcMgmtEpEltInqNextA(inquirycontext, ifid as _, binding.unwrap_or(core::mem::zeroed()) as _, objectuuid.unwrap_or(core::mem::zeroed()) as _, annotation.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { RpcMgmtEpEltInqNextW(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()))) } + unsafe { RpcMgmtEpEltInqNextW(inquirycontext, ifid as _, binding.unwrap_or(core::mem::zeroed()) as _, objectuuid.unwrap_or(core::mem::zeroed()) as _, annotation.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { RpcMgmtEpUnregister(core::mem::transmute(epbinding.unwrap_or(core::mem::zeroed())), ifid, binding, core::mem::transmute(objectuuid.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcMgmtEpUnregister(epbinding.unwrap_or(core::mem::zeroed()) as _, ifid, binding, objectuuid.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RpcMgmtInqComTimeout(binding: *const core::ffi::c_void, timeout: *mut u32) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcMgmtInqComTimeout(binding : *const core::ffi::c_void, timeout : *mut u32) -> RPC_STATUS); - unsafe { RpcMgmtInqComTimeout(binding, core::mem::transmute(timeout)) } + unsafe { RpcMgmtInqComTimeout(binding, timeout as _) } } #[inline] pub unsafe fn RpcMgmtInqDefaultProtectLevel(authnsvc: u32, authnlevel: *mut u32) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcMgmtInqDefaultProtectLevel(authnsvc : u32, authnlevel : *mut u32) -> RPC_STATUS); - unsafe { RpcMgmtInqDefaultProtectLevel(authnsvc, core::mem::transmute(authnlevel)) } + unsafe { RpcMgmtInqDefaultProtectLevel(authnsvc, authnlevel as _) } } #[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); - unsafe { RpcMgmtInqIfIds(core::mem::transmute(binding.unwrap_or(core::mem::zeroed())), core::mem::transmute(ifidvector)) } + unsafe { RpcMgmtInqIfIds(binding.unwrap_or(core::mem::zeroed()) as _, ifidvector as _) } } #[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); - unsafe { RpcMgmtInqServerPrincNameA(core::mem::transmute(binding.unwrap_or(core::mem::zeroed())), authnsvc, core::mem::transmute(serverprincname)) } + unsafe { RpcMgmtInqServerPrincNameA(binding.unwrap_or(core::mem::zeroed()) as _, authnsvc, serverprincname as _) } } #[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); - unsafe { RpcMgmtInqServerPrincNameW(core::mem::transmute(binding.unwrap_or(core::mem::zeroed())), authnsvc, core::mem::transmute(serverprincname)) } + unsafe { RpcMgmtInqServerPrincNameW(binding.unwrap_or(core::mem::zeroed()) as _, authnsvc, serverprincname as _) } } #[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); - unsafe { RpcMgmtInqStats(core::mem::transmute(binding.unwrap_or(core::mem::zeroed())), core::mem::transmute(statistics)) } + unsafe { RpcMgmtInqStats(binding.unwrap_or(core::mem::zeroed()) as _, statistics as _) } } #[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); - unsafe { RpcMgmtIsServerListening(core::mem::transmute(binding.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcMgmtIsServerListening(binding.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RpcMgmtSetAuthorizationFn(authorizationfn: RPC_MGMT_AUTHORIZATION_FN) -> RPC_STATUS { @@ -1995,12 +1995,12 @@ pub unsafe fn RpcMgmtSetServerStackSize(threadstacksize: u32) -> RPC_STATUS { #[inline] pub unsafe fn RpcMgmtStatsVectorFree(statsvector: *mut *mut RPC_STATS_VECTOR) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcMgmtStatsVectorFree(statsvector : *mut *mut RPC_STATS_VECTOR) -> RPC_STATUS); - unsafe { RpcMgmtStatsVectorFree(core::mem::transmute(statsvector)) } + unsafe { RpcMgmtStatsVectorFree(statsvector as _) } } #[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); - unsafe { RpcMgmtStopServerListening(core::mem::transmute(binding.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcMgmtStopServerListening(binding.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RpcMgmtWaitServerListen() -> RPC_STATUS { @@ -2010,12 +2010,12 @@ pub unsafe fn RpcMgmtWaitServerListen() -> RPC_STATUS { #[inline] pub unsafe fn RpcNetworkInqProtseqsA(protseqvector: *mut *mut RPC_PROTSEQ_VECTORA) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcNetworkInqProtseqsA(protseqvector : *mut *mut RPC_PROTSEQ_VECTORA) -> RPC_STATUS); - unsafe { RpcNetworkInqProtseqsA(core::mem::transmute(protseqvector)) } + unsafe { RpcNetworkInqProtseqsA(protseqvector as _) } } #[inline] pub unsafe fn RpcNetworkInqProtseqsW(protseqvector: *mut *mut RPC_PROTSEQ_VECTORW) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcNetworkInqProtseqsW(protseqvector : *mut *mut RPC_PROTSEQ_VECTORW) -> RPC_STATUS); - unsafe { RpcNetworkInqProtseqsW(core::mem::transmute(protseqvector)) } + unsafe { RpcNetworkInqProtseqsW(protseqvector as _) } } #[inline] pub unsafe fn RpcNetworkIsProtseqValidA(protseq: P0) -> RPC_STATUS @@ -2039,7 +2039,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); - unsafe { RpcNsBindingExportA(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()))) } + unsafe { RpcNsBindingExportA(entrynamesyntax, entryname.param().abi(), ifspec.unwrap_or(core::mem::zeroed()) as _, bindingvec.unwrap_or(core::mem::zeroed()) as _, objectuuidvec.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RpcNsBindingExportPnPA(entrynamesyntax: u32, entryname: P1, ifspec: Option<*const core::ffi::c_void>, objectvector: Option<*const UUID_VECTOR>) -> RPC_STATUS @@ -2047,7 +2047,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); - unsafe { RpcNsBindingExportPnPA(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::mem::zeroed())), core::mem::transmute(objectvector.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcNsBindingExportPnPA(entrynamesyntax, entryname.param().abi(), ifspec.unwrap_or(core::mem::zeroed()) as _, objectvector.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RpcNsBindingExportPnPW(entrynamesyntax: u32, entryname: P1, ifspec: Option<*const core::ffi::c_void>, objectvector: Option<*const UUID_VECTOR>) -> RPC_STATUS @@ -2055,7 +2055,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); - unsafe { RpcNsBindingExportPnPW(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::mem::zeroed())), core::mem::transmute(objectvector.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcNsBindingExportPnPW(entrynamesyntax, entryname.param().abi(), ifspec.unwrap_or(core::mem::zeroed()) as _, objectvector.unwrap_or(core::mem::zeroed()) as _) } } #[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 @@ -2063,7 +2063,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); - unsafe { RpcNsBindingExportW(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()))) } + unsafe { RpcNsBindingExportW(entrynamesyntax, entryname.param().abi(), ifspec.unwrap_or(core::mem::zeroed()) as _, bindingvec.unwrap_or(core::mem::zeroed()) as _, objectuuidvec.unwrap_or(core::mem::zeroed()) as _) } } #[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 @@ -2071,7 +2071,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); - unsafe { RpcNsBindingImportBeginA(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)) } + unsafe { RpcNsBindingImportBeginA(entrynamesyntax, entryname.param().abi(), ifspec.unwrap_or(core::mem::zeroed()) as _, objuuid.unwrap_or(core::mem::zeroed()) as _, importcontext as _) } } #[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 @@ -2079,27 +2079,27 @@ 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); - unsafe { RpcNsBindingImportBeginW(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)) } + unsafe { RpcNsBindingImportBeginW(entrynamesyntax, entryname.param().abi(), ifspec.unwrap_or(core::mem::zeroed()) as _, objuuid.unwrap_or(core::mem::zeroed()) as _, importcontext as _) } } #[inline] pub unsafe fn RpcNsBindingImportDone(importcontext: *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcns4.dll" "system" fn RpcNsBindingImportDone(importcontext : *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { RpcNsBindingImportDone(core::mem::transmute(importcontext)) } + unsafe { RpcNsBindingImportDone(importcontext as _) } } #[inline] pub unsafe fn RpcNsBindingImportNext(importcontext: *mut core::ffi::c_void, binding: *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcns4.dll" "system" fn RpcNsBindingImportNext(importcontext : *mut core::ffi::c_void, binding : *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { RpcNsBindingImportNext(core::mem::transmute(importcontext), core::mem::transmute(binding)) } + unsafe { RpcNsBindingImportNext(importcontext as _, binding as _) } } #[inline] pub unsafe fn RpcNsBindingInqEntryNameA(binding: *const core::ffi::c_void, entrynamesyntax: u32, entryname: *mut windows_core::PSTR) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcNsBindingInqEntryNameA(binding : *const core::ffi::c_void, entrynamesyntax : u32, entryname : *mut windows_core::PSTR) -> RPC_STATUS); - unsafe { RpcNsBindingInqEntryNameA(binding, entrynamesyntax, core::mem::transmute(entryname)) } + unsafe { RpcNsBindingInqEntryNameA(binding, entrynamesyntax, entryname as _) } } #[inline] pub unsafe fn RpcNsBindingInqEntryNameW(binding: *const core::ffi::c_void, entrynamesyntax: u32, entryname: *mut windows_core::PWSTR) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcNsBindingInqEntryNameW(binding : *const core::ffi::c_void, entrynamesyntax : u32, entryname : *mut windows_core::PWSTR) -> RPC_STATUS); - unsafe { RpcNsBindingInqEntryNameW(binding, entrynamesyntax, core::mem::transmute(entryname)) } + unsafe { RpcNsBindingInqEntryNameW(binding, entrynamesyntax, entryname as _) } } #[inline] pub unsafe fn RpcNsBindingLookupBeginA(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 @@ -2107,7 +2107,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); - unsafe { RpcNsBindingLookupBeginA(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::mem::zeroed())), core::mem::transmute(objuuid.unwrap_or(core::mem::zeroed())), bindingmaxcount, core::mem::transmute(lookupcontext)) } + unsafe { RpcNsBindingLookupBeginA(entrynamesyntax, entryname.param().abi(), ifspec.unwrap_or(core::mem::zeroed()) as _, objuuid.unwrap_or(core::mem::zeroed()) as _, bindingmaxcount, lookupcontext as _) } } #[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 @@ -2115,22 +2115,22 @@ 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); - unsafe { RpcNsBindingLookupBeginW(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::mem::zeroed())), core::mem::transmute(objuuid.unwrap_or(core::mem::zeroed())), bindingmaxcount, core::mem::transmute(lookupcontext)) } + unsafe { RpcNsBindingLookupBeginW(entrynamesyntax, entryname.param().abi(), ifspec.unwrap_or(core::mem::zeroed()) as _, objuuid.unwrap_or(core::mem::zeroed()) as _, bindingmaxcount, lookupcontext as _) } } #[inline] pub unsafe fn RpcNsBindingLookupDone(lookupcontext: *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcns4.dll" "system" fn RpcNsBindingLookupDone(lookupcontext : *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { RpcNsBindingLookupDone(core::mem::transmute(lookupcontext)) } + unsafe { RpcNsBindingLookupDone(lookupcontext as _) } } #[inline] pub unsafe fn RpcNsBindingLookupNext(lookupcontext: *mut core::ffi::c_void, bindingvec: *mut *mut RPC_BINDING_VECTOR) -> RPC_STATUS { windows_targets::link!("rpcns4.dll" "system" fn RpcNsBindingLookupNext(lookupcontext : *mut core::ffi::c_void, bindingvec : *mut *mut RPC_BINDING_VECTOR) -> RPC_STATUS); - unsafe { RpcNsBindingLookupNext(core::mem::transmute(lookupcontext), core::mem::transmute(bindingvec)) } + unsafe { RpcNsBindingLookupNext(lookupcontext as _, bindingvec as _) } } #[inline] pub unsafe fn RpcNsBindingSelect(bindingvec: *mut RPC_BINDING_VECTOR, binding: *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcns4.dll" "system" fn RpcNsBindingSelect(bindingvec : *mut RPC_BINDING_VECTOR, binding : *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { RpcNsBindingSelect(core::mem::transmute(bindingvec), core::mem::transmute(binding)) } + unsafe { RpcNsBindingSelect(bindingvec as _, binding as _) } } #[inline] pub unsafe fn RpcNsBindingUnexportA(entrynamesyntax: u32, entryname: P1, ifspec: Option<*const core::ffi::c_void>, objectuuidvec: Option<*const UUID_VECTOR>) -> RPC_STATUS @@ -2138,7 +2138,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); - unsafe { RpcNsBindingUnexportA(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::mem::zeroed())), core::mem::transmute(objectuuidvec.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcNsBindingUnexportA(entrynamesyntax, entryname.param().abi(), ifspec.unwrap_or(core::mem::zeroed()) as _, objectuuidvec.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RpcNsBindingUnexportPnPA(entrynamesyntax: u32, entryname: P1, ifspec: Option<*const core::ffi::c_void>, objectvector: Option<*const UUID_VECTOR>) -> RPC_STATUS @@ -2146,7 +2146,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); - unsafe { RpcNsBindingUnexportPnPA(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::mem::zeroed())), core::mem::transmute(objectvector.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcNsBindingUnexportPnPA(entrynamesyntax, entryname.param().abi(), ifspec.unwrap_or(core::mem::zeroed()) as _, objectvector.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RpcNsBindingUnexportPnPW(entrynamesyntax: u32, entryname: P1, ifspec: Option<*const core::ffi::c_void>, objectvector: Option<*const UUID_VECTOR>) -> RPC_STATUS @@ -2154,7 +2154,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); - unsafe { RpcNsBindingUnexportPnPW(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::mem::zeroed())), core::mem::transmute(objectvector.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcNsBindingUnexportPnPW(entrynamesyntax, entryname.param().abi(), ifspec.unwrap_or(core::mem::zeroed()) as _, objectvector.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RpcNsBindingUnexportW(entrynamesyntax: u32, entryname: P1, ifspec: Option<*const core::ffi::c_void>, objectuuidvec: Option<*const UUID_VECTOR>) -> RPC_STATUS @@ -2162,7 +2162,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); - unsafe { RpcNsBindingUnexportW(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::mem::zeroed())), core::mem::transmute(objectuuidvec.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcNsBindingUnexportW(entrynamesyntax, entryname.param().abi(), ifspec.unwrap_or(core::mem::zeroed()) as _, objectuuidvec.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RpcNsEntryExpandNameA(entrynamesyntax: u32, entryname: P1, expandedname: *mut windows_core::PSTR) -> RPC_STATUS @@ -2170,7 +2170,7 @@ where P1: windows_core::Param, { windows_targets::link!("rpcns4.dll" "system" fn RpcNsEntryExpandNameA(entrynamesyntax : u32, entryname : windows_core::PCSTR, expandedname : *mut windows_core::PSTR) -> RPC_STATUS); - unsafe { RpcNsEntryExpandNameA(entrynamesyntax, entryname.param().abi(), core::mem::transmute(expandedname)) } + unsafe { RpcNsEntryExpandNameA(entrynamesyntax, entryname.param().abi(), expandedname as _) } } #[inline] pub unsafe fn RpcNsEntryExpandNameW(entrynamesyntax: u32, entryname: P1, expandedname: *mut windows_core::PWSTR) -> RPC_STATUS @@ -2178,7 +2178,7 @@ where P1: windows_core::Param, { windows_targets::link!("rpcns4.dll" "system" fn RpcNsEntryExpandNameW(entrynamesyntax : u32, entryname : windows_core::PCWSTR, expandedname : *mut windows_core::PWSTR) -> RPC_STATUS); - unsafe { RpcNsEntryExpandNameW(entrynamesyntax, entryname.param().abi(), core::mem::transmute(expandedname)) } + unsafe { RpcNsEntryExpandNameW(entrynamesyntax, entryname.param().abi(), expandedname as _) } } #[inline] pub unsafe fn RpcNsEntryObjectInqBeginA(entrynamesyntax: u32, entryname: P1, inquirycontext: *mut *mut core::ffi::c_void) -> RPC_STATUS @@ -2186,7 +2186,7 @@ where P1: windows_core::Param, { windows_targets::link!("rpcns4.dll" "system" fn RpcNsEntryObjectInqBeginA(entrynamesyntax : u32, entryname : windows_core::PCSTR, inquirycontext : *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { RpcNsEntryObjectInqBeginA(entrynamesyntax, entryname.param().abi(), core::mem::transmute(inquirycontext)) } + unsafe { RpcNsEntryObjectInqBeginA(entrynamesyntax, entryname.param().abi(), inquirycontext as _) } } #[inline] pub unsafe fn RpcNsEntryObjectInqBeginW(entrynamesyntax: u32, entryname: P1, inquirycontext: *mut *mut core::ffi::c_void) -> RPC_STATUS @@ -2194,17 +2194,17 @@ where P1: windows_core::Param, { windows_targets::link!("rpcns4.dll" "system" fn RpcNsEntryObjectInqBeginW(entrynamesyntax : u32, entryname : windows_core::PCWSTR, inquirycontext : *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { RpcNsEntryObjectInqBeginW(entrynamesyntax, entryname.param().abi(), core::mem::transmute(inquirycontext)) } + unsafe { RpcNsEntryObjectInqBeginW(entrynamesyntax, entryname.param().abi(), inquirycontext as _) } } #[inline] pub unsafe fn RpcNsEntryObjectInqDone(inquirycontext: *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcns4.dll" "system" fn RpcNsEntryObjectInqDone(inquirycontext : *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { RpcNsEntryObjectInqDone(core::mem::transmute(inquirycontext)) } + unsafe { RpcNsEntryObjectInqDone(inquirycontext as _) } } #[inline] pub unsafe fn RpcNsEntryObjectInqNext(inquirycontext: *mut core::ffi::c_void, objuuid: *mut windows_core::GUID) -> RPC_STATUS { windows_targets::link!("rpcns4.dll" "system" fn RpcNsEntryObjectInqNext(inquirycontext : *mut core::ffi::c_void, objuuid : *mut windows_core::GUID) -> RPC_STATUS); - unsafe { RpcNsEntryObjectInqNext(core::mem::transmute(inquirycontext), core::mem::transmute(objuuid)) } + unsafe { RpcNsEntryObjectInqNext(inquirycontext as _, objuuid as _) } } #[inline] pub unsafe fn RpcNsGroupDeleteA(groupnamesyntax: GROUP_NAME_SYNTAX, groupname: P1) -> RPC_STATUS @@ -2246,7 +2246,7 @@ where P1: windows_core::Param, { windows_targets::link!("rpcns4.dll" "system" fn RpcNsGroupMbrInqBeginA(groupnamesyntax : u32, groupname : windows_core::PCSTR, membernamesyntax : u32, inquirycontext : *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { RpcNsGroupMbrInqBeginA(groupnamesyntax, groupname.param().abi(), membernamesyntax, core::mem::transmute(inquirycontext)) } + unsafe { RpcNsGroupMbrInqBeginA(groupnamesyntax, groupname.param().abi(), membernamesyntax, inquirycontext as _) } } #[inline] pub unsafe fn RpcNsGroupMbrInqBeginW(groupnamesyntax: u32, groupname: P1, membernamesyntax: u32, inquirycontext: *mut *mut core::ffi::c_void) -> RPC_STATUS @@ -2254,22 +2254,22 @@ where P1: windows_core::Param, { windows_targets::link!("rpcns4.dll" "system" fn RpcNsGroupMbrInqBeginW(groupnamesyntax : u32, groupname : windows_core::PCWSTR, membernamesyntax : u32, inquirycontext : *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { RpcNsGroupMbrInqBeginW(groupnamesyntax, groupname.param().abi(), membernamesyntax, core::mem::transmute(inquirycontext)) } + unsafe { RpcNsGroupMbrInqBeginW(groupnamesyntax, groupname.param().abi(), membernamesyntax, inquirycontext as _) } } #[inline] pub unsafe fn RpcNsGroupMbrInqDone(inquirycontext: *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcns4.dll" "system" fn RpcNsGroupMbrInqDone(inquirycontext : *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { RpcNsGroupMbrInqDone(core::mem::transmute(inquirycontext)) } + unsafe { RpcNsGroupMbrInqDone(inquirycontext as _) } } #[inline] pub unsafe fn RpcNsGroupMbrInqNextA(inquirycontext: *mut core::ffi::c_void, membername: *mut windows_core::PSTR) -> RPC_STATUS { windows_targets::link!("rpcns4.dll" "system" fn RpcNsGroupMbrInqNextA(inquirycontext : *mut core::ffi::c_void, membername : *mut windows_core::PSTR) -> RPC_STATUS); - unsafe { RpcNsGroupMbrInqNextA(core::mem::transmute(inquirycontext), core::mem::transmute(membername)) } + unsafe { RpcNsGroupMbrInqNextA(inquirycontext as _, membername as _) } } #[inline] pub unsafe fn RpcNsGroupMbrInqNextW(inquirycontext: *mut core::ffi::c_void, membername: *mut windows_core::PWSTR) -> RPC_STATUS { windows_targets::link!("rpcns4.dll" "system" fn RpcNsGroupMbrInqNextW(inquirycontext : *mut core::ffi::c_void, membername : *mut windows_core::PWSTR) -> RPC_STATUS); - unsafe { RpcNsGroupMbrInqNextW(core::mem::transmute(inquirycontext), core::mem::transmute(membername)) } + unsafe { RpcNsGroupMbrInqNextW(inquirycontext as _, membername as _) } } #[inline] pub unsafe fn RpcNsGroupMbrRemoveA(groupnamesyntax: u32, groupname: P1, membernamesyntax: u32, membername: P3) -> RPC_STATUS @@ -2295,7 +2295,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); - unsafe { RpcNsMgmtBindingUnexportA(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifid.unwrap_or(core::mem::zeroed())), versoption, core::mem::transmute(objectuuidvec.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcNsMgmtBindingUnexportA(entrynamesyntax, entryname.param().abi(), ifid.unwrap_or(core::mem::zeroed()) as _, versoption, objectuuidvec.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RpcNsMgmtBindingUnexportW(entrynamesyntax: u32, entryname: P1, ifid: Option<*const RPC_IF_ID>, versoption: u32, objectuuidvec: Option<*const UUID_VECTOR>) -> RPC_STATUS @@ -2303,7 +2303,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); - unsafe { RpcNsMgmtBindingUnexportW(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifid.unwrap_or(core::mem::zeroed())), versoption, core::mem::transmute(objectuuidvec.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcNsMgmtBindingUnexportW(entrynamesyntax, entryname.param().abi(), ifid.unwrap_or(core::mem::zeroed()) as _, versoption, objectuuidvec.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RpcNsMgmtEntryCreateA(entrynamesyntax: u32, entryname: P1) -> RPC_STATUS @@ -2343,7 +2343,7 @@ where P1: windows_core::Param, { windows_targets::link!("rpcns4.dll" "system" fn RpcNsMgmtEntryInqIfIdsA(entrynamesyntax : u32, entryname : windows_core::PCSTR, ifidvec : *mut *mut RPC_IF_ID_VECTOR) -> RPC_STATUS); - unsafe { RpcNsMgmtEntryInqIfIdsA(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifidvec)) } + unsafe { RpcNsMgmtEntryInqIfIdsA(entrynamesyntax, entryname.param().abi(), ifidvec as _) } } #[inline] pub unsafe fn RpcNsMgmtEntryInqIfIdsW(entrynamesyntax: u32, entryname: P1, ifidvec: *mut *mut RPC_IF_ID_VECTOR) -> RPC_STATUS @@ -2351,17 +2351,17 @@ where P1: windows_core::Param, { windows_targets::link!("rpcns4.dll" "system" fn RpcNsMgmtEntryInqIfIdsW(entrynamesyntax : u32, entryname : windows_core::PCWSTR, ifidvec : *mut *mut RPC_IF_ID_VECTOR) -> RPC_STATUS); - unsafe { RpcNsMgmtEntryInqIfIdsW(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifidvec)) } + unsafe { RpcNsMgmtEntryInqIfIdsW(entrynamesyntax, entryname.param().abi(), ifidvec as _) } } #[inline] pub unsafe fn RpcNsMgmtHandleSetExpAge(nshandle: *mut core::ffi::c_void, expirationage: u32) -> RPC_STATUS { windows_targets::link!("rpcns4.dll" "system" fn RpcNsMgmtHandleSetExpAge(nshandle : *mut core::ffi::c_void, expirationage : u32) -> RPC_STATUS); - unsafe { RpcNsMgmtHandleSetExpAge(core::mem::transmute(nshandle), expirationage) } + unsafe { RpcNsMgmtHandleSetExpAge(nshandle as _, expirationage) } } #[inline] pub unsafe fn RpcNsMgmtInqExpAge(expirationage: *mut u32) -> RPC_STATUS { windows_targets::link!("rpcns4.dll" "system" fn RpcNsMgmtInqExpAge(expirationage : *mut u32) -> RPC_STATUS); - unsafe { RpcNsMgmtInqExpAge(core::mem::transmute(expirationage)) } + unsafe { RpcNsMgmtInqExpAge(expirationage as _) } } #[inline] pub unsafe fn RpcNsMgmtSetExpAge(expirationage: u32) -> RPC_STATUS { @@ -2392,7 +2392,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); - unsafe { RpcNsProfileEltAddA(profilenamesyntax, profilename.param().abi(), core::mem::transmute(ifid.unwrap_or(core::mem::zeroed())), membernamesyntax, membername.param().abi(), priority, annotation.param().abi()) } + unsafe { RpcNsProfileEltAddA(profilenamesyntax, profilename.param().abi(), ifid.unwrap_or(core::mem::zeroed()) as _, membernamesyntax, membername.param().abi(), 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 @@ -2402,7 +2402,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); - unsafe { RpcNsProfileEltAddW(profilenamesyntax, profilename.param().abi(), core::mem::transmute(ifid.unwrap_or(core::mem::zeroed())), membernamesyntax, membername.param().abi(), priority, annotation.param().abi()) } + unsafe { RpcNsProfileEltAddW(profilenamesyntax, profilename.param().abi(), ifid.unwrap_or(core::mem::zeroed()) as _, membernamesyntax, membername.param().abi(), 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 @@ -2411,7 +2411,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); - unsafe { RpcNsProfileEltInqBeginA(profilenamesyntax, profilename.param().abi(), inquirytype, core::mem::transmute(ifid.unwrap_or(core::mem::zeroed())), versoption, membernamesyntax, membername.param().abi(), core::mem::transmute(inquirycontext)) } + unsafe { RpcNsProfileEltInqBeginA(profilenamesyntax, profilename.param().abi(), inquirytype, ifid.unwrap_or(core::mem::zeroed()) as _, versoption, membernamesyntax, membername.param().abi(), inquirycontext as _) } } #[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 @@ -2420,22 +2420,22 @@ 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); - unsafe { RpcNsProfileEltInqBeginW(profilenamesyntax, profilename.param().abi(), inquirytype, core::mem::transmute(ifid.unwrap_or(core::mem::zeroed())), versoption, membernamesyntax, membername.param().abi(), core::mem::transmute(inquirycontext)) } + unsafe { RpcNsProfileEltInqBeginW(profilenamesyntax, profilename.param().abi(), inquirytype, ifid.unwrap_or(core::mem::zeroed()) as _, versoption, membernamesyntax, membername.param().abi(), inquirycontext as _) } } #[inline] pub unsafe fn RpcNsProfileEltInqDone(inquirycontext: *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcns4.dll" "system" fn RpcNsProfileEltInqDone(inquirycontext : *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { RpcNsProfileEltInqDone(core::mem::transmute(inquirycontext)) } + unsafe { RpcNsProfileEltInqDone(inquirycontext as _) } } #[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); - unsafe { RpcNsProfileEltInqNextA(inquirycontext, core::mem::transmute(ifid.unwrap_or(core::mem::zeroed())), core::mem::transmute(membername), core::mem::transmute(priority), core::mem::transmute(annotation)) } + unsafe { RpcNsProfileEltInqNextA(inquirycontext, ifid.unwrap_or(core::mem::zeroed()) as _, membername as _, priority as _, annotation as _) } } #[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); - unsafe { RpcNsProfileEltInqNextW(inquirycontext, core::mem::transmute(ifid.unwrap_or(core::mem::zeroed())), core::mem::transmute(membername), core::mem::transmute(priority), core::mem::transmute(annotation)) } + unsafe { RpcNsProfileEltInqNextW(inquirycontext, ifid.unwrap_or(core::mem::zeroed()) as _, membername as _, priority as _, annotation as _) } } #[inline] pub unsafe fn RpcNsProfileEltRemoveA(profilenamesyntax: u32, profilename: P1, ifid: Option<*const RPC_IF_ID>, membernamesyntax: u32, membername: P4) -> RPC_STATUS @@ -2444,7 +2444,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); - unsafe { RpcNsProfileEltRemoveA(profilenamesyntax, profilename.param().abi(), core::mem::transmute(ifid.unwrap_or(core::mem::zeroed())), membernamesyntax, membername.param().abi()) } + unsafe { RpcNsProfileEltRemoveA(profilenamesyntax, profilename.param().abi(), ifid.unwrap_or(core::mem::zeroed()) as _, 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 @@ -2453,12 +2453,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); - unsafe { RpcNsProfileEltRemoveW(profilenamesyntax, profilename.param().abi(), core::mem::transmute(ifid.unwrap_or(core::mem::zeroed())), membernamesyntax, membername.param().abi()) } + unsafe { RpcNsProfileEltRemoveW(profilenamesyntax, profilename.param().abi(), ifid.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { RpcObjectInqType(objuuid, core::mem::transmute(typeuuid.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcObjectInqType(objuuid, typeuuid.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RpcObjectSetInqFn(inquiryfn: RPC_OBJECT_INQ_FN) -> RPC_STATUS { @@ -2468,17 +2468,17 @@ 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); - unsafe { RpcObjectSetType(objuuid, core::mem::transmute(typeuuid.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcObjectSetType(objuuid, typeuuid.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RpcProtseqVectorFreeA(protseqvector: *mut *mut RPC_PROTSEQ_VECTORA) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcProtseqVectorFreeA(protseqvector : *mut *mut RPC_PROTSEQ_VECTORA) -> RPC_STATUS); - unsafe { RpcProtseqVectorFreeA(core::mem::transmute(protseqvector)) } + unsafe { RpcProtseqVectorFreeA(protseqvector as _) } } #[inline] pub unsafe fn RpcProtseqVectorFreeW(protseqvector: *mut *mut RPC_PROTSEQ_VECTORW) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcProtseqVectorFreeW(protseqvector : *mut *mut RPC_PROTSEQ_VECTORW) -> RPC_STATUS); - unsafe { RpcProtseqVectorFreeW(core::mem::transmute(protseqvector)) } + unsafe { RpcProtseqVectorFreeW(protseqvector as _) } } #[inline] pub unsafe fn RpcRaiseException(exception: RPC_STATUS) { @@ -2498,7 +2498,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); - unsafe { RpcRevertToSelfEx(core::mem::transmute(bindinghandle.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcRevertToSelfEx(bindinghandle.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RpcServerCompleteSecurityCallback(bindinghandle: *const core::ffi::c_void, status: RPC_STATUS) -> RPC_STATUS { @@ -2508,42 +2508,42 @@ pub unsafe fn RpcServerCompleteSecurityCallback(bindinghandle: *const core::ffi: #[inline] pub unsafe fn RpcServerInqBindingHandle(binding: *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerInqBindingHandle(binding : *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { RpcServerInqBindingHandle(core::mem::transmute(binding)) } + unsafe { RpcServerInqBindingHandle(binding as _) } } #[inline] pub unsafe fn RpcServerInqBindings(bindingvector: *mut *mut RPC_BINDING_VECTOR) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerInqBindings(bindingvector : *mut *mut RPC_BINDING_VECTOR) -> RPC_STATUS); - unsafe { RpcServerInqBindings(core::mem::transmute(bindingvector)) } + unsafe { RpcServerInqBindings(bindingvector as _) } } #[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); - unsafe { RpcServerInqBindingsEx(core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(bindingvector)) } + unsafe { RpcServerInqBindingsEx(securitydescriptor.unwrap_or(core::mem::zeroed()) as _, bindingvector as _) } } #[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); - unsafe { RpcServerInqCallAttributesA(core::mem::transmute(clientbinding.unwrap_or(core::mem::zeroed())), core::mem::transmute(rpccallattributes)) } + unsafe { RpcServerInqCallAttributesA(clientbinding.unwrap_or(core::mem::zeroed()) as _, rpccallattributes as _) } } #[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); - unsafe { RpcServerInqCallAttributesW(core::mem::transmute(clientbinding.unwrap_or(core::mem::zeroed())), core::mem::transmute(rpccallattributes)) } + unsafe { RpcServerInqCallAttributesW(clientbinding.unwrap_or(core::mem::zeroed()) as _, rpccallattributes as _) } } #[inline] pub unsafe fn RpcServerInqDefaultPrincNameA(authnsvc: u32, princname: *mut windows_core::PSTR) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerInqDefaultPrincNameA(authnsvc : u32, princname : *mut windows_core::PSTR) -> RPC_STATUS); - unsafe { RpcServerInqDefaultPrincNameA(authnsvc, core::mem::transmute(princname)) } + unsafe { RpcServerInqDefaultPrincNameA(authnsvc, princname as _) } } #[inline] pub unsafe fn RpcServerInqDefaultPrincNameW(authnsvc: u32, princname: *mut windows_core::PWSTR) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerInqDefaultPrincNameW(authnsvc : u32, princname : *mut windows_core::PWSTR) -> RPC_STATUS); - unsafe { RpcServerInqDefaultPrincNameW(authnsvc, core::mem::transmute(princname)) } + unsafe { RpcServerInqDefaultPrincNameW(authnsvc, princname as _) } } #[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); - unsafe { RpcServerInqIf(ifspec, core::mem::transmute(mgrtypeuuid.unwrap_or(core::mem::zeroed())), core::mem::transmute(mgrepv)) } + unsafe { RpcServerInqIf(ifspec, mgrtypeuuid.unwrap_or(core::mem::zeroed()) as _, mgrepv as _) } } #[inline] pub unsafe fn RpcServerInterfaceGroupActivate(ifgroup: *const core::ffi::c_void) -> RPC_STATUS { @@ -2558,12 +2558,12 @@ pub unsafe fn RpcServerInterfaceGroupClose(ifgroup: *const core::ffi::c_void) -> #[inline] pub unsafe fn RpcServerInterfaceGroupCreateA(interfaces: &[RPC_INTERFACE_TEMPLATEA], endpoints: &[RPC_ENDPOINT_TEMPLATEA], idleperiod: u32, idlecallbackfn: RPC_INTERFACE_GROUP_IDLE_CALLBACK_FN, idlecallbackcontext: *const core::ffi::c_void, ifgroup: *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerInterfaceGroupCreateA(interfaces : *const RPC_INTERFACE_TEMPLATEA, numifs : u32, endpoints : *const RPC_ENDPOINT_TEMPLATEA, numendpoints : u32, idleperiod : u32, idlecallbackfn : RPC_INTERFACE_GROUP_IDLE_CALLBACK_FN, idlecallbackcontext : *const core::ffi::c_void, ifgroup : *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { RpcServerInterfaceGroupCreateA(core::mem::transmute(interfaces.as_ptr()), interfaces.len().try_into().unwrap(), core::mem::transmute(endpoints.as_ptr()), endpoints.len().try_into().unwrap(), idleperiod, idlecallbackfn, idlecallbackcontext, core::mem::transmute(ifgroup)) } + unsafe { RpcServerInterfaceGroupCreateA(core::mem::transmute(interfaces.as_ptr()), interfaces.len().try_into().unwrap(), core::mem::transmute(endpoints.as_ptr()), endpoints.len().try_into().unwrap(), idleperiod, idlecallbackfn, idlecallbackcontext, ifgroup as _) } } #[inline] pub unsafe fn RpcServerInterfaceGroupCreateW(interfaces: &[RPC_INTERFACE_TEMPLATEW], endpoints: &[RPC_ENDPOINT_TEMPLATEW], idleperiod: u32, idlecallbackfn: RPC_INTERFACE_GROUP_IDLE_CALLBACK_FN, idlecallbackcontext: *const core::ffi::c_void, ifgroup: *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerInterfaceGroupCreateW(interfaces : *const RPC_INTERFACE_TEMPLATEW, numifs : u32, endpoints : *const RPC_ENDPOINT_TEMPLATEW, numendpoints : u32, idleperiod : u32, idlecallbackfn : RPC_INTERFACE_GROUP_IDLE_CALLBACK_FN, idlecallbackcontext : *const core::ffi::c_void, ifgroup : *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { RpcServerInterfaceGroupCreateW(core::mem::transmute(interfaces.as_ptr()), interfaces.len().try_into().unwrap(), core::mem::transmute(endpoints.as_ptr()), endpoints.len().try_into().unwrap(), idleperiod, idlecallbackfn, idlecallbackcontext, core::mem::transmute(ifgroup)) } + unsafe { RpcServerInterfaceGroupCreateW(core::mem::transmute(interfaces.as_ptr()), interfaces.len().try_into().unwrap(), core::mem::transmute(endpoints.as_ptr()), endpoints.len().try_into().unwrap(), idleperiod, idlecallbackfn, idlecallbackcontext, ifgroup as _) } } #[inline] pub unsafe fn RpcServerInterfaceGroupDeactivate(ifgroup: *const core::ffi::c_void, forcedeactivation: u32) -> RPC_STATUS { @@ -2573,7 +2573,7 @@ pub unsafe fn RpcServerInterfaceGroupDeactivate(ifgroup: *const core::ffi::c_voi #[inline] pub unsafe fn RpcServerInterfaceGroupInqBindings(ifgroup: *const core::ffi::c_void, bindingvector: *mut *mut RPC_BINDING_VECTOR) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerInterfaceGroupInqBindings(ifgroup : *const core::ffi::c_void, bindingvector : *mut *mut RPC_BINDING_VECTOR) -> RPC_STATUS); - unsafe { RpcServerInterfaceGroupInqBindings(ifgroup, core::mem::transmute(bindingvector)) } + unsafe { RpcServerInterfaceGroupInqBindings(ifgroup, bindingvector as _) } } #[inline] pub unsafe fn RpcServerListen(minimumcallthreads: u32, maxcalls: u32, dontwait: u32) -> RPC_STATUS { @@ -2586,7 +2586,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerRegisterAuthInfoA(serverprincname : windows_core::PCSTR, authnsvc : u32, getkeyfn : RPC_AUTH_KEY_RETRIEVAL_FN, arg : *const core::ffi::c_void) -> RPC_STATUS); - unsafe { RpcServerRegisterAuthInfoA(serverprincname.param().abi(), authnsvc, core::mem::transmute(getkeyfn.unwrap_or(core::mem::zeroed())), core::mem::transmute(arg.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcServerRegisterAuthInfoA(serverprincname.param().abi(), authnsvc, getkeyfn.unwrap_or(core::mem::zeroed()) as _, arg.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RpcServerRegisterAuthInfoW(serverprincname: P0, authnsvc: u32, getkeyfn: Option, arg: Option<*const core::ffi::c_void>) -> RPC_STATUS @@ -2594,73 +2594,73 @@ where P0: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerRegisterAuthInfoW(serverprincname : windows_core::PCWSTR, authnsvc : u32, getkeyfn : RPC_AUTH_KEY_RETRIEVAL_FN, arg : *const core::ffi::c_void) -> RPC_STATUS); - unsafe { RpcServerRegisterAuthInfoW(serverprincname.param().abi(), authnsvc, core::mem::transmute(getkeyfn.unwrap_or(core::mem::zeroed())), core::mem::transmute(arg.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcServerRegisterAuthInfoW(serverprincname.param().abi(), authnsvc, getkeyfn.unwrap_or(core::mem::zeroed()) as _, arg.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { RpcServerRegisterIf(ifspec, core::mem::transmute(mgrtypeuuid.unwrap_or(core::mem::zeroed())), core::mem::transmute(mgrepv.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcServerRegisterIf(ifspec, mgrtypeuuid.unwrap_or(core::mem::zeroed()) as _, mgrepv.unwrap_or(core::mem::zeroed()) as _) } } #[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: 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); - unsafe { RpcServerRegisterIf2(ifspec, core::mem::transmute(mgrtypeuuid.unwrap_or(core::mem::zeroed())), core::mem::transmute(mgrepv.unwrap_or(core::mem::zeroed())), flags, maxcalls, maxrpcsize, core::mem::transmute(ifcallbackfn.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcServerRegisterIf2(ifspec, mgrtypeuuid.unwrap_or(core::mem::zeroed()) as _, mgrepv.unwrap_or(core::mem::zeroed()) as _, flags, maxcalls, maxrpcsize, ifcallbackfn.unwrap_or(core::mem::zeroed()) as _) } } #[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: 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); - unsafe { RpcServerRegisterIf3(ifspec, core::mem::transmute(mgrtypeuuid.unwrap_or(core::mem::zeroed())), core::mem::transmute(mgrepv.unwrap_or(core::mem::zeroed())), flags, maxcalls, maxrpcsize, core::mem::transmute(ifcallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcServerRegisterIf3(ifspec, mgrtypeuuid.unwrap_or(core::mem::zeroed()) as _, mgrepv.unwrap_or(core::mem::zeroed()) as _, flags, maxcalls, maxrpcsize, ifcallback.unwrap_or(core::mem::zeroed()) as _, securitydescriptor.unwrap_or(core::mem::zeroed()) as _) } } #[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: 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); - unsafe { RpcServerRegisterIfEx(ifspec, core::mem::transmute(mgrtypeuuid.unwrap_or(core::mem::zeroed())), core::mem::transmute(mgrepv.unwrap_or(core::mem::zeroed())), flags, maxcalls, core::mem::transmute(ifcallback.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcServerRegisterIfEx(ifspec, mgrtypeuuid.unwrap_or(core::mem::zeroed()) as _, mgrepv.unwrap_or(core::mem::zeroed()) as _, flags, maxcalls, ifcallback.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { RpcServerSubscribeForNotification(core::mem::transmute(binding.unwrap_or(core::mem::zeroed())), notification, notificationtype, notificationinfo) } + unsafe { RpcServerSubscribeForNotification(binding.unwrap_or(core::mem::zeroed()) as _, notification, notificationtype, notificationinfo) } } #[inline] pub unsafe fn RpcServerTestCancel(bindinghandle: Option<*const core::ffi::c_void>) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerTestCancel(bindinghandle : *const core::ffi::c_void) -> RPC_STATUS); - unsafe { RpcServerTestCancel(core::mem::transmute(bindinghandle.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcServerTestCancel(bindinghandle.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { RpcServerUnregisterIf(core::mem::transmute(ifspec.unwrap_or(core::mem::zeroed())), core::mem::transmute(mgrtypeuuid.unwrap_or(core::mem::zeroed())), waitforcallstocomplete) } + unsafe { RpcServerUnregisterIf(ifspec.unwrap_or(core::mem::zeroed()) as _, mgrtypeuuid.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { RpcServerUnregisterIfEx(core::mem::transmute(ifspec.unwrap_or(core::mem::zeroed())), core::mem::transmute(mgrtypeuuid.unwrap_or(core::mem::zeroed())), rundowncontexthandles) } + unsafe { RpcServerUnregisterIfEx(ifspec.unwrap_or(core::mem::zeroed()) as _, mgrtypeuuid.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { RpcServerUnsubscribeForNotification(core::mem::transmute(binding.unwrap_or(core::mem::zeroed())), notification, core::mem::transmute(notificationsqueued)) } + unsafe { RpcServerUnsubscribeForNotification(binding.unwrap_or(core::mem::zeroed()) as _, notification, notificationsqueued as _) } } #[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); - unsafe { RpcServerUseAllProtseqs(maxcalls, core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcServerUseAllProtseqs(maxcalls, securitydescriptor.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { RpcServerUseAllProtseqsEx(maxcalls, core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), policy) } + unsafe { RpcServerUseAllProtseqsEx(maxcalls, securitydescriptor.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { RpcServerUseAllProtseqsIf(maxcalls, ifspec, core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcServerUseAllProtseqsIf(maxcalls, ifspec, securitydescriptor.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { RpcServerUseAllProtseqsIfEx(maxcalls, ifspec, core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), policy) } + unsafe { RpcServerUseAllProtseqsIfEx(maxcalls, ifspec, securitydescriptor.unwrap_or(core::mem::zeroed()) as _, policy) } } #[inline] pub unsafe fn RpcServerUseProtseqA(protseq: P0, maxcalls: u32, securitydescriptor: Option<*const core::ffi::c_void>) -> RPC_STATUS @@ -2668,7 +2668,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); - unsafe { RpcServerUseProtseqA(protseq.param().abi(), maxcalls, core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcServerUseProtseqA(protseq.param().abi(), maxcalls, securitydescriptor.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RpcServerUseProtseqEpA(protseq: P0, maxcalls: u32, endpoint: P2, securitydescriptor: Option<*const core::ffi::c_void>) -> RPC_STATUS @@ -2677,7 +2677,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); - unsafe { RpcServerUseProtseqEpA(protseq.param().abi(), maxcalls, endpoint.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcServerUseProtseqEpA(protseq.param().abi(), maxcalls, endpoint.param().abi(), securitydescriptor.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RpcServerUseProtseqEpExA(protseq: P0, maxcalls: u32, endpoint: P2, securitydescriptor: Option<*const core::ffi::c_void>, policy: *const RPC_POLICY) -> RPC_STATUS @@ -2686,7 +2686,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); - unsafe { RpcServerUseProtseqEpExA(protseq.param().abi(), maxcalls, endpoint.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), policy) } + unsafe { RpcServerUseProtseqEpExA(protseq.param().abi(), maxcalls, endpoint.param().abi(), securitydescriptor.unwrap_or(core::mem::zeroed()) as _, 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 @@ -2695,7 +2695,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); - unsafe { RpcServerUseProtseqEpExW(protseq.param().abi(), maxcalls, endpoint.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), policy) } + unsafe { RpcServerUseProtseqEpExW(protseq.param().abi(), maxcalls, endpoint.param().abi(), securitydescriptor.unwrap_or(core::mem::zeroed()) as _, policy) } } #[inline] pub unsafe fn RpcServerUseProtseqEpW(protseq: P0, maxcalls: u32, endpoint: P2, securitydescriptor: Option<*const core::ffi::c_void>) -> RPC_STATUS @@ -2704,7 +2704,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); - unsafe { RpcServerUseProtseqEpW(protseq.param().abi(), maxcalls, endpoint.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcServerUseProtseqEpW(protseq.param().abi(), maxcalls, endpoint.param().abi(), securitydescriptor.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RpcServerUseProtseqExA(protseq: P0, maxcalls: u32, securitydescriptor: Option<*const core::ffi::c_void>, policy: *const RPC_POLICY) -> RPC_STATUS @@ -2712,7 +2712,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); - unsafe { RpcServerUseProtseqExA(protseq.param().abi(), maxcalls, core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), policy) } + unsafe { RpcServerUseProtseqExA(protseq.param().abi(), maxcalls, securitydescriptor.unwrap_or(core::mem::zeroed()) as _, policy) } } #[inline] pub unsafe fn RpcServerUseProtseqExW(protseq: P0, maxcalls: u32, securitydescriptor: Option<*const core::ffi::c_void>, policy: *const RPC_POLICY) -> RPC_STATUS @@ -2720,7 +2720,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); - unsafe { RpcServerUseProtseqExW(protseq.param().abi(), maxcalls, core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), policy) } + unsafe { RpcServerUseProtseqExW(protseq.param().abi(), maxcalls, securitydescriptor.unwrap_or(core::mem::zeroed()) as _, 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 @@ -2728,7 +2728,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); - unsafe { RpcServerUseProtseqIfA(protseq.param().abi(), maxcalls, ifspec, core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcServerUseProtseqIfA(protseq.param().abi(), maxcalls, ifspec, securitydescriptor.unwrap_or(core::mem::zeroed()) as _) } } #[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 @@ -2736,7 +2736,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); - unsafe { RpcServerUseProtseqIfExA(protseq.param().abi(), maxcalls, ifspec, core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), policy) } + unsafe { RpcServerUseProtseqIfExA(protseq.param().abi(), maxcalls, ifspec, securitydescriptor.unwrap_or(core::mem::zeroed()) as _, 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 @@ -2744,7 +2744,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); - unsafe { RpcServerUseProtseqIfExW(protseq.param().abi(), maxcalls, ifspec, core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), policy) } + unsafe { RpcServerUseProtseqIfExW(protseq.param().abi(), maxcalls, ifspec, securitydescriptor.unwrap_or(core::mem::zeroed()) as _, 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 @@ -2752,7 +2752,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); - unsafe { RpcServerUseProtseqIfW(protseq.param().abi(), maxcalls, ifspec, core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcServerUseProtseqIfW(protseq.param().abi(), maxcalls, ifspec, securitydescriptor.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RpcServerUseProtseqW(protseq: P0, maxcalls: u32, securitydescriptor: Option<*const core::ffi::c_void>) -> RPC_STATUS @@ -2760,7 +2760,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); - unsafe { RpcServerUseProtseqW(protseq.param().abi(), maxcalls, core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed()))) } + unsafe { RpcServerUseProtseqW(protseq.param().abi(), maxcalls, securitydescriptor.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RpcServerYield() { @@ -2770,7 +2770,7 @@ pub unsafe fn RpcServerYield() { #[inline] pub unsafe fn RpcSmAllocate(size: usize, pstatus: *mut RPC_STATUS) -> *mut core::ffi::c_void { windows_targets::link!("rpcrt4.dll" "system" fn RpcSmAllocate(size : usize, pstatus : *mut RPC_STATUS) -> *mut core::ffi::c_void); - unsafe { RpcSmAllocate(size, core::mem::transmute(pstatus)) } + unsafe { RpcSmAllocate(size, pstatus as _) } } #[inline] pub unsafe fn RpcSmClientFree(pnodetofree: *const core::ffi::c_void) -> RPC_STATUS { @@ -2800,7 +2800,7 @@ pub unsafe fn RpcSmFree(nodetofree: *const core::ffi::c_void) -> RPC_STATUS { #[inline] pub unsafe fn RpcSmGetThreadHandle(pstatus: *mut RPC_STATUS) -> *mut core::ffi::c_void { windows_targets::link!("rpcrt4.dll" "system" fn RpcSmGetThreadHandle(pstatus : *mut RPC_STATUS) -> *mut core::ffi::c_void); - unsafe { RpcSmGetThreadHandle(core::mem::transmute(pstatus)) } + unsafe { RpcSmGetThreadHandle(pstatus as _) } } #[inline] pub unsafe fn RpcSmSetClientAllocFree(clientalloc: RPC_CLIENT_ALLOC, clientfree: RPC_CLIENT_FREE) -> RPC_STATUS { @@ -2815,7 +2815,7 @@ pub unsafe fn RpcSmSetThreadHandle(id: *const core::ffi::c_void) -> RPC_STATUS { #[inline] pub unsafe fn RpcSmSwapClientAllocFree(clientalloc: RPC_CLIENT_ALLOC, clientfree: RPC_CLIENT_FREE, oldclientalloc: *mut RPC_CLIENT_ALLOC, oldclientfree: *mut RPC_CLIENT_FREE) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcSmSwapClientAllocFree(clientalloc : RPC_CLIENT_ALLOC, clientfree : RPC_CLIENT_FREE, oldclientalloc : *mut RPC_CLIENT_ALLOC, oldclientfree : *mut RPC_CLIENT_FREE) -> RPC_STATUS); - unsafe { RpcSmSwapClientAllocFree(clientalloc, clientfree, core::mem::transmute(oldclientalloc), core::mem::transmute(oldclientfree)) } + unsafe { RpcSmSwapClientAllocFree(clientalloc, clientfree, oldclientalloc as _, oldclientfree as _) } } #[inline] pub unsafe fn RpcSsAllocate(size: usize) -> *mut core::ffi::c_void { @@ -2825,7 +2825,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); - unsafe { RpcSsContextLockExclusive(core::mem::transmute(serverbindinghandle.unwrap_or(core::mem::zeroed())), usercontext) } + unsafe { RpcSsContextLockExclusive(serverbindinghandle.unwrap_or(core::mem::zeroed()) as _, usercontext) } } #[inline] pub unsafe fn RpcSsContextLockShared(serverbindinghandle: *const core::ffi::c_void, usercontext: *const core::ffi::c_void) -> RPC_STATUS { @@ -2860,7 +2860,7 @@ pub unsafe fn RpcSsFree(nodetofree: *const core::ffi::c_void) { #[inline] pub unsafe fn RpcSsGetContextBinding(contexthandle: *const core::ffi::c_void, binding: *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcSsGetContextBinding(contexthandle : *const core::ffi::c_void, binding : *mut *mut core::ffi::c_void) -> RPC_STATUS); - unsafe { RpcSsGetContextBinding(contexthandle, core::mem::transmute(binding)) } + unsafe { RpcSsGetContextBinding(contexthandle, binding as _) } } #[inline] pub unsafe fn RpcSsGetThreadHandle() -> *mut core::ffi::c_void { @@ -2880,7 +2880,7 @@ pub unsafe fn RpcSsSetThreadHandle(id: *const core::ffi::c_void) { #[inline] pub unsafe fn RpcSsSwapClientAllocFree(clientalloc: RPC_CLIENT_ALLOC, clientfree: RPC_CLIENT_FREE, oldclientalloc: *mut RPC_CLIENT_ALLOC, oldclientfree: *mut RPC_CLIENT_FREE) { windows_targets::link!("rpcrt4.dll" "system" fn RpcSsSwapClientAllocFree(clientalloc : RPC_CLIENT_ALLOC, clientfree : RPC_CLIENT_FREE, oldclientalloc : *mut RPC_CLIENT_ALLOC, oldclientfree : *mut RPC_CLIENT_FREE)); - unsafe { RpcSsSwapClientAllocFree(clientalloc, clientfree, core::mem::transmute(oldclientalloc), core::mem::transmute(oldclientfree)) } + unsafe { RpcSsSwapClientAllocFree(clientalloc, clientfree, oldclientalloc as _, oldclientfree as _) } } #[inline] pub unsafe fn RpcStringBindingComposeA(objuuid: P0, protseq: P1, networkaddr: P2, endpoint: P3, options: P4, stringbinding: Option<*mut windows_core::PSTR>) -> RPC_STATUS @@ -2892,7 +2892,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); - unsafe { 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()))) } + unsafe { RpcStringBindingComposeA(objuuid.param().abi(), protseq.param().abi(), networkaddr.param().abi(), endpoint.param().abi(), options.param().abi(), stringbinding.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RpcStringBindingComposeW(objuuid: P0, protseq: P1, networkaddr: P2, endpoint: P3, options: P4, stringbinding: Option<*mut windows_core::PWSTR>) -> RPC_STATUS @@ -2904,7 +2904,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); - unsafe { 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()))) } + unsafe { RpcStringBindingComposeW(objuuid.param().abi(), protseq.param().abi(), networkaddr.param().abi(), endpoint.param().abi(), options.param().abi(), stringbinding.unwrap_or(core::mem::zeroed()) as _) } } #[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 @@ -2912,7 +2912,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); - unsafe { 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()))) } + unsafe { RpcStringBindingParseA(stringbinding.param().abi(), objuuid.unwrap_or(core::mem::zeroed()) as _, protseq.unwrap_or(core::mem::zeroed()) as _, networkaddr.unwrap_or(core::mem::zeroed()) as _, endpoint.unwrap_or(core::mem::zeroed()) as _, networkoptions.unwrap_or(core::mem::zeroed()) as _) } } #[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 @@ -2920,17 +2920,17 @@ 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); - unsafe { 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()))) } + unsafe { RpcStringBindingParseW(stringbinding.param().abi(), objuuid.unwrap_or(core::mem::zeroed()) as _, protseq.unwrap_or(core::mem::zeroed()) as _, networkaddr.unwrap_or(core::mem::zeroed()) as _, endpoint.unwrap_or(core::mem::zeroed()) as _, networkoptions.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RpcStringFreeA(string: *mut windows_core::PSTR) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcStringFreeA(string : *mut windows_core::PSTR) -> RPC_STATUS); - unsafe { RpcStringFreeA(core::mem::transmute(string)) } + unsafe { RpcStringFreeA(string as _) } } #[inline] pub unsafe fn RpcStringFreeW(string: *mut windows_core::PWSTR) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcStringFreeW(string : *mut windows_core::PWSTR) -> RPC_STATUS); - unsafe { RpcStringFreeW(core::mem::transmute(string)) } + unsafe { RpcStringFreeW(string as _) } } #[inline] pub unsafe fn RpcTestCancel() -> RPC_STATUS { @@ -2940,32 +2940,32 @@ pub unsafe fn RpcTestCancel() -> RPC_STATUS { #[inline] pub unsafe fn RpcUserFree(asynchandle: *mut core::ffi::c_void, pbuffer: *mut core::ffi::c_void) { windows_targets::link!("rpcrt4.dll" "system" fn RpcUserFree(asynchandle : *mut core::ffi::c_void, pbuffer : *mut core::ffi::c_void)); - unsafe { RpcUserFree(core::mem::transmute(asynchandle), core::mem::transmute(pbuffer)) } + unsafe { RpcUserFree(asynchandle as _, pbuffer as _) } } #[inline] pub unsafe fn UuidCompare(uuid1: *const windows_core::GUID, uuid2: *const windows_core::GUID, status: *mut RPC_STATUS) -> i32 { windows_targets::link!("rpcrt4.dll" "system" fn UuidCompare(uuid1 : *const windows_core::GUID, uuid2 : *const windows_core::GUID, status : *mut RPC_STATUS) -> i32); - unsafe { UuidCompare(uuid1, uuid2, core::mem::transmute(status)) } + unsafe { UuidCompare(uuid1, uuid2, status as _) } } #[inline] pub unsafe fn UuidCreate(uuid: *mut windows_core::GUID) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn UuidCreate(uuid : *mut windows_core::GUID) -> RPC_STATUS); - unsafe { UuidCreate(core::mem::transmute(uuid)) } + unsafe { UuidCreate(uuid as _) } } #[inline] pub unsafe fn UuidCreateNil(niluuid: *mut windows_core::GUID) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn UuidCreateNil(niluuid : *mut windows_core::GUID) -> RPC_STATUS); - unsafe { UuidCreateNil(core::mem::transmute(niluuid)) } + unsafe { UuidCreateNil(niluuid as _) } } #[inline] pub unsafe fn UuidCreateSequential(uuid: *mut windows_core::GUID) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn UuidCreateSequential(uuid : *mut windows_core::GUID) -> RPC_STATUS); - unsafe { UuidCreateSequential(core::mem::transmute(uuid)) } + unsafe { UuidCreateSequential(uuid as _) } } #[inline] pub unsafe fn UuidEqual(uuid1: *const windows_core::GUID, uuid2: *const windows_core::GUID, status: *mut RPC_STATUS) -> i32 { windows_targets::link!("rpcrt4.dll" "system" fn UuidEqual(uuid1 : *const windows_core::GUID, uuid2 : *const windows_core::GUID, status : *mut RPC_STATUS) -> i32); - unsafe { UuidEqual(uuid1, uuid2, core::mem::transmute(status)) } + unsafe { UuidEqual(uuid1, uuid2, status as _) } } #[inline] pub unsafe fn UuidFromStringA(stringuuid: P0, uuid: *mut windows_core::GUID) -> RPC_STATUS @@ -2973,7 +2973,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn UuidFromStringA(stringuuid : windows_core::PCSTR, uuid : *mut windows_core::GUID) -> RPC_STATUS); - unsafe { UuidFromStringA(stringuuid.param().abi(), core::mem::transmute(uuid)) } + unsafe { UuidFromStringA(stringuuid.param().abi(), uuid as _) } } #[inline] pub unsafe fn UuidFromStringW(stringuuid: P0, uuid: *mut windows_core::GUID) -> RPC_STATUS @@ -2981,27 +2981,27 @@ where P0: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn UuidFromStringW(stringuuid : windows_core::PCWSTR, uuid : *mut windows_core::GUID) -> RPC_STATUS); - unsafe { UuidFromStringW(stringuuid.param().abi(), core::mem::transmute(uuid)) } + unsafe { UuidFromStringW(stringuuid.param().abi(), uuid as _) } } #[inline] pub unsafe fn UuidHash(uuid: *const windows_core::GUID, status: *mut RPC_STATUS) -> u16 { windows_targets::link!("rpcrt4.dll" "system" fn UuidHash(uuid : *const windows_core::GUID, status : *mut RPC_STATUS) -> u16); - unsafe { UuidHash(uuid, core::mem::transmute(status)) } + unsafe { UuidHash(uuid, status as _) } } #[inline] pub unsafe fn UuidIsNil(uuid: *const windows_core::GUID, status: *mut RPC_STATUS) -> i32 { windows_targets::link!("rpcrt4.dll" "system" fn UuidIsNil(uuid : *const windows_core::GUID, status : *mut RPC_STATUS) -> i32); - unsafe { UuidIsNil(uuid, core::mem::transmute(status)) } + unsafe { UuidIsNil(uuid, status as _) } } #[inline] pub unsafe fn UuidToStringA(uuid: *const windows_core::GUID, stringuuid: *mut windows_core::PSTR) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn UuidToStringA(uuid : *const windows_core::GUID, stringuuid : *mut windows_core::PSTR) -> RPC_STATUS); - unsafe { UuidToStringA(uuid, core::mem::transmute(stringuuid)) } + unsafe { UuidToStringA(uuid, stringuuid as _) } } #[inline] pub unsafe fn UuidToStringW(uuid: *const windows_core::GUID, stringuuid: *mut windows_core::PWSTR) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn UuidToStringW(uuid : *const windows_core::GUID, stringuuid : *mut windows_core::PWSTR) -> RPC_STATUS); - unsafe { UuidToStringW(uuid, core::mem::transmute(stringuuid)) } + unsafe { UuidToStringW(uuid, stringuuid as _) } } #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] 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 b81282a4c6..7a302b6d8a 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Search/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Search/mod.rs @@ -13,98 +13,98 @@ pub unsafe fn ODBCSetTryWaitValue(dwvalue: u32) -> super::super::Foundation::BOO #[inline] pub unsafe fn SQLAllocConnect(environmenthandle: *mut core::ffi::c_void, connectionhandle: *mut *mut core::ffi::c_void) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLAllocConnect(environmenthandle : *mut core::ffi::c_void, connectionhandle : *mut *mut core::ffi::c_void) -> i16); - unsafe { SQLAllocConnect(core::mem::transmute(environmenthandle), core::mem::transmute(connectionhandle)) } + unsafe { SQLAllocConnect(environmenthandle as _, connectionhandle as _) } } #[inline] pub unsafe fn SQLAllocEnv(environmenthandle: *mut *mut core::ffi::c_void) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLAllocEnv(environmenthandle : *mut *mut core::ffi::c_void) -> i16); - unsafe { SQLAllocEnv(core::mem::transmute(environmenthandle)) } + unsafe { SQLAllocEnv(environmenthandle as _) } } #[inline] pub unsafe fn SQLAllocHandle(handletype: i16, inputhandle: *mut core::ffi::c_void, outputhandle: *mut *mut core::ffi::c_void) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLAllocHandle(handletype : i16, inputhandle : *mut core::ffi::c_void, outputhandle : *mut *mut core::ffi::c_void) -> i16); - unsafe { SQLAllocHandle(handletype, core::mem::transmute(inputhandle), core::mem::transmute(outputhandle)) } + unsafe { SQLAllocHandle(handletype, inputhandle as _, outputhandle as _) } } #[inline] pub unsafe fn SQLAllocHandleStd(fhandletype: i16, hinput: *mut core::ffi::c_void, phoutput: *mut *mut core::ffi::c_void) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLAllocHandleStd(fhandletype : i16, hinput : *mut core::ffi::c_void, phoutput : *mut *mut core::ffi::c_void) -> i16); - unsafe { SQLAllocHandleStd(fhandletype, core::mem::transmute(hinput), core::mem::transmute(phoutput)) } + unsafe { SQLAllocHandleStd(fhandletype, hinput as _, phoutput as _) } } #[inline] pub unsafe fn SQLAllocStmt(connectionhandle: *mut core::ffi::c_void, statementhandle: *mut *mut core::ffi::c_void) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLAllocStmt(connectionhandle : *mut core::ffi::c_void, statementhandle : *mut *mut core::ffi::c_void) -> i16); - unsafe { SQLAllocStmt(core::mem::transmute(connectionhandle), core::mem::transmute(statementhandle)) } + unsafe { SQLAllocStmt(connectionhandle as _, statementhandle as _) } } #[cfg(target_arch = "x86")] #[inline] pub unsafe fn SQLBindCol(statementhandle: *mut core::ffi::c_void, columnnumber: u16, targettype: i16, targetvalue: Option<*mut core::ffi::c_void>, bufferlength: i32, strlen_or_ind: Option<*mut i32>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLBindCol(statementhandle : *mut core::ffi::c_void, columnnumber : u16, targettype : i16, targetvalue : *mut core::ffi::c_void, bufferlength : i32, strlen_or_ind : *mut i32) -> i16); - unsafe { SQLBindCol(core::mem::transmute(statementhandle), columnnumber, targettype, core::mem::transmute(targetvalue.unwrap_or(core::mem::zeroed())), bufferlength, core::mem::transmute(strlen_or_ind.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLBindCol(statementhandle as _, columnnumber, targettype, targetvalue.unwrap_or(core::mem::zeroed()) as _, bufferlength, strlen_or_ind.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { SQLBindCol(core::mem::transmute(statementhandle), columnnumber, targettype, core::mem::transmute(targetvalue.unwrap_or(core::mem::zeroed())), bufferlength, core::mem::transmute(strlen_or_ind.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLBindCol(statementhandle as _, columnnumber, targettype, targetvalue.unwrap_or(core::mem::zeroed()) as _, bufferlength, strlen_or_ind.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(target_arch = "x86")] #[inline] pub unsafe fn SQLBindParam(statementhandle: *mut core::ffi::c_void, parameternumber: u16, valuetype: i16, parametertype: i16, lengthprecision: u32, parameterscale: i16, parametervalue: *mut core::ffi::c_void, strlen_or_ind: *mut i32) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLBindParam(statementhandle : *mut core::ffi::c_void, parameternumber : u16, valuetype : i16, parametertype : i16, lengthprecision : u32, parameterscale : i16, parametervalue : *mut core::ffi::c_void, strlen_or_ind : *mut i32) -> i16); - unsafe { SQLBindParam(core::mem::transmute(statementhandle), parameternumber, valuetype, parametertype, lengthprecision, parameterscale, core::mem::transmute(parametervalue), core::mem::transmute(strlen_or_ind)) } + unsafe { SQLBindParam(statementhandle as _, parameternumber, valuetype, parametertype, lengthprecision, parameterscale, parametervalue as _, strlen_or_ind as _) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] pub unsafe fn SQLBindParam(statementhandle: *mut core::ffi::c_void, parameternumber: u16, valuetype: i16, parametertype: i16, lengthprecision: u64, parameterscale: i16, parametervalue: *mut core::ffi::c_void, strlen_or_ind: *mut i64) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLBindParam(statementhandle : *mut core::ffi::c_void, parameternumber : u16, valuetype : i16, parametertype : i16, lengthprecision : u64, parameterscale : i16, parametervalue : *mut core::ffi::c_void, strlen_or_ind : *mut i64) -> i16); - unsafe { SQLBindParam(core::mem::transmute(statementhandle), parameternumber, valuetype, parametertype, lengthprecision, parameterscale, core::mem::transmute(parametervalue), core::mem::transmute(strlen_or_ind)) } + unsafe { SQLBindParam(statementhandle as _, parameternumber, valuetype, parametertype, lengthprecision, parameterscale, parametervalue as _, strlen_or_ind as _) } } #[cfg(target_arch = "x86")] #[inline] pub unsafe fn SQLBindParameter(hstmt: *mut core::ffi::c_void, ipar: u16, fparamtype: i16, fctype: i16, fsqltype: i16, cbcoldef: u32, ibscale: i16, rgbvalue: *mut core::ffi::c_void, cbvaluemax: i32, pcbvalue: *mut i32) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLBindParameter(hstmt : *mut core::ffi::c_void, ipar : u16, fparamtype : i16, fctype : i16, fsqltype : i16, cbcoldef : u32, ibscale : i16, rgbvalue : *mut core::ffi::c_void, cbvaluemax : i32, pcbvalue : *mut i32) -> i16); - unsafe { SQLBindParameter(core::mem::transmute(hstmt), ipar, fparamtype, fctype, fsqltype, cbcoldef, ibscale, core::mem::transmute(rgbvalue), cbvaluemax, core::mem::transmute(pcbvalue)) } + unsafe { SQLBindParameter(hstmt as _, ipar, fparamtype, fctype, fsqltype, cbcoldef, ibscale, rgbvalue as _, cbvaluemax, pcbvalue as _) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] pub unsafe fn SQLBindParameter(hstmt: *mut core::ffi::c_void, ipar: u16, fparamtype: i16, fctype: i16, fsqltype: i16, cbcoldef: u64, ibscale: i16, rgbvalue: *mut core::ffi::c_void, cbvaluemax: i64, pcbvalue: *mut i64) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLBindParameter(hstmt : *mut core::ffi::c_void, ipar : u16, fparamtype : i16, fctype : i16, fsqltype : i16, cbcoldef : u64, ibscale : i16, rgbvalue : *mut core::ffi::c_void, cbvaluemax : i64, pcbvalue : *mut i64) -> i16); - unsafe { SQLBindParameter(core::mem::transmute(hstmt), ipar, fparamtype, fctype, fsqltype, cbcoldef, ibscale, core::mem::transmute(rgbvalue), cbvaluemax, core::mem::transmute(pcbvalue)) } + unsafe { SQLBindParameter(hstmt as _, ipar, fparamtype, fctype, fsqltype, cbcoldef, ibscale, rgbvalue as _, cbvaluemax, pcbvalue as _) } } #[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); - unsafe { 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()))) } + unsafe { SQLBrowseConnect(hdbc as _, 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()), pcchconnstrout.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { 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()))) } + unsafe { SQLBrowseConnectA(hdbc as _, 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()), pcbconnstrout.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { 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()))) } + unsafe { SQLBrowseConnectW(hdbc as _, 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()), pcchconnstrout.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SQLBulkOperations(statementhandle: *mut core::ffi::c_void, operation: i16) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLBulkOperations(statementhandle : *mut core::ffi::c_void, operation : i16) -> i16); - unsafe { SQLBulkOperations(core::mem::transmute(statementhandle), operation) } + unsafe { SQLBulkOperations(statementhandle as _, operation) } } #[inline] pub unsafe fn SQLCancel(statementhandle: *mut core::ffi::c_void) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLCancel(statementhandle : *mut core::ffi::c_void) -> i16); - unsafe { SQLCancel(core::mem::transmute(statementhandle)) } + unsafe { SQLCancel(statementhandle as _) } } #[inline] pub unsafe fn SQLCancelHandle(handletype: i16, inputhandle: *mut core::ffi::c_void) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLCancelHandle(handletype : i16, inputhandle : *mut core::ffi::c_void) -> i16); - unsafe { SQLCancelHandle(handletype, core::mem::transmute(inputhandle)) } + unsafe { SQLCancelHandle(handletype, inputhandle as _) } } #[inline] pub unsafe fn SQLCloseCursor(statementhandle: *mut core::ffi::c_void) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLCloseCursor(statementhandle : *mut core::ffi::c_void) -> i16); - unsafe { SQLCloseCursor(core::mem::transmute(statementhandle)) } + unsafe { SQLCloseCursor(statementhandle as _) } } #[inline] pub unsafe fn SQLCloseEnumServers(henumhandle: super::super::Foundation::HANDLE) -> i16 { @@ -115,80 +115,80 @@ pub unsafe fn SQLCloseEnumServers(henumhandle: super::super::Foundation::HANDLE) #[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); - unsafe { SQLColAttribute(core::mem::transmute(statementhandle), columnnumber, fieldidentifier, core::mem::transmute(characterattribute.unwrap_or(core::mem::zeroed())), bufferlength, core::mem::transmute(stringlength.unwrap_or(core::mem::zeroed())), core::mem::transmute(numericattribute.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLColAttribute(statementhandle as _, columnnumber, fieldidentifier, characterattribute.unwrap_or(core::mem::zeroed()) as _, bufferlength, stringlength.unwrap_or(core::mem::zeroed()) as _, numericattribute.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { SQLColAttribute(core::mem::transmute(statementhandle), columnnumber, fieldidentifier, core::mem::transmute(characterattribute.unwrap_or(core::mem::zeroed())), bufferlength, core::mem::transmute(stringlength.unwrap_or(core::mem::zeroed())), core::mem::transmute(numericattribute.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLColAttribute(statementhandle as _, columnnumber, fieldidentifier, characterattribute.unwrap_or(core::mem::zeroed()) as _, bufferlength, stringlength.unwrap_or(core::mem::zeroed()) as _, numericattribute.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { SQLColAttributeA(core::mem::transmute(hstmt), icol, ifield, core::mem::transmute(pcharattr.unwrap_or(core::mem::zeroed())), cbcharattrmax, core::mem::transmute(pcbcharattr.unwrap_or(core::mem::zeroed())), core::mem::transmute(pnumattr.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLColAttributeA(hstmt as _, icol, ifield, pcharattr.unwrap_or(core::mem::zeroed()) as _, cbcharattrmax, pcbcharattr.unwrap_or(core::mem::zeroed()) as _, pnumattr.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { SQLColAttributeA(core::mem::transmute(hstmt), icol, ifield, core::mem::transmute(pcharattr.unwrap_or(core::mem::zeroed())), cbcharattrmax, core::mem::transmute(pcbcharattr.unwrap_or(core::mem::zeroed())), core::mem::transmute(pnumattr.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLColAttributeA(hstmt as _, icol, ifield, pcharattr.unwrap_or(core::mem::zeroed()) as _, cbcharattrmax, pcbcharattr.unwrap_or(core::mem::zeroed()) as _, pnumattr.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { SQLColAttributeW(core::mem::transmute(hstmt), icol, ifield, core::mem::transmute(pcharattr.unwrap_or(core::mem::zeroed())), cbdescmax, core::mem::transmute(pcbcharattr.unwrap_or(core::mem::zeroed())), core::mem::transmute(pnumattr.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLColAttributeW(hstmt as _, icol, ifield, pcharattr.unwrap_or(core::mem::zeroed()) as _, cbdescmax, pcbcharattr.unwrap_or(core::mem::zeroed()) as _, pnumattr.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { SQLColAttributeW(core::mem::transmute(hstmt), icol, ifield, core::mem::transmute(pcharattr.unwrap_or(core::mem::zeroed())), cbdescmax, core::mem::transmute(pcbcharattr.unwrap_or(core::mem::zeroed())), core::mem::transmute(pnumattr.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLColAttributeW(hstmt as _, icol, ifield, pcharattr.unwrap_or(core::mem::zeroed()) as _, cbdescmax, pcbcharattr.unwrap_or(core::mem::zeroed()) as _, pnumattr.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(target_arch = "x86")] #[inline] pub unsafe fn SQLColAttributes(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 { windows_targets::link!("odbc32.dll" "system" fn SQLColAttributes(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); - unsafe { SQLColAttributes(core::mem::transmute(hstmt), icol, fdesctype, core::mem::transmute(rgbdesc), cbdescmax, core::mem::transmute(pcbdesc), core::mem::transmute(pfdesc)) } + unsafe { SQLColAttributes(hstmt as _, icol, fdesctype, rgbdesc as _, cbdescmax, pcbdesc as _, pfdesc as _) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] pub unsafe fn SQLColAttributes(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 { windows_targets::link!("odbc32.dll" "system" fn SQLColAttributes(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); - unsafe { SQLColAttributes(core::mem::transmute(hstmt), icol, fdesctype, core::mem::transmute(rgbdesc), cbdescmax, core::mem::transmute(pcbdesc), core::mem::transmute(pfdesc)) } + unsafe { SQLColAttributes(hstmt as _, icol, fdesctype, rgbdesc as _, cbdescmax, pcbdesc as _, pfdesc as _) } } #[cfg(target_arch = "x86")] #[inline] pub unsafe fn SQLColAttributesA(hstmt: *mut core::ffi::c_void, icol: u16, fdesctype: u16, rgbdesc: Option<*mut core::ffi::c_void>, cbdescmax: i16, pcbdesc: Option<*mut i16>, pfdesc: Option<*mut i32>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLColAttributesA(hstmt : *mut core::ffi::c_void, icol : u16, fdesctype : u16, rgbdesc : *mut core::ffi::c_void, cbdescmax : i16, pcbdesc : *mut i16, pfdesc : *mut i32) -> i16); - unsafe { SQLColAttributesA(core::mem::transmute(hstmt), icol, fdesctype, core::mem::transmute(rgbdesc.unwrap_or(core::mem::zeroed())), cbdescmax, core::mem::transmute(pcbdesc.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfdesc.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLColAttributesA(hstmt as _, icol, fdesctype, rgbdesc.unwrap_or(core::mem::zeroed()) as _, cbdescmax, pcbdesc.unwrap_or(core::mem::zeroed()) as _, pfdesc.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { SQLColAttributesA(core::mem::transmute(hstmt), icol, fdesctype, core::mem::transmute(rgbdesc.unwrap_or(core::mem::zeroed())), cbdescmax, core::mem::transmute(pcbdesc.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfdesc.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLColAttributesA(hstmt as _, icol, fdesctype, rgbdesc.unwrap_or(core::mem::zeroed()) as _, cbdescmax, pcbdesc.unwrap_or(core::mem::zeroed()) as _, pfdesc.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { SQLColAttributesW(core::mem::transmute(hstmt), icol, fdesctype, core::mem::transmute(rgbdesc.unwrap_or(core::mem::zeroed())), cbdescmax, core::mem::transmute(pcbdesc.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfdesc.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLColAttributesW(hstmt as _, icol, fdesctype, rgbdesc.unwrap_or(core::mem::zeroed()) as _, cbdescmax, pcbdesc.unwrap_or(core::mem::zeroed()) as _, pfdesc.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { SQLColAttributesW(core::mem::transmute(hstmt), icol, fdesctype, core::mem::transmute(rgbdesc.unwrap_or(core::mem::zeroed())), cbdescmax, core::mem::transmute(pcbdesc.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfdesc.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLColAttributesW(hstmt as _, icol, fdesctype, rgbdesc.unwrap_or(core::mem::zeroed()) as _, cbdescmax, pcbdesc.unwrap_or(core::mem::zeroed()) as _, pfdesc.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SQLColumnPrivileges(hstmt: *mut core::ffi::c_void, szcatalogname: Option<&[u8]>, szschemaname: Option<&[u8]>, sztablename: Option<&[u8]>, szcolumnname: Option<&[u8]>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLColumnPrivileges(hstmt : *mut core::ffi::c_void, szcatalogname : *const u8, cchcatalogname : i16, szschemaname : *const u8, cchschemaname : i16, sztablename : *const u8, cchtablename : i16, szcolumnname : *const u8, cchcolumnname : i16) -> i16); unsafe { SQLColumnPrivileges( - core::mem::transmute(hstmt), + hstmt as _, core::mem::transmute(szcatalogname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szcatalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szschemaname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -205,7 +205,7 @@ pub unsafe fn SQLColumnPrivilegesA(hstmt: *mut core::ffi::c_void, szcatalogname: windows_targets::link!("odbc32.dll" "system" fn SQLColumnPrivilegesA(hstmt : *mut core::ffi::c_void, szcatalogname : *const u8, cbcatalogname : i16, szschemaname : *const u8, cbschemaname : i16, sztablename : *const u8, cbtablename : i16, szcolumnname : *const u8, cbcolumnname : i16) -> i16); unsafe { SQLColumnPrivilegesA( - core::mem::transmute(hstmt), + hstmt as _, core::mem::transmute(szcatalogname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szcatalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szschemaname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -222,7 +222,7 @@ pub unsafe fn SQLColumnPrivilegesW(hstmt: *mut core::ffi::c_void, szcatalogname: windows_targets::link!("odbc32.dll" "system" fn SQLColumnPrivilegesW(hstmt : *mut core::ffi::c_void, szcatalogname : *const u16, cchcatalogname : i16, szschemaname : *const u16, cchschemaname : i16, sztablename : *const u16, cchtablename : i16, szcolumnname : *const u16, cchcolumnname : i16) -> i16); unsafe { SQLColumnPrivilegesW( - core::mem::transmute(hstmt), + hstmt as _, core::mem::transmute(szcatalogname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szcatalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szschemaname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -239,7 +239,7 @@ pub unsafe fn SQLColumns(statementhandle: *mut core::ffi::c_void, catalogname: O windows_targets::link!("odbc32.dll" "system" fn SQLColumns(statementhandle : *mut core::ffi::c_void, catalogname : *const u8, namelength1 : i16, schemaname : *const u8, namelength2 : i16, tablename : *const u8, namelength3 : i16, columnname : *const u8, namelength4 : i16) -> i16); unsafe { SQLColumns( - core::mem::transmute(statementhandle), + statementhandle as _, core::mem::transmute(catalogname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), catalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(schemaname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -256,7 +256,7 @@ pub unsafe fn SQLColumnsA(hstmt: *mut core::ffi::c_void, szcatalogname: Option<& windows_targets::link!("odbc32.dll" "system" fn SQLColumnsA(hstmt : *mut core::ffi::c_void, szcatalogname : *const u8, cbcatalogname : i16, szschemaname : *const u8, cbschemaname : i16, sztablename : *const u8, cbtablename : i16, szcolumnname : *const u8, cbcolumnname : i16) -> i16); unsafe { SQLColumnsA( - core::mem::transmute(hstmt), + hstmt as _, core::mem::transmute(szcatalogname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szcatalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szschemaname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -273,7 +273,7 @@ pub unsafe fn SQLColumnsW(hstmt: *mut core::ffi::c_void, szcatalogname: Option<& windows_targets::link!("odbc32.dll" "system" fn SQLColumnsW(hstmt : *mut core::ffi::c_void, szcatalogname : *const u16, cchcatalogname : i16, szschemaname : *const u16, cchschemaname : i16, sztablename : *const u16, cchtablename : i16, szcolumnname : *const u16, cchcolumnname : i16) -> i16); unsafe { SQLColumnsW( - core::mem::transmute(hstmt), + hstmt as _, core::mem::transmute(szcatalogname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szcatalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szschemaname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -288,328 +288,223 @@ pub unsafe fn SQLColumnsW(hstmt: *mut core::ffi::c_void, szcatalogname: Option<& #[inline] pub unsafe fn SQLCompleteAsync(handletype: i16, handle: *mut core::ffi::c_void, asyncretcodeptr: *mut i16) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLCompleteAsync(handletype : i16, handle : *mut core::ffi::c_void, asyncretcodeptr : *mut i16) -> i16); - unsafe { SQLCompleteAsync(handletype, core::mem::transmute(handle), core::mem::transmute(asyncretcodeptr)) } + unsafe { SQLCompleteAsync(handletype, handle as _, asyncretcodeptr as _) } } #[inline] pub unsafe fn SQLConnect(connectionhandle: *mut core::ffi::c_void, servername: &[u8], username: &[u8], authentication: &[u8]) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLConnect(connectionhandle : *mut core::ffi::c_void, servername : *const u8, namelength1 : i16, username : *const u8, namelength2 : i16, authentication : *const u8, namelength3 : i16) -> i16); - unsafe { SQLConnect(core::mem::transmute(connectionhandle), core::mem::transmute(servername.as_ptr()), servername.len().try_into().unwrap(), core::mem::transmute(username.as_ptr()), username.len().try_into().unwrap(), core::mem::transmute(authentication.as_ptr()), authentication.len().try_into().unwrap()) } + unsafe { SQLConnect(connectionhandle as _, core::mem::transmute(servername.as_ptr()), servername.len().try_into().unwrap(), core::mem::transmute(username.as_ptr()), username.len().try_into().unwrap(), core::mem::transmute(authentication.as_ptr()), authentication.len().try_into().unwrap()) } } #[inline] pub unsafe fn SQLConnectA(hdbc: *mut core::ffi::c_void, szdsn: &[u8], szuid: &[u8], szauthstr: &[u8]) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLConnectA(hdbc : *mut core::ffi::c_void, szdsn : *const u8, cbdsn : i16, szuid : *const u8, cbuid : i16, szauthstr : *const u8, cbauthstr : i16) -> i16); - unsafe { SQLConnectA(core::mem::transmute(hdbc), core::mem::transmute(szdsn.as_ptr()), szdsn.len().try_into().unwrap(), core::mem::transmute(szuid.as_ptr()), szuid.len().try_into().unwrap(), core::mem::transmute(szauthstr.as_ptr()), szauthstr.len().try_into().unwrap()) } + unsafe { SQLConnectA(hdbc as _, core::mem::transmute(szdsn.as_ptr()), szdsn.len().try_into().unwrap(), core::mem::transmute(szuid.as_ptr()), szuid.len().try_into().unwrap(), core::mem::transmute(szauthstr.as_ptr()), szauthstr.len().try_into().unwrap()) } } #[inline] pub unsafe fn SQLConnectW(hdbc: *mut core::ffi::c_void, szdsn: &[u16], szuid: &[u16], szauthstr: &[u16]) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLConnectW(hdbc : *mut core::ffi::c_void, szdsn : *const u16, cchdsn : i16, szuid : *const u16, cchuid : i16, szauthstr : *const u16, cchauthstr : i16) -> i16); - unsafe { SQLConnectW(core::mem::transmute(hdbc), core::mem::transmute(szdsn.as_ptr()), szdsn.len().try_into().unwrap(), core::mem::transmute(szuid.as_ptr()), szuid.len().try_into().unwrap(), core::mem::transmute(szauthstr.as_ptr()), szauthstr.len().try_into().unwrap()) } + unsafe { SQLConnectW(hdbc as _, core::mem::transmute(szdsn.as_ptr()), szdsn.len().try_into().unwrap(), core::mem::transmute(szuid.as_ptr()), szuid.len().try_into().unwrap(), core::mem::transmute(szauthstr.as_ptr()), szauthstr.len().try_into().unwrap()) } } #[inline] pub unsafe fn SQLCopyDesc(sourcedeschandle: *mut core::ffi::c_void, targetdeschandle: *mut core::ffi::c_void) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLCopyDesc(sourcedeschandle : *mut core::ffi::c_void, targetdeschandle : *mut core::ffi::c_void) -> i16); - unsafe { SQLCopyDesc(core::mem::transmute(sourcedeschandle), core::mem::transmute(targetdeschandle)) } + unsafe { SQLCopyDesc(sourcedeschandle as _, targetdeschandle as _) } } #[inline] pub unsafe fn SQLDataSources(environmenthandle: *mut core::ffi::c_void, direction: u16, servername: Option<&mut [u8]>, namelength1ptr: Option<*mut i16>, description: Option<&mut [u8]>, namelength2ptr: Option<*mut i16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLDataSources(environmenthandle : *mut core::ffi::c_void, direction : u16, servername : *mut u8, bufferlength1 : i16, namelength1ptr : *mut i16, description : *mut u8, bufferlength2 : i16, namelength2ptr : *mut i16) -> i16); - unsafe { - SQLDataSources( - core::mem::transmute(environmenthandle), - 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::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::mem::zeroed())), - ) - } + unsafe { SQLDataSources(environmenthandle as _, 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()), namelength1ptr.unwrap_or(core::mem::zeroed()) as _, 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()), namelength2ptr.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SQLDataSourcesA(henv: *mut core::ffi::c_void, fdirection: u16, szdsn: Option<&mut [u8]>, pcbdsn: *mut i16, szdescription: Option<&mut [u8]>, pcbdescription: *mut i16) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLDataSourcesA(henv : *mut core::ffi::c_void, fdirection : u16, szdsn : *mut u8, cbdsnmax : i16, pcbdsn : *mut i16, szdescription : *mut u8, cbdescriptionmax : i16, pcbdescription : *mut i16) -> i16); - unsafe { SQLDataSourcesA(core::mem::transmute(henv), 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(pcbdsn), core::mem::transmute(szdescription.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szdescription.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbdescription)) } + unsafe { SQLDataSourcesA(henv as _, 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()), pcbdsn as _, core::mem::transmute(szdescription.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szdescription.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbdescription as _) } } #[inline] pub unsafe fn SQLDataSourcesW(henv: *mut core::ffi::c_void, fdirection: u16, szdsn: Option<&mut [u16]>, pcchdsn: Option<*mut i16>, wszdescription: Option<&mut [u16]>, pcchdescription: Option<*mut i16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLDataSourcesW(henv : *mut core::ffi::c_void, fdirection : u16, szdsn : *mut u16, cchdsnmax : i16, pcchdsn : *mut i16, wszdescription : *mut u16, cchdescriptionmax : i16, pcchdescription : *mut i16) -> i16); - unsafe { - SQLDataSourcesW( - core::mem::transmute(henv), - 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::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::mem::zeroed())), - ) - } + unsafe { SQLDataSourcesW(henv as _, 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()), pcchdsn.unwrap_or(core::mem::zeroed()) as _, 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()), pcchdescription.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(target_arch = "x86")] #[inline] pub unsafe fn SQLDescribeCol(statementhandle: *mut core::ffi::c_void, columnnumber: u16, columnname: Option<&mut [u8]>, namelength: Option<*mut i16>, datatype: Option<*mut i16>, columnsize: Option<*mut u32>, decimaldigits: Option<*mut i16>, nullable: Option<*mut i16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLDescribeCol(statementhandle : *mut core::ffi::c_void, columnnumber : u16, columnname : *mut u8, bufferlength : i16, namelength : *mut i16, datatype : *mut i16, columnsize : *mut u32, decimaldigits : *mut i16, nullable : *mut i16) -> i16); - unsafe { - SQLDescribeCol( - core::mem::transmute(statementhandle), - 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::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())), - ) - } + unsafe { SQLDescribeCol(statementhandle as _, 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()), namelength.unwrap_or(core::mem::zeroed()) as _, datatype.unwrap_or(core::mem::zeroed()) as _, columnsize.unwrap_or(core::mem::zeroed()) as _, decimaldigits.unwrap_or(core::mem::zeroed()) as _, nullable.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] pub unsafe fn SQLDescribeCol(statementhandle: *mut core::ffi::c_void, columnnumber: u16, columnname: Option<&mut [u8]>, namelength: Option<*mut i16>, datatype: Option<*mut i16>, columnsize: Option<*mut u64>, decimaldigits: Option<*mut i16>, nullable: Option<*mut i16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLDescribeCol(statementhandle : *mut core::ffi::c_void, columnnumber : u16, columnname : *mut u8, bufferlength : i16, namelength : *mut i16, datatype : *mut i16, columnsize : *mut u64, decimaldigits : *mut i16, nullable : *mut i16) -> i16); - unsafe { - SQLDescribeCol( - core::mem::transmute(statementhandle), - 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::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())), - ) - } + unsafe { SQLDescribeCol(statementhandle as _, 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()), namelength.unwrap_or(core::mem::zeroed()) as _, datatype.unwrap_or(core::mem::zeroed()) as _, columnsize.unwrap_or(core::mem::zeroed()) as _, decimaldigits.unwrap_or(core::mem::zeroed()) as _, nullable.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(target_arch = "x86")] #[inline] pub unsafe fn SQLDescribeColA(hstmt: *mut core::ffi::c_void, icol: u16, szcolname: Option<&mut [u8]>, pcbcolname: Option<*mut i16>, pfsqltype: Option<*mut i16>, pcbcoldef: Option<*mut u32>, pibscale: Option<*mut i16>, pfnullable: Option<*mut i16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLDescribeColA(hstmt : *mut core::ffi::c_void, icol : u16, szcolname : *mut u8, cbcolnamemax : i16, pcbcolname : *mut i16, pfsqltype : *mut i16, pcbcoldef : *mut u32, pibscale : *mut i16, pfnullable : *mut i16) -> i16); - unsafe { - SQLDescribeColA( - core::mem::transmute(hstmt), - 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::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())), - ) - } + unsafe { SQLDescribeColA(hstmt as _, 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()), pcbcolname.unwrap_or(core::mem::zeroed()) as _, pfsqltype.unwrap_or(core::mem::zeroed()) as _, pcbcoldef.unwrap_or(core::mem::zeroed()) as _, pibscale.unwrap_or(core::mem::zeroed()) as _, pfnullable.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] pub unsafe fn SQLDescribeColA(hstmt: *mut core::ffi::c_void, icol: u16, szcolname: Option<&mut [u8]>, pcbcolname: Option<*mut i16>, pfsqltype: Option<*mut i16>, pcbcoldef: Option<*mut u64>, pibscale: Option<*mut i16>, pfnullable: Option<*mut i16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLDescribeColA(hstmt : *mut core::ffi::c_void, icol : u16, szcolname : *mut u8, cbcolnamemax : i16, pcbcolname : *mut i16, pfsqltype : *mut i16, pcbcoldef : *mut u64, pibscale : *mut i16, pfnullable : *mut i16) -> i16); - unsafe { - SQLDescribeColA( - core::mem::transmute(hstmt), - 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::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())), - ) - } + unsafe { SQLDescribeColA(hstmt as _, 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()), pcbcolname.unwrap_or(core::mem::zeroed()) as _, pfsqltype.unwrap_or(core::mem::zeroed()) as _, pcbcoldef.unwrap_or(core::mem::zeroed()) as _, pibscale.unwrap_or(core::mem::zeroed()) as _, pfnullable.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(target_arch = "x86")] #[inline] pub unsafe fn SQLDescribeColW(hstmt: *mut core::ffi::c_void, icol: u16, szcolname: Option<&mut [u16]>, pcchcolname: Option<*mut i16>, pfsqltype: Option<*mut i16>, pcbcoldef: Option<*mut u32>, pibscale: Option<*mut i16>, pfnullable: Option<*mut i16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLDescribeColW(hstmt : *mut core::ffi::c_void, icol : u16, szcolname : *mut u16, cchcolnamemax : i16, pcchcolname : *mut i16, pfsqltype : *mut i16, pcbcoldef : *mut u32, pibscale : *mut i16, pfnullable : *mut i16) -> i16); - unsafe { - SQLDescribeColW( - core::mem::transmute(hstmt), - 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::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())), - ) - } + unsafe { SQLDescribeColW(hstmt as _, 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()), pcchcolname.unwrap_or(core::mem::zeroed()) as _, pfsqltype.unwrap_or(core::mem::zeroed()) as _, pcbcoldef.unwrap_or(core::mem::zeroed()) as _, pibscale.unwrap_or(core::mem::zeroed()) as _, pfnullable.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] pub unsafe fn SQLDescribeColW(hstmt: *mut core::ffi::c_void, icol: u16, szcolname: Option<&mut [u16]>, pcchcolname: Option<*mut i16>, pfsqltype: Option<*mut i16>, pcbcoldef: Option<*mut u64>, pibscale: Option<*mut i16>, pfnullable: Option<*mut i16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLDescribeColW(hstmt : *mut core::ffi::c_void, icol : u16, szcolname : *mut u16, cchcolnamemax : i16, pcchcolname : *mut i16, pfsqltype : *mut i16, pcbcoldef : *mut u64, pibscale : *mut i16, pfnullable : *mut i16) -> i16); - unsafe { - SQLDescribeColW( - core::mem::transmute(hstmt), - 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::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())), - ) - } + unsafe { SQLDescribeColW(hstmt as _, 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()), pcchcolname.unwrap_or(core::mem::zeroed()) as _, pfsqltype.unwrap_or(core::mem::zeroed()) as _, pcbcoldef.unwrap_or(core::mem::zeroed()) as _, pibscale.unwrap_or(core::mem::zeroed()) as _, pfnullable.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { SQLDescribeParam(core::mem::transmute(hstmt), 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()))) } + unsafe { SQLDescribeParam(hstmt as _, ipar, pfsqltype.unwrap_or(core::mem::zeroed()) as _, pcbparamdef.unwrap_or(core::mem::zeroed()) as _, pibscale.unwrap_or(core::mem::zeroed()) as _, pfnullable.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { SQLDescribeParam(core::mem::transmute(hstmt), 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()))) } + unsafe { SQLDescribeParam(hstmt as _, ipar, pfsqltype.unwrap_or(core::mem::zeroed()) as _, pcbparamdef.unwrap_or(core::mem::zeroed()) as _, pibscale.unwrap_or(core::mem::zeroed()) as _, pfnullable.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SQLDisconnect(connectionhandle: *mut core::ffi::c_void) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLDisconnect(connectionhandle : *mut core::ffi::c_void) -> i16); - unsafe { SQLDisconnect(core::mem::transmute(connectionhandle)) } + unsafe { SQLDisconnect(connectionhandle as _) } } #[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); - unsafe { SQLDriverConnect(core::mem::transmute(hdbc), hwnd, core::mem::transmute(szconnstrin.as_ptr()), szconnstrin.len().try_into().unwrap(), core::mem::transmute(szconnstrout.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szconnstrout.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcchconnstrout.unwrap_or(core::mem::zeroed())), fdrivercompletion) } + unsafe { SQLDriverConnect(hdbc as _, 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()), pcchconnstrout.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { SQLDriverConnectA(core::mem::transmute(hdbc), hwnd, core::mem::transmute(szconnstrin.as_ptr()), szconnstrin.len().try_into().unwrap(), core::mem::transmute(szconnstrout.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szconnstrout.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbconnstrout.unwrap_or(core::mem::zeroed())), fdrivercompletion) } + unsafe { SQLDriverConnectA(hdbc as _, 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()), pcbconnstrout.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { SQLDriverConnectW(core::mem::transmute(hdbc), hwnd, core::mem::transmute(szconnstrin.as_ptr()), szconnstrin.len().try_into().unwrap(), core::mem::transmute(szconnstrout.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szconnstrout.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcchconnstrout.unwrap_or(core::mem::zeroed())), fdrivercompletion) } + unsafe { SQLDriverConnectW(hdbc as _, 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()), pcchconnstrout.unwrap_or(core::mem::zeroed()) as _, 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 { windows_targets::link!("odbc32.dll" "system" fn SQLDrivers(henv : *mut core::ffi::c_void, fdirection : u16, szdriverdesc : *mut u8, cchdriverdescmax : i16, pcchdriverdesc : *mut i16, szdriverattributes : *mut u8, cchdrvrattrmax : i16, pcchdrvrattr : *mut i16) -> i16); unsafe { SQLDrivers( - core::mem::transmute(henv), + henv as _, 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::mem::zeroed())), + pcchdriverdesc.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + pcchdrvrattr.unwrap_or(core::mem::zeroed()) as _, ) } } #[inline] pub unsafe fn SQLDriversA(henv: *mut core::ffi::c_void, fdirection: u16, szdriverdesc: Option<&mut [u8]>, pcbdriverdesc: Option<*mut i16>, szdriverattributes: Option<&mut [u8]>, pcbdrvrattr: Option<*mut i16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLDriversA(henv : *mut core::ffi::c_void, fdirection : u16, szdriverdesc : *mut u8, cbdriverdescmax : i16, pcbdriverdesc : *mut i16, szdriverattributes : *mut u8, cbdrvrattrmax : i16, pcbdrvrattr : *mut i16) -> i16); - unsafe { - SQLDriversA( - core::mem::transmute(henv), - 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::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::mem::zeroed())), - ) - } + unsafe { SQLDriversA(henv as _, 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()), pcbdriverdesc.unwrap_or(core::mem::zeroed()) as _, 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()), pcbdrvrattr.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SQLDriversW(henv: *mut core::ffi::c_void, fdirection: u16, szdriverdesc: Option<&mut [u16]>, pcchdriverdesc: Option<*mut i16>, szdriverattributes: Option<&mut [u16]>, pcchdrvrattr: Option<*mut i16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLDriversW(henv : *mut core::ffi::c_void, fdirection : u16, szdriverdesc : *mut u16, cchdriverdescmax : i16, pcchdriverdesc : *mut i16, szdriverattributes : *mut u16, cchdrvrattrmax : i16, pcchdrvrattr : *mut i16) -> i16); unsafe { SQLDriversW( - core::mem::transmute(henv), + henv as _, 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::mem::zeroed())), + pcchdriverdesc.unwrap_or(core::mem::zeroed()) as _, 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::mem::zeroed())), + pcchdrvrattr.unwrap_or(core::mem::zeroed()) as _, ) } } #[inline] pub unsafe fn SQLEndTran(handletype: i16, handle: *mut core::ffi::c_void, completiontype: i16) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLEndTran(handletype : i16, handle : *mut core::ffi::c_void, completiontype : i16) -> i16); - unsafe { SQLEndTran(handletype, core::mem::transmute(handle), completiontype) } + unsafe { SQLEndTran(handletype, handle as _, completiontype) } } #[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); - unsafe { 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()))) } + unsafe { SQLError(environmenthandle as _, connectionhandle as _, statementhandle as _, core::mem::transmute(sqlstate.as_ptr()), nativeerror.unwrap_or(core::mem::zeroed()) as _, 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()), textlength.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { 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()))) } + unsafe { SQLErrorA(henv as _, hdbc as _, hstmt as _, szsqlstate as _, pfnativeerror.unwrap_or(core::mem::zeroed()) as _, 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()), pcberrormsg.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { 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()))) } + unsafe { SQLErrorW(henv as _, hdbc as _, hstmt as _, core::mem::transmute(wszsqlstate.as_ptr()), pfnativeerror.unwrap_or(core::mem::zeroed()) as _, 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()), pccherrormsg.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SQLExecDirect(statementhandle: *mut core::ffi::c_void, statementtext: Option<&[u8]>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLExecDirect(statementhandle : *mut core::ffi::c_void, statementtext : *const u8, textlength : i32) -> i16); - unsafe { SQLExecDirect(core::mem::transmute(statementhandle), core::mem::transmute(statementtext.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), statementtext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } + unsafe { SQLExecDirect(statementhandle as _, core::mem::transmute(statementtext.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), statementtext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } } #[inline] pub unsafe fn SQLExecDirectA(hstmt: *mut core::ffi::c_void, szsqlstr: Option<&[u8]>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLExecDirectA(hstmt : *mut core::ffi::c_void, szsqlstr : *const u8, cbsqlstr : i32) -> i16); - unsafe { SQLExecDirectA(core::mem::transmute(hstmt), core::mem::transmute(szsqlstr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szsqlstr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } + unsafe { SQLExecDirectA(hstmt as _, core::mem::transmute(szsqlstr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szsqlstr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } } #[inline] pub unsafe fn SQLExecDirectW(hstmt: *mut core::ffi::c_void, szsqlstr: Option<&[u16]>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLExecDirectW(hstmt : *mut core::ffi::c_void, szsqlstr : *const u16, textlength : i32) -> i16); - unsafe { SQLExecDirectW(core::mem::transmute(hstmt), core::mem::transmute(szsqlstr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szsqlstr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } + unsafe { SQLExecDirectW(hstmt as _, core::mem::transmute(szsqlstr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szsqlstr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } } #[inline] pub unsafe fn SQLExecute(statementhandle: *mut core::ffi::c_void) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLExecute(statementhandle : *mut core::ffi::c_void) -> i16); - unsafe { SQLExecute(core::mem::transmute(statementhandle)) } + unsafe { SQLExecute(statementhandle as _) } } #[cfg(target_arch = "x86")] #[inline] pub unsafe fn SQLExtendedFetch(hstmt: *mut core::ffi::c_void, ffetchtype: u16, irow: i32, pcrow: Option<*mut u32>, rgfrowstatus: Option<*mut u16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLExtendedFetch(hstmt : *mut core::ffi::c_void, ffetchtype : u16, irow : i32, pcrow : *mut u32, rgfrowstatus : *mut u16) -> i16); - unsafe { SQLExtendedFetch(core::mem::transmute(hstmt), ffetchtype, irow, core::mem::transmute(pcrow.unwrap_or(core::mem::zeroed())), core::mem::transmute(rgfrowstatus.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLExtendedFetch(hstmt as _, ffetchtype, irow, pcrow.unwrap_or(core::mem::zeroed()) as _, rgfrowstatus.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { SQLExtendedFetch(core::mem::transmute(hstmt), ffetchtype, irow, core::mem::transmute(pcrow.unwrap_or(core::mem::zeroed())), core::mem::transmute(rgfrowstatus.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLExtendedFetch(hstmt as _, ffetchtype, irow, pcrow.unwrap_or(core::mem::zeroed()) as _, rgfrowstatus.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SQLFetch(statementhandle: *mut core::ffi::c_void) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLFetch(statementhandle : *mut core::ffi::c_void) -> i16); - unsafe { SQLFetch(core::mem::transmute(statementhandle)) } + unsafe { SQLFetch(statementhandle as _) } } #[cfg(target_arch = "x86")] #[inline] pub unsafe fn SQLFetchScroll(statementhandle: *mut core::ffi::c_void, fetchorientation: i16, fetchoffset: i32) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLFetchScroll(statementhandle : *mut core::ffi::c_void, fetchorientation : i16, fetchoffset : i32) -> i16); - unsafe { SQLFetchScroll(core::mem::transmute(statementhandle), fetchorientation, fetchoffset) } + unsafe { SQLFetchScroll(statementhandle as _, fetchorientation, fetchoffset) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] pub unsafe fn SQLFetchScroll(statementhandle: *mut core::ffi::c_void, fetchorientation: i16, fetchoffset: i64) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLFetchScroll(statementhandle : *mut core::ffi::c_void, fetchorientation : i16, fetchoffset : i64) -> i16); - unsafe { SQLFetchScroll(core::mem::transmute(statementhandle), fetchorientation, fetchoffset) } + unsafe { SQLFetchScroll(statementhandle as _, fetchorientation, fetchoffset) } } #[inline] pub unsafe fn SQLForeignKeys(hstmt: *mut core::ffi::c_void, szpkcatalogname: Option<&[u8]>, szpkschemaname: Option<&[u8]>, szpktablename: Option<&[u8]>, szfkcatalogname: Option<&[u8]>, szfkschemaname: Option<&[u8]>, szfktablename: Option<&[u8]>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLForeignKeys(hstmt : *mut core::ffi::c_void, szpkcatalogname : *const u8, cchpkcatalogname : i16, szpkschemaname : *const u8, cchpkschemaname : i16, szpktablename : *const u8, cchpktablename : i16, szfkcatalogname : *const u8, cchfkcatalogname : i16, szfkschemaname : *const u8, cchfkschemaname : i16, szfktablename : *const u8, cchfktablename : i16) -> i16); unsafe { SQLForeignKeys( - core::mem::transmute(hstmt), + hstmt as _, core::mem::transmute(szpkcatalogname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szpkcatalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szpkschemaname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -630,7 +525,7 @@ pub unsafe fn SQLForeignKeysA(hstmt: *mut core::ffi::c_void, szpkcatalogname: Op windows_targets::link!("odbc32.dll" "system" fn SQLForeignKeysA(hstmt : *mut core::ffi::c_void, szpkcatalogname : *const u8, cbpkcatalogname : i16, szpkschemaname : *const u8, cbpkschemaname : i16, szpktablename : *const u8, cbpktablename : i16, szfkcatalogname : *const u8, cbfkcatalogname : i16, szfkschemaname : *const u8, cbfkschemaname : i16, szfktablename : *const u8, cbfktablename : i16) -> i16); unsafe { SQLForeignKeysA( - core::mem::transmute(hstmt), + hstmt as _, core::mem::transmute(szpkcatalogname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szpkcatalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szpkschemaname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -651,7 +546,7 @@ pub unsafe fn SQLForeignKeysW(hstmt: *mut core::ffi::c_void, szpkcatalogname: Op windows_targets::link!("odbc32.dll" "system" fn SQLForeignKeysW(hstmt : *mut core::ffi::c_void, szpkcatalogname : *const u16, cchpkcatalogname : i16, szpkschemaname : *const u16, cchpkschemaname : i16, szpktablename : *const u16, cchpktablename : i16, szfkcatalogname : *const u16, cchfkcatalogname : i16, szfkschemaname : *const u16, cchfkschemaname : i16, szfktablename : *const u16, cchfktablename : i16) -> i16); unsafe { SQLForeignKeysW( - core::mem::transmute(hstmt), + hstmt as _, core::mem::transmute(szpkcatalogname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szpkcatalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szpkschemaname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -670,94 +565,94 @@ pub unsafe fn SQLForeignKeysW(hstmt: *mut core::ffi::c_void, szpkcatalogname: Op #[inline] pub unsafe fn SQLFreeConnect(connectionhandle: *mut core::ffi::c_void) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLFreeConnect(connectionhandle : *mut core::ffi::c_void) -> i16); - unsafe { SQLFreeConnect(core::mem::transmute(connectionhandle)) } + unsafe { SQLFreeConnect(connectionhandle as _) } } #[inline] pub unsafe fn SQLFreeEnv(environmenthandle: *mut core::ffi::c_void) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLFreeEnv(environmenthandle : *mut core::ffi::c_void) -> i16); - unsafe { SQLFreeEnv(core::mem::transmute(environmenthandle)) } + unsafe { SQLFreeEnv(environmenthandle as _) } } #[inline] pub unsafe fn SQLFreeHandle(handletype: i16, handle: *mut core::ffi::c_void) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLFreeHandle(handletype : i16, handle : *mut core::ffi::c_void) -> i16); - unsafe { SQLFreeHandle(handletype, core::mem::transmute(handle)) } + unsafe { SQLFreeHandle(handletype, handle as _) } } #[inline] pub unsafe fn SQLFreeStmt(statementhandle: *mut core::ffi::c_void, option: u16) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLFreeStmt(statementhandle : *mut core::ffi::c_void, option : u16) -> i16); - unsafe { SQLFreeStmt(core::mem::transmute(statementhandle), option) } + unsafe { SQLFreeStmt(statementhandle as _, option) } } #[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); - unsafe { SQLGetConnectAttr(core::mem::transmute(connectionhandle), attribute, core::mem::transmute(value.unwrap_or(core::mem::zeroed())), bufferlength, core::mem::transmute(stringlengthptr.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLGetConnectAttr(connectionhandle as _, attribute, value.unwrap_or(core::mem::zeroed()) as _, bufferlength, stringlengthptr.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { SQLGetConnectAttrA(core::mem::transmute(hdbc), fattribute, core::mem::transmute(rgbvalue.unwrap_or(core::mem::zeroed())), cbvaluemax, core::mem::transmute(pcbvalue.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLGetConnectAttrA(hdbc as _, fattribute, rgbvalue.unwrap_or(core::mem::zeroed()) as _, cbvaluemax, pcbvalue.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { SQLGetConnectAttrW(core::mem::transmute(hdbc), fattribute, core::mem::transmute(rgbvalue.unwrap_or(core::mem::zeroed())), cbvaluemax, core::mem::transmute(pcbvalue.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLGetConnectAttrW(hdbc as _, fattribute, rgbvalue.unwrap_or(core::mem::zeroed()) as _, cbvaluemax, pcbvalue.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SQLGetConnectOption(connectionhandle: *mut core::ffi::c_void, option: u16, value: *mut core::ffi::c_void) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLGetConnectOption(connectionhandle : *mut core::ffi::c_void, option : u16, value : *mut core::ffi::c_void) -> i16); - unsafe { SQLGetConnectOption(core::mem::transmute(connectionhandle), option, core::mem::transmute(value)) } + unsafe { SQLGetConnectOption(connectionhandle as _, option, value as _) } } #[inline] pub unsafe fn SQLGetConnectOptionA(hdbc: *mut core::ffi::c_void, foption: u16, pvparam: *mut core::ffi::c_void) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLGetConnectOptionA(hdbc : *mut core::ffi::c_void, foption : u16, pvparam : *mut core::ffi::c_void) -> i16); - unsafe { SQLGetConnectOptionA(core::mem::transmute(hdbc), foption, core::mem::transmute(pvparam)) } + unsafe { SQLGetConnectOptionA(hdbc as _, foption, pvparam as _) } } #[inline] pub unsafe fn SQLGetConnectOptionW(hdbc: *mut core::ffi::c_void, foption: u16, pvparam: *mut core::ffi::c_void) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLGetConnectOptionW(hdbc : *mut core::ffi::c_void, foption : u16, pvparam : *mut core::ffi::c_void) -> i16); - unsafe { SQLGetConnectOptionW(core::mem::transmute(hdbc), foption, core::mem::transmute(pvparam)) } + unsafe { SQLGetConnectOptionW(hdbc as _, foption, pvparam as _) } } #[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); - unsafe { 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()))) } + unsafe { SQLGetCursorName(statementhandle as _, 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()), namelengthptr.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { 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()))) } + unsafe { SQLGetCursorNameA(hstmt as _, 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()), pcbcursor.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { 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()))) } + unsafe { SQLGetCursorNameW(hstmt as _, 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()), pcchcursor.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { SQLGetData(core::mem::transmute(statementhandle), columnnumber, targettype, core::mem::transmute(targetvalue.unwrap_or(core::mem::zeroed())), bufferlength, core::mem::transmute(strlen_or_indptr.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLGetData(statementhandle as _, columnnumber, targettype, targetvalue.unwrap_or(core::mem::zeroed()) as _, bufferlength, strlen_or_indptr.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { SQLGetData(core::mem::transmute(statementhandle), columnnumber, targettype, core::mem::transmute(targetvalue.unwrap_or(core::mem::zeroed())), bufferlength, core::mem::transmute(strlen_or_indptr.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLGetData(statementhandle as _, columnnumber, targettype, targetvalue.unwrap_or(core::mem::zeroed()) as _, bufferlength, strlen_or_indptr.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { SQLGetDescField(core::mem::transmute(descriptorhandle), recnumber, fieldidentifier, core::mem::transmute(value.unwrap_or(core::mem::zeroed())), bufferlength, core::mem::transmute(stringlength.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLGetDescField(descriptorhandle as _, recnumber, fieldidentifier, value.unwrap_or(core::mem::zeroed()) as _, bufferlength, stringlength.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { SQLGetDescFieldA(core::mem::transmute(hdesc), irecord, ifield, core::mem::transmute(rgbvalue.unwrap_or(core::mem::zeroed())), cbbufferlength, core::mem::transmute(stringlength.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLGetDescFieldA(hdesc as _, irecord, ifield, rgbvalue.unwrap_or(core::mem::zeroed()) as _, cbbufferlength, stringlength.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { SQLGetDescFieldW(core::mem::transmute(hdesc), irecord, ifield, core::mem::transmute(rgbvalue.unwrap_or(core::mem::zeroed())), cbbufferlength, core::mem::transmute(stringlength.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLGetDescFieldW(hdesc as _, irecord, ifield, rgbvalue.unwrap_or(core::mem::zeroed()) as _, cbbufferlength, stringlength.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(target_arch = "x86")] #[inline] @@ -765,17 +660,17 @@ pub unsafe fn SQLGetDescRec(descriptorhandle: *mut core::ffi::c_void, recnumber: windows_targets::link!("odbc32.dll" "system" fn SQLGetDescRec(descriptorhandle : *mut core::ffi::c_void, recnumber : i16, name : *mut u8, bufferlength : i16, stringlengthptr : *mut i16, typeptr : *mut i16, subtypeptr : *mut i16, lengthptr : *mut i32, precisionptr : *mut i16, scaleptr : *mut i16, nullableptr : *mut i16) -> i16); unsafe { SQLGetDescRec( - core::mem::transmute(descriptorhandle), + descriptorhandle as _, 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::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())), + stringlengthptr.unwrap_or(core::mem::zeroed()) as _, + typeptr.unwrap_or(core::mem::zeroed()) as _, + subtypeptr.unwrap_or(core::mem::zeroed()) as _, + lengthptr.unwrap_or(core::mem::zeroed()) as _, + precisionptr.unwrap_or(core::mem::zeroed()) as _, + scaleptr.unwrap_or(core::mem::zeroed()) as _, + nullableptr.unwrap_or(core::mem::zeroed()) as _, ) } } @@ -785,17 +680,17 @@ pub unsafe fn SQLGetDescRec(descriptorhandle: *mut core::ffi::c_void, recnumber: windows_targets::link!("odbc32.dll" "system" fn SQLGetDescRec(descriptorhandle : *mut core::ffi::c_void, recnumber : i16, name : *mut u8, bufferlength : i16, stringlengthptr : *mut i16, typeptr : *mut i16, subtypeptr : *mut i16, lengthptr : *mut i64, precisionptr : *mut i16, scaleptr : *mut i16, nullableptr : *mut i16) -> i16); unsafe { SQLGetDescRec( - core::mem::transmute(descriptorhandle), + descriptorhandle as _, 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::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())), + stringlengthptr.unwrap_or(core::mem::zeroed()) as _, + typeptr.unwrap_or(core::mem::zeroed()) as _, + subtypeptr.unwrap_or(core::mem::zeroed()) as _, + lengthptr.unwrap_or(core::mem::zeroed()) as _, + precisionptr.unwrap_or(core::mem::zeroed()) as _, + scaleptr.unwrap_or(core::mem::zeroed()) as _, + nullableptr.unwrap_or(core::mem::zeroed()) as _, ) } } @@ -805,17 +700,17 @@ pub unsafe fn SQLGetDescRecA(hdesc: *mut core::ffi::c_void, irecord: i16, szname windows_targets::link!("odbc32.dll" "system" fn SQLGetDescRecA(hdesc : *mut core::ffi::c_void, irecord : i16, szname : *mut u8, cbnamemax : i16, pcbname : *mut i16, pftype : *mut i16, pfsubtype : *mut i16, plength : *mut i32, pprecision : *mut i16, pscale : *mut i16, pnullable : *mut i16) -> i16); unsafe { SQLGetDescRecA( - core::mem::transmute(hdesc), + hdesc as _, 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::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())), + pcbname.unwrap_or(core::mem::zeroed()) as _, + pftype.unwrap_or(core::mem::zeroed()) as _, + pfsubtype.unwrap_or(core::mem::zeroed()) as _, + plength.unwrap_or(core::mem::zeroed()) as _, + pprecision.unwrap_or(core::mem::zeroed()) as _, + pscale.unwrap_or(core::mem::zeroed()) as _, + pnullable.unwrap_or(core::mem::zeroed()) as _, ) } } @@ -825,17 +720,17 @@ pub unsafe fn SQLGetDescRecA(hdesc: *mut core::ffi::c_void, irecord: i16, szname windows_targets::link!("odbc32.dll" "system" fn SQLGetDescRecA(hdesc : *mut core::ffi::c_void, irecord : i16, szname : *mut u8, cbnamemax : i16, pcbname : *mut i16, pftype : *mut i16, pfsubtype : *mut i16, plength : *mut i64, pprecision : *mut i16, pscale : *mut i16, pnullable : *mut i16) -> i16); unsafe { SQLGetDescRecA( - core::mem::transmute(hdesc), + hdesc as _, 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::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())), + pcbname.unwrap_or(core::mem::zeroed()) as _, + pftype.unwrap_or(core::mem::zeroed()) as _, + pfsubtype.unwrap_or(core::mem::zeroed()) as _, + plength.unwrap_or(core::mem::zeroed()) as _, + pprecision.unwrap_or(core::mem::zeroed()) as _, + pscale.unwrap_or(core::mem::zeroed()) as _, + pnullable.unwrap_or(core::mem::zeroed()) as _, ) } } @@ -845,17 +740,17 @@ pub unsafe fn SQLGetDescRecW(hdesc: *mut core::ffi::c_void, irecord: i16, szname windows_targets::link!("odbc32.dll" "system" fn SQLGetDescRecW(hdesc : *mut core::ffi::c_void, irecord : i16, szname : *mut u16, cchnamemax : i16, pcchname : *mut i16, pftype : *mut i16, pfsubtype : *mut i16, plength : *mut i32, pprecision : *mut i16, pscale : *mut i16, pnullable : *mut i16) -> i16); unsafe { SQLGetDescRecW( - core::mem::transmute(hdesc), + hdesc as _, 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::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())), + pcchname.unwrap_or(core::mem::zeroed()) as _, + pftype.unwrap_or(core::mem::zeroed()) as _, + pfsubtype.unwrap_or(core::mem::zeroed()) as _, + plength.unwrap_or(core::mem::zeroed()) as _, + pprecision.unwrap_or(core::mem::zeroed()) as _, + pscale.unwrap_or(core::mem::zeroed()) as _, + pnullable.unwrap_or(core::mem::zeroed()) as _, ) } } @@ -865,114 +760,114 @@ pub unsafe fn SQLGetDescRecW(hdesc: *mut core::ffi::c_void, irecord: i16, szname windows_targets::link!("odbc32.dll" "system" fn SQLGetDescRecW(hdesc : *mut core::ffi::c_void, irecord : i16, szname : *mut u16, cchnamemax : i16, pcchname : *mut i16, pftype : *mut i16, pfsubtype : *mut i16, plength : *mut i64, pprecision : *mut i16, pscale : *mut i16, pnullable : *mut i16) -> i16); unsafe { SQLGetDescRecW( - core::mem::transmute(hdesc), + hdesc as _, 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::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())), + pcchname.unwrap_or(core::mem::zeroed()) as _, + pftype.unwrap_or(core::mem::zeroed()) as _, + pfsubtype.unwrap_or(core::mem::zeroed()) as _, + plength.unwrap_or(core::mem::zeroed()) as _, + pprecision.unwrap_or(core::mem::zeroed()) as _, + pscale.unwrap_or(core::mem::zeroed()) as _, + pnullable.unwrap_or(core::mem::zeroed()) as _, ) } } #[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); - unsafe { SQLGetDiagField(handletype, core::mem::transmute(handle), recnumber, diagidentifier, core::mem::transmute(diaginfo.unwrap_or(core::mem::zeroed())), bufferlength, core::mem::transmute(stringlength.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLGetDiagField(handletype, handle as _, recnumber, diagidentifier, diaginfo.unwrap_or(core::mem::zeroed()) as _, bufferlength, stringlength.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { SQLGetDiagFieldA(fhandletype, core::mem::transmute(handle), irecord, fdiagfield, core::mem::transmute(rgbdiaginfo.unwrap_or(core::mem::zeroed())), cbdiaginfomax, core::mem::transmute(pcbdiaginfo.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLGetDiagFieldA(fhandletype, handle as _, irecord, fdiagfield, rgbdiaginfo.unwrap_or(core::mem::zeroed()) as _, cbdiaginfomax, pcbdiaginfo.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { SQLGetDiagFieldW(fhandletype, core::mem::transmute(handle), irecord, fdiagfield, core::mem::transmute(rgbdiaginfo.unwrap_or(core::mem::zeroed())), cbbufferlength, core::mem::transmute(pcbstringlength.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLGetDiagFieldW(fhandletype, handle as _, irecord, fdiagfield, rgbdiaginfo.unwrap_or(core::mem::zeroed()) as _, cbbufferlength, pcbstringlength.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { SQLGetDiagRec(handletype, core::mem::transmute(handle), 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()))) } + unsafe { SQLGetDiagRec(handletype, handle as _, recnumber, core::mem::transmute(sqlstate.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), nativeerror as _, 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()), textlength.unwrap_or(core::mem::zeroed()) as _) } } #[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 { windows_targets::link!("odbc32.dll" "system" fn SQLGetDiagRecA(fhandletype : i16, handle : *mut core::ffi::c_void, irecord : i16, szsqlstate : *mut u8, pfnativeerror : *mut i32, szerrormsg : *mut u8, cberrormsgmax : i16, pcberrormsg : *mut i16) -> i16); - unsafe { SQLGetDiagRecA(fhandletype, core::mem::transmute(handle), irecord, core::mem::transmute(szsqlstate.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pfnativeerror), 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)) } + unsafe { SQLGetDiagRecA(fhandletype, handle as _, irecord, core::mem::transmute(szsqlstate.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pfnativeerror as _, 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()), pcberrormsg as _) } } #[inline] pub unsafe fn SQLGetDiagRecW(fhandletype: i16, handle: *mut core::ffi::c_void, irecord: i16, szsqlstate: Option<&mut [u16; 6]>, pfnativeerror: *mut i32, szerrormsg: Option<&mut [u16]>, pccherrormsg: *mut i16) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLGetDiagRecW(fhandletype : i16, handle : *mut core::ffi::c_void, irecord : i16, szsqlstate : *mut u16, pfnativeerror : *mut i32, szerrormsg : *mut u16, ccherrormsgmax : i16, pccherrormsg : *mut i16) -> i16); - unsafe { SQLGetDiagRecW(fhandletype, core::mem::transmute(handle), irecord, core::mem::transmute(szsqlstate.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pfnativeerror), 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(pccherrormsg)) } + unsafe { SQLGetDiagRecW(fhandletype, handle as _, irecord, core::mem::transmute(szsqlstate.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pfnativeerror as _, 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()), pccherrormsg as _) } } #[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); - unsafe { SQLGetEnvAttr(core::mem::transmute(environmenthandle), attribute, core::mem::transmute(value), bufferlength, core::mem::transmute(stringlength.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLGetEnvAttr(environmenthandle as _, attribute, value as _, bufferlength, stringlength.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { SQLGetFunctions(core::mem::transmute(connectionhandle), functionid, core::mem::transmute(supported.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLGetFunctions(connectionhandle as _, functionid, supported.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { SQLGetInfo(core::mem::transmute(connectionhandle), infotype, core::mem::transmute(infovalue.unwrap_or(core::mem::zeroed())), bufferlength, core::mem::transmute(stringlengthptr.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLGetInfo(connectionhandle as _, infotype, infovalue.unwrap_or(core::mem::zeroed()) as _, bufferlength, stringlengthptr.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { SQLGetInfoA(core::mem::transmute(hdbc), finfotype, core::mem::transmute(rgbinfovalue.unwrap_or(core::mem::zeroed())), cbinfovaluemax, core::mem::transmute(pcbinfovalue.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLGetInfoA(hdbc as _, finfotype, rgbinfovalue.unwrap_or(core::mem::zeroed()) as _, cbinfovaluemax, pcbinfovalue.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { SQLGetInfoW(core::mem::transmute(hdbc), finfotype, core::mem::transmute(rgbinfovalue.unwrap_or(core::mem::zeroed())), cbinfovaluemax, core::mem::transmute(pcbinfovalue.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLGetInfoW(hdbc as _, finfotype, rgbinfovalue.unwrap_or(core::mem::zeroed()) as _, cbinfovaluemax, pcbinfovalue.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { SQLGetNextEnumeration(henumhandle, core::mem::transmute(prgenumdata), core::mem::transmute(pienumlength)) } + unsafe { SQLGetNextEnumeration(henumhandle, prgenumdata as _, pienumlength as _) } } #[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); - unsafe { SQLGetStmtAttr(core::mem::transmute(statementhandle), attribute, core::mem::transmute(value.unwrap_or(core::mem::zeroed())), bufferlength, core::mem::transmute(stringlength.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLGetStmtAttr(statementhandle as _, attribute, value.unwrap_or(core::mem::zeroed()) as _, bufferlength, stringlength.unwrap_or(core::mem::zeroed()) as _) } } #[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 { windows_targets::link!("odbc32.dll" "system" fn SQLGetStmtAttrA(hstmt : *mut core::ffi::c_void, fattribute : i32, rgbvalue : *mut core::ffi::c_void, cbvaluemax : i32, pcbvalue : *mut i32) -> i16); - unsafe { SQLGetStmtAttrA(core::mem::transmute(hstmt), fattribute, core::mem::transmute(rgbvalue), cbvaluemax, core::mem::transmute(pcbvalue)) } + unsafe { SQLGetStmtAttrA(hstmt as _, fattribute, rgbvalue as _, cbvaluemax, pcbvalue as _) } } #[inline] pub unsafe fn SQLGetStmtAttrW(hstmt: *mut core::ffi::c_void, fattribute: i32, rgbvalue: *mut core::ffi::c_void, cbvaluemax: i32, pcbvalue: *mut i32) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLGetStmtAttrW(hstmt : *mut core::ffi::c_void, fattribute : i32, rgbvalue : *mut core::ffi::c_void, cbvaluemax : i32, pcbvalue : *mut i32) -> i16); - unsafe { SQLGetStmtAttrW(core::mem::transmute(hstmt), fattribute, core::mem::transmute(rgbvalue), cbvaluemax, core::mem::transmute(pcbvalue)) } + unsafe { SQLGetStmtAttrW(hstmt as _, fattribute, rgbvalue as _, cbvaluemax, pcbvalue as _) } } #[inline] pub unsafe fn SQLGetStmtOption(statementhandle: *mut core::ffi::c_void, option: u16, value: *mut core::ffi::c_void) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLGetStmtOption(statementhandle : *mut core::ffi::c_void, option : u16, value : *mut core::ffi::c_void) -> i16); - unsafe { SQLGetStmtOption(core::mem::transmute(statementhandle), option, core::mem::transmute(value)) } + unsafe { SQLGetStmtOption(statementhandle as _, option, value as _) } } #[inline] pub unsafe fn SQLGetTypeInfo(statementhandle: *mut core::ffi::c_void, datatype: i16) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLGetTypeInfo(statementhandle : *mut core::ffi::c_void, datatype : i16) -> i16); - unsafe { SQLGetTypeInfo(core::mem::transmute(statementhandle), datatype) } + unsafe { SQLGetTypeInfo(statementhandle as _, datatype) } } #[inline] pub unsafe fn SQLGetTypeInfoA(statementhandle: *mut core::ffi::c_void, datatype: i16) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLGetTypeInfoA(statementhandle : *mut core::ffi::c_void, datatype : i16) -> i16); - unsafe { SQLGetTypeInfoA(core::mem::transmute(statementhandle), datatype) } + unsafe { SQLGetTypeInfoA(statementhandle as _, datatype) } } #[inline] pub unsafe fn SQLGetTypeInfoW(statementhandle: *mut core::ffi::c_void, datatype: i16) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLGetTypeInfoW(statementhandle : *mut core::ffi::c_void, datatype : i16) -> i16); - unsafe { SQLGetTypeInfoW(core::mem::transmute(statementhandle), datatype) } + unsafe { SQLGetTypeInfoW(statementhandle as _, datatype) } } #[inline] pub unsafe fn SQLInitEnumServers(pwchservername: P0, pwchinstancename: P1) -> super::super::Foundation::HANDLE @@ -989,7 +884,7 @@ where P1: windows_core::Param, { windows_targets::link!("odbcbcp.dll" "system" fn SQLLinkedCatalogsA(param0 : *mut core::ffi::c_void, param1 : windows_core::PCSTR, param2 : i16) -> i16); - unsafe { SQLLinkedCatalogsA(core::mem::transmute(param0), param1.param().abi(), param2) } + unsafe { SQLLinkedCatalogsA(param0 as _, param1.param().abi(), param2) } } #[inline] pub unsafe fn SQLLinkedCatalogsW(param0: *mut core::ffi::c_void, param1: P1, param2: i16) -> i16 @@ -997,81 +892,81 @@ where P1: windows_core::Param, { windows_targets::link!("odbcbcp.dll" "system" fn SQLLinkedCatalogsW(param0 : *mut core::ffi::c_void, param1 : windows_core::PCWSTR, param2 : i16) -> i16); - unsafe { SQLLinkedCatalogsW(core::mem::transmute(param0), param1.param().abi(), param2) } + unsafe { SQLLinkedCatalogsW(param0 as _, param1.param().abi(), param2) } } #[inline] pub unsafe fn SQLLinkedServers(param0: *mut core::ffi::c_void) -> i16 { windows_targets::link!("odbcbcp.dll" "system" fn SQLLinkedServers(param0 : *mut core::ffi::c_void) -> i16); - unsafe { SQLLinkedServers(core::mem::transmute(param0)) } + unsafe { SQLLinkedServers(param0 as _) } } #[inline] pub unsafe fn SQLMoreResults(hstmt: *mut core::ffi::c_void) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLMoreResults(hstmt : *mut core::ffi::c_void) -> i16); - unsafe { SQLMoreResults(core::mem::transmute(hstmt)) } + unsafe { SQLMoreResults(hstmt as _) } } #[inline] pub unsafe fn SQLNativeSql(hdbc: *mut core::ffi::c_void, szsqlstrin: &[u8], szsqlstr: Option<&mut [u8]>, pcbsqlstr: *mut i32) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLNativeSql(hdbc : *mut core::ffi::c_void, szsqlstrin : *const u8, cchsqlstrin : i32, szsqlstr : *mut u8, cchsqlstrmax : i32, pcbsqlstr : *mut i32) -> i16); - unsafe { SQLNativeSql(core::mem::transmute(hdbc), core::mem::transmute(szsqlstrin.as_ptr()), szsqlstrin.len().try_into().unwrap(), core::mem::transmute(szsqlstr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szsqlstr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbsqlstr)) } + unsafe { SQLNativeSql(hdbc as _, core::mem::transmute(szsqlstrin.as_ptr()), szsqlstrin.len().try_into().unwrap(), core::mem::transmute(szsqlstr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szsqlstr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbsqlstr as _) } } #[inline] pub unsafe fn SQLNativeSqlA(hdbc: *mut core::ffi::c_void, szsqlstrin: &[u8], szsqlstr: Option<&mut [u8]>, pcbsqlstr: *mut i32) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLNativeSqlA(hdbc : *mut core::ffi::c_void, szsqlstrin : *const u8, cbsqlstrin : i32, szsqlstr : *mut u8, cbsqlstrmax : i32, pcbsqlstr : *mut i32) -> i16); - unsafe { SQLNativeSqlA(core::mem::transmute(hdbc), core::mem::transmute(szsqlstrin.as_ptr()), szsqlstrin.len().try_into().unwrap(), core::mem::transmute(szsqlstr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szsqlstr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbsqlstr)) } + unsafe { SQLNativeSqlA(hdbc as _, core::mem::transmute(szsqlstrin.as_ptr()), szsqlstrin.len().try_into().unwrap(), core::mem::transmute(szsqlstr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szsqlstr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbsqlstr as _) } } #[inline] pub unsafe fn SQLNativeSqlW(hdbc: *mut core::ffi::c_void, szsqlstrin: &[u16], szsqlstr: Option<&mut [u16]>, pcchsqlstr: *mut i32) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLNativeSqlW(hdbc : *mut core::ffi::c_void, szsqlstrin : *const u16, cchsqlstrin : i32, szsqlstr : *mut u16, cchsqlstrmax : i32, pcchsqlstr : *mut i32) -> i16); - unsafe { SQLNativeSqlW(core::mem::transmute(hdbc), core::mem::transmute(szsqlstrin.as_ptr()), szsqlstrin.len().try_into().unwrap(), core::mem::transmute(szsqlstr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szsqlstr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcchsqlstr)) } + unsafe { SQLNativeSqlW(hdbc as _, core::mem::transmute(szsqlstrin.as_ptr()), szsqlstrin.len().try_into().unwrap(), core::mem::transmute(szsqlstr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szsqlstr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcchsqlstr as _) } } #[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); - unsafe { SQLNumParams(core::mem::transmute(hstmt), core::mem::transmute(pcpar.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLNumParams(hstmt as _, pcpar.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SQLNumResultCols(statementhandle: *mut core::ffi::c_void, columncount: *mut i16) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLNumResultCols(statementhandle : *mut core::ffi::c_void, columncount : *mut i16) -> i16); - unsafe { SQLNumResultCols(core::mem::transmute(statementhandle), core::mem::transmute(columncount)) } + unsafe { SQLNumResultCols(statementhandle as _, columncount as _) } } #[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); - unsafe { SQLParamData(core::mem::transmute(statementhandle), core::mem::transmute(value.unwrap_or(core::mem::zeroed()))) } + unsafe { SQLParamData(statementhandle as _, value.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(target_arch = "x86")] #[inline] pub unsafe fn SQLParamOptions(hstmt: *mut core::ffi::c_void, crow: u32, pirow: *mut u32) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLParamOptions(hstmt : *mut core::ffi::c_void, crow : u32, pirow : *mut u32) -> i16); - unsafe { SQLParamOptions(core::mem::transmute(hstmt), crow, core::mem::transmute(pirow)) } + unsafe { SQLParamOptions(hstmt as _, crow, pirow as _) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] pub unsafe fn SQLParamOptions(hstmt: *mut core::ffi::c_void, crow: u64, pirow: *mut u64) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLParamOptions(hstmt : *mut core::ffi::c_void, crow : u64, pirow : *mut u64) -> i16); - unsafe { SQLParamOptions(core::mem::transmute(hstmt), crow, core::mem::transmute(pirow)) } + unsafe { SQLParamOptions(hstmt as _, crow, pirow as _) } } #[inline] pub unsafe fn SQLPrepare(statementhandle: *mut core::ffi::c_void, statementtext: &[u8]) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLPrepare(statementhandle : *mut core::ffi::c_void, statementtext : *const u8, textlength : i32) -> i16); - unsafe { SQLPrepare(core::mem::transmute(statementhandle), core::mem::transmute(statementtext.as_ptr()), statementtext.len().try_into().unwrap()) } + unsafe { SQLPrepare(statementhandle as _, core::mem::transmute(statementtext.as_ptr()), statementtext.len().try_into().unwrap()) } } #[inline] pub unsafe fn SQLPrepareA(hstmt: *mut core::ffi::c_void, szsqlstr: &[u8]) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLPrepareA(hstmt : *mut core::ffi::c_void, szsqlstr : *const u8, cbsqlstr : i32) -> i16); - unsafe { SQLPrepareA(core::mem::transmute(hstmt), core::mem::transmute(szsqlstr.as_ptr()), szsqlstr.len().try_into().unwrap()) } + unsafe { SQLPrepareA(hstmt as _, core::mem::transmute(szsqlstr.as_ptr()), szsqlstr.len().try_into().unwrap()) } } #[inline] pub unsafe fn SQLPrepareW(hstmt: *mut core::ffi::c_void, szsqlstr: &[u16]) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLPrepareW(hstmt : *mut core::ffi::c_void, szsqlstr : *const u16, cchsqlstr : i32) -> i16); - unsafe { SQLPrepareW(core::mem::transmute(hstmt), core::mem::transmute(szsqlstr.as_ptr()), szsqlstr.len().try_into().unwrap()) } + unsafe { SQLPrepareW(hstmt as _, core::mem::transmute(szsqlstr.as_ptr()), szsqlstr.len().try_into().unwrap()) } } #[inline] pub unsafe fn SQLPrimaryKeys(hstmt: *mut core::ffi::c_void, szcatalogname: Option<&[u8]>, szschemaname: Option<&[u8]>, sztablename: Option<&[u8]>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLPrimaryKeys(hstmt : *mut core::ffi::c_void, szcatalogname : *const u8, cchcatalogname : i16, szschemaname : *const u8, cchschemaname : i16, sztablename : *const u8, cchtablename : i16) -> i16); unsafe { SQLPrimaryKeys( - core::mem::transmute(hstmt), + hstmt as _, core::mem::transmute(szcatalogname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szcatalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szschemaname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -1086,7 +981,7 @@ pub unsafe fn SQLPrimaryKeysA(hstmt: *mut core::ffi::c_void, szcatalogname: Opti windows_targets::link!("odbc32.dll" "system" fn SQLPrimaryKeysA(hstmt : *mut core::ffi::c_void, szcatalogname : *const u8, cbcatalogname : i16, szschemaname : *const u8, cbschemaname : i16, sztablename : *const u8, cbtablename : i16) -> i16); unsafe { SQLPrimaryKeysA( - core::mem::transmute(hstmt), + hstmt as _, core::mem::transmute(szcatalogname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szcatalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szschemaname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -1101,7 +996,7 @@ pub unsafe fn SQLPrimaryKeysW(hstmt: *mut core::ffi::c_void, szcatalogname: Opti windows_targets::link!("odbc32.dll" "system" fn SQLPrimaryKeysW(hstmt : *mut core::ffi::c_void, szcatalogname : *const u16, cchcatalogname : i16, szschemaname : *const u16, cchschemaname : i16, sztablename : *const u16, cchtablename : i16) -> i16); unsafe { SQLPrimaryKeysW( - core::mem::transmute(hstmt), + hstmt as _, core::mem::transmute(szcatalogname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szcatalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szschemaname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -1116,7 +1011,7 @@ pub unsafe fn SQLProcedureColumns(hstmt: *mut core::ffi::c_void, szcatalogname: windows_targets::link!("odbc32.dll" "system" fn SQLProcedureColumns(hstmt : *mut core::ffi::c_void, szcatalogname : *const u8, cchcatalogname : i16, szschemaname : *const u8, cchschemaname : i16, szprocname : *const u8, cchprocname : i16, szcolumnname : *const u8, cchcolumnname : i16) -> i16); unsafe { SQLProcedureColumns( - core::mem::transmute(hstmt), + hstmt as _, core::mem::transmute(szcatalogname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szcatalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szschemaname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -1133,7 +1028,7 @@ pub unsafe fn SQLProcedureColumnsA(hstmt: *mut core::ffi::c_void, szcatalogname: windows_targets::link!("odbc32.dll" "system" fn SQLProcedureColumnsA(hstmt : *mut core::ffi::c_void, szcatalogname : *const u8, cbcatalogname : i16, szschemaname : *const u8, cbschemaname : i16, szprocname : *const u8, cbprocname : i16, szcolumnname : *const u8, cbcolumnname : i16) -> i16); unsafe { SQLProcedureColumnsA( - core::mem::transmute(hstmt), + hstmt as _, core::mem::transmute(szcatalogname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szcatalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szschemaname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -1150,7 +1045,7 @@ pub unsafe fn SQLProcedureColumnsW(hstmt: *mut core::ffi::c_void, szcatalogname: windows_targets::link!("odbc32.dll" "system" fn SQLProcedureColumnsW(hstmt : *mut core::ffi::c_void, szcatalogname : *const u16, cchcatalogname : i16, szschemaname : *const u16, cchschemaname : i16, szprocname : *const u16, cchprocname : i16, szcolumnname : *const u16, cchcolumnname : i16) -> i16); unsafe { SQLProcedureColumnsW( - core::mem::transmute(hstmt), + hstmt as _, core::mem::transmute(szcatalogname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szcatalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szschemaname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -1167,7 +1062,7 @@ pub unsafe fn SQLProcedures(hstmt: *mut core::ffi::c_void, szcatalogname: Option windows_targets::link!("odbc32.dll" "system" fn SQLProcedures(hstmt : *mut core::ffi::c_void, szcatalogname : *const u8, cchcatalogname : i16, szschemaname : *const u8, cchschemaname : i16, szprocname : *const u8, cchprocname : i16) -> i16); unsafe { SQLProcedures( - core::mem::transmute(hstmt), + hstmt as _, core::mem::transmute(szcatalogname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szcatalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szschemaname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -1182,7 +1077,7 @@ pub unsafe fn SQLProceduresA(hstmt: *mut core::ffi::c_void, szcatalogname: Optio windows_targets::link!("odbc32.dll" "system" fn SQLProceduresA(hstmt : *mut core::ffi::c_void, szcatalogname : *const u8, cbcatalogname : i16, szschemaname : *const u8, cbschemaname : i16, szprocname : *const u8, cbprocname : i16) -> i16); unsafe { SQLProceduresA( - core::mem::transmute(hstmt), + hstmt as _, core::mem::transmute(szcatalogname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szcatalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szschemaname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -1197,7 +1092,7 @@ pub unsafe fn SQLProceduresW(hstmt: *mut core::ffi::c_void, szcatalogname: Optio windows_targets::link!("odbc32.dll" "system" fn SQLProceduresW(hstmt : *mut core::ffi::c_void, szcatalogname : *const u16, cchcatalogname : i16, szschemaname : *const u16, cchschemaname : i16, szprocname : *const u16, cchprocname : i16) -> i16); unsafe { SQLProceduresW( - core::mem::transmute(hstmt), + hstmt as _, core::mem::transmute(szcatalogname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szcatalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szschemaname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -1211,183 +1106,183 @@ pub unsafe fn SQLProceduresW(hstmt: *mut core::ffi::c_void, szcatalogname: Optio #[inline] pub unsafe fn SQLPutData(statementhandle: *mut core::ffi::c_void, data: *const core::ffi::c_void, strlen_or_ind: i32) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLPutData(statementhandle : *mut core::ffi::c_void, data : *const core::ffi::c_void, strlen_or_ind : i32) -> i16); - unsafe { SQLPutData(core::mem::transmute(statementhandle), data, strlen_or_ind) } + unsafe { SQLPutData(statementhandle as _, data, strlen_or_ind) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] pub unsafe fn SQLPutData(statementhandle: *mut core::ffi::c_void, data: *const core::ffi::c_void, strlen_or_ind: i64) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLPutData(statementhandle : *mut core::ffi::c_void, data : *const core::ffi::c_void, strlen_or_ind : i64) -> i16); - unsafe { SQLPutData(core::mem::transmute(statementhandle), data, strlen_or_ind) } + unsafe { SQLPutData(statementhandle as _, data, strlen_or_ind) } } #[cfg(target_arch = "x86")] #[inline] pub unsafe fn SQLRowCount(statementhandle: *const core::ffi::c_void, rowcount: *mut i32) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLRowCount(statementhandle : *const core::ffi::c_void, rowcount : *mut i32) -> i16); - unsafe { SQLRowCount(statementhandle, core::mem::transmute(rowcount)) } + unsafe { SQLRowCount(statementhandle, rowcount as _) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] pub unsafe fn SQLRowCount(statementhandle: *const core::ffi::c_void, rowcount: *mut i64) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLRowCount(statementhandle : *const core::ffi::c_void, rowcount : *mut i64) -> i16); - unsafe { SQLRowCount(statementhandle, core::mem::transmute(rowcount)) } + unsafe { SQLRowCount(statementhandle, rowcount as _) } } #[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); - unsafe { SQLSetConnectAttr(core::mem::transmute(connectionhandle), attribute, core::mem::transmute(value.unwrap_or(core::mem::zeroed())), stringlength) } + unsafe { SQLSetConnectAttr(connectionhandle as _, attribute, value.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { SQLSetConnectAttrA(core::mem::transmute(hdbc), fattribute, core::mem::transmute(rgbvalue.unwrap_or(core::mem::zeroed())), cbvalue) } + unsafe { SQLSetConnectAttrA(hdbc as _, fattribute, rgbvalue.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { SQLSetConnectAttrW(core::mem::transmute(hdbc), fattribute, core::mem::transmute(rgbvalue.unwrap_or(core::mem::zeroed())), cbvalue) } + unsafe { SQLSetConnectAttrW(hdbc as _, fattribute, rgbvalue.unwrap_or(core::mem::zeroed()) as _, cbvalue) } } #[cfg(target_arch = "x86")] #[inline] pub unsafe fn SQLSetConnectOption(connectionhandle: *mut core::ffi::c_void, option: u16, value: u32) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLSetConnectOption(connectionhandle : *mut core::ffi::c_void, option : u16, value : u32) -> i16); - unsafe { SQLSetConnectOption(core::mem::transmute(connectionhandle), option, value) } + unsafe { SQLSetConnectOption(connectionhandle as _, option, value) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] pub unsafe fn SQLSetConnectOption(connectionhandle: *mut core::ffi::c_void, option: u16, value: u64) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLSetConnectOption(connectionhandle : *mut core::ffi::c_void, option : u16, value : u64) -> i16); - unsafe { SQLSetConnectOption(core::mem::transmute(connectionhandle), option, value) } + unsafe { SQLSetConnectOption(connectionhandle as _, option, value) } } #[cfg(target_arch = "x86")] #[inline] pub unsafe fn SQLSetConnectOptionA(hdbc: *mut core::ffi::c_void, foption: u16, vparam: u32) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLSetConnectOptionA(hdbc : *mut core::ffi::c_void, foption : u16, vparam : u32) -> i16); - unsafe { SQLSetConnectOptionA(core::mem::transmute(hdbc), foption, vparam) } + unsafe { SQLSetConnectOptionA(hdbc as _, foption, vparam) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] pub unsafe fn SQLSetConnectOptionA(hdbc: *mut core::ffi::c_void, foption: u16, vparam: u64) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLSetConnectOptionA(hdbc : *mut core::ffi::c_void, foption : u16, vparam : u64) -> i16); - unsafe { SQLSetConnectOptionA(core::mem::transmute(hdbc), foption, vparam) } + unsafe { SQLSetConnectOptionA(hdbc as _, foption, vparam) } } #[cfg(target_arch = "x86")] #[inline] pub unsafe fn SQLSetConnectOptionW(hdbc: *mut core::ffi::c_void, foption: u16, vparam: u32) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLSetConnectOptionW(hdbc : *mut core::ffi::c_void, foption : u16, vparam : u32) -> i16); - unsafe { SQLSetConnectOptionW(core::mem::transmute(hdbc), foption, vparam) } + unsafe { SQLSetConnectOptionW(hdbc as _, foption, vparam) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] pub unsafe fn SQLSetConnectOptionW(hdbc: *mut core::ffi::c_void, foption: u16, vparam: u64) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLSetConnectOptionW(hdbc : *mut core::ffi::c_void, foption : u16, vparam : u64) -> i16); - unsafe { SQLSetConnectOptionW(core::mem::transmute(hdbc), foption, vparam) } + unsafe { SQLSetConnectOptionW(hdbc as _, foption, vparam) } } #[inline] pub unsafe fn SQLSetCursorName(statementhandle: *mut core::ffi::c_void, cursorname: &[u8]) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLSetCursorName(statementhandle : *mut core::ffi::c_void, cursorname : *const u8, namelength : i16) -> i16); - unsafe { SQLSetCursorName(core::mem::transmute(statementhandle), core::mem::transmute(cursorname.as_ptr()), cursorname.len().try_into().unwrap()) } + unsafe { SQLSetCursorName(statementhandle as _, core::mem::transmute(cursorname.as_ptr()), cursorname.len().try_into().unwrap()) } } #[inline] pub unsafe fn SQLSetCursorNameA(hstmt: *mut core::ffi::c_void, szcursor: &[u8]) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLSetCursorNameA(hstmt : *mut core::ffi::c_void, szcursor : *const u8, cbcursor : i16) -> i16); - unsafe { SQLSetCursorNameA(core::mem::transmute(hstmt), core::mem::transmute(szcursor.as_ptr()), szcursor.len().try_into().unwrap()) } + unsafe { SQLSetCursorNameA(hstmt as _, core::mem::transmute(szcursor.as_ptr()), szcursor.len().try_into().unwrap()) } } #[inline] pub unsafe fn SQLSetCursorNameW(hstmt: *mut core::ffi::c_void, szcursor: &[u16]) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLSetCursorNameW(hstmt : *mut core::ffi::c_void, szcursor : *const u16, cchcursor : i16) -> i16); - unsafe { SQLSetCursorNameW(core::mem::transmute(hstmt), core::mem::transmute(szcursor.as_ptr()), szcursor.len().try_into().unwrap()) } + unsafe { SQLSetCursorNameW(hstmt as _, core::mem::transmute(szcursor.as_ptr()), szcursor.len().try_into().unwrap()) } } #[inline] pub unsafe fn SQLSetDescField(descriptorhandle: *mut core::ffi::c_void, recnumber: i16, fieldidentifier: i16, value: *const core::ffi::c_void, bufferlength: i32) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLSetDescField(descriptorhandle : *mut core::ffi::c_void, recnumber : i16, fieldidentifier : i16, value : *const core::ffi::c_void, bufferlength : i32) -> i16); - unsafe { SQLSetDescField(core::mem::transmute(descriptorhandle), recnumber, fieldidentifier, value, bufferlength) } + unsafe { SQLSetDescField(descriptorhandle as _, recnumber, fieldidentifier, value, bufferlength) } } #[inline] pub unsafe fn SQLSetDescFieldW(descriptorhandle: *mut core::ffi::c_void, recnumber: i16, fieldidentifier: i16, value: *mut core::ffi::c_void, bufferlength: i32) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLSetDescFieldW(descriptorhandle : *mut core::ffi::c_void, recnumber : i16, fieldidentifier : i16, value : *mut core::ffi::c_void, bufferlength : i32) -> i16); - unsafe { SQLSetDescFieldW(core::mem::transmute(descriptorhandle), recnumber, fieldidentifier, core::mem::transmute(value), bufferlength) } + unsafe { SQLSetDescFieldW(descriptorhandle as _, recnumber, fieldidentifier, value as _, bufferlength) } } #[cfg(target_arch = "x86")] #[inline] pub unsafe fn SQLSetDescRec(descriptorhandle: *mut core::ffi::c_void, recnumber: i16, r#type: i16, subtype: i16, length: i32, precision: i16, scale: i16, data: Option<*mut core::ffi::c_void>, stringlength: Option<*mut i32>, indicator: Option<*mut i32>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLSetDescRec(descriptorhandle : *mut core::ffi::c_void, recnumber : i16, r#type : i16, subtype : i16, length : i32, precision : i16, scale : i16, data : *mut core::ffi::c_void, stringlength : *mut i32, indicator : *mut i32) -> i16); - unsafe { SQLSetDescRec(core::mem::transmute(descriptorhandle), recnumber, r#type, subtype, length, precision, 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()))) } + unsafe { SQLSetDescRec(descriptorhandle as _, recnumber, r#type, subtype, length, precision, scale, data.unwrap_or(core::mem::zeroed()) as _, stringlength.unwrap_or(core::mem::zeroed()) as _, indicator.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { SQLSetDescRec(core::mem::transmute(descriptorhandle), recnumber, r#type, subtype, length, precision, 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()))) } + unsafe { SQLSetDescRec(descriptorhandle as _, recnumber, r#type, subtype, length, precision, scale, data.unwrap_or(core::mem::zeroed()) as _, stringlength.unwrap_or(core::mem::zeroed()) as _, indicator.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { SQLSetEnvAttr(core::mem::transmute(environmenthandle), attribute, core::mem::transmute(value.unwrap_or(core::mem::zeroed())), stringlength) } + unsafe { SQLSetEnvAttr(environmenthandle as _, attribute, value.unwrap_or(core::mem::zeroed()) as _, stringlength) } } #[cfg(target_arch = "x86")] #[inline] pub unsafe fn SQLSetParam(statementhandle: *mut core::ffi::c_void, parameternumber: u16, valuetype: i16, parametertype: i16, lengthprecision: u32, parameterscale: i16, parametervalue: *const core::ffi::c_void, strlen_or_ind: *mut i32) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLSetParam(statementhandle : *mut core::ffi::c_void, parameternumber : u16, valuetype : i16, parametertype : i16, lengthprecision : u32, parameterscale : i16, parametervalue : *const core::ffi::c_void, strlen_or_ind : *mut i32) -> i16); - unsafe { SQLSetParam(core::mem::transmute(statementhandle), parameternumber, valuetype, parametertype, lengthprecision, parameterscale, parametervalue, core::mem::transmute(strlen_or_ind)) } + unsafe { SQLSetParam(statementhandle as _, parameternumber, valuetype, parametertype, lengthprecision, parameterscale, parametervalue, strlen_or_ind as _) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] pub unsafe fn SQLSetParam(statementhandle: *mut core::ffi::c_void, parameternumber: u16, valuetype: i16, parametertype: i16, lengthprecision: u64, parameterscale: i16, parametervalue: *const core::ffi::c_void, strlen_or_ind: *mut i64) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLSetParam(statementhandle : *mut core::ffi::c_void, parameternumber : u16, valuetype : i16, parametertype : i16, lengthprecision : u64, parameterscale : i16, parametervalue : *const core::ffi::c_void, strlen_or_ind : *mut i64) -> i16); - unsafe { SQLSetParam(core::mem::transmute(statementhandle), parameternumber, valuetype, parametertype, lengthprecision, parameterscale, parametervalue, core::mem::transmute(strlen_or_ind)) } + unsafe { SQLSetParam(statementhandle as _, parameternumber, valuetype, parametertype, lengthprecision, parameterscale, parametervalue, strlen_or_ind as _) } } #[cfg(target_arch = "x86")] #[inline] pub unsafe fn SQLSetPos(hstmt: *mut core::ffi::c_void, irow: u16, foption: u16, flock: u16) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLSetPos(hstmt : *mut core::ffi::c_void, irow : u16, foption : u16, flock : u16) -> i16); - unsafe { SQLSetPos(core::mem::transmute(hstmt), irow, foption, flock) } + unsafe { SQLSetPos(hstmt as _, irow, foption, flock) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] pub unsafe fn SQLSetPos(hstmt: *mut core::ffi::c_void, irow: u64, foption: u16, flock: u16) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLSetPos(hstmt : *mut core::ffi::c_void, irow : u64, foption : u16, flock : u16) -> i16); - unsafe { SQLSetPos(core::mem::transmute(hstmt), irow, foption, flock) } + unsafe { SQLSetPos(hstmt as _, irow, foption, flock) } } #[cfg(target_arch = "x86")] #[inline] pub unsafe fn SQLSetScrollOptions(hstmt: *mut core::ffi::c_void, fconcurrency: u16, crowkeyset: i32, crowrowset: u16) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLSetScrollOptions(hstmt : *mut core::ffi::c_void, fconcurrency : u16, crowkeyset : i32, crowrowset : u16) -> i16); - unsafe { SQLSetScrollOptions(core::mem::transmute(hstmt), fconcurrency, crowkeyset, crowrowset) } + unsafe { SQLSetScrollOptions(hstmt as _, fconcurrency, crowkeyset, crowrowset) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] pub unsafe fn SQLSetScrollOptions(hstmt: *mut core::ffi::c_void, fconcurrency: u16, crowkeyset: i64, crowrowset: u16) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLSetScrollOptions(hstmt : *mut core::ffi::c_void, fconcurrency : u16, crowkeyset : i64, crowrowset : u16) -> i16); - unsafe { SQLSetScrollOptions(core::mem::transmute(hstmt), fconcurrency, crowkeyset, crowrowset) } + unsafe { SQLSetScrollOptions(hstmt as _, fconcurrency, crowkeyset, crowrowset) } } #[inline] pub unsafe fn SQLSetStmtAttr(statementhandle: *mut core::ffi::c_void, attribute: i32, value: *const core::ffi::c_void, stringlength: i32) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLSetStmtAttr(statementhandle : *mut core::ffi::c_void, attribute : i32, value : *const core::ffi::c_void, stringlength : i32) -> i16); - unsafe { SQLSetStmtAttr(core::mem::transmute(statementhandle), attribute, value, stringlength) } + unsafe { SQLSetStmtAttr(statementhandle as _, attribute, value, stringlength) } } #[inline] pub unsafe fn SQLSetStmtAttrW(hstmt: *mut core::ffi::c_void, fattribute: i32, rgbvalue: *mut core::ffi::c_void, cbvaluemax: i32) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLSetStmtAttrW(hstmt : *mut core::ffi::c_void, fattribute : i32, rgbvalue : *mut core::ffi::c_void, cbvaluemax : i32) -> i16); - unsafe { SQLSetStmtAttrW(core::mem::transmute(hstmt), fattribute, core::mem::transmute(rgbvalue), cbvaluemax) } + unsafe { SQLSetStmtAttrW(hstmt as _, fattribute, rgbvalue as _, cbvaluemax) } } #[cfg(target_arch = "x86")] #[inline] pub unsafe fn SQLSetStmtOption(statementhandle: *mut core::ffi::c_void, option: u16, value: u32) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLSetStmtOption(statementhandle : *mut core::ffi::c_void, option : u16, value : u32) -> i16); - unsafe { SQLSetStmtOption(core::mem::transmute(statementhandle), option, value) } + unsafe { SQLSetStmtOption(statementhandle as _, option, value) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] pub unsafe fn SQLSetStmtOption(statementhandle: *mut core::ffi::c_void, option: u16, value: u64) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLSetStmtOption(statementhandle : *mut core::ffi::c_void, option : u16, value : u64) -> i16); - unsafe { SQLSetStmtOption(core::mem::transmute(statementhandle), option, value) } + unsafe { SQLSetStmtOption(statementhandle as _, option, value) } } #[inline] pub unsafe fn SQLSpecialColumns(statementhandle: *mut core::ffi::c_void, identifiertype: u16, catalogname: Option<&[u8]>, schemaname: Option<&[u8]>, tablename: Option<&[u8]>, scope: u16, nullable: u16) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLSpecialColumns(statementhandle : *mut core::ffi::c_void, identifiertype : u16, catalogname : *const u8, namelength1 : i16, schemaname : *const u8, namelength2 : i16, tablename : *const u8, namelength3 : i16, scope : u16, nullable : u16) -> i16); unsafe { SQLSpecialColumns( - core::mem::transmute(statementhandle), + statementhandle as _, identifiertype, core::mem::transmute(catalogname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), catalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), @@ -1405,7 +1300,7 @@ pub unsafe fn SQLSpecialColumnsA(hstmt: *mut core::ffi::c_void, fcoltype: u16, s windows_targets::link!("odbc32.dll" "system" fn SQLSpecialColumnsA(hstmt : *mut core::ffi::c_void, fcoltype : u16, szcatalogname : *const u8, cbcatalogname : i16, szschemaname : *const u8, cbschemaname : i16, sztablename : *const u8, cbtablename : i16, fscope : u16, fnullable : u16) -> i16); unsafe { SQLSpecialColumnsA( - core::mem::transmute(hstmt), + hstmt as _, fcoltype, core::mem::transmute(szcatalogname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szcatalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), @@ -1423,7 +1318,7 @@ pub unsafe fn SQLSpecialColumnsW(hstmt: *mut core::ffi::c_void, fcoltype: u16, s windows_targets::link!("odbc32.dll" "system" fn SQLSpecialColumnsW(hstmt : *mut core::ffi::c_void, fcoltype : u16, szcatalogname : *const u16, cchcatalogname : i16, szschemaname : *const u16, cchschemaname : i16, sztablename : *const u16, cchtablename : i16, fscope : u16, fnullable : u16) -> i16); unsafe { SQLSpecialColumnsW( - core::mem::transmute(hstmt), + hstmt as _, fcoltype, core::mem::transmute(szcatalogname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szcatalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), @@ -1441,7 +1336,7 @@ pub unsafe fn SQLStatistics(statementhandle: *mut core::ffi::c_void, catalogname windows_targets::link!("odbc32.dll" "system" fn SQLStatistics(statementhandle : *mut core::ffi::c_void, catalogname : *const u8, namelength1 : i16, schemaname : *const u8, namelength2 : i16, tablename : *const u8, namelength3 : i16, unique : u16, reserved : u16) -> i16); unsafe { SQLStatistics( - core::mem::transmute(statementhandle), + statementhandle as _, core::mem::transmute(catalogname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), catalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(schemaname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -1458,7 +1353,7 @@ pub unsafe fn SQLStatisticsA(hstmt: *mut core::ffi::c_void, szcatalogname: Optio windows_targets::link!("odbc32.dll" "system" fn SQLStatisticsA(hstmt : *mut core::ffi::c_void, szcatalogname : *const u8, cbcatalogname : i16, szschemaname : *const u8, cbschemaname : i16, sztablename : *const u8, cbtablename : i16, funique : u16, faccuracy : u16) -> i16); unsafe { SQLStatisticsA( - core::mem::transmute(hstmt), + hstmt as _, core::mem::transmute(szcatalogname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szcatalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szschemaname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -1475,7 +1370,7 @@ pub unsafe fn SQLStatisticsW(hstmt: *mut core::ffi::c_void, szcatalogname: Optio windows_targets::link!("odbc32.dll" "system" fn SQLStatisticsW(hstmt : *mut core::ffi::c_void, szcatalogname : *const u16, cchcatalogname : i16, szschemaname : *const u16, cchschemaname : i16, sztablename : *const u16, cchtablename : i16, funique : u16, faccuracy : u16) -> i16); unsafe { SQLStatisticsW( - core::mem::transmute(hstmt), + hstmt as _, core::mem::transmute(szcatalogname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szcatalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szschemaname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -1492,7 +1387,7 @@ pub unsafe fn SQLTablePrivileges(hstmt: *mut core::ffi::c_void, szcatalogname: O windows_targets::link!("odbc32.dll" "system" fn SQLTablePrivileges(hstmt : *mut core::ffi::c_void, szcatalogname : *const u8, cchcatalogname : i16, szschemaname : *const u8, cchschemaname : i16, sztablename : *const u8, cchtablename : i16) -> i16); unsafe { SQLTablePrivileges( - core::mem::transmute(hstmt), + hstmt as _, core::mem::transmute(szcatalogname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szcatalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szschemaname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -1507,7 +1402,7 @@ pub unsafe fn SQLTablePrivilegesA(hstmt: *mut core::ffi::c_void, szcatalogname: windows_targets::link!("odbc32.dll" "system" fn SQLTablePrivilegesA(hstmt : *mut core::ffi::c_void, szcatalogname : *const u8, cbcatalogname : i16, szschemaname : *const u8, cbschemaname : i16, sztablename : *const u8, cbtablename : i16) -> i16); unsafe { SQLTablePrivilegesA( - core::mem::transmute(hstmt), + hstmt as _, core::mem::transmute(szcatalogname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szcatalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szschemaname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -1522,7 +1417,7 @@ pub unsafe fn SQLTablePrivilegesW(hstmt: *mut core::ffi::c_void, szcatalogname: windows_targets::link!("odbc32.dll" "system" fn SQLTablePrivilegesW(hstmt : *mut core::ffi::c_void, szcatalogname : *const u16, cchcatalogname : i16, szschemaname : *const u16, cchschemaname : i16, sztablename : *const u16, cchtablename : i16) -> i16); unsafe { SQLTablePrivilegesW( - core::mem::transmute(hstmt), + hstmt as _, core::mem::transmute(szcatalogname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szcatalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szschemaname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -1537,7 +1432,7 @@ pub unsafe fn SQLTables(statementhandle: *mut core::ffi::c_void, catalogname: Op windows_targets::link!("odbc32.dll" "system" fn SQLTables(statementhandle : *mut core::ffi::c_void, catalogname : *const u8, namelength1 : i16, schemaname : *const u8, namelength2 : i16, tablename : *const u8, namelength3 : i16, tabletype : *const u8, namelength4 : i16) -> i16); unsafe { SQLTables( - core::mem::transmute(statementhandle), + statementhandle as _, core::mem::transmute(catalogname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), catalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(schemaname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -1554,7 +1449,7 @@ pub unsafe fn SQLTablesA(hstmt: *mut core::ffi::c_void, szcatalogname: Option<&[ windows_targets::link!("odbc32.dll" "system" fn SQLTablesA(hstmt : *mut core::ffi::c_void, szcatalogname : *const u8, cbcatalogname : i16, szschemaname : *const u8, cbschemaname : i16, sztablename : *const u8, cbtablename : i16, sztabletype : *const u8, cbtabletype : i16) -> i16); unsafe { SQLTablesA( - core::mem::transmute(hstmt), + hstmt as _, core::mem::transmute(szcatalogname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szcatalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szschemaname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -1571,7 +1466,7 @@ pub unsafe fn SQLTablesW(hstmt: *mut core::ffi::c_void, szcatalogname: Option<&[ windows_targets::link!("odbc32.dll" "system" fn SQLTablesW(hstmt : *mut core::ffi::c_void, szcatalogname : *const u16, cchcatalogname : i16, szschemaname : *const u16, cchschemaname : i16, sztablename : *const u16, cchtablename : i16, sztabletype : *const u16, cchtabletype : i16) -> i16); unsafe { SQLTablesW( - core::mem::transmute(hstmt), + hstmt as _, core::mem::transmute(szcatalogname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szcatalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szschemaname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -1586,57 +1481,57 @@ pub unsafe fn SQLTablesW(hstmt: *mut core::ffi::c_void, szcatalogname: Option<&[ #[inline] pub unsafe fn SQLTransact(environmenthandle: *mut core::ffi::c_void, connectionhandle: *mut core::ffi::c_void, completiontype: u16) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLTransact(environmenthandle : *mut core::ffi::c_void, connectionhandle : *mut core::ffi::c_void, completiontype : u16) -> i16); - unsafe { SQLTransact(core::mem::transmute(environmenthandle), core::mem::transmute(connectionhandle), completiontype) } + unsafe { SQLTransact(environmenthandle as _, connectionhandle as _, completiontype) } } #[inline] pub unsafe fn bcp_batch(param0: *mut core::ffi::c_void) -> i32 { windows_targets::link!("odbcbcp.dll" "system" fn bcp_batch(param0 : *mut core::ffi::c_void) -> i32); - unsafe { bcp_batch(core::mem::transmute(param0)) } + unsafe { bcp_batch(param0 as _) } } #[inline] pub unsafe fn bcp_bind(param0: *mut core::ffi::c_void, param1: *mut u8, param2: i32, param3: i32, param4: *mut u8, param5: i32, param6: i32, param7: i32) -> i16 { windows_targets::link!("odbcbcp.dll" "system" fn bcp_bind(param0 : *mut core::ffi::c_void, param1 : *mut u8, param2 : i32, param3 : i32, param4 : *mut u8, param5 : i32, param6 : i32, param7 : i32) -> i16); - unsafe { bcp_bind(core::mem::transmute(param0), core::mem::transmute(param1), param2, param3, core::mem::transmute(param4), param5, param6, param7) } + unsafe { bcp_bind(param0 as _, param1 as _, param2, param3, param4 as _, param5, param6, param7) } } #[inline] pub unsafe fn bcp_colfmt(param0: *mut core::ffi::c_void, param1: i32, param2: u8, param3: i32, param4: i32, param5: *mut u8, param6: i32, param7: i32) -> i16 { windows_targets::link!("odbcbcp.dll" "system" fn bcp_colfmt(param0 : *mut core::ffi::c_void, param1 : i32, param2 : u8, param3 : i32, param4 : i32, param5 : *mut u8, param6 : i32, param7 : i32) -> i16); - unsafe { bcp_colfmt(core::mem::transmute(param0), param1, param2, param3, param4, core::mem::transmute(param5), param6, param7) } + unsafe { bcp_colfmt(param0 as _, param1, param2, param3, param4, param5 as _, param6, param7) } } #[inline] pub unsafe fn bcp_collen(param0: *mut core::ffi::c_void, param1: i32, param2: i32) -> i16 { windows_targets::link!("odbcbcp.dll" "system" fn bcp_collen(param0 : *mut core::ffi::c_void, param1 : i32, param2 : i32) -> i16); - unsafe { bcp_collen(core::mem::transmute(param0), param1, param2) } + unsafe { bcp_collen(param0 as _, param1, param2) } } #[inline] pub unsafe fn bcp_colptr(param0: *mut core::ffi::c_void, param1: *mut u8, param2: i32) -> i16 { windows_targets::link!("odbcbcp.dll" "system" fn bcp_colptr(param0 : *mut core::ffi::c_void, param1 : *mut u8, param2 : i32) -> i16); - unsafe { bcp_colptr(core::mem::transmute(param0), core::mem::transmute(param1), param2) } + unsafe { bcp_colptr(param0 as _, param1 as _, param2) } } #[inline] pub unsafe fn bcp_columns(param0: *mut core::ffi::c_void, param1: i32) -> i16 { windows_targets::link!("odbcbcp.dll" "system" fn bcp_columns(param0 : *mut core::ffi::c_void, param1 : i32) -> i16); - unsafe { bcp_columns(core::mem::transmute(param0), param1) } + unsafe { bcp_columns(param0 as _, param1) } } #[inline] pub unsafe fn bcp_control(param0: *mut core::ffi::c_void, param1: i32, param2: *mut core::ffi::c_void) -> i16 { windows_targets::link!("odbcbcp.dll" "system" fn bcp_control(param0 : *mut core::ffi::c_void, param1 : i32, param2 : *mut core::ffi::c_void) -> i16); - unsafe { bcp_control(core::mem::transmute(param0), param1, core::mem::transmute(param2)) } + unsafe { bcp_control(param0 as _, param1, param2 as _) } } #[inline] pub unsafe fn bcp_done(param0: *mut core::ffi::c_void) -> i32 { windows_targets::link!("odbcbcp.dll" "system" fn bcp_done(param0 : *mut core::ffi::c_void) -> i32); - unsafe { bcp_done(core::mem::transmute(param0)) } + unsafe { bcp_done(param0 as _) } } #[inline] pub unsafe fn bcp_exec(param0: *mut core::ffi::c_void, param1: *mut i32) -> i16 { windows_targets::link!("odbcbcp.dll" "system" fn bcp_exec(param0 : *mut core::ffi::c_void, param1 : *mut i32) -> i16); - unsafe { bcp_exec(core::mem::transmute(param0), core::mem::transmute(param1)) } + unsafe { bcp_exec(param0 as _, param1 as _) } } #[inline] pub unsafe fn bcp_getcolfmt(param0: *mut core::ffi::c_void, param1: i32, param2: i32, param3: *mut core::ffi::c_void, param4: i32, param5: *mut i32) -> i16 { windows_targets::link!("odbcbcp.dll" "system" fn bcp_getcolfmt(param0 : *mut core::ffi::c_void, param1 : i32, param2 : i32, param3 : *mut core::ffi::c_void, param4 : i32, param5 : *mut i32) -> i16); - unsafe { bcp_getcolfmt(core::mem::transmute(param0), param1, param2, core::mem::transmute(param3), param4, core::mem::transmute(param5)) } + unsafe { bcp_getcolfmt(param0 as _, param1, param2, param3 as _, param4, param5 as _) } } #[inline] pub unsafe fn bcp_initA(param0: *mut core::ffi::c_void, param1: P1, param2: P2, param3: P3, param4: i32) -> i16 @@ -1646,7 +1541,7 @@ where P3: windows_core::Param, { windows_targets::link!("odbcbcp.dll" "system" fn bcp_initA(param0 : *mut core::ffi::c_void, param1 : windows_core::PCSTR, param2 : windows_core::PCSTR, param3 : windows_core::PCSTR, param4 : i32) -> i16); - unsafe { bcp_initA(core::mem::transmute(param0), param1.param().abi(), param2.param().abi(), param3.param().abi(), param4) } + unsafe { bcp_initA(param0 as _, param1.param().abi(), param2.param().abi(), param3.param().abi(), param4) } } #[inline] pub unsafe fn bcp_initW(param0: *mut core::ffi::c_void, param1: P1, param2: P2, param3: P3, param4: i32) -> i16 @@ -1656,12 +1551,12 @@ where P3: windows_core::Param, { windows_targets::link!("odbcbcp.dll" "system" fn bcp_initW(param0 : *mut core::ffi::c_void, param1 : windows_core::PCWSTR, param2 : windows_core::PCWSTR, param3 : windows_core::PCWSTR, param4 : i32) -> i16); - unsafe { bcp_initW(core::mem::transmute(param0), param1.param().abi(), param2.param().abi(), param3.param().abi(), param4) } + unsafe { bcp_initW(param0 as _, param1.param().abi(), param2.param().abi(), param3.param().abi(), param4) } } #[inline] pub unsafe fn bcp_moretext(param0: *mut core::ffi::c_void, param1: i32, param2: *mut u8) -> i16 { windows_targets::link!("odbcbcp.dll" "system" fn bcp_moretext(param0 : *mut core::ffi::c_void, param1 : i32, param2 : *mut u8) -> i16); - unsafe { bcp_moretext(core::mem::transmute(param0), param1, core::mem::transmute(param2)) } + unsafe { bcp_moretext(param0 as _, param1, param2 as _) } } #[inline] pub unsafe fn bcp_readfmtA(param0: *mut core::ffi::c_void, param1: P1) -> i16 @@ -1669,7 +1564,7 @@ where P1: windows_core::Param, { windows_targets::link!("odbcbcp.dll" "system" fn bcp_readfmtA(param0 : *mut core::ffi::c_void, param1 : windows_core::PCSTR) -> i16); - unsafe { bcp_readfmtA(core::mem::transmute(param0), param1.param().abi()) } + unsafe { bcp_readfmtA(param0 as _, param1.param().abi()) } } #[inline] pub unsafe fn bcp_readfmtW(param0: *mut core::ffi::c_void, param1: P1) -> i16 @@ -1677,17 +1572,17 @@ where P1: windows_core::Param, { windows_targets::link!("odbcbcp.dll" "system" fn bcp_readfmtW(param0 : *mut core::ffi::c_void, param1 : windows_core::PCWSTR) -> i16); - unsafe { bcp_readfmtW(core::mem::transmute(param0), param1.param().abi()) } + unsafe { bcp_readfmtW(param0 as _, param1.param().abi()) } } #[inline] pub unsafe fn bcp_sendrow(param0: *mut core::ffi::c_void) -> i16 { windows_targets::link!("odbcbcp.dll" "system" fn bcp_sendrow(param0 : *mut core::ffi::c_void) -> i16); - unsafe { bcp_sendrow(core::mem::transmute(param0)) } + unsafe { bcp_sendrow(param0 as _) } } #[inline] pub unsafe fn bcp_setcolfmt(param0: *mut core::ffi::c_void, param1: i32, param2: i32, param3: *mut core::ffi::c_void, param4: i32) -> i16 { windows_targets::link!("odbcbcp.dll" "system" fn bcp_setcolfmt(param0 : *mut core::ffi::c_void, param1 : i32, param2 : i32, param3 : *mut core::ffi::c_void, param4 : i32) -> i16); - unsafe { bcp_setcolfmt(core::mem::transmute(param0), param1, param2, core::mem::transmute(param3), param4) } + unsafe { bcp_setcolfmt(param0 as _, param1, param2, param3 as _, param4) } } #[inline] pub unsafe fn bcp_writefmtA(param0: *mut core::ffi::c_void, param1: P1) -> i16 @@ -1695,7 +1590,7 @@ where P1: windows_core::Param, { windows_targets::link!("odbcbcp.dll" "system" fn bcp_writefmtA(param0 : *mut core::ffi::c_void, param1 : windows_core::PCSTR) -> i16); - unsafe { bcp_writefmtA(core::mem::transmute(param0), param1.param().abi()) } + unsafe { bcp_writefmtA(param0 as _, param1.param().abi()) } } #[inline] pub unsafe fn bcp_writefmtW(param0: *mut core::ffi::c_void, param1: P1) -> i16 @@ -1703,7 +1598,7 @@ where P1: windows_core::Param, { windows_targets::link!("odbcbcp.dll" "system" fn bcp_writefmtW(param0 : *mut core::ffi::c_void, param1 : windows_core::PCWSTR) -> i16); - unsafe { bcp_writefmtW(core::mem::transmute(param0), param1.param().abi()) } + unsafe { bcp_writefmtW(param0 as _, param1.param().abi()) } } #[inline] pub unsafe fn dbprtypeA(param0: i32) -> windows_core::PSTR { @@ -5218,18 +5113,18 @@ windows_core::imp::define_interface!(IAccessor, IAccessor_Vtbl, 0x0c733a8c_2a1c_ windows_core::imp::interface_hierarchy!(IAccessor, windows_core::IUnknown); impl IAccessor { pub unsafe fn AddRefAccessor(&self, haccessor: HACCESSOR, pcrefcount: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AddRefAccessor)(windows_core::Interface::as_raw(self), haccessor, core::mem::transmute(pcrefcount.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).AddRefAccessor)(windows_core::Interface::as_raw(self), haccessor, pcrefcount.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).CreateAccessor)(windows_core::Interface::as_raw(self), dwaccessorflags, cbindings, core::mem::transmute(rgbindings), cbrowsize, core::mem::transmute(phaccessor), core::mem::transmute(rgstatus.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateAccessor)(windows_core::Interface::as_raw(self), dwaccessorflags, cbindings, core::mem::transmute(rgbindings), cbrowsize, phaccessor as _, rgstatus.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetBindings(&self, haccessor: HACCESSOR, pdwaccessorflags: *mut u32, pcbindings: Option<*mut usize>, prgbindings: *mut *mut DBBINDING) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBindings)(windows_core::Interface::as_raw(self), haccessor, core::mem::transmute(pdwaccessorflags), core::mem::transmute(pcbindings.unwrap_or(core::mem::zeroed())), core::mem::transmute(prgbindings)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBindings)(windows_core::Interface::as_raw(self), haccessor, pdwaccessorflags as _, pcbindings.unwrap_or(core::mem::zeroed()) as _, prgbindings as _).ok() } } pub unsafe fn ReleaseAccessor(&self, haccessor: HACCESSOR, pcrefcount: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReleaseAccessor)(windows_core::Interface::as_raw(self), haccessor, core::mem::transmute(pcrefcount.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReleaseAccessor)(windows_core::Interface::as_raw(self), haccessor, pcrefcount.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -5397,7 +5292,7 @@ impl IBindResource { P1: windows_core::Param, P5: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Bind)(windows_core::Interface::as_raw(self), punkouter.param().abi(), pwszurl.param().abi(), dwbindurlflags, rguid, riid, pauthenticate.param().abi(), core::mem::transmute(pimplsession.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwbindstatus.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppunk)).ok() } + unsafe { (windows_core::Interface::vtable(self).Bind)(windows_core::Interface::as_raw(self), punkouter.param().abi(), pwszurl.param().abi(), dwbindurlflags, rguid, riid, pauthenticate.param().abi(), pimplsession.unwrap_or(core::mem::zeroed()) as _, pdwbindstatus.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(ppunk)).ok() } } } #[repr(C)] @@ -5433,10 +5328,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<()> { - unsafe { (windows_core::Interface::vtable(self).AddRefChapter)(windows_core::Interface::as_raw(self), hchapter, core::mem::transmute(pcrefcount.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).AddRefChapter)(windows_core::Interface::as_raw(self), hchapter, pcrefcount.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn ReleaseChapter(&self, hchapter: usize, pcrefcount: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReleaseChapter)(windows_core::Interface::as_raw(self), hchapter, core::mem::transmute(pcrefcount.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ReleaseChapter)(windows_core::Interface::as_raw(self), hchapter, pcrefcount.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -5482,15 +5377,15 @@ impl IColumnMapper { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetPropInfoFromName)(windows_core::Interface::as_raw(self), wcspropname.param().abi(), core::mem::transmute(pppropid), core::mem::transmute(pproptype), core::mem::transmute(puiwidth)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropInfoFromName)(windows_core::Interface::as_raw(self), wcspropname.param().abi(), pppropid as _, pproptype as _, puiwidth as _).ok() } } #[cfg(feature = "Win32_Storage_IndexServer")] pub unsafe fn GetPropInfoFromId(&self, ppropid: *const super::super::Storage::IndexServer::DBID, pwcsname: *mut *mut u16, pproptype: *mut u16, puiwidth: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPropInfoFromId)(windows_core::Interface::as_raw(self), ppropid, core::mem::transmute(pwcsname), core::mem::transmute(pproptype), core::mem::transmute(puiwidth)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropInfoFromId)(windows_core::Interface::as_raw(self), ppropid, pwcsname as _, pproptype as _, puiwidth as _).ok() } } #[cfg(feature = "Win32_Storage_IndexServer")] pub unsafe fn EnumPropInfo(&self, ientry: u32, pwcsname: *const *const u16, pppropid: *mut *mut super::super::Storage::IndexServer::DBID, pproptype: *mut u16, puiwidth: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumPropInfo)(windows_core::Interface::as_raw(self), ientry, pwcsname, core::mem::transmute(pppropid), core::mem::transmute(pproptype), core::mem::transmute(puiwidth)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumPropInfo)(windows_core::Interface::as_raw(self), ientry, pwcsname, pppropid as _, pproptype as _, puiwidth as _).ok() } } pub unsafe fn IsMapUpToDate(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).IsMapUpToDate)(windows_core::Interface::as_raw(self)).ok() } @@ -5609,11 +5504,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetColumnInfo)(windows_core::Interface::as_raw(self), pccolumns as _, prginfo as _, ppstringsbuffer.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).MapColumnIDs)(windows_core::Interface::as_raw(self), ccolumnids, core::mem::transmute(rgcolumnids.unwrap_or(core::mem::zeroed())), core::mem::transmute(rgcolumns.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).MapColumnIDs)(windows_core::Interface::as_raw(self), ccolumnids, rgcolumnids.unwrap_or(core::mem::zeroed()) as _, rgcolumns.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -5671,7 +5566,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<()> { - unsafe { (windows_core::Interface::vtable(self).GetRestrictedColumnInfo)(windows_core::Interface::as_raw(self), rgcolumnidmasks.len().try_into().unwrap(), core::mem::transmute(rgcolumnidmasks.as_ptr()), dwflags, core::mem::transmute(pccolumns), core::mem::transmute(prgcolumnids), core::mem::transmute(prgcolumninfo), core::mem::transmute(ppstringsbuffer.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRestrictedColumnInfo)(windows_core::Interface::as_raw(self), rgcolumnidmasks.len().try_into().unwrap(), core::mem::transmute(rgcolumnidmasks.as_ptr()), dwflags, pccolumns as _, prgcolumnids as _, prgcolumninfo as _, ppstringsbuffer.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -5708,7 +5603,7 @@ windows_core::imp::interface_hierarchy!(IColumnsRowset, windows_core::IUnknown); impl IColumnsRowset { #[cfg(feature = "Win32_Storage_IndexServer")] pub unsafe fn GetAvailableColumns(&self, pcoptcolumns: *mut usize, prgoptcolumns: *mut *mut super::super::Storage::IndexServer::DBID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAvailableColumns)(windows_core::Interface::as_raw(self), core::mem::transmute(pcoptcolumns), core::mem::transmute(prgoptcolumns)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAvailableColumns)(windows_core::Interface::as_raw(self), pcoptcolumns as _, prgoptcolumns as _).ok() } } #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetColumnsRowset(&self, punkouter: P0, rgoptcolumns: &[super::super::Storage::IndexServer::DBID], riid: *const windows_core::GUID, rgpropertysets: Option<&mut [DBPROPSET]>, ppcolrowset: *mut Option) -> windows_core::Result<()> @@ -5772,7 +5667,7 @@ impl ICommand { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Execute)(windows_core::Interface::as_raw(self), punkouter.param().abi(), 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() } + unsafe { (windows_core::Interface::vtable(self).Execute)(windows_core::Interface::as_raw(self), punkouter.param().abi(), riid, pparams.unwrap_or(core::mem::zeroed()) as _, pcrowsaffected.unwrap_or(core::mem::zeroed()) as _, pprowset.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetDBSession(&self, riid: *const windows_core::GUID) -> windows_core::Result { unsafe { @@ -5838,25 +5733,25 @@ impl ICommandCost { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetAccumulatedCost)(windows_core::Interface::as_raw(self), pwszrowsetname.param().abi(), core::mem::transmute(pccostlimits), core::mem::transmute(prgcostlimits)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAccumulatedCost)(windows_core::Interface::as_raw(self), pwszrowsetname.param().abi(), pccostlimits as _, prgcostlimits as _).ok() } } pub unsafe fn GetCostEstimate(&self, pwszrowsetname: P0, pccostestimates: *mut u32, prgcostestimates: *mut DBCOST) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetCostEstimate)(windows_core::Interface::as_raw(self), pwszrowsetname.param().abi(), core::mem::transmute(pccostestimates), core::mem::transmute(prgcostestimates)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCostEstimate)(windows_core::Interface::as_raw(self), pwszrowsetname.param().abi(), pccostestimates as _, prgcostestimates as _).ok() } } pub unsafe fn GetCostGoals(&self, pwszrowsetname: P0, pccostgoals: *mut u32, prgcostgoals: *mut DBCOST) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetCostGoals)(windows_core::Interface::as_raw(self), pwszrowsetname.param().abi(), core::mem::transmute(pccostgoals), core::mem::transmute(prgcostgoals)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCostGoals)(windows_core::Interface::as_raw(self), pwszrowsetname.param().abi(), pccostgoals as _, prgcostgoals as _).ok() } } pub unsafe fn GetCostLimits(&self, pwszrowsetname: P0, pccostlimits: *mut u32, prgcostlimits: *mut DBCOST) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetCostLimits)(windows_core::Interface::as_raw(self), pwszrowsetname.param().abi(), core::mem::transmute(pccostlimits), core::mem::transmute(prgcostlimits)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCostLimits)(windows_core::Interface::as_raw(self), pwszrowsetname.param().abi(), pccostlimits as _, prgcostlimits as _).ok() } } pub unsafe fn SetCostGoals(&self, pwszrowsetname: P0, rgcostgoals: &[DBCOST]) -> windows_core::Result<()> where @@ -6085,7 +5980,7 @@ windows_core::imp::interface_hierarchy!(ICommandProperties, windows_core::IUnkno impl ICommandProperties { #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetProperties(&self, rgpropertyidsets: Option<&[DBPROPIDSET]>, pcpropertysets: *mut u32, prgpropertysets: *mut *mut DBPROPSET) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperties)(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(pcpropertysets), core::mem::transmute(prgpropertysets)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperties)(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())), pcpropertysets as _, prgpropertysets as _).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: &[DBPROPSET]) -> windows_core::Result<()> { @@ -6140,7 +6035,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetCommandStream)(windows_core::Interface::as_raw(self), piid.unwrap_or(core::mem::zeroed()) as _, pguiddialect.unwrap_or(core::mem::zeroed()) as _, 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 @@ -6194,7 +6089,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetCommandText)(windows_core::Interface::as_raw(self), pguiddialect.unwrap_or(core::mem::zeroed()) as _, ppwszcommand as _).ok() } } pub unsafe fn SetCommandText(&self, rguiddialect: *const windows_core::GUID, pwszcommand: P1) -> windows_core::Result<()> where @@ -6288,13 +6183,13 @@ windows_core::imp::interface_hierarchy!(ICommandWithParameters, windows_core::IU impl ICommandWithParameters { #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetParameterInfo(&self, pcparams: *mut usize, prgparaminfo: *mut *mut DBPARAMINFO, ppnamesbuffer: Option<*mut *mut u16>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetParameterInfo)(windows_core::Interface::as_raw(self), pcparams as _, prgparaminfo as _, ppnamesbuffer.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn MapParameterNames(&self, cparamnames: usize, rgparamnames: *const windows_core::PCWSTR, rgparamordinals: *mut isize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).MapParameterNames)(windows_core::Interface::as_raw(self), cparamnames, rgparamnames, core::mem::transmute(rgparamordinals)).ok() } + unsafe { (windows_core::Interface::vtable(self).MapParameterNames)(windows_core::Interface::as_raw(self), cparamnames, rgparamnames, rgparamordinals as _).ok() } } pub unsafe fn SetParameterInfo(&self, cparams: usize, rgparamordinals: Option<*const usize>, rgparambindinfo: Option<*const DBPARAMBINDINFO>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetParameterInfo)(windows_core::Interface::as_raw(self), cparams, core::mem::transmute(rgparamordinals.unwrap_or(core::mem::zeroed())), core::mem::transmute(rgparambindinfo.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetParameterInfo)(windows_core::Interface::as_raw(self), cparams, rgparamordinals.unwrap_or(core::mem::zeroed()) as _, rgparambindinfo.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -6376,7 +6271,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetComparisonInfo)(windows_core::Interface::as_raw(self), ppszpropertyname.unwrap_or(core::mem::zeroed()) as _, pcop.unwrap_or(core::mem::zeroed()) as _, ppropvar.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetValueType(&self) -> windows_core::Result { unsafe { @@ -6391,7 +6286,7 @@ impl ICondition { } } pub unsafe fn GetInputTerms(&self, pppropertyterm: Option<*mut Option>, ppoperationterm: Option<*mut Option>, ppvalueterm: Option<*mut Option>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetInputTerms)(windows_core::Interface::as_raw(self), pppropertyterm.unwrap_or(core::mem::zeroed()) as _, ppoperationterm.unwrap_or(core::mem::zeroed()) as _, ppvalueterm.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Clone(&self) -> windows_core::Result { unsafe { @@ -6535,7 +6430,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetLeafConditionInfo)(windows_core::Interface::as_raw(self), ppropkey.unwrap_or(core::mem::zeroed()) as _, pcop.unwrap_or(core::mem::zeroed()) as _, ppropvar.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -6630,7 +6525,7 @@ impl IConditionFactory { { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).Resolve)(windows_core::Interface::as_raw(self), pc.param().abi(), sqro, core::mem::transmute(pstreferencetime.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).Resolve)(windows_core::Interface::as_raw(self), pc.param().abi(), sqro, pstreferencetime.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } } @@ -6814,7 +6709,7 @@ impl IConditionFactory2 { T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - unsafe { (windows_core::Interface::vtable(self).ResolveCondition)(windows_core::Interface::as_raw(self), pc.param().abi(), sqro, core::mem::transmute(pstreferencetime.unwrap_or(core::mem::zeroed())), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } + unsafe { (windows_core::Interface::vtable(self).ResolveCondition)(windows_core::Interface::as_raw(self), pc.param().abi(), sqro, pstreferencetime.unwrap_or(core::mem::zeroed()) as _, &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } } #[repr(C)] @@ -6973,7 +6868,7 @@ impl IConditionGenerator { { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GenerateForLeaf)(windows_core::Interface::as_raw(self), pconditionfactory.param().abi(), pszpropertyname.param().abi(), cop, pszvaluetype.param().abi(), pszvalue.param().abi(), pszvalue2.param().abi(), ppropertynameterm.param().abi(), poperationterm.param().abi(), pvalueterm.param().abi(), automaticwildcard.into(), core::mem::transmute(pnostringquery), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GenerateForLeaf)(windows_core::Interface::as_raw(self), pconditionfactory.param().abi(), pszpropertyname.param().abi(), cop, pszvaluetype.param().abi(), pszvalue.param().abi(), pszvalue2.param().abi(), ppropertynameterm.param().abi(), poperationterm.param().abi(), pvalueterm.param().abi(), automaticwildcard.into(), pnostringquery as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] @@ -6981,7 +6876,7 @@ impl IConditionGenerator { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DefaultPhrase)(windows_core::Interface::as_raw(self), pszvaluetype.param().abi(), core::mem::transmute(ppropvar), fuseenglish.into(), core::mem::transmute(ppszphrase.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).DefaultPhrase)(windows_core::Interface::as_raw(self), pszvaluetype.param().abi(), core::mem::transmute(ppropvar), fuseenglish.into(), ppszphrase.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -7092,7 +6987,7 @@ impl ICreateRow { P1: windows_core::Param, P5: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateRow)(windows_core::Interface::as_raw(self), punkouter.param().abi(), pwszurl.param().abi(), dwbindurlflags, rguid, riid, pauthenticate.param().abi(), core::mem::transmute(pimplsession.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwbindstatus), core::mem::transmute(ppwsznewurl.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppunk)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateRow)(windows_core::Interface::as_raw(self), punkouter.param().abi(), pwszurl.param().abi(), dwbindurlflags, rguid, riid, pauthenticate.param().abi(), pimplsession.unwrap_or(core::mem::zeroed()) as _, pdwbindstatus as _, ppwsznewurl.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(ppunk)).ok() } } } #[repr(C)] @@ -7194,7 +7089,7 @@ impl IDBAsynchStatus { unsafe { (windows_core::Interface::vtable(self).Abort)(windows_core::Interface::as_raw(self), hchapter, eoperation).ok() } } pub unsafe fn GetStatus(&self, hchapter: usize, eoperation: u32, pulprogress: Option<*mut usize>, pulprogressmax: Option<*mut usize>, peasynchphase: *mut u32, ppwszstatustext: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), hchapter, 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() } + unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), hchapter, eoperation, pulprogress.unwrap_or(core::mem::zeroed()) as _, pulprogressmax.unwrap_or(core::mem::zeroed()) as _, peasynchphase as _, ppwszstatustext.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -7359,14 +7254,14 @@ impl IDBDataSourceAdmin { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateDataSource)(windows_core::Interface::as_raw(self), rgpropertysets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgpropertysets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), punkouter.param().abi(), riid, core::mem::transmute(ppdbsession.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateDataSource)(windows_core::Interface::as_raw(self), rgpropertysets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgpropertysets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), punkouter.param().abi(), riid, ppdbsession.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn DestroyDataSource(&self) -> windows_core::Result<()> { unsafe { (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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetCreationProperties)(windows_core::Interface::as_raw(self), rgpropertyidsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgpropertyidsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcpropertyinfosets as _, prgpropertyinfosets as _, ppdescbuffer.unwrap_or(core::mem::zeroed()) as _).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<()> { @@ -7448,7 +7343,7 @@ impl IDBInfo { } } pub unsafe fn GetLiteralInfo(&self, rgliterals: Option<&[u32]>, pcliteralinfo: *mut u32, prgliteralinfo: *mut *mut DBLITERALINFO, ppcharbuffer: *mut *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLiteralInfo)(windows_core::Interface::as_raw(self), rgliterals.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgliterals.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pcliteralinfo), core::mem::transmute(prgliteralinfo), core::mem::transmute(ppcharbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLiteralInfo)(windows_core::Interface::as_raw(self), rgliterals.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgliterals.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcliteralinfo as _, prgliteralinfo as _, ppcharbuffer as _).ok() } } } #[repr(C)] @@ -7604,11 +7499,11 @@ windows_core::imp::interface_hierarchy!(IDBProperties, windows_core::IUnknown); impl IDBProperties { #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetProperties(&self, rgpropertyidsets: Option<&[DBPROPIDSET]>, pcpropertysets: *mut u32, prgpropertysets: *mut *mut DBPROPSET) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperties)(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(pcpropertysets), core::mem::transmute(prgpropertysets)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperties)(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())), pcpropertysets as _, prgpropertysets as _).ok() } } #[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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetPropertyInfo)(windows_core::Interface::as_raw(self), rgpropertyidsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgpropertyidsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcpropertyinfosets as _, prgpropertyinfosets as _, ppdescbuffer.unwrap_or(core::mem::zeroed()) as _).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<()> { @@ -7684,7 +7579,7 @@ impl IDBSchemaCommand { } } pub unsafe fn GetSchemas(&self, pcschemas: *mut u32, prgschemas: *mut *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSchemas)(windows_core::Interface::as_raw(self), core::mem::transmute(pcschemas), core::mem::transmute(prgschemas)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSchemas)(windows_core::Interface::as_raw(self), pcschemas as _, prgschemas as _).ok() } } } #[repr(C)] @@ -7739,7 +7634,7 @@ impl IDBSchemaRowset { unsafe { (windows_core::Interface::vtable(self).GetRowset)(windows_core::Interface::as_raw(self), punkouter.param().abi(), rguidschema, rgrestrictions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgrestrictions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), riid, rgpropertysets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgpropertysets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pprowset)).ok() } } pub unsafe fn GetSchemas(&self, pcschemas: *mut u32, prgschemas: *mut *mut windows_core::GUID, prgrestrictionsupport: *mut *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSchemas)(windows_core::Interface::as_raw(self), core::mem::transmute(pcschemas), core::mem::transmute(prgschemas), core::mem::transmute(prgrestrictionsupport)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSchemas)(windows_core::Interface::as_raw(self), pcschemas as _, prgschemas as _, prgrestrictionsupport as _).ok() } } } #[repr(C)] @@ -7788,7 +7683,7 @@ windows_core::imp::interface_hierarchy!(IDCInfo, windows_core::IUnknown); impl IDCInfo { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetInfo(&self, cinfo: u32, rgeinfotype: *const u32, prginfo: *mut *mut DCINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInfo)(windows_core::Interface::as_raw(self), cinfo, rgeinfotype, core::mem::transmute(prginfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInfo)(windows_core::Interface::as_raw(self), cinfo, rgeinfotype, prginfo as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn SetInfo(&self, rginfo: &[DCINFO]) -> windows_core::Result<()> { @@ -7897,13 +7792,13 @@ windows_core::imp::define_interface!(IDataConvert, IDataConvert_Vtbl, 0x0c733a8d windows_core::imp::interface_hierarchy!(IDataConvert, windows_core::IUnknown); impl IDataConvert { pub unsafe fn DataConvert(&self, wsrctype: u16, wdsttype: u16, cbsrclength: usize, pcbdstlength: Option<*mut usize>, psrc: *const core::ffi::c_void, pdst: *mut core::ffi::c_void, cbdstmaxlength: usize, dbssrcstatus: u32, pdbsstatus: Option<*mut u32>, bprecision: u8, bscale: u8, dwflags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DataConvert)(windows_core::Interface::as_raw(self), wsrctype, wdsttype, cbsrclength, core::mem::transmute(pcbdstlength.unwrap_or(core::mem::zeroed())), psrc, core::mem::transmute(pdst), cbdstmaxlength, dbssrcstatus, core::mem::transmute(pdbsstatus.unwrap_or(core::mem::zeroed())), bprecision, bscale, dwflags).ok() } + unsafe { (windows_core::Interface::vtable(self).DataConvert)(windows_core::Interface::as_raw(self), wsrctype, wdsttype, cbsrclength, pcbdstlength.unwrap_or(core::mem::zeroed()) as _, psrc, pdst as _, cbdstmaxlength, dbssrcstatus, pdbsstatus.unwrap_or(core::mem::zeroed()) as _, bprecision, bscale, dwflags).ok() } } pub unsafe fn CanConvert(&self, wsrctype: u16, wdsttype: u16) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).CanConvert)(windows_core::Interface::as_raw(self), wsrctype, wdsttype).ok() } } pub unsafe fn GetConversionSize(&self, wsrctype: u16, wdsttype: u16, pcbsrclength: Option<*const usize>, pcbdstlength: Option<*mut usize>, psrc: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetConversionSize)(windows_core::Interface::as_raw(self), wsrctype, 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() } + unsafe { (windows_core::Interface::vtable(self).GetConversionSize)(windows_core::Interface::as_raw(self), wsrctype, wdsttype, pcbsrclength.unwrap_or(core::mem::zeroed()) as _, pcbdstlength.unwrap_or(core::mem::zeroed()) as _, psrc.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -8128,7 +8023,7 @@ impl IDataSourceLocator { } } pub unsafe fn PromptEdit(&self, ppadoconnection: *mut Option, pbsuccess: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).PromptEdit)(windows_core::Interface::as_raw(self), core::mem::transmute(ppadoconnection), core::mem::transmute(pbsuccess)).ok() } + unsafe { (windows_core::Interface::vtable(self).PromptEdit)(windows_core::Interface::as_raw(self), core::mem::transmute(ppadoconnection), pbsuccess as _).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -8204,7 +8099,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<()> { - unsafe { (windows_core::Interface::vtable(self).Name)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszname.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Name)(windows_core::Interface::as_raw(self), ppszname.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Base(&self) -> windows_core::Result { unsafe { @@ -8252,7 +8147,7 @@ impl IEntity { } } pub unsafe fn DefaultPhrase(&self, ppszphrase: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DefaultPhrase)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszphrase.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).DefaultPhrase)(windows_core::Interface::as_raw(self), ppszphrase.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -8367,7 +8262,7 @@ windows_core::imp::interface_hierarchy!(IEnumItemProperties, windows_core::IUnkn impl IEnumItemProperties { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn Next(&self, rgelt: &mut [ITEMPROP], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -8472,7 +8367,7 @@ windows_core::imp::define_interface!(IEnumSearchRoots, IEnumSearchRoots_Vtbl, 0x windows_core::imp::interface_hierarchy!(IEnumSearchRoots, windows_core::IUnknown); impl IEnumSearchRoots { pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -8550,7 +8445,7 @@ windows_core::imp::define_interface!(IEnumSearchScopeRules, IEnumSearchScopeRule windows_core::imp::interface_hierarchy!(IEnumSearchScopeRules, windows_core::IUnknown); impl IEnumSearchScopeRules { pub unsafe fn Next(&self, pprgelt: &mut [Option], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pprgelt.len().try_into().unwrap(), core::mem::transmute(pprgelt.as_ptr()), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pprgelt.len().try_into().unwrap(), core::mem::transmute(pprgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -8628,7 +8523,7 @@ windows_core::imp::define_interface!(IEnumSubscription, IEnumSubscription_Vtbl, windows_core::imp::interface_hierarchy!(IEnumSubscription, windows_core::IUnknown); impl IEnumSubscription { pub unsafe fn Next(&self, rgelt: &mut [windows_core::GUID], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -8728,10 +8623,10 @@ 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetErrorDescription)(windows_core::Interface::as_raw(self), hrerror, dwlookupid, pdispparams, lcid, core::mem::transmute(pbstrsource.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbstrdescription.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetErrorDescription)(windows_core::Interface::as_raw(self), hrerror, dwlookupid, pdispparams, lcid, pbstrsource.unwrap_or(core::mem::zeroed()) as _, pbstrdescription.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetHelpInfo)(windows_core::Interface::as_raw(self), hrerror, dwlookupid, lcid, core::mem::transmute(pbstrhelpfile), core::mem::transmute(pdwhelpcontext)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetHelpInfo)(windows_core::Interface::as_raw(self), hrerror, dwlookupid, lcid, core::mem::transmute(pbstrhelpfile), pdwhelpcontext as _).ok() } } pub unsafe fn ReleaseErrors(&self, dwdynamicerrorid: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ReleaseErrors)(windows_core::Interface::as_raw(self), dwdynamicerrorid).ok() } @@ -8795,10 +8690,10 @@ impl IErrorRecords { where P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).AddErrorRecord)(windows_core::Interface::as_raw(self), perrorinfo, dwlookupid, core::mem::transmute(pdispparams.unwrap_or(core::mem::zeroed())), punkcustomerror.param().abi(), dwdynamicerrorid).ok() } + unsafe { (windows_core::Interface::vtable(self).AddErrorRecord)(windows_core::Interface::as_raw(self), perrorinfo, dwlookupid, pdispparams.unwrap_or(core::mem::zeroed()) as _, punkcustomerror.param().abi(), dwdynamicerrorid).ok() } } pub unsafe fn GetBasicErrorInfo(&self, ulrecordnum: u32, perrorinfo: *mut ERRORINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBasicErrorInfo)(windows_core::Interface::as_raw(self), ulrecordnum, core::mem::transmute(perrorinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBasicErrorInfo)(windows_core::Interface::as_raw(self), ulrecordnum, perrorinfo as _).ok() } } pub unsafe fn GetCustomErrorObject(&self, ulrecordnum: u32, riid: *const windows_core::GUID) -> windows_core::Result { unsafe { @@ -9122,11 +9017,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<()> { - unsafe { (windows_core::Interface::vtable(self).CreateIndex)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).CreateIndex)(windows_core::Interface::as_raw(self), ptableid, pindexid.unwrap_or(core::mem::zeroed()) as _, rgindexcolumndescs.len().try_into().unwrap(), core::mem::transmute(rgindexcolumndescs.as_ptr()), rgpropertysets.len().try_into().unwrap(), core::mem::transmute(rgpropertysets.as_ptr()), ppindexid.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).DropIndex)(windows_core::Interface::as_raw(self), ptableid, core::mem::transmute(pindexid.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).DropIndex)(windows_core::Interface::as_raw(self), ptableid, pindexid.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -9178,7 +9073,7 @@ windows_core::imp::interface_hierarchy!(IInterval, windows_core::IUnknown); impl IInterval { #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn GetLimits(&self, pilklower: *mut INTERVAL_LIMIT_KIND, ppropvarlower: *mut super::Com::StructuredStorage::PROPVARIANT, pilkupper: *mut INTERVAL_LIMIT_KIND, ppropvarupper: *mut super::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLimits)(windows_core::Interface::as_raw(self), core::mem::transmute(pilklower), core::mem::transmute(ppropvarlower), core::mem::transmute(pilkupper), core::mem::transmute(ppropvarupper)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLimits)(windows_core::Interface::as_raw(self), pilklower as _, core::mem::transmute(ppropvarlower), pilkupper as _, core::mem::transmute(ppropvarupper)).ok() } } } #[repr(C)] @@ -9223,7 +9118,7 @@ impl ILoadFilter { P0: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).LoadIFilter)(windows_core::Interface::as_raw(self), pwcspath.param().abi(), pfilteredsources, punkouter.param().abi(), fusedefault.into(), core::mem::transmute(pfilterclsid), core::mem::transmute(searchdecsize), core::mem::transmute(pwcssearchdesc), core::mem::transmute(ppifilt)).ok() } + unsafe { (windows_core::Interface::vtable(self).LoadIFilter)(windows_core::Interface::as_raw(self), pwcspath.param().abi(), pfilteredsources, punkouter.param().abi(), fusedefault.into(), pfilterclsid as _, searchdecsize as _, pwcssearchdesc as _, core::mem::transmute(ppifilt)).ok() } } #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe fn LoadIFilterFromStorage(&self, pstg: P0, punkouter: P1, pwcsoverride: P2, fusedefault: bool, pfilterclsid: *mut windows_core::GUID, searchdecsize: *mut i32, pwcssearchdesc: *mut *mut u16, ppifilt: *mut Option) -> windows_core::Result<()> @@ -9232,7 +9127,7 @@ impl ILoadFilter { P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).LoadIFilterFromStorage)(windows_core::Interface::as_raw(self), pstg.param().abi(), punkouter.param().abi(), pwcsoverride.param().abi(), fusedefault.into(), core::mem::transmute(pfilterclsid), core::mem::transmute(searchdecsize), core::mem::transmute(pwcssearchdesc), core::mem::transmute(ppifilt)).ok() } + unsafe { (windows_core::Interface::vtable(self).LoadIFilterFromStorage)(windows_core::Interface::as_raw(self), pstg.param().abi(), punkouter.param().abi(), pwcsoverride.param().abi(), fusedefault.into(), pfilterclsid as _, searchdecsize as _, pwcssearchdesc as _, core::mem::transmute(ppifilt)).ok() } } #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com"))] pub unsafe fn LoadIFilterFromStream(&self, pstm: P0, pfilteredsources: *const FILTERED_DATA_SOURCES, punkouter: P2, fusedefault: bool, pfilterclsid: *mut windows_core::GUID, searchdecsize: *mut i32, pwcssearchdesc: *mut *mut u16, ppifilt: *mut Option) -> windows_core::Result<()> @@ -9240,7 +9135,7 @@ impl ILoadFilter { P0: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).LoadIFilterFromStream)(windows_core::Interface::as_raw(self), pstm.param().abi(), pfilteredsources, punkouter.param().abi(), fusedefault.into(), core::mem::transmute(pfilterclsid), core::mem::transmute(searchdecsize), core::mem::transmute(pwcssearchdesc), core::mem::transmute(ppifilt)).ok() } + unsafe { (windows_core::Interface::vtable(self).LoadIFilterFromStream)(windows_core::Interface::as_raw(self), pstm.param().abi(), pfilteredsources, punkouter.param().abi(), fusedefault.into(), pfilterclsid as _, searchdecsize as _, pwcssearchdesc as _, core::mem::transmute(ppifilt)).ok() } } } #[repr(C)] @@ -9310,7 +9205,7 @@ windows_core::imp::interface_hierarchy!(ILoadFilterWithPrivateComActivation, win impl ILoadFilterWithPrivateComActivation { #[cfg(feature = "Win32_Storage_IndexServer")] pub unsafe fn LoadIFilterWithPrivateComActivation(&self, filteredsources: *const FILTERED_DATA_SOURCES, usedefault: bool, filterclsid: *mut windows_core::GUID, isfilterprivatecomactivated: *mut super::super::Foundation::BOOL, filterobj: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).LoadIFilterWithPrivateComActivation)(windows_core::Interface::as_raw(self), filteredsources, usedefault.into(), core::mem::transmute(filterclsid), core::mem::transmute(isfilterprivatecomactivated), core::mem::transmute(filterobj)).ok() } + unsafe { (windows_core::Interface::vtable(self).LoadIFilterWithPrivateComActivation)(windows_core::Interface::as_raw(self), filteredsources, usedefault.into(), filterclsid as _, isfilterprivatecomactivated as _, core::mem::transmute(filterobj)).ok() } } } #[repr(C)] @@ -9352,7 +9247,7 @@ impl IMDDataset { unsafe { (windows_core::Interface::vtable(self).FreeAxisInfo)(windows_core::Interface::as_raw(self), rgaxisinfo.len().try_into().unwrap(), core::mem::transmute(rgaxisinfo.as_ptr())).ok() } } pub unsafe fn GetAxisInfo(&self, pcaxes: *mut usize, prgaxisinfo: *mut *mut MDAXISINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAxisInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pcaxes), core::mem::transmute(prgaxisinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAxisInfo)(windows_core::Interface::as_raw(self), pcaxes as _, prgaxisinfo as _).ok() } } #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetAxisRowset(&self, punkouter: P0, iaxis: usize, riid: *const windows_core::GUID, rgpropertysets: &mut [DBPROPSET], pprowset: *mut Option) -> windows_core::Result<()> @@ -9362,7 +9257,7 @@ impl IMDDataset { unsafe { (windows_core::Interface::vtable(self).GetAxisRowset)(windows_core::Interface::as_raw(self), punkouter.param().abi(), iaxis, riid, rgpropertysets.len().try_into().unwrap(), core::mem::transmute(rgpropertysets.as_ptr()), core::mem::transmute(pprowset)).ok() } } pub unsafe fn GetCellData(&self, haccessor: HACCESSOR, ulstartcell: usize, ulendcell: usize, pdata: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCellData)(windows_core::Interface::as_raw(self), haccessor, ulstartcell, ulendcell, core::mem::transmute(pdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCellData)(windows_core::Interface::as_raw(self), haccessor, ulstartcell, ulendcell, pdata as _).ok() } } pub unsafe fn GetSpecification(&self, riid: *const windows_core::GUID) -> windows_core::Result { unsafe { @@ -9548,7 +9443,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), ppszkey.unwrap_or(core::mem::zeroed()) as _, ppszvalue.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -9581,7 +9476,7 @@ impl IMultipleResults { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetResult)(windows_core::Interface::as_raw(self), punkouter.param().abi(), lresultflag, riid, core::mem::transmute(pcrowsaffected.unwrap_or(core::mem::zeroed())), core::mem::transmute(pprowset.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetResult)(windows_core::Interface::as_raw(self), punkouter.param().abi(), lresultflag, riid, pcrowsaffected.unwrap_or(core::mem::zeroed()) as _, pprowset.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -9641,7 +9536,7 @@ impl INamedEntity { } } pub unsafe fn DefaultPhrase(&self, ppszphrase: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DefaultPhrase)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszphrase.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).DefaultPhrase)(windows_core::Interface::as_raw(self), ppszphrase.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -9724,7 +9619,7 @@ windows_core::imp::interface_hierarchy!(IObjectAccessControl, windows_core::IUnk impl IObjectAccessControl { #[cfg(all(feature = "Win32_Security_Authorization", feature = "Win32_Storage_IndexServer"))] pub unsafe fn GetObjectAccessRights(&self, pobject: *const SEC_OBJECT, pcaccessentries: *mut u32, prgaccessentries: *mut *mut super::super::Security::Authorization::EXPLICIT_ACCESS_W) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetObjectAccessRights)(windows_core::Interface::as_raw(self), pobject, core::mem::transmute(pcaccessentries), core::mem::transmute(prgaccessentries)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetObjectAccessRights)(windows_core::Interface::as_raw(self), pobject, pcaccessentries as _, prgaccessentries as _).ok() } } #[cfg(all(feature = "Win32_Security_Authorization", feature = "Win32_Storage_IndexServer"))] pub unsafe fn GetObjectOwner(&self, pobject: *const SEC_OBJECT) -> windows_core::Result<*mut super::super::Security::Authorization::TRUSTEE_W> { @@ -9742,7 +9637,7 @@ impl IObjectAccessControl { } #[cfg(all(feature = "Win32_Security_Authorization", feature = "Win32_Storage_IndexServer"))] pub unsafe fn SetObjectAccessRights(&self, pobject: *const SEC_OBJECT, caccessentries: u32, prgaccessentries: *mut super::super::Security::Authorization::EXPLICIT_ACCESS_W) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetObjectAccessRights)(windows_core::Interface::as_raw(self), pobject, caccessentries, core::mem::transmute(prgaccessentries)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetObjectAccessRights)(windows_core::Interface::as_raw(self), pobject, caccessentries, prgaccessentries as _).ok() } } #[cfg(all(feature = "Win32_Security_Authorization", feature = "Win32_Storage_IndexServer"))] pub unsafe fn SetObjectOwner(&self, pobject: *const SEC_OBJECT, powner: *const super::super::Security::Authorization::TRUSTEE_W) -> windows_core::Result<()> { @@ -9933,7 +9828,7 @@ impl IOpenRowset { where P0: windows_core::Param, { - unsafe { (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())), 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() } + unsafe { (windows_core::Interface::vtable(self).OpenRowset)(windows_core::Interface::as_raw(self), punkouter.param().abi(), ptableid.unwrap_or(core::mem::zeroed()) as _, pindexid.unwrap_or(core::mem::zeroed()) as _, 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())), pprowset.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -10166,7 +10061,7 @@ impl IQueryParser { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).RestatePropertyValueToString)(windows_core::Interface::as_raw(self), pcondition.param().abi(), fuseenglish.into(), core::mem::transmute(ppszpropertyname), core::mem::transmute(ppszquerystring)).ok() } + unsafe { (windows_core::Interface::vtable(self).RestatePropertyValueToString)(windows_core::Interface::as_raw(self), pcondition.param().abi(), fuseenglish.into(), ppszpropertyname as _, ppszquerystring as _).ok() } } } #[repr(C)] @@ -10392,7 +10287,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetQuery)(windows_core::Interface::as_raw(self), ppquerynode.unwrap_or(core::mem::zeroed()) as _, ppmaintype.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetErrors(&self) -> windows_core::Result where @@ -10402,7 +10297,7 @@ impl IQuerySolution { unsafe { (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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetLexicalData)(windows_core::Interface::as_raw(self), ppszinputstring.unwrap_or(core::mem::zeroed()) as _, pptokens.unwrap_or(core::mem::zeroed()) as _, plcid.unwrap_or(core::mem::zeroed()) as _, ppwordbreaker.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -10459,7 +10354,7 @@ windows_core::imp::define_interface!(IReadData, IReadData_Vtbl, 0x0c733a6a_2a1c_ windows_core::imp::interface_hierarchy!(IReadData, windows_core::IUnknown); impl IReadData { 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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadData)(windows_core::Interface::as_raw(self), hchapter, pbookmark.len().try_into().unwrap(), core::mem::transmute(pbookmark.as_ptr()), lrowsoffset, haccessor, crows, core::mem::transmute(pcrowsobtained), core::mem::transmute(ppfixeddata), core::mem::transmute(pcbvariabletotal), core::mem::transmute(ppvariabledata)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadData)(windows_core::Interface::as_raw(self), hchapter, pbookmark.len().try_into().unwrap(), core::mem::transmute(pbookmark.as_ptr()), lrowsoffset, haccessor, crows, pcrowsobtained as _, ppfixeddata as _, pcbvariabletotal as _, ppvariabledata as _).ok() } } pub unsafe fn ReleaseChapter(&self, hchapter: usize) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ReleaseChapter)(windows_core::Interface::as_raw(self), hchapter).ok() } @@ -10579,7 +10474,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<()> { - unsafe { (windows_core::Interface::vtable(self).Name)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszname.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Name)(windows_core::Interface::as_raw(self), ppszname.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn IsReal(&self) -> windows_core::Result { unsafe { @@ -10601,7 +10496,7 @@ impl IRelationship { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).DefaultPhrase)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszphrase.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).DefaultPhrase)(windows_core::Interface::as_raw(self), ppszphrase.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -10683,7 +10578,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), pfirstpos.unwrap_or(core::mem::zeroed()) as _, plength.unwrap_or(core::mem::zeroed()) as _, ppsz.unwrap_or(core::mem::zeroed()) as _, pvalue.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -10723,14 +10618,14 @@ impl IRow { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).GetSourceRowset)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(pprowset.unwrap_or(core::mem::zeroed())), core::mem::transmute(phrow.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSourceRowset)(windows_core::Interface::as_raw(self), riid, pprowset.unwrap_or(core::mem::zeroed()) as _, phrow.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).Open)(windows_core::Interface::as_raw(self), punkouter.param().abi(), pcolumnid, rguidcolumntype, dwbindflags, riid, core::mem::transmute(ppunk.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Open)(windows_core::Interface::as_raw(self), punkouter.param().abi(), pcolumnid, rguidcolumntype, dwbindflags, riid, ppunk.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -10830,7 +10725,7 @@ impl IRowPosition { unsafe { (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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetRowPosition)(windows_core::Interface::as_raw(self), phchapter.unwrap_or(core::mem::zeroed()) as _, phrow as _, pdwpositionflags.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetRowset(&self, riid: *const windows_core::GUID) -> windows_core::Result { unsafe { @@ -10957,11 +10852,11 @@ windows_core::imp::interface_hierarchy!(IRowSchemaChange, windows_core::IUnknown impl IRowSchemaChange { #[cfg(feature = "Win32_Storage_IndexServer")] pub unsafe fn DeleteColumns(&self, ccolumns: usize, rgcolumnids: *const super::super::Storage::IndexServer::DBID, rgdwstatus: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DeleteColumns)(windows_core::Interface::as_raw(self), ccolumns, rgcolumnids, core::mem::transmute(rgdwstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).DeleteColumns)(windows_core::Interface::as_raw(self), ccolumns, rgcolumnids, rgdwstatus as _).ok() } } #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com"))] pub unsafe fn AddColumns(&self, ccolumns: usize, rgnewcolumninfo: *const DBCOLUMNINFO, rgcolumns: *mut DBCOLUMNACCESS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AddColumns)(windows_core::Interface::as_raw(self), ccolumns, core::mem::transmute(rgnewcolumninfo), core::mem::transmute(rgcolumns)).ok() } + unsafe { (windows_core::Interface::vtable(self).AddColumns)(windows_core::Interface::as_raw(self), ccolumns, core::mem::transmute(rgnewcolumninfo), rgcolumns as _).ok() } } } #[repr(C)] @@ -11008,16 +10903,16 @@ windows_core::imp::define_interface!(IRowset, IRowset_Vtbl, 0x0c733a7c_2a1c_11ce windows_core::imp::interface_hierarchy!(IRowset, windows_core::IUnknown); impl IRowset { pub unsafe fn AddRefRows(&self, crows: usize, rghrows: *const usize, rgrefcounts: *mut u32, rgrowstatus: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AddRefRows)(windows_core::Interface::as_raw(self), crows, rghrows, core::mem::transmute(rgrefcounts), core::mem::transmute(rgrowstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).AddRefRows)(windows_core::Interface::as_raw(self), crows, rghrows, rgrefcounts as _, rgrowstatus as _).ok() } } pub unsafe fn GetData(&self, hrow: usize, haccessor: HACCESSOR, pdata: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), hrow, haccessor, core::mem::transmute(pdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), hrow, haccessor, pdata as _).ok() } } pub unsafe fn GetNextRows(&self, hreserved: usize, lrowsoffset: isize, pcrowsobtained: *mut usize, prghrows: &mut [*mut usize]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNextRows)(windows_core::Interface::as_raw(self), hreserved, lrowsoffset, prghrows.len().try_into().unwrap(), core::mem::transmute(pcrowsobtained), core::mem::transmute(prghrows.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNextRows)(windows_core::Interface::as_raw(self), hreserved, lrowsoffset, prghrows.len().try_into().unwrap(), pcrowsobtained as _, core::mem::transmute(prghrows.as_ptr())).ok() } } pub unsafe fn ReleaseRows(&self, crows: usize, rghrows: *const usize, rgrowoptions: *const u32, rgrefcounts: *mut u32, rgrowstatus: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReleaseRows)(windows_core::Interface::as_raw(self), crows, rghrows, rgrowoptions, core::mem::transmute(rgrefcounts), core::mem::transmute(rgrowstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReleaseRows)(windows_core::Interface::as_raw(self), crows, rghrows, rgrowoptions, rgrefcounts as _, rgrowstatus as _).ok() } } pub unsafe fn RestartPosition(&self, hreserved: usize) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RestartPosition)(windows_core::Interface::as_raw(self), hreserved).ok() } @@ -11089,7 +10984,7 @@ windows_core::imp::define_interface!(IRowsetAsynch, IRowsetAsynch_Vtbl, 0x0c733a windows_core::imp::interface_hierarchy!(IRowsetAsynch, windows_core::IUnknown); impl IRowsetAsynch { pub unsafe fn RatioFinished(&self, puldenominator: *mut usize, pulnumerator: *mut usize, pcrows: *mut usize, pfnewrows: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RatioFinished)(windows_core::Interface::as_raw(self), core::mem::transmute(puldenominator), core::mem::transmute(pulnumerator), core::mem::transmute(pcrows), core::mem::transmute(pfnewrows)).ok() } + unsafe { (windows_core::Interface::vtable(self).RatioFinished)(windows_core::Interface::as_raw(self), puldenominator as _, pulnumerator as _, pcrows as _, pfnewrows as _).ok() } } pub unsafe fn Stop(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Stop)(windows_core::Interface::as_raw(self)).ok() } @@ -11160,7 +11055,7 @@ windows_core::imp::define_interface!(IRowsetChange, IRowsetChange_Vtbl, 0x0c733a windows_core::imp::interface_hierarchy!(IRowsetChange, windows_core::IUnknown); impl IRowsetChange { pub unsafe fn DeleteRows(&self, hreserved: usize, crows: usize, rghrows: *const usize, rgrowstatus: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DeleteRows)(windows_core::Interface::as_raw(self), hreserved, crows, rghrows, core::mem::transmute(rgrowstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).DeleteRows)(windows_core::Interface::as_raw(self), hreserved, crows, rghrows, rgrowstatus as _).ok() } } pub unsafe fn SetData(&self, hrow: usize, haccessor: HACCESSOR, pdata: *const core::ffi::c_void) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetData)(windows_core::Interface::as_raw(self), hrow, haccessor, pdata).ok() } @@ -11226,10 +11121,10 @@ windows_core::imp::define_interface!(IRowsetChangeExtInfo, IRowsetChangeExtInfo_ windows_core::imp::interface_hierarchy!(IRowsetChangeExtInfo, windows_core::IUnknown); impl IRowsetChangeExtInfo { pub unsafe fn GetOriginalRow(&self, hreserved: usize, hrow: usize, phroworiginal: *mut usize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOriginalRow)(windows_core::Interface::as_raw(self), hreserved, hrow, core::mem::transmute(phroworiginal)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOriginalRow)(windows_core::Interface::as_raw(self), hreserved, hrow, phroworiginal as _).ok() } } pub unsafe fn GetPendingColumns(&self, hreserved: usize, hrow: usize, ccolumnordinals: u32, rgiordinals: *const u32, rgcolumnstatus: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPendingColumns)(windows_core::Interface::as_raw(self), hreserved, hrow, ccolumnordinals, rgiordinals, core::mem::transmute(rgcolumnstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPendingColumns)(windows_core::Interface::as_raw(self), hreserved, hrow, ccolumnordinals, rgiordinals, rgcolumnstatus as _).ok() } } } #[repr(C)] @@ -11552,7 +11447,7 @@ impl core::ops::Deref for IRowsetExactScroll { windows_core::imp::interface_hierarchy!(IRowsetExactScroll, windows_core::IUnknown, IRowset, IRowsetLocate, IRowsetScroll); impl IRowsetExactScroll { pub unsafe fn GetExactPosition(&self, hchapter: usize, pbookmark: &[u8], pulposition: *mut usize, pcrows: *mut usize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetExactPosition)(windows_core::Interface::as_raw(self), hchapter, pbookmark.len().try_into().unwrap(), core::mem::transmute(pbookmark.as_ptr()), core::mem::transmute(pulposition), core::mem::transmute(pcrows)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetExactPosition)(windows_core::Interface::as_raw(self), hchapter, pbookmark.len().try_into().unwrap(), core::mem::transmute(pbookmark.as_ptr()), pulposition as _, pcrows as _).ok() } } } #[repr(C)] @@ -11582,7 +11477,7 @@ windows_core::imp::define_interface!(IRowsetFastLoad, IRowsetFastLoad_Vtbl, 0x5c windows_core::imp::interface_hierarchy!(IRowsetFastLoad, windows_core::IUnknown); impl IRowsetFastLoad { pub unsafe fn InsertRow(&self, haccessor: HACCESSOR, pdata: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).InsertRow)(windows_core::Interface::as_raw(self), haccessor, core::mem::transmute(pdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).InsertRow)(windows_core::Interface::as_raw(self), haccessor, pdata as _).ok() } } pub unsafe fn Commit(&self, fdone: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Commit)(windows_core::Interface::as_raw(self), fdone.into()).ok() } @@ -11623,7 +11518,7 @@ windows_core::imp::define_interface!(IRowsetFind, IRowsetFind_Vtbl, 0x0c733a9d_2 windows_core::imp::interface_hierarchy!(IRowsetFind, windows_core::IUnknown); impl IRowsetFind { 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<()> { - unsafe { (windows_core::Interface::vtable(self).FindNextRow)(windows_core::Interface::as_raw(self), hchapter, haccessor, pfindvalue, compareop, pbookmark.len().try_into().unwrap(), core::mem::transmute(pbookmark.as_ptr()), lrowsoffset, crows, core::mem::transmute(pcrowsobtained), core::mem::transmute(prghrows)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindNextRow)(windows_core::Interface::as_raw(self), hchapter, haccessor, pfindvalue, compareop, pbookmark.len().try_into().unwrap(), core::mem::transmute(pbookmark.as_ptr()), lrowsoffset, crows, pcrowsobtained as _, prghrows as _).ok() } } } #[repr(C)] @@ -11684,7 +11579,7 @@ windows_core::imp::interface_hierarchy!(IRowsetIndex, windows_core::IUnknown); impl IRowsetIndex { #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetIndexInfo(&self, pckeycolumns: *mut usize, prgindexcolumndesc: *mut *mut DBINDEXCOLUMNDESC, pcindexpropertysets: *mut u32, prgindexpropertysets: *mut *mut DBPROPSET) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetIndexInfo)(windows_core::Interface::as_raw(self), pckeycolumns as _, prgindexcolumndesc as _, pcindexpropertysets as _, prgindexpropertysets as _).ok() } } pub unsafe fn Seek(&self, haccessor: HACCESSOR, ckeyvalues: usize, pdata: *const core::ffi::c_void, dwseekoptions: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Seek)(windows_core::Interface::as_raw(self), haccessor, ckeyvalues, pdata, dwseekoptions).ok() } @@ -11748,7 +11643,7 @@ windows_core::imp::interface_hierarchy!(IRowsetInfo, windows_core::IUnknown); impl IRowsetInfo { #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetProperties(&self, rgpropertyidsets: Option<&[DBPROPIDSET]>, pcpropertysets: *mut u32, prgpropertysets: *mut *mut DBPROPSET) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperties)(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(pcpropertysets), core::mem::transmute(prgpropertysets)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperties)(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())), pcpropertysets as _, prgpropertysets as _).ok() } } pub unsafe fn GetReferencedRowset(&self, iordinal: usize, riid: *const windows_core::GUID) -> windows_core::Result { unsafe { @@ -11829,7 +11724,7 @@ windows_core::imp::define_interface!(IRowsetKeys, IRowsetKeys_Vtbl, 0x0c733a12_2 windows_core::imp::interface_hierarchy!(IRowsetKeys, windows_core::IUnknown); impl IRowsetKeys { pub unsafe fn ListKeys(&self, pccolumns: *mut usize, prgcolumns: *mut *mut usize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ListKeys)(windows_core::Interface::as_raw(self), core::mem::transmute(pccolumns), core::mem::transmute(prgcolumns)).ok() } + unsafe { (windows_core::Interface::vtable(self).ListKeys)(windows_core::Interface::as_raw(self), pccolumns as _, prgcolumns as _).ok() } } } #[repr(C)] @@ -11871,13 +11766,13 @@ impl IRowsetLocate { } } pub unsafe fn GetRowsAt(&self, hreserved1: usize, hreserved2: usize, pbookmark: &[u8], lrowsoffset: isize, pcrowsobtained: *mut usize, prghrows: &mut [*mut usize]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRowsAt)(windows_core::Interface::as_raw(self), hreserved1, hreserved2, pbookmark.len().try_into().unwrap(), core::mem::transmute(pbookmark.as_ptr()), lrowsoffset, prghrows.len().try_into().unwrap(), core::mem::transmute(pcrowsobtained), core::mem::transmute(prghrows.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRowsAt)(windows_core::Interface::as_raw(self), hreserved1, hreserved2, pbookmark.len().try_into().unwrap(), core::mem::transmute(pbookmark.as_ptr()), lrowsoffset, prghrows.len().try_into().unwrap(), pcrowsobtained as _, core::mem::transmute(prghrows.as_ptr())).ok() } } pub unsafe fn GetRowsByBookmark(&self, hreserved: usize, crows: usize, rgcbbookmarks: *const usize, rgpbookmarks: *const *const u8, rghrows: *mut usize, rgrowstatus: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRowsByBookmark)(windows_core::Interface::as_raw(self), hreserved, crows, rgcbbookmarks, rgpbookmarks, core::mem::transmute(rghrows), core::mem::transmute(rgrowstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRowsByBookmark)(windows_core::Interface::as_raw(self), hreserved, crows, rgcbbookmarks, rgpbookmarks, rghrows as _, rgrowstatus as _).ok() } } pub unsafe fn Hash(&self, hreserved: usize, cbookmarks: usize, rgcbbookmarks: *const usize, rgpbookmarks: *const *const u8, rghashedvalues: *mut usize, rgbookmarkstatus: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Hash)(windows_core::Interface::as_raw(self), hreserved, cbookmarks, rgcbbookmarks, rgpbookmarks, core::mem::transmute(rghashedvalues), core::mem::transmute(rgbookmarkstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).Hash)(windows_core::Interface::as_raw(self), hreserved, cbookmarks, rgcbbookmarks, rgpbookmarks, rghashedvalues as _, rgbookmarkstatus as _).ok() } } } #[repr(C)] @@ -12093,10 +11988,10 @@ impl IRowsetPrioritization { unsafe { (windows_core::Interface::vtable(self).SetScopePriority)(windows_core::Interface::as_raw(self), priority, scopestatisticseventfrequency).ok() } } pub unsafe fn GetScopePriority(&self, priority: *mut PRIORITY_LEVEL, scopestatisticseventfrequency: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetScopePriority)(windows_core::Interface::as_raw(self), core::mem::transmute(priority), core::mem::transmute(scopestatisticseventfrequency)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScopePriority)(windows_core::Interface::as_raw(self), priority as _, scopestatisticseventfrequency as _).ok() } } pub unsafe fn GetScopeStatistics(&self, indexeddocumentcount: *mut u32, oustandingaddcount: *mut u32, oustandingmodifycount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetScopeStatistics)(windows_core::Interface::as_raw(self), core::mem::transmute(indexeddocumentcount), core::mem::transmute(oustandingaddcount), core::mem::transmute(oustandingmodifycount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScopeStatistics)(windows_core::Interface::as_raw(self), indexeddocumentcount as _, oustandingaddcount as _, oustandingmodifycount as _).ok() } } } #[repr(C)] @@ -12147,10 +12042,10 @@ windows_core::imp::define_interface!(IRowsetQueryStatus, IRowsetQueryStatus_Vtbl windows_core::imp::interface_hierarchy!(IRowsetQueryStatus, windows_core::IUnknown); impl IRowsetQueryStatus { pub unsafe fn GetStatus(&self, pdwstatus: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), pdwstatus as _).ok() } } pub unsafe fn GetStatusEx(&self, pdwstatus: *mut u32, pcfiltereddocuments: *mut u32, pcdocumentstofilter: *mut u32, pdwratiofinisheddenominator: *mut usize, pdwratiofinishednumerator: *mut usize, cbbmk: usize, pbmk: *const u8, pirowbmk: *mut usize, pcrowstotal: *mut usize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStatusEx)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwstatus), core::mem::transmute(pcfiltereddocuments), core::mem::transmute(pcdocumentstofilter), core::mem::transmute(pdwratiofinisheddenominator), core::mem::transmute(pdwratiofinishednumerator), cbbmk, pbmk, core::mem::transmute(pirowbmk), core::mem::transmute(pcrowstotal)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStatusEx)(windows_core::Interface::as_raw(self), pdwstatus as _, pcfiltereddocuments as _, pcdocumentstofilter as _, pdwratiofinisheddenominator as _, pdwratiofinishednumerator as _, cbbmk, pbmk, pirowbmk as _, pcrowstotal as _).ok() } } } #[repr(C)] @@ -12192,10 +12087,10 @@ windows_core::imp::define_interface!(IRowsetRefresh, IRowsetRefresh_Vtbl, 0x0c73 windows_core::imp::interface_hierarchy!(IRowsetRefresh, windows_core::IUnknown); impl IRowsetRefresh { pub unsafe fn RefreshVisibleData(&self, hchapter: usize, crows: usize, rghrows: *const usize, foverwrite: bool, pcrowsrefreshed: *mut usize, prghrowsrefreshed: *mut *mut usize, prgrowstatus: *mut *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RefreshVisibleData)(windows_core::Interface::as_raw(self), hchapter, crows, rghrows, foverwrite.into(), core::mem::transmute(pcrowsrefreshed), core::mem::transmute(prghrowsrefreshed), core::mem::transmute(prgrowstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).RefreshVisibleData)(windows_core::Interface::as_raw(self), hchapter, crows, rghrows, foverwrite.into(), pcrowsrefreshed as _, prghrowsrefreshed as _, prgrowstatus as _).ok() } } pub unsafe fn GetLastVisibleData(&self, hrow: usize, haccessor: HACCESSOR, pdata: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLastVisibleData)(windows_core::Interface::as_raw(self), hrow, haccessor, core::mem::transmute(pdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLastVisibleData)(windows_core::Interface::as_raw(self), hrow, haccessor, pdata as _).ok() } } } #[repr(C)] @@ -12237,10 +12132,10 @@ windows_core::imp::define_interface!(IRowsetResynch, IRowsetResynch_Vtbl, 0x0c73 windows_core::imp::interface_hierarchy!(IRowsetResynch, windows_core::IUnknown); impl IRowsetResynch { pub unsafe fn GetVisibleData(&self, hrow: usize, haccessor: HACCESSOR, pdata: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVisibleData)(windows_core::Interface::as_raw(self), hrow, haccessor, core::mem::transmute(pdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVisibleData)(windows_core::Interface::as_raw(self), hrow, haccessor, pdata as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).ResynchRows)(windows_core::Interface::as_raw(self), crows, rghrows, core::mem::transmute(pcrowsresynched), core::mem::transmute(prghrowsresynched), core::mem::transmute(prgrowstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).ResynchRows)(windows_core::Interface::as_raw(self), crows, rghrows, pcrowsresynched as _, prghrowsresynched as _, prgrowstatus as _).ok() } } } #[repr(C)] @@ -12288,10 +12183,10 @@ impl core::ops::Deref for IRowsetScroll { windows_core::imp::interface_hierarchy!(IRowsetScroll, windows_core::IUnknown, IRowset, IRowsetLocate); impl IRowsetScroll { pub unsafe fn GetApproximatePosition(&self, hreserved: usize, pbookmark: &[u8], pulposition: *mut usize, pcrows: *mut usize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetApproximatePosition)(windows_core::Interface::as_raw(self), hreserved, pbookmark.len().try_into().unwrap(), core::mem::transmute(pbookmark.as_ptr()), core::mem::transmute(pulposition), core::mem::transmute(pcrows)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetApproximatePosition)(windows_core::Interface::as_raw(self), hreserved, pbookmark.len().try_into().unwrap(), core::mem::transmute(pbookmark.as_ptr()), pulposition as _, pcrows as _).ok() } } pub unsafe fn GetRowsAtRatio(&self, hreserved1: usize, hreserved2: usize, ulnumerator: usize, uldenominator: usize, pcrowsobtained: *mut usize, prghrows: &mut [*mut usize]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRowsAtRatio)(windows_core::Interface::as_raw(self), hreserved1, hreserved2, ulnumerator, uldenominator, prghrows.len().try_into().unwrap(), core::mem::transmute(pcrowsobtained), core::mem::transmute(prghrows.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRowsAtRatio)(windows_core::Interface::as_raw(self), hreserved1, hreserved2, ulnumerator, uldenominator, prghrows.len().try_into().unwrap(), pcrowsobtained as _, core::mem::transmute(prghrows.as_ptr())).ok() } } } #[repr(C)] @@ -12339,19 +12234,19 @@ 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: HACCESSOR, pdata: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOriginalData)(windows_core::Interface::as_raw(self), hrow, haccessor, core::mem::transmute(pdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOriginalData)(windows_core::Interface::as_raw(self), hrow, haccessor, pdata as _).ok() } } pub unsafe fn GetPendingRows(&self, hreserved: usize, dwrowstatus: u32, pcpendingrows: *mut usize, prgpendingrows: *mut *mut usize, prgpendingstatus: *mut *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPendingRows)(windows_core::Interface::as_raw(self), hreserved, dwrowstatus, core::mem::transmute(pcpendingrows), core::mem::transmute(prgpendingrows), core::mem::transmute(prgpendingstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPendingRows)(windows_core::Interface::as_raw(self), hreserved, dwrowstatus, pcpendingrows as _, prgpendingrows as _, prgpendingstatus as _).ok() } } pub unsafe fn GetRowStatus(&self, hreserved: usize, crows: usize, rghrows: *const usize, rgpendingstatus: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRowStatus)(windows_core::Interface::as_raw(self), hreserved, crows, rghrows, core::mem::transmute(rgpendingstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRowStatus)(windows_core::Interface::as_raw(self), hreserved, crows, rghrows, rgpendingstatus as _).ok() } } pub unsafe fn Undo(&self, hreserved: usize, rghrows: &[usize], pcrowsundone: *mut usize, prgrowsundone: *mut *mut usize, prgrowstatus: *mut *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Undo)(windows_core::Interface::as_raw(self), hreserved, rghrows.len().try_into().unwrap(), core::mem::transmute(rghrows.as_ptr()), core::mem::transmute(pcrowsundone), core::mem::transmute(prgrowsundone), core::mem::transmute(prgrowstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).Undo)(windows_core::Interface::as_raw(self), hreserved, rghrows.len().try_into().unwrap(), core::mem::transmute(rghrows.as_ptr()), pcrowsundone as _, prgrowsundone as _, prgrowstatus as _).ok() } } pub unsafe fn Update(&self, hreserved: usize, rghrows: &[usize], pcrows: *mut usize, prgrows: *mut *mut usize, prgrowstatus: *mut *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Update)(windows_core::Interface::as_raw(self), hreserved, rghrows.len().try_into().unwrap(), core::mem::transmute(rghrows.as_ptr()), core::mem::transmute(pcrows), core::mem::transmute(prgrows), core::mem::transmute(prgrowstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).Update)(windows_core::Interface::as_raw(self), hreserved, rghrows.len().try_into().unwrap(), core::mem::transmute(rghrows.as_ptr()), pcrows as _, prgrows as _, prgrowstatus as _).ok() } } } #[repr(C)] @@ -12429,7 +12324,7 @@ impl IRowsetView { } } pub unsafe fn GetView(&self, hchapter: usize, riid: *const windows_core::GUID, phchaptersource: *mut usize, ppview: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetView)(windows_core::Interface::as_raw(self), hchapter, riid, core::mem::transmute(phchaptersource), core::mem::transmute(ppview)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetView)(windows_core::Interface::as_raw(self), hchapter, riid, phchaptersource as _, core::mem::transmute(ppview)).ok() } } } #[repr(C)] @@ -12581,10 +12476,10 @@ impl IRowsetWatchRegion { unsafe { (windows_core::Interface::vtable(self).DeleteWatchRegion)(windows_core::Interface::as_raw(self), hregion).ok() } } pub unsafe fn GetWatchRegionInfo(&self, hregion: usize, pdwwatchmode: *mut u32, phchapter: *mut usize, pcbbookmark: *mut usize, ppbookmark: *mut *mut u8, pcrows: *mut isize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWatchRegionInfo)(windows_core::Interface::as_raw(self), hregion, core::mem::transmute(pdwwatchmode), core::mem::transmute(phchapter), core::mem::transmute(pcbbookmark), core::mem::transmute(ppbookmark), core::mem::transmute(pcrows)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWatchRegionInfo)(windows_core::Interface::as_raw(self), hregion, pdwwatchmode as _, phchapter as _, pcbbookmark as _, ppbookmark as _, pcrows as _).ok() } } pub unsafe fn Refresh(&self, pcchangesobtained: *mut usize, prgchanges: *mut *mut DBROWWATCHCHANGE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Refresh)(windows_core::Interface::as_raw(self), core::mem::transmute(pcchangesobtained), core::mem::transmute(prgchanges)).ok() } + unsafe { (windows_core::Interface::vtable(self).Refresh)(windows_core::Interface::as_raw(self), pcchangesobtained as _, prgchanges as _).ok() } } pub unsafe fn ShrinkWatchRegion(&self, hregion: usize, hchapter: usize, pbookmark: &[u8], crows: isize) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ShrinkWatchRegion)(windows_core::Interface::as_raw(self), hregion, hchapter, pbookmark.len().try_into().unwrap(), core::mem::transmute(pbookmark.as_ptr()), crows).ok() } @@ -12672,10 +12567,10 @@ windows_core::imp::interface_hierarchy!(IRowsetWithParameters, windows_core::IUn impl IRowsetWithParameters { #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetParameterInfo(&self, pcparams: *mut usize, prgparaminfo: *mut *mut DBPARAMINFO, ppnamesbuffer: *mut *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetParameterInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pcparams), core::mem::transmute(prgparaminfo), core::mem::transmute(ppnamesbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetParameterInfo)(windows_core::Interface::as_raw(self), pcparams as _, prgparaminfo as _, ppnamesbuffer as _).ok() } } pub unsafe fn Requery(&self, pparams: *const DBPARAMS, pulerrorparam: *mut u32, phreserved: *mut usize) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Requery)(windows_core::Interface::as_raw(self), pparams, core::mem::transmute(pulerrorparam), core::mem::transmute(phreserved)).ok() } + unsafe { (windows_core::Interface::vtable(self).Requery)(windows_core::Interface::as_raw(self), pparams, pulerrorparam as _, phreserved as _).ok() } } } #[repr(C)] @@ -12723,7 +12618,7 @@ windows_core::imp::define_interface!(ISQLErrorInfo, ISQLErrorInfo_Vtbl, 0x0c733a windows_core::imp::interface_hierarchy!(ISQLErrorInfo, windows_core::IUnknown); impl ISQLErrorInfo { pub unsafe fn GetSQLInfo(&self, pbstrsqlstate: *mut windows_core::BSTR, plnativeerror: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSQLInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrsqlstate), core::mem::transmute(plnativeerror)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSQLInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrsqlstate), plnativeerror as _).ok() } } } #[repr(C)] @@ -12754,7 +12649,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<()> { - unsafe { (windows_core::Interface::vtable(self).GetDiagField)(windows_core::Interface::as_raw(self), core::mem::transmute(pdiaginfo.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDiagField)(windows_core::Interface::as_raw(self), pdiaginfo.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -12827,7 +12722,7 @@ windows_core::imp::define_interface!(ISQLServerErrorInfo, ISQLServerErrorInfo_Vt windows_core::imp::interface_hierarchy!(ISQLServerErrorInfo, windows_core::IUnknown); impl ISQLServerErrorInfo { pub unsafe fn GetErrorInfo(&self, pperrorinfo: *mut *mut SSERRORINFO, ppstringsbuffer: *mut *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetErrorInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pperrorinfo), core::mem::transmute(ppstringsbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetErrorInfo)(windows_core::Interface::as_raw(self), pperrorinfo as _, ppstringsbuffer as _).ok() } } } #[repr(C)] @@ -12900,7 +12795,7 @@ windows_core::imp::interface_hierarchy!(ISchemaLock, windows_core::IUnknown); impl ISchemaLock { #[cfg(feature = "Win32_Storage_IndexServer")] 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetSchemaLock)(windows_core::Interface::as_raw(self), core::mem::transmute(ptableid), lmmode, core::mem::transmute(phlockhandle), core::mem::transmute(ptableversion)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSchemaLock)(windows_core::Interface::as_raw(self), ptableid as _, lmmode, phlockhandle as _, ptableversion as _).ok() } } pub unsafe fn ReleaseSchemaLock(&self, hlockhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ReleaseSchemaLock)(windows_core::Interface::as_raw(self), hlockhandle).ok() } @@ -12997,7 +12892,7 @@ impl ISchemaProvider { P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).LookupAuthoredNamedEntity)(windows_core::Interface::as_raw(self), pentity.param().abi(), pszinputstring.param().abi(), ptokencollection.param().abi(), ctokensbegin, core::mem::transmute(pctokenslength), core::mem::transmute(ppszvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).LookupAuthoredNamedEntity)(windows_core::Interface::as_raw(self), pentity.param().abi(), pszinputstring.param().abi(), ptokencollection.param().abi(), ctokensbegin, pctokenslength as _, ppszvalue as _).ok() } } } #[repr(C)] @@ -13106,24 +13001,24 @@ impl IScopedOperations { where P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Copy)(windows_core::Interface::as_raw(self), crows, core::mem::transmute(rgpwszsourceurls.unwrap_or(core::mem::zeroed())), rgpwszdesturls, 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() } + unsafe { (windows_core::Interface::vtable(self).Copy)(windows_core::Interface::as_raw(self), crows, rgpwszsourceurls.unwrap_or(core::mem::zeroed()) as _, rgpwszdesturls, dwcopyflags, pauthenticate.param().abi(), rgdwstatus as _, rgpwsznewurls.unwrap_or(core::mem::zeroed()) as _, ppstringsbuffer.unwrap_or(core::mem::zeroed()) as _).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, { - unsafe { (windows_core::Interface::vtable(self).Move)(windows_core::Interface::as_raw(self), crows, core::mem::transmute(rgpwszsourceurls.unwrap_or(core::mem::zeroed())), rgpwszdesturls, 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() } + unsafe { (windows_core::Interface::vtable(self).Move)(windows_core::Interface::as_raw(self), crows, rgpwszsourceurls.unwrap_or(core::mem::zeroed()) as _, rgpwszdesturls, dwmoveflags, pauthenticate.param().abi(), rgdwstatus as _, rgpwsznewurls.unwrap_or(core::mem::zeroed()) as _, ppstringsbuffer.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Delete(&self, crows: usize, rgpwszurls: *const windows_core::PCWSTR, dwdeleteflags: u32, rgdwstatus: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Delete)(windows_core::Interface::as_raw(self), crows, rgpwszurls, dwdeleteflags, core::mem::transmute(rgdwstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).Delete)(windows_core::Interface::as_raw(self), crows, rgpwszurls, dwdeleteflags, rgdwstatus as _).ok() } } #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn OpenRowset(&self, punkouter: P0, ptableid: Option<*const super::super::Storage::IndexServer::DBID>, pindexid: Option<*const super::super::Storage::IndexServer::DBID>, riid: *const windows_core::GUID, rgpropertysets: &mut [DBPROPSET], pprowset: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (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())), riid, rgpropertysets.len().try_into().unwrap(), core::mem::transmute(rgpropertysets.as_ptr()), core::mem::transmute(pprowset.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).OpenRowset)(windows_core::Interface::as_raw(self), punkouter.param().abi(), ptableid.unwrap_or(core::mem::zeroed()) as _, pindexid.unwrap_or(core::mem::zeroed()) as _, riid, rgpropertysets.len().try_into().unwrap(), core::mem::transmute(rgpropertysets.as_ptr()), pprowset.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -13218,7 +13113,7 @@ impl ISearchCatalogManager { unsafe { (windows_core::Interface::vtable(self).SetParameter)(windows_core::Interface::as_raw(self), pszname.param().abi(), core::mem::transmute(pvalue)).ok() } } pub unsafe fn GetCatalogStatus(&self, pstatus: *mut CatalogStatus, ppausedreason: *mut CatalogPausedReason) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCatalogStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pstatus), core::mem::transmute(ppausedreason)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCatalogStatus)(windows_core::Interface::as_raw(self), pstatus as _, ppausedreason as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -13263,7 +13158,7 @@ impl ISearchCatalogManager { } } pub unsafe fn NumberOfItemsToIndex(&self, plincrementalcount: *mut i32, plnotificationqueue: *mut i32, plhighpriorityqueue: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).NumberOfItemsToIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(plincrementalcount), core::mem::transmute(plnotificationqueue), core::mem::transmute(plhighpriorityqueue)).ok() } + unsafe { (windows_core::Interface::vtable(self).NumberOfItemsToIndex)(windows_core::Interface::as_raw(self), plincrementalcount as _, plnotificationqueue as _, plhighpriorityqueue as _).ok() } } pub unsafe fn URLBeingIndexed(&self) -> windows_core::Result { unsafe { @@ -13302,7 +13197,7 @@ impl ISearchCatalogManager { T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - unsafe { (windows_core::Interface::vtable(self).GetItemsChangedSink)(windows_core::Interface::as_raw(self), pisearchnotifyinlinesite.param().abi(), &T::IID, &mut result__, core::mem::transmute(pguidcatalogresetsignature), core::mem::transmute(pguidcheckpointsignature), core::mem::transmute(pdwlastcheckpointnumber)).and_then(|| windows_core::Type::from_abi(result__)) } + unsafe { (windows_core::Interface::vtable(self).GetItemsChangedSink)(windows_core::Interface::as_raw(self), pisearchnotifyinlinesite.param().abi(), &T::IID, &mut result__, pguidcatalogresetsignature as _, pguidcheckpointsignature as _, pdwlastcheckpointnumber as _).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn UnregisterViewForNotification(&self, dwcookie: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UnregisterViewForNotification)(windows_core::Interface::as_raw(self), dwcookie).ok() } @@ -13807,7 +13702,7 @@ impl ISearchCrawlScopeManager { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).IncludedInCrawlScopeEx)(windows_core::Interface::as_raw(self), pszurl.param().abi(), core::mem::transmute(pfisincluded), core::mem::transmute(preason)).ok() } + unsafe { (windows_core::Interface::vtable(self).IncludedInCrawlScopeEx)(windows_core::Interface::as_raw(self), pszurl.param().abi(), pfisincluded as _, preason as _).ok() } } pub unsafe fn RevertToDefaultScopes(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RevertToDefaultScopes)(windows_core::Interface::as_raw(self)).ok() } @@ -14038,7 +13933,7 @@ impl core::ops::Deref for ISearchCrawlScopeManager2 { windows_core::imp::interface_hierarchy!(ISearchCrawlScopeManager2, windows_core::IUnknown, ISearchCrawlScopeManager); impl ISearchCrawlScopeManager2 { pub unsafe fn GetVersion(&self, plversion: *mut *mut i32, phfilemapping: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVersion)(windows_core::Interface::as_raw(self), core::mem::transmute(plversion), core::mem::transmute(phfilemapping)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVersion)(windows_core::Interface::as_raw(self), plversion as _, phfilemapping as _).ok() } } } #[repr(C)] @@ -14081,7 +13976,7 @@ impl ISearchItemsChangedSink { } #[cfg(feature = "Win32_System_Com")] pub unsafe fn OnItemsChanged(&self, dwnumberofchanges: u32, rgdatachangeentries: *const SEARCH_ITEM_CHANGE, rgdwdocids: *mut u32, rghrcompletioncodes: *mut windows_core::HRESULT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OnItemsChanged)(windows_core::Interface::as_raw(self), dwnumberofchanges, rgdatachangeentries, core::mem::transmute(rgdwdocids), core::mem::transmute(rghrcompletioncodes)).ok() } + unsafe { (windows_core::Interface::vtable(self).OnItemsChanged)(windows_core::Interface::as_raw(self), dwnumberofchanges, rgdatachangeentries, rgdwdocids as _, rghrcompletioncodes as _).ok() } } } #[repr(C)] @@ -14151,14 +14046,14 @@ impl ISearchLanguageSupport { T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - unsafe { (windows_core::Interface::vtable(self).LoadWordBreaker)(windows_core::Interface::as_raw(self), lcid, &T::IID, &mut result__, core::mem::transmute(plcidused)).and_then(|| windows_core::Type::from_abi(result__)) } + unsafe { (windows_core::Interface::vtable(self).LoadWordBreaker)(windows_core::Interface::as_raw(self), lcid, &T::IID, &mut result__, plcidused as _).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn LoadStemmer(&self, lcid: u32, plcidused: *mut u32) -> windows_core::Result where T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - unsafe { (windows_core::Interface::vtable(self).LoadStemmer)(windows_core::Interface::as_raw(self), lcid, &T::IID, &mut result__, core::mem::transmute(plcidused)).and_then(|| windows_core::Type::from_abi(result__)) } + unsafe { (windows_core::Interface::vtable(self).LoadStemmer)(windows_core::Interface::as_raw(self), lcid, &T::IID, &mut result__, plcidused as _).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn IsPrefixNormalized(&self, pwcsquerytoken: &[u16], pwcsdocumenttoken: &[u16]) -> windows_core::Result { unsafe { @@ -14251,7 +14146,7 @@ impl ISearchManager { } } pub unsafe fn GetIndexerVersion(&self, pdwmajor: *mut u32, pdwminor: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIndexerVersion)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmajor), core::mem::transmute(pdwminor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIndexerVersion)(windows_core::Interface::as_raw(self), pdwmajor as _, pdwminor as _).ok() } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn GetParameter(&self, pszname: P0) -> windows_core::Result<*mut super::Com::StructuredStorage::PROPVARIANT> @@ -14656,7 +14551,7 @@ impl ISearchPersistentItemsChangedSink { unsafe { (windows_core::Interface::vtable(self).StoppedMonitoringScope)(windows_core::Interface::as_raw(self), pszurl.param().abi()).ok() } } pub unsafe fn OnItemsChanged(&self, dwnumberofchanges: u32, datachangeentries: *const SEARCH_ITEM_PERSISTENT_CHANGE, hrcompletioncodes: *mut windows_core::HRESULT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OnItemsChanged)(windows_core::Interface::as_raw(self), dwnumberofchanges, datachangeentries, core::mem::transmute(hrcompletioncodes)).ok() } + unsafe { (windows_core::Interface::vtable(self).OnItemsChanged)(windows_core::Interface::as_raw(self), dwnumberofchanges, datachangeentries, hrcompletioncodes as _).ok() } } } #[repr(C)] @@ -15308,11 +15203,11 @@ impl ISearchQueryHits { } #[cfg(feature = "Win32_System_Com")] pub unsafe fn NextHitMoniker(&self, pcmnk: *mut u32, papmnk: *mut *mut Option) -> i32 { - unsafe { (windows_core::Interface::vtable(self).NextHitMoniker)(windows_core::Interface::as_raw(self), core::mem::transmute(pcmnk), core::mem::transmute(papmnk)) } + unsafe { (windows_core::Interface::vtable(self).NextHitMoniker)(windows_core::Interface::as_raw(self), pcmnk as _, papmnk as _) } } #[cfg(feature = "Win32_Storage_IndexServer")] pub unsafe fn NextHitOffset(&self, pcregion: *mut u32, paregion: *mut *mut super::super::Storage::IndexServer::FILTERREGION) -> i32 { - unsafe { (windows_core::Interface::vtable(self).NextHitOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(pcregion), core::mem::transmute(paregion)) } + unsafe { (windows_core::Interface::vtable(self).NextHitOffset)(windows_core::Interface::as_raw(self), pcregion as _, paregion as _) } } } #[repr(C)] @@ -15920,7 +15815,7 @@ impl ISecurityInfo { } } pub unsafe fn GetObjectTypes(&self, cobjecttypes: *mut u32, rgobjecttypes: *mut *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetObjectTypes)(windows_core::Interface::as_raw(self), core::mem::transmute(cobjecttypes), core::mem::transmute(rgobjecttypes)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetObjectTypes)(windows_core::Interface::as_raw(self), cobjecttypes as _, rgobjecttypes as _).ok() } } pub unsafe fn GetPermissions(&self, objecttype: windows_core::GUID) -> windows_core::Result { unsafe { @@ -16029,7 +15924,7 @@ windows_core::imp::interface_hierarchy!(ISessionProperties, windows_core::IUnkno impl ISessionProperties { #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetProperties(&self, rgpropertyidsets: Option<&[DBPROPIDSET]>, pcpropertysets: *mut u32, prgpropertysets: *mut *mut DBPROPSET) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperties)(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(pcpropertysets), core::mem::transmute(prgpropertysets)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperties)(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())), pcpropertysets as _, prgpropertysets as _).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<()> { @@ -16100,7 +15995,7 @@ impl ISimpleCommandCreator { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetDefaultCatalog)(windows_core::Interface::as_raw(self), pwszcatalogname.param().abi(), cwcin, core::mem::transmute(pcwcout)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDefaultCatalog)(windows_core::Interface::as_raw(self), pwszcatalogname.param().abi(), cwcin, pcwcout as _).ok() } } } #[repr(C)] @@ -16191,7 +16086,7 @@ windows_core::imp::define_interface!(IStemmer, IStemmer_Vtbl, 0xefbaf140_7f42_11 windows_core::imp::interface_hierarchy!(IStemmer, windows_core::IUnknown); impl IStemmer { pub unsafe fn Init(&self, ulmaxtokensize: u32, pflicense: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Init)(windows_core::Interface::as_raw(self), ulmaxtokensize, core::mem::transmute(pflicense)).ok() } + unsafe { (windows_core::Interface::vtable(self).Init)(windows_core::Interface::as_raw(self), ulmaxtokensize, pflicense as _).ok() } } pub unsafe fn GenerateWordForms(&self, pwcinbuf: P0, cwc: u32, pstemsink: P2) -> windows_core::Result<()> where @@ -16258,7 +16153,7 @@ impl ISubscriptionItem { } } pub unsafe fn GetSubscriptionItemInfo(&self, psubscriptioniteminfo: *mut SUBSCRIPTIONITEMINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSubscriptionItemInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(psubscriptioniteminfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSubscriptionItemInfo)(windows_core::Interface::as_raw(self), psubscriptioniteminfo as _).ok() } } pub unsafe fn SetSubscriptionItemInfo(&self, psubscriptioniteminfo: *const SUBSCRIPTIONITEMINFO) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSubscriptionItemInfo)(windows_core::Interface::as_raw(self), psubscriptioniteminfo).ok() } @@ -16552,7 +16447,7 @@ impl ISubscriptionMgr2 { } } pub unsafe fn GetSubscriptionRunState(&self, dwnumcookies: u32, pcookies: *const windows_core::GUID, pdwrunstate: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSubscriptionRunState)(windows_core::Interface::as_raw(self), dwnumcookies, pcookies, core::mem::transmute(pdwrunstate)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSubscriptionRunState)(windows_core::Interface::as_raw(self), dwnumcookies, pcookies, pdwrunstate as _).ok() } } pub unsafe fn EnumSubscriptions(&self, dwflags: u32) -> windows_core::Result { unsafe { @@ -16711,20 +16606,7 @@ windows_core::imp::interface_hierarchy!(ITableCreation, windows_core::IUnknown, impl ITableCreation { #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetTableDefinition(&self, ptableid: *const super::super::Storage::IndexServer::DBID, pccolumndescs: Option<*mut usize>, prgcolumndescs: Option<*mut *mut DBCOLUMNDESC>, pcpropertysets: Option<*mut u32>, prgpropertysets: Option<*mut *mut DBPROPSET>, pcconstraintdescs: Option<*mut u32>, prgconstraintdescs: Option<*mut *mut DBCONSTRAINTDESC>, ppwszstringbuffer: Option<*mut *mut u16>) -> windows_core::Result<()> { - unsafe { - (windows_core::Interface::vtable(self).GetTableDefinition)( - windows_core::Interface::as_raw(self), - ptableid, - 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() - } + unsafe { (windows_core::Interface::vtable(self).GetTableDefinition)(windows_core::Interface::as_raw(self), ptableid, pccolumndescs.unwrap_or(core::mem::zeroed()) as _, prgcolumndescs.unwrap_or(core::mem::zeroed()) as _, pcpropertysets.unwrap_or(core::mem::zeroed()) as _, prgpropertysets.unwrap_or(core::mem::zeroed()) as _, pcconstraintdescs.unwrap_or(core::mem::zeroed()) as _, prgconstraintdescs.unwrap_or(core::mem::zeroed()) as _, ppwszstringbuffer.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -16768,14 +16650,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::mem::zeroed())), + ptableid.unwrap_or(core::mem::zeroed()) as _, rgcolumndescs.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgcolumndescs.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), riid, rgpropertysets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgpropertysets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - core::mem::transmute(pptableid.unwrap_or(core::mem::zeroed())), - core::mem::transmute(pprowset.unwrap_or(core::mem::zeroed())), + pptableid.unwrap_or(core::mem::zeroed()) as _, + pprowset.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -16786,7 +16668,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<()> { - unsafe { (windows_core::Interface::vtable(self).AddColumn)(windows_core::Interface::as_raw(self), ptableid, core::mem::transmute(pcolumndesc), core::mem::transmute(ppcolumnid.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).AddColumn)(windows_core::Interface::as_raw(self), ptableid, core::mem::transmute(pcolumndesc), ppcolumnid.unwrap_or(core::mem::zeroed()) as _).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<()> { @@ -16879,7 +16761,7 @@ impl ITableDefinitionWithConstraints { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateTableWithConstraints)(windows_core::Interface::as_raw(self), punkouter.param().abi(), ptableid, rgcolumndescs.len().try_into().unwrap(), core::mem::transmute(rgcolumndescs.as_ptr()), rgconstraintdescs.len().try_into().unwrap(), core::mem::transmute(rgconstraintdescs.as_ptr()), riid, rgpropertysets.len().try_into().unwrap(), core::mem::transmute(rgpropertysets.as_ptr()), core::mem::transmute(pptableid), core::mem::transmute(pprowset)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateTableWithConstraints)(windows_core::Interface::as_raw(self), punkouter.param().abi(), ptableid, rgcolumndescs.len().try_into().unwrap(), core::mem::transmute(rgcolumndescs.as_ptr()), rgconstraintdescs.len().try_into().unwrap(), core::mem::transmute(rgconstraintdescs.as_ptr()), riid, rgpropertysets.len().try_into().unwrap(), core::mem::transmute(rgpropertysets.as_ptr()), pptableid as _, core::mem::transmute(pprowset)).ok() } } #[cfg(feature = "Win32_Storage_IndexServer")] pub unsafe fn DropConstraint(&self, ptableid: *const super::super::Storage::IndexServer::DBID, pconstraintid: *const super::super::Storage::IndexServer::DBID) -> windows_core::Result<()> { @@ -17005,7 +16887,7 @@ impl ITokenCollection { unsafe { (windows_core::Interface::vtable(self).NumberOfTokens)(windows_core::Interface::as_raw(self), pcount).ok() } } pub unsafe fn GetToken(&self, i: u32, pbegin: Option<*mut u32>, plength: Option<*mut u32>, ppsz: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetToken)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).GetToken)(windows_core::Interface::as_raw(self), i, pbegin.unwrap_or(core::mem::zeroed()) as _, plength.unwrap_or(core::mem::zeroed()) as _, ppsz.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -17137,7 +17019,7 @@ impl ITransactionLocal { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).StartTransaction)(windows_core::Interface::as_raw(self), isolevel, isoflags, potheroptions.param().abi(), core::mem::transmute(pultransactionlevel.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).StartTransaction)(windows_core::Interface::as_raw(self), isolevel, isoflags, potheroptions.param().abi(), pultransactionlevel.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[cfg(feature = "Win32_System_DistributedTransactionCoordinator")] @@ -17258,7 +17140,7 @@ impl ITrusteeAdmin { } #[cfg(all(feature = "Win32_Security_Authorization", feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetTrusteeProperties(&self, ptrustee: *const super::super::Security::Authorization::TRUSTEE_W, rgpropertyidsets: &[DBPROPIDSET], pcpropertysets: *mut u32, prgpropertysets: *mut *mut DBPROPSET) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTrusteeProperties)(windows_core::Interface::as_raw(self), ptrustee, rgpropertyidsets.len().try_into().unwrap(), core::mem::transmute(rgpropertyidsets.as_ptr()), core::mem::transmute(pcpropertysets), core::mem::transmute(prgpropertysets)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTrusteeProperties)(windows_core::Interface::as_raw(self), ptrustee, rgpropertyidsets.len().try_into().unwrap(), core::mem::transmute(rgpropertyidsets.as_ptr()), pcpropertysets as _, prgpropertysets as _).ok() } } } #[repr(C)] @@ -17361,11 +17243,11 @@ impl ITrusteeGroupAdmin { } #[cfg(feature = "Win32_Security_Authorization")] pub unsafe fn GetMembers(&self, pmembershiptrustee: *const super::super::Security::Authorization::TRUSTEE_W, pcmembers: *mut u32, prgmembers: *mut *mut super::super::Security::Authorization::TRUSTEE_W) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMembers)(windows_core::Interface::as_raw(self), pmembershiptrustee, core::mem::transmute(pcmembers), core::mem::transmute(prgmembers)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMembers)(windows_core::Interface::as_raw(self), pmembershiptrustee, pcmembers as _, prgmembers as _).ok() } } #[cfg(feature = "Win32_Security_Authorization")] pub unsafe fn GetMemberships(&self, ptrustee: *const super::super::Security::Authorization::TRUSTEE_W, pcmemberships: *mut u32, prgmemberships: *mut *mut super::super::Security::Authorization::TRUSTEE_W) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMemberships)(windows_core::Interface::as_raw(self), ptrustee, core::mem::transmute(pcmemberships), core::mem::transmute(prgmemberships)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMemberships)(windows_core::Interface::as_raw(self), ptrustee, pcmemberships as _, prgmemberships as _).ok() } } } #[repr(C)] @@ -17548,7 +17430,7 @@ windows_core::imp::define_interface!(IUMSInitialize, IUMSInitialize_Vtbl, 0x5cf4 windows_core::imp::interface_hierarchy!(IUMSInitialize, windows_core::IUnknown); impl IUMSInitialize { pub unsafe fn Initialize(&self, pums: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(pums)).ok() } + unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), pums as _).ok() } } } #[repr(C)] @@ -17582,7 +17464,7 @@ impl IUrlAccessor { unsafe { (windows_core::Interface::vtable(self).AddRequestParameter)(windows_core::Interface::as_raw(self), pspec, core::mem::transmute(pvar)).ok() } } pub unsafe fn GetDocFormat(&self, wszdocformat: &mut [u16], pdwlength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDocFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(wszdocformat.as_ptr()), wszdocformat.len().try_into().unwrap(), core::mem::transmute(pdwlength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDocFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(wszdocformat.as_ptr()), wszdocformat.len().try_into().unwrap(), pdwlength as _).ok() } } pub unsafe fn GetCLSID(&self) -> windows_core::Result { unsafe { @@ -17591,7 +17473,7 @@ impl IUrlAccessor { } } pub unsafe fn GetHost(&self, wszhost: &mut [u16], pdwlength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetHost)(windows_core::Interface::as_raw(self), core::mem::transmute(wszhost.as_ptr()), wszhost.len().try_into().unwrap(), core::mem::transmute(pdwlength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetHost)(windows_core::Interface::as_raw(self), core::mem::transmute(wszhost.as_ptr()), wszhost.len().try_into().unwrap(), pdwlength as _).ok() } } pub unsafe fn IsDirectory(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).IsDirectory)(windows_core::Interface::as_raw(self)).ok() } @@ -17609,13 +17491,13 @@ impl IUrlAccessor { } } pub unsafe fn GetFileName(&self, wszfilename: &mut [u16], pdwlength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFileName)(windows_core::Interface::as_raw(self), core::mem::transmute(wszfilename.as_ptr()), wszfilename.len().try_into().unwrap(), core::mem::transmute(pdwlength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFileName)(windows_core::Interface::as_raw(self), core::mem::transmute(wszfilename.as_ptr()), wszfilename.len().try_into().unwrap(), pdwlength as _).ok() } } pub unsafe fn GetSecurityDescriptor(&self, psd: &mut [u8], pdwlength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSecurityDescriptor)(windows_core::Interface::as_raw(self), core::mem::transmute(psd.as_ptr()), psd.len().try_into().unwrap(), core::mem::transmute(pdwlength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSecurityDescriptor)(windows_core::Interface::as_raw(self), core::mem::transmute(psd.as_ptr()), psd.len().try_into().unwrap(), pdwlength as _).ok() } } pub unsafe fn GetRedirectedURL(&self, wszredirectedurl: &mut [u16], pdwlength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRedirectedURL)(windows_core::Interface::as_raw(self), core::mem::transmute(wszredirectedurl.as_ptr()), wszredirectedurl.len().try_into().unwrap(), core::mem::transmute(pdwlength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRedirectedURL)(windows_core::Interface::as_raw(self), core::mem::transmute(wszredirectedurl.as_ptr()), wszredirectedurl.len().try_into().unwrap(), pdwlength as _).ok() } } pub unsafe fn GetSecurityProvider(&self) -> windows_core::Result { unsafe { @@ -17830,13 +17712,13 @@ impl core::ops::Deref for IUrlAccessor2 { windows_core::imp::interface_hierarchy!(IUrlAccessor2, windows_core::IUnknown, IUrlAccessor); impl IUrlAccessor2 { pub unsafe fn GetDisplayUrl(&self, wszdocurl: &mut [u16], pdwlength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDisplayUrl)(windows_core::Interface::as_raw(self), core::mem::transmute(wszdocurl.as_ptr()), wszdocurl.len().try_into().unwrap(), core::mem::transmute(pdwlength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDisplayUrl)(windows_core::Interface::as_raw(self), core::mem::transmute(wszdocurl.as_ptr()), wszdocurl.len().try_into().unwrap(), pdwlength as _).ok() } } pub unsafe fn IsDocument(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).IsDocument)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetCodePage(&self, wszcodepage: &mut [u16], pdwlength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCodePage)(windows_core::Interface::as_raw(self), core::mem::transmute(wszcodepage.as_ptr()), wszcodepage.len().try_into().unwrap(), core::mem::transmute(pdwlength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCodePage)(windows_core::Interface::as_raw(self), core::mem::transmute(wszcodepage.as_ptr()), wszcodepage.len().try_into().unwrap(), pdwlength as _).ok() } } } #[repr(C)] @@ -17900,7 +17782,7 @@ impl IUrlAccessor3 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetImpersonationSidBlobs)(windows_core::Interface::as_raw(self), pcwszurl.param().abi(), core::mem::transmute(pcsidcount), core::mem::transmute(ppsidblobs)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetImpersonationSidBlobs)(windows_core::Interface::as_raw(self), pcwszurl.param().abi(), pcsidcount as _, ppsidblobs as _).ok() } } } #[repr(C)] @@ -18014,7 +17896,7 @@ impl IViewChapter { } } pub unsafe fn OpenViewChapter(&self, hsource: usize, phviewchapter: Option<*mut usize>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OpenViewChapter)(windows_core::Interface::as_raw(self), hsource, core::mem::transmute(phviewchapter.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).OpenViewChapter)(windows_core::Interface::as_raw(self), hsource, phviewchapter.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -18062,11 +17944,11 @@ windows_core::imp::define_interface!(IViewFilter, IViewFilter_Vtbl, 0x0c733a9b_2 windows_core::imp::interface_hierarchy!(IViewFilter, windows_core::IUnknown); impl IViewFilter { pub unsafe fn GetFilter(&self, haccessor: HACCESSOR, pcrows: *mut usize, pcompareops: *mut *mut u32, pcriteriadata: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFilter)(windows_core::Interface::as_raw(self), haccessor, core::mem::transmute(pcrows), core::mem::transmute(pcompareops), core::mem::transmute(pcriteriadata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFilter)(windows_core::Interface::as_raw(self), haccessor, pcrows as _, pcompareops as _, pcriteriadata as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetFilterBindings(&self, pcbindings: *mut usize, prgbindings: *mut *mut DBBINDING) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFilterBindings)(windows_core::Interface::as_raw(self), core::mem::transmute(pcbindings), core::mem::transmute(prgbindings)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFilterBindings)(windows_core::Interface::as_raw(self), pcbindings as _, prgbindings as _).ok() } } pub unsafe fn SetFilter(&self, haccessor: HACCESSOR, compareops: &[u32], pcriteriadata: *const core::ffi::c_void) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetFilter)(windows_core::Interface::as_raw(self), haccessor, compareops.len().try_into().unwrap(), core::mem::transmute(compareops.as_ptr()), pcriteriadata).ok() } @@ -18192,7 +18074,7 @@ windows_core::imp::define_interface!(IViewSort, IViewSort_Vtbl, 0x0c733a9a_2a1c_ windows_core::imp::interface_hierarchy!(IViewSort, windows_core::IUnknown); impl IViewSort { pub unsafe fn GetSortOrder(&self, pcvalues: *mut usize, prgcolumns: *mut *mut usize, prgorders: *mut *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSortOrder)(windows_core::Interface::as_raw(self), core::mem::transmute(pcvalues), core::mem::transmute(prgcolumns), core::mem::transmute(prgorders)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSortOrder)(windows_core::Interface::as_raw(self), pcvalues as _, prgcolumns as _, prgorders as _).ok() } } pub unsafe fn SetSortOrder(&self, cvalues: usize, rgcolumns: *const usize, rgorders: *const u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSortOrder)(windows_core::Interface::as_raw(self), cvalues, rgcolumns, rgorders).ok() } @@ -18237,7 +18119,7 @@ windows_core::imp::define_interface!(IWordBreaker, IWordBreaker_Vtbl, 0xd53552c8 windows_core::imp::interface_hierarchy!(IWordBreaker, windows_core::IUnknown); impl IWordBreaker { pub unsafe fn Init(&self, fquery: bool, ulmaxtokensize: u32, pflicense: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Init)(windows_core::Interface::as_raw(self), fquery.into(), ulmaxtokensize, core::mem::transmute(pflicense)).ok() } + unsafe { (windows_core::Interface::vtable(self).Init)(windows_core::Interface::as_raw(self), fquery.into(), ulmaxtokensize, pflicense as _).ok() } } #[cfg(feature = "Win32_Storage_IndexServer")] pub unsafe fn BreakText(&self, ptextsource: *mut TEXT_SOURCE, pwordsink: P1, pphrasesink: P2) -> windows_core::Result<()> @@ -18245,7 +18127,7 @@ impl IWordBreaker { P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).BreakText)(windows_core::Interface::as_raw(self), core::mem::transmute(ptextsource), pwordsink.param().abi(), pphrasesink.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).BreakText)(windows_core::Interface::as_raw(self), ptextsource as _, pwordsink.param().abi(), pphrasesink.param().abi()).ok() } } pub unsafe fn ComposePhrase(&self, pwcnoun: P0, cwcnoun: u32, pwcmodifier: P2, cwcmodifier: u32, ulattachmenttype: u32, pwcphrase: P5, pcwcphrase: *mut u32) -> windows_core::Result<()> where @@ -18253,7 +18135,7 @@ impl IWordBreaker { P2: windows_core::Param, P5: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ComposePhrase)(windows_core::Interface::as_raw(self), pwcnoun.param().abi(), cwcnoun, pwcmodifier.param().abi(), cwcmodifier, ulattachmenttype, pwcphrase.param().abi(), core::mem::transmute(pcwcphrase)).ok() } + unsafe { (windows_core::Interface::vtable(self).ComposePhrase)(windows_core::Interface::as_raw(self), pwcnoun.param().abi(), cwcnoun, pwcmodifier.param().abi(), cwcmodifier, ulattachmenttype, pwcphrase.param().abi(), pcwcphrase as _).ok() } } pub unsafe fn GetLicenseToUse(&self, ppwcslicense: *const *const u16) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetLicenseToUse)(windows_core::Interface::as_raw(self), ppwcslicense).ok() } 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 c09eb3f126..377a43c8dd 100644 --- a/crates/libs/windows/src/Windows/Win32/System/SecurityCenter/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/SecurityCenter/mod.rs @@ -9,7 +9,7 @@ pub unsafe fn WscGetAntiMalwareUri() -> windows_core::Result windows_core::Result<()> { windows_targets::link!("wscapi.dll" "system" fn WscGetSecurityProviderHealth(providers : u32, phealth : *mut WSC_SECURITY_PROVIDER_HEALTH) -> windows_core::HRESULT); - unsafe { WscGetSecurityProviderHealth(providers, core::mem::transmute(phealth)).ok() } + unsafe { WscGetSecurityProviderHealth(providers, phealth as _).ok() } } #[inline] pub unsafe fn WscQueryAntiMalwareUri() -> windows_core::Result<()> { @@ -20,7 +20,7 @@ pub unsafe fn WscQueryAntiMalwareUri() -> windows_core::Result<()> { #[inline] pub unsafe fn WscRegisterForChanges(reserved: *mut core::ffi::c_void, phcallbackregistration: *mut super::super::Foundation::HANDLE, lpcallbackaddress: super::Threading::LPTHREAD_START_ROUTINE, pcontext: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("wscapi.dll" "system" fn WscRegisterForChanges(reserved : *mut core::ffi::c_void, phcallbackregistration : *mut super::super::Foundation:: HANDLE, lpcallbackaddress : super::Threading:: LPTHREAD_START_ROUTINE, pcontext : *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { WscRegisterForChanges(core::mem::transmute(reserved), core::mem::transmute(phcallbackregistration), lpcallbackaddress, core::mem::transmute(pcontext)).ok() } + unsafe { WscRegisterForChanges(reserved as _, phcallbackregistration as _, lpcallbackaddress, pcontext as _).ok() } } #[inline] pub unsafe fn WscRegisterForUserNotifications() -> windows_core::Result<()> { diff --git a/crates/libs/windows/src/Windows/Win32/System/ServerBackup/mod.rs b/crates/libs/windows/src/Windows/Win32/System/ServerBackup/mod.rs index 40bc0393db..6ab1cc20ec 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ServerBackup/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ServerBackup/mod.rs @@ -112,7 +112,7 @@ impl IWsbApplicationRestoreSupport { unsafe { (windows_core::Interface::vtable(self).PostRestore)(windows_core::Interface::as_raw(self), wszwritermetadata.param().abi(), wszcomponentname.param().abi(), wszcomponentlogicalpath.param().abi(), bnorollforward).ok() } } pub unsafe fn OrderComponents(&self, ccomponents: u32, rgcomponentname: *const windows_core::PCWSTR, rgcomponentlogicalpaths: *const windows_core::PCWSTR, prgcomponentname: *mut *mut windows_core::PWSTR, prgcomponentlogicalpath: *mut *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OrderComponents)(windows_core::Interface::as_raw(self), ccomponents, rgcomponentname, rgcomponentlogicalpaths, core::mem::transmute(prgcomponentname), core::mem::transmute(prgcomponentlogicalpath)).ok() } + unsafe { (windows_core::Interface::vtable(self).OrderComponents)(windows_core::Interface::as_raw(self), ccomponents, rgcomponentname, rgcomponentlogicalpaths, prgcomponentname as _, prgcomponentlogicalpath as _).ok() } } pub unsafe fn IsRollForwardSupported(&self) -> windows_core::Result { unsafe { 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 6b942f002d..7d6cb8c479 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Services/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Services/mod.rs @@ -1,12 +1,12 @@ #[inline] 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); - unsafe { ChangeServiceConfig2A(hservice, dwinfolevel, core::mem::transmute(lpinfo.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ChangeServiceConfig2A(hservice, dwinfolevel, lpinfo.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { ChangeServiceConfig2W(hservice, dwinfolevel, core::mem::transmute(lpinfo.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ChangeServiceConfig2W(hservice, dwinfolevel, lpinfo.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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<()> @@ -19,7 +19,7 @@ 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); - unsafe { ChangeServiceConfigA(hservice, dwservicetype, dwstarttype, 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() } + unsafe { ChangeServiceConfigA(hservice, dwservicetype, dwstarttype, dwerrorcontrol, lpbinarypathname.param().abi(), lploadordergroup.param().abi(), lpdwtagid.unwrap_or(core::mem::zeroed()) as _, lpdependencies.param().abi(), lpservicestartname.param().abi(), lppassword.param().abi(), lpdisplayname.param().abi()).ok() } } #[inline] 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<()> @@ -32,7 +32,7 @@ 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); - unsafe { ChangeServiceConfigW(hservice, dwservicetype, dwstarttype, 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() } + unsafe { ChangeServiceConfigW(hservice, dwservicetype, dwstarttype, dwerrorcontrol, lpbinarypathname.param().abi(), lploadordergroup.param().abi(), lpdwtagid.unwrap_or(core::mem::zeroed()) as _, lpdependencies.param().abi(), lpservicestartname.param().abi(), lppassword.param().abi(), lpdisplayname.param().abi()).ok() } } #[inline] pub unsafe fn CloseServiceHandle(hscobject: SC_HANDLE) -> windows_core::Result<()> { @@ -42,17 +42,17 @@ pub unsafe fn CloseServiceHandle(hscobject: SC_HANDLE) -> windows_core::Result<( #[inline] 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); - unsafe { ControlService(hservice, dwcontrol, core::mem::transmute(lpservicestatus)).ok() } + unsafe { ControlService(hservice, dwcontrol, lpservicestatus as _).ok() } } #[inline] 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); - unsafe { ControlServiceExA(hservice, dwcontrol, dwinfolevel, core::mem::transmute(pcontrolparams)).ok() } + unsafe { ControlServiceExA(hservice, dwcontrol, dwinfolevel, pcontrolparams as _).ok() } } #[inline] 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); - unsafe { ControlServiceExW(hservice, dwcontrol, dwinfolevel, core::mem::transmute(pcontrolparams)).ok() } + unsafe { ControlServiceExW(hservice, dwcontrol, dwinfolevel, pcontrolparams as _).ok() } } #[inline] 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 @@ -66,7 +66,7 @@ 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__ = unsafe { CreateServiceA(hscmanager, lpservicename.param().abi(), lpdisplayname.param().abi(), dwdesiredaccess, dwservicetype, dwstarttype, 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()) }; + let result__ = unsafe { CreateServiceA(hscmanager, lpservicename.param().abi(), lpdisplayname.param().abi(), dwdesiredaccess, dwservicetype, dwstarttype, dwerrorcontrol, lpbinarypathname.param().abi(), lploadordergroup.param().abi(), lpdwtagid.unwrap_or(core::mem::zeroed()) as _, lpdependencies.param().abi(), lpservicestartname.param().abi(), lppassword.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -81,7 +81,7 @@ 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__ = unsafe { CreateServiceW(hscmanager, lpservicename.param().abi(), lpdisplayname.param().abi(), dwdesiredaccess, dwservicetype, dwstarttype, 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()) }; + let result__ = unsafe { CreateServiceW(hscmanager, lpservicename.param().abi(), lpdisplayname.param().abi(), dwdesiredaccess, dwservicetype, dwstarttype, dwerrorcontrol, lpbinarypathname.param().abi(), lploadordergroup.param().abi(), lpdwtagid.unwrap_or(core::mem::zeroed()) as _, lpdependencies.param().abi(), lpservicestartname.param().abi(), lppassword.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -92,17 +92,17 @@ pub unsafe fn DeleteService(hservice: SC_HANDLE) -> windows_core::Result<()> { #[inline] 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); - unsafe { EnumDependentServicesA(hservice, dwservicestate, core::mem::transmute(lpservices.unwrap_or(core::mem::zeroed())), cbbufsize, core::mem::transmute(pcbbytesneeded), core::mem::transmute(lpservicesreturned)).ok() } + unsafe { EnumDependentServicesA(hservice, dwservicestate, lpservices.unwrap_or(core::mem::zeroed()) as _, cbbufsize, pcbbytesneeded as _, lpservicesreturned as _).ok() } } #[inline] 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); - unsafe { EnumDependentServicesW(hservice, dwservicestate, core::mem::transmute(lpservices.unwrap_or(core::mem::zeroed())), cbbufsize, core::mem::transmute(pcbbytesneeded), core::mem::transmute(lpservicesreturned)).ok() } + unsafe { EnumDependentServicesW(hservice, dwservicestate, lpservices.unwrap_or(core::mem::zeroed()) as _, cbbufsize, pcbbytesneeded as _, lpservicesreturned as _).ok() } } #[inline] 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); - unsafe { EnumServicesStatusA(hscmanager, dwservicetype, dwservicestate, core::mem::transmute(lpservices.unwrap_or(core::mem::zeroed())), cbbufsize, core::mem::transmute(pcbbytesneeded), core::mem::transmute(lpservicesreturned), core::mem::transmute(lpresumehandle.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { EnumServicesStatusA(hscmanager, dwservicetype, dwservicestate, lpservices.unwrap_or(core::mem::zeroed()) as _, cbbufsize, pcbbytesneeded as _, lpservicesreturned as _, lpresumehandle.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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<()> @@ -110,7 +110,7 @@ where 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); - unsafe { EnumServicesStatusExA(hscmanager, infolevel, dwservicetype, dwservicestate, core::mem::transmute(lpservices.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpservices.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbbytesneeded), core::mem::transmute(lpservicesreturned), core::mem::transmute(lpresumehandle.unwrap_or(core::mem::zeroed())), pszgroupname.param().abi()).ok() } + unsafe { EnumServicesStatusExA(hscmanager, infolevel, dwservicetype, dwservicestate, core::mem::transmute(lpservices.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpservices.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbbytesneeded as _, lpservicesreturned as _, lpresumehandle.unwrap_or(core::mem::zeroed()) as _, pszgroupname.param().abi()).ok() } } #[inline] 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<()> @@ -118,17 +118,17 @@ where 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); - unsafe { EnumServicesStatusExW(hscmanager, infolevel, dwservicetype, dwservicestate, core::mem::transmute(lpservices.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpservices.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbbytesneeded), core::mem::transmute(lpservicesreturned), core::mem::transmute(lpresumehandle.unwrap_or(core::mem::zeroed())), pszgroupname.param().abi()).ok() } + unsafe { EnumServicesStatusExW(hscmanager, infolevel, dwservicetype, dwservicestate, core::mem::transmute(lpservices.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpservices.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbbytesneeded as _, lpservicesreturned as _, lpresumehandle.unwrap_or(core::mem::zeroed()) as _, pszgroupname.param().abi()).ok() } } #[inline] 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); - unsafe { EnumServicesStatusW(hscmanager, dwservicetype, dwservicestate, core::mem::transmute(lpservices.unwrap_or(core::mem::zeroed())), cbbufsize, core::mem::transmute(pcbbytesneeded), core::mem::transmute(lpservicesreturned), core::mem::transmute(lpresumehandle.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { EnumServicesStatusW(hscmanager, dwservicetype, dwservicestate, lpservices.unwrap_or(core::mem::zeroed()) as _, cbbufsize, pcbbytesneeded as _, lpservicesreturned as _, lpresumehandle.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { GetServiceDirectory(hservicestatus, 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)) } + unsafe { GetServiceDirectory(hservicestatus, 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()), lpcchrequiredbufferlength as _) } } #[inline] pub unsafe fn GetServiceDisplayNameA(hscmanager: SC_HANDLE, lpservicename: P1, lpdisplayname: Option, lpcchbuffer: *mut u32) -> windows_core::Result<()> @@ -136,7 +136,7 @@ where 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); - unsafe { GetServiceDisplayNameA(hscmanager, lpservicename.param().abi(), core::mem::transmute(lpdisplayname.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchbuffer)).ok() } + unsafe { GetServiceDisplayNameA(hscmanager, lpservicename.param().abi(), lpdisplayname.unwrap_or(core::mem::zeroed()) as _, lpcchbuffer as _).ok() } } #[inline] pub unsafe fn GetServiceDisplayNameW(hscmanager: SC_HANDLE, lpservicename: P1, lpdisplayname: Option, lpcchbuffer: *mut u32) -> windows_core::Result<()> @@ -144,7 +144,7 @@ where 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); - unsafe { GetServiceDisplayNameW(hscmanager, lpservicename.param().abi(), core::mem::transmute(lpdisplayname.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchbuffer)).ok() } + unsafe { GetServiceDisplayNameW(hscmanager, lpservicename.param().abi(), lpdisplayname.unwrap_or(core::mem::zeroed()) as _, lpcchbuffer as _).ok() } } #[inline] pub unsafe fn GetServiceKeyNameA(hscmanager: SC_HANDLE, lpdisplayname: P1, lpservicename: Option, lpcchbuffer: *mut u32) -> windows_core::Result<()> @@ -152,7 +152,7 @@ where 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); - unsafe { GetServiceKeyNameA(hscmanager, lpdisplayname.param().abi(), core::mem::transmute(lpservicename.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchbuffer)).ok() } + unsafe { GetServiceKeyNameA(hscmanager, lpdisplayname.param().abi(), lpservicename.unwrap_or(core::mem::zeroed()) as _, lpcchbuffer as _).ok() } } #[inline] pub unsafe fn GetServiceKeyNameW(hscmanager: SC_HANDLE, lpdisplayname: P1, lpservicename: Option, lpcchbuffer: *mut u32) -> windows_core::Result<()> @@ -160,24 +160,24 @@ where 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); - unsafe { GetServiceKeyNameW(hscmanager, lpdisplayname.param().abi(), core::mem::transmute(lpservicename.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchbuffer)).ok() } + unsafe { GetServiceKeyNameW(hscmanager, lpdisplayname.param().abi(), lpservicename.unwrap_or(core::mem::zeroed()) as _, lpcchbuffer as _).ok() } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { GetServiceRegistryStateKey(servicestatushandle, statetype, accessmask, core::mem::transmute(servicestatekey)) } + unsafe { GetServiceRegistryStateKey(servicestatushandle, statetype, accessmask, servicestatekey as _) } } #[inline] 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); - unsafe { GetSharedServiceDirectory(servicehandle, 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)) } + unsafe { GetSharedServiceDirectory(servicehandle, 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()), requiredbufferlength as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { GetSharedServiceRegistryStateKey(servicehandle, statetype, accessmask, core::mem::transmute(servicestatekey)) } + unsafe { GetSharedServiceRegistryStateKey(servicehandle, statetype, accessmask, servicestatekey as _) } } #[inline] pub unsafe fn LockServiceDatabase(hscmanager: SC_HANDLE) -> *mut core::ffi::c_void { @@ -240,53 +240,53 @@ where #[inline] 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); - unsafe { QueryServiceConfig2A(hservice, 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() } + unsafe { QueryServiceConfig2A(hservice, 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()), pcbbytesneeded as _).ok() } } #[inline] 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); - unsafe { QueryServiceConfig2W(hservice, 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() } + unsafe { QueryServiceConfig2W(hservice, 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()), pcbbytesneeded as _).ok() } } #[inline] 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); - unsafe { QueryServiceConfigA(hservice, core::mem::transmute(lpserviceconfig.unwrap_or(core::mem::zeroed())), cbbufsize, core::mem::transmute(pcbbytesneeded)).ok() } + unsafe { QueryServiceConfigA(hservice, lpserviceconfig.unwrap_or(core::mem::zeroed()) as _, cbbufsize, pcbbytesneeded as _).ok() } } #[inline] 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); - unsafe { QueryServiceConfigW(hservice, core::mem::transmute(lpserviceconfig.unwrap_or(core::mem::zeroed())), cbbufsize, core::mem::transmute(pcbbytesneeded)).ok() } + unsafe { QueryServiceConfigW(hservice, lpserviceconfig.unwrap_or(core::mem::zeroed()) as _, cbbufsize, pcbbytesneeded as _).ok() } } #[inline] 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); - unsafe { QueryServiceDynamicInformation(hservicestatus, dwinfolevel, core::mem::transmute(ppdynamicinfo)).ok() } + unsafe { QueryServiceDynamicInformation(hservicestatus, dwinfolevel, ppdynamicinfo as _).ok() } } #[inline] 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); - unsafe { QueryServiceLockStatusA(hscmanager, core::mem::transmute(lplockstatus.unwrap_or(core::mem::zeroed())), cbbufsize, core::mem::transmute(pcbbytesneeded)).ok() } + unsafe { QueryServiceLockStatusA(hscmanager, lplockstatus.unwrap_or(core::mem::zeroed()) as _, cbbufsize, pcbbytesneeded as _).ok() } } #[inline] 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); - unsafe { QueryServiceLockStatusW(hscmanager, core::mem::transmute(lplockstatus.unwrap_or(core::mem::zeroed())), cbbufsize, core::mem::transmute(pcbbytesneeded)).ok() } + unsafe { QueryServiceLockStatusW(hscmanager, lplockstatus.unwrap_or(core::mem::zeroed()) as _, cbbufsize, pcbbytesneeded as _).ok() } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { QueryServiceObjectSecurity(hservice, dwsecurityinformation, core::mem::transmute(lpsecuritydescriptor.unwrap_or(core::mem::zeroed())), cbbufsize, core::mem::transmute(pcbbytesneeded)).ok() } + unsafe { QueryServiceObjectSecurity(hservice, dwsecurityinformation, lpsecuritydescriptor.unwrap_or(core::mem::zeroed()) as _, cbbufsize, pcbbytesneeded as _).ok() } } #[inline] 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); - unsafe { QueryServiceStatus(hservice, core::mem::transmute(lpservicestatus)).ok() } + unsafe { QueryServiceStatus(hservice, lpservicestatus as _).ok() } } #[inline] 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); - unsafe { QueryServiceStatusEx(hservice, 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() } + unsafe { QueryServiceStatusEx(hservice, 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()), pcbbytesneeded as _).ok() } } #[inline] pub unsafe fn RegisterServiceCtrlHandlerA(lpservicename: P0, lphandlerproc: LPHANDLER_FUNCTION) -> windows_core::Result @@ -303,7 +303,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__ = unsafe { RegisterServiceCtrlHandlerExA(lpservicename.param().abi(), lphandlerproc, core::mem::transmute(lpcontext.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { RegisterServiceCtrlHandlerExA(lpservicename.param().abi(), lphandlerproc, lpcontext.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -312,7 +312,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__ = unsafe { RegisterServiceCtrlHandlerExW(lpservicename.param().abi(), lphandlerproc, core::mem::transmute(lpcontext.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { RegisterServiceCtrlHandlerExW(lpservicename.param().abi(), lphandlerproc, lpcontext.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -363,7 +363,7 @@ pub unsafe fn StartServiceW(hservice: SC_HANDLE, lpserviceargvectors: Option<&[w #[inline] 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); - unsafe { SubscribeServiceChangeNotifications(hservice, eeventtype, pcallback, core::mem::transmute(pcallbackcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(psubscription)) } + unsafe { SubscribeServiceChangeNotifications(hservice, eeventtype, pcallback, pcallbackcontext.unwrap_or(core::mem::zeroed()) as _, psubscription as _) } } #[inline] pub unsafe fn UnlockServiceDatabase(sclock: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -378,7 +378,7 @@ pub unsafe fn UnsubscribeServiceChangeNotifications(psubscription: PSC_NOTIFICAT #[inline] 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); - unsafe { WaitServiceState(hservice, dwnotify, core::mem::transmute(dwtimeout.unwrap_or(core::mem::zeroed())), core::mem::transmute(hcancelevent.unwrap_or(core::mem::zeroed()))) } + unsafe { WaitServiceState(hservice, dwnotify, dwtimeout.unwrap_or(core::mem::zeroed()) as _, hcancelevent.unwrap_or(core::mem::zeroed()) as _) } } 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/SettingsManagementInfrastructure/mod.rs b/crates/libs/windows/src/Windows/Win32/System/SettingsManagementInfrastructure/mod.rs index 24d3c789c1..ae5bded670 100644 --- a/crates/libs/windows/src/Windows/Win32/System/SettingsManagementInfrastructure/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/SettingsManagementInfrastructure/mod.rs @@ -100,7 +100,7 @@ impl ISettingsContext { { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).Deserialize)(windows_core::Interface::as_raw(self), pstream.param().abi(), ptarget.param().abi(), core::mem::transmute(pppresults), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).Deserialize)(windows_core::Interface::as_raw(self), pstream.param().abi(), ptarget.param().abi(), pppresults as _, &mut result__).map(|| result__) } } pub unsafe fn SetUserData(&self, puserdata: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -334,7 +334,7 @@ impl ISettingsEngine { { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).ApplySettingsContext)(windows_core::Interface::as_raw(self), settingscontext.param().abi(), core::mem::transmute(pppwzidentities), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).ApplySettingsContext)(windows_core::Interface::as_raw(self), settingscontext.param().abi(), pppwzidentities as _, &mut result__).map(|| result__) } } pub unsafe fn GetSettingsContext(&self) -> windows_core::Result { @@ -706,7 +706,7 @@ impl ISettingsItem { pub unsafe fn GetValueRaw(&self, data: *mut *mut u8) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetValueRaw)(windows_core::Interface::as_raw(self), core::mem::transmute(data), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetValueRaw)(windows_core::Interface::as_raw(self), data as _, &mut result__).map(|| result__) } } pub unsafe fn SetValueRaw(&self, datatype: i32, data: &[u8]) -> windows_core::Result<()> { diff --git a/crates/libs/windows/src/Windows/Win32/System/SetupAndMigration/mod.rs b/crates/libs/windows/src/Windows/Win32/System/SetupAndMigration/mod.rs index d46b4de260..c8cd68a433 100644 --- a/crates/libs/windows/src/Windows/Win32/System/SetupAndMigration/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/SetupAndMigration/mod.rs @@ -1,12 +1,12 @@ #[inline] pub unsafe fn OOBEComplete(isoobecomplete: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn OOBEComplete(isoobecomplete : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - unsafe { OOBEComplete(core::mem::transmute(isoobecomplete)).ok() } + unsafe { OOBEComplete(isoobecomplete as _).ok() } } #[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); - unsafe { RegisterWaitUntilOOBECompleted(oobecompletedcallback, core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(waithandle)).ok() } + unsafe { RegisterWaitUntilOOBECompleted(oobecompletedcallback, callbackcontext.unwrap_or(core::mem::zeroed()) as _, waithandle as _).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 b53a85c283..6588e2bfb8 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Shutdown/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Shutdown/mod.rs @@ -17,7 +17,7 @@ where #[inline] pub unsafe fn CheckForHiberboot(phiberboot: *mut bool, bclearflag: bool) -> u32 { windows_targets::link!("advapi32.dll" "system" fn CheckForHiberboot(phiberboot : *mut bool, bclearflag : bool) -> u32); - unsafe { CheckForHiberboot(core::mem::transmute(phiberboot), bclearflag) } + unsafe { CheckForHiberboot(phiberboot as _, bclearflag) } } #[inline] pub unsafe fn ExitWindowsEx(uflags: EXIT_WINDOWS_FLAGS, dwreason: SHUTDOWN_REASON) -> windows_core::Result<()> { @@ -99,7 +99,7 @@ pub unsafe fn ShutdownBlockReasonDestroy(hwnd: super::super::Foundation::HWND) - #[inline] 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); - unsafe { ShutdownBlockReasonQuery(hwnd, core::mem::transmute(pwszbuff.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuff)).ok() } + unsafe { ShutdownBlockReasonQuery(hwnd, pwszbuff.unwrap_or(core::mem::zeroed()) as _, pcchbuff as _).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 5f8cdba1c7..ca811fc35e 100644 --- a/crates/libs/windows/src/Windows/Win32/System/SideShow/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/SideShow/mod.rs @@ -198,7 +198,7 @@ impl ISideShowContent { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetContent)(windows_core::Interface::as_raw(self), in_picapabilities.param().abi(), core::mem::transmute(out_pdwsize), core::mem::transmute(out_ppbdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetContent)(windows_core::Interface::as_raw(self), in_picapabilities.param().abi(), out_pdwsize as _, out_ppbdata as _).ok() } } pub unsafe fn ContentId(&self) -> windows_core::Result { unsafe { @@ -462,7 +462,7 @@ impl ISideShowKeyCollection { unsafe { (windows_core::Interface::vtable(self).Clear)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetAt(&self, dwindex: u32, pkey: *mut super::super::Foundation::PROPERTYKEY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAt)(windows_core::Interface::as_raw(self), dwindex, core::mem::transmute(pkey)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAt)(windows_core::Interface::as_raw(self), dwindex, pkey as _).ok() } } pub unsafe fn GetCount(&self, pcelems: *const u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetCount)(windows_core::Interface::as_raw(self), pcelems).ok() } @@ -587,7 +587,7 @@ impl ISideShowNotification { } } pub unsafe fn SetExpirationTime(&self, in_ptime: Option<*const super::super::Foundation::SYSTEMTIME>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetExpirationTime)(windows_core::Interface::as_raw(self), core::mem::transmute(in_ptime.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetExpirationTime)(windows_core::Interface::as_raw(self), in_ptime.unwrap_or(core::mem::zeroed()) as _).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 6630fd0745..e7e15e7aab 100644 --- a/crates/libs/windows/src/Windows/Win32/System/StationsAndDesktops/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/StationsAndDesktops/mod.rs @@ -1,22 +1,22 @@ #[inline] 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); - unsafe { BroadcastSystemMessageA(flags, core::mem::transmute(lpinfo.unwrap_or(core::mem::zeroed())), msg, wparam, lparam) } + unsafe { BroadcastSystemMessageA(flags, lpinfo.unwrap_or(core::mem::zeroed()) as _, msg, wparam, lparam) } } #[inline] 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); - unsafe { BroadcastSystemMessageExA(flags, core::mem::transmute(lpinfo.unwrap_or(core::mem::zeroed())), msg, wparam, lparam, core::mem::transmute(pbsminfo.unwrap_or(core::mem::zeroed()))) } + unsafe { BroadcastSystemMessageExA(flags, lpinfo.unwrap_or(core::mem::zeroed()) as _, msg, wparam, lparam, pbsminfo.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { BroadcastSystemMessageExW(flags, core::mem::transmute(lpinfo.unwrap_or(core::mem::zeroed())), msg, wparam, lparam, core::mem::transmute(pbsminfo.unwrap_or(core::mem::zeroed()))) } + unsafe { BroadcastSystemMessageExW(flags, lpinfo.unwrap_or(core::mem::zeroed()) as _, msg, wparam, lparam, pbsminfo.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { BroadcastSystemMessageW(flags, core::mem::transmute(lpinfo.unwrap_or(core::mem::zeroed())), msg, wparam, lparam) } + unsafe { BroadcastSystemMessageW(flags, lpinfo.unwrap_or(core::mem::zeroed()) as _, msg, wparam, lparam) } } #[inline] pub unsafe fn CloseDesktop(hdesktop: HDESK) -> windows_core::Result<()> { @@ -36,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__ = unsafe { CreateDesktopA(lpszdesktop.param().abi(), lpszdevice.param().abi(), core::mem::transmute(pdevmode.unwrap_or(core::mem::zeroed())), dwflags, dwdesiredaccess, core::mem::transmute(lpsa.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { CreateDesktopA(lpszdesktop.param().abi(), lpszdevice.param().abi(), pdevmode.unwrap_or(core::mem::zeroed()) as _, dwflags, dwdesiredaccess, lpsa.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Security"))] @@ -47,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__ = unsafe { CreateDesktopExA(lpszdesktop.param().abi(), lpszdevice.param().abi(), core::mem::transmute(pdevmode.unwrap_or(core::mem::zeroed())), dwflags, dwdesiredaccess, core::mem::transmute(lpsa.unwrap_or(core::mem::zeroed())), ulheapsize, core::mem::transmute(pvoid.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { CreateDesktopExA(lpszdesktop.param().abi(), lpszdevice.param().abi(), pdevmode.unwrap_or(core::mem::zeroed()) as _, dwflags, dwdesiredaccess, lpsa.unwrap_or(core::mem::zeroed()) as _, ulheapsize, pvoid.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Security"))] @@ -58,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__ = unsafe { CreateDesktopExW(lpszdesktop.param().abi(), lpszdevice.param().abi(), core::mem::transmute(pdevmode.unwrap_or(core::mem::zeroed())), dwflags, dwdesiredaccess, core::mem::transmute(lpsa.unwrap_or(core::mem::zeroed())), ulheapsize, core::mem::transmute(pvoid.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { CreateDesktopExW(lpszdesktop.param().abi(), lpszdevice.param().abi(), pdevmode.unwrap_or(core::mem::zeroed()) as _, dwflags, dwdesiredaccess, lpsa.unwrap_or(core::mem::zeroed()) as _, ulheapsize, pvoid.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Security"))] @@ -69,7 +69,7 @@ where P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn 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__ = unsafe { CreateDesktopW(lpszdesktop.param().abi(), lpszdevice.param().abi(), core::mem::transmute(pdevmode.unwrap_or(core::mem::zeroed())), dwflags, dwdesiredaccess, core::mem::transmute(lpsa.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { CreateDesktopW(lpszdesktop.param().abi(), lpszdevice.param().abi(), pdevmode.unwrap_or(core::mem::zeroed()) as _, dwflags, dwdesiredaccess, lpsa.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -79,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__ = unsafe { CreateWindowStationA(lpwinsta.param().abi(), dwflags, dwdesiredaccess, core::mem::transmute(lpsa.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { CreateWindowStationA(lpwinsta.param().abi(), dwflags, dwdesiredaccess, lpsa.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -89,24 +89,24 @@ 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__ = unsafe { CreateWindowStationW(lpwinsta.param().abi(), dwflags, dwdesiredaccess, core::mem::transmute(lpsa.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { CreateWindowStationW(lpwinsta.param().abi(), dwflags, dwdesiredaccess, lpsa.unwrap_or(core::mem::zeroed()) as _) }; (!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: 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); - unsafe { EnumDesktopWindows(core::mem::transmute(hdesktop.unwrap_or(core::mem::zeroed())), lpfn, lparam).ok() } + unsafe { EnumDesktopWindows(hdesktop.unwrap_or(core::mem::zeroed()) as _, lpfn, lparam).ok() } } #[inline] 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); - unsafe { EnumDesktopsA(core::mem::transmute(hwinsta.unwrap_or(core::mem::zeroed())), lpenumfunc, lparam).ok() } + unsafe { EnumDesktopsA(hwinsta.unwrap_or(core::mem::zeroed()) as _, lpenumfunc, lparam).ok() } } #[inline] 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); - unsafe { EnumDesktopsW(core::mem::transmute(hwinsta.unwrap_or(core::mem::zeroed())), lpenumfunc, lparam).ok() } + unsafe { EnumDesktopsW(hwinsta.unwrap_or(core::mem::zeroed()) as _, lpenumfunc, lparam).ok() } } #[inline] pub unsafe fn EnumWindowStationsA(lpenumfunc: WINSTAENUMPROCA, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { @@ -133,12 +133,12 @@ pub unsafe fn GetThreadDesktop(dwthreadid: u32) -> windows_core::Result { #[inline] 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); - unsafe { GetUserObjectInformationA(hobj, nindex, core::mem::transmute(pvinfo.unwrap_or(core::mem::zeroed())), nlength, core::mem::transmute(lpnlengthneeded.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { GetUserObjectInformationA(hobj, nindex, pvinfo.unwrap_or(core::mem::zeroed()) as _, nlength, lpnlengthneeded.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { GetUserObjectInformationW(hobj, nindex, core::mem::transmute(pvinfo.unwrap_or(core::mem::zeroed())), nlength, core::mem::transmute(lpnlengthneeded.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { GetUserObjectInformationW(hobj, nindex, pvinfo.unwrap_or(core::mem::zeroed()) as _, nlength, lpnlengthneeded.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn OpenDesktopA(lpszdesktop: P0, dwflags: DESKTOP_CONTROL_FLAGS, finherit: bool, dwdesiredaccess: u32) -> windows_core::Result 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 474364c61f..be3d9c2057 100644 --- a/crates/libs/windows/src/Windows/Win32/System/SubsystemForLinux/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/SubsystemForLinux/mod.rs @@ -12,7 +12,7 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-wsl-api-l1-1-0.dll" "system" fn WslGetDistributionConfiguration(distributionname : windows_core::PCWSTR, distributionversion : *mut u32, defaultuid : *mut u32, wsldistributionflags : *mut WSL_DISTRIBUTION_FLAGS, defaultenvironmentvariables : *mut *mut windows_core::PSTR, defaultenvironmentvariablecount : *mut u32) -> windows_core::HRESULT); - unsafe { WslGetDistributionConfiguration(distributionname.param().abi(), core::mem::transmute(distributionversion), core::mem::transmute(defaultuid), core::mem::transmute(wsldistributionflags), core::mem::transmute(defaultenvironmentvariables), core::mem::transmute(defaultenvironmentvariablecount)).ok() } + unsafe { WslGetDistributionConfiguration(distributionname.param().abi(), distributionversion as _, defaultuid as _, wsldistributionflags as _, defaultenvironmentvariables as _, defaultenvironmentvariablecount as _).ok() } } #[inline] pub unsafe fn WslIsDistributionRegistered(distributionname: P0) -> super::super::Foundation::BOOL 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 a19e8309b1..ea5f078d47 100644 --- a/crates/libs/windows/src/Windows/Win32/System/SystemInformation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/SystemInformation/mod.rs @@ -4,7 +4,7 @@ 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); - unsafe { DnsHostnameToComputerNameExW(hostname.param().abi(), core::mem::transmute(computername.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize)) } + unsafe { DnsHostnameToComputerNameExW(hostname.param().abi(), computername.unwrap_or(core::mem::zeroed()) as _, nsize as _) } } #[inline] pub unsafe fn EnumSystemFirmwareTables(firmwaretableprovidersignature: FIRMWARE_TABLE_PROVIDER, pfirmwaretableenumbuffer: Option<&mut [u8]>) -> u32 { @@ -14,12 +14,12 @@ pub unsafe fn EnumSystemFirmwareTables(firmwaretableprovidersignature: FIRMWARE_ #[inline] 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); - unsafe { GetComputerNameExA(nametype, core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize)).ok() } + unsafe { GetComputerNameExA(nametype, lpbuffer.unwrap_or(core::mem::zeroed()) as _, nsize as _).ok() } } #[inline] 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); - unsafe { GetComputerNameExW(nametype, core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize)).ok() } + unsafe { GetComputerNameExW(nametype, lpbuffer.unwrap_or(core::mem::zeroed()) as _, nsize as _).ok() } } #[inline] pub unsafe fn GetDeveloperDriveEnablementState() -> DEVELOPER_DRIVE_ENABLEMENT_STATE { @@ -29,7 +29,7 @@ pub unsafe fn GetDeveloperDriveEnablementState() -> DEVELOPER_DRIVE_ENABLEMENT_S #[inline] pub unsafe fn GetFirmwareType(firmwaretype: *mut FIRMWARE_TYPE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetFirmwareType(firmwaretype : *mut FIRMWARE_TYPE) -> super::super::Foundation:: BOOL); - unsafe { GetFirmwareType(core::mem::transmute(firmwaretype)).ok() } + unsafe { GetFirmwareType(firmwaretype as _).ok() } } #[inline] pub unsafe fn GetIntegratedDisplaySize() -> windows_core::Result { @@ -51,47 +51,47 @@ 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); - unsafe { GetLogicalProcessorInformation(core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnedlength)).ok() } + unsafe { GetLogicalProcessorInformation(buffer.unwrap_or(core::mem::zeroed()) as _, returnedlength as _).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); - unsafe { GetLogicalProcessorInformationEx(relationshiptype, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnedlength)).ok() } + unsafe { GetLogicalProcessorInformationEx(relationshiptype, buffer.unwrap_or(core::mem::zeroed()) as _, returnedlength as _).ok() } } #[inline] pub unsafe fn GetNativeSystemInfo(lpsysteminfo: *mut SYSTEM_INFO) { windows_targets::link!("kernel32.dll" "system" fn GetNativeSystemInfo(lpsysteminfo : *mut SYSTEM_INFO)); - unsafe { GetNativeSystemInfo(core::mem::transmute(lpsysteminfo)) } + unsafe { GetNativeSystemInfo(lpsysteminfo as _) } } #[inline] pub unsafe fn GetOsManufacturingMode(pbenabled: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL { windows_targets::link!("api-ms-win-core-sysinfo-l1-2-3.dll" "system" fn GetOsManufacturingMode(pbenabled : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - unsafe { GetOsManufacturingMode(core::mem::transmute(pbenabled)) } + unsafe { GetOsManufacturingMode(pbenabled as _) } } #[inline] pub unsafe fn GetOsSafeBootMode(flags: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("api-ms-win-core-sysinfo-l1-2-0.dll" "system" fn GetOsSafeBootMode(flags : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetOsSafeBootMode(core::mem::transmute(flags)) } + unsafe { GetOsSafeBootMode(flags as _) } } #[inline] pub unsafe fn GetPhysicallyInstalledSystemMemory(totalmemoryinkilobytes: *mut u64) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetPhysicallyInstalledSystemMemory(totalmemoryinkilobytes : *mut u64) -> super::super::Foundation:: BOOL); - unsafe { GetPhysicallyInstalledSystemMemory(core::mem::transmute(totalmemoryinkilobytes)).ok() } + unsafe { GetPhysicallyInstalledSystemMemory(totalmemoryinkilobytes as _).ok() } } #[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); - unsafe { GetProcessorSystemCycleTime(group, core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnedlength)).ok() } + unsafe { GetProcessorSystemCycleTime(group, buffer.unwrap_or(core::mem::zeroed()) as _, returnedlength as _).ok() } } #[inline] pub unsafe fn GetProductInfo(dwosmajorversion: u32, dwosminorversion: u32, dwspmajorversion: u32, dwspminorversion: u32, pdwreturnedproducttype: *mut OS_PRODUCT_TYPE) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn GetProductInfo(dwosmajorversion : u32, dwosminorversion : u32, dwspmajorversion : u32, dwspminorversion : u32, pdwreturnedproducttype : *mut OS_PRODUCT_TYPE) -> super::super::Foundation:: BOOL); - unsafe { GetProductInfo(dwosmajorversion, dwosminorversion, dwspmajorversion, dwspminorversion, core::mem::transmute(pdwreturnedproducttype)) } + unsafe { GetProductInfo(dwosmajorversion, dwosminorversion, dwspmajorversion, dwspminorversion, pdwreturnedproducttype as _) } } #[inline] 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); - unsafe { GetSystemCpuSetInformation(core::mem::transmute(information.unwrap_or(core::mem::zeroed())), bufferlength, core::mem::transmute(returnedlength), core::mem::transmute(process.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))) } + unsafe { GetSystemCpuSetInformation(information.unwrap_or(core::mem::zeroed()) as _, bufferlength, returnedlength as _, process.unwrap_or(core::mem::zeroed()) as _, flags.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GetSystemDEPPolicy() -> DEP_SYSTEM_POLICY_TYPE { @@ -116,12 +116,12 @@ pub unsafe fn GetSystemFirmwareTable(firmwaretableprovidersignature: FIRMWARE_TA #[inline] pub unsafe fn GetSystemInfo(lpsysteminfo: *mut SYSTEM_INFO) { windows_targets::link!("kernel32.dll" "system" fn GetSystemInfo(lpsysteminfo : *mut SYSTEM_INFO)); - unsafe { GetSystemInfo(core::mem::transmute(lpsysteminfo)) } + unsafe { GetSystemInfo(lpsysteminfo as _) } } #[inline] pub unsafe fn GetSystemLeapSecondInformation(enabled: *mut super::super::Foundation::BOOL, flags: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn GetSystemLeapSecondInformation(enabled : *mut super::super::Foundation:: BOOL, flags : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetSystemLeapSecondInformation(core::mem::transmute(enabled), core::mem::transmute(flags)) } + unsafe { GetSystemLeapSecondInformation(enabled as _, flags as _) } } #[inline] pub unsafe fn GetSystemTime() -> super::super::Foundation::SYSTEMTIME { @@ -135,12 +135,12 @@ pub unsafe fn GetSystemTime() -> super::super::Foundation::SYSTEMTIME { #[inline] pub unsafe fn GetSystemTimeAdjustment(lptimeadjustment: *mut u32, lptimeincrement: *mut u32, lptimeadjustmentdisabled: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetSystemTimeAdjustment(lptimeadjustment : *mut u32, lptimeincrement : *mut u32, lptimeadjustmentdisabled : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - unsafe { GetSystemTimeAdjustment(core::mem::transmute(lptimeadjustment), core::mem::transmute(lptimeincrement), core::mem::transmute(lptimeadjustmentdisabled)).ok() } + unsafe { GetSystemTimeAdjustment(lptimeadjustment as _, lptimeincrement as _, lptimeadjustmentdisabled as _).ok() } } #[inline] pub unsafe fn GetSystemTimeAdjustmentPrecise(lptimeadjustment: *mut u64, lptimeincrement: *mut u64, lptimeadjustmentdisabled: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-core-sysinfo-l1-2-4.dll" "system" fn GetSystemTimeAdjustmentPrecise(lptimeadjustment : *mut u64, lptimeincrement : *mut u64, lptimeadjustmentdisabled : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - unsafe { GetSystemTimeAdjustmentPrecise(core::mem::transmute(lptimeadjustment), core::mem::transmute(lptimeincrement), core::mem::transmute(lptimeadjustmentdisabled)).ok() } + unsafe { GetSystemTimeAdjustmentPrecise(lptimeadjustment as _, lptimeincrement as _, lptimeadjustmentdisabled as _).ok() } } #[inline] pub unsafe fn GetSystemTimeAsFileTime() -> super::super::Foundation::FILETIME { @@ -208,12 +208,12 @@ pub unsafe fn GetVersion() -> u32 { #[inline] pub unsafe fn GetVersionExA(lpversioninformation: *mut OSVERSIONINFOA) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetVersionExA(lpversioninformation : *mut OSVERSIONINFOA) -> super::super::Foundation:: BOOL); - unsafe { GetVersionExA(core::mem::transmute(lpversioninformation)).ok() } + unsafe { GetVersionExA(lpversioninformation as _).ok() } } #[inline] pub unsafe fn GetVersionExW(lpversioninformation: *mut OSVERSIONINFOW) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetVersionExW(lpversioninformation : *mut OSVERSIONINFOW) -> super::super::Foundation:: BOOL); - unsafe { GetVersionExW(core::mem::transmute(lpversioninformation)).ok() } + unsafe { GetVersionExW(lpversioninformation as _).ok() } } #[inline] pub unsafe fn GetWindowsDirectoryA(lpbuffer: Option<&mut [u8]>) -> u32 { @@ -228,12 +228,12 @@ pub unsafe fn GetWindowsDirectoryW(lpbuffer: Option<&mut [u16]>) -> u32 { #[inline] pub unsafe fn GlobalMemoryStatus(lpbuffer: *mut MEMORYSTATUS) { windows_targets::link!("kernel32.dll" "system" fn GlobalMemoryStatus(lpbuffer : *mut MEMORYSTATUS)); - unsafe { GlobalMemoryStatus(core::mem::transmute(lpbuffer)) } + unsafe { GlobalMemoryStatus(lpbuffer as _) } } #[inline] pub unsafe fn GlobalMemoryStatusEx(lpbuffer: *mut MEMORYSTATUSEX) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GlobalMemoryStatusEx(lpbuffer : *mut MEMORYSTATUSEX) -> super::super::Foundation:: BOOL); - unsafe { GlobalMemoryStatusEx(core::mem::transmute(lpbuffer)).ok() } + unsafe { GlobalMemoryStatusEx(lpbuffer as _).ok() } } #[inline] pub unsafe fn IsUserCetAvailableInEnvironment(usercetenvironment: USER_CET_ENVIRONMENT) -> super::super::Foundation::BOOL { @@ -251,22 +251,22 @@ pub unsafe fn IsWow64GuestMachineSupported(wowguestmachine: IMAGE_FILE_MACHINE) #[inline] pub unsafe fn RtlConvertDeviceFamilyInfoToString(puldevicefamilybuffersize: *mut u32, puldeviceformbuffersize: *mut u32, devicefamily: windows_core::PWSTR, deviceform: windows_core::PWSTR) -> u32 { windows_targets::link!("ntdll.dll" "system" fn RtlConvertDeviceFamilyInfoToString(puldevicefamilybuffersize : *mut u32, puldeviceformbuffersize : *mut u32, devicefamily : windows_core::PWSTR, deviceform : windows_core::PWSTR) -> u32); - unsafe { RtlConvertDeviceFamilyInfoToString(core::mem::transmute(puldevicefamilybuffersize), core::mem::transmute(puldeviceformbuffersize), core::mem::transmute(devicefamily), core::mem::transmute(deviceform)) } + unsafe { RtlConvertDeviceFamilyInfoToString(puldevicefamilybuffersize as _, puldeviceformbuffersize as _, core::mem::transmute(devicefamily), core::mem::transmute(deviceform)) } } #[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)); - unsafe { 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()))) } + unsafe { RtlGetDeviceFamilyInfoEnum(pulluapinfo.unwrap_or(core::mem::zeroed()) as _, puldevicefamily.unwrap_or(core::mem::zeroed()) as _, puldeviceform.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RtlGetProductInfo(osmajorversion: u32, osminorversion: u32, spmajorversion: u32, spminorversion: u32, returnedproducttype: *mut u32) -> bool { windows_targets::link!("ntdll.dll" "system" fn RtlGetProductInfo(osmajorversion : u32, osminorversion : u32, spmajorversion : u32, spminorversion : u32, returnedproducttype : *mut u32) -> bool); - unsafe { RtlGetProductInfo(osmajorversion, osminorversion, spmajorversion, spminorversion, core::mem::transmute(returnedproducttype)) } + unsafe { RtlGetProductInfo(osmajorversion, osminorversion, spmajorversion, spminorversion, returnedproducttype as _) } } #[inline] pub unsafe fn RtlGetSystemGlobalData(dataid: RTL_SYSTEM_GLOBAL_DATA_ID, buffer: *mut core::ffi::c_void, size: u32) -> u32 { windows_targets::link!("ntdllk.dll" "system" fn RtlGetSystemGlobalData(dataid : RTL_SYSTEM_GLOBAL_DATA_ID, buffer : *mut core::ffi::c_void, size : u32) -> u32); - unsafe { RtlGetSystemGlobalData(dataid, core::mem::transmute(buffer), size) } + unsafe { RtlGetSystemGlobalData(dataid, buffer as _, size) } } #[inline] pub unsafe fn RtlOsDeploymentState(flags: u32) -> OS_DEPLOYEMENT_STATE_VALUES { @@ -346,12 +346,12 @@ pub unsafe fn VerSetConditionMask(conditionmask: u64, typemask: VER_FLAGS, condi #[inline] pub unsafe fn VerifyVersionInfoA(lpversioninformation: *mut OSVERSIONINFOEXA, dwtypemask: VER_FLAGS, dwlconditionmask: u64) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn VerifyVersionInfoA(lpversioninformation : *mut OSVERSIONINFOEXA, dwtypemask : VER_FLAGS, dwlconditionmask : u64) -> super::super::Foundation:: BOOL); - unsafe { VerifyVersionInfoA(core::mem::transmute(lpversioninformation), dwtypemask, dwlconditionmask).ok() } + unsafe { VerifyVersionInfoA(lpversioninformation as _, dwtypemask, dwlconditionmask).ok() } } #[inline] pub unsafe fn VerifyVersionInfoW(lpversioninformation: *mut OSVERSIONINFOEXW, dwtypemask: VER_FLAGS, dwlconditionmask: u64) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn VerifyVersionInfoW(lpversioninformation : *mut OSVERSIONINFOEXW, dwtypemask : VER_FLAGS, dwlconditionmask : u64) -> super::super::Foundation:: BOOL); - unsafe { VerifyVersionInfoW(core::mem::transmute(lpversioninformation), dwtypemask, dwlconditionmask).ok() } + unsafe { VerifyVersionInfoW(lpversioninformation as _, dwtypemask, dwlconditionmask).ok() } } pub const ACPI: FIRMWARE_TABLE_PROVIDER = FIRMWARE_TABLE_PROVIDER(1094930505u32); #[repr(C)] 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 295c252445..2599cf0678 100644 --- a/crates/libs/windows/src/Windows/Win32/System/TaskScheduler/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/TaskScheduler/mod.rs @@ -30,7 +30,7 @@ impl IAction { unsafe { (windows_core::Interface::vtable(self).SetId)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(id)).ok() } } pub unsafe fn Type(&self, ptype: *mut TASK_ACTION_TYPE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Type)(windows_core::Interface::as_raw(self), core::mem::transmute(ptype)).ok() } + unsafe { (windows_core::Interface::vtable(self).Type)(windows_core::Interface::as_raw(self), ptype as _).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -95,7 +95,7 @@ windows_core::imp::interface_hierarchy!(IActionCollection, windows_core::IUnknow #[cfg(feature = "Win32_System_Com")] impl IActionCollection { pub unsafe fn Count(&self, pcount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Count)(windows_core::Interface::as_raw(self), core::mem::transmute(pcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).Count)(windows_core::Interface::as_raw(self), pcount as _).ok() } } pub unsafe fn get_Item(&self, index: i32) -> windows_core::Result { unsafe { @@ -419,7 +419,7 @@ windows_core::imp::interface_hierarchy!(IDailyTrigger, windows_core::IUnknown, s #[cfg(feature = "Win32_System_Com")] impl IDailyTrigger { pub unsafe fn DaysInterval(&self, pdays: *mut i16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DaysInterval)(windows_core::Interface::as_raw(self), core::mem::transmute(pdays)).ok() } + unsafe { (windows_core::Interface::vtable(self).DaysInterval)(windows_core::Interface::as_raw(self), pdays as _).ok() } } pub unsafe fn SetDaysInterval(&self, days: i16) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetDaysInterval)(windows_core::Interface::as_raw(self), days).ok() } @@ -563,11 +563,11 @@ impl IEmailAction { } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Attachments(&self, pattachements: *mut *mut super::Com::SAFEARRAY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Attachments)(windows_core::Interface::as_raw(self), core::mem::transmute(pattachements)).ok() } + unsafe { (windows_core::Interface::vtable(self).Attachments)(windows_core::Interface::as_raw(self), pattachements as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn SetAttachments(&self, pattachements: *mut super::Com::SAFEARRAY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetAttachments)(windows_core::Interface::as_raw(self), core::mem::transmute(pattachements)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetAttachments)(windows_core::Interface::as_raw(self), pattachements as _).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -787,7 +787,7 @@ windows_core::imp::define_interface!(IEnumWorkItems, IEnumWorkItems_Vtbl, 0x148b windows_core::imp::interface_hierarchy!(IEnumWorkItems, windows_core::IUnknown); impl IEnumWorkItems { pub unsafe fn Next(&self, celt: u32, rgpwsznames: *mut *mut windows_core::PWSTR, pceltfetched: *mut u32) -> windows_core::HRESULT { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(rgpwsznames), core::mem::transmute(pceltfetched)) } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, rgpwsznames as _, pceltfetched as _) } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt) } @@ -1101,7 +1101,7 @@ windows_core::imp::interface_hierarchy!(IExecAction2, windows_core::IUnknown, su #[cfg(feature = "Win32_System_Com")] impl IExecAction2 { pub unsafe fn HideAppWindow(&self, phideappwindow: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).HideAppWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(phideappwindow)).ok() } + unsafe { (windows_core::Interface::vtable(self).HideAppWindow)(windows_core::Interface::as_raw(self), phideappwindow as _).ok() } } pub unsafe fn SetHideAppWindow(&self, hideappwindow: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetHideAppWindow)(windows_core::Interface::as_raw(self), hideappwindow).ok() } @@ -1172,13 +1172,13 @@ impl IIdleSettings { unsafe { (windows_core::Interface::vtable(self).SetWaitTimeout)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(timeout)).ok() } } pub unsafe fn StopOnIdleEnd(&self, pstop: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).StopOnIdleEnd)(windows_core::Interface::as_raw(self), core::mem::transmute(pstop)).ok() } + unsafe { (windows_core::Interface::vtable(self).StopOnIdleEnd)(windows_core::Interface::as_raw(self), pstop as _).ok() } } pub unsafe fn SetStopOnIdleEnd(&self, stop: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetStopOnIdleEnd)(windows_core::Interface::as_raw(self), stop).ok() } } pub unsafe fn RestartOnIdle(&self, prestart: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RestartOnIdle)(windows_core::Interface::as_raw(self), core::mem::transmute(prestart)).ok() } + unsafe { (windows_core::Interface::vtable(self).RestartOnIdle)(windows_core::Interface::as_raw(self), prestart as _).ok() } } pub unsafe fn SetRestartOnIdle(&self, restart: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetRestartOnIdle)(windows_core::Interface::as_raw(self), restart).ok() } @@ -1418,7 +1418,7 @@ impl IMaintenanceSettings { unsafe { (windows_core::Interface::vtable(self).SetExclusive)(windows_core::Interface::as_raw(self), value).ok() } } pub unsafe fn Exclusive(&self, target: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Exclusive)(windows_core::Interface::as_raw(self), core::mem::transmute(target)).ok() } + unsafe { (windows_core::Interface::vtable(self).Exclusive)(windows_core::Interface::as_raw(self), target as _).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -1510,25 +1510,25 @@ windows_core::imp::interface_hierarchy!(IMonthlyDOWTrigger, windows_core::IUnkno #[cfg(feature = "Win32_System_Com")] impl IMonthlyDOWTrigger { pub unsafe fn DaysOfWeek(&self, pdays: *mut i16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DaysOfWeek)(windows_core::Interface::as_raw(self), core::mem::transmute(pdays)).ok() } + unsafe { (windows_core::Interface::vtable(self).DaysOfWeek)(windows_core::Interface::as_raw(self), pdays as _).ok() } } pub unsafe fn SetDaysOfWeek(&self, days: i16) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetDaysOfWeek)(windows_core::Interface::as_raw(self), days).ok() } } pub unsafe fn WeeksOfMonth(&self, pweeks: *mut i16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).WeeksOfMonth)(windows_core::Interface::as_raw(self), core::mem::transmute(pweeks)).ok() } + unsafe { (windows_core::Interface::vtable(self).WeeksOfMonth)(windows_core::Interface::as_raw(self), pweeks as _).ok() } } pub unsafe fn SetWeeksOfMonth(&self, weeks: i16) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetWeeksOfMonth)(windows_core::Interface::as_raw(self), weeks).ok() } } pub unsafe fn MonthsOfYear(&self, pmonths: *mut i16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).MonthsOfYear)(windows_core::Interface::as_raw(self), core::mem::transmute(pmonths)).ok() } + unsafe { (windows_core::Interface::vtable(self).MonthsOfYear)(windows_core::Interface::as_raw(self), pmonths as _).ok() } } pub unsafe fn SetMonthsOfYear(&self, months: i16) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetMonthsOfYear)(windows_core::Interface::as_raw(self), months).ok() } } pub unsafe fn RunOnLastWeekOfMonth(&self, plastweek: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RunOnLastWeekOfMonth)(windows_core::Interface::as_raw(self), core::mem::transmute(plastweek)).ok() } + unsafe { (windows_core::Interface::vtable(self).RunOnLastWeekOfMonth)(windows_core::Interface::as_raw(self), plastweek as _).ok() } } pub unsafe fn SetRunOnLastWeekOfMonth(&self, lastweek: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetRunOnLastWeekOfMonth)(windows_core::Interface::as_raw(self), lastweek).ok() } @@ -1665,19 +1665,19 @@ windows_core::imp::interface_hierarchy!(IMonthlyTrigger, windows_core::IUnknown, #[cfg(feature = "Win32_System_Com")] impl IMonthlyTrigger { pub unsafe fn DaysOfMonth(&self, pdays: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DaysOfMonth)(windows_core::Interface::as_raw(self), core::mem::transmute(pdays)).ok() } + unsafe { (windows_core::Interface::vtable(self).DaysOfMonth)(windows_core::Interface::as_raw(self), pdays as _).ok() } } pub unsafe fn SetDaysOfMonth(&self, days: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetDaysOfMonth)(windows_core::Interface::as_raw(self), days).ok() } } pub unsafe fn MonthsOfYear(&self, pmonths: *mut i16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).MonthsOfYear)(windows_core::Interface::as_raw(self), core::mem::transmute(pmonths)).ok() } + unsafe { (windows_core::Interface::vtable(self).MonthsOfYear)(windows_core::Interface::as_raw(self), pmonths as _).ok() } } pub unsafe fn SetMonthsOfYear(&self, months: i16) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetMonthsOfYear)(windows_core::Interface::as_raw(self), months).ok() } } pub unsafe fn RunOnLastDayOfMonth(&self, plastday: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RunOnLastDayOfMonth)(windows_core::Interface::as_raw(self), core::mem::transmute(plastday)).ok() } + unsafe { (windows_core::Interface::vtable(self).RunOnLastDayOfMonth)(windows_core::Interface::as_raw(self), plastday as _).ok() } } pub unsafe fn SetRunOnLastDayOfMonth(&self, lastday: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetRunOnLastDayOfMonth)(windows_core::Interface::as_raw(self), lastday).ok() } @@ -1897,7 +1897,7 @@ impl IPrincipal { unsafe { (windows_core::Interface::vtable(self).SetUserId)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(user)).ok() } } pub unsafe fn LogonType(&self, plogon: *mut TASK_LOGON_TYPE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).LogonType)(windows_core::Interface::as_raw(self), core::mem::transmute(plogon)).ok() } + unsafe { (windows_core::Interface::vtable(self).LogonType)(windows_core::Interface::as_raw(self), plogon as _).ok() } } pub unsafe fn SetLogonType(&self, logon: TASK_LOGON_TYPE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetLogonType)(windows_core::Interface::as_raw(self), logon).ok() } @@ -1909,7 +1909,7 @@ impl IPrincipal { unsafe { (windows_core::Interface::vtable(self).SetGroupId)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(group)).ok() } } pub unsafe fn RunLevel(&self, prunlevel: *mut TASK_RUNLEVEL_TYPE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RunLevel)(windows_core::Interface::as_raw(self), core::mem::transmute(prunlevel)).ok() } + unsafe { (windows_core::Interface::vtable(self).RunLevel)(windows_core::Interface::as_raw(self), prunlevel as _).ok() } } pub unsafe fn SetRunLevel(&self, runlevel: TASK_RUNLEVEL_TYPE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetRunLevel)(windows_core::Interface::as_raw(self), runlevel).ok() } @@ -2058,13 +2058,13 @@ windows_core::imp::interface_hierarchy!(IPrincipal2, windows_core::IUnknown, sup #[cfg(feature = "Win32_System_Com")] impl IPrincipal2 { pub unsafe fn ProcessTokenSidType(&self, pprocesstokensidtype: *mut TASK_PROCESSTOKENSID_TYPE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ProcessTokenSidType)(windows_core::Interface::as_raw(self), core::mem::transmute(pprocesstokensidtype)).ok() } + unsafe { (windows_core::Interface::vtable(self).ProcessTokenSidType)(windows_core::Interface::as_raw(self), pprocesstokensidtype as _).ok() } } pub unsafe fn SetProcessTokenSidType(&self, processtokensidtype: TASK_PROCESSTOKENSID_TYPE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetProcessTokenSidType)(windows_core::Interface::as_raw(self), processtokensidtype).ok() } } pub unsafe fn RequiredPrivilegeCount(&self, pcount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RequiredPrivilegeCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).RequiredPrivilegeCount)(windows_core::Interface::as_raw(self), pcount as _).ok() } } pub unsafe fn get_RequiredPrivilege(&self, index: i32, pprivilege: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).get_RequiredPrivilege)(windows_core::Interface::as_raw(self), index, core::mem::transmute(pprivilege)).ok() } @@ -2294,7 +2294,7 @@ impl IRegisteredTask { unsafe { (windows_core::Interface::vtable(self).Stop)(windows_core::Interface::as_raw(self), flags).ok() } } pub unsafe fn GetRunTimes(&self, pststart: *const super::super::Foundation::SYSTEMTIME, pstend: *const super::super::Foundation::SYSTEMTIME, pcount: *mut u32, pruntimes: *mut *mut super::super::Foundation::SYSTEMTIME) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRunTimes)(windows_core::Interface::as_raw(self), pststart, pstend, core::mem::transmute(pcount), core::mem::transmute(pruntimes)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRunTimes)(windows_core::Interface::as_raw(self), pststart, pstend, pcount as _, pruntimes as _).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -3012,7 +3012,7 @@ impl IRepetitionPattern { unsafe { (windows_core::Interface::vtable(self).SetDuration)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(duration)).ok() } } pub unsafe fn StopAtDurationEnd(&self, pstop: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).StopAtDurationEnd)(windows_core::Interface::as_raw(self), core::mem::transmute(pstop)).ok() } + unsafe { (windows_core::Interface::vtable(self).StopAtDurationEnd)(windows_core::Interface::as_raw(self), pstop as _).ok() } } pub unsafe fn SetStopAtDurationEnd(&self, stop: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetStopAtDurationEnd)(windows_core::Interface::as_raw(self), stop).ok() } @@ -3384,7 +3384,7 @@ windows_core::imp::define_interface!(IScheduledWorkItem, IScheduledWorkItem_Vtbl windows_core::imp::interface_hierarchy!(IScheduledWorkItem, windows_core::IUnknown); impl IScheduledWorkItem { pub unsafe fn CreateTrigger(&self, pinewtrigger: *mut u16, pptrigger: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateTrigger)(windows_core::Interface::as_raw(self), core::mem::transmute(pinewtrigger), core::mem::transmute(pptrigger)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateTrigger)(windows_core::Interface::as_raw(self), pinewtrigger as _, core::mem::transmute(pptrigger)).ok() } } pub unsafe fn DeleteTrigger(&self, itrigger: u16) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DeleteTrigger)(windows_core::Interface::as_raw(self), itrigger).ok() } @@ -3408,16 +3408,16 @@ impl IScheduledWorkItem { } } pub unsafe fn GetRunTimes(&self, pstbegin: *const super::super::Foundation::SYSTEMTIME, pstend: *const super::super::Foundation::SYSTEMTIME, pcount: *mut u16, rgsttasktimes: *mut *mut super::super::Foundation::SYSTEMTIME) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRunTimes)(windows_core::Interface::as_raw(self), pstbegin, pstend, core::mem::transmute(pcount), core::mem::transmute(rgsttasktimes)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRunTimes)(windows_core::Interface::as_raw(self), pstbegin, pstend, pcount as _, rgsttasktimes as _).ok() } } pub unsafe fn GetNextRunTime(&self, pstnextrun: *mut super::super::Foundation::SYSTEMTIME) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNextRunTime)(windows_core::Interface::as_raw(self), core::mem::transmute(pstnextrun)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNextRunTime)(windows_core::Interface::as_raw(self), pstnextrun as _).ok() } } pub unsafe fn SetIdleWait(&self, widleminutes: u16, wdeadlineminutes: u16) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetIdleWait)(windows_core::Interface::as_raw(self), widleminutes, wdeadlineminutes).ok() } } pub unsafe fn GetIdleWait(&self, pwidleminutes: *mut u16, pwdeadlineminutes: *mut u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIdleWait)(windows_core::Interface::as_raw(self), core::mem::transmute(pwidleminutes), core::mem::transmute(pwdeadlineminutes)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIdleWait)(windows_core::Interface::as_raw(self), pwidleminutes as _, pwdeadlineminutes as _).ok() } } pub unsafe fn Run(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Run)(windows_core::Interface::as_raw(self)).ok() } @@ -3474,7 +3474,7 @@ impl IScheduledWorkItem { unsafe { (windows_core::Interface::vtable(self).SetWorkItemData)(windows_core::Interface::as_raw(self), cbdata, rgbdata).ok() } } pub unsafe fn GetWorkItemData(&self, pcbdata: *mut u16, prgbdata: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWorkItemData)(windows_core::Interface::as_raw(self), core::mem::transmute(pcbdata), core::mem::transmute(prgbdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWorkItemData)(windows_core::Interface::as_raw(self), pcbdata as _, prgbdata as _).ok() } } pub unsafe fn SetErrorRetryCount(&self, wretrycount: u16) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetErrorRetryCount)(windows_core::Interface::as_raw(self), wretrycount).ok() } @@ -3893,7 +3893,7 @@ impl ISessionStateChangeTrigger { unsafe { (windows_core::Interface::vtable(self).SetUserId)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(user)).ok() } } pub unsafe fn StateChange(&self, ptype: *mut TASK_SESSION_STATE_CHANGE_TYPE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).StateChange)(windows_core::Interface::as_raw(self), core::mem::transmute(ptype)).ok() } + unsafe { (windows_core::Interface::vtable(self).StateChange)(windows_core::Interface::as_raw(self), ptype as _).ok() } } pub unsafe fn SetStateChange(&self, r#type: TASK_SESSION_STATE_CHANGE_TYPE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetStateChange)(windows_core::Interface::as_raw(self), r#type).ok() } @@ -5092,7 +5092,7 @@ windows_core::imp::interface_hierarchy!(ITaskNamedValueCollection, windows_core: #[cfg(feature = "Win32_System_Com")] impl ITaskNamedValueCollection { pub unsafe fn Count(&self, pcount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Count)(windows_core::Interface::as_raw(self), core::mem::transmute(pcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).Count)(windows_core::Interface::as_raw(self), pcount as _).ok() } } pub unsafe fn get_Item(&self, index: i32) -> windows_core::Result { unsafe { @@ -5700,7 +5700,7 @@ windows_core::imp::interface_hierarchy!(ITaskSettings, windows_core::IUnknown, s #[cfg(feature = "Win32_System_Com")] impl ITaskSettings { pub unsafe fn AllowDemandStart(&self, pallowdemandstart: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AllowDemandStart)(windows_core::Interface::as_raw(self), core::mem::transmute(pallowdemandstart)).ok() } + unsafe { (windows_core::Interface::vtable(self).AllowDemandStart)(windows_core::Interface::as_raw(self), pallowdemandstart as _).ok() } } pub unsafe fn SetAllowDemandStart(&self, allowdemandstart: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetAllowDemandStart)(windows_core::Interface::as_raw(self), allowdemandstart).ok() } @@ -5712,37 +5712,37 @@ impl ITaskSettings { unsafe { (windows_core::Interface::vtable(self).SetRestartInterval)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(restartinterval)).ok() } } pub unsafe fn RestartCount(&self, prestartcount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RestartCount)(windows_core::Interface::as_raw(self), core::mem::transmute(prestartcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).RestartCount)(windows_core::Interface::as_raw(self), prestartcount as _).ok() } } pub unsafe fn SetRestartCount(&self, restartcount: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetRestartCount)(windows_core::Interface::as_raw(self), restartcount).ok() } } pub unsafe fn MultipleInstances(&self, ppolicy: *mut TASK_INSTANCES_POLICY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).MultipleInstances)(windows_core::Interface::as_raw(self), core::mem::transmute(ppolicy)).ok() } + unsafe { (windows_core::Interface::vtable(self).MultipleInstances)(windows_core::Interface::as_raw(self), ppolicy as _).ok() } } pub unsafe fn SetMultipleInstances(&self, policy: TASK_INSTANCES_POLICY) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetMultipleInstances)(windows_core::Interface::as_raw(self), policy).ok() } } pub unsafe fn StopIfGoingOnBatteries(&self, pstopifonbatteries: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).StopIfGoingOnBatteries)(windows_core::Interface::as_raw(self), core::mem::transmute(pstopifonbatteries)).ok() } + unsafe { (windows_core::Interface::vtable(self).StopIfGoingOnBatteries)(windows_core::Interface::as_raw(self), pstopifonbatteries as _).ok() } } pub unsafe fn SetStopIfGoingOnBatteries(&self, stopifonbatteries: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetStopIfGoingOnBatteries)(windows_core::Interface::as_raw(self), stopifonbatteries).ok() } } pub unsafe fn DisallowStartIfOnBatteries(&self, pdisallowstart: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DisallowStartIfOnBatteries)(windows_core::Interface::as_raw(self), core::mem::transmute(pdisallowstart)).ok() } + unsafe { (windows_core::Interface::vtable(self).DisallowStartIfOnBatteries)(windows_core::Interface::as_raw(self), pdisallowstart as _).ok() } } pub unsafe fn SetDisallowStartIfOnBatteries(&self, disallowstart: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetDisallowStartIfOnBatteries)(windows_core::Interface::as_raw(self), disallowstart).ok() } } pub unsafe fn AllowHardTerminate(&self, pallowhardterminate: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AllowHardTerminate)(windows_core::Interface::as_raw(self), core::mem::transmute(pallowhardterminate)).ok() } + unsafe { (windows_core::Interface::vtable(self).AllowHardTerminate)(windows_core::Interface::as_raw(self), pallowhardterminate as _).ok() } } pub unsafe fn SetAllowHardTerminate(&self, allowhardterminate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetAllowHardTerminate)(windows_core::Interface::as_raw(self), allowhardterminate).ok() } } pub unsafe fn StartWhenAvailable(&self, pstartwhenavailable: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).StartWhenAvailable)(windows_core::Interface::as_raw(self), core::mem::transmute(pstartwhenavailable)).ok() } + unsafe { (windows_core::Interface::vtable(self).StartWhenAvailable)(windows_core::Interface::as_raw(self), pstartwhenavailable as _).ok() } } pub unsafe fn SetStartWhenAvailable(&self, startwhenavailable: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetStartWhenAvailable)(windows_core::Interface::as_raw(self), startwhenavailable).ok() } @@ -5754,7 +5754,7 @@ impl ITaskSettings { unsafe { (windows_core::Interface::vtable(self).SetXmlText)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(text)).ok() } } pub unsafe fn RunOnlyIfNetworkAvailable(&self, prunonlyifnetworkavailable: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RunOnlyIfNetworkAvailable)(windows_core::Interface::as_raw(self), core::mem::transmute(prunonlyifnetworkavailable)).ok() } + unsafe { (windows_core::Interface::vtable(self).RunOnlyIfNetworkAvailable)(windows_core::Interface::as_raw(self), prunonlyifnetworkavailable as _).ok() } } pub unsafe fn SetRunOnlyIfNetworkAvailable(&self, runonlyifnetworkavailable: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetRunOnlyIfNetworkAvailable)(windows_core::Interface::as_raw(self), runonlyifnetworkavailable).ok() } @@ -5766,7 +5766,7 @@ impl ITaskSettings { unsafe { (windows_core::Interface::vtable(self).SetExecutionTimeLimit)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(executiontimelimit)).ok() } } pub unsafe fn Enabled(&self, penabled: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Enabled)(windows_core::Interface::as_raw(self), core::mem::transmute(penabled)).ok() } + unsafe { (windows_core::Interface::vtable(self).Enabled)(windows_core::Interface::as_raw(self), penabled as _).ok() } } pub unsafe fn SetEnabled(&self, enabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), enabled).ok() } @@ -5778,19 +5778,19 @@ impl ITaskSettings { unsafe { (windows_core::Interface::vtable(self).SetDeleteExpiredTaskAfter)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(expirationdelay)).ok() } } pub unsafe fn Priority(&self, ppriority: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Priority)(windows_core::Interface::as_raw(self), core::mem::transmute(ppriority)).ok() } + unsafe { (windows_core::Interface::vtable(self).Priority)(windows_core::Interface::as_raw(self), ppriority as _).ok() } } pub unsafe fn SetPriority(&self, priority: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetPriority)(windows_core::Interface::as_raw(self), priority).ok() } } pub unsafe fn Compatibility(&self, pcompatlevel: *mut TASK_COMPATIBILITY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Compatibility)(windows_core::Interface::as_raw(self), core::mem::transmute(pcompatlevel)).ok() } + unsafe { (windows_core::Interface::vtable(self).Compatibility)(windows_core::Interface::as_raw(self), pcompatlevel as _).ok() } } pub unsafe fn SetCompatibility(&self, compatlevel: TASK_COMPATIBILITY) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetCompatibility)(windows_core::Interface::as_raw(self), compatlevel).ok() } } pub unsafe fn Hidden(&self, phidden: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Hidden)(windows_core::Interface::as_raw(self), core::mem::transmute(phidden)).ok() } + unsafe { (windows_core::Interface::vtable(self).Hidden)(windows_core::Interface::as_raw(self), phidden as _).ok() } } pub unsafe fn SetHidden(&self, hidden: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetHidden)(windows_core::Interface::as_raw(self), hidden).ok() } @@ -5808,13 +5808,13 @@ impl ITaskSettings { unsafe { (windows_core::Interface::vtable(self).SetIdleSettings)(windows_core::Interface::as_raw(self), pidlesettings.param().abi()).ok() } } pub unsafe fn RunOnlyIfIdle(&self, prunonlyifidle: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RunOnlyIfIdle)(windows_core::Interface::as_raw(self), core::mem::transmute(prunonlyifidle)).ok() } + unsafe { (windows_core::Interface::vtable(self).RunOnlyIfIdle)(windows_core::Interface::as_raw(self), prunonlyifidle as _).ok() } } pub unsafe fn SetRunOnlyIfIdle(&self, runonlyifidle: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetRunOnlyIfIdle)(windows_core::Interface::as_raw(self), runonlyifidle).ok() } } pub unsafe fn WakeToRun(&self, pwake: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).WakeToRun)(windows_core::Interface::as_raw(self), core::mem::transmute(pwake)).ok() } + unsafe { (windows_core::Interface::vtable(self).WakeToRun)(windows_core::Interface::as_raw(self), pwake as _).ok() } } pub unsafe fn SetWakeToRun(&self, wake: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetWakeToRun)(windows_core::Interface::as_raw(self), wake).ok() } @@ -6239,13 +6239,13 @@ windows_core::imp::interface_hierarchy!(ITaskSettings2, windows_core::IUnknown, #[cfg(feature = "Win32_System_Com")] impl ITaskSettings2 { pub unsafe fn DisallowStartOnRemoteAppSession(&self, pdisallowstart: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DisallowStartOnRemoteAppSession)(windows_core::Interface::as_raw(self), core::mem::transmute(pdisallowstart)).ok() } + unsafe { (windows_core::Interface::vtable(self).DisallowStartOnRemoteAppSession)(windows_core::Interface::as_raw(self), pdisallowstart as _).ok() } } pub unsafe fn SetDisallowStartOnRemoteAppSession(&self, disallowstart: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetDisallowStartOnRemoteAppSession)(windows_core::Interface::as_raw(self), disallowstart).ok() } } pub unsafe fn UseUnifiedSchedulingEngine(&self, puseunifiedengine: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).UseUnifiedSchedulingEngine)(windows_core::Interface::as_raw(self), core::mem::transmute(puseunifiedengine)).ok() } + unsafe { (windows_core::Interface::vtable(self).UseUnifiedSchedulingEngine)(windows_core::Interface::as_raw(self), puseunifiedengine as _).ok() } } pub unsafe fn SetUseUnifiedSchedulingEngine(&self, useunifiedengine: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetUseUnifiedSchedulingEngine)(windows_core::Interface::as_raw(self), useunifiedengine).ok() } @@ -6322,13 +6322,13 @@ windows_core::imp::interface_hierarchy!(ITaskSettings3, windows_core::IUnknown, #[cfg(feature = "Win32_System_Com")] impl ITaskSettings3 { pub unsafe fn DisallowStartOnRemoteAppSession(&self, pdisallowstart: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DisallowStartOnRemoteAppSession)(windows_core::Interface::as_raw(self), core::mem::transmute(pdisallowstart)).ok() } + unsafe { (windows_core::Interface::vtable(self).DisallowStartOnRemoteAppSession)(windows_core::Interface::as_raw(self), pdisallowstart as _).ok() } } pub unsafe fn SetDisallowStartOnRemoteAppSession(&self, disallowstart: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetDisallowStartOnRemoteAppSession)(windows_core::Interface::as_raw(self), disallowstart).ok() } } pub unsafe fn UseUnifiedSchedulingEngine(&self, puseunifiedengine: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).UseUnifiedSchedulingEngine)(windows_core::Interface::as_raw(self), core::mem::transmute(puseunifiedengine)).ok() } + unsafe { (windows_core::Interface::vtable(self).UseUnifiedSchedulingEngine)(windows_core::Interface::as_raw(self), puseunifiedengine as _).ok() } } pub unsafe fn SetUseUnifiedSchedulingEngine(&self, useunifiedengine: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetUseUnifiedSchedulingEngine)(windows_core::Interface::as_raw(self), useunifiedengine).ok() } @@ -6352,7 +6352,7 @@ impl ITaskSettings3 { } } pub unsafe fn Volatile(&self, pvolatile: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Volatile)(windows_core::Interface::as_raw(self), core::mem::transmute(pvolatile)).ok() } + unsafe { (windows_core::Interface::vtable(self).Volatile)(windows_core::Interface::as_raw(self), pvolatile as _).ok() } } pub unsafe fn SetVolatile(&self, volatile: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetVolatile)(windows_core::Interface::as_raw(self), volatile).ok() } @@ -6479,7 +6479,7 @@ impl ITaskTrigger { unsafe { (windows_core::Interface::vtable(self).SetTrigger)(windows_core::Interface::as_raw(self), ptrigger).ok() } } pub unsafe fn GetTrigger(&self, ptrigger: *mut TASK_TRIGGER) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTrigger)(windows_core::Interface::as_raw(self), core::mem::transmute(ptrigger)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTrigger)(windows_core::Interface::as_raw(self), ptrigger as _).ok() } } pub unsafe fn GetTriggerString(&self) -> windows_core::Result { unsafe { @@ -6686,7 +6686,7 @@ windows_core::imp::interface_hierarchy!(ITrigger, windows_core::IUnknown, super: #[cfg(feature = "Win32_System_Com")] impl ITrigger { pub unsafe fn Type(&self, ptype: *mut TASK_TRIGGER_TYPE2) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Type)(windows_core::Interface::as_raw(self), core::mem::transmute(ptype)).ok() } + unsafe { (windows_core::Interface::vtable(self).Type)(windows_core::Interface::as_raw(self), ptype as _).ok() } } pub unsafe fn Id(&self, pid: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Id)(windows_core::Interface::as_raw(self), core::mem::transmute(pid)).ok() } @@ -6725,7 +6725,7 @@ impl ITrigger { unsafe { (windows_core::Interface::vtable(self).SetEndBoundary)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(end)).ok() } } pub unsafe fn Enabled(&self, penabled: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Enabled)(windows_core::Interface::as_raw(self), core::mem::transmute(penabled)).ok() } + unsafe { (windows_core::Interface::vtable(self).Enabled)(windows_core::Interface::as_raw(self), penabled as _).ok() } } pub unsafe fn SetEnabled(&self, enabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), enabled).ok() } @@ -6889,7 +6889,7 @@ windows_core::imp::interface_hierarchy!(ITriggerCollection, windows_core::IUnkno #[cfg(feature = "Win32_System_Com")] impl ITriggerCollection { pub unsafe fn Count(&self, pcount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Count)(windows_core::Interface::as_raw(self), core::mem::transmute(pcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).Count)(windows_core::Interface::as_raw(self), pcount as _).ok() } } pub unsafe fn get_Item(&self, index: i32) -> windows_core::Result { unsafe { @@ -7027,13 +7027,13 @@ windows_core::imp::interface_hierarchy!(IWeeklyTrigger, windows_core::IUnknown, #[cfg(feature = "Win32_System_Com")] impl IWeeklyTrigger { pub unsafe fn DaysOfWeek(&self, pdays: *mut i16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DaysOfWeek)(windows_core::Interface::as_raw(self), core::mem::transmute(pdays)).ok() } + unsafe { (windows_core::Interface::vtable(self).DaysOfWeek)(windows_core::Interface::as_raw(self), pdays as _).ok() } } pub unsafe fn SetDaysOfWeek(&self, days: i16) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetDaysOfWeek)(windows_core::Interface::as_raw(self), days).ok() } } pub unsafe fn WeeksInterval(&self, pweeks: *mut i16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).WeeksInterval)(windows_core::Interface::as_raw(self), core::mem::transmute(pweeks)).ok() } + unsafe { (windows_core::Interface::vtable(self).WeeksInterval)(windows_core::Interface::as_raw(self), pweeks as _).ok() } } pub unsafe fn SetWeeksInterval(&self, weeks: i16) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetWeeksInterval)(windows_core::Interface::as_raw(self), weeks).ok() } 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 d671950cd1..e7b5863468 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Threading/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Threading/mod.rs @@ -1,24 +1,24 @@ #[inline] pub unsafe fn AcquireSRWLockExclusive(srwlock: *mut SRWLOCK) { windows_targets::link!("kernel32.dll" "system" fn AcquireSRWLockExclusive(srwlock : *mut SRWLOCK)); - unsafe { AcquireSRWLockExclusive(core::mem::transmute(srwlock)) } + unsafe { AcquireSRWLockExclusive(srwlock as _) } } #[inline] pub unsafe fn AcquireSRWLockShared(srwlock: *mut SRWLOCK) { windows_targets::link!("kernel32.dll" "system" fn AcquireSRWLockShared(srwlock : *mut SRWLOCK)); - unsafe { AcquireSRWLockShared(core::mem::transmute(srwlock)) } + unsafe { AcquireSRWLockShared(srwlock as _) } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { AddIntegrityLabelToBoundaryDescriptor(core::mem::transmute(boundarydescriptor), integritylabel).ok() } + unsafe { AddIntegrityLabelToBoundaryDescriptor(boundarydescriptor as _, integritylabel).ok() } } #[cfg(feature = "Win32_Security")] #[inline] 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); - unsafe { AddSIDToBoundaryDescriptor(core::mem::transmute(boundarydescriptor), requiredsid).ok() } + unsafe { AddSIDToBoundaryDescriptor(boundarydescriptor as _, requiredsid).ok() } } #[inline] pub unsafe fn AttachThreadInput(idattach: u32, idattachto: u32, fattach: bool) -> super::super::Foundation::BOOL { @@ -28,7 +28,7 @@ pub unsafe fn AttachThreadInput(idattach: u32, idattachto: u32, fattach: bool) - #[inline] 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); - unsafe { AvQuerySystemResponsiveness(avrthandle, core::mem::transmute(systemresponsivenessvalue)).ok() } + unsafe { AvQuerySystemResponsiveness(avrthandle, systemresponsivenessvalue as _).ok() } } #[inline] pub unsafe fn AvRevertMmThreadCharacteristics(avrthandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -38,7 +38,7 @@ pub unsafe fn AvRevertMmThreadCharacteristics(avrthandle: super::super::Foundati #[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); - unsafe { AvRtCreateThreadOrderingGroup(core::mem::transmute(context), period, core::mem::transmute(threadorderingguid), core::mem::transmute(timeout.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { AvRtCreateThreadOrderingGroup(context as _, period, threadorderingguid as _, timeout.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -46,7 +46,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); - unsafe { AvRtCreateThreadOrderingGroupExA(core::mem::transmute(context), period, core::mem::transmute(threadorderingguid), core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), taskname.param().abi()).ok() } + unsafe { AvRtCreateThreadOrderingGroupExA(context as _, period, threadorderingguid as _, timeout.unwrap_or(core::mem::zeroed()) as _, 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<()> @@ -54,7 +54,7 @@ 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); - unsafe { AvRtCreateThreadOrderingGroupExW(core::mem::transmute(context), period, core::mem::transmute(threadorderingguid), core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), taskname.param().abi()).ok() } + unsafe { AvRtCreateThreadOrderingGroupExW(context as _, period, threadorderingguid as _, timeout.unwrap_or(core::mem::zeroed()) as _, taskname.param().abi()).ok() } } #[inline] pub unsafe fn AvRtDeleteThreadOrderingGroup(context: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -64,7 +64,7 @@ pub unsafe fn AvRtDeleteThreadOrderingGroup(context: super::super::Foundation::H #[inline] pub unsafe fn AvRtJoinThreadOrderingGroup(context: *mut super::super::Foundation::HANDLE, threadorderingguid: *const windows_core::GUID, before: bool) -> windows_core::Result<()> { windows_targets::link!("avrt.dll" "system" fn AvRtJoinThreadOrderingGroup(context : *mut super::super::Foundation:: HANDLE, threadorderingguid : *const windows_core::GUID, before : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - unsafe { AvRtJoinThreadOrderingGroup(core::mem::transmute(context), threadorderingguid, before.into()).ok() } + unsafe { AvRtJoinThreadOrderingGroup(context as _, threadorderingguid, before.into()).ok() } } #[inline] pub unsafe fn AvRtLeaveThreadOrderingGroup(context: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -83,7 +83,7 @@ where P1: windows_core::Param, { windows_targets::link!("avrt.dll" "system" fn AvSetMmMaxThreadCharacteristicsA(firsttask : windows_core::PCSTR, secondtask : windows_core::PCSTR, taskindex : *mut u32) -> super::super::Foundation:: HANDLE); - let result__ = unsafe { AvSetMmMaxThreadCharacteristicsA(firsttask.param().abi(), secondtask.param().abi(), core::mem::transmute(taskindex)) }; + let result__ = unsafe { AvSetMmMaxThreadCharacteristicsA(firsttask.param().abi(), secondtask.param().abi(), taskindex as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -93,7 +93,7 @@ where P1: windows_core::Param, { windows_targets::link!("avrt.dll" "system" fn AvSetMmMaxThreadCharacteristicsW(firsttask : windows_core::PCWSTR, secondtask : windows_core::PCWSTR, taskindex : *mut u32) -> super::super::Foundation:: HANDLE); - let result__ = unsafe { AvSetMmMaxThreadCharacteristicsW(firsttask.param().abi(), secondtask.param().abi(), core::mem::transmute(taskindex)) }; + let result__ = unsafe { AvSetMmMaxThreadCharacteristicsW(firsttask.param().abi(), secondtask.param().abi(), taskindex as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -102,7 +102,7 @@ where P0: windows_core::Param, { windows_targets::link!("avrt.dll" "system" fn AvSetMmThreadCharacteristicsA(taskname : windows_core::PCSTR, taskindex : *mut u32) -> super::super::Foundation:: HANDLE); - let result__ = unsafe { AvSetMmThreadCharacteristicsA(taskname.param().abi(), core::mem::transmute(taskindex)) }; + let result__ = unsafe { AvSetMmThreadCharacteristicsA(taskname.param().abi(), taskindex as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -111,7 +111,7 @@ where P0: windows_core::Param, { windows_targets::link!("avrt.dll" "system" fn AvSetMmThreadCharacteristicsW(taskname : windows_core::PCWSTR, taskindex : *mut u32) -> super::super::Foundation:: HANDLE); - let result__ = unsafe { AvSetMmThreadCharacteristicsW(taskname.param().abi(), core::mem::transmute(taskindex)) }; + let result__ = unsafe { AvSetMmThreadCharacteristicsW(taskname.param().abi(), taskindex as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -132,7 +132,7 @@ pub unsafe fn CancelThreadpoolIo(pio: PTP_IO) { #[inline] 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); - unsafe { CancelTimerQueueTimer(core::mem::transmute(timerqueue.unwrap_or(core::mem::zeroed())), timer) } + unsafe { CancelTimerQueueTimer(timerqueue.unwrap_or(core::mem::zeroed()) as _, timer) } } #[inline] pub unsafe fn CancelWaitableTimer(htimer: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -142,7 +142,7 @@ pub unsafe fn CancelWaitableTimer(htimer: super::super::Foundation::HANDLE) -> w #[inline] 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); - unsafe { ChangeTimerQueueTimer(core::mem::transmute(timerqueue.unwrap_or(core::mem::zeroed())), core::mem::transmute(timer), duetime, period).ok() } + unsafe { ChangeTimerQueueTimer(timerqueue.unwrap_or(core::mem::zeroed()) as _, timer as _, duetime, period).ok() } } #[inline] pub unsafe fn ClosePrivateNamespace(handle: super::super::Foundation::HANDLE, flags: u32) -> bool { @@ -162,7 +162,7 @@ pub unsafe fn CloseThreadpoolCleanupGroup(ptpcg: PTP_CLEANUP_GROUP) { #[inline] pub unsafe fn CloseThreadpoolCleanupGroupMembers(ptpcg: PTP_CLEANUP_GROUP, fcancelpendingcallbacks: bool, pvcleanupcontext: Option<*mut core::ffi::c_void>) { windows_targets::link!("kernel32.dll" "system" fn CloseThreadpoolCleanupGroupMembers(ptpcg : PTP_CLEANUP_GROUP, fcancelpendingcallbacks : super::super::Foundation:: BOOL, pvcleanupcontext : *mut core::ffi::c_void)); - unsafe { CloseThreadpoolCleanupGroupMembers(ptpcg, fcancelpendingcallbacks.into(), core::mem::transmute(pvcleanupcontext.unwrap_or(core::mem::zeroed()))) } + unsafe { CloseThreadpoolCleanupGroupMembers(ptpcg, fcancelpendingcallbacks.into(), pvcleanupcontext.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CloseThreadpoolIo(pio: PTP_IO) { @@ -192,12 +192,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); - unsafe { ConvertThreadToFiber(core::mem::transmute(lpparameter.unwrap_or(core::mem::zeroed()))) } + unsafe { ConvertThreadToFiber(lpparameter.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { ConvertThreadToFiberEx(core::mem::transmute(lpparameter.unwrap_or(core::mem::zeroed())), dwflags) } + unsafe { ConvertThreadToFiberEx(lpparameter.unwrap_or(core::mem::zeroed()) as _, dwflags) } } #[inline] pub unsafe fn CreateBoundaryDescriptorA(name: P0, flags: u32) -> windows_core::Result @@ -223,7 +223,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__ = unsafe { CreateEventA(core::mem::transmute(lpeventattributes.unwrap_or(core::mem::zeroed())), bmanualreset.into(), binitialstate.into(), lpname.param().abi()) }; + let result__ = unsafe { CreateEventA(lpeventattributes.unwrap_or(core::mem::zeroed()) as _, bmanualreset.into(), binitialstate.into(), lpname.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -233,7 +233,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__ = unsafe { CreateEventExA(core::mem::transmute(lpeventattributes.unwrap_or(core::mem::zeroed())), lpname.param().abi(), dwflags, dwdesiredaccess) }; + let result__ = unsafe { CreateEventExA(lpeventattributes.unwrap_or(core::mem::zeroed()) as _, lpname.param().abi(), dwflags, dwdesiredaccess) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -243,7 +243,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__ = unsafe { CreateEventExW(core::mem::transmute(lpeventattributes.unwrap_or(core::mem::zeroed())), lpname.param().abi(), dwflags, dwdesiredaccess) }; + let result__ = unsafe { CreateEventExW(lpeventattributes.unwrap_or(core::mem::zeroed()) as _, lpname.param().abi(), dwflags, dwdesiredaccess) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -253,18 +253,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__ = unsafe { CreateEventW(core::mem::transmute(lpeventattributes.unwrap_or(core::mem::zeroed())), bmanualreset.into(), binitialstate.into(), lpname.param().abi()) }; + let result__ = unsafe { CreateEventW(lpeventattributes.unwrap_or(core::mem::zeroed()) as _, bmanualreset.into(), binitialstate.into(), 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); - unsafe { CreateFiber(dwstacksize, lpstartaddress, core::mem::transmute(lpparameter.unwrap_or(core::mem::zeroed()))) } + unsafe { CreateFiber(dwstacksize, lpstartaddress, lpparameter.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { CreateFiberEx(dwstackcommitsize, dwstackreservesize, dwflags, lpstartaddress, core::mem::transmute(lpparameter.unwrap_or(core::mem::zeroed()))) } + unsafe { CreateFiberEx(dwstackcommitsize, dwstackreservesize, dwflags, lpstartaddress, lpparameter.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -273,7 +273,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__ = unsafe { CreateMutexA(core::mem::transmute(lpmutexattributes.unwrap_or(core::mem::zeroed())), binitialowner.into(), lpname.param().abi()) }; + let result__ = unsafe { CreateMutexA(lpmutexattributes.unwrap_or(core::mem::zeroed()) as _, binitialowner.into(), lpname.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -283,7 +283,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__ = unsafe { CreateMutexExA(core::mem::transmute(lpmutexattributes.unwrap_or(core::mem::zeroed())), lpname.param().abi(), dwflags, dwdesiredaccess) }; + let result__ = unsafe { CreateMutexExA(lpmutexattributes.unwrap_or(core::mem::zeroed()) as _, lpname.param().abi(), dwflags, dwdesiredaccess) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -293,7 +293,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__ = unsafe { CreateMutexExW(core::mem::transmute(lpmutexattributes.unwrap_or(core::mem::zeroed())), lpname.param().abi(), dwflags, dwdesiredaccess) }; + let result__ = unsafe { CreateMutexExW(lpmutexattributes.unwrap_or(core::mem::zeroed()) as _, lpname.param().abi(), dwflags, dwdesiredaccess) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -303,7 +303,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__ = unsafe { CreateMutexW(core::mem::transmute(lpmutexattributes.unwrap_or(core::mem::zeroed())), binitialowner.into(), lpname.param().abi()) }; + let result__ = unsafe { CreateMutexW(lpmutexattributes.unwrap_or(core::mem::zeroed()) as _, binitialowner.into(), lpname.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -313,7 +313,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__ = unsafe { CreatePrivateNamespaceA(core::mem::transmute(lpprivatenamespaceattributes.unwrap_or(core::mem::zeroed())), lpboundarydescriptor, lpaliasprefix.param().abi()) }; + let result__ = unsafe { CreatePrivateNamespaceA(lpprivatenamespaceattributes.unwrap_or(core::mem::zeroed()) as _, lpboundarydescriptor, lpaliasprefix.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -323,7 +323,7 @@ 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); - unsafe { CreatePrivateNamespaceW(core::mem::transmute(lpprivatenamespaceattributes.unwrap_or(core::mem::zeroed())), lpboundarydescriptor, lpaliasprefix.param().abi()) } + unsafe { CreatePrivateNamespaceW(lpprivatenamespaceattributes.unwrap_or(core::mem::zeroed()) as _, lpboundarydescriptor, lpaliasprefix.param().abi()) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -333,7 +333,7 @@ where 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); - unsafe { 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.into(), dwcreationflags, core::mem::transmute(lpenvironment.unwrap_or(core::mem::zeroed())), lpcurrentdirectory.param().abi(), lpstartupinfo, core::mem::transmute(lpprocessinformation)).ok() } + unsafe { CreateProcessA(lpapplicationname.param().abi(), lpcommandline.unwrap_or(core::mem::zeroed()) as _, lpprocessattributes.unwrap_or(core::mem::zeroed()) as _, lpthreadattributes.unwrap_or(core::mem::zeroed()) as _, binherithandles.into(), dwcreationflags, lpenvironment.unwrap_or(core::mem::zeroed()) as _, lpcurrentdirectory.param().abi(), lpstartupinfo, lpprocessinformation as _).ok() } } #[cfg(feature = "Win32_Security")] #[inline] @@ -343,22 +343,7 @@ where 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); - unsafe { - CreateProcessAsUserA( - core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), - 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.into(), - dwcreationflags, - core::mem::transmute(lpenvironment.unwrap_or(core::mem::zeroed())), - lpcurrentdirectory.param().abi(), - lpstartupinfo, - core::mem::transmute(lpprocessinformation), - ) - .ok() - } + unsafe { CreateProcessAsUserA(htoken.unwrap_or(core::mem::zeroed()) as _, lpapplicationname.param().abi(), lpcommandline.unwrap_or(core::mem::zeroed()) as _, lpprocessattributes.unwrap_or(core::mem::zeroed()) as _, lpthreadattributes.unwrap_or(core::mem::zeroed()) as _, binherithandles.into(), dwcreationflags, lpenvironment.unwrap_or(core::mem::zeroed()) as _, lpcurrentdirectory.param().abi(), lpstartupinfo, lpprocessinformation as _).ok() } } #[cfg(feature = "Win32_Security")] #[inline] @@ -368,22 +353,7 @@ where 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); - unsafe { - CreateProcessAsUserW( - core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), - 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.into(), - dwcreationflags, - core::mem::transmute(lpenvironment.unwrap_or(core::mem::zeroed())), - lpcurrentdirectory.param().abi(), - lpstartupinfo, - core::mem::transmute(lpprocessinformation), - ) - .ok() - } + unsafe { CreateProcessAsUserW(htoken.unwrap_or(core::mem::zeroed()) as _, lpapplicationname.param().abi(), lpcommandline.unwrap_or(core::mem::zeroed()) as _, lpprocessattributes.unwrap_or(core::mem::zeroed()) as _, lpthreadattributes.unwrap_or(core::mem::zeroed()) as _, binherithandles.into(), dwcreationflags, lpenvironment.unwrap_or(core::mem::zeroed()) as _, lpcurrentdirectory.param().abi(), lpstartupinfo, lpprocessinformation as _).ok() } } #[cfg(feature = "Win32_Security")] #[inline] @@ -393,7 +363,7 @@ where 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); - unsafe { 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.into(), dwcreationflags, core::mem::transmute(lpenvironment.unwrap_or(core::mem::zeroed())), lpcurrentdirectory.param().abi(), lpstartupinfo, core::mem::transmute(lpprocessinformation)).ok() } + unsafe { CreateProcessW(lpapplicationname.param().abi(), lpcommandline.unwrap_or(core::mem::zeroed()) as _, lpprocessattributes.unwrap_or(core::mem::zeroed()) as _, lpthreadattributes.unwrap_or(core::mem::zeroed()) as _, binherithandles.into(), dwcreationflags, lpenvironment.unwrap_or(core::mem::zeroed()) as _, lpcurrentdirectory.param().abi(), lpstartupinfo, lpprocessinformation as _).ok() } } #[inline] 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<()> @@ -405,7 +375,7 @@ 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); - unsafe { CreateProcessWithLogonW(lpusername.param().abi(), lpdomain.param().abi(), lppassword.param().abi(), dwlogonflags, lpapplicationname.param().abi(), core::mem::transmute(lpcommandline.unwrap_or(core::mem::zeroed())), dwcreationflags, core::mem::transmute(lpenvironment.unwrap_or(core::mem::zeroed())), lpcurrentdirectory.param().abi(), lpstartupinfo, core::mem::transmute(lpprocessinformation)).ok() } + unsafe { CreateProcessWithLogonW(lpusername.param().abi(), lpdomain.param().abi(), lppassword.param().abi(), dwlogonflags, lpapplicationname.param().abi(), lpcommandline.unwrap_or(core::mem::zeroed()) as _, dwcreationflags, lpenvironment.unwrap_or(core::mem::zeroed()) as _, lpcurrentdirectory.param().abi(), lpstartupinfo, lpprocessinformation as _).ok() } } #[inline] 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<()> @@ -414,20 +384,20 @@ where 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); - unsafe { CreateProcessWithTokenW(htoken, dwlogonflags, lpapplicationname.param().abi(), core::mem::transmute(lpcommandline.unwrap_or(core::mem::zeroed())), dwcreationflags, core::mem::transmute(lpenvironment.unwrap_or(core::mem::zeroed())), lpcurrentdirectory.param().abi(), lpstartupinfo, core::mem::transmute(lpprocessinformation)).ok() } + unsafe { CreateProcessWithTokenW(htoken, dwlogonflags, lpapplicationname.param().abi(), lpcommandline.unwrap_or(core::mem::zeroed()) as _, dwcreationflags, lpenvironment.unwrap_or(core::mem::zeroed()) as _, lpcurrentdirectory.param().abi(), lpstartupinfo, lpprocessinformation as _).ok() } } #[cfg(feature = "Win32_Security")] #[inline] 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__ = unsafe { CreateRemoteThread(hprocess, core::mem::transmute(lpthreadattributes.unwrap_or(core::mem::zeroed())), dwstacksize, lpstartaddress, core::mem::transmute(lpparameter.unwrap_or(core::mem::zeroed())), dwcreationflags, core::mem::transmute(lpthreadid.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { CreateRemoteThread(hprocess, lpthreadattributes.unwrap_or(core::mem::zeroed()) as _, dwstacksize, lpstartaddress, lpparameter.unwrap_or(core::mem::zeroed()) as _, dwcreationflags, lpthreadid.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] #[inline] 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__ = unsafe { CreateRemoteThreadEx(hprocess, core::mem::transmute(lpthreadattributes.unwrap_or(core::mem::zeroed())), dwstacksize, lpstartaddress, core::mem::transmute(lpparameter.unwrap_or(core::mem::zeroed())), dwcreationflags, core::mem::transmute(lpattributelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpthreadid.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { CreateRemoteThreadEx(hprocess, lpthreadattributes.unwrap_or(core::mem::zeroed()) as _, dwstacksize, lpstartaddress, lpparameter.unwrap_or(core::mem::zeroed()) as _, dwcreationflags, lpattributelist.unwrap_or(core::mem::zeroed()) as _, lpthreadid.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -437,7 +407,7 @@ 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__ = unsafe { CreateSemaphoreA(core::mem::transmute(lpsemaphoreattributes.unwrap_or(core::mem::zeroed())), linitialcount, lmaximumcount, lpname.param().abi()) }; + let result__ = unsafe { CreateSemaphoreA(lpsemaphoreattributes.unwrap_or(core::mem::zeroed()) as _, linitialcount, lmaximumcount, lpname.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -447,7 +417,7 @@ 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__ = unsafe { CreateSemaphoreExA(core::mem::transmute(lpsemaphoreattributes.unwrap_or(core::mem::zeroed())), linitialcount, lmaximumcount, lpname.param().abi(), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), dwdesiredaccess) }; + let result__ = unsafe { CreateSemaphoreExA(lpsemaphoreattributes.unwrap_or(core::mem::zeroed()) as _, linitialcount, lmaximumcount, lpname.param().abi(), dwflags.unwrap_or(core::mem::zeroed()) as _, dwdesiredaccess) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -457,7 +427,7 @@ 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__ = unsafe { CreateSemaphoreExW(core::mem::transmute(lpsemaphoreattributes.unwrap_or(core::mem::zeroed())), linitialcount, lmaximumcount, lpname.param().abi(), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), dwdesiredaccess) }; + let result__ = unsafe { CreateSemaphoreExW(lpsemaphoreattributes.unwrap_or(core::mem::zeroed()) as _, linitialcount, lmaximumcount, lpname.param().abi(), dwflags.unwrap_or(core::mem::zeroed()) as _, dwdesiredaccess) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -467,20 +437,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__ = unsafe { CreateSemaphoreW(core::mem::transmute(lpsemaphoreattributes.unwrap_or(core::mem::zeroed())), linitialcount, lmaximumcount, lpname.param().abi()) }; + let result__ = unsafe { CreateSemaphoreW(lpsemaphoreattributes.unwrap_or(core::mem::zeroed()) as _, linitialcount, lmaximumcount, lpname.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn CreateThread(lpthreadattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, dwstacksize: usize, lpstartaddress: LPTHREAD_START_ROUTINE, lpparameter: Option<*const core::ffi::c_void>, dwcreationflags: THREAD_CREATION_FLAGS, lpthreadid: Option<*mut u32>) -> windows_core::Result { windows_targets::link!("kernel32.dll" "system" fn CreateThread(lpthreadattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, dwstacksize : usize, lpstartaddress : LPTHREAD_START_ROUTINE, lpparameter : *const core::ffi::c_void, dwcreationflags : THREAD_CREATION_FLAGS, lpthreadid : *mut u32) -> super::super::Foundation:: HANDLE); - let result__ = unsafe { CreateThread(core::mem::transmute(lpthreadattributes.unwrap_or(core::mem::zeroed())), dwstacksize, lpstartaddress, core::mem::transmute(lpparameter.unwrap_or(core::mem::zeroed())), dwcreationflags, core::mem::transmute(lpthreadid.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { CreateThread(lpthreadattributes.unwrap_or(core::mem::zeroed()) as _, dwstacksize, lpstartaddress, lpparameter.unwrap_or(core::mem::zeroed()) as _, dwcreationflags, lpthreadid.unwrap_or(core::mem::zeroed()) as _) }; (!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__ = unsafe { CreateThreadpool(core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { CreateThreadpool(reserved.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -492,25 +462,25 @@ pub unsafe fn CreateThreadpoolCleanupGroup() -> windows_core::Result, 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__ = unsafe { CreateThreadpoolIo(fl, pfnio, core::mem::transmute(pv.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbe.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { CreateThreadpoolIo(fl, pfnio, pv.unwrap_or(core::mem::zeroed()) as _, pcbe.unwrap_or(core::mem::zeroed()) as _) }; (!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__ = unsafe { CreateThreadpoolTimer(pfnti, core::mem::transmute(pv.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbe.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { CreateThreadpoolTimer(pfnti, pv.unwrap_or(core::mem::zeroed()) as _, pcbe.unwrap_or(core::mem::zeroed()) as _) }; (!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__ = unsafe { CreateThreadpoolWait(pfnwa, core::mem::transmute(pv.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbe.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { CreateThreadpoolWait(pfnwa, pv.unwrap_or(core::mem::zeroed()) as _, pcbe.unwrap_or(core::mem::zeroed()) as _) }; (!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__ = unsafe { CreateThreadpoolWork(pfnwk, core::mem::transmute(pv.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbe.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { CreateThreadpoolWork(pfnwk, pv.unwrap_or(core::mem::zeroed()) as _, pcbe.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -522,17 +492,17 @@ pub unsafe fn CreateTimerQueue() -> windows_core::Result, 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); - unsafe { CreateTimerQueueTimer(core::mem::transmute(phnewtimer), core::mem::transmute(timerqueue.unwrap_or(core::mem::zeroed())), callback, core::mem::transmute(parameter.unwrap_or(core::mem::zeroed())), duetime, period, flags).ok() } + unsafe { CreateTimerQueueTimer(phnewtimer as _, timerqueue.unwrap_or(core::mem::zeroed()) as _, callback, parameter.unwrap_or(core::mem::zeroed()) as _, duetime, period, flags).ok() } } #[inline] pub unsafe fn CreateUmsCompletionList(umscompletionlist: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn CreateUmsCompletionList(umscompletionlist : *mut *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { CreateUmsCompletionList(core::mem::transmute(umscompletionlist)).ok() } + unsafe { CreateUmsCompletionList(umscompletionlist as _).ok() } } #[inline] pub unsafe fn CreateUmsThreadContext(lpumsthread: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn CreateUmsThreadContext(lpumsthread : *mut *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { CreateUmsThreadContext(core::mem::transmute(lpumsthread)).ok() } + unsafe { CreateUmsThreadContext(lpumsthread as _).ok() } } #[cfg(feature = "Win32_Security")] #[inline] @@ -541,7 +511,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); - unsafe { CreateWaitableTimerA(core::mem::transmute(lptimerattributes.unwrap_or(core::mem::zeroed())), bmanualreset.into(), lptimername.param().abi()) } + unsafe { CreateWaitableTimerA(lptimerattributes.unwrap_or(core::mem::zeroed()) as _, bmanualreset.into(), lptimername.param().abi()) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -550,7 +520,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); - unsafe { CreateWaitableTimerExA(core::mem::transmute(lptimerattributes.unwrap_or(core::mem::zeroed())), lptimername.param().abi(), dwflags, dwdesiredaccess) } + unsafe { CreateWaitableTimerExA(lptimerattributes.unwrap_or(core::mem::zeroed()) as _, lptimername.param().abi(), dwflags, dwdesiredaccess) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -559,7 +529,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__ = unsafe { CreateWaitableTimerExW(core::mem::transmute(lptimerattributes.unwrap_or(core::mem::zeroed())), lptimername.param().abi(), dwflags, dwdesiredaccess) }; + let result__ = unsafe { CreateWaitableTimerExW(lptimerattributes.unwrap_or(core::mem::zeroed()) as _, lptimername.param().abi(), dwflags, dwdesiredaccess) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -569,7 +539,7 @@ 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__ = unsafe { CreateWaitableTimerW(core::mem::transmute(lptimerattributes.unwrap_or(core::mem::zeroed())), bmanualreset.into(), lptimername.param().abi()) }; + let result__ = unsafe { CreateWaitableTimerW(lptimerattributes.unwrap_or(core::mem::zeroed()) as _, bmanualreset.into(), lptimername.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -581,7 +551,7 @@ pub unsafe fn DeleteBoundaryDescriptor(boundarydescriptor: super::super::Foundat #[inline] pub unsafe fn DeleteCriticalSection(lpcriticalsection: *mut CRITICAL_SECTION) { windows_targets::link!("kernel32.dll" "system" fn DeleteCriticalSection(lpcriticalsection : *mut CRITICAL_SECTION)); - unsafe { DeleteCriticalSection(core::mem::transmute(lpcriticalsection)) } + unsafe { DeleteCriticalSection(lpcriticalsection as _) } } #[inline] pub unsafe fn DeleteFiber(lpfiber: *const core::ffi::c_void) { @@ -591,12 +561,12 @@ pub unsafe fn DeleteFiber(lpfiber: *const core::ffi::c_void) { #[inline] pub unsafe fn DeleteProcThreadAttributeList(lpattributelist: LPPROC_THREAD_ATTRIBUTE_LIST) { windows_targets::link!("kernel32.dll" "system" fn DeleteProcThreadAttributeList(lpattributelist : LPPROC_THREAD_ATTRIBUTE_LIST)); - unsafe { DeleteProcThreadAttributeList(core::mem::transmute(lpattributelist)) } + unsafe { DeleteProcThreadAttributeList(lpattributelist as _) } } #[inline] pub unsafe fn DeleteSynchronizationBarrier(lpbarrier: *mut SYNCHRONIZATION_BARRIER) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn DeleteSynchronizationBarrier(lpbarrier : *mut SYNCHRONIZATION_BARRIER) -> super::super::Foundation:: BOOL); - unsafe { DeleteSynchronizationBarrier(core::mem::transmute(lpbarrier)) } + unsafe { DeleteSynchronizationBarrier(lpbarrier as _) } } #[inline] pub unsafe fn DeleteTimerQueue(timerqueue: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -606,12 +576,12 @@ pub unsafe fn DeleteTimerQueue(timerqueue: super::super::Foundation::HANDLE) -> #[inline] 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); - unsafe { DeleteTimerQueueEx(timerqueue, core::mem::transmute(completionevent.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DeleteTimerQueueEx(timerqueue, completionevent.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { DeleteTimerQueueTimer(core::mem::transmute(timerqueue.unwrap_or(core::mem::zeroed())), timer, core::mem::transmute(completionevent.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DeleteTimerQueueTimer(timerqueue.unwrap_or(core::mem::zeroed()) as _, timer, completionevent.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn DeleteUmsCompletionList(umscompletionlist: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -626,7 +596,7 @@ pub unsafe fn DeleteUmsThreadContext(umsthread: *const core::ffi::c_void) -> win #[inline] pub unsafe fn DequeueUmsCompletionListItems(umscompletionlist: *const core::ffi::c_void, waittimeout: u32, umsthreadlist: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn DequeueUmsCompletionListItems(umscompletionlist : *const core::ffi::c_void, waittimeout : u32, umsthreadlist : *mut *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { DequeueUmsCompletionListItems(umscompletionlist, waittimeout, core::mem::transmute(umsthreadlist)).ok() } + unsafe { DequeueUmsCompletionListItems(umscompletionlist, waittimeout, umsthreadlist as _).ok() } } #[inline] pub unsafe fn DisassociateCurrentThreadFromCallback(pci: PTP_CALLBACK_INSTANCE) { @@ -637,12 +607,12 @@ pub unsafe fn DisassociateCurrentThreadFromCallback(pci: PTP_CALLBACK_INSTANCE) #[inline] pub unsafe fn EnterCriticalSection(lpcriticalsection: *mut CRITICAL_SECTION) { windows_targets::link!("kernel32.dll" "system" fn EnterCriticalSection(lpcriticalsection : *mut CRITICAL_SECTION)); - unsafe { EnterCriticalSection(core::mem::transmute(lpcriticalsection)) } + unsafe { EnterCriticalSection(lpcriticalsection as _) } } #[inline] pub unsafe fn EnterSynchronizationBarrier(lpbarrier: *mut SYNCHRONIZATION_BARRIER, dwflags: u32) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn EnterSynchronizationBarrier(lpbarrier : *mut SYNCHRONIZATION_BARRIER, dwflags : u32) -> super::super::Foundation:: BOOL); - unsafe { EnterSynchronizationBarrier(core::mem::transmute(lpbarrier), dwflags) } + unsafe { EnterSynchronizationBarrier(lpbarrier as _, dwflags) } } #[cfg(feature = "Win32_System_SystemServices")] #[inline] @@ -653,7 +623,7 @@ pub unsafe fn EnterUmsSchedulingMode(schedulerstartupinfo: *const UMS_SCHEDULER_ #[inline] pub unsafe fn ExecuteUmsThread(umsthread: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn ExecuteUmsThread(umsthread : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { ExecuteUmsThread(core::mem::transmute(umsthread)).ok() } + unsafe { ExecuteUmsThread(umsthread as _).ok() } } #[inline] pub unsafe fn ExitProcess(uexitcode: u32) -> ! { @@ -668,7 +638,7 @@ pub unsafe fn ExitThread(dwexitcode: u32) -> ! { #[inline] pub unsafe fn FlsAlloc(lpcallback: Option) -> u32 { windows_targets::link!("kernel32.dll" "system" fn FlsAlloc(lpcallback : PFLS_CALLBACK_FUNCTION) -> u32); - unsafe { FlsAlloc(core::mem::transmute(lpcallback.unwrap_or(core::mem::zeroed()))) } + unsafe { FlsAlloc(lpcallback.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn FlsFree(dwflsindex: u32) -> windows_core::Result<()> { @@ -683,7 +653,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); - unsafe { FlsSetValue(dwflsindex, core::mem::transmute(lpflsdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { FlsSetValue(dwflsindex, lpflsdata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn FlushProcessWriteBuffers() { @@ -743,7 +713,7 @@ pub unsafe fn GetCurrentThreadId() -> u32 { #[inline] pub unsafe fn GetCurrentThreadStackLimits(lowlimit: *mut usize, highlimit: *mut usize) { windows_targets::link!("kernel32.dll" "system" fn GetCurrentThreadStackLimits(lowlimit : *mut usize, highlimit : *mut usize)); - unsafe { GetCurrentThreadStackLimits(core::mem::transmute(lowlimit), core::mem::transmute(highlimit)) } + unsafe { GetCurrentThreadStackLimits(lowlimit as _, highlimit as _) } } #[inline] pub unsafe fn GetCurrentUmsThread() -> *mut core::ffi::c_void { @@ -753,12 +723,12 @@ pub unsafe fn GetCurrentUmsThread() -> *mut core::ffi::c_void { #[inline] 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); - unsafe { GetExitCodeProcess(hprocess, core::mem::transmute(lpexitcode)).ok() } + unsafe { GetExitCodeProcess(hprocess, lpexitcode as _).ok() } } #[inline] 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); - unsafe { GetExitCodeThread(hthread, core::mem::transmute(lpexitcode)).ok() } + unsafe { GetExitCodeThread(hthread, lpexitcode as _).ok() } } #[inline] pub unsafe fn GetGuiResources(hprocess: super::super::Foundation::HANDLE, uiflags: GET_GUI_RESOURCES_FLAGS) -> u32 { @@ -786,65 +756,65 @@ pub unsafe fn GetMaximumProcessorGroupCount() -> u16 { #[inline] pub unsafe fn GetNextUmsListItem(umscontext: *mut core::ffi::c_void) -> *mut core::ffi::c_void { windows_targets::link!("kernel32.dll" "system" fn GetNextUmsListItem(umscontext : *mut core::ffi::c_void) -> *mut core::ffi::c_void); - unsafe { GetNextUmsListItem(core::mem::transmute(umscontext)) } + unsafe { GetNextUmsListItem(umscontext as _) } } #[inline] pub unsafe fn GetNumaAvailableMemoryNode(node: u8, availablebytes: *mut u64) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetNumaAvailableMemoryNode(node : u8, availablebytes : *mut u64) -> super::super::Foundation:: BOOL); - unsafe { GetNumaAvailableMemoryNode(node, core::mem::transmute(availablebytes)).ok() } + unsafe { GetNumaAvailableMemoryNode(node, availablebytes as _).ok() } } #[inline] pub unsafe fn GetNumaAvailableMemoryNodeEx(node: u16, availablebytes: *mut u64) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetNumaAvailableMemoryNodeEx(node : u16, availablebytes : *mut u64) -> super::super::Foundation:: BOOL); - unsafe { GetNumaAvailableMemoryNodeEx(node, core::mem::transmute(availablebytes)).ok() } + unsafe { GetNumaAvailableMemoryNodeEx(node, availablebytes as _).ok() } } #[inline] pub unsafe fn GetNumaHighestNodeNumber(highestnodenumber: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetNumaHighestNodeNumber(highestnodenumber : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetNumaHighestNodeNumber(core::mem::transmute(highestnodenumber)).ok() } + unsafe { GetNumaHighestNodeNumber(highestnodenumber as _).ok() } } #[inline] 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); - unsafe { GetNumaNodeNumberFromHandle(hfile, core::mem::transmute(nodenumber)).ok() } + unsafe { GetNumaNodeNumberFromHandle(hfile, nodenumber as _).ok() } } #[inline] pub unsafe fn GetNumaNodeProcessorMask(node: u8, processormask: *mut u64) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetNumaNodeProcessorMask(node : u8, processormask : *mut u64) -> super::super::Foundation:: BOOL); - unsafe { GetNumaNodeProcessorMask(node, core::mem::transmute(processormask)).ok() } + unsafe { GetNumaNodeProcessorMask(node, processormask as _).ok() } } #[cfg(feature = "Win32_System_SystemInformation")] #[inline] pub unsafe fn GetNumaNodeProcessorMask2(nodenumber: u16, processormasks: Option<&mut [super::SystemInformation::GROUP_AFFINITY]>, requiredmaskcount: *mut u16) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn GetNumaNodeProcessorMask2(nodenumber : u16, processormasks : *mut super::SystemInformation:: GROUP_AFFINITY, processormaskcount : u16, requiredmaskcount : *mut u16) -> super::super::Foundation:: BOOL); - unsafe { GetNumaNodeProcessorMask2(nodenumber, core::mem::transmute(processormasks.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), processormasks.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredmaskcount)) } + unsafe { GetNumaNodeProcessorMask2(nodenumber, core::mem::transmute(processormasks.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), processormasks.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredmaskcount as _) } } #[cfg(feature = "Win32_System_SystemInformation")] #[inline] pub unsafe fn GetNumaNodeProcessorMaskEx(node: u16, processormask: *mut super::SystemInformation::GROUP_AFFINITY) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn GetNumaNodeProcessorMaskEx(node : u16, processormask : *mut super::SystemInformation:: GROUP_AFFINITY) -> super::super::Foundation:: BOOL); - unsafe { GetNumaNodeProcessorMaskEx(node, core::mem::transmute(processormask)) } + unsafe { GetNumaNodeProcessorMaskEx(node, processormask as _) } } #[inline] pub unsafe fn GetNumaProcessorNode(processor: u8, nodenumber: *mut u8) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetNumaProcessorNode(processor : u8, nodenumber : *mut u8) -> super::super::Foundation:: BOOL); - unsafe { GetNumaProcessorNode(processor, core::mem::transmute(nodenumber)).ok() } + unsafe { GetNumaProcessorNode(processor, nodenumber as _).ok() } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn GetNumaProcessorNodeEx(processor: *const super::Kernel::PROCESSOR_NUMBER, nodenumber: *mut u16) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetNumaProcessorNodeEx(processor : *const super::Kernel:: PROCESSOR_NUMBER, nodenumber : *mut u16) -> super::super::Foundation:: BOOL); - unsafe { GetNumaProcessorNodeEx(processor, core::mem::transmute(nodenumber)).ok() } + unsafe { GetNumaProcessorNodeEx(processor, nodenumber as _).ok() } } #[inline] pub unsafe fn GetNumaProximityNode(proximityid: u32, nodenumber: *mut u8) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetNumaProximityNode(proximityid : u32, nodenumber : *mut u8) -> super::super::Foundation:: BOOL); - unsafe { GetNumaProximityNode(proximityid, core::mem::transmute(nodenumber)).ok() } + unsafe { GetNumaProximityNode(proximityid, nodenumber as _).ok() } } #[inline] pub unsafe fn GetNumaProximityNodeEx(proximityid: u32, nodenumber: *mut u16) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn GetNumaProximityNodeEx(proximityid : u32, nodenumber : *mut u16) -> super::super::Foundation:: BOOL); - unsafe { GetNumaProximityNodeEx(proximityid, core::mem::transmute(nodenumber)) } + unsafe { GetNumaProximityNodeEx(proximityid, nodenumber as _) } } #[inline] pub unsafe fn GetPriorityClass(hprocess: super::super::Foundation::HANDLE) -> u32 { @@ -854,33 +824,33 @@ pub unsafe fn GetPriorityClass(hprocess: super::super::Foundation::HANDLE) -> u3 #[inline] 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); - unsafe { GetProcessAffinityMask(hprocess, core::mem::transmute(lpprocessaffinitymask), core::mem::transmute(lpsystemaffinitymask)).ok() } + unsafe { GetProcessAffinityMask(hprocess, lpprocessaffinitymask as _, lpsystemaffinitymask as _).ok() } } #[inline] 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); - unsafe { GetProcessDEPPolicy(hprocess, core::mem::transmute(lpflags), core::mem::transmute(lppermanent)).ok() } + unsafe { GetProcessDEPPolicy(hprocess, lpflags as _, lppermanent as _).ok() } } #[cfg(feature = "Win32_System_SystemInformation")] #[inline] 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); - unsafe { GetProcessDefaultCpuSetMasks(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)) } + unsafe { GetProcessDefaultCpuSetMasks(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()), requiredmaskcount as _) } } #[inline] 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); - unsafe { GetProcessDefaultCpuSets(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)) } + unsafe { GetProcessDefaultCpuSets(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()), requiredidcount as _) } } #[inline] 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); - unsafe { GetProcessGroupAffinity(hprocess, core::mem::transmute(groupcount), core::mem::transmute(grouparray)) } + unsafe { GetProcessGroupAffinity(hprocess, groupcount as _, grouparray as _) } } #[inline] 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); - unsafe { GetProcessHandleCount(hprocess, core::mem::transmute(pdwhandlecount)).ok() } + unsafe { GetProcessHandleCount(hprocess, pdwhandlecount as _).ok() } } #[inline] pub unsafe fn GetProcessHandleFromHwnd(hwnd: super::super::Foundation::HWND) -> super::super::Foundation::HANDLE { @@ -900,32 +870,32 @@ pub unsafe fn GetProcessIdOfThread(thread: super::super::Foundation::HANDLE) -> #[inline] 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); - unsafe { GetProcessInformation(hprocess, processinformationclass, core::mem::transmute(processinformation), processinformationsize).ok() } + unsafe { GetProcessInformation(hprocess, processinformationclass, processinformation as _, processinformationsize).ok() } } #[inline] 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); - unsafe { GetProcessIoCounters(hprocess, core::mem::transmute(lpiocounters)).ok() } + unsafe { GetProcessIoCounters(hprocess, lpiocounters as _).ok() } } #[inline] 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); - unsafe { GetProcessMitigationPolicy(hprocess, mitigationpolicy, core::mem::transmute(lpbuffer), dwlength).ok() } + unsafe { GetProcessMitigationPolicy(hprocess, mitigationpolicy, lpbuffer as _, dwlength).ok() } } #[inline] 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); - unsafe { GetProcessPriorityBoost(hprocess, core::mem::transmute(pdisablepriorityboost)).ok() } + unsafe { GetProcessPriorityBoost(hprocess, pdisablepriorityboost as _).ok() } } #[inline] pub unsafe fn GetProcessShutdownParameters(lpdwlevel: *mut u32, lpdwflags: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetProcessShutdownParameters(lpdwlevel : *mut u32, lpdwflags : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetProcessShutdownParameters(core::mem::transmute(lpdwlevel), core::mem::transmute(lpdwflags)).ok() } + unsafe { GetProcessShutdownParameters(lpdwlevel as _, lpdwflags as _).ok() } } #[inline] 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); - unsafe { GetProcessTimes(hprocess, core::mem::transmute(lpcreationtime), core::mem::transmute(lpexittime), core::mem::transmute(lpkerneltime), core::mem::transmute(lpusertime)).ok() } + unsafe { GetProcessTimes(hprocess, lpcreationtime as _, lpexittime as _, lpkerneltime as _, lpusertime as _).ok() } } #[inline] pub unsafe fn GetProcessVersion(processid: u32) -> u32 { @@ -935,22 +905,22 @@ pub unsafe fn GetProcessVersion(processid: u32) -> u32 { #[inline] 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); - unsafe { GetProcessWorkingSetSize(hprocess, core::mem::transmute(lpminimumworkingsetsize), core::mem::transmute(lpmaximumworkingsetsize)).ok() } + unsafe { GetProcessWorkingSetSize(hprocess, lpminimumworkingsetsize as _, lpmaximumworkingsetsize as _).ok() } } #[inline] pub unsafe fn GetStartupInfoA(lpstartupinfo: *mut STARTUPINFOA) { windows_targets::link!("kernel32.dll" "system" fn GetStartupInfoA(lpstartupinfo : *mut STARTUPINFOA)); - unsafe { GetStartupInfoA(core::mem::transmute(lpstartupinfo)) } + unsafe { GetStartupInfoA(lpstartupinfo as _) } } #[inline] pub unsafe fn GetStartupInfoW(lpstartupinfo: *mut STARTUPINFOW) { windows_targets::link!("kernel32.dll" "system" fn GetStartupInfoW(lpstartupinfo : *mut STARTUPINFOW)); - unsafe { GetStartupInfoW(core::mem::transmute(lpstartupinfo)) } + unsafe { GetStartupInfoW(lpstartupinfo as _) } } #[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); - unsafe { 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() } + unsafe { GetSystemTimes(lpidletime.unwrap_or(core::mem::zeroed()) as _, lpkerneltime.unwrap_or(core::mem::zeroed()) as _, lpusertime.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn GetThreadDescription(hthread: super::super::Foundation::HANDLE) -> windows_core::Result { @@ -964,12 +934,12 @@ pub unsafe fn GetThreadDescription(hthread: super::super::Foundation::HANDLE) -> #[inline] 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); - unsafe { GetThreadGroupAffinity(hthread, core::mem::transmute(groupaffinity)) } + unsafe { GetThreadGroupAffinity(hthread, groupaffinity as _) } } #[inline] 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); - unsafe { GetThreadIOPendingFlag(hthread, core::mem::transmute(lpioispending)).ok() } + unsafe { GetThreadIOPendingFlag(hthread, lpioispending as _).ok() } } #[inline] pub unsafe fn GetThreadId(thread: super::super::Foundation::HANDLE) -> u32 { @@ -980,12 +950,12 @@ pub unsafe fn GetThreadId(thread: super::super::Foundation::HANDLE) -> u32 { #[inline] 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); - unsafe { GetThreadIdealProcessorEx(hthread, core::mem::transmute(lpidealprocessor)).ok() } + unsafe { GetThreadIdealProcessorEx(hthread, lpidealprocessor as _).ok() } } #[inline] 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); - unsafe { GetThreadInformation(hthread, threadinformationclass, core::mem::transmute(threadinformation), threadinformationsize).ok() } + unsafe { GetThreadInformation(hthread, threadinformationclass, threadinformation as _, threadinformationsize).ok() } } #[inline] pub unsafe fn GetThreadPriority(hthread: super::super::Foundation::HANDLE) -> i32 { @@ -995,48 +965,48 @@ pub unsafe fn GetThreadPriority(hthread: super::super::Foundation::HANDLE) -> i3 #[inline] 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); - unsafe { GetThreadPriorityBoost(hthread, core::mem::transmute(pdisablepriorityboost)).ok() } + unsafe { GetThreadPriorityBoost(hthread, pdisablepriorityboost as _).ok() } } #[cfg(feature = "Win32_System_SystemInformation")] #[inline] 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); - unsafe { GetThreadSelectedCpuSetMasks(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)) } + unsafe { GetThreadSelectedCpuSetMasks(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()), requiredmaskcount as _) } } #[inline] 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); - unsafe { GetThreadSelectedCpuSets(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)) } + unsafe { GetThreadSelectedCpuSets(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()), requiredidcount as _) } } #[inline] 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); - unsafe { GetThreadTimes(hthread, core::mem::transmute(lpcreationtime), core::mem::transmute(lpexittime), core::mem::transmute(lpkerneltime), core::mem::transmute(lpusertime)).ok() } + unsafe { GetThreadTimes(hthread, lpcreationtime as _, lpexittime as _, lpkerneltime as _, lpusertime as _).ok() } } #[inline] pub unsafe fn GetUmsCompletionListEvent(umscompletionlist: *const core::ffi::c_void, umscompletionevent: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetUmsCompletionListEvent(umscompletionlist : *const core::ffi::c_void, umscompletionevent : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - unsafe { GetUmsCompletionListEvent(umscompletionlist, core::mem::transmute(umscompletionevent)).ok() } + unsafe { GetUmsCompletionListEvent(umscompletionlist, umscompletionevent as _).ok() } } #[inline] 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); - unsafe { GetUmsSystemThreadInformation(threadhandle, core::mem::transmute(systemthreadinfo)) } + unsafe { GetUmsSystemThreadInformation(threadhandle, systemthreadinfo as _) } } #[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); - unsafe { InitOnceBeginInitialize(core::mem::transmute(lpinitonce), dwflags, core::mem::transmute(fpending), core::mem::transmute(lpcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { InitOnceBeginInitialize(lpinitonce as _, dwflags, fpending as _, lpcontext.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { InitOnceComplete(core::mem::transmute(lpinitonce), dwflags, core::mem::transmute(lpcontext.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { InitOnceComplete(lpinitonce as _, dwflags, lpcontext.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { InitOnceExecuteOnce(core::mem::transmute(initonce), initfn, core::mem::transmute(parameter.unwrap_or(core::mem::zeroed())), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { InitOnceExecuteOnce(initonce as _, initfn, parameter.unwrap_or(core::mem::zeroed()) as _, context.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn InitOnceInitialize() -> INIT_ONCE { @@ -1060,24 +1030,24 @@ pub unsafe fn InitializeConditionVariable() -> CONDITION_VARIABLE { #[inline] pub unsafe fn InitializeCriticalSection(lpcriticalsection: *mut CRITICAL_SECTION) { windows_targets::link!("kernel32.dll" "system" fn InitializeCriticalSection(lpcriticalsection : *mut CRITICAL_SECTION)); - unsafe { InitializeCriticalSection(core::mem::transmute(lpcriticalsection)) } + unsafe { InitializeCriticalSection(lpcriticalsection as _) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn InitializeCriticalSectionAndSpinCount(lpcriticalsection: *mut CRITICAL_SECTION, dwspincount: u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn InitializeCriticalSectionAndSpinCount(lpcriticalsection : *mut CRITICAL_SECTION, dwspincount : u32) -> super::super::Foundation:: BOOL); - unsafe { InitializeCriticalSectionAndSpinCount(core::mem::transmute(lpcriticalsection), dwspincount).ok() } + unsafe { InitializeCriticalSectionAndSpinCount(lpcriticalsection as _, dwspincount).ok() } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn InitializeCriticalSectionEx(lpcriticalsection: *mut CRITICAL_SECTION, dwspincount: u32, flags: u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn InitializeCriticalSectionEx(lpcriticalsection : *mut CRITICAL_SECTION, dwspincount : u32, flags : u32) -> super::super::Foundation:: BOOL); - unsafe { InitializeCriticalSectionEx(core::mem::transmute(lpcriticalsection), dwspincount, flags).ok() } + unsafe { InitializeCriticalSectionEx(lpcriticalsection as _, dwspincount, flags).ok() } } #[inline] 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); - unsafe { InitializeProcThreadAttributeList(core::mem::transmute(lpattributelist.unwrap_or(core::mem::zeroed())), dwattributecount, core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpsize)).ok() } + unsafe { InitializeProcThreadAttributeList(lpattributelist.unwrap_or(core::mem::zeroed()) as _, dwattributecount, dwflags.unwrap_or(core::mem::zeroed()) as _, lpsize as _).ok() } } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -1101,31 +1071,31 @@ pub unsafe fn InitializeSRWLock() -> SRWLOCK { #[inline] pub unsafe fn InitializeSynchronizationBarrier(lpbarrier: *mut SYNCHRONIZATION_BARRIER, ltotalthreads: i32, lspincount: i32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn InitializeSynchronizationBarrier(lpbarrier : *mut SYNCHRONIZATION_BARRIER, ltotalthreads : i32, lspincount : i32) -> super::super::Foundation:: BOOL); - unsafe { InitializeSynchronizationBarrier(core::mem::transmute(lpbarrier), ltotalthreads, lspincount).ok() } + unsafe { InitializeSynchronizationBarrier(lpbarrier as _, ltotalthreads, lspincount).ok() } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn InterlockedFlushSList(listhead: *mut super::Kernel::SLIST_HEADER) -> *mut super::Kernel::SLIST_ENTRY { windows_targets::link!("kernel32.dll" "system" fn InterlockedFlushSList(listhead : *mut super::Kernel:: SLIST_HEADER) -> *mut super::Kernel:: SLIST_ENTRY); - unsafe { InterlockedFlushSList(core::mem::transmute(listhead)) } + unsafe { InterlockedFlushSList(listhead as _) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn InterlockedPopEntrySList(listhead: *mut super::Kernel::SLIST_HEADER) -> *mut super::Kernel::SLIST_ENTRY { windows_targets::link!("kernel32.dll" "system" fn InterlockedPopEntrySList(listhead : *mut super::Kernel:: SLIST_HEADER) -> *mut super::Kernel:: SLIST_ENTRY); - unsafe { InterlockedPopEntrySList(core::mem::transmute(listhead)) } + unsafe { InterlockedPopEntrySList(listhead as _) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn InterlockedPushEntrySList(listhead: *mut super::Kernel::SLIST_HEADER, listentry: *mut super::Kernel::SLIST_ENTRY) -> *mut super::Kernel::SLIST_ENTRY { windows_targets::link!("kernel32.dll" "system" fn InterlockedPushEntrySList(listhead : *mut super::Kernel:: SLIST_HEADER, listentry : *mut super::Kernel:: SLIST_ENTRY) -> *mut super::Kernel:: SLIST_ENTRY); - unsafe { InterlockedPushEntrySList(core::mem::transmute(listhead), core::mem::transmute(listentry)) } + unsafe { InterlockedPushEntrySList(listhead as _, listentry as _) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn InterlockedPushListSListEx(listhead: *mut super::Kernel::SLIST_HEADER, list: *mut super::Kernel::SLIST_ENTRY, listend: *mut super::Kernel::SLIST_ENTRY, count: u32) -> *mut super::Kernel::SLIST_ENTRY { windows_targets::link!("kernel32.dll" "system" fn InterlockedPushListSListEx(listhead : *mut super::Kernel:: SLIST_HEADER, list : *mut super::Kernel:: SLIST_ENTRY, listend : *mut super::Kernel:: SLIST_ENTRY, count : u32) -> *mut super::Kernel:: SLIST_ENTRY); - unsafe { InterlockedPushListSListEx(core::mem::transmute(listhead), core::mem::transmute(list), core::mem::transmute(listend), count) } + unsafe { InterlockedPushListSListEx(listhead as _, list as _, listend as _, count) } } #[inline] pub unsafe fn IsImmersiveProcess(hprocess: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -1135,7 +1105,7 @@ pub unsafe fn IsImmersiveProcess(hprocess: super::super::Foundation::HANDLE) -> #[inline] 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); - unsafe { IsProcessCritical(hprocess, core::mem::transmute(critical)).ok() } + unsafe { IsProcessCritical(hprocess, critical as _).ok() } } #[inline] pub unsafe fn IsProcessorFeaturePresent(processorfeature: PROCESSOR_FEATURE_ID) -> super::super::Foundation::BOOL { @@ -1155,25 +1125,25 @@ pub unsafe fn IsThreadpoolTimerSet(pti: PTP_TIMER) -> super::super::Foundation:: #[inline] 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); - unsafe { IsWow64Process(hprocess, core::mem::transmute(wow64process)).ok() } + unsafe { IsWow64Process(hprocess, wow64process as _).ok() } } #[cfg(feature = "Win32_System_SystemInformation")] #[inline] 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); - unsafe { IsWow64Process2(hprocess, core::mem::transmute(pprocessmachine), core::mem::transmute(pnativemachine.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { IsWow64Process2(hprocess, pprocessmachine as _, pnativemachine.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn LeaveCriticalSection(lpcriticalsection: *mut CRITICAL_SECTION) { windows_targets::link!("kernel32.dll" "system" fn LeaveCriticalSection(lpcriticalsection : *mut CRITICAL_SECTION)); - unsafe { LeaveCriticalSection(core::mem::transmute(lpcriticalsection)) } + unsafe { LeaveCriticalSection(lpcriticalsection as _) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] 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)); - unsafe { LeaveCriticalSectionWhenCallbackReturns(pci, core::mem::transmute(pcs)) } + unsafe { LeaveCriticalSectionWhenCallbackReturns(pci, pcs as _) } } #[inline] pub unsafe fn OpenEventA(dwdesiredaccess: SYNCHRONIZATION_ACCESS_RIGHTS, binherithandle: bool, lpname: P2) -> windows_core::Result @@ -1228,7 +1198,7 @@ pub unsafe fn OpenProcess(dwdesiredaccess: PROCESS_ACCESS_RIGHTS, binherithandle #[inline] 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); - unsafe { OpenProcessToken(processhandle, desiredaccess, core::mem::transmute(tokenhandle)).ok() } + unsafe { OpenProcessToken(processhandle, desiredaccess, tokenhandle as _).ok() } } #[inline] pub unsafe fn OpenSemaphoreW(dwdesiredaccess: SYNCHRONIZATION_ACCESS_RIGHTS, binherithandle: bool, lpname: P2) -> windows_core::Result @@ -1249,7 +1219,7 @@ pub unsafe fn OpenThread(dwdesiredaccess: THREAD_ACCESS_RIGHTS, binherithandle: #[inline] pub unsafe fn OpenThreadToken(threadhandle: super::super::Foundation::HANDLE, desiredaccess: super::super::Security::TOKEN_ACCESS_MASK, openasself: bool, tokenhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { 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); - unsafe { OpenThreadToken(threadhandle, desiredaccess, openasself.into(), core::mem::transmute(tokenhandle)).ok() } + unsafe { OpenThreadToken(threadhandle, desiredaccess, openasself.into(), tokenhandle as _).ok() } } #[inline] pub unsafe fn OpenWaitableTimerA(dwdesiredaccess: u32, binherithandle: bool, lptimername: P2) -> super::super::Foundation::HANDLE @@ -1282,32 +1252,32 @@ pub unsafe fn QueryDepthSList(listhead: *const super::Kernel::SLIST_HEADER) -> u #[inline] 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); - unsafe { QueryFullProcessImageNameA(hprocess, dwflags, core::mem::transmute(lpexename), core::mem::transmute(lpdwsize)).ok() } + unsafe { QueryFullProcessImageNameA(hprocess, dwflags, core::mem::transmute(lpexename), lpdwsize as _).ok() } } #[inline] 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); - unsafe { QueryFullProcessImageNameW(hprocess, dwflags, core::mem::transmute(lpexename), core::mem::transmute(lpdwsize)).ok() } + unsafe { QueryFullProcessImageNameW(hprocess, dwflags, core::mem::transmute(lpexename), lpdwsize as _).ok() } } #[inline] 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); - unsafe { QueryProcessAffinityUpdateMode(hprocess, core::mem::transmute(lpdwflags.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { QueryProcessAffinityUpdateMode(hprocess, lpdwflags.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn QueryProtectedPolicy(policyguid: *const windows_core::GUID, policyvalue: *mut usize) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn QueryProtectedPolicy(policyguid : *const windows_core::GUID, policyvalue : *mut usize) -> super::super::Foundation:: BOOL); - unsafe { QueryProtectedPolicy(policyguid, core::mem::transmute(policyvalue)) } + unsafe { QueryProtectedPolicy(policyguid, policyvalue as _) } } #[inline] 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); - unsafe { QueryThreadpoolStackInformation(ptpp, core::mem::transmute(ptpsi)).ok() } + unsafe { QueryThreadpoolStackInformation(ptpp, ptpsi as _).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); - unsafe { QueryUmsThreadInformation(umsthread, umsthreadinfoclass, core::mem::transmute(umsthreadinformation), umsthreadinformationlength, core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { QueryUmsThreadInformation(umsthread, umsthreadinfoclass, umsthreadinformation as _, umsthreadinformationlength, returnlength.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn QueueUserAPC(pfnapc: super::super::Foundation::PAPCFUNC, hthread: super::super::Foundation::HANDLE, dwdata: usize) -> u32 { @@ -1322,12 +1292,12 @@ pub unsafe fn QueueUserAPC2(apcroutine: super::super::Foundation::PAPCFUNC, thre #[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); - unsafe { QueueUserWorkItem(function, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), flags).ok() } + unsafe { QueueUserWorkItem(function, context.unwrap_or(core::mem::zeroed()) as _, flags).ok() } } #[inline] 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); - unsafe { RegisterWaitForSingleObject(core::mem::transmute(phnewwaitobject), hobject, callback, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), dwmilliseconds, dwflags).ok() } + unsafe { RegisterWaitForSingleObject(phnewwaitobject as _, hobject, callback, context.unwrap_or(core::mem::zeroed()) as _, dwmilliseconds, dwflags).ok() } } #[inline] pub unsafe fn ReleaseMutex(hmutex: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -1342,17 +1312,17 @@ pub unsafe fn ReleaseMutexWhenCallbackReturns(pci: PTP_CALLBACK_INSTANCE, r#mut: #[inline] pub unsafe fn ReleaseSRWLockExclusive(srwlock: *mut SRWLOCK) { windows_targets::link!("kernel32.dll" "system" fn ReleaseSRWLockExclusive(srwlock : *mut SRWLOCK)); - unsafe { ReleaseSRWLockExclusive(core::mem::transmute(srwlock)) } + unsafe { ReleaseSRWLockExclusive(srwlock as _) } } #[inline] pub unsafe fn ReleaseSRWLockShared(srwlock: *mut SRWLOCK) { windows_targets::link!("kernel32.dll" "system" fn ReleaseSRWLockShared(srwlock : *mut SRWLOCK)); - unsafe { ReleaseSRWLockShared(core::mem::transmute(srwlock)) } + unsafe { ReleaseSRWLockShared(srwlock as _) } } #[inline] 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); - unsafe { ReleaseSemaphore(hsemaphore, lreleasecount, core::mem::transmute(lppreviouscount.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ReleaseSemaphore(hsemaphore, lreleasecount, lppreviouscount.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn ReleaseSemaphoreWhenCallbackReturns(pci: PTP_CALLBACK_INSTANCE, sem: super::super::Foundation::HANDLE, crel: u32) { @@ -1375,7 +1345,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); - unsafe { RtwqAddPeriodicCallback(callback, context.param().abi(), core::mem::transmute(key.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { RtwqAddPeriodicCallback(callback, context.param().abi(), key.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn RtwqAllocateSerialWorkQueue(workqueueidin: u32) -> windows_core::Result { @@ -1449,7 +1419,7 @@ where #[inline] 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); - unsafe { RtwqGetWorkQueueMMCSSClass(workqueueid, core::mem::transmute(usageclass.unwrap_or(core::mem::zeroed())), core::mem::transmute(usageclasslength)).ok() } + unsafe { RtwqGetWorkQueueMMCSSClass(workqueueid, usageclass.unwrap_or(core::mem::zeroed()) as _, usageclasslength as _).ok() } } #[inline] pub unsafe fn RtwqGetWorkQueueMMCSSPriority(workqueueid: u32) -> windows_core::Result { @@ -1494,7 +1464,7 @@ where P0: windows_core::Param, { windows_targets::link!("rtworkq.dll" "system" fn RtwqLockSharedWorkQueue(usageclass : windows_core::PCWSTR, basepriority : i32, taskid : *mut u32, id : *mut u32) -> windows_core::HRESULT); - unsafe { RtwqLockSharedWorkQueue(usageclass.param().abi(), basepriority, core::mem::transmute(taskid), core::mem::transmute(id)).ok() } + unsafe { RtwqLockSharedWorkQueue(usageclass.param().abi(), basepriority, taskid as _, id as _).ok() } } #[inline] pub unsafe fn RtwqLockWorkQueue(workqueueid: u32) -> windows_core::Result<()> { @@ -1507,7 +1477,7 @@ where 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); - unsafe { RtwqPutWaitingWorkItem(hevent, lpriority, result.param().abi(), core::mem::transmute(key.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { RtwqPutWaitingWorkItem(hevent, lpriority, result.param().abi(), key.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn RtwqPutWorkItem(dwqueue: u32, lpriority: i32, result: P2) -> windows_core::Result<()> @@ -1531,7 +1501,7 @@ where P0: windows_core::Param, { windows_targets::link!("rtworkq.dll" "system" fn RtwqRegisterPlatformWithMMCSS(usageclass : windows_core::PCWSTR, taskid : *mut u32, lpriority : i32) -> windows_core::HRESULT); - unsafe { RtwqRegisterPlatformWithMMCSS(usageclass.param().abi(), core::mem::transmute(taskid), lpriority).ok() } + unsafe { RtwqRegisterPlatformWithMMCSS(usageclass.param().abi(), taskid as _, lpriority).ok() } } #[inline] pub unsafe fn RtwqRemovePeriodicCallback(dwkey: u32) -> windows_core::Result<()> { @@ -1544,7 +1514,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); - unsafe { RtwqScheduleWorkItem(result.param().abi(), timeout, core::mem::transmute(key.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { RtwqScheduleWorkItem(result.param().abi(), timeout, key.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn RtwqSetDeadline(workqueueid: u32, deadlineinhns: i64) -> windows_core::Result { @@ -1609,7 +1579,7 @@ pub unsafe fn RtwqUnregisterPlatformFromMMCSS() -> windows_core::Result<()> { #[inline] pub unsafe fn SetCriticalSectionSpinCount(lpcriticalsection: *mut CRITICAL_SECTION, dwspincount: u32) -> u32 { windows_targets::link!("kernel32.dll" "system" fn SetCriticalSectionSpinCount(lpcriticalsection : *mut CRITICAL_SECTION, dwspincount : u32) -> u32); - unsafe { SetCriticalSectionSpinCount(core::mem::transmute(lpcriticalsection), dwspincount) } + unsafe { SetCriticalSectionSpinCount(lpcriticalsection as _, dwspincount) } } #[inline] pub unsafe fn SetEvent(hevent: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -1695,7 +1665,7 @@ pub unsafe fn SetProcessWorkingSetSize(hprocess: super::super::Foundation::HANDL #[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); - unsafe { SetProtectedPolicy(policyguid, policyvalue, core::mem::transmute(oldpolicyvalue.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetProtectedPolicy(policyguid, policyvalue, oldpolicyvalue.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetThreadAffinityMask(hthread: super::super::Foundation::HANDLE, dwthreadaffinitymask: usize) -> usize { @@ -1714,7 +1684,7 @@ where #[inline] 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); - unsafe { SetThreadGroupAffinity(hthread, groupaffinity, core::mem::transmute(previousgroupaffinity.unwrap_or(core::mem::zeroed()))) } + unsafe { SetThreadGroupAffinity(hthread, groupaffinity, previousgroupaffinity.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SetThreadIdealProcessor(hthread: super::super::Foundation::HANDLE, dwidealprocessor: u32) -> u32 { @@ -1725,7 +1695,7 @@ pub unsafe fn SetThreadIdealProcessor(hthread: super::super::Foundation::HANDLE, #[inline] 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); - unsafe { SetThreadIdealProcessorEx(hthread, lpidealprocessor, core::mem::transmute(lppreviousidealprocessor.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetThreadIdealProcessorEx(hthread, lpidealprocessor, lppreviousidealprocessor.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetThreadInformation(hthread: super::super::Foundation::HANDLE, threadinformationclass: THREAD_INFORMATION_CLASS, threadinformation: *const core::ffi::c_void, threadinformationsize: u32) -> windows_core::Result<()> { @@ -1756,12 +1726,12 @@ pub unsafe fn SetThreadSelectedCpuSets(thread: super::super::Foundation::HANDLE, #[inline] pub unsafe fn SetThreadStackGuarantee(stacksizeinbytes: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetThreadStackGuarantee(stacksizeinbytes : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { SetThreadStackGuarantee(core::mem::transmute(stacksizeinbytes)).ok() } + unsafe { SetThreadStackGuarantee(stacksizeinbytes as _).ok() } } #[inline] 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); - unsafe { SetThreadToken(core::mem::transmute(thread.unwrap_or(core::mem::zeroed())), core::mem::transmute(token.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetThreadToken(thread.unwrap_or(core::mem::zeroed()) as _, token.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetThreadpoolStackInformation(ptpp: PTP_POOL, ptpsi: *const TP_POOL_STACK_INFORMATION) -> windows_core::Result<()> { @@ -1781,27 +1751,27 @@ pub unsafe fn SetThreadpoolThreadMinimum(ptpp: PTP_POOL, cthrdmic: u32) -> windo #[inline] 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)); - unsafe { SetThreadpoolTimer(pti, core::mem::transmute(pftduetime.unwrap_or(core::mem::zeroed())), msperiod, core::mem::transmute(mswindowlength.unwrap_or(core::mem::zeroed()))) } + unsafe { SetThreadpoolTimer(pti, pftduetime.unwrap_or(core::mem::zeroed()) as _, msperiod, mswindowlength.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { SetThreadpoolTimerEx(pti, core::mem::transmute(pftduetime.unwrap_or(core::mem::zeroed())), msperiod, core::mem::transmute(mswindowlength.unwrap_or(core::mem::zeroed()))) } + unsafe { SetThreadpoolTimerEx(pti, pftduetime.unwrap_or(core::mem::zeroed()) as _, msperiod, mswindowlength.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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)); - unsafe { SetThreadpoolWait(pwa, core::mem::transmute(h.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfttimeout.unwrap_or(core::mem::zeroed()))) } + unsafe { SetThreadpoolWait(pwa, h.unwrap_or(core::mem::zeroed()) as _, pfttimeout.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { SetThreadpoolWaitEx(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()))) } + unsafe { SetThreadpoolWaitEx(pwa, h.unwrap_or(core::mem::zeroed()) as _, pfttimeout.unwrap_or(core::mem::zeroed()) as _, reserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SetTimerQueueTimer(timerqueue: Option, callback: WAITORTIMERCALLBACK, parameter: Option<*const core::ffi::c_void>, duetime: u32, period: u32, preferio: bool) -> super::super::Foundation::HANDLE { 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); - unsafe { SetTimerQueueTimer(core::mem::transmute(timerqueue.unwrap_or(core::mem::zeroed())), callback, core::mem::transmute(parameter.unwrap_or(core::mem::zeroed())), duetime, period, preferio.into()) } + unsafe { SetTimerQueueTimer(timerqueue.unwrap_or(core::mem::zeroed()) as _, callback, parameter.unwrap_or(core::mem::zeroed()) as _, duetime, period, preferio.into()) } } #[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<()> { @@ -1811,12 +1781,12 @@ pub unsafe fn SetUmsThreadInformation(umsthread: *const core::ffi::c_void, umsth #[inline] pub unsafe fn SetWaitableTimer(htimer: super::super::Foundation::HANDLE, lpduetime: *const i64, lperiod: i32, pfncompletionroutine: Option, lpargtocompletionroutine: Option<*const core::ffi::c_void>, fresume: bool) -> windows_core::Result<()> { 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); - unsafe { SetWaitableTimer(htimer, lpduetime, lperiod, core::mem::transmute(pfncompletionroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpargtocompletionroutine.unwrap_or(core::mem::zeroed())), fresume.into()).ok() } + unsafe { SetWaitableTimer(htimer, lpduetime, lperiod, pfncompletionroutine.unwrap_or(core::mem::zeroed()) as _, lpargtocompletionroutine.unwrap_or(core::mem::zeroed()) as _, fresume.into()).ok() } } #[inline] 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); - unsafe { SetWaitableTimerEx(htimer, lpduetime, 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())), tolerabledelay).ok() } + unsafe { SetWaitableTimerEx(htimer, lpduetime, lperiod, pfncompletionroutine.unwrap_or(core::mem::zeroed()) as _, lpargtocompletionroutine.unwrap_or(core::mem::zeroed()) as _, wakecontext.unwrap_or(core::mem::zeroed()) as _, tolerabledelay).ok() } } #[inline] pub unsafe fn SignalObjectAndWait(hobjecttosignal: super::super::Foundation::HANDLE, hobjecttowaiton: super::super::Foundation::HANDLE, dwmilliseconds: u32, balertable: bool) -> super::super::Foundation::WAIT_EVENT { @@ -1832,12 +1802,12 @@ pub unsafe fn Sleep(dwmilliseconds: u32) { #[inline] pub unsafe fn SleepConditionVariableCS(conditionvariable: *mut CONDITION_VARIABLE, criticalsection: *mut CRITICAL_SECTION, dwmilliseconds: u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SleepConditionVariableCS(conditionvariable : *mut CONDITION_VARIABLE, criticalsection : *mut CRITICAL_SECTION, dwmilliseconds : u32) -> super::super::Foundation:: BOOL); - unsafe { SleepConditionVariableCS(core::mem::transmute(conditionvariable), core::mem::transmute(criticalsection), dwmilliseconds).ok() } + unsafe { SleepConditionVariableCS(conditionvariable as _, criticalsection as _, dwmilliseconds).ok() } } #[inline] pub unsafe fn SleepConditionVariableSRW(conditionvariable: *mut CONDITION_VARIABLE, srwlock: *mut SRWLOCK, dwmilliseconds: u32, flags: u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SleepConditionVariableSRW(conditionvariable : *mut CONDITION_VARIABLE, srwlock : *mut SRWLOCK, dwmilliseconds : u32, flags : u32) -> super::super::Foundation:: BOOL); - unsafe { SleepConditionVariableSRW(core::mem::transmute(conditionvariable), core::mem::transmute(srwlock), dwmilliseconds, flags).ok() } + unsafe { SleepConditionVariableSRW(conditionvariable as _, srwlock as _, dwmilliseconds, flags).ok() } } #[inline] pub unsafe fn SleepEx(dwmilliseconds: u32, balertable: bool) -> u32 { @@ -1897,28 +1867,28 @@ 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); - unsafe { TlsSetValue(dwtlsindex, core::mem::transmute(lptlsvalue.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { TlsSetValue(dwtlsindex, lptlsvalue.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn TryAcquireSRWLockExclusive(srwlock: *mut SRWLOCK) -> bool { windows_targets::link!("kernel32.dll" "system" fn TryAcquireSRWLockExclusive(srwlock : *mut SRWLOCK) -> bool); - unsafe { TryAcquireSRWLockExclusive(core::mem::transmute(srwlock)) } + unsafe { TryAcquireSRWLockExclusive(srwlock as _) } } #[inline] pub unsafe fn TryAcquireSRWLockShared(srwlock: *mut SRWLOCK) -> bool { windows_targets::link!("kernel32.dll" "system" fn TryAcquireSRWLockShared(srwlock : *mut SRWLOCK) -> bool); - unsafe { TryAcquireSRWLockShared(core::mem::transmute(srwlock)) } + unsafe { TryAcquireSRWLockShared(srwlock as _) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn TryEnterCriticalSection(lpcriticalsection: *mut CRITICAL_SECTION) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn TryEnterCriticalSection(lpcriticalsection : *mut CRITICAL_SECTION) -> super::super::Foundation:: BOOL); - unsafe { TryEnterCriticalSection(core::mem::transmute(lpcriticalsection)) } + unsafe { TryEnterCriticalSection(lpcriticalsection as _) } } #[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); - unsafe { TrySubmitThreadpoolCallback(pfns, core::mem::transmute(pv.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbe.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { TrySubmitThreadpoolCallback(pfns, pv.unwrap_or(core::mem::zeroed()) as _, pcbe.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn UmsThreadYield(schedulerparam: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -1933,12 +1903,12 @@ pub unsafe fn UnregisterWait(waithandle: super::super::Foundation::HANDLE) -> wi #[inline] 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); - unsafe { UnregisterWaitEx(waithandle, core::mem::transmute(completionevent.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { UnregisterWaitEx(waithandle, completionevent.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { UpdateProcThreadAttribute(core::mem::transmute(lpattributelist), dwflags, attribute, core::mem::transmute(lpvalue.unwrap_or(core::mem::zeroed())), cbsize, core::mem::transmute(lppreviousvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpreturnsize.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { UpdateProcThreadAttribute(lpattributelist as _, dwflags, attribute, lpvalue.unwrap_or(core::mem::zeroed()) as _, cbsize, lppreviousvalue.unwrap_or(core::mem::zeroed()) as _, lpreturnsize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WaitForInputIdle(hprocess: super::super::Foundation::HANDLE, dwmilliseconds: u32) -> u32 { @@ -1988,12 +1958,12 @@ pub unsafe fn WaitForThreadpoolWorkCallbacks(pwk: PTP_WORK, fcancelpendingcallba #[inline] 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); - unsafe { WaitOnAddress(address, compareaddress, addresssize, core::mem::transmute(dwmilliseconds.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WaitOnAddress(address, compareaddress, addresssize, dwmilliseconds.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WakeAllConditionVariable(conditionvariable: *mut CONDITION_VARIABLE) { windows_targets::link!("kernel32.dll" "system" fn WakeAllConditionVariable(conditionvariable : *mut CONDITION_VARIABLE)); - unsafe { WakeAllConditionVariable(core::mem::transmute(conditionvariable)) } + unsafe { WakeAllConditionVariable(conditionvariable as _) } } #[inline] pub unsafe fn WakeByAddressAll(address: *const core::ffi::c_void) { @@ -2008,7 +1978,7 @@ pub unsafe fn WakeByAddressSingle(address: *const core::ffi::c_void) { #[inline] pub unsafe fn WakeConditionVariable(conditionvariable: *mut CONDITION_VARIABLE) { windows_targets::link!("kernel32.dll" "system" fn WakeConditionVariable(conditionvariable : *mut CONDITION_VARIABLE)); - unsafe { WakeConditionVariable(core::mem::transmute(conditionvariable)) } + unsafe { WakeConditionVariable(conditionvariable as _) } } #[inline] pub unsafe fn WinExec(lpcmdline: P0, ucmdshow: u32) -> u32 @@ -2214,7 +2184,7 @@ windows_core::imp::define_interface!(IRtwqAsyncCallback, IRtwqAsyncCallback_Vtbl windows_core::imp::interface_hierarchy!(IRtwqAsyncCallback, windows_core::IUnknown); impl IRtwqAsyncCallback { pub unsafe fn GetParameters(&self, pdwflags: *mut u32, pdwqueue: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwflags), core::mem::transmute(pdwqueue)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetParameters)(windows_core::Interface::as_raw(self), pdwflags as _, pdwqueue as _).ok() } } pub unsafe fn Invoke(&self, pasyncresult: P0) -> windows_core::Result<()> where 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 a703992094..b710c3c837 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Time/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Time/mod.rs @@ -1,42 +1,42 @@ #[inline] pub unsafe fn EnumDynamicTimeZoneInformation(dwindex: u32, lptimezoneinformation: *mut DYNAMIC_TIME_ZONE_INFORMATION) -> u32 { windows_targets::link!("advapi32.dll" "system" fn EnumDynamicTimeZoneInformation(dwindex : u32, lptimezoneinformation : *mut DYNAMIC_TIME_ZONE_INFORMATION) -> u32); - unsafe { EnumDynamicTimeZoneInformation(dwindex, core::mem::transmute(lptimezoneinformation)) } + unsafe { EnumDynamicTimeZoneInformation(dwindex, lptimezoneinformation as _) } } #[inline] pub unsafe fn FileTimeToSystemTime(lpfiletime: *const super::super::Foundation::FILETIME, lpsystemtime: *mut super::super::Foundation::SYSTEMTIME) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn FileTimeToSystemTime(lpfiletime : *const super::super::Foundation:: FILETIME, lpsystemtime : *mut super::super::Foundation:: SYSTEMTIME) -> super::super::Foundation:: BOOL); - unsafe { FileTimeToSystemTime(lpfiletime, core::mem::transmute(lpsystemtime)).ok() } + unsafe { FileTimeToSystemTime(lpfiletime, lpsystemtime as _).ok() } } #[inline] pub unsafe fn GetDynamicTimeZoneInformation(ptimezoneinformation: *mut DYNAMIC_TIME_ZONE_INFORMATION) -> u32 { windows_targets::link!("kernel32.dll" "system" fn GetDynamicTimeZoneInformation(ptimezoneinformation : *mut DYNAMIC_TIME_ZONE_INFORMATION) -> u32); - unsafe { GetDynamicTimeZoneInformation(core::mem::transmute(ptimezoneinformation)) } + unsafe { GetDynamicTimeZoneInformation(ptimezoneinformation as _) } } #[inline] pub unsafe fn GetDynamicTimeZoneInformationEffectiveYears(lptimezoneinformation: *const DYNAMIC_TIME_ZONE_INFORMATION, firstyear: *mut u32, lastyear: *mut u32) -> u32 { windows_targets::link!("advapi32.dll" "system" fn GetDynamicTimeZoneInformationEffectiveYears(lptimezoneinformation : *const DYNAMIC_TIME_ZONE_INFORMATION, firstyear : *mut u32, lastyear : *mut u32) -> u32); - unsafe { GetDynamicTimeZoneInformationEffectiveYears(lptimezoneinformation, core::mem::transmute(firstyear), core::mem::transmute(lastyear)) } + unsafe { GetDynamicTimeZoneInformationEffectiveYears(lptimezoneinformation, firstyear as _, lastyear as _) } } #[inline] pub unsafe fn GetTimeZoneInformation(lptimezoneinformation: *mut TIME_ZONE_INFORMATION) -> u32 { windows_targets::link!("kernel32.dll" "system" fn GetTimeZoneInformation(lptimezoneinformation : *mut TIME_ZONE_INFORMATION) -> u32); - unsafe { GetTimeZoneInformation(core::mem::transmute(lptimezoneinformation)) } + unsafe { GetTimeZoneInformation(lptimezoneinformation as _) } } #[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); - unsafe { GetTimeZoneInformationForYear(wyear, core::mem::transmute(pdtzi.unwrap_or(core::mem::zeroed())), core::mem::transmute(ptzi)).ok() } + unsafe { GetTimeZoneInformationForYear(wyear, pdtzi.unwrap_or(core::mem::zeroed()) as _, ptzi as _).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); - unsafe { LocalFileTimeToLocalSystemTime(core::mem::transmute(timezoneinformation.unwrap_or(core::mem::zeroed())), localfiletime, core::mem::transmute(localsystemtime)) } + unsafe { LocalFileTimeToLocalSystemTime(timezoneinformation.unwrap_or(core::mem::zeroed()) as _, localfiletime, localsystemtime as _) } } #[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); - unsafe { LocalSystemTimeToLocalFileTime(core::mem::transmute(timezoneinformation.unwrap_or(core::mem::zeroed())), localsystemtime, core::mem::transmute(localfiletime)) } + unsafe { LocalSystemTimeToLocalFileTime(timezoneinformation.unwrap_or(core::mem::zeroed()) as _, localsystemtime, localfiletime as _) } } #[inline] pub unsafe fn SetDynamicTimeZoneInformation(lptimezoneinformation: *const DYNAMIC_TIME_ZONE_INFORMATION) -> windows_core::Result<()> { @@ -51,27 +51,27 @@ pub unsafe fn SetTimeZoneInformation(lptimezoneinformation: *const TIME_ZONE_INF #[inline] pub unsafe fn SystemTimeToFileTime(lpsystemtime: *const super::super::Foundation::SYSTEMTIME, lpfiletime: *mut super::super::Foundation::FILETIME) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SystemTimeToFileTime(lpsystemtime : *const super::super::Foundation:: SYSTEMTIME, lpfiletime : *mut super::super::Foundation:: FILETIME) -> super::super::Foundation:: BOOL); - unsafe { SystemTimeToFileTime(lpsystemtime, core::mem::transmute(lpfiletime)).ok() } + unsafe { SystemTimeToFileTime(lpsystemtime, lpfiletime as _).ok() } } #[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); - unsafe { SystemTimeToTzSpecificLocalTime(core::mem::transmute(lptimezoneinformation.unwrap_or(core::mem::zeroed())), lpuniversaltime, core::mem::transmute(lplocaltime)).ok() } + unsafe { SystemTimeToTzSpecificLocalTime(lptimezoneinformation.unwrap_or(core::mem::zeroed()) as _, lpuniversaltime, lplocaltime as _).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); - unsafe { SystemTimeToTzSpecificLocalTimeEx(core::mem::transmute(lptimezoneinformation.unwrap_or(core::mem::zeroed())), lpuniversaltime, core::mem::transmute(lplocaltime)).ok() } + unsafe { SystemTimeToTzSpecificLocalTimeEx(lptimezoneinformation.unwrap_or(core::mem::zeroed()) as _, lpuniversaltime, lplocaltime as _).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); - unsafe { TzSpecificLocalTimeToSystemTime(core::mem::transmute(lptimezoneinformation.unwrap_or(core::mem::zeroed())), lplocaltime, core::mem::transmute(lpuniversaltime)).ok() } + unsafe { TzSpecificLocalTimeToSystemTime(lptimezoneinformation.unwrap_or(core::mem::zeroed()) as _, lplocaltime, lpuniversaltime as _).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); - unsafe { TzSpecificLocalTimeToSystemTimeEx(core::mem::transmute(lptimezoneinformation.unwrap_or(core::mem::zeroed())), lplocaltime, core::mem::transmute(lpuniversaltime)).ok() } + unsafe { TzSpecificLocalTimeToSystemTimeEx(lptimezoneinformation.unwrap_or(core::mem::zeroed()) as _, lplocaltime, lpuniversaltime as _).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 68f4ee5f9f..c21abfc141 100644 --- a/crates/libs/windows/src/Windows/Win32/System/TpmBaseServices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/TpmBaseServices/mod.rs @@ -1,17 +1,17 @@ #[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); - unsafe { 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() } + unsafe { GetDeviceID(core::mem::transmute(pbwindowsaik.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbwindowsaik.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult as _, pfprotectedbytpm.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { 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() } + unsafe { GetDeviceIDString(core::mem::transmute(pszwindowsaik.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszwindowsaik.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcchresult as _, pfprotectedbytpm.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn Tbsi_Context_Create(pcontextparams: *const TBS_CONTEXT_PARAMS, phcontext: *mut *mut core::ffi::c_void) -> u32 { windows_targets::link!("tbs.dll" "system" fn Tbsi_Context_Create(pcontextparams : *const TBS_CONTEXT_PARAMS, phcontext : *mut *mut core::ffi::c_void) -> u32); - unsafe { Tbsi_Context_Create(pcontextparams, core::mem::transmute(phcontext)) } + unsafe { Tbsi_Context_Create(pcontextparams, phcontext as _) } } #[inline] pub unsafe fn Tbsi_Create_Windows_Key(keyhandle: u32) -> u32 { @@ -21,22 +21,22 @@ pub unsafe fn Tbsi_Create_Windows_Key(keyhandle: u32) -> u32 { #[inline] pub unsafe fn Tbsi_GetDeviceInfo(size: u32, info: *mut core::ffi::c_void) -> u32 { windows_targets::link!("tbs.dll" "system" fn Tbsi_GetDeviceInfo(size : u32, info : *mut core::ffi::c_void) -> u32); - unsafe { Tbsi_GetDeviceInfo(size, core::mem::transmute(info)) } + unsafe { Tbsi_GetDeviceInfo(size, info as _) } } #[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); - unsafe { Tbsi_Get_OwnerAuth(hcontext, ownerauthtype, core::mem::transmute(poutputbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(poutputbuflen)) } + unsafe { Tbsi_Get_OwnerAuth(hcontext, ownerauthtype, poutputbuf.unwrap_or(core::mem::zeroed()) as _, poutputbuflen as _) } } #[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); - unsafe { Tbsi_Get_TCG_Log(hcontext, core::mem::transmute(poutputbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(poutputbuflen)) } + unsafe { Tbsi_Get_TCG_Log(hcontext, poutputbuf.unwrap_or(core::mem::zeroed()) as _, poutputbuflen as _) } } #[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); - unsafe { Tbsi_Get_TCG_Log_Ex(logtype, core::mem::transmute(pboutput.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcboutput)) } + unsafe { Tbsi_Get_TCG_Log_Ex(logtype, pboutput.unwrap_or(core::mem::zeroed()) as _, pcboutput as _) } } #[inline] pub unsafe fn Tbsi_Is_Tpm_Present() -> super::super::Foundation::BOOL { @@ -46,7 +46,7 @@ pub unsafe fn Tbsi_Is_Tpm_Present() -> super::super::Foundation::BOOL { #[inline] pub unsafe fn Tbsi_Physical_Presence_Command(hcontext: *const core::ffi::c_void, pabinput: &[u8], paboutput: *mut u8, pcboutput: *mut u32) -> u32 { windows_targets::link!("tbs.dll" "system" fn Tbsi_Physical_Presence_Command(hcontext : *const core::ffi::c_void, pabinput : *const u8, cbinput : u32, paboutput : *mut u8, pcboutput : *mut u32) -> u32); - unsafe { Tbsi_Physical_Presence_Command(hcontext, core::mem::transmute(pabinput.as_ptr()), pabinput.len().try_into().unwrap(), core::mem::transmute(paboutput), core::mem::transmute(pcboutput)) } + unsafe { Tbsi_Physical_Presence_Command(hcontext, core::mem::transmute(pabinput.as_ptr()), pabinput.len().try_into().unwrap(), paboutput as _, pcboutput as _) } } #[inline] pub unsafe fn Tbsi_Revoke_Attestation() -> u32 { @@ -66,7 +66,7 @@ pub unsafe fn Tbsip_Context_Close(hcontext: *const core::ffi::c_void) -> u32 { #[inline] pub unsafe fn Tbsip_Submit_Command(hcontext: *const core::ffi::c_void, locality: TBS_COMMAND_LOCALITY, priority: TBS_COMMAND_PRIORITY, pabcommand: &[u8], pabresult: *mut u8, pcbresult: *mut u32) -> u32 { windows_targets::link!("tbs.dll" "system" fn Tbsip_Submit_Command(hcontext : *const core::ffi::c_void, locality : TBS_COMMAND_LOCALITY, priority : TBS_COMMAND_PRIORITY, pabcommand : *const u8, cbcommand : u32, pabresult : *mut u8, pcbresult : *mut u32) -> u32); - unsafe { Tbsip_Submit_Command(hcontext, locality, priority, core::mem::transmute(pabcommand.as_ptr()), pabcommand.len().try_into().unwrap(), core::mem::transmute(pabresult), core::mem::transmute(pcbresult)) } + unsafe { Tbsip_Submit_Command(hcontext, locality, priority, core::mem::transmute(pabcommand.as_ptr()), pabcommand.len().try_into().unwrap(), pabresult as _, pcbresult as _) } } #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] diff --git a/crates/libs/windows/src/Windows/Win32/System/TransactionServer/mod.rs b/crates/libs/windows/src/Windows/Win32/System/TransactionServer/mod.rs index d9f26fd154..dcb4a8bb73 100644 --- a/crates/libs/windows/src/Windows/Win32/System/TransactionServer/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/TransactionServer/mod.rs @@ -28,10 +28,10 @@ impl ICatalog { } } pub unsafe fn MajorVersion(&self, retval: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).MajorVersion)(windows_core::Interface::as_raw(self), core::mem::transmute(retval)).ok() } + unsafe { (windows_core::Interface::vtable(self).MajorVersion)(windows_core::Interface::as_raw(self), retval as _).ok() } } pub unsafe fn MinorVersion(&self, retval: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).MinorVersion)(windows_core::Interface::as_raw(self), core::mem::transmute(retval)).ok() } + unsafe { (windows_core::Interface::vtable(self).MinorVersion)(windows_core::Interface::as_raw(self), retval as _).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -127,7 +127,7 @@ impl IComponentUtil { } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetCLSIDs(&self, bstrdllfile: &windows_core::BSTR, bstrtypelibfile: &windows_core::BSTR, aclsids: *mut *mut super::Com::SAFEARRAY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCLSIDs)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrdllfile), core::mem::transmute_copy(bstrtypelibfile), core::mem::transmute(aclsids)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCLSIDs)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrdllfile), core::mem::transmute_copy(bstrtypelibfile), aclsids as _).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 4c5df8b097..1f13f876ad 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Variant/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Variant/mod.rs @@ -7,7 +7,7 @@ pub unsafe fn ClearVariantArray(pvars: &mut [VARIANT]) { #[inline] pub unsafe fn DosDateTimeToVariantTime(wdosdate: u16, wdostime: u16, pvtime: *mut f64) -> i32 { windows_targets::link!("oleaut32.dll" "system" fn DosDateTimeToVariantTime(wdosdate : u16, wdostime : u16, pvtime : *mut f64) -> i32); - unsafe { DosDateTimeToVariantTime(wdosdate, wdostime, core::mem::transmute(pvtime)) } + unsafe { DosDateTimeToVariantTime(wdosdate, wdostime, pvtime as _) } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] @@ -147,7 +147,7 @@ pub unsafe fn InitVariantFromVariantArrayElem(varin: *const VARIANT, ielem: u32) #[inline] pub unsafe fn SystemTimeToVariantTime(lpsystemtime: *const super::super::Foundation::SYSTEMTIME, pvtime: *mut f64) -> i32 { windows_targets::link!("oleaut32.dll" "system" fn SystemTimeToVariantTime(lpsystemtime : *const super::super::Foundation:: SYSTEMTIME, pvtime : *mut f64) -> i32); - unsafe { SystemTimeToVariantTime(lpsystemtime, core::mem::transmute(pvtime)) } + unsafe { SystemTimeToVariantTime(lpsystemtime, pvtime as _) } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] @@ -165,13 +165,13 @@ pub unsafe fn VARIANT_UserFree64(param0: *const u32, param1: *const VARIANT) { #[inline] pub unsafe fn VARIANT_UserMarshal(param0: *const u32, param1: *mut u8, param2: *const VARIANT) -> *mut u8 { windows_targets::link!("oleaut32.dll" "system" fn VARIANT_UserMarshal(param0 : *const u32, param1 : *mut u8, param2 : *const VARIANT) -> *mut u8); - unsafe { VARIANT_UserMarshal(param0, core::mem::transmute(param1), core::mem::transmute(param2)) } + unsafe { VARIANT_UserMarshal(param0, param1 as _, core::mem::transmute(param2)) } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] pub unsafe fn VARIANT_UserMarshal64(param0: *const u32, param1: *mut u8, param2: *const VARIANT) -> *mut u8 { windows_targets::link!("oleaut32.dll" "system" fn VARIANT_UserMarshal64(param0 : *const u32, param1 : *mut u8, param2 : *const VARIANT) -> *mut u8); - unsafe { VARIANT_UserMarshal64(param0, core::mem::transmute(param1), core::mem::transmute(param2)) } + unsafe { VARIANT_UserMarshal64(param0, param1 as _, core::mem::transmute(param2)) } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] @@ -333,12 +333,12 @@ pub unsafe fn VariantInit() -> VARIANT { #[inline] pub unsafe fn VariantTimeToDosDateTime(vtime: f64, pwdosdate: *mut u16, pwdostime: *mut u16) -> i32 { windows_targets::link!("oleaut32.dll" "system" fn VariantTimeToDosDateTime(vtime : f64, pwdosdate : *mut u16, pwdostime : *mut u16) -> i32); - unsafe { VariantTimeToDosDateTime(vtime, core::mem::transmute(pwdosdate), core::mem::transmute(pwdostime)) } + unsafe { VariantTimeToDosDateTime(vtime, pwdosdate as _, pwdostime as _) } } #[inline] pub unsafe fn VariantTimeToSystemTime(vtime: f64, lpsystemtime: *mut super::super::Foundation::SYSTEMTIME) -> i32 { windows_targets::link!("oleaut32.dll" "system" fn VariantTimeToSystemTime(vtime : f64, lpsystemtime : *mut super::super::Foundation:: SYSTEMTIME) -> i32); - unsafe { VariantTimeToSystemTime(vtime, core::mem::transmute(lpsystemtime)) } + unsafe { VariantTimeToSystemTime(vtime, lpsystemtime as _) } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] @@ -353,13 +353,13 @@ pub unsafe fn VariantToBoolean(varin: *const VARIANT) -> windows_core::Result windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn VariantToBooleanArray(var : *const VARIANT, prgf : *mut super::super::Foundation:: BOOL, crgn : u32, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { VariantToBooleanArray(core::mem::transmute(var), core::mem::transmute(prgf.as_ptr()), prgf.len().try_into().unwrap(), core::mem::transmute(pcelem)).ok() } + unsafe { VariantToBooleanArray(core::mem::transmute(var), core::mem::transmute(prgf.as_ptr()), prgf.len().try_into().unwrap(), pcelem as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] pub unsafe fn VariantToBooleanArrayAlloc(var: *const VARIANT, pprgf: *mut *mut super::super::Foundation::BOOL, pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn VariantToBooleanArrayAlloc(var : *const VARIANT, pprgf : *mut *mut super::super::Foundation:: BOOL, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { VariantToBooleanArrayAlloc(core::mem::transmute(var), core::mem::transmute(pprgf), core::mem::transmute(pcelem)).ok() } + unsafe { VariantToBooleanArrayAlloc(core::mem::transmute(var), pprgf as _, pcelem as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] @@ -371,13 +371,13 @@ pub unsafe fn VariantToBooleanWithDefault(varin: *const VARIANT, fdefault: bool) #[inline] pub unsafe fn VariantToBuffer(varin: *const VARIANT, pv: *mut core::ffi::c_void, cb: u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn VariantToBuffer(varin : *const VARIANT, pv : *mut core::ffi::c_void, cb : u32) -> windows_core::HRESULT); - unsafe { VariantToBuffer(core::mem::transmute(varin), core::mem::transmute(pv), cb).ok() } + unsafe { VariantToBuffer(core::mem::transmute(varin), pv as _, cb).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] pub unsafe fn VariantToDosDateTime(varin: *const VARIANT, pwdate: *mut u16, pwtime: *mut u16) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn VariantToDosDateTime(varin : *const VARIANT, pwdate : *mut u16, pwtime : *mut u16) -> windows_core::HRESULT); - unsafe { VariantToDosDateTime(core::mem::transmute(varin), core::mem::transmute(pwdate), core::mem::transmute(pwtime)).ok() } + unsafe { VariantToDosDateTime(core::mem::transmute(varin), pwdate as _, pwtime as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] @@ -392,13 +392,13 @@ pub unsafe fn VariantToDouble(varin: *const VARIANT) -> windows_core::Result windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn VariantToDoubleArray(var : *const VARIANT, prgn : *mut f64, crgn : u32, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { VariantToDoubleArray(core::mem::transmute(var), core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), core::mem::transmute(pcelem)).ok() } + unsafe { VariantToDoubleArray(core::mem::transmute(var), core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), pcelem as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] pub unsafe fn VariantToDoubleArrayAlloc(var: *const VARIANT, pprgn: *mut *mut f64, pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn VariantToDoubleArrayAlloc(var : *const VARIANT, pprgn : *mut *mut f64, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { VariantToDoubleArrayAlloc(core::mem::transmute(var), core::mem::transmute(pprgn), core::mem::transmute(pcelem)).ok() } + unsafe { VariantToDoubleArrayAlloc(core::mem::transmute(var), pprgn as _, pcelem as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] @@ -437,13 +437,13 @@ pub unsafe fn VariantToInt16(varin: *const VARIANT) -> windows_core::Result #[inline] pub unsafe fn VariantToInt16Array(var: *const VARIANT, prgn: &mut [i16], pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn VariantToInt16Array(var : *const VARIANT, prgn : *mut i16, crgn : u32, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { VariantToInt16Array(core::mem::transmute(var), core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), core::mem::transmute(pcelem)).ok() } + unsafe { VariantToInt16Array(core::mem::transmute(var), core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), pcelem as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] pub unsafe fn VariantToInt16ArrayAlloc(var: *const VARIANT, pprgn: *mut *mut i16, pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn VariantToInt16ArrayAlloc(var : *const VARIANT, pprgn : *mut *mut i16, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { VariantToInt16ArrayAlloc(core::mem::transmute(var), core::mem::transmute(pprgn), core::mem::transmute(pcelem)).ok() } + unsafe { VariantToInt16ArrayAlloc(core::mem::transmute(var), pprgn as _, pcelem as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] @@ -464,13 +464,13 @@ pub unsafe fn VariantToInt32(varin: *const VARIANT) -> windows_core::Result #[inline] pub unsafe fn VariantToInt32Array(var: *const VARIANT, prgn: &mut [i32], pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn VariantToInt32Array(var : *const VARIANT, prgn : *mut i32, crgn : u32, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { VariantToInt32Array(core::mem::transmute(var), core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), core::mem::transmute(pcelem)).ok() } + unsafe { VariantToInt32Array(core::mem::transmute(var), core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), pcelem as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] pub unsafe fn VariantToInt32ArrayAlloc(var: *const VARIANT, pprgn: *mut *mut i32, pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn VariantToInt32ArrayAlloc(var : *const VARIANT, pprgn : *mut *mut i32, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { VariantToInt32ArrayAlloc(core::mem::transmute(var), core::mem::transmute(pprgn), core::mem::transmute(pcelem)).ok() } + unsafe { VariantToInt32ArrayAlloc(core::mem::transmute(var), pprgn as _, pcelem as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] @@ -491,13 +491,13 @@ pub unsafe fn VariantToInt64(varin: *const VARIANT) -> windows_core::Result #[inline] pub unsafe fn VariantToInt64Array(var: *const VARIANT, prgn: &mut [i64], pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn VariantToInt64Array(var : *const VARIANT, prgn : *mut i64, crgn : u32, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { VariantToInt64Array(core::mem::transmute(var), core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), core::mem::transmute(pcelem)).ok() } + unsafe { VariantToInt64Array(core::mem::transmute(var), core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), pcelem as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] pub unsafe fn VariantToInt64ArrayAlloc(var: *const VARIANT, pprgn: *mut *mut i64, pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn VariantToInt64ArrayAlloc(var : *const VARIANT, pprgn : *mut *mut i64, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { VariantToInt64ArrayAlloc(core::mem::transmute(var), core::mem::transmute(pprgn), core::mem::transmute(pcelem)).ok() } + unsafe { VariantToInt64ArrayAlloc(core::mem::transmute(var), pprgn as _, pcelem as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] @@ -524,13 +524,13 @@ pub unsafe fn VariantToStringAlloc(varin: *const VARIANT) -> windows_core::Resul #[inline] pub unsafe fn VariantToStringArray(var: *const VARIANT, prgsz: &mut [windows_core::PWSTR], pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn VariantToStringArray(var : *const VARIANT, prgsz : *mut windows_core::PWSTR, crgsz : u32, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { VariantToStringArray(core::mem::transmute(var), core::mem::transmute(prgsz.as_ptr()), prgsz.len().try_into().unwrap(), core::mem::transmute(pcelem)).ok() } + unsafe { VariantToStringArray(core::mem::transmute(var), core::mem::transmute(prgsz.as_ptr()), prgsz.len().try_into().unwrap(), pcelem as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] pub unsafe fn VariantToStringArrayAlloc(var: *const VARIANT, pprgsz: *mut *mut windows_core::PWSTR, pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn VariantToStringArrayAlloc(var : *const VARIANT, pprgsz : *mut *mut windows_core::PWSTR, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { VariantToStringArrayAlloc(core::mem::transmute(var), core::mem::transmute(pprgsz), core::mem::transmute(pcelem)).ok() } + unsafe { VariantToStringArrayAlloc(core::mem::transmute(var), pprgsz as _, pcelem as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] @@ -554,13 +554,13 @@ pub unsafe fn VariantToUInt16(varin: *const VARIANT) -> windows_core::Result windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn VariantToUInt16Array(var : *const VARIANT, prgn : *mut u16, crgn : u32, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { VariantToUInt16Array(core::mem::transmute(var), core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), core::mem::transmute(pcelem)).ok() } + unsafe { VariantToUInt16Array(core::mem::transmute(var), core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), pcelem as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] pub unsafe fn VariantToUInt16ArrayAlloc(var: *const VARIANT, pprgn: *mut *mut u16, pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn VariantToUInt16ArrayAlloc(var : *const VARIANT, pprgn : *mut *mut u16, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { VariantToUInt16ArrayAlloc(core::mem::transmute(var), core::mem::transmute(pprgn), core::mem::transmute(pcelem)).ok() } + unsafe { VariantToUInt16ArrayAlloc(core::mem::transmute(var), pprgn as _, pcelem as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] @@ -581,13 +581,13 @@ pub unsafe fn VariantToUInt32(varin: *const VARIANT) -> windows_core::Result windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn VariantToUInt32Array(var : *const VARIANT, prgn : *mut u32, crgn : u32, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { VariantToUInt32Array(core::mem::transmute(var), core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), core::mem::transmute(pcelem)).ok() } + unsafe { VariantToUInt32Array(core::mem::transmute(var), core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), pcelem as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] pub unsafe fn VariantToUInt32ArrayAlloc(var: *const VARIANT, pprgn: *mut *mut u32, pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn VariantToUInt32ArrayAlloc(var : *const VARIANT, pprgn : *mut *mut u32, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { VariantToUInt32ArrayAlloc(core::mem::transmute(var), core::mem::transmute(pprgn), core::mem::transmute(pcelem)).ok() } + unsafe { VariantToUInt32ArrayAlloc(core::mem::transmute(var), pprgn as _, pcelem as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] @@ -608,13 +608,13 @@ pub unsafe fn VariantToUInt64(varin: *const VARIANT) -> windows_core::Result windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn VariantToUInt64Array(var : *const VARIANT, prgn : *mut u64, crgn : u32, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { VariantToUInt64Array(core::mem::transmute(var), core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), core::mem::transmute(pcelem)).ok() } + unsafe { VariantToUInt64Array(core::mem::transmute(var), core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), pcelem as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] pub unsafe fn VariantToUInt64ArrayAlloc(var: *const VARIANT, pprgn: *mut *mut u64, pcelem: *mut u32) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn VariantToUInt64ArrayAlloc(var : *const VARIANT, pprgn : *mut *mut u64, pcelem : *mut u32) -> windows_core::HRESULT); - unsafe { VariantToUInt64ArrayAlloc(core::mem::transmute(var), core::mem::transmute(pprgn), core::mem::transmute(pcelem)).ok() } + unsafe { VariantToUInt64ArrayAlloc(core::mem::transmute(var), pprgn as _, pcelem as _).ok() } } #[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 d1397fdf0b..2519249488 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 @@ -55,7 +55,7 @@ impl ICompositionDrawingSurfaceInterop { T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - unsafe { (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__)) } + unsafe { (windows_core::Interface::vtable(self).BeginDraw)(windows_core::Interface::as_raw(self), updaterect.unwrap_or(core::mem::zeroed()) as _, &T::IID, &mut result__, updateoffset as _).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn EndDraw(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).EndDraw)(windows_core::Interface::as_raw(self)).ok() } @@ -64,7 +64,7 @@ impl ICompositionDrawingSurfaceInterop { unsafe { (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<()> { - unsafe { (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())), offsetx, offsety).ok() } + unsafe { (windows_core::Interface::vtable(self).Scroll)(windows_core::Interface::as_raw(self), scrollrect.unwrap_or(core::mem::zeroed()) as _, cliprect.unwrap_or(core::mem::zeroed()) as _, offsetx, offsety).ok() } } pub unsafe fn ResumeDraw(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ResumeDraw)(windows_core::Interface::as_raw(self)).ok() } @@ -157,7 +157,7 @@ impl ICompositionDrawingSurfaceInterop2 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CopySurface)(windows_core::Interface::as_raw(self), destinationresource.param().abi(), destinationoffsetx, destinationoffsety, core::mem::transmute(sourcerectangle.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).CopySurface)(windows_core::Interface::as_raw(self), destinationresource.param().abi(), destinationoffsetx, destinationoffsety, sourcerectangle.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -244,7 +244,7 @@ windows_core::imp::define_interface!(ICompositionTextureInterop, ICompositionTex windows_core::imp::interface_hierarchy!(ICompositionTextureInterop, windows_core::IUnknown); impl ICompositionTextureInterop { pub unsafe fn GetAvailableFence(&self, fencevalue: *mut u64, iid: *const windows_core::GUID, availablefence: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAvailableFence)(windows_core::Interface::as_raw(self), core::mem::transmute(fencevalue), iid, core::mem::transmute(availablefence)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAvailableFence)(windows_core::Interface::as_raw(self), fencevalue as _, iid, availablefence as _).ok() } } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/System/WinRT/Graphics/Direct2D/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/Graphics/Direct2D/mod.rs index 5f0036cc36..8568c0489d 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/Graphics/Direct2D/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/Graphics/Direct2D/mod.rs @@ -102,7 +102,7 @@ impl IGraphicsEffectD2D1Interop { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetNamedPropertyMapping)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(index), core::mem::transmute(mapping)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNamedPropertyMapping)(windows_core::Interface::as_raw(self), name.param().abi(), index as _, mapping as _).ok() } } pub unsafe fn GetPropertyCount(&self) -> windows_core::Result { unsafe { 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 8057dc6f4f..9886eab6fb 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(); - unsafe { (windows_core::Interface::vtable(self).CreateFromMF2DBuffer2)(windows_core::Interface::as_raw(self), data.param().abi(), subtype, width, height, forcereadonly.into(), core::mem::transmute(mindisplayaperture.unwrap_or(core::mem::zeroed())), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } + unsafe { (windows_core::Interface::vtable(self).CreateFromMF2DBuffer2)(windows_core::Interface::as_raw(self), data.param().abi(), subtype, width, height, forcereadonly.into(), mindisplayaperture.unwrap_or(core::mem::zeroed()) as _, &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/ML/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/ML/mod.rs index 1c3c5d3ef0..cee34d3519 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/ML/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/ML/mod.rs @@ -157,7 +157,7 @@ windows_core::imp::define_interface!(ITensorNative, ITensorNative_Vtbl, 0x52f547 windows_core::imp::interface_hierarchy!(ITensorNative, windows_core::IUnknown); impl ITensorNative { pub unsafe fn GetBuffer(&self, value: *mut *mut u8, capacity: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(value), core::mem::transmute(capacity)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), value as _, capacity as _).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn GetD3D12Resource(&self) -> windows_core::Result { @@ -222,7 +222,7 @@ impl ITensorStaticsNative { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateFromD3D12Resource)(windows_core::Interface::as_raw(self), value.param().abi(), core::mem::transmute(shape), shapecount, core::mem::transmute(result)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateFromD3D12Resource)(windows_core::Interface::as_raw(self), value.param().abi(), shape as _, shapecount, core::mem::transmute(result)).ok() } } } #[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 4c6a9a22fd..456cd1a891 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 @@ -143,7 +143,7 @@ impl IVideoFrameNativeFactory { T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - unsafe { (windows_core::Interface::vtable(self).CreateFromMFSample)(windows_core::Interface::as_raw(self), data.param().abi(), subtype, width, height, forcereadonly.into(), core::mem::transmute(mindisplayaperture.unwrap_or(core::mem::zeroed())), device.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } + unsafe { (windows_core::Interface::vtable(self).CreateFromMFSample)(windows_core::Interface::as_raw(self), data.param().abi(), subtype, width, height, forcereadonly.into(), mindisplayaperture.unwrap_or(core::mem::zeroed()) as _, 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 14102fb3cb..bdc410a527 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 @@ -1,7 +1,7 @@ #[inline] pub unsafe fn MetaDataGetDispenser(rclsid: *const windows_core::GUID, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("rometadata.dll" "system" fn MetaDataGetDispenser(rclsid : *const windows_core::GUID, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { MetaDataGetDispenser(rclsid, riid, core::mem::transmute(ppv)).ok() } + unsafe { MetaDataGetDispenser(rclsid, riid, ppv as _).ok() } } #[cfg(feature = "Foundation_Collections")] #[inline] @@ -32,7 +32,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); - unsafe { 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() } + unsafe { RoGetMetaDataFile(core::mem::transmute_copy(name), metadatadispenser.param().abi(), metadatafilepath.unwrap_or(core::mem::zeroed()) as _, metadataimport.unwrap_or(core::mem::zeroed()) as _, typedeftoken.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn RoGetParameterizedTypeInstanceIID(nameelements: &[windows_core::PCWSTR], metadatalocator: P2, iid: *mut windows_core::GUID, pextra: Option<*mut ROPARAMIIDHANDLE>) -> windows_core::Result<()> @@ -40,7 +40,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); - unsafe { 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() } + unsafe { RoGetParameterizedTypeInstanceIID(nameelements.len().try_into().unwrap(), core::mem::transmute(nameelements.as_ptr()), metadatalocator.param().abi(), iid as _, pextra.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn RoIsApiContractMajorVersionPresent(name: P0, majorversion: u16) -> windows_core::Result @@ -72,7 +72,7 @@ pub unsafe fn RoParameterizedTypeExtraGetTypeSignature(extra: ROPARAMIIDHANDLE) #[inline] pub unsafe fn RoParseTypeName(typename: &windows_core::HSTRING, partscount: *mut u32, typenameparts: *mut *mut windows_core::HSTRING) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-ro-typeresolution-l1-1-0.dll" "system" fn RoParseTypeName(typename : * mut core::ffi::c_void, partscount : *mut u32, typenameparts : *mut *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { RoParseTypeName(core::mem::transmute_copy(typename), core::mem::transmute(partscount), core::mem::transmute(typenameparts)).ok() } + unsafe { RoParseTypeName(core::mem::transmute_copy(typename), partscount as _, typenameparts as _).ok() } } #[inline] pub unsafe fn RoResolveNamespace(name: &windows_core::HSTRING, windowsmetadatadir: &windows_core::HSTRING, packagegraphdirs: Option<&[windows_core::HSTRING]>, metadatafilepathscount: Option<*mut u32>, metadatafilepaths: Option<*mut *mut windows_core::HSTRING>, subnamespacescount: Option<*mut u32>, subnamespaces: Option<*mut *mut windows_core::HSTRING>) -> windows_core::Result<()> { @@ -83,10 +83,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::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())), + metadatafilepathscount.unwrap_or(core::mem::zeroed()) as _, + metadatafilepaths.unwrap_or(core::mem::zeroed()) as _, + subnamespacescount.unwrap_or(core::mem::zeroed()) as _, + subnamespaces.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -463,16 +463,16 @@ impl ICeeGen { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EmitString)(windows_core::Interface::as_raw(self), lpstring.param().abi(), core::mem::transmute(rva)).ok() } + unsafe { (windows_core::Interface::vtable(self).EmitString)(windows_core::Interface::as_raw(self), lpstring.param().abi(), rva as _).ok() } } pub unsafe fn GetString(&self, rva: u32, lpstring: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetString)(windows_core::Interface::as_raw(self), rva, core::mem::transmute(lpstring.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetString)(windows_core::Interface::as_raw(self), rva, lpstring.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn AllocateMethodBuffer(&self, cchbuffer: u32, lpbuffer: *mut *mut u8, rva: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AllocateMethodBuffer)(windows_core::Interface::as_raw(self), cchbuffer, core::mem::transmute(lpbuffer), core::mem::transmute(rva)).ok() } + unsafe { (windows_core::Interface::vtable(self).AllocateMethodBuffer)(windows_core::Interface::as_raw(self), cchbuffer, lpbuffer as _, rva as _).ok() } } pub unsafe fn GetMethodBuffer(&self, rva: u32, lpbuffer: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMethodBuffer)(windows_core::Interface::as_raw(self), rva, core::mem::transmute(lpbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMethodBuffer)(windows_core::Interface::as_raw(self), rva, lpbuffer as _).ok() } } pub unsafe fn GetIMapTokenIface(&self) -> windows_core::Result { unsafe { @@ -484,34 +484,34 @@ impl ICeeGen { unsafe { (windows_core::Interface::vtable(self).GenerateCeeFile)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetIlSection(&self, section: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIlSection)(windows_core::Interface::as_raw(self), core::mem::transmute(section)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIlSection)(windows_core::Interface::as_raw(self), section as _).ok() } } pub unsafe fn GetStringSection(&self, section: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStringSection)(windows_core::Interface::as_raw(self), core::mem::transmute(section)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStringSection)(windows_core::Interface::as_raw(self), section as _).ok() } } pub unsafe fn AddSectionReloc(&self, section: *mut core::ffi::c_void, offset: u32, relativeto: *mut core::ffi::c_void, reloctype: CeeSectionRelocType) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AddSectionReloc)(windows_core::Interface::as_raw(self), core::mem::transmute(section), offset, core::mem::transmute(relativeto), reloctype).ok() } + unsafe { (windows_core::Interface::vtable(self).AddSectionReloc)(windows_core::Interface::as_raw(self), section as _, offset, relativeto as _, reloctype).ok() } } pub unsafe fn GetSectionCreate(&self, name: P0, flags: u32, section: *mut *mut core::ffi::c_void) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetSectionCreate)(windows_core::Interface::as_raw(self), name.param().abi(), flags, core::mem::transmute(section)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSectionCreate)(windows_core::Interface::as_raw(self), name.param().abi(), flags, section as _).ok() } } pub unsafe fn GetSectionDataLen(&self, section: *mut core::ffi::c_void, datalen: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSectionDataLen)(windows_core::Interface::as_raw(self), core::mem::transmute(section), core::mem::transmute(datalen)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSectionDataLen)(windows_core::Interface::as_raw(self), section as _, datalen as _).ok() } } pub unsafe fn GetSectionBlock(&self, section: *mut core::ffi::c_void, len: u32, align: u32, ppbytes: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSectionBlock)(windows_core::Interface::as_raw(self), core::mem::transmute(section), len, align, core::mem::transmute(ppbytes)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSectionBlock)(windows_core::Interface::as_raw(self), section as _, len, align, ppbytes as _).ok() } } pub unsafe fn TruncateSection(&self, section: *mut core::ffi::c_void, len: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TruncateSection)(windows_core::Interface::as_raw(self), core::mem::transmute(section), len).ok() } + unsafe { (windows_core::Interface::vtable(self).TruncateSection)(windows_core::Interface::as_raw(self), section as _, len).ok() } } pub unsafe fn GenerateCeeMemoryImage(&self, ppimage: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GenerateCeeMemoryImage)(windows_core::Interface::as_raw(self), core::mem::transmute(ppimage)).ok() } + unsafe { (windows_core::Interface::vtable(self).GenerateCeeMemoryImage)(windows_core::Interface::as_raw(self), ppimage as _).ok() } } pub unsafe fn ComputePointer(&self, section: *mut core::ffi::c_void, rva: u32, lpbuffer: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ComputePointer)(windows_core::Interface::as_raw(self), core::mem::transmute(section), rva, core::mem::transmute(lpbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).ComputePointer)(windows_core::Interface::as_raw(self), section as _, rva, lpbuffer as _).ok() } } } #[repr(C)] @@ -952,31 +952,31 @@ impl IMetaDataAssemblyEmit { where P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DefineAssembly)(windows_core::Interface::as_raw(self), pbpublickey, cbpublickey, ulhashalgid, szname.param().abi(), pmetadata, dwassemblyflags, core::mem::transmute(pma)).ok() } + unsafe { (windows_core::Interface::vtable(self).DefineAssembly)(windows_core::Interface::as_raw(self), pbpublickey, cbpublickey, ulhashalgid, szname.param().abi(), pmetadata, dwassemblyflags, pma as _).ok() } } pub unsafe fn DefineAssemblyRef(&self, pbpublickeyortoken: *const core::ffi::c_void, cbpublickeyortoken: u32, szname: P2, pmetadata: *const ASSEMBLYMETADATA, pbhashvalue: *const core::ffi::c_void, cbhashvalue: u32, dwassemblyrefflags: u32, pmdar: *mut u32) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DefineAssemblyRef)(windows_core::Interface::as_raw(self), pbpublickeyortoken, cbpublickeyortoken, szname.param().abi(), pmetadata, pbhashvalue, cbhashvalue, dwassemblyrefflags, core::mem::transmute(pmdar)).ok() } + unsafe { (windows_core::Interface::vtable(self).DefineAssemblyRef)(windows_core::Interface::as_raw(self), pbpublickeyortoken, cbpublickeyortoken, szname.param().abi(), pmetadata, pbhashvalue, cbhashvalue, dwassemblyrefflags, pmdar as _).ok() } } pub unsafe fn DefineFile(&self, szname: P0, pbhashvalue: *const core::ffi::c_void, cbhashvalue: u32, dwfileflags: u32, pmdf: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DefineFile)(windows_core::Interface::as_raw(self), szname.param().abi(), pbhashvalue, cbhashvalue, dwfileflags, core::mem::transmute(pmdf)).ok() } + unsafe { (windows_core::Interface::vtable(self).DefineFile)(windows_core::Interface::as_raw(self), szname.param().abi(), pbhashvalue, cbhashvalue, dwfileflags, pmdf as _).ok() } } pub unsafe fn DefineExportedType(&self, szname: P0, tkimplementation: u32, tktypedef: u32, dwexportedtypeflags: u32, pmdct: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DefineExportedType)(windows_core::Interface::as_raw(self), szname.param().abi(), tkimplementation, tktypedef, dwexportedtypeflags, core::mem::transmute(pmdct)).ok() } + unsafe { (windows_core::Interface::vtable(self).DefineExportedType)(windows_core::Interface::as_raw(self), szname.param().abi(), tkimplementation, tktypedef, dwexportedtypeflags, pmdct as _).ok() } } pub unsafe fn DefineManifestResource(&self, szname: P0, tkimplementation: u32, dwoffset: u32, dwresourceflags: u32, pmdmr: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DefineManifestResource)(windows_core::Interface::as_raw(self), szname.param().abi(), tkimplementation, dwoffset, dwresourceflags, core::mem::transmute(pmdmr)).ok() } + unsafe { (windows_core::Interface::vtable(self).DefineManifestResource)(windows_core::Interface::as_raw(self), szname.param().abi(), tkimplementation, dwoffset, dwresourceflags, pmdmr as _).ok() } } pub unsafe fn SetAssemblyProps(&self, pma: u32, pbpublickey: *const core::ffi::c_void, cbpublickey: u32, ulhashalgid: u32, szname: P4, pmetadata: *const ASSEMBLYMETADATA, dwassemblyflags: u32) -> windows_core::Result<()> where @@ -1111,49 +1111,49 @@ windows_core::imp::define_interface!(IMetaDataAssemblyImport, IMetaDataAssemblyI windows_core::imp::interface_hierarchy!(IMetaDataAssemblyImport, windows_core::IUnknown); impl IMetaDataAssemblyImport { pub unsafe fn GetAssemblyProps(&self, mda: u32, ppbpublickey: *const *const core::ffi::c_void, pcbpublickey: *mut u32, pulhashalgid: *mut u32, szname: Option<&mut [u16]>, pchname: *mut u32, pmetadata: *mut ASSEMBLYMETADATA, pdwassemblyflags: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAssemblyProps)(windows_core::Interface::as_raw(self), mda, ppbpublickey, core::mem::transmute(pcbpublickey), core::mem::transmute(pulhashalgid), 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(pchname), core::mem::transmute(pmetadata), core::mem::transmute(pdwassemblyflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAssemblyProps)(windows_core::Interface::as_raw(self), mda, ppbpublickey, pcbpublickey as _, pulhashalgid as _, 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()), pchname as _, pmetadata as _, pdwassemblyflags as _).ok() } } pub unsafe fn GetAssemblyRefProps(&self, mdar: u32, ppbpublickeyortoken: *const *const core::ffi::c_void, pcbpublickeyortoken: *mut u32, szname: Option<&mut [u16]>, pchname: *mut u32, pmetadata: *mut ASSEMBLYMETADATA, ppbhashvalue: *const *const core::ffi::c_void, pcbhashvalue: *mut u32, pdwassemblyrefflags: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAssemblyRefProps)(windows_core::Interface::as_raw(self), mdar, ppbpublickeyortoken, core::mem::transmute(pcbpublickeyortoken), 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(pchname), core::mem::transmute(pmetadata), ppbhashvalue, core::mem::transmute(pcbhashvalue), core::mem::transmute(pdwassemblyrefflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAssemblyRefProps)(windows_core::Interface::as_raw(self), mdar, ppbpublickeyortoken, pcbpublickeyortoken as _, 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()), pchname as _, pmetadata as _, ppbhashvalue, pcbhashvalue as _, pdwassemblyrefflags as _).ok() } } pub unsafe fn GetFileProps(&self, mdf: u32, szname: Option<&mut [u16]>, pchname: *mut u32, ppbhashvalue: *const *const core::ffi::c_void, pcbhashvalue: *mut u32, pdwfileflags: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFileProps)(windows_core::Interface::as_raw(self), mdf, 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(pchname), ppbhashvalue, core::mem::transmute(pcbhashvalue), core::mem::transmute(pdwfileflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFileProps)(windows_core::Interface::as_raw(self), mdf, 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()), pchname as _, ppbhashvalue, pcbhashvalue as _, pdwfileflags as _).ok() } } pub unsafe fn GetExportedTypeProps(&self, mdct: u32, szname: Option<&mut [u16]>, pchname: *mut u32, ptkimplementation: *mut u32, ptktypedef: *mut u32, pdwexportedtypeflags: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetExportedTypeProps)(windows_core::Interface::as_raw(self), mdct, 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(pchname), core::mem::transmute(ptkimplementation), core::mem::transmute(ptktypedef), core::mem::transmute(pdwexportedtypeflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetExportedTypeProps)(windows_core::Interface::as_raw(self), mdct, 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()), pchname as _, ptkimplementation as _, ptktypedef as _, pdwexportedtypeflags as _).ok() } } pub unsafe fn GetManifestResourceProps(&self, mdmr: u32, szname: Option<&mut [u16]>, pchname: *mut u32, ptkimplementation: *mut u32, pdwoffset: *mut u32, pdwresourceflags: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetManifestResourceProps)(windows_core::Interface::as_raw(self), mdmr, 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(pchname), core::mem::transmute(ptkimplementation), core::mem::transmute(pdwoffset), core::mem::transmute(pdwresourceflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetManifestResourceProps)(windows_core::Interface::as_raw(self), mdmr, 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()), pchname as _, ptkimplementation as _, pdwoffset as _, pdwresourceflags as _).ok() } } pub unsafe fn EnumAssemblyRefs(&self, phenum: *mut *mut core::ffi::c_void, rassemblyrefs: *mut u32, cmax: u32, pctokens: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumAssemblyRefs)(windows_core::Interface::as_raw(self), core::mem::transmute(phenum), core::mem::transmute(rassemblyrefs), cmax, core::mem::transmute(pctokens)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumAssemblyRefs)(windows_core::Interface::as_raw(self), phenum as _, rassemblyrefs as _, cmax, pctokens as _).ok() } } pub unsafe fn EnumFiles(&self, phenum: *mut *mut core::ffi::c_void, rfiles: *mut u32, cmax: u32, pctokens: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumFiles)(windows_core::Interface::as_raw(self), core::mem::transmute(phenum), core::mem::transmute(rfiles), cmax, core::mem::transmute(pctokens)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumFiles)(windows_core::Interface::as_raw(self), phenum as _, rfiles as _, cmax, pctokens as _).ok() } } pub unsafe fn EnumExportedTypes(&self, phenum: *mut *mut core::ffi::c_void, rexportedtypes: *mut u32, cmax: u32, pctokens: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumExportedTypes)(windows_core::Interface::as_raw(self), core::mem::transmute(phenum), core::mem::transmute(rexportedtypes), cmax, core::mem::transmute(pctokens)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumExportedTypes)(windows_core::Interface::as_raw(self), phenum as _, rexportedtypes as _, cmax, pctokens as _).ok() } } pub unsafe fn EnumManifestResources(&self, phenum: *mut *mut core::ffi::c_void, rmanifestresources: *mut u32, cmax: u32, pctokens: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumManifestResources)(windows_core::Interface::as_raw(self), core::mem::transmute(phenum), core::mem::transmute(rmanifestresources), cmax, core::mem::transmute(pctokens)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumManifestResources)(windows_core::Interface::as_raw(self), phenum as _, rmanifestresources as _, cmax, pctokens as _).ok() } } pub unsafe fn GetAssemblyFromScope(&self, ptkassembly: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAssemblyFromScope)(windows_core::Interface::as_raw(self), core::mem::transmute(ptkassembly)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAssemblyFromScope)(windows_core::Interface::as_raw(self), ptkassembly as _).ok() } } pub unsafe fn FindExportedTypeByName(&self, szname: P0, mdtexportedtype: u32, ptkexportedtype: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindExportedTypeByName)(windows_core::Interface::as_raw(self), szname.param().abi(), mdtexportedtype, core::mem::transmute(ptkexportedtype)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindExportedTypeByName)(windows_core::Interface::as_raw(self), szname.param().abi(), mdtexportedtype, ptkexportedtype as _).ok() } } pub unsafe fn FindManifestResourceByName(&self, szname: P0, ptkmanifestresource: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindManifestResourceByName)(windows_core::Interface::as_raw(self), szname.param().abi(), core::mem::transmute(ptkmanifestresource)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindManifestResourceByName)(windows_core::Interface::as_raw(self), szname.param().abi(), ptkmanifestresource as _).ok() } } pub unsafe fn CloseEnum(&self, henum: *mut core::ffi::c_void) { - unsafe { (windows_core::Interface::vtable(self).CloseEnum)(windows_core::Interface::as_raw(self), core::mem::transmute(henum)) } + unsafe { (windows_core::Interface::vtable(self).CloseEnum)(windows_core::Interface::as_raw(self), henum as _) } } pub unsafe fn FindAssembliesByName(&self, szappbase: P0, szprivatebin: P1, szassemblyname: P2, ppiunk: *mut Option, cmax: u32, pcassemblies: *mut u32) -> windows_core::Result<()> where @@ -1161,7 +1161,7 @@ impl IMetaDataAssemblyImport { P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindAssembliesByName)(windows_core::Interface::as_raw(self), szappbase.param().abi(), szprivatebin.param().abi(), szassemblyname.param().abi(), core::mem::transmute(ppiunk), cmax, core::mem::transmute(pcassemblies)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindAssembliesByName)(windows_core::Interface::as_raw(self), szappbase.param().abi(), szprivatebin.param().abi(), szassemblyname.param().abi(), core::mem::transmute(ppiunk), cmax, pcassemblies as _).ok() } } } #[repr(C)] @@ -1422,7 +1422,7 @@ impl IMetaDataDispenserEx { } } pub unsafe fn GetCORSystemDirectory(&self, szbuffer: Option<&mut [u16]>, pchbuffer: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCORSystemDirectory)(windows_core::Interface::as_raw(self), core::mem::transmute(szbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pchbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCORSystemDirectory)(windows_core::Interface::as_raw(self), core::mem::transmute(szbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pchbuffer as _).ok() } } pub unsafe fn FindAssembly(&self, szappbase: P0, szprivatebin: P1, szglobalbin: P2, szassemblyname: P3, szname: P4, cchname: u32, pcname: *mut u32) -> windows_core::Result<()> where @@ -1432,7 +1432,7 @@ impl IMetaDataDispenserEx { P3: windows_core::Param, P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindAssembly)(windows_core::Interface::as_raw(self), szappbase.param().abi(), szprivatebin.param().abi(), szglobalbin.param().abi(), szassemblyname.param().abi(), szname.param().abi(), cchname, core::mem::transmute(pcname)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindAssembly)(windows_core::Interface::as_raw(self), szappbase.param().abi(), szprivatebin.param().abi(), szglobalbin.param().abi(), szassemblyname.param().abi(), szname.param().abi(), cchname, pcname as _).ok() } } pub unsafe fn FindAssemblyModule(&self, szappbase: P0, szprivatebin: P1, szglobalbin: P2, szassemblyname: P3, szmodulename: P4, szname: Option<&mut [u16]>, pcname: *mut u32) -> windows_core::Result<()> where @@ -1442,7 +1442,7 @@ impl IMetaDataDispenserEx { P3: windows_core::Param, P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindAssemblyModule)(windows_core::Interface::as_raw(self), szappbase.param().abi(), szprivatebin.param().abi(), szglobalbin.param().abi(), szassemblyname.param().abi(), szmodulename.param().abi(), 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(pcname)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindAssemblyModule)(windows_core::Interface::as_raw(self), szappbase.param().abi(), szprivatebin.param().abi(), szglobalbin.param().abi(), szassemblyname.param().abi(), szmodulename.param().abi(), 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()), pcname as _).ok() } } } #[repr(C)] @@ -1557,19 +1557,19 @@ impl IMetaDataEmit { unsafe { (windows_core::Interface::vtable(self).SaveToStream)(windows_core::Interface::as_raw(self), pistream.param().abi(), dwsaveflags).ok() } } pub unsafe fn GetSaveSize(&self, fsave: CorSaveSize, pdwsavesize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSaveSize)(windows_core::Interface::as_raw(self), fsave, core::mem::transmute(pdwsavesize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSaveSize)(windows_core::Interface::as_raw(self), fsave, pdwsavesize as _).ok() } } pub unsafe fn DefineTypeDef(&self, sztypedef: P0, dwtypedefflags: u32, tkextends: u32, rtkimplements: *mut u32, ptd: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DefineTypeDef)(windows_core::Interface::as_raw(self), sztypedef.param().abi(), dwtypedefflags, tkextends, core::mem::transmute(rtkimplements), core::mem::transmute(ptd)).ok() } + unsafe { (windows_core::Interface::vtable(self).DefineTypeDef)(windows_core::Interface::as_raw(self), sztypedef.param().abi(), dwtypedefflags, tkextends, rtkimplements as _, ptd as _).ok() } } pub unsafe fn DefineNestedType(&self, sztypedef: P0, dwtypedefflags: u32, tkextends: u32, rtkimplements: *mut u32, tdencloser: u32, ptd: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DefineNestedType)(windows_core::Interface::as_raw(self), sztypedef.param().abi(), dwtypedefflags, tkextends, core::mem::transmute(rtkimplements), tdencloser, core::mem::transmute(ptd)).ok() } + unsafe { (windows_core::Interface::vtable(self).DefineNestedType)(windows_core::Interface::as_raw(self), sztypedef.param().abi(), dwtypedefflags, tkextends, rtkimplements as _, tdencloser, ptd as _).ok() } } pub unsafe fn SetHandler(&self, punk: P0) -> windows_core::Result<()> where @@ -1581,7 +1581,7 @@ impl IMetaDataEmit { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DefineMethod)(windows_core::Interface::as_raw(self), td, szname.param().abi(), dwmethodflags, core::mem::transmute(pvsigblob), cbsigblob, ulcoderva, dwimplflags, core::mem::transmute(pmd)).ok() } + unsafe { (windows_core::Interface::vtable(self).DefineMethod)(windows_core::Interface::as_raw(self), td, szname.param().abi(), dwmethodflags, pvsigblob as _, cbsigblob, ulcoderva, dwimplflags, pmd as _).ok() } } pub unsafe fn DefineMethodImpl(&self, td: u32, tkbody: u32, tkdecl: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DefineMethodImpl)(windows_core::Interface::as_raw(self), td, tkbody, tkdecl).ok() } @@ -1590,7 +1590,7 @@ impl IMetaDataEmit { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DefineTypeRefByName)(windows_core::Interface::as_raw(self), tkresolutionscope, szname.param().abi(), core::mem::transmute(ptr)).ok() } + unsafe { (windows_core::Interface::vtable(self).DefineTypeRefByName)(windows_core::Interface::as_raw(self), tkresolutionscope, szname.param().abi(), ptr as _).ok() } } pub unsafe fn DefineImportType(&self, passemimport: P0, pbhashvalue: *const core::ffi::c_void, cbhashvalue: u32, pimport: P3, tdimport: u32, passememit: P5, ptr: *mut u32) -> windows_core::Result<()> where @@ -1598,13 +1598,13 @@ impl IMetaDataEmit { P3: windows_core::Param, P5: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DefineImportType)(windows_core::Interface::as_raw(self), passemimport.param().abi(), pbhashvalue, cbhashvalue, pimport.param().abi(), tdimport, passememit.param().abi(), core::mem::transmute(ptr)).ok() } + unsafe { (windows_core::Interface::vtable(self).DefineImportType)(windows_core::Interface::as_raw(self), passemimport.param().abi(), pbhashvalue, cbhashvalue, pimport.param().abi(), tdimport, passememit.param().abi(), ptr as _).ok() } } pub unsafe fn DefineMemberRef(&self, tkimport: u32, szname: P1, pvsigblob: *mut u8, cbsigblob: u32, pmr: *mut u32) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DefineMemberRef)(windows_core::Interface::as_raw(self), tkimport, szname.param().abi(), core::mem::transmute(pvsigblob), cbsigblob, core::mem::transmute(pmr)).ok() } + unsafe { (windows_core::Interface::vtable(self).DefineMemberRef)(windows_core::Interface::as_raw(self), tkimport, szname.param().abi(), pvsigblob as _, cbsigblob, pmr as _).ok() } } pub unsafe fn DefineImportMember(&self, passemimport: P0, pbhashvalue: *const core::ffi::c_void, cbhashvalue: u32, pimport: P3, mbmember: u32, passememit: P5, tkparent: u32, pmr: *mut u32) -> windows_core::Result<()> where @@ -1612,55 +1612,55 @@ impl IMetaDataEmit { P3: windows_core::Param, P5: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DefineImportMember)(windows_core::Interface::as_raw(self), passemimport.param().abi(), pbhashvalue, cbhashvalue, pimport.param().abi(), mbmember, passememit.param().abi(), tkparent, core::mem::transmute(pmr)).ok() } + unsafe { (windows_core::Interface::vtable(self).DefineImportMember)(windows_core::Interface::as_raw(self), passemimport.param().abi(), pbhashvalue, cbhashvalue, pimport.param().abi(), mbmember, passememit.param().abi(), tkparent, pmr as _).ok() } } pub unsafe fn DefineEvent(&self, td: u32, szevent: P1, dweventflags: u32, tkeventtype: u32, mdaddon: u32, mdremoveon: u32, mdfire: u32, rmdothermethods: *mut u32, pmdevent: *mut u32) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DefineEvent)(windows_core::Interface::as_raw(self), td, szevent.param().abi(), dweventflags, tkeventtype, mdaddon, mdremoveon, mdfire, core::mem::transmute(rmdothermethods), core::mem::transmute(pmdevent)).ok() } + unsafe { (windows_core::Interface::vtable(self).DefineEvent)(windows_core::Interface::as_raw(self), td, szevent.param().abi(), dweventflags, tkeventtype, mdaddon, mdremoveon, mdfire, rmdothermethods as _, pmdevent as _).ok() } } pub unsafe fn SetClassLayout(&self, td: u32, dwpacksize: u32, rfieldoffsets: *mut COR_FIELD_OFFSET, ulclasssize: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetClassLayout)(windows_core::Interface::as_raw(self), td, dwpacksize, core::mem::transmute(rfieldoffsets), ulclasssize).ok() } + unsafe { (windows_core::Interface::vtable(self).SetClassLayout)(windows_core::Interface::as_raw(self), td, dwpacksize, rfieldoffsets as _, ulclasssize).ok() } } pub unsafe fn DeleteClassLayout(&self, td: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DeleteClassLayout)(windows_core::Interface::as_raw(self), td).ok() } } pub unsafe fn SetFieldMarshal(&self, tk: u32, pvnativetype: *mut u8, cbnativetype: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetFieldMarshal)(windows_core::Interface::as_raw(self), tk, core::mem::transmute(pvnativetype), cbnativetype).ok() } + unsafe { (windows_core::Interface::vtable(self).SetFieldMarshal)(windows_core::Interface::as_raw(self), tk, pvnativetype as _, cbnativetype).ok() } } pub unsafe fn DeleteFieldMarshal(&self, tk: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DeleteFieldMarshal)(windows_core::Interface::as_raw(self), tk).ok() } } pub unsafe fn DefinePermissionSet(&self, tk: u32, dwaction: u32, pvpermission: *const core::ffi::c_void, cbpermission: u32, ppm: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DefinePermissionSet)(windows_core::Interface::as_raw(self), tk, dwaction, pvpermission, cbpermission, core::mem::transmute(ppm)).ok() } + unsafe { (windows_core::Interface::vtable(self).DefinePermissionSet)(windows_core::Interface::as_raw(self), tk, dwaction, pvpermission, cbpermission, ppm as _).ok() } } pub unsafe fn SetRVA(&self, md: u32, ulrva: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetRVA)(windows_core::Interface::as_raw(self), md, ulrva).ok() } } pub unsafe fn GetTokenFromSig(&self, pvsig: *mut u8, cbsig: u32, pmsig: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTokenFromSig)(windows_core::Interface::as_raw(self), core::mem::transmute(pvsig), cbsig, core::mem::transmute(pmsig)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTokenFromSig)(windows_core::Interface::as_raw(self), pvsig as _, cbsig, pmsig as _).ok() } } pub unsafe fn DefineModuleRef(&self, szname: P0, pmur: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DefineModuleRef)(windows_core::Interface::as_raw(self), szname.param().abi(), core::mem::transmute(pmur)).ok() } + unsafe { (windows_core::Interface::vtable(self).DefineModuleRef)(windows_core::Interface::as_raw(self), szname.param().abi(), pmur as _).ok() } } pub unsafe fn SetParent(&self, mr: u32, tk: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetParent)(windows_core::Interface::as_raw(self), mr, tk).ok() } } pub unsafe fn GetTokenFromTypeSpec(&self, pvsig: *mut u8, cbsig: u32, ptypespec: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTokenFromTypeSpec)(windows_core::Interface::as_raw(self), core::mem::transmute(pvsig), cbsig, core::mem::transmute(ptypespec)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTokenFromTypeSpec)(windows_core::Interface::as_raw(self), pvsig as _, cbsig, ptypespec as _).ok() } } pub unsafe fn SaveToMemory(&self, pbdata: *mut core::ffi::c_void, cbdata: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SaveToMemory)(windows_core::Interface::as_raw(self), core::mem::transmute(pbdata), cbdata).ok() } + unsafe { (windows_core::Interface::vtable(self).SaveToMemory)(windows_core::Interface::as_raw(self), pbdata as _, cbdata).ok() } } pub unsafe fn DefineUserString(&self, szstring: P0, cchstring: u32, pstk: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DefineUserString)(windows_core::Interface::as_raw(self), szstring.param().abi(), cchstring, core::mem::transmute(pstk)).ok() } + unsafe { (windows_core::Interface::vtable(self).DefineUserString)(windows_core::Interface::as_raw(self), szstring.param().abi(), cchstring, pstk as _).ok() } } pub unsafe fn DeleteToken(&self, tkobj: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DeleteToken)(windows_core::Interface::as_raw(self), tkobj).ok() } @@ -1669,13 +1669,13 @@ impl IMetaDataEmit { unsafe { (windows_core::Interface::vtable(self).SetMethodProps)(windows_core::Interface::as_raw(self), md, dwmethodflags, ulcoderva, dwimplflags).ok() } } pub unsafe fn SetTypeDefProps(&self, td: u32, dwtypedefflags: u32, tkextends: u32, rtkimplements: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetTypeDefProps)(windows_core::Interface::as_raw(self), td, dwtypedefflags, tkextends, core::mem::transmute(rtkimplements)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetTypeDefProps)(windows_core::Interface::as_raw(self), td, dwtypedefflags, tkextends, rtkimplements as _).ok() } } pub unsafe fn SetEventProps(&self, ev: u32, dweventflags: u32, tkeventtype: u32, mdaddon: u32, mdremoveon: u32, mdfire: u32, rmdothermethods: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetEventProps)(windows_core::Interface::as_raw(self), ev, dweventflags, tkeventtype, mdaddon, mdremoveon, mdfire, core::mem::transmute(rmdothermethods)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetEventProps)(windows_core::Interface::as_raw(self), ev, dweventflags, tkeventtype, mdaddon, mdremoveon, mdfire, rmdothermethods as _).ok() } } pub unsafe fn SetPermissionSetProps(&self, tk: u32, dwaction: u32, pvpermission: *const core::ffi::c_void, cbpermission: u32, ppm: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetPermissionSetProps)(windows_core::Interface::as_raw(self), tk, dwaction, pvpermission, cbpermission, core::mem::transmute(ppm)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetPermissionSetProps)(windows_core::Interface::as_raw(self), tk, dwaction, pvpermission, cbpermission, ppm as _).ok() } } pub unsafe fn DefinePinvokeMap(&self, tk: u32, dwmappingflags: u32, szimportname: P2, mrimportdll: u32) -> windows_core::Result<()> where @@ -1693,7 +1693,7 @@ impl IMetaDataEmit { unsafe { (windows_core::Interface::vtable(self).DeletePinvokeMap)(windows_core::Interface::as_raw(self), tk).ok() } } pub unsafe fn DefineCustomAttribute(&self, tkowner: u32, tkctor: u32, pcustomattribute: *const core::ffi::c_void, cbcustomattribute: u32, pcv: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DefineCustomAttribute)(windows_core::Interface::as_raw(self), tkowner, tkctor, pcustomattribute, cbcustomattribute, core::mem::transmute(pcv)).ok() } + unsafe { (windows_core::Interface::vtable(self).DefineCustomAttribute)(windows_core::Interface::as_raw(self), tkowner, tkctor, pcustomattribute, cbcustomattribute, pcv as _).ok() } } pub unsafe fn SetCustomAttributeValue(&self, pcv: u32, pcustomattribute: *const core::ffi::c_void, cbcustomattribute: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetCustomAttributeValue)(windows_core::Interface::as_raw(self), pcv, pcustomattribute, cbcustomattribute).ok() } @@ -1702,25 +1702,25 @@ impl IMetaDataEmit { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DefineField)(windows_core::Interface::as_raw(self), td, szname.param().abi(), dwfieldflags, core::mem::transmute(pvsigblob), cbsigblob, dwcplustypeflag, pvalue, cchvalue, core::mem::transmute(pmd)).ok() } + unsafe { (windows_core::Interface::vtable(self).DefineField)(windows_core::Interface::as_raw(self), td, szname.param().abi(), dwfieldflags, pvsigblob as _, cbsigblob, dwcplustypeflag, pvalue, cchvalue, pmd as _).ok() } } pub unsafe fn DefineProperty(&self, td: u32, szproperty: P1, dwpropflags: u32, pvsig: *mut u8, cbsig: u32, dwcplustypeflag: u32, pvalue: *const core::ffi::c_void, cchvalue: u32, mdsetter: u32, mdgetter: u32, rmdothermethods: *mut u32, pmdprop: *mut u32) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DefineProperty)(windows_core::Interface::as_raw(self), td, szproperty.param().abi(), dwpropflags, core::mem::transmute(pvsig), cbsig, dwcplustypeflag, pvalue, cchvalue, mdsetter, mdgetter, core::mem::transmute(rmdothermethods), core::mem::transmute(pmdprop)).ok() } + unsafe { (windows_core::Interface::vtable(self).DefineProperty)(windows_core::Interface::as_raw(self), td, szproperty.param().abi(), dwpropflags, pvsig as _, cbsig, dwcplustypeflag, pvalue, cchvalue, mdsetter, mdgetter, rmdothermethods as _, pmdprop as _).ok() } } pub unsafe fn DefineParam(&self, md: u32, ulparamseq: u32, szname: P2, dwparamflags: u32, dwcplustypeflag: u32, pvalue: *const core::ffi::c_void, cchvalue: u32, ppd: *mut u32) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DefineParam)(windows_core::Interface::as_raw(self), md, ulparamseq, szname.param().abi(), dwparamflags, dwcplustypeflag, pvalue, cchvalue, core::mem::transmute(ppd)).ok() } + unsafe { (windows_core::Interface::vtable(self).DefineParam)(windows_core::Interface::as_raw(self), md, ulparamseq, szname.param().abi(), dwparamflags, dwcplustypeflag, pvalue, cchvalue, ppd as _).ok() } } pub unsafe fn SetFieldProps(&self, fd: u32, dwfieldflags: u32, dwcplustypeflag: u32, pvalue: *const core::ffi::c_void, cchvalue: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetFieldProps)(windows_core::Interface::as_raw(self), fd, dwfieldflags, dwcplustypeflag, pvalue, cchvalue).ok() } } pub unsafe fn SetPropertyProps(&self, pr: u32, dwpropflags: u32, dwcplustypeflag: u32, pvalue: *const core::ffi::c_void, cchvalue: u32, mdsetter: u32, mdgetter: u32, rmdothermethods: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetPropertyProps)(windows_core::Interface::as_raw(self), pr, dwpropflags, dwcplustypeflag, pvalue, cchvalue, mdsetter, mdgetter, core::mem::transmute(rmdothermethods)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetPropertyProps)(windows_core::Interface::as_raw(self), pr, dwpropflags, dwcplustypeflag, pvalue, cchvalue, mdsetter, mdgetter, rmdothermethods as _).ok() } } pub unsafe fn SetParamProps(&self, pd: u32, szname: P1, dwparamflags: u32, dwcplustypeflag: u32, pvalue: *const core::ffi::c_void, cchvalue: u32) -> windows_core::Result<()> where @@ -1729,7 +1729,7 @@ impl IMetaDataEmit { unsafe { (windows_core::Interface::vtable(self).SetParamProps)(windows_core::Interface::as_raw(self), pd, szname.param().abi(), dwparamflags, dwcplustypeflag, pvalue, cchvalue).ok() } } pub unsafe fn DefineSecurityAttributeSet(&self, tkobj: u32, rsecattrs: *mut COR_SECATTR, csecattrs: u32, pulerrorattr: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DefineSecurityAttributeSet)(windows_core::Interface::as_raw(self), tkobj, core::mem::transmute(rsecattrs), csecattrs, core::mem::transmute(pulerrorattr)).ok() } + unsafe { (windows_core::Interface::vtable(self).DefineSecurityAttributeSet)(windows_core::Interface::as_raw(self), tkobj, rsecattrs as _, csecattrs, pulerrorattr as _).ok() } } pub unsafe fn ApplyEditAndContinue(&self, pimport: P0) -> windows_core::Result<()> where @@ -1744,7 +1744,7 @@ impl IMetaDataEmit { P6: windows_core::Param, P7: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).TranslateSigWithScope)(windows_core::Interface::as_raw(self), passemimport.param().abi(), pbhashvalue, cbhashvalue, import.param().abi(), core::mem::transmute(pbsigblob), cbsigblob, passememit.param().abi(), emit.param().abi(), core::mem::transmute(pvtranslatedsig), cbtranslatedsigmax, core::mem::transmute(pcbtranslatedsig)).ok() } + unsafe { (windows_core::Interface::vtable(self).TranslateSigWithScope)(windows_core::Interface::as_raw(self), passemimport.param().abi(), pbhashvalue, cbhashvalue, import.param().abi(), pbsigblob as _, cbsigblob, passememit.param().abi(), emit.param().abi(), pvtranslatedsig as _, cbtranslatedsigmax, pcbtranslatedsig as _).ok() } } pub unsafe fn SetMethodImplFlags(&self, md: u32, dwimplflags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetMethodImplFlags)(windows_core::Interface::as_raw(self), md, dwimplflags).ok() } @@ -2238,10 +2238,10 @@ impl core::ops::Deref for IMetaDataEmit2 { windows_core::imp::interface_hierarchy!(IMetaDataEmit2, windows_core::IUnknown, IMetaDataEmit); impl IMetaDataEmit2 { pub unsafe fn DefineMethodSpec(&self, tkparent: u32, pvsigblob: *mut u8, cbsigblob: u32, pmi: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DefineMethodSpec)(windows_core::Interface::as_raw(self), tkparent, core::mem::transmute(pvsigblob), cbsigblob, core::mem::transmute(pmi)).ok() } + unsafe { (windows_core::Interface::vtable(self).DefineMethodSpec)(windows_core::Interface::as_raw(self), tkparent, pvsigblob as _, cbsigblob, pmi as _).ok() } } pub unsafe fn GetDeltaSaveSize(&self, fsave: CorSaveSize, pdwsavesize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDeltaSaveSize)(windows_core::Interface::as_raw(self), fsave, core::mem::transmute(pdwsavesize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDeltaSaveSize)(windows_core::Interface::as_raw(self), fsave, pdwsavesize as _).ok() } } pub unsafe fn SaveDelta(&self, szfile: P0, dwsaveflags: u32) -> windows_core::Result<()> where @@ -2257,19 +2257,19 @@ impl IMetaDataEmit2 { unsafe { (windows_core::Interface::vtable(self).SaveDeltaToStream)(windows_core::Interface::as_raw(self), pistream.param().abi(), dwsaveflags).ok() } } pub unsafe fn SaveDeltaToMemory(&self, pbdata: *mut core::ffi::c_void, cbdata: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SaveDeltaToMemory)(windows_core::Interface::as_raw(self), core::mem::transmute(pbdata), cbdata).ok() } + unsafe { (windows_core::Interface::vtable(self).SaveDeltaToMemory)(windows_core::Interface::as_raw(self), pbdata as _, cbdata).ok() } } pub unsafe fn DefineGenericParam(&self, tk: u32, ulparamseq: u32, dwparamflags: u32, szname: P3, reserved: u32, rtkconstraints: *mut u32, pgp: *mut u32) -> windows_core::Result<()> where P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DefineGenericParam)(windows_core::Interface::as_raw(self), tk, ulparamseq, dwparamflags, szname.param().abi(), reserved, core::mem::transmute(rtkconstraints), core::mem::transmute(pgp)).ok() } + unsafe { (windows_core::Interface::vtable(self).DefineGenericParam)(windows_core::Interface::as_raw(self), tk, ulparamseq, dwparamflags, szname.param().abi(), reserved, rtkconstraints as _, pgp as _).ok() } } pub unsafe fn SetGenericParamProps(&self, gp: u32, dwparamflags: u32, szname: P2, reserved: u32, rtkconstraints: *mut u32) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SetGenericParamProps)(windows_core::Interface::as_raw(self), gp, dwparamflags, szname.param().abi(), reserved, core::mem::transmute(rtkconstraints)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetGenericParamProps)(windows_core::Interface::as_raw(self), gp, dwparamflags, szname.param().abi(), reserved, rtkconstraints as _).ok() } } pub unsafe fn ResetENCLog(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ResetENCLog)(windows_core::Interface::as_raw(self)).ok() } @@ -2410,7 +2410,7 @@ impl IMetaDataFilter { unsafe { (windows_core::Interface::vtable(self).MarkToken)(windows_core::Interface::as_raw(self), tk).ok() } } pub unsafe fn IsTokenMarked(&self, tk: u32, pismarked: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsTokenMarked)(windows_core::Interface::as_raw(self), tk, core::mem::transmute(pismarked)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsTokenMarked)(windows_core::Interface::as_raw(self), tk, pismarked as _).ok() } } } #[repr(C)] @@ -2461,265 +2461,226 @@ windows_core::imp::define_interface!(IMetaDataImport, IMetaDataImport_Vtbl, 0x7d windows_core::imp::interface_hierarchy!(IMetaDataImport, windows_core::IUnknown); impl IMetaDataImport { pub unsafe fn CloseEnum(&self, henum: *mut core::ffi::c_void) { - unsafe { (windows_core::Interface::vtable(self).CloseEnum)(windows_core::Interface::as_raw(self), core::mem::transmute(henum)) } + unsafe { (windows_core::Interface::vtable(self).CloseEnum)(windows_core::Interface::as_raw(self), henum as _) } } pub unsafe fn CountEnum(&self, henum: *mut core::ffi::c_void, pulcount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CountEnum)(windows_core::Interface::as_raw(self), core::mem::transmute(henum), core::mem::transmute(pulcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).CountEnum)(windows_core::Interface::as_raw(self), henum as _, pulcount as _).ok() } } pub unsafe fn ResetEnum(&self, henum: *mut core::ffi::c_void, ulpos: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ResetEnum)(windows_core::Interface::as_raw(self), core::mem::transmute(henum), ulpos).ok() } + unsafe { (windows_core::Interface::vtable(self).ResetEnum)(windows_core::Interface::as_raw(self), henum as _, ulpos).ok() } } pub unsafe fn EnumTypeDefs(&self, phenum: *mut *mut core::ffi::c_void, rtypedefs: *mut u32, cmax: u32, pctypedefs: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumTypeDefs)(windows_core::Interface::as_raw(self), core::mem::transmute(phenum), core::mem::transmute(rtypedefs), cmax, core::mem::transmute(pctypedefs)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumTypeDefs)(windows_core::Interface::as_raw(self), phenum as _, rtypedefs as _, cmax, pctypedefs as _).ok() } } pub unsafe fn EnumInterfaceImpls(&self, phenum: *mut *mut core::ffi::c_void, td: u32, rimpls: *mut u32, cmax: u32, pcimpls: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumInterfaceImpls)(windows_core::Interface::as_raw(self), core::mem::transmute(phenum), td, core::mem::transmute(rimpls), cmax, core::mem::transmute(pcimpls)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumInterfaceImpls)(windows_core::Interface::as_raw(self), phenum as _, td, rimpls as _, cmax, pcimpls as _).ok() } } pub unsafe fn EnumTypeRefs(&self, phenum: *mut *mut core::ffi::c_void, rtyperefs: *mut u32, cmax: u32, pctyperefs: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumTypeRefs)(windows_core::Interface::as_raw(self), core::mem::transmute(phenum), core::mem::transmute(rtyperefs), cmax, core::mem::transmute(pctyperefs)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumTypeRefs)(windows_core::Interface::as_raw(self), phenum as _, rtyperefs as _, cmax, pctyperefs as _).ok() } } pub unsafe fn FindTypeDefByName(&self, sztypedef: P0, tkenclosingclass: u32, ptd: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindTypeDefByName)(windows_core::Interface::as_raw(self), sztypedef.param().abi(), tkenclosingclass, core::mem::transmute(ptd)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindTypeDefByName)(windows_core::Interface::as_raw(self), sztypedef.param().abi(), tkenclosingclass, ptd as _).ok() } } pub unsafe fn GetScopeProps(&self, szname: Option<&mut [u16]>, pchname: *mut u32, pmvid: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetScopeProps)(windows_core::Interface::as_raw(self), 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(pchname), core::mem::transmute(pmvid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScopeProps)(windows_core::Interface::as_raw(self), 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()), pchname as _, pmvid as _).ok() } } pub unsafe fn GetModuleFromScope(&self, pmd: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetModuleFromScope)(windows_core::Interface::as_raw(self), core::mem::transmute(pmd)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleFromScope)(windows_core::Interface::as_raw(self), pmd as _).ok() } } pub unsafe fn GetTypeDefProps(&self, td: u32, sztypedef: Option<&mut [u16]>, pchtypedef: *mut u32, pdwtypedefflags: *mut u32, ptkextends: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTypeDefProps)(windows_core::Interface::as_raw(self), td, core::mem::transmute(sztypedef.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), sztypedef.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pchtypedef), core::mem::transmute(pdwtypedefflags), core::mem::transmute(ptkextends)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTypeDefProps)(windows_core::Interface::as_raw(self), td, core::mem::transmute(sztypedef.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), sztypedef.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pchtypedef as _, pdwtypedefflags as _, ptkextends as _).ok() } } pub unsafe fn GetInterfaceImplProps(&self, iiimpl: u32, pclass: *mut u32, ptkiface: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInterfaceImplProps)(windows_core::Interface::as_raw(self), iiimpl, core::mem::transmute(pclass), core::mem::transmute(ptkiface)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInterfaceImplProps)(windows_core::Interface::as_raw(self), iiimpl, pclass as _, ptkiface as _).ok() } } pub unsafe fn GetTypeRefProps(&self, tr: u32, ptkresolutionscope: *mut u32, szname: Option<&mut [u16]>, pchname: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTypeRefProps)(windows_core::Interface::as_raw(self), tr, core::mem::transmute(ptkresolutionscope), 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(pchname)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTypeRefProps)(windows_core::Interface::as_raw(self), tr, ptkresolutionscope as _, 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()), pchname as _).ok() } } pub unsafe fn ResolveTypeRef(&self, tr: u32, riid: *const windows_core::GUID, ppiscope: *mut Option, ptd: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ResolveTypeRef)(windows_core::Interface::as_raw(self), tr, riid, core::mem::transmute(ppiscope), core::mem::transmute(ptd)).ok() } + unsafe { (windows_core::Interface::vtable(self).ResolveTypeRef)(windows_core::Interface::as_raw(self), tr, riid, core::mem::transmute(ppiscope), ptd as _).ok() } } pub unsafe fn EnumMembers(&self, phenum: *mut *mut core::ffi::c_void, cl: u32, rmembers: *mut u32, cmax: u32, pctokens: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumMembers)(windows_core::Interface::as_raw(self), core::mem::transmute(phenum), cl, core::mem::transmute(rmembers), cmax, core::mem::transmute(pctokens)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumMembers)(windows_core::Interface::as_raw(self), phenum as _, cl, rmembers as _, cmax, pctokens as _).ok() } } pub unsafe fn EnumMembersWithName(&self, phenum: *mut *mut core::ffi::c_void, cl: u32, szname: P2, rmembers: *mut u32, cmax: u32, pctokens: *mut u32) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EnumMembersWithName)(windows_core::Interface::as_raw(self), core::mem::transmute(phenum), cl, szname.param().abi(), core::mem::transmute(rmembers), cmax, core::mem::transmute(pctokens)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumMembersWithName)(windows_core::Interface::as_raw(self), phenum as _, cl, szname.param().abi(), rmembers as _, cmax, pctokens as _).ok() } } pub unsafe fn EnumMethods(&self, phenum: *mut *mut core::ffi::c_void, cl: u32, rmethods: *mut u32, cmax: u32, pctokens: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumMethods)(windows_core::Interface::as_raw(self), core::mem::transmute(phenum), cl, core::mem::transmute(rmethods), cmax, core::mem::transmute(pctokens)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumMethods)(windows_core::Interface::as_raw(self), phenum as _, cl, rmethods as _, cmax, pctokens as _).ok() } } pub unsafe fn EnumMethodsWithName(&self, phenum: *mut *mut core::ffi::c_void, cl: u32, szname: P2, rmethods: *mut u32, cmax: u32, pctokens: *mut u32) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EnumMethodsWithName)(windows_core::Interface::as_raw(self), core::mem::transmute(phenum), cl, szname.param().abi(), core::mem::transmute(rmethods), cmax, core::mem::transmute(pctokens)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumMethodsWithName)(windows_core::Interface::as_raw(self), phenum as _, cl, szname.param().abi(), rmethods as _, cmax, pctokens as _).ok() } } pub unsafe fn EnumFields(&self, phenum: *mut *mut core::ffi::c_void, cl: u32, rfields: *mut u32, cmax: u32, pctokens: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumFields)(windows_core::Interface::as_raw(self), core::mem::transmute(phenum), cl, core::mem::transmute(rfields), cmax, core::mem::transmute(pctokens)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumFields)(windows_core::Interface::as_raw(self), phenum as _, cl, rfields as _, cmax, pctokens as _).ok() } } pub unsafe fn EnumFieldsWithName(&self, phenum: *mut *mut core::ffi::c_void, cl: u32, szname: P2, rfields: *mut u32, cmax: u32, pctokens: *mut u32) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EnumFieldsWithName)(windows_core::Interface::as_raw(self), core::mem::transmute(phenum), cl, szname.param().abi(), core::mem::transmute(rfields), cmax, core::mem::transmute(pctokens)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumFieldsWithName)(windows_core::Interface::as_raw(self), phenum as _, cl, szname.param().abi(), rfields as _, cmax, pctokens as _).ok() } } pub unsafe fn EnumParams(&self, phenum: *mut *mut core::ffi::c_void, mb: u32, rparams: *mut u32, cmax: u32, pctokens: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumParams)(windows_core::Interface::as_raw(self), core::mem::transmute(phenum), mb, core::mem::transmute(rparams), cmax, core::mem::transmute(pctokens)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumParams)(windows_core::Interface::as_raw(self), phenum as _, mb, rparams as _, cmax, pctokens as _).ok() } } pub unsafe fn EnumMemberRefs(&self, phenum: *mut *mut core::ffi::c_void, tkparent: u32, rmemberrefs: *mut u32, cmax: u32, pctokens: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumMemberRefs)(windows_core::Interface::as_raw(self), core::mem::transmute(phenum), tkparent, core::mem::transmute(rmemberrefs), cmax, core::mem::transmute(pctokens)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumMemberRefs)(windows_core::Interface::as_raw(self), phenum as _, tkparent, rmemberrefs as _, cmax, pctokens as _).ok() } } pub unsafe fn EnumMethodImpls(&self, phenum: *mut *mut core::ffi::c_void, td: u32, rmethodbody: *mut u32, rmethoddecl: *mut u32, cmax: u32, pctokens: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumMethodImpls)(windows_core::Interface::as_raw(self), core::mem::transmute(phenum), td, core::mem::transmute(rmethodbody), core::mem::transmute(rmethoddecl), cmax, core::mem::transmute(pctokens)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumMethodImpls)(windows_core::Interface::as_raw(self), phenum as _, td, rmethodbody as _, rmethoddecl as _, cmax, pctokens as _).ok() } } pub unsafe fn EnumPermissionSets(&self, phenum: *mut *mut core::ffi::c_void, tk: u32, dwactions: u32, rpermission: *mut u32, cmax: u32, pctokens: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumPermissionSets)(windows_core::Interface::as_raw(self), core::mem::transmute(phenum), tk, dwactions, core::mem::transmute(rpermission), cmax, core::mem::transmute(pctokens)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumPermissionSets)(windows_core::Interface::as_raw(self), phenum as _, tk, dwactions, rpermission as _, cmax, pctokens as _).ok() } } pub unsafe fn FindMember(&self, td: u32, szname: P1, pvsigblob: *mut u8, cbsigblob: u32, pmb: *mut u32) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindMember)(windows_core::Interface::as_raw(self), td, szname.param().abi(), core::mem::transmute(pvsigblob), cbsigblob, core::mem::transmute(pmb)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindMember)(windows_core::Interface::as_raw(self), td, szname.param().abi(), pvsigblob as _, cbsigblob, pmb as _).ok() } } pub unsafe fn FindMethod(&self, td: u32, szname: P1, pvsigblob: *mut u8, cbsigblob: u32, pmb: *mut u32) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindMethod)(windows_core::Interface::as_raw(self), td, szname.param().abi(), core::mem::transmute(pvsigblob), cbsigblob, core::mem::transmute(pmb)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindMethod)(windows_core::Interface::as_raw(self), td, szname.param().abi(), pvsigblob as _, cbsigblob, pmb as _).ok() } } pub unsafe fn FindField(&self, td: u32, szname: P1, pvsigblob: *mut u8, cbsigblob: u32, pmb: *mut u32) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindField)(windows_core::Interface::as_raw(self), td, szname.param().abi(), core::mem::transmute(pvsigblob), cbsigblob, core::mem::transmute(pmb)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindField)(windows_core::Interface::as_raw(self), td, szname.param().abi(), pvsigblob as _, cbsigblob, pmb as _).ok() } } pub unsafe fn FindMemberRef(&self, td: u32, szname: P1, pvsigblob: *mut u8, cbsigblob: u32, pmr: *mut u32) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindMemberRef)(windows_core::Interface::as_raw(self), td, szname.param().abi(), core::mem::transmute(pvsigblob), cbsigblob, core::mem::transmute(pmr)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindMemberRef)(windows_core::Interface::as_raw(self), td, szname.param().abi(), pvsigblob as _, cbsigblob, pmr as _).ok() } } pub unsafe fn GetMethodProps(&self, mb: u32, pclass: *mut u32, szmethod: Option<&mut [u16]>, pchmethod: *mut u32, pdwattr: *mut u32, ppvsigblob: *mut *mut u8, pcbsigblob: *mut u32, pulcoderva: *mut u32, pdwimplflags: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMethodProps)(windows_core::Interface::as_raw(self), mb, core::mem::transmute(pclass), core::mem::transmute(szmethod.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szmethod.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pchmethod), core::mem::transmute(pdwattr), core::mem::transmute(ppvsigblob), core::mem::transmute(pcbsigblob), core::mem::transmute(pulcoderva), core::mem::transmute(pdwimplflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMethodProps)(windows_core::Interface::as_raw(self), mb, pclass as _, core::mem::transmute(szmethod.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szmethod.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pchmethod as _, pdwattr as _, ppvsigblob as _, pcbsigblob as _, pulcoderva as _, pdwimplflags as _).ok() } } pub unsafe fn GetMemberRefProps(&self, mr: u32, ptk: *mut u32, szmember: Option<&mut [u16]>, pchmember: *mut u32, ppvsigblob: *mut *mut u8, pbsig: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMemberRefProps)(windows_core::Interface::as_raw(self), mr, core::mem::transmute(ptk), core::mem::transmute(szmember.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szmember.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pchmember), core::mem::transmute(ppvsigblob), core::mem::transmute(pbsig)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMemberRefProps)(windows_core::Interface::as_raw(self), mr, ptk as _, core::mem::transmute(szmember.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szmember.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pchmember as _, ppvsigblob as _, pbsig as _).ok() } } pub unsafe fn EnumProperties(&self, phenum: *mut *mut core::ffi::c_void, td: u32, rproperties: *mut u32, cmax: u32, pcproperties: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(phenum), td, core::mem::transmute(rproperties), cmax, core::mem::transmute(pcproperties)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumProperties)(windows_core::Interface::as_raw(self), phenum as _, td, rproperties as _, cmax, pcproperties as _).ok() } } pub unsafe fn EnumEvents(&self, phenum: *mut *mut core::ffi::c_void, td: u32, revents: *mut u32, cmax: u32, pcevents: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumEvents)(windows_core::Interface::as_raw(self), core::mem::transmute(phenum), td, core::mem::transmute(revents), cmax, core::mem::transmute(pcevents)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumEvents)(windows_core::Interface::as_raw(self), phenum as _, td, revents as _, cmax, pcevents as _).ok() } } pub unsafe fn GetEventProps(&self, ev: u32, pclass: *mut u32, szevent: P2, cchevent: u32, pchevent: *mut u32, pdweventflags: *mut u32, ptkeventtype: *mut u32, pmdaddon: *mut u32, pmdremoveon: *mut u32, pmdfire: *mut u32, rmdothermethod: *mut u32, cmax: u32, pcothermethod: *mut u32) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetEventProps)(windows_core::Interface::as_raw(self), ev, core::mem::transmute(pclass), szevent.param().abi(), cchevent, core::mem::transmute(pchevent), core::mem::transmute(pdweventflags), core::mem::transmute(ptkeventtype), core::mem::transmute(pmdaddon), core::mem::transmute(pmdremoveon), core::mem::transmute(pmdfire), core::mem::transmute(rmdothermethod), cmax, core::mem::transmute(pcothermethod)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEventProps)(windows_core::Interface::as_raw(self), ev, pclass as _, szevent.param().abi(), cchevent, pchevent as _, pdweventflags as _, ptkeventtype as _, pmdaddon as _, pmdremoveon as _, pmdfire as _, rmdothermethod as _, cmax, pcothermethod as _).ok() } } pub unsafe fn EnumMethodSemantics(&self, phenum: *mut *mut core::ffi::c_void, mb: u32, reventprop: *mut u32, cmax: u32, pceventprop: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumMethodSemantics)(windows_core::Interface::as_raw(self), core::mem::transmute(phenum), mb, core::mem::transmute(reventprop), cmax, core::mem::transmute(pceventprop)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumMethodSemantics)(windows_core::Interface::as_raw(self), phenum as _, mb, reventprop as _, cmax, pceventprop as _).ok() } } pub unsafe fn GetMethodSemantics(&self, mb: u32, tkeventprop: u32, pdwsemanticsflags: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMethodSemantics)(windows_core::Interface::as_raw(self), mb, tkeventprop, core::mem::transmute(pdwsemanticsflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMethodSemantics)(windows_core::Interface::as_raw(self), mb, tkeventprop, pdwsemanticsflags as _).ok() } } pub unsafe fn GetClassLayout(&self, td: u32, pdwpacksize: *mut u32, rfieldoffset: *mut COR_FIELD_OFFSET, cmax: u32, pcfieldoffset: *mut u32, pulclasssize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClassLayout)(windows_core::Interface::as_raw(self), td, core::mem::transmute(pdwpacksize), core::mem::transmute(rfieldoffset), cmax, core::mem::transmute(pcfieldoffset), core::mem::transmute(pulclasssize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClassLayout)(windows_core::Interface::as_raw(self), td, pdwpacksize as _, rfieldoffset as _, cmax, pcfieldoffset as _, pulclasssize as _).ok() } } pub unsafe fn GetFieldMarshal(&self, tk: u32, ppvnativetype: *mut *mut u8, pcbnativetype: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFieldMarshal)(windows_core::Interface::as_raw(self), tk, core::mem::transmute(ppvnativetype), core::mem::transmute(pcbnativetype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFieldMarshal)(windows_core::Interface::as_raw(self), tk, ppvnativetype as _, pcbnativetype as _).ok() } } pub unsafe fn GetRVA(&self, tk: u32, pulcoderva: *mut u32, pdwimplflags: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRVA)(windows_core::Interface::as_raw(self), tk, core::mem::transmute(pulcoderva), core::mem::transmute(pdwimplflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRVA)(windows_core::Interface::as_raw(self), tk, pulcoderva as _, pdwimplflags as _).ok() } } pub unsafe fn GetPermissionSetProps(&self, pm: u32, pdwaction: *mut u32, ppvpermission: *const *const core::ffi::c_void, pcbpermission: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPermissionSetProps)(windows_core::Interface::as_raw(self), pm, core::mem::transmute(pdwaction), ppvpermission, core::mem::transmute(pcbpermission)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPermissionSetProps)(windows_core::Interface::as_raw(self), pm, pdwaction as _, ppvpermission, pcbpermission as _).ok() } } pub unsafe fn GetSigFromToken(&self, mdsig: u32, ppvsig: *mut *mut u8, pcbsig: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSigFromToken)(windows_core::Interface::as_raw(self), mdsig, core::mem::transmute(ppvsig), core::mem::transmute(pcbsig)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSigFromToken)(windows_core::Interface::as_raw(self), mdsig, ppvsig as _, pcbsig as _).ok() } } pub unsafe fn GetModuleRefProps(&self, mur: u32, szname: Option<&mut [u16]>, pchname: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetModuleRefProps)(windows_core::Interface::as_raw(self), mur, 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(pchname)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetModuleRefProps)(windows_core::Interface::as_raw(self), mur, 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()), pchname as _).ok() } } pub unsafe fn EnumModuleRefs(&self, phenum: *mut *mut core::ffi::c_void, rmodulerefs: *mut u32, cmax: u32, pcmodulerefs: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumModuleRefs)(windows_core::Interface::as_raw(self), core::mem::transmute(phenum), core::mem::transmute(rmodulerefs), cmax, core::mem::transmute(pcmodulerefs)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumModuleRefs)(windows_core::Interface::as_raw(self), phenum as _, rmodulerefs as _, cmax, pcmodulerefs as _).ok() } } pub unsafe fn GetTypeSpecFromToken(&self, typespec: u32, ppvsig: *mut *mut u8, pcbsig: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTypeSpecFromToken)(windows_core::Interface::as_raw(self), typespec, core::mem::transmute(ppvsig), core::mem::transmute(pcbsig)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTypeSpecFromToken)(windows_core::Interface::as_raw(self), typespec, ppvsig as _, pcbsig as _).ok() } } pub unsafe fn GetNameFromToken(&self, tk: u32, pszutf8nameptr: *mut *mut i8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNameFromToken)(windows_core::Interface::as_raw(self), tk, core::mem::transmute(pszutf8nameptr)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNameFromToken)(windows_core::Interface::as_raw(self), tk, pszutf8nameptr as _).ok() } } pub unsafe fn EnumUnresolvedMethods(&self, phenum: *mut *mut core::ffi::c_void, rmethods: *mut u32, cmax: u32, pctokens: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumUnresolvedMethods)(windows_core::Interface::as_raw(self), core::mem::transmute(phenum), core::mem::transmute(rmethods), cmax, core::mem::transmute(pctokens)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumUnresolvedMethods)(windows_core::Interface::as_raw(self), phenum as _, rmethods as _, cmax, pctokens as _).ok() } } pub unsafe fn GetUserString(&self, stk: u32, szstring: Option<&mut [u16]>, pchstring: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetUserString)(windows_core::Interface::as_raw(self), stk, core::mem::transmute(szstring.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pchstring)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUserString)(windows_core::Interface::as_raw(self), stk, core::mem::transmute(szstring.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pchstring as _).ok() } } pub unsafe fn GetPinvokeMap(&self, tk: u32, pdwmappingflags: *mut u32, szimportname: Option<&mut [u16]>, pchimportname: *mut u32, pmrimportdll: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPinvokeMap)(windows_core::Interface::as_raw(self), tk, core::mem::transmute(pdwmappingflags), core::mem::transmute(szimportname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szimportname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pchimportname), core::mem::transmute(pmrimportdll)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPinvokeMap)(windows_core::Interface::as_raw(self), tk, pdwmappingflags as _, core::mem::transmute(szimportname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szimportname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pchimportname as _, pmrimportdll as _).ok() } } pub unsafe fn EnumSignatures(&self, phenum: *mut *mut core::ffi::c_void, rsignatures: *mut u32, cmax: u32, pcsignatures: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumSignatures)(windows_core::Interface::as_raw(self), core::mem::transmute(phenum), core::mem::transmute(rsignatures), cmax, core::mem::transmute(pcsignatures)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumSignatures)(windows_core::Interface::as_raw(self), phenum as _, rsignatures as _, cmax, pcsignatures as _).ok() } } pub unsafe fn EnumTypeSpecs(&self, phenum: *mut *mut core::ffi::c_void, rtypespecs: *mut u32, cmax: u32, pctypespecs: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumTypeSpecs)(windows_core::Interface::as_raw(self), core::mem::transmute(phenum), core::mem::transmute(rtypespecs), cmax, core::mem::transmute(pctypespecs)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumTypeSpecs)(windows_core::Interface::as_raw(self), phenum as _, rtypespecs as _, cmax, pctypespecs as _).ok() } } pub unsafe fn EnumUserStrings(&self, phenum: *mut *mut core::ffi::c_void, rstrings: *mut u32, cmax: u32, pcstrings: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumUserStrings)(windows_core::Interface::as_raw(self), core::mem::transmute(phenum), core::mem::transmute(rstrings), cmax, core::mem::transmute(pcstrings)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumUserStrings)(windows_core::Interface::as_raw(self), phenum as _, rstrings as _, cmax, pcstrings as _).ok() } } pub unsafe fn GetParamForMethodIndex(&self, md: u32, ulparamseq: u32, ppd: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetParamForMethodIndex)(windows_core::Interface::as_raw(self), md, ulparamseq, core::mem::transmute(ppd)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetParamForMethodIndex)(windows_core::Interface::as_raw(self), md, ulparamseq, ppd as _).ok() } } pub unsafe fn EnumCustomAttributes(&self, phenum: *mut *mut core::ffi::c_void, tk: u32, tktype: u32, rcustomattributes: *mut u32, cmax: u32, pccustomattributes: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumCustomAttributes)(windows_core::Interface::as_raw(self), core::mem::transmute(phenum), tk, tktype, core::mem::transmute(rcustomattributes), cmax, core::mem::transmute(pccustomattributes)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumCustomAttributes)(windows_core::Interface::as_raw(self), phenum as _, tk, tktype, rcustomattributes as _, cmax, pccustomattributes as _).ok() } } pub unsafe fn GetCustomAttributeProps(&self, cv: u32, ptkobj: *mut u32, ptktype: *mut u32, ppblob: *const *const core::ffi::c_void, pcbsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCustomAttributeProps)(windows_core::Interface::as_raw(self), cv, core::mem::transmute(ptkobj), core::mem::transmute(ptktype), ppblob, core::mem::transmute(pcbsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCustomAttributeProps)(windows_core::Interface::as_raw(self), cv, ptkobj as _, ptktype as _, ppblob, pcbsize as _).ok() } } pub unsafe fn FindTypeRef(&self, tkresolutionscope: u32, szname: P1, ptr: *mut u32) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindTypeRef)(windows_core::Interface::as_raw(self), tkresolutionscope, szname.param().abi(), core::mem::transmute(ptr)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindTypeRef)(windows_core::Interface::as_raw(self), tkresolutionscope, szname.param().abi(), ptr as _).ok() } } pub unsafe fn GetMemberProps(&self, mb: u32, pclass: *mut u32, szmember: Option<&mut [u16]>, pchmember: *mut u32, pdwattr: *mut u32, ppvsigblob: *mut *mut u8, pcbsigblob: *mut u32, pulcoderva: *mut u32, pdwimplflags: *mut u32, pdwcplustypeflag: *mut u32, ppvalue: *mut *mut core::ffi::c_void, pcchvalue: *mut u32) -> windows_core::Result<()> { - unsafe { - (windows_core::Interface::vtable(self).GetMemberProps)( - windows_core::Interface::as_raw(self), - mb, - core::mem::transmute(pclass), - core::mem::transmute(szmember.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - szmember.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(pchmember), - core::mem::transmute(pdwattr), - core::mem::transmute(ppvsigblob), - core::mem::transmute(pcbsigblob), - core::mem::transmute(pulcoderva), - core::mem::transmute(pdwimplflags), - core::mem::transmute(pdwcplustypeflag), - core::mem::transmute(ppvalue), - core::mem::transmute(pcchvalue), - ) - .ok() - } + unsafe { (windows_core::Interface::vtable(self).GetMemberProps)(windows_core::Interface::as_raw(self), mb, pclass as _, core::mem::transmute(szmember.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szmember.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pchmember as _, pdwattr as _, ppvsigblob as _, pcbsigblob as _, pulcoderva as _, pdwimplflags as _, pdwcplustypeflag as _, ppvalue as _, pcchvalue as _).ok() } } pub unsafe fn GetFieldProps(&self, mb: u32, pclass: *mut u32, szfield: Option<&mut [u16]>, pchfield: *mut u32, pdwattr: *mut u32, ppvsigblob: *mut *mut u8, pcbsigblob: *mut u32, pdwcplustypeflag: *mut u32, ppvalue: *mut *mut core::ffi::c_void, pcchvalue: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFieldProps)(windows_core::Interface::as_raw(self), mb, core::mem::transmute(pclass), core::mem::transmute(szfield.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szfield.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pchfield), core::mem::transmute(pdwattr), core::mem::transmute(ppvsigblob), core::mem::transmute(pcbsigblob), core::mem::transmute(pdwcplustypeflag), core::mem::transmute(ppvalue), core::mem::transmute(pcchvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFieldProps)(windows_core::Interface::as_raw(self), mb, pclass as _, core::mem::transmute(szfield.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szfield.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pchfield as _, pdwattr as _, ppvsigblob as _, pcbsigblob as _, pdwcplustypeflag as _, ppvalue as _, pcchvalue as _).ok() } } pub unsafe fn GetPropertyProps(&self, prop: u32, pclass: *mut u32, szproperty: P2, cchproperty: u32, pchproperty: *mut u32, pdwpropflags: *mut u32, ppvsig: *mut *mut u8, pbsig: *mut u32, pdwcplustypeflag: *mut u32, ppdefaultvalue: *mut *mut core::ffi::c_void, pcchdefaultvalue: *mut u32, pmdsetter: *mut u32, pmdgetter: *mut u32, rmdothermethod: *mut u32, cmax: u32, pcothermethod: *mut u32) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { - (windows_core::Interface::vtable(self).GetPropertyProps)( - windows_core::Interface::as_raw(self), - prop, - core::mem::transmute(pclass), - szproperty.param().abi(), - cchproperty, - core::mem::transmute(pchproperty), - core::mem::transmute(pdwpropflags), - core::mem::transmute(ppvsig), - core::mem::transmute(pbsig), - core::mem::transmute(pdwcplustypeflag), - core::mem::transmute(ppdefaultvalue), - core::mem::transmute(pcchdefaultvalue), - core::mem::transmute(pmdsetter), - core::mem::transmute(pmdgetter), - core::mem::transmute(rmdothermethod), - cmax, - core::mem::transmute(pcothermethod), - ) - .ok() - } + unsafe { (windows_core::Interface::vtable(self).GetPropertyProps)(windows_core::Interface::as_raw(self), prop, pclass as _, szproperty.param().abi(), cchproperty, pchproperty as _, pdwpropflags as _, ppvsig as _, pbsig as _, pdwcplustypeflag as _, ppdefaultvalue as _, pcchdefaultvalue as _, pmdsetter as _, pmdgetter as _, rmdothermethod as _, cmax, pcothermethod as _).ok() } } pub unsafe fn GetParamProps(&self, tk: u32, pmd: *mut u32, pulsequence: *mut u32, szname: Option<&mut [u16]>, pchname: *mut u32, pdwattr: *mut u32, pdwcplustypeflag: *mut u32, ppvalue: *mut *mut core::ffi::c_void, pcchvalue: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetParamProps)(windows_core::Interface::as_raw(self), tk, core::mem::transmute(pmd), core::mem::transmute(pulsequence), 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(pchname), core::mem::transmute(pdwattr), core::mem::transmute(pdwcplustypeflag), core::mem::transmute(ppvalue), core::mem::transmute(pcchvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetParamProps)(windows_core::Interface::as_raw(self), tk, pmd as _, pulsequence as _, 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()), pchname as _, pdwattr as _, pdwcplustypeflag as _, ppvalue as _, pcchvalue as _).ok() } } pub unsafe fn GetCustomAttributeByName(&self, tkobj: u32, szname: P1, ppdata: *const *const core::ffi::c_void, pcbdata: *mut u32) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetCustomAttributeByName)(windows_core::Interface::as_raw(self), tkobj, szname.param().abi(), ppdata, core::mem::transmute(pcbdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCustomAttributeByName)(windows_core::Interface::as_raw(self), tkobj, szname.param().abi(), ppdata, pcbdata as _).ok() } } pub unsafe fn IsValidToken(&self, tk: u32) -> super::super::super::Foundation::BOOL { unsafe { (windows_core::Interface::vtable(self).IsValidToken)(windows_core::Interface::as_raw(self), tk) } } pub unsafe fn GetNestedClassProps(&self, tdnestedclass: u32, ptdenclosingclass: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNestedClassProps)(windows_core::Interface::as_raw(self), tdnestedclass, core::mem::transmute(ptdenclosingclass)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNestedClassProps)(windows_core::Interface::as_raw(self), tdnestedclass, ptdenclosingclass as _).ok() } } pub unsafe fn GetNativeCallConvFromSig(&self, pvsig: *const core::ffi::c_void, cbsig: u32, pcallconv: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNativeCallConvFromSig)(windows_core::Interface::as_raw(self), pvsig, cbsig, core::mem::transmute(pcallconv)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNativeCallConvFromSig)(windows_core::Interface::as_raw(self), pvsig, cbsig, pcallconv as _).ok() } } pub unsafe fn IsGlobal(&self, pd: u32, pbglobal: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsGlobal)(windows_core::Interface::as_raw(self), pd, core::mem::transmute(pbglobal)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsGlobal)(windows_core::Interface::as_raw(self), pd, pbglobal as _).ok() } } } #[repr(C)] @@ -3358,28 +3319,28 @@ impl core::ops::Deref for IMetaDataImport2 { windows_core::imp::interface_hierarchy!(IMetaDataImport2, windows_core::IUnknown, IMetaDataImport); impl IMetaDataImport2 { pub unsafe fn EnumGenericParams(&self, phenum: *mut *mut core::ffi::c_void, tk: u32, rgenericparams: *mut u32, cmax: u32, pcgenericparams: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumGenericParams)(windows_core::Interface::as_raw(self), core::mem::transmute(phenum), tk, core::mem::transmute(rgenericparams), cmax, core::mem::transmute(pcgenericparams)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumGenericParams)(windows_core::Interface::as_raw(self), phenum as _, tk, rgenericparams as _, cmax, pcgenericparams as _).ok() } } pub unsafe fn GetGenericParamProps(&self, gp: u32, pulparamseq: *mut u32, pdwparamflags: *mut u32, ptowner: *mut u32, reserved: *mut u32, wzname: Option<&mut [u16]>, pchname: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGenericParamProps)(windows_core::Interface::as_raw(self), gp, core::mem::transmute(pulparamseq), core::mem::transmute(pdwparamflags), core::mem::transmute(ptowner), core::mem::transmute(reserved), core::mem::transmute(wzname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), wzname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pchname)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGenericParamProps)(windows_core::Interface::as_raw(self), gp, pulparamseq as _, pdwparamflags as _, ptowner as _, reserved as _, core::mem::transmute(wzname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), wzname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pchname as _).ok() } } pub unsafe fn GetMethodSpecProps(&self, mi: u32, tkparent: *mut u32, ppvsigblob: *mut *mut u8, pcbsigblob: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMethodSpecProps)(windows_core::Interface::as_raw(self), mi, core::mem::transmute(tkparent), core::mem::transmute(ppvsigblob), core::mem::transmute(pcbsigblob)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMethodSpecProps)(windows_core::Interface::as_raw(self), mi, tkparent as _, ppvsigblob as _, pcbsigblob as _).ok() } } pub unsafe fn EnumGenericParamConstraints(&self, phenum: *mut *mut core::ffi::c_void, tk: u32, rgenericparamconstraints: *mut u32, cmax: u32, pcgenericparamconstraints: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumGenericParamConstraints)(windows_core::Interface::as_raw(self), core::mem::transmute(phenum), tk, core::mem::transmute(rgenericparamconstraints), cmax, core::mem::transmute(pcgenericparamconstraints)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumGenericParamConstraints)(windows_core::Interface::as_raw(self), phenum as _, tk, rgenericparamconstraints as _, cmax, pcgenericparamconstraints as _).ok() } } pub unsafe fn GetGenericParamConstraintProps(&self, gpc: u32, ptgenericparam: *mut u32, ptkconstrainttype: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGenericParamConstraintProps)(windows_core::Interface::as_raw(self), gpc, core::mem::transmute(ptgenericparam), core::mem::transmute(ptkconstrainttype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGenericParamConstraintProps)(windows_core::Interface::as_raw(self), gpc, ptgenericparam as _, ptkconstrainttype as _).ok() } } pub unsafe fn GetPEKind(&self, pdwpekind: *mut u32, pdwmachine: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPEKind)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwpekind), core::mem::transmute(pdwmachine)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPEKind)(windows_core::Interface::as_raw(self), pdwpekind as _, pdwmachine as _).ok() } } pub unsafe fn GetVersionString(&self, pwzbuf: Option<&mut [u16]>, pccbufsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVersionString)(windows_core::Interface::as_raw(self), core::mem::transmute(pwzbuf.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pwzbuf.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pccbufsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVersionString)(windows_core::Interface::as_raw(self), core::mem::transmute(pwzbuf.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pwzbuf.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pccbufsize as _).ok() } } pub unsafe fn EnumMethodSpecs(&self, phenum: *mut *mut core::ffi::c_void, tk: u32, rmethodspecs: *mut u32, cmax: u32, pcmethodspecs: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EnumMethodSpecs)(windows_core::Interface::as_raw(self), core::mem::transmute(phenum), tk, core::mem::transmute(rmethodspecs), cmax, core::mem::transmute(pcmethodspecs)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumMethodSpecs)(windows_core::Interface::as_raw(self), phenum as _, tk, rmethodspecs as _, cmax, pcmethodspecs as _).ok() } } } #[repr(C)] @@ -3475,7 +3436,7 @@ windows_core::imp::define_interface!(IMetaDataInfo, IMetaDataInfo_Vtbl, 0x7998ea windows_core::imp::interface_hierarchy!(IMetaDataInfo, windows_core::IUnknown); impl IMetaDataInfo { pub unsafe fn GetFileMapping(&self, ppvdata: *const *const core::ffi::c_void, pcbdata: *mut u64, pdwmappingtype: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFileMapping)(windows_core::Interface::as_raw(self), ppvdata, core::mem::transmute(pcbdata), core::mem::transmute(pdwmappingtype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFileMapping)(windows_core::Interface::as_raw(self), ppvdata, pcbdata as _, pdwmappingtype as _).ok() } } } #[repr(C)] @@ -3505,61 +3466,61 @@ windows_core::imp::define_interface!(IMetaDataTables, IMetaDataTables_Vtbl, 0xd8 windows_core::imp::interface_hierarchy!(IMetaDataTables, windows_core::IUnknown); impl IMetaDataTables { pub unsafe fn GetStringHeapSize(&self, pcbstrings: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStringHeapSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pcbstrings)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStringHeapSize)(windows_core::Interface::as_raw(self), pcbstrings as _).ok() } } pub unsafe fn GetBlobHeapSize(&self, pcbblobs: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBlobHeapSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pcbblobs)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBlobHeapSize)(windows_core::Interface::as_raw(self), pcbblobs as _).ok() } } pub unsafe fn GetGuidHeapSize(&self, pcbguids: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGuidHeapSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pcbguids)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGuidHeapSize)(windows_core::Interface::as_raw(self), pcbguids as _).ok() } } pub unsafe fn GetUserStringHeapSize(&self, pcbblobs: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetUserStringHeapSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pcbblobs)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUserStringHeapSize)(windows_core::Interface::as_raw(self), pcbblobs as _).ok() } } pub unsafe fn GetNumTables(&self, pctables: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNumTables)(windows_core::Interface::as_raw(self), core::mem::transmute(pctables)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNumTables)(windows_core::Interface::as_raw(self), pctables as _).ok() } } pub unsafe fn GetTableIndex(&self, token: u32, pixtbl: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTableIndex)(windows_core::Interface::as_raw(self), token, core::mem::transmute(pixtbl)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTableIndex)(windows_core::Interface::as_raw(self), token, pixtbl as _).ok() } } pub unsafe fn GetTableInfo(&self, ixtbl: u32, pcbrow: *mut u32, pcrows: *mut u32, pccols: *mut u32, pikey: *mut u32, ppname: *const *const i8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTableInfo)(windows_core::Interface::as_raw(self), ixtbl, core::mem::transmute(pcbrow), core::mem::transmute(pcrows), core::mem::transmute(pccols), core::mem::transmute(pikey), ppname).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTableInfo)(windows_core::Interface::as_raw(self), ixtbl, pcbrow as _, pcrows as _, pccols as _, pikey as _, ppname).ok() } } pub unsafe fn GetColumnInfo(&self, ixtbl: u32, ixcol: u32, pocol: *mut u32, pcbcol: *mut u32, ptype: *mut u32, ppname: *const *const i8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetColumnInfo)(windows_core::Interface::as_raw(self), ixtbl, ixcol, core::mem::transmute(pocol), core::mem::transmute(pcbcol), core::mem::transmute(ptype), ppname).ok() } + unsafe { (windows_core::Interface::vtable(self).GetColumnInfo)(windows_core::Interface::as_raw(self), ixtbl, ixcol, pocol as _, pcbcol as _, ptype as _, ppname).ok() } } pub unsafe fn GetCodedTokenInfo(&self, ixcdtkn: u32, pctokens: *mut u32, pptokens: *mut *mut u32, ppname: *const *const i8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCodedTokenInfo)(windows_core::Interface::as_raw(self), ixcdtkn, core::mem::transmute(pctokens), core::mem::transmute(pptokens), ppname).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCodedTokenInfo)(windows_core::Interface::as_raw(self), ixcdtkn, pctokens as _, pptokens as _, ppname).ok() } } pub unsafe fn GetRow(&self, ixtbl: u32, rid: u32, pprow: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRow)(windows_core::Interface::as_raw(self), ixtbl, rid, core::mem::transmute(pprow)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRow)(windows_core::Interface::as_raw(self), ixtbl, rid, pprow as _).ok() } } pub unsafe fn GetColumn(&self, ixtbl: u32, ixcol: u32, rid: u32, pval: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetColumn)(windows_core::Interface::as_raw(self), ixtbl, ixcol, rid, core::mem::transmute(pval)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetColumn)(windows_core::Interface::as_raw(self), ixtbl, ixcol, rid, pval as _).ok() } } pub unsafe fn GetString(&self, ixstring: u32, ppstring: *const *const i8) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetString)(windows_core::Interface::as_raw(self), ixstring, ppstring).ok() } } pub unsafe fn GetBlob(&self, ixblob: u32, pcbdata: *mut u32, ppdata: *const *const core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBlob)(windows_core::Interface::as_raw(self), ixblob, core::mem::transmute(pcbdata), ppdata).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBlob)(windows_core::Interface::as_raw(self), ixblob, pcbdata as _, ppdata).ok() } } pub unsafe fn GetGuid(&self, ixguid: u32, ppguid: *const *const windows_core::GUID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetGuid)(windows_core::Interface::as_raw(self), ixguid, ppguid).ok() } } pub unsafe fn GetUserString(&self, ixuserstring: u32, pcbdata: *mut u32, ppdata: *const *const core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetUserString)(windows_core::Interface::as_raw(self), ixuserstring, core::mem::transmute(pcbdata), ppdata).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUserString)(windows_core::Interface::as_raw(self), ixuserstring, pcbdata as _, ppdata).ok() } } pub unsafe fn GetNextString(&self, ixstring: u32, pnext: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNextString)(windows_core::Interface::as_raw(self), ixstring, core::mem::transmute(pnext)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNextString)(windows_core::Interface::as_raw(self), ixstring, pnext as _).ok() } } pub unsafe fn GetNextBlob(&self, ixblob: u32, pnext: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNextBlob)(windows_core::Interface::as_raw(self), ixblob, core::mem::transmute(pnext)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNextBlob)(windows_core::Interface::as_raw(self), ixblob, pnext as _).ok() } } pub unsafe fn GetNextGuid(&self, ixguid: u32, pnext: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNextGuid)(windows_core::Interface::as_raw(self), ixguid, core::mem::transmute(pnext)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNextGuid)(windows_core::Interface::as_raw(self), ixguid, pnext as _).ok() } } pub unsafe fn GetNextUserString(&self, ixuserstring: u32, pnext: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNextUserString)(windows_core::Interface::as_raw(self), ixuserstring, core::mem::transmute(pnext)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNextUserString)(windows_core::Interface::as_raw(self), ixuserstring, pnext as _).ok() } } } #[repr(C)] @@ -3760,10 +3721,10 @@ impl core::ops::Deref for IMetaDataTables2 { windows_core::imp::interface_hierarchy!(IMetaDataTables2, windows_core::IUnknown, IMetaDataTables); impl IMetaDataTables2 { pub unsafe fn GetMetaDataStorage(&self, ppvmd: *const *const core::ffi::c_void, pcbmd: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMetaDataStorage)(windows_core::Interface::as_raw(self), ppvmd, core::mem::transmute(pcbmd)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMetaDataStorage)(windows_core::Interface::as_raw(self), ppvmd, pcbmd as _).ok() } } pub unsafe fn GetMetaDataStreamInfo(&self, ix: u32, ppchname: *const *const i8, ppv: *const *const core::ffi::c_void, pcb: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMetaDataStreamInfo)(windows_core::Interface::as_raw(self), ix, ppchname, ppv, core::mem::transmute(pcb)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMetaDataStreamInfo)(windows_core::Interface::as_raw(self), ix, ppchname, ppv, pcb as _).ok() } } } #[repr(C)] @@ -3853,7 +3814,7 @@ windows_core::imp::define_interface!(IMetaDataWinMDImport, IMetaDataWinMDImport_ windows_core::imp::interface_hierarchy!(IMetaDataWinMDImport, windows_core::IUnknown); impl IMetaDataWinMDImport { pub unsafe fn GetUntransformedTypeRefProps(&self, tr: u32, ptkresolutionscope: *mut u32, szname: Option<&mut [u16]>, pchname: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetUntransformedTypeRefProps)(windows_core::Interface::as_raw(self), tr, core::mem::transmute(ptkresolutionscope), 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(pchname)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUntransformedTypeRefProps)(windows_core::Interface::as_raw(self), tr, ptkresolutionscope as _, 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()), pchname as _).ok() } } } #[repr(C)] @@ -4014,7 +3975,7 @@ impl IRoSimpleMetaDataBuilder { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).SetInterfaceGroupSimpleDefault)(windows_core::Interface::as_raw(self), name.param().abi(), defaultinterfacename.param().abi(), defaultinterfaceiid.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetInterfaceGroupParameterizedDefault(&self, name: P0, defaultinterfacenameelements: &[windows_core::PCWSTR]) -> windows_core::Result<()> where @@ -4027,7 +3988,7 @@ impl IRoSimpleMetaDataBuilder { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).SetRuntimeClassSimpleDefault)(windows_core::Interface::as_raw(self), name.param().abi(), defaultinterfacename.param().abi(), defaultinterfaceiid.unwrap_or(core::mem::zeroed()) as _).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 37f2a3627d..544d4ac7ad 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 @@ -19,7 +19,7 @@ impl IPdfRendererNative { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).RenderPageToSurface)(windows_core::Interface::as_raw(self), pdfpage.param().abi(), psurface.param().abi(), core::mem::transmute(offset), prenderparams.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -27,7 +27,7 @@ impl IPdfRendererNative { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).RenderPageToDeviceContext)(windows_core::Interface::as_raw(self), pdfpage.param().abi(), pd2ddevicecontext.param().abi(), prenderparams.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/System/WinRT/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/mod.rs index 5e9bda0af4..cd92df977c 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/mod.rs @@ -116,12 +116,12 @@ pub unsafe fn HSTRING_UserFree64(param0: *const u32, param1: *const windows_core #[inline] pub unsafe fn HSTRING_UserMarshal(param0: *const u32, param1: *mut u8, param2: *const windows_core::HSTRING) -> *mut u8 { windows_targets::link!("api-ms-win-core-winrt-string-l1-1-0.dll" "system" fn HSTRING_UserMarshal(param0 : *const u32, param1 : *mut u8, param2 : *const * mut core::ffi::c_void) -> *mut u8); - unsafe { HSTRING_UserMarshal(param0, core::mem::transmute(param1), core::mem::transmute(param2)) } + unsafe { HSTRING_UserMarshal(param0, param1 as _, core::mem::transmute(param2)) } } #[inline] pub unsafe fn HSTRING_UserMarshal64(param0: *const u32, param1: *mut u8, param2: *const windows_core::HSTRING) -> *mut u8 { windows_targets::link!("api-ms-win-core-winrt-string-l1-1-0.dll" "system" fn HSTRING_UserMarshal64(param0 : *const u32, param1 : *mut u8, param2 : *const * mut core::ffi::c_void) -> *mut u8); - unsafe { HSTRING_UserMarshal64(param0, core::mem::transmute(param1), core::mem::transmute(param2)) } + unsafe { HSTRING_UserMarshal64(param0, param1 as _, core::mem::transmute(param2)) } } #[inline] pub unsafe fn HSTRING_UserSize(param0: *const u32, param1: u32, param2: *const windows_core::HSTRING) -> u32 { @@ -227,7 +227,7 @@ pub unsafe fn RoGetMatchingRestrictedErrorInfo(hrin: windows_core::HRESULT) -> w #[inline] pub unsafe fn RoGetServerActivatableClasses(servername: &windows_core::HSTRING, activatableclassids: *mut *mut windows_core::HSTRING, count: *mut u32) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-core-winrt-registration-l1-1-0.dll" "system" fn RoGetServerActivatableClasses(servername : * mut core::ffi::c_void, activatableclassids : *mut *mut * mut core::ffi::c_void, count : *mut u32) -> windows_core::HRESULT); - unsafe { RoGetServerActivatableClasses(core::mem::transmute_copy(servername), core::mem::transmute(activatableclassids), core::mem::transmute(count)).ok() } + unsafe { RoGetServerActivatableClasses(core::mem::transmute_copy(servername), activatableclassids as _, count as _).ok() } } #[inline] pub unsafe fn RoInitialize(inittype: RO_INIT_TYPE) -> windows_core::Result<()> { @@ -237,14 +237,14 @@ 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); - unsafe { RoInspectCapturedStackBackTrace(targeterrorinfoaddress, machine, readmemorycallback, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(framecount), core::mem::transmute(targetbacktraceaddress)).ok() } + unsafe { RoInspectCapturedStackBackTrace(targeterrorinfoaddress, machine, readmemorycallback, context.unwrap_or(core::mem::zeroed()) as _, framecount as _, targetbacktraceaddress as _).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); unsafe { let mut result__ = core::mem::zeroed(); - RoInspectThreadErrorInfo(targettebaddress, machine, readmemorycallback, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + RoInspectThreadErrorInfo(targettebaddress, machine, readmemorycallback, context.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -279,7 +279,7 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-core-winrt-l1-1-0.dll" "system" fn RoRegisterForApartmentShutdown(callbackobject : * mut core::ffi::c_void, apartmentidentifier : *mut u64, regcookie : *mut APARTMENT_SHUTDOWN_REGISTRATION_COOKIE) -> windows_core::HRESULT); - unsafe { RoRegisterForApartmentShutdown(callbackobject.param().abi(), core::mem::transmute(apartmentidentifier), core::mem::transmute(regcookie)).ok() } + unsafe { RoRegisterForApartmentShutdown(callbackobject.param().abi(), apartmentidentifier as _, regcookie as _).ok() } } #[inline] pub unsafe fn RoReportFailedDelegate(punkdelegate: P0, prestrictederrorinfo: P1) -> windows_core::Result<()> @@ -377,7 +377,7 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-core-winrt-string-l1-1-0.dll" "system" fn WindowsCreateStringReference(sourcestring : windows_core::PCWSTR, length : u32, hstringheader : *mut HSTRING_HEADER, string : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { WindowsCreateStringReference(sourcestring.param().abi(), length, core::mem::transmute(hstringheader), core::mem::transmute(string)).ok() } + unsafe { WindowsCreateStringReference(sourcestring.param().abi(), length, hstringheader as _, core::mem::transmute(string)).ok() } } #[inline] pub unsafe fn WindowsDeleteString(string: &windows_core::HSTRING) -> windows_core::Result<()> { @@ -387,7 +387,7 @@ pub unsafe fn WindowsDeleteString(string: &windows_core::HSTRING) -> windows_cor #[inline] 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); - unsafe { WindowsDeleteStringBuffer(core::mem::transmute(bufferhandle.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WindowsDeleteStringBuffer(bufferhandle.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WindowsDuplicateString(string: &windows_core::HSTRING) -> windows_core::Result { @@ -405,17 +405,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); - unsafe { WindowsGetStringRawBuffer(core::mem::transmute_copy(string), core::mem::transmute(length.unwrap_or(core::mem::zeroed()))) } + unsafe { WindowsGetStringRawBuffer(core::mem::transmute_copy(string), length.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { WindowsInspectString(targethstring, machine, callback, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), core::mem::transmute(targetstringaddress)).ok() } + unsafe { WindowsInspectString(targethstring, machine, callback, context.unwrap_or(core::mem::zeroed()) as _, length as _, targetstringaddress as _).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); - unsafe { WindowsInspectString2(targethstring, machine, callback, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), core::mem::transmute(targetstringaddress)).ok() } + unsafe { WindowsInspectString2(targethstring, machine, callback, context.unwrap_or(core::mem::zeroed()) as _, length as _, targetstringaddress as _).ok() } } #[inline] pub unsafe fn WindowsIsStringEmpty(string: &windows_core::HSTRING) -> super::super::Foundation::BOOL { @@ -425,7 +425,7 @@ pub unsafe fn WindowsIsStringEmpty(string: &windows_core::HSTRING) -> super::sup #[inline] pub unsafe fn WindowsPreallocateStringBuffer(length: u32, charbuffer: *mut *mut u16, bufferhandle: *mut HSTRING_BUFFER) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-core-winrt-string-l1-1-0.dll" "system" fn WindowsPreallocateStringBuffer(length : u32, charbuffer : *mut *mut u16, bufferhandle : *mut HSTRING_BUFFER) -> windows_core::HRESULT); - unsafe { WindowsPreallocateStringBuffer(length, core::mem::transmute(charbuffer), core::mem::transmute(bufferhandle)).ok() } + unsafe { WindowsPreallocateStringBuffer(length, charbuffer as _, bufferhandle as _).ok() } } #[inline] pub unsafe fn WindowsPromoteStringBuffer(bufferhandle: HSTRING_BUFFER) -> windows_core::Result { @@ -1811,7 +1811,7 @@ windows_core::imp::define_interface!(ILanguageExceptionStackBackTrace, ILanguage windows_core::imp::interface_hierarchy!(ILanguageExceptionStackBackTrace, windows_core::IUnknown); impl ILanguageExceptionStackBackTrace { pub unsafe fn GetStackBackTrace(&self, maxframestocapture: u32, stackbacktrace: *mut usize, framescaptured: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStackBackTrace)(windows_core::Interface::as_raw(self), maxframestocapture, core::mem::transmute(stackbacktrace), core::mem::transmute(framescaptured)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStackBackTrace)(windows_core::Interface::as_raw(self), maxframestocapture, stackbacktrace as _, framescaptured as _).ok() } } } #[repr(C)] @@ -1883,7 +1883,7 @@ windows_core::imp::define_interface!(IMemoryBufferByteAccess, IMemoryBufferByteA windows_core::imp::interface_hierarchy!(IMemoryBufferByteAccess, windows_core::IUnknown); impl IMemoryBufferByteAccess { pub unsafe fn GetBuffer(&self, value: *mut *mut u8, capacity: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(value), core::mem::transmute(capacity)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), value as _, capacity as _).ok() } } } #[repr(C)] @@ -1992,7 +1992,7 @@ windows_core::imp::define_interface!(IRestrictedErrorInfo, IRestrictedErrorInfo_ windows_core::imp::interface_hierarchy!(IRestrictedErrorInfo, windows_core::IUnknown); impl IRestrictedErrorInfo { pub unsafe fn GetErrorDetails(&self, description: *mut windows_core::BSTR, error: *mut windows_core::HRESULT, restricteddescription: *mut windows_core::BSTR, capabilitysid: *mut windows_core::BSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetErrorDetails)(windows_core::Interface::as_raw(self), core::mem::transmute(description), core::mem::transmute(error), core::mem::transmute(restricteddescription), core::mem::transmute(capabilitysid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetErrorDetails)(windows_core::Interface::as_raw(self), core::mem::transmute(description), error as _, core::mem::transmute(restricteddescription), core::mem::transmute(capabilitysid)).ok() } } pub unsafe fn GetReference(&self) -> windows_core::Result { unsafe { 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 294b8e0e93..694840c984 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WindowsProgramming/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WindowsProgramming/mod.rs @@ -43,7 +43,7 @@ where #[inline] pub unsafe fn ApphelpCheckShellObject(objectclsid: *const windows_core::GUID, bshimifnecessary: bool, pullflags: *mut u64) -> super::super::Foundation::BOOL { windows_targets::link!("apphelp.dll" "system" fn ApphelpCheckShellObject(objectclsid : *const windows_core::GUID, bshimifnecessary : super::super::Foundation:: BOOL, pullflags : *mut u64) -> super::super::Foundation:: BOOL); - unsafe { ApphelpCheckShellObject(objectclsid, bshimifnecessary.into(), core::mem::transmute(pullflags)) } + unsafe { ApphelpCheckShellObject(objectclsid, bshimifnecessary.into(), pullflags as _) } } #[inline] pub unsafe fn CancelDeviceWakeupRequest(hdevice: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { @@ -53,22 +53,22 @@ pub unsafe fn CancelDeviceWakeupRequest(hdevice: super::super::Foundation::HANDL #[inline] pub unsafe fn CloseINFEngine(hinf: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("advpack.dll" "system" fn CloseINFEngine(hinf : *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { CloseINFEngine(core::mem::transmute(hinf)).ok() } + unsafe { CloseINFEngine(hinf as _).ok() } } #[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); - unsafe { ConvertAuxiliaryCounterToPerformanceCounter(ullauxiliarycountervalue, core::mem::transmute(lpperformancecountervalue), core::mem::transmute(lpconversionerror.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ConvertAuxiliaryCounterToPerformanceCounter(ullauxiliarycountervalue, lpperformancecountervalue as _, lpconversionerror.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { ConvertPerformanceCounterToAuxiliaryCounter(ullperformancecountervalue, core::mem::transmute(lpauxiliarycountervalue), core::mem::transmute(lpconversionerror.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ConvertPerformanceCounterToAuxiliaryCounter(ullperformancecountervalue, lpauxiliarycountervalue as _, lpconversionerror.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn DCIBeginAccess(pdci: *mut DCISURFACEINFO, x: i32, y: i32, dx: i32, dy: i32) -> i32 { windows_targets::link!("dciman32.dll" "system" fn DCIBeginAccess(pdci : *mut DCISURFACEINFO, x : i32, y : i32, dx : i32, dy : i32) -> i32); - unsafe { DCIBeginAccess(core::mem::transmute(pdci), x, y, dx, dy) } + unsafe { DCIBeginAccess(pdci as _, x, y, dx, dy) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -80,40 +80,40 @@ pub unsafe fn DCICloseProvider(hdc: super::super::Graphics::Gdi::HDC) { #[inline] 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); - unsafe { DCICreateOffscreen(hdc, dwcompression, dwredmask, dwgreenmask, dwbluemask, dwwidth, dwheight, dwdcicaps, dwbitcount, core::mem::transmute(lplpsurface)) } + unsafe { DCICreateOffscreen(hdc, dwcompression, dwredmask, dwgreenmask, dwbluemask, dwwidth, dwheight, dwdcicaps, dwbitcount, lplpsurface as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { DCICreateOverlay(hdc, core::mem::transmute(lpoffscreensurf), core::mem::transmute(lplpsurface)) } + unsafe { DCICreateOverlay(hdc, lpoffscreensurf as _, lplpsurface as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { DCICreatePrimary(hdc, core::mem::transmute(lplpsurface)) } + unsafe { DCICreatePrimary(hdc, lplpsurface as _) } } #[inline] pub unsafe fn DCIDestroy(pdci: *mut DCISURFACEINFO) { windows_targets::link!("dciman32.dll" "system" fn DCIDestroy(pdci : *mut DCISURFACEINFO)); - unsafe { DCIDestroy(core::mem::transmute(pdci)) } + unsafe { DCIDestroy(pdci as _) } } #[inline] pub unsafe fn DCIDraw(pdci: *mut DCIOFFSCREEN) -> i32 { windows_targets::link!("dciman32.dll" "system" fn DCIDraw(pdci : *mut DCIOFFSCREEN) -> i32); - unsafe { DCIDraw(core::mem::transmute(pdci)) } + unsafe { DCIDraw(pdci as _) } } #[inline] pub unsafe fn DCIEndAccess(pdci: *mut DCISURFACEINFO) { windows_targets::link!("dciman32.dll" "system" fn DCIEndAccess(pdci : *mut DCISURFACEINFO)); - unsafe { DCIEndAccess(core::mem::transmute(pdci)) } + unsafe { DCIEndAccess(pdci as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { DCIEnum(hdc, core::mem::transmute(lprdst), core::mem::transmute(lprsrc), core::mem::transmute(lpfncallback), core::mem::transmute(lpcontext)) } + unsafe { DCIEnum(hdc, lprdst as _, lprsrc as _, lpfncallback as _, lpcontext as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -125,18 +125,18 @@ pub unsafe fn DCIOpenProvider() -> super::super::Graphics::Gdi::HDC { #[inline] pub unsafe fn DCISetClipList(pdci: *mut DCIOFFSCREEN, prd: *mut super::super::Graphics::Gdi::RGNDATA) -> i32 { windows_targets::link!("dciman32.dll" "system" fn DCISetClipList(pdci : *mut DCIOFFSCREEN, prd : *mut super::super::Graphics::Gdi:: RGNDATA) -> i32); - unsafe { DCISetClipList(core::mem::transmute(pdci), core::mem::transmute(prd)) } + unsafe { DCISetClipList(pdci as _, prd as _) } } #[inline] pub unsafe fn DCISetDestination(pdci: *mut DCIOFFSCREEN, dst: *mut super::super::Foundation::RECT, src: *mut super::super::Foundation::RECT) -> i32 { windows_targets::link!("dciman32.dll" "system" fn DCISetDestination(pdci : *mut DCIOFFSCREEN, dst : *mut super::super::Foundation:: RECT, src : *mut super::super::Foundation:: RECT) -> i32); - unsafe { DCISetDestination(core::mem::transmute(pdci), core::mem::transmute(dst), core::mem::transmute(src)) } + unsafe { DCISetDestination(pdci as _, dst as _, src as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn DCISetSrcDestClip(pdci: *mut DCIOFFSCREEN, srcrc: *mut super::super::Foundation::RECT, destrc: *mut super::super::Foundation::RECT, prd: *mut super::super::Graphics::Gdi::RGNDATA) -> i32 { windows_targets::link!("dciman32.dll" "system" fn DCISetSrcDestClip(pdci : *mut DCIOFFSCREEN, srcrc : *mut super::super::Foundation:: RECT, destrc : *mut super::super::Foundation:: RECT, prd : *mut super::super::Graphics::Gdi:: RGNDATA) -> i32); - unsafe { DCISetSrcDestClip(core::mem::transmute(pdci), core::mem::transmute(srcrc), core::mem::transmute(destrc), core::mem::transmute(prd)) } + unsafe { DCISetSrcDestClip(pdci as _, srcrc as _, destrc as _, prd as _) } } #[inline] pub unsafe fn DelNodeA(pszfileordirname: P0, dwflags: u32) -> windows_core::Result<()> @@ -165,7 +165,7 @@ 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); - unsafe { DnsHostnameToComputerNameA(hostname.param().abi(), core::mem::transmute(computername.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize)).ok() } + unsafe { DnsHostnameToComputerNameA(hostname.param().abi(), computername.unwrap_or(core::mem::zeroed()) as _, nsize as _).ok() } } #[inline] pub unsafe fn DnsHostnameToComputerNameW(hostname: P0, computername: Option, nsize: *mut u32) -> windows_core::Result<()> @@ -173,12 +173,12 @@ 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); - unsafe { DnsHostnameToComputerNameW(hostname.param().abi(), core::mem::transmute(computername.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize)).ok() } + unsafe { DnsHostnameToComputerNameW(hostname.param().abi(), computername.unwrap_or(core::mem::zeroed()) as _, nsize as _).ok() } } #[inline] pub unsafe fn DosDateTimeToFileTime(wfatdate: u16, wfattime: u16, lpfiletime: *mut super::super::Foundation::FILETIME) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn DosDateTimeToFileTime(wfatdate : u16, wfattime : u16, lpfiletime : *mut super::super::Foundation:: FILETIME) -> super::super::Foundation:: BOOL); - unsafe { DosDateTimeToFileTime(wfatdate, wfattime, core::mem::transmute(lpfiletime)).ok() } + unsafe { DosDateTimeToFileTime(wfatdate, wfattime, lpfiletime as _).ok() } } #[cfg(any(target_arch = "arm64ec", target_arch = "x86", target_arch = "x86_64"))] #[inline] @@ -189,12 +189,12 @@ pub unsafe fn EnableProcessOptionalXStateFeatures(features: u64) -> super::super #[inline] 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); - unsafe { ExecuteCabA(hwnd, core::mem::transmute(pcab), core::mem::transmute(preserved)).ok() } + unsafe { ExecuteCabA(hwnd, pcab as _, preserved as _).ok() } } #[inline] 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); - unsafe { ExecuteCabW(hwnd, core::mem::transmute(pcab), core::mem::transmute(preserved)).ok() } + unsafe { ExecuteCabW(hwnd, pcab as _, preserved as _).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<()> @@ -204,7 +204,7 @@ where P3: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn ExtractFilesA(pszcabname : windows_core::PCSTR, pszexpanddir : windows_core::PCSTR, dwflags : u32, pszfilelist : windows_core::PCSTR, lpreserved : *mut core::ffi::c_void, dwreserved : u32) -> windows_core::HRESULT); - unsafe { ExtractFilesA(pszcabname.param().abi(), pszexpanddir.param().abi(), dwflags, pszfilelist.param().abi(), core::mem::transmute(lpreserved), dwreserved).ok() } + unsafe { ExtractFilesA(pszcabname.param().abi(), pszexpanddir.param().abi(), dwflags, pszfilelist.param().abi(), lpreserved as _, dwreserved).ok() } } #[inline] pub unsafe fn ExtractFilesW(pszcabname: P0, pszexpanddir: P1, dwflags: u32, pszfilelist: P3, lpreserved: *mut core::ffi::c_void, dwreserved: u32) -> windows_core::Result<()> @@ -214,7 +214,7 @@ where P3: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn ExtractFilesW(pszcabname : windows_core::PCWSTR, pszexpanddir : windows_core::PCWSTR, dwflags : u32, pszfilelist : windows_core::PCWSTR, lpreserved : *mut core::ffi::c_void, dwreserved : u32) -> windows_core::HRESULT); - unsafe { ExtractFilesW(pszcabname.param().abi(), pszexpanddir.param().abi(), dwflags, pszfilelist.param().abi(), core::mem::transmute(lpreserved), dwreserved).ok() } + unsafe { ExtractFilesW(pszcabname.param().abi(), pszexpanddir.param().abi(), dwflags, pszfilelist.param().abi(), lpreserved as _, dwreserved).ok() } } #[inline] pub unsafe fn FileSaveMarkNotExistA(lpfilelist: P0, lpdir: P1, lpbasename: P2) -> windows_core::Result<()> @@ -273,7 +273,7 @@ where #[inline] pub unsafe fn FileTimeToDosDateTime(lpfiletime: *const super::super::Foundation::FILETIME, lpfatdate: *mut u16, lpfattime: *mut u16) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn FileTimeToDosDateTime(lpfiletime : *const super::super::Foundation:: FILETIME, lpfatdate : *mut u16, lpfattime : *mut u16) -> super::super::Foundation:: BOOL); - unsafe { FileTimeToDosDateTime(lpfiletime, core::mem::transmute(lpfatdate), core::mem::transmute(lpfattime)).ok() } + unsafe { FileTimeToDosDateTime(lpfiletime, lpfatdate as _, lpfattime as _).ok() } } #[inline] pub unsafe fn GdiEntry13() -> u32 { @@ -283,28 +283,28 @@ pub unsafe fn GdiEntry13() -> u32 { #[inline] 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); - unsafe { GetComputerNameA(core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize)).ok() } + unsafe { GetComputerNameA(lpbuffer.unwrap_or(core::mem::zeroed()) as _, nsize as _).ok() } } #[inline] 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); - unsafe { GetComputerNameW(core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize)).ok() } + unsafe { GetComputerNameW(lpbuffer.unwrap_or(core::mem::zeroed()) as _, nsize as _).ok() } } #[inline] pub unsafe fn GetCurrentHwProfileA(lphwprofileinfo: *mut HW_PROFILE_INFOA) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn GetCurrentHwProfileA(lphwprofileinfo : *mut HW_PROFILE_INFOA) -> super::super::Foundation:: BOOL); - unsafe { GetCurrentHwProfileA(core::mem::transmute(lphwprofileinfo)).ok() } + unsafe { GetCurrentHwProfileA(lphwprofileinfo as _).ok() } } #[inline] pub unsafe fn GetCurrentHwProfileW(lphwprofileinfo: *mut HW_PROFILE_INFOW) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn GetCurrentHwProfileW(lphwprofileinfo : *mut HW_PROFILE_INFOW) -> super::super::Foundation:: BOOL); - unsafe { GetCurrentHwProfileW(core::mem::transmute(lphwprofileinfo)).ok() } + unsafe { GetCurrentHwProfileW(lphwprofileinfo as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { GetDCRegionData(hdc, size, core::mem::transmute(prd)) } + unsafe { GetDCRegionData(hdc, size, prd as _) } } #[inline] pub unsafe fn GetFeatureEnabledState(featureid: u32, changetime: FEATURE_CHANGE_TIME) -> FEATURE_ENABLED_STATE { @@ -314,7 +314,7 @@ pub unsafe fn GetFeatureEnabledState(featureid: u32, changetime: FEATURE_CHANGE_ #[inline] pub unsafe fn GetFeatureVariant(featureid: u32, changetime: FEATURE_CHANGE_TIME, payloadid: *mut u32, hasnotification: *mut super::super::Foundation::BOOL) -> u32 { windows_targets::link!("api-ms-win-core-featurestaging-l1-1-1.dll" "system" fn GetFeatureVariant(featureid : u32, changetime : FEATURE_CHANGE_TIME, payloadid : *mut u32, hasnotification : *mut super::super::Foundation:: BOOL) -> u32); - unsafe { GetFeatureVariant(featureid, changetime, core::mem::transmute(payloadid), core::mem::transmute(hasnotification)) } + unsafe { GetFeatureVariant(featureid, changetime, payloadid as _, hasnotification as _) } } #[inline] pub unsafe fn GetFirmwareEnvironmentVariableA(lpname: P0, lpguid: P1, pbuffer: Option<*mut core::ffi::c_void>, nsize: u32) -> u32 @@ -323,7 +323,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); - unsafe { GetFirmwareEnvironmentVariableA(lpname.param().abi(), lpguid.param().abi(), core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), nsize) } + unsafe { GetFirmwareEnvironmentVariableA(lpname.param().abi(), lpguid.param().abi(), pbuffer.unwrap_or(core::mem::zeroed()) as _, nsize) } } #[inline] pub unsafe fn GetFirmwareEnvironmentVariableExA(lpname: P0, lpguid: P1, pbuffer: Option<*mut core::ffi::c_void>, nsize: u32, pdwattribubutes: Option<*mut u32>) -> u32 @@ -332,7 +332,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); - unsafe { GetFirmwareEnvironmentVariableExA(lpname.param().abi(), lpguid.param().abi(), core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), nsize, core::mem::transmute(pdwattribubutes.unwrap_or(core::mem::zeroed()))) } + unsafe { GetFirmwareEnvironmentVariableExA(lpname.param().abi(), lpguid.param().abi(), pbuffer.unwrap_or(core::mem::zeroed()) as _, nsize, pdwattribubutes.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GetFirmwareEnvironmentVariableExW(lpname: P0, lpguid: P1, pbuffer: Option<*mut core::ffi::c_void>, nsize: u32, pdwattribubutes: Option<*mut u32>) -> u32 @@ -341,7 +341,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); - unsafe { GetFirmwareEnvironmentVariableExW(lpname.param().abi(), lpguid.param().abi(), core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), nsize, core::mem::transmute(pdwattribubutes.unwrap_or(core::mem::zeroed()))) } + unsafe { GetFirmwareEnvironmentVariableExW(lpname.param().abi(), lpguid.param().abi(), pbuffer.unwrap_or(core::mem::zeroed()) as _, nsize, pdwattribubutes.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GetFirmwareEnvironmentVariableW(lpname: P0, lpguid: P1, pbuffer: Option<*mut core::ffi::c_void>, nsize: u32) -> u32 @@ -350,7 +350,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); - unsafe { GetFirmwareEnvironmentVariableW(lpname.param().abi(), lpguid.param().abi(), core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), nsize) } + unsafe { GetFirmwareEnvironmentVariableW(lpname.param().abi(), lpguid.param().abi(), pbuffer.unwrap_or(core::mem::zeroed()) as _, nsize) } } #[inline] pub unsafe fn GetPrivateProfileIntA(lpappname: P0, lpkeyname: P1, ndefault: i32, lpfilename: P3) -> u32 @@ -436,7 +436,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); - unsafe { GetPrivateProfileStructA(lpszsection.param().abi(), lpszkey.param().abi(), core::mem::transmute(lpstruct.unwrap_or(core::mem::zeroed())), usizestruct, szfile.param().abi()) } + unsafe { GetPrivateProfileStructA(lpszsection.param().abi(), lpszkey.param().abi(), lpstruct.unwrap_or(core::mem::zeroed()) as _, 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 @@ -446,7 +446,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); - unsafe { GetPrivateProfileStructW(lpszsection.param().abi(), lpszkey.param().abi(), core::mem::transmute(lpstruct.unwrap_or(core::mem::zeroed())), usizestruct, szfile.param().abi()) } + unsafe { GetPrivateProfileStructW(lpszsection.param().abi(), lpszkey.param().abi(), lpstruct.unwrap_or(core::mem::zeroed()) as _, usizestruct, szfile.param().abi()) } } #[inline] pub unsafe fn GetProfileIntA(lpappname: P0, lpkeyname: P1, ndefault: i32) -> u32 @@ -505,7 +505,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); - unsafe { GetSystemRegistryQuota(core::mem::transmute(pdwquotaallowed.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwquotaused.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { GetSystemRegistryQuota(pdwquotaallowed.unwrap_or(core::mem::zeroed()) as _, pdwquotaused.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(any(target_arch = "arm64ec", target_arch = "x86", target_arch = "x86_64"))] #[inline] @@ -516,12 +516,12 @@ pub unsafe fn GetThreadEnabledXStateFeatures() -> u64 { #[inline] 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); - unsafe { GetUserNameA(core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbbuffer)).ok() } + unsafe { GetUserNameA(lpbuffer.unwrap_or(core::mem::zeroed()) as _, pcbbuffer as _).ok() } } #[inline] 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); - unsafe { GetUserNameW(core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbbuffer)).ok() } + unsafe { GetUserNameW(lpbuffer.unwrap_or(core::mem::zeroed()) as _, pcbbuffer as _).ok() } } #[inline] pub unsafe fn GetVersionFromFileA(lpszfilename: P0, pdwmsver: *mut u32, pdwlsver: *mut u32, bversion: bool) -> windows_core::Result<()> @@ -529,7 +529,7 @@ where P0: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn GetVersionFromFileA(lpszfilename : windows_core::PCSTR, pdwmsver : *mut u32, pdwlsver : *mut u32, bversion : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - unsafe { GetVersionFromFileA(lpszfilename.param().abi(), core::mem::transmute(pdwmsver), core::mem::transmute(pdwlsver), bversion.into()).ok() } + unsafe { GetVersionFromFileA(lpszfilename.param().abi(), pdwmsver as _, pdwlsver as _, bversion.into()).ok() } } #[inline] pub unsafe fn GetVersionFromFileExA(lpszfilename: P0, pdwmsver: *mut u32, pdwlsver: *mut u32, bversion: bool) -> windows_core::Result<()> @@ -537,7 +537,7 @@ where P0: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn GetVersionFromFileExA(lpszfilename : windows_core::PCSTR, pdwmsver : *mut u32, pdwlsver : *mut u32, bversion : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - unsafe { GetVersionFromFileExA(lpszfilename.param().abi(), core::mem::transmute(pdwmsver), core::mem::transmute(pdwlsver), bversion.into()).ok() } + unsafe { GetVersionFromFileExA(lpszfilename.param().abi(), pdwmsver as _, pdwlsver as _, bversion.into()).ok() } } #[inline] pub unsafe fn GetVersionFromFileExW(lpszfilename: P0, pdwmsver: *mut u32, pdwlsver: *mut u32, bversion: bool) -> windows_core::Result<()> @@ -545,7 +545,7 @@ where P0: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn GetVersionFromFileExW(lpszfilename : windows_core::PCWSTR, pdwmsver : *mut u32, pdwlsver : *mut u32, bversion : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - unsafe { GetVersionFromFileExW(lpszfilename.param().abi(), core::mem::transmute(pdwmsver), core::mem::transmute(pdwlsver), bversion.into()).ok() } + unsafe { GetVersionFromFileExW(lpszfilename.param().abi(), pdwmsver as _, pdwlsver as _, bversion.into()).ok() } } #[inline] pub unsafe fn GetVersionFromFileW(lpszfilename: P0, pdwmsver: *mut u32, pdwlsver: *mut u32, bversion: bool) -> windows_core::Result<()> @@ -553,13 +553,13 @@ where P0: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn GetVersionFromFileW(lpszfilename : windows_core::PCWSTR, pdwmsver : *mut u32, pdwlsver : *mut u32, bversion : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - unsafe { GetVersionFromFileW(lpszfilename.param().abi(), core::mem::transmute(pdwmsver), core::mem::transmute(pdwlsver), bversion.into()).ok() } + unsafe { GetVersionFromFileW(lpszfilename.param().abi(), pdwmsver as _, pdwlsver as _, bversion.into()).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { GetWindowRegionData(hwnd, size, core::mem::transmute(prd)) } + unsafe { GetWindowRegionData(hwnd, size, prd as _) } } #[inline] pub unsafe fn GlobalCompact(dwminfree: u32) -> usize { @@ -589,32 +589,32 @@ pub unsafe fn GlobalWire(hmem: super::super::Foundation::HGLOBAL) -> *mut core:: #[inline] 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); - unsafe { IMPGetIMEA(param0, core::mem::transmute(param1)) } + unsafe { IMPGetIMEA(param0, param1 as _) } } #[inline] 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); - unsafe { IMPGetIMEW(param0, core::mem::transmute(param1)) } + unsafe { IMPGetIMEW(param0, param1 as _) } } #[inline] pub unsafe fn IMPQueryIMEA(param0: *mut IMEPROA) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn IMPQueryIMEA(param0 : *mut IMEPROA) -> super::super::Foundation:: BOOL); - unsafe { IMPQueryIMEA(core::mem::transmute(param0)) } + unsafe { IMPQueryIMEA(param0 as _) } } #[inline] pub unsafe fn IMPQueryIMEW(param0: *mut IMEPROW) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn IMPQueryIMEW(param0 : *mut IMEPROW) -> super::super::Foundation:: BOOL); - unsafe { IMPQueryIMEW(core::mem::transmute(param0)) } + unsafe { IMPQueryIMEW(param0 as _) } } #[inline] 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); - unsafe { IMPSetIMEA(param0, core::mem::transmute(param1)) } + unsafe { IMPSetIMEA(param0, param1 as _) } } #[inline] 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); - unsafe { IMPSetIMEW(param0, core::mem::transmute(param1)) } + unsafe { IMPSetIMEW(param0, param1 as _) } } #[inline] pub unsafe fn IsApiSetImplemented(contract: P0) -> super::super::Foundation::BOOL @@ -627,22 +627,22 @@ 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); - unsafe { IsBadHugeReadPtr(core::mem::transmute(lp.unwrap_or(core::mem::zeroed())), ucb) } + unsafe { IsBadHugeReadPtr(lp.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { IsBadHugeWritePtr(core::mem::transmute(lp.unwrap_or(core::mem::zeroed())), ucb) } + unsafe { IsBadHugeWritePtr(lp.unwrap_or(core::mem::zeroed()) as _, ucb) } } #[inline] pub unsafe fn IsNTAdmin(dwreserved: u32, lpdwreserved: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("advpack.dll" "system" fn IsNTAdmin(dwreserved : u32, lpdwreserved : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { IsNTAdmin(dwreserved, core::mem::transmute(lpdwreserved)) } + unsafe { IsNTAdmin(dwreserved, lpdwreserved as _) } } #[inline] pub unsafe fn IsNativeVhdBoot(nativevhdboot: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn IsNativeVhdBoot(nativevhdboot : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - unsafe { IsNativeVhdBoot(core::mem::transmute(nativevhdboot)).ok() } + unsafe { IsNativeVhdBoot(nativevhdboot as _).ok() } } #[inline] pub unsafe fn IsTokenUntrusted(tokenhandle: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { @@ -655,7 +655,7 @@ where 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); - unsafe { LaunchINFSectionExW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), pszparms.param().abi(), nshow).ok() } + unsafe { LaunchINFSectionExW(hwnd.unwrap_or(core::mem::zeroed()) as _, hinstance.unwrap_or(core::mem::zeroed()) as _, pszparms.param().abi(), nshow).ok() } } #[inline] pub unsafe fn LaunchINFSectionW(hwndowner: super::super::Foundation::HWND, hinstance: super::super::Foundation::HINSTANCE, pszparams: windows_core::PWSTR, nshow: i32) -> i32 { @@ -694,7 +694,7 @@ where P1: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn OpenINFEngineA(pszinffilename : windows_core::PCSTR, pszinstallsection : windows_core::PCSTR, dwflags : u32, phinf : *mut *mut core::ffi::c_void, pvreserved : *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { OpenINFEngineA(pszinffilename.param().abi(), pszinstallsection.param().abi(), dwflags, core::mem::transmute(phinf), core::mem::transmute(pvreserved)).ok() } + unsafe { OpenINFEngineA(pszinffilename.param().abi(), pszinstallsection.param().abi(), dwflags, phinf as _, pvreserved as _).ok() } } #[inline] pub unsafe fn OpenINFEngineW(pszinffilename: P0, pszinstallsection: P1, dwflags: u32, phinf: *mut *mut core::ffi::c_void, pvreserved: *mut core::ffi::c_void) -> windows_core::Result<()> @@ -703,7 +703,7 @@ where P1: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn OpenINFEngineW(pszinffilename : windows_core::PCWSTR, pszinstallsection : windows_core::PCWSTR, dwflags : u32, phinf : *mut *mut core::ffi::c_void, pvreserved : *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { OpenINFEngineW(pszinffilename.param().abi(), pszinstallsection.param().abi(), dwflags, core::mem::transmute(phinf), core::mem::transmute(pvreserved)).ok() } + unsafe { OpenINFEngineW(pszinffilename.param().abi(), pszinstallsection.param().abi(), dwflags, phinf as _, pvreserved as _).ok() } } #[inline] pub unsafe fn OpenMutexA(dwdesiredaccess: u32, binherithandle: bool, lpname: P2) -> super::super::Foundation::HANDLE @@ -732,12 +732,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); - unsafe { QueryIdleProcessorCycleTime(core::mem::transmute(bufferlength), core::mem::transmute(processoridlecycletime.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { QueryIdleProcessorCycleTime(bufferlength as _, processoridlecycletime.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { QueryIdleProcessorCycleTimeEx(group, core::mem::transmute(bufferlength), core::mem::transmute(processoridlecycletime.unwrap_or(core::mem::zeroed()))) } + unsafe { QueryIdleProcessorCycleTimeEx(group, bufferlength as _, processoridlecycletime.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn QueryInterruptTime() -> u64 { @@ -760,17 +760,17 @@ pub unsafe fn QueryInterruptTimePrecise() -> u64 { #[inline] 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); - unsafe { QueryProcessCycleTime(processhandle, core::mem::transmute(cycletime)).ok() } + unsafe { QueryProcessCycleTime(processhandle, cycletime as _).ok() } } #[inline] 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); - unsafe { QueryThreadCycleTime(threadhandle, core::mem::transmute(cycletime)).ok() } + unsafe { QueryThreadCycleTime(threadhandle, cycletime as _).ok() } } #[inline] pub unsafe fn QueryUnbiasedInterruptTime(unbiasedtime: *mut u64) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn QueryUnbiasedInterruptTime(unbiasedtime : *mut u64) -> super::super::Foundation:: BOOL); - unsafe { QueryUnbiasedInterruptTime(core::mem::transmute(unbiasedtime)) } + unsafe { QueryUnbiasedInterruptTime(unbiasedtime as _) } } #[inline] pub unsafe fn QueryUnbiasedInterruptTimePrecise() -> u64 { @@ -840,7 +840,7 @@ where P1: 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); - unsafe { RegRestoreAllA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), psztitlestring.param().abi(), hkbckupkey).ok() } + unsafe { RegRestoreAllA(hwnd.unwrap_or(core::mem::zeroed()) as _, psztitlestring.param().abi(), hkbckupkey).ok() } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -849,7 +849,7 @@ where P1: 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); - unsafe { RegRestoreAllW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), psztitlestring.param().abi(), hkbckupkey).ok() } + unsafe { RegRestoreAllW(hwnd.unwrap_or(core::mem::zeroed()) as _, psztitlestring.param().abi(), hkbckupkey).ok() } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -915,29 +915,29 @@ pub unsafe fn RequestDeviceWakeup(hdevice: super::super::Foundation::HANDLE) -> #[inline] pub unsafe fn RtlAnsiStringToUnicodeString(destinationstring: *mut super::super::Foundation::UNICODE_STRING, sourcestring: *mut super::Kernel::STRING, allocatedestinationstring: bool) -> super::super::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlAnsiStringToUnicodeString(destinationstring : *mut super::super::Foundation:: UNICODE_STRING, sourcestring : *mut super::Kernel:: STRING, allocatedestinationstring : bool) -> super::super::Foundation:: NTSTATUS); - unsafe { RtlAnsiStringToUnicodeString(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring), allocatedestinationstring) } + unsafe { RtlAnsiStringToUnicodeString(destinationstring as _, sourcestring as _, allocatedestinationstring) } } #[inline] pub unsafe fn RtlCharToInteger(string: *mut i8, base: u32, value: *mut u32) -> super::super::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlCharToInteger(string : *mut i8, base : u32, value : *mut u32) -> super::super::Foundation:: NTSTATUS); - unsafe { RtlCharToInteger(core::mem::transmute(string), base, core::mem::transmute(value)) } + unsafe { RtlCharToInteger(string as _, base, value as _) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn RtlFreeAnsiString(ansistring: *mut super::Kernel::STRING) { windows_targets::link!("ntdll.dll" "system" fn RtlFreeAnsiString(ansistring : *mut super::Kernel:: STRING)); - unsafe { RtlFreeAnsiString(core::mem::transmute(ansistring)) } + unsafe { RtlFreeAnsiString(ansistring as _) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn RtlFreeOemString(oemstring: *mut super::Kernel::STRING) { windows_targets::link!("ntdll.dll" "system" fn RtlFreeOemString(oemstring : *mut super::Kernel:: STRING)); - unsafe { RtlFreeOemString(core::mem::transmute(oemstring)) } + unsafe { RtlFreeOemString(oemstring as _) } } #[inline] pub unsafe fn RtlFreeUnicodeString(unicodestring: *mut super::super::Foundation::UNICODE_STRING) { windows_targets::link!("ntdll.dll" "system" fn RtlFreeUnicodeString(unicodestring : *mut super::super::Foundation:: UNICODE_STRING)); - unsafe { RtlFreeUnicodeString(core::mem::transmute(unicodestring)) } + unsafe { RtlFreeUnicodeString(unicodestring as _) } } #[inline] pub unsafe fn RtlGetReturnAddressHijackTarget() -> usize { @@ -948,25 +948,25 @@ pub unsafe fn RtlGetReturnAddressHijackTarget() -> usize { #[inline] pub unsafe fn RtlInitAnsiString(destinationstring: *mut super::Kernel::STRING, sourcestring: *mut i8) { windows_targets::link!("ntdll.dll" "system" fn RtlInitAnsiString(destinationstring : *mut super::Kernel:: STRING, sourcestring : *mut i8)); - unsafe { RtlInitAnsiString(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring)) } + unsafe { RtlInitAnsiString(destinationstring as _, sourcestring as _) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn RtlInitAnsiStringEx(destinationstring: *mut super::Kernel::STRING, sourcestring: *mut i8) -> super::super::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlInitAnsiStringEx(destinationstring : *mut super::Kernel:: STRING, sourcestring : *mut i8) -> super::super::Foundation:: NTSTATUS); - unsafe { RtlInitAnsiStringEx(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring)) } + unsafe { RtlInitAnsiStringEx(destinationstring as _, sourcestring as _) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn RtlInitString(destinationstring: *mut super::Kernel::STRING, sourcestring: *mut i8) { windows_targets::link!("ntdll.dll" "system" fn RtlInitString(destinationstring : *mut super::Kernel:: STRING, sourcestring : *mut i8)); - unsafe { RtlInitString(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring)) } + unsafe { RtlInitString(destinationstring as _, sourcestring as _) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn RtlInitStringEx(destinationstring: *mut super::Kernel::STRING, sourcestring: *mut i8) -> super::super::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlInitStringEx(destinationstring : *mut super::Kernel:: STRING, sourcestring : *mut i8) -> super::super::Foundation:: NTSTATUS); - unsafe { RtlInitStringEx(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring)) } + unsafe { RtlInitStringEx(destinationstring as _, sourcestring as _) } } #[inline] pub unsafe fn RtlInitUnicodeString(destinationstring: *mut super::super::Foundation::UNICODE_STRING, sourcestring: P1) @@ -974,18 +974,18 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlInitUnicodeString(destinationstring : *mut super::super::Foundation:: UNICODE_STRING, sourcestring : windows_core::PCWSTR)); - unsafe { RtlInitUnicodeString(core::mem::transmute(destinationstring), sourcestring.param().abi()) } + unsafe { RtlInitUnicodeString(destinationstring as _, sourcestring.param().abi()) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn RtlIsNameLegalDOS8Dot3(name: *mut super::super::Foundation::UNICODE_STRING, oemname: *mut super::Kernel::STRING, namecontainsspaces: *mut bool) -> bool { windows_targets::link!("ntdll.dll" "system" fn RtlIsNameLegalDOS8Dot3(name : *mut super::super::Foundation:: UNICODE_STRING, oemname : *mut super::Kernel:: STRING, namecontainsspaces : *mut bool) -> bool); - unsafe { RtlIsNameLegalDOS8Dot3(core::mem::transmute(name), core::mem::transmute(oemname), core::mem::transmute(namecontainsspaces)) } + unsafe { RtlIsNameLegalDOS8Dot3(name as _, oemname as _, namecontainsspaces as _) } } #[inline] pub unsafe fn RtlLocalTimeToSystemTime(localtime: *mut i64, systemtime: *mut i64) -> super::super::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlLocalTimeToSystemTime(localtime : *mut i64, systemtime : *mut i64) -> super::super::Foundation:: NTSTATUS); - unsafe { RtlLocalTimeToSystemTime(core::mem::transmute(localtime), core::mem::transmute(systemtime)) } + unsafe { RtlLocalTimeToSystemTime(localtime as _, systemtime as _) } } #[inline] pub unsafe fn RtlRaiseCustomSystemEventTrigger(triggerconfig: *const CUSTOM_SYSTEM_EVENT_TRIGGER_CONFIG) -> u32 { @@ -995,19 +995,19 @@ pub unsafe fn RtlRaiseCustomSystemEventTrigger(triggerconfig: *const CUSTOM_SYST #[inline] pub unsafe fn RtlTimeToSecondsSince1970(time: *mut i64, elapsedseconds: *mut u32) -> bool { windows_targets::link!("ntdll.dll" "system" fn RtlTimeToSecondsSince1970(time : *mut i64, elapsedseconds : *mut u32) -> bool); - unsafe { RtlTimeToSecondsSince1970(core::mem::transmute(time), core::mem::transmute(elapsedseconds)) } + unsafe { RtlTimeToSecondsSince1970(time as _, elapsedseconds as _) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn RtlUnicodeStringToAnsiString(destinationstring: *mut super::Kernel::STRING, sourcestring: *mut super::super::Foundation::UNICODE_STRING, allocatedestinationstring: bool) -> super::super::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlUnicodeStringToAnsiString(destinationstring : *mut super::Kernel:: STRING, sourcestring : *mut super::super::Foundation:: UNICODE_STRING, allocatedestinationstring : bool) -> super::super::Foundation:: NTSTATUS); - unsafe { RtlUnicodeStringToAnsiString(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring), allocatedestinationstring) } + unsafe { RtlUnicodeStringToAnsiString(destinationstring as _, sourcestring as _, allocatedestinationstring) } } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn RtlUnicodeStringToOemString(destinationstring: *mut super::Kernel::STRING, sourcestring: *mut super::super::Foundation::UNICODE_STRING, allocatedestinationstring: bool) -> super::super::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlUnicodeStringToOemString(destinationstring : *mut super::Kernel:: STRING, sourcestring : *mut super::super::Foundation:: UNICODE_STRING, allocatedestinationstring : bool) -> super::super::Foundation:: NTSTATUS); - unsafe { RtlUnicodeStringToOemString(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring), allocatedestinationstring) } + unsafe { RtlUnicodeStringToOemString(destinationstring as _, sourcestring as _, allocatedestinationstring) } } #[inline] pub unsafe fn RtlUnicodeToMultiByteSize(bytesinmultibytestring: *mut u32, unicodestring: P1, bytesinunicodestring: u32) -> super::super::Foundation::NTSTATUS @@ -1015,12 +1015,12 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlUnicodeToMultiByteSize(bytesinmultibytestring : *mut u32, unicodestring : windows_core::PCWSTR, bytesinunicodestring : u32) -> super::super::Foundation:: NTSTATUS); - unsafe { RtlUnicodeToMultiByteSize(core::mem::transmute(bytesinmultibytestring), unicodestring.param().abi(), bytesinunicodestring) } + unsafe { RtlUnicodeToMultiByteSize(bytesinmultibytestring as _, unicodestring.param().abi(), bytesinunicodestring) } } #[inline] pub unsafe fn RtlUniform(seed: *mut u32) -> u32 { windows_targets::link!("ntdll.dll" "system" fn RtlUniform(seed : *mut u32) -> u32); - unsafe { RtlUniform(core::mem::transmute(seed)) } + unsafe { RtlUniform(seed as _) } } #[inline] 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<()> @@ -1031,7 +1031,7 @@ where 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); - unsafe { RunSetupCommandA(hwnd, szcmdname.param().abi(), szinfsection.param().abi(), szdir.param().abi(), lpsztitle.param().abi(), core::mem::transmute(phexe), dwflags, core::mem::transmute(pvreserved)).ok() } + unsafe { RunSetupCommandA(hwnd, szcmdname.param().abi(), szinfsection.param().abi(), szdir.param().abi(), lpsztitle.param().abi(), phexe as _, dwflags, pvreserved as _).ok() } } #[inline] 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<()> @@ -1042,7 +1042,7 @@ where 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); - unsafe { RunSetupCommandW(hwnd, szcmdname.param().abi(), szinfsection.param().abi(), szdir.param().abi(), lpsztitle.param().abi(), core::mem::transmute(phexe), dwflags, core::mem::transmute(pvreserved)).ok() } + unsafe { RunSetupCommandW(hwnd, szcmdname.param().abi(), szinfsection.param().abi(), szdir.param().abi(), lpsztitle.param().abi(), phexe as _, dwflags, pvreserved as _).ok() } } #[inline] pub unsafe fn SendIMEMessageExA(param0: super::super::Foundation::HWND, param1: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { @@ -1069,7 +1069,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); - unsafe { SetFirmwareEnvironmentVariableA(lpname.param().abi(), lpguid.param().abi(), core::mem::transmute(pvalue.unwrap_or(core::mem::zeroed())), nsize).ok() } + unsafe { SetFirmwareEnvironmentVariableA(lpname.param().abi(), lpguid.param().abi(), pvalue.unwrap_or(core::mem::zeroed()) as _, 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<()> @@ -1078,7 +1078,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); - unsafe { SetFirmwareEnvironmentVariableExA(lpname.param().abi(), lpguid.param().abi(), core::mem::transmute(pvalue.unwrap_or(core::mem::zeroed())), nsize, dwattributes).ok() } + unsafe { SetFirmwareEnvironmentVariableExA(lpname.param().abi(), lpguid.param().abi(), pvalue.unwrap_or(core::mem::zeroed()) as _, nsize, dwattributes).ok() } } #[inline] pub unsafe fn SetFirmwareEnvironmentVariableExW(lpname: P0, lpguid: P1, pvalue: Option<*const core::ffi::c_void>, nsize: u32, dwattributes: u32) -> windows_core::Result<()> @@ -1087,7 +1087,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); - unsafe { SetFirmwareEnvironmentVariableExW(lpname.param().abi(), lpguid.param().abi(), core::mem::transmute(pvalue.unwrap_or(core::mem::zeroed())), nsize, dwattributes).ok() } + unsafe { SetFirmwareEnvironmentVariableExW(lpname.param().abi(), lpguid.param().abi(), pvalue.unwrap_or(core::mem::zeroed()) as _, nsize, dwattributes).ok() } } #[inline] pub unsafe fn SetFirmwareEnvironmentVariableW(lpname: P0, lpguid: P1, pvalue: Option<*const core::ffi::c_void>, nsize: u32) -> windows_core::Result<()> @@ -1096,7 +1096,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); - unsafe { SetFirmwareEnvironmentVariableW(lpname.param().abi(), lpguid.param().abi(), core::mem::transmute(pvalue.unwrap_or(core::mem::zeroed())), nsize).ok() } + unsafe { SetFirmwareEnvironmentVariableW(lpname.param().abi(), lpguid.param().abi(), pvalue.unwrap_or(core::mem::zeroed()) as _, nsize).ok() } } #[inline] pub unsafe fn SetHandleCount(unumber: u32) -> u32 { @@ -1111,17 +1111,17 @@ pub unsafe fn SetMessageWaitingIndicator(hmsgindicator: super::super::Foundation #[inline] pub unsafe fn SetPerUserSecValuesA(pperuser: *mut PERUSERSECTIONA) -> windows_core::Result<()> { windows_targets::link!("advpack.dll" "system" fn SetPerUserSecValuesA(pperuser : *mut PERUSERSECTIONA) -> windows_core::HRESULT); - unsafe { SetPerUserSecValuesA(core::mem::transmute(pperuser)).ok() } + unsafe { SetPerUserSecValuesA(pperuser as _).ok() } } #[inline] pub unsafe fn SetPerUserSecValuesW(pperuser: *mut PERUSERSECTIONW) -> windows_core::Result<()> { windows_targets::link!("advpack.dll" "system" fn SetPerUserSecValuesW(pperuser : *mut PERUSERSECTIONW) -> windows_core::HRESULT); - unsafe { SetPerUserSecValuesW(core::mem::transmute(pperuser)).ok() } + unsafe { SetPerUserSecValuesW(pperuser as _).ok() } } #[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)); - unsafe { SubscribeFeatureStateChangeNotification(core::mem::transmute(subscription), callback, core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } + unsafe { SubscribeFeatureStateChangeNotification(subscription as _, callback, context.unwrap_or(core::mem::zeroed()) as _) } } #[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<()> @@ -1132,7 +1132,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); - unsafe { 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() } + unsafe { TranslateInfStringA(pszinffilename.param().abi(), pszinstallsection.param().abi(), psztranslatesection.param().abi(), psztranslatekey.param().abi(), core::mem::transmute(pszbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pdwrequiredsize as _, pvreserved.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -1142,7 +1142,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); - unsafe { 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() } + unsafe { TranslateInfStringExA(hinf as _, pszinffilename.param().abi(), psztranslatesection.param().abi(), psztranslatekey.param().abi(), core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len().try_into().unwrap(), pdwrequiredsize as _, pvreserved.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -1152,7 +1152,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); - unsafe { 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() } + unsafe { TranslateInfStringExW(hinf as _, pszinffilename.param().abi(), psztranslatesection.param().abi(), psztranslatekey.param().abi(), core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len().try_into().unwrap(), pdwrequiredsize as _, pvreserved.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -1163,7 +1163,7 @@ where P3: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn TranslateInfStringW(pszinffilename : windows_core::PCWSTR, pszinstallsection : windows_core::PCWSTR, psztranslatesection : windows_core::PCWSTR, psztranslatekey : windows_core::PCWSTR, pszbuffer : windows_core::PWSTR, cchbuffer : u32, pdwrequiredsize : *mut u32, pvreserved : *const core::ffi::c_void) -> windows_core::HRESULT); - unsafe { 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() } + unsafe { TranslateInfStringW(pszinffilename.param().abi(), pszinstallsection.param().abi(), psztranslatesection.param().abi(), psztranslatekey.param().abi(), core::mem::transmute(pszbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pdwrequiredsize as _, pvreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn UnsubscribeFeatureStateChangeNotification(subscription: FEATURE_STATE_CHANGE_SUBSCRIPTION) { @@ -1231,7 +1231,7 @@ pub unsafe fn WinWatchDidStatusChange(hww: HWINWATCH) -> super::super::Foundatio #[inline] 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); - unsafe { WinWatchGetClipList(hww, core::mem::transmute(prc), size, core::mem::transmute(prd)) } + unsafe { WinWatchGetClipList(hww, prc as _, size, prd as _) } } #[inline] pub unsafe fn WinWatchNotify(hww: HWINWATCH, notifycallback: WINWATCHNOTIFYPROC, notifyparam: super::super::Foundation::LPARAM) -> super::super::Foundation::BOOL { @@ -1281,12 +1281,12 @@ 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); - unsafe { WldpGetLockdownPolicy(core::mem::transmute(hostinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(lockdownstate), lockdownflags).ok() } + unsafe { WldpGetLockdownPolicy(hostinformation.unwrap_or(core::mem::zeroed()) as _, lockdownstate as _, 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<()> { windows_targets::link!("wldp.dll" "system" fn WldpIsClassInApprovedList(classid : *const windows_core::GUID, hostinformation : *const WLDP_HOST_INFORMATION, isapproved : *mut super::super::Foundation:: BOOL, optionalflags : u32) -> windows_core::HRESULT); - unsafe { WldpIsClassInApprovedList(classid, hostinformation, core::mem::transmute(isapproved), optionalflags).ok() } + unsafe { WldpIsClassInApprovedList(classid, hostinformation, isapproved as _, optionalflags).ok() } } #[inline] pub unsafe fn WldpIsDynamicCodePolicyEnabled() -> windows_core::Result { @@ -1299,12 +1299,12 @@ pub unsafe fn WldpIsDynamicCodePolicyEnabled() -> windows_core::Result, returnlength: *mut u32) -> windows_core::Result<()> { windows_targets::link!("wldp.dll" "system" fn WldpQueryDeviceSecurityInformation(information : *mut WLDP_DEVICE_SECURITY_INFORMATION, informationlength : u32, returnlength : *mut u32) -> windows_core::HRESULT); - unsafe { 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() } + unsafe { 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()), returnlength as _).ok() } } #[inline] 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); - unsafe { WldpQueryDynamicCodeTrust(core::mem::transmute(filehandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(baseimage.unwrap_or(core::mem::zeroed())), imagesize).ok() } + unsafe { WldpQueryDynamicCodeTrust(filehandle.unwrap_or(core::mem::zeroed()) as _, baseimage.unwrap_or(core::mem::zeroed()) as _, imagesize).ok() } } #[inline] pub unsafe fn WldpSetDynamicCodeTrust(filehandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -1361,7 +1361,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); - unsafe { WritePrivateProfileStructA(lpszsection.param().abi(), lpszkey.param().abi(), core::mem::transmute(lpstruct.unwrap_or(core::mem::zeroed())), usizestruct, szfile.param().abi()).ok() } + unsafe { WritePrivateProfileStructA(lpszsection.param().abi(), lpszkey.param().abi(), lpstruct.unwrap_or(core::mem::zeroed()) as _, 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<()> @@ -1371,7 +1371,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); - unsafe { WritePrivateProfileStructW(lpszsection.param().abi(), lpszkey.param().abi(), core::mem::transmute(lpstruct.unwrap_or(core::mem::zeroed())), usizestruct, szfile.param().abi()).ok() } + unsafe { WritePrivateProfileStructW(lpszsection.param().abi(), lpszkey.param().abi(), lpstruct.unwrap_or(core::mem::zeroed()) as _, usizestruct, szfile.param().abi()).ok() } } #[inline] pub unsafe fn WriteProfileSectionA(lpappname: P0, lpstring: P1) -> windows_core::Result<()> @@ -1414,7 +1414,7 @@ where #[inline] pub unsafe fn _hread(hfile: i32, lpbuffer: *mut core::ffi::c_void, lbytes: i32) -> i32 { windows_targets::link!("kernel32.dll" "system" fn _hread(hfile : i32, lpbuffer : *mut core::ffi::c_void, lbytes : i32) -> i32); - unsafe { _hread(hfile, core::mem::transmute(lpbuffer), lbytes) } + unsafe { _hread(hfile, lpbuffer as _, lbytes) } } #[inline] pub unsafe fn _hwrite(hfile: i32, lpbuffer: &[u8]) -> i32 { @@ -1450,7 +1450,7 @@ where #[inline] pub unsafe fn _lread(hfile: i32, lpbuffer: *mut core::ffi::c_void, ubytes: u32) -> u32 { windows_targets::link!("kernel32.dll" "system" fn _lread(hfile : i32, lpbuffer : *mut core::ffi::c_void, ubytes : u32) -> u32); - unsafe { _lread(hfile, core::mem::transmute(lpbuffer), ubytes) } + unsafe { _lread(hfile, lpbuffer as _, ubytes) } } #[inline] pub unsafe fn _lwrite(hfile: i32, lpbuffer: &[u8]) -> u32 { @@ -1485,7 +1485,7 @@ pub unsafe fn uaw_wcschr(string: *const u16, character: u16) -> *mut u16 { #[inline] pub unsafe fn uaw_wcscpy(destination: *mut u16, source: *const u16) -> *mut u16 { windows_targets::link!("kernel32.dll" "system" fn uaw_wcscpy(destination : *mut u16, source : *const u16) -> *mut u16); - unsafe { uaw_wcscpy(core::mem::transmute(destination), source) } + unsafe { uaw_wcscpy(destination as _, source) } } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] @@ -2254,7 +2254,7 @@ impl ICameraUIControl { } } pub unsafe fn GetActiveItem(&self, pbstractiveitempath: Option<*mut windows_core::BSTR>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetActiveItem)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstractiveitempath.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetActiveItem)(windows_core::Interface::as_raw(self), pbstractiveitempath.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetSelectedItems(&self) -> windows_core::Result<*mut super::Com::SAFEARRAY> { diff --git a/crates/libs/windows/src/Windows/Win32/System/WindowsSync/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WindowsSync/mod.rs index a156dcd9bc..48798512e3 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WindowsSync/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WindowsSync/mod.rs @@ -25,7 +25,7 @@ windows_core::imp::define_interface!(IAsynchronousDataRetriever, IAsynchronousDa windows_core::imp::interface_hierarchy!(IAsynchronousDataRetriever, windows_core::IUnknown); impl IAsynchronousDataRetriever { pub unsafe fn GetIdParameters(&self, pidparameters: *mut ID_PARAMETERS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIdParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(pidparameters)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIdParameters)(windows_core::Interface::as_raw(self), pidparameters as _).ok() } } pub unsafe fn RegisterCallback(&self, pdataretrievercallback: P0) -> windows_core::Result<()> where @@ -127,7 +127,7 @@ impl IChangeConflict { } } pub unsafe fn GetResolveActionForChange(&self, presolveaction: *mut SYNC_RESOLVE_ACTION) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetResolveActionForChange)(windows_core::Interface::as_raw(self), core::mem::transmute(presolveaction)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetResolveActionForChange)(windows_core::Interface::as_raw(self), presolveaction as _).ok() } } pub unsafe fn SetResolveActionForChange(&self, resolveaction: SYNC_RESOLVE_ACTION) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetResolveActionForChange)(windows_core::Interface::as_raw(self), resolveaction).ok() } @@ -136,7 +136,7 @@ impl IChangeConflict { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetResolveActionForChangeUnit)(windows_core::Interface::as_raw(self), pchangeunit.param().abi(), core::mem::transmute(presolveaction)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetResolveActionForChangeUnit)(windows_core::Interface::as_raw(self), pchangeunit.param().abi(), presolveaction as _).ok() } } pub unsafe fn SetResolveActionForChangeUnit(&self, pchangeunit: P0, resolveaction: SYNC_RESOLVE_ACTION) -> windows_core::Result<()> where @@ -262,13 +262,13 @@ windows_core::imp::define_interface!(IChangeUnitException, IChangeUnitException_ windows_core::imp::interface_hierarchy!(IChangeUnitException, windows_core::IUnknown); impl IChangeUnitException { pub unsafe fn GetItemId(&self, pbitemid: *mut u8, pcbidsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetItemId)(windows_core::Interface::as_raw(self), core::mem::transmute(pbitemid), core::mem::transmute(pcbidsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetItemId)(windows_core::Interface::as_raw(self), pbitemid as _, pcbidsize as _).ok() } } pub unsafe fn GetChangeUnitId(&self, pbchangeunitid: *mut u8, pcbidsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetChangeUnitId)(windows_core::Interface::as_raw(self), core::mem::transmute(pbchangeunitid), core::mem::transmute(pcbidsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetChangeUnitId)(windows_core::Interface::as_raw(self), pbchangeunitid as _, pcbidsize as _).ok() } } pub unsafe fn GetClockVector(&self, riid: *const windows_core::GUID, ppunk: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClockVector)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(ppunk)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClockVector)(windows_core::Interface::as_raw(self), riid, ppunk as _).ok() } } } #[repr(C)] @@ -328,10 +328,10 @@ impl IChangeUnitListFilterInfo { unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), ppbchangeunitids, dwchangeunitcount).ok() } } pub unsafe fn GetChangeUnitIdCount(&self, pdwchangeunitidcount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetChangeUnitIdCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwchangeunitidcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetChangeUnitIdCount)(windows_core::Interface::as_raw(self), pdwchangeunitidcount as _).ok() } } pub unsafe fn GetChangeUnitId(&self, dwchangeunitidindex: u32, pbchangeunitid: *mut u8, pcbidsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetChangeUnitId)(windows_core::Interface::as_raw(self), dwchangeunitidindex, core::mem::transmute(pbchangeunitid), core::mem::transmute(pcbidsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetChangeUnitId)(windows_core::Interface::as_raw(self), dwchangeunitidindex, pbchangeunitid as _, pcbidsize as _).ok() } } } #[repr(C)] @@ -382,10 +382,10 @@ windows_core::imp::define_interface!(IClockVector, IClockVector_Vtbl, 0x14b2274a windows_core::imp::interface_hierarchy!(IClockVector, windows_core::IUnknown); impl IClockVector { pub unsafe fn GetClockVectorElements(&self, riid: *const windows_core::GUID, ppienumclockvector: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClockVectorElements)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(ppienumclockvector)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClockVectorElements)(windows_core::Interface::as_raw(self), riid, ppienumclockvector as _).ok() } } pub unsafe fn GetClockVectorElementCount(&self, pdwcount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClockVectorElementCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClockVectorElementCount)(windows_core::Interface::as_raw(self), pdwcount as _).ok() } } } #[repr(C)] @@ -427,10 +427,10 @@ windows_core::imp::define_interface!(IClockVectorElement, IClockVectorElement_Vt windows_core::imp::interface_hierarchy!(IClockVectorElement, windows_core::IUnknown); impl IClockVectorElement { pub unsafe fn GetReplicaKey(&self, pdwreplicakey: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetReplicaKey)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwreplicakey)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetReplicaKey)(windows_core::Interface::as_raw(self), pdwreplicakey as _).ok() } } pub unsafe fn GetTickCount(&self, pulltickcount: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTickCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pulltickcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTickCount)(windows_core::Interface::as_raw(self), pulltickcount as _).ok() } } } #[repr(C)] @@ -478,7 +478,7 @@ impl core::ops::Deref for ICombinedFilterInfo { windows_core::imp::interface_hierarchy!(ICombinedFilterInfo, windows_core::IUnknown, ISyncFilterInfo); impl ICombinedFilterInfo { pub unsafe fn GetFilterCount(&self, pdwfiltercount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFilterCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwfiltercount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFilterCount)(windows_core::Interface::as_raw(self), pdwfiltercount as _).ok() } } pub unsafe fn GetFilterInfo(&self, dwfilterindex: u32) -> windows_core::Result { unsafe { @@ -487,7 +487,7 @@ impl ICombinedFilterInfo { } } pub unsafe fn GetFilterCombinationType(&self, pfiltercombinationtype: *mut FILTER_COMBINATION_TYPE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFilterCombinationType)(windows_core::Interface::as_raw(self), core::mem::transmute(pfiltercombinationtype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFilterCombinationType)(windows_core::Interface::as_raw(self), pfiltercombinationtype as _).ok() } } } #[repr(C)] @@ -580,7 +580,7 @@ impl IConstraintConflict { } } pub unsafe fn GetConstraintResolveActionForChange(&self, pconstraintresolveaction: *mut SYNC_CONSTRAINT_RESOLVE_ACTION) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetConstraintResolveActionForChange)(windows_core::Interface::as_raw(self), core::mem::transmute(pconstraintresolveaction)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConstraintResolveActionForChange)(windows_core::Interface::as_raw(self), pconstraintresolveaction as _).ok() } } pub unsafe fn SetConstraintResolveActionForChange(&self, constraintresolveaction: SYNC_CONSTRAINT_RESOLVE_ACTION) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetConstraintResolveActionForChange)(windows_core::Interface::as_raw(self), constraintresolveaction).ok() } @@ -589,7 +589,7 @@ impl IConstraintConflict { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetConstraintResolveActionForChangeUnit)(windows_core::Interface::as_raw(self), pchangeunit.param().abi(), core::mem::transmute(pconstraintresolveaction)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConstraintResolveActionForChangeUnit)(windows_core::Interface::as_raw(self), pchangeunit.param().abi(), pconstraintresolveaction as _).ok() } } pub unsafe fn SetConstraintResolveActionForChangeUnit(&self, pchangeunit: P0, constraintresolveaction: SYNC_CONSTRAINT_RESOLVE_ACTION) -> windows_core::Result<()> where @@ -598,7 +598,7 @@ impl IConstraintConflict { unsafe { (windows_core::Interface::vtable(self).SetConstraintResolveActionForChangeUnit)(windows_core::Interface::as_raw(self), pchangeunit.param().abi(), constraintresolveaction).ok() } } pub unsafe fn GetConstraintConflictReason(&self, pconstraintconflictreason: *mut CONSTRAINT_CONFLICT_REASON) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetConstraintConflictReason)(windows_core::Interface::as_raw(self), core::mem::transmute(pconstraintconflictreason)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConstraintConflictReason)(windows_core::Interface::as_raw(self), pconstraintconflictreason as _).ok() } } pub unsafe fn IsTemporary(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).IsTemporary)(windows_core::Interface::as_raw(self)).ok() } @@ -769,7 +769,7 @@ windows_core::imp::define_interface!(IConstructReplicaKeyMap, IConstructReplicaK windows_core::imp::interface_hierarchy!(IConstructReplicaKeyMap, windows_core::IUnknown); impl IConstructReplicaKeyMap { pub unsafe fn FindOrAddReplica(&self, pbreplicaid: *const u8, pdwreplicakey: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).FindOrAddReplica)(windows_core::Interface::as_raw(self), pbreplicaid, core::mem::transmute(pdwreplicakey)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindOrAddReplica)(windows_core::Interface::as_raw(self), pbreplicaid, pdwreplicakey as _).ok() } } } #[repr(C)] @@ -799,19 +799,19 @@ windows_core::imp::define_interface!(ICoreFragment, ICoreFragment_Vtbl, 0x613b2a windows_core::imp::interface_hierarchy!(ICoreFragment, windows_core::IUnknown); impl ICoreFragment { pub unsafe fn NextColumn(&self, pchangeunitid: *mut u8, pchangeunitidsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).NextColumn)(windows_core::Interface::as_raw(self), core::mem::transmute(pchangeunitid), core::mem::transmute(pchangeunitidsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).NextColumn)(windows_core::Interface::as_raw(self), pchangeunitid as _, pchangeunitidsize as _).ok() } } pub unsafe fn NextRange(&self, pitemid: *mut u8, pitemidsize: *mut u32, piclockvector: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).NextRange)(windows_core::Interface::as_raw(self), core::mem::transmute(pitemid), core::mem::transmute(pitemidsize), core::mem::transmute(piclockvector)).ok() } + unsafe { (windows_core::Interface::vtable(self).NextRange)(windows_core::Interface::as_raw(self), pitemid as _, pitemidsize as _, core::mem::transmute(piclockvector)).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetColumnCount(&self, pcolumncount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetColumnCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pcolumncount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetColumnCount)(windows_core::Interface::as_raw(self), pcolumncount as _).ok() } } pub unsafe fn GetRangeCount(&self, prangecount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRangeCount)(windows_core::Interface::as_raw(self), core::mem::transmute(prangecount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRangeCount)(windows_core::Interface::as_raw(self), prangecount as _).ok() } } } #[repr(C)] @@ -880,7 +880,7 @@ windows_core::imp::define_interface!(ICoreFragmentInspector, ICoreFragmentInspec windows_core::imp::interface_hierarchy!(ICoreFragmentInspector, windows_core::IUnknown); impl ICoreFragmentInspector { pub unsafe fn NextCoreFragments(&self, requestedcount: u32, ppicorefragments: *mut Option, pfetchedcount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).NextCoreFragments)(windows_core::Interface::as_raw(self), requestedcount, core::mem::transmute(ppicorefragments), core::mem::transmute(pfetchedcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).NextCoreFragments)(windows_core::Interface::as_raw(self), requestedcount, core::mem::transmute(ppicorefragments), pfetchedcount as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -1042,7 +1042,7 @@ windows_core::imp::define_interface!(IEnumChangeUnitExceptions, IEnumChangeUnitE windows_core::imp::interface_hierarchy!(IEnumChangeUnitExceptions, windows_core::IUnknown); impl IEnumChangeUnitExceptions { pub unsafe fn Next(&self, cexceptions: u32, ppchangeunitexception: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), cexceptions, core::mem::transmute(ppchangeunitexception), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), cexceptions, core::mem::transmute(ppchangeunitexception), pcfetched as _).ok() } } pub unsafe fn Skip(&self, cexceptions: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), cexceptions).ok() } @@ -1120,7 +1120,7 @@ windows_core::imp::define_interface!(IEnumClockVector, IEnumClockVector_Vtbl, 0x windows_core::imp::interface_hierarchy!(IEnumClockVector, windows_core::IUnknown); impl IEnumClockVector { pub unsafe fn Next(&self, cclockvectorelements: u32, ppiclockvectorelements: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), cclockvectorelements, core::mem::transmute(ppiclockvectorelements), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), cclockvectorelements, core::mem::transmute(ppiclockvectorelements), pcfetched as _).ok() } } pub unsafe fn Skip(&self, csyncversions: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), csyncversions).ok() } @@ -1198,7 +1198,7 @@ windows_core::imp::define_interface!(IEnumFeedClockVector, IEnumFeedClockVector_ windows_core::imp::interface_hierarchy!(IEnumFeedClockVector, windows_core::IUnknown); impl IEnumFeedClockVector { pub unsafe fn Next(&self, cclockvectorelements: u32, ppiclockvectorelements: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), cclockvectorelements, core::mem::transmute(ppiclockvectorelements), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), cclockvectorelements, core::mem::transmute(ppiclockvectorelements), pcfetched as _).ok() } } pub unsafe fn Skip(&self, csyncversions: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), csyncversions).ok() } @@ -1276,7 +1276,7 @@ windows_core::imp::define_interface!(IEnumItemIds, IEnumItemIds_Vtbl, 0x43aa3f61 windows_core::imp::interface_hierarchy!(IEnumItemIds, windows_core::IUnknown); impl IEnumItemIds { pub unsafe fn Next(&self, pbitemid: *mut u8, pcbitemidsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), core::mem::transmute(pbitemid), core::mem::transmute(pcbitemidsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pbitemid as _, pcbitemidsize as _).ok() } } } #[repr(C)] @@ -1306,7 +1306,7 @@ windows_core::imp::define_interface!(IEnumRangeExceptions, IEnumRangeExceptions_ windows_core::imp::interface_hierarchy!(IEnumRangeExceptions, windows_core::IUnknown); impl IEnumRangeExceptions { pub unsafe fn Next(&self, cexceptions: u32, pprangeexception: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), cexceptions, core::mem::transmute(pprangeexception), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), cexceptions, core::mem::transmute(pprangeexception), pcfetched as _).ok() } } pub unsafe fn Skip(&self, cexceptions: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), cexceptions).ok() } @@ -1384,7 +1384,7 @@ windows_core::imp::define_interface!(IEnumSingleItemExceptions, IEnumSingleItemE windows_core::imp::interface_hierarchy!(IEnumSingleItemExceptions, windows_core::IUnknown); impl IEnumSingleItemExceptions { pub unsafe fn Next(&self, cexceptions: u32, ppsingleitemexception: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), cexceptions, core::mem::transmute(ppsingleitemexception), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), cexceptions, core::mem::transmute(ppsingleitemexception), pcfetched as _).ok() } } pub unsafe fn Skip(&self, cexceptions: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), cexceptions).ok() } @@ -1462,7 +1462,7 @@ windows_core::imp::define_interface!(IEnumSyncChangeUnits, IEnumSyncChangeUnits_ windows_core::imp::interface_hierarchy!(IEnumSyncChangeUnits, windows_core::IUnknown); impl IEnumSyncChangeUnits { pub unsafe fn Next(&self, cchanges: u32, ppchangeunit: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), cchanges, core::mem::transmute(ppchangeunit), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), cchanges, core::mem::transmute(ppchangeunit), pcfetched as _).ok() } } pub unsafe fn Skip(&self, cchanges: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), cchanges).ok() } @@ -1540,7 +1540,7 @@ windows_core::imp::define_interface!(IEnumSyncChanges, IEnumSyncChanges_Vtbl, 0x windows_core::imp::interface_hierarchy!(IEnumSyncChanges, windows_core::IUnknown); impl IEnumSyncChanges { pub unsafe fn Next(&self, cchanges: u32, ppchange: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), cchanges, core::mem::transmute(ppchange), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), cchanges, core::mem::transmute(ppchange), pcfetched as _).ok() } } pub unsafe fn Skip(&self, cchanges: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), cchanges).ok() } @@ -1619,7 +1619,7 @@ windows_core::imp::interface_hierarchy!(IEnumSyncProviderConfigUIInfos, windows_ impl IEnumSyncProviderConfigUIInfos { #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn Next(&self, ppsyncproviderconfiguiinfo: &mut [Option], pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppsyncproviderconfiguiinfo.len().try_into().unwrap(), core::mem::transmute(ppsyncproviderconfiguiinfo.as_ptr()), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppsyncproviderconfiguiinfo.len().try_into().unwrap(), core::mem::transmute(ppsyncproviderconfiguiinfo.as_ptr()), pcfetched as _).ok() } } pub unsafe fn Skip(&self, cfactories: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), cfactories).ok() } @@ -1704,7 +1704,7 @@ windows_core::imp::interface_hierarchy!(IEnumSyncProviderInfos, windows_core::IU impl IEnumSyncProviderInfos { #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn Next(&self, ppsyncproviderinfo: &mut [Option], pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppsyncproviderinfo.len().try_into().unwrap(), core::mem::transmute(ppsyncproviderinfo.as_ptr()), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppsyncproviderinfo.len().try_into().unwrap(), core::mem::transmute(ppsyncproviderinfo.as_ptr()), pcfetched as _).ok() } } pub unsafe fn Skip(&self, cinstances: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), cinstances).ok() } @@ -1794,10 +1794,10 @@ impl core::ops::Deref for IFeedClockVector { windows_core::imp::interface_hierarchy!(IFeedClockVector, windows_core::IUnknown, IClockVector); impl IFeedClockVector { pub unsafe fn GetUpdateCount(&self, pdwupdatecount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetUpdateCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwupdatecount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUpdateCount)(windows_core::Interface::as_raw(self), pdwupdatecount as _).ok() } } pub unsafe fn IsNoConflictsSpecified(&self, pfisnoconflictsspecified: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsNoConflictsSpecified)(windows_core::Interface::as_raw(self), core::mem::transmute(pfisnoconflictsspecified)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsNoConflictsSpecified)(windows_core::Interface::as_raw(self), pfisnoconflictsspecified as _).ok() } } } #[repr(C)] @@ -1845,10 +1845,10 @@ impl core::ops::Deref for IFeedClockVectorElement { windows_core::imp::interface_hierarchy!(IFeedClockVectorElement, windows_core::IUnknown, IClockVectorElement); impl IFeedClockVectorElement { pub unsafe fn GetSyncTime(&self, psynctime: *mut SYNC_TIME) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSyncTime)(windows_core::Interface::as_raw(self), core::mem::transmute(psynctime)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSyncTime)(windows_core::Interface::as_raw(self), psynctime as _).ok() } } pub unsafe fn GetFlags(&self, pbflags: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(pbflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFlags)(windows_core::Interface::as_raw(self), pbflags as _).ok() } } } #[repr(C)] @@ -1890,13 +1890,13 @@ windows_core::imp::define_interface!(IFilterKeyMap, IFilterKeyMap_Vtbl, 0xca1696 windows_core::imp::interface_hierarchy!(IFilterKeyMap, windows_core::IUnknown); impl IFilterKeyMap { pub unsafe fn GetCount(&self, pdwcount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCount)(windows_core::Interface::as_raw(self), pdwcount as _).ok() } } pub unsafe fn AddFilter(&self, pisyncfilter: P0, pdwfilterkey: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).AddFilter)(windows_core::Interface::as_raw(self), pisyncfilter.param().abi(), core::mem::transmute(pdwfilterkey)).ok() } + unsafe { (windows_core::Interface::vtable(self).AddFilter)(windows_core::Interface::as_raw(self), pisyncfilter.param().abi(), pdwfilterkey as _).ok() } } pub unsafe fn GetFilter(&self, dwfilterkey: u32) -> windows_core::Result { unsafe { @@ -1905,7 +1905,7 @@ impl IFilterKeyMap { } } pub unsafe fn Serialize(&self, pbfilterkeymap: *mut u8, pcbfilterkeymap: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Serialize)(windows_core::Interface::as_raw(self), core::mem::transmute(pbfilterkeymap), core::mem::transmute(pcbfilterkeymap)).ok() } + unsafe { (windows_core::Interface::vtable(self).Serialize)(windows_core::Interface::as_raw(self), pbfilterkeymap as _, pcbfilterkeymap as _).ok() } } } #[repr(C)] @@ -2184,7 +2184,7 @@ impl IKnowledgeSyncProvider { unsafe { (windows_core::Interface::vtable(self).BeginSession)(windows_core::Interface::as_raw(self), role, psessionstate.param().abi()).ok() } } pub unsafe fn GetSyncBatchParameters(&self, ppsyncknowledge: *mut Option, pdwrequestedbatchsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSyncBatchParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(ppsyncknowledge), core::mem::transmute(pdwrequestedbatchsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSyncBatchParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(ppsyncknowledge), pdwrequestedbatchsize as _).ok() } } pub unsafe fn GetChangeBatch(&self, dwbatchsize: u32, psyncknowledge: P1, ppsyncchangebatch: *mut Option, ppunkdataretriever: *mut Option) -> windows_core::Result<()> where @@ -2204,7 +2204,7 @@ impl IKnowledgeSyncProvider { P2: windows_core::Param, P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ProcessChangeBatch)(windows_core::Interface::as_raw(self), resolutionpolicy, psourcechangebatch.param().abi(), punkdataretriever.param().abi(), pcallback.param().abi(), core::mem::transmute(psyncsessionstatistics)).ok() } + unsafe { (windows_core::Interface::vtable(self).ProcessChangeBatch)(windows_core::Interface::as_raw(self), resolutionpolicy, psourcechangebatch.param().abi(), punkdataretriever.param().abi(), pcallback.param().abi(), psyncsessionstatistics as _).ok() } } pub unsafe fn ProcessFullEnumerationChangeBatch(&self, resolutionpolicy: CONFLICT_RESOLUTION_POLICY, psourcechangebatch: P1, punkdataretriever: P2, pcallback: P3, psyncsessionstatistics: *mut SYNC_SESSION_STATISTICS) -> windows_core::Result<()> where @@ -2212,7 +2212,7 @@ impl IKnowledgeSyncProvider { P2: windows_core::Param, P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ProcessFullEnumerationChangeBatch)(windows_core::Interface::as_raw(self), resolutionpolicy, psourcechangebatch.param().abi(), punkdataretriever.param().abi(), pcallback.param().abi(), core::mem::transmute(psyncsessionstatistics)).ok() } + unsafe { (windows_core::Interface::vtable(self).ProcessFullEnumerationChangeBatch)(windows_core::Interface::as_raw(self), resolutionpolicy, psourcechangebatch.param().abi(), punkdataretriever.param().abi(), pcallback.param().abi(), psyncsessionstatistics as _).ok() } } pub unsafe fn EndSession(&self, psessionstate: P0) -> windows_core::Result<()> where @@ -2411,13 +2411,13 @@ windows_core::imp::define_interface!(IRangeException, IRangeException_Vtbl, 0x75 windows_core::imp::interface_hierarchy!(IRangeException, windows_core::IUnknown); impl IRangeException { pub unsafe fn GetClosedRangeStart(&self, pbclosedrangestart: *mut u8, pcbidsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClosedRangeStart)(windows_core::Interface::as_raw(self), core::mem::transmute(pbclosedrangestart), core::mem::transmute(pcbidsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClosedRangeStart)(windows_core::Interface::as_raw(self), pbclosedrangestart as _, pcbidsize as _).ok() } } pub unsafe fn GetClosedRangeEnd(&self, pbclosedrangeend: *mut u8, pcbidsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClosedRangeEnd)(windows_core::Interface::as_raw(self), core::mem::transmute(pbclosedrangeend), core::mem::transmute(pcbidsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClosedRangeEnd)(windows_core::Interface::as_raw(self), pbclosedrangeend as _, pcbidsize as _).ok() } } pub unsafe fn GetClockVector(&self, riid: *const windows_core::GUID, ppunk: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClockVector)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(ppunk)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClockVector)(windows_core::Interface::as_raw(self), riid, ppunk as _).ok() } } } #[repr(C)] @@ -2468,10 +2468,10 @@ windows_core::imp::define_interface!(IRecoverableError, IRecoverableError_Vtbl, windows_core::imp::interface_hierarchy!(IRecoverableError, windows_core::IUnknown); impl IRecoverableError { pub unsafe fn GetStage(&self, pstage: *mut SYNC_PROGRESS_STAGE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStage)(windows_core::Interface::as_raw(self), core::mem::transmute(pstage)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStage)(windows_core::Interface::as_raw(self), pstage as _).ok() } } pub unsafe fn GetProvider(&self, pproviderrole: *mut SYNC_PROVIDER_ROLE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProvider)(windows_core::Interface::as_raw(self), core::mem::transmute(pproviderrole)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProvider)(windows_core::Interface::as_raw(self), pproviderrole as _).ok() } } pub unsafe fn GetChangeWithRecoverableError(&self) -> windows_core::Result { unsafe { @@ -2480,13 +2480,13 @@ impl IRecoverableError { } } pub unsafe fn GetRecoverableErrorDataForChange(&self, phrerror: *mut windows_core::HRESULT, pperrordata: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRecoverableErrorDataForChange)(windows_core::Interface::as_raw(self), core::mem::transmute(phrerror), core::mem::transmute(pperrordata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecoverableErrorDataForChange)(windows_core::Interface::as_raw(self), phrerror as _, core::mem::transmute(pperrordata)).ok() } } pub unsafe fn GetRecoverableErrorDataForChangeUnit(&self, pchangeunit: P0, phrerror: *mut windows_core::HRESULT, pperrordata: *mut Option) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetRecoverableErrorDataForChangeUnit)(windows_core::Interface::as_raw(self), pchangeunit.param().abi(), core::mem::transmute(phrerror), core::mem::transmute(pperrordata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRecoverableErrorDataForChangeUnit)(windows_core::Interface::as_raw(self), pchangeunit.param().abi(), phrerror as _, core::mem::transmute(pperrordata)).ok() } } } #[repr(C)] @@ -2571,13 +2571,13 @@ impl IRecoverableErrorData { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetItemDisplayName)(windows_core::Interface::as_raw(self), pszitemdisplayname.param().abi(), core::mem::transmute(pcchitemdisplayname)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetItemDisplayName)(windows_core::Interface::as_raw(self), pszitemdisplayname.param().abi(), pcchitemdisplayname as _).ok() } } pub unsafe fn GetErrorDescription(&self, pszerrordescription: P0, pccherrordescription: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetErrorDescription)(windows_core::Interface::as_raw(self), pszerrordescription.param().abi(), core::mem::transmute(pccherrordescription)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetErrorDescription)(windows_core::Interface::as_raw(self), pszerrordescription.param().abi(), pccherrordescription as _).ok() } } } #[repr(C)] @@ -2704,13 +2704,13 @@ windows_core::imp::define_interface!(IReplicaKeyMap, IReplicaKeyMap_Vtbl, 0x2209 windows_core::imp::interface_hierarchy!(IReplicaKeyMap, windows_core::IUnknown); impl IReplicaKeyMap { pub unsafe fn LookupReplicaKey(&self, pbreplicaid: *const u8, pdwreplicakey: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).LookupReplicaKey)(windows_core::Interface::as_raw(self), pbreplicaid, core::mem::transmute(pdwreplicakey)).ok() } + unsafe { (windows_core::Interface::vtable(self).LookupReplicaKey)(windows_core::Interface::as_raw(self), pbreplicaid, pdwreplicakey as _).ok() } } pub unsafe fn LookupReplicaId(&self, dwreplicakey: u32, pbreplicaid: *mut u8, pcbidsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).LookupReplicaId)(windows_core::Interface::as_raw(self), dwreplicakey, core::mem::transmute(pbreplicaid), core::mem::transmute(pcbidsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).LookupReplicaId)(windows_core::Interface::as_raw(self), dwreplicakey, pbreplicaid as _, pcbidsize as _).ok() } } pub unsafe fn Serialize(&self, pbreplicakeymap: *mut u8, pcbreplicakeymap: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Serialize)(windows_core::Interface::as_raw(self), core::mem::transmute(pbreplicakeymap), core::mem::transmute(pcbreplicakeymap)).ok() } + unsafe { (windows_core::Interface::vtable(self).Serialize)(windows_core::Interface::as_raw(self), pbreplicakeymap as _, pcbreplicakeymap as _).ok() } } } #[repr(C)] @@ -2794,10 +2794,10 @@ windows_core::imp::define_interface!(ISingleItemException, ISingleItemException_ windows_core::imp::interface_hierarchy!(ISingleItemException, windows_core::IUnknown); impl ISingleItemException { pub unsafe fn GetItemId(&self, pbitemid: *mut u8, pcbidsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetItemId)(windows_core::Interface::as_raw(self), core::mem::transmute(pbitemid), core::mem::transmute(pcbidsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetItemId)(windows_core::Interface::as_raw(self), pbitemid as _, pcbidsize as _).ok() } } pub unsafe fn GetClockVector(&self, riid: *const windows_core::GUID, ppunk: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClockVector)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(ppunk)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClockVector)(windows_core::Interface::as_raw(self), riid, ppunk as _).ok() } } } #[repr(C)] @@ -2872,10 +2872,10 @@ windows_core::imp::define_interface!(ISupportLastWriteTime, ISupportLastWriteTim windows_core::imp::interface_hierarchy!(ISupportLastWriteTime, windows_core::IUnknown); impl ISupportLastWriteTime { pub unsafe fn GetItemChangeTime(&self, pbitemid: *const u8, pulltimestamp: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetItemChangeTime)(windows_core::Interface::as_raw(self), pbitemid, core::mem::transmute(pulltimestamp)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetItemChangeTime)(windows_core::Interface::as_raw(self), pbitemid, pulltimestamp as _).ok() } } pub unsafe fn GetChangeUnitChangeTime(&self, pbitemid: *const u8, pbchangeunitid: *const u8, pulltimestamp: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetChangeUnitChangeTime)(windows_core::Interface::as_raw(self), pbitemid, pbchangeunitid, core::mem::transmute(pulltimestamp)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetChangeUnitChangeTime)(windows_core::Interface::as_raw(self), pbitemid, pbchangeunitid, pulltimestamp as _).ok() } } } #[repr(C)] @@ -2932,7 +2932,7 @@ impl ISyncCallback { unsafe { (windows_core::Interface::vtable(self).OnConflict)(windows_core::Interface::as_raw(self), pconflict.param().abi()).ok() } } pub unsafe fn OnFullEnumerationNeeded(&self, pfullenumerationaction: *mut SYNC_FULL_ENUMERATION_ACTION) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OnFullEnumerationNeeded)(windows_core::Interface::as_raw(self), core::mem::transmute(pfullenumerationaction)).ok() } + unsafe { (windows_core::Interface::vtable(self).OnFullEnumerationNeeded)(windows_core::Interface::as_raw(self), pfullenumerationaction as _).ok() } } pub unsafe fn OnRecoverableError(&self, precoverableerror: P0) -> windows_core::Result<()> where @@ -3058,22 +3058,22 @@ windows_core::imp::define_interface!(ISyncChange, ISyncChange_Vtbl, 0xa1952beb_0 windows_core::imp::interface_hierarchy!(ISyncChange, windows_core::IUnknown); impl ISyncChange { pub unsafe fn GetOwnerReplicaId(&self, pbreplicaid: *mut u8, pcbidsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOwnerReplicaId)(windows_core::Interface::as_raw(self), core::mem::transmute(pbreplicaid), core::mem::transmute(pcbidsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOwnerReplicaId)(windows_core::Interface::as_raw(self), pbreplicaid as _, pcbidsize as _).ok() } } pub unsafe fn GetRootItemId(&self, pbrootitemid: *mut u8, pcbidsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRootItemId)(windows_core::Interface::as_raw(self), core::mem::transmute(pbrootitemid), core::mem::transmute(pcbidsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRootItemId)(windows_core::Interface::as_raw(self), pbrootitemid as _, pcbidsize as _).ok() } } pub unsafe fn GetChangeVersion(&self, pbcurrentreplicaid: *const u8, pversion: *mut SYNC_VERSION) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetChangeVersion)(windows_core::Interface::as_raw(self), pbcurrentreplicaid, core::mem::transmute(pversion)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetChangeVersion)(windows_core::Interface::as_raw(self), pbcurrentreplicaid, pversion as _).ok() } } pub unsafe fn GetCreationVersion(&self, pbcurrentreplicaid: *const u8, pversion: *mut SYNC_VERSION) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCreationVersion)(windows_core::Interface::as_raw(self), pbcurrentreplicaid, core::mem::transmute(pversion)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCreationVersion)(windows_core::Interface::as_raw(self), pbcurrentreplicaid, pversion as _).ok() } } pub unsafe fn GetFlags(&self, pdwflags: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFlags)(windows_core::Interface::as_raw(self), pdwflags as _).ok() } } pub unsafe fn GetWorkEstimate(&self, pdwwork: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWorkEstimate)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwwork)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWorkEstimate)(windows_core::Interface::as_raw(self), pdwwork as _).ok() } } pub unsafe fn GetChangeUnits(&self) -> windows_core::Result { unsafe { @@ -3388,10 +3388,10 @@ impl ISyncChangeBatchAdvanced { } } pub unsafe fn GetUpperBoundItemId(&self, pbitemid: *mut u8, pcbidsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetUpperBoundItemId)(windows_core::Interface::as_raw(self), core::mem::transmute(pbitemid), core::mem::transmute(pcbidsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetUpperBoundItemId)(windows_core::Interface::as_raw(self), pbitemid as _, pcbidsize as _).ok() } } pub unsafe fn GetBatchLevelKnowledgeShouldBeApplied(&self, pfbatchknowledgeshouldbeapplied: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBatchLevelKnowledgeShouldBeApplied)(windows_core::Interface::as_raw(self), core::mem::transmute(pfbatchknowledgeshouldbeapplied)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBatchLevelKnowledgeShouldBeApplied)(windows_core::Interface::as_raw(self), pfbatchknowledgeshouldbeapplied as _).ok() } } } #[repr(C)] @@ -3469,13 +3469,13 @@ impl ISyncChangeBatchBase { } } pub unsafe fn GetIsLastBatch(&self, pflastbatch: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIsLastBatch)(windows_core::Interface::as_raw(self), core::mem::transmute(pflastbatch)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIsLastBatch)(windows_core::Interface::as_raw(self), pflastbatch as _).ok() } } pub unsafe fn GetWorkEstimateForBatch(&self, pdwworkforbatch: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWorkEstimateForBatch)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwworkforbatch)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWorkEstimateForBatch)(windows_core::Interface::as_raw(self), pdwworkforbatch as _).ok() } } pub unsafe fn GetRemainingWorkEstimateForSession(&self, pdwremainingworkforsession: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRemainingWorkEstimateForSession)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwremainingworkforsession)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRemainingWorkEstimateForSession)(windows_core::Interface::as_raw(self), pdwremainingworkforsession as _).ok() } } pub unsafe fn BeginOrderedGroup(&self, pblowerbound: *const u8) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).BeginOrderedGroup)(windows_core::Interface::as_raw(self), pblowerbound).ok() } @@ -3520,7 +3520,7 @@ impl ISyncChangeBatchBase { unsafe { (windows_core::Interface::vtable(self).SetRemainingWorkEstimateForSession)(windows_core::Interface::as_raw(self), dwremainingworkforsession).ok() } } pub unsafe fn Serialize(&self, pbchangebatch: *mut u8, pcbchangebatch: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Serialize)(windows_core::Interface::as_raw(self), core::mem::transmute(pbchangebatch), core::mem::transmute(pcbchangebatch)).ok() } + unsafe { (windows_core::Interface::vtable(self).Serialize)(windows_core::Interface::as_raw(self), pbchangebatch as _, pcbchangebatch as _).ok() } } } #[repr(C)] @@ -3706,7 +3706,7 @@ impl core::ops::Deref for ISyncChangeBatchBase2 { windows_core::imp::interface_hierarchy!(ISyncChangeBatchBase2, windows_core::IUnknown, ISyncChangeBatchBase); impl ISyncChangeBatchBase2 { pub unsafe fn SerializeWithOptions(&self, targetformatversion: SYNC_SERIALIZATION_VERSION, dwflags: u32, pbbuffer: *mut u8, pdwserializedsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SerializeWithOptions)(windows_core::Interface::as_raw(self), targetformatversion, dwflags, core::mem::transmute(pbbuffer), core::mem::transmute(pdwserializedsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).SerializeWithOptions)(windows_core::Interface::as_raw(self), targetformatversion, dwflags, pbbuffer as _, pdwserializedsize as _).ok() } } } #[repr(C)] @@ -4056,10 +4056,10 @@ impl ISyncChangeUnit { } } pub unsafe fn GetChangeUnitId(&self, pbchangeunitid: *mut u8, pcbidsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetChangeUnitId)(windows_core::Interface::as_raw(self), core::mem::transmute(pbchangeunitid), core::mem::transmute(pcbidsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetChangeUnitId)(windows_core::Interface::as_raw(self), pbchangeunitid as _, pcbidsize as _).ok() } } pub unsafe fn GetChangeUnitVersion(&self, pbcurrentreplicaid: *const u8, pversion: *mut SYNC_VERSION) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetChangeUnitVersion)(windows_core::Interface::as_raw(self), pbcurrentreplicaid, core::mem::transmute(pversion)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetChangeUnitVersion)(windows_core::Interface::as_raw(self), pbcurrentreplicaid, pversion as _).ok() } } } #[repr(C)] @@ -4116,13 +4116,13 @@ windows_core::imp::define_interface!(ISyncChangeWithFilterKeyMap, ISyncChangeWit windows_core::imp::interface_hierarchy!(ISyncChangeWithFilterKeyMap, windows_core::IUnknown); impl ISyncChangeWithFilterKeyMap { pub unsafe fn GetFilterCount(&self, pdwfiltercount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFilterCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwfiltercount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFilterCount)(windows_core::Interface::as_raw(self), pdwfiltercount as _).ok() } } pub unsafe fn GetFilterChange(&self, dwfilterkey: u32, pfilterchange: *mut SYNC_FILTER_CHANGE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFilterChange)(windows_core::Interface::as_raw(self), dwfilterkey, core::mem::transmute(pfilterchange)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFilterChange)(windows_core::Interface::as_raw(self), dwfilterkey, pfilterchange as _).ok() } } pub unsafe fn GetAllChangeUnitsPresentFlag(&self, pfallchangeunitspresent: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAllChangeUnitsPresentFlag)(windows_core::Interface::as_raw(self), core::mem::transmute(pfallchangeunitspresent)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAllChangeUnitsPresentFlag)(windows_core::Interface::as_raw(self), pfallchangeunitspresent as _).ok() } } pub unsafe fn GetFilterForgottenKnowledge(&self, dwfilterkey: u32) -> windows_core::Result { unsafe { @@ -4545,7 +4545,7 @@ impl ISyncFilter { unsafe { (windows_core::Interface::vtable(self).IsIdentical)(windows_core::Interface::as_raw(self), psyncfilter.param().abi()).ok() } } pub unsafe fn Serialize(&self, pbsyncfilter: *mut u8, pcbsyncfilter: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Serialize)(windows_core::Interface::as_raw(self), core::mem::transmute(pbsyncfilter), core::mem::transmute(pcbsyncfilter)).ok() } + unsafe { (windows_core::Interface::vtable(self).Serialize)(windows_core::Interface::as_raw(self), pbsyncfilter as _, pcbsyncfilter as _).ok() } } } #[repr(C)] @@ -4626,7 +4626,7 @@ windows_core::imp::define_interface!(ISyncFilterInfo, ISyncFilterInfo_Vtbl, 0x79 windows_core::imp::interface_hierarchy!(ISyncFilterInfo, windows_core::IUnknown); impl ISyncFilterInfo { pub unsafe fn Serialize(&self, pbbuffer: *mut u8, pcbbuffer: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Serialize)(windows_core::Interface::as_raw(self), core::mem::transmute(pbbuffer), core::mem::transmute(pcbbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).Serialize)(windows_core::Interface::as_raw(self), pbbuffer as _, pcbbuffer as _).ok() } } } #[repr(C)] @@ -4662,7 +4662,7 @@ impl core::ops::Deref for ISyncFilterInfo2 { windows_core::imp::interface_hierarchy!(ISyncFilterInfo2, windows_core::IUnknown, ISyncFilterInfo); impl ISyncFilterInfo2 { pub unsafe fn GetFlags(&self, pdwflags: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFlags)(windows_core::Interface::as_raw(self), pdwflags as _).ok() } } } #[repr(C)] @@ -4767,10 +4767,10 @@ impl ISyncFullEnumerationChangeBatch { } } pub unsafe fn GetClosedLowerBoundItemId(&self, pbclosedlowerbounditemid: *mut u8, pcbidsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClosedLowerBoundItemId)(windows_core::Interface::as_raw(self), core::mem::transmute(pbclosedlowerbounditemid), core::mem::transmute(pcbidsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClosedLowerBoundItemId)(windows_core::Interface::as_raw(self), pbclosedlowerbounditemid as _, pcbidsize as _).ok() } } pub unsafe fn GetClosedUpperBoundItemId(&self, pbclosedupperbounditemid: *mut u8, pcbidsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClosedUpperBoundItemId)(windows_core::Interface::as_raw(self), core::mem::transmute(pbclosedupperbounditemid), core::mem::transmute(pcbidsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClosedUpperBoundItemId)(windows_core::Interface::as_raw(self), pbclosedupperbounditemid as _, pcbidsize as _).ok() } } } #[repr(C)] @@ -4875,10 +4875,10 @@ windows_core::imp::define_interface!(ISyncKnowledge, ISyncKnowledge_Vtbl, 0x615b windows_core::imp::interface_hierarchy!(ISyncKnowledge, windows_core::IUnknown); impl ISyncKnowledge { pub unsafe fn GetOwnerReplicaId(&self, pbreplicaid: *mut u8, pcbidsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOwnerReplicaId)(windows_core::Interface::as_raw(self), core::mem::transmute(pbreplicaid), core::mem::transmute(pcbidsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOwnerReplicaId)(windows_core::Interface::as_raw(self), pbreplicaid as _, pcbidsize as _).ok() } } pub unsafe fn Serialize(&self, fserializereplicakeymap: bool, pbknowledge: *mut u8, pcbknowledge: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Serialize)(windows_core::Interface::as_raw(self), fserializereplicakeymap.into(), core::mem::transmute(pbknowledge), core::mem::transmute(pcbknowledge)).ok() } + unsafe { (windows_core::Interface::vtable(self).Serialize)(windows_core::Interface::as_raw(self), fserializereplicakeymap.into(), pbknowledge as _, pcbknowledge as _).ok() } } pub unsafe fn SetLocalTickCount(&self, ulltickcount: u64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetLocalTickCount)(windows_core::Interface::as_raw(self), ulltickcount).ok() } @@ -4890,7 +4890,7 @@ impl ISyncKnowledge { unsafe { (windows_core::Interface::vtable(self).ContainsChangeUnit)(windows_core::Interface::as_raw(self), pbversionownerreplicaid, pbitemid, pbchangeunitid, psyncversion).ok() } } pub unsafe fn GetScopeVector(&self, riid: *const windows_core::GUID, ppunk: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetScopeVector)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(ppunk)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScopeVector)(windows_core::Interface::as_raw(self), riid, ppunk as _).ok() } } pub unsafe fn GetReplicaKeyMap(&self) -> windows_core::Result { unsafe { @@ -4908,7 +4908,7 @@ impl ISyncKnowledge { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ConvertVersion)(windows_core::Interface::as_raw(self), pknowledgein.param().abi(), pbcurrentownerid, pversionin, core::mem::transmute(pbnewownerid), core::mem::transmute(pcbidsize), core::mem::transmute(pversionout)).ok() } + unsafe { (windows_core::Interface::vtable(self).ConvertVersion)(windows_core::Interface::as_raw(self), pknowledgein.param().abi(), pbcurrentownerid, pversionin, pbnewownerid as _, pcbidsize as _, pversionout as _).ok() } } pub unsafe fn MapRemoteToLocal(&self, premoteknowledge: P0) -> windows_core::Result where @@ -4956,25 +4956,25 @@ impl ISyncKnowledge { unsafe { (windows_core::Interface::vtable(self).ContainsKnowledge)(windows_core::Interface::as_raw(self), pknowledge.param().abi()).ok() } } pub unsafe fn FindMinTickCountForReplica(&self, pbreplicaid: *const u8, pullreplicatickcount: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).FindMinTickCountForReplica)(windows_core::Interface::as_raw(self), pbreplicaid, core::mem::transmute(pullreplicatickcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindMinTickCountForReplica)(windows_core::Interface::as_raw(self), pbreplicaid, pullreplicatickcount as _).ok() } } pub unsafe fn GetRangeExceptions(&self, riid: *const windows_core::GUID, ppunk: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRangeExceptions)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(ppunk)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRangeExceptions)(windows_core::Interface::as_raw(self), riid, ppunk as _).ok() } } pub unsafe fn GetSingleItemExceptions(&self, riid: *const windows_core::GUID, ppunk: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSingleItemExceptions)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(ppunk)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSingleItemExceptions)(windows_core::Interface::as_raw(self), riid, ppunk as _).ok() } } pub unsafe fn GetChangeUnitExceptions(&self, riid: *const windows_core::GUID, ppunk: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetChangeUnitExceptions)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(ppunk)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetChangeUnitExceptions)(windows_core::Interface::as_raw(self), riid, ppunk as _).ok() } } pub unsafe fn FindClockVectorForItem(&self, pbitemid: *const u8, riid: *const windows_core::GUID, ppunk: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).FindClockVectorForItem)(windows_core::Interface::as_raw(self), pbitemid, riid, core::mem::transmute(ppunk)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindClockVectorForItem)(windows_core::Interface::as_raw(self), pbitemid, riid, ppunk as _).ok() } } pub unsafe fn FindClockVectorForChangeUnit(&self, pbitemid: *const u8, pbchangeunitid: *const u8, riid: *const windows_core::GUID, ppunk: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).FindClockVectorForChangeUnit)(windows_core::Interface::as_raw(self), pbitemid, pbchangeunitid, riid, core::mem::transmute(ppunk)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindClockVectorForChangeUnit)(windows_core::Interface::as_raw(self), pbitemid, pbchangeunitid, riid, ppunk as _).ok() } } pub unsafe fn GetVersion(&self, pdwversion: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetVersion)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwversion)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetVersion)(windows_core::Interface::as_raw(self), pdwversion as _).ok() } } } #[repr(C)] @@ -5256,7 +5256,7 @@ impl core::ops::Deref for ISyncKnowledge2 { windows_core::imp::interface_hierarchy!(ISyncKnowledge2, windows_core::IUnknown, ISyncKnowledge); impl ISyncKnowledge2 { pub unsafe fn GetIdParameters(&self, pidparameters: *mut ID_PARAMETERS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIdParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(pidparameters)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIdParameters)(windows_core::Interface::as_raw(self), pidparameters as _).ok() } } pub unsafe fn ProjectOntoColumnSet(&self, ppcolumns: *const *const u8, count: u32) -> windows_core::Result { unsafe { @@ -5265,22 +5265,22 @@ impl ISyncKnowledge2 { } } pub unsafe fn SerializeWithOptions(&self, targetformatversion: SYNC_SERIALIZATION_VERSION, dwflags: u32, pbbuffer: *mut u8, pdwserializedsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SerializeWithOptions)(windows_core::Interface::as_raw(self), targetformatversion, dwflags, core::mem::transmute(pbbuffer), core::mem::transmute(pdwserializedsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).SerializeWithOptions)(windows_core::Interface::as_raw(self), targetformatversion, dwflags, pbbuffer as _, pdwserializedsize as _).ok() } } pub unsafe fn GetLowestUncontainedId(&self, pisyncknowledge: P0, pbitemid: *mut u8, pcbitemidsize: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetLowestUncontainedId)(windows_core::Interface::as_raw(self), pisyncknowledge.param().abi(), core::mem::transmute(pbitemid), core::mem::transmute(pcbitemidsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLowestUncontainedId)(windows_core::Interface::as_raw(self), pisyncknowledge.param().abi(), pbitemid as _, pcbitemidsize as _).ok() } } pub unsafe fn GetInspector(&self, riid: *const windows_core::GUID, ppiinspector: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInspector)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(ppiinspector)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInspector)(windows_core::Interface::as_raw(self), riid, ppiinspector as _).ok() } } pub unsafe fn GetMinimumSupportedVersion(&self, pversion: *mut SYNC_SERIALIZATION_VERSION) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMinimumSupportedVersion)(windows_core::Interface::as_raw(self), core::mem::transmute(pversion)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMinimumSupportedVersion)(windows_core::Interface::as_raw(self), pversion as _).ok() } } pub unsafe fn GetStatistics(&self, which: SYNC_STATISTICS, pvalue: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStatistics)(windows_core::Interface::as_raw(self), which, core::mem::transmute(pvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStatistics)(windows_core::Interface::as_raw(self), which, pvalue as _).ok() } } pub unsafe fn ContainsKnowledgeForItem(&self, pknowledge: P0, pbitemid: *const u8) -> windows_core::Result<()> where @@ -5329,7 +5329,7 @@ impl ISyncKnowledge2 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CompareToKnowledgeCookie)(windows_core::Interface::as_raw(self), pknowledgecookie.param().abi(), core::mem::transmute(presult)).ok() } + unsafe { (windows_core::Interface::vtable(self).CompareToKnowledgeCookie)(windows_core::Interface::as_raw(self), pknowledgecookie.param().abi(), presult as _).ok() } } } #[repr(C)] @@ -5503,7 +5503,7 @@ windows_core::imp::define_interface!(ISyncMergeTombstoneChange, ISyncMergeTombst windows_core::imp::interface_hierarchy!(ISyncMergeTombstoneChange, windows_core::IUnknown); impl ISyncMergeTombstoneChange { pub unsafe fn GetWinnerItemId(&self, pbwinneritemid: *mut u8, pcbidsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetWinnerItemId)(windows_core::Interface::as_raw(self), core::mem::transmute(pbwinneritemid), core::mem::transmute(pcbidsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWinnerItemId)(windows_core::Interface::as_raw(self), pbwinneritemid as _, pcbidsize as _).ok() } } } #[repr(C)] @@ -5533,7 +5533,7 @@ windows_core::imp::define_interface!(ISyncProvider, ISyncProvider_Vtbl, 0x8f6570 windows_core::imp::interface_hierarchy!(ISyncProvider, windows_core::IUnknown); impl ISyncProvider { pub unsafe fn GetIdParameters(&self, pidparameters: *mut ID_PARAMETERS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIdParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(pidparameters)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIdParameters)(windows_core::Interface::as_raw(self), pidparameters as _).ok() } } } #[repr(C)] @@ -5583,7 +5583,7 @@ impl ISyncProviderConfigUI { { unsafe { let mut result__ = core::mem::zeroed(); - (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__)) + (windows_core::Interface::vtable(self).CreateAndRegisterNewSyncProvider)(windows_core::Interface::as_raw(self), hwndparent.unwrap_or(core::mem::zeroed()) as _, punkcontext.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] @@ -5592,7 +5592,7 @@ impl ISyncProviderConfigUI { P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).ModifySyncProvider)(windows_core::Interface::as_raw(self), hwndparent.unwrap_or(core::mem::zeroed()) as _, punkcontext.param().abi(), pproviderinfo.param().abi()).ok() } } } #[repr(C)] @@ -5803,7 +5803,7 @@ impl ISyncProviderRegistration { pub unsafe fn EnumerateSyncProviderConfigUIs(&self, pguidcontenttype: Option<*const windows_core::GUID>, dwsupportedarchitecture: u32) -> windows_core::Result { unsafe { 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::mem::zeroed())), dwsupportedarchitecture, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).EnumerateSyncProviderConfigUIs)(windows_core::Interface::as_raw(self), pguidcontenttype.unwrap_or(core::mem::zeroed()) as _, dwsupportedarchitecture, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] @@ -5826,7 +5826,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 { unsafe { 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::mem::zeroed())), dwstateflagstofiltermask, dwstateflagstofilter, refproviderclsid, dwsupportedarchitecture, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).EnumerateSyncProviders)(windows_core::Interface::as_raw(self), pguidcontenttype.unwrap_or(core::mem::zeroed()) as _, dwstateflagstofiltermask, dwstateflagstofilter, refproviderclsid, dwsupportedarchitecture, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] @@ -5865,7 +5865,7 @@ impl ISyncProviderRegistration { unsafe { (windows_core::Interface::vtable(self).SetSyncProviderState)(windows_core::Interface::as_raw(self), pguidinstanceid, dwstateflagsmask, dwstateflags).ok() } } pub unsafe fn RegisterForEvent(&self, phevent: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RegisterForEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(phevent)).ok() } + unsafe { (windows_core::Interface::vtable(self).RegisterForEvent)(windows_core::Interface::as_raw(self), phevent as _).ok() } } pub unsafe fn RevokeEvent(&self, hevent: super::super::Foundation::HANDLE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RevokeEvent)(windows_core::Interface::as_raw(self), hevent).ok() } @@ -6228,19 +6228,19 @@ windows_core::imp::define_interface!(ISyncSessionState, ISyncSessionState_Vtbl, windows_core::imp::interface_hierarchy!(ISyncSessionState, windows_core::IUnknown); impl ISyncSessionState { pub unsafe fn IsCanceled(&self, pfiscanceled: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).IsCanceled)(windows_core::Interface::as_raw(self), core::mem::transmute(pfiscanceled)).ok() } + unsafe { (windows_core::Interface::vtable(self).IsCanceled)(windows_core::Interface::as_raw(self), pfiscanceled as _).ok() } } pub unsafe fn GetInfoForChangeApplication(&self, pbchangeapplierinfo: *mut u8, pcbchangeapplierinfo: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInfoForChangeApplication)(windows_core::Interface::as_raw(self), core::mem::transmute(pbchangeapplierinfo), core::mem::transmute(pcbchangeapplierinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInfoForChangeApplication)(windows_core::Interface::as_raw(self), pbchangeapplierinfo as _, pcbchangeapplierinfo as _).ok() } } pub unsafe fn LoadInfoFromChangeApplication(&self, pbchangeapplierinfo: *const u8, cbchangeapplierinfo: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).LoadInfoFromChangeApplication)(windows_core::Interface::as_raw(self), pbchangeapplierinfo, cbchangeapplierinfo).ok() } } pub unsafe fn GetForgottenKnowledgeRecoveryRangeStart(&self, pbrangestart: *mut u8, pcbrangestart: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetForgottenKnowledgeRecoveryRangeStart)(windows_core::Interface::as_raw(self), core::mem::transmute(pbrangestart), core::mem::transmute(pcbrangestart)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetForgottenKnowledgeRecoveryRangeStart)(windows_core::Interface::as_raw(self), pbrangestart as _, pcbrangestart as _).ok() } } pub unsafe fn GetForgottenKnowledgeRecoveryRangeEnd(&self, pbrangeend: *mut u8, pcbrangeend: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetForgottenKnowledgeRecoveryRangeEnd)(windows_core::Interface::as_raw(self), core::mem::transmute(pbrangeend), core::mem::transmute(pcbrangeend)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetForgottenKnowledgeRecoveryRangeEnd)(windows_core::Interface::as_raw(self), pbrangeend as _, pcbrangeend as _).ok() } } pub unsafe fn SetForgottenKnowledgeRecoveryRange(&self, prange: *const SYNC_RANGE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetForgottenKnowledgeRecoveryRange)(windows_core::Interface::as_raw(self), prange).ok() } @@ -6342,7 +6342,7 @@ impl ISyncSessionState2 { unsafe { (windows_core::Interface::vtable(self).SetProviderWithError)(windows_core::Interface::as_raw(self), fself.into()).ok() } } pub unsafe fn GetSessionErrorStatus(&self, phrsessionerror: *mut windows_core::HRESULT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSessionErrorStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(phrsessionerror)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSessionErrorStatus)(windows_core::Interface::as_raw(self), phrsessionerror as _).ok() } } } #[repr(C)] @@ -6384,7 +6384,7 @@ windows_core::imp::define_interface!(ISynchronousDataRetriever, ISynchronousData windows_core::imp::interface_hierarchy!(ISynchronousDataRetriever, windows_core::IUnknown); impl ISynchronousDataRetriever { pub unsafe fn GetIdParameters(&self, pidparameters: *mut ID_PARAMETERS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIdParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(pidparameters)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIdParameters)(windows_core::Interface::as_raw(self), pidparameters as _).ok() } } pub unsafe fn LoadChangeData(&self, ploadchangecontext: P0) -> windows_core::Result where 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 892d5fa8fb..16020cba24 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); - unsafe { MI_Application_InitializeV1(flags, core::mem::transmute(applicationid.unwrap_or(core::mem::zeroed())), core::mem::transmute(extendederror.unwrap_or(core::mem::zeroed())), core::mem::transmute(application)) } + unsafe { MI_Application_InitializeV1(flags, applicationid.unwrap_or(core::mem::zeroed()) as _, extendederror.unwrap_or(core::mem::zeroed()) as _, application as _) } } #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] @@ -32,7 +32,7 @@ impl IEnumWbemClassObject { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn Next(&self, ltimeout: i32, apobjects: &mut [Option], pureturned: *mut u32) -> windows_core::HRESULT { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ltimeout, apobjects.len().try_into().unwrap(), core::mem::transmute(apobjects.as_ptr()), core::mem::transmute(pureturned)) } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ltimeout, apobjects.len().try_into().unwrap(), core::mem::transmute(apobjects.as_ptr()), pureturned as _) } } pub unsafe fn NextAsync(&self, ucount: u32, psink: P1) -> windows_core::HRESULT where @@ -129,7 +129,7 @@ impl IMofCompiler { P3: windows_core::Param, P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CompileFile)(windows_core::Interface::as_raw(self), filename.param().abi(), serverandnamespace.param().abi(), user.param().abi(), authority.param().abi(), password.param().abi(), loptionflags, lclassflags, linstanceflags, core::mem::transmute(pinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).CompileFile)(windows_core::Interface::as_raw(self), filename.param().abi(), serverandnamespace.param().abi(), user.param().abi(), authority.param().abi(), password.param().abi(), loptionflags, lclassflags, linstanceflags, pinfo as _).ok() } } pub unsafe fn CompileBuffer(&self, pbuffer: &[u8], serverandnamespace: P2, user: P3, authority: P4, password: P5, loptionflags: i32, lclassflags: i32, linstanceflags: i32, pinfo: *mut WBEM_COMPILE_STATUS_INFO) -> windows_core::Result<()> where @@ -138,7 +138,7 @@ impl IMofCompiler { P4: windows_core::Param, P5: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CompileBuffer)(windows_core::Interface::as_raw(self), pbuffer.len().try_into().unwrap(), core::mem::transmute(pbuffer.as_ptr()), serverandnamespace.param().abi(), user.param().abi(), authority.param().abi(), password.param().abi(), loptionflags, lclassflags, linstanceflags, core::mem::transmute(pinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).CompileBuffer)(windows_core::Interface::as_raw(self), pbuffer.len().try_into().unwrap(), core::mem::transmute(pbuffer.as_ptr()), serverandnamespace.param().abi(), user.param().abi(), authority.param().abi(), password.param().abi(), loptionflags, lclassflags, linstanceflags, pinfo as _).ok() } } pub unsafe fn CreateBMOF(&self, textfilename: P0, bmoffilename: P1, serverandnamespace: P2, loptionflags: i32, lclassflags: i32, linstanceflags: i32, pinfo: *mut WBEM_COMPILE_STATUS_INFO) -> windows_core::Result<()> where @@ -146,7 +146,7 @@ impl IMofCompiler { P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateBMOF)(windows_core::Interface::as_raw(self), textfilename.param().abi(), bmoffilename.param().abi(), serverandnamespace.param().abi(), loptionflags, lclassflags, linstanceflags, core::mem::transmute(pinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateBMOF)(windows_core::Interface::as_raw(self), textfilename.param().abi(), bmoffilename.param().abi(), serverandnamespace.param().abi(), loptionflags, lclassflags, linstanceflags, pinfo as _).ok() } } } #[repr(C)] @@ -5043,7 +5043,7 @@ impl IWbemAddressResolution { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Resolve)(windows_core::Interface::as_raw(self), wsznamespacepath.param().abi(), core::mem::transmute(wszaddresstype), core::mem::transmute(pdwaddresslength), core::mem::transmute(pabbinaryaddress)).ok() } + unsafe { (windows_core::Interface::vtable(self).Resolve)(windows_core::Interface::as_raw(self), wsznamespacepath.param().abi(), core::mem::transmute(wszaddresstype), pdwaddresslength as _, pabbinaryaddress as _).ok() } } } #[repr(C)] @@ -5282,7 +5282,7 @@ impl IWbemClassObject { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Get)(windows_core::Interface::as_raw(self), wszname.param().abi(), lflags, core::mem::transmute(pval), core::mem::transmute(ptype.unwrap_or(core::mem::zeroed())), core::mem::transmute(plflavor.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Get)(windows_core::Interface::as_raw(self), wszname.param().abi(), lflags, core::mem::transmute(pval), ptype.unwrap_or(core::mem::zeroed()) as _, plflavor.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -5312,7 +5312,7 @@ impl IWbemClassObject { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn Next(&self, lflags: i32, strname: *mut windows_core::BSTR, pval: *mut super::Variant::VARIANT, ptype: *mut i32, plflavor: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), lflags, core::mem::transmute(strname), core::mem::transmute(pval), core::mem::transmute(ptype), core::mem::transmute(plflavor)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), lflags, core::mem::transmute(strname), core::mem::transmute(pval), ptype as _, plflavor as _).ok() } } pub unsafe fn EndEnumeration(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).EndEnumeration)(windows_core::Interface::as_raw(self)).ok() } @@ -5847,7 +5847,7 @@ impl IWbemConfigureRefresher { P1: windows_core::Param, P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).AddObjectByPath)(windows_core::Interface::as_raw(self), pnamespace.param().abi(), wszpath.param().abi(), lflags, pcontext.param().abi(), core::mem::transmute(pprefreshable), core::mem::transmute(plid)).ok() } + unsafe { (windows_core::Interface::vtable(self).AddObjectByPath)(windows_core::Interface::as_raw(self), pnamespace.param().abi(), wszpath.param().abi(), lflags, pcontext.param().abi(), core::mem::transmute(pprefreshable), plid as _).ok() } } pub unsafe fn AddObjectByTemplate(&self, pnamespace: P0, ptemplate: P1, lflags: i32, pcontext: P3, pprefreshable: *mut Option, plid: *mut i32) -> windows_core::Result<()> where @@ -5855,13 +5855,13 @@ impl IWbemConfigureRefresher { P1: windows_core::Param, P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).AddObjectByTemplate)(windows_core::Interface::as_raw(self), pnamespace.param().abi(), ptemplate.param().abi(), lflags, pcontext.param().abi(), core::mem::transmute(pprefreshable), core::mem::transmute(plid)).ok() } + unsafe { (windows_core::Interface::vtable(self).AddObjectByTemplate)(windows_core::Interface::as_raw(self), pnamespace.param().abi(), ptemplate.param().abi(), lflags, pcontext.param().abi(), core::mem::transmute(pprefreshable), plid as _).ok() } } pub unsafe fn AddRefresher(&self, prefresher: P0, lflags: i32, plid: *mut i32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).AddRefresher)(windows_core::Interface::as_raw(self), prefresher.param().abi(), lflags, core::mem::transmute(plid)).ok() } + unsafe { (windows_core::Interface::vtable(self).AddRefresher)(windows_core::Interface::as_raw(self), prefresher.param().abi(), lflags, plid as _).ok() } } pub unsafe fn Remove(&self, lid: i32, lflags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Remove)(windows_core::Interface::as_raw(self), lid, lflags).ok() } @@ -5872,7 +5872,7 @@ impl IWbemConfigureRefresher { P1: windows_core::Param, P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).AddEnum)(windows_core::Interface::as_raw(self), pnamespace.param().abi(), wszclassname.param().abi(), lflags, pcontext.param().abi(), core::mem::transmute(ppenum), core::mem::transmute(plid)).ok() } + unsafe { (windows_core::Interface::vtable(self).AddEnum)(windows_core::Interface::as_raw(self), pnamespace.param().abi(), wszclassname.param().abi(), lflags, pcontext.param().abi(), core::mem::transmute(ppenum), plid as _).ok() } } } #[repr(C)] @@ -6612,7 +6612,7 @@ impl IWbemHiPerfEnum { unsafe { (windows_core::Interface::vtable(self).RemoveObjects)(windows_core::Interface::as_raw(self), lflags, apids.len().try_into().unwrap(), core::mem::transmute(apids.as_ptr())).ok() } } pub unsafe fn GetObjects(&self, lflags: i32, apobj: &mut [Option], pureturned: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetObjects)(windows_core::Interface::as_raw(self), lflags, apobj.len().try_into().unwrap(), core::mem::transmute(apobj.as_ptr()), core::mem::transmute(pureturned)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetObjects)(windows_core::Interface::as_raw(self), lflags, apobj.len().try_into().unwrap(), core::mem::transmute(apobj.as_ptr()), pureturned as _).ok() } } pub unsafe fn RemoveAll(&self, lflags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RemoveAll)(windows_core::Interface::as_raw(self), lflags).ok() } @@ -6699,7 +6699,7 @@ impl IWbemHiPerfProvider { P2: windows_core::Param, P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateRefreshableObject)(windows_core::Interface::as_raw(self), pnamespace.param().abi(), ptemplate.param().abi(), prefresher.param().abi(), lflags, pcontext.param().abi(), core::mem::transmute(pprefreshable), core::mem::transmute(plid)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateRefreshableObject)(windows_core::Interface::as_raw(self), pnamespace.param().abi(), ptemplate.param().abi(), prefresher.param().abi(), lflags, pcontext.param().abi(), core::mem::transmute(pprefreshable), plid as _).ok() } } pub unsafe fn StopRefreshing(&self, prefresher: P0, lid: i32, lflags: i32) -> windows_core::Result<()> where @@ -6987,13 +6987,13 @@ impl IWbemObjectAccess { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetPropertyHandle)(windows_core::Interface::as_raw(self), wszpropertyname.param().abi(), core::mem::transmute(ptype), core::mem::transmute(plhandle)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropertyHandle)(windows_core::Interface::as_raw(self), wszpropertyname.param().abi(), ptype as _, plhandle as _).ok() } } pub unsafe fn WritePropertyValue(&self, lhandle: i32, adata: &[u8]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).WritePropertyValue)(windows_core::Interface::as_raw(self), lhandle, adata.len().try_into().unwrap(), core::mem::transmute(adata.as_ptr())).ok() } } pub unsafe fn ReadPropertyValue(&self, lhandle: i32, plnumbytes: *mut i32, adata: &mut [u8]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReadPropertyValue)(windows_core::Interface::as_raw(self), lhandle, adata.len().try_into().unwrap(), core::mem::transmute(plnumbytes), core::mem::transmute(adata.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadPropertyValue)(windows_core::Interface::as_raw(self), lhandle, adata.len().try_into().unwrap(), plnumbytes as _, core::mem::transmute(adata.as_ptr())).ok() } } pub unsafe fn ReadDWORD(&self, lhandle: i32) -> windows_core::Result { unsafe { @@ -7014,7 +7014,7 @@ impl IWbemObjectAccess { unsafe { (windows_core::Interface::vtable(self).WriteQWORD)(windows_core::Interface::as_raw(self), lhandle, pw).ok() } } pub unsafe fn GetPropertyInfoByHandle(&self, lhandle: i32, pstrname: *mut windows_core::BSTR, ptype: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPropertyInfoByHandle)(windows_core::Interface::as_raw(self), lhandle, core::mem::transmute(pstrname), core::mem::transmute(ptype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropertyInfoByHandle)(windows_core::Interface::as_raw(self), lhandle, core::mem::transmute(pstrname), ptype as _).ok() } } pub unsafe fn Lock(&self, lflags: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), lflags).ok() } @@ -7384,7 +7384,7 @@ impl IWbemPath { unsafe { (windows_core::Interface::vtable(self).SetText)(windows_core::Interface::as_raw(self), umode, pszpath.param().abi()).ok() } } pub unsafe fn GetText(&self, lflags: i32, pubufflength: *mut u32, psztext: windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), lflags, core::mem::transmute(pubufflength), core::mem::transmute(psztext)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), lflags, pubufflength as _, core::mem::transmute(psztext)).ok() } } pub unsafe fn GetInfo(&self, urequestedinfo: u32) -> windows_core::Result { unsafe { @@ -7399,7 +7399,7 @@ impl IWbemPath { unsafe { (windows_core::Interface::vtable(self).SetServer)(windows_core::Interface::as_raw(self), name.param().abi()).ok() } } pub unsafe fn GetServer(&self, punamebuflength: *mut u32, pname: windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetServer)(windows_core::Interface::as_raw(self), core::mem::transmute(punamebuflength), core::mem::transmute(pname)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetServer)(windows_core::Interface::as_raw(self), punamebuflength as _, core::mem::transmute(pname)).ok() } } pub unsafe fn GetNamespaceCount(&self) -> windows_core::Result { unsafe { @@ -7414,7 +7414,7 @@ impl IWbemPath { unsafe { (windows_core::Interface::vtable(self).SetNamespaceAt)(windows_core::Interface::as_raw(self), uindex, pszname.param().abi()).ok() } } pub unsafe fn GetNamespaceAt(&self, uindex: u32, punamebuflength: *mut u32, pname: windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetNamespaceAt)(windows_core::Interface::as_raw(self), uindex, core::mem::transmute(punamebuflength), core::mem::transmute(pname)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetNamespaceAt)(windows_core::Interface::as_raw(self), uindex, punamebuflength as _, core::mem::transmute(pname)).ok() } } pub unsafe fn RemoveNamespaceAt(&self, uindex: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RemoveNamespaceAt)(windows_core::Interface::as_raw(self), uindex).ok() } @@ -7441,10 +7441,10 @@ impl IWbemPath { unsafe { (windows_core::Interface::vtable(self).SetScopeFromText)(windows_core::Interface::as_raw(self), uindex, psztext.param().abi()).ok() } } pub unsafe fn GetScope(&self, uindex: u32, puclassnamebufsize: *mut u32, pszclass: windows_core::PWSTR, pkeylist: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetScope)(windows_core::Interface::as_raw(self), uindex, core::mem::transmute(puclassnamebufsize), core::mem::transmute(pszclass), core::mem::transmute(pkeylist)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScope)(windows_core::Interface::as_raw(self), uindex, puclassnamebufsize as _, core::mem::transmute(pszclass), core::mem::transmute(pkeylist)).ok() } } pub unsafe fn GetScopeAsText(&self, uindex: u32, putextbufsize: *mut u32, psztext: windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetScopeAsText)(windows_core::Interface::as_raw(self), uindex, core::mem::transmute(putextbufsize), core::mem::transmute(psztext)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScopeAsText)(windows_core::Interface::as_raw(self), uindex, putextbufsize as _, core::mem::transmute(psztext)).ok() } } pub unsafe fn RemoveScope(&self, uindex: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RemoveScope)(windows_core::Interface::as_raw(self), uindex).ok() } @@ -7459,7 +7459,7 @@ impl IWbemPath { unsafe { (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: Option) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetClassName)(windows_core::Interface::as_raw(self), pubufflength as _, pszname.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetKeyList(&self) -> windows_core::Result { unsafe { @@ -7801,11 +7801,11 @@ impl IWbemPathKeyList { unsafe { (windows_core::Interface::vtable(self).SetKey2)(windows_core::Interface::as_raw(self), wszname.param().abi(), uflags, ucimtype, core::mem::transmute(pkeyval)).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetKey)(windows_core::Interface::as_raw(self), ukeyix, 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() } + unsafe { (windows_core::Interface::vtable(self).GetKey)(windows_core::Interface::as_raw(self), ukeyix, uflags, punamebufsize as _, pszkeyname.unwrap_or(core::mem::zeroed()) as _, pukeyvalbufsize as _, pkeyval as _, puapparentcimtype as _).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: Option, pkeyvalue: *mut super::Variant::VARIANT, puapparentcimtype: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetKey2)(windows_core::Interface::as_raw(self), ukeyix, uflags, core::mem::transmute(punamebufsize), core::mem::transmute(pszkeyname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pkeyvalue), core::mem::transmute(puapparentcimtype)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetKey2)(windows_core::Interface::as_raw(self), ukeyix, uflags, punamebufsize as _, pszkeyname.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pkeyvalue), puapparentcimtype as _).ok() } } pub unsafe fn RemoveKey(&self, wszname: P0, uflags: u32) -> windows_core::Result<()> where @@ -7826,7 +7826,7 @@ impl IWbemPathKeyList { } } pub unsafe fn GetText(&self, lflags: i32, pubufflength: *mut u32, psztext: windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), lflags, core::mem::transmute(pubufflength), core::mem::transmute(psztext)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), lflags, pubufflength as _, core::mem::transmute(psztext)).ok() } } } #[repr(C)] @@ -8131,7 +8131,7 @@ impl IWbemQualifierSet { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Get)(windows_core::Interface::as_raw(self), wszname.param().abi(), lflags, core::mem::transmute(pval), core::mem::transmute(plflavor)).ok() } + unsafe { (windows_core::Interface::vtable(self).Get)(windows_core::Interface::as_raw(self), wszname.param().abi(), lflags, core::mem::transmute(pval), plflavor as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn Put(&self, wszname: P0, pval: *const super::Variant::VARIANT, lflavor: i32) -> windows_core::Result<()> @@ -8158,7 +8158,7 @@ impl IWbemQualifierSet { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn Next(&self, lflags: i32, pstrname: *mut windows_core::BSTR, pval: *mut super::Variant::VARIANT, plflavor: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), lflags, core::mem::transmute(pstrname), core::mem::transmute(pval), core::mem::transmute(plflavor)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), lflags, core::mem::transmute(pstrname), core::mem::transmute(pval), plflavor as _).ok() } } pub unsafe fn EndEnumeration(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).EndEnumeration)(windows_core::Interface::as_raw(self)).ok() } @@ -8275,7 +8275,7 @@ impl IWbemQuery { unsafe { (windows_core::Interface::vtable(self).SetLanguageFeatures)(windows_core::Interface::as_raw(self), uflags, uarraysize, pufeatures).ok() } } pub unsafe fn TestLanguageFeatures(&self, uflags: u32, uarraysize: *mut u32, pufeatures: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TestLanguageFeatures)(windows_core::Interface::as_raw(self), uflags, core::mem::transmute(uarraysize), core::mem::transmute(pufeatures)).ok() } + unsafe { (windows_core::Interface::vtable(self).TestLanguageFeatures)(windows_core::Interface::as_raw(self), uflags, uarraysize as _, pufeatures as _).ok() } } pub unsafe fn Parse(&self, pszlang: P0, pszquery: P1, uflags: u32) -> windows_core::Result<()> where @@ -8285,13 +8285,13 @@ impl IWbemQuery { unsafe { (windows_core::Interface::vtable(self).Parse)(windows_core::Interface::as_raw(self), pszlang.param().abi(), pszquery.param().abi(), uflags).ok() } } pub unsafe fn GetAnalysis(&self, uanalysistype: u32, uflags: u32, panalysis: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAnalysis)(windows_core::Interface::as_raw(self), uanalysistype, uflags, core::mem::transmute(panalysis)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAnalysis)(windows_core::Interface::as_raw(self), uanalysistype, uflags, panalysis as _).ok() } } pub unsafe fn FreeMemory(&self, pmem: *const core::ffi::c_void) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).FreeMemory)(windows_core::Interface::as_raw(self), pmem).ok() } } pub unsafe fn GetQueryInfo(&self, uanalysistype: u32, uinfoid: u32, ubufsize: u32, pdestbuf: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetQueryInfo)(windows_core::Interface::as_raw(self), uanalysistype, uinfoid, ubufsize, core::mem::transmute(pdestbuf)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetQueryInfo)(windows_core::Interface::as_raw(self), uanalysistype, uinfoid, ubufsize, pdestbuf as _).ok() } } } #[repr(C)] @@ -8411,7 +8411,7 @@ impl IWbemServices { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).OpenNamespace)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strnamespace), lflags, pctx.param().abi(), core::mem::transmute(ppworkingnamespace.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppresult.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).OpenNamespace)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strnamespace), lflags, pctx.param().abi(), ppworkingnamespace.unwrap_or(core::mem::zeroed()) as _, ppresult.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn CancelAsyncCall(&self, psink: P0) -> windows_core::Result<()> where @@ -8429,7 +8429,7 @@ impl IWbemServices { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetObject)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strobjectpath), lflags, pctx.param().abi(), core::mem::transmute(ppobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppcallresult.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetObject)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strobjectpath), lflags, pctx.param().abi(), ppobject.unwrap_or(core::mem::zeroed()) as _, ppcallresult.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetObjectAsync(&self, strobjectpath: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: P2, presponsehandler: P3) -> windows_core::Result<()> where @@ -8443,7 +8443,7 @@ impl IWbemServices { P0: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).PutClass)(windows_core::Interface::as_raw(self), pobject.param().abi(), lflags, pctx.param().abi(), core::mem::transmute(ppcallresult.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).PutClass)(windows_core::Interface::as_raw(self), pobject.param().abi(), lflags, pctx.param().abi(), ppcallresult.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn PutClassAsync(&self, pobject: P0, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: P2, presponsehandler: P3) -> windows_core::Result<()> where @@ -8457,7 +8457,7 @@ impl IWbemServices { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DeleteClass)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strclass), lflags, pctx.param().abi(), core::mem::transmute(ppcallresult.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).DeleteClass)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strclass), lflags, pctx.param().abi(), ppcallresult.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn DeleteClassAsync(&self, strclass: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: P2, presponsehandler: P3) -> windows_core::Result<()> where @@ -8487,7 +8487,7 @@ impl IWbemServices { P0: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).PutInstance)(windows_core::Interface::as_raw(self), pinst.param().abi(), lflags, pctx.param().abi(), core::mem::transmute(ppcallresult.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).PutInstance)(windows_core::Interface::as_raw(self), pinst.param().abi(), lflags, pctx.param().abi(), ppcallresult.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn PutInstanceAsync(&self, pinst: P0, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: P2, presponsehandler: P3) -> windows_core::Result<()> where @@ -8501,7 +8501,7 @@ impl IWbemServices { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).DeleteInstance)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strobjectpath), lflags, pctx.param().abi(), core::mem::transmute(ppcallresult.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).DeleteInstance)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strobjectpath), lflags, pctx.param().abi(), ppcallresult.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn DeleteInstanceAsync(&self, strobjectpath: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: P2, presponsehandler: P3) -> windows_core::Result<()> where @@ -8563,7 +8563,7 @@ impl IWbemServices { P3: windows_core::Param, P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ExecMethod)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strobjectpath), core::mem::transmute_copy(strmethodname), 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() } + unsafe { (windows_core::Interface::vtable(self).ExecMethod)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strobjectpath), core::mem::transmute_copy(strmethodname), lflags, pctx.param().abi(), pinparams.param().abi(), ppoutparams.unwrap_or(core::mem::zeroed()) as _, ppcallresult.unwrap_or(core::mem::zeroed()) as _).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 8521965098..977550b54b 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Accessibility/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Accessibility/mod.rs @@ -15,7 +15,7 @@ where P0: windows_core::Param, { windows_targets::link!("oleacc.dll" "system" fn AccessibleChildren(pacccontainer : * mut core::ffi::c_void, ichildstart : i32, cchildren : i32, rgvarchildren : *mut super::super::System::Variant:: VARIANT, pcobtained : *mut i32) -> windows_core::HRESULT); - unsafe { AccessibleChildren(pacccontainer.param().abi(), ichildstart, rgvarchildren.len().try_into().unwrap(), core::mem::transmute(rgvarchildren.as_ptr()), core::mem::transmute(pcobtained)).ok() } + unsafe { AccessibleChildren(pacccontainer.param().abi(), ichildstart, rgvarchildren.len().try_into().unwrap(), core::mem::transmute(rgvarchildren.as_ptr()), pcobtained as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] #[inline] @@ -32,12 +32,12 @@ pub unsafe fn AccessibleObjectFromPoint(ptscreen: super::super::Foundation::POIN #[inline] 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); - unsafe { AccessibleObjectFromWindow(hwnd, dwid, riid, core::mem::transmute(ppvobject)).ok() } + unsafe { AccessibleObjectFromWindow(hwnd, dwid, riid, ppvobject as _).ok() } } #[inline] 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); - unsafe { CreateStdAccessibleObject(hwnd, idobject, riid, core::mem::transmute(ppvobject)).ok() } + unsafe { CreateStdAccessibleObject(hwnd, idobject, riid, ppvobject as _).ok() } } #[inline] 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<()> @@ -45,7 +45,7 @@ where 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); - unsafe { CreateStdAccessibleProxyA(hwnd, pclassname.param().abi(), idobject, riid, core::mem::transmute(ppvobject)).ok() } + unsafe { CreateStdAccessibleProxyA(hwnd, pclassname.param().abi(), idobject, riid, ppvobject as _).ok() } } #[inline] 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<()> @@ -53,7 +53,7 @@ where 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); - unsafe { CreateStdAccessibleProxyW(hwnd, pclassname.param().abi(), idobject, riid, core::mem::transmute(ppvobject)).ok() } + unsafe { CreateStdAccessibleProxyW(hwnd, pclassname.param().abi(), idobject, riid, ppvobject as _).ok() } } #[inline] pub unsafe fn DockPattern_SetDockPosition(hobj: HUIAPATTERNOBJECT, dockposition: DockPosition) -> windows_core::Result<()> { @@ -73,7 +73,7 @@ pub unsafe fn ExpandCollapsePattern_Expand(hobj: HUIAPATTERNOBJECT) -> windows_c #[inline] pub unsafe fn GetOleaccVersionInfo(pver: *mut u32, pbuild: *mut u32) { windows_targets::link!("oleacc.dll" "system" fn GetOleaccVersionInfo(pver : *mut u32, pbuild : *mut u32)); - unsafe { GetOleaccVersionInfo(core::mem::transmute(pver), core::mem::transmute(pbuild)) } + unsafe { GetOleaccVersionInfo(pver as _, pbuild as _) } } #[inline] pub unsafe fn GetRoleTextA(lrole: u32, lpszrole: Option<&mut [u8]>) -> u32 { @@ -98,7 +98,7 @@ pub unsafe fn GetStateTextW(lstatebit: u32, lpszstate: Option<&mut [u16]>) -> u3 #[inline] 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); - unsafe { GridPattern_GetItem(hobj, row, column, core::mem::transmute(presult)).ok() } + unsafe { GridPattern_GetItem(hobj, row, column, presult as _).ok() } } #[inline] pub unsafe fn InvokePattern_Invoke(hobj: HUIAPATTERNOBJECT) -> windows_core::Result<()> { @@ -114,7 +114,7 @@ pub unsafe fn IsWinEventHookInstalled(event: u32) -> super::super::Foundation::B #[inline] 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); - unsafe { ItemContainerPattern_FindItemByProperty(hobj, hnodestartafter, propertyid, core::mem::transmute_copy(value), core::mem::transmute(pfound)).ok() } + unsafe { ItemContainerPattern_FindItemByProperty(hobj, hnodestartafter, propertyid, core::mem::transmute_copy(value), pfound as _).ok() } } #[inline] pub unsafe fn LegacyIAccessiblePattern_DoDefaultAction(hobj: HUIAPATTERNOBJECT) -> windows_core::Result<()> { @@ -169,7 +169,7 @@ pub unsafe fn NotifyWinEvent(event: u32, hwnd: super::super::Foundation::HWND, i #[inline] 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); - unsafe { ObjectFromLresult(lresult, riid, wparam, core::mem::transmute(ppvobject)).ok() } + unsafe { ObjectFromLresult(lresult, riid, wparam, ppvobject as _).ok() } } #[inline] pub unsafe fn RangeValuePattern_SetValue(hobj: HUIAPATTERNOBJECT, val: f64) -> windows_core::Result<()> { @@ -221,7 +221,7 @@ pub unsafe fn SelectionItemPattern_Select(hobj: HUIAPATTERNOBJECT) -> windows_co #[inline] 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); - unsafe { SetWinEventHook(eventmin, eventmax, core::mem::transmute(hmodwineventproc.unwrap_or(core::mem::zeroed())), pfnwineventproc, idprocess, idthread, dwflags) } + unsafe { SetWinEventHook(eventmin, eventmax, hmodwineventproc.unwrap_or(core::mem::zeroed()) as _, pfnwineventproc, idprocess, idthread, dwflags) } } #[inline] pub unsafe fn SynchronizedInputPattern_Cancel(hobj: HUIAPATTERNOBJECT) -> windows_core::Result<()> { @@ -237,33 +237,33 @@ pub unsafe fn SynchronizedInputPattern_StartListening(hobj: HUIAPATTERNOBJECT, i #[inline] 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); - unsafe { TextPattern_GetSelection(hobj, core::mem::transmute(pretval)).ok() } + unsafe { TextPattern_GetSelection(hobj, pretval as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] 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); - unsafe { TextPattern_GetVisibleRanges(hobj, core::mem::transmute(pretval)).ok() } + unsafe { TextPattern_GetVisibleRanges(hobj, pretval as _).ok() } } #[inline] 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); - unsafe { TextPattern_RangeFromChild(hobj, hnodechild, core::mem::transmute(pretval)).ok() } + unsafe { TextPattern_RangeFromChild(hobj, hnodechild, pretval as _).ok() } } #[inline] 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); - unsafe { TextPattern_RangeFromPoint(hobj, core::mem::transmute(point), core::mem::transmute(pretval)).ok() } + unsafe { TextPattern_RangeFromPoint(hobj, core::mem::transmute(point), pretval as _).ok() } } #[inline] 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); - unsafe { TextPattern_get_DocumentRange(hobj, core::mem::transmute(pretval)).ok() } + unsafe { TextPattern_get_DocumentRange(hobj, pretval as _).ok() } } #[inline] 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); - unsafe { TextPattern_get_SupportedTextSelection(hobj, core::mem::transmute(pretval)).ok() } + unsafe { TextPattern_get_SupportedTextSelection(hobj, pretval as _).ok() } } #[inline] pub unsafe fn TextRange_AddToSelection(hobj: HUIATEXTRANGE) -> windows_core::Result<()> { @@ -273,17 +273,17 @@ pub unsafe fn TextRange_AddToSelection(hobj: HUIATEXTRANGE) -> windows_core::Res #[inline] 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); - unsafe { TextRange_Clone(hobj, core::mem::transmute(pretval)).ok() } + unsafe { TextRange_Clone(hobj, pretval as _).ok() } } #[inline] 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); - unsafe { TextRange_Compare(hobj, range, core::mem::transmute(pretval)).ok() } + unsafe { TextRange_Compare(hobj, range, pretval as _).ok() } } #[inline] 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); - unsafe { TextRange_CompareEndpoints(hobj, endpoint, targetrange, targetendpoint, core::mem::transmute(pretval)).ok() } + unsafe { TextRange_CompareEndpoints(hobj, endpoint, targetrange, targetendpoint, pretval as _).ok() } } #[inline] pub unsafe fn TextRange_ExpandToEnclosingUnit(hobj: HUIATEXTRANGE, unit: TextUnit) -> windows_core::Result<()> { @@ -294,12 +294,12 @@ pub unsafe fn TextRange_ExpandToEnclosingUnit(hobj: HUIATEXTRANGE, unit: TextUni #[inline] pub unsafe fn TextRange_FindAttribute(hobj: HUIATEXTRANGE, attributeid: i32, val: &super::super::System::Variant::VARIANT, backward: bool, pretval: *mut HUIATEXTRANGE) -> windows_core::Result<()> { 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); - unsafe { TextRange_FindAttribute(hobj, attributeid, core::mem::transmute_copy(val), backward.into(), core::mem::transmute(pretval)).ok() } + unsafe { TextRange_FindAttribute(hobj, attributeid, core::mem::transmute_copy(val), backward.into(), pretval as _).ok() } } #[inline] pub unsafe fn TextRange_FindText(hobj: HUIATEXTRANGE, text: &windows_core::BSTR, backward: bool, ignorecase: bool, pretval: *mut HUIATEXTRANGE) -> windows_core::Result<()> { 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); - unsafe { TextRange_FindText(hobj, core::mem::transmute_copy(text), backward.into(), ignorecase.into(), core::mem::transmute(pretval)).ok() } + unsafe { TextRange_FindText(hobj, core::mem::transmute_copy(text), backward.into(), ignorecase.into(), pretval as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] #[inline] @@ -311,18 +311,18 @@ pub unsafe fn TextRange_GetAttributeValue(hobj: HUIATEXTRANGE, attributeid: i32, #[inline] 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); - unsafe { TextRange_GetBoundingRectangles(hobj, core::mem::transmute(pretval)).ok() } + unsafe { TextRange_GetBoundingRectangles(hobj, pretval as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] 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); - unsafe { TextRange_GetChildren(hobj, core::mem::transmute(pretval)).ok() } + unsafe { TextRange_GetChildren(hobj, pretval as _).ok() } } #[inline] 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); - unsafe { TextRange_GetEnclosingElement(hobj, core::mem::transmute(pretval)).ok() } + unsafe { TextRange_GetEnclosingElement(hobj, pretval as _).ok() } } #[inline] pub unsafe fn TextRange_GetText(hobj: HUIATEXTRANGE, maxlength: i32, pretval: *mut windows_core::BSTR) -> windows_core::Result<()> { @@ -332,7 +332,7 @@ pub unsafe fn TextRange_GetText(hobj: HUIATEXTRANGE, maxlength: i32, pretval: *m #[inline] 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); - unsafe { TextRange_Move(hobj, unit, count, core::mem::transmute(pretval)).ok() } + unsafe { TextRange_Move(hobj, unit, count, pretval as _).ok() } } #[inline] pub unsafe fn TextRange_MoveEndpointByRange(hobj: HUIATEXTRANGE, endpoint: TextPatternRangeEndpoint, targetrange: HUIATEXTRANGE, targetendpoint: TextPatternRangeEndpoint) -> windows_core::Result<()> { @@ -342,7 +342,7 @@ pub unsafe fn TextRange_MoveEndpointByRange(hobj: HUIATEXTRANGE, endpoint: TextP #[inline] 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); - unsafe { TextRange_MoveEndpointByUnit(hobj, endpoint, unit, count, core::mem::transmute(pretval)).ok() } + unsafe { TextRange_MoveEndpointByUnit(hobj, endpoint, unit, count, pretval as _).ok() } } #[inline] pub unsafe fn TextRange_RemoveFromSelection(hobj: HUIATEXTRANGE) -> windows_core::Result<()> { @@ -383,7 +383,7 @@ pub unsafe fn TransformPattern_Rotate(hobj: HUIAPATTERNOBJECT, degrees: f64) -> #[inline] 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); - unsafe { UiaAddEvent(hnode, eventid, core::mem::transmute(pcallback), scope, core::mem::transmute(pproperties), cproperties, core::mem::transmute(prequest), core::mem::transmute(phevent)).ok() } + unsafe { UiaAddEvent(hnode, eventid, pcallback as _, scope, pproperties as _, cproperties, prequest as _, phevent as _).ok() } } #[inline] pub unsafe fn UiaClientsAreListening() -> super::super::Foundation::BOOL { @@ -417,7 +417,7 @@ pub unsafe fn UiaEventRemoveWindow(hevent: HUIAEVENT, hwnd: super::super::Founda #[inline] 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); - unsafe { UiaFind(hnode, core::mem::transmute(pparams), core::mem::transmute(prequest), core::mem::transmute(pprequesteddata), core::mem::transmute(ppoffsets), core::mem::transmute(pptreestructures)).ok() } + unsafe { UiaFind(hnode, pparams as _, prequest as _, pprequesteddata as _, ppoffsets as _, pptreestructures as _).ok() } } #[inline] pub unsafe fn UiaGetErrorDescription(pdescription: *mut windows_core::BSTR) -> super::super::Foundation::BOOL { @@ -427,7 +427,7 @@ pub unsafe fn UiaGetErrorDescription(pdescription: *mut windows_core::BSTR) -> s #[inline] 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); - unsafe { UiaGetPatternProvider(hnode, patternid, core::mem::transmute(phobj)).ok() } + unsafe { UiaGetPatternProvider(hnode, patternid, phobj as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] #[inline] @@ -454,37 +454,37 @@ pub unsafe fn UiaGetReservedNotSupportedValue() -> windows_core::Result windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn UiaGetRootNode(phnode : *mut HUIANODE) -> windows_core::HRESULT); - unsafe { UiaGetRootNode(core::mem::transmute(phnode)).ok() } + unsafe { UiaGetRootNode(phnode as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] 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); - unsafe { UiaGetRuntimeId(hnode, core::mem::transmute(pruntimeid)).ok() } + unsafe { UiaGetRuntimeId(hnode, pruntimeid as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] 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); - unsafe { UiaGetUpdatedCache(hnode, core::mem::transmute(prequest), normalizestate, core::mem::transmute(pnormalizecondition), core::mem::transmute(pprequesteddata), core::mem::transmute(pptreestructure)).ok() } + unsafe { UiaGetUpdatedCache(hnode, prequest as _, normalizestate, pnormalizecondition as _, pprequesteddata as _, core::mem::transmute(pptreestructure)).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] #[inline] pub unsafe fn UiaHPatternObjectFromVariant(pvar: *mut super::super::System::Variant::VARIANT, phobj: *mut HUIAPATTERNOBJECT) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn UiaHPatternObjectFromVariant(pvar : *mut super::super::System::Variant:: VARIANT, phobj : *mut HUIAPATTERNOBJECT) -> windows_core::HRESULT); - unsafe { UiaHPatternObjectFromVariant(core::mem::transmute(pvar), core::mem::transmute(phobj)).ok() } + unsafe { UiaHPatternObjectFromVariant(core::mem::transmute(pvar), phobj as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] #[inline] pub unsafe fn UiaHTextRangeFromVariant(pvar: *mut super::super::System::Variant::VARIANT, phtextrange: *mut HUIATEXTRANGE) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn UiaHTextRangeFromVariant(pvar : *mut super::super::System::Variant:: VARIANT, phtextrange : *mut HUIATEXTRANGE) -> windows_core::HRESULT); - unsafe { UiaHTextRangeFromVariant(core::mem::transmute(pvar), core::mem::transmute(phtextrange)).ok() } + unsafe { UiaHTextRangeFromVariant(core::mem::transmute(pvar), phtextrange as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] #[inline] pub unsafe fn UiaHUiaNodeFromVariant(pvar: *mut super::super::System::Variant::VARIANT, phnode: *mut HUIANODE) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn UiaHUiaNodeFromVariant(pvar : *mut super::super::System::Variant:: VARIANT, phnode : *mut HUIANODE) -> windows_core::HRESULT); - unsafe { UiaHUiaNodeFromVariant(core::mem::transmute(pvar), core::mem::transmute(phnode)).ok() } + unsafe { UiaHUiaNodeFromVariant(core::mem::transmute(pvar), phnode as _).ok() } } #[inline] pub unsafe fn UiaHasServerSideProvider(hwnd: super::super::Foundation::HWND) -> super::super::Foundation::BOOL { @@ -517,24 +517,24 @@ pub unsafe fn UiaLookupId(r#type: AutomationIdentifierType, pguid: *const window #[inline] 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); - unsafe { UiaNavigate(hnode, direction, core::mem::transmute(pcondition), core::mem::transmute(prequest), core::mem::transmute(pprequesteddata), core::mem::transmute(pptreestructure)).ok() } + unsafe { UiaNavigate(hnode, direction, pcondition as _, prequest as _, pprequesteddata as _, core::mem::transmute(pptreestructure)).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn UiaNodeFromFocus(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 UiaNodeFromFocus(prequest : *mut UiaCacheRequest, pprequesteddata : *mut *mut super::super::System::Com:: SAFEARRAY, pptreestructure : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { UiaNodeFromFocus(core::mem::transmute(prequest), core::mem::transmute(pprequesteddata), core::mem::transmute(pptreestructure)).ok() } + unsafe { UiaNodeFromFocus(prequest as _, pprequesteddata as _, core::mem::transmute(pptreestructure)).ok() } } #[inline] 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); - unsafe { UiaNodeFromHandle(hwnd, core::mem::transmute(phnode)).ok() } + unsafe { UiaNodeFromHandle(hwnd, phnode as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn UiaNodeFromPoint(x: f64, y: f64, 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 UiaNodeFromPoint(x : f64, y : f64, prequest : *mut UiaCacheRequest, pprequesteddata : *mut *mut super::super::System::Com:: SAFEARRAY, pptreestructure : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { UiaNodeFromPoint(x, y, core::mem::transmute(prequest), core::mem::transmute(pprequesteddata), core::mem::transmute(pptreestructure)).ok() } + unsafe { UiaNodeFromPoint(x, y, prequest as _, pprequesteddata as _, core::mem::transmute(pptreestructure)).ok() } } #[inline] pub unsafe fn UiaNodeFromProvider(pprovider: P0, phnode: *mut HUIANODE) -> windows_core::Result<()> @@ -542,7 +542,7 @@ where P0: windows_core::Param, { windows_targets::link!("uiautomationcore.dll" "system" fn UiaNodeFromProvider(pprovider : * mut core::ffi::c_void, phnode : *mut HUIANODE) -> windows_core::HRESULT); - unsafe { UiaNodeFromProvider(pprovider.param().abi(), core::mem::transmute(phnode)).ok() } + unsafe { UiaNodeFromProvider(pprovider.param().abi(), phnode as _).ok() } } #[inline] pub unsafe fn UiaNodeRelease(hnode: HUIANODE) -> super::super::Foundation::BOOL { @@ -631,7 +631,7 @@ where P0: windows_core::Param, { windows_targets::link!("uiautomationcore.dll" "system" fn UiaRaiseStructureChangedEvent(pprovider : * mut core::ffi::c_void, structurechangetype : StructureChangeType, pruntimeid : *mut i32, cruntimeidlen : i32) -> windows_core::HRESULT); - unsafe { UiaRaiseStructureChangedEvent(pprovider.param().abi(), structurechangetype, core::mem::transmute(pruntimeid), cruntimeidlen).ok() } + unsafe { UiaRaiseStructureChangedEvent(pprovider.param().abi(), structurechangetype, pruntimeid as _, cruntimeidlen).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -640,13 +640,13 @@ where P0: windows_core::Param, { windows_targets::link!("uiautomationcore.dll" "system" fn UiaRaiseTextEditTextChangedEvent(pprovider : * mut core::ffi::c_void, texteditchangetype : TextEditChangeType, pchangeddata : *mut super::super::System::Com:: SAFEARRAY) -> windows_core::HRESULT); - unsafe { UiaRaiseTextEditTextChangedEvent(pprovider.param().abi(), texteditchangetype, core::mem::transmute(pchangeddata)).ok() } + unsafe { UiaRaiseTextEditTextChangedEvent(pprovider.param().abi(), texteditchangetype, pchangeddata as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn UiaRegisterProviderCallback(pcallback: *mut UiaProviderCallback) { windows_targets::link!("uiautomationcore.dll" "system" fn UiaRegisterProviderCallback(pcallback : *mut UiaProviderCallback)); - unsafe { UiaRegisterProviderCallback(core::mem::transmute(pcallback)) } + unsafe { UiaRegisterProviderCallback(pcallback as _) } } #[inline] pub unsafe fn UiaRemoveEvent(hevent: HUIAEVENT) -> windows_core::Result<()> { @@ -708,7 +708,7 @@ where P0: windows_core::Param, { windows_targets::link!("oleacc.dll" "system" fn WindowFromAccessibleObject(param0 : * mut core::ffi::c_void, phwnd : *mut super::super::Foundation:: HWND) -> windows_core::HRESULT); - unsafe { WindowFromAccessibleObject(param0.param().abi(), core::mem::transmute(phwnd.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { WindowFromAccessibleObject(param0.param().abi(), phwnd.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn WindowPattern_Close(hobj: HUIAPATTERNOBJECT) -> windows_core::Result<()> { @@ -723,7 +723,7 @@ pub unsafe fn WindowPattern_SetWindowVisualState(hobj: HUIAPATTERNOBJECT, state: #[inline] 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); - unsafe { WindowPattern_WaitForInputIdle(hobj, milliseconds, core::mem::transmute(presult)).ok() } + unsafe { WindowPattern_WaitForInputIdle(hobj, milliseconds, presult as _).ok() } } #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] @@ -1307,7 +1307,7 @@ windows_core::imp::define_interface!(IAccIdentity, IAccIdentity_Vtbl, 0x7852b78d windows_core::imp::interface_hierarchy!(IAccIdentity, windows_core::IUnknown); impl IAccIdentity { pub unsafe fn GetIdentityString(&self, dwidchild: u32, ppidstring: *mut *mut u8, pdwidstringlen: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIdentityString)(windows_core::Interface::as_raw(self), dwidchild, core::mem::transmute(ppidstring), core::mem::transmute(pdwidstringlen)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIdentityString)(windows_core::Interface::as_raw(self), dwidchild, ppidstring as _, pdwidstringlen as _).ok() } } } #[repr(C)] @@ -1338,7 +1338,7 @@ windows_core::imp::interface_hierarchy!(IAccPropServer, windows_core::IUnknown); impl IAccPropServer { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetPropValue(&self, pidstring: &[u8], idprop: windows_core::GUID, pvarvalue: *mut super::super::System::Variant::VARIANT, pfhasprop: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPropValue)(windows_core::Interface::as_raw(self), core::mem::transmute(pidstring.as_ptr()), pidstring.len().try_into().unwrap(), core::mem::transmute(idprop), core::mem::transmute(pvarvalue), core::mem::transmute(pfhasprop)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropValue)(windows_core::Interface::as_raw(self), core::mem::transmute(pidstring.as_ptr()), pidstring.len().try_into().unwrap(), core::mem::transmute(idprop), core::mem::transmute(pvarvalue), pfhasprop as _).ok() } } } #[repr(C)] @@ -1406,10 +1406,10 @@ impl IAccPropServices { unsafe { (windows_core::Interface::vtable(self).ClearHwndProps)(windows_core::Interface::as_raw(self), hwnd, idobject, idchild, core::mem::transmute(paprops.as_ptr()), paprops.len().try_into().unwrap()).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<()> { - unsafe { (windows_core::Interface::vtable(self).ComposeHwndIdentityString)(windows_core::Interface::as_raw(self), hwnd, idobject, idchild, core::mem::transmute(ppidstring), core::mem::transmute(pdwidstringlen)).ok() } + unsafe { (windows_core::Interface::vtable(self).ComposeHwndIdentityString)(windows_core::Interface::as_raw(self), hwnd, idobject, idchild, ppidstring as _, pdwidstringlen as _).ok() } } pub unsafe fn DecomposeHwndIdentityString(&self, pidstring: &[u8], phwnd: *mut super::super::Foundation::HWND, pidobject: *mut u32, pidchild: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).DecomposeHwndIdentityString)(windows_core::Interface::as_raw(self), core::mem::transmute(pidstring.as_ptr()), pidstring.len().try_into().unwrap(), phwnd as _, pidobject as _, pidchild as _).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: super::WindowsAndMessaging::HMENU, idchild: u32, idprop: windows_core::GUID, var: &super::super::System::Variant::VARIANT) -> windows_core::Result<()> { @@ -1435,11 +1435,11 @@ impl IAccPropServices { } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn ComposeHmenuIdentityString(&self, hmenu: super::WindowsAndMessaging::HMENU, idchild: u32, ppidstring: *mut *mut u8, pdwidstringlen: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ComposeHmenuIdentityString)(windows_core::Interface::as_raw(self), hmenu, idchild, core::mem::transmute(ppidstring), core::mem::transmute(pdwidstringlen)).ok() } + unsafe { (windows_core::Interface::vtable(self).ComposeHmenuIdentityString)(windows_core::Interface::as_raw(self), hmenu, idchild, ppidstring as _, pdwidstringlen as _).ok() } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn DecomposeHmenuIdentityString(&self, pidstring: &[u8], phmenu: *mut super::WindowsAndMessaging::HMENU, pidchild: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DecomposeHmenuIdentityString)(windows_core::Interface::as_raw(self), core::mem::transmute(pidstring.as_ptr()), pidstring.len().try_into().unwrap(), core::mem::transmute(phmenu), core::mem::transmute(pidchild)).ok() } + unsafe { (windows_core::Interface::vtable(self).DecomposeHmenuIdentityString)(windows_core::Interface::as_raw(self), core::mem::transmute(pidstring.as_ptr()), pidstring.len().try_into().unwrap(), phmenu as _, pidchild as _).ok() } } } #[repr(C)] @@ -1736,7 +1736,7 @@ impl IAccessible { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn accLocation(&self, pxleft: *mut i32, pytop: *mut i32, pcxwidth: *mut i32, pcyheight: *mut i32, varchild: &super::super::System::Variant::VARIANT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).accLocation)(windows_core::Interface::as_raw(self), core::mem::transmute(pxleft), core::mem::transmute(pytop), core::mem::transmute(pcxwidth), core::mem::transmute(pcyheight), core::mem::transmute_copy(varchild)).ok() } + unsafe { (windows_core::Interface::vtable(self).accLocation)(windows_core::Interface::as_raw(self), pxleft as _, pytop as _, pcxwidth as _, pcyheight as _, core::mem::transmute_copy(varchild)).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn accNavigate(&self, navdir: i32, varstart: &super::super::System::Variant::VARIANT) -> windows_core::Result { @@ -2139,7 +2139,7 @@ impl IAccessibleEx { } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetIAccessiblePair(&self, ppacc: *mut Option, pidchild: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIAccessiblePair)(windows_core::Interface::as_raw(self), core::mem::transmute(ppacc), core::mem::transmute(pidchild)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIAccessiblePair)(windows_core::Interface::as_raw(self), core::mem::transmute(ppacc), pidchild as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetRuntimeId(&self) -> windows_core::Result<*mut super::super::System::Com::SAFEARRAY> { @@ -4578,7 +4578,7 @@ windows_core::imp::define_interface!(IRichEditUiaInformation, IRichEditUiaInform windows_core::imp::interface_hierarchy!(IRichEditUiaInformation, windows_core::IUnknown); impl IRichEditUiaInformation { pub unsafe fn GetBoundaryRectangle(&self, puiarect: *mut UiaRect) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBoundaryRectangle)(windows_core::Interface::as_raw(self), core::mem::transmute(puiarect)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBoundaryRectangle)(windows_core::Interface::as_raw(self), puiarect as _).ok() } } pub unsafe fn IsVisible(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).IsVisible)(windows_core::Interface::as_raw(self)).ok() } @@ -6002,7 +6002,7 @@ impl ITextProvider2 { pub unsafe fn GetCaretRange(&self, isactive: *mut super::super::Foundation::BOOL) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetCaretRange)(windows_core::Interface::as_raw(self), core::mem::transmute(isactive), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetCaretRange)(windows_core::Interface::as_raw(self), isactive as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } } @@ -7066,7 +7066,7 @@ impl IUIAutomation { pub unsafe fn IntSafeArrayToNativeArray(&self, intarray: *const super::super::System::Com::SAFEARRAY, array: *mut *mut i32) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).IntSafeArrayToNativeArray)(windows_core::Interface::as_raw(self), intarray, core::mem::transmute(array), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).IntSafeArrayToNativeArray)(windows_core::Interface::as_raw(self), intarray, array as _, &mut result__).map(|| result__) } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -7087,7 +7087,7 @@ impl IUIAutomation { pub unsafe fn SafeArrayToRectNativeArray(&self, rects: *const super::super::System::Com::SAFEARRAY, rectarray: *mut *mut super::super::Foundation::RECT) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).SafeArrayToRectNativeArray)(windows_core::Interface::as_raw(self), rects, core::mem::transmute(rectarray), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).SafeArrayToRectNativeArray)(windows_core::Interface::as_raw(self), rects, rectarray as _, &mut result__).map(|| result__) } } pub unsafe fn CreateProxyFactoryEntry(&self, factory: P0) -> windows_core::Result @@ -7122,14 +7122,14 @@ impl IUIAutomation { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).PollForPotentialSupportedPatterns)(windows_core::Interface::as_raw(self), pelement.param().abi(), core::mem::transmute(patternids), core::mem::transmute(patternnames)).ok() } + unsafe { (windows_core::Interface::vtable(self).PollForPotentialSupportedPatterns)(windows_core::Interface::as_raw(self), pelement.param().abi(), patternids as _, patternnames as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn PollForPotentialSupportedProperties(&self, pelement: P0, propertyids: *mut *mut super::super::System::Com::SAFEARRAY, propertynames: *mut *mut super::super::System::Com::SAFEARRAY) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).PollForPotentialSupportedProperties)(windows_core::Interface::as_raw(self), pelement.param().abi(), core::mem::transmute(propertyids), core::mem::transmute(propertynames)).ok() } + unsafe { (windows_core::Interface::vtable(self).PollForPotentialSupportedProperties)(windows_core::Interface::as_raw(self), pelement.param().abi(), propertyids as _, propertynames as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn CheckNotSupported(&self, value: &super::super::System::Variant::VARIANT) -> windows_core::Result { @@ -8546,7 +8546,7 @@ impl IUIAutomationAndCondition { } } pub unsafe fn GetChildrenAsNativeArray(&self, childarray: *mut *mut Option, childarraycount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetChildrenAsNativeArray)(windows_core::Interface::as_raw(self), core::mem::transmute(childarray), core::mem::transmute(childarraycount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetChildrenAsNativeArray)(windows_core::Interface::as_raw(self), childarray as _, childarraycount as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetChildren(&self) -> windows_core::Result<*mut super::super::System::Com::SAFEARRAY> { @@ -10061,7 +10061,7 @@ impl IUIAutomationElement { pub unsafe fn GetClickablePoint(&self, clickable: *mut super::super::Foundation::POINT) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetClickablePoint)(windows_core::Interface::as_raw(self), core::mem::transmute(clickable), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetClickablePoint)(windows_core::Interface::as_raw(self), clickable as _, &mut result__).map(|| result__) } } } @@ -13858,7 +13858,7 @@ impl IUIAutomationOrCondition { } } pub unsafe fn GetChildrenAsNativeArray(&self, childarray: *mut *mut Option, childarraycount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetChildrenAsNativeArray)(windows_core::Interface::as_raw(self), core::mem::transmute(childarray), core::mem::transmute(childarraycount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetChildrenAsNativeArray)(windows_core::Interface::as_raw(self), childarray as _, childarraycount as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetChildren(&self) -> windows_core::Result<*mut super::super::System::Com::SAFEARRAY> { @@ -13994,7 +13994,7 @@ windows_core::imp::define_interface!(IUIAutomationPatternInstance, IUIAutomation windows_core::imp::interface_hierarchy!(IUIAutomationPatternInstance, windows_core::IUnknown); impl IUIAutomationPatternInstance { pub unsafe fn GetProperty(&self, index: u32, cached: bool, r#type: UIAutomationType, pptr: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), index, cached.into(), r#type, core::mem::transmute(pptr)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), index, cached.into(), r#type, pptr as _).ok() } } pub unsafe fn CallMethod(&self, index: u32, pparams: *const UIAutomationParameter, cparams: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).CallMethod)(windows_core::Interface::as_raw(self), index, pparams, cparams).ok() } @@ -14967,7 +14967,7 @@ impl IUIAutomationRegistrar { } } pub unsafe fn RegisterPattern(&self, pattern: *const UIAutomationPatternInfo, ppatternid: *mut i32, ppatternavailablepropertyid: *mut i32, ppropertyids: &mut [i32], peventids: &mut [i32]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RegisterPattern)(windows_core::Interface::as_raw(self), core::mem::transmute(pattern), core::mem::transmute(ppatternid), core::mem::transmute(ppatternavailablepropertyid), ppropertyids.len().try_into().unwrap(), core::mem::transmute(ppropertyids.as_ptr()), peventids.len().try_into().unwrap(), core::mem::transmute(peventids.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).RegisterPattern)(windows_core::Interface::as_raw(self), core::mem::transmute(pattern), ppatternid as _, ppatternavailablepropertyid as _, ppropertyids.len().try_into().unwrap(), core::mem::transmute(ppropertyids.as_ptr()), peventids.len().try_into().unwrap(), core::mem::transmute(peventids.as_ptr())).ok() } } } #[repr(C)] @@ -16119,7 +16119,7 @@ impl IUIAutomationStylesPattern { } } pub unsafe fn GetCurrentExtendedPropertiesAsArray(&self, propertyarray: *mut *mut ExtendedProperty, propertycount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrentExtendedPropertiesAsArray)(windows_core::Interface::as_raw(self), core::mem::transmute(propertyarray), core::mem::transmute(propertycount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentExtendedPropertiesAsArray)(windows_core::Interface::as_raw(self), propertyarray as _, propertycount as _).ok() } } pub unsafe fn CachedStyleId(&self) -> windows_core::Result { unsafe { @@ -16164,7 +16164,7 @@ impl IUIAutomationStylesPattern { } } pub unsafe fn GetCachedExtendedPropertiesAsArray(&self, propertyarray: *mut *mut ExtendedProperty, propertycount: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCachedExtendedPropertiesAsArray)(windows_core::Interface::as_raw(self), core::mem::transmute(propertyarray), core::mem::transmute(propertycount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCachedExtendedPropertiesAsArray)(windows_core::Interface::as_raw(self), propertyarray as _, propertycount as _).ok() } } } #[repr(C)] @@ -17055,7 +17055,7 @@ impl IUIAutomationTextPattern2 { pub unsafe fn GetCaretRange(&self, isactive: *mut super::super::Foundation::BOOL) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetCaretRange)(windows_core::Interface::as_raw(self), core::mem::transmute(isactive), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetCaretRange)(windows_core::Interface::as_raw(self), isactive as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } } diff --git a/crates/libs/windows/src/Windows/Win32/UI/Animation/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Animation/mod.rs index 9935c10f89..557f1b2bc0 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Animation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Animation/mod.rs @@ -32,7 +32,7 @@ impl IUIAnimationInterpolator { } } pub unsafe fn GetDependencies(&self, initialvaluedependencies: *mut UI_ANIMATION_DEPENDENCIES, initialvelocitydependencies: *mut UI_ANIMATION_DEPENDENCIES, durationdependencies: *mut UI_ANIMATION_DEPENDENCIES) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDependencies)(windows_core::Interface::as_raw(self), core::mem::transmute(initialvaluedependencies), core::mem::transmute(initialvelocitydependencies), core::mem::transmute(durationdependencies)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDependencies)(windows_core::Interface::as_raw(self), initialvaluedependencies as _, initialvelocitydependencies as _, durationdependencies as _).ok() } } } #[repr(C)] @@ -176,7 +176,7 @@ impl IUIAnimationInterpolator2 { unsafe { (windows_core::Interface::vtable(self).GetPrimitiveInterpolation)(windows_core::Interface::as_raw(self), interpolation.param().abi(), cdimension).ok() } } pub unsafe fn GetDependencies(&self, initialvaluedependencies: *mut UI_ANIMATION_DEPENDENCIES, initialvelocitydependencies: *mut UI_ANIMATION_DEPENDENCIES, durationdependencies: *mut UI_ANIMATION_DEPENDENCIES) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDependencies)(windows_core::Interface::as_raw(self), core::mem::transmute(initialvaluedependencies), core::mem::transmute(initialvelocitydependencies), core::mem::transmute(durationdependencies)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDependencies)(windows_core::Interface::as_raw(self), initialvaluedependencies as _, initialvelocitydependencies as _, durationdependencies as _).ok() } } } #[repr(C)] @@ -351,7 +351,7 @@ impl IUIAnimationManager { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).Update)(windows_core::Interface::as_raw(self), timenow, core::mem::transmute(updateresult.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Update)(windows_core::Interface::as_raw(self), timenow, updateresult.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetVariableFromTag(&self, object: P0, id: u32) -> windows_core::Result where @@ -676,7 +676,7 @@ impl IUIAnimationManager2 { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).Update)(windows_core::Interface::as_raw(self), timenow, core::mem::transmute(updateresult.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Update)(windows_core::Interface::as_raw(self), timenow, updateresult.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetVariableFromTag(&self, object: P0, id: u32) -> windows_core::Result where @@ -1227,7 +1227,7 @@ impl IUIAnimationStoryboard { unsafe { (windows_core::Interface::vtable(self).SetLongestAcceptableDelay)(windows_core::Interface::as_raw(self), delay).ok() } } pub unsafe fn Schedule(&self, timenow: f64, schedulingresult: Option<*mut UI_ANIMATION_SCHEDULING_RESULT>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Schedule)(windows_core::Interface::as_raw(self), timenow, core::mem::transmute(schedulingresult.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Schedule)(windows_core::Interface::as_raw(self), timenow, schedulingresult.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Conclude(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Conclude)(windows_core::Interface::as_raw(self)).ok() } @@ -1245,7 +1245,7 @@ impl IUIAnimationStoryboard { unsafe { (windows_core::Interface::vtable(self).SetTag)(windows_core::Interface::as_raw(self), object.param().abi(), id).ok() } } pub unsafe fn GetTag(&self, object: Option<*mut Option>, id: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetTag)(windows_core::Interface::as_raw(self), object.unwrap_or(core::mem::zeroed()) as _, id.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetStatus(&self) -> windows_core::Result { unsafe { @@ -1518,7 +1518,7 @@ impl IUIAnimationStoryboard2 { unsafe { (windows_core::Interface::vtable(self).SetSkipDuration)(windows_core::Interface::as_raw(self), secondsduration).ok() } } pub unsafe fn Schedule(&self, timenow: f64, schedulingresult: Option<*mut UI_ANIMATION_SCHEDULING_RESULT>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Schedule)(windows_core::Interface::as_raw(self), timenow, core::mem::transmute(schedulingresult.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Schedule)(windows_core::Interface::as_raw(self), timenow, schedulingresult.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Conclude(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Conclude)(windows_core::Interface::as_raw(self)).ok() } @@ -1536,7 +1536,7 @@ impl IUIAnimationStoryboard2 { unsafe { (windows_core::Interface::vtable(self).SetTag)(windows_core::Interface::as_raw(self), object.param().abi(), id).ok() } } pub unsafe fn GetTag(&self, object: Option<*mut Option>, id: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetTag)(windows_core::Interface::as_raw(self), object.unwrap_or(core::mem::zeroed()) as _, id.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetStatus(&self) -> windows_core::Result { unsafe { @@ -3177,7 +3177,7 @@ impl IUIAnimationVariable { unsafe { (windows_core::Interface::vtable(self).SetTag)(windows_core::Interface::as_raw(self), object.param().abi(), id).ok() } } pub unsafe fn GetTag(&self, object: Option<*mut Option>, id: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetTag)(windows_core::Interface::as_raw(self), object.unwrap_or(core::mem::zeroed()) as _, id.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetVariableChangeHandler(&self, handler: P0) -> windows_core::Result<()> where @@ -3479,7 +3479,7 @@ impl IUIAnimationVariable2 { unsafe { (windows_core::Interface::vtable(self).SetTag)(windows_core::Interface::as_raw(self), object.param().abi(), id).ok() } } pub unsafe fn GetTag(&self, object: Option<*mut Option>, id: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetTag)(windows_core::Interface::as_raw(self), object.unwrap_or(core::mem::zeroed()) as _, id.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetVariableChangeHandler(&self, handler: P0, fregisterfornextanimationevent: bool) -> 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 a34ff748d8..1c5313dd9b 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/ColorSystem/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/ColorSystem/mod.rs @@ -21,33 +21,33 @@ where #[inline] pub unsafe fn CMCheckColors(hcmtransform: isize, lpainputcolors: *const COLOR, ncolors: u32, ctinput: COLORTYPE, lparesult: *mut u8) -> super::super::Foundation::BOOL { windows_targets::link!("icm32.dll" "system" fn CMCheckColors(hcmtransform : isize, lpainputcolors : *const COLOR, ncolors : u32, ctinput : COLORTYPE, lparesult : *mut u8) -> super::super::Foundation:: BOOL); - unsafe { CMCheckColors(hcmtransform, lpainputcolors, ncolors, ctinput, core::mem::transmute(lparesult)) } + unsafe { CMCheckColors(hcmtransform, lpainputcolors, ncolors, ctinput, lparesult as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn CMCheckColorsInGamut(hcmtransform: isize, lpargbtriple: *const super::super::Graphics::Gdi::RGBTRIPLE, lparesult: *mut u8, ncount: u32) -> super::super::Foundation::BOOL { windows_targets::link!("icm32.dll" "system" fn CMCheckColorsInGamut(hcmtransform : isize, lpargbtriple : *const super::super::Graphics::Gdi:: RGBTRIPLE, lparesult : *mut u8, ncount : u32) -> super::super::Foundation:: BOOL); - unsafe { CMCheckColorsInGamut(hcmtransform, lpargbtriple, core::mem::transmute(lparesult), ncount) } + unsafe { CMCheckColorsInGamut(hcmtransform, lpargbtriple, lparesult as _, 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: 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); - unsafe { CMCheckRGBs(hcmtransform, lpsrcbits, bminput, dwwidth, dwheight, dwstride, core::mem::transmute(lparesult), pfncallback, ulcallbackdata) } + unsafe { CMCheckRGBs(hcmtransform, lpsrcbits, bminput, dwwidth, dwheight, dwstride, lparesult as _, pfncallback, ulcallbackdata) } } #[inline] pub unsafe fn CMConvertColorNameToIndex(hprofile: isize, pacolorname: *const *const i8, paindex: *mut u32, dwcount: u32) -> super::super::Foundation::BOOL { windows_targets::link!("icm32.dll" "system" fn CMConvertColorNameToIndex(hprofile : isize, pacolorname : *const *const i8, paindex : *mut u32, dwcount : u32) -> super::super::Foundation:: BOOL); - unsafe { CMConvertColorNameToIndex(hprofile, pacolorname, core::mem::transmute(paindex), dwcount) } + unsafe { CMConvertColorNameToIndex(hprofile, pacolorname, paindex as _, dwcount) } } #[inline] pub unsafe fn CMConvertIndexToColorName(hprofile: isize, paindex: *const u32, pacolorname: *mut *mut i8, dwcount: u32) -> super::super::Foundation::BOOL { windows_targets::link!("icm32.dll" "system" fn CMConvertIndexToColorName(hprofile : isize, paindex : *const u32, pacolorname : *mut *mut i8, dwcount : u32) -> super::super::Foundation:: BOOL); - unsafe { CMConvertIndexToColorName(hprofile, paindex, core::mem::transmute(pacolorname), dwcount) } + unsafe { CMConvertIndexToColorName(hprofile, paindex, pacolorname as _, dwcount) } } #[inline] pub unsafe fn CMCreateDeviceLinkProfile(pahprofiles: &[isize], padwintents: &[u32], dwflags: u32, lpprofiledata: *mut *mut u8) -> super::super::Foundation::BOOL { windows_targets::link!("icm32.dll" "system" fn CMCreateDeviceLinkProfile(pahprofiles : *const isize, nprofiles : u32, padwintents : *const u32, nintents : u32, dwflags : u32, lpprofiledata : *mut *mut u8) -> super::super::Foundation:: BOOL); - unsafe { CMCreateDeviceLinkProfile(core::mem::transmute(pahprofiles.as_ptr()), pahprofiles.len().try_into().unwrap(), core::mem::transmute(padwintents.as_ptr()), padwintents.len().try_into().unwrap(), dwflags, core::mem::transmute(lpprofiledata)) } + unsafe { CMCreateDeviceLinkProfile(core::mem::transmute(pahprofiles.as_ptr()), pahprofiles.len().try_into().unwrap(), core::mem::transmute(padwintents.as_ptr()), padwintents.len().try_into().unwrap(), dwflags, lpprofiledata as _) } } #[inline] pub unsafe fn CMCreateMultiProfileTransform(pahprofiles: &[isize], padwintents: &[u32], dwflags: u32) -> isize { @@ -58,13 +58,13 @@ pub unsafe fn CMCreateMultiProfileTransform(pahprofiles: &[isize], padwintents: #[inline] pub unsafe fn CMCreateProfile(lpcolorspace: *mut LOGCOLORSPACEA, lpprofiledata: *mut *mut core::ffi::c_void) -> super::super::Foundation::BOOL { windows_targets::link!("icm32.dll" "system" fn CMCreateProfile(lpcolorspace : *mut LOGCOLORSPACEA, lpprofiledata : *mut *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { CMCreateProfile(core::mem::transmute(lpcolorspace), core::mem::transmute(lpprofiledata)) } + unsafe { CMCreateProfile(lpcolorspace as _, lpprofiledata as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn CMCreateProfileW(lpcolorspace: *mut LOGCOLORSPACEW, lpprofiledata: *mut *mut core::ffi::c_void) -> super::super::Foundation::BOOL { windows_targets::link!("icm32.dll" "system" fn CMCreateProfileW(lpcolorspace : *mut LOGCOLORSPACEW, lpprofiledata : *mut *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { CMCreateProfileW(core::mem::transmute(lpcolorspace), core::mem::transmute(lpprofiledata)) } + unsafe { CMCreateProfileW(lpcolorspace as _, lpprofiledata as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -103,53 +103,53 @@ pub unsafe fn CMGetInfo(dwinfo: u32) -> u32 { #[inline] pub unsafe fn CMGetNamedProfileInfo(hprofile: isize, pnamedprofileinfo: *mut NAMED_PROFILE_INFO) -> super::super::Foundation::BOOL { windows_targets::link!("icm32.dll" "system" fn CMGetNamedProfileInfo(hprofile : isize, pnamedprofileinfo : *mut NAMED_PROFILE_INFO) -> super::super::Foundation:: BOOL); - unsafe { CMGetNamedProfileInfo(hprofile, core::mem::transmute(pnamedprofileinfo)) } + unsafe { CMGetNamedProfileInfo(hprofile, pnamedprofileinfo as _) } } #[inline] pub unsafe fn CMIsProfileValid(hprofile: isize, lpbvalid: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL { windows_targets::link!("icm32.dll" "system" fn CMIsProfileValid(hprofile : isize, lpbvalid : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - unsafe { CMIsProfileValid(hprofile, core::mem::transmute(lpbvalid)) } + unsafe { CMIsProfileValid(hprofile, lpbvalid as _) } } #[inline] pub unsafe fn CMTranslateColors(hcmtransform: isize, lpainputcolors: *const COLOR, ncolors: u32, ctinput: COLORTYPE, lpaoutputcolors: *mut COLOR, ctoutput: COLORTYPE) -> super::super::Foundation::BOOL { windows_targets::link!("icm32.dll" "system" fn CMTranslateColors(hcmtransform : isize, lpainputcolors : *const COLOR, ncolors : u32, ctinput : COLORTYPE, lpaoutputcolors : *mut COLOR, ctoutput : COLORTYPE) -> super::super::Foundation:: BOOL); - unsafe { CMTranslateColors(hcmtransform, lpainputcolors, ncolors, ctinput, core::mem::transmute(lpaoutputcolors), ctoutput) } + unsafe { CMTranslateColors(hcmtransform, lpainputcolors, ncolors, ctinput, lpaoutputcolors as _, ctoutput) } } #[inline] 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); - unsafe { CMTranslateRGB(hcmtransform, colorref, core::mem::transmute(lpcolorref), dwflags) } + unsafe { CMTranslateRGB(hcmtransform, colorref, lpcolorref as _, 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 { windows_targets::link!("icm32.dll" "system" 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); - unsafe { CMTranslateRGBs(hcmtransform, lpsrcbits, bminput, dwwidth, dwheight, dwstride, core::mem::transmute(lpdestbits), bmoutput, dwtranslatedirection) } + unsafe { CMTranslateRGBs(hcmtransform, lpsrcbits, bminput, dwwidth, dwheight, dwstride, lpdestbits as _, bmoutput, 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: 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); - unsafe { CMTranslateRGBsExt(hcmtransform, lpsrcbits, bminput, dwwidth, dwheight, dwinputstride, core::mem::transmute(lpdestbits), bmoutput, dwoutputstride, lpfncallback, ulcallbackdata) } + unsafe { CMTranslateRGBsExt(hcmtransform, lpsrcbits, bminput, dwwidth, dwheight, dwinputstride, lpdestbits as _, bmoutput, dwoutputstride, lpfncallback, 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: 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); - unsafe { CheckBitmapBits(hcolortransform, psrcbits, bminput, dwwidth, dwheight, dwstride, core::mem::transmute(paresult), core::mem::transmute(pfncallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcallbackdata.unwrap_or(core::mem::zeroed()))) } + unsafe { CheckBitmapBits(hcolortransform, psrcbits, bminput, dwwidth, dwheight, dwstride, paresult as _, pfncallback.unwrap_or(core::mem::zeroed()) as _, lpcallbackdata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn CheckColors(hcolortransform: isize, painputcolors: *const COLOR, ncolors: u32, ctinput: COLORTYPE, paresult: *mut u8) -> super::super::Foundation::BOOL { windows_targets::link!("mscms.dll" "system" fn CheckColors(hcolortransform : isize, painputcolors : *const COLOR, ncolors : u32, ctinput : COLORTYPE, paresult : *mut u8) -> super::super::Foundation:: BOOL); - unsafe { CheckColors(hcolortransform, painputcolors, ncolors, ctinput, core::mem::transmute(paresult)) } + unsafe { CheckColors(hcolortransform, painputcolors, ncolors, ctinput, paresult as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { CheckColorsInGamut(hdc, lprgbtriple, core::mem::transmute(dlpbuffer), ncount) } + unsafe { CheckColorsInGamut(hdc, lprgbtriple, dlpbuffer as _, ncount) } } #[inline] pub unsafe fn CloseColorProfile(hprofile: Option) -> super::super::Foundation::BOOL { windows_targets::link!("mscms.dll" "system" fn CloseColorProfile(hprofile : isize) -> super::super::Foundation:: BOOL); - unsafe { CloseColorProfile(core::mem::transmute(hprofile.unwrap_or(core::mem::zeroed()))) } + unsafe { CloseColorProfile(hprofile.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -182,7 +182,7 @@ pub unsafe fn ColorProfileGetDisplayDefault(scope: WCS_PROFILE_MANAGEMENT_SCOPE, #[inline] pub unsafe fn ColorProfileGetDisplayList(scope: WCS_PROFILE_MANAGEMENT_SCOPE, targetadapterid: super::super::Foundation::LUID, sourceid: u32, profilelist: *mut *mut windows_core::PWSTR, profilecount: *mut u32) -> windows_core::Result<()> { windows_targets::link!("mscms.dll" "system" fn ColorProfileGetDisplayList(scope : WCS_PROFILE_MANAGEMENT_SCOPE, targetadapterid : super::super::Foundation:: LUID, sourceid : u32, profilelist : *mut *mut windows_core::PWSTR, profilecount : *mut u32) -> windows_core::HRESULT); - unsafe { ColorProfileGetDisplayList(scope, core::mem::transmute(targetadapterid), sourceid, core::mem::transmute(profilelist), core::mem::transmute(profilecount)).ok() } + unsafe { ColorProfileGetDisplayList(scope, core::mem::transmute(targetadapterid), sourceid, profilelist as _, profilecount as _).ok() } } #[inline] pub unsafe fn ColorProfileGetDisplayUserScope(targetadapterid: super::super::Foundation::LUID, sourceid: u32) -> windows_core::Result { @@ -211,12 +211,12 @@ where #[inline] pub unsafe fn ConvertColorNameToIndex(hprofile: isize, pacolorname: *const *const i8, paindex: *mut u32, dwcount: u32) -> super::super::Foundation::BOOL { windows_targets::link!("mscms.dll" "system" fn ConvertColorNameToIndex(hprofile : isize, pacolorname : *const *const i8, paindex : *mut u32, dwcount : u32) -> super::super::Foundation:: BOOL); - unsafe { ConvertColorNameToIndex(hprofile, pacolorname, core::mem::transmute(paindex), dwcount) } + unsafe { ConvertColorNameToIndex(hprofile, pacolorname, paindex as _, dwcount) } } #[inline] pub unsafe fn ConvertIndexToColorName(hprofile: isize, paindex: *const u32, pacolorname: *mut *mut i8, dwcount: u32) -> super::super::Foundation::BOOL { windows_targets::link!("mscms.dll" "system" fn ConvertIndexToColorName(hprofile : isize, paindex : *const u32, pacolorname : *mut *mut i8, dwcount : u32) -> super::super::Foundation:: BOOL); - unsafe { ConvertIndexToColorName(hprofile, paindex, core::mem::transmute(pacolorname), dwcount) } + unsafe { ConvertIndexToColorName(hprofile, paindex, pacolorname as _, dwcount) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -245,7 +245,7 @@ pub unsafe fn CreateColorTransformW(plogcolorspace: *const LOGCOLORSPACEW, hdest #[inline] pub unsafe fn CreateDeviceLinkProfile(hprofile: &[isize], padwintent: &[u32], dwflags: u32, pprofiledata: *mut *mut u8, indexpreferredcmm: u32) -> super::super::Foundation::BOOL { windows_targets::link!("mscms.dll" "system" fn CreateDeviceLinkProfile(hprofile : *const isize, nprofiles : u32, padwintent : *const u32, nintents : u32, dwflags : u32, pprofiledata : *mut *mut u8, indexpreferredcmm : u32) -> super::super::Foundation:: BOOL); - unsafe { CreateDeviceLinkProfile(core::mem::transmute(hprofile.as_ptr()), hprofile.len().try_into().unwrap(), core::mem::transmute(padwintent.as_ptr()), padwintent.len().try_into().unwrap(), dwflags, core::mem::transmute(pprofiledata), indexpreferredcmm) } + unsafe { CreateDeviceLinkProfile(core::mem::transmute(hprofile.as_ptr()), hprofile.len().try_into().unwrap(), core::mem::transmute(padwintent.as_ptr()), padwintent.len().try_into().unwrap(), dwflags, pprofiledata as _, indexpreferredcmm) } } #[inline] pub unsafe fn CreateMultiProfileTransform(pahprofiles: &[isize], padwintent: &[u32], dwflags: u32, indexpreferredcmm: u32) -> isize { @@ -256,13 +256,13 @@ pub unsafe fn CreateMultiProfileTransform(pahprofiles: &[isize], padwintent: &[u #[inline] pub unsafe fn CreateProfileFromLogColorSpaceA(plogcolorspace: *const LOGCOLORSPACEA, pprofile: *mut *mut u8) -> super::super::Foundation::BOOL { windows_targets::link!("mscms.dll" "system" fn CreateProfileFromLogColorSpaceA(plogcolorspace : *const LOGCOLORSPACEA, pprofile : *mut *mut u8) -> super::super::Foundation:: BOOL); - unsafe { CreateProfileFromLogColorSpaceA(plogcolorspace, core::mem::transmute(pprofile)) } + unsafe { CreateProfileFromLogColorSpaceA(plogcolorspace, pprofile as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn CreateProfileFromLogColorSpaceW(plogcolorspace: *const LOGCOLORSPACEW, pprofile: *mut *mut u8) -> super::super::Foundation::BOOL { windows_targets::link!("mscms.dll" "system" fn CreateProfileFromLogColorSpaceW(plogcolorspace : *const LOGCOLORSPACEW, pprofile : *mut *mut u8) -> super::super::Foundation:: BOOL); - unsafe { CreateProfileFromLogColorSpaceW(plogcolorspace, core::mem::transmute(pprofile)) } + unsafe { CreateProfileFromLogColorSpaceW(plogcolorspace, pprofile as _) } } #[inline] pub unsafe fn DeleteColorSpace(hcs: HCOLORSPACE) -> super::super::Foundation::BOOL { @@ -300,7 +300,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); - unsafe { EnumColorProfilesA(pmachinename.param().abi(), penumrecord, core::mem::transmute(penumerationbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsizeofenumerationbuffer), core::mem::transmute(pnprofiles.unwrap_or(core::mem::zeroed()))) } + unsafe { EnumColorProfilesA(pmachinename.param().abi(), penumrecord, penumerationbuffer.unwrap_or(core::mem::zeroed()) as _, pdwsizeofenumerationbuffer as _, pnprofiles.unwrap_or(core::mem::zeroed()) as _) } } #[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 @@ -308,19 +308,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); - unsafe { EnumColorProfilesW(pmachinename.param().abi(), penumrecord, core::mem::transmute(penumerationbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsizeofenumerationbuffer), core::mem::transmute(pnprofiles.unwrap_or(core::mem::zeroed()))) } + unsafe { EnumColorProfilesW(pmachinename.param().abi(), penumrecord, penumerationbuffer.unwrap_or(core::mem::zeroed()) as _, pdwsizeofenumerationbuffer as _, pnprofiles.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { EnumICMProfilesA(hdc, proc, core::mem::transmute(param2.unwrap_or(core::mem::zeroed()))) } + unsafe { EnumICMProfilesA(hdc, proc, param2.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { EnumICMProfilesW(hdc, proc, core::mem::transmute(param2.unwrap_or(core::mem::zeroed()))) } + unsafe { EnumICMProfilesW(hdc, proc, param2.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GetCMMInfo(hcolortransform: isize, param1: u32) -> u32 { @@ -333,7 +333,7 @@ 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); - unsafe { GetColorDirectoryA(pmachinename.param().abi(), core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsize)) } + unsafe { GetColorDirectoryA(pmachinename.param().abi(), pbuffer.unwrap_or(core::mem::zeroed()) as _, pdwsize as _) } } #[inline] pub unsafe fn GetColorDirectoryW(pmachinename: P0, pbuffer: Option, pdwsize: *mut u32) -> super::super::Foundation::BOOL @@ -341,28 +341,28 @@ 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); - unsafe { GetColorDirectoryW(pmachinename.param().abi(), core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsize)) } + unsafe { GetColorDirectoryW(pmachinename.param().abi(), pbuffer.unwrap_or(core::mem::zeroed()) as _, pdwsize as _) } } #[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); - unsafe { GetColorProfileElement(hprofile, tag, dwoffset, core::mem::transmute(pcbelement), core::mem::transmute(pelement.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbreference)) } + unsafe { GetColorProfileElement(hprofile, tag, dwoffset, pcbelement as _, pelement.unwrap_or(core::mem::zeroed()) as _, pbreference as _) } } #[inline] pub unsafe fn GetColorProfileElementTag(hprofile: isize, dwindex: u32, ptag: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("mscms.dll" "system" fn GetColorProfileElementTag(hprofile : isize, dwindex : u32, ptag : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetColorProfileElementTag(hprofile, dwindex, core::mem::transmute(ptag)) } + unsafe { GetColorProfileElementTag(hprofile, dwindex, ptag as _) } } #[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); - unsafe { GetColorProfileFromHandle(hprofile, core::mem::transmute(pprofile.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbprofile)) } + unsafe { GetColorProfileFromHandle(hprofile, pprofile.unwrap_or(core::mem::zeroed()) as _, pcbprofile as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn GetColorProfileHeader(hprofile: isize, pheader: *mut PROFILEHEADER) -> super::super::Foundation::BOOL { windows_targets::link!("mscms.dll" "system" fn GetColorProfileHeader(hprofile : isize, pheader : *mut PROFILEHEADER) -> super::super::Foundation:: BOOL); - unsafe { GetColorProfileHeader(hprofile, core::mem::transmute(pheader)) } + unsafe { GetColorProfileHeader(hprofile, pheader as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -373,57 +373,57 @@ pub unsafe fn GetColorSpace(hdc: super::super::Graphics::Gdi::HDC) -> HCOLORSPAC #[inline] pub unsafe fn GetCountColorProfileElements(hprofile: isize, pnelementcount: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("mscms.dll" "system" fn GetCountColorProfileElements(hprofile : isize, pnelementcount : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetCountColorProfileElements(hprofile, core::mem::transmute(pnelementcount)) } + unsafe { GetCountColorProfileElements(hprofile, pnelementcount as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { GetDeviceGammaRamp(hdc, core::mem::transmute(lpramp)) } + unsafe { GetDeviceGammaRamp(hdc, lpramp as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { GetICMProfileA(hdc, core::mem::transmute(pbufsize), core::mem::transmute(pszfilename.unwrap_or(core::mem::zeroed()))) } + unsafe { GetICMProfileA(hdc, pbufsize as _, pszfilename.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { GetICMProfileW(hdc, core::mem::transmute(pbufsize), core::mem::transmute(pszfilename.unwrap_or(core::mem::zeroed()))) } + unsafe { GetICMProfileW(hdc, pbufsize as _, pszfilename.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { GetLogColorSpaceA(hcolorspace, core::mem::transmute(lpbuffer), nsize) } + unsafe { GetLogColorSpaceA(hcolorspace, lpbuffer as _, nsize) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { GetLogColorSpaceW(hcolorspace, core::mem::transmute(lpbuffer), nsize) } + unsafe { GetLogColorSpaceW(hcolorspace, lpbuffer as _, nsize) } } #[inline] pub unsafe fn GetNamedProfileInfo(hprofile: isize, pnamedprofileinfo: *mut NAMED_PROFILE_INFO) -> super::super::Foundation::BOOL { windows_targets::link!("mscms.dll" "system" fn GetNamedProfileInfo(hprofile : isize, pnamedprofileinfo : *mut NAMED_PROFILE_INFO) -> super::super::Foundation:: BOOL); - unsafe { GetNamedProfileInfo(hprofile, core::mem::transmute(pnamedprofileinfo)) } + unsafe { GetNamedProfileInfo(hprofile, pnamedprofileinfo as _) } } #[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); - unsafe { GetPS2ColorRenderingDictionary(hprofile, dwintent, core::mem::transmute(pps2colorrenderingdictionary.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbps2colorrenderingdictionary), core::mem::transmute(pbbinary)) } + unsafe { GetPS2ColorRenderingDictionary(hprofile, dwintent, pps2colorrenderingdictionary.unwrap_or(core::mem::zeroed()) as _, pcbps2colorrenderingdictionary as _, pbbinary as _) } } #[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); - unsafe { GetPS2ColorRenderingIntent(hprofile, dwintent, core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbps2colorrenderingintent)) } + unsafe { GetPS2ColorRenderingIntent(hprofile, dwintent, pbuffer.unwrap_or(core::mem::zeroed()) as _, pcbps2colorrenderingintent as _) } } #[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); - unsafe { GetPS2ColorSpaceArray(hprofile, dwintent, dwcsatype, core::mem::transmute(pps2colorspacearray.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbps2colorspacearray), core::mem::transmute(pbbinary)) } + unsafe { GetPS2ColorSpaceArray(hprofile, dwintent, dwcsatype, pps2colorspacearray.unwrap_or(core::mem::zeroed()) as _, pcbps2colorspacearray as _, pbbinary as _) } } #[inline] pub unsafe fn GetStandardColorSpaceProfileA(pmachinename: P0, dwscs: u32, pbuffer: Option, pcbsize: *mut u32) -> super::super::Foundation::BOOL @@ -431,7 +431,7 @@ 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); - unsafe { GetStandardColorSpaceProfileA(pmachinename.param().abi(), dwscs, core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbsize)) } + unsafe { GetStandardColorSpaceProfileA(pmachinename.param().abi(), dwscs, pbuffer.unwrap_or(core::mem::zeroed()) as _, pcbsize as _) } } #[inline] pub unsafe fn GetStandardColorSpaceProfileW(pmachinename: P0, dwscs: u32, pbuffer: Option, pcbsize: *mut u32) -> super::super::Foundation::BOOL @@ -439,7 +439,7 @@ 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); - unsafe { GetStandardColorSpaceProfileW(pmachinename.param().abi(), dwscs, core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbsize)) } + unsafe { GetStandardColorSpaceProfileW(pmachinename.param().abi(), dwscs, pbuffer.unwrap_or(core::mem::zeroed()) as _, pcbsize as _) } } #[inline] pub unsafe fn InstallColorProfileA(pmachinename: P0, pprofilename: P1) -> super::super::Foundation::BOOL @@ -462,12 +462,12 @@ where #[inline] pub unsafe fn IsColorProfileTagPresent(hprofile: isize, tag: u32, pbpresent: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL { windows_targets::link!("mscms.dll" "system" fn IsColorProfileTagPresent(hprofile : isize, tag : u32, pbpresent : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - unsafe { IsColorProfileTagPresent(hprofile, tag, core::mem::transmute(pbpresent)) } + unsafe { IsColorProfileTagPresent(hprofile, tag, pbpresent as _) } } #[inline] pub unsafe fn IsColorProfileValid(hprofile: isize, pbvalid: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL { windows_targets::link!("mscms.dll" "system" fn IsColorProfileValid(hprofile : isize, pbvalid : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - unsafe { IsColorProfileValid(hprofile, core::mem::transmute(pbvalid)) } + unsafe { IsColorProfileValid(hprofile, pbvalid as _) } } #[inline] pub unsafe fn OpenColorProfileA(pprofile: *const PROFILE, dwdesiredaccess: u32, dwsharemode: u32, dwcreationmode: u32) -> isize { @@ -581,23 +581,23 @@ where #[inline] pub unsafe fn SetupColorMatchingA(pcms: *mut COLORMATCHSETUPA) -> super::super::Foundation::BOOL { windows_targets::link!("icmui.dll" "system" fn SetupColorMatchingA(pcms : *mut COLORMATCHSETUPA) -> super::super::Foundation:: BOOL); - unsafe { SetupColorMatchingA(core::mem::transmute(pcms)) } + unsafe { SetupColorMatchingA(pcms as _) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] pub unsafe fn SetupColorMatchingW(pcms: *mut COLORMATCHSETUPW) -> super::super::Foundation::BOOL { windows_targets::link!("icmui.dll" "system" fn SetupColorMatchingW(pcms : *mut COLORMATCHSETUPW) -> super::super::Foundation:: BOOL); - unsafe { SetupColorMatchingW(core::mem::transmute(pcms)) } + unsafe { SetupColorMatchingW(pcms as _) } } #[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: 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); - unsafe { TranslateBitmapBits(hcolortransform, psrcbits, bminput, dwwidth, dwheight, dwinputstride, core::mem::transmute(pdestbits), bmoutput, dwoutputstride, core::mem::transmute(pfncallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulcallbackdata.unwrap_or(core::mem::zeroed()))) } + unsafe { TranslateBitmapBits(hcolortransform, psrcbits, bminput, dwwidth, dwheight, dwinputstride, pdestbits as _, bmoutput, dwoutputstride, pfncallback.unwrap_or(core::mem::zeroed()) as _, ulcallbackdata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn TranslateColors(hcolortransform: isize, painputcolors: *const COLOR, ncolors: u32, ctinput: COLORTYPE, paoutputcolors: *mut COLOR, ctoutput: COLORTYPE) -> super::super::Foundation::BOOL { windows_targets::link!("mscms.dll" "system" fn TranslateColors(hcolortransform : isize, painputcolors : *const COLOR, ncolors : u32, ctinput : COLORTYPE, paoutputcolors : *mut COLOR, ctoutput : COLORTYPE) -> super::super::Foundation:: BOOL); - unsafe { TranslateColors(hcolortransform, painputcolors, ncolors, ctinput, core::mem::transmute(paoutputcolors), ctoutput) } + unsafe { TranslateColors(hcolortransform, painputcolors, ncolors, ctinput, paoutputcolors as _, ctoutput) } } #[inline] pub unsafe fn UninstallColorProfileA(pmachinename: P0, pprofilename: P1, bdelete: bool) -> super::super::Foundation::BOOL @@ -640,7 +640,7 @@ where 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); - unsafe { UpdateICMRegKeyA(core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), lpszcmid.param().abi(), lpszfilename.param().abi(), command) } + unsafe { UpdateICMRegKeyA(reserved.unwrap_or(core::mem::zeroed()) as _, lpszcmid.param().abi(), lpszfilename.param().abi(), command) } } #[inline] pub unsafe fn UpdateICMRegKeyW(reserved: Option, lpszcmid: P1, lpszfilename: P2, command: ICM_COMMAND) -> super::super::Foundation::BOOL @@ -649,7 +649,7 @@ where 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); - unsafe { UpdateICMRegKeyW(core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), lpszcmid.param().abi(), lpszfilename.param().abi(), command) } + unsafe { UpdateICMRegKeyW(reserved.unwrap_or(core::mem::zeroed()) as _, lpszcmid.param().abi(), lpszfilename.param().abi(), command) } } #[inline] pub unsafe fn WcsAssociateColorProfileWithDevice(scope: WCS_PROFILE_MANAGEMENT_SCOPE, pprofilename: P1, pdevicename: P2) -> super::super::Foundation::BOOL @@ -682,17 +682,17 @@ 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); - unsafe { WcsEnumColorProfiles(scope, penumrecord, core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), core::mem::transmute(pnprofiles.unwrap_or(core::mem::zeroed()))) } + unsafe { WcsEnumColorProfiles(scope, penumrecord, core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), pnprofiles.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn WcsEnumColorProfilesSize(scope: WCS_PROFILE_MANAGEMENT_SCOPE, penumrecord: *const ENUMTYPEW, pdwsize: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("mscms.dll" "system" fn WcsEnumColorProfilesSize(scope : WCS_PROFILE_MANAGEMENT_SCOPE, penumrecord : *const ENUMTYPEW, pdwsize : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { WcsEnumColorProfilesSize(scope, penumrecord, core::mem::transmute(pdwsize)) } + unsafe { WcsEnumColorProfilesSize(scope, penumrecord, pdwsize as _) } } #[inline] pub unsafe fn WcsGetCalibrationManagementState(pbisenabled: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL { windows_targets::link!("mscms.dll" "system" fn WcsGetCalibrationManagementState(pbisenabled : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - unsafe { WcsGetCalibrationManagementState(core::mem::transmute(pbisenabled)) } + unsafe { WcsGetCalibrationManagementState(pbisenabled as _) } } #[inline] pub unsafe fn WcsGetDefaultColorProfile(scope: WCS_PROFILE_MANAGEMENT_SCOPE, pdevicename: P1, cptcolorprofiletype: COLORPROFILETYPE, cpstcolorprofilesubtype: COLORPROFILESUBTYPE, dwprofileid: u32, cbprofilename: u32, pprofilename: windows_core::PWSTR) -> super::super::Foundation::BOOL @@ -708,12 +708,12 @@ where P1: windows_core::Param, { windows_targets::link!("mscms.dll" "system" fn WcsGetDefaultColorProfileSize(scope : WCS_PROFILE_MANAGEMENT_SCOPE, pdevicename : windows_core::PCWSTR, cptcolorprofiletype : COLORPROFILETYPE, cpstcolorprofilesubtype : COLORPROFILESUBTYPE, dwprofileid : u32, pcbprofilename : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { WcsGetDefaultColorProfileSize(scope, pdevicename.param().abi(), cptcolorprofiletype, cpstcolorprofilesubtype, dwprofileid, core::mem::transmute(pcbprofilename)) } + unsafe { WcsGetDefaultColorProfileSize(scope, pdevicename.param().abi(), cptcolorprofiletype, cpstcolorprofilesubtype, dwprofileid, pcbprofilename as _) } } #[inline] pub unsafe fn WcsGetDefaultRenderingIntent(scope: WCS_PROFILE_MANAGEMENT_SCOPE, pdwrenderingintent: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("mscms.dll" "system" fn WcsGetDefaultRenderingIntent(scope : WCS_PROFILE_MANAGEMENT_SCOPE, pdwrenderingintent : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { WcsGetDefaultRenderingIntent(scope, core::mem::transmute(pdwrenderingintent)) } + unsafe { WcsGetDefaultRenderingIntent(scope, pdwrenderingintent as _) } } #[inline] pub unsafe fn WcsGetUsePerUserProfiles(pdevicename: P0, dwdeviceclass: u32, puseperuserprofiles: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL @@ -721,17 +721,17 @@ where P0: windows_core::Param, { windows_targets::link!("mscms.dll" "system" fn WcsGetUsePerUserProfiles(pdevicename : windows_core::PCWSTR, dwdeviceclass : u32, puseperuserprofiles : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - unsafe { WcsGetUsePerUserProfiles(pdevicename.param().abi(), dwdeviceclass, core::mem::transmute(puseperuserprofiles)) } + unsafe { WcsGetUsePerUserProfiles(pdevicename.param().abi(), dwdeviceclass, puseperuserprofiles as _) } } #[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); - unsafe { WcsOpenColorProfileA(pcdmpprofile, core::mem::transmute(pcampprofile.unwrap_or(core::mem::zeroed())), core::mem::transmute(pgmmpprofile.unwrap_or(core::mem::zeroed())), dwdesireaccess, dwsharemode, dwcreationmode, dwflags) } + unsafe { WcsOpenColorProfileA(pcdmpprofile, pcampprofile.unwrap_or(core::mem::zeroed()) as _, pgmmpprofile.unwrap_or(core::mem::zeroed()) as _, dwdesireaccess, dwsharemode, dwcreationmode, dwflags) } } #[inline] pub unsafe fn WcsOpenColorProfileW(pcdmpprofile: *const PROFILE, pcampprofile: Option<*const PROFILE>, pgmmpprofile: Option<*const PROFILE>, dwdesireaccess: u32, dwsharemode: u32, dwcreationmode: u32, dwflags: u32) -> isize { windows_targets::link!("mscms.dll" "system" fn WcsOpenColorProfileW(pcdmpprofile : *const PROFILE, pcampprofile : *const PROFILE, pgmmpprofile : *const PROFILE, dwdesireaccess : u32, dwsharemode : u32, dwcreationmode : u32, dwflags : u32) -> isize); - unsafe { WcsOpenColorProfileW(pcdmpprofile, core::mem::transmute(pcampprofile.unwrap_or(core::mem::zeroed())), core::mem::transmute(pgmmpprofile.unwrap_or(core::mem::zeroed())), dwdesireaccess, dwsharemode, dwcreationmode, dwflags) } + unsafe { WcsOpenColorProfileW(pcdmpprofile, pcampprofile.unwrap_or(core::mem::zeroed()) as _, pgmmpprofile.unwrap_or(core::mem::zeroed()) as _, dwdesireaccess, dwsharemode, dwcreationmode, dwflags) } } #[inline] pub unsafe fn WcsSetCalibrationManagementState(bisenabled: bool) -> super::super::Foundation::BOOL { @@ -763,7 +763,7 @@ where #[inline] pub unsafe fn WcsTranslateColors(hcolortransform: isize, ncolors: u32, ninputchannels: u32, cdtinput: COLORDATATYPE, cbinput: u32, pinputdata: *const core::ffi::c_void, noutputchannels: u32, cdtoutput: COLORDATATYPE, cboutput: u32, poutputdata: *mut core::ffi::c_void) -> super::super::Foundation::BOOL { windows_targets::link!("mscms.dll" "system" fn WcsTranslateColors(hcolortransform : isize, ncolors : u32, ninputchannels : u32, cdtinput : COLORDATATYPE, cbinput : u32, pinputdata : *const core::ffi::c_void, noutputchannels : u32, cdtoutput : COLORDATATYPE, cboutput : u32, poutputdata : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - unsafe { WcsTranslateColors(hcolortransform, ncolors, ninputchannels, cdtinput, cbinput, pinputdata, noutputchannels, cdtoutput, cboutput, core::mem::transmute(poutputdata)) } + unsafe { WcsTranslateColors(hcolortransform, ncolors, ninputchannels, cdtinput, cbinput, pinputdata, noutputchannels, cdtoutput, cboutput, poutputdata as _) } } pub const ATTRIB_MATTE: u32 = 2u32; pub const ATTRIB_TRANSPARENCY: u32 = 1u32; @@ -1275,13 +1275,13 @@ impl IDeviceModelPlugIn { unsafe { (windows_core::Interface::vtable(self).SetTransformDeviceModelInfo)(windows_core::Interface::as_raw(self), imodelposition, pidevicemodelother.param().abi()).ok() } } pub unsafe fn GetPrimarySamples(&self, pprimarycolor: *mut PrimaryXYZColors) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPrimarySamples)(windows_core::Interface::as_raw(self), core::mem::transmute(pprimarycolor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPrimarySamples)(windows_core::Interface::as_raw(self), pprimarycolor as _).ok() } } pub unsafe fn GetGamutBoundaryMeshSize(&self, pnumvertices: *mut u32, pnumtriangles: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGamutBoundaryMeshSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pnumvertices), core::mem::transmute(pnumtriangles)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGamutBoundaryMeshSize)(windows_core::Interface::as_raw(self), pnumvertices as _, pnumtriangles as _).ok() } } pub unsafe fn GetGamutBoundaryMesh(&self, cchannels: u32, cvertices: u32, pvertices: *mut f32, ptriangles: &mut [GamutShellTriangle]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGamutBoundaryMesh)(windows_core::Interface::as_raw(self), cchannels, cvertices, ptriangles.len().try_into().unwrap(), core::mem::transmute(pvertices), core::mem::transmute(ptriangles.as_ptr())).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGamutBoundaryMesh)(windows_core::Interface::as_raw(self), cchannels, cvertices, ptriangles.len().try_into().unwrap(), pvertices as _, core::mem::transmute(ptriangles.as_ptr())).ok() } } pub unsafe fn GetNeutralAxisSize(&self) -> windows_core::Result { unsafe { @@ -1444,7 +1444,7 @@ impl IGamutMapModelPlugIn { unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrxml), psrcplugin.param().abi(), pdestplugin.param().abi(), psrcgbd, pdestgbd).ok() } } pub unsafe fn SourceToDestinationAppearanceColors(&self, ccolors: u32, pinputcolors: *const JChColorF, poutputcolors: *mut JChColorF) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SourceToDestinationAppearanceColors)(windows_core::Interface::as_raw(self), ccolors, pinputcolors, core::mem::transmute(poutputcolors)).ok() } + unsafe { (windows_core::Interface::vtable(self).SourceToDestinationAppearanceColors)(windows_core::Interface::as_raw(self), ccolors, pinputcolors, poutputcolors as _).ok() } } } #[repr(C)] 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 8a95cd8918..5ddd0217d5 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 @@ -1,24 +1,24 @@ #[inline] pub unsafe fn ChooseColorA(param0: *mut CHOOSECOLORA) -> super::super::super::Foundation::BOOL { windows_targets::link!("comdlg32.dll" "system" fn ChooseColorA(param0 : *mut CHOOSECOLORA) -> super::super::super::Foundation:: BOOL); - unsafe { ChooseColorA(core::mem::transmute(param0)) } + unsafe { ChooseColorA(param0 as _) } } #[inline] pub unsafe fn ChooseColorW(param0: *mut CHOOSECOLORW) -> super::super::super::Foundation::BOOL { windows_targets::link!("comdlg32.dll" "system" fn ChooseColorW(param0 : *mut CHOOSECOLORW) -> super::super::super::Foundation:: BOOL); - unsafe { ChooseColorW(core::mem::transmute(param0)) } + unsafe { ChooseColorW(param0 as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn ChooseFontA(param0: *mut CHOOSEFONTA) -> super::super::super::Foundation::BOOL { windows_targets::link!("comdlg32.dll" "system" fn ChooseFontA(param0 : *mut CHOOSEFONTA) -> super::super::super::Foundation:: BOOL); - unsafe { ChooseFontA(core::mem::transmute(param0)) } + unsafe { ChooseFontA(param0 as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn ChooseFontW(param0: *mut CHOOSEFONTW) -> super::super::super::Foundation::BOOL { windows_targets::link!("comdlg32.dll" "system" fn ChooseFontW(param0 : *mut CHOOSEFONTW) -> super::super::super::Foundation:: BOOL); - unsafe { ChooseFontW(core::mem::transmute(param0)) } + unsafe { ChooseFontW(param0 as _) } } #[inline] pub unsafe fn CommDlgExtendedError() -> COMMON_DLG_ERRORS { @@ -28,12 +28,12 @@ pub unsafe fn CommDlgExtendedError() -> COMMON_DLG_ERRORS { #[inline] pub unsafe fn FindTextA(param0: *mut FINDREPLACEA) -> super::super::super::Foundation::HWND { windows_targets::link!("comdlg32.dll" "system" fn FindTextA(param0 : *mut FINDREPLACEA) -> super::super::super::Foundation:: HWND); - unsafe { FindTextA(core::mem::transmute(param0)) } + unsafe { FindTextA(param0 as _) } } #[inline] pub unsafe fn FindTextW(param0: *mut FINDREPLACEW) -> super::super::super::Foundation::HWND { windows_targets::link!("comdlg32.dll" "system" fn FindTextW(param0 : *mut FINDREPLACEW) -> super::super::super::Foundation:: HWND); - unsafe { FindTextW(core::mem::transmute(param0)) } + unsafe { FindTextW(param0 as _) } } #[inline] pub unsafe fn GetFileTitleA(param0: P0, buf: &mut [u8]) -> i16 @@ -54,38 +54,38 @@ where #[inline] pub unsafe fn GetOpenFileNameA(param0: *mut OPENFILENAMEA) -> super::super::super::Foundation::BOOL { windows_targets::link!("comdlg32.dll" "system" fn GetOpenFileNameA(param0 : *mut OPENFILENAMEA) -> super::super::super::Foundation:: BOOL); - unsafe { GetOpenFileNameA(core::mem::transmute(param0)) } + unsafe { GetOpenFileNameA(param0 as _) } } #[inline] pub unsafe fn GetOpenFileNameW(param0: *mut OPENFILENAMEW) -> super::super::super::Foundation::BOOL { windows_targets::link!("comdlg32.dll" "system" fn GetOpenFileNameW(param0 : *mut OPENFILENAMEW) -> super::super::super::Foundation:: BOOL); - unsafe { GetOpenFileNameW(core::mem::transmute(param0)) } + unsafe { GetOpenFileNameW(param0 as _) } } #[inline] pub unsafe fn GetSaveFileNameA(param0: *mut OPENFILENAMEA) -> super::super::super::Foundation::BOOL { windows_targets::link!("comdlg32.dll" "system" fn GetSaveFileNameA(param0 : *mut OPENFILENAMEA) -> super::super::super::Foundation:: BOOL); - unsafe { GetSaveFileNameA(core::mem::transmute(param0)) } + unsafe { GetSaveFileNameA(param0 as _) } } #[inline] pub unsafe fn GetSaveFileNameW(param0: *mut OPENFILENAMEW) -> super::super::super::Foundation::BOOL { windows_targets::link!("comdlg32.dll" "system" fn GetSaveFileNameW(param0 : *mut OPENFILENAMEW) -> super::super::super::Foundation:: BOOL); - unsafe { GetSaveFileNameW(core::mem::transmute(param0)) } + unsafe { GetSaveFileNameW(param0 as _) } } #[inline] pub unsafe fn PageSetupDlgA(param0: *mut PAGESETUPDLGA) -> super::super::super::Foundation::BOOL { windows_targets::link!("comdlg32.dll" "system" fn PageSetupDlgA(param0 : *mut PAGESETUPDLGA) -> super::super::super::Foundation:: BOOL); - unsafe { PageSetupDlgA(core::mem::transmute(param0)) } + unsafe { PageSetupDlgA(param0 as _) } } #[inline] pub unsafe fn PageSetupDlgW(param0: *mut PAGESETUPDLGW) -> super::super::super::Foundation::BOOL { windows_targets::link!("comdlg32.dll" "system" fn PageSetupDlgW(param0 : *mut PAGESETUPDLGW) -> super::super::super::Foundation:: BOOL); - unsafe { PageSetupDlgW(core::mem::transmute(param0)) } + unsafe { PageSetupDlgW(param0 as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn PrintDlgA(ppd: *mut PRINTDLGA) -> super::super::super::Foundation::BOOL { windows_targets::link!("comdlg32.dll" "system" fn PrintDlgA(ppd : *mut PRINTDLGA) -> super::super::super::Foundation:: BOOL); - unsafe { PrintDlgA(core::mem::transmute(ppd)) } + unsafe { PrintDlgA(ppd as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -103,17 +103,17 @@ pub unsafe fn PrintDlgExW(ppd: *mut PRINTDLGEXW) -> windows_core::Result<()> { #[inline] pub unsafe fn PrintDlgW(ppd: *mut PRINTDLGW) -> super::super::super::Foundation::BOOL { windows_targets::link!("comdlg32.dll" "system" fn PrintDlgW(ppd : *mut PRINTDLGW) -> super::super::super::Foundation:: BOOL); - unsafe { PrintDlgW(core::mem::transmute(ppd)) } + unsafe { PrintDlgW(ppd as _) } } #[inline] pub unsafe fn ReplaceTextA(param0: *mut FINDREPLACEA) -> super::super::super::Foundation::HWND { windows_targets::link!("comdlg32.dll" "system" fn ReplaceTextA(param0 : *mut FINDREPLACEA) -> super::super::super::Foundation:: HWND); - unsafe { ReplaceTextA(core::mem::transmute(param0)) } + unsafe { ReplaceTextA(param0 as _) } } #[inline] pub unsafe fn ReplaceTextW(param0: *mut FINDREPLACEW) -> super::super::super::Foundation::HWND { windows_targets::link!("comdlg32.dll" "system" fn ReplaceTextW(param0 : *mut FINDREPLACEW) -> super::super::super::Foundation:: HWND); - unsafe { ReplaceTextW(core::mem::transmute(param0)) } + unsafe { ReplaceTextW(param0 as _) } } pub const BOLD_FONTTYPE: CHOOSEFONT_FONT_TYPE = CHOOSEFONT_FONT_TYPE(256u16); pub const CCERR_CHOOSECOLORCODES: COMMON_DLG_ERRORS = COMMON_DLG_ERRORS(20480u32); @@ -742,7 +742,7 @@ impl IPrintDialogCallback { unsafe { (windows_core::Interface::vtable(self).SelectionChange)(windows_core::Interface::as_raw(self)).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<()> { - unsafe { (windows_core::Interface::vtable(self).HandleMessage)(windows_core::Interface::as_raw(self), hdlg, umsg, wparam, lparam, core::mem::transmute(presult)).ok() } + unsafe { (windows_core::Interface::vtable(self).HandleMessage)(windows_core::Interface::as_raw(self), hdlg, umsg, wparam, lparam, presult as _).ok() } } } #[repr(C)] @@ -794,13 +794,13 @@ windows_core::imp::interface_hierarchy!(IPrintDialogServices, windows_core::IUnk impl IPrintDialogServices { #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetCurrentDevMode(&self, pdevmode: *mut super::super::super::Graphics::Gdi::DEVMODEA, pcbsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrentDevMode)(windows_core::Interface::as_raw(self), core::mem::transmute(pdevmode), core::mem::transmute(pcbsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentDevMode)(windows_core::Interface::as_raw(self), pdevmode as _, pcbsize as _).ok() } } pub unsafe fn GetCurrentPrinterName(&self, pprintername: Option, pcchsize: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentPrinterName)(windows_core::Interface::as_raw(self), pprintername.unwrap_or(core::mem::zeroed()) as _, pcchsize as _).ok() } } pub unsafe fn GetCurrentPortName(&self, pportname: Option, pcchsize: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentPortName)(windows_core::Interface::as_raw(self), pportname.unwrap_or(core::mem::zeroed()) as _, pcchsize as _).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 069dbf5a3b..8d3491c859 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 @@ -1294,7 +1294,7 @@ impl IRichEditOle { } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetClipboardData(&self, lpchrg: *mut CHARRANGE, reco: u32, lplpdataobj: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClipboardData)(windows_core::Interface::as_raw(self), core::mem::transmute(lpchrg), reco, core::mem::transmute(lplpdataobj)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClipboardData)(windows_core::Interface::as_raw(self), lpchrg as _, reco, core::mem::transmute(lplpdataobj)).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn ImportDataObject(&self, lpdataobj: P0, cf: u16, hmetapict: super::super::super::Foundation::HGLOBAL) -> windows_core::Result<()> @@ -1504,7 +1504,7 @@ impl IRichEditOleCallback { } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_UI_WindowsAndMessaging"))] pub unsafe fn GetInPlaceContext(&self, lplpframe: *mut Option, lplpdoc: *mut Option, lpframeinfo: *mut super::super::super::System::Ole::OLEINPLACEFRAMEINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInPlaceContext)(windows_core::Interface::as_raw(self), core::mem::transmute(lplpframe), core::mem::transmute(lplpdoc), core::mem::transmute(lpframeinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInPlaceContext)(windows_core::Interface::as_raw(self), core::mem::transmute(lplpframe), core::mem::transmute(lplpdoc), lpframeinfo as _).ok() } } pub unsafe fn ShowContainerUI(&self, fshow: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ShowContainerUI)(windows_core::Interface::as_raw(self), fshow.into()).ok() } @@ -1514,7 +1514,7 @@ impl IRichEditOleCallback { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).QueryInsertObject)(windows_core::Interface::as_raw(self), core::mem::transmute(lpclsid), lpstg.param().abi(), cp).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryInsertObject)(windows_core::Interface::as_raw(self), lpclsid as _, lpstg.param().abi(), cp).ok() } } #[cfg(feature = "Win32_System_Ole")] pub unsafe fn DeleteObject(&self, lpoleobj: P0) -> windows_core::Result<()> @@ -1528,25 +1528,25 @@ impl IRichEditOleCallback { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).QueryAcceptData)(windows_core::Interface::as_raw(self), lpdataobj.param().abi(), core::mem::transmute(lpcfformat), reco, freally.into(), hmetapict).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryAcceptData)(windows_core::Interface::as_raw(self), lpdataobj.param().abi(), lpcfformat as _, reco, freally.into(), hmetapict).ok() } } pub unsafe fn ContextSensitiveHelp(&self, fentermode: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ContextSensitiveHelp)(windows_core::Interface::as_raw(self), fentermode.into()).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetClipboardData(&self, lpchrg: *mut CHARRANGE, reco: u32, lplpdataobj: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClipboardData)(windows_core::Interface::as_raw(self), core::mem::transmute(lpchrg), reco, core::mem::transmute(lplpdataobj)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClipboardData)(windows_core::Interface::as_raw(self), lpchrg as _, reco, core::mem::transmute(lplpdataobj)).ok() } } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_System_SystemServices"))] pub unsafe fn GetDragDropEffect(&self, fdrag: bool, grfkeystate: super::super::super::System::SystemServices::MODIFIERKEYS_FLAGS, pdweffect: *mut super::super::super::System::Ole::DROPEFFECT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDragDropEffect)(windows_core::Interface::as_raw(self), fdrag.into(), grfkeystate, core::mem::transmute(pdweffect)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDragDropEffect)(windows_core::Interface::as_raw(self), fdrag.into(), grfkeystate, pdweffect as _).ok() } } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_UI_WindowsAndMessaging"))] pub unsafe fn GetContextMenu(&self, seltype: RICH_EDIT_GET_CONTEXT_MENU_SEL_TYPE, lpoleobj: P1, lpchrg: *mut CHARRANGE, lphmenu: *mut super::super::WindowsAndMessaging::HMENU) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetContextMenu)(windows_core::Interface::as_raw(self), seltype, lpoleobj.param().abi(), core::mem::transmute(lpchrg), core::mem::transmute(lphmenu)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetContextMenu)(windows_core::Interface::as_raw(self), seltype, lpoleobj.param().abi(), lpchrg as _, lphmenu as _).ok() } } } #[repr(C)] @@ -2256,7 +2256,7 @@ impl ITextDocument2 { } } pub unsafe fn GetClientRect(&self, r#type: tomConstants, pleft: *mut i32, ptop: *mut i32, pright: *mut i32, pbottom: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClientRect)(windows_core::Interface::as_raw(self), r#type, core::mem::transmute(pleft), core::mem::transmute(ptop), core::mem::transmute(pright), core::mem::transmute(pbottom)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClientRect)(windows_core::Interface::as_raw(self), r#type, pleft as _, ptop as _, pright as _, pbottom as _).ok() } } pub unsafe fn GetEffectColor(&self, index: i32) -> windows_core::Result { unsafe { @@ -2271,7 +2271,7 @@ impl ITextDocument2 { } } pub unsafe fn GetPreferredFont(&self, cp: i32, charrep: i32, options: i32, curcharrep: i32, curfontsize: i32, pbstr: *mut windows_core::BSTR, ppitchandfamily: *mut i32, pnewfontsize: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPreferredFont)(windows_core::Interface::as_raw(self), cp, charrep, options, curcharrep, curfontsize, core::mem::transmute(pbstr), core::mem::transmute(ppitchandfamily), core::mem::transmute(pnewfontsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPreferredFont)(windows_core::Interface::as_raw(self), cp, charrep, options, curcharrep, curfontsize, core::mem::transmute(pbstr), ppitchandfamily as _, pnewfontsize as _).ok() } } pub unsafe fn GetProperty(&self, r#type: i32) -> windows_core::Result { unsafe { @@ -2975,7 +2975,7 @@ impl ITextDocument2Old { unsafe { (windows_core::Interface::vtable(self).ReleaseImmContext)(windows_core::Interface::as_raw(self), context).ok() } } pub unsafe fn GetPreferredFont(&self, cp: i32, charrep: i32, option: i32, charrepcur: i32, curfontsize: i32, pbstr: *mut windows_core::BSTR, ppitchandfamily: *mut i32, pnewfontsize: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPreferredFont)(windows_core::Interface::as_raw(self), cp, charrep, option, charrepcur, curfontsize, core::mem::transmute(pbstr), core::mem::transmute(ppitchandfamily), core::mem::transmute(pnewfontsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPreferredFont)(windows_core::Interface::as_raw(self), cp, charrep, option, charrepcur, curfontsize, core::mem::transmute(pbstr), ppitchandfamily as _, pnewfontsize as _).ok() } } pub unsafe fn GetNotificationMode(&self) -> windows_core::Result { unsafe { @@ -2987,7 +2987,7 @@ impl ITextDocument2Old { unsafe { (windows_core::Interface::vtable(self).SetNotificationMode)(windows_core::Interface::as_raw(self), mode).ok() } } pub unsafe fn GetClientRect(&self, r#type: i32, pleft: *mut i32, ptop: *mut i32, pright: *mut i32, pbottom: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetClientRect)(windows_core::Interface::as_raw(self), r#type, core::mem::transmute(pleft), core::mem::transmute(ptop), core::mem::transmute(pright), core::mem::transmute(pbottom)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetClientRect)(windows_core::Interface::as_raw(self), r#type, pleft as _, ptop as _, pright as _, pbottom as _).ok() } } pub unsafe fn GetSelection2(&self) -> windows_core::Result { unsafe { @@ -4491,10 +4491,10 @@ impl ITextFont2 { unsafe { (windows_core::Interface::vtable(self).SetUnderlinePositionMode)(windows_core::Interface::as_raw(self), value).ok() } } pub unsafe fn GetEffects(&self, pvalue: *mut i32, pmask: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEffects)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue), core::mem::transmute(pmask)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEffects)(windows_core::Interface::as_raw(self), pvalue as _, pmask as _).ok() } } pub unsafe fn GetEffects2(&self, pvalue: *mut i32, pmask: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEffects2)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue), core::mem::transmute(pmask)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEffects2)(windows_core::Interface::as_raw(self), pvalue as _, pmask as _).ok() } } pub unsafe fn GetProperty(&self, r#type: i32) -> windows_core::Result { unsafe { @@ -4503,7 +4503,7 @@ impl ITextFont2 { } } pub unsafe fn GetPropertyInfo(&self, index: i32, ptype: *mut i32, pvalue: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPropertyInfo)(windows_core::Interface::as_raw(self), index, core::mem::transmute(ptype), core::mem::transmute(pvalue)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropertyInfo)(windows_core::Interface::as_raw(self), index, ptype as _, pvalue as _).ok() } } pub unsafe fn IsEqual2(&self, pfont: P0) -> windows_core::Result where @@ -5116,7 +5116,7 @@ impl ITextHost { unsafe { (windows_core::Interface::vtable(self).TxSetScrollPos)(windows_core::Interface::as_raw(self), fnbar, npos, fredraw.into()) } } pub unsafe fn TxInvalidateRect(&self, prc: *mut super::super::super::Foundation::RECT, fmode: bool) { - unsafe { (windows_core::Interface::vtable(self).TxInvalidateRect)(windows_core::Interface::as_raw(self), core::mem::transmute(prc), fmode.into()) } + unsafe { (windows_core::Interface::vtable(self).TxInvalidateRect)(windows_core::Interface::as_raw(self), prc as _, fmode.into()) } } pub unsafe fn TxViewChange(&self, fupdate: bool) { unsafe { (windows_core::Interface::vtable(self).TxViewChange)(windows_core::Interface::as_raw(self), fupdate.into()) } @@ -5139,7 +5139,7 @@ impl ITextHost { } #[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: super::super::super::Graphics::Gdi::HRGN, lprcupdate: *mut super::super::super::Foundation::RECT, fuscroll: super::super::WindowsAndMessaging::SCROLL_WINDOW_FLAGS) { - unsafe { (windows_core::Interface::vtable(self).TxScrollWindowEx)(windows_core::Interface::as_raw(self), dx, dy, core::mem::transmute(lprcscroll), core::mem::transmute(lprcclip), hrgnupdate, core::mem::transmute(lprcupdate), fuscroll) } + unsafe { (windows_core::Interface::vtable(self).TxScrollWindowEx)(windows_core::Interface::as_raw(self), dx, dy, lprcscroll as _, lprcclip as _, hrgnupdate, lprcupdate as _, fuscroll) } } pub unsafe fn TxSetCapture(&self, fcapture: bool) { unsafe { (windows_core::Interface::vtable(self).TxSetCapture)(windows_core::Interface::as_raw(self), fcapture.into()) } @@ -5152,22 +5152,22 @@ impl ITextHost { unsafe { (windows_core::Interface::vtable(self).TxSetCursor)(windows_core::Interface::as_raw(self), hcur, ftext.into()) } } pub unsafe fn TxScreenToClient(&self, lppt: *mut super::super::super::Foundation::POINT) -> super::super::super::Foundation::BOOL { - unsafe { (windows_core::Interface::vtable(self).TxScreenToClient)(windows_core::Interface::as_raw(self), core::mem::transmute(lppt)) } + unsafe { (windows_core::Interface::vtable(self).TxScreenToClient)(windows_core::Interface::as_raw(self), lppt as _) } } pub unsafe fn TxClientToScreen(&self, lppt: *mut super::super::super::Foundation::POINT) -> super::super::super::Foundation::BOOL { - unsafe { (windows_core::Interface::vtable(self).TxClientToScreen)(windows_core::Interface::as_raw(self), core::mem::transmute(lppt)) } + unsafe { (windows_core::Interface::vtable(self).TxClientToScreen)(windows_core::Interface::as_raw(self), lppt as _) } } pub unsafe fn TxActivate(&self, ploldstate: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TxActivate)(windows_core::Interface::as_raw(self), core::mem::transmute(ploldstate)).ok() } + unsafe { (windows_core::Interface::vtable(self).TxActivate)(windows_core::Interface::as_raw(self), ploldstate as _).ok() } } pub unsafe fn TxDeactivate(&self, lnewstate: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).TxDeactivate)(windows_core::Interface::as_raw(self), lnewstate).ok() } } pub unsafe fn TxGetClientRect(&self, prc: *mut super::super::super::Foundation::RECT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TxGetClientRect)(windows_core::Interface::as_raw(self), core::mem::transmute(prc)).ok() } + unsafe { (windows_core::Interface::vtable(self).TxGetClientRect)(windows_core::Interface::as_raw(self), prc as _).ok() } } pub unsafe fn TxGetViewInset(&self, prc: *mut super::super::super::Foundation::RECT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TxGetViewInset)(windows_core::Interface::as_raw(self), core::mem::transmute(prc)).ok() } + unsafe { (windows_core::Interface::vtable(self).TxGetViewInset)(windows_core::Interface::as_raw(self), prc as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn TxGetCharFormat(&self, ppcf: *const *const CHARFORMATW) -> windows_core::Result<()> { @@ -5181,13 +5181,13 @@ impl ITextHost { unsafe { (windows_core::Interface::vtable(self).TxGetSysColor)(windows_core::Interface::as_raw(self), nindex) } } pub unsafe fn TxGetBackStyle(&self, pstyle: *mut TXTBACKSTYLE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TxGetBackStyle)(windows_core::Interface::as_raw(self), core::mem::transmute(pstyle)).ok() } + unsafe { (windows_core::Interface::vtable(self).TxGetBackStyle)(windows_core::Interface::as_raw(self), pstyle as _).ok() } } pub unsafe fn TxGetMaxLength(&self, plength: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TxGetMaxLength)(windows_core::Interface::as_raw(self), core::mem::transmute(plength)).ok() } + unsafe { (windows_core::Interface::vtable(self).TxGetMaxLength)(windows_core::Interface::as_raw(self), plength as _).ok() } } pub unsafe fn TxGetScrollBars(&self, pdwscrollbar: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TxGetScrollBars)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwscrollbar)).ok() } + unsafe { (windows_core::Interface::vtable(self).TxGetScrollBars)(windows_core::Interface::as_raw(self), pdwscrollbar as _).ok() } } pub unsafe fn TxGetPasswordChar(&self) -> windows_core::Result { unsafe { @@ -5196,10 +5196,10 @@ impl ITextHost { } } pub unsafe fn TxGetAcceleratorPos(&self, pcp: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TxGetAcceleratorPos)(windows_core::Interface::as_raw(self), core::mem::transmute(pcp)).ok() } + unsafe { (windows_core::Interface::vtable(self).TxGetAcceleratorPos)(windows_core::Interface::as_raw(self), pcp as _).ok() } } pub unsafe fn TxGetExtent(&self, lpextent: *mut super::super::super::Foundation::SIZE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TxGetExtent)(windows_core::Interface::as_raw(self), core::mem::transmute(lpextent)).ok() } + unsafe { (windows_core::Interface::vtable(self).TxGetExtent)(windows_core::Interface::as_raw(self), lpextent as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn OnTxCharFormatChange(&self, pcf: *const CHARFORMATW) -> windows_core::Result<()> { @@ -5209,10 +5209,10 @@ impl ITextHost { unsafe { (windows_core::Interface::vtable(self).OnTxParaFormatChange)(windows_core::Interface::as_raw(self), ppf).ok() } } pub unsafe fn TxGetPropertyBits(&self, dwmask: u32, pdwbits: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TxGetPropertyBits)(windows_core::Interface::as_raw(self), dwmask, core::mem::transmute(pdwbits)).ok() } + unsafe { (windows_core::Interface::vtable(self).TxGetPropertyBits)(windows_core::Interface::as_raw(self), dwmask, pdwbits as _).ok() } } pub unsafe fn TxNotify(&self, inotify: u32, pv: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TxNotify)(windows_core::Interface::as_raw(self), inotify, core::mem::transmute(pv)).ok() } + unsafe { (windows_core::Interface::vtable(self).TxNotify)(windows_core::Interface::as_raw(self), inotify, pv as _).ok() } } #[cfg(feature = "Win32_UI_Input_Ime")] pub unsafe fn TxImmGetContext(&self) -> super::super::Input::Ime::HIMC { @@ -5223,7 +5223,7 @@ impl ITextHost { unsafe { (windows_core::Interface::vtable(self).TxImmReleaseContext)(windows_core::Interface::as_raw(self), himc) } } pub unsafe fn TxGetSelectionBarWidth(&self, lselbarwidth: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TxGetSelectionBarWidth)(windows_core::Interface::as_raw(self), core::mem::transmute(lselbarwidth)).ok() } + unsafe { (windows_core::Interface::vtable(self).TxGetSelectionBarWidth)(windows_core::Interface::as_raw(self), lselbarwidth as _).ok() } } } #[repr(C)] @@ -5649,7 +5649,7 @@ impl ITextHost2 { unsafe { (windows_core::Interface::vtable(self).TxIsDoubleClickPending)(windows_core::Interface::as_raw(self)) } } pub unsafe fn TxGetWindow(&self, phwnd: *mut super::super::super::Foundation::HWND) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TxGetWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(phwnd)).ok() } + unsafe { (windows_core::Interface::vtable(self).TxGetWindow)(windows_core::Interface::as_raw(self), phwnd as _).ok() } } pub unsafe fn TxSetForegroundWindow(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).TxSetForegroundWindow)(windows_core::Interface::as_raw(self)).ok() } @@ -5659,7 +5659,7 @@ impl ITextHost2 { unsafe { (windows_core::Interface::vtable(self).TxGetPalette)(windows_core::Interface::as_raw(self)) } } pub unsafe fn TxGetEastAsianFlags(&self, pflags: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TxGetEastAsianFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(pflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).TxGetEastAsianFlags)(windows_core::Interface::as_raw(self), pflags as _).ok() } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn TxSetCursor2(&self, hcur: super::super::WindowsAndMessaging::HCURSOR, btext: bool) -> super::super::WindowsAndMessaging::HCURSOR { @@ -5669,20 +5669,20 @@ impl ITextHost2 { unsafe { (windows_core::Interface::vtable(self).TxFreeTextServicesNotification)(windows_core::Interface::as_raw(self)) } } pub unsafe fn TxGetEditStyle(&self, dwitem: u32, pdwdata: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TxGetEditStyle)(windows_core::Interface::as_raw(self), dwitem, core::mem::transmute(pdwdata)).ok() } + unsafe { (windows_core::Interface::vtable(self).TxGetEditStyle)(windows_core::Interface::as_raw(self), dwitem, pdwdata as _).ok() } } pub unsafe fn TxGetWindowStyles(&self, pdwstyle: *mut u32, pdwexstyle: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TxGetWindowStyles)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwstyle), core::mem::transmute(pdwexstyle)).ok() } + unsafe { (windows_core::Interface::vtable(self).TxGetWindowStyles)(windows_core::Interface::as_raw(self), pdwstyle as _, pdwexstyle as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn TxShowDropCaret(&self, fshow: bool, hdc: super::super::super::Graphics::Gdi::HDC, prc: *mut super::super::super::Foundation::RECT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TxShowDropCaret)(windows_core::Interface::as_raw(self), fshow.into(), hdc, core::mem::transmute(prc)).ok() } + unsafe { (windows_core::Interface::vtable(self).TxShowDropCaret)(windows_core::Interface::as_raw(self), fshow.into(), hdc, prc as _).ok() } } pub unsafe fn TxDestroyCaret(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).TxDestroyCaret)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn TxGetHorzExtent(&self, plhorzextent: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TxGetHorzExtent)(windows_core::Interface::as_raw(self), core::mem::transmute(plhorzextent)).ok() } + unsafe { (windows_core::Interface::vtable(self).TxGetHorzExtent)(windows_core::Interface::as_raw(self), plhorzextent as _).ok() } } } #[repr(C)] @@ -6055,7 +6055,7 @@ impl ITextPara { unsafe { (windows_core::Interface::vtable(self).DeleteTab)(windows_core::Interface::as_raw(self), tbpos).ok() } } pub unsafe fn GetTab(&self, itab: i32, ptbpos: *mut f32, ptbalign: *mut i32, ptbleader: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTab)(windows_core::Interface::as_raw(self), itab, core::mem::transmute(ptbpos), core::mem::transmute(ptbalign), core::mem::transmute(ptbleader)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTab)(windows_core::Interface::as_raw(self), itab, ptbpos as _, ptbalign as _, ptbleader as _).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -6723,7 +6723,7 @@ impl ITextPara2 { unsafe { (windows_core::Interface::vtable(self).SetTrimPunctuationAtStart)(windows_core::Interface::as_raw(self), value).ok() } } pub unsafe fn GetEffects(&self, pvalue: *mut i32, pmask: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEffects)(windows_core::Interface::as_raw(self), core::mem::transmute(pvalue), core::mem::transmute(pmask)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEffects)(windows_core::Interface::as_raw(self), pvalue as _, pmask as _).ok() } } pub unsafe fn GetProperty(&self, r#type: i32) -> windows_core::Result { unsafe { @@ -7245,7 +7245,7 @@ impl ITextRange { unsafe { (windows_core::Interface::vtable(self).ChangeCase)(windows_core::Interface::as_raw(self), r#type).ok() } } pub unsafe fn GetPoint(&self, r#type: tomConstants, px: *mut i32, py: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPoint)(windows_core::Interface::as_raw(self), r#type, core::mem::transmute(px), core::mem::transmute(py)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPoint)(windows_core::Interface::as_raw(self), r#type, px as _, py as _).ok() } } pub unsafe fn SetPoint(&self, x: i32, y: i32, r#type: tomConstants, extend: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetPoint)(windows_core::Interface::as_raw(self), x, y, r#type, extend).ok() } @@ -8114,13 +8114,13 @@ impl ITextRange2 { } } pub unsafe fn GetChar2(&self, pchar: *mut i32, offset: i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetChar2)(windows_core::Interface::as_raw(self), core::mem::transmute(pchar), offset).ok() } + unsafe { (windows_core::Interface::vtable(self).GetChar2)(windows_core::Interface::as_raw(self), pchar as _, offset).ok() } } pub unsafe fn GetDropCap(&self, pcline: *mut i32, pposition: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDropCap)(windows_core::Interface::as_raw(self), core::mem::transmute(pcline), core::mem::transmute(pposition)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDropCap)(windows_core::Interface::as_raw(self), pcline as _, pposition as _).ok() } } pub unsafe fn GetInlineObject(&self, ptype: *mut i32, palign: *mut i32, pchar: *mut i32, pchar1: *mut i32, pchar2: *mut i32, pcount: *mut i32, ptexstyle: *mut i32, pccol: *mut i32, plevel: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInlineObject)(windows_core::Interface::as_raw(self), core::mem::transmute(ptype), core::mem::transmute(palign), core::mem::transmute(pchar), core::mem::transmute(pchar1), core::mem::transmute(pchar2), core::mem::transmute(pcount), core::mem::transmute(ptexstyle), core::mem::transmute(pccol), core::mem::transmute(plevel)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInlineObject)(windows_core::Interface::as_raw(self), ptype as _, palign as _, pchar as _, pchar1 as _, pchar2 as _, pcount as _, ptexstyle as _, pccol as _, plevel as _).ok() } } pub unsafe fn GetProperty(&self, r#type: i32) -> windows_core::Result { unsafe { @@ -8129,10 +8129,10 @@ impl ITextRange2 { } } pub unsafe fn GetRect(&self, r#type: i32, pleft: *mut i32, ptop: *mut i32, pright: *mut i32, pbottom: *mut i32, phit: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRect)(windows_core::Interface::as_raw(self), r#type, core::mem::transmute(pleft), core::mem::transmute(ptop), core::mem::transmute(pright), core::mem::transmute(pbottom), core::mem::transmute(phit)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRect)(windows_core::Interface::as_raw(self), r#type, pleft as _, ptop as _, pright as _, pbottom as _, phit as _).ok() } } pub unsafe fn GetSubrange(&self, isubrange: i32, pcpfirst: *mut i32, pcplim: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSubrange)(windows_core::Interface::as_raw(self), isubrange, core::mem::transmute(pcpfirst), core::mem::transmute(pcplim)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSubrange)(windows_core::Interface::as_raw(self), isubrange, pcpfirst as _, pcplim as _).ok() } } pub unsafe fn GetText2(&self, flags: i32) -> windows_core::Result { unsafe { @@ -8840,10 +8840,10 @@ impl ITextRow { unsafe { (windows_core::Interface::vtable(self).SetCellWidth)(windows_core::Interface::as_raw(self), value).ok() } } pub unsafe fn GetCellBorderColors(&self, pcrleft: *mut i32, pcrtop: *mut i32, pcrright: *mut i32, pcrbottom: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCellBorderColors)(windows_core::Interface::as_raw(self), core::mem::transmute(pcrleft), core::mem::transmute(pcrtop), core::mem::transmute(pcrright), core::mem::transmute(pcrbottom)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCellBorderColors)(windows_core::Interface::as_raw(self), pcrleft as _, pcrtop as _, pcrright as _, pcrbottom as _).ok() } } pub unsafe fn GetCellBorderWidths(&self, pduleft: *mut i32, pdutop: *mut i32, pduright: *mut i32, pdubottom: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCellBorderWidths)(windows_core::Interface::as_raw(self), core::mem::transmute(pduleft), core::mem::transmute(pdutop), core::mem::transmute(pduright), core::mem::transmute(pdubottom)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCellBorderWidths)(windows_core::Interface::as_raw(self), pduleft as _, pdutop as _, pduright as _, pdubottom as _).ok() } } pub unsafe fn SetCellBorderColors(&self, crleft: i32, crtop: i32, crright: i32, crbottom: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetCellBorderColors)(windows_core::Interface::as_raw(self), crleft, crtop, crright, crbottom).ok() } @@ -9706,28 +9706,28 @@ 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: super::super::super::Foundation::WPARAM, lparam: super::super::super::Foundation::LPARAM, plresult: *mut super::super::super::Foundation::LRESULT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TxSendMessage)(windows_core::Interface::as_raw(self), msg, wparam, lparam, core::mem::transmute(plresult)).ok() } + unsafe { (windows_core::Interface::vtable(self).TxSendMessage)(windows_core::Interface::as_raw(self), msg, wparam, lparam, plresult as _).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: 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<()> { - unsafe { (windows_core::Interface::vtable(self).TxDraw)(windows_core::Interface::as_raw(self), dwdrawaspect, lindex, core::mem::transmute(pvaspect), core::mem::transmute(ptd), hdcdraw, hictargetdev, core::mem::transmute(lprcbounds), core::mem::transmute(lprcwbounds), core::mem::transmute(lprcupdate), pfncontinue, dwcontinue, lviewid).ok() } + unsafe { (windows_core::Interface::vtable(self).TxDraw)(windows_core::Interface::as_raw(self), dwdrawaspect, lindex, pvaspect as _, ptd as _, hdcdraw, hictargetdev, lprcbounds as _, lprcwbounds as _, lprcupdate as _, pfncontinue, dwcontinue, 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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).TxGetHScroll)(windows_core::Interface::as_raw(self), plmin as _, plmax as _, plpos as _, plpage as _, pfenabled as _).ok() } } pub unsafe fn TxGetVScroll(&self, plmin: *mut i32, plmax: *mut i32, plpos: *mut i32, plpage: *mut i32, pfenabled: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).TxGetVScroll)(windows_core::Interface::as_raw(self), plmin as _, plmax as _, plpos as _, plpage as _, pfenabled as _).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: 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<()> { - unsafe { (windows_core::Interface::vtable(self).OnTxSetCursor)(windows_core::Interface::as_raw(self), dwdrawaspect, lindex, core::mem::transmute(pvaspect), core::mem::transmute(ptd), hdcdraw, hictargetdev, core::mem::transmute(lprcclient), x, y).ok() } + unsafe { (windows_core::Interface::vtable(self).OnTxSetCursor)(windows_core::Interface::as_raw(self), dwdrawaspect, lindex, pvaspect as _, ptd as _, hdcdraw, hictargetdev, lprcclient as _, x, 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: 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<()> { - unsafe { (windows_core::Interface::vtable(self).TxQueryHitPoint)(windows_core::Interface::as_raw(self), dwdrawaspect, lindex, core::mem::transmute(pvaspect), core::mem::transmute(ptd), hdcdraw, hictargetdev, core::mem::transmute(lprcclient), x, y, core::mem::transmute(phitresult)).ok() } + unsafe { (windows_core::Interface::vtable(self).TxQueryHitPoint)(windows_core::Interface::as_raw(self), dwdrawaspect, lindex, pvaspect as _, ptd as _, hdcdraw, hictargetdev, lprcclient as _, x, y, phitresult as _).ok() } } pub unsafe fn OnTxInPlaceActivate(&self, prcclient: *mut super::super::super::Foundation::RECT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OnTxInPlaceActivate)(windows_core::Interface::as_raw(self), core::mem::transmute(prcclient)).ok() } + unsafe { (windows_core::Interface::vtable(self).OnTxInPlaceActivate)(windows_core::Interface::as_raw(self), prcclient as _).ok() } } pub unsafe fn OnTxInPlaceDeactivate(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OnTxInPlaceDeactivate)(windows_core::Interface::as_raw(self)).ok() } @@ -9748,14 +9748,14 @@ impl ITextServices { unsafe { (windows_core::Interface::vtable(self).TxSetText)(windows_core::Interface::as_raw(self), psztext.param().abi()).ok() } } pub unsafe fn TxGetCurTargetX(&self, param0: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TxGetCurTargetX)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).TxGetCurTargetX)(windows_core::Interface::as_raw(self), param0 as _).ok() } } pub unsafe fn TxGetBaseLinePos(&self, param0: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TxGetBaseLinePos)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } + unsafe { (windows_core::Interface::vtable(self).TxGetBaseLinePos)(windows_core::Interface::as_raw(self), param0 as _).ok() } } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] 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<()> { - unsafe { (windows_core::Interface::vtable(self).TxGetNaturalSize)(windows_core::Interface::as_raw(self), dwaspect, hdcdraw, hictargetdev, core::mem::transmute(ptd), dwmode, psizelextent, core::mem::transmute(pwidth), core::mem::transmute(pheight)).ok() } + unsafe { (windows_core::Interface::vtable(self).TxGetNaturalSize)(windows_core::Interface::as_raw(self), dwaspect, hdcdraw, hictargetdev, ptd as _, dwmode, psizelextent, pwidth as _, pheight as _).ok() } } #[cfg(feature = "Win32_System_Ole")] pub unsafe fn TxGetDropTarget(&self) -> windows_core::Result { @@ -9768,7 +9768,7 @@ impl ITextServices { unsafe { (windows_core::Interface::vtable(self).OnTxPropertyBitsChange)(windows_core::Interface::as_raw(self), dwmask, dwbits).ok() } } pub unsafe fn TxGetCachedSize(&self, pdwwidth: *mut u32, pdwheight: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TxGetCachedSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwwidth), core::mem::transmute(pdwheight)).ok() } + unsafe { (windows_core::Interface::vtable(self).TxGetCachedSize)(windows_core::Interface::as_raw(self), pdwwidth as _, pdwheight as _).ok() } } } #[repr(C)] @@ -9985,14 +9985,14 @@ windows_core::imp::interface_hierarchy!(ITextServices2, windows_core::IUnknown, impl ITextServices2 { #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] 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<()> { - unsafe { (windows_core::Interface::vtable(self).TxGetNaturalSize2)(windows_core::Interface::as_raw(self), dwaspect, hdcdraw, hictargetdev, core::mem::transmute(ptd), dwmode, psizelextent, core::mem::transmute(pwidth), core::mem::transmute(pheight), core::mem::transmute(pascent)).ok() } + unsafe { (windows_core::Interface::vtable(self).TxGetNaturalSize2)(windows_core::Interface::as_raw(self), dwaspect, hdcdraw, hictargetdev, ptd as _, dwmode, psizelextent, pwidth as _, pheight as _, pascent as _).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<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).TxDrawD2D)(windows_core::Interface::as_raw(self), prendertarget.param().abi(), core::mem::transmute(lprcbounds), core::mem::transmute(lprcupdate), lviewid).ok() } + unsafe { (windows_core::Interface::vtable(self).TxDrawD2D)(windows_core::Interface::as_raw(self), prendertarget.param().abi(), lprcbounds as _, lprcupdate as _, lviewid).ok() } } } #[repr(C)] 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 fcda5ca270..bab1686777 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Controls/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Controls/mod.rs @@ -6,13 +6,13 @@ pub mod RichEdit; #[inline] 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); - unsafe { BeginBufferedAnimation(hwnd, hdctarget, prctarget, dwformat, core::mem::transmute(ppaintparams.unwrap_or(core::mem::zeroed())), panimationparams, core::mem::transmute(phdcfrom), core::mem::transmute(phdcto)) } + unsafe { BeginBufferedAnimation(hwnd, hdctarget, prctarget, dwformat, ppaintparams.unwrap_or(core::mem::zeroed()) as _, panimationparams, phdcfrom as _, phdcto as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { BeginBufferedPaint(hdctarget, prctarget, dwformat, core::mem::transmute(ppaintparams.unwrap_or(core::mem::zeroed())), core::mem::transmute(phdc)) } + unsafe { BeginBufferedPaint(hdctarget, prctarget, dwformat, ppaintparams.unwrap_or(core::mem::zeroed()) as _, phdc as _) } } #[inline] pub unsafe fn BeginPanningFeedback(hwnd: super::super::Foundation::HWND) -> super::super::Foundation::BOOL { @@ -22,7 +22,7 @@ pub unsafe fn BeginPanningFeedback(hwnd: super::super::Foundation::HWND) -> supe #[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); - unsafe { BufferedPaintClear(hbufferedpaint, core::mem::transmute(prc.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { BufferedPaintClear(hbufferedpaint, prc.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn BufferedPaintInit() -> windows_core::Result<()> { @@ -38,7 +38,7 @@ pub unsafe fn BufferedPaintRenderAnimation(hwnd: super::super::Foundation::HWND, #[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); - unsafe { BufferedPaintSetAlpha(hbufferedpaint, core::mem::transmute(prc.unwrap_or(core::mem::zeroed())), alpha).ok() } + unsafe { BufferedPaintSetAlpha(hbufferedpaint, prc.unwrap_or(core::mem::zeroed()) as _, alpha).ok() } } #[inline] pub unsafe fn BufferedPaintStopAllAnimations(hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { @@ -69,20 +69,20 @@ pub unsafe fn CloseThemeData(htheme: HTHEME) -> windows_core::Result<()> { #[inline] 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__ = unsafe { CreateMappedBitmap(hinstance, idbitmap, wflags, core::mem::transmute(lpcolormap.unwrap_or(core::mem::zeroed())), inummaps) }; + let result__ = unsafe { CreateMappedBitmap(hinstance, idbitmap, wflags, lpcolormap.unwrap_or(core::mem::zeroed()) as _, 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"))] #[inline] pub unsafe fn CreatePropertySheetPageA(constpropsheetpagepointer: *mut PROPSHEETPAGEA) -> HPROPSHEETPAGE { windows_targets::link!("comctl32.dll" "system" fn CreatePropertySheetPageA(constpropsheetpagepointer : *mut PROPSHEETPAGEA) -> HPROPSHEETPAGE); - unsafe { CreatePropertySheetPageA(core::mem::transmute(constpropsheetpagepointer)) } + unsafe { CreatePropertySheetPageA(constpropsheetpagepointer as _) } } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] pub unsafe fn CreatePropertySheetPageW(constpropsheetpagepointer: *mut PROPSHEETPAGEW) -> HPROPSHEETPAGE { windows_targets::link!("comctl32.dll" "system" fn CreatePropertySheetPageW(constpropsheetpagepointer : *mut PROPSHEETPAGEW) -> HPROPSHEETPAGE); - unsafe { CreatePropertySheetPageW(core::mem::transmute(constpropsheetpagepointer)) } + unsafe { CreatePropertySheetPageW(constpropsheetpagepointer as _) } } #[inline] pub unsafe fn CreateStatusWindowA(style: i32, lpsztext: P1, hwndparent: super::super::Foundation::HWND, wid: u32) -> windows_core::Result @@ -112,7 +112,7 @@ pub unsafe fn CreateSyntheticPointerDevice(pointertype: super::WindowsAndMessagi #[inline] 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__ = unsafe { CreateToolbarEx(hwnd, ws, wid, nbitmaps, hbminst, wbmid, core::mem::transmute(lpbuttons), inumbuttons, dxbutton, dybutton, dxbitmap, dybitmap, ustructsize) }; + let result__ = unsafe { CreateToolbarEx(hwnd, ws, wid, nbitmaps, hbminst, wbmid, lpbuttons as _, inumbuttons, dxbutton, dybutton, dxbitmap, dybitmap, ustructsize) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -123,7 +123,7 @@ pub unsafe fn CreateUpDownControl(dwstyle: u32, x: i32, y: i32, cx: i32, cy: i32 #[inline] pub unsafe fn DPA_Clone(hdpa: HDPA, hdpanew: Option) -> HDPA { windows_targets::link!("comctl32.dll" "system" fn DPA_Clone(hdpa : HDPA, hdpanew : HDPA) -> HDPA); - unsafe { DPA_Clone(hdpa, core::mem::transmute(hdpanew.unwrap_or(core::mem::zeroed()))) } + unsafe { DPA_Clone(hdpa, hdpanew.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn DPA_Create(citemgrow: i32) -> HDPA { @@ -133,7 +133,7 @@ pub unsafe fn DPA_Create(citemgrow: i32) -> HDPA { #[inline] 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); - unsafe { DPA_CreateEx(cpgrow, core::mem::transmute(hheap.unwrap_or(core::mem::zeroed()))) } + unsafe { DPA_CreateEx(cpgrow, hheap.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn DPA_DeleteAllPtrs(hdpa: HDPA) -> super::super::Foundation::BOOL { @@ -148,17 +148,17 @@ pub unsafe fn DPA_DeletePtr(hdpa: HDPA, i: i32) -> *mut core::ffi::c_void { #[inline] 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); - unsafe { DPA_Destroy(core::mem::transmute(hdpa.unwrap_or(core::mem::zeroed()))) } + unsafe { DPA_Destroy(hdpa.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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)); - unsafe { DPA_DestroyCallback(core::mem::transmute(hdpa.unwrap_or(core::mem::zeroed())), pfncb, core::mem::transmute(pdata.unwrap_or(core::mem::zeroed()))) } + unsafe { DPA_DestroyCallback(hdpa.unwrap_or(core::mem::zeroed()) as _, pfncb, pdata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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)); - unsafe { 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()))) } + unsafe { DPA_EnumCallback(hdpa.unwrap_or(core::mem::zeroed()) as _, pfncb.unwrap_or(core::mem::zeroed()) as _, pdata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn DPA_GetPtr(hdpa: HDPA, i: isize) -> *mut core::ffi::c_void { @@ -168,12 +168,12 @@ pub unsafe fn DPA_GetPtr(hdpa: HDPA, i: isize) -> *mut core::ffi::c_void { #[inline] 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); - unsafe { DPA_GetPtrIndex(hdpa, core::mem::transmute(p.unwrap_or(core::mem::zeroed()))) } + unsafe { DPA_GetPtrIndex(hdpa, p.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn DPA_GetSize(hdpa: Option) -> u64 { windows_targets::link!("comctl32.dll" "system" fn DPA_GetSize(hdpa : HDPA) -> u64); - unsafe { DPA_GetSize(core::mem::transmute(hdpa.unwrap_or(core::mem::zeroed()))) } + unsafe { DPA_GetSize(hdpa.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn DPA_Grow(pdpa: HDPA, cp: i32) -> super::super::Foundation::BOOL { @@ -183,7 +183,7 @@ pub unsafe fn DPA_Grow(pdpa: HDPA, cp: i32) -> super::super::Foundation::BOOL { #[inline] 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); - unsafe { DPA_InsertPtr(hdpa, i, core::mem::transmute(p.unwrap_or(core::mem::zeroed()))) } + unsafe { DPA_InsertPtr(hdpa, i, p.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -192,7 +192,7 @@ 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); - unsafe { DPA_LoadStream(core::mem::transmute(phdpa), pfn, pstream.param().abi(), core::mem::transmute(pvinstdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DPA_LoadStream(phdpa as _, pfn, pstream.param().abi(), pvinstdata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn DPA_Merge(hdpadest: HDPA, hdpasrc: HDPA, dwflags: u32, pfncompare: PFNDACOMPARE, pfnmerge: PFNDPAMERGE, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::BOOL { @@ -206,17 +206,17 @@ where 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); - unsafe { DPA_SaveStream(hdpa, pfn, pstream.param().abi(), core::mem::transmute(pvinstdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DPA_SaveStream(hdpa, pfn, pstream.param().abi(), pvinstdata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { DPA_Search(hdpa, core::mem::transmute(pfind.unwrap_or(core::mem::zeroed())), istart, pfncompare, lparam, options) } + unsafe { DPA_Search(hdpa, pfind.unwrap_or(core::mem::zeroed()) as _, istart, pfncompare, lparam, options) } } #[inline] 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); - unsafe { DPA_SetPtr(hdpa, i, core::mem::transmute(p.unwrap_or(core::mem::zeroed()))) } + unsafe { DPA_SetPtr(hdpa, i, p.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn DPA_Sort(hdpa: HDPA, pfncompare: PFNDACOMPARE, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::BOOL { @@ -246,22 +246,22 @@ pub unsafe fn DSA_DeleteItem(hdsa: HDSA, i: i32) -> super::super::Foundation::BO #[inline] 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); - unsafe { DSA_Destroy(core::mem::transmute(hdsa.unwrap_or(core::mem::zeroed()))) } + unsafe { DSA_Destroy(hdsa.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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)); - unsafe { DSA_DestroyCallback(core::mem::transmute(hdsa.unwrap_or(core::mem::zeroed())), pfncb, core::mem::transmute(pdata.unwrap_or(core::mem::zeroed()))) } + unsafe { DSA_DestroyCallback(hdsa.unwrap_or(core::mem::zeroed()) as _, pfncb, pdata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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)); - unsafe { DSA_EnumCallback(hdsa, pfncb, core::mem::transmute(pdata.unwrap_or(core::mem::zeroed()))) } + unsafe { DSA_EnumCallback(hdsa, pfncb, pdata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { DSA_GetItem(hdsa, i, core::mem::transmute(pitem)) } + unsafe { DSA_GetItem(hdsa, i, pitem as _) } } #[inline] pub unsafe fn DSA_GetItemPtr(hdsa: HDSA, i: i32) -> *mut core::ffi::c_void { @@ -271,7 +271,7 @@ pub unsafe fn DSA_GetItemPtr(hdsa: HDSA, i: i32) -> *mut core::ffi::c_void { #[inline] pub unsafe fn DSA_GetSize(hdsa: Option) -> u64 { windows_targets::link!("comctl32.dll" "system" fn DSA_GetSize(hdsa : HDSA) -> u64); - unsafe { DSA_GetSize(core::mem::transmute(hdsa.unwrap_or(core::mem::zeroed()))) } + unsafe { DSA_GetSize(hdsa.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn DSA_InsertItem(hdsa: HDSA, i: i32, pitem: *const core::ffi::c_void) -> i32 { @@ -356,7 +356,7 @@ where 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)); - unsafe { DrawStatusTextA(hdc, core::mem::transmute(lprc), psztext.param().abi(), uflags) } + unsafe { DrawStatusTextA(hdc, lprc as _, psztext.param().abi(), uflags) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -365,25 +365,25 @@ where 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)); - unsafe { DrawStatusTextW(hdc, core::mem::transmute(lprc), psztext.param().abi(), uflags) } + unsafe { DrawStatusTextW(hdc, lprc as _, psztext.param().abi(), uflags) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { DrawThemeBackground(htheme, hdc, ipartid, istateid, prect, core::mem::transmute(pcliprect.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DrawThemeBackground(htheme, hdc, ipartid, istateid, prect, pcliprect.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { DrawThemeBackgroundEx(htheme, hdc, ipartid, istateid, prect, core::mem::transmute(poptions.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DrawThemeBackgroundEx(htheme, hdc, ipartid, istateid, prect, poptions.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { DrawThemeEdge(htheme, hdc, ipartid, istateid, pdestrect, uedge, uflags, core::mem::transmute(pcontentrect.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DrawThemeEdge(htheme, hdc, ipartid, istateid, pdestrect, uedge, uflags, pcontentrect.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -395,13 +395,13 @@ pub unsafe fn DrawThemeIcon(htheme: HTHEME, hdc: super::super::Graphics::Gdi::HD #[inline] 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); - unsafe { DrawThemeParentBackground(hwnd, hdc, core::mem::transmute(prc.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DrawThemeParentBackground(hwnd, hdc, prc.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { DrawThemeParentBackgroundEx(hwnd, hdc, dwflags, core::mem::transmute(prc.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DrawThemeParentBackgroundEx(hwnd, hdc, dwflags, prc.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -413,7 +413,7 @@ pub unsafe fn DrawThemeText(htheme: HTHEME, hdc: super::super::Graphics::Gdi::HD #[inline] 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); - unsafe { DrawThemeTextEx(htheme, hdc, ipartid, istateid, core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap(), dwtextflags, core::mem::transmute(prect), core::mem::transmute(poptions.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { DrawThemeTextEx(htheme, hdc, ipartid, istateid, core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap(), dwtextflags, prect as _, poptions.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn EnableScrollBar(hwnd: super::super::Foundation::HWND, wsbflags: u32, warrows: ENABLE_SCROLL_BAR_ARROWS) -> windows_core::Result<()> { @@ -448,12 +448,12 @@ pub unsafe fn EndPanningFeedback(hwnd: super::super::Foundation::HWND, fanimateb #[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<()> { windows_targets::link!("user32.dll" "system" fn EvaluateProximityToPolygon(numvertices : u32, controlpolygon : *const super::super::Foundation:: POINT, phittestinginput : *const TOUCH_HIT_TESTING_INPUT, pproximityeval : *mut TOUCH_HIT_TESTING_PROXIMITY_EVALUATION) -> super::super::Foundation:: BOOL); - unsafe { EvaluateProximityToPolygon(controlpolygon.len().try_into().unwrap(), core::mem::transmute(controlpolygon.as_ptr()), phittestinginput, core::mem::transmute(pproximityeval)).ok() } + unsafe { EvaluateProximityToPolygon(controlpolygon.len().try_into().unwrap(), core::mem::transmute(controlpolygon.as_ptr()), phittestinginput, pproximityeval as _).ok() } } #[inline] pub unsafe fn EvaluateProximityToRect(controlboundingbox: *const super::super::Foundation::RECT, phittestinginput: *const TOUCH_HIT_TESTING_INPUT, pproximityeval: *mut TOUCH_HIT_TESTING_PROXIMITY_EVALUATION) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn EvaluateProximityToRect(controlboundingbox : *const super::super::Foundation:: RECT, phittestinginput : *const TOUCH_HIT_TESTING_INPUT, pproximityeval : *mut TOUCH_HIT_TESTING_PROXIMITY_EVALUATION) -> super::super::Foundation:: BOOL); - unsafe { EvaluateProximityToRect(controlboundingbox, phittestinginput, core::mem::transmute(pproximityeval)).ok() } + unsafe { EvaluateProximityToRect(controlboundingbox, phittestinginput, pproximityeval as _).ok() } } #[inline] pub unsafe fn FlatSB_EnableScrollBar(param0: super::super::Foundation::HWND, param1: i32, param2: u32) -> super::super::Foundation::BOOL { @@ -464,7 +464,7 @@ pub unsafe fn FlatSB_EnableScrollBar(param0: super::super::Foundation::HWND, par #[inline] 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); - unsafe { FlatSB_GetScrollInfo(param0, code, core::mem::transmute(param2)) } + unsafe { FlatSB_GetScrollInfo(param0, code, param2 as _) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -475,19 +475,19 @@ pub unsafe fn FlatSB_GetScrollPos(param0: super::super::Foundation::HWND, code: #[inline] 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); - unsafe { FlatSB_GetScrollProp(param0, propindex, core::mem::transmute(param2)) } + unsafe { FlatSB_GetScrollProp(param0, propindex, param2 as _) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] 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); - unsafe { FlatSB_GetScrollRange(param0, code, core::mem::transmute(param2), core::mem::transmute(param3)) } + unsafe { FlatSB_GetScrollRange(param0, code, param2 as _, param3 as _) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] pub unsafe fn FlatSB_SetScrollInfo(param0: super::super::Foundation::HWND, code: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, psi: *mut super::WindowsAndMessaging::SCROLLINFO, fredraw: bool) -> i32 { 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); - unsafe { FlatSB_SetScrollInfo(param0, code, core::mem::transmute(psi), fredraw.into()) } + unsafe { FlatSB_SetScrollInfo(param0, code, psi as _, fredraw.into()) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -516,7 +516,7 @@ pub unsafe fn FlatSB_ShowScrollBar(param0: super::super::Foundation::HWND, code: #[inline] pub unsafe fn GetBufferedPaintBits(hbufferedpaint: isize, ppbbuffer: *mut *mut super::super::Graphics::Gdi::RGBQUAD, pcxrow: *mut i32) -> windows_core::Result<()> { windows_targets::link!("uxtheme.dll" "system" fn GetBufferedPaintBits(hbufferedpaint : isize, ppbbuffer : *mut *mut super::super::Graphics::Gdi:: RGBQUAD, pcxrow : *mut i32) -> windows_core::HRESULT); - unsafe { GetBufferedPaintBits(hbufferedpaint, core::mem::transmute(ppbbuffer), core::mem::transmute(pcxrow)).ok() } + unsafe { GetBufferedPaintBits(hbufferedpaint, ppbbuffer as _, pcxrow as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -541,7 +541,7 @@ pub unsafe fn GetBufferedPaintTargetRect(hbufferedpaint: isize) -> windows_core: #[inline] 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); - unsafe { GetComboBoxInfo(hwndcombo, core::mem::transmute(pcbi)).ok() } + unsafe { GetComboBoxInfo(hwndcombo, pcbi as _).ok() } } #[inline] pub unsafe fn GetCurrentThemeName(pszthemefilename: &mut [u16], pszcolorbuff: Option<&mut [u16]>, pszsizebuff: Option<&mut [u16]>) -> windows_core::Result<()> { @@ -551,7 +551,7 @@ pub unsafe fn GetCurrentThemeName(pszthemefilename: &mut [u16], pszcolorbuff: Op #[inline] 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)); - unsafe { GetEffectiveClientRect(hwnd, core::mem::transmute(lprc), lpinfo) } + unsafe { GetEffectiveClientRect(hwnd, lprc as _, lpinfo) } } #[inline] pub unsafe fn GetListBoxInfo(hwnd: super::super::Foundation::HWND) -> u32 { @@ -566,12 +566,12 @@ pub unsafe fn GetMUILanguage() -> u16 { #[inline] 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); - unsafe { GetThemeAnimationProperty(htheme, istoryboardid, itargetid, eproperty, core::mem::transmute(pvproperty.unwrap_or(core::mem::zeroed())), cbsize, core::mem::transmute(pcbsizeout)).ok() } + unsafe { GetThemeAnimationProperty(htheme, istoryboardid, itargetid, eproperty, pvproperty.unwrap_or(core::mem::zeroed()) as _, cbsize, pcbsizeout as _).ok() } } #[inline] 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); - unsafe { GetThemeAnimationTransform(htheme, istoryboardid, itargetid, dwtransformindex, core::mem::transmute(ptransform.unwrap_or(core::mem::zeroed())), cbsize, core::mem::transmute(pcbsizeout)).ok() } + unsafe { GetThemeAnimationTransform(htheme, istoryboardid, itargetid, dwtransformindex, ptransform.unwrap_or(core::mem::zeroed()) as _, cbsize, pcbsizeout as _).ok() } } #[inline] pub unsafe fn GetThemeAppProperties() -> SET_THEME_APP_PROPERTIES_FLAGS { @@ -584,7 +584,7 @@ pub unsafe fn GetThemeBackgroundContentRect(htheme: HTHEME, hdc: Option windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - GetThemeBackgroundContentRect(htheme, core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), ipartid, istateid, pboundingrect, &mut result__).map(|| core::mem::transmute(result__)) + GetThemeBackgroundContentRect(htheme, hdc.unwrap_or(core::mem::zeroed()) as _, ipartid, istateid, pboundingrect, &mut result__).map(|| core::mem::transmute(result__)) } } #[cfg(feature = "Win32_Graphics_Gdi")] @@ -593,7 +593,7 @@ pub unsafe fn GetThemeBackgroundExtent(htheme: HTHEME, hdc: Option windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - GetThemeBackgroundExtent(htheme, core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), ipartid, istateid, pcontentrect, &mut result__).map(|| core::mem::transmute(result__)) + GetThemeBackgroundExtent(htheme, hdc.unwrap_or(core::mem::zeroed()) as _, ipartid, istateid, pcontentrect, &mut result__).map(|| core::mem::transmute(result__)) } } #[cfg(feature = "Win32_Graphics_Gdi")] @@ -602,7 +602,7 @@ pub unsafe fn GetThemeBackgroundRegion(htheme: HTHEME, hdc: Option windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - GetThemeBackgroundRegion(htheme, core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), ipartid, istateid, prect, &mut result__).map(|| core::mem::transmute(result__)) + GetThemeBackgroundRegion(htheme, hdc.unwrap_or(core::mem::zeroed()) as _, ipartid, istateid, prect, &mut result__).map(|| core::mem::transmute(result__)) } } #[cfg(feature = "Win32_Graphics_Gdi")] @@ -656,7 +656,7 @@ pub unsafe fn GetThemeFilename(htheme: HTHEME, ipartid: i32, istateid: i32, ipro #[inline] 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); - unsafe { GetThemeFont(htheme, core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), ipartid, istateid, ipropid, core::mem::transmute(pfont)).ok() } + unsafe { GetThemeFont(htheme, hdc.unwrap_or(core::mem::zeroed()) as _, ipartid, istateid, ipropid, pfont as _).ok() } } #[inline] pub unsafe fn GetThemeInt(htheme: HTHEME, ipartid: i32, istateid: i32, ipropid: THEME_PROPERTY_SYMBOL_ID) -> windows_core::Result { @@ -669,7 +669,7 @@ pub unsafe fn GetThemeInt(htheme: HTHEME, ipartid: i32, istateid: i32, ipropid: #[inline] 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); - unsafe { GetThemeIntList(htheme, ipartid, istateid, ipropid.0 as _, core::mem::transmute(pintlist)).ok() } + unsafe { GetThemeIntList(htheme, ipartid, istateid, ipropid.0 as _, pintlist as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -677,7 +677,7 @@ pub unsafe fn GetThemeMargins(htheme: HTHEME, hdc: Option windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - GetThemeMargins(htheme, core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), ipartid, istateid, ipropid.0 as _, core::mem::transmute(prc.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + GetThemeMargins(htheme, hdc.unwrap_or(core::mem::zeroed()) as _, ipartid, istateid, ipropid.0 as _, prc.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[cfg(feature = "Win32_Graphics_Gdi")] @@ -686,7 +686,7 @@ pub unsafe fn GetThemeMetric(htheme: HTHEME, hdc: Option windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - GetThemeMetric(htheme, core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), ipartid, istateid, ipropid.0 as _, &mut result__).map(|| core::mem::transmute(result__)) + GetThemeMetric(htheme, hdc.unwrap_or(core::mem::zeroed()) as _, ipartid, istateid, ipropid.0 as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[cfg(feature = "Win32_Graphics_Gdi")] @@ -695,7 +695,7 @@ pub unsafe fn GetThemePartSize(htheme: HTHEME, hdc: Option windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - GetThemePartSize(htheme, core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), ipartid, istateid, core::mem::transmute(prc.unwrap_or(core::mem::zeroed())), esize, &mut result__).map(|| core::mem::transmute(result__)) + GetThemePartSize(htheme, hdc.unwrap_or(core::mem::zeroed()) as _, ipartid, istateid, prc.unwrap_or(core::mem::zeroed()) as _, esize, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -725,7 +725,7 @@ pub unsafe fn GetThemeRect(htheme: HTHEME, ipartid: i32, istateid: i32, ipropid: #[inline] 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); - unsafe { GetThemeStream(htheme, ipartid, istateid, ipropid, core::mem::transmute(ppvstream), core::mem::transmute(pcbstream.unwrap_or(core::mem::zeroed())), core::mem::transmute(hinst.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { GetThemeStream(htheme, ipartid, istateid, ipropid, ppvstream as _, pcbstream.unwrap_or(core::mem::zeroed()) as _, hinst.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn GetThemeString(htheme: HTHEME, ipartid: i32, istateid: i32, ipropid: i32, pszbuff: &mut [u16]) -> windows_core::Result<()> { @@ -735,24 +735,24 @@ pub unsafe fn GetThemeString(htheme: HTHEME, ipartid: i32, istateid: i32, ipropi #[inline] 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); - unsafe { GetThemeSysBool(core::mem::transmute(htheme.unwrap_or(core::mem::zeroed())), iboolid.0 as _) } + unsafe { GetThemeSysBool(htheme.unwrap_or(core::mem::zeroed()) as _, iboolid.0 as _) } } #[inline] 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); - unsafe { GetThemeSysColor(core::mem::transmute(htheme.unwrap_or(core::mem::zeroed())), icolorid) } + unsafe { GetThemeSysColor(htheme.unwrap_or(core::mem::zeroed()) as _, icolorid) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { GetThemeSysColorBrush(core::mem::transmute(htheme.unwrap_or(core::mem::zeroed())), icolorid.0 as _) } + unsafe { GetThemeSysColorBrush(htheme.unwrap_or(core::mem::zeroed()) as _, icolorid.0 as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { GetThemeSysFont(core::mem::transmute(htheme.unwrap_or(core::mem::zeroed())), ifontid.0 as _, core::mem::transmute(plf)).ok() } + unsafe { GetThemeSysFont(htheme.unwrap_or(core::mem::zeroed()) as _, ifontid.0 as _, plf as _).ok() } } #[inline] pub unsafe fn GetThemeSysInt(htheme: HTHEME, iintid: THEME_PROPERTY_SYMBOL_ID) -> windows_core::Result { @@ -765,7 +765,7 @@ pub unsafe fn GetThemeSysInt(htheme: HTHEME, iintid: THEME_PROPERTY_SYMBOL_ID) - #[inline] pub unsafe fn GetThemeSysSize(htheme: Option, isizeid: i32) -> i32 { windows_targets::link!("uxtheme.dll" "system" fn GetThemeSysSize(htheme : HTHEME, isizeid : i32) -> i32); - unsafe { GetThemeSysSize(core::mem::transmute(htheme.unwrap_or(core::mem::zeroed())), isizeid) } + unsafe { GetThemeSysSize(htheme.unwrap_or(core::mem::zeroed()) as _, isizeid) } } #[inline] pub unsafe fn GetThemeSysString(htheme: HTHEME, istringid: THEME_PROPERTY_SYMBOL_ID, pszstringbuff: &mut [u16]) -> windows_core::Result<()> { @@ -778,19 +778,19 @@ pub unsafe fn GetThemeTextExtent(htheme: HTHEME, hdc: super::super::Graphics::Gd 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); unsafe { let mut result__ = core::mem::zeroed(); - GetThemeTextExtent(htheme, hdc, ipartid, istateid, core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap(), dwtextflags, core::mem::transmute(pboundingrect.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + GetThemeTextExtent(htheme, hdc, ipartid, istateid, core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap(), dwtextflags, pboundingrect.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { GetThemeTextMetrics(htheme, hdc, ipartid, istateid, core::mem::transmute(ptm)).ok() } + unsafe { GetThemeTextMetrics(htheme, hdc, ipartid, istateid, ptm as _).ok() } } #[inline] 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); - unsafe { GetThemeTimingFunction(htheme, itimingfunctionid, core::mem::transmute(ptimingfunction.unwrap_or(core::mem::zeroed())), cbsize, core::mem::transmute(pcbsizeout)).ok() } + unsafe { GetThemeTimingFunction(htheme, itimingfunctionid, ptimingfunction.unwrap_or(core::mem::zeroed()) as _, cbsize, pcbsizeout as _).ok() } } #[inline] pub unsafe fn GetThemeTransitionDuration(htheme: HTHEME, ipartid: i32, istateidfrom: i32, istateidto: i32, ipropid: i32) -> windows_core::Result { @@ -803,7 +803,7 @@ pub unsafe fn GetThemeTransitionDuration(htheme: HTHEME, ipartid: i32, istateidf #[inline] 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); - unsafe { GetWindowFeedbackSetting(hwnd, feedback, dwflags, core::mem::transmute(psize), core::mem::transmute(config.unwrap_or(core::mem::zeroed()))) } + unsafe { GetWindowFeedbackSetting(hwnd, feedback, dwflags, psize as _, config.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GetWindowTheme(hwnd: super::super::Foundation::HWND) -> HTHEME { @@ -813,7 +813,7 @@ pub unsafe fn GetWindowTheme(hwnd: super::super::Foundation::HWND) -> HTHEME { #[inline] 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); - unsafe { HIMAGELIST_QueryInterface(himl, riid, core::mem::transmute(ppv)).ok() } + unsafe { HIMAGELIST_QueryInterface(himl, riid, ppv as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -821,14 +821,14 @@ pub unsafe fn HitTestThemeBackground(htheme: HTHEME, hdc: Option windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - HitTestThemeBackground(htheme, core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), ipartid, istateid, dwoptions, prect, core::mem::transmute(hrgn.unwrap_or(core::mem::zeroed())), core::mem::transmute(pttest), &mut result__).map(|| core::mem::transmute(result__)) + HitTestThemeBackground(htheme, hdc.unwrap_or(core::mem::zeroed()) as _, ipartid, istateid, dwoptions, prect, hrgn.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pttest), &mut result__).map(|| core::mem::transmute(result__)) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { ImageList_Add(himl, hbmimage, core::mem::transmute(hbmmask.unwrap_or(core::mem::zeroed()))) } + unsafe { ImageList_Add(himl, hbmimage, hbmmask.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -864,7 +864,7 @@ pub unsafe fn ImageList_Create(cx: i32, cy: i32, flags: IMAGELIST_CREATION_FLAGS #[inline] 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); - unsafe { ImageList_Destroy(core::mem::transmute(himl.unwrap_or(core::mem::zeroed()))) } + unsafe { ImageList_Destroy(himl.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ImageList_DragEnter(hwndlock: super::super::Foundation::HWND, x: i32, y: i32) -> super::super::Foundation::BOOL { @@ -922,7 +922,7 @@ pub unsafe fn ImageList_GetBkColor(himl: HIMAGELIST) -> super::super::Foundation #[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); - unsafe { ImageList_GetDragImage(core::mem::transmute(ppt.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppthotspot.unwrap_or(core::mem::zeroed()))) } + unsafe { ImageList_GetDragImage(ppt.unwrap_or(core::mem::zeroed()) as _, ppthotspot.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -933,7 +933,7 @@ pub unsafe fn ImageList_GetIcon(himl: HIMAGELIST, i: i32, flags: IMAGE_LIST_DRAW #[inline] 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); - unsafe { ImageList_GetIconSize(himl, core::mem::transmute(cx.unwrap_or(core::mem::zeroed())), core::mem::transmute(cy.unwrap_or(core::mem::zeroed()))) } + unsafe { ImageList_GetIconSize(himl, cx.unwrap_or(core::mem::zeroed()) as _, cy.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ImageList_GetImageCount(himl: HIMAGELIST) -> i32 { @@ -944,7 +944,7 @@ pub unsafe fn ImageList_GetImageCount(himl: HIMAGELIST) -> i32 { #[inline] 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); - unsafe { ImageList_GetImageInfo(himl, i, core::mem::transmute(pimageinfo)) } + unsafe { ImageList_GetImageInfo(himl, i, pimageinfo as _) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -985,7 +985,7 @@ where P1: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn ImageList_ReadEx(dwflags : u32, pstm : * mut core::ffi::c_void, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { ImageList_ReadEx(dwflags, pstm.param().abi(), riid, core::mem::transmute(ppv)).ok() } + unsafe { ImageList_ReadEx(dwflags, pstm.param().abi(), riid, ppv as _).ok() } } #[inline] pub unsafe fn ImageList_Remove(himl: HIMAGELIST, i: i32) -> super::super::Foundation::BOOL { @@ -996,7 +996,7 @@ pub unsafe fn ImageList_Remove(himl: HIMAGELIST, i: i32) -> super::super::Founda #[inline] 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); - unsafe { ImageList_Replace(himl, i, hbmimage, core::mem::transmute(hbmmask.unwrap_or(core::mem::zeroed()))) } + unsafe { ImageList_Replace(himl, i, hbmimage, hbmmask.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -1121,7 +1121,7 @@ where 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); unsafe { let mut result__ = core::mem::zeroed(); - LoadIconMetric(core::mem::transmute(hinst.unwrap_or(core::mem::zeroed())), pszname.param().abi(), lims, &mut result__).map(|| core::mem::transmute(result__)) + LoadIconMetric(hinst.unwrap_or(core::mem::zeroed()) as _, pszname.param().abi(), lims, &mut result__).map(|| core::mem::transmute(result__)) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] @@ -1133,7 +1133,7 @@ where 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); unsafe { let mut result__ = core::mem::zeroed(); - LoadIconWithScaleDown(core::mem::transmute(hinst.unwrap_or(core::mem::zeroed())), pszname.param().abi(), cx, cy, &mut result__).map(|| core::mem::transmute(result__)) + LoadIconWithScaleDown(hinst.unwrap_or(core::mem::zeroed()) as _, pszname.param().abi(), cx, cy, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -1153,7 +1153,7 @@ where P1: windows_core::Param, { windows_targets::link!("uxtheme.dll" "system" fn OpenThemeData(hwnd : super::super::Foundation:: HWND, pszclasslist : windows_core::PCWSTR) -> HTHEME); - unsafe { OpenThemeData(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pszclasslist.param().abi()) } + unsafe { OpenThemeData(hwnd.unwrap_or(core::mem::zeroed()) as _, pszclasslist.param().abi()) } } #[inline] pub unsafe fn OpenThemeDataEx(hwnd: Option, pszclasslist: P1, dwflags: OPEN_THEME_DATA_FLAGS) -> HTHEME @@ -1161,7 +1161,7 @@ where 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); - unsafe { OpenThemeDataEx(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pszclasslist.param().abi(), dwflags) } + unsafe { OpenThemeDataEx(hwnd.unwrap_or(core::mem::zeroed()) as _, pszclasslist.param().abi(), dwflags) } } #[inline] pub unsafe fn PackTouchHitTestingProximityEvaluation(phittestinginput: *const TOUCH_HIT_TESTING_INPUT, pproximityeval: *const TOUCH_HIT_TESTING_PROXIMITY_EVALUATION) -> super::super::Foundation::LRESULT { @@ -1172,13 +1172,13 @@ pub unsafe fn PackTouchHitTestingProximityEvaluation(phittestinginput: *const TO #[inline] pub unsafe fn PropertySheetA(param0: *mut PROPSHEETHEADERA_V2) -> isize { windows_targets::link!("comctl32.dll" "system" fn PropertySheetA(param0 : *mut PROPSHEETHEADERA_V2) -> isize); - unsafe { PropertySheetA(core::mem::transmute(param0)) } + unsafe { PropertySheetA(param0 as _) } } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] pub unsafe fn PropertySheetW(param0: *mut PROPSHEETHEADERW_V2) -> isize { windows_targets::link!("comctl32.dll" "system" fn PropertySheetW(param0 : *mut PROPSHEETHEADERW_V2) -> isize); - unsafe { PropertySheetW(core::mem::transmute(param0)) } + unsafe { PropertySheetW(param0 as _) } } #[inline] pub unsafe fn RegisterPointerDeviceNotifications(window: super::super::Foundation::HWND, notifyrange: bool) -> windows_core::Result<()> { @@ -1216,7 +1216,7 @@ pub unsafe fn SetThemeAppProperties(dwflags: SET_THEME_APP_PROPERTIES_FLAGS) { #[inline] 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); - unsafe { SetWindowFeedbackSetting(hwnd, feedback, dwflags, size, core::mem::transmute(configuration.unwrap_or(core::mem::zeroed()))) } + unsafe { SetWindowFeedbackSetting(hwnd, feedback, dwflags, size, configuration.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SetWindowTheme(hwnd: super::super::Foundation::HWND, pszsubappname: P1, pszsubidlist: P2) -> windows_core::Result<()> @@ -1249,7 +1249,7 @@ where P1: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn Str_SetPtrW(ppsz : *mut windows_core::PWSTR, psz : windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - unsafe { Str_SetPtrW(core::mem::transmute(ppsz), psz.param().abi()) } + unsafe { Str_SetPtrW(ppsz as _, psz.param().abi()) } } #[inline] 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<()> @@ -1260,13 +1260,13 @@ where 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); - unsafe { 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(), dwcommonbuttons, pszicon.param().abi(), core::mem::transmute(pnbutton.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { TaskDialog(hwndowner.unwrap_or(core::mem::zeroed()) as _, hinstance.unwrap_or(core::mem::zeroed()) as _, pszwindowtitle.param().abi(), pszmaininstruction.param().abi(), pszcontent.param().abi(), dwcommonbuttons, pszicon.param().abi(), pnbutton.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { TaskDialogIndirect(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() } + unsafe { TaskDialogIndirect(ptaskconfig, pnbutton.unwrap_or(core::mem::zeroed()) as _, pnradiobutton.unwrap_or(core::mem::zeroed()) as _, pfverificationflagchecked.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn UninitializeFlatSB(param0: super::super::Foundation::HWND) -> windows_core::Result<()> { @@ -3524,7 +3524,7 @@ impl IImageList { pub unsafe fn Add(&self, hbmimage: super::super::Graphics::Gdi::HBITMAP, hbmmask: Option) -> windows_core::Result { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).Add)(windows_core::Interface::as_raw(self), hbmimage, core::mem::transmute(hbmmask.unwrap_or(core::mem::zeroed())), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).Add)(windows_core::Interface::as_raw(self), hbmimage, hbmmask.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| result__) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] @@ -3539,7 +3539,7 @@ impl IImageList { } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn Replace(&self, i: i32, hbmimage: super::super::Graphics::Gdi::HBITMAP, hbmmask: Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Replace)(windows_core::Interface::as_raw(self), i, hbmimage, core::mem::transmute(hbmmask.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Replace)(windows_core::Interface::as_raw(self), i, hbmimage, hbmmask.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn AddMasked(&self, hbmimage: super::super::Graphics::Gdi::HBITMAP, crmask: super::super::Foundation::COLORREF) -> windows_core::Result { @@ -3564,7 +3564,7 @@ impl IImageList { } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetImageInfo(&self, i: i32, pimageinfo: *mut IMAGEINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetImageInfo)(windows_core::Interface::as_raw(self), i, core::mem::transmute(pimageinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetImageInfo)(windows_core::Interface::as_raw(self), i, pimageinfo as _).ok() } } pub unsafe fn Copy(&self, idst: i32, punksrc: P1, isrc: i32, uflags: u32) -> windows_core::Result<()> where @@ -3576,10 +3576,10 @@ impl IImageList { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Merge)(windows_core::Interface::as_raw(self), i1, punk2.param().abi(), i2, dx, dy, riid, core::mem::transmute(ppv)).ok() } + unsafe { (windows_core::Interface::vtable(self).Merge)(windows_core::Interface::as_raw(self), i1, punk2.param().abi(), i2, dx, dy, riid, ppv as _).ok() } } pub unsafe fn Clone(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(ppv)).ok() } + unsafe { (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), riid, ppv as _).ok() } } pub unsafe fn GetImageRect(&self, i: i32) -> windows_core::Result { unsafe { @@ -3588,7 +3588,7 @@ impl IImageList { } } pub unsafe fn GetIconSize(&self, cx: *mut i32, cy: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIconSize)(windows_core::Interface::as_raw(self), core::mem::transmute(cx), core::mem::transmute(cy)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIconSize)(windows_core::Interface::as_raw(self), cx as _, cy as _).ok() } } pub unsafe fn SetIconSize(&self, cx: i32, cy: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetIconSize)(windows_core::Interface::as_raw(self), cx, cy).ok() } @@ -3621,10 +3621,10 @@ impl IImageList { unsafe { (windows_core::Interface::vtable(self).EndDrag)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn DragEnter(&self, hwndlock: Option, x: i32, y: i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DragEnter)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndlock.unwrap_or(core::mem::zeroed())), x, y).ok() } + unsafe { (windows_core::Interface::vtable(self).DragEnter)(windows_core::Interface::as_raw(self), hwndlock.unwrap_or(core::mem::zeroed()) as _, x, y).ok() } } pub unsafe fn DragLeave(&self, hwndlock: Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DragLeave)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndlock.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).DragLeave)(windows_core::Interface::as_raw(self), hwndlock.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn DragMove(&self, x: i32, y: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DragMove)(windows_core::Interface::as_raw(self), x, y).ok() } @@ -3639,7 +3639,7 @@ impl IImageList { unsafe { (windows_core::Interface::vtable(self).DragShowNolock)(windows_core::Interface::as_raw(self), fshow.into()).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<()> { - unsafe { (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())), riid, core::mem::transmute(ppv)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDragImage)(windows_core::Interface::as_raw(self), ppt.unwrap_or(core::mem::zeroed()) as _, ppthotspot.unwrap_or(core::mem::zeroed()) as _, riid, ppv as _).ok() } } pub unsafe fn GetItemFlags(&self, i: i32) -> windows_core::Result { unsafe { @@ -4029,7 +4029,7 @@ impl IImageList2 { unsafe { (windows_core::Interface::vtable(self).Resize)(windows_core::Interface::as_raw(self), cxnewiconsize, cynewiconsize).ok() } } pub unsafe fn GetOriginalSize(&self, iimage: i32, dwflags: u32, pcx: *mut i32, pcy: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOriginalSize)(windows_core::Interface::as_raw(self), iimage, dwflags, core::mem::transmute(pcx), core::mem::transmute(pcy)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOriginalSize)(windows_core::Interface::as_raw(self), iimage, dwflags, pcx as _, pcy as _).ok() } } pub unsafe fn SetOriginalSize(&self, iimage: i32, cx: i32, cy: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetOriginalSize)(windows_core::Interface::as_raw(self), iimage, cx, cy).ok() } @@ -4041,7 +4041,7 @@ impl IImageList2 { unsafe { (windows_core::Interface::vtable(self).SetCallback)(windows_core::Interface::as_raw(self), punk.param().abi()).ok() } } pub unsafe fn GetCallback(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCallback)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(ppv)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCallback)(windows_core::Interface::as_raw(self), riid, ppv as _).ok() } } pub unsafe fn ForceImagePresent(&self, iimage: i32, dwflags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ForceImagePresent)(windows_core::Interface::as_raw(self), iimage, dwflags).ok() } @@ -4054,7 +4054,7 @@ impl IImageList2 { unsafe { (windows_core::Interface::vtable(self).PreloadImages)(windows_core::Interface::as_raw(self), pimldp).ok() } } pub unsafe fn GetStatistics(&self, pils: *mut IMAGELISTSTATS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStatistics)(windows_core::Interface::as_raw(self), core::mem::transmute(pils)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStatistics)(windows_core::Interface::as_raw(self), pils as _).ok() } } pub unsafe fn Initialize(&self, cx: i32, cy: i32, flags: IMAGELIST_CREATION_FLAGS, cinitial: i32, cgrow: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), cx, cy, flags, cinitial, cgrow).ok() } @@ -4064,7 +4064,7 @@ impl IImageList2 { where P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Replace2)(windows_core::Interface::as_raw(self), i, hbmimage, core::mem::transmute(hbmmask.unwrap_or(core::mem::zeroed())), punk.param().abi(), dwflags).ok() } + unsafe { (windows_core::Interface::vtable(self).Replace2)(windows_core::Interface::as_raw(self), i, hbmimage, hbmmask.unwrap_or(core::mem::zeroed()) as _, punk.param().abi(), 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 eb4e358aaa..458e26a089 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/HiDpi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/HiDpi/mod.rs @@ -2,7 +2,7 @@ #[inline] pub unsafe fn AdjustWindowRectExForDpi(lprect: *mut super::super::Foundation::RECT, dwstyle: super::WindowsAndMessaging::WINDOW_STYLE, bmenu: bool, dwexstyle: super::WindowsAndMessaging::WINDOW_EX_STYLE, dpi: u32) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn AdjustWindowRectExForDpi(lprect : *mut super::super::Foundation:: RECT, dwstyle : super::WindowsAndMessaging:: WINDOW_STYLE, bmenu : super::super::Foundation:: BOOL, dwexstyle : super::WindowsAndMessaging:: WINDOW_EX_STYLE, dpi : u32) -> super::super::Foundation:: BOOL); - unsafe { AdjustWindowRectExForDpi(core::mem::transmute(lprect), dwstyle, bmenu.into(), dwexstyle, dpi).ok() } + unsafe { AdjustWindowRectExForDpi(lprect as _, dwstyle, bmenu.into(), dwexstyle, dpi).ok() } } #[inline] pub unsafe fn AreDpiAwarenessContextsEqual(dpicontexta: DPI_AWARENESS_CONTEXT, dpicontextb: DPI_AWARENESS_CONTEXT) -> super::super::Foundation::BOOL { @@ -38,7 +38,7 @@ pub unsafe fn GetDpiAwarenessContextForProcess(hprocess: super::super::Foundatio #[inline] 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); - unsafe { GetDpiForMonitor(hmonitor, dpitype, core::mem::transmute(dpix), core::mem::transmute(dpiy)).ok() } + unsafe { GetDpiForMonitor(hmonitor, dpitype, dpix as _, dpiy as _).ok() } } #[inline] pub unsafe fn GetDpiForSystem() -> u32 { @@ -60,7 +60,7 @@ pub unsafe fn GetProcessDpiAwareness(hprocess: Option windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - GetProcessDpiAwareness(core::mem::transmute(hprocess.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + GetProcessDpiAwareness(hprocess.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -102,7 +102,7 @@ pub unsafe fn IsValidDpiAwarenessContext(value: DPI_AWARENESS_CONTEXT) -> super: #[inline] 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); - unsafe { LogicalToPhysicalPointForPerMonitorDPI(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(lppoint)) } + unsafe { LogicalToPhysicalPointForPerMonitorDPI(hwnd.unwrap_or(core::mem::zeroed()) as _, lppoint as _) } } #[cfg(feature = "Win32_UI_Controls")] #[inline] @@ -111,12 +111,12 @@ where 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); - unsafe { OpenThemeDataForDpi(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pszclasslist.param().abi(), dpi) } + unsafe { OpenThemeDataForDpi(hwnd.unwrap_or(core::mem::zeroed()) as _, pszclasslist.param().abi(), dpi) } } #[inline] 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); - unsafe { PhysicalToLogicalPointForPerMonitorDPI(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(lppoint)) } + unsafe { PhysicalToLogicalPointForPerMonitorDPI(hwnd.unwrap_or(core::mem::zeroed()) as _, lppoint as _) } } #[inline] pub unsafe fn SetDialogControlDpiChangeBehavior(hwnd: super::super::Foundation::HWND, mask: DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS, values: DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS) -> windows_core::Result<()> { @@ -151,7 +151,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); - unsafe { SystemParametersInfoForDpi(uiaction, uiparam, core::mem::transmute(pvparam.unwrap_or(core::mem::zeroed())), fwinini, dpi).ok() } + unsafe { SystemParametersInfoForDpi(uiaction, uiparam, pvparam.unwrap_or(core::mem::zeroed()) as _, fwinini, dpi).ok() } } pub const DCDC_DEFAULT: DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS = DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS(0i32); pub const DCDC_DISABLE_FONT_UPDATE: DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS = DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS(1i32); diff --git a/crates/libs/windows/src/Windows/Win32/UI/Input/Ime/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Input/Ime/mod.rs index 61b909fd71..356dff9db7 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 @@ -12,13 +12,13 @@ pub unsafe fn ImmAssociateContextEx(param0: super::super::super::Foundation::HWN #[inline] 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); - unsafe { ImmConfigureIMEA(param0, param1, param2, core::mem::transmute(param3)) } + unsafe { ImmConfigureIMEA(param0, param1, param2, param3 as _) } } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] #[inline] 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); - unsafe { ImmConfigureIMEW(param0, param1, param2, core::mem::transmute(param3)) } + unsafe { ImmConfigureIMEW(param0, param1, param2, param3 as _) } } #[inline] pub unsafe fn ImmCreateContext() -> HIMC { @@ -78,7 +78,7 @@ where 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); - unsafe { ImmEnumRegisterWordA(param0, param1, lpszreading.param().abi(), param3, lpszregister.param().abi(), core::mem::transmute(param5)) } + unsafe { ImmEnumRegisterWordA(param0, param1, lpszreading.param().abi(), param3, lpszregister.param().abi(), param5 as _) } } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] #[inline] @@ -88,19 +88,19 @@ where 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); - unsafe { ImmEnumRegisterWordW(param0, param1, lpszreading.param().abi(), param3, lpszregister.param().abi(), core::mem::transmute(param5)) } + unsafe { ImmEnumRegisterWordW(param0, param1, lpszreading.param().abi(), param3, lpszregister.param().abi(), param5 as _) } } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] #[inline] 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); - unsafe { ImmEscapeA(param0, param1, param2, core::mem::transmute(param3)) } + unsafe { ImmEscapeA(param0, param1, param2, param3 as _) } } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] #[inline] 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); - unsafe { ImmEscapeW(param0, param1, param2, core::mem::transmute(param3)) } + unsafe { ImmEscapeW(param0, param1, param2, param3 as _) } } #[inline] pub unsafe fn ImmGenerateMessage(param0: HIMC) -> super::super::super::Foundation::BOOL { @@ -110,54 +110,54 @@ pub unsafe fn ImmGenerateMessage(param0: HIMC) -> super::super::super::Foundatio #[inline] 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); - unsafe { ImmGetCandidateListA(param0, deindex, core::mem::transmute(lpcandlist.unwrap_or(core::mem::zeroed())), dwbuflen) } + unsafe { ImmGetCandidateListA(param0, deindex, lpcandlist.unwrap_or(core::mem::zeroed()) as _, dwbuflen) } } #[inline] pub unsafe fn ImmGetCandidateListCountA(param0: HIMC, lpdwlistcount: *mut u32) -> u32 { windows_targets::link!("imm32.dll" "system" fn ImmGetCandidateListCountA(param0 : HIMC, lpdwlistcount : *mut u32) -> u32); - unsafe { ImmGetCandidateListCountA(param0, core::mem::transmute(lpdwlistcount)) } + unsafe { ImmGetCandidateListCountA(param0, lpdwlistcount as _) } } #[inline] pub unsafe fn ImmGetCandidateListCountW(param0: HIMC, lpdwlistcount: *mut u32) -> u32 { windows_targets::link!("imm32.dll" "system" fn ImmGetCandidateListCountW(param0 : HIMC, lpdwlistcount : *mut u32) -> u32); - unsafe { ImmGetCandidateListCountW(param0, core::mem::transmute(lpdwlistcount)) } + unsafe { ImmGetCandidateListCountW(param0, lpdwlistcount as _) } } #[inline] 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); - unsafe { ImmGetCandidateListW(param0, deindex, core::mem::transmute(lpcandlist.unwrap_or(core::mem::zeroed())), dwbuflen) } + unsafe { ImmGetCandidateListW(param0, deindex, lpcandlist.unwrap_or(core::mem::zeroed()) as _, dwbuflen) } } #[inline] 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); - unsafe { ImmGetCandidateWindow(param0, param1, core::mem::transmute(lpcandidate)) } + unsafe { ImmGetCandidateWindow(param0, param1, lpcandidate as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { ImmGetCompositionFontA(param0, core::mem::transmute(lplf)) } + unsafe { ImmGetCompositionFontA(param0, lplf as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { ImmGetCompositionFontW(param0, core::mem::transmute(lplf)) } + unsafe { ImmGetCompositionFontW(param0, lplf as _) } } #[inline] 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); - unsafe { ImmGetCompositionStringA(param0, param1, core::mem::transmute(lpbuf.unwrap_or(core::mem::zeroed())), dwbuflen) } + unsafe { ImmGetCompositionStringA(param0, param1, lpbuf.unwrap_or(core::mem::zeroed()) as _, dwbuflen) } } #[inline] 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); - unsafe { ImmGetCompositionStringW(param0, param1, core::mem::transmute(lpbuf.unwrap_or(core::mem::zeroed())), dwbuflen) } + unsafe { ImmGetCompositionStringW(param0, param1, lpbuf.unwrap_or(core::mem::zeroed()) as _, dwbuflen) } } #[inline] 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); - unsafe { ImmGetCompositionWindow(param0, core::mem::transmute(lpcompform)) } + unsafe { ImmGetCompositionWindow(param0, lpcompform as _) } } #[inline] pub unsafe fn ImmGetContext(param0: super::super::super::Foundation::HWND) -> HIMC { @@ -171,7 +171,7 @@ where 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); - unsafe { ImmGetConversionListA(param0, param1, lpsrc.param().abi(), core::mem::transmute(lpdst), dwbuflen, uflag) } + unsafe { ImmGetConversionListA(param0, param1, lpsrc.param().abi(), lpdst as _, dwbuflen, uflag) } } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] #[inline] @@ -180,12 +180,12 @@ where 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); - unsafe { ImmGetConversionListW(param0, param1, lpsrc.param().abi(), core::mem::transmute(lpdst), dwbuflen, uflag) } + unsafe { ImmGetConversionListW(param0, param1, lpsrc.param().abi(), lpdst as _, dwbuflen, uflag) } } #[inline] 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); - unsafe { ImmGetConversionStatus(param0, core::mem::transmute(lpfdwconversion.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpfdwsentence.unwrap_or(core::mem::zeroed()))) } + unsafe { ImmGetConversionStatus(param0, lpfdwconversion.unwrap_or(core::mem::zeroed()) as _, lpfdwsentence.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ImmGetDefaultIMEWnd(param0: super::super::super::Foundation::HWND) -> super::super::super::Foundation::HWND { @@ -212,13 +212,13 @@ pub unsafe fn ImmGetGuideLineA(param0: HIMC, dwindex: GET_GUIDE_LINE_TYPE, lpbuf #[inline] 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); - unsafe { ImmGetGuideLineW(param0, dwindex, core::mem::transmute(lpbuf.unwrap_or(core::mem::zeroed())), dwbuflen) } + unsafe { ImmGetGuideLineW(param0, dwindex, lpbuf.unwrap_or(core::mem::zeroed()) as _, dwbuflen) } } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] #[inline] pub unsafe fn ImmGetHotKey(param0: u32, lpumodifiers: *mut u32, lpuvkey: *mut u32, phkl: *mut super::KeyboardAndMouse::HKL) -> super::super::super::Foundation::BOOL { windows_targets::link!("imm32.dll" "system" fn ImmGetHotKey(param0 : u32, lpumodifiers : *mut u32, lpuvkey : *mut u32, phkl : *mut super::KeyboardAndMouse:: HKL) -> super::super::super::Foundation:: BOOL); - unsafe { ImmGetHotKey(param0, core::mem::transmute(lpumodifiers), core::mem::transmute(lpuvkey), core::mem::transmute(phkl)) } + unsafe { ImmGetHotKey(param0, lpumodifiers as _, lpuvkey as _, phkl as _) } } #[inline] pub unsafe fn ImmGetIMCCLockCount(param0: HIMCC) -> u32 { @@ -251,13 +251,13 @@ pub unsafe fn ImmGetIMEFileNameW(param0: super::KeyboardAndMouse::HKL, lpszfilen #[inline] 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); - unsafe { ImmGetImeMenuItemsA(param0, param1, param2, core::mem::transmute(lpimeparentmenu.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpimemenu.unwrap_or(core::mem::zeroed())), dwsize) } + unsafe { ImmGetImeMenuItemsA(param0, param1, param2, lpimeparentmenu.unwrap_or(core::mem::zeroed()) as _, lpimemenu.unwrap_or(core::mem::zeroed()) as _, dwsize) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { ImmGetImeMenuItemsW(param0, param1, param2, core::mem::transmute(lpimeparentmenu.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpimemenu.unwrap_or(core::mem::zeroed())), dwsize) } + unsafe { ImmGetImeMenuItemsW(param0, param1, param2, lpimeparentmenu.unwrap_or(core::mem::zeroed()) as _, lpimemenu.unwrap_or(core::mem::zeroed()) as _, dwsize) } } #[inline] pub unsafe fn ImmGetOpenStatus(param0: HIMC) -> super::super::super::Foundation::BOOL { @@ -285,7 +285,7 @@ pub unsafe fn ImmGetRegisterWordStyleW(param0: super::KeyboardAndMouse::HKL, lps #[inline] 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); - unsafe { ImmGetStatusWindowPos(param0, core::mem::transmute(lpptpos)) } + unsafe { ImmGetStatusWindowPos(param0, lpptpos as _) } } #[inline] pub unsafe fn ImmGetVirtualKey(param0: super::super::super::Foundation::HWND) -> u32 { @@ -404,12 +404,12 @@ pub unsafe fn ImmSetCompositionFontW(param0: HIMC, lplf: *const super::super::su #[inline] 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); - unsafe { ImmSetCompositionStringA(param0, dwindex, core::mem::transmute(lpcomp.unwrap_or(core::mem::zeroed())), dwcomplen, core::mem::transmute(lpread.unwrap_or(core::mem::zeroed())), dwreadlen) } + unsafe { ImmSetCompositionStringA(param0, dwindex, lpcomp.unwrap_or(core::mem::zeroed()) as _, dwcomplen, lpread.unwrap_or(core::mem::zeroed()) as _, dwreadlen) } } #[inline] 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); - unsafe { ImmSetCompositionStringW(param0, dwindex, core::mem::transmute(lpcomp.unwrap_or(core::mem::zeroed())), dwcomplen, core::mem::transmute(lpread.unwrap_or(core::mem::zeroed())), dwreadlen) } + unsafe { ImmSetCompositionStringW(param0, dwindex, lpcomp.unwrap_or(core::mem::zeroed()) as _, dwcomplen, lpread.unwrap_or(core::mem::zeroed()) as _, dwreadlen) } } #[inline] pub unsafe fn ImmSetCompositionWindow(param0: HIMC, lpcompform: *const COMPOSITIONFORM) -> super::super::super::Foundation::BOOL { @@ -788,13 +788,13 @@ windows_core::imp::define_interface!(IActiveIME, IActiveIME_Vtbl, 0x6fe20962_d07 windows_core::imp::interface_hierarchy!(IActiveIME, windows_core::IUnknown); impl IActiveIME { pub unsafe fn Inquire(&self, dwsysteminfoflags: u32, pimeinfo: *mut IMEINFO, szwndclass: windows_core::PWSTR, pdwprivate: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Inquire)(windows_core::Interface::as_raw(self), dwsysteminfoflags, core::mem::transmute(pimeinfo), core::mem::transmute(szwndclass), core::mem::transmute(pdwprivate)).ok() } + unsafe { (windows_core::Interface::vtable(self).Inquire)(windows_core::Interface::as_raw(self), dwsysteminfoflags, pimeinfo as _, core::mem::transmute(szwndclass), pdwprivate as _).ok() } } pub unsafe fn ConversionList(&self, himc: HIMC, szsource: P1, uflag: u32, ubuflen: u32, pdest: *mut CANDIDATELIST, pucopied: *mut u32) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ConversionList)(windows_core::Interface::as_raw(self), himc, szsource.param().abi(), uflag, ubuflen, core::mem::transmute(pdest), core::mem::transmute(pucopied)).ok() } + unsafe { (windows_core::Interface::vtable(self).ConversionList)(windows_core::Interface::as_raw(self), himc, szsource.param().abi(), uflag, ubuflen, pdest as _, pucopied as _).ok() } } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] pub unsafe fn Configure(&self, hkl: super::KeyboardAndMouse::HKL, hwnd: super::super::super::Foundation::HWND, dwmode: u32, pregisterword: *const REGISTERWORDW) -> windows_core::Result<()> { @@ -804,7 +804,7 @@ impl IActiveIME { unsafe { (windows_core::Interface::vtable(self).Destroy)(windows_core::Interface::as_raw(self), ureserved).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<()> { - unsafe { (windows_core::Interface::vtable(self).Escape)(windows_core::Interface::as_raw(self), himc, uescape, core::mem::transmute(pdata), core::mem::transmute(plresult)).ok() } + unsafe { (windows_core::Interface::vtable(self).Escape)(windows_core::Interface::as_raw(self), himc, uescape, pdata as _, plresult as _).ok() } } pub unsafe fn SetActiveContext(&self, himc: HIMC, fflag: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetActiveContext)(windows_core::Interface::as_raw(self), himc, fflag.into()).ok() } @@ -822,7 +822,7 @@ impl IActiveIME { unsafe { (windows_core::Interface::vtable(self).SetCompositionString)(windows_core::Interface::as_raw(self), himc, dwindex, pcomp, dwcomplen, pread, dwreadlen).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<()> { - unsafe { (windows_core::Interface::vtable(self).ToAsciiEx)(windows_core::Interface::as_raw(self), uvirkey, uscancode, pbkeystate, fustate, himc, core::mem::transmute(pdwtransbuf), core::mem::transmute(pusize)).ok() } + unsafe { (windows_core::Interface::vtable(self).ToAsciiEx)(windows_core::Interface::as_raw(self), uvirkey, uscancode, pbkeystate, fustate, himc, pdwtransbuf as _, pusize as _).ok() } } pub unsafe fn RegisterWord(&self, szreading: P0, dwstyle: u32, szstring: P2) -> windows_core::Result<()> where @@ -839,7 +839,7 @@ impl IActiveIME { unsafe { (windows_core::Interface::vtable(self).UnregisterWord)(windows_core::Interface::as_raw(self), szreading.param().abi(), dwstyle, szstring.param().abi()).ok() } } pub unsafe fn GetRegisterWordStyle(&self, nitem: u32, pstylebuf: *mut STYLEBUFW, pubufsize: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRegisterWordStyle)(windows_core::Interface::as_raw(self), nitem, core::mem::transmute(pstylebuf), core::mem::transmute(pubufsize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRegisterWordStyle)(windows_core::Interface::as_raw(self), nitem, pstylebuf as _, pubufsize as _).ok() } } pub unsafe fn EnumRegisterWord(&self, szreading: P0, dwstyle: u32, szregister: P2, pdata: *const core::ffi::c_void) -> windows_core::Result where @@ -1158,43 +1158,43 @@ impl IActiveIMMApp { } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] 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<()> { - unsafe { (windows_core::Interface::vtable(self).EscapeA)(windows_core::Interface::as_raw(self), hkl, himc, uescape, core::mem::transmute(pdata), core::mem::transmute(plresult)).ok() } + unsafe { (windows_core::Interface::vtable(self).EscapeA)(windows_core::Interface::as_raw(self), hkl, himc, uescape, pdata as _, plresult as _).ok() } } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] 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<()> { - unsafe { (windows_core::Interface::vtable(self).EscapeW)(windows_core::Interface::as_raw(self), hkl, himc, uescape, core::mem::transmute(pdata), core::mem::transmute(plresult)).ok() } + unsafe { (windows_core::Interface::vtable(self).EscapeW)(windows_core::Interface::as_raw(self), hkl, himc, uescape, pdata as _, plresult as _).ok() } } pub unsafe fn GetCandidateListA(&self, himc: HIMC, dwindex: u32, ubuflen: u32, pcandlist: *mut CANDIDATELIST, pucopied: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCandidateListA)(windows_core::Interface::as_raw(self), himc, dwindex, ubuflen, core::mem::transmute(pcandlist), core::mem::transmute(pucopied)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCandidateListA)(windows_core::Interface::as_raw(self), himc, dwindex, ubuflen, pcandlist as _, pucopied as _).ok() } } pub unsafe fn GetCandidateListW(&self, himc: HIMC, dwindex: u32, ubuflen: u32, pcandlist: *mut CANDIDATELIST, pucopied: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCandidateListW)(windows_core::Interface::as_raw(self), himc, dwindex, ubuflen, core::mem::transmute(pcandlist), core::mem::transmute(pucopied)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCandidateListW)(windows_core::Interface::as_raw(self), himc, dwindex, ubuflen, pcandlist as _, pucopied as _).ok() } } pub unsafe fn GetCandidateListCountA(&self, himc: HIMC, pdwlistsize: *mut u32, pdwbuflen: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCandidateListCountA)(windows_core::Interface::as_raw(self), himc, core::mem::transmute(pdwlistsize), core::mem::transmute(pdwbuflen)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCandidateListCountA)(windows_core::Interface::as_raw(self), himc, pdwlistsize as _, pdwbuflen as _).ok() } } pub unsafe fn GetCandidateListCountW(&self, himc: HIMC, pdwlistsize: *mut u32, pdwbuflen: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCandidateListCountW)(windows_core::Interface::as_raw(self), himc, core::mem::transmute(pdwlistsize), core::mem::transmute(pdwbuflen)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCandidateListCountW)(windows_core::Interface::as_raw(self), himc, pdwlistsize as _, pdwbuflen as _).ok() } } pub unsafe fn GetCandidateWindow(&self, himc: HIMC, dwindex: u32, pcandidate: *mut CANDIDATEFORM) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCandidateWindow)(windows_core::Interface::as_raw(self), himc, dwindex, core::mem::transmute(pcandidate)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCandidateWindow)(windows_core::Interface::as_raw(self), himc, dwindex, pcandidate as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetCompositionFontA(&self, himc: HIMC, plf: *mut super::super::super::Graphics::Gdi::LOGFONTA) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCompositionFontA)(windows_core::Interface::as_raw(self), himc, core::mem::transmute(plf)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCompositionFontA)(windows_core::Interface::as_raw(self), himc, plf as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetCompositionFontW(&self, himc: HIMC, plf: *mut super::super::super::Graphics::Gdi::LOGFONTW) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCompositionFontW)(windows_core::Interface::as_raw(self), himc, core::mem::transmute(plf)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCompositionFontW)(windows_core::Interface::as_raw(self), himc, plf as _).ok() } } pub unsafe fn GetCompositionStringA(&self, himc: HIMC, dwindex: u32, dwbuflen: u32, plcopied: *mut i32, pbuf: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCompositionStringA)(windows_core::Interface::as_raw(self), himc, dwindex, dwbuflen, core::mem::transmute(plcopied), core::mem::transmute(pbuf)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCompositionStringA)(windows_core::Interface::as_raw(self), himc, dwindex, dwbuflen, plcopied as _, pbuf as _).ok() } } pub unsafe fn GetCompositionStringW(&self, himc: HIMC, dwindex: u32, dwbuflen: u32, plcopied: *mut i32, pbuf: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCompositionStringW)(windows_core::Interface::as_raw(self), himc, dwindex, dwbuflen, core::mem::transmute(plcopied), core::mem::transmute(pbuf)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCompositionStringW)(windows_core::Interface::as_raw(self), himc, dwindex, dwbuflen, plcopied as _, pbuf as _).ok() } } pub unsafe fn GetCompositionWindow(&self, himc: HIMC, pcompform: *mut COMPOSITIONFORM) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCompositionWindow)(windows_core::Interface::as_raw(self), himc, core::mem::transmute(pcompform)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCompositionWindow)(windows_core::Interface::as_raw(self), himc, pcompform as _).ok() } } pub unsafe fn GetContext(&self, hwnd: super::super::super::Foundation::HWND) -> windows_core::Result { unsafe { @@ -1207,17 +1207,17 @@ impl IActiveIMMApp { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetConversionListA)(windows_core::Interface::as_raw(self), hkl, himc, psrc.param().abi(), ubuflen, uflag, core::mem::transmute(pdst), core::mem::transmute(pucopied)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConversionListA)(windows_core::Interface::as_raw(self), hkl, himc, psrc.param().abi(), ubuflen, uflag, pdst as _, pucopied as _).ok() } } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] 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 P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetConversionListW)(windows_core::Interface::as_raw(self), hkl, himc, psrc.param().abi(), ubuflen, uflag, core::mem::transmute(pdst), core::mem::transmute(pucopied)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConversionListW)(windows_core::Interface::as_raw(self), hkl, himc, psrc.param().abi(), ubuflen, uflag, pdst as _, pucopied as _).ok() } } pub unsafe fn GetConversionStatus(&self, himc: HIMC, pfdwconversion: *mut u32, pfdwsentence: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetConversionStatus)(windows_core::Interface::as_raw(self), himc, core::mem::transmute(pfdwconversion), core::mem::transmute(pfdwsentence)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConversionStatus)(windows_core::Interface::as_raw(self), himc, pfdwconversion as _, pfdwsentence as _).ok() } } pub unsafe fn GetDefaultIMEWnd(&self, hwnd: super::super::super::Foundation::HWND) -> windows_core::Result { unsafe { @@ -1227,25 +1227,25 @@ impl IActiveIMMApp { } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] pub unsafe fn GetDescriptionA(&self, hkl: super::KeyboardAndMouse::HKL, ubuflen: u32, szdescription: windows_core::PSTR, pucopied: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDescriptionA)(windows_core::Interface::as_raw(self), hkl, ubuflen, core::mem::transmute(szdescription), core::mem::transmute(pucopied)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDescriptionA)(windows_core::Interface::as_raw(self), hkl, ubuflen, core::mem::transmute(szdescription), pucopied as _).ok() } } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] pub unsafe fn GetDescriptionW(&self, hkl: super::KeyboardAndMouse::HKL, ubuflen: u32, szdescription: windows_core::PWSTR, pucopied: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDescriptionW)(windows_core::Interface::as_raw(self), hkl, ubuflen, core::mem::transmute(szdescription), core::mem::transmute(pucopied)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDescriptionW)(windows_core::Interface::as_raw(self), hkl, ubuflen, core::mem::transmute(szdescription), pucopied as _).ok() } } pub unsafe fn GetGuideLineA(&self, himc: HIMC, dwindex: u32, dwbuflen: u32, pbuf: windows_core::PSTR, pdwresult: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGuideLineA)(windows_core::Interface::as_raw(self), himc, dwindex, dwbuflen, core::mem::transmute(pbuf), core::mem::transmute(pdwresult)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGuideLineA)(windows_core::Interface::as_raw(self), himc, dwindex, dwbuflen, core::mem::transmute(pbuf), pdwresult as _).ok() } } pub unsafe fn GetGuideLineW(&self, himc: HIMC, dwindex: u32, dwbuflen: u32, pbuf: windows_core::PWSTR, pdwresult: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGuideLineW)(windows_core::Interface::as_raw(self), himc, dwindex, dwbuflen, core::mem::transmute(pbuf), core::mem::transmute(pdwresult)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGuideLineW)(windows_core::Interface::as_raw(self), himc, dwindex, dwbuflen, core::mem::transmute(pbuf), pdwresult as _).ok() } } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] pub unsafe fn GetIMEFileNameA(&self, hkl: super::KeyboardAndMouse::HKL, ubuflen: u32, szfilename: windows_core::PSTR, pucopied: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIMEFileNameA)(windows_core::Interface::as_raw(self), hkl, ubuflen, core::mem::transmute(szfilename), core::mem::transmute(pucopied)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIMEFileNameA)(windows_core::Interface::as_raw(self), hkl, ubuflen, core::mem::transmute(szfilename), pucopied as _).ok() } } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] pub unsafe fn GetIMEFileNameW(&self, hkl: super::KeyboardAndMouse::HKL, ubuflen: u32, szfilename: windows_core::PWSTR, pucopied: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIMEFileNameW)(windows_core::Interface::as_raw(self), hkl, ubuflen, core::mem::transmute(szfilename), core::mem::transmute(pucopied)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIMEFileNameW)(windows_core::Interface::as_raw(self), hkl, ubuflen, core::mem::transmute(szfilename), pucopied as _).ok() } } pub unsafe fn GetOpenStatus(&self, himc: HIMC) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetOpenStatus)(windows_core::Interface::as_raw(self), himc).ok() } @@ -1259,11 +1259,11 @@ impl IActiveIMMApp { } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] pub unsafe fn GetRegisterWordStyleA(&self, hkl: super::KeyboardAndMouse::HKL, nitem: u32, pstylebuf: *mut STYLEBUFA, pucopied: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRegisterWordStyleA)(windows_core::Interface::as_raw(self), hkl, nitem, core::mem::transmute(pstylebuf), core::mem::transmute(pucopied)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRegisterWordStyleA)(windows_core::Interface::as_raw(self), hkl, nitem, pstylebuf as _, pucopied as _).ok() } } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] pub unsafe fn GetRegisterWordStyleW(&self, hkl: super::KeyboardAndMouse::HKL, nitem: u32, pstylebuf: *mut STYLEBUFW, pucopied: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRegisterWordStyleW)(windows_core::Interface::as_raw(self), hkl, nitem, core::mem::transmute(pstylebuf), core::mem::transmute(pucopied)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRegisterWordStyleW)(windows_core::Interface::as_raw(self), hkl, nitem, pstylebuf as _, pucopied as _).ok() } } pub unsafe fn GetStatusWindowPos(&self, himc: HIMC) -> windows_core::Result { unsafe { @@ -1416,11 +1416,11 @@ impl IActiveIMMApp { } #[cfg(feature = "Win32_Graphics_Gdi")] 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetImeMenuItemsA)(windows_core::Interface::as_raw(self), himc, dwflags, dwtype, pimeparentmenu, core::mem::transmute(pimemenu), dwsize, core::mem::transmute(pdwresult)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetImeMenuItemsA)(windows_core::Interface::as_raw(self), himc, dwflags, dwtype, pimeparentmenu, pimemenu as _, dwsize, pdwresult as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetImeMenuItemsW)(windows_core::Interface::as_raw(self), himc, dwflags, dwtype, pimeparentmenu, core::mem::transmute(pimemenu), dwsize, core::mem::transmute(pdwresult)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetImeMenuItemsW)(windows_core::Interface::as_raw(self), himc, dwflags, dwtype, pimeparentmenu, pimemenu as _, dwsize, pdwresult as _).ok() } } pub unsafe fn EnumInputContext(&self, idthread: u32) -> windows_core::Result { unsafe { @@ -2291,43 +2291,43 @@ impl IActiveIMMIME { } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] 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<()> { - unsafe { (windows_core::Interface::vtable(self).EscapeA)(windows_core::Interface::as_raw(self), hkl, himc, uescape, core::mem::transmute(pdata), core::mem::transmute(plresult)).ok() } + unsafe { (windows_core::Interface::vtable(self).EscapeA)(windows_core::Interface::as_raw(self), hkl, himc, uescape, pdata as _, plresult as _).ok() } } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] 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<()> { - unsafe { (windows_core::Interface::vtable(self).EscapeW)(windows_core::Interface::as_raw(self), hkl, himc, uescape, core::mem::transmute(pdata), core::mem::transmute(plresult)).ok() } + unsafe { (windows_core::Interface::vtable(self).EscapeW)(windows_core::Interface::as_raw(self), hkl, himc, uescape, pdata as _, plresult as _).ok() } } pub unsafe fn GetCandidateListA(&self, himc: HIMC, dwindex: u32, ubuflen: u32, pcandlist: *mut CANDIDATELIST, pucopied: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCandidateListA)(windows_core::Interface::as_raw(self), himc, dwindex, ubuflen, core::mem::transmute(pcandlist), core::mem::transmute(pucopied)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCandidateListA)(windows_core::Interface::as_raw(self), himc, dwindex, ubuflen, pcandlist as _, pucopied as _).ok() } } pub unsafe fn GetCandidateListW(&self, himc: HIMC, dwindex: u32, ubuflen: u32, pcandlist: *mut CANDIDATELIST, pucopied: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCandidateListW)(windows_core::Interface::as_raw(self), himc, dwindex, ubuflen, core::mem::transmute(pcandlist), core::mem::transmute(pucopied)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCandidateListW)(windows_core::Interface::as_raw(self), himc, dwindex, ubuflen, pcandlist as _, pucopied as _).ok() } } pub unsafe fn GetCandidateListCountA(&self, himc: HIMC, pdwlistsize: *mut u32, pdwbuflen: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCandidateListCountA)(windows_core::Interface::as_raw(self), himc, core::mem::transmute(pdwlistsize), core::mem::transmute(pdwbuflen)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCandidateListCountA)(windows_core::Interface::as_raw(self), himc, pdwlistsize as _, pdwbuflen as _).ok() } } pub unsafe fn GetCandidateListCountW(&self, himc: HIMC, pdwlistsize: *mut u32, pdwbuflen: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCandidateListCountW)(windows_core::Interface::as_raw(self), himc, core::mem::transmute(pdwlistsize), core::mem::transmute(pdwbuflen)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCandidateListCountW)(windows_core::Interface::as_raw(self), himc, pdwlistsize as _, pdwbuflen as _).ok() } } pub unsafe fn GetCandidateWindow(&self, himc: HIMC, dwindex: u32, pcandidate: *mut CANDIDATEFORM) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCandidateWindow)(windows_core::Interface::as_raw(self), himc, dwindex, core::mem::transmute(pcandidate)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCandidateWindow)(windows_core::Interface::as_raw(self), himc, dwindex, pcandidate as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetCompositionFontA(&self, himc: HIMC, plf: *mut super::super::super::Graphics::Gdi::LOGFONTA) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCompositionFontA)(windows_core::Interface::as_raw(self), himc, core::mem::transmute(plf)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCompositionFontA)(windows_core::Interface::as_raw(self), himc, plf as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetCompositionFontW(&self, himc: HIMC, plf: *mut super::super::super::Graphics::Gdi::LOGFONTW) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCompositionFontW)(windows_core::Interface::as_raw(self), himc, core::mem::transmute(plf)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCompositionFontW)(windows_core::Interface::as_raw(self), himc, plf as _).ok() } } pub unsafe fn GetCompositionStringA(&self, himc: HIMC, dwindex: u32, dwbuflen: u32, plcopied: *mut i32, pbuf: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCompositionStringA)(windows_core::Interface::as_raw(self), himc, dwindex, dwbuflen, core::mem::transmute(plcopied), core::mem::transmute(pbuf)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCompositionStringA)(windows_core::Interface::as_raw(self), himc, dwindex, dwbuflen, plcopied as _, pbuf as _).ok() } } pub unsafe fn GetCompositionStringW(&self, himc: HIMC, dwindex: u32, dwbuflen: u32, plcopied: *mut i32, pbuf: *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCompositionStringW)(windows_core::Interface::as_raw(self), himc, dwindex, dwbuflen, core::mem::transmute(plcopied), core::mem::transmute(pbuf)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCompositionStringW)(windows_core::Interface::as_raw(self), himc, dwindex, dwbuflen, plcopied as _, pbuf as _).ok() } } pub unsafe fn GetCompositionWindow(&self, himc: HIMC, pcompform: *mut COMPOSITIONFORM) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCompositionWindow)(windows_core::Interface::as_raw(self), himc, core::mem::transmute(pcompform)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCompositionWindow)(windows_core::Interface::as_raw(self), himc, pcompform as _).ok() } } pub unsafe fn GetContext(&self, hwnd: super::super::super::Foundation::HWND) -> windows_core::Result { unsafe { @@ -2340,17 +2340,17 @@ impl IActiveIMMIME { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetConversionListA)(windows_core::Interface::as_raw(self), hkl, himc, psrc.param().abi(), ubuflen, uflag, core::mem::transmute(pdst), core::mem::transmute(pucopied)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConversionListA)(windows_core::Interface::as_raw(self), hkl, himc, psrc.param().abi(), ubuflen, uflag, pdst as _, pucopied as _).ok() } } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] 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 P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetConversionListW)(windows_core::Interface::as_raw(self), hkl, himc, psrc.param().abi(), ubuflen, uflag, core::mem::transmute(pdst), core::mem::transmute(pucopied)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConversionListW)(windows_core::Interface::as_raw(self), hkl, himc, psrc.param().abi(), ubuflen, uflag, pdst as _, pucopied as _).ok() } } pub unsafe fn GetConversionStatus(&self, himc: HIMC, pfdwconversion: *mut u32, pfdwsentence: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetConversionStatus)(windows_core::Interface::as_raw(self), himc, core::mem::transmute(pfdwconversion), core::mem::transmute(pfdwsentence)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConversionStatus)(windows_core::Interface::as_raw(self), himc, pfdwconversion as _, pfdwsentence as _).ok() } } pub unsafe fn GetDefaultIMEWnd(&self, hwnd: super::super::super::Foundation::HWND) -> windows_core::Result { unsafe { @@ -2360,25 +2360,25 @@ impl IActiveIMMIME { } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] pub unsafe fn GetDescriptionA(&self, hkl: super::KeyboardAndMouse::HKL, ubuflen: u32, szdescription: windows_core::PSTR, pucopied: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDescriptionA)(windows_core::Interface::as_raw(self), hkl, ubuflen, core::mem::transmute(szdescription), core::mem::transmute(pucopied)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDescriptionA)(windows_core::Interface::as_raw(self), hkl, ubuflen, core::mem::transmute(szdescription), pucopied as _).ok() } } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] pub unsafe fn GetDescriptionW(&self, hkl: super::KeyboardAndMouse::HKL, ubuflen: u32, szdescription: windows_core::PWSTR, pucopied: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDescriptionW)(windows_core::Interface::as_raw(self), hkl, ubuflen, core::mem::transmute(szdescription), core::mem::transmute(pucopied)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDescriptionW)(windows_core::Interface::as_raw(self), hkl, ubuflen, core::mem::transmute(szdescription), pucopied as _).ok() } } pub unsafe fn GetGuideLineA(&self, himc: HIMC, dwindex: u32, dwbuflen: u32, pbuf: windows_core::PSTR, pdwresult: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGuideLineA)(windows_core::Interface::as_raw(self), himc, dwindex, dwbuflen, core::mem::transmute(pbuf), core::mem::transmute(pdwresult)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGuideLineA)(windows_core::Interface::as_raw(self), himc, dwindex, dwbuflen, core::mem::transmute(pbuf), pdwresult as _).ok() } } pub unsafe fn GetGuideLineW(&self, himc: HIMC, dwindex: u32, dwbuflen: u32, pbuf: windows_core::PWSTR, pdwresult: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGuideLineW)(windows_core::Interface::as_raw(self), himc, dwindex, dwbuflen, core::mem::transmute(pbuf), core::mem::transmute(pdwresult)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGuideLineW)(windows_core::Interface::as_raw(self), himc, dwindex, dwbuflen, core::mem::transmute(pbuf), pdwresult as _).ok() } } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] pub unsafe fn GetIMEFileNameA(&self, hkl: super::KeyboardAndMouse::HKL, ubuflen: u32, szfilename: windows_core::PSTR, pucopied: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIMEFileNameA)(windows_core::Interface::as_raw(self), hkl, ubuflen, core::mem::transmute(szfilename), core::mem::transmute(pucopied)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIMEFileNameA)(windows_core::Interface::as_raw(self), hkl, ubuflen, core::mem::transmute(szfilename), pucopied as _).ok() } } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] pub unsafe fn GetIMEFileNameW(&self, hkl: super::KeyboardAndMouse::HKL, ubuflen: u32, szfilename: windows_core::PWSTR, pucopied: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIMEFileNameW)(windows_core::Interface::as_raw(self), hkl, ubuflen, core::mem::transmute(szfilename), core::mem::transmute(pucopied)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIMEFileNameW)(windows_core::Interface::as_raw(self), hkl, ubuflen, core::mem::transmute(szfilename), pucopied as _).ok() } } pub unsafe fn GetOpenStatus(&self, himc: HIMC) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetOpenStatus)(windows_core::Interface::as_raw(self), himc).ok() } @@ -2392,11 +2392,11 @@ impl IActiveIMMIME { } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] pub unsafe fn GetRegisterWordStyleA(&self, hkl: super::KeyboardAndMouse::HKL, nitem: u32, pstylebuf: *mut STYLEBUFA, pucopied: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRegisterWordStyleA)(windows_core::Interface::as_raw(self), hkl, nitem, core::mem::transmute(pstylebuf), core::mem::transmute(pucopied)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRegisterWordStyleA)(windows_core::Interface::as_raw(self), hkl, nitem, pstylebuf as _, pucopied as _).ok() } } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] pub unsafe fn GetRegisterWordStyleW(&self, hkl: super::KeyboardAndMouse::HKL, nitem: u32, pstylebuf: *mut STYLEBUFW, pucopied: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRegisterWordStyleW)(windows_core::Interface::as_raw(self), hkl, nitem, core::mem::transmute(pstylebuf), core::mem::transmute(pucopied)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRegisterWordStyleW)(windows_core::Interface::as_raw(self), hkl, nitem, pstylebuf as _, pucopied as _).ok() } } pub unsafe fn GetStatusWindowPos(&self, himc: HIMC) -> windows_core::Result { unsafe { @@ -2541,7 +2541,7 @@ impl IActiveIMMIME { unsafe { (windows_core::Interface::vtable(self).DestroyIMCC)(windows_core::Interface::as_raw(self), himcc).ok() } } pub unsafe fn LockIMCC(&self, himcc: HIMCC, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).LockIMCC)(windows_core::Interface::as_raw(self), himcc, core::mem::transmute(ppv)).ok() } + unsafe { (windows_core::Interface::vtable(self).LockIMCC)(windows_core::Interface::as_raw(self), himcc, ppv as _).ok() } } pub unsafe fn UnlockIMCC(&self, himcc: HIMCC) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UnlockIMCC)(windows_core::Interface::as_raw(self), himcc).ok() } @@ -2566,7 +2566,7 @@ impl IActiveIMMIME { } #[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<()> { - unsafe { (windows_core::Interface::vtable(self).GetHotKey)(windows_core::Interface::as_raw(self), dwhotkeyid, core::mem::transmute(pumodifiers), core::mem::transmute(puvkey), core::mem::transmute(phkl)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetHotKey)(windows_core::Interface::as_raw(self), dwhotkeyid, pumodifiers as _, puvkey as _, phkl as _).ok() } } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] pub unsafe fn SetHotKey(&self, dwhotkeyid: u32, umodifiers: u32, uvkey: u32, hkl: super::KeyboardAndMouse::HKL) -> windows_core::Result<()> { @@ -2615,11 +2615,11 @@ impl IActiveIMMIME { } #[cfg(feature = "Win32_Graphics_Gdi")] 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetImeMenuItemsA)(windows_core::Interface::as_raw(self), himc, dwflags, dwtype, pimeparentmenu, core::mem::transmute(pimemenu), dwsize, core::mem::transmute(pdwresult)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetImeMenuItemsA)(windows_core::Interface::as_raw(self), himc, dwflags, dwtype, pimeparentmenu, pimemenu as _, dwsize, pdwresult as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetImeMenuItemsW)(windows_core::Interface::as_raw(self), himc, dwflags, dwtype, pimeparentmenu, core::mem::transmute(pimemenu), dwsize, core::mem::transmute(pdwresult)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetImeMenuItemsW)(windows_core::Interface::as_raw(self), himc, dwflags, dwtype, pimeparentmenu, pimemenu as _, dwsize, pdwresult as _).ok() } } pub unsafe fn EnumInputContext(&self, idthread: u32) -> windows_core::Result { unsafe { @@ -3872,7 +3872,7 @@ impl IEnumInputContext { } } pub unsafe fn Next(&self, ulcount: u32, rginputcontext: *mut HIMC, pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ulcount, core::mem::transmute(rginputcontext), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ulcount, rginputcontext as _, pcfetched as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -3950,7 +3950,7 @@ impl IEnumRegisterWordA { } } pub unsafe fn Next(&self, ulcount: u32, rgregisterword: *mut REGISTERWORDA, pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ulcount, core::mem::transmute(rgregisterword), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ulcount, rgregisterword as _, pcfetched as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -4028,7 +4028,7 @@ impl IEnumRegisterWordW { } } pub unsafe fn Next(&self, ulcount: u32, rgregisterword: *mut REGISTERWORDW, pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ulcount, core::mem::transmute(rgregisterword), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ulcount, rgregisterword as _, pcfetched as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -4136,10 +4136,10 @@ impl IFECommon { unsafe { (windows_core::Interface::vtable(self).SetDefaultIME)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn InvokeWordRegDialog(&self, pimedlg: *mut IMEDLG) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).InvokeWordRegDialog)(windows_core::Interface::as_raw(self), core::mem::transmute(pimedlg)).ok() } + unsafe { (windows_core::Interface::vtable(self).InvokeWordRegDialog)(windows_core::Interface::as_raw(self), pimedlg as _).ok() } } pub unsafe fn InvokeDictToolDialog(&self, pimedlg: *mut IMEDLG) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).InvokeDictToolDialog)(windows_core::Interface::as_raw(self), core::mem::transmute(pimedlg)).ok() } + unsafe { (windows_core::Interface::vtable(self).InvokeDictToolDialog)(windows_core::Interface::as_raw(self), pimedlg as _).ok() } } } #[repr(C)] @@ -4315,19 +4315,19 @@ windows_core::imp::define_interface!(IFEDictionary, IFEDictionary_Vtbl, 0x019f71 windows_core::imp::interface_hierarchy!(IFEDictionary, windows_core::IUnknown); impl IFEDictionary { pub unsafe fn Open(&self, pchdictpath: Option<&mut [u8; 260]>, pshf: *mut IMESHF) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Open)(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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Open)(windows_core::Interface::as_raw(self), core::mem::transmute(pchdictpath.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pshf as _).ok() } } pub unsafe fn Close(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetHeader(&self, pchdictpath: Option<&mut [u8; 260]>, pshf: *mut IMESHF, pjfmt: *mut IMEFMT, pultype: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (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())), pshf as _, pjfmt as _, pultype as _).ok() } } pub unsafe fn DisplayProperty(&self, hwnd: super::super::super::Foundation::HWND) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DisplayProperty)(windows_core::Interface::as_raw(self), hwnd).ok() } } pub unsafe fn GetPosTable(&self, prgpostbl: *mut *mut POSTBL, pcpostbl: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPosTable)(windows_core::Interface::as_raw(self), core::mem::transmute(prgpostbl), core::mem::transmute(pcpostbl)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPosTable)(windows_core::Interface::as_raw(self), prgpostbl as _, pcpostbl as _).ok() } } pub unsafe fn GetWords(&self, pwchfirst: P0, pwchlast: P1, pwchdisplay: P2, ulpos: u32, ulselect: u32, ulwordsrc: u32, pchbuffer: *mut u8, cbbuffer: u32, pcwrd: *mut u32) -> windows_core::Result<()> where @@ -4335,31 +4335,31 @@ impl IFEDictionary { P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetWords)(windows_core::Interface::as_raw(self), pwchfirst.param().abi(), pwchlast.param().abi(), pwchdisplay.param().abi(), ulpos, ulselect, ulwordsrc, core::mem::transmute(pchbuffer), cbbuffer, core::mem::transmute(pcwrd)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWords)(windows_core::Interface::as_raw(self), pwchfirst.param().abi(), pwchlast.param().abi(), pwchdisplay.param().abi(), ulpos, ulselect, ulwordsrc, pchbuffer as _, cbbuffer, pcwrd as _).ok() } } pub unsafe fn NextWords(&self, pchbuffer: *mut u8, cbbuffer: u32, pcwrd: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).NextWords)(windows_core::Interface::as_raw(self), core::mem::transmute(pchbuffer), cbbuffer, core::mem::transmute(pcwrd)).ok() } + unsafe { (windows_core::Interface::vtable(self).NextWords)(windows_core::Interface::as_raw(self), pchbuffer as _, cbbuffer, pcwrd as _).ok() } } pub unsafe fn Create(&self, pchdictpath: P0, pshf: *mut IMESHF) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Create)(windows_core::Interface::as_raw(self), pchdictpath.param().abi(), core::mem::transmute(pshf)).ok() } + unsafe { (windows_core::Interface::vtable(self).Create)(windows_core::Interface::as_raw(self), pchdictpath.param().abi(), pshf as _).ok() } } pub unsafe fn SetHeader(&self, pshf: *mut IMESHF) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetHeader)(windows_core::Interface::as_raw(self), core::mem::transmute(pshf)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetHeader)(windows_core::Interface::as_raw(self), pshf as _).ok() } } pub unsafe fn ExistWord(&self, pwrd: *mut IMEWRD) -> windows_core::HRESULT { - unsafe { (windows_core::Interface::vtable(self).ExistWord)(windows_core::Interface::as_raw(self), core::mem::transmute(pwrd)) } + unsafe { (windows_core::Interface::vtable(self).ExistWord)(windows_core::Interface::as_raw(self), pwrd as _) } } pub unsafe fn ExistDependency(&self, pdp: *mut IMEDP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ExistDependency)(windows_core::Interface::as_raw(self), core::mem::transmute(pdp)).ok() } + unsafe { (windows_core::Interface::vtable(self).ExistDependency)(windows_core::Interface::as_raw(self), pdp as _).ok() } } pub unsafe fn RegisterWord(&self, reg: IMEREG, pwrd: *mut IMEWRD) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RegisterWord)(windows_core::Interface::as_raw(self), reg, core::mem::transmute(pwrd)).ok() } + unsafe { (windows_core::Interface::vtable(self).RegisterWord)(windows_core::Interface::as_raw(self), reg, pwrd as _).ok() } } pub unsafe fn RegisterDependency(&self, reg: IMEREG, pdp: *mut IMEDP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RegisterDependency)(windows_core::Interface::as_raw(self), reg, core::mem::transmute(pdp)).ok() } + unsafe { (windows_core::Interface::vtable(self).RegisterDependency)(windows_core::Interface::as_raw(self), reg, pdp as _).ok() } } pub unsafe fn GetDependencies(&self, pwchkakarireading: P0, pwchkakaridisplay: P1, ulkakaripos: u32, pwchukereading: P3, pwchukedisplay: P4, ulukepos: u32, jrel: IMEREL, ulwordsrc: u32, pchbuffer: *mut u8, cbbuffer: u32, pcdp: *mut u32) -> windows_core::Result<()> where @@ -4368,10 +4368,10 @@ impl IFEDictionary { P3: windows_core::Param, P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetDependencies)(windows_core::Interface::as_raw(self), pwchkakarireading.param().abi(), pwchkakaridisplay.param().abi(), ulkakaripos, pwchukereading.param().abi(), pwchukedisplay.param().abi(), ulukepos, jrel, ulwordsrc, core::mem::transmute(pchbuffer), cbbuffer, core::mem::transmute(pcdp)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDependencies)(windows_core::Interface::as_raw(self), pwchkakarireading.param().abi(), pwchkakaridisplay.param().abi(), ulkakaripos, pwchukereading.param().abi(), pwchukedisplay.param().abi(), ulukepos, jrel, ulwordsrc, pchbuffer as _, cbbuffer, pcdp as _).ok() } } pub unsafe fn NextDependencies(&self, pchbuffer: *mut u8, cbbuffer: u32, pcdp: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).NextDependencies)(windows_core::Interface::as_raw(self), core::mem::transmute(pchbuffer), cbbuffer, core::mem::transmute(pcdp)).ok() } + unsafe { (windows_core::Interface::vtable(self).NextDependencies)(windows_core::Interface::as_raw(self), pchbuffer as _, cbbuffer, pcdp as _).ok() } } pub unsafe fn ConvertFromOldMSIME(&self, pchdic: P0, pfnlog: PFNLOG, reg: IMEREG) -> windows_core::Result<()> where @@ -4566,10 +4566,10 @@ impl IFELanguage { where P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetJMorphResult)(windows_core::Interface::as_raw(self), dwrequest, dwcmode, cwchinput, pwchinput.param().abi(), core::mem::transmute(pfcinfo), core::mem::transmute(ppresult)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetJMorphResult)(windows_core::Interface::as_raw(self), dwrequest, dwcmode, cwchinput, pwchinput.param().abi(), pfcinfo as _, ppresult as _).ok() } } pub unsafe fn GetConversionModeCaps(&self, pdwcaps: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetConversionModeCaps)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwcaps)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConversionModeCaps)(windows_core::Interface::as_raw(self), pdwcaps as _).ok() } } pub unsafe fn GetPhonetic(&self, string: &windows_core::BSTR, start: i32, length: i32, phonetic: *mut windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetPhonetic)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(string), start, length, core::mem::transmute(phonetic)).ok() } @@ -4704,10 +4704,10 @@ impl IImePadApplet { } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn GetAppletConfig(&self, lpappletcfg: *mut IMEAPPLETCFG) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAppletConfig)(windows_core::Interface::as_raw(self), core::mem::transmute(lpappletcfg)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAppletConfig)(windows_core::Interface::as_raw(self), lpappletcfg as _).ok() } } pub unsafe fn CreateUI(&self, hwndparent: super::super::super::Foundation::HWND, lpimeappletui: *mut IMEAPPLETUI) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateUI)(windows_core::Interface::as_raw(self), hwndparent, core::mem::transmute(lpimeappletui)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateUI)(windows_core::Interface::as_raw(self), hwndparent, lpimeappletui as _).ok() } } 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 @@ -4789,7 +4789,7 @@ windows_core::imp::interface_hierarchy!(IImePlugInDictDictionaryList, windows_co impl IImePlugInDictDictionaryList { #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetDictionariesInUse(&self, prgdictionaryguid: *mut *mut super::super::super::System::Com::SAFEARRAY, prgdatecreated: *mut *mut super::super::super::System::Com::SAFEARRAY, prgfencrypted: *mut *mut super::super::super::System::Com::SAFEARRAY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDictionariesInUse)(windows_core::Interface::as_raw(self), core::mem::transmute(prgdictionaryguid), core::mem::transmute(prgdatecreated), core::mem::transmute(prgfencrypted)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDictionariesInUse)(windows_core::Interface::as_raw(self), prgdictionaryguid as _, prgdatecreated as _, prgfencrypted as _).ok() } } pub unsafe fn DeleteDictionary(&self, bstrdictionaryguid: &windows_core::BSTR) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).DeleteDictionary)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrdictionaryguid)).ok() } @@ -4840,7 +4840,7 @@ windows_core::imp::define_interface!(IImeSpecifyApplets, IImeSpecifyApplets_Vtbl windows_core::imp::interface_hierarchy!(IImeSpecifyApplets, windows_core::IUnknown); impl IImeSpecifyApplets { pub unsafe fn GetAppletIIDList(&self, refiid: *const windows_core::GUID, lpiidlist: *mut APPLETIDLIST) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAppletIIDList)(windows_core::Interface::as_raw(self), refiid, core::mem::transmute(lpiidlist)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAppletIIDList)(windows_core::Interface::as_raw(self), refiid, lpiidlist as _).ok() } } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/UI/Input/Ink/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Input/Ink/mod.rs index d8d42e87cf..dd4aef1a34 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Input/Ink/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Input/Ink/mod.rs @@ -212,7 +212,7 @@ impl IInkPresenterDesktop { unsafe { (windows_core::Interface::vtable(self).SetCommitRequestHandler)(windows_core::Interface::as_raw(self), handler.param().abi()).ok() } } pub unsafe fn GetSize(&self, width: *mut f32, height: *mut f32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSize)(windows_core::Interface::as_raw(self), core::mem::transmute(width), core::mem::transmute(height)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSize)(windows_core::Interface::as_raw(self), width as _, height as _).ok() } } pub unsafe fn SetSize(&self, width: f32, height: f32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSize)(windows_core::Interface::as_raw(self), width, height).ok() } 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 1b27615fae..d333ec2b00 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 @@ -97,7 +97,7 @@ pub unsafe fn GetKeyboardType(ntypeflag: i32) -> i32 { #[inline] pub unsafe fn GetLastInputInfo(plii: *mut LASTINPUTINFO) -> super::super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn GetLastInputInfo(plii : *mut LASTINPUTINFO) -> super::super::super::Foundation:: BOOL); - unsafe { GetLastInputInfo(core::mem::transmute(plii)) } + unsafe { GetLastInputInfo(plii as _) } } #[inline] pub unsafe fn GetMouseMovePointsEx(cbsize: u32, lppt: *const MOUSEMOVEPOINT, lpptbuf: &mut [MOUSEMOVEPOINT], resolution: GET_MOUSE_MOVE_POINTS_EX_RESOLUTION) -> i32 { @@ -135,12 +135,12 @@ pub unsafe fn MapVirtualKeyA(ucode: u32, umaptype: MAP_VIRTUAL_KEY_TYPE) -> u32 #[inline] 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); - unsafe { MapVirtualKeyExA(ucode, umaptype, core::mem::transmute(dwhkl.unwrap_or(core::mem::zeroed()))) } + unsafe { MapVirtualKeyExA(ucode, umaptype, dwhkl.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { MapVirtualKeyExW(ucode, umaptype, core::mem::transmute(dwhkl.unwrap_or(core::mem::zeroed()))) } + unsafe { MapVirtualKeyExW(ucode, umaptype, dwhkl.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn MapVirtualKeyW(ucode: u32, umaptype: MAP_VIRTUAL_KEY_TYPE) -> u32 { @@ -155,7 +155,7 @@ pub unsafe fn OemKeyScan(woemchar: u16) -> u32 { #[inline] 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); - unsafe { RegisterHotKey(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), id, fsmodifiers, vk).ok() } + unsafe { RegisterHotKey(hwnd.unwrap_or(core::mem::zeroed()) as _, id, fsmodifiers, vk).ok() } } #[inline] pub unsafe fn ReleaseCapture() -> windows_core::Result<()> { @@ -186,7 +186,7 @@ pub unsafe fn SetDoubleClickTime(param0: u32) -> windows_core::Result<()> { #[inline] 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__ = unsafe { SetFocus(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { SetFocus(hwnd.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -202,12 +202,12 @@ pub unsafe fn SwapMouseButton(fswap: bool) -> super::super::super::Foundation::B #[inline] pub unsafe fn ToAscii(uvirtkey: u32, uscancode: u32, lpkeystate: Option<&[u8; 256]>, lpchar: *mut u16, uflags: u32) -> i32 { windows_targets::link!("user32.dll" "system" fn ToAscii(uvirtkey : u32, uscancode : u32, lpkeystate : *const u8, lpchar : *mut u16, uflags : u32) -> i32); - unsafe { ToAscii(uvirtkey, uscancode, core::mem::transmute(lpkeystate.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(lpchar), uflags) } + unsafe { ToAscii(uvirtkey, uscancode, core::mem::transmute(lpkeystate.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpchar as _, uflags) } } #[inline] 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); - unsafe { ToAsciiEx(uvirtkey, uscancode, core::mem::transmute(lpkeystate.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(lpchar), uflags, core::mem::transmute(dwhkl.unwrap_or(core::mem::zeroed()))) } + unsafe { ToAsciiEx(uvirtkey, uscancode, core::mem::transmute(lpkeystate.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpchar as _, uflags, dwhkl.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn ToUnicode(wvirtkey: u32, wscancode: u32, lpkeystate: Option<&[u8; 256]>, pwszbuff: &mut [u16], wflags: u32) -> i32 { @@ -217,12 +217,12 @@ pub unsafe fn ToUnicode(wvirtkey: u32, wscancode: u32, lpkeystate: Option<&[u8; #[inline] 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); - unsafe { ToUnicodeEx(wvirtkey, wscancode, core::mem::transmute(lpkeystate.as_ptr()), core::mem::transmute(pwszbuff.as_ptr()), pwszbuff.len().try_into().unwrap(), wflags, core::mem::transmute(dwhkl.unwrap_or(core::mem::zeroed()))) } + unsafe { ToUnicodeEx(wvirtkey, wscancode, core::mem::transmute(lpkeystate.as_ptr()), core::mem::transmute(pwszbuff.as_ptr()), pwszbuff.len().try_into().unwrap(), wflags, dwhkl.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn TrackMouseEvent(lpeventtrack: *mut TRACKMOUSEEVENT) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn TrackMouseEvent(lpeventtrack : *mut TRACKMOUSEEVENT) -> super::super::super::Foundation:: BOOL); - unsafe { TrackMouseEvent(core::mem::transmute(lpeventtrack)).ok() } + unsafe { TrackMouseEvent(lpeventtrack as _).ok() } } #[inline] pub unsafe fn UnloadKeyboardLayout(hkl: HKL) -> windows_core::Result<()> { @@ -232,7 +232,7 @@ pub unsafe fn UnloadKeyboardLayout(hkl: HKL) -> windows_core::Result<()> { #[inline] 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); - unsafe { UnregisterHotKey(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), id).ok() } + unsafe { UnregisterHotKey(hwnd.unwrap_or(core::mem::zeroed()) as _, id).ok() } } #[inline] pub unsafe fn VkKeyScanA(ch: i8) -> i16 { @@ -257,7 +257,7 @@ pub unsafe fn VkKeyScanW(ch: u16) -> i16 { #[inline] pub unsafe fn _TrackMouseEvent(lpeventtrack: *mut TRACKMOUSEEVENT) -> super::super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn _TrackMouseEvent(lpeventtrack : *mut TRACKMOUSEEVENT) -> super::super::super::Foundation:: BOOL); - unsafe { _TrackMouseEvent(core::mem::transmute(lpeventtrack)) } + unsafe { _TrackMouseEvent(lpeventtrack as _) } } #[inline] pub unsafe fn keybd_event(bvk: u8, bscan: u8, dwflags: KEYBD_EVENT_FLAGS, dwextrainfo: usize) { 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 d6904ab3a7..e65a00c402 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 @@ -6,84 +6,84 @@ pub unsafe fn EnableMouseInPointer(fenable: bool) -> windows_core::Result<()> { #[inline] pub unsafe fn GetPointerCursorId(pointerid: u32, cursorid: *mut u32) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetPointerCursorId(pointerid : u32, cursorid : *mut u32) -> super::super::super::Foundation:: BOOL); - unsafe { GetPointerCursorId(pointerid, core::mem::transmute(cursorid)).ok() } + unsafe { GetPointerCursorId(pointerid, cursorid as _).ok() } } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls"))] #[inline] 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); - unsafe { GetPointerDevice(device, core::mem::transmute(pointerdevice)).ok() } + unsafe { GetPointerDevice(device, pointerdevice as _).ok() } } #[cfg(feature = "Win32_UI_Controls")] #[inline] 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); - unsafe { GetPointerDeviceCursors(device, core::mem::transmute(cursorcount), core::mem::transmute(devicecursors.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { GetPointerDeviceCursors(device, cursorcount as _, devicecursors.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_UI_Controls")] #[inline] 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); - unsafe { GetPointerDeviceProperties(device, core::mem::transmute(propertycount), core::mem::transmute(pointerproperties.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { GetPointerDeviceProperties(device, propertycount as _, pointerproperties.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { GetPointerDeviceRects(device, core::mem::transmute(pointerdevicerect), core::mem::transmute(displayrect)).ok() } + unsafe { GetPointerDeviceRects(device, pointerdevicerect as _, displayrect as _).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); - unsafe { GetPointerDevices(core::mem::transmute(devicecount), core::mem::transmute(pointerdevices.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { GetPointerDevices(devicecount as _, pointerdevices.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { GetPointerFrameInfo(pointerid, core::mem::transmute(pointercount), core::mem::transmute(pointerinfo.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { GetPointerFrameInfo(pointerid, pointercount as _, pointerinfo.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { GetPointerFrameInfoHistory(pointerid, core::mem::transmute(entriescount), core::mem::transmute(pointercount), core::mem::transmute(pointerinfo.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { GetPointerFrameInfoHistory(pointerid, entriescount as _, pointercount as _, pointerinfo.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { GetPointerFramePenInfo(pointerid, core::mem::transmute(pointercount), core::mem::transmute(peninfo.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { GetPointerFramePenInfo(pointerid, pointercount as _, peninfo.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { GetPointerFramePenInfoHistory(pointerid, core::mem::transmute(entriescount), core::mem::transmute(pointercount), core::mem::transmute(peninfo.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { GetPointerFramePenInfoHistory(pointerid, entriescount as _, pointercount as _, peninfo.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { GetPointerFrameTouchInfo(pointerid, core::mem::transmute(pointercount), core::mem::transmute(touchinfo.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { GetPointerFrameTouchInfo(pointerid, pointercount as _, touchinfo.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { GetPointerFrameTouchInfoHistory(pointerid, core::mem::transmute(entriescount), core::mem::transmute(pointercount), core::mem::transmute(touchinfo.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { GetPointerFrameTouchInfoHistory(pointerid, entriescount as _, pointercount as _, touchinfo.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] pub unsafe fn GetPointerInfo(pointerid: u32, pointerinfo: *mut POINTER_INFO) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetPointerInfo(pointerid : u32, pointerinfo : *mut POINTER_INFO) -> super::super::super::Foundation:: BOOL); - unsafe { GetPointerInfo(pointerid, core::mem::transmute(pointerinfo)).ok() } + unsafe { GetPointerInfo(pointerid, pointerinfo as _).ok() } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[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); - unsafe { GetPointerInfoHistory(pointerid, core::mem::transmute(entriescount), core::mem::transmute(pointerinfo.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { GetPointerInfoHistory(pointerid, entriescount as _, pointerinfo.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn GetPointerInputTransform(pointerid: u32, inputtransform: &mut [INPUT_TRANSFORM]) -> windows_core::Result<()> { @@ -94,37 +94,37 @@ pub unsafe fn GetPointerInputTransform(pointerid: u32, inputtransform: &mut [INP #[inline] pub unsafe fn GetPointerPenInfo(pointerid: u32, peninfo: *mut POINTER_PEN_INFO) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetPointerPenInfo(pointerid : u32, peninfo : *mut POINTER_PEN_INFO) -> super::super::super::Foundation:: BOOL); - unsafe { GetPointerPenInfo(pointerid, core::mem::transmute(peninfo)).ok() } + unsafe { GetPointerPenInfo(pointerid, peninfo as _).ok() } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[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); - unsafe { GetPointerPenInfoHistory(pointerid, core::mem::transmute(entriescount), core::mem::transmute(peninfo.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { GetPointerPenInfoHistory(pointerid, entriescount as _, peninfo.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] pub unsafe fn GetPointerTouchInfo(pointerid: u32, touchinfo: *mut POINTER_TOUCH_INFO) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetPointerTouchInfo(pointerid : u32, touchinfo : *mut POINTER_TOUCH_INFO) -> super::super::super::Foundation:: BOOL); - unsafe { GetPointerTouchInfo(pointerid, core::mem::transmute(touchinfo)).ok() } + unsafe { GetPointerTouchInfo(pointerid, touchinfo as _).ok() } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[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); - unsafe { GetPointerTouchInfoHistory(pointerid, core::mem::transmute(entriescount), core::mem::transmute(touchinfo.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { GetPointerTouchInfoHistory(pointerid, entriescount as _, touchinfo.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] pub unsafe fn GetPointerType(pointerid: u32, pointertype: *mut super::super::WindowsAndMessaging::POINTER_INPUT_TYPE) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetPointerType(pointerid : u32, pointertype : *mut super::super::WindowsAndMessaging:: POINTER_INPUT_TYPE) -> super::super::super::Foundation:: BOOL); - unsafe { GetPointerType(pointerid, core::mem::transmute(pointertype)).ok() } + unsafe { GetPointerType(pointerid, pointertype as _).ok() } } #[cfg(feature = "Win32_UI_Controls")] #[inline] pub unsafe fn GetRawPointerDeviceData(pointerid: u32, historycount: u32, pproperties: &[super::super::Controls::POINTER_DEVICE_PROPERTY], pvalues: *mut i32) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetRawPointerDeviceData(pointerid : u32, historycount : u32, propertiescount : u32, pproperties : *const super::super::Controls:: POINTER_DEVICE_PROPERTY, pvalues : *mut i32) -> super::super::super::Foundation:: BOOL); - unsafe { GetRawPointerDeviceData(pointerid, historycount, pproperties.len().try_into().unwrap(), core::mem::transmute(pproperties.as_ptr()), core::mem::transmute(pvalues)).ok() } + unsafe { GetRawPointerDeviceData(pointerid, historycount, pproperties.len().try_into().unwrap(), core::mem::transmute(pproperties.as_ptr()), pvalues as _).ok() } } #[inline] pub unsafe fn GetUnpredictedMessagePos() -> u32 { 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 d6fa690084..64e385a990 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 @@ -11,7 +11,7 @@ pub unsafe fn CloseTouchInputHandle(htouchinput: HTOUCHINPUT) -> windows_core::R #[inline] 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); - unsafe { GetGestureConfig(hwnd, dwreserved, dwflags, pcids, core::mem::transmute(pgestureconfig), cbsize).ok() } + unsafe { GetGestureConfig(hwnd, dwreserved, dwflags, pcids, pgestureconfig as _, cbsize).ok() } } #[inline] pub unsafe fn GetGestureExtraArgs(hgestureinfo: HGESTUREINFO, pextraargs: &mut [u8]) -> windows_core::Result<()> { @@ -21,7 +21,7 @@ pub unsafe fn GetGestureExtraArgs(hgestureinfo: HGESTUREINFO, pextraargs: &mut [ #[inline] 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); - unsafe { GetGestureInfo(hgestureinfo, core::mem::transmute(pgestureinfo)).ok() } + unsafe { GetGestureInfo(hgestureinfo, pgestureinfo as _).ok() } } #[inline] pub unsafe fn GetTouchInputInfo(htouchinput: HTOUCHINPUT, pinputs: &mut [TOUCHINPUT], cbsize: i32) -> windows_core::Result<()> { @@ -31,7 +31,7 @@ pub unsafe fn GetTouchInputInfo(htouchinput: HTOUCHINPUT, pinputs: &mut [TOUCHIN #[inline] 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); - unsafe { IsTouchWindow(hwnd, core::mem::transmute(pulflags.unwrap_or(core::mem::zeroed()))) } + unsafe { IsTouchWindow(hwnd, pulflags.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn RegisterTouchWindow(hwnd: super::super::super::Foundation::HWND, ulflags: REGISTER_TOUCH_WINDOW_FLAGS) -> windows_core::Result<()> { diff --git a/crates/libs/windows/src/Windows/Win32/UI/Input/XboxController/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Input/XboxController/mod.rs index f06f005bea..5a36f291b1 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 @@ -6,27 +6,27 @@ pub unsafe fn XInputEnable(enable: bool) { #[inline] 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); - unsafe { XInputGetAudioDeviceIds(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()))) } + unsafe { XInputGetAudioDeviceIds(dwuserindex, prenderdeviceid.unwrap_or(core::mem::zeroed()) as _, prendercount.unwrap_or(core::mem::zeroed()) as _, pcapturedeviceid.unwrap_or(core::mem::zeroed()) as _, pcapturecount.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn XInputGetBatteryInformation(dwuserindex: u32, devtype: BATTERY_DEVTYPE, pbatteryinformation: *mut XINPUT_BATTERY_INFORMATION) -> u32 { windows_targets::link!("xinput1_4.dll" "system" fn XInputGetBatteryInformation(dwuserindex : u32, devtype : BATTERY_DEVTYPE, pbatteryinformation : *mut XINPUT_BATTERY_INFORMATION) -> u32); - unsafe { XInputGetBatteryInformation(dwuserindex, devtype, core::mem::transmute(pbatteryinformation)) } + unsafe { XInputGetBatteryInformation(dwuserindex, devtype, pbatteryinformation as _) } } #[inline] pub unsafe fn XInputGetCapabilities(dwuserindex: u32, dwflags: XINPUT_FLAG, pcapabilities: *mut XINPUT_CAPABILITIES) -> u32 { windows_targets::link!("xinput1_4.dll" "system" fn XInputGetCapabilities(dwuserindex : u32, dwflags : XINPUT_FLAG, pcapabilities : *mut XINPUT_CAPABILITIES) -> u32); - unsafe { XInputGetCapabilities(dwuserindex, dwflags, core::mem::transmute(pcapabilities)) } + unsafe { XInputGetCapabilities(dwuserindex, dwflags, pcapabilities as _) } } #[inline] 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); - unsafe { XInputGetKeystroke(dwuserindex, core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pkeystroke)) } + unsafe { XInputGetKeystroke(dwuserindex, dwreserved.unwrap_or(core::mem::zeroed()) as _, pkeystroke as _) } } #[inline] pub unsafe fn XInputGetState(dwuserindex: u32, pstate: *mut XINPUT_STATE) -> u32 { windows_targets::link!("xinput1_4.dll" "system" fn XInputGetState(dwuserindex : u32, pstate : *mut XINPUT_STATE) -> u32); - unsafe { XInputGetState(dwuserindex, core::mem::transmute(pstate)) } + unsafe { XInputGetState(dwuserindex, pstate as _) } } #[inline] pub unsafe fn XInputSetState(dwuserindex: u32, pvibration: *const XINPUT_VIBRATION) -> 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 40fd953bc1..05eda4b835 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Input/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Input/mod.rs @@ -20,42 +20,42 @@ pub unsafe fn DefRawInputProc(parawinput: &[*const RAWINPUT], cbsizeheader: u32) #[inline] pub unsafe fn GetCIMSSM(inputmessagesource: *mut INPUT_MESSAGE_SOURCE) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn GetCIMSSM(inputmessagesource : *mut INPUT_MESSAGE_SOURCE) -> super::super::Foundation:: BOOL); - unsafe { GetCIMSSM(core::mem::transmute(inputmessagesource)) } + unsafe { GetCIMSSM(inputmessagesource as _) } } #[inline] pub unsafe fn GetCurrentInputMessageSource(inputmessagesource: *mut INPUT_MESSAGE_SOURCE) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetCurrentInputMessageSource(inputmessagesource : *mut INPUT_MESSAGE_SOURCE) -> super::super::Foundation:: BOOL); - unsafe { GetCurrentInputMessageSource(core::mem::transmute(inputmessagesource)).ok() } + unsafe { GetCurrentInputMessageSource(inputmessagesource as _).ok() } } #[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); - unsafe { GetRawInputBuffer(core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbsize), cbsizeheader) } + unsafe { GetRawInputBuffer(pdata.unwrap_or(core::mem::zeroed()) as _, pcbsize as _, cbsizeheader) } } #[inline] 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); - unsafe { GetRawInputData(hrawinput, uicommand, core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbsize), cbsizeheader) } + unsafe { GetRawInputData(hrawinput, uicommand, pdata.unwrap_or(core::mem::zeroed()) as _, pcbsize as _, cbsizeheader) } } #[inline] 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); - unsafe { GetRawInputDeviceInfoA(core::mem::transmute(hdevice.unwrap_or(core::mem::zeroed())), uicommand, core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbsize)) } + unsafe { GetRawInputDeviceInfoA(hdevice.unwrap_or(core::mem::zeroed()) as _, uicommand, pdata.unwrap_or(core::mem::zeroed()) as _, pcbsize as _) } } #[inline] 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); - unsafe { GetRawInputDeviceInfoW(core::mem::transmute(hdevice.unwrap_or(core::mem::zeroed())), uicommand, core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbsize)) } + unsafe { GetRawInputDeviceInfoW(hdevice.unwrap_or(core::mem::zeroed()) as _, uicommand, pdata.unwrap_or(core::mem::zeroed()) as _, pcbsize as _) } } #[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); - unsafe { GetRawInputDeviceList(core::mem::transmute(prawinputdevicelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(puinumdevices), cbsize) } + unsafe { GetRawInputDeviceList(prawinputdevicelist.unwrap_or(core::mem::zeroed()) as _, puinumdevices as _, 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); - unsafe { GetRegisteredRawInputDevices(core::mem::transmute(prawinputdevices.unwrap_or(core::mem::zeroed())), core::mem::transmute(puinumdevices), cbsize) } + unsafe { GetRegisteredRawInputDevices(prawinputdevices.unwrap_or(core::mem::zeroed()) as _, puinumdevices as _, 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 1564a98d71..993109d415 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/InteractionContext/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/InteractionContext/mod.rs @@ -73,7 +73,7 @@ pub unsafe fn GetStateInteractionContext(interactioncontext: HINTERACTIONCONTEXT windows_targets::link!("ninput.dll" "system" fn GetStateInteractionContext(interactioncontext : HINTERACTIONCONTEXT, pointerinfo : *const super::Input::Pointer:: POINTER_INFO, state : *mut INTERACTION_STATE) -> windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - GetStateInteractionContext(interactioncontext, core::mem::transmute(pointerinfo.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + GetStateInteractionContext(interactioncontext, pointerinfo.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -112,13 +112,13 @@ pub unsafe fn ProcessPointerFramesInteractionContext(interactioncontext: HINTERA #[inline] 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); - unsafe { RegisterOutputCallbackInteractionContext(interactioncontext, outputcallback, core::mem::transmute(clientdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { RegisterOutputCallbackInteractionContext(interactioncontext, outputcallback, clientdata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] 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); - unsafe { RegisterOutputCallbackInteractionContext2(interactioncontext, outputcallback, core::mem::transmute(clientdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { RegisterOutputCallbackInteractionContext2(interactioncontext, outputcallback, clientdata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn RemovePointerInteractionContext(interactioncontext: HINTERACTIONCONTEXT, pointerid: u32) -> windows_core::Result<()> { diff --git a/crates/libs/windows/src/Windows/Win32/UI/LegacyWindowsEnvironmentFeatures/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/LegacyWindowsEnvironmentFeatures/mod.rs index 946c1817a5..76c3b2c44d 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/LegacyWindowsEnvironmentFeatures/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/LegacyWindowsEnvironmentFeatures/mod.rs @@ -19,7 +19,7 @@ impl IADesktopP2 { unsafe { (windows_core::Interface::vtable(self).ReReadWallpaper)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetADObjectFlags(&self, pdwflags: *mut u32, dwmask: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetADObjectFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwflags), dwmask).ok() } + unsafe { (windows_core::Interface::vtable(self).GetADObjectFlags)(windows_core::Interface::as_raw(self), pdwflags as _, dwmask).ok() } } pub unsafe fn UpdateAllDesktopSubscriptions(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UpdateAllDesktopSubscriptions)(windows_core::Interface::as_raw(self)).ok() } @@ -107,7 +107,7 @@ impl IActiveDesktopP { unsafe { (windows_core::Interface::vtable(self).SetScheme)(windows_core::Interface::as_raw(self), pwszschemename.param().abi(), dwflags).ok() } } pub unsafe fn GetScheme(&self, pwszschemename: windows_core::PWSTR, pdwcchbuffer: *mut u32, dwflags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetScheme)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszschemename), core::mem::transmute(pdwcchbuffer), dwflags).ok() } + unsafe { (windows_core::Interface::vtable(self).GetScheme)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszschemename), pdwcchbuffer as _, dwflags).ok() } } } #[repr(C)] @@ -211,13 +211,13 @@ impl IEmptyVolumeCache { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), hkregkey, pcwszvolume.param().abi(), core::mem::transmute(ppwszdisplayname), core::mem::transmute(ppwszdescription), core::mem::transmute(pdwflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), hkregkey, pcwszvolume.param().abi(), ppwszdisplayname as _, ppwszdescription as _, pdwflags as _).ok() } } pub unsafe fn GetSpaceUsed(&self, pdwlspaceused: *mut u64, picb: P1) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetSpaceUsed)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwlspaceused), picb.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSpaceUsed)(windows_core::Interface::as_raw(self), pdwlspaceused as _, picb.param().abi()).ok() } } pub unsafe fn Purge(&self, dwlspacetofree: u64, picb: P1) -> windows_core::Result<()> where @@ -324,7 +324,7 @@ impl IEmptyVolumeCache2 { P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).InitializeEx)(windows_core::Interface::as_raw(self), hkregkey, pcwszvolume.param().abi(), pcwszkeyname.param().abi(), core::mem::transmute(ppwszdisplayname), core::mem::transmute(ppwszdescription), core::mem::transmute(ppwszbtntext), core::mem::transmute(pdwflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).InitializeEx)(windows_core::Interface::as_raw(self), hkregkey, pcwszvolume.param().abi(), pcwszkeyname.param().abi(), ppwszdisplayname as _, ppwszdescription as _, ppwszbtntext as _, pdwflags as _).ok() } } } #[repr(C)] @@ -416,7 +416,7 @@ impl IReconcilableObject { P0: windows_core::Param, P7: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Reconcile)(windows_core::Interface::as_raw(self), pinitiator.param().abi(), dwflags, hwndowner, 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() } + unsafe { (windows_core::Interface::vtable(self).Reconcile)(windows_core::Interface::as_raw(self), pinitiator.param().abi(), dwflags, hwndowner, hwndprogressfeedback, rgpmkotherinput.len().try_into().unwrap(), core::mem::transmute(rgpmkotherinput.as_ptr()), ploutindex as _, pstgnewresidues.param().abi(), pvreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetProgressFeedbackMaxEstimate(&self) -> windows_core::Result { unsafe { 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 75900bd7b6..cf0339c5b7 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Magnification/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Magnification/mod.rs @@ -1,17 +1,17 @@ #[inline] 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); - unsafe { MagGetColorEffect(hwnd, core::mem::transmute(peffect)) } + unsafe { MagGetColorEffect(hwnd, peffect as _) } } #[inline] pub unsafe fn MagGetFullscreenColorEffect(peffect: *mut MAGCOLOREFFECT) -> super::super::Foundation::BOOL { windows_targets::link!("magnification.dll" "system" fn MagGetFullscreenColorEffect(peffect : *mut MAGCOLOREFFECT) -> super::super::Foundation:: BOOL); - unsafe { MagGetFullscreenColorEffect(core::mem::transmute(peffect)) } + unsafe { MagGetFullscreenColorEffect(peffect as _) } } #[inline] pub unsafe fn MagGetFullscreenTransform(pmaglevel: *mut f32, pxoffset: *mut i32, pyoffset: *mut i32) -> super::super::Foundation::BOOL { windows_targets::link!("magnification.dll" "system" fn MagGetFullscreenTransform(pmaglevel : *mut f32, pxoffset : *mut i32, pyoffset : *mut i32) -> super::super::Foundation:: BOOL); - unsafe { MagGetFullscreenTransform(core::mem::transmute(pmaglevel), core::mem::transmute(pxoffset), core::mem::transmute(pyoffset)) } + unsafe { MagGetFullscreenTransform(pmaglevel as _, pxoffset as _, pyoffset as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -22,22 +22,22 @@ pub unsafe fn MagGetImageScalingCallback(hwnd: super::super::Foundation::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 { windows_targets::link!("magnification.dll" "system" fn MagGetInputTransform(pfenabled : *mut super::super::Foundation:: BOOL, prectsource : *mut super::super::Foundation:: RECT, prectdest : *mut super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - unsafe { MagGetInputTransform(core::mem::transmute(pfenabled), core::mem::transmute(prectsource), core::mem::transmute(prectdest)) } + unsafe { MagGetInputTransform(pfenabled as _, prectsource as _, prectdest as _) } } #[inline] 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); - unsafe { MagGetWindowFilterList(hwnd, core::mem::transmute(pdwfiltermode), count, core::mem::transmute(phwnd)) } + unsafe { MagGetWindowFilterList(hwnd, pdwfiltermode as _, count, phwnd as _) } } #[inline] 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); - unsafe { MagGetWindowSource(hwnd, core::mem::transmute(prect)) } + unsafe { MagGetWindowSource(hwnd, prect as _) } } #[inline] 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); - unsafe { MagGetWindowTransform(hwnd, core::mem::transmute(ptransform)) } + unsafe { MagGetWindowTransform(hwnd, ptransform as _) } } #[inline] pub unsafe fn MagInitialize() -> super::super::Foundation::BOOL { @@ -47,7 +47,7 @@ pub unsafe fn MagInitialize() -> super::super::Foundation::BOOL { #[inline] 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); - unsafe { MagSetColorEffect(hwnd, core::mem::transmute(peffect)) } + unsafe { MagSetColorEffect(hwnd, peffect as _) } } #[inline] pub unsafe fn MagSetFullscreenColorEffect(peffect: *const MAGCOLOREFFECT) -> super::super::Foundation::BOOL { @@ -73,7 +73,7 @@ pub unsafe fn MagSetInputTransform(fenabled: bool, prectsource: *const super::su #[inline] 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); - unsafe { MagSetWindowFilterList(hwnd, dwfiltermode, count, core::mem::transmute(phwnd)) } + unsafe { MagSetWindowFilterList(hwnd, dwfiltermode, count, phwnd as _) } } #[inline] pub unsafe fn MagSetWindowSource(hwnd: super::super::Foundation::HWND, rect: super::super::Foundation::RECT) -> super::super::Foundation::BOOL { @@ -83,7 +83,7 @@ pub unsafe fn MagSetWindowSource(hwnd: super::super::Foundation::HWND, rect: sup #[inline] 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); - unsafe { MagSetWindowTransform(hwnd, core::mem::transmute(ptransform)) } + unsafe { MagSetWindowTransform(hwnd, ptransform as _) } } #[inline] pub unsafe fn MagShowSystemCursor(fshowcursor: bool) -> 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 99b1e4323c..bbc0ad6442 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Ribbon/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Ribbon/mod.rs @@ -244,13 +244,13 @@ impl IUICommandHandler { where P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Execute)(windows_core::Interface::as_raw(self), commandid, verb, core::mem::transmute(key.unwrap_or(core::mem::zeroed())), core::mem::transmute(currentvalue.unwrap_or(core::mem::zeroed())), commandexecutionproperties.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).Execute)(windows_core::Interface::as_raw(self), commandid, verb, key.unwrap_or(core::mem::zeroed()) as _, currentvalue.unwrap_or(core::mem::zeroed()) as _, 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 { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).UpdateProperty)(windows_core::Interface::as_raw(self), commandid, key, core::mem::transmute(currentvalue.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + (windows_core::Interface::vtable(self).UpdateProperty)(windows_core::Interface::as_raw(self), commandid, key, currentvalue.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } } @@ -416,7 +416,7 @@ impl IUIFramework { unsafe { (windows_core::Interface::vtable(self).LoadUI)(windows_core::Interface::as_raw(self), 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetView)(windows_core::Interface::as_raw(self), viewid, riid, core::mem::transmute(ppv)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetView)(windows_core::Interface::as_raw(self), viewid, riid, ppv as _).ok() } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn GetUICommandProperty(&self, commandid: u32, key: *const super::super::Foundation::PROPERTYKEY) -> windows_core::Result { @@ -430,7 +430,7 @@ impl IUIFramework { unsafe { (windows_core::Interface::vtable(self).SetUICommandProperty)(windows_core::Interface::as_raw(self), commandid, 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<()> { - unsafe { (windows_core::Interface::vtable(self).InvalidateUICommand)(windows_core::Interface::as_raw(self), commandid, flags, core::mem::transmute(key.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).InvalidateUICommand)(windows_core::Interface::as_raw(self), commandid, flags, key.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn FlushPendingInvalidations(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).FlushPendingInvalidations)(windows_core::Interface::as_raw(self)).ok() } diff --git a/crates/libs/windows/src/Windows/Win32/UI/Shell/PropertiesSystem/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Shell/PropertiesSystem/mod.rs index 73ba7ce9b5..13522d5dd5 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 @@ -10,7 +10,7 @@ where P0: windows_core::Param, { windows_targets::link!("propsys.dll" "system" fn PSCreateAdapterFromPropertyStore(pps : * mut core::ffi::c_void, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PSCreateAdapterFromPropertyStore(pps.param().abi(), riid, core::mem::transmute(ppv)).ok() } + unsafe { PSCreateAdapterFromPropertyStore(pps.param().abi(), riid, ppv as _).ok() } } #[inline] pub unsafe fn PSCreateDelayedMultiplexPropertyStore(flags: GETPROPERTYSTOREFLAGS, pdpsf: P1, rgstoreids: &[u32], riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -18,23 +18,23 @@ where P1: windows_core::Param, { windows_targets::link!("propsys.dll" "system" fn PSCreateDelayedMultiplexPropertyStore(flags : GETPROPERTYSTOREFLAGS, pdpsf : * mut core::ffi::c_void, rgstoreids : *const u32, cstores : u32, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PSCreateDelayedMultiplexPropertyStore(flags, pdpsf.param().abi(), core::mem::transmute(rgstoreids.as_ptr()), rgstoreids.len().try_into().unwrap(), riid, core::mem::transmute(ppv)).ok() } + unsafe { PSCreateDelayedMultiplexPropertyStore(flags, pdpsf.param().abi(), core::mem::transmute(rgstoreids.as_ptr()), rgstoreids.len().try_into().unwrap(), riid, ppv as _).ok() } } #[inline] pub unsafe fn PSCreateMemoryPropertyStore(riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn PSCreateMemoryPropertyStore(riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PSCreateMemoryPropertyStore(riid, core::mem::transmute(ppv)).ok() } + unsafe { PSCreateMemoryPropertyStore(riid, ppv as _).ok() } } #[inline] pub unsafe fn PSCreateMultiplexPropertyStore(prgpunkstores: &[Option], riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn PSCreateMultiplexPropertyStore(prgpunkstores : *const * mut core::ffi::c_void, cstores : u32, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PSCreateMultiplexPropertyStore(core::mem::transmute(prgpunkstores.as_ptr()), prgpunkstores.len().try_into().unwrap(), riid, core::mem::transmute(ppv)).ok() } + unsafe { PSCreateMultiplexPropertyStore(core::mem::transmute(prgpunkstores.as_ptr()), prgpunkstores.len().try_into().unwrap(), riid, ppv as _).ok() } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] pub unsafe fn PSCreatePropertyChangeArray(rgpropkey: Option<*const super::super::super::Foundation::PROPERTYKEY>, 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); - unsafe { 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())), cchanges, riid, core::mem::transmute(ppv)).ok() } + unsafe { PSCreatePropertyChangeArray(rgpropkey.unwrap_or(core::mem::zeroed()) as _, rgflags.unwrap_or(core::mem::zeroed()) as _, rgpropvar.unwrap_or(core::mem::zeroed()) as _, cchanges, riid, ppv as _).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<()> @@ -42,7 +42,7 @@ where P0: windows_core::Param, { windows_targets::link!("propsys.dll" "system" fn PSCreatePropertyStoreFromObject(punk : * mut core::ffi::c_void, grfmode : u32, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PSCreatePropertyStoreFromObject(punk.param().abi(), grfmode, riid, core::mem::transmute(ppv)).ok() } + unsafe { PSCreatePropertyStoreFromObject(punk.param().abi(), grfmode, riid, ppv as _).ok() } } #[cfg(feature = "Win32_System_Com_StructuredStorage")] #[inline] @@ -51,18 +51,18 @@ where P0: windows_core::Param, { windows_targets::link!("propsys.dll" "system" fn PSCreatePropertyStoreFromPropertySetStorage(ppss : * mut core::ffi::c_void, grfmode : u32, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PSCreatePropertyStoreFromPropertySetStorage(ppss.param().abi(), grfmode, riid, core::mem::transmute(ppv)).ok() } + unsafe { PSCreatePropertyStoreFromPropertySetStorage(ppss.param().abi(), grfmode, riid, ppv as _).ok() } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] pub unsafe fn PSCreateSimplePropertyChange(flags: PKA_FLAGS, key: *const super::super::super::Foundation::PROPERTYKEY, propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn PSCreateSimplePropertyChange(flags : PKA_FLAGS, key : *const super::super::super::Foundation:: PROPERTYKEY, propvar : *const super::super::super::System::Com::StructuredStorage:: PROPVARIANT, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PSCreateSimplePropertyChange(flags, key, core::mem::transmute(propvar), riid, core::mem::transmute(ppv)).ok() } + unsafe { PSCreateSimplePropertyChange(flags, key, core::mem::transmute(propvar), riid, ppv as _).ok() } } #[inline] pub unsafe fn PSEnumeratePropertyDescriptions(filteron: PROPDESC_ENUMFILTER, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn PSEnumeratePropertyDescriptions(filteron : PROPDESC_ENUMFILTER, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PSEnumeratePropertyDescriptions(filteron, riid, core::mem::transmute(ppv)).ok() } + unsafe { PSEnumeratePropertyDescriptions(filteron, riid, ppv as _).ok() } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] @@ -106,7 +106,7 @@ where P0: windows_core::Param, { windows_targets::link!("propsys.dll" "system" fn PSGetItemPropertyHandler(punkitem : * mut core::ffi::c_void, freadwrite : super::super::super::Foundation:: BOOL, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PSGetItemPropertyHandler(punkitem.param().abi(), freadwrite.into(), riid, core::mem::transmute(ppv)).ok() } + unsafe { PSGetItemPropertyHandler(punkitem.param().abi(), freadwrite.into(), riid, ppv as _).ok() } } #[inline] pub unsafe fn PSGetItemPropertyHandlerWithCreateObject(punkitem: P0, freadwrite: bool, punkcreateobject: P2, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -115,7 +115,7 @@ where P2: windows_core::Param, { windows_targets::link!("propsys.dll" "system" fn PSGetItemPropertyHandlerWithCreateObject(punkitem : * mut core::ffi::c_void, freadwrite : super::super::super::Foundation:: BOOL, punkcreateobject : * mut core::ffi::c_void, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PSGetItemPropertyHandlerWithCreateObject(punkitem.param().abi(), freadwrite.into(), punkcreateobject.param().abi(), riid, core::mem::transmute(ppv)).ok() } + unsafe { PSGetItemPropertyHandlerWithCreateObject(punkitem.param().abi(), freadwrite.into(), punkcreateobject.param().abi(), riid, ppv as _).ok() } } #[inline] pub unsafe fn PSGetNameFromPropertyKey(propkey: *const super::super::super::Foundation::PROPERTYKEY) -> windows_core::Result { @@ -140,7 +140,7 @@ where #[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<()> { windows_targets::link!("propsys.dll" "system" fn PSGetPropertyDescription(propkey : *const super::super::super::Foundation:: PROPERTYKEY, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PSGetPropertyDescription(propkey, riid, core::mem::transmute(ppv)).ok() } + unsafe { PSGetPropertyDescription(propkey, riid, ppv as _).ok() } } #[inline] pub unsafe fn PSGetPropertyDescriptionByName(pszcanonicalname: P0, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -148,7 +148,7 @@ where P0: windows_core::Param, { windows_targets::link!("propsys.dll" "system" fn PSGetPropertyDescriptionByName(pszcanonicalname : windows_core::PCWSTR, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PSGetPropertyDescriptionByName(pszcanonicalname.param().abi(), riid, core::mem::transmute(ppv)).ok() } + unsafe { PSGetPropertyDescriptionByName(pszcanonicalname.param().abi(), riid, ppv as _).ok() } } #[inline] pub unsafe fn PSGetPropertyDescriptionListFromString(pszproplist: P0, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -156,7 +156,7 @@ where P0: windows_core::Param, { windows_targets::link!("propsys.dll" "system" fn PSGetPropertyDescriptionListFromString(pszproplist : windows_core::PCWSTR, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PSGetPropertyDescriptionListFromString(pszproplist.param().abi(), riid, core::mem::transmute(ppv)).ok() } + unsafe { PSGetPropertyDescriptionListFromString(pszproplist.param().abi(), riid, ppv as _).ok() } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] @@ -173,12 +173,12 @@ where P0: windows_core::Param, { windows_targets::link!("propsys.dll" "system" fn PSGetPropertyKeyFromName(pszname : windows_core::PCWSTR, ppropkey : *mut super::super::super::Foundation:: PROPERTYKEY) -> windows_core::HRESULT); - unsafe { PSGetPropertyKeyFromName(pszname.param().abi(), core::mem::transmute(ppropkey)).ok() } + unsafe { PSGetPropertyKeyFromName(pszname.param().abi(), ppropkey as _).ok() } } #[inline] pub unsafe fn PSGetPropertySystem(riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn PSGetPropertySystem(riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PSGetPropertySystem(riid, core::mem::transmute(ppv)).ok() } + unsafe { PSGetPropertySystem(riid, ppv as _).ok() } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] @@ -326,7 +326,7 @@ where P1: windows_core::Param, { windows_targets::link!("propsys.dll" "system" fn PSPropertyBag_ReadPropertyKey(propbag : * mut core::ffi::c_void, propname : windows_core::PCWSTR, value : *mut super::super::super::Foundation:: PROPERTYKEY) -> windows_core::HRESULT); - unsafe { PSPropertyBag_ReadPropertyKey(propbag.param().abi(), propname.param().abi(), core::mem::transmute(value)).ok() } + unsafe { PSPropertyBag_ReadPropertyKey(propbag.param().abi(), propname.param().abi(), value as _).ok() } } #[cfg(feature = "Win32_System_Com_StructuredStorage")] #[inline] @@ -421,7 +421,7 @@ where P1: windows_core::Param, { windows_targets::link!("propsys.dll" "system" fn PSPropertyBag_ReadUnknown(propbag : * mut core::ffi::c_void, propname : windows_core::PCWSTR, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { PSPropertyBag_ReadUnknown(propbag.param().abi(), propname.param().abi(), riid, core::mem::transmute(ppv)).ok() } + unsafe { PSPropertyBag_ReadUnknown(propbag.param().abi(), propname.param().abi(), riid, ppv as _).ok() } } #[cfg(feature = "Win32_System_Com_StructuredStorage")] #[inline] @@ -582,7 +582,7 @@ where P0: windows_core::Param, { windows_targets::link!("propsys.dll" "system" fn PSPropertyKeyFromString(pszstring : windows_core::PCWSTR, pkey : *mut super::super::super::Foundation:: PROPERTYKEY) -> windows_core::HRESULT); - unsafe { PSPropertyKeyFromString(pszstring.param().abi(), core::mem::transmute(pkey)).ok() } + unsafe { PSPropertyKeyFromString(pszstring.param().abi(), pkey as _).ok() } } #[inline] pub unsafe fn PSRefreshPropertySchema() -> windows_core::Result<()> { @@ -623,7 +623,7 @@ where #[inline] 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); - unsafe { PifMgr_CloseProperties(core::mem::transmute(hprops.unwrap_or(core::mem::zeroed())), flopt) } + unsafe { PifMgr_CloseProperties(hprops.unwrap_or(core::mem::zeroed()) as _, flopt) } } #[inline] pub unsafe fn PifMgr_GetProperties(hprops: Option, pszgroup: P1, lpprops: Option<*mut core::ffi::c_void>, cbprops: i32, flopt: u32) -> i32 @@ -631,7 +631,7 @@ where P1: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn PifMgr_GetProperties(hprops : super::super::super::Foundation:: HANDLE, pszgroup : windows_core::PCSTR, lpprops : *mut core::ffi::c_void, cbprops : i32, flopt : u32) -> i32); - unsafe { PifMgr_GetProperties(core::mem::transmute(hprops.unwrap_or(core::mem::zeroed())), pszgroup.param().abi(), core::mem::transmute(lpprops.unwrap_or(core::mem::zeroed())), cbprops, flopt) } + unsafe { PifMgr_GetProperties(hprops.unwrap_or(core::mem::zeroed()) as _, pszgroup.param().abi(), lpprops.unwrap_or(core::mem::zeroed()) as _, cbprops, flopt) } } #[inline] pub unsafe fn PifMgr_OpenProperties(pszapp: P0, pszpif: P1, hinf: u32, flopt: u32) -> super::super::super::Foundation::HANDLE @@ -648,7 +648,7 @@ where 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); - unsafe { PifMgr_SetProperties(core::mem::transmute(hprops.unwrap_or(core::mem::zeroed())), pszgroup.param().abi(), lpprops, cbprops, flopt) } + unsafe { PifMgr_SetProperties(hprops.unwrap_or(core::mem::zeroed()) as _, pszgroup.param().abi(), lpprops, cbprops, flopt) } } #[inline] pub unsafe fn SHAddDefaultPropertiesByExt(pszext: P0, ppropstore: P1) -> windows_core::Result<()> @@ -672,7 +672,7 @@ where #[inline] pub unsafe fn SHGetPropertyStoreFromIDList(pidl: *const super::Common::ITEMIDLIST, flags: GETPROPERTYSTOREFLAGS, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("shell32.dll" "system" fn SHGetPropertyStoreFromIDList(pidl : *const super::Common:: ITEMIDLIST, flags : GETPROPERTYSTOREFLAGS, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { SHGetPropertyStoreFromIDList(pidl, flags, riid, core::mem::transmute(ppv)).ok() } + unsafe { SHGetPropertyStoreFromIDList(pidl, flags, riid, ppv as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -693,7 +693,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); - unsafe { SHPropStgCreate(psstg.param().abi(), fmtid, core::mem::transmute(pclsid.unwrap_or(core::mem::zeroed())), grfflags, grfmode, dwdisposition, core::mem::transmute(ppstg), core::mem::transmute(pucodepage.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SHPropStgCreate(psstg.param().abi(), fmtid, pclsid.unwrap_or(core::mem::zeroed()) as _, grfflags, grfmode, dwdisposition, core::mem::transmute(ppstg), pucodepage.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] @@ -711,7 +711,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); - unsafe { SHPropStgWriteMultiple(pps.param().abi(), core::mem::transmute(pucodepage.unwrap_or(core::mem::zeroed())), cpspec, rgpspec, core::mem::transmute(rgvar), propidnamefirst).ok() } + unsafe { SHPropStgWriteMultiple(pps.param().abi(), pucodepage.unwrap_or(core::mem::zeroed()) as _, cpspec, rgpspec, core::mem::transmute(rgvar), propidnamefirst).ok() } } pub const FPSPS_DEFAULT: _PERSIST_SPROPSTORE_FLAGS = _PERSIST_SPROPSTORE_FLAGS(0i32); pub const FPSPS_READONLY: _PERSIST_SPROPSTORE_FLAGS = _PERSIST_SPROPSTORE_FLAGS(1i32); @@ -1035,7 +1035,7 @@ impl IObjectWithPropertyKey { unsafe { (windows_core::Interface::vtable(self).SetPropertyKey)(windows_core::Interface::as_raw(self), key).ok() } } pub unsafe fn GetPropertyKey(&self, pkey: *mut super::super::super::Foundation::PROPERTYKEY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPropertyKey)(windows_core::Interface::as_raw(self), core::mem::transmute(pkey)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropertyKey)(windows_core::Interface::as_raw(self), pkey as _).ok() } } } #[repr(C)] @@ -1083,7 +1083,7 @@ impl IPersistSerializedPropStorage { unsafe { (windows_core::Interface::vtable(self).SetPropertyStorage)(windows_core::Interface::as_raw(self), psps, cb).ok() } } pub unsafe fn GetPropertyStorage(&self, ppsps: *mut *mut SERIALIZEDPROPSTORAGE, pcb: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPropertyStorage)(windows_core::Interface::as_raw(self), core::mem::transmute(ppsps), core::mem::transmute(pcb)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropertyStorage)(windows_core::Interface::as_raw(self), ppsps as _, pcb as _).ok() } } } #[repr(C)] @@ -1146,7 +1146,7 @@ impl IPersistSerializedPropStorage2 { } } pub unsafe fn GetPropertyStorageBuffer(&self, psps: *mut SERIALIZEDPROPSTORAGE, cb: u32, pcbwritten: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPropertyStorageBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(psps), cb, core::mem::transmute(pcbwritten)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropertyStorageBuffer)(windows_core::Interface::as_raw(self), psps as _, cb, pcbwritten as _).ok() } } } #[repr(C)] @@ -1373,7 +1373,7 @@ windows_core::imp::define_interface!(IPropertyDescription, IPropertyDescription_ windows_core::imp::interface_hierarchy!(IPropertyDescription, windows_core::IUnknown); impl IPropertyDescription { pub unsafe fn GetPropertyKey(&self, pkey: *mut super::super::super::Foundation::PROPERTYKEY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPropertyKey)(windows_core::Interface::as_raw(self), core::mem::transmute(pkey)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropertyKey)(windows_core::Interface::as_raw(self), pkey as _).ok() } } pub unsafe fn GetCanonicalName(&self) -> windows_core::Result { unsafe { @@ -1443,7 +1443,7 @@ impl IPropertyDescription { } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn GetRelativeDescription(&self, propvar1: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, propvar2: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, ppszdesc1: *mut windows_core::PWSTR, ppszdesc2: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRelativeDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(propvar1), core::mem::transmute(propvar2), core::mem::transmute(ppszdesc1), core::mem::transmute(ppszdesc2)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRelativeDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(propvar1), core::mem::transmute(propvar2), ppszdesc1 as _, ppszdesc2 as _).ok() } } pub unsafe fn GetSortDescription(&self) -> windows_core::Result { unsafe { @@ -1465,7 +1465,7 @@ impl IPropertyDescription { } #[cfg(feature = "Win32_System_Search_Common")] pub unsafe fn GetConditionType(&self, pcontype: *mut PROPDESC_CONDITION_TYPE, popdefault: *mut super::super::super::System::Search::Common::CONDITION_OPERATION) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetConditionType)(windows_core::Interface::as_raw(self), core::mem::transmute(pcontype), core::mem::transmute(popdefault)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetConditionType)(windows_core::Interface::as_raw(self), pcontype as _, popdefault as _).ok() } } pub unsafe fn GetEnumTypeList(&self) -> windows_core::Result where @@ -2431,7 +2431,7 @@ impl IPropertyStore { } } pub unsafe fn GetAt(&self, iprop: u32, pkey: *mut super::super::super::Foundation::PROPERTYKEY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAt)(windows_core::Interface::as_raw(self), iprop, core::mem::transmute(pkey)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAt)(windows_core::Interface::as_raw(self), iprop, pkey as _).ok() } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn GetValue(&self, key: *const super::super::super::Foundation::PROPERTYKEY) -> windows_core::Result { @@ -2548,7 +2548,7 @@ impl IPropertyStoreCache { } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn GetValueAndState(&self, key: *const super::super::super::Foundation::PROPERTYKEY, ppropvar: *mut super::super::super::System::Com::StructuredStorage::PROPVARIANT, pstate: *mut PSC_STATE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetValueAndState)(windows_core::Interface::as_raw(self), key, core::mem::transmute(ppropvar), core::mem::transmute(pstate)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetValueAndState)(windows_core::Interface::as_raw(self), key, core::mem::transmute(ppropvar), pstate as _).ok() } } pub unsafe fn SetState(&self, key: *const super::super::super::Foundation::PROPERTYKEY, state: PSC_STATE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetState)(windows_core::Interface::as_raw(self), key, state).ok() } @@ -2920,7 +2920,7 @@ impl IPropertyUI { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ParsePropertyName)(windows_core::Interface::as_raw(self), pszname.param().abi(), core::mem::transmute(pfmtid), core::mem::transmute(ppid), core::mem::transmute(pcheaten)).ok() } + unsafe { (windows_core::Interface::vtable(self).ParsePropertyName)(windows_core::Interface::as_raw(self), pszname.param().abi(), pfmtid as _, ppid as _, pcheaten as _).ok() } } pub unsafe fn GetCannonicalName(&self, fmtid: *const windows_core::GUID, pid: u32, pwsztext: &mut [u16]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetCannonicalName)(windows_core::Interface::as_raw(self), fmtid, pid, core::mem::transmute(pwsztext.as_ptr()), pwsztext.len().try_into().unwrap()).ok() } @@ -2948,7 +2948,7 @@ impl IPropertyUI { unsafe { (windows_core::Interface::vtable(self).FormatForDisplay)(windows_core::Interface::as_raw(self), fmtid, pid, core::mem::transmute(ppropvar), puiff, core::mem::transmute(pwsztext.as_ptr()), pwsztext.len().try_into().unwrap()).ok() } } pub unsafe fn GetHelpInfo(&self, fmtid: *const windows_core::GUID, pid: u32, pwszhelpfile: &mut [u16], puhelpid: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetHelpInfo)(windows_core::Interface::as_raw(self), fmtid, pid, core::mem::transmute(pwszhelpfile.as_ptr()), pwszhelpfile.len().try_into().unwrap(), core::mem::transmute(puhelpid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetHelpInfo)(windows_core::Interface::as_raw(self), fmtid, pid, core::mem::transmute(pwszhelpfile.as_ptr()), pwszhelpfile.len().try_into().unwrap(), puhelpid as _).ok() } } } #[repr(C)] 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 f0932b57b1..0d50fe30e2 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); - unsafe { AssocGetDetailsOfPropKey(psf.param().abi(), pidl, pkey, core::mem::transmute(pv), core::mem::transmute(pffoundpropkey.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { AssocGetDetailsOfPropKey(psf.param().abi(), pidl, pkey, core::mem::transmute(pv), pffoundpropkey.unwrap_or(core::mem::zeroed()) as _).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); - unsafe { AssocGetPerceivedType(pszext.param().abi(), core::mem::transmute(ptype), core::mem::transmute(pflag), core::mem::transmute(ppsztype.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { AssocGetPerceivedType(pszext.param().abi(), ptype as _, pflag as _, ppsztype.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn AssocIsDangerous(pszassoc: P0) -> super::super::Foundation::BOOL @@ -80,7 +80,7 @@ where 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); - unsafe { AssocQueryStringA(flags, str, pszassoc.param().abi(), pszextra.param().abi(), core::mem::transmute(pszout.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchout)) } + unsafe { AssocQueryStringA(flags, str, pszassoc.param().abi(), pszextra.param().abi(), pszout.unwrap_or(core::mem::zeroed()) as _, pcchout as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -89,7 +89,7 @@ where 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); - unsafe { AssocQueryStringByKeyA(flags, str, hkassoc, pszextra.param().abi(), core::mem::transmute(pszout.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchout)) } + unsafe { AssocQueryStringByKeyA(flags, str, hkassoc, pszextra.param().abi(), pszout.unwrap_or(core::mem::zeroed()) as _, pcchout as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -98,7 +98,7 @@ where 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); - unsafe { AssocQueryStringByKeyW(flags, str, hkassoc, pszextra.param().abi(), core::mem::transmute(pszout.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchout)) } + unsafe { AssocQueryStringByKeyW(flags, str, hkassoc, pszextra.param().abi(), pszout.unwrap_or(core::mem::zeroed()) as _, pcchout as _) } } #[inline] pub unsafe fn AssocQueryStringW(flags: ASSOCF, str: ASSOCSTR, pszassoc: P2, pszextra: P3, pszout: Option, pcchout: *mut u32) -> windows_core::HRESULT @@ -107,7 +107,7 @@ where 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); - unsafe { AssocQueryStringW(flags, str, pszassoc.param().abi(), pszextra.param().abi(), core::mem::transmute(pszout.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchout)) } + unsafe { AssocQueryStringW(flags, str, pszassoc.param().abi(), pszextra.param().abi(), pszout.unwrap_or(core::mem::zeroed()) as _, pcchout as _) } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Registry", feature = "Win32_UI_Shell_Common"))] #[inline] @@ -119,12 +119,12 @@ where unsafe { let mut result__ = core::mem::zeroed(); CDefFolderMenu_Create2( - core::mem::transmute(pidlfolder.unwrap_or(core::mem::zeroed())), - core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), + pidlfolder.unwrap_or(core::mem::zeroed()) as _, + hwnd.unwrap_or(core::mem::zeroed()) as _, 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())), + pfn.unwrap_or(core::mem::zeroed()) as _, 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__, @@ -164,7 +164,7 @@ pub unsafe fn ColorHLSToRGB(whue: u16, wluminance: u16, wsaturation: u16) -> sup #[inline] 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)); - unsafe { ColorRGBToHLS(clrrgb, core::mem::transmute(pwhue), core::mem::transmute(pwluminance), core::mem::transmute(pwsaturation)) } + unsafe { ColorRGBToHLS(clrrgb, pwhue as _, pwluminance as _, pwsaturation as _) } } #[inline] pub unsafe fn CommandLineToArgvW(lpcmdline: P0, pnumargs: *mut i32) -> *mut windows_core::PWSTR @@ -172,7 +172,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn CommandLineToArgvW(lpcmdline : windows_core::PCWSTR, pnumargs : *mut i32) -> *mut windows_core::PWSTR); - unsafe { CommandLineToArgvW(lpcmdline.param().abi(), core::mem::transmute(pnumargs)) } + unsafe { CommandLineToArgvW(lpcmdline.param().abi(), pnumargs as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -182,7 +182,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); - unsafe { ConnectToConnectionPoint(punk.param().abi(), riidevent, fconnect.into(), punktarget.param().abi(), core::mem::transmute(pdwcookie), core::mem::transmute(ppcpout.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ConnectToConnectionPoint(punk.param().abi(), riidevent, fconnect.into(), punktarget.param().abi(), pdwcookie as _, ppcpout.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CreateProfile(pszusersid: P0, pszusername: P1, pszprofilepath: &mut [u16]) -> windows_core::Result<()> @@ -196,7 +196,7 @@ where #[inline] 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); - unsafe { DAD_AutoScroll(hwnd, core::mem::transmute(pad), pptnow) } + unsafe { DAD_AutoScroll(hwnd, pad as _, pptnow) } } #[inline] pub unsafe fn DAD_DragEnterEx(hwndtarget: super::super::Foundation::HWND, ptstart: super::super::Foundation::POINT) -> super::super::Foundation::BOOL { @@ -226,7 +226,7 @@ pub unsafe fn DAD_DragMove(pt: super::super::Foundation::POINT) -> super::super: #[inline] 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); - unsafe { DAD_SetDragImage(him, core::mem::transmute(pptoffset)) } + unsafe { DAD_SetDragImage(him, pptoffset as _) } } #[inline] pub unsafe fn DAD_ShowDragImage(fshow: bool) -> super::super::Foundation::BOOL { @@ -291,7 +291,7 @@ pub unsafe fn DragQueryFileW(hdrop: HDROP, ifile: u32, lpszfile: Option<&mut [u1 #[inline] 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); - unsafe { DragQueryPoint(hdrop, core::mem::transmute(ppt)) } + unsafe { DragQueryPoint(hdrop, ppt as _) } } #[inline] pub unsafe fn DriveType(idrive: i32) -> i32 { @@ -302,31 +302,31 @@ pub unsafe fn DriveType(idrive: i32) -> i32 { #[inline] 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); - unsafe { DuplicateIcon(core::mem::transmute(hinst.unwrap_or(core::mem::zeroed())), hicon) } + unsafe { DuplicateIcon(hinst.unwrap_or(core::mem::zeroed()) as _, hicon) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] 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); - unsafe { ExtractAssociatedIconA(core::mem::transmute(hinst.unwrap_or(core::mem::zeroed())), core::mem::transmute(psziconpath.as_ptr()), core::mem::transmute(piicon)) } + unsafe { ExtractAssociatedIconA(hinst.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(psziconpath.as_ptr()), piicon as _) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] 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); - unsafe { ExtractAssociatedIconExA(core::mem::transmute(hinst.unwrap_or(core::mem::zeroed())), core::mem::transmute(psziconpath.as_ptr()), core::mem::transmute(piiconindex), core::mem::transmute(piiconid)) } + unsafe { ExtractAssociatedIconExA(hinst.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(psziconpath.as_ptr()), piiconindex as _, piiconid as _) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] 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); - unsafe { ExtractAssociatedIconExW(core::mem::transmute(hinst.unwrap_or(core::mem::zeroed())), core::mem::transmute(psziconpath.as_ptr()), core::mem::transmute(piiconindex), core::mem::transmute(piiconid)) } + unsafe { ExtractAssociatedIconExW(hinst.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(psziconpath.as_ptr()), piiconindex as _, piiconid as _) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] 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); - unsafe { ExtractAssociatedIconW(core::mem::transmute(hinst.unwrap_or(core::mem::zeroed())), core::mem::transmute(psziconpath.as_ptr()), core::mem::transmute(piicon)) } + unsafe { ExtractAssociatedIconW(hinst.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(psziconpath.as_ptr()), piicon as _) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -335,7 +335,7 @@ where 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); - unsafe { ExtractIconA(core::mem::transmute(hinst.unwrap_or(core::mem::zeroed())), pszexefilename.param().abi(), niconindex) } + unsafe { ExtractIconA(hinst.unwrap_or(core::mem::zeroed()) as _, pszexefilename.param().abi(), niconindex) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -344,7 +344,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); - unsafe { ExtractIconExA(lpszfile.param().abi(), niconindex, core::mem::transmute(phiconlarge.unwrap_or(core::mem::zeroed())), core::mem::transmute(phiconsmall.unwrap_or(core::mem::zeroed())), nicons) } + unsafe { ExtractIconExA(lpszfile.param().abi(), niconindex, phiconlarge.unwrap_or(core::mem::zeroed()) as _, phiconsmall.unwrap_or(core::mem::zeroed()) as _, nicons) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -353,7 +353,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn ExtractIconExW(lpszfile : windows_core::PCWSTR, niconindex : i32, phiconlarge : *mut super::WindowsAndMessaging:: HICON, phiconsmall : *mut super::WindowsAndMessaging:: HICON, nicons : u32) -> u32); - unsafe { ExtractIconExW(lpszfile.param().abi(), niconindex, core::mem::transmute(phiconlarge.unwrap_or(core::mem::zeroed())), core::mem::transmute(phiconsmall.unwrap_or(core::mem::zeroed())), nicons) } + unsafe { ExtractIconExW(lpszfile.param().abi(), niconindex, phiconlarge.unwrap_or(core::mem::zeroed()) as _, phiconsmall.unwrap_or(core::mem::zeroed()) as _, nicons) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -362,7 +362,7 @@ where 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); - unsafe { ExtractIconW(core::mem::transmute(hinst.unwrap_or(core::mem::zeroed())), pszexefilename.param().abi(), niconindex) } + unsafe { ExtractIconW(hinst.unwrap_or(core::mem::zeroed()) as _, pszexefilename.param().abi(), niconindex) } } #[inline] pub unsafe fn FindExecutableA(lpfile: P0, lpdirectory: P1, lpresult: &mut [u8; 260]) -> super::super::Foundation::HINSTANCE @@ -385,22 +385,22 @@ where #[inline] pub unsafe fn GetAcceptLanguagesA(pszlanguages: windows_core::PSTR, pcchlanguages: *mut u32) -> windows_core::Result<()> { windows_targets::link!("shlwapi.dll" "system" fn GetAcceptLanguagesA(pszlanguages : windows_core::PSTR, pcchlanguages : *mut u32) -> windows_core::HRESULT); - unsafe { GetAcceptLanguagesA(core::mem::transmute(pszlanguages), core::mem::transmute(pcchlanguages)).ok() } + unsafe { GetAcceptLanguagesA(core::mem::transmute(pszlanguages), pcchlanguages as _).ok() } } #[inline] pub unsafe fn GetAcceptLanguagesW(pszlanguages: windows_core::PWSTR, pcchlanguages: *mut u32) -> windows_core::Result<()> { windows_targets::link!("shlwapi.dll" "system" fn GetAcceptLanguagesW(pszlanguages : windows_core::PWSTR, pcchlanguages : *mut u32) -> windows_core::HRESULT); - unsafe { GetAcceptLanguagesW(core::mem::transmute(pszlanguages), core::mem::transmute(pcchlanguages)).ok() } + unsafe { GetAcceptLanguagesW(core::mem::transmute(pszlanguages), pcchlanguages as _).ok() } } #[inline] 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); - unsafe { GetAllUsersProfileDirectoryA(core::mem::transmute(lpprofiledir.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchsize)).ok() } + unsafe { GetAllUsersProfileDirectoryA(lpprofiledir.unwrap_or(core::mem::zeroed()) as _, lpcchsize as _).ok() } } #[inline] 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); - unsafe { GetAllUsersProfileDirectoryW(core::mem::transmute(lpprofiledir.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchsize)).ok() } + unsafe { GetAllUsersProfileDirectoryW(lpprofiledir.unwrap_or(core::mem::zeroed()) as _, lpcchsize as _).ok() } } #[inline] pub unsafe fn GetCurrentProcessExplicitAppUserModelID() -> windows_core::Result { @@ -413,12 +413,12 @@ pub unsafe fn GetCurrentProcessExplicitAppUserModelID() -> windows_core::Result< #[inline] 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); - unsafe { GetDefaultUserProfileDirectoryA(core::mem::transmute(lpprofiledir.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchsize)).ok() } + unsafe { GetDefaultUserProfileDirectoryA(lpprofiledir.unwrap_or(core::mem::zeroed()) as _, lpcchsize as _).ok() } } #[inline] 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); - unsafe { GetDefaultUserProfileDirectoryW(core::mem::transmute(lpprofiledir.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchsize)).ok() } + unsafe { GetDefaultUserProfileDirectoryW(lpprofiledir.unwrap_or(core::mem::zeroed()) as _, lpcchsize as _).ok() } } #[inline] pub unsafe fn GetDpiForShellUIComponent(param0: SHELL_UI_COMPONENT) -> u32 { @@ -434,7 +434,7 @@ where 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); - unsafe { 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()) } + unsafe { GetFileNameFromBrowse(hwnd.unwrap_or(core::mem::zeroed()) as _, 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] @@ -451,17 +451,17 @@ pub unsafe fn GetMenuPosFromID(hmenu: super::WindowsAndMessaging::HMENU, id: u32 #[inline] pub unsafe fn GetProfileType(dwflags: *mut u32) -> windows_core::Result<()> { windows_targets::link!("userenv.dll" "system" fn GetProfileType(dwflags : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetProfileType(core::mem::transmute(dwflags)).ok() } + unsafe { GetProfileType(dwflags as _).ok() } } #[inline] 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); - unsafe { GetProfilesDirectoryA(core::mem::transmute(lpprofiledir.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchsize)).ok() } + unsafe { GetProfilesDirectoryA(lpprofiledir.unwrap_or(core::mem::zeroed()) as _, lpcchsize as _).ok() } } #[inline] 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); - unsafe { GetProfilesDirectoryW(core::mem::transmute(lpprofiledir.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchsize)).ok() } + unsafe { GetProfilesDirectoryW(lpprofiledir.unwrap_or(core::mem::zeroed()) as _, lpcchsize as _).ok() } } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -481,12 +481,12 @@ pub unsafe fn GetScaleFactorForMonitor(hmon: super::super::Graphics::Gdi::HMONIT #[inline] 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); - unsafe { GetUserProfileDirectoryA(htoken, core::mem::transmute(lpprofiledir.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchsize)).ok() } + unsafe { GetUserProfileDirectoryA(htoken, lpprofiledir.unwrap_or(core::mem::zeroed()) as _, lpcchsize as _).ok() } } #[inline] 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); - unsafe { GetUserProfileDirectoryW(htoken, core::mem::transmute(lpprofiledir.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchsize)).ok() } + unsafe { GetUserProfileDirectoryW(htoken, lpprofiledir.unwrap_or(core::mem::zeroed()) as _, lpcchsize as _).ok() } } #[inline] pub unsafe fn GetWindowContextHelpId(param0: super::super::Foundation::HWND) -> u32 { @@ -496,7 +496,7 @@ pub unsafe fn GetWindowContextHelpId(param0: super::super::Foundation::HWND) -> #[inline] 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); - unsafe { GetWindowSubclass(hwnd, pfnsubclass, uidsubclass, core::mem::transmute(pdwrefdata.unwrap_or(core::mem::zeroed()))) } + unsafe { GetWindowSubclass(hwnd, pfnsubclass, uidsubclass, pdwrefdata.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -514,13 +514,13 @@ pub unsafe fn HMONITOR_UserFree64(param0: *const u32, param1: *const super::supe #[inline] pub unsafe fn HMONITOR_UserMarshal(param0: *const u32, param1: *mut u8, param2: *const super::super::Graphics::Gdi::HMONITOR) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HMONITOR_UserMarshal(param0 : *const u32, param1 : *mut u8, param2 : *const super::super::Graphics::Gdi:: HMONITOR) -> *mut u8); - unsafe { HMONITOR_UserMarshal(param0, core::mem::transmute(param1), param2) } + unsafe { HMONITOR_UserMarshal(param0, param1 as _, param2) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn HMONITOR_UserMarshal64(param0: *const u32, param1: *mut u8, param2: *const super::super::Graphics::Gdi::HMONITOR) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HMONITOR_UserMarshal64(param0 : *const u32, param1 : *mut u8, param2 : *const super::super::Graphics::Gdi:: HMONITOR) -> *mut u8); - unsafe { HMONITOR_UserMarshal64(param0, core::mem::transmute(param1), param2) } + unsafe { HMONITOR_UserMarshal64(param0, param1 as _, param2) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -538,13 +538,13 @@ pub unsafe fn HMONITOR_UserSize64(param0: *const u32, param1: u32, param2: *cons #[inline] pub unsafe fn HMONITOR_UserUnmarshal(param0: *const u32, param1: *const u8, param2: *mut super::super::Graphics::Gdi::HMONITOR) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HMONITOR_UserUnmarshal(param0 : *const u32, param1 : *const u8, param2 : *mut super::super::Graphics::Gdi:: HMONITOR) -> *mut u8); - unsafe { HMONITOR_UserUnmarshal(param0, param1, core::mem::transmute(param2)) } + unsafe { HMONITOR_UserUnmarshal(param0, param1, param2 as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn HMONITOR_UserUnmarshal64(param0: *const u32, param1: *const u8, param2: *mut super::super::Graphics::Gdi::HMONITOR) -> *mut u8 { windows_targets::link!("ole32.dll" "system" fn HMONITOR_UserUnmarshal64(param0 : *const u32, param1 : *const u8, param2 : *mut super::super::Graphics::Gdi:: HMONITOR) -> *mut u8); - unsafe { HMONITOR_UserUnmarshal64(param0, param1, core::mem::transmute(param2)) } + unsafe { HMONITOR_UserUnmarshal64(param0, param1, param2 as _) } } #[inline] pub unsafe fn HashData(pbdata: &[u8], pbhash: &mut [u8]) -> windows_core::Result<()> { @@ -635,7 +635,7 @@ where P3: windows_core::Param, { windows_targets::link!("hlink.dll" "system" fn HlinkCreateShortcut(grfhlshortcutf : u32, pihl : * mut core::ffi::c_void, pwzdir : windows_core::PCWSTR, pwzfilename : windows_core::PCWSTR, ppwzshortcutfile : *mut windows_core::PWSTR, dwreserved : u32) -> windows_core::HRESULT); - unsafe { HlinkCreateShortcut(grfhlshortcutf, pihl.param().abi(), pwzdir.param().abi(), pwzfilename.param().abi(), core::mem::transmute(ppwzshortcutfile), dwreserved).ok() } + unsafe { HlinkCreateShortcut(grfhlshortcutf, pihl.param().abi(), pwzdir.param().abi(), pwzfilename.param().abi(), ppwzshortcutfile as _, dwreserved).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -647,7 +647,7 @@ where P4: windows_core::Param, { windows_targets::link!("hlink.dll" "system" fn HlinkCreateShortcutFromMoniker(grfhlshortcutf : u32, pimktarget : * mut core::ffi::c_void, pwzlocation : windows_core::PCWSTR, pwzdir : windows_core::PCWSTR, pwzfilename : windows_core::PCWSTR, ppwzshortcutfile : *mut windows_core::PWSTR, dwreserved : u32) -> windows_core::HRESULT); - unsafe { HlinkCreateShortcutFromMoniker(grfhlshortcutf, pimktarget.param().abi(), pwzlocation.param().abi(), pwzdir.param().abi(), pwzfilename.param().abi(), core::mem::transmute(ppwzshortcutfile), dwreserved).ok() } + unsafe { HlinkCreateShortcutFromMoniker(grfhlshortcutf, pimktarget.param().abi(), pwzlocation.param().abi(), pwzdir.param().abi(), pwzfilename.param().abi(), ppwzshortcutfile as _, dwreserved).ok() } } #[inline] pub unsafe fn HlinkCreateShortcutFromString(grfhlshortcutf: u32, pwztarget: P1, pwzlocation: P2, pwzdir: P3, pwzfilename: P4, ppwzshortcutfile: *mut windows_core::PWSTR, dwreserved: u32) -> windows_core::Result<()> @@ -658,7 +658,7 @@ where P4: windows_core::Param, { windows_targets::link!("hlink.dll" "system" fn HlinkCreateShortcutFromString(grfhlshortcutf : u32, pwztarget : windows_core::PCWSTR, pwzlocation : windows_core::PCWSTR, pwzdir : windows_core::PCWSTR, pwzfilename : windows_core::PCWSTR, ppwzshortcutfile : *mut windows_core::PWSTR, dwreserved : u32) -> windows_core::HRESULT); - unsafe { HlinkCreateShortcutFromString(grfhlshortcutf, pwztarget.param().abi(), pwzlocation.param().abi(), pwzdir.param().abi(), pwzfilename.param().abi(), core::mem::transmute(ppwzshortcutfile), dwreserved).ok() } + unsafe { HlinkCreateShortcutFromString(grfhlshortcutf, pwztarget.param().abi(), pwzlocation.param().abi(), pwzdir.param().abi(), pwzfilename.param().abi(), ppwzshortcutfile as _, dwreserved).ok() } } #[inline] pub unsafe fn HlinkGetSpecialReference(ureference: u32) -> windows_core::Result { @@ -727,7 +727,7 @@ where P5: windows_core::Param, { windows_targets::link!("hlink.dll" "system" fn HlinkOnNavigate(pihlframe : * mut core::ffi::c_void, pihlbc : * mut core::ffi::c_void, grfhlnf : u32, pimktarget : * mut core::ffi::c_void, pwzlocation : windows_core::PCWSTR, pwzfriendlyname : windows_core::PCWSTR, puhlid : *mut u32) -> windows_core::HRESULT); - unsafe { HlinkOnNavigate(pihlframe.param().abi(), pihlbc.param().abi(), grfhlnf, pimktarget.param().abi(), pwzlocation.param().abi(), pwzfriendlyname.param().abi(), core::mem::transmute(puhlid)).ok() } + unsafe { HlinkOnNavigate(pihlframe.param().abi(), pihlbc.param().abi(), grfhlnf, pimktarget.param().abi(), pwzlocation.param().abi(), pwzfriendlyname.param().abi(), puhlid as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -748,7 +748,7 @@ where P1: windows_core::Param, { windows_targets::link!("hlink.dll" "system" fn HlinkParseDisplayName(pibc : * mut core::ffi::c_void, pwzdisplayname : windows_core::PCWSTR, fnoforceabs : super::super::Foundation:: BOOL, pccheaten : *mut u32, ppimk : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { HlinkParseDisplayName(pibc.param().abi(), pwzdisplayname.param().abi(), fnoforceabs.into(), core::mem::transmute(pccheaten), core::mem::transmute(ppimk)).ok() } + unsafe { HlinkParseDisplayName(pibc.param().abi(), pwzdisplayname.param().abi(), fnoforceabs.into(), pccheaten as _, core::mem::transmute(ppimk)).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -782,7 +782,7 @@ where P6: windows_core::Param, { windows_targets::link!("hlink.dll" "system" fn HlinkResolveMonikerForData(pimkreference : * mut core::ffi::c_void, reserved : u32, pibc : * mut core::ffi::c_void, cfmtetc : u32, rgfmtetc : *mut super::super::System::Com:: FORMATETC, pibsc : * mut core::ffi::c_void, pimkbase : * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { HlinkResolveMonikerForData(pimkreference.param().abi(), reserved, pibc.param().abi(), cfmtetc, core::mem::transmute(rgfmtetc), pibsc.param().abi(), pimkbase.param().abi()).ok() } + unsafe { HlinkResolveMonikerForData(pimkreference.param().abi(), reserved, pibc.param().abi(), cfmtetc, rgfmtetc as _, pibsc.param().abi(), pimkbase.param().abi()).ok() } } #[inline] pub unsafe fn HlinkResolveShortcut(pwzshortcutfilename: P0, pihlsite: P1, dwsitedata: u32, piunkouter: P3, riid: *const windows_core::GUID, ppvobj: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -792,7 +792,7 @@ where P3: windows_core::Param, { windows_targets::link!("hlink.dll" "system" fn HlinkResolveShortcut(pwzshortcutfilename : windows_core::PCWSTR, pihlsite : * mut core::ffi::c_void, dwsitedata : u32, piunkouter : * mut core::ffi::c_void, riid : *const windows_core::GUID, ppvobj : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { HlinkResolveShortcut(pwzshortcutfilename.param().abi(), pihlsite.param().abi(), dwsitedata, piunkouter.param().abi(), riid, core::mem::transmute(ppvobj)).ok() } + unsafe { HlinkResolveShortcut(pwzshortcutfilename.param().abi(), pihlsite.param().abi(), dwsitedata, piunkouter.param().abi(), riid, ppvobj as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -801,7 +801,7 @@ where P0: windows_core::Param, { windows_targets::link!("hlink.dll" "system" fn HlinkResolveShortcutToMoniker(pwzshortcutfilename : windows_core::PCWSTR, ppimktarget : *mut * mut core::ffi::c_void, ppwzlocation : *mut windows_core::PWSTR) -> windows_core::HRESULT); - unsafe { HlinkResolveShortcutToMoniker(pwzshortcutfilename.param().abi(), core::mem::transmute(ppimktarget), core::mem::transmute(ppwzlocation)).ok() } + unsafe { HlinkResolveShortcutToMoniker(pwzshortcutfilename.param().abi(), core::mem::transmute(ppimktarget), ppwzlocation as _).ok() } } #[inline] pub unsafe fn HlinkResolveShortcutToString(pwzshortcutfilename: P0, ppwztarget: *mut windows_core::PWSTR, ppwzlocation: *mut windows_core::PWSTR) -> windows_core::Result<()> @@ -809,7 +809,7 @@ where P0: windows_core::Param, { windows_targets::link!("hlink.dll" "system" fn HlinkResolveShortcutToString(pwzshortcutfilename : windows_core::PCWSTR, ppwztarget : *mut windows_core::PWSTR, ppwzlocation : *mut windows_core::PWSTR) -> windows_core::HRESULT); - unsafe { HlinkResolveShortcutToString(pwzshortcutfilename.param().abi(), core::mem::transmute(ppwztarget), core::mem::transmute(ppwzlocation)).ok() } + unsafe { HlinkResolveShortcutToString(pwzshortcutfilename.param().abi(), ppwztarget as _, ppwzlocation as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -821,7 +821,7 @@ where P6: windows_core::Param, { windows_targets::link!("hlink.dll" "system" fn HlinkResolveStringForData(pwzreference : windows_core::PCWSTR, reserved : u32, pibc : * mut core::ffi::c_void, cfmtetc : u32, rgfmtetc : *mut super::super::System::Com:: FORMATETC, pibsc : * mut core::ffi::c_void, pimkbase : * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { HlinkResolveStringForData(pwzreference.param().abi(), reserved, pibc.param().abi(), cfmtetc, core::mem::transmute(rgfmtetc), pibsc.param().abi(), pimkbase.param().abi()).ok() } + unsafe { HlinkResolveStringForData(pwzreference.param().abi(), reserved, pibc.param().abi(), cfmtetc, rgfmtetc as _, pibsc.param().abi(), pimkbase.param().abi()).ok() } } #[inline] pub unsafe fn HlinkSetSpecialReference(ureference: u32, pwzreference: P1) -> windows_core::Result<()> @@ -859,7 +859,7 @@ where #[inline] pub unsafe fn ILAppendID(pidl: Option<*const Common::ITEMIDLIST>, pmkid: *const Common::SHITEMID, fappend: bool) -> *mut Common::ITEMIDLIST { windows_targets::link!("shell32.dll" "system" fn ILAppendID(pidl : *const Common:: ITEMIDLIST, pmkid : *const Common:: SHITEMID, fappend : super::super::Foundation:: BOOL) -> *mut Common:: ITEMIDLIST); - unsafe { ILAppendID(core::mem::transmute(pidl.unwrap_or(core::mem::zeroed())), pmkid, fappend.into()) } + unsafe { ILAppendID(pidl.unwrap_or(core::mem::zeroed()) as _, pmkid, fappend.into()) } } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -877,7 +877,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); - unsafe { ILCombine(core::mem::transmute(pidl1.unwrap_or(core::mem::zeroed())), core::mem::transmute(pidl2.unwrap_or(core::mem::zeroed()))) } + unsafe { ILCombine(pidl1.unwrap_or(core::mem::zeroed()) as _, pidl2.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -913,19 +913,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)); - unsafe { ILFree(core::mem::transmute(pidl.unwrap_or(core::mem::zeroed()))) } + unsafe { ILFree(pidl.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { ILGetNext(core::mem::transmute(pidl.unwrap_or(core::mem::zeroed()))) } + unsafe { ILGetNext(pidl.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { ILGetSize(core::mem::transmute(pidl.unwrap_or(core::mem::zeroed()))) } + unsafe { ILGetSize(pidl.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -955,7 +955,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); - unsafe { ILRemoveLastID(core::mem::transmute(pidl.unwrap_or(core::mem::zeroed()))) } + unsafe { ILRemoveLastID(pidl.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_Common"))] #[inline] @@ -983,7 +983,7 @@ where P0: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn IStream_Read(pstm : * mut core::ffi::c_void, pv : *mut core::ffi::c_void, cb : u32) -> windows_core::HRESULT); - unsafe { IStream_Read(pstm.param().abi(), core::mem::transmute(pv), cb).ok() } + unsafe { IStream_Read(pstm.param().abi(), pv as _, cb).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_Common"))] #[inline] @@ -1061,7 +1061,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)); - unsafe { IUnknown_AtomicRelease(core::mem::transmute(ppunk.unwrap_or(core::mem::zeroed()))) } + unsafe { IUnknown_AtomicRelease(ppunk.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn IUnknown_GetSite(punk: P0) -> windows_core::Result @@ -1117,7 +1117,7 @@ where P0: windows_core::Param, { windows_targets::link!("shdocvw.dll" "system" fn ImportPrivacySettings(pszfilename : windows_core::PCWSTR, pfparseprivacypreferences : *mut super::super::Foundation:: BOOL, pfparsepersiterules : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - unsafe { ImportPrivacySettings(pszfilename.param().abi(), core::mem::transmute(pfparseprivacypreferences), core::mem::transmute(pfparsepersiterules)) } + unsafe { ImportPrivacySettings(pszfilename.param().abi(), pfparseprivacypreferences as _, pfparsepersiterules as _) } } #[inline] pub unsafe fn InitNetworkAddressControl() -> super::super::Foundation::BOOL { @@ -1128,7 +1128,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); - unsafe { InitPropVariantFromStrRet(core::mem::transmute(pstrret), core::mem::transmute(pidl.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppropvar)).ok() } + unsafe { InitPropVariantFromStrRet(pstrret as _, pidl.unwrap_or(core::mem::zeroed()) as _, 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] @@ -1206,12 +1206,12 @@ pub unsafe fn IsUserAnAdmin() -> super::super::Foundation::BOOL { #[inline] 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); - unsafe { LoadUserProfileA(htoken, core::mem::transmute(lpprofileinfo)).ok() } + unsafe { LoadUserProfileA(htoken, lpprofileinfo as _).ok() } } #[inline] 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); - unsafe { LoadUserProfileW(htoken, core::mem::transmute(lpprofileinfo)).ok() } + unsafe { LoadUserProfileW(htoken, lpprofileinfo as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -1239,7 +1239,7 @@ where P0: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn ParseURLA(pcszurl : windows_core::PCSTR, ppu : *mut PARSEDURLA) -> windows_core::HRESULT); - unsafe { ParseURLA(pcszurl.param().abi(), core::mem::transmute(ppu)).ok() } + unsafe { ParseURLA(pcszurl.param().abi(), ppu as _).ok() } } #[inline] pub unsafe fn ParseURLW(pcszurl: P0, ppu: *mut PARSEDURLW) -> windows_core::Result<()> @@ -1247,7 +1247,7 @@ where P0: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn ParseURLW(pcszurl : windows_core::PCWSTR, ppu : *mut PARSEDURLW) -> windows_core::HRESULT); - unsafe { ParseURLW(pcszurl.param().abi(), core::mem::transmute(ppu)).ok() } + unsafe { ParseURLW(pcszurl.param().abi(), ppu as _).ok() } } #[inline] pub unsafe fn PathAddBackslashA(pszpath: &mut [u8; 260]) -> windows_core::PSTR { @@ -1348,7 +1348,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); - unsafe { 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()))) } + unsafe { PathCchAddBackslashEx(core::mem::transmute(pszpath.as_ptr()), pszpath.len().try_into().unwrap(), ppszend.unwrap_or(core::mem::zeroed()) as _, pcchremaining.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn PathCchAddExtension(pszpath: &mut [u16], pszext: P2) -> windows_core::Result<()> @@ -1435,7 +1435,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); - unsafe { PathCchRemoveBackslashEx(core::mem::transmute(pszpath), cchpath, core::mem::transmute(ppszend.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchremaining.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { PathCchRemoveBackslashEx(core::mem::transmute(pszpath), cchpath, ppszend.unwrap_or(core::mem::zeroed()) as _, pcchremaining.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn PathCchRemoveExtension(pszpath: windows_core::PWSTR, cchpath: usize) -> windows_core::Result<()> { @@ -1524,7 +1524,7 @@ where #[inline] 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); - unsafe { PathCompactPathA(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(pszpath.as_ptr()), dx) } + unsafe { PathCompactPathA(hdc.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pszpath.as_ptr()), dx) } } #[inline] pub unsafe fn PathCompactPathExA(pszout: &mut [u8], pszsrc: P1, dwflags: u32) -> super::super::Foundation::BOOL @@ -1546,7 +1546,7 @@ where #[inline] 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); - unsafe { PathCompactPathW(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(pszpath.as_ptr()), dx) } + unsafe { PathCompactPathW(hdc.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pszpath.as_ptr()), dx) } } #[inline] pub unsafe fn PathCreateFromUrlA(pszurl: P0, pszpath: windows_core::PSTR, pcchpath: *mut u32, dwflags: u32) -> windows_core::Result<()> @@ -1554,7 +1554,7 @@ where P0: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn PathCreateFromUrlA(pszurl : windows_core::PCSTR, pszpath : windows_core::PSTR, pcchpath : *mut u32, dwflags : u32) -> windows_core::HRESULT); - unsafe { PathCreateFromUrlA(pszurl.param().abi(), core::mem::transmute(pszpath), core::mem::transmute(pcchpath), dwflags).ok() } + unsafe { PathCreateFromUrlA(pszurl.param().abi(), core::mem::transmute(pszpath), pcchpath as _, dwflags).ok() } } #[inline] pub unsafe fn PathCreateFromUrlAlloc(pszin: P0, ppszout: *mut windows_core::PWSTR, dwflags: u32) -> windows_core::Result<()> @@ -1562,7 +1562,7 @@ where P0: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn PathCreateFromUrlAlloc(pszin : windows_core::PCWSTR, ppszout : *mut windows_core::PWSTR, dwflags : u32) -> windows_core::HRESULT); - unsafe { PathCreateFromUrlAlloc(pszin.param().abi(), core::mem::transmute(ppszout), dwflags).ok() } + unsafe { PathCreateFromUrlAlloc(pszin.param().abi(), ppszout as _, dwflags).ok() } } #[inline] pub unsafe fn PathCreateFromUrlW(pszurl: P0, pszpath: windows_core::PWSTR, pcchpath: *mut u32, dwflags: u32) -> windows_core::Result<()> @@ -1570,7 +1570,7 @@ where P0: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn PathCreateFromUrlW(pszurl : windows_core::PCWSTR, pszpath : windows_core::PWSTR, pcchpath : *mut u32, dwflags : u32) -> windows_core::HRESULT); - unsafe { PathCreateFromUrlW(pszurl.param().abi(), core::mem::transmute(pszpath), core::mem::transmute(pcchpath), dwflags).ok() } + unsafe { PathCreateFromUrlW(pszurl.param().abi(), core::mem::transmute(pszpath), pcchpath as _, dwflags).ok() } } #[inline] pub unsafe fn PathFileExistsA(pszpath: P0) -> windows_core::Result<()> @@ -1639,12 +1639,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); - unsafe { PathFindOnPathA(core::mem::transmute(pszpath.as_ptr()), core::mem::transmute(ppszotherdirs.unwrap_or(core::mem::zeroed()))) } + unsafe { PathFindOnPathA(core::mem::transmute(pszpath.as_ptr()), ppszotherdirs.unwrap_or(core::mem::zeroed()) as _) } } #[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); - unsafe { PathFindOnPathW(core::mem::transmute(pszpath.as_ptr()), core::mem::transmute(ppszotherdirs.unwrap_or(core::mem::zeroed()))) } + unsafe { PathFindOnPathW(core::mem::transmute(pszpath.as_ptr()), ppszotherdirs.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn PathFindSuffixArrayA(pszpath: P0, apszsuffix: &[windows_core::PCSTR]) -> windows_core::PCSTR @@ -1929,7 +1929,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); - unsafe { PathIsUNCEx(pszpath.param().abi(), core::mem::transmute(ppszserver.unwrap_or(core::mem::zeroed()))) } + unsafe { PathIsUNCEx(pszpath.param().abi(), ppszserver.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn PathIsUNCServerA(pszpath: P0) -> super::super::Foundation::BOOL @@ -2171,7 +2171,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); - unsafe { PathResolve(core::mem::transmute(pszpath.as_ptr()), core::mem::transmute(dirs.unwrap_or(core::mem::zeroed())), fflags.0 as _) } + unsafe { PathResolve(core::mem::transmute(pszpath.as_ptr()), dirs.unwrap_or(core::mem::zeroed()) as _, fflags.0 as _) } } #[inline] pub unsafe fn PathSearchAndQualifyA(pszpath: P0, pszbuf: &mut [u8]) -> super::super::Foundation::BOOL @@ -2306,13 +2306,13 @@ where #[inline] 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); - unsafe { 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()))) } + unsafe { PickIconDlg(hwnd.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(psziconpath.as_ptr()), psziconpath.len().try_into().unwrap(), piiconindex.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_Common"))] #[inline] pub unsafe fn PropVariantToStrRet(propvar: *const super::super::System::Com::StructuredStorage::PROPVARIANT, pstrret: *mut Common::STRRET) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn PropVariantToStrRet(propvar : *const super::super::System::Com::StructuredStorage:: PROPVARIANT, pstrret : *mut Common:: STRRET) -> windows_core::HRESULT); - unsafe { PropVariantToStrRet(core::mem::transmute(propvar), core::mem::transmute(pstrret)).ok() } + unsafe { PropVariantToStrRet(core::mem::transmute(propvar), pstrret as _).ok() } } #[inline] pub unsafe fn QISearch(that: *mut core::ffi::c_void, pqit: *const QITAB) -> windows_core::Result @@ -2321,12 +2321,12 @@ where { windows_targets::link!("shlwapi.dll" "system" fn QISearch(that : *mut core::ffi::c_void, pqit : *const QITAB, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::ptr::null_mut(); - unsafe { QISearch(core::mem::transmute(that), pqit, &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } + unsafe { QISearch(that as _, pqit, &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[inline] pub unsafe fn ReadCabinetState(pcs: *mut CABINETSTATE, clength: i32) -> super::super::Foundation::BOOL { windows_targets::link!("shell32.dll" "system" fn ReadCabinetState(pcs : *mut CABINETSTATE, clength : i32) -> super::super::Foundation:: BOOL); - unsafe { ReadCabinetState(core::mem::transmute(pcs), clength) } + unsafe { ReadCabinetState(pcs as _, clength) } } #[inline] pub unsafe fn RealDriveType(idrive: i32, foktohitnet: bool) -> i32 { @@ -2336,12 +2336,12 @@ pub unsafe fn RealDriveType(idrive: i32, foktohitnet: bool) -> i32 { #[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); - unsafe { RegisterAppConstrainedChangeNotification(routine, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(registration)) } + unsafe { RegisterAppConstrainedChangeNotification(routine, context.unwrap_or(core::mem::zeroed()) as _, registration as _) } } #[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); - unsafe { RegisterAppStateChangeNotification(routine, core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(registration)) } + unsafe { RegisterAppStateChangeNotification(routine, context.unwrap_or(core::mem::zeroed()) as _, registration as _) } } #[inline] pub unsafe fn RegisterScaleChangeEvent(hevent: super::super::Foundation::HANDLE) -> windows_core::Result { @@ -2370,7 +2370,7 @@ where P1: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn RestartDialog(hwnd : super::super::Foundation:: HWND, pszprompt : windows_core::PCWSTR, dwreturn : u32) -> i32); - unsafe { RestartDialog(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pszprompt.param().abi(), dwreturn) } + unsafe { RestartDialog(hwnd.unwrap_or(core::mem::zeroed()) as _, pszprompt.param().abi(), dwreturn) } } #[inline] pub unsafe fn RestartDialogEx(hwnd: Option, pszprompt: P1, dwreturn: u32, dwreasoncode: u32) -> i32 @@ -2378,7 +2378,7 @@ where 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); - unsafe { RestartDialogEx(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pszprompt.param().abi(), dwreturn, dwreasoncode) } + unsafe { RestartDialogEx(hwnd.unwrap_or(core::mem::zeroed()) as _, pszprompt.param().abi(), dwreturn, dwreasoncode) } } #[inline] pub unsafe fn RevokeScaleChangeNotifications(displaydevice: DISPLAY_DEVICE_TYPE, dwcookie: u32) -> windows_core::Result<()> { @@ -2394,7 +2394,7 @@ pub unsafe fn SHAddFromPropSheetExtArray(hpsxa: HPSXA, lpfnaddpage: super::Contr #[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)); - unsafe { SHAddToRecentDocs(uflags, core::mem::transmute(pv.unwrap_or(core::mem::zeroed()))) } + unsafe { SHAddToRecentDocs(uflags, pv.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SHAlloc(cb: usize) -> *mut core::ffi::c_void { @@ -2404,7 +2404,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); - unsafe { SHAllocShared(core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), dwsize, dwprocessid) } + unsafe { SHAllocShared(pvdata.unwrap_or(core::mem::zeroed()) as _, dwsize, dwprocessid) } } #[inline] pub unsafe fn SHAnsiToAnsi(pszsrc: P0, pszdst: &mut [u8]) -> i32 @@ -2425,7 +2425,7 @@ where #[inline] pub unsafe fn SHAppBarMessage(dwmessage: u32, pdata: *mut APPBARDATA) -> usize { windows_targets::link!("shell32.dll" "system" fn SHAppBarMessage(dwmessage : u32, pdata : *mut APPBARDATA) -> usize); - unsafe { SHAppBarMessage(dwmessage, core::mem::transmute(pdata)) } + unsafe { SHAppBarMessage(dwmessage, pdata as _) } } #[inline] pub unsafe fn SHAssocEnumHandlers(pszextra: P0, affilter: ASSOC_FILTER) -> windows_core::Result @@ -2462,7 +2462,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(); - unsafe { SHBindToFolderIDListParent(psfroot.param().abi(), pidl, &T::IID, &mut result__, core::mem::transmute(ppidllast.unwrap_or(core::mem::zeroed()))).and_then(|| windows_core::Type::from_abi(result__)) } + unsafe { SHBindToFolderIDListParent(psfroot.param().abi(), pidl, &T::IID, &mut result__, ppidllast.unwrap_or(core::mem::zeroed()) as _).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_Common"))] #[inline] @@ -2474,7 +2474,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(); - unsafe { SHBindToFolderIDListParentEx(psfroot.param().abi(), 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__)) } + unsafe { SHBindToFolderIDListParentEx(psfroot.param().abi(), pidl, ppbc.param().abi(), &T::IID, &mut result__, ppidllast.unwrap_or(core::mem::zeroed()) as _).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_Common"))] #[inline] @@ -2496,7 +2496,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(); - unsafe { SHBindToParent(pidl, &T::IID, &mut result__, core::mem::transmute(ppidllast.unwrap_or(core::mem::zeroed()))).and_then(|| windows_core::Type::from_abi(result__)) } + unsafe { SHBindToParent(pidl, &T::IID, &mut result__, ppidllast.unwrap_or(core::mem::zeroed()) as _).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -2525,7 +2525,7 @@ where #[inline] 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); - unsafe { SHChangeNotification_Lock(hchange, dwprocid, core::mem::transmute(pppidl.unwrap_or(core::mem::zeroed())), core::mem::transmute(plevent.unwrap_or(core::mem::zeroed()))) } + unsafe { SHChangeNotification_Lock(hchange, dwprocid, pppidl.unwrap_or(core::mem::zeroed()) as _, plevent.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SHChangeNotification_Unlock(hlock: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { @@ -2535,7 +2535,7 @@ pub unsafe fn SHChangeNotification_Unlock(hlock: super::super::Foundation::HANDL #[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)); - unsafe { SHChangeNotify(weventid.0 as _, uflags, core::mem::transmute(dwitem1.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwitem2.unwrap_or(core::mem::zeroed()))) } + unsafe { SHChangeNotify(weventid.0 as _, uflags, dwitem1.unwrap_or(core::mem::zeroed()) as _, dwitem2.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SHChangeNotifyDeregister(ulid: u32) -> super::super::Foundation::BOOL { @@ -2557,7 +2557,7 @@ pub unsafe fn SHChangeNotifyRegisterThread(status: SCNRT_STATUS) { #[inline] pub unsafe fn SHCloneSpecialIDList(hwnd: Option, csidl: i32, fcreate: bool) -> *mut Common::ITEMIDLIST { windows_targets::link!("shell32.dll" "system" fn SHCloneSpecialIDList(hwnd : super::super::Foundation:: HWND, csidl : i32, fcreate : super::super::Foundation:: BOOL) -> *mut Common:: ITEMIDLIST); - unsafe { SHCloneSpecialIDList(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), csidl, fcreate.into()) } + unsafe { SHCloneSpecialIDList(hwnd.unwrap_or(core::mem::zeroed()) as _, csidl, fcreate.into()) } } #[inline] pub unsafe fn SHCoCreateInstance(pszclsid: P0, pclsid: Option<*const windows_core::GUID>, punkouter: P2) -> windows_core::Result @@ -2568,7 +2568,7 @@ where { windows_targets::link!("shell32.dll" "system" fn SHCoCreateInstance(pszclsid : windows_core::PCWSTR, pclsid : *const windows_core::GUID, punkouter : * mut core::ffi::c_void, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::ptr::null_mut(); - unsafe { 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__)) } + unsafe { SHCoCreateInstance(pszclsid.param().abi(), pclsid.unwrap_or(core::mem::zeroed()) as _, punkouter.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -2577,7 +2577,7 @@ where P1: 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); - unsafe { SHCopyKeyA(hkeysrc, pszsrcsubkey.param().abi(), hkeydest, core::mem::transmute(freserved.unwrap_or(core::mem::zeroed()))) } + unsafe { SHCopyKeyA(hkeysrc, pszsrcsubkey.param().abi(), hkeydest, freserved.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -2586,7 +2586,7 @@ where P1: 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); - unsafe { SHCopyKeyW(hkeysrc, pszsrcsubkey.param().abi(), hkeydest, core::mem::transmute(freserved.unwrap_or(core::mem::zeroed()))) } + unsafe { SHCopyKeyW(hkeysrc, pszsrcsubkey.param().abi(), hkeydest, freserved.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SHCreateAssociationRegistration() -> windows_core::Result @@ -2606,7 +2606,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(); - unsafe { 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__)) } + unsafe { SHCreateDataObject(pidlfolder.unwrap_or(core::mem::zeroed()) as _, 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] @@ -2644,7 +2644,7 @@ where P1: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHCreateDirectory(hwnd : super::super::Foundation:: HWND, pszpath : windows_core::PCWSTR) -> i32); - unsafe { SHCreateDirectory(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pszpath.param().abi()) } + unsafe { SHCreateDirectory(hwnd.unwrap_or(core::mem::zeroed()) as _, pszpath.param().abi()) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -2653,7 +2653,7 @@ where P1: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHCreateDirectoryExA(hwnd : super::super::Foundation:: HWND, pszpath : windows_core::PCSTR, psa : *const super::super::Security:: SECURITY_ATTRIBUTES) -> i32); - unsafe { SHCreateDirectoryExA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pszpath.param().abi(), core::mem::transmute(psa.unwrap_or(core::mem::zeroed()))) } + unsafe { SHCreateDirectoryExA(hwnd.unwrap_or(core::mem::zeroed()) as _, pszpath.param().abi(), psa.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Security")] #[inline] @@ -2662,7 +2662,7 @@ where P1: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHCreateDirectoryExW(hwnd : super::super::Foundation:: HWND, pszpath : windows_core::PCWSTR, psa : *const super::super::Security:: SECURITY_ATTRIBUTES) -> i32); - unsafe { SHCreateDirectoryExW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pszpath.param().abi(), core::mem::transmute(psa.unwrap_or(core::mem::zeroed()))) } + unsafe { SHCreateDirectoryExW(hwnd.unwrap_or(core::mem::zeroed()) as _, pszpath.param().abi(), psa.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SHCreateFileExtractIconW(pszfile: P0, dwfileattributes: u32) -> windows_core::Result @@ -2728,7 +2728,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(); - unsafe { SHCreateItemWithParent(core::mem::transmute(pidlparent.unwrap_or(core::mem::zeroed())), psfparent.param().abi(), pidl, &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } + unsafe { SHCreateItemWithParent(pidlparent.unwrap_or(core::mem::zeroed()) as _, psfparent.param().abi(), pidl, &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -2740,7 +2740,7 @@ pub unsafe fn SHCreateMemStream(pinit: Option<&[u8]>) -> Option windows_core::Result<()> { windows_targets::link!("shell32.dll" "system" fn SHCreateProcessAsUserW(pscpi : *mut SHCREATEPROCESSINFOW) -> super::super::Foundation:: BOOL); - unsafe { SHCreateProcessAsUserW(core::mem::transmute(pscpi)).ok() } + unsafe { SHCreateProcessAsUserW(pscpi as _).ok() } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -2787,7 +2787,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); unsafe { let mut result__ = core::mem::zeroed(); - SHCreateShellItem(core::mem::transmute(pidlparent.unwrap_or(core::mem::zeroed())), psfparent.param().abi(), pidl, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + SHCreateShellItem(pidlparent.unwrap_or(core::mem::zeroed()) as _, psfparent.param().abi(), pidl, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_UI_Shell_Common")] @@ -2799,7 +2799,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); unsafe { let mut result__ = core::mem::zeroed(); - 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__)) + SHCreateShellItemArray(pidlparent.unwrap_or(core::mem::zeroed()) as _, 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")] @@ -2836,7 +2836,7 @@ where #[inline] 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); - unsafe { SHCreateShellPalette(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed()))) } + unsafe { SHCreateShellPalette(hdc.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -2888,18 +2888,18 @@ where #[inline] 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); - unsafe { SHCreateThread(pfnthreadproc, core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), flags, core::mem::transmute(pfncallback.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SHCreateThread(pfnthreadproc, pdata.unwrap_or(core::mem::zeroed()) as _, flags, pfncallback.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SHCreateThreadRef(pcref: *mut i32, ppunk: *mut Option) -> windows_core::Result<()> { windows_targets::link!("shlwapi.dll" "system" fn SHCreateThreadRef(pcref : *mut i32, ppunk : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { SHCreateThreadRef(core::mem::transmute(pcref), core::mem::transmute(ppunk)).ok() } + unsafe { SHCreateThreadRef(pcref as _, core::mem::transmute(ppunk)).ok() } } #[cfg(feature = "Win32_System_Threading")] #[inline] 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); - unsafe { SHCreateThreadWithHandle(pfnthreadproc, core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), flags, core::mem::transmute(pfncallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(phandle.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SHCreateThreadWithHandle(pfnthreadproc, pdata.unwrap_or(core::mem::zeroed()) as _, flags, pfncallback.unwrap_or(core::mem::zeroed()) as _, phandle.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -2908,7 +2908,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); - unsafe { SHDefExtractIconA(psziconfile.param().abi(), iindex, uflags, core::mem::transmute(phiconlarge.unwrap_or(core::mem::zeroed())), core::mem::transmute(phiconsmall.unwrap_or(core::mem::zeroed())), niconsize) } + unsafe { SHDefExtractIconA(psziconfile.param().abi(), iindex, uflags, phiconlarge.unwrap_or(core::mem::zeroed()) as _, phiconsmall.unwrap_or(core::mem::zeroed()) as _, niconsize) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -2917,7 +2917,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHDefExtractIconW(psziconfile : windows_core::PCWSTR, iindex : i32, uflags : u32, phiconlarge : *mut super::WindowsAndMessaging:: HICON, phiconsmall : *mut super::WindowsAndMessaging:: HICON, niconsize : u32) -> windows_core::HRESULT); - unsafe { SHDefExtractIconW(psziconfile.param().abi(), iindex, uflags, core::mem::transmute(phiconlarge.unwrap_or(core::mem::zeroed())), core::mem::transmute(phiconsmall.unwrap_or(core::mem::zeroed())), niconsize) } + unsafe { SHDefExtractIconW(psziconfile.param().abi(), iindex, uflags, phiconlarge.unwrap_or(core::mem::zeroed()) as _, phiconsmall.unwrap_or(core::mem::zeroed()) as _, niconsize) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -2990,7 +2990,7 @@ where 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); unsafe { let mut result__ = core::mem::zeroed(); - SHDoDragDrop(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pdata.param().abi(), pdsrc.param().abi(), dweffect, &mut result__).map(|| core::mem::transmute(result__)) + SHDoDragDrop(hwnd.unwrap_or(core::mem::zeroed()) as _, pdata.param().abi(), pdsrc.param().abi(), dweffect, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -2999,7 +2999,7 @@ where 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); - unsafe { SHEmptyRecycleBinA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pszrootpath.param().abi(), dwflags).ok() } + unsafe { SHEmptyRecycleBinA(hwnd.unwrap_or(core::mem::zeroed()) as _, pszrootpath.param().abi(), dwflags).ok() } } #[inline] pub unsafe fn SHEmptyRecycleBinW(hwnd: Option, pszrootpath: P1, dwflags: u32) -> windows_core::Result<()> @@ -3007,37 +3007,37 @@ where 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); - unsafe { SHEmptyRecycleBinW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pszrootpath.param().abi(), dwflags).ok() } + unsafe { SHEmptyRecycleBinW(hwnd.unwrap_or(core::mem::zeroed()) as _, pszrootpath.param().abi(), dwflags).ok() } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { SHEnumKeyExA(hkey, dwindex, core::mem::transmute(pszname), core::mem::transmute(pcchname)) } + unsafe { SHEnumKeyExA(hkey, dwindex, core::mem::transmute(pszname), pcchname as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { SHEnumKeyExW(hkey, dwindex, core::mem::transmute(pszname), core::mem::transmute(pcchname)) } + unsafe { SHEnumKeyExW(hkey, dwindex, core::mem::transmute(pszname), pcchname as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { SHEnumValueA(hkey, 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()))) } + unsafe { SHEnumValueA(hkey, dwindex, pszvaluename.unwrap_or(core::mem::zeroed()) as _, pcchvaluename.unwrap_or(core::mem::zeroed()) as _, pdwtype.unwrap_or(core::mem::zeroed()) as _, pvdata.unwrap_or(core::mem::zeroed()) as _, pcbdata.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { SHEnumValueW(hkey, 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()))) } + unsafe { SHEnumValueW(hkey, dwindex, pszvaluename.unwrap_or(core::mem::zeroed()) as _, pcchvaluename.unwrap_or(core::mem::zeroed()) as _, pdwtype.unwrap_or(core::mem::zeroed()) as _, pvdata.unwrap_or(core::mem::zeroed()) as _, pcbdata.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { SHEnumerateUnreadMailAccountsW(core::mem::transmute(hkeyuser.unwrap_or(core::mem::zeroed())), dwindex, core::mem::transmute(pszmailaddress.as_ptr()), pszmailaddress.len().try_into().unwrap()).ok() } + unsafe { SHEnumerateUnreadMailAccountsW(hkeyuser.unwrap_or(core::mem::zeroed()) as _, 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<()> @@ -3045,29 +3045,29 @@ 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); - unsafe { 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() } + unsafe { SHEvaluateSystemCommandTemplate(pszcmdtemplate.param().abi(), ppszapplication as _, ppszcommandline.unwrap_or(core::mem::zeroed()) as _, ppszparameters.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SHFileOperationA(lpfileop: *mut SHFILEOPSTRUCTA) -> i32 { windows_targets::link!("shell32.dll" "system" fn SHFileOperationA(lpfileop : *mut SHFILEOPSTRUCTA) -> i32); - unsafe { SHFileOperationA(core::mem::transmute(lpfileop)) } + unsafe { SHFileOperationA(lpfileop as _) } } #[inline] pub unsafe fn SHFileOperationW(lpfileop: *mut SHFILEOPSTRUCTW) -> i32 { windows_targets::link!("shell32.dll" "system" fn SHFileOperationW(lpfileop : *mut SHFILEOPSTRUCTW) -> i32); - unsafe { SHFileOperationW(core::mem::transmute(lpfileop)) } + unsafe { SHFileOperationW(lpfileop as _) } } #[cfg(feature = "Win32_UI_Shell_Common")] #[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); - unsafe { SHFindFiles(core::mem::transmute(pidlfolder.unwrap_or(core::mem::zeroed())), core::mem::transmute(pidlsavefile.unwrap_or(core::mem::zeroed()))) } + unsafe { SHFindFiles(pidlfolder.unwrap_or(core::mem::zeroed()) as _, pidlsavefile.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] 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 >); - unsafe { SHFind_InitMenuPopup(hmenu, core::mem::transmute(hwndowner.unwrap_or(core::mem::zeroed())), idcmdfirst, idcmdlast) } + unsafe { SHFind_InitMenuPopup(hmenu, hwndowner.unwrap_or(core::mem::zeroed()) as _, idcmdfirst, idcmdlast) } } #[inline] pub unsafe fn SHFlushSFCache() { @@ -3077,12 +3077,12 @@ pub unsafe fn SHFlushSFCache() { #[inline] pub unsafe fn SHFormatDateTimeA(pft: *const super::super::Foundation::FILETIME, pdwflags: Option<*mut u32>, pszbuf: &mut [u8]) -> i32 { windows_targets::link!("shlwapi.dll" "system" fn SHFormatDateTimeA(pft : *const super::super::Foundation:: FILETIME, pdwflags : *mut u32, pszbuf : windows_core::PSTR, cchbuf : u32) -> i32); - unsafe { SHFormatDateTimeA(pft, core::mem::transmute(pdwflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(pszbuf.as_ptr()), pszbuf.len().try_into().unwrap()) } + unsafe { SHFormatDateTimeA(pft, pdwflags.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { SHFormatDateTimeW(pft, core::mem::transmute(pdwflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(pszbuf.as_ptr()), pszbuf.len().try_into().unwrap()) } + unsafe { SHFormatDateTimeW(pft, pdwflags.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pszbuf.as_ptr()), pszbuf.len().try_into().unwrap()) } } #[inline] pub unsafe fn SHFormatDrive(hwnd: super::super::Foundation::HWND, drive: u32, fmtid: SHFMT_ID, options: SHFMT_OPT) -> u32 { @@ -3092,12 +3092,12 @@ pub unsafe fn SHFormatDrive(hwnd: super::super::Foundation::HWND, drive: u32, fm #[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)); - unsafe { SHFree(core::mem::transmute(pv.unwrap_or(core::mem::zeroed()))) } + unsafe { SHFree(pv.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SHFreeNameMappings(hnamemappings: Option) { windows_targets::link!("shell32.dll" "system" fn SHFreeNameMappings(hnamemappings : super::super::Foundation:: HANDLE)); - unsafe { SHFreeNameMappings(core::mem::transmute(hnamemappings.unwrap_or(core::mem::zeroed()))) } + unsafe { SHFreeNameMappings(hnamemappings.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SHFreeShared(hdata: super::super::Foundation::HANDLE, dwprocessid: u32) -> windows_core::Result<()> { @@ -3111,7 +3111,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); - unsafe { SHGetAttributesFromDataObject(pdo.param().abi(), dwattributemask, core::mem::transmute(pdwattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcitems.unwrap_or(core::mem::zeroed()))) } + unsafe { SHGetAttributesFromDataObject(pdo.param().abi(), dwattributemask, pdwattributes.unwrap_or(core::mem::zeroed()) as _, pcitems.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -3120,7 +3120,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHGetDataFromIDListA(psf : * mut core::ffi::c_void, pidl : *const Common:: ITEMIDLIST, nformat : SHGDFIL_FORMAT, pv : *mut core::ffi::c_void, cb : i32) -> windows_core::HRESULT); - unsafe { SHGetDataFromIDListA(psf.param().abi(), pidl, nformat, core::mem::transmute(pv), cb).ok() } + unsafe { SHGetDataFromIDListA(psf.param().abi(), pidl, nformat, pv as _, cb).ok() } } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -3129,7 +3129,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHGetDataFromIDListW(psf : * mut core::ffi::c_void, pidl : *const Common:: ITEMIDLIST, nformat : SHGDFIL_FORMAT, pv : *mut core::ffi::c_void, cb : i32) -> windows_core::HRESULT); - unsafe { SHGetDataFromIDListW(psf.param().abi(), pidl, nformat, core::mem::transmute(pv), cb).ok() } + unsafe { SHGetDataFromIDListW(psf.param().abi(), pidl, nformat, pv as _, cb).ok() } } #[inline] pub unsafe fn SHGetDesktopFolder() -> windows_core::Result { @@ -3145,7 +3145,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); - unsafe { 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()))) } + unsafe { SHGetDiskFreeSpaceExA(pszdirectoryname.param().abi(), pulfreebytesavailabletocaller.unwrap_or(core::mem::zeroed()) as _, pultotalnumberofbytes.unwrap_or(core::mem::zeroed()) as _, pultotalnumberoffreebytes.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SHGetDiskFreeSpaceExW(pszdirectoryname: P0, pulfreebytesavailabletocaller: Option<*mut u64>, pultotalnumberofbytes: Option<*mut u64>, pultotalnumberoffreebytes: Option<*mut u64>) -> super::super::Foundation::BOOL @@ -3153,7 +3153,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); - unsafe { 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()))) } + unsafe { SHGetDiskFreeSpaceExW(pszdirectoryname.param().abi(), pulfreebytesavailabletocaller.unwrap_or(core::mem::zeroed()) as _, pultotalnumberofbytes.unwrap_or(core::mem::zeroed()) as _, pultotalnumberoffreebytes.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SHGetDriveMedia(pszdrive: P0) -> windows_core::Result @@ -3173,7 +3173,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); - unsafe { SHGetFileInfoA(pszpath.param().abi(), dwfileattributes, core::mem::transmute(psfi.unwrap_or(core::mem::zeroed())), cbfileinfo, uflags) } + unsafe { SHGetFileInfoA(pszpath.param().abi(), dwfileattributes, psfi.unwrap_or(core::mem::zeroed()) as _, cbfileinfo, uflags) } } #[cfg(all(feature = "Win32_Storage_FileSystem", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] @@ -3182,7 +3182,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHGetFileInfoW(pszpath : windows_core::PCWSTR, dwfileattributes : super::super::Storage::FileSystem:: FILE_FLAGS_AND_ATTRIBUTES, psfi : *mut SHFILEINFOW, cbfileinfo : u32, uflags : SHGFI_FLAGS) -> usize); - unsafe { SHGetFileInfoW(pszpath.param().abi(), dwfileattributes, core::mem::transmute(psfi.unwrap_or(core::mem::zeroed())), cbfileinfo, uflags) } + unsafe { SHGetFileInfoW(pszpath.param().abi(), dwfileattributes, psfi.unwrap_or(core::mem::zeroed()) as _, cbfileinfo, uflags) } } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -3190,13 +3190,13 @@ pub unsafe fn SHGetFolderLocation(hwnd: Option, 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); unsafe { let mut result__ = core::mem::zeroed(); - SHGetFolderLocation(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), csidl, core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), dwflags, &mut result__).map(|| core::mem::transmute(result__)) + SHGetFolderLocation(hwnd.unwrap_or(core::mem::zeroed()) as _, csidl, htoken.unwrap_or(core::mem::zeroed()) as _, dwflags, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] 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); - unsafe { SHGetFolderPathA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), csidl, core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(pszpath.as_ptr())).ok() } + unsafe { SHGetFolderPathA(hwnd.unwrap_or(core::mem::zeroed()) as _, csidl, htoken.unwrap_or(core::mem::zeroed()) as _, dwflags, core::mem::transmute(pszpath.as_ptr())).ok() } } #[inline] pub unsafe fn SHGetFolderPathAndSubDirA(hwnd: Option, csidl: i32, htoken: Option, dwflags: u32, pszsubdir: P4, pszpath: &mut [u8; 260]) -> windows_core::Result<()> @@ -3204,7 +3204,7 @@ where 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); - unsafe { SHGetFolderPathAndSubDirA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), csidl, core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), dwflags, pszsubdir.param().abi(), core::mem::transmute(pszpath.as_ptr())).ok() } + unsafe { SHGetFolderPathAndSubDirA(hwnd.unwrap_or(core::mem::zeroed()) as _, csidl, htoken.unwrap_or(core::mem::zeroed()) as _, dwflags, pszsubdir.param().abi(), core::mem::transmute(pszpath.as_ptr())).ok() } } #[inline] pub unsafe fn SHGetFolderPathAndSubDirW(hwnd: Option, csidl: i32, htoken: Option, dwflags: u32, pszsubdir: P4, pszpath: &mut [u16; 260]) -> windows_core::Result<()> @@ -3212,12 +3212,12 @@ where 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); - unsafe { SHGetFolderPathAndSubDirW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), csidl, core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), dwflags, pszsubdir.param().abi(), core::mem::transmute(pszpath.as_ptr())).ok() } + unsafe { SHGetFolderPathAndSubDirW(hwnd.unwrap_or(core::mem::zeroed()) as _, csidl, htoken.unwrap_or(core::mem::zeroed()) as _, dwflags, pszsubdir.param().abi(), core::mem::transmute(pszpath.as_ptr())).ok() } } #[inline] 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); - unsafe { SHGetFolderPathW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), csidl, core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), dwflags, core::mem::transmute(pszpath.as_ptr())).ok() } + unsafe { SHGetFolderPathW(hwnd.unwrap_or(core::mem::zeroed()) as _, csidl, htoken.unwrap_or(core::mem::zeroed()) as _, dwflags, core::mem::transmute(pszpath.as_ptr())).ok() } } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -3296,7 +3296,7 @@ pub unsafe fn SHGetKnownFolderIDList(rfid: *const windows_core::GUID, dwflags: u 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); unsafe { let mut result__ = core::mem::zeroed(); - SHGetKnownFolderIDList(rfid, dwflags, core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + SHGetKnownFolderIDList(rfid, dwflags, htoken.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -3306,14 +3306,14 @@ where { 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(); - unsafe { SHGetKnownFolderItem(rfid, flags, core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } + unsafe { SHGetKnownFolderItem(rfid, flags, htoken.unwrap_or(core::mem::zeroed()) as _, &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: 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); unsafe { let mut result__ = core::mem::zeroed(); - SHGetKnownFolderPath(rfid, dwflags.0 as _, core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) + SHGetKnownFolderPath(rfid, dwflags.0 as _, htoken.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] @@ -3322,7 +3322,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHGetLocalizedName(pszpath : windows_core::PCWSTR, pszresmodule : windows_core::PWSTR, cch : u32, pidsres : *mut i32) -> windows_core::HRESULT); - unsafe { SHGetLocalizedName(pszpath.param().abi(), core::mem::transmute(pszresmodule.as_ptr()), pszresmodule.len().try_into().unwrap(), core::mem::transmute(pidsres)).ok() } + unsafe { SHGetLocalizedName(pszpath.param().abi(), core::mem::transmute(pszresmodule.as_ptr()), pszresmodule.len().try_into().unwrap(), pidsres as _).ok() } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -3349,7 +3349,7 @@ where P1: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHGetNewLinkInfoA(pszlinkto : windows_core::PCSTR, pszdir : windows_core::PCSTR, pszname : windows_core::PSTR, pfmustcopy : *mut super::super::Foundation:: BOOL, uflags : u32) -> super::super::Foundation:: BOOL); - unsafe { SHGetNewLinkInfoA(pszlinkto.param().abi(), pszdir.param().abi(), core::mem::transmute(pszname.as_ptr()), core::mem::transmute(pfmustcopy), uflags) } + unsafe { SHGetNewLinkInfoA(pszlinkto.param().abi(), pszdir.param().abi(), core::mem::transmute(pszname.as_ptr()), pfmustcopy as _, uflags) } } #[inline] pub unsafe fn SHGetNewLinkInfoW(pszlinkto: P0, pszdir: P1, pszname: &mut [u16; 260], pfmustcopy: *mut super::super::Foundation::BOOL, uflags: u32) -> super::super::Foundation::BOOL @@ -3358,7 +3358,7 @@ where P1: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHGetNewLinkInfoW(pszlinkto : windows_core::PCWSTR, pszdir : windows_core::PCWSTR, pszname : windows_core::PWSTR, pfmustcopy : *mut super::super::Foundation:: BOOL, uflags : u32) -> super::super::Foundation:: BOOL); - unsafe { SHGetNewLinkInfoW(pszlinkto.param().abi(), pszdir.param().abi(), core::mem::transmute(pszname.as_ptr()), core::mem::transmute(pfmustcopy), uflags) } + unsafe { SHGetNewLinkInfoW(pszlinkto.param().abi(), pszdir.param().abi(), core::mem::transmute(pszname.as_ptr()), pfmustcopy as _, uflags) } } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -3396,17 +3396,17 @@ where P1: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHGetSetFolderCustomSettings(pfcs : *mut SHFOLDERCUSTOMSETTINGS, pszpath : windows_core::PCWSTR, dwreadwrite : u32) -> windows_core::HRESULT); - unsafe { SHGetSetFolderCustomSettings(core::mem::transmute(pfcs), pszpath.param().abi(), dwreadwrite).ok() } + unsafe { SHGetSetFolderCustomSettings(pfcs as _, pszpath.param().abi(), dwreadwrite).ok() } } #[inline] pub unsafe fn SHGetSetSettings(lpss: Option<*mut SHELLSTATEA>, dwmask: SSF_MASK, bset: bool) { windows_targets::link!("shell32.dll" "system" fn SHGetSetSettings(lpss : *mut SHELLSTATEA, dwmask : SSF_MASK, bset : super::super::Foundation:: BOOL)); - unsafe { SHGetSetSettings(core::mem::transmute(lpss.unwrap_or(core::mem::zeroed())), dwmask, bset.into()) } + unsafe { SHGetSetSettings(lpss.unwrap_or(core::mem::zeroed()) as _, dwmask, bset.into()) } } #[inline] pub unsafe fn SHGetSettings(psfs: *mut SHELLFLAGSTATE, dwmask: u32) { windows_targets::link!("shell32.dll" "system" fn SHGetSettings(psfs : *mut SHELLFLAGSTATE, dwmask : u32)); - unsafe { SHGetSettings(core::mem::transmute(psfs), dwmask) } + unsafe { SHGetSettings(psfs as _, dwmask) } } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -3414,24 +3414,24 @@ pub unsafe fn SHGetSpecialFolderLocation(hwnd: Option windows_core::HRESULT); unsafe { let mut result__ = core::mem::zeroed(); - SHGetSpecialFolderLocation(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), csidl, &mut result__).map(|| core::mem::transmute(result__)) + SHGetSpecialFolderLocation(hwnd.unwrap_or(core::mem::zeroed()) as _, csidl, &mut result__).map(|| core::mem::transmute(result__)) } } #[inline] pub unsafe fn SHGetSpecialFolderPathA(hwnd: Option, pszpath: &mut [u8; 260], csidl: i32, fcreate: bool) -> super::super::Foundation::BOOL { 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); - unsafe { SHGetSpecialFolderPathA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(pszpath.as_ptr()), csidl, fcreate.into()) } + unsafe { SHGetSpecialFolderPathA(hwnd.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pszpath.as_ptr()), csidl, fcreate.into()) } } #[inline] pub unsafe fn SHGetSpecialFolderPathW(hwnd: Option, pszpath: &mut [u16; 260], csidl: i32, fcreate: bool) -> super::super::Foundation::BOOL { 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); - unsafe { SHGetSpecialFolderPathW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(pszpath.as_ptr()), csidl, fcreate.into()) } + unsafe { SHGetSpecialFolderPathW(hwnd.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pszpath.as_ptr()), csidl, fcreate.into()) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] pub unsafe fn SHGetStockIconInfo(siid: SHSTOCKICONID, uflags: SHGSI_FLAGS, psii: *mut SHSTOCKICONINFO) -> windows_core::Result<()> { windows_targets::link!("shell32.dll" "system" fn SHGetStockIconInfo(siid : SHSTOCKICONID, uflags : SHGSI_FLAGS, psii : *mut SHSTOCKICONINFO) -> windows_core::HRESULT); - unsafe { SHGetStockIconInfo(siid, uflags, core::mem::transmute(psii)).ok() } + unsafe { SHGetStockIconInfo(siid, uflags, psii as _).ok() } } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] @@ -3460,7 +3460,7 @@ where P1: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHGetUnreadMailCountW(hkeyuser : super::super::System::Registry:: HKEY, pszmailaddress : windows_core::PCWSTR, pdwcount : *mut u32, pfiletime : *mut super::super::Foundation:: FILETIME, pszshellexecutecommand : windows_core::PWSTR, cchshellexecutecommand : i32) -> windows_core::HRESULT); - unsafe { 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() } + unsafe { SHGetUnreadMailCountW(hkeyuser.unwrap_or(core::mem::zeroed()) as _, pszmailaddress.param().abi(), pdwcount.unwrap_or(core::mem::zeroed()) as _, pfiletime.unwrap_or(core::mem::zeroed()) as _, 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] @@ -3470,7 +3470,7 @@ where P2: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHGetValueA(hkey : super::super::System::Registry:: HKEY, pszsubkey : windows_core::PCSTR, pszvalue : windows_core::PCSTR, pdwtype : *mut u32, pvdata : *mut core::ffi::c_void, pcbdata : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { SHGetValueA(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()))) } + unsafe { SHGetValueA(hkey, pszsubkey.param().abi(), pszvalue.param().abi(), pdwtype.unwrap_or(core::mem::zeroed()) as _, pvdata.unwrap_or(core::mem::zeroed()) as _, pcbdata.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -3480,7 +3480,7 @@ where P2: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHGetValueW(hkey : super::super::System::Registry:: HKEY, pszsubkey : windows_core::PCWSTR, pszvalue : windows_core::PCWSTR, pdwtype : *mut u32, pvdata : *mut core::ffi::c_void, pcbdata : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { SHGetValueW(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()))) } + unsafe { SHGetValueW(hkey, pszsubkey.param().abi(), pszvalue.param().abi(), pdwtype.unwrap_or(core::mem::zeroed()) as _, pvdata.unwrap_or(core::mem::zeroed()) as _, pcbdata.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -3491,7 +3491,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(); - unsafe { SHGetViewStatePropertyBag(core::mem::transmute(pidl.unwrap_or(core::mem::zeroed())), pszbagname.param().abi(), dwflags, &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } + unsafe { SHGetViewStatePropertyBag(pidl.unwrap_or(core::mem::zeroed()) as _, pszbagname.param().abi(), dwflags, &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[inline] pub unsafe fn SHGlobalCounterDecrement(id: SHGLOBALCOUNTER) -> i32 { @@ -3521,7 +3521,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHILCreateFromPath(pszpath : windows_core::PCWSTR, ppidl : *mut *mut Common:: ITEMIDLIST, rgfinout : *mut u32) -> windows_core::HRESULT); - unsafe { SHILCreateFromPath(pszpath.param().abi(), core::mem::transmute(ppidl), core::mem::transmute(rgfinout.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SHILCreateFromPath(pszpath.param().abi(), ppidl as _, rgfinout.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SHInvokePrinterCommandA(hwnd: Option, uaction: u32, lpbuf1: P2, lpbuf2: P3, fmodal: bool) -> super::super::Foundation::BOOL @@ -3530,7 +3530,7 @@ where P3: 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); - unsafe { SHInvokePrinterCommandA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), uaction, lpbuf1.param().abi(), lpbuf2.param().abi(), fmodal.into()) } + unsafe { SHInvokePrinterCommandA(hwnd.unwrap_or(core::mem::zeroed()) as _, uaction, lpbuf1.param().abi(), lpbuf2.param().abi(), fmodal.into()) } } #[inline] pub unsafe fn SHInvokePrinterCommandW(hwnd: Option, uaction: u32, lpbuf1: P2, lpbuf2: P3, fmodal: bool) -> super::super::Foundation::BOOL @@ -3539,7 +3539,7 @@ where P3: 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); - unsafe { SHInvokePrinterCommandW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), uaction, lpbuf1.param().abi(), lpbuf2.param().abi(), fmodal.into()) } + unsafe { SHInvokePrinterCommandW(hwnd.unwrap_or(core::mem::zeroed()) as _, uaction, lpbuf1.param().abi(), lpbuf2.param().abi(), fmodal.into()) } } #[inline] pub unsafe fn SHIsFileAvailableOffline(pwszpath: P0, pdwstatus: Option<*mut u32>) -> windows_core::Result<()> @@ -3547,7 +3547,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHIsFileAvailableOffline(pwszpath : windows_core::PCWSTR, pdwstatus : *mut u32) -> windows_core::HRESULT); - unsafe { SHIsFileAvailableOffline(pwszpath.param().abi(), core::mem::transmute(pdwstatus.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SHIsFileAvailableOffline(pwszpath.param().abi(), pdwstatus.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SHIsLowMemoryMachine(dwtype: u32) -> super::super::Foundation::BOOL { @@ -3573,7 +3573,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); - unsafe { 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() } + unsafe { SHLoadIndirectString(pszsource.param().abi(), core::mem::transmute(pszoutbuf.as_ptr()), pszoutbuf.len().try_into().unwrap(), ppvreserved.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SHLoadNonloadedIconOverlayIdentifiers() -> windows_core::Result<()> { @@ -3592,7 +3592,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHMapPIDLToSystemImageListIndex(pshf : * mut core::ffi::c_void, pidl : *const Common:: ITEMIDLIST, piindexsel : *mut i32) -> i32); - unsafe { SHMapPIDLToSystemImageListIndex(pshf.param().abi(), pidl, core::mem::transmute(piindexsel.unwrap_or(core::mem::zeroed()))) } + unsafe { SHMapPIDLToSystemImageListIndex(pshf.param().abi(), pidl, piindexsel.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SHMessageBoxCheckA(hwnd: Option, psztext: P1, pszcaption: P2, utype: u32, idefault: i32, pszregval: P5) -> i32 @@ -3602,7 +3602,7 @@ where 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); - unsafe { SHMessageBoxCheckA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), psztext.param().abi(), pszcaption.param().abi(), utype, idefault, pszregval.param().abi()) } + unsafe { SHMessageBoxCheckA(hwnd.unwrap_or(core::mem::zeroed()) as _, psztext.param().abi(), pszcaption.param().abi(), utype, idefault, pszregval.param().abi()) } } #[inline] pub unsafe fn SHMessageBoxCheckW(hwnd: Option, psztext: P1, pszcaption: P2, utype: u32, idefault: i32, pszregval: P5) -> i32 @@ -3612,7 +3612,7 @@ where 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); - unsafe { SHMessageBoxCheckW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), psztext.param().abi(), pszcaption.param().abi(), utype, idefault, pszregval.param().abi()) } + unsafe { SHMessageBoxCheckW(hwnd.unwrap_or(core::mem::zeroed()) as _, psztext.param().abi(), pszcaption.param().abi(), utype, idefault, pszregval.param().abi()) } } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -3630,7 +3630,7 @@ where 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); - unsafe { SHObjectProperties(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), shopobjecttype.0 as _, pszobjectname.param().abi(), pszpropertypage.param().abi()) } + unsafe { SHObjectProperties(hwnd.unwrap_or(core::mem::zeroed()) as _, shopobjecttype.0 as _, pszobjectname.param().abi(), pszpropertypage.param().abi()) } } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -3648,7 +3648,7 @@ 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); - unsafe { 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()) } + unsafe { 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()), pclsiddefault.unwrap_or(core::mem::zeroed()) as _, pdtobj.param().abi(), psb.param().abi(), pstartpage.param().abi()) } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Registry"))] #[inline] @@ -3693,7 +3693,7 @@ where #[inline] 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); - unsafe { SHOpenWithDialog(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), poainfo).ok() } + unsafe { SHOpenWithDialog(hwndparent.unwrap_or(core::mem::zeroed()) as _, poainfo).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_Common"))] #[inline] @@ -3703,7 +3703,7 @@ where P1: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHParseDisplayName(pszname : windows_core::PCWSTR, pbc : * mut core::ffi::c_void, ppidl : *mut *mut Common:: ITEMIDLIST, sfgaoin : u32, psfgaoout : *mut u32) -> windows_core::HRESULT); - unsafe { SHParseDisplayName(pszname.param().abi(), pbc.param().abi(), core::mem::transmute(ppidl), sfgaoin, core::mem::transmute(psfgaoout.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SHParseDisplayName(pszname.param().abi(), pbc.param().abi(), ppidl as _, sfgaoin, psfgaoout.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SHPathPrepareForWriteA(hwnd: Option, punkenablemodless: P1, pszpath: P2, dwflags: u32) -> windows_core::Result<()> @@ -3712,7 +3712,7 @@ where 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); - unsafe { SHPathPrepareForWriteA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), punkenablemodless.param().abi(), pszpath.param().abi(), dwflags).ok() } + unsafe { SHPathPrepareForWriteA(hwnd.unwrap_or(core::mem::zeroed()) as _, punkenablemodless.param().abi(), pszpath.param().abi(), dwflags).ok() } } #[inline] pub unsafe fn SHPathPrepareForWriteW(hwnd: Option, punkenablemodless: P1, pszpath: P2, dwflags: u32) -> windows_core::Result<()> @@ -3721,19 +3721,19 @@ where 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); - unsafe { SHPathPrepareForWriteW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), punkenablemodless.param().abi(), pszpath.param().abi(), dwflags).ok() } + unsafe { SHPathPrepareForWriteW(hwnd.unwrap_or(core::mem::zeroed()) as _, punkenablemodless.param().abi(), pszpath.param().abi(), dwflags).ok() } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { SHQueryInfoKeyA(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()))) } + unsafe { SHQueryInfoKeyA(hkey, pcsubkeys.unwrap_or(core::mem::zeroed()) as _, pcchmaxsubkeylen.unwrap_or(core::mem::zeroed()) as _, pcvalues.unwrap_or(core::mem::zeroed()) as _, pcchmaxvaluenamelen.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] 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); - unsafe { SHQueryInfoKeyW(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()))) } + unsafe { SHQueryInfoKeyW(hkey, pcsubkeys.unwrap_or(core::mem::zeroed()) as _, pcchmaxsubkeylen.unwrap_or(core::mem::zeroed()) as _, pcvalues.unwrap_or(core::mem::zeroed()) as _, pcchmaxvaluenamelen.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SHQueryRecycleBinA(pszrootpath: P0, pshqueryrbinfo: *mut SHQUERYRBINFO) -> windows_core::Result<()> @@ -3741,7 +3741,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHQueryRecycleBinA(pszrootpath : windows_core::PCSTR, pshqueryrbinfo : *mut SHQUERYRBINFO) -> windows_core::HRESULT); - unsafe { SHQueryRecycleBinA(pszrootpath.param().abi(), core::mem::transmute(pshqueryrbinfo)).ok() } + unsafe { SHQueryRecycleBinA(pszrootpath.param().abi(), pshqueryrbinfo as _).ok() } } #[inline] pub unsafe fn SHQueryRecycleBinW(pszrootpath: P0, pshqueryrbinfo: *mut SHQUERYRBINFO) -> windows_core::Result<()> @@ -3749,7 +3749,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHQueryRecycleBinW(pszrootpath : windows_core::PCWSTR, pshqueryrbinfo : *mut SHQUERYRBINFO) -> windows_core::HRESULT); - unsafe { SHQueryRecycleBinW(pszrootpath.param().abi(), core::mem::transmute(pshqueryrbinfo)).ok() } + unsafe { SHQueryRecycleBinW(pszrootpath.param().abi(), pshqueryrbinfo as _).ok() } } #[inline] pub unsafe fn SHQueryUserNotificationState() -> windows_core::Result { @@ -3766,7 +3766,7 @@ where P1: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHQueryValueExA(hkey : super::super::System::Registry:: HKEY, pszvalue : windows_core::PCSTR, pdwreserved : *const u32, pdwtype : *mut u32, pvdata : *mut core::ffi::c_void, pcbdata : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { SHQueryValueExA(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()))) } + unsafe { SHQueryValueExA(hkey, pszvalue.param().abi(), pdwreserved.unwrap_or(core::mem::zeroed()) as _, pdwtype.unwrap_or(core::mem::zeroed()) as _, pvdata.unwrap_or(core::mem::zeroed()) as _, pcbdata.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -3775,7 +3775,7 @@ where P1: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHQueryValueExW(hkey : super::super::System::Registry:: HKEY, pszvalue : windows_core::PCWSTR, pdwreserved : *const u32, pdwtype : *mut u32, pvdata : *mut core::ffi::c_void, pcbdata : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { SHQueryValueExW(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()))) } + unsafe { SHQueryValueExW(hkey, pszvalue.param().abi(), pdwreserved.unwrap_or(core::mem::zeroed()) as _, pdwtype.unwrap_or(core::mem::zeroed()) as _, pvdata.unwrap_or(core::mem::zeroed()) as _, pcbdata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SHRegCloseUSKey(huskey: isize) -> super::super::Foundation::WIN32_ERROR { @@ -3788,7 +3788,7 @@ 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); - unsafe { SHRegCreateUSKeyA(pszpath.param().abi(), samdesired, core::mem::transmute(hrelativeuskey.unwrap_or(core::mem::zeroed())), core::mem::transmute(phnewuskey), dwflags) } + unsafe { SHRegCreateUSKeyA(pszpath.param().abi(), samdesired, hrelativeuskey.unwrap_or(core::mem::zeroed()) as _, phnewuskey as _, dwflags) } } #[inline] pub unsafe fn SHRegCreateUSKeyW(pwzpath: P0, samdesired: u32, hrelativeuskey: Option, phnewuskey: *mut isize, dwflags: u32) -> super::super::Foundation::WIN32_ERROR @@ -3796,7 +3796,7 @@ 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); - unsafe { SHRegCreateUSKeyW(pwzpath.param().abi(), samdesired, core::mem::transmute(hrelativeuskey.unwrap_or(core::mem::zeroed())), core::mem::transmute(phnewuskey), dwflags) } + unsafe { SHRegCreateUSKeyW(pwzpath.param().abi(), samdesired, hrelativeuskey.unwrap_or(core::mem::zeroed()) as _, phnewuskey as _, dwflags) } } #[inline] pub unsafe fn SHRegDeleteEmptyUSKeyA(huskey: isize, pszsubkey: P1, delregflags: SHREGDEL_FLAGS) -> super::super::Foundation::WIN32_ERROR @@ -3839,22 +3839,22 @@ pub unsafe fn SHRegDuplicateHKey(hkey: super::super::System::Registry::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 { windows_targets::link!("shlwapi.dll" "system" fn SHRegEnumUSKeyA(huskey : isize, dwindex : u32, pszname : windows_core::PSTR, pcchname : *mut u32, enumregflags : SHREGENUM_FLAGS) -> super::super::Foundation:: WIN32_ERROR); - unsafe { SHRegEnumUSKeyA(huskey, dwindex, core::mem::transmute(pszname), core::mem::transmute(pcchname), enumregflags) } + unsafe { SHRegEnumUSKeyA(huskey, dwindex, core::mem::transmute(pszname), pcchname as _, enumregflags) } } #[inline] pub unsafe fn SHRegEnumUSKeyW(huskey: isize, dwindex: u32, pwzname: windows_core::PWSTR, pcchname: *mut u32, enumregflags: SHREGENUM_FLAGS) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("shlwapi.dll" "system" fn SHRegEnumUSKeyW(huskey : isize, dwindex : u32, pwzname : windows_core::PWSTR, pcchname : *mut u32, enumregflags : SHREGENUM_FLAGS) -> super::super::Foundation:: WIN32_ERROR); - unsafe { SHRegEnumUSKeyW(huskey, dwindex, core::mem::transmute(pwzname), core::mem::transmute(pcchname), enumregflags) } + unsafe { SHRegEnumUSKeyW(huskey, dwindex, core::mem::transmute(pwzname), pcchname as _, enumregflags) } } #[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); - unsafe { SHRegEnumUSValueA(huskey, 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())), enumregflags) } + unsafe { SHRegEnumUSValueA(huskey, dwindex, core::mem::transmute(pszvaluename), pcchvaluename as _, pdwtype.unwrap_or(core::mem::zeroed()) as _, pvdata.unwrap_or(core::mem::zeroed()) as _, pcbdata.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { SHRegEnumUSValueW(huskey, 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())), enumregflags) } + unsafe { SHRegEnumUSValueW(huskey, dwindex, core::mem::transmute(pszvaluename), pcchvaluename as _, pdwtype.unwrap_or(core::mem::zeroed()) as _, pvdata.unwrap_or(core::mem::zeroed()) as _, pcbdata.unwrap_or(core::mem::zeroed()) as _, enumregflags) } } #[inline] pub unsafe fn SHRegGetBoolUSValueA(pszsubkey: P0, pszvalue: P1, fignorehkcu: bool, fdefault: bool) -> super::super::Foundation::BOOL @@ -3910,7 +3910,7 @@ where P1: 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); - unsafe { 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.into(), core::mem::transmute(pvdefaultdata.unwrap_or(core::mem::zeroed())), dwdefaultdatasize) } + unsafe { SHRegGetUSValueA(pszsubkey.param().abi(), pszvalue.param().abi(), pdwtype.unwrap_or(core::mem::zeroed()) as _, pvdata.unwrap_or(core::mem::zeroed()) as _, pcbdata.unwrap_or(core::mem::zeroed()) as _, fignorehkcu.into(), pvdefaultdata.unwrap_or(core::mem::zeroed()) as _, 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: bool, pvdefaultdata: Option<*const core::ffi::c_void>, dwdefaultdatasize: u32) -> super::super::Foundation::WIN32_ERROR @@ -3919,7 +3919,7 @@ where P1: 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); - unsafe { 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.into(), core::mem::transmute(pvdefaultdata.unwrap_or(core::mem::zeroed())), dwdefaultdatasize) } + unsafe { SHRegGetUSValueW(pszsubkey.param().abi(), pszvalue.param().abi(), pdwtype.unwrap_or(core::mem::zeroed()) as _, pvdata.unwrap_or(core::mem::zeroed()) as _, pcbdata.unwrap_or(core::mem::zeroed()) as _, fignorehkcu.into(), pvdefaultdata.unwrap_or(core::mem::zeroed()) as _, dwdefaultdatasize) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -3929,7 +3929,7 @@ where P2: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHRegGetValueA(hkey : super::super::System::Registry:: HKEY, pszsubkey : windows_core::PCSTR, pszvalue : windows_core::PCSTR, srrfflags : i32, pdwtype : *mut u32, pvdata : *mut core::ffi::c_void, pcbdata : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { SHRegGetValueA(hkey, pszsubkey.param().abi(), pszvalue.param().abi(), 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()))) } + unsafe { SHRegGetValueA(hkey, pszsubkey.param().abi(), pszvalue.param().abi(), srrfflags, pdwtype.unwrap_or(core::mem::zeroed()) as _, pvdata.unwrap_or(core::mem::zeroed()) as _, pcbdata.unwrap_or(core::mem::zeroed()) as _) } } #[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 @@ -3938,7 +3938,7 @@ where P1: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHRegGetValueFromHKCUHKLM(pwszkey : windows_core::PCWSTR, pwszvalue : windows_core::PCWSTR, srrfflags : i32, pdwtype : *mut u32, pvdata : *mut core::ffi::c_void, pcbdata : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { SHRegGetValueFromHKCUHKLM(pwszkey.param().abi(), pwszvalue.param().abi(), 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()))) } + unsafe { SHRegGetValueFromHKCUHKLM(pwszkey.param().abi(), pwszvalue.param().abi(), srrfflags, pdwtype.unwrap_or(core::mem::zeroed()) as _, pvdata.unwrap_or(core::mem::zeroed()) as _, pcbdata.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -3948,7 +3948,7 @@ where P2: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHRegGetValueW(hkey : super::super::System::Registry:: HKEY, pszsubkey : windows_core::PCWSTR, pszvalue : windows_core::PCWSTR, srrfflags : i32, pdwtype : *mut u32, pvdata : *mut core::ffi::c_void, pcbdata : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { SHRegGetValueW(hkey, pszsubkey.param().abi(), pszvalue.param().abi(), 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()))) } + unsafe { SHRegGetValueW(hkey, pszsubkey.param().abi(), pszvalue.param().abi(), srrfflags, pdwtype.unwrap_or(core::mem::zeroed()) as _, pvdata.unwrap_or(core::mem::zeroed()) as _, pcbdata.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SHRegOpenUSKeyA(pszpath: P0, samdesired: u32, hrelativeuskey: Option, phnewuskey: *mut isize, fignorehkcu: bool) -> super::super::Foundation::WIN32_ERROR @@ -3956,7 +3956,7 @@ where P0: 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); - unsafe { SHRegOpenUSKeyA(pszpath.param().abi(), samdesired, core::mem::transmute(hrelativeuskey.unwrap_or(core::mem::zeroed())), core::mem::transmute(phnewuskey), fignorehkcu.into()) } + unsafe { SHRegOpenUSKeyA(pszpath.param().abi(), samdesired, hrelativeuskey.unwrap_or(core::mem::zeroed()) as _, phnewuskey as _, fignorehkcu.into()) } } #[inline] pub unsafe fn SHRegOpenUSKeyW(pwzpath: P0, samdesired: u32, hrelativeuskey: Option, phnewuskey: *mut isize, fignorehkcu: bool) -> super::super::Foundation::WIN32_ERROR @@ -3964,17 +3964,17 @@ where P0: 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); - unsafe { SHRegOpenUSKeyW(pwzpath.param().abi(), samdesired, core::mem::transmute(hrelativeuskey.unwrap_or(core::mem::zeroed())), core::mem::transmute(phnewuskey), fignorehkcu.into()) } + unsafe { SHRegOpenUSKeyW(pwzpath.param().abi(), samdesired, hrelativeuskey.unwrap_or(core::mem::zeroed()) as _, phnewuskey as _, fignorehkcu.into()) } } #[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); - unsafe { SHRegQueryInfoUSKeyA(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())), enumregflags) } + unsafe { SHRegQueryInfoUSKeyA(huskey, pcsubkeys.unwrap_or(core::mem::zeroed()) as _, pcchmaxsubkeylen.unwrap_or(core::mem::zeroed()) as _, pcvalues.unwrap_or(core::mem::zeroed()) as _, pcchmaxvaluenamelen.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { SHRegQueryInfoUSKeyW(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())), enumregflags) } + unsafe { SHRegQueryInfoUSKeyW(huskey, pcsubkeys.unwrap_or(core::mem::zeroed()) as _, pcchmaxsubkeylen.unwrap_or(core::mem::zeroed()) as _, pcvalues.unwrap_or(core::mem::zeroed()) as _, pcchmaxvaluenamelen.unwrap_or(core::mem::zeroed()) as _, 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: bool, pvdefaultdata: Option<*const core::ffi::c_void>, dwdefaultdatasize: Option) -> super::super::Foundation::WIN32_ERROR @@ -3982,7 +3982,7 @@ where P1: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHRegQueryUSValueA(huskey : isize, pszvalue : windows_core::PCSTR, pdwtype : *mut u32, pvdata : *mut core::ffi::c_void, pcbdata : *mut u32, fignorehkcu : super::super::Foundation:: BOOL, pvdefaultdata : *const core::ffi::c_void, dwdefaultdatasize : u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { SHRegQueryUSValueA(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.into(), core::mem::transmute(pvdefaultdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwdefaultdatasize.unwrap_or(core::mem::zeroed()))) } + unsafe { SHRegQueryUSValueA(huskey, pszvalue.param().abi(), pdwtype.unwrap_or(core::mem::zeroed()) as _, pvdata.unwrap_or(core::mem::zeroed()) as _, pcbdata.unwrap_or(core::mem::zeroed()) as _, fignorehkcu.into(), pvdefaultdata.unwrap_or(core::mem::zeroed()) as _, dwdefaultdatasize.unwrap_or(core::mem::zeroed()) as _) } } #[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: bool, pvdefaultdata: Option<*const core::ffi::c_void>, dwdefaultdatasize: Option) -> super::super::Foundation::WIN32_ERROR @@ -3990,7 +3990,7 @@ where P1: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHRegQueryUSValueW(huskey : isize, pszvalue : windows_core::PCWSTR, pdwtype : *mut u32, pvdata : *mut core::ffi::c_void, pcbdata : *mut u32, fignorehkcu : super::super::Foundation:: BOOL, pvdefaultdata : *const core::ffi::c_void, dwdefaultdatasize : u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { SHRegQueryUSValueW(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.into(), core::mem::transmute(pvdefaultdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwdefaultdatasize.unwrap_or(core::mem::zeroed()))) } + unsafe { SHRegQueryUSValueW(huskey, pszvalue.param().abi(), pdwtype.unwrap_or(core::mem::zeroed()) as _, pvdata.unwrap_or(core::mem::zeroed()) as _, pcbdata.unwrap_or(core::mem::zeroed()) as _, fignorehkcu.into(), pvdefaultdata.unwrap_or(core::mem::zeroed()) as _, dwdefaultdatasize.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -4021,7 +4021,7 @@ where P1: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHRegSetUSValueA(pszsubkey : windows_core::PCSTR, pszvalue : windows_core::PCSTR, dwtype : u32, pvdata : *const core::ffi::c_void, cbdata : u32, dwflags : u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { SHRegSetUSValueA(pszsubkey.param().abi(), pszvalue.param().abi(), 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()))) } + unsafe { SHRegSetUSValueA(pszsubkey.param().abi(), pszvalue.param().abi(), dwtype, pvdata.unwrap_or(core::mem::zeroed()) as _, cbdata.unwrap_or(core::mem::zeroed()) as _, dwflags.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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 @@ -4030,7 +4030,7 @@ where P1: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHRegSetUSValueW(pwzsubkey : windows_core::PCWSTR, pwzvalue : windows_core::PCWSTR, dwtype : u32, pvdata : *const core::ffi::c_void, cbdata : u32, dwflags : u32) -> super::super::Foundation:: WIN32_ERROR); - unsafe { SHRegSetUSValueW(pwzsubkey.param().abi(), pwzvalue.param().abi(), 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()))) } + unsafe { SHRegSetUSValueW(pwzsubkey.param().abi(), pwzvalue.param().abi(), dwtype, pvdata.unwrap_or(core::mem::zeroed()) as _, cbdata.unwrap_or(core::mem::zeroed()) as _, dwflags.unwrap_or(core::mem::zeroed()) as _) } } #[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 @@ -4097,7 +4097,7 @@ where 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); - unsafe { SHSetDefaultProperties(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), psi.param().abi(), dwfileopflags, pfops.param().abi()).ok() } + unsafe { SHSetDefaultProperties(hwnd.unwrap_or(core::mem::zeroed()) as _, psi.param().abi(), dwfileopflags, pfops.param().abi()).ok() } } #[inline] pub unsafe fn SHSetFolderPathA(csidl: i32, htoken: Option, dwflags: u32, pszpath: P3) -> windows_core::Result<()> @@ -4105,7 +4105,7 @@ where 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); - unsafe { SHSetFolderPathA(csidl, core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), dwflags, pszpath.param().abi()).ok() } + unsafe { SHSetFolderPathA(csidl, htoken.unwrap_or(core::mem::zeroed()) as _, dwflags, pszpath.param().abi()).ok() } } #[inline] pub unsafe fn SHSetFolderPathW(csidl: i32, htoken: Option, dwflags: u32, pszpath: P3) -> windows_core::Result<()> @@ -4113,7 +4113,7 @@ where 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); - unsafe { SHSetFolderPathW(csidl, core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), dwflags, pszpath.param().abi()).ok() } + unsafe { SHSetFolderPathW(csidl, htoken.unwrap_or(core::mem::zeroed()) as _, dwflags, pszpath.param().abi()).ok() } } #[inline] pub unsafe fn SHSetInstanceExplorer(punk: P0) @@ -4129,7 +4129,7 @@ where 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); - unsafe { SHSetKnownFolderPath(rfid, dwflags, core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), pszpath.param().abi()).ok() } + unsafe { SHSetKnownFolderPath(rfid, dwflags, htoken.unwrap_or(core::mem::zeroed()) as _, pszpath.param().abi()).ok() } } #[inline] pub unsafe fn SHSetLocalizedName(pszpath: P0, pszresmodule: P1, idsres: i32) -> windows_core::Result<()> @@ -4174,7 +4174,7 @@ where P2: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHSetValueA(hkey : super::super::System::Registry:: HKEY, pszsubkey : windows_core::PCSTR, pszvalue : windows_core::PCSTR, dwtype : u32, pvdata : *const core::ffi::c_void, cbdata : u32) -> i32); - unsafe { SHSetValueA(hkey, pszsubkey.param().abi(), pszvalue.param().abi(), dwtype, core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), cbdata) } + unsafe { SHSetValueA(hkey, pszsubkey.param().abi(), pszvalue.param().abi(), dwtype, pvdata.unwrap_or(core::mem::zeroed()) as _, cbdata) } } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -4184,7 +4184,7 @@ where P2: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHSetValueW(hkey : super::super::System::Registry:: HKEY, pszsubkey : windows_core::PCWSTR, pszvalue : windows_core::PCWSTR, dwtype : u32, pvdata : *const core::ffi::c_void, cbdata : u32) -> i32); - unsafe { SHSetValueW(hkey, pszsubkey.param().abi(), pszvalue.param().abi(), dwtype, core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), cbdata) } + unsafe { SHSetValueW(hkey, pszsubkey.param().abi(), pszvalue.param().abi(), dwtype, pvdata.unwrap_or(core::mem::zeroed()) as _, cbdata) } } #[inline] pub unsafe fn SHShellFolderView_Message(hwndmain: super::super::Foundation::HWND, umsg: u32, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { @@ -4225,7 +4225,7 @@ where 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); - unsafe { SHStartNetConnectionDialogW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pszremotename.param().abi(), dwtype).ok() } + unsafe { SHStartNetConnectionDialogW(hwnd.unwrap_or(core::mem::zeroed()) as _, pszremotename.param().abi(), dwtype).ok() } } #[inline] pub unsafe fn SHStrDupA(psz: P0) -> windows_core::Result @@ -4262,7 +4262,7 @@ pub unsafe fn SHStripMneumonicW(pszmenu: windows_core::PWSTR) -> u16 { #[inline] 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); - unsafe { SHTestTokenMembership(core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), ulrid) } + unsafe { SHTestTokenMembership(htoken.unwrap_or(core::mem::zeroed()) as _, ulrid) } } #[inline] pub unsafe fn SHUnicodeToAnsi(pwszsrc: P0, pszdst: &mut [u8]) -> i32 @@ -4304,7 +4304,7 @@ where #[inline] 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); - unsafe { SHValidateUNC(core::mem::transmute(hwndowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(pszfile), fconnect.0 as _) } + unsafe { SHValidateUNC(hwndowner.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pszfile), fconnect.0 as _) } } #[inline] pub unsafe fn SetCurrentProcessExplicitAppUserModelID(appid: P0) -> windows_core::Result<()> @@ -4338,7 +4338,7 @@ where P2: 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); - unsafe { 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()))) } + unsafe { ShellAboutA(hwnd.unwrap_or(core::mem::zeroed()) as _, szapp.param().abi(), szotherstuff.param().abi(), hicon.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -4348,7 +4348,7 @@ where P2: 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); - unsafe { 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()))) } + unsafe { ShellAboutW(hwnd.unwrap_or(core::mem::zeroed()) as _, szapp.param().abi(), szotherstuff.param().abi(), hicon.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -4360,19 +4360,19 @@ where 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); - unsafe { ShellExecuteA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), lpoperation.param().abi(), lpfile.param().abi(), lpparameters.param().abi(), lpdirectory.param().abi(), nshowcmd) } + unsafe { ShellExecuteA(hwnd.unwrap_or(core::mem::zeroed()) as _, lpoperation.param().abi(), lpfile.param().abi(), lpparameters.param().abi(), lpdirectory.param().abi(), nshowcmd) } } #[cfg(feature = "Win32_System_Registry")] #[inline] pub unsafe fn ShellExecuteExA(pexecinfo: *mut SHELLEXECUTEINFOA) -> windows_core::Result<()> { windows_targets::link!("shell32.dll" "system" fn ShellExecuteExA(pexecinfo : *mut SHELLEXECUTEINFOA) -> super::super::Foundation:: BOOL); - unsafe { ShellExecuteExA(core::mem::transmute(pexecinfo)).ok() } + unsafe { ShellExecuteExA(pexecinfo as _).ok() } } #[cfg(feature = "Win32_System_Registry")] #[inline] pub unsafe fn ShellExecuteExW(pexecinfo: *mut SHELLEXECUTEINFOW) -> windows_core::Result<()> { windows_targets::link!("shell32.dll" "system" fn ShellExecuteExW(pexecinfo : *mut SHELLEXECUTEINFOW) -> super::super::Foundation:: BOOL); - unsafe { ShellExecuteExW(core::mem::transmute(pexecinfo)).ok() } + unsafe { ShellExecuteExW(pexecinfo as _).ok() } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -4384,7 +4384,7 @@ where 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); - unsafe { ShellExecuteW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), lpoperation.param().abi(), lpfile.param().abi(), lpparameters.param().abi(), lpdirectory.param().abi(), nshowcmd) } + unsafe { ShellExecuteW(hwnd.unwrap_or(core::mem::zeroed()) as _, lpoperation.param().abi(), lpfile.param().abi(), lpparameters.param().abi(), lpdirectory.param().abi(), nshowcmd) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -4394,7 +4394,7 @@ where 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); - unsafe { 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(), fustyle) } + unsafe { ShellMessageBoxA(happinst.unwrap_or(core::mem::zeroed()) as _, hwnd.unwrap_or(core::mem::zeroed()) as _, lpctext.param().abi(), lpctitle.param().abi(), fustyle) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -4404,7 +4404,7 @@ where 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); - unsafe { 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(), fustyle) } + unsafe { ShellMessageBoxW(happinst.unwrap_or(core::mem::zeroed()) as _, hwnd.unwrap_or(core::mem::zeroed()) as _, lpctext.param().abi(), lpctitle.param().abi(), fustyle) } } #[inline] pub unsafe fn Shell_GetCachedImageIndex(pwsziconpath: P0, iiconindex: i32, uiconflags: u32) -> i32 @@ -4434,7 +4434,7 @@ where #[inline] pub unsafe fn Shell_GetImageLists(phiml: Option<*mut super::Controls::HIMAGELIST>, phimlsmall: Option<*mut super::Controls::HIMAGELIST>) -> super::super::Foundation::BOOL { windows_targets::link!("shell32.dll" "system" fn Shell_GetImageLists(phiml : *mut super::Controls:: HIMAGELIST, phimlsmall : *mut super::Controls:: HIMAGELIST) -> super::super::Foundation:: BOOL); - unsafe { Shell_GetImageLists(core::mem::transmute(phiml.unwrap_or(core::mem::zeroed())), core::mem::transmute(phimlsmall.unwrap_or(core::mem::zeroed()))) } + unsafe { Shell_GetImageLists(phiml.unwrap_or(core::mem::zeroed()) as _, phimlsmall.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -4475,7 +4475,7 @@ where P1: windows_core::Param, { windows_targets::link!("shdocvw.dll" "system" fn SoftwareUpdateMessageBox(hwnd : super::super::Foundation:: HWND, pszdistunit : windows_core::PCWSTR, dwflags : u32, psdi : *mut super::super::System::Com::Urlmon:: SOFTDISTINFO) -> u32); - unsafe { SoftwareUpdateMessageBox(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pszdistunit.param().abi(), dwflags, core::mem::transmute(psdi.unwrap_or(core::mem::zeroed()))) } + unsafe { SoftwareUpdateMessageBox(hwnd.unwrap_or(core::mem::zeroed()) as _, pszdistunit.param().abi(), dwflags, psdi.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_System_Com_StructuredStorage")] #[inline] @@ -4924,31 +4924,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); - unsafe { StrRetToBSTR(core::mem::transmute(pstr), core::mem::transmute(pidl.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbstr)).ok() } + unsafe { StrRetToBSTR(pstr as _, pidl.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { 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() } + unsafe { StrRetToBufA(pstr as _, pidl.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { 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() } + unsafe { StrRetToBufW(pstr as _, pidl.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { StrRetToStrA(core::mem::transmute(pstr), core::mem::transmute(pidl.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppsz)).ok() } + unsafe { StrRetToStrA(pstr as _, pidl.unwrap_or(core::mem::zeroed()) as _, ppsz as _).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); - unsafe { StrRetToStrW(core::mem::transmute(pstr), core::mem::transmute(pidl.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppsz)).ok() } + unsafe { StrRetToStrW(pstr as _, pidl.unwrap_or(core::mem::zeroed()) as _, ppsz as _).ok() } } #[inline] pub unsafe fn StrSpnA(psz: P0, pszset: P1) -> i32 @@ -5028,7 +5028,7 @@ where P0: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn StrToInt64ExA(pszstring : windows_core::PCSTR, dwflags : i32, pllret : *mut i64) -> super::super::Foundation:: BOOL); - unsafe { StrToInt64ExA(pszstring.param().abi(), dwflags, core::mem::transmute(pllret)) } + unsafe { StrToInt64ExA(pszstring.param().abi(), dwflags, pllret as _) } } #[inline] pub unsafe fn StrToInt64ExW(pszstring: P0, dwflags: i32, pllret: *mut i64) -> super::super::Foundation::BOOL @@ -5036,7 +5036,7 @@ where P0: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn StrToInt64ExW(pszstring : windows_core::PCWSTR, dwflags : i32, pllret : *mut i64) -> super::super::Foundation:: BOOL); - unsafe { StrToInt64ExW(pszstring.param().abi(), dwflags, core::mem::transmute(pllret)) } + unsafe { StrToInt64ExW(pszstring.param().abi(), dwflags, pllret as _) } } #[inline] pub unsafe fn StrToIntA(pszsrc: P0) -> i32 @@ -5052,7 +5052,7 @@ where P0: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn StrToIntExA(pszstring : windows_core::PCSTR, dwflags : i32, piret : *mut i32) -> super::super::Foundation:: BOOL); - unsafe { StrToIntExA(pszstring.param().abi(), dwflags, core::mem::transmute(piret)) } + unsafe { StrToIntExA(pszstring.param().abi(), dwflags, piret as _) } } #[inline] pub unsafe fn StrToIntExW(pszstring: P0, dwflags: i32, piret: *mut i32) -> super::super::Foundation::BOOL @@ -5060,7 +5060,7 @@ where P0: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn StrToIntExW(pszstring : windows_core::PCWSTR, dwflags : i32, piret : *mut i32) -> super::super::Foundation:: BOOL); - unsafe { StrToIntExW(pszstring.param().abi(), dwflags, core::mem::transmute(piret)) } + unsafe { StrToIntExW(pszstring.param().abi(), dwflags, piret as _) } } #[inline] pub unsafe fn StrToIntW(pszsrc: P0) -> i32 @@ -5112,7 +5112,7 @@ where P0: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn UrlApplySchemeA(pszin : windows_core::PCSTR, pszout : windows_core::PSTR, pcchout : *mut u32, dwflags : u32) -> windows_core::HRESULT); - unsafe { UrlApplySchemeA(pszin.param().abi(), core::mem::transmute(pszout), core::mem::transmute(pcchout), dwflags).ok() } + unsafe { UrlApplySchemeA(pszin.param().abi(), core::mem::transmute(pszout), pcchout as _, dwflags).ok() } } #[inline] pub unsafe fn UrlApplySchemeW(pszin: P0, pszout: windows_core::PWSTR, pcchout: *mut u32, dwflags: u32) -> windows_core::Result<()> @@ -5120,7 +5120,7 @@ where P0: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn UrlApplySchemeW(pszin : windows_core::PCWSTR, pszout : windows_core::PWSTR, pcchout : *mut u32, dwflags : u32) -> windows_core::HRESULT); - unsafe { UrlApplySchemeW(pszin.param().abi(), core::mem::transmute(pszout), core::mem::transmute(pcchout), dwflags).ok() } + unsafe { UrlApplySchemeW(pszin.param().abi(), core::mem::transmute(pszout), pcchout as _, dwflags).ok() } } #[inline] pub unsafe fn UrlCanonicalizeA(pszurl: P0, pszcanonicalized: windows_core::PSTR, pcchcanonicalized: *mut u32, dwflags: u32) -> windows_core::Result<()> @@ -5128,7 +5128,7 @@ where P0: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn UrlCanonicalizeA(pszurl : windows_core::PCSTR, pszcanonicalized : windows_core::PSTR, pcchcanonicalized : *mut u32, dwflags : u32) -> windows_core::HRESULT); - unsafe { UrlCanonicalizeA(pszurl.param().abi(), core::mem::transmute(pszcanonicalized), core::mem::transmute(pcchcanonicalized), dwflags).ok() } + unsafe { UrlCanonicalizeA(pszurl.param().abi(), core::mem::transmute(pszcanonicalized), pcchcanonicalized as _, dwflags).ok() } } #[inline] pub unsafe fn UrlCanonicalizeW(pszurl: P0, pszcanonicalized: windows_core::PWSTR, pcchcanonicalized: *mut u32, dwflags: u32) -> windows_core::Result<()> @@ -5136,7 +5136,7 @@ where P0: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn UrlCanonicalizeW(pszurl : windows_core::PCWSTR, pszcanonicalized : windows_core::PWSTR, pcchcanonicalized : *mut u32, dwflags : u32) -> windows_core::HRESULT); - unsafe { UrlCanonicalizeW(pszurl.param().abi(), core::mem::transmute(pszcanonicalized), core::mem::transmute(pcchcanonicalized), dwflags).ok() } + unsafe { UrlCanonicalizeW(pszurl.param().abi(), core::mem::transmute(pszcanonicalized), pcchcanonicalized as _, dwflags).ok() } } #[inline] pub unsafe fn UrlCombineA(pszbase: P0, pszrelative: P1, pszcombined: Option, pcchcombined: *mut u32, dwflags: u32) -> windows_core::Result<()> @@ -5145,7 +5145,7 @@ where 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); - unsafe { UrlCombineA(pszbase.param().abi(), pszrelative.param().abi(), core::mem::transmute(pszcombined.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchcombined), dwflags).ok() } + unsafe { UrlCombineA(pszbase.param().abi(), pszrelative.param().abi(), pszcombined.unwrap_or(core::mem::zeroed()) as _, pcchcombined as _, dwflags).ok() } } #[inline] pub unsafe fn UrlCombineW(pszbase: P0, pszrelative: P1, pszcombined: Option, pcchcombined: *mut u32, dwflags: u32) -> windows_core::Result<()> @@ -5154,7 +5154,7 @@ where 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); - unsafe { UrlCombineW(pszbase.param().abi(), pszrelative.param().abi(), core::mem::transmute(pszcombined.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchcombined), dwflags).ok() } + unsafe { UrlCombineW(pszbase.param().abi(), pszrelative.param().abi(), pszcombined.unwrap_or(core::mem::zeroed()) as _, pcchcombined as _, dwflags).ok() } } #[inline] pub unsafe fn UrlCompareA(psz1: P0, psz2: P1, fignoreslash: bool) -> i32 @@ -5180,7 +5180,7 @@ where P0: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn UrlCreateFromPathA(pszpath : windows_core::PCSTR, pszurl : windows_core::PSTR, pcchurl : *mut u32, dwflags : u32) -> windows_core::HRESULT); - unsafe { UrlCreateFromPathA(pszpath.param().abi(), core::mem::transmute(pszurl), core::mem::transmute(pcchurl), dwflags).ok() } + unsafe { UrlCreateFromPathA(pszpath.param().abi(), core::mem::transmute(pszurl), pcchurl as _, dwflags).ok() } } #[inline] pub unsafe fn UrlCreateFromPathW(pszpath: P0, pszurl: windows_core::PWSTR, pcchurl: *mut u32, dwflags: u32) -> windows_core::Result<()> @@ -5188,7 +5188,7 @@ where P0: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn UrlCreateFromPathW(pszpath : windows_core::PCWSTR, pszurl : windows_core::PWSTR, pcchurl : *mut u32, dwflags : u32) -> windows_core::HRESULT); - unsafe { UrlCreateFromPathW(pszpath.param().abi(), core::mem::transmute(pszurl), core::mem::transmute(pcchurl), dwflags).ok() } + unsafe { UrlCreateFromPathW(pszpath.param().abi(), core::mem::transmute(pszurl), pcchurl as _, dwflags).ok() } } #[inline] pub unsafe fn UrlEscapeA(pszurl: P0, pszescaped: windows_core::PSTR, pcchescaped: *mut u32, dwflags: u32) -> windows_core::Result<()> @@ -5196,7 +5196,7 @@ where P0: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn UrlEscapeA(pszurl : windows_core::PCSTR, pszescaped : windows_core::PSTR, pcchescaped : *mut u32, dwflags : u32) -> windows_core::HRESULT); - unsafe { UrlEscapeA(pszurl.param().abi(), core::mem::transmute(pszescaped), core::mem::transmute(pcchescaped), dwflags).ok() } + unsafe { UrlEscapeA(pszurl.param().abi(), core::mem::transmute(pszescaped), pcchescaped as _, dwflags).ok() } } #[inline] pub unsafe fn UrlEscapeW(pszurl: P0, pszescaped: windows_core::PWSTR, pcchescaped: *mut u32, dwflags: u32) -> windows_core::Result<()> @@ -5204,7 +5204,7 @@ where P0: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn UrlEscapeW(pszurl : windows_core::PCWSTR, pszescaped : windows_core::PWSTR, pcchescaped : *mut u32, dwflags : u32) -> windows_core::HRESULT); - unsafe { UrlEscapeW(pszurl.param().abi(), core::mem::transmute(pszescaped), core::mem::transmute(pcchescaped), dwflags).ok() } + unsafe { UrlEscapeW(pszurl.param().abi(), core::mem::transmute(pszescaped), pcchescaped as _, dwflags).ok() } } #[inline] pub unsafe fn UrlFixupW(pcszurl: P0, psztranslatedurl: &mut [u16]) -> windows_core::Result<()> @@ -5236,7 +5236,7 @@ where P0: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn UrlGetPartA(pszin : windows_core::PCSTR, pszout : windows_core::PSTR, pcchout : *mut u32, dwpart : u32, dwflags : u32) -> windows_core::HRESULT); - unsafe { UrlGetPartA(pszin.param().abi(), core::mem::transmute(pszout), core::mem::transmute(pcchout), dwpart, dwflags).ok() } + unsafe { UrlGetPartA(pszin.param().abi(), core::mem::transmute(pszout), pcchout as _, dwpart, dwflags).ok() } } #[inline] pub unsafe fn UrlGetPartW(pszin: P0, pszout: windows_core::PWSTR, pcchout: *mut u32, dwpart: u32, dwflags: u32) -> windows_core::Result<()> @@ -5244,7 +5244,7 @@ where P0: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn UrlGetPartW(pszin : windows_core::PCWSTR, pszout : windows_core::PWSTR, pcchout : *mut u32, dwpart : u32, dwflags : u32) -> windows_core::HRESULT); - unsafe { UrlGetPartW(pszin.param().abi(), core::mem::transmute(pszout), core::mem::transmute(pcchout), dwpart, dwflags).ok() } + unsafe { UrlGetPartW(pszin.param().abi(), core::mem::transmute(pszout), pcchout as _, dwpart, dwflags).ok() } } #[inline] pub unsafe fn UrlHashA(pszurl: P0, pbhash: &mut [u8]) -> windows_core::Result<()> @@ -5313,18 +5313,18 @@ where #[inline] 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); - unsafe { UrlUnescapeA(core::mem::transmute(pszurl), core::mem::transmute(pszunescaped.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchunescaped.unwrap_or(core::mem::zeroed())), dwflags).ok() } + unsafe { UrlUnescapeA(core::mem::transmute(pszurl), pszunescaped.unwrap_or(core::mem::zeroed()) as _, pcchunescaped.unwrap_or(core::mem::zeroed()) as _, dwflags).ok() } } #[inline] 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); - unsafe { UrlUnescapeW(core::mem::transmute(pszurl), core::mem::transmute(pszunescaped.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchunescaped.unwrap_or(core::mem::zeroed())), dwflags).ok() } + unsafe { UrlUnescapeW(core::mem::transmute(pszurl), pszunescaped.unwrap_or(core::mem::zeroed()) as _, pcchunescaped.unwrap_or(core::mem::zeroed()) as _, dwflags).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_Common"))] #[inline] pub unsafe fn VariantToStrRet(varin: *const super::super::System::Variant::VARIANT, pstrret: *mut Common::STRRET) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn VariantToStrRet(varin : *const super::super::System::Variant:: VARIANT, pstrret : *mut Common:: STRRET) -> windows_core::HRESULT); - unsafe { VariantToStrRet(core::mem::transmute(varin), core::mem::transmute(pstrret)).ok() } + unsafe { VariantToStrRet(core::mem::transmute(varin), pstrret as _).ok() } } #[inline] pub unsafe fn WhichPlatform() -> u32 { @@ -5345,7 +5345,7 @@ where 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); - unsafe { WinHelpA(core::mem::transmute(hwndmain.unwrap_or(core::mem::zeroed())), lpszhelp.param().abi(), ucommand, dwdata).ok() } + unsafe { WinHelpA(hwndmain.unwrap_or(core::mem::zeroed()) as _, lpszhelp.param().abi(), ucommand, dwdata).ok() } } #[inline] pub unsafe fn WinHelpW(hwndmain: Option, lpszhelp: P1, ucommand: u32, dwdata: usize) -> windows_core::Result<()> @@ -5353,7 +5353,7 @@ where 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); - unsafe { WinHelpW(core::mem::transmute(hwndmain.unwrap_or(core::mem::zeroed())), lpszhelp.param().abi(), ucommand, dwdata).ok() } + unsafe { WinHelpW(hwndmain.unwrap_or(core::mem::zeroed()) as _, lpszhelp.param().abi(), ucommand, dwdata).ok() } } #[inline] pub unsafe fn WriteCabinetState(pcs: *const CABINETSTATE) -> super::super::Foundation::BOOL { @@ -6567,11 +6567,11 @@ windows_core::imp::interface_hierarchy!(CIE4ConnectionPoint, windows_core::IUnkn impl CIE4ConnectionPoint { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn DoInvokeIE4(&self, pf: *mut super::super::Foundation::BOOL, ppv: *mut *mut core::ffi::c_void, dispid: i32, pdispparams: *mut super::super::System::Com::DISPPARAMS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DoInvokeIE4)(windows_core::Interface::as_raw(self), core::mem::transmute(pf), core::mem::transmute(ppv), dispid, core::mem::transmute(pdispparams)).ok() } + unsafe { (windows_core::Interface::vtable(self).DoInvokeIE4)(windows_core::Interface::as_raw(self), pf as _, ppv as _, dispid, pdispparams as _).ok() } } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn DoInvokePIDLIE4(&self, dispid: i32, pidl: *mut Common::ITEMIDLIST, fcancancel: bool) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DoInvokePIDLIE4)(windows_core::Interface::as_raw(self), dispid, core::mem::transmute(pidl), fcancancel.into()).ok() } + unsafe { (windows_core::Interface::vtable(self).DoInvokePIDLIE4)(windows_core::Interface::as_raw(self), dispid, pidl as _, fcancancel.into()).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -11104,7 +11104,7 @@ windows_core::imp::interface_hierarchy!(IAccessibilityDockingService, windows_co impl IAccessibilityDockingService { #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetAvailableSize(&self, hmonitor: super::super::Graphics::Gdi::HMONITOR, pcxfixed: *mut u32, pcymax: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAvailableSize)(windows_core::Interface::as_raw(self), hmonitor, core::mem::transmute(pcxfixed), core::mem::transmute(pcymax)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAvailableSize)(windows_core::Interface::as_raw(self), hmonitor, pcxfixed as _, pcymax as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn DockWindow(&self, hwnd: super::super::Foundation::HWND, hmonitor: super::super::Graphics::Gdi::HMONITOR, cyrequested: u32, pcallback: P3) -> windows_core::Result<()> @@ -12193,7 +12193,7 @@ impl IApplicationDesignModeSettings2 { unsafe { (windows_core::Interface::vtable(self).SetApplicationViewMinWidth)(windows_core::Interface::as_raw(self), viewminwidth).ok() } } pub unsafe fn GetApplicationSizeBounds(&self, minapplicationsizepixels: *mut super::super::Foundation::SIZE, maxapplicationsizepixels: *mut super::super::Foundation::SIZE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetApplicationSizeBounds)(windows_core::Interface::as_raw(self), core::mem::transmute(minapplicationsizepixels), core::mem::transmute(maxapplicationsizepixels)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetApplicationSizeBounds)(windows_core::Interface::as_raw(self), minapplicationsizepixels as _, maxapplicationsizepixels as _).ok() } } pub unsafe fn GetApplicationViewOrientation(&self, applicationsizepixels: super::super::Foundation::SIZE) -> windows_core::Result { unsafe { @@ -12418,7 +12418,7 @@ impl IAssocHandler { } } pub unsafe fn GetIconLocation(&self, ppszpath: *mut windows_core::PWSTR, pindex: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIconLocation)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszpath), core::mem::transmute(pindex)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIconLocation)(windows_core::Interface::as_raw(self), ppszpath as _, pindex as _).ok() } } pub unsafe fn IsRecommended(&self) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).IsRecommended)(windows_core::Interface::as_raw(self)) } @@ -12651,7 +12651,7 @@ impl IAttachmentExecute { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Execute)(windows_core::Interface::as_raw(self), hwnd, pszverb.param().abi(), core::mem::transmute(phprocess.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Execute)(windows_core::Interface::as_raw(self), hwnd, pszverb.param().abi(), phprocess.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SaveWithUI(&self, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SaveWithUI)(windows_core::Interface::as_raw(self), hwnd).ok() } @@ -12897,7 +12897,7 @@ windows_core::imp::define_interface!(IAutoCompleteDropDown, IAutoCompleteDropDow windows_core::imp::interface_hierarchy!(IAutoCompleteDropDown, windows_core::IUnknown); impl IAutoCompleteDropDown { pub unsafe fn GetDropDownStatus(&self, pdwflags: *mut u32, ppwszstring: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDropDownStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwflags), core::mem::transmute(ppwszstring)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDropDownStatus)(windows_core::Interface::as_raw(self), pdwflags as _, ppwszstring as _).ok() } } pub unsafe fn ResetEnumerator(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ResetEnumerator)(windows_core::Interface::as_raw(self)).ok() } @@ -13016,7 +13016,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<()> { - unsafe { (windows_core::Interface::vtable(self).QueryBand)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).QueryBand)(windows_core::Interface::as_raw(self), dwbandid, ppstb.unwrap_or(core::mem::zeroed()) as _, pdwstate.unwrap_or(core::mem::zeroed()) as _, 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<()> { unsafe { (windows_core::Interface::vtable(self).SetBandState)(windows_core::Interface::as_raw(self), dwbandid, dwmask, dwstate).ok() } @@ -13035,7 +13035,7 @@ impl IBandSite { unsafe { (windows_core::Interface::vtable(self).SetBandSiteInfo)(windows_core::Interface::as_raw(self), pbsinfo).ok() } } pub unsafe fn GetBandSiteInfo(&self, pbsinfo: *mut BANDSITEINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBandSiteInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pbsinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBandSiteInfo)(windows_core::Interface::as_raw(self), pbsinfo as _).ok() } } } #[repr(C)] @@ -13958,7 +13958,7 @@ impl IBrowserService2 { } } pub unsafe fn CreateBrowserPropSheetExt(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CreateBrowserPropSheetExt)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(ppv)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateBrowserPropSheetExt)(windows_core::Interface::as_raw(self), riid, ppv as _).ok() } } pub unsafe fn GetViewWindow(&self) -> windows_core::Result { unsafe { @@ -14044,13 +14044,13 @@ impl IBrowserService2 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self)._ExecChildren)(windows_core::Interface::as_raw(self), punkbar.param().abi(), fbroadcast.into(), core::mem::transmute(pguidcmdgroup.unwrap_or(core::mem::zeroed())), ncmdid, ncmdexecopt, core::mem::transmute(pvarargin.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvarargout.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self)._ExecChildren)(windows_core::Interface::as_raw(self), punkbar.param().abi(), fbroadcast.into(), pguidcmdgroup.unwrap_or(core::mem::zeroed()) as _, ncmdid, ncmdexecopt, pvarargin.unwrap_or(core::mem::zeroed()) as _, pvarargout.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn _SendChildren(&self, hwndbar: super::super::Foundation::HWND, fbroadcast: bool, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self)._SendChildren)(windows_core::Interface::as_raw(self), hwndbar, fbroadcast.into(), umsg, wparam, lparam).ok() } } pub unsafe fn GetFolderSetData(&self, pfsd: *mut FOLDERSETDATA) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFolderSetData)(windows_core::Interface::as_raw(self), core::mem::transmute(pfsd)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFolderSetData)(windows_core::Interface::as_raw(self), pfsd as _).ok() } } pub unsafe fn _OnFocusChange(&self, itb: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self)._OnFocusChange)(windows_core::Interface::as_raw(self), itb).ok() } @@ -14068,7 +14068,7 @@ impl IBrowserService2 { unsafe { (windows_core::Interface::vtable(self)._UIActivateView)(windows_core::Interface::as_raw(self), ustate).ok() } } pub unsafe fn _GetViewBorderRect(&self, prc: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self)._GetViewBorderRect)(windows_core::Interface::as_raw(self), core::mem::transmute(prc)).ok() } + unsafe { (windows_core::Interface::vtable(self)._GetViewBorderRect)(windows_core::Interface::as_raw(self), prc as _).ok() } } pub unsafe fn _UpdateViewRectSize(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self)._UpdateViewRectSize)(windows_core::Interface::as_raw(self)).ok() } @@ -14081,14 +14081,14 @@ impl IBrowserService2 { } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn _GetEffectiveClientArea(&self, lprectborder: *mut super::super::Foundation::RECT, hmon: super::super::Graphics::Gdi::HMONITOR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self)._GetEffectiveClientArea)(windows_core::Interface::as_raw(self), core::mem::transmute(lprectborder), hmon).ok() } + unsafe { (windows_core::Interface::vtable(self)._GetEffectiveClientArea)(windows_core::Interface::as_raw(self), lprectborder as _, 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 where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).v_GetViewStream)(windows_core::Interface::as_raw(self), core::mem::transmute(pidl), grfmode, pwszname.param().abi()) } + unsafe { (windows_core::Interface::vtable(self).v_GetViewStream)(windows_core::Interface::as_raw(self), pidl as _, grfmode, pwszname.param().abi()) } } pub unsafe fn ForwardViewMsg(&self, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { unsafe { (windows_core::Interface::vtable(self).ForwardViewMsg)(windows_core::Interface::as_raw(self), umsg, wparam, lparam) } @@ -14123,7 +14123,7 @@ impl IBrowserService2 { } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Ole", feature = "Win32_UI_WindowsAndMessaging"))] pub unsafe fn v_MayGetNextToolbarFocus(&self, lpmsg: *const super::WindowsAndMessaging::MSG, itbnext: u32, citb: i32, pptbi: *mut *mut TOOLBARITEM, phwnd: *mut super::super::Foundation::HWND) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).v_MayGetNextToolbarFocus)(windows_core::Interface::as_raw(self), lpmsg, itbnext, citb, core::mem::transmute(pptbi), core::mem::transmute(phwnd)).ok() } + unsafe { (windows_core::Interface::vtable(self).v_MayGetNextToolbarFocus)(windows_core::Interface::as_raw(self), lpmsg, itbnext, citb, pptbi as _, phwnd as _).ok() } } pub unsafe fn _ResizeNextBorderHelper(&self, itb: u32, busehmonitor: bool) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self)._ResizeNextBorderHelper)(windows_core::Interface::as_raw(self), itb, busehmonitor.into()).ok() } @@ -14140,13 +14140,13 @@ impl IBrowserService2 { } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn v_MayTranslateAccelerator(&self, pmsg: *mut super::WindowsAndMessaging::MSG) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).v_MayTranslateAccelerator)(windows_core::Interface::as_raw(self), core::mem::transmute(pmsg)).ok() } + unsafe { (windows_core::Interface::vtable(self).v_MayTranslateAccelerator)(windows_core::Interface::as_raw(self), pmsg as _).ok() } } pub unsafe fn _GetBorderDWHelper(&self, punksrc: P0, lprectborder: *mut super::super::Foundation::RECT, busehmonitor: bool) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self)._GetBorderDWHelper)(windows_core::Interface::as_raw(self), punksrc.param().abi(), core::mem::transmute(lprectborder), busehmonitor.into()).ok() } + unsafe { (windows_core::Interface::vtable(self)._GetBorderDWHelper)(windows_core::Interface::as_raw(self), punksrc.param().abi(), lprectborder as _, busehmonitor.into()).ok() } } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn v_CheckZoneCrossing(&self, pidl: *const Common::ITEMIDLIST) -> windows_core::Result<()> { @@ -15058,10 +15058,10 @@ impl ICategorizer { } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn GetCategory(&self, cidl: u32, apidl: *const *const Common::ITEMIDLIST, rgcategoryids: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCategory)(windows_core::Interface::as_raw(self), cidl, apidl, core::mem::transmute(rgcategoryids)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCategory)(windows_core::Interface::as_raw(self), cidl, apidl, rgcategoryids as _).ok() } } pub unsafe fn GetCategoryInfo(&self, dwcategoryid: u32, pci: *mut CATEGORY_INFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCategoryInfo)(windows_core::Interface::as_raw(self), dwcategoryid, core::mem::transmute(pci)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCategoryInfo)(windows_core::Interface::as_raw(self), dwcategoryid, pci as _).ok() } } pub unsafe fn CompareCategory(&self, csfflags: CATSORT_FLAGS, dwcategoryid1: u32, dwcategoryid2: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).CompareCategory)(windows_core::Interface::as_raw(self), csfflags, dwcategoryid1, dwcategoryid2).ok() } @@ -15133,7 +15133,7 @@ impl ICategoryProvider { unsafe { (windows_core::Interface::vtable(self).CanCategorizeOnSCID)(windows_core::Interface::as_raw(self), pscid).ok() } } pub unsafe fn GetDefaultCategory(&self, pguid: *mut windows_core::GUID, pscid: *mut super::super::Foundation::PROPERTYKEY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDefaultCategory)(windows_core::Interface::as_raw(self), core::mem::transmute(pguid), core::mem::transmute(pscid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDefaultCategory)(windows_core::Interface::as_raw(self), pguid as _, pscid as _).ok() } } pub unsafe fn GetCategoryForSCID(&self, pscid: *const super::super::Foundation::PROPERTYKEY) -> windows_core::Result { unsafe { @@ -15255,7 +15255,7 @@ impl IColumnManager { unsafe { (windows_core::Interface::vtable(self).SetColumnInfo)(windows_core::Interface::as_raw(self), propkey, pcmci).ok() } } pub unsafe fn GetColumnInfo(&self, propkey: *const super::super::Foundation::PROPERTYKEY, pcmci: *mut CM_COLUMNINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetColumnInfo)(windows_core::Interface::as_raw(self), propkey, core::mem::transmute(pcmci)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetColumnInfo)(windows_core::Interface::as_raw(self), propkey, pcmci as _).ok() } } pub unsafe fn GetColumnCount(&self, dwflags: CM_ENUM_FLAGS) -> windows_core::Result { unsafe { @@ -15346,7 +15346,7 @@ impl IColumnProvider { } #[cfg(feature = "Win32_System_Variant")] pub unsafe fn GetColumnInfo(&self, dwindex: u32, psci: *mut SHCOLUMNINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetColumnInfo)(windows_core::Interface::as_raw(self), dwindex, core::mem::transmute(psci)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetColumnInfo)(windows_core::Interface::as_raw(self), dwindex, psci as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetItemData(&self, pscid: *const super::super::Foundation::PROPERTYKEY, pscd: *const SHCOLUMNDATA) -> windows_core::Result { @@ -15796,7 +15796,7 @@ impl IContextMenu { unsafe { (windows_core::Interface::vtable(self).InvokeCommand)(windows_core::Interface::as_raw(self), pici).ok() } } pub unsafe fn GetCommandString(&self, idcmd: usize, utype: u32, preserved: Option<*const u32>, pszname: windows_core::PSTR, cchmax: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCommandString)(windows_core::Interface::as_raw(self), idcmd, utype, core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pszname), cchmax).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCommandString)(windows_core::Interface::as_raw(self), idcmd, utype, preserved.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pszname), cchmax).ok() } } } #[repr(C)] @@ -15898,7 +15898,7 @@ 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: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM, plresult: Option<*mut super::super::Foundation::LRESULT>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).HandleMenuMsg2)(windows_core::Interface::as_raw(self), umsg, wparam, lparam, core::mem::transmute(plresult.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).HandleMenuMsg2)(windows_core::Interface::as_raw(self), umsg, wparam, lparam, plresult.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -15936,7 +15936,7 @@ impl IContextMenuCB { P0: windows_core::Param, P2: windows_core::Param, { - unsafe { (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(), umsg, wparam, lparam).ok() } + unsafe { (windows_core::Interface::vtable(self).CallBack)(windows_core::Interface::as_raw(self), psf.param().abi(), hwndowner.unwrap_or(core::mem::zeroed()) as _, pdtobj.param().abi(), umsg, wparam, lparam).ok() } } } #[repr(C)] @@ -16009,7 +16009,7 @@ impl ICopyHookA { P3: windows_core::Param, P5: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CopyCallback)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), wfunc, wflags, pszsrcfile.param().abi(), dwsrcattribs, pszdestfile.param().abi(), dwdestattribs) } + unsafe { (windows_core::Interface::vtable(self).CopyCallback)(windows_core::Interface::as_raw(self), hwnd.unwrap_or(core::mem::zeroed()) as _, wfunc, wflags, pszsrcfile.param().abi(), dwsrcattribs, pszdestfile.param().abi(), dwdestattribs) } } } #[repr(C)] @@ -16043,7 +16043,7 @@ impl ICopyHookW { P3: windows_core::Param, P5: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CopyCallback)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), wfunc, wflags, pszsrcfile.param().abi(), dwsrcattribs, pszdestfile.param().abi(), dwdestattribs) } + unsafe { (windows_core::Interface::vtable(self).CopyCallback)(windows_core::Interface::as_raw(self), hwnd.unwrap_or(core::mem::zeroed()) as _, wfunc, wflags, pszsrcfile.param().abi(), dwsrcattribs, pszdestfile.param().abi(), dwdestattribs) } } } #[repr(C)] @@ -16254,7 +16254,7 @@ impl ICredentialProvider { } } pub unsafe fn GetCredentialCount(&self, pdwcount: *mut u32, pdwdefault: *mut u32, pbautologonwithdefault: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCredentialCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwcount), core::mem::transmute(pdwdefault), core::mem::transmute(pbautologonwithdefault)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCredentialCount)(windows_core::Interface::as_raw(self), pdwcount as _, pdwdefault as _, pbautologonwithdefault as _).ok() } } pub unsafe fn GetCredentialAt(&self, dwindex: u32) -> windows_core::Result { unsafe { @@ -16392,7 +16392,7 @@ impl ICredentialProviderCredential { unsafe { (windows_core::Interface::vtable(self).SetDeselected)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetFieldState(&self, dwfieldid: u32, pcpfs: *mut CREDENTIAL_PROVIDER_FIELD_STATE, pcpfis: *mut CREDENTIAL_PROVIDER_FIELD_INTERACTIVE_STATE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFieldState)(windows_core::Interface::as_raw(self), dwfieldid, core::mem::transmute(pcpfs), core::mem::transmute(pcpfis)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFieldState)(windows_core::Interface::as_raw(self), dwfieldid, pcpfs as _, pcpfis as _).ok() } } pub unsafe fn GetStringValue(&self, dwfieldid: u32) -> windows_core::Result { unsafe { @@ -16408,7 +16408,7 @@ impl ICredentialProviderCredential { } } pub unsafe fn GetCheckboxValue(&self, dwfieldid: u32, pbchecked: *mut super::super::Foundation::BOOL, ppszlabel: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCheckboxValue)(windows_core::Interface::as_raw(self), dwfieldid, core::mem::transmute(pbchecked), core::mem::transmute(ppszlabel)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCheckboxValue)(windows_core::Interface::as_raw(self), dwfieldid, pbchecked as _, ppszlabel as _).ok() } } pub unsafe fn GetSubmitButtonValue(&self, dwfieldid: u32) -> windows_core::Result { unsafe { @@ -16417,7 +16417,7 @@ impl ICredentialProviderCredential { } } pub unsafe fn GetComboBoxValueCount(&self, dwfieldid: u32, pcitems: *mut u32, pdwselecteditem: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetComboBoxValueCount)(windows_core::Interface::as_raw(self), dwfieldid, core::mem::transmute(pcitems), core::mem::transmute(pdwselecteditem)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetComboBoxValueCount)(windows_core::Interface::as_raw(self), dwfieldid, pcitems as _, pdwselecteditem as _).ok() } } pub unsafe fn GetComboBoxValueAt(&self, dwfieldid: u32, dwitem: u32) -> windows_core::Result { unsafe { @@ -16441,10 +16441,10 @@ impl ICredentialProviderCredential { unsafe { (windows_core::Interface::vtable(self).CommandLinkClicked)(windows_core::Interface::as_raw(self), dwfieldid).ok() } } 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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetSerialization)(windows_core::Interface::as_raw(self), pcpgsr as _, pcpcs as _, ppszoptionalstatustext as _, pcpsioptionalstatusicon as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).ReportResult)(windows_core::Interface::as_raw(self), ntsstatus, ntssubstatus, core::mem::transmute(ppszoptionalstatustext), core::mem::transmute(pcpsioptionalstatusicon)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReportResult)(windows_core::Interface::as_raw(self), ntsstatus, ntssubstatus, ppszoptionalstatustext as _, pcpsioptionalstatusicon as _).ok() } } } #[repr(C)] @@ -17030,10 +17030,10 @@ windows_core::imp::define_interface!(ICredentialProviderFilter, ICredentialProvi windows_core::imp::interface_hierarchy!(ICredentialProviderFilter, windows_core::IUnknown); impl ICredentialProviderFilter { pub unsafe fn Filter(&self, cpus: CREDENTIAL_PROVIDER_USAGE_SCENARIO, dwflags: u32, rgclsidproviders: *const windows_core::GUID, rgballow: *mut super::super::Foundation::BOOL, cproviders: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Filter)(windows_core::Interface::as_raw(self), cpus, dwflags, rgclsidproviders, core::mem::transmute(rgballow), cproviders).ok() } + unsafe { (windows_core::Interface::vtable(self).Filter)(windows_core::Interface::as_raw(self), cpus, dwflags, rgclsidproviders, rgballow as _, cproviders).ok() } } pub unsafe fn UpdateRemoteCredential(&self, pcpcsin: *const CREDENTIAL_PROVIDER_CREDENTIAL_SERIALIZATION, pcpcsout: *mut CREDENTIAL_PROVIDER_CREDENTIAL_SERIALIZATION) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).UpdateRemoteCredential)(windows_core::Interface::as_raw(self), pcpcsin, core::mem::transmute(pcpcsout)).ok() } + unsafe { (windows_core::Interface::vtable(self).UpdateRemoteCredential)(windows_core::Interface::as_raw(self), pcpcsin, pcpcsout as _).ok() } } } #[repr(C)] @@ -17399,7 +17399,7 @@ impl ICustomDestinationList { T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - unsafe { (windows_core::Interface::vtable(self).BeginList)(windows_core::Interface::as_raw(self), core::mem::transmute(pcminslots), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } + unsafe { (windows_core::Interface::vtable(self).BeginList)(windows_core::Interface::as_raw(self), pcminslots as _, &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn AppendCategory(&self, pszcategory: P0, poa: P1) -> windows_core::Result<()> @@ -17912,7 +17912,7 @@ impl IDefaultFolderMenuInitialize { P3: windows_core::Param, P6: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), 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(), ckeys, core::mem::transmute(akeys.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), hwnd, pcmcb.param().abi(), pidlfolder.unwrap_or(core::mem::zeroed()) as _, psf.param().abi(), apidl.len().try_into().unwrap(), core::mem::transmute(apidl.as_ptr()), punkassociation.param().abi(), ckeys, akeys.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetMenuRestrictions(&self, dfmrvalues: DEFAULT_FOLDER_MENU_RESTRICTIONS) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetMenuRestrictions)(windows_core::Interface::as_raw(self), dfmrvalues).ok() } @@ -18071,7 +18071,7 @@ windows_core::imp::interface_hierarchy!(IDeskBand, windows_core::IUnknown, super #[cfg(feature = "Win32_System_Ole")] impl IDeskBand { pub unsafe fn GetBandInfo(&self, dwbandid: u32, dwviewmode: u32, pdbi: *mut DESKBANDINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBandInfo)(windows_core::Interface::as_raw(self), dwbandid, dwviewmode, core::mem::transmute(pdbi)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBandInfo)(windows_core::Interface::as_raw(self), dwbandid, dwviewmode, pdbi as _).ok() } } } #[cfg(feature = "Win32_System_Ole")] @@ -18514,7 +18514,7 @@ impl IDesktopWallpaper { unsafe { (windows_core::Interface::vtable(self).SetSlideshowOptions)(windows_core::Interface::as_raw(self), options, slideshowtick).ok() } } pub unsafe fn GetSlideshowOptions(&self, options: *mut DESKTOP_SLIDESHOW_OPTIONS, slideshowtick: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSlideshowOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(options), core::mem::transmute(slideshowtick)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSlideshowOptions)(windows_core::Interface::as_raw(self), options as _, slideshowtick as _).ok() } } pub unsafe fn AdvanceSlideshow(&self, monitorid: P0, direction: DESKTOP_SLIDESHOW_DIRECTION) -> windows_core::Result<()> where @@ -18953,7 +18953,7 @@ impl IDockingWindowFrame { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindToolbar)(windows_core::Interface::as_raw(self), pwszitem.param().abi(), riid, core::mem::transmute(ppv)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindToolbar)(windows_core::Interface::as_raw(self), pwszitem.param().abi(), riid, ppv as _).ok() } } } #[cfg(feature = "Win32_System_Ole")] @@ -19108,7 +19108,7 @@ impl IDragSourceHelper { where P2: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).InitializeFromWindow)(windows_core::Interface::as_raw(self), hwnd.unwrap_or(core::mem::zeroed()) as _, ppt.unwrap_or(core::mem::zeroed()) as _, pdataobject.param().abi()).ok() } } } #[repr(C)] @@ -19378,7 +19378,7 @@ windows_core::imp::interface_hierarchy!(IEnumACString, windows_core::IUnknown, s #[cfg(feature = "Win32_System_Com")] impl IEnumACString { pub unsafe fn NextItem(&self, pszurl: Option<&mut [u16]>, pulsortindex: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).NextItem)(windows_core::Interface::as_raw(self), core::mem::transmute(pszurl.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszurl.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pulsortindex)).ok() } + unsafe { (windows_core::Interface::vtable(self).NextItem)(windows_core::Interface::as_raw(self), core::mem::transmute(pszurl.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszurl.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pulsortindex as _).ok() } } pub unsafe fn SetEnumOptions(&self, dwoptions: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetEnumOptions)(windows_core::Interface::as_raw(self), dwoptions).ok() } @@ -19448,7 +19448,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -19478,7 +19478,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 { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), puicommand.len().try_into().unwrap(), core::mem::transmute(puicommand.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -19556,7 +19556,7 @@ windows_core::imp::define_interface!(IEnumExtraSearch, IEnumExtraSearch_Vtbl, 0x windows_core::imp::interface_hierarchy!(IEnumExtraSearch, windows_core::IUnknown); impl IEnumExtraSearch { pub unsafe fn Next(&self, rgelt: &mut [EXTRASEARCH], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -19635,7 +19635,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 { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -19719,7 +19719,7 @@ windows_core::imp::define_interface!(IEnumHLITEM, IEnumHLITEM_Vtbl, 0x79eac9c6_b windows_core::imp::interface_hierarchy!(IEnumHLITEM, windows_core::IUnknown); impl IEnumHLITEM { pub unsafe fn Next(&self, celt: u32, rgelt: *mut HLITEM, pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(rgelt), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, rgelt as _, pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -19798,7 +19798,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 { - unsafe { (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()))) } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _) } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt) } @@ -19873,7 +19873,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<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), riid, core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), riid, core::mem::transmute(rgelt.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -20031,7 +20031,7 @@ windows_core::imp::define_interface!(IEnumResources, IEnumResources_Vtbl, 0x2dd8 windows_core::imp::interface_hierarchy!(IEnumResources, windows_core::IUnknown); impl IEnumResources { pub unsafe fn Next(&self, psir: &mut [SHELL_ITEM_RESOURCE], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), psir.len().try_into().unwrap(), core::mem::transmute(psir.as_ptr()), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), psir.len().try_into().unwrap(), core::mem::transmute(psir.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -20109,7 +20109,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -20187,7 +20187,7 @@ windows_core::imp::define_interface!(IEnumSyncMgrConflict, IEnumSyncMgrConflict_ windows_core::imp::interface_hierarchy!(IEnumSyncMgrConflict, windows_core::IUnknown); impl IEnumSyncMgrConflict { pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -20265,7 +20265,7 @@ windows_core::imp::define_interface!(IEnumSyncMgrEvents, IEnumSyncMgrEvents_Vtbl windows_core::imp::interface_hierarchy!(IEnumSyncMgrEvents, windows_core::IUnknown); impl IEnumSyncMgrEvents { pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -20343,7 +20343,7 @@ windows_core::imp::define_interface!(IEnumSyncMgrSyncItems, IEnumSyncMgrSyncItem windows_core::imp::interface_hierarchy!(IEnumSyncMgrSyncItems, windows_core::IUnknown); impl IEnumSyncMgrSyncItems { pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -20421,7 +20421,7 @@ windows_core::imp::define_interface!(IEnumTravelLogEntry, IEnumTravelLogEntry_Vt windows_core::imp::interface_hierarchy!(IEnumTravelLogEntry, windows_core::IUnknown); impl IEnumTravelLogEntry { pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -20764,7 +20764,7 @@ impl IExpDispSupport { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn OnInvoke(&self, dispidmember: i32, iid: *const windows_core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut super::super::System::Variant::VARIANT, pexcepinfo: *mut super::super::System::Com::EXCEPINFO, puargerr: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OnInvoke)(windows_core::Interface::as_raw(self), dispidmember, iid, lcid, wflags, pdispparams, core::mem::transmute(pvarresult), core::mem::transmute(pexcepinfo), core::mem::transmute(puargerr)).ok() } + unsafe { (windows_core::Interface::vtable(self).OnInvoke)(windows_core::Interface::as_raw(self), dispidmember, iid, lcid, wflags, pdispparams, core::mem::transmute(pvarresult), core::mem::transmute(pexcepinfo), puargerr as _).ok() } } } #[repr(C)] @@ -20845,7 +20845,7 @@ impl IExpDispSupportXP { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn OnInvoke(&self, dispidmember: i32, iid: *const windows_core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut super::super::System::Variant::VARIANT, pexcepinfo: *mut super::super::System::Com::EXCEPINFO, puargerr: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OnInvoke)(windows_core::Interface::as_raw(self), dispidmember, iid, lcid, wflags, pdispparams, core::mem::transmute(pvarresult), core::mem::transmute(pexcepinfo), core::mem::transmute(puargerr)).ok() } + unsafe { (windows_core::Interface::vtable(self).OnInvoke)(windows_core::Interface::as_raw(self), dispidmember, iid, lcid, wflags, pdispparams, core::mem::transmute(pvarresult), core::mem::transmute(pexcepinfo), puargerr as _).ok() } } } #[repr(C)] @@ -20914,14 +20914,14 @@ windows_core::imp::define_interface!(IExplorerBrowser, IExplorerBrowser_Vtbl, 0x windows_core::imp::interface_hierarchy!(IExplorerBrowser, windows_core::IUnknown); impl IExplorerBrowser { pub unsafe fn Initialize(&self, hwndparent: super::super::Foundation::HWND, prc: *const super::super::Foundation::RECT, pfs: Option<*const FOLDERSETTINGS>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), hwndparent, prc, core::mem::transmute(pfs.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), hwndparent, prc, pfs.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Destroy(&self) -> windows_core::Result<()> { unsafe { (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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).SetRect)(windows_core::Interface::as_raw(self), phdwp.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(rcbrowser)).ok() } } pub unsafe fn SetPropertyBag(&self, pszpropertybag: P0) -> windows_core::Result<()> where @@ -21644,14 +21644,14 @@ windows_core::imp::define_interface!(IExtractIconA, IExtractIconA_Vtbl, 0x000214 windows_core::imp::interface_hierarchy!(IExtractIconA, windows_core::IUnknown); impl IExtractIconA { pub unsafe fn GetIconLocation(&self, uflags: u32, psziconfile: &mut [u8], piindex: *mut i32, pwflags: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIconLocation)(windows_core::Interface::as_raw(self), uflags, core::mem::transmute(psziconfile.as_ptr()), psziconfile.len().try_into().unwrap(), core::mem::transmute(piindex), core::mem::transmute(pwflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIconLocation)(windows_core::Interface::as_raw(self), uflags, core::mem::transmute(psziconfile.as_ptr()), psziconfile.len().try_into().unwrap(), piindex as _, pwflags as _).ok() } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn Extract(&self, pszfile: P0, niconindex: u32, phiconlarge: Option<*mut super::WindowsAndMessaging::HICON>, phiconsmall: Option<*mut super::WindowsAndMessaging::HICON>, niconsize: u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Extract)(windows_core::Interface::as_raw(self), pszfile.param().abi(), niconindex, core::mem::transmute(phiconlarge.unwrap_or(core::mem::zeroed())), core::mem::transmute(phiconsmall.unwrap_or(core::mem::zeroed())), niconsize).ok() } + unsafe { (windows_core::Interface::vtable(self).Extract)(windows_core::Interface::as_raw(self), pszfile.param().abi(), niconindex, phiconlarge.unwrap_or(core::mem::zeroed()) as _, phiconsmall.unwrap_or(core::mem::zeroed()) as _, niconsize).ok() } } } #[repr(C)] @@ -21699,14 +21699,14 @@ windows_core::imp::define_interface!(IExtractIconW, IExtractIconW_Vtbl, 0x000214 windows_core::imp::interface_hierarchy!(IExtractIconW, windows_core::IUnknown); impl IExtractIconW { pub unsafe fn GetIconLocation(&self, uflags: u32, psziconfile: &mut [u16], piindex: *mut i32, pwflags: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIconLocation)(windows_core::Interface::as_raw(self), uflags, core::mem::transmute(psziconfile.as_ptr()), psziconfile.len().try_into().unwrap(), core::mem::transmute(piindex), core::mem::transmute(pwflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIconLocation)(windows_core::Interface::as_raw(self), uflags, core::mem::transmute(psziconfile.as_ptr()), psziconfile.len().try_into().unwrap(), piindex as _, pwflags as _).ok() } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn Extract(&self, pszfile: P0, niconindex: u32, phiconlarge: Option<*mut super::WindowsAndMessaging::HICON>, phiconsmall: Option<*mut super::WindowsAndMessaging::HICON>, niconsize: u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Extract)(windows_core::Interface::as_raw(self), pszfile.param().abi(), niconindex, core::mem::transmute(phiconlarge.unwrap_or(core::mem::zeroed())), core::mem::transmute(phiconsmall.unwrap_or(core::mem::zeroed())), niconsize).ok() } + unsafe { (windows_core::Interface::vtable(self).Extract)(windows_core::Interface::as_raw(self), pszfile.param().abi(), niconindex, phiconlarge.unwrap_or(core::mem::zeroed()) as _, phiconsmall.unwrap_or(core::mem::zeroed()) as _, niconsize).ok() } } } #[repr(C)] @@ -21754,7 +21754,7 @@ windows_core::imp::define_interface!(IExtractImage, IExtractImage_Vtbl, 0xbb2e61 windows_core::imp::interface_hierarchy!(IExtractImage, windows_core::IUnknown); impl IExtractImage { pub unsafe fn GetLocation(&self, pszpathbuffer: &mut [u16], pdwpriority: *mut u32, prgsize: *const super::super::Foundation::SIZE, dwrecclrdepth: u32, pdwflags: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLocation)(windows_core::Interface::as_raw(self), core::mem::transmute(pszpathbuffer.as_ptr()), pszpathbuffer.len().try_into().unwrap(), core::mem::transmute(pdwpriority), prgsize, dwrecclrdepth, core::mem::transmute(pdwflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLocation)(windows_core::Interface::as_raw(self), core::mem::transmute(pszpathbuffer.as_ptr()), pszpathbuffer.len().try_into().unwrap(), pdwpriority as _, prgsize, dwrecclrdepth, pdwflags as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn Extract(&self) -> windows_core::Result { @@ -24145,7 +24145,7 @@ impl IFileSystemBindData { } #[cfg(feature = "Win32_Storage_FileSystem")] pub unsafe fn GetFindData(&self, pfd: *mut super::super::Storage::FileSystem::WIN32_FIND_DATAW) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFindData)(windows_core::Interface::as_raw(self), core::mem::transmute(pfd)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFindData)(windows_core::Interface::as_raw(self), pfd as _).ok() } } } #[repr(C)] @@ -24372,7 +24372,7 @@ impl IFolderFilter { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetEnumFlags)(windows_core::Interface::as_raw(self), psf.param().abi(), pidlfolder, core::mem::transmute(phwnd), core::mem::transmute(pgrfflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEnumFlags)(windows_core::Interface::as_raw(self), psf.param().abi(), pidlfolder, phwnd as _, pgrfflags as _).ok() } } } #[repr(C)] @@ -24511,7 +24511,7 @@ impl IFolderView { } } pub unsafe fn GetSpacing(&self, ppt: *mut super::super::Foundation::POINT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSpacing)(windows_core::Interface::as_raw(self), core::mem::transmute(ppt)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSpacing)(windows_core::Interface::as_raw(self), ppt as _).ok() } } pub unsafe fn GetDefaultSpacing(&self) -> windows_core::Result { unsafe { @@ -24527,7 +24527,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<()> { - unsafe { (windows_core::Interface::vtable(self).SelectAndPositionItems)(windows_core::Interface::as_raw(self), cidl, apidl, core::mem::transmute(apt.unwrap_or(core::mem::zeroed())), dwflags).ok() } + unsafe { (windows_core::Interface::vtable(self).SelectAndPositionItems)(windows_core::Interface::as_raw(self), cidl, apidl, apt.unwrap_or(core::mem::zeroed()) as _, dwflags).ok() } } } #[repr(C)] @@ -24740,7 +24740,7 @@ impl IFolderView2 { unsafe { (windows_core::Interface::vtable(self).SetGroupBy)(windows_core::Interface::as_raw(self), key, fascending.into()).ok() } } pub unsafe fn GetGroupBy(&self, pkey: *mut super::super::Foundation::PROPERTYKEY, pfascending: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetGroupBy)(windows_core::Interface::as_raw(self), pkey as _, pfascending.unwrap_or(core::mem::zeroed()) as _).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<()> { @@ -24836,7 +24836,7 @@ impl IFolderView2 { unsafe { (windows_core::Interface::vtable(self).SetViewModeAndIconSize)(windows_core::Interface::as_raw(self), uviewmode, iimagesize).ok() } } pub unsafe fn GetViewModeAndIconSize(&self, puviewmode: *mut FOLDERVIEWMODE, piimagesize: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetViewModeAndIconSize)(windows_core::Interface::as_raw(self), core::mem::transmute(puviewmode), core::mem::transmute(piimagesize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetViewModeAndIconSize)(windows_core::Interface::as_raw(self), puviewmode as _, piimagesize as _).ok() } } pub unsafe fn SetGroupSubsetCount(&self, cvisiblerows: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetGroupSubsetCount)(windows_core::Interface::as_raw(self), cvisiblerows).ok() } @@ -25317,7 +25317,7 @@ impl IFolderViewSettings { unsafe { (windows_core::Interface::vtable(self).GetColumnPropertyList)(windows_core::Interface::as_raw(self), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn GetGroupByProperty(&self, pkey: *mut super::super::Foundation::PROPERTYKEY, pfgroupascending: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGroupByProperty)(windows_core::Interface::as_raw(self), core::mem::transmute(pkey), core::mem::transmute(pfgroupascending)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGroupByProperty)(windows_core::Interface::as_raw(self), pkey as _, pfgroupascending as _).ok() } } pub unsafe fn GetViewMode(&self) -> windows_core::Result { unsafe { @@ -25332,10 +25332,10 @@ impl IFolderViewSettings { } } pub unsafe fn GetFolderFlags(&self, pfoldermask: *mut FOLDERFLAGS, pfolderflags: *mut FOLDERFLAGS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFolderFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(pfoldermask), core::mem::transmute(pfolderflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFolderFlags)(windows_core::Interface::as_raw(self), pfoldermask as _, pfolderflags as _).ok() } } pub unsafe fn GetSortColumns(&self, rgsortcolumns: &mut [SORTCOLUMN], pccolumnsout: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSortColumns)(windows_core::Interface::as_raw(self), core::mem::transmute(rgsortcolumns.as_ptr()), rgsortcolumns.len().try_into().unwrap(), core::mem::transmute(pccolumnsout)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSortColumns)(windows_core::Interface::as_raw(self), core::mem::transmute(rgsortcolumns.as_ptr()), rgsortcolumns.len().try_into().unwrap(), pccolumnsout as _).ok() } } pub unsafe fn GetGroupSubsetCount(&self) -> windows_core::Result { unsafe { @@ -25590,7 +25590,7 @@ windows_core::imp::define_interface!(IGetServiceIds, IGetServiceIds_Vtbl, 0x4a07 windows_core::imp::interface_hierarchy!(IGetServiceIds, windows_core::IUnknown); impl IGetServiceIds { pub unsafe fn GetServiceIds(&self, serviceidcount: *mut u32, serviceids: *mut *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetServiceIds)(windows_core::Interface::as_raw(self), core::mem::transmute(serviceidcount), core::mem::transmute(serviceids)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetServiceIds)(windows_core::Interface::as_raw(self), serviceidcount as _, serviceids as _).ok() } } } #[repr(C)] @@ -25932,7 +25932,7 @@ impl IHlink { unsafe { (windows_core::Interface::vtable(self).SetHlinkSite)(windows_core::Interface::as_raw(self), pihlsite.param().abi(), dwsitedata).ok() } } pub unsafe fn GetHlinkSite(&self, ppihlsite: *mut Option, pdwsitedata: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetHlinkSite)(windows_core::Interface::as_raw(self), core::mem::transmute(ppihlsite), core::mem::transmute(pdwsitedata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetHlinkSite)(windows_core::Interface::as_raw(self), core::mem::transmute(ppihlsite), pdwsitedata as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn SetMonikerReference(&self, grfhlsetf: u32, pimktarget: P1, pwzlocation: P2) -> windows_core::Result<()> @@ -25944,7 +25944,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<()> { - unsafe { (windows_core::Interface::vtable(self).GetMonikerReference)(windows_core::Interface::as_raw(self), dwwhichref, core::mem::transmute(ppimktarget.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppwzlocation.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMonikerReference)(windows_core::Interface::as_raw(self), dwwhichref, ppimktarget.unwrap_or(core::mem::zeroed()) as _, ppwzlocation.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetStringReference(&self, grfhlsetf: u32, pwztarget: P1, pwzlocation: P2) -> windows_core::Result<()> where @@ -25954,7 +25954,7 @@ impl IHlink { unsafe { (windows_core::Interface::vtable(self).SetStringReference)(windows_core::Interface::as_raw(self), grfhlsetf, pwztarget.param().abi(), pwzlocation.param().abi()).ok() } } pub unsafe fn GetStringReference(&self, dwwhichref: u32, ppwztarget: Option<*mut windows_core::PWSTR>, ppwzlocation: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStringReference)(windows_core::Interface::as_raw(self), dwwhichref, core::mem::transmute(ppwztarget.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppwzlocation.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStringReference)(windows_core::Interface::as_raw(self), dwwhichref, ppwztarget.unwrap_or(core::mem::zeroed()) as _, ppwzlocation.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetFriendlyName(&self, pwzfriendlyname: P0) -> windows_core::Result<()> where @@ -26218,7 +26218,7 @@ impl IHlinkBrowseContext { unsafe { (windows_core::Interface::vtable(self).SetBrowseWindowInfo)(windows_core::Interface::as_raw(self), phlbwi).ok() } } pub unsafe fn GetBrowseWindowInfo(&self, phlbwi: *mut HLBWINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBrowseWindowInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(phlbwi)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBrowseWindowInfo)(windows_core::Interface::as_raw(self), phlbwi as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn SetInitialHlink(&self, pimktarget: P0, pwzlocation: P1, pwzfriendlyname: P2) -> windows_core::Result<()> @@ -26895,7 +26895,7 @@ impl IIOCancelInformation { unsafe { (windows_core::Interface::vtable(self).SetCancelInformation)(windows_core::Interface::as_raw(self), dwthreadid, umsgcancel).ok() } } pub unsafe fn GetCancelInformation(&self, pdwthreadid: Option<*mut u32>, pumsgcancel: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetCancelInformation)(windows_core::Interface::as_raw(self), pdwthreadid.unwrap_or(core::mem::zeroed()) as _, pumsgcancel.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -27549,7 +27549,7 @@ windows_core::imp::define_interface!(IItemNameLimits, IItemNameLimits_Vtbl, 0x1d windows_core::imp::interface_hierarchy!(IItemNameLimits, windows_core::IUnknown); impl IItemNameLimits { pub unsafe fn GetValidCharacters(&self, ppwszvalidchars: *mut windows_core::PWSTR, ppwszinvalidchars: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetValidCharacters)(windows_core::Interface::as_raw(self), core::mem::transmute(ppwszvalidchars), core::mem::transmute(ppwszinvalidchars)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetValidCharacters)(windows_core::Interface::as_raw(self), ppwszvalidchars as _, ppwszinvalidchars as _).ok() } } pub unsafe fn GetMaxLength(&self, pszname: P0) -> windows_core::Result where @@ -27656,7 +27656,7 @@ impl IKnownFolder { } } pub unsafe fn GetFolderDefinition(&self, pkfd: *mut KNOWNFOLDER_DEFINITION) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFolderDefinition)(windows_core::Interface::as_raw(self), core::mem::transmute(pkfd)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFolderDefinition)(windows_core::Interface::as_raw(self), pkfd as _).ok() } } } #[repr(C)] @@ -27815,7 +27815,7 @@ impl IKnownFolderManager { } } pub unsafe fn GetFolderIds(&self, ppkfid: *mut *mut windows_core::GUID, pcount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFolderIds)(windows_core::Interface::as_raw(self), core::mem::transmute(ppkfid), core::mem::transmute(pcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFolderIds)(windows_core::Interface::as_raw(self), ppkfid as _, pcount as _).ok() } } pub unsafe fn GetFolder(&self, rfid: *const windows_core::GUID) -> windows_core::Result { unsafe { @@ -27858,7 +27858,7 @@ impl IKnownFolderManager { where P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Redirect)(windows_core::Interface::as_raw(self), rfid, core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), 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() } + unsafe { (windows_core::Interface::vtable(self).Redirect)(windows_core::Interface::as_raw(self), rfid, hwnd.unwrap_or(core::mem::zeroed()) as _, 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())), ppszerror.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -28288,7 +28288,7 @@ impl IMenuBand { } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn TranslateMenuMessage(&self, pmsg: *mut super::WindowsAndMessaging::MSG, plret: *mut super::super::Foundation::LRESULT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).TranslateMenuMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(pmsg), core::mem::transmute(plret)).ok() } + unsafe { (windows_core::Interface::vtable(self).TranslateMenuMessage)(windows_core::Interface::as_raw(self), pmsg as _, plret as _).ok() } } } #[repr(C)] @@ -28349,7 +28349,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<()> { - unsafe { (windows_core::Interface::vtable(self).Popup)(windows_core::Interface::as_raw(self), ppt, core::mem::transmute(prcexclude.unwrap_or(core::mem::zeroed())), dwflags).ok() } + unsafe { (windows_core::Interface::vtable(self).Popup)(windows_core::Interface::as_raw(self), ppt, prcexclude.unwrap_or(core::mem::zeroed()) as _, dwflags).ok() } } pub unsafe fn OnSelect(&self, dwselecttype: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OnSelect)(windows_core::Interface::as_raw(self), dwselecttype).ok() } @@ -28413,7 +28413,7 @@ windows_core::imp::define_interface!(IModalWindow, IModalWindow_Vtbl, 0xb4db1657 windows_core::imp::interface_hierarchy!(IModalWindow, windows_core::IUnknown); impl IModalWindow { pub unsafe fn Show(&self, hwndowner: Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Show)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndowner.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Show)(windows_core::Interface::as_raw(self), hwndowner.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -29000,7 +29000,7 @@ impl INameSpaceTreeControlCustomDraw { } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls"))] 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<()> { - unsafe { (windows_core::Interface::vtable(self).ItemPrePaint)(windows_core::Interface::as_raw(self), hdc, prc, core::mem::transmute(pnstccditem), core::mem::transmute(pclrtext), core::mem::transmute(pclrtextbk), core::mem::transmute(plres)).ok() } + unsafe { (windows_core::Interface::vtable(self).ItemPrePaint)(windows_core::Interface::as_raw(self), hdc, prc, core::mem::transmute(pnstccditem), pclrtext as _, pclrtextbk as _, plres as _).ok() } } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls"))] pub unsafe fn ItemPostPaint(&self, hdc: super::super::Graphics::Gdi::HDC, prc: *const super::super::Foundation::RECT, pnstccditem: *const NSTCCUSTOMDRAW) -> windows_core::Result<()> { @@ -29089,14 +29089,14 @@ impl INameSpaceTreeControlDropHandler { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).OnDragEnter)(windows_core::Interface::as_raw(self), psiover.param().abi(), psiadata.param().abi(), foutsidesource.into(), grfkeystate, core::mem::transmute(pdweffect)).ok() } + unsafe { (windows_core::Interface::vtable(self).OnDragEnter)(windows_core::Interface::as_raw(self), psiover.param().abi(), psiadata.param().abi(), foutsidesource.into(), grfkeystate, pdweffect as _).ok() } } pub unsafe fn OnDragOver(&self, psiover: P0, psiadata: P1, grfkeystate: u32, pdweffect: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).OnDragOver)(windows_core::Interface::as_raw(self), psiover.param().abi(), psiadata.param().abi(), grfkeystate, core::mem::transmute(pdweffect)).ok() } + unsafe { (windows_core::Interface::vtable(self).OnDragOver)(windows_core::Interface::as_raw(self), psiover.param().abi(), psiadata.param().abi(), grfkeystate, pdweffect as _).ok() } } pub unsafe fn OnDragPosition(&self, psiover: P0, psiadata: P1, inewposition: i32, ioldposition: i32) -> windows_core::Result<()> where @@ -29110,7 +29110,7 @@ impl INameSpaceTreeControlDropHandler { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).OnDrop)(windows_core::Interface::as_raw(self), psiover.param().abi(), psiadata.param().abi(), iposition, grfkeystate, core::mem::transmute(pdweffect)).ok() } + unsafe { (windows_core::Interface::vtable(self).OnDrop)(windows_core::Interface::as_raw(self), psiover.param().abi(), psiadata.param().abi(), iposition, grfkeystate, pdweffect as _).ok() } } pub unsafe fn OnDropPosition(&self, psiover: P0, psiadata: P1, inewposition: i32, ioldposition: i32) -> windows_core::Result<()> where @@ -29285,14 +29285,14 @@ impl INameSpaceTreeControlEvents { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).OnBeforeContextMenu)(windows_core::Interface::as_raw(self), psi.param().abi(), riid, core::mem::transmute(ppv)).ok() } + unsafe { (windows_core::Interface::vtable(self).OnBeforeContextMenu)(windows_core::Interface::as_raw(self), psi.param().abi(), riid, ppv as _).ok() } } pub unsafe fn OnAfterContextMenu(&self, psi: P0, pcmin: P1, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).OnAfterContextMenu)(windows_core::Interface::as_raw(self), psi.param().abi(), pcmin.param().abi(), riid, core::mem::transmute(ppv)).ok() } + unsafe { (windows_core::Interface::vtable(self).OnAfterContextMenu)(windows_core::Interface::as_raw(self), psi.param().abi(), pcmin.param().abi(), riid, ppv as _).ok() } } pub unsafe fn OnBeforeStateImageChange(&self, psi: P0) -> windows_core::Result<()> where @@ -29304,7 +29304,7 @@ impl INameSpaceTreeControlEvents { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).OnGetDefaultIconIndex)(windows_core::Interface::as_raw(self), psi.param().abi(), core::mem::transmute(pidefaulticon), core::mem::transmute(piopenicon)).ok() } + unsafe { (windows_core::Interface::vtable(self).OnGetDefaultIconIndex)(windows_core::Interface::as_raw(self), psi.param().abi(), pidefaulticon as _, piopenicon as _).ok() } } } #[repr(C)] @@ -29617,7 +29617,7 @@ impl INamespaceWalk { } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn GetIDArrayResult(&self, pcitems: *mut u32, prgpidl: *mut *mut *mut Common::ITEMIDLIST) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIDArrayResult)(windows_core::Interface::as_raw(self), core::mem::transmute(pcitems), core::mem::transmute(prgpidl)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIDArrayResult)(windows_core::Interface::as_raw(self), pcitems as _, prgpidl as _).ok() } } } #[repr(C)] @@ -29686,7 +29686,7 @@ impl INamespaceWalkCB { unsafe { (windows_core::Interface::vtable(self).LeaveFolder)(windows_core::Interface::as_raw(self), psf.param().abi(), pidl).ok() } } pub unsafe fn InitializeProgressDialog(&self, ppsztitle: *mut windows_core::PWSTR, ppszcancel: *mut windows_core::PWSTR) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).InitializeProgressDialog)(windows_core::Interface::as_raw(self), core::mem::transmute(ppsztitle), core::mem::transmute(ppszcancel)).ok() } + unsafe { (windows_core::Interface::vtable(self).InitializeProgressDialog)(windows_core::Interface::as_raw(self), ppsztitle as _, ppszcancel as _).ok() } } } #[repr(C)] @@ -29947,7 +29947,7 @@ impl INewShortcutHookA { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).SetReferent)(windows_core::Interface::as_raw(self), pcszreferent.param().abi(), hwnd.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetReferent(&self, pszreferent: &mut [u8]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetReferent)(windows_core::Interface::as_raw(self), core::mem::transmute(pszreferent.as_ptr()), pszreferent.len().try_into().unwrap()).ok() } @@ -30046,7 +30046,7 @@ impl INewShortcutHookW { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).SetReferent)(windows_core::Interface::as_raw(self), pcszreferent.param().abi(), hwnd.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetReferent(&self, pszreferent: &mut [u16]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).GetReferent)(windows_core::Interface::as_raw(self), core::mem::transmute(pszreferent.as_ptr()), pszreferent.len().try_into().unwrap()).ok() } @@ -30771,7 +30771,7 @@ impl IOperationsProgressDialog { unsafe { (windows_core::Interface::vtable(self).ResumeTimer)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetMilliseconds(&self, pullelapsed: *mut u64, pullremaining: *mut u64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMilliseconds)(windows_core::Interface::as_raw(self), core::mem::transmute(pullelapsed), core::mem::transmute(pullremaining)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMilliseconds)(windows_core::Interface::as_raw(self), pullelapsed as _, pullremaining as _).ok() } } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn GetOperationStatus(&self) -> windows_core::Result { @@ -30951,7 +30951,7 @@ impl IPackageDebugSettings { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EnumerateBackgroundTasks)(windows_core::Interface::as_raw(self), packagefullname.param().abi(), core::mem::transmute(taskcount), core::mem::transmute(taskids), core::mem::transmute(tasknames)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumerateBackgroundTasks)(windows_core::Interface::as_raw(self), packagefullname.param().abi(), taskcount as _, taskids as _, tasknames as _).ok() } } pub unsafe fn ActivateBackgroundTask(&self, taskid: *const windows_core::GUID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ActivateBackgroundTask)(windows_core::Interface::as_raw(self), taskid).ok() } @@ -31180,7 +31180,7 @@ impl IPackageDebugSettings2 { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).EnumerateApps)(windows_core::Interface::as_raw(self), packagefullname.param().abi(), core::mem::transmute(appcount), core::mem::transmute(appusermodelids), core::mem::transmute(appdisplaynames)).ok() } + unsafe { (windows_core::Interface::vtable(self).EnumerateApps)(windows_core::Interface::as_raw(self), packagefullname.param().abi(), appcount as _, appusermodelids as _, appdisplaynames as _).ok() } } } #[repr(C)] @@ -31251,7 +31251,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetParentAndItem)(windows_core::Interface::as_raw(self), ppidlparent.unwrap_or(core::mem::zeroed()) as _, ppsf.unwrap_or(core::mem::zeroed()) as _, ppidlchild.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -31473,7 +31473,7 @@ impl IPersistFolder3 { } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn GetFolderTargetInfo(&self, ppfti: *mut PERSIST_FOLDER_TARGET_INFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFolderTargetInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(ppfti)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFolderTargetInfo)(windows_core::Interface::as_raw(self), ppfti as _).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -31985,7 +31985,7 @@ impl IProgressDialog { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).StartProgressDialog)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), punkenablemodless.param().abi(), dwflags, core::mem::transmute(pvresevered.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).StartProgressDialog)(windows_core::Interface::as_raw(self), hwndparent.unwrap_or(core::mem::zeroed()) as _, punkenablemodless.param().abi(), dwflags, pvresevered.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn StopProgressDialog(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).StopProgressDialog)(windows_core::Interface::as_raw(self)).ok() } @@ -31997,7 +31997,7 @@ impl IProgressDialog { unsafe { (windows_core::Interface::vtable(self).SetTitle)(windows_core::Interface::as_raw(self), pwztitle.param().abi()).ok() } } pub unsafe fn SetAnimation(&self, hinstanimation: Option, idanimation: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetAnimation)(windows_core::Interface::as_raw(self), core::mem::transmute(hinstanimation.unwrap_or(core::mem::zeroed())), idanimation).ok() } + unsafe { (windows_core::Interface::vtable(self).SetAnimation)(windows_core::Interface::as_raw(self), hinstanimation.unwrap_or(core::mem::zeroed()) as _, idanimation).ok() } } pub unsafe fn HasUserCancelled(&self) -> super::super::Foundation::BOOL { unsafe { (windows_core::Interface::vtable(self).HasUserCancelled)(windows_core::Interface::as_raw(self)) } @@ -32012,16 +32012,16 @@ impl IProgressDialog { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SetLine)(windows_core::Interface::as_raw(self), dwlinenum, pwzstring.param().abi(), fcompactpath.into(), core::mem::transmute(pvresevered.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetLine)(windows_core::Interface::as_raw(self), dwlinenum, pwzstring.param().abi(), fcompactpath.into(), pvresevered.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn SetCancelMsg(&self, pwzcancelmsg: P0, pvresevered: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).SetCancelMsg)(windows_core::Interface::as_raw(self), pwzcancelmsg.param().abi(), pvresevered.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Timer(&self, dwtimeraction: u32, pvresevered: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Timer)(windows_core::Interface::as_raw(self), dwtimeraction, core::mem::transmute(pvresevered.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Timer)(windows_core::Interface::as_raw(self), dwtimeraction, pvresevered.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -32141,7 +32141,7 @@ impl IPropertyKeyStore { } } pub unsafe fn GetKeyAt(&self, index: i32, pkey: *mut super::super::Foundation::PROPERTYKEY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetKeyAt)(windows_core::Interface::as_raw(self), index, core::mem::transmute(pkey)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetKeyAt)(windows_core::Interface::as_raw(self), index, pkey as _).ok() } } pub unsafe fn AppendKey(&self, key: *const super::super::Foundation::PROPERTYKEY) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).AppendKey)(windows_core::Interface::as_raw(self), key).ok() } @@ -32246,7 +32246,7 @@ impl IPublishedApp { unsafe { (windows_core::Interface::vtable(self).Install)(windows_core::Interface::as_raw(self), pstinstall).ok() } } pub unsafe fn GetPublishedAppInfo(&self, ppai: *mut PUBAPPINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPublishedAppInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(ppai)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPublishedAppInfo)(windows_core::Interface::as_raw(self), ppai as _).ok() } } pub unsafe fn Unschedule(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Unschedule)(windows_core::Interface::as_raw(self)).ok() } @@ -32351,7 +32351,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetTransferManifest)(windows_core::Interface::as_raw(self), phrfromtransfer.unwrap_or(core::mem::zeroed()) as _, pdocmanifest.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -32406,13 +32406,13 @@ impl IQueryAssociations { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Init)(windows_core::Interface::as_raw(self), flags, pszassoc.param().abi(), core::mem::transmute(hkprogid.unwrap_or(core::mem::zeroed())), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Init)(windows_core::Interface::as_raw(self), flags, pszassoc.param().abi(), hkprogid.unwrap_or(core::mem::zeroed()) as _, hwnd.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetString(&self, flags: ASSOCF, str: ASSOCSTR, pszextra: P2, pszout: Option, pcchout: *mut u32) -> windows_core::Result<()> where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetString)(windows_core::Interface::as_raw(self), flags, str, pszextra.param().abi(), core::mem::transmute(pszout.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchout)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetString)(windows_core::Interface::as_raw(self), flags, str, pszextra.param().abi(), pszout.unwrap_or(core::mem::zeroed()) as _, pcchout as _).ok() } } #[cfg(feature = "Win32_System_Registry")] pub unsafe fn GetKey(&self, flags: ASSOCF, key: ASSOCKEY, pszextra: P2) -> windows_core::Result @@ -32428,13 +32428,13 @@ impl IQueryAssociations { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), flags, data, pszextra.param().abi(), core::mem::transmute(pvout.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbout.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), flags, data, pszextra.param().abi(), pvout.unwrap_or(core::mem::zeroed()) as _, pcbout.unwrap_or(core::mem::zeroed()) as _).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 P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetEnum)(windows_core::Interface::as_raw(self), flags, assocenum, pszextra.param().abi(), riid, core::mem::transmute(ppvout)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEnum)(windows_core::Interface::as_raw(self), flags, assocenum, pszextra.param().abi(), riid, ppvout as _).ok() } } } #[repr(C)] @@ -32940,7 +32940,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<()> { - unsafe { (windows_core::Interface::vtable(self).AddIDList)(windows_core::Interface::as_raw(self), pidl, core::mem::transmute(ppidladded.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).AddIDList)(windows_core::Interface::as_raw(self), pidl, ppidladded.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn RemoveItem(&self, psi: P0) -> windows_core::Result<()> where @@ -34019,7 +34019,7 @@ windows_core::imp::define_interface!(IShellApp, IShellApp_Vtbl, 0xa3e14960_935f_ windows_core::imp::interface_hierarchy!(IShellApp, windows_core::IUnknown); impl IShellApp { pub unsafe fn GetAppInfo(&self, pai: *mut APPINFODATA) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAppInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pai)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAppInfo)(windows_core::Interface::as_raw(self), pai as _).ok() } } pub unsafe fn GetPossibleActions(&self) -> windows_core::Result { unsafe { @@ -34028,10 +34028,10 @@ impl IShellApp { } } pub unsafe fn GetSlowAppInfo(&self, psaid: *mut SLOWAPPINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSlowAppInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(psaid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSlowAppInfo)(windows_core::Interface::as_raw(self), psaid as _).ok() } } pub unsafe fn GetCachedSlowAppInfo(&self, psaid: *mut SLOWAPPINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCachedSlowAppInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(psaid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCachedSlowAppInfo)(windows_core::Interface::as_raw(self), psaid as _).ok() } } pub unsafe fn IsInstalled(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).IsInstalled)(windows_core::Interface::as_raw(self)).ok() } @@ -34120,7 +34120,7 @@ windows_core::imp::interface_hierarchy!(IShellBrowser, windows_core::IUnknown, s impl IShellBrowser { #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_UI_WindowsAndMessaging"))] pub unsafe fn InsertMenusSB(&self, hmenushared: super::WindowsAndMessaging::HMENU, lpmenuwidths: *mut super::super::System::Ole::OLEMENUGROUPWIDTHS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).InsertMenusSB)(windows_core::Interface::as_raw(self), hmenushared, core::mem::transmute(lpmenuwidths)).ok() } + unsafe { (windows_core::Interface::vtable(self).InsertMenusSB)(windows_core::Interface::as_raw(self), hmenushared, lpmenuwidths as _).ok() } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn SetMenuSB(&self, hmenushared: super::WindowsAndMessaging::HMENU, holemenures: isize, hwndactiveobject: super::super::Foundation::HWND) -> windows_core::Result<()> { @@ -34161,7 +34161,7 @@ impl IShellBrowser { } } 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<()> { - unsafe { (windows_core::Interface::vtable(self).SendControlMsg)(windows_core::Interface::as_raw(self), id, umsg, wparam, lparam, core::mem::transmute(pret.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SendControlMsg)(windows_core::Interface::as_raw(self), id, umsg, wparam, lparam, pret.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn QueryActiveShellView(&self) -> windows_core::Result { unsafe { @@ -34362,7 +34362,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<()> { - unsafe { (windows_core::Interface::vtable(self).OnChange)(windows_core::Interface::as_raw(self), levent, core::mem::transmute(pidl1.unwrap_or(core::mem::zeroed())), core::mem::transmute(pidl2.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).OnChange)(windows_core::Interface::as_raw(self), levent, pidl1.unwrap_or(core::mem::zeroed()) as _, pidl2.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -34399,7 +34399,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<()> { - unsafe { (windows_core::Interface::vtable(self).GetDetailsOf)(windows_core::Interface::as_raw(self), core::mem::transmute(pidl.unwrap_or(core::mem::zeroed())), icolumn, core::mem::transmute(pdetails)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDetailsOf)(windows_core::Interface::as_raw(self), pidl.unwrap_or(core::mem::zeroed()) as _, icolumn, pdetails as _).ok() } } pub unsafe fn ColumnClick(&self, icolumn: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).ColumnClick)(windows_core::Interface::as_raw(self), icolumn).ok() } @@ -35301,7 +35301,7 @@ impl IShellExtInit { where P1: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), pidlfolder.unwrap_or(core::mem::zeroed()) as _, pdtobj.param().abi(), hkeyprogid.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -35560,7 +35560,7 @@ impl IShellFolder { P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ParseDisplayName)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).ParseDisplayName)(windows_core::Interface::as_raw(self), hwnd, pbc.param().abi(), pszdisplayname.param().abi(), pcheaten.unwrap_or(core::mem::zeroed()) as _, ppidl as _, pdwattributes as _).ok() } } pub unsafe fn EnumObjects(&self, hwnd: super::super::Foundation::HWND, grfflags: u32, ppenumidlist: *mut Option) -> windows_core::HRESULT { unsafe { (windows_core::Interface::vtable(self).EnumObjects)(windows_core::Interface::as_raw(self), hwnd, grfflags, core::mem::transmute(ppenumidlist)) } @@ -35596,7 +35596,7 @@ impl IShellFolder { } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn GetAttributesOf(&self, apidl: &[*const Common::ITEMIDLIST], rgfinout: *mut u32) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetAttributesOf)(windows_core::Interface::as_raw(self), apidl.len().try_into().unwrap(), core::mem::transmute(apidl.as_ptr()), rgfinout as _).ok() } } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn GetUIObjectOf(&self, hwndowner: super::super::Foundation::HWND, apidl: &[*const Common::ITEMIDLIST], rgfreserved: Option<*const u32>) -> windows_core::Result @@ -35604,18 +35604,18 @@ impl IShellFolder { T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - unsafe { (windows_core::Interface::vtable(self).GetUIObjectOf)(windows_core::Interface::as_raw(self), 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__)) } + unsafe { (windows_core::Interface::vtable(self).GetUIObjectOf)(windows_core::Interface::as_raw(self), hwndowner, apidl.len().try_into().unwrap(), core::mem::transmute(apidl.as_ptr()), &T::IID, rgfreserved.unwrap_or(core::mem::zeroed()) as _, &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<()> { - unsafe { (windows_core::Interface::vtable(self).GetDisplayNameOf)(windows_core::Interface::as_raw(self), pidl, uflags, core::mem::transmute(pname)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDisplayNameOf)(windows_core::Interface::as_raw(self), pidl, uflags, pname as _).ok() } } #[cfg(feature = "Win32_UI_Shell_Common")] 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 P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SetNameOf)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pidl, pszname.param().abi(), uflags, core::mem::transmute(ppidlout.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).SetNameOf)(windows_core::Interface::as_raw(self), hwnd.unwrap_or(core::mem::zeroed()) as _, pidl, pszname.param().abi(), uflags, ppidlout.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -35774,7 +35774,7 @@ impl IShellFolder2 { } } pub unsafe fn GetDefaultColumn(&self, dwres: u32, psort: *mut u32, pdisplay: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDefaultColumn)(windows_core::Interface::as_raw(self), dwres, core::mem::transmute(psort), core::mem::transmute(pdisplay)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDefaultColumn)(windows_core::Interface::as_raw(self), dwres, psort as _, pdisplay as _).ok() } } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn GetDefaultColumnState(&self, icolumn: u32) -> windows_core::Result { @@ -35792,10 +35792,10 @@ impl IShellFolder2 { } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn GetDetailsOf(&self, pidl: *const Common::ITEMIDLIST, icolumn: u32, psd: *mut Common::SHELLDETAILS) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDetailsOf)(windows_core::Interface::as_raw(self), pidl, icolumn, core::mem::transmute(psd)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDetailsOf)(windows_core::Interface::as_raw(self), pidl, icolumn, psd as _).ok() } } pub unsafe fn MapColumnToSCID(&self, icolumn: u32, pscid: *mut super::super::Foundation::PROPERTYKEY) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).MapColumnToSCID)(windows_core::Interface::as_raw(self), icolumn, core::mem::transmute(pscid)).ok() } + unsafe { (windows_core::Interface::vtable(self).MapColumnToSCID)(windows_core::Interface::as_raw(self), icolumn, pscid as _).ok() } } } #[repr(C)] @@ -35922,7 +35922,7 @@ impl IShellFolderBand { where P0: windows_core::Param, { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).InitializeSFB)(windows_core::Interface::as_raw(self), psf.param().abi(), pidl.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn SetBandInfoSFB(&self, pbi: *const BANDINFOSFB) -> windows_core::Result<()> { @@ -36019,13 +36019,13 @@ impl IShellFolderView { } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn GetObject(&self, ppidl: *mut *mut Common::ITEMIDLIST, uitem: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetObject)(windows_core::Interface::as_raw(self), core::mem::transmute(ppidl), uitem).ok() } + unsafe { (windows_core::Interface::vtable(self).GetObject)(windows_core::Interface::as_raw(self), ppidl as _, uitem).ok() } } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn RemoveObject(&self, pidl: Option<*const Common::ITEMIDLIST>) -> windows_core::Result { unsafe { 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::mem::zeroed())), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).RemoveObject)(windows_core::Interface::as_raw(self), pidl.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| result__) } } pub unsafe fn GetObjectCount(&self) -> windows_core::Result { @@ -36062,7 +36062,7 @@ impl IShellFolderView { } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn GetSelectedObjects(&self, pppidl: *mut *mut *mut Common::ITEMIDLIST, puitems: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSelectedObjects)(windows_core::Interface::as_raw(self), core::mem::transmute(pppidl), core::mem::transmute(puitems)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSelectedObjects)(windows_core::Interface::as_raw(self), pppidl as _, puitems as _).ok() } } #[cfg(feature = "Win32_System_Ole")] pub unsafe fn IsDropOnSource(&self, pdroptarget: P0) -> windows_core::Result<()> @@ -36130,7 +36130,7 @@ impl IShellFolderView { unsafe { (windows_core::Interface::vtable(self).Select)(windows_core::Interface::as_raw(self), dwflags.0 as _).ok() } } pub unsafe fn QuerySupport(&self, pdwsupport: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QuerySupport)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwsupport)).ok() } + unsafe { (windows_core::Interface::vtable(self).QuerySupport)(windows_core::Interface::as_raw(self), pdwsupport as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn SetAutomationObject(&self, pdisp: P0) -> windows_core::Result<()> @@ -37080,11 +37080,11 @@ windows_core::imp::interface_hierarchy!(IShellIconOverlay, windows_core::IUnknow impl IShellIconOverlay { #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn GetOverlayIndex(&self, pidl: *const Common::ITEMIDLIST, pindex: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOverlayIndex)(windows_core::Interface::as_raw(self), pidl, core::mem::transmute(pindex)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOverlayIndex)(windows_core::Interface::as_raw(self), pidl, pindex as _).ok() } } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn GetOverlayIconIndex(&self, pidl: *const Common::ITEMIDLIST, piconindex: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOverlayIconIndex)(windows_core::Interface::as_raw(self), pidl, core::mem::transmute(piconindex)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOverlayIconIndex)(windows_core::Interface::as_raw(self), pidl, piconindex as _).ok() } } } #[repr(C)] @@ -37141,7 +37141,7 @@ impl IShellIconOverlayIdentifier { unsafe { (windows_core::Interface::vtable(self).IsMemberOf)(windows_core::Interface::as_raw(self), pwszpath.param().abi(), dwattrib).ok() } } pub unsafe fn GetOverlayInfo(&self, pwsziconfile: &mut [u16], pindex: *mut i32, pdwflags: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOverlayInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pwsziconfile.as_ptr()), pwsziconfile.len().try_into().unwrap(), core::mem::transmute(pindex), core::mem::transmute(pdwflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOverlayInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pwsziconfile.as_ptr()), pwsziconfile.len().try_into().unwrap(), pindex as _, pdwflags as _).ok() } } pub unsafe fn GetPriority(&self) -> windows_core::Result { unsafe { @@ -37207,13 +37207,13 @@ impl IShellIconOverlayManager { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetFileOverlayInfo)(windows_core::Interface::as_raw(self), pwszpath.param().abi(), dwattrib, core::mem::transmute(pindex), dwflags).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFileOverlayInfo)(windows_core::Interface::as_raw(self), pwszpath.param().abi(), dwattrib, pindex as _, dwflags).ok() } } pub unsafe fn GetReservedOverlayInfo(&self, pwszpath: P0, dwattrib: u32, pindex: *mut i32, dwflags: u32, ireservedid: i32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetReservedOverlayInfo)(windows_core::Interface::as_raw(self), pwszpath.param().abi(), dwattrib, core::mem::transmute(pindex), dwflags, ireservedid).ok() } + unsafe { (windows_core::Interface::vtable(self).GetReservedOverlayInfo)(windows_core::Interface::as_raw(self), pwszpath.param().abi(), dwattrib, pindex as _, dwflags, ireservedid).ok() } } pub unsafe fn RefreshOverlayImages(&self, dwflags: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RefreshOverlayImages)(windows_core::Interface::as_raw(self), dwflags).ok() } @@ -37222,7 +37222,7 @@ impl IShellIconOverlayManager { unsafe { (windows_core::Interface::vtable(self).LoadNonloadedOverlayIdentifiers)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn OverlayIndexFromImageIndex(&self, iimage: i32, piindex: *mut i32, fadd: bool) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OverlayIndexFromImageIndex)(windows_core::Interface::as_raw(self), iimage, core::mem::transmute(piindex), fadd.into()).ok() } + unsafe { (windows_core::Interface::vtable(self).OverlayIndexFromImageIndex)(windows_core::Interface::as_raw(self), iimage, piindex as _, fadd.into()).ok() } } } #[repr(C)] @@ -37295,7 +37295,7 @@ impl IShellImageData { } #[cfg(feature = "Win32_Graphics_Gdi")] 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<()> { - unsafe { (windows_core::Interface::vtable(self).Draw)(windows_core::Interface::as_raw(self), hdc, core::mem::transmute(prcdest), core::mem::transmute(prcsrc)).ok() } + unsafe { (windows_core::Interface::vtable(self).Draw)(windows_core::Interface::as_raw(self), hdc, prcdest as _, prcsrc as _).ok() } } pub unsafe fn NextFrame(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).NextFrame)(windows_core::Interface::as_raw(self)).ok() } @@ -37328,25 +37328,25 @@ impl IShellImageData { unsafe { (windows_core::Interface::vtable(self).IsDecoded)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetCurrentPage(&self, pnpage: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCurrentPage)(windows_core::Interface::as_raw(self), core::mem::transmute(pnpage)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCurrentPage)(windows_core::Interface::as_raw(self), pnpage as _).ok() } } pub unsafe fn GetPageCount(&self, pcpages: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPageCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pcpages)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPageCount)(windows_core::Interface::as_raw(self), pcpages as _).ok() } } pub unsafe fn SelectPage(&self, ipage: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SelectPage)(windows_core::Interface::as_raw(self), ipage).ok() } } pub unsafe fn GetSize(&self, psize: *mut super::super::Foundation::SIZE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSize)(windows_core::Interface::as_raw(self), core::mem::transmute(psize)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSize)(windows_core::Interface::as_raw(self), psize as _).ok() } } pub unsafe fn GetRawDataFormat(&self, pdataformat: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRawDataFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(pdataformat)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRawDataFormat)(windows_core::Interface::as_raw(self), pdataformat as _).ok() } } pub unsafe fn GetPixelFormat(&self, pformat: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPixelFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(pformat)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPixelFormat)(windows_core::Interface::as_raw(self), pformat as _).ok() } } pub unsafe fn GetDelay(&self, pdwdelay: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDelay)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwdelay)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDelay)(windows_core::Interface::as_raw(self), pdwdelay as _).ok() } } #[cfg(feature = "Win32_System_Com_StructuredStorage")] pub unsafe fn GetProperties(&self, dwmode: u32) -> windows_core::Result { @@ -37379,10 +37379,10 @@ impl IShellImageData { unsafe { (windows_core::Interface::vtable(self).DisplayName)(windows_core::Interface::as_raw(self), wszname.param().abi(), cch).ok() } } pub unsafe fn GetResolution(&self, puresolutionx: *mut u32, puresolutiony: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetResolution)(windows_core::Interface::as_raw(self), core::mem::transmute(puresolutionx), core::mem::transmute(puresolutiony)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetResolution)(windows_core::Interface::as_raw(self), puresolutionx as _, puresolutiony as _).ok() } } pub unsafe fn GetEncoderParams(&self, pguidfmt: *mut windows_core::GUID, ppencparams: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetEncoderParams)(windows_core::Interface::as_raw(self), core::mem::transmute(pguidfmt), core::mem::transmute(ppencparams)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetEncoderParams)(windows_core::Interface::as_raw(self), pguidfmt as _, ppencparams as _).ok() } } pub unsafe fn RegisterAbort(&self, pabort: P0) -> windows_core::Result where @@ -37394,10 +37394,10 @@ impl IShellImageData { } } pub unsafe fn CloneFrame(&self, ppimg: *mut *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CloneFrame)(windows_core::Interface::as_raw(self), core::mem::transmute(ppimg)).ok() } + unsafe { (windows_core::Interface::vtable(self).CloneFrame)(windows_core::Interface::as_raw(self), ppimg as _).ok() } } pub unsafe fn ReplaceFrame(&self, pimg: *mut u8) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ReplaceFrame)(windows_core::Interface::as_raw(self), core::mem::transmute(pimg)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReplaceFrame)(windows_core::Interface::as_raw(self), pimg as _).ok() } } } #[repr(C)] @@ -38590,7 +38590,7 @@ impl IShellItemResources { } } pub unsafe fn GetTimes(&self, pftcreation: *mut super::super::Foundation::FILETIME, pftwrite: *mut super::super::Foundation::FILETIME, pftaccess: *mut super::super::Foundation::FILETIME) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTimes)(windows_core::Interface::as_raw(self), core::mem::transmute(pftcreation), core::mem::transmute(pftwrite), core::mem::transmute(pftaccess)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTimes)(windows_core::Interface::as_raw(self), pftcreation as _, pftwrite as _, pftaccess as _).ok() } } pub unsafe fn SetTimes(&self, pftcreation: *const super::super::Foundation::FILETIME, pftwrite: *const super::super::Foundation::FILETIME, pftaccess: *const super::super::Foundation::FILETIME) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetTimes)(windows_core::Interface::as_raw(self), pftcreation, pftwrite, pftaccess).ok() } @@ -39069,7 +39069,7 @@ windows_core::imp::interface_hierarchy!(IShellLinkA, windows_core::IUnknown); impl IShellLinkA { #[cfg(feature = "Win32_Storage_FileSystem")] pub unsafe fn GetPath(&self, pszfile: &mut [u8], pfd: *mut super::super::Storage::FileSystem::WIN32_FIND_DATAA, fflags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPath)(windows_core::Interface::as_raw(self), core::mem::transmute(pszfile.as_ptr()), pszfile.len().try_into().unwrap(), core::mem::transmute(pfd), fflags).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPath)(windows_core::Interface::as_raw(self), core::mem::transmute(pszfile.as_ptr()), pszfile.len().try_into().unwrap(), pfd as _, fflags).ok() } } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn GetIDList(&self) -> windows_core::Result<*mut Common::ITEMIDLIST> { @@ -39130,7 +39130,7 @@ impl IShellLinkA { unsafe { (windows_core::Interface::vtable(self).SetShowCmd)(windows_core::Interface::as_raw(self), ishowcmd).ok() } } pub unsafe fn GetIconLocation(&self, psziconpath: &mut [u8], piicon: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIconLocation)(windows_core::Interface::as_raw(self), core::mem::transmute(psziconpath.as_ptr()), psziconpath.len().try_into().unwrap(), core::mem::transmute(piicon)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIconLocation)(windows_core::Interface::as_raw(self), core::mem::transmute(psziconpath.as_ptr()), psziconpath.len().try_into().unwrap(), piicon as _).ok() } } pub unsafe fn SetIconLocation(&self, psziconpath: P0, iicon: i32) -> windows_core::Result<()> where @@ -39376,7 +39376,7 @@ impl IShellLinkDataList { unsafe { (windows_core::Interface::vtable(self).AddDataBlock)(windows_core::Interface::as_raw(self), pdatablock).ok() } } pub unsafe fn CopyDataBlock(&self, dwsig: u32, ppdatablock: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).CopyDataBlock)(windows_core::Interface::as_raw(self), dwsig, core::mem::transmute(ppdatablock)).ok() } + unsafe { (windows_core::Interface::vtable(self).CopyDataBlock)(windows_core::Interface::as_raw(self), dwsig, ppdatablock as _).ok() } } pub unsafe fn RemoveDataBlock(&self, dwsig: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RemoveDataBlock)(windows_core::Interface::as_raw(self), dwsig).ok() } @@ -39811,7 +39811,7 @@ windows_core::imp::interface_hierarchy!(IShellLinkW, windows_core::IUnknown); impl IShellLinkW { #[cfg(feature = "Win32_Storage_FileSystem")] pub unsafe fn GetPath(&self, pszfile: &mut [u16], pfd: *mut super::super::Storage::FileSystem::WIN32_FIND_DATAW, fflags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPath)(windows_core::Interface::as_raw(self), core::mem::transmute(pszfile.as_ptr()), pszfile.len().try_into().unwrap(), core::mem::transmute(pfd), fflags).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPath)(windows_core::Interface::as_raw(self), core::mem::transmute(pszfile.as_ptr()), pszfile.len().try_into().unwrap(), pfd as _, fflags).ok() } } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn GetIDList(&self) -> windows_core::Result<*mut Common::ITEMIDLIST> { @@ -39872,7 +39872,7 @@ impl IShellLinkW { unsafe { (windows_core::Interface::vtable(self).SetShowCmd)(windows_core::Interface::as_raw(self), ishowcmd).ok() } } pub unsafe fn GetIconLocation(&self, psziconpath: &mut [u16], piicon: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIconLocation)(windows_core::Interface::as_raw(self), core::mem::transmute(psziconpath.as_ptr()), psziconpath.len().try_into().unwrap(), core::mem::transmute(piicon)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIconLocation)(windows_core::Interface::as_raw(self), core::mem::transmute(psziconpath.as_ptr()), psziconpath.len().try_into().unwrap(), piicon as _).ok() } } pub unsafe fn SetIconLocation(&self, psziconpath: P0, iicon: i32) -> windows_core::Result<()> where @@ -40121,30 +40121,30 @@ impl IShellMenu { unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), psmc.param().abi(), uid, uidancestor, dwflags).ok() } } pub unsafe fn GetMenuInfo(&self, ppsmc: Option<*mut Option>, puid: Option<*mut u32>, puidancestor: Option<*mut u32>, pdwflags: Option<*mut u32>) -> windows_core::Result<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetMenuInfo)(windows_core::Interface::as_raw(self), ppsmc.unwrap_or(core::mem::zeroed()) as _, puid.unwrap_or(core::mem::zeroed()) as _, puidancestor.unwrap_or(core::mem::zeroed()) as _, pdwflags.unwrap_or(core::mem::zeroed()) as _).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: Option, dwflags: u32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (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())), dwflags).ok() } + unsafe { (windows_core::Interface::vtable(self).SetShellFolder)(windows_core::Interface::as_raw(self), psf.param().abi(), pidlfolder.unwrap_or(core::mem::zeroed()) as _, hkey.unwrap_or(core::mem::zeroed()) as _, 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetShellFolder)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwflags), core::mem::transmute(ppidl), riid, core::mem::transmute(ppv)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetShellFolder)(windows_core::Interface::as_raw(self), pdwflags as _, ppidl as _, riid, ppv as _).ok() } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn SetMenu(&self, hmenu: Option, hwnd: Option, dwflags: u32) -> windows_core::Result<()> { - unsafe { (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())), dwflags).ok() } + unsafe { (windows_core::Interface::vtable(self).SetMenu)(windows_core::Interface::as_raw(self), hmenu.unwrap_or(core::mem::zeroed()) as _, hwnd.unwrap_or(core::mem::zeroed()) as _, 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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).GetMenu)(windows_core::Interface::as_raw(self), phmenu.unwrap_or(core::mem::zeroed()) as _, phwnd.unwrap_or(core::mem::zeroed()) as _, pdwflags.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).InvalidateItem)(windows_core::Interface::as_raw(self), core::mem::transmute(psmd.unwrap_or(core::mem::zeroed())), dwflags).ok() } + unsafe { (windows_core::Interface::vtable(self).InvalidateItem)(windows_core::Interface::as_raw(self), psmd.unwrap_or(core::mem::zeroed()) as _, dwflags).ok() } } #[cfg(all(feature = "Win32_UI_Shell_Common", feature = "Win32_UI_WindowsAndMessaging"))] pub unsafe fn GetState(&self, psmd: *mut SMDATA) -> windows_core::Result<()> { @@ -40923,14 +40923,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).AddFavorite)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(url), title.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn AddChannel(&self, url: &windows_core::BSTR) -> windows_core::Result<()> { unsafe { (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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).AddDesktopComponent)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(url), core::mem::transmute_copy(r#type), left.unwrap_or(core::mem::zeroed()) as _, top.unwrap_or(core::mem::zeroed()) as _, width.unwrap_or(core::mem::zeroed()) as _, height.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn IsSubscribed(&self, url: &windows_core::BSTR) -> windows_core::Result { unsafe { @@ -40947,15 +40947,15 @@ impl IShellUIHelper { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn AutoCompleteSaveForm(&self, form: Option<*const super::super::System::Variant::VARIANT>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AutoCompleteSaveForm)(windows_core::Interface::as_raw(self), core::mem::transmute(form.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).AutoCompleteSaveForm)(windows_core::Interface::as_raw(self), form.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).AutoScan)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strsearch), core::mem::transmute_copy(strfailureurl), pvartargetframe.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).AutoCompleteAttach)(windows_core::Interface::as_raw(self), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).AutoCompleteAttach)(windows_core::Interface::as_raw(self), reserved.unwrap_or(core::mem::zeroed()) as _).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 { @@ -42960,7 +42960,7 @@ windows_core::imp::interface_hierarchy!(IShellView2, windows_core::IUnknown, sup #[cfg(feature = "Win32_System_Ole")] impl IShellView2 { pub unsafe fn GetView(&self, pvid: *mut windows_core::GUID, uview: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetView)(windows_core::Interface::as_raw(self), core::mem::transmute(pvid), uview).ok() } + unsafe { (windows_core::Interface::vtable(self).GetView)(windows_core::Interface::as_raw(self), pvid as _, uview).ok() } } pub unsafe fn CreateViewWindow2(&self, lpparams: *const SV2CVW2_PARAMS) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).CreateViewWindow2)(windows_core::Interface::as_raw(self), core::mem::transmute(lpparams)).ok() } @@ -43156,7 +43156,7 @@ impl IShellWindows { 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 { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).FindWindowSW)(windows_core::Interface::as_raw(self), core::mem::transmute(pvarloc), core::mem::transmute(pvarlocroot), swclass, core::mem::transmute(phwnd), swfwoptions, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).FindWindowSW)(windows_core::Interface::as_raw(self), core::mem::transmute(pvarloc), core::mem::transmute(pvarlocroot), swclass, phwnd as _, swfwoptions, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn OnCreated(&self, lcookie: i32, punk: P1) -> windows_core::Result<()> @@ -43347,7 +43347,7 @@ impl ISortColumnArray { } } pub unsafe fn GetAt(&self, index: u32, sortcolumn: *mut SORTCOLUMN) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAt)(windows_core::Interface::as_raw(self), index, core::mem::transmute(sortcolumn)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAt)(windows_core::Interface::as_raw(self), index, sortcolumn as _).ok() } } pub unsafe fn GetSortType(&self) -> windows_core::Result { unsafe { @@ -43758,15 +43758,15 @@ 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<()> { - unsafe { (windows_core::Interface::vtable(self).ReadAsync)(windows_core::Interface::as_raw(self), core::mem::transmute(pv), cb, core::mem::transmute(pcbread.unwrap_or(core::mem::zeroed())), lpoverlapped).ok() } + unsafe { (windows_core::Interface::vtable(self).ReadAsync)(windows_core::Interface::as_raw(self), pv as _, cb, pcbread.unwrap_or(core::mem::zeroed()) as _, 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<()> { - unsafe { (windows_core::Interface::vtable(self).WriteAsync)(windows_core::Interface::as_raw(self), lpbuffer, cb, core::mem::transmute(pcbwritten.unwrap_or(core::mem::zeroed())), lpoverlapped).ok() } + unsafe { (windows_core::Interface::vtable(self).WriteAsync)(windows_core::Interface::as_raw(self), lpbuffer, cb, pcbwritten.unwrap_or(core::mem::zeroed()) as _, lpoverlapped).ok() } } #[cfg(feature = "Win32_System_IO")] pub unsafe fn OverlappedResult(&self, lpoverlapped: *const super::super::System::IO::OVERLAPPED, lpnumberofbytestransferred: *mut u32, bwait: bool) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OverlappedResult)(windows_core::Interface::as_raw(self), lpoverlapped, core::mem::transmute(lpnumberofbytestransferred), bwait.into()).ok() } + unsafe { (windows_core::Interface::vtable(self).OverlappedResult)(windows_core::Interface::as_raw(self), lpoverlapped, lpnumberofbytestransferred as _, bwait.into()).ok() } } pub unsafe fn CancelIo(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).CancelIo)(windows_core::Interface::as_raw(self)).ok() } @@ -44256,7 +44256,7 @@ windows_core::imp::define_interface!(ISyncMgrConflictResolveInfo, ISyncMgrConfli windows_core::imp::interface_hierarchy!(ISyncMgrConflictResolveInfo, windows_core::IUnknown); impl ISyncMgrConflictResolveInfo { pub unsafe fn GetIterationInfo(&self, pncurrentconflict: *mut u32, pcconflicts: *mut u32, pcremainingforapplytoall: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetIterationInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pncurrentconflict), core::mem::transmute(pcconflicts), core::mem::transmute(pcremainingforapplytoall)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetIterationInfo)(windows_core::Interface::as_raw(self), pncurrentconflict as _, pcconflicts as _, pcremainingforapplytoall as _).ok() } } pub unsafe fn GetPresenterNextStep(&self) -> windows_core::Result { unsafe { @@ -44265,7 +44265,7 @@ impl ISyncMgrConflictResolveInfo { } } pub unsafe fn GetPresenterChoice(&self, pnpresenterchoice: *mut SYNCMGR_PRESENTER_CHOICE, pfapplytoall: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPresenterChoice)(windows_core::Interface::as_raw(self), core::mem::transmute(pnpresenterchoice), core::mem::transmute(pfapplytoall)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPresenterChoice)(windows_core::Interface::as_raw(self), pnpresenterchoice as _, pfapplytoall as _).ok() } } pub unsafe fn GetItemChoiceCount(&self) -> windows_core::Result { unsafe { @@ -44286,7 +44286,7 @@ impl ISyncMgrConflictResolveInfo { unsafe { (windows_core::Interface::vtable(self).SetPresenterChoice)(windows_core::Interface::as_raw(self), npresenterchoice, fapplytoall.into()).ok() } } pub unsafe fn SetItemChoices(&self, prgiconflictitemindexes: *mut u32, cchoices: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).SetItemChoices)(windows_core::Interface::as_raw(self), core::mem::transmute(prgiconflictitemindexes), cchoices).ok() } + unsafe { (windows_core::Interface::vtable(self).SetItemChoices)(windows_core::Interface::as_raw(self), prgiconflictitemindexes as _, cchoices).ok() } } } #[repr(C)] @@ -44758,7 +44758,7 @@ windows_core::imp::interface_hierarchy!(ISyncMgrEnumItems, windows_core::IUnknow impl ISyncMgrEnumItems { #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn Next(&self, rgelt: &mut [SYNCMGRITEM], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -45606,7 +45606,7 @@ impl ISyncMgrRegister { unsafe { (windows_core::Interface::vtable(self).UnregisterSyncMgrHandler)(windows_core::Interface::as_raw(self), clsidhandler, dwreserved).ok() } } pub unsafe fn GetHandlerRegistrationInfo(&self, clsidhandler: *const windows_core::GUID, pdwsyncmgrregisterflags: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetHandlerRegistrationInfo)(windows_core::Interface::as_raw(self), clsidhandler, core::mem::transmute(pdwsyncmgrregisterflags)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetHandlerRegistrationInfo)(windows_core::Interface::as_raw(self), clsidhandler, pdwsyncmgrregisterflags as _).ok() } } } #[repr(C)] @@ -45874,13 +45874,13 @@ impl ISyncMgrSyncCallback { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).ReportProgress)(windows_core::Interface::as_raw(self), pszitemid.param().abi(), pszprogresstext.param().abi(), nstatus, ucurrentstep, umaxstep, core::mem::transmute(pncancelrequest)).ok() } + unsafe { (windows_core::Interface::vtable(self).ReportProgress)(windows_core::Interface::as_raw(self), pszitemid.param().abi(), pszprogresstext.param().abi(), nstatus, ucurrentstep, umaxstep, pncancelrequest as _).ok() } } pub unsafe fn SetHandlerProgressText(&self, pszprogresstext: P0, pncancelrequest: *mut SYNCMGR_CANCEL_REQUEST) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).SetHandlerProgressText)(windows_core::Interface::as_raw(self), pszprogresstext.param().abi(), core::mem::transmute(pncancelrequest)).ok() } + unsafe { (windows_core::Interface::vtable(self).SetHandlerProgressText)(windows_core::Interface::as_raw(self), pszprogresstext.param().abi(), pncancelrequest as _).ok() } } pub unsafe fn ReportEvent(&self, pszitemid: P0, nlevel: SYNCMGR_EVENT_LEVEL, nflags: SYNCMGR_EVENT_FLAGS, pszname: P3, pszdescription: P4, pszlinktext: P5, pszlinkreference: P6, pszcontext: P7) -> windows_core::Result where @@ -47206,10 +47206,10 @@ impl IThumbnailCache { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetThumbnail)(windows_core::Interface::as_raw(self), pshellitem.param().abi(), cxyrequestedthumbsize, 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() } + unsafe { (windows_core::Interface::vtable(self).GetThumbnail)(windows_core::Interface::as_raw(self), pshellitem.param().abi(), cxyrequestedthumbsize, flags, ppvthumb.unwrap_or(core::mem::zeroed()) as _, poutflags.unwrap_or(core::mem::zeroed()) as _, pthumbnailid.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn GetThumbnailByID(&self, thumbnailid: WTS_THUMBNAILID, cxyrequestedthumbsize: u32, ppvthumb: Option<*mut Option>, poutflags: Option<*mut WTS_CACHEFLAGS>) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetThumbnailByID)(windows_core::Interface::as_raw(self), core::mem::transmute(thumbnailid), cxyrequestedthumbsize, core::mem::transmute(ppvthumb.unwrap_or(core::mem::zeroed())), core::mem::transmute(poutflags.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetThumbnailByID)(windows_core::Interface::as_raw(self), core::mem::transmute(thumbnailid), cxyrequestedthumbsize, ppvthumb.unwrap_or(core::mem::zeroed()) as _, poutflags.unwrap_or(core::mem::zeroed()) as _).ok() } } } #[repr(C)] @@ -47376,7 +47376,7 @@ windows_core::imp::interface_hierarchy!(IThumbnailProvider, windows_core::IUnkno impl IThumbnailProvider { #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetThumbnail(&self, cx: u32, phbmp: *mut super::super::Graphics::Gdi::HBITMAP, pdwalpha: *mut WTS_ALPHATYPE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetThumbnail)(windows_core::Interface::as_raw(self), cx, core::mem::transmute(phbmp), core::mem::transmute(pdwalpha)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetThumbnail)(windows_core::Interface::as_raw(self), cx, phbmp as _, pdwalpha as _).ok() } } } #[repr(C)] @@ -47446,7 +47446,7 @@ impl IThumbnailStreamCache { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetThumbnailStream)(windows_core::Interface::as_raw(self), path.param().abi(), cacheid, options, requestedthumbnailsize, core::mem::transmute(thumbnailsize), core::mem::transmute(thumbnailstream)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetThumbnailStream)(windows_core::Interface::as_raw(self), path.param().abi(), cacheid, options, requestedthumbnailsize, thumbnailsize as _, core::mem::transmute(thumbnailstream)).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn SetThumbnailStream(&self, path: P0, cacheid: u64, thumbnailsize: super::super::Foundation::SIZE, thumbnailstream: P3) -> windows_core::Result<()> @@ -47517,7 +47517,7 @@ impl ITrackShellMenu { unsafe { (windows_core::Interface::vtable(self).SetObscured)(windows_core::Interface::as_raw(self), hwndtb, punkband.param().abi(), dwsmsetflags).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<()> { - unsafe { (windows_core::Interface::vtable(self).Popup)(windows_core::Interface::as_raw(self), hwnd, core::mem::transmute(ppt), core::mem::transmute(prcexclude), dwflags).ok() } + unsafe { (windows_core::Interface::vtable(self).Popup)(windows_core::Interface::as_raw(self), hwnd, ppt as _, prcexclude as _, dwflags).ok() } } } #[repr(C)] @@ -47563,7 +47563,7 @@ impl ITranscodeImage { P0: windows_core::Param, P4: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).TranscodeImage)(windows_core::Interface::as_raw(self), pshellitem.param().abi(), uimaxwidth, uimaxheight, flags, pvimage.param().abi(), core::mem::transmute(puiwidth), core::mem::transmute(puiheight)).ok() } + unsafe { (windows_core::Interface::vtable(self).TranscodeImage)(windows_core::Interface::as_raw(self), pshellitem.param().abi(), uimaxwidth, uimaxheight, flags, pvimage.param().abi(), puiwidth as _, puiheight as _).ok() } } } #[repr(C)] @@ -47738,7 +47738,7 @@ impl ITransferDestination { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateItem)(windows_core::Interface::as_raw(self), pszname.param().abi(), dwattributes, ullsize, flags, riiditem, core::mem::transmute(ppvitem), riidresources, core::mem::transmute(ppvresources)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateItem)(windows_core::Interface::as_raw(self), pszname.param().abi(), dwattributes, ullsize, flags, riiditem, ppvitem as _, riidresources, ppvresources as _).ok() } } } #[repr(C)] @@ -47842,7 +47842,7 @@ impl ITransferSource { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).OpenItem)(windows_core::Interface::as_raw(self), psi.param().abi(), flags, riid, core::mem::transmute(ppv)).ok() } + unsafe { (windows_core::Interface::vtable(self).OpenItem)(windows_core::Interface::as_raw(self), psi.param().abi(), flags, riid, ppv as _).ok() } } pub unsafe fn MoveItem(&self, psi: P0, psiparentdst: P1, psznamedst: P2, flags: u32) -> windows_core::Result where @@ -48217,7 +48217,7 @@ impl ITravelLog { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetTravelEntry)(windows_core::Interface::as_raw(self), punk.param().abi(), ioffset, core::mem::transmute(ppte.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTravelEntry)(windows_core::Interface::as_raw(self), punk.param().abi(), ioffset, ppte.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn FindTravelEntry(&self, punk: P0, pidl: *const Common::ITEMIDLIST) -> windows_core::Result @@ -48409,7 +48409,7 @@ impl ITravelLogClient { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetWindowData)(windows_core::Interface::as_raw(self), pstream.param().abi(), core::mem::transmute(pwindata)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetWindowData)(windows_core::Interface::as_raw(self), pstream.param().abi(), pwindata as _).ok() } } pub unsafe fn LoadHistoryPosition(&self, pszurllocation: P0, dwposition: u32) -> windows_core::Result<()> where @@ -48864,7 +48864,7 @@ impl IUniformResourceLocatorA { } } pub unsafe fn InvokeCommand(&self, purlici: *mut URLINVOKECOMMANDINFOA) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).InvokeCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(purlici)).ok() } + unsafe { (windows_core::Interface::vtable(self).InvokeCommand)(windows_core::Interface::as_raw(self), purlici as _).ok() } } } #[repr(C)] @@ -48933,7 +48933,7 @@ impl IUniformResourceLocatorW { } } pub unsafe fn InvokeCommand(&self, purlici: *mut URLINVOKECOMMANDINFOW) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).InvokeCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(purlici)).ok() } + unsafe { (windows_core::Interface::vtable(self).InvokeCommand)(windows_core::Interface::as_raw(self), purlici as _).ok() } } } #[repr(C)] @@ -49484,7 +49484,7 @@ impl IVisualProperties { } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetFont(&self, plf: *mut super::super::Graphics::Gdi::LOGFONTW) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFont)(windows_core::Interface::as_raw(self), core::mem::transmute(plf)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFont)(windows_core::Interface::as_raw(self), plf as _).ok() } } pub unsafe fn SetTheme(&self, pszsubappname: P0, pszsubidlist: P1) -> windows_core::Result<()> where @@ -49634,14 +49634,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Navigate)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(url), flags.unwrap_or(core::mem::zeroed()) as _, targetframename.unwrap_or(core::mem::zeroed()) as _, postdata.unwrap_or(core::mem::zeroed()) as _, headers.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Refresh(&self) -> windows_core::Result<()> { unsafe { (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<()> { - unsafe { (windows_core::Interface::vtable(self).Refresh2)(windows_core::Interface::as_raw(self), core::mem::transmute(level.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).Refresh2)(windows_core::Interface::as_raw(self), level.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn Stop(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Stop)(windows_core::Interface::as_raw(self)).ok() } @@ -50082,7 +50082,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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).Navigate2)(windows_core::Interface::as_raw(self), core::mem::transmute(url), flags.unwrap_or(core::mem::zeroed()) as _, targetframename.unwrap_or(core::mem::zeroed()) as _, postdata.unwrap_or(core::mem::zeroed()) as _, headers.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_Ole")] pub unsafe fn QueryStatusWB(&self, cmdid: super::super::System::Ole::OLECMDID) -> windows_core::Result { @@ -50093,11 +50093,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<()> { - unsafe { (windows_core::Interface::vtable(self).ExecWB)(windows_core::Interface::as_raw(self), cmdid, cmdexecopt, core::mem::transmute(pvain.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvaout.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).ExecWB)(windows_core::Interface::as_raw(self), cmdid, cmdexecopt, pvain.unwrap_or(core::mem::zeroed()) as _, pvaout.unwrap_or(core::mem::zeroed()) as _).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<()> { - unsafe { (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() } + unsafe { (windows_core::Interface::vtable(self).ShowBrowserBar)(windows_core::Interface::as_raw(self), core::mem::transmute(pvaclsid), pvarshow.unwrap_or(core::mem::zeroed()) as _, pvarsize.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_System_Ole")] pub unsafe fn ReadyState(&self) -> windows_core::Result { @@ -50448,7 +50448,7 @@ impl IWebBrowserApp { unsafe { (windows_core::Interface::vtable(self).Quit)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn ClientToWindow(&self, pcx: *mut i32, pcy: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ClientToWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(pcx), core::mem::transmute(pcy)).ok() } + unsafe { (windows_core::Interface::vtable(self).ClientToWindow)(windows_core::Interface::as_raw(self), pcx as _, pcy as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn PutProperty(&self, property: &windows_core::BSTR, vtvalue: &super::super::System::Variant::VARIANT) -> windows_core::Result<()> { @@ -51100,7 +51100,7 @@ windows_core::imp::interface_hierarchy!(IWizardExtension, windows_core::IUnknown impl IWizardExtension { #[cfg(feature = "Win32_UI_Controls")] pub unsafe fn AddPages(&self, apages: &mut [super::Controls::HPROPSHEETPAGE], pnpagesadded: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AddPages)(windows_core::Interface::as_raw(self), core::mem::transmute(apages.as_ptr()), apages.len().try_into().unwrap(), core::mem::transmute(pnpagesadded)).ok() } + unsafe { (windows_core::Interface::vtable(self).AddPages)(windows_core::Interface::as_raw(self), core::mem::transmute(apages.as_ptr()), apages.len().try_into().unwrap(), pnpagesadded as _).ok() } } #[cfg(feature = "Win32_UI_Controls")] pub unsafe fn GetFirstPage(&self) -> windows_core::Result { diff --git a/crates/libs/windows/src/Windows/Win32/UI/TabletPC/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/TabletPC/mod.rs index 41ad5d2728..7549beb5e5 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/TabletPC/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/TabletPC/mod.rs @@ -20,12 +20,12 @@ pub unsafe fn AdviseInkChange(hrc: HRECOCONTEXT, bnewstroke: bool) -> windows_co #[inline] 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); - unsafe { CreateContext(hrec, core::mem::transmute(phrc)).ok() } + unsafe { CreateContext(hrec, phrc as _).ok() } } #[inline] pub unsafe fn CreateRecognizer(pclsid: *mut windows_core::GUID, phrec: *mut HRECOGNIZER) -> windows_core::Result<()> { windows_targets::link!("inkobjcore.dll" "system" fn CreateRecognizer(pclsid : *mut windows_core::GUID, phrec : *mut HRECOGNIZER) -> windows_core::HRESULT); - unsafe { CreateRecognizer(core::mem::transmute(pclsid), core::mem::transmute(phrec)).ok() } + unsafe { CreateRecognizer(pclsid as _, phrec as _).ok() } } #[inline] pub unsafe fn DestroyContext(hrc: HRECOCONTEXT) -> windows_core::Result<()> { @@ -50,42 +50,42 @@ pub unsafe fn EndInkInput(hrc: HRECOCONTEXT) -> windows_core::Result<()> { #[inline] pub unsafe fn GetAllRecognizers(recognizerclsids: *mut *mut windows_core::GUID, count: *mut u32) -> windows_core::Result<()> { windows_targets::link!("inkobjcore.dll" "system" fn GetAllRecognizers(recognizerclsids : *mut *mut windows_core::GUID, count : *mut u32) -> windows_core::HRESULT); - unsafe { GetAllRecognizers(core::mem::transmute(recognizerclsids), core::mem::transmute(count)).ok() } + unsafe { GetAllRecognizers(recognizerclsids as _, count as _).ok() } } #[inline] 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); - unsafe { GetBestResultString(hrc, core::mem::transmute(pcsize), core::mem::transmute(pwcbestresult.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { GetBestResultString(hrc, pcsize as _, pwcbestresult.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { GetLatticePtr(hrc, core::mem::transmute(pplattice)).ok() } + unsafe { GetLatticePtr(hrc, pplattice as _).ok() } } #[inline] 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); - unsafe { GetLeftSeparator(hrc, core::mem::transmute(pcsize), core::mem::transmute(pwcleftseparator)).ok() } + unsafe { GetLeftSeparator(hrc, pcsize as _, core::mem::transmute(pwcleftseparator)).ok() } } #[inline] 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); - unsafe { GetRecoAttributes(hrec, core::mem::transmute(precoattrs)).ok() } + unsafe { GetRecoAttributes(hrec, precoattrs as _).ok() } } #[inline] 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); - unsafe { GetResultPropertyList(hrec, core::mem::transmute(ppropertycount), core::mem::transmute(ppropertyguid)).ok() } + unsafe { GetResultPropertyList(hrec, ppropertycount as _, ppropertyguid as _).ok() } } #[inline] 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); - unsafe { GetRightSeparator(hrc, core::mem::transmute(pcsize), core::mem::transmute(pwcrightseparator)).ok() } + unsafe { GetRightSeparator(hrc, pcsize as _, core::mem::transmute(pwcrightseparator)).ok() } } #[inline] 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); - unsafe { GetUnicodeRanges(hrec, core::mem::transmute(pcranges), core::mem::transmute(pcr)).ok() } + unsafe { GetUnicodeRanges(hrec, pcranges as _, pcr as _).ok() } } #[inline] pub unsafe fn IsStringSupported(hrc: HRECOCONTEXT, wcstring: u32, pwcstring: P2) -> windows_core::Result<()> @@ -98,7 +98,7 @@ where #[inline] pub unsafe fn LoadCachedAttributes(clsid: windows_core::GUID, precoattributes: *mut RECO_ATTRS) -> windows_core::Result<()> { windows_targets::link!("inkobjcore.dll" "system" fn LoadCachedAttributes(clsid : windows_core::GUID, precoattributes : *mut RECO_ATTRS) -> windows_core::HRESULT); - unsafe { LoadCachedAttributes(core::mem::transmute(clsid), core::mem::transmute(precoattributes)).ok() } + unsafe { LoadCachedAttributes(core::mem::transmute(clsid), precoattributes as _).ok() } } #[inline] pub unsafe fn MakeWordList(hrec: HRECOGNIZER, pbuffer: P1, phwl: *mut HRECOWORDLIST) -> windows_core::Result<()> @@ -106,17 +106,17 @@ where P1: windows_core::Param, { windows_targets::link!("inkobjcore.dll" "system" fn MakeWordList(hrec : HRECOGNIZER, pbuffer : windows_core::PCWSTR, phwl : *mut HRECOWORDLIST) -> windows_core::HRESULT); - unsafe { MakeWordList(hrec, pbuffer.param().abi(), core::mem::transmute(phwl)).ok() } + unsafe { MakeWordList(hrec, pbuffer.param().abi(), phwl as _).ok() } } #[inline] 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); - unsafe { Process(hrc, core::mem::transmute(pbpartialprocessing)).ok() } + unsafe { Process(hrc, pbpartialprocessing as _).ok() } } #[inline] 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); - unsafe { SetEnabledUnicodeRanges(hrc, cranges, core::mem::transmute(pcr)).ok() } + unsafe { SetEnabledUnicodeRanges(hrc, cranges, pcr as _).ok() } } #[inline] pub unsafe fn SetFactoid(hrc: HRECOCONTEXT, cwcfactoid: u32, pwcfactoid: P2) -> windows_core::Result<()> @@ -3242,10 +3242,10 @@ 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<()> { - unsafe { (windows_core::Interface::vtable(self).HitTestWithLasso)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(points), intersectpercent, core::mem::transmute(lassopoints.unwrap_or(core::mem::zeroed())), core::mem::transmute(strokes)).ok() } + unsafe { (windows_core::Interface::vtable(self).HitTestWithLasso)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(points), intersectpercent, lassopoints.unwrap_or(core::mem::zeroed()) as _, 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<()> { - unsafe { (windows_core::Interface::vtable(self).NearestPoint)(windows_core::Interface::as_raw(self), x, y, core::mem::transmute(pointonstroke), core::mem::transmute(distancefrompacket), core::mem::transmute(stroke)).ok() } + unsafe { (windows_core::Interface::vtable(self).NearestPoint)(windows_core::Interface::as_raw(self), x, y, pointonstroke as _, distancefrompacket as _, core::mem::transmute(stroke)).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn CreateStrokes(&self, strokeids: &super::super::System::Variant::VARIANT) -> windows_core::Result { @@ -6235,7 +6235,7 @@ impl IInkGesture { } } pub unsafe fn GetHotPoint(&self, x: *mut i32, y: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetHotPoint)(windows_core::Interface::as_raw(self), core::mem::transmute(x), core::mem::transmute(y)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetHotPoint)(windows_core::Interface::as_raw(self), x as _, y as _).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -8514,13 +8514,13 @@ impl IInkRecognitionAlternate { } } pub unsafe fn GetStrokesFromTextRange(&self, selectionstart: *mut i32, selectionlength: *mut i32, getstrokesfromtextrange: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetStrokesFromTextRange)(windows_core::Interface::as_raw(self), core::mem::transmute(selectionstart), core::mem::transmute(selectionlength), core::mem::transmute(getstrokesfromtextrange)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetStrokesFromTextRange)(windows_core::Interface::as_raw(self), selectionstart as _, selectionlength as _, core::mem::transmute(getstrokesfromtextrange)).ok() } } pub unsafe fn GetTextRangeFromStrokes(&self, strokes: P0, selectionstart: *mut i32, selectionlength: *mut i32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetTextRangeFromStrokes)(windows_core::Interface::as_raw(self), strokes.param().abi(), core::mem::transmute(selectionstart), core::mem::transmute(selectionlength)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTextRangeFromStrokes)(windows_core::Interface::as_raw(self), strokes.param().abi(), selectionstart as _, selectionlength as _).ok() } } pub unsafe fn AlternatesWithConstantPropertyValues(&self, propertytype: &windows_core::BSTR) -> windows_core::Result { unsafe { @@ -9447,7 +9447,7 @@ impl IInkRecognizerContext { } } pub unsafe fn Recognize(&self, recognitionstatus: *mut InkRecognitionStatus, recognitionresult: *mut Option) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Recognize)(windows_core::Interface::as_raw(self), core::mem::transmute(recognitionstatus), core::mem::transmute(recognitionresult)).ok() } + unsafe { (windows_core::Interface::vtable(self).Recognize)(windows_core::Interface::as_raw(self), recognitionstatus as _, core::mem::transmute(recognitionresult)).ok() } } pub unsafe fn StopBackgroundRecognition(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).StopBackgroundRecognition)(windows_core::Interface::as_raw(self)).ok() } @@ -9926,7 +9926,7 @@ impl IInkRecognizerGuide { unsafe { (windows_core::Interface::vtable(self).SetMidline)(windows_core::Interface::as_raw(self), units).ok() } } pub unsafe fn GuideData(&self, precoguide: *mut InkRecoGuide) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GuideData)(windows_core::Interface::as_raw(self), core::mem::transmute(precoguide)).ok() } + unsafe { (windows_core::Interface::vtable(self).GuideData)(windows_core::Interface::as_raw(self), precoguide as _).ok() } } pub unsafe fn SetGuideData(&self, recoguide: InkRecoGuide) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetGuideData)(windows_core::Interface::as_raw(self), core::mem::transmute(recoguide)).ok() } @@ -10269,7 +10269,7 @@ impl IInkRectangle { unsafe { (windows_core::Interface::vtable(self).SetData)(windows_core::Interface::as_raw(self), core::mem::transmute(rect)).ok() } } pub unsafe fn GetRectangle(&self, top: *mut i32, left: *mut i32, bottom: *mut i32, right: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetRectangle)(windows_core::Interface::as_raw(self), core::mem::transmute(top), core::mem::transmute(left), core::mem::transmute(bottom), core::mem::transmute(right)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetRectangle)(windows_core::Interface::as_raw(self), top as _, left as _, bottom as _, right as _).ok() } } pub unsafe fn SetRectangle(&self, top: i32, left: i32, bottom: i32, right: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetRectangle)(windows_core::Interface::as_raw(self), top, left, bottom, right).ok() } @@ -10485,10 +10485,10 @@ impl IInkRenderer { unsafe { (windows_core::Interface::vtable(self).DrawStroke)(windows_core::Interface::as_raw(self), hdc, stroke.param().abi(), drawingattributes.param().abi()).ok() } } pub unsafe fn PixelToInkSpace(&self, hdc: isize, x: *mut i32, y: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).PixelToInkSpace)(windows_core::Interface::as_raw(self), hdc, core::mem::transmute(x), core::mem::transmute(y)).ok() } + unsafe { (windows_core::Interface::vtable(self).PixelToInkSpace)(windows_core::Interface::as_raw(self), hdc, x as _, y as _).ok() } } pub unsafe fn InkSpaceToPixel(&self, hdcdisplay: isize, x: *mut i32, y: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).InkSpaceToPixel)(windows_core::Interface::as_raw(self), hdcdisplay, core::mem::transmute(x), core::mem::transmute(y)).ok() } + unsafe { (windows_core::Interface::vtable(self).InkSpaceToPixel)(windows_core::Interface::as_raw(self), hdcdisplay, x as _, y as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn PixelToInkSpaceFromPoints(&self, hdc: isize, points: *mut super::super::System::Variant::VARIANT) -> windows_core::Result<()> { @@ -10836,7 +10836,7 @@ impl IInkStrokeDisp { } } pub unsafe fn NearestPoint(&self, x: i32, y: i32, distance: *mut f32, point: *mut f32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).NearestPoint)(windows_core::Interface::as_raw(self), x, y, core::mem::transmute(distance), core::mem::transmute(point)).ok() } + unsafe { (windows_core::Interface::vtable(self).NearestPoint)(windows_core::Interface::as_raw(self), x, y, distance as _, point as _).ok() } } pub unsafe fn Split(&self, splitat: f32) -> windows_core::Result { unsafe { @@ -10845,7 +10845,7 @@ impl IInkStrokeDisp { } } pub unsafe fn GetPacketDescriptionPropertyMetrics(&self, propertyname: &windows_core::BSTR, minimum: *mut i32, maximum: *mut i32, units: *mut TabletPropertyMetricUnit, resolution: *mut f32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPacketDescriptionPropertyMetrics)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(propertyname), core::mem::transmute(minimum), core::mem::transmute(maximum), core::mem::transmute(units), core::mem::transmute(resolution)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPacketDescriptionPropertyMetrics)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(propertyname), minimum as _, maximum as _, units as _, resolution as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetPoints(&self, index: i32, count: i32) -> windows_core::Result { @@ -11815,7 +11815,7 @@ impl IInkTablet { } } pub unsafe fn GetPropertyMetrics(&self, propertyname: &windows_core::BSTR, minimum: *mut i32, maximum: *mut i32, units: *mut TabletPropertyMetricUnit, resolution: *mut f32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPropertyMetrics)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(propertyname), core::mem::transmute(minimum), core::mem::transmute(maximum), core::mem::transmute(units), core::mem::transmute(resolution)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPropertyMetrics)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(propertyname), minimum as _, maximum as _, units as _, resolution as _).ok() } } } #[cfg(feature = "Win32_System_Com")] @@ -12225,7 +12225,7 @@ impl IInkTransform { unsafe { (windows_core::Interface::vtable(self).ScaleTransform)(windows_core::Interface::as_raw(self), horizontalmultiplier, verticalmultiplier).ok() } } pub unsafe fn GetTransform(&self, em11: *mut f32, em12: *mut f32, em21: *mut f32, em22: *mut f32, edx: *mut f32, edy: *mut f32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTransform)(windows_core::Interface::as_raw(self), core::mem::transmute(em11), core::mem::transmute(em12), core::mem::transmute(em21), core::mem::transmute(em22), core::mem::transmute(edx), core::mem::transmute(edy)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTransform)(windows_core::Interface::as_raw(self), em11 as _, em12 as _, em21 as _, em22 as _, edx as _, edy as _).ok() } } pub unsafe fn SetTransform(&self, em11: f32, em12: f32, em21: f32, em22: f32, edx: f32, edy: f32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetTransform)(windows_core::Interface::as_raw(self), em11, em12, em21, em22, edx, edy).ok() } @@ -12286,7 +12286,7 @@ impl IInkTransform { } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn Data(&self, xform: *mut super::super::Graphics::Gdi::XFORM) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Data)(windows_core::Interface::as_raw(self), core::mem::transmute(xform)).ok() } + unsafe { (windows_core::Interface::vtable(self).Data)(windows_core::Interface::as_raw(self), xform as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn SetData(&self, xform: super::super::Graphics::Gdi::XFORM) -> windows_core::Result<()> { @@ -12810,7 +12810,7 @@ impl IMathInputControl { } } pub unsafe fn GetPosition(&self, left: *mut i32, top: *mut i32, right: *mut i32, bottom: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(left), core::mem::transmute(top), core::mem::transmute(right), core::mem::transmute(bottom)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPosition)(windows_core::Interface::as_raw(self), left as _, top as _, right as _, bottom as _).ok() } } pub unsafe fn SetPosition(&self, left: i32, top: i32, right: i32, bottom: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetPosition)(windows_core::Interface::as_raw(self), left, top, right, bottom).ok() } @@ -13758,7 +13758,7 @@ impl IRealTimeStylus { } } pub unsafe fn GetAllTabletContextIds(&self, pctcidcount: *mut u32, pptcids: *mut *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAllTabletContextIds)(windows_core::Interface::as_raw(self), core::mem::transmute(pctcidcount), core::mem::transmute(pptcids)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAllTabletContextIds)(windows_core::Interface::as_raw(self), pctcidcount as _, pptcids as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetStyluses(&self) -> windows_core::Result { @@ -13778,10 +13778,10 @@ impl IRealTimeStylus { unsafe { (windows_core::Interface::vtable(self).SetDesiredPacketDescription)(windows_core::Interface::as_raw(self), ppropertyguids.len().try_into().unwrap(), core::mem::transmute(ppropertyguids.as_ptr())).ok() } } pub unsafe fn GetDesiredPacketDescription(&self, pcproperties: *mut u32, pppropertyguids: *mut *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDesiredPacketDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(pcproperties), core::mem::transmute(pppropertyguids)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDesiredPacketDescription)(windows_core::Interface::as_raw(self), pcproperties as _, pppropertyguids as _).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<()> { - unsafe { (windows_core::Interface::vtable(self).GetPacketDescriptionData)(windows_core::Interface::as_raw(self), 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() } + unsafe { (windows_core::Interface::vtable(self).GetPacketDescriptionData)(windows_core::Interface::as_raw(self), tcid, pfinktodevicescalex.unwrap_or(core::mem::zeroed()) as _, pfinktodevicescaley.unwrap_or(core::mem::zeroed()) as _, pcpacketproperties as _, pppacketproperties as _).ok() } } } #[repr(C)] @@ -14382,14 +14382,14 @@ 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<()> { - unsafe { (windows_core::Interface::vtable(self).BeginStroke)(windows_core::Interface::as_raw(self), tcid, sid, ppacket, ppacketproperties.len().try_into().unwrap(), core::mem::transmute(ppacketproperties.as_ptr()), finktodevicescalex, finktodevicescaley, core::mem::transmute(ppiinkstroke.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { (windows_core::Interface::vtable(self).BeginStroke)(windows_core::Interface::as_raw(self), tcid, sid, ppacket, ppacketproperties.len().try_into().unwrap(), core::mem::transmute(ppacketproperties.as_ptr()), finktodevicescalex, finktodevicescaley, ppiinkstroke.unwrap_or(core::mem::zeroed()) as _).ok() } } pub unsafe fn AppendPackets(&self, tcid: u32, sid: u32, ppackets: &[i32]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).AppendPackets)(windows_core::Interface::as_raw(self), tcid, sid, ppackets.len().try_into().unwrap(), core::mem::transmute(ppackets.as_ptr())).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn EndStroke(&self, tcid: u32, sid: u32, ppiinkstroke: *mut Option, pdirtyrect: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).EndStroke)(windows_core::Interface::as_raw(self), tcid, sid, core::mem::transmute(ppiinkstroke), core::mem::transmute(pdirtyrect)).ok() } + unsafe { (windows_core::Interface::vtable(self).EndStroke)(windows_core::Interface::as_raw(self), tcid, sid, core::mem::transmute(ppiinkstroke), pdirtyrect as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Ink(&self) -> windows_core::Result { @@ -14557,37 +14557,37 @@ impl IStylusPlugin { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).StylusDown)(windows_core::Interface::as_raw(self), pirtssrc.param().abi(), pstylusinfo, ppacket.len().try_into().unwrap(), core::mem::transmute(ppacket.as_ptr()), core::mem::transmute(ppinoutpkt)).ok() } + unsafe { (windows_core::Interface::vtable(self).StylusDown)(windows_core::Interface::as_raw(self), pirtssrc.param().abi(), pstylusinfo, ppacket.len().try_into().unwrap(), core::mem::transmute(ppacket.as_ptr()), ppinoutpkt as _).ok() } } pub unsafe fn StylusUp(&self, pirtssrc: P0, pstylusinfo: *const StylusInfo, ppacket: &[i32], ppinoutpkt: *mut *mut i32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).StylusUp)(windows_core::Interface::as_raw(self), pirtssrc.param().abi(), pstylusinfo, ppacket.len().try_into().unwrap(), core::mem::transmute(ppacket.as_ptr()), core::mem::transmute(ppinoutpkt)).ok() } + unsafe { (windows_core::Interface::vtable(self).StylusUp)(windows_core::Interface::as_raw(self), pirtssrc.param().abi(), pstylusinfo, ppacket.len().try_into().unwrap(), core::mem::transmute(ppacket.as_ptr()), ppinoutpkt as _).ok() } } pub unsafe fn StylusButtonDown(&self, pirtssrc: P0, sid: u32, pguidstylusbutton: *const windows_core::GUID, pstyluspos: *mut super::super::Foundation::POINT) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).StylusButtonDown)(windows_core::Interface::as_raw(self), pirtssrc.param().abi(), sid, pguidstylusbutton, core::mem::transmute(pstyluspos)).ok() } + unsafe { (windows_core::Interface::vtable(self).StylusButtonDown)(windows_core::Interface::as_raw(self), pirtssrc.param().abi(), sid, pguidstylusbutton, pstyluspos as _).ok() } } pub unsafe fn StylusButtonUp(&self, pirtssrc: P0, sid: u32, pguidstylusbutton: *const windows_core::GUID, pstyluspos: *mut super::super::Foundation::POINT) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).StylusButtonUp)(windows_core::Interface::as_raw(self), pirtssrc.param().abi(), sid, pguidstylusbutton, core::mem::transmute(pstyluspos)).ok() } + unsafe { (windows_core::Interface::vtable(self).StylusButtonUp)(windows_core::Interface::as_raw(self), pirtssrc.param().abi(), sid, pguidstylusbutton, pstyluspos as _).ok() } } pub unsafe fn InAirPackets(&self, pirtssrc: P0, pstylusinfo: *const StylusInfo, cpktcount: u32, ppackets: &[i32], pcinoutpkts: *mut u32, ppinoutpkts: *mut *mut i32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).InAirPackets)(windows_core::Interface::as_raw(self), pirtssrc.param().abi(), pstylusinfo, cpktcount, ppackets.len().try_into().unwrap(), core::mem::transmute(ppackets.as_ptr()), core::mem::transmute(pcinoutpkts), core::mem::transmute(ppinoutpkts)).ok() } + unsafe { (windows_core::Interface::vtable(self).InAirPackets)(windows_core::Interface::as_raw(self), pirtssrc.param().abi(), pstylusinfo, cpktcount, ppackets.len().try_into().unwrap(), core::mem::transmute(ppackets.as_ptr()), pcinoutpkts as _, ppinoutpkts as _).ok() } } pub unsafe fn Packets(&self, pirtssrc: P0, pstylusinfo: *const StylusInfo, cpktcount: u32, ppackets: &[i32], pcinoutpkts: *mut u32, ppinoutpkts: *mut *mut i32) -> windows_core::Result<()> where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Packets)(windows_core::Interface::as_raw(self), pirtssrc.param().abi(), pstylusinfo, cpktcount, ppackets.len().try_into().unwrap(), core::mem::transmute(ppackets.as_ptr()), core::mem::transmute(pcinoutpkts), core::mem::transmute(ppinoutpkts)).ok() } + unsafe { (windows_core::Interface::vtable(self).Packets)(windows_core::Interface::as_raw(self), pirtssrc.param().abi(), pstylusinfo, cpktcount, ppackets.len().try_into().unwrap(), core::mem::transmute(ppackets.as_ptr()), pcinoutpkts as _, ppinoutpkts as _).ok() } } pub unsafe fn CustomStylusDataAdded(&self, pirtssrc: P0, pguidid: *const windows_core::GUID, pbdata: Option<&[u8]>) -> windows_core::Result<()> where @@ -14620,7 +14620,7 @@ impl IStylusPlugin { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Error)(windows_core::Interface::as_raw(self), pirtssrc.param().abi(), piplugin.param().abi(), datainterest, hrerrorcode, core::mem::transmute(lptrkey)).ok() } + unsafe { (windows_core::Interface::vtable(self).Error)(windows_core::Interface::as_raw(self), pirtssrc.param().abi(), piplugin.param().abi(), datainterest, hrerrorcode, lptrkey as _).ok() } } pub unsafe fn UpdateMapping(&self, pirtssrc: P0) -> windows_core::Result<()> where @@ -15520,7 +15520,7 @@ impl ITipAutoCompleteClient { unsafe { (windows_core::Interface::vtable(self).UserSelection)(windows_core::Interface::as_raw(self)).ok() } } 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<()> { - unsafe { (windows_core::Interface::vtable(self).PreferredRects)(windows_core::Interface::as_raw(self), prcaclist, prcfield, core::mem::transmute(prcmodifiedaclist), core::mem::transmute(pfshownabovetip)).ok() } + unsafe { (windows_core::Interface::vtable(self).PreferredRects)(windows_core::Interface::as_raw(self), prcaclist, prcfield, prcmodifiedaclist as _, pfshownabovetip as _).ok() } } pub unsafe fn RequestShowUI(&self, hwndlist: super::super::Foundation::HWND) -> windows_core::Result { unsafe { 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 27902e1088..ba830b0d52 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/TextServices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/TextServices/mod.rs @@ -300,7 +300,7 @@ windows_core::imp::define_interface!(IAccDictionary, IAccDictionary_Vtbl, 0x1dc4 windows_core::imp::interface_hierarchy!(IAccDictionary, windows_core::IUnknown); impl IAccDictionary { pub unsafe fn GetLocalizedString(&self, term: *const windows_core::GUID, lcid: u32, presult: *mut windows_core::BSTR, plcid: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLocalizedString)(windows_core::Interface::as_raw(self), term, lcid, core::mem::transmute(presult), core::mem::transmute(plcid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLocalizedString)(windows_core::Interface::as_raw(self), term, lcid, core::mem::transmute(presult), plcid as _).ok() } } pub unsafe fn GetParentTerm(&self, term: *const windows_core::GUID) -> windows_core::Result { unsafe { @@ -322,7 +322,7 @@ impl IAccDictionary { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn ConvertValueToString(&self, term: *const windows_core::GUID, lcid: u32, varvalue: &super::super::System::Variant::VARIANT, pbstrresult: *mut windows_core::BSTR, plcid: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ConvertValueToString)(windows_core::Interface::as_raw(self), term, lcid, core::mem::transmute_copy(varvalue), core::mem::transmute(pbstrresult), core::mem::transmute(plcid)).ok() } + unsafe { (windows_core::Interface::vtable(self).ConvertValueToString)(windows_core::Interface::as_raw(self), term, lcid, core::mem::transmute_copy(varvalue), core::mem::transmute(pbstrresult), plcid as _).ok() } } } #[repr(C)] @@ -668,7 +668,7 @@ impl IAnchor { where P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Shift)(windows_core::Interface::as_raw(self), dwflags, cchreq, core::mem::transmute(pcch), pahaltanchor.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).Shift)(windows_core::Interface::as_raw(self), dwflags, cchreq, pcch as _, pahaltanchor.param().abi()).ok() } } pub unsafe fn ShiftTo(&self, pasite: P0) -> windows_core::Result<()> where @@ -1035,7 +1035,7 @@ impl IEnumITfCompositionView { } } pub unsafe fn Next(&self, rgcompositionview: &mut [Option], pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgcompositionview.len().try_into().unwrap(), core::mem::transmute(rgcompositionview.as_ptr()), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgcompositionview.len().try_into().unwrap(), core::mem::transmute(rgcompositionview.as_ptr()), pcfetched as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -1113,7 +1113,7 @@ impl IEnumSpeechCommands { } } pub unsafe fn Next(&self, pspcmds: &mut [*mut u16], pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pspcmds.len().try_into().unwrap(), core::mem::transmute(pspcmds.as_ptr()), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pspcmds.len().try_into().unwrap(), core::mem::transmute(pspcmds.as_ptr()), pcfetched as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -1191,7 +1191,7 @@ impl IEnumTfCandidates { } } pub unsafe fn Next(&self, ppcand: &mut [Option], pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppcand.len().try_into().unwrap(), core::mem::transmute(ppcand.as_ptr()), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppcand.len().try_into().unwrap(), core::mem::transmute(ppcand.as_ptr()), pcfetched as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -1269,7 +1269,7 @@ impl IEnumTfContextViews { } } pub unsafe fn Next(&self, rgviews: &mut [Option], pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgviews.len().try_into().unwrap(), core::mem::transmute(rgviews.as_ptr()), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgviews.len().try_into().unwrap(), core::mem::transmute(rgviews.as_ptr()), pcfetched as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -1347,7 +1347,7 @@ impl IEnumTfContexts { } } pub unsafe fn Next(&self, rgcontext: &mut [Option], pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgcontext.len().try_into().unwrap(), core::mem::transmute(rgcontext.as_ptr()), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgcontext.len().try_into().unwrap(), core::mem::transmute(rgcontext.as_ptr()), pcfetched as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -1425,7 +1425,7 @@ impl IEnumTfDisplayAttributeInfo { } } pub unsafe fn Next(&self, rginfo: &mut [Option], pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rginfo.len().try_into().unwrap(), core::mem::transmute(rginfo.as_ptr()), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rginfo.len().try_into().unwrap(), core::mem::transmute(rginfo.as_ptr()), pcfetched as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -1503,7 +1503,7 @@ impl IEnumTfDocumentMgrs { } } pub unsafe fn Next(&self, rgdocumentmgr: &mut [Option], pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgdocumentmgr.len().try_into().unwrap(), core::mem::transmute(rgdocumentmgr.as_ptr()), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgdocumentmgr.len().try_into().unwrap(), core::mem::transmute(rgdocumentmgr.as_ptr()), pcfetched as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -1581,7 +1581,7 @@ impl IEnumTfFunctionProviders { } } pub unsafe fn Next(&self, ppcmdobj: &mut [Option], pcfetch: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppcmdobj.len().try_into().unwrap(), core::mem::transmute(ppcmdobj.as_ptr()), core::mem::transmute(pcfetch)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppcmdobj.len().try_into().unwrap(), core::mem::transmute(ppcmdobj.as_ptr()), pcfetch as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -1660,7 +1660,7 @@ impl IEnumTfInputProcessorProfiles { } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] pub unsafe fn Next(&self, pprofile: &mut [TF_INPUTPROCESSORPROFILE], pcfetch: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pprofile.len().try_into().unwrap(), core::mem::transmute(pprofile.as_ptr()), core::mem::transmute(pcfetch)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pprofile.len().try_into().unwrap(), core::mem::transmute(pprofile.as_ptr()), pcfetch as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -1744,7 +1744,7 @@ impl IEnumTfLangBarItems { } } pub unsafe fn Next(&self, ppitem: &mut [Option], pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppitem.len().try_into().unwrap(), core::mem::transmute(ppitem.as_ptr()), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppitem.len().try_into().unwrap(), core::mem::transmute(ppitem.as_ptr()), pcfetched as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -1822,7 +1822,7 @@ impl IEnumTfLanguageProfiles { } } pub unsafe fn Next(&self, pprofile: &mut [TF_LANGUAGEPROFILE], pcfetch: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pprofile.len().try_into().unwrap(), core::mem::transmute(pprofile.as_ptr()), core::mem::transmute(pcfetch)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pprofile.len().try_into().unwrap(), core::mem::transmute(pprofile.as_ptr()), pcfetch as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -1900,7 +1900,7 @@ impl IEnumTfLatticeElements { } } pub unsafe fn Next(&self, rgselements: &mut [TF_LMLATTELEMENT], pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgselements.len().try_into().unwrap(), core::mem::transmute(rgselements.as_ptr()), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgselements.len().try_into().unwrap(), core::mem::transmute(rgselements.as_ptr()), pcfetched as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -1978,7 +1978,7 @@ impl IEnumTfProperties { } } pub unsafe fn Next(&self, ppprop: &mut [Option], pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppprop.len().try_into().unwrap(), core::mem::transmute(ppprop.as_ptr()), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppprop.len().try_into().unwrap(), core::mem::transmute(ppprop.as_ptr()), pcfetched as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -2057,7 +2057,7 @@ impl IEnumTfPropertyValue { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn Next(&self, rgvalues: &mut [TF_PROPERTYVAL], pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgvalues.len().try_into().unwrap(), core::mem::transmute(rgvalues.as_ptr()), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgvalues.len().try_into().unwrap(), core::mem::transmute(rgvalues.as_ptr()), pcfetched as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -2141,7 +2141,7 @@ impl IEnumTfRanges { } } pub unsafe fn Next(&self, pprange: &mut [Option], pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pprange.len().try_into().unwrap(), core::mem::transmute(pprange.as_ptr()), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pprange.len().try_into().unwrap(), core::mem::transmute(pprange.as_ptr()), pcfetched as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -2219,7 +2219,7 @@ impl IEnumTfUIElements { } } pub unsafe fn Next(&self, ppelement: &mut [Option], pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelement.len().try_into().unwrap(), core::mem::transmute(ppelement.as_ptr()), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelement.len().try_into().unwrap(), core::mem::transmute(ppelement.as_ptr()), pcfetched as _).ok() } } pub unsafe fn Reset(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } @@ -2478,16 +2478,16 @@ impl ITextStoreACP { } } pub unsafe fn QueryInsert(&self, acpteststart: i32, acptestend: i32, cch: u32, pacpresultstart: *mut i32, pacpresultend: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryInsert)(windows_core::Interface::as_raw(self), acpteststart, acptestend, cch, core::mem::transmute(pacpresultstart), core::mem::transmute(pacpresultend)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryInsert)(windows_core::Interface::as_raw(self), acpteststart, acptestend, cch, pacpresultstart as _, pacpresultend as _).ok() } } pub unsafe fn GetSelection(&self, ulindex: u32, pselection: &mut [TS_SELECTION_ACP], pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSelection)(windows_core::Interface::as_raw(self), ulindex, pselection.len().try_into().unwrap(), core::mem::transmute(pselection.as_ptr()), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSelection)(windows_core::Interface::as_raw(self), ulindex, pselection.len().try_into().unwrap(), core::mem::transmute(pselection.as_ptr()), pcfetched as _).ok() } } pub unsafe fn SetSelection(&self, pselection: &[TS_SELECTION_ACP]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSelection)(windows_core::Interface::as_raw(self), pselection.len().try_into().unwrap(), core::mem::transmute(pselection.as_ptr())).ok() } } pub unsafe fn GetText(&self, acpstart: i32, acpend: i32, pchplain: &mut [u16], pcchplainret: *mut u32, prgruninfo: &mut [TS_RUNINFO], pcruninforet: *mut u32, pacpnext: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), acpstart, acpend, core::mem::transmute(pchplain.as_ptr()), pchplain.len().try_into().unwrap(), core::mem::transmute(pcchplainret), core::mem::transmute(prgruninfo.as_ptr()), prgruninfo.len().try_into().unwrap(), core::mem::transmute(pcruninforet), core::mem::transmute(pacpnext)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), acpstart, acpend, core::mem::transmute(pchplain.as_ptr()), pchplain.len().try_into().unwrap(), pcchplainret as _, core::mem::transmute(prgruninfo.as_ptr()), prgruninfo.len().try_into().unwrap(), pcruninforet as _, pacpnext as _).ok() } } pub unsafe fn SetText(&self, dwflags: u32, acpstart: i32, acpend: i32, pchtext: &[u16]) -> windows_core::Result { unsafe { @@ -2526,14 +2526,14 @@ impl ITextStoreACP { } } pub unsafe fn InsertTextAtSelection(&self, dwflags: u32, pchtext: &[u16], pacpstart: *mut i32, pacpend: *mut i32, pchange: *mut TS_TEXTCHANGE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).InsertTextAtSelection)(windows_core::Interface::as_raw(self), dwflags, core::mem::transmute(pchtext.as_ptr()), pchtext.len().try_into().unwrap(), core::mem::transmute(pacpstart), core::mem::transmute(pacpend), core::mem::transmute(pchange)).ok() } + unsafe { (windows_core::Interface::vtable(self).InsertTextAtSelection)(windows_core::Interface::as_raw(self), dwflags, core::mem::transmute(pchtext.as_ptr()), pchtext.len().try_into().unwrap(), pacpstart as _, pacpend as _, pchange as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn InsertEmbeddedAtSelection(&self, dwflags: u32, pdataobject: P1, pacpstart: *mut i32, pacpend: *mut i32, pchange: *mut TS_TEXTCHANGE) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).InsertEmbeddedAtSelection)(windows_core::Interface::as_raw(self), dwflags, pdataobject.param().abi(), core::mem::transmute(pacpstart), core::mem::transmute(pacpend), core::mem::transmute(pchange)).ok() } + unsafe { (windows_core::Interface::vtable(self).InsertEmbeddedAtSelection)(windows_core::Interface::as_raw(self), dwflags, pdataobject.param().abi(), pacpstart as _, pacpend as _, pchange as _).ok() } } pub unsafe fn RequestSupportedAttrs(&self, dwflags: u32, pafilterattrs: &[windows_core::GUID]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RequestSupportedAttrs)(windows_core::Interface::as_raw(self), dwflags, pafilterattrs.len().try_into().unwrap(), core::mem::transmute(pafilterattrs.as_ptr())).ok() } @@ -2545,11 +2545,11 @@ impl ITextStoreACP { unsafe { (windows_core::Interface::vtable(self).RequestAttrsTransitioningAtPosition)(windows_core::Interface::as_raw(self), acppos, pafilterattrs.len().try_into().unwrap(), core::mem::transmute(pafilterattrs.as_ptr()), dwflags).ok() } } pub unsafe fn FindNextAttrTransition(&self, acpstart: i32, acphalt: i32, pafilterattrs: &[windows_core::GUID], dwflags: u32, pacpnext: *mut i32, pffound: *mut super::super::Foundation::BOOL, plfoundoffset: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).FindNextAttrTransition)(windows_core::Interface::as_raw(self), acpstart, acphalt, pafilterattrs.len().try_into().unwrap(), core::mem::transmute(pafilterattrs.as_ptr()), dwflags, core::mem::transmute(pacpnext), core::mem::transmute(pffound), core::mem::transmute(plfoundoffset)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindNextAttrTransition)(windows_core::Interface::as_raw(self), acpstart, acphalt, pafilterattrs.len().try_into().unwrap(), core::mem::transmute(pafilterattrs.as_ptr()), dwflags, pacpnext as _, pffound as _, plfoundoffset as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn RetrieveRequestedAttrs(&self, paattrvals: &mut [TS_ATTRVAL], pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RetrieveRequestedAttrs)(windows_core::Interface::as_raw(self), paattrvals.len().try_into().unwrap(), core::mem::transmute(paattrvals.as_ptr()), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).RetrieveRequestedAttrs)(windows_core::Interface::as_raw(self), paattrvals.len().try_into().unwrap(), core::mem::transmute(paattrvals.as_ptr()), pcfetched as _).ok() } } pub unsafe fn GetEndACP(&self) -> windows_core::Result { unsafe { @@ -2570,7 +2570,7 @@ impl ITextStoreACP { } } pub unsafe fn GetTextExt(&self, vcview: u32, acpstart: i32, acpend: i32, prc: *mut super::super::Foundation::RECT, pfclipped: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTextExt)(windows_core::Interface::as_raw(self), vcview, acpstart, acpend, core::mem::transmute(prc), core::mem::transmute(pfclipped)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTextExt)(windows_core::Interface::as_raw(self), vcview, acpstart, acpend, prc as _, pfclipped as _).ok() } } pub unsafe fn GetScreenExt(&self, vcview: u32) -> windows_core::Result { unsafe { @@ -2954,16 +2954,16 @@ impl ITextStoreACP2 { } } pub unsafe fn QueryInsert(&self, acpteststart: i32, acptestend: i32, cch: u32, pacpresultstart: *mut i32, pacpresultend: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).QueryInsert)(windows_core::Interface::as_raw(self), acpteststart, acptestend, cch, core::mem::transmute(pacpresultstart), core::mem::transmute(pacpresultend)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryInsert)(windows_core::Interface::as_raw(self), acpteststart, acptestend, cch, pacpresultstart as _, pacpresultend as _).ok() } } pub unsafe fn GetSelection(&self, ulindex: u32, pselection: &mut [TS_SELECTION_ACP], pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSelection)(windows_core::Interface::as_raw(self), ulindex, pselection.len().try_into().unwrap(), core::mem::transmute(pselection.as_ptr()), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSelection)(windows_core::Interface::as_raw(self), ulindex, pselection.len().try_into().unwrap(), core::mem::transmute(pselection.as_ptr()), pcfetched as _).ok() } } pub unsafe fn SetSelection(&self, pselection: &[TS_SELECTION_ACP]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSelection)(windows_core::Interface::as_raw(self), pselection.len().try_into().unwrap(), core::mem::transmute(pselection.as_ptr())).ok() } } pub unsafe fn GetText(&self, acpstart: i32, acpend: i32, pchplain: &mut [u16], pcchplainret: *mut u32, prgruninfo: &mut [TS_RUNINFO], pcruninforet: *mut u32, pacpnext: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), acpstart, acpend, core::mem::transmute(pchplain.as_ptr()), pchplain.len().try_into().unwrap(), core::mem::transmute(pcchplainret), core::mem::transmute(prgruninfo.as_ptr()), prgruninfo.len().try_into().unwrap(), core::mem::transmute(pcruninforet), core::mem::transmute(pacpnext)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), acpstart, acpend, core::mem::transmute(pchplain.as_ptr()), pchplain.len().try_into().unwrap(), pcchplainret as _, core::mem::transmute(prgruninfo.as_ptr()), prgruninfo.len().try_into().unwrap(), pcruninforet as _, pacpnext as _).ok() } } pub unsafe fn SetText(&self, dwflags: u32, acpstart: i32, acpend: i32, pchtext: &[u16]) -> windows_core::Result { unsafe { @@ -3002,14 +3002,14 @@ impl ITextStoreACP2 { } } pub unsafe fn InsertTextAtSelection(&self, dwflags: u32, pchtext: &[u16], pacpstart: *mut i32, pacpend: *mut i32, pchange: *mut TS_TEXTCHANGE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).InsertTextAtSelection)(windows_core::Interface::as_raw(self), dwflags, core::mem::transmute(pchtext.as_ptr()), pchtext.len().try_into().unwrap(), core::mem::transmute(pacpstart), core::mem::transmute(pacpend), core::mem::transmute(pchange)).ok() } + unsafe { (windows_core::Interface::vtable(self).InsertTextAtSelection)(windows_core::Interface::as_raw(self), dwflags, core::mem::transmute(pchtext.as_ptr()), pchtext.len().try_into().unwrap(), pacpstart as _, pacpend as _, pchange as _).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn InsertEmbeddedAtSelection(&self, dwflags: u32, pdataobject: P1, pacpstart: *mut i32, pacpend: *mut i32, pchange: *mut TS_TEXTCHANGE) -> windows_core::Result<()> where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).InsertEmbeddedAtSelection)(windows_core::Interface::as_raw(self), dwflags, pdataobject.param().abi(), core::mem::transmute(pacpstart), core::mem::transmute(pacpend), core::mem::transmute(pchange)).ok() } + unsafe { (windows_core::Interface::vtable(self).InsertEmbeddedAtSelection)(windows_core::Interface::as_raw(self), dwflags, pdataobject.param().abi(), pacpstart as _, pacpend as _, pchange as _).ok() } } pub unsafe fn RequestSupportedAttrs(&self, dwflags: u32, pafilterattrs: &[windows_core::GUID]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RequestSupportedAttrs)(windows_core::Interface::as_raw(self), dwflags, pafilterattrs.len().try_into().unwrap(), core::mem::transmute(pafilterattrs.as_ptr())).ok() } @@ -3021,11 +3021,11 @@ impl ITextStoreACP2 { unsafe { (windows_core::Interface::vtable(self).RequestAttrsTransitioningAtPosition)(windows_core::Interface::as_raw(self), acppos, pafilterattrs.len().try_into().unwrap(), core::mem::transmute(pafilterattrs.as_ptr()), dwflags).ok() } } pub unsafe fn FindNextAttrTransition(&self, acpstart: i32, acphalt: i32, pafilterattrs: &[windows_core::GUID], dwflags: u32, pacpnext: *mut i32, pffound: *mut super::super::Foundation::BOOL, plfoundoffset: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).FindNextAttrTransition)(windows_core::Interface::as_raw(self), acpstart, acphalt, pafilterattrs.len().try_into().unwrap(), core::mem::transmute(pafilterattrs.as_ptr()), dwflags, core::mem::transmute(pacpnext), core::mem::transmute(pffound), core::mem::transmute(plfoundoffset)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindNextAttrTransition)(windows_core::Interface::as_raw(self), acpstart, acphalt, pafilterattrs.len().try_into().unwrap(), core::mem::transmute(pafilterattrs.as_ptr()), dwflags, pacpnext as _, pffound as _, plfoundoffset as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn RetrieveRequestedAttrs(&self, paattrvals: &mut [TS_ATTRVAL], pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RetrieveRequestedAttrs)(windows_core::Interface::as_raw(self), paattrvals.len().try_into().unwrap(), core::mem::transmute(paattrvals.as_ptr()), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).RetrieveRequestedAttrs)(windows_core::Interface::as_raw(self), paattrvals.len().try_into().unwrap(), core::mem::transmute(paattrvals.as_ptr()), pcfetched as _).ok() } } pub unsafe fn GetEndACP(&self) -> windows_core::Result { unsafe { @@ -3046,7 +3046,7 @@ impl ITextStoreACP2 { } } pub unsafe fn GetTextExt(&self, vcview: u32, acpstart: i32, acpend: i32, prc: *mut super::super::Foundation::RECT, pfclipped: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTextExt)(windows_core::Interface::as_raw(self), vcview, acpstart, acpend, core::mem::transmute(prc), core::mem::transmute(pfclipped)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTextExt)(windows_core::Interface::as_raw(self), vcview, acpstart, acpend, prc as _, pfclipped as _).ok() } } pub unsafe fn GetScreenExt(&self, vcview: u32) -> windows_core::Result { unsafe { @@ -3421,7 +3421,7 @@ impl ITextStoreACPServices { P1: windows_core::Param, P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Serialize)(windows_core::Interface::as_raw(self), pprop.param().abi(), prange.param().abi(), core::mem::transmute(phdr), pstream.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).Serialize)(windows_core::Interface::as_raw(self), pprop.param().abi(), prange.param().abi(), phdr as _, pstream.param().abi()).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Unserialize(&self, pprop: P0, phdr: *const TF_PERSISTENT_PROPERTY_HEADER_ACP, pstream: P2, ploader: P3) -> windows_core::Result<()> @@ -3701,7 +3701,7 @@ impl ITextStoreAnchor { unsafe { (windows_core::Interface::vtable(self).QueryInsert)(windows_core::Interface::as_raw(self), pateststart.param().abi(), patestend.param().abi(), cch, core::mem::transmute(pparesultstart), core::mem::transmute(pparesultend)).ok() } } pub unsafe fn GetSelection(&self, ulindex: u32, pselection: &mut [TS_SELECTION_ANCHOR], pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSelection)(windows_core::Interface::as_raw(self), ulindex, pselection.len().try_into().unwrap(), core::mem::transmute(pselection.as_ptr()), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSelection)(windows_core::Interface::as_raw(self), ulindex, pselection.len().try_into().unwrap(), core::mem::transmute(pselection.as_ptr()), pcfetched as _).ok() } } pub unsafe fn SetSelection(&self, pselection: &[TS_SELECTION_ANCHOR]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSelection)(windows_core::Interface::as_raw(self), pselection.len().try_into().unwrap(), core::mem::transmute(pselection.as_ptr())).ok() } @@ -3711,7 +3711,7 @@ impl ITextStoreAnchor { P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), dwflags, pastart.param().abi(), paend.param().abi(), core::mem::transmute(pchtext.as_ptr()), pchtext.len().try_into().unwrap(), core::mem::transmute(pcch), fupdateanchor.into()).ok() } + unsafe { (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), dwflags, pastart.param().abi(), paend.param().abi(), core::mem::transmute(pchtext.as_ptr()), pchtext.len().try_into().unwrap(), pcch as _, fupdateanchor.into()).ok() } } pub unsafe fn SetText(&self, dwflags: u32, pastart: P1, paend: P2, pchtext: &[u16]) -> windows_core::Result<()> where @@ -3769,11 +3769,11 @@ impl ITextStoreAnchor { P0: windows_core::Param, P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).FindNextAttrTransition)(windows_core::Interface::as_raw(self), pastart.param().abi(), pahalt.param().abi(), pafilterattrs.len().try_into().unwrap(), core::mem::transmute(pafilterattrs.as_ptr()), dwflags, core::mem::transmute(pffound), core::mem::transmute(plfoundoffset)).ok() } + unsafe { (windows_core::Interface::vtable(self).FindNextAttrTransition)(windows_core::Interface::as_raw(self), pastart.param().abi(), pahalt.param().abi(), pafilterattrs.len().try_into().unwrap(), core::mem::transmute(pafilterattrs.as_ptr()), dwflags, pffound as _, plfoundoffset as _).ok() } } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn RetrieveRequestedAttrs(&self, paattrvals: &mut [TS_ATTRVAL], pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RetrieveRequestedAttrs)(windows_core::Interface::as_raw(self), paattrvals.len().try_into().unwrap(), core::mem::transmute(paattrvals.as_ptr()), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).RetrieveRequestedAttrs)(windows_core::Interface::as_raw(self), paattrvals.len().try_into().unwrap(), core::mem::transmute(paattrvals.as_ptr()), pcfetched as _).ok() } } pub unsafe fn GetStart(&self) -> windows_core::Result { unsafe { @@ -3804,7 +3804,7 @@ impl ITextStoreAnchor { P1: windows_core::Param, P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetTextExt)(windows_core::Interface::as_raw(self), vcview, pastart.param().abi(), paend.param().abi(), core::mem::transmute(prc), core::mem::transmute(pfclipped)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTextExt)(windows_core::Interface::as_raw(self), vcview, pastart.param().abi(), paend.param().abi(), prc as _, pfclipped as _).ok() } } pub unsafe fn GetScreenExt(&self, vcview: u32) -> windows_core::Result { unsafe { @@ -4541,7 +4541,7 @@ impl ITfCandidateListUIElement { } } pub unsafe fn GetPageIndex(&self, pindex: &mut [u32], pupagecnt: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPageIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(pindex.as_ptr()), pindex.len().try_into().unwrap(), core::mem::transmute(pupagecnt)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPageIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(pindex.as_ptr()), pindex.len().try_into().unwrap(), pupagecnt as _).ok() } } pub unsafe fn SetPageIndex(&self, pindex: &[u32]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetPageIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(pindex.as_ptr()), pindex.len().try_into().unwrap()).ok() } @@ -4824,7 +4824,7 @@ impl ITfCategoryMgr { } } pub unsafe fn FindClosestCategory(&self, rguid: *const windows_core::GUID, pcatid: *mut windows_core::GUID, ppcatidlist: &[*const windows_core::GUID]) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).FindClosestCategory)(windows_core::Interface::as_raw(self), rguid, core::mem::transmute(pcatid), core::mem::transmute(ppcatidlist.as_ptr()), ppcatidlist.len().try_into().unwrap()).ok() } + unsafe { (windows_core::Interface::vtable(self).FindClosestCategory)(windows_core::Interface::as_raw(self), rguid, pcatid as _, core::mem::transmute(ppcatidlist.as_ptr()), ppcatidlist.len().try_into().unwrap()).ok() } } pub unsafe fn RegisterGUIDDescription(&self, rclsid: *const windows_core::GUID, rguid: *const windows_core::GUID, pchdesc: &[u16]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RegisterGUIDDescription)(windows_core::Interface::as_raw(self), rclsid, rguid, core::mem::transmute(pchdesc.as_ptr()), pchdesc.len().try_into().unwrap()).ok() } @@ -5597,7 +5597,7 @@ impl ITfContext { } } pub unsafe fn GetSelection(&self, ec: u32, ulindex: u32, pselection: &mut [TF_SELECTION], pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetSelection)(windows_core::Interface::as_raw(self), ec, ulindex, pselection.len().try_into().unwrap(), core::mem::transmute(pselection.as_ptr()), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetSelection)(windows_core::Interface::as_raw(self), ec, ulindex, pselection.len().try_into().unwrap(), core::mem::transmute(pselection.as_ptr()), pcfetched as _).ok() } } pub unsafe fn SetSelection(&self, ec: u32, pselection: &[TF_SELECTION]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetSelection)(windows_core::Interface::as_raw(self), ec, pselection.len().try_into().unwrap(), core::mem::transmute(pselection.as_ptr())).ok() } @@ -6133,7 +6133,7 @@ impl ITfContextOwner { } } pub unsafe fn GetTextExt(&self, acpstart: i32, acpend: i32, prc: *mut super::super::Foundation::RECT, pfclipped: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTextExt)(windows_core::Interface::as_raw(self), acpstart, acpend, core::mem::transmute(prc), core::mem::transmute(pfclipped)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTextExt)(windows_core::Interface::as_raw(self), acpstart, acpend, prc as _, pfclipped as _).ok() } } pub unsafe fn GetScreenExt(&self) -> windows_core::Result { unsafe { @@ -6402,7 +6402,7 @@ impl ITfContextOwnerServices { P1: windows_core::Param, P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).Serialize)(windows_core::Interface::as_raw(self), pprop.param().abi(), prange.param().abi(), core::mem::transmute(phdr), pstream.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).Serialize)(windows_core::Interface::as_raw(self), pprop.param().abi(), prange.param().abi(), phdr as _, pstream.param().abi()).ok() } } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Unserialize(&self, pprop: P0, phdr: *const TF_PERSISTENT_PROPERTY_HEADER_ACP, pstream: P2, ploader: P3) -> windows_core::Result<()> @@ -6534,7 +6534,7 @@ impl ITfContextView { where P1: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).GetTextExt)(windows_core::Interface::as_raw(self), ec, prange.param().abi(), core::mem::transmute(prc), core::mem::transmute(pfclipped)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTextExt)(windows_core::Interface::as_raw(self), ec, prange.param().abi(), prc as _, pfclipped as _).ok() } } pub unsafe fn GetScreenExt(&self) -> windows_core::Result { unsafe { @@ -6714,7 +6714,7 @@ impl ITfDisplayAttributeInfo { } } pub unsafe fn GetAttributeInfo(&self, pda: *mut TF_DISPLAYATTRIBUTE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAttributeInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pda)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAttributeInfo)(windows_core::Interface::as_raw(self), pda as _).ok() } } pub unsafe fn SetAttributeInfo(&self, pda: *const TF_DISPLAYATTRIBUTE) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetAttributeInfo)(windows_core::Interface::as_raw(self), pda).ok() } @@ -6810,7 +6810,7 @@ impl ITfDisplayAttributeMgr { } } pub unsafe fn GetDisplayAttributeInfo(&self, guid: *const windows_core::GUID, ppinfo: *mut Option, pclsidowner: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDisplayAttributeInfo)(windows_core::Interface::as_raw(self), guid, core::mem::transmute(ppinfo), core::mem::transmute(pclsidowner)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDisplayAttributeInfo)(windows_core::Interface::as_raw(self), guid, core::mem::transmute(ppinfo), pclsidowner as _).ok() } } } #[repr(C)] @@ -6963,7 +6963,7 @@ impl ITfDocumentMgr { where P2: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).CreateContext)(windows_core::Interface::as_raw(self), tidowner, dwflags, punk.param().abi(), core::mem::transmute(ppic), core::mem::transmute(pectextstore)).ok() } + unsafe { (windows_core::Interface::vtable(self).CreateContext)(windows_core::Interface::as_raw(self), tidowner, dwflags, punk.param().abi(), core::mem::transmute(ppic), pectextstore as _).ok() } } pub unsafe fn Push(&self, pic: P0) -> windows_core::Result<()> where @@ -7519,7 +7519,7 @@ impl core::ops::Deref for ITfFnGetPreferredTouchKeyboardLayout { windows_core::imp::interface_hierarchy!(ITfFnGetPreferredTouchKeyboardLayout, windows_core::IUnknown, ITfFunction); impl ITfFnGetPreferredTouchKeyboardLayout { pub unsafe fn GetLayout(&self, ptkblayouttype: *mut TKBLayoutType, pwpreferredlayoutid: *const u16) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLayout)(windows_core::Interface::as_raw(self), core::mem::transmute(ptkblayouttype), pwpreferredlayoutid).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLayout)(windows_core::Interface::as_raw(self), ptkblayouttype as _, pwpreferredlayoutid).ok() } } } #[repr(C)] @@ -7642,7 +7642,7 @@ impl ITfFnLMProcessor { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).QueryRange)(windows_core::Interface::as_raw(self), prange.param().abi(), core::mem::transmute(ppnewrange), core::mem::transmute(pfaccepted)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryRange)(windows_core::Interface::as_raw(self), prange.param().abi(), core::mem::transmute(ppnewrange), pfaccepted as _).ok() } } pub unsafe fn QueryLangID(&self, langid: u16) -> windows_core::Result { unsafe { @@ -7852,7 +7852,7 @@ impl ITfFnPlayBack { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).QueryRange)(windows_core::Interface::as_raw(self), prange.param().abi(), core::mem::transmute(ppnewrange), core::mem::transmute(pfplayable)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryRange)(windows_core::Interface::as_raw(self), prange.param().abi(), core::mem::transmute(ppnewrange), pfplayable as _).ok() } } pub unsafe fn Play(&self, prange: P0) -> windows_core::Result<()> where @@ -7961,7 +7961,7 @@ impl ITfFnReconversion { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).QueryRange)(windows_core::Interface::as_raw(self), prange.param().abi(), core::mem::transmute(ppnewrange), core::mem::transmute(pfconvertable)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryRange)(windows_core::Interface::as_raw(self), prange.param().abi(), core::mem::transmute(ppnewrange), pfconvertable as _).ok() } } pub unsafe fn GetReconversion(&self, prange: P0) -> windows_core::Result where @@ -8298,7 +8298,7 @@ impl ITfInputProcessorProfileMgr { } #[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: super::Input::KeyboardAndMouse::HKL, pprofile: *mut TF_INPUTPROCESSORPROFILE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetProfile)(windows_core::Interface::as_raw(self), dwprofiletype, langid, clsid, guidprofile, hkl, core::mem::transmute(pprofile)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetProfile)(windows_core::Interface::as_raw(self), dwprofiletype, langid, clsid, guidprofile, hkl, pprofile as _).ok() } } pub unsafe fn EnumProfiles(&self, langid: u16) -> windows_core::Result { unsafe { @@ -8318,7 +8318,7 @@ impl ITfInputProcessorProfileMgr { } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] pub unsafe fn GetActiveProfile(&self, catid: *const windows_core::GUID, pprofile: *mut TF_INPUTPROCESSORPROFILE) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetActiveProfile)(windows_core::Interface::as_raw(self), catid, core::mem::transmute(pprofile)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetActiveProfile)(windows_core::Interface::as_raw(self), catid, pprofile as _).ok() } } } #[repr(C)] @@ -8503,7 +8503,7 @@ impl ITfInputProcessorProfiles { } } pub unsafe fn GetDefaultLanguageProfile(&self, langid: u16, catid: *const windows_core::GUID, pclsid: *mut windows_core::GUID, pguidprofile: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetDefaultLanguageProfile)(windows_core::Interface::as_raw(self), langid, catid, core::mem::transmute(pclsid), core::mem::transmute(pguidprofile)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetDefaultLanguageProfile)(windows_core::Interface::as_raw(self), langid, catid, pclsid as _, pguidprofile as _).ok() } } pub unsafe fn SetDefaultLanguageProfile(&self, langid: u16, rclsid: *const windows_core::GUID, guidprofiles: *const windows_core::GUID) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetDefaultLanguageProfile)(windows_core::Interface::as_raw(self), langid, rclsid, guidprofiles).ok() } @@ -8512,7 +8512,7 @@ impl ITfInputProcessorProfiles { unsafe { (windows_core::Interface::vtable(self).ActivateLanguageProfile)(windows_core::Interface::as_raw(self), rclsid, langid, guidprofiles).ok() } } pub unsafe fn GetActiveLanguageProfile(&self, rclsid: *const windows_core::GUID, plangid: *mut u16, pguidprofile: *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetActiveLanguageProfile)(windows_core::Interface::as_raw(self), rclsid, core::mem::transmute(plangid), core::mem::transmute(pguidprofile)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetActiveLanguageProfile)(windows_core::Interface::as_raw(self), rclsid, plangid as _, pguidprofile as _).ok() } } pub unsafe fn GetLanguageProfileDescription(&self, rclsid: *const windows_core::GUID, langid: u16, guidprofile: *const windows_core::GUID) -> windows_core::Result { unsafe { @@ -8530,7 +8530,7 @@ impl ITfInputProcessorProfiles { unsafe { (windows_core::Interface::vtable(self).ChangeCurrentLanguage)(windows_core::Interface::as_raw(self), langid).ok() } } pub unsafe fn GetLanguageList(&self, pplangid: *mut *mut u16, pulcount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetLanguageList)(windows_core::Interface::as_raw(self), core::mem::transmute(pplangid), core::mem::transmute(pulcount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetLanguageList)(windows_core::Interface::as_raw(self), pplangid as _, pulcount as _).ok() } } pub unsafe fn EnumLanguageProfiles(&self, langid: u16) -> windows_core::Result { unsafe { @@ -8819,10 +8819,10 @@ windows_core::imp::define_interface!(ITfInputScope, ITfInputScope_Vtbl, 0xfde1ea windows_core::imp::interface_hierarchy!(ITfInputScope, windows_core::IUnknown); impl ITfInputScope { pub unsafe fn GetInputScopes(&self, pprginputscopes: *mut *mut InputScope, pccount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInputScopes)(windows_core::Interface::as_raw(self), core::mem::transmute(pprginputscopes), core::mem::transmute(pccount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInputScopes)(windows_core::Interface::as_raw(self), pprginputscopes as _, pccount as _).ok() } } pub unsafe fn GetPhrase(&self, ppbstrphrases: *mut *mut windows_core::BSTR, pccount: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetPhrase)(windows_core::Interface::as_raw(self), core::mem::transmute(ppbstrphrases), core::mem::transmute(pccount)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetPhrase)(windows_core::Interface::as_raw(self), ppbstrphrases as _, pccount as _).ok() } } pub unsafe fn GetRegularExpression(&self) -> windows_core::Result { unsafe { @@ -9802,7 +9802,7 @@ windows_core::imp::define_interface!(ITfLangBarItem, ITfLangBarItem_Vtbl, 0x7354 windows_core::imp::interface_hierarchy!(ITfLangBarItem, windows_core::IUnknown); impl ITfLangBarItem { pub unsafe fn GetInfo(&self, pinfo: *mut TF_LANGBARITEMINFO) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInfo)(windows_core::Interface::as_raw(self), pinfo as _).ok() } } pub unsafe fn GetStatus(&self) -> windows_core::Result { unsafe { @@ -9986,7 +9986,7 @@ impl ITfLangBarItemBitmap { } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn DrawBitmap(&self, bmwidth: i32, bmheight: i32, dwflags: u32, phbmp: *mut super::super::Graphics::Gdi::HBITMAP, phbmpmask: *mut super::super::Graphics::Gdi::HBITMAP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DrawBitmap)(windows_core::Interface::as_raw(self), bmwidth, bmheight, dwflags, core::mem::transmute(phbmp), core::mem::transmute(phbmpmask)).ok() } + unsafe { (windows_core::Interface::vtable(self).DrawBitmap)(windows_core::Interface::as_raw(self), bmwidth, bmheight, dwflags, phbmp as _, phbmpmask as _).ok() } } } #[repr(C)] @@ -10074,7 +10074,7 @@ impl ITfLangBarItemBitmapButton { } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn DrawBitmap(&self, bmwidth: i32, bmheight: i32, dwflags: u32, phbmp: *mut super::super::Graphics::Gdi::HBITMAP, phbmpmask: *mut super::super::Graphics::Gdi::HBITMAP) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).DrawBitmap)(windows_core::Interface::as_raw(self), bmwidth, bmheight, dwflags, core::mem::transmute(phbmp), core::mem::transmute(phbmpmask)).ok() } + unsafe { (windows_core::Interface::vtable(self).DrawBitmap)(windows_core::Interface::as_raw(self), bmwidth, bmheight, dwflags, phbmp as _, phbmpmask as _).ok() } } pub unsafe fn GetText(&self) -> windows_core::Result { unsafe { @@ -10318,7 +10318,7 @@ impl ITfLangBarItemMgr { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).AdviseItemSink)(windows_core::Interface::as_raw(self), punk.param().abi(), core::mem::transmute(pdwcookie), rguiditem).ok() } + unsafe { (windows_core::Interface::vtable(self).AdviseItemSink)(windows_core::Interface::as_raw(self), punk.param().abi(), pdwcookie as _, rguiditem).ok() } } pub unsafe fn UnadviseItemSink(&self, dwcookie: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UnadviseItemSink)(windows_core::Interface::as_raw(self), dwcookie).ok() } @@ -10330,7 +10330,7 @@ impl ITfLangBarItemMgr { } } pub unsafe fn GetItemsStatus(&self, ulcount: u32, prgguid: *const windows_core::GUID, pdwstatus: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetItemsStatus)(windows_core::Interface::as_raw(self), ulcount, prgguid, core::mem::transmute(pdwstatus)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetItemsStatus)(windows_core::Interface::as_raw(self), ulcount, prgguid, pdwstatus as _).ok() } } pub unsafe fn GetItemNum(&self) -> windows_core::Result { unsafe { @@ -10339,10 +10339,10 @@ impl ITfLangBarItemMgr { } } pub unsafe fn GetItems(&self, ulcount: u32, ppitem: *mut Option, pinfo: *mut TF_LANGBARITEMINFO, pdwstatus: *mut u32, pcfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetItems)(windows_core::Interface::as_raw(self), ulcount, core::mem::transmute(ppitem), core::mem::transmute(pinfo), core::mem::transmute(pdwstatus), core::mem::transmute(pcfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetItems)(windows_core::Interface::as_raw(self), ulcount, core::mem::transmute(ppitem), pinfo as _, pdwstatus as _, pcfetched as _).ok() } } pub unsafe fn AdviseItemsSink(&self, ulcount: u32, ppunk: *const Option, pguiditem: *const windows_core::GUID, pdwcookie: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).AdviseItemsSink)(windows_core::Interface::as_raw(self), ulcount, core::mem::transmute(ppunk), pguiditem, core::mem::transmute(pdwcookie)).ok() } + unsafe { (windows_core::Interface::vtable(self).AdviseItemsSink)(windows_core::Interface::as_raw(self), ulcount, core::mem::transmute(ppunk), pguiditem, pdwcookie as _).ok() } } pub unsafe fn UnadviseItemsSink(&self, pdwcookie: &[u32]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UnadviseItemsSink)(windows_core::Interface::as_raw(self), pdwcookie.len().try_into().unwrap(), core::mem::transmute(pdwcookie.as_ptr())).ok() } @@ -10546,13 +10546,13 @@ impl ITfLangBarMgr { } } pub unsafe fn GetThreadLangBarItemMgr(&self, dwthreadid: u32, pplbi: *mut Option, pdwthreadid: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetThreadLangBarItemMgr)(windows_core::Interface::as_raw(self), dwthreadid, core::mem::transmute(pplbi), core::mem::transmute(pdwthreadid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetThreadLangBarItemMgr)(windows_core::Interface::as_raw(self), dwthreadid, core::mem::transmute(pplbi), pdwthreadid as _).ok() } } pub unsafe fn GetInputProcessorProfiles(&self, dwthreadid: u32, ppaip: *mut Option, pdwthreadid: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInputProcessorProfiles)(windows_core::Interface::as_raw(self), dwthreadid, core::mem::transmute(ppaip), core::mem::transmute(pdwthreadid)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInputProcessorProfiles)(windows_core::Interface::as_raw(self), dwthreadid, core::mem::transmute(ppaip), pdwthreadid as _).ok() } } pub unsafe fn RestoreLastFocus(&self, pdwthreadid: *mut u32, fprev: bool) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).RestoreLastFocus)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwthreadid), fprev.into()).ok() } + unsafe { (windows_core::Interface::vtable(self).RestoreLastFocus)(windows_core::Interface::as_raw(self), pdwthreadid as _, fprev.into()).ok() } } pub unsafe fn SetModalInput(&self, psink: P0, dwthreadid: u32, dwflags: u32) -> windows_core::Result<()> where @@ -10821,19 +10821,19 @@ 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: super::super::Foundation::HWND, wmsgfiltermin: u32, wmsgfiltermax: u32, wremovemsg: u32, pfresult: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).PeekMessageA)(windows_core::Interface::as_raw(self), core::mem::transmute(pmsg), hwnd, wmsgfiltermin, wmsgfiltermax, wremovemsg, core::mem::transmute(pfresult)).ok() } + unsafe { (windows_core::Interface::vtable(self).PeekMessageA)(windows_core::Interface::as_raw(self), pmsg as _, hwnd, wmsgfiltermin, wmsgfiltermax, wremovemsg, pfresult as _).ok() } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetMessageA)(windows_core::Interface::as_raw(self), core::mem::transmute(pmsg), hwnd, wmsgfiltermin, wmsgfiltermax, core::mem::transmute(pfresult)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMessageA)(windows_core::Interface::as_raw(self), pmsg as _, hwnd, wmsgfiltermin, wmsgfiltermax, pfresult as _).ok() } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] 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<()> { - unsafe { (windows_core::Interface::vtable(self).PeekMessageW)(windows_core::Interface::as_raw(self), core::mem::transmute(pmsg), hwnd, wmsgfiltermin, wmsgfiltermax, wremovemsg, core::mem::transmute(pfresult)).ok() } + unsafe { (windows_core::Interface::vtable(self).PeekMessageW)(windows_core::Interface::as_raw(self), pmsg as _, hwnd, wmsgfiltermin, wmsgfiltermax, wremovemsg, pfresult as _).ok() } } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] 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<()> { - unsafe { (windows_core::Interface::vtable(self).GetMessageW)(windows_core::Interface::as_raw(self), core::mem::transmute(pmsg), hwnd, wmsgfiltermin, wmsgfiltermax, core::mem::transmute(pfresult)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMessageW)(windows_core::Interface::as_raw(self), pmsg as _, hwnd, wmsgfiltermin, wmsgfiltermax, pfresult as _).ok() } } } #[repr(C)] @@ -11514,7 +11514,7 @@ windows_core::imp::define_interface!(ITfRange, ITfRange_Vtbl, 0xaa80e7ff_2021_11 windows_core::imp::interface_hierarchy!(ITfRange, windows_core::IUnknown); impl ITfRange { pub unsafe fn GetText(&self, ec: u32, dwflags: u32, pchtext: &mut [u16], pcch: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), ec, dwflags, core::mem::transmute(pchtext.as_ptr()), pchtext.len().try_into().unwrap(), core::mem::transmute(pcch)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), ec, dwflags, core::mem::transmute(pchtext.as_ptr()), pchtext.len().try_into().unwrap(), pcch as _).ok() } } pub unsafe fn SetText(&self, ec: u32, dwflags: u32, pchtext: &[u16]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetText)(windows_core::Interface::as_raw(self), ec, dwflags, core::mem::transmute(pchtext.as_ptr()), pchtext.len().try_into().unwrap()).ok() } @@ -11540,10 +11540,10 @@ impl ITfRange { unsafe { (windows_core::Interface::vtable(self).InsertEmbedded)(windows_core::Interface::as_raw(self), ec, dwflags, pdataobject.param().abi()).ok() } } pub unsafe fn ShiftStart(&self, ec: u32, cchreq: i32, pcch: *mut i32, phalt: *const TF_HALTCOND) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ShiftStart)(windows_core::Interface::as_raw(self), ec, cchreq, core::mem::transmute(pcch), core::mem::transmute(phalt)).ok() } + unsafe { (windows_core::Interface::vtable(self).ShiftStart)(windows_core::Interface::as_raw(self), ec, cchreq, pcch as _, core::mem::transmute(phalt)).ok() } } pub unsafe fn ShiftEnd(&self, ec: u32, cchreq: i32, pcch: *mut i32, phalt: *const TF_HALTCOND) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ShiftEnd)(windows_core::Interface::as_raw(self), ec, cchreq, core::mem::transmute(pcch), core::mem::transmute(phalt)).ok() } + unsafe { (windows_core::Interface::vtable(self).ShiftEnd)(windows_core::Interface::as_raw(self), ec, cchreq, pcch as _, core::mem::transmute(phalt)).ok() } } pub unsafe fn ShiftStartToRange(&self, ec: u32, prange: P1, apos: TfAnchor) -> windows_core::Result<()> where @@ -11621,7 +11621,7 @@ impl ITfRange { } } pub unsafe fn GetGravity(&self, pgstart: *mut TfGravity, pgend: *mut TfGravity) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetGravity)(windows_core::Interface::as_raw(self), core::mem::transmute(pgstart), core::mem::transmute(pgend)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetGravity)(windows_core::Interface::as_raw(self), pgstart as _, pgend as _).ok() } } pub unsafe fn SetGravity(&self, ec: u32, gstart: TfGravity, gend: TfGravity) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetGravity)(windows_core::Interface::as_raw(self), ec, gstart, gend).ok() } @@ -11945,7 +11945,7 @@ impl core::ops::Deref for ITfRangeACP { windows_core::imp::interface_hierarchy!(ITfRangeACP, windows_core::IUnknown, ITfRange); impl ITfRangeACP { pub unsafe fn GetExtent(&self, pacpanchor: *mut i32, pcch: *mut i32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetExtent)(windows_core::Interface::as_raw(self), core::mem::transmute(pacpanchor), core::mem::transmute(pcch)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetExtent)(windows_core::Interface::as_raw(self), pacpanchor as _, pcch as _).ok() } } pub unsafe fn SetExtent(&self, acpanchor: i32, cch: i32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetExtent)(windows_core::Interface::as_raw(self), acpanchor, cch).ok() } @@ -13328,7 +13328,7 @@ impl ITfThreadMgr2 { } } pub unsafe fn ActivateEx(&self, ptid: *mut u32, dwflags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ActivateEx)(windows_core::Interface::as_raw(self), core::mem::transmute(ptid), dwflags).ok() } + unsafe { (windows_core::Interface::vtable(self).ActivateEx)(windows_core::Interface::as_raw(self), ptid as _, dwflags).ok() } } pub unsafe fn GetActiveFlags(&self) -> windows_core::Result { unsafe { @@ -13647,7 +13647,7 @@ impl core::ops::Deref for ITfThreadMgrEx { windows_core::imp::interface_hierarchy!(ITfThreadMgrEx, windows_core::IUnknown, ITfThreadMgr); impl ITfThreadMgrEx { pub unsafe fn ActivateEx(&self, ptid: *mut u32, dwflags: u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).ActivateEx)(windows_core::Interface::as_raw(self), core::mem::transmute(ptid), dwflags).ok() } + unsafe { (windows_core::Interface::vtable(self).ActivateEx)(windows_core::Interface::as_raw(self), ptid as _, dwflags).ok() } } pub unsafe fn GetActiveFlags(&self) -> windows_core::Result { unsafe { @@ -13934,7 +13934,7 @@ impl ITfUIElementMgr { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).BeginUIElement)(windows_core::Interface::as_raw(self), pelement.param().abi(), core::mem::transmute(pbshow), core::mem::transmute(pdwuielementid)).ok() } + unsafe { (windows_core::Interface::vtable(self).BeginUIElement)(windows_core::Interface::as_raw(self), pelement.param().abi(), pbshow as _, pdwuielementid as _).ok() } } pub unsafe fn UpdateUIElement(&self, dwuielementid: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UpdateUIElement)(windows_core::Interface::as_raw(self), dwuielementid).ok() } @@ -14033,7 +14033,7 @@ windows_core::imp::define_interface!(ITfUIElementSink, ITfUIElementSink_Vtbl, 0x windows_core::imp::interface_hierarchy!(ITfUIElementSink, windows_core::IUnknown); impl ITfUIElementSink { pub unsafe fn BeginUIElement(&self, dwuielementid: u32, pbshow: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).BeginUIElement)(windows_core::Interface::as_raw(self), dwuielementid, core::mem::transmute(pbshow)).ok() } + unsafe { (windows_core::Interface::vtable(self).BeginUIElement)(windows_core::Interface::as_raw(self), dwuielementid, pbshow as _).ok() } } pub unsafe fn UpdateUIElement(&self, dwuielementid: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UpdateUIElement)(windows_core::Interface::as_raw(self), dwuielementid).ok() } @@ -14195,7 +14195,7 @@ impl IVersionInfo { } } pub unsafe fn GetBuildVersion(&self, ulsub: u32, pdwmajor: *mut u32, pdwminor: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBuildVersion)(windows_core::Interface::as_raw(self), ulsub, core::mem::transmute(pdwmajor), core::mem::transmute(pdwminor)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBuildVersion)(windows_core::Interface::as_raw(self), ulsub, pdwmajor as _, pdwminor as _).ok() } } pub unsafe fn GetComponentDescription(&self, ulsub: u32) -> windows_core::Result { unsafe { 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 bbb5a8d305..b29d43a22c 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/WindowsAndMessaging/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/WindowsAndMessaging/mod.rs @@ -1,12 +1,12 @@ #[inline] pub unsafe fn AdjustWindowRect(lprect: *mut super::super::Foundation::RECT, dwstyle: WINDOW_STYLE, bmenu: bool) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn AdjustWindowRect(lprect : *mut super::super::Foundation:: RECT, dwstyle : WINDOW_STYLE, bmenu : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - unsafe { AdjustWindowRect(core::mem::transmute(lprect), dwstyle, bmenu.into()).ok() } + unsafe { AdjustWindowRect(lprect as _, dwstyle, bmenu.into()).ok() } } #[inline] pub unsafe fn AdjustWindowRectEx(lprect: *mut super::super::Foundation::RECT, dwstyle: WINDOW_STYLE, bmenu: bool, dwexstyle: WINDOW_EX_STYLE) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn AdjustWindowRectEx(lprect : *mut super::super::Foundation:: RECT, dwstyle : WINDOW_STYLE, bmenu : super::super::Foundation:: BOOL, dwexstyle : WINDOW_EX_STYLE) -> super::super::Foundation:: BOOL); - unsafe { AdjustWindowRectEx(core::mem::transmute(lprect), dwstyle, bmenu.into(), dwexstyle).ok() } + unsafe { AdjustWindowRectEx(lprect as _, dwstyle, bmenu.into(), dwexstyle).ok() } } #[inline] pub unsafe fn AllowSetForegroundWindow(dwprocessid: u32) -> windows_core::Result<()> { @@ -58,7 +58,7 @@ pub unsafe fn BringWindowToTop(hwnd: super::super::Foundation::HWND) -> windows_ #[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); - unsafe { CalculatePopupWindowPosition(anchorpoint, windowsize, flags, core::mem::transmute(excluderect.unwrap_or(core::mem::zeroed())), core::mem::transmute(popupwindowposition)).ok() } + unsafe { CalculatePopupWindowPosition(anchorpoint, windowsize, flags, excluderect.unwrap_or(core::mem::zeroed()) as _, popupwindowposition as _).ok() } } #[inline] pub unsafe fn CallMsgFilterA(lpmsg: *const MSG, ncode: i32) -> super::super::Foundation::BOOL { @@ -73,7 +73,7 @@ pub unsafe fn CallMsgFilterW(lpmsg: *const MSG, ncode: i32) -> super::super::Fou #[inline] 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); - unsafe { CallNextHookEx(core::mem::transmute(hhk.unwrap_or(core::mem::zeroed())), ncode, wparam, lparam) } + unsafe { CallNextHookEx(hhk.unwrap_or(core::mem::zeroed()) as _, ncode, wparam, lparam) } } #[inline] 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 { @@ -93,7 +93,7 @@ pub unsafe fn CancelShutdown() -> super::super::Foundation::BOOL { #[inline] 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); - unsafe { CascadeWindows(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), 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()))) } + unsafe { CascadeWindows(hwndparent.unwrap_or(core::mem::zeroed()) as _, whow, lprect.unwrap_or(core::mem::zeroed()) as _, 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: HMENU, cmd: u32, lpsznewitem: P2, cmdinsert: u32, flags: u32) -> super::super::Foundation::BOOL @@ -119,7 +119,7 @@ pub unsafe fn ChangeWindowMessageFilter(message: u32, dwflag: CHANGE_WINDOW_MESS #[inline] 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); - unsafe { ChangeWindowMessageFilterEx(hwnd, message, action, core::mem::transmute(pchangefilterstruct.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ChangeWindowMessageFilterEx(hwnd, message, action, pchangefilterstruct.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CharLowerA(lpsz: windows_core::PSTR) -> windows_core::PSTR { @@ -267,7 +267,7 @@ pub unsafe fn ChildWindowFromPointEx(hwnd: super::super::Foundation::HWND, pt: s #[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); - unsafe { ClipCursor(core::mem::transmute(lprect.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ClipCursor(lprect.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn CloseWindow(hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { @@ -312,24 +312,24 @@ pub unsafe fn CreateAcceleratorTableW(paccel: &[ACCEL]) -> windows_core::Result< #[inline] 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); - unsafe { CreateCaret(hwnd, core::mem::transmute(hbitmap.unwrap_or(core::mem::zeroed())), nwidth, nheight).ok() } + unsafe { CreateCaret(hwnd, hbitmap.unwrap_or(core::mem::zeroed()) as _, nwidth, nheight).ok() } } #[inline] 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__ = unsafe { CreateCursor(core::mem::transmute(hinst.unwrap_or(core::mem::zeroed())), xhotspot, yhotspot, nwidth, nheight, pvandplane, pvxorplane) }; + let result__ = unsafe { CreateCursor(hinst.unwrap_or(core::mem::zeroed()) as _, xhotspot, yhotspot, nwidth, nheight, pvandplane, pvxorplane) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] 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__ = unsafe { CreateDialogIndirectParamA(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lptemplate, core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdialogfunc.unwrap_or(core::mem::zeroed())), dwinitparam) }; + let result__ = unsafe { CreateDialogIndirectParamA(hinstance.unwrap_or(core::mem::zeroed()) as _, lptemplate, hwndparent.unwrap_or(core::mem::zeroed()) as _, lpdialogfunc.unwrap_or(core::mem::zeroed()) as _, dwinitparam) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] 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__ = unsafe { CreateDialogIndirectParamW(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lptemplate, core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdialogfunc.unwrap_or(core::mem::zeroed())), dwinitparam) }; + let result__ = unsafe { CreateDialogIndirectParamW(hinstance.unwrap_or(core::mem::zeroed()) as _, lptemplate, hwndparent.unwrap_or(core::mem::zeroed()) as _, lpdialogfunc.unwrap_or(core::mem::zeroed()) as _, dwinitparam) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -338,7 +338,7 @@ where P1: 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__ = unsafe { 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())), dwinitparam) }; + let result__ = unsafe { CreateDialogParamA(hinstance.unwrap_or(core::mem::zeroed()) as _, lptemplatename.param().abi(), hwndparent.unwrap_or(core::mem::zeroed()) as _, lpdialogfunc.unwrap_or(core::mem::zeroed()) as _, dwinitparam) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -347,13 +347,13 @@ where P1: 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__ = unsafe { 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())), dwinitparam) }; + let result__ = unsafe { CreateDialogParamW(hinstance.unwrap_or(core::mem::zeroed()) as _, lptemplatename.param().abi(), hwndparent.unwrap_or(core::mem::zeroed()) as _, lpdialogfunc.unwrap_or(core::mem::zeroed()) as _, dwinitparam) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] 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__ = unsafe { CreateIcon(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), nwidth, nheight, cplanes, cbitspixel, lpbandbits, lpbxorbits) }; + let result__ = unsafe { CreateIcon(hinstance.unwrap_or(core::mem::zeroed()) as _, nwidth, nheight, cplanes, cbitspixel, lpbandbits, lpbxorbits) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -382,7 +382,7 @@ where P1: 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__ = unsafe { CreateMDIWindowA(lpclassname.param().abi(), lpwindowname.param().abi(), dwstyle, x, y, nwidth, nheight, core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lparam) }; + let result__ = unsafe { CreateMDIWindowA(lpclassname.param().abi(), lpwindowname.param().abi(), dwstyle, x, y, nwidth, nheight, hwndparent.unwrap_or(core::mem::zeroed()) as _, hinstance.unwrap_or(core::mem::zeroed()) as _, lparam) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -392,7 +392,7 @@ where P1: 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__ = unsafe { CreateMDIWindowW(lpclassname.param().abi(), lpwindowname.param().abi(), dwstyle, x, y, nwidth, nheight, core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lparam) }; + let result__ = unsafe { CreateMDIWindowW(lpclassname.param().abi(), lpwindowname.param().abi(), dwstyle, x, y, nwidth, nheight, hwndparent.unwrap_or(core::mem::zeroed()) as _, hinstance.unwrap_or(core::mem::zeroed()) as _, lparam) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -414,7 +414,7 @@ where P1: windows_core::Param, { windows_targets::link!("mrmsupport.dll" "system" fn CreateResourceIndexer(projectroot : windows_core::PCWSTR, extensiondllpath : windows_core::PCWSTR, ppresourceindexer : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { CreateResourceIndexer(projectroot.param().abi(), extensiondllpath.param().abi(), core::mem::transmute(ppresourceindexer)).ok() } + unsafe { CreateResourceIndexer(projectroot.param().abi(), extensiondllpath.param().abi(), ppresourceindexer as _).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: Option, hmenu: Option, hinstance: Option, lpparam: Option<*const core::ffi::c_void>) -> windows_core::Result @@ -423,7 +423,7 @@ where P2: 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__ = unsafe { CreateWindowExA(dwexstyle, lpclassname.param().abi(), lpwindowname.param().abi(), dwstyle, x, y, nwidth, 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()))) }; + let result__ = unsafe { CreateWindowExA(dwexstyle, lpclassname.param().abi(), lpwindowname.param().abi(), dwstyle, x, y, nwidth, nheight, hwndparent.unwrap_or(core::mem::zeroed()) as _, hmenu.unwrap_or(core::mem::zeroed()) as _, hinstance.unwrap_or(core::mem::zeroed()) as _, lpparam.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -433,7 +433,7 @@ where P2: 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__ = unsafe { CreateWindowExW(dwexstyle, lpclassname.param().abi(), lpwindowname.param().abi(), dwstyle, x, y, nwidth, 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()))) }; + let result__ = unsafe { CreateWindowExW(dwexstyle, lpclassname.param().abi(), lpwindowname.param().abi(), dwstyle, x, y, nwidth, nheight, hwndparent.unwrap_or(core::mem::zeroed()) as _, hmenu.unwrap_or(core::mem::zeroed()) as _, hinstance.unwrap_or(core::mem::zeroed()) as _, lpparam.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -449,12 +449,12 @@ pub unsafe fn DefDlgProcW(hdlg: super::super::Foundation::HWND, msg: u32, wparam #[inline] 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); - unsafe { DefFrameProcA(hwnd, core::mem::transmute(hwndmdiclient.unwrap_or(core::mem::zeroed())), umsg, wparam, lparam) } + unsafe { DefFrameProcA(hwnd, hwndmdiclient.unwrap_or(core::mem::zeroed()) as _, umsg, wparam, lparam) } } #[inline] 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); - unsafe { DefFrameProcW(hwnd, core::mem::transmute(hwndmdiclient.unwrap_or(core::mem::zeroed())), umsg, wparam, lparam) } + unsafe { DefFrameProcW(hwnd, hwndmdiclient.unwrap_or(core::mem::zeroed()) as _, umsg, wparam, lparam) } } #[inline] 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 { @@ -479,7 +479,7 @@ pub unsafe fn DefWindowProcW(hwnd: super::super::Foundation::HWND, msg: u32, wpa #[inline] 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__ = unsafe { DeferWindowPos(hwinposinfo, hwnd, core::mem::transmute(hwndinsertafter.unwrap_or(core::mem::zeroed())), x, y, cx, cy, uflags) }; + let result__ = unsafe { DeferWindowPos(hwinposinfo, hwnd, hwndinsertafter.unwrap_or(core::mem::zeroed()) as _, x, y, cx, cy, uflags) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -528,7 +528,7 @@ pub unsafe fn DestroyMenu(hmenu: HMENU) -> windows_core::Result<()> { #[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)); - unsafe { DestroyResourceIndexer(core::mem::transmute(resourceindexer.unwrap_or(core::mem::zeroed()))) } + unsafe { DestroyResourceIndexer(resourceindexer.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn DestroyWindow(hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { @@ -538,12 +538,12 @@ pub unsafe fn DestroyWindow(hwnd: super::super::Foundation::HWND) -> windows_cor #[inline] 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); - unsafe { DialogBoxIndirectParamA(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), hdialogtemplate, core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdialogfunc.unwrap_or(core::mem::zeroed())), dwinitparam) } + unsafe { DialogBoxIndirectParamA(hinstance.unwrap_or(core::mem::zeroed()) as _, hdialogtemplate, hwndparent.unwrap_or(core::mem::zeroed()) as _, lpdialogfunc.unwrap_or(core::mem::zeroed()) as _, dwinitparam) } } #[inline] 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); - unsafe { DialogBoxIndirectParamW(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), hdialogtemplate, core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdialogfunc.unwrap_or(core::mem::zeroed())), dwinitparam) } + unsafe { DialogBoxIndirectParamW(hinstance.unwrap_or(core::mem::zeroed()) as _, hdialogtemplate, hwndparent.unwrap_or(core::mem::zeroed()) as _, lpdialogfunc.unwrap_or(core::mem::zeroed()) as _, dwinitparam) } } #[inline] pub unsafe fn DialogBoxParamA(hinstance: Option, lptemplatename: P1, hwndparent: Option, lpdialogfunc: Option, dwinitparam: super::super::Foundation::LPARAM) -> isize @@ -551,7 +551,7 @@ where P1: 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); - unsafe { 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())), dwinitparam) } + unsafe { DialogBoxParamA(hinstance.unwrap_or(core::mem::zeroed()) as _, lptemplatename.param().abi(), hwndparent.unwrap_or(core::mem::zeroed()) as _, lpdialogfunc.unwrap_or(core::mem::zeroed()) as _, dwinitparam) } } #[inline] pub unsafe fn DialogBoxParamW(hinstance: Option, lptemplatename: P1, hwndparent: Option, lpdialogfunc: Option, dwinitparam: super::super::Foundation::LPARAM) -> isize @@ -559,7 +559,7 @@ where P1: 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); - unsafe { 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())), dwinitparam) } + unsafe { DialogBoxParamW(hinstance.unwrap_or(core::mem::zeroed()) as _, lptemplatename.param().abi(), hwndparent.unwrap_or(core::mem::zeroed()) as _, lpdialogfunc.unwrap_or(core::mem::zeroed()) as _, dwinitparam) } } #[inline] pub unsafe fn DisableProcessWindowsGhosting() { @@ -579,7 +579,7 @@ pub unsafe fn DispatchMessageW(lpmsg: *const MSG) -> super::super::Foundation::L #[inline] 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); - unsafe { DragObject(hwndparent, hwndfrom, fmt, data, core::mem::transmute(hcur.unwrap_or(core::mem::zeroed()))) } + unsafe { DragObject(hwndparent, hwndfrom, fmt, data, hcur.unwrap_or(core::mem::zeroed()) as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -591,7 +591,7 @@ pub unsafe fn DrawIcon(hdc: super::super::Graphics::Gdi::HDC, x: i32, y: i32, hi #[inline] 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); - unsafe { DrawIconEx(hdc, xleft, ytop, hicon, cxwidth, cywidth, istepifanicur, core::mem::transmute(hbrflickerfreedraw.unwrap_or(core::mem::zeroed())), diflags).ok() } + unsafe { DrawIconEx(hdc, xleft, ytop, hicon, cxwidth, cywidth, istepifanicur, hbrflickerfreedraw.unwrap_or(core::mem::zeroed()) as _, diflags).ok() } } #[inline] pub unsafe fn DrawMenuBar(hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { @@ -621,7 +621,7 @@ pub unsafe fn EndMenu() -> windows_core::Result<()> { #[inline] 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); - unsafe { EnumChildWindows(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), lpenumfunc, lparam) } + unsafe { EnumChildWindows(hwndparent.unwrap_or(core::mem::zeroed()) as _, lpenumfunc, lparam) } } #[inline] pub unsafe fn EnumPropsA(hwnd: super::super::Foundation::HWND, lpenumfunc: PROPENUMPROCA) -> i32 { @@ -670,7 +670,7 @@ where 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__ = unsafe { 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()) }; + let result__ = unsafe { FindWindowExA(hwndparent.unwrap_or(core::mem::zeroed()) as _, hwndchildafter.unwrap_or(core::mem::zeroed()) as _, lpszclass.param().abi(), lpszwindow.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -680,7 +680,7 @@ where 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__ = unsafe { 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()) }; + let result__ = unsafe { FindWindowExW(hwndparent.unwrap_or(core::mem::zeroed()) as _, hwndchildafter.unwrap_or(core::mem::zeroed()) as _, lpszclass.param().abi(), lpszwindow.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -706,12 +706,12 @@ pub unsafe fn FlashWindowEx(pfwi: *const FLASHWINFO) -> super::super::Foundation #[inline] 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); - unsafe { GetAltTabInfoA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), 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() } + unsafe { GetAltTabInfoA(hwnd.unwrap_or(core::mem::zeroed()) as _, iitem, pati as _, 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: 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); - unsafe { GetAltTabInfoW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), 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() } + unsafe { GetAltTabInfoW(hwnd.unwrap_or(core::mem::zeroed()) as _, iitem, pati as _, 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: super::super::Foundation::HWND, gaflags: GET_ANCESTOR_FLAGS) -> super::super::Foundation::HWND { @@ -726,7 +726,7 @@ pub unsafe fn GetCaretBlinkTime() -> u32 { #[inline] pub unsafe fn GetCaretPos(lppoint: *mut super::super::Foundation::POINT) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetCaretPos(lppoint : *mut super::super::Foundation:: POINT) -> super::super::Foundation:: BOOL); - unsafe { GetCaretPos(core::mem::transmute(lppoint)).ok() } + unsafe { GetCaretPos(lppoint as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -735,7 +735,7 @@ where 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); - unsafe { GetClassInfoA(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lpclassname.param().abi(), core::mem::transmute(lpwndclass)).ok() } + unsafe { GetClassInfoA(hinstance.unwrap_or(core::mem::zeroed()) as _, lpclassname.param().abi(), lpwndclass as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -744,7 +744,7 @@ where 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); - unsafe { GetClassInfoExA(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lpszclass.param().abi(), core::mem::transmute(lpwcx)).ok() } + unsafe { GetClassInfoExA(hinstance.unwrap_or(core::mem::zeroed()) as _, lpszclass.param().abi(), lpwcx as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -753,7 +753,7 @@ where 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); - unsafe { GetClassInfoExW(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lpszclass.param().abi(), core::mem::transmute(lpwcx)).ok() } + unsafe { GetClassInfoExW(hinstance.unwrap_or(core::mem::zeroed()) as _, lpszclass.param().abi(), lpwcx as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -762,7 +762,7 @@ where 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); - unsafe { GetClassInfoW(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lpclassname.param().abi(), core::mem::transmute(lpwndclass)).ok() } + unsafe { GetClassInfoW(hinstance.unwrap_or(core::mem::zeroed()) as _, lpclassname.param().abi(), lpwndclass as _).ok() } } #[inline] pub unsafe fn GetClassLongA(hwnd: super::super::Foundation::HWND, nindex: GET_CLASS_LONG_INDEX) -> u32 { @@ -804,12 +804,12 @@ pub unsafe fn GetClassWord(hwnd: super::super::Foundation::HWND, nindex: i32) -> #[inline] 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); - unsafe { GetClientRect(hwnd, core::mem::transmute(lprect)).ok() } + unsafe { GetClientRect(hwnd, lprect as _).ok() } } #[inline] pub unsafe fn GetClipCursor(lprect: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetClipCursor(lprect : *mut super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - unsafe { GetClipCursor(core::mem::transmute(lprect)).ok() } + unsafe { GetClipCursor(lprect as _).ok() } } #[inline] pub unsafe fn GetCursor() -> HCURSOR { @@ -819,12 +819,12 @@ pub unsafe fn GetCursor() -> HCURSOR { #[inline] pub unsafe fn GetCursorInfo(pci: *mut CURSORINFO) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetCursorInfo(pci : *mut CURSORINFO) -> super::super::Foundation:: BOOL); - unsafe { GetCursorInfo(core::mem::transmute(pci)).ok() } + unsafe { GetCursorInfo(pci as _).ok() } } #[inline] pub unsafe fn GetCursorPos(lppoint: *mut super::super::Foundation::POINT) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetCursorPos(lppoint : *mut super::super::Foundation:: POINT) -> super::super::Foundation:: BOOL); - unsafe { GetCursorPos(core::mem::transmute(lppoint)).ok() } + unsafe { GetCursorPos(lppoint as _).ok() } } #[inline] pub unsafe fn GetDesktopWindow() -> super::super::Foundation::HWND { @@ -844,13 +844,13 @@ pub unsafe fn GetDlgCtrlID(hwnd: super::super::Foundation::HWND) -> i32 { #[inline] 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__ = unsafe { GetDlgItem(core::mem::transmute(hdlg.unwrap_or(core::mem::zeroed())), niddlgitem) }; + let result__ = unsafe { GetDlgItem(hdlg.unwrap_or(core::mem::zeroed()) as _, niddlgitem) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] pub unsafe fn GetDlgItemInt(hdlg: super::super::Foundation::HWND, niddlgitem: i32, lptranslated: Option<*mut super::super::Foundation::BOOL>, bsigned: bool) -> u32 { 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); - unsafe { GetDlgItemInt(hdlg, niddlgitem, core::mem::transmute(lptranslated.unwrap_or(core::mem::zeroed())), bsigned.into()) } + unsafe { GetDlgItemInt(hdlg, niddlgitem, lptranslated.unwrap_or(core::mem::zeroed()) as _, bsigned.into()) } } #[inline] pub unsafe fn GetDlgItemTextA(hdlg: super::super::Foundation::HWND, niddlgitem: i32, lpstring: &mut [u8]) -> u32 { @@ -870,25 +870,25 @@ pub unsafe fn GetForegroundWindow() -> super::super::Foundation::HWND { #[inline] pub unsafe fn GetGUIThreadInfo(idthread: u32, pgui: *mut GUITHREADINFO) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetGUIThreadInfo(idthread : u32, pgui : *mut GUITHREADINFO) -> super::super::Foundation:: BOOL); - unsafe { GetGUIThreadInfo(idthread, core::mem::transmute(pgui)).ok() } + unsafe { GetGUIThreadInfo(idthread, pgui as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { GetIconInfo(hicon, core::mem::transmute(piconinfo)).ok() } + unsafe { GetIconInfo(hicon, piconinfo as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { GetIconInfoExA(hicon, core::mem::transmute(piconinfo)) } + unsafe { GetIconInfoExA(hicon, piconinfo as _) } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { GetIconInfoExW(hicon, core::mem::transmute(piconinfo)) } + unsafe { GetIconInfoExW(hicon, piconinfo as _) } } #[inline] pub unsafe fn GetInputState() -> super::super::Foundation::BOOL { @@ -903,7 +903,7 @@ pub unsafe fn GetLastActivePopup(hwnd: super::super::Foundation::HWND) -> super: #[inline] 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); - unsafe { GetLayeredWindowAttributes(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() } + unsafe { GetLayeredWindowAttributes(hwnd, pcrkey.unwrap_or(core::mem::zeroed()) as _, pbalpha.unwrap_or(core::mem::zeroed()) as _, pdwflags.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn GetMenu(hwnd: super::super::Foundation::HWND) -> HMENU { @@ -913,7 +913,7 @@ pub unsafe fn GetMenu(hwnd: super::super::Foundation::HWND) -> HMENU { #[inline] 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); - unsafe { GetMenuBarInfo(hwnd, idobject, iditem, core::mem::transmute(pmbi)).ok() } + unsafe { GetMenuBarInfo(hwnd, idobject, iditem, pmbi as _).ok() } } #[inline] pub unsafe fn GetMenuCheckMarkDimensions() -> i32 { @@ -929,12 +929,12 @@ pub unsafe fn GetMenuDefaultItem(hmenu: HMENU, fbypos: u32, gmdiflags: GET_MENU_ #[inline] 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); - unsafe { GetMenuInfo(param0, core::mem::transmute(param1)).ok() } + unsafe { GetMenuInfo(param0, param1 as _).ok() } } #[inline] pub unsafe fn GetMenuItemCount(hmenu: Option) -> i32 { windows_targets::link!("user32.dll" "system" fn GetMenuItemCount(hmenu : HMENU) -> i32); - unsafe { GetMenuItemCount(core::mem::transmute(hmenu.unwrap_or(core::mem::zeroed()))) } + unsafe { GetMenuItemCount(hmenu.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GetMenuItemID(hmenu: HMENU, npos: i32) -> u32 { @@ -945,18 +945,18 @@ pub unsafe fn GetMenuItemID(hmenu: HMENU, npos: i32) -> u32 { #[inline] pub unsafe fn GetMenuItemInfoA(hmenu: HMENU, item: u32, fbyposition: bool, lpmii: *mut MENUITEMINFOA) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetMenuItemInfoA(hmenu : HMENU, item : u32, fbyposition : super::super::Foundation:: BOOL, lpmii : *mut MENUITEMINFOA) -> super::super::Foundation:: BOOL); - unsafe { GetMenuItemInfoA(hmenu, item, fbyposition.into(), core::mem::transmute(lpmii)).ok() } + unsafe { GetMenuItemInfoA(hmenu, item, fbyposition.into(), lpmii as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn GetMenuItemInfoW(hmenu: HMENU, item: u32, fbyposition: bool, lpmii: *mut MENUITEMINFOW) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetMenuItemInfoW(hmenu : HMENU, item : u32, fbyposition : super::super::Foundation:: BOOL, lpmii : *mut MENUITEMINFOW) -> super::super::Foundation:: BOOL); - unsafe { GetMenuItemInfoW(hmenu, item, fbyposition.into(), core::mem::transmute(lpmii)).ok() } + unsafe { GetMenuItemInfoW(hmenu, item, fbyposition.into(), lpmii as _).ok() } } #[inline] 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); - unsafe { GetMenuItemRect(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), hmenu, uitem, core::mem::transmute(lprcitem)).ok() } + unsafe { GetMenuItemRect(hwnd.unwrap_or(core::mem::zeroed()) as _, hmenu, uitem, lprcitem as _).ok() } } #[inline] pub unsafe fn GetMenuState(hmenu: HMENU, uid: u32, uflags: MENU_ITEM_FLAGS) -> u32 { @@ -976,7 +976,7 @@ pub unsafe fn GetMenuStringW(hmenu: HMENU, uiditem: u32, lpstring: Option<&mut [ #[inline] 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); - unsafe { GetMessageA(core::mem::transmute(lpmsg), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), wmsgfiltermin, wmsgfiltermax) } + unsafe { GetMessageA(lpmsg as _, hwnd.unwrap_or(core::mem::zeroed()) as _, wmsgfiltermin, wmsgfiltermax) } } #[inline] pub unsafe fn GetMessageExtraInfo() -> super::super::Foundation::LPARAM { @@ -996,18 +996,18 @@ pub unsafe fn GetMessageTime() -> i32 { #[inline] 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); - unsafe { GetMessageW(core::mem::transmute(lpmsg), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), wmsgfiltermin, wmsgfiltermax) } + unsafe { GetMessageW(lpmsg as _, hwnd.unwrap_or(core::mem::zeroed()) as _, wmsgfiltermin, wmsgfiltermax) } } #[inline] pub unsafe fn GetNextDlgGroupItem(hdlg: super::super::Foundation::HWND, hctl: Option, bprevious: bool) -> windows_core::Result { 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__ = unsafe { GetNextDlgGroupItem(hdlg, core::mem::transmute(hctl.unwrap_or(core::mem::zeroed())), bprevious.into()) }; + let result__ = unsafe { GetNextDlgGroupItem(hdlg, hctl.unwrap_or(core::mem::zeroed()) as _, bprevious.into()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] pub unsafe fn GetNextDlgTabItem(hdlg: super::super::Foundation::HWND, hctl: Option, bprevious: bool) -> windows_core::Result { 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__ = unsafe { GetNextDlgTabItem(hdlg, core::mem::transmute(hctl.unwrap_or(core::mem::zeroed())), bprevious.into()) }; + let result__ = unsafe { GetNextDlgTabItem(hdlg, hctl.unwrap_or(core::mem::zeroed()) as _, bprevious.into()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1019,12 +1019,12 @@ pub unsafe fn GetParent(hwnd: super::super::Foundation::HWND) -> windows_core::R #[inline] pub unsafe fn GetPhysicalCursorPos(lppoint: *mut super::super::Foundation::POINT) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetPhysicalCursorPos(lppoint : *mut super::super::Foundation:: POINT) -> super::super::Foundation:: BOOL); - unsafe { GetPhysicalCursorPos(core::mem::transmute(lppoint)).ok() } + unsafe { GetPhysicalCursorPos(lppoint as _).ok() } } #[inline] pub unsafe fn GetProcessDefaultLayout(pdwdefaultlayout: *mut u32) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetProcessDefaultLayout(pdwdefaultlayout : *mut u32) -> super::super::Foundation:: BOOL); - unsafe { GetProcessDefaultLayout(core::mem::transmute(pdwdefaultlayout)).ok() } + unsafe { GetProcessDefaultLayout(pdwdefaultlayout as _).ok() } } #[inline] pub unsafe fn GetPropA(hwnd: super::super::Foundation::HWND, lpstring: P1) -> super::super::Foundation::HANDLE @@ -1050,12 +1050,12 @@ pub unsafe fn GetQueueStatus(flags: QUEUE_STATUS_FLAGS) -> u32 { #[inline] 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); - unsafe { GetScrollBarInfo(hwnd, idobject, core::mem::transmute(psbi)).ok() } + unsafe { GetScrollBarInfo(hwnd, idobject, psbi as _).ok() } } #[inline] 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); - unsafe { GetScrollInfo(hwnd, nbar, core::mem::transmute(lpsi)).ok() } + unsafe { GetScrollInfo(hwnd, nbar, lpsi as _).ok() } } #[inline] pub unsafe fn GetScrollPos(hwnd: super::super::Foundation::HWND, nbar: SCROLLBAR_CONSTANTS) -> i32 { @@ -1065,7 +1065,7 @@ pub unsafe fn GetScrollPos(hwnd: super::super::Foundation::HWND, nbar: SCROLLBAR #[inline] 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); - unsafe { GetScrollRange(hwnd, nbar, core::mem::transmute(lpminpos), core::mem::transmute(lpmaxpos)).ok() } + unsafe { GetScrollRange(hwnd, nbar, lpminpos as _, lpmaxpos as _).ok() } } #[inline] pub unsafe fn GetShellWindow() -> super::super::Foundation::HWND { @@ -1090,12 +1090,12 @@ pub unsafe fn GetSystemMetrics(nindex: SYSTEM_METRICS_INDEX) -> i32 { #[inline] 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); - unsafe { GetTitleBarInfo(hwnd, core::mem::transmute(pti)).ok() } + unsafe { GetTitleBarInfo(hwnd, pti as _).ok() } } #[inline] 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__ = unsafe { GetTopWindow(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { GetTopWindow(hwnd.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1107,12 +1107,12 @@ pub unsafe fn GetWindow(hwnd: super::super::Foundation::HWND, ucmd: GET_WINDOW_C #[inline] 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); - unsafe { GetWindowDisplayAffinity(hwnd, core::mem::transmute(pdwaffinity)).ok() } + unsafe { GetWindowDisplayAffinity(hwnd, pdwaffinity as _).ok() } } #[inline] 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); - unsafe { GetWindowInfo(hwnd, core::mem::transmute(pwi)).ok() } + unsafe { GetWindowInfo(hwnd, pwi as _).ok() } } #[inline] pub unsafe fn GetWindowLongA(hwnd: super::super::Foundation::HWND, nindex: WINDOW_LONG_PTR_INDEX) -> i32 { @@ -1153,12 +1153,12 @@ pub unsafe fn GetWindowModuleFileNameW(hwnd: super::super::Foundation::HWND, psz #[inline] 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); - unsafe { GetWindowPlacement(hwnd, core::mem::transmute(lpwndpl)).ok() } + unsafe { GetWindowPlacement(hwnd, lpwndpl as _).ok() } } #[inline] 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); - unsafe { GetWindowRect(hwnd, core::mem::transmute(lprect)).ok() } + unsafe { GetWindowRect(hwnd, lprect as _).ok() } } #[inline] pub unsafe fn GetWindowTextA(hwnd: super::super::Foundation::HWND, lpstring: &mut [u8]) -> i32 { @@ -1183,7 +1183,7 @@ pub unsafe fn GetWindowTextW(hwnd: super::super::Foundation::HWND, lpstring: &mu #[inline] 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); - unsafe { GetWindowThreadProcessId(hwnd, core::mem::transmute(lpdwprocessid.unwrap_or(core::mem::zeroed()))) } + unsafe { GetWindowThreadProcessId(hwnd, lpdwprocessid.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn GetWindowWord(hwnd: super::super::Foundation::HWND, nindex: i32) -> u16 { @@ -1193,7 +1193,7 @@ pub unsafe fn GetWindowWord(hwnd: super::super::Foundation::HWND, nindex: i32) - #[inline] 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); - unsafe { HideCaret(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { HideCaret(hwnd.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn HiliteMenuItem(hwnd: super::super::Foundation::HWND, hmenu: HMENU, uidhiliteitem: u32, uhilite: u32) -> super::super::Foundation::BOOL { @@ -1208,7 +1208,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); - unsafe { InSendMessageEx(core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))) } + unsafe { InSendMessageEx(lpreserved.unwrap_or(core::mem::zeroed()) as _) } } #[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<()> @@ -1216,12 +1216,12 @@ where P1: windows_core::Param, { windows_targets::link!("mrmsupport.dll" "system" fn IndexFilePath(resourceindexer : *const core::ffi::c_void, filepath : windows_core::PCWSTR, ppresourceuri : *mut windows_core::PWSTR, pqualifiercount : *mut u32, ppqualifiers : *mut *mut IndexedResourceQualifier) -> windows_core::HRESULT); - unsafe { IndexFilePath(resourceindexer, filepath.param().abi(), core::mem::transmute(ppresourceuri), core::mem::transmute(pqualifiercount), core::mem::transmute(ppqualifiers)).ok() } + unsafe { IndexFilePath(resourceindexer, filepath.param().abi(), ppresourceuri as _, pqualifiercount as _, ppqualifiers as _).ok() } } #[inline] 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); - unsafe { InheritWindowMonitor(hwnd, core::mem::transmute(hwndinherit.unwrap_or(core::mem::zeroed()))) } + unsafe { InheritWindowMonitor(hwnd, hwndinherit.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn InsertMenuA(hmenu: HMENU, uposition: u32, uflags: MENU_ITEM_FLAGS, uidnewitem: usize, lpnewitem: P4) -> windows_core::Result<()> @@ -1334,7 +1334,7 @@ pub unsafe fn IsProcessDPIAware() -> super::super::Foundation::BOOL { #[inline] 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); - unsafe { IsWindow(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed()))) } + unsafe { IsWindow(hwnd.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn IsWindowArranged(hwnd: super::super::Foundation::HWND) -> super::super::Foundation::BOOL { @@ -1364,7 +1364,7 @@ pub unsafe fn IsZoomed(hwnd: super::super::Foundation::HWND) -> super::super::Fo #[inline] 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); - unsafe { KillTimer(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), uidevent).ok() } + unsafe { KillTimer(hwnd.unwrap_or(core::mem::zeroed()) as _, uidevent).ok() } } #[inline] pub unsafe fn LoadAcceleratorsA(hinstance: Option, lptablename: P1) -> windows_core::Result @@ -1372,7 +1372,7 @@ where P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn LoadAcceleratorsA(hinstance : super::super::Foundation:: HINSTANCE, lptablename : windows_core::PCSTR) -> HACCEL); - let result__ = unsafe { LoadAcceleratorsA(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lptablename.param().abi()) }; + let result__ = unsafe { LoadAcceleratorsA(hinstance.unwrap_or(core::mem::zeroed()) as _, lptablename.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1381,7 +1381,7 @@ where P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn LoadAcceleratorsW(hinstance : super::super::Foundation:: HINSTANCE, lptablename : windows_core::PCWSTR) -> HACCEL); - let result__ = unsafe { LoadAcceleratorsW(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lptablename.param().abi()) }; + let result__ = unsafe { LoadAcceleratorsW(hinstance.unwrap_or(core::mem::zeroed()) as _, lptablename.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1390,7 +1390,7 @@ where P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn LoadCursorA(hinstance : super::super::Foundation:: HINSTANCE, lpcursorname : windows_core::PCSTR) -> HCURSOR); - let result__ = unsafe { LoadCursorA(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lpcursorname.param().abi()) }; + let result__ = unsafe { LoadCursorA(hinstance.unwrap_or(core::mem::zeroed()) as _, lpcursorname.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1417,7 +1417,7 @@ where P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn LoadCursorW(hinstance : super::super::Foundation:: HINSTANCE, lpcursorname : windows_core::PCWSTR) -> HCURSOR); - let result__ = unsafe { LoadCursorW(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lpcursorname.param().abi()) }; + let result__ = unsafe { LoadCursorW(hinstance.unwrap_or(core::mem::zeroed()) as _, lpcursorname.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1426,7 +1426,7 @@ where P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn LoadIconA(hinstance : super::super::Foundation:: HINSTANCE, lpiconname : windows_core::PCSTR) -> HICON); - let result__ = unsafe { LoadIconA(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lpiconname.param().abi()) }; + let result__ = unsafe { LoadIconA(hinstance.unwrap_or(core::mem::zeroed()) as _, lpiconname.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1435,7 +1435,7 @@ where P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn LoadIconW(hinstance : super::super::Foundation:: HINSTANCE, lpiconname : windows_core::PCWSTR) -> HICON); - let result__ = unsafe { LoadIconW(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lpiconname.param().abi()) }; + let result__ = unsafe { LoadIconW(hinstance.unwrap_or(core::mem::zeroed()) as _, lpiconname.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1444,7 +1444,7 @@ where 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__ = unsafe { LoadImageA(core::mem::transmute(hinst.unwrap_or(core::mem::zeroed())), name.param().abi(), r#type, cx, cy, fuload) }; + let result__ = unsafe { LoadImageA(hinst.unwrap_or(core::mem::zeroed()) as _, name.param().abi(), r#type, cx, cy, fuload) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1453,7 +1453,7 @@ where 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__ = unsafe { LoadImageW(core::mem::transmute(hinst.unwrap_or(core::mem::zeroed())), name.param().abi(), r#type, cx, cy, fuload) }; + let result__ = unsafe { LoadImageW(hinst.unwrap_or(core::mem::zeroed()) as _, name.param().abi(), r#type, cx, cy, fuload) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1462,7 +1462,7 @@ where P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn LoadMenuA(hinstance : super::super::Foundation:: HINSTANCE, lpmenuname : windows_core::PCSTR) -> HMENU); - let result__ = unsafe { LoadMenuA(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lpmenuname.param().abi()) }; + let result__ = unsafe { LoadMenuA(hinstance.unwrap_or(core::mem::zeroed()) as _, lpmenuname.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1483,18 +1483,18 @@ where P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn LoadMenuW(hinstance : super::super::Foundation:: HINSTANCE, lpmenuname : windows_core::PCWSTR) -> HMENU); - let result__ = unsafe { LoadMenuW(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lpmenuname.param().abi()) }; + let result__ = unsafe { LoadMenuW(hinstance.unwrap_or(core::mem::zeroed()) as _, lpmenuname.param().abi()) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] 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); - unsafe { LoadStringA(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), uid, core::mem::transmute(lpbuffer), cchbuffermax) } + unsafe { LoadStringA(hinstance.unwrap_or(core::mem::zeroed()) as _, uid, core::mem::transmute(lpbuffer), cchbuffermax) } } #[inline] 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); - unsafe { LoadStringW(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), uid, core::mem::transmute(lpbuffer), cchbuffermax) } + unsafe { LoadStringW(hinstance.unwrap_or(core::mem::zeroed()) as _, uid, core::mem::transmute(lpbuffer), cchbuffermax) } } #[inline] pub unsafe fn LockSetForegroundWindow(ulockcode: FOREGROUND_WINDOW_LOCK_CODE) -> windows_core::Result<()> { @@ -1504,7 +1504,7 @@ pub unsafe fn LockSetForegroundWindow(ulockcode: FOREGROUND_WINDOW_LOCK_CODE) -> #[inline] 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); - unsafe { LogicalToPhysicalPoint(hwnd, core::mem::transmute(lppoint)) } + unsafe { LogicalToPhysicalPoint(hwnd, lppoint as _) } } #[inline] pub unsafe fn LookupIconIdFromDirectory(presbits: *const u8, ficon: bool) -> i32 { @@ -1519,12 +1519,12 @@ pub unsafe fn LookupIconIdFromDirectoryEx(presbits: *const u8, ficon: bool, cxde #[inline] 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); - unsafe { MapDialogRect(hdlg, core::mem::transmute(lprect)).ok() } + unsafe { MapDialogRect(hdlg, lprect as _).ok() } } #[inline] 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); - unsafe { MenuItemFromPoint(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), hmenu, core::mem::transmute(ptscreen)) } + unsafe { MenuItemFromPoint(hwnd.unwrap_or(core::mem::zeroed()) as _, hmenu, core::mem::transmute(ptscreen)) } } #[inline] pub unsafe fn MessageBoxA(hwnd: Option, lptext: P1, lpcaption: P2, utype: MESSAGEBOX_STYLE) -> MESSAGEBOX_RESULT @@ -1533,7 +1533,7 @@ where 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); - unsafe { MessageBoxA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), lptext.param().abi(), lpcaption.param().abi(), utype) } + unsafe { MessageBoxA(hwnd.unwrap_or(core::mem::zeroed()) as _, lptext.param().abi(), lpcaption.param().abi(), utype) } } #[inline] pub unsafe fn MessageBoxExA(hwnd: Option, lptext: P1, lpcaption: P2, utype: MESSAGEBOX_STYLE, wlanguageid: u16) -> MESSAGEBOX_RESULT @@ -1542,7 +1542,7 @@ where 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); - unsafe { MessageBoxExA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), lptext.param().abi(), lpcaption.param().abi(), utype, wlanguageid) } + unsafe { MessageBoxExA(hwnd.unwrap_or(core::mem::zeroed()) as _, lptext.param().abi(), lpcaption.param().abi(), utype, wlanguageid) } } #[inline] pub unsafe fn MessageBoxExW(hwnd: Option, lptext: P1, lpcaption: P2, utype: MESSAGEBOX_STYLE, wlanguageid: u16) -> MESSAGEBOX_RESULT @@ -1551,7 +1551,7 @@ where 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); - unsafe { MessageBoxExW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), lptext.param().abi(), lpcaption.param().abi(), utype, wlanguageid) } + unsafe { MessageBoxExW(hwnd.unwrap_or(core::mem::zeroed()) as _, lptext.param().abi(), lpcaption.param().abi(), utype, wlanguageid) } } #[cfg(feature = "Win32_UI_Shell")] #[inline] @@ -1572,7 +1572,7 @@ where 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); - unsafe { MessageBoxW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), lptext.param().abi(), lpcaption.param().abi(), utype) } + unsafe { MessageBoxW(hwnd.unwrap_or(core::mem::zeroed()) as _, lptext.param().abi(), lpcaption.param().abi(), utype) } } #[inline] pub unsafe fn ModifyMenuA(hmnu: HMENU, uposition: u32, uflags: MENU_ITEM_FLAGS, uidnewitem: usize, lpnewitem: P4) -> windows_core::Result<()> @@ -1610,7 +1610,7 @@ where P1: windows_core::Param, { windows_targets::link!("mrmsupport.dll" "system" fn MrmCreateConfigInMemory(platformversion : MrmPlatformVersion, defaultqualifiers : windows_core::PCWSTR, outputxmldata : *mut *mut u8, outputxmlsize : *mut u32) -> windows_core::HRESULT); - unsafe { MrmCreateConfigInMemory(platformversion, defaultqualifiers.param().abi(), core::mem::transmute(outputxmldata), core::mem::transmute(outputxmlsize)).ok() } + unsafe { MrmCreateConfigInMemory(platformversion, defaultqualifiers.param().abi(), outputxmldata as _, outputxmlsize as _).ok() } } #[inline] pub unsafe fn MrmCreateResourceFile(indexer: MrmResourceIndexerHandle, packagingmode: MrmPackagingMode, packagingoptions: MrmPackagingOptions, outputdirectory: P3) -> windows_core::Result<()> @@ -1623,7 +1623,7 @@ where #[inline] pub unsafe fn MrmCreateResourceFileInMemory(indexer: MrmResourceIndexerHandle, packagingmode: MrmPackagingMode, packagingoptions: MrmPackagingOptions, outputpridata: *mut *mut u8, outputprisize: *mut u32) -> windows_core::Result<()> { windows_targets::link!("mrmsupport.dll" "system" fn MrmCreateResourceFileInMemory(indexer : MrmResourceIndexerHandle, packagingmode : MrmPackagingMode, packagingoptions : MrmPackagingOptions, outputpridata : *mut *mut u8, outputprisize : *mut u32) -> windows_core::HRESULT); - unsafe { MrmCreateResourceFileInMemory(core::mem::transmute(indexer), packagingmode, packagingoptions, core::mem::transmute(outputpridata), core::mem::transmute(outputprisize)).ok() } + unsafe { MrmCreateResourceFileInMemory(core::mem::transmute(indexer), packagingmode, packagingoptions, outputpridata as _, outputprisize as _).ok() } } #[inline] pub unsafe fn MrmCreateResourceFileWithChecksum(indexer: MrmResourceIndexerHandle, packagingmode: MrmPackagingMode, packagingoptions: MrmPackagingOptions, checksum: u32, outputdirectory: P4) -> windows_core::Result<()> @@ -1641,7 +1641,7 @@ where P3: windows_core::Param, { windows_targets::link!("mrmsupport.dll" "system" fn MrmCreateResourceIndexer(packagefamilyname : windows_core::PCWSTR, projectroot : windows_core::PCWSTR, platformversion : MrmPlatformVersion, defaultqualifiers : windows_core::PCWSTR, indexer : *mut MrmResourceIndexerHandle) -> windows_core::HRESULT); - unsafe { MrmCreateResourceIndexer(packagefamilyname.param().abi(), projectroot.param().abi(), platformversion, defaultqualifiers.param().abi(), core::mem::transmute(indexer)).ok() } + unsafe { MrmCreateResourceIndexer(packagefamilyname.param().abi(), projectroot.param().abi(), platformversion, defaultqualifiers.param().abi(), indexer as _).ok() } } #[inline] pub unsafe fn MrmCreateResourceIndexerFromPreviousPriData(projectroot: P0, platformversion: MrmPlatformVersion, defaultqualifiers: P2, pridata: &[u8], indexer: *mut MrmResourceIndexerHandle) -> windows_core::Result<()> @@ -1650,7 +1650,7 @@ where P2: windows_core::Param, { windows_targets::link!("mrmsupport.dll" "system" fn MrmCreateResourceIndexerFromPreviousPriData(projectroot : windows_core::PCWSTR, platformversion : MrmPlatformVersion, defaultqualifiers : windows_core::PCWSTR, pridata : *const u8, prisize : u32, indexer : *mut MrmResourceIndexerHandle) -> windows_core::HRESULT); - unsafe { MrmCreateResourceIndexerFromPreviousPriData(projectroot.param().abi(), platformversion, defaultqualifiers.param().abi(), core::mem::transmute(pridata.as_ptr()), pridata.len().try_into().unwrap(), core::mem::transmute(indexer)).ok() } + unsafe { MrmCreateResourceIndexerFromPreviousPriData(projectroot.param().abi(), platformversion, defaultqualifiers.param().abi(), core::mem::transmute(pridata.as_ptr()), pridata.len().try_into().unwrap(), indexer as _).ok() } } #[inline] pub unsafe fn MrmCreateResourceIndexerFromPreviousPriFile(projectroot: P0, platformversion: MrmPlatformVersion, defaultqualifiers: P2, prifile: P3, indexer: *mut MrmResourceIndexerHandle) -> windows_core::Result<()> @@ -1660,7 +1660,7 @@ where P3: windows_core::Param, { windows_targets::link!("mrmsupport.dll" "system" fn MrmCreateResourceIndexerFromPreviousPriFile(projectroot : windows_core::PCWSTR, platformversion : MrmPlatformVersion, defaultqualifiers : windows_core::PCWSTR, prifile : windows_core::PCWSTR, indexer : *mut MrmResourceIndexerHandle) -> windows_core::HRESULT); - unsafe { MrmCreateResourceIndexerFromPreviousPriFile(projectroot.param().abi(), platformversion, defaultqualifiers.param().abi(), prifile.param().abi(), core::mem::transmute(indexer)).ok() } + unsafe { MrmCreateResourceIndexerFromPreviousPriFile(projectroot.param().abi(), platformversion, defaultqualifiers.param().abi(), prifile.param().abi(), indexer as _).ok() } } #[inline] pub unsafe fn MrmCreateResourceIndexerFromPreviousSchemaData(projectroot: P0, platformversion: MrmPlatformVersion, defaultqualifiers: P2, schemaxmldata: &[u8], indexer: *mut MrmResourceIndexerHandle) -> windows_core::Result<()> @@ -1669,7 +1669,7 @@ where P2: windows_core::Param, { windows_targets::link!("mrmsupport.dll" "system" fn MrmCreateResourceIndexerFromPreviousSchemaData(projectroot : windows_core::PCWSTR, platformversion : MrmPlatformVersion, defaultqualifiers : windows_core::PCWSTR, schemaxmldata : *const u8, schemaxmlsize : u32, indexer : *mut MrmResourceIndexerHandle) -> windows_core::HRESULT); - unsafe { MrmCreateResourceIndexerFromPreviousSchemaData(projectroot.param().abi(), platformversion, defaultqualifiers.param().abi(), core::mem::transmute(schemaxmldata.as_ptr()), schemaxmldata.len().try_into().unwrap(), core::mem::transmute(indexer)).ok() } + unsafe { MrmCreateResourceIndexerFromPreviousSchemaData(projectroot.param().abi(), platformversion, defaultqualifiers.param().abi(), core::mem::transmute(schemaxmldata.as_ptr()), schemaxmldata.len().try_into().unwrap(), indexer as _).ok() } } #[inline] pub unsafe fn MrmCreateResourceIndexerFromPreviousSchemaFile(projectroot: P0, platformversion: MrmPlatformVersion, defaultqualifiers: P2, schemafile: P3, indexer: *mut MrmResourceIndexerHandle) -> windows_core::Result<()> @@ -1679,7 +1679,7 @@ where P3: windows_core::Param, { windows_targets::link!("mrmsupport.dll" "system" fn MrmCreateResourceIndexerFromPreviousSchemaFile(projectroot : windows_core::PCWSTR, platformversion : MrmPlatformVersion, defaultqualifiers : windows_core::PCWSTR, schemafile : windows_core::PCWSTR, indexer : *mut MrmResourceIndexerHandle) -> windows_core::HRESULT); - unsafe { MrmCreateResourceIndexerFromPreviousSchemaFile(projectroot.param().abi(), platformversion, defaultqualifiers.param().abi(), schemafile.param().abi(), core::mem::transmute(indexer)).ok() } + unsafe { MrmCreateResourceIndexerFromPreviousSchemaFile(projectroot.param().abi(), platformversion, defaultqualifiers.param().abi(), schemafile.param().abi(), indexer as _).ok() } } #[inline] pub unsafe fn MrmCreateResourceIndexerWithFlags(packagefamilyname: P0, projectroot: P1, platformversion: MrmPlatformVersion, defaultqualifiers: P3, flags: MrmIndexerFlags, indexer: *mut MrmResourceIndexerHandle) -> windows_core::Result<()> @@ -1689,7 +1689,7 @@ where P3: windows_core::Param, { windows_targets::link!("mrmsupport.dll" "system" fn MrmCreateResourceIndexerWithFlags(packagefamilyname : windows_core::PCWSTR, projectroot : windows_core::PCWSTR, platformversion : MrmPlatformVersion, defaultqualifiers : windows_core::PCWSTR, flags : MrmIndexerFlags, indexer : *mut MrmResourceIndexerHandle) -> windows_core::HRESULT); - unsafe { MrmCreateResourceIndexerWithFlags(packagefamilyname.param().abi(), projectroot.param().abi(), platformversion, defaultqualifiers.param().abi(), flags, core::mem::transmute(indexer)).ok() } + unsafe { MrmCreateResourceIndexerWithFlags(packagefamilyname.param().abi(), projectroot.param().abi(), platformversion, defaultqualifiers.param().abi(), flags, indexer as _).ok() } } #[inline] pub unsafe fn MrmDestroyIndexerAndMessages(indexer: MrmResourceIndexerHandle) -> windows_core::Result<()> { @@ -1699,7 +1699,7 @@ pub unsafe fn MrmDestroyIndexerAndMessages(indexer: MrmResourceIndexerHandle) -> #[inline] pub unsafe fn MrmDumpPriDataInMemory(inputpridata: &[u8], schemapridata: Option<&[u8]>, dumptype: MrmDumpType, outputxmldata: *mut *mut u8, outputxmlsize: *mut u32) -> windows_core::Result<()> { windows_targets::link!("mrmsupport.dll" "system" fn MrmDumpPriDataInMemory(inputpridata : *const u8, inputprisize : u32, schemapridata : *const u8, schemaprisize : u32, dumptype : MrmDumpType, outputxmldata : *mut *mut u8, outputxmlsize : *mut u32) -> windows_core::HRESULT); - unsafe { MrmDumpPriDataInMemory(core::mem::transmute(inputpridata.as_ptr()), inputpridata.len().try_into().unwrap(), core::mem::transmute(schemapridata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), schemapridata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dumptype, core::mem::transmute(outputxmldata), core::mem::transmute(outputxmlsize)).ok() } + unsafe { MrmDumpPriDataInMemory(core::mem::transmute(inputpridata.as_ptr()), inputpridata.len().try_into().unwrap(), core::mem::transmute(schemapridata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), schemapridata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dumptype, outputxmldata as _, outputxmlsize as _).ok() } } #[inline] pub unsafe fn MrmDumpPriFile(indexfilename: P0, schemaprifile: P1, dumptype: MrmDumpType, outputxmlfile: P3) -> windows_core::Result<()> @@ -1718,7 +1718,7 @@ where P1: windows_core::Param, { windows_targets::link!("mrmsupport.dll" "system" fn MrmDumpPriFileInMemory(indexfilename : windows_core::PCWSTR, schemaprifile : windows_core::PCWSTR, dumptype : MrmDumpType, outputxmldata : *mut *mut u8, outputxmlsize : *mut u32) -> windows_core::HRESULT); - unsafe { MrmDumpPriFileInMemory(indexfilename.param().abi(), schemaprifile.param().abi(), dumptype, core::mem::transmute(outputxmldata), core::mem::transmute(outputxmlsize)).ok() } + unsafe { MrmDumpPriFileInMemory(indexfilename.param().abi(), schemaprifile.param().abi(), dumptype, outputxmldata as _, outputxmlsize as _).ok() } } #[inline] pub unsafe fn MrmFreeMemory(data: *const u8) -> windows_core::Result<()> { @@ -1784,7 +1784,7 @@ where #[inline] pub unsafe fn MrmPeekResourceIndexerMessages(handle: MrmResourceIndexerHandle, messages: *mut *mut MrmResourceIndexerMessage, nummsgs: *mut u32) -> windows_core::Result<()> { windows_targets::link!("mrmsupport.dll" "system" fn MrmPeekResourceIndexerMessages(handle : MrmResourceIndexerHandle, messages : *mut *mut MrmResourceIndexerMessage, nummsgs : *mut u32) -> windows_core::HRESULT); - unsafe { MrmPeekResourceIndexerMessages(core::mem::transmute(handle), core::mem::transmute(messages), core::mem::transmute(nummsgs)).ok() } + unsafe { MrmPeekResourceIndexerMessages(core::mem::transmute(handle), messages as _, nummsgs as _).ok() } } #[inline] pub unsafe fn MsgWaitForMultipleObjects(phandles: Option<&[super::super::Foundation::HANDLE]>, fwaitall: bool, dwmilliseconds: u32, dwwakemask: QUEUE_STATUS_FLAGS) -> super::super::Foundation::WAIT_EVENT { @@ -1836,27 +1836,27 @@ pub unsafe fn OpenIcon(hwnd: super::super::Foundation::HWND) -> windows_core::Re #[inline] 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); - unsafe { PeekMessageA(core::mem::transmute(lpmsg), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), wmsgfiltermin, wmsgfiltermax, wremovemsg) } + unsafe { PeekMessageA(lpmsg as _, hwnd.unwrap_or(core::mem::zeroed()) as _, wmsgfiltermin, wmsgfiltermax, wremovemsg) } } #[inline] 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); - unsafe { PeekMessageW(core::mem::transmute(lpmsg), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), wmsgfiltermin, wmsgfiltermax, wremovemsg) } + unsafe { PeekMessageW(lpmsg as _, hwnd.unwrap_or(core::mem::zeroed()) as _, wmsgfiltermin, wmsgfiltermax, wremovemsg) } } #[inline] 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); - unsafe { PhysicalToLogicalPoint(hwnd, core::mem::transmute(lppoint)) } + unsafe { PhysicalToLogicalPoint(hwnd, lppoint as _) } } #[inline] 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); - unsafe { PostMessageA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), msg, wparam, lparam).ok() } + unsafe { PostMessageA(hwnd.unwrap_or(core::mem::zeroed()) as _, msg, wparam, lparam).ok() } } #[inline] 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); - unsafe { PostMessageW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), msg, wparam, lparam).ok() } + unsafe { PostMessageW(hwnd.unwrap_or(core::mem::zeroed()) as _, msg, wparam, lparam).ok() } } #[inline] pub unsafe fn PostQuitMessage(nexitcode: i32) { @@ -1876,12 +1876,12 @@ pub unsafe fn PostThreadMessageW(idthread: u32, msg: u32, wparam: super::super:: #[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); - unsafe { PrivateExtractIconsA(core::mem::transmute(szfilename.as_ptr()), niconindex, cxicon, cyicon, core::mem::transmute(phicon.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(piconid.unwrap_or(core::mem::zeroed())), phicon.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags) } + unsafe { PrivateExtractIconsA(core::mem::transmute(szfilename.as_ptr()), niconindex, cxicon, cyicon, core::mem::transmute(phicon.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), piconid.unwrap_or(core::mem::zeroed()) as _, phicon.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags) } } #[inline] pub unsafe fn PrivateExtractIconsW(szfilename: &[u16; 260], niconindex: i32, cxicon: i32, cyicon: i32, phicon: Option<&mut [HICON]>, piconid: Option<*mut u32>, flags: u32) -> u32 { windows_targets::link!("user32.dll" "system" fn PrivateExtractIconsW(szfilename : windows_core::PCWSTR, niconindex : i32, cxicon : i32, cyicon : i32, phicon : *mut HICON, piconid : *mut u32, nicons : u32, flags : u32) -> u32); - unsafe { PrivateExtractIconsW(core::mem::transmute(szfilename.as_ptr()), niconindex, cxicon, cyicon, core::mem::transmute(phicon.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(piconid.unwrap_or(core::mem::zeroed())), phicon.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags) } + unsafe { PrivateExtractIconsW(core::mem::transmute(szfilename.as_ptr()), niconindex, cxicon, cyicon, core::mem::transmute(phicon.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), piconid.unwrap_or(core::mem::zeroed()) as _, phicon.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags) } } #[inline] pub unsafe fn RealChildWindowFromPoint(hwndparent: super::super::Foundation::HWND, ptparentclientcoords: super::super::Foundation::POINT) -> super::super::Foundation::HWND { @@ -1992,18 +1992,18 @@ pub unsafe fn ReplyMessage(lresult: super::super::Foundation::LRESULT) -> super: #[inline] 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); - unsafe { ScrollDC(hdc, dx, 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() } + unsafe { ScrollDC(hdc, dx, dy, lprcscroll.unwrap_or(core::mem::zeroed()) as _, lprcclip.unwrap_or(core::mem::zeroed()) as _, hrgnupdate.unwrap_or(core::mem::zeroed()) as _, lprcupdate.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] 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); - unsafe { ScrollWindow(hwnd, xamount, yamount, core::mem::transmute(lprect.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcliprect.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ScrollWindow(hwnd, xamount, yamount, lprect.unwrap_or(core::mem::zeroed()) as _, lpcliprect.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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); - unsafe { ScrollWindowEx(hwnd, dx, 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())), flags) } + unsafe { ScrollWindowEx(hwnd, dx, dy, prcscroll.unwrap_or(core::mem::zeroed()) as _, prcclip.unwrap_or(core::mem::zeroed()) as _, hrgnupdate.unwrap_or(core::mem::zeroed()) as _, prcupdate.unwrap_or(core::mem::zeroed()) as _, flags) } } #[inline] 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 { @@ -2033,17 +2033,17 @@ pub unsafe fn SendMessageCallbackW(hwnd: super::super::Foundation::HWND, msg: u3 #[inline] 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); - unsafe { SendMessageTimeoutA(hwnd, msg, wparam, lparam, fuflags, utimeout, core::mem::transmute(lpdwresult.unwrap_or(core::mem::zeroed()))) } + unsafe { SendMessageTimeoutA(hwnd, msg, wparam, lparam, fuflags, utimeout, lpdwresult.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { SendMessageTimeoutW(hwnd, msg, wparam, lparam, fuflags, utimeout, core::mem::transmute(lpdwresult.unwrap_or(core::mem::zeroed()))) } + unsafe { SendMessageTimeoutW(hwnd, msg, wparam, lparam, fuflags, utimeout, lpdwresult.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { SendMessageW(hwnd, msg, core::mem::transmute(wparam.unwrap_or(core::mem::zeroed())), core::mem::transmute(lparam.unwrap_or(core::mem::zeroed()))) } + unsafe { SendMessageW(hwnd, msg, wparam.unwrap_or(core::mem::zeroed()) as _, lparam.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SendNotifyMessageA(hwnd: super::super::Foundation::HWND, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { @@ -2100,12 +2100,12 @@ pub unsafe fn SetClassWord(hwnd: super::super::Foundation::HWND, nindex: i32, wn #[inline] 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); - unsafe { SetCoalescableTimer(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), nidevent, uelapse, core::mem::transmute(lptimerfunc.unwrap_or(core::mem::zeroed())), utolerancedelay) } + unsafe { SetCoalescableTimer(hwnd.unwrap_or(core::mem::zeroed()) as _, nidevent, uelapse, lptimerfunc.unwrap_or(core::mem::zeroed()) as _, utolerancedelay) } } #[inline] pub unsafe fn SetCursor(hcursor: Option) -> HCURSOR { windows_targets::link!("user32.dll" "system" fn SetCursor(hcursor : HCURSOR) -> HCURSOR); - unsafe { SetCursor(core::mem::transmute(hcursor.unwrap_or(core::mem::zeroed()))) } + unsafe { SetCursor(hcursor.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SetCursorPos(x: i32, y: i32) -> windows_core::Result<()> { @@ -2151,7 +2151,7 @@ pub unsafe fn SetLayeredWindowAttributes(hwnd: super::super::Foundation::HWND, c #[inline] 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); - unsafe { SetMenu(hwnd, core::mem::transmute(hmenu.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetMenu(hwnd, hmenu.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetMenuDefaultItem(hmenu: HMENU, uitem: u32, fbypos: u32) -> windows_core::Result<()> { @@ -2168,7 +2168,7 @@ pub unsafe fn SetMenuInfo(param0: HMENU, param1: *const MENUINFO) -> windows_cor #[inline] 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); - unsafe { SetMenuItemBitmaps(hmenu, uposition, uflags, core::mem::transmute(hbitmapunchecked.unwrap_or(core::mem::zeroed())), core::mem::transmute(hbitmapchecked.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetMenuItemBitmaps(hmenu, uposition, uflags, hbitmapunchecked.unwrap_or(core::mem::zeroed()) as _, hbitmapchecked.unwrap_or(core::mem::zeroed()) as _).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -2195,7 +2195,7 @@ pub unsafe fn SetMessageQueue(cmessagesmax: i32) -> super::super::Foundation::BO #[inline] 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__ = unsafe { SetParent(hwndchild, core::mem::transmute(hwndnewparent.unwrap_or(core::mem::zeroed()))) }; + let result__ = unsafe { SetParent(hwndchild, hwndnewparent.unwrap_or(core::mem::zeroed()) as _) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -2219,7 +2219,7 @@ where P1: 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); - unsafe { SetPropA(hwnd, lpstring.param().abi(), core::mem::transmute(hdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetPropA(hwnd, lpstring.param().abi(), hdata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetPropW(hwnd: super::super::Foundation::HWND, lpstring: P1, hdata: Option) -> windows_core::Result<()> @@ -2227,7 +2227,7 @@ where P1: 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); - unsafe { SetPropW(hwnd, lpstring.param().abi(), core::mem::transmute(hdata.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { SetPropW(hwnd, lpstring.param().abi(), hdata.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn SetSystemCursor(hcur: HCURSOR, id: SYSTEM_CURSOR_ID) -> windows_core::Result<()> { @@ -2237,7 +2237,7 @@ pub unsafe fn SetSystemCursor(hcur: HCURSOR, id: SYSTEM_CURSOR_ID) -> windows_co #[inline] 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); - unsafe { SetTimer(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), nidevent, uelapse, core::mem::transmute(lptimerfunc.unwrap_or(core::mem::zeroed()))) } + unsafe { SetTimer(hwnd.unwrap_or(core::mem::zeroed()) as _, nidevent, uelapse, lptimerfunc.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn SetWindowDisplayAffinity(hwnd: super::super::Foundation::HWND, dwaffinity: WINDOW_DISPLAY_AFFINITY) -> windows_core::Result<()> { @@ -2278,7 +2278,7 @@ pub unsafe fn SetWindowPlacement(hwnd: super::super::Foundation::HWND, lpwndpl: #[inline] 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); - unsafe { SetWindowPos(hwnd, core::mem::transmute(hwndinsertafter.unwrap_or(core::mem::zeroed())), x, y, cx, cy, uflags).ok() } + unsafe { SetWindowPos(hwnd, hwndinsertafter.unwrap_or(core::mem::zeroed()) as _, x, y, cx, cy, uflags).ok() } } #[inline] pub unsafe fn SetWindowTextA(hwnd: super::super::Foundation::HWND, lpstring: P1) -> windows_core::Result<()> @@ -2309,13 +2309,13 @@ pub unsafe fn SetWindowsHookA(nfiltertype: i32, pfnfilterproc: HOOKPROC) -> HHOO #[inline] 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__ = unsafe { SetWindowsHookExA(idhook, lpfn, core::mem::transmute(hmod.unwrap_or(core::mem::zeroed())), dwthreadid) }; + let result__ = unsafe { SetWindowsHookExA(idhook, lpfn, hmod.unwrap_or(core::mem::zeroed()) as _, 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: 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__ = unsafe { SetWindowsHookExW(idhook, lpfn, core::mem::transmute(hmod.unwrap_or(core::mem::zeroed())), dwthreadid) }; + let result__ = unsafe { SetWindowsHookExW(idhook, lpfn, hmod.unwrap_or(core::mem::zeroed()) as _, dwthreadid) }; (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -2326,7 +2326,7 @@ pub unsafe fn SetWindowsHookW(nfiltertype: i32, pfnfilterproc: HOOKPROC) -> HHOO #[inline] 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); - unsafe { ShowCaret(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { ShowCaret(hwnd.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn ShowCursor(bshow: bool) -> i32 { @@ -2361,27 +2361,27 @@ pub unsafe fn SwitchToThisWindow(hwnd: super::super::Foundation::HWND, funknown: #[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); - unsafe { SystemParametersInfoA(uiaction, uiparam, core::mem::transmute(pvparam.unwrap_or(core::mem::zeroed())), fwinini).ok() } + unsafe { SystemParametersInfoA(uiaction, uiparam, pvparam.unwrap_or(core::mem::zeroed()) as _, 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); - unsafe { SystemParametersInfoW(uiaction, uiparam, core::mem::transmute(pvparam.unwrap_or(core::mem::zeroed())), fwinini).ok() } + unsafe { SystemParametersInfoW(uiaction, uiparam, pvparam.unwrap_or(core::mem::zeroed()) as _, fwinini).ok() } } #[inline] 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); - unsafe { TileWindows(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), 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()))) } + unsafe { TileWindows(hwndparent.unwrap_or(core::mem::zeroed()) as _, whow, lprect.unwrap_or(core::mem::zeroed()) as _, 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: 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); - unsafe { TrackPopupMenu(hmenu, uflags, x, y, core::mem::transmute(nreserved.unwrap_or(core::mem::zeroed())), hwnd, core::mem::transmute(prcrect.unwrap_or(core::mem::zeroed()))) } + unsafe { TrackPopupMenu(hmenu, uflags, x, y, nreserved.unwrap_or(core::mem::zeroed()) as _, hwnd, prcrect.unwrap_or(core::mem::zeroed()) as _) } } #[inline] 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); - unsafe { TrackPopupMenuEx(hmenu, uflags, x, y, hwnd, core::mem::transmute(lptpm.unwrap_or(core::mem::zeroed()))) } + unsafe { TrackPopupMenuEx(hmenu, uflags, x, y, hwnd, lptpm.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn TranslateAcceleratorA(hwnd: super::super::Foundation::HWND, hacctable: HACCEL, lpmsg: *const MSG) -> i32 { @@ -2419,7 +2419,7 @@ where P0: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn UnregisterClassA(lpclassname : windows_core::PCSTR, hinstance : super::super::Foundation:: HINSTANCE) -> super::super::Foundation:: BOOL); - unsafe { UnregisterClassA(lpclassname.param().abi(), core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { UnregisterClassA(lpclassname.param().abi(), hinstance.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn UnregisterClassW(lpclassname: P0, hinstance: Option) -> windows_core::Result<()> @@ -2427,7 +2427,7 @@ where P0: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn UnregisterClassW(lpclassname : windows_core::PCWSTR, hinstance : super::super::Foundation:: HINSTANCE) -> super::super::Foundation:: BOOL); - unsafe { UnregisterClassW(lpclassname.param().abi(), core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { UnregisterClassW(lpclassname.param().abi(), hinstance.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn UnregisterDeviceNotification(handle: HDEVNOTIFY) -> windows_core::Result<()> { @@ -2438,7 +2438,7 @@ pub unsafe fn UnregisterDeviceNotification(handle: HDEVNOTIFY) -> windows_core:: #[inline] 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); - unsafe { UpdateLayeredWindow(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())), crkey, core::mem::transmute(pblend.unwrap_or(core::mem::zeroed())), dwflags).ok() } + unsafe { UpdateLayeredWindow(hwnd, hdcdst.unwrap_or(core::mem::zeroed()) as _, pptdst.unwrap_or(core::mem::zeroed()) as _, psize.unwrap_or(core::mem::zeroed()) as _, hdcsrc.unwrap_or(core::mem::zeroed()) as _, pptsrc.unwrap_or(core::mem::zeroed()) as _, crkey, pblend.unwrap_or(core::mem::zeroed()) as _, dwflags).ok() } } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] 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 294e9e4373..cde65a9054 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Wpf/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Wpf/mod.rs @@ -755,7 +755,7 @@ impl IMILBitmapEffectImpl { } } pub unsafe fn GetInputSourceBounds(&self, uiindex: u32, prect: *mut MilRectD) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetInputSourceBounds)(windows_core::Interface::as_raw(self), uiindex, core::mem::transmute(prect)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetInputSourceBounds)(windows_core::Interface::as_raw(self), uiindex, prect as _).ok() } } #[cfg(feature = "Win32_Graphics_Imaging")] pub unsafe fn GetInputBitmapSource(&self, uiindex: u32, prendercontext: P1, pfmodifyinplace: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result @@ -764,7 +764,7 @@ impl IMILBitmapEffectImpl { { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetInputBitmapSource)(windows_core::Interface::as_raw(self), uiindex, prendercontext.param().abi(), core::mem::transmute(pfmodifyinplace), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetInputBitmapSource)(windows_core::Interface::as_raw(self), uiindex, prendercontext.param().abi(), pfmodifyinplace as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_Graphics_Imaging")] @@ -774,7 +774,7 @@ impl IMILBitmapEffectImpl { { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetOutputBitmapSource)(windows_core::Interface::as_raw(self), uiindex, prendercontext.param().abi(), core::mem::transmute(pfmodifyinplace), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetOutputBitmapSource)(windows_core::Interface::as_raw(self), uiindex, prendercontext.param().abi(), pfmodifyinplace as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } pub unsafe fn Initialize(&self, pinner: P0) -> windows_core::Result<()> @@ -1171,20 +1171,20 @@ impl IMILBitmapEffectPrimitive { { unsafe { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetOutput)(windows_core::Interface::as_raw(self), uiindex, pcontext.param().abi(), core::mem::transmute(pfmodifyinplace), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetOutput)(windows_core::Interface::as_raw(self), uiindex, pcontext.param().abi(), pfmodifyinplace as _, &mut result__).and_then(|| windows_core::Type::from_abi(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 P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).TransformPoint)(windows_core::Interface::as_raw(self), uiindex, core::mem::transmute(p), fforwardtransform, pcontext.param().abi(), core::mem::transmute(pfpointtransformed)).ok() } + unsafe { (windows_core::Interface::vtable(self).TransformPoint)(windows_core::Interface::as_raw(self), uiindex, p as _, fforwardtransform, pcontext.param().abi(), pfpointtransformed as _).ok() } } pub unsafe fn TransformRect(&self, uiindex: u32, p: *mut MilRectD, fforwardtransform: super::super::Foundation::VARIANT_BOOL, pcontext: P3) -> windows_core::Result<()> where P3: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).TransformRect)(windows_core::Interface::as_raw(self), uiindex, core::mem::transmute(p), fforwardtransform, pcontext.param().abi()).ok() } + unsafe { (windows_core::Interface::vtable(self).TransformRect)(windows_core::Interface::as_raw(self), uiindex, p as _, fforwardtransform, pcontext.param().abi()).ok() } } pub unsafe fn HasAffineTransform(&self, uiindex: u32) -> windows_core::Result { unsafe { @@ -1200,7 +1200,7 @@ impl IMILBitmapEffectPrimitive { } #[cfg(feature = "Win32_Graphics_Dwm")] pub unsafe fn GetAffineMatrix(&self, uiindex: u32, pmatrix: *mut super::super::Graphics::Dwm::MilMatrix3x2D) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetAffineMatrix)(windows_core::Interface::as_raw(self), uiindex, core::mem::transmute(pmatrix)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetAffineMatrix)(windows_core::Interface::as_raw(self), uiindex, pmatrix as _).ok() } } } #[repr(C)] @@ -1305,7 +1305,7 @@ windows_core::imp::define_interface!(IMILBitmapEffectPrimitiveImpl, IMILBitmapEf windows_core::imp::interface_hierarchy!(IMILBitmapEffectPrimitiveImpl, windows_core::IUnknown); impl IMILBitmapEffectPrimitiveImpl { pub unsafe fn IsDirty(&self, uioutputindex: u32, pfdirty: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { - unsafe { (windows_core::Interface::vtable(self).IsDirty)(windows_core::Interface::as_raw(self), uioutputindex, core::mem::transmute(pfdirty)) } + unsafe { (windows_core::Interface::vtable(self).IsDirty)(windows_core::Interface::as_raw(self), uioutputindex, pfdirty as _) } } pub unsafe fn IsVolatile(&self, uioutputindex: u32) -> windows_core::Result { unsafe { @@ -1370,13 +1370,13 @@ impl IMILBitmapEffectRenderContext { unsafe { (windows_core::Interface::vtable(self).SetInitialTransform)(windows_core::Interface::as_raw(self), pmatrix).ok() } } pub unsafe fn GetFinalTransform(&self, pmatrix: *mut MILMatrixF) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFinalTransform)(windows_core::Interface::as_raw(self), core::mem::transmute(pmatrix)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFinalTransform)(windows_core::Interface::as_raw(self), pmatrix as _).ok() } } pub unsafe fn SetOutputDPI(&self, dbldpix: f64, dbldpiy: f64) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetOutputDPI)(windows_core::Interface::as_raw(self), dbldpix, dbldpiy).ok() } } pub unsafe fn GetOutputDPI(&self, pdbldpix: *mut f64, pdbldpiy: *mut f64) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOutputDPI)(windows_core::Interface::as_raw(self), core::mem::transmute(pdbldpix), core::mem::transmute(pdbldpiy)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOutputDPI)(windows_core::Interface::as_raw(self), pdbldpix as _, pdbldpiy as _).ok() } } pub unsafe fn SetRegionOfInterest(&self, prect: *const MilRectD) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).SetRegionOfInterest)(windows_core::Interface::as_raw(self), prect).ok() } @@ -1487,13 +1487,13 @@ impl IMILBitmapEffectRenderContextImpl { } } pub unsafe fn GetTransform(&self, pmatrix: *mut MILMatrixF) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetTransform)(windows_core::Interface::as_raw(self), core::mem::transmute(pmatrix)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetTransform)(windows_core::Interface::as_raw(self), pmatrix as _).ok() } } pub unsafe fn UpdateTransform(&self, pmatrix: *const MILMatrixF) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UpdateTransform)(windows_core::Interface::as_raw(self), pmatrix).ok() } } pub unsafe fn GetOutputBounds(&self, prect: *mut MilRectD) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetOutputBounds)(windows_core::Interface::as_raw(self), core::mem::transmute(prect)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetOutputBounds)(windows_core::Interface::as_raw(self), prect as _).ok() } } pub unsafe fn UpdateOutputBounds(&self, prect: *const MilRectD) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).UpdateOutputBounds)(windows_core::Interface::as_raw(self), prect).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 d585f79693..cc708bb239 100644 --- a/crates/libs/windows/src/Windows/Win32/Web/InternetExplorer/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Web/InternetExplorer/mod.rs @@ -2,7 +2,7 @@ #[inline] pub unsafe fn ComputeInvCMAP(prgbcolors: *const super::super::Graphics::Gdi::RGBQUAD, ncolors: u32, pinvtable: *mut u8, cbtable: u32) -> windows_core::Result<()> { windows_targets::link!("imgutil.dll" "system" fn ComputeInvCMAP(prgbcolors : *const super::super::Graphics::Gdi:: RGBQUAD, ncolors : u32, pinvtable : *mut u8, cbtable : u32) -> windows_core::HRESULT); - unsafe { ComputeInvCMAP(prgbcolors, ncolors, core::mem::transmute(pinvtable), cbtable).ok() } + unsafe { ComputeInvCMAP(prgbcolors, ncolors, pinvtable as _, cbtable).ok() } } #[cfg(all(feature = "Win32_Graphics_DirectDraw", feature = "Win32_Graphics_Gdi"))] #[inline] @@ -48,12 +48,12 @@ where #[inline] pub unsafe fn DitherTo8(pdestbits: *mut u8, ndestpitch: i32, psrcbits: *mut u8, nsrcpitch: i32, bfidsrc: *const windows_core::GUID, prgbdestcolors: *mut super::super::Graphics::Gdi::RGBQUAD, prgbsrccolors: *mut super::super::Graphics::Gdi::RGBQUAD, pbdestinvmap: *mut u8, x: i32, y: i32, cx: i32, cy: i32, ldesttrans: i32, lsrctrans: i32) -> windows_core::Result<()> { windows_targets::link!("imgutil.dll" "system" fn DitherTo8(pdestbits : *mut u8, ndestpitch : i32, psrcbits : *mut u8, nsrcpitch : i32, bfidsrc : *const windows_core::GUID, prgbdestcolors : *mut super::super::Graphics::Gdi:: RGBQUAD, prgbsrccolors : *mut super::super::Graphics::Gdi:: RGBQUAD, pbdestinvmap : *mut u8, x : i32, y : i32, cx : i32, cy : i32, ldesttrans : i32, lsrctrans : i32) -> windows_core::HRESULT); - unsafe { DitherTo8(core::mem::transmute(pdestbits), ndestpitch, core::mem::transmute(psrcbits), nsrcpitch, bfidsrc, core::mem::transmute(prgbdestcolors), core::mem::transmute(prgbsrccolors), core::mem::transmute(pbdestinvmap), x, y, cx, cy, ldesttrans, lsrctrans).ok() } + unsafe { DitherTo8(pdestbits as _, ndestpitch, psrcbits as _, nsrcpitch, bfidsrc, prgbdestcolors as _, prgbsrccolors as _, pbdestinvmap as _, x, y, cx, cy, ldesttrans, lsrctrans).ok() } } #[inline] pub unsafe fn GetMaxMIMEIDBytes(pnmaxbytes: *mut u32) -> windows_core::Result<()> { windows_targets::link!("imgutil.dll" "system" fn GetMaxMIMEIDBytes(pnmaxbytes : *mut u32) -> windows_core::HRESULT); - unsafe { GetMaxMIMEIDBytes(core::mem::transmute(pnmaxbytes)).ok() } + unsafe { GetMaxMIMEIDBytes(pnmaxbytes as _).ok() } } #[inline] pub unsafe fn IEAssociateThreadWithTab(dwtabthreadid: u32, dwassociatedthreadid: u32) -> windows_core::Result<()> { @@ -81,7 +81,7 @@ where P0: 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); - unsafe { IECreateFile(lpfilename.param().abi(), dwdesiredaccess, dwsharemode, lpsecurityattributes, dwcreationdisposition, dwflagsandattributes, core::mem::transmute(htemplatefile.unwrap_or(core::mem::zeroed()))) } + unsafe { IECreateFile(lpfilename.param().abi(), dwdesiredaccess, dwsharemode, lpsecurityattributes, dwcreationdisposition, dwflagsandattributes, htemplatefile.unwrap_or(core::mem::zeroed()) as _) } } #[inline] pub unsafe fn IEDeleteFile(lpfilename: P0) -> super::super::Foundation::BOOL @@ -121,7 +121,7 @@ where P1: windows_core::Param, { windows_targets::link!("ieframe.dll" "system" fn IEGetProtectedModeCookie(lpszurl : windows_core::PCWSTR, lpszcookiename : windows_core::PCWSTR, lpszcookiedata : windows_core::PWSTR, pcchcookiedata : *mut u32, dwflags : u32) -> windows_core::HRESULT); - unsafe { IEGetProtectedModeCookie(lpszurl.param().abi(), lpszcookiename.param().abi(), core::mem::transmute(lpszcookiedata), core::mem::transmute(pcchcookiedata), dwflags).ok() } + unsafe { IEGetProtectedModeCookie(lpszurl.param().abi(), lpszcookiename.param().abi(), core::mem::transmute(lpszcookiedata), pcchcookiedata as _, dwflags).ok() } } #[inline] pub unsafe fn IEGetWriteableFolderPath(clsidfolderid: *const windows_core::GUID) -> windows_core::Result { @@ -173,7 +173,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); - unsafe { IELaunchURL(lpwstrurl.param().abi(), core::mem::transmute(lpprocinfo), core::mem::transmute(lpinfo.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { IELaunchURL(lpwstrurl.param().abi(), lpprocinfo as _, lpinfo.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn IEMoveFileEx(lpexistingfilename: P0, lpnewfilename: P1, dwflags: u32) -> super::super::Foundation::BOOL @@ -197,7 +197,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); - unsafe { IERegCreateKeyEx(lpsubkey.param().abi(), reserved, lpclass.param().abi(), dwoptions, samdesired, core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(phkresult), core::mem::transmute(lpdwdisposition)).ok() } + unsafe { IERegCreateKeyEx(lpsubkey.param().abi(), reserved, lpclass.param().abi(), dwoptions, samdesired, lpsecurityattributes.unwrap_or(core::mem::zeroed()) as _, phkresult as _, lpdwdisposition as _).ok() } } #[inline] pub unsafe fn IERegSetValueEx(lpsubkey: P0, lpvaluename: P1, reserved: u32, dwtype: u32, lpdata: &[u8]) -> windows_core::Result<()> @@ -259,7 +259,7 @@ where 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); - unsafe { IEShowOpenFileDialog(hwnd, core::mem::transmute(lpwstrfilename.as_ptr()), lpwstrfilename.len().try_into().unwrap(), lpwstrinitialdir.param().abi(), lpwstrfilter.param().abi(), lpwstrdefext.param().abi(), dwfilterindex, dwflags, core::mem::transmute(phfile)).ok() } + unsafe { IEShowOpenFileDialog(hwnd, core::mem::transmute(lpwstrfilename.as_ptr()), lpwstrfilename.len().try_into().unwrap(), lpwstrinitialdir.param().abi(), lpwstrfilter.param().abi(), lpwstrdefext.param().abi(), dwfilterindex, dwflags, phfile as _).ok() } } #[inline] 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<()> @@ -270,7 +270,7 @@ where 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); - unsafe { IEShowSaveFileDialog(hwnd, lpwstrinitialfilename.param().abi(), lpwstrinitialdir.param().abi(), lpwstrfilter.param().abi(), lpwstrdefext.param().abi(), dwfilterindex, dwflags, core::mem::transmute(lppwstrdestinationfilepath), core::mem::transmute(phstate)).ok() } + unsafe { IEShowSaveFileDialog(hwnd, lpwstrinitialfilename.param().abi(), lpwstrinitialdir.param().abi(), lpwstrfilter.param().abi(), lpwstrdefext.param().abi(), dwfilterindex, dwflags, lppwstrdestinationfilepath as _, phstate as _).ok() } } #[inline] pub unsafe fn IETrackingProtectionEnabled() -> super::super::Foundation::BOOL { @@ -285,7 +285,7 @@ pub unsafe fn IEUnregisterWritableRegistry(guid: windows_core::GUID) -> windows_ #[inline] pub unsafe fn IdentifyMIMEType(pbbytes: *const u8, nbytes: u32, pnformat: *mut u32) -> windows_core::Result<()> { windows_targets::link!("imgutil.dll" "system" fn IdentifyMIMEType(pbbytes : *const u8, nbytes : u32, pnformat : *mut u32) -> windows_core::HRESULT); - unsafe { IdentifyMIMEType(pbbytes, nbytes, core::mem::transmute(pnformat)).ok() } + unsafe { IdentifyMIMEType(pbbytes, nbytes, pnformat as _).ok() } } #[inline] pub unsafe fn RatingAccessDeniedDialog(hdlg: super::super::Foundation::HWND, pszusername: P1, pszcontentdescription: P2, pratingdetails: *mut core::ffi::c_void) -> windows_core::Result<()> @@ -294,7 +294,7 @@ where 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); - unsafe { RatingAccessDeniedDialog(hdlg, pszusername.param().abi(), pszcontentdescription.param().abi(), core::mem::transmute(pratingdetails)).ok() } + unsafe { RatingAccessDeniedDialog(hdlg, pszusername.param().abi(), pszcontentdescription.param().abi(), pratingdetails as _).ok() } } #[inline] pub unsafe fn RatingAccessDeniedDialog2(hdlg: super::super::Foundation::HWND, pszusername: P1, pratingdetails: *mut core::ffi::c_void) -> windows_core::Result<()> @@ -302,7 +302,7 @@ where 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); - unsafe { RatingAccessDeniedDialog2(hdlg, pszusername.param().abi(), core::mem::transmute(pratingdetails)).ok() } + unsafe { RatingAccessDeniedDialog2(hdlg, pszusername.param().abi(), pratingdetails as _).ok() } } #[inline] pub unsafe fn RatingAccessDeniedDialog2W(hdlg: super::super::Foundation::HWND, pszusername: P1, pratingdetails: *mut core::ffi::c_void) -> windows_core::Result<()> @@ -310,7 +310,7 @@ where 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); - unsafe { RatingAccessDeniedDialog2W(hdlg, pszusername.param().abi(), core::mem::transmute(pratingdetails)).ok() } + unsafe { RatingAccessDeniedDialog2W(hdlg, pszusername.param().abi(), pratingdetails as _).ok() } } #[inline] pub unsafe fn RatingAccessDeniedDialogW(hdlg: super::super::Foundation::HWND, pszusername: P1, pszcontentdescription: P2, pratingdetails: *mut core::ffi::c_void) -> windows_core::Result<()> @@ -319,7 +319,7 @@ where 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); - unsafe { RatingAccessDeniedDialogW(hdlg, pszusername.param().abi(), pszcontentdescription.param().abi(), core::mem::transmute(pratingdetails)).ok() } + unsafe { RatingAccessDeniedDialogW(hdlg, pszusername.param().abi(), pszcontentdescription.param().abi(), pratingdetails as _).ok() } } #[inline] pub unsafe fn RatingAddToApprovedSites(hdlg: super::super::Foundation::HWND, pbpasswordblob: &mut [u8], lpszurl: P3, falwaysnever: bool, fsitepage: bool, fapprovedsitesenforced: bool) -> windows_core::Result<()> @@ -337,7 +337,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); - unsafe { 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() } + unsafe { 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()), ppratingdetails.unwrap_or(core::mem::zeroed()) as _).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<()> @@ -347,7 +347,7 @@ where P2: windows_core::Param, { windows_targets::link!("msrating.dll" "system" fn RatingCheckUserAccessW(pszusername : windows_core::PCWSTR, pszurl : windows_core::PCWSTR, pszratinginfo : windows_core::PCWSTR, pdata : *const u8, cbdata : u32, ppratingdetails : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { 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() } + unsafe { 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()), ppratingdetails.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn RatingClickedOnPRFInternal(hwndowner: super::super::Foundation::HWND, param1: super::super::Foundation::HINSTANCE, lpszfilename: P2, nshow: i32) -> windows_core::Result<()> @@ -389,7 +389,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); - unsafe { RatingFreeDetails(core::mem::transmute(pratingdetails.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { RatingFreeDetails(pratingdetails.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn RatingInit() -> windows_core::Result<()> { @@ -407,7 +407,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); - unsafe { RatingObtainQuery(psztargeturl.param().abi(), dwuserdata, fcallback, core::mem::transmute(phratingobtainquery.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { RatingObtainQuery(psztargeturl.param().abi(), dwuserdata, fcallback, phratingobtainquery.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn RatingObtainQueryW(psztargeturl: P0, dwuserdata: u32, fcallback: isize, phratingobtainquery: Option<*mut super::super::Foundation::HANDLE>) -> windows_core::Result<()> @@ -415,7 +415,7 @@ where P0: windows_core::Param, { windows_targets::link!("msrating.dll" "system" fn RatingObtainQueryW(psztargeturl : windows_core::PCWSTR, dwuserdata : u32, fcallback : isize, phratingobtainquery : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - unsafe { RatingObtainQueryW(psztargeturl.param().abi(), dwuserdata, fcallback, core::mem::transmute(phratingobtainquery.unwrap_or(core::mem::zeroed()))).ok() } + unsafe { RatingObtainQueryW(psztargeturl.param().abi(), dwuserdata, fcallback, phratingobtainquery.unwrap_or(core::mem::zeroed()) as _).ok() } } #[inline] pub unsafe fn RatingSetupUI(hdlg: super::super::Foundation::HWND, pszusername: P1) -> windows_core::Result<()> @@ -440,7 +440,7 @@ where P0: windows_core::Param, { windows_targets::link!("imgutil.dll" "system" fn SniffStream(pinstream : * mut core::ffi::c_void, pnformat : *mut u32, ppoutstream : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - unsafe { SniffStream(pinstream.param().abi(), core::mem::transmute(pnformat), core::mem::transmute(ppoutstream)).ok() } + unsafe { SniffStream(pinstream.param().abi(), pnformat as _, core::mem::transmute(ppoutstream)).ok() } } pub const ADDRESSBAND: u32 = 2u32; pub const ADDURL_ADDTOCACHE: ADDURL_FLAG = ADDURL_FLAG(1i32); @@ -843,7 +843,7 @@ impl IActiveXUIHandlerSite3 { { unsafe { let mut result__ = core::mem::zeroed(); - (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(), r#type, &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).MessageBoxW)(windows_core::Interface::as_raw(self), hwnd.unwrap_or(core::mem::zeroed()) as _, text.param().abi(), caption.param().abi(), r#type, &mut result__).map(|| result__) } } } @@ -996,7 +996,7 @@ windows_core::imp::define_interface!(ICaretPositionProvider, ICaretPositionProvi windows_core::imp::interface_hierarchy!(ICaretPositionProvider, windows_core::IUnknown); impl ICaretPositionProvider { pub unsafe fn GetCaretPosition(&self, pptcaret: *mut super::super::Foundation::POINT, pflheight: *mut f32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetCaretPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(pptcaret), core::mem::transmute(pflheight)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetCaretPosition)(windows_core::Interface::as_raw(self), pptcaret as _, pflheight as _).ok() } } } #[repr(C)] @@ -1394,7 +1394,7 @@ windows_core::imp::define_interface!(IEnumManagerFrames, IEnumManagerFrames_Vtbl windows_core::imp::interface_hierarchy!(IEnumManagerFrames, windows_core::IUnknown); impl IEnumManagerFrames { pub unsafe fn Next(&self, ppwindows: &mut [*mut super::super::Foundation::HWND], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppwindows.len().try_into().unwrap(), core::mem::transmute(ppwindows.as_ptr()), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppwindows.len().try_into().unwrap(), core::mem::transmute(ppwindows.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Count(&self) -> windows_core::Result { unsafe { @@ -1493,7 +1493,7 @@ windows_core::imp::define_interface!(IEnumOpenServiceActivity, IEnumOpenServiceA windows_core::imp::interface_hierarchy!(IEnumOpenServiceActivity, windows_core::IUnknown); impl IEnumOpenServiceActivity { pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -1571,7 +1571,7 @@ windows_core::imp::define_interface!(IEnumOpenServiceActivityCategory, IEnumOpen windows_core::imp::interface_hierarchy!(IEnumOpenServiceActivityCategory, windows_core::IUnknown); impl IEnumOpenServiceActivityCategory { pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (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)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -1649,7 +1649,7 @@ windows_core::imp::define_interface!(IEnumSTATURL, IEnumSTATURL_Vtbl, 0x3c374a42 windows_core::imp::interface_hierarchy!(IEnumSTATURL, windows_core::IUnknown); impl IEnumSTATURL { pub unsafe fn Next(&self, celt: u32, rgelt: *mut STATURL, pceltfetched: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(rgelt), core::mem::transmute(pceltfetched)).ok() } + unsafe { (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, rgelt as _, pceltfetched as _).ok() } } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() } @@ -2924,7 +2924,7 @@ impl IImageDecodeEventSink { } } pub unsafe fn OnBeginDecode(&self, pdwevents: *mut u32, pnformats: *mut u32, ppformats: *mut *mut windows_core::GUID) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).OnBeginDecode)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwevents), core::mem::transmute(pnformats), core::mem::transmute(ppformats)).ok() } + unsafe { (windows_core::Interface::vtable(self).OnBeginDecode)(windows_core::Interface::as_raw(self), pdwevents as _, pnformats as _, ppformats as _).ok() } } pub unsafe fn OnBitsComplete(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).OnBitsComplete)(windows_core::Interface::as_raw(self)).ok() } @@ -4899,7 +4899,7 @@ impl ISniffStream { unsafe { (windows_core::Interface::vtable(self).Init)(windows_core::Interface::as_raw(self), pstream.param().abi()).ok() } } pub unsafe fn Peek(&self, pbuffer: *mut core::ffi::c_void, nbytes: u32, pnbytesread: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).Peek)(windows_core::Interface::as_raw(self), core::mem::transmute(pbuffer), nbytes, core::mem::transmute(pnbytesread)).ok() } + unsafe { (windows_core::Interface::vtable(self).Peek)(windows_core::Interface::as_raw(self), pbuffer as _, nbytes, pnbytesread as _).ok() } } } #[repr(C)] @@ -4946,7 +4946,7 @@ impl ISurfacePresenterFlip { unsafe { (windows_core::Interface::vtable(self).Present)(windows_core::Interface::as_raw(self)).ok() } } pub unsafe fn GetBuffer(&self, backbufferindex: u32, riid: *const windows_core::GUID, ppbuffer: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), backbufferindex, riid, core::mem::transmute(ppbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), backbufferindex, riid, ppbuffer as _).ok() } } } #[repr(C)] @@ -5021,7 +5021,7 @@ windows_core::imp::define_interface!(ISurfacePresenterFlipBuffer, ISurfacePresen windows_core::imp::interface_hierarchy!(ISurfacePresenterFlipBuffer, windows_core::IUnknown); impl ISurfacePresenterFlipBuffer { pub unsafe fn BeginDraw(&self, riid: *const windows_core::GUID, ppbuffer: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).BeginDraw)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(ppbuffer)).ok() } + unsafe { (windows_core::Interface::vtable(self).BeginDraw)(windows_core::Interface::as_raw(self), riid, ppbuffer as _).ok() } } pub unsafe fn EndDraw(&self) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).EndDraw)(windows_core::Interface::as_raw(self)).ok() } @@ -5230,7 +5230,7 @@ impl ITargetFrame { unsafe { (windows_core::Interface::vtable(self).SetFrameMargins)(windows_core::Interface::as_raw(self), dwwidth, dwheight).ok() } } pub unsafe fn GetFrameMargins(&self, pdwwidth: *mut u32, pdwheight: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFrameMargins)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwwidth), core::mem::transmute(pdwheight)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFrameMargins)(windows_core::Interface::as_raw(self), pdwwidth as _, pdwheight as _).ok() } } pub unsafe fn RemoteNavigate(&self, puldata: &[u32]) -> windows_core::Result<()> { unsafe { (windows_core::Interface::vtable(self).RemoteNavigate)(windows_core::Interface::as_raw(self), puldata.len().try_into().unwrap(), core::mem::transmute(puldata.as_ptr())).ok() } @@ -5486,7 +5486,7 @@ impl ITargetFrame2 { unsafe { (windows_core::Interface::vtable(self).SetFrameMargins)(windows_core::Interface::as_raw(self), dwwidth, dwheight).ok() } } pub unsafe fn GetFrameMargins(&self, pdwwidth: *mut u32, pdwheight: *mut u32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetFrameMargins)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwwidth), core::mem::transmute(pdwheight)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetFrameMargins)(windows_core::Interface::as_raw(self), pdwwidth as _, pdwheight as _).ok() } } pub unsafe fn FindFrame(&self, psztargetname: P0, dwflags: u32) -> windows_core::Result where @@ -6337,7 +6337,7 @@ impl IUrlHistoryStg { where P0: windows_core::Param, { - unsafe { (windows_core::Interface::vtable(self).QueryUrl)(windows_core::Interface::as_raw(self), pocsurl.param().abi(), dwflags, core::mem::transmute(lpstaturl)).ok() } + unsafe { (windows_core::Interface::vtable(self).QueryUrl)(windows_core::Interface::as_raw(self), pocsurl.param().abi(), dwflags, lpstaturl as _).ok() } } pub unsafe fn BindToObject(&self, pocsurl: P0) -> windows_core::Result where @@ -6607,7 +6607,7 @@ impl IViewObjectPresentFlipSite { } } pub unsafe fn GetMetrics(&self, ppos: *mut super::super::Foundation::POINT, psize: *mut super::super::Foundation::SIZE, pscalex: *mut f32, pscaley: *mut f32) -> windows_core::Result<()> { - unsafe { (windows_core::Interface::vtable(self).GetMetrics)(windows_core::Interface::as_raw(self), core::mem::transmute(ppos), core::mem::transmute(psize), core::mem::transmute(pscalex), core::mem::transmute(pscaley)).ok() } + unsafe { (windows_core::Interface::vtable(self).GetMetrics)(windows_core::Interface::as_raw(self), ppos as _, psize as _, pscalex as _, pscaley as _).ok() } } pub unsafe fn GetFullScreenSize(&self) -> windows_core::Result { unsafe { diff --git a/crates/tests/bindgen/src/bool_event.rs b/crates/tests/bindgen/src/bool_event.rs index 052df14fb7..2352c601d2 100644 --- a/crates/tests/bindgen/src/bool_event.rs +++ b/crates/tests/bindgen/src/bool_event.rs @@ -19,7 +19,7 @@ where windows_targets::link!("kernel32.dll" "system" fn CreateEventW(lpeventattributes : *const windows::Win32::Security:: SECURITY_ATTRIBUTES, bmanualreset : windows::Win32::Foundation:: BOOL, binitialstate : windows::Win32::Foundation:: BOOL, lpname : windows_core::PCWSTR) -> windows::Win32::Foundation:: HANDLE); let result__ = unsafe { CreateEventW( - core::mem::transmute(lpeventattributes.unwrap_or(core::mem::zeroed())), + lpeventattributes.unwrap_or(core::mem::zeroed()) as _, bmanualreset.into(), binitialstate.into(), lpname.param().abi(), @@ -36,7 +36,7 @@ pub unsafe fn NtWaitForSingleObject( timeout: *mut i64, ) -> windows::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtWaitForSingleObject(handle : windows::Win32::Foundation:: HANDLE, alertable : bool, timeout : *mut i64) -> windows::Win32::Foundation:: NTSTATUS); - unsafe { NtWaitForSingleObject(handle, alertable, core::mem::transmute(timeout)) } + unsafe { NtWaitForSingleObject(handle, alertable, timeout as _) } } #[inline] pub unsafe fn SetEvent(hevent: windows::Win32::Foundation::HANDLE) -> windows_core::Result<()> { diff --git a/crates/tests/bindgen/src/fn_associated_enum_win.rs b/crates/tests/bindgen/src/fn_associated_enum_win.rs index a8838652f0..ee1ebb99ef 100644 --- a/crates/tests/bindgen/src/fn_associated_enum_win.rs +++ b/crates/tests/bindgen/src/fn_associated_enum_win.rs @@ -14,7 +14,7 @@ pub unsafe fn CoInitializeEx( windows_targets::link!("ole32.dll" "system" fn CoInitializeEx(pvreserved : *const core::ffi::c_void, dwcoinit : u32) -> windows_core::HRESULT); unsafe { CoInitializeEx( - core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), + pvreserved.unwrap_or(core::mem::zeroed()) as _, dwcoinit.0 as _, ) } diff --git a/crates/tests/bindgen/src/fn_return_void_win.rs b/crates/tests/bindgen/src/fn_return_void_win.rs index 3ba24b1776..1dedfb577d 100644 --- a/crates/tests/bindgen/src/fn_return_void_win.rs +++ b/crates/tests/bindgen/src/fn_return_void_win.rs @@ -9,7 +9,7 @@ #[inline] pub unsafe fn GlobalMemoryStatus(lpbuffer: *mut MEMORYSTATUS) { windows_targets::link!("kernel32.dll" "system" fn GlobalMemoryStatus(lpbuffer : *mut MEMORYSTATUS)); - unsafe { GlobalMemoryStatus(core::mem::transmute(lpbuffer)) } + unsafe { GlobalMemoryStatus(lpbuffer as _) } } #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] diff --git a/crates/tests/bindgen/src/interface_array_return.rs b/crates/tests/bindgen/src/interface_array_return.rs index 5869e0d508..fd311509da 100644 --- a/crates/tests/bindgen/src/interface_array_return.rs +++ b/crates/tests/bindgen/src/interface_array_return.rs @@ -38,7 +38,7 @@ impl IDispatch { rgsznames, cnames, lcid, - core::mem::transmute(rgdispid), + rgdispid as _, ) .ok() } diff --git a/crates/tests/bindgen/src/interface_cpp_return_udt.rs b/crates/tests/bindgen/src/interface_cpp_return_udt.rs index a511694aa9..121ea89c24 100644 --- a/crates/tests/bindgen/src/interface_cpp_return_udt.rs +++ b/crates/tests/bindgen/src/interface_cpp_return_udt.rs @@ -49,8 +49,8 @@ impl ID2D1Bitmap { unsafe { (windows_core::Interface::vtable(self).GetDpi)( windows_core::Interface::as_raw(self), - core::mem::transmute(dpix), - core::mem::transmute(dpiy), + dpix as _, + dpiy as _, ) } } diff --git a/crates/tests/bindgen/src/ref_params.rs b/crates/tests/bindgen/src/ref_params.rs index 970b6876cc..bad879a209 100644 --- a/crates/tests/bindgen/src/ref_params.rs +++ b/crates/tests/bindgen/src/ref_params.rs @@ -30,8 +30,8 @@ impl IDynamicConceptProviderConcept { contextobject.param().abi(), conceptid, core::mem::transmute(conceptinterface), - core::mem::transmute(conceptmetadata.unwrap_or(core::mem::zeroed())), - core::mem::transmute(hasconcept), + conceptmetadata.unwrap_or(core::mem::zeroed()) as _, + hasconcept as _, ) .ok() } @@ -276,8 +276,8 @@ impl IKeyStore { (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())), + object.unwrap_or(core::mem::zeroed()) as _, + metadata.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -316,8 +316,8 @@ impl IKeyStore { (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())), + object.unwrap_or(core::mem::zeroed()) as _, + metadata.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -512,8 +512,8 @@ impl IModelObject { (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())), + object.unwrap_or(core::mem::zeroed()) as _, + metadata.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -563,7 +563,7 @@ impl IModelObject { windows_core::Interface::as_raw(self), conceptid, core::mem::transmute(conceptinterface), - core::mem::transmute(conceptmetadata.unwrap_or(core::mem::zeroed())), + conceptmetadata.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -639,8 +639,8 @@ impl IModelObject { (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())), + object.unwrap_or(core::mem::zeroed()) as _, + metadata.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -658,8 +658,8 @@ impl IModelObject { (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())), + objectreference.unwrap_or(core::mem::zeroed()) as _, + metadata.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -766,7 +766,7 @@ impl IModelObject { (windows_core::Interface::vtable(self).Compare)( windows_core::Interface::as_raw(self), other.param().abi(), - core::mem::transmute(ppresult.unwrap_or(core::mem::zeroed())), + ppresult.unwrap_or(core::mem::zeroed()) as _, ) .ok() } diff --git a/crates/tests/bindgen/src/struct_with_cpp_interface.rs b/crates/tests/bindgen/src/struct_with_cpp_interface.rs index 77099a987b..f6f85423ff 100644 --- a/crates/tests/bindgen/src/struct_with_cpp_interface.rs +++ b/crates/tests/bindgen/src/struct_with_cpp_interface.rs @@ -110,8 +110,8 @@ impl ID3D12Object { (windows_core::Interface::vtable(self).GetPrivateData)( windows_core::Interface::as_raw(self), guid, - core::mem::transmute(pdatasize), - core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), + pdatasize as _, + pdata.unwrap_or(core::mem::zeroed()) as _, ) .ok() } @@ -127,7 +127,7 @@ impl ID3D12Object { windows_core::Interface::as_raw(self), guid, datasize, - core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), + pdata.unwrap_or(core::mem::zeroed()) as _, ) .ok() }